The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
[Website] Codebase cleanup and SEO improvements. (#20415)
Abdullah.2e5ccd9b860b
diff --git a/README.md b/README.mdindex 7bfc56b28a1..684f28eb2d6 100644--- a/README.md+++ b/README.md@@ -6,14 +6,14 @@<h2 align="center" >The #1 Open-Source CRM</h2>-<p align="center"><a href="https://twenty.com"><img src="./packages/twenty-website-new/public/images/readme/globe-icon.svg" width="12" height="12"/> Website</a> · <a href="https://docs.twenty.com"><img src="./packages/twenty-website-new/public/images/readme/book-icon.svg" width="12" height="12"/> Documentation</a> · <a href="https://github.com/orgs/twentyhq/projects/1"><img src="./packages/twenty-website-new/public/images/readme/map-icon.svg" width="12" height="12"/> Roadmap </a> · <a href="https://discord.gg/cx5n4Jzs57"><img src="./packages/twenty-website-new/public/images/readme/discord-icon.svg" width="12" height="12"/> Discord</a> · <a href="https://www.figma.com/file/xt8O9mFeLl46C5InWwoMrN/Twenty"><img src="./packages/twenty-website-new/public/images/readme/figma-icon.png" width="12" height="12"/> Figma</a></p>+<p align="center"><a href="https://twenty.com"><img src="./packages/twenty-website-new/public/images/readme/globe-icon.svg" width="12" height="12"/> Website</a> · <a href="https://docs.twenty.com"><img src="./packages/twenty-website-new/public/images/readme/book-icon.svg" width="12" height="12"/> Documentation</a> · <a href="https://github.com/orgs/twentyhq/projects/1"><img src="./packages/twenty-website-new/public/images/readme/map-icon.svg" width="12" height="12"/> Roadmap </a> · <a href="https://discord.gg/cx5n4Jzs57"><img src="./packages/twenty-website-new/public/images/readme/discord-icon.svg" width="12" height="12"/> Discord</a> · <a href="https://www.figma.com/file/xt8O9mFeLl46C5InWwoMrN/Twenty"><img src="./packages/twenty-website-new/public/images/readme/figma-icon.webp" width="12" height="12"/> Figma</a></p><p align="center"><a href="https://www.twenty.com"><picture>- <source media="(prefers-color-scheme: dark)" srcset="./packages/twenty-website-new/public/images/readme/github-cover-dark.png" />- <source media="(prefers-color-scheme: light)" srcset="./packages/twenty-website-new/public/images/readme/github-cover-light.png" />- <img src="./packages/twenty-website-new/public/images/readme/github-cover-light.png" alt="Twenty banner" />+ <source media="(prefers-color-scheme: dark)" srcset="./packages/twenty-website-new/public/images/readme/github-cover-dark.webp" />+ <source media="(prefers-color-scheme: light)" srcset="./packages/twenty-website-new/public/images/readme/github-cover-light.webp" />+ <img src="./packages/twenty-website-new/public/images/readme/github-cover-light.webp" alt="Twenty banner" /></picture></a></p>@@ -85,17 +85,17 @@ Want to go deeper? Read the <a href="https://docs.twenty.com/user-guide/introduc<tr><td width="50%"><picture>- <source media="(prefers-color-scheme: dark)" srcset="./packages/twenty-website-new/public/images/readme/v2-build-apps-dark.png" />- <source media="(prefers-color-scheme: light)" srcset="./packages/twenty-website-new/public/images/readme/v2-build-apps-light.png" />- <img src="./packages/twenty-website-new/public/images/readme/v2-build-apps-light.png" alt="Create your apps" />+ <source media="(prefers-color-scheme: dark)" srcset="./packages/twenty-website-new/public/images/readme/v2-build-apps-dark.webp" />+ <source media="(prefers-color-scheme: light)" srcset="./packages/twenty-website-new/public/images/readme/v2-build-apps-light.webp" />+ <img src="./packages/twenty-website-new/public/images/readme/v2-build-apps-light.webp" alt="Create your apps" /></picture><p align="center"><a href="https://docs.twenty.com/developers/extend/apps/getting-started"><img src="./packages/twenty-website-new/public/images/readme/code-icon.svg" width="16" height="16"/> Learn more about apps in doc</a></p></td><td width="50%"><picture>- <source media="(prefers-color-scheme: dark)" srcset="./packages/twenty-website-new/public/images/readme/v2-version-control-dark.png" />- <source media="(prefers-color-scheme: light)" srcset="./packages/twenty-website-new/public/images/readme/v2-version-control-light.png" />- <img src="./packages/twenty-website-new/public/images/readme/v2-version-control-light.png" alt="Stay on top with version control" />+ <source media="(prefers-color-scheme: dark)" srcset="./packages/twenty-website-new/public/images/readme/v2-version-control-dark.webp" />+ <source media="(prefers-color-scheme: light)" srcset="./packages/twenty-website-new/public/images/readme/v2-version-control-light.webp" />+ <img src="./packages/twenty-website-new/public/images/readme/v2-version-control-light.webp" alt="Stay on top with version control" /></picture><p align="center"><a href="https://docs.twenty.com/developers/extend/apps/publishing"><img src="./packages/twenty-website-new/public/images/readme/monitor-icon.svg" width="16" height="16"/> Learn more about version control in doc</a></p></td>@@ -103,17 +103,17 @@ Want to go deeper? Read the <a href="https://docs.twenty.com/user-guide/introduc<tr><td width="50%"><picture>- <source media="(prefers-color-scheme: dark)" srcset="./packages/twenty-website-new/public/images/readme/v2-all-tools-dark.png" />- <source media="(prefers-color-scheme: light)" srcset="./packages/twenty-website-new/public/images/readme/v2-all-tools-light.png" />- <img src="./packages/twenty-website-new/public/images/readme/v2-all-tools-light.png" alt="All the tools you need to build anything" />+ <source media="(prefers-color-scheme: dark)" srcset="./packages/twenty-website-new/public/images/readme/v2-all-tools-dark.webp" />+ <source media="(prefers-color-scheme: light)" srcset="./packages/twenty-website-new/public/images/readme/v2-all-tools-light.webp" />+ <img src="./packages/twenty-website-new/public/images/readme/v2-all-tools-light.webp" alt="All the tools you need to build anything" /></picture><p align="center"><a href="https://docs.twenty.com/developers/extend/apps/building"><img src="./packages/twenty-website-new/public/images/readme/rocket-icon.svg" width="16" height="16"/> Learn more about primitives in doc</a></p></td><td width="50%"><picture>- <source media="(prefers-color-scheme: dark)" srcset="./packages/twenty-website-new/public/images/readme/v2-tools-dark.png" />- <source media="(prefers-color-scheme: light)" srcset="./packages/twenty-website-new/public/images/readme/v2-tools-light.png" />- <img src="./packages/twenty-website-new/public/images/readme/v2-tools-light.png" alt="Customize your layouts" />+ <source media="(prefers-color-scheme: dark)" srcset="./packages/twenty-website-new/public/images/readme/v2-tools-dark.webp" />+ <source media="(prefers-color-scheme: light)" srcset="./packages/twenty-website-new/public/images/readme/v2-tools-light.webp" />+ <img src="./packages/twenty-website-new/public/images/readme/v2-tools-light.webp" alt="Customize your layouts" /></picture><p align="center"><a href="https://docs.twenty.com/user-guide/layout/overview"><img src="./packages/twenty-website-new/public/images/readme/planner-icon.svg" width="16" height="16"/> Learn more about layouts in doc</a></p></td>@@ -121,17 +121,17 @@ Want to go deeper? Read the <a href="https://docs.twenty.com/user-guide/introduc<tr><td width="50%"><picture>- <source media="(prefers-color-scheme: dark)" srcset="./packages/twenty-website-new/public/images/readme/v2-ai-agents-dark.png" />- <source media="(prefers-color-scheme: light)" srcset="./packages/twenty-website-new/public/images/readme/v2-ai-agents-light.png" />- <img src="./packages/twenty-website-new/public/images/readme/v2-ai-agents-light.png" alt="AI agents and chats" />+ <source media="(prefers-color-scheme: dark)" srcset="./packages/twenty-website-new/public/images/readme/v2-ai-agents-dark.webp" />+ <source media="(prefers-color-scheme: light)" srcset="./packages/twenty-website-new/public/images/readme/v2-ai-agents-light.webp" />+ <img src="./packages/twenty-website-new/public/images/readme/v2-ai-agents-light.webp" alt="AI agents and chats" /></picture><p align="center"><a href="https://docs.twenty.com/user-guide/ai/overview"><img src="./packages/twenty-website-new/public/images/readme/message-icon.svg" width="16" height="16"/> Learn more about AI in doc</a></p></td><td width="50%"><picture>- <source media="(prefers-color-scheme: dark)" srcset="./packages/twenty-website-new/public/images/readme/v2-crm-tools-dark.png" />- <source media="(prefers-color-scheme: light)" srcset="./packages/twenty-website-new/public/images/readme/v2-crm-tools-light.png" />- <img src="./packages/twenty-website-new/public/images/readme/v2-crm-tools-light.png" alt="Plus all the tools of a good CRM" />+ <source media="(prefers-color-scheme: dark)" srcset="./packages/twenty-website-new/public/images/readme/v2-crm-tools-dark.webp" />+ <source media="(prefers-color-scheme: light)" srcset="./packages/twenty-website-new/public/images/readme/v2-crm-tools-light.webp" />+ <img src="./packages/twenty-website-new/public/images/readme/v2-crm-tools-light.webp" alt="Plus all the tools of a good CRM" /></picture><p align="center"><a href="https://docs.twenty.com/user-guide/introduction"><img src="./packages/twenty-website-new/public/images/readme/star-icon.svg" width="16" height="16"/> Learn more about CRM features in doc</a></p></td>@@ -152,13 +152,13 @@ Want to go deeper? Read the <a href="https://docs.twenty.com/user-guide/introduc# Thanks<p align="center">- <a href="https://www.chromatic.com/"><img src="./packages/twenty-website-new/public/images/readme/chromatic.png" height="28" alt="Chromatic" /></a>+ <a href="https://www.chromatic.com/"><img src="./packages/twenty-website-new/public/images/readme/chromatic.webp" height="28" alt="Chromatic" /></a> - <a href="https://greptile.com"><img src="./packages/twenty-website-new/public/images/readme/greptile.png" height="28" alt="Greptile" /></a>+ <a href="https://greptile.com"><img src="./packages/twenty-website-new/public/images/readme/greptile.webp" height="28" alt="Greptile" /></a> - <a href="https://sentry.io/"><img src="./packages/twenty-website-new/public/images/readme/sentry.png" height="28" alt="Sentry" /></a>+ <a href="https://sentry.io/"><img src="./packages/twenty-website-new/public/images/readme/sentry.webp" height="28" alt="Sentry" /></a> - <a href="https://crowdin.com/"><img src="./packages/twenty-website-new/public/images/readme/crowdin.png" height="28" alt="Crowdin" /></a>+ <a href="https://crowdin.com/"><img src="./packages/twenty-website-new/public/images/readme/crowdin.webp" height="28" alt="Crowdin" /></a></p>Thanks to these amazing services that we use and recommend for UI testing (Chromatic), code review (Greptile), catching bugs (Sentry) and translating (Crowdin).diff --git a/packages/twenty-website-new/lingui.config.ts b/packages/twenty-website-new/lingui.config.tsindex 1125c1c997a..215989deb6e 100644--- a/packages/twenty-website-new/lingui.config.ts+++ b/packages/twenty-website-new/lingui.config.ts@@ -2,7 +2,7 @@ import { defineConfig } from '@lingui/conf';import { formatter } from '@lingui/format-po';import { SOURCE_LOCALE } from 'twenty-shared/translations';-import { WEBSITE_LOCALE_LIST } from './src/lib/i18n/website-locale-list';+import { WEBSITE_LOCALE_LIST } from './src/lib/i18n/utils/website-locale-list';export default defineConfig({sourceLocale: SOURCE_LOCALE,diff --git a/packages/twenty-website-new/next.config.ts b/packages/twenty-website-new/next.config.tsindex fd7b50c4a48..7d09efba6d7 100644--- a/packages/twenty-website-new/next.config.ts+++ b/packages/twenty-website-new/next.config.ts@@ -55,6 +55,15 @@ const nextConfig: LinariaConfig = {source: '/:path*',headers: SECURITY_HEADERS.map((h) => ({ ...h })),},+ {+ source: '/(images|illustrations|lottie)/:path*',+ headers: [+ {+ key: 'Cache-Control',+ value: 'public, max-age=31536000, immutable',+ },+ ],+ },];},async redirects() {@@ -115,13 +124,13 @@ const nextConfig: LinariaConfig = {permanent: true,},{- source: '/why-twenty',- destination: '/resources/why-twenty',+ source: '/resources/why-twenty',+ destination: '/why-twenty',permanent: true,},{source: '/story',- destination: '/resources/why-twenty',+ destination: '/why-twenty',permanent: true,},{diff --git a/packages/twenty-website-new/package.json b/packages/twenty-website-new/package.jsonindex e6b7db6f585..b8b12c9fa32 100644--- a/packages/twenty-website-new/package.json+++ b/packages/twenty-website-new/package.json@@ -12,14 +12,11 @@"@base-ui/react": "^1.3.0","@base-ui/utils": "^0.2.6","@calcom/embed-react": "^1.5.3",- "@gsap/react": "2.1.2","@linaria/core": "^7.0.0","@linaria/react": "^7.0.1","@lingui/core": "^5.1.2","@lingui/react": "^5.1.2","@lottiefiles/dotlottie-react": "^0.18.10",- "@react-three/drei": "^10.7.7",- "@react-three/fiber": "^9.5.0","@tabler/icons-react": "^3.41.1","@wyw-in-js/babel-preset": "^0.8.1","axios": "^1.14.0",diff --git a/packages/twenty-website-new/public/images/case-studies/header-pattern.png b/packages/twenty-website-new/public/images/case-studies/header-pattern.pngdeleted file mode 100644index d8b36a3c1cc..00000000000Binary files a/packages/twenty-website-new/public/images/case-studies/header-pattern.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/case-studies/header-pattern.webp b/packages/twenty-website-new/public/images/case-studies/header-pattern.webpnew file mode 100644index 00000000000..8d96f8d9b3eBinary files /dev/null and b/packages/twenty-website-new/public/images/case-studies/header-pattern.webp differdiff --git a/packages/twenty-website-new/public/images/core/logo-mini.png b/packages/twenty-website-new/public/images/core/logo-mini.pngdeleted file mode 100644index ba655d69b81..00000000000Binary files a/packages/twenty-website-new/public/images/core/logo-mini.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/core/logo-mini.webp b/packages/twenty-website-new/public/images/core/logo-mini.webpnew file mode 100644index 00000000000..661a8efe038Binary files /dev/null and b/packages/twenty-website-new/public/images/core/logo-mini.webp differdiff --git a/packages/twenty-website-new/public/images/home/logo-bar/windmill-logo.png b/packages/twenty-website-new/public/images/home/logo-bar/windmill-logo.pngdeleted file mode 100644index 4f10ae59f75..00000000000Binary files a/packages/twenty-website-new/public/images/home/logo-bar/windmill-logo.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/home/logo-bar/windmill-logo.webp b/packages/twenty-website-new/public/images/home/logo-bar/windmill-logo.webpnew file mode 100644index 00000000000..9aadf9a4eccBinary files /dev/null and b/packages/twenty-website-new/public/images/home/logo-bar/windmill-logo.webp differdiff --git a/packages/twenty-website-new/public/images/home/stepper/gears.jpg b/packages/twenty-website-new/public/images/home/stepper/gears.jpgdeleted file mode 100644index 0c3a0eb39e1..00000000000Binary files a/packages/twenty-website-new/public/images/home/stepper/gears.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/home/stepper/gears.webp b/packages/twenty-website-new/public/images/home/stepper/gears.webpnew file mode 100644index 00000000000..8dc6f419079Binary files /dev/null and b/packages/twenty-website-new/public/images/home/stepper/gears.webp differdiff --git a/packages/twenty-website-new/public/images/og/default.png b/packages/twenty-website-new/public/images/og/default.pngnew file mode 100644index 00000000000..0f924eeb369Binary files /dev/null and b/packages/twenty-website-new/public/images/og/default.png differdiff --git a/packages/twenty-website-new/public/images/partner/testimonials/bertrams.jpeg b/packages/twenty-website-new/public/images/partner/testimonials/bertrams.jpegdeleted file mode 100644index 7d266794086..00000000000Binary files a/packages/twenty-website-new/public/images/partner/testimonials/bertrams.jpeg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/partner/testimonials/bertrams.webp b/packages/twenty-website-new/public/images/partner/testimonials/bertrams.webpnew file mode 100644index 00000000000..f71b5a741cbBinary files /dev/null and b/packages/twenty-website-new/public/images/partner/testimonials/bertrams.webp differdiff --git a/packages/twenty-website-new/public/images/partner/testimonials/joseph-chiang.jpg b/packages/twenty-website-new/public/images/partner/testimonials/joseph-chiang.jpgdeleted file mode 100644index 293df084b2c..00000000000Binary files a/packages/twenty-website-new/public/images/partner/testimonials/joseph-chiang.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/partner/testimonials/joseph-chiang.webp b/packages/twenty-website-new/public/images/partner/testimonials/joseph-chiang.webpnew file mode 100644index 00000000000..28acfff234eBinary files /dev/null and b/packages/twenty-website-new/public/images/partner/testimonials/joseph-chiang.webp differdiff --git a/packages/twenty-website-new/public/images/partner/testimonials/mike-babiy.png b/packages/twenty-website-new/public/images/partner/testimonials/mike-babiy.pngdeleted file mode 100644index 26cdabed77d..00000000000Binary files a/packages/twenty-website-new/public/images/partner/testimonials/mike-babiy.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/partner/testimonials/mike-babiy.webp b/packages/twenty-website-new/public/images/partner/testimonials/mike-babiy.webpnew file mode 100644index 00000000000..1a9d1dd5c03Binary files /dev/null and b/packages/twenty-website-new/public/images/partner/testimonials/mike-babiy.webp differdiff --git a/packages/twenty-website-new/public/images/partner/testimonials/olivier-reinaud.jpg b/packages/twenty-website-new/public/images/partner/testimonials/olivier-reinaud.jpgdeleted file mode 100644index d164db974d8..00000000000Binary files a/packages/twenty-website-new/public/images/partner/testimonials/olivier-reinaud.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/partner/testimonials/olivier-reinaud.webp b/packages/twenty-website-new/public/images/partner/testimonials/olivier-reinaud.webpnew file mode 100644index 00000000000..51f3d1df5dbBinary files /dev/null and b/packages/twenty-website-new/public/images/partner/testimonials/olivier-reinaud.webp differdiff --git a/packages/twenty-website-new/public/images/pricing/plans/organization-icon.png b/packages/twenty-website-new/public/images/pricing/plans/organization-icon.pngdeleted file mode 100644index d9b73f3bb13..00000000000Binary files a/packages/twenty-website-new/public/images/pricing/plans/organization-icon.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/pricing/plans/organization-icon.webp b/packages/twenty-website-new/public/images/pricing/plans/organization-icon.webpnew file mode 100644index 00000000000..65f9a6f788dBinary files /dev/null and b/packages/twenty-website-new/public/images/pricing/plans/organization-icon.webp differdiff --git a/packages/twenty-website-new/public/images/pricing/plans/pro-icon.png b/packages/twenty-website-new/public/images/pricing/plans/pro-icon.pngdeleted file mode 100644index 33c2fb7b654..00000000000Binary files a/packages/twenty-website-new/public/images/pricing/plans/pro-icon.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/pricing/plans/pro-icon.webp b/packages/twenty-website-new/public/images/pricing/plans/pro-icon.webpnew file mode 100644index 00000000000..84b03da3352Binary files /dev/null and b/packages/twenty-website-new/public/images/pricing/plans/pro-icon.webp differdiff --git a/packages/twenty-website-new/public/images/readme/chromatic.png b/packages/twenty-website-new/public/images/readme/chromatic.pngdeleted file mode 100644index 75beea4d8dc..00000000000Binary files a/packages/twenty-website-new/public/images/readme/chromatic.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/chromatic.webp b/packages/twenty-website-new/public/images/readme/chromatic.webpnew file mode 100644index 00000000000..84adec3f8b8Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/chromatic.webp differdiff --git a/packages/twenty-website-new/public/images/readme/crowdin.png b/packages/twenty-website-new/public/images/readme/crowdin.pngdeleted file mode 100644index 1291e8a17db..00000000000Binary files a/packages/twenty-website-new/public/images/readme/crowdin.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/crowdin.webp b/packages/twenty-website-new/public/images/readme/crowdin.webpnew file mode 100644index 00000000000..2255648c488Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/crowdin.webp differdiff --git a/packages/twenty-website-new/public/images/readme/data-model-dark.png b/packages/twenty-website-new/public/images/readme/data-model-dark.pngdeleted file mode 100644index ffb30a3b20f..00000000000Binary files a/packages/twenty-website-new/public/images/readme/data-model-dark.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/data-model-dark.webp b/packages/twenty-website-new/public/images/readme/data-model-dark.webpnew file mode 100644index 00000000000..12325355431Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/data-model-dark.webp differdiff --git a/packages/twenty-website-new/public/images/readme/data-model-light.png b/packages/twenty-website-new/public/images/readme/data-model-light.pngdeleted file mode 100644index 9eb4efb4df2..00000000000Binary files a/packages/twenty-website-new/public/images/readme/data-model-light.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/data-model-light.webp b/packages/twenty-website-new/public/images/readme/data-model-light.webpnew file mode 100644index 00000000000..29c6910b007Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/data-model-light.webp differdiff --git a/packages/twenty-website-new/public/images/readme/figma-icon.png b/packages/twenty-website-new/public/images/readme/figma-icon.pngdeleted file mode 100644index c6595adfae7..00000000000Binary files a/packages/twenty-website-new/public/images/readme/figma-icon.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/figma-icon.webp b/packages/twenty-website-new/public/images/readme/figma-icon.webpnew file mode 100644index 00000000000..366acfc1ed6Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/figma-icon.webp differdiff --git a/packages/twenty-website-new/public/images/readme/github-cover-dark.png b/packages/twenty-website-new/public/images/readme/github-cover-dark.pngdeleted file mode 100644index d1218eefaaf..00000000000Binary files a/packages/twenty-website-new/public/images/readme/github-cover-dark.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/github-cover-dark.webp b/packages/twenty-website-new/public/images/readme/github-cover-dark.webpnew file mode 100644index 00000000000..3ebec8e15e0Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/github-cover-dark.webp differdiff --git a/packages/twenty-website-new/public/images/readme/github-cover-light.png b/packages/twenty-website-new/public/images/readme/github-cover-light.pngdeleted file mode 100644index 17f2c177969..00000000000Binary files a/packages/twenty-website-new/public/images/readme/github-cover-light.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/github-cover-light.webp b/packages/twenty-website-new/public/images/readme/github-cover-light.webpnew file mode 100644index 00000000000..9be46166105Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/github-cover-light.webp differdiff --git a/packages/twenty-website-new/public/images/readme/greptile.png b/packages/twenty-website-new/public/images/readme/greptile.pngdeleted file mode 100644index 65f79ec2701..00000000000Binary files a/packages/twenty-website-new/public/images/readme/greptile.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/greptile.webp b/packages/twenty-website-new/public/images/readme/greptile.webpnew file mode 100644index 00000000000..ab269df423cBinary files /dev/null and b/packages/twenty-website-new/public/images/readme/greptile.webp differdiff --git a/packages/twenty-website-new/public/images/readme/hacktoberfest2025.png b/packages/twenty-website-new/public/images/readme/hacktoberfest2025.pngdeleted file mode 100644index bbb0312eb2d..00000000000Binary files a/packages/twenty-website-new/public/images/readme/hacktoberfest2025.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/hacktoberfest2025.webp b/packages/twenty-website-new/public/images/readme/hacktoberfest2025.webpnew file mode 100644index 00000000000..02f43e3ddf1Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/hacktoberfest2025.webp differdiff --git a/packages/twenty-website-new/public/images/readme/permissions-dark.png b/packages/twenty-website-new/public/images/readme/permissions-dark.pngdeleted file mode 100644index f4f3eb5a6d7..00000000000Binary files a/packages/twenty-website-new/public/images/readme/permissions-dark.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/permissions-dark.webp b/packages/twenty-website-new/public/images/readme/permissions-dark.webpnew file mode 100644index 00000000000..ac5e8878cf6Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/permissions-dark.webp differdiff --git a/packages/twenty-website-new/public/images/readme/permissions-light.png b/packages/twenty-website-new/public/images/readme/permissions-light.pngdeleted file mode 100644index 0b81f80350d..00000000000Binary files a/packages/twenty-website-new/public/images/readme/permissions-light.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/permissions-light.webp b/packages/twenty-website-new/public/images/readme/permissions-light.webpnew file mode 100644index 00000000000..7974aed6f5cBinary files /dev/null and b/packages/twenty-website-new/public/images/readme/permissions-light.webp differdiff --git a/packages/twenty-website-new/public/images/readme/plus-other-features-dark.png b/packages/twenty-website-new/public/images/readme/plus-other-features-dark.pngdeleted file mode 100644index d9bd9be2696..00000000000Binary files a/packages/twenty-website-new/public/images/readme/plus-other-features-dark.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/plus-other-features-dark.webp b/packages/twenty-website-new/public/images/readme/plus-other-features-dark.webpnew file mode 100644index 00000000000..a3deea9dbd1Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/plus-other-features-dark.webp differdiff --git a/packages/twenty-website-new/public/images/readme/plus-other-features-light.png b/packages/twenty-website-new/public/images/readme/plus-other-features-light.pngdeleted file mode 100644index bb5ac79927e..00000000000Binary files a/packages/twenty-website-new/public/images/readme/plus-other-features-light.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/plus-other-features-light.webp b/packages/twenty-website-new/public/images/readme/plus-other-features-light.webpnew file mode 100644index 00000000000..92150d53bfdBinary files /dev/null and b/packages/twenty-website-new/public/images/readme/plus-other-features-light.webp differdiff --git a/packages/twenty-website-new/public/images/readme/product-hunt-banner-dark.png b/packages/twenty-website-new/public/images/readme/product-hunt-banner-dark.pngdeleted file mode 100644index 2341bb8362f..00000000000Binary files a/packages/twenty-website-new/public/images/readme/product-hunt-banner-dark.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/product-hunt-banner-dark.webp b/packages/twenty-website-new/public/images/readme/product-hunt-banner-dark.webpnew file mode 100644index 00000000000..c3134152e73Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/product-hunt-banner-dark.webp differdiff --git a/packages/twenty-website-new/public/images/readme/product-hunt-banner-light.png b/packages/twenty-website-new/public/images/readme/product-hunt-banner-light.pngdeleted file mode 100644index e39a4708f0a..00000000000Binary files a/packages/twenty-website-new/public/images/readme/product-hunt-banner-light.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/product-hunt-banner-light.webp b/packages/twenty-website-new/public/images/readme/product-hunt-banner-light.webpnew file mode 100644index 00000000000..5c8913de4d7Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/product-hunt-banner-light.webp differdiff --git a/packages/twenty-website-new/public/images/readme/product-hunt-banner.png b/packages/twenty-website-new/public/images/readme/product-hunt-banner.pngdeleted file mode 100644index a57a66b8c57..00000000000Binary files a/packages/twenty-website-new/public/images/readme/product-hunt-banner.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/product-hunt-banner.webp b/packages/twenty-website-new/public/images/readme/product-hunt-banner.webpnew file mode 100644index 00000000000..43bbb1cbdb3Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/product-hunt-banner.webp differdiff --git a/packages/twenty-website-new/public/images/readme/sentry.png b/packages/twenty-website-new/public/images/readme/sentry.pngdeleted file mode 100644index 52ac04749fe..00000000000Binary files a/packages/twenty-website-new/public/images/readme/sentry.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/sentry.webp b/packages/twenty-website-new/public/images/readme/sentry.webpnew file mode 100644index 00000000000..d8679cc1b4bBinary files /dev/null and b/packages/twenty-website-new/public/images/readme/sentry.webp differdiff --git a/packages/twenty-website-new/public/images/readme/v2-ai-agents-dark.png b/packages/twenty-website-new/public/images/readme/v2-ai-agents-dark.pngdeleted file mode 100644index d24a3f9fadf..00000000000Binary files a/packages/twenty-website-new/public/images/readme/v2-ai-agents-dark.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/v2-ai-agents-dark.webp b/packages/twenty-website-new/public/images/readme/v2-ai-agents-dark.webpnew file mode 100644index 00000000000..d17740e6a4aBinary files /dev/null and b/packages/twenty-website-new/public/images/readme/v2-ai-agents-dark.webp differdiff --git a/packages/twenty-website-new/public/images/readme/v2-ai-agents-light.png b/packages/twenty-website-new/public/images/readme/v2-ai-agents-light.pngdeleted file mode 100644index c511c9fe1b0..00000000000Binary files a/packages/twenty-website-new/public/images/readme/v2-ai-agents-light.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/v2-ai-agents-light.webp b/packages/twenty-website-new/public/images/readme/v2-ai-agents-light.webpnew file mode 100644index 00000000000..ff7767181daBinary files /dev/null and b/packages/twenty-website-new/public/images/readme/v2-ai-agents-light.webp differdiff --git a/packages/twenty-website-new/public/images/readme/v2-ai-agents.png b/packages/twenty-website-new/public/images/readme/v2-ai-agents.pngdeleted file mode 100644index a2beefeff3b..00000000000Binary files a/packages/twenty-website-new/public/images/readme/v2-ai-agents.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/v2-ai-agents.webp b/packages/twenty-website-new/public/images/readme/v2-ai-agents.webpnew file mode 100644index 00000000000..322714f12baBinary files /dev/null and b/packages/twenty-website-new/public/images/readme/v2-ai-agents.webp differdiff --git a/packages/twenty-website-new/public/images/readme/v2-all-tools-dark.png b/packages/twenty-website-new/public/images/readme/v2-all-tools-dark.pngdeleted file mode 100644index 783b20ae662..00000000000Binary files a/packages/twenty-website-new/public/images/readme/v2-all-tools-dark.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/v2-all-tools-dark.webp b/packages/twenty-website-new/public/images/readme/v2-all-tools-dark.webpnew file mode 100644index 00000000000..ca7589db683Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/v2-all-tools-dark.webp differdiff --git a/packages/twenty-website-new/public/images/readme/v2-all-tools-light.png b/packages/twenty-website-new/public/images/readme/v2-all-tools-light.pngdeleted file mode 100644index e262f9de1a5..00000000000Binary files a/packages/twenty-website-new/public/images/readme/v2-all-tools-light.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/v2-all-tools-light.webp b/packages/twenty-website-new/public/images/readme/v2-all-tools-light.webpnew file mode 100644index 00000000000..679090dad15Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/v2-all-tools-light.webp differdiff --git a/packages/twenty-website-new/public/images/readme/v2-build-apps-dark.png b/packages/twenty-website-new/public/images/readme/v2-build-apps-dark.pngdeleted file mode 100644index eac6b93a1c2..00000000000Binary files a/packages/twenty-website-new/public/images/readme/v2-build-apps-dark.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/v2-build-apps-dark.webp b/packages/twenty-website-new/public/images/readme/v2-build-apps-dark.webpnew file mode 100644index 00000000000..9f93b1e62c5Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/v2-build-apps-dark.webp differdiff --git a/packages/twenty-website-new/public/images/readme/v2-build-apps-light.png b/packages/twenty-website-new/public/images/readme/v2-build-apps-light.pngdeleted file mode 100644index 6f3d2586b39..00000000000Binary files a/packages/twenty-website-new/public/images/readme/v2-build-apps-light.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/v2-build-apps-light.webp b/packages/twenty-website-new/public/images/readme/v2-build-apps-light.webpnew file mode 100644index 00000000000..8e2c9628477Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/v2-build-apps-light.webp differdiff --git a/packages/twenty-website-new/public/images/readme/v2-build-apps.png b/packages/twenty-website-new/public/images/readme/v2-build-apps.pngdeleted file mode 100644index 6f3d2586b39..00000000000Binary files a/packages/twenty-website-new/public/images/readme/v2-build-apps.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/v2-build-apps.webp b/packages/twenty-website-new/public/images/readme/v2-build-apps.webpnew file mode 100644index 00000000000..8e2c9628477Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/v2-build-apps.webp differdiff --git a/packages/twenty-website-new/public/images/readme/v2-crm-tools-dark.png b/packages/twenty-website-new/public/images/readme/v2-crm-tools-dark.pngdeleted file mode 100644index 08679042279..00000000000Binary files a/packages/twenty-website-new/public/images/readme/v2-crm-tools-dark.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/v2-crm-tools-dark.webp b/packages/twenty-website-new/public/images/readme/v2-crm-tools-dark.webpnew file mode 100644index 00000000000..627ed655bc1Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/v2-crm-tools-dark.webp differdiff --git a/packages/twenty-website-new/public/images/readme/v2-crm-tools-light.png b/packages/twenty-website-new/public/images/readme/v2-crm-tools-light.pngdeleted file mode 100644index 8a77212b62d..00000000000Binary files a/packages/twenty-website-new/public/images/readme/v2-crm-tools-light.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/v2-crm-tools-light.webp b/packages/twenty-website-new/public/images/readme/v2-crm-tools-light.webpnew file mode 100644index 00000000000..dd54c06813cBinary files /dev/null and b/packages/twenty-website-new/public/images/readme/v2-crm-tools-light.webp differdiff --git a/packages/twenty-website-new/public/images/readme/v2-crm-tools.png b/packages/twenty-website-new/public/images/readme/v2-crm-tools.pngdeleted file mode 100644index 90e34b48815..00000000000Binary files a/packages/twenty-website-new/public/images/readme/v2-crm-tools.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/v2-crm-tools.webp b/packages/twenty-website-new/public/images/readme/v2-crm-tools.webpnew file mode 100644index 00000000000..f218d6802ceBinary files /dev/null and b/packages/twenty-website-new/public/images/readme/v2-crm-tools.webp differdiff --git a/packages/twenty-website-new/public/images/readme/v2-tools-dark.png b/packages/twenty-website-new/public/images/readme/v2-tools-dark.pngdeleted file mode 100644index 16bba7e0050..00000000000Binary files a/packages/twenty-website-new/public/images/readme/v2-tools-dark.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/v2-tools-dark.webp b/packages/twenty-website-new/public/images/readme/v2-tools-dark.webpnew file mode 100644index 00000000000..4851348b52aBinary files /dev/null and b/packages/twenty-website-new/public/images/readme/v2-tools-dark.webp differdiff --git a/packages/twenty-website-new/public/images/readme/v2-tools-light.png b/packages/twenty-website-new/public/images/readme/v2-tools-light.pngdeleted file mode 100644index ee284b3f5ad..00000000000Binary files a/packages/twenty-website-new/public/images/readme/v2-tools-light.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/v2-tools-light.webp b/packages/twenty-website-new/public/images/readme/v2-tools-light.webpnew file mode 100644index 00000000000..bf3b8827883Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/v2-tools-light.webp differdiff --git a/packages/twenty-website-new/public/images/readme/v2-tools.png b/packages/twenty-website-new/public/images/readme/v2-tools.pngdeleted file mode 100644index 6e5e9c4540b..00000000000Binary files a/packages/twenty-website-new/public/images/readme/v2-tools.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/v2-tools.webp b/packages/twenty-website-new/public/images/readme/v2-tools.webpnew file mode 100644index 00000000000..dae7bc11b16Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/v2-tools.webp differdiff --git a/packages/twenty-website-new/public/images/readme/v2-version-control-dark.png b/packages/twenty-website-new/public/images/readme/v2-version-control-dark.pngdeleted file mode 100644index c90a843b281..00000000000Binary files a/packages/twenty-website-new/public/images/readme/v2-version-control-dark.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/v2-version-control-dark.webp b/packages/twenty-website-new/public/images/readme/v2-version-control-dark.webpnew file mode 100644index 00000000000..a99d790c6b1Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/v2-version-control-dark.webp differdiff --git a/packages/twenty-website-new/public/images/readme/v2-version-control-light.png b/packages/twenty-website-new/public/images/readme/v2-version-control-light.pngdeleted file mode 100644index db6d8c32098..00000000000Binary files a/packages/twenty-website-new/public/images/readme/v2-version-control-light.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/v2-version-control-light.webp b/packages/twenty-website-new/public/images/readme/v2-version-control-light.webpnew file mode 100644index 00000000000..324f025d6a1Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/v2-version-control-light.webp differdiff --git a/packages/twenty-website-new/public/images/readme/v2-version-control.png b/packages/twenty-website-new/public/images/readme/v2-version-control.pngdeleted file mode 100644index db6d8c32098..00000000000Binary files a/packages/twenty-website-new/public/images/readme/v2-version-control.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/v2-version-control.webp b/packages/twenty-website-new/public/images/readme/v2-version-control.webpnew file mode 100644index 00000000000..324f025d6a1Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/v2-version-control.webp differdiff --git a/packages/twenty-website-new/public/images/readme/views-dark.png b/packages/twenty-website-new/public/images/readme/views-dark.pngdeleted file mode 100644index 3311354cb32..00000000000Binary files a/packages/twenty-website-new/public/images/readme/views-dark.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/views-dark.webp b/packages/twenty-website-new/public/images/readme/views-dark.webpnew file mode 100644index 00000000000..11f12d94816Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/views-dark.webp differdiff --git a/packages/twenty-website-new/public/images/readme/views-light.png b/packages/twenty-website-new/public/images/readme/views-light.pngdeleted file mode 100644index e513c6a427c..00000000000Binary files a/packages/twenty-website-new/public/images/readme/views-light.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/views-light.webp b/packages/twenty-website-new/public/images/readme/views-light.webpnew file mode 100644index 00000000000..9154c0502d9Binary files /dev/null and b/packages/twenty-website-new/public/images/readme/views-light.webp differdiff --git a/packages/twenty-website-new/public/images/readme/workflows-dark.png b/packages/twenty-website-new/public/images/readme/workflows-dark.pngdeleted file mode 100644index 7a4f62ad222..00000000000Binary files a/packages/twenty-website-new/public/images/readme/workflows-dark.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/workflows-dark.webp b/packages/twenty-website-new/public/images/readme/workflows-dark.webpnew file mode 100644index 00000000000..0112690e61bBinary files /dev/null and b/packages/twenty-website-new/public/images/readme/workflows-dark.webp differdiff --git a/packages/twenty-website-new/public/images/readme/workflows-light.png b/packages/twenty-website-new/public/images/readme/workflows-light.pngdeleted file mode 100644index edad0e935f3..00000000000Binary files a/packages/twenty-website-new/public/images/readme/workflows-light.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/readme/workflows-light.webp b/packages/twenty-website-new/public/images/readme/workflows-light.webpnew file mode 100644index 00000000000..529e3d943fbBinary files /dev/null and b/packages/twenty-website-new/public/images/readme/workflows-light.webp differdiff --git a/packages/twenty-website-new/public/images/releases/1.13/1.13.0-stop-workflow-button.png b/packages/twenty-website-new/public/images/releases/1.13/1.13.0-stop-workflow-button.pngdeleted file mode 100644index 9ad17467d55..00000000000Binary files a/packages/twenty-website-new/public/images/releases/1.13/1.13.0-stop-workflow-button.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/releases/1.13/1.13.0-stop-workflow-button.webp b/packages/twenty-website-new/public/images/releases/1.13/1.13.0-stop-workflow-button.webpnew file mode 100644index 00000000000..18fc466d982Binary files /dev/null and b/packages/twenty-website-new/public/images/releases/1.13/1.13.0-stop-workflow-button.webp differdiff --git a/packages/twenty-website-new/public/images/releases/1.14/1.14.0-resize-navbar-and-side-panel.png b/packages/twenty-website-new/public/images/releases/1.14/1.14.0-resize-navbar-and-side-panel.pngdeleted file mode 100644index 4efcf318026..00000000000Binary files a/packages/twenty-website-new/public/images/releases/1.14/1.14.0-resize-navbar-and-side-panel.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/releases/1.14/1.14.0-resize-navbar-and-side-panel.webp b/packages/twenty-website-new/public/images/releases/1.14/1.14.0-resize-navbar-and-side-panel.webpnew file mode 100644index 00000000000..61fae0e11aeBinary files /dev/null and b/packages/twenty-website-new/public/images/releases/1.14/1.14.0-resize-navbar-and-side-panel.webp differdiff --git a/packages/twenty-website-new/public/images/releases/1.15/1.15.0-updated-by.png b/packages/twenty-website-new/public/images/releases/1.15/1.15.0-updated-by.pngdeleted file mode 100644index 2473ba70639..00000000000Binary files a/packages/twenty-website-new/public/images/releases/1.15/1.15.0-updated-by.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/releases/1.15/1.15.0-updated-by.webp b/packages/twenty-website-new/public/images/releases/1.15/1.15.0-updated-by.webpindex 03cbf3f29e9..9233b6e28e1 100644Binary files a/packages/twenty-website-new/public/images/releases/1.15/1.15.0-updated-by.webp and b/packages/twenty-website-new/public/images/releases/1.15/1.15.0-updated-by.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/a16z.png b/packages/twenty-website-new/public/images/shared/companies/logos/a16z.pngdeleted file mode 100644index b0d256d5b24..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/a16z.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/a16z.webp b/packages/twenty-website-new/public/images/shared/companies/logos/a16z.webpnew file mode 100644index 00000000000..43798acb0fcBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/a16z.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/accel.png b/packages/twenty-website-new/public/images/shared/companies/logos/accel.pngdeleted file mode 100644index 19ce7ca692b..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/accel.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/accel.webp b/packages/twenty-website-new/public/images/shared/companies/logos/accel.webpnew file mode 100644index 00000000000..7e610576801Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/accel.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/airbnb.png b/packages/twenty-website-new/public/images/shared/companies/logos/airbnb.pngdeleted file mode 100644index 7582b89816e..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/airbnb.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/airbnb.webp b/packages/twenty-website-new/public/images/shared/companies/logos/airbnb.webpnew file mode 100644index 00000000000..2c9fa7324f5Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/airbnb.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/airtable.png b/packages/twenty-website-new/public/images/shared/companies/logos/airtable.pngdeleted file mode 100644index f11070ad040..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/airtable.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/airtable.webp b/packages/twenty-website-new/public/images/shared/companies/logos/airtable.webpnew file mode 100644index 00000000000..9cfe76536f8Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/airtable.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/anthropic.png b/packages/twenty-website-new/public/images/shared/companies/logos/anthropic.pngdeleted file mode 100644index 119e1b49a17..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/anthropic.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/anthropic.webp b/packages/twenty-website-new/public/images/shared/companies/logos/anthropic.webpnew file mode 100644index 00000000000..9156a407788Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/anthropic.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/apple-1977.png b/packages/twenty-website-new/public/images/shared/companies/logos/apple-1977.pngdeleted file mode 100644index 14b2a0b2a63..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/apple-1977.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/apple-1977.webp b/packages/twenty-website-new/public/images/shared/companies/logos/apple-1977.webpnew file mode 100644index 00000000000..131499f5bcaBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/apple-1977.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/apple.png b/packages/twenty-website-new/public/images/shared/companies/logos/apple.pngdeleted file mode 100644index a5ce06c27cd..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/apple.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/apple.webp b/packages/twenty-website-new/public/images/shared/companies/logos/apple.webpnew file mode 100644index 00000000000..ce4717bcf6aBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/apple.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/calendar.png b/packages/twenty-website-new/public/images/shared/companies/logos/calendar.pngdeleted file mode 100644index b2b39108d6b..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/calendar.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/calendar.webp b/packages/twenty-website-new/public/images/shared/companies/logos/calendar.webpnew file mode 100644index 00000000000..e1f5c91423cBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/calendar.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/claude.png b/packages/twenty-website-new/public/images/shared/companies/logos/claude.pngdeleted file mode 100644index b5913ed37e0..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/claude.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/claude.webp b/packages/twenty-website-new/public/images/shared/companies/logos/claude.webpnew file mode 100644index 00000000000..79640933cbbBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/claude.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/cursor.png b/packages/twenty-website-new/public/images/shared/companies/logos/cursor.pngdeleted file mode 100644index a21a3c35e71..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/cursor.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/cursor.webp b/packages/twenty-website-new/public/images/shared/companies/logos/cursor.webpnew file mode 100644index 00000000000..a531ddf91cfBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/cursor.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/docusign.png b/packages/twenty-website-new/public/images/shared/companies/logos/docusign.pngdeleted file mode 100644index 8c2c3ff6684..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/docusign.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/docusign.webp b/packages/twenty-website-new/public/images/shared/companies/logos/docusign.webpnew file mode 100644index 00000000000..20ce247b9fdBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/docusign.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/figma.png b/packages/twenty-website-new/public/images/shared/companies/logos/figma.pngdeleted file mode 100644index b8123ce8d0a..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/figma.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/figma.webp b/packages/twenty-website-new/public/images/shared/companies/logos/figma.webpnew file mode 100644index 00000000000..ede071c2024Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/figma.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/founders-fund.png b/packages/twenty-website-new/public/images/shared/companies/logos/founders-fund.pngdeleted file mode 100644index 399c73f8cfc..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/founders-fund.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/founders-fund.webp b/packages/twenty-website-new/public/images/shared/companies/logos/founders-fund.webpnew file mode 100644index 00000000000..5affdc758e4Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/founders-fund.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/github.png b/packages/twenty-website-new/public/images/shared/companies/logos/github.pngdeleted file mode 100644index 5688f1d6704..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/github.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/github.webp b/packages/twenty-website-new/public/images/shared/companies/logos/github.webpnew file mode 100644index 00000000000..df3c08d9599Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/github.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/gmail.png b/packages/twenty-website-new/public/images/shared/companies/logos/gmail.pngdeleted file mode 100644index f6620b5ec33..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/gmail.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/gmail.webp b/packages/twenty-website-new/public/images/shared/companies/logos/gmail.webpnew file mode 100644index 00000000000..36ae973903fBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/gmail.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/google.png b/packages/twenty-website-new/public/images/shared/companies/logos/google.pngdeleted file mode 100644index 5652d067059..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/google.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/google.webp b/packages/twenty-website-new/public/images/shared/companies/logos/google.webpnew file mode 100644index 00000000000..22e0ba91adfBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/google.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/hubspot.png b/packages/twenty-website-new/public/images/shared/companies/logos/hubspot.pngdeleted file mode 100644index cc52cc8f514..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/hubspot.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/hubspot.webp b/packages/twenty-website-new/public/images/shared/companies/logos/hubspot.webpnew file mode 100644index 00000000000..795f325e32fBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/hubspot.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/kleiner-perkins.png b/packages/twenty-website-new/public/images/shared/companies/logos/kleiner-perkins.pngdeleted file mode 100644index 02c9c1a8296..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/kleiner-perkins.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/kleiner-perkins.webp b/packages/twenty-website-new/public/images/shared/companies/logos/kleiner-perkins.webpnew file mode 100644index 00000000000..0af40ceb218Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/kleiner-perkins.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/lemlist.png b/packages/twenty-website-new/public/images/shared/companies/logos/lemlist.pngdeleted file mode 100644index 230a0228b96..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/lemlist.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/lemlist.webp b/packages/twenty-website-new/public/images/shared/companies/logos/lemlist.webpnew file mode 100644index 00000000000..01629d282f5Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/lemlist.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/linkedin.png b/packages/twenty-website-new/public/images/shared/companies/logos/linkedin.pngdeleted file mode 100644index 17e4a661a6e..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/linkedin.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/linkedin.webp b/packages/twenty-website-new/public/images/shared/companies/logos/linkedin.webpnew file mode 100644index 00000000000..a9c994ce684Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/linkedin.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/mailchimp.png b/packages/twenty-website-new/public/images/shared/companies/logos/mailchimp.pngdeleted file mode 100644index dac60f27f1a..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/mailchimp.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/mailchimp.webp b/packages/twenty-website-new/public/images/shared/companies/logos/mailchimp.webpnew file mode 100644index 00000000000..7bc14f1c10eBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/mailchimp.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/meet.png b/packages/twenty-website-new/public/images/shared/companies/logos/meet.pngdeleted file mode 100644index 66638552e2b..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/meet.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/meet.webp b/packages/twenty-website-new/public/images/shared/companies/logos/meet.webpnew file mode 100644index 00000000000..eb0f50833c4Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/meet.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/metabase.png b/packages/twenty-website-new/public/images/shared/companies/logos/metabase.pngdeleted file mode 100644index de46b9370c0..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/metabase.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/metabase.webp b/packages/twenty-website-new/public/images/shared/companies/logos/metabase.webpnew file mode 100644index 00000000000..99acc24b5d0Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/metabase.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/microsoft.png b/packages/twenty-website-new/public/images/shared/companies/logos/microsoft.pngdeleted file mode 100644index 265ee5498f0..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/microsoft.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/microsoft.webp b/packages/twenty-website-new/public/images/shared/companies/logos/microsoft.webpnew file mode 100644index 00000000000..23c8ed4e74aBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/microsoft.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/notion.png b/packages/twenty-website-new/public/images/shared/companies/logos/notion.pngdeleted file mode 100644index 4b15aaf8623..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/notion.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/notion.webp b/packages/twenty-website-new/public/images/shared/companies/logos/notion.webpnew file mode 100644index 00000000000..c4118c38a3dBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/notion.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/okta.png b/packages/twenty-website-new/public/images/shared/companies/logos/okta.pngdeleted file mode 100644index 90d08aa4400..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/okta.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/okta.webp b/packages/twenty-website-new/public/images/shared/companies/logos/okta.webpnew file mode 100644index 00000000000..143c34354ccBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/okta.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/openai.png b/packages/twenty-website-new/public/images/shared/companies/logos/openai.pngdeleted file mode 100644index 2605bfef9c7..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/openai.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/openai.webp b/packages/twenty-website-new/public/images/shared/companies/logos/openai.webpnew file mode 100644index 00000000000..fb836b64be1Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/openai.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/outlook.png b/packages/twenty-website-new/public/images/shared/companies/logos/outlook.pngdeleted file mode 100644index 4c2dceff7e6..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/outlook.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/outlook.webp b/packages/twenty-website-new/public/images/shared/companies/logos/outlook.webpnew file mode 100644index 00000000000..fb5315b804dBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/outlook.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/outreach.png b/packages/twenty-website-new/public/images/shared/companies/logos/outreach.pngdeleted file mode 100644index 128b0526fa8..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/outreach.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/outreach.webp b/packages/twenty-website-new/public/images/shared/companies/logos/outreach.webpnew file mode 100644index 00000000000..139c36dcf50Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/outreach.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/postgresql.png b/packages/twenty-website-new/public/images/shared/companies/logos/postgresql.pngdeleted file mode 100644index 4a9c0422bb2..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/postgresql.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/postgresql.webp b/packages/twenty-website-new/public/images/shared/companies/logos/postgresql.webpnew file mode 100644index 00000000000..d73ffe71822Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/postgresql.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/qonto.png b/packages/twenty-website-new/public/images/shared/companies/logos/qonto.pngdeleted file mode 100644index bd8bb18ac31..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/qonto.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/qonto.webp b/packages/twenty-website-new/public/images/shared/companies/logos/qonto.webpnew file mode 100644index 00000000000..adeccdc9e38Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/qonto.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/salesforce.png b/packages/twenty-website-new/public/images/shared/companies/logos/salesforce.pngdeleted file mode 100644index 9695e7b2e6d..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/salesforce.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/salesforce.webp b/packages/twenty-website-new/public/images/shared/companies/logos/salesforce.webpnew file mode 100644index 00000000000..7bd40a416c7Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/salesforce.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/segment.png b/packages/twenty-website-new/public/images/shared/companies/logos/segment.pngdeleted file mode 100644index 54a032342f8..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/segment.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/segment.webp b/packages/twenty-website-new/public/images/shared/companies/logos/segment.webpnew file mode 100644index 00000000000..f551e54b3a9Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/segment.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/sequoia.png b/packages/twenty-website-new/public/images/shared/companies/logos/sequoia.pngdeleted file mode 100644index dd2ff84237e..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/sequoia.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/sequoia.webp b/packages/twenty-website-new/public/images/shared/companies/logos/sequoia.webpnew file mode 100644index 00000000000..bb3f60aca1eBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/sequoia.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/slack.png b/packages/twenty-website-new/public/images/shared/companies/logos/slack.pngdeleted file mode 100644index 23523fc9123..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/slack.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/slack.webp b/packages/twenty-website-new/public/images/shared/companies/logos/slack.webpnew file mode 100644index 00000000000..68c4424b38cBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/slack.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/stripe.png b/packages/twenty-website-new/public/images/shared/companies/logos/stripe.pngdeleted file mode 100644index cc3c0de27a2..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/stripe.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/stripe.webp b/packages/twenty-website-new/public/images/shared/companies/logos/stripe.webpnew file mode 100644index 00000000000..6fe0ec22227Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/stripe.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/tally.png b/packages/twenty-website-new/public/images/shared/companies/logos/tally.pngdeleted file mode 100644index bd9a5ad362e..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/tally.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/tally.webp b/packages/twenty-website-new/public/images/shared/companies/logos/tally.webpnew file mode 100644index 00000000000..ad311546be9Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/tally.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/twenty.png b/packages/twenty-website-new/public/images/shared/companies/logos/twenty.pngdeleted file mode 100644index adfb6af3411..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/twenty.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/twenty.webp b/packages/twenty-website-new/public/images/shared/companies/logos/twenty.webpnew file mode 100644index 00000000000..4873fd10fc6Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/twenty.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/whatsapp.png b/packages/twenty-website-new/public/images/shared/companies/logos/whatsapp.pngdeleted file mode 100644index d24852f3e86..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/whatsapp.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/whatsapp.webp b/packages/twenty-website-new/public/images/shared/companies/logos/whatsapp.webpnew file mode 100644index 00000000000..ea8ae290458Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/whatsapp.webp differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/zapier.png b/packages/twenty-website-new/public/images/shared/companies/logos/zapier.pngdeleted file mode 100644index 6d275c19c81..00000000000Binary files a/packages/twenty-website-new/public/images/shared/companies/logos/zapier.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/companies/logos/zapier.webp b/packages/twenty-website-new/public/images/shared/companies/logos/zapier.webpnew file mode 100644index 00000000000..8ba68a04241Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/companies/logos/zapier.webp differdiff --git a/packages/twenty-website-new/public/images/shared/engagement-band/halftone-on-gray.png b/packages/twenty-website-new/public/images/shared/engagement-band/halftone-on-gray.pngdeleted file mode 100644index 8d25e59b0f6..00000000000Binary files a/packages/twenty-website-new/public/images/shared/engagement-band/halftone-on-gray.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/engagement-band/halftone-on-gray.webp b/packages/twenty-website-new/public/images/shared/engagement-band/halftone-on-gray.webpnew file mode 100644index 00000000000..97549d13a74Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/engagement-band/halftone-on-gray.webp differdiff --git a/packages/twenty-website-new/public/images/shared/engagement-band/halftone-on-white.png b/packages/twenty-website-new/public/images/shared/engagement-band/halftone-on-white.pngdeleted file mode 100644index 20336ce3019..00000000000Binary files a/packages/twenty-website-new/public/images/shared/engagement-band/halftone-on-white.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/engagement-band/halftone-on-white.webp b/packages/twenty-website-new/public/images/shared/engagement-band/halftone-on-white.webpnew file mode 100644index 00000000000..1cba624d75cBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/engagement-band/halftone-on-white.webp differdiff --git a/packages/twenty-website-new/public/images/shared/menu/developers-preview.png b/packages/twenty-website-new/public/images/shared/menu/developers-preview.pngdeleted file mode 100644index 2017cef4da1..00000000000Binary files a/packages/twenty-website-new/public/images/shared/menu/developers-preview.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/menu/developers-preview.webp b/packages/twenty-website-new/public/images/shared/menu/developers-preview.webpnew file mode 100644index 00000000000..b521308da65Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/menu/developers-preview.webp differdiff --git a/packages/twenty-website-new/public/images/shared/menu/partners-preview.png b/packages/twenty-website-new/public/images/shared/menu/partners-preview.pngdeleted file mode 100644index e75a4a9272c..00000000000Binary files a/packages/twenty-website-new/public/images/shared/menu/partners-preview.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/menu/partners-preview.webp b/packages/twenty-website-new/public/images/shared/menu/partners-preview.webpnew file mode 100644index 00000000000..2bbda4d514dBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/menu/partners-preview.webp differdiff --git a/packages/twenty-website-new/public/images/shared/menu/user-guide-preview.png b/packages/twenty-website-new/public/images/shared/menu/user-guide-preview.pngdeleted file mode 100644index 4f67fff2386..00000000000Binary files a/packages/twenty-website-new/public/images/shared/menu/user-guide-preview.png and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/menu/user-guide-preview.webp b/packages/twenty-website-new/public/images/shared/menu/user-guide-preview.webpnew file mode 100644index 00000000000..98e171701ceBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/menu/user-guide-preview.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/alexandre-prot.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/alexandre-prot.jpgdeleted file mode 100644index caa923e8481..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/alexandre-prot.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/alexandre-prot.webp b/packages/twenty-website-new/public/images/shared/people/avatars/alexandre-prot.webpnew file mode 100644index 00000000000..d10a796443dBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/alexandre-prot.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-anna.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-anna.jpgdeleted file mode 100644index 3d400a52580..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-anna.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-anna.webp b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-anna.webpnew file mode 100644index 00000000000..1e1cca7703eBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-anna.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-fabrice.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-fabrice.jpgdeleted file mode 100644index adc7577e7de..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-fabrice.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-fabrice.webp b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-fabrice.webpnew file mode 100644index 00000000000..0078252829eBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-fabrice.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-felix.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-felix.jpgdeleted file mode 100644index db8e7c5d161..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-felix.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-felix.webp b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-felix.webpnew file mode 100644index 00000000000..e8ce7605af4Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-felix.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-indira.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-indira.jpgdeleted file mode 100644index 7f529e3e000..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-indira.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-indira.webp b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-indira.webpnew file mode 100644index 00000000000..c351b70f864Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-indira.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-laura.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-laura.jpgdeleted file mode 100644index d09062d97f8..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-laura.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-laura.webp b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-laura.webpnew file mode 100644index 00000000000..edc9b1e2215Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-laura.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-mike.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-mike.jpgdeleted file mode 100644index c4c1a74d508..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-mike.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-mike.webp b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-mike.webpnew file mode 100644index 00000000000..0c38085fc0eBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-mike.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-thomas.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-thomas.jpgdeleted file mode 100644index f85d3c2d788..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-thomas.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-thomas.webp b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-thomas.webpnew file mode 100644index 00000000000..79fc11a8d8dBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/anonymous-thomas.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/ben-chestnut.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/ben-chestnut.jpgdeleted file mode 100644index 32cd940f2ba..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/ben-chestnut.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/ben-chestnut.webp b/packages/twenty-website-new/public/images/shared/people/avatars/ben-chestnut.webpnew file mode 100644index 00000000000..68985a00ab3Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/ben-chestnut.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/brian-chesky.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/brian-chesky.jpgdeleted file mode 100644index ab9376c4c7e..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/brian-chesky.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/brian-chesky.webp b/packages/twenty-website-new/public/images/shared/people/avatars/brian-chesky.webpnew file mode 100644index 00000000000..db95480be0cBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/brian-chesky.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/chris-wanstrath.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/chris-wanstrath.jpgdeleted file mode 100644index 6b883a75df9..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/chris-wanstrath.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/chris-wanstrath.webp b/packages/twenty-website-new/public/images/shared/people/avatars/chris-wanstrath.webpnew file mode 100644index 00000000000..54b2de4f4f9Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/chris-wanstrath.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/craig-federighi.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/craig-federighi.jpgdeleted file mode 100644index 21ee309060c..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/craig-federighi.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/craig-federighi.webp b/packages/twenty-website-new/public/images/shared/people/avatars/craig-federighi.webpnew file mode 100644index 00000000000..0f035189953Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/craig-federighi.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/dario-amodei.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/dario-amodei.jpgdeleted file mode 100644index 4ffd0685b1a..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/dario-amodei.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/dario-amodei.webp b/packages/twenty-website-new/public/images/shared/people/avatars/dario-amodei.webpnew file mode 100644index 00000000000..fb708daf8bdBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/dario-amodei.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/dylan-field.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/dylan-field.jpgdeleted file mode 100644index 70aa4c32bc5..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/dylan-field.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/dylan-field.webp b/packages/twenty-website-new/public/images/shared/people/avatars/dylan-field.webpnew file mode 100644index 00000000000..dd6af856177Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/dylan-field.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/eddy-cue.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/eddy-cue.jpgdeleted file mode 100644index b4d1889b663..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/eddy-cue.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/eddy-cue.webp b/packages/twenty-website-new/public/images/shared/people/avatars/eddy-cue.webpnew file mode 100644index 00000000000..486ce5a535aBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/eddy-cue.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/ivan-zhao.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/ivan-zhao.jpgdeleted file mode 100644index cbd66249683..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/ivan-zhao.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/ivan-zhao.webp b/packages/twenty-website-new/public/images/shared/people/avatars/ivan-zhao.webpnew file mode 100644index 00000000000..a27d6ad93e9Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/ivan-zhao.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/jeff-williams.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/jeff-williams.jpgdeleted file mode 100644index 54b0dcd256f..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/jeff-williams.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/jeff-williams.webp b/packages/twenty-website-new/public/images/shared/people/avatars/jeff-williams.webpnew file mode 100644index 00000000000..cf14da400baBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/jeff-williams.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/joe-gebbia.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/joe-gebbia.jpgdeleted file mode 100644index b2ef366a296..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/joe-gebbia.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/joe-gebbia.webp b/packages/twenty-website-new/public/images/shared/people/avatars/joe-gebbia.webpnew file mode 100644index 00000000000..f1de37b2bc1Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/joe-gebbia.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/katherine-adams.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/katherine-adams.jpgdeleted file mode 100644index d7d600077aa..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/katherine-adams.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/katherine-adams.webp b/packages/twenty-website-new/public/images/shared/people/avatars/katherine-adams.webpnew file mode 100644index 00000000000..e18ac3037e0Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/katherine-adams.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/patrick-collison.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/patrick-collison.jpgdeleted file mode 100644index c556423d888..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/patrick-collison.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/patrick-collison.webp b/packages/twenty-website-new/public/images/shared/people/avatars/patrick-collison.webpnew file mode 100644index 00000000000..1ad15e6b8b6Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/patrick-collison.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/peter-reinhardt.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/peter-reinhardt.jpgdeleted file mode 100644index 7fac2cc8c77..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/peter-reinhardt.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/peter-reinhardt.webp b/packages/twenty-website-new/public/images/shared/people/avatars/peter-reinhardt.webpnew file mode 100644index 00000000000..5a2d4fa1924Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/peter-reinhardt.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/peter-thiel.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/peter-thiel.jpgdeleted file mode 100644index 09fd903b048..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/peter-thiel.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/peter-thiel.webp b/packages/twenty-website-new/public/images/shared/people/avatars/peter-thiel.webpnew file mode 100644index 00000000000..cddd929e0f7Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/peter-thiel.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/phil-schiller.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/phil-schiller.jpgdeleted file mode 100644index c2a62ec721c..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/phil-schiller.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/phil-schiller.webp b/packages/twenty-website-new/public/images/shared/people/avatars/phil-schiller.webpnew file mode 100644index 00000000000..922a53bbca0Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/phil-schiller.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/ping-li.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/ping-li.jpgdeleted file mode 100644index a95052b557b..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/ping-li.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/ping-li.webp b/packages/twenty-website-new/public/images/shared/people/avatars/ping-li.webpnew file mode 100644index 00000000000..9eeb3d9592cBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/ping-li.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/ray-damm.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/ray-damm.jpgdeleted file mode 100644index 023544cc6c1..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/ray-damm.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/ray-damm.webp b/packages/twenty-website-new/public/images/shared/people/avatars/ray-damm.webpnew file mode 100644index 00000000000..dc65b2e1cd6Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/ray-damm.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/reid-hoffman.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/reid-hoffman.jpgdeleted file mode 100644index c8212d35a1c..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/reid-hoffman.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/reid-hoffman.webp b/packages/twenty-website-new/public/images/shared/people/avatars/reid-hoffman.webpnew file mode 100644index 00000000000..8ce8b887bfaBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/reid-hoffman.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/roelof-botha.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/roelof-botha.jpgdeleted file mode 100644index b91bae044cb..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/roelof-botha.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/roelof-botha.webp b/packages/twenty-website-new/public/images/shared/people/avatars/roelof-botha.webpnew file mode 100644index 00000000000..18c392f0089Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/roelof-botha.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/ryan-roslansky.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/ryan-roslansky.jpgdeleted file mode 100644index e1d2fd3b1c3..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/ryan-roslansky.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/ryan-roslansky.webp b/packages/twenty-website-new/public/images/shared/people/avatars/ryan-roslansky.webpnew file mode 100644index 00000000000..449311bae29Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/ryan-roslansky.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/steve-anavi.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/steve-anavi.jpgdeleted file mode 100644index a32e23198c2..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/steve-anavi.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/steve-anavi.webp b/packages/twenty-website-new/public/images/shared/people/avatars/steve-anavi.webpnew file mode 100644index 00000000000..9e7e962b9d9Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/steve-anavi.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/stewart-butterfield.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/stewart-butterfield.jpgdeleted file mode 100644index b0e48f51264..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/stewart-butterfield.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/stewart-butterfield.webp b/packages/twenty-website-new/public/images/shared/people/avatars/stewart-butterfield.webpnew file mode 100644index 00000000000..f35c93b8491Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/stewart-butterfield.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/sundar-pichai.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/sundar-pichai.jpgdeleted file mode 100644index 3ee9b568ae5..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/sundar-pichai.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/sundar-pichai.webp b/packages/twenty-website-new/public/images/shared/people/avatars/sundar-pichai.webpnew file mode 100644index 00000000000..4d852dc83bfBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/sundar-pichai.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/thomas-dohmke.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/thomas-dohmke.jpgdeleted file mode 100644index 7ad6ecb24dd..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/thomas-dohmke.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/thomas-dohmke.webp b/packages/twenty-website-new/public/images/shared/people/avatars/thomas-dohmke.webpnew file mode 100644index 00000000000..60b0b5b363fBinary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/thomas-dohmke.webp differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/tim-cook.jpg b/packages/twenty-website-new/public/images/shared/people/avatars/tim-cook.jpgdeleted file mode 100644index 310686555fc..00000000000Binary files a/packages/twenty-website-new/public/images/shared/people/avatars/tim-cook.jpg and /dev/null differdiff --git a/packages/twenty-website-new/public/images/shared/people/avatars/tim-cook.webp b/packages/twenty-website-new/public/images/shared/people/avatars/tim-cook.webpnew file mode 100644index 00000000000..8a79b9f3f51Binary files /dev/null and b/packages/twenty-website-new/public/images/shared/people/avatars/tim-cook.webp differdiff --git a/packages/twenty-website-new/scripts/check-lottie-frames.mjs b/packages/twenty-website-new/scripts/check-lottie-frames.mjsindex 02e56de4adc..1ef4821b636 100644--- a/packages/twenty-website-new/scripts/check-lottie-frames.mjs+++ b/packages/twenty-website-new/scripts/check-lottie-frames.mjs@@ -23,12 +23,13 @@ const FRAME_MAP_PATH = path.join('src','sections','HomeStepper',- 'utils',- 'home-stepper-lottie-frame-map.ts',+ 'components',+ 'Visual',+ 'use-dot-lottie-scroll-sync.ts',);const EXPECTED_CONSTANT_REGEX =- /export\s+const\s+HOME_STEPPER_LOTTIE_EXPECTED_TOTAL_FRAMES\s*=\s*(\d+)\s*;/;+ /(?:export\s+)?const\s+HOME_STEPPER_LOTTIE_EXPECTED_TOTAL_FRAMES\s*=\s*(\d+)\s*;/;function fail(message) {// eslint-disable-next-line no-consolediff --git a/packages/twenty-website-new/scripts/check-section-shape.mjs b/packages/twenty-website-new/scripts/check-section-shape.mjsindex ab49bf41a15..8f8106f70fd 100644--- a/packages/twenty-website-new/scripts/check-section-shape.mjs+++ b/packages/twenty-website-new/scripts/check-section-shape.mjs@@ -7,15 +7,15 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));const ROOT = path.resolve(__dirname, '..');const SECTIONS_DIR = path.join(ROOT, 'src', 'sections');-const SECTIONS_USING_NAMED_SLOTS = new Map([- ['Marquee', new Set(['Heading'])],- ['TrustedBy', new Set(['Separator', 'Logos', 'ClientCount'])],-]);+const SECTIONS_USING_NAMED_SLOTS = new Map([]);const LEAF_SECTIONS = new Set(['CaseStudy','CaseStudyCatalog',+ 'ContactCal','LegalDocument',+ 'PartnerApplication',+ 'Stepper',]);async function listSections() {@@ -47,6 +47,8 @@ async function findBarrel(sectionDir) {const candidates = [path.join(sectionDir, 'components', 'index.ts'),path.join(sectionDir, 'components', 'index.tsx'),+ path.join(sectionDir, 'index.ts'),+ path.join(sectionDir, 'index.tsx'),];for (const candidate of candidates) {if (await fileExists(candidate)) return candidate;@@ -55,8 +57,15 @@ async function findBarrel(sectionDir) {}async function findRoot(sectionDir) {- const candidate = path.join(sectionDir, 'components', 'Root.tsx');- if (await fileExists(candidate)) return candidate;+ const sectionName = path.basename(sectionDir);+ const candidates = [+ path.join(sectionDir, 'components', 'Root.tsx'),+ path.join(sectionDir, `${sectionName}.tsx`),+ path.join(sectionDir, `${sectionName}.ts`),+ ];+ for (const candidate of candidates) {+ if (await fileExists(candidate)) return candidate;+ }return null;}diff --git a/packages/twenty-website-new/scripts/convert-png-to-webp.mjs b/packages/twenty-website-new/scripts/convert-png-to-webp.mjsindex 227fbab23d3..520dcd86c8f 100644--- a/packages/twenty-website-new/scripts/convert-png-to-webp.mjs+++ b/packages/twenty-website-new/scripts/convert-png-to-webp.mjs@@ -7,6 +7,8 @@ import sharp from 'sharp';const __dirname = path.dirname(fileURLToPath(import.meta.url));const imagesRoot = path.join(__dirname, '..', 'public', 'images');+const CONVERTIBLE_EXTENSIONS = /\.(png|jpe?g)$/i;+let totalBefore = 0;let totalAfter = 0;let count = 0;@@ -20,11 +22,11 @@ async function walkAndConvert(directoryPath) {continue;}- if (!entry.name.toLowerCase().endsWith('.png')) {+ if (!CONVERTIBLE_EXTENSIONS.test(entry.name)) {continue;}- const outputPath = fullPath.replace(/\.png$/i, '.webp');+ const outputPath = fullPath.replace(CONVERTIBLE_EXTENSIONS, '.webp');const beforeSize = fs.statSync(fullPath).size;await sharp(fullPath).webp({ quality: 92 }).toFile(outputPath);diff --git a/packages/twenty-website-new/src/app/[locale]/(home)/helped.data.ts b/packages/twenty-website-new/src/app/[locale]/(home)/helped.data.tsindex f1e83674edb..12e67db252a 100644--- a/packages/twenty-website-new/src/app/[locale]/(home)/helped.data.ts+++ b/packages/twenty-website-new/src/app/[locale]/(home)/helped.data.ts@@ -1,43 +1,26 @@import { msg } from '@lingui/core/macro';-import type { HelpedDataType } from '@/sections/Helped/types/HelpedData';+import type { HeadingCardType } from '@/sections/Helped';-export const HELPED_DATA: HelpedDataType = {- eyebrow: {- heading: {- text: msg`In production.`,- fontFamily: 'sans',- },+export const HELPED_CARDS: HeadingCardType[] = [+ {+ icon: 'w3villa',+ heading: msg`Ship a product on Twenty`,+ body: msg`W3villa built W3Grads for AI mock interviews at scale, with Twenty as the operational backbone.`,+ illustration: 'target',+ href: '/customers/w3villa',},- cards: [- {- icon: 'w3villa',- heading: { text: msg`Ship a product on Twenty`, fontFamily: 'sans' },- body: {- text: msg`W3villa built W3Grads for AI mock interviews at scale, with Twenty as the operational backbone.`,- },- illustration: 'target',- href: '/customers/w3villa',- },- {- icon: 'act-education',- heading: { text: msg`Own your CRM end to end`, fontFamily: 'sans' },- body: {- text: msg`AC&T replaced a shuttered vendor CRM with self-hosted Twenty and cut CRM costs by more than 90%.`,- },- illustration: 'spaceship',- href: '/customers/act-education',- },- {- icon: 'netzero',- heading: {- text: msg`Grow with a flexible foundation`,- fontFamily: 'sans',- },- body: {- text: msg`NetZero runs a modular Twenty setup across carbon credits, ag products, and industrial systems.`,- },- illustration: 'money',- href: '/customers/netzero',- },- ],-};+ {+ icon: 'act-education',+ heading: msg`Own your CRM end to end`,+ body: msg`AC&T replaced a shuttered vendor CRM with self-hosted Twenty and cut CRM costs by more than 90%.`,+ illustration: 'spaceship',+ href: '/customers/act-education',+ },+ {+ icon: 'netzero',+ heading: msg`Grow with a flexible foundation`,+ body: msg`NetZero runs a modular Twenty setup across carbon credits, ag products, and industrial systems.`,+ illustration: 'money',+ href: '/customers/netzero',+ },+];diff --git a/packages/twenty-website-new/src/app/[locale]/(home)/hero.data.ts b/packages/twenty-website-new/src/app/[locale]/(home)/hero.data.tsindex c1aced91628..1d0397e8ab3 100644--- a/packages/twenty-website-new/src/app/[locale]/(home)/hero.data.ts+++ b/packages/twenty-website-new/src/app/[locale]/(home)/hero.data.ts@@ -1,12 +1,10 @@-import { msg } from '@lingui/core/macro';-import type {HeroDashboardDataType,HeroDashboardPageDefinition,HeroKanbanPageDefinition,HeroTablePageDefinition,HeroVisualType,-} from '@/sections/Hero/types';+} from '@/sections/Hero';import { SHARED_PEOPLE_AVATAR_URLS } from '@/content/site/asset-paths';const PEOPLE_AVATAR_URLS = {@@ -325,10 +323,6 @@ function createTablePage({};}-export const HERO_COPY = {- body: msg`Twenty gives technical teams the building blocks for a custom CRM that meets complex business needs and quickly adapts as the business evolves.`,-};-export const HERO_DATA: { visual: HeroVisualType } = {visual: {workspace: { icon: 'apple', name: 'Apple' },diff --git a/packages/twenty-website-new/src/app/[locale]/(home)/home-stepper.data.ts b/packages/twenty-website-new/src/app/[locale]/(home)/home-stepper.data.tsdeleted file mode 100644index 348535eaddd..00000000000--- a/packages/twenty-website-new/src/app/[locale]/(home)/home-stepper.data.ts+++ /dev/null@@ -1,52 +0,0 @@-import { msg } from '@lingui/core/macro';-import type { HomeStepperDataType } from '@/sections/HomeStepper/types';--export const HOME_STEPPER_DATA: HomeStepperDataType = {- steps: [- {- heading: [- {- text: msg`Begin with production-grade`,- fontFamily: 'serif',- },- {- text: msg`building blocks`,- fontFamily: 'sans',- },- ],- body: {- text: msg`Compose your CRM and internal apps with a single extensibility toolkit. Data model, layout, and automation.`,- },- },- {- heading: [- {- text: msg`Continue iteration`,- fontFamily: 'serif',- },- {- text: msg`without friction`,- fontFamily: 'sans',- },- ],- body: {- text: msg`Enjoy unlimited customization using the AI coding tools you already love. Adapt your CRM to fit the way your business grows and wins.`,- },- },- {- heading: [- {- text: msg`Stay in control with our`,- fontFamily: 'serif',- },- {- text: msg`open-source software`,- fontFamily: 'sans',- },- ],- body: {- text: msg`Don't get locked into someone else's ecosystem. Twenty's developer experience looks like normal software, with local setup, real data, live testing, and no proprietary tooling.`,- },- },- ],-};diff --git a/packages/twenty-website-new/src/app/[locale]/(home)/page.tsx b/packages/twenty-website-new/src/app/[locale]/(home)/page.tsxindex 1d9eab4cbd3..fc381822633 100644--- a/packages/twenty-website-new/src/app/[locale]/(home)/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/(home)/page.tsx@@ -1,15 +1,13 @@import { msg } from '@lingui/core/macro';-import { HELPED_DATA } from '@/app/[locale]/(home)/helped.data';-import { HERO_COPY, HERO_DATA } from '@/app/[locale]/(home)/hero.data';-import { HOME_STEPPER_DATA } from '@/app/[locale]/(home)/home-stepper.data';-import { PROBLEM_DATA } from '@/app/[locale]/(home)/problem.data';-import { TESTIMONIALS_DATA } from '@/app/[locale]/(home)/testimonials.data';-import { THREE_CARDS_FEATURE_DATA } from '@/app/[locale]/(home)/three-cards-feature.data';-import { THREE_CARDS_ILLUSTRATION_DATA } from '@/app/[locale]/(home)/three-cards-illustration.data';-import { TalkToUsButton } from '@/lib/contact-cal';-import { FAQ_DATA } from '@/sections/Faq/data';-import { MENU_DATA } from '@/sections/Menu/data';-import { TRUSTED_BY_DATA } from '@/sections/TrustedBy/data';+import { HELPED_CARDS } from '@/app/[locale]/(home)/helped.data';+import { HERO_DATA } from '@/app/[locale]/(home)/hero.data';+import { Problem, type ProblemPointType } from '@/sections/Problem';+import { HOME_TESTIMONIALS } from '@/app/[locale]/(home)/testimonials.data';+import { FEATURE_CARDS } from '@/app/[locale]/(home)/three-cards-feature.data';+import { ILLUSTRATION_CARDS } from '@/app/[locale]/(home)/three-cards-illustration.data';+import { TalkToUsButton } from '@/sections/ContactCal';+import { Faq, FAQ_QUESTIONS } from '@/sections/Faq';+import { TRUSTED_BY_LOGOS, TrustedBy } from '@/sections/TrustedBy';import {Body,Eyebrow,@@ -18,23 +16,19 @@ import {LinkButton,} from '@/design-system/components';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';-import { createMessageDescriptorRenderer } from '@/lib/i18n/create-message-descriptor-renderer';import {getRouteI18n,type LocaleRouteParams,-} from '@/lib/i18n/get-route-i18n';+} from '@/lib/i18n/utils/get-route-i18n';import { Pages } from '@/lib/pages';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';-import { Faq } from '@/sections/Faq/components';-import { Helped } from '@/sections/Helped/components';-import { Hero } from '@/sections/Hero/components';-import { HomeStepper } from '@/sections/HomeStepper/components';-import { Menu } from '@/sections/Menu/components';-import { Problem } from '@/sections/Problem/components';-import { Testimonials } from '@/sections/Testimonials/components';-import { ThreeCards } from '@/sections/ThreeCards/components';+import { Helped } from '@/sections/Helped';+import { Hero } from '@/sections/Hero';+import { HomeStepper, type HomeStepperStepType } from '@/sections/HomeStepper';+import { Menu, MENU_DATA } from '@/sections/Menu';+import { Testimonials } from '@/sections/Testimonials';+import { ThreeCards } from '@/sections/ThreeCards';import { buildFaqPageJsonLd, buildRouteMetadata, JsonLd } from '@/lib/seo';-import { TrustedBy } from '@/sections/TrustedBy/components';import { theme } from '@/theme';import { css } from '@linaria/core';import { styled } from '@linaria/react';@@ -106,12 +100,72 @@ export default async function HomePage({ params }: HomePageProps) {getRouteI18n(params),fetchCommunityStats(),]);- const renderText = createMessageDescriptorRenderer(i18n);++ const PROBLEM_POINTS: ProblemPointType[] = [+ {+ heading: (+ <HeadingPart fontFamily="sans">+ {i18n._(msg`The Giant Monolith`)}+ </HeadingPart>+ ),+ body: msg`Proprietary languages, slow deployment cycles, and "black box" logic.`,+ },+ {+ heading: (+ <HeadingPart fontFamily="sans">+ {i18n._(msg`The In-house Burden`)}+ </HeadingPart>+ ),+ body: msg`It's fragile. V1 ships quickly, but maintaining and making changes is a long term burden.`,+ },+ ];++ const HOME_STEPPER_STEPS: HomeStepperStepType[] = [+ {+ heading: (+ <Heading size="lg" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`Begin with production-grade`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`building blocks`)}+ </HeadingPart>+ </Heading>+ ),+ body: msg`Compose your CRM and internal apps with a single extensibility toolkit. Data model, layout, and automation.`,+ },+ {+ heading: (+ <Heading size="lg" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`Continue iteration`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`without friction`)}+ </HeadingPart>+ </Heading>+ ),+ body: msg`Enjoy unlimited customization using the AI coding tools you already love. Adapt your CRM to fit the way your business grows and wins.`,+ },+ {+ heading: (+ <Heading size="lg" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`Stay in control with our`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`open-source software`)}+ </HeadingPart>+ </Heading>+ ),+ body: msg`Don't get locked into someone else's ecosystem. Twenty's developer experience looks like normal software, with local setup, real data, live testing, and no proprietary tooling.`,+ },+ ];const menuSocialLinks = mergeSocialLinkLabels(MENU_DATA.socialLinks, stats);return (<>- <JsonLd data={buildFaqPageJsonLd(FAQ_DATA.questions, renderText)} />+ <JsonLd data={buildFaqPageJsonLd(FAQ_QUESTIONS, (d) => i18n._(d))} />{/** Above-the-fold home hero background texture. Preload warms the* HTTP cache so it is ready by the time HomeBackgroundHalftone@@ -119,9 +173,25 @@ export default async function HomePage({ params }: HomePageProps) {*/}<linkas="image"+ fetchPriority="high"href="/illustrations/generated/home-background-bridge.png"rel="preload"/>+ <link+ rel="prefetch"+ href="/illustrations/home/helped/target.glb"+ as="fetch"+ />+ <link+ rel="prefetch"+ href="/illustrations/home/helped/spaceship.glb"+ as="fetch"+ />+ <link+ rel="prefetch"+ href="/illustrations/home/helped/money.glb"+ as="fetch"+ /><Menu.RootbackgroundColor={HOME_TOP_BACKGROUND_COLOR}scheme="primary"@@ -134,29 +204,28 @@ export default async function HomePage({ params }: HomePageProps) {<Menu.Cta scheme="primary" /></Menu.Root>- <Hero.Root backgroundColor={HOME_TOP_BACKGROUND_COLOR} showHomeBackground>+ <Hero.Root scheme="muted" showHomeBackground><HeroIntroGroup data-halftone-exclude><HeroHeadingGroup><Hero.Heading page={Pages.Home}><HeadingPart fontFamily="serif">- {renderText(msg`Build your Enterprise CRM`)}+ {i18n._(msg`Build your Enterprise CRM`)}</HeadingPart>{' '}<HeadingPart fontFamily="sans">- {renderText(msg`at\u00A0AI\u00A0Speed`)}+ {i18n._(msg`at\u00A0AI\u00A0Speed`)}</HeadingPart></Hero.Heading>- <Hero.Body- page={Pages.Home}- body={{ text: HERO_COPY.body }}- renderText={renderText}- size="sm"- />+ <Hero.Body page={Pages.Home} size="sm">+ {i18n._(+ msg`Twenty gives technical teams the building blocks for a custom CRM that meets complex business needs and quickly adapts as the business evolves.`,+ )}+ </Hero.Body></HeroHeadingGroup><Hero.Cta><LinkButtoncolor="secondary"href="https://app.twenty.com/welcome"- label={renderText(msg`Get started`)}+ label={i18n._(msg`Get started`)}variant="contained"/><TalkToUsButton@@ -169,122 +238,103 @@ export default async function HomePage({ params }: HomePageProps) {<Hero.HomeVisual visual={HERO_DATA.visual} /></Hero.Root>- <TrustedBy.Root>- <TrustedBy.Separator- renderText={renderText}- separator={TRUSTED_BY_DATA.separator}- />- <TrustedBy.Logos logos={TRUSTED_BY_DATA.logos} />- <TrustedBy.ClientCount- label={TRUSTED_BY_DATA.clientCountLabel.text}- renderText={renderText}- />- </TrustedBy.Root>+ <TrustedBy.Root+ separator={i18n._(msg`trusted by`)}+ logos={TRUSTED_BY_LOGOS}+ clientCount={i18n._(msg`+10k others`)}+ /><Problem.Root><Problem.Visual /><Problem.Content>- <Eyebrow- colorScheme="primary"- heading={PROBLEM_DATA.eyebrow.heading}- renderText={renderText}- />+ <Eyebrow>+ <HeadingPart fontFamily="sans">+ {i18n._(msg`The Problem.`)}+ </HeadingPart>+ </Eyebrow><Problem.Heading><HeadingPart fontFamily="serif">- {renderText(msg`A custom CRM gives your org an edge,`)}+ {i18n._(msg`A custom CRM gives your org an edge,`)}</HeadingPart>{' '}<HeadingPart fontFamily="sans">- {renderText(msg`but building one`)}+ {i18n._(msg`but building one`)}</HeadingPart>{' '}<HeadingPart fontFamily="serif">- {renderText(msg`comes with`)}+ {i18n._(msg`comes with`)}</HeadingPart>{' '}<HeadingPart fontFamily="sans">- {renderText(msg`tradeoffs`)}+ {i18n._(msg`tradeoffs`)}</HeadingPart></Problem.Heading>- <Problem.Points- points={PROBLEM_DATA.points}- renderText={renderText}- />+ <Problem.Points points={PROBLEM_POINTS} /></Problem.Content></Problem.Root>- <ThreeCards.Root backgroundColor={theme.colors.primary.background[100]}>+ <ThreeCards.Root scheme="light"><ThreeCards.Intro page={Pages.Home} align="left"><ThreeCardsIllustrationIntroContent><ThreeCardsIllustrationIntroHeader>- <Eyebrow- colorScheme="primary"- heading={THREE_CARDS_ILLUSTRATION_DATA.eyebrow.heading}- renderText={renderText}- />+ <Eyebrow>+ <HeadingPart fontFamily="sans">+ {i18n._(msg`Stop settling for trade-offs.`)}+ </HeadingPart>+ </Eyebrow><HeadingclassName={threeCardsIllustrationHeadingClassName}size="lg"weight="light"><HeadingPart fontFamily="serif">- {renderText(msg`Assemble, iterate and adapt a robust CRM,`)}+ {i18n._(msg`Assemble, iterate and adapt a robust CRM,`)}</HeadingPart>{' '}<HeadingPart fontFamily="sans">- {renderText(msg`that's quick to flex`)}+ {i18n._(msg`that's quick to flex`)}</HeadingPart></Heading></ThreeCardsIllustrationIntroHeader>- {THREE_CARDS_ILLUSTRATION_DATA.body && (- <Body- body={THREE_CARDS_ILLUSTRATION_DATA.body}- className={threeCardsIllustrationBodyClassName}- renderText={renderText}- size="sm"- />- )}+ <Body className={threeCardsIllustrationBodyClassName} size="sm">+ {i18n._(+ msg`Compose your CRM and internal apps with a single extensibility toolkit.`,+ )}+ </Body></ThreeCardsIllustrationIntroContent></ThreeCards.Intro>- <ThreeCards.IllustrationCards- illustrationCards={THREE_CARDS_ILLUSTRATION_DATA.illustrationCards}- />+ <ThreeCards.IllustrationCards illustrationCards={ILLUSTRATION_CARDS} /></ThreeCards.Root>- <HomeStepper.ScrollSection steps={HOME_STEPPER_DATA.steps} />+ <HomeStepper.ScrollSection steps={HOME_STEPPER_STEPS} />- <ThreeCards.Root backgroundColor={theme.colors.primary.background[100]}>+ <ThreeCards.Root scheme="light"><ThreeCards.Intro page={Pages.Home} align="center">- <Eyebrow- colorScheme="primary"- heading={THREE_CARDS_FEATURE_DATA.eyebrow.heading}- renderText={renderText}- />+ <Eyebrow>+ <HeadingPart fontFamily="sans">+ {i18n._(msg`Skip the clunky UX that always comes with custom.`)}+ </HeadingPart>+ </Eyebrow><Heading size="lg" weight="light"><HeadingPart fontFamily="serif">- {renderText(msg`Make your GTM team happy`)}+ {i18n._(msg`Make your GTM team happy`)}</HeadingPart><br /><HeadingPart fontFamily="serif">- {renderText(msg`with`)}+ {i18n._(msg`with`)}</HeadingPart>{' '}<HeadingPart fontFamily="sans">- {renderText(msg`a CRM they'll love`)}+ {i18n._(msg`a CRM they'll love`)}</HeadingPart></Heading></ThreeCards.Intro>- <ThreeCards.FeatureCards- featureCards={THREE_CARDS_FEATURE_DATA.featureCards}- />+ <ThreeCards.FeatureCards featureCards={FEATURE_CARDS} /></ThreeCards.Root>- <Helped.Root backgroundColor={theme.colors.secondary.background[5]}>- <Helped.Scene data={HELPED_DATA} />+ <Helped.Root scheme="muted">+ <Helped.Scene cards={HELPED_CARDS} /></Helped.Root>- <Testimonials.Root- backgroundColor={theme.colors.secondary.background[5]}- color={theme.colors.primary.text[100]}- >+ <Testimonials.Root scheme="muted"><Testimonials.Carousel- eyebrow={TESTIMONIALS_DATA.eyebrow}- testimonials={TESTIMONIALS_DATA.testimonials}+ eyebrow={i18n._(msg`They are the real sales`)}+ testimonials={HOME_TESTIMONIALS}><Testimonials.HomeVisual /></Testimonials.Carousel>@@ -292,25 +342,25 @@ export default async function HomePage({ params }: HomePageProps) {<Faq.Root><Faq.Intro>- <Eyebrow- colorScheme="secondary"- heading={FAQ_DATA.eyebrow.heading}- renderText={renderText}- />+ <Eyebrow colorScheme="secondary">+ <HeadingPart fontFamily="sans">+ {i18n._(msg`Any Questions?`)}+ </HeadingPart>+ </Eyebrow><Faq.Heading><HeadingPart fontFamily="serif">- {renderText(msg`Stop fighting custom.`)}+ {i18n._(msg`Stop fighting custom.`)}</HeadingPart><br /><HeadingPart fontFamily="sans">- {renderText(msg`Start building, with Twenty`)}+ {i18n._(msg`Start building, with Twenty`)}</HeadingPart></Faq.Heading><Faq.Cta><LinkButtoncolor="primary"href="https://app.twenty.com/welcome"- label={renderText(msg`Get started`)}+ label={i18n._(msg`Get started`)}variant="contained"/><TalkToUsButton@@ -320,7 +370,7 @@ export default async function HomePage({ params }: HomePageProps) {/></Faq.Cta></Faq.Intro>- <Faq.Items questions={FAQ_DATA.questions} />+ <Faq.Items questions={FAQ_QUESTIONS} /></Faq.Root></>);diff --git a/packages/twenty-website-new/src/app/[locale]/(home)/problem.data.ts b/packages/twenty-website-new/src/app/[locale]/(home)/problem.data.tsdeleted file mode 100644index 483f80bcaa7..00000000000--- a/packages/twenty-website-new/src/app/[locale]/(home)/problem.data.ts+++ /dev/null@@ -1,20 +0,0 @@-import { msg } from '@lingui/core/macro';-import type { ProblemDataType } from '@/sections/Problem/types';--export const PROBLEM_DATA: ProblemDataType = {- eyebrow: { heading: { text: msg`The Problem.`, fontFamily: 'sans' } },- points: [- {- heading: { text: msg`The Giant Monolith`, fontFamily: 'sans' },- body: {- text: msg`Proprietary languages, slow deployment cycles, and "black box" logic.`,- },- },- {- heading: { text: msg`The In-house Burden`, fontFamily: 'sans' },- body: {- text: msg`It's fragile. V1 ships quickly, but maintaining and making changes is a long term burden.`,- },- },- ],-};diff --git a/packages/twenty-website-new/src/app/[locale]/(home)/testimonials.data.ts b/packages/twenty-website-new/src/app/[locale]/(home)/testimonials.data.tsindex ee091bb1949..f3f33cd2cfb 100644--- a/packages/twenty-website-new/src/app/[locale]/(home)/testimonials.data.ts+++ b/packages/twenty-website-new/src/app/[locale]/(home)/testimonials.data.ts@@ -1,42 +1,26 @@import { msg } from '@lingui/core/macro';-import type { TestimonialsDataType } from '@/sections/Testimonials/types';+import type { TestimonialCardType } from '@/sections/Testimonials';-export const TESTIMONIALS_DATA: TestimonialsDataType = {- eyebrow: {- heading: { text: msg`They are the real sales`, fontFamily: 'sans' },- },- testimonials: [- {- heading: {- text: msg`The flexibility is really what made the difference. Our needs evolve very fast. I discover a new need and in two clicks I can address it. That is a real advantage when you are moving quickly.`,- fontFamily: 'sans',- },- author: {- name: { text: msg`Olivier Reinaud` },- designation: { text: msg`Co-founder at NetZero` },- },+export const HOME_TESTIMONIALS: TestimonialCardType[] = [+ {+ heading: msg`The flexibility is really what made the difference. Our needs evolve very fast. I discover a new need and in two clicks I can address it. That is a real advantage when you are moving quickly.`,+ author: {+ name: msg`Olivier Reinaud`,+ designation: msg`Co-founder at NetZero`,},- {- heading: {- text: msg`We didn't want to patch over the problem. We wanted to build something institutions could rely on at scale, and that meant starting from a foundation solid enough to support the full complexity of what we had in mind.`,- fontFamily: 'sans',- },- author: {- name: { text: msg`Amrendra Pratap Singh` },- designation: { text: msg`VP of Engineering at W3villa Technologies` },- },+ },+ {+ heading: msg`We didn't want to patch over the problem. We wanted to build something institutions could rely on at scale, and that meant starting from a foundation solid enough to support the full complexity of what we had in mind.`,+ author: {+ name: msg`Amrendra Pratap Singh`,+ designation: msg`VP of Engineering at W3villa Technologies`,},- {- heading: {- text: msg`It is just such a nicer experience than dealing with a Salesforce or a HubSpot. My mission has been to get every tool API-accessible, so everything talks to each other. Twenty made that possible in a way older CRM platforms simply do not.`,- fontFamily: 'sans',- },- author: {- name: { text: msg`Justin Beadle` },- designation: {- text: msg`Director of Digital and Information, Elevate Consulting`,- },- },+ },+ {+ heading: msg`It is just such a nicer experience than dealing with a Salesforce or a HubSpot. My mission has been to get every tool API-accessible, so everything talks to each other. Twenty made that possible in a way older CRM platforms simply do not.`,+ author: {+ name: msg`Justin Beadle`,+ designation: msg`Director of Digital and Information, Elevate Consulting`,},- ],-};+ },+];diff --git a/packages/twenty-website-new/src/app/[locale]/(home)/three-cards-feature.data.ts b/packages/twenty-website-new/src/app/[locale]/(home)/three-cards-feature.data.tsindex 50b2af9e447..a1285562fd1 100644--- a/packages/twenty-website-new/src/app/[locale]/(home)/three-cards-feature.data.ts+++ b/packages/twenty-website-new/src/app/[locale]/(home)/three-cards-feature.data.ts@@ -1,43 +1,29 @@import { msg } from '@lingui/core/macro';-import type { ThreeCardsFeatureCardsDataType } from '@/sections/ThreeCards/types';+import type { ThreeCardsFeatureCardType } from '@/sections/ThreeCards';-export const THREE_CARDS_FEATURE_DATA: ThreeCardsFeatureCardsDataType = {- eyebrow: {- heading: {- text: msg`Skip the clunky UX that always comes with custom.`,- fontFamily: 'sans',- },+export const FEATURE_CARDS: ThreeCardsFeatureCardType[] = [+ {+ heading: msg`Familiar, modern interface`,+ body: msg`Twenty makes it simple. It's clean, intuitive, and built to feel like Notion.`,+ backgroundImageSrc:+ '/images/home/three-cards-feature/familiar-interface-gradient.webp',+ icon: 'users-group',+ illustration: 'familiar-interface',},- featureCards: [- {- heading: { text: msg`Familiar, modern interface`, fontFamily: 'sans' },- body: {- text: msg`Twenty makes it simple. It's clean, intuitive, and built to feel like Notion.`,- },- backgroundImageSrc:- '/images/home/three-cards-feature/familiar-interface-gradient.webp',- icon: 'users-group',- illustration: 'familiar-interface',- },- {- heading: { text: msg`Live data and AI built`, fontFamily: 'sans' },- body: {- text: msg`Everything updates in real time, with AI chat always ready to help you move faster.`,- },- backgroundImageSrc:- '/images/home/three-cards-feature/live-data-gradient.webp',- icon: 'live-data',- illustration: 'live-data',- },- {- heading: { text: msg`Fast path to action`, fontFamily: 'sans' },- body: {- text: msg`Smart patterns, shortcuts, and layouts make everyday tasks faster and easier to execute.`,- },- backgroundImageSrc:- '/images/home/three-cards-feature/fast-path-gradient.webp',- icon: 'fast-path',- illustration: 'fast-path',- },- ],-};+ {+ heading: msg`Live data and AI built`,+ body: msg`Everything updates in real time, with AI chat always ready to help you move faster.`,+ backgroundImageSrc:+ '/images/home/three-cards-feature/live-data-gradient.webp',+ icon: 'live-data',+ illustration: 'live-data',+ },+ {+ heading: msg`Fast path to action`,+ body: msg`Smart patterns, shortcuts, and layouts make everyday tasks faster and easier to execute.`,+ backgroundImageSrc:+ '/images/home/three-cards-feature/fast-path-gradient.webp',+ icon: 'fast-path',+ illustration: 'fast-path',+ },+];diff --git a/packages/twenty-website-new/src/app/[locale]/(home)/three-cards-illustration.data.ts b/packages/twenty-website-new/src/app/[locale]/(home)/three-cards-illustration.data.tsindex aeba6f3314a..0bed80b871e 100644--- a/packages/twenty-website-new/src/app/[locale]/(home)/three-cards-illustration.data.ts+++ b/packages/twenty-website-new/src/app/[locale]/(home)/three-cards-illustration.data.ts@@ -1,52 +1,38 @@import { msg } from '@lingui/core/macro';-import type { ThreeCardsIllustrationDataType } from '@/sections/ThreeCards/types';+import type { ThreeCardsIllustrationCardType } from '@/sections/ThreeCards';-export const THREE_CARDS_ILLUSTRATION_DATA: ThreeCardsIllustrationDataType = {- eyebrow: {- heading: { text: msg`Stop settling for trade-offs.`, fontFamily: 'sans' },- },- body: {- text: msg`Compose your CRM and internal apps with a single extensibility toolkit.`,- },- illustrationCards: [- {- heading: { text: msg`Production grade quality`, fontFamily: 'sans' },- body: {- text: msg`W3villa used Twenty as a production-grade framework for the data model, permissions, authentication, and workflow engine they would otherwise have rebuilt themselves.`,- },- benefits: undefined,- attribution: {- role: { text: msg`VP of Engineering` },- company: { text: msg`W3villa Technologies` },- },- illustration: 'diamond',- caseStudySlug: 'w3villa',+export const ILLUSTRATION_CARDS: ThreeCardsIllustrationCardType[] = [+ {+ heading: msg`Production grade quality`,+ body: msg`W3villa used Twenty as a production-grade framework for the data model, permissions, authentication, and workflow engine they would otherwise have rebuilt themselves.`,+ benefits: undefined,+ attribution: {+ role: msg`VP of Engineering`,+ company: msg`W3villa Technologies`,},- {- heading: { text: msg`AI for rapid iterations`, fontFamily: 'sans' },- body: {- text: msg`Alternative Partners used agentic AI to compress what would typically be weeks of Salesforce migration work into something a single person could oversee.`,- },- benefits: undefined,- attribution: {- role: { text: msg`Principal and Founder` },- company: { text: msg`Alternative Partners` },- },- illustration: 'flash',- caseStudySlug: 'alternative-partners',+ illustration: 'diamond',+ caseStudySlug: 'w3villa',+ },+ {+ heading: msg`AI for rapid iterations`,+ body: msg`Alternative Partners used agentic AI to compress what would typically be weeks of Salesforce migration work into something a single person could oversee.`,+ benefits: undefined,+ attribution: {+ role: msg`Principal and Founder`,+ company: msg`Alternative Partners`,},- {- heading: { text: msg`Control without drag`, fontFamily: 'sans' },- body: {- text: msg`AC&T moved to a self-hosted Twenty instance with no vendor risk, no forced migration, and CRM costs reduced by more than 90%.`,- },- benefits: undefined,- attribution: {- role: { text: msg`CRM Engineer` },- company: { text: msg`AC&T Education Migration` },- },- illustration: 'lock',- caseStudySlug: 'act-education',+ illustration: 'flash',+ caseStudySlug: 'alternative-partners',+ },+ {+ heading: msg`Control without drag`,+ body: msg`AC&T moved to a self-hosted Twenty instance with no vendor risk, no forced migration, and CRM costs reduced by more than 90%.`,+ benefits: undefined,+ attribution: {+ role: msg`CRM Engineer`,+ company: msg`AC&T Education Migration`,},- ],-};+ illustration: 'lock',+ caseStudySlug: 'act-education',+ },+];diff --git a/packages/twenty-website-new/src/app/[locale]/articles/[slug]/page.tsx b/packages/twenty-website-new/src/app/[locale]/articles/[slug]/page.tsxindex da2de3b5340..86dbd305393 100644--- a/packages/twenty-website-new/src/app/[locale]/articles/[slug]/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/articles/[slug]/page.tsx@@ -4,14 +4,13 @@ import { SOURCE_LOCALE } from 'twenty-shared/translations';import { getPublishedArticle, getPublishedArticles } from '@/lib/articles';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';-import { type LocaleRouteParams } from '@/lib/i18n/get-route-i18n';-import { localeToUrlSegment } from '@/lib/i18n/website-locale-segments';+import { type LocaleRouteParams } from '@/lib/i18n/utils/get-route-i18n';+import { localeToUrlSegment } from '@/lib/i18n/utils/website-locale-segments';import { resolveLocaleParam } from '@/lib/i18n';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';import { buildArticleJsonLd, buildPageMetadata, JsonLd } from '@/lib/seo';-import { Articles } from '@/sections/Articles/components';-import { Menu } from '@/sections/Menu/components';-import { MENU_DATA } from '@/sections/Menu/data';+import { Articles } from '@/sections/Articles';+import { Menu, MENU_DATA } from '@/sections/Menu';import { theme } from '@/theme';type ArticleSlugParams = LocaleRouteParams & { slug: string };diff --git a/packages/twenty-website-new/src/app/[locale]/articles/page.tsx b/packages/twenty-website-new/src/app/[locale]/articles/page.tsxindex 3064a3de78e..486d8d29b44 100644--- a/packages/twenty-website-new/src/app/[locale]/articles/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/articles/page.tsx@@ -1,32 +1,31 @@+import { msg } from '@lingui/core/macro';import { notFound } from 'next/navigation';import { SOURCE_LOCALE } from 'twenty-shared/translations';import { HeadingPart } from '@/design-system/components';import { getPublishedArticles } from '@/lib/articles';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';-import { createMessageDescriptorRenderer } from '@/lib/i18n/create-message-descriptor-renderer';+import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';+import { resolveLocaleParam } from '@/lib/i18n';import {getRouteI18n,type LocaleRouteParams,-} from '@/lib/i18n/get-route-i18n';-import { resolveLocaleParam } from '@/lib/i18n';-import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';+} from '@/lib/i18n/utils/get-route-i18n';import { Pages } from '@/lib/pages';-import { buildArticleListJsonLd, buildRouteMetadata, JsonLd } from '@/lib/seo';-import { Articles } from '@/sections/Articles/components';-import { Hero } from '@/sections/Hero/components';-import { Menu } from '@/sections/Menu/components';-import { MENU_DATA } from '@/sections/Menu/data';-import { TrustedBy } from '@/sections/TrustedBy/components';-import { TRUSTED_BY_DATA } from '@/sections/TrustedBy/data';+import {+ buildArticleListJsonLd,+ buildBreadcrumbListJsonLd,+ buildRouteMetadata,+ JsonLd,+} from '@/lib/seo';+import { Articles } from '@/sections/Articles';+import { Hero } from '@/sections/Hero';+import { Menu, MENU_DATA } from '@/sections/Menu';+import { TRUSTED_BY_LOGOS, TrustedBy } from '@/sections/TrustedBy';import { css } from '@linaria/core';export const generateMetadata = buildRouteMetadata('articles');-const ARTICLES_HERO_BODY = {- text: 'Ideas from the team building Twenty on open source CRM, GTM systems, and building software that lasts.',-};-const ARTICLES_TOP_BACKGROUND_COLOR = '#F4F4F4';const pageRevealClassName = css`@@ -71,12 +70,20 @@ export default async function ArticlesPage({ params }: ArticlesPageProps) {getRouteI18n(params),fetchCommunityStats(),]);- const renderText = createMessageDescriptorRenderer(i18n);const menuSocialLinks = mergeSocialLinkLabels(MENU_DATA.socialLinks, stats);const posts = getPublishedArticles();return (<>+ <JsonLd+ data={buildBreadcrumbListJsonLd(+ [+ { name: 'Home', path: '/' },+ { name: 'Articles', path: '/articles' },+ ],+ locale,+ )}+ />{posts.length > 0 ? (<JsonLd data={buildArticleListJsonLd(posts)} />) : null}@@ -93,29 +100,25 @@ export default async function ArticlesPage({ params }: ArticlesPageProps) {</Menu.Root><div className={pageRevealClassName}>- <Hero.Root backgroundColor={ARTICLES_TOP_BACKGROUND_COLOR}>+ <Hero.Root scheme="muted"><Hero.Heading page={Pages.Articles}><HeadingPart fontFamily="serif">Ideas on</HeadingPart><br /><HeadingPart fontFamily="serif">open-source</HeadingPart>{' '}<HeadingPart fontFamily="sans">CRM</HeadingPart></Hero.Heading>- <Hero.Body body={ARTICLES_HERO_BODY} page={Pages.Articles} />+ <Hero.Body page={Pages.Articles}>+ Ideas from the team building Twenty on open source CRM, GTM systems,+ and building software that lasts.+ </Hero.Body></Hero.Root><TrustedBy.RootcardBackgroundColor={ARTICLES_TOP_BACKGROUND_COLOR}compactBottom- >- <TrustedBy.Separator- renderText={renderText}- separator={TRUSTED_BY_DATA.separator}- />- <TrustedBy.Logos logos={TRUSTED_BY_DATA.logos} />- <TrustedBy.ClientCount- label={TRUSTED_BY_DATA.clientCountLabel.text}- renderText={renderText}- />- </TrustedBy.Root>+ separator={i18n._(msg`trusted by`)}+ logos={TRUSTED_BY_LOGOS}+ clientCount={i18n._(msg`+10k others`)}+ /></div><Articles.Index posts={posts} />diff --git a/packages/twenty-website-new/src/app/[locale]/customers/9dots/page.tsx b/packages/twenty-website-new/src/app/[locale]/customers/9dots/page.tsxindex c2ca86b168d..35c916ccfa9 100644--- a/packages/twenty-website-new/src/app/[locale]/customers/9dots/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/customers/9dots/page.tsx@@ -1,119 +1,23 @@import { msg } from '@lingui/core/macro';-import { MENU_DATA } from '@/sections/Menu/data';-import { CustomersCaseStudySignoff } from '@/app/[locale]/customers/_components/CustomersCaseStudySignoff';-import { getCaseStudyPalette, type CaseStudyData } from '@/lib/customers';-import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';-import { createMessageDescriptorRenderer } from '@/lib/i18n/create-message-descriptor-renderer';+import { type CaseStudyData } from '@/lib/customers';import {getRouteI18n,type LocaleRouteParams,-} from '@/lib/i18n/get-route-i18n';-import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';-import { CaseStudy } from '@/sections/CaseStudy/components';-import { Menu } from '@/sections/Menu/components';-import { theme } from '@/theme';+} from '@/lib/i18n/utils/get-route-i18n';import { buildLocalizedMetadata } from '@/lib/seo';+import { Heading, HeadingPart } from '@/design-system/components';+import { CaseStudyPageLayout } from '@/app/[locale]/customers/_components/CaseStudyPageLayout';const PLACEHOLDER_HERO ='https://images.unsplash.com/photo-1733244766159-f58f4184fd38?w=1600&q=80';-const CASE_STUDY: CaseStudyData = {- meta: {- title: msg`Homeseller, WhatsApp, and a CRM built around the business | Nine Dots & Twenty`,- description: msg`How Nine Dots Ventures rebuilt a Singapore real estate agency on Twenty with APIs, n8n, Grafana, and AI on top of 2,000+ WhatsApp messages a day.`,- },- hero: {- readingTime: '9 min',- title: [- {- text: msg`A real estate agency on WhatsApp`,- fontFamily: 'serif',- },- { text: msg`built a`, fontFamily: 'serif' },- { text: msg`CRM`, fontFamily: 'sans', newLine: true },- { text: msg`around it`, fontFamily: 'serif' },- ],- author: 'Mike Babiy & Azmat Parveen',- authorAvatarSrc: '/images/partner/testimonials/mike-babiy.png',- authorRole: msg`Founder, Nine Dots Ventures`,- clientIcon: 'nine-dots',- heroImageSrc: PLACEHOLDER_HERO,- industry: msg`Real Estate`,- kpis: [- { value: msg`150 hrs`, label: msg`Saved / month` },- { value: msg`2,000+`, label: msg`Daily messages` },- { value: msg`Q1 2026`, label: msg`Record quarter` },- ],- quote: {- text: msg`Twenty lets us build a CRM around the business and not the business around the CRM.`,- author: 'Mike Babiy',- role: msg`Founder, Nine Dots Ventures`,- },- },- sections: [- {- type: 'text',- eyebrow: msg`Homeseller`,- heading: [- {- text: msg`When the channel is`,- fontFamily: 'serif',- },- { text: msg`the business`, fontFamily: 'sans' },- ],- paragraphs: [- msg`Homeseller is a high-volume real estate agency in Singapore, founded by one of the country's top-performing property agents. The whole operation runs on WhatsApp: no email, no calendars, just group chats, thousands of them, with clients, agents, and leads together.`,- msg`That works until you need to understand the business underneath. Which deals are stuck? Where are leads coming from? What is the close rate? With spreadsheets and a legacy custom CRM that could not keep up, those questions were nearly impossible to answer.`,- msg`Mike and Azmat from Nine Dots stepped in to fix that, not by changing how Homeseller works, but by building a system that finally fit around it.`,- ],- callout:- '"Twenty lets us build a CRM around the business and not the business around the CRM." - Mike Babiy, Founder, Nine Dots Ventures',- },- {- type: 'text',- eyebrow: msg`Architecture`,- heading: [- { text: msg`The CRM as a`, fontFamily: 'serif' },- { text: msg`control hub`, fontFamily: 'sans' },- ],- paragraphs: [- msg`Nine Dots rebuilt Homeseller's operations on Twenty, with a custom data model shaped around their sales flow. Because Twenty is open and everything is accessible via API, they connected it to what the business actually needed: n8n for automated workflows (in-app workflows were not available at that time), Grafana for live dashboards fed from Twenty, and a custom AI layer to parse and extract structured insights from more than 2,000 WhatsApp messages a day.`,- msg`Homeseller kept their habits. WhatsApp stayed WhatsApp. What changed is that everything flowing through those conversations now lands in a structured system, tracked, classified, and visible in real time.`,- ],- callout:- '"Twenty is the heart of the system. Everything branches from it." - Azmat Parveen, Nine Dots Ventures',- },- {- type: 'text',- eyebrow: msg`The result`,- heading: [- { text: msg`150 hours`, fontFamily: 'sans' },- {- text: msg`saved every month`,- fontFamily: 'serif',- },- ],- paragraphs: [- msg`About 150 hours per month saved in manual operations. Real-time metrics for the business owner. Growth readiness without adding operational headcount. A team that can answer questions that used to take days to piece together.`,- msg`The full rollout landed in July 2025. Since then, Nine Dots built a Smart Assistant on top of the system, nudging agents with tasks, reminders, and on-demand market analysis. Some agents never open Twenty directly, yet they are powered by it, outperforming peers on manual processes alone. By Q1 2026, Homeseller had recorded its best sales quarter ever.`,- ],- },- ],- tableOfContents: [- msg`When the channel is the business`,- msg`The CRM as a control hub`,- msg`The result`,- ],- catalogCard: {- summary: msg`Nine Dots put Twenty at the center of Homeseller's stack with APIs, automation, and AI on top of WhatsApp-heavy operations.`,- date: msg`Jul 2025`,- },-};+const META_TITLE = msg`Homeseller, WhatsApp, and a CRM built around the business | Nine Dots & Twenty`;+const META_DESCRIPTION = msg`How Nine Dots Ventures rebuilt a Singapore real estate agency on Twenty with APIs, n8n, Grafana, and AI on top of 2,000+ WhatsApp messages a day.`;export const generateMetadata = buildLocalizedMetadata({path: '/customers/9dots',- title: CASE_STUDY.meta.title,- description: CASE_STUDY.meta.description,+ title: META_TITLE,+ description: META_DESCRIPTION,});type CaseStudyPageProps = {@@ -123,69 +27,114 @@ type CaseStudyPageProps = {export default async function NineDotsCaseStudyPage({params,}: CaseStudyPageProps) {- const [i18n, stats] = await Promise.all([- getRouteI18n(params),- fetchCommunityStats(),- ]);- const renderText = createMessageDescriptorRenderer(i18n);- const menuSocialLinks = mergeSocialLinkLabels(MENU_DATA.socialLinks, stats);- const palette = getCaseStudyPalette('/customers/9dots');-- let storySectionIndex = 0;- const sectionBlocks = CASE_STUDY.sections.map((block, index) => {- if (block.type === 'text') {- const sectionId = `case-study-section-${storySectionIndex}`;- storySectionIndex += 1;- return (- <CaseStudy.TextBlock- key={index}- block={block}- isLast={index === CASE_STUDY.sections.length - 1}- renderText={renderText}- sectionId={sectionId}- />- );- }- return (- <CaseStudy.VisualBlock- key={index}- block={block}- isLast={index === CASE_STUDY.sections.length - 1}- />- );- });+ const i18n = await getRouteI18n(params);- return (- <>- <Menu.Root- backgroundColor={theme.colors.secondary.background[100]}- scheme="secondary"- navItems={MENU_DATA.navItems}- socialLinks={menuSocialLinks}- >- <Menu.Logo scheme="secondary" />- <Menu.Nav scheme="secondary" navItems={MENU_DATA.navItems} />- <Menu.Social scheme="secondary" socialLinks={menuSocialLinks} />- <Menu.Cta scheme="secondary" />- </Menu.Root>-- <CaseStudy.Hero- dashColor={palette.dashColor}- hero={CASE_STUDY.hero}- hoverDashColor={palette.hoverDashColor}- renderText={renderText}- />-- <CaseStudy.Highlights- industry={CASE_STUDY.hero.industry}- kpis={CASE_STUDY.hero.kpis}- renderText={renderText}- />-- <CaseStudy.Body>{sectionBlocks}</CaseStudy.Body>+ const caseStudy: CaseStudyData = {+ meta: {+ title: META_TITLE,+ description: META_DESCRIPTION,+ },+ hero: {+ readingTime: '9 min',+ title: (+ <Heading as="h1" size="xl" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`A real estate agency on WhatsApp`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="serif">{i18n._(msg`built a`)}</HeadingPart>+ <br />+ <HeadingPart fontFamily="sans">{i18n._(msg`CRM`)}</HeadingPart>{' '}+ <HeadingPart fontFamily="serif">{i18n._(msg`around it`)}</HeadingPart>+ </Heading>+ ),+ author: 'Mike Babiy & Azmat Parveen',+ authorAvatarSrc: '/images/partner/testimonials/mike-babiy.webp',+ authorRole: msg`Founder, Nine Dots Ventures`,+ clientIcon: 'nine-dots',+ heroImageSrc: PLACEHOLDER_HERO,+ industry: msg`Real Estate`,+ kpis: [+ { value: msg`150 hrs`, label: msg`Saved / month` },+ { value: msg`2,000+`, label: msg`Daily messages` },+ { value: msg`Q1 2026`, label: msg`Record quarter` },+ ],+ quote: {+ text: msg`Twenty lets us build a CRM around the business and not the business around the CRM.`,+ author: 'Mike Babiy',+ role: msg`Founder, Nine Dots Ventures`,+ },+ },+ sections: [+ {+ type: 'text',+ eyebrow: msg`Homeseller`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`When the channel is`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`the business`)}+ </HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`Homeseller is a high-volume real estate agency in Singapore, founded by one of the country's top-performing property agents. The whole operation runs on WhatsApp: no email, no calendars, just group chats, thousands of them, with clients, agents, and leads together.`,+ msg`That works until you need to understand the business underneath. Which deals are stuck? Where are leads coming from? What is the close rate? With spreadsheets and a legacy custom CRM that could not keep up, those questions were nearly impossible to answer.`,+ msg`Mike and Azmat from Nine Dots stepped in to fix that, not by changing how Homeseller works, but by building a system that finally fit around it.`,+ ],+ callout:+ '"Twenty lets us build a CRM around the business and not the business around the CRM." - Mike Babiy, Founder, Nine Dots Ventures',+ },+ {+ type: 'text',+ eyebrow: msg`Architecture`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`The CRM as a`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`control hub`)}+ </HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`Nine Dots rebuilt Homeseller's operations on Twenty, with a custom data model shaped around their sales flow. Because Twenty is open and everything is accessible via API, they connected it to what the business actually needed: n8n for automated workflows (in-app workflows were not available at that time), Grafana for live dashboards fed from Twenty, and a custom AI layer to parse and extract structured insights from more than 2,000 WhatsApp messages a day.`,+ msg`Homeseller kept their habits. WhatsApp stayed WhatsApp. What changed is that everything flowing through those conversations now lands in a structured system, tracked, classified, and visible in real time.`,+ ],+ callout:+ '"Twenty is the heart of the system. Everything branches from it." - Azmat Parveen, Nine Dots Ventures',+ },+ {+ type: 'text',+ eyebrow: msg`The result`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="sans">+ {i18n._(msg`150 hours`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="serif">+ {i18n._(msg`saved every month`)}+ </HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`About 150 hours per month saved in manual operations. Real-time metrics for the business owner. Growth readiness without adding operational headcount. A team that can answer questions that used to take days to piece together.`,+ msg`The full rollout landed in July 2025. Since then, Nine Dots built a Smart Assistant on top of the system, nudging agents with tasks, reminders, and on-demand market analysis. Some agents never open Twenty directly, yet they are powered by it, outperforming peers on manual processes alone. By Q1 2026, Homeseller had recorded its best sales quarter ever.`,+ ],+ },+ ],+ tableOfContents: [+ msg`When the channel is the business`,+ msg`The CRM as a control hub`,+ msg`The result`,+ ],+ catalogCard: {+ summary: msg`Nine Dots put Twenty at the center of Homeseller's stack with APIs, automation, and AI on top of WhatsApp-heavy operations.`,+ date: msg`Jul 2025`,+ },+ };- <CaseStudy.SectionNav items={CASE_STUDY.tableOfContents} />- <CustomersCaseStudySignoff renderText={renderText} />- </>- );+ return <CaseStudyPageLayout caseStudy={caseStudy} path="/customers/9dots" />;}diff --git a/packages/twenty-website-new/src/app/[locale]/customers/_components/CaseStudyPageLayout.tsx b/packages/twenty-website-new/src/app/[locale]/customers/_components/CaseStudyPageLayout.tsxnew file mode 100644index 00000000000..2a0ae8bf804--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/customers/_components/CaseStudyPageLayout.tsx@@ -0,0 +1,77 @@+import { getCaseStudyPalette, type CaseStudyData } from '@/lib/customers';+import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';+import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';+import { CaseStudy } from '@/sections/CaseStudy';+import { Menu, MENU_DATA } from '@/sections/Menu';+import { theme } from '@/theme';++import { CustomersCaseStudySignoff } from './CustomersCaseStudySignoff';++type CaseStudyPageLayoutProps = {+ caseStudy: CaseStudyData;+ path: string;+};++export async function CaseStudyPageLayout({+ caseStudy,+ path,+}: CaseStudyPageLayoutProps) {+ const stats = await fetchCommunityStats();+ const menuSocialLinks = mergeSocialLinkLabels(MENU_DATA.socialLinks, stats);+ const palette = getCaseStudyPalette(path);++ let storySectionIndex = 0;+ const sectionBlocks = caseStudy.sections.map((block, index) => {+ if (block.type === 'text') {+ const sectionId = `case-study-section-${storySectionIndex}`;+ storySectionIndex += 1;+ return (+ <CaseStudy.TextBlock+ key={index}+ block={block}+ isLast={index === caseStudy.sections.length - 1}+ sectionId={sectionId}+ />+ );+ }+ return (+ <CaseStudy.VisualBlock+ key={index}+ block={block}+ isLast={index === caseStudy.sections.length - 1}+ />+ );+ });++ return (+ <>+ <Menu.Root+ backgroundColor={theme.colors.secondary.background[100]}+ scheme="secondary"+ navItems={MENU_DATA.navItems}+ socialLinks={menuSocialLinks}+ >+ <Menu.Logo scheme="secondary" />+ <Menu.Nav scheme="secondary" navItems={MENU_DATA.navItems} />+ <Menu.Social scheme="secondary" socialLinks={menuSocialLinks} />+ <Menu.Cta scheme="secondary" />+ </Menu.Root>++ <CaseStudy.Hero+ dashColor={palette.dashColor}+ hero={caseStudy.hero}+ hoverDashColor={palette.hoverDashColor}+ />++ <CaseStudy.Highlights+ industry={caseStudy.hero.industry}+ kpis={caseStudy.hero.kpis}+ />++ <CaseStudy.Body>{sectionBlocks}</CaseStudy.Body>++ <CaseStudy.SectionNav items={caseStudy.tableOfContents} />+ <CustomersCaseStudySignoff />+ </>+ );+}diff --git a/packages/twenty-website-new/src/app/[locale]/customers/_components/CustomersCaseStudySignoff.tsx b/packages/twenty-website-new/src/app/[locale]/customers/_components/CustomersCaseStudySignoff.tsxindex f23e2c28bdc..1783a952f63 100644--- a/packages/twenty-website-new/src/app/[locale]/customers/_components/CustomersCaseStudySignoff.tsx+++ b/packages/twenty-website-new/src/app/[locale]/customers/_components/CustomersCaseStudySignoff.tsx@@ -1,43 +1,29 @@import { msg } from '@lingui/core/macro';-import { TalkToUsButton } from '@/lib/contact-cal';+import { TalkToUsButton } from '@/sections/ContactCal';import { HeadingPart, LinkButton } from '@/design-system/components';+import { getServerI18n } from '@/lib/i18n/utils/get-server-i18n';import { Pages } from '@/lib/pages';-import { Signoff } from '@/sections/Signoff/components';-import { theme } from '@/theme';-import type { MessageDescriptor } from '@lingui/core';+import { Signoff } from '@/sections/Signoff';-const SIGNOFF_BODY = {- text: msg`Join the teams that chose to own their CRM.\nStart building with Twenty today.`,-};--type CustomersCaseStudySignoffProps = {- renderText: (descriptor: MessageDescriptor) => string;-};--export function CustomersCaseStudySignoff({- renderText,-}: CustomersCaseStudySignoffProps) {+export function CustomersCaseStudySignoff() {+ const i18n = getServerI18n();return (- <Signoff.Root- backgroundColor={theme.colors.secondary.background[5]}- color={theme.colors.primary.text[100]}- page={Pages.Partners}- >+ <Signoff.Root scheme="muted" page={Pages.Partners}><Signoff.Heading page={Pages.Partners}><HeadingPart fontFamily="serif">- {renderText(msg`Ready to grow\nwith Twenty?`)}+ {i18n._(msg`Ready to grow\nwith Twenty?`)}</HeadingPart></Signoff.Heading>- <Signoff.Body- body={SIGNOFF_BODY}- page={Pages.Partners}- renderText={renderText}- />+ <Signoff.Body page={Pages.Partners}>+ {i18n._(+ msg`Join the teams that chose to own their CRM.\nStart building with Twenty today.`,+ )}+ </Signoff.Body><Signoff.Cta><LinkButtoncolor="secondary"href="https://app.twenty.com/welcome"- label={renderText(msg`Get started`)}+ label={i18n._(msg`Get started`)}variant="contained"/><TalkToUsButtondiff --git a/packages/twenty-website-new/src/app/[locale]/customers/act-education/page.tsx b/packages/twenty-website-new/src/app/[locale]/customers/act-education/page.tsxindex 58d737cce9a..103e451adfc 100644--- a/packages/twenty-website-new/src/app/[locale]/customers/act-education/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/customers/act-education/page.tsx@@ -1,116 +1,23 @@import { msg } from '@lingui/core/macro';-import { MENU_DATA } from '@/sections/Menu/data';-import { CustomersCaseStudySignoff } from '@/app/[locale]/customers/_components/CustomersCaseStudySignoff';-import { getCaseStudyPalette, type CaseStudyData } from '@/lib/customers';-import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';-import { createMessageDescriptorRenderer } from '@/lib/i18n/create-message-descriptor-renderer';+import { type CaseStudyData } from '@/lib/customers';import {getRouteI18n,type LocaleRouteParams,-} from '@/lib/i18n/get-route-i18n';-import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';-import { CaseStudy } from '@/sections/CaseStudy/components';-import { Menu } from '@/sections/Menu/components';-import { theme } from '@/theme';+} from '@/lib/i18n/utils/get-route-i18n';import { buildLocalizedMetadata } from '@/lib/seo';+import { Heading, HeadingPart } from '@/design-system/components';+import { CaseStudyPageLayout } from '@/app/[locale]/customers/_components/CaseStudyPageLayout';const PLACEHOLDER_HERO ='https://images.unsplash.com/photo-1687600154329-150952c73169?w=1600&q=80';-const CASE_STUDY: CaseStudyData = {- meta: {- title: msg`Burned by vendor lock-in, AC&T built a CRM they actually own | Twenty`,- description: msg`How AC&T Education Migration and Flycoder replaced a shuttered vendor CRM with self-hosted Twenty, with 90%+ lower cost and full ownership.`,- },- hero: {- readingTime: '7 min',- title: [- { text: msg`A CRM they`, fontFamily: 'serif' },- { text: msg`actually own`, fontFamily: 'sans', newLine: true },- ],- author: 'Joseph Chiang',- authorAvatarSrc: '/images/partner/testimonials/joseph-chiang.jpg',- authorRole: msg`CRM Engineer, AC&T Education Migration`,- clientIcon: 'act-education',- heroImageSrc: PLACEHOLDER_HERO,- industry: msg`Education`,- kpis: [{ value: msg`90%+`, label: msg`Lower CRM cost` }],- },- sections: [- {- type: 'text',- eyebrow: msg`AC&T Education Migration`,- heading: [- { text: msg`When the vendor`, fontFamily: 'serif' },- { text: msg`pulled the plug`, fontFamily: 'sans' },- ],- paragraphs: [- msg`AC&T Education Migration (actimmi.com) is an education agency in Australia. They help international students with applications to education providers and visas. They had been on a previous CRM until the vendor shut the system down, leaving nothing but a CSV export.`,- msg`Whatever came next had to be something they could own.`,- ],- callout:- '"They did not want to learn someone else\'s system. They wanted to keep working the way they already did and make it smoother." - Joseph Chiang, CRM Engineer, AC&T Education Migration',- },- {- type: 'text',- eyebrow: msg`Implementation`,- heading: [- {- text: msg`No more renting someone else's`,- fontFamily: 'serif',- },- { text: msg`structure`, fontFamily: 'sans' },- ],- paragraphs: [- msg`They evaluated Salesforce, Zoho, Pipedrive, and SuiteCRM. Each came with the same tradeoffs: too expensive, too rigid, or too generic, and none fixed the underlying problem. They were still renting a structure they did not control.`,- msg`Flycoder, a full-stack development partner, helped them set up Twenty as a self-hosted instance shaped around how AC&T actually operates. The data model centers on students, not a generic contact-and-deal pipeline. Statuses update automatically: a workflow runs nightly to keep enrollment records current. Automated email reminders cover important dates. Adding a new record takes under a minute.`,- msg`The result is a system that fits how AC&T already worked, instead of the other way around.`,- ],- },- {- type: 'text',- eyebrow: msg`Control`,- heading: [- { text: msg`Control without`, fontFamily: 'serif' },- { text: msg`the overhead`, fontFamily: 'sans' },- ],- paragraphs: [- msg`Self-hosted means AC&T carries no vendor risk: no pricing model that can change, no platform that can disappear, no forced migration. The system is theirs.`,- msg`Because everything is built on Twenty's open foundation, Flycoder could wire the exact logic AC&T needed without fighting the platform.`,- ],- },- {- type: 'text',- eyebrow: msg`The result`,- heading: [- {- text: msg`Costs down more than`,- fontFamily: 'serif',- },- { text: msg`90%`, fontFamily: 'sans' },- ],- paragraphs: [- msg`CRM costs dropped by more than 90%. Manual overhead tied to the old system is gone. For the first time, AC&T has a CRM they will not lose again.`,- msg`They did not just replace a tool. They took back ownership of how their business runs.`,- ],- },- ],- tableOfContents: [- msg`When the vendor pulled the plug`,- msg`No more renting someone else's structure`,- msg`Control without the overhead`,- msg`The result`,- ],- catalogCard: {- summary: msg`AC&T and Flycoder moved from a dead vendor export to self-hosted Twenty, with over 90% lower CRM cost and full control.`,- date: msg`2025`,- },-};+const META_TITLE = msg`Burned by vendor lock-in, AC&T built a CRM they actually own | Twenty`;+const META_DESCRIPTION = msg`How AC&T Education Migration and Flycoder replaced a shuttered vendor CRM with self-hosted Twenty, with 90%+ lower cost and full ownership.`;export const generateMetadata = buildLocalizedMetadata({path: '/customers/act-education',- title: CASE_STUDY.meta.title,- description: CASE_STUDY.meta.description,+ title: META_TITLE,+ description: META_DESCRIPTION,});type CaseStudyPageProps = {@@ -120,69 +27,125 @@ type CaseStudyPageProps = {export default async function ActEducationCaseStudyPage({params,}: CaseStudyPageProps) {- const [i18n, stats] = await Promise.all([- getRouteI18n(params),- fetchCommunityStats(),- ]);- const renderText = createMessageDescriptorRenderer(i18n);- const menuSocialLinks = mergeSocialLinkLabels(MENU_DATA.socialLinks, stats);- const palette = getCaseStudyPalette('/customers/act-education');+ const i18n = await getRouteI18n(params);- let storySectionIndex = 0;- const sectionBlocks = CASE_STUDY.sections.map((block, index) => {- if (block.type === 'text') {- const sectionId = `case-study-section-${storySectionIndex}`;- storySectionIndex += 1;- return (- <CaseStudy.TextBlock- key={index}- block={block}- isLast={index === CASE_STUDY.sections.length - 1}- renderText={renderText}- sectionId={sectionId}- />- );- }- return (- <CaseStudy.VisualBlock- key={index}- block={block}- isLast={index === CASE_STUDY.sections.length - 1}- />- );- });+ const caseStudy: CaseStudyData = {+ meta: {+ title: META_TITLE,+ description: META_DESCRIPTION,+ },+ hero: {+ readingTime: '7 min',+ title: (+ <Heading as="h1" size="xl" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`A CRM they`)}+ </HeadingPart>+ <br />+ <HeadingPart fontFamily="sans">+ {i18n._(msg`actually own`)}+ </HeadingPart>+ </Heading>+ ),+ author: 'Joseph Chiang',+ authorAvatarSrc: '/images/partner/testimonials/joseph-chiang.webp',+ authorRole: msg`CRM Engineer, AC&T Education Migration`,+ clientIcon: 'act-education',+ heroImageSrc: PLACEHOLDER_HERO,+ industry: msg`Education`,+ kpis: [{ value: msg`90%+`, label: msg`Lower CRM cost` }],+ },+ sections: [+ {+ type: 'text',+ eyebrow: msg`AC&T Education Migration`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`When the vendor`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`pulled the plug`)}+ </HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`AC&T Education Migration (actimmi.com) is an education agency in Australia. They help international students with applications to education providers and visas. They had been on a previous CRM until the vendor shut the system down, leaving nothing but a CSV export.`,+ msg`Whatever came next had to be something they could own.`,+ ],+ callout:+ '"They did not want to learn someone else\'s system. They wanted to keep working the way they already did and make it smoother." - Joseph Chiang, CRM Engineer, AC&T Education Migration',+ },+ {+ type: 'text',+ eyebrow: msg`Implementation`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`No more renting someone else's`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`structure`)}+ </HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`They evaluated Salesforce, Zoho, Pipedrive, and SuiteCRM. Each came with the same tradeoffs: too expensive, too rigid, or too generic, and none fixed the underlying problem. They were still renting a structure they did not control.`,+ msg`Flycoder, a full-stack development partner, helped them set up Twenty as a self-hosted instance shaped around how AC&T actually operates. The data model centers on students, not a generic contact-and-deal pipeline. Statuses update automatically: a workflow runs nightly to keep enrollment records current. Automated email reminders cover important dates. Adding a new record takes under a minute.`,+ msg`The result is a system that fits how AC&T already worked, instead of the other way around.`,+ ],+ },+ {+ type: 'text',+ eyebrow: msg`Control`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`Control without`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`the overhead`)}+ </HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`Self-hosted means AC&T carries no vendor risk: no pricing model that can change, no platform that can disappear, no forced migration. The system is theirs.`,+ msg`Because everything is built on Twenty's open foundation, Flycoder could wire the exact logic AC&T needed without fighting the platform.`,+ ],+ },+ {+ type: 'text',+ eyebrow: msg`The result`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`Costs down more than`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">{i18n._(msg`90%`)}</HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`CRM costs dropped by more than 90%. Manual overhead tied to the old system is gone. For the first time, AC&T has a CRM they will not lose again.`,+ msg`They did not just replace a tool. They took back ownership of how their business runs.`,+ ],+ },+ ],+ tableOfContents: [+ msg`When the vendor pulled the plug`,+ msg`No more renting someone else's structure`,+ msg`Control without the overhead`,+ msg`The result`,+ ],+ catalogCard: {+ summary: msg`AC&T and Flycoder moved from a dead vendor export to self-hosted Twenty, with over 90% lower CRM cost and full control.`,+ date: msg`2025`,+ },+ };return (- <>- <Menu.Root- backgroundColor={theme.colors.secondary.background[100]}- scheme="secondary"- navItems={MENU_DATA.navItems}- socialLinks={menuSocialLinks}- >- <Menu.Logo scheme="secondary" />- <Menu.Nav scheme="secondary" navItems={MENU_DATA.navItems} />- <Menu.Social scheme="secondary" socialLinks={menuSocialLinks} />- <Menu.Cta scheme="secondary" />- </Menu.Root>-- <CaseStudy.Hero- dashColor={palette.dashColor}- hero={CASE_STUDY.hero}- hoverDashColor={palette.hoverDashColor}- renderText={renderText}- />-- <CaseStudy.Highlights- industry={CASE_STUDY.hero.industry}- kpis={CASE_STUDY.hero.kpis}- renderText={renderText}- />-- <CaseStudy.Body>{sectionBlocks}</CaseStudy.Body>-- <CaseStudy.SectionNav items={CASE_STUDY.tableOfContents} />- <CustomersCaseStudySignoff renderText={renderText} />- </>+ <CaseStudyPageLayout+ caseStudy={caseStudy}+ path="/customers/act-education"+ />);}diff --git a/packages/twenty-website-new/src/app/[locale]/customers/alternative-partners/page.tsx b/packages/twenty-website-new/src/app/[locale]/customers/alternative-partners/page.tsxindex 0230c936ac5..5b9ecc9b891 100644--- a/packages/twenty-website-new/src/app/[locale]/customers/alternative-partners/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/customers/alternative-partners/page.tsx@@ -1,84 +1,23 @@import { msg } from '@lingui/core/macro';-import { MENU_DATA } from '@/sections/Menu/data';-import { CustomersCaseStudySignoff } from '@/app/[locale]/customers/_components/CustomersCaseStudySignoff';-import { getCaseStudyPalette, type CaseStudyData } from '@/lib/customers';-import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';-import { createMessageDescriptorRenderer } from '@/lib/i18n/create-message-descriptor-renderer';+import { Heading, HeadingPart } from '@/design-system/components';+import type { CaseStudyData } from '@/lib/customers';import {getRouteI18n,type LocaleRouteParams,-} from '@/lib/i18n/get-route-i18n';-import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';-import { CaseStudy } from '@/sections/CaseStudy/components';-import { Menu } from '@/sections/Menu/components';-import { theme } from '@/theme';+} from '@/lib/i18n/utils/get-route-i18n';import { buildLocalizedMetadata } from '@/lib/seo';+import { CaseStudyPageLayout } from '@/app/[locale]/customers/_components/CaseStudyPageLayout';const PLACEHOLDER_HERO =- 'https://images.unsplash.com/photo-1702047149248-a6049168d2a8?w=1600&q=80';+ 'https://images.unsplash.com/photo-1702047149248-a6049168a2a8?w=1600&q=80';-const CASE_STUDY: CaseStudyData = {- meta: {- title: msg`From Salesforce to self-hosted Twenty, powered by AI | Alternative Partners`,- description: msg`How Alternative Partners migrated from Salesforce to self-hosted Twenty using agentic AI in the implementation loop: fast migration, durable ownership.`,- },- hero: {- readingTime: '7 min',- title: [- { text: msg`From Salesforce to`, fontFamily: 'serif' },- { text: msg`self-hosted Twenty`, fontFamily: 'sans', newLine: true },- ],- author: 'Benjamin Reynolds',- authorAvatarSrc: '/images/partner/testimonials/benjamin-reynolds.webp',- authorRole: msg`Principal and Founder, Alternative Partners`,- clientIcon: 'alternative-partners',- heroImageSrc: PLACEHOLDER_HERO,- industry: msg`Consulting`,- kpis: [- { value: msg`AI-assisted`, label: msg`Salesforce migration` },- { value: msg`Self-hosted`, label: msg`Full ownership` },- ],- },- sections: [- {- type: 'text',- eyebrow: msg`Alternative Partners`,- heading: [- { text: msg`AI in the`, fontFamily: 'serif' },- { text: msg`migration workflow`, fontFamily: 'sans' },- ],- paragraphs: [- msg`Alternative Partners is a consulting firm that moved from Salesforce to a self-hosted Twenty instance. Benjamin Reynolds led the migration. He had already become a Twenty expert implementing Twenty for one of Twenty's first cloud customers.`,- msg`His approach was unconventional. Instead of mapping fields manually, scripting transforms, and validating data step by step, he handed the job to agentic AI tools with a brief: where the data lives, the GitHub repo for the target platform, and the Railway deployment. Start, and only return if something breaks beyond a 70% confidence fix.`,- msg`It worked. This is AI-assisted iteration in practice: not AI as a product feature, but as part of implementation work, compressing what would typically be weeks into something one person can oversee without being the bottleneck.`,- ],- },- {- type: 'text',- eyebrow: msg`Ownership`,- heading: [- { text: msg`Self-hosted`, fontFamily: 'serif' },- { text: msg`means control`, fontFamily: 'sans' },- ],- paragraphs: [- msg`The self-hosted setup means Alternative Partners owns the full stack: no vendor access to their data, no dependency on a SaaS pricing model, full control over how the system evolves. The migration was fast because of AI; the result is durable because the stack is open source.`,- ],- },- ],- tableOfContents: [- msg`AI in the migration workflow`,- msg`Self-hosted means control`,- ],- catalogCard: {- summary: msg`Alternative Partners replaced Salesforce with self-hosted Twenty, using agentic AI to compress migration work.`,- date: msg`2025`,- },-};+const META_TITLE = msg`From Salesforce to self-hosted Twenty, powered by AI | Alternative Partners`;+const META_DESCRIPTION = msg`How Alternative Partners migrated from Salesforce to self-hosted Twenty using agentic AI in the implementation loop: fast migration, durable ownership.`;export const generateMetadata = buildLocalizedMetadata({path: '/customers/alternative-partners',- title: CASE_STUDY.meta.title,- description: CASE_STUDY.meta.description,+ title: META_TITLE,+ description: META_DESCRIPTION,});type CaseStudyPageProps = {@@ -88,69 +27,89 @@ type CaseStudyPageProps = {export default async function AlternativePartnersCaseStudyPage({params,}: CaseStudyPageProps) {- const [i18n, stats] = await Promise.all([- getRouteI18n(params),- fetchCommunityStats(),- ]);- const renderText = createMessageDescriptorRenderer(i18n);- const menuSocialLinks = mergeSocialLinkLabels(MENU_DATA.socialLinks, stats);- const palette = getCaseStudyPalette('/customers/alternative-partners');+ const i18n = await getRouteI18n(params);- let storySectionIndex = 0;- const sectionBlocks = CASE_STUDY.sections.map((block, index) => {- if (block.type === 'text') {- const sectionId = `case-study-section-${storySectionIndex}`;- storySectionIndex += 1;- return (- <CaseStudy.TextBlock- key={index}- block={block}- isLast={index === CASE_STUDY.sections.length - 1}- renderText={renderText}- sectionId={sectionId}- />- );- }- return (- <CaseStudy.VisualBlock- key={index}- block={block}- isLast={index === CASE_STUDY.sections.length - 1}- />- );- });+ const caseStudy: CaseStudyData = {+ meta: {+ title: META_TITLE,+ description: META_DESCRIPTION,+ },+ hero: {+ readingTime: '7 min',+ title: (+ <Heading as="h1" size="xl" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`From Salesforce to`)}+ </HeadingPart>+ <br />+ <HeadingPart fontFamily="sans">+ {i18n._(msg`self-hosted Twenty`)}+ </HeadingPart>+ </Heading>+ ),+ author: 'Benjamin Reynolds',+ authorAvatarSrc: '/images/partner/testimonials/benjamin-reynolds.webp',+ authorRole: msg`Principal and Founder, Alternative Partners`,+ clientIcon: 'alternative-partners',+ heroImageSrc: PLACEHOLDER_HERO,+ industry: msg`Consulting`,+ kpis: [+ { value: msg`AI-assisted`, label: msg`Salesforce migration` },+ { value: msg`Self-hosted`, label: msg`Full ownership` },+ ],+ },+ sections: [+ {+ type: 'text',+ eyebrow: msg`Alternative Partners`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`AI in the`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`migration workflow`)}+ </HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`Alternative Partners is a consulting firm that moved from Salesforce to a self-hosted Twenty instance. Benjamin Reynolds led the migration. He had already become a Twenty expert implementing Twenty for one of Twenty's first cloud customers.`,+ msg`His approach was unconventional. Instead of mapping fields manually, scripting transforms, and validating data step by step, he handed the job to agentic AI tools with a brief: where the data lives, the GitHub repo for the target platform, and the Railway deployment. Start, and only return if something breaks beyond a 70% confidence fix.`,+ msg`It worked. This is AI-assisted iteration in practice: not AI as a product feature, but as part of implementation work, compressing what would typically be weeks into something one person can oversee without being the bottleneck.`,+ ],+ },+ {+ type: 'text',+ eyebrow: msg`Ownership`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`Self-hosted`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`means control`)}+ </HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`The self-hosted setup means Alternative Partners owns the full stack: no vendor access to their data, no dependency on a SaaS pricing model, full control over how the system evolves. The migration was fast because of AI; the result is durable because the stack is open source.`,+ ],+ },+ ],+ tableOfContents: [+ msg`AI in the migration workflow`,+ msg`Self-hosted means control`,+ ],+ catalogCard: {+ summary: msg`Alternative Partners replaced Salesforce with self-hosted Twenty, using agentic AI to compress migration work.`,+ date: msg`2025`,+ },+ };return (- <>- <Menu.Root- backgroundColor={theme.colors.secondary.background[100]}- scheme="secondary"- navItems={MENU_DATA.navItems}- socialLinks={menuSocialLinks}- >- <Menu.Logo scheme="secondary" />- <Menu.Nav scheme="secondary" navItems={MENU_DATA.navItems} />- <Menu.Social scheme="secondary" socialLinks={menuSocialLinks} />- <Menu.Cta scheme="secondary" />- </Menu.Root>-- <CaseStudy.Hero- dashColor={palette.dashColor}- hero={CASE_STUDY.hero}- hoverDashColor={palette.hoverDashColor}- renderText={renderText}- />-- <CaseStudy.Highlights- industry={CASE_STUDY.hero.industry}- kpis={CASE_STUDY.hero.kpis}- renderText={renderText}- />-- <CaseStudy.Body>{sectionBlocks}</CaseStudy.Body>-- <CaseStudy.SectionNav items={CASE_STUDY.tableOfContents} />- <CustomersCaseStudySignoff renderText={renderText} />- </>+ <CaseStudyPageLayout+ caseStudy={caseStudy}+ path="/customers/alternative-partners"+ />);}diff --git a/packages/twenty-website-new/src/app/[locale]/customers/elevate-consulting/page.tsx b/packages/twenty-website-new/src/app/[locale]/customers/elevate-consulting/page.tsxindex 842c4ac0d7c..e9213f44b1e 100644--- a/packages/twenty-website-new/src/app/[locale]/customers/elevate-consulting/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/customers/elevate-consulting/page.tsx@@ -1,127 +1,23 @@import { msg } from '@lingui/core/macro';-import { MENU_DATA } from '@/sections/Menu/data';-import { CustomersCaseStudySignoff } from '@/app/[locale]/customers/_components/CustomersCaseStudySignoff';-import { getCaseStudyPalette, type CaseStudyData } from '@/lib/customers';-import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';-import { createMessageDescriptorRenderer } from '@/lib/i18n/create-message-descriptor-renderer';+import { type CaseStudyData } from '@/lib/customers';import {getRouteI18n,type LocaleRouteParams,-} from '@/lib/i18n/get-route-i18n';-import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';-import { CaseStudy } from '@/sections/CaseStudy/components';-import { Menu } from '@/sections/Menu/components';-import { theme } from '@/theme';+} from '@/lib/i18n/utils/get-route-i18n';import { buildLocalizedMetadata } from '@/lib/seo';+import { Heading, HeadingPart } from '@/design-system/components';+import { CaseStudyPageLayout } from '@/app/[locale]/customers/_components/CaseStudyPageLayout';const PLACEHOLDER_HERO ='https://images.unsplash.com/photo-1758873269035-aae0e1fd3422?w=1600&q=80';-const CASE_STUDY: CaseStudyData = {- meta: {- title: msg`Twenty as the API backbone of a go-to-market stack | Elevate Consulting`,- description: msg`How Elevate Consulting moved off documents and spreadsheets to Twenty as the API-connected CRM at the center of their stack.`,- },- hero: {- readingTime: '8 min',- title: [- { text: msg`Twenty as the`, fontFamily: 'serif' },- { text: msg`API backbone`, fontFamily: 'sans', newLine: true },- {- text: msg`of a go-to-market stack`,- fontFamily: 'serif',- },- ],- author: 'Justin Beadle',- authorRole: msg`Director of Digital and Information, Elevate Consulting`,- clientIcon: 'elevate-consulting',- heroImageSrc: PLACEHOLDER_HERO,- industry: msg`Management Consulting`,- kpis: [- { value: msg`1 click`, label: msg`Proposal automation` },- { value: msg`4 tools`, label: msg`Connected via API` },- { value: msg`API-first`, label: msg`Tool integration` },- ],- quote: {- text: msg`It is just such a nicer experience than dealing with a Salesforce or a HubSpot. My mission has been to get every tool API-accessible, so everything talks to each other.`,- author: 'Justin Beadle',- role: msg`Director of Digital and Information, Elevate Consulting`,- },- },- sections: [- {- type: 'text',- eyebrow: msg`The situation`,- heading: [- { text: msg`From documents to`, fontFamily: 'serif' },- { text: msg`open APIs`, fontFamily: 'sans' },- ],- paragraphs: [- msg`Elevate Consulting is a management consultancy based in Canada. When Justin Beadle, Director of Digital and Information, joined, the company ran entirely on Word documents, Excel spreadsheets, sticky notes, emails, and reliance on people. There was no CRM, no API-accessible tools, only a patchwork trying to stand in for a single source of truth.`,- msg`The CEO had resisted bringing in a CRM for years. The business development team had no experience using one, and the licensing costs of well-known CRMs like Salesforce or HubSpot were hard to justify without any guarantee of adoption: CRMs are only as good as the maintenance of the data inside them.`,- msg`In June 2025, Justin learned Twenty v1 had shipped. Within two or three days, the CEO asked him to look into setting up a CRM. The shift came from the potential of what could be built on top of fully open APIs. The timing was perfect.`,- ],- callout:- '"It is just such a nicer experience than dealing with a Salesforce or a HubSpot. My mission has been to get every tool API-accessible, so everything talks to each other. Twenty made that possible in a way older CRM platforms simply do not." - Justin Beadle, Director of Digital and Information, Elevate Consulting',- },- {- type: 'text',- eyebrow: msg`Integration`,- heading: [- { text: msg`One`, fontFamily: 'serif' },- { text: msg`API`, fontFamily: 'sans' },- { text: msg`to rule them all`, fontFamily: 'serif' },- ],- paragraphs: [- msg`Justin's broader mission at Elevate has been to move the company off static documents and onto tools with API access. By the end of 2025, that was in place: time billing, resource planning, Microsoft Teams, and project management were all accessible via API, with Twenty at the center holding client and opportunity data. Team members could use that information strategically instead of re-keying it.`,- msg`That opened the door to something more powerful. Justin built a custom front end that pulls live data from those systems into a single view, tailored to each role. When a proposal is won, what used to require four separate people manually setting up instances across four different tools now happens in a single click, drawing on data collected in Twenty across the full opportunity lifecycle. It is another shift toward higher-value work for clients.`,- msg`Twenty is not only where CRM data lives. It is the API backbone that makes the rest of the stack possible.`,- ],- callout:- '"Because Twenty\'s API is fully open, I could connect it to every other tool in our stack. When a proposal is won, what used to take four people manually setting things up across four different tools now happens in a single click. That is the kind of time saving that only becomes possible when everything is connected." - Justin Beadle, Director of Digital and Information, Elevate Consulting',- },- {- type: 'text',- eyebrow: msg`Adoption`,- heading: [- { text: msg`Workflows that`, fontFamily: 'serif' },- { text: msg`actually get used`, fontFamily: 'sans' },- ],- paragraphs: [- msg`The business development team finally had the CRM they had been asking for. Adoption came naturally: their data was already there when they logged in.`,- msg`Justin built workflows for notifications across the team, alerting the right people in Teams when a prospect becomes a lead or when project milestones are reached. Forms in Twenty let the business development team log activity without leaving the tool. The impact is real for the organization. The tool has been adaptable from opportunity-level work at a client to executive-level decisions.`,- msg`The flexibility to wire this together, without outside help and without fighting the platform, is what made it possible for a single person to stand up and maintain a connected stack across an entire consultancy.`,- ],- },- {- type: 'text',- eyebrow: msg`What is next`,- heading: [- { text: msg`Beyond`, fontFamily: 'serif' },- { text: msg`internal rollout`, fontFamily: 'sans' },- ],- paragraphs: [- msg`Elevate's CEO was so impressed with Twenty he started recommending it to clients before the internal setup was even complete. The team is exploring bringing Twenty to client projects as part of their consulting practice, including as the backend for custom-built products tailored to specific operational needs.`,- msg`For a firm that once ran on sticky notes, this is more than an upgrade. It is a complete transformation.`,- ],- },- ],- tableOfContents: [- msg`From documents to open APIs`,- msg`One API to rule them all`,- msg`Workflows that actually get used`,- msg`What is next`,- ],- catalogCard: {- summary: msg`Elevate Consulting uses Twenty as the API backbone connecting billing, Teams, resourcing, and a custom front end around client and opportunity data.`,- date: msg`Jun 2025`,- },-};+const META_TITLE = msg`Twenty as the API backbone of a go-to-market stack | Elevate Consulting`;+const META_DESCRIPTION = msg`How Elevate Consulting moved off documents and spreadsheets to Twenty as the API-connected CRM at the center of their stack.`;export const generateMetadata = buildLocalizedMetadata({path: '/customers/elevate-consulting',- title: CASE_STUDY.meta.title,- description: CASE_STUDY.meta.description,+ title: META_TITLE,+ description: META_DESCRIPTION,});type CaseStudyPageProps = {@@ -131,69 +27,139 @@ type CaseStudyPageProps = {export default async function ElevateConsultingCaseStudyPage({params,}: CaseStudyPageProps) {- const [i18n, stats] = await Promise.all([- getRouteI18n(params),- fetchCommunityStats(),- ]);- const renderText = createMessageDescriptorRenderer(i18n);- const menuSocialLinks = mergeSocialLinkLabels(MENU_DATA.socialLinks, stats);- const palette = getCaseStudyPalette('/customers/elevate-consulting');+ const i18n = await getRouteI18n(params);- let storySectionIndex = 0;- const sectionBlocks = CASE_STUDY.sections.map((block, index) => {- if (block.type === 'text') {- const sectionId = `case-study-section-${storySectionIndex}`;- storySectionIndex += 1;- return (- <CaseStudy.TextBlock- key={index}- block={block}- isLast={index === CASE_STUDY.sections.length - 1}- renderText={renderText}- sectionId={sectionId}- />- );- }- return (- <CaseStudy.VisualBlock- key={index}- block={block}- isLast={index === CASE_STUDY.sections.length - 1}- />- );- });+ const caseStudy: CaseStudyData = {+ meta: {+ title: META_TITLE,+ description: META_DESCRIPTION,+ },+ hero: {+ readingTime: '8 min',+ title: (+ <Heading as="h1" size="xl" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`Twenty as the`)}+ </HeadingPart>+ <br />+ <HeadingPart fontFamily="sans">+ {i18n._(msg`API backbone`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="serif">+ {i18n._(msg`of a go-to-market stack`)}+ </HeadingPart>+ </Heading>+ ),+ author: 'Justin Beadle',+ authorRole: msg`Director of Digital and Information, Elevate Consulting`,+ clientIcon: 'elevate-consulting',+ heroImageSrc: PLACEHOLDER_HERO,+ industry: msg`Management Consulting`,+ kpis: [+ { value: msg`1 click`, label: msg`Proposal automation` },+ { value: msg`4 tools`, label: msg`Connected via API` },+ { value: msg`API-first`, label: msg`Tool integration` },+ ],+ quote: {+ text: msg`It is just such a nicer experience than dealing with a Salesforce or a HubSpot. My mission has been to get every tool API-accessible, so everything talks to each other.`,+ author: 'Justin Beadle',+ role: msg`Director of Digital and Information, Elevate Consulting`,+ },+ },+ sections: [+ {+ type: 'text',+ eyebrow: msg`The situation`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`From documents to`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`open APIs`)}+ </HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`Elevate Consulting is a management consultancy based in Canada. When Justin Beadle, Director of Digital and Information, joined, the company ran entirely on Word documents, Excel spreadsheets, sticky notes, emails, and reliance on people. There was no CRM, no API-accessible tools, only a patchwork trying to stand in for a single source of truth.`,+ msg`The CEO had resisted bringing in a CRM for years. The business development team had no experience using one, and the licensing costs of well-known CRMs like Salesforce or HubSpot were hard to justify without any guarantee of adoption: CRMs are only as good as the maintenance of the data inside them.`,+ msg`In June 2025, Justin learned Twenty v1 had shipped. Within two or three days, the CEO asked him to look into setting up a CRM. The shift came from the potential of what could be built on top of fully open APIs. The timing was perfect.`,+ ],+ callout:+ '"It is just such a nicer experience than dealing with a Salesforce or a HubSpot. My mission has been to get every tool API-accessible, so everything talks to each other. Twenty made that possible in a way older CRM platforms simply do not." - Justin Beadle, Director of Digital and Information, Elevate Consulting',+ },+ {+ type: 'text',+ eyebrow: msg`Integration`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">{i18n._(msg`One`)}</HeadingPart>{' '}+ <HeadingPart fontFamily="sans">{i18n._(msg`API`)}</HeadingPart>{' '}+ <HeadingPart fontFamily="serif">+ {i18n._(msg`to rule them all`)}+ </HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`Justin's broader mission at Elevate has been to move the company off static documents and onto tools with API access. By the end of 2025, that was in place: time billing, resource planning, Microsoft Teams, and project management were all accessible via API, with Twenty at the center holding client and opportunity data. Team members could use that information strategically instead of re-keying it.`,+ msg`That opened the door to something more powerful. Justin built a custom front end that pulls live data from those systems into a single view, tailored to each role. When a proposal is won, what used to require four separate people manually setting up instances across four different tools now happens in a single click, drawing on data collected in Twenty across the full opportunity lifecycle. It is another shift toward higher-value work for clients.`,+ msg`Twenty is not only where CRM data lives. It is the API backbone that makes the rest of the stack possible.`,+ ],+ callout:+ '"Because Twenty\'s API is fully open, I could connect it to every other tool in our stack. When a proposal is won, what used to take four people manually setting things up across four different tools now happens in a single click. That is the kind of time saving that only becomes possible when everything is connected." - Justin Beadle, Director of Digital and Information, Elevate Consulting',+ },+ {+ type: 'text',+ eyebrow: msg`Adoption`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`Workflows that`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`actually get used`)}+ </HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`The business development team finally had the CRM they had been asking for. Adoption came naturally: their data was already there when they logged in.`,+ msg`Justin built workflows for notifications across the team, alerting the right people in Teams when a prospect becomes a lead or when project milestones are reached. Forms in Twenty let the business development team log activity without leaving the tool. The impact is real for the organization. The tool has been adaptable from opportunity-level work at a client to executive-level decisions.`,+ msg`The flexibility to wire this together, without outside help and without fighting the platform, is what made it possible for a single person to stand up and maintain a connected stack across an entire consultancy.`,+ ],+ },+ {+ type: 'text',+ eyebrow: msg`What is next`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">{i18n._(msg`Beyond`)}</HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`internal rollout`)}+ </HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`Elevate's CEO was so impressed with Twenty he started recommending it to clients before the internal setup was even complete. The team is exploring bringing Twenty to client projects as part of their consulting practice, including as the backend for custom-built products tailored to specific operational needs.`,+ msg`For a firm that once ran on sticky notes, this is more than an upgrade. It is a complete transformation.`,+ ],+ },+ ],+ tableOfContents: [+ msg`From documents to open APIs`,+ msg`One API to rule them all`,+ msg`Workflows that actually get used`,+ msg`What is next`,+ ],+ catalogCard: {+ summary: msg`Elevate Consulting uses Twenty as the API backbone connecting billing, Teams, resourcing, and a custom front end around client and opportunity data.`,+ date: msg`Jun 2025`,+ },+ };return (- <>- <Menu.Root- backgroundColor={theme.colors.secondary.background[100]}- scheme="secondary"- navItems={MENU_DATA.navItems}- socialLinks={menuSocialLinks}- >- <Menu.Logo scheme="secondary" />- <Menu.Nav scheme="secondary" navItems={MENU_DATA.navItems} />- <Menu.Social scheme="secondary" socialLinks={menuSocialLinks} />- <Menu.Cta scheme="secondary" />- </Menu.Root>-- <CaseStudy.Hero- dashColor={palette.dashColor}- hero={CASE_STUDY.hero}- hoverDashColor={palette.hoverDashColor}- renderText={renderText}- />-- <CaseStudy.Highlights- industry={CASE_STUDY.hero.industry}- kpis={CASE_STUDY.hero.kpis}- renderText={renderText}- />-- <CaseStudy.Body>{sectionBlocks}</CaseStudy.Body>-- <CaseStudy.SectionNav items={CASE_STUDY.tableOfContents} />- <CustomersCaseStudySignoff renderText={renderText} />- </>+ <CaseStudyPageLayout+ caseStudy={caseStudy}+ path="/customers/elevate-consulting"+ />);}diff --git a/packages/twenty-website-new/src/app/[locale]/customers/netzero/page.tsx b/packages/twenty-website-new/src/app/[locale]/customers/netzero/page.tsxindex be61519d525..ea9ac5ba205 100644--- a/packages/twenty-website-new/src/app/[locale]/customers/netzero/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/customers/netzero/page.tsx@@ -1,118 +1,23 @@import { msg } from '@lingui/core/macro';-import { MENU_DATA } from '@/sections/Menu/data';-import { CustomersCaseStudySignoff } from '@/app/[locale]/customers/_components/CustomersCaseStudySignoff';-import { getCaseStudyPalette, type CaseStudyData } from '@/lib/customers';-import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';-import { createMessageDescriptorRenderer } from '@/lib/i18n/create-message-descriptor-renderer';+import { type CaseStudyData } from '@/lib/customers';import {getRouteI18n,type LocaleRouteParams,-} from '@/lib/i18n/get-route-i18n';-import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';-import { CaseStudy } from '@/sections/CaseStudy/components';-import { Menu } from '@/sections/Menu/components';-import { theme } from '@/theme';+} from '@/lib/i18n/utils/get-route-i18n';import { buildLocalizedMetadata } from '@/lib/seo';+import { Heading, HeadingPart } from '@/design-system/components';+import { CaseStudyPageLayout } from '@/app/[locale]/customers/_components/CaseStudyPageLayout';const PLACEHOLDER_HERO ='https://images.unsplash.com/photo-1744830343976-ce690ba2a67c?w=1600&q=80';-const CASE_STUDY: CaseStudyData = {- meta: {- title: msg`A CRM that grows with you | NetZero & Twenty`,- description: msg`How NetZero uses Twenty across carbon credits, agricultural products, and franchised industrial systems with a modular CRM and a roadmap toward AI-assisted workflows.`,- },- hero: {- readingTime: '8 min',- title: [- { text: msg`A CRM that`, fontFamily: 'serif' },- { text: msg`grows`, fontFamily: 'sans', newLine: true },- { text: msg`with you`, fontFamily: 'serif' },- ],- author: 'Olivier Reinaud',- authorAvatarSrc: '/images/partner/testimonials/olivier-reinaud.jpg',- authorRole: msg`Co-founder, NetZero`,- clientIcon: 'netzero',- heroImageSrc: PLACEHOLDER_HERO,- industry: msg`Agribusiness`,- kpis: [- { value: msg`3 product lines`, label: msg`On a single CRM` },- { value: msg`No-code`, label: msg`Customizations` },- ],- },- sections: [- {- type: 'text',- eyebrow: msg`NetZero`,- heading: [- { text: msg`The right`, fontFamily: 'serif' },- { text: msg`foundation`, fontFamily: 'sans' },- ],- paragraphs: [- msg`NetZero works with the agro-industry, serving clients from multinationals to smallholder farmers. They sell carbon credits, agricultural products, and franchised industrial systems across three different product lines, multiple countries, and multiple company sizes. When Olivier Reinaud, co-founder of NetZero, started looking at CRMs in late 2024, he was not chasing the most feature-rich platform. He wanted the right foundation.`,- ],- callout:- '"Twenty delivers on what CRMs should have always been: fairly priced software with a fully modular and customizable model, a clean and modern UI, granular permissions, automations, enterprise features. A compelling solution with high potential to rightfully disrupt the CRM market." - Olivier Reinaud, co-founder of NetZero',- },- {- type: 'text',- eyebrow: msg`Flexibility`,- heading: [- {- text: msg`A business that does not fit a`,- fontFamily: 'serif',- },- { text: msg`template`, fontFamily: 'sans' },- ],- paragraphs: [- msg`What convinced Olivier was the flexibility of the platform and where it was headed. Even when initial needs were basic record-keeping, he still needed a custom data model with granular permissions to manage the wide range of NetZero activities. He also needed a system that could adapt quickly to a fast-iteration company.`,- msg`With Twenty, when a new need appears, he can address it himself: no developer required, no support ticket.`,- ],- callout:- '"The flexibility is really what made the difference. Our needs evolve very fast. I discover a new need and in two clicks I can address it. That is a real advantage when you are moving quickly." - Olivier Reinaud, co-founder of NetZero',- },- {- type: 'text',- eyebrow: msg`Roadmap`,- heading: [- { text: msg`From simple to`, fontFamily: 'serif' },- { text: msg`advanced`, fontFamily: 'sans' },- ],- paragraphs: [- msg`Olivier recognizes that NetZero's current use of Twenty is still relatively simple: workflows and integrations are not yet as deep as he eventually wants, because he prioritized getting foundations right first.`,- msg`What is planned is significant. NetZero has a data lake, online forms, and multiple internal systems that he wants to connect to Twenty. The pipes are there; the next step is automations that tie them together.`,- msg`What is coming in April 2026 is what he has been waiting for: AI-assisted workflow creation, describing what he needs and iterating from there instead of building complex logic from scratch. For a founder who runs the CRM himself, that changes what is realistically possible.`,- ],- },- {- type: 'text',- eyebrow: msg`Results`,- heading: [- { text: msg`The bet is`, fontFamily: 'serif' },- { text: msg`paying off`, fontFamily: 'sans' },- ],- paragraphs: [- msg`While NetZero still runs a second CRM in parallel for WhatsApp-heavy operations with farmers in Brazil, they expect to migrate all of it to Twenty as features and the ecosystem grow. Already, their structured, multinational pipeline is powered by Twenty.`,- msg`The early bet on the architecture is holding, and upcoming AI features are expected to make it even more relevant.`,- ],- },- ],- tableOfContents: [- msg`The right foundation`,- msg`A business that does not fit a template`,- msg`From simple to advanced`,- msg`The bet is paying off`,- ],- catalogCard: {- summary: msg`NetZero uses Twenty as a modular CRM across product lines and countries, with a roadmap into AI-assisted workflows.`,- date: msg`2025`,- },-};+const META_TITLE = msg`A CRM that grows with you | NetZero & Twenty`;+const META_DESCRIPTION = msg`How NetZero uses Twenty across carbon credits, agricultural products, and franchised industrial systems with a modular CRM and a roadmap toward AI-assisted workflows.`;export const generateMetadata = buildLocalizedMetadata({path: '/customers/netzero',- title: CASE_STUDY.meta.title,- description: CASE_STUDY.meta.description,+ title: META_TITLE,+ description: META_DESCRIPTION,});type CaseStudyPageProps = {@@ -122,69 +27,123 @@ type CaseStudyPageProps = {export default async function NetZeroCaseStudyPage({params,}: CaseStudyPageProps) {- const [i18n, stats] = await Promise.all([- getRouteI18n(params),- fetchCommunityStats(),- ]);- const renderText = createMessageDescriptorRenderer(i18n);- const menuSocialLinks = mergeSocialLinkLabels(MENU_DATA.socialLinks, stats);- const palette = getCaseStudyPalette('/customers/netzero');+ const i18n = await getRouteI18n(params);- let storySectionIndex = 0;- const sectionBlocks = CASE_STUDY.sections.map((block, index) => {- if (block.type === 'text') {- const sectionId = `case-study-section-${storySectionIndex}`;- storySectionIndex += 1;- return (- <CaseStudy.TextBlock- key={index}- block={block}- isLast={index === CASE_STUDY.sections.length - 1}- renderText={renderText}- sectionId={sectionId}- />- );- }- return (- <CaseStudy.VisualBlock- key={index}- block={block}- isLast={index === CASE_STUDY.sections.length - 1}- />- );- });+ const caseStudy: CaseStudyData = {+ meta: {+ title: META_TITLE,+ description: META_DESCRIPTION,+ },+ hero: {+ readingTime: '8 min',+ title: (+ <Heading as="h1" size="xl" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`A CRM that`)}+ </HeadingPart>+ <br />+ <HeadingPart fontFamily="sans">{i18n._(msg`grows`)}</HeadingPart>{' '}+ <HeadingPart fontFamily="serif">{i18n._(msg`with you`)}</HeadingPart>+ </Heading>+ ),+ author: 'Olivier Reinaud',+ authorAvatarSrc: '/images/partner/testimonials/olivier-reinaud.webp',+ authorRole: msg`Co-founder, NetZero`,+ clientIcon: 'netzero',+ heroImageSrc: PLACEHOLDER_HERO,+ industry: msg`Agribusiness`,+ kpis: [+ { value: msg`3 product lines`, label: msg`On a single CRM` },+ { value: msg`No-code`, label: msg`Customizations` },+ ],+ },+ sections: [+ {+ type: 'text',+ eyebrow: msg`NetZero`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`The right`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`foundation`)}+ </HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`NetZero works with the agro-industry, serving clients from multinationals to smallholder farmers. They sell carbon credits, agricultural products, and franchised industrial systems across three different product lines, multiple countries, and multiple company sizes. When Olivier Reinaud, co-founder of NetZero, started looking at CRMs in late 2024, he was not chasing the most feature-rich platform. He wanted the right foundation.`,+ ],+ callout:+ '"Twenty delivers on what CRMs should have always been: fairly priced software with a fully modular and customizable model, a clean and modern UI, granular permissions, automations, enterprise features. A compelling solution with high potential to rightfully disrupt the CRM market." - Olivier Reinaud, co-founder of NetZero',+ },+ {+ type: 'text',+ eyebrow: msg`Flexibility`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`A business that does not fit a`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">{i18n._(msg`template`)}</HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`What convinced Olivier was the flexibility of the platform and where it was headed. Even when initial needs were basic record-keeping, he still needed a custom data model with granular permissions to manage the wide range of NetZero activities. He also needed a system that could adapt quickly to a fast-iteration company.`,+ msg`With Twenty, when a new need appears, he can address it himself: no developer required, no support ticket.`,+ ],+ callout:+ '"The flexibility is really what made the difference. Our needs evolve very fast. I discover a new need and in two clicks I can address it. That is a real advantage when you are moving quickly." - Olivier Reinaud, co-founder of NetZero',+ },+ {+ type: 'text',+ eyebrow: msg`Roadmap`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`From simple to`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">{i18n._(msg`advanced`)}</HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`Olivier recognizes that NetZero's current use of Twenty is still relatively simple: workflows and integrations are not yet as deep as he eventually wants, because he prioritized getting foundations right first.`,+ msg`What is planned is significant. NetZero has a data lake, online forms, and multiple internal systems that he wants to connect to Twenty. The pipes are there; the next step is automations that tie them together.`,+ msg`What is coming in April 2026 is what he has been waiting for: AI-assisted workflow creation, describing what he needs and iterating from there instead of building complex logic from scratch. For a founder who runs the CRM himself, that changes what is realistically possible.`,+ ],+ },+ {+ type: 'text',+ eyebrow: msg`Results`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`The bet is`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`paying off`)}+ </HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`While NetZero still runs a second CRM in parallel for WhatsApp-heavy operations with farmers in Brazil, they expect to migrate all of it to Twenty as features and the ecosystem grow. Already, their structured, multinational pipeline is powered by Twenty.`,+ msg`The early bet on the architecture is holding, and upcoming AI features are expected to make it even more relevant.`,+ ],+ },+ ],+ tableOfContents: [+ msg`The right foundation`,+ msg`A business that does not fit a template`,+ msg`From simple to advanced`,+ msg`The bet is paying off`,+ ],+ catalogCard: {+ summary: msg`NetZero uses Twenty as a modular CRM across product lines and countries, with a roadmap into AI-assisted workflows.`,+ date: msg`2025`,+ },+ };return (- <>- <Menu.Root- backgroundColor={theme.colors.secondary.background[100]}- scheme="secondary"- navItems={MENU_DATA.navItems}- socialLinks={menuSocialLinks}- >- <Menu.Logo scheme="secondary" />- <Menu.Nav scheme="secondary" navItems={MENU_DATA.navItems} />- <Menu.Social scheme="secondary" socialLinks={menuSocialLinks} />- <Menu.Cta scheme="secondary" />- </Menu.Root>-- <CaseStudy.Hero- dashColor={palette.dashColor}- hero={CASE_STUDY.hero}- hoverDashColor={palette.hoverDashColor}- renderText={renderText}- />-- <CaseStudy.Highlights- industry={CASE_STUDY.hero.industry}- kpis={CASE_STUDY.hero.kpis}- renderText={renderText}- />-- <CaseStudy.Body>{sectionBlocks}</CaseStudy.Body>-- <CaseStudy.SectionNav items={CASE_STUDY.tableOfContents} />- <CustomersCaseStudySignoff renderText={renderText} />- </>+ <CaseStudyPageLayout caseStudy={caseStudy} path="/customers/netzero" />);}diff --git a/packages/twenty-website-new/src/app/[locale]/customers/page.tsx b/packages/twenty-website-new/src/app/[locale]/customers/page.tsxindex 14b668f1af2..0612ce01f23 100644--- a/packages/twenty-website-new/src/app/[locale]/customers/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/customers/page.tsx@@ -1,38 +1,25 @@import { msg } from '@lingui/core/macro';-import { FAQ_DATA } from '@/sections/Faq/data';-import { MENU_DATA } from '@/sections/Menu/data';-import { TRUSTED_BY_DATA } from '@/sections/TrustedBy/data';-import { TalkToUsButton } from '@/lib/contact-cal';+import { Faq, FAQ_QUESTIONS } from '@/sections/Faq';+import { TRUSTED_BY_LOGOS, TrustedBy } from '@/sections/TrustedBy';+import { TalkToUsButton } from '@/sections/ContactCal';import { CASE_STUDY_CATALOG_ENTRIES } from '@/lib/customers';import { Eyebrow, HeadingPart, LinkButton } from '@/design-system/components';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';-import { createMessageDescriptorRenderer } from '@/lib/i18n/create-message-descriptor-renderer';import {getRouteI18n,type LocaleRouteParams,-} from '@/lib/i18n/get-route-i18n';+} from '@/lib/i18n/utils/get-route-i18n';import { Pages } from '@/lib/pages';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';-import { CaseStudyCatalog } from '@/sections/CaseStudyCatalog/components';-import { Faq } from '@/sections/Faq/components';-import { Hero } from '@/sections/Hero/components';-import { Menu } from '@/sections/Menu/components';-import { Signoff } from '@/sections/Signoff/components';-import { TrustedBy } from '@/sections/TrustedBy/components';-import { theme } from '@/theme';+import { CaseStudyCatalog } from '@/sections/CaseStudyCatalog';+import { Hero } from '@/sections/Hero';+import { Menu, MENU_DATA } from '@/sections/Menu';+import { Signoff } from '@/sections/Signoff';import { buildRouteMetadata } from '@/lib/seo';import { css } from '@linaria/core';export const generateMetadata = buildRouteMetadata('customers');-const HERO_BODY = {- text: msg`Real stories from real teams about how they shaped Twenty to fit their workflow and accelerated their growth.`,-};--const SIGNOFF_BODY = {- text: msg`Join the teams that chose to own their CRM.\nStart building with Twenty today.`,-};-const CUSTOMERS_TOP_BACKGROUND_COLOR = '#F4F4F4';const pageRevealClassName = css`@@ -72,7 +59,6 @@ export default async function CaseStudiesCatalogPage({getRouteI18n(params),fetchCommunityStats(),]);- const renderText = createMessageDescriptorRenderer(i18n);const menuSocialLinks = mergeSocialLinkLabels(MENU_DATA.socialLinks, stats);return (@@ -90,71 +76,56 @@ export default async function CaseStudiesCatalogPage({</Menu.Root><div className={pageRevealClassName}>- <Hero.Root backgroundColor={CUSTOMERS_TOP_BACKGROUND_COLOR}>+ <Hero.Root scheme="muted"><Hero.Heading page={Pages.CaseStudies}><HeadingPart fontFamily="serif">- {renderText(msg`See how teams`)}+ {i18n._(msg`See how teams`)}</HeadingPart><br /><HeadingPart fontFamily="serif">- {renderText(msg`build`)}+ {i18n._(msg`build`)}</HeadingPart>{' '}<HeadingPart fontFamily="sans">- {renderText(msg`on Twenty`)}+ {i18n._(msg`on Twenty`)}</HeadingPart></Hero.Heading>- <Hero.Body- body={HERO_BODY}- page={Pages.CaseStudies}- renderText={renderText}- />+ <Hero.Body page={Pages.CaseStudies}>+ {i18n._(+ msg`Real stories from real teams about how they shaped Twenty to fit their workflow and accelerated their growth.`,+ )}+ </Hero.Body></Hero.Root><TrustedBy.RootcardBackgroundColor={CUSTOMERS_TOP_BACKGROUND_COLOR}compactBottom- >- <TrustedBy.Separator- renderText={renderText}- separator={TRUSTED_BY_DATA.separator}- />- <TrustedBy.Logos logos={TRUSTED_BY_DATA.logos} />- <TrustedBy.ClientCount- label={TRUSTED_BY_DATA.clientCountLabel.text}- renderText={renderText}- />- </TrustedBy.Root>+ separator={i18n._(msg`trusted by`)}+ logos={TRUSTED_BY_LOGOS}+ clientCount={i18n._(msg`+10k others`)}+ /></div>- <CaseStudyCatalog.Grid- compactTop- entries={CASE_STUDY_CATALOG_ENTRIES}- renderText={renderText}- />+ <CaseStudyCatalog.Grid compactTop entries={CASE_STUDY_CATALOG_ENTRIES} />- <Signoff.Root- backgroundColor={theme.colors.primary.background[100]}- color={theme.colors.primary.text[100]}- page={Pages.Partners}- >+ <Signoff.Root scheme="light" page={Pages.Partners}><Signoff.Heading page={Pages.Partners}><HeadingPart fontFamily="serif">- {renderText(msg`Ready to build`)}+ {i18n._(msg`Ready to build`)}</HeadingPart><br /><HeadingPart fontFamily="sans">- {renderText(msg`your own story?`)}+ {i18n._(msg`your own story?`)}</HeadingPart></Signoff.Heading>- <Signoff.Body- body={SIGNOFF_BODY}- page={Pages.Partners}- renderText={renderText}- />+ <Signoff.Body page={Pages.Partners}>+ {i18n._(+ msg`Join the teams that chose to own their CRM.\nStart building with Twenty today.`,+ )}+ </Signoff.Body><Signoff.Cta><LinkButtoncolor="secondary"href="https://app.twenty.com/welcome"- label={renderText(msg`Get started`)}+ label={i18n._(msg`Get started`)}variant="contained"/><TalkToUsButton@@ -167,25 +138,25 @@ export default async function CaseStudiesCatalogPage({<Faq.Root><Faq.Intro>- <Eyebrow- colorScheme="secondary"- heading={FAQ_DATA.eyebrow.heading}- renderText={renderText}- />+ <Eyebrow colorScheme="secondary">+ <HeadingPart fontFamily="sans">+ {i18n._(msg`Any Questions?`)}+ </HeadingPart>+ </Eyebrow><Faq.Heading><HeadingPart fontFamily="serif">- {renderText(msg`Stop fighting custom.`)}+ {i18n._(msg`Stop fighting custom.`)}</HeadingPart><br /><HeadingPart fontFamily="sans">- {renderText(msg`Start building, with Twenty`)}+ {i18n._(msg`Start building, with Twenty`)}</HeadingPart></Faq.Heading><Faq.Cta><LinkButtoncolor="primary"href="https://app.twenty.com/welcome"- label={renderText(msg`Get started`)}+ label={i18n._(msg`Get started`)}variant="contained"/><TalkToUsButton@@ -195,7 +166,7 @@ export default async function CaseStudiesCatalogPage({/></Faq.Cta></Faq.Intro>- <Faq.Items questions={FAQ_DATA.questions} />+ <Faq.Items questions={FAQ_QUESTIONS} /></Faq.Root></>);diff --git a/packages/twenty-website-new/src/app/[locale]/customers/w3villa/page.tsx b/packages/twenty-website-new/src/app/[locale]/customers/w3villa/page.tsxindex 0314103f803..6ae28840765 100644--- a/packages/twenty-website-new/src/app/[locale]/customers/w3villa/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/customers/w3villa/page.tsx@@ -1,117 +1,23 @@import { msg } from '@lingui/core/macro';-import { MENU_DATA } from '@/sections/Menu/data';-import { CustomersCaseStudySignoff } from '@/app/[locale]/customers/_components/CustomersCaseStudySignoff';-import { getCaseStudyPalette, type CaseStudyData } from '@/lib/customers';-import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';-import { createMessageDescriptorRenderer } from '@/lib/i18n/create-message-descriptor-renderer';+import { type CaseStudyData } from '@/lib/customers';import {getRouteI18n,type LocaleRouteParams,-} from '@/lib/i18n/get-route-i18n';-import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';-import { CaseStudy } from '@/sections/CaseStudy/components';-import { Menu } from '@/sections/Menu/components';-import { theme } from '@/theme';+} from '@/lib/i18n/utils/get-route-i18n';import { buildLocalizedMetadata } from '@/lib/seo';+import { Heading, HeadingPart } from '@/design-system/components';+import { CaseStudyPageLayout } from '@/app/[locale]/customers/_components/CaseStudyPageLayout';const PLACEHOLDER_HERO ='https://images.unsplash.com/photo-1756830231350-3b501f63c5c1?w=1600&q=80';-const CASE_STUDY: CaseStudyData = {- meta: {- title: msg`When your CRM is the product: W3Grads on Twenty | W3villa Technologies`,- description: msg`How W3villa Technologies shipped W3Grads, an AI mock interview platform for institutions, on Twenty as the operational backbone.`,- },- hero: {- readingTime: '8 min',- title: [- { text: msg`When your CRM is`, fontFamily: 'serif' },- { text: msg`the product`, fontFamily: 'sans', newLine: true },- ],- author: 'Amrendra Pratap Singh',- authorAvatarSrc: '/images/partner/testimonials/amrendra-singh.webp',- authorRole: msg`VP of Engineering, W3villa Technologies`,- clientIcon: 'w3villa',- heroImageSrc: PLACEHOLDER_HERO,- industry: msg`EdTech`,- kpis: [{ value: msg`Zero`, label: msg`Manual work at core` }],- },- sections: [- {- type: 'text',- eyebrow: msg`W3Grads`,- heading: [- { text: msg`Scale without`, fontFamily: 'serif' },- { text: msg`breaking operations`, fontFamily: 'sans' },- ],- paragraphs: [- msg`Running mock interview programs for hundreds of students sounds straightforward. In practice, universities and training institutes hit the same wall: registrations entered by hand, interview links sent one by one, faculty reviewing every session without scoring or classification. At real scale, it breaks.`,- msg`W3villa Technologies set out to solve it properly, not with a workaround, but with a product.`,- ],- callout:- '"We did not want to patch over the problem. We wanted to build something institutions could rely on at scale, and that meant starting from a foundation solid enough to support the full complexity of what we had in mind." - Amrendra Pratap Singh, VP of Engineering, W3villa Technologies',- },- {- type: 'text',- eyebrow: msg`Architecture`,- heading: [- {- text: msg`Focus on the use case, not the`,- fontFamily: 'serif',- },- { text: msg`plumbing`, fontFamily: 'sans' },- ],- paragraphs: [- msg`W3villa built W3Grads (w3grads.com), an AI-powered mock interview platform for universities and training institutes, using Twenty as its operational backbone.`,- msg`The key decision was not to build everything from scratch. Twenty covers the data model, permissions, authentication, and workflow engine, the parts that would have taken months to rebuild, so the team could focus on product-specific logic.`,- msg`When a student registers via QR at a campus event, the system assigns a plan, generates an interview session, and sends a link. The AI conducts the interview, scores the candidate, and classifies the result. Faculty see where each student stands without manually reviewing every session. Building and iterating on these workflows was faster with AI in the loop.`,- ],- },- {- type: 'text',- eyebrow: msg`Scale`,- heading: [- {- text: msg`A platform ready to`,- fontFamily: 'serif',- },- { text: msg`grow`, fontFamily: 'sans' },- ],- paragraphs: [- msg`Because the foundation is solid, W3Grads is architected for what comes next, including a payment layer for future paid interview plans and nationwide scale without structural rewrites.`,- ],- callout:- '"Twenty gave us the flexibility to model the entire interview lifecycle as custom objects and workflows. We could build something genuinely complex without fighting the platform to do it." - Piyush Khandelwal, Director, W3villa Technologies, Partner',- },- {- type: 'text',- eyebrow: msg`The result`,- heading: [- { text: msg`Zero manual work`, fontFamily: 'sans' },- { text: msg`at the core`, fontFamily: 'serif' },- ],- paragraphs: [- msg`Programs that previously needed heavy manual coordination now run end-to-end with automation. Institutions get a scalable, intelligent system; students get faster preparation for interviews that matter; W3villa shipped a product institutions can build revenue around.`,- msg`Zero manual work at the core. Full automation. Built on Twenty.`,- ],- },- ],- tableOfContents: [- msg`Scale without breaking operations`,- msg`Focus on the use case, not the plumbing`,- msg`A platform ready to grow`,- msg`The result`,- ],- catalogCard: {- summary: msg`W3villa shipped W3Grads on Twenty for AI interviews, scoring, and institution-scale workflows without rebuilding CRM plumbing.`,- date: msg`2025`,- },-};+const META_TITLE = msg`When your CRM is the product: W3Grads on Twenty | W3villa Technologies`;+const META_DESCRIPTION = msg`How W3villa Technologies shipped W3Grads, an AI mock interview platform for institutions, on Twenty as the operational backbone.`;export const generateMetadata = buildLocalizedMetadata({path: '/customers/w3villa',- title: CASE_STUDY.meta.title,- description: CASE_STUDY.meta.description,+ title: META_TITLE,+ description: META_DESCRIPTION,});type CaseStudyPageProps = {@@ -121,69 +27,121 @@ type CaseStudyPageProps = {export default async function W3villaCaseStudyPage({params,}: CaseStudyPageProps) {- const [i18n, stats] = await Promise.all([- getRouteI18n(params),- fetchCommunityStats(),- ]);- const renderText = createMessageDescriptorRenderer(i18n);- const menuSocialLinks = mergeSocialLinkLabels(MENU_DATA.socialLinks, stats);- const palette = getCaseStudyPalette('/customers/w3villa');+ const i18n = await getRouteI18n(params);- let storySectionIndex = 0;- const sectionBlocks = CASE_STUDY.sections.map((block, index) => {- if (block.type === 'text') {- const sectionId = `case-study-section-${storySectionIndex}`;- storySectionIndex += 1;- return (- <CaseStudy.TextBlock- key={index}- block={block}- isLast={index === CASE_STUDY.sections.length - 1}- renderText={renderText}- sectionId={sectionId}- />- );- }- return (- <CaseStudy.VisualBlock- key={index}- block={block}- isLast={index === CASE_STUDY.sections.length - 1}- />- );- });+ const caseStudy: CaseStudyData = {+ meta: {+ title: META_TITLE,+ description: META_DESCRIPTION,+ },+ hero: {+ readingTime: '8 min',+ title: (+ <Heading as="h1" size="xl" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`When your CRM is`)}+ </HeadingPart>+ <br />+ <HeadingPart fontFamily="sans">+ {i18n._(msg`the product`)}+ </HeadingPart>+ </Heading>+ ),+ author: 'Amrendra Pratap Singh',+ authorAvatarSrc: '/images/partner/testimonials/amrendra-singh.webp',+ authorRole: msg`VP of Engineering, W3villa Technologies`,+ clientIcon: 'w3villa',+ heroImageSrc: PLACEHOLDER_HERO,+ industry: msg`EdTech`,+ kpis: [{ value: msg`Zero`, label: msg`Manual work at core` }],+ },+ sections: [+ {+ type: 'text',+ eyebrow: msg`W3Grads`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`Scale without`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`breaking operations`)}+ </HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`Running mock interview programs for hundreds of students sounds straightforward. In practice, universities and training institutes hit the same wall: registrations entered by hand, interview links sent one by one, faculty reviewing every session without scoring or classification. At real scale, it breaks.`,+ msg`W3villa Technologies set out to solve it properly, not with a workaround, but with a product.`,+ ],+ callout:+ '"We did not want to patch over the problem. We wanted to build something institutions could rely on at scale, and that meant starting from a foundation solid enough to support the full complexity of what we had in mind." - Amrendra Pratap Singh, VP of Engineering, W3villa Technologies',+ },+ {+ type: 'text',+ eyebrow: msg`Architecture`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`Focus on the use case, not the`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">{i18n._(msg`plumbing`)}</HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`W3villa built W3Grads (w3grads.com), an AI-powered mock interview platform for universities and training institutes, using Twenty as its operational backbone.`,+ msg`The key decision was not to build everything from scratch. Twenty covers the data model, permissions, authentication, and workflow engine, the parts that would have taken months to rebuild, so the team could focus on product-specific logic.`,+ msg`When a student registers via QR at a campus event, the system assigns a plan, generates an interview session, and sends a link. The AI conducts the interview, scores the candidate, and classifies the result. Faculty see where each student stands without manually reviewing every session. Building and iterating on these workflows was faster with AI in the loop.`,+ ],+ },+ {+ type: 'text',+ eyebrow: msg`Scale`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`A platform ready to`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">{i18n._(msg`grow`)}</HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`Because the foundation is solid, W3Grads is architected for what comes next, including a payment layer for future paid interview plans and nationwide scale without structural rewrites.`,+ ],+ callout:+ '"Twenty gave us the flexibility to model the entire interview lifecycle as custom objects and workflows. We could build something genuinely complex without fighting the platform to do it." - Piyush Khandelwal, Director, W3villa Technologies, Partner',+ },+ {+ type: 'text',+ eyebrow: msg`The result`,+ heading: (+ <Heading size="md" weight="light">+ <HeadingPart fontFamily="sans">+ {i18n._(msg`Zero manual work`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="serif">+ {i18n._(msg`at the core`)}+ </HeadingPart>+ </Heading>+ ),+ paragraphs: [+ msg`Programs that previously needed heavy manual coordination now run end-to-end with automation. Institutions get a scalable, intelligent system; students get faster preparation for interviews that matter; W3villa shipped a product institutions can build revenue around.`,+ msg`Zero manual work at the core. Full automation. Built on Twenty.`,+ ],+ },+ ],+ tableOfContents: [+ msg`Scale without breaking operations`,+ msg`Focus on the use case, not the plumbing`,+ msg`A platform ready to grow`,+ msg`The result`,+ ],+ catalogCard: {+ summary: msg`W3villa shipped W3Grads on Twenty for AI interviews, scoring, and institution-scale workflows without rebuilding CRM plumbing.`,+ date: msg`2025`,+ },+ };return (- <>- <Menu.Root- backgroundColor={theme.colors.secondary.background[100]}- scheme="secondary"- navItems={MENU_DATA.navItems}- socialLinks={menuSocialLinks}- >- <Menu.Logo scheme="secondary" />- <Menu.Nav scheme="secondary" navItems={MENU_DATA.navItems} />- <Menu.Social scheme="secondary" socialLinks={menuSocialLinks} />- <Menu.Cta scheme="secondary" />- </Menu.Root>-- <CaseStudy.Hero- dashColor={palette.dashColor}- hero={CASE_STUDY.hero}- hoverDashColor={palette.hoverDashColor}- renderText={renderText}- />-- <CaseStudy.Highlights- industry={CASE_STUDY.hero.industry}- kpis={CASE_STUDY.hero.kpis}- renderText={renderText}- />-- <CaseStudy.Body>{sectionBlocks}</CaseStudy.Body>-- <CaseStudy.SectionNav items={CASE_STUDY.tableOfContents} />- <CustomersCaseStudySignoff renderText={renderText} />- </>+ <CaseStudyPageLayout caseStudy={caseStudy} path="/customers/w3villa" />);}diff --git a/packages/twenty-website-new/src/app/[locale]/enterprise/activate/EnterpriseActivateClient.tsx b/packages/twenty-website-new/src/app/[locale]/enterprise/activate/EnterpriseActivateClient.tsxindex 27ef2657920..bd02d9ffe8e 100644--- a/packages/twenty-website-new/src/app/[locale]/enterprise/activate/EnterpriseActivateClient.tsx+++ b/packages/twenty-website-new/src/app/[locale]/enterprise/activate/EnterpriseActivateClient.tsx@@ -5,20 +5,16 @@ import {BaseButton,buttonBaseStyles,} from '@/design-system/components/Button/BaseButton';-import { Body, Heading } from '@/design-system/components';-import { useRenderMessage } from '@/lib/i18n/use-render-message';+import { Body, Heading, HeadingPart } from '@/design-system/components';+import { useLingui } from '@lingui/react';import { useTimeoutRegistry } from '@/lib/react';import { theme } from '@/theme';import { css } from '@linaria/core';import { styled } from '@linaria/react';import { useSearchParams } from 'next/navigation';-import { useEffect, useState } from 'react';+import { useState } from 'react';-type ActivationResult = {- enterpriseKey: string;- licensee: string;- subscriptionId: string;-};+import { useEnterpriseActivation } from './use-enterprise-activation';const ContentStack = styled.div`display: flex;@@ -140,73 +136,13 @@ const nextStepItemClassName = css``;export function EnterpriseActivateClient() {- const renderText = useRenderMessage();+ const { i18n } = useLingui();const searchParams = useSearchParams();const sessionId = searchParams.get('session_id');const timeoutRegistry = useTimeoutRegistry();- const [result, setResult] = useState<ActivationResult | null>(null);- const [error, setError] = useState<string | null>(null);- const [loading, setLoading] = useState(true);+ const { result, error, loading } = useEnterpriseActivation(sessionId);const [copied, setCopied] = useState(false);- useEffect(() => {- if (!sessionId) {- setError('No session ID provided. Please complete the checkout first.');- setLoading(false);-- return;- }-- const abortController = new AbortController();-- const activate = async () => {- try {- const response = await fetch(- `/api/enterprise/activate?session_id=${encodeURIComponent(sessionId)}`,- { signal: abortController.signal },- );- const data: { error?: string } & Partial<ActivationResult> =- await response.json();-- if (abortController.signal.aborted) {- return;- }-- if (!response.ok) {- setError(data.error ?? 'Activation failed');-- return;- }-- if (data.enterpriseKey && data.licensee && data.subscriptionId) {- setResult({- enterpriseKey: data.enterpriseKey,- licensee: data.licensee,- subscriptionId: data.subscriptionId,- });- } else {- setError('Activation response was incomplete.');- }- } catch {- if (abortController.signal.aborted) {- return;- }-- setError('Failed to activate enterprise key. Please try again.');- } finally {- if (!abortController.signal.aborted) {- setLoading(false);- }- }- };-- void activate();-- return () => {- abortController.abort();- };- }, [sessionId]);-const handleCopy = async () => {if (!result) {return;@@ -222,55 +158,39 @@ export function EnterpriseActivateClient() {return (<ContentStack>{loading && (- <Body- body={{ text: msg`Activating your enterprise license…` }}- renderText={renderText}- size="sm"- variant="body-paragraph"- />+ <Body size="sm" variant="body-paragraph">+ {i18n._(msg`Activating your enterprise license…`)}+ </Body>)}{error !== null && <ErrorBox>{error}</ErrorBox>}{result !== null && (<>- <Body- body={{- text: msg`Your enterprise license has been activated successfully.`,- }}- className={successLeadClassName}- renderText={renderText}- size="md"- weight="medium"- />+ <Body className={successLeadClassName} size="md" weight="medium">+ {i18n._(+ msg`Your enterprise license has been activated successfully.`,+ )}+ </Body><LicenseeRow>- <Body- as="span"- body={{ text: msg`Licensee:` }}- renderText={renderText}- size="sm"- weight="medium"- />{' '}+ <Body as="span" size="sm" weight="medium">+ {i18n._(msg`Licensee:`)}+ </Body>{' '}<LicenseeValue>{result.licensee}</LicenseeValue></LicenseeRow><KeySection>- <Heading- as="h2"- renderText={renderText}- segments={{ fontFamily: 'sans', text: msg`Your enterprise key` }}- size="xs"- weight="medium"- />- <Body- body={{- text: msg`Copy this key and paste it into your Twenty self-hosted instance settings.`,- }}- renderText={renderText}- size="sm"- variant="body-paragraph"- />+ <Heading as="h2" size="xs" weight="medium">+ <HeadingPart fontFamily="sans">+ {i18n._(msg`Your enterprise key`)}+ </HeadingPart>+ </Heading>+ <Body size="sm" variant="body-paragraph">+ {i18n._(+ msg`Copy this key and paste it into your Twenty self-hosted instance settings.`,+ )}+ </Body><KeyBlock>{result.enterpriseKey}@@ -284,7 +204,7 @@ export function EnterpriseActivateClient() {><BaseButtoncolor="primary"- label={renderText(copied ? msg`Copied!` : msg`Copy`)}+ label={i18n._(copied ? msg`Copied!` : msg`Copy`)}size="small"variant="contained"/>@@ -293,36 +213,28 @@ export function EnterpriseActivateClient() {</KeySection><NextStepsBox>- <Heading- as="h3"- renderText={renderText}- segments={{ fontFamily: 'sans', text: msg`Next steps` }}- size="xs"- weight="medium"- />+ <Heading as="h3" size="xs" weight="medium">+ <HeadingPart fontFamily="sans">+ {i18n._(msg`Next steps`)}+ </HeadingPart>+ </Heading><NextStepsList><li className={nextStepItemClassName}>- <Body- body={{ text: msg`Copy the enterprise key above.` }}- renderText={renderText}- size="sm"- />+ <Body size="sm">+ {i18n._(msg`Copy the enterprise key above.`)}+ </Body></li><li className={nextStepItemClassName}>- <Body- body={{- text: msg`Open your Twenty self-hosted instance Settings → Enterprise.`,- }}- renderText={renderText}- size="sm"- />+ <Body size="sm">+ {i18n._(+ msg`Open your Twenty self-hosted instance Settings → Enterprise.`,+ )}+ </Body></li><li className={nextStepItemClassName}>- <Body- body={{ text: msg`Paste the key and click Activate.` }}- renderText={renderText}- size="sm"- />+ <Body size="sm">+ {i18n._(msg`Paste the key and click Activate.`)}+ </Body></li></NextStepsList></NextStepsBox>diff --git a/packages/twenty-website-new/src/app/[locale]/enterprise/activate/page.tsx b/packages/twenty-website-new/src/app/[locale]/enterprise/activate/page.tsxindex c53a9edad74..dceb0398818 100644--- a/packages/twenty-website-new/src/app/[locale]/enterprise/activate/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/enterprise/activate/page.tsx@@ -1,5 +1,4 @@import { msg } from '@lingui/core/macro';-import { MENU_DATA } from '@/sections/Menu/data';import { EnterpriseActivateClient } from '@/app/[locale]/enterprise/activate/EnterpriseActivateClient';import {Body,@@ -8,15 +7,14 @@ import {HeadingPart,} from '@/design-system/components';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';-import { createMessageDescriptorRenderer } from '@/lib/i18n/create-message-descriptor-renderer';import {getRouteI18n,type LocaleRouteParams,-} from '@/lib/i18n/get-route-i18n';+} from '@/lib/i18n/utils/get-route-i18n';import { Pages } from '@/lib/pages';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';-import { Hero } from '@/sections/Hero/components';-import { Menu } from '@/sections/Menu/components';+import { Hero } from '@/sections/Hero';+import { Menu, MENU_DATA } from '@/sections/Menu';import { theme } from '@/theme';import { buildRouteMetadata } from '@/lib/seo';import { Suspense } from 'react';@@ -24,10 +22,6 @@ import { styled } from '@linaria/react';export const generateMetadata = buildRouteMetadata('enterpriseActivate');-const ENTERPRISE_ACTIVATE_BODY = {- text: msg`Your checkout is complete. Follow the steps below to copy your license key into your Twenty instance.`,-};-const ActivatePageContent = styled.section`background-color: ${theme.colors.primary.background[100]};flex: 1;@@ -51,7 +45,9 @@ function EnterpriseActivateFallback({loadingLabel,}: EnterpriseActivateFallbackProps) {return (- <Body body={{ text: loadingLabel }} size="sm" variant="body-paragraph" />+ <Body size="sm" variant="body-paragraph">+ {loadingLabel}+ </Body>);}@@ -66,7 +62,6 @@ export default async function EnterpriseActivatePage({getRouteI18n(params),fetchCommunityStats(),]);- const renderText = createMessageDescriptorRenderer(i18n);const menuSocialLinks = mergeSocialLinkLabels(MENU_DATA.socialLinks, stats);return (@@ -83,28 +78,23 @@ export default async function EnterpriseActivatePage({<Menu.Cta scheme="primary" /></Menu.Root>- <Hero.Root- backgroundColor={theme.colors.secondary.background[5]}- colorScheme="primary"- >- <Eyebrow- colorScheme="primary"- heading={{ text: msg`Self-hosting`, fontFamily: 'sans' }}- renderText={renderText}- />+ <Hero.Root scheme="muted">+ <Eyebrow>+ <HeadingPart fontFamily="sans">+ {i18n._(msg`Self-hosting`)}+ </HeadingPart>+ </Eyebrow><Hero.Heading page={Pages.Pricing}><HeadingPart fontFamily="serif">- {renderText(msg`Enterprise`)}+ {i18n._(msg`Enterprise`)}</HeadingPart>{' '}- <HeadingPart fontFamily="sans">- {renderText(msg`activation`)}- </HeadingPart>+ <HeadingPart fontFamily="sans">{i18n._(msg`activation`)}</HeadingPart></Hero.Heading>- <Hero.Body- body={ENTERPRISE_ACTIVATE_BODY}- page={Pages.Pricing}- renderText={renderText}- />+ <Hero.Body page={Pages.Pricing}>+ {i18n._(+ msg`Your checkout is complete. Follow the steps below to copy your license key into your Twenty instance.`,+ )}+ </Hero.Body></Hero.Root><ActivatePageContent>@@ -113,7 +103,7 @@ export default async function EnterpriseActivatePage({<Suspensefallback={<EnterpriseActivateFallback- loadingLabel={renderText(msg`Loading activation…`)}+ loadingLabel={i18n._(msg`Loading activation…`)}/>}>diff --git a/packages/twenty-website-new/src/app/[locale]/enterprise/activate/use-enterprise-activation.ts b/packages/twenty-website-new/src/app/[locale]/enterprise/activate/use-enterprise-activation.tsnew file mode 100644index 00000000000..7f0fc554469--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/enterprise/activate/use-enterprise-activation.ts@@ -0,0 +1,80 @@+'use client';++import { useEffect, useState } from 'react';++type ActivationResult = {+ enterpriseKey: string;+ licensee: string;+ subscriptionId: string;+};++type EnterpriseActivationState = {+ error: string | null;+ loading: boolean;+ result: ActivationResult | null;+};++export function useEnterpriseActivation(+ sessionId: string | null,+): EnterpriseActivationState {+ const [result, setResult] = useState<ActivationResult | null>(null);+ const [error, setError] = useState<string | null>(null);+ const [loading, setLoading] = useState(true);++ useEffect(() => {+ if (!sessionId) {+ setError('No session ID provided. Please complete the checkout first.');+ setLoading(false);+ return;+ }++ const abortController = new AbortController();++ const activate = async () => {+ try {+ const response = await fetch(+ `/api/enterprise/activate?session_id=${encodeURIComponent(sessionId)}`,+ { signal: abortController.signal },+ );+ const data: { error?: string } & Partial<ActivationResult> =+ await response.json();++ if (abortController.signal.aborted) {+ return;+ }++ if (!response.ok) {+ setError(data.error ?? 'Activation failed');+ return;+ }++ if (data.enterpriseKey && data.licensee && data.subscriptionId) {+ setResult({+ enterpriseKey: data.enterpriseKey,+ licensee: data.licensee,+ subscriptionId: data.subscriptionId,+ });+ } else {+ setError('Activation response was incomplete.');+ }+ } catch {+ if (abortController.signal.aborted) {+ return;+ }+ setError('Failed to activate enterprise key. Please try again.');+ } finally {+ if (!abortController.signal.aborted) {+ setLoading(false);+ }+ }+ };++ void activate();++ return () => {+ abortController.abort();+ };+ }, [sessionId]);++ return { error, loading, result };+}diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/ControlsPanel.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/ControlsPanel.tsxindex 223715f7175..25d39e1b8e0 100644--- a/packages/twenty-website-new/src/app/[locale]/halftone/_components/ControlsPanel.tsx+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/ControlsPanel.tsx@@ -1,7 +1,7 @@'use client';-import type { ReactExportSettings } from '@/app/[locale]/halftone/_lib/exporters';-import { IconLayoutSidebarRightCollapse, IconShare } from '@tabler/icons-react';+import type { ReactExportSettings } from '@/lib/halftone/utils/exporters';+import { IconLayoutSidebarRightCollapse } from '@tabler/icons-react';import { styled } from '@linaria/react';import type {HalftoneBackgroundSettings,@@ -9,7 +9,7 @@ import type {HalftoneSourceMode,HalftoneStudioSettings,HalftoneTabId,-} from '@/lib/halftone/state';+} from '@/lib/halftone/utils/state';import { AnimationsTab } from './controls/AnimationsTab';import { DesignTab } from './controls/DesignTab';import { ExportTab } from './controls/ExportTab';@@ -25,7 +25,6 @@ type ControlsPanelProps = {value: Partial<HalftoneStudioSettings['animation']>,) => void;onBackgroundChange: (value: Partial<HalftoneBackgroundSettings>) => void;- onCopyShareLink: () => void;onDashColorChange: (value: string) => void;onHoverDashColorChange: (value: string) => void;onCopyHalftoneImage: (width: number, height: number) => void;@@ -133,7 +132,6 @@ export function ControlsPanel({imageFileName,onAnimationSettingsChange,onBackgroundChange,- onCopyShareLink,onDashColorChange,onHoverDashColorChange,onCopyHalftoneImage,@@ -184,14 +182,6 @@ export function ControlsPanel({</TabsGroup>) : null}<PanelActions>- <PanelActionButton- aria-label="Copy share link"- onClick={onCopyShareLink}- title="Copy share link"- type="button"- >- <IconShare aria-hidden size={16} stroke={TABLER_STROKE} />- </PanelActionButton><PanelToggleTabButton$collapsed={!visible}aria-expanded={visible}diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/HalftoneStudio.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/HalftoneStudio.tsxindex 34b1f18f207..b1170492d83 100644--- a/packages/twenty-website-new/src/app/[locale]/halftone/_components/HalftoneStudio.tsx+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/HalftoneStudio.tsx@@ -9,24 +9,14 @@ import {getExportedModelFile,parseExportedPreset,type ReactExportSettings,-} from '@/app/[locale]/halftone/_lib/exporters';-import { resolveExportArtifactNames } from '@/app/[locale]/halftone/_lib/exportNames';-import { generateImageHalftoneSvg } from '@/app/[locale]/halftone/_lib/imageSvgExport';-import {- buildShareUrl,- decodeShareState,- encodeShareState,-} from '@/app/[locale]/halftone/_lib/share';+} from '@/lib/halftone/utils/exporters';+import { resolveExportArtifactNames } from '@/lib/halftone/utils/export-names';+import { generateImageHalftoneSvg } from '@/lib/halftone/utils/image-svg-export';import {HalftoneCanvas,type HalftoneSnapshotFn,-} from '@/lib/halftone/halftone-canvas';-import { REFERENCE_PREVIEW_DISTANCE } from '@/lib/halftone/footprint';-import {- createFallbackGeometry,- disposeGeometryCache,- getGeometryForSpec,-} from '@/lib/halftone/geometry-registry';+} from '@/lib/halftone/components/HalftoneCanvas';+import { REFERENCE_PREVIEW_DISTANCE } from '@/lib/halftone/utils/footprint';import {DEFAULT_IMAGE_HALFTONE_SETTINGS,DEFAULT_SHAPE_HALFTONE_SETTINGS,@@ -37,12 +27,10 @@ import {type HalftoneModelLoader,type HalftoneSourceMode,normalizeHalftoneStudioSettings,-} from '@/lib/halftone/state';+} from '@/lib/halftone/utils/state';import { Logo as LogoIcon } from '@/icons';-import { LocalizedLink } from '@/lib/i18n';import { useTimeoutRegistry } from '@/lib/react';import { theme } from '@/theme';-import { styled } from '@linaria/react';import {useCallback,useEffect,@@ -51,142 +39,30 @@ import {useRef,useState,} from 'react';-import type * as THREE from 'three';--type GeometryCacheEntry = THREE.BufferGeometry | Promise<THREE.BufferGeometry>;-const DESKTOP_CONTROLS_PANEL_WIDTH = 320;-const DESKTOP_CONTROLS_PANEL_OFFSET = 20;-const DESKTOP_CONTROLS_PANEL_FOOTPRINT =- DESKTOP_CONTROLS_PANEL_WIDTH + DESKTOP_CONTROLS_PANEL_OFFSET;-const STATUS_CLEAR_DELAY_MS = 2000;-const StudioShell = styled.div<{ $background: string }>`- background: ${(props) => props.$background};- /* Full-screen tool: track the visible viewport so the bottom controls bar- * is reachable on mobile Safari (where 100vh extends behind the URL bar). */- height: 100vh;- height: 100dvh;- overflow: hidden;- position: relative;- width: 100%;-`;--const ContentRegion = styled.div<{ $panelOpen: boolean }>`- height: 100%;- margin-right: auto;- position: relative;- transition: width 0.18s ease;- width: ${(props) =>- props.$panelOpen- ? `calc(100% - ${DESKTOP_CONTROLS_PANEL_FOOTPRINT}px)`- : '100%'};-- @media (max-width: ${theme.breakpoints.md - 1}px) {- width: 100%;- }-`;--const CanvasLayer = styled.div`- height: 100%;- width: 100%;-`;--const LogoLink = styled(LocalizedLink)`- display: grid;- left: 24px;- position: absolute;- top: 24px;- z-index: 2;-`;--const Hint = styled.div<{ $tone: 'dark' | 'light'; $visible: boolean }>`- color: ${(props) =>- props.$tone === 'dark'- ? 'rgba(255, 255, 255, 0.34)'- : 'rgba(0, 0, 0, 0.3)'};- font-family: ${theme.font.family.mono};- font-size: 11px;- left: 50%;- opacity: ${(props) => (props.$visible ? 1 : 0)};- pointer-events: none;- position: absolute;- top: 20px;- transform: translateX(-50%);- transition: opacity 0.3s ease;- z-index: 1;-`;--const Status = styled.div<{- $error: boolean;- $tone: 'dark' | 'light';- $visible: boolean;-}>`- color: ${(props) => {- if (props.$error) {- return 'rgba(214, 66, 66, 0.92)';- }+import { CopyHalftoneShortcutEffect } from './effect-components/CopyHalftoneShortcutEffect';+import { PasteImageEffect } from './effect-components/PasteImageEffect';+import { useDefaultHalftoneImage } from '../_hooks/use-default-halftone-image';+import { useGeometryLoader } from '../_hooks/use-geometry-loader';+import { useImageElement } from '../_hooks/use-image-element';- return props.$tone === 'dark'- ? 'rgba(255, 255, 255, 0.62)'- : 'rgba(0, 0, 0, 0.55)';- }};- font-family: ${theme.font.family.mono};- font-size: 11px;- left: 50%;- opacity: ${(props) => (props.$visible ? 1 : 0)};- pointer-events: none;- position: absolute;- top: 44px;- transform: translateX(-50%);- transition: opacity 0.2s ease;- z-index: 1;-`;--const ControlsPositioner = styled.div`- align-items: flex-start;- bottom: 20px;- display: flex;- height: calc(100vh - 40px);- height: calc(100dvh - 40px);- justify-content: flex-end;- pointer-events: none;- position: fixed;- right: 20px;- top: 20px;- z-index: 3;-- @media (max-width: ${theme.breakpoints.md - 1}px) {- bottom: 16px;- height: 48vh;- left: 16px;- right: 16px;- top: auto;- }-`;--const ControlsPanelFrame = styled.div<{ $visible: boolean }>`- height: ${(props) => (props.$visible ? '100%' : 'auto')};- pointer-events: auto;- @media (max-width: ${theme.breakpoints.md - 1}px) {- width: ${(props) => (props.$visible ? '100%' : 'auto')};- }-`;+import {+ CanvasLayer,+ ContentRegion,+ ControlsPanelFrame,+ ControlsPositioner,+ HiddenFileInput,+ Hint,+ LogoLink,+ Status,+ StudioShell,+} from './halftone-studio.styles';-const HiddenFileInput = styled.input`- display: none;-`;+const STATUS_CLEAR_DELAY_MS = 2000;const DEFAULT_PREVIEW_DISTANCE = 6;const DEFAULT_IMAGE_ASSET_PATH = '/images/shared/halftone/twenty-logo.svg';const DEFAULT_IMAGE_FILENAME = 'twenty-logo.svg';-const CLIPBOARD_IMAGE_EXTENSION_BY_MIME: Record<string, string> = {- 'image/bmp': '.bmp',- 'image/gif': '.gif',- 'image/jpeg': '.jpg',- 'image/png': '.png',- 'image/svg+xml': '.svg',- 'image/webp': '.webp',-};type PendingFilePicker = {resolve: (file: File | null) => void;};@@ -239,42 +115,6 @@ function getAssetFilenameFromUrl(assetUrl: string, fallbackFilename: string) {: fallbackFilename;}-function isEditablePasteTarget(target: EventTarget | null) {- if (!(target instanceof HTMLElement)) {- return false;- }-- return (- target.isContentEditable ||- target instanceof HTMLInputElement ||- target instanceof HTMLTextAreaElement ||- target.closest('[contenteditable=""], [contenteditable="true"]') !== null- );-}--function createPastedImageFile(file: File) {- const hasExtension = /\.[^.]+$/i.test(file.name);-- if (hasExtension) {- return file;- }-- const extension =- CLIPBOARD_IMAGE_EXTENSION_BY_MIME[file.type] ??- CLIPBOARD_IMAGE_EXTENSION_BY_MIME['image/png'];-- return new File([file], `pasted-image-${Date.now()}${extension}`, {- type: file.type || 'image/png',- lastModified: Date.now(),- });-}--function hasTextSelection() {- const selection = window.getSelection();-- return selection !== null && selection.toString().trim().length > 0;-}-function createInitialExportPose(): HalftoneExportPose {return {autoElapsed: 0,@@ -358,18 +198,12 @@ export function HalftoneStudio() {const [previewDistance, setPreviewDistance] = useState(DEFAULT_PREVIEW_DISTANCE,);- const [activeGeometry, setActiveGeometry] = useState<THREE.BufferGeometry>(- () => createFallbackGeometry(),- );const [exportBackground, setExportBackground] = useState(false);const [exportName, setExportName] = useState('');const [reactExportSettings, setReactExportSettings] =useState<ReactExportSettings>(DEFAULT_REACT_EXPORT_SETTINGS);const [reactAssetPublicUrl, setReactAssetPublicUrl] = useState('');const [imageFile, setImageFile] = useState<File | null>(null);- const [imageElement, setImageElement] = useState<HTMLImageElement | null>(- null,- );const [canvasInitialPose, setCanvasInitialPose] =useState<HalftoneExportPose>();const defaultImageFileReference = useRef<File | null>(null);@@ -380,10 +214,6 @@ export function HalftoneStudio() {const presetFileInputReference = useRef<HTMLInputElement>(null);const pendingFilePickerReference = useRef<PendingFilePicker | null>(null);const pendingPresetPickerReference = useRef<PendingPresetPicker | null>(null);- const geometryCacheReference = useRef<Map<string, GeometryCacheEntry>>(- new Map([['torusKnot', activeGeometry]]),- );- const lastSuccessfulShapeReference = useRef(state.settings.shapeKey);const exportPoseReference = useRef<HalftoneExportPose>(createInitialExportPose(),);@@ -400,6 +230,8 @@ export function HalftoneStudio() {);}, [timeoutRegistry]);+ const imageElement = useImageElement(imageFile);+const selectedShape = useMemo(() =>state.geometrySpecs.find(@@ -407,6 +239,26 @@ export function HalftoneStudio() {),[state.geometrySpecs, state.settings.shapeKey],);++ const geometryLoaderCallbacks = useMemo(+ () => ({+ onLoadStart: (label: string) =>+ dispatch({ type: 'setStatus', message: `Loading ${label}…` }),+ onLoadSuccess: () => dispatch({ type: 'clearStatus' }),+ onLoadError: (message: string) =>+ dispatch({ type: 'setStatus', message, isError: true }),+ onFallbackShape: (key: string) =>+ dispatch({ type: 'setShapeKey', value: key }),+ }),+ [],+ );++ const activeGeometry = useGeometryLoader(+ selectedShape,+ state.importedFiles,+ geometryLoaderCallbacks,+ );+const shapeOptions = useMemo(() =>state.geometrySpecs.map((shape) => ({@@ -485,67 +337,6 @@ export function HalftoneStudio() {};}, [state.settings.halftone, state.settings.sourceMode]);- const hashHydratedReference = useRef(false);- useEffect(() => {- if (hashHydratedReference.current) {- return;- }-- hashHydratedReference.current = true;-- const decoded = decodeShareState(window.location.hash);-- if (!decoded) {- return;- }-- dispatch({ type: 'replaceSettings', value: decoded.settings });- setPreviewDistance(decoded.previewDistance);- setExportName(decoded.exportName);- }, []);-- const hashSyncInitializedReference = useRef(false);- useEffect(() => {- if (!hashSyncInitializedReference.current) {- hashSyncInitializedReference.current = true;- return;- }-- const timeout = window.setTimeout(() => {- const hash = encodeShareState({- settings: state.settings,- previewDistance,- exportName,- });- const nextUrl = `${window.location.pathname}${window.location.search}#${hash}`;- window.history.replaceState(null, '', nextUrl);- }, 250);-- return () => window.clearTimeout(timeout);- }, [state.settings, previewDistance, exportName]);-- const handleCopyShareLink = useCallback(() => {- const url = buildShareUrl({- settings: state.settings,- previewDistance,- exportName,- });-- void navigator.clipboard- .writeText(url)- .then(() => {- dispatch({ type: 'setStatus', message: 'Link copied to clipboard.' });- clearStatusLater();- })- .catch(() => {- dispatch({- type: 'setStatus',- message: 'Could not copy the share link.',- isError: true,- });- });- }, [clearStatusLater, exportName, previewDistance, state.settings]);-const handleCopyHalftoneImage = useCallback(async (width: number, height: number) => {const snapshotFn = snapshotReference.current;@@ -602,37 +393,6 @@ export function HalftoneStudio() {[clearStatusLater, exportBackground, state.settings.background.color],);- useEffect(() => {- const handleKeyDown = (event: KeyboardEvent) => {- const isCopyShortcut =- (event.metaKey || event.ctrlKey) &&- !event.shiftKey &&- !event.altKey &&- event.key.toLowerCase() === 'c';-- if (!isCopyShortcut) {- return;- }-- if (isEditablePasteTarget(event.target) || hasTextSelection()) {- return;- }-- const canvasLayer = canvasLayerReference.current;- const width = Math.max(canvasLayer?.clientWidth ?? 0, 1);- const height = Math.max(canvasLayer?.clientHeight ?? 0, 1);-- event.preventDefault();- void handleCopyHalftoneImage(width, height);- };-- window.addEventListener('keydown', handleKeyDown);-- return () => {- window.removeEventListener('keydown', handleKeyDown);- };- }, [handleCopyHalftoneImage]);-const openFilePicker = useCallback((accept: string) => {return new Promise<File | null>((resolve) => {@@ -829,47 +589,6 @@ export function HalftoneStudio() {[state.settings.halftone, state.settings.sourceMode],);- useEffect(() => {- const handlePaste = (event: ClipboardEvent) => {- if (isEditablePasteTarget(event.target)) {- return;- }-- const imageItem = Array.from(event.clipboardData?.items ?? []).find(- (item) => item.type.startsWith('image/'),- );-- if (!imageItem) {- return;- }-- const pastedFile = imageItem.getAsFile();-- if (!pastedFile) {- dispatch({- type: 'setStatus',- message: 'Could not read the pasted image.',- isError: true,- });- return;- }-- event.preventDefault();- activateUploadedImage(createPastedImageFile(pastedFile));- dispatch({- type: 'setStatus',- message: 'Image pasted from clipboard.',- });- clearStatusLater();- };-- window.addEventListener('paste', handlePaste);-- return () => {- window.removeEventListener('paste', handlePaste);- };- }, [activateUploadedImage, clearStatusLater]);-const handleUploadSource = useCallback(async () => {const file = await openFilePicker('.fbx,.glb,.png,.jpg,.jpeg,.webp,.gif,.svg',@@ -1337,96 +1056,7 @@ export function HalftoneStudio() {state.settings,]);- useEffect(() => {- void loadDefaultImageFile()- .then((file) => {- setImageFile((currentFile) => currentFile ?? file);- })- .catch((error) => {- console.error(error);- });- }, [loadDefaultImageFile]);-- useEffect(() => {- if (!imageFile) {- setImageElement(null);- return;- }-- const url = URL.createObjectURL(imageFile);- const img = new Image();- img.onload = () => setImageElement(img);- img.src = url;-- return () => URL.revokeObjectURL(url);- }, [imageFile]);-- useEffect(() => {- const geometryCache = geometryCacheReference.current;-- return () => {- disposeGeometryCache(geometryCache);- };- }, []);-- useEffect(() => {- if (!selectedShape) {- return;- }-- let cancelled = false;-- if (selectedShape.kind === 'imported') {- dispatch({- type: 'setStatus',- message: `Loading ${selectedShape.label}…`,- });- } else {- dispatch({ type: 'clearStatus' });- }-- void getGeometryForSpec(- selectedShape,- state.importedFiles[selectedShape.key],- geometryCacheReference.current,- )- .then((geometry) => {- if (cancelled) {- return;- }-- lastSuccessfulShapeReference.current = selectedShape.key;- setActiveGeometry(geometry);- dispatch({ type: 'clearStatus' });- })- .catch((error) => {- if (cancelled) {- return;- }-- console.error(error);-- dispatch({- type: 'setStatus',- message:- error instanceof Error- ? error.message- : `${selectedShape.label} failed to load.`,- isError: true,- });-- if (lastSuccessfulShapeReference.current !== selectedShape.key) {- dispatch({- type: 'setShapeKey',- value: lastSuccessfulShapeReference.current,- });- }- });-- return () => {- cancelled = true;- };- }, [selectedShape, state.importedFiles]);+ useDefaultHalftoneImage({ loadDefaultImageFile, setImageFile });const background = state.settings.background.color;const backgroundTone = isLightColor(background) ? 'light' : 'dark';@@ -1434,8 +1064,40 @@ export function HalftoneStudio() {dispatch({ type: 'hideHint' });}, []);+ const handlePasteImage = useCallback(+ (file: File) => {+ activateUploadedImage(file);+ dispatch({ type: 'setStatus', message: 'Image pasted from clipboard.' });+ clearStatusLater();+ },+ [activateUploadedImage, clearStatusLater],+ );++ const handlePasteError = useCallback(() => {+ dispatch({+ type: 'setStatus',+ message: 'Could not read the pasted image.',+ isError: true,+ });+ }, []);++ const handleCopyShortcut = useCallback(+ (width: number, height: number) => {+ void handleCopyHalftoneImage(width, height);+ },+ [handleCopyHalftoneImage],+ );+return (<StudioShell $background={background}>+ <CopyHalftoneShortcutEffect+ canvasLayerRef={canvasLayerReference}+ onCopy={handleCopyShortcut}+ />+ <PasteImageEffect+ onPasteImage={handlePasteImage}+ onPasteError={handlePasteError}+ /><LogoLink aria-label="Go to homepage" href="/"><LogoIconbackgroundColor={theme.colors.secondary.background[100]}@@ -1489,7 +1151,6 @@ export function HalftoneStudio() {onAnimationSettingsChange={(value) =>dispatch({ type: 'patchAnimation', value })}- onCopyShareLink={handleCopyShareLink}onDashColorChange={(value) =>dispatch({type: 'patchHalftone',diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/AnimationsTab.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/AnimationsTab.tsxindex e1e281122ad..8d0b61722d9 100644--- a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/AnimationsTab.tsx+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/AnimationsTab.tsx@@ -4,8 +4,8 @@ import {formatAngle,formatDecimal,formatPercent,-} from '@/app/[locale]/halftone/_lib/formatters';-import type { HalftoneStudioSettings } from '@/lib/halftone/state';+} from '@/lib/halftone/utils/formatters';+import type { HalftoneStudioSettings } from '@/lib/halftone/utils/state';import {ColorControlLabel,ColorControlRow,diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ColorField.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ColorField.tsxnew file mode 100644index 00000000000..41b1a4180e4--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ColorField.tsx@@ -0,0 +1,171 @@+'use client';++import { theme } from '@/theme';+import { styled } from '@linaria/react';+import { useEffect, useRef, useState } from 'react';++import { TAB_LABEL_WIDTH } from './controls-form-constants';++export const ColorControlRow = styled.div`+ align-items: center;+ display: grid;+ gap: 10px;+ grid-template-columns: ${TAB_LABEL_WIDTH}px minmax(0, 1fr);+`;++export const ColorControlLabel = styled.span`+ color: rgba(255, 255, 255, 0.7);+ font-size: 11px;+`;++export const ColorPickerField = styled.div`+ align-items: center;+ cursor: text;+ display: flex;+ gap: 8px;+ justify-content: flex-end;+ justify-self: end;+ min-height: 16px;+ min-width: fit-content;+ padding: 0;+ position: relative;+ width: auto;+`;++export const ColorSwatch = styled.span`+ border: 1px solid rgba(255, 255, 255, 0.16);+ border-radius: 4px;+ box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);+ flex-shrink: 0;+ height: 16px;+ width: 16px;+`;++export const ColorHexInput = styled.input`+ appearance: none;+ background: transparent;+ border: none;+ color: rgba(255, 255, 255, 0.85);+ font-family: ${theme.font.family.mono};+ font-size: 11px;+ height: 16px;+ letter-spacing: 0.02em;+ line-height: 16px;+ min-width: 7ch;+ outline: none;+ padding: 0;+ text-align: right;+ text-transform: uppercase;+ width: 7ch;++ &::placeholder {+ color: rgba(255, 255, 255, 0.32);+ }+`;++export const ColorSwatchButton = styled.label`+ align-items: center;+ cursor: pointer;+ display: inline-flex;+ flex-shrink: 0;+ height: 16px;+ justify-content: center;+ position: relative;+`;++export const ColorInput = styled.input`+ appearance: none;+ border: none;+ cursor: pointer;+ height: 100%;+ inset: 0;+ outline: none;+ opacity: 0;+ padding: 0;+ position: absolute;+ width: 100%;+`;++function normalizeHexColor(value: string): string | null {+ const normalizedValue = value.trim().replace(/^#/, '');++ if (!/^([0-9a-f]{3}|[0-9a-f]{6})$/i.test(normalizedValue)) {+ return null;+ }++ return `#${normalizedValue.toUpperCase()}`;+}++type ColorFieldProps = {+ ariaLabel: string;+ onChange: (value: string) => void;+ value: string;+};++export function ColorField({ ariaLabel, onChange, value }: ColorFieldProps) {+ const normalizedValue = value.toUpperCase();+ const [draftValue, setDraftValue] = useState(normalizedValue);+ const escapePressedReference = useRef(false);++ useEffect(() => {+ setDraftValue(normalizedValue);+ }, [normalizedValue]);++ const commitDraftValue = () => {+ if (escapePressedReference.current) {+ escapePressedReference.current = false;+ return;+ }++ const nextValue = normalizeHexColor(draftValue);++ if (!nextValue) {+ setDraftValue(normalizedValue);+ return;+ }++ setDraftValue(nextValue);++ if (nextValue !== normalizedValue) {+ onChange(nextValue);+ }+ };++ return (+ <ColorPickerField>+ <ColorHexInput+ aria-label={`${ariaLabel} hex value`}+ maxLength={7}+ onBlur={commitDraftValue}+ onClick={(event) => event.currentTarget.select()}+ onChange={(event) => setDraftValue(event.target.value.toUpperCase())}+ onFocus={(event) => event.currentTarget.select()}+ onKeyDown={(event) => {+ if (event.key === 'Enter') {+ event.preventDefault();+ event.currentTarget.blur();+ }++ if (event.key === 'Escape') {+ event.preventDefault();+ escapePressedReference.current = true;+ setDraftValue(normalizedValue);+ event.currentTarget.blur();+ }+ }}+ spellCheck={false}+ type="text"+ value={draftValue}+ />+ <ColorSwatchButton title={ariaLabel}>+ <ColorSwatch style={{ backgroundColor: normalizedValue }} />+ <ColorInput+ aria-label={ariaLabel}+ onChange={(event) => onChange(event.target.value)}+ type="color"+ value={value}+ />+ </ColorSwatchButton>+ </ColorPickerField>+ );+}diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ControlsPanelShell.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ControlsPanelShell.tsxnew file mode 100644index 00000000000..d134655387c--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ControlsPanelShell.tsx@@ -0,0 +1,188 @@+import { theme } from '@/theme';+import { styled } from '@linaria/react';++import { TAB_LABEL_WIDTH } from './controls-form-constants';++export const PanelShell = styled.aside<{ $collapsed?: boolean }>`+ background: rgba(18, 18, 22, 0.88);+ /* -webkit- prefix is required for the blur to render on Safari < 18. */+ -webkit-backdrop-filter: blur(24px) saturate(1.4);+ backdrop-filter: blur(24px) saturate(1.4);+ border: 1px solid rgba(255, 255, 255, 0.08);+ border-radius: 16px;+ box-shadow:+ 0 24px 64px rgba(0, 0, 0, 0.4),+ 0 0 0 1px rgba(255, 255, 255, 0.04) inset;+ color: rgba(255, 255, 255, 0.7);+ display: flex;+ flex-direction: column;+ font-family: ${theme.font.family.sans};+ font-size: 11px;+ height: ${(props) => (props.$collapsed ? 'auto' : '100%')};+ overflow: hidden;+ width: ${(props) =>+ props.$collapsed ? 'auto' : 'min(320px, calc(100vw - 32px))'};++ @media (max-width: ${theme.breakpoints.md - 1}px) {+ height: ${(props) => (props.$collapsed ? 'auto' : '100%')};+ width: ${(props) => (props.$collapsed ? 'auto' : '100%')};+ }+`;++export const ControlGrid = styled.div`+ display: grid;+ gap: 10px;+`;++export const ValueDisplay = styled.div`+ align-items: center;+ background-color: rgba(255, 255, 255, 0.07);+ border: 1px solid rgba(255, 255, 255, 0.12);+ border-radius: 8px;+ color: rgba(255, 255, 255, 0.85);+ display: flex;+ font-family: ${theme.font.family.sans};+ font-size: 11px;+ min-height: 31px;+ overflow: hidden;+ padding: 7px 10px;+ text-overflow: ellipsis;+ white-space: nowrap;+ width: 100%;+`;++export const ShapeRow = styled.div`+ align-items: center;+ display: grid;+ gap: 10px;+ grid-template-columns: ${TAB_LABEL_WIDTH}px minmax(0, 1fr) auto;+`;++export const UploadButton = styled.button`+ align-items: center;+ background: rgba(255, 255, 255, 0.06);+ border: 1px solid rgba(255, 255, 255, 0.1);+ border-radius: 8px;+ color: rgba(255, 255, 255, 0.5);+ cursor: pointer;+ display: flex;+ flex-shrink: 0;+ font-size: 13px;+ height: 24px;+ justify-content: center;+ transition: all 0.15s ease;+ width: 24px;++ &:hover {+ background: rgba(255, 255, 255, 0.12);+ border-color: rgba(255, 255, 255, 0.22);+ color: rgba(255, 255, 255, 0.8);+ }+`;++export const ExportNameInput = styled.input`+ background: rgba(255, 255, 255, 0.07);+ border: 1px solid rgba(255, 255, 255, 0.12);+ border-radius: 8px;+ color: rgba(255, 255, 255, 0.85);+ font-family: ${theme.font.family.sans};+ font-size: 11px;+ margin-bottom: 14px;+ outline: none;+ padding: 7px 10px;+ transition: border-color 0.15s ease;+ width: 100%;++ &:hover {+ border-color: rgba(255, 255, 255, 0.25);+ }++ &:focus {+ border-color: #4a38f5;+ }++ &::placeholder {+ color: rgba(255, 255, 255, 0.3);+ }+`;++export const ExportPreview = styled.div`+ background: rgba(0, 0, 0, 0.4);+ border: 1px solid rgba(255, 255, 255, 0.06);+ border-radius: 10px;+ color: rgba(255, 255, 255, 0.55);+ font-family: ${theme.font.family.mono};+ font-size: 10px;+ line-height: 1.5;+ margin-bottom: 14px;+ max-height: 200px;+ overflow-y: auto;+ padding: 12px;+`;++export const ExportButton = styled.button<{ $primary?: boolean }>`+ align-items: center;+ background: ${(props) =>+ props.$primary ? 'rgba(255, 255, 255, 0.24)' : 'rgba(255, 255, 255, 0.2)'};+ border: none;+ border-radius: 8px;+ color: ${(props) =>+ props.$primary ? 'rgba(255, 255, 255, 0.92)' : 'rgba(255, 255, 255, 0.8)'};+ cursor: pointer;+ display: flex;+ font-family: ${theme.font.family.sans};+ font-size: 11px;+ font-weight: ${theme.font.weight.medium};+ gap: 8px;+ justify-content: center;+ line-height: normal;+ margin-top: ${(props) => (props.$primary ? '0' : '8px')};+ padding: 7px 12px;+ transition:+ background-color 0.15s ease,+ color 0.15s ease,+ transform 0.15s ease;+ width: 100%;++ &:hover {+ background: ${(props) =>+ props.$primary+ ? 'rgba(255, 255, 255, 0.28)'+ : 'rgba(255, 255, 255, 0.24)'};+ color: rgba(255, 255, 255, 0.92);+ }++ &:active {+ background: ${(props) =>+ props.$primary+ ? 'rgba(255, 255, 255, 0.3)'+ : 'rgba(255, 255, 255, 0.28)'};+ transform: translateY(1px);+ }++ &:focus-visible {+ outline: 1px solid rgba(255, 255, 255, 0.36);+ outline-offset: 2px;+ }++ &:disabled {+ background: rgba(255, 255, 255, 0.1);+ color: rgba(255, 255, 255, 0.36);+ cursor: not-allowed;+ transform: none;+ }+`;++export const ExportNote = styled.div`+ color: rgba(255, 255, 255, 0.3);+ font-size: 10px;+ line-height: 1.5;+ margin-top: 12px;+`;++export const SmallBody = styled.p`+ color: rgba(255, 255, 255, 0.45);+ font-size: 10px;+ line-height: 1.6;+ margin-bottom: 14px;+`;diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ControlsSections.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ControlsSections.tsxnew file mode 100644index 00000000000..ea6b024d692--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ControlsSections.tsx@@ -0,0 +1,64 @@+import { styled } from '@linaria/react';+import { type ChangeEventHandler, type ReactNode, useId } from 'react';++import { Toggle, ToggleInput, ToggleTrack } from './ToggleControl';++export const Section = styled.section<{ $first?: boolean }>`+ border-top: ${(props) =>+ props.$first ? 'none' : '1px solid rgba(255, 255, 255, 0.06)'};+ margin-top: ${(props) => (props.$first ? '0' : '14px')};+ padding-top: ${(props) => (props.$first ? '0' : '14px')};+`;++export const SectionTitle = styled.div<{ $preserveCase?: boolean }>`+ color: rgba(255, 255, 255, 0.36);+ font-size: 10px;+ font-weight: 600;+ letter-spacing: ${(props) => (props.$preserveCase ? '0.02em' : '0.08em')};+ margin-bottom: 10px;+ text-transform: ${(props) => (props.$preserveCase ? 'none' : 'uppercase')};+`;++export const SectionHeader = styled.div`+ align-items: center;+ display: flex;+ justify-content: space-between;+ margin-bottom: 10px;++ & > ${SectionTitle} {+ margin-bottom: 0;+ }+`;++type SectionToggleHeaderProps = {+ checked: boolean;+ children: ReactNode;+ onChange: ChangeEventHandler<HTMLInputElement>;+ preserveCase?: boolean;+};++export function SectionToggleHeader({+ checked,+ children,+ onChange,+ preserveCase,+}: SectionToggleHeaderProps) {+ const titleId = useId();++ return (+ <SectionHeader>+ <SectionTitle $preserveCase={preserveCase} id={titleId}>+ {children}+ </SectionTitle>+ <Toggle>+ <ToggleInput+ aria-labelledby={titleId}+ checked={checked}+ onChange={onChange}+ type="checkbox"+ />+ <ToggleTrack />+ </Toggle>+ </SectionHeader>+ );+}diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ControlsTabs.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ControlsTabs.tsxnew file mode 100644index 00000000000..06eedfbc88f--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ControlsTabs.tsx@@ -0,0 +1,50 @@+import { theme } from '@/theme';+import { styled } from '@linaria/react';++export const TabsBar = styled.div<{ $collapsed?: boolean }>`+ align-items: center;+ display: flex;+ flex-shrink: 0;+ gap: 6px;+ margin: 0;+ padding: ${(props) => (props.$collapsed ? '12px' : '12px 12px 0')};+`;++export const TabButton = styled.button<{ $active: boolean }>`+ background: ${(props) =>+ props.$active ? 'rgba(255, 255, 255, 0.08)' : 'transparent'};+ border: none;+ border-radius: 7px;+ color: ${(props) =>+ props.$active ? 'rgba(255, 255, 255, 0.94)' : 'rgba(255, 255, 255, 0.52)'};+ cursor: pointer;+ font-family: ${theme.font.family.sans};+ font-size: 12px;+ font-weight: ${(props) => (props.$active ? 600 : 500)};+ letter-spacing: 0;+ line-height: 1;+ padding: 8px 10px;+ transition:+ background-color 0.15s ease,+ color 0.15s ease;++ &:hover {+ background: ${(props) =>+ props.$active ? 'rgba(255, 255, 255, 0.1)' : 'rgba(255, 255, 255, 0.04)'};+ color: ${(props) =>+ props.$active+ ? 'rgba(255, 255, 255, 0.94)'+ : 'rgba(255, 255, 255, 0.74)'};+ }++ &:focus-visible {+ outline: 1px solid rgba(255, 255, 255, 0.35);+ outline-offset: 1px;+ }+`;++export const TabContent = styled.div`+ flex: 1;+ overflow-y: auto;+ padding: 16px;+`;diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/DesignTab.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/DesignTab.tsxindex cd11a060ec0..d4cc8ad83ea 100644--- a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/DesignTab.tsx+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/DesignTab.tsx@@ -1,9 +1,6 @@'use client';-import {- formatAngle,- formatDecimal,-} from '@/app/[locale]/halftone/_lib/formatters';+import { formatAngle, formatDecimal } from '@/lib/halftone/utils/formatters';import {DEFAULT_GLASS_ANIMATION_SETTINGS,DEFAULT_GLASS_LIGHTING_SETTINGS,@@ -14,7 +11,7 @@ import {type HalftoneBackgroundSettings,type HalftoneSourceMode,type HalftoneStudioSettings,-} from '@/lib/halftone/state';+} from '@/lib/halftone/utils/state';import { styled } from '@linaria/react';import {ColorControlLabel,diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ExportTab.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ExportTab.tsxindex d35b66ffa8a..26dcf2fef52 100644--- a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ExportTab.tsx+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ExportTab.tsx@@ -1,12 +1,12 @@'use client';-import type { ReactExportSettings } from '@/app/[locale]/halftone/_lib/exporters';-import { resolveExportArtifactNames } from '@/app/[locale]/halftone/_lib/exportNames';-import { formatAnimationName } from '@/app/[locale]/halftone/_lib/formatters';+import type { ReactExportSettings } from '@/lib/halftone/utils/exporters';+import { resolveExportArtifactNames } from '@/lib/halftone/utils/export-names';+import { formatAnimationName } from '@/lib/halftone/utils/formatters';import type {HalftoneGeometrySpec,HalftoneStudioSettings,-} from '@/lib/halftone/state';+} from '@/lib/halftone/utils/state';import { useState } from 'react';import {ExportButton,diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/LabelWithTooltip.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/LabelWithTooltip.tsxnew file mode 100644index 00000000000..d673f066f02--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/LabelWithTooltip.tsx@@ -0,0 +1,153 @@+'use client';++import { styled } from '@linaria/react';+import { useEffect, useId, useRef, useState, type ReactNode } from 'react';+import { createPortal } from 'react-dom';++import { TooltipPositionEffect } from './effect-components/TooltipPositionEffect';++const LabelWithInfoRow = styled.span`+ align-items: center;+ display: inline-flex;+ gap: 6px;+ min-width: 0;+`;++const InfoTooltipRoot = styled.span`+ display: inline-flex;+ position: relative;+`;++const InfoTooltipButton = styled.button`+ align-items: center;+ background: transparent;+ border: none;+ color: rgba(255, 255, 255, 0.32);+ cursor: help;+ display: inline-flex;+ height: 14px;+ justify-content: center;+ margin: 0;+ padding: 0;+ transition: color 0.15s ease;+ width: 14px;++ &:hover,+ &:focus-visible {+ color: rgba(255, 255, 255, 0.7);+ outline: none;+ }++ &:hover + span,+ &:focus-visible + span {+ opacity: 1;+ transform: translate(-50%, 0);+ }+`;++const InfoTooltipBubble = styled.span`+ background: rgba(9, 9, 13, 0.96);+ border: 1px solid rgba(255, 255, 255, 0.08);+ border-radius: 10px;+ box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);+ color: rgba(255, 255, 255, 0.78);+ font-size: 10px;+ line-height: 1.45;+ max-width: 220px;+ padding: 8px 10px;+ pointer-events: none;+ position: fixed;+ width: max-content;+ z-index: 4;++ &::before {+ background: rgba(9, 9, 13, 0.96);+ border-left: 1px solid rgba(255, 255, 255, 0.08);+ border-top: 1px solid rgba(255, 255, 255, 0.08);+ content: '';+ height: 8px;+ left: 50%;+ position: absolute;+ top: -5px;+ transform: translateX(-50%) rotate(45deg);+ width: 8px;+ }+`;++type LabelWithTooltipProps = {+ description: string;+ label: ReactNode;+};++export function LabelWithTooltip({+ description,+ label,+}: LabelWithTooltipProps) {+ const buttonReference = useRef<HTMLButtonElement>(null);+ const tooltipId = useId();+ const [isMounted, setIsMounted] = useState(false);+ const [isOpen, setIsOpen] = useState(false);+ const [tooltipPosition, setTooltipPosition] = useState({+ left: 0,+ top: 0,+ });++ useEffect(() => {+ setIsMounted(true);+ }, []);++ return (+ <LabelWithInfoRow>+ <TooltipPositionEffect+ buttonRef={buttonReference}+ isOpen={isOpen}+ setTooltipPosition={setTooltipPosition}+ />+ <span>{label}</span>+ <InfoTooltipRoot>+ <InfoTooltipButton+ aria-describedby={isOpen ? tooltipId : undefined}+ aria-label={description}+ onBlur={() => setIsOpen(false)}+ onFocus={() => setIsOpen(true)}+ onMouseEnter={() => setIsOpen(true)}+ onMouseLeave={() => setIsOpen(false)}+ ref={buttonReference}+ type="button"+ >+ <svg+ aria-hidden="true"+ fill="none"+ height="14"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="2"+ viewBox="0 0 24 24"+ width="14"+ >+ <path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" />+ <path d="M12 9h.01" />+ <path d="M11 12h1v4h1" />+ </svg>+ </InfoTooltipButton>+ {isMounted && isOpen+ ? createPortal(+ <InfoTooltipBubble+ id={tooltipId}+ role="tooltip"+ style={{+ left: tooltipPosition.left,+ top: tooltipPosition.top,+ transform: 'translateX(-50%)',+ }}+ >+ {description}+ </InfoTooltipBubble>,+ document.body,+ )+ : null}+ </InfoTooltipRoot>+ </LabelWithInfoRow>+ );+}diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/SegmentedControl.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/SegmentedControl.tsxnew file mode 100644index 00000000000..8e54cd97403--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/SegmentedControl.tsx@@ -0,0 +1,128 @@+'use client';++import { theme } from '@/theme';+import { styled } from '@linaria/react';+import { useRef, type ReactNode } from 'react';++import { TAB_LABEL_WIDTH } from './controls-form-constants';++export const SegmentedLabel = styled.div`+ align-items: center;+ display: grid;+ gap: 10px;+ grid-template-columns: ${TAB_LABEL_WIDTH}px minmax(0, 1fr);+`;++const SegmentedGroup = styled.div`+ align-items: stretch;+ background: rgba(255, 255, 255, 0.07);+ border: 1px solid rgba(255, 255, 255, 0.12);+ border-radius: 8px;+ display: grid;+ gap: 1px;+ grid-auto-columns: minmax(0, 1fr);+ grid-auto-flow: column;+ height: 24px;+ padding: 1px;+ width: 100%;+`;++const SegmentedButton = styled.button<{ $active: boolean }>`+ background: ${(props) =>+ props.$active ? 'rgba(255, 255, 255, 0.14)' : 'transparent'};+ border: none;+ border-radius: 6px;+ color: ${(props) =>+ props.$active ? 'rgba(255, 255, 255, 0.94)' : 'rgba(255, 255, 255, 0.58)'};+ cursor: pointer;+ font-family: ${theme.font.family.sans};+ font-size: 11px;+ font-weight: ${(props) => (props.$active ? 600 : 500)};+ height: 100%;+ padding: 0 10px;+ transition:+ background-color 0.15s ease,+ color 0.15s ease;++ &:hover {+ color: rgba(255, 255, 255, 0.86);+ }++ &:focus-visible {+ outline: 1px solid rgba(255, 255, 255, 0.35);+ outline-offset: 1px;+ }+`;++type SegmentedControlProps = {+ children: ReactNode;+ onChange: (value: string) => void;+ value: string;+ options: Array<{ label: string; value: string }>;+};++export function SegmentedControl({+ children,+ onChange,+ options,+ value,+}: SegmentedControlProps) {+ const groupReference = useRef<HTMLDivElement>(null);++ const handleKeyDown = (event: React.KeyboardEvent, currentIndex: number) => {+ let nextIndex: number | null = null;++ if (event.key === 'ArrowRight' || event.key === 'ArrowDown') {+ nextIndex = (currentIndex + 1) % options.length;+ } else if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') {+ nextIndex = (currentIndex - 1 + options.length) % options.length;+ }++ if (nextIndex === null) {+ return;+ }++ event.preventDefault();+ onChange(options[nextIndex].value);++ const buttons =+ groupReference.current?.querySelectorAll<HTMLButtonElement>(+ '[role="radio"]',+ );+ buttons?.[nextIndex]?.focus();+ };++ return (+ <SegmentedLabel>+ <span>{children}</span>+ <SegmentedGroup+ aria-label={typeof children === 'string' ? children : undefined}+ ref={groupReference}+ role="radiogroup"+ >+ {options.map((option, index) => {+ const isActive = option.value === value;++ return (+ <SegmentedButton+ $active={isActive}+ aria-checked={isActive}+ key={option.value}+ onClick={() => {+ if (!isActive) {+ onChange(option.value);+ }+ }}+ onKeyDown={(event) => handleKeyDown(event, index)}+ role="radio"+ tabIndex={isActive ? 0 : -1}+ type="button"+ >+ {option.label}+ </SegmentedButton>+ );+ })}+ </SegmentedGroup>+ </SegmentedLabel>+ );+}diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/SelectControl.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/SelectControl.tsxnew file mode 100644index 00000000000..f0ae5eb1013--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/SelectControl.tsx@@ -0,0 +1,73 @@+'use client';++import { theme } from '@/theme';+import { styled } from '@linaria/react';+import type { ChangeEventHandler, ReactNode } from 'react';++import { TAB_LABEL_WIDTH } from './controls-form-constants';++export const SelectLabel = styled.label`+ align-items: center;+ cursor: pointer;+ display: grid;+ gap: 10px;+ grid-template-columns: ${TAB_LABEL_WIDTH}px minmax(0, 1fr);+`;++export const SelectInput = styled.select`+ -webkit-appearance: none;+ -moz-appearance: none;+ appearance: none;+ background-color: rgba(255, 255, 255, 0.07);+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.52)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");+ background-position: right 12px center;+ background-repeat: no-repeat;+ background-size: 12px 12px;+ border: 1px solid rgba(255, 255, 255, 0.12);+ border-radius: 8px;+ color: rgba(255, 255, 255, 0.85);+ cursor: pointer;+ font-family: ${theme.font.family.sans};+ font-size: 11px;+ height: 24px;+ outline: none;+ padding: 0 34px 0 10px;+ transition: border-color 0.15s ease;+ width: 100%;++ &:hover {+ border-color: rgba(255, 255, 255, 0.25);+ }++ &:focus-visible {+ border-color: rgba(255, 255, 255, 0.4);+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);+ }+`;++type SelectControlProps = {+ children: ReactNode;+ onChange: ChangeEventHandler<HTMLSelectElement>;+ value: string;+ options: Array<{ label: string; value: string }>;+};++export function SelectControl({+ children,+ onChange,+ options,+ value,+}: SelectControlProps) {+ return (+ <SelectLabel>+ <span>{children}</span>+ <SelectInput onChange={onChange} value={value}>+ {options.map((option) => (+ <option key={option.value} value={option.value}>+ {option.label}+ </option>+ ))}+ </SelectInput>+ </SelectLabel>+ );+}diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/SliderControl.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/SliderControl.tsxnew file mode 100644index 00000000000..4e8c2052b0e--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/SliderControl.tsx@@ -0,0 +1,279 @@+'use client';++import { styled } from '@linaria/react';+import {+ useEffect,+ useRef,+ useState,+ type ChangeEventHandler,+ type ReactNode,+} from 'react';++import { TAB_LABEL_WIDTH } from './controls-form-constants';++export const SliderLabel = styled.label`+ align-items: center;+ cursor: pointer;+ display: grid;+ gap: 10px;+ grid-template-columns: ${TAB_LABEL_WIDTH}px minmax(0, 1fr) auto;+`;++export const ControlValue = styled.span`+ color: rgba(255, 255, 255, 0.5);+ font-size: 10px;+ font-variant-numeric: tabular-nums;+ min-width: 34px;+ text-align: right;+`;++export const SliderInput = styled.input<{ $fillPercent: number }>`+ appearance: none;+ background: transparent;+ cursor: pointer;+ height: 16px;+ outline: none;+ transition: transform 0.2s ease;+ width: 100%;+ -webkit-tap-highlight-color: transparent;++ &::-webkit-slider-runnable-track {+ background: linear-gradient(+ to right,+ rgba(255, 255, 255, 0.35) ${({ $fillPercent }) => $fillPercent}%,+ rgba(255, 255, 255, 0.08) ${({ $fillPercent }) => $fillPercent}%+ );+ border-radius: 999px;+ height: 6px;+ }++ &::-webkit-slider-thumb {+ appearance: none;+ background: transparent;+ border: none;+ border-radius: 999px;+ height: 16px;+ margin-top: -5px;+ width: 16px;+ }++ &::-moz-range-progress {+ background: rgba(255, 255, 255, 0.35);+ border-radius: 999px;+ height: 6px;+ }++ &::-moz-range-thumb {+ background: transparent;+ border: none;+ border-radius: 999px;+ height: 16px;+ width: 16px;+ }++ &::-moz-range-track {+ background: rgba(255, 255, 255, 0.08);+ border-radius: 999px;+ height: 6px;+ }++ &:active {+ transform: scaleY(2);+ }+`;++const EditableControlValueButton = styled.button`+ background: transparent;+ border: none;+ color: rgba(255, 255, 255, 0.5);+ cursor: text;+ font-family: inherit;+ font-size: 10px;+ font-variant-numeric: tabular-nums;+ min-width: 34px;+ padding: 0;+ text-align: right;++ &:focus-visible {+ outline: 1px solid rgba(255, 255, 255, 0.25);+ outline-offset: 2px;+ }+`;++const EditableControlValueInput = styled.input`+ appearance: textfield;+ background: transparent;+ border: none;+ color: rgba(255, 255, 255, 0.62);+ font-family: inherit;+ font-size: 10px;+ font-variant-numeric: tabular-nums;+ min-width: 34px;+ outline: none;+ padding: 0;+ text-align: right;++ &::-webkit-outer-spin-button,+ &::-webkit-inner-spin-button {+ appearance: none;+ margin: 0;+ }+`;++function getStepPrecision(step: number | undefined) {+ if (!step || Number.isInteger(step)) {+ return 0;+ }++ const stepString = step.toString().toLowerCase();++ if (stepString.includes('e-')) {+ const exponent = stepString.split('e-')[1];++ return exponent ? Number.parseInt(exponent, 10) : 0;+ }++ return stepString.split('.')[1]?.length ?? 0;+}++function formatEditableValue(value: number, step: number | undefined) {+ const precision = getStepPrecision(step);++ if (precision === 0) {+ return String(Math.round(value));+ }++ return String(Number(value.toFixed(precision)));+}++function clampAndSnapValue(+ value: number,+ min: number,+ max: number,+ step: number | undefined,+) {+ const clampedValue = Math.min(Math.max(value, min), max);++ if (!step || step <= 0) {+ return clampedValue;+ }++ const precision = getStepPrecision(step);+ const snappedValue = Math.round((clampedValue - min) / step) * step + min;++ return Number(Math.min(Math.max(snappedValue, min), max).toFixed(precision));+}++type SliderControlProps = {+ children: ReactNode;+ max: number;+ min: number;+ onChange: ChangeEventHandler<HTMLInputElement>;+ step?: number;+ value: number;+ valueLabel: string;+};++export function SliderControl({+ children,+ max,+ min,+ onChange,+ step,+ value,+ valueLabel,+}: SliderControlProps) {+ const [draftValue, setDraftValue] = useState<string | null>(null);+ const valueInputReference = useRef<HTMLInputElement>(null);+ const fillPercent = ((value - min) / (max - min)) * 100;+ const isEditing = draftValue !== null;++ useEffect(() => {+ if (!isEditing) {+ return;+ }++ valueInputReference.current?.focus();+ valueInputReference.current?.select();+ }, [isEditing]);++ const commitDraftValue = () => {+ if (draftValue === null) {+ return;+ }++ const trimmed = draftValue.trim();+ setDraftValue(null);++ if (trimmed === '') {+ return;+ }++ const nextValue = Number(trimmed);++ if (!Number.isFinite(nextValue)) {+ return;+ }++ const normalizedValue = clampAndSnapValue(nextValue, min, max, step);++ onChange({+ target: { value: String(normalizedValue) },+ } as React.ChangeEvent<HTMLInputElement>);+ };++ return (+ <SliderLabel>+ <span>{children}</span>+ <SliderInput+ $fillPercent={fillPercent}+ max={max}+ min={min}+ onChange={onChange}+ step={step}+ type="range"+ value={value}+ />+ {isEditing ? (+ <EditableControlValueInput+ inputMode="decimal"+ max={max}+ min={min}+ onBlur={commitDraftValue}+ onChange={(event) => setDraftValue(event.target.value)}+ onKeyDown={(event) => {+ if (event.key === 'Enter') {+ event.preventDefault();+ commitDraftValue();+ return;+ }++ if (event.key === 'Escape') {+ event.preventDefault();+ setDraftValue(null);+ }+ }}+ ref={valueInputReference}+ step={step}+ type="number"+ value={draftValue}+ />+ ) : (+ <EditableControlValueButton+ onClick={(event) => {+ event.preventDefault();+ event.stopPropagation();+ setDraftValue(formatEditableValue(value, step));+ }}+ onMouseDown={(event) => {+ event.preventDefault();+ event.stopPropagation();+ }}+ type="button"+ >+ <ControlValue>{valueLabel}</ControlValue>+ </EditableControlValueButton>+ )}+ </SliderLabel>+ );+}diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ToggleControl.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ToggleControl.tsxnew file mode 100644index 00000000000..aa1ad13d5cd--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/ToggleControl.tsx@@ -0,0 +1,83 @@+'use client';++import { styled } from '@linaria/react';+import type { ChangeEventHandler, ReactNode } from 'react';++export const ToggleRow = styled.div`+ align-items: center;+ display: flex;+ justify-content: space-between;+ padding: 2px 0;+`;++export const ToggleText = styled.span`+ color: rgba(255, 255, 255, 0.7);+ font-size: 11px;+`;++export const Toggle = styled.label`+ display: block;+ flex-shrink: 0;+ height: 18px;+ position: relative;+ width: 28px;+`;++export const ToggleInput = styled.input`+ height: 0;+ opacity: 0;+ position: absolute;+ width: 0;++ &:checked + span {+ background: #4a38f5;+ }++ &:checked + span::after {+ transform: translateX(12px);+ }+`;++export const ToggleTrack = styled.span`+ background: rgba(255, 255, 255, 0.14);+ border-radius: 999px;+ cursor: pointer;+ inset: 0;+ position: absolute;+ transition: background 0.2s ease;++ &::after {+ background: #fff;+ border-radius: 50%;+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);+ content: '';+ height: 12px;+ left: 2px;+ position: absolute;+ top: 3px;+ transition: transform 0.2s ease;+ width: 12px;+ }+`;++type ToggleControlProps = {+ checked: boolean;+ label: ReactNode;+ onChange: ChangeEventHandler<HTMLInputElement>;+};++export function ToggleControl({+ checked,+ label,+ onChange,+}: ToggleControlProps) {+ return (+ <ToggleRow>+ <ToggleText>{label}</ToggleText>+ <Toggle>+ <ToggleInput checked={checked} onChange={onChange} type="checkbox" />+ <ToggleTrack />+ </Toggle>+ </ToggleRow>+ );+}diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/controls-form-constants.ts b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/controls-form-constants.tsnew file mode 100644index 00000000000..f0c3e625126--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/controls-form-constants.ts@@ -0,0 +1 @@+export const TAB_LABEL_WIDTH = 72;diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/controls-ui.ts b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/controls-ui.tsnew file mode 100644index 00000000000..a1794412442--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/controls-ui.ts@@ -0,0 +1,56 @@+export { TAB_LABEL_WIDTH } from './controls-form-constants';++export {+ ColorControlLabel,+ ColorControlRow,+ ColorField,+ ColorHexInput,+ ColorInput,+ ColorPickerField,+ ColorSwatch,+ ColorSwatchButton,+} from './ColorField';++export { LabelWithTooltip } from './LabelWithTooltip';++export {+ ControlGrid,+ ExportButton,+ ExportNameInput,+ ExportNote,+ ExportPreview,+ PanelShell,+ ShapeRow,+ SmallBody,+ UploadButton,+ ValueDisplay,+} from './ControlsPanelShell';++export { SegmentedControl, SegmentedLabel } from './SegmentedControl';++export { SelectControl, SelectInput, SelectLabel } from './SelectControl';++export {+ ControlValue,+ SliderControl,+ SliderInput,+ SliderLabel,+} from './SliderControl';++export { TabButton, TabContent, TabsBar } from './ControlsTabs';++export {+ Toggle,+ ToggleControl,+ ToggleInput,+ ToggleRow,+ ToggleText,+ ToggleTrack,+} from './ToggleControl';++export {+ Section,+ SectionHeader,+ SectionTitle,+ SectionToggleHeader,+} from './ControlsSections';diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/controls-ui.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/controls-ui.tsxdeleted file mode 100644index ed947b21588..00000000000--- a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/controls-ui.tsx+++ /dev/null@@ -1,1120 +0,0 @@-'use client';--import { theme } from '@/theme';-import { styled } from '@linaria/react';-import {- useEffect,- useId,- useRef,- useState,- type ChangeEventHandler,- type ReactNode,-} from 'react';-import { createPortal } from 'react-dom';--const TAB_LABEL_WIDTH = 72;--export const PanelShell = styled.aside<{ $collapsed?: boolean }>`- background: rgba(18, 18, 22, 0.88);- /* -webkit- prefix is required for the blur to render on Safari < 18. */- -webkit-backdrop-filter: blur(24px) saturate(1.4);- backdrop-filter: blur(24px) saturate(1.4);- border: 1px solid rgba(255, 255, 255, 0.08);- border-radius: 16px;- box-shadow:- 0 24px 64px rgba(0, 0, 0, 0.4),- 0 0 0 1px rgba(255, 255, 255, 0.04) inset;- color: rgba(255, 255, 255, 0.7);- display: flex;- flex-direction: column;- font-family: ${theme.font.family.sans};- font-size: 11px;- height: ${(props) => (props.$collapsed ? 'auto' : '100%')};- overflow: hidden;- width: ${(props) =>- props.$collapsed ? 'auto' : 'min(320px, calc(100vw - 32px))'};-- @media (max-width: ${theme.breakpoints.md - 1}px) {- height: ${(props) => (props.$collapsed ? 'auto' : '100%')};- width: ${(props) => (props.$collapsed ? 'auto' : '100%')};- }-`;--export const TabsBar = styled.div<{ $collapsed?: boolean }>`- align-items: center;- display: flex;- flex-shrink: 0;- gap: 6px;- margin: 0;- padding: ${(props) => (props.$collapsed ? '12px' : '12px 12px 0')};-`;--export const TabButton = styled.button<{ $active: boolean }>`- background: ${(props) =>- props.$active ? 'rgba(255, 255, 255, 0.08)' : 'transparent'};- border: none;- border-radius: 7px;- color: ${(props) =>- props.$active ? 'rgba(255, 255, 255, 0.94)' : 'rgba(255, 255, 255, 0.52)'};- cursor: pointer;- font-family: ${theme.font.family.sans};- font-size: 12px;- font-weight: ${(props) => (props.$active ? 600 : 500)};- letter-spacing: 0;- line-height: 1;- padding: 8px 10px;- transition:- background-color 0.15s ease,- color 0.15s ease;-- &:hover {- background: ${(props) =>- props.$active ? 'rgba(255, 255, 255, 0.1)' : 'rgba(255, 255, 255, 0.04)'};- color: ${(props) =>- props.$active- ? 'rgba(255, 255, 255, 0.94)'- : 'rgba(255, 255, 255, 0.74)'};- }-- &:focus-visible {- outline: 1px solid rgba(255, 255, 255, 0.35);- outline-offset: 1px;- }-`;--export const TabContent = styled.div`- flex: 1;- overflow-y: auto;- padding: 16px;-`;--export const Section = styled.section<{ $first?: boolean }>`- border-top: ${(props) =>- props.$first ? 'none' : '1px solid rgba(255, 255, 255, 0.06)'};- margin-top: ${(props) => (props.$first ? '0' : '14px')};- padding-top: ${(props) => (props.$first ? '0' : '14px')};-`;--export const SectionTitle = styled.div<{ $preserveCase?: boolean }>`- color: rgba(255, 255, 255, 0.36);- font-size: 10px;- font-weight: 600;- letter-spacing: ${(props) => (props.$preserveCase ? '0.02em' : '0.08em')};- margin-bottom: 10px;- text-transform: ${(props) => (props.$preserveCase ? 'none' : 'uppercase')};-`;--export const SectionHeader = styled.div`- align-items: center;- display: flex;- justify-content: space-between;- margin-bottom: 10px;-- & > ${SectionTitle} {- margin-bottom: 0;- }-`;--export const ControlGrid = styled.div`- display: grid;- gap: 10px;-`;--export const SliderLabel = styled.label`- align-items: center;- cursor: pointer;- display: grid;- gap: 10px;- grid-template-columns: ${TAB_LABEL_WIDTH}px minmax(0, 1fr) auto;-`;--export const SelectLabel = styled.label`- align-items: center;- cursor: pointer;- display: grid;- gap: 10px;- grid-template-columns: ${TAB_LABEL_WIDTH}px minmax(0, 1fr);-`;--export const SegmentedLabel = styled.div`- align-items: center;- display: grid;- gap: 10px;- grid-template-columns: ${TAB_LABEL_WIDTH}px minmax(0, 1fr);-`;--export const ControlValue = styled.span`- color: rgba(255, 255, 255, 0.5);- font-size: 10px;- font-variant-numeric: tabular-nums;- min-width: 34px;- text-align: right;-`;--const SegmentedGroup = styled.div`- align-items: stretch;- background: rgba(255, 255, 255, 0.07);- border: 1px solid rgba(255, 255, 255, 0.12);- border-radius: 8px;- display: grid;- gap: 1px;- grid-auto-columns: minmax(0, 1fr);- grid-auto-flow: column;- height: 24px;- padding: 1px;- width: 100%;-`;--const SegmentedButton = styled.button<{ $active: boolean }>`- background: ${(props) =>- props.$active ? 'rgba(255, 255, 255, 0.14)' : 'transparent'};- border: none;- border-radius: 6px;- color: ${(props) =>- props.$active ? 'rgba(255, 255, 255, 0.94)' : 'rgba(255, 255, 255, 0.58)'};- cursor: pointer;- font-family: ${theme.font.family.sans};- font-size: 11px;- font-weight: ${(props) => (props.$active ? 600 : 500)};- height: 100%;- padding: 0 10px;- transition:- background-color 0.15s ease,- color 0.15s ease;-- &:hover {- color: rgba(255, 255, 255, 0.86);- }-- &:focus-visible {- outline: 1px solid rgba(255, 255, 255, 0.35);- outline-offset: 1px;- }-`;--const EditableControlValueButton = styled.button`- background: transparent;- border: none;- color: rgba(255, 255, 255, 0.5);- cursor: text;- font-family: inherit;- font-size: 10px;- font-variant-numeric: tabular-nums;- min-width: 34px;- padding: 0;- text-align: right;-- &:focus-visible {- outline: 1px solid rgba(255, 255, 255, 0.25);- outline-offset: 2px;- }-`;--const EditableControlValueInput = styled.input`- appearance: textfield;- background: transparent;- border: none;- color: rgba(255, 255, 255, 0.62);- font-family: inherit;- font-size: 10px;- font-variant-numeric: tabular-nums;- min-width: 34px;- outline: none;- padding: 0;- text-align: right;-- &::-webkit-outer-spin-button,- &::-webkit-inner-spin-button {- appearance: none;- margin: 0;- }-`;--export const SliderInput = styled.input<{ $fillPercent: number }>`- appearance: none;- background: transparent;- cursor: pointer;- height: 16px;- outline: none;- transition: transform 0.2s ease;- width: 100%;- -webkit-tap-highlight-color: transparent;-- &::-webkit-slider-runnable-track {- background: linear-gradient(- to right,- rgba(255, 255, 255, 0.35) ${({ $fillPercent }) => $fillPercent}%,- rgba(255, 255, 255, 0.08) ${({ $fillPercent }) => $fillPercent}%- );- border-radius: 999px;- height: 6px;- }-- &::-webkit-slider-thumb {- appearance: none;- background: transparent;- border: none;- border-radius: 999px;- height: 16px;- margin-top: -5px;- width: 16px;- }-- &::-moz-range-progress {- background: rgba(255, 255, 255, 0.35);- border-radius: 999px;- height: 6px;- }-- &::-moz-range-thumb {- background: transparent;- border: none;- border-radius: 999px;- height: 16px;- width: 16px;- }-- &::-moz-range-track {- background: rgba(255, 255, 255, 0.08);- border-radius: 999px;- height: 6px;- }-- &:active {- transform: scaleY(2);- }-`;--export const SelectInput = styled.select`- -webkit-appearance: none;- -moz-appearance: none;- appearance: none;- background-color: rgba(255, 255, 255, 0.07);- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.52)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");- background-position: right 12px center;- background-repeat: no-repeat;- background-size: 12px 12px;- border: 1px solid rgba(255, 255, 255, 0.12);- border-radius: 8px;- color: rgba(255, 255, 255, 0.85);- cursor: pointer;- font-family: ${theme.font.family.sans};- font-size: 11px;- height: 24px;- outline: none;- padding: 0 34px 0 10px;- transition: border-color 0.15s ease;- width: 100%;-- &:hover {- border-color: rgba(255, 255, 255, 0.25);- }-`;--export const ValueDisplay = styled.div`- align-items: center;- background-color: rgba(255, 255, 255, 0.07);- border: 1px solid rgba(255, 255, 255, 0.12);- border-radius: 8px;- color: rgba(255, 255, 255, 0.85);- display: flex;- font-family: ${theme.font.family.sans};- font-size: 11px;- min-height: 31px;- overflow: hidden;- padding: 7px 10px;- text-overflow: ellipsis;- white-space: nowrap;- width: 100%;-`;--export const ToggleRow = styled.div`- align-items: center;- display: flex;- justify-content: space-between;- padding: 2px 0;-`;--export const ToggleText = styled.span`- color: rgba(255, 255, 255, 0.7);- font-size: 11px;-`;--const LabelWithInfoRow = styled.span`- align-items: center;- display: inline-flex;- gap: 6px;- min-width: 0;-`;--const InfoTooltipRoot = styled.span`- display: inline-flex;- position: relative;-`;--const InfoTooltipButton = styled.button`- align-items: center;- background: transparent;- border: none;- color: rgba(255, 255, 255, 0.32);- cursor: help;- display: inline-flex;- height: 14px;- justify-content: center;- margin: 0;- padding: 0;- transition: color 0.15s ease;- width: 14px;-- &:hover,- &:focus-visible {- color: rgba(255, 255, 255, 0.7);- outline: none;- }-- &:hover + span,- &:focus-visible + span {- opacity: 1;- transform: translate(-50%, 0);- }-`;--const InfoTooltipBubble = styled.span`- background: rgba(9, 9, 13, 0.96);- border: 1px solid rgba(255, 255, 255, 0.08);- border-radius: 10px;- box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);- color: rgba(255, 255, 255, 0.78);- font-size: 10px;- line-height: 1.45;- max-width: 220px;- padding: 8px 10px;- pointer-events: none;- position: fixed;- width: max-content;- z-index: 4;-- &::before {- background: rgba(9, 9, 13, 0.96);- border-left: 1px solid rgba(255, 255, 255, 0.08);- border-top: 1px solid rgba(255, 255, 255, 0.08);- content: '';- height: 8px;- left: 50%;- position: absolute;- top: -5px;- transform: translateX(-50%) rotate(45deg);- width: 8px;- }-`;--export const Toggle = styled.label`- display: block;- flex-shrink: 0;- height: 18px;- position: relative;- width: 28px;-`;--export const ToggleInput = styled.input`- height: 0;- opacity: 0;- position: absolute;- width: 0;-- &:checked + span {- background: #4a38f5;- }-- &:checked + span::after {- transform: translateX(12px);- }-`;--export const ToggleTrack = styled.span`- background: rgba(255, 255, 255, 0.14);- border-radius: 999px;- cursor: pointer;- inset: 0;- position: absolute;- transition: background 0.2s ease;-- &::after {- background: #fff;- border-radius: 50%;- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);- content: '';- height: 12px;- left: 2px;- position: absolute;- top: 3px;- transition: transform 0.2s ease;- width: 12px;- }-`;--export const ColorControlRow = styled.div`- align-items: center;- display: grid;- gap: 10px;- grid-template-columns: ${TAB_LABEL_WIDTH}px minmax(0, 1fr);-`;--export const ColorControlLabel = styled.span`- color: rgba(255, 255, 255, 0.7);- font-size: 11px;-`;--export const ColorPickerField = styled.div`- align-items: center;- cursor: text;- display: flex;- gap: 8px;- justify-content: flex-end;- justify-self: end;- min-height: 16px;- min-width: fit-content;- padding: 0;- position: relative;- width: auto;-`;--export const ColorSwatch = styled.span`- border: 1px solid rgba(255, 255, 255, 0.16);- border-radius: 4px;- box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);- flex-shrink: 0;- height: 16px;- width: 16px;-`;--export const ColorHexInput = styled.input`- appearance: none;- background: transparent;- border: none;- color: rgba(255, 255, 255, 0.85);- font-family: ${theme.font.family.mono};- font-size: 11px;- height: 16px;- letter-spacing: 0.02em;- line-height: 16px;- min-width: 7ch;- outline: none;- padding: 0;- text-align: right;- text-transform: uppercase;- width: 7ch;-- &::placeholder {- color: rgba(255, 255, 255, 0.32);- }-`;--export const ColorSwatchButton = styled.label`- align-items: center;- cursor: pointer;- display: inline-flex;- flex-shrink: 0;- height: 16px;- justify-content: center;- position: relative;-`;--export const ColorInput = styled.input`- appearance: none;- border: none;- cursor: pointer;- height: 100%;- inset: 0;- outline: none;- opacity: 0;- padding: 0;- position: absolute;- width: 100%;-`;--function normalizeHexColor(value: string): string | null {- const normalizedValue = value.trim().replace(/^#/, '');-- if (!/^([0-9a-f]{3}|[0-9a-f]{6})$/i.test(normalizedValue)) {- return null;- }-- return `#${normalizedValue.toUpperCase()}`;-}--type ColorFieldProps = {- ariaLabel: string;- onChange: (value: string) => void;- value: string;-};--export function ColorField({ ariaLabel, onChange, value }: ColorFieldProps) {- const normalizedValue = value.toUpperCase();- const [draftValue, setDraftValue] = useState(normalizedValue);-- useEffect(() => {- setDraftValue(normalizedValue);- }, [normalizedValue]);-- const commitDraftValue = () => {- const nextValue = normalizeHexColor(draftValue);-- if (!nextValue) {- setDraftValue(normalizedValue);- return;- }-- setDraftValue(nextValue);-- if (nextValue !== normalizedValue) {- onChange(nextValue);- }- };-- return (- <ColorPickerField>- <ColorHexInput- aria-label={`${ariaLabel} hex value`}- maxLength={7}- onBlur={commitDraftValue}- onClick={(event) => event.currentTarget.select()}- onChange={(event) => setDraftValue(event.target.value.toUpperCase())}- onFocus={(event) => event.currentTarget.select()}- onKeyDown={(event) => {- if (event.key === 'Enter') {- event.preventDefault();- event.currentTarget.blur();- }-- if (event.key === 'Escape') {- event.preventDefault();- setDraftValue(normalizedValue);- event.currentTarget.blur();- }- }}- spellCheck={false}- type="text"- value={draftValue}- />- <ColorSwatchButton title={ariaLabel}>- <ColorSwatch style={{ backgroundColor: normalizedValue }} />- <ColorInput- aria-label={ariaLabel}- onChange={(event) => onChange(event.target.value)}- type="color"- value={value}- />- </ColorSwatchButton>- </ColorPickerField>- );-}--export const ShapeRow = styled.div`- align-items: center;- display: grid;- gap: 10px;- grid-template-columns: ${TAB_LABEL_WIDTH}px minmax(0, 1fr) auto;-`;--export const UploadButton = styled.button`- align-items: center;- background: rgba(255, 255, 255, 0.06);- border: 1px solid rgba(255, 255, 255, 0.1);- border-radius: 8px;- color: rgba(255, 255, 255, 0.5);- cursor: pointer;- display: flex;- flex-shrink: 0;- font-size: 13px;- height: 24px;- justify-content: center;- transition: all 0.15s ease;- width: 24px;-- &:hover {- background: rgba(255, 255, 255, 0.12);- border-color: rgba(255, 255, 255, 0.22);- color: rgba(255, 255, 255, 0.8);- }-`;--export const ExportNameInput = styled.input`- background: rgba(255, 255, 255, 0.07);- border: 1px solid rgba(255, 255, 255, 0.12);- border-radius: 8px;- color: rgba(255, 255, 255, 0.85);- font-family: ${theme.font.family.sans};- font-size: 11px;- margin-bottom: 14px;- outline: none;- padding: 7px 10px;- transition: border-color 0.15s ease;- width: 100%;-- &:hover {- border-color: rgba(255, 255, 255, 0.25);- }-- &:focus {- border-color: #4a38f5;- }-- &::placeholder {- color: rgba(255, 255, 255, 0.3);- }-`;--export const ExportPreview = styled.div`- background: rgba(0, 0, 0, 0.4);- border: 1px solid rgba(255, 255, 255, 0.06);- border-radius: 10px;- color: rgba(255, 255, 255, 0.55);- font-family: ${theme.font.family.mono};- font-size: 10px;- line-height: 1.5;- margin-bottom: 14px;- max-height: 200px;- overflow-y: auto;- padding: 12px;-`;--export const ExportButton = styled.button<{ $primary?: boolean }>`- align-items: center;- background: ${(props) =>- props.$primary ? 'rgba(255, 255, 255, 0.24)' : 'rgba(255, 255, 255, 0.2)'};- border: none;- border-radius: 8px;- color: ${(props) =>- props.$primary ? 'rgba(255, 255, 255, 0.92)' : 'rgba(255, 255, 255, 0.8)'};- cursor: pointer;- display: flex;- font-family: ${theme.font.family.sans};- font-size: 11px;- font-weight: ${theme.font.weight.medium};- gap: 8px;- justify-content: center;- line-height: normal;- margin-top: ${(props) => (props.$primary ? '0' : '8px')};- padding: 7px 12px;- transition:- background-color 0.15s ease,- color 0.15s ease,- transform 0.15s ease;- width: 100%;-- &:hover {- background: ${(props) =>- props.$primary- ? 'rgba(255, 255, 255, 0.28)'- : 'rgba(255, 255, 255, 0.24)'};- color: rgba(255, 255, 255, 0.92);- }-- &:active {- background: ${(props) =>- props.$primary- ? 'rgba(255, 255, 255, 0.3)'- : 'rgba(255, 255, 255, 0.28)'};- transform: translateY(1px);- }-- &:focus-visible {- outline: 1px solid rgba(255, 255, 255, 0.36);- outline-offset: 2px;- }-- &:disabled {- background: rgba(255, 255, 255, 0.1);- color: rgba(255, 255, 255, 0.36);- cursor: not-allowed;- transform: none;- }-`;--export const ExportNote = styled.div`- color: rgba(255, 255, 255, 0.3);- font-size: 10px;- line-height: 1.5;- margin-top: 12px;-`;--export const SmallBody = styled.p`- color: rgba(255, 255, 255, 0.45);- font-size: 10px;- line-height: 1.6;- margin-bottom: 14px;-`;--type SliderControlProps = {- children: ReactNode;- max: number;- min: number;- onChange: ChangeEventHandler<HTMLInputElement>;- step?: number;- value: number;- valueLabel: string;-};--function getStepPrecision(step: number | undefined) {- if (!step || Number.isInteger(step)) {- return 0;- }-- const stepString = step.toString().toLowerCase();-- if (stepString.includes('e-')) {- const exponent = stepString.split('e-')[1];-- return exponent ? Number.parseInt(exponent, 10) : 0;- }-- return stepString.split('.')[1]?.length ?? 0;-}--function formatEditableValue(value: number, step: number | undefined) {- const precision = getStepPrecision(step);-- if (precision === 0) {- return String(Math.round(value));- }-- return String(Number(value.toFixed(precision)));-}--function clampAndSnapValue(- value: number,- min: number,- max: number,- step: number | undefined,-) {- const clampedValue = Math.min(Math.max(value, min), max);-- if (!step || step <= 0) {- return clampedValue;- }-- const precision = getStepPrecision(step);- const snappedValue = Math.round((clampedValue - min) / step) * step + min;-- return Number(Math.min(Math.max(snappedValue, min), max).toFixed(precision));-}--export function SliderControl({- children,- max,- min,- onChange,- step,- value,- valueLabel,-}: SliderControlProps) {- const [draftValue, setDraftValue] = useState<string | null>(null);- const valueInputReference = useRef<HTMLInputElement>(null);- const fillPercent = ((value - min) / (max - min)) * 100;- const isEditing = draftValue !== null;-- useEffect(() => {- if (!isEditing) {- return;- }-- valueInputReference.current?.focus();- valueInputReference.current?.select();- }, [isEditing]);-- const commitDraftValue = () => {- if (draftValue === null) {- return;- }-- const nextValue = Number.parseFloat(draftValue);- setDraftValue(null);-- if (!Number.isFinite(nextValue)) {- return;- }-- const normalizedValue = clampAndSnapValue(nextValue, min, max, step);-- onChange({- target: { value: String(normalizedValue) },- } as React.ChangeEvent<HTMLInputElement>);- };-- return (- <SliderLabel>- <span>{children}</span>- <SliderInput- $fillPercent={fillPercent}- max={max}- min={min}- onChange={onChange}- step={step}- type="range"- value={value}- />- {isEditing ? (- <EditableControlValueInput- inputMode="decimal"- max={max}- min={min}- onBlur={commitDraftValue}- onChange={(event) => setDraftValue(event.target.value)}- onKeyDown={(event) => {- if (event.key === 'Enter') {- event.preventDefault();- commitDraftValue();- return;- }-- if (event.key === 'Escape') {- event.preventDefault();- setDraftValue(null);- }- }}- ref={valueInputReference}- step={step}- type="number"- value={draftValue}- />- ) : (- <EditableControlValueButton- onClick={(event) => {- event.preventDefault();- event.stopPropagation();- setDraftValue(formatEditableValue(value, step));- }}- onMouseDown={(event) => {- event.preventDefault();- event.stopPropagation();- }}- type="button"- >- <ControlValue>{valueLabel}</ControlValue>- </EditableControlValueButton>- )}- </SliderLabel>- );-}--type SelectControlProps = {- children: ReactNode;- onChange: ChangeEventHandler<HTMLSelectElement>;- value: string;- options: Array<{ label: string; value: string }>;-};--export function SelectControl({- children,- onChange,- options,- value,-}: SelectControlProps) {- return (- <SelectLabel>- <span>{children}</span>- <SelectInput onChange={onChange} value={value}>- {options.map((option) => (- <option key={option.value} value={option.value}>- {option.label}- </option>- ))}- </SelectInput>- </SelectLabel>- );-}--type SegmentedControlProps = {- children: ReactNode;- onChange: (value: string) => void;- value: string;- options: Array<{ label: string; value: string }>;-};--export function SegmentedControl({- children,- onChange,- options,- value,-}: SegmentedControlProps) {- return (- <SegmentedLabel>- <span>{children}</span>- <SegmentedGroup- aria-label={typeof children === 'string' ? children : undefined}- role="radiogroup"- >- {options.map((option) => {- const isActive = option.value === value;-- return (- <SegmentedButton- $active={isActive}- aria-checked={isActive}- key={option.value}- onClick={() => {- if (!isActive) {- onChange(option.value);- }- }}- role="radio"- type="button"- >- {option.label}- </SegmentedButton>- );- })}- </SegmentedGroup>- </SegmentedLabel>- );-}--type ToggleControlProps = {- checked: boolean;- label: ReactNode;- onChange: ChangeEventHandler<HTMLInputElement>;-};--export function ToggleControl({- checked,- label,- onChange,-}: ToggleControlProps) {- return (- <ToggleRow>- <ToggleText>{label}</ToggleText>- <Toggle>- <ToggleInput checked={checked} onChange={onChange} type="checkbox" />- <ToggleTrack />- </Toggle>- </ToggleRow>- );-}--type LabelWithTooltipProps = {- description: string;- label: ReactNode;-};--export function LabelWithTooltip({- description,- label,-}: LabelWithTooltipProps) {- const buttonReference = useRef<HTMLButtonElement>(null);- const tooltipId = useId();- const [isMounted, setIsMounted] = useState(false);- const [isOpen, setIsOpen] = useState(false);- const [tooltipPosition, setTooltipPosition] = useState({- left: 0,- top: 0,- });-- useEffect(() => {- setIsMounted(true);- }, []);-- useEffect(() => {- if (!isOpen) {- return;- }-- const updateTooltipPosition = () => {- const button = buttonReference.current;-- if (!button) {- return;- }-- const rect = button.getBoundingClientRect();- setTooltipPosition({- left: rect.left + rect.width / 2,- top: rect.bottom + 12,- });- };-- updateTooltipPosition();-- window.addEventListener('resize', updateTooltipPosition);- window.addEventListener('scroll', updateTooltipPosition, true);-- return () => {- window.removeEventListener('resize', updateTooltipPosition);- window.removeEventListener('scroll', updateTooltipPosition, true);- };- }, [isOpen]);-- return (- <LabelWithInfoRow>- <span>{label}</span>- <InfoTooltipRoot>- <InfoTooltipButton- aria-describedby={isOpen ? tooltipId : undefined}- aria-label={description}- onBlur={() => setIsOpen(false)}- onFocus={() => setIsOpen(true)}- onMouseEnter={() => setIsOpen(true)}- onMouseLeave={() => setIsOpen(false)}- ref={buttonReference}- type="button"- >- <svg- aria-hidden="true"- fill="none"- height="14"- stroke="currentColor"- strokeLinecap="round"- strokeLinejoin="round"- strokeWidth="2"- viewBox="0 0 24 24"- width="14"- >- <path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" />- <path d="M12 9h.01" />- <path d="M11 12h1v4h1" />- </svg>- </InfoTooltipButton>- {isMounted && isOpen- ? createPortal(- <InfoTooltipBubble- id={tooltipId}- role="tooltip"- style={{- left: tooltipPosition.left,- top: tooltipPosition.top,- transform: 'translateX(-50%)',- }}- >- {description}- </InfoTooltipBubble>,- document.body,- )- : null}- </InfoTooltipRoot>- </LabelWithInfoRow>- );-}--type SectionToggleHeaderProps = {- checked: boolean;- children: ReactNode;- onChange: ChangeEventHandler<HTMLInputElement>;- preserveCase?: boolean;-};--export function SectionToggleHeader({- checked,- children,- onChange,- preserveCase,-}: SectionToggleHeaderProps) {- return (- <SectionHeader>- <SectionTitle $preserveCase={preserveCase}>{children}</SectionTitle>- <Toggle>- <ToggleInput checked={checked} onChange={onChange} type="checkbox" />- <ToggleTrack />- </Toggle>- </SectionHeader>- );-}diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/effect-components/TooltipPositionEffect.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/effect-components/TooltipPositionEffect.tsxnew file mode 100644index 00000000000..0fcc05263d5--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/controls/effect-components/TooltipPositionEffect.tsx@@ -0,0 +1,47 @@+'use client';++import { useEffect, type RefObject } from 'react';++type TooltipPositionEffectProps = {+ buttonRef: RefObject<HTMLButtonElement | null>;+ isOpen: boolean;+ setTooltipPosition: (position: { left: number; top: number }) => void;+};++export function TooltipPositionEffect({+ buttonRef,+ isOpen,+ setTooltipPosition,+}: TooltipPositionEffectProps) {+ useEffect(() => {+ if (!isOpen) {+ return;+ }++ const updateTooltipPosition = () => {+ const button = buttonRef.current;++ if (!button) {+ return;+ }++ const rect = button.getBoundingClientRect();+ setTooltipPosition({+ left: rect.left + rect.width / 2,+ top: rect.bottom + 12,+ });+ };++ updateTooltipPosition();++ window.addEventListener('resize', updateTooltipPosition);+ window.addEventListener('scroll', updateTooltipPosition, true);++ return () => {+ window.removeEventListener('resize', updateTooltipPosition);+ window.removeEventListener('scroll', updateTooltipPosition, true);+ };+ }, [isOpen, buttonRef, setTooltipPosition]);++ return null;+}diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/effect-components/CopyHalftoneShortcutEffect.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/effect-components/CopyHalftoneShortcutEffect.tsxnew file mode 100644index 00000000000..7aa8da8b422--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/effect-components/CopyHalftoneShortcutEffect.tsx@@ -0,0 +1,65 @@+'use client';++import { useEffect } from 'react';++function isEditablePasteTarget(target: EventTarget | null) {+ if (!(target instanceof HTMLElement)) {+ return false;+ }++ return (+ target.isContentEditable ||+ target instanceof HTMLInputElement ||+ target instanceof HTMLTextAreaElement ||+ target.closest('[contenteditable=""], [contenteditable="true"]') !== null+ );+}++function hasTextSelection() {+ const selection = window.getSelection();++ return selection !== null && selection.toString().trim().length > 0;+}++type CopyHalftoneShortcutEffectProps = {+ canvasLayerRef: React.RefObject<HTMLDivElement | null>;+ onCopy: (width: number, height: number) => void;+};++export function CopyHalftoneShortcutEffect({+ canvasLayerRef,+ onCopy,+}: CopyHalftoneShortcutEffectProps) {+ useEffect(() => {+ const handleKeyDown = (event: KeyboardEvent) => {+ const isCopyShortcut =+ (event.metaKey || event.ctrlKey) &&+ !event.shiftKey &&+ !event.altKey &&+ event.key.toLowerCase() === 'c';++ if (!isCopyShortcut) {+ return;+ }++ if (isEditablePasteTarget(event.target) || hasTextSelection()) {+ return;+ }++ const canvasLayer = canvasLayerRef.current;+ const width = Math.max(canvasLayer?.clientWidth ?? 0, 1);+ const height = Math.max(canvasLayer?.clientHeight ?? 0, 1);++ event.preventDefault();+ onCopy(width, height);+ };++ window.addEventListener('keydown', handleKeyDown);++ return () => {+ window.removeEventListener('keydown', handleKeyDown);+ };+ }, [canvasLayerRef, onCopy]);++ return null;+}diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/effect-components/PasteImageEffect.tsx b/packages/twenty-website-new/src/app/[locale]/halftone/_components/effect-components/PasteImageEffect.tsxnew file mode 100644index 00000000000..b8da6edb856--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/effect-components/PasteImageEffect.tsx@@ -0,0 +1,86 @@+'use client';++import { useEffect } from 'react';++const CLIPBOARD_IMAGE_EXTENSION_BY_MIME: Record<string, string> = {+ 'image/bmp': '.bmp',+ 'image/gif': '.gif',+ 'image/jpeg': '.jpg',+ 'image/png': '.png',+ 'image/svg+xml': '.svg',+ 'image/webp': '.webp',+};++function isEditablePasteTarget(target: EventTarget | null) {+ if (!(target instanceof HTMLElement)) {+ return false;+ }++ return (+ target.isContentEditable ||+ target instanceof HTMLInputElement ||+ target instanceof HTMLTextAreaElement ||+ target.closest('[contenteditable=""], [contenteditable="true"]') !== null+ );+}++function createPastedImageFile(file: File) {+ const hasExtension = /\.[^.]+$/i.test(file.name);++ if (hasExtension) {+ return file;+ }++ const extension =+ CLIPBOARD_IMAGE_EXTENSION_BY_MIME[file.type] ??+ CLIPBOARD_IMAGE_EXTENSION_BY_MIME['image/png'];++ return new File([file], `pasted-image-${Date.now()}${extension}`, {+ type: file.type || 'image/png',+ lastModified: Date.now(),+ });+}++type PasteImageEffectProps = {+ onPasteImage: (file: File) => void;+ onPasteError: () => void;+};++export function PasteImageEffect({+ onPasteImage,+ onPasteError,+}: PasteImageEffectProps) {+ useEffect(() => {+ const handlePaste = (event: ClipboardEvent) => {+ if (isEditablePasteTarget(event.target)) {+ return;+ }++ const imageItem = Array.from(event.clipboardData?.items ?? []).find(+ (item) => item.type.startsWith('image/'),+ );++ if (!imageItem) {+ return;+ }++ const pastedFile = imageItem.getAsFile();++ if (!pastedFile) {+ onPasteError();+ return;+ }++ event.preventDefault();+ onPasteImage(createPastedImageFile(pastedFile));+ };++ window.addEventListener('paste', handlePaste);++ return () => {+ window.removeEventListener('paste', handlePaste);+ };+ }, [onPasteImage, onPasteError]);++ return null;+}diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_components/halftone-studio.styles.ts b/packages/twenty-website-new/src/app/[locale]/halftone/_components/halftone-studio.styles.tsnew file mode 100644index 00000000000..cb82c6e90f2--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_components/halftone-studio.styles.ts@@ -0,0 +1,124 @@+import { LocalizedLink } from '@/lib/i18n';+import { theme } from '@/theme';+import { styled } from '@linaria/react';++const DESKTOP_CONTROLS_PANEL_WIDTH = 320;+const DESKTOP_CONTROLS_PANEL_OFFSET = 20;+const DESKTOP_CONTROLS_PANEL_FOOTPRINT =+ DESKTOP_CONTROLS_PANEL_WIDTH + DESKTOP_CONTROLS_PANEL_OFFSET;++export const StudioShell = styled.div<{ $background: string }>`+ background: ${(props) => props.$background};+ /* Full-screen tool: track the visible viewport so the bottom controls bar+ * is reachable on mobile Safari (where 100vh extends behind the URL bar). */+ height: 100vh;+ height: 100dvh;+ overflow: hidden;+ position: relative;+ width: 100%;+`;++export const ContentRegion = styled.div<{ $panelOpen: boolean }>`+ height: 100%;+ margin-right: auto;+ position: relative;+ transition: width 0.18s ease;+ width: ${(props) =>+ props.$panelOpen+ ? `calc(100% - ${DESKTOP_CONTROLS_PANEL_FOOTPRINT}px)`+ : '100%'};++ @media (max-width: ${theme.breakpoints.md - 1}px) {+ width: 100%;+ }+`;++export const CanvasLayer = styled.div`+ height: 100%;+ width: 100%;+`;++export const LogoLink = styled(LocalizedLink)`+ display: grid;+ left: 24px;+ position: absolute;+ top: 24px;+ z-index: 2;+`;++export const Hint = styled.div<{ $tone: 'dark' | 'light'; $visible: boolean }>`+ color: ${(props) =>+ props.$tone === 'dark'+ ? 'rgba(255, 255, 255, 0.34)'+ : 'rgba(0, 0, 0, 0.3)'};+ font-family: ${theme.font.family.mono};+ font-size: 11px;+ left: 50%;+ opacity: ${(props) => (props.$visible ? 1 : 0)};+ pointer-events: none;+ position: absolute;+ top: 20px;+ transform: translateX(-50%);+ transition: opacity 0.3s ease;+ z-index: 1;+`;++export const Status = styled.div<{+ $error: boolean;+ $tone: 'dark' | 'light';+ $visible: boolean;+}>`+ color: ${(props) => {+ if (props.$error) {+ return 'rgba(214, 66, 66, 0.92)';+ }++ return props.$tone === 'dark'+ ? 'rgba(255, 255, 255, 0.62)'+ : 'rgba(0, 0, 0, 0.55)';+ }};+ font-family: ${theme.font.family.mono};+ font-size: 11px;+ left: 50%;+ opacity: ${(props) => (props.$visible ? 1 : 0)};+ pointer-events: none;+ position: absolute;+ top: 44px;+ transform: translateX(-50%);+ transition: opacity 0.2s ease;+ z-index: 1;+`;++export const ControlsPositioner = styled.div`+ align-items: flex-start;+ bottom: 20px;+ display: flex;+ height: calc(100vh - 40px);+ height: calc(100dvh - 40px);+ justify-content: flex-end;+ pointer-events: none;+ position: fixed;+ right: 20px;+ top: 20px;+ z-index: 3;++ @media (max-width: ${theme.breakpoints.md - 1}px) {+ bottom: 16px;+ height: 48vh;+ left: 16px;+ right: 16px;+ top: auto;+ }+`;++export const ControlsPanelFrame = styled.div<{ $visible: boolean }>`+ height: ${(props) => (props.$visible ? '100%' : 'auto')};+ pointer-events: auto;+ @media (max-width: ${theme.breakpoints.md - 1}px) {+ width: ${(props) => (props.$visible ? '100%' : 'auto')};+ }+`;++export const HiddenFileInput = styled.input`+ display: none;+`;diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_hooks/use-default-halftone-image.ts b/packages/twenty-website-new/src/app/[locale]/halftone/_hooks/use-default-halftone-image.tsnew file mode 100644index 00000000000..ad6f4266305--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_hooks/use-default-halftone-image.ts@@ -0,0 +1,23 @@+'use client';++import { useEffect } from 'react';++type UseDefaultHalftoneImageOptions = {+ loadDefaultImageFile: () => Promise<File>;+ setImageFile: (updater: (currentFile: File | null) => File | null) => void;+};++export function useDefaultHalftoneImage({+ loadDefaultImageFile,+ setImageFile,+}: UseDefaultHalftoneImageOptions) {+ useEffect(() => {+ void loadDefaultImageFile()+ .then((file) => {+ setImageFile((currentFile) => currentFile ?? file);+ })+ .catch((error) => {+ console.error(error);+ });+ }, [loadDefaultImageFile, setImageFile]);+}diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_hooks/use-geometry-loader.ts b/packages/twenty-website-new/src/app/[locale]/halftone/_hooks/use-geometry-loader.tsnew file mode 100644index 00000000000..436e4348833--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_hooks/use-geometry-loader.ts@@ -0,0 +1,97 @@+import {+ createFallbackGeometry,+ disposeGeometryCache,+ getGeometryForSpec,+} from '@/lib/halftone/utils/geometry-registry';+import type { HalftoneGeometrySpec } from '@/lib/halftone/utils/state';+import { useEffect, useRef, useState } from 'react';+import type * as THREE from 'three';++type GeometryCacheEntry = THREE.BufferGeometry | Promise<THREE.BufferGeometry>;++type GeometryLoaderCallbacks = {+ onLoadStart: (label: string) => void;+ onLoadSuccess: () => void;+ onLoadError: (message: string) => void;+ onFallbackShape: (key: string) => void;+};++export function useGeometryLoader(+ selectedShape: HalftoneGeometrySpec | undefined,+ importedFiles: Record<string, File | undefined>,+ callbacks: GeometryLoaderCallbacks,+) {+ const [activeGeometry, setActiveGeometry] = useState<THREE.BufferGeometry>(+ () => createFallbackGeometry(),+ );+ const geometryCacheReference = useRef<Map<string, GeometryCacheEntry>>(+ new Map([['torusKnot', activeGeometry]]),+ );+ const lastSuccessfulShapeReference = useRef(+ selectedShape?.key ?? 'torusKnot',+ );++ useEffect(() => {+ const geometryCache = geometryCacheReference.current;++ return () => {+ disposeGeometryCache(geometryCache);+ };+ }, []);++ useEffect(() => {+ if (!selectedShape) {+ return;+ }++ let cancelled = false;+ const geometryCache = geometryCacheReference.current;++ // Invalidate cached geometry when an imported file changes so we don't+ // serve stale geometry from a previous file under the same key.+ if (selectedShape.kind === 'imported') {+ geometryCache.delete(selectedShape.key);+ callbacks.onLoadStart(selectedShape.label);+ } else {+ callbacks.onLoadSuccess();+ }++ void getGeometryForSpec(+ selectedShape,+ importedFiles[selectedShape.key],+ geometryCache,+ )+ .then((geometry) => {+ if (cancelled) {+ return;+ }++ lastSuccessfulShapeReference.current = selectedShape.key;+ setActiveGeometry(geometry);+ callbacks.onLoadSuccess();+ })+ .catch((error) => {+ if (cancelled) {+ return;+ }++ console.error(error);++ callbacks.onLoadError(+ error instanceof Error+ ? error.message+ : `${selectedShape.label} failed to load.`,+ );++ if (lastSuccessfulShapeReference.current !== selectedShape.key) {+ callbacks.onFallbackShape(lastSuccessfulShapeReference.current);+ }+ });++ return () => {+ cancelled = true;+ };+ }, [selectedShape, importedFiles, callbacks]);++ return activeGeometry;+}diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_hooks/use-image-element.ts b/packages/twenty-website-new/src/app/[locale]/halftone/_hooks/use-image-element.tsnew file mode 100644index 00000000000..e39efaa1b5c--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/halftone/_hooks/use-image-element.ts@@ -0,0 +1,41 @@+import { useEffect, useState } from 'react';++export function useImageElement(imageFile: File | null) {+ const [imageElement, setImageElement] = useState<HTMLImageElement | null>(+ null,+ );++ useEffect(() => {+ if (!imageFile) {+ setImageElement(null);+ return;+ }++ let cancelled = false;+ const url = URL.createObjectURL(imageFile);+ const img = new Image();++ img.onload = () => {+ if (!cancelled) {+ setImageElement(img);+ }+ };++ img.onerror = () => {+ if (!cancelled) {+ setImageElement(null);+ }+ };++ img.src = url;++ return () => {+ cancelled = true;+ img.onload = null;+ img.onerror = null;+ URL.revokeObjectURL(url);+ };+ }, [imageFile]);++ return imageElement;+}diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_lib/exporters.ts b/packages/twenty-website-new/src/app/[locale]/halftone/_lib/exporters.tsdeleted file mode 100644index 1dd512a2529..00000000000--- a/packages/twenty-website-new/src/app/[locale]/halftone/_lib/exporters.ts+++ /dev/null@@ -1,3467 +0,0 @@-import { normalizeExportComponentName } from '@/app/[locale]/halftone/_lib/exportNames';-import { GLASS_ENVIRONMENT_DATA_URL } from '@/app/[locale]/halftone/_lib/glassEnvironmentData';-import {- HALFTONE_FOOTPRINT_RUNTIME_SOURCE,- REFERENCE_PREVIEW_DISTANCE,- VIRTUAL_RENDER_HEIGHT,-} from '@/lib/halftone/footprint';-import {- LEGACY_HALFTONE_SETTING_KEYS,- isRoundedBandHalftoneSettings,- type HalftoneExportPose,- type HalftoneGeometrySpec,- type HalftoneStudioSettings,-} from '@/lib/halftone/state';-import { DRACO_DECODER_PATH } from '@/lib/visual-runtime/draco-decoder-path';--export type ReactExportSettings = {- includeNamedAndDefaultExport: boolean;- includePublicAssetUrl: boolean;- includeRegistryComment: boolean;- includeTsNoCheck: boolean;- includeUseClientDirective: boolean;- includeStyledMount: boolean;-};--export type ReactExportOptions = {- assetUrl?: string;- background?: string;- exportSettings?: Partial<ReactExportSettings>;- imageFilename?: string;- importedFile?: File;- initialPose?: HalftoneExportPose;- modelFilenameOverride?: string;- previewDistance?: number;-};--export const DEFAULT_REACT_EXPORT_SETTINGS: ReactExportSettings = {- includeNamedAndDefaultExport: true,- includePublicAssetUrl: true,- includeRegistryComment: true,- includeTsNoCheck: true,- includeUseClientDirective: true,- includeStyledMount: true,-};--const passThroughVertexShader = `- varying vec2 vUv;-- void main() {- vUv = uv;- gl_Position = vec4(position, 1.0);- }-`;--const blurFragmentShader = `- precision highp float;-- uniform sampler2D tInput;- uniform vec2 dir;- uniform vec2 res;-- varying vec2 vUv;-- void main() {- vec4 sum = vec4(0.0);- vec2 px = dir / res;-- float w[5];- w[0] = 0.227027;- w[1] = 0.1945946;- w[2] = 0.1216216;- w[3] = 0.054054;- w[4] = 0.016216;-- sum += texture2D(tInput, vUv) * w[0];-- for (int i = 1; i < 5; i++) {- float fi = float(i) * 3.0;- sum += texture2D(tInput, vUv + px * fi) * w[i];- sum += texture2D(tInput, vUv - px * fi) * w[i];- }-- gl_FragColor = sum;- }-`;--const imagePassthroughFragmentShader = `- precision highp float;-- uniform sampler2D tImage;- uniform vec2 imageSize;- uniform vec2 viewportSize;- uniform float zoom;- uniform float contrast;-- varying vec2 vUv;-- void main() {- float imageAspect = imageSize.x / imageSize.y;- float viewAspect = viewportSize.x / viewportSize.y;-- vec2 uv = vUv;-- if (imageAspect > viewAspect) {- float scale = viewAspect / imageAspect;- uv.y = (uv.y - 0.5) / scale + 0.5;- } else {- float scale = imageAspect / viewAspect;- uv.x = (uv.x - 0.5) / scale + 0.5;- }-- uv = (uv - 0.5) / zoom + 0.5;-- float inBounds = step(0.0, uv.x) * step(uv.x, 1.0)- * step(0.0, uv.y) * step(uv.y, 1.0);-- vec4 color = texture2D(tImage, clamp(uv, 0.0, 1.0));- vec3 contrastColor = clamp((color.rgb - 0.5) * contrast + 0.5, 0.0, 1.0);-- gl_FragColor = vec4(contrastColor, inBounds);- }-`;--const halftoneFragmentShader = `- precision highp float;-- uniform sampler2D tScene;- uniform sampler2D tGlow;- uniform vec2 effectResolution;- uniform vec2 logicalResolution;- uniform float tile;- uniform float s_3;- uniform float s_4;- uniform float applyToDarkAreas;- uniform vec3 dashColor;- uniform vec3 hoverDashColor;- uniform float time;- uniform float waveAmount;- uniform float waveSpeed;- uniform float footprintScale;- uniform vec2 interactionUv;- uniform vec2 interactionVelocity;- uniform vec2 dragOffset;- uniform float hoverHalftoneActive;- uniform float hoverHalftonePowerShift;- uniform float hoverHalftoneRadius;- uniform float hoverHalftoneWidthShift;- uniform float hoverLightStrength;- uniform float hoverLightRadius;- uniform float hoverFlowStrength;- uniform float hoverFlowRadius;- uniform float dragFlowStrength;- uniform float cropToBounds;-- varying vec2 vUv;-- float distSegment(in vec2 p, in vec2 a, in vec2 b) {- vec2 pa = p - a;- vec2 ba = b - a;- float denom = max(dot(ba, ba), 0.000001);- float h = clamp(dot(pa, ba) / denom, 0.0, 1.0);- return length(pa - ba * h);- }-- float lineSimpleEt(in vec2 p, in float r, in float thickness) {- vec2 a = vec2(0.5) + vec2(-r, 0.0);- vec2 b = vec2(0.5) + vec2(r, 0.0);- float distToSegment = distSegment(p, a, b);- float halfThickness = thickness * r;- return distToSegment - halfThickness;- }-- void main() {- if (cropToBounds > 0.5) {- vec4 boundsCheck = texture2D(tScene, vUv);- if (boundsCheck.a < 0.01) {- gl_FragColor = vec4(0.0);- return;- }- }-- vec2 fragCoord =- (gl_FragCoord.xy / max(effectResolution, vec2(1.0))) * logicalResolution;- float halftoneSize = max(tile * max(footprintScale, 0.001), 1.0);- vec2 pointerPx = interactionUv * logicalResolution;- vec2 fragDelta = fragCoord - pointerPx;- float fragDist = length(fragDelta);- vec2 radialDir = fragDist > 0.001 ? fragDelta / fragDist : vec2(0.0, 1.0);- float velocityMagnitude = length(interactionVelocity);- vec2 motionDir = velocityMagnitude > 0.001- ? interactionVelocity / velocityMagnitude- : vec2(0.0, 0.0);- float motionBias = velocityMagnitude > 0.001- ? dot(-radialDir, motionDir) * 0.5 + 0.5- : 0.5;-- float hoverLightMask = 0.0;- if (hoverLightStrength > 0.0) {- float lightRadiusPx = hoverLightRadius * logicalResolution.y;- hoverLightMask = smoothstep(lightRadiusPx, 0.0, fragDist);- }-- float hoverHalftoneMask = 0.0;- if (hoverHalftoneActive > 0.0) {- float hoverHalftoneRadiusPx = hoverHalftoneRadius * logicalResolution.y;- hoverHalftoneMask =- smoothstep(hoverHalftoneRadiusPx, 0.0, fragDist) *- clamp(hoverHalftoneActive, 0.0, 1.0);- }-- float hoverFlowMask = 0.0;- if (hoverFlowStrength > 0.0) {- float hoverRadiusPx = hoverFlowRadius * logicalResolution.y;- hoverFlowMask = smoothstep(hoverRadiusPx, 0.0, fragDist);- }-- vec2 hoverDisplacement =- radialDir * hoverFlowStrength * hoverFlowMask * halftoneSize * 0.55 +- motionDir * hoverFlowStrength * hoverFlowMask * (0.4 + motionBias) * halftoneSize * 1.15;- vec2 travelDisplacement = dragOffset * dragFlowStrength * 0.45;- vec2 effectCoord = fragCoord + hoverDisplacement + travelDisplacement;-- float bandRow = floor(effectCoord.y / halftoneSize);- float waveOffset =- waveAmount * sin(time * waveSpeed + bandRow * 0.5) * halftoneSize;- effectCoord.x += waveOffset;-- vec2 cellIndex = floor(effectCoord / halftoneSize);- vec2 sampleUv = clamp(- (cellIndex + 0.5) * halftoneSize / logicalResolution,- vec2(0.0),- vec2(1.0)- );- vec2 cellUv = fract(effectCoord / halftoneSize);-- vec4 sceneSample = texture2D(tScene, sampleUv);- float mask = smoothstep(0.02, 0.08, sceneSample.a);- float localPower = clamp(- s_3 + hoverHalftonePowerShift * hoverHalftoneMask,- -1.5,- 1.5- );- float localWidth = clamp(- s_4 + hoverHalftoneWidthShift * hoverHalftoneMask,- 0.05,- 1.4- );- float lightLift =- hoverLightStrength * hoverLightMask * mix(0.78, 1.18, motionBias) * 0.22;- float toneValue =- (sceneSample.r + sceneSample.g + sceneSample.b) * (1.0 / 3.0);- if (applyToDarkAreas > 0.5) {- toneValue = 1.0 - toneValue;- }- // Preserve the pre-toneTarget light-mode response by keeping the power- // bias inside the averaged tone calculation.- float powerBias = localPower * length(vec2(0.5)) * (1.0 / 3.0);- float bandRadius = clamp(- toneValue + powerBias + lightLift,- 0.0,- 1.0- ) * 1.86 * 0.5;-- float alpha = 0.0;- if (bandRadius > 0.0001) {- float signedDistance = lineSimpleEt(cellUv, bandRadius, localWidth);- float edge = 0.02;- alpha = (1.0 - smoothstep(0.0, edge, signedDistance)) * mask;- }-- vec3 activeDashColor = mix(dashColor, hoverDashColor, hoverHalftoneMask);- vec3 color = activeDashColor * alpha;- gl_FragColor = vec4(color, alpha);-- #include <tonemapping_fragment>- #include <colorspace_fragment>- }-`;--const HALFTONE_TRANSMISSION_SHADER_PREFIX = String.raw`-uniform float chromaticAberration;-uniform float anisotropicBlur;-uniform float time;-uniform float distortion;-uniform float distortionScale;-uniform float temporalDistortion;-uniform sampler2D buffer;--vec3 random3(vec3 c) {- float j = 4096.0 * sin(dot(c, vec3(17.0, 59.4, 15.0)));- vec3 r;- r.z = fract(512.0 * j);- j *= 0.125;- r.x = fract(512.0 * j);- j *= 0.125;- r.y = fract(512.0 * j);- return r - 0.5;-}--uint hash(uint x) {- x += (x << 10u);- x ^= (x >> 6u);- x += (x << 3u);- x ^= (x >> 11u);- x += (x << 15u);- return x;-}--uint hash(uvec2 v) { return hash(v.x ^ hash(v.y)); }-uint hash(uvec3 v) { return hash(v.x ^ hash(v.y) ^ hash(v.z)); }-uint hash(uvec4 v) {- return hash(v.x ^ hash(v.y) ^ hash(v.z) ^ hash(v.w));-}--float floatConstruct(uint m) {- const uint ieeeMantissa = 0x007FFFFFu;- const uint ieeeOne = 0x3F800000u;- m &= ieeeMantissa;- m |= ieeeOne;- float f = uintBitsToFloat(m);- return f - 1.0;-}--float randomBase(float x) {- return floatConstruct(hash(floatBitsToUint(x)));-}-float randomBase(vec2 v) {- return floatConstruct(hash(floatBitsToUint(v)));-}-float randomBase(vec3 v) {- return floatConstruct(hash(floatBitsToUint(v)));-}-float randomBase(vec4 v) {- return floatConstruct(hash(floatBitsToUint(v)));-}--float rand(float seed) {- return randomBase(vec3(gl_FragCoord.xy, seed));-}--const float F3 = 0.3333333;-const float G3 = 0.1666667;--float snoise(vec3 p) {- vec3 s = floor(p + dot(p, vec3(F3)));- vec3 x = p - s + dot(s, vec3(G3));- vec3 e = step(vec3(0.0), x - x.yzx);- vec3 i1 = e * (1.0 - e.zxy);- vec3 i2 = 1.0 - e.zxy * (1.0 - e);- vec3 x1 = x - i1 + G3;- vec3 x2 = x - i2 + 2.0 * G3;- vec3 x3 = x - 1.0 + 3.0 * G3;- vec4 w;- vec4 d;- w.x = dot(x, x);- w.y = dot(x1, x1);- w.z = dot(x2, x2);- w.w = dot(x3, x3);- w = max(0.6 - w, 0.0);- d.x = dot(random3(s), x);- d.y = dot(random3(s + i1), x1);- d.z = dot(random3(s + i2), x2);- d.w = dot(random3(s + 1.0), x3);- w *= w;- w *= w;- d *= w;- return dot(d, vec4(52.0));-}--float snoiseFractal(vec3 m) {- return 0.5333333 * snoise(m)- + 0.2666667 * snoise(2.0 * m)- + 0.1333333 * snoise(4.0 * m)- + 0.0666667 * snoise(8.0 * m);-}-`;--const HALFTONE_TRANSMISSION_PARS_FRAGMENT = String.raw`-#ifdef USE_TRANSMISSION- uniform float _transmission;- uniform float thickness;- uniform float attenuationDistance;- uniform vec3 attenuationColor;- uniform sampler2D refractionEnvMap;- uniform float useEnvMapRefraction;- #ifdef USE_TRANSMISSIONMAP- uniform sampler2D transmissionMap;- #endif- #ifdef USE_THICKNESSMAP- uniform sampler2D thicknessMap;- #endif- uniform vec2 transmissionSamplerSize;- uniform sampler2D transmissionSamplerMap;- uniform mat4 modelMatrix;- uniform mat4 projectionMatrix;- varying vec3 vWorldPosition;-- vec3 getVolumeTransmissionRay(- const in vec3 n,- const in vec3 v,- const in float thicknessValue,- const in float ior,- const in mat4 modelMatrix- ) {- vec3 refractionVector = refract(-v, normalize(n), 1.0 / ior);- vec3 modelScale;- modelScale.x = length(vec3(modelMatrix[0].xyz));- modelScale.y = length(vec3(modelMatrix[1].xyz));- modelScale.z = length(vec3(modelMatrix[2].xyz));- return normalize(refractionVector) * thicknessValue * modelScale;- }-- float applyIorToRoughness(- const in float roughnessValue,- const in float ior- ) {- return roughnessValue * clamp(ior * 2.0 - 2.0, 0.0, 1.0);- }-- vec2 directionToEquirectUv(const in vec3 direction) {- vec3 dir = normalize(direction);- vec2 uv = vec2(- atan(dir.z, dir.x) * 0.15915494309189535 + 0.5,- asin(clamp(dir.y, -1.0, 1.0)) * 0.3183098861837907 + 0.5- );-- return vec2(fract(uv.x), 1.0 - clamp(uv.y, 0.0, 1.0));- }-- vec4 getTransmissionSample(- const in vec2 fragCoord,- const in vec3 transmissionDirection,- const in float roughnessValue,- const in float ior- ) {- if (useEnvMapRefraction > 0.5) {- return texture2D(- refractionEnvMap,- directionToEquirectUv(transmissionDirection)- );- }-- float framebufferLod =- log2(transmissionSamplerSize.x) *- applyIorToRoughness(roughnessValue, ior);- return texture2D(buffer, fragCoord.xy);- }-- vec3 applyVolumeAttenuation(- const in vec3 radiance,- const in float transmissionDistance,- const in vec3 attenuationColorValue,- const in float attenuationDistanceValue- ) {- if (isinf(attenuationDistanceValue)) {- return radiance;- }-- vec3 attenuationCoefficient =- -log(attenuationColorValue) / attenuationDistanceValue;- vec3 transmittance =- exp(-attenuationCoefficient * transmissionDistance);-- return transmittance * radiance;- }-- vec4 getIBLVolumeRefraction(- const in vec3 n,- const in vec3 v,- const in float roughnessValue,- const in vec3 diffuseColor,- const in vec3 specularColor,- const in float specularF90,- const in vec3 position,- const in mat4 modelMatrix,- const in mat4 viewMatrix,- const in mat4 projMatrix,- const in float ior,- const in float thicknessValue,- const in vec3 attenuationColorValue,- const in float attenuationDistanceValue- ) {- vec3 transmissionRay = getVolumeTransmissionRay(- n,- v,- thicknessValue,- ior,- modelMatrix- );- vec3 refractedRayExit = position + transmissionRay;- vec4 ndcPos =- projMatrix * viewMatrix * vec4(refractedRayExit, 1.0);- vec2 refractionCoords = ndcPos.xy / ndcPos.w;- refractionCoords += 1.0;- refractionCoords /= 2.0;- vec3 transmissionDirection = normalize(transmissionRay);- vec4 transmittedLight = getTransmissionSample(- refractionCoords,- transmissionDirection,- roughnessValue,- ior- );- vec3 attenuatedColor = applyVolumeAttenuation(- transmittedLight.rgb,- length(transmissionRay),- attenuationColorValue,- attenuationDistanceValue- );- vec3 F = EnvironmentBRDF(- n,- v,- specularColor,- specularF90,- roughnessValue- );- return vec4(- (1.0 - F) * attenuatedColor * diffuseColor,- transmittedLight.a- );- }-#endif-`;--const HALFTONE_TRANSMISSION_FRAGMENT_TEMPLATE = String.raw`-material.transmission = _transmission;-material.transmissionAlpha = 1.0;-material.thickness = thickness;-material.attenuationDistance = attenuationDistance;-material.attenuationColor = attenuationColor;-#ifdef USE_TRANSMISSIONMAP- material.transmission *= texture2D(transmissionMap, vUv).r;-#endif-#ifdef USE_THICKNESSMAP- material.thickness *= texture2D(thicknessMap, vUv).g;-#endif--vec3 pos = vWorldPosition;-float runningSeed = 0.0;-vec3 v = normalize(cameraPosition - pos);-vec3 n = inverseTransformDirection(normal, viewMatrix);-vec3 transmission = vec3(0.0);-float transmissionR;-float transmissionG;-float transmissionB;-float randomCoords = rand(runningSeed++);-float thicknessSmear =- thickness * max(pow(roughnessFactor, 0.33), anisotropicBlur);-vec3 distortionNormal = vec3(0.0);-vec3 temporalOffset = vec3(time, -time, -time) * temporalDistortion;--if (distortion > 0.0) {- distortionNormal = distortion * vec3(- snoiseFractal(vec3(pos * distortionScale + temporalOffset)),- snoiseFractal(vec3(pos.zxy * distortionScale - temporalOffset)),- snoiseFractal(vec3(pos.yxz * distortionScale + temporalOffset))- );-}--for (float i = 0.0; i < __SAMPLES__.0; i++) {- vec3 sampleNorm = normalize(- n +- roughnessFactor * roughnessFactor * 2.0 *- normalize(- vec3(- rand(runningSeed++) - 0.5,- rand(runningSeed++) - 0.5,- rand(runningSeed++) - 0.5- )- ) *- pow(rand(runningSeed++), 0.33) +- distortionNormal- );-- transmissionR = getIBLVolumeRefraction(- sampleNorm,- v,- material.roughness,- material.diffuseColor,- material.specularColor,- material.specularF90,- pos,- modelMatrix,- viewMatrix,- projectionMatrix,- material.ior,- material.thickness + thicknessSmear * (i + randomCoords) / float(__SAMPLES__),- material.attenuationColor,- material.attenuationDistance- ).r;-- transmissionG = getIBLVolumeRefraction(- sampleNorm,- v,- material.roughness,- material.diffuseColor,- material.specularColor,- material.specularF90,- pos,- modelMatrix,- viewMatrix,- projectionMatrix,- material.ior * (1.0 + chromaticAberration * (i + randomCoords) / float(__SAMPLES__)),- material.thickness + thicknessSmear * (i + randomCoords) / float(__SAMPLES__),- material.attenuationColor,- material.attenuationDistance- ).g;-- transmissionB = getIBLVolumeRefraction(- sampleNorm,- v,- material.roughness,- material.diffuseColor,- material.specularColor,- material.specularF90,- pos,- modelMatrix,- viewMatrix,- projectionMatrix,- material.ior * (1.0 + 2.0 * chromaticAberration * (i + randomCoords) / float(__SAMPLES__)),- material.thickness + thicknessSmear * (i + randomCoords) / float(__SAMPLES__),- material.attenuationColor,- material.attenuationDistance- ).b;-- transmission.r += transmissionR;- transmission.g += transmissionG;- transmission.b += transmissionB;-}--transmission /= __SAMPLES__.0;-totalDiffuse = mix(totalDiffuse, transmission.rgb, material.transmission);-`;--const GEOMETRY_RUNTIME_SOURCE = String.raw`-function makePolarShape(radiusFunction, segments = 320) {- const shape = new THREE.Shape();-- for (let segmentIndex = 0; segmentIndex <= segments; segmentIndex += 1) {- const angle = (segmentIndex / segments) * Math.PI * 2;- const radius = radiusFunction(angle);- const x = Math.cos(angle) * radius;- const y = Math.sin(angle) * radius;-- if (segmentIndex === 0) {- shape.moveTo(x, y);- } else {- shape.lineTo(x, y);- }- }-- return shape;-}--function makeReliefGeometry(shape, options = {}) {- const {- bevelSegments = 8,- bevelSize = 0.08,- bevelThickness = 0.1,- depth = 0.58,- waveDepth = 0.016,- waves = 8,- } = options;-- const geometry = new THREE.ExtrudeGeometry(shape, {- depth,- steps: 2,- bevelEnabled: true,- bevelThickness,- bevelSize,- bevelSegments,- curveSegments: 96,- });-- geometry.center();-- const position = geometry.attributes.position;- let maxRadius = 0;-- for (let vertexIndex = 0; vertexIndex < position.count; vertexIndex += 1) {- maxRadius = Math.max(- maxRadius,- Math.hypot(position.getX(vertexIndex), position.getY(vertexIndex)),- );- }-- const fullDepth = depth + bevelThickness * 2;-- for (let vertexIndex = 0; vertexIndex < position.count; vertexIndex += 1) {- const x = position.getX(vertexIndex);- const y = position.getY(vertexIndex);- const z = position.getZ(vertexIndex);- const radius = Math.hypot(x, y) / maxRadius;- const angle = Math.atan2(y, x);- const faceAmount = Math.min(1, Math.abs(z) / (fullDepth * 0.5));- const rimLift = Math.exp(-Math.pow((radius - 0.84) / 0.12, 2));- const innerDish = Math.exp(-Math.pow((radius - 0.42) / 0.2, 2));- const wave =- Math.cos(angle * waves) *- Math.exp(-Math.pow((radius - 0.72) / 0.16, 2)) *- waveDepth;- const relief = faceAmount * (0.14 * rimLift - 0.055 * innerDish + wave);-- position.setZ(vertexIndex, z + (z >= 0 ? 1 : -1) * relief);- }-- position.needsUpdate = true;- geometry.computeVertexNormals();- geometry.computeBoundingBox();- geometry.computeBoundingSphere();-- return geometry;-}--function mergeGeometries(geometries) {- if (geometries.length === 1) {- return geometries[0];- }-- let totalVertices = 0;- let totalIndices = 0;- let hasUv = false;-- const geometryInfos = geometries.map((geometry) => {- const position = geometry.attributes.position;- const normal = geometry.attributes.normal;- const uv = geometry.attributes.uv ?? null;- const index = geometry.index;- const indexCount = index ? index.count : position.count;-- totalVertices += position.count;- totalIndices += indexCount;- hasUv = hasUv || uv !== null;-- return {- index,- indexCount,- normal,- position,- uv,- vertexCount: position.count,- };- });-- const positions = new Float32Array(totalVertices * 3);- const normals = new Float32Array(totalVertices * 3);- const uvs = hasUv ? new Float32Array(totalVertices * 2) : null;- const indices = new Uint32Array(totalIndices);-- let vertexOffset = 0;- let indexOffset = 0;-- for (const geometryInfo of geometryInfos) {- for (let vertexIndex = 0; vertexIndex < geometryInfo.vertexCount; vertexIndex += 1) {- const positionOffset = (vertexOffset + vertexIndex) * 3;- positions[positionOffset] = geometryInfo.position.getX(vertexIndex);- positions[positionOffset + 1] = geometryInfo.position.getY(vertexIndex);- positions[positionOffset + 2] = geometryInfo.position.getZ(vertexIndex);- normals[positionOffset] = geometryInfo.normal.getX(vertexIndex);- normals[positionOffset + 1] = geometryInfo.normal.getY(vertexIndex);- normals[positionOffset + 2] = geometryInfo.normal.getZ(vertexIndex);-- if (uvs !== null) {- const uvOffset = (vertexOffset + vertexIndex) * 2;- uvs[uvOffset] = geometryInfo.uv?.getX(vertexIndex) ?? 0;- uvs[uvOffset + 1] = geometryInfo.uv?.getY(vertexIndex) ?? 0;- }- }-- if (geometryInfo.index) {- for (let localIndex = 0; localIndex < geometryInfo.indexCount; localIndex += 1) {- indices[indexOffset + localIndex] =- geometryInfo.index.getX(localIndex) + vertexOffset;- }- } else {- for (let localIndex = 0; localIndex < geometryInfo.indexCount; localIndex += 1) {- indices[indexOffset + localIndex] = localIndex + vertexOffset;- }- }-- vertexOffset += geometryInfo.vertexCount;- indexOffset += geometryInfo.indexCount;- }-- const merged = new THREE.BufferGeometry();- merged.setAttribute('position', new THREE.BufferAttribute(positions, 3));- merged.setAttribute('normal', new THREE.BufferAttribute(normals, 3));-- if (uvs !== null) {- merged.setAttribute('uv', new THREE.BufferAttribute(uvs, 2));- }-- merged.setIndex(new THREE.BufferAttribute(indices, 1));-- return merged;-}--function makeArrowTarget() {- const targetParts = [];- const arrowParts = [];- const baseRadius = 1.35;- const baseDepth = 0.32;- const bevel = 0.12;- const points = [];- const segments = 16;-- points.push(new THREE.Vector2(0, -baseDepth / 2));- points.push(new THREE.Vector2(baseRadius - bevel, -baseDepth / 2));-- for (let segmentIndex = 0; segmentIndex <= segments; segmentIndex += 1) {- const angle = Math.PI / 2 + (segmentIndex / segments) * (Math.PI / 2);- points.push(- new THREE.Vector2(- baseRadius - bevel + Math.cos(angle) * bevel,- -baseDepth / 2 + bevel + Math.sin(angle) * bevel,- ),- );- }-- points.push(new THREE.Vector2(baseRadius, baseDepth / 2 - bevel));-- for (let segmentIndex = 0; segmentIndex <= segments; segmentIndex += 1) {- const angle = (segmentIndex / segments) * (Math.PI / 2);- points.push(- new THREE.Vector2(- baseRadius - bevel + Math.cos(angle) * bevel,- baseDepth / 2 - bevel + Math.sin(angle) * bevel,- ),- );- }-- points.push(new THREE.Vector2(0, baseDepth / 2));-- const disc = new THREE.LatheGeometry(points, 64);- disc.applyMatrix4(new THREE.Matrix4().makeRotationX(Math.PI / 2));- targetParts.push(disc);-- for (const radius of [0.45, 0.85, 1.22]) {- const ring = new THREE.TorusGeometry(radius, 0.14, 16, 64);- ring.applyMatrix4(- new THREE.Matrix4().makeTranslation(0, 0, baseDepth / 2 + 0.04),- );- targetParts.push(ring);- }-- const bump = new THREE.SphereGeometry(0.32, 32, 24, 0, Math.PI * 2, 0, Math.PI / 2);- bump.applyMatrix4(new THREE.Matrix4().makeRotationX(-Math.PI / 2));- bump.applyMatrix4(new THREE.Matrix4().makeTranslation(0, 0, baseDepth / 2));- targetParts.push(bump);-- const shaftLength = 1.5;- const shaftRadius = 0.05;- const shaft = new THREE.CylinderGeometry(shaftRadius, shaftRadius, shaftLength, 10, 1);- shaft.applyMatrix4(new THREE.Matrix4().makeTranslation(0, shaftLength / 2, 0));- arrowParts.push(shaft);-- const head = new THREE.ConeGeometry(0.12, 0.35, 10);- head.applyMatrix4(new THREE.Matrix4().makeTranslation(0, -0.15, 0));- arrowParts.push(head);-- for (let finIndex = 0; finIndex < 3; finIndex += 1) {- const finShape = new THREE.Shape();- finShape.moveTo(0, 0);- finShape.lineTo(0.22, 0.25);- finShape.lineTo(0, 0.5);- finShape.lineTo(0, 0);-- const finGeometry = new THREE.ExtrudeGeometry(finShape, {- depth: 0.012,- bevelEnabled: false,- });-- finGeometry.applyMatrix4(new THREE.Matrix4().makeTranslation(0.05, 0, -0.006));- finGeometry.applyMatrix4(- new THREE.Matrix4().makeRotationY((finIndex * Math.PI * 2) / 3),- );- finGeometry.applyMatrix4(- new THREE.Matrix4().makeTranslation(0, shaftLength - 0.45, 0),- );- arrowParts.push(finGeometry);- }-- const nock = new THREE.SphereGeometry(0.065, 8, 8);- nock.applyMatrix4(new THREE.Matrix4().makeTranslation(0, shaftLength + 0.03, 0));- arrowParts.push(nock);-- const aim = new THREE.Matrix4().makeRotationX(Math.PI / 2.15);- const tilt = new THREE.Matrix4().makeRotationZ(Math.PI / 5);- const shift = new THREE.Matrix4().makeTranslation(0.15, 0.15, 0.12);-- for (const geometry of arrowParts) {- geometry.applyMatrix4(aim);- geometry.applyMatrix4(tilt);- geometry.applyMatrix4(shift);- }-- const merged = mergeGeometries([...targetParts, ...arrowParts]);- merged.computeVertexNormals();- merged.computeBoundingSphere();-- return merged;-}--function makeDollarCoin() {- const parts = [];- const baseRadius = 1.3;- const baseDepth = 0.45;- const bevel = 0.18;- const points = [];- const segments = 20;-- points.push(new THREE.Vector2(0, -baseDepth / 2));- points.push(new THREE.Vector2(baseRadius - bevel, -baseDepth / 2));-- for (let segmentIndex = 0; segmentIndex <= segments; segmentIndex += 1) {- const angle = -Math.PI / 2 + (segmentIndex / segments) * Math.PI;- points.push(- new THREE.Vector2(- baseRadius - bevel + Math.cos(angle) * bevel,- Math.sin(angle) * (baseDepth / 2),- ),- );- }-- points.push(new THREE.Vector2(baseRadius - bevel, baseDepth / 2));- points.push(new THREE.Vector2(0, baseDepth / 2));-- const disc = new THREE.LatheGeometry(points, 64);- disc.applyMatrix4(new THREE.Matrix4().makeRotationX(Math.PI / 2));- parts.push(disc);-- const frontRim = new THREE.TorusGeometry(baseRadius - 0.22, 0.05, 12, 64);- frontRim.applyMatrix4(- new THREE.Matrix4().makeTranslation(0, 0, baseDepth / 2 - 0.01),- );- parts.push(frontRim);-- const backRim = new THREE.TorusGeometry(baseRadius - 0.22, 0.05, 12, 64);- backRim.applyMatrix4(- new THREE.Matrix4().makeTranslation(0, 0, -(baseDepth / 2 - 0.01)),- );- parts.push(backRim);-- const createDollarSign = () => {- const geometries = [];- const tubeRadius = 0.1;- const curveRadius = 0.28;- const verticalOffset = 0.22;-- const bar = new THREE.CylinderGeometry(0.05, 0.05, 1.3, 12);- geometries.push(bar);-- const topArc = new THREE.TorusGeometry(curveRadius, tubeRadius, 16, 32, Math.PI);- topArc.applyMatrix4(new THREE.Matrix4().makeRotationZ(Math.PI / 2));- topArc.applyMatrix4(- new THREE.Matrix4().makeTranslation(0.05, verticalOffset, 0),- );- geometries.push(topArc);-- const bottomArc = new THREE.TorusGeometry(curveRadius, tubeRadius, 16, 32, Math.PI);- bottomArc.applyMatrix4(new THREE.Matrix4().makeRotationZ(-Math.PI / 2));- bottomArc.applyMatrix4(- new THREE.Matrix4().makeTranslation(-0.05, -verticalOffset, 0),- );- geometries.push(bottomArc);-- const topSerif = new THREE.CylinderGeometry(tubeRadius, tubeRadius, 0.22, 12);- topSerif.applyMatrix4(new THREE.Matrix4().makeRotationZ(Math.PI / 2));- topSerif.applyMatrix4(- new THREE.Matrix4().makeTranslation(0.16, verticalOffset + curveRadius, 0),- );- geometries.push(topSerif);-- const bottomSerif = new THREE.CylinderGeometry(tubeRadius, tubeRadius, 0.22, 12);- bottomSerif.applyMatrix4(new THREE.Matrix4().makeRotationZ(Math.PI / 2));- bottomSerif.applyMatrix4(- new THREE.Matrix4().makeTranslation(-0.16, -verticalOffset - curveRadius, 0),- );- geometries.push(bottomSerif);-- const diagonalLength = Math.sqrt(0.1 * 0.1 + (verticalOffset * 2) ** 2);- const diagonalAngle = Math.atan2(verticalOffset * 2, 0.1);- const diagonal = new THREE.CylinderGeometry(tubeRadius, tubeRadius, diagonalLength + 0.12, 12);- diagonal.applyMatrix4(- new THREE.Matrix4().makeRotationZ(diagonalAngle - Math.PI / 2),- );- geometries.push(diagonal);-- return geometries;- };-- for (const geometry of createDollarSign()) {- geometry.applyMatrix4(- new THREE.Matrix4().makeTranslation(0, 0, baseDepth / 2 + 0.01),- );- parts.push(geometry);- }-- for (const geometry of createDollarSign()) {- geometry.applyMatrix4(new THREE.Matrix4().makeRotationY(Math.PI));- geometry.applyMatrix4(- new THREE.Matrix4().makeTranslation(0, 0, -(baseDepth / 2 + 0.01)),- );- parts.push(geometry);- }-- const merged = mergeGeometries(parts);- merged.computeVertexNormals();- merged.computeBoundingSphere();-- return merged;-}--function createBuiltinGeometry(shapeKey) {- switch (shapeKey) {- case 'torusKnot':- return new THREE.TorusKnotGeometry(1, 0.35, 200, 32);- case 'sphere':- return new THREE.SphereGeometry(1.4, 64, 64);- case 'torus':- return new THREE.TorusGeometry(1, 0.45, 64, 100);- case 'icosahedron':- return new THREE.IcosahedronGeometry(1.4, 4);- case 'box':- return new THREE.BoxGeometry(2.1, 2.1, 2.1, 6, 6, 6);- case 'cone':- return new THREE.ConeGeometry(1.2, 2.4, 64, 10);- case 'cylinder':- return new THREE.CylinderGeometry(1, 1, 2.3, 64, 10);- case 'octahedron':- return new THREE.OctahedronGeometry(1.5, 2);- case 'dodecahedron':- return new THREE.DodecahedronGeometry(1.35, 1);- case 'tetrahedron':- return new THREE.TetrahedronGeometry(1.7, 1);- case 'sunCoin':- return makeReliefGeometry(- makePolarShape(- (angle) => 1 + 0.17 * Math.pow(0.5 + 0.5 * Math.cos(angle * 12), 1.5),- ),- { depth: 0.62, waves: 12, waveDepth: 0.018 },- );- case 'lotusCoin':- return makeReliefGeometry(- makePolarShape((angle) => 0.88 + 0.3 * Math.pow(Math.sin(angle * 4), 2)),- { depth: 0.64, waves: 8, waveDepth: 0.014 },- );- case 'arrowTarget':- return makeArrowTarget();- case 'dollarCoin':- return makeDollarCoin();- default:- return new THREE.TorusKnotGeometry(1, 0.35, 200, 32);- }-}-`;--const IMPORTED_RUNTIME_SHARED_SOURCE = String.raw`-const EMPTY_TEXTURE_DATA_URL =- 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO8B7Q8AAAAASUVORK5CYII=';--function createLoadingManager() {- const loadingManager = new THREE.LoadingManager();- loadingManager.setURLModifier((url) =>- /\.(png|jpe?g|webp|gif|bmp)$/i.test(url) ? EMPTY_TEXTURE_DATA_URL : url,- );- return loadingManager;-}--function normalizeImportedGeometry(geometry) {- geometry.computeBoundingBox();-- let boundingBox = geometry.boundingBox;- let center = new THREE.Vector3();- let size = new THREE.Vector3();-- boundingBox?.getCenter(center);- boundingBox?.getSize(size);- geometry.translate(-center.x, -center.y, -center.z);-- const dimensions = [size.x, size.y, size.z];- const thinnestAxis = dimensions.indexOf(Math.min(...dimensions));-- if (thinnestAxis === 0) {- geometry.applyMatrix4(new THREE.Matrix4().makeRotationY(Math.PI / 2));- } else if (thinnestAxis === 1) {- geometry.applyMatrix4(new THREE.Matrix4().makeRotationX(Math.PI / 2));- }-- geometry.computeBoundingBox();- geometry.computeBoundingSphere();-- const radius = geometry.boundingSphere?.radius || 1;- const scale = 1.6 / radius;- geometry.scale(scale, scale, scale);-- geometry.computeBoundingBox();- boundingBox = geometry.boundingBox;- center = new THREE.Vector3();- boundingBox?.getCenter(center);- geometry.translate(-center.x, -center.y, -center.z);-- geometry.computeVertexNormals();- geometry.computeBoundingBox();- geometry.computeBoundingSphere();-- return geometry;-}--function extractMergedGeometry(root, emptyMessage) {- root.updateMatrixWorld(true);- const geometries = [];-- root.traverse((object) => {- if (!(object instanceof THREE.Mesh) || !object.geometry) {- return;- }-- const geometry = object.geometry.clone();-- if (!geometry.attributes.normal) {- geometry.computeVertexNormals();- }-- geometry.applyMatrix4(object.matrixWorld);- geometries.push(geometry);- });-- if (geometries.length === 0) {- throw new Error(emptyMessage);- }-- return normalizeImportedGeometry(mergeGeometries(geometries));-}-`;--const IMPORTED_FBX_RUNTIME_SOURCE = String.raw`--function parseFbxGeometry(buffer, label) {- const originalWarn = console.warn;-- console.warn = (...args) => {- if (typeof args[0] === 'string' && args[0].startsWith('THREE.FBXLoader:')) {- return;- }-- originalWarn(...args);- };-- try {- const root = new FBXLoader(createLoadingManager()).parse(buffer, '');- return extractMergedGeometry(root, label + ' did not contain any mesh geometry.');- } finally {- console.warn = originalWarn;- }-}-`;--const IMPORTED_GLB_RUNTIME_SOURCE = String.raw`-const DRACO_DECODER_PATH = ${JSON.stringify(DRACO_DECODER_PATH)};--function parseGlbGeometry(buffer, label) {- return new Promise((resolve, reject) => {- const loadingManager = createLoadingManager();- const dracoLoader = new DRACOLoader(loadingManager);- dracoLoader.setDecoderPath(DRACO_DECODER_PATH);-- const loader = new GLTFLoader(loadingManager);- loader.setDRACOLoader(dracoLoader);-- const cleanup = () => {- dracoLoader.dispose();- };-- loader.parse(- buffer,- '',- (gltf) => {- try {- resolve(- extractMergedGeometry(- gltf.scene,- label + ' did not contain any mesh geometry.',- ),- );- } catch (error) {- reject(error);- } finally {- cleanup();- }- },- (error) => {- cleanup();- reject(error);- },- );- });-}-`;--function createImportedRuntimeSource(loader: HalftoneGeometrySpec['loader']) {- const loaderSource =- loader === 'fbx'- ? IMPORTED_FBX_RUNTIME_SOURCE- : IMPORTED_GLB_RUNTIME_SOURCE;-- return `${IMPORTED_RUNTIME_SHARED_SOURCE}-${loaderSource}--async function loadImportedGeometryFromUrl(modelUrl, label) {- const response = await fetch(modelUrl);-- if (!response.ok) {- throw new Error('Unable to load ' + label + ' from ' + modelUrl + '.');- }-- const buffer = await response.arrayBuffer();-- ${- loader === 'fbx'- ? 'return parseFbxGeometry(buffer, label);'- : 'return parseGlbGeometry(buffer, label);'- }-}-`;-}--type ExportedShapeDescriptor = {- filename: string | null;- key: string;- kind: HalftoneGeometrySpec['kind'];- label: string;- loader: HalftoneGeometrySpec['loader'] | null;-};--export type ParsedExportedPreset = {- componentName: string | null;- imageAssetReference: string | null;- initialPose: HalftoneExportPose;- modelAssetReference: string | null;- previewDistance: number;- settings: HalftoneStudioSettings;- shape: ExportedShapeDescriptor;-};--function getExportedShapeLoader(- shape: ExportedShapeDescriptor,-): HalftoneGeometrySpec['loader'] | null {- if (shape.loader) {- return shape.loader;- }-- const filename = shape.filename?.toLowerCase() ?? '';-- if (filename.endsWith('.fbx')) {- return 'fbx';- }-- if (filename.endsWith('.glb')) {- return 'glb';- }-- return null;-}--function createImportedGeometryRuntimeSource(shape: ExportedShapeDescriptor) {- if (shape.kind !== 'imported') {- return '';- }-- const loader = getExportedShapeLoader(shape) ?? 'glb';-- return createImportedRuntimeSource(loader);-}--function toIllustrationRegistryKey(componentName: string) {- return componentName.charAt(0).toLowerCase() + componentName.slice(1);-}--function toPublicAssetDestination(assetUrl: string) {- return assetUrl.startsWith('/') ? `public${assetUrl}` : assetUrl;-}--function normalizeReactExportSettings(- exportSettings?: Partial<ReactExportSettings>,-): ReactExportSettings {- return {- ...DEFAULT_REACT_EXPORT_SETTINGS,- ...exportSettings,- };-}--function getReactImportBlock(- exportSettings: ReactExportSettings,- isImageMode: boolean,- shape: ExportedShapeDescriptor,-) {- const imports = new Set<string>();-- imports.add("import { useEffect, useRef, type CSSProperties } from 'react';");- imports.add("import * as THREE from 'three';");-- if (exportSettings.includeStyledMount) {- imports.add("import { styled } from '@linaria/react';");- }-- if (!isImageMode) {- imports.add(- "import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment.js';",- );- }-- const loader = getExportedShapeLoader(shape);-- if (shape.kind === 'imported' && loader === 'fbx') {- imports.add(- "import { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js';",- );- }-- if (shape.kind === 'imported' && loader === 'glb') {- imports.add(- "import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';",- );- imports.add(- "import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';",- );- }-- return Array.from(imports).join('\n');-}--function getStandaloneThreeImports(- isImageMode: boolean,- shape: ExportedShapeDescriptor,-) {- if (isImageMode) {- return `import * as THREE from 'three';`;- }-- const imports = [- `import * as THREE from 'three';`,- `import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js';`,- ];-- const loader = getExportedShapeLoader(shape);-- if (shape.kind === 'imported' && loader === 'fbx') {- imports.push(- `import { FBXLoader } from 'three/addons/loaders/FBXLoader.js';`,- );- }-- if (shape.kind === 'imported' && loader === 'glb') {- imports.push(- `import { DRACOLoader } from 'three/addons/loaders/DRACOLoader.js';`,- `import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';`,- );- }-- return imports.join('\n ');-}--function getTwentyReactHeaderComment(- componentName: string,- registryKey: string,- assetUrl?: string,-) {- const lines = [- `// Suggested component destination: src/illustrations/${componentName}.tsx`,- ];-- if (assetUrl) {- lines.push(- `// Suggested public asset destination: ${toPublicAssetDestination(assetUrl)}`,- );- }-- lines.push(- `// illustrations-registry.tsx: import { ${componentName} } from './${componentName}';`,- `// illustrations-registry.tsx: ${registryKey}: ${componentName},`,- );-- return `${lines.join('\n')}\n`;-}--function createDefaultExportPose(): HalftoneExportPose {- return {- autoElapsed: 0,- rotateElapsed: 0,- rotationX: 0,- rotationY: 0,- rotationZ: 0,- targetRotationX: 0,- targetRotationY: 0,- timeElapsed: 0,- };-}--function normalizeExportPose(- pose: HalftoneExportPose | undefined,-): HalftoneExportPose {- const fallback = createDefaultExportPose();-- if (!pose) {- return fallback;- }-- return {- autoElapsed: Number.isFinite(pose.autoElapsed) ? pose.autoElapsed : 0,- rotateElapsed: Number.isFinite(pose.rotateElapsed) ? pose.rotateElapsed : 0,- rotationX: Number.isFinite(pose.rotationX) ? pose.rotationX : 0,- rotationY: Number.isFinite(pose.rotationY) ? pose.rotationY : 0,- rotationZ: Number.isFinite(pose.rotationZ) ? pose.rotationZ : 0,- targetRotationX: Number.isFinite(pose.targetRotationX)- ? pose.targetRotationX- : 0,- targetRotationY: Number.isFinite(pose.targetRotationY)- ? pose.targetRotationY- : 0,- timeElapsed: Number.isFinite(pose.timeElapsed) ? pose.timeElapsed : 0,- };-}--function normalizePreviewDistance(previewDistance: number | undefined) {- return Number.isFinite(previewDistance)- ? Math.max(previewDistance ?? REFERENCE_PREVIEW_DISTANCE, 0.001)- : REFERENCE_PREVIEW_DISTANCE;-}--function extractSerializedJson<T>(- content: string,- name: string,- nextName: string,-) {- const pattern = new RegExp(- String.raw`const\s+${name}\s*=\s*([\s\S]*?)\s*;\s*\r?\nconst\s+${nextName}\s*=`,- );- const match = content.match(pattern);-- if (!match) {- throw new Error(`Could not find ${name} in the exported preset.`);- }-- try {- return JSON.parse(match[1]) as T;- } catch (error) {- throw new Error(- error instanceof Error- ? `Could not parse ${name}: ${error.message}`- : `Could not parse ${name}.`,- );- }-}--function extractFirstMatch(content: string, patterns: RegExp[]) {- for (const pattern of patterns) {- const match = content.match(pattern);-- if (match && match.length > 1) {- return match[match.length - 1] ?? null;- }- }-- return null;-}--function assertRoundedBandPreset(- settings: HalftoneStudioSettings,-): asserts settings is HalftoneStudioSettings {- if (isRoundedBandHalftoneSettings(settings.halftone)) {- return;- }-- const halftoneValue =- settings.halftone && typeof settings.halftone === 'object'- ? (settings.halftone as Record<string, unknown>)- : null;- const detectedLegacyKeys = LEGACY_HALFTONE_SETTING_KEYS.filter((key) =>- halftoneValue ? key in halftoneValue : false,- );- const suffix =- detectedLegacyKeys.length > 0- ? ` Detected legacy keys: ${detectedLegacyKeys.join(', ')}.`- : '';-- throw new Error(- `This preset uses the legacy halftone effect and can no longer be imported.${suffix}`,- );-}--export function parseExportedPreset(content: string): ParsedExportedPreset {- const settings = extractSerializedJson<HalftoneStudioSettings>(- content,- 'settings',- 'shape',- );- assertRoundedBandPreset(settings);- const shape = extractSerializedJson<ExportedShapeDescriptor>(- content,- 'shape',- 'initialPose',- );- const initialPose = normalizeExportPose(- (() => {- try {- return extractSerializedJson<HalftoneExportPose>(- content,- 'initialPose',- 'previewDistance',- );- } catch {- return extractSerializedJson<HalftoneExportPose>(- content,- 'initialPose',- 'VIRTUAL_RENDER_HEIGHT',- );- }- })(),- );- const previewDistanceMatch = content.match(- /const\s+previewDistance\s*=\s*([0-9]+(?:\.[0-9]+)?)\s*;/,- );- const previewDistance = normalizePreviewDistance(- previewDistanceMatch ? Number(previewDistanceMatch[1]) : undefined,- );- const componentName =- extractFirstMatch(content, [- /export\s+default\s+function\s+([A-Za-z0-9_]+)/,- /export\s+function\s+([A-Za-z0-9_]+)/,- /export\s+default\s+([A-Za-z0-9_]+)\s*;/,- /<title>([^<]+)<\/title>/i,- ]) ?? null;- const modelAssetReference = extractFirstMatch(content, [- /modelUrl\s*=\s*(['"`])([\s\S]*?)\1/,- /modelUrl\s*:\s*(['"`])([\s\S]*?)\1/,- ]);- const imageAssetReference = extractFirstMatch(content, [- /imageUrl\s*=\s*(['"`])([\s\S]*?)\1/,- /imageUrl\s*:\s*(['"`])([\s\S]*?)\1/,- ]);-- return {- componentName,- imageAssetReference,- initialPose,- modelAssetReference,- previewDistance,- settings,- shape,- };-}--export function deriveExportComponentName(- shape: HalftoneGeometrySpec | undefined,- importedFile: File | undefined,-) {- const source =- importedFile?.name ??- shape?.filename ??- shape?.label ??- shape?.key ??- 'HalftoneDashes';-- return normalizeExportComponentName(source);-}--function createShapeDescriptor(- shape: HalftoneGeometrySpec | undefined,- settings: HalftoneStudioSettings,- importedFile?: File,- modelFilenameOverride?: string,-): ExportedShapeDescriptor {- if (!shape) {- return {- filename: null,- key: settings.shapeKey,- kind: 'builtin',- label: settings.shapeKey,- loader: null,- };- }-- const effectiveImportedFilename =- modelFilenameOverride ?? importedFile?.name ?? shape.filename ?? null;-- return {- filename:- shape.kind === 'imported'- ? effectiveImportedFilename- : (shape.filename ?? null),- key: shape.key,- kind: shape.kind,- label:- shape.kind === 'imported'- ? (effectiveImportedFilename ?? shape.label)- : shape.label,- loader: shape.loader ?? null,- };-}--function getModelMimeType(- file: File,- loader: HalftoneGeometrySpec['loader'] | null,-) {- if (file.type) {- return file.type;- }-- if (loader === 'glb' || file.name.toLowerCase().endsWith('.glb')) {- return 'model/gltf-binary';- }-- if (loader === 'fbx' || file.name.toLowerCase().endsWith('.fbx')) {- return 'application/octet-stream';- }-- return 'application/octet-stream';-}--async function fileToDataUrl(- file: File,- loader: HalftoneGeometrySpec['loader'] | null,-) {- const buffer = await file.arrayBuffer();- const blob = new Blob([buffer], {- type: getModelMimeType(file, loader),- });-- return await new Promise<string>((resolve, reject) => {- const reader = new FileReader();-- reader.onerror = () => {- reject(reader.error ?? new Error(`Unable to read ${file.name}.`));- };- reader.onload = () => {- if (typeof reader.result !== 'string') {- reject(new Error(`Unable to encode ${file.name}.`));- return;- }-- resolve(reader.result);- };-- reader.readAsDataURL(blob);- });-}--const GLASS_MATERIAL_RUNTIME_SOURCE = String.raw`-const GLASS_ENVIRONMENT_DATA_URL = ${JSON.stringify(GLASS_ENVIRONMENT_DATA_URL)};-const GLASS_THICKNESS_TO_WORLD_UNITS = 1 / 320;-const GLASS_ATTENUATION_DISTANCE_MIN = 0.12;-const GLASS_ENVIRONMENT_INTENSITY_BASE = 0.18;-const GLASS_ENVIRONMENT_INTENSITY_MULTIPLIER = 0.12;-const GLASS_ENVIRONMENT_ZOOM = 1.55;-const GLASS_TRANSMISSION_BACKGROUND = new THREE.Color(0x030303);-const MAX_TEXTURE_ANISOTROPY = 8;-const HALFTONE_TRANSMISSION_SHADER_PREFIX = ${JSON.stringify(- HALFTONE_TRANSMISSION_SHADER_PREFIX,-)};-const HALFTONE_TRANSMISSION_PARS_FRAGMENT = ${JSON.stringify(- HALFTONE_TRANSMISSION_PARS_FRAGMENT,-)};-const HALFTONE_TRANSMISSION_FRAGMENT_TEMPLATE = ${JSON.stringify(- HALFTONE_TRANSMISSION_FRAGMENT_TEMPLATE,-)};--class HalftoneTransmissionMaterial extends THREE.MeshPhysicalMaterial {- constructor(samples = 10) {- super();-- this.halftoneUniforms = {- chromaticAberration: { value: 0.05 },- transmission: { value: 0 },- _transmission: { value: 1 },- transmissionMap: { value: null },- refractionEnvMap: { value: null },- useEnvMapRefraction: { value: 0 },- roughness: { value: 0 },- thickness: { value: 0 },- thicknessMap: { value: null },- attenuationDistance: { value: Infinity },- attenuationColor: { value: new THREE.Color('white') },- anisotropicBlur: { value: 0.1 },- time: { value: 0 },- distortion: { value: 0 },- distortionScale: { value: 0.5 },- temporalDistortion: { value: 0 },- buffer: { value: null },- };-- this.customProgramCacheKey = () => 'halftone-transmission-' + samples;-- this.onBeforeCompile = (shader) => {- shader.uniforms = {- ...shader.uniforms,- ...this.halftoneUniforms,- };- shader.defines ??= {};-- if (this.anisotropy > 0) {- shader.defines.USE_ANISOTROPY = '';- }-- shader.defines.USE_TRANSMISSION = '';- shader.fragmentShader =- HALFTONE_TRANSMISSION_SHADER_PREFIX + shader.fragmentShader;- shader.fragmentShader = shader.fragmentShader.replace(- '#include <transmission_pars_fragment>',- HALFTONE_TRANSMISSION_PARS_FRAGMENT,- );- shader.fragmentShader = shader.fragmentShader.replace(- '#include <transmission_fragment>',- HALFTONE_TRANSMISSION_FRAGMENT_TEMPLATE.replaceAll(- '__SAMPLES__',- String(samples),- ),- );- };-- Object.keys(this.halftoneUniforms).forEach((key) => {- Object.defineProperty(this, key, {- configurable: true,- enumerable: true,- get: () => this.halftoneUniforms[key]?.value,- set: (value) => {- this.halftoneUniforms[key].value = value;- },- });- });- }-}--function setTextureSampling(texture, renderer) {- texture.generateMipmaps = true;- texture.magFilter = THREE.LinearFilter;- texture.minFilter = THREE.LinearMipmapLinearFilter;- texture.anisotropy = Math.min(- renderer.capabilities.getMaxAnisotropy(),- MAX_TEXTURE_ANISOTROPY,- );-}--function disposeEnvironmentScene(scene) {- scene.traverse((object) => {- if (object.geometry) {- object.geometry.dispose();- }-- if (Array.isArray(object.material)) {- object.material.forEach((material) => material.dispose());- return;- }-- object.material?.dispose?.();- });-}--function createSolidEnvironmentTexture(renderer) {- const pmremGenerator = new THREE.PMREMGenerator(renderer);- const environmentTexture = pmremGenerator.fromScene(- new RoomEnvironment(),- 0.04,- ).texture;- pmremGenerator.dispose();-- return environmentTexture;-}--function getTextureImageSize(texture) {- const image = texture.image;-- return {- height:- image?.naturalHeight ?? image?.videoHeight ?? image?.height ?? undefined,- width:- image?.naturalWidth ?? image?.videoWidth ?? image?.width ?? undefined,- };-}--function createZoomedGlassTexture(sourceTexture, renderer, zoom) {- if (zoom <= 1) {- return sourceTexture;- }-- const { width, height } = getTextureImageSize(sourceTexture);-- if (!width || !height) {- return sourceTexture;- }-- const canvas = document.createElement('canvas');- canvas.width = width;- canvas.height = height;-- const context = canvas.getContext('2d');-- if (!context) {- return sourceTexture;- }-- const cropWidth = width / zoom;- const cropHeight = height / zoom;- const sourceX = (width - cropWidth) / 2;- const sourceY = (height - cropHeight) / 2;-- context.drawImage(- sourceTexture.image,- sourceX,- sourceY,- cropWidth,- cropHeight,- 0,- 0,- width,- height,- );-- const zoomedTexture = new THREE.CanvasTexture(canvas);- zoomedTexture.colorSpace = sourceTexture.colorSpace;- zoomedTexture.wrapS = THREE.ClampToEdgeWrapping;- zoomedTexture.wrapT = THREE.ClampToEdgeWrapping;- setTextureSampling(zoomedTexture, renderer);- zoomedTexture.needsUpdate = true;-- return zoomedTexture;-}--function createStudioGlassEnvironmentTexture(renderer, backdropTexture) {- const pmremGenerator = new THREE.PMREMGenerator(renderer);- const environmentTexture = backdropTexture- ? pmremGenerator.fromEquirectangular(backdropTexture).texture- : pmremGenerator.fromScene(new RoomEnvironment(), 0.04).texture;- pmremGenerator.dispose();-- return environmentTexture;-}--function createFallbackGlassBackdropTexture(renderer) {- const texture = new THREE.DataTexture(- new Uint8Array([3, 3, 3, 255]),- 1,- 1,- THREE.RGBAFormat,- );- texture.colorSpace = THREE.SRGBColorSpace;- texture.wrapS = THREE.ClampToEdgeWrapping;- texture.wrapT = THREE.ClampToEdgeWrapping;- texture.mapping = THREE.EquirectangularReflectionMapping;- setTextureSampling(texture, renderer);- texture.needsUpdate = true;-- return texture;-}--function loadTexture(url, renderer, colorSpace) {- const loader = new THREE.TextureLoader();-- return new Promise((resolve, reject) => {- loader.load(- url,- (texture) => {- texture.colorSpace = colorSpace;- setTextureSampling(texture, renderer);- resolve(texture);- },- undefined,- reject,- );- });-}--async function loadGlassEnvironmentTexture(renderer) {- const sourceBackgroundTexture = await loadTexture(- GLASS_ENVIRONMENT_DATA_URL,- renderer,- THREE.SRGBColorSpace,- );- const backgroundTexture = createZoomedGlassTexture(- sourceBackgroundTexture,- renderer,- GLASS_ENVIRONMENT_ZOOM,- );- if (backgroundTexture !== sourceBackgroundTexture) {- sourceBackgroundTexture.dispose();- }- backgroundTexture.mapping = THREE.EquirectangularReflectionMapping;- backgroundTexture.wrapS = THREE.ClampToEdgeWrapping;- backgroundTexture.wrapT = THREE.ClampToEdgeWrapping;- backgroundTexture.needsUpdate = true;- const environmentTexture = createStudioGlassEnvironmentTexture(- renderer,- backgroundTexture,- );-- return {- backgroundTexture,- environmentTexture,- };-}--async function createHalftoneMaterialAssets(renderer) {- const solidEnvironmentTexture = createSolidEnvironmentTexture(renderer);-- try {- const glassEnvironmentAssets = await loadGlassEnvironmentTexture(renderer);-- return {- glassBackgroundTexture: glassEnvironmentAssets.backgroundTexture,- glassEnvironmentTexture: glassEnvironmentAssets.environmentTexture,- solidEnvironmentTexture,- };- } catch {- const fallbackGlassBackdropTexture =- createFallbackGlassBackdropTexture(renderer);- const fallbackGlassEnvironmentTexture =- createStudioGlassEnvironmentTexture(renderer);-- return {- glassBackgroundTexture: fallbackGlassBackdropTexture,- glassEnvironmentTexture: fallbackGlassEnvironmentTexture,- solidEnvironmentTexture,- };- }-}--function createHalftoneMaterial() {- return new HalftoneTransmissionMaterial();-}--function applyHalftoneMaterialSettings(material, materialSettings, materialAssets) {- const isGlass = materialSettings.surface === 'glass';- const glassThickness =- materialSettings.thickness * GLASS_THICKNESS_TO_WORLD_UNITS;- const glassEnvironmentIntensity =- GLASS_ENVIRONMENT_INTENSITY_BASE +- materialSettings.environmentPower * GLASS_ENVIRONMENT_INTENSITY_MULTIPLIER;- const glassAttenuationDistance = Math.max(- glassThickness * 4,- GLASS_ATTENUATION_DISTANCE_MIN,- );-- material.color.set(isGlass ? '#ffffff' : materialSettings.color);- material.roughness = materialSettings.roughness;- material.metalness = materialSettings.metalness;- material.envMap = isGlass- ? materialAssets.glassEnvironmentTexture- : materialAssets.solidEnvironmentTexture;- material.envMapIntensity = isGlass- ? GLASS_ENVIRONMENT_INTENSITY_BASE +- materialSettings.environmentPower * GLASS_ENVIRONMENT_INTENSITY_MULTIPLIER- : 0.25;- material.clearcoat = isGlass ? 1 : 0;- material.clearcoatRoughness = isGlass- ? Math.max(materialSettings.roughness * 0.25, 0.01)- : 0.08;- material.reflectivity = isGlass ? 0.98 : 0.5;- material.transmission = 0;- material._transmission = isGlass ? 1 : 0;- material.refractionEnvMap = isGlass ? materialAssets.glassBackgroundTexture : null;- material.useEnvMapRefraction = isGlass ? 1 : 0;- material.thickness = isGlass ? glassThickness : 0;- material.ior = isGlass ? materialSettings.refraction : 1.5;- material.buffer = null;- material.bumpMap = null;- material.bumpScale = 0;- material.roughnessMap = null;- material.side = THREE.FrontSide;- material.transparent = false;- material.opacity = 1;- material.depthWrite = true;- material.attenuationColor.set(isGlass ? materialSettings.color : 'white');- material.attenuationDistance = isGlass- ? glassAttenuationDistance- : Infinity;- material.anisotropicBlur = isGlass- ? THREE.MathUtils.lerp(0.03, 0.12, materialSettings.roughness)- : 0.1;- material.chromaticAberration = isGlass ? 0 : 0.05;- material.distortion = 0;- material.distortionScale = 0.5;- material.temporalDistortion = 0;- material.userData.halftoneIsGlass = isGlass;- material.userData.halftoneGlassBacksideThickness = isGlass- ? glassThickness * 2- : 0;- material.userData.halftoneGlassBacksideEnvIntensity = isGlass- ? glassEnvironmentIntensity * 2.8- : 0;- material.userData.halftoneUseEnvironmentRefraction = isGlass;- material.envMapIntensity = isGlass ? glassEnvironmentIntensity : 0.25;-- material.needsUpdate = true;-}--function disposeHalftoneMaterialAssets(materialAssets) {- materialAssets.glassBackgroundTexture.dispose();-- if (materialAssets.glassEnvironmentTexture !== materialAssets.glassBackgroundTexture) {- materialAssets.glassEnvironmentTexture.dispose();- }-- materialAssets.solidEnvironmentTexture.dispose();-}-`;--function serializeRuntimeSource(- settings: HalftoneStudioSettings,- shape: ExportedShapeDescriptor,- initialPose: HalftoneExportPose,- previewDistance: number | undefined,-) {- const isImageMode = settings.sourceMode === 'image';- const normalizedPreviewDistance = normalizePreviewDistance(previewDistance);-- return `-const settings = ${JSON.stringify(settings, null, 2)};-const shape = ${JSON.stringify(shape, null, 2)};-const initialPose = ${JSON.stringify(initialPose, null, 2)};-const previewDistance = ${JSON.stringify(normalizedPreviewDistance)};-const VIRTUAL_RENDER_HEIGHT = ${VIRTUAL_RENDER_HEIGHT};-const passThroughVertexShader = ${JSON.stringify(passThroughVertexShader)};-const blurFragmentShader = ${JSON.stringify(blurFragmentShader)};-const halftoneFragmentShader = ${JSON.stringify(halftoneFragmentShader)};-${isImageMode ? `const imagePassthroughFragmentShader = ${JSON.stringify(imagePassthroughFragmentShader)};` : ''}--${HALFTONE_FOOTPRINT_RUNTIME_SOURCE}--${isImageMode ? '' : GEOMETRY_RUNTIME_SOURCE}--${isImageMode ? '' : createImportedGeometryRuntimeSource(shape)}--${isImageMode ? '' : GLASS_MATERIAL_RUNTIME_SOURCE}--function createRenderTarget(width, height) {- return new THREE.WebGLRenderTarget(width, height, {- minFilter: THREE.LinearFilter,- magFilter: THREE.LinearFilter,- format: THREE.RGBAFormat,- });-}--function createInteractionState() {- return {- autoElapsed: initialPose.autoElapsed,- activePointerId: null,- dragging: false,- hoverStrength: 0,- mouseX: 0.5,- mouseY: 0.5,- pointerInside: false,- pointerVelocityX: 0,- pointerVelocityY: 0,- pointerX: 0,- pointerY: 0,- rotateElapsed: initialPose.rotateElapsed,- rotationX: initialPose.rotationX,- rotationVelocityX: 0,- rotationY: initialPose.rotationY,- rotationVelocityY: 0,- rotationZ: initialPose.rotationZ,- rotationVelocityZ: 0,- smoothedMouseX: 0.5,- smoothedMouseY: 0.5,- targetRotationX: initialPose.targetRotationX,- targetRotationY: initialPose.targetRotationY,- velocityX: 0,- velocityY: 0,- };-}--${- isImageMode- ? ''- : `-function setPrimaryLightPosition(light, angleDegrees, height) {- const lightAngle = (angleDegrees * Math.PI) / 180;- light.position.set(Math.cos(lightAngle) * 5, height, Math.sin(lightAngle) * 5);-}--function applySpringStep(current, target, velocity, strength, damping) {- const nextVelocity = (velocity + (target - current) * strength) * damping;- const nextValue = current + nextVelocity;-- return {- value: nextValue,- velocity: nextVelocity,- };-}--function resetInteractionState(interactionState) {- interactionState.dragging = false;- interactionState.mouseX = 0.5;- interactionState.mouseY = 0.5;- interactionState.targetRotationX = 0;- interactionState.targetRotationY = 0;- interactionState.velocityX = 0;- interactionState.velocityY = 0;- interactionState.rotationVelocityX = 0;- interactionState.rotationVelocityY = 0;- interactionState.rotationVelocityZ = 0;- interactionState.autoElapsed = 0;-}--async function createGeometry(modelUrl) {- if (shape.kind === 'imported') {- if (!modelUrl) {- throw new Error('No model URL was provided for ' + shape.label + '.');- }-- return loadImportedGeometryFromUrl(modelUrl, shape.label);- }-- return createBuiltinGeometry(shape.key);-}-`-}-`;-}--function createMountScript() {- return `-async function mountHalftoneCanvas(options) {- const {- container,- modelUrl,- onError,- } = options;-- const getWidth = () => Math.max(container.clientWidth, 1);- const getHeight = () => Math.max(container.clientHeight, 1);- const getVirtualHeight = () => Math.max(VIRTUAL_RENDER_HEIGHT, getHeight());- const getVirtualWidth = () =>- Math.max(- Math.round(getVirtualHeight() * (getWidth() / Math.max(getHeight(), 1))),- 1,- );-- let geometry;-- try {- geometry = await createGeometry(modelUrl);- } catch (error) {- onError?.(error);- return () => {};- }-- // boundary-allow-next-line:no-raw-webgl-renderer -- emitted into the standalone HTML export; runs in the user's downloaded file with no access to lib/visual-runtime- const renderer = new THREE.WebGLRenderer({ antialias: false, alpha: true });- renderer.outputColorSpace = THREE.SRGBColorSpace;- renderer.setPixelRatio(1);- renderer.setClearColor(0x000000, 0);- renderer.setSize(getVirtualWidth(), getVirtualHeight(), false);-- const canvas = renderer.domElement;- canvas.style.cursor = settings.animation.followDragEnabled ? 'grab' : 'default';- canvas.style.display = 'block';- canvas.style.height = '100%';- canvas.style.touchAction = 'none';- canvas.style.width = '100%';- container.appendChild(canvas);-- const materialAssets = await createHalftoneMaterialAssets(renderer);-- const scene3d = new THREE.Scene();- scene3d.background = null;-- const baseCameraDistance = previewDistance;- const camera = new THREE.PerspectiveCamera(45, getWidth() / getHeight(), 0.1, 100);- camera.position.z = baseCameraDistance;-- const primaryLight = new THREE.DirectionalLight(0xffffff, settings.lighting.intensity);- setPrimaryLightPosition(- primaryLight,- settings.lighting.angleDegrees,- settings.lighting.height,- );- scene3d.add(primaryLight);-- const fillLight = new THREE.DirectionalLight(- 0xffffff,- settings.lighting.fillIntensity,- );- fillLight.position.set(-3, -1, 1);- scene3d.add(fillLight);-- const ambientLight = new THREE.AmbientLight(- 0xffffff,- settings.lighting.ambientIntensity,- );- scene3d.add(ambientLight);-- const material = createHalftoneMaterial();- applyHalftoneMaterialSettings(material, settings.material, materialAssets);-- const mesh = new THREE.Mesh(geometry, material);- scene3d.add(mesh);-- const sceneTarget = createRenderTarget(getVirtualWidth(), getVirtualHeight());- const blurTargetA = createRenderTarget(getVirtualWidth(), getVirtualHeight());- const blurTargetB = createRenderTarget(getVirtualWidth(), getVirtualHeight());- const fullScreenGeometry = new THREE.PlaneGeometry(2, 2);- const orthographicCamera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);-- const blurHorizontalMaterial = new THREE.ShaderMaterial({- uniforms: {- tInput: { value: null },- dir: { value: new THREE.Vector2(1, 0) },- res: { value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()) },- },- vertexShader: passThroughVertexShader,- fragmentShader: blurFragmentShader,- });-- const blurVerticalMaterial = new THREE.ShaderMaterial({- uniforms: {- tInput: { value: null },- dir: { value: new THREE.Vector2(0, 1) },- res: { value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()) },- },- vertexShader: passThroughVertexShader,- fragmentShader: blurFragmentShader,- });-- const halftoneMaterial = new THREE.ShaderMaterial({- transparent: true,- uniforms: {- tScene: { value: sceneTarget.texture },- tGlow: { value: blurTargetB.texture },- effectResolution: {- value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),- },- logicalResolution: {- value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),- },- tile: { value: settings.halftone.scale },- s_3: { value: settings.halftone.power },- s_4: { value: settings.halftone.width },- applyToDarkAreas: {- value: settings.halftone.toneTarget === 'dark' ? 1 : 0,- },- dashColor: { value: new THREE.Color(settings.halftone.dashColor) },- hoverDashColor: {- value: new THREE.Color(settings.halftone.hoverDashColor),- },- time: { value: 0 },- waveAmount: { value: 0 },- waveSpeed: { value: 1 },- footprintScale: { value: 1.0 },- interactionUv: { value: new THREE.Vector2(0.5, 0.5) },- interactionVelocity: { value: new THREE.Vector2(0, 0) },- dragOffset: { value: new THREE.Vector2(0, 0) },- hoverHalftoneActive: { value: 0 },- hoverHalftonePowerShift: { value: 0 },- hoverHalftoneRadius: { value: 0.2 },- hoverHalftoneWidthShift: { value: 0 },- hoverLightStrength: { value: 0 },- hoverLightRadius: { value: 0.2 },- hoverFlowStrength: { value: 0 },- hoverFlowRadius: { value: 0.18 },- dragFlowStrength: { value: 0 },- cropToBounds: { value: 0 },- },- vertexShader: passThroughVertexShader,- fragmentShader: halftoneFragmentShader,- });-- const blurHorizontalScene = new THREE.Scene();- blurHorizontalScene.add(- new THREE.Mesh(fullScreenGeometry, blurHorizontalMaterial),- );-- const blurVerticalScene = new THREE.Scene();- blurVerticalScene.add(new THREE.Mesh(fullScreenGeometry, blurVerticalMaterial));-- const postScene = new THREE.Scene();- postScene.add(new THREE.Mesh(fullScreenGeometry, halftoneMaterial));-- const updateViewportUniforms = (- logicalWidth,- logicalHeight,- effectWidth,- effectHeight,- ) => {- blurHorizontalMaterial.uniforms.res.value.set(effectWidth, effectHeight);- blurVerticalMaterial.uniforms.res.value.set(effectWidth, effectHeight);- halftoneMaterial.uniforms.effectResolution.value.set(- effectWidth,- effectHeight,- );- halftoneMaterial.uniforms.logicalResolution.value.set(- logicalWidth,- logicalHeight,- );- };-- const getHalftoneScale = (viewportWidth, viewportHeight, lookAtTarget) => {- if (!mesh.geometry.boundingBox) {- mesh.geometry.computeBoundingBox();- }-- if (!mesh.geometry.boundingBox) {- return 1;- }-- mesh.updateMatrixWorld();- camera.updateMatrixWorld();-- return getMeshFootprintScale({- camera,- localBounds: mesh.geometry.boundingBox,- lookAtTarget,- meshMatrixWorld: mesh.matrixWorld,- viewportHeight,- viewportWidth,- });- };-- const interaction = createInteractionState();- const autoRotateEnabled = settings.animation.autoRotateEnabled;- const followHoverEnabled = settings.animation.followHoverEnabled;- const followDragEnabled = settings.animation.followDragEnabled;- const rotateEnabled = settings.animation.rotateEnabled;-- const syncSize = () => {- const width = getWidth();- const height = getHeight();- const virtualWidth = getVirtualWidth();- const virtualHeight = getVirtualHeight();-- renderer.setSize(virtualWidth, virtualHeight, false);- camera.aspect = width / height;- camera.updateProjectionMatrix();- sceneTarget.setSize(virtualWidth, virtualHeight);- blurTargetA.setSize(virtualWidth, virtualHeight);- blurTargetB.setSize(virtualWidth, virtualHeight);- updateViewportUniforms(- virtualWidth,- virtualHeight,- virtualWidth,- virtualHeight,- );- };-- const resizeObserver = new ResizeObserver(syncSize);- resizeObserver.observe(container);-- const updatePointerPosition = (event) => {- const rect = canvas.getBoundingClientRect();- const width = Math.max(rect.width, 1);- const height = Math.max(rect.height, 1);-- interaction.mouseX = THREE.MathUtils.clamp(- (event.clientX - rect.left) / width,- 0,- 1,- );- interaction.mouseY = THREE.MathUtils.clamp(- (event.clientY - rect.top) / height,- 0,- 1,- );- };-- const handlePointerDown = (event) => {- updatePointerPosition(event);- if (!followDragEnabled) {- return;- }-- interaction.dragging = true;- interaction.pointerX = event.clientX;- interaction.pointerY = event.clientY;- interaction.velocityX = 0;- interaction.velocityY = 0;- canvas.style.cursor = 'grabbing';- };-- const handlePointerMove = (event) => {- updatePointerPosition(event);- };-- const handleWindowPointerMove = (event) => {- updatePointerPosition(event);-- if (!interaction.dragging || !followDragEnabled) {- return;- }-- const deltaX = (event.clientX - interaction.pointerX) * settings.animation.dragSens;- const deltaY = (event.clientY - interaction.pointerY) * settings.animation.dragSens;- interaction.velocityX = deltaY;- interaction.velocityY = deltaX;- interaction.targetRotationY += deltaX;- interaction.targetRotationX += deltaY;- interaction.pointerX = event.clientX;- interaction.pointerY = event.clientY;- };-- const handlePointerLeave = () => {- if (interaction.dragging) {- return;- }-- interaction.mouseX = 0.5;- interaction.mouseY = 0.5;- };-- const handlePointerUp = () => {- interaction.dragging = false;- canvas.style.cursor = followDragEnabled ? 'grab' : 'default';-- if (!settings.animation.springReturnEnabled) {- return;- }-- const springImpulse = Math.max(settings.animation.springStrength * 10, 1.2);- interaction.rotationVelocityX += interaction.velocityX * springImpulse;- interaction.rotationVelocityY += interaction.velocityY * springImpulse;- interaction.rotationVelocityZ += interaction.velocityY * springImpulse * 0.12;- interaction.targetRotationX = 0;- interaction.targetRotationY = 0;- interaction.velocityX = 0;- interaction.velocityY = 0;- };-- const handlePointerCancel = () => {- interaction.dragging = false;- interaction.velocityX = 0;- interaction.velocityY = 0;- canvas.style.cursor = followDragEnabled ? 'grab' : 'default';- handlePointerLeave();- };-- const handleWindowBlur = () => {- handlePointerUp();- handlePointerLeave();- };-- canvas.addEventListener('pointermove', handlePointerMove);- canvas.addEventListener('pointerleave', handlePointerLeave);- canvas.addEventListener('pointercancel', handlePointerCancel);- window.addEventListener('pointerup', handlePointerUp);- window.addEventListener('pointermove', handleWindowPointerMove);- window.addEventListener('blur', handleWindowBlur);- canvas.addEventListener('pointerdown', handlePointerDown);-- const clock = new THREE.Timer();- clock.connect(document);- let animationFrameId = 0;-- const renderFrame = (timestamp) => {- animationFrameId = window.requestAnimationFrame(renderFrame);- clock.update(timestamp);-- const delta = 1 / 60;- const elapsedTime = initialPose.timeElapsed + clock.getElapsed();- halftoneMaterial.uniforms.time.value = elapsedTime;-- let baseRotationX = initialPose.rotationX;- let baseRotationY = initialPose.rotationY;- let baseRotationZ = initialPose.rotationZ;- let meshOffsetY = 0;- let meshScale = 1;- let lightAngle = settings.lighting.angleDegrees;- let lightHeight = settings.lighting.height;-- if (autoRotateEnabled) {- interaction.autoElapsed += delta;- baseRotationY += interaction.autoElapsed * settings.animation.autoSpeed;- baseRotationX += Math.sin(interaction.autoElapsed * 0.2) * settings.animation.autoWobble;- }-- if (settings.animation.floatEnabled) {- const floatPhase = elapsedTime * settings.animation.floatSpeed;- const driftAmount = (settings.animation.driftAmount * Math.PI) / 180;-- meshOffsetY += Math.sin(floatPhase) * settings.animation.floatAmplitude;- baseRotationX += Math.sin(floatPhase * 0.72) * driftAmount * 0.45;- baseRotationZ += Math.cos(floatPhase * 0.93) * driftAmount * 0.3;- }-- if (settings.animation.breatheEnabled) {- meshScale *=- 1 +- Math.sin(elapsedTime * settings.animation.breatheSpeed) *- settings.animation.breatheAmount;- }-- if (rotateEnabled) {- interaction.rotateElapsed += delta;- const rotateProgress = settings.animation.rotatePingPong- ? Math.sin(interaction.rotateElapsed * settings.animation.rotateSpeed) * Math.PI- : interaction.rotateElapsed * settings.animation.rotateSpeed;-- if (settings.animation.rotatePreset === 'axis') {- const axisDirection =- settings.animation.rotateAxis.startsWith('-') ? -1 : 1;- const axisProgress = rotateProgress * axisDirection;-- if (- settings.animation.rotateAxis === 'x' ||- settings.animation.rotateAxis === 'xy' ||- settings.animation.rotateAxis === '-x' ||- settings.animation.rotateAxis === '-xy'- ) {- baseRotationX += axisProgress;- }-- if (- settings.animation.rotateAxis === 'y' ||- settings.animation.rotateAxis === 'xy' ||- settings.animation.rotateAxis === '-y' ||- settings.animation.rotateAxis === '-xy'- ) {- baseRotationY += axisProgress;- }-- if (- settings.animation.rotateAxis === 'z' ||- settings.animation.rotateAxis === '-z'- ) {- baseRotationZ += axisProgress;- }- } else if (settings.animation.rotatePreset === 'lissajous') {- baseRotationX += Math.sin(rotateProgress * 0.85) * 0.65;- baseRotationY += Math.sin(rotateProgress * 1.35 + 0.8) * 1.05;- baseRotationZ += Math.sin(rotateProgress * 0.55 + 1.6) * 0.32;- } else if (settings.animation.rotatePreset === 'orbit') {- baseRotationX += Math.sin(rotateProgress * 0.75) * 0.42;- baseRotationY += Math.cos(rotateProgress) * 1.2;- baseRotationZ += Math.sin(rotateProgress * 1.25) * 0.24;- } else if (settings.animation.rotatePreset === 'tumble') {- baseRotationX += rotateProgress * 0.55;- baseRotationY += Math.sin(rotateProgress * 0.8) * 0.9;- baseRotationZ += Math.cos(rotateProgress * 1.1) * 0.38;- }- }-- if (settings.animation.lightSweepEnabled) {- const lightPhase = elapsedTime * settings.animation.lightSweepSpeed;- lightAngle += Math.sin(lightPhase) * settings.animation.lightSweepRange;- lightHeight +=- Math.cos(lightPhase * 0.85) *- settings.animation.lightSweepHeightRange;- }-- let targetX = baseRotationX;- let targetY = baseRotationY;- let easing = 0.12;-- if (followHoverEnabled) {- const rangeRadians = (settings.animation.hoverRange * Math.PI) / 180;-- if (- settings.animation.hoverReturn ||- interaction.mouseX !== 0.5 ||- interaction.mouseY !== 0.5- ) {- targetX += (interaction.mouseY - 0.5) * rangeRadians;- targetY += (interaction.mouseX - 0.5) * rangeRadians;- }-- easing = settings.animation.hoverEase;- }-- if (followDragEnabled) {- if (!interaction.dragging && settings.animation.dragMomentum) {- interaction.targetRotationX += interaction.velocityX;- interaction.targetRotationY += interaction.velocityY;- interaction.velocityX *= 1 - settings.animation.dragFriction;- interaction.velocityY *= 1 - settings.animation.dragFriction;- }-- targetX += interaction.targetRotationX;- targetY += interaction.targetRotationY;- easing = settings.animation.dragFriction;- }-- if (autoRotateEnabled && !followHoverEnabled && !followDragEnabled) {- targetX = baseRotationX + interaction.targetRotationX;- targetY = baseRotationY + interaction.targetRotationY;-- if (interaction.dragging) {- targetX = interaction.targetRotationX;- targetY = interaction.targetRotationY;- }-- easing = 0.08;- }-- if (settings.animation.springReturnEnabled) {- const springX = applySpringStep(- interaction.rotationX,- targetX,- interaction.rotationVelocityX,- settings.animation.springStrength,- settings.animation.springDamping,- );- const springY = applySpringStep(- interaction.rotationY,- targetY,- interaction.rotationVelocityY,- settings.animation.springStrength,- settings.animation.springDamping,- );- const springZ = applySpringStep(- interaction.rotationZ,- baseRotationZ,- interaction.rotationVelocityZ,- settings.animation.springStrength,- settings.animation.springDamping,- );-- interaction.rotationX = springX.value;- interaction.rotationY = springY.value;- interaction.rotationZ = springZ.value;- interaction.rotationVelocityX = springX.velocity;- interaction.rotationVelocityY = springY.velocity;- interaction.rotationVelocityZ = springZ.velocity;- } else {- interaction.rotationX += (targetX - interaction.rotationX) * easing;- interaction.rotationY += (targetY - interaction.rotationY) * easing;- interaction.rotationZ +=- (baseRotationZ - interaction.rotationZ) *- (settings.animation.rotatePingPong ? 0.18 : 0.12);- }-- mesh.rotation.set(- interaction.rotationX,- interaction.rotationY,- interaction.rotationZ,- );- mesh.position.y = meshOffsetY;- mesh.scale.setScalar(meshScale);-- if (settings.animation.cameraParallaxEnabled) {- const cameraRange = settings.animation.cameraParallaxAmount;- const cameraEase = settings.animation.cameraParallaxEase;- const centeredX = (interaction.mouseX - 0.5) * 2;- const centeredY = (0.5 - interaction.mouseY) * 2;- const orbitYaw = centeredX * cameraRange;- const orbitPitch = centeredY * cameraRange * 0.7;- const horizontalRadius = Math.cos(orbitPitch) * baseCameraDistance;- const targetCameraX = Math.sin(orbitYaw) * horizontalRadius;- const targetCameraY =- Math.sin(orbitPitch) * baseCameraDistance * 0.85;- const targetCameraZ = Math.cos(orbitYaw) * horizontalRadius;-- camera.position.x += (targetCameraX - camera.position.x) * cameraEase;- camera.position.y += (targetCameraY - camera.position.y) * cameraEase;- camera.position.z += (targetCameraZ - camera.position.z) * cameraEase;- } else {- camera.position.x += (0 - camera.position.x) * 0.12;- camera.position.y += (0 - camera.position.y) * 0.12;- camera.position.z += (baseCameraDistance - camera.position.z) * 0.12;- }-- const lookAtTarget = new THREE.Vector3(0, meshOffsetY * 0.2, 0);-- camera.lookAt(lookAtTarget);- setPrimaryLightPosition(primaryLight, lightAngle, lightHeight);- halftoneMaterial.uniforms.footprintScale.value = getHalftoneScale(- getVirtualWidth(),- getVirtualHeight(),- lookAtTarget,- );-- if (!settings.halftone.enabled) {- renderer.setRenderTarget(null);- renderer.clear();- renderer.render(scene3d, camera);- return;- }-- renderer.setRenderTarget(sceneTarget);- renderer.render(scene3d, camera);-- blurHorizontalMaterial.uniforms.tInput.value = sceneTarget.texture;- renderer.setRenderTarget(blurTargetA);- renderer.render(blurHorizontalScene, orthographicCamera);-- blurVerticalMaterial.uniforms.tInput.value = blurTargetA.texture;- renderer.setRenderTarget(blurTargetB);- renderer.render(blurVerticalScene, orthographicCamera);-- blurHorizontalMaterial.uniforms.tInput.value = blurTargetB.texture;- renderer.setRenderTarget(blurTargetA);- renderer.render(blurHorizontalScene, orthographicCamera);-- blurVerticalMaterial.uniforms.tInput.value = blurTargetA.texture;- renderer.setRenderTarget(blurTargetB);- renderer.render(blurVerticalScene, orthographicCamera);-- renderer.setRenderTarget(null);- renderer.clear();- renderer.render(postScene, orthographicCamera);- };-- renderFrame();-- return () => {- window.cancelAnimationFrame(animationFrameId);- clock.dispose();- resizeObserver.disconnect();- canvas.removeEventListener('pointermove', handlePointerMove);- canvas.removeEventListener('pointerleave', handlePointerLeave);- window.removeEventListener('pointerup', handlePointerUp);- window.removeEventListener('pointermove', handleWindowPointerMove);- canvas.removeEventListener('pointercancel', handlePointerCancel);- window.removeEventListener('blur', handleWindowBlur);- canvas.removeEventListener('pointerdown', handlePointerDown);- blurHorizontalMaterial.dispose();- blurVerticalMaterial.dispose();- halftoneMaterial.dispose();- fullScreenGeometry.dispose();- material.dispose();- sceneTarget.dispose();- blurTargetA.dispose();- blurTargetB.dispose();- disposeHalftoneMaterialAssets(materialAssets);- renderer.dispose();-- if (canvas.parentNode === container) {- container.removeChild(canvas);- }- };-}-`;-}--function createImageMountScript() {- return `-async function mountHalftoneCanvas(options) {- const {- container,- imageUrl,- onError,- } = options;-- const getWidth = () => Math.max(container.clientWidth, 1);- const getHeight = () => Math.max(container.clientHeight, 1);- const getVirtualHeight = () => Math.max(VIRTUAL_RENDER_HEIGHT, getHeight());- const getVirtualWidth = () =>- Math.max(- Math.round(getVirtualHeight() * (getWidth() / Math.max(getHeight(), 1))),- 1,- );-- const image = await new Promise((resolve, reject) => {- const img = new Image();- img.onload = () => resolve(img);- img.onerror = () => reject(new Error('Failed to load image'));- img.src = imageUrl;- });-- // boundary-allow-next-line:no-raw-webgl-renderer -- emitted into the standalone HTML export; runs in the user's downloaded file with no access to lib/visual-runtime- const renderer = new THREE.WebGLRenderer({ antialias: false, alpha: true });- renderer.outputColorSpace = THREE.SRGBColorSpace;- renderer.setPixelRatio(1);- renderer.setClearColor(0x000000, 0);- renderer.setSize(getVirtualWidth(), getVirtualHeight(), false);-- const canvas = renderer.domElement;- canvas.style.cursor = 'default';- canvas.style.display = 'block';- canvas.style.height = '100%';- canvas.style.touchAction = 'none';- canvas.style.width = '100%';- container.appendChild(canvas);-- const imageTexture = new THREE.Texture(image);- imageTexture.colorSpace = THREE.SRGBColorSpace;- imageTexture.needsUpdate = true;-- const sceneTarget = createRenderTarget(getVirtualWidth(), getVirtualHeight());- const blurTargetA = createRenderTarget(getVirtualWidth(), getVirtualHeight());- const blurTargetB = createRenderTarget(getVirtualWidth(), getVirtualHeight());- const fullScreenGeometry = new THREE.PlaneGeometry(2, 2);- const orthographicCamera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);-- const imageMaterial = new THREE.ShaderMaterial({- uniforms: {- tImage: { value: imageTexture },- imageSize: { value: new THREE.Vector2(image.width, image.height) },- viewportSize: { value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()) },- zoom: { value: getImagePreviewZoom(previewDistance) },- contrast: { value: settings.halftone.imageContrast },- },- vertexShader: passThroughVertexShader,- fragmentShader: imagePassthroughFragmentShader,- });-- const imageScene = new THREE.Scene();- imageScene.add(new THREE.Mesh(fullScreenGeometry, imageMaterial));-- const blurHorizontalMaterial = new THREE.ShaderMaterial({- uniforms: {- tInput: { value: null },- dir: { value: new THREE.Vector2(1, 0) },- res: { value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()) },- },- vertexShader: passThroughVertexShader,- fragmentShader: blurFragmentShader,- });-- const blurVerticalMaterial = new THREE.ShaderMaterial({- uniforms: {- tInput: { value: null },- dir: { value: new THREE.Vector2(0, 1) },- res: { value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()) },- },- vertexShader: passThroughVertexShader,- fragmentShader: blurFragmentShader,- });-- const halftoneMaterial = new THREE.ShaderMaterial({- transparent: true,- uniforms: {- tScene: { value: sceneTarget.texture },- tGlow: { value: blurTargetB.texture },- effectResolution: {- value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),- },- logicalResolution: {- value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),- },- tile: { value: settings.halftone.scale },- s_3: { value: settings.halftone.power },- s_4: { value: settings.halftone.width },- applyToDarkAreas: {- value: settings.halftone.toneTarget === 'dark' ? 1 : 0,- },- dashColor: { value: new THREE.Color(settings.halftone.dashColor) },- hoverDashColor: {- value: new THREE.Color(settings.halftone.hoverDashColor),- },- time: { value: 0 },- waveAmount: { value: 0 },- waveSpeed: { value: settings.animation.waveSpeed },- footprintScale: { value: 1.0 },- interactionUv: { value: new THREE.Vector2(0.5, 0.5) },- interactionVelocity: { value: new THREE.Vector2(0, 0) },- dragOffset: { value: new THREE.Vector2(0, 0) },- hoverHalftoneActive: { value: 0 },- hoverHalftonePowerShift: { value: 0 },- hoverHalftoneRadius: { value: settings.animation.hoverHalftoneRadius },- hoverHalftoneWidthShift: { value: 0 },- hoverLightStrength: { value: 0 },- hoverLightRadius: { value: settings.animation.hoverLightRadius },- hoverFlowStrength: { value: 0 },- hoverFlowRadius: { value: 0.18 },- dragFlowStrength: { value: 0 },- cropToBounds: { value: 1 },- },- vertexShader: passThroughVertexShader,- fragmentShader: halftoneFragmentShader,- });-- const blurHorizontalScene = new THREE.Scene();- blurHorizontalScene.add(new THREE.Mesh(fullScreenGeometry, blurHorizontalMaterial));-- const blurVerticalScene = new THREE.Scene();- blurVerticalScene.add(new THREE.Mesh(fullScreenGeometry, blurVerticalMaterial));-- const postScene = new THREE.Scene();- postScene.add(new THREE.Mesh(fullScreenGeometry, halftoneMaterial));-- const updateViewportUniforms = (- logicalWidth,- logicalHeight,- effectWidth,- effectHeight,- ) => {- blurHorizontalMaterial.uniforms.res.value.set(effectWidth, effectHeight);- blurVerticalMaterial.uniforms.res.value.set(effectWidth, effectHeight);- halftoneMaterial.uniforms.effectResolution.value.set(- effectWidth,- effectHeight,- );- halftoneMaterial.uniforms.logicalResolution.value.set(- logicalWidth,- logicalHeight,- );- imageMaterial.uniforms.viewportSize.value.set(logicalWidth, logicalHeight);- };-- const getHalftoneScale = () =>- getImageFootprintScale({- imageHeight: image.height,- imageWidth: image.width,- previewDistance,- viewportHeight: getVirtualHeight(),- viewportWidth: getVirtualWidth(),- });-- const interaction = createInteractionState();- const imagePointerFollow = 0.38;- const imagePointerVelocityDamping = 0.82;- const imageHoverFadeIn = 18;- const imageHoverFadeOut = 7;-- const syncSize = () => {- const virtualWidth = getVirtualWidth();- const virtualHeight = getVirtualHeight();-- renderer.setSize(virtualWidth, virtualHeight, false);- sceneTarget.setSize(virtualWidth, virtualHeight);- blurTargetA.setSize(virtualWidth, virtualHeight);- blurTargetB.setSize(virtualWidth, virtualHeight);- updateViewportUniforms(- virtualWidth,- virtualHeight,- virtualWidth,- virtualHeight,- );- };-- const resizeObserver = new ResizeObserver(syncSize);- resizeObserver.observe(container);-- const updatePointerPosition = (event, options = {}) => {- const rect = canvas.getBoundingClientRect();- const width = Math.max(rect.width, 1);- const height = Math.max(rect.height, 1);-- const nextMouseX = THREE.MathUtils.clamp(- (event.clientX - rect.left) / width, 0, 1,- );- const nextMouseY = THREE.MathUtils.clamp(- (event.clientY - rect.top) / height, 0, 1,- );-- const deltaX = nextMouseX - interaction.mouseX;- const deltaY = nextMouseY - interaction.mouseY;-- interaction.mouseX = nextMouseX;- interaction.mouseY = nextMouseY;- interaction.pointerInside =- interaction.dragging ||- (event.clientX >= rect.left &&- event.clientX <= rect.right &&- event.clientY >= rect.top &&- event.clientY <= rect.bottom);-- if (options.resetVelocity) {- interaction.pointerVelocityX = 0;- interaction.pointerVelocityY = 0;- interaction.smoothedMouseX = nextMouseX;- interaction.smoothedMouseY = nextMouseY;- } else {- interaction.pointerVelocityX = deltaX;- interaction.pointerVelocityY = deltaY;- }-- return { deltaX, deltaY };- };-- const releasePointerCapture = (pointerId) => {- if (pointerId === null) {- return;- }-- if (!canvas.hasPointerCapture(pointerId)) {- return;- }-- try {- canvas.releasePointerCapture(pointerId);- } catch (error) {- void error;- }- };-- const handlePointerDown = (event) => {- updatePointerPosition(event, { resetVelocity: true });- interaction.pointerX = event.clientX;- interaction.pointerY = event.clientY;- };-- const handlePointerMove = (event) => {- const resetVelocity = !interaction.pointerInside && !interaction.dragging;- updatePointerPosition(- event,- resetVelocity ? { resetVelocity: true } : undefined,- );- };-- const handlePointerLeave = () => {- if (interaction.dragging) {- return;- }-- interaction.pointerInside = false;- interaction.pointerVelocityX = 0;- interaction.pointerVelocityY = 0;- };-- const handlePointerUp = (event) => {- updatePointerPosition(event, { resetVelocity: true });- releasePointerCapture(interaction.activePointerId);- interaction.activePointerId = null;- interaction.dragging = false;- const rect = canvas.getBoundingClientRect();- interaction.pointerInside =- event.clientX >= rect.left &&- event.clientX <= rect.right &&- event.clientY >= rect.top &&- event.clientY <= rect.bottom;- };-- const handlePointerCancel = () => {- releasePointerCapture(interaction.activePointerId);- interaction.activePointerId = null;- interaction.dragging = false;- interaction.pointerInside = false;- interaction.pointerVelocityX = 0;- interaction.pointerVelocityY = 0;- };-- const handleWindowBlur = () => {- handlePointerCancel();- };-- canvas.addEventListener('pointermove', handlePointerMove);- canvas.addEventListener('pointerleave', handlePointerLeave);- canvas.addEventListener('pointerup', handlePointerUp);- canvas.addEventListener('pointercancel', handlePointerCancel);- window.addEventListener('blur', handleWindowBlur);- canvas.addEventListener('pointerdown', handlePointerDown);-- const clock = new THREE.Timer();- clock.connect(document);- let animationFrameId = 0;-- const renderFrame = (timestamp) => {- animationFrameId = window.requestAnimationFrame(renderFrame);- clock.update(timestamp);-- const deltaSeconds = clock.getDelta();- const elapsedTime = clock.getElapsed();- halftoneMaterial.uniforms.time.value = elapsedTime;- const hoverEasing =- 1 -- Math.exp(- -deltaSeconds *- (interaction.pointerInside ? imageHoverFadeIn : imageHoverFadeOut),- );- interaction.hoverStrength +=- ((interaction.pointerInside ? 1 : 0) - interaction.hoverStrength) *- hoverEasing;-- interaction.smoothedMouseX +=- (interaction.mouseX - interaction.smoothedMouseX) * imagePointerFollow;- interaction.smoothedMouseY +=- (interaction.mouseY - interaction.smoothedMouseY) * imagePointerFollow;- interaction.pointerVelocityX *= imagePointerVelocityDamping;- interaction.pointerVelocityY *= imagePointerVelocityDamping;-- halftoneMaterial.uniforms.interactionUv.value.set(- interaction.smoothedMouseX,- 1 - interaction.smoothedMouseY,- );- halftoneMaterial.uniforms.interactionVelocity.value.set(- interaction.pointerVelocityX * getVirtualWidth(),- -interaction.pointerVelocityY * getVirtualHeight(),- );- halftoneMaterial.uniforms.dragOffset.value.set(0, 0);- halftoneMaterial.uniforms.hoverHalftoneActive.value =- settings.animation.hoverHalftoneEnabled ? interaction.hoverStrength : 0;- halftoneMaterial.uniforms.hoverHalftonePowerShift.value =- settings.animation.hoverHalftoneEnabled- ? settings.animation.hoverHalftonePowerShift- : 0;- halftoneMaterial.uniforms.hoverHalftoneRadius.value =- settings.animation.hoverHalftoneRadius;- halftoneMaterial.uniforms.hoverHalftoneWidthShift.value =- settings.animation.hoverHalftoneEnabled- ? settings.animation.hoverHalftoneWidthShift- : 0;- halftoneMaterial.uniforms.hoverLightStrength.value =- settings.animation.hoverLightEnabled- ? settings.animation.hoverLightIntensity * interaction.hoverStrength- : 0;- halftoneMaterial.uniforms.hoverLightRadius.value =- settings.animation.hoverLightRadius;- halftoneMaterial.uniforms.hoverFlowStrength.value = 0;- halftoneMaterial.uniforms.hoverFlowRadius.value = 0.18;- halftoneMaterial.uniforms.dragFlowStrength.value = 0;- imageMaterial.uniforms.zoom.value = getImagePreviewZoom(previewDistance);- halftoneMaterial.uniforms.footprintScale.value = getHalftoneScale();-- renderer.setRenderTarget(sceneTarget);- renderer.render(imageScene, orthographicCamera);-- blurHorizontalMaterial.uniforms.tInput.value = sceneTarget.texture;- renderer.setRenderTarget(blurTargetA);- renderer.render(blurHorizontalScene, orthographicCamera);-- blurVerticalMaterial.uniforms.tInput.value = blurTargetA.texture;- renderer.setRenderTarget(blurTargetB);- renderer.render(blurVerticalScene, orthographicCamera);-- blurHorizontalMaterial.uniforms.tInput.value = blurTargetB.texture;- renderer.setRenderTarget(blurTargetA);- renderer.render(blurHorizontalScene, orthographicCamera);-- blurVerticalMaterial.uniforms.tInput.value = blurTargetA.texture;- renderer.setRenderTarget(blurTargetB);- renderer.render(blurVerticalScene, orthographicCamera);-- renderer.setRenderTarget(null);- renderer.clear();- renderer.render(postScene, orthographicCamera);- };-- renderFrame();-- return () => {- window.cancelAnimationFrame(animationFrameId);- clock.dispose();- resizeObserver.disconnect();- canvas.removeEventListener('pointermove', handlePointerMove);- canvas.removeEventListener('pointerleave', handlePointerLeave);- canvas.removeEventListener('pointerup', handlePointerUp);- canvas.removeEventListener('pointercancel', handlePointerCancel);- window.removeEventListener('blur', handleWindowBlur);- canvas.removeEventListener('pointerdown', handlePointerDown);- blurHorizontalMaterial.dispose();- blurVerticalMaterial.dispose();- halftoneMaterial.dispose();- imageMaterial.dispose();- imageTexture.dispose();- fullScreenGeometry.dispose();- sceneTarget.dispose();- blurTargetA.dispose();- blurTargetB.dispose();- renderer.dispose();-- if (canvas.parentNode === container) {- container.removeChild(canvas);- }- };-}-`;-}--export function getExportedModelFile(- shape: HalftoneGeometrySpec | undefined,- importedFile: File | undefined,-) {- if (!shape || shape.kind !== 'imported' || !importedFile) {- return null;- }-- return importedFile;-}--export function generateReactComponent(- settings: HalftoneStudioSettings,- selectedShape: HalftoneGeometrySpec | undefined,- componentName = 'HalftoneDashes',- options: ReactExportOptions = {},-) {- const isImageMode = settings.sourceMode === 'image';- const exportSettings = normalizeReactExportSettings(options.exportSettings);- const shape = createShapeDescriptor(- selectedShape,- settings,- options.importedFile,- options.modelFilenameOverride,- );- const pose = normalizeExportPose(options.initialPose);- const normalizedComponentName = normalizeExportComponentName(componentName);- const background = options.background ?? 'transparent';- const assetUrl =- exportSettings.includePublicAssetUrl && options.assetUrl- ? options.assetUrl- : null;- const defaultModelFilename =- options.modelFilenameOverride ?? shape.filename ?? 'model.glb';- const defaultImageFilename = options.imageFilename ?? 'image.png';- const defaultModelUrl = assetUrl ?? `./${defaultModelFilename}`;- const defaultImageUrl = assetUrl ?? `./${defaultImageFilename}`;- const importBlock = getReactImportBlock(exportSettings, isImageMode, shape);- const headerComment = exportSettings.includeRegistryComment- ? getTwentyReactHeaderComment(- normalizedComponentName,- toIllustrationRegistryKey(normalizedComponentName),- isImageMode || shape.kind === 'imported'- ? (assetUrl ?? undefined)- : undefined,- )- : '';- const mountScript = isImageMode- ? createImageMountScript()- : createMountScript();- const serializedRuntime = serializeRuntimeSource(- settings,- shape,- pose,- options.previewDistance,- );- const generatedBanner = exportSettings.includeTsNoCheck- ? `/**- * @generated halftone-studio- * This file is autogenerated by the in-app halftone studio- * (src/app/halftone). Do NOT hand-edit — regenerate the export- * from the studio if the visual or runtime behaviour needs to change.- *- * Type checking is disabled at the file level because the serialized- * Three.js runtime below contains thousands of lines of legacy- * implicitly-typed code that the generator does not annotate. See- * src/app/halftone/_lib/exporters.ts for the generator source.- */-// @ts-nocheck`- : null;- const directiveLines = [- generatedBanner,- exportSettings.includeUseClientDirective ? "'use client';" : null,- ]- .filter((line): line is string => line !== null)- .join('\n');- const mountStyleBlock = exportSettings.includeStyledMount- ? `const StyledVisualMount = styled.div\`- background: ${background};- display: block;- height: 100%;- min-width: 0;- width: 100%;-\`;-`- : '';- const assetPropName = isImageMode- ? 'imageUrl'- : shape.kind === 'imported'- ? 'modelUrl'- : null;- const assetPropDefaultValue =- assetPropName === 'imageUrl'- ? defaultImageUrl- : assetPropName === 'modelUrl'- ? defaultModelUrl- : null;- const propsTypeBlock = assetPropName- ? `type ${normalizedComponentName}Props = {\n ${assetPropName}?: string;\n style?: CSSProperties;\n};`- : `type ${normalizedComponentName}Props = {\n style?: CSSProperties;\n};`;- const propsSignature = assetPropName- ? `{\n ${assetPropName} = ${JSON.stringify(assetPropDefaultValue)},\n style,\n}: ${normalizedComponentName}Props`- : `{\n style,\n}: ${normalizedComponentName}Props`;- const mountOptionsBlock = assetPropName- ? `const unmount = mountHalftoneCanvas({\n container,\n ${assetPropName},\n onError: (error) => {\n console.error(error);\n },\n });`- : `const unmount = mountHalftoneCanvas({\n container,\n onError: (error) => {\n console.error(error);\n },\n });`;- const effectDependencies = assetPropName ? `[${assetPropName}]` : '[]';- const returnBlock = exportSettings.includeStyledMount- ? `return <StyledVisualMount aria-hidden ref={mountReference} style={style} />;`- : `return (- <div- ref={mountReference}- style={{- background: ${JSON.stringify(background)},- height: '100%',- width: '100%',- ...style,- }}- />- );`;- const componentFunctionBlock = exportSettings.includeNamedAndDefaultExport- ? `export function ${normalizedComponentName}(${propsSignature}) {- const mountReference = useRef<HTMLDivElement>(null);-- useEffect(() => {- const container = mountReference.current;-- if (!container) {- return;- }-- ${mountOptionsBlock}-- return () => {- void Promise.resolve(unmount).then((dispose) => dispose?.());- };- }, ${effectDependencies});-- ${returnBlock}-}--export default ${normalizedComponentName};`- : `export default function ${normalizedComponentName}(${propsSignature}) {- const mountReference = useRef<HTMLDivElement>(null);-- useEffect(() => {- const container = mountReference.current;-- if (!container) {- return;- }-- ${mountOptionsBlock}-- return () => {- void Promise.resolve(unmount).then((dispose) => dispose?.());- };- }, ${effectDependencies});-- ${returnBlock}-}`;-- return `${directiveLines ? `${directiveLines}\n\n` : ''}${importBlock}--${headerComment}${serializedRuntime}--${mountScript}--${mountStyleBlock ? `${mountStyleBlock}\n` : ''}${propsTypeBlock}--${componentFunctionBlock}-`;-}--export async function generateStandaloneHtml(- settings: HalftoneStudioSettings,- selectedShape: HalftoneGeometrySpec | undefined,- componentName = 'HalftoneDashes',- options: ReactExportOptions = {},-) {- const isImageMode = settings.sourceMode === 'image';- const shape = createShapeDescriptor(- selectedShape,- settings,- options.importedFile,- options.modelFilenameOverride,- );- const pose = normalizeExportPose(options.initialPose);- const normalizedComponentName = normalizeExportComponentName(componentName);- const defaultImageUrl = options.imageFilename ?? 'image.png';- const embeddedImportedModelUrl =- !isImageMode && shape.kind === 'imported' && options.importedFile- ? await fileToDataUrl(options.importedFile, shape.loader)- : null;- const defaultModelUrl =- embeddedImportedModelUrl ??- options.modelFilenameOverride ??- shape.filename ??- 'model.glb';- const background = options.background ?? 'transparent';-- const threeImports = getStandaloneThreeImports(isImageMode, shape);-- const mountScript = isImageMode- ? createImageMountScript()- : createMountScript();-- const mountCall = isImageMode- ? `mountHalftoneCanvas({- container,- imageUrl: ${JSON.stringify(`./${defaultImageUrl}`)},- onError: (error) => {- console.error(error);- },- });`- : `mountHalftoneCanvas({- container,- modelUrl: ${JSON.stringify(`./${defaultModelUrl}`)},- onError: (error) => {- console.error(error);- },- });`;-- const captionText = isImageMode- ? `Place <code>${defaultImageUrl}</code> next to this HTML file.`- : `Standalone export of the current halftone scene.- ${- shape.kind === 'imported'- ? embeddedImportedModelUrl- ? 'The uploaded model is embedded directly in this HTML file.'- : `Place <code>${defaultModelUrl}</code> next to this HTML file to keep the current uploaded shape.`- : ''- }`;-- return `<!DOCTYPE html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>${normalizedComponentName}</title>- <link rel="icon" href="data:," />- <style>- * {- box-sizing: border-box;- margin: 0;- padding: 0;- }-- html,- body {- height: 100%;- }-- body {- background: ${background};- color: rgba(255, 255, 255, 0.72);- font-family: system-ui, sans-serif;- overflow: hidden;- }-- #app {- height: 100%;- width: 100%;- }-- #canvas-root {- height: 100%;- width: 100%;- }-- .caption {- background: rgba(18, 18, 22, 0.72);- backdrop-filter: blur(16px);- border: 1px solid rgba(255, 255, 255, 0.08);- border-radius: 12px;- bottom: 20px;- color: rgba(255, 255, 255, 0.8);- font-size: 12px;- left: 20px;- line-height: 1.5;- max-width: min(320px, calc(100vw - 40px));- padding: 12px 14px;- position: fixed;- }-- .caption code {- color: #9d90fa;- font-family: ui-monospace, monospace;- }- </style>- </head>- <body>- <div id="app">- <div id="canvas-root"></div>- <div class="caption">- ${captionText}- </div>- </div>-- <script type="importmap">- {- "imports": {- "three": "https://unpkg.com/[email protected]/build/three.module.js",- "three/addons/": "https://unpkg.com/[email protected]/examples/jsm/"- }- }- </script>- <script type="module">- ${threeImports}-- ${serializeRuntimeSource(settings, shape, pose, options.previewDistance)}-- ${mountScript}-- const container = document.getElementById('canvas-root');-- ${mountCall}- </script>- </body>-</html>`;-}diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_lib/share.ts b/packages/twenty-website-new/src/app/[locale]/halftone/_lib/share.tsdeleted file mode 100644index ea741c4c7e2..00000000000--- a/packages/twenty-website-new/src/app/[locale]/halftone/_lib/share.ts+++ /dev/null@@ -1,120 +0,0 @@-import {- DEFAULT_GEOMETRY_SPECS,- DEFAULT_HALFTONE_SETTINGS,- normalizeHalftoneStudioSettings,- type HalftoneStudioSettings,-} from '@/lib/halftone/state';--export type ShareableHalftoneState = {- settings: HalftoneStudioSettings;- previewDistance: number;- exportName: string;-};--function toUrlSafeBase64(input: string) {- return input.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');-}--function fromUrlSafeBase64(input: string) {- let normalized = input.replace(/-/g, '+').replace(/_/g, '/');-- while (normalized.length % 4 !== 0) {- normalized += '=';- }-- return normalized;-}--function encodeUtf8ToBase64(value: string) {- const bytes = new TextEncoder().encode(value);- let binary = '';-- bytes.forEach((byte) => {- binary += String.fromCharCode(byte);- });-- return btoa(binary);-}--function decodeBase64ToUtf8(value: string) {- const binary = atob(value);- const bytes = new Uint8Array(binary.length);-- for (let index = 0; index < binary.length; index += 1) {- bytes[index] = binary.charCodeAt(index);- }-- return new TextDecoder().decode(bytes);-}--export function encodeShareState(state: ShareableHalftoneState): string {- const payload = {- settings: state.settings,- previewDistance: state.previewDistance,- exportName: state.exportName,- };-- return toUrlSafeBase64(encodeUtf8ToBase64(JSON.stringify(payload)));-}--function sanitizeShapeKey(shapeKey: string): string {- const isBuiltinShape = DEFAULT_GEOMETRY_SPECS.some(- (spec) => spec.key === shapeKey,- );-- return isBuiltinShape ? shapeKey : DEFAULT_HALFTONE_SETTINGS.shapeKey;-}--export function decodeShareState(- hash: string | null | undefined,-): ShareableHalftoneState | null {- if (!hash) {- return null;- }-- const trimmed = hash.replace(/^#/, '').trim();-- if (!trimmed) {- return null;- }-- try {- const json = decodeBase64ToUtf8(fromUrlSafeBase64(trimmed));- const parsed = JSON.parse(json) as Partial<ShareableHalftoneState> | null;-- if (!parsed || typeof parsed !== 'object') {- return null;- }-- const settings = normalizeHalftoneStudioSettings(parsed.settings);- const previewDistance =- typeof parsed.previewDistance === 'number' &&- Number.isFinite(parsed.previewDistance)- ? parsed.previewDistance- : null;- const exportName =- typeof parsed.exportName === 'string' ? parsed.exportName : '';-- if (previewDistance === null) {- return null;- }-- return {- settings: {- ...settings,- shapeKey: sanitizeShapeKey(settings.shapeKey),- },- previewDistance,- exportName,- };- } catch {- return null;- }-}--export function buildShareUrl(state: ShareableHalftoneState): string {- const hash = encodeShareState(state);- const { origin, pathname } = window.location;-- return `${origin}${pathname}#${hash}`;-}diff --git a/packages/twenty-website-new/src/app/[locale]/layout.tsx b/packages/twenty-website-new/src/app/[locale]/layout.tsxindex 54d9313becb..e5d34fcad7e 100644--- a/packages/twenty-website-new/src/app/[locale]/layout.tsx+++ b/packages/twenty-website-new/src/app/[locale]/layout.tsx@@ -4,7 +4,7 @@ import {getSiteUrl,JsonLd,} from '@/lib/seo';-import { DRACO_DECODER_ORIGIN } from '@/lib/visual-runtime/draco-decoder-path';+import { DRACO_DECODER_ORIGIN } from '@/lib/visual-runtime/utils/draco-decoder-path';import { theme } from '@/theme';import { cssVariables } from '@/theme/css-variables';import { css } from '@linaria/core';@@ -15,19 +15,17 @@ import { type ReactNode } from 'react';import { FooterVisibilityGate } from '@/app/_components/FooterVisibilityGate';import { ScrollToTopOnRouteChange } from '@/app/_components/ScrollToTopOnRouteChange';-import { ContactCalModalRoot } from '@/lib/contact-cal';-import { createMessageDescriptorRenderer } from '@/lib/i18n/create-message-descriptor-renderer';import {I18nProvider,- PUBLIC_APP_LOCALE_LIST,localeToUrlSegment,+ PUBLIC_APP_LOCALE_LIST,resolveLocaleParam,} from '@/lib/i18n';-import { getLocaleMessages } from '@/lib/i18n/messages-by-locale';-import { setServerI18n } from '@/lib/i18n/set-server-i18n';-import { PartnerApplicationModalRoot } from '@/lib/partner-application';-import { Footer } from '@/sections/Footer/components';-import { FOOTER_DATA } from '@/sections/Footer/data';+import { getLocaleMessages } from '@/lib/i18n/utils/messages-by-locale';+import { setServerI18n } from '@/lib/i18n/utils/set-server-i18n';+import { ContactCalModalRoot } from '@/sections/ContactCal';+import { Footer, FOOTER_DATA } from '@/sections/Footer';+import { PartnerApplicationModalRoot } from '@/sections/PartnerApplication';const hostGrotesk = Host_Grotesk({subsets: ['latin'],@@ -114,6 +112,11 @@ export const metadata: Metadata = {site: '@twentycrm',creator: '@twentycrm',},+ alternates: {+ types: {+ 'application/rss+xml': '/articles/feed.xml',+ },+ },};type LocaleLayoutParams = { locale: string };@@ -134,8 +137,7 @@ const LocaleLayout = async ({}) => {const { locale: rawLocale } = await params;const locale = resolveLocaleParam(rawLocale);- const i18n = setServerI18n(locale);- const renderText = createMessageDescriptorRenderer(i18n);+ setServerI18n(locale);const messages = getLocaleMessages(locale);return (@@ -162,14 +164,10 @@ const LocaleLayout = async ({<FooterVisibilityGate><Footer.Root><Footer.Logo />- <Footer.Nav- groups={FOOTER_DATA.navGroups}- renderText={renderText}- />+ <Footer.Nav groups={FOOTER_DATA.navGroups} /><Footer.Bottomcopyright={FOOTER_DATA.bottom.copyright}links={FOOTER_DATA.socialLinks}- renderText={renderText}/></Footer.Root></FooterVisibilityGate>diff --git a/packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/BecomePartnerButton.tsx b/packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/BecomePartnerButton.tsxindex c3d7c525db3..20047f6a3cc 100644--- a/packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/BecomePartnerButton.tsx+++ b/packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/BecomePartnerButton.tsx@@ -4,8 +4,8 @@ import {BaseButton,buttonBaseStyles,} from '@/design-system/components/Button/BaseButton';-import { useRenderMessage } from '@/lib/i18n/use-render-message';-import { usePartnerApplicationModal } from '@/lib/partner-application';+import { useLingui } from '@lingui/react';+import { usePartnerApplicationModal } from '@/sections/PartnerApplication';import type { MessageDescriptor } from '@lingui/core';import { msg } from '@lingui/core/macro';import { styled } from '@linaria/react';@@ -25,7 +25,7 @@ export function BecomePartnerButton({label = msg`Become a partner`,variant = 'contained',}: BecomePartnerButtonProps) {- const renderText = useRenderMessage();+ const { i18n } = useLingui();const { openPartnerApplicationModal } = usePartnerApplicationModal();return (@@ -37,7 +37,7 @@ export function BecomePartnerButton({openPartnerApplicationModal();}}>- <BaseButton color={color} label={renderText(label)} variant={variant} />+ <BaseButton color={color} label={i18n._(label)} variant={variant} /></StyledTrigger>);}diff --git a/packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/PartnerHeroCtas.tsx b/packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/PartnerHeroCtas.tsxindex 94b395327af..93906abdd99 100644--- a/packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/PartnerHeroCtas.tsx+++ b/packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/PartnerHeroCtas.tsx@@ -1,6 +1,6 @@'use client';-import { TalkToUsButton } from '@/lib/contact-cal';+import { TalkToUsButton } from '@/sections/ContactCal';import { msg } from '@lingui/core/macro';import { BecomePartnerButton } from './BecomePartnerButton';diff --git a/packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/PartnerSignoffCtas.tsx b/packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/PartnerSignoffCtas.tsxindex b103637dfe2..29f45d6913c 100644--- a/packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/PartnerSignoffCtas.tsx+++ b/packages/twenty-website-new/src/app/[locale]/partners/components/PartnerApplication/PartnerSignoffCtas.tsx@@ -1,6 +1,6 @@'use client';-import { TalkToUsButton } from '@/lib/contact-cal';+import { TalkToUsButton } from '@/sections/ContactCal';import { msg } from '@lingui/core/macro';import { BecomePartnerButton } from './BecomePartnerButton';diff --git a/packages/twenty-website-new/src/app/[locale]/partners/hero.data.ts b/packages/twenty-website-new/src/app/[locale]/partners/hero.data.tsdeleted file mode 100644index fff36e43892..00000000000--- a/packages/twenty-website-new/src/app/[locale]/partners/hero.data.ts+++ /dev/null@@ -1,5 +0,0 @@-import { msg } from '@lingui/core/macro';--export const HERO_COPY = {- body: msg`We're building the #1 Open Source CRM, but we can't do it alone. Join our partner ecosystem and grow with us.`,-};diff --git a/packages/twenty-website-new/src/app/[locale]/partners/page.tsx b/packages/twenty-website-new/src/app/[locale]/partners/page.tsxindex d2e1c695a12..13ea4fab889 100644--- a/packages/twenty-website-new/src/app/[locale]/partners/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/partners/page.tsx@@ -1,41 +1,36 @@import { msg } from '@lingui/core/macro';-import { FAQ_DATA } from '@/sections/Faq/data';-import { MENU_DATA } from '@/sections/Menu/data';-import { TRUSTED_BY_DATA } from '@/sections/TrustedBy/data';-import { TalkToUsButton } from '@/lib/contact-cal';+import { Faq, FAQ_QUESTIONS } from '@/sections/Faq';+import { TRUSTED_BY_LOGOS, TrustedBy } from '@/sections/TrustedBy';+import { TalkToUsButton } from '@/sections/ContactCal';import { CASE_STUDY_CATALOG_ENTRIES } from '@/lib/customers';-import { THREE_CARDS_ILLUSTRATION_DATA } from '@/app/[locale]/partners/three-cards-illustration.data';-import { HERO_COPY } from '@/app/[locale]/partners/hero.data';-import { SIGNOFF_COPY } from '@/app/[locale]/partners/signoff.data';-import { TESTIMONIALS_DATA } from '@/app/[locale]/partners/testimonials.data';+import { PARTNER_ILLUSTRATION_CARDS } from '@/app/[locale]/partners/three-cards-illustration.data';+import { PARTNER_TESTIMONIALS } from '@/app/[locale]/partners/testimonials.data';import {PartnerHeroCtas,PartnerSignoffCtas,} from '@/app/[locale]/partners/components/PartnerApplication';import {- Body,Eyebrow,Heading,HeadingPart,LinkButton,} from '@/design-system/components';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';-import { createMessageDescriptorRenderer } from '@/lib/i18n/create-message-descriptor-renderer';import {getRouteI18n,type LocaleRouteParams,-} from '@/lib/i18n/get-route-i18n';+} from '@/lib/i18n/utils/get-route-i18n';import { Pages } from '@/lib/pages';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';-import { CaseStudyCatalog } from '@/sections/CaseStudyCatalog/components';-import { Faq } from '@/sections/Faq/components';-import { Hero } from '@/sections/Hero/components';-import { Menu } from '@/sections/Menu/components';-import { Signoff } from '@/sections/Signoff/components';-import { Testimonials } from '@/sections/Testimonials/components';-import { ThreeCards } from '@/sections/ThreeCards/components';-import { TrustedBy } from '@/sections/TrustedBy/components';-import type { ThreeCardsScrollLayoutOptions } from '@/sections/ThreeCards/utils/three-cards-scroll-layout';+import { CaseStudyCatalog } from '@/sections/CaseStudyCatalog';+import { Hero } from '@/sections/Hero';+import { Menu, MENU_DATA } from '@/sections/Menu';+import { Signoff } from '@/sections/Signoff';+import { Testimonials } from '@/sections/Testimonials';+import {+ ThreeCards,+ type ThreeCardsScrollLayoutOptions,+} from '@/sections/ThreeCards';import { theme } from '@/theme';import { buildRouteMetadata } from '@/lib/seo';import { styled } from '@linaria/react';@@ -68,7 +63,6 @@ export default async function PartnerPage({ params }: PartnerPageProps) {getRouteI18n(params),fetchCommunityStats(),]);- const renderText = createMessageDescriptorRenderer(i18n);const menuSocialLinks = mergeSocialLinkLabels(MENU_DATA.socialLinks, stats);return (@@ -85,21 +79,19 @@ export default async function PartnerPage({ params }: PartnerPageProps) {<Menu.Cta scheme="primary" /></Menu.Root>- <Hero.Root backgroundColor={theme.colors.primary.background[100]}>+ <Hero.Root scheme="light"><Hero.Heading page={Pages.Partners}>- <HeadingPart fontFamily="serif">- {renderText(msg`Become`)}- </HeadingPart>+ <HeadingPart fontFamily="serif">{i18n._(msg`Become`)}</HeadingPart><br /><HeadingPart fontFamily="sans">- {renderText(msg`our partner`)}+ {i18n._(msg`our partner`)}</HeadingPart></Hero.Heading>- <Hero.Body- page={Pages.Partners}- body={{ text: HERO_COPY.body }}- renderText={renderText}- />+ <Hero.Body page={Pages.Partners}>+ {i18n._(+ msg`We're building the #1 Open Source CRM, but we can't do it alone. Join our partner ecosystem and grow with us.`,+ )}+ </Hero.Body><Hero.Cta><PartnerHeroCtas /></Hero.Cta>@@ -109,88 +101,68 @@ export default async function PartnerPage({ params }: PartnerPageProps) {<TrustedBy.RootbackgroundColor={theme.colors.primary.background[100]}compactBottom- >- <TrustedBy.Separator- renderText={renderText}- separator={TRUSTED_BY_DATA.separator}- />- <TrustedBy.Logos logos={TRUSTED_BY_DATA.logos} />- <TrustedBy.ClientCount- label={TRUSTED_BY_DATA.clientCountLabel.text}- renderText={renderText}- />- </TrustedBy.Root>+ separator={i18n._(msg`trusted by`)}+ logos={TRUSTED_BY_LOGOS}+ clientCount={i18n._(msg`+10k others`)}+ /><PromoSpacing><CaseStudyCatalog.PromocompactTopentries={CASE_STUDY_CATALOG_ENTRIES}- renderText={renderText}/></PromoSpacing>- <ThreeCards.Root backgroundColor={theme.colors.secondary.background[5]}>+ <ThreeCards.Root scheme="muted"><ThreeCards.Intro page={Pages.Partners} align="left">- <Eyebrow- colorScheme="primary"- heading={THREE_CARDS_ILLUSTRATION_DATA.eyebrow.heading}- renderText={renderText}- />+ <Eyebrow>+ <HeadingPart fontFamily="sans">+ {i18n._(msg`Which partner program is right for you?`)}+ </HeadingPart>+ </Eyebrow><Heading size="lg" weight="light"><HeadingPart fontFamily="serif">- {renderText(msg`Find the program that fits your business`)}+ {i18n._(msg`Find the program that fits your business`)}</HeadingPart>{' '}<HeadingPart fontFamily="sans">- {renderText(msg`and unlock new opportunities with Twenty`)}+ {i18n._(msg`and unlock new opportunities with Twenty`)}</HeadingPart></Heading>- {THREE_CARDS_ILLUSTRATION_DATA.body && (- <Body- body={THREE_CARDS_ILLUSTRATION_DATA.body}- renderText={renderText}- size="sm"- />- )}</ThreeCards.Intro><ThreeCards.IllustrationCards- illustrationCards={THREE_CARDS_ILLUSTRATION_DATA.illustrationCards}+ illustrationCards={PARTNER_ILLUSTRATION_CARDS}layoutOptions={PARTNER_ILLUSTRATION_CARDS_SCROLL_LAYOUT_OPTIONS}variant="simple"/></ThreeCards.Root><Testimonials.Root- backgroundColor={theme.colors.secondary.background[5]}- color={theme.colors.secondary.text[100]}+ scheme="muted"shapeFillColor={theme.colors.secondary.background[100]}><Testimonials.PartnerCarousel- eyebrow={TESTIMONIALS_DATA.eyebrow}- testimonials={TESTIMONIALS_DATA.testimonials}+ eyebrow={i18n._(msg`Join our growing partner ecosystem`)}+ testimonials={PARTNER_TESTIMONIALS}><Testimonials.PartnerVisual /></Testimonials.PartnerCarousel></Testimonials.Root>- <Signoff.Root- backgroundColor={theme.colors.primary.background[100]}- color={theme.colors.primary.text[100]}- page={Pages.Partners}- >+ <Signoff.Root scheme="light" page={Pages.Partners}><Signoff.Heading page={Pages.Partners}><HeadingPart fontFamily="serif">- {renderText(msg`Ready to grow`)}+ {i18n._(msg`Ready to grow`)}</HeadingPart><br /><HeadingPart fontFamily="sans">- {renderText(msg`with Twenty?`)}+ {i18n._(msg`with Twenty?`)}</HeadingPart></Signoff.Heading>- <Signoff.Body- body={{ text: SIGNOFF_COPY.body }}- page={Pages.Partners}- renderText={renderText}- />+ <Signoff.Body page={Pages.Partners}>+ {i18n._(+ msg`Join our partner ecosystem and help businesses\ntake control of their CRM.`,+ )}+ </Signoff.Body><Signoff.Cta><PartnerSignoffCtas /></Signoff.Cta>@@ -198,25 +170,25 @@ export default async function PartnerPage({ params }: PartnerPageProps) {<Faq.Root><Faq.Intro>- <Eyebrow- colorScheme="secondary"- heading={FAQ_DATA.eyebrow.heading}- renderText={renderText}- />+ <Eyebrow colorScheme="secondary">+ <HeadingPart fontFamily="sans">+ {i18n._(msg`Any Questions?`)}+ </HeadingPart>+ </Eyebrow><Faq.Heading><HeadingPart fontFamily="serif">- {renderText(msg`Stop fighting custom.`)}+ {i18n._(msg`Stop fighting custom.`)}</HeadingPart><br /><HeadingPart fontFamily="sans">- {renderText(msg`Start building, with Twenty`)}+ {i18n._(msg`Start building, with Twenty`)}</HeadingPart></Faq.Heading><Faq.Cta><LinkButtoncolor="primary"href="https://app.twenty.com/welcome"- label={renderText(msg`Get started`)}+ label={i18n._(msg`Get started`)}variant="contained"/><TalkToUsButton@@ -226,7 +198,7 @@ export default async function PartnerPage({ params }: PartnerPageProps) {/></Faq.Cta></Faq.Intro>- <Faq.Items questions={FAQ_DATA.questions} />+ <Faq.Items questions={FAQ_QUESTIONS} /></Faq.Root></>);diff --git a/packages/twenty-website-new/src/app/[locale]/partners/signoff.data.ts b/packages/twenty-website-new/src/app/[locale]/partners/signoff.data.tsdeleted file mode 100644index c35eebf9ca6..00000000000--- a/packages/twenty-website-new/src/app/[locale]/partners/signoff.data.ts+++ /dev/null@@ -1,5 +0,0 @@-import { msg } from '@lingui/core/macro';--export const SIGNOFF_COPY = {- body: msg`Join our partner ecosystem and help businesses\ntake control of their CRM.`,-};diff --git a/packages/twenty-website-new/src/app/[locale]/partners/testimonials.data.ts b/packages/twenty-website-new/src/app/[locale]/partners/testimonials.data.tsindex a0d7bd4a469..1e2f55d9958 100644--- a/packages/twenty-website-new/src/app/[locale]/partners/testimonials.data.ts+++ b/packages/twenty-website-new/src/app/[locale]/partners/testimonials.data.ts@@ -1,55 +1,38 @@import { msg } from '@lingui/core/macro';-import type { TestimonialsDataType } from '@/sections/Testimonials/types';+import type { TestimonialCardType } from '@/sections/Testimonials';-export const TESTIMONIALS_DATA: TestimonialsDataType = {- eyebrow: {- heading: {- text: msg`Join our growing partner ecosystem`,- fontFamily: 'sans',- },- },- testimonials: [- {- heading: {- text: msg`Twenty gives you the kind of flexibility that actually changes what you can offer your clients. The dev experience is clean, the APIs are open, and when something needs to be customized, you can just do it. There's no fighting the platform.`,- fontFamily: 'sans',- },- author: {- name: { text: msg`Benjamin Reynolds` },- designation: { text: msg`Principal and Founder, Alternative Partners` },- avatar: {- src: '/images/partner/testimonials/benjamin-reynolds.webp',- alt: 'Portrait of Benjamin Reynolds',- },+export const PARTNER_TESTIMONIALS: TestimonialCardType[] = [+ {+ heading: msg`Twenty gives you the kind of flexibility that actually changes what you can offer your clients. The dev experience is clean, the APIs are open, and when something needs to be customized, you can just do it. There's no fighting the platform.`,+ author: {+ name: msg`Benjamin Reynolds`,+ designation: msg`Principal and Founder, Alternative Partners`,+ avatar: {+ src: '/images/partner/testimonials/benjamin-reynolds.webp',+ alt: 'Portrait of Benjamin Reynolds',},},- {- heading: {- text: msg`The flexibility is just amazing. Literally, there's nothing you cannot do. You can create objects, access everything through the API, pull notes and send them to the portal. Try doing that in HubSpot. No way. It's the true ability to build exactly what's actually needed.`,- fontFamily: 'sans',- },- author: {- name: { text: msg`Bertrams` },- designation: { text: msg`Founder, Wintactix` },- avatar: {- src: '/images/partner/testimonials/bertrams.jpeg',- alt: 'Portrait of Bertrams',- },+ },+ {+ heading: msg`The flexibility is just amazing. Literally, there's nothing you cannot do. You can create objects, access everything through the API, pull notes and send them to the portal. Try doing that in HubSpot. No way. It's the true ability to build exactly what's actually needed.`,+ author: {+ name: msg`Bertrams`,+ designation: msg`Founder, Wintactix`,+ avatar: {+ src: '/images/partner/testimonials/bertrams.webp',+ alt: 'Portrait of Bertrams',},},- {- heading: {- text: msg`Twenty Apps opens the door to building products, not just implementations. For example, we're developing a WhatsApp Business integration that any Twenty’s client could get. That's a recurring revenue stream we wouldn't have if we were just configuring someone else's platform.`,- fontFamily: 'sans',- },- author: {- name: { text: msg`Mike Babiy` },- designation: { text: msg`Founder, Nine Dots Ventures` },- avatar: {- src: '/images/partner/testimonials/mike-babiy.png',- alt: 'Photo featuring Mike Babiy',- },+ },+ {+ heading: msg`Twenty Apps opens the door to building products, not just implementations. For example, we're developing a WhatsApp Business integration that any Twenty's client could get. That's a recurring revenue stream we wouldn't have if we were just configuring someone else's platform.`,+ author: {+ name: msg`Mike Babiy`,+ designation: msg`Founder, Nine Dots Ventures`,+ avatar: {+ src: '/images/partner/testimonials/mike-babiy.webp',+ alt: 'Photo featuring Mike Babiy',},},- ],-};+ },+];diff --git a/packages/twenty-website-new/src/app/[locale]/partners/three-cards-illustration.data.ts b/packages/twenty-website-new/src/app/[locale]/partners/three-cards-illustration.data.tsindex 5ce6cf3b9a0..20e840ec07f 100644--- a/packages/twenty-website-new/src/app/[locale]/partners/three-cards-illustration.data.ts+++ b/packages/twenty-website-new/src/app/[locale]/partners/three-cards-illustration.data.ts@@ -1,70 +1,56 @@import { msg } from '@lingui/core/macro';-import type { ThreeCardsIllustrationDataType } from '@/sections/ThreeCards/types';+import type { ThreeCardsIllustrationCardType } from '@/sections/ThreeCards';-export const THREE_CARDS_ILLUSTRATION_DATA: ThreeCardsIllustrationDataType = {- eyebrow: {- heading: {- text: msg`Which partner program is right for you?`,- fontFamily: 'sans',+export const PARTNER_ILLUSTRATION_CARDS: ThreeCardsIllustrationCardType[] = [+ {+ heading: msg`Technology Partners`,+ body: msg`Build integrations that connect Twenty with the tools your customers already use. Help us expand the Twenty ecosystem.`,+ benefits: [+ { text: msg`Co-marketing opportunities`, icon: 'users' },+ { text: msg`Listing on Twenty integrations page`, icon: 'search' },+ { text: msg`Soon: earn revenue`, icon: 'tag' },+ ],+ action: {+ kind: 'partnerApplication',+ label: msg`Become a Technology Partner`,+ programId: 'technology',},+ attribution: undefined,+ illustration: 'programming',},- illustrationCards: [- {- heading: { text: msg`Technology Partners`, fontFamily: 'sans' },- body: {- text: msg`Build integrations that connect Twenty with the tools your customers already use. Help us expand the Twenty ecosystem.`,+ {+ heading: msg`Content & Community Partners`,+ body: msg`Share Twenty with your audience and help shape the future of the #1 Open Source CRM. We're looking for creators, educators, and community builders who want to showcase great software.`,+ benefits: [+ { text: msg`Revenue share for referred customers`, icon: 'tag' },+ {+ text: msg`Exclusive content collaboration opportunities`,+ icon: 'edit',},- benefits: [- { text: msg`Co-marketing opportunities`, icon: 'users' },- { text: msg`Listing on Twenty integrations page`, icon: 'search' },- { text: msg`Soon: earn revenue`, icon: 'tag' },- ],- action: {- kind: 'partnerApplication',- label: msg`Become a Technology Partner`,- programId: 'technology',- },- attribution: undefined,- illustration: 'programming',- },- {- heading: { text: msg`Content & Community Partners`, fontFamily: 'sans' },- body: {- text: msg`Share Twenty with your audience and help shape the future of the #1 Open Source CRM. We're looking for creators, educators, and community builders who want to showcase great software.`,- },- benefits: [- { text: msg`Revenue share for referred customers`, icon: 'tag' },- {- text: msg`Exclusive content collaboration opportunities`,- icon: 'edit',- },- { text: msg`Marketing assets & brand resources`, icon: 'book' },- ],- action: {- kind: 'partnerApplication',- label: msg`Become a Content Partner`,- programId: 'content',- },- attribution: undefined,- illustration: 'connect',+ { text: msg`Marketing assets & brand resources`, icon: 'book' },+ ],+ action: {+ kind: 'partnerApplication',+ label: msg`Become a Content Partner`,+ programId: 'content',},- {- heading: { text: msg`Solutions Partners`, fontFamily: 'sans' },- body: {- text: msg`Help customers implement, customize, and succeed with Twenty. Combine sales and services to grow your business.`,- },- benefits: [- { text: msg`Resale discounts & revenue share`, icon: 'tag' },- { text: msg`Marketplace listing`, icon: 'search' },- { text: msg`Dedicated partner support`, icon: 'users' },- ],- action: {- kind: 'partnerApplication',- label: msg`Become a Solution Partner`,- programId: 'solutions',- },- attribution: undefined,- illustration: 'grow',+ attribution: undefined,+ illustration: 'connect',+ },+ {+ heading: msg`Solutions Partners`,+ body: msg`Help customers implement, customize, and succeed with Twenty. Combine sales and services to grow your business.`,+ benefits: [+ { text: msg`Resale discounts & revenue share`, icon: 'tag' },+ { text: msg`Marketplace listing`, icon: 'search' },+ { text: msg`Dedicated partner support`, icon: 'users' },+ ],+ action: {+ kind: 'partnerApplication',+ label: msg`Become a Solution Partner`,+ programId: 'solutions',},- ],-};+ attribution: undefined,+ illustration: 'grow',+ },+];diff --git a/packages/twenty-website-new/src/app/[locale]/pricing/engagement-band.data.ts b/packages/twenty-website-new/src/app/[locale]/pricing/engagement-band.data.tsdeleted file mode 100644index b516b399f41..00000000000--- a/packages/twenty-website-new/src/app/[locale]/pricing/engagement-band.data.ts+++ /dev/null@@ -1,6 +0,0 @@-import { msg } from '@lingui/core/macro';--export const ENGAGEMENT_BAND_COPY = {- body: msg`Find the right partner to implement, customize, and tailor Twenty to your team.`,- heading: msg`Need help with customization?`,-};diff --git a/packages/twenty-website-new/src/app/[locale]/pricing/hero.data.ts b/packages/twenty-website-new/src/app/[locale]/pricing/hero.data.tsdeleted file mode 100644index be0371d4c8f..00000000000--- a/packages/twenty-website-new/src/app/[locale]/pricing/hero.data.ts+++ /dev/null@@ -1,5 +0,0 @@-import { msg } from '@lingui/core/macro';--export const HERO_COPY = {- body: msg`Start your free trial today\nwithout credit card.`,-};diff --git a/packages/twenty-website-new/src/app/[locale]/pricing/page.tsx b/packages/twenty-website-new/src/app/[locale]/pricing/page.tsxindex 604aa685693..7a000410fa4 100644--- a/packages/twenty-website-new/src/app/[locale]/pricing/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/pricing/page.tsx@@ -1,29 +1,23 @@import { msg } from '@lingui/core/macro';-import { FAQ_DATA } from '@/sections/Faq/data';-import { MENU_DATA } from '@/sections/Menu/data';-import { TalkToUsButton } from '@/lib/contact-cal';+import { Faq, FAQ_QUESTIONS } from '@/sections/Faq';+import { TalkToUsButton } from '@/sections/ContactCal';import { BecomePartnerButton } from '@/app/[locale]/partners/components/PartnerApplication';-import { ENGAGEMENT_BAND_COPY } from '@/app/[locale]/pricing/engagement-band.data';-import { HERO_COPY } from '@/app/[locale]/pricing/hero.data';import { PLAN_TABLE_DATA } from '@/app/[locale]/pricing/plan-table.data';import { SALESFORCE_DATA } from '@/app/[locale]/pricing/salesforce.data';import { Eyebrow, HeadingPart, LinkButton } from '@/design-system/components';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';-import { createMessageDescriptorRenderer } from '@/lib/i18n/create-message-descriptor-renderer';import {getRouteI18n,type LocaleRouteParams,-} from '@/lib/i18n/get-route-i18n';+} from '@/lib/i18n/utils/get-route-i18n';import { Pages } from '@/lib/pages';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';-import { EngagementBand } from '@/sections/EngagementBand/components';-import { Faq } from '@/sections/Faq/components';-import { Hero } from '@/sections/Hero/components';-import { Menu } from '@/sections/Menu/components';-import { Plans } from '@/sections/Plans/components';-import { PricingStateProvider } from '@/sections/Plans/context/PricingStateContext';-import { PlanTable } from '@/sections/PlanTable/components';-import { Salesforce } from '@/sections/Salesforce/components';+import { EngagementBand } from '@/sections/EngagementBand';+import { Hero } from '@/sections/Hero';+import { Menu, MENU_DATA } from '@/sections/Menu';+import { Plans, PricingStateProvider } from '@/sections/Plans';+import { PlanTable } from '@/sections/PlanTable';+import { Salesforce } from '@/sections/Salesforce';import { theme } from '@/theme';import { buildFaqPageJsonLd, buildRouteMetadata, JsonLd } from '@/lib/seo';import { styled } from '@linaria/react';@@ -51,12 +45,11 @@ export default async function PricingPage({ params }: PricingPageProps) {getRouteI18n(params),fetchCommunityStats(),]);- const renderText = createMessageDescriptorRenderer(i18n);const menuSocialLinks = mergeSocialLinkLabels(MENU_DATA.socialLinks, stats);return (<>- <JsonLd data={buildFaqPageJsonLd(FAQ_DATA.questions, renderText)} />+ <JsonLd data={buildFaqPageJsonLd(FAQ_QUESTIONS, (d) => i18n._(d))} /><Menu.RootbackgroundColor="#F3F3F3"scheme="primary"@@ -69,34 +62,25 @@ export default async function PricingPage({ params }: PricingPageProps) {<Menu.Cta scheme="primary" /></Menu.Root>- <Hero.Root backgroundColor={theme.colors.secondary.background[5]}>+ <Hero.Root scheme="muted"><Hero.Heading page={Pages.Pricing}>- <HeadingPart fontFamily="serif">- {renderText(msg`Simple`)}- </HeadingPart>+ <HeadingPart fontFamily="serif">{i18n._(msg`Simple`)}</HeadingPart><br />- <HeadingPart fontFamily="sans">- {renderText(msg`Pricing`)}- </HeadingPart>+ <HeadingPart fontFamily="sans">{i18n._(msg`Pricing`)}</HeadingPart></Hero.Heading>- <Hero.Body- body={{ text: HERO_COPY.body }}- page={Pages.Pricing}- preserveLineBreaks- renderText={renderText}- />+ <Hero.Body page={Pages.Pricing} preserveLineBreaks>+ {i18n._(msg`Start your free trial today\nwithout credit card.`)}+ </Hero.Body></Hero.Root><PricingStateProvider>- <Plans.Root backgroundColor={theme.colors.secondary.background[5]}>+ <Plans.Root scheme="muted"><PricingPlansContainer><Plans.Content /></PricingPlansContainer></Plans.Root>- <EngagementBand.Root- backgroundColor={theme.colors.secondary.background[5]}- >+ <EngagementBand.Root scheme="muted"><PricingBannerContainer><EngagementBand.StripdesktopCopyMaxWidth="60%"@@ -104,17 +88,16 @@ export default async function PricingPage({ params }: PricingPageProps) {variant="primary"><EngagementBand.Copy>- <EngagementBand.Heading- renderText={renderText}- segments={{- fontFamily: 'serif',- text: ENGAGEMENT_BAND_COPY.heading,- }}- />- <EngagementBand.Body- body={{ text: ENGAGEMENT_BAND_COPY.body }}- renderText={renderText}- />+ <EngagementBand.Heading>+ <HeadingPart fontFamily="serif">+ {i18n._(msg`Need help with customization?`)}+ </HeadingPart>+ </EngagementBand.Heading>+ <EngagementBand.Body>+ {i18n._(+ msg`Find the right partner to implement, customize, and tailor Twenty to your team.`,+ )}+ </EngagementBand.Body></EngagementBand.Copy><EngagementBand.Actions><BecomePartnerButton@@ -127,45 +110,43 @@ export default async function PricingPage({ params }: PricingPageProps) {</PricingBannerContainer></EngagementBand.Root>- <PlanTable.Root- backgroundColor={theme.colors.secondary.background[100]}- >+ <PlanTable.Root scheme="dark"><PlanTable.Content data={PLAN_TABLE_DATA} /></PlanTable.Root></PricingStateProvider><Salesforce.Flow- backgroundColor={theme.colors.secondary.background[5]}+ scheme="muted"body={SALESFORCE_DATA.body}pricing={SALESFORCE_DATA.pricing}><HeadingPart fontFamily="serif">- {renderText(msg`Trust the n°1 CRM,`)}+ {i18n._(msg`Trust the n°1 CRM,`)}</HeadingPart>{' '}- <HeadingPart fontFamily="sans">{renderText(msg`or not !`)}</HeadingPart>+ <HeadingPart fontFamily="sans">{i18n._(msg`or not !`)}</HeadingPart></Salesforce.Flow><Faq.Root><Faq.Intro>- <Eyebrow- colorScheme="secondary"- heading={FAQ_DATA.eyebrow.heading}- renderText={renderText}- />+ <Eyebrow colorScheme="secondary">+ <HeadingPart fontFamily="sans">+ {i18n._(msg`Any Questions?`)}+ </HeadingPart>+ </Eyebrow><Faq.Heading><HeadingPart fontFamily="serif">- {renderText(msg`Stop fighting custom.`)}+ {i18n._(msg`Stop fighting custom.`)}</HeadingPart><br /><HeadingPart fontFamily="sans">- {renderText(msg`Start building, with Twenty`)}+ {i18n._(msg`Start building, with Twenty`)}</HeadingPart></Faq.Heading><Faq.Cta><LinkButtoncolor="primary"href="https://app.twenty.com/welcome"- label={renderText(msg`Get started`)}+ label={i18n._(msg`Get started`)}variant="contained"/><TalkToUsButton@@ -175,7 +156,7 @@ export default async function PricingPage({ params }: PricingPageProps) {/></Faq.Cta></Faq.Intro>- <Faq.Items questions={FAQ_DATA.questions} />+ <Faq.Items questions={FAQ_QUESTIONS} /></Faq.Root></>);diff --git a/packages/twenty-website-new/src/app/[locale]/pricing/plan-table.data.ts b/packages/twenty-website-new/src/app/[locale]/pricing/plan-table.data.tsindex f944671fa66..d1d0b8a8f82 100644--- a/packages/twenty-website-new/src/app/[locale]/pricing/plan-table.data.ts+++ b/packages/twenty-website-new/src/app/[locale]/pricing/plan-table.data.ts@@ -1,5 +1,5 @@import { msg } from '@lingui/core/macro';-import type { PlanTableDataType } from '@/sections/PlanTable/types';+import type { PlanTableDataType } from '@/sections/PlanTable';export const PLAN_TABLE_DATA: PlanTableDataType = {featureColumnLabel: msg`Name`,diff --git a/packages/twenty-website-new/src/app/[locale]/pricing/salesforce.data.ts b/packages/twenty-website-new/src/app/[locale]/pricing/salesforce.data.tsindex 0191b7c68fa..962d346a911 100644--- a/packages/twenty-website-new/src/app/[locale]/pricing/salesforce.data.ts+++ b/packages/twenty-website-new/src/app/[locale]/pricing/salesforce.data.ts@@ -1,12 +1,10 @@import { msg } from '@lingui/core/macro';-import type { SalesforceDataType } from '@/sections/Salesforce/types';+import type { SalesforceDataType } from '@/sections/Salesforce';const SALESFORCE_POPUP_TITLE = msg`Good choice!`;export const SALESFORCE_DATA: SalesforceDataType = {- body: {- text: msg`Some call this enterprise pricing. We prefer a CRM where API access, webhooks, and workflows don't show up as surprise add-ons.`,- },+ body: msg`Some call this enterprise pricing. We prefer a CRM where API access, webhooks, and workflows don't show up as surprise add-ons.`,pricing: {addons: [{diff --git a/packages/twenty-website-new/src/app/[locale]/privacy-policy/page.tsx b/packages/twenty-website-new/src/app/[locale]/privacy-policy/page.tsxindex 95ef27f408a..ee7adefa36a 100644--- a/packages/twenty-website-new/src/app/[locale]/privacy-policy/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/privacy-policy/page.tsx@@ -1,7 +1,7 @@-import { MENU_DATA } from '@/sections/Menu/data';+import { MENU_DATA } from '@/sections/Menu';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';-import { LegalDocument } from '@/sections/LegalDocument/components';+import { LegalDocument } from '@/sections/LegalDocument';import { buildRouteMetadata } from '@/lib/seo';import { PrivacyPolicyDocument } from './_components';diff --git a/packages/twenty-website-new/src/app/[locale]/product/feature.data.ts b/packages/twenty-website-new/src/app/[locale]/product/feature.data.tsindex b75f5077371..84e19c6995e 100644--- a/packages/twenty-website-new/src/app/[locale]/product/feature.data.ts+++ b/packages/twenty-website-new/src/app/[locale]/product/feature.data.ts@@ -1,84 +1,81 @@import { msg } from '@lingui/core/macro';-import type { FeatureDataType } from '@/sections/Feature/types';+import type { ImageType } from '@/design-system/components/Image';+import type { FeatureTileType } from '@/sections/Feature';-export const FEATURE_DATA: FeatureDataType = {- eyebrow: {- heading: {- text: msg`Core Features`,- fontFamily: 'sans',- },- },- mask: { src: '/images/product/feature/mask.webp', alt: '' },- tiles: [- {- icon: 'check',- image: { src: '/images/product/feature/dashboards.webp', alt: '' },- heading: { text: msg`Reports & Dashboards`, fontFamily: 'sans' },- bullets: [- { text: msg`Build custom dashboards` },- { text: msg`Aggregate, bar, line, pie, and gauge widgets` },- { text: msg`Filtered metrics from live CRM data` },- ],- },- {- icon: 'check',- image: { src: '/images/product/feature/tasks.webp', alt: '' },- heading: { text: msg`Tasks & Activities`, fontFamily: 'sans' },- bullets: [- { text: msg`Create tasks from records` },- { text: msg`Assign owners and due dates` },- { text: msg`Rich notes attached to records` },- ],- },- {- icon: 'check',- image: { src: '/images/product/feature/emails.webp', alt: '' },- heading: { text: msg`Email & Calendar`, fontFamily: 'sans' },- bullets: [- { text: msg`Connect Google or Microsoft accounts` },- { text: msg`Emails and events linked to CRM records` },- { text: msg`Full communication history in one place` },- ],- },- {- icon: 'check',- image: { src: '/images/product/feature/contacts.webp', alt: '' },- heading: { text: msg`Contacts & Companies`, fontFamily: 'sans' },- bullets: [- { text: msg`Custom fields and relationships` },- { text: msg`Unified timeline (emails, events, tasks, notes, files)` },- { text: msg`Email/calendar activity on each record` },- ],- },- {- icon: 'check',- image: { src: '/images/product/feature/pipeline.webp', alt: '' },- heading: { text: msg`Pipeline Management`, fontFamily: 'sans' },- bullets: [- { text: msg`Custom deal stages for your process` },- { text: msg`Drag-and-drop deals between stages` },- { text: msg`Track amount and close date` },- ],- },- {- icon: 'check',- image: { src: '/images/product/feature/files.webp', alt: '' },- heading: { text: msg`Files`, fontFamily: 'sans' },- bullets: [- { text: msg`Multi-file upload on records` },- { text: msg`Rename, download, and delete attachments` },- { text: msg`In-app preview for supported file types (when enabled)` },- ],- },- {- icon: 'check',- image: { src: '/images/product/feature/data.webp', alt: '' },- heading: { text: msg`Data import`, fontFamily: 'sans' },- bullets: [- { text: msg`CSV import flow` },- { text: msg`Column-to-field mapping (including relations)` },- { text: msg`CSV export anytime` },- ],- },- ],+export const FEATURE_MASK: ImageType = {+ src: '/images/product/feature/mask.webp',+ alt: '',};++export const FEATURE_TILES: FeatureTileType[] = [+ {+ icon: 'check',+ image: { src: '/images/product/feature/dashboards.webp', alt: '' },+ heading: msg`Reports & Dashboards`,+ bullets: [+ msg`Build custom dashboards`,+ msg`Aggregate, bar, line, pie, and gauge widgets`,+ msg`Filtered metrics from live CRM data`,+ ],+ },+ {+ icon: 'check',+ image: { src: '/images/product/feature/tasks.webp', alt: '' },+ heading: msg`Tasks & Activities`,+ bullets: [+ msg`Create tasks from records`,+ msg`Assign owners and due dates`,+ msg`Rich notes attached to records`,+ ],+ },+ {+ icon: 'check',+ image: { src: '/images/product/feature/emails.webp', alt: '' },+ heading: msg`Email & Calendar`,+ bullets: [+ msg`Connect Google or Microsoft accounts`,+ msg`Emails and events linked to CRM records`,+ msg`Full communication history in one place`,+ ],+ },+ {+ icon: 'check',+ image: { src: '/images/product/feature/contacts.webp', alt: '' },+ heading: msg`Contacts & Companies`,+ bullets: [+ msg`Custom fields and relationships`,+ msg`Unified timeline (emails, events, tasks, notes, files)`,+ msg`Email/calendar activity on each record`,+ ],+ },+ {+ icon: 'check',+ image: { src: '/images/product/feature/pipeline.webp', alt: '' },+ heading: msg`Pipeline Management`,+ bullets: [+ msg`Custom deal stages for your process`,+ msg`Drag-and-drop deals between stages`,+ msg`Track amount and close date`,+ ],+ },+ {+ icon: 'check',+ image: { src: '/images/product/feature/files.webp', alt: '' },+ heading: msg`Files`,+ bullets: [+ msg`Multi-file upload on records`,+ msg`Rename, download, and delete attachments`,+ msg`In-app preview for supported file types (when enabled)`,+ ],+ },+ {+ icon: 'check',+ image: { src: '/images/product/feature/data.webp', alt: '' },+ heading: msg`Data import`,+ bullets: [+ msg`CSV import flow`,+ msg`Column-to-field mapping (including relations)`,+ msg`CSV export anytime`,+ ],+ },+];diff --git a/packages/twenty-website-new/src/app/[locale]/product/hero.data.ts b/packages/twenty-website-new/src/app/[locale]/product/hero.data.tsdeleted file mode 100644index 1c2eeedcd17..00000000000--- a/packages/twenty-website-new/src/app/[locale]/product/hero.data.ts+++ /dev/null@@ -1,5 +0,0 @@-import { msg } from '@lingui/core/macro';--export const HERO_COPY = {- body: msg`Track relationships, manage pipelines, and take action quickly with a CRM that feels intuitive from day one.`,-};diff --git a/packages/twenty-website-new/src/app/[locale]/product/page.tsx b/packages/twenty-website-new/src/app/[locale]/product/page.tsxindex 357dbb29945..e98269834ff 100644--- a/packages/twenty-website-new/src/app/[locale]/product/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/product/page.tsx@@ -1,14 +1,15 @@import { msg } from '@lingui/core/macro';-import { FAQ_DATA } from '@/sections/Faq/data';-import { MENU_DATA } from '@/sections/Menu/data';-import { TRUSTED_BY_DATA } from '@/sections/TrustedBy/data';-import { TalkToUsButton } from '@/lib/contact-cal';+import type { AppLocale } from 'twenty-shared/translations';+import { Faq, FAQ_QUESTIONS } from '@/sections/Faq';+import { TRUSTED_BY_LOGOS, TrustedBy } from '@/sections/TrustedBy';+import { TalkToUsButton } from '@/sections/ContactCal';import { DEMO_DATA } from '@/app/[locale]/product/demo.data';-import { FEATURE_DATA } from '@/app/[locale]/product/feature.data';-import { HERO_COPY } from '@/app/[locale]/product/hero.data';-import { STEPPER_DATA } from '@/app/[locale]/product/stepper.data';-import { TABS_DATA } from '@/app/[locale]/product/tabs.data';-import { THREE_CARDS_ILLUSTRATION_DATA } from '@/app/[locale]/product/three-cards.data';+import {+ FEATURE_MASK,+ FEATURE_TILES,+} from '@/app/[locale]/product/feature.data';+import { TABS } from '@/app/[locale]/product/tabs.data';+import { ILLUSTRATION_CARDS } from '@/app/[locale]/product/three-cards.data';import {Body,Eyebrow,@@ -17,24 +18,28 @@ import {LinkButton,} from '@/design-system/components';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';-import { createMessageDescriptorRenderer } from '@/lib/i18n/create-message-descriptor-renderer';import {getRouteI18n,type LocaleRouteParams,-} from '@/lib/i18n/get-route-i18n';+} from '@/lib/i18n/utils/get-route-i18n';import { Pages } from '@/lib/pages';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';-import { Faq } from '@/sections/Faq/components';-import { Feature } from '@/sections/Feature/components';-import { Hero } from '@/sections/Hero/components';-import { Menu } from '@/sections/Menu/components';-import { Demo } from '@/sections/Demo/components';-import { ProductStepper } from '@/sections/ProductStepper/components';-import { Tabs } from '@/sections/Tabs/components';-import { ThreeCards } from '@/sections/ThreeCards/components';-import { TrustedBy } from '@/sections/TrustedBy/components';+import { Feature } from '@/sections/Feature';+import { Hero } from '@/sections/Hero';+import { Menu, MENU_DATA } from '@/sections/Menu';+import { Demo } from '@/sections/Demo';+import {+ ProductStepper,+ type ProductStepperStepType,+} from '@/sections/ProductStepper';+import { Tabs } from '@/sections/Tabs';+import { ThreeCards } from '@/sections/ThreeCards';import { theme } from '@/theme';-import { buildRouteMetadata } from '@/lib/seo';+import {+ buildBreadcrumbListJsonLd,+ buildRouteMetadata,+ JsonLd,+} from '@/lib/seo';export const generateMetadata = buildRouteMetadata('product');@@ -47,16 +52,55 @@ export default async function ProductPage({ params }: ProductPageProps) {getRouteI18n(params),fetchCommunityStats(),]);- const renderText = createMessageDescriptorRenderer(i18n);const menuSocialLinks = mergeSocialLinkLabels(MENU_DATA.socialLinks, stats);+ const PRODUCT_STEPS: ProductStepperStepType[] = [+ {+ icon: 'users',+ heading: (+ <HeadingPart fontFamily="sans">{i18n._(msg`Data model`)}</HeadingPart>+ ),+ body: msg`Add objects and fields`,+ image: {+ src: '/images/product/stepper/step-one.webp',+ alt: 'Twenty data model: add objects and fields',+ },+ },+ {+ icon: 'check',+ heading: (+ <HeadingPart fontFamily="sans">{i18n._(msg`Automation`)}</HeadingPart>+ ),+ body: msg`Create a workflow`,+ image: {+ src: '/images/product/stepper/step-two.webp',+ alt: 'Twenty automation: create a workflow',+ },+ },+ {+ icon: 'eye',+ heading: (+ <HeadingPart fontFamily="sans">{i18n._(msg`Layout`)}</HeadingPart>+ ),+ body: msg`Tailor record pages, menus, and views`,+ image: {+ src: '/images/product/stepper/step-three.webp',+ alt: 'Twenty layout: record pages, menus, and views',+ },+ },+ ];+return (<>- {/*- * Above-the-fold hero scene. Preload kicks off the GLB fetch in- * parallel with the JS chunk download, so the model is already in- * the browser cache by the time Three.js asks for it.- */}+ <JsonLd+ data={buildBreadcrumbListJsonLd(+ [+ { name: 'Home', path: '/' },+ { name: 'Product', path: '/product' },+ ],+ i18n.locale as AppLocale,+ )}+ /><linkas="fetch"href="/illustrations/product/hero/hero.glb"@@ -74,160 +118,132 @@ export default async function ProductPage({ params }: ProductPageProps) {<Menu.Cta scheme="primary" /></Menu.Root>- <Hero.Root backgroundColor={theme.colors.primary.background[100]}>+ <Hero.Root scheme="light"><Hero.Heading page={Pages.Product}><HeadingPart fontFamily="serif">- {renderText(msg`A CRM for teams`)}+ {i18n._(msg`A CRM for teams`)}</HeadingPart><br />- <HeadingPart fontFamily="serif">- {renderText(msg`that`)}- </HeadingPart>{' '}- <HeadingPart fontFamily="sans">- {renderText(msg`moves fast`)}- </HeadingPart>+ <HeadingPart fontFamily="serif">{i18n._(msg`that`)}</HeadingPart>{' '}+ <HeadingPart fontFamily="sans">{i18n._(msg`moves fast`)}</HeadingPart></Hero.Heading>- <Hero.Body- body={{ text: HERO_COPY.body }}- page={Pages.Product}- renderText={renderText}- />+ <Hero.Body page={Pages.Product}>+ {i18n._(+ msg`Track relationships, manage pipelines, and take action quickly with a CRM that feels intuitive from day one.`,+ )}+ </Hero.Body><Hero.Cta><LinkButtoncolor="secondary"href="https://app.twenty.com/welcome"- label={renderText(msg`Get started`)}+ label={i18n._(msg`Get started`)}variant="contained"/></Hero.Cta><Hero.ProductVisual /></Hero.Root>- <TrustedBy.Root>- <TrustedBy.Separator- renderText={renderText}- separator={TRUSTED_BY_DATA.separator}- />- <TrustedBy.Logos logos={TRUSTED_BY_DATA.logos} />- <TrustedBy.ClientCount- label={TRUSTED_BY_DATA.clientCountLabel.text}- renderText={renderText}- />- </TrustedBy.Root>+ <TrustedBy.Root+ separator={i18n._(msg`trusted by`)}+ logos={TRUSTED_BY_LOGOS}+ clientCount={i18n._(msg`+10k others`)}+ /><Tabs.Root>- <Eyebrow- colorScheme="secondary"- heading={TABS_DATA.eyebrow.heading}- renderText={renderText}- />+ <Eyebrow colorScheme="secondary">+ <HeadingPart fontFamily="sans">+ {i18n._(msg`AI & Automation`)}+ </HeadingPart>+ </Eyebrow><Heading size="lg" weight="light"><HeadingPart fontFamily="serif">- {renderText(msg`AI that actually`)}+ {i18n._(msg`AI that actually`)}</HeadingPart><br /><HeadingPart fontFamily="serif">- {renderText(msg`helps you`)}+ {i18n._(msg`helps you`)}</HeadingPart>{' '}<HeadingPart fontFamily="sans">- {renderText(msg`work faster`)}+ {i18n._(msg`work faster`)}</HeadingPart></Heading>- <Body- body={{ text: msg`The AI understands your CRM and takes action.` }}- renderText={renderText}- size="sm"- />- <Tabs.TabGroup tabs={TABS_DATA.tabs} />+ <Body size="sm">+ {i18n._(msg`The AI understands your CRM and takes action.`)}+ </Body>+ <Tabs.TabGroup tabs={TABS} /></Tabs.Root>- <Feature.Root backgroundColor={theme.colors.primary.background[100]}>+ <Feature.Root scheme="light"><Feature.Intro align="center" page={Pages.Product}>- <Eyebrow- colorScheme="primary"- heading={FEATURE_DATA.eyebrow.heading}- renderText={renderText}- />+ <Eyebrow>+ <HeadingPart fontFamily="sans">+ {i18n._(msg`Core Features`)}+ </HeadingPart>+ </Eyebrow><Heading size="lg" weight="light"><HeadingPart fontFamily="serif">- {renderText(msg`Everything you need,`)}+ {i18n._(msg`Everything you need,`)}</HeadingPart>{' '}<HeadingPart fontFamily="sans">- {renderText(msg`out of the box`)}+ {i18n._(msg`out of the box`)}</HeadingPart></Heading></Feature.Intro>- <Feature.Tiles- mask={FEATURE_DATA.mask}- renderText={renderText}- tiles={FEATURE_DATA.tiles}- />+ <Feature.Tiles mask={FEATURE_MASK} tiles={FEATURE_TILES} /></Feature.Root>- <ThreeCards.Root backgroundColor={theme.colors.primary.background[100]}>+ <ThreeCards.Root scheme="light"><ThreeCards.Intro page={Pages.Product} align="left">- <Eyebrow- colorScheme="primary"- heading={THREE_CARDS_ILLUSTRATION_DATA.eyebrow.heading}- renderText={renderText}- />+ <Eyebrow>+ <HeadingPart fontFamily="sans">+ {i18n._(msg`Stop settling for trade-offs.`)}+ </HeadingPart>+ </Eyebrow><Heading size="lg" weight="light"><HeadingPart fontFamily="serif">- {renderText(msg`A modern CRM with`)}+ {i18n._(msg`A modern CRM with`)}</HeadingPart>{' '}<HeadingPart fontFamily="sans">- {renderText(msg`an intuitive interface`)}+ {i18n._(msg`an intuitive interface`)}</HeadingPart></Heading>- {THREE_CARDS_ILLUSTRATION_DATA.body && (- <Body- body={THREE_CARDS_ILLUSTRATION_DATA.body}- renderText={renderText}- size="sm"- />- )}</ThreeCards.Intro>- <ThreeCards.IllustrationCards- illustrationCards={THREE_CARDS_ILLUSTRATION_DATA.illustrationCards}- />+ <ThreeCards.IllustrationCards illustrationCards={ILLUSTRATION_CARDS} /></ThreeCards.Root><ProductStepper.Flow- body={STEPPER_DATA.body}- eyebrow={STEPPER_DATA.eyebrow}- steps={STEPPER_DATA.steps}+ body={i18n._(+ msg`Need a quick change? Skip the engineering ticket. Customize your workspace in minutes.`,+ )}+ eyebrow={i18n._(msg`Customization`)}+ steps={PRODUCT_STEPS}><HeadingPart fontFamily="serif">- {renderText(msg`Go the extra mile`)}+ {i18n._(msg`Go the extra mile`)}</HeadingPart>{' '}- <HeadingPart fontFamily="sans">- {renderText(msg`with no-code`)}- </HeadingPart>+ <HeadingPart fontFamily="sans">{i18n._(msg`with no-code`)}</HeadingPart></ProductStepper.Flow><Demo.Root>- <Eyebrow- colorScheme="primary"- heading={{- text: msg`Try it live`,- fontFamily: 'sans',- }}- renderText={renderText}- />+ <Eyebrow>+ <HeadingPart fontFamily="sans">+ {i18n._(msg`Try it live`)}+ </HeadingPart>+ </Eyebrow><Heading size="lg" weight="light"><HeadingPart fontFamily="serif">- {renderText(msg`A demo worth a`)}+ {i18n._(msg`A demo worth a`)}</HeadingPart><br /><HeadingPart fontFamily="sans">- {renderText(msg`thousand words`)}+ {i18n._(msg`thousand words`)}</HeadingPart></Heading><Demo.Cta><LinkButtoncolor="secondary"href="https://app.twenty.com/welcome"- label={renderText(msg`Try Twenty Cloud`)}+ label={i18n._(msg`Try Twenty Cloud`)}variant="contained"/></Demo.Cta>@@ -236,25 +252,25 @@ export default async function ProductPage({ params }: ProductPageProps) {<Faq.Root><Faq.Intro>- <Eyebrow- colorScheme="secondary"- heading={FAQ_DATA.eyebrow.heading}- renderText={renderText}- />+ <Eyebrow colorScheme="secondary">+ <HeadingPart fontFamily="sans">+ {i18n._(msg`Any Questions?`)}+ </HeadingPart>+ </Eyebrow><Faq.Heading><HeadingPart fontFamily="serif">- {renderText(msg`Stop fighting custom.`)}+ {i18n._(msg`Stop fighting custom.`)}</HeadingPart><br /><HeadingPart fontFamily="sans">- {renderText(msg`Start building, with Twenty`)}+ {i18n._(msg`Start building, with Twenty`)}</HeadingPart></Faq.Heading><Faq.Cta><LinkButtoncolor="primary"href="https://app.twenty.com/welcome"- label={renderText(msg`Get started`)}+ label={i18n._(msg`Get started`)}variant="contained"/><TalkToUsButton@@ -264,7 +280,7 @@ export default async function ProductPage({ params }: ProductPageProps) {/></Faq.Cta></Faq.Intro>- <Faq.Items questions={FAQ_DATA.questions} />+ <Faq.Items questions={FAQ_QUESTIONS} /></Faq.Root></>);diff --git a/packages/twenty-website-new/src/app/[locale]/product/signoff.data.ts b/packages/twenty-website-new/src/app/[locale]/product/signoff.data.tsdeleted file mode 100644index 390f828f570..00000000000--- a/packages/twenty-website-new/src/app/[locale]/product/signoff.data.ts+++ /dev/null@@ -1,5 +0,0 @@-import { msg } from '@lingui/core/macro';--export const SIGNOFF_COPY = {- body: msg`Join the teams that chose to own their CRM. Start building with Twenty today.`,-};diff --git a/packages/twenty-website-new/src/app/[locale]/product/stepper.data.ts b/packages/twenty-website-new/src/app/[locale]/product/stepper.data.tsdeleted file mode 100644index cf282a3c2d0..00000000000--- a/packages/twenty-website-new/src/app/[locale]/product/stepper.data.ts+++ /dev/null@@ -1,58 +0,0 @@-import { msg } from '@lingui/core/macro';-import type { ProductStepperDataType } from '@/sections/ProductStepper/types';--export const STEPPER_DATA: ProductStepperDataType = {- eyebrow: {- heading: {- text: msg`Customization`,- fontFamily: 'sans',- },- },- body: {- text: msg`Need a quick change? Skip the engineering ticket. Customize your workspace in minutes.`,- },- steps: [- {- icon: 'users',- heading: {- text: msg`Data model`,- fontFamily: 'sans',- },- body: {- text: msg`Add objects and fields`,- },- image: {- src: '/images/product/stepper/step-one.webp',- alt: 'Twenty data model: add objects and fields',- },- },- {- icon: 'check',- heading: {- text: msg`Automation`,- fontFamily: 'sans',- },- body: {- text: msg`Create a workflow`,- },- image: {- src: '/images/product/stepper/step-two.webp',- alt: 'Twenty automation: create a workflow',- },- },- {- icon: 'eye',- heading: {- text: msg`Layout`,- fontFamily: 'sans',- },- body: {- text: msg`Tailor record pages, menus, and views`,- },- image: {- src: '/images/product/stepper/step-three.webp',- alt: 'Twenty layout: record pages, menus, and views',- },- },- ],-};diff --git a/packages/twenty-website-new/src/app/[locale]/product/tabs.data.ts b/packages/twenty-website-new/src/app/[locale]/product/tabs.data.tsindex 3f56751a5a8..f46a5caf4d7 100644--- a/packages/twenty-website-new/src/app/[locale]/product/tabs.data.ts+++ b/packages/twenty-website-new/src/app/[locale]/product/tabs.data.ts@@ -1,49 +1,38 @@import { msg } from '@lingui/core/macro';-import type { TabType } from '@/sections/Tabs/types';+import type { TabType } from '@/sections/Tabs';-export const TABS_DATA: {- eyebrow: { heading: { text: ReturnType<typeof msg>; fontFamily: 'sans' } };- tabs: TabType[];-} = {- eyebrow: {- heading: {- text: msg`AI & Automation`,- fontFamily: 'sans',+export const TABS: TabType[] = [+ {+ body: msg`Show me all deals closing this month`,+ icon: 'search',+ image: {+ src: '/images/product/tabs/deals.webp',+ alt: 'Deals view',},},- tabs: [- {- body: msg`Show me all deals closing this month`,- icon: 'search',- image: {- src: '/images/product/tabs/deals.webp',- alt: 'Deals view',- },+ {+ body: msg`Create follow-up tasks for my top 10 accounts`,+ icon: 'eye',+ image: {+ src: '/images/product/tabs/tasks.webp',+ alt: 'Tasks view',},- {- body: msg`Create follow-up tasks for my top 10 accounts`,- icon: 'eye',- image: {- src: '/images/product/tabs/tasks.webp',- alt: 'Tasks view',- },- },- {- body: msg`Summarize this customer's history`,- icon: 'edit',- image: {- src: '/images/product/tabs/history.webp',- alt: 'History view',- },+ },+ {+ body: msg`Summarize this customer's history`,+ icon: 'edit',+ image: {+ src: '/images/product/tabs/history.webp',+ alt: 'History view',},- {- body: msg`Create a workflow that send an email sequence`,- icon: 'check',- image: {- src: '/images/product/tabs/workflow.webp',- alt: 'Workflow view',- },+ },+ {+ body: msg`Create a workflow that send an email sequence`,+ icon: 'check',+ image: {+ src: '/images/product/tabs/workflow.webp',+ alt: 'Workflow view',},- ],-};+ },+];diff --git a/packages/twenty-website-new/src/app/[locale]/product/three-cards.data.ts b/packages/twenty-website-new/src/app/[locale]/product/three-cards.data.tsindex d27dbf21147..78a9ccd7ba9 100644--- a/packages/twenty-website-new/src/app/[locale]/product/three-cards.data.ts+++ b/packages/twenty-website-new/src/app/[locale]/product/three-cards.data.ts@@ -1,37 +1,26 @@import { msg } from '@lingui/core/macro';-import type { ThreeCardsIllustrationDataType } from '@/sections/ThreeCards/types';+import type { ThreeCardsIllustrationCardType } from '@/sections/ThreeCards';-export const THREE_CARDS_ILLUSTRATION_DATA: ThreeCardsIllustrationDataType = {- eyebrow: {- heading: { text: msg`Stop settling for trade-offs.`, fontFamily: 'sans' },+export const ILLUSTRATION_CARDS: ThreeCardsIllustrationCardType[] = [+ {+ heading: msg`Built for speed`,+ body: msg`Fly through your workspace with shortcuts and short load times.`,+ benefits: undefined,+ attribution: undefined,+ illustration: 'speed',},- illustrationCards: [- {- heading: { text: msg`Built for speed`, fontFamily: 'sans' },- body: {- text: msg`Fly through your workspace with shortcuts and short load times.`,- },- benefits: undefined,- attribution: undefined,- illustration: 'speed',- },- {- heading: { text: msg`Real-time data`, fontFamily: 'sans' },- body: {- text: msg`See updates as they happen. Work with your team and agents seamlessly.`,- },- benefits: undefined,- attribution: undefined,- illustration: 'eye',- },- {- heading: { text: msg`Stay in Flow`, fontFamily: 'sans' },- body: {- text: msg`AI chat, settings, and records in a side panels for fast, single-screen access.`,- },- benefits: undefined,- attribution: undefined,- illustration: 'singleScreen',- },- ],-};+ {+ heading: msg`Real-time data`,+ body: msg`See updates as they happen. Work with your team and agents seamlessly.`,+ benefits: undefined,+ attribution: undefined,+ illustration: 'eye',+ },+ {+ heading: msg`Stay in Flow`,+ body: msg`AI chat, settings, and records in a side panels for fast, single-screen access.`,+ benefits: undefined,+ attribution: undefined,+ illustration: 'singleScreen',+ },+];diff --git a/packages/twenty-website-new/src/app/[locale]/releases/hero.data.ts b/packages/twenty-website-new/src/app/[locale]/releases/hero.data.tsdeleted file mode 100644index 2adca693731..00000000000--- a/packages/twenty-website-new/src/app/[locale]/releases/hero.data.ts+++ /dev/null@@ -1,5 +0,0 @@-import { msg } from '@lingui/core/macro';--export const RELEASE_NOTES_HERO_COPY = {- body: msg`Discover the newest features and improvements in Twenty,\nthe #1 Open Source CRM.`,-};diff --git a/packages/twenty-website-new/src/app/[locale]/releases/page.tsx b/packages/twenty-website-new/src/app/[locale]/releases/page.tsxindex 84381bd6d21..5c34947d2ba 100644--- a/packages/twenty-website-new/src/app/[locale]/releases/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/releases/page.tsx@@ -1,22 +1,19 @@import { msg } from '@lingui/core/macro';-import { MENU_DATA } from '@/sections/Menu/data';-import { RELEASE_NOTES_HERO_COPY } from '@/app/[locale]/releases/hero.data';import { HeadingPart, LinkButton } from '@/design-system/components';import { GitHubIcon } from '@/icons';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';-import { createMessageDescriptorRenderer } from '@/lib/i18n/create-message-descriptor-renderer';import {getRouteI18n,type LocaleRouteParams,-} from '@/lib/i18n/get-route-i18n';+} from '@/lib/i18n/utils/get-route-i18n';import { Pages } from '@/lib/pages';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';import { fetchLatestGithubReleaseTag } from '@/lib/releases/fetch-latest-release-tag';import { getVisibleReleaseNotes } from '@/lib/releases/get-visible-releases';import { loadLocalReleaseNotes } from '@/lib/releases/load-local-release-notes';-import { Hero } from '@/sections/Hero/components';-import { Menu } from '@/sections/Menu/components';-import { ReleaseNotes } from '@/sections/ReleaseNotes/components';+import { Hero } from '@/sections/Hero';+import { Menu, MENU_DATA } from '@/sections/Menu';+import { ReleaseNotes } from '@/sections/ReleaseNotes';import { theme } from '@/theme';import { buildReleaseListJsonLd, buildRouteMetadata, JsonLd } from '@/lib/seo';import { Fragment } from 'react';@@ -34,7 +31,6 @@ export default async function ReleasesPage({ params }: ReleasesPageProps) {fetchLatestGithubReleaseTag(),fetchCommunityStats(),]);- const renderText = createMessageDescriptorRenderer(i18n);const menuSocialLinks = mergeSocialLinkLabels(MENU_DATA.socialLinks, stats);const visibleNotes =process.env.NODE_ENV === 'development'@@ -67,27 +63,22 @@ export default async function ReleasesPage({ params }: ReleasesPageProps) {<Menu.Cta scheme="primary" /></Menu.Root>- <Hero.Root backgroundColor={theme.colors.primary.background[100]}>+ <Hero.Root scheme="light"><Hero.Heading page={Pages.ReleaseNotes} size="lg" weight="light">- <HeadingPart fontFamily="serif">- {renderText(msg`Latest`)}- </HeadingPart>+ <HeadingPart fontFamily="serif">{i18n._(msg`Latest`)}</HeadingPart><br />- <HeadingPart fontFamily="sans">- {renderText(msg`Releases`)}- </HeadingPart>+ <HeadingPart fontFamily="sans">{i18n._(msg`Releases`)}</HeadingPart></Hero.Heading>- <Hero.Body- page={Pages.ReleaseNotes}- body={{ text: RELEASE_NOTES_HERO_COPY.body }}- renderText={renderText}- size="sm"- />+ <Hero.Body page={Pages.ReleaseNotes} size="sm">+ {i18n._(+ msg`Discover the newest features and improvements in Twenty,\nthe #1 Open Source CRM.`,+ )}+ </Hero.Body><Hero.Cta><LinkButtoncolor="secondary"href="https://github.com/twentyhq/twenty/releases"- label={renderText(msg`Technical notes`)}+ label={i18n._(msg`Technical notes`)}leadingIcon={<GitHubIcon fillColor="currentColor" size={14} />}variant="outlined"/>diff --git a/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/editorial-four.data.ts b/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/editorial-four.data.tsdeleted file mode 100644index b0fd2a50c02..00000000000--- a/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/editorial-four.data.ts+++ /dev/null@@ -1,19 +0,0 @@-import { msg } from '@lingui/core/macro';-import type { EditorialDataType } from '@/sections/Editorial/types/EditorialData';--export const EDITORIAL_FOUR: EditorialDataType = {- eyebrow: {- heading: {- fontFamily: 'sans',- text: msg`What this means`,- },- },- body: [- {- text: msg`You don't buy your deployment pipeline off the shelf. You don't rent your data warehouse from a vendor who decides the schema. You build it, you own it, you iterate on it every week. CRM is going the same way. The teams that treat it as infrastructure they own will compound an advantage every quarter.`,- },- {- text: msg`Tuesday your team learns that deals with a technical champion close 3x faster. Wednesday you add the field, wire up the scoring, adjust the workflow. By Thursday your agents are acting on it. That feedback loop is the edge. And it only works if the CRM is yours.`,- },- ],-};diff --git a/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/editorial-one.data.ts b/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/editorial-one.data.tsdeleted file mode 100644index b4f2d4b5b2c..00000000000--- a/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/editorial-one.data.ts+++ /dev/null@@ -1,19 +0,0 @@-import { msg } from '@lingui/core/macro';-import type { EditorialDataType } from '@/sections/Editorial/types/EditorialData';--export const EDITORIAL_ONE: EditorialDataType = {- eyebrow: {- heading: {- fontFamily: 'sans',- text: msg`The shift`,- },- },- body: [- {- text: msg`For twenty years, CRM meant the same thing: a place to log calls, track deals, and pull reports on Friday. The real work happened in people's heads, in Slack threads, in hallway conversations. The CRM kept score. Nobody expected more from it.`,- },- {- text: msg`AI agents are starting to draft outreach, score leads, research accounts, write follow-ups, update deal stages. Every one of these actions reads from and writes to the CRM. The scoreboard became the playbook. The database became the brain.`,- },- ],-};diff --git a/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/editorial-three.data.ts b/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/editorial-three.data.tsdeleted file mode 100644index 7d287dd5201..00000000000--- a/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/editorial-three.data.ts+++ /dev/null@@ -1,16 +0,0 @@-import { msg } from '@lingui/core/macro';-import type { EditorialDataType } from '@/sections/Editorial/types/EditorialData';--export const EDITORIAL_THREE: EditorialDataType = {- eyebrow: {- heading: { fontFamily: 'sans', text: msg`The opportunity` },- },- body: [- {- text: msg`A year ago, customizing your CRM meant hiring a Salesforce consultant, learning Apex, waiting months. The gap between "I want this" and "it\'s live" was measured in quarters and invoices. So people settled. They bent their process to fit the tool and called it adoption.`,- },- {- text: msg`Now a developer can describe what they want to Claude Code and have a working app in an afternoon. A custom object, a scoring workflow, a new view, an integration. The bottleneck isn't building anymore. It's whether your platform lets you.`,- },- ],-};diff --git a/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/hero.data.ts b/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/hero.data.tsdeleted file mode 100644index 4ca1f72b78b..00000000000--- a/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/hero.data.ts+++ /dev/null@@ -1,5 +0,0 @@-import { msg } from '@lingui/core/macro';--export const HERO_COPY = {- body: msg`CRM was a database you filled on Fridays. AI turned it into the system that runs your go-to-market. To differentiate, you have to build what your competitors can't buy.`,-};diff --git a/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/marquee.data.ts b/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/marquee.data.tsdeleted file mode 100644index 4f837794903..00000000000--- a/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/marquee.data.ts+++ /dev/null@@ -1,10 +0,0 @@-import { msg } from '@lingui/core/macro';-import type { MarqueeDataType } from '@/sections/Marquee/types';--export const MARQUEE_DATA: MarqueeDataType = {- heading: [- { fontFamily: 'serif', text: msg`Same CRM` },- { fontFamily: 'sans', text: msg`Same output` },- { fontFamily: 'serif', text: msg`Same results` },- ],-};diff --git a/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/page.tsx b/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/page.tsxdeleted file mode 100644index a725ab11c4b..00000000000--- a/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/page.tsx+++ /dev/null@@ -1,259 +0,0 @@-import { msg } from '@lingui/core/macro';-import { MENU_DATA } from '@/sections/Menu/data';-import { EDITORIAL_FOUR } from '@/app/[locale]/resources/why-twenty/editorial-four.data';-import { EDITORIAL_ONE } from '@/app/[locale]/resources/why-twenty/editorial-one.data';-import { EDITORIAL_THREE } from '@/app/[locale]/resources/why-twenty/editorial-three.data';-import { HERO_COPY } from '@/app/[locale]/resources/why-twenty/hero.data';-import { MARQUEE_DATA } from '@/app/[locale]/resources/why-twenty/marquee.data';-import { SIGNOFF_COPY } from '@/app/[locale]/resources/why-twenty/signoff.data';-import { HeadingPart, LinkButton } from '@/design-system/components';-import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';-import { createMessageDescriptorRenderer } from '@/lib/i18n/create-message-descriptor-renderer';-import {- getRouteI18n,- type LocaleRouteParams,-} from '@/lib/i18n/get-route-i18n';-import { Pages } from '@/lib/pages';-import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';-import { Editorial } from '@/sections/Editorial/components';-import { Hero } from '@/sections/Hero/components';-import { Marquee } from '@/sections/Marquee/components';-import { Menu } from '@/sections/Menu/components';-import { Signoff } from '@/sections/Signoff/components';-import { theme } from '@/theme';-import { buildRouteMetadata } from '@/lib/seo';-import { css } from '@linaria/core';--const editorialOneIntroClass = css`- margin-bottom: ${theme.spacing(4)};- --editorial-heading-max-width: 760px;- --editorial-intro-max-width: 760px;-- @media (min-width: ${theme.breakpoints.md}px) {- margin-bottom: ${theme.spacing(8)};- }-`;--const editorialRightIntroClass = css`- margin-bottom: ${theme.spacing(4)};- --editorial-heading-max-width: 760px;- --editorial-intro-max-width: 760px;-- @media (min-width: ${theme.breakpoints.md}px) {- align-items: flex-end;- margin-bottom: ${theme.spacing(8)};- margin-left: auto;- margin-right: 0;- text-align: right;- width: auto;- }-`;--const crosshairLineColor = theme.colors.secondary.border[10];--const sectionCrosshairLeft = {- crossX: '120px',- crossY: '0px',- lineColor: crosshairLineColor,-};--const sectionCrosshairRight = {- crossX: 'calc(100% - 120px)',- crossY: '0px',- lineColor: crosshairLineColor,-};--export const generateMetadata = buildRouteMetadata('whyTwenty');--type WhyTwentyPageProps = {- params: Promise<LocaleRouteParams>;-};--export default async function WhyTwentyPage({ params }: WhyTwentyPageProps) {- const [i18n, stats] = await Promise.all([- getRouteI18n(params),- fetchCommunityStats(),- ]);- const renderText = createMessageDescriptorRenderer(i18n);- const menuSocialLinks = mergeSocialLinkLabels(MENU_DATA.socialLinks, stats);-- return (- <>- {/*- * Above-the-fold hero scene. Preload kicks off the GLB fetch in- * parallel with the JS chunk download, so the model is already in- * the browser cache by the time Three.js asks for it.- */}- <link- as="fetch"- href="/illustrations/why-twenty/hero/hero.glb"- rel="preload"- />- <Menu.Root- backgroundColor={theme.colors.secondary.background[100]}- scheme="secondary"- navItems={MENU_DATA.navItems}- socialLinks={menuSocialLinks}- >- <Menu.Logo scheme="secondary" />- <Menu.Nav scheme="secondary" navItems={MENU_DATA.navItems} />- <Menu.Social scheme="secondary" socialLinks={menuSocialLinks} />- <Menu.Cta scheme="secondary" />- </Menu.Root>-- <Hero.Root- backgroundColor={theme.colors.secondary.background[100]}- colorScheme="secondary"- >- <Hero.Heading page={Pages.WhyTwenty} size="xl">- <HeadingPart fontFamily="serif">- {renderText(msg`The future of CRM is built,`)}- </HeadingPart>{' '}- <HeadingPart fontFamily="sans">- {renderText(msg`not bought.`)}- </HeadingPart>- </Hero.Heading>- <Hero.Body- body={{ text: HERO_COPY.body }}- page={Pages.WhyTwenty}- renderText={renderText}- />- <Hero.WhyTwentyVisual />- </Hero.Root>-- <Editorial.Root- backgroundColor={theme.colors.secondary.background[100]}- color={theme.colors.secondary.text[100]}- crosshair={sectionCrosshairRight}- >- <Editorial.Intro className={editorialOneIntroClass}>- <Editorial.Eyebrow- colorScheme="secondary"- eyebrow={EDITORIAL_ONE.eyebrow!}- renderText={renderText}- />- <Editorial.Heading>- <HeadingPart fontFamily="serif">- {renderText(msg`CRM was a ledger.`)}- </HeadingPart>{' '}- <HeadingPart fontFamily="sans">- {renderText(msg`AI turned it into an operating system.`)}- </HeadingPart>- </Editorial.Heading>- </Editorial.Intro>- <Editorial.Body- body={EDITORIAL_ONE.body}- color={theme.colors.secondary.text[60]}- layout="two-column-left"- renderText={renderText}- />- </Editorial.Root>-- {/*- <Editorial.Root- backgroundColor={theme.colors.secondary.background[100]}- color={theme.colors.secondary.text[100]}- >- <Editorial.Body- body={EDITORIAL_TWO.body}- color={theme.colors.secondary.text[60]}- layout="centered"- renderText={renderText}- />- </Editorial.Root>- */}-- <Editorial.Root- backgroundColor={theme.colors.secondary.background[100]}- color={theme.colors.secondary.text[100]}- crosshair={sectionCrosshairLeft}- >- <Editorial.Intro className={editorialRightIntroClass}>- <Editorial.Eyebrow- colorScheme="secondary"- eyebrow={EDITORIAL_FOUR.eyebrow!}- renderText={renderText}- />- <Editorial.Heading>- <HeadingPart fontFamily="serif">- {renderText(msg`Differentiation now`)}- </HeadingPart>{' '}- <HeadingPart fontFamily="sans">- {renderText(msg`lives in the code you own.`)}- </HeadingPart>- </Editorial.Heading>- </Editorial.Intro>- <Editorial.Body- body={EDITORIAL_FOUR.body}- color={theme.colors.secondary.text[60]}- layout="two-column-right"- renderText={renderText}- />- </Editorial.Root>-- <Editorial.Root- backgroundColor={theme.colors.secondary.background[100]}- color={theme.colors.secondary.text[100]}- crosshair={sectionCrosshairRight}- >- <Editorial.Intro className={editorialOneIntroClass}>- <Editorial.Eyebrow- colorScheme="secondary"- eyebrow={EDITORIAL_THREE.eyebrow!}- renderText={renderText}- />- <Editorial.Heading>- <HeadingPart fontFamily="serif">- {renderText(msg`Build it in an afternoon.`)}- </HeadingPart>{' '}- <HeadingPart fontFamily="sans">- {renderText(msg`AI made the gap that small.`)}- </HeadingPart>- </Editorial.Heading>- </Editorial.Intro>- <Editorial.Body- body={EDITORIAL_THREE.body}- color={theme.colors.secondary.text[60]}- layout="two-column-left"- renderText={renderText}- />- </Editorial.Root>-- <Marquee.Root- backgroundColor={theme.colors.secondary.background[100]}- color={theme.colors.secondary.text[100]}- renderText={renderText}- >- <Marquee.Heading segments={MARQUEE_DATA.heading} />- </Marquee.Root>-- <Signoff.Root- backgroundColor={theme.colors.secondary.background[100]}- color={theme.colors.secondary.text[100]}- page={Pages.WhyTwenty}- >- <Signoff.Heading page={Pages.WhyTwenty}>- <HeadingPart fontFamily="serif">- {renderText(msg`Build a CRM your competitors`)}- </HeadingPart>{' '}- <HeadingPart fontFamily="sans">- {renderText(msg`can't buy.`)}- </HeadingPart>- </Signoff.Heading>- <Signoff.Body- body={{ text: SIGNOFF_COPY.body }}- page={Pages.WhyTwenty}- renderText={renderText}- />- <Signoff.Cta>- <LinkButton- color="primary"- href="https://app.twenty.com/welcome"- label={renderText(msg`Get started`)}- variant="contained"- />- </Signoff.Cta>- </Signoff.Root>- </>- );-}diff --git a/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/signoff.data.ts b/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/signoff.data.tsdeleted file mode 100644index 7f8efcb4c94..00000000000--- a/packages/twenty-website-new/src/app/[locale]/resources/why-twenty/signoff.data.ts+++ /dev/null@@ -1,5 +0,0 @@-import { msg } from '@lingui/core/macro';--export const SIGNOFF_COPY = {- body: msg`Open-source, AI-ready, and yours to shape.`,-};diff --git a/packages/twenty-website-new/src/app/[locale]/terms/page.tsx b/packages/twenty-website-new/src/app/[locale]/terms/page.tsxindex c8dd6938a9c..84bec876835 100644--- a/packages/twenty-website-new/src/app/[locale]/terms/page.tsx+++ b/packages/twenty-website-new/src/app/[locale]/terms/page.tsx@@ -1,7 +1,7 @@-import { MENU_DATA } from '@/sections/Menu/data';+import { MENU_DATA } from '@/sections/Menu';import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';-import { LegalDocument } from '@/sections/LegalDocument/components';+import { LegalDocument } from '@/sections/LegalDocument';import { buildRouteMetadata } from '@/lib/seo';import { TermsDocument } from './_components';diff --git a/packages/twenty-website-new/src/app/[locale]/why-twenty/page.tsx b/packages/twenty-website-new/src/app/[locale]/why-twenty/page.tsxnew file mode 100644index 00000000000..5f7b1d4eac2--- /dev/null+++ b/packages/twenty-website-new/src/app/[locale]/why-twenty/page.tsx@@ -0,0 +1,214 @@+import { msg } from '@lingui/core/macro';+import { HeadingPart, LinkButton } from '@/design-system/components';+import { fetchCommunityStats } from '@/lib/community/fetch-community-stats';+import {+ getRouteI18n,+ type LocaleRouteParams,+} from '@/lib/i18n/utils/get-route-i18n';+import { Pages } from '@/lib/pages';+import { mergeSocialLinkLabels } from '@/lib/community/merge-social-link-labels';+import { Editorial } from '@/sections/Editorial';+import { Hero } from '@/sections/Hero';+import { Marquee } from '@/sections/Marquee';+import { Menu, MENU_DATA } from '@/sections/Menu';+import { Signoff } from '@/sections/Signoff';+import { theme } from '@/theme';+import { buildRouteMetadata } from '@/lib/seo';+import { css } from '@linaria/core';++const editorialOneIntroClass = css`+ margin-bottom: ${theme.spacing(4)};+ --editorial-heading-max-width: 760px;+ --editorial-intro-max-width: 760px;++ @media (min-width: ${theme.breakpoints.md}px) {+ margin-bottom: ${theme.spacing(8)};+ }+`;++const editorialRightIntroClass = css`+ margin-bottom: ${theme.spacing(4)};+ --editorial-heading-max-width: 760px;+ --editorial-intro-max-width: 760px;++ @media (min-width: ${theme.breakpoints.md}px) {+ align-items: flex-end;+ margin-bottom: ${theme.spacing(8)};+ margin-left: auto;+ margin-right: 0;+ text-align: right;+ width: auto;+ }+`;++const crosshairLineColor = theme.colors.secondary.border[10];++const sectionCrosshairLeft = {+ crossX: '120px',+ crossY: '0px',+ lineColor: crosshairLineColor,+};++const sectionCrosshairRight = {+ crossX: 'calc(100% - 120px)',+ crossY: '0px',+ lineColor: crosshairLineColor,+};++export const generateMetadata = buildRouteMetadata('whyTwenty');++type WhyTwentyPageProps = {+ params: Promise<LocaleRouteParams>;+};++export default async function WhyTwentyPage({ params }: WhyTwentyPageProps) {+ const [i18n, stats] = await Promise.all([+ getRouteI18n(params),+ fetchCommunityStats(),+ ]);+ const menuSocialLinks = mergeSocialLinkLabels(MENU_DATA.socialLinks, stats);++ return (+ <>+ {/*+ * Above-the-fold hero scene. Preload kicks off the GLB fetch in+ * parallel with the JS chunk download, so the model is already in+ * the browser cache by the time Three.js asks for it.+ */}+ <link+ as="fetch"+ href="/illustrations/why-twenty/hero/hero.glb"+ rel="preload"+ />+ <Menu.Root+ backgroundColor={theme.colors.secondary.background[100]}+ scheme="secondary"+ navItems={MENU_DATA.navItems}+ socialLinks={menuSocialLinks}+ >+ <Menu.Logo scheme="secondary" />+ <Menu.Nav scheme="secondary" navItems={MENU_DATA.navItems} />+ <Menu.Social scheme="secondary" socialLinks={menuSocialLinks} />+ <Menu.Cta scheme="secondary" />+ </Menu.Root>++ <Hero.Root scheme="dark">+ <Hero.Heading page={Pages.WhyTwenty} size="xl">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`The future of CRM is built,`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`not bought.`)}+ </HeadingPart>+ </Hero.Heading>+ <Hero.Body page={Pages.WhyTwenty}>+ {i18n._(+ msg`CRM was a database you filled on Fridays. AI turned it into the system that runs your go-to-market. To differentiate, you have to build what your competitors can't buy.`,+ )}+ </Hero.Body>+ <Hero.WhyTwentyVisual />+ </Hero.Root>++ <Editorial.Root scheme="dark" crosshair={sectionCrosshairRight}>+ <Editorial.Intro className={editorialOneIntroClass}>+ <Editorial.Eyebrow colorScheme="secondary">+ {i18n._(msg`The shift`)}+ </Editorial.Eyebrow>+ <Editorial.Heading>+ <HeadingPart fontFamily="serif">+ {i18n._(msg`CRM was a ledger.`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`AI turned it into an operating system.`)}+ </HeadingPart>+ </Editorial.Heading>+ </Editorial.Intro>+ <Editorial.Body layout="two-column-left">+ {i18n._(+ msg`For twenty years, CRM meant the same thing: a place to log calls, track deals, and pull reports on Friday. The real work happened in people's heads, in Slack threads, in hallway conversations. The CRM kept score. Nobody expected more from it.`,+ )}+ {i18n._(+ msg`AI agents are starting to draft outreach, score leads, research accounts, write follow-ups, update deal stages. Every one of these actions reads from and writes to the CRM. The scoreboard became the playbook. The database became the brain.`,+ )}+ </Editorial.Body>+ </Editorial.Root>++ <Editorial.Root scheme="dark" crosshair={sectionCrosshairLeft}>+ <Editorial.Intro className={editorialRightIntroClass}>+ <Editorial.Eyebrow colorScheme="secondary">+ {i18n._(msg`What this means`)}+ </Editorial.Eyebrow>+ <Editorial.Heading>+ <HeadingPart fontFamily="serif">+ {i18n._(msg`Differentiation now`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`lives in the code you own.`)}+ </HeadingPart>+ </Editorial.Heading>+ </Editorial.Intro>+ <Editorial.Body layout="two-column-right">+ {i18n._(+ msg`You don't buy your deployment pipeline off the shelf. You don't rent your data warehouse from a vendor who decides the schema. You build it, you own it, you iterate on it every week. CRM is going the same way. The teams that treat it as infrastructure they own will compound an advantage every quarter.`,+ )}+ {i18n._(+ msg`Tuesday your team learns that deals with a technical champion close 3x faster. Wednesday you add the field, wire up the scoring, adjust the workflow. By Thursday your agents are acting on it. That feedback loop is the edge. And it only works if the CRM is yours.`,+ )}+ </Editorial.Body>+ </Editorial.Root>++ <Editorial.Root scheme="dark" crosshair={sectionCrosshairRight}>+ <Editorial.Intro className={editorialOneIntroClass}>+ <Editorial.Eyebrow colorScheme="secondary">+ {i18n._(msg`The opportunity`)}+ </Editorial.Eyebrow>+ <Editorial.Heading>+ <HeadingPart fontFamily="serif">+ {i18n._(msg`Build it in an afternoon.`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">+ {i18n._(msg`AI made the gap that small.`)}+ </HeadingPart>+ </Editorial.Heading>+ </Editorial.Intro>+ <Editorial.Body layout="two-column-left">+ {i18n._(+ msg`A year ago, customizing your CRM meant hiring a Salesforce consultant, learning Apex, waiting months. The gap between "I want this" and "it's live" was measured in quarters and invoices. So people settled. They bent their process to fit the tool and called it adoption.`,+ )}+ {i18n._(+ msg`Now a developer can describe what they want to Claude Code and have a working app in an afternoon. A custom object, a scoring workflow, a new view, an integration. The bottleneck isn't building anymore. It's whether your platform lets you.`,+ )}+ </Editorial.Body>+ </Editorial.Root>++ <Marquee.Root+ scheme="dark"+ segments={[+ { fontFamily: 'serif', text: i18n._(msg`Same CRM`) },+ { fontFamily: 'sans', text: i18n._(msg`Same output`) },+ { fontFamily: 'serif', text: i18n._(msg`Same results`) },+ ]}+ />++ <Signoff.Root scheme="dark" page={Pages.WhyTwenty}>+ <Signoff.Heading page={Pages.WhyTwenty}>+ <HeadingPart fontFamily="serif">+ {i18n._(msg`Build a CRM your competitors`)}+ </HeadingPart>{' '}+ <HeadingPart fontFamily="sans">{i18n._(msg`can't buy.`)}</HeadingPart>+ </Signoff.Heading>+ <Signoff.Body page={Pages.WhyTwenty}>+ {i18n._(msg`Open-source, AI-ready, and yours to shape.`)}+ </Signoff.Body>+ <Signoff.Cta>+ <LinkButton+ color="primary"+ href="https://app.twenty.com/welcome"+ label={i18n._(msg`Get started`)}+ variant="contained"+ />+ </Signoff.Cta>+ </Signoff.Root>+ </>+ );+}diff --git a/packages/twenty-website-new/src/app/_components/ScrollToTopOnRouteChange.tsx b/packages/twenty-website-new/src/app/_components/ScrollToTopOnRouteChange.tsxindex 4753f5f8369..84fe95cd90a 100644--- a/packages/twenty-website-new/src/app/_components/ScrollToTopOnRouteChange.tsx+++ b/packages/twenty-website-new/src/app/_components/ScrollToTopOnRouteChange.tsx@@ -1,13 +1,13 @@'use client';import { usePathname } from 'next/navigation';-import { useEffect, useRef } from 'react';+import { useLayoutEffect, useRef } from 'react';export function ScrollToTopOnRouteChange() {const pathname = usePathname();const isInitialRenderRef = useRef(true);- useEffect(() => {+ useLayoutEffect(() => {if (isInitialRenderRef.current) {isInitialRenderRef.current = false;return;diff --git a/packages/twenty-website-new/src/app/api/partner-application/route.ts b/packages/twenty-website-new/src/app/api/partner-application/route.tsindex 21f801147db..64da3647093 100644--- a/packages/twenty-website-new/src/app/api/partner-application/route.ts+++ b/packages/twenty-website-new/src/app/api/partner-application/route.ts@@ -4,7 +4,7 @@ import {getClientIpKey,readJsonBody,} from '@/lib/api';-import { splitFullName } from '@/lib/partner-application';+import { splitFullName } from '@/sections/PartnerApplication';import { NextResponse } from 'next/server';import { z } from 'zod';diff --git a/packages/twenty-website-new/src/app/articles/feed.xml/route.ts b/packages/twenty-website-new/src/app/articles/feed.xml/route.tsnew file mode 100644index 00000000000..7569401a36f--- /dev/null+++ b/packages/twenty-website-new/src/app/articles/feed.xml/route.ts@@ -0,0 +1,48 @@+import { getPublishedArticles } from '@/lib/articles';+import { getSiteUrl } from '@/lib/seo/site-url';++export function GET() {+ const siteUrl = getSiteUrl();+ const articles = getPublishedArticles();++ const items = articles+ .map(+ (article) => ` <item>+ <title>${escapeXml(article.title)}</title>+ <link>${siteUrl}/articles/${article.slug}</link>+ <guid isPermaLink="true">${siteUrl}/articles/${article.slug}</guid>+ <description>${escapeXml(article.description)}</description>+ <pubDate>${new Date(article.date).toUTCString()}</pubDate>+ <author>${escapeXml(article.author)}</author>+ </item>`,+ )+ .join('\n');++ const feed = `<?xml version="1.0" encoding="UTF-8"?>+<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">+ <channel>+ <title>Twenty Articles</title>+ <link>${siteUrl}/articles</link>+ <description>Articles and insights from the Twenty team</description>+ <language>en</language>+ <atom:link href="${siteUrl}/articles/feed.xml" rel="self" type="application/rss+xml"/>+${items}+ </channel>+</rss>`;++ return new Response(feed, {+ headers: {+ 'Content-Type': 'application/xml; charset=utf-8',+ 'Cache-Control': 'public, max-age=3600, s-maxage=3600',+ },+ });+}++function escapeXml(text: string): string {+ return text+ .replace(/&/g, '&')+ .replace(/</g, '<')+ .replace(/>/g, '>')+ .replace(/"/g, '"')+ .replace(/'/g, ''');+}diff --git a/packages/twenty-website-new/src/app/sitemap.ts b/packages/twenty-website-new/src/app/sitemap.tsindex 77ccac9ca16..a21f0dc0957 100644--- a/packages/twenty-website-new/src/app/sitemap.ts+++ b/packages/twenty-website-new/src/app/sitemap.ts@@ -9,6 +9,7 @@ import {} from '@/lib/website-routing';const SITE_URL = getSiteUrl();+const BUILD_DATE = new Date().toISOString();const buildLocalizedUrl = (locale: AppLocale, path: string): string => {const prefix =@@ -40,6 +41,7 @@ const localize = (): MetadataRoute.Sitemap =>locales.map((locale) => ({url: buildLocalizedUrl(locale, path),+ lastModified: BUILD_DATE,changeFrequency,priority,alternates: { languages: buildLanguageAlternates(path, locales) },diff --git a/packages/twenty-website-new/src/content/site/asset-paths.ts b/packages/twenty-website-new/src/content/site/asset-paths.tsindex ab03b3eb0f5..eec689a417a 100644--- a/packages/twenty-website-new/src/content/site/asset-paths.ts+++ b/packages/twenty-website-new/src/content/site/asset-paths.ts@@ -1,81 +1,81 @@export const SHARED_COMPANY_LOGO_URLS = {- a16z: '/images/shared/companies/logos/a16z.png',- accel: '/images/shared/companies/logos/accel.png',- airbnb: '/images/shared/companies/logos/airbnb.png',- airtable: '/images/shared/companies/logos/airtable.png',- anthropic: '/images/shared/companies/logos/anthropic.png',- apple: '/images/shared/companies/logos/apple.png',- apple1977: '/images/shared/companies/logos/apple-1977.png',- calendar: '/images/shared/companies/logos/calendar.png',- claude: '/images/shared/companies/logos/claude.png',- cursor: '/images/shared/companies/logos/cursor.png',- docusign: '/images/shared/companies/logos/docusign.png',- figma: '/images/shared/companies/logos/figma.png',- foundersFund: '/images/shared/companies/logos/founders-fund.png',- github: '/images/shared/companies/logos/github.png',- gmail: '/images/shared/companies/logos/gmail.png',- google: '/images/shared/companies/logos/google.png',- hubspot: '/images/shared/companies/logos/hubspot.png',- kleinerPerkins: '/images/shared/companies/logos/kleiner-perkins.png',- lemlist: '/images/shared/companies/logos/lemlist.png',+ a16z: '/images/shared/companies/logos/a16z.webp',+ accel: '/images/shared/companies/logos/accel.webp',+ airbnb: '/images/shared/companies/logos/airbnb.webp',+ airtable: '/images/shared/companies/logos/airtable.webp',+ anthropic: '/images/shared/companies/logos/anthropic.webp',+ apple: '/images/shared/companies/logos/apple.webp',+ apple1977: '/images/shared/companies/logos/apple-1977.webp',+ calendar: '/images/shared/companies/logos/calendar.webp',+ claude: '/images/shared/companies/logos/claude.webp',+ cursor: '/images/shared/companies/logos/cursor.webp',+ docusign: '/images/shared/companies/logos/docusign.webp',+ figma: '/images/shared/companies/logos/figma.webp',+ foundersFund: '/images/shared/companies/logos/founders-fund.webp',+ github: '/images/shared/companies/logos/github.webp',+ gmail: '/images/shared/companies/logos/gmail.webp',+ google: '/images/shared/companies/logos/google.webp',+ hubspot: '/images/shared/companies/logos/hubspot.webp',+ kleinerPerkins: '/images/shared/companies/logos/kleiner-perkins.webp',+ lemlist: '/images/shared/companies/logos/lemlist.webp',linear: '/images/shared/companies/logos/linear.svg',- linkedin: '/images/shared/companies/logos/linkedin.png',- mailchimp: '/images/shared/companies/logos/mailchimp.png',- meet: '/images/shared/companies/logos/meet.png',- metabase: '/images/shared/companies/logos/metabase.png',- microsoft: '/images/shared/companies/logos/microsoft.png',- notion: '/images/shared/companies/logos/notion.png',- okta: '/images/shared/companies/logos/okta.png',- openai: '/images/shared/companies/logos/openai.png',- outlook: '/images/shared/companies/logos/outlook.png',- outreach: '/images/shared/companies/logos/outreach.png',- postgresql: '/images/shared/companies/logos/postgresql.png',- qonto: '/images/shared/companies/logos/qonto.png',- salesforce: '/images/shared/companies/logos/salesforce.png',- segment: '/images/shared/companies/logos/segment.png',- sequoia: '/images/shared/companies/logos/sequoia.png',- slack: '/images/shared/companies/logos/slack.png',- stripe: '/images/shared/companies/logos/stripe.png',- tally: '/images/shared/companies/logos/tally.png',- twenty: '/images/shared/companies/logos/twenty.png',- whatsapp: '/images/shared/companies/logos/whatsapp.png',- zapier: '/images/shared/companies/logos/zapier.png',+ linkedin: '/images/shared/companies/logos/linkedin.webp',+ mailchimp: '/images/shared/companies/logos/mailchimp.webp',+ meet: '/images/shared/companies/logos/meet.webp',+ metabase: '/images/shared/companies/logos/metabase.webp',+ microsoft: '/images/shared/companies/logos/microsoft.webp',+ notion: '/images/shared/companies/logos/notion.webp',+ okta: '/images/shared/companies/logos/okta.webp',+ openai: '/images/shared/companies/logos/openai.webp',+ outlook: '/images/shared/companies/logos/outlook.webp',+ outreach: '/images/shared/companies/logos/outreach.webp',+ postgresql: '/images/shared/companies/logos/postgresql.webp',+ qonto: '/images/shared/companies/logos/qonto.webp',+ salesforce: '/images/shared/companies/logos/salesforce.webp',+ segment: '/images/shared/companies/logos/segment.webp',+ sequoia: '/images/shared/companies/logos/sequoia.webp',+ slack: '/images/shared/companies/logos/slack.webp',+ stripe: '/images/shared/companies/logos/stripe.webp',+ tally: '/images/shared/companies/logos/tally.webp',+ twenty: '/images/shared/companies/logos/twenty.webp',+ whatsapp: '/images/shared/companies/logos/whatsapp.webp',+ zapier: '/images/shared/companies/logos/zapier.webp',} as const;export const SHARED_PEOPLE_AVATAR_URLS = {- alexandreProt: '/images/shared/people/avatars/alexandre-prot.jpg',- anonymousAnna: '/images/shared/people/avatars/anonymous-anna.jpg',- anonymousFabrice: '/images/shared/people/avatars/anonymous-fabrice.jpg',- anonymousFelix: '/images/shared/people/avatars/anonymous-felix.jpg',- anonymousIndira: '/images/shared/people/avatars/anonymous-indira.jpg',- anonymousLaura: '/images/shared/people/avatars/anonymous-laura.jpg',- anonymousMike: '/images/shared/people/avatars/anonymous-mike.jpg',- anonymousThomas: '/images/shared/people/avatars/anonymous-thomas.jpg',- benChestnut: '/images/shared/people/avatars/ben-chestnut.jpg',- brianChesky: '/images/shared/people/avatars/brian-chesky.jpg',- chrisWanstrath: '/images/shared/people/avatars/chris-wanstrath.jpg',- craigFederighi: '/images/shared/people/avatars/craig-federighi.jpg',- darioAmodei: '/images/shared/people/avatars/dario-amodei.jpg',- dylanField: '/images/shared/people/avatars/dylan-field.jpg',- eddyCue: '/images/shared/people/avatars/eddy-cue.jpg',- ivanZhao: '/images/shared/people/avatars/ivan-zhao.jpg',- jeffWilliams: '/images/shared/people/avatars/jeff-williams.jpg',- joeGebbia: '/images/shared/people/avatars/joe-gebbia.jpg',- katherineAdams: '/images/shared/people/avatars/katherine-adams.jpg',- patrickCollison: '/images/shared/people/avatars/patrick-collison.jpg',- pingLi: '/images/shared/people/avatars/ping-li.jpg',- peterReinhardt: '/images/shared/people/avatars/peter-reinhardt.jpg',- peterThiel: '/images/shared/people/avatars/peter-thiel.jpg',- philSchiller: '/images/shared/people/avatars/phil-schiller.jpg',- rayDamm: '/images/shared/people/avatars/ray-damm.jpg',- reidHoffman: '/images/shared/people/avatars/reid-hoffman.jpg',- roelofBotha: '/images/shared/people/avatars/roelof-botha.jpg',- ryanRoslansky: '/images/shared/people/avatars/ryan-roslansky.jpg',- steveAnavi: '/images/shared/people/avatars/steve-anavi.jpg',- stewartButterfield: '/images/shared/people/avatars/stewart-butterfield.jpg',- sundarPichai: '/images/shared/people/avatars/sundar-pichai.jpg',- thomasDohmke: '/images/shared/people/avatars/thomas-dohmke.jpg',- timCook: '/images/shared/people/avatars/tim-cook.jpg',+ alexandreProt: '/images/shared/people/avatars/alexandre-prot.webp',+ anonymousAnna: '/images/shared/people/avatars/anonymous-anna.webp',+ anonymousFabrice: '/images/shared/people/avatars/anonymous-fabrice.webp',+ anonymousFelix: '/images/shared/people/avatars/anonymous-felix.webp',+ anonymousIndira: '/images/shared/people/avatars/anonymous-indira.webp',+ anonymousLaura: '/images/shared/people/avatars/anonymous-laura.webp',+ anonymousMike: '/images/shared/people/avatars/anonymous-mike.webp',+ anonymousThomas: '/images/shared/people/avatars/anonymous-thomas.webp',+ benChestnut: '/images/shared/people/avatars/ben-chestnut.webp',+ brianChesky: '/images/shared/people/avatars/brian-chesky.webp',+ chrisWanstrath: '/images/shared/people/avatars/chris-wanstrath.webp',+ craigFederighi: '/images/shared/people/avatars/craig-federighi.webp',+ darioAmodei: '/images/shared/people/avatars/dario-amodei.webp',+ dylanField: '/images/shared/people/avatars/dylan-field.webp',+ eddyCue: '/images/shared/people/avatars/eddy-cue.webp',+ ivanZhao: '/images/shared/people/avatars/ivan-zhao.webp',+ jeffWilliams: '/images/shared/people/avatars/jeff-williams.webp',+ joeGebbia: '/images/shared/people/avatars/joe-gebbia.webp',+ katherineAdams: '/images/shared/people/avatars/katherine-adams.webp',+ patrickCollison: '/images/shared/people/avatars/patrick-collison.webp',+ pingLi: '/images/shared/people/avatars/ping-li.webp',+ peterReinhardt: '/images/shared/people/avatars/peter-reinhardt.webp',+ peterThiel: '/images/shared/people/avatars/peter-thiel.webp',+ philSchiller: '/images/shared/people/avatars/phil-schiller.webp',+ rayDamm: '/images/shared/people/avatars/ray-damm.webp',+ reidHoffman: '/images/shared/people/avatars/reid-hoffman.webp',+ roelofBotha: '/images/shared/people/avatars/roelof-botha.webp',+ ryanRoslansky: '/images/shared/people/avatars/ryan-roslansky.webp',+ steveAnavi: '/images/shared/people/avatars/steve-anavi.webp',+ stewartButterfield: '/images/shared/people/avatars/stewart-butterfield.webp',+ sundarPichai: '/images/shared/people/avatars/sundar-pichai.webp',+ thomasDohmke: '/images/shared/people/avatars/thomas-dohmke.webp',+ timCook: '/images/shared/people/avatars/tim-cook.webp',} as const;export const SHARED_COMPANY_LOGO_URLS_BY_DOMAIN = {diff --git a/packages/twenty-website-new/src/design-system/components/Body.tsx b/packages/twenty-website-new/src/design-system/components/Body.tsxindex 110fae5208e..b184fb7fd97 100644--- a/packages/twenty-website-new/src/design-system/components/Body.tsx+++ b/packages/twenty-website-new/src/design-system/components/Body.tsx@@ -2,10 +2,6 @@ import { theme } from '@/theme';import { css } from '@linaria/core';import type { ReactNode } from 'react';-export type BodyType<TText = ReactNode> = {- text: TText;-};-const bodyClassName = css`color: inherit;margin: 0;@@ -42,7 +38,7 @@ const bodyClassName = css`}&[data-size='sm'] {- color: var(--body-sm-color, ${theme.colors.primary.text[60]});+ color: var(--color-text-muted, ${theme.colors.primary.text[60]});font-size: ${theme.font.size(4)};line-height: 1.55;}@@ -70,7 +66,7 @@ const bodyClassName = css`}&[data-variant='body-paragraph'] {- color: var(--body-paragraph-color, ${theme.colors.primary.text[80]});+ color: var(--color-text-muted, ${theme.colors.primary.text[80]});line-height: 1.55;}`;@@ -81,33 +77,26 @@ export type BodyWeight = 'light' | 'regular' | 'medium';export type BodySize = 'md' | 'sm' | 'xs';export type BodyVariant = 'default' | 'body-paragraph';-type BodyTextRenderer<TText> = [TText] extends [ReactNode]- ? { renderText?: (text: TText) => ReactNode }- : { renderText: (text: TText) => ReactNode };--export type BodyProps<TText = ReactNode> = {+export type BodyProps = {as?: BodyAs;- body: BodyType<TText>;+ children: ReactNode;family?: BodyFamily;weight?: BodyWeight;size?: BodySize;variant?: BodyVariant;className?: string;-} & BodyTextRenderer<TText>;+};-export function Body<TText = ReactNode>({+export function Body({as: Tag = 'p',- body,+ children,family = 'sans',- renderText,weight = 'regular',size = 'md',variant = 'default',className,-}: BodyProps<TText>) {+}: BodyProps) {const rootClassName = [bodyClassName, className].filter(Boolean).join(' ');- const content =- renderText === undefined ? (body.text as ReactNode) : renderText(body.text);return (<Tag@@ -117,7 +106,7 @@ export function Body<TText = ReactNode>({data-size={size}data-variant={variant}>- {content}+ {children}</Tag>);}diff --git a/packages/twenty-website-new/src/design-system/components/Button/LinkButton.tsx b/packages/twenty-website-new/src/design-system/components/Button/LinkButton.tsxindex b63e33d8fe6..2f59c99d515 100644--- a/packages/twenty-website-new/src/design-system/components/Button/LinkButton.tsx+++ b/packages/twenty-website-new/src/design-system/components/Button/LinkButton.tsx@@ -1,4 +1,4 @@-import type { LinkButtonType } from '@/design-system/components/Button/types/LinkButtonType';+import type { LinkButtonType } from '@/design-system/components/Button/types/link-button-type';import { styled } from '@linaria/react';import {BaseButton,diff --git a/packages/twenty-website-new/src/design-system/components/Button/SubmitButton.tsx b/packages/twenty-website-new/src/design-system/components/Button/SubmitButton.tsxdeleted file mode 100644index 829094fa909..00000000000--- a/packages/twenty-website-new/src/design-system/components/Button/SubmitButton.tsx+++ /dev/null@@ -1,41 +0,0 @@-import { styled } from '@linaria/react';-import {- BaseButton,- type BaseButtonProps,- buttonBaseStyles,-} from './BaseButton';-import type { SubmitButtonType } from './types/SubmitButtonType';--const StyledSubmitButton = styled.button`- ${buttonBaseStyles}-`;--export type SubmitButtonProps = Omit<BaseButtonProps, 'label'> &- SubmitButtonType & { onClick?: () => void };--export function SubmitButton({- color,- label,- leadingIcon,- onClick,- size = 'regular',- variant,-}: SubmitButtonProps) {- return (- <StyledSubmitButton- data-color={color}- data-size={size}- data-variant={variant}- onClick={onClick}- type="submit"- >- <BaseButton- color={color}- label={label}- leadingIcon={leadingIcon}- size={size}- variant={variant}- />- </StyledSubmitButton>- );-}diff --git a/packages/twenty-website-new/src/design-system/components/Button/types/SubmitButtonType.ts b/packages/twenty-website-new/src/design-system/components/Button/types/SubmitButtonType.tsdeleted file mode 100644index 610819aeaff..00000000000--- a/packages/twenty-website-new/src/design-system/components/Button/types/SubmitButtonType.ts+++ /dev/null@@ -1,3 +0,0 @@-import type { ReactNode } from 'react';--export type SubmitButtonType = { label: ReactNode };diff --git a/packages/twenty-website-new/src/design-system/components/Button/types/LinkButtonType.ts b/packages/twenty-website-new/src/design-system/components/Button/types/link-button-type.tssimilarity index 100%rename from packages/twenty-website-new/src/design-system/components/Button/types/LinkButtonType.tsrename to packages/twenty-website-new/src/design-system/components/Button/types/link-button-type.tsdiff --git a/packages/twenty-website-new/src/design-system/components/Container.tsx b/packages/twenty-website-new/src/design-system/components/Container.tsxindex 2de65bbc6ab..c94b3f80237 100644--- a/packages/twenty-website-new/src/design-system/components/Container.tsx+++ b/packages/twenty-website-new/src/design-system/components/Container.tsx@@ -11,12 +11,18 @@ const ContainerRoot = styled.div`export type ContainerProps = {children: ReactNode;className?: string;+ 'data-scheme'?: string;style?: CSSProperties;};-export function Container({ children, className, style }: ContainerProps) {+export function Container({+ children,+ className,+ 'data-scheme': dataScheme,+ style,+}: ContainerProps) {return (- <ContainerRoot className={className} style={style}>+ <ContainerRoot className={className} data-scheme={dataScheme} style={style}>{children}</ContainerRoot>);diff --git a/packages/twenty-website-new/src/design-system/components/Eyebrow.tsx b/packages/twenty-website-new/src/design-system/components/Eyebrow.tsxindex a6672378415..31a079379a3 100644--- a/packages/twenty-website-new/src/design-system/components/Eyebrow.tsx+++ b/packages/twenty-website-new/src/design-system/components/Eyebrow.tsx@@ -1,12 +1,10 @@-import { Heading, type HeadingType } from '@/design-system/components/Heading';+import { Heading } from '@/design-system/components/Heading';import { RectangleFillIcon } from '@/icons';import { theme } from '@/theme';import { css } from '@linaria/core';import { styled } from '@linaria/react';import type { ReactNode } from 'react';-export type EyebrowType<TText = ReactNode> = { heading: HeadingType<TText> };-const EyebrowRow = styled.div`align-items: center;display: flex;@@ -38,31 +36,22 @@ const eyebrowLabelClassName = css`}`;-type EyebrowTextRenderer<TText> = [TText] extends [ReactNode]- ? { renderText?: (text: TText) => ReactNode }- : { renderText: (text: TText) => ReactNode };--type EyebrowProps<TText = ReactNode> = {- heading: HeadingType<TText>;- colorScheme: 'primary' | 'secondary';+export type EyebrowProps = {+ children: ReactNode;+ colorScheme?: 'primary' | 'secondary';markerHeight?: number;markerWidth?: number;-} & EyebrowTextRenderer<TText>;+};-export function Eyebrow<TText = ReactNode>({- heading,- colorScheme,+export function Eyebrow({+ children,+ colorScheme = 'primary',markerHeight,markerWidth,- renderText,-}: EyebrowProps<TText>) {+}: EyebrowProps) {const colorClassName =colorScheme === 'primary' ? eyebrowColorPrimary : eyebrowColorSecondary;const headingClassName = [eyebrowLabelClassName, colorClassName].join(' ');- const headingSegment = {- fontFamily: heading.fontFamily,- text: heading.text,- };return (<EyebrowRow>@@ -74,24 +63,9 @@ export function Eyebrow<TText = ReactNode>({width={markerWidth}/></IconWrapper>- {renderText === undefined ? (- <Heading- as="h3"- className={headingClassName}- segments={headingSegment as HeadingType}- size="xs"- weight="medium"- />- ) : (- <Heading<TText>- as="h3"- className={headingClassName}- renderText={renderText}- segments={headingSegment}- size="xs"- weight="medium"- />- )}+ <Heading as="h3" className={headingClassName} size="xs" weight="medium">+ {children}+ </Heading></EyebrowRow>);}diff --git a/packages/twenty-website-new/src/design-system/components/Heading.tsx b/packages/twenty-website-new/src/design-system/components/Heading.tsxindex 8bf91aa9de1..1eb0d84eb46 100644--- a/packages/twenty-website-new/src/design-system/components/Heading.tsx+++ b/packages/twenty-website-new/src/design-system/components/Heading.tsx@@ -1,15 +1,7 @@import { theme } from '@/theme';import { css } from '@linaria/core';import { styled } from '@linaria/react';-import { Fragment, type ReactNode } from 'react';--export type HeadingType<TText = ReactNode> = {- fontFamily: 'sans' | 'serif' | 'mono';- text: TText;- fontWeight?: 'light' | 'regular' | 'medium';- newLine?: boolean;- lineBreakBefore?: boolean;-};+import type { ReactNode } from 'react';const headingRootClassName = css`margin: 0;@@ -108,6 +100,11 @@ const StyledSpan = styled.span`}`;+export type HeadingAs = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';+export type HeadingFamily = 'sans' | 'serif' | 'mono';+export type HeadingWeight = 'light' | 'regular' | 'medium';+export type HeadingSize = 'xl' | 'lg' | 'md' | 'sm' | 'xs';+type HeadingPartProps = {children: ReactNode;fontFamily: HeadingFamily;@@ -126,73 +123,28 @@ export function HeadingPart({);}-export type HeadingAs = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';-export type HeadingFamily = 'sans' | 'serif' | 'mono';-export type HeadingWeight = 'light' | 'regular' | 'medium';-export type HeadingSize = 'xl' | 'lg' | 'md' | 'sm' | 'xs';--type HeadingTextRenderer<TText> = [TText] extends [ReactNode]- ? { renderText?: (text: TText) => ReactNode }- : { renderText: (text: TText) => ReactNode };--export type HeadingProps<TText = ReactNode> = {+export type HeadingProps = {as?: HeadingAs;- children?: ReactNode;- inlineSegmentSeparator?: ReactNode;- segments?: HeadingType<TText> | HeadingType<TText>[];- weight?: HeadingWeight;- size?: HeadingSize;+ children: ReactNode;className?: string;-} & HeadingTextRenderer<TText>;+ size?: HeadingSize;+ weight?: HeadingWeight;+};-export function Heading<TText = ReactNode>({+export function Heading({as: Tag = 'h2',children,- inlineSegmentSeparator = ' ',- renderText,- segments,- weight = 'regular',- size = 'md',className,-}: HeadingProps<TText>) {+ size = 'md',+ weight = 'regular',+}: HeadingProps) {const rootClassName = [headingRootClassName, className].filter(Boolean).join(' ');- const renderSegmentText = (text: TText) =>- renderText === undefined ? (text as ReactNode) : renderText(text);return (<Tag className={rootClassName} data-weight={weight} data-size={size}>- {children !== undefined ? (- children- ) : Array.isArray(segments) ? (- segments.map((segment, index) => {- const lineBreakBefore =- segment.newLine === true || segment.lineBreakBefore === true;- const joinWithPreviousInlineSegment =- index > 0 && lineBreakBefore === false;-- return (- <Fragment key={index}>- {lineBreakBefore ? <br /> : null}- {joinWithPreviousInlineSegment ? inlineSegmentSeparator : null}- <StyledSpan- data-family={segment.fontFamily}- data-weight={segment.fontWeight}- >- {renderSegmentText(segment.text)}- </StyledSpan>- </Fragment>- );- })- ) : segments !== undefined ? (- <StyledSpan- data-family={segments.fontFamily}- data-weight={segments.fontWeight}- >- {renderSegmentText(segments.text)}- </StyledSpan>- ) : null}+ {children}</Tag>);}diff --git a/packages/twenty-website-new/src/design-system/components/Image.tsx b/packages/twenty-website-new/src/design-system/components/Image.tsxindex 4478b281c50..3784b8cbf25 100644--- a/packages/twenty-website-new/src/design-system/components/Image.tsx+++ b/packages/twenty-website-new/src/design-system/components/Image.tsx@@ -1,5 +1,10 @@-import NextImage from 'next/image';+import { css } from '@linaria/core';import { styled } from '@linaria/react';+import NextImage from 'next/image';++const coverImageClassName = css`+ object-fit: cover;+`;export type ImageType = {alt: string;@@ -20,10 +25,10 @@ export function Image({ alt, className, src }: ImageComponentProps) {<ImageRoot className={className}><NextImagealt={alt}+ className={coverImageClassName}fillsizes="100vw"src={src}- style={{ objectFit: 'cover' }}/></ImageRoot>);diff --git a/packages/twenty-website-new/src/design-system/components/StepperProgressRail.tsx b/packages/twenty-website-new/src/design-system/components/StepperProgressRail.tsxindex 9f44093a5ac..ef0ea624305 100644--- a/packages/twenty-website-new/src/design-system/components/StepperProgressRail.tsx+++ b/packages/twenty-website-new/src/design-system/components/StepperProgressRail.tsx@@ -117,7 +117,10 @@ export function StepperProgressRail({data-active={String(isActive)}style={{ backgroundColor: inactiveColor }}>- <PillFill style={{ height: `${fillPercentage}%` }} />+ <PillFill+ style={{ height: `${fillPercentage}%` }}+ suppressHydrationWarning+ /></PillTrack><StepLabel data-visible={String(isActive)}>{String(index + 1).padStart(2, '0')}diff --git a/packages/twenty-website-new/src/design-system/components/index.ts b/packages/twenty-website-new/src/design-system/components/index.tsindex 09cf1255c44..2ac9e37c4a0 100644--- a/packages/twenty-website-new/src/design-system/components/index.ts+++ b/packages/twenty-website-new/src/design-system/components/index.ts@@ -1,10 +1,8 @@export { Body } from './Body';export { LinkButton } from './Button/LinkButton';-export { SubmitButton } from './Button/SubmitButton';export { Container } from './Container';export { Eyebrow } from './Eyebrow';export { Form } from './Form';-export type { FormFieldProps, FormTextareaProps } from './Form';export { GuideCrosshair } from './GuideCrosshair';export { Heading, HeadingPart } from './Heading';export { IconButton } from './IconButton';@@ -20,5 +18,4 @@ export type {} from './Layout';export { MarkdownProse } from './MarkdownProse';export { Modal } from './Modal';-export type { ModalRootProps } from './Modal';export { StepperProgressRail } from './StepperProgressRail';diff --git a/packages/twenty-website-new/src/icons/clients/act-education.tsx b/packages/twenty-website-new/src/icons/clients/ActEducation.tsxsimilarity index 100%rename from packages/twenty-website-new/src/icons/clients/act-education.tsxrename to packages/twenty-website-new/src/icons/clients/ActEducation.tsxdiff --git a/packages/twenty-website-new/src/icons/clients/alternative-partners.tsx b/packages/twenty-website-new/src/icons/clients/AlternativePartners.tsxsimilarity index 100%rename from packages/twenty-website-new/src/icons/clients/alternative-partners.tsxrename to packages/twenty-website-new/src/icons/clients/AlternativePartners.tsxdiff --git a/packages/twenty-website-new/src/icons/clients/elevate-consulting.tsx b/packages/twenty-website-new/src/icons/clients/ElevateConsulting.tsxsimilarity index 100%rename from packages/twenty-website-new/src/icons/clients/elevate-consulting.tsxrename to packages/twenty-website-new/src/icons/clients/ElevateConsulting.tsxdiff --git a/packages/twenty-website-new/src/icons/clients/netzero.tsx b/packages/twenty-website-new/src/icons/clients/Netzero.tsxsimilarity index 100%rename from packages/twenty-website-new/src/icons/clients/netzero.tsxrename to packages/twenty-website-new/src/icons/clients/Netzero.tsxdiff --git a/packages/twenty-website-new/src/icons/clients/nine-dots.tsx b/packages/twenty-website-new/src/icons/clients/NineDots.tsxsimilarity index 100%rename from packages/twenty-website-new/src/icons/clients/nine-dots.tsxrename to packages/twenty-website-new/src/icons/clients/NineDots.tsxdiff --git a/packages/twenty-website-new/src/icons/clients/w3villa.tsx b/packages/twenty-website-new/src/icons/clients/W3Villa.tsxsimilarity index 100%rename from packages/twenty-website-new/src/icons/clients/w3villa.tsxrename to packages/twenty-website-new/src/icons/clients/W3Villa.tsxdiff --git a/packages/twenty-website-new/src/icons/clients/index.ts b/packages/twenty-website-new/src/icons/clients/index.tsindex f311b321082..bf4434cdba3 100644--- a/packages/twenty-website-new/src/icons/clients/index.ts+++ b/packages/twenty-website-new/src/icons/clients/index.ts@@ -1,18 +1,18 @@import type { ComponentType } from 'react';-import { ActEducationIcon } from './act-education';+import { ActEducationIcon } from './ActEducation';import type { ClientIconProps } from './client-icon-props';-import { AlternativePartnersIcon } from './alternative-partners';-import { ElevateConsultingIcon } from './elevate-consulting';-import { NetZeroIcon } from './netzero';-import { NineDotsIcon } from './nine-dots';-import { W3villaIcon } from './w3villa';+import { AlternativePartnersIcon } from './AlternativePartners';+import { ElevateConsultingIcon } from './ElevateConsulting';+import { NetZeroIcon } from './Netzero';+import { NineDotsIcon } from './NineDots';+import { W3villaIcon } from './W3Villa';-export { ActEducationIcon } from './act-education';-export { AlternativePartnersIcon } from './alternative-partners';-export { ElevateConsultingIcon } from './elevate-consulting';-export { NetZeroIcon } from './netzero';-export { NineDotsIcon } from './nine-dots';-export { W3villaIcon } from './w3villa';+export { ActEducationIcon } from './ActEducation';+export { AlternativePartnersIcon } from './AlternativePartners';+export { ElevateConsultingIcon } from './ElevateConsulting';+export { NetZeroIcon } from './Netzero';+export { NineDotsIcon } from './NineDots';+export { W3villaIcon } from './W3Villa';export type { ClientIconProps } from './client-icon-props';export const CLIENT_ICONS: Record<string, ComponentType<ClientIconProps>> = {diff --git a/packages/twenty-website-new/src/lib/animation/animation-frame-loop.ts b/packages/twenty-website-new/src/lib/animation/animation-frame-loop.tsindex d0db2df3474..a758046b3f2 100644--- a/packages/twenty-website-new/src/lib/animation/animation-frame-loop.ts+++ b/packages/twenty-website-new/src/lib/animation/animation-frame-loop.ts@@ -1,10 +1,10 @@-export type AnimationFrameLoopController = {+type AnimationFrameLoopController = {isRunning: () => boolean;start: () => void;stop: () => void;};-export type CreateAnimationFrameLoopOptions = {+type CreateAnimationFrameLoopOptions = {cancelAnimationFrame?: (handle: number) => void;onFrame: (timestamp: number) => boolean | void;requestAnimationFrame?: (callback: FrameRequestCallback) => number;diff --git a/packages/twenty-website-new/src/lib/animation/index.ts b/packages/twenty-website-new/src/lib/animation/index.tsindex 8ee2cdaf0e4..f96d2fdc286 100644--- a/packages/twenty-website-new/src/lib/animation/index.ts+++ b/packages/twenty-website-new/src/lib/animation/index.ts@@ -1,17 +1,2 @@-export {- createAnimationFrameLoop,- type AnimationFrameLoopController,- type CreateAnimationFrameLoopOptions,-} from './animation-frame-loop';-export {- DEFAULT_ANIMATED_NUMBER_DURATION_MS,- easeOutCubic,- getAnimatedNumberValue,- type AnimatedNumberEasing,- type AnimatedNumberRounder,- type GetAnimatedNumberValueParameters,-} from './animated-number';-export {- useAnimatedNumber,- type UseAnimatedNumberOptions,-} from './use-animated-number';+export { createAnimationFrameLoop } from './animation-frame-loop';+export { useAnimatedNumber } from './use-animated-number';diff --git a/packages/twenty-website-new/src/lib/animation/use-animated-number.ts b/packages/twenty-website-new/src/lib/animation/use-animated-number.tsindex b88fde7d68f..ea2b582bcff 100644--- a/packages/twenty-website-new/src/lib/animation/use-animated-number.ts+++ b/packages/twenty-website-new/src/lib/animation/use-animated-number.ts@@ -13,7 +13,7 @@ import {} from './animated-number';import { createAnimationFrameLoop } from './animation-frame-loop';-export type UseAnimatedNumberOptions = {+type UseAnimatedNumberOptions = {disabled?: boolean;durationMs?: number;easing?: AnimatedNumberEasing;diff --git a/packages/twenty-website-new/src/lib/api/fetch-with-timeout.ts b/packages/twenty-website-new/src/lib/api/fetch-with-timeout.tsindex bc7bd689654..af82a9444aa 100644--- a/packages/twenty-website-new/src/lib/api/fetch-with-timeout.ts+++ b/packages/twenty-website-new/src/lib/api/fetch-with-timeout.ts@@ -1,4 +1,4 @@-export type FetchWithTimeoutResult =+type FetchWithTimeoutResult =| { ok: true; response: Response }| { ok: false; error: 'timeout' | 'network' };diff --git a/packages/twenty-website-new/src/lib/api/index.ts b/packages/twenty-website-new/src/lib/api/index.tsindex c4ae4b8e272..0d2acb3d2b8 100644--- a/packages/twenty-website-new/src/lib/api/index.ts+++ b/packages/twenty-website-new/src/lib/api/index.ts@@ -1,8 +1,3 @@export { fetchWithTimeout } from './fetch-with-timeout';-export type { FetchWithTimeoutResult } from './fetch-with-timeout';-export { readJsonBody } from './read-json-body';-export type { ReadJsonBodyResult } from './read-json-body';-export { createRateLimiter, getClientIpKey } from './rate-limit';-export type { RateLimitOptions, RateLimitResult } from './rate-limit';diff --git a/packages/twenty-website-new/src/lib/api/read-json-body.ts b/packages/twenty-website-new/src/lib/api/read-json-body.tsindex 43f726e26dd..898d2797142 100644--- a/packages/twenty-website-new/src/lib/api/read-json-body.ts+++ b/packages/twenty-website-new/src/lib/api/read-json-body.ts@@ -1,4 +1,4 @@-export type ReadJsonBodyResult<T> =+type ReadJsonBodyResult<T> =| { ok: true; value: T }| { ok: false; error: 'invalid-json' | 'too-large' | 'wrong-content-type' };diff --git a/packages/twenty-website-new/src/lib/articles/format-article-date.ts b/packages/twenty-website-new/src/lib/articles/format-article-date.tsindex 98be14be41e..5455daaa572 100644--- a/packages/twenty-website-new/src/lib/articles/format-article-date.ts+++ b/packages/twenty-website-new/src/lib/articles/format-article-date.ts@@ -1,13 +1,15 @@-export function formatArticleDate(dateString: string): string {- const date = new Date(dateString);+const DATE_FORMATTER = new Intl.DateTimeFormat('en-US', {+ month: 'long',+ day: 'numeric',+ year: 'numeric',+});- if (Number.isNaN(date.getTime())) {- throw new Error(`Invalid article date: ${dateString}`);+export function formatArticleDate(date: Date | string): string {+ const resolved = typeof date === 'string' ? new Date(date) : date;++ if (Number.isNaN(resolved.getTime())) {+ throw new Error(`Invalid article date: ${String(date)}`);}- return new Intl.DateTimeFormat('en-US', {- month: 'long',- day: 'numeric',- year: 'numeric',- }).format(date);+ return DATE_FORMATTER.format(resolved);}diff --git a/packages/twenty-website-new/src/lib/articles/index.ts b/packages/twenty-website-new/src/lib/articles/index.tsindex 28d4055988f..4a34cb7438a 100644--- a/packages/twenty-website-new/src/lib/articles/index.ts+++ b/packages/twenty-website-new/src/lib/articles/index.ts@@ -2,7 +2,5 @@ export { formatArticleDate } from './format-article-date';export {getPublishedArticle,getPublishedArticles,- loadLocalArticles,- loadLocalArticlesFromDirectory,} from './load-local-articles';export type { Article } from './types';diff --git a/packages/twenty-website-new/src/lib/customers/case-study-catalog.ts b/packages/twenty-website-new/src/lib/customers/case-study-catalog.tsindex 83eac66d855..d5c0f4cf4dc 100644--- a/packages/twenty-website-new/src/lib/customers/case-study-catalog.ts+++ b/packages/twenty-website-new/src/lib/customers/case-study-catalog.ts@@ -2,7 +2,7 @@ import { msg } from '@lingui/core/macro';import type { CaseStudyCatalogEntry } from '@/lib/customers/types';import { theme } from '@/theme';-const PLACEHOLDER_HERO = '/images/shared/people/avatars/katherine-adams.jpg';+const PLACEHOLDER_HERO = '/images/shared/people/avatars/katherine-adams.webp';export const CASE_STUDY_HALFTONE_PALETTE: readonly {dashColor: string;@@ -53,12 +53,9 @@ export const CASE_STUDY_CATALOG_ENTRIES: CaseStudyCatalogEntry[] = [},hero: {readingTime: '9 min',- title: [- { text: msg`A real estate agency on WhatsApp`, fontFamily: 'serif' },- { text: msg`built a CRM around it`, fontFamily: 'sans' },- ],+ title: msg`A real estate agency on WhatsApp built a CRM around it`,author: 'Mike Babiy & Azmat Parveen',- authorAvatarSrc: '/images/partner/testimonials/mike-babiy.png',+ authorAvatarSrc: '/images/partner/testimonials/mike-babiy.webp',clientIcon: 'nine-dots',heroImageSrc: PLACEHOLDER_HERO,},@@ -79,10 +76,7 @@ export const CASE_STUDY_CATALOG_ENTRIES: CaseStudyCatalogEntry[] = [],hero: {readingTime: '7 min',- title: [- { text: msg`From Salesforce to`, fontFamily: 'serif' },- { text: msg`self-hosted Twenty`, fontFamily: 'sans' },- ],+ title: msg`From Salesforce to self-hosted Twenty`,author: 'Benjamin Reynolds',authorAvatarSrc: '/images/partner/testimonials/benjamin-reynolds.webp',clientIcon: 'alternative-partners',@@ -105,12 +99,9 @@ export const CASE_STUDY_CATALOG_ENTRIES: CaseStudyCatalogEntry[] = [],hero: {readingTime: '8 min',- title: [- { text: msg`A CRM that`, fontFamily: 'serif' },- { text: msg`grows with you`, fontFamily: 'sans' },- ],+ title: msg`A CRM that grows with you`,author: 'Olivier Reinaud',- authorAvatarSrc: '/images/partner/testimonials/olivier-reinaud.jpg',+ authorAvatarSrc: '/images/partner/testimonials/olivier-reinaud.webp',clientIcon: 'netzero',heroImageSrc: PLACEHOLDER_HERO,},@@ -128,12 +119,9 @@ export const CASE_STUDY_CATALOG_ENTRIES: CaseStudyCatalogEntry[] = [kpis: [{ value: msg`90%+`, label: msg`Lower CRM cost` }],hero: {readingTime: '7 min',- title: [- { text: msg`A CRM they`, fontFamily: 'serif' },- { text: msg`actually own`, fontFamily: 'sans' },- ],+ title: msg`A CRM they actually own`,author: 'Joseph Chiang',- authorAvatarSrc: '/images/partner/testimonials/joseph-chiang.jpg',+ authorAvatarSrc: '/images/partner/testimonials/joseph-chiang.webp',clientIcon: 'act-education',heroImageSrc: PLACEHOLDER_HERO,},@@ -151,10 +139,7 @@ export const CASE_STUDY_CATALOG_ENTRIES: CaseStudyCatalogEntry[] = [kpis: [{ value: msg`Zero`, label: msg`Manual work at core` }],hero: {readingTime: '8 min',- title: [- { text: msg`When your CRM`, fontFamily: 'serif' },- { text: msg`is the product`, fontFamily: 'sans' },- ],+ title: msg`When your CRM is the product`,author: 'Amrendra Pratap Singh',authorAvatarSrc: '/images/partner/testimonials/amrendra-singh.webp',clientIcon: 'w3villa',@@ -183,10 +168,7 @@ export const CASE_STUDY_CATALOG_ENTRIES: CaseStudyCatalogEntry[] = [},hero: {readingTime: '8 min',- title: [- { text: msg`Twenty as the API backbone`, fontFamily: 'serif' },- { text: msg`of a go-to-market stack`, fontFamily: 'sans' },- ],+ title: msg`Twenty as the API backbone of a go-to-market stack`,author: 'Justin Beadle',clientIcon: 'elevate-consulting',heroImageSrc: PLACEHOLDER_HERO,diff --git a/packages/twenty-website-new/src/lib/customers/types.ts b/packages/twenty-website-new/src/lib/customers/types.tsindex 5b71853a642..52ff42b4909 100644--- a/packages/twenty-website-new/src/lib/customers/types.ts+++ b/packages/twenty-website-new/src/lib/customers/types.ts@@ -1,10 +1,10 @@-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';import type { MessageDescriptor } from '@lingui/core';+import type { ReactNode } from 'react';export type CaseStudyTextBlock = {type: 'text';eyebrow?: MessageDescriptor;- heading: MessageHeadingSegment[];+ heading: ReactNode;paragraphs: MessageDescriptor[];callout?: string;};@@ -32,7 +32,7 @@ export type CaseStudyData = {meta: { title: MessageDescriptor; description: MessageDescriptor };hero: {readingTime: string;- title: MessageHeadingSegment[];+ title: ReactNode;author: string;authorAvatarSrc?: string;clientIcon: string;@@ -57,6 +57,13 @@ export type CaseStudyCatalogEntry = {kpis: CaseStudyKpi[];authorRole: MessageDescriptor;quote?: CaseStudyQuote;- hero: CaseStudyData['hero'];+ hero: {+ readingTime: string;+ title: MessageDescriptor;+ author: string;+ authorAvatarSrc?: string;+ clientIcon: string;+ heroImageSrc: string;+ };catalogCard: CaseStudyData['catalogCard'];};diff --git a/packages/twenty-website-new/src/lib/enterprise/enterprise-jwt.ts b/packages/twenty-website-new/src/lib/enterprise/enterprise-jwt.tsindex ae105941f80..6e07aa7dfa5 100644--- a/packages/twenty-website-new/src/lib/enterprise/enterprise-jwt.ts+++ b/packages/twenty-website-new/src/lib/enterprise/enterprise-jwt.ts@@ -1,12 +1,12 @@import * as crypto from 'crypto';-export type EnterpriseKeyPayload = {+type EnterpriseKeyPayload = {sub: string;licensee: string;iat: number;};-export type EnterpriseValidityPayload = {+type EnterpriseValidityPayload = {sub: string;status: 'valid';iat: number;@@ -32,7 +32,7 @@ const getValidityTokenDurationDays = (): number => {return parsed;};-export type SignValidityTokenOptions = {+type SignValidityTokenOptions = {subscriptionCancelAt: number | null;};@@ -61,18 +61,11 @@ const getPrivateKey = (): string => {};const base64UrlEncode = (data: string): string => {- return Buffer.from(data)- .toString('base64')- .replace(/\+/g, '-')- .replace(/\//g, '_')- .replace(/=+$/, '');+ return Buffer.from(data).toString('base64url');};const base64UrlDecode = (data: string): string => {- const padded = data + '='.repeat((4 - (data.length % 4)) % 4);- const base64 = padded.replace(/-/g, '+').replace(/_/g, '/');-- return Buffer.from(base64, 'base64').toString('utf-8');+ return Buffer.from(data, 'base64url').toString('utf-8');};const signJwt = (@@ -89,10 +82,7 @@ const signJwt = (key: privateKey,padding: crypto.constants.RSA_PKCS1_PADDING,})- .toString('base64')- .replace(/\+/g, '-')- .replace(/\//g, '_')- .replace(/=+$/, '');+ .toString('base64url');return `${signingInput}.${signature}`;};@@ -111,11 +101,7 @@ export const verifyJwt = <T extends Record<string, unknown>>(const [encodedHeader, encodedPayload, signature] = parts;const signingInput = `${encodedHeader}.${encodedPayload}`;- const signatureBuffer = Buffer.from(- signature.replace(/-/g, '+').replace(/_/g, '/') +- '='.repeat((4 - (signature.length % 4)) % 4),- 'base64',- );+ const signatureBuffer = Buffer.from(signature, 'base64url');const isValid = crypto.verify('sha256',diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_lib/exporters.test.ts b/packages/twenty-website-new/src/lib/halftone/__tests__/exporters.test.tssimilarity index 97%rename from packages/twenty-website-new/src/app/[locale]/halftone/_lib/exporters.test.tsrename to packages/twenty-website-new/src/lib/halftone/__tests__/exporters.test.tsindex 0003e1e3dba..102d9c3c156 100644--- a/packages/twenty-website-new/src/app/[locale]/halftone/_lib/exporters.test.ts+++ b/packages/twenty-website-new/src/lib/halftone/__tests__/exporters.test.ts@@ -3,14 +3,14 @@ import {generateStandaloneHtml,parseExportedPreset,type ReactExportSettings,-} from '@/app/[locale]/halftone/_lib/exporters';-import { resolveExportArtifactNames } from '@/app/[locale]/halftone/_lib/exportNames';-import { REFERENCE_PREVIEW_DISTANCE } from '@/lib/halftone/footprint';+} from '@/lib/halftone/utils/exporters';+import { resolveExportArtifactNames } from '@/lib/halftone/utils/export-names';+import { REFERENCE_PREVIEW_DISTANCE } from '@/lib/halftone/utils/footprint';import {DEFAULT_HALFTONE_SETTINGS,normalizeHalftoneStudioSettings,type HalftoneGeometrySpec,-} from '@/lib/halftone/state';+} from '@/lib/halftone/utils/state';const IMPORTED_GLB_SHAPE: HalftoneGeometrySpec = {key: 'userUpload_connect',diff --git a/packages/twenty-website-new/src/lib/halftone/__tests__/footprint.test.ts b/packages/twenty-website-new/src/lib/halftone/__tests__/footprint.test.tsindex 3cb1d597612..f36a66676da 100644--- a/packages/twenty-website-new/src/lib/halftone/__tests__/footprint.test.ts+++ b/packages/twenty-website-new/src/lib/halftone/__tests__/footprint.test.ts@@ -1,10 +1,10 @@import {- HALFTONE_FOOTPRINT_RUNTIME_SOURCE,getContainedImageRect,getImageFootprintScale,getMeshFootprintScale,REFERENCE_PREVIEW_DISTANCE,-} from '@/lib/halftone/footprint';+} from '@/lib/halftone/utils/footprint';+import { HALFTONE_FOOTPRINT_RUNTIME_SOURCE } from '@/lib/halftone/generated/footprint-runtime-source';import * as THREE from 'three';describe('halftone footprint helpers', () => {diff --git a/packages/twenty-website-new/src/lib/halftone/__tests__/interaction-state.test.ts b/packages/twenty-website-new/src/lib/halftone/__tests__/interaction-state.test.tsindex 6d499a6732e..b8c61af68fb 100644--- a/packages/twenty-website-new/src/lib/halftone/__tests__/interaction-state.test.ts+++ b/packages/twenty-website-new/src/lib/halftone/__tests__/interaction-state.test.ts@@ -1,9 +1,9 @@-import { DEFAULT_HALFTONE_SETTINGS } from '../state';+import { DEFAULT_HALFTONE_SETTINGS } from '../utils/state';import {applySpringStep,createHalftoneInteractionState,resetHalftoneInteractionState,-} from '../interaction-state';+} from '../utils/interaction-state';describe('halftone interaction state', () => {it('hydrates pose fields while defaulting transient pointer state', () => {diff --git a/packages/twenty-website-new/src/lib/halftone/__tests__/state.test.ts b/packages/twenty-website-new/src/lib/halftone/__tests__/state.test.tsindex 82c3ca84120..f571cf1b5b0 100644--- a/packages/twenty-website-new/src/lib/halftone/__tests__/state.test.ts+++ b/packages/twenty-website-new/src/lib/halftone/__tests__/state.test.ts@@ -6,7 +6,7 @@ import {DEFAULT_SOLID_LIGHTING_SETTINGS,normalizeHalftoneStudioSettings,type HalftoneStudioSettings,-} from '@/lib/halftone/state';+} from '@/lib/halftone/utils/state';describe('halftone studio state defaults', () => {it('keeps the default scene aligned with the solid material preset', () => {diff --git a/packages/twenty-website-new/src/lib/halftone/halftone-canvas.tsx b/packages/twenty-website-new/src/lib/halftone/components/HalftoneCanvas.tsxsimilarity index 89%rename from packages/twenty-website-new/src/lib/halftone/halftone-canvas.tsxrename to packages/twenty-website-new/src/lib/halftone/components/HalftoneCanvas.tsxindex 894e6cf0a96..cd5f2e292e5 100644--- a/packages/twenty-website-new/src/lib/halftone/halftone-canvas.tsx+++ b/packages/twenty-website-new/src/lib/halftone/components/HalftoneCanvas.tsx@@ -6,7 +6,7 @@ import {getMeshFootprintScale,type HalftoneImageFit,VIRTUAL_RENDER_HEIGHT,-} from '@/lib/halftone/footprint';+} from '@/lib/halftone/utils/footprint';import { observeElementSize } from '@/lib/dom/observe-element-size';import {applyHalftoneMaterialSettings,@@ -16,18 +16,18 @@ import {type HalftoneMaterialAssets,type HalftoneTransmissionMaterial,renderHalftoneMaterialScene,-} from '@/lib/halftone/materials';+} from '@/lib/halftone/utils/materials';import {applySpringStep,createHalftoneInteractionState,resetHalftoneInteractionState,type HalftoneInteractionState,-} from '@/lib/halftone/interaction-state';+} from '@/lib/halftone/utils/interaction-state';import type {HalftoneExportPose,HalftoneStudioSettings,-} from '@/lib/halftone/state';-import { runCleanupTasks } from '@/lib/lifecycle/run-cleanup-tasks';+} from '@/lib/halftone/utils/state';+import { runCleanupTasks } from '@/lib/react/run-cleanup-tasks';import { useLatestRef } from '@/lib/react';import {createSiteWebGlRenderer,@@ -37,258 +37,20 @@ import {} from '@/lib/visual-runtime';import { styled } from '@linaria/react';import { type MutableRefObject, useEffect, useRef } from 'react';+import {+ blurFragmentShader,+ halftoneFragmentShader,+ imagePassthroughFragmentShader,+ passThroughVertexShader,+} from '../utils/exporter-shaders';+import {+ IMAGE_HOVER_FADE_IN,+ IMAGE_HOVER_FADE_OUT,+ IMAGE_POINTER_FOLLOW,+ IMAGE_POINTER_VELOCITY_DAMPING,+} from '../constants/halftone-image-constants';import * as THREE from 'three';-const passThroughVertexShader = `- varying vec2 vUv;-- void main() {- vUv = uv;- gl_Position = vec4(position, 1.0);- }-`;--const blurFragmentShader = `- precision highp float;-- uniform sampler2D tInput;- uniform vec2 dir;- uniform vec2 res;-- varying vec2 vUv;-- void main() {- vec4 sum = vec4(0.0);- vec2 px = dir / res;-- float w[5];- w[0] = 0.227027;- w[1] = 0.1945946;- w[2] = 0.1216216;- w[3] = 0.054054;- w[4] = 0.016216;-- sum += texture2D(tInput, vUv) * w[0];-- for (int i = 1; i < 5; i++) {- float fi = float(i) * 3.0;- sum += texture2D(tInput, vUv + px * fi) * w[i];- sum += texture2D(tInput, vUv - px * fi) * w[i];- }-- gl_FragColor = sum;- }-`;--const imagePassthroughFragmentShader = `- precision highp float;-- uniform sampler2D tImage;- uniform vec2 imageSize;- uniform vec2 viewportSize;- uniform float zoom;- uniform float contrast;- uniform float imageFit;-- varying vec2 vUv;-- void main() {- float imageAspect = imageSize.x / imageSize.y;- float viewAspect = viewportSize.x / viewportSize.y;-- vec2 uv = vUv;-- if (imageAspect > viewAspect) {- float scale = viewAspect / imageAspect;- if (imageFit > 0.5) {- uv.x = (uv.x - 0.5) * scale + 0.5;- } else {- uv.y = (uv.y - 0.5) / scale + 0.5;- }- } else {- float scale = imageAspect / viewAspect;- if (imageFit > 0.5) {- uv.y = (uv.y - 0.5) * scale + 0.5;- } else {- uv.x = (uv.x - 0.5) / scale + 0.5;- }- }-- uv = (uv - 0.5) / zoom + 0.5;-- float inBounds = step(0.0, uv.x) * step(uv.x, 1.0)- * step(0.0, uv.y) * step(uv.y, 1.0);-- vec4 color = texture2D(tImage, clamp(uv, 0.0, 1.0));- vec3 contrastColor = clamp((color.rgb - 0.5) * contrast + 0.5, 0.0, 1.0);-- gl_FragColor = vec4(contrastColor, inBounds);- }-`;--const halftoneFragmentShader = `- precision highp float;-- uniform sampler2D tScene;- uniform sampler2D tGlow;- uniform vec2 effectResolution;- uniform vec2 logicalResolution;- uniform float tile;- uniform float s_3;- uniform float s_4;- uniform float applyToDarkAreas;- uniform vec3 dashColor;- uniform vec3 hoverDashColor;- uniform float time;- uniform float waveAmount;- uniform float waveSpeed;- uniform float footprintScale;- uniform vec2 interactionUv;- uniform vec2 interactionVelocity;- uniform vec2 dragOffset;- uniform float hoverHalftoneActive;- uniform float hoverHalftonePowerShift;- uniform float hoverHalftoneRadius;- uniform float hoverHalftoneWidthShift;- uniform float hoverLightStrength;- uniform float hoverLightRadius;- uniform float hoverFlowStrength;- uniform float hoverFlowRadius;- uniform float dragFlowStrength;- uniform float cropToBounds;-- varying vec2 vUv;-- float distSegment(in vec2 p, in vec2 a, in vec2 b) {- vec2 pa = p - a;- vec2 ba = b - a;- float denom = max(dot(ba, ba), 0.000001);- float h = clamp(dot(pa, ba) / denom, 0.0, 1.0);- return length(pa - ba * h);- }-- float lineSimpleEt(in vec2 p, in float r, in float thickness) {- vec2 a = vec2(0.5) + vec2(-r, 0.0);- vec2 b = vec2(0.5) + vec2(r, 0.0);- float distToSegment = distSegment(p, a, b);- float halfThickness = thickness * r;- return distToSegment - halfThickness;- }-- void main() {- if (cropToBounds > 0.5) {- vec4 boundsCheck = texture2D(tScene, vUv);- if (boundsCheck.a < 0.01) {- gl_FragColor = vec4(0.0);- return;- }- }-- vec2 fragCoord =- (gl_FragCoord.xy / max(effectResolution, vec2(1.0))) * logicalResolution;- float halftoneSize = max(tile * max(footprintScale, 0.001), 1.0);- vec2 pointerPx = interactionUv * logicalResolution;- vec2 fragDelta = fragCoord - pointerPx;- float fragDist = length(fragDelta);- vec2 radialDir = fragDist > 0.001 ? fragDelta / fragDist : vec2(0.0, 1.0);- float velocityMagnitude = length(interactionVelocity);- vec2 motionDir = velocityMagnitude > 0.001- ? interactionVelocity / velocityMagnitude- : vec2(0.0, 0.0);- float motionBias = velocityMagnitude > 0.001- ? dot(-radialDir, motionDir) * 0.5 + 0.5- : 0.5;-- float hoverLightMask = 0.0;- if (hoverLightStrength > 0.0) {- float lightRadiusPx = hoverLightRadius * logicalResolution.y;- hoverLightMask = smoothstep(lightRadiusPx, 0.0, fragDist);- }-- float hoverHalftoneMask = 0.0;- if (hoverHalftoneActive > 0.0) {- float hoverHalftoneRadiusPx = hoverHalftoneRadius * logicalResolution.y;- hoverHalftoneMask =- smoothstep(hoverHalftoneRadiusPx, 0.0, fragDist) *- clamp(hoverHalftoneActive, 0.0, 1.0);- }-- float hoverFlowMask = 0.0;- if (hoverFlowStrength > 0.0) {- float hoverRadiusPx = hoverFlowRadius * logicalResolution.y;- hoverFlowMask = smoothstep(hoverRadiusPx, 0.0, fragDist);- }-- vec2 hoverDisplacement =- radialDir * hoverFlowStrength * hoverFlowMask * halftoneSize * 0.55 +- motionDir * hoverFlowStrength * hoverFlowMask * (0.4 + motionBias) * halftoneSize * 1.15;- vec2 travelDisplacement = dragOffset * dragFlowStrength * 0.45;- vec2 effectCoord = fragCoord + hoverDisplacement + travelDisplacement;-- float bandRow = floor(effectCoord.y / halftoneSize);- float waveOffset =- waveAmount * sin(time * waveSpeed + bandRow * 0.5) * halftoneSize;- effectCoord.x += waveOffset;-- vec2 cellIndex = floor(effectCoord / halftoneSize);- vec2 sampleUv = clamp(- (cellIndex + 0.5) * halftoneSize / logicalResolution,- vec2(0.0),- vec2(1.0)- );- vec2 cellUv = fract(effectCoord / halftoneSize);-- vec4 sceneSample = texture2D(tScene, sampleUv);- float mask = smoothstep(0.02, 0.08, sceneSample.a);- float localPower = clamp(- s_3 + hoverHalftonePowerShift * hoverHalftoneMask,- -1.5,- 1.5- );- float localWidth = clamp(- s_4 + hoverHalftoneWidthShift * hoverHalftoneMask,- 0.05,- 1.4- );- float lightLift =- hoverLightStrength *- hoverLightMask *- mix(0.78, 1.18, motionBias) *- 0.22;- float toneValue =- (sceneSample.r + sceneSample.g + sceneSample.b) * (1.0 / 3.0);- if (applyToDarkAreas > 0.5) {- toneValue = 1.0 - toneValue;- }- // Preserve the pre-toneTarget light-mode response by keeping the power- // bias inside the averaged tone calculation.- float powerBias = localPower * length(vec2(0.5)) * (1.0 / 3.0);- float bandRadius = clamp(- toneValue + powerBias + lightLift,- 0.0,- 1.0- ) * 1.86 * 0.5;-- float alpha = 0.0;- if (bandRadius > 0.0001) {- float signedDistance = lineSimpleEt(cellUv, bandRadius, localWidth);- float edge = 0.02;- alpha = (1.0 - smoothstep(0.0, edge, signedDistance)) * mask;- }-- vec3 activeDashColor = mix(dashColor, hoverDashColor, hoverHalftoneMask);- vec3 color = activeDashColor * alpha;- gl_FragColor = vec4(color, alpha);-- #include <tonemapping_fragment>- #include <colorspace_fragment>- }-`;--const IMAGE_POINTER_FOLLOW = 0.38;-const IMAGE_POINTER_VELOCITY_DAMPING = 0.82;-const IMAGE_HOVER_FADE_IN = 18;-const IMAGE_HOVER_FADE_OUT = 7;const MAX_PREVIEW_PIXEL_RATIO = 2;const CanvasMount = styled.div<{ $background: string; $transparent: boolean }>`diff --git a/packages/twenty-website-new/src/lib/halftone/halftone-image-canvas.tsx b/packages/twenty-website-new/src/lib/halftone/components/HalftoneImageCanvas.tsxsimilarity index 95%rename from packages/twenty-website-new/src/lib/halftone/halftone-image-canvas.tsxrename to packages/twenty-website-new/src/lib/halftone/components/HalftoneImageCanvas.tsxindex 67eba9dd8ea..d9abbfcea20 100644--- a/packages/twenty-website-new/src/lib/halftone/halftone-image-canvas.tsx+++ b/packages/twenty-website-new/src/lib/halftone/components/HalftoneImageCanvas.tsx@@ -15,9 +15,12 @@ import {HalftoneCanvas,type HalftoneImageInteractionSettings,type HalftoneSnapshotFn,-} from './halftone-canvas';-import type { HalftoneExportPose, HalftoneStudioSettings } from './state';-import type { HalftoneImageFit } from './footprint';+} from './HalftoneCanvas';+import type {+ HalftoneExportPose,+ HalftoneStudioSettings,+} from '../utils/state';+import type { HalftoneImageFit } from '../utils/footprint';type HalftoneImageCanvasProps = {crossOrigin?: HTMLImageElement['crossOrigin'];diff --git a/packages/twenty-website-new/src/lib/halftone/halftone-model-canvas.tsx b/packages/twenty-website-new/src/lib/halftone/components/HalftoneModelCanvas.tsxsimilarity index 97%rename from packages/twenty-website-new/src/lib/halftone/halftone-model-canvas.tsxrename to packages/twenty-website-new/src/lib/halftone/components/HalftoneModelCanvas.tsxindex 3935ccb566c..4fdafab4601 100644--- a/packages/twenty-website-new/src/lib/halftone/halftone-model-canvas.tsx+++ b/packages/twenty-website-new/src/lib/halftone/components/HalftoneModelCanvas.tsx@@ -13,17 +13,17 @@ import {createFallbackGeometry,loadImportedGeometryFromUrl,type ImportedGeometryNormalizationOptions,-} from './geometry-registry';+} from '../utils/geometry-registry';import {HalftoneCanvas,type HalftoneRenderStrategy,type HalftoneSnapshotFn,-} from './halftone-canvas';+} from './HalftoneCanvas';import type {HalftoneExportPose,HalftoneModelLoader,HalftoneStudioSettings,-} from './state';+} from '../utils/state';type HalftoneModelCanvasProps = {geometryOptions?: ImportedGeometryNormalizationOptions;diff --git a/packages/twenty-website-new/src/lib/halftone/constants/halftone-image-constants.ts b/packages/twenty-website-new/src/lib/halftone/constants/halftone-image-constants.tsnew file mode 100644index 00000000000..02b87d5d87d--- /dev/null+++ b/packages/twenty-website-new/src/lib/halftone/constants/halftone-image-constants.ts@@ -0,0 +1,4 @@+export const IMAGE_POINTER_FOLLOW = 0.38;+export const IMAGE_POINTER_VELOCITY_DAMPING = 0.82;+export const IMAGE_HOVER_FADE_IN = 18;+export const IMAGE_HOVER_FADE_OUT = 7;diff --git a/packages/twenty-website-new/src/lib/halftone/generated/footprint-runtime-source.ts b/packages/twenty-website-new/src/lib/halftone/generated/footprint-runtime-source.tsnew file mode 100644index 00000000000..905282b5d17--- /dev/null+++ b/packages/twenty-website-new/src/lib/halftone/generated/footprint-runtime-source.ts@@ -0,0 +1,248 @@+// Untyped JS mirror of the footprint helpers in ../footprint.ts.+// Injected into exported standalone HTML. Keep in sync — validated by+// __tests__/footprint.test.ts which evals this string and compares results.+import {+ MIN_FOOTPRINT_SCALE,+ REFERENCE_PREVIEW_DISTANCE,+} from '../utils/footprint';++export const HALFTONE_FOOTPRINT_RUNTIME_SOURCE = `+const REFERENCE_PREVIEW_DISTANCE = ${REFERENCE_PREVIEW_DISTANCE};+const MIN_FOOTPRINT_SCALE = ${MIN_FOOTPRINT_SCALE};++function clampRectToViewport(rect, viewportWidth, viewportHeight) {+ const minX = Math.max(rect.x, 0);+ const minY = Math.max(rect.y, 0);+ const maxX = Math.min(rect.x + rect.width, viewportWidth);+ const maxY = Math.min(rect.y + rect.height, viewportHeight);++ if (maxX <= minX || maxY <= minY) {+ return null;+ }++ return {+ x: minX,+ y: minY,+ width: maxX - minX,+ height: maxY - minY,+ };+}++function getRectArea(rect) {+ if (!rect) {+ return 0;+ }++ return Math.max(rect.width, 0) * Math.max(rect.height, 0);+}++function createBox3Corners(bounds) {+ const { min, max } = bounds;++ return [+ new THREE.Vector3(min.x, min.y, min.z),+ new THREE.Vector3(min.x, min.y, max.z),+ new THREE.Vector3(min.x, max.y, min.z),+ new THREE.Vector3(min.x, max.y, max.z),+ new THREE.Vector3(max.x, min.y, min.z),+ new THREE.Vector3(max.x, min.y, max.z),+ new THREE.Vector3(max.x, max.y, min.z),+ new THREE.Vector3(max.x, max.y, max.z),+ ];+}++function getImagePreviewZoom(previewDistance) {+ return REFERENCE_PREVIEW_DISTANCE / Math.max(previewDistance, 0.001);+}++function getContainedImageRect({+ imageFit = 'contain',+ imageHeight,+ imageWidth,+ viewportHeight,+ viewportWidth,+ zoom,+}) {+ if (+ imageWidth <= 0 ||+ imageHeight <= 0 ||+ viewportWidth <= 0 ||+ viewportHeight <= 0+ ) {+ return null;+ }++ const imageAspect = imageWidth / imageHeight;+ const viewAspect = viewportWidth / viewportHeight;++ let fittedWidth = viewportWidth;+ let fittedHeight = viewportHeight;++ if (imageAspect > viewAspect) {+ if (imageFit === 'cover') {+ fittedWidth = viewportHeight * imageAspect;+ } else {+ fittedHeight = viewportWidth / imageAspect;+ }+ } else {+ if (imageFit === 'cover') {+ fittedHeight = viewportWidth / imageAspect;+ } else {+ fittedWidth = viewportHeight * imageAspect;+ }+ }++ const scaledWidth = fittedWidth * zoom;+ const scaledHeight = fittedHeight * zoom;++ return clampRectToViewport(+ {+ x: (viewportWidth - scaledWidth) * 0.5,+ y: (viewportHeight - scaledHeight) * 0.5,+ width: scaledWidth,+ height: scaledHeight,+ },+ viewportWidth,+ viewportHeight,+ );+}++function getFootprintScaleFromRects(currentRect, referenceRect) {+ const currentArea = getRectArea(currentRect);+ const referenceArea = getRectArea(referenceRect);++ if (currentArea <= 0 || referenceArea <= 0) {+ return 1;+ }++ return Math.max(+ Math.sqrt(currentArea / referenceArea),+ MIN_FOOTPRINT_SCALE,+ );+}++function getImageFootprintScale({+ imageFit = 'contain',+ imageHeight,+ imageWidth,+ previewDistance,+ viewportHeight,+ viewportWidth,+}) {+ const currentRect = getContainedImageRect({+ imageFit,+ imageHeight,+ imageWidth,+ viewportHeight,+ viewportWidth,+ zoom: getImagePreviewZoom(previewDistance),+ });+ const referenceRect = getContainedImageRect({+ imageFit,+ imageHeight,+ imageWidth,+ viewportHeight,+ viewportWidth,+ zoom: 1,+ });++ return getFootprintScaleFromRects(currentRect, referenceRect);+}++function projectBox3ToViewport({+ camera,+ localBounds,+ meshMatrixWorld,+ viewportHeight,+ viewportWidth,+}) {+ if (+ localBounds.isEmpty() ||+ viewportWidth <= 0 ||+ viewportHeight <= 0+ ) {+ return null;+ }++ let minX = Number.POSITIVE_INFINITY;+ let minY = Number.POSITIVE_INFINITY;+ let maxX = Number.NEGATIVE_INFINITY;+ let maxY = Number.NEGATIVE_INFINITY;+ let hasProjectedCorner = false;++ for (const corner of createBox3Corners(localBounds)) {+ corner.applyMatrix4(meshMatrixWorld).project(camera);++ if (+ !Number.isFinite(corner.x) ||+ !Number.isFinite(corner.y) ||+ !Number.isFinite(corner.z)+ ) {+ continue;+ }++ hasProjectedCorner = true;++ const x = (corner.x * 0.5 + 0.5) * viewportWidth;+ const y = (1 - (corner.y * 0.5 + 0.5)) * viewportHeight;++ minX = Math.min(minX, x);+ minY = Math.min(minY, y);+ maxX = Math.max(maxX, x);+ maxY = Math.max(maxY, y);+ }++ if (!hasProjectedCorner) {+ return null;+ }++ return clampRectToViewport(+ {+ x: minX,+ y: minY,+ width: maxX - minX,+ height: maxY - minY,+ },+ viewportWidth,+ viewportHeight,+ );+}++function getMeshFootprintScale({+ camera,+ localBounds,+ lookAtTarget,+ meshMatrixWorld,+ viewportHeight,+ viewportWidth,+}) {+ const currentRect = projectBox3ToViewport({+ camera,+ localBounds,+ meshMatrixWorld,+ viewportHeight,+ viewportWidth,+ });+ const referenceCamera = camera.clone();+ const currentOffset = referenceCamera.position.clone().sub(lookAtTarget);+ const referenceOffset =+ currentOffset.lengthSq() > 0+ ? currentOffset.setLength(REFERENCE_PREVIEW_DISTANCE)+ : new THREE.Vector3(0, 0, REFERENCE_PREVIEW_DISTANCE);++ referenceCamera.position.copy(lookAtTarget).add(referenceOffset);+ referenceCamera.lookAt(lookAtTarget);+ referenceCamera.updateProjectionMatrix();+ referenceCamera.updateMatrixWorld(true);++ const referenceRect = projectBox3ToViewport({+ camera: referenceCamera,+ localBounds,+ meshMatrixWorld,+ viewportHeight,+ viewportWidth,+ });++ return getFootprintScaleFromRects(currentRect, referenceRect);+}+`;diff --git a/packages/twenty-website-new/src/lib/halftone/geometry-registry.ts b/packages/twenty-website-new/src/lib/halftone/geometry-registry.tsdeleted file mode 100644index 49dddac6e66..00000000000--- a/packages/twenty-website-new/src/lib/halftone/geometry-registry.ts+++ /dev/null@@ -1,835 +0,0 @@-import * as THREE from 'three';-import { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js';-import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';-import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';-import { DRACO_DECODER_PATH } from '@/lib/visual-runtime/draco-decoder-path';--type HalftoneModelLoader = 'fbx' | 'glb';--interface HalftoneGeometrySpec {- key: string;- label: string;- kind: 'builtin' | 'imported';- loader?: HalftoneModelLoader;- filename?: string;- description?: string;- extensions?: readonly string[];- userProvided?: boolean;-}--type GeometryCacheEntry = THREE.BufferGeometry | Promise<THREE.BufferGeometry>;--export type ImportedGeometryNormalizationOptions = {- postRotateZ?: number;- scaleTarget?: number;- useLegacyNormalization?: boolean;-};--const LEGACY_IMPORTED_GEOMETRY_SCALE_TARGET = 2.75;-const importedGeometryCache = new Map<string, GeometryCacheEntry>();--function getImportedGeometryCacheKey({- geometryOptions,- loader,- modelUrl,-}: {- geometryOptions?: ImportedGeometryNormalizationOptions;- loader: HalftoneModelLoader;- modelUrl: string;-}) {- return JSON.stringify({- geometryOptions: geometryOptions ?? null,- loader,- modelUrl,- });-}--function mergeGeometries(geometries: THREE.BufferGeometry[]) {- if (geometries.length === 1) {- return geometries[0];- }-- let totalVertices = 0;- let totalIndices = 0;- let hasUv = false;-- const geometryInfos = geometries.map((geometry) => {- const position = geometry.attributes.position;- const normal = geometry.attributes.normal;- const uv = geometry.attributes.uv ?? null;- const index = geometry.index;- const indexCount = index ? index.count : position.count;-- totalVertices += position.count;- totalIndices += indexCount;- hasUv = hasUv || uv !== null;-- return {- index,- indexCount,- normal,- position,- uv,- vertexCount: position.count,- };- });-- const positions = new Float32Array(totalVertices * 3);- const normals = new Float32Array(totalVertices * 3);- const uvs = hasUv ? new Float32Array(totalVertices * 2) : null;- const indices = new Uint32Array(totalIndices);-- let vertexOffset = 0;- let indexOffset = 0;-- for (const geometryInfo of geometryInfos) {- for (- let vertexIndex = 0;- vertexIndex < geometryInfo.vertexCount;- vertexIndex += 1- ) {- const positionOffset = (vertexOffset + vertexIndex) * 3;- positions[positionOffset] = geometryInfo.position.getX(vertexIndex);- positions[positionOffset + 1] = geometryInfo.position.getY(vertexIndex);- positions[positionOffset + 2] = geometryInfo.position.getZ(vertexIndex);- normals[positionOffset] = geometryInfo.normal.getX(vertexIndex);- normals[positionOffset + 1] = geometryInfo.normal.getY(vertexIndex);- normals[positionOffset + 2] = geometryInfo.normal.getZ(vertexIndex);-- if (uvs !== null) {- const uvOffset = (vertexOffset + vertexIndex) * 2;- uvs[uvOffset] = geometryInfo.uv?.getX(vertexIndex) ?? 0;- uvs[uvOffset + 1] = geometryInfo.uv?.getY(vertexIndex) ?? 0;- }- }-- if (geometryInfo.index) {- for (- let localIndex = 0;- localIndex < geometryInfo.indexCount;- localIndex += 1- ) {- indices[indexOffset + localIndex] =- geometryInfo.index.getX(localIndex) + vertexOffset;- }- } else {- for (- let localIndex = 0;- localIndex < geometryInfo.indexCount;- localIndex += 1- ) {- indices[indexOffset + localIndex] = localIndex + vertexOffset;- }- }-- vertexOffset += geometryInfo.vertexCount;- indexOffset += geometryInfo.indexCount;- }-- const merged = new THREE.BufferGeometry();- merged.setAttribute('position', new THREE.BufferAttribute(positions, 3));- merged.setAttribute('normal', new THREE.BufferAttribute(normals, 3));-- if (uvs !== null) {- merged.setAttribute('uv', new THREE.BufferAttribute(uvs, 2));- }-- merged.setIndex(new THREE.BufferAttribute(indices, 1));-- return merged;-}--const EMPTY_TEXTURE_DATA_URL =- 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO8B7Q8AAAAASUVORK5CYII=';--function normalizeImportedGeometry(- geometry: THREE.BufferGeometry,- options: ImportedGeometryNormalizationOptions = {},-) {- const {- postRotateZ = 0,- scaleTarget,- useLegacyNormalization = false,- } = options;-- geometry.computeBoundingBox();-- let boundingBox = geometry.boundingBox;- let center = new THREE.Vector3();- let size = new THREE.Vector3();-- boundingBox?.getCenter(center);- boundingBox?.getSize(size);- geometry.translate(-center.x, -center.y, -center.z);-- if (!useLegacyNormalization) {- const dimensions = [size.x, size.y, size.z];- const thinnestAxis = dimensions.indexOf(Math.min(...dimensions));-- if (thinnestAxis === 0) {- geometry.applyMatrix4(new THREE.Matrix4().makeRotationY(Math.PI / 2));- } else if (thinnestAxis === 1) {- geometry.applyMatrix4(new THREE.Matrix4().makeRotationX(Math.PI / 2));- }- }-- geometry.computeBoundingBox();- geometry.computeBoundingSphere();-- const radius = geometry.boundingSphere?.radius || 1;- const scale = useLegacyNormalization- ? (scaleTarget ?? LEGACY_IMPORTED_GEOMETRY_SCALE_TARGET) /- Math.max(size.x, size.y, size.z, 0.001)- : (scaleTarget ?? 1.6) / radius;- geometry.scale(scale, scale, scale);-- geometry.computeBoundingBox();- boundingBox = geometry.boundingBox;- center = new THREE.Vector3();- boundingBox?.getCenter(center);- geometry.translate(-center.x, -center.y, -center.z);-- if (postRotateZ !== 0) {- geometry.rotateZ(postRotateZ);- }-- geometry.computeVertexNormals();- geometry.computeBoundingBox();- geometry.computeBoundingSphere();-- return geometry;-}--function createLoadingManager() {- const loadingManager = new THREE.LoadingManager();- loadingManager.setURLModifier((url) =>- /\.(png|jpe?g|webp|gif|bmp)$/i.test(url) ? EMPTY_TEXTURE_DATA_URL : url,- );-- return loadingManager;-}--function extractMergedGeometry(- root: THREE.Object3D,- emptyMessage: string,- geometryOptions?: ImportedGeometryNormalizationOptions,-) {- root.updateMatrixWorld(true);-- const geometries: THREE.BufferGeometry[] = [];-- root.traverse((object) => {- if (!(object instanceof THREE.Mesh) || !object.geometry) {- return;- }-- const geometry = object.geometry.clone();-- if (!geometry.attributes.normal) {- geometry.computeVertexNormals();- }-- geometry.applyMatrix4(object.matrixWorld);- geometries.push(geometry);- });-- if (geometries.length === 0) {- throw new Error(emptyMessage);- }-- return normalizeImportedGeometry(- mergeGeometries(geometries),- geometryOptions,- );-}--function parseFbxGeometry(- buffer: ArrayBuffer,- resourcePath: string,- label: string,- geometryOptions?: ImportedGeometryNormalizationOptions,-) {- const originalWarn = console.warn;-- console.warn = (...args: unknown[]) => {- if (typeof args[0] === 'string' && args[0].startsWith('THREE.FBXLoader:')) {- return;- }-- originalWarn(...args);- };-- try {- const root = new FBXLoader(createLoadingManager()).parse(- buffer,- resourcePath,- );-- return extractMergedGeometry(- root,- `${label} did not contain any mesh geometry.`,- geometryOptions,- );- } finally {- console.warn = originalWarn;- }-}--function parseGlbGeometry(- buffer: ArrayBuffer,- resourcePath: string,- label: string,- geometryOptions?: ImportedGeometryNormalizationOptions,-) {- const dracoLoader = new DRACOLoader();- dracoLoader.setDecoderPath(DRACO_DECODER_PATH);-- const gltfLoader = new GLTFLoader(createLoadingManager());- gltfLoader.setDRACOLoader(dracoLoader);-- return new Promise<THREE.BufferGeometry>((resolve, reject) => {- gltfLoader.parse(- buffer,- resourcePath,- (gltf) => {- try {- resolve(- extractMergedGeometry(- gltf.scene,- `${label} did not contain any mesh geometry.`,- geometryOptions,- ),- );- } catch (error) {- reject(error);- }- },- reject,- );- }).finally(() => {- dracoLoader.dispose();- });-}--async function loadImportedGeometry(- loader: HalftoneModelLoader,- file: File,- label: string,-) {- const buffer = await file.arrayBuffer();-- if (loader === 'fbx') {- return parseFbxGeometry(buffer, '', label);- }-- return parseGlbGeometry(buffer, '', label);-}--export async function loadImportedGeometryFromUrl(- loader: HalftoneModelLoader,- modelUrl: string,- label: string,- geometryOptions?: ImportedGeometryNormalizationOptions,-) {- const cacheKey = getImportedGeometryCacheKey({- geometryOptions,- loader,- modelUrl,- });- const cachedGeometry = importedGeometryCache.get(cacheKey);-- if (cachedGeometry) {- return (await cachedGeometry).clone();- }-- const geometryPromise = (async () => {- const response = await fetch(modelUrl);-- if (!response.ok) {- throw new Error(`Unable to load ${label} from ${modelUrl}.`);- }-- const buffer = await response.arrayBuffer();-- if (loader === 'fbx') {- return parseFbxGeometry(buffer, '', label, geometryOptions);- }-- return parseGlbGeometry(buffer, '', label, geometryOptions);- })();- importedGeometryCache.set(cacheKey, geometryPromise);-- try {- const geometry = await geometryPromise;-- importedGeometryCache.set(cacheKey, geometry);-- return geometry.clone();- } catch (error) {- importedGeometryCache.delete(cacheKey);- throw error;- }-}--function makePolarShape(- radiusFunction: (angle: number) => number,- segments = 320,-) {- const shape = new THREE.Shape();-- for (let segmentIndex = 0; segmentIndex <= segments; segmentIndex += 1) {- const angle = (segmentIndex / segments) * Math.PI * 2;- const radius = radiusFunction(angle);- const x = Math.cos(angle) * radius;- const y = Math.sin(angle) * radius;-- if (segmentIndex === 0) {- shape.moveTo(x, y);- } else {- shape.lineTo(x, y);- }- }-- return shape;-}--function makeReliefGeometry(- shape: THREE.Shape,- options: {- depth?: number;- bevelSize?: number;- bevelThickness?: number;- bevelSegments?: number;- waves?: number;- waveDepth?: number;- } = {},-) {- const {- bevelSegments = 8,- bevelSize = 0.08,- bevelThickness = 0.1,- depth = 0.58,- waveDepth = 0.016,- waves = 8,- } = options;-- const geometry = new THREE.ExtrudeGeometry(shape, {- depth,- steps: 2,- bevelEnabled: true,- bevelThickness,- bevelSize,- bevelSegments,- curveSegments: 96,- });-- geometry.center();-- const position = geometry.attributes.position;- let maxRadius = 0;-- for (let vertexIndex = 0; vertexIndex < position.count; vertexIndex += 1) {- maxRadius = Math.max(- maxRadius,- Math.hypot(position.getX(vertexIndex), position.getY(vertexIndex)),- );- }-- const fullDepth = depth + bevelThickness * 2;-- for (let vertexIndex = 0; vertexIndex < position.count; vertexIndex += 1) {- const x = position.getX(vertexIndex);- const y = position.getY(vertexIndex);- const z = position.getZ(vertexIndex);- const radius = Math.hypot(x, y) / maxRadius;- const angle = Math.atan2(y, x);- const faceAmount = Math.min(1, Math.abs(z) / (fullDepth * 0.5));- const rimLift = Math.exp(-Math.pow((radius - 0.84) / 0.12, 2));- const innerDish = Math.exp(-Math.pow((radius - 0.42) / 0.2, 2));- const wave =- Math.cos(angle * waves) *- Math.exp(-Math.pow((radius - 0.72) / 0.16, 2)) *- waveDepth;- const relief = faceAmount * (0.14 * rimLift - 0.055 * innerDish + wave);-- position.setZ(vertexIndex, z + (z >= 0 ? 1 : -1) * relief);- }-- position.needsUpdate = true;- geometry.computeVertexNormals();- geometry.computeBoundingBox();- geometry.computeBoundingSphere();-- return geometry;-}--function makeArrowTarget() {- const targetParts: THREE.BufferGeometry[] = [];- const arrowParts: THREE.BufferGeometry[] = [];- const baseRadius = 1.35;- const baseDepth = 0.32;- const bevel = 0.12;- const points: THREE.Vector2[] = [];- const segments = 16;-- points.push(new THREE.Vector2(0, -baseDepth / 2));- points.push(new THREE.Vector2(baseRadius - bevel, -baseDepth / 2));-- for (let segmentIndex = 0; segmentIndex <= segments; segmentIndex += 1) {- const angle = Math.PI / 2 + (segmentIndex / segments) * (Math.PI / 2);- points.push(- new THREE.Vector2(- baseRadius - bevel + Math.cos(angle) * bevel,- -baseDepth / 2 + bevel + Math.sin(angle) * bevel,- ),- );- }-- points.push(new THREE.Vector2(baseRadius, baseDepth / 2 - bevel));-- for (let segmentIndex = 0; segmentIndex <= segments; segmentIndex += 1) {- const angle = (segmentIndex / segments) * (Math.PI / 2);- points.push(- new THREE.Vector2(- baseRadius - bevel + Math.cos(angle) * bevel,- baseDepth / 2 - bevel + Math.sin(angle) * bevel,- ),- );- }-- points.push(new THREE.Vector2(0, baseDepth / 2));-- const disc = new THREE.LatheGeometry(points, 64);- disc.applyMatrix4(new THREE.Matrix4().makeRotationX(Math.PI / 2));- targetParts.push(disc);-- for (const radius of [0.45, 0.85, 1.22]) {- const ring = new THREE.TorusGeometry(radius, 0.14, 16, 64);- ring.applyMatrix4(- new THREE.Matrix4().makeTranslation(0, 0, baseDepth / 2 + 0.04),- );- targetParts.push(ring);- }-- const bump = new THREE.SphereGeometry(- 0.32,- 32,- 24,- 0,- Math.PI * 2,- 0,- Math.PI / 2,- );- bump.applyMatrix4(new THREE.Matrix4().makeRotationX(-Math.PI / 2));- bump.applyMatrix4(new THREE.Matrix4().makeTranslation(0, 0, baseDepth / 2));- targetParts.push(bump);-- const shaftLength = 1.5;- const shaftRadius = 0.05;- const shaft = new THREE.CylinderGeometry(- shaftRadius,- shaftRadius,- shaftLength,- 10,- 1,- );- shaft.applyMatrix4(- new THREE.Matrix4().makeTranslation(0, shaftLength / 2, 0),- );- arrowParts.push(shaft);-- const head = new THREE.ConeGeometry(0.12, 0.35, 10);- head.applyMatrix4(new THREE.Matrix4().makeTranslation(0, -0.15, 0));- arrowParts.push(head);-- for (let finIndex = 0; finIndex < 3; finIndex += 1) {- const finShape = new THREE.Shape();- finShape.moveTo(0, 0);- finShape.lineTo(0.22, 0.25);- finShape.lineTo(0, 0.5);- finShape.lineTo(0, 0);-- const finGeometry = new THREE.ExtrudeGeometry(finShape, {- depth: 0.012,- bevelEnabled: false,- });-- finGeometry.applyMatrix4(- new THREE.Matrix4().makeTranslation(0.05, 0, -0.006),- );- finGeometry.applyMatrix4(- new THREE.Matrix4().makeRotationY((finIndex * Math.PI * 2) / 3),- );- finGeometry.applyMatrix4(- new THREE.Matrix4().makeTranslation(0, shaftLength - 0.45, 0),- );- arrowParts.push(finGeometry);- }-- const nock = new THREE.SphereGeometry(0.065, 8, 8);- nock.applyMatrix4(- new THREE.Matrix4().makeTranslation(0, shaftLength + 0.03, 0),- );- arrowParts.push(nock);-- const aim = new THREE.Matrix4().makeRotationX(Math.PI / 2.15);- const tilt = new THREE.Matrix4().makeRotationZ(Math.PI / 5);- const shift = new THREE.Matrix4().makeTranslation(0.15, 0.15, 0.12);-- for (const geometry of arrowParts) {- geometry.applyMatrix4(aim);- geometry.applyMatrix4(tilt);- geometry.applyMatrix4(shift);- }-- const merged = mergeGeometries([...targetParts, ...arrowParts]);- merged.computeVertexNormals();- merged.computeBoundingSphere();-- return merged;-}--function makeDollarCoin() {- const parts: THREE.BufferGeometry[] = [];- const baseRadius = 1.3;- const baseDepth = 0.45;- const bevel = 0.18;- const points: THREE.Vector2[] = [];- const segments = 20;-- points.push(new THREE.Vector2(0, -baseDepth / 2));- points.push(new THREE.Vector2(baseRadius - bevel, -baseDepth / 2));-- for (let segmentIndex = 0; segmentIndex <= segments; segmentIndex += 1) {- const angle = -Math.PI / 2 + (segmentIndex / segments) * Math.PI;- points.push(- new THREE.Vector2(- baseRadius - bevel + Math.cos(angle) * bevel,- Math.sin(angle) * (baseDepth / 2),- ),- );- }-- points.push(new THREE.Vector2(baseRadius - bevel, baseDepth / 2));- points.push(new THREE.Vector2(0, baseDepth / 2));-- const disc = new THREE.LatheGeometry(points, 64);- disc.applyMatrix4(new THREE.Matrix4().makeRotationX(Math.PI / 2));- parts.push(disc);-- const frontRim = new THREE.TorusGeometry(baseRadius - 0.22, 0.05, 12, 64);- frontRim.applyMatrix4(- new THREE.Matrix4().makeTranslation(0, 0, baseDepth / 2 - 0.01),- );- parts.push(frontRim);-- const backRim = new THREE.TorusGeometry(baseRadius - 0.22, 0.05, 12, 64);- backRim.applyMatrix4(- new THREE.Matrix4().makeTranslation(0, 0, -(baseDepth / 2 - 0.01)),- );- parts.push(backRim);-- const createDollarSign = () => {- const geometries: THREE.BufferGeometry[] = [];- const tubeRadius = 0.1;- const curveRadius = 0.28;- const verticalOffset = 0.22;-- const bar = new THREE.CylinderGeometry(0.05, 0.05, 1.3, 12);- geometries.push(bar);-- const topArc = new THREE.TorusGeometry(- curveRadius,- tubeRadius,- 16,- 32,- Math.PI,- );- topArc.applyMatrix4(new THREE.Matrix4().makeRotationZ(Math.PI / 2));- topArc.applyMatrix4(- new THREE.Matrix4().makeTranslation(0.05, verticalOffset, 0),- );- geometries.push(topArc);-- const bottomArc = new THREE.TorusGeometry(- curveRadius,- tubeRadius,- 16,- 32,- Math.PI,- );- bottomArc.applyMatrix4(new THREE.Matrix4().makeRotationZ(-Math.PI / 2));- bottomArc.applyMatrix4(- new THREE.Matrix4().makeTranslation(-0.05, -verticalOffset, 0),- );- geometries.push(bottomArc);-- const topSerif = new THREE.CylinderGeometry(- tubeRadius,- tubeRadius,- 0.22,- 12,- );- topSerif.applyMatrix4(new THREE.Matrix4().makeRotationZ(Math.PI / 2));- topSerif.applyMatrix4(- new THREE.Matrix4().makeTranslation(- 0.16,- verticalOffset + curveRadius,- 0,- ),- );- geometries.push(topSerif);-- const bottomSerif = new THREE.CylinderGeometry(- tubeRadius,- tubeRadius,- 0.22,- 12,- );- bottomSerif.applyMatrix4(new THREE.Matrix4().makeRotationZ(Math.PI / 2));- bottomSerif.applyMatrix4(- new THREE.Matrix4().makeTranslation(- -0.16,- -verticalOffset - curveRadius,- 0,- ),- );- geometries.push(bottomSerif);-- const diagonalLength = Math.sqrt(0.1 * 0.1 + (verticalOffset * 2) ** 2);- const diagonalAngle = Math.atan2(verticalOffset * 2, 0.1);- const diagonal = new THREE.CylinderGeometry(- tubeRadius,- tubeRadius,- diagonalLength + 0.12,- 12,- );- diagonal.applyMatrix4(- new THREE.Matrix4().makeRotationZ(diagonalAngle - Math.PI / 2),- );- geometries.push(diagonal);-- return geometries;- };-- for (const geometry of createDollarSign()) {- geometry.applyMatrix4(- new THREE.Matrix4().makeTranslation(0, 0, baseDepth / 2 + 0.01),- );- parts.push(geometry);- }-- for (const geometry of createDollarSign()) {- geometry.applyMatrix4(new THREE.Matrix4().makeRotationY(Math.PI));- geometry.applyMatrix4(- new THREE.Matrix4().makeTranslation(0, 0, -(baseDepth / 2 + 0.01)),- );- parts.push(geometry);- }-- const merged = mergeGeometries(parts);- merged.computeVertexNormals();- merged.computeBoundingSphere();-- return merged;-}--const BUILTIN_GEOMETRIES: Record<string, () => THREE.BufferGeometry> = {- torusKnot: () => new THREE.TorusKnotGeometry(1, 0.35, 200, 32),- sphere: () => new THREE.SphereGeometry(1.4, 64, 64),- torus: () => new THREE.TorusGeometry(1, 0.45, 64, 100),- icosahedron: () => new THREE.IcosahedronGeometry(1.4, 4),- box: () => new THREE.BoxGeometry(2.1, 2.1, 2.1, 6, 6, 6),- cone: () => new THREE.ConeGeometry(1.2, 2.4, 64, 10),- cylinder: () => new THREE.CylinderGeometry(1, 1, 2.3, 64, 10),- octahedron: () => new THREE.OctahedronGeometry(1.5, 2),- dodecahedron: () => new THREE.DodecahedronGeometry(1.35, 1),- tetrahedron: () => new THREE.TetrahedronGeometry(1.7, 1),- sunCoin: () =>- makeReliefGeometry(- makePolarShape(- (angle) => 1 + 0.17 * Math.pow(0.5 + 0.5 * Math.cos(angle * 12), 1.5),- ),- { depth: 0.62, waves: 12, waveDepth: 0.018 },- ),- lotusCoin: () =>- makeReliefGeometry(- makePolarShape((angle) => 0.88 + 0.3 * Math.pow(Math.sin(angle * 4), 2)),- { depth: 0.64, waves: 8, waveDepth: 0.014 },- ),- arrowTarget: () => makeArrowTarget(),- dollarCoin: () => makeDollarCoin(),-};--async function createGeometry(- spec: HalftoneGeometrySpec,- file: File | undefined,-) {- if (spec.kind === 'imported') {- if (!file || !spec.loader) {- throw new Error(`No file is available for ${spec.label}.`);- }-- return loadImportedGeometry(- spec.loader as HalftoneModelLoader,- file,- spec.label,- );- }-- const factory = BUILTIN_GEOMETRIES[spec.key];-- if (!factory) {- throw new Error(`Unsupported geometry: ${spec.key}.`);- }-- return factory();-}--export function createFallbackGeometry() {- return BUILTIN_GEOMETRIES.torusKnot();-}--export async function getGeometryForSpec(- spec: HalftoneGeometrySpec,- file: File | undefined,- cache: Map<string, GeometryCacheEntry>,-) {- const cached = cache.get(spec.key);-- if (cached) {- return cached instanceof Promise ? cached : Promise.resolve(cached);- }-- const created = createGeometry(spec, file);-- if (created instanceof Promise) {- const pending = created- .then((geometry) => {- cache.set(spec.key, geometry);- return geometry;- })- .catch((error) => {- cache.delete(spec.key);- throw error;- });-- cache.set(spec.key, pending);-- return pending;- }-- cache.set(spec.key, created);-- return Promise.resolve(created);-}--export function disposeGeometryCache(cache: Map<string, GeometryCacheEntry>) {- for (const value of cache.values()) {- if (!(value instanceof Promise)) {- value.dispose();- }- }-- cache.clear();-}diff --git a/packages/twenty-website-new/src/lib/halftone/index.ts b/packages/twenty-website-new/src/lib/halftone/index.tsindex f245679e544..cc2e735655e 100644--- a/packages/twenty-website-new/src/lib/halftone/index.ts+++ b/packages/twenty-website-new/src/lib/halftone/index.ts@@ -3,15 +3,15 @@ export {type HalftoneImageInteractionSettings,type HalftoneRenderStrategy,type HalftoneSnapshotFn,-} from './halftone-canvas';-export { HalftoneImageCanvas } from './halftone-image-canvas';-export { HalftoneModelCanvas } from './halftone-model-canvas';+} from './components/HalftoneCanvas';+export { HalftoneImageCanvas } from './components/HalftoneImageCanvas';+export { HalftoneModelCanvas } from './components/HalftoneModelCanvas';export {createFallbackGeometry,loadImportedGeometryFromUrl,type ImportedGeometryNormalizationOptions,-} from './geometry-registry';+} from './utils/geometry-registry';export {DEFAULT_GLASS_ANIMATION_SETTINGS,@@ -26,7 +26,7 @@ export {DEFAULT_SOLID_LIGHTING_SETTINGS,DEFAULT_SOLID_MATERIAL_SETTINGS,normalizeHalftoneStudioSettings,-} from './state';+} from './utils/state';export type {HalftoneAnimationSettings,@@ -40,7 +40,7 @@ export type {HalftoneStudioSettings,HalftoneStudioSettingsOverrides,HalftoneToneTarget,-} from './state';+} from './utils/state';export {getContainedImageRect,@@ -48,7 +48,8 @@ export {getImagePreviewZoom,getMeshFootprintScale,type HalftoneImageFit,- HALFTONE_FOOTPRINT_RUNTIME_SOURCE,REFERENCE_PREVIEW_DISTANCE,VIRTUAL_RENDER_HEIGHT,-} from './footprint';+} from './utils/footprint';++export { HALFTONE_FOOTPRINT_RUNTIME_SOURCE } from './generated/footprint-runtime-source';diff --git a/packages/twenty-website-new/src/lib/halftone/types/exporter-types.ts b/packages/twenty-website-new/src/lib/halftone/types/exporter-types.tsnew file mode 100644index 00000000000..b3a68cc75ac--- /dev/null+++ b/packages/twenty-website-new/src/lib/halftone/types/exporter-types.ts@@ -0,0 +1,52 @@+import type {+ HalftoneExportPose,+ HalftoneGeometrySpec,+ HalftoneStudioSettings,+} from '@/lib/halftone/utils/state';++export type ReactExportSettings = {+ includeNamedAndDefaultExport: boolean;+ includePublicAssetUrl: boolean;+ includeRegistryComment: boolean;+ includeTsNoCheck: boolean;+ includeUseClientDirective: boolean;+ includeStyledMount: boolean;+};++export type ReactExportOptions = {+ assetUrl?: string;+ background?: string;+ exportSettings?: Partial<ReactExportSettings>;+ imageFilename?: string;+ importedFile?: File;+ initialPose?: HalftoneExportPose;+ modelFilenameOverride?: string;+ previewDistance?: number;+};++export const DEFAULT_REACT_EXPORT_SETTINGS: ReactExportSettings = {+ includeNamedAndDefaultExport: true,+ includePublicAssetUrl: true,+ includeRegistryComment: true,+ includeTsNoCheck: true,+ includeUseClientDirective: true,+ includeStyledMount: true,+};++export type ExportedShapeDescriptor = {+ filename: string | null;+ key: string;+ kind: HalftoneGeometrySpec['kind'];+ label: string;+ loader: HalftoneGeometrySpec['loader'] | null;+};++export type ParsedExportedPreset = {+ componentName: string | null;+ imageAssetReference: string | null;+ initialPose: HalftoneExportPose;+ modelAssetReference: string | null;+ previewDistance: number;+ settings: HalftoneStudioSettings;+ shape: ExportedShapeDescriptor;+};diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_lib/exportNames.ts b/packages/twenty-website-new/src/lib/halftone/utils/export-names.tssimilarity index 96%rename from packages/twenty-website-new/src/app/[locale]/halftone/_lib/exportNames.tsrename to packages/twenty-website-new/src/lib/halftone/utils/export-names.tsindex c81dec8f6ab..4c42a71d9e2 100644--- a/packages/twenty-website-new/src/app/[locale]/halftone/_lib/exportNames.ts+++ b/packages/twenty-website-new/src/lib/halftone/utils/export-names.ts@@ -25,7 +25,7 @@ export function normalizeExportComponentName(return toPascalCase(value?.trim() || fallback);}-export function toKebabCase(value: string) {+function toKebabCase(value: string) {const normalized = value.replace(/([a-z0-9])([A-Z])/g, '$1-$2').replace(/([A-Z])([A-Z][a-z])/g, '$1-$2')diff --git a/packages/twenty-website-new/src/lib/halftone/utils/exporter-mount-fragments.ts b/packages/twenty-website-new/src/lib/halftone/utils/exporter-mount-fragments.tsnew file mode 100644index 00000000000..6dccec81eb3--- /dev/null+++ b/packages/twenty-website-new/src/lib/halftone/utils/exporter-mount-fragments.ts@@ -0,0 +1,177 @@+// Composable string-returning functions for the exported mount scripts.+// Used by createMountScript() and createImageMountScript() to avoid+// maintaining parallel blocks of identical runtime JavaScript.++export function emitSizingHelpers() {+ return `+ const getWidth = () => Math.max(container.clientWidth, 1);+ const getHeight = () => Math.max(container.clientHeight, 1);+ const getVirtualHeight = () => Math.max(VIRTUAL_RENDER_HEIGHT, getHeight());+ const getVirtualWidth = () =>+ Math.max(+ Math.round(getVirtualHeight() * (getWidth() / Math.max(getHeight(), 1))),+ 1,+ );`;+}++export function emitRendererSetup(cursor: string) {+ return `+ // boundary-allow-next-line:no-raw-webgl-renderer -- emitted into the standalone HTML export; runs in the user's downloaded file with no access to lib/visual-runtime+ const renderer = new THREE.WebGLRenderer({ antialias: false, alpha: true });+ renderer.outputColorSpace = THREE.SRGBColorSpace;+ renderer.setPixelRatio(1);+ renderer.setClearColor(0x000000, 0);+ renderer.setSize(getVirtualWidth(), getVirtualHeight(), false);++ const canvas = renderer.domElement;+ canvas.style.cursor = ${JSON.stringify(cursor)};+ canvas.style.display = 'block';+ canvas.style.height = '100%';+ canvas.style.touchAction = 'none';+ canvas.style.width = '100%';+ container.appendChild(canvas);`;+}++export function emitBlurMaterials() {+ return `+ const blurHorizontalMaterial = new THREE.ShaderMaterial({+ uniforms: {+ tInput: { value: null },+ dir: { value: new THREE.Vector2(1, 0) },+ res: { value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()) },+ },+ vertexShader: passThroughVertexShader,+ fragmentShader: blurFragmentShader,+ });++ const blurVerticalMaterial = new THREE.ShaderMaterial({+ uniforms: {+ tInput: { value: null },+ dir: { value: new THREE.Vector2(0, 1) },+ res: { value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()) },+ },+ vertexShader: passThroughVertexShader,+ fragmentShader: blurFragmentShader,+ });`;+}++type HalftoneUniformOverrides = {+ cropToBounds: number;+ hoverHalftoneRadius: string;+ hoverLightRadius: string;+ waveSpeed: string;+};++export function emitHalftoneMaterial(overrides: HalftoneUniformOverrides) {+ return `+ const halftoneMaterial = new THREE.ShaderMaterial({+ transparent: true,+ uniforms: {+ tScene: { value: sceneTarget.texture },+ tGlow: { value: blurTargetB.texture },+ effectResolution: {+ value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),+ },+ logicalResolution: {+ value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),+ },+ tile: { value: settings.halftone.scale },+ s_3: { value: settings.halftone.power },+ s_4: { value: settings.halftone.width },+ applyToDarkAreas: {+ value: settings.halftone.toneTarget === 'dark' ? 1 : 0,+ },+ dashColor: { value: new THREE.Color(settings.halftone.dashColor) },+ hoverDashColor: {+ value: new THREE.Color(settings.halftone.hoverDashColor),+ },+ time: { value: 0 },+ waveAmount: { value: 0 },+ waveSpeed: { value: ${overrides.waveSpeed} },+ footprintScale: { value: 1.0 },+ interactionUv: { value: new THREE.Vector2(0.5, 0.5) },+ interactionVelocity: { value: new THREE.Vector2(0, 0) },+ dragOffset: { value: new THREE.Vector2(0, 0) },+ hoverHalftoneActive: { value: 0 },+ hoverHalftonePowerShift: { value: 0 },+ hoverHalftoneRadius: { value: ${overrides.hoverHalftoneRadius} },+ hoverHalftoneWidthShift: { value: 0 },+ hoverLightStrength: { value: 0 },+ hoverLightRadius: { value: ${overrides.hoverLightRadius} },+ hoverFlowStrength: { value: 0 },+ hoverFlowRadius: { value: 0.18 },+ dragFlowStrength: { value: 0 },+ cropToBounds: { value: ${overrides.cropToBounds} },+ },+ vertexShader: passThroughVertexShader,+ fragmentShader: halftoneFragmentShader,+ });`;+}++export function emitPostScenes() {+ return `+ const blurHorizontalScene = new THREE.Scene();+ blurHorizontalScene.add(+ new THREE.Mesh(fullScreenGeometry, blurHorizontalMaterial),+ );++ const blurVerticalScene = new THREE.Scene();+ blurVerticalScene.add(new THREE.Mesh(fullScreenGeometry, blurVerticalMaterial));++ const postScene = new THREE.Scene();+ postScene.add(new THREE.Mesh(fullScreenGeometry, halftoneMaterial));`;+}++export function emitBlurPasses() {+ return `+ blurHorizontalMaterial.uniforms.tInput.value = sceneTarget.texture;+ renderer.setRenderTarget(blurTargetA);+ renderer.render(blurHorizontalScene, orthographicCamera);++ blurVerticalMaterial.uniforms.tInput.value = blurTargetA.texture;+ renderer.setRenderTarget(blurTargetB);+ renderer.render(blurVerticalScene, orthographicCamera);++ blurHorizontalMaterial.uniforms.tInput.value = blurTargetB.texture;+ renderer.setRenderTarget(blurTargetA);+ renderer.render(blurHorizontalScene, orthographicCamera);++ blurVerticalMaterial.uniforms.tInput.value = blurTargetA.texture;+ renderer.setRenderTarget(blurTargetB);+ renderer.render(blurVerticalScene, orthographicCamera);++ renderer.setRenderTarget(null);+ renderer.clear();+ renderer.render(postScene, orthographicCamera);`;+}++export function emitTimerSetup() {+ return `+ const clock = new THREE.Timer();+ clock.connect(document);+ let animationFrameId = 0;`;+}++export function emitCleanup(extraDispose: string, extraListeners: string) {+ return `+ return () => {+ // boundary-allow-next-line:no-raw-animation-frame -- emitted into standalone HTML export+ window.cancelAnimationFrame(animationFrameId);+ clock.dispose();+ resizeObserver.disconnect();+${extraListeners}+ blurHorizontalMaterial.dispose();+ blurVerticalMaterial.dispose();+ halftoneMaterial.dispose();+ fullScreenGeometry.dispose();+${extraDispose}+ sceneTarget.dispose();+ blurTargetA.dispose();+ blurTargetB.dispose();+ renderer.dispose();++ if (canvas.parentNode === container) {+ container.removeChild(canvas);+ }+ };`;+}diff --git a/packages/twenty-website-new/src/lib/halftone/utils/exporter-parsing.ts b/packages/twenty-website-new/src/lib/halftone/utils/exporter-parsing.tsnew file mode 100644index 00000000000..95e831d73e5--- /dev/null+++ b/packages/twenty-website-new/src/lib/halftone/utils/exporter-parsing.ts@@ -0,0 +1,195 @@+import { normalizeExportComponentName } from '@/lib/halftone/utils/export-names';+import { REFERENCE_PREVIEW_DISTANCE } from '@/lib/halftone/utils/footprint';+import {+ LEGACY_HALFTONE_SETTING_KEYS,+ isRoundedBandHalftoneSettings,+ type HalftoneExportPose,+ type HalftoneGeometrySpec,+ type HalftoneStudioSettings,+} from '@/lib/halftone/utils/state';++import type {+ ExportedShapeDescriptor,+ ParsedExportedPreset,+} from '../types/exporter-types';++function createDefaultExportPose(): HalftoneExportPose {+ return {+ autoElapsed: 0,+ rotateElapsed: 0,+ rotationX: 0,+ rotationY: 0,+ rotationZ: 0,+ targetRotationX: 0,+ targetRotationY: 0,+ timeElapsed: 0,+ };+}++export function normalizeExportPose(+ pose: HalftoneExportPose | undefined,+): HalftoneExportPose {+ const fallback = createDefaultExportPose();++ if (!pose) {+ return fallback;+ }++ return {+ autoElapsed: Number.isFinite(pose.autoElapsed) ? pose.autoElapsed : 0,+ rotateElapsed: Number.isFinite(pose.rotateElapsed) ? pose.rotateElapsed : 0,+ rotationX: Number.isFinite(pose.rotationX) ? pose.rotationX : 0,+ rotationY: Number.isFinite(pose.rotationY) ? pose.rotationY : 0,+ rotationZ: Number.isFinite(pose.rotationZ) ? pose.rotationZ : 0,+ targetRotationX: Number.isFinite(pose.targetRotationX)+ ? pose.targetRotationX+ : 0,+ targetRotationY: Number.isFinite(pose.targetRotationY)+ ? pose.targetRotationY+ : 0,+ timeElapsed: Number.isFinite(pose.timeElapsed) ? pose.timeElapsed : 0,+ };+}++export function normalizePreviewDistance(previewDistance: number | undefined) {+ return Number.isFinite(previewDistance)+ ? Math.max(previewDistance ?? REFERENCE_PREVIEW_DISTANCE, 0.001)+ : REFERENCE_PREVIEW_DISTANCE;+}++function extractSerializedJson<T>(+ content: string,+ name: string,+ nextName: string,+) {+ const pattern = new RegExp(+ String.raw`const\s+${name}\s*=\s*([\s\S]*?)\s*;\s*\r?\nconst\s+${nextName}\s*=`,+ );+ const match = content.match(pattern);++ if (!match) {+ throw new Error(`Could not find ${name} in the exported preset.`);+ }++ try {+ return JSON.parse(match[1]) as T;+ } catch (error) {+ throw new Error(+ error instanceof Error+ ? `Could not parse ${name}: ${error.message}`+ : `Could not parse ${name}.`,+ );+ }+}++function extractFirstMatch(content: string, patterns: RegExp[]) {+ for (const pattern of patterns) {+ const match = content.match(pattern);++ if (match && match.length > 1) {+ return match[match.length - 1] ?? null;+ }+ }++ return null;+}++function assertRoundedBandPreset(+ settings: HalftoneStudioSettings,+): asserts settings is HalftoneStudioSettings {+ if (isRoundedBandHalftoneSettings(settings.halftone)) {+ return;+ }++ const halftoneValue =+ settings.halftone && typeof settings.halftone === 'object'+ ? (settings.halftone as Record<string, unknown>)+ : null;+ const detectedLegacyKeys = LEGACY_HALFTONE_SETTING_KEYS.filter((key) =>+ halftoneValue ? key in halftoneValue : false,+ );+ const suffix =+ detectedLegacyKeys.length > 0+ ? ` Detected legacy keys: ${detectedLegacyKeys.join(', ')}.`+ : '';++ throw new Error(+ `This preset uses the legacy halftone effect and can no longer be imported.${suffix}`,+ );+}++export function parseExportedPreset(content: string): ParsedExportedPreset {+ const settings = extractSerializedJson<HalftoneStudioSettings>(+ content,+ 'settings',+ 'shape',+ );+ assertRoundedBandPreset(settings);+ const shape = extractSerializedJson<ExportedShapeDescriptor>(+ content,+ 'shape',+ 'initialPose',+ );+ const initialPose = normalizeExportPose(+ (() => {+ try {+ return extractSerializedJson<HalftoneExportPose>(+ content,+ 'initialPose',+ 'previewDistance',+ );+ } catch {+ return extractSerializedJson<HalftoneExportPose>(+ content,+ 'initialPose',+ 'VIRTUAL_RENDER_HEIGHT',+ );+ }+ })(),+ );+ const previewDistanceMatch = content.match(+ /const\s+previewDistance\s*=\s*([0-9]+(?:\.[0-9]+)?)\s*;/,+ );+ const previewDistance = normalizePreviewDistance(+ previewDistanceMatch ? Number(previewDistanceMatch[1]) : undefined,+ );+ const componentName =+ extractFirstMatch(content, [+ /export\s+default\s+function\s+([A-Za-z0-9_]+)/,+ /export\s+function\s+([A-Za-z0-9_]+)/,+ /export\s+default\s+([A-Za-z0-9_]+)\s*;/,+ /<title>([^<]+)<\/title>/i,+ ]) ?? null;+ const modelAssetReference = extractFirstMatch(content, [+ /modelUrl\s*=\s*(['"`])([\s\S]*?)\1/,+ /modelUrl\s*:\s*(['"`])([\s\S]*?)\1/,+ ]);+ const imageAssetReference = extractFirstMatch(content, [+ /imageUrl\s*=\s*(['"`])([\s\S]*?)\1/,+ /imageUrl\s*:\s*(['"`])([\s\S]*?)\1/,+ ]);++ return {+ componentName,+ imageAssetReference,+ initialPose,+ modelAssetReference,+ previewDistance,+ settings,+ shape,+ };+}++export function deriveExportComponentName(+ shape: HalftoneGeometrySpec | undefined,+ importedFile: File | undefined,+) {+ const source =+ importedFile?.name ??+ shape?.filename ??+ shape?.label ??+ shape?.key ??+ 'HalftoneDashes';++ return normalizeExportComponentName(source);+}diff --git a/packages/twenty-website-new/src/lib/halftone/utils/exporter-shaders.ts b/packages/twenty-website-new/src/lib/halftone/utils/exporter-shaders.tsnew file mode 100644index 00000000000..79cf551cf16--- /dev/null+++ b/packages/twenty-website-new/src/lib/halftone/utils/exporter-shaders.ts@@ -0,0 +1,1585 @@+import { GLASS_ENVIRONMENT_DATA_URL } from '@/lib/halftone/utils/glass-environment-data';+import { DRACO_DECODER_PATH } from '@/lib/visual-runtime/utils/draco-decoder-path';+import type { HalftoneGeometrySpec } from '@/lib/halftone/utils/state';++import type { ExportedShapeDescriptor } from '../types/exporter-types';++export const passThroughVertexShader = `+ varying vec2 vUv;++ void main() {+ vUv = uv;+ gl_Position = vec4(position, 1.0);+ }+`;++export const blurFragmentShader = `+ precision highp float;++ uniform sampler2D tInput;+ uniform vec2 dir;+ uniform vec2 res;++ varying vec2 vUv;++ void main() {+ vec4 sum = vec4(0.0);+ vec2 px = dir / res;++ float w[5];+ w[0] = 0.227027;+ w[1] = 0.1945946;+ w[2] = 0.1216216;+ w[3] = 0.054054;+ w[4] = 0.016216;++ sum += texture2D(tInput, vUv) * w[0];++ for (int i = 1; i < 5; i++) {+ float fi = float(i) * 3.0;+ sum += texture2D(tInput, vUv + px * fi) * w[i];+ sum += texture2D(tInput, vUv - px * fi) * w[i];+ }++ gl_FragColor = sum;+ }+`;++export const imagePassthroughFragmentShader = `+ precision highp float;++ uniform sampler2D tImage;+ uniform vec2 imageSize;+ uniform vec2 viewportSize;+ uniform float zoom;+ uniform float contrast;+ uniform float imageFit;++ varying vec2 vUv;++ void main() {+ float imageAspect = imageSize.x / imageSize.y;+ float viewAspect = viewportSize.x / viewportSize.y;++ vec2 uv = vUv;++ if (imageAspect > viewAspect) {+ float scale = viewAspect / imageAspect;+ if (imageFit > 0.5) {+ uv.x = (uv.x - 0.5) * scale + 0.5;+ } else {+ uv.y = (uv.y - 0.5) / scale + 0.5;+ }+ } else {+ float scale = imageAspect / viewAspect;+ if (imageFit > 0.5) {+ uv.y = (uv.y - 0.5) * scale + 0.5;+ } else {+ uv.x = (uv.x - 0.5) / scale + 0.5;+ }+ }++ uv = (uv - 0.5) / zoom + 0.5;++ float inBounds = step(0.0, uv.x) * step(uv.x, 1.0)+ * step(0.0, uv.y) * step(uv.y, 1.0);++ vec4 color = texture2D(tImage, clamp(uv, 0.0, 1.0));+ vec3 contrastColor = clamp((color.rgb - 0.5) * contrast + 0.5, 0.0, 1.0);++ gl_FragColor = vec4(contrastColor, inBounds);+ }+`;++export const halftoneFragmentShader = `+ precision highp float;++ uniform sampler2D tScene;+ uniform sampler2D tGlow;+ uniform vec2 effectResolution;+ uniform vec2 logicalResolution;+ uniform float tile;+ uniform float s_3;+ uniform float s_4;+ uniform float applyToDarkAreas;+ uniform vec3 dashColor;+ uniform vec3 hoverDashColor;+ uniform float time;+ uniform float waveAmount;+ uniform float waveSpeed;+ uniform float footprintScale;+ uniform vec2 interactionUv;+ uniform vec2 interactionVelocity;+ uniform vec2 dragOffset;+ uniform float hoverHalftoneActive;+ uniform float hoverHalftonePowerShift;+ uniform float hoverHalftoneRadius;+ uniform float hoverHalftoneWidthShift;+ uniform float hoverLightStrength;+ uniform float hoverLightRadius;+ uniform float hoverFlowStrength;+ uniform float hoverFlowRadius;+ uniform float dragFlowStrength;+ uniform float cropToBounds;++ varying vec2 vUv;++ float distSegment(in vec2 p, in vec2 a, in vec2 b) {+ vec2 pa = p - a;+ vec2 ba = b - a;+ float denom = max(dot(ba, ba), 0.000001);+ float h = clamp(dot(pa, ba) / denom, 0.0, 1.0);+ return length(pa - ba * h);+ }++ float lineSimpleEt(in vec2 p, in float r, in float thickness) {+ vec2 a = vec2(0.5) + vec2(-r, 0.0);+ vec2 b = vec2(0.5) + vec2(r, 0.0);+ float distToSegment = distSegment(p, a, b);+ float halfThickness = thickness * r;+ return distToSegment - halfThickness;+ }++ void main() {+ if (cropToBounds > 0.5) {+ vec4 boundsCheck = texture2D(tScene, vUv);+ if (boundsCheck.a < 0.01) {+ gl_FragColor = vec4(0.0);+ return;+ }+ }++ vec2 fragCoord =+ (gl_FragCoord.xy / max(effectResolution, vec2(1.0))) * logicalResolution;+ float halftoneSize = max(tile * max(footprintScale, 0.001), 1.0);+ vec2 pointerPx = interactionUv * logicalResolution;+ vec2 fragDelta = fragCoord - pointerPx;+ float fragDist = length(fragDelta);+ vec2 radialDir = fragDist > 0.001 ? fragDelta / fragDist : vec2(0.0, 1.0);+ float velocityMagnitude = length(interactionVelocity);+ vec2 motionDir = velocityMagnitude > 0.001+ ? interactionVelocity / velocityMagnitude+ : vec2(0.0, 0.0);+ float motionBias = velocityMagnitude > 0.001+ ? dot(-radialDir, motionDir) * 0.5 + 0.5+ : 0.5;++ float hoverLightMask = 0.0;+ if (hoverLightStrength > 0.0) {+ float lightRadiusPx = hoverLightRadius * logicalResolution.y;+ hoverLightMask = smoothstep(lightRadiusPx, 0.0, fragDist);+ }++ float hoverHalftoneMask = 0.0;+ if (hoverHalftoneActive > 0.0) {+ float hoverHalftoneRadiusPx = hoverHalftoneRadius * logicalResolution.y;+ hoverHalftoneMask =+ smoothstep(hoverHalftoneRadiusPx, 0.0, fragDist) *+ clamp(hoverHalftoneActive, 0.0, 1.0);+ }++ float hoverFlowMask = 0.0;+ if (hoverFlowStrength > 0.0) {+ float hoverRadiusPx = hoverFlowRadius * logicalResolution.y;+ hoverFlowMask = smoothstep(hoverRadiusPx, 0.0, fragDist);+ }++ vec2 hoverDisplacement =+ radialDir * hoverFlowStrength * hoverFlowMask * halftoneSize * 0.55 ++ motionDir * hoverFlowStrength * hoverFlowMask * (0.4 + motionBias) * halftoneSize * 1.15;+ vec2 travelDisplacement = dragOffset * dragFlowStrength * 0.45;+ vec2 effectCoord = fragCoord + hoverDisplacement + travelDisplacement;++ float bandRow = floor(effectCoord.y / halftoneSize);+ float waveOffset =+ waveAmount * sin(time * waveSpeed + bandRow * 0.5) * halftoneSize;+ effectCoord.x += waveOffset;++ vec2 cellIndex = floor(effectCoord / halftoneSize);+ vec2 sampleUv = clamp(+ (cellIndex + 0.5) * halftoneSize / logicalResolution,+ vec2(0.0),+ vec2(1.0)+ );+ vec2 cellUv = fract(effectCoord / halftoneSize);++ vec4 sceneSample = texture2D(tScene, sampleUv);+ float mask = smoothstep(0.02, 0.08, sceneSample.a);+ float localPower = clamp(+ s_3 + hoverHalftonePowerShift * hoverHalftoneMask,+ -1.5,+ 1.5+ );+ float localWidth = clamp(+ s_4 + hoverHalftoneWidthShift * hoverHalftoneMask,+ 0.05,+ 1.4+ );+ float lightLift =+ hoverLightStrength * hoverLightMask * mix(0.78, 1.18, motionBias) * 0.22;+ float toneValue =+ (sceneSample.r + sceneSample.g + sceneSample.b) * (1.0 / 3.0);+ if (applyToDarkAreas > 0.5) {+ toneValue = 1.0 - toneValue;+ }+ // Preserve the pre-toneTarget light-mode response by keeping the power+ // bias inside the averaged tone calculation.+ float powerBias = localPower * length(vec2(0.5)) * (1.0 / 3.0);+ float bandRadius = clamp(+ toneValue + powerBias + lightLift,+ 0.0,+ 1.0+ ) * 1.86 * 0.5;++ float alpha = 0.0;+ if (bandRadius > 0.0001) {+ float signedDistance = lineSimpleEt(cellUv, bandRadius, localWidth);+ float edge = 0.02;+ alpha = (1.0 - smoothstep(0.0, edge, signedDistance)) * mask;+ }++ vec3 activeDashColor = mix(dashColor, hoverDashColor, hoverHalftoneMask);+ vec3 color = activeDashColor * alpha;+ gl_FragColor = vec4(color, alpha);++ #include <tonemapping_fragment>+ #include <colorspace_fragment>+ }+`;++const HALFTONE_TRANSMISSION_SHADER_PREFIX = String.raw`+uniform float chromaticAberration;+uniform float anisotropicBlur;+uniform float time;+uniform float distortion;+uniform float distortionScale;+uniform float temporalDistortion;+uniform sampler2D buffer;++vec3 random3(vec3 c) {+ float j = 4096.0 * sin(dot(c, vec3(17.0, 59.4, 15.0)));+ vec3 r;+ r.z = fract(512.0 * j);+ j *= 0.125;+ r.x = fract(512.0 * j);+ j *= 0.125;+ r.y = fract(512.0 * j);+ return r - 0.5;+}++uint hash(uint x) {+ x += (x << 10u);+ x ^= (x >> 6u);+ x += (x << 3u);+ x ^= (x >> 11u);+ x += (x << 15u);+ return x;+}++uint hash(uvec2 v) { return hash(v.x ^ hash(v.y)); }+uint hash(uvec3 v) { return hash(v.x ^ hash(v.y) ^ hash(v.z)); }+uint hash(uvec4 v) {+ return hash(v.x ^ hash(v.y) ^ hash(v.z) ^ hash(v.w));+}++float floatConstruct(uint m) {+ const uint ieeeMantissa = 0x007FFFFFu;+ const uint ieeeOne = 0x3F800000u;+ m &= ieeeMantissa;+ m |= ieeeOne;+ float f = uintBitsToFloat(m);+ return f - 1.0;+}++float randomBase(float x) {+ return floatConstruct(hash(floatBitsToUint(x)));+}+float randomBase(vec2 v) {+ return floatConstruct(hash(floatBitsToUint(v)));+}+float randomBase(vec3 v) {+ return floatConstruct(hash(floatBitsToUint(v)));+}+float randomBase(vec4 v) {+ return floatConstruct(hash(floatBitsToUint(v)));+}++float rand(float seed) {+ return randomBase(vec3(gl_FragCoord.xy, seed));+}++const float F3 = 0.3333333;+const float G3 = 0.1666667;++float snoise(vec3 p) {+ vec3 s = floor(p + dot(p, vec3(F3)));+ vec3 x = p - s + dot(s, vec3(G3));+ vec3 e = step(vec3(0.0), x - x.yzx);+ vec3 i1 = e * (1.0 - e.zxy);+ vec3 i2 = 1.0 - e.zxy * (1.0 - e);+ vec3 x1 = x - i1 + G3;+ vec3 x2 = x - i2 + 2.0 * G3;+ vec3 x3 = x - 1.0 + 3.0 * G3;+ vec4 w;+ vec4 d;+ w.x = dot(x, x);+ w.y = dot(x1, x1);+ w.z = dot(x2, x2);+ w.w = dot(x3, x3);+ w = max(0.6 - w, 0.0);+ d.x = dot(random3(s), x);+ d.y = dot(random3(s + i1), x1);+ d.z = dot(random3(s + i2), x2);+ d.w = dot(random3(s + 1.0), x3);+ w *= w;+ w *= w;+ d *= w;+ return dot(d, vec4(52.0));+}++float snoiseFractal(vec3 m) {+ return 0.5333333 * snoise(m)+ + 0.2666667 * snoise(2.0 * m)+ + 0.1333333 * snoise(4.0 * m)+ + 0.0666667 * snoise(8.0 * m);+}+`;++const HALFTONE_TRANSMISSION_PARS_FRAGMENT = String.raw`+#ifdef USE_TRANSMISSION+ uniform float _transmission;+ uniform float thickness;+ uniform float attenuationDistance;+ uniform vec3 attenuationColor;+ uniform sampler2D refractionEnvMap;+ uniform float useEnvMapRefraction;+ #ifdef USE_TRANSMISSIONMAP+ uniform sampler2D transmissionMap;+ #endif+ #ifdef USE_THICKNESSMAP+ uniform sampler2D thicknessMap;+ #endif+ uniform vec2 transmissionSamplerSize;+ uniform sampler2D transmissionSamplerMap;+ uniform mat4 modelMatrix;+ uniform mat4 projectionMatrix;+ varying vec3 vWorldPosition;++ vec3 getVolumeTransmissionRay(+ const in vec3 n,+ const in vec3 v,+ const in float thicknessValue,+ const in float ior,+ const in mat4 modelMatrix+ ) {+ vec3 refractionVector = refract(-v, normalize(n), 1.0 / ior);+ vec3 modelScale;+ modelScale.x = length(vec3(modelMatrix[0].xyz));+ modelScale.y = length(vec3(modelMatrix[1].xyz));+ modelScale.z = length(vec3(modelMatrix[2].xyz));+ return normalize(refractionVector) * thicknessValue * modelScale;+ }++ float applyIorToRoughness(+ const in float roughnessValue,+ const in float ior+ ) {+ return roughnessValue * clamp(ior * 2.0 - 2.0, 0.0, 1.0);+ }++ vec2 directionToEquirectUv(const in vec3 direction) {+ vec3 dir = normalize(direction);+ vec2 uv = vec2(+ atan(dir.z, dir.x) * 0.15915494309189535 + 0.5,+ asin(clamp(dir.y, -1.0, 1.0)) * 0.3183098861837907 + 0.5+ );++ return vec2(fract(uv.x), 1.0 - clamp(uv.y, 0.0, 1.0));+ }++ vec4 getTransmissionSample(+ const in vec2 fragCoord,+ const in vec3 transmissionDirection,+ const in float roughnessValue,+ const in float ior+ ) {+ if (useEnvMapRefraction > 0.5) {+ return texture2D(+ refractionEnvMap,+ directionToEquirectUv(transmissionDirection)+ );+ }++ float framebufferLod =+ log2(transmissionSamplerSize.x) *+ applyIorToRoughness(roughnessValue, ior);+ return texture2D(buffer, fragCoord.xy);+ }++ vec3 applyVolumeAttenuation(+ const in vec3 radiance,+ const in float transmissionDistance,+ const in vec3 attenuationColorValue,+ const in float attenuationDistanceValue+ ) {+ if (isinf(attenuationDistanceValue)) {+ return radiance;+ }++ vec3 attenuationCoefficient =+ -log(attenuationColorValue) / attenuationDistanceValue;+ vec3 transmittance =+ exp(-attenuationCoefficient * transmissionDistance);++ return transmittance * radiance;+ }++ vec4 getIBLVolumeRefraction(+ const in vec3 n,+ const in vec3 v,+ const in float roughnessValue,+ const in vec3 diffuseColor,+ const in vec3 specularColor,+ const in float specularF90,+ const in vec3 position,+ const in mat4 modelMatrix,+ const in mat4 viewMatrix,+ const in mat4 projMatrix,+ const in float ior,+ const in float thicknessValue,+ const in vec3 attenuationColorValue,+ const in float attenuationDistanceValue+ ) {+ vec3 transmissionRay = getVolumeTransmissionRay(+ n,+ v,+ thicknessValue,+ ior,+ modelMatrix+ );+ vec3 refractedRayExit = position + transmissionRay;+ vec4 ndcPos =+ projMatrix * viewMatrix * vec4(refractedRayExit, 1.0);+ vec2 refractionCoords = ndcPos.xy / ndcPos.w;+ refractionCoords += 1.0;+ refractionCoords /= 2.0;+ vec3 transmissionDirection = normalize(transmissionRay);+ vec4 transmittedLight = getTransmissionSample(+ refractionCoords,+ transmissionDirection,+ roughnessValue,+ ior+ );+ vec3 attenuatedColor = applyVolumeAttenuation(+ transmittedLight.rgb,+ length(transmissionRay),+ attenuationColorValue,+ attenuationDistanceValue+ );+ vec3 F = EnvironmentBRDF(+ n,+ v,+ specularColor,+ specularF90,+ roughnessValue+ );+ return vec4(+ (1.0 - F) * attenuatedColor * diffuseColor,+ transmittedLight.a+ );+ }+#endif+`;++const HALFTONE_TRANSMISSION_FRAGMENT_TEMPLATE = String.raw`+material.transmission = _transmission;+material.transmissionAlpha = 1.0;+material.thickness = thickness;+material.attenuationDistance = attenuationDistance;+material.attenuationColor = attenuationColor;+#ifdef USE_TRANSMISSIONMAP+ material.transmission *= texture2D(transmissionMap, vUv).r;+#endif+#ifdef USE_THICKNESSMAP+ material.thickness *= texture2D(thicknessMap, vUv).g;+#endif++vec3 pos = vWorldPosition;+float runningSeed = 0.0;+vec3 v = normalize(cameraPosition - pos);+vec3 n = inverseTransformDirection(normal, viewMatrix);+vec3 transmission = vec3(0.0);+float transmissionR;+float transmissionG;+float transmissionB;+float randomCoords = rand(runningSeed++);+float thicknessSmear =+ thickness * max(pow(roughnessFactor, 0.33), anisotropicBlur);+vec3 distortionNormal = vec3(0.0);+vec3 temporalOffset = vec3(time, -time, -time) * temporalDistortion;++if (distortion > 0.0) {+ distortionNormal = distortion * vec3(+ snoiseFractal(vec3(pos * distortionScale + temporalOffset)),+ snoiseFractal(vec3(pos.zxy * distortionScale - temporalOffset)),+ snoiseFractal(vec3(pos.yxz * distortionScale + temporalOffset))+ );+}++for (float i = 0.0; i < __SAMPLES__.0; i++) {+ vec3 sampleNorm = normalize(+ n ++ roughnessFactor * roughnessFactor * 2.0 *+ normalize(+ vec3(+ rand(runningSeed++) - 0.5,+ rand(runningSeed++) - 0.5,+ rand(runningSeed++) - 0.5+ )+ ) *+ pow(rand(runningSeed++), 0.33) ++ distortionNormal+ );++ transmissionR = getIBLVolumeRefraction(+ sampleNorm,+ v,+ material.roughness,+ material.diffuseColor,+ material.specularColor,+ material.specularF90,+ pos,+ modelMatrix,+ viewMatrix,+ projectionMatrix,+ material.ior,+ material.thickness + thicknessSmear * (i + randomCoords) / float(__SAMPLES__),+ material.attenuationColor,+ material.attenuationDistance+ ).r;++ transmissionG = getIBLVolumeRefraction(+ sampleNorm,+ v,+ material.roughness,+ material.diffuseColor,+ material.specularColor,+ material.specularF90,+ pos,+ modelMatrix,+ viewMatrix,+ projectionMatrix,+ material.ior * (1.0 + chromaticAberration * (i + randomCoords) / float(__SAMPLES__)),+ material.thickness + thicknessSmear * (i + randomCoords) / float(__SAMPLES__),+ material.attenuationColor,+ material.attenuationDistance+ ).g;++ transmissionB = getIBLVolumeRefraction(+ sampleNorm,+ v,+ material.roughness,+ material.diffuseColor,+ material.specularColor,+ material.specularF90,+ pos,+ modelMatrix,+ viewMatrix,+ projectionMatrix,+ material.ior * (1.0 + 2.0 * chromaticAberration * (i + randomCoords) / float(__SAMPLES__)),+ material.thickness + thicknessSmear * (i + randomCoords) / float(__SAMPLES__),+ material.attenuationColor,+ material.attenuationDistance+ ).b;++ transmission.r += transmissionR;+ transmission.g += transmissionG;+ transmission.b += transmissionB;+}++transmission /= __SAMPLES__.0;+totalDiffuse = mix(totalDiffuse, transmission.rgb, material.transmission);+`;++export const GEOMETRY_RUNTIME_SOURCE = String.raw`+function makePolarShape(radiusFunction, segments = 320) {+ const shape = new THREE.Shape();++ for (let segmentIndex = 0; segmentIndex <= segments; segmentIndex += 1) {+ const angle = (segmentIndex / segments) * Math.PI * 2;+ const radius = radiusFunction(angle);+ const x = Math.cos(angle) * radius;+ const y = Math.sin(angle) * radius;++ if (segmentIndex === 0) {+ shape.moveTo(x, y);+ } else {+ shape.lineTo(x, y);+ }+ }++ return shape;+}++function makeReliefGeometry(shape, options = {}) {+ const {+ bevelSegments = 8,+ bevelSize = 0.08,+ bevelThickness = 0.1,+ depth = 0.58,+ waveDepth = 0.016,+ waves = 8,+ } = options;++ const geometry = new THREE.ExtrudeGeometry(shape, {+ depth,+ steps: 2,+ bevelEnabled: true,+ bevelThickness,+ bevelSize,+ bevelSegments,+ curveSegments: 96,+ });++ geometry.center();++ const position = geometry.attributes.position;+ let maxRadius = 0;++ for (let vertexIndex = 0; vertexIndex < position.count; vertexIndex += 1) {+ maxRadius = Math.max(+ maxRadius,+ Math.hypot(position.getX(vertexIndex), position.getY(vertexIndex)),+ );+ }++ const fullDepth = depth + bevelThickness * 2;++ for (let vertexIndex = 0; vertexIndex < position.count; vertexIndex += 1) {+ const x = position.getX(vertexIndex);+ const y = position.getY(vertexIndex);+ const z = position.getZ(vertexIndex);+ const radius = Math.hypot(x, y) / maxRadius;+ const angle = Math.atan2(y, x);+ const faceAmount = Math.min(1, Math.abs(z) / (fullDepth * 0.5));+ const rimLift = Math.exp(-Math.pow((radius - 0.84) / 0.12, 2));+ const innerDish = Math.exp(-Math.pow((radius - 0.42) / 0.2, 2));+ const wave =+ Math.cos(angle * waves) *+ Math.exp(-Math.pow((radius - 0.72) / 0.16, 2)) *+ waveDepth;+ const relief = faceAmount * (0.14 * rimLift - 0.055 * innerDish + wave);++ position.setZ(vertexIndex, z + (z >= 0 ? 1 : -1) * relief);+ }++ position.needsUpdate = true;+ geometry.computeVertexNormals();+ geometry.computeBoundingBox();+ geometry.computeBoundingSphere();++ return geometry;+}++function mergeGeometries(geometries) {+ if (geometries.length === 1) {+ return geometries[0];+ }++ let totalVertices = 0;+ let totalIndices = 0;+ let hasUv = false;++ const geometryInfos = geometries.map((geometry) => {+ const position = geometry.attributes.position;+ const normal = geometry.attributes.normal;+ const uv = geometry.attributes.uv ?? null;+ const index = geometry.index;+ const indexCount = index ? index.count : position.count;++ totalVertices += position.count;+ totalIndices += indexCount;+ hasUv = hasUv || uv !== null;++ return {+ index,+ indexCount,+ normal,+ position,+ uv,+ vertexCount: position.count,+ };+ });++ const positions = new Float32Array(totalVertices * 3);+ const normals = new Float32Array(totalVertices * 3);+ const uvs = hasUv ? new Float32Array(totalVertices * 2) : null;+ const indices = new Uint32Array(totalIndices);++ let vertexOffset = 0;+ let indexOffset = 0;++ for (const geometryInfo of geometryInfos) {+ for (let vertexIndex = 0; vertexIndex < geometryInfo.vertexCount; vertexIndex += 1) {+ const positionOffset = (vertexOffset + vertexIndex) * 3;+ positions[positionOffset] = geometryInfo.position.getX(vertexIndex);+ positions[positionOffset + 1] = geometryInfo.position.getY(vertexIndex);+ positions[positionOffset + 2] = geometryInfo.position.getZ(vertexIndex);+ normals[positionOffset] = geometryInfo.normal.getX(vertexIndex);+ normals[positionOffset + 1] = geometryInfo.normal.getY(vertexIndex);+ normals[positionOffset + 2] = geometryInfo.normal.getZ(vertexIndex);++ if (uvs !== null) {+ const uvOffset = (vertexOffset + vertexIndex) * 2;+ uvs[uvOffset] = geometryInfo.uv?.getX(vertexIndex) ?? 0;+ uvs[uvOffset + 1] = geometryInfo.uv?.getY(vertexIndex) ?? 0;+ }+ }++ if (geometryInfo.index) {+ for (let localIndex = 0; localIndex < geometryInfo.indexCount; localIndex += 1) {+ indices[indexOffset + localIndex] =+ geometryInfo.index.getX(localIndex) + vertexOffset;+ }+ } else {+ for (let localIndex = 0; localIndex < geometryInfo.indexCount; localIndex += 1) {+ indices[indexOffset + localIndex] = localIndex + vertexOffset;+ }+ }++ vertexOffset += geometryInfo.vertexCount;+ indexOffset += geometryInfo.indexCount;+ }++ const merged = new THREE.BufferGeometry();+ merged.setAttribute('position', new THREE.BufferAttribute(positions, 3));+ merged.setAttribute('normal', new THREE.BufferAttribute(normals, 3));++ if (uvs !== null) {+ merged.setAttribute('uv', new THREE.BufferAttribute(uvs, 2));+ }++ merged.setIndex(new THREE.BufferAttribute(indices, 1));++ return merged;+}++function makeArrowTarget() {+ const targetParts = [];+ const arrowParts = [];+ const baseRadius = 1.35;+ const baseDepth = 0.32;+ const bevel = 0.12;+ const points = [];+ const segments = 16;++ points.push(new THREE.Vector2(0, -baseDepth / 2));+ points.push(new THREE.Vector2(baseRadius - bevel, -baseDepth / 2));++ for (let segmentIndex = 0; segmentIndex <= segments; segmentIndex += 1) {+ const angle = Math.PI / 2 + (segmentIndex / segments) * (Math.PI / 2);+ points.push(+ new THREE.Vector2(+ baseRadius - bevel + Math.cos(angle) * bevel,+ -baseDepth / 2 + bevel + Math.sin(angle) * bevel,+ ),+ );+ }++ points.push(new THREE.Vector2(baseRadius, baseDepth / 2 - bevel));++ for (let segmentIndex = 0; segmentIndex <= segments; segmentIndex += 1) {+ const angle = (segmentIndex / segments) * (Math.PI / 2);+ points.push(+ new THREE.Vector2(+ baseRadius - bevel + Math.cos(angle) * bevel,+ baseDepth / 2 - bevel + Math.sin(angle) * bevel,+ ),+ );+ }++ points.push(new THREE.Vector2(0, baseDepth / 2));++ const disc = new THREE.LatheGeometry(points, 64);+ disc.applyMatrix4(new THREE.Matrix4().makeRotationX(Math.PI / 2));+ targetParts.push(disc);++ for (const radius of [0.45, 0.85, 1.22]) {+ const ring = new THREE.TorusGeometry(radius, 0.14, 16, 64);+ ring.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0, 0, baseDepth / 2 + 0.04),+ );+ targetParts.push(ring);+ }++ const bump = new THREE.SphereGeometry(0.32, 32, 24, 0, Math.PI * 2, 0, Math.PI / 2);+ bump.applyMatrix4(new THREE.Matrix4().makeRotationX(-Math.PI / 2));+ bump.applyMatrix4(new THREE.Matrix4().makeTranslation(0, 0, baseDepth / 2));+ targetParts.push(bump);++ const shaftLength = 1.5;+ const shaftRadius = 0.05;+ const shaft = new THREE.CylinderGeometry(shaftRadius, shaftRadius, shaftLength, 10, 1);+ shaft.applyMatrix4(new THREE.Matrix4().makeTranslation(0, shaftLength / 2, 0));+ arrowParts.push(shaft);++ const head = new THREE.ConeGeometry(0.12, 0.35, 10);+ head.applyMatrix4(new THREE.Matrix4().makeTranslation(0, -0.15, 0));+ arrowParts.push(head);++ for (let finIndex = 0; finIndex < 3; finIndex += 1) {+ const finShape = new THREE.Shape();+ finShape.moveTo(0, 0);+ finShape.lineTo(0.22, 0.25);+ finShape.lineTo(0, 0.5);+ finShape.lineTo(0, 0);++ const finGeometry = new THREE.ExtrudeGeometry(finShape, {+ depth: 0.012,+ bevelEnabled: false,+ });++ finGeometry.applyMatrix4(new THREE.Matrix4().makeTranslation(0.05, 0, -0.006));+ finGeometry.applyMatrix4(+ new THREE.Matrix4().makeRotationY((finIndex * Math.PI * 2) / 3),+ );+ finGeometry.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0, shaftLength - 0.45, 0),+ );+ arrowParts.push(finGeometry);+ }++ const nock = new THREE.SphereGeometry(0.065, 8, 8);+ nock.applyMatrix4(new THREE.Matrix4().makeTranslation(0, shaftLength + 0.03, 0));+ arrowParts.push(nock);++ const aim = new THREE.Matrix4().makeRotationX(Math.PI / 2.15);+ const tilt = new THREE.Matrix4().makeRotationZ(Math.PI / 5);+ const shift = new THREE.Matrix4().makeTranslation(0.15, 0.15, 0.12);++ for (const geometry of arrowParts) {+ geometry.applyMatrix4(aim);+ geometry.applyMatrix4(tilt);+ geometry.applyMatrix4(shift);+ }++ const merged = mergeGeometries([...targetParts, ...arrowParts]);+ merged.computeVertexNormals();+ merged.computeBoundingSphere();++ return merged;+}++function makeDollarCoin() {+ const parts = [];+ const baseRadius = 1.3;+ const baseDepth = 0.45;+ const bevel = 0.18;+ const points = [];+ const segments = 20;++ points.push(new THREE.Vector2(0, -baseDepth / 2));+ points.push(new THREE.Vector2(baseRadius - bevel, -baseDepth / 2));++ for (let segmentIndex = 0; segmentIndex <= segments; segmentIndex += 1) {+ const angle = -Math.PI / 2 + (segmentIndex / segments) * Math.PI;+ points.push(+ new THREE.Vector2(+ baseRadius - bevel + Math.cos(angle) * bevel,+ Math.sin(angle) * (baseDepth / 2),+ ),+ );+ }++ points.push(new THREE.Vector2(baseRadius - bevel, baseDepth / 2));+ points.push(new THREE.Vector2(0, baseDepth / 2));++ const disc = new THREE.LatheGeometry(points, 64);+ disc.applyMatrix4(new THREE.Matrix4().makeRotationX(Math.PI / 2));+ parts.push(disc);++ const frontRim = new THREE.TorusGeometry(baseRadius - 0.22, 0.05, 12, 64);+ frontRim.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0, 0, baseDepth / 2 - 0.01),+ );+ parts.push(frontRim);++ const backRim = new THREE.TorusGeometry(baseRadius - 0.22, 0.05, 12, 64);+ backRim.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0, 0, -(baseDepth / 2 - 0.01)),+ );+ parts.push(backRim);++ const createDollarSign = () => {+ const geometries = [];+ const tubeRadius = 0.1;+ const curveRadius = 0.28;+ const verticalOffset = 0.22;++ const bar = new THREE.CylinderGeometry(0.05, 0.05, 1.3, 12);+ geometries.push(bar);++ const topArc = new THREE.TorusGeometry(curveRadius, tubeRadius, 16, 32, Math.PI);+ topArc.applyMatrix4(new THREE.Matrix4().makeRotationZ(Math.PI / 2));+ topArc.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0.05, verticalOffset, 0),+ );+ geometries.push(topArc);++ const bottomArc = new THREE.TorusGeometry(curveRadius, tubeRadius, 16, 32, Math.PI);+ bottomArc.applyMatrix4(new THREE.Matrix4().makeRotationZ(-Math.PI / 2));+ bottomArc.applyMatrix4(+ new THREE.Matrix4().makeTranslation(-0.05, -verticalOffset, 0),+ );+ geometries.push(bottomArc);++ const topSerif = new THREE.CylinderGeometry(tubeRadius, tubeRadius, 0.22, 12);+ topSerif.applyMatrix4(new THREE.Matrix4().makeRotationZ(Math.PI / 2));+ topSerif.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0.16, verticalOffset + curveRadius, 0),+ );+ geometries.push(topSerif);++ const bottomSerif = new THREE.CylinderGeometry(tubeRadius, tubeRadius, 0.22, 12);+ bottomSerif.applyMatrix4(new THREE.Matrix4().makeRotationZ(Math.PI / 2));+ bottomSerif.applyMatrix4(+ new THREE.Matrix4().makeTranslation(-0.16, -verticalOffset - curveRadius, 0),+ );+ geometries.push(bottomSerif);++ const diagonalLength = Math.sqrt(0.1 * 0.1 + (verticalOffset * 2) ** 2);+ const diagonalAngle = Math.atan2(verticalOffset * 2, 0.1);+ const diagonal = new THREE.CylinderGeometry(tubeRadius, tubeRadius, diagonalLength + 0.12, 12);+ diagonal.applyMatrix4(+ new THREE.Matrix4().makeRotationZ(diagonalAngle - Math.PI / 2),+ );+ geometries.push(diagonal);++ return geometries;+ };++ for (const geometry of createDollarSign()) {+ geometry.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0, 0, baseDepth / 2 + 0.01),+ );+ parts.push(geometry);+ }++ for (const geometry of createDollarSign()) {+ geometry.applyMatrix4(new THREE.Matrix4().makeRotationY(Math.PI));+ geometry.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0, 0, -(baseDepth / 2 + 0.01)),+ );+ parts.push(geometry);+ }++ const merged = mergeGeometries(parts);+ merged.computeVertexNormals();+ merged.computeBoundingSphere();++ return merged;+}++function createBuiltinGeometry(shapeKey) {+ switch (shapeKey) {+ case 'torusKnot':+ return new THREE.TorusKnotGeometry(1, 0.35, 200, 32);+ case 'sphere':+ return new THREE.SphereGeometry(1.4, 64, 64);+ case 'torus':+ return new THREE.TorusGeometry(1, 0.45, 64, 100);+ case 'icosahedron':+ return new THREE.IcosahedronGeometry(1.4, 4);+ case 'box':+ return new THREE.BoxGeometry(2.1, 2.1, 2.1, 6, 6, 6);+ case 'cone':+ return new THREE.ConeGeometry(1.2, 2.4, 64, 10);+ case 'cylinder':+ return new THREE.CylinderGeometry(1, 1, 2.3, 64, 10);+ case 'octahedron':+ return new THREE.OctahedronGeometry(1.5, 2);+ case 'dodecahedron':+ return new THREE.DodecahedronGeometry(1.35, 1);+ case 'tetrahedron':+ return new THREE.TetrahedronGeometry(1.7, 1);+ case 'sunCoin':+ return makeReliefGeometry(+ makePolarShape(+ (angle) => 1 + 0.17 * Math.pow(0.5 + 0.5 * Math.cos(angle * 12), 1.5),+ ),+ { depth: 0.62, waves: 12, waveDepth: 0.018 },+ );+ case 'lotusCoin':+ return makeReliefGeometry(+ makePolarShape((angle) => 0.88 + 0.3 * Math.pow(Math.sin(angle * 4), 2)),+ { depth: 0.64, waves: 8, waveDepth: 0.014 },+ );+ case 'arrowTarget':+ return makeArrowTarget();+ case 'dollarCoin':+ return makeDollarCoin();+ default:+ return new THREE.TorusKnotGeometry(1, 0.35, 200, 32);+ }+}+`;++const IMPORTED_RUNTIME_SHARED_SOURCE = String.raw`+const EMPTY_TEXTURE_DATA_URL =+ 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO8B7Q8AAAAASUVORK5CYII=';++function createLoadingManager() {+ const loadingManager = new THREE.LoadingManager();+ loadingManager.setURLModifier((url) =>+ /\.(png|jpe?g|webp|gif|bmp)$/i.test(url) ? EMPTY_TEXTURE_DATA_URL : url,+ );+ return loadingManager;+}++function normalizeImportedGeometry(geometry) {+ geometry.computeBoundingBox();++ let boundingBox = geometry.boundingBox;+ let center = new THREE.Vector3();+ let size = new THREE.Vector3();++ boundingBox?.getCenter(center);+ boundingBox?.getSize(size);+ geometry.translate(-center.x, -center.y, -center.z);++ const dimensions = [size.x, size.y, size.z];+ const thinnestAxis = dimensions.indexOf(Math.min(...dimensions));++ if (thinnestAxis === 0) {+ geometry.applyMatrix4(new THREE.Matrix4().makeRotationY(Math.PI / 2));+ } else if (thinnestAxis === 1) {+ geometry.applyMatrix4(new THREE.Matrix4().makeRotationX(Math.PI / 2));+ }++ geometry.computeBoundingBox();+ geometry.computeBoundingSphere();++ const radius = geometry.boundingSphere?.radius || 1;+ const scale = 1.6 / radius;+ geometry.scale(scale, scale, scale);++ geometry.computeBoundingBox();+ boundingBox = geometry.boundingBox;+ center = new THREE.Vector3();+ boundingBox?.getCenter(center);+ geometry.translate(-center.x, -center.y, -center.z);++ geometry.computeVertexNormals();+ geometry.computeBoundingBox();+ geometry.computeBoundingSphere();++ return geometry;+}++function extractMergedGeometry(root, emptyMessage) {+ root.updateMatrixWorld(true);+ const geometries = [];++ root.traverse((object) => {+ if (!(object instanceof THREE.Mesh) || !object.geometry) {+ return;+ }++ const geometry = object.geometry.clone();++ if (!geometry.attributes.normal) {+ geometry.computeVertexNormals();+ }++ geometry.applyMatrix4(object.matrixWorld);+ geometries.push(geometry);+ });++ if (geometries.length === 0) {+ throw new Error(emptyMessage);+ }++ return normalizeImportedGeometry(mergeGeometries(geometries));+}+`;++const IMPORTED_FBX_RUNTIME_SOURCE = String.raw`++function parseFbxGeometry(buffer, label) {+ const originalWarn = console.warn;++ console.warn = (...args) => {+ if (typeof args[0] === 'string' && args[0].startsWith('THREE.FBXLoader:')) {+ return;+ }++ originalWarn(...args);+ };++ try {+ const root = new FBXLoader(createLoadingManager()).parse(buffer, '');+ return extractMergedGeometry(root, label + ' did not contain any mesh geometry.');+ } finally {+ console.warn = originalWarn;+ }+}+`;++const IMPORTED_GLB_RUNTIME_SOURCE = String.raw`+const DRACO_DECODER_PATH = ${JSON.stringify(DRACO_DECODER_PATH)};++function parseGlbGeometry(buffer, label) {+ return new Promise((resolve, reject) => {+ const loadingManager = createLoadingManager();+ const dracoLoader = new DRACOLoader(loadingManager);+ dracoLoader.setDecoderPath(DRACO_DECODER_PATH);++ const loader = new GLTFLoader(loadingManager);+ loader.setDRACOLoader(dracoLoader);++ const cleanup = () => {+ dracoLoader.dispose();+ };++ loader.parse(+ buffer,+ '',+ (gltf) => {+ try {+ resolve(+ extractMergedGeometry(+ gltf.scene,+ label + ' did not contain any mesh geometry.',+ ),+ );+ } catch (error) {+ reject(error);+ } finally {+ cleanup();+ }+ },+ (error) => {+ cleanup();+ reject(error);+ },+ );+ });+}+`;++function createImportedRuntimeSource(loader: HalftoneGeometrySpec['loader']) {+ const loaderSource =+ loader === 'fbx'+ ? IMPORTED_FBX_RUNTIME_SOURCE+ : IMPORTED_GLB_RUNTIME_SOURCE;++ return `${IMPORTED_RUNTIME_SHARED_SOURCE}+${loaderSource}++async function loadImportedGeometryFromUrl(modelUrl, label) {+ const response = await fetch(modelUrl);++ if (!response.ok) {+ throw new Error('Unable to load ' + label + ' from ' + modelUrl + '.');+ }++ const buffer = await response.arrayBuffer();++ ${+ loader === 'fbx'+ ? 'return parseFbxGeometry(buffer, label);'+ : 'return parseGlbGeometry(buffer, label);'+ }+}+`;+}++export function getExportedShapeLoader(+ shape: ExportedShapeDescriptor,+): HalftoneGeometrySpec['loader'] | null {+ if (shape.loader) {+ return shape.loader;+ }++ const filename = shape.filename?.toLowerCase() ?? '';++ if (filename.endsWith('.fbx')) {+ return 'fbx';+ }++ if (filename.endsWith('.glb')) {+ return 'glb';+ }++ return null;+}++export function createImportedGeometryRuntimeSource(+ shape: ExportedShapeDescriptor,+) {+ if (shape.kind !== 'imported') {+ return '';+ }++ const loader = getExportedShapeLoader(shape) ?? 'glb';++ return createImportedRuntimeSource(loader);+}++export const GLASS_MATERIAL_RUNTIME_SOURCE = String.raw`+const GLASS_ENVIRONMENT_DATA_URL = ${JSON.stringify(GLASS_ENVIRONMENT_DATA_URL)};+const GLASS_THICKNESS_TO_WORLD_UNITS = 1 / 320;+const GLASS_ATTENUATION_DISTANCE_MIN = 0.12;+const GLASS_ENVIRONMENT_INTENSITY_BASE = 0.18;+const GLASS_ENVIRONMENT_INTENSITY_MULTIPLIER = 0.12;+const GLASS_ENVIRONMENT_ZOOM = 1.55;+const GLASS_TRANSMISSION_BACKGROUND = new THREE.Color(0x030303);+const MAX_TEXTURE_ANISOTROPY = 8;+const HALFTONE_TRANSMISSION_SHADER_PREFIX = ${JSON.stringify(+ HALFTONE_TRANSMISSION_SHADER_PREFIX,+)};+const HALFTONE_TRANSMISSION_PARS_FRAGMENT = ${JSON.stringify(+ HALFTONE_TRANSMISSION_PARS_FRAGMENT,+)};+const HALFTONE_TRANSMISSION_FRAGMENT_TEMPLATE = ${JSON.stringify(+ HALFTONE_TRANSMISSION_FRAGMENT_TEMPLATE,+)};++class HalftoneTransmissionMaterial extends THREE.MeshPhysicalMaterial {+ constructor(samples = 10) {+ super();++ this.halftoneUniforms = {+ chromaticAberration: { value: 0.05 },+ transmission: { value: 0 },+ _transmission: { value: 1 },+ transmissionMap: { value: null },+ refractionEnvMap: { value: null },+ useEnvMapRefraction: { value: 0 },+ roughness: { value: 0 },+ thickness: { value: 0 },+ thicknessMap: { value: null },+ attenuationDistance: { value: Infinity },+ attenuationColor: { value: new THREE.Color('white') },+ anisotropicBlur: { value: 0.1 },+ time: { value: 0 },+ distortion: { value: 0 },+ distortionScale: { value: 0.5 },+ temporalDistortion: { value: 0 },+ buffer: { value: null },+ };++ this.customProgramCacheKey = () => 'halftone-transmission-' + samples;++ this.onBeforeCompile = (shader) => {+ shader.uniforms = {+ ...shader.uniforms,+ ...this.halftoneUniforms,+ };+ shader.defines ??= {};++ if (this.anisotropy > 0) {+ shader.defines.USE_ANISOTROPY = '';+ }++ shader.defines.USE_TRANSMISSION = '';+ shader.fragmentShader =+ HALFTONE_TRANSMISSION_SHADER_PREFIX + shader.fragmentShader;+ shader.fragmentShader = shader.fragmentShader.replace(+ '#include <transmission_pars_fragment>',+ HALFTONE_TRANSMISSION_PARS_FRAGMENT,+ );+ shader.fragmentShader = shader.fragmentShader.replace(+ '#include <transmission_fragment>',+ HALFTONE_TRANSMISSION_FRAGMENT_TEMPLATE.replaceAll(+ '__SAMPLES__',+ String(samples),+ ),+ );+ };++ Object.keys(this.halftoneUniforms).forEach((key) => {+ Object.defineProperty(this, key, {+ configurable: true,+ enumerable: true,+ get: () => this.halftoneUniforms[key]?.value,+ set: (value) => {+ this.halftoneUniforms[key].value = value;+ },+ });+ });+ }+}++function setTextureSampling(texture, renderer) {+ texture.generateMipmaps = true;+ texture.magFilter = THREE.LinearFilter;+ texture.minFilter = THREE.LinearMipmapLinearFilter;+ texture.anisotropy = Math.min(+ renderer.capabilities.getMaxAnisotropy(),+ MAX_TEXTURE_ANISOTROPY,+ );+}++function disposeEnvironmentScene(scene) {+ scene.traverse((object) => {+ if (object.geometry) {+ object.geometry.dispose();+ }++ if (Array.isArray(object.material)) {+ object.material.forEach((material) => material.dispose());+ return;+ }++ object.material?.dispose?.();+ });+}++function createSolidEnvironmentTexture(renderer) {+ const pmremGenerator = new THREE.PMREMGenerator(renderer);+ const environmentTexture = pmremGenerator.fromScene(+ new RoomEnvironment(),+ 0.04,+ ).texture;+ pmremGenerator.dispose();++ return environmentTexture;+}++function getTextureImageSize(texture) {+ const image = texture.image;++ return {+ height:+ image?.naturalHeight ?? image?.videoHeight ?? image?.height ?? undefined,+ width:+ image?.naturalWidth ?? image?.videoWidth ?? image?.width ?? undefined,+ };+}++function createZoomedGlassTexture(sourceTexture, renderer, zoom) {+ if (zoom <= 1) {+ return sourceTexture;+ }++ const { width, height } = getTextureImageSize(sourceTexture);++ if (!width || !height) {+ return sourceTexture;+ }++ const canvas = document.createElement('canvas');+ canvas.width = width;+ canvas.height = height;++ const context = canvas.getContext('2d');++ if (!context) {+ return sourceTexture;+ }++ const cropWidth = width / zoom;+ const cropHeight = height / zoom;+ const sourceX = (width - cropWidth) / 2;+ const sourceY = (height - cropHeight) / 2;++ context.drawImage(+ sourceTexture.image,+ sourceX,+ sourceY,+ cropWidth,+ cropHeight,+ 0,+ 0,+ width,+ height,+ );++ const zoomedTexture = new THREE.CanvasTexture(canvas);+ zoomedTexture.colorSpace = sourceTexture.colorSpace;+ zoomedTexture.wrapS = THREE.ClampToEdgeWrapping;+ zoomedTexture.wrapT = THREE.ClampToEdgeWrapping;+ setTextureSampling(zoomedTexture, renderer);+ zoomedTexture.needsUpdate = true;++ return zoomedTexture;+}++function createStudioGlassEnvironmentTexture(renderer, backdropTexture) {+ const pmremGenerator = new THREE.PMREMGenerator(renderer);+ const environmentTexture = backdropTexture+ ? pmremGenerator.fromEquirectangular(backdropTexture).texture+ : pmremGenerator.fromScene(new RoomEnvironment(), 0.04).texture;+ pmremGenerator.dispose();++ return environmentTexture;+}++function createFallbackGlassBackdropTexture(renderer) {+ const texture = new THREE.DataTexture(+ new Uint8Array([3, 3, 3, 255]),+ 1,+ 1,+ THREE.RGBAFormat,+ );+ texture.colorSpace = THREE.SRGBColorSpace;+ texture.wrapS = THREE.ClampToEdgeWrapping;+ texture.wrapT = THREE.ClampToEdgeWrapping;+ texture.mapping = THREE.EquirectangularReflectionMapping;+ setTextureSampling(texture, renderer);+ texture.needsUpdate = true;++ return texture;+}++function loadTexture(url, renderer, colorSpace) {+ const loader = new THREE.TextureLoader();++ return new Promise((resolve, reject) => {+ loader.load(+ url,+ (texture) => {+ texture.colorSpace = colorSpace;+ setTextureSampling(texture, renderer);+ resolve(texture);+ },+ undefined,+ reject,+ );+ });+}++async function loadGlassEnvironmentTexture(renderer) {+ const sourceBackgroundTexture = await loadTexture(+ GLASS_ENVIRONMENT_DATA_URL,+ renderer,+ THREE.SRGBColorSpace,+ );+ const backgroundTexture = createZoomedGlassTexture(+ sourceBackgroundTexture,+ renderer,+ GLASS_ENVIRONMENT_ZOOM,+ );+ if (backgroundTexture !== sourceBackgroundTexture) {+ sourceBackgroundTexture.dispose();+ }+ backgroundTexture.mapping = THREE.EquirectangularReflectionMapping;+ backgroundTexture.wrapS = THREE.ClampToEdgeWrapping;+ backgroundTexture.wrapT = THREE.ClampToEdgeWrapping;+ backgroundTexture.needsUpdate = true;+ const environmentTexture = createStudioGlassEnvironmentTexture(+ renderer,+ backgroundTexture,+ );++ return {+ backgroundTexture,+ environmentTexture,+ };+}++async function createHalftoneMaterialAssets(renderer) {+ const solidEnvironmentTexture = createSolidEnvironmentTexture(renderer);++ try {+ const glassEnvironmentAssets = await loadGlassEnvironmentTexture(renderer);++ return {+ glassBackgroundTexture: glassEnvironmentAssets.backgroundTexture,+ glassEnvironmentTexture: glassEnvironmentAssets.environmentTexture,+ solidEnvironmentTexture,+ };+ } catch {+ const fallbackGlassBackdropTexture =+ createFallbackGlassBackdropTexture(renderer);+ const fallbackGlassEnvironmentTexture =+ createStudioGlassEnvironmentTexture(renderer);++ return {+ glassBackgroundTexture: fallbackGlassBackdropTexture,+ glassEnvironmentTexture: fallbackGlassEnvironmentTexture,+ solidEnvironmentTexture,+ };+ }+}++function createHalftoneMaterial() {+ return new HalftoneTransmissionMaterial();+}++function applyHalftoneMaterialSettings(material, materialSettings, materialAssets) {+ const isGlass = materialSettings.surface === 'glass';+ const glassThickness =+ materialSettings.thickness * GLASS_THICKNESS_TO_WORLD_UNITS;+ const glassEnvironmentIntensity =+ GLASS_ENVIRONMENT_INTENSITY_BASE ++ materialSettings.environmentPower * GLASS_ENVIRONMENT_INTENSITY_MULTIPLIER;+ const glassAttenuationDistance = Math.max(+ glassThickness * 4,+ GLASS_ATTENUATION_DISTANCE_MIN,+ );++ material.color.set(isGlass ? '#ffffff' : materialSettings.color);+ material.roughness = materialSettings.roughness;+ material.metalness = materialSettings.metalness;+ material.envMap = isGlass+ ? materialAssets.glassEnvironmentTexture+ : materialAssets.solidEnvironmentTexture;+ material.envMapIntensity = isGlass+ ? GLASS_ENVIRONMENT_INTENSITY_BASE ++ materialSettings.environmentPower * GLASS_ENVIRONMENT_INTENSITY_MULTIPLIER+ : 0.25;+ material.clearcoat = isGlass ? 1 : 0;+ material.clearcoatRoughness = isGlass+ ? Math.max(materialSettings.roughness * 0.25, 0.01)+ : 0.08;+ material.reflectivity = isGlass ? 0.98 : 0.5;+ material.transmission = 0;+ material._transmission = isGlass ? 1 : 0;+ material.refractionEnvMap = isGlass ? materialAssets.glassBackgroundTexture : null;+ material.useEnvMapRefraction = isGlass ? 1 : 0;+ material.thickness = isGlass ? glassThickness : 0;+ material.ior = isGlass ? materialSettings.refraction : 1.5;+ material.buffer = null;+ material.bumpMap = null;+ material.bumpScale = 0;+ material.roughnessMap = null;+ material.side = THREE.FrontSide;+ material.transparent = false;+ material.opacity = 1;+ material.depthWrite = true;+ material.attenuationColor.set(isGlass ? materialSettings.color : 'white');+ material.attenuationDistance = isGlass+ ? glassAttenuationDistance+ : Infinity;+ material.anisotropicBlur = isGlass+ ? THREE.MathUtils.lerp(0.03, 0.12, materialSettings.roughness)+ : 0.1;+ material.chromaticAberration = isGlass ? 0 : 0.05;+ material.distortion = 0;+ material.distortionScale = 0.5;+ material.temporalDistortion = 0;+ material.userData.halftoneIsGlass = isGlass;+ material.userData.halftoneGlassBacksideThickness = isGlass+ ? glassThickness * 2+ : 0;+ material.userData.halftoneGlassBacksideEnvIntensity = isGlass+ ? glassEnvironmentIntensity * 2.8+ : 0;+ material.userData.halftoneUseEnvironmentRefraction = isGlass;+ material.envMapIntensity = isGlass ? glassEnvironmentIntensity : 0.25;++ material.needsUpdate = true;+}++function disposeHalftoneMaterialAssets(materialAssets) {+ materialAssets.glassBackgroundTexture.dispose();++ if (materialAssets.glassEnvironmentTexture !== materialAssets.glassBackgroundTexture) {+ materialAssets.glassEnvironmentTexture.dispose();+ }++ materialAssets.solidEnvironmentTexture.dispose();+}+`;diff --git a/packages/twenty-website-new/src/lib/halftone/utils/exporters.ts b/packages/twenty-website-new/src/lib/halftone/utils/exporters.tsnew file mode 100644index 00000000000..1898182de28--- /dev/null+++ b/packages/twenty-website-new/src/lib/halftone/utils/exporters.ts@@ -0,0 +1,1438 @@+import { normalizeExportComponentName } from '@/lib/halftone/utils/export-names';+import { VIRTUAL_RENDER_HEIGHT } from '@/lib/halftone/utils/footprint';+import { HALFTONE_FOOTPRINT_RUNTIME_SOURCE } from '@/lib/halftone/generated/footprint-runtime-source';+import {+ IMAGE_HOVER_FADE_IN,+ IMAGE_HOVER_FADE_OUT,+ IMAGE_POINTER_FOLLOW,+ IMAGE_POINTER_VELOCITY_DAMPING,+} from '@/lib/halftone/constants/halftone-image-constants';+import {+ RESET_INTERACTION_STATE_RUNTIME_SOURCE,+ SPRING_STEP_RUNTIME_SOURCE,+} from '@/lib/halftone/utils/interaction-state';+import type {+ HalftoneExportPose,+ HalftoneGeometrySpec,+ HalftoneStudioSettings,+} from '@/lib/halftone/utils/state';++import {+ emitBlurMaterials,+ emitBlurPasses,+ emitCleanup,+ emitHalftoneMaterial,+ emitPostScenes,+ emitRendererSetup,+ emitSizingHelpers,+} from './exporter-mount-fragments';+import {+ blurFragmentShader,+ createImportedGeometryRuntimeSource,+ GEOMETRY_RUNTIME_SOURCE,+ getExportedShapeLoader,+ GLASS_MATERIAL_RUNTIME_SOURCE,+ halftoneFragmentShader,+ imagePassthroughFragmentShader,+ passThroughVertexShader,+} from './exporter-shaders';+import {+ normalizeExportPose,+ normalizePreviewDistance,+} from './exporter-parsing';+import {+ DEFAULT_REACT_EXPORT_SETTINGS,+ type ExportedShapeDescriptor,+ type ReactExportOptions,+ type ReactExportSettings,+} from '../types/exporter-types';++export type {+ ExportedShapeDescriptor,+ ParsedExportedPreset,+ ReactExportOptions,+ ReactExportSettings,+} from '../types/exporter-types';+export { DEFAULT_REACT_EXPORT_SETTINGS } from '../types/exporter-types';+export {+ deriveExportComponentName,+ parseExportedPreset,+} from './exporter-parsing';++function toIllustrationRegistryKey(componentName: string) {+ return componentName.charAt(0).toLowerCase() + componentName.slice(1);+}++function toPublicAssetDestination(assetUrl: string) {+ return assetUrl.startsWith('/') ? `public${assetUrl}` : assetUrl;+}++function normalizeReactExportSettings(+ exportSettings?: Partial<ReactExportSettings>,+): ReactExportSettings {+ return {+ ...DEFAULT_REACT_EXPORT_SETTINGS,+ ...exportSettings,+ };+}++function getReactImportBlock(+ exportSettings: ReactExportSettings,+ isImageMode: boolean,+ shape: ExportedShapeDescriptor,+) {+ const imports = new Set<string>();++ imports.add("import { useEffect, useRef, type CSSProperties } from 'react';");+ imports.add("import * as THREE from 'three';");++ if (exportSettings.includeStyledMount) {+ imports.add("import { styled } from '@linaria/react';");+ }++ if (!isImageMode) {+ imports.add(+ "import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment.js';",+ );+ }++ const loader = getExportedShapeLoader(shape);++ if (shape.kind === 'imported' && loader === 'fbx') {+ imports.add(+ "import { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js';",+ );+ }++ if (shape.kind === 'imported' && loader === 'glb') {+ imports.add(+ "import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';",+ );+ imports.add(+ "import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';",+ );+ }++ return Array.from(imports).join('\n');+}++function getStandaloneThreeImports(+ isImageMode: boolean,+ shape: ExportedShapeDescriptor,+) {+ if (isImageMode) {+ return `import * as THREE from 'three';`;+ }++ const imports = [+ `import * as THREE from 'three';`,+ `import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js';`,+ ];++ const loader = getExportedShapeLoader(shape);++ if (shape.kind === 'imported' && loader === 'fbx') {+ imports.push(+ `import { FBXLoader } from 'three/addons/loaders/FBXLoader.js';`,+ );+ }++ if (shape.kind === 'imported' && loader === 'glb') {+ imports.push(+ `import { DRACOLoader } from 'three/addons/loaders/DRACOLoader.js';`,+ `import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';`,+ );+ }++ return imports.join('\n ');+}++function getTwentyReactHeaderComment(+ componentName: string,+ registryKey: string,+ assetUrl?: string,+) {+ const lines = [+ `// Suggested component destination: src/illustrations/${componentName}.tsx`,+ ];++ if (assetUrl) {+ lines.push(+ `// Suggested public asset destination: ${toPublicAssetDestination(assetUrl)}`,+ );+ }++ lines.push(+ `// illustrations-registry.tsx: import { ${componentName} } from './${componentName}';`,+ `// illustrations-registry.tsx: ${registryKey}: ${componentName},`,+ );++ return `${lines.join('\n')}\n`;+}++function createShapeDescriptor(+ shape: HalftoneGeometrySpec | undefined,+ settings: HalftoneStudioSettings,+ importedFile?: File,+ modelFilenameOverride?: string,+): ExportedShapeDescriptor {+ if (!shape) {+ return {+ filename: null,+ key: settings.shapeKey,+ kind: 'builtin',+ label: settings.shapeKey,+ loader: null,+ };+ }++ const effectiveImportedFilename =+ modelFilenameOverride ?? importedFile?.name ?? shape.filename ?? null;++ return {+ filename:+ shape.kind === 'imported'+ ? effectiveImportedFilename+ : (shape.filename ?? null),+ key: shape.key,+ kind: shape.kind,+ label:+ shape.kind === 'imported'+ ? (effectiveImportedFilename ?? shape.label)+ : shape.label,+ loader: shape.loader ?? null,+ };+}++function getModelMimeType(+ file: File,+ loader: HalftoneGeometrySpec['loader'] | null,+) {+ if (file.type) {+ return file.type;+ }++ if (loader === 'glb' || file.name.toLowerCase().endsWith('.glb')) {+ return 'model/gltf-binary';+ }++ if (loader === 'fbx' || file.name.toLowerCase().endsWith('.fbx')) {+ return 'application/octet-stream';+ }++ return 'application/octet-stream';+}++async function fileToDataUrl(+ file: File,+ loader: HalftoneGeometrySpec['loader'] | null,+) {+ const buffer = await file.arrayBuffer();+ const blob = new Blob([buffer], {+ type: getModelMimeType(file, loader),+ });++ return await new Promise<string>((resolve, reject) => {+ const reader = new FileReader();++ reader.onerror = () => {+ reject(reader.error ?? new Error(`Unable to read ${file.name}.`));+ };+ reader.onload = () => {+ if (typeof reader.result !== 'string') {+ reject(new Error(`Unable to encode ${file.name}.`));+ return;+ }++ resolve(reader.result);+ };++ reader.readAsDataURL(blob);+ });+}++function serializeRuntimeSource(+ settings: HalftoneStudioSettings,+ shape: ExportedShapeDescriptor,+ initialPose: HalftoneExportPose,+ previewDistance: number | undefined,+) {+ const isImageMode = settings.sourceMode === 'image';+ const normalizedPreviewDistance = normalizePreviewDistance(previewDistance);++ return `+const settings = ${JSON.stringify(settings, null, 2)};+const shape = ${JSON.stringify(shape, null, 2)};+const initialPose = ${JSON.stringify(initialPose, null, 2)};+const previewDistance = ${JSON.stringify(normalizedPreviewDistance)};+const VIRTUAL_RENDER_HEIGHT = ${VIRTUAL_RENDER_HEIGHT};+const passThroughVertexShader = ${JSON.stringify(passThroughVertexShader)};+const blurFragmentShader = ${JSON.stringify(blurFragmentShader)};+const halftoneFragmentShader = ${JSON.stringify(halftoneFragmentShader)};+${isImageMode ? `const imagePassthroughFragmentShader = ${JSON.stringify(imagePassthroughFragmentShader)};` : ''}++${HALFTONE_FOOTPRINT_RUNTIME_SOURCE}++${isImageMode ? '' : GEOMETRY_RUNTIME_SOURCE}++${isImageMode ? '' : createImportedGeometryRuntimeSource(shape)}++${isImageMode ? '' : GLASS_MATERIAL_RUNTIME_SOURCE}++function createRenderTarget(width, height) {+ return new THREE.WebGLRenderTarget(width, height, {+ minFilter: THREE.LinearFilter,+ magFilter: THREE.LinearFilter,+ format: THREE.RGBAFormat,+ });+}++function createInteractionState() {+ return {+ autoElapsed: initialPose.autoElapsed,+ activePointerId: null,+ dragging: false,+ hoverStrength: 0,+ mouseX: 0.5,+ mouseY: 0.5,+ pointerInside: false,+ pointerVelocityX: 0,+ pointerVelocityY: 0,+ pointerX: 0,+ pointerY: 0,+ rotateElapsed: initialPose.rotateElapsed,+ rotationX: initialPose.rotationX,+ rotationVelocityX: 0,+ rotationY: initialPose.rotationY,+ rotationVelocityY: 0,+ rotationZ: initialPose.rotationZ,+ rotationVelocityZ: 0,+ smoothedMouseX: 0.5,+ smoothedMouseY: 0.5,+ targetRotationX: initialPose.targetRotationX,+ targetRotationY: initialPose.targetRotationY,+ velocityX: 0,+ velocityY: 0,+ };+}++${+ isImageMode+ ? ''+ : `+function setPrimaryLightPosition(light, angleDegrees, height) {+ const lightAngle = (angleDegrees * Math.PI) / 180;+ light.position.set(Math.cos(lightAngle) * 5, height, Math.sin(lightAngle) * 5);+}++${SPRING_STEP_RUNTIME_SOURCE}++${RESET_INTERACTION_STATE_RUNTIME_SOURCE}++async function createGeometry(modelUrl) {+ if (shape.kind === 'imported') {+ if (!modelUrl) {+ throw new Error('No model URL was provided for ' + shape.label + '.');+ }++ return loadImportedGeometryFromUrl(modelUrl, shape.label);+ }++ return createBuiltinGeometry(shape.key);+}+`+}+`;+}++function createMountScript() {+ return `+async function mountHalftoneCanvas(options) {+ const {+ container,+ modelUrl,+ onError,+ } = options;++${emitSizingHelpers()}++ let geometry;++ try {+ geometry = await createGeometry(modelUrl);+ } catch (error) {+ onError?.(error);+ return () => {};+ }++${emitRendererSetup("settings.animation.followDragEnabled ? 'grab' : 'default'")}++ const materialAssets = await createHalftoneMaterialAssets(renderer);++ const scene3d = new THREE.Scene();+ scene3d.background = null;++ const baseCameraDistance = previewDistance;+ const camera = new THREE.PerspectiveCamera(45, getWidth() / getHeight(), 0.1, 100);+ camera.position.z = baseCameraDistance;++ const primaryLight = new THREE.DirectionalLight(0xffffff, settings.lighting.intensity);+ setPrimaryLightPosition(+ primaryLight,+ settings.lighting.angleDegrees,+ settings.lighting.height,+ );+ scene3d.add(primaryLight);++ const fillLight = new THREE.DirectionalLight(+ 0xffffff,+ settings.lighting.fillIntensity,+ );+ fillLight.position.set(-3, -1, 1);+ scene3d.add(fillLight);++ const ambientLight = new THREE.AmbientLight(+ 0xffffff,+ settings.lighting.ambientIntensity,+ );+ scene3d.add(ambientLight);++ const material = createHalftoneMaterial();+ applyHalftoneMaterialSettings(material, settings.material, materialAssets);++ const mesh = new THREE.Mesh(geometry, material);+ scene3d.add(mesh);++ const sceneTarget = createRenderTarget(getVirtualWidth(), getVirtualHeight());+ const blurTargetA = createRenderTarget(getVirtualWidth(), getVirtualHeight());+ const blurTargetB = createRenderTarget(getVirtualWidth(), getVirtualHeight());+ const fullScreenGeometry = new THREE.PlaneGeometry(2, 2);+ const orthographicCamera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);++${emitBlurMaterials()}+${emitHalftoneMaterial({ cropToBounds: 0, hoverHalftoneRadius: '0.2', hoverLightRadius: '0.2', waveSpeed: '1' })}+${emitPostScenes()}++ const updateViewportUniforms = (+ logicalWidth,+ logicalHeight,+ effectWidth,+ effectHeight,+ ) => {+ blurHorizontalMaterial.uniforms.res.value.set(effectWidth, effectHeight);+ blurVerticalMaterial.uniforms.res.value.set(effectWidth, effectHeight);+ halftoneMaterial.uniforms.effectResolution.value.set(+ effectWidth,+ effectHeight,+ );+ halftoneMaterial.uniforms.logicalResolution.value.set(+ logicalWidth,+ logicalHeight,+ );+ };++ const getHalftoneScale = (viewportWidth, viewportHeight, lookAtTarget) => {+ if (!mesh.geometry.boundingBox) {+ mesh.geometry.computeBoundingBox();+ }++ if (!mesh.geometry.boundingBox) {+ return 1;+ }++ mesh.updateMatrixWorld();+ camera.updateMatrixWorld();++ return getMeshFootprintScale({+ camera,+ localBounds: mesh.geometry.boundingBox,+ lookAtTarget,+ meshMatrixWorld: mesh.matrixWorld,+ viewportHeight,+ viewportWidth,+ });+ };++ const interaction = createInteractionState();+ const autoRotateEnabled = settings.animation.autoRotateEnabled;+ const followHoverEnabled = settings.animation.followHoverEnabled;+ const followDragEnabled = settings.animation.followDragEnabled;+ const rotateEnabled = settings.animation.rotateEnabled;++ const syncSize = () => {+ const width = getWidth();+ const height = getHeight();+ const virtualWidth = getVirtualWidth();+ const virtualHeight = getVirtualHeight();++ renderer.setSize(virtualWidth, virtualHeight, false);+ camera.aspect = width / height;+ camera.updateProjectionMatrix();+ sceneTarget.setSize(virtualWidth, virtualHeight);+ blurTargetA.setSize(virtualWidth, virtualHeight);+ blurTargetB.setSize(virtualWidth, virtualHeight);+ updateViewportUniforms(+ virtualWidth,+ virtualHeight,+ virtualWidth,+ virtualHeight,+ );+ };++ const resizeObserver = new ResizeObserver(syncSize);+ resizeObserver.observe(container);++ const updatePointerPosition = (event) => {+ const rect = canvas.getBoundingClientRect();+ const width = Math.max(rect.width, 1);+ const height = Math.max(rect.height, 1);++ interaction.mouseX = THREE.MathUtils.clamp(+ (event.clientX - rect.left) / width,+ 0,+ 1,+ );+ interaction.mouseY = THREE.MathUtils.clamp(+ (event.clientY - rect.top) / height,+ 0,+ 1,+ );+ };++ const handlePointerDown = (event) => {+ updatePointerPosition(event);+ if (!followDragEnabled) {+ return;+ }++ interaction.dragging = true;+ interaction.pointerX = event.clientX;+ interaction.pointerY = event.clientY;+ interaction.velocityX = 0;+ interaction.velocityY = 0;+ canvas.style.cursor = 'grabbing';+ };++ const handlePointerMove = (event) => {+ updatePointerPosition(event);+ };++ const handleWindowPointerMove = (event) => {+ updatePointerPosition(event);++ if (!interaction.dragging || !followDragEnabled) {+ return;+ }++ const deltaX = (event.clientX - interaction.pointerX) * settings.animation.dragSens;+ const deltaY = (event.clientY - interaction.pointerY) * settings.animation.dragSens;+ interaction.velocityX = deltaY;+ interaction.velocityY = deltaX;+ interaction.targetRotationY += deltaX;+ interaction.targetRotationX += deltaY;+ interaction.pointerX = event.clientX;+ interaction.pointerY = event.clientY;+ };++ const handlePointerLeave = () => {+ if (interaction.dragging) {+ return;+ }++ interaction.mouseX = 0.5;+ interaction.mouseY = 0.5;+ };++ const handlePointerUp = () => {+ interaction.dragging = false;+ canvas.style.cursor = followDragEnabled ? 'grab' : 'default';++ if (!settings.animation.springReturnEnabled) {+ return;+ }++ const springImpulse = Math.max(settings.animation.springStrength * 10, 1.2);+ interaction.rotationVelocityX += interaction.velocityX * springImpulse;+ interaction.rotationVelocityY += interaction.velocityY * springImpulse;+ interaction.rotationVelocityZ += interaction.velocityY * springImpulse * 0.12;+ interaction.targetRotationX = 0;+ interaction.targetRotationY = 0;+ interaction.velocityX = 0;+ interaction.velocityY = 0;+ };++ const handlePointerCancel = () => {+ interaction.dragging = false;+ interaction.velocityX = 0;+ interaction.velocityY = 0;+ canvas.style.cursor = followDragEnabled ? 'grab' : 'default';+ handlePointerLeave();+ };++ const handleWindowBlur = () => {+ handlePointerUp();+ handlePointerLeave();+ };++ canvas.addEventListener('pointermove', handlePointerMove);+ canvas.addEventListener('pointerleave', handlePointerLeave);+ canvas.addEventListener('pointercancel', handlePointerCancel);+ window.addEventListener('pointerup', handlePointerUp);+ window.addEventListener('pointermove', handleWindowPointerMove);+ window.addEventListener('blur', handleWindowBlur);+ canvas.addEventListener('pointerdown', handlePointerDown);++ const clock = new THREE.Timer();+ clock.connect(document);+ let animationFrameId = 0;++ const renderFrame = (timestamp) => {+ // boundary-allow-next-line:no-raw-animation-frame -- emitted into standalone HTML export+ animationFrameId = window.requestAnimationFrame(renderFrame);+ clock.update(timestamp);++ const delta = 1 / 60;+ const elapsedTime = initialPose.timeElapsed + clock.getElapsed();+ halftoneMaterial.uniforms.time.value = elapsedTime;++ let baseRotationX = initialPose.rotationX;+ let baseRotationY = initialPose.rotationY;+ let baseRotationZ = initialPose.rotationZ;+ let meshOffsetY = 0;+ let meshScale = 1;+ let lightAngle = settings.lighting.angleDegrees;+ let lightHeight = settings.lighting.height;++ if (autoRotateEnabled) {+ interaction.autoElapsed += delta;+ baseRotationY += interaction.autoElapsed * settings.animation.autoSpeed;+ baseRotationX += Math.sin(interaction.autoElapsed * 0.2) * settings.animation.autoWobble;+ }++ if (settings.animation.floatEnabled) {+ const floatPhase = elapsedTime * settings.animation.floatSpeed;+ const driftAmount = (settings.animation.driftAmount * Math.PI) / 180;++ meshOffsetY += Math.sin(floatPhase) * settings.animation.floatAmplitude;+ baseRotationX += Math.sin(floatPhase * 0.72) * driftAmount * 0.45;+ baseRotationZ += Math.cos(floatPhase * 0.93) * driftAmount * 0.3;+ }++ if (settings.animation.breatheEnabled) {+ meshScale *=+ 1 ++ Math.sin(elapsedTime * settings.animation.breatheSpeed) *+ settings.animation.breatheAmount;+ }++ if (rotateEnabled) {+ interaction.rotateElapsed += delta;+ const rotateProgress = settings.animation.rotatePingPong+ ? Math.sin(interaction.rotateElapsed * settings.animation.rotateSpeed) * Math.PI+ : interaction.rotateElapsed * settings.animation.rotateSpeed;++ if (settings.animation.rotatePreset === 'axis') {+ const axisDirection =+ settings.animation.rotateAxis.startsWith('-') ? -1 : 1;+ const axisProgress = rotateProgress * axisDirection;++ if (+ settings.animation.rotateAxis === 'x' ||+ settings.animation.rotateAxis === 'xy' ||+ settings.animation.rotateAxis === '-x' ||+ settings.animation.rotateAxis === '-xy'+ ) {+ baseRotationX += axisProgress;+ }++ if (+ settings.animation.rotateAxis === 'y' ||+ settings.animation.rotateAxis === 'xy' ||+ settings.animation.rotateAxis === '-y' ||+ settings.animation.rotateAxis === '-xy'+ ) {+ baseRotationY += axisProgress;+ }++ if (+ settings.animation.rotateAxis === 'z' ||+ settings.animation.rotateAxis === '-z'+ ) {+ baseRotationZ += axisProgress;+ }+ } else if (settings.animation.rotatePreset === 'lissajous') {+ baseRotationX += Math.sin(rotateProgress * 0.85) * 0.65;+ baseRotationY += Math.sin(rotateProgress * 1.35 + 0.8) * 1.05;+ baseRotationZ += Math.sin(rotateProgress * 0.55 + 1.6) * 0.32;+ } else if (settings.animation.rotatePreset === 'orbit') {+ baseRotationX += Math.sin(rotateProgress * 0.75) * 0.42;+ baseRotationY += Math.cos(rotateProgress) * 1.2;+ baseRotationZ += Math.sin(rotateProgress * 1.25) * 0.24;+ } else if (settings.animation.rotatePreset === 'tumble') {+ baseRotationX += rotateProgress * 0.55;+ baseRotationY += Math.sin(rotateProgress * 0.8) * 0.9;+ baseRotationZ += Math.cos(rotateProgress * 1.1) * 0.38;+ }+ }++ if (settings.animation.lightSweepEnabled) {+ const lightPhase = elapsedTime * settings.animation.lightSweepSpeed;+ lightAngle += Math.sin(lightPhase) * settings.animation.lightSweepRange;+ lightHeight +=+ Math.cos(lightPhase * 0.85) *+ settings.animation.lightSweepHeightRange;+ }++ let targetX = baseRotationX;+ let targetY = baseRotationY;+ let easing = 0.12;++ if (followHoverEnabled) {+ const rangeRadians = (settings.animation.hoverRange * Math.PI) / 180;++ if (+ settings.animation.hoverReturn ||+ interaction.mouseX !== 0.5 ||+ interaction.mouseY !== 0.5+ ) {+ targetX += (interaction.mouseY - 0.5) * rangeRadians;+ targetY += (interaction.mouseX - 0.5) * rangeRadians;+ }++ easing = settings.animation.hoverEase;+ }++ if (followDragEnabled) {+ if (!interaction.dragging && settings.animation.dragMomentum) {+ interaction.targetRotationX += interaction.velocityX;+ interaction.targetRotationY += interaction.velocityY;+ interaction.velocityX *= 1 - settings.animation.dragFriction;+ interaction.velocityY *= 1 - settings.animation.dragFriction;+ }++ targetX += interaction.targetRotationX;+ targetY += interaction.targetRotationY;+ easing = settings.animation.dragFriction;+ }++ if (autoRotateEnabled && !followHoverEnabled && !followDragEnabled) {+ targetX = baseRotationX + interaction.targetRotationX;+ targetY = baseRotationY + interaction.targetRotationY;++ if (interaction.dragging) {+ targetX = interaction.targetRotationX;+ targetY = interaction.targetRotationY;+ }++ easing = 0.08;+ }++ if (settings.animation.springReturnEnabled) {+ const springX = applySpringStep(+ interaction.rotationX,+ targetX,+ interaction.rotationVelocityX,+ settings.animation.springStrength,+ settings.animation.springDamping,+ );+ const springY = applySpringStep(+ interaction.rotationY,+ targetY,+ interaction.rotationVelocityY,+ settings.animation.springStrength,+ settings.animation.springDamping,+ );+ const springZ = applySpringStep(+ interaction.rotationZ,+ baseRotationZ,+ interaction.rotationVelocityZ,+ settings.animation.springStrength,+ settings.animation.springDamping,+ );++ interaction.rotationX = springX.value;+ interaction.rotationY = springY.value;+ interaction.rotationZ = springZ.value;+ interaction.rotationVelocityX = springX.velocity;+ interaction.rotationVelocityY = springY.velocity;+ interaction.rotationVelocityZ = springZ.velocity;+ } else {+ interaction.rotationX += (targetX - interaction.rotationX) * easing;+ interaction.rotationY += (targetY - interaction.rotationY) * easing;+ interaction.rotationZ +=+ (baseRotationZ - interaction.rotationZ) *+ (settings.animation.rotatePingPong ? 0.18 : 0.12);+ }++ mesh.rotation.set(+ interaction.rotationX,+ interaction.rotationY,+ interaction.rotationZ,+ );+ mesh.position.y = meshOffsetY;+ mesh.scale.setScalar(meshScale);++ if (settings.animation.cameraParallaxEnabled) {+ const cameraRange = settings.animation.cameraParallaxAmount;+ const cameraEase = settings.animation.cameraParallaxEase;+ const centeredX = (interaction.mouseX - 0.5) * 2;+ const centeredY = (0.5 - interaction.mouseY) * 2;+ const orbitYaw = centeredX * cameraRange;+ const orbitPitch = centeredY * cameraRange * 0.7;+ const horizontalRadius = Math.cos(orbitPitch) * baseCameraDistance;+ const targetCameraX = Math.sin(orbitYaw) * horizontalRadius;+ const targetCameraY =+ Math.sin(orbitPitch) * baseCameraDistance * 0.85;+ const targetCameraZ = Math.cos(orbitYaw) * horizontalRadius;++ camera.position.x += (targetCameraX - camera.position.x) * cameraEase;+ camera.position.y += (targetCameraY - camera.position.y) * cameraEase;+ camera.position.z += (targetCameraZ - camera.position.z) * cameraEase;+ } else {+ camera.position.x += (0 - camera.position.x) * 0.12;+ camera.position.y += (0 - camera.position.y) * 0.12;+ camera.position.z += (baseCameraDistance - camera.position.z) * 0.12;+ }++ const lookAtTarget = new THREE.Vector3(0, meshOffsetY * 0.2, 0);++ camera.lookAt(lookAtTarget);+ setPrimaryLightPosition(primaryLight, lightAngle, lightHeight);+ halftoneMaterial.uniforms.footprintScale.value = getHalftoneScale(+ getVirtualWidth(),+ getVirtualHeight(),+ lookAtTarget,+ );++ if (!settings.halftone.enabled) {+ renderer.setRenderTarget(null);+ renderer.clear();+ renderer.render(scene3d, camera);+ return;+ }++ renderer.setRenderTarget(sceneTarget);+ renderer.render(scene3d, camera);+${emitBlurPasses()}+ };++ renderFrame();++${emitCleanup(+ ` material.dispose();\n disposeHalftoneMaterialAssets(materialAssets);`,+ ` canvas.removeEventListener('pointermove', handlePointerMove);\n canvas.removeEventListener('pointerleave', handlePointerLeave);\n window.removeEventListener('pointerup', handlePointerUp);\n window.removeEventListener('pointermove', handleWindowPointerMove);\n canvas.removeEventListener('pointercancel', handlePointerCancel);\n window.removeEventListener('blur', handleWindowBlur);\n canvas.removeEventListener('pointerdown', handlePointerDown);`,+)}+}+`;+}++function createImageMountScript() {+ return `+async function mountHalftoneCanvas(options) {+ const {+ container,+ imageUrl,+ onError,+ } = options;++${emitSizingHelpers()}++ const image = await new Promise((resolve, reject) => {+ const img = new Image();+ img.onload = () => resolve(img);+ img.onerror = () => reject(new Error('Failed to load image'));+ img.src = imageUrl;+ });++${emitRendererSetup('default')}++ const imageTexture = new THREE.Texture(image);+ imageTexture.colorSpace = THREE.SRGBColorSpace;+ imageTexture.needsUpdate = true;++ const sceneTarget = createRenderTarget(getVirtualWidth(), getVirtualHeight());+ const blurTargetA = createRenderTarget(getVirtualWidth(), getVirtualHeight());+ const blurTargetB = createRenderTarget(getVirtualWidth(), getVirtualHeight());+ const fullScreenGeometry = new THREE.PlaneGeometry(2, 2);+ const orthographicCamera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);++ const imageMaterial = new THREE.ShaderMaterial({+ uniforms: {+ tImage: { value: imageTexture },+ imageSize: { value: new THREE.Vector2(image.width, image.height) },+ viewportSize: { value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()) },+ zoom: { value: getImagePreviewZoom(previewDistance) },+ contrast: { value: settings.halftone.imageContrast },+ },+ vertexShader: passThroughVertexShader,+ fragmentShader: imagePassthroughFragmentShader,+ });++ const imageScene = new THREE.Scene();+ imageScene.add(new THREE.Mesh(fullScreenGeometry, imageMaterial));++${emitBlurMaterials()}+${emitHalftoneMaterial({ cropToBounds: 1, hoverHalftoneRadius: 'settings.animation.hoverHalftoneRadius', hoverLightRadius: 'settings.animation.hoverLightRadius', waveSpeed: 'settings.animation.waveSpeed' })}+${emitPostScenes()}++ const updateViewportUniforms = (+ logicalWidth,+ logicalHeight,+ effectWidth,+ effectHeight,+ ) => {+ blurHorizontalMaterial.uniforms.res.value.set(effectWidth, effectHeight);+ blurVerticalMaterial.uniforms.res.value.set(effectWidth, effectHeight);+ halftoneMaterial.uniforms.effectResolution.value.set(+ effectWidth,+ effectHeight,+ );+ halftoneMaterial.uniforms.logicalResolution.value.set(+ logicalWidth,+ logicalHeight,+ );+ imageMaterial.uniforms.viewportSize.value.set(logicalWidth, logicalHeight);+ };++ const getHalftoneScale = () =>+ getImageFootprintScale({+ imageHeight: image.height,+ imageWidth: image.width,+ previewDistance,+ viewportHeight: getVirtualHeight(),+ viewportWidth: getVirtualWidth(),+ });++ const interaction = createInteractionState();+ const imagePointerFollow = ${IMAGE_POINTER_FOLLOW};+ const imagePointerVelocityDamping = ${IMAGE_POINTER_VELOCITY_DAMPING};+ const imageHoverFadeIn = ${IMAGE_HOVER_FADE_IN};+ const imageHoverFadeOut = ${IMAGE_HOVER_FADE_OUT};++ const syncSize = () => {+ const virtualWidth = getVirtualWidth();+ const virtualHeight = getVirtualHeight();++ renderer.setSize(virtualWidth, virtualHeight, false);+ sceneTarget.setSize(virtualWidth, virtualHeight);+ blurTargetA.setSize(virtualWidth, virtualHeight);+ blurTargetB.setSize(virtualWidth, virtualHeight);+ updateViewportUniforms(+ virtualWidth,+ virtualHeight,+ virtualWidth,+ virtualHeight,+ );+ };++ const resizeObserver = new ResizeObserver(syncSize);+ resizeObserver.observe(container);++ const updatePointerPosition = (event, options = {}) => {+ const rect = canvas.getBoundingClientRect();+ const width = Math.max(rect.width, 1);+ const height = Math.max(rect.height, 1);++ const nextMouseX = THREE.MathUtils.clamp(+ (event.clientX - rect.left) / width, 0, 1,+ );+ const nextMouseY = THREE.MathUtils.clamp(+ (event.clientY - rect.top) / height, 0, 1,+ );++ const deltaX = nextMouseX - interaction.mouseX;+ const deltaY = nextMouseY - interaction.mouseY;++ interaction.mouseX = nextMouseX;+ interaction.mouseY = nextMouseY;+ interaction.pointerInside =+ interaction.dragging ||+ (event.clientX >= rect.left &&+ event.clientX <= rect.right &&+ event.clientY >= rect.top &&+ event.clientY <= rect.bottom);++ if (options.resetVelocity) {+ interaction.pointerVelocityX = 0;+ interaction.pointerVelocityY = 0;+ interaction.smoothedMouseX = nextMouseX;+ interaction.smoothedMouseY = nextMouseY;+ } else {+ interaction.pointerVelocityX = deltaX;+ interaction.pointerVelocityY = deltaY;+ }++ return { deltaX, deltaY };+ };++ const releasePointerCapture = (pointerId) => {+ if (pointerId === null) {+ return;+ }++ if (!canvas.hasPointerCapture(pointerId)) {+ return;+ }++ try {+ canvas.releasePointerCapture(pointerId);+ } catch (error) {+ void error;+ }+ };++ const handlePointerDown = (event) => {+ updatePointerPosition(event, { resetVelocity: true });+ interaction.pointerX = event.clientX;+ interaction.pointerY = event.clientY;+ };++ const handlePointerMove = (event) => {+ const resetVelocity = !interaction.pointerInside && !interaction.dragging;+ updatePointerPosition(+ event,+ resetVelocity ? { resetVelocity: true } : undefined,+ );+ };++ const handlePointerLeave = () => {+ if (interaction.dragging) {+ return;+ }++ interaction.pointerInside = false;+ interaction.pointerVelocityX = 0;+ interaction.pointerVelocityY = 0;+ };++ const handlePointerUp = (event) => {+ updatePointerPosition(event, { resetVelocity: true });+ releasePointerCapture(interaction.activePointerId);+ interaction.activePointerId = null;+ interaction.dragging = false;+ const rect = canvas.getBoundingClientRect();+ interaction.pointerInside =+ event.clientX >= rect.left &&+ event.clientX <= rect.right &&+ event.clientY >= rect.top &&+ event.clientY <= rect.bottom;+ };++ const handlePointerCancel = () => {+ releasePointerCapture(interaction.activePointerId);+ interaction.activePointerId = null;+ interaction.dragging = false;+ interaction.pointerInside = false;+ interaction.pointerVelocityX = 0;+ interaction.pointerVelocityY = 0;+ };++ const handleWindowBlur = () => {+ handlePointerCancel();+ };++ canvas.addEventListener('pointermove', handlePointerMove);+ canvas.addEventListener('pointerleave', handlePointerLeave);+ canvas.addEventListener('pointerup', handlePointerUp);+ canvas.addEventListener('pointercancel', handlePointerCancel);+ window.addEventListener('blur', handleWindowBlur);+ canvas.addEventListener('pointerdown', handlePointerDown);++ const clock = new THREE.Timer();+ clock.connect(document);+ let animationFrameId = 0;++ const renderFrame = (timestamp) => {+ // boundary-allow-next-line:no-raw-animation-frame -- emitted into standalone HTML export+ animationFrameId = window.requestAnimationFrame(renderFrame);+ clock.update(timestamp);++ const deltaSeconds = clock.getDelta();+ const elapsedTime = clock.getElapsed();+ halftoneMaterial.uniforms.time.value = elapsedTime;+ const hoverEasing =+ 1 -+ Math.exp(+ -deltaSeconds *+ (interaction.pointerInside ? imageHoverFadeIn : imageHoverFadeOut),+ );+ interaction.hoverStrength +=+ ((interaction.pointerInside ? 1 : 0) - interaction.hoverStrength) *+ hoverEasing;++ interaction.smoothedMouseX +=+ (interaction.mouseX - interaction.smoothedMouseX) * imagePointerFollow;+ interaction.smoothedMouseY +=+ (interaction.mouseY - interaction.smoothedMouseY) * imagePointerFollow;+ interaction.pointerVelocityX *= imagePointerVelocityDamping;+ interaction.pointerVelocityY *= imagePointerVelocityDamping;++ halftoneMaterial.uniforms.interactionUv.value.set(+ interaction.smoothedMouseX,+ 1 - interaction.smoothedMouseY,+ );+ halftoneMaterial.uniforms.interactionVelocity.value.set(+ interaction.pointerVelocityX * getVirtualWidth(),+ -interaction.pointerVelocityY * getVirtualHeight(),+ );+ halftoneMaterial.uniforms.dragOffset.value.set(0, 0);+ halftoneMaterial.uniforms.hoverHalftoneActive.value =+ settings.animation.hoverHalftoneEnabled ? interaction.hoverStrength : 0;+ halftoneMaterial.uniforms.hoverHalftonePowerShift.value =+ settings.animation.hoverHalftoneEnabled+ ? settings.animation.hoverHalftonePowerShift+ : 0;+ halftoneMaterial.uniforms.hoverHalftoneRadius.value =+ settings.animation.hoverHalftoneRadius;+ halftoneMaterial.uniforms.hoverHalftoneWidthShift.value =+ settings.animation.hoverHalftoneEnabled+ ? settings.animation.hoverHalftoneWidthShift+ : 0;+ halftoneMaterial.uniforms.hoverLightStrength.value =+ settings.animation.hoverLightEnabled+ ? settings.animation.hoverLightIntensity * interaction.hoverStrength+ : 0;+ halftoneMaterial.uniforms.hoverLightRadius.value =+ settings.animation.hoverLightRadius;+ halftoneMaterial.uniforms.hoverFlowStrength.value = 0;+ halftoneMaterial.uniforms.hoverFlowRadius.value = 0.18;+ halftoneMaterial.uniforms.dragFlowStrength.value = 0;+ imageMaterial.uniforms.zoom.value = getImagePreviewZoom(previewDistance);+ halftoneMaterial.uniforms.footprintScale.value = getHalftoneScale();++ renderer.setRenderTarget(sceneTarget);+ renderer.render(imageScene, orthographicCamera);+${emitBlurPasses()}+ };++ renderFrame();++${emitCleanup(+ ` imageMaterial.dispose();\n imageTexture.dispose();`,+ ` canvas.removeEventListener('pointermove', handlePointerMove);\n canvas.removeEventListener('pointerleave', handlePointerLeave);\n canvas.removeEventListener('pointerup', handlePointerUp);\n canvas.removeEventListener('pointercancel', handlePointerCancel);\n window.removeEventListener('blur', handleWindowBlur);\n canvas.removeEventListener('pointerdown', handlePointerDown);`,+)}+}+`;+}++export function getExportedModelFile(+ shape: HalftoneGeometrySpec | undefined,+ importedFile: File | undefined,+) {+ if (!shape || shape.kind !== 'imported' || !importedFile) {+ return null;+ }++ return importedFile;+}++export function generateReactComponent(+ settings: HalftoneStudioSettings,+ selectedShape: HalftoneGeometrySpec | undefined,+ componentName = 'HalftoneDashes',+ options: ReactExportOptions = {},+) {+ const isImageMode = settings.sourceMode === 'image';+ const exportSettings = normalizeReactExportSettings(options.exportSettings);+ const shape = createShapeDescriptor(+ selectedShape,+ settings,+ options.importedFile,+ options.modelFilenameOverride,+ );+ const pose = normalizeExportPose(options.initialPose);+ const normalizedComponentName = normalizeExportComponentName(componentName);+ const background = options.background ?? 'transparent';+ const assetUrl =+ exportSettings.includePublicAssetUrl && options.assetUrl+ ? options.assetUrl+ : null;+ const defaultModelFilename =+ options.modelFilenameOverride ?? shape.filename ?? 'model.glb';+ const defaultImageFilename = options.imageFilename ?? 'image.png';+ const defaultModelUrl = assetUrl ?? `./${defaultModelFilename}`;+ const defaultImageUrl = assetUrl ?? `./${defaultImageFilename}`;+ const importBlock = getReactImportBlock(exportSettings, isImageMode, shape);+ const headerComment = exportSettings.includeRegistryComment+ ? getTwentyReactHeaderComment(+ normalizedComponentName,+ toIllustrationRegistryKey(normalizedComponentName),+ isImageMode || shape.kind === 'imported'+ ? (assetUrl ?? undefined)+ : undefined,+ )+ : '';+ const mountScript = isImageMode+ ? createImageMountScript()+ : createMountScript();+ const serializedRuntime = serializeRuntimeSource(+ settings,+ shape,+ pose,+ options.previewDistance,+ );+ const generatedBanner = exportSettings.includeTsNoCheck+ ? `/**+ * @generated halftone-studio+ * This file is autogenerated by the in-app halftone studio+ * (src/app/halftone). Do NOT hand-edit — regenerate the export+ * from the studio if the visual or runtime behaviour needs to change.+ *+ * Type checking is disabled at the file level because the serialized+ * Three.js runtime below contains thousands of lines of legacy+ * implicitly-typed code that the generator does not annotate. See+ * src/app/halftone/_lib/exporters.ts for the generator source.+ */+// @ts-nocheck`+ : null;+ const directiveLines = [+ generatedBanner,+ exportSettings.includeUseClientDirective ? "'use client';" : null,+ ]+ .filter((line): line is string => line !== null)+ .join('\n');+ const mountStyleBlock = exportSettings.includeStyledMount+ ? `const StyledVisualMount = styled.div\`+ background: ${background};+ display: block;+ height: 100%;+ min-width: 0;+ width: 100%;+\`;+`+ : '';+ const assetPropName = isImageMode+ ? 'imageUrl'+ : shape.kind === 'imported'+ ? 'modelUrl'+ : null;+ const assetPropDefaultValue =+ assetPropName === 'imageUrl'+ ? defaultImageUrl+ : assetPropName === 'modelUrl'+ ? defaultModelUrl+ : null;+ const propsTypeBlock = assetPropName+ ? `type ${normalizedComponentName}Props = {\n ${assetPropName}?: string;\n style?: CSSProperties;\n};`+ : `type ${normalizedComponentName}Props = {\n style?: CSSProperties;\n};`;+ const propsSignature = assetPropName+ ? `{\n ${assetPropName} = ${JSON.stringify(assetPropDefaultValue)},\n style,\n}: ${normalizedComponentName}Props`+ : `{\n style,\n}: ${normalizedComponentName}Props`;+ const mountOptionsBlock = assetPropName+ ? `const unmount = mountHalftoneCanvas({\n container,\n ${assetPropName},\n onError: (error) => {\n console.error(error);\n },\n });`+ : `const unmount = mountHalftoneCanvas({\n container,\n onError: (error) => {\n console.error(error);\n },\n });`;+ const effectDependencies = assetPropName ? `[${assetPropName}]` : '[]';+ const returnBlock = exportSettings.includeStyledMount+ ? `return <StyledVisualMount aria-hidden ref={mountReference} style={style} />;`+ : `return (+ <div+ ref={mountReference}+ style={{+ background: ${JSON.stringify(background)},+ height: '100%',+ width: '100%',+ ...style,+ }}+ />+ );`;+ const componentFunctionBlock = exportSettings.includeNamedAndDefaultExport+ ? `export function ${normalizedComponentName}(${propsSignature}) {+ const mountReference = useRef<HTMLDivElement>(null);++ useEffect(() => {+ const container = mountReference.current;++ if (!container) {+ return;+ }++ ${mountOptionsBlock}++ return () => {+ void Promise.resolve(unmount).then((dispose) => dispose?.());+ };+ }, ${effectDependencies});++ ${returnBlock}+}++export default ${normalizedComponentName};`+ : `export default function ${normalizedComponentName}(${propsSignature}) {+ const mountReference = useRef<HTMLDivElement>(null);++ useEffect(() => {+ const container = mountReference.current;++ if (!container) {+ return;+ }++ ${mountOptionsBlock}++ return () => {+ void Promise.resolve(unmount).then((dispose) => dispose?.());+ };+ }, ${effectDependencies});++ ${returnBlock}+}`;++ return `${directiveLines ? `${directiveLines}\n\n` : ''}${importBlock}++${headerComment}${serializedRuntime}++${mountScript}++${mountStyleBlock ? `${mountStyleBlock}\n` : ''}${propsTypeBlock}++${componentFunctionBlock}+`;+}++export async function generateStandaloneHtml(+ settings: HalftoneStudioSettings,+ selectedShape: HalftoneGeometrySpec | undefined,+ componentName = 'HalftoneDashes',+ options: ReactExportOptions = {},+) {+ const isImageMode = settings.sourceMode === 'image';+ const shape = createShapeDescriptor(+ selectedShape,+ settings,+ options.importedFile,+ options.modelFilenameOverride,+ );+ const pose = normalizeExportPose(options.initialPose);+ const normalizedComponentName = normalizeExportComponentName(componentName);+ const defaultImageUrl = options.imageFilename ?? 'image.png';+ const embeddedImportedModelUrl =+ !isImageMode && shape.kind === 'imported' && options.importedFile+ ? await fileToDataUrl(options.importedFile, shape.loader)+ : null;+ const defaultModelUrl =+ embeddedImportedModelUrl ??+ options.modelFilenameOverride ??+ shape.filename ??+ 'model.glb';+ const background = options.background ?? 'transparent';++ const threeImports = getStandaloneThreeImports(isImageMode, shape);++ const mountScript = isImageMode+ ? createImageMountScript()+ : createMountScript();++ const mountCall = isImageMode+ ? `mountHalftoneCanvas({+ container,+ imageUrl: ${JSON.stringify(`./${defaultImageUrl}`)},+ onError: (error) => {+ console.error(error);+ },+ });`+ : `mountHalftoneCanvas({+ container,+ modelUrl: ${JSON.stringify(`./${defaultModelUrl}`)},+ onError: (error) => {+ console.error(error);+ },+ });`;++ const captionText = isImageMode+ ? `Place <code>${defaultImageUrl}</code> next to this HTML file.`+ : `Standalone export of the current halftone scene.+ ${+ shape.kind === 'imported'+ ? embeddedImportedModelUrl+ ? 'The uploaded model is embedded directly in this HTML file.'+ : `Place <code>${defaultModelUrl}</code> next to this HTML file to keep the current uploaded shape.`+ : ''+ }`;++ return `<!DOCTYPE html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />+ <title>${normalizedComponentName}</title>+ <link rel="icon" href="data:," />+ <style>+ * {+ box-sizing: border-box;+ margin: 0;+ padding: 0;+ }++ html,+ body {+ height: 100%;+ }++ body {+ background: ${background};+ color: rgba(255, 255, 255, 0.72);+ font-family: system-ui, sans-serif;+ overflow: hidden;+ }++ #app {+ height: 100%;+ width: 100%;+ }++ #canvas-root {+ height: 100%;+ width: 100%;+ }++ .caption {+ background: rgba(18, 18, 22, 0.72);+ backdrop-filter: blur(16px);+ border: 1px solid rgba(255, 255, 255, 0.08);+ border-radius: 12px;+ bottom: 20px;+ color: rgba(255, 255, 255, 0.8);+ font-size: 12px;+ left: 20px;+ line-height: 1.5;+ max-width: min(320px, calc(100vw - 40px));+ padding: 12px 14px;+ position: fixed;+ }++ .caption code {+ color: #9d90fa;+ font-family: ui-monospace, monospace;+ }+ </style>+ </head>+ <body>+ <div id="app">+ <div id="canvas-root"></div>+ <div class="caption">+ ${captionText}+ </div>+ </div>++ <script type="importmap">+ {+ "imports": {+ "three": "https://unpkg.com/[email protected]/build/three.module.js",+ "three/addons/": "https://unpkg.com/[email protected]/examples/jsm/"+ }+ }+ </script>+ <script type="module">+ ${threeImports}++ ${serializeRuntimeSource(settings, shape, pose, options.previewDistance)}++ ${mountScript}++ const container = document.getElementById('canvas-root');++ ${mountCall}+ </script>+ </body>+</html>`;+}diff --git a/packages/twenty-website-new/src/lib/halftone/footprint.ts b/packages/twenty-website-new/src/lib/halftone/utils/footprint.tssimilarity index 53%rename from packages/twenty-website-new/src/lib/halftone/footprint.tsrename to packages/twenty-website-new/src/lib/halftone/utils/footprint.tsindex c5ac2f4e510..debc85963e7 100644--- a/packages/twenty-website-new/src/lib/halftone/footprint.ts+++ b/packages/twenty-website-new/src/lib/halftone/utils/footprint.ts@@ -33,7 +33,7 @@ export interface MeshFootprintScaleArgs extends ProjectedBoundsArgs {export const VIRTUAL_RENDER_HEIGHT = 768;export const REFERENCE_PREVIEW_DISTANCE = 4;-const MIN_FOOTPRINT_SCALE = 0.001;+export const MIN_FOOTPRINT_SCALE = 0.001;function clampRectToViewport(rect: HalftoneRect,@@ -277,244 +277,3 @@ export function getMeshFootprintScale({return getFootprintScaleFromRects(currentRect, referenceRect);}--export const HALFTONE_FOOTPRINT_RUNTIME_SOURCE = String.raw`-const REFERENCE_PREVIEW_DISTANCE = ${REFERENCE_PREVIEW_DISTANCE};-const MIN_FOOTPRINT_SCALE = ${MIN_FOOTPRINT_SCALE};--function clampRectToViewport(rect, viewportWidth, viewportHeight) {- const minX = Math.max(rect.x, 0);- const minY = Math.max(rect.y, 0);- const maxX = Math.min(rect.x + rect.width, viewportWidth);- const maxY = Math.min(rect.y + rect.height, viewportHeight);-- if (maxX <= minX || maxY <= minY) {- return null;- }-- return {- x: minX,- y: minY,- width: maxX - minX,- height: maxY - minY,- };-}--function getRectArea(rect) {- if (!rect) {- return 0;- }-- return Math.max(rect.width, 0) * Math.max(rect.height, 0);-}--function createBox3Corners(bounds) {- const { min, max } = bounds;-- return [- new THREE.Vector3(min.x, min.y, min.z),- new THREE.Vector3(min.x, min.y, max.z),- new THREE.Vector3(min.x, max.y, min.z),- new THREE.Vector3(min.x, max.y, max.z),- new THREE.Vector3(max.x, min.y, min.z),- new THREE.Vector3(max.x, min.y, max.z),- new THREE.Vector3(max.x, max.y, min.z),- new THREE.Vector3(max.x, max.y, max.z),- ];-}--function getImagePreviewZoom(previewDistance) {- return REFERENCE_PREVIEW_DISTANCE / Math.max(previewDistance, 0.001);-}--function getContainedImageRect({- imageFit = 'contain',- imageHeight,- imageWidth,- viewportHeight,- viewportWidth,- zoom,-}) {- if (- imageWidth <= 0 ||- imageHeight <= 0 ||- viewportWidth <= 0 ||- viewportHeight <= 0- ) {- return null;- }-- const imageAspect = imageWidth / imageHeight;- const viewAspect = viewportWidth / viewportHeight;-- let fittedWidth = viewportWidth;- let fittedHeight = viewportHeight;-- if (imageAspect > viewAspect) {- if (imageFit === 'cover') {- fittedWidth = viewportHeight * imageAspect;- } else {- fittedHeight = viewportWidth / imageAspect;- }- } else {- if (imageFit === 'cover') {- fittedHeight = viewportWidth / imageAspect;- } else {- fittedWidth = viewportHeight * imageAspect;- }- }-- const scaledWidth = fittedWidth * zoom;- const scaledHeight = fittedHeight * zoom;-- return clampRectToViewport(- {- x: (viewportWidth - scaledWidth) * 0.5,- y: (viewportHeight - scaledHeight) * 0.5,- width: scaledWidth,- height: scaledHeight,- },- viewportWidth,- viewportHeight,- );-}--function getFootprintScaleFromRects(currentRect, referenceRect) {- const currentArea = getRectArea(currentRect);- const referenceArea = getRectArea(referenceRect);-- if (currentArea <= 0 || referenceArea <= 0) {- return 1;- }-- return Math.max(- Math.sqrt(currentArea / referenceArea),- MIN_FOOTPRINT_SCALE,- );-}--function getImageFootprintScale({- imageFit = 'contain',- imageHeight,- imageWidth,- previewDistance,- viewportHeight,- viewportWidth,-}) {- const currentRect = getContainedImageRect({- imageFit,- imageHeight,- imageWidth,- viewportHeight,- viewportWidth,- zoom: getImagePreviewZoom(previewDistance),- });- const referenceRect = getContainedImageRect({- imageFit,- imageHeight,- imageWidth,- viewportHeight,- viewportWidth,- zoom: 1,- });-- return getFootprintScaleFromRects(currentRect, referenceRect);-}--function projectBox3ToViewport({- camera,- localBounds,- meshMatrixWorld,- viewportHeight,- viewportWidth,-}) {- if (- localBounds.isEmpty() ||- viewportWidth <= 0 ||- viewportHeight <= 0- ) {- return null;- }-- let minX = Number.POSITIVE_INFINITY;- let minY = Number.POSITIVE_INFINITY;- let maxX = Number.NEGATIVE_INFINITY;- let maxY = Number.NEGATIVE_INFINITY;- let hasProjectedCorner = false;-- for (const corner of createBox3Corners(localBounds)) {- corner.applyMatrix4(meshMatrixWorld).project(camera);-- if (- !Number.isFinite(corner.x) ||- !Number.isFinite(corner.y) ||- !Number.isFinite(corner.z)- ) {- continue;- }-- hasProjectedCorner = true;-- const x = (corner.x * 0.5 + 0.5) * viewportWidth;- const y = (1 - (corner.y * 0.5 + 0.5)) * viewportHeight;-- minX = Math.min(minX, x);- minY = Math.min(minY, y);- maxX = Math.max(maxX, x);- maxY = Math.max(maxY, y);- }-- if (!hasProjectedCorner) {- return null;- }-- return clampRectToViewport(- {- x: minX,- y: minY,- width: maxX - minX,- height: maxY - minY,- },- viewportWidth,- viewportHeight,- );-}--function getMeshFootprintScale({- camera,- localBounds,- lookAtTarget,- meshMatrixWorld,- viewportHeight,- viewportWidth,-}) {- const currentRect = projectBox3ToViewport({- camera,- localBounds,- meshMatrixWorld,- viewportHeight,- viewportWidth,- });- const referenceCamera = camera.clone();- const currentOffset = referenceCamera.position.clone().sub(lookAtTarget);- const referenceOffset =- currentOffset.lengthSq() > 0- ? currentOffset.setLength(REFERENCE_PREVIEW_DISTANCE)- : new THREE.Vector3(0, 0, REFERENCE_PREVIEW_DISTANCE);-- referenceCamera.position.copy(lookAtTarget).add(referenceOffset);- referenceCamera.lookAt(lookAtTarget);- referenceCamera.updateProjectionMatrix();- referenceCamera.updateMatrixWorld(true);-- const referenceRect = projectBox3ToViewport({- camera: referenceCamera,- localBounds,- meshMatrixWorld,- viewportHeight,- viewportWidth,- });-- return getFootprintScaleFromRects(currentRect, referenceRect);-}-`;diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_lib/formatters.ts b/packages/twenty-website-new/src/lib/halftone/utils/formatters.tssimilarity index 74%rename from packages/twenty-website-new/src/app/[locale]/halftone/_lib/formatters.tsrename to packages/twenty-website-new/src/lib/halftone/utils/formatters.tsindex 005de236898..e5d6dd42658 100644--- a/packages/twenty-website-new/src/app/[locale]/halftone/_lib/formatters.ts+++ b/packages/twenty-website-new/src/lib/halftone/utils/formatters.ts@@ -84,29 +84,3 @@ export function formatAnimationName(return activeModes.length > 0 ? activeModes.join(' + ') : 'still';}--export function getBackgroundTone(background: {- color: string;- transparent: boolean;-}) {- if (background.transparent) {- return 'light';- }-- const normalized = background.color.replace('#', '');- const expanded =- normalized.length === 3- ? normalized- .split('')- .map((character) => `${character}${character}`)- .join('')- : normalized;-- const value = Number.parseInt(expanded, 16);- const red = (value >> 16) & 255;- const green = (value >> 8) & 255;- const blue = value & 255;- const luminance = (0.299 * red + 0.587 * green + 0.114 * blue) / 255;-- return luminance < 0.5 ? 'dark' : 'light';-}diff --git a/packages/twenty-website-new/src/lib/halftone/utils/geometry-builtins.ts b/packages/twenty-website-new/src/lib/halftone/utils/geometry-builtins.tsnew file mode 100644index 00000000000..cf9a49d3ea8--- /dev/null+++ b/packages/twenty-website-new/src/lib/halftone/utils/geometry-builtins.ts@@ -0,0 +1,392 @@+import * as THREE from 'three';+import { mergeGeometries } from './geometry-loaders';++function makePolarShape(+ radiusFunction: (angle: number) => number,+ segments = 320,+) {+ const shape = new THREE.Shape();++ for (let segmentIndex = 0; segmentIndex <= segments; segmentIndex += 1) {+ const angle = (segmentIndex / segments) * Math.PI * 2;+ const radius = radiusFunction(angle);+ const x = Math.cos(angle) * radius;+ const y = Math.sin(angle) * radius;++ if (segmentIndex === 0) {+ shape.moveTo(x, y);+ } else {+ shape.lineTo(x, y);+ }+ }++ return shape;+}++function makeReliefGeometry(+ shape: THREE.Shape,+ options: {+ depth?: number;+ bevelSize?: number;+ bevelThickness?: number;+ bevelSegments?: number;+ waves?: number;+ waveDepth?: number;+ } = {},+) {+ const {+ bevelSegments = 8,+ bevelSize = 0.08,+ bevelThickness = 0.1,+ depth = 0.58,+ waveDepth = 0.016,+ waves = 8,+ } = options;++ const geometry = new THREE.ExtrudeGeometry(shape, {+ depth,+ steps: 2,+ bevelEnabled: true,+ bevelThickness,+ bevelSize,+ bevelSegments,+ curveSegments: 96,+ });++ geometry.center();++ const position = geometry.attributes.position;+ let maxRadius = 0;++ for (let vertexIndex = 0; vertexIndex < position.count; vertexIndex += 1) {+ maxRadius = Math.max(+ maxRadius,+ Math.hypot(position.getX(vertexIndex), position.getY(vertexIndex)),+ );+ }++ const fullDepth = depth + bevelThickness * 2;++ for (let vertexIndex = 0; vertexIndex < position.count; vertexIndex += 1) {+ const x = position.getX(vertexIndex);+ const y = position.getY(vertexIndex);+ const z = position.getZ(vertexIndex);+ const radius = Math.hypot(x, y) / maxRadius;+ const angle = Math.atan2(y, x);+ const faceAmount = Math.min(1, Math.abs(z) / (fullDepth * 0.5));+ const rimLift = Math.exp(-Math.pow((radius - 0.84) / 0.12, 2));+ const innerDish = Math.exp(-Math.pow((radius - 0.42) / 0.2, 2));+ const wave =+ Math.cos(angle * waves) *+ Math.exp(-Math.pow((radius - 0.72) / 0.16, 2)) *+ waveDepth;+ const relief = faceAmount * (0.14 * rimLift - 0.055 * innerDish + wave);++ position.setZ(vertexIndex, z + (z >= 0 ? 1 : -1) * relief);+ }++ position.needsUpdate = true;+ geometry.computeVertexNormals();+ geometry.computeBoundingBox();+ geometry.computeBoundingSphere();++ return geometry;+}++function makeArrowTarget() {+ const targetParts: THREE.BufferGeometry[] = [];+ const arrowParts: THREE.BufferGeometry[] = [];+ const baseRadius = 1.35;+ const baseDepth = 0.32;+ const bevel = 0.12;+ const points: THREE.Vector2[] = [];+ const segments = 16;++ points.push(new THREE.Vector2(0, -baseDepth / 2));+ points.push(new THREE.Vector2(baseRadius - bevel, -baseDepth / 2));++ for (let segmentIndex = 0; segmentIndex <= segments; segmentIndex += 1) {+ const angle = Math.PI / 2 + (segmentIndex / segments) * (Math.PI / 2);+ points.push(+ new THREE.Vector2(+ baseRadius - bevel + Math.cos(angle) * bevel,+ -baseDepth / 2 + bevel + Math.sin(angle) * bevel,+ ),+ );+ }++ points.push(new THREE.Vector2(baseRadius, baseDepth / 2 - bevel));++ for (let segmentIndex = 0; segmentIndex <= segments; segmentIndex += 1) {+ const angle = (segmentIndex / segments) * (Math.PI / 2);+ points.push(+ new THREE.Vector2(+ baseRadius - bevel + Math.cos(angle) * bevel,+ baseDepth / 2 - bevel + Math.sin(angle) * bevel,+ ),+ );+ }++ points.push(new THREE.Vector2(0, baseDepth / 2));++ const disc = new THREE.LatheGeometry(points, 64);+ disc.applyMatrix4(new THREE.Matrix4().makeRotationX(Math.PI / 2));+ targetParts.push(disc);++ for (const radius of [0.45, 0.85, 1.22]) {+ const ring = new THREE.TorusGeometry(radius, 0.14, 16, 64);+ ring.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0, 0, baseDepth / 2 + 0.04),+ );+ targetParts.push(ring);+ }++ const bump = new THREE.SphereGeometry(+ 0.32,+ 32,+ 24,+ 0,+ Math.PI * 2,+ 0,+ Math.PI / 2,+ );+ bump.applyMatrix4(new THREE.Matrix4().makeRotationX(-Math.PI / 2));+ bump.applyMatrix4(new THREE.Matrix4().makeTranslation(0, 0, baseDepth / 2));+ targetParts.push(bump);++ const shaftLength = 1.5;+ const shaftRadius = 0.05;+ const shaft = new THREE.CylinderGeometry(+ shaftRadius,+ shaftRadius,+ shaftLength,+ 10,+ 1,+ );+ shaft.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0, shaftLength / 2, 0),+ );+ arrowParts.push(shaft);++ const head = new THREE.ConeGeometry(0.12, 0.35, 10);+ head.applyMatrix4(new THREE.Matrix4().makeTranslation(0, -0.15, 0));+ arrowParts.push(head);++ for (let finIndex = 0; finIndex < 3; finIndex += 1) {+ const finShape = new THREE.Shape();+ finShape.moveTo(0, 0);+ finShape.lineTo(0.22, 0.25);+ finShape.lineTo(0, 0.5);+ finShape.lineTo(0, 0);++ const finGeometry = new THREE.ExtrudeGeometry(finShape, {+ depth: 0.012,+ bevelEnabled: false,+ });++ finGeometry.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0.05, 0, -0.006),+ );+ finGeometry.applyMatrix4(+ new THREE.Matrix4().makeRotationY((finIndex * Math.PI * 2) / 3),+ );+ finGeometry.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0, shaftLength - 0.45, 0),+ );+ arrowParts.push(finGeometry);+ }++ const nock = new THREE.SphereGeometry(0.065, 8, 8);+ nock.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0, shaftLength + 0.03, 0),+ );+ arrowParts.push(nock);++ const aim = new THREE.Matrix4().makeRotationX(Math.PI / 2.15);+ const tilt = new THREE.Matrix4().makeRotationZ(Math.PI / 5);+ const shift = new THREE.Matrix4().makeTranslation(0.15, 0.15, 0.12);++ for (const geometry of arrowParts) {+ geometry.applyMatrix4(aim);+ geometry.applyMatrix4(tilt);+ geometry.applyMatrix4(shift);+ }++ const merged = mergeGeometries([...targetParts, ...arrowParts]);+ merged.computeVertexNormals();+ merged.computeBoundingSphere();++ return merged;+}++function makeDollarCoin() {+ const parts: THREE.BufferGeometry[] = [];+ const baseRadius = 1.3;+ const baseDepth = 0.45;+ const bevel = 0.18;+ const points: THREE.Vector2[] = [];+ const segments = 20;++ points.push(new THREE.Vector2(0, -baseDepth / 2));+ points.push(new THREE.Vector2(baseRadius - bevel, -baseDepth / 2));++ for (let segmentIndex = 0; segmentIndex <= segments; segmentIndex += 1) {+ const angle = -Math.PI / 2 + (segmentIndex / segments) * Math.PI;+ points.push(+ new THREE.Vector2(+ baseRadius - bevel + Math.cos(angle) * bevel,+ Math.sin(angle) * (baseDepth / 2),+ ),+ );+ }++ points.push(new THREE.Vector2(baseRadius - bevel, baseDepth / 2));+ points.push(new THREE.Vector2(0, baseDepth / 2));++ const disc = new THREE.LatheGeometry(points, 64);+ disc.applyMatrix4(new THREE.Matrix4().makeRotationX(Math.PI / 2));+ parts.push(disc);++ const frontRim = new THREE.TorusGeometry(baseRadius - 0.22, 0.05, 12, 64);+ frontRim.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0, 0, baseDepth / 2 - 0.01),+ );+ parts.push(frontRim);++ const backRim = new THREE.TorusGeometry(baseRadius - 0.22, 0.05, 12, 64);+ backRim.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0, 0, -(baseDepth / 2 - 0.01)),+ );+ parts.push(backRim);++ const createDollarSign = () => {+ const geometries: THREE.BufferGeometry[] = [];+ const tubeRadius = 0.1;+ const curveRadius = 0.28;+ const verticalOffset = 0.22;++ const bar = new THREE.CylinderGeometry(0.05, 0.05, 1.3, 12);+ geometries.push(bar);++ const topArc = new THREE.TorusGeometry(+ curveRadius,+ tubeRadius,+ 16,+ 32,+ Math.PI,+ );+ topArc.applyMatrix4(new THREE.Matrix4().makeRotationZ(Math.PI / 2));+ topArc.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0.05, verticalOffset, 0),+ );+ geometries.push(topArc);++ const bottomArc = new THREE.TorusGeometry(+ curveRadius,+ tubeRadius,+ 16,+ 32,+ Math.PI,+ );+ bottomArc.applyMatrix4(new THREE.Matrix4().makeRotationZ(-Math.PI / 2));+ bottomArc.applyMatrix4(+ new THREE.Matrix4().makeTranslation(-0.05, -verticalOffset, 0),+ );+ geometries.push(bottomArc);++ const topSerif = new THREE.CylinderGeometry(+ tubeRadius,+ tubeRadius,+ 0.22,+ 12,+ );+ topSerif.applyMatrix4(new THREE.Matrix4().makeRotationZ(Math.PI / 2));+ topSerif.applyMatrix4(+ new THREE.Matrix4().makeTranslation(+ 0.16,+ verticalOffset + curveRadius,+ 0,+ ),+ );+ geometries.push(topSerif);++ const bottomSerif = new THREE.CylinderGeometry(+ tubeRadius,+ tubeRadius,+ 0.22,+ 12,+ );+ bottomSerif.applyMatrix4(new THREE.Matrix4().makeRotationZ(Math.PI / 2));+ bottomSerif.applyMatrix4(+ new THREE.Matrix4().makeTranslation(+ -0.16,+ -verticalOffset - curveRadius,+ 0,+ ),+ );+ geometries.push(bottomSerif);++ const diagonalLength = Math.sqrt(0.1 * 0.1 + (verticalOffset * 2) ** 2);+ const diagonalAngle = Math.atan2(verticalOffset * 2, 0.1);+ const diagonal = new THREE.CylinderGeometry(+ tubeRadius,+ tubeRadius,+ diagonalLength + 0.12,+ 12,+ );+ diagonal.applyMatrix4(+ new THREE.Matrix4().makeRotationZ(diagonalAngle - Math.PI / 2),+ );+ geometries.push(diagonal);++ return geometries;+ };++ for (const geometry of createDollarSign()) {+ geometry.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0, 0, baseDepth / 2 + 0.01),+ );+ parts.push(geometry);+ }++ for (const geometry of createDollarSign()) {+ geometry.applyMatrix4(new THREE.Matrix4().makeRotationY(Math.PI));+ geometry.applyMatrix4(+ new THREE.Matrix4().makeTranslation(0, 0, -(baseDepth / 2 + 0.01)),+ );+ parts.push(geometry);+ }++ const merged = mergeGeometries(parts);+ merged.computeVertexNormals();+ merged.computeBoundingSphere();++ return merged;+}++export const BUILTIN_GEOMETRIES: Record<string, () => THREE.BufferGeometry> = {+ torusKnot: () => new THREE.TorusKnotGeometry(1, 0.35, 200, 32),+ sphere: () => new THREE.SphereGeometry(1.4, 64, 64),+ torus: () => new THREE.TorusGeometry(1, 0.45, 64, 100),+ icosahedron: () => new THREE.IcosahedronGeometry(1.4, 4),+ box: () => new THREE.BoxGeometry(2.1, 2.1, 2.1, 6, 6, 6),+ cone: () => new THREE.ConeGeometry(1.2, 2.4, 64, 10),+ cylinder: () => new THREE.CylinderGeometry(1, 1, 2.3, 64, 10),+ octahedron: () => new THREE.OctahedronGeometry(1.5, 2),+ dodecahedron: () => new THREE.DodecahedronGeometry(1.35, 1),+ tetrahedron: () => new THREE.TetrahedronGeometry(1.7, 1),+ sunCoin: () =>+ makeReliefGeometry(+ makePolarShape(+ (angle) => 1 + 0.17 * Math.pow(0.5 + 0.5 * Math.cos(angle * 12), 1.5),+ ),+ { depth: 0.62, waves: 12, waveDepth: 0.018 },+ ),+ lotusCoin: () =>+ makeReliefGeometry(+ makePolarShape((angle) => 0.88 + 0.3 * Math.pow(Math.sin(angle * 4), 2)),+ { depth: 0.64, waves: 8, waveDepth: 0.014 },+ ),+ arrowTarget: () => makeArrowTarget(),+ dollarCoin: () => makeDollarCoin(),+};diff --git a/packages/twenty-website-new/src/lib/halftone/utils/geometry-cache.ts b/packages/twenty-website-new/src/lib/halftone/utils/geometry-cache.tsnew file mode 100644index 00000000000..6763cbf7e8d--- /dev/null+++ b/packages/twenty-website-new/src/lib/halftone/utils/geometry-cache.ts@@ -0,0 +1,94 @@+import type * as THREE from 'three';+import {+ loadImportedGeometry,+ type HalftoneModelLoader,+} from './geometry-loaders';+import { BUILTIN_GEOMETRIES } from './geometry-builtins';++interface HalftoneGeometrySpec {+ key: string;+ label: string;+ kind: 'builtin' | 'imported';+ loader?: HalftoneModelLoader;+ filename?: string;+ description?: string;+ extensions?: readonly string[];+ userProvided?: boolean;+}++export type GeometryCacheEntry =+ | THREE.BufferGeometry+ | Promise<THREE.BufferGeometry>;++async function createGeometry(+ spec: HalftoneGeometrySpec,+ file: File | undefined,+) {+ if (spec.kind === 'imported') {+ if (!file || !spec.loader) {+ throw new Error(`No file is available for ${spec.label}.`);+ }++ return loadImportedGeometry(+ spec.loader as HalftoneModelLoader,+ file,+ spec.label,+ );+ }++ const factory = BUILTIN_GEOMETRIES[spec.key];++ if (!factory) {+ throw new Error(`Unsupported geometry: ${spec.key}.`);+ }++ return factory();+}++export function createFallbackGeometry() {+ return BUILTIN_GEOMETRIES.torusKnot();+}++export async function getGeometryForSpec(+ spec: HalftoneGeometrySpec,+ file: File | undefined,+ cache: Map<string, GeometryCacheEntry>,+) {+ const cached = cache.get(spec.key);++ if (cached) {+ return cached instanceof Promise ? cached : Promise.resolve(cached);+ }++ const created = createGeometry(spec, file);++ if (created instanceof Promise) {+ const pending = created+ .then((geometry) => {+ cache.set(spec.key, geometry);+ return geometry;+ })+ .catch((error) => {+ cache.delete(spec.key);+ throw error;+ });++ cache.set(spec.key, pending);++ return pending;+ }++ cache.set(spec.key, created);++ return Promise.resolve(created);+}++export function disposeGeometryCache(cache: Map<string, GeometryCacheEntry>) {+ for (const value of cache.values()) {+ if (!(value instanceof Promise)) {+ value.dispose();+ }+ }++ cache.clear();+}diff --git a/packages/twenty-website-new/src/lib/halftone/utils/geometry-loaders.ts b/packages/twenty-website-new/src/lib/halftone/utils/geometry-loaders.tsnew file mode 100644index 00000000000..84c330e24da--- /dev/null+++ b/packages/twenty-website-new/src/lib/halftone/utils/geometry-loaders.ts@@ -0,0 +1,364 @@+import * as THREE from 'three';+import { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js';+import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';+import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';+import { DRACO_DECODER_PATH } from '@/lib/visual-runtime/utils/draco-decoder-path';++export type HalftoneModelLoader = 'fbx' | 'glb';++export type ImportedGeometryNormalizationOptions = {+ postRotateZ?: number;+ scaleTarget?: number;+ useLegacyNormalization?: boolean;+};++const LEGACY_IMPORTED_GEOMETRY_SCALE_TARGET = 2.75;++const EMPTY_TEXTURE_DATA_URL =+ 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO8B7Q8AAAAASUVORK5CYII=';++export function mergeGeometries(geometries: THREE.BufferGeometry[]) {+ if (geometries.length === 1) {+ return geometries[0];+ }++ let totalVertices = 0;+ let totalIndices = 0;+ let hasUv = false;++ const geometryInfos = geometries.map((geometry) => {+ const position = geometry.attributes.position;+ const normal = geometry.attributes.normal;+ const uv = geometry.attributes.uv ?? null;+ const index = geometry.index;+ const indexCount = index ? index.count : position.count;++ totalVertices += position.count;+ totalIndices += indexCount;+ hasUv = hasUv || uv !== null;++ return {+ index,+ indexCount,+ normal,+ position,+ uv,+ vertexCount: position.count,+ };+ });++ const positions = new Float32Array(totalVertices * 3);+ const normals = new Float32Array(totalVertices * 3);+ const uvs = hasUv ? new Float32Array(totalVertices * 2) : null;+ const indices = new Uint32Array(totalIndices);++ let vertexOffset = 0;+ let indexOffset = 0;++ for (const geometryInfo of geometryInfos) {+ for (+ let vertexIndex = 0;+ vertexIndex < geometryInfo.vertexCount;+ vertexIndex += 1+ ) {+ const positionOffset = (vertexOffset + vertexIndex) * 3;+ positions[positionOffset] = geometryInfo.position.getX(vertexIndex);+ positions[positionOffset + 1] = geometryInfo.position.getY(vertexIndex);+ positions[positionOffset + 2] = geometryInfo.position.getZ(vertexIndex);+ normals[positionOffset] = geometryInfo.normal.getX(vertexIndex);+ normals[positionOffset + 1] = geometryInfo.normal.getY(vertexIndex);+ normals[positionOffset + 2] = geometryInfo.normal.getZ(vertexIndex);++ if (uvs !== null) {+ const uvOffset = (vertexOffset + vertexIndex) * 2;+ uvs[uvOffset] = geometryInfo.uv?.getX(vertexIndex) ?? 0;+ uvs[uvOffset + 1] = geometryInfo.uv?.getY(vertexIndex) ?? 0;+ }+ }++ if (geometryInfo.index) {+ for (+ let localIndex = 0;+ localIndex < geometryInfo.indexCount;+ localIndex += 1+ ) {+ indices[indexOffset + localIndex] =+ geometryInfo.index.getX(localIndex) + vertexOffset;+ }+ } else {+ for (+ let localIndex = 0;+ localIndex < geometryInfo.indexCount;+ localIndex += 1+ ) {+ indices[indexOffset + localIndex] = localIndex + vertexOffset;+ }+ }++ vertexOffset += geometryInfo.vertexCount;+ indexOffset += geometryInfo.indexCount;+ }++ const merged = new THREE.BufferGeometry();+ merged.setAttribute('position', new THREE.BufferAttribute(positions, 3));+ merged.setAttribute('normal', new THREE.BufferAttribute(normals, 3));++ if (uvs !== null) {+ merged.setAttribute('uv', new THREE.BufferAttribute(uvs, 2));+ }++ merged.setIndex(new THREE.BufferAttribute(indices, 1));++ return merged;+}++function normalizeImportedGeometry(+ geometry: THREE.BufferGeometry,+ options: ImportedGeometryNormalizationOptions = {},+) {+ const {+ postRotateZ = 0,+ scaleTarget,+ useLegacyNormalization = false,+ } = options;++ geometry.computeBoundingBox();++ let boundingBox = geometry.boundingBox;+ let center = new THREE.Vector3();+ let size = new THREE.Vector3();++ boundingBox?.getCenter(center);+ boundingBox?.getSize(size);+ geometry.translate(-center.x, -center.y, -center.z);++ if (!useLegacyNormalization) {+ const dimensions = [size.x, size.y, size.z];+ const thinnestAxis = dimensions.indexOf(Math.min(...dimensions));++ if (thinnestAxis === 0) {+ geometry.applyMatrix4(new THREE.Matrix4().makeRotationY(Math.PI / 2));+ } else if (thinnestAxis === 1) {+ geometry.applyMatrix4(new THREE.Matrix4().makeRotationX(Math.PI / 2));+ }+ }++ geometry.computeBoundingBox();+ geometry.computeBoundingSphere();++ const radius = geometry.boundingSphere?.radius || 1;+ const scale = useLegacyNormalization+ ? (scaleTarget ?? LEGACY_IMPORTED_GEOMETRY_SCALE_TARGET) /+ Math.max(size.x, size.y, size.z, 0.001)+ : (scaleTarget ?? 1.6) / radius;+ geometry.scale(scale, scale, scale);++ geometry.computeBoundingBox();+ boundingBox = geometry.boundingBox;+ center = new THREE.Vector3();+ boundingBox?.getCenter(center);+ geometry.translate(-center.x, -center.y, -center.z);++ if (postRotateZ !== 0) {+ geometry.rotateZ(postRotateZ);+ }++ geometry.computeVertexNormals();+ geometry.computeBoundingBox();+ geometry.computeBoundingSphere();++ return geometry;+}++function createLoadingManager() {+ const loadingManager = new THREE.LoadingManager();+ loadingManager.setURLModifier((url) =>+ /\.(png|jpe?g|webp|gif|bmp)$/i.test(url) ? EMPTY_TEXTURE_DATA_URL : url,+ );++ return loadingManager;+}++function extractMergedGeometry(+ root: THREE.Object3D,+ emptyMessage: string,+ geometryOptions?: ImportedGeometryNormalizationOptions,+) {+ root.updateMatrixWorld(true);++ const geometries: THREE.BufferGeometry[] = [];++ root.traverse((object) => {+ if (!(object instanceof THREE.Mesh) || !object.geometry) {+ return;+ }++ const geometry = object.geometry.clone();++ if (!geometry.attributes.normal) {+ geometry.computeVertexNormals();+ }++ geometry.applyMatrix4(object.matrixWorld);+ geometries.push(geometry);+ });++ if (geometries.length === 0) {+ throw new Error(emptyMessage);+ }++ return normalizeImportedGeometry(+ mergeGeometries(geometries),+ geometryOptions,+ );+}++function parseFbxGeometry(+ buffer: ArrayBuffer,+ resourcePath: string,+ label: string,+ geometryOptions?: ImportedGeometryNormalizationOptions,+) {+ const originalWarn = console.warn;++ console.warn = (...args: unknown[]) => {+ if (typeof args[0] === 'string' && args[0].startsWith('THREE.FBXLoader:')) {+ return;+ }++ originalWarn(...args);+ };++ try {+ const root = new FBXLoader(createLoadingManager()).parse(+ buffer,+ resourcePath,+ );++ return extractMergedGeometry(+ root,+ `${label} did not contain any mesh geometry.`,+ geometryOptions,+ );+ } finally {+ console.warn = originalWarn;+ }+}++function parseGlbGeometry(+ buffer: ArrayBuffer,+ resourcePath: string,+ label: string,+ geometryOptions?: ImportedGeometryNormalizationOptions,+) {+ const dracoLoader = new DRACOLoader();+ dracoLoader.setDecoderPath(DRACO_DECODER_PATH);++ const gltfLoader = new GLTFLoader(createLoadingManager());+ gltfLoader.setDRACOLoader(dracoLoader);++ return new Promise<THREE.BufferGeometry>((resolve, reject) => {+ gltfLoader.parse(+ buffer,+ resourcePath,+ (gltf) => {+ try {+ resolve(+ extractMergedGeometry(+ gltf.scene,+ `${label} did not contain any mesh geometry.`,+ geometryOptions,+ ),+ );+ } catch (error) {+ reject(error);+ }+ },+ reject,+ );+ }).finally(() => {+ dracoLoader.dispose();+ });+}++export async function loadImportedGeometry(+ loader: HalftoneModelLoader,+ file: File,+ label: string,+) {+ const buffer = await file.arrayBuffer();++ if (loader === 'fbx') {+ return parseFbxGeometry(buffer, '', label);+ }++ return parseGlbGeometry(buffer, '', label);+}++export async function loadImportedGeometryFromUrl(+ loader: HalftoneModelLoader,+ modelUrl: string,+ label: string,+ geometryOptions?: ImportedGeometryNormalizationOptions,+) {+ const cacheKey = getImportedGeometryCacheKey({+ geometryOptions,+ loader,+ modelUrl,+ });+ const cachedGeometry = importedGeometryCache.get(cacheKey);++ if (cachedGeometry) {+ return (await cachedGeometry).clone();+ }++ const geometryPromise = (async () => {+ const response = await fetch(modelUrl);++ if (!response.ok) {+ throw new Error(`Unable to load ${label} from ${modelUrl}.`);+ }++ const buffer = await response.arrayBuffer();++ if (loader === 'fbx') {+ return parseFbxGeometry(buffer, '', label, geometryOptions);+ }++ return parseGlbGeometry(buffer, '', label, geometryOptions);+ })();+ importedGeometryCache.set(cacheKey, geometryPromise);++ try {+ const geometry = await geometryPromise;++ importedGeometryCache.set(cacheKey, geometry);++ return geometry.clone();+ } catch (error) {+ importedGeometryCache.delete(cacheKey);+ throw error;+ }+}++type GeometryUrlCacheEntry =+ | THREE.BufferGeometry+ | Promise<THREE.BufferGeometry>;++const importedGeometryCache = new Map<string, GeometryUrlCacheEntry>();++function getImportedGeometryCacheKey({+ geometryOptions,+ loader,+ modelUrl,+}: {+ geometryOptions?: ImportedGeometryNormalizationOptions;+ loader: HalftoneModelLoader;+ modelUrl: string;+}) {+ return JSON.stringify({+ geometryOptions: geometryOptions ?? null,+ loader,+ modelUrl,+ });+}diff --git a/packages/twenty-website-new/src/lib/halftone/utils/geometry-registry.ts b/packages/twenty-website-new/src/lib/halftone/utils/geometry-registry.tsnew file mode 100644index 00000000000..4877ce2a5c7--- /dev/null+++ b/packages/twenty-website-new/src/lib/halftone/utils/geometry-registry.ts@@ -0,0 +1,11 @@+export {+ type ImportedGeometryNormalizationOptions,+ loadImportedGeometryFromUrl,+} from './geometry-loaders';++export {+ type GeometryCacheEntry,+ createFallbackGeometry,+ disposeGeometryCache,+ getGeometryForSpec,+} from './geometry-cache';diff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_lib/glassEnvironmentData.ts b/packages/twenty-website-new/src/lib/halftone/utils/glass-environment-data.tssimilarity index 100%rename from packages/twenty-website-new/src/app/[locale]/halftone/_lib/glassEnvironmentData.tsrename to packages/twenty-website-new/src/lib/halftone/utils/glass-environment-data.tsdiff --git a/packages/twenty-website-new/src/app/[locale]/halftone/_lib/imageSvgExport.ts b/packages/twenty-website-new/src/lib/halftone/utils/image-svg-export.tssimilarity index 98%rename from packages/twenty-website-new/src/app/[locale]/halftone/_lib/imageSvgExport.tsrename to packages/twenty-website-new/src/lib/halftone/utils/image-svg-export.tsindex 6018c1674d8..e578d4ba62e 100644--- a/packages/twenty-website-new/src/app/[locale]/halftone/_lib/imageSvgExport.ts+++ b/packages/twenty-website-new/src/lib/halftone/utils/image-svg-export.ts@@ -2,8 +2,8 @@ import {getContainedImageRect,getImageFootprintScale,getImagePreviewZoom,-} from '@/lib/halftone/footprint';-import type { HalftoneStudioSettings } from '@/lib/halftone/state';+} from '@/lib/halftone/utils/footprint';+import type { HalftoneStudioSettings } from '@/lib/halftone/utils/state';type PixelBounds = {maxX: number;diff --git a/packages/twenty-website-new/src/lib/halftone/interaction-state.ts b/packages/twenty-website-new/src/lib/halftone/utils/interaction-state.tssimilarity index 74%rename from packages/twenty-website-new/src/lib/halftone/interaction-state.tsrename to packages/twenty-website-new/src/lib/halftone/utils/interaction-state.tsindex f65a72097c2..e1d9812f5b2 100644--- a/packages/twenty-website-new/src/lib/halftone/interaction-state.ts+++ b/packages/twenty-website-new/src/lib/halftone/utils/interaction-state.ts@@ -1,7 +1,7 @@import type {HalftoneExportPose,HalftoneStudioSettings,-} from '@/lib/halftone/state';+} from '@/lib/halftone/utils/state';export type HalftoneInteractionState = {activePointerId: number | null;@@ -106,3 +106,26 @@ export const resetHalftoneInteractionState = (interactionState.autoElapsed = 0;}};++// Runtime JS string equivalents for standalone exported HTML.+// Used by the exporter to avoid maintaining parallel inline copies.+export const SPRING_STEP_RUNTIME_SOURCE = `+function applySpringStep(current, target, velocity, strength, damping) {+ const nextVelocity = (velocity + (target - current) * strength) * damping;+ return { value: current + nextVelocity, velocity: nextVelocity };+}`;++export const RESET_INTERACTION_STATE_RUNTIME_SOURCE = `+function resetInteractionState(interactionState) {+ interactionState.dragging = false;+ interactionState.mouseX = 0.5;+ interactionState.mouseY = 0.5;+ interactionState.targetRotationX = 0;+ interactionState.targetRotationY = 0;+ interactionState.velocityX = 0;+ interactionState.velocityY = 0;+ interactionState.rotationVelocityX = 0;+ interactionState.rotationVelocityY = 0;+ interactionState.rotationVelocityZ = 0;+ interactionState.autoElapsed = 0;+}`;diff --git a/packages/twenty-website-new/src/lib/halftone/materials.ts b/packages/twenty-website-new/src/lib/halftone/utils/materials.tssimilarity index 99%rename from packages/twenty-website-new/src/lib/halftone/materials.tsrename to packages/twenty-website-new/src/lib/halftone/utils/materials.tsindex 7f37cc1c9b5..12564d709d9 100644--- a/packages/twenty-website-new/src/lib/halftone/materials.ts+++ b/packages/twenty-website-new/src/lib/halftone/utils/materials.ts@@ -1,4 +1,4 @@-import type { HalftoneMaterialSettings } from '@/lib/halftone/state';+import type { HalftoneMaterialSettings } from '@/lib/halftone/utils/state';import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment.js';import * as THREE from 'three';diff --git a/packages/twenty-website-new/src/lib/halftone/state.ts b/packages/twenty-website-new/src/lib/halftone/utils/state.tssimilarity index 99%rename from packages/twenty-website-new/src/lib/halftone/state.tsrename to packages/twenty-website-new/src/lib/halftone/utils/state.tsindex 79c1b0a0e47..9bb48d09bd8 100644--- a/packages/twenty-website-new/src/lib/halftone/state.ts+++ b/packages/twenty-website-new/src/lib/halftone/utils/state.ts@@ -193,7 +193,7 @@ function upsertGeometrySpec();}-export const DEFAULT_GEOMETRY_SPECS: HalftoneGeometrySpec[] = [+const DEFAULT_GEOMETRY_SPECS: HalftoneGeometrySpec[] = [{ key: 'torusKnot', label: 'Torus Knot', kind: 'builtin' },{ key: 'sphere', label: 'Sphere', kind: 'builtin' },{ key: 'torus', label: 'Torus', kind: 'builtin' },@@ -450,7 +450,7 @@ export function isRoundedBandHalftoneSettings(value: unknown): value is Omit<);}-export function getDefaultHalftoneSettings(sourceMode: HalftoneSourceMode) {+function getDefaultHalftoneSettings(sourceMode: HalftoneSourceMode) {return sourceMode === 'image'? DEFAULT_IMAGE_HALFTONE_SETTINGS: DEFAULT_SHAPE_HALFTONE_SETTINGS;diff --git a/packages/twenty-website-new/src/lib/i18n/__tests__/detect-locale.test.ts b/packages/twenty-website-new/src/lib/i18n/__tests__/detect-locale.test.tsindex 7224111afad..8af84c0c4c3 100644--- a/packages/twenty-website-new/src/lib/i18n/__tests__/detect-locale.test.ts+++ b/packages/twenty-website-new/src/lib/i18n/__tests__/detect-locale.test.ts@@ -1,4 +1,4 @@-import { detectLocale } from '../detect-locale';+import { detectLocale } from '../utils/detect-locale';describe('detectLocale', () => {it('returns the cookie value when it is a published website locale', () => {diff --git a/packages/twenty-website-new/src/lib/i18n/__tests__/locale-display-names.test.ts b/packages/twenty-website-new/src/lib/i18n/__tests__/locale-display-names.test.tsindex fb82bb06123..a78daea203b 100644--- a/packages/twenty-website-new/src/lib/i18n/__tests__/locale-display-names.test.ts+++ b/packages/twenty-website-new/src/lib/i18n/__tests__/locale-display-names.test.ts@@ -1,7 +1,7 @@import {getEnglishLocaleName,getNativeLocaleName,-} from '../locale-display-names';+} from '../utils/locale-display-names';describe('getNativeLocaleName', () => {it('returns the language name in its own language with the first character upper-cased', () => {diff --git a/packages/twenty-website-new/src/lib/i18n/__tests__/localize-href.test.ts b/packages/twenty-website-new/src/lib/i18n/__tests__/localize-href.test.tsindex 3dcbd49a2d7..52aae589a61 100644--- a/packages/twenty-website-new/src/lib/i18n/__tests__/localize-href.test.ts+++ b/packages/twenty-website-new/src/lib/i18n/__tests__/localize-href.test.ts@@ -1,4 +1,4 @@-import { localizeHref, stripLocale } from '../localize-href';+import { localizeHref, stripLocale } from '../utils/localize-href';describe('localizeHref', () => {it('does not emit locale prefixes for locales the website does not publish yet', () => {@@ -34,16 +34,12 @@ describe('localizeHref', () => {});it('strips a redundant /en prefix when targeting the default locale', () => {- expect(localizeHref('en', '/en/resources/why-twenty')).toBe(- '/resources/why-twenty',- );+ expect(localizeHref('en', '/en/why-twenty')).toBe('/why-twenty');expect(localizeHref('en', '/en')).toBe('/');});it('strips an /en-prefixed path when targeting an unpublished locale', () => {- expect(localizeHref('de-DE', '/en/resources/why-twenty')).toBe(- '/resources/why-twenty',- );+ expect(localizeHref('de-DE', '/en/why-twenty')).toBe('/why-twenty');expect(localizeHref('de-DE', '/en')).toBe('/');});@@ -85,9 +81,7 @@ describe('localizeHref', () => {describe('stripLocale', () => {it('removes a published-locale URL-segment prefix from the pathname', () => {- expect(stripLocale('/en/resources/why-twenty')).toBe(- '/resources/why-twenty',- );+ expect(stripLocale('/en/why-twenty')).toBe('/why-twenty');expect(stripLocale('/fr/customers/9dots')).toBe('/customers/9dots');});@@ -97,7 +91,7 @@ describe('stripLocale', () => {});it('returns the pathname unchanged when no published locale prefix is present', () => {- expect(stripLocale('/resources/why-twenty')).toBe('/resources/why-twenty');+ expect(stripLocale('/why-twenty')).toBe('/why-twenty');expect(stripLocale('/')).toBe('/');expect(stripLocale('/fr-FR/foo')).toBe('/fr-FR/foo');expect(stripLocale('/zh-CN')).toBe('/zh-CN');diff --git a/packages/twenty-website-new/src/lib/i18n/I18nProvider.tsx b/packages/twenty-website-new/src/lib/i18n/components/I18nProvider.tsxsimilarity index 100%rename from packages/twenty-website-new/src/lib/i18n/I18nProvider.tsxrename to packages/twenty-website-new/src/lib/i18n/components/I18nProvider.tsxdiff --git a/packages/twenty-website-new/src/lib/i18n/LocaleContext.tsx b/packages/twenty-website-new/src/lib/i18n/components/LocaleContext.tsxsimilarity index 100%rename from packages/twenty-website-new/src/lib/i18n/LocaleContext.tsxrename to packages/twenty-website-new/src/lib/i18n/components/LocaleContext.tsxdiff --git a/packages/twenty-website-new/src/lib/i18n/LocalizedLink.tsx b/packages/twenty-website-new/src/lib/i18n/components/LocalizedLink.tsxsimilarity index 80%rename from packages/twenty-website-new/src/lib/i18n/LocalizedLink.tsxrename to packages/twenty-website-new/src/lib/i18n/components/LocalizedLink.tsxindex 8d52b46a7e4..aa774988b1f 100644--- a/packages/twenty-website-new/src/lib/i18n/LocalizedLink.tsx+++ b/packages/twenty-website-new/src/lib/i18n/components/LocalizedLink.tsx@@ -3,8 +3,8 @@import Link from 'next/link';import { type ComponentProps } from 'react';-import { localizeHref } from './localize-href';-import { useLocale } from './use-locale';+import { localizeHref } from '../utils/localize-href';+import { useLocale } from '../hooks/use-locale';type LocalizedLinkProps = Omit<ComponentProps<typeof Link>, 'href'> & {href: string;diff --git a/packages/twenty-website-new/src/lib/i18n/LocalizedLinkButton.tsx b/packages/twenty-website-new/src/lib/i18n/components/LocalizedLinkButton.tsxsimilarity index 87%rename from packages/twenty-website-new/src/lib/i18n/LocalizedLinkButton.tsxrename to packages/twenty-website-new/src/lib/i18n/components/LocalizedLinkButton.tsxindex 22f1753df95..fa52857a55b 100644--- a/packages/twenty-website-new/src/lib/i18n/LocalizedLinkButton.tsx+++ b/packages/twenty-website-new/src/lib/i18n/components/LocalizedLinkButton.tsx@@ -5,7 +5,7 @@ import {type BaseButtonProps,buttonBaseStyles,} from '@/design-system/components/Button/BaseButton';-import type { LinkButtonType } from '@/design-system/components/Button/types/LinkButtonType';+import type { LinkButtonType } from '@/design-system/components/Button/types/link-button-type';import { styled } from '@linaria/react';import { LocalizedLink } from './LocalizedLink';@@ -14,8 +14,7 @@ const StyledButtonLink = styled(LocalizedLink)`${buttonBaseStyles}`;-export type LocalizedLinkButtonProps = Omit<BaseButtonProps, 'label'> &- LinkButtonType;+type LocalizedLinkButtonProps = Omit<BaseButtonProps, 'label'> & LinkButtonType;export function LocalizedLinkButton({color,diff --git a/packages/twenty-website-new/src/lib/i18n/create-message-descriptor-renderer.ts b/packages/twenty-website-new/src/lib/i18n/create-message-descriptor-renderer.tsdeleted file mode 100644index 3f10838227c..00000000000--- a/packages/twenty-website-new/src/lib/i18n/create-message-descriptor-renderer.ts+++ /dev/null@@ -1,6 +0,0 @@-import type { I18n, MessageDescriptor } from '@lingui/core';--export const createMessageDescriptorRenderer =- (i18n: I18n) =>- (descriptor: MessageDescriptor): string =>- i18n._(descriptor);diff --git a/packages/twenty-website-new/src/lib/i18n/use-locale.ts b/packages/twenty-website-new/src/lib/i18n/hooks/use-locale.tssimilarity index 86%rename from packages/twenty-website-new/src/lib/i18n/use-locale.tsrename to packages/twenty-website-new/src/lib/i18n/hooks/use-locale.tsindex 81d16034a7c..8b900302930 100644--- a/packages/twenty-website-new/src/lib/i18n/use-locale.ts+++ b/packages/twenty-website-new/src/lib/i18n/hooks/use-locale.ts@@ -3,7 +3,7 @@import { useContext } from 'react';import { type AppLocale } from 'twenty-shared/translations';-import { LocaleContext } from './LocaleContext';+import { LocaleContext } from '../components/LocaleContext';export const useLocale = (): AppLocale => {const locale = useContext(LocaleContext);diff --git a/packages/twenty-website-new/src/lib/i18n/use-unlocalized-pathname.ts b/packages/twenty-website-new/src/lib/i18n/hooks/use-unlocalized-pathname.tssimilarity index 78%rename from packages/twenty-website-new/src/lib/i18n/use-unlocalized-pathname.tsrename to packages/twenty-website-new/src/lib/i18n/hooks/use-unlocalized-pathname.tsindex a1a27d3afb4..363da47d41a 100644--- a/packages/twenty-website-new/src/lib/i18n/use-unlocalized-pathname.ts+++ b/packages/twenty-website-new/src/lib/i18n/hooks/use-unlocalized-pathname.ts@@ -2,7 +2,7 @@import { usePathname } from 'next/navigation';-import { stripLocale } from './localize-href';+import { stripLocale } from '../utils/localize-href';export const useUnlocalizedPathname = (): string => {const pathname = usePathname();diff --git a/packages/twenty-website-new/src/lib/i18n/index.ts b/packages/twenty-website-new/src/lib/i18n/index.tsindex b6143107400..f0495947374 100644--- a/packages/twenty-website-new/src/lib/i18n/index.ts+++ b/packages/twenty-website-new/src/lib/i18n/index.ts@@ -7,25 +7,24 @@ export {PUBLIC_APP_LOCALE_LIST,WEBSITE_LOCALE_LIST,isPublicAppLocale,-} from './app-locale-set';-export { createI18nInstance } from './create-i18n-instance';-export { createMessageDescriptorRenderer } from './create-message-descriptor-renderer';-export { detectLocale, LOCALE_COOKIE_NAME } from './detect-locale';-export { getRouteI18n, type LocaleRouteParams } from './get-route-i18n';-export { I18nProvider } from './I18nProvider';-export { LocaleContext } from './LocaleContext';-export { LocalizedLink } from './LocalizedLink';-export { LocalizedLinkButton } from './LocalizedLinkButton';-export { localizeHref, stripLocale } from './localize-href';+} from './utils/app-locale-set';+export { createI18nInstance } from './utils/create-i18n-instance';+export { getServerI18n } from './utils/get-server-i18n';+export { detectLocale, LOCALE_COOKIE_NAME } from './utils/detect-locale';+export { getRouteI18n, type LocaleRouteParams } from './utils/get-route-i18n';+export { I18nProvider } from './components/I18nProvider';+export { LocaleContext } from './components/LocaleContext';+export { LocalizedLink } from './components/LocalizedLink';+export { LocalizedLinkButton } from './components/LocalizedLinkButton';+export { localizeHref, stripLocale } from './utils/localize-href';export {getEnglishLocaleName,getNativeLocaleName,-} from './locale-display-names';-export { resolveLocaleParam } from './resolve-locale-param';+} from './utils/locale-display-names';+export { resolveLocaleParam } from './utils/resolve-locale-param';export {LOCALE_BY_URL_SEGMENT,localeToUrlSegment,-} from './website-locale-segments';-export { useLocale } from './use-locale';-export { useRenderMessage } from './use-render-message';-export { useUnlocalizedPathname } from './use-unlocalized-pathname';+} from './utils/website-locale-segments';+export { useLocale } from './hooks/use-locale';+export { useUnlocalizedPathname } from './hooks/use-unlocalized-pathname';diff --git a/packages/twenty-website-new/src/lib/i18n/message-body.ts b/packages/twenty-website-new/src/lib/i18n/message-body.tsdeleted file mode 100644index f85cbc18173..00000000000--- a/packages/twenty-website-new/src/lib/i18n/message-body.ts+++ /dev/null@@ -1,5 +0,0 @@-import type { MessageDescriptor } from '@lingui/core';--export type MessageBody = {- text: MessageDescriptor;-};diff --git a/packages/twenty-website-new/src/lib/i18n/message-eyebrow.ts b/packages/twenty-website-new/src/lib/i18n/message-eyebrow.tsdeleted file mode 100644index b21c7b546fc..00000000000--- a/packages/twenty-website-new/src/lib/i18n/message-eyebrow.ts+++ /dev/null@@ -1,5 +0,0 @@-import type { MessageHeadingSegment } from './message-heading-segment';--export type MessageEyebrow = {- heading: MessageHeadingSegment;-};diff --git a/packages/twenty-website-new/src/lib/i18n/message-heading-segment.ts b/packages/twenty-website-new/src/lib/i18n/message-heading-segment.tsdeleted file mode 100644index 670d4a3d706..00000000000--- a/packages/twenty-website-new/src/lib/i18n/message-heading-segment.ts+++ /dev/null@@ -1,9 +0,0 @@-import type { MessageDescriptor } from '@lingui/core';--export type MessageHeadingSegment = {- fontFamily: 'sans' | 'serif' | 'mono';- text: MessageDescriptor;- fontWeight?: 'light' | 'regular' | 'medium';- newLine?: boolean;- lineBreakBefore?: boolean;-};diff --git a/packages/twenty-website-new/src/lib/i18n/use-render-message.ts b/packages/twenty-website-new/src/lib/i18n/use-render-message.tsdeleted file mode 100644index a51c5de4242..00000000000--- a/packages/twenty-website-new/src/lib/i18n/use-render-message.ts+++ /dev/null@@ -1,13 +0,0 @@-'use client';--import type { MessageDescriptor } from '@lingui/core';-import { useLingui } from '@lingui/react';-import { useCallback } from 'react';--export const useRenderMessage = () => {- const { i18n } = useLingui();- return useCallback(- (descriptor: MessageDescriptor) => i18n._(descriptor),- [i18n],- );-};diff --git a/packages/twenty-website-new/src/lib/i18n/app-locale-set.ts b/packages/twenty-website-new/src/lib/i18n/utils/app-locale-set.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/i18n/app-locale-set.tsrename to packages/twenty-website-new/src/lib/i18n/utils/app-locale-set.tsdiff --git a/packages/twenty-website-new/src/lib/i18n/create-i18n-instance.ts b/packages/twenty-website-new/src/lib/i18n/utils/create-i18n-instance.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/i18n/create-i18n-instance.tsrename to packages/twenty-website-new/src/lib/i18n/utils/create-i18n-instance.tsdiff --git a/packages/twenty-website-new/src/lib/i18n/detect-locale.ts b/packages/twenty-website-new/src/lib/i18n/utils/detect-locale.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/i18n/detect-locale.tsrename to packages/twenty-website-new/src/lib/i18n/utils/detect-locale.tsdiff --git a/packages/twenty-website-new/src/lib/i18n/get-message-descriptor-source.ts b/packages/twenty-website-new/src/lib/i18n/utils/get-message-descriptor-source.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/i18n/get-message-descriptor-source.tsrename to packages/twenty-website-new/src/lib/i18n/utils/get-message-descriptor-source.tsdiff --git a/packages/twenty-website-new/src/lib/i18n/get-route-i18n.ts b/packages/twenty-website-new/src/lib/i18n/utils/get-route-i18n.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/i18n/get-route-i18n.tsrename to packages/twenty-website-new/src/lib/i18n/utils/get-route-i18n.tsdiff --git a/packages/twenty-website-new/src/lib/i18n/utils/get-server-i18n.ts b/packages/twenty-website-new/src/lib/i18n/utils/get-server-i18n.tsnew file mode 100644index 00000000000..bab33d5a154--- /dev/null+++ b/packages/twenty-website-new/src/lib/i18n/utils/get-server-i18n.ts@@ -0,0 +1,13 @@+import type { I18n } from '@lingui/core';+import { getI18n } from '@lingui/react/server';++import { createI18nInstance } from './create-i18n-instance';++let fallback: I18n | null = null;++export function getServerI18n(): I18n {+ const instance = getI18n() as I18n | null;+ if (instance) return instance;+ if (!fallback) fallback = createI18nInstance('en');+ return fallback;+}diff --git a/packages/twenty-website-new/src/lib/i18n/locale-display-names.ts b/packages/twenty-website-new/src/lib/i18n/utils/locale-display-names.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/i18n/locale-display-names.tsrename to packages/twenty-website-new/src/lib/i18n/utils/locale-display-names.tsdiff --git a/packages/twenty-website-new/src/lib/i18n/localize-href.ts b/packages/twenty-website-new/src/lib/i18n/utils/localize-href.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/i18n/localize-href.tsrename to packages/twenty-website-new/src/lib/i18n/utils/localize-href.tsdiff --git a/packages/twenty-website-new/src/lib/i18n/messages-by-locale.ts b/packages/twenty-website-new/src/lib/i18n/utils/messages-by-locale.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/i18n/messages-by-locale.tsrename to packages/twenty-website-new/src/lib/i18n/utils/messages-by-locale.tsdiff --git a/packages/twenty-website-new/src/lib/i18n/resolve-locale-param.ts b/packages/twenty-website-new/src/lib/i18n/utils/resolve-locale-param.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/i18n/resolve-locale-param.tsrename to packages/twenty-website-new/src/lib/i18n/utils/resolve-locale-param.tsdiff --git a/packages/twenty-website-new/src/lib/i18n/set-server-i18n.ts b/packages/twenty-website-new/src/lib/i18n/utils/set-server-i18n.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/i18n/set-server-i18n.tsrename to packages/twenty-website-new/src/lib/i18n/utils/set-server-i18n.tsdiff --git a/packages/twenty-website-new/src/lib/i18n/website-locale-list.ts b/packages/twenty-website-new/src/lib/i18n/utils/website-locale-list.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/i18n/website-locale-list.tsrename to packages/twenty-website-new/src/lib/i18n/utils/website-locale-list.tsdiff --git a/packages/twenty-website-new/src/lib/i18n/website-locale-segments.ts b/packages/twenty-website-new/src/lib/i18n/utils/website-locale-segments.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/i18n/website-locale-segments.tsrename to packages/twenty-website-new/src/lib/i18n/utils/website-locale-segments.tsdiff --git a/packages/twenty-website-new/src/lib/lifecycle/__tests__/run-cleanup-tasks.test.ts b/packages/twenty-website-new/src/lib/react/__tests__/run-cleanup-tasks.test.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/lifecycle/__tests__/run-cleanup-tasks.test.tsrename to packages/twenty-website-new/src/lib/react/__tests__/run-cleanup-tasks.test.tsdiff --git a/packages/twenty-website-new/src/lib/lifecycle/__tests__/timeout-registry.test.ts b/packages/twenty-website-new/src/lib/react/__tests__/timeout-registry.test.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/lifecycle/__tests__/timeout-registry.test.tsrename to packages/twenty-website-new/src/lib/react/__tests__/timeout-registry.test.tsdiff --git a/packages/twenty-website-new/src/lib/lifecycle/run-cleanup-tasks.ts b/packages/twenty-website-new/src/lib/react/run-cleanup-tasks.tssimilarity index 73%rename from packages/twenty-website-new/src/lib/lifecycle/run-cleanup-tasks.tsrename to packages/twenty-website-new/src/lib/react/run-cleanup-tasks.tsindex c848d7d649b..c1664a0e30e 100644--- a/packages/twenty-website-new/src/lib/lifecycle/run-cleanup-tasks.ts+++ b/packages/twenty-website-new/src/lib/react/run-cleanup-tasks.ts@@ -1,6 +1,6 @@-export type CleanupErrorHandler = (error: unknown) => void;+type CleanupErrorHandler = (error: unknown) => void;-export const reportCleanupErrorInDevelopment: CleanupErrorHandler = (error) => {+const reportCleanupErrorInDevelopment: CleanupErrorHandler = (error) => {if (process.env.NODE_ENV !== 'production') {console.error('Cleanup task failed:', error);}diff --git a/packages/twenty-website-new/src/lib/lifecycle/timeout-registry.ts b/packages/twenty-website-new/src/lib/react/timeout-registry.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/lifecycle/timeout-registry.tsrename to packages/twenty-website-new/src/lib/react/timeout-registry.tsdiff --git a/packages/twenty-website-new/src/lib/react/use-timeout-registry.ts b/packages/twenty-website-new/src/lib/react/use-timeout-registry.tsindex 18e3dfa2598..361ef79d0d5 100644--- a/packages/twenty-website-new/src/lib/react/use-timeout-registry.ts+++ b/packages/twenty-website-new/src/lib/react/use-timeout-registry.ts@@ -1,7 +1,7 @@import {createTimeoutRegistry,type TimeoutRegistry,-} from '@/lib/lifecycle/timeout-registry';+} from '@/lib/react/timeout-registry';import { useEffect, useRef } from 'react';export function useTimeoutRegistry(): TimeoutRegistry {diff --git a/packages/twenty-website-new/src/lib/semver/__tests__/compare-semantic-versions.test.ts b/packages/twenty-website-new/src/lib/releases/__tests__/compare-semantic-versions.test.tssimilarity index 96%rename from packages/twenty-website-new/src/lib/semver/__tests__/compare-semantic-versions.test.tsrename to packages/twenty-website-new/src/lib/releases/__tests__/compare-semantic-versions.test.tsindex 1669545ff94..27ab267aa92 100644--- a/packages/twenty-website-new/src/lib/semver/__tests__/compare-semantic-versions.test.ts+++ b/packages/twenty-website-new/src/lib/releases/__tests__/compare-semantic-versions.test.ts@@ -1,4 +1,4 @@-import { compareSemanticVersions } from '@/lib/semver/compare-semantic-versions';+import { compareSemanticVersions } from '@/lib/releases/compare-semantic-versions';function expectOrdered(versions: string[]) {for (let i = 0; i < versions.length - 1; i++) {diff --git a/packages/twenty-website-new/src/lib/semver/compare-semantic-versions.ts b/packages/twenty-website-new/src/lib/releases/compare-semantic-versions.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/semver/compare-semantic-versions.tsrename to packages/twenty-website-new/src/lib/releases/compare-semantic-versions.tsdiff --git a/packages/twenty-website-new/src/lib/semver/get-formatted-release-number.ts b/packages/twenty-website-new/src/lib/releases/get-formatted-release-number.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/semver/get-formatted-release-number.tsrename to packages/twenty-website-new/src/lib/releases/get-formatted-release-number.tsdiff --git a/packages/twenty-website-new/src/lib/releases/get-visible-releases.ts b/packages/twenty-website-new/src/lib/releases/get-visible-releases.tsindex 16fbf6650aa..0b865ba3036 100644--- a/packages/twenty-website-new/src/lib/releases/get-visible-releases.ts+++ b/packages/twenty-website-new/src/lib/releases/get-visible-releases.ts@@ -1,5 +1,5 @@import type { LocalReleaseNote } from '@/lib/releases/types';-import { getFormattedReleaseNumber } from '@/lib/semver/get-formatted-release-number';+import { getFormattedReleaseNumber } from '@/lib/releases/get-formatted-release-number';function safeReleaseNumber(version: string): number | null {try {diff --git a/packages/twenty-website-new/src/lib/releases/load-local-release-notes.ts b/packages/twenty-website-new/src/lib/releases/load-local-release-notes.tsindex 333e6a31906..84cd9bb97e2 100644--- a/packages/twenty-website-new/src/lib/releases/load-local-release-notes.ts+++ b/packages/twenty-website-new/src/lib/releases/load-local-release-notes.ts@@ -4,7 +4,7 @@ import path from 'path';import matter from 'gray-matter';import type { LocalReleaseNote } from '@/lib/releases/types';-import { compareSemanticVersions } from '@/lib/semver/compare-semantic-versions';+import { compareSemanticVersions } from '@/lib/releases/compare-semantic-versions';function normalizeFrontmatterDate(dateValue: unknown): string {if (typeof dateValue === 'string') {diff --git a/packages/twenty-website-new/src/lib/scroll/scroll-progress-effect.tsx b/packages/twenty-website-new/src/lib/scroll/ScrollProgressEffect.tsxsimilarity index 100%rename from packages/twenty-website-new/src/lib/scroll/scroll-progress-effect.tsxrename to packages/twenty-website-new/src/lib/scroll/ScrollProgressEffect.tsxdiff --git a/packages/twenty-website-new/src/lib/scroll/index.ts b/packages/twenty-website-new/src/lib/scroll/index.tsindex 17f104e1a8e..c819e00fa46 100644--- a/packages/twenty-website-new/src/lib/scroll/index.ts+++ b/packages/twenty-website-new/src/lib/scroll/index.ts@@ -1,4 +1,2 @@-export { computeScrollProgress } from './compute-scroll-progress';-export { ScrollProgressEffect } from './scroll-progress-effect';+export { ScrollProgressEffect } from './ScrollProgressEffect';export { useScheduledOnScroll } from './use-scheduled-on-scroll';-export { useScrollProgress } from './use-scroll-progress';diff --git a/packages/twenty-website-new/src/lib/scroll/use-scroll-progress.ts b/packages/twenty-website-new/src/lib/scroll/use-scroll-progress.tsindex 883d098d97a..6e7679d49b2 100644--- a/packages/twenty-website-new/src/lib/scroll/use-scroll-progress.ts+++ b/packages/twenty-website-new/src/lib/scroll/use-scroll-progress.ts@@ -2,6 +2,7 @@import { useEffect, type RefObject } from 'react';+import { createAnimationFrameLoop } from '@/lib/animation';import { computeScrollProgress } from './compute-scroll-progress';type UseScrollProgressOptions = {@@ -20,7 +21,7 @@ export function useScrollProgress(return;}- const handleScroll = () => {+ const update = () => {const element = scrollContainerRef.current;if (!element) {return;@@ -37,12 +38,22 @@ export function useScrollProgress(onProgress(progress);};- handleScroll();- window.addEventListener('scroll', handleScroll, { passive: true });- window.addEventListener('resize', handleScroll);+ const scrollTask = createAnimationFrameLoop({+ onFrame: () => {+ update();+ return false;+ },+ });++ const schedule = scrollTask.start;++ update();+ window.addEventListener('scroll', schedule, { passive: true });+ window.addEventListener('resize', schedule);return () => {- window.removeEventListener('scroll', handleScroll);- window.removeEventListener('resize', handleScroll);+ window.removeEventListener('scroll', schedule);+ window.removeEventListener('resize', schedule);+ scrollTask.stop();};}, [enabled, onProgress, scrollContainerRef]);}diff --git a/packages/twenty-website-new/src/lib/seo/JsonLd.tsx b/packages/twenty-website-new/src/lib/seo/JsonLd.tsxnew file mode 100644index 00000000000..c26817204d4--- /dev/null+++ b/packages/twenty-website-new/src/lib/seo/JsonLd.tsx@@ -0,0 +1,18 @@+type JsonLdPrimitive = boolean | number | string | null;++export type JsonLdValue =+ | JsonLdPrimitive+ | JsonLdValue[]+ | { [key: string]: JsonLdValue | undefined };++const serializeJsonLd = (data: JsonLdValue): string =>+ JSON.stringify(data).replace(/</g, '\\u003c');++export function JsonLd({ data }: { data: JsonLdValue }) {+ return (+ <script+ dangerouslySetInnerHTML={{ __html: serializeJsonLd(data) }}+ type="application/ld+json"+ />+ );+}diff --git a/packages/twenty-website-new/src/lib/seo/__tests__/json-ld.test.tsx b/packages/twenty-website-new/src/lib/seo/__tests__/JsonLd.test.tsxsimilarity index 93%rename from packages/twenty-website-new/src/lib/seo/__tests__/json-ld.test.tsxrename to packages/twenty-website-new/src/lib/seo/__tests__/JsonLd.test.tsxindex f89dcf45094..be2b14c9fe4 100644--- a/packages/twenty-website-new/src/lib/seo/__tests__/json-ld.test.tsx+++ b/packages/twenty-website-new/src/lib/seo/__tests__/JsonLd.test.tsx@@ -54,12 +54,12 @@ describe('buildFaqPageJsonLd', () => {it('produces a FAQPage with one Question per input, each carrying an Answer', () => {const questions = [{- question: { fontFamily: 'sans' as const, text: descriptor('Q1?') },- answer: { text: descriptor('A1.') },+ question: descriptor('Q1?'),+ answer: descriptor('A1.'),},{- question: { fontFamily: 'sans' as const, text: descriptor('Q2?') },- answer: { text: descriptor('A2.') },+ question: descriptor('Q2?'),+ answer: descriptor('A2.'),},];@@ -85,10 +85,8 @@ describe('buildFaqPageJsonLd', () => {const data = buildFaqPageJsonLd([{- question: {- text: { id: 'faq.q', message: 'Resolved question' },- },- answer: { text: { id: 'faq.a', message: 'Resolved answer' } },+ question: { id: 'faq.q', message: 'Resolved question' },+ answer: { id: 'faq.a', message: 'Resolved answer' },},],renderText,diff --git a/packages/twenty-website-new/src/lib/seo/build-localized-metadata.ts b/packages/twenty-website-new/src/lib/seo/build-localized-metadata.tsindex 67df59cb2b6..1db487b7908 100644--- a/packages/twenty-website-new/src/lib/seo/build-localized-metadata.ts+++ b/packages/twenty-website-new/src/lib/seo/build-localized-metadata.ts@@ -1,7 +1,7 @@import type { Metadata } from 'next';-import { resolveLocaleParam } from '@/lib/i18n/resolve-locale-param';-import { setServerI18n } from '@/lib/i18n/set-server-i18n';+import { resolveLocaleParam } from '@/lib/i18n/utils/resolve-locale-param';+import { setServerI18n } from '@/lib/i18n/utils/set-server-i18n';import {buildPageMetadata,diff --git a/packages/twenty-website-new/src/lib/seo/build-page-metadata.ts b/packages/twenty-website-new/src/lib/seo/build-page-metadata.tsindex acc00e3aca7..c34305b7d3c 100644--- a/packages/twenty-website-new/src/lib/seo/build-page-metadata.ts+++ b/packages/twenty-website-new/src/lib/seo/build-page-metadata.ts@@ -4,16 +4,16 @@ import { SOURCE_LOCALE, type AppLocale } from 'twenty-shared/translations';import {PUBLIC_APP_LOCALE_LIST,isPublicAppLocale,-} from '@/lib/i18n/app-locale-set';-import { createI18nInstance } from '@/lib/i18n/create-i18n-instance';-import { createMessageDescriptorRenderer } from '@/lib/i18n/create-message-descriptor-renderer';-import { localeToUrlSegment } from '@/lib/i18n/website-locale-segments';+} from '@/lib/i18n/utils/app-locale-set';+import { createI18nInstance } from '@/lib/i18n/utils/create-i18n-instance';+import { localeToUrlSegment } from '@/lib/i18n/utils/website-locale-segments';import type { MessageDescriptor } from '@lingui/core';import { getSiteUrl } from './site-url';const SITE_NAME = 'Twenty';const TWITTER_HANDLE = '@twentycrm';+const DEFAULT_OG_IMAGE_PATH = '/images/og/default.png';export type BuildPageMetadataInput = {locale: AppLocale;@@ -66,20 +66,17 @@ export function buildPageMetadata({const metadataLocale = isPublicAppLocale(locale) ? locale : SOURCE_LOCALE;const canonical = localizePath(metadataLocale, normalizedPath);const i18n = createI18nInstance(metadataLocale);- const renderText = createMessageDescriptorRenderer(i18n);- const resolvedTitle = renderText(title);- const resolvedDescription = renderText(description);-- const ogImages =- ogImage === undefined- ? undefined- : [- {- url: /^https?:\/\//i.test(ogImage)- ? ogImage- : `${siteUrl}${ogImage.startsWith('/') ? ogImage : `/${ogImage}`}`,- },- ];+ const resolvedTitle = i18n._(title);+ const resolvedDescription = i18n._(description);++ const resolvedOgImage = ogImage ?? DEFAULT_OG_IMAGE_PATH;+ const ogImages = [+ {+ url: /^https?:\/\//i.test(resolvedOgImage)+ ? resolvedOgImage+ : `${siteUrl}${resolvedOgImage.startsWith('/') ? resolvedOgImage : `/${resolvedOgImage}`}`,+ },+ ];const baseMetadata: Metadata = {title: { absolute: resolvedTitle },@@ -95,7 +92,7 @@ export function buildPageMetadata({siteName: SITE_NAME,locale: metadataLocale,type,- ...(ogImages && { images: ogImages }),+ images: ogImages,},twitter: {card: 'summary_large_image',@@ -103,7 +100,7 @@ export function buildPageMetadata({description: resolvedDescription,site: TWITTER_HANDLE,creator: TWITTER_HANDLE,- ...(ogImages && { images: ogImages.map((image) => image.url) }),+ images: ogImages.map((image) => image.url),},};diff --git a/packages/twenty-website-new/src/lib/seo/index.ts b/packages/twenty-website-new/src/lib/seo/index.tsindex e3c863a8a56..a062929cbe4 100644--- a/packages/twenty-website-new/src/lib/seo/index.ts+++ b/packages/twenty-website-new/src/lib/seo/index.ts@@ -1,16 +1,14 @@export { buildLocalizedMetadata } from './build-localized-metadata';-export {- buildPageMetadata,- type BuildPageMetadataInput,-} from './build-page-metadata';+export { buildPageMetadata } from './build-page-metadata';export { buildRouteMetadata } from './build-route-metadata';export {- buildArticleListJsonLd,buildArticleJsonLd,+ buildArticleListJsonLd,+ buildBreadcrumbListJsonLd,buildFaqPageJsonLd,buildOrganizationJsonLd,buildReleaseListJsonLd,buildSoftwareApplicationJsonLd,- JsonLd,-} from './json-ld';-export { getAbsoluteUrl, getSiteUrl } from './site-url';+} from './json-ld-builders';+export { JsonLd } from './JsonLd';+export { getSiteUrl } from './site-url';diff --git a/packages/twenty-website-new/src/lib/seo/json-ld.tsx b/packages/twenty-website-new/src/lib/seo/json-ld-builders.tssimilarity index 82%rename from packages/twenty-website-new/src/lib/seo/json-ld.tsxrename to packages/twenty-website-new/src/lib/seo/json-ld-builders.tsindex 2c01a893413..c22b4f495f2 100644--- a/packages/twenty-website-new/src/lib/seo/json-ld.tsx+++ b/packages/twenty-website-new/src/lib/seo/json-ld-builders.ts@@ -1,33 +1,24 @@import type { MessageDescriptor } from '@lingui/core';+import { SOURCE_LOCALE, type AppLocale } from 'twenty-shared/translations';import type { Article } from '@/lib/articles';+import { localeToUrlSegment } from '@/lib/i18n/utils/website-locale-segments';import type { LocalReleaseNote } from '@/lib/releases/types';+import type { JsonLdValue } from './JsonLd';import { getSiteUrl } from './site-url';type FaqEntryLike = {- question: { text: MessageDescriptor };- answer: { text: MessageDescriptor };+ question: MessageDescriptor;+ answer: MessageDescriptor;};-type JsonLdPrimitive = boolean | number | string | null;--export type JsonLdValue =- | JsonLdPrimitive- | JsonLdValue[]- | { [key: string]: JsonLdValue | undefined };--const serializeJsonLd = (data: JsonLdValue): string =>- JSON.stringify(data).replace(/</g, '\\u003c');+type RenderText = (descriptor: MessageDescriptor) => string;-export function JsonLd({ data }: { data: JsonLdValue }) {- return (- <script- dangerouslySetInnerHTML={{ __html: serializeJsonLd(data) }}- type="application/ld+json"- />- );-}+type BreadcrumbItem = {+ name: string;+ path: string;+};export const buildOrganizationJsonLd = (): JsonLdValue => {const siteUrl = getSiteUrl();@@ -72,8 +63,6 @@ export const buildSoftwareApplicationJsonLd = (): JsonLdValue => {};};-type RenderText = (descriptor: MessageDescriptor) => string;-export const buildFaqPageJsonLd = (questions: readonly FaqEntryLike[],renderText: RenderText,@@ -82,10 +71,10 @@ export const buildFaqPageJsonLd = ('@type': 'FAQPage',mainEntity: questions.map((question) => ({'@type': 'Question',- name: renderText(question.question.text),+ name: renderText(question.question),acceptedAnswer: {'@type': 'Answer',- text: renderText(question.answer.text),+ text: renderText(question.answer),},})),});@@ -190,3 +179,23 @@ export const buildArticleJsonLd = (post: Article): JsonLdValue => {},};};++export const buildBreadcrumbListJsonLd = (+ items: readonly BreadcrumbItem[],+ locale?: AppLocale,+): JsonLdValue => {+ const siteUrl = getSiteUrl();+ const prefix =+ locale && locale !== SOURCE_LOCALE ? `/${localeToUrlSegment(locale)}` : '';++ return {+ '@context': 'https://schema.org',+ '@type': 'BreadcrumbList',+ itemListElement: items.map((item, index) => ({+ '@type': 'ListItem',+ position: index + 1,+ name: item.name,+ item: `${siteUrl}${prefix}${item.path}`,+ })),+ };+};diff --git a/packages/twenty-website-new/src/lib/seo/site-url.ts b/packages/twenty-website-new/src/lib/seo/site-url.tsindex 4c367d754da..70153511f55 100644--- a/packages/twenty-website-new/src/lib/seo/site-url.ts+++ b/packages/twenty-website-new/src/lib/seo/site-url.ts@@ -13,12 +13,3 @@ export function getSiteUrl(): string {return DEFAULT_SITE_URL;}--export function getAbsoluteUrl(pathOrUrl: string): string {- if (/^https?:\/\//i.test(pathOrUrl)) {- return pathOrUrl;- }-- const path = pathOrUrl.startsWith('/') ? pathOrUrl : `/${pathOrUrl}`;- return `${getSiteUrl()}${path}`;-}diff --git a/packages/twenty-website-new/src/lib/stepper/index.ts b/packages/twenty-website-new/src/lib/stepper/index.tsdeleted file mode 100644index 2a62a8c6275..00000000000--- a/packages/twenty-website-new/src/lib/stepper/index.ts+++ /dev/null@@ -1,2 +0,0 @@-export { StepperSwipeDeck } from './stepper-swipe-deck';-export { getStepperMdUpSnapshot, useStepperMdUp } from './use-stepper-md-up';diff --git a/packages/twenty-website-new/src/lib/visual-runtime/__tests__/bounded-failure-cache.test.ts b/packages/twenty-website-new/src/lib/visual-runtime/__tests__/bounded-failure-cache.test.tsindex ecdb89d92d0..e7c86af94f0 100644--- a/packages/twenty-website-new/src/lib/visual-runtime/__tests__/bounded-failure-cache.test.ts+++ b/packages/twenty-website-new/src/lib/visual-runtime/__tests__/bounded-failure-cache.test.ts@@ -1,4 +1,4 @@-import { createBoundedFailureCache } from '@/lib/visual-runtime/bounded-failure-cache';+import { createBoundedFailureCache } from '@/lib/visual-runtime/utils/bounded-failure-cache';describe('createBoundedFailureCache', () => {it('records added URLs and reports them via has()', () => {diff --git a/packages/twenty-website-new/src/lib/visual-runtime/__tests__/visual-mount-scheduler.test.ts b/packages/twenty-website-new/src/lib/visual-runtime/__tests__/visual-mount-scheduler.test.tsindex 8dc865dd9b2..58c71ab5035 100644--- a/packages/twenty-website-new/src/lib/visual-runtime/__tests__/visual-mount-scheduler.test.ts+++ b/packages/twenty-website-new/src/lib/visual-runtime/__tests__/visual-mount-scheduler.test.ts@@ -1,4 +1,4 @@-import { createVisualMountScheduler } from '../visual-mount-scheduler';+import { createVisualMountScheduler } from '../utils/visual-mount-scheduler';function createManualIdleHost() {let nextHandle = 1;diff --git a/packages/twenty-website-new/src/lib/visual-runtime/__tests__/visual-render-loop.test.ts b/packages/twenty-website-new/src/lib/visual-runtime/__tests__/visual-render-loop.test.tsindex 29306917472..580543505cc 100644--- a/packages/twenty-website-new/src/lib/visual-runtime/__tests__/visual-render-loop.test.ts+++ b/packages/twenty-website-new/src/lib/visual-runtime/__tests__/visual-render-loop.test.ts@@ -1,7 +1,7 @@import {createVisualRenderLoop,type VisualRenderLoopDocument,-} from '../visual-render-loop';+} from '../utils/visual-render-loop';function createAnimationFrameScheduler() {let nextHandle = 1;diff --git a/packages/twenty-website-new/src/lib/visual-runtime/webgl-error-boundary.tsx b/packages/twenty-website-new/src/lib/visual-runtime/components/WebglErrorBoundary.tsxsimilarity index 92%rename from packages/twenty-website-new/src/lib/visual-runtime/webgl-error-boundary.tsxrename to packages/twenty-website-new/src/lib/visual-runtime/components/WebglErrorBoundary.tsxindex f4fc471217a..fa9630098e7 100644--- a/packages/twenty-website-new/src/lib/visual-runtime/webgl-error-boundary.tsx+++ b/packages/twenty-website-new/src/lib/visual-runtime/components/WebglErrorBoundary.tsx@@ -2,7 +2,7 @@import { Component, type ErrorInfo, type ReactNode } from 'react';-import { WebGlUnavailableError } from './visual-runtime-policy';+import { WebGlUnavailableError } from '../utils/visual-runtime-policy';type WebGlErrorBoundaryProps = {children: ReactNode;diff --git a/packages/twenty-website-new/src/lib/visual-runtime/webgl-mount.tsx b/packages/twenty-website-new/src/lib/visual-runtime/components/WebglMount.tsxsimilarity index 94%rename from packages/twenty-website-new/src/lib/visual-runtime/webgl-mount.tsxrename to packages/twenty-website-new/src/lib/visual-runtime/components/WebglMount.tsxindex 832aa77ab36..c054bc3b8ea 100644--- a/packages/twenty-website-new/src/lib/visual-runtime/webgl-mount.tsx+++ b/packages/twenty-website-new/src/lib/visual-runtime/components/WebglMount.tsx@@ -8,14 +8,14 @@ import { observeElementVisibility } from '@/lib/dom/observe-element-visibility';import {subscribeToActiveWebGlContextCount,tryReserveWebGlContextSlot,-} from './active-webgl-context-budget';-import { SITE_WEBGL_CONTEXT_LOST_EVENT } from './create-site-webgl-renderer';+} from '../utils/active-webgl-context-budget';+import { SITE_WEBGL_CONTEXT_LOST_EVENT } from '../utils/create-site-webgl-renderer';import {scheduleVisualMount,type VisualMountPriority,-} from './visual-mount-scheduler';-import { useWebGlPolicy } from './use-webgl-policy';-import { WebGlErrorBoundary } from './webgl-error-boundary';+} from '../utils/visual-mount-scheduler';+import { useWebGlPolicy } from '../hooks/use-webgl-policy';+import { WebGlErrorBoundary } from './WebglErrorBoundary';const NON_PRIORITY_ROOT_MARGIN = '50% 0px 50% 0px';const PRIORITY_ROOT_MARGIN = '125% 0px 125% 0px';diff --git a/packages/twenty-website-new/src/lib/visual-runtime/hooks/use-async-geometry.ts b/packages/twenty-website-new/src/lib/visual-runtime/hooks/use-async-geometry.tsnew file mode 100644index 00000000000..18c4c31a89c--- /dev/null+++ b/packages/twenty-website-new/src/lib/visual-runtime/hooks/use-async-geometry.ts@@ -0,0 +1,12 @@+import type * as THREE from 'three';++import { useAsyncResource } from './use-async-resource';++const DISPOSE_GEOMETRY = (geometry: THREE.BufferGeometry) => geometry.dispose();++export function useAsyncGeometry(+ loader: (() => Promise<THREE.BufferGeometry>) | null,+ deps: readonly unknown[],+) {+ return useAsyncResource(loader, deps, { dispose: DISPOSE_GEOMETRY });+}diff --git a/packages/twenty-website-new/src/lib/visual-runtime/hooks/use-async-image.ts b/packages/twenty-website-new/src/lib/visual-runtime/hooks/use-async-image.tsnew file mode 100644index 00000000000..4e4114049a7--- /dev/null+++ b/packages/twenty-website-new/src/lib/visual-runtime/hooks/use-async-image.ts@@ -0,0 +1,8 @@+import { useAsyncResource } from './use-async-resource';++export function useAsyncImage(+ loader: (() => Promise<HTMLImageElement>) | null,+ deps: readonly unknown[],+) {+ return useAsyncResource(loader, deps);+}diff --git a/packages/twenty-website-new/src/lib/visual-runtime/hooks/use-async-resource.ts b/packages/twenty-website-new/src/lib/visual-runtime/hooks/use-async-resource.tsnew file mode 100644index 00000000000..17a7dbd2f2b--- /dev/null+++ b/packages/twenty-website-new/src/lib/visual-runtime/hooks/use-async-resource.ts@@ -0,0 +1,56 @@+'use client';++import { useEffect, useState } from 'react';++type AsyncResourceOptions<T> = {+ dispose?: (resource: T) => void;+};++export function useAsyncResource<T>(+ loader: (() => Promise<T>) | null,+ deps: readonly unknown[],+ options?: AsyncResourceOptions<T>,+) {+ const [resource, setResource] = useState<T | null>(null);++ useEffect(() => {+ if (!loader) {+ setResource(null);+ return;+ }++ let cancelled = false;+ let loadedResource: T | null = null;++ setResource(null);++ void Promise.resolve()+ .then(() => loader())+ .then(+ (result) => {+ if (cancelled) {+ options?.dispose?.(result);+ return;+ }++ loadedResource = result;+ setResource(result);+ },+ (error) => {+ if (!cancelled) {+ console.error(error);+ }+ },+ );++ return () => {+ cancelled = true;+ if (loadedResource) {+ options?.dispose?.(loadedResource);+ }+ };+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, deps);++ return resource;+}diff --git a/packages/twenty-website-new/src/lib/visual-runtime/use-webgl-policy.ts b/packages/twenty-website-new/src/lib/visual-runtime/hooks/use-webgl-policy.tssimilarity index 96%rename from packages/twenty-website-new/src/lib/visual-runtime/use-webgl-policy.tsrename to packages/twenty-website-new/src/lib/visual-runtime/hooks/use-webgl-policy.tsindex c967a87c039..7e0971e0e8f 100644--- a/packages/twenty-website-new/src/lib/visual-runtime/use-webgl-policy.ts+++ b/packages/twenty-website-new/src/lib/visual-runtime/hooks/use-webgl-policy.ts@@ -5,7 +5,7 @@ import { useEffect, useState } from 'react';import {evaluateWebGlPolicy,type WebGlPolicyDecision,-} from './visual-runtime-policy';+} from '../utils/visual-runtime-policy';const PESSIMISTIC_INITIAL_DECISION: WebGlPolicyDecision = {allowed: false,diff --git a/packages/twenty-website-new/src/lib/visual-runtime/index.ts b/packages/twenty-website-new/src/lib/visual-runtime/index.tsindex 310af48e660..7da5912d3ae 100644--- a/packages/twenty-website-new/src/lib/visual-runtime/index.ts+++ b/packages/twenty-website-new/src/lib/visual-runtime/index.ts@@ -1,57 +1,17 @@-export {- evaluateWebGlPolicy,- detectWebGlSupport,- detectPrefersReducedMotion,- isHeavyVisualsKillSwitchEnabled,- WebGlUnavailableError,- type WebGlPolicyDecision,- type WebGlPolicyDenialReason,-} from './visual-runtime-policy';--export {- getActiveWebGlContextCount,- getMaxActiveWebGlContexts,- subscribeToActiveWebGlContextCount,- tryReserveWebGlContextSlot,-} from './active-webgl-context-budget';+export { evaluateWebGlPolicy } from './utils/visual-runtime-policy';-export { useWebGlPolicy } from './use-webgl-policy';-export { WebGlErrorBoundary } from './webgl-error-boundary';-export { WebGlMount } from './webgl-mount';-export { loadVisualImage } from './load-visual-image';-export {- createVisualMountScheduler,- scheduleVisualMount,- visualMountScheduler,- type ScheduleVisualMountOptions,- type VisualMountPriority,- type VisualMountScheduler,-} from './visual-mount-scheduler';+export { WebGlMount } from './components/WebglMount';+export { loadVisualImage } from './utils/load-visual-image';+export { scheduleVisualMount } from './utils/visual-mount-scheduler';export {createSiteWebGlRenderer,- reportSiteWebGlRendererCreationFailure,- SITE_WEBGL_CONTEXT_LOST_EVENT,tryCreateSiteWebGlRenderer,- type SiteWebGlRendererCreationFailureHandler,- type SiteWebGlRendererParameters,-} from './create-site-webgl-renderer';+} from './utils/create-site-webgl-renderer';export {createVisualRenderLoop,- reportVisualRenderLoopErrorInDevelopment,- type CreateVisualRenderLoopOptions,type VisualRenderLoop,- type VisualRenderLoopCanceller,- type VisualRenderLoopDocument,- type VisualRenderLoopErrorHandler,type VisualRenderLoopFrame,- type VisualRenderLoopFrameRenderer,- type VisualRenderLoopScheduler,-} from './visual-render-loop';--export {- createBoundedFailureCache,- type BoundedFailureCache,-} from './bounded-failure-cache';+} from './utils/visual-render-loop';-export { DRACO_DECODER_PATH, DRACO_DECODER_ORIGIN } from './draco-decoder-path';+export { createBoundedFailureCache } from './utils/bounded-failure-cache';diff --git a/packages/twenty-website-new/src/lib/visual-runtime/active-webgl-context-budget.ts b/packages/twenty-website-new/src/lib/visual-runtime/utils/active-webgl-context-budget.tssimilarity index 89%rename from packages/twenty-website-new/src/lib/visual-runtime/active-webgl-context-budget.tsrename to packages/twenty-website-new/src/lib/visual-runtime/utils/active-webgl-context-budget.tsindex 31df0a57793..370b36a1767 100644--- a/packages/twenty-website-new/src/lib/visual-runtime/active-webgl-context-budget.ts+++ b/packages/twenty-website-new/src/lib/visual-runtime/utils/active-webgl-context-budget.ts@@ -8,7 +8,7 @@ function readNumberEnv(value: string | undefined, fallback: number): number {return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;}-export function getMaxActiveWebGlContexts(): number {+function getMaxActiveWebGlContexts(): number {return readNumberEnv(process.env.NEXT_PUBLIC_MAX_WEBGL_CONTEXTS,DEFAULT_MAX_ACTIVE_WEBGL_CONTEXTS,@@ -26,10 +26,6 @@ function notify() {}}-export function getActiveWebGlContextCount(): number {- return activeCount;-}-export function tryReserveWebGlContextSlot(): (() => void) | null {if (activeCount >= getMaxActiveWebGlContexts()) {return null;diff --git a/packages/twenty-website-new/src/lib/visual-runtime/bounded-failure-cache.ts b/packages/twenty-website-new/src/lib/visual-runtime/utils/bounded-failure-cache.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/visual-runtime/bounded-failure-cache.tsrename to packages/twenty-website-new/src/lib/visual-runtime/utils/bounded-failure-cache.tsdiff --git a/packages/twenty-website-new/src/lib/visual-runtime/create-site-webgl-renderer.ts b/packages/twenty-website-new/src/lib/visual-runtime/utils/create-site-webgl-renderer.tssimilarity index 89%rename from packages/twenty-website-new/src/lib/visual-runtime/create-site-webgl-renderer.tsrename to packages/twenty-website-new/src/lib/visual-runtime/utils/create-site-webgl-renderer.tsindex 9f33a01c107..b526b0d9156 100644--- a/packages/twenty-website-new/src/lib/visual-runtime/create-site-webgl-renderer.ts+++ b/packages/twenty-website-new/src/lib/visual-runtime/utils/create-site-webgl-renderer.ts@@ -1,6 +1,6 @@import * as THREE from 'three';-export type SiteWebGlRendererParameters = THREE.WebGLRendererParameters & {+type SiteWebGlRendererParameters = THREE.WebGLRendererParameters & {onContextLost?: (event: WebGLContextEvent) => void;};@@ -59,9 +59,9 @@ export function createSiteWebGlRenderer(return renderer;}-export type SiteWebGlRendererCreationFailureHandler = (error: unknown) => void;+type SiteWebGlRendererCreationFailureHandler = (error: unknown) => void;-export const reportSiteWebGlRendererCreationFailure: SiteWebGlRendererCreationFailureHandler =+const reportSiteWebGlRendererCreationFailure: SiteWebGlRendererCreationFailureHandler =(error) => {if (process.env.NODE_ENV !== 'production') {console.error('WebGL renderer creation failed:', error);diff --git a/packages/twenty-website-new/src/lib/visual-runtime/draco-decoder-path.ts b/packages/twenty-website-new/src/lib/visual-runtime/utils/draco-decoder-path.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/visual-runtime/draco-decoder-path.tsrename to packages/twenty-website-new/src/lib/visual-runtime/utils/draco-decoder-path.tsdiff --git a/packages/twenty-website-new/src/lib/visual-runtime/load-visual-image.ts b/packages/twenty-website-new/src/lib/visual-runtime/utils/load-visual-image.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/visual-runtime/load-visual-image.tsrename to packages/twenty-website-new/src/lib/visual-runtime/utils/load-visual-image.tsdiff --git a/packages/twenty-website-new/src/lib/visual-runtime/visual-mount-scheduler.ts b/packages/twenty-website-new/src/lib/visual-runtime/utils/visual-mount-scheduler.tssimilarity index 97%rename from packages/twenty-website-new/src/lib/visual-runtime/visual-mount-scheduler.tsrename to packages/twenty-website-new/src/lib/visual-runtime/utils/visual-mount-scheduler.tsindex 00a67894141..7cacff38ccb 100644--- a/packages/twenty-website-new/src/lib/visual-runtime/visual-mount-scheduler.ts+++ b/packages/twenty-website-new/src/lib/visual-runtime/utils/visual-mount-scheduler.ts@@ -14,12 +14,12 @@ type VisualMountSchedulerHost = {setTimeout?: (callback: () => void, delayMs: number) => TimeoutHandle;};-export type ScheduleVisualMountOptions = {+type ScheduleVisualMountOptions = {priority?: VisualMountPriority;timeoutMs?: number;};-export type VisualMountScheduler = {+type VisualMountScheduler = {schedule: (callback: () => void,options?: ScheduleVisualMountOptions,@@ -207,6 +207,6 @@ export function createVisualMountScheduler(};}-export const visualMountScheduler = createVisualMountScheduler();+const visualMountScheduler = createVisualMountScheduler();export const scheduleVisualMount = visualMountScheduler.schedule;diff --git a/packages/twenty-website-new/src/lib/visual-runtime/visual-render-loop.ts b/packages/twenty-website-new/src/lib/visual-runtime/utils/visual-render-loop.tssimilarity index 89%rename from packages/twenty-website-new/src/lib/visual-runtime/visual-render-loop.tsrename to packages/twenty-website-new/src/lib/visual-runtime/utils/visual-render-loop.tsindex 5ed9c61ba1c..c81fcc95fbf 100644--- a/packages/twenty-website-new/src/lib/visual-runtime/visual-render-loop.ts+++ b/packages/twenty-website-new/src/lib/visual-runtime/utils/visual-render-loop.ts@@ -2,7 +2,7 @@ import {observeElementVisibility,type ObserveElementVisibilityOptions,} from '@/lib/dom/observe-element-visibility';-import { runCleanupTasks } from '@/lib/lifecycle/run-cleanup-tasks';+import { runCleanupTasks } from '@/lib/react/run-cleanup-tasks';export type VisualRenderLoop = {dispose: () => void;@@ -11,7 +11,7 @@ export type VisualRenderLoop = {stop: () => void;};-export type VisualRenderLoopErrorHandler = (error: unknown) => void;+type VisualRenderLoopErrorHandler = (error: unknown) => void;export type VisualRenderLoopDocument = {addEventListener: Document['addEventListener'];@@ -19,22 +19,20 @@ export type VisualRenderLoopDocument = {removeEventListener: Document['removeEventListener'];};-export type VisualRenderLoopScheduler = (- callback: FrameRequestCallback,-) => number;+type VisualRenderLoopScheduler = (callback: FrameRequestCallback) => number;-export type VisualRenderLoopCanceller = (handle: number) => void;+type VisualRenderLoopCanceller = (handle: number) => void;export type VisualRenderLoopFrame = {deltaSeconds: number;elapsedSeconds: number;timestamp: DOMHighResTimeStamp;};-export type VisualRenderLoopFrameRenderer = (+type VisualRenderLoopFrameRenderer = (timestamp: DOMHighResTimeStamp,frame: VisualRenderLoopFrame,) => boolean | void;-export type CreateVisualRenderLoopOptions = {+type CreateVisualRenderLoopOptions = {cancelAnimationFrame?: VisualRenderLoopCanceller;document?: VisualRenderLoopDocument | null;onFrameError?: VisualRenderLoopErrorHandler;@@ -47,12 +45,13 @@ export type CreateVisualRenderLoopOptions = {visibilityObserver?: typeof observeElementVisibility;};-export const reportVisualRenderLoopErrorInDevelopment: VisualRenderLoopErrorHandler =- (error) => {- if (process.env.NODE_ENV !== 'production') {- console.error('Visual render loop failed:', error);- }- };+const reportVisualRenderLoopErrorInDevelopment: VisualRenderLoopErrorHandler = (+ error,+) => {+ if (process.env.NODE_ENV !== 'production') {+ console.error('Visual render loop failed:', error);+ }+};const MAX_FRAME_DELTA_SECONDS = 0.1;diff --git a/packages/twenty-website-new/src/lib/visual-runtime/visual-runtime-policy.ts b/packages/twenty-website-new/src/lib/visual-runtime/utils/visual-runtime-policy.tssimilarity index 90%rename from packages/twenty-website-new/src/lib/visual-runtime/visual-runtime-policy.tsrename to packages/twenty-website-new/src/lib/visual-runtime/utils/visual-runtime-policy.tsindex 055e7ce4b71..cc5ca0c5cd7 100644--- a/packages/twenty-website-new/src/lib/visual-runtime/visual-runtime-policy.ts+++ b/packages/twenty-website-new/src/lib/visual-runtime/utils/visual-runtime-policy.ts@@ -2,7 +2,7 @@ export type WebGlPolicyDecision =| { allowed: true; reducedMotion: boolean }| { allowed: false; reason: WebGlPolicyDenialReason; reducedMotion: boolean };-export type WebGlPolicyDenialReason = 'kill-switch' | 'no-webgl-support';+type WebGlPolicyDenialReason = 'kill-switch' | 'no-webgl-support';export class WebGlUnavailableError extends Error {readonly reason: WebGlPolicyDenialReason;@@ -22,13 +22,13 @@ function readBooleanEnv(value: string | undefined): boolean {return normalized === '1' || normalized === 'true' || normalized === 'yes';}-export function isHeavyVisualsKillSwitchEnabled(): boolean {+function isHeavyVisualsKillSwitchEnabled(): boolean {return readBooleanEnv(process.env.NEXT_PUBLIC_DISABLE_HEAVY_VISUALS);}let cachedSupportProbe: boolean | null = null;-export function detectWebGlSupport(): boolean {+function detectWebGlSupport(): boolean {if (cachedSupportProbe !== null) {return cachedSupportProbe;}@@ -63,7 +63,7 @@ export function detectWebGlSupport(): boolean {}}-export function detectPrefersReducedMotion(): boolean {+function detectPrefersReducedMotion(): boolean {if (typeof window === 'undefined' || !('matchMedia' in window)) {return false;}diff --git a/packages/twenty-website-new/src/lib/website-routing/static-website-routes.ts b/packages/twenty-website-new/src/lib/website-routing/static-website-routes.tsindex 17547491ed2..be73fe438cc 100644--- a/packages/twenty-website-new/src/lib/website-routing/static-website-routes.ts+++ b/packages/twenty-website-new/src/lib/website-routing/static-website-routes.ts@@ -14,7 +14,7 @@ export const STATIC_WEBSITE_ROUTES = [},{id: 'whyTwenty',- path: '/resources/why-twenty',+ path: '/why-twenty',title: msg`Why Twenty — The Open Source CRM Built to Be Customised`,description: msg`Packaged CRMs make every company look the same. Twenty is the open source CRM teams shape around their workflow, with a modern UI and a developer-first platform.`,changeFrequency: 'monthly',diff --git a/packages/twenty-website-new/src/proxy.ts b/packages/twenty-website-new/src/proxy.tsindex cadd25fa066..8d623b8432e 100644--- a/packages/twenty-website-new/src/proxy.ts+++ b/packages/twenty-website-new/src/proxy.ts@@ -1,8 +1,8 @@import { NextResponse, type NextRequest } from 'next/server';import { SOURCE_LOCALE } from 'twenty-shared/translations';-import { KNOWN_PUBLIC_APP_LOCALE_BY_RAW } from '@/lib/i18n/app-locale-set';-import { LOCALE_BY_URL_SEGMENT } from '@/lib/i18n/website-locale-segments';+import { KNOWN_PUBLIC_APP_LOCALE_BY_RAW } from '@/lib/i18n/utils/app-locale-set';+import { LOCALE_BY_URL_SEGMENT } from '@/lib/i18n/utils/website-locale-segments';export const proxy = (request: NextRequest) => {const { pathname, search } = request.nextUrl;diff --git a/packages/twenty-website-new/src/sections/Articles/index.ts b/packages/twenty-website-new/src/sections/Articles/index.tsnew file mode 100644index 00000000000..30329eaad1d--- /dev/null+++ b/packages/twenty-website-new/src/sections/Articles/index.ts@@ -0,0 +1 @@+export { Articles } from './components';diff --git a/packages/twenty-website-new/src/sections/CaseStudy/components/CaseStudySectionNav.tsx b/packages/twenty-website-new/src/sections/CaseStudy/components/CaseStudySectionNav.tsxindex 0a3becf6fde..d3c26f07d1b 100644--- a/packages/twenty-website-new/src/sections/CaseStudy/components/CaseStudySectionNav.tsx+++ b/packages/twenty-website-new/src/sections/CaseStudy/components/CaseStudySectionNav.tsx@@ -1,6 +1,6 @@'use client';-import { useRenderMessage } from '@/lib/i18n/use-render-message';+import { useLingui } from '@lingui/react';import { useScheduledOnScroll } from '@/lib/scroll';import { theme } from '@/theme';import type { MessageDescriptor } from '@lingui/core';@@ -154,9 +154,9 @@ export function CaseStudySectionNav({items,label = DEFAULT_LABEL,}: CaseStudySectionNavProps) {- const renderText = useRenderMessage();- const resolvedLabel = renderText(label);- const resolvedItems = items.map(renderText);+ const { i18n } = useLingui();+ const resolvedLabel = i18n._(label);+ const resolvedItems = items.map((item) => i18n._(item));const [visible, setVisible] = useState(false);const [activeIndex, setActiveIndex] = useState(0);diff --git a/packages/twenty-website-new/src/sections/CaseStudy/components/Hero.tsx b/packages/twenty-website-new/src/sections/CaseStudy/components/Hero.tsxindex 7fd0c472c95..e9298e656e5 100644--- a/packages/twenty-website-new/src/sections/CaseStudy/components/Hero.tsx+++ b/packages/twenty-website-new/src/sections/CaseStudy/components/Hero.tsx@@ -1,15 +1,14 @@import type { CaseStudyData } from '@/lib/customers';-import { Container, Heading } from '@/design-system/components';+import { Container } from '@/design-system/components';import { CLIENT_ICONS } from '@/icons';+import { getServerI18n } from '@/lib/i18n/utils/get-server-i18n';import { LocalizedLink } from '@/lib/i18n';import { CustomerCasesCover } from '@/sections/CaseStudyCatalog/visuals/CustomerCasesCover';import { theme } from '@/theme';-import type { MessageDescriptor } from '@lingui/core';import { msg } from '@lingui/core/macro';import { styled } from '@linaria/react';import { IconArrowLeft, IconClock } from '@tabler/icons-react';import Image from 'next/image';-const CATALOG_LOGO_WIDTHS: Record<string, number> = {'nine-dots': 72,'alternative-partners': 220,@@ -230,15 +229,10 @@ type HeroProps = {hero: CaseStudyData['hero'];dashColor?: string;hoverDashColor?: string;- renderText: (descriptor: MessageDescriptor) => string;};-export function Hero({- hero,- dashColor,- hoverDashColor,- renderText,-}: HeroProps) {+export function Hero({ hero, dashColor, hoverDashColor }: HeroProps) {+ const i18n = getServerI18n();const ClientIcon = CLIENT_ICONS[hero.clientIcon];const authorInitials = hero.author.split(' ')@@ -262,15 +256,7 @@ export function Hero({</Badge></MetaRow>- <TitleWrap>- <Heading- as="h1"- renderText={renderText}- segments={hero.title}- size="lg"- weight="light"- />- </TitleWrap>+ <TitleWrap>{hero.title}</TitleWrap><AuthorAvatar>{hero.authorAvatarSrc ? (@@ -289,13 +275,13 @@ export function Hero({<AuthorRow><BackLink href="/customers"><IconArrowLeft size={16} stroke={1.5} />- {renderText(msg`Back`)}+ {i18n._(msg`Back`)}</BackLink><AuthorDivider aria-hidden /><AuthorInfo><AuthorName>{hero.author}</AuthorName>{hero.authorRole ? (- <AuthorRole>{renderText(hero.authorRole)}</AuthorRole>+ <AuthorRole>{i18n._(hero.authorRole)}</AuthorRole>) : null}</AuthorInfo></AuthorRow>diff --git a/packages/twenty-website-new/src/sections/CaseStudy/components/Highlights.tsx b/packages/twenty-website-new/src/sections/CaseStudy/components/Highlights.tsxindex 56753666ae9..1ffa43106ef 100644--- a/packages/twenty-website-new/src/sections/CaseStudy/components/Highlights.tsx+++ b/packages/twenty-website-new/src/sections/CaseStudy/components/Highlights.tsx@@ -1,6 +1,7 @@import { Container } from '@/design-system/components';-import type { MessageDescriptor } from '@lingui/core';+import { getServerI18n } from '@/lib/i18n/utils/get-server-i18n';import { theme } from '@/theme';+import type { MessageDescriptor } from '@lingui/core';import { msg } from '@lingui/core/macro';import { styled } from '@linaria/react';@@ -115,10 +116,10 @@ const Label = styled.span`type HighlightsProps = {industry?: MessageDescriptor;kpis?: { value: MessageDescriptor; label: MessageDescriptor }[];- renderText: (descriptor: MessageDescriptor) => string;};-export function Highlights({ industry, kpis, renderText }: HighlightsProps) {+export function Highlights({ industry, kpis }: HighlightsProps) {+ const i18n = getServerI18n();const cells: { value: MessageDescriptor; label: MessageDescriptor }[] = [];if (industry) {cells.push({ value: industry, label: msg`Industry` });@@ -140,8 +141,8 @@ export function Highlights({ industry, kpis, renderText }: HighlightsProps) {<Card count={cells.length}>{cells.map((cell, index) => (<Cell count={cells.length} index={index} key={index}>- <Value>{renderText(cell.value)}</Value>- <Label>{renderText(cell.label)}</Label>+ <Value>{i18n._(cell.value)}</Value>+ <Label>{i18n._(cell.label)}</Label></Cell>))}</Card>diff --git a/packages/twenty-website-new/src/sections/CaseStudy/components/TextBlock.tsx b/packages/twenty-website-new/src/sections/CaseStudy/components/TextBlock.tsxindex e3663f013ff..1565d9abd6e 100644--- a/packages/twenty-website-new/src/sections/CaseStudy/components/TextBlock.tsx+++ b/packages/twenty-website-new/src/sections/CaseStudy/components/TextBlock.tsx@@ -3,12 +3,11 @@ import {Body as BaseBody,Container,Eyebrow,- Heading,+ HeadingPart,} from '@/design-system/components';+import { getServerI18n } from '@/lib/i18n/utils/get-server-i18n';import { theme } from '@/theme';-import type { MessageDescriptor } from '@lingui/core';import { styled } from '@linaria/react';-const Section = styled.section`background-color: ${theme.colors.primary.background[100]};color: ${theme.colors.primary.text[100]};@@ -125,47 +124,40 @@ function parseCallout(raw: string): {type TextBlockProps = {block: CaseStudyTextBlock;isLast?: boolean;- renderText: (descriptor: MessageDescriptor) => string;sectionId?: string;};export function TextBlock({block,isLast = false,- renderText,sectionId,}: TextBlockProps) {+ const i18n = getServerI18n();return (<Section id={sectionId}><StyledContainer $isLast={isLast}><ContentWrap>{block.eyebrow && (- <Eyebrow- colorScheme="primary"- heading={{ fontFamily: 'sans', text: block.eyebrow }}- renderText={renderText}- />+ <Eyebrow colorScheme="primary">+ <HeadingPart fontFamily="sans">+ {i18n._(block.eyebrow)}+ </HeadingPart>+ </Eyebrow>)}- <Heading- as="h2"- renderText={renderText}- segments={block.heading}- size="md"- weight="light"- />+ {block.heading}<BodyStack>{block.paragraphs.map((paragraph, index) => (<BaseBodykey={index}- body={{ text: paragraph }}family="sans"- renderText={renderText}size="md"variant="body-paragraph"weight="regular"- />+ >+ {i18n._(paragraph)}+ </BaseBody>))}{block.callout &&(() => {diff --git a/packages/twenty-website-new/src/sections/CaseStudy/index.ts b/packages/twenty-website-new/src/sections/CaseStudy/index.tsnew file mode 100644index 00000000000..d4fadf29a2b--- /dev/null+++ b/packages/twenty-website-new/src/sections/CaseStudy/index.ts@@ -0,0 +1 @@+export { CaseStudy } from './components';diff --git a/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/Card.tsx b/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/Card.tsxindex df2432707a2..8ba0bb5cff6 100644--- a/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/Card.tsx+++ b/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/Card.tsx@@ -1,13 +1,14 @@import type { CaseStudyCatalogEntry } from '@/lib/customers';-import { ArrowRightIcon, CLIENT_ICONS } from '@/icons';+import { getServerI18n } from '@/lib/i18n/utils/get-server-i18n';import { LocalizedLink } from '@/lib/i18n';-import { CustomerCasesCover } from '@/sections/CaseStudyCatalog/visuals/CustomerCasesCover';import { theme } from '@/theme';-import type { MessageDescriptor } from '@lingui/core';import { styled } from '@linaria/react';-import Image from 'next/image';import type { CSSProperties } from 'react';+import { CardFooter } from './CardFooter';+import { CardKpisDefault, CardKpisLarge } from './CardKpis';+import { CardThumbnail } from './CardThumbnail';+type CardVariant = 'default' | 'large';type CaseStudyCardStyle = CSSProperties & {@@ -63,56 +64,6 @@ const CardLink = styled(LocalizedLink)`}`;-const Thumbnail = styled.div<{ variant: 'default' | 'large' }>`- align-items: center;- background-color: #000;- display: flex;- flex-shrink: 0;- height: 200px;- justify-content: center;- overflow: hidden;- position: relative;- width: 100%;-- @media (min-width: ${theme.breakpoints.md}px) {- height: ${({ variant }) => (variant === 'large' ? 'auto' : '240px')};- min-height: ${({ variant }) => (variant === 'large' ? '460px' : '0')};- width: ${({ variant }) => (variant === 'large' ? '50%' : '100%')};- }-`;--const CoverLayer = styled.div`- inset: 0;- position: absolute;-`;--const LogoLayer = styled.div`- align-items: center;- display: flex;- inset: 0;- justify-content: center;- pointer-events: none;- position: absolute;-`;--const ThumbnailBadge = styled.span`- bottom: ${theme.spacing(4)};- color: ${theme.colors.secondary.text[60]};- font-family: ${theme.font.family.mono};- font-size: ${theme.font.size(3)};- font-weight: ${theme.font.weight.medium};- left: ${theme.spacing(6)};- letter-spacing: 0.08em;- position: absolute;- text-transform: uppercase;- z-index: 2;-- @media (min-width: ${theme.breakpoints.md}px) {- bottom: ${theme.spacing(6)};- left: ${theme.spacing(8)};- }-`;-const ContentWrapper = styled.div<{ variant: 'default' | 'large' }>`display: flex;flex: 1;@@ -168,10 +119,6 @@ const Title = styled.h3<{ variant: 'default' | 'large' }>`}`;-const TitleSans = styled.span`- font-family: ${theme.font.family.sans};-`;-const Quote = styled.blockquote`border-left: 2px solid ${theme.colors.highlight[100]};color: ${theme.colors.primary.text[60]};@@ -202,224 +149,6 @@ const Summary = styled.p`overflow: hidden;`;-const KpiRow = styled.div<{ count: number }>`- border-top: 1px solid ${theme.colors.primary.border[10]};- display: grid;- grid-template-columns: repeat(- ${({ count }) => (count > 2 ? 2 : count)},- minmax(0, 1fr)- );- margin-top: ${theme.spacing(2)};-- @media (min-width: ${theme.breakpoints.md}px) {- grid-template-columns: ${({ count }) => `repeat(${count}, minmax(0, 1fr))`};- margin-top: auto;- }-`;--const KpiCell = styled.div<{ index: number; count: number }>`- border-left: 1px solid ${theme.colors.primary.border[10]};- border-top: ${({ index, count }) =>- count > 2 && index >= 2- ? `1px solid ${theme.colors.primary.border[10]}`- : 'none'};- display: flex;- flex-direction: column;- gap: ${theme.spacing(1.5)};- padding: ${theme.spacing(4)} ${theme.spacing(3)};-- &:nth-child(odd) {- border-left: none;- padding-left: 0;- }-- @media (min-width: ${theme.breakpoints.md}px) {- border-left: 1px solid ${theme.colors.primary.border[10]};- border-top: none;- padding: ${theme.spacing(5)} ${theme.spacing(4)};-- &:first-child {- border-left: none;- padding-left: 0;- }-- &:nth-child(odd) {- border-left: 1px solid ${theme.colors.primary.border[10]};- padding-left: ${theme.spacing(4)};- }-- &:first-child {- border-left: none;- padding-left: 0;- }- }-`;--const KpiValue = styled.span`- color: ${theme.colors.primary.text[100]};- font-family: ${theme.font.family.serif};- font-size: ${theme.font.size(6)};- font-weight: ${theme.font.weight.light};- line-height: ${theme.lineHeight(7)};-- @media (min-width: ${theme.breakpoints.md}px) {- font-size: ${theme.font.size(7)};- line-height: ${theme.lineHeight(8)};- }-`;--const KpiLabel = styled.span`- color: ${theme.colors.primary.text[40]};- font-family: ${theme.font.family.mono};- font-size: ${theme.font.size(3)};- font-weight: ${theme.font.weight.medium};- letter-spacing: 0.08em;- line-height: ${theme.lineHeight(4)};- text-transform: uppercase;-`;--const KpiChipRow = styled.div`- display: flex;- flex-wrap: wrap;- gap: ${theme.spacing(2)};- margin-top: ${theme.spacing(1)};- padding-bottom: ${theme.spacing(4)};- padding-left: ${theme.spacing(6)};- padding-right: ${theme.spacing(6)};-- @media (min-width: ${theme.breakpoints.md}px) {- padding-bottom: ${theme.spacing(5)};- }-`;--const KpiChip = styled.span`- align-items: center;- background-color: ${theme.colors.primary.text[5]};- border: 1px solid ${theme.colors.primary.border[10]};- border-radius: 999px;- color: ${theme.colors.primary.text[60]};- display: inline-flex;- font-family: ${theme.font.family.sans};- font-size: ${theme.font.size(3)};- font-weight: ${theme.font.weight.regular};- gap: ${theme.spacing(2.5)};- line-height: ${theme.lineHeight(4)};- padding: ${theme.spacing(1.5)} ${theme.spacing(3.5)};- white-space: nowrap;-`;--const KpiChipValue = styled.span`- color: ${theme.colors.primary.text[100]};- font-family: ${theme.font.family.sans};- font-size: ${theme.font.size(3.5)};- font-weight: ${theme.font.weight.medium};- letter-spacing: -0.01em;-`;--const KpiChipDivider = styled.span`- background-color: ${theme.colors.primary.border[20]};- flex-shrink: 0;- height: 14px;- width: 1px;-`;--const KpiChipLabel = styled.span`- color: ${theme.colors.primary.text[60]};- font-family: ${theme.font.family.mono};- font-size: ${theme.font.size(2.5)};- font-weight: ${theme.font.weight.medium};- letter-spacing: 0.08em;- text-transform: uppercase;-`;--const Footer = styled.div<{ variant: 'default' | 'large' }>`- align-items: center;- border-top: 1px solid ${theme.colors.primary.border[10]};- display: flex;- gap: ${theme.spacing(3)};- justify-content: space-between;- margin-left: ${theme.spacing(6)};- margin-right: ${theme.spacing(6)};- padding-bottom: ${theme.spacing(5)};- padding-top: ${theme.spacing(5)};-- @media (min-width: ${theme.breakpoints.md}px) {- margin-left: ${({ variant }) =>- variant === 'large' ? '0' : theme.spacing(6)};- margin-right: ${({ variant }) =>- variant === 'large' ? '0' : theme.spacing(6)};- padding-bottom: ${({ variant }) =>- variant === 'large' ? '0' : theme.spacing(5)};- padding-top: ${({ variant }) =>- variant === 'large' ? theme.spacing(6) : theme.spacing(5)};- }-`;--const AuthorGroup = styled.div`- align-items: center;- display: flex;- flex: 1;- gap: ${theme.spacing(3)};- min-width: 0;-`;--const AuthorAvatar = styled.div`- align-items: center;- background-color: ${theme.colors.highlight[100]};- border-radius: 50%;- color: ${theme.colors.secondary.text[100]};- display: flex;- flex-shrink: 0;- font-family: ${theme.font.family.sans};- font-size: ${theme.font.size(3)};- font-weight: ${theme.font.weight.medium};- height: 32px;- justify-content: center;- width: 32px;-`;--const AuthorAvatarPhoto = styled.div`- border-radius: 50%;- flex-shrink: 0;- height: 32px;- overflow: hidden;- position: relative;- width: 32px;-`;--const AuthorText = styled.div`- color: ${theme.colors.primary.text[80]};- font-family: ${theme.font.family.sans};- font-size: ${theme.font.size(3.5)};- font-weight: ${theme.font.weight.regular};- line-height: ${theme.lineHeight(4)};- min-width: 0;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;-`;--const AuthorRoleText = styled.span`- color: ${theme.colors.primary.text[40]};-`;--const ReadIconButton = styled.span`- align-items: center;- border: 1px solid ${theme.colors.primary.border[20]};- border-radius: ${theme.radius(2)};- color: ${theme.colors.primary.text[80]};- display: inline-flex;- flex-shrink: 0;- height: 40px;- justify-content: center;- transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);- width: 40px;-- ${`a:hover &`} {- transform: scale(1.08);- }-`;-const IndustryLabel = styled.span`color: ${theme.colors.primary.text[60]};font-family: ${theme.font.family.mono};@@ -430,47 +159,22 @@ const IndustryLabel = styled.span`text-transform: uppercase;`;-const CATALOG_LOGO_WIDTHS: Record<- CaseStudyCatalogEntry['hero']['clientIcon'],- number-> = {- 'nine-dots': 72,- 'alternative-partners': 220,- netzero: 180,- 'act-education': 110,- w3villa: 150,- 'elevate-consulting': 160,-};--const LARGE_LOGO_SCALE = 1.4;-type CardProps = {+ dashColor?: string;entry: CaseStudyCatalogEntry;+ hoverDashColor?: string;index?: number;- renderText: (descriptor: MessageDescriptor) => string;variant?: CardVariant;- dashColor?: string;- hoverDashColor?: string;};export function Card({+ dashColor,entry,+ hoverDashColor,index = 0,- renderText,variant = 'default',- dashColor,- hoverDashColor,}: CardProps) {- const ClientIcon = CLIENT_ICONS[entry.hero.clientIcon];- const baseLogoWidth = CATALOG_LOGO_WIDTHS[entry.hero.clientIcon] ?? 140;- const logoWidth =- variant === 'large' ? baseLogoWidth * LARGE_LOGO_SCALE : baseLogoWidth;- const initials = entry.hero.author- .split(' ')- .map((word) => word[0])- .join('');-- const coverImageSrc = entry.catalogCard.coverImageSrc;+ const i18n = getServerI18n();const isLarge = variant === 'large';const hasQuote = isLarge && entry.quote;const kpiCount = entry.kpis.length;@@ -480,104 +184,40 @@ export function Card({return (<CardLink data-card-variant={variant} href={entry.href} style={cardStyle}>- <Thumbnail variant={variant}>- {coverImageSrc ? (- <CoverLayer>- <CustomerCasesCover- dashColor={dashColor}- hoverDashColor={hoverDashColor}- imageUrl={coverImageSrc}- />- </CoverLayer>- ) : null}- {ClientIcon ? (- <LogoLayer>- <ClientIcon fillColor="#FFFFFF" size={logoWidth} />- </LogoLayer>- ) : null}- {isLarge ? (- <ThumbnailBadge>Case · {entry.hero.readingTime}</ThumbnailBadge>- ) : null}- </Thumbnail>+ <CardThumbnail+ clientIcon={entry.hero.clientIcon}+ coverImageSrc={entry.catalogCard.coverImageSrc}+ dashColor={dashColor}+ hoverDashColor={hoverDashColor}+ readingTime={entry.hero.readingTime}+ variant={variant}+ /><ContentWrapper variant={variant}><CardBody variant={variant}>- <IndustryLabel>{renderText(entry.industry)}</IndustryLabel>- <Title variant={variant}>- {entry.hero.title.map((segment, segmentIndex) =>- segment.fontFamily === 'sans' ? (- <TitleSans key={segmentIndex}>- {renderText(segment.text)}- </TitleSans>- ) : (- <span key={segmentIndex}>{renderText(segment.text)}</span>- ),- )}- </Title>+ <IndustryLabel>{i18n._(entry.industry)}</IndustryLabel>+ <Title variant={variant}>{i18n._(entry.hero.title)}</Title>{hasQuote && entry.quote ? (- <Quote>“{renderText(entry.quote.text)}”</Quote>+ <Quote>“{i18n._(entry.quote.text)}”</Quote>) : !isLarge ? (- <Summary>{renderText(entry.catalogCard.summary)}</Summary>+ <Summary>{i18n._(entry.catalogCard.summary)}</Summary>) : null}{isLarge && kpiCount > 0 ? (- <KpiRow count={kpiCount}>- {entry.kpis.map((kpi, kpiIndex) => (- <KpiCell count={kpiCount} index={kpiIndex} key={kpiIndex}>- <KpiValue>{renderText(kpi.value)}</KpiValue>- <KpiLabel>{renderText(kpi.label)}</KpiLabel>- </KpiCell>- ))}- </KpiRow>+ <CardKpisLarge kpis={entry.kpis} variant="large" />) : null}</CardBody>{!isLarge && kpiCount > 0 ? (- <KpiChipRow>- {entry.kpis.map((kpi, kpiIndex) => (- <KpiChip key={kpiIndex}>- <KpiChipValue>{renderText(kpi.value)}</KpiChipValue>- <KpiChipDivider aria-hidden />- <KpiChipLabel>{renderText(kpi.label)}</KpiChipLabel>- </KpiChip>- ))}- </KpiChipRow>+ <CardKpisDefault kpis={entry.kpis} variant="default" />) : null}- <Footer variant={variant}>- <AuthorGroup>- {entry.hero.authorAvatarSrc ? (- <AuthorAvatarPhoto>- <Image- alt={entry.hero.author}- fill- sizes="32px"- src={entry.hero.authorAvatarSrc}- style={{ objectFit: 'cover' }}- />- </AuthorAvatarPhoto>- ) : (- <AuthorAvatar>{initials}</AuthorAvatar>- )}- {hasQuote && entry.quote ? (- <AuthorText>- {entry.quote.author}{' '}- <AuthorRoleText>- · {renderText(entry.quote.role)}- </AuthorRoleText>- </AuthorText>- ) : (- <AuthorText>- {entry.hero.author}{' '}- <AuthorRoleText>- · {renderText(entry.authorRole)}- </AuthorRoleText>- </AuthorText>- )}- </AuthorGroup>- <ReadIconButton aria-hidden>- <ArrowRightIcon size={14} strokeColor="currentColor" />- </ReadIconButton>- </Footer>+ <CardFooter+ author={entry.hero.author}+ authorAvatarSrc={entry.hero.authorAvatarSrc}+ authorRole={entry.authorRole}+ quote={entry.quote}+ variant={variant}+ /></ContentWrapper></CardLink>);diff --git a/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/CardFooter.tsx b/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/CardFooter.tsxnew file mode 100644index 00000000000..8727f7e1e5d--- /dev/null+++ b/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/CardFooter.tsx@@ -0,0 +1,154 @@+import { ArrowRightIcon } from '@/icons';+import { getServerI18n } from '@/lib/i18n/utils/get-server-i18n';+import { theme } from '@/theme';+import type { MessageDescriptor } from '@lingui/core';+import { styled } from '@linaria/react';+import Image from 'next/image';++const StyledFooter = styled.div<{ variant: 'default' | 'large' }>`+ align-items: center;+ border-top: 1px solid ${theme.colors.primary.border[10]};+ display: flex;+ gap: ${theme.spacing(3)};+ justify-content: space-between;+ margin-left: ${theme.spacing(6)};+ margin-right: ${theme.spacing(6)};+ padding-bottom: ${theme.spacing(5)};+ padding-top: ${theme.spacing(5)};++ @media (min-width: ${theme.breakpoints.md}px) {+ margin-left: ${({ variant }) =>+ variant === 'large' ? '0' : theme.spacing(6)};+ margin-right: ${({ variant }) =>+ variant === 'large' ? '0' : theme.spacing(6)};+ padding-bottom: ${({ variant }) =>+ variant === 'large' ? '0' : theme.spacing(5)};+ padding-top: ${({ variant }) =>+ variant === 'large' ? theme.spacing(6) : theme.spacing(5)};+ }+`;++const AuthorGroup = styled.div`+ align-items: center;+ display: flex;+ flex: 1;+ gap: ${theme.spacing(3)};+ min-width: 0;+`;++const AuthorAvatar = styled.div`+ align-items: center;+ background-color: ${theme.colors.highlight[100]};+ border-radius: 50%;+ color: ${theme.colors.secondary.text[100]};+ display: flex;+ flex-shrink: 0;+ font-family: ${theme.font.family.sans};+ font-size: ${theme.font.size(3)};+ font-weight: ${theme.font.weight.medium};+ height: 32px;+ justify-content: center;+ width: 32px;+`;++const AuthorAvatarPhoto = styled.div`+ border-radius: 50%;+ flex-shrink: 0;+ height: 32px;+ overflow: hidden;+ position: relative;+ width: 32px;+`;++const AuthorText = styled.div`+ color: ${theme.colors.primary.text[80]};+ font-family: ${theme.font.family.sans};+ font-size: ${theme.font.size(3.5)};+ font-weight: ${theme.font.weight.regular};+ line-height: ${theme.lineHeight(4)};+ min-width: 0;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+`;++const AuthorRoleText = styled.span`+ color: ${theme.colors.primary.text[40]};+`;++const ReadIconButton = styled.span`+ align-items: center;+ border: 1px solid ${theme.colors.primary.border[20]};+ border-radius: ${theme.radius(2)};+ color: ${theme.colors.primary.text[80]};+ display: inline-flex;+ flex-shrink: 0;+ height: 40px;+ justify-content: center;+ transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);+ width: 40px;++ ${`a:hover &`} {+ transform: scale(1.08);+ }+`;++type CardFooterProps = {+ author: string;+ authorAvatarSrc?: string;+ authorRole: MessageDescriptor;+ quote?: {+ author: string;+ role: MessageDescriptor;+ text: MessageDescriptor;+ };+ variant: 'default' | 'large';+};++export function CardFooter({+ author,+ authorAvatarSrc,+ authorRole,+ quote,+ variant,+}: CardFooterProps) {+ const i18n = getServerI18n();+ const initials = author+ .split(' ')+ .map((word) => word[0])+ .join('');+ const showQuoteAuthor = variant === 'large' && quote;++ return (+ <StyledFooter variant={variant}>+ <AuthorGroup>+ {authorAvatarSrc ? (+ <AuthorAvatarPhoto>+ <Image+ alt={author}+ fill+ sizes="32px"+ src={authorAvatarSrc}+ style={{ objectFit: 'cover' }}+ />+ </AuthorAvatarPhoto>+ ) : (+ <AuthorAvatar>{initials}</AuthorAvatar>+ )}+ {showQuoteAuthor ? (+ <AuthorText>+ {quote.author}{' '}+ <AuthorRoleText>· {i18n._(quote.role)}</AuthorRoleText>+ </AuthorText>+ ) : (+ <AuthorText>+ {author} <AuthorRoleText>· {i18n._(authorRole)}</AuthorRoleText>+ </AuthorText>+ )}+ </AuthorGroup>+ <ReadIconButton aria-hidden>+ <ArrowRightIcon size={14} strokeColor="currentColor" />+ </ReadIconButton>+ </StyledFooter>+ );+}diff --git a/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/CardKpis.tsx b/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/CardKpis.tsxnew file mode 100644index 00000000000..6608a9609a3--- /dev/null+++ b/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/CardKpis.tsx@@ -0,0 +1,180 @@+import { getServerI18n } from '@/lib/i18n/utils/get-server-i18n';+import { theme } from '@/theme';+import type { MessageDescriptor } from '@lingui/core';+import { styled } from '@linaria/react';++type Kpi = {+ label: MessageDescriptor;+ value: MessageDescriptor;+};++const KpiRow = styled.div<{ count: number }>`+ border-top: 1px solid ${theme.colors.primary.border[10]};+ display: grid;+ grid-template-columns: repeat(+ ${({ count }) => (count > 2 ? 2 : count)},+ minmax(0, 1fr)+ );+ margin-top: ${theme.spacing(2)};++ @media (min-width: ${theme.breakpoints.md}px) {+ grid-template-columns: ${({ count }) => `repeat(${count}, minmax(0, 1fr))`};+ margin-top: auto;+ }+`;++const KpiCell = styled.div<{ index: number; count: number }>`+ border-left: 1px solid ${theme.colors.primary.border[10]};+ border-top: ${({ index, count }) =>+ count > 2 && index >= 2+ ? `1px solid ${theme.colors.primary.border[10]}`+ : 'none'};+ display: flex;+ flex-direction: column;+ gap: ${theme.spacing(1.5)};+ padding: ${theme.spacing(4)} ${theme.spacing(3)};++ &:nth-child(odd) {+ border-left: none;+ padding-left: 0;+ }++ @media (min-width: ${theme.breakpoints.md}px) {+ border-left: 1px solid ${theme.colors.primary.border[10]};+ border-top: none;+ padding: ${theme.spacing(5)} ${theme.spacing(4)};++ &:first-child {+ border-left: none;+ padding-left: 0;+ }++ &:nth-child(odd) {+ border-left: 1px solid ${theme.colors.primary.border[10]};+ padding-left: ${theme.spacing(4)};+ }++ &:first-child {+ border-left: none;+ padding-left: 0;+ }+ }+`;++const KpiValue = styled.span`+ color: ${theme.colors.primary.text[100]};+ font-family: ${theme.font.family.serif};+ font-size: ${theme.font.size(6)};+ font-weight: ${theme.font.weight.light};+ line-height: ${theme.lineHeight(7)};++ @media (min-width: ${theme.breakpoints.md}px) {+ font-size: ${theme.font.size(7)};+ line-height: ${theme.lineHeight(8)};+ }+`;++const KpiLabel = styled.span`+ color: ${theme.colors.primary.text[40]};+ font-family: ${theme.font.family.mono};+ font-size: ${theme.font.size(3)};+ font-weight: ${theme.font.weight.medium};+ letter-spacing: 0.08em;+ line-height: ${theme.lineHeight(4)};+ text-transform: uppercase;+`;++const KpiChipRow = styled.div`+ display: flex;+ flex-wrap: wrap;+ gap: ${theme.spacing(2)};+ margin-top: ${theme.spacing(1)};+ padding-bottom: ${theme.spacing(4)};+ padding-left: ${theme.spacing(6)};+ padding-right: ${theme.spacing(6)};++ @media (min-width: ${theme.breakpoints.md}px) {+ padding-bottom: ${theme.spacing(5)};+ }+`;++const KpiChip = styled.span`+ align-items: center;+ background-color: ${theme.colors.primary.text[5]};+ border: 1px solid ${theme.colors.primary.border[10]};+ border-radius: 999px;+ color: ${theme.colors.primary.text[60]};+ display: inline-flex;+ font-family: ${theme.font.family.sans};+ font-size: ${theme.font.size(3)};+ font-weight: ${theme.font.weight.regular};+ gap: ${theme.spacing(2.5)};+ line-height: ${theme.lineHeight(4)};+ padding: ${theme.spacing(1.5)} ${theme.spacing(3.5)};+ white-space: nowrap;+`;++const KpiChipValue = styled.span`+ color: ${theme.colors.primary.text[100]};+ font-family: ${theme.font.family.sans};+ font-size: ${theme.font.size(3.5)};+ font-weight: ${theme.font.weight.medium};+ letter-spacing: -0.01em;+`;++const KpiChipDivider = styled.span`+ background-color: ${theme.colors.primary.border[20]};+ flex-shrink: 0;+ height: 14px;+ width: 1px;+`;++const KpiChipLabel = styled.span`+ color: ${theme.colors.primary.text[60]};+ font-family: ${theme.font.family.mono};+ font-size: ${theme.font.size(2.5)};+ font-weight: ${theme.font.weight.medium};+ letter-spacing: 0.08em;+ text-transform: uppercase;+`;++type CardKpisLargeProps = {+ kpis: Kpi[];+ variant: 'large';+};++type CardKpisDefaultProps = {+ kpis: Kpi[];+ variant: 'default';+};++export function CardKpisLarge({ kpis }: CardKpisLargeProps) {+ const i18n = getServerI18n();++ return (+ <KpiRow count={kpis.length}>+ {kpis.map((kpi, kpiIndex) => (+ <KpiCell count={kpis.length} index={kpiIndex} key={kpiIndex}>+ <KpiValue>{i18n._(kpi.value)}</KpiValue>+ <KpiLabel>{i18n._(kpi.label)}</KpiLabel>+ </KpiCell>+ ))}+ </KpiRow>+ );+}++export function CardKpisDefault({ kpis }: CardKpisDefaultProps) {+ const i18n = getServerI18n();++ return (+ <KpiChipRow>+ {kpis.map((kpi, kpiIndex) => (+ <KpiChip key={kpiIndex}>+ <KpiChipValue>{i18n._(kpi.value)}</KpiChipValue>+ <KpiChipDivider aria-hidden />+ <KpiChipLabel>{i18n._(kpi.label)}</KpiChipLabel>+ </KpiChip>+ ))}+ </KpiChipRow>+ );+}diff --git a/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/CardThumbnail.tsx b/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/CardThumbnail.tsxnew file mode 100644index 00000000000..4f2fa85f2e1--- /dev/null+++ b/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/CardThumbnail.tsx@@ -0,0 +1,112 @@+import { CLIENT_ICONS } from '@/icons';+import type { CaseStudyCatalogEntry } from '@/lib/customers';+import { CustomerCasesCover } from '@/sections/CaseStudyCatalog/visuals/CustomerCasesCover';+import { theme } from '@/theme';+import { styled } from '@linaria/react';++const StyledThumbnail = styled.div<{ variant: 'default' | 'large' }>`+ align-items: center;+ background-color: #000;+ display: flex;+ flex-shrink: 0;+ height: 200px;+ justify-content: center;+ overflow: hidden;+ position: relative;+ width: 100%;++ @media (min-width: ${theme.breakpoints.md}px) {+ height: ${({ variant }) => (variant === 'large' ? 'auto' : '240px')};+ min-height: ${({ variant }) => (variant === 'large' ? '460px' : '0')};+ width: ${({ variant }) => (variant === 'large' ? '50%' : '100%')};+ }+`;++const CoverLayer = styled.div`+ inset: 0;+ position: absolute;+`;++const LogoLayer = styled.div`+ align-items: center;+ display: flex;+ inset: 0;+ justify-content: center;+ pointer-events: none;+ position: absolute;+`;++const Badge = styled.span`+ bottom: ${theme.spacing(4)};+ color: ${theme.colors.secondary.text[60]};+ font-family: ${theme.font.family.mono};+ font-size: ${theme.font.size(3)};+ font-weight: ${theme.font.weight.medium};+ left: ${theme.spacing(6)};+ letter-spacing: 0.08em;+ position: absolute;+ text-transform: uppercase;+ z-index: 2;++ @media (min-width: ${theme.breakpoints.md}px) {+ bottom: ${theme.spacing(6)};+ left: ${theme.spacing(8)};+ }+`;++const CATALOG_LOGO_WIDTHS: Record<+ CaseStudyCatalogEntry['hero']['clientIcon'],+ number+> = {+ 'nine-dots': 72,+ 'alternative-partners': 220,+ netzero: 180,+ 'act-education': 110,+ w3villa: 150,+ 'elevate-consulting': 160,+};++const LARGE_LOGO_SCALE = 1.4;++type CardThumbnailProps = {+ clientIcon: CaseStudyCatalogEntry['hero']['clientIcon'];+ coverImageSrc?: string;+ dashColor?: string;+ hoverDashColor?: string;+ readingTime: string;+ variant: 'default' | 'large';+};++export function CardThumbnail({+ clientIcon,+ coverImageSrc,+ dashColor,+ hoverDashColor,+ readingTime,+ variant,+}: CardThumbnailProps) {+ const ClientIcon = CLIENT_ICONS[clientIcon];+ const baseLogoWidth = CATALOG_LOGO_WIDTHS[clientIcon] ?? 140;+ const logoWidth =+ variant === 'large' ? baseLogoWidth * LARGE_LOGO_SCALE : baseLogoWidth;++ return (+ <StyledThumbnail variant={variant}>+ {coverImageSrc ? (+ <CoverLayer>+ <CustomerCasesCover+ dashColor={dashColor}+ hoverDashColor={hoverDashColor}+ imageUrl={coverImageSrc}+ />+ </CoverLayer>+ ) : null}+ {ClientIcon ? (+ <LogoLayer>+ <ClientIcon fillColor="#FFFFFF" size={logoWidth} />+ </LogoLayer>+ ) : null}+ {variant === 'large' ? <Badge>Case · {readingTime}</Badge> : null}+ </StyledThumbnail>+ );+}diff --git a/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/Grid.tsx b/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/Grid.tsxindex 36e6c51ee7e..395f18eed04 100644--- a/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/Grid.tsx+++ b/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/Grid.tsx@@ -6,7 +6,6 @@ import { Container } from '@/design-system/components';import { PlusIcon } from '@/icons';import { Card } from '@/sections/CaseStudyCatalog/components/Card';import { theme } from '@/theme';-import type { MessageDescriptor } from '@lingui/core';import { styled } from '@linaria/react';import type { ReactNode } from 'react';@@ -141,7 +140,6 @@ type GridProps = {compactTop?: boolean;entries: readonly CaseStudyCatalogEntry[];intro?: ReactNode;- renderText: (descriptor: MessageDescriptor) => string;};export function Grid({@@ -149,7 +147,6 @@ export function Grid({compactTop = false,entries,intro,- renderText,}: GridProps) {const lastIndex = entries.length - 1;@@ -203,7 +200,6 @@ export function Grid({hoverDashColor={palette.hoverDashColor}index={index}key={entry.href}- renderText={renderText}variant={isLarge ? 'large' : 'default'}/>);diff --git a/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/Promo.tsx b/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/Promo.tsxindex 24f059b79ae..480c78b81ce 100644--- a/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/Promo.tsx+++ b/packages/twenty-website-new/src/sections/CaseStudyCatalog/components/Promo.tsx@@ -1,8 +1,15 @@import { msg } from '@lingui/core/macro';import type { CaseStudyCatalogEntry } from '@/lib/customers';-import { Body, Container, Eyebrow, Heading } from '@/design-system/components';+import {+ Body,+ Container,+ Eyebrow,+ Heading,+ HeadingPart,+} from '@/design-system/components';import { PlusIcon, UsersIcon } from '@/icons';-import { LocalizedLinkButton } from '@/lib/i18n/LocalizedLinkButton';+import { getServerI18n } from '@/lib/i18n/utils/get-server-i18n';+import { LocalizedLinkButton } from '@/lib/i18n/components/LocalizedLinkButton';import { PromoMic } from '@/sections/CaseStudyCatalog/visuals/PromoMic';import { theme } from '@/theme';import type { MessageDescriptor } from '@lingui/core';@@ -15,19 +22,7 @@ const LINE_INSET = '20px';const TRUSTED_BY_BOTTOM_PADDING = 12;const TRUSTED_BY_BOTTOM_PADDING_DESKTOP = 16;-const EYEBROW = {- text: msg`Customer Stories`,- fontFamily: 'mono' as const,-};--const HEADING = [- { text: msg`How teams`, fontFamily: 'serif' as const },- { text: msg`built with Twenty`, fontFamily: 'sans' as const, newLine: true },-];--const BODY = {- text: msg`Meet the teams who shaped Twenty into their own CRM with self-hosted deployments, AI-assisted workflows, and API-first product stacks.`,-};+const BODY = msg`Meet the teams who shaped Twenty into their own CRM with self-hosted deployments, AI-assisted workflows, and API-first product stacks.`;const Section = styled.section`background-color: ${theme.colors.primary.background[100]};@@ -258,7 +253,6 @@ type PromoProps = {ctaHref?: string;ctaLabel?: MessageDescriptor;compactTop?: boolean;- renderText: (descriptor: MessageDescriptor) => string;};export function Promo({@@ -266,8 +260,8 @@ export function Promo({ctaHref = '/customers',ctaLabel = msg`Explore customer stories`,compactTop = false,- renderText,}: PromoProps) {+ const i18n = getServerI18n();return (<Section aria-label="Customer stories preview"><BackgroundLayer aria-hidden>@@ -331,25 +325,26 @@ export function Promo({</VisualColumn><TextColumn>- <Eyebrow- colorScheme="primary"- heading={EYEBROW}- markerHeight={6}- markerWidth={14}- renderText={renderText}- />- <Heading- renderText={renderText}- segments={HEADING}- size="lg"- weight="light"- />- <PromoBody body={BODY} renderText={renderText} size="sm" />+ <Eyebrow colorScheme="primary" markerHeight={6} markerWidth={14}>+ <HeadingPart fontFamily="mono">+ {i18n._(msg`Customer Stories`)}+ </HeadingPart>+ </Eyebrow>+ <Heading size="lg" weight="light">+ <HeadingPart fontFamily="serif">+ {i18n._(msg`How teams`)}+ </HeadingPart>+ <br />+ <HeadingPart fontFamily="sans">+ {i18n._(msg`built with Twenty`)}+ </HeadingPart>+ </Heading>+ <PromoBody size="sm">{i18n._(BODY)}</PromoBody><CtaRow><LocalizedLinkButtoncolor="secondary"href={ctaHref}- label={renderText(ctaLabel)}+ label={i18n._(ctaLabel)}variant="outlined"/></CtaRow>diff --git a/packages/twenty-website-new/src/sections/CaseStudyCatalog/index.ts b/packages/twenty-website-new/src/sections/CaseStudyCatalog/index.tsnew file mode 100644index 00000000000..f2bc98a3232--- /dev/null+++ b/packages/twenty-website-new/src/sections/CaseStudyCatalog/index.ts@@ -0,0 +1 @@+export { CaseStudyCatalog } from './components';diff --git a/packages/twenty-website-new/src/lib/contact-cal/CalFormEmbed.tsx b/packages/twenty-website-new/src/sections/ContactCal/CalFormEmbed.tsxsimilarity index 78%rename from packages/twenty-website-new/src/lib/contact-cal/CalFormEmbed.tsxrename to packages/twenty-website-new/src/sections/ContactCal/CalFormEmbed.tsxindex 618e6af5721..5a68ab58312 100644--- a/packages/twenty-website-new/src/lib/contact-cal/CalFormEmbed.tsx+++ b/packages/twenty-website-new/src/sections/ContactCal/CalFormEmbed.tsx@@ -1,6 +1,6 @@'use client';-import { CONTACT_CAL_FORM_CAL_LINK } from '@/lib/contact-cal/config';+import { CONTACT_CAL_FORM_CAL_LINK } from '@/sections/ContactCal/config';import Cal from '@calcom/embed-react';export function CalFormEmbed() {diff --git a/packages/twenty-website-new/src/lib/contact-cal/ContactCalModal.tsx b/packages/twenty-website-new/src/sections/ContactCal/ContactCalModal.tsxsimilarity index 100%rename from packages/twenty-website-new/src/lib/contact-cal/ContactCalModal.tsxrename to packages/twenty-website-new/src/sections/ContactCal/ContactCalModal.tsxdiff --git a/packages/twenty-website-new/src/lib/contact-cal/ContactCalModalRoot.tsx b/packages/twenty-website-new/src/sections/ContactCal/ContactCalModalRoot.tsxsimilarity index 57%rename from packages/twenty-website-new/src/lib/contact-cal/ContactCalModalRoot.tsxrename to packages/twenty-website-new/src/sections/ContactCal/ContactCalModalRoot.tsxindex 6d663968cd9..44a4b150e46 100644--- a/packages/twenty-website-new/src/lib/contact-cal/ContactCalModalRoot.tsx+++ b/packages/twenty-website-new/src/sections/ContactCal/ContactCalModalRoot.tsx@@ -1,13 +1,6 @@'use client';-import {- createContext,- useCallback,- useContext,- useMemo,- useState,- type ReactNode,-} from 'react';+import { createContext, useContext, useState, type ReactNode } from 'react';import { ContactCalModal } from './ContactCalModal';@@ -31,23 +24,12 @@ export function useContactCalModal() {export function ContactCalModalRoot({ children }: { children: ReactNode }) {const [open, setOpen] = useState(false);- const openContactCalModal = useCallback(() => {- setOpen(true);- }, []);-- const closeContactCalModal = useCallback(() => {- setOpen(false);- }, []);-- const contextValue = useMemo(- () => ({ openContactCalModal }),- [openContactCalModal],- );-return (- <ContactCalModalContext.Provider value={contextValue}>+ <ContactCalModalContext.Provider+ value={{ openContactCalModal: () => setOpen(true) }}+ >{children}- <ContactCalModal onClose={closeContactCalModal} open={open} />+ <ContactCalModal onClose={() => setOpen(false)} open={open} /></ContactCalModalContext.Provider>);}diff --git a/packages/twenty-website-new/src/lib/contact-cal/TalkToUsButton.tsx b/packages/twenty-website-new/src/sections/ContactCal/TalkToUsButton.tsxsimilarity index 80%rename from packages/twenty-website-new/src/lib/contact-cal/TalkToUsButton.tsxrename to packages/twenty-website-new/src/sections/ContactCal/TalkToUsButton.tsxindex 46e26096c3a..ba65986807a 100644--- a/packages/twenty-website-new/src/lib/contact-cal/TalkToUsButton.tsx+++ b/packages/twenty-website-new/src/sections/ContactCal/TalkToUsButton.tsx@@ -4,7 +4,7 @@ import {BaseButton,buttonBaseStyles,} from '@/design-system/components/Button/BaseButton';-import { useRenderMessage } from '@/lib/i18n/use-render-message';+import { useLingui } from '@lingui/react';import type { MessageDescriptor } from '@lingui/core';import { styled } from '@linaria/react';@@ -21,7 +21,7 @@ type TalkToUsButtonProps = {};export function TalkToUsButton({ color, label, variant }: TalkToUsButtonProps) {- const renderText = useRenderMessage();+ const { i18n } = useLingui();const { openContactCalModal } = useContactCalModal();return (@@ -31,7 +31,7 @@ export function TalkToUsButton({ color, label, variant }: TalkToUsButtonProps) {type="button"onClick={openContactCalModal}>- <BaseButton color={color} label={renderText(label)} variant={variant} />+ <BaseButton color={color} label={i18n._(label)} variant={variant} /></StyledTrigger>);}diff --git a/packages/twenty-website-new/src/lib/contact-cal/config.ts b/packages/twenty-website-new/src/sections/ContactCal/config.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/contact-cal/config.tsrename to packages/twenty-website-new/src/sections/ContactCal/config.tsdiff --git a/packages/twenty-website-new/src/lib/contact-cal/index.ts b/packages/twenty-website-new/src/sections/ContactCal/index.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/contact-cal/index.tsrename to packages/twenty-website-new/src/sections/ContactCal/index.tsdiff --git a/packages/twenty-website-new/src/sections/Demo/components/Screenshot.tsx b/packages/twenty-website-new/src/sections/Demo/components/Screenshot.tsxindex 38292aec8cc..72734f3d4e2 100644--- a/packages/twenty-website-new/src/sections/Demo/components/Screenshot.tsx+++ b/packages/twenty-website-new/src/sections/Demo/components/Screenshot.tsx@@ -1,6 +1,10 @@import type { ImageType } from '@/design-system/components/Image';-import { theme } from '@/theme';import { css } from '@linaria/core';++const coverImageClassName = css`+ object-fit: cover;+`;+import { theme } from '@/theme';import { styled } from '@linaria/react';import NextImage from 'next/image';@@ -20,10 +24,6 @@ const ScreenshotRoot = styled.div`}`;-const screenshotImageClassName = css`- object-fit: cover;-`;-type ScreenshotProps = { image: ImageType };export function Screenshot({ image }: ScreenshotProps) {@@ -31,7 +31,7 @@ export function Screenshot({ image }: ScreenshotProps) {<ScreenshotRoot><NextImagealt={image.alt}- className={screenshotImageClassName}+ className={coverImageClassName}fillsizes="(min-width: 921px) 800px, 100vw"src={image.src}diff --git a/packages/twenty-website-new/src/sections/Demo/index.ts b/packages/twenty-website-new/src/sections/Demo/index.tsnew file mode 100644index 00000000000..1f8e7705438--- /dev/null+++ b/packages/twenty-website-new/src/sections/Demo/index.ts@@ -0,0 +1 @@+export { Demo } from './components';diff --git a/packages/twenty-website-new/src/sections/Editorial/components/Body.tsx b/packages/twenty-website-new/src/sections/Editorial/components/Body.tsxindex c38aeb5c6ff..2aa6d3d3c34 100644--- a/packages/twenty-website-new/src/sections/Editorial/components/Body.tsx+++ b/packages/twenty-website-new/src/sections/Editorial/components/Body.tsx@@ -1,13 +1,11 @@import { Body as BaseBody } from '@/design-system/components';-import type { MessageBody } from '@/lib/i18n/message-body';import { theme } from '@/theme';-import type { MessageDescriptor } from '@lingui/core';+import { css } from '@linaria/core';import { styled } from '@linaria/react';-import type { ReactNode } from 'react';+import { Children, type ReactNode } from 'react';-const BodyParagraph = styled.div<{ $color: string }>`- --body-paragraph-color: ${({ $color }) => $color};- color: ${({ $color }) => $color};+const bodyParagraphClassName = css`+ color: var(--color-text-muted);min-width: 0;`;@@ -46,45 +44,29 @@ const SingleColumnBody = styled.div``;type EditorialBodyProps = {- body: MessageBody | MessageBody[];- color: string;+ children: ReactNode;layout:| 'centered'| 'indented'| 'two-column'| 'two-column-left'| 'two-column-right';- renderText: (descriptor: MessageDescriptor) => ReactNode;};-export function Body({ body, color, layout, renderText }: EditorialBodyProps) {- const paragraphs = Array.isArray(body) ? (- body.map((item, index) => (- <BodyParagraph $color={color} key={index}>- <BaseBody- as="p"- body={item}- family="sans"- renderText={renderText}- size="md"- variant="body-paragraph"- weight="regular"- />- </BodyParagraph>- ))- ) : (- <BodyParagraph $color={color}>+export function Body({ children, layout }: EditorialBodyProps) {+ const paragraphs = Children.map(children, (child) => (+ <div className={bodyParagraphClassName}><BaseBodyas="p"- body={body}family="sans"- renderText={renderText}size="md"variant="body-paragraph"weight="regular"- />- </BodyParagraph>- );+ >+ {child}+ </BaseBody>+ </div>+ ));if (layout === 'two-column' ||diff --git a/packages/twenty-website-new/src/sections/Editorial/components/Eyebrow.tsx b/packages/twenty-website-new/src/sections/Editorial/components/Eyebrow.tsxindex 545e5a9d55b..bb9e5d4b0b0 100644--- a/packages/twenty-website-new/src/sections/Editorial/components/Eyebrow.tsx+++ b/packages/twenty-website-new/src/sections/Editorial/components/Eyebrow.tsx@@ -1,24 +1,11 @@import { Eyebrow as BaseEyebrow } from '@/design-system/components';-import type { MessageEyebrow } from '@/lib/i18n/message-eyebrow';-import type { MessageDescriptor } from '@lingui/core';import type { ReactNode } from 'react';type EditorialEyebrowProps = {- colorScheme: 'primary' | 'secondary';- eyebrow: MessageEyebrow;- renderText: (descriptor: MessageDescriptor) => ReactNode;+ children: ReactNode;+ colorScheme?: 'primary' | 'secondary';};-export function Eyebrow({- colorScheme,- eyebrow,- renderText,-}: EditorialEyebrowProps) {- return (- <BaseEyebrow- colorScheme={colorScheme}- heading={eyebrow.heading}- renderText={renderText}- />- );+export function Eyebrow({ children, colorScheme }: EditorialEyebrowProps) {+ return <BaseEyebrow colorScheme={colorScheme}>{children}</BaseEyebrow>;}diff --git a/packages/twenty-website-new/src/sections/Editorial/components/Root.tsx b/packages/twenty-website-new/src/sections/Editorial/components/Root.tsxindex bc5e9da2b59..06ffc4c61d7 100644--- a/packages/twenty-website-new/src/sections/Editorial/components/Root.tsx+++ b/packages/twenty-website-new/src/sections/Editorial/components/Root.tsx@@ -1,5 +1,5 @@import { Container, GuideCrosshair } from '@/design-system/components';-import { theme } from '@/theme';+import { theme, type Scheme } from '@/theme';import { styled } from '@linaria/react';import type { ReactNode } from 'react';@@ -10,6 +10,21 @@ const StyledSection = styled.section`&[data-has-crosshair] {position: relative;}++ &[data-scheme='light'] {+ background-color: var(--color-white);+ color: var(--color-text);+ }++ &[data-scheme='muted'] {+ background-color: var(--color-neutral);+ color: var(--color-text);+ }++ &[data-scheme='dark'] {+ background-color: var(--color-black);+ color: var(--color-text);+ }`;const Inner = styled.div`@@ -39,10 +54,11 @@ type EditorialCrosshair = {};type RootProps = {- backgroundColor: string;+ backgroundColor?: string;children: ReactNode;- color: string;+ color?: string;crosshair?: EditorialCrosshair;+ scheme?: Scheme;};export function Root({@@ -50,11 +66,13 @@ export function Root({children,color,crosshair,+ scheme,}: RootProps) {return (<StyledSectiondata-has-crosshair={crosshair ? '' : undefined}- style={{ backgroundColor, color }}+ data-scheme={scheme}+ style={scheme ? undefined : { backgroundColor, color }}>{crosshair ? (<GuideCrosshairdiff --git a/packages/twenty-website-new/src/sections/Editorial/index.ts b/packages/twenty-website-new/src/sections/Editorial/index.tsnew file mode 100644index 00000000000..4a22f5aa27a--- /dev/null+++ b/packages/twenty-website-new/src/sections/Editorial/index.ts@@ -0,0 +1 @@+export { Editorial } from './components';diff --git a/packages/twenty-website-new/src/sections/Editorial/types/EditorialData.ts b/packages/twenty-website-new/src/sections/Editorial/types/EditorialData.tsdeleted file mode 100644index 6a24cd11fdd..00000000000--- a/packages/twenty-website-new/src/sections/Editorial/types/EditorialData.ts+++ /dev/null@@ -1,7 +0,0 @@-import type { MessageBody } from '@/lib/i18n/message-body';-import type { MessageEyebrow } from '@/lib/i18n/message-eyebrow';--export type EditorialDataType = {- eyebrow?: MessageEyebrow;- body: MessageBody | MessageBody[];-};diff --git a/packages/twenty-website-new/src/sections/EngagementBand/components/Body.tsx b/packages/twenty-website-new/src/sections/EngagementBand/components/Body.tsxindex 32e77a1670c..dc48cb86dca 100644--- a/packages/twenty-website-new/src/sections/EngagementBand/components/Body.tsx+++ b/packages/twenty-website-new/src/sections/EngagementBand/components/Body.tsx@@ -1,26 +1,19 @@import { Body as BaseBody } from '@/design-system/components';-import type { MessageBody } from '@/lib/i18n/message-body';-import type { MessageDescriptor } from '@lingui/core';import { styled } from '@linaria/react';import type { ReactNode } from 'react';const StyledBody = styled(BaseBody)`- --body-sm-color: color-mix(in srgb, currentColor 90%, transparent);max-width: 668px;`;type BodyProps = {- body: MessageBody;- renderText: (descriptor: MessageDescriptor) => ReactNode;+ children: ReactNode;};-export function Body({ body, renderText }: BodyProps) {+export function Body({ children }: BodyProps) {return (- <StyledBody- body={body}- renderText={renderText}- size="sm"- weight="regular"- />+ <StyledBody size="sm" weight="regular">+ {children}+ </StyledBody>);}diff --git a/packages/twenty-website-new/src/sections/EngagementBand/components/Heading.tsx b/packages/twenty-website-new/src/sections/EngagementBand/components/Heading.tsxindex a267944db8e..0b5e89c0b5c 100644--- a/packages/twenty-website-new/src/sections/EngagementBand/components/Heading.tsx+++ b/packages/twenty-website-new/src/sections/EngagementBand/components/Heading.tsx@@ -1,8 +1,6 @@import { Heading as BaseHeading } from '@/design-system/components';import type { HeadingSize } from '@/design-system/components/Heading';-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';import { theme } from '@/theme';-import type { MessageDescriptor } from '@lingui/core';import { styled } from '@linaria/react';import type { ReactNode } from 'react';@@ -15,18 +13,14 @@ const StyledHeading = styled(BaseHeading)``;type HeadingProps = {- segments: MessageHeadingSegment;- renderText: (descriptor: MessageDescriptor) => ReactNode;+ children: ReactNode;size?: HeadingSize;};-export function Heading({ segments, renderText, size = 'sm' }: HeadingProps) {+export function Heading({ children, size = 'sm' }: HeadingProps) {return (- <StyledHeading- renderText={renderText}- segments={segments}- size={size}- weight="light"- />+ <StyledHeading size={size} weight="light">+ {children}+ </StyledHeading>);}diff --git a/packages/twenty-website-new/src/sections/EngagementBand/components/Root.tsx b/packages/twenty-website-new/src/sections/EngagementBand/components/Root.tsxindex baf44a0995b..06dd5a525c5 100644--- a/packages/twenty-website-new/src/sections/EngagementBand/components/Root.tsx+++ b/packages/twenty-website-new/src/sections/EngagementBand/components/Root.tsx@@ -1,5 +1,5 @@import { Container } from '@/design-system/components';-import { theme } from '@/theme';+import { theme, type Scheme } from '@/theme';import { styled } from '@linaria/react';import type { ReactNode } from 'react';@@ -7,6 +7,18 @@ const StyledSection = styled.section<{ compactBottom: boolean }>`padding-bottom: ${({ compactBottom }) =>compactBottom ? theme.spacing(6) : theme.spacing(20)};width: 100%;++ &[data-scheme='light'] {+ background-color: var(--color-white);+ }++ &[data-scheme='muted'] {+ background-color: var(--color-neutral);+ }++ &[data-scheme='dark'] {+ background-color: var(--color-black);+ }`;const StyledContainer = styled(Container)`@@ -23,18 +35,24 @@ const StyledContainer = styled(Container)``;type RootProps = {- backgroundColor: string;+ backgroundColor?: string;children: ReactNode;compactBottom?: boolean;+ scheme?: Scheme;};export function Root({backgroundColor,children,compactBottom = false,+ scheme,}: RootProps) {return (- <StyledSection compactBottom={compactBottom} style={{ backgroundColor }}>+ <StyledSection+ compactBottom={compactBottom}+ data-scheme={scheme}+ style={scheme ? undefined : { backgroundColor }}+ ><StyledContainer>{children}</StyledContainer></StyledSection>);diff --git a/packages/twenty-website-new/src/sections/EngagementBand/components/Strip.tsx b/packages/twenty-website-new/src/sections/EngagementBand/components/Strip.tsxindex 1d5d9feefd5..f65520ab594 100644--- a/packages/twenty-website-new/src/sections/EngagementBand/components/Strip.tsx+++ b/packages/twenty-website-new/src/sections/EngagementBand/components/Strip.tsx@@ -5,8 +5,8 @@ import NextImage from 'next/image';import type { ReactNode } from 'react';const OVERLAY_SRC_BY_TONE = {- white: '/images/shared/engagement-band/halftone-on-white.png',- gray: '/images/shared/engagement-band/halftone-on-gray.png',+ white: '/images/shared/engagement-band/halftone-on-white.webp',+ gray: '/images/shared/engagement-band/halftone-on-gray.webp',} as const;type StripTone = keyof typeof OVERLAY_SRC_BY_TONE;diff --git a/packages/twenty-website-new/src/sections/EngagementBand/index.ts b/packages/twenty-website-new/src/sections/EngagementBand/index.tsnew file mode 100644index 00000000000..474ae3024bf--- /dev/null+++ b/packages/twenty-website-new/src/sections/EngagementBand/index.ts@@ -0,0 +1 @@+export { EngagementBand } from './components';diff --git a/packages/twenty-website-new/src/sections/Faq/components/Root.tsx b/packages/twenty-website-new/src/sections/Faq/Faq.tsxsimilarity index 52%rename from packages/twenty-website-new/src/sections/Faq/components/Root.tsxrename to packages/twenty-website-new/src/sections/Faq/Faq.tsxindex 3b6d0836686..17d92224044 100644--- a/packages/twenty-website-new/src/sections/Faq/components/Root.tsx+++ b/packages/twenty-website-new/src/sections/Faq/Faq.tsx@@ -1,7 +1,9 @@-import { Container } from '@/design-system/components';+import { Container, Heading as BaseHeading } from '@/design-system/components';import { WebGlMount } from '@/lib/visual-runtime';import { FaqBackground } from '@/sections/Faq/visuals/Background';+import { FaqItems } from '@/sections/Faq/FaqItems';import { theme } from '@/theme';+import { css } from '@linaria/core';import { styled } from '@linaria/react';import type { ReactNode } from 'react';@@ -39,13 +41,34 @@ const StyledContainer = styled(Container)`}`;-type RootProps = {+const StyledIntro = styled.div`+ display: grid;+ grid-template-columns: 1fr;+ row-gap: ${theme.spacing(6)};+`;++const faqHeadingClassName = css`+ white-space: pre-line;++ @media (min-width: ${theme.breakpoints.md}px) {+ max-width: 700px;+ }+`;++const StyledCta = styled.div`+ column-gap: ${theme.spacing(2)};+ display: grid;+ grid-template-columns: auto auto;+ justify-content: start;+`;++type ChildrenProps = {children: ReactNode;};-export function Root({ children }: RootProps) {+function Root({ children }: ChildrenProps) {return (- <StyledSection>+ <StyledSection data-scheme="dark"><IllustrationLayer aria-hidden><WebGlMount><FaqBackground />@@ -55,3 +78,32 @@ export function Root({ children }: RootProps) {</StyledSection>);}++function Intro({ children }: ChildrenProps) {+ return <StyledIntro>{children}</StyledIntro>;+}++function Heading({ children }: ChildrenProps) {+ return (+ <BaseHeading+ as="h2"+ className={faqHeadingClassName}+ size="lg"+ weight="light"+ >+ {children}+ </BaseHeading>+ );+}++function Cta({ children }: ChildrenProps) {+ return <StyledCta>{children}</StyledCta>;+}++export const Faq = {+ Cta,+ Heading,+ Intro,+ Items: FaqItems,+ Root,+};diff --git a/packages/twenty-website-new/src/sections/Faq/components/Item.tsx b/packages/twenty-website-new/src/sections/Faq/FaqItems.tsxsimilarity index 86%rename from packages/twenty-website-new/src/sections/Faq/components/Item.tsxrename to packages/twenty-website-new/src/sections/Faq/FaqItems.tsxindex 000af100f8b..734701c74af 100644--- a/packages/twenty-website-new/src/sections/Faq/components/Item.tsx+++ b/packages/twenty-website-new/src/sections/Faq/FaqItems.tsx@@ -1,17 +1,28 @@'use client';+import { Accordion as BaseAccordion } from '@base-ui/react/accordion';import {MinusIcon,PlusIcon,RectangleFillIcon,RectangleOutlineIcon,} from '@/icons';-import type { FaqQuestionType } from '@/sections/Faq/types/FaqQuestion';-import { useRenderMessage } from '@/lib/i18n/use-render-message';+import type { FaqQuestionType } from '@/sections/Faq/faq.data';+import { useLingui } from '@lingui/react';import { theme } from '@/theme';-import { Accordion as BaseAccordion } from '@base-ui/react/accordion';import { styled } from '@linaria/react';+const AccordionList = styled.div`+ margin-bottom: 0;+ margin-left: auto;+ margin-right: auto;+ margin-top: 0;++ @media (min-width: ${theme.breakpoints.md}px) {+ width: 66%;+ }+`;+const QuestionText = styled.span`color: ${theme.colors.secondary.text[40]};font-size: 2rem;@@ -118,7 +129,7 @@ const RowTrigger = styled.button`}`;-export const ItemRow = styled.div`+const ItemRow = styled.div`border-top: 1px solid ${theme.colors.secondary.text[40]};display: grid;grid-template-columns: 14px 12px 1fr 32px 36px;@@ -207,8 +218,8 @@ type ItemProps = {value: string;};-export function Item({ question, value }: ItemProps) {- const renderText = useRenderMessage();+function Item({ question, value }: ItemProps) {+ const { i18n } = useLingui();return (<BaseAccordion.Item key={value} value={value} render={<ItemRow />}>@@ -229,7 +240,7 @@ export function Item({ question, value }: ItemProps) {</QuestionIconLayer></QuestionIconContainer>- <QuestionText>{renderText(question.question.text)}</QuestionText>+ <QuestionText>{i18n._(question.question)}</QuestionText><ToggleContainer><ToggleVisual aria-hidden>@@ -252,9 +263,23 @@ export function Item({ question, value }: ItemProps) {<BaseAccordion.Panel render={<AnswerWrapper />} keepMounted><AnswerInner>- <AnswerText>{renderText(question.answer.text)}</AnswerText>+ <AnswerText>{i18n._(question.answer)}</AnswerText></AnswerInner></BaseAccordion.Panel></BaseAccordion.Item>);}++type FaqItemsProps = {+ questions: FaqQuestionType[];+};++export function FaqItems({ questions }: FaqItemsProps) {+ return (+ <BaseAccordion.Root render={<AccordionList />}>+ {questions.map((faqQuestion, index) => (+ <Item key={index} question={faqQuestion} value={`faq-${index}`} />+ ))}+ </BaseAccordion.Root>+ );+}diff --git a/packages/twenty-website-new/src/sections/Faq/components/Cta.tsx b/packages/twenty-website-new/src/sections/Faq/components/Cta.tsxdeleted file mode 100644index 3a65dd915b6..00000000000--- a/packages/twenty-website-new/src/sections/Faq/components/Cta.tsx+++ /dev/null@@ -1,18 +0,0 @@-import { theme } from '@/theme';-import { styled } from '@linaria/react';-import type { ReactNode } from 'react';--const StyledCta = styled.div`- column-gap: ${theme.spacing(2)};- display: grid;- grid-template-columns: auto auto;- justify-content: start;-`;--type CtaProps = {- children: ReactNode;-};--export function Cta({ children }: CtaProps) {- return <StyledCta>{children}</StyledCta>;-}diff --git a/packages/twenty-website-new/src/sections/Faq/components/Heading.tsx b/packages/twenty-website-new/src/sections/Faq/components/Heading.tsxdeleted file mode 100644index 1b585524de5..00000000000--- a/packages/twenty-website-new/src/sections/Faq/components/Heading.tsx+++ /dev/null@@ -1,29 +0,0 @@-import { Heading as BaseHeading } from '@/design-system/components';-import { theme } from '@/theme';-import { css } from '@linaria/core';-import type { ReactNode } from 'react';--const faqHeadingClassName = css`- white-space: pre-line;-- @media (min-width: ${theme.breakpoints.md}px) {- max-width: 700px;- }-`;--type HeadingProps = {- children: ReactNode;-};--export function Heading({ children }: HeadingProps) {- return (- <BaseHeading- as="h2"- className={faqHeadingClassName}- size="lg"- weight="light"- >- {children}- </BaseHeading>- );-}diff --git a/packages/twenty-website-new/src/sections/Faq/components/Intro.tsx b/packages/twenty-website-new/src/sections/Faq/components/Intro.tsxdeleted file mode 100644index b73d532ca7d..00000000000--- a/packages/twenty-website-new/src/sections/Faq/components/Intro.tsx+++ /dev/null@@ -1,17 +0,0 @@-import { theme } from '@/theme';-import { styled } from '@linaria/react';-import type { ReactNode } from 'react';--const StyledIntro = styled.div`- display: grid;- grid-template-columns: 1fr;- row-gap: ${theme.spacing(6)};-`;--type IntroProps = {- children: ReactNode;-};--export function Intro({ children }: IntroProps) {- return <StyledIntro>{children}</StyledIntro>;-}diff --git a/packages/twenty-website-new/src/sections/Faq/components/Items.tsx b/packages/twenty-website-new/src/sections/Faq/components/Items.tsxdeleted file mode 100644index 056e4ce10b3..00000000000--- a/packages/twenty-website-new/src/sections/Faq/components/Items.tsx+++ /dev/null@@ -1,32 +0,0 @@-'use client';--import { Accordion as BaseAccordion } from '@base-ui/react/accordion';-import { theme } from '@/theme';-import { styled } from '@linaria/react';-import type { FaqQuestionType } from '@/sections/Faq/types/FaqQuestion';-import { Item } from './Item';--type ItemsProps = {- questions: FaqQuestionType[];-};--const AccordionList = styled.div`- margin-bottom: 0;- margin-left: auto;- margin-right: auto;- margin-top: 0;-- @media (min-width: ${theme.breakpoints.md}px) {- width: 66%;- }-`;--export function Items({ questions }: ItemsProps) {- return (- <BaseAccordion.Root render={<AccordionList />}>- {questions.map((faqQuestion, index) => (- <Item key={index} question={faqQuestion} value={`faq-${index}`} />- ))}- </BaseAccordion.Root>- );-}diff --git a/packages/twenty-website-new/src/sections/Faq/components/index.ts b/packages/twenty-website-new/src/sections/Faq/components/index.tsdeleted file mode 100644index 8cfe5ef227f..00000000000--- a/packages/twenty-website-new/src/sections/Faq/components/index.ts+++ /dev/null@@ -1,13 +0,0 @@-import { Cta } from './Cta';-import { Heading } from './Heading';-import { Intro } from './Intro';-import { Items } from './Items';-import { Root } from './Root';--export const Faq = {- Cta,- Heading,- Intro,- Items,- Root,-};diff --git a/packages/twenty-website-new/src/sections/Faq/data.ts b/packages/twenty-website-new/src/sections/Faq/data.tsdeleted file mode 100644index 7c73b96e061..00000000000--- a/packages/twenty-website-new/src/sections/Faq/data.ts+++ /dev/null@@ -1,76 +0,0 @@-import { msg } from '@lingui/core/macro';-import type { FaqDataType } from '@/sections/Faq/types';--export const FAQ_DATA: FaqDataType = {- eyebrow: {- heading: {- text: msg`Any Questions?`,- fontFamily: 'sans',- },- },- questions: [- {- question: {- text: msg`Is Twenty really open-source?`,- fontFamily: 'sans',- },- answer: {- text: msg`Yes. Twenty is the #1 Open Source CRM on GitHub. You can self-host to fully own your infrastructure, or run it on our managed cloud for a zero-ops setup.`,- },- },- {- question: {- text: msg`How long does it take to get started?`,- fontFamily: 'sans',- },- answer: {- text: msg`Sign up for Cloud in under a minute and start your 30-day trial. For larger rollouts, our 4-hour Onboarding Packs or certified partners get you live in 1–2 weeks.`,- },- },- {- question: {- text: msg`Can I migrate from Salesforce or HubSpot?`,- fontFamily: 'sans',- },- answer: {- text: msg`Yes. Import your data via CSV, or use our API for 50,000+ records. Our partners can handle the full migration for you.`,- },- },- {- question: {- text: msg`Do I need a developer to customize Twenty?`,- fontFamily: 'sans',- },- answer: {- text: msg`No. Build custom objects, fields, views, and no-code workflows straight from Settings. Unlimited, no extra charge.`,- },- },- {- question: {- text: msg`Can developers extend Twenty with code?`,- fontFamily: 'sans',- },- answer: {- text: msg`Yes, with our Apps framework. Scaffold an extension with \`npx create-twenty-app\` and ship custom objects, server-side logic functions, React components that render inside Twenty\u2019s UI, AI skills and agents, views, and navigation, all in TypeScript, deployable to any workspace.`,- },- },- {- question: {- text: msg`Does Twenty work with Claude, ChatGPT, and Cursor?`,- fontFamily: 'sans',- },- answer: {- text: msg`Yes. Every Cloud workspace ships with a native MCP server. Connect your AI assistant via OAuth and it can read and write your CRM data in natural language.`,- },- },- {- question: {- text: msg`What does Twenty cost?`,- fontFamily: 'sans',- },- answer: {- text: msg`Cloud Pro is $9/user/month (yearly). Organization is $19/user/month and unlocks SSO and row-level permissions for teams that need finer access control.`,- },- },- ],-};diff --git a/packages/twenty-website-new/src/sections/Faq/faq.data.ts b/packages/twenty-website-new/src/sections/Faq/faq.data.tsnew file mode 100644index 00000000000..fae0454dd23--- /dev/null+++ b/packages/twenty-website-new/src/sections/Faq/faq.data.ts@@ -0,0 +1,38 @@+import { msg } from '@lingui/core/macro';+import type { MessageDescriptor } from '@lingui/core';++export type FaqQuestionType = {+ question: MessageDescriptor;+ answer: MessageDescriptor;+};++export const FAQ_QUESTIONS: FaqQuestionType[] = [+ {+ question: msg`Is Twenty really open-source?`,+ answer: msg`Yes. Twenty is the #1 Open Source CRM on GitHub. You can self-host to fully own your infrastructure, or run it on our managed cloud for a zero-ops setup.`,+ },+ {+ question: msg`How long does it take to get started?`,+ answer: msg`Sign up for Cloud in under a minute and start your 30-day trial. For larger rollouts, our 4-hour Onboarding Packs or certified partners get you live in 1–2 weeks.`,+ },+ {+ question: msg`Can I migrate from Salesforce or HubSpot?`,+ answer: msg`Yes. Import your data via CSV, or use our API for 50,000+ records. Our partners can handle the full migration for you.`,+ },+ {+ question: msg`Do I need a developer to customize Twenty?`,+ answer: msg`No. Build custom objects, fields, views, and no-code workflows straight from Settings. Unlimited, no extra charge.`,+ },+ {+ question: msg`Can developers extend Twenty with code?`,+ answer: msg`Yes, with our Apps framework. Scaffold an extension with \`npx create-twenty-app\` and ship custom objects, server-side logic functions, React components that render inside Twenty\u2019s UI, AI skills and agents, views, and navigation, all in TypeScript, deployable to any workspace.`,+ },+ {+ question: msg`Does Twenty work with Claude, ChatGPT, and Cursor?`,+ answer: msg`Yes. Every Cloud workspace ships with a native MCP server. Connect your AI assistant via OAuth and it can read and write your CRM data in natural language.`,+ },+ {+ question: msg`What does Twenty cost?`,+ answer: msg`Cloud Pro is $9/user/month (yearly). Organization is $19/user/month and unlocks SSO and row-level permissions for teams that need finer access control.`,+ },+];diff --git a/packages/twenty-website-new/src/sections/Faq/index.ts b/packages/twenty-website-new/src/sections/Faq/index.tsnew file mode 100644index 00000000000..d444ce801e2--- /dev/null+++ b/packages/twenty-website-new/src/sections/Faq/index.ts@@ -0,0 +1,2 @@+export { Faq } from './Faq';+export { FAQ_QUESTIONS } from './faq.data';diff --git a/packages/twenty-website-new/src/sections/Faq/types/FaqData.ts b/packages/twenty-website-new/src/sections/Faq/types/FaqData.tsdeleted file mode 100644index 5b2b1f2ccff..00000000000--- a/packages/twenty-website-new/src/sections/Faq/types/FaqData.ts+++ /dev/null@@ -1,7 +0,0 @@-import type { MessageEyebrow } from '@/lib/i18n/message-eyebrow';-import { type FaqQuestionType } from '@/sections/Faq/types/FaqQuestion';--export type FaqDataType = {- eyebrow: MessageEyebrow;- questions: FaqQuestionType[];-};diff --git a/packages/twenty-website-new/src/sections/Faq/types/FaqQuestion.ts b/packages/twenty-website-new/src/sections/Faq/types/FaqQuestion.tsdeleted file mode 100644index 4bcf494bd05..00000000000--- a/packages/twenty-website-new/src/sections/Faq/types/FaqQuestion.ts+++ /dev/null@@ -1,7 +0,0 @@-import type { MessageBody } from '@/lib/i18n/message-body';-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';--export type FaqQuestionType = {- question: MessageHeadingSegment;- answer: MessageBody;-};diff --git a/packages/twenty-website-new/src/sections/Faq/types/index.ts b/packages/twenty-website-new/src/sections/Faq/types/index.tsdeleted file mode 100644index 08f9220111f..00000000000--- a/packages/twenty-website-new/src/sections/Faq/types/index.ts+++ /dev/null@@ -1,2 +0,0 @@-export type { FaqDataType } from './FaqData';-export type { FaqQuestionType } from './FaqQuestion';diff --git a/packages/twenty-website-new/src/sections/Faq/visuals/Background.tsx b/packages/twenty-website-new/src/sections/Faq/visuals/Background.tsxindex 45d1b39baa6..adc25b49517 100644--- a/packages/twenty-website-new/src/sections/Faq/visuals/Background.tsx+++ b/packages/twenty-website-new/src/sections/Faq/visuals/Background.tsx@@ -1,331 +1,10 @@'use client';-import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment.js';-import { loadImportedGeometryFromUrl } from '@/lib/halftone';import { theme } from '@/theme';import { styled } from '@linaria/react';-import { useEffect, useLayoutEffect, useRef } from 'react';-import * as THREE from 'three';+import { useLayoutEffect, useRef } from 'react';import { createAnimationFrameLoop } from '@/lib/animation';-import { observeElementSize } from '@/lib/dom/observe-element-size';-import {- createVisualRenderLoop,- tryCreateSiteWebGlRenderer,- type VisualRenderLoop,- type VisualRenderLoopFrame,-} from '@/lib/visual-runtime';--const VIRTUAL_RENDER_HEIGHT = 768;--const passThroughVertexShader = /* glsl */ `- varying vec2 vUv;-- void main() {- vUv = uv;- gl_Position = vec4(position, 1.0);- }-`;--const blurFragmentShader = /* glsl */ `- precision highp float;-- uniform sampler2D tInput;- uniform vec2 dir;- uniform vec2 res;-- varying vec2 vUv;-- void main() {- vec4 sum = vec4(0.0);- vec2 px = dir / res;-- float w[5];- w[0] = 0.227027;- w[1] = 0.1945946;- w[2] = 0.1216216;- w[3] = 0.054054;- w[4] = 0.016216;-- sum += texture2D(tInput, vUv) * w[0];-- for (int i = 1; i < 5; i++) {- float fi = float(i) * 3.0;- sum += texture2D(tInput, vUv + px * fi) * w[i];- sum += texture2D(tInput, vUv - px * fi) * w[i];- }-- gl_FragColor = sum;- }-`;--const halftoneFragmentShader = /* glsl */ `- precision highp float;-- uniform sampler2D tScene;- uniform sampler2D tGlow;- uniform vec2 resolution;- uniform float numRows;- uniform float glowStr;- uniform float contrast;- uniform float power;- uniform float shading;- uniform float baseInk;- uniform float maxBar;- uniform float rowMerge;- uniform float cellRatio;- uniform float cutoff;- uniform float highlightOpen;- uniform float shadowGrouping;- uniform float shadowCrush;- uniform vec3 dashColor;- uniform float time;- uniform float waveAmount;- uniform float waveSpeed;- uniform float distanceScale;- uniform vec2 interactionUv;- uniform vec2 interactionVelocity;- uniform vec2 dragOffset;- uniform float hoverLightStrength;- uniform float hoverLightRadius;- uniform float hoverFlowStrength;- uniform float hoverFlowRadius;- uniform float dragFlowStrength;- uniform float dragFlowRadius;- uniform float cropToBounds;-- varying vec2 vUv;-- void main() {- // Crop to image bounds: discard fragments outside source image (image mode only)- if (cropToBounds > 0.5) {- vec4 boundsCheck = texture2D(tScene, vUv);- if (boundsCheck.a < 0.01) {- gl_FragColor = vec4(0.0);- return;- }- }-- float baseRowH = resolution.y / (numRows * distanceScale);- vec2 pointerPx = interactionUv * resolution;- vec2 fragDelta = gl_FragCoord.xy - pointerPx;- float fragDist = length(fragDelta);- vec2 radialDir = fragDist > 0.001 ? fragDelta / fragDist : vec2(0.0, 1.0);- float velocityMagnitude = length(interactionVelocity);- vec2 motionDir = velocityMagnitude > 0.001- ? interactionVelocity / velocityMagnitude- : vec2(0.0, 0.0);- float motionBias = velocityMagnitude > 0.001- ? dot(-radialDir, motionDir) * 0.5 + 0.5- : 0.5;-- float hoverLightMask = 0.0;- if (hoverLightStrength > 0.0) {- float lightRadiusPx = hoverLightRadius * resolution.y;- hoverLightMask = smoothstep(lightRadiusPx, 0.0, fragDist);- }-- float hoverFlowMask = 0.0;- if (hoverFlowStrength > 0.0) {- float hoverRadiusPx = hoverFlowRadius * resolution.y;- hoverFlowMask = smoothstep(hoverRadiusPx, 0.0, fragDist);- }-- float dragFlowMask = 0.0;- if (dragFlowStrength > 0.0) {- float dragRadiusPx = dragFlowRadius * resolution.y;- dragFlowMask = smoothstep(dragRadiusPx, 0.0, fragDist);- }-- vec2 hoverDisplacement =- radialDir * hoverFlowStrength * hoverFlowMask * baseRowH * 0.55 +- motionDir * hoverFlowStrength * hoverFlowMask * (0.4 + motionBias) * baseRowH * 1.15;- vec2 dragDisplacement = dragOffset * dragFlowMask * dragFlowStrength * 0.8;- vec2 effectCoord = gl_FragCoord.xy + hoverDisplacement + dragDisplacement;-- float densityBoost =- hoverFlowStrength * hoverFlowMask * 0.22 +- dragFlowStrength * dragFlowMask * 0.16;- float rowH = baseRowH / (1.0 + densityBoost);-- float offsetY = effectCoord.y;- float row = floor(offsetY / rowH);- float rowFrac = offsetY / rowH - row;- float rowV = (row + 0.5) * rowH / resolution.y;- float dy = abs(rowFrac - 0.5);-- float waveOffset = waveAmount * sin(time * waveSpeed + row * 0.5) * rowH;- float effectiveX = effectCoord.x + waveOffset;-- float localCellRatio = cellRatio * (- 1.0 +- hoverFlowStrength * hoverFlowMask * 0.08 +- dragFlowStrength * dragFlowMask * 0.1 * motionBias- );- float cellW = rowH * localCellRatio;- float cellIdx = floor(effectiveX / cellW);- float cellFrac = (effectiveX - cellIdx * cellW) / cellW;- float cellU = (cellIdx + 0.5) * cellW / resolution.x;-- vec2 sampleUv = vec2(- clamp(cellU, 0.0, 1.0),- clamp(rowV, 0.0, 1.0)- );-- vec4 sceneSample = texture2D(tScene, sampleUv);- vec4 glowCell = texture2D(tGlow, sampleUv);-- float mask = smoothstep(0.02, 0.08, sceneSample.a);- float lum = dot(sceneSample.rgb, vec3(0.299, 0.587, 0.114));- float avgLum = dot(glowCell.rgb, vec3(0.299, 0.587, 0.114));- float detail = lum - avgLum;-- float litLum = lum + max(detail, 0.0) * shading- - max(-detail, 0.0) * shading * 0.55;- float lightLift =- hoverLightStrength * hoverLightMask * mix(0.78, 1.18, motionBias) * 0.34;- float lightFocus = hoverLightStrength * hoverLightMask * 0.12;- litLum = clamp(litLum + lightLift, 0.0, 1.0);- litLum = clamp((litLum - cutoff) / max(1.0 - cutoff, 0.001), 0.0, 1.0);- litLum = pow(litLum, max(contrast - lightFocus, 0.25));-- float darkness = 1.0 - litLum;- float groupedLum = clamp((avgLum - cutoff) / max(1.0 - cutoff, 0.001), 0.0, 1.0);- groupedLum = pow(groupedLum, max(contrast * 0.9, 0.25));- float groupedDarkness = 1.0 - groupedLum;- darkness = mix(darkness, max(darkness, groupedDarkness), shadowGrouping);- darkness = clamp(- (darkness - highlightOpen) / max(1.0 - highlightOpen, 0.001),- 0.0,- 1.0- );-- float shadowMask = smoothstep(0.42, 0.96, darkness);- darkness = mix(- darkness,- mix(darkness, 1.0, shadowMask),- shadowCrush- );-- float inkBase = baseInk * smoothstep(0.03, 0.24, darkness);- float ink = mix(inkBase, 1.0, darkness);- float fill = pow(ink, 1.05) * power;- fill = clamp(fill, 0.0, 1.0) * mask;-- float dynamicBarHalf = mix(0.08, maxBar, smoothstep(0.03, 0.85, ink));- float dynamicBarHalfY = min(- dynamicBarHalf + rowMerge * smoothstep(0.42, 0.98, ink),- 0.78- );- float dx2 = abs(cellFrac - 0.5);- float halfFill = fill * 0.5;- float bodyHalfW = max(halfFill - dynamicBarHalf * (rowH / cellW), 0.0);- float capRX = dynamicBarHalf * rowH;- float capRY = dynamicBarHalfY * rowH;-- float inDash = 0.0;- if (dx2 <= bodyHalfW) {- float edgeDist = dynamicBarHalfY - dy;- inDash = smoothstep(-0.03, 0.03, edgeDist);- } else {- float cdx = (dx2 - bodyHalfW) * cellW;- float cdy = dy * rowH;- float ellipseDist = sqrt(- (cdx * cdx) / max(capRX * capRX, 0.0001) +- (cdy * cdy) / max(capRY * capRY, 0.0001)- );- inDash = 1.0 - smoothstep(1.0 - 0.08, 1.0 + 0.08, ellipseDist);- }-- inDash *= step(0.001, ink) * mask;- inDash *= 1.0 + 0.03 * sin(time * 0.8 + row * 0.1);-- vec4 glow = texture2D(tGlow, vUv);- float glowLum = dot(glow.rgb, vec3(0.299, 0.587, 0.114));- float halo = glowLum * glowStr * 0.25 * (1.0 - inDash);- float sharp = smoothstep(0.3, 0.5, inDash + halo);- vec3 color = dashColor * sharp;-- gl_FragColor = vec4(color, sharp);-- #include <tonemapping_fragment>- #include <colorspace_fragment>- }-`;--const GLB_URL = '/illustrations/common/faq/faq.glb';--const LIGHT_INTENSITY = 3.1;-const FILL_LIGHT_INTENSITY = 0.15;-const AMBIENT_LIGHT_INTENSITY = 0.08;-const LIGHT_ANGLE_DEGREES = 45;-const LIGHT_HEIGHT = 2;--const MATERIAL_ROUGHNESS = 0.42;-const MATERIAL_METALNESS = 0.16;--const HALFTONE_ROWS = 127;-const HALFTONE_CONTRAST = 1.6;-const HALFTONE_POWER = 1.2;-const HALFTONE_SHADING = 1.6;-const HALFTONE_BASE_INK = 0.16;-const HALFTONE_MAX_BAR = 0.24;-const HALFTONE_CELL_RATIO = 2.2;-const HALFTONE_CUTOFF = 0.02;-const HALFTONE_DASH_COLOR = '#4A38F5';--const ROTATE_AXIS: 'x' | 'y' | 'z' | 'xy' | '-x' | '-y' | '-z' | '-xy' = '-z';-const ROTATE_SPEED = 0.1;-const ROTATE_PING_PONG = false;-const INITIAL_ROTATE_ELAPSED = 275.10000000007847;-const INITIAL_TIME_ELAPSED = 249.21849999998116;-const BASE_CAMERA_DISTANCE = 4;-const MODEL_OFFSET_Y = 0.52;--function createEnvironmentTexture(renderer: THREE.WebGLRenderer) {- const pmremGenerator = new THREE.PMREMGenerator(renderer);- const environmentTexture = pmremGenerator.fromScene(- new RoomEnvironment(),- 0.04,- ).texture;- pmremGenerator.dispose();-- return environmentTexture;-}--function createRenderTarget(width: number, height: number) {- return new THREE.WebGLRenderTarget(width, height, {- minFilter: THREE.LinearFilter,- magFilter: THREE.LinearFilter,- format: THREE.RGBAFormat,- });-}--function setPrimaryLightPosition(- light: THREE.DirectionalLight,- angleDegrees: number,- height: number,-) {- const lightAngle = (angleDegrees * Math.PI) / 180;- light.position.set(- Math.cos(lightAngle) * 5,- height,- Math.sin(lightAngle) * 5,- );-}--function createFaqMaterial(environmentTexture: THREE.Texture) {- return new THREE.MeshPhysicalMaterial({- color: 0xd4d0c8,- roughness: MATERIAL_ROUGHNESS,- metalness: MATERIAL_METALNESS,- envMap: environmentTexture,- envMapIntensity: 0.25,- clearcoat: 0,- clearcoatRoughness: 0.08,- reflectivity: 0.5,- transmission: 0,- });-}+import { useFaqBackground } from './use-faq-background';const FaqVisualShell = styled.div`bottom: 0;@@ -399,325 +78,7 @@ export function FaqBackground() {};}, []);- useEffect(() => {- const container = mountReference.current;-- if (!container) {- return;- }-- let cancelled = false;- let renderLoop: VisualRenderLoop | null = null;- let rotateElapsed = INITIAL_ROTATE_ELAPSED;-- const getWidth = () => Math.max(container.clientWidth, 1);- const getHeight = () => Math.max(container.clientHeight, 1);- const getVirtualHeight = () => Math.max(VIRTUAL_RENDER_HEIGHT, getHeight());- const getVirtualWidth = () =>- Math.max(- Math.round(- getVirtualHeight() * (getWidth() / Math.max(getHeight(), 1)),- ),- 1,- );-- const renderer = tryCreateSiteWebGlRenderer({- antialias: false,- alpha: true,- onContextLost: () => {- renderLoop?.stop();- },- });-- if (renderer === null) {- return;- }-- renderer.outputColorSpace = THREE.SRGBColorSpace;- renderer.setPixelRatio(1);- renderer.setClearColor(0x000000, 0);- renderer.setSize(getVirtualWidth(), getVirtualHeight(), false);-- const canvas = renderer.domElement;- canvas.style.display = 'block';- canvas.style.height = '100%';- canvas.style.width = '100%';- container.appendChild(canvas);-- const environmentTexture = createEnvironmentTexture(renderer);- const scene3d = new THREE.Scene();- scene3d.background = null;-- const camera = new THREE.PerspectiveCamera(- 45,- getWidth() / getHeight(),- 0.1,- 100,- );- camera.position.z = BASE_CAMERA_DISTANCE;-- const primaryLight = new THREE.DirectionalLight(0xffffff, LIGHT_INTENSITY);- setPrimaryLightPosition(primaryLight, LIGHT_ANGLE_DEGREES, LIGHT_HEIGHT);- scene3d.add(primaryLight);-- const fillLight = new THREE.DirectionalLight(- 0xffffff,- FILL_LIGHT_INTENSITY,- );- fillLight.position.set(-3, -1, 1);- scene3d.add(fillLight);-- const ambientLight = new THREE.AmbientLight(- 0xffffff,- AMBIENT_LIGHT_INTENSITY,- );- scene3d.add(ambientLight);-- const material = createFaqMaterial(environmentTexture);- const mesh = new THREE.Mesh(new THREE.BufferGeometry(), material);- mesh.visible = false;- scene3d.add(mesh);-- const sceneTarget = createRenderTarget(- getVirtualWidth(),- getVirtualHeight(),- );- const blurTargetA = createRenderTarget(- getVirtualWidth(),- getVirtualHeight(),- );- const blurTargetB = createRenderTarget(- getVirtualWidth(),- getVirtualHeight(),- );- const fullScreenGeometry = new THREE.PlaneGeometry(2, 2);- const orthographicCamera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);-- const blurHorizontalMaterial = new THREE.ShaderMaterial({- uniforms: {- tInput: { value: null },- dir: { value: new THREE.Vector2(1, 0) },- res: {- value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),- },- },- vertexShader: passThroughVertexShader,- fragmentShader: blurFragmentShader,- });-- const blurVerticalMaterial = new THREE.ShaderMaterial({- uniforms: {- tInput: { value: null },- dir: { value: new THREE.Vector2(0, 1) },- res: {- value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),- },- },- vertexShader: passThroughVertexShader,- fragmentShader: blurFragmentShader,- });-- const halftoneMaterial = new THREE.ShaderMaterial({- transparent: true,- uniforms: {- tScene: { value: sceneTarget.texture },- tGlow: { value: blurTargetB.texture },- resolution: {- value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),- },- numRows: { value: HALFTONE_ROWS },- glowStr: { value: 0 },- contrast: { value: HALFTONE_CONTRAST },- power: { value: HALFTONE_POWER },- shading: { value: HALFTONE_SHADING },- baseInk: { value: HALFTONE_BASE_INK },- maxBar: { value: HALFTONE_MAX_BAR },- cellRatio: { value: HALFTONE_CELL_RATIO },- cutoff: { value: HALFTONE_CUTOFF },- dashColor: { value: new THREE.Color(HALFTONE_DASH_COLOR) },- time: { value: 0 },- waveAmount: { value: 0 },- waveSpeed: { value: 1 },- distanceScale: { value: 1 },- interactionUv: { value: new THREE.Vector2(0.5, 0.5) },- interactionVelocity: { value: new THREE.Vector2(0, 0) },- dragOffset: { value: new THREE.Vector2(0, 0) },- hoverLightStrength: { value: 0 },- hoverLightRadius: { value: 0.2 },- hoverFlowStrength: { value: 0 },- hoverFlowRadius: { value: 0.18 },- dragFlowStrength: { value: 0 },- dragFlowRadius: { value: 0.24 },- cropToBounds: { value: 0 },- },- vertexShader: passThroughVertexShader,- fragmentShader: halftoneFragmentShader,- });-- const blurHorizontalScene = new THREE.Scene();- blurHorizontalScene.add(- new THREE.Mesh(fullScreenGeometry, blurHorizontalMaterial),- );-- const blurVerticalScene = new THREE.Scene();- blurVerticalScene.add(- new THREE.Mesh(fullScreenGeometry, blurVerticalMaterial),- );-- const postScene = new THREE.Scene();- postScene.add(new THREE.Mesh(fullScreenGeometry, halftoneMaterial));-- const applySize = () => {- const width = getWidth();- const height = getHeight();- const virtualWidth = getVirtualWidth();- const virtualHeight = getVirtualHeight();-- renderer.setSize(virtualWidth, virtualHeight, false);- camera.aspect = width / height;- camera.updateProjectionMatrix();- sceneTarget.setSize(virtualWidth, virtualHeight);- blurTargetA.setSize(virtualWidth, virtualHeight);- blurTargetB.setSize(virtualWidth, virtualHeight);- blurHorizontalMaterial.uniforms.res.value.set(- virtualWidth,- virtualHeight,- );- blurVerticalMaterial.uniforms.res.value.set(virtualWidth, virtualHeight);- halftoneMaterial.uniforms.resolution.value.set(- virtualWidth,- virtualHeight,- );- };-- applySize();- const stopObservingSize = observeElementSize(container, applySize);-- loadImportedGeometryFromUrl('glb', GLB_URL, 'FAQ model')- .then((geometry) => {- if (cancelled) {- geometry.dispose();- return;- }-- mesh.geometry.dispose();- mesh.geometry = geometry;- mesh.visible = true;- })- .catch((error) => {- console.error(error);- });-- const renderFrame = (- _timestamp: DOMHighResTimeStamp,- { elapsedSeconds }: VisualRenderLoopFrame,- ) => {- if (cancelled) {- return;- }-- const delta = 1 / 60;- const elapsedTime = INITIAL_TIME_ELAPSED + elapsedSeconds;- halftoneMaterial.uniforms.time.value = elapsedTime;-- rotateElapsed += delta;-- const rotateProgress = ROTATE_PING_PONG- ? Math.sin(rotateElapsed * ROTATE_SPEED) * Math.PI- : rotateElapsed * ROTATE_SPEED;- const axisDirection = ROTATE_AXIS.startsWith('-') ? -1 : 1;- const axisProgress = rotateProgress * axisDirection;-- let rotationX = 0;- let rotationY = 0;- let rotationZ = 0;-- if (- ROTATE_AXIS === 'x' ||- ROTATE_AXIS === 'xy' ||- ROTATE_AXIS === '-x' ||- ROTATE_AXIS === '-xy'- ) {- rotationX += axisProgress;- }-- if (- ROTATE_AXIS === 'y' ||- ROTATE_AXIS === 'xy' ||- ROTATE_AXIS === '-y' ||- ROTATE_AXIS === '-xy'- ) {- rotationY += axisProgress;- }-- if (ROTATE_AXIS === 'z' || ROTATE_AXIS === '-z') {- rotationZ += axisProgress;- }-- mesh.rotation.set(rotationX, rotationY, rotationZ);- mesh.position.y = MODEL_OFFSET_Y;- mesh.scale.setScalar(1);-- camera.position.x += (0 - camera.position.x) * 0.12;- camera.position.y += (0 - camera.position.y) * 0.12;- camera.position.z += (BASE_CAMERA_DISTANCE - camera.position.z) * 0.12;- camera.lookAt(0, MODEL_OFFSET_Y * 0.2, 0);- setPrimaryLightPosition(primaryLight, LIGHT_ANGLE_DEGREES, LIGHT_HEIGHT);-- renderer.setRenderTarget(sceneTarget);- renderer.clear();- renderer.render(scene3d, camera);-- blurHorizontalMaterial.uniforms.tInput.value = sceneTarget.texture;- renderer.setRenderTarget(blurTargetA);- renderer.render(blurHorizontalScene, orthographicCamera);-- blurVerticalMaterial.uniforms.tInput.value = blurTargetA.texture;- renderer.setRenderTarget(blurTargetB);- renderer.render(blurVerticalScene, orthographicCamera);-- blurHorizontalMaterial.uniforms.tInput.value = blurTargetB.texture;- renderer.setRenderTarget(blurTargetA);- renderer.render(blurHorizontalScene, orthographicCamera);-- blurVerticalMaterial.uniforms.tInput.value = blurTargetA.texture;- renderer.setRenderTarget(blurTargetB);- renderer.render(blurVerticalScene, orthographicCamera);-- renderer.setRenderTarget(null);- renderer.clear();- renderer.render(postScene, orthographicCamera);- };-- renderLoop = createVisualRenderLoop({- renderFrame,- shouldRender: () => !cancelled,- target: container,- targetVisibilityOptions: { rootMargin: '100px' },- });- renderLoop.start();-- return () => {- cancelled = true;- renderLoop?.dispose();- stopObservingSize();- blurHorizontalMaterial.dispose();- blurVerticalMaterial.dispose();- halftoneMaterial.dispose();- fullScreenGeometry.dispose();- mesh.geometry.dispose();- material.dispose();- sceneTarget.dispose();- blurTargetA.dispose();- blurTargetB.dispose();- environmentTexture.dispose();- renderer.dispose();-- if (canvas.parentNode === container) {- container.removeChild(canvas);- }- };- }, []);+ useFaqBackground({ mountRef: mountReference });return (<FaqVisualShell ref={shellReference}>diff --git a/packages/twenty-website-new/src/sections/Faq/visuals/use-faq-background.ts b/packages/twenty-website-new/src/sections/Faq/visuals/use-faq-background.tsnew file mode 100644index 00000000000..46545bb448e--- /dev/null+++ b/packages/twenty-website-new/src/sections/Faq/visuals/use-faq-background.ts@@ -0,0 +1,651 @@+'use client';++import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment.js';+import { loadImportedGeometryFromUrl } from '@/lib/halftone';+import { useEffect, type RefObject } from 'react';+import * as THREE from 'three';+import { observeElementSize } from '@/lib/dom/observe-element-size';+import {+ createVisualRenderLoop,+ tryCreateSiteWebGlRenderer,+ type VisualRenderLoop,+ type VisualRenderLoopFrame,+} from '@/lib/visual-runtime';++const VIRTUAL_RENDER_HEIGHT = 768;++const passThroughVertexShader = /* glsl */ `+ varying vec2 vUv;++ void main() {+ vUv = uv;+ gl_Position = vec4(position, 1.0);+ }+`;++const blurFragmentShader = /* glsl */ `+ precision highp float;++ uniform sampler2D tInput;+ uniform vec2 dir;+ uniform vec2 res;++ varying vec2 vUv;++ void main() {+ vec4 sum = vec4(0.0);+ vec2 px = dir / res;++ float w[5];+ w[0] = 0.227027;+ w[1] = 0.1945946;+ w[2] = 0.1216216;+ w[3] = 0.054054;+ w[4] = 0.016216;++ sum += texture2D(tInput, vUv) * w[0];++ for (int i = 1; i < 5; i++) {+ float fi = float(i) * 3.0;+ sum += texture2D(tInput, vUv + px * fi) * w[i];+ sum += texture2D(tInput, vUv - px * fi) * w[i];+ }++ gl_FragColor = sum;+ }+`;++const halftoneFragmentShader = /* glsl */ `+ precision highp float;++ uniform sampler2D tScene;+ uniform sampler2D tGlow;+ uniform vec2 resolution;+ uniform float numRows;+ uniform float glowStr;+ uniform float contrast;+ uniform float power;+ uniform float shading;+ uniform float baseInk;+ uniform float maxBar;+ uniform float rowMerge;+ uniform float cellRatio;+ uniform float cutoff;+ uniform float highlightOpen;+ uniform float shadowGrouping;+ uniform float shadowCrush;+ uniform vec3 dashColor;+ uniform float time;+ uniform float waveAmount;+ uniform float waveSpeed;+ uniform float distanceScale;+ uniform vec2 interactionUv;+ uniform vec2 interactionVelocity;+ uniform vec2 dragOffset;+ uniform float hoverLightStrength;+ uniform float hoverLightRadius;+ uniform float hoverFlowStrength;+ uniform float hoverFlowRadius;+ uniform float dragFlowStrength;+ uniform float dragFlowRadius;+ uniform float cropToBounds;++ varying vec2 vUv;++ void main() {+ // Crop to image bounds: discard fragments outside source image (image mode only)+ if (cropToBounds > 0.5) {+ vec4 boundsCheck = texture2D(tScene, vUv);+ if (boundsCheck.a < 0.01) {+ gl_FragColor = vec4(0.0);+ return;+ }+ }++ float baseRowH = resolution.y / (numRows * distanceScale);+ vec2 pointerPx = interactionUv * resolution;+ vec2 fragDelta = gl_FragCoord.xy - pointerPx;+ float fragDist = length(fragDelta);+ vec2 radialDir = fragDist > 0.001 ? fragDelta / fragDist : vec2(0.0, 1.0);+ float velocityMagnitude = length(interactionVelocity);+ vec2 motionDir = velocityMagnitude > 0.001+ ? interactionVelocity / velocityMagnitude+ : vec2(0.0, 0.0);+ float motionBias = velocityMagnitude > 0.001+ ? dot(-radialDir, motionDir) * 0.5 + 0.5+ : 0.5;++ float hoverLightMask = 0.0;+ if (hoverLightStrength > 0.0) {+ float lightRadiusPx = hoverLightRadius * resolution.y;+ hoverLightMask = smoothstep(lightRadiusPx, 0.0, fragDist);+ }++ float hoverFlowMask = 0.0;+ if (hoverFlowStrength > 0.0) {+ float hoverRadiusPx = hoverFlowRadius * resolution.y;+ hoverFlowMask = smoothstep(hoverRadiusPx, 0.0, fragDist);+ }++ float dragFlowMask = 0.0;+ if (dragFlowStrength > 0.0) {+ float dragRadiusPx = dragFlowRadius * resolution.y;+ dragFlowMask = smoothstep(dragRadiusPx, 0.0, fragDist);+ }++ vec2 hoverDisplacement =+ radialDir * hoverFlowStrength * hoverFlowMask * baseRowH * 0.55 ++ motionDir * hoverFlowStrength * hoverFlowMask * (0.4 + motionBias) * baseRowH * 1.15;+ vec2 dragDisplacement = dragOffset * dragFlowMask * dragFlowStrength * 0.8;+ vec2 effectCoord = gl_FragCoord.xy + hoverDisplacement + dragDisplacement;++ float densityBoost =+ hoverFlowStrength * hoverFlowMask * 0.22 ++ dragFlowStrength * dragFlowMask * 0.16;+ float rowH = baseRowH / (1.0 + densityBoost);++ float offsetY = effectCoord.y;+ float row = floor(offsetY / rowH);+ float rowFrac = offsetY / rowH - row;+ float rowV = (row + 0.5) * rowH / resolution.y;+ float dy = abs(rowFrac - 0.5);++ float waveOffset = waveAmount * sin(time * waveSpeed + row * 0.5) * rowH;+ float effectiveX = effectCoord.x + waveOffset;++ float localCellRatio = cellRatio * (+ 1.0 ++ hoverFlowStrength * hoverFlowMask * 0.08 ++ dragFlowStrength * dragFlowMask * 0.1 * motionBias+ );+ float cellW = rowH * localCellRatio;+ float cellIdx = floor(effectiveX / cellW);+ float cellFrac = (effectiveX - cellIdx * cellW) / cellW;+ float cellU = (cellIdx + 0.5) * cellW / resolution.x;++ vec2 sampleUv = vec2(+ clamp(cellU, 0.0, 1.0),+ clamp(rowV, 0.0, 1.0)+ );++ vec4 sceneSample = texture2D(tScene, sampleUv);+ vec4 glowCell = texture2D(tGlow, sampleUv);++ float mask = smoothstep(0.02, 0.08, sceneSample.a);+ float lum = dot(sceneSample.rgb, vec3(0.299, 0.587, 0.114));+ float avgLum = dot(glowCell.rgb, vec3(0.299, 0.587, 0.114));+ float detail = lum - avgLum;++ float litLum = lum + max(detail, 0.0) * shading+ - max(-detail, 0.0) * shading * 0.55;+ float lightLift =+ hoverLightStrength * hoverLightMask * mix(0.78, 1.18, motionBias) * 0.34;+ float lightFocus = hoverLightStrength * hoverLightMask * 0.12;+ litLum = clamp(litLum + lightLift, 0.0, 1.0);+ litLum = clamp((litLum - cutoff) / max(1.0 - cutoff, 0.001), 0.0, 1.0);+ litLum = pow(litLum, max(contrast - lightFocus, 0.25));++ float darkness = 1.0 - litLum;+ float groupedLum = clamp((avgLum - cutoff) / max(1.0 - cutoff, 0.001), 0.0, 1.0);+ groupedLum = pow(groupedLum, max(contrast * 0.9, 0.25));+ float groupedDarkness = 1.0 - groupedLum;+ darkness = mix(darkness, max(darkness, groupedDarkness), shadowGrouping);+ darkness = clamp(+ (darkness - highlightOpen) / max(1.0 - highlightOpen, 0.001),+ 0.0,+ 1.0+ );++ float shadowMask = smoothstep(0.42, 0.96, darkness);+ darkness = mix(+ darkness,+ mix(darkness, 1.0, shadowMask),+ shadowCrush+ );++ float inkBase = baseInk * smoothstep(0.03, 0.24, darkness);+ float ink = mix(inkBase, 1.0, darkness);+ float fill = pow(ink, 1.05) * power;+ fill = clamp(fill, 0.0, 1.0) * mask;++ float dynamicBarHalf = mix(0.08, maxBar, smoothstep(0.03, 0.85, ink));+ float dynamicBarHalfY = min(+ dynamicBarHalf + rowMerge * smoothstep(0.42, 0.98, ink),+ 0.78+ );+ float dx2 = abs(cellFrac - 0.5);+ float halfFill = fill * 0.5;+ float bodyHalfW = max(halfFill - dynamicBarHalf * (rowH / cellW), 0.0);+ float capRX = dynamicBarHalf * rowH;+ float capRY = dynamicBarHalfY * rowH;++ float inDash = 0.0;+ if (dx2 <= bodyHalfW) {+ float edgeDist = dynamicBarHalfY - dy;+ inDash = smoothstep(-0.03, 0.03, edgeDist);+ } else {+ float cdx = (dx2 - bodyHalfW) * cellW;+ float cdy = dy * rowH;+ float ellipseDist = sqrt(+ (cdx * cdx) / max(capRX * capRX, 0.0001) ++ (cdy * cdy) / max(capRY * capRY, 0.0001)+ );+ inDash = 1.0 - smoothstep(1.0 - 0.08, 1.0 + 0.08, ellipseDist);+ }++ inDash *= step(0.001, ink) * mask;+ inDash *= 1.0 + 0.03 * sin(time * 0.8 + row * 0.1);++ vec4 glow = texture2D(tGlow, vUv);+ float glowLum = dot(glow.rgb, vec3(0.299, 0.587, 0.114));+ float halo = glowLum * glowStr * 0.25 * (1.0 - inDash);+ float sharp = smoothstep(0.3, 0.5, inDash + halo);+ vec3 color = dashColor * sharp;++ gl_FragColor = vec4(color, sharp);++ #include <tonemapping_fragment>+ #include <colorspace_fragment>+ }+`;++const GLB_URL = '/illustrations/common/faq/faq.glb';++const LIGHT_INTENSITY = 3.1;+const FILL_LIGHT_INTENSITY = 0.15;+const AMBIENT_LIGHT_INTENSITY = 0.08;+const LIGHT_ANGLE_DEGREES = 45;+const LIGHT_HEIGHT = 2;++const MATERIAL_ROUGHNESS = 0.42;+const MATERIAL_METALNESS = 0.16;++const HALFTONE_ROWS = 127;+const HALFTONE_CONTRAST = 1.6;+const HALFTONE_POWER = 1.2;+const HALFTONE_SHADING = 1.6;+const HALFTONE_BASE_INK = 0.16;+const HALFTONE_MAX_BAR = 0.24;+const HALFTONE_CELL_RATIO = 2.2;+const HALFTONE_CUTOFF = 0.02;+const HALFTONE_DASH_COLOR = '#4A38F5';++const ROTATE_AXIS: 'x' | 'y' | 'z' | 'xy' | '-x' | '-y' | '-z' | '-xy' = '-z';+const ROTATE_SPEED = 0.1;+const ROTATE_PING_PONG = false;+const INITIAL_ROTATE_ELAPSED = 275.10000000007847;+const INITIAL_TIME_ELAPSED = 249.21849999998116;+const BASE_CAMERA_DISTANCE = 4;+const MODEL_OFFSET_Y = 0.52;++function createEnvironmentTexture(renderer: THREE.WebGLRenderer) {+ const pmremGenerator = new THREE.PMREMGenerator(renderer);+ const environmentTexture = pmremGenerator.fromScene(+ new RoomEnvironment(),+ 0.04,+ ).texture;+ pmremGenerator.dispose();++ return environmentTexture;+}++function createRenderTarget(width: number, height: number) {+ return new THREE.WebGLRenderTarget(width, height, {+ minFilter: THREE.LinearFilter,+ magFilter: THREE.LinearFilter,+ format: THREE.RGBAFormat,+ });+}++function setPrimaryLightPosition(+ light: THREE.DirectionalLight,+ angleDegrees: number,+ height: number,+) {+ const lightAngle = (angleDegrees * Math.PI) / 180;+ light.position.set(+ Math.cos(lightAngle) * 5,+ height,+ Math.sin(lightAngle) * 5,+ );+}++function createFaqMaterial(environmentTexture: THREE.Texture) {+ return new THREE.MeshPhysicalMaterial({+ color: 0xd4d0c8,+ roughness: MATERIAL_ROUGHNESS,+ metalness: MATERIAL_METALNESS,+ envMap: environmentTexture,+ envMapIntensity: 0.25,+ clearcoat: 0,+ clearcoatRoughness: 0.08,+ reflectivity: 0.5,+ transmission: 0,+ });+}++export function useFaqBackground({+ mountRef,+}: {+ mountRef: RefObject<HTMLDivElement | null>;+}) {+ useEffect(() => {+ const container = mountRef.current;++ if (!container) {+ return;+ }++ let cancelled = false;+ let renderLoop: VisualRenderLoop | null = null;+ let rotateElapsed = INITIAL_ROTATE_ELAPSED;++ const getWidth = () => Math.max(container.clientWidth, 1);+ const getHeight = () => Math.max(container.clientHeight, 1);+ const getVirtualHeight = () => Math.max(VIRTUAL_RENDER_HEIGHT, getHeight());+ const getVirtualWidth = () =>+ Math.max(+ Math.round(+ getVirtualHeight() * (getWidth() / Math.max(getHeight(), 1)),+ ),+ 1,+ );++ const renderer = tryCreateSiteWebGlRenderer({+ antialias: false,+ alpha: true,+ onContextLost: () => {+ renderLoop?.stop();+ },+ });++ if (renderer === null) {+ return;+ }++ renderer.outputColorSpace = THREE.SRGBColorSpace;+ renderer.setPixelRatio(1);+ renderer.setClearColor(0x000000, 0);+ renderer.setSize(getVirtualWidth(), getVirtualHeight(), false);++ const canvas = renderer.domElement;+ canvas.style.display = 'block';+ canvas.style.height = '100%';+ canvas.style.width = '100%';+ container.appendChild(canvas);++ const environmentTexture = createEnvironmentTexture(renderer);+ const scene3d = new THREE.Scene();+ scene3d.background = null;++ const camera = new THREE.PerspectiveCamera(+ 45,+ getWidth() / getHeight(),+ 0.1,+ 100,+ );+ camera.position.z = BASE_CAMERA_DISTANCE;++ const primaryLight = new THREE.DirectionalLight(0xffffff, LIGHT_INTENSITY);+ setPrimaryLightPosition(primaryLight, LIGHT_ANGLE_DEGREES, LIGHT_HEIGHT);+ scene3d.add(primaryLight);++ const fillLight = new THREE.DirectionalLight(+ 0xffffff,+ FILL_LIGHT_INTENSITY,+ );+ fillLight.position.set(-3, -1, 1);+ scene3d.add(fillLight);++ const ambientLight = new THREE.AmbientLight(+ 0xffffff,+ AMBIENT_LIGHT_INTENSITY,+ );+ scene3d.add(ambientLight);++ const material = createFaqMaterial(environmentTexture);+ const mesh = new THREE.Mesh(new THREE.BufferGeometry(), material);+ mesh.visible = false;+ scene3d.add(mesh);++ const sceneTarget = createRenderTarget(+ getVirtualWidth(),+ getVirtualHeight(),+ );+ const blurTargetA = createRenderTarget(+ getVirtualWidth(),+ getVirtualHeight(),+ );+ const blurTargetB = createRenderTarget(+ getVirtualWidth(),+ getVirtualHeight(),+ );+ const fullScreenGeometry = new THREE.PlaneGeometry(2, 2);+ const orthographicCamera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);++ const blurHorizontalMaterial = new THREE.ShaderMaterial({+ uniforms: {+ tInput: { value: null },+ dir: { value: new THREE.Vector2(1, 0) },+ res: {+ value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),+ },+ },+ vertexShader: passThroughVertexShader,+ fragmentShader: blurFragmentShader,+ });++ const blurVerticalMaterial = new THREE.ShaderMaterial({+ uniforms: {+ tInput: { value: null },+ dir: { value: new THREE.Vector2(0, 1) },+ res: {+ value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),+ },+ },+ vertexShader: passThroughVertexShader,+ fragmentShader: blurFragmentShader,+ });++ const halftoneMaterial = new THREE.ShaderMaterial({+ transparent: true,+ uniforms: {+ tScene: { value: sceneTarget.texture },+ tGlow: { value: blurTargetB.texture },+ resolution: {+ value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),+ },+ numRows: { value: HALFTONE_ROWS },+ glowStr: { value: 0 },+ contrast: { value: HALFTONE_CONTRAST },+ power: { value: HALFTONE_POWER },+ shading: { value: HALFTONE_SHADING },+ baseInk: { value: HALFTONE_BASE_INK },+ maxBar: { value: HALFTONE_MAX_BAR },+ cellRatio: { value: HALFTONE_CELL_RATIO },+ cutoff: { value: HALFTONE_CUTOFF },+ dashColor: { value: new THREE.Color(HALFTONE_DASH_COLOR) },+ time: { value: 0 },+ waveAmount: { value: 0 },+ waveSpeed: { value: 1 },+ distanceScale: { value: 1 },+ interactionUv: { value: new THREE.Vector2(0.5, 0.5) },+ interactionVelocity: { value: new THREE.Vector2(0, 0) },+ dragOffset: { value: new THREE.Vector2(0, 0) },+ hoverLightStrength: { value: 0 },+ hoverLightRadius: { value: 0.2 },+ hoverFlowStrength: { value: 0 },+ hoverFlowRadius: { value: 0.18 },+ dragFlowStrength: { value: 0 },+ dragFlowRadius: { value: 0.24 },+ cropToBounds: { value: 0 },+ },+ vertexShader: passThroughVertexShader,+ fragmentShader: halftoneFragmentShader,+ });++ const blurHorizontalScene = new THREE.Scene();+ blurHorizontalScene.add(+ new THREE.Mesh(fullScreenGeometry, blurHorizontalMaterial),+ );++ const blurVerticalScene = new THREE.Scene();+ blurVerticalScene.add(+ new THREE.Mesh(fullScreenGeometry, blurVerticalMaterial),+ );++ const postScene = new THREE.Scene();+ postScene.add(new THREE.Mesh(fullScreenGeometry, halftoneMaterial));++ const applySize = () => {+ const width = getWidth();+ const height = getHeight();+ const virtualWidth = getVirtualWidth();+ const virtualHeight = getVirtualHeight();++ renderer.setSize(virtualWidth, virtualHeight, false);+ camera.aspect = width / height;+ camera.updateProjectionMatrix();+ sceneTarget.setSize(virtualWidth, virtualHeight);+ blurTargetA.setSize(virtualWidth, virtualHeight);+ blurTargetB.setSize(virtualWidth, virtualHeight);+ blurHorizontalMaterial.uniforms.res.value.set(+ virtualWidth,+ virtualHeight,+ );+ blurVerticalMaterial.uniforms.res.value.set(virtualWidth, virtualHeight);+ halftoneMaterial.uniforms.resolution.value.set(+ virtualWidth,+ virtualHeight,+ );+ };++ applySize();+ const stopObservingSize = observeElementSize(container, applySize);++ loadImportedGeometryFromUrl('glb', GLB_URL, 'FAQ model')+ .then((geometry) => {+ if (cancelled) {+ geometry.dispose();+ return;+ }++ mesh.geometry.dispose();+ mesh.geometry = geometry;+ mesh.visible = true;+ })+ .catch((error) => {+ console.error(error);+ });++ const renderFrame = (+ _timestamp: DOMHighResTimeStamp,+ { elapsedSeconds }: VisualRenderLoopFrame,+ ) => {+ if (cancelled) {+ return;+ }++ const delta = 1 / 60;+ const elapsedTime = INITIAL_TIME_ELAPSED + elapsedSeconds;+ halftoneMaterial.uniforms.time.value = elapsedTime;++ rotateElapsed += delta;++ const rotateProgress = ROTATE_PING_PONG+ ? Math.sin(rotateElapsed * ROTATE_SPEED) * Math.PI+ : rotateElapsed * ROTATE_SPEED;+ const axisDirection = ROTATE_AXIS.startsWith('-') ? -1 : 1;+ const axisProgress = rotateProgress * axisDirection;++ let rotationX = 0;+ let rotationY = 0;+ let rotationZ = 0;++ if (+ ROTATE_AXIS === 'x' ||+ ROTATE_AXIS === 'xy' ||+ ROTATE_AXIS === '-x' ||+ ROTATE_AXIS === '-xy'+ ) {+ rotationX += axisProgress;+ }++ if (+ ROTATE_AXIS === 'y' ||+ ROTATE_AXIS === 'xy' ||+ ROTATE_AXIS === '-y' ||+ ROTATE_AXIS === '-xy'+ ) {+ rotationY += axisProgress;+ }++ if (ROTATE_AXIS === 'z' || ROTATE_AXIS === '-z') {+ rotationZ += axisProgress;+ }++ mesh.rotation.set(rotationX, rotationY, rotationZ);+ mesh.position.y = MODEL_OFFSET_Y;+ mesh.scale.setScalar(1);++ camera.position.x += (0 - camera.position.x) * 0.12;+ camera.position.y += (0 - camera.position.y) * 0.12;+ camera.position.z += (BASE_CAMERA_DISTANCE - camera.position.z) * 0.12;+ camera.lookAt(0, MODEL_OFFSET_Y * 0.2, 0);+ setPrimaryLightPosition(primaryLight, LIGHT_ANGLE_DEGREES, LIGHT_HEIGHT);++ renderer.setRenderTarget(sceneTarget);+ renderer.clear();+ renderer.render(scene3d, camera);++ blurHorizontalMaterial.uniforms.tInput.value = sceneTarget.texture;+ renderer.setRenderTarget(blurTargetA);+ renderer.render(blurHorizontalScene, orthographicCamera);++ blurVerticalMaterial.uniforms.tInput.value = blurTargetA.texture;+ renderer.setRenderTarget(blurTargetB);+ renderer.render(blurVerticalScene, orthographicCamera);++ blurHorizontalMaterial.uniforms.tInput.value = blurTargetB.texture;+ renderer.setRenderTarget(blurTargetA);+ renderer.render(blurHorizontalScene, orthographicCamera);++ blurVerticalMaterial.uniforms.tInput.value = blurTargetA.texture;+ renderer.setRenderTarget(blurTargetB);+ renderer.render(blurVerticalScene, orthographicCamera);++ renderer.setRenderTarget(null);+ renderer.clear();+ renderer.render(postScene, orthographicCamera);+ };++ renderLoop = createVisualRenderLoop({+ renderFrame,+ shouldRender: () => !cancelled,+ target: container,+ targetVisibilityOptions: { rootMargin: '100px' },+ });+ renderLoop.start();++ return () => {+ cancelled = true;+ renderLoop?.dispose();+ stopObservingSize();+ blurHorizontalMaterial.dispose();+ blurVerticalMaterial.dispose();+ halftoneMaterial.dispose();+ fullScreenGeometry.dispose();+ mesh.geometry.dispose();+ material.dispose();+ sceneTarget.dispose();+ blurTargetA.dispose();+ blurTargetB.dispose();+ environmentTexture.dispose();+ renderer.dispose();++ if (canvas.parentNode === container) {+ container.removeChild(canvas);+ }+ };+ }, [mountRef]);+}diff --git a/packages/twenty-website-new/src/sections/Feature/Feature.tsx b/packages/twenty-website-new/src/sections/Feature/Feature.tsxnew file mode 100644index 00000000000..cd5e60b616c--- /dev/null+++ b/packages/twenty-website-new/src/sections/Feature/Feature.tsx@@ -0,0 +1,177 @@+import { Container } from '@/design-system/components';+import type { ImageType } from '@/design-system/components/Image';+import type { MessageDescriptor } from '@lingui/core';+import { type Page, Pages } from '@/lib/pages';+import { theme, type Scheme } from '@/theme';+import { styled } from '@linaria/react';+import type { ReactNode } from 'react';++import { TileContent } from './TileContent';+import { TileVisual } from './TileVisual';++export type FeatureTileType = {+ bullets: MessageDescriptor[];+ heading: MessageDescriptor;+ icon: string;+ image: ImageType;+};++// --- Root ---++const StyledSection = styled.section`+ width: 100%;++ &[data-scheme='light'] {+ background-color: var(--color-white);+ }++ &[data-scheme='muted'] {+ background-color: var(--color-neutral);+ }++ &[data-scheme='dark'] {+ background-color: var(--color-black);+ }+`;++const StyledContainer = styled(Container)`+ display: grid;+ grid-template-columns: 1fr;+ gap: ${theme.spacing(6)};+ padding-bottom: ${theme.spacing(12)};+ padding-left: ${theme.spacing(4)};+ padding-right: ${theme.spacing(4)};+ padding-top: ${theme.spacing(12)};++ @media (min-width: ${theme.breakpoints.md}px) {+ gap: ${theme.spacing(10)};+ padding-bottom: ${theme.spacing(20)};+ padding-left: ${theme.spacing(10)};+ padding-right: ${theme.spacing(10)};+ padding-top: ${theme.spacing(20)};+ }+`;++type RootProps = {+ backgroundColor?: string;+ children: ReactNode;+ scheme?: Scheme;+};++function Root({ backgroundColor, children, scheme }: RootProps) {+ return (+ <StyledSection+ data-scheme={scheme}+ style={scheme ? undefined : { backgroundColor }}+ >+ <StyledContainer>{children}</StyledContainer>+ </StyledSection>+ );+}++// --- Intro ---++const StyledIntro = styled.div`+ display: grid;+ grid-template-columns: 1fr;+ row-gap: ${theme.spacing(6)};+ text-align: start;++ &[data-align='center'] {+ justify-items: center;+ margin-left: auto;+ margin-right: auto;+ text-align: center;+ }++ @media (min-width: ${theme.breakpoints.md}px) {+ max-width: 688px;++ &[data-page=${Pages.Home}] {+ max-width: 900px;+ }+ }+`;++type IntroProps = {+ align: 'center' | 'left';+ children: ReactNode;+ page: Page;+};++function Intro({ align, children, page }: IntroProps) {+ return (+ <StyledIntro data-align={align} data-page={page}>+ {children}+ </StyledIntro>+ );+}++// --- Tiles ---++const TilesGrid = styled.div`+ display: grid;+ gap: ${theme.spacing(4)};+ grid-template-columns: 1fr;++ @media (min-width: ${theme.breakpoints.md}px) {+ gap: ${theme.spacing(4)};+ grid-template-columns: repeat(12, minmax(0, 1fr));+ }+`;++const TileCell = styled.div`+ min-width: 0;++ @media (min-width: ${theme.breakpoints.md}px) {+ &[data-index='0'] {+ grid-column: span 12;+ }+ &[data-index='1'],+ &[data-index='2'],+ &[data-index='5'],+ &[data-index='6'] {+ grid-column: span 6;+ }+ &[data-index='3'] {+ grid-column: span 4;+ }+ &[data-index='4'] {+ grid-column: span 8;+ }+ }+`;++const TileRoot = styled.article`+ background-color: ${theme.colors.primary.background[100]};+ border: 1px solid ${theme.colors.primary.border[20]};+ border-radius: ${theme.radius(2)};+ display: grid;+ grid-template-columns: 1fr;+ grid-template-rows: auto auto;+ height: 100%;+ min-width: 0;+ overflow: hidden;+`;++type TilesProps = {+ mask: ImageType;+ tiles: FeatureTileType[];+};++function Tiles({ mask, tiles }: TilesProps) {+ return (+ <TilesGrid>+ {tiles.map((tile, index) => (+ <TileCell data-index={index} key={index}>+ <TileRoot>+ <TileVisual image={tile.image} index={index} mask={mask} />+ <TileContent tile={tile} />+ </TileRoot>+ </TileCell>+ ))}+ </TilesGrid>+ );+}++export const Feature = { Intro, Root, Tiles };diff --git a/packages/twenty-website-new/src/sections/Feature/components/Tile/TileContent.tsx b/packages/twenty-website-new/src/sections/Feature/TileContent.tsxsimilarity index 69%rename from packages/twenty-website-new/src/sections/Feature/components/Tile/TileContent.tsxrename to packages/twenty-website-new/src/sections/Feature/TileContent.tsxindex f8e0bd8e588..f7714f96d76 100644--- a/packages/twenty-website-new/src/sections/Feature/components/Tile/TileContent.tsx+++ b/packages/twenty-website-new/src/sections/Feature/TileContent.tsx@@ -1,10 +1,11 @@import { styled } from '@linaria/react';-import { Body, Heading } from '@/design-system/components';+import { Body, Heading, HeadingPart } from '@/design-system/components';import { INFORMATIVE_ICONS } from '@/icons';-import type { FeatureTileType } from '@/sections/Feature/types/FeatureTile';+import { getServerI18n } from '@/lib/i18n/utils/get-server-i18n';import { theme } from '@/theme';-import type { MessageDescriptor } from '@lingui/core';++import type { FeatureTileType } from './Feature';const Content = styled.div`display: grid;@@ -53,11 +54,11 @@ const BulletItem = styled.li``;type TileContentProps = {- renderText: (descriptor: MessageDescriptor) => string;tile: FeatureTileType;};-export function TileContent({ renderText, tile }: TileContentProps) {+export function TileContent({ tile }: TileContentProps) {+ const i18n = getServerI18n();const Icon = INFORMATIVE_ICONS[tile.icon];return (@@ -69,25 +70,17 @@ export function TileContent({ renderText, tile }: TileContentProps) {) : null}</IconSlot><HeadingWrap>- <Heading- as="h3"- renderText={renderText}- segments={tile.heading}- size="xs"- weight="medium"- />+ <Heading as="h3" size="xs" weight="medium">+ <HeadingPart fontFamily="sans">{i18n._(tile.heading)}</HeadingPart>+ </Heading></HeadingWrap></TitleRow><Bullets>{tile.bullets.map((bullet, bulletIndex) => (<BulletItem key={bulletIndex}>- <Body- as="span"- body={bullet}- renderText={renderText}- size="sm"- weight="regular"- />+ <Body as="span" size="sm" weight="regular">+ {i18n._(bullet)}+ </Body></BulletItem>))}</Bullets>diff --git a/packages/twenty-website-new/src/sections/Feature/components/Tile/TileVisual.tsx b/packages/twenty-website-new/src/sections/Feature/TileVisual.tsxsimilarity index 100%rename from packages/twenty-website-new/src/sections/Feature/components/Tile/TileVisual.tsxrename to packages/twenty-website-new/src/sections/Feature/TileVisual.tsxdiff --git a/packages/twenty-website-new/src/sections/Feature/components/Intro.tsx b/packages/twenty-website-new/src/sections/Feature/components/Intro.tsxdeleted file mode 100644index 028a9d62e46..00000000000--- a/packages/twenty-website-new/src/sections/Feature/components/Intro.tsx+++ /dev/null@@ -1,40 +0,0 @@-import { type Page, Pages } from '@/lib/pages';-import { theme } from '@/theme';-import { styled } from '@linaria/react';-import type { ReactNode } from 'react';--const StyledIntro = styled.div`- display: grid;- grid-template-columns: 1fr;- row-gap: ${theme.spacing(6)};- text-align: start;-- &[data-align='center'] {- justify-items: center;- margin-left: auto;- margin-right: auto;- text-align: center;- }-- @media (min-width: ${theme.breakpoints.md}px) {- max-width: 688px;-- &[data-page=${Pages.Home}] {- max-width: 900px;- }- }-`;--type IntroProps = {- align: 'center' | 'left';- children: ReactNode;- page: Page;-};--export function Intro({ align, children, page }: IntroProps) {- return (- <StyledIntro data-align={align} data-page={page}>- {children}- </StyledIntro>- );-}diff --git a/packages/twenty-website-new/src/sections/Feature/components/Root.tsx b/packages/twenty-website-new/src/sections/Feature/components/Root.tsxdeleted file mode 100644index de39a317758..00000000000--- a/packages/twenty-website-new/src/sections/Feature/components/Root.tsx+++ /dev/null@@ -1,39 +0,0 @@-import { Container } from '@/design-system/components';-import { theme } from '@/theme';-import { styled } from '@linaria/react';-import type { ReactNode } from 'react';--const StyledSection = styled.section`- width: 100%;-`;--const StyledContainer = styled(Container)`- display: grid;- grid-template-columns: 1fr;- gap: ${theme.spacing(6)};- padding-bottom: ${theme.spacing(12)};- padding-left: ${theme.spacing(4)};- padding-right: ${theme.spacing(4)};- padding-top: ${theme.spacing(12)};-- @media (min-width: ${theme.breakpoints.md}px) {- gap: ${theme.spacing(10)};- padding-bottom: ${theme.spacing(20)};- padding-left: ${theme.spacing(10)};- padding-right: ${theme.spacing(10)};- padding-top: ${theme.spacing(20)};- }-`;--type RootProps = {- backgroundColor: string;- children: ReactNode;-};--export function Root({ backgroundColor, children }: RootProps) {- return (- <StyledSection style={{ backgroundColor }}>- <StyledContainer>{children}</StyledContainer>- </StyledSection>- );-}diff --git a/packages/twenty-website-new/src/sections/Feature/components/Tile/Tile.tsx b/packages/twenty-website-new/src/sections/Feature/components/Tile/Tile.tsxdeleted file mode 100644index 377ee7c3a85..00000000000--- a/packages/twenty-website-new/src/sections/Feature/components/Tile/Tile.tsx+++ /dev/null@@ -1,37 +0,0 @@-import { styled } from '@linaria/react';--import type { ImageType } from '@/design-system/components/Image';-import type { FeatureTileType } from '@/sections/Feature/types/FeatureTile';-import { theme } from '@/theme';-import type { MessageDescriptor } from '@lingui/core';--import { TileContent } from './TileContent';-import { TileVisual } from './TileVisual';--const TileRoot = styled.article`- background-color: ${theme.colors.primary.background[100]};- border: 1px solid ${theme.colors.primary.border[20]};- border-radius: ${theme.radius(2)};- display: grid;- grid-template-columns: 1fr;- grid-template-rows: auto auto;- height: 100%;- min-width: 0;- overflow: hidden;-`;--type TileProps = {- index: number;- mask: ImageType;- renderText: (descriptor: MessageDescriptor) => string;- tile: FeatureTileType;-};--export function Tile({ index, mask, renderText, tile }: TileProps) {- return (- <TileRoot>- <TileVisual image={tile.image} index={index} mask={mask} />- <TileContent renderText={renderText} tile={tile} />- </TileRoot>- );-}diff --git a/packages/twenty-website-new/src/sections/Feature/components/Tiles.tsx b/packages/twenty-website-new/src/sections/Feature/components/Tiles.tsxdeleted file mode 100644index 1693214d7e8..00000000000--- a/packages/twenty-website-new/src/sections/Feature/components/Tiles.tsx+++ /dev/null@@ -1,57 +0,0 @@-import type { ImageType } from '@/design-system/components/Image';-import type { FeatureTileType } from '@/sections/Feature/types/FeatureTile';-import { theme } from '@/theme';-import type { MessageDescriptor } from '@lingui/core';-import { styled } from '@linaria/react';-import { Tile } from './Tile/Tile';--const TilesGrid = styled.div`- display: grid;- gap: ${theme.spacing(4)};- grid-template-columns: 1fr;-- @media (min-width: ${theme.breakpoints.md}px) {- gap: ${theme.spacing(4)};- grid-template-columns: repeat(12, minmax(0, 1fr));- }-`;--const TileCell = styled.div`- min-width: 0;-- @media (min-width: ${theme.breakpoints.md}px) {- &[data-index='0'] {- grid-column: span 12;- }- &[data-index='1'],- &[data-index='2'],- &[data-index='5'],- &[data-index='6'] {- grid-column: span 6;- }- &[data-index='3'] {- grid-column: span 4;- }- &[data-index='4'] {- grid-column: span 8;- }- }-`;--type TilesProps = {- mask: ImageType;- renderText: (descriptor: MessageDescriptor) => string;- tiles: FeatureTileType[];-};--export function Tiles({ mask, renderText, tiles }: TilesProps) {- return (- <TilesGrid>- {tiles.map((tile, index) => (- <TileCell data-index={index} key={`${tile.heading.text}-${index}`}>- <Tile index={index} mask={mask} renderText={renderText} tile={tile} />- </TileCell>- ))}- </TilesGrid>- );-}diff --git a/packages/twenty-website-new/src/sections/Feature/components/index.ts b/packages/twenty-website-new/src/sections/Feature/components/index.tsdeleted file mode 100644index b0f2a64a815..00000000000--- a/packages/twenty-website-new/src/sections/Feature/components/index.ts+++ /dev/null@@ -1,6 +0,0 @@-import { Intro } from './Intro';-import { Root } from './Root';-import { Tile } from './Tile/Tile';-import { Tiles } from './Tiles';--export const Feature = { Intro, Root, Tile, Tiles };diff --git a/packages/twenty-website-new/src/sections/Feature/index.ts b/packages/twenty-website-new/src/sections/Feature/index.tsnew file mode 100644index 00000000000..28c791c954b--- /dev/null+++ b/packages/twenty-website-new/src/sections/Feature/index.ts@@ -0,0 +1 @@+export { Feature, type FeatureTileType } from './Feature';diff --git a/packages/twenty-website-new/src/sections/Feature/types/FeatureData.ts b/packages/twenty-website-new/src/sections/Feature/types/FeatureData.tsdeleted file mode 100644index 4b36929ccee..00000000000--- a/packages/twenty-website-new/src/sections/Feature/types/FeatureData.ts+++ /dev/null@@ -1,9 +0,0 @@-import type { MessageEyebrow } from '@/lib/i18n/message-eyebrow';-import type { ImageType } from '@/design-system/components/Image';-import type { FeatureTileType } from '@/sections/Feature/types/FeatureTile';--export type FeatureDataType = {- eyebrow: MessageEyebrow;- mask: ImageType;- tiles: FeatureTileType[];-};diff --git a/packages/twenty-website-new/src/sections/Feature/types/FeatureTile.ts b/packages/twenty-website-new/src/sections/Feature/types/FeatureTile.tsdeleted file mode 100644index 7426e809fe5..00000000000--- a/packages/twenty-website-new/src/sections/Feature/types/FeatureTile.ts+++ /dev/null@@ -1,10 +0,0 @@-import type { MessageBody } from '@/lib/i18n/message-body';-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';-import type { ImageType } from '@/design-system/components/Image';--export type FeatureTileType = {- bullets: MessageBody[];- heading: MessageHeadingSegment;- icon: string;- image: ImageType;-};diff --git a/packages/twenty-website-new/src/sections/Feature/types/index.ts b/packages/twenty-website-new/src/sections/Feature/types/index.tsdeleted file mode 100644index 06ea14a9e4a..00000000000--- a/packages/twenty-website-new/src/sections/Feature/types/index.ts+++ /dev/null@@ -1,2 +0,0 @@-export type { FeatureDataType } from './FeatureData';-export type { FeatureTileType } from './FeatureTile';diff --git a/packages/twenty-website-new/src/sections/Footer/components/Bottom.tsx b/packages/twenty-website-new/src/sections/Footer/components/Bottom.tsxindex 721e3699420..ba523f1cb60 100644--- a/packages/twenty-website-new/src/sections/Footer/components/Bottom.tsx+++ b/packages/twenty-website-new/src/sections/Footer/components/Bottom.tsx@@ -1,4 +1,5 @@import { ArrowRightUpIcon, SOCIAL_ICONS } from '@/icons';+import { getServerI18n } from '@/lib/i18n/utils/get-server-i18n';import type { MessageDescriptor } from '@lingui/core';import type { FooterSocialLinkType } from '@/sections/Footer/types';import { LocaleSwitcher } from '@/sections/Footer/components/LocaleSwitcher';@@ -86,14 +87,14 @@ const SocialLink = styled.a`type BottomProps = {copyright: MessageDescriptor;links: FooterSocialLinkType[];- renderText: (descriptor: MessageDescriptor) => string;};-export function Bottom({ copyright, links, renderText }: BottomProps) {+export function Bottom({ copyright, links }: BottomProps) {+ const i18n = getServerI18n();return (<BottomGrid><CopyrightRow>- <Copyright>{renderText(copyright)}</Copyright>+ <Copyright>{i18n._(copyright)}</Copyright><LocaleSwitcher /></CopyrightRow><SocialNav aria-label="Social media">diff --git a/packages/twenty-website-new/src/sections/Footer/components/FooterNavCta.tsx b/packages/twenty-website-new/src/sections/Footer/components/FooterNavCta.tsxindex 69c09db90e7..1b4efb5b00e 100644--- a/packages/twenty-website-new/src/sections/Footer/components/FooterNavCta.tsx+++ b/packages/twenty-website-new/src/sections/Footer/components/FooterNavCta.tsx@@ -1,14 +1,14 @@-import { TalkToUsButton } from '@/lib/contact-cal';+import { TalkToUsButton } from '@/sections/ContactCal';import { LinkButton } from '@/design-system/components';+import { getServerI18n } from '@/lib/i18n/utils/get-server-i18n';import type { FooterCtaType } from '@/sections/Footer/types';-import type { MessageDescriptor } from '@lingui/core';type FooterNavCtaProps = {cta: FooterCtaType;- renderText: (descriptor: MessageDescriptor) => string;};-export function FooterNavCta({ cta, renderText }: FooterNavCtaProps) {+export function FooterNavCta({ cta }: FooterNavCtaProps) {+ const i18n = getServerI18n();if (cta.kind === 'contactModal') {return (<TalkToUsButton@@ -23,7 +23,7 @@ export function FooterNavCta({ cta, renderText }: FooterNavCtaProps) {<LinkButtoncolor={cta.color}href={cta.href}- label={renderText(cta.label)}+ label={i18n._(cta.label)}variant={cta.variant}/>);diff --git a/packages/twenty-website-new/src/sections/Footer/components/LocaleSwitcher.tsx b/packages/twenty-website-new/src/sections/Footer/components/LocaleSwitcher.tsxindex 76c1757dae0..393fb8f28ac 100644--- a/packages/twenty-website-new/src/sections/Footer/components/LocaleSwitcher.tsx+++ b/packages/twenty-website-new/src/sections/Footer/components/LocaleSwitcher.tsx@@ -3,17 +3,24 @@import { styled } from '@linaria/react';import { IconCheck, IconChevronDown, IconWorld } from '@tabler/icons-react';import Link from 'next/link';-import { type ChangeEvent, useEffect, useMemo, useRef, useState } from 'react';+import {+ type ChangeEvent,+ useCallback,+ useMemo,+ useRef,+ useState,+} from 'react';import { type AppLocale } from 'twenty-shared/translations';-import { WEBSITE_LOCALE_LIST } from '@/lib/i18n/app-locale-set';-import { localizeHref } from '@/lib/i18n/localize-href';+import { WEBSITE_LOCALE_LIST } from '@/lib/i18n/utils/app-locale-set';+import { localizeHref } from '@/lib/i18n/utils/localize-href';import {getEnglishLocaleName,getNativeLocaleName,-} from '@/lib/i18n/locale-display-names';-import { useLocale } from '@/lib/i18n/use-locale';-import { useUnlocalizedPathname } from '@/lib/i18n/use-unlocalized-pathname';+} from '@/lib/i18n/utils/locale-display-names';+import { useLocale } from '@/lib/i18n/hooks/use-locale';+import { useUnlocalizedPathname } from '@/lib/i18n/hooks/use-unlocalized-pathname';+import { LocaleSwitcherDismissEffect } from '@/sections/Footer/effect-components/LocaleSwitcherDismissEffect';import { theme } from '@/theme';const SEARCH_THRESHOLD = 6;@@ -178,34 +185,9 @@ export function LocaleSwitcher() {return ALL_LOCALES.filter((entry) => matchesQuery(entry, trimmed));}, [query]);- useEffect(() => {- if (!open) return;-- const handlePointerDown = (event: MouseEvent) => {- if (wrapperRef.current?.contains(event.target as Node)) return;- setOpen(false);- };-- const handleKeyDown = (event: KeyboardEvent) => {- if (event.key === 'Escape') {- setOpen(false);- triggerRef.current?.focus();- }- };-- document.addEventListener('mousedown', handlePointerDown);- document.addEventListener('keydown', handleKeyDown);- return () => {- document.removeEventListener('mousedown', handlePointerDown);- document.removeEventListener('keydown', handleKeyDown);- };- }, [open]);-- useEffect(() => {- if (open && ALL_LOCALES.length > SEARCH_THRESHOLD) {- searchRef.current?.focus();- }- }, [open]);+ const handleDismiss = useCallback(() => {+ setOpen(false);+ }, []);if (ALL_LOCALES.length < 2) return null;@@ -230,6 +212,14 @@ export function LocaleSwitcher() {return (<Wrapper ref={wrapperRef}>+ <LocaleSwitcherDismissEffect+ open={open}+ onDismiss={handleDismiss}+ wrapperRef={wrapperRef}+ triggerRef={triggerRef}+ searchRef={searchRef}+ showSearch={showSearch}+ /><TriggerButtonref={triggerRef}type="button"diff --git a/packages/twenty-website-new/src/sections/Footer/components/Nav.tsx b/packages/twenty-website-new/src/sections/Footer/components/Nav.tsxindex 42d5cc07a46..091c3f9e9fa 100644--- a/packages/twenty-website-new/src/sections/Footer/components/Nav.tsx+++ b/packages/twenty-website-new/src/sections/Footer/components/Nav.tsx@@ -1,10 +1,10 @@import { FooterNavCta } from '@/sections/Footer/components/FooterNavCta';import { PlusIcon, RectangleFillIcon } from '@/icons';import { LocalizedLink } from '@/lib/i18n';+import { getServerI18n } from '@/lib/i18n/utils/get-server-i18n';import type { FooterNavGroupType } from '@/sections/Footer/types';import { theme } from '@/theme';import { NavigationMenu } from '@base-ui/react/navigation-menu';-import type { MessageDescriptor } from '@lingui/core';import { styled } from '@linaria/react';import React from 'react';@@ -126,10 +126,10 @@ const Actions = styled.div`type NavProps = {groups: FooterNavGroupType[];- renderText: (descriptor: MessageDescriptor) => string;};-export function Nav({ groups, renderText }: NavProps) {+export function Nav({ groups }: NavProps) {+ const i18n = getServerI18n();return (<NavigationMenu.Root render={<FooterNav />}>{groups.map((group, index) => (@@ -150,9 +150,7 @@ export function Nav({ groups, renderText }: NavProps) {</NavDivider>)}<NavGroup aria-labelledby={group.id}>- <NavGroupTitle id={group.id}>- {renderText(group.title)}- </NavGroupTitle>+ <NavGroupTitle id={group.id}>{i18n._(group.title)}</NavGroupTitle><NavMenuList>{group.links.map((link) => (<NavigationMenu.Item key={link.href}>@@ -175,7 +173,7 @@ export function Nav({ groups, renderText }: NavProps) {fillColor={theme.colors.secondary.background[100]}/></NavLinkHoverIcon>- {renderText(link.label)}+ {i18n._(link.label)}</NavLink></NavigationMenu.Item>))}@@ -188,7 +186,6 @@ export function Nav({ groups, renderText }: NavProps) {cta.kind === 'link' ? `${cta.href}-${cta.kind}` : cta.kind}cta={cta}- renderText={renderText}/>))}</Actions>diff --git a/packages/twenty-website-new/src/sections/Footer/components/__tests__/LocaleSwitcher.test.tsx b/packages/twenty-website-new/src/sections/Footer/components/__tests__/LocaleSwitcher.test.tsxindex 72203622c42..10b5407c75e 100644--- a/packages/twenty-website-new/src/sections/Footer/components/__tests__/LocaleSwitcher.test.tsx+++ b/packages/twenty-website-new/src/sections/Footer/components/__tests__/LocaleSwitcher.test.tsx@@ -4,13 +4,13 @@ jest.mock('next/navigation', () => ({usePathname: jest.fn(),}));-jest.mock('@/lib/i18n/use-locale', () => ({+jest.mock('@/lib/i18n/hooks/use-locale', () => ({useLocale: jest.fn(),}));import { usePathname } from 'next/navigation';-import { useLocale } from '@/lib/i18n/use-locale';+import { useLocale } from '@/lib/i18n/hooks/use-locale';import { LocaleSwitcher } from '@/sections/Footer/components/LocaleSwitcher';const mockUsePathname = usePathname as jest.MockedFunction<typeof usePathname>;diff --git a/packages/twenty-website-new/src/sections/Footer/data.ts b/packages/twenty-website-new/src/sections/Footer/data.tsindex 17fe8c8be94..f6eda75bf0a 100644--- a/packages/twenty-website-new/src/sections/Footer/data.ts+++ b/packages/twenty-website-new/src/sections/Footer/data.ts@@ -17,7 +17,7 @@ export const FOOTER_DATA: FooterDataType = {{ label: msg`Partners`, href: '/partners', external: false },{label: msg`Why Twenty`,- href: '/resources/why-twenty',+ href: '/why-twenty',external: false,},{ label: msg`Articles`, href: '/articles', external: false },diff --git a/packages/twenty-website-new/src/sections/Footer/effect-components/LocaleSwitcherDismissEffect.tsx b/packages/twenty-website-new/src/sections/Footer/effect-components/LocaleSwitcherDismissEffect.tsxnew file mode 100644index 00000000000..38038454921--- /dev/null+++ b/packages/twenty-website-new/src/sections/Footer/effect-components/LocaleSwitcherDismissEffect.tsx@@ -0,0 +1,52 @@+'use client';++import { useEffect, type RefObject } from 'react';++type LocaleSwitcherDismissEffectProps = {+ open: boolean;+ onDismiss: () => void;+ wrapperRef: RefObject<HTMLDivElement | null>;+ triggerRef: RefObject<HTMLButtonElement | null>;+ searchRef: RefObject<HTMLInputElement | null>;+ showSearch: boolean;+};++export function LocaleSwitcherDismissEffect({+ open,+ onDismiss,+ wrapperRef,+ triggerRef,+ searchRef,+ showSearch,+}: LocaleSwitcherDismissEffectProps) {+ useEffect(() => {+ if (!open) return;++ const handlePointerDown = (event: MouseEvent) => {+ if (wrapperRef.current?.contains(event.target as Node)) return;+ onDismiss();+ };++ const handleKeyDown = (event: KeyboardEvent) => {+ if (event.key === 'Escape') {+ onDismiss();+ triggerRef.current?.focus();+ }+ };++ document.addEventListener('mousedown', handlePointerDown);+ document.addEventListener('keydown', handleKeyDown);+ return () => {+ document.removeEventListener('mousedown', handlePointerDown);+ document.removeEventListener('keydown', handleKeyDown);+ };+ }, [open, onDismiss, wrapperRef, triggerRef]);++ useEffect(() => {+ if (open && showSearch) {+ searchRef.current?.focus();+ }+ }, [open, showSearch, searchRef]);++ return null;+}diff --git a/packages/twenty-website-new/src/sections/Footer/index.ts b/packages/twenty-website-new/src/sections/Footer/index.tsnew file mode 100644index 00000000000..b85f2a7850b--- /dev/null+++ b/packages/twenty-website-new/src/sections/Footer/index.ts@@ -0,0 +1,10 @@+export { Footer } from './components';+export { FOOTER_DATA } from './data';+export type {+ FooterBottomType,+ FooterCtaType,+ FooterDataType,+ FooterNavGroupType,+ FooterNavLinkType,+ FooterSocialLinkType,+} from './types';diff --git a/packages/twenty-website-new/src/sections/Footer/types/FooterData.ts b/packages/twenty-website-new/src/sections/Footer/types/FooterData.tsdeleted file mode 100644index ad1bb7f6987..00000000000--- a/packages/twenty-website-new/src/sections/Footer/types/FooterData.ts+++ /dev/null@@ -1,9 +0,0 @@-import type { FooterBottomType } from './FooterBottom';-import type { FooterNavGroupType } from './FooterNavGroup';-import type { FooterSocialLinkType } from './FooterSocialLink';--export type FooterDataType = {- bottom: FooterBottomType;- navGroups: FooterNavGroupType[];- socialLinks: FooterSocialLinkType[];-};diff --git a/packages/twenty-website-new/src/sections/Footer/types/FooterBottom.ts b/packages/twenty-website-new/src/sections/Footer/types/footer-bottom.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Footer/types/FooterBottom.tsrename to packages/twenty-website-new/src/sections/Footer/types/footer-bottom.tsdiff --git a/packages/twenty-website-new/src/sections/Footer/types/FooterCta.ts b/packages/twenty-website-new/src/sections/Footer/types/footer-cta.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Footer/types/FooterCta.tsrename to packages/twenty-website-new/src/sections/Footer/types/footer-cta.tsdiff --git a/packages/twenty-website-new/src/sections/Footer/types/footer-data.ts b/packages/twenty-website-new/src/sections/Footer/types/footer-data.tsnew file mode 100644index 00000000000..035272a6ffb--- /dev/null+++ b/packages/twenty-website-new/src/sections/Footer/types/footer-data.ts@@ -0,0 +1,9 @@+import type { FooterBottomType } from './footer-bottom';+import type { FooterNavGroupType } from './footer-nav-group';+import type { FooterSocialLinkType } from './footer-social-link';++export type FooterDataType = {+ bottom: FooterBottomType;+ navGroups: FooterNavGroupType[];+ socialLinks: FooterSocialLinkType[];+};diff --git a/packages/twenty-website-new/src/sections/Footer/types/FooterNavGroup.ts b/packages/twenty-website-new/src/sections/Footer/types/footer-nav-group.tssimilarity index 63%rename from packages/twenty-website-new/src/sections/Footer/types/FooterNavGroup.tsrename to packages/twenty-website-new/src/sections/Footer/types/footer-nav-group.tsindex 8f79d6f0cbb..e22c7714cdc 100644--- a/packages/twenty-website-new/src/sections/Footer/types/FooterNavGroup.ts+++ b/packages/twenty-website-new/src/sections/Footer/types/footer-nav-group.ts@@ -1,6 +1,6 @@import type { MessageDescriptor } from '@lingui/core';-import type { FooterCtaType } from './FooterCta';-import type { FooterNavLinkType } from './FooterNavLink';+import type { FooterCtaType } from './footer-cta';+import type { FooterNavLinkType } from './footer-nav-link';export type FooterNavGroupType = {ctas: FooterCtaType[];diff --git a/packages/twenty-website-new/src/sections/Footer/types/FooterNavLink.ts b/packages/twenty-website-new/src/sections/Footer/types/footer-nav-link.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Footer/types/FooterNavLink.tsrename to packages/twenty-website-new/src/sections/Footer/types/footer-nav-link.tsdiff --git a/packages/twenty-website-new/src/sections/Footer/types/FooterSocialLink.ts b/packages/twenty-website-new/src/sections/Footer/types/footer-social-link.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Footer/types/FooterSocialLink.tsrename to packages/twenty-website-new/src/sections/Footer/types/footer-social-link.tsdiff --git a/packages/twenty-website-new/src/sections/Footer/types/index.ts b/packages/twenty-website-new/src/sections/Footer/types/index.tsindex 2efff9e4b6e..d1a55b2cd75 100644--- a/packages/twenty-website-new/src/sections/Footer/types/index.ts+++ b/packages/twenty-website-new/src/sections/Footer/types/index.ts@@ -1,6 +1,6 @@-export type { FooterBottomType } from './FooterBottom';-export type { FooterCtaType } from './FooterCta';-export type { FooterDataType } from './FooterData';-export type { FooterNavGroupType } from './FooterNavGroup';-export type { FooterNavLinkType } from './FooterNavLink';-export type { FooterSocialLinkType } from './FooterSocialLink';+export type { FooterBottomType } from './footer-bottom';+export type { FooterCtaType } from './footer-cta';+export type { FooterDataType } from './footer-data';+export type { FooterNavGroupType } from './footer-nav-group';+export type { FooterNavLinkType } from './footer-nav-link';+export type { FooterSocialLinkType } from './footer-social-link';diff --git a/packages/twenty-website-new/src/sections/Footer/visuals/Background.tsx b/packages/twenty-website-new/src/sections/Footer/visuals/Background.tsxindex dfcbe1aaef7..92d12dc19cb 100644--- a/packages/twenty-website-new/src/sections/Footer/visuals/Background.tsx+++ b/packages/twenty-website-new/src/sections/Footer/visuals/Background.tsx@@ -1,367 +1,8 @@'use client';-import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment.js';-import { loadImportedGeometryFromUrl } from '@/lib/halftone';import { styled } from '@linaria/react';-import { useEffect, useRef } from 'react';-import * as THREE from 'three';-import { observeElementSize } from '@/lib/dom/observe-element-size';-import {- createVisualRenderLoop,- tryCreateSiteWebGlRenderer,- type VisualRenderLoop,- type VisualRenderLoopFrame,-} from '@/lib/visual-runtime';--const VIRTUAL_RENDER_HEIGHT = 768;--const passThroughVertexShader = /* glsl */ `- varying vec2 vUv;-- void main() {- vUv = uv;- gl_Position = vec4(position, 1.0);- }-`;--const blurFragmentShader = /* glsl */ `- precision highp float;-- uniform sampler2D tInput;- uniform vec2 dir;- uniform vec2 res;-- varying vec2 vUv;-- void main() {- vec4 sum = vec4(0.0);- vec2 px = dir / res;-- float w[5];- w[0] = 0.227027;- w[1] = 0.1945946;- w[2] = 0.1216216;- w[3] = 0.054054;- w[4] = 0.016216;-- sum += texture2D(tInput, vUv) * w[0];-- for (int i = 1; i < 5; i++) {- float fi = float(i) * 3.0;- sum += texture2D(tInput, vUv + px * fi) * w[i];- sum += texture2D(tInput, vUv - px * fi) * w[i];- }-- gl_FragColor = sum;- }-`;--const halftoneFragmentShader = /* glsl */ `- precision highp float;-- uniform sampler2D tScene;- uniform sampler2D tGlow;- uniform vec2 resolution;- uniform float numRows;- uniform float glowStr;- uniform float contrast;- uniform float power;- uniform float shading;- uniform float baseInk;- uniform float maxBar;- uniform float rowMerge;- uniform float cellRatio;- uniform float cutoff;- uniform float highlightOpen;- uniform float shadowGrouping;- uniform float shadowCrush;- uniform vec3 dashColor;- uniform float time;- uniform float waveAmount;- uniform float waveSpeed;- uniform float distanceScale;- uniform vec2 interactionUv;- uniform vec2 interactionVelocity;- uniform vec2 dragOffset;- uniform float hoverLightStrength;- uniform float hoverLightRadius;- uniform float hoverFlowStrength;- uniform float hoverFlowRadius;- uniform float dragFlowStrength;- uniform float dragFlowRadius;- uniform float cropToBounds;-- varying vec2 vUv;-- void main() {- // Crop to image bounds: discard fragments outside source image (image mode only)- if (cropToBounds > 0.5) {- vec4 boundsCheck = texture2D(tScene, vUv);- if (boundsCheck.a < 0.01) {- gl_FragColor = vec4(0.0);- return;- }- }-- float baseRowH = resolution.y / (numRows * distanceScale);- vec2 pointerPx = interactionUv * resolution;- vec2 fragDelta = gl_FragCoord.xy - pointerPx;- float fragDist = length(fragDelta);- vec2 radialDir = fragDist > 0.001 ? fragDelta / fragDist : vec2(0.0, 1.0);- float velocityMagnitude = length(interactionVelocity);- vec2 motionDir = velocityMagnitude > 0.001- ? interactionVelocity / velocityMagnitude- : vec2(0.0, 0.0);- float motionBias = velocityMagnitude > 0.001- ? dot(-radialDir, motionDir) * 0.5 + 0.5- : 0.5;-- float hoverLightMask = 0.0;- if (hoverLightStrength > 0.0) {- float lightRadiusPx = hoverLightRadius * resolution.y;- hoverLightMask = smoothstep(lightRadiusPx, 0.0, fragDist);- }-- float hoverFlowMask = 0.0;- if (hoverFlowStrength > 0.0) {- float hoverRadiusPx = hoverFlowRadius * resolution.y;- hoverFlowMask = smoothstep(hoverRadiusPx, 0.0, fragDist);- }-- float dragFlowMask = 0.0;- if (dragFlowStrength > 0.0) {- float dragRadiusPx = dragFlowRadius * resolution.y;- dragFlowMask = smoothstep(dragRadiusPx, 0.0, fragDist);- }-- vec2 hoverDisplacement =- radialDir * hoverFlowStrength * hoverFlowMask * baseRowH * 0.55 +- motionDir * hoverFlowStrength * hoverFlowMask * (0.4 + motionBias) * baseRowH * 1.15;- vec2 dragDisplacement = dragOffset * dragFlowMask * dragFlowStrength * 0.8;- vec2 effectCoord = gl_FragCoord.xy + hoverDisplacement + dragDisplacement;-- float densityBoost =- hoverFlowStrength * hoverFlowMask * 0.22 +- dragFlowStrength * dragFlowMask * 0.16;- float rowH = baseRowH / (1.0 + densityBoost);-- float offsetY = effectCoord.y;- float row = floor(offsetY / rowH);- float rowFrac = offsetY / rowH - row;- float rowV = (row + 0.5) * rowH / resolution.y;- float dy = abs(rowFrac - 0.5);-- float waveOffset = waveAmount * sin(time * waveSpeed + row * 0.5) * rowH;- float effectiveX = effectCoord.x + waveOffset;-- float localCellRatio = cellRatio * (- 1.0 +- hoverFlowStrength * hoverFlowMask * 0.08 +- dragFlowStrength * dragFlowMask * 0.1 * motionBias- );- float cellW = rowH * localCellRatio;- float cellIdx = floor(effectiveX / cellW);- float cellFrac = (effectiveX - cellIdx * cellW) / cellW;- float cellU = (cellIdx + 0.5) * cellW / resolution.x;-- vec2 sampleUv = vec2(- clamp(cellU, 0.0, 1.0),- clamp(rowV, 0.0, 1.0)- );-- vec4 sceneSample = texture2D(tScene, sampleUv);- vec4 glowCell = texture2D(tGlow, sampleUv);-- float mask = smoothstep(0.02, 0.08, sceneSample.a);- float lum = dot(sceneSample.rgb, vec3(0.299, 0.587, 0.114));- float avgLum = dot(glowCell.rgb, vec3(0.299, 0.587, 0.114));- float detail = lum - avgLum;-- float litLum = lum + max(detail, 0.0) * shading- - max(-detail, 0.0) * shading * 0.55;- float lightLift =- hoverLightStrength * hoverLightMask * mix(0.78, 1.18, motionBias) * 0.34;- float lightFocus = hoverLightStrength * hoverLightMask * 0.12;- litLum = clamp(litLum + lightLift, 0.0, 1.0);- litLum = clamp((litLum - cutoff) / max(1.0 - cutoff, 0.001), 0.0, 1.0);- litLum = pow(litLum, max(contrast - lightFocus, 0.25));-- float darkness = 1.0 - litLum;- float groupedLum = clamp((avgLum - cutoff) / max(1.0 - cutoff, 0.001), 0.0, 1.0);- groupedLum = pow(groupedLum, max(contrast * 0.9, 0.25));- float groupedDarkness = 1.0 - groupedLum;- darkness = mix(darkness, max(darkness, groupedDarkness), shadowGrouping);- darkness = clamp(- (darkness - highlightOpen) / max(1.0 - highlightOpen, 0.001),- 0.0,- 1.0- );-- float shadowMask = smoothstep(0.42, 0.96, darkness);- darkness = mix(- darkness,- mix(darkness, 1.0, shadowMask),- shadowCrush- );-- float inkBase = baseInk * smoothstep(0.03, 0.24, darkness);- float ink = mix(inkBase, 1.0, darkness);- float fill = pow(ink, 1.05) * power;- fill = clamp(fill, 0.0, 1.0) * mask;-- float dynamicBarHalf = mix(0.08, maxBar, smoothstep(0.03, 0.85, ink));- float dynamicBarHalfY = min(- dynamicBarHalf + rowMerge * smoothstep(0.42, 0.98, ink),- 0.78- );- float dx2 = abs(cellFrac - 0.5);- float halfFill = fill * 0.5;- float bodyHalfW = max(halfFill - dynamicBarHalf * (rowH / cellW), 0.0);- float capRX = dynamicBarHalf * rowH;- float capRY = dynamicBarHalfY * rowH;-- float inDash = 0.0;- if (dx2 <= bodyHalfW) {- float edgeDist = dynamicBarHalfY - dy;- inDash = smoothstep(-0.03, 0.03, edgeDist);- } else {- float cdx = (dx2 - bodyHalfW) * cellW;- float cdy = dy * rowH;- float ellipseDist = sqrt(- (cdx * cdx) / max(capRX * capRX, 0.0001) +- (cdy * cdy) / max(capRY * capRY, 0.0001)- );- inDash = 1.0 - smoothstep(1.0 - 0.08, 1.0 + 0.08, ellipseDist);- }-- inDash *= step(0.001, ink) * mask;- inDash *= 1.0 + 0.03 * sin(time * 0.8 + row * 0.1);-- vec4 glow = texture2D(tGlow, vUv);- float glowLum = dot(glow.rgb, vec3(0.299, 0.587, 0.114));- float halo = glowLum * glowStr * 0.25 * (1.0 - inDash);- float sharp = smoothstep(0.3, 0.5, inDash + halo);- vec3 color = dashColor * sharp;-- gl_FragColor = vec4(color, sharp);-- #include <tonemapping_fragment>- #include <colorspace_fragment>- }-`;--const GLB_URL = '/illustrations/common/footer/footer.glb';--const LIGHT_INTENSITY = 4;-const FILL_LIGHT_INTENSITY = 1.33;-const AMBIENT_LIGHT_INTENSITY = 0.28;-const LIGHT_ANGLE_DEGREES = 167;-const LIGHT_HEIGHT = 2.1;--const MATERIAL_ROUGHNESS = 0.42;-const MATERIAL_METALNESS = 0.16;--const HALFTONE_ROWS = 124;-const HALFTONE_CONTRAST = 2.7;-const HALFTONE_POWER = 1;-const HALFTONE_SHADING = 2.9;-const HALFTONE_BASE_INK = 0.19;-const HALFTONE_MAX_BAR = 0.25;-const HALFTONE_CELL_RATIO = 2.2;-const HALFTONE_CUTOFF = 0.02;-const HALFTONE_DASH_COLOR = '#2a2a2a';--const DRAG_SENSITIVITY = 0.008;-const DRAG_FRICTION = 0.08;-const DRAG_MOMENTUM = true;-const BREATHE_AMOUNT = 0.04;-const BREATHE_SPEED = 0.8;--const INITIAL_ROTATION_X = -0.5858908325312259;-const INITIAL_ROTATION_Y = 0.45733435420243096;-const INITIAL_ROTATION_Z = 0;-const INITIAL_TARGET_ROTATION_X = -0.5858908325312265;-const INITIAL_TARGET_ROTATION_Y = 0.4573343542024313;-const INITIAL_TIME_ELAPSED = 287.372499999977;-const BASE_CAMERA_DISTANCE = 4;--function createEnvironmentTexture(renderer: THREE.WebGLRenderer) {- const pmremGenerator = new THREE.PMREMGenerator(renderer);- const environmentTexture = pmremGenerator.fromScene(- new RoomEnvironment(),- 0.04,- ).texture;- pmremGenerator.dispose();-- return environmentTexture;-}--type FooterInteractionState = {- dragging: boolean;- mouseX: number;- mouseY: number;- pointerX: number;- pointerY: number;- rotationX: number;- rotationY: number;- rotationZ: number;- targetRotationX: number;- targetRotationY: number;- velocityX: number;- velocityY: number;-};--function createInteractionState(): FooterInteractionState {- return {- dragging: false,- mouseX: 0.5,- mouseY: 0.5,- pointerX: 0,- pointerY: 0,- rotationX: INITIAL_ROTATION_X,- rotationY: INITIAL_ROTATION_Y,- rotationZ: INITIAL_ROTATION_Z,- targetRotationX: INITIAL_TARGET_ROTATION_X,- targetRotationY: INITIAL_TARGET_ROTATION_Y,- velocityX: 0,- velocityY: 0,- };-}--function createRenderTarget(width: number, height: number) {- return new THREE.WebGLRenderTarget(width, height, {- minFilter: THREE.LinearFilter,- magFilter: THREE.LinearFilter,- format: THREE.RGBAFormat,- });-}--function setPrimaryLightPosition(- light: THREE.DirectionalLight,- angleDegrees: number,- height: number,-) {- const lightAngle = (angleDegrees * Math.PI) / 180;- light.position.set(- Math.cos(lightAngle) * 5,- height,- Math.sin(lightAngle) * 5,- );-}--function createFooterMaterial(environmentTexture: THREE.Texture) {- return new THREE.MeshPhysicalMaterial({- color: 0xd4d0c8,- roughness: MATERIAL_ROUGHNESS,- metalness: MATERIAL_METALNESS,- envMap: environmentTexture,- envMapIntensity: 0.25,- clearcoat: 0,- clearcoatRoughness: 0.08,- reflectivity: 0.5,- transmission: 0,- });-}+import { useRef } from 'react';+import { useFooterBackground } from './use-footer-background';const FooterBackgroundCanvasRoot = styled.div`position: absolute;@@ -388,398 +29,7 @@ const FooterVisualCanvasMount = styled.div`export function FooterBackground() {const mountReference = useRef<HTMLDivElement>(null);- useEffect(() => {- const container = mountReference.current;-- if (!container) {- return;- }-- let cancelled = false;- let renderLoop: VisualRenderLoop | null = null;-- const getWidth = () => Math.max(container.clientWidth, 1);- const getHeight = () => Math.max(container.clientHeight, 1);- const getVirtualHeight = () => Math.max(VIRTUAL_RENDER_HEIGHT, getHeight());- const getVirtualWidth = () =>- Math.max(- Math.round(- getVirtualHeight() * (getWidth() / Math.max(getHeight(), 1)),- ),- 1,- );-- const renderer = tryCreateSiteWebGlRenderer({- antialias: false,- alpha: true,- onContextLost: () => {- renderLoop?.stop();- },- });-- if (renderer === null) {- return;- }-- renderer.outputColorSpace = THREE.SRGBColorSpace;- renderer.setPixelRatio(1);- renderer.setClearColor(0x000000, 0);- renderer.setSize(getVirtualWidth(), getVirtualHeight(), false);-- const canvas = renderer.domElement;- canvas.style.cursor = 'grab';- canvas.style.display = 'block';- canvas.style.height = '100%';- canvas.style.touchAction = 'none';- canvas.style.width = '100%';- container.appendChild(canvas);-- const environmentTexture = createEnvironmentTexture(renderer);- const scene3d = new THREE.Scene();- scene3d.background = null;-- const camera = new THREE.PerspectiveCamera(- 45,- getWidth() / getHeight(),- 0.1,- 100,- );- camera.position.z = BASE_CAMERA_DISTANCE;-- const primaryLight = new THREE.DirectionalLight(0xffffff, LIGHT_INTENSITY);- setPrimaryLightPosition(primaryLight, LIGHT_ANGLE_DEGREES, LIGHT_HEIGHT);- scene3d.add(primaryLight);-- const fillLight = new THREE.DirectionalLight(- 0xffffff,- FILL_LIGHT_INTENSITY,- );- fillLight.position.set(-3, -1, 1);- scene3d.add(fillLight);-- const ambientLight = new THREE.AmbientLight(- 0xffffff,- AMBIENT_LIGHT_INTENSITY,- );- scene3d.add(ambientLight);-- const material = createFooterMaterial(environmentTexture);- const mesh = new THREE.Mesh(new THREE.BufferGeometry(), material);- mesh.visible = false;- scene3d.add(mesh);-- const sceneTarget = createRenderTarget(- getVirtualWidth(),- getVirtualHeight(),- );- const blurTargetA = createRenderTarget(- getVirtualWidth(),- getVirtualHeight(),- );- const blurTargetB = createRenderTarget(- getVirtualWidth(),- getVirtualHeight(),- );- const fullScreenGeometry = new THREE.PlaneGeometry(2, 2);- const orthographicCamera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);-- const blurHorizontalMaterial = new THREE.ShaderMaterial({- uniforms: {- tInput: { value: null },- dir: { value: new THREE.Vector2(1, 0) },- res: {- value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),- },- },- vertexShader: passThroughVertexShader,- fragmentShader: blurFragmentShader,- });-- const blurVerticalMaterial = new THREE.ShaderMaterial({- uniforms: {- tInput: { value: null },- dir: { value: new THREE.Vector2(0, 1) },- res: {- value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),- },- },- vertexShader: passThroughVertexShader,- fragmentShader: blurFragmentShader,- });-- const halftoneMaterial = new THREE.ShaderMaterial({- transparent: true,- uniforms: {- tScene: { value: sceneTarget.texture },- tGlow: { value: blurTargetB.texture },- resolution: {- value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),- },- numRows: { value: HALFTONE_ROWS },- glowStr: { value: 0 },- contrast: { value: HALFTONE_CONTRAST },- power: { value: HALFTONE_POWER },- shading: { value: HALFTONE_SHADING },- baseInk: { value: HALFTONE_BASE_INK },- maxBar: { value: HALFTONE_MAX_BAR },- cellRatio: { value: HALFTONE_CELL_RATIO },- cutoff: { value: HALFTONE_CUTOFF },- dashColor: { value: new THREE.Color(HALFTONE_DASH_COLOR) },- time: { value: 0 },- waveAmount: { value: 0 },- waveSpeed: { value: 1 },- distanceScale: { value: 1 },- interactionUv: { value: new THREE.Vector2(0.5, 0.5) },- interactionVelocity: { value: new THREE.Vector2(0, 0) },- dragOffset: { value: new THREE.Vector2(0, 0) },- hoverLightStrength: { value: 0 },- hoverLightRadius: { value: 0.2 },- hoverFlowStrength: { value: 0 },- hoverFlowRadius: { value: 0.18 },- dragFlowStrength: { value: 0 },- dragFlowRadius: { value: 0.24 },- cropToBounds: { value: 0 },- },- vertexShader: passThroughVertexShader,- fragmentShader: halftoneFragmentShader,- });-- const blurHorizontalScene = new THREE.Scene();- blurHorizontalScene.add(- new THREE.Mesh(fullScreenGeometry, blurHorizontalMaterial),- );-- const blurVerticalScene = new THREE.Scene();- blurVerticalScene.add(- new THREE.Mesh(fullScreenGeometry, blurVerticalMaterial),- );-- const postScene = new THREE.Scene();- postScene.add(new THREE.Mesh(fullScreenGeometry, halftoneMaterial));-- const interaction = createInteractionState();-- const syncSize = () => {- const width = getWidth();- const height = getHeight();- const virtualWidth = getVirtualWidth();- const virtualHeight = getVirtualHeight();-- renderer.setSize(virtualWidth, virtualHeight, false);- camera.aspect = width / height;- camera.updateProjectionMatrix();- sceneTarget.setSize(virtualWidth, virtualHeight);- blurTargetA.setSize(virtualWidth, virtualHeight);- blurTargetB.setSize(virtualWidth, virtualHeight);- blurHorizontalMaterial.uniforms.res.value.set(- virtualWidth,- virtualHeight,- );- blurVerticalMaterial.uniforms.res.value.set(virtualWidth, virtualHeight);- halftoneMaterial.uniforms.resolution.value.set(- virtualWidth,- virtualHeight,- );- };-- const stopObservingSize = observeElementSize(container, syncSize);-- const updatePointerPosition = (event: PointerEvent) => {- const rect = canvas.getBoundingClientRect();- const width = Math.max(rect.width, 1);- const height = Math.max(rect.height, 1);-- interaction.mouseX = THREE.MathUtils.clamp(- (event.clientX - rect.left) / width,- 0,- 1,- );- interaction.mouseY = THREE.MathUtils.clamp(- (event.clientY - rect.top) / height,- 0,- 1,- );- };-- const handlePointerDown = (event: PointerEvent) => {- updatePointerPosition(event);- interaction.dragging = false;- interaction.pointerX = event.clientX;- interaction.pointerY = event.clientY;- interaction.velocityX = 0;- interaction.velocityY = 0;- canvas.style.cursor = 'default';- };-- const handlePointerMove = (event: PointerEvent) => {- updatePointerPosition(event);- };-- const handleWindowPointerMove = (event: PointerEvent) => {- updatePointerPosition(event);-- if (!interaction.dragging) {- return;- }-- const deltaX = (event.clientX - interaction.pointerX) * DRAG_SENSITIVITY;- const deltaY = (event.clientY - interaction.pointerY) * DRAG_SENSITIVITY;- interaction.velocityX = deltaY;- interaction.velocityY = deltaX;- interaction.targetRotationY += deltaX;- interaction.targetRotationX += deltaY;- interaction.pointerX = event.clientX;- interaction.pointerY = event.clientY;- };-- const handlePointerLeave = () => {- if (interaction.dragging) {- return;- }-- interaction.mouseX = 0.5;- interaction.mouseY = 0.5;- };-- const handlePointerUp = () => {- interaction.dragging = false;- canvas.style.cursor = 'grab';- };-- const handleWindowBlur = () => {- handlePointerUp();- handlePointerLeave();- };-- canvas.addEventListener('pointermove', handlePointerMove);- canvas.addEventListener('pointerleave', handlePointerLeave);- canvas.addEventListener('pointerdown', handlePointerDown);- window.addEventListener('pointerup', handlePointerUp);- window.addEventListener('pointermove', handleWindowPointerMove);- window.addEventListener('blur', handleWindowBlur);-- loadImportedGeometryFromUrl('glb', GLB_URL, 'Footer model', {- scaleTarget: 2,- })- .then((geometry) => {- if (cancelled) {- geometry.dispose();- return;- }-- mesh.geometry.dispose();- mesh.geometry = geometry;- mesh.visible = true;- })- .catch((error) => {- console.error(error);- });-- const renderFrame = (- _timestamp: DOMHighResTimeStamp,- { elapsedSeconds }: VisualRenderLoopFrame,- ) => {- if (cancelled) {- return;- }-- const elapsedTime = INITIAL_TIME_ELAPSED + elapsedSeconds;- halftoneMaterial.uniforms.time.value = elapsedTime;- halftoneMaterial.uniforms.interactionUv.value.set(- interaction.mouseX,- 1 - interaction.mouseY,- );-- if (!interaction.dragging && DRAG_MOMENTUM) {- interaction.targetRotationX += interaction.velocityX;- interaction.targetRotationY += interaction.velocityY;- interaction.velocityX *= 1 - DRAG_FRICTION;- interaction.velocityY *= 1 - DRAG_FRICTION;- }-- interaction.rotationX +=- (interaction.targetRotationX - interaction.rotationX) * DRAG_FRICTION;- interaction.rotationY +=- (interaction.targetRotationY - interaction.rotationY) * DRAG_FRICTION;- interaction.rotationZ += (0 - interaction.rotationZ) * 0.12;-- const meshScale =- 1 + Math.sin(elapsedTime * BREATHE_SPEED) * BREATHE_AMOUNT;-- mesh.rotation.set(- interaction.rotationX,- interaction.rotationY,- interaction.rotationZ,- );- mesh.position.y = 0;- mesh.scale.setScalar(meshScale);-- camera.position.x += (0 - camera.position.x) * 0.12;- camera.position.y += (0 - camera.position.y) * 0.12;- camera.position.z += (BASE_CAMERA_DISTANCE - camera.position.z) * 0.12;- camera.lookAt(0, 0, 0);- setPrimaryLightPosition(primaryLight, LIGHT_ANGLE_DEGREES, LIGHT_HEIGHT);-- renderer.setRenderTarget(sceneTarget);- renderer.clear();- renderer.render(scene3d, camera);-- blurHorizontalMaterial.uniforms.tInput.value = sceneTarget.texture;- renderer.setRenderTarget(blurTargetA);- renderer.render(blurHorizontalScene, orthographicCamera);-- blurVerticalMaterial.uniforms.tInput.value = blurTargetA.texture;- renderer.setRenderTarget(blurTargetB);- renderer.render(blurVerticalScene, orthographicCamera);-- blurHorizontalMaterial.uniforms.tInput.value = blurTargetB.texture;- renderer.setRenderTarget(blurTargetA);- renderer.render(blurHorizontalScene, orthographicCamera);-- blurVerticalMaterial.uniforms.tInput.value = blurTargetA.texture;- renderer.setRenderTarget(blurTargetB);- renderer.render(blurVerticalScene, orthographicCamera);-- renderer.setRenderTarget(null);- renderer.clear();- renderer.render(postScene, orthographicCamera);- };-- renderLoop = createVisualRenderLoop({- renderFrame,- shouldRender: () => !cancelled,- target: container,- targetVisibilityOptions: { rootMargin: '100px' },- });- renderLoop.start();-- return () => {- cancelled = true;- renderLoop?.dispose();- stopObservingSize();- canvas.removeEventListener('pointermove', handlePointerMove);- canvas.removeEventListener('pointerleave', handlePointerLeave);- canvas.removeEventListener('pointerdown', handlePointerDown);- window.removeEventListener('pointerup', handlePointerUp);- window.removeEventListener('pointermove', handleWindowPointerMove);- window.removeEventListener('blur', handleWindowBlur);- blurHorizontalMaterial.dispose();- blurVerticalMaterial.dispose();- halftoneMaterial.dispose();- fullScreenGeometry.dispose();- mesh.geometry.dispose();- material.dispose();- sceneTarget.dispose();- blurTargetA.dispose();- blurTargetB.dispose();- environmentTexture.dispose();- renderer.dispose();-- if (canvas.parentNode === container) {- container.removeChild(canvas);- }- };- }, []);+ useFooterBackground({ mountRef: mountReference });return (<FooterBackgroundCanvasRoot aria-hidden>diff --git a/packages/twenty-website-new/src/sections/Footer/visuals/use-footer-background.ts b/packages/twenty-website-new/src/sections/Footer/visuals/use-footer-background.tsnew file mode 100644index 00000000000..544217f6bb6--- /dev/null+++ b/packages/twenty-website-new/src/sections/Footer/visuals/use-footer-background.ts@@ -0,0 +1,762 @@+'use client';++import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment.js';+import { loadImportedGeometryFromUrl } from '@/lib/halftone';+import { useEffect, type RefObject } from 'react';+import * as THREE from 'three';+import { observeElementSize } from '@/lib/dom/observe-element-size';+import {+ createVisualRenderLoop,+ tryCreateSiteWebGlRenderer,+ type VisualRenderLoop,+ type VisualRenderLoopFrame,+} from '@/lib/visual-runtime';++const VIRTUAL_RENDER_HEIGHT = 768;++const passThroughVertexShader = /* glsl */ `+ varying vec2 vUv;++ void main() {+ vUv = uv;+ gl_Position = vec4(position, 1.0);+ }+`;++const blurFragmentShader = /* glsl */ `+ precision highp float;++ uniform sampler2D tInput;+ uniform vec2 dir;+ uniform vec2 res;++ varying vec2 vUv;++ void main() {+ vec4 sum = vec4(0.0);+ vec2 px = dir / res;++ float w[5];+ w[0] = 0.227027;+ w[1] = 0.1945946;+ w[2] = 0.1216216;+ w[3] = 0.054054;+ w[4] = 0.016216;++ sum += texture2D(tInput, vUv) * w[0];++ for (int i = 1; i < 5; i++) {+ float fi = float(i) * 3.0;+ sum += texture2D(tInput, vUv + px * fi) * w[i];+ sum += texture2D(tInput, vUv - px * fi) * w[i];+ }++ gl_FragColor = sum;+ }+`;++const halftoneFragmentShader = /* glsl */ `+ precision highp float;++ uniform sampler2D tScene;+ uniform sampler2D tGlow;+ uniform vec2 resolution;+ uniform float numRows;+ uniform float glowStr;+ uniform float contrast;+ uniform float power;+ uniform float shading;+ uniform float baseInk;+ uniform float maxBar;+ uniform float rowMerge;+ uniform float cellRatio;+ uniform float cutoff;+ uniform float highlightOpen;+ uniform float shadowGrouping;+ uniform float shadowCrush;+ uniform vec3 dashColor;+ uniform float time;+ uniform float waveAmount;+ uniform float waveSpeed;+ uniform float distanceScale;+ uniform vec2 interactionUv;+ uniform vec2 interactionVelocity;+ uniform vec2 dragOffset;+ uniform float hoverLightStrength;+ uniform float hoverLightRadius;+ uniform float hoverFlowStrength;+ uniform float hoverFlowRadius;+ uniform float dragFlowStrength;+ uniform float dragFlowRadius;+ uniform float cropToBounds;++ varying vec2 vUv;++ void main() {+ // Crop to image bounds: discard fragments outside source image (image mode only)+ if (cropToBounds > 0.5) {+ vec4 boundsCheck = texture2D(tScene, vUv);+ if (boundsCheck.a < 0.01) {+ gl_FragColor = vec4(0.0);+ return;+ }+ }++ float baseRowH = resolution.y / (numRows * distanceScale);+ vec2 pointerPx = interactionUv * resolution;+ vec2 fragDelta = gl_FragCoord.xy - pointerPx;+ float fragDist = length(fragDelta);+ vec2 radialDir = fragDist > 0.001 ? fragDelta / fragDist : vec2(0.0, 1.0);+ float velocityMagnitude = length(interactionVelocity);+ vec2 motionDir = velocityMagnitude > 0.001+ ? interactionVelocity / velocityMagnitude+ : vec2(0.0, 0.0);+ float motionBias = velocityMagnitude > 0.001+ ? dot(-radialDir, motionDir) * 0.5 + 0.5+ : 0.5;++ float hoverLightMask = 0.0;+ if (hoverLightStrength > 0.0) {+ float lightRadiusPx = hoverLightRadius * resolution.y;+ hoverLightMask = smoothstep(lightRadiusPx, 0.0, fragDist);+ }++ float hoverFlowMask = 0.0;+ if (hoverFlowStrength > 0.0) {+ float hoverRadiusPx = hoverFlowRadius * resolution.y;+ hoverFlowMask = smoothstep(hoverRadiusPx, 0.0, fragDist);+ }++ float dragFlowMask = 0.0;+ if (dragFlowStrength > 0.0) {+ float dragRadiusPx = dragFlowRadius * resolution.y;+ dragFlowMask = smoothstep(dragRadiusPx, 0.0, fragDist);+ }++ vec2 hoverDisplacement =+ radialDir * hoverFlowStrength * hoverFlowMask * baseRowH * 0.55 ++ motionDir * hoverFlowStrength * hoverFlowMask * (0.4 + motionBias) * baseRowH * 1.15;+ vec2 dragDisplacement = dragOffset * dragFlowMask * dragFlowStrength * 0.8;+ vec2 effectCoord = gl_FragCoord.xy + hoverDisplacement + dragDisplacement;++ float densityBoost =+ hoverFlowStrength * hoverFlowMask * 0.22 ++ dragFlowStrength * dragFlowMask * 0.16;+ float rowH = baseRowH / (1.0 + densityBoost);++ float offsetY = effectCoord.y;+ float row = floor(offsetY / rowH);+ float rowFrac = offsetY / rowH - row;+ float rowV = (row + 0.5) * rowH / resolution.y;+ float dy = abs(rowFrac - 0.5);++ float waveOffset = waveAmount * sin(time * waveSpeed + row * 0.5) * rowH;+ float effectiveX = effectCoord.x + waveOffset;++ float localCellRatio = cellRatio * (+ 1.0 ++ hoverFlowStrength * hoverFlowMask * 0.08 ++ dragFlowStrength * dragFlowMask * 0.1 * motionBias+ );+ float cellW = rowH * localCellRatio;+ float cellIdx = floor(effectiveX / cellW);+ float cellFrac = (effectiveX - cellIdx * cellW) / cellW;+ float cellU = (cellIdx + 0.5) * cellW / resolution.x;++ vec2 sampleUv = vec2(+ clamp(cellU, 0.0, 1.0),+ clamp(rowV, 0.0, 1.0)+ );++ vec4 sceneSample = texture2D(tScene, sampleUv);+ vec4 glowCell = texture2D(tGlow, sampleUv);++ float mask = smoothstep(0.02, 0.08, sceneSample.a);+ float lum = dot(sceneSample.rgb, vec3(0.299, 0.587, 0.114));+ float avgLum = dot(glowCell.rgb, vec3(0.299, 0.587, 0.114));+ float detail = lum - avgLum;++ float litLum = lum + max(detail, 0.0) * shading+ - max(-detail, 0.0) * shading * 0.55;+ float lightLift =+ hoverLightStrength * hoverLightMask * mix(0.78, 1.18, motionBias) * 0.34;+ float lightFocus = hoverLightStrength * hoverLightMask * 0.12;+ litLum = clamp(litLum + lightLift, 0.0, 1.0);+ litLum = clamp((litLum - cutoff) / max(1.0 - cutoff, 0.001), 0.0, 1.0);+ litLum = pow(litLum, max(contrast - lightFocus, 0.25));++ float darkness = 1.0 - litLum;+ float groupedLum = clamp((avgLum - cutoff) / max(1.0 - cutoff, 0.001), 0.0, 1.0);+ groupedLum = pow(groupedLum, max(contrast * 0.9, 0.25));+ float groupedDarkness = 1.0 - groupedLum;+ darkness = mix(darkness, max(darkness, groupedDarkness), shadowGrouping);+ darkness = clamp(+ (darkness - highlightOpen) / max(1.0 - highlightOpen, 0.001),+ 0.0,+ 1.0+ );++ float shadowMask = smoothstep(0.42, 0.96, darkness);+ darkness = mix(+ darkness,+ mix(darkness, 1.0, shadowMask),+ shadowCrush+ );++ float inkBase = baseInk * smoothstep(0.03, 0.24, darkness);+ float ink = mix(inkBase, 1.0, darkness);+ float fill = pow(ink, 1.05) * power;+ fill = clamp(fill, 0.0, 1.0) * mask;++ float dynamicBarHalf = mix(0.08, maxBar, smoothstep(0.03, 0.85, ink));+ float dynamicBarHalfY = min(+ dynamicBarHalf + rowMerge * smoothstep(0.42, 0.98, ink),+ 0.78+ );+ float dx2 = abs(cellFrac - 0.5);+ float halfFill = fill * 0.5;+ float bodyHalfW = max(halfFill - dynamicBarHalf * (rowH / cellW), 0.0);+ float capRX = dynamicBarHalf * rowH;+ float capRY = dynamicBarHalfY * rowH;++ float inDash = 0.0;+ if (dx2 <= bodyHalfW) {+ float edgeDist = dynamicBarHalfY - dy;+ inDash = smoothstep(-0.03, 0.03, edgeDist);+ } else {+ float cdx = (dx2 - bodyHalfW) * cellW;+ float cdy = dy * rowH;+ float ellipseDist = sqrt(+ (cdx * cdx) / max(capRX * capRX, 0.0001) ++ (cdy * cdy) / max(capRY * capRY, 0.0001)+ );+ inDash = 1.0 - smoothstep(1.0 - 0.08, 1.0 + 0.08, ellipseDist);+ }++ inDash *= step(0.001, ink) * mask;+ inDash *= 1.0 + 0.03 * sin(time * 0.8 + row * 0.1);++ vec4 glow = texture2D(tGlow, vUv);+ float glowLum = dot(glow.rgb, vec3(0.299, 0.587, 0.114));+ float halo = glowLum * glowStr * 0.25 * (1.0 - inDash);+ float sharp = smoothstep(0.3, 0.5, inDash + halo);+ vec3 color = dashColor * sharp;++ gl_FragColor = vec4(color, sharp);++ #include <tonemapping_fragment>+ #include <colorspace_fragment>+ }+`;++const GLB_URL = '/illustrations/common/footer/footer.glb';++const LIGHT_INTENSITY = 4;+const FILL_LIGHT_INTENSITY = 1.33;+const AMBIENT_LIGHT_INTENSITY = 0.28;+const LIGHT_ANGLE_DEGREES = 167;+const LIGHT_HEIGHT = 2.1;++const MATERIAL_ROUGHNESS = 0.42;+const MATERIAL_METALNESS = 0.16;++const HALFTONE_ROWS = 124;+const HALFTONE_CONTRAST = 2.7;+const HALFTONE_POWER = 1;+const HALFTONE_SHADING = 2.9;+const HALFTONE_BASE_INK = 0.19;+const HALFTONE_MAX_BAR = 0.25;+const HALFTONE_CELL_RATIO = 2.2;+const HALFTONE_CUTOFF = 0.02;+const HALFTONE_DASH_COLOR = '#2a2a2a';++const DRAG_SENSITIVITY = 0.008;+const DRAG_FRICTION = 0.08;+const DRAG_MOMENTUM = true;+const BREATHE_AMOUNT = 0.04;+const BREATHE_SPEED = 0.8;++const INITIAL_ROTATION_X = -0.5858908325312259;+const INITIAL_ROTATION_Y = 0.45733435420243096;+const INITIAL_ROTATION_Z = 0;+const INITIAL_TARGET_ROTATION_X = -0.5858908325312265;+const INITIAL_TARGET_ROTATION_Y = 0.4573343542024313;+const INITIAL_TIME_ELAPSED = 287.372499999977;+const BASE_CAMERA_DISTANCE = 4;++function createEnvironmentTexture(renderer: THREE.WebGLRenderer) {+ const pmremGenerator = new THREE.PMREMGenerator(renderer);+ const environmentTexture = pmremGenerator.fromScene(+ new RoomEnvironment(),+ 0.04,+ ).texture;+ pmremGenerator.dispose();++ return environmentTexture;+}++type FooterInteractionState = {+ dragging: boolean;+ mouseX: number;+ mouseY: number;+ pointerX: number;+ pointerY: number;+ rotationX: number;+ rotationY: number;+ rotationZ: number;+ targetRotationX: number;+ targetRotationY: number;+ velocityX: number;+ velocityY: number;+};++function createInteractionState(): FooterInteractionState {+ return {+ dragging: false,+ mouseX: 0.5,+ mouseY: 0.5,+ pointerX: 0,+ pointerY: 0,+ rotationX: INITIAL_ROTATION_X,+ rotationY: INITIAL_ROTATION_Y,+ rotationZ: INITIAL_ROTATION_Z,+ targetRotationX: INITIAL_TARGET_ROTATION_X,+ targetRotationY: INITIAL_TARGET_ROTATION_Y,+ velocityX: 0,+ velocityY: 0,+ };+}++function createRenderTarget(width: number, height: number) {+ return new THREE.WebGLRenderTarget(width, height, {+ minFilter: THREE.LinearFilter,+ magFilter: THREE.LinearFilter,+ format: THREE.RGBAFormat,+ });+}++function setPrimaryLightPosition(+ light: THREE.DirectionalLight,+ angleDegrees: number,+ height: number,+) {+ const lightAngle = (angleDegrees * Math.PI) / 180;+ light.position.set(+ Math.cos(lightAngle) * 5,+ height,+ Math.sin(lightAngle) * 5,+ );+}++function createFooterMaterial(environmentTexture: THREE.Texture) {+ return new THREE.MeshPhysicalMaterial({+ color: 0xd4d0c8,+ roughness: MATERIAL_ROUGHNESS,+ metalness: MATERIAL_METALNESS,+ envMap: environmentTexture,+ envMapIntensity: 0.25,+ clearcoat: 0,+ clearcoatRoughness: 0.08,+ reflectivity: 0.5,+ transmission: 0,+ });+}++export function useFooterBackground({+ mountRef,+}: {+ mountRef: RefObject<HTMLDivElement | null>;+}) {+ useEffect(() => {+ const container = mountRef.current;++ if (!container) {+ return;+ }++ let cancelled = false;+ let renderLoop: VisualRenderLoop | null = null;++ const getWidth = () => Math.max(container.clientWidth, 1);+ const getHeight = () => Math.max(container.clientHeight, 1);+ const getVirtualHeight = () => Math.max(VIRTUAL_RENDER_HEIGHT, getHeight());+ const getVirtualWidth = () =>+ Math.max(+ Math.round(+ getVirtualHeight() * (getWidth() / Math.max(getHeight(), 1)),+ ),+ 1,+ );++ const renderer = tryCreateSiteWebGlRenderer({+ antialias: false,+ alpha: true,+ onContextLost: () => {+ renderLoop?.stop();+ },+ });++ if (renderer === null) {+ return;+ }++ renderer.outputColorSpace = THREE.SRGBColorSpace;+ renderer.setPixelRatio(1);+ renderer.setClearColor(0x000000, 0);+ renderer.setSize(getVirtualWidth(), getVirtualHeight(), false);++ const canvas = renderer.domElement;+ canvas.style.cursor = 'grab';+ canvas.style.display = 'block';+ canvas.style.height = '100%';+ canvas.style.touchAction = 'none';+ canvas.style.width = '100%';+ container.appendChild(canvas);++ const environmentTexture = createEnvironmentTexture(renderer);+ const scene3d = new THREE.Scene();+ scene3d.background = null;++ const camera = new THREE.PerspectiveCamera(+ 45,+ getWidth() / getHeight(),+ 0.1,+ 100,+ );+ camera.position.z = BASE_CAMERA_DISTANCE;++ const primaryLight = new THREE.DirectionalLight(0xffffff, LIGHT_INTENSITY);+ setPrimaryLightPosition(primaryLight, LIGHT_ANGLE_DEGREES, LIGHT_HEIGHT);+ scene3d.add(primaryLight);++ const fillLight = new THREE.DirectionalLight(+ 0xffffff,+ FILL_LIGHT_INTENSITY,+ );+ fillLight.position.set(-3, -1, 1);+ scene3d.add(fillLight);++ const ambientLight = new THREE.AmbientLight(+ 0xffffff,+ AMBIENT_LIGHT_INTENSITY,+ );+ scene3d.add(ambientLight);++ const material = createFooterMaterial(environmentTexture);+ const mesh = new THREE.Mesh(new THREE.BufferGeometry(), material);+ mesh.visible = false;+ scene3d.add(mesh);++ const sceneTarget = createRenderTarget(+ getVirtualWidth(),+ getVirtualHeight(),+ );+ const blurTargetA = createRenderTarget(+ getVirtualWidth(),+ getVirtualHeight(),+ );+ const blurTargetB = createRenderTarget(+ getVirtualWidth(),+ getVirtualHeight(),+ );+ const fullScreenGeometry = new THREE.PlaneGeometry(2, 2);+ const orthographicCamera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);++ const blurHorizontalMaterial = new THREE.ShaderMaterial({+ uniforms: {+ tInput: { value: null },+ dir: { value: new THREE.Vector2(1, 0) },+ res: {+ value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),+ },+ },+ vertexShader: passThroughVertexShader,+ fragmentShader: blurFragmentShader,+ });++ const blurVerticalMaterial = new THREE.ShaderMaterial({+ uniforms: {+ tInput: { value: null },+ dir: { value: new THREE.Vector2(0, 1) },+ res: {+ value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),+ },+ },+ vertexShader: passThroughVertexShader,+ fragmentShader: blurFragmentShader,+ });++ const halftoneMaterial = new THREE.ShaderMaterial({+ transparent: true,+ uniforms: {+ tScene: { value: sceneTarget.texture },+ tGlow: { value: blurTargetB.texture },+ resolution: {+ value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),+ },+ numRows: { value: HALFTONE_ROWS },+ glowStr: { value: 0 },+ contrast: { value: HALFTONE_CONTRAST },+ power: { value: HALFTONE_POWER },+ shading: { value: HALFTONE_SHADING },+ baseInk: { value: HALFTONE_BASE_INK },+ maxBar: { value: HALFTONE_MAX_BAR },+ cellRatio: { value: HALFTONE_CELL_RATIO },+ cutoff: { value: HALFTONE_CUTOFF },+ dashColor: { value: new THREE.Color(HALFTONE_DASH_COLOR) },+ time: { value: 0 },+ waveAmount: { value: 0 },+ waveSpeed: { value: 1 },+ distanceScale: { value: 1 },+ interactionUv: { value: new THREE.Vector2(0.5, 0.5) },+ interactionVelocity: { value: new THREE.Vector2(0, 0) },+ dragOffset: { value: new THREE.Vector2(0, 0) },+ hoverLightStrength: { value: 0 },+ hoverLightRadius: { value: 0.2 },+ hoverFlowStrength: { value: 0 },+ hoverFlowRadius: { value: 0.18 },+ dragFlowStrength: { value: 0 },+ dragFlowRadius: { value: 0.24 },+ cropToBounds: { value: 0 },+ },+ vertexShader: passThroughVertexShader,+ fragmentShader: halftoneFragmentShader,+ });++ const blurHorizontalScene = new THREE.Scene();+ blurHorizontalScene.add(+ new THREE.Mesh(fullScreenGeometry, blurHorizontalMaterial),+ );++ const blurVerticalScene = new THREE.Scene();+ blurVerticalScene.add(+ new THREE.Mesh(fullScreenGeometry, blurVerticalMaterial),+ );++ const postScene = new THREE.Scene();+ postScene.add(new THREE.Mesh(fullScreenGeometry, halftoneMaterial));++ const interaction = createInteractionState();++ const syncSize = () => {+ const width = getWidth();+ const height = getHeight();+ const virtualWidth = getVirtualWidth();+ const virtualHeight = getVirtualHeight();++ renderer.setSize(virtualWidth, virtualHeight, false);+ camera.aspect = width / height;+ camera.updateProjectionMatrix();+ sceneTarget.setSize(virtualWidth, virtualHeight);+ blurTargetA.setSize(virtualWidth, virtualHeight);+ blurTargetB.setSize(virtualWidth, virtualHeight);+ blurHorizontalMaterial.uniforms.res.value.set(+ virtualWidth,+ virtualHeight,+ );+ blurVerticalMaterial.uniforms.res.value.set(virtualWidth, virtualHeight);+ halftoneMaterial.uniforms.resolution.value.set(+ virtualWidth,+ virtualHeight,+ );+ };++ const stopObservingSize = observeElementSize(container, syncSize);++ const updatePointerPosition = (event: PointerEvent) => {+ const rect = canvas.getBoundingClientRect();+ const width = Math.max(rect.width, 1);+ const height = Math.max(rect.height, 1);++ interaction.mouseX = THREE.MathUtils.clamp(+ (event.clientX - rect.left) / width,+ 0,+ 1,+ );+ interaction.mouseY = THREE.MathUtils.clamp(+ (event.clientY - rect.top) / height,+ 0,+ 1,+ );+ };++ const handlePointerDown = (event: PointerEvent) => {+ updatePointerPosition(event);+ interaction.dragging = false;+ interaction.pointerX = event.clientX;+ interaction.pointerY = event.clientY;+ interaction.velocityX = 0;+ interaction.velocityY = 0;+ canvas.style.cursor = 'default';+ };++ const handlePointerMove = (event: PointerEvent) => {+ updatePointerPosition(event);+ };++ const handleWindowPointerMove = (event: PointerEvent) => {+ updatePointerPosition(event);++ if (!interaction.dragging) {+ return;+ }++ const deltaX = (event.clientX - interaction.pointerX) * DRAG_SENSITIVITY;+ const deltaY = (event.clientY - interaction.pointerY) * DRAG_SENSITIVITY;+ interaction.velocityX = deltaY;+ interaction.velocityY = deltaX;+ interaction.targetRotationY += deltaX;+ interaction.targetRotationX += deltaY;+ interaction.pointerX = event.clientX;+ interaction.pointerY = event.clientY;+ };++ const handlePointerLeave = () => {+ if (interaction.dragging) {+ return;+ }++ interaction.mouseX = 0.5;+ interaction.mouseY = 0.5;+ };++ const handlePointerUp = () => {+ interaction.dragging = false;+ canvas.style.cursor = 'grab';+ };++ const handleWindowBlur = () => {+ handlePointerUp();+ handlePointerLeave();+ };++ canvas.addEventListener('pointermove', handlePointerMove);+ canvas.addEventListener('pointerleave', handlePointerLeave);+ canvas.addEventListener('pointerdown', handlePointerDown);+ window.addEventListener('pointerup', handlePointerUp);+ window.addEventListener('pointermove', handleWindowPointerMove);+ window.addEventListener('blur', handleWindowBlur);++ loadImportedGeometryFromUrl('glb', GLB_URL, 'Footer model', {+ scaleTarget: 2,+ })+ .then((geometry) => {+ if (cancelled) {+ geometry.dispose();+ return;+ }++ mesh.geometry.dispose();+ mesh.geometry = geometry;+ mesh.visible = true;+ })+ .catch((error) => {+ console.error(error);+ });++ const renderFrame = (+ _timestamp: DOMHighResTimeStamp,+ { elapsedSeconds }: VisualRenderLoopFrame,+ ) => {+ if (cancelled) {+ return;+ }++ const elapsedTime = INITIAL_TIME_ELAPSED + elapsedSeconds;+ halftoneMaterial.uniforms.time.value = elapsedTime;+ halftoneMaterial.uniforms.interactionUv.value.set(+ interaction.mouseX,+ 1 - interaction.mouseY,+ );++ if (!interaction.dragging && DRAG_MOMENTUM) {+ interaction.targetRotationX += interaction.velocityX;+ interaction.targetRotationY += interaction.velocityY;+ interaction.velocityX *= 1 - DRAG_FRICTION;+ interaction.velocityY *= 1 - DRAG_FRICTION;+ }++ interaction.rotationX +=+ (interaction.targetRotationX - interaction.rotationX) * DRAG_FRICTION;+ interaction.rotationY +=+ (interaction.targetRotationY - interaction.rotationY) * DRAG_FRICTION;+ interaction.rotationZ += (0 - interaction.rotationZ) * 0.12;++ const meshScale =+ 1 + Math.sin(elapsedTime * BREATHE_SPEED) * BREATHE_AMOUNT;++ mesh.rotation.set(+ interaction.rotationX,+ interaction.rotationY,+ interaction.rotationZ,+ );+ mesh.position.y = 0;+ mesh.scale.setScalar(meshScale);++ camera.position.x += (0 - camera.position.x) * 0.12;+ camera.position.y += (0 - camera.position.y) * 0.12;+ camera.position.z += (BASE_CAMERA_DISTANCE - camera.position.z) * 0.12;+ camera.lookAt(0, 0, 0);+ setPrimaryLightPosition(primaryLight, LIGHT_ANGLE_DEGREES, LIGHT_HEIGHT);++ renderer.setRenderTarget(sceneTarget);+ renderer.clear();+ renderer.render(scene3d, camera);++ blurHorizontalMaterial.uniforms.tInput.value = sceneTarget.texture;+ renderer.setRenderTarget(blurTargetA);+ renderer.render(blurHorizontalScene, orthographicCamera);++ blurVerticalMaterial.uniforms.tInput.value = blurTargetA.texture;+ renderer.setRenderTarget(blurTargetB);+ renderer.render(blurVerticalScene, orthographicCamera);++ blurHorizontalMaterial.uniforms.tInput.value = blurTargetB.texture;+ renderer.setRenderTarget(blurTargetA);+ renderer.render(blurHorizontalScene, orthographicCamera);++ blurVerticalMaterial.uniforms.tInput.value = blurTargetA.texture;+ renderer.setRenderTarget(blurTargetB);+ renderer.render(blurVerticalScene, orthographicCamera);++ renderer.setRenderTarget(null);+ renderer.clear();+ renderer.render(postScene, orthographicCamera);+ };++ renderLoop = createVisualRenderLoop({+ renderFrame,+ shouldRender: () => !cancelled,+ target: container,+ targetVisibilityOptions: { rootMargin: '100px' },+ });+ renderLoop.start();++ return () => {+ cancelled = true;+ renderLoop?.dispose();+ stopObservingSize();+ canvas.removeEventListener('pointermove', handlePointerMove);+ canvas.removeEventListener('pointerleave', handlePointerLeave);+ canvas.removeEventListener('pointerdown', handlePointerDown);+ window.removeEventListener('pointerup', handlePointerUp);+ window.removeEventListener('pointermove', handleWindowPointerMove);+ window.removeEventListener('blur', handleWindowBlur);+ blurHorizontalMaterial.dispose();+ blurVerticalMaterial.dispose();+ halftoneMaterial.dispose();+ fullScreenGeometry.dispose();+ mesh.geometry.dispose();+ material.dispose();+ sceneTarget.dispose();+ blurTargetA.dispose();+ blurTargetB.dispose();+ environmentTexture.dispose();+ renderer.dispose();++ if (canvas.parentNode === container) {+ container.removeChild(canvas);+ }+ };+ }, [mountRef]);+}diff --git a/packages/twenty-website-new/src/sections/Helped/Helped.tsx b/packages/twenty-website-new/src/sections/Helped/Helped.tsxnew file mode 100644index 00000000000..2461de6398b--- /dev/null+++ b/packages/twenty-website-new/src/sections/Helped/Helped.tsx@@ -0,0 +1,41 @@+import type { Scheme } from '@/theme';+import { styled } from '@linaria/react';+import type { ReactNode } from 'react';+export type { HeadingCardType } from './types/heading-card-type';+export type { HelpedVisualId } from './types/helped-visual-id';+import { Scene } from './components/HelpedScene';++const StyledSection = styled.section`+ width: 100%;++ &[data-scheme='light'] {+ background-color: var(--color-white);+ }++ &[data-scheme='muted'] {+ background-color: var(--color-neutral);+ }++ &[data-scheme='dark'] {+ background-color: var(--color-black);+ }+`;++type RootProps = {+ backgroundColor?: string;+ children: ReactNode;+ scheme?: Scheme;+};++function Root({ backgroundColor, children, scheme }: RootProps) {+ return (+ <StyledSection+ data-scheme={scheme}+ style={scheme ? undefined : { backgroundColor }}+ >+ {children}+ </StyledSection>+ );+}++export const Helped = { Root, Scene };diff --git a/packages/twenty-website-new/src/sections/Helped/components/Card.tsx b/packages/twenty-website-new/src/sections/Helped/components/HelpedCard.tsxsimilarity index 55%rename from packages/twenty-website-new/src/sections/Helped/components/Card.tsxrename to packages/twenty-website-new/src/sections/Helped/components/HelpedCard.tsxindex 7221dbc23cd..873cdbb4a8c 100644--- a/packages/twenty-website-new/src/sections/Helped/components/Card.tsx+++ b/packages/twenty-website-new/src/sections/Helped/components/HelpedCard.tsx@@ -1,14 +1,59 @@-import { Body, Heading } from '@/design-system/components';+import { Body, Heading, HeadingPart } from '@/design-system/components';import { CLIENT_ICONS } from '@/icons';-import { LocalizedLinkButton } from '@/lib/i18n/LocalizedLinkButton';+import { LocalizedLinkButton } from '@/lib/i18n/components/LocalizedLinkButton';import { WebGlMount } from '@/lib/visual-runtime';-import { HelpedCardShape } from '@/sections/Helped/components/HelpedCardShape';-import type { HeadingCardType } from '@/sections/Helped/types/HeadingCard';-import { HELPED_VISUALS } from '@/sections/Helped/visuals';import { theme } from '@/theme';-import type { MessageDescriptor } from '@lingui/core';import { msg } from '@lingui/core/macro';+import { useLingui } from '@lingui/react';import { styled } from '@linaria/react';+import type { HeadingCardType } from '../types/heading-card-type';+import { HELPED_VISUALS } from '../utils/helped-visuals-map';++const HELPED_CARD_SHAPE_FILL_PATH =+ 'M0 490V4a4 4 0 0 1 4-4h288.23c.932 0 1.856.163 2.731.48l60.814 22.09c.875.318 1.8.48 2.731.48H439a4 4 0 0 1 4 4V490a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4';++const HELPED_CARD_SHAPE_STROKE_PATH =+ 'M4 .5h288.23c.874 0 1.74.152 2.561.45l60.813 22.09c.931.338 1.912.51 2.902.51H439a3.5 3.5 0 0 1 3.5 3.5V490a3.5 3.5 0 0 1-3.5 3.5H4A3.5 3.5 0 0 1 .5 490V4A3.5 3.5 0 0 1 4 .5Z';++function HelpedCardShape({+ fillColor,+ strokeColor,+}: {+ fillColor: string;+ strokeColor: string;+}) {+ return (+ <div+ aria-hidden+ style={{+ width: '100%',+ height: '100%',+ position: 'absolute',+ inset: 0,+ pointerEvents: 'none',+ zIndex: -1,+ }}+ >+ <svg+ width="100%"+ height="100%"+ viewBox="0 0 443 494"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ preserveAspectRatio="none"+ style={{ display: 'block' }}+ >+ <path d={HELPED_CARD_SHAPE_FILL_PATH} fill={fillColor} />+ <path+ d={HELPED_CARD_SHAPE_STROKE_PATH}+ fill="none"+ stroke={strokeColor}+ strokeOpacity={0.2}+ />+ </svg>+ </div>+ );+}const CardRoot = styled.article`display: grid;@@ -42,6 +87,7 @@ const Rule = styled.div`const VisualShell = styled.div`background-color: ${theme.colors.secondary.background[100]};border-radius: ${theme.radius(2)};+ contain: strict;height: 240px;overflow: hidden;position: relative;@@ -59,8 +105,7 @@ const CardTitleWrap = styled.div``;const CardBodyWrap = styled.div`- color: ${theme.colors.secondary.text[80]};- --body-sm-color: currentColor;+ --color-text-muted: ${theme.colors.secondary.text[80]};`;const CtaRow = styled.div`@@ -74,10 +119,10 @@ const LOGO_FILL = theme.colors.secondary.text[100];type CardProps = {card: HeadingCardType;- renderText: (descriptor: MessageDescriptor) => string;};-export function Card({ card, renderText }: CardProps) {+export function HelpedCard({ card }: CardProps) {+ const { i18n } = useLingui();const IconComponent = CLIENT_ICONS[card.icon];const Visual = HELPED_VISUALS[card.illustration];const logoWidth = 104;@@ -102,23 +147,21 @@ export function Card({ card, renderText }: CardProps) {<Rule aria-hidden="true" /><CopyBlock><CardTitleWrap>- <Heading- as="h3"- renderText={renderText}- segments={card.heading}- size="xs"- weight="medium"- />+ <Heading as="h3" size="xs" weight="medium">+ <HeadingPart fontFamily="sans">{i18n._(card.heading)}</HeadingPart>+ </Heading></CardTitleWrap><CardBodyWrap>- <Body as="p" body={card.body} renderText={renderText} size="sm" />+ <Body as="p" size="sm">+ {i18n._(card.body)}+ </Body></CardBodyWrap></CopyBlock><CtaRow><LocalizedLinkButtoncolor="primary"href={card.href}- label={renderText(msg`Read the case`)}+ label={i18n._(msg`Read the case`)}variant="outlined"/></CtaRow>diff --git a/packages/twenty-website-new/src/sections/Helped/components/HelpedCardShape.tsx b/packages/twenty-website-new/src/sections/Helped/components/HelpedCardShape.tsxdeleted file mode 100644index bbcc2d775ba..00000000000--- a/packages/twenty-website-new/src/sections/Helped/components/HelpedCardShape.tsx+++ /dev/null@@ -1,47 +0,0 @@-const HELPED_CARD_SHAPE_FILL_PATH =- 'M0 490V4a4 4 0 0 1 4-4h288.23c.932 0 1.856.163 2.731.48l60.814 22.09c.875.318 1.8.48 2.731.48H439a4 4 0 0 1 4 4V490a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4';--const HELPED_CARD_SHAPE_STROKE_PATH =- 'M4 .5h288.23c.874 0 1.74.152 2.561.45l60.813 22.09c.931.338 1.912.51 2.902.51H439a3.5 3.5 0 0 1 3.5 3.5V490a3.5 3.5 0 0 1-3.5 3.5H4A3.5 3.5 0 0 1 .5 490V4A3.5 3.5 0 0 1 4 .5Z';--type HelpedCardShapeProps = {- fillColor: string;- strokeColor: string;-};--export function HelpedCardShape({- fillColor,- strokeColor,-}: HelpedCardShapeProps) {- return (- <div- aria-hidden- style={{- width: '100%',- height: '100%',- position: 'absolute',- inset: 0,- pointerEvents: 'none',- zIndex: -1,- }}- >- <svg- width="100%"- height="100%"- viewBox="0 0 443 494"- fill="none"- xmlns="http://www.w3.org/2000/svg"- preserveAspectRatio="none"- style={{ display: 'block' }}- >- <path d={HELPED_CARD_SHAPE_FILL_PATH} fill={fillColor} />- <path- d={HELPED_CARD_SHAPE_STROKE_PATH}- fill="none"- stroke={strokeColor}- strokeOpacity={0.2}- />- </svg>- </div>- );-}diff --git a/packages/twenty-website-new/src/sections/Helped/visuals/HelpedHalftoneModel.tsx b/packages/twenty-website-new/src/sections/Helped/components/HelpedHalftoneModel.tsxsimilarity index 50%rename from packages/twenty-website-new/src/sections/Helped/visuals/HelpedHalftoneModel.tsxrename to packages/twenty-website-new/src/sections/Helped/components/HelpedHalftoneModel.tsxindex b4b4ce3cabc..9c8d9c104ac 100644--- a/packages/twenty-website-new/src/sections/Helped/visuals/HelpedHalftoneModel.tsx+++ b/packages/twenty-website-new/src/sections/Helped/components/HelpedHalftoneModel.tsx@@ -9,97 +9,11 @@ import {DEFAULT_SOLID_BACKGROUND_SETTINGS,DEFAULT_SOLID_MATERIAL_SETTINGS,HalftoneModelCanvas,- type HalftoneExportPose,type HalftoneMaterialSurface,type HalftoneStudioSettings,- type HalftoneToneTarget,} from '@/lib/halftone';--type HalftoneRotateAxis = 'x' | 'y' | 'z' | 'xy' | '-x' | '-y' | '-z' | '-xy';-type HalftoneRotatePreset = 'axis' | 'lissajous' | 'orbit' | 'tumble';--export type HelpedHalftonePose = HalftoneExportPose;--export type HelpedHalftoneSettings = {- lighting: {- intensity: number;- fillIntensity: number;- ambientIntensity: number;- angleDegrees: number;- height: number;- };- material: {- roughness: number;- metalness: number;- surface?: HalftoneMaterialSurface;- color?: string;- thickness?: number;- refraction?: number;- environmentPower?: number;- };- halftone: {- enabled: boolean;- scale: number;- power: number;- toneTarget?: HalftoneToneTarget;- width: number;- imageContrast?: number;- dashColor: string;- hoverDashColor?: string;- };- animation: {- autoRotateEnabled: boolean;- breatheEnabled: boolean;- cameraParallaxEnabled: boolean;- followHoverEnabled: boolean;- followDragEnabled: boolean;- floatEnabled: boolean;- hoverLightEnabled: boolean;- dragFlowEnabled: boolean;- lightSweepEnabled: boolean;- rotateEnabled: boolean;- autoSpeed: number;- autoWobble: number;- breatheAmount: number;- breatheSpeed: number;- cameraParallaxAmount: number;- cameraParallaxEase: number;- driftAmount: number;- hoverRange: number;- hoverEase: number;- hoverReturn: boolean;- dragSens: number;- dragFriction: number;- dragMomentum: boolean;- rotateAxis: HalftoneRotateAxis;- rotatePreset: HalftoneRotatePreset;- rotateSpeed: number;- rotatePingPong: boolean;- floatAmplitude: number;- floatSpeed: number;- lightSweepHeightRange: number;- lightSweepRange: number;- lightSweepSpeed: number;- springDamping: number;- springReturnEnabled: boolean;- springStrength: number;- hoverHalftoneEnabled?: boolean;- hoverHalftonePowerShift?: number;- hoverHalftoneRadius?: number;- hoverHalftoneWidthShift?: number;- hoverLightIntensity: number;- hoverLightRadius: number;- dragFlowDecay: number;- dragFlowRadius: number;- dragFlowStrength: number;- hoverWarpStrength: number;- hoverWarpRadius: number;- dragWarpStrength: number;- waveEnabled: boolean;- waveSpeed: number;- waveAmount: number;- };-};+import type { HelpedHalftonePose } from '../types/helped-halftone-pose';+import type { HelpedHalftoneSettings } from '../types/helped-halftone-settings';type HelpedHalftoneModelProps = {initialPose: HelpedHalftonePose;diff --git a/packages/twenty-website-new/src/sections/Helped/components/Scene.tsx b/packages/twenty-website-new/src/sections/Helped/components/HelpedScene.tsxsimilarity index 76%rename from packages/twenty-website-new/src/sections/Helped/components/Scene.tsxrename to packages/twenty-website-new/src/sections/Helped/components/HelpedScene.tsxindex fb71fcdcc46..3cfffc6fe23 100644--- a/packages/twenty-website-new/src/sections/Helped/components/Scene.tsx+++ b/packages/twenty-website-new/src/sections/Helped/components/HelpedScene.tsx@@ -1,21 +1,21 @@'use client';-import { msg } from '@lingui/core/macro';import {Eyebrow,GuideCrosshair,Heading,HeadingPart,} from '@/design-system/components';-import { useRenderMessage } from '@/lib/i18n/use-render-message';-import { HelpedSceneScrollLayoutEffect } from '@/sections/Helped/effect-components/HelpedSceneScrollLayoutEffect';-import type { HelpedDataType } from '@/sections/Helped/types/HelpedData';-import { preloadHelpedVisualGeometries } from '@/sections/Helped/visuals/helped-visual-models';import { theme } from '@/theme';import { css } from '@linaria/core';import { styled } from '@linaria/react';+import { msg } from '@lingui/core/macro';+import { useLingui } from '@lingui/react';import { useEffect, useRef } from 'react';-import { Card } from './Card';+import { HelpedCard } from './HelpedCard';+import { HelpedSceneScrollLayoutEffect } from '../effect-components/HelpedSceneScrollLayoutEffect';+import type { HeadingCardType } from '../types/heading-card-type';+import { preloadHelpedVisualGeometries } from '../utils/preload-helped-visual-geometries';const GUIDE_INTERSECTION_TOP = '176px';@@ -95,11 +95,11 @@ const CardPositioner = styled.div``;type SceneProps = {- data: HelpedDataType;+ cards: HeadingCardType[];};-export function Scene({ data }: SceneProps) {- const renderText = useRenderMessage();+export function Scene({ cards }: SceneProps) {+ const { i18n } = useLingui();const sectionRef = useRef<HTMLElement>(null);const innerRef = useRef<HTMLDivElement>(null);const cardRefs = useRef<(HTMLDivElement | null)[]>([]);@@ -116,7 +116,7 @@ export function Scene({ data }: SceneProps) {><HelpedSceneScrollLayoutEffectcardRefs={cardRefs}- cards={data.cards}+ cards={cards}innerRef={innerRef}sectionRef={sectionRef}/>@@ -128,11 +128,11 @@ export function Scene({ data }: SceneProps) {/><HeadlineBlock><EyebrowExitTarget data-helped-exit-target>- <Eyebrow- colorScheme="primary"- heading={data.eyebrow.heading}- renderText={renderText}- />+ <Eyebrow colorScheme="primary">+ <HeadingPart fontFamily="sans">+ {i18n._(msg`In production.`)}+ </HeadingPart>+ </Eyebrow></EyebrowExitTarget><Headingas="h2"@@ -141,25 +141,25 @@ export function Scene({ data }: SceneProps) {weight="light"><HeadingPart fontFamily="serif">- {renderText(msg`Dev teams power`)}+ {i18n._(msg`Dev teams power`)}<br />- {renderText(msg`company-wide`)}+ {i18n._(msg`company-wide`)}</HeadingPart><br /><HeadingPart fontFamily="sans">- {renderText(msg`change with Twenty`)}+ {i18n._(msg`change with Twenty`)}</HeadingPart></Heading></HeadlineBlock><CardsLayer>- {data.cards.map((card, index) => (+ {cards.map((card, index) => (<CardPositioner- key={`${card.heading.text}-${index}`}+ key={index}ref={(element) => {cardRefs.current[index] = element;}}>- <Card card={card} renderText={renderText} />+ <HelpedCard card={card} /></CardPositioner>))}</CardsLayer>diff --git a/packages/twenty-website-new/src/sections/Helped/components/Money.tsx b/packages/twenty-website-new/src/sections/Helped/components/Money.tsxnew file mode 100644index 00000000000..d530dae9381--- /dev/null+++ b/packages/twenty-website-new/src/sections/Helped/components/Money.tsx@@ -0,0 +1,42 @@+'use client';++import { HELPED_BASE_SETTINGS } from '../constants/helped-base-settings';+import type { HelpedHalftonePose } from '../types/helped-halftone-pose';+import { HelpedHalftoneModel } from './HelpedHalftoneModel';+import { HELPED_VISUAL_MODEL_URLS } from '../constants/helped-visual-model-urls';++const MONEY_SETTINGS = {+ ...HELPED_BASE_SETTINGS,+ halftone: {+ enabled: true,+ scale: 25.64,+ power: -1.24,+ width: 0.5,+ imageContrast: 1,+ dashColor: '#FEFFB7',+ hoverDashColor: '#4A38F5',+ },+};++const MONEY_INITIAL_POSE: HelpedHalftonePose = {+ autoElapsed: 9.604400000000004,+ rotateElapsed: 0,+ rotationX: 9.425994949837918e-229,+ rotationY: 2.798289108321203e-229,+ rotationZ: -2.301463116952276e-231,+ targetRotationX: 0,+ targetRotationY: 0,+ timeElapsed: 303.7692999998331,+};++export function Money() {+ return (+ <HelpedHalftoneModel+ initialPose={MONEY_INITIAL_POSE}+ label="money.glb"+ modelUrl={HELPED_VISUAL_MODEL_URLS.money}+ previewDistance={5}+ settings={MONEY_SETTINGS}+ />+ );+}diff --git a/packages/twenty-website-new/src/sections/Helped/components/Root.tsx b/packages/twenty-website-new/src/sections/Helped/components/Root.tsxdeleted file mode 100644index ca74c9b9148..00000000000--- a/packages/twenty-website-new/src/sections/Helped/components/Root.tsx+++ /dev/null@@ -1,15 +0,0 @@-import { styled } from '@linaria/react';-import type { ReactNode } from 'react';--const StyledSection = styled.section`- width: 100%;-`;--type RootProps = {- backgroundColor: string;- children: ReactNode;-};--export function Root({ backgroundColor, children }: RootProps) {- return <StyledSection style={{ backgroundColor }}>{children}</StyledSection>;-}diff --git a/packages/twenty-website-new/src/sections/Helped/components/Spaceship.tsx b/packages/twenty-website-new/src/sections/Helped/components/Spaceship.tsxnew file mode 100644index 00000000000..c2adf6b3629--- /dev/null+++ b/packages/twenty-website-new/src/sections/Helped/components/Spaceship.tsx@@ -0,0 +1,42 @@+'use client';++import { HELPED_BASE_SETTINGS } from '../constants/helped-base-settings';+import type { HelpedHalftonePose } from '../types/helped-halftone-pose';+import { HelpedHalftoneModel } from './HelpedHalftoneModel';+import { HELPED_VISUAL_MODEL_URLS } from '../constants/helped-visual-model-urls';++const SPACESHIP_SETTINGS = {+ ...HELPED_BASE_SETTINGS,+ halftone: {+ enabled: true,+ scale: 16.64,+ power: -1.24,+ width: 0.5,+ imageContrast: 1,+ dashColor: '#89FC9A',+ hoverDashColor: '#89FC9A',+ },+};++const SPACESHIP_INITIAL_POSE: HelpedHalftonePose = {+ autoElapsed: 0.05,+ rotateElapsed: 0,+ rotationX: 6.34639162689903e-205,+ rotationY: 4.230976261030774e-203,+ rotationZ: 0,+ targetRotationX: 0,+ targetRotationY: 0,+ timeElapsed: 99.20160000002399,+};++export function Spaceship() {+ return (+ <HelpedHalftoneModel+ initialPose={SPACESHIP_INITIAL_POSE}+ label="spaceship.glb"+ modelUrl={HELPED_VISUAL_MODEL_URLS.spaceship}+ previewDistance={3.5}+ settings={SPACESHIP_SETTINGS}+ />+ );+}diff --git a/packages/twenty-website-new/src/sections/Helped/components/Target.tsx b/packages/twenty-website-new/src/sections/Helped/components/Target.tsxnew file mode 100644index 00000000000..a1c75ec6607--- /dev/null+++ b/packages/twenty-website-new/src/sections/Helped/components/Target.tsx@@ -0,0 +1,42 @@+'use client';++import { HELPED_BASE_SETTINGS } from '../constants/helped-base-settings';+import type { HelpedHalftonePose } from '../types/helped-halftone-pose';+import { HelpedHalftoneModel } from './HelpedHalftoneModel';+import { HELPED_VISUAL_MODEL_URLS } from '../constants/helped-visual-model-urls';++const TARGET_SETTINGS = {+ ...HELPED_BASE_SETTINGS,+ halftone: {+ enabled: true,+ scale: 25.64,+ power: -1.24,+ width: 0.5,+ imageContrast: 1,+ dashColor: '#ED87FC',+ hoverDashColor: '#ED87FC',+ },+};++const TARGET_INITIAL_POSE: HelpedHalftonePose = {+ autoElapsed: 0.05,+ rotateElapsed: 0,+ rotationX: -1.6874445801116057e-120,+ rotationY: 1.5322979021809315e-120,+ rotationZ: -4.56607033616335e-124,+ targetRotationX: 0,+ targetRotationY: 0,+ timeElapsed: 94.36910000002324,+};++export function Target() {+ return (+ <HelpedHalftoneModel+ initialPose={TARGET_INITIAL_POSE}+ label="target.glb"+ modelUrl={HELPED_VISUAL_MODEL_URLS.target}+ previewDistance={4}+ settings={TARGET_SETTINGS}+ />+ );+}diff --git a/packages/twenty-website-new/src/sections/Helped/components/index.ts b/packages/twenty-website-new/src/sections/Helped/components/index.tsdeleted file mode 100644index c5514a8351d..00000000000--- a/packages/twenty-website-new/src/sections/Helped/components/index.ts+++ /dev/null@@ -1,4 +0,0 @@-import { Root } from './Root';-import { Scene } from './Scene';--export const Helped = { Root, Scene };diff --git a/packages/twenty-website-new/src/sections/Helped/visuals/Target.tsx b/packages/twenty-website-new/src/sections/Helped/constants/helped-base-settings.tssimilarity index 61%rename from packages/twenty-website-new/src/sections/Helped/visuals/Target.tsxrename to packages/twenty-website-new/src/sections/Helped/constants/helped-base-settings.tsindex 9d3493c275a..e020e46f69e 100644--- a/packages/twenty-website-new/src/sections/Helped/visuals/Target.tsx+++ b/packages/twenty-website-new/src/sections/Helped/constants/helped-base-settings.ts@@ -1,15 +1,6 @@-'use client';+import type { HelpedHalftoneSettings } from '../types/helped-halftone-settings';-import {- HelpedHalftoneModel,- type HelpedHalftonePose,- type HelpedHalftoneSettings,-} from './HelpedHalftoneModel';-import { HELPED_VISUAL_MODEL_URLS } from './helped-visual-models';--const TARGET_PREVIEW_DISTANCE = 4;--const TARGET_SETTINGS: HelpedHalftoneSettings = {+export const HELPED_BASE_SETTINGS: Omit<HelpedHalftoneSettings, 'halftone'> = {lighting: {intensity: 3,fillIntensity: 0,@@ -26,15 +17,6 @@ const TARGET_SETTINGS: HelpedHalftoneSettings = {refraction: 3,environmentPower: 5,},- halftone: {- enabled: true,- scale: 25.64,- power: -1.24,- width: 0.5,- imageContrast: 1,- dashColor: '#ED87FC',- hoverDashColor: '#ED87FC',- },animation: {autoRotateEnabled: false,breatheEnabled: true,@@ -88,26 +70,3 @@ const TARGET_SETTINGS: HelpedHalftoneSettings = {waveAmount: 2,},};--const TARGET_INITIAL_POSE: HelpedHalftonePose = {- autoElapsed: 0.05,- rotateElapsed: 0,- rotationX: -1.6874445801116057e-120,- rotationY: 1.5322979021809315e-120,- rotationZ: -4.56607033616335e-124,- targetRotationX: 0,- targetRotationY: 0,- timeElapsed: 94.36910000002324,-};--export function Target() {- return (- <HelpedHalftoneModel- initialPose={TARGET_INITIAL_POSE}- label="target.glb"- modelUrl={HELPED_VISUAL_MODEL_URLS.target}- previewDistance={TARGET_PREVIEW_DISTANCE}- settings={TARGET_SETTINGS}- />- );-}diff --git a/packages/twenty-website-new/src/sections/Helped/constants/helped-visual-model-urls.ts b/packages/twenty-website-new/src/sections/Helped/constants/helped-visual-model-urls.tsnew file mode 100644index 00000000000..238c2b48f27--- /dev/null+++ b/packages/twenty-website-new/src/sections/Helped/constants/helped-visual-model-urls.ts@@ -0,0 +1,5 @@+export const HELPED_VISUAL_MODEL_URLS = {+ money: '/illustrations/home/helped/money.glb',+ spaceship: '/illustrations/home/helped/spaceship.glb',+ target: '/illustrations/home/helped/target.glb',+} as const;diff --git a/packages/twenty-website-new/src/sections/Helped/effect-components/HelpedSceneScrollLayoutEffect.tsx b/packages/twenty-website-new/src/sections/Helped/effect-components/HelpedSceneScrollLayoutEffect.tsxindex 97944aa064f..6b8bdc0e5f1 100644--- a/packages/twenty-website-new/src/sections/Helped/effect-components/HelpedSceneScrollLayoutEffect.tsx+++ b/packages/twenty-website-new/src/sections/Helped/effect-components/HelpedSceneScrollLayoutEffect.tsx@@ -3,12 +3,10 @@import { useCallback, useRef } from 'react';import { useScheduledOnScroll } from '@/lib/scroll';-import type { HeadingCardType } from '@/sections/Helped/types/HeadingCard';-import {- applyHelpedSceneLayout,- createHelpedSceneLayoutState,- type HelpedSceneLayoutRefs,-} from '@/sections/Helped/utils/helped-scene-layout';+import { applyHelpedSceneLayout } from '../utils/apply-helped-scene-layout';+import { createHelpedSceneLayoutState } from '../utils/create-helped-scene-layout-state';+import type { HeadingCardType } from '../types/heading-card-type';+import type { HelpedSceneLayoutRefs } from '../types/helped-scene-layout-refs';type HelpedSceneScrollLayoutEffectProps = HelpedSceneLayoutRefs & {cards: HeadingCardType[];diff --git a/packages/twenty-website-new/src/sections/Helped/index.ts b/packages/twenty-website-new/src/sections/Helped/index.tsnew file mode 100644index 00000000000..02b832690ad--- /dev/null+++ b/packages/twenty-website-new/src/sections/Helped/index.ts@@ -0,0 +1 @@+export { Helped, type HeadingCardType } from './Helped';diff --git a/packages/twenty-website-new/src/sections/Helped/types/HeadingCard.ts b/packages/twenty-website-new/src/sections/Helped/types/HeadingCard.tsdeleted file mode 100644index 414184cb74c..00000000000--- a/packages/twenty-website-new/src/sections/Helped/types/HeadingCard.ts+++ /dev/null@@ -1,12 +0,0 @@-import type { MessageBody } from '@/lib/i18n/message-body';-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';--export type HelpedVisualId = 'money' | 'spaceship' | 'target';--export type HeadingCardType = {- icon: string;- illustration: HelpedVisualId;- heading: MessageHeadingSegment;- body: MessageBody;- href: string;-};diff --git a/packages/twenty-website-new/src/sections/Helped/types/HelpedData.ts b/packages/twenty-website-new/src/sections/Helped/types/HelpedData.tsdeleted file mode 100644index 0d3c897f991..00000000000--- a/packages/twenty-website-new/src/sections/Helped/types/HelpedData.ts+++ /dev/null@@ -1,7 +0,0 @@-import type { MessageEyebrow } from '@/lib/i18n/message-eyebrow';-import type { HeadingCardType } from '@/sections/Helped/types/HeadingCard';--export type HelpedDataType = {- eyebrow: MessageEyebrow;- cards: HeadingCardType[];-};diff --git a/packages/twenty-website-new/src/sections/Helped/types/heading-card-type.ts b/packages/twenty-website-new/src/sections/Helped/types/heading-card-type.tsnew file mode 100644index 00000000000..26cd0081d86--- /dev/null+++ b/packages/twenty-website-new/src/sections/Helped/types/heading-card-type.ts@@ -0,0 +1,11 @@+import type { MessageDescriptor } from '@lingui/core';++import type { HelpedVisualId } from './helped-visual-id';++export type HeadingCardType = {+ icon: string;+ illustration: HelpedVisualId;+ heading: MessageDescriptor;+ body: MessageDescriptor;+ href: string;+};diff --git a/packages/twenty-website-new/src/sections/Helped/types/helped-halftone-pose.ts b/packages/twenty-website-new/src/sections/Helped/types/helped-halftone-pose.tsnew file mode 100644index 00000000000..771f5be8f0d--- /dev/null+++ b/packages/twenty-website-new/src/sections/Helped/types/helped-halftone-pose.ts@@ -0,0 +1,3 @@+import type { HalftoneExportPose } from '@/lib/halftone';++export type HelpedHalftonePose = HalftoneExportPose;diff --git a/packages/twenty-website-new/src/sections/Helped/types/helped-halftone-settings.ts b/packages/twenty-website-new/src/sections/Helped/types/helped-halftone-settings.tsnew file mode 100644index 00000000000..19b100e1cb8--- /dev/null+++ b/packages/twenty-website-new/src/sections/Helped/types/helped-halftone-settings.ts@@ -0,0 +1,88 @@+import type {+ HalftoneMaterialSurface,+ HalftoneToneTarget,+} from '@/lib/halftone';++type HalftoneRotateAxis = 'x' | 'y' | 'z' | 'xy' | '-x' | '-y' | '-z' | '-xy';+type HalftoneRotatePreset = 'axis' | 'lissajous' | 'orbit' | 'tumble';++export type HelpedHalftoneSettings = {+ lighting: {+ intensity: number;+ fillIntensity: number;+ ambientIntensity: number;+ angleDegrees: number;+ height: number;+ };+ material: {+ roughness: number;+ metalness: number;+ surface?: HalftoneMaterialSurface;+ color?: string;+ thickness?: number;+ refraction?: number;+ environmentPower?: number;+ };+ halftone: {+ enabled: boolean;+ scale: number;+ power: number;+ toneTarget?: HalftoneToneTarget;+ width: number;+ imageContrast?: number;+ dashColor: string;+ hoverDashColor?: string;+ };+ animation: {+ autoRotateEnabled: boolean;+ breatheEnabled: boolean;+ cameraParallaxEnabled: boolean;+ followHoverEnabled: boolean;+ followDragEnabled: boolean;+ floatEnabled: boolean;+ hoverLightEnabled: boolean;+ dragFlowEnabled: boolean;+ lightSweepEnabled: boolean;+ rotateEnabled: boolean;+ autoSpeed: number;+ autoWobble: number;+ breatheAmount: number;+ breatheSpeed: number;+ cameraParallaxAmount: number;+ cameraParallaxEase: number;+ driftAmount: number;+ hoverRange: number;+ hoverEase: number;+ hoverReturn: boolean;+ dragSens: number;+ dragFriction: number;+ dragMomentum: boolean;+ rotateAxis: HalftoneRotateAxis;+ rotatePreset: HalftoneRotatePreset;+ rotateSpeed: number;+ rotatePingPong: boolean;+ floatAmplitude: number;+ floatSpeed: number;+ lightSweepHeightRange: number;+ lightSweepRange: number;+ lightSweepSpeed: number;+ springDamping: number;+ springReturnEnabled: boolean;+ springStrength: number;+ hoverHalftoneEnabled?: boolean;+ hoverHalftonePowerShift?: number;+ hoverHalftoneRadius?: number;+ hoverHalftoneWidthShift?: number;+ hoverLightIntensity: number;+ hoverLightRadius: number;+ dragFlowDecay: number;+ dragFlowRadius: number;+ dragFlowStrength: number;+ hoverWarpStrength: number;+ hoverWarpRadius: number;+ dragWarpStrength: number;+ waveEnabled: boolean;+ waveSpeed: number;+ waveAmount: number;+ };+};diff --git a/packages/twenty-website-new/src/sections/Helped/types/helped-scene-layout-refs.ts b/packages/twenty-website-new/src/sections/Helped/types/helped-scene-layout-refs.tsnew file mode 100644index 00000000000..6ea2b9269cb--- /dev/null+++ b/packages/twenty-website-new/src/sections/Helped/types/helped-scene-layout-refs.ts@@ -0,0 +1,7 @@+import type { RefObject } from 'react';++export type HelpedSceneLayoutRefs = {+ cardRefs: RefObject<(HTMLDivElement | null)[]>;+ innerRef: RefObject<HTMLDivElement | null>;+ sectionRef: RefObject<HTMLElement | null>;+};diff --git a/packages/twenty-website-new/src/sections/Helped/types/helped-scene-layout-state.ts b/packages/twenty-website-new/src/sections/Helped/types/helped-scene-layout-state.tsnew file mode 100644index 00000000000..72aede95611--- /dev/null+++ b/packages/twenty-website-new/src/sections/Helped/types/helped-scene-layout-state.ts@@ -0,0 +1,15 @@+type HelpedSceneLayoutMeasurements = {+ cardCount: number;+ cardWidth: number;+ innerHeight: number;+ innerWidth: number;+ isDesktop: boolean;+ progressMetrics: { exitTargetTop: number; lastCardHeight: number } | null;+ progressScale: number;+ sectionHeight: number;+ viewportHeight: number;+};++export type HelpedSceneLayoutState = {+ measurements: HelpedSceneLayoutMeasurements | null;+};diff --git a/packages/twenty-website-new/src/sections/Helped/types/helped-visual-id.ts b/packages/twenty-website-new/src/sections/Helped/types/helped-visual-id.tsnew file mode 100644index 00000000000..41bbf77955d--- /dev/null+++ b/packages/twenty-website-new/src/sections/Helped/types/helped-visual-id.ts@@ -0,0 +1 @@+export type HelpedVisualId = 'money' | 'spaceship' | 'target';diff --git a/packages/twenty-website-new/src/sections/Helped/utils/helped-scene-layout.ts b/packages/twenty-website-new/src/sections/Helped/utils/apply-helped-scene-layout.tssimilarity index 93%rename from packages/twenty-website-new/src/sections/Helped/utils/helped-scene-layout.tsrename to packages/twenty-website-new/src/sections/Helped/utils/apply-helped-scene-layout.tsindex 1561b8eefa2..98d7d07acab 100644--- a/packages/twenty-website-new/src/sections/Helped/utils/helped-scene-layout.ts+++ b/packages/twenty-website-new/src/sections/Helped/utils/apply-helped-scene-layout.ts@@ -1,8 +1,10 @@-import type { RefObject } from 'react';-import { getPrefersReducedMotionSnapshot } from '@/lib/motion';-import { getStepperMdUpSnapshot } from '@/lib/stepper';-import type { HeadingCardType } from '@/sections/Helped/types/HeadingCard';+import { getStepperMdUpSnapshot } from '@/sections/Stepper';++import { createHelpedSceneLayoutState } from './create-helped-scene-layout-state';+import type { HeadingCardType } from '../types/heading-card-type';+import type { HelpedSceneLayoutRefs } from '../types/helped-scene-layout-refs';+import type { HelpedSceneLayoutState } from '../types/helped-scene-layout-state';const CARD_WIDTH_DESKTOP = 443;const CARD_WIDTH_MOBILE = 360;@@ -30,14 +32,6 @@ type HelpedSceneProgressMetrics = {lastCardHeight: number;};-export type HelpedSceneLayoutState = {- measurements: HelpedSceneLayoutMeasurements | null;-};--export function createHelpedSceneLayoutState(): HelpedSceneLayoutState {- return { measurements: null };-}-function clamp01(value: number) {return Math.min(1, Math.max(0, value));}@@ -78,12 +72,6 @@ function cardLeft(return (innerWidth - cardWidth) / 2;}-export type HelpedSceneLayoutRefs = {- cardRefs: RefObject<(HTMLDivElement | null)[]>;- innerRef: RefObject<HTMLDivElement | null>;- sectionRef: RefObject<HTMLElement | null>;-};-function toStableLayoutMetric(value: number) {return Math.round(value * 100) / 100;}diff --git a/packages/twenty-website-new/src/sections/Helped/utils/create-helped-scene-layout-state.ts b/packages/twenty-website-new/src/sections/Helped/utils/create-helped-scene-layout-state.tsnew file mode 100644index 00000000000..904fc1d02eb--- /dev/null+++ b/packages/twenty-website-new/src/sections/Helped/utils/create-helped-scene-layout-state.ts@@ -0,0 +1,5 @@+import type { HelpedSceneLayoutState } from '../types/helped-scene-layout-state';++export function createHelpedSceneLayoutState(): HelpedSceneLayoutState {+ return { measurements: null };+}diff --git a/packages/twenty-website-new/src/sections/Helped/utils/helped-visuals-map.ts b/packages/twenty-website-new/src/sections/Helped/utils/helped-visuals-map.tsnew file mode 100644index 00000000000..8245f4ad732--- /dev/null+++ b/packages/twenty-website-new/src/sections/Helped/utils/helped-visuals-map.ts@@ -0,0 +1,12 @@+import type { ComponentType } from 'react';++import { Money } from '../components/Money';+import { Spaceship } from '../components/Spaceship';+import { Target } from '../components/Target';+import type { HelpedVisualId } from '../types/helped-visual-id';++export const HELPED_VISUALS = {+ money: Money,+ spaceship: Spaceship,+ target: Target,+} as const satisfies Record<HelpedVisualId, ComponentType>;diff --git a/packages/twenty-website-new/src/sections/Helped/visuals/helped-visual-models.ts b/packages/twenty-website-new/src/sections/Helped/utils/preload-helped-visual-geometries.tssimilarity index 76%rename from packages/twenty-website-new/src/sections/Helped/visuals/helped-visual-models.tsrename to packages/twenty-website-new/src/sections/Helped/utils/preload-helped-visual-geometries.tsindex c34af2bffea..b608e2d31e1 100644--- a/packages/twenty-website-new/src/sections/Helped/visuals/helped-visual-models.ts+++ b/packages/twenty-website-new/src/sections/Helped/utils/preload-helped-visual-geometries.ts@@ -1,10 +1,6 @@import { loadImportedGeometryFromUrl } from '@/lib/halftone';-export const HELPED_VISUAL_MODEL_URLS = {- money: '/illustrations/home/helped/money.glb',- spaceship: '/illustrations/home/helped/spaceship.glb',- target: '/illustrations/home/helped/target.glb',-} as const;+import { HELPED_VISUAL_MODEL_URLS } from '../constants/helped-visual-model-urls';let preloadPromise: Promise<void> | null = null;diff --git a/packages/twenty-website-new/src/sections/Helped/visuals/Money.tsx b/packages/twenty-website-new/src/sections/Helped/visuals/Money.tsxdeleted file mode 100644index eba024e2f81..00000000000--- a/packages/twenty-website-new/src/sections/Helped/visuals/Money.tsx+++ /dev/null@@ -1,113 +0,0 @@-'use client';--import {- HelpedHalftoneModel,- type HelpedHalftonePose,- type HelpedHalftoneSettings,-} from './HelpedHalftoneModel';-import { HELPED_VISUAL_MODEL_URLS } from './helped-visual-models';--const MONEY_PREVIEW_DISTANCE = 5;--const MONEY_SETTINGS: HelpedHalftoneSettings = {- lighting: {- intensity: 3,- fillIntensity: 0,- ambientIntensity: 0,- angleDegrees: 47,- height: 1.4,- },- material: {- surface: 'glass',- color: '#7d7d7d',- roughness: 0.26,- metalness: 0.15,- thickness: 15.58,- refraction: 3,- environmentPower: 5,- },- halftone: {- enabled: true,- scale: 25.64,- power: -1.24,- width: 0.5,- imageContrast: 1,- dashColor: '#FEFFB7',- hoverDashColor: '#4A38F5',- },- animation: {- autoRotateEnabled: false,- breatheEnabled: true,- cameraParallaxEnabled: false,- followHoverEnabled: false,- followDragEnabled: true,- floatEnabled: false,- hoverLightEnabled: false,- dragFlowEnabled: false,- lightSweepEnabled: false,- rotateEnabled: false,- autoSpeed: 0.15,- autoWobble: 0.3,- breatheAmount: 0.015,- breatheSpeed: 0.25,- cameraParallaxAmount: 0.3,- cameraParallaxEase: 0.08,- driftAmount: 8,- hoverRange: 25,- hoverEase: 0.08,- hoverReturn: true,- dragSens: 0.008,- dragFriction: 0.08,- dragMomentum: true,- rotateAxis: 'y',- rotatePreset: 'axis',- rotateSpeed: 0.1,- rotatePingPong: false,- floatAmplitude: 0.16,- floatSpeed: 0.8,- lightSweepHeightRange: 0,- lightSweepRange: 28,- lightSweepSpeed: 0.25,- springDamping: 0.5,- springReturnEnabled: true,- springStrength: 0.1,- hoverHalftoneEnabled: false,- hoverHalftonePowerShift: 0.42,- hoverHalftoneRadius: 0.2,- hoverHalftoneWidthShift: -0.18,- hoverLightIntensity: 0.8,- hoverLightRadius: 0.2,- dragFlowDecay: 0.08,- dragFlowRadius: 0.24,- dragFlowStrength: 1.8,- hoverWarpStrength: 3,- hoverWarpRadius: 0.15,- dragWarpStrength: 5,- waveEnabled: false,- waveSpeed: 1,- waveAmount: 2,- },-};--const MONEY_INITIAL_POSE: HelpedHalftonePose = {- autoElapsed: 9.604400000000004,- rotateElapsed: 0,- rotationX: 9.425994949837918e-229,- rotationY: 2.798289108321203e-229,- rotationZ: -2.301463116952276e-231,- targetRotationX: 0,- targetRotationY: 0,- timeElapsed: 303.7692999998331,-};--export function Money() {- return (- <HelpedHalftoneModel- initialPose={MONEY_INITIAL_POSE}- label="money.glb"- modelUrl={HELPED_VISUAL_MODEL_URLS.money}- previewDistance={MONEY_PREVIEW_DISTANCE}- settings={MONEY_SETTINGS}- />- );-}diff --git a/packages/twenty-website-new/src/sections/Helped/visuals/Spaceship.tsx b/packages/twenty-website-new/src/sections/Helped/visuals/Spaceship.tsxdeleted file mode 100644index d70303f8b7d..00000000000--- a/packages/twenty-website-new/src/sections/Helped/visuals/Spaceship.tsx+++ /dev/null@@ -1,113 +0,0 @@-'use client';--import {- HelpedHalftoneModel,- type HelpedHalftonePose,- type HelpedHalftoneSettings,-} from './HelpedHalftoneModel';-import { HELPED_VISUAL_MODEL_URLS } from './helped-visual-models';--const SPACESHIP_PREVIEW_DISTANCE = 3.5;--const SPACESHIP_SETTINGS: HelpedHalftoneSettings = {- lighting: {- intensity: 3,- fillIntensity: 0,- ambientIntensity: 0,- angleDegrees: 47,- height: 1.4,- },- material: {- surface: 'glass',- color: '#7d7d7d',- roughness: 0.26,- metalness: 0.15,- thickness: 15.58,- refraction: 3,- environmentPower: 5,- },- halftone: {- enabled: true,- scale: 16.64,- power: -1.24,- width: 0.5,- imageContrast: 1,- dashColor: '#89FC9A',- hoverDashColor: '#89FC9A',- },- animation: {- autoRotateEnabled: false,- breatheEnabled: true,- cameraParallaxEnabled: false,- followHoverEnabled: false,- followDragEnabled: true,- floatEnabled: false,- hoverLightEnabled: false,- dragFlowEnabled: false,- lightSweepEnabled: false,- rotateEnabled: false,- autoSpeed: 0.15,- autoWobble: 0.3,- breatheAmount: 0.015,- breatheSpeed: 0.25,- cameraParallaxAmount: 0.3,- cameraParallaxEase: 0.08,- driftAmount: 8,- hoverRange: 25,- hoverEase: 0.08,- hoverReturn: true,- dragSens: 0.008,- dragFriction: 0.08,- dragMomentum: true,- rotateAxis: 'y',- rotatePreset: 'axis',- rotateSpeed: 0.1,- rotatePingPong: false,- floatAmplitude: 0.16,- floatSpeed: 0.8,- lightSweepHeightRange: 0,- lightSweepRange: 28,- lightSweepSpeed: 0.25,- springDamping: 0.5,- springReturnEnabled: true,- springStrength: 0.1,- hoverHalftoneEnabled: false,- hoverHalftonePowerShift: 0.42,- hoverHalftoneRadius: 0.2,- hoverHalftoneWidthShift: -0.18,- hoverLightIntensity: 0.8,- hoverLightRadius: 0.2,- dragFlowDecay: 0.08,- dragFlowRadius: 0.24,- dragFlowStrength: 1.8,- hoverWarpStrength: 3,- hoverWarpRadius: 0.15,- dragWarpStrength: 5,- waveEnabled: false,- waveSpeed: 1,- waveAmount: 2,- },-};--const SPACESHIP_INITIAL_POSE: HelpedHalftonePose = {- autoElapsed: 0.05,- rotateElapsed: 0,- rotationX: 6.34639162689903e-205,- rotationY: 4.230976261030774e-203,- rotationZ: 0,- targetRotationX: 0,- targetRotationY: 0,- timeElapsed: 99.20160000002399,-};--export function Spaceship() {- return (- <HelpedHalftoneModel- initialPose={SPACESHIP_INITIAL_POSE}- label="spaceship.glb"- modelUrl={HELPED_VISUAL_MODEL_URLS.spaceship}- previewDistance={SPACESHIP_PREVIEW_DISTANCE}- settings={SPACESHIP_SETTINGS}- />- );-}diff --git a/packages/twenty-website-new/src/sections/Helped/visuals/index.ts b/packages/twenty-website-new/src/sections/Helped/visuals/index.tsdeleted file mode 100644index 430cb46ab66..00000000000--- a/packages/twenty-website-new/src/sections/Helped/visuals/index.ts+++ /dev/null@@ -1,11 +0,0 @@-import type { ComponentType } from 'react';-import type { HelpedVisualId } from '@/sections/Helped/types/HeadingCard';-import { Money } from './Money';-import { Spaceship } from './Spaceship';-import { Target } from './Target';--export const HELPED_VISUALS = {- money: Money,- spaceship: Spaceship,- target: Target,-} as const satisfies Record<HelpedVisualId, ComponentType>;diff --git a/packages/twenty-website-new/src/sections/Hero/components/Body.tsx b/packages/twenty-website-new/src/sections/Hero/components/Body.tsxindex 2294d1eed42..d247a2741d5 100644--- a/packages/twenty-website-new/src/sections/Hero/components/Body.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/Body.tsx@@ -1,26 +1,18 @@import {Body as BaseBody,- type BodyType,- type BodyProps,+ type BodyAs,+ type BodyFamily,+ type BodySize,+ type BodyVariant,+ type BodyWeight,} from '@/design-system/components/Body';import type { Page } from '@/lib/pages';import { theme } from '@/theme';import { styled } from '@linaria/react';import type { ReactNode } from 'react';-const defaultHeroBodyColor = `var(--hero-body-color, ${theme.colors.primary.text[60]})`;-const StyledBody = styled.div`- --body-sm-color: ${defaultHeroBodyColor};- color: ${defaultHeroBodyColor};-- &[data-color-scheme='primary'] {- --hero-body-color: ${theme.colors.primary.text[60]};- }-- &[data-color-scheme='secondary'] {- --hero-body-color: ${theme.colors.secondary.text[80]};- }+ color: var(--color-text-muted, ${theme.colors.primary.text[60]});&[data-preserve-line-breaks='true'] {white-space: pre-line;@@ -66,59 +58,41 @@ const StyledBody = styled.div`}`;-export type HeroBodyColorScheme = 'primary' | 'secondary';--export type HeroBodyProps<TText = ReactNode> = Omit<- BodyProps<TText>,- 'renderText'-> & {+type HeroBodyProps = {+ as?: BodyAs;+ children: ReactNode;+ className?: string;+ family?: BodyFamily;page: Page;- colorScheme?: HeroBodyColorScheme;preserveLineBreaks?: boolean;- renderText?: (text: TText) => ReactNode;+ size?: BodySize;+ variant?: BodyVariant;+ weight?: BodyWeight;};-export function Body<TText = ReactNode>({+export function Body({as,- body,+ children,className,- page,- colorScheme,family,+ page,preserveLineBreaks = false,- renderText,size,variant,weight,-}: HeroBodyProps<TText>) {+}: HeroBodyProps) {return (- <StyledBody- data-color-scheme={colorScheme}- data-page={page}- data-preserve-line-breaks={preserveLineBreaks}- >- {renderText === undefined ? (- <BaseBody- as={as}- body={body as BodyType<ReactNode>}- className={className}- family={family}- size={size}- variant={variant}- weight={weight}- />- ) : (- <BaseBody<TText>- as={as}- body={body}- className={className}- family={family}- renderText={renderText}- size={size}- variant={variant}- weight={weight}- />- )}+ <StyledBody data-page={page} data-preserve-line-breaks={preserveLineBreaks}>+ <BaseBody+ as={as}+ className={className}+ family={family}+ size={size}+ variant={variant}+ weight={weight}+ >+ {children}+ </BaseBody></StyledBody>);}diff --git a/packages/twenty-website-new/src/sections/Hero/components/Cta.tsx b/packages/twenty-website-new/src/sections/Hero/components/Cta.tsxindex 2d2f29a0a1c..1ba29b5b8cd 100644--- a/packages/twenty-website-new/src/sections/Hero/components/Cta.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/Cta.tsx@@ -9,7 +9,7 @@ const CTAsContainer = styled.div`justify-content: center;`;-export type HeroCtaProps = { children: ReactNode };+type HeroCtaProps = { children: ReactNode };export function Cta({ children }: HeroCtaProps) {return <CTAsContainer>{children}</CTAsContainer>;diff --git a/packages/twenty-website-new/src/sections/Hero/components/Heading.tsx b/packages/twenty-website-new/src/sections/Hero/components/Heading.tsxindex c408badc630..892b1cd1fec 100644--- a/packages/twenty-website-new/src/sections/Hero/components/Heading.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/Heading.tsx@@ -21,7 +21,7 @@ const HeadingContainer = styled.div`}`;-export type HeroHeadingProps = HeadingProps & {+type HeroHeadingProps = HeadingProps & {children?: ReactNode;page: Page;};diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Data/hero-page-defaults.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Data/hero-page-defaults.tsnew file mode 100644index 00000000000..e168c30fc62--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Data/hero-page-defaults.ts@@ -0,0 +1,4 @@+export type HeroPageDefaults = {+ defaultActions: string[];+ defaultTableWidth?: number;+};diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Data/normalizeHeroPage.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Data/normalize-hero-page.tssimilarity index 95%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Data/normalizeHeroPage.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Data/normalize-hero-page.tsindex 1c394450a99..454fe1a12ba 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Data/normalizeHeroPage.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Data/normalize-hero-page.ts@@ -6,10 +6,7 @@ import type {HeroWorkflowPageDefinition,} from '@/sections/Hero/types';-export type HeroPageDefaults = {- defaultActions: string[];- defaultTableWidth?: number;-};+import type { HeroPageDefaults } from './hero-page-defaults';function normalizeTablePage(page: HeroTablePageDefinition,diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Data/objectPinnedActions.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Data/object-pinned-actions.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Data/objectPinnedActions.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Data/object-pinned-actions.tsdiff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Data/rocketObject.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Data/rocket-object.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Data/rocketObject.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Data/rocket-object.tsdiff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableAppWindow/DraggableAppWindow.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableAppWindow/DraggableAppWindow.tsxindex bf25279ce2f..b612cedb214 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableAppWindow/DraggableAppWindow.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableAppWindow/DraggableAppWindow.tsx@@ -9,14 +9,14 @@ import {type ReactNode,} from 'react';import { theme } from '@/theme';-import { VISUAL_TOKENS } from '../Shared/homeVisualTokens';+import { VISUAL_TOKENS } from '../Shared/utils/home-visual-tokens';import { useWindowPointerInteractions } from '../WindowInteraction/use-window-pointer-interactions';import type {WindowPosition as Position,WindowSize as Size,} from '../WindowInteraction/window-geometry';-import { useWindowOrder } from '../WindowOrder/WindowOrderProvider';-import { WINDOW_SHADOWS } from '../Shared/windowShadows';+import { useWindowOrder } from '../WindowOrder/use-window-order';+import { WINDOW_SHADOWS } from '../Shared/utils/window-shadows';import { MacWindowBar } from './MacWindowBar';const WINDOW_ID = 'twenty-app-window';diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/ConversationPanel.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/ConversationPanel.tsxindex 80fbcf6ca48..e2d2cdd5ee4 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/ConversationPanel.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/ConversationPanel.tsx@@ -1,13 +1,10 @@'use client';import { styled } from '@linaria/react';-import { AssistantResponse } from './AssistantResponse';-import { useConversationAutoScroll } from './use-conversation-auto-scroll';-import { UserMessage } from './UserMessage';--export type ConversationMessage =- | { id: string; role: 'user'; text: string }- | { id: string; role: 'assistant' };+import { AssistantResponse } from './components/AssistantResponse';+import type { ConversationMessage } from './types/conversation-message-types';+import { useConversationAutoScroll } from './hooks/use-conversation-auto-scroll';+import { UserMessage } from './components/UserMessage';type ConversationPanelProps = {instantComplete?: boolean;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/render-streaming-segments.test.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/__tests__/RenderStreamingSegments.test.tsxsimilarity index 87%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/render-streaming-segments.test.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/__tests__/RenderStreamingSegments.test.tsxindex 62ef1b2456b..4085152d841 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/render-streaming-segments.test.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/__tests__/RenderStreamingSegments.test.tsx@@ -1,7 +1,7 @@import { isValidElement } from 'react';-import { renderStreamingSegments } from './render-streaming-segments';-import type { StreamingSegment } from './streaming-text-types';+import { renderStreamingSegments } from '../components/RenderStreamingSegments';+import type { StreamingSegment } from '../types/streaming-text-types';const getRenderedText = (segment: unknown): string => {if (!isValidElement<{ children: string }>(segment)) {diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/assistant-response-stage.test.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/__tests__/assistant-response-stage.test.tssimilarity index 96%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/assistant-response-stage.test.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/__tests__/assistant-response-stage.test.tsindex 7980555006a..e4fa973e910 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/assistant-response-stage.test.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/__tests__/assistant-response-stage.test.ts@@ -2,7 +2,7 @@ import {ASSISTANT_RESPONSE_STAGE_DELAYS,getAssistantResponseStageTransition,hasAssistantResponseStageReached,-} from './assistant-response-stage';+} from '../utils/assistant-response-stage';describe('assistant-response-stage', () => {it('reports whether a stage has already been reached', () => {diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/changes-summary-card-state.test.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/__tests__/changes-summary-card-state.test.tssimilarity index 91%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/changes-summary-card-state.test.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/__tests__/changes-summary-card-state.test.tsindex d20610468a2..14708277976 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/changes-summary-card-state.test.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/__tests__/changes-summary-card-state.test.ts@@ -2,8 +2,8 @@ import {getChangesSummaryRowDelay,getHiddenChangesCount,getVisibleChanges,-} from './changes-summary-card-state';-import type { FileChange } from './rocketChangeset';+} from '../utils/changes-summary-card-state';+import type { FileChange } from '../utils/file-change-type';const changes: FileChange[] = [{ added: 10, path: 'one.ts', removed: 0 },diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/conversation-scroll.test.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/__tests__/conversation-scroll.test.tssimilarity index 58%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/conversation-scroll.test.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/__tests__/conversation-scroll.test.tsindex d1eb87902bc..5024c636d1d 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/conversation-scroll.test.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/__tests__/conversation-scroll.test.ts@@ -1,12 +1,35 @@-import {- getConversationScrollBehavior,- scrollConversationElementToBottom,-} from './conversation-scroll';+import { scrollConversationElementToBottom } from '../utils/conversation-scroll';describe('conversation-scroll', () => {- it('uses auto scrolling when reduced motion is preferred', () => {- expect(getConversationScrollBehavior(true)).toBe('auto');- expect(getConversationScrollBehavior(false)).toBe('smooth');+ it('uses smooth scrolling and auto when reduced motion is preferred', () => {+ const smoothElement = {+ scrollHeight: 100,+ scrollTo: jest.fn(),+ scrollTop: 0,+ };+ const autoElement = {+ scrollHeight: 100,+ scrollTo: jest.fn(),+ scrollTop: 0,+ };++ scrollConversationElementToBottom({+ element: smoothElement,+ prefersReducedMotion: false,+ });+ scrollConversationElementToBottom({+ element: autoElement,+ prefersReducedMotion: true,+ });++ expect(smoothElement.scrollTo).toHaveBeenCalledWith({+ behavior: 'smooth',+ top: 100,+ });+ expect(autoElement.scrollTo).toHaveBeenCalledWith({+ behavior: 'auto',+ top: 100,+ });});it('scrolls to the bottom with native scrollTo when available', () => {diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/AssistantResponse.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/AssistantResponse.tsxsimilarity index 89%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/AssistantResponse.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/AssistantResponse.tsxindex fc4837c1b62..36eb4340a5a 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/AssistantResponse.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/AssistantResponse.tsx@@ -3,14 +3,12 @@import { styled } from '@linaria/react';import { useMemo } from 'react';-import {- ASSISTANT_RESPONSE_STREAMING_STAGES,- buildAssistantResponseSegments,-} from './assistant-response-segments';+import { ASSISTANT_RESPONSE_STREAMING_STAGES } from '../utils/assistant-response-streaming-stages';+import { buildAssistantResponseSegments } from './AssistantResponseSegments';import { AssistantResponseParagraph } from './AssistantResponseParagraph';import { ChangesSummaryCard } from './ChangesSummaryCard';import { ThinkingIndicator } from './ThinkingIndicator';-import { useAssistantResponseStage } from './use-assistant-response-stage';+import { useAssistantResponseStage } from '../hooks/use-assistant-response-stage';const ResponseRoot = styled.div`display: flex;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/AssistantResponseParagraph.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/AssistantResponseParagraph.tsxsimilarity index 76%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/AssistantResponseParagraph.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/AssistantResponseParagraph.tsxindex 2b70c3e6456..002093441cb 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/AssistantResponseParagraph.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/AssistantResponseParagraph.tsx@@ -1,12 +1,13 @@import { styled } from '@linaria/react';-import { TERMINAL_TOKENS } from '../terminalTokens';+import { TERMINAL_TOKENS } from '../../utils/terminal-tokens';import {type AssistantResponseStage,type AssistantResponseStreamingStage,-} from './assistant-response-stage';-import { CHAT_TIMINGS } from './animationTiming';-import { StreamingText, type StreamingSegment } from './StreamingText';+} from '../utils/assistant-response-stage';+import { CHAT_TIMINGS } from '../utils/animation-timing';+import { StreamingText } from './StreamingText';+import type { StreamingSegment } from '../types/streaming-text-types';const Paragraph = styled.p`color: ${TERMINAL_TOKENS.text.prompt};diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/assistant-response-segments.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/AssistantResponseSegments.tsxsimilarity index 94%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/assistant-response-segments.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/AssistantResponseSegments.tsxindex 8d0a4f0d14c..d784ca99ce9 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/assistant-response-segments.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/AssistantResponseSegments.tsx@@ -1,9 +1,9 @@import { styled } from '@linaria/react';import type { ReactNode } from 'react';-import { TERMINAL_TOKENS } from '../terminalTokens';-import type { AssistantResponseStreamingStage } from './assistant-response-stage';-import type { StreamingSegment } from './StreamingText';+import { TERMINAL_TOKENS } from '../../utils/terminal-tokens';+import type { AssistantResponseStreamingStage } from '../utils/assistant-response-stage';+import type { StreamingSegment } from '../types/streaming-text-types';const InlineCode = styled.span`background: rgba(0, 0, 0, 0.045);@@ -57,16 +57,6 @@ const PAYLOAD_ID = 'payloads';const COMPANIES_ID = 'companies';const LAUNCH_SITE_ID = 'launch-sites';-export const ASSISTANT_RESPONSE_STREAMING_STAGES = [- 'rocket',- 'launch',- 'payload',- 'customer',- 'launchSite',- 'actions',- 'wrapup',-] as const satisfies readonly AssistantResponseStreamingStage[];-const buildIntroAndRocketParagraph = (onObjectCreated?: (id: string) => void,): StreamingSegment[] => [diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/ChangesSummaryCard.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/ChangesSummaryCard.tsxsimilarity index 92%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/ChangesSummaryCard.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/ChangesSummaryCard.tsxindex 8989274229c..5200ca41d72 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/ChangesSummaryCard.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/ChangesSummaryCard.tsx@@ -8,15 +8,17 @@ import {} from '@tabler/icons-react';import { useState } from 'react';-import { CHAT_TIMINGS } from './animationTiming';+import { CHAT_TIMINGS } from '../utils/animation-timing';import {getChangesSummaryRowDelay,getHiddenChangesCount,getVisibleChanges,-} from './changes-summary-card-state';-import { DiffAdded, DiffRemoved } from './ChangesSummaryDiffCounts';+} from '../utils/changes-summary-card-state';+import { DiffAdded } from './DiffAdded';+import { DiffRemoved } from './DiffRemoved';import { ChangesSummaryFileRow } from './ChangesSummaryFileRow';-import { CHANGESET_TOTALS, ROCKET_CHANGESET } from './rocketChangeset';+import { CHANGESET_TOTALS } from '../utils/changeset-totals';+import { ROCKET_CHANGESET } from '../utils/rocket-changeset';const CardRoot = styled.div`animation: chatCardRise ${CHAT_TIMINGS.fileCardEnterMs}msdiff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/ChangesSummaryDiffCounts.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/ChangesSummaryDiffCounts.tsxsimilarity index 70%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/ChangesSummaryDiffCounts.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/ChangesSummaryDiffCounts.tsxindex 1eb8e807ba5..a56513ab76e 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/ChangesSummaryDiffCounts.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/ChangesSummaryDiffCounts.tsx@@ -1,16 +1,7 @@import { styled } from '@linaria/react';-export const DiffAdded = styled.span`- color: #2f7d52;- font-family: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;- font-weight: 600;-`;--export const DiffRemoved = styled.span`- color: #a94a4f;- font-family: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;- font-weight: 600;-`;+import { DiffAdded } from './DiffAdded';+import { DiffRemoved } from './DiffRemoved';const DiffCounts = styled.span`align-items: center;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/ChangesSummaryFileRow.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/ChangesSummaryFileRow.tsxsimilarity index 96%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/ChangesSummaryFileRow.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/ChangesSummaryFileRow.tsxindex 9c081762c04..c4590563d57 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/ChangesSummaryFileRow.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/ChangesSummaryFileRow.tsx@@ -1,7 +1,7 @@import { styled } from '@linaria/react';import { IconChevronRight } from '@tabler/icons-react';-import type { FileChange } from './rocketChangeset';+import type { FileChange } from '../utils/file-change-type';import { ChangesSummaryDiffCounts } from './ChangesSummaryDiffCounts';const FileRow = styled.div<{ $delay: string }>`diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/DiffAdded.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/DiffAdded.tsnew file mode 100644index 00000000000..c9cffea6c8f--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/DiffAdded.ts@@ -0,0 +1,7 @@+import { styled } from '@linaria/react';++export const DiffAdded = styled.span`+ color: #2f7d52;+ font-family: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;+ font-weight: 600;+`;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/DiffRemoved.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/DiffRemoved.tsnew file mode 100644index 00000000000..6498b04d529--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/DiffRemoved.ts@@ -0,0 +1,7 @@+import { styled } from '@linaria/react';++export const DiffRemoved = styled.span`+ color: #a94a4f;+ font-family: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;+ font-weight: 600;+`;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/render-streaming-segments.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/RenderStreamingSegments.tsxsimilarity index 84%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/render-streaming-segments.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/RenderStreamingSegments.tsxindex 094ac357f48..c8d40bd7ee7 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/render-streaming-segments.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/RenderStreamingSegments.tsx@@ -1,7 +1,7 @@import type { ReactNode } from 'react';-import { getStreamingSegmentLength } from './get-streaming-segment-length';-import type { StreamingSegment } from './streaming-text-types';+import { getStreamingSegmentLength } from '../utils/get-streaming-segment-length';+import type { StreamingSegment } from '../types/streaming-text-types';export const renderStreamingSegments = (segments: ReadonlyArray<StreamingSegment>,diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/StreamingText.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/StreamingText.tsxsimilarity index 80%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/StreamingText.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/StreamingText.tsxindex 6ebd320c5af..54ce204f1df 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/StreamingText.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/StreamingText.tsx@@ -2,9 +2,9 @@import { styled } from '@linaria/react';-import { renderStreamingSegments } from './render-streaming-segments';-import type { StreamingSegment } from './streaming-text-types';-import { useStreamingTextProgress } from './use-streaming-text-progress';+import { renderStreamingSegments } from './RenderStreamingSegments';+import type { StreamingSegment } from '../types/streaming-text-types';+import { useStreamingTextProgress } from '../hooks/use-streaming-text-progress';type StreamingTextProps = {segments: ReadonlyArray<StreamingSegment>;@@ -59,5 +59,3 @@ export const StreamingText = ({</StreamWrap>);};--export type { StreamingSegment };diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/ThinkingIndicator.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/ThinkingIndicator.tsxsimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/ThinkingIndicator.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/ThinkingIndicator.tsxdiff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/UserMessage.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/UserMessage.tsxsimilarity index 89%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/UserMessage.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/UserMessage.tsxindex ec007865294..aba10d1e0ff 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/UserMessage.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/components/UserMessage.tsx@@ -1,8 +1,8 @@'use client';import { styled } from '@linaria/react';-import { TERMINAL_TOKENS } from '../terminalTokens';-import { CHAT_TIMINGS } from './animationTiming';+import { TERMINAL_TOKENS } from '../../utils/terminal-tokens';+import { CHAT_TIMINGS } from '../utils/animation-timing';type UserMessageProps = {instant?: boolean;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/use-assistant-response-stage.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/hooks/use-assistant-response-stage.tssimilarity index 95%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/use-assistant-response-stage.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/hooks/use-assistant-response-stage.tsindex 41b811d3c74..ee25f97284e 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/use-assistant-response-stage.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/hooks/use-assistant-response-stage.ts@@ -2,13 +2,13 @@ import { useCallback, useEffect, useRef, useState } from 'react';import { useTimeoutRegistry } from '@/lib/react';-import { CHAT_TIMINGS } from './animationTiming';+import { CHAT_TIMINGS } from '../utils/animation-timing';import {ASSISTANT_RESPONSE_STAGE_DELAYS,getAssistantResponseStageTransition,hasAssistantResponseStageReached,type AssistantResponseStage,-} from './assistant-response-stage';+} from '../utils/assistant-response-stage';type UseAssistantResponseStageOptions = {instantComplete: boolean;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/use-conversation-auto-scroll.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/hooks/use-conversation-auto-scroll.tssimilarity index 94%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/use-conversation-auto-scroll.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/hooks/use-conversation-auto-scroll.tsindex 5ecc9c928fa..c587698525f 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/use-conversation-auto-scroll.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/hooks/use-conversation-auto-scroll.ts@@ -3,7 +3,7 @@ import { useEffect, useRef } from 'react';import { createAnimationFrameLoop } from '@/lib/animation';import { getPrefersReducedMotionSnapshot } from '@/lib/motion';-import { scrollConversationElementToBottom } from './conversation-scroll';+import { scrollConversationElementToBottom } from '../utils/conversation-scroll';const getSafePrefersReducedMotionSnapshot = (): boolean =>typeof window !== 'undefined' && typeof window.matchMedia === 'function'diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/use-streaming-text-progress.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/hooks/use-streaming-text-progress.tssimilarity index 93%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/use-streaming-text-progress.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/hooks/use-streaming-text-progress.tsindex b29c60e36d1..b748fce586d 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/use-streaming-text-progress.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/hooks/use-streaming-text-progress.ts@@ -2,8 +2,8 @@ import { useEffect, useRef, useState } from 'react';import { useLatestRef, useTimeoutRegistry } from '@/lib/react';-import { getStreamingSegmentLength } from './get-streaming-segment-length';-import type { StreamingSegment } from './streaming-text-types';+import { getStreamingSegmentLength } from '../utils/get-streaming-segment-length';+import type { StreamingSegment } from '../types/streaming-text-types';type UseStreamingTextProgressOptions = {charDurationMs: number;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/types/conversation-message-types.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/types/conversation-message-types.tsnew file mode 100644index 00000000000..2945155cacd--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/types/conversation-message-types.ts@@ -0,0 +1,3 @@+export type ConversationMessage =+ | { id: string; role: 'user'; text: string }+ | { id: string; role: 'assistant' };diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/streaming-text-types.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/types/streaming-text-types.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/streaming-text-types.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/types/streaming-text-types.tsdiff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/animationTiming.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/animation-timing.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/animationTiming.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/animation-timing.tsdiff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/assistant-response-stage.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/assistant-response-stage.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/assistant-response-stage.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/assistant-response-stage.tsdiff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/assistant-response-streaming-stages.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/assistant-response-streaming-stages.tsnew file mode 100644index 00000000000..40589abdd4e--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/assistant-response-streaming-stages.ts@@ -0,0 +1,11 @@+import type { AssistantResponseStreamingStage } from './assistant-response-stage';++export const ASSISTANT_RESPONSE_STREAMING_STAGES = [+ 'rocket',+ 'launch',+ 'payload',+ 'customer',+ 'launchSite',+ 'actions',+ 'wrapup',+] as const satisfies readonly AssistantResponseStreamingStage[];diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/changes-summary-card-state.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/changes-summary-card-state.tssimilarity index 94%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/changes-summary-card-state.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/changes-summary-card-state.tsindex 5929e7097ad..2093a8c5025 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/changes-summary-card-state.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/changes-summary-card-state.ts@@ -1,4 +1,4 @@-import type { FileChange } from './rocketChangeset';+import type { FileChange } from './file-change-type';export const CHANGES_SUMMARY_COLLAPSED_FILE_COUNT = 3;export const CHANGES_SUMMARY_ROW_BASE_DELAY_MS = 40;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/changeset-totals.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/changeset-totals.tsnew file mode 100644index 00000000000..53a245d33c4--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/changeset-totals.ts@@ -0,0 +1,9 @@+import { ROCKET_CHANGESET } from './rocket-changeset';++export const CHANGESET_TOTALS = ROCKET_CHANGESET.reduce(+ (acc, file) => ({+ added: acc.added + file.added,+ removed: acc.removed + file.removed,+ }),+ { added: 0, removed: 0 },+);diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/conversation-scroll.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/conversation-scroll.tssimilarity index 93%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/conversation-scroll.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/conversation-scroll.tsindex d5fd206be29..d2ce4832f0e 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/conversation-scroll.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/conversation-scroll.ts@@ -4,7 +4,7 @@ type ScrollableConversationElement = {scrollTo?: (options: ScrollToOptions) => void;};-export const getConversationScrollBehavior = (+const getConversationScrollBehavior = (prefersReducedMotion: boolean,): ScrollBehavior => (prefersReducedMotion ? 'auto' : 'smooth');diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/file-change-type.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/file-change-type.tsnew file mode 100644index 00000000000..dad822d9235--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/file-change-type.ts@@ -0,0 +1,5 @@+export type FileChange = {+ path: string;+ added: number;+ removed: number;+};diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/get-streaming-segment-length.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/get-streaming-segment-length.tssimilarity index 68%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/get-streaming-segment-length.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/get-streaming-segment-length.tsindex 27a18833cc8..313bc96c043 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/get-streaming-segment-length.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/get-streaming-segment-length.ts@@ -1,4 +1,4 @@-import type { StreamingSegment } from './streaming-text-types';+import type { StreamingSegment } from '../types/streaming-text-types';export const getStreamingSegmentLength = (segment: StreamingSegment): number =>segment.kind === 'text' ? segment.value.length : (segment.length ?? 1);diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/rocketChangeset.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/rocket-changeset.tssimilarity index 91%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/rocketChangeset.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/rocket-changeset.tsindex 889e06402a3..6bf7ae9a539 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/rocketChangeset.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/Conversation/utils/rocket-changeset.ts@@ -1,8 +1,4 @@-export type FileChange = {- path: string;- added: number;- removed: number;-};+import type { FileChange } from './file-change-type';export const ROCKET_CHANGESET: ReadonlyArray<FileChange> = [{ path: 'src/__tests__/schema.integration-test.ts', added: 412, removed: 40 },@@ -113,11 +109,3 @@ export const ROCKET_CHANGESET: ReadonlyArray<FileChange> = [{ path: 'src/views/rockets.view.ts', added: 12, removed: 32 },{ path: 'src/views/upcoming-launches.view.ts', added: 82, removed: 0 },];--export const CHANGESET_TOTALS = ROCKET_CHANGESET.reduce(- (acc, file) => ({- added: acc.added + file.added,- removed: acc.removed + file.removed,- }),- { added: 0, removed: 0 },-);diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/DraggableTerminal.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/DraggableTerminal.tsxindex 931e063c152..f0248365071 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/DraggableTerminal.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/DraggableTerminal.tsx@@ -3,15 +3,15 @@import { styled } from '@linaria/react';import { useCallback } from 'react';import { theme } from '@/theme';-import { WINDOW_SHADOWS } from '../Shared/windowShadows';-import { EDITOR_TOKENS } from './TerminalEditor/editorTokens';-import { TerminalContent } from './TerminalContent';-import { TerminalResizeHandles } from './TerminalResizeHandles';-import { TerminalTopBar } from './TerminalTopBar';-import type { TerminalToggleValue } from './TerminalToggle';-import { TERMINAL_TOKENS } from './terminalTokens';-import { useTerminalConversationWorkflow } from './use-terminal-conversation-workflow';-import { useTerminalWindowLayout } from './use-terminal-window-layout';+import { WINDOW_SHADOWS } from '../Shared/utils/window-shadows';+import { EDITOR_TOKENS } from './TerminalEditor/utils/editor-tokens';+import { TerminalContent } from './components/TerminalContent';+import { TerminalResizeHandles } from './components/TerminalResizeHandles';+import { TerminalTopBar } from './components/TerminalTopBar';+import { useTerminalConversationWorkflow } from './hooks/use-terminal-conversation-workflow';+import { useTerminalWindowLayout } from './hooks/use-terminal-window-layout';+import type { TerminalToggleValue } from './types/terminal-toggle-types';+import { TERMINAL_TOKENS } from './utils/terminal-tokens';const Shell = styled.div<{$isDragging: boolean;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalDiff/DiffPill.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalDiff/DiffPill.tsxindex cefd23aed7f..14f3b349c57 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalDiff/DiffPill.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalDiff/DiffPill.tsx@@ -1,7 +1,7 @@'use client';import { styled } from '@linaria/react';-import { TERMINAL_TOKENS } from '../terminalTokens';+import { TERMINAL_TOKENS } from '../utils/terminal-tokens';type DiffPillProps = {added: number;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalDiff/TerminalDiff.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalDiff/TerminalDiff.tsxindex 1cf54763133..fdf96560f74 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalDiff/TerminalDiff.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalDiff/TerminalDiff.tsx@@ -2,14 +2,14 @@import { IconArrowsVertical } from '@tabler/icons-react';import { styled } from '@linaria/react';-import { TERMINAL_TOKENS } from '../terminalTokens';+import { TERMINAL_TOKENS } from '../utils/terminal-tokens';import {DIFF_FILES,type DiffChunk,type DiffFile,type DiffToken,type DiffTokenKind,-} from './diffData';+} from './diff-data';const Root = styled.div`background: rgba(0, 0, 0, 0.02);diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalDiff/diffData.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalDiff/diff-data.tssimilarity index 99%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalDiff/diffData.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalDiff/diff-data.tsindex d59bfa88e5f..149fb07b0a0 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalDiff/diffData.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalDiff/diff-data.ts@@ -1,4 +1,4 @@-import { CHANGESET_TOTALS } from '../Conversation/rocketChangeset';+import { CHANGESET_TOTALS } from '../Conversation/utils/changeset-totals';export type DiffTokenKind =| 'text'diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/TerminalEditor.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/TerminalEditor.tsxindex 2b0d48ae7d1..490fd7d47e7 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/TerminalEditor.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/TerminalEditor.tsx@@ -2,17 +2,17 @@import { styled } from '@linaria/react';import { useCallback, useEffect, useMemo, useState } from 'react';-import {- EDITOR_FILES,- EXPLORER_NODES,- findFileById,- tokenizeSource,- type EditorFile,-} from './editorData';-import { EDITOR_TOKENS } from './editorTokens';-import { TerminalEditorCodeView } from './TerminalEditorCodeView';-import { TerminalEditorExplorer } from './TerminalEditorExplorer';-import { TerminalEditorTabs } from './TerminalEditorTabs';+import { type EditorFile } from './types/editor-data.types';+import { EDITOR_FILES } from './utils/editor-data';+import { EXPLORER_NODES } from './utils/editor-explorer-nodes';+import { tokenizeSource } from './utils/tokenize-editor-source';++const findFileById = (fileId: string): EditorFile | undefined =>+ EDITOR_FILES.find((file) => file.id === fileId);+import { EDITOR_TOKENS } from './utils/editor-tokens';+import { TerminalEditorCodeView } from './components/TerminalEditorCodeView';+import { TerminalEditorExplorer } from './components/TerminalEditorExplorer';+import { TerminalEditorTabs } from './components/TerminalEditorTabs';import {closeTerminalEditorFile,getInitialTerminalEditorState,@@ -20,7 +20,7 @@ import {getVisibleTerminalEditorExplorerNodes,selectTerminalEditorFile,syncTerminalEditorStateWithGeneratedFiles,-} from './terminal-editor-state';+} from './utils/terminal-editor-state';const Root = styled.div`background: ${EDITOR_TOKENS.surface.body};diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/terminal-editor-state.test.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/__tests__/terminal-editor-state.test.tssimilarity index 96%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/terminal-editor-state.test.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/__tests__/terminal-editor-state.test.tsindex 5f96380bdda..0ab8a8d0a02 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/terminal-editor-state.test.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/__tests__/terminal-editor-state.test.ts@@ -1,8 +1,4 @@-import {- DEFAULT_EDITOR_FILE_ID,- STARTER_EDITOR_FILE_ID,- type ExplorerNode,-} from './editorData';+import { type ExplorerNode } from '../types/editor-data.types';import {closeTerminalEditorFile,getInitialTerminalEditorState,@@ -10,7 +6,10 @@ import {getVisibleTerminalEditorExplorerNodes,selectTerminalEditorFile,syncTerminalEditorStateWithGeneratedFiles,-} from './terminal-editor-state';+} from '../utils/terminal-editor-state';++const DEFAULT_EDITOR_FILE_ID = 'launch-object';+const STARTER_EDITOR_FILE_ID = 'application-config';describe('terminal-editor-state', () => {it('chooses the correct fallback file for generated and starter modes', () => {diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/TerminalEditorCodeView.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/components/TerminalEditorCodeView.tsxsimilarity index 94%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/TerminalEditorCodeView.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/components/TerminalEditorCodeView.tsxindex abe62238329..a7867efd812 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/TerminalEditorCodeView.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/components/TerminalEditorCodeView.tsx@@ -1,12 +1,12 @@import { styled } from '@linaria/react';-import { TERMINAL_TOKENS } from '../terminalTokens';+import { TERMINAL_TOKENS } from '../../utils/terminal-tokens';import {type CodeLine,type CodeToken,type EditorFile,type TokenKind,-} from './editorData';-import { EDITOR_TOKENS } from './editorTokens';+} from '../types/editor-data.types';+import { EDITOR_TOKENS } from '../utils/editor-tokens';const CodeRegion = styled.div`background: ${EDITOR_TOKENS.surface.body};diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/TerminalEditorExplorer.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/components/TerminalEditorExplorer.tsxsimilarity index 95%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/TerminalEditorExplorer.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/components/TerminalEditorExplorer.tsxindex faa1648a72c..f61adb6dc2c 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/TerminalEditorExplorer.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/components/TerminalEditorExplorer.tsx@@ -1,7 +1,10 @@import { styled } from '@linaria/react';-import { TERMINAL_TOKENS } from '../terminalTokens';-import { type ExplorerNode, type FileIconKind } from './editorData';-import { EDITOR_TOKENS } from './editorTokens';+import { TERMINAL_TOKENS } from '../../utils/terminal-tokens';+import {+ type ExplorerNode,+ type FileIconKind,+} from '../types/editor-data.types';+import { EDITOR_TOKENS } from '../utils/editor-tokens';const Sidebar = styled.div`background: ${EDITOR_TOKENS.surface.sidebar};diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/TerminalEditorTabs.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/components/TerminalEditorTabs.tsxsimilarity index 93%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/TerminalEditorTabs.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/components/TerminalEditorTabs.tsxindex d5165f47c69..566177708d4 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/TerminalEditorTabs.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/components/TerminalEditorTabs.tsx@@ -1,8 +1,8 @@import { IconX } from '@tabler/icons-react';import { styled } from '@linaria/react';-import { TERMINAL_TOKENS } from '../terminalTokens';-import { type EditorFile } from './editorData';-import { EDITOR_TOKENS } from './editorTokens';+import { TERMINAL_TOKENS } from '../../utils/terminal-tokens';+import { type EditorFile } from '../types/editor-data.types';+import { EDITOR_TOKENS } from '../utils/editor-tokens';const TabBar = styled.div`background: ${EDITOR_TOKENS.surface.tabBar};diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/types/editor-data.types.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/types/editor-data.types.tsnew file mode 100644index 00000000000..b9b1fe9c9db--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/types/editor-data.types.ts@@ -0,0 +1,36 @@+export type FileIconKind = 'ts' | 'md' | 'js' | 'git' | 'yaml' | 'cf' | 'lock';++export type ExplorerNode = {+ id: string;+ name: string;+ depth: number;+} & (+ | { kind: 'folder'; expanded: boolean; generated?: boolean }+ | {+ kind: 'file';+ icon: FileIconKind;+ iconLabel: string;+ fileId?: string;+ generated?: boolean;+ }+);++export type TokenKind =+ | 'text'+ | 'keyword'+ | 'function'+ | 'string'+ | 'property'+ | 'identifier'+ | 'comment';++export type CodeToken = { kind: TokenKind; value: string };++export type CodeLine = CodeToken[];++export type EditorFile = {+ id: string;+ name: string;+ path: string;+ source: string;+};diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/editorData.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/utils/editor-data.tssimilarity index 73%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/editorData.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/utils/editor-data.tsindex e7239c9402e..5988ddcca41 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/editorData.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/utils/editor-data.ts@@ -1,39 +1,4 @@-export type FileIconKind = 'ts' | 'md' | 'js' | 'git' | 'yaml' | 'cf' | 'lock';--export type ExplorerNode = {- id: string;- name: string;- depth: number;-} & (- | { kind: 'folder'; expanded: boolean; generated?: boolean }- | {- kind: 'file';- icon: FileIconKind;- iconLabel: string;- fileId?: string;- generated?: boolean;- }-);--export type TokenKind =- | 'text'- | 'keyword'- | 'function'- | 'string'- | 'property'- | 'identifier'- | 'comment';--export type CodeToken = { kind: TokenKind; value: string };--export type CodeLine = CodeToken[];--export type EditorFile = {- id: string;- name: string;- path: string;- source: string;-};+import type { EditorFile } from '../types/editor-data.types';const schemaIdentifiersSource = `export const SCHEMA_IDS = {rocket: {@@ -1256,612 +1221,3 @@ export const EDITOR_FILES: ReadonlyArray<EditorFile> = [source: applicationConfigSource,},];--export const DEFAULT_EDITOR_FILE_ID = 'launch-object';--export const STARTER_EDITOR_FILE_ID = 'application-config';--export const GENERATED_FILE_IDS: ReadonlySet<string> = new Set([- 'schema-identifiers',- 'rocket-object',- 'launch-object',- 'payload-object',- 'launch-site-object',- 'view-rockets',- 'view-launches',- 'view-upcoming',- 'view-past-launches',- 'view-payloads',- 'view-launch-sites',- 'nav-rockets',- 'nav-launches',- 'nav-upcoming',- 'nav-past-launches',- 'nav-payloads',- 'nav-launch-sites',- 'cmd-fly-again',- 'cmd-schedule-launch',- 'cmd-retire-rocket',- 'cmd-reschedule-launch',- 'cmd-add-payload',- 'cmd-upcoming-launches',- 'cmd-book-slot',- 'cmd-set-payload-status',- 'cmd-set-customer-status',- 'cmd-set-site-status',- 'cmd-book-window',- 'cmd-launches-from-site',-]);--export const EXPLORER_NODES: ExplorerNode[] = [- {- id: 'root',- name: 'my-twenty-app',- depth: 0,- kind: 'folder',- expanded: true,- },- { id: 'github', name: '.github', depth: 1, kind: 'folder', expanded: false },- { id: 'src', name: 'src', depth: 1, kind: 'folder', expanded: true },- { id: 'tests', name: '__tests__', depth: 2, kind: 'folder', expanded: false },- { id: 'agents', name: 'agents', depth: 2, kind: 'folder', expanded: false },- {- id: 'command-menu-items',- name: 'command-menu-items',- depth: 2,- kind: 'folder',- expanded: true,- },- {- id: 'file-cmd-add-payload',- name: 'add-payload.command-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'cmd-add-payload',- generated: true,- },- {- id: 'file-cmd-book-slot',- name: 'book-slot.command-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'cmd-book-slot',- generated: true,- },- {- id: 'file-cmd-book-window',- name: 'book-window.command-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'cmd-book-window',- generated: true,- },- {- id: 'file-cmd-fly-again',- name: 'fly-again.command-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'cmd-fly-again',- generated: true,- },- {- id: 'file-cmd-launches-from-site',- name: 'launches-from-site.command-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'cmd-launches-from-site',- generated: true,- },- {- id: 'file-cmd-reschedule-launch',- name: 'reschedule-launch.command-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'cmd-reschedule-launch',- generated: true,- },- {- id: 'file-cmd-retire-rocket',- name: 'retire-rocket.command-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'cmd-retire-rocket',- generated: true,- },- {- id: 'file-cmd-schedule-launch',- name: 'schedule-launch.command-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'cmd-schedule-launch',- generated: true,- },- {- id: 'file-cmd-set-customer-status',- name: 'set-customer-status.command-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'cmd-set-customer-status',- generated: true,- },- {- id: 'file-cmd-set-payload-status',- name: 'set-payload-status.command-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'cmd-set-payload-status',- generated: true,- },- {- id: 'file-cmd-set-site-status',- name: 'set-site-status.command-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'cmd-set-site-status',- generated: true,- },- {- id: 'file-cmd-upcoming-launches',- name: 'upcoming-launches.command-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'cmd-upcoming-launches',- generated: true,- },- {- id: 'constants',- name: 'constants',- depth: 2,- kind: 'folder',- expanded: true,- },- {- id: 'file-schema-identifiers',- name: 'schema-identifiers.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'schema-identifiers',- generated: true,- },- { id: 'fields', name: 'fields', depth: 2, kind: 'folder', expanded: false },- {- id: 'front-components',- name: 'front-components',- depth: 2,- kind: 'folder',- expanded: false,- },- {- id: 'logic-functions',- name: 'logic-functions',- depth: 2,- kind: 'folder',- expanded: false,- },- {- id: 'navigation-menu-items',- name: 'navigation-menu-items',- depth: 2,- kind: 'folder',- expanded: true,- },- {- id: 'file-nav-launch-sites',- name: 'launch-sites.navigation-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'nav-launch-sites',- generated: true,- },- {- id: 'file-nav-launches',- name: 'launches.navigation-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'nav-launches',- generated: true,- },- {- id: 'file-nav-past-launches',- name: 'past-launches.navigation-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'nav-past-launches',- generated: true,- },- {- id: 'file-nav-payloads',- name: 'payloads.navigation-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'nav-payloads',- generated: true,- },- {- id: 'file-nav-rockets',- name: 'rockets.navigation-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'nav-rockets',- generated: true,- },- {- id: 'file-nav-upcoming',- name: 'upcoming-launches.navigation-menu-item.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'nav-upcoming',- generated: true,- },- { id: 'objects', name: 'objects', depth: 2, kind: 'folder', expanded: true },- {- id: 'file-launch-site-object',- name: 'launch-site.object.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'launch-site-object',- generated: true,- },- {- id: 'file-launch-object',- name: 'launch.object.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'launch-object',- generated: true,- },- {- id: 'file-payload-object',- name: 'payload.object.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'payload-object',- generated: true,- },- {- id: 'file-rocket-object',- name: 'rocket.object.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'rocket-object',- generated: true,- },- {- id: 'page-layouts',- name: 'page-layouts',- depth: 2,- kind: 'folder',- expanded: false,- },- { id: 'roles', name: 'roles', depth: 2, kind: 'folder', expanded: false },- { id: 'skills', name: 'skills', depth: 2, kind: 'folder', expanded: false },- { id: 'views', name: 'views', depth: 2, kind: 'folder', expanded: true },- {- id: 'file-view-launch-sites',- name: 'launch-sites.view.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'view-launch-sites',- generated: true,- },- {- id: 'file-view-launches',- name: 'launches.view.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'view-launches',- generated: true,- },- {- id: 'file-view-past-launches',- name: 'past-launches.view.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'view-past-launches',- generated: true,- },- {- id: 'file-view-payloads',- name: 'payloads.view.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'view-payloads',- generated: true,- },- {- id: 'file-view-rockets',- name: 'rockets.view.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'view-rockets',- generated: true,- },- {- id: 'file-view-upcoming',- name: 'upcoming-launches.view.ts',- depth: 3,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'view-upcoming',- generated: true,- },- {- id: 'application-config',- name: 'application-config.ts',- depth: 1,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- fileId: 'application-config',- },- {- id: 'gitignore',- name: '.gitignore',- depth: 1,- kind: 'file',- icon: 'git',- iconLabel: 'GI',- },- {- id: 'nvmrc',- name: '.nvmrc',- depth: 1,- kind: 'file',- icon: 'cf',- iconLabel: 'CF',- },- {- id: 'oxlintrc',- name: '.oxlintrc.json',- depth: 1,- kind: 'file',- icon: 'js',- iconLabel: 'JS',- },- {- id: 'yarnrc',- name: '.yarnrc.yml',- depth: 1,- kind: 'file',- icon: 'yaml',- iconLabel: 'YM',- },- {- id: 'llms',- name: 'LLMS.md',- depth: 1,- kind: 'file',- icon: 'md',- iconLabel: 'MD',- },- {- id: 'package',- name: 'package.json',- depth: 1,- kind: 'file',- icon: 'js',- iconLabel: 'JS',- },- {- id: 'readme',- name: 'README.md',- depth: 1,- kind: 'file',- icon: 'md',- iconLabel: 'MD',- },- {- id: 'tsconfig',- name: 'tsconfig.json',- depth: 1,- kind: 'file',- icon: 'js',- iconLabel: 'JS',- },- {- id: 'tsconfig-spec',- name: 'tsconfig.spec.json',- depth: 1,- kind: 'file',- icon: 'js',- iconLabel: 'JS',- },- {- id: 'vitest-config',- name: 'vitest.config.ts',- depth: 1,- kind: 'file',- icon: 'ts',- iconLabel: 'TS',- },- {- id: 'yarn-lock',- name: 'yarn.lock',- depth: 1,- kind: 'file',- icon: 'lock',- iconLabel: 'LO',- },-];--const KEYWORDS = new Set([- 'import',- 'export',- 'default',- 'const',- 'let',- 'var',- 'from',- 'return',- 'if',- 'else',- 'function',- 'enum',- 'class',- 'type',- 'interface',- 'extends',- 'implements',- 'true',- 'false',- 'null',- 'undefined',- 'as',- 'new',- 'this',- 'typeof',- 'async',- 'await',- 'for',- 'of',- 'in',- 'switch',- 'case',- 'break',- 'continue',- 'throw',-]);--const tokenizeLine = (line: string): CodeLine => {- const tokens: CodeToken[] = [];- let textBuffer = '';- let i = 0;-- const flushText = () => {- if (textBuffer.length > 0) {- tokens.push({ kind: 'text', value: textBuffer });- textBuffer = '';- }- };-- const push = (token: CodeToken) => {- flushText();- tokens.push(token);- };-- while (i < line.length) {- const ch = line[i];-- if (ch === '/' && line[i + 1] === '/') {- push({ kind: 'comment', value: line.slice(i) });- i = line.length;- continue;- }-- if (ch === "'" || ch === '"' || ch === '`') {- const quote = ch;- let j = i + 1;- while (j < line.length) {- if (line[j] === '\\') {- j += 2;- continue;- }- if (line[j] === quote) {- break;- }- j += 1;- }- push({ kind: 'string', value: line.slice(i, j + 1) });- i = j + 1;- continue;- }-- if (/[a-zA-Z_$]/.test(ch)) {- let j = i + 1;- while (j < line.length && /[\w$]/.test(line[j])) {- j += 1;- }- const word = line.slice(i, j);-- if (KEYWORDS.has(word)) {- push({ kind: 'keyword', value: word });- } else if (/^[A-Z]/.test(word)) {- push({ kind: 'identifier', value: word });- } else {- let k = j;- while (k < line.length && line[k] === ' ') {- k += 1;- }- if (line[k] === '(') {- push({ kind: 'function', value: word });- } else if (line[k] === ':') {- push({ kind: 'property', value: word });- } else {- textBuffer += word;- }- }-- i = j;- continue;- }-- textBuffer += ch;- i += 1;- }-- flushText();- return tokens;-};--export const tokenizeSource = (source: string): CodeLine[] =>- source.split('\n').map(tokenizeLine);--export const findFileById = (fileId: string): EditorFile | undefined =>- EDITOR_FILES.find((file) => file.id === fileId);diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/utils/editor-explorer-nodes.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/utils/editor-explorer-nodes.tsnew file mode 100644index 00000000000..9d05f32f5f1--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/utils/editor-explorer-nodes.ts@@ -0,0 +1,449 @@+import type { ExplorerNode } from '../types/editor-data.types';++export const EXPLORER_NODES: ExplorerNode[] = [+ {+ id: 'root',+ name: 'my-twenty-app',+ depth: 0,+ kind: 'folder',+ expanded: true,+ },+ { id: 'github', name: '.github', depth: 1, kind: 'folder', expanded: false },+ { id: 'src', name: 'src', depth: 1, kind: 'folder', expanded: true },+ { id: 'tests', name: '__tests__', depth: 2, kind: 'folder', expanded: false },+ { id: 'agents', name: 'agents', depth: 2, kind: 'folder', expanded: false },+ {+ id: 'command-menu-items',+ name: 'command-menu-items',+ depth: 2,+ kind: 'folder',+ expanded: true,+ },+ {+ id: 'file-cmd-add-payload',+ name: 'add-payload.command-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'cmd-add-payload',+ generated: true,+ },+ {+ id: 'file-cmd-book-slot',+ name: 'book-slot.command-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'cmd-book-slot',+ generated: true,+ },+ {+ id: 'file-cmd-book-window',+ name: 'book-window.command-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'cmd-book-window',+ generated: true,+ },+ {+ id: 'file-cmd-fly-again',+ name: 'fly-again.command-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'cmd-fly-again',+ generated: true,+ },+ {+ id: 'file-cmd-launches-from-site',+ name: 'launches-from-site.command-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'cmd-launches-from-site',+ generated: true,+ },+ {+ id: 'file-cmd-reschedule-launch',+ name: 'reschedule-launch.command-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'cmd-reschedule-launch',+ generated: true,+ },+ {+ id: 'file-cmd-retire-rocket',+ name: 'retire-rocket.command-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'cmd-retire-rocket',+ generated: true,+ },+ {+ id: 'file-cmd-schedule-launch',+ name: 'schedule-launch.command-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'cmd-schedule-launch',+ generated: true,+ },+ {+ id: 'file-cmd-set-customer-status',+ name: 'set-customer-status.command-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'cmd-set-customer-status',+ generated: true,+ },+ {+ id: 'file-cmd-set-payload-status',+ name: 'set-payload-status.command-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'cmd-set-payload-status',+ generated: true,+ },+ {+ id: 'file-cmd-set-site-status',+ name: 'set-site-status.command-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'cmd-set-site-status',+ generated: true,+ },+ {+ id: 'file-cmd-upcoming-launches',+ name: 'upcoming-launches.command-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'cmd-upcoming-launches',+ generated: true,+ },+ {+ id: 'constants',+ name: 'constants',+ depth: 2,+ kind: 'folder',+ expanded: true,+ },+ {+ id: 'file-schema-identifiers',+ name: 'schema-identifiers.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'schema-identifiers',+ generated: true,+ },+ { id: 'fields', name: 'fields', depth: 2, kind: 'folder', expanded: false },+ {+ id: 'front-components',+ name: 'front-components',+ depth: 2,+ kind: 'folder',+ expanded: false,+ },+ {+ id: 'logic-functions',+ name: 'logic-functions',+ depth: 2,+ kind: 'folder',+ expanded: false,+ },+ {+ id: 'navigation-menu-items',+ name: 'navigation-menu-items',+ depth: 2,+ kind: 'folder',+ expanded: true,+ },+ {+ id: 'file-nav-launch-sites',+ name: 'launch-sites.navigation-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'nav-launch-sites',+ generated: true,+ },+ {+ id: 'file-nav-launches',+ name: 'launches.navigation-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'nav-launches',+ generated: true,+ },+ {+ id: 'file-nav-past-launches',+ name: 'past-launches.navigation-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'nav-past-launches',+ generated: true,+ },+ {+ id: 'file-nav-payloads',+ name: 'payloads.navigation-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'nav-payloads',+ generated: true,+ },+ {+ id: 'file-nav-rockets',+ name: 'rockets.navigation-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'nav-rockets',+ generated: true,+ },+ {+ id: 'file-nav-upcoming',+ name: 'upcoming-launches.navigation-menu-item.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'nav-upcoming',+ generated: true,+ },+ { id: 'objects', name: 'objects', depth: 2, kind: 'folder', expanded: true },+ {+ id: 'file-launch-site-object',+ name: 'launch-site.object.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'launch-site-object',+ generated: true,+ },+ {+ id: 'file-launch-object',+ name: 'launch.object.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'launch-object',+ generated: true,+ },+ {+ id: 'file-payload-object',+ name: 'payload.object.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'payload-object',+ generated: true,+ },+ {+ id: 'file-rocket-object',+ name: 'rocket.object.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'rocket-object',+ generated: true,+ },+ {+ id: 'page-layouts',+ name: 'page-layouts',+ depth: 2,+ kind: 'folder',+ expanded: false,+ },+ { id: 'roles', name: 'roles', depth: 2, kind: 'folder', expanded: false },+ { id: 'skills', name: 'skills', depth: 2, kind: 'folder', expanded: false },+ { id: 'views', name: 'views', depth: 2, kind: 'folder', expanded: true },+ {+ id: 'file-view-launch-sites',+ name: 'launch-sites.view.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'view-launch-sites',+ generated: true,+ },+ {+ id: 'file-view-launches',+ name: 'launches.view.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'view-launches',+ generated: true,+ },+ {+ id: 'file-view-past-launches',+ name: 'past-launches.view.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'view-past-launches',+ generated: true,+ },+ {+ id: 'file-view-payloads',+ name: 'payloads.view.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'view-payloads',+ generated: true,+ },+ {+ id: 'file-view-rockets',+ name: 'rockets.view.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'view-rockets',+ generated: true,+ },+ {+ id: 'file-view-upcoming',+ name: 'upcoming-launches.view.ts',+ depth: 3,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'view-upcoming',+ generated: true,+ },+ {+ id: 'application-config',+ name: 'application-config.ts',+ depth: 1,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ fileId: 'application-config',+ },+ {+ id: 'gitignore',+ name: '.gitignore',+ depth: 1,+ kind: 'file',+ icon: 'git',+ iconLabel: 'GI',+ },+ {+ id: 'nvmrc',+ name: '.nvmrc',+ depth: 1,+ kind: 'file',+ icon: 'cf',+ iconLabel: 'CF',+ },+ {+ id: 'oxlintrc',+ name: '.oxlintrc.json',+ depth: 1,+ kind: 'file',+ icon: 'js',+ iconLabel: 'JS',+ },+ {+ id: 'yarnrc',+ name: '.yarnrc.yml',+ depth: 1,+ kind: 'file',+ icon: 'yaml',+ iconLabel: 'YM',+ },+ {+ id: 'llms',+ name: 'LLMS.md',+ depth: 1,+ kind: 'file',+ icon: 'md',+ iconLabel: 'MD',+ },+ {+ id: 'package',+ name: 'package.json',+ depth: 1,+ kind: 'file',+ icon: 'js',+ iconLabel: 'JS',+ },+ {+ id: 'readme',+ name: 'README.md',+ depth: 1,+ kind: 'file',+ icon: 'md',+ iconLabel: 'MD',+ },+ {+ id: 'tsconfig',+ name: 'tsconfig.json',+ depth: 1,+ kind: 'file',+ icon: 'js',+ iconLabel: 'JS',+ },+ {+ id: 'tsconfig-spec',+ name: 'tsconfig.spec.json',+ depth: 1,+ kind: 'file',+ icon: 'js',+ iconLabel: 'JS',+ },+ {+ id: 'vitest-config',+ name: 'vitest.config.ts',+ depth: 1,+ kind: 'file',+ icon: 'ts',+ iconLabel: 'TS',+ },+ {+ id: 'yarn-lock',+ name: 'yarn.lock',+ depth: 1,+ kind: 'file',+ icon: 'lock',+ iconLabel: 'LO',+ },+];diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/utils/editor-generated-file-ids.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/utils/editor-generated-file-ids.tsnew file mode 100644index 00000000000..b7ea3b36e00--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/utils/editor-generated-file-ids.ts@@ -0,0 +1,31 @@+export const GENERATED_FILE_IDS: ReadonlySet<string> = new Set([+ 'schema-identifiers',+ 'rocket-object',+ 'launch-object',+ 'payload-object',+ 'launch-site-object',+ 'view-rockets',+ 'view-launches',+ 'view-upcoming',+ 'view-past-launches',+ 'view-payloads',+ 'view-launch-sites',+ 'nav-rockets',+ 'nav-launches',+ 'nav-upcoming',+ 'nav-past-launches',+ 'nav-payloads',+ 'nav-launch-sites',+ 'cmd-fly-again',+ 'cmd-schedule-launch',+ 'cmd-retire-rocket',+ 'cmd-reschedule-launch',+ 'cmd-add-payload',+ 'cmd-upcoming-launches',+ 'cmd-book-slot',+ 'cmd-set-payload-status',+ 'cmd-set-customer-status',+ 'cmd-set-site-status',+ 'cmd-book-window',+ 'cmd-launches-from-site',+]);diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/editorTokens.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/utils/editor-tokens.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/editorTokens.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/utils/editor-tokens.tsdiff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/terminal-editor-state.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/utils/terminal-editor-state.tssimilarity index 91%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/terminal-editor-state.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/utils/terminal-editor-state.tsindex e3d16f6cd48..78b0cd1f9d6 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/terminal-editor-state.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/utils/terminal-editor-state.ts@@ -1,9 +1,8 @@-import {- DEFAULT_EDITOR_FILE_ID,- GENERATED_FILE_IDS,- STARTER_EDITOR_FILE_ID,- type ExplorerNode,-} from './editorData';+import { type ExplorerNode } from '../types/editor-data.types';+import { GENERATED_FILE_IDS } from './editor-generated-file-ids';++const DEFAULT_EDITOR_FILE_ID = 'launch-object';+const STARTER_EDITOR_FILE_ID = 'application-config';export type TerminalEditorState = {activeFileId: string;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/utils/tokenize-editor-source.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/utils/tokenize-editor-source.tsnew file mode 100644index 00000000000..5ea17050fad--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalEditor/utils/tokenize-editor-source.ts@@ -0,0 +1,123 @@+import type { CodeLine, CodeToken } from '../types/editor-data.types';++const KEYWORDS = new Set([+ 'import',+ 'export',+ 'default',+ 'const',+ 'let',+ 'var',+ 'from',+ 'return',+ 'if',+ 'else',+ 'function',+ 'enum',+ 'class',+ 'type',+ 'interface',+ 'extends',+ 'implements',+ 'true',+ 'false',+ 'null',+ 'undefined',+ 'as',+ 'new',+ 'this',+ 'typeof',+ 'async',+ 'await',+ 'for',+ 'of',+ 'in',+ 'switch',+ 'case',+ 'break',+ 'continue',+ 'throw',+]);++const tokenizeLine = (line: string): CodeLine => {+ const tokens: CodeToken[] = [];+ let textBuffer = '';+ let i = 0;++ const flushText = () => {+ if (textBuffer.length > 0) {+ tokens.push({ kind: 'text', value: textBuffer });+ textBuffer = '';+ }+ };++ const push = (token: CodeToken) => {+ flushText();+ tokens.push(token);+ };++ while (i < line.length) {+ const ch = line[i];++ if (ch === '/' && line[i + 1] === '/') {+ push({ kind: 'comment', value: line.slice(i) });+ i = line.length;+ continue;+ }++ if (ch === "'" || ch === '"' || ch === '`') {+ const quote = ch;+ let j = i + 1;+ while (j < line.length) {+ if (line[j] === '\\') {+ j += 2;+ continue;+ }+ if (line[j] === quote) {+ break;+ }+ j += 1;+ }+ push({ kind: 'string', value: line.slice(i, j + 1) });+ i = j + 1;+ continue;+ }++ if (/[a-zA-Z_$]/.test(ch)) {+ let j = i + 1;+ while (j < line.length && /[\w$]/.test(line[j])) {+ j += 1;+ }+ const word = line.slice(i, j);++ if (KEYWORDS.has(word)) {+ push({ kind: 'keyword', value: word });+ } else if (/^[A-Z]/.test(word)) {+ push({ kind: 'identifier', value: word });+ } else {+ let k = j;+ while (k < line.length && line[k] === ' ') {+ k += 1;+ }+ if (line[k] === '(') {+ push({ kind: 'function', value: word });+ } else if (line[k] === ':') {+ push({ kind: 'property', value: word });+ } else {+ textBuffer += word;+ }+ }++ i = j;+ continue;+ }++ textBuffer += ch;+ i += 1;+ }++ flushText();+ return tokens;+};++export const tokenizeSource = (source: string): CodeLine[] =>+ source.split('\n').map(tokenizeLine);diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalPromptBox.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalPromptBox.tsxindex 9c9a5f11eda..90c7fc61a33 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalPromptBox.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalPromptBox.tsx@@ -1,10 +1,10 @@'use client';import { styled } from '@linaria/react';-import { TerminalPromptFooter } from './TerminalPromptFooter';-import { TerminalPromptMessage } from './TerminalPromptMessage';-import { TERMINAL_TOKENS } from '../terminalTokens';-import { useTerminalPromptEasterEgg } from './use-terminal-prompt-easter-egg';+import { TerminalPromptFooter } from './components/TerminalPromptFooter';+import { TerminalPromptMessage } from './components/TerminalPromptMessage';+import { TERMINAL_TOKENS } from '../utils/terminal-tokens';+import { useTerminalPromptEasterEgg } from './hooks/use-terminal-prompt-easter-egg';const PromptArea = styled.div`box-sizing: border-box;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/terminal-prompt-easter-egg-state.test.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/__tests__/terminal-prompt-easter-egg-state.test.tssimilarity index 97%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/terminal-prompt-easter-egg-state.test.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/__tests__/terminal-prompt-easter-egg-state.test.tsindex f42737257d3..258d652afb0 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/terminal-prompt-easter-egg-state.test.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/__tests__/terminal-prompt-easter-egg-state.test.ts@@ -3,7 +3,7 @@ import {INITIAL_TERMINAL_PROMPT_EASTER_EGG_STATE,TERMINAL_PROMPT_EASTER_EGG_MESSAGES,terminalPromptEasterEggReducer,-} from './terminal-prompt-easter-egg-state';+} from '../utils/terminal-prompt-easter-egg-state';describe('terminalPromptEasterEggReducer', () => {it('advances from no easter egg to the first message', () => {diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/terminal-send-button-hint-position.test.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/__tests__/terminal-send-button-hint-position.test.tssimilarity index 76%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/terminal-send-button-hint-position.test.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/__tests__/terminal-send-button-hint-position.test.tsindex d253da67eee..6c4993097b9 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/terminal-send-button-hint-position.test.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/__tests__/terminal-send-button-hint-position.test.ts@@ -1,4 +1,4 @@-import { getTerminalSendButtonHintPosition } from './terminal-send-button-hint-position';+import { getTerminalSendButtonHintPosition } from '../utils/terminal-send-button-hint-position';describe('getTerminalSendButtonHintPosition', () => {it('anchors the finger hint near the send button bottom-right corner', () => {diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalPromptChip.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/components/TerminalPromptChip.tsxsimilarity index 95%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalPromptChip.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/components/TerminalPromptChip.tsxindex 34ffe743a6e..a4d308d11c9 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalPromptChip.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/components/TerminalPromptChip.tsx@@ -2,7 +2,7 @@import { styled } from '@linaria/react';import type { ReactNode } from 'react';-import { TERMINAL_TOKENS } from '../terminalTokens';+import { TERMINAL_TOKENS } from '../../utils/terminal-tokens';type TerminalPromptChipProps = {icon: ReactNode;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalPromptFooter.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/components/TerminalPromptFooter.tsxsimilarity index 96%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalPromptFooter.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/components/TerminalPromptFooter.tsxindex fab46b84087..fa32d493fe3 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalPromptFooter.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/components/TerminalPromptFooter.tsx@@ -3,7 +3,7 @@ import { IconFolder, IconGitBranch } from '@tabler/icons-react';import { TerminalPromptChip } from './TerminalPromptChip';import { TerminalSendButton } from './TerminalSendButton';-import { TERMINAL_TOKENS } from '../terminalTokens';+import { TERMINAL_TOKENS } from '../../utils/terminal-tokens';const PromptFooter = styled.div`align-items: center;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalPromptMessage.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/components/TerminalPromptMessage.tsxsimilarity index 96%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalPromptMessage.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/components/TerminalPromptMessage.tsxindex 0457e7a17a1..3332e34fc6a 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalPromptMessage.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/components/TerminalPromptMessage.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';-import { TERMINAL_TOKENS } from '../terminalTokens';+import { TERMINAL_TOKENS } from '../../utils/terminal-tokens';const PromptTextRow = styled.div<{ $clickable?: boolean }>`align-items: flex-start;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalSendButton.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/components/TerminalSendButton.tsxsimilarity index 93%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalSendButton.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/components/TerminalSendButton.tsxindex 54386a65b8b..d79fa16f1d6 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalSendButton.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/components/TerminalSendButton.tsx@@ -3,8 +3,8 @@import { IconArrowBackUp, IconArrowUp } from '@tabler/icons-react';import { styled } from '@linaria/react';import { TerminalSendButtonFingerHint } from './TerminalSendButtonFingerHint';-import { TERMINAL_TOKENS } from '../terminalTokens';-import { useTerminalSendButtonHint } from './use-terminal-send-button-hint';+import { TERMINAL_TOKENS } from '../../utils/terminal-tokens';+import { useTerminalSendButtonHint } from '../hooks/use-terminal-send-button-hint';type TerminalSendButtonProps = {onClick?: () => void;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalSendButtonFingerHint.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/components/TerminalSendButtonFingerHint.tsxsimilarity index 98%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalSendButtonFingerHint.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/components/TerminalSendButtonFingerHint.tsxindex 9d6870315e8..ae657f4c55a 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/TerminalSendButtonFingerHint.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/components/TerminalSendButtonFingerHint.tsx@@ -2,7 +2,7 @@import { styled } from '@linaria/react';import { createPortal } from 'react-dom';-import type { TerminalSendButtonHintPosition } from './terminal-send-button-hint-position';+import type { TerminalSendButtonHintPosition } from '../types/terminal-send-button-hint-position-types';const FINGER_ROTATION = -21;const FINGER_SIZE = 51;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/use-terminal-prompt-easter-egg.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/hooks/use-terminal-prompt-easter-egg.tssimilarity index 87%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/use-terminal-prompt-easter-egg.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/hooks/use-terminal-prompt-easter-egg.tsindex 79321c92f6b..bfc023d7d3f 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/use-terminal-prompt-easter-egg.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/hooks/use-terminal-prompt-easter-egg.ts@@ -3,8 +3,8 @@ import {getTerminalPromptEasterEggMessage,INITIAL_TERMINAL_PROMPT_EASTER_EGG_STATE,terminalPromptEasterEggReducer,-} from './terminal-prompt-easter-egg-state';-import { TRAFFIC_LIGHTS_ESCAPE_EVENT } from '../TerminalTrafficLights/terminal-traffic-light-constants';+} from '../utils/terminal-prompt-easter-egg-state';+import { TRAFFIC_LIGHTS_ESCAPE_EVENT } from '../../TerminalTrafficLights/utils/terminal-traffic-light-constants';type UseTerminalPromptEasterEggOptions = {enabled: boolean;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/use-terminal-send-button-hint.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/hooks/use-terminal-send-button-hint.tssimilarity index 94%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/use-terminal-send-button-hint.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/hooks/use-terminal-send-button-hint.tsindex b851c40f3f9..7e2eb329b86 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/use-terminal-send-button-hint.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/hooks/use-terminal-send-button-hint.ts@@ -1,10 +1,8 @@import { useCallback, useLayoutEffect, useRef, useState } from 'react';import { createAnimationFrameLoop } from '@/lib/animation';import { useTimeoutRegistry } from '@/lib/react';-import {- getTerminalSendButtonHintPosition,- type TerminalSendButtonHintPosition,-} from './terminal-send-button-hint-position';+import { getTerminalSendButtonHintPosition } from '../utils/terminal-send-button-hint-position';+import type { TerminalSendButtonHintPosition } from '../types/terminal-send-button-hint-position-types';const HINT_READY_DELAY = 400;const TERMINAL_SHELL_SELECTOR = '[data-terminal-shell="true"]';diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/types/terminal-send-button-hint-position-types.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/types/terminal-send-button-hint-position-types.tsnew file mode 100644index 00000000000..6878f667131--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/types/terminal-send-button-hint-position-types.ts@@ -0,0 +1,4 @@+export type TerminalSendButtonHintPosition = {+ left: number;+ top: number;+};diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/terminal-prompt-easter-egg-state.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/utils/terminal-prompt-easter-egg-state.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/terminal-prompt-easter-egg-state.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/utils/terminal-prompt-easter-egg-state.tsdiff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/terminal-send-button-hint-position.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/utils/terminal-send-button-hint-position.tssimilarity index 74%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/terminal-send-button-hint-position.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/utils/terminal-send-button-hint-position.tsindex 0f679852a22..2833a8347ed 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/terminal-send-button-hint-position.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalPrompt/utils/terminal-send-button-hint-position.ts@@ -1,7 +1,4 @@-export type TerminalSendButtonHintPosition = {- left: number;- top: number;-};+import type { TerminalSendButtonHintPosition } from '../types/terminal-send-button-hint-position-types';const FINGER_OFFSET_RIGHT = -22;const FINGER_OFFSET_BOTTOM = -18;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/TerminalTrafficLights.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/TerminalTrafficLights.tsxindex 7ce5a6c61ac..5d6436ebbaf 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/TerminalTrafficLights.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/TerminalTrafficLights.tsx@@ -5,11 +5,11 @@ import type { MouseEvent as ReactMouseEvent } from 'react';import {DEFAULT_TRAFFIC_LIGHT_HORIZONTAL_INSET,TRAFFIC_LIGHT_GAP,-} from './terminal-traffic-light-constants';-import { TRAFFIC_LIGHT_DOT_DEFINITIONS } from './terminal-traffic-light-definitions';-import { TerminalFlyingTrafficLights } from './TerminalFlyingTrafficLights';-import { TerminalTrafficLightDot } from './TerminalTrafficLightDot';-import { useTerminalTrafficLightsEscape } from './use-terminal-traffic-lights-escape';+} from './utils/terminal-traffic-light-constants';+import { TRAFFIC_LIGHT_DOT_DEFINITIONS } from './components/TerminalTrafficLightDefinitions';+import { TerminalFlyingTrafficLights } from './components/TerminalFlyingTrafficLights';+import { TerminalTrafficLightDot } from './components/TerminalTrafficLightDot';+import { useTerminalTrafficLightsEscape } from './hooks/use-terminal-traffic-lights-escape';const TrafficLightsContainer = styled.div<{ $horizontalInset: number }>`align-items: center;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/terminal-traffic-light-physics.test.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/__tests__/terminal-traffic-light-physics.test.tssimilarity index 97%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/terminal-traffic-light-physics.test.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/__tests__/terminal-traffic-light-physics.test.tsindex b4a519b1138..faf54f924eb 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/terminal-traffic-light-physics.test.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/__tests__/terminal-traffic-light-physics.test.ts@@ -3,7 +3,7 @@ import {disturbTrafficLightPhysicsState,stepTrafficLightPhysicsState,type TrafficLightPhysicsState,-} from './terminal-traffic-light-physics';+} from '../utils/terminal-traffic-light-physics';const createRandomSequence = (values: number[]) => {let index = 0;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/TerminalFlyingTrafficLights.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/components/TerminalFlyingTrafficLights.tsxsimilarity index 95%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/TerminalFlyingTrafficLights.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/components/TerminalFlyingTrafficLights.tsxindex 745c566641d..501125ec3b3 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/TerminalFlyingTrafficLights.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/components/TerminalFlyingTrafficLights.tsx@@ -4,8 +4,8 @@ import { styled } from '@linaria/react';import type { ComponentType, RefCallback } from 'react';import { createPortal } from 'react-dom';import { theme } from '@/theme';-import { TRAFFIC_LIGHT_DOT_SIZE } from './terminal-traffic-light-constants';-import { TRAFFIC_LIGHT_DOT_DEFINITIONS } from './terminal-traffic-light-definitions';+import { TRAFFIC_LIGHT_DOT_SIZE } from '../utils/terminal-traffic-light-constants';+import { TRAFFIC_LIGHT_DOT_DEFINITIONS } from './TerminalTrafficLightDefinitions';const FlyingDotContainer = styled.button`background: transparent;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/terminal-traffic-light-definitions.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/components/TerminalTrafficLightDefinitions.tsxsimilarity index 95%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/terminal-traffic-light-definitions.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/components/TerminalTrafficLightDefinitions.tsxindex d7669b414a9..722db82d921 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/terminal-traffic-light-definitions.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/components/TerminalTrafficLightDefinitions.tsx@@ -1,4 +1,4 @@-import { TERMINAL_TOKENS } from '../terminalTokens';+import { TERMINAL_TOKENS } from '../../utils/terminal-tokens';const CloseGlyph = () => (<svg aria-hidden width="6" height="6" viewBox="0 0 6 6">diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/TerminalTrafficLightDot.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/components/TerminalTrafficLightDot.tsxsimilarity index 95%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/TerminalTrafficLightDot.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/components/TerminalTrafficLightDot.tsxindex ce925d117ac..6e32d00e3af 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/TerminalTrafficLightDot.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/components/TerminalTrafficLightDot.tsx@@ -4,7 +4,7 @@ import type {RefCallback,ComponentType,} from 'react';-import { TRAFFIC_LIGHT_DOT_SIZE } from './terminal-traffic-light-constants';+import { TRAFFIC_LIGHT_DOT_SIZE } from '../utils/terminal-traffic-light-constants';const DotButton = styled.button<{$background: string;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/use-terminal-traffic-lights-escape.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/hooks/use-terminal-traffic-lights-escape.tssimilarity index 97%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/use-terminal-traffic-lights-escape.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/hooks/use-terminal-traffic-lights-escape.tsindex f144a87a3fc..baacf7669e8 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/use-terminal-traffic-lights-escape.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/hooks/use-terminal-traffic-lights-escape.ts@@ -5,12 +5,12 @@ import {disturbTrafficLightPhysicsState,stepTrafficLightPhysicsState,type TrafficLightPhysicsState,-} from './terminal-traffic-light-physics';+} from '../utils/terminal-traffic-light-physics';import {createTrafficLightReturnState,TRAFFIC_LIGHT_DOT_SIZE,TRAFFIC_LIGHTS_ESCAPE_EVENT,-} from './terminal-traffic-light-constants';+} from '../utils/terminal-traffic-light-constants';const FLOOR_PADDING = 0;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/terminal-traffic-light-constants.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/utils/terminal-traffic-light-constants.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/terminal-traffic-light-constants.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/utils/terminal-traffic-light-constants.tsdiff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/terminal-traffic-light-physics.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/utils/terminal-traffic-light-physics.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/terminal-traffic-light-physics.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTrafficLights/utils/terminal-traffic-light-physics.tsdiff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/terminal-conversation-state.test.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/__tests__/terminal-conversation-state.test.tssimilarity index 97%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/terminal-conversation-state.test.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/__tests__/terminal-conversation-state.test.tsindex e9e1aaa23c4..34d509df56d 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/terminal-conversation-state.test.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/__tests__/terminal-conversation-state.test.ts@@ -1,7 +1,7 @@import {INITIAL_TERMINAL_CONVERSATION_STATE,terminalConversationReducer,-} from './terminal-conversation-state';+} from '../utils/terminal-conversation-state';describe('terminalConversationReducer', () => {it('creates one user message and one assistant message when sending a prompt', () => {diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/terminal-window-geometry.test.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/__tests__/terminal-window-geometry.test.tssimilarity index 98%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/terminal-window-geometry.test.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/__tests__/terminal-window-geometry.test.tsindex 90c946f0f4c..c6457965b79 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/terminal-window-geometry.test.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/__tests__/terminal-window-geometry.test.ts@@ -3,7 +3,7 @@ import {getInitialTerminalLayout,getTerminalTargetSize,isTerminalMobileBounds,-} from './terminal-window-geometry';+} from '../utils/terminal-window-geometry';describe('terminal-window-geometry', () => {it('detects mobile terminal bounds from parent width', () => {diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/ClaudeLogo.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/components/ClaudeLogo.tsxsimilarity index 83%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/ClaudeLogo.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/components/ClaudeLogo.tsxindex a9eb4c0743c..057b77b1a76 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/ClaudeLogo.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/components/ClaudeLogo.tsx@@ -9,7 +9,7 @@ export const ClaudeLogo = ({ size = 14 }: { size?: number }) => {aria-hiddendraggable={false}height={size}- src="/images/shared/companies/logos/claude.png"+ src="/images/shared/companies/logos/claude.webp"style={{ display: 'block' }}width={size}/>diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/CursorLogo.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/components/CursorLogo.tsxsimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/CursorLogo.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/components/CursorLogo.tsxdiff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalContent.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/components/TerminalContent.tsxsimilarity index 82%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalContent.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/components/TerminalContent.tsxindex 0b059e0949e..212244455e9 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalContent.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/components/TerminalContent.tsx@@ -1,16 +1,13 @@import { styled } from '@linaria/react';-import {- ConversationPanel,- type ConversationMessage,-} from './Conversation/ConversationPanel';-import { TerminalDiff } from './TerminalDiff/TerminalDiff';-import { TerminalEditor } from './TerminalEditor/TerminalEditor';-import { TerminalPromptBox } from './TerminalPrompt/TerminalPromptBox';-import type { TerminalToggleValue } from './TerminalToggle';-import {- CLEARED_PROMPT_TEXT,- INITIAL_PROMPT_TEXT,-} from './terminal-conversation-copy';+import type { ConversationMessage } from '../Conversation/types/conversation-message-types';+import { ConversationPanel } from '../Conversation/ConversationPanel';+import { TerminalDiff } from '../TerminalDiff/TerminalDiff';+import { TerminalEditor } from '../TerminalEditor/TerminalEditor';+import { TerminalPromptBox } from '../TerminalPrompt/TerminalPromptBox';+import type { TerminalToggleValue } from '../types/terminal-toggle-types';+import { INITIAL_PROMPT_TEXT } from '../utils/terminal-initial-prompt-text';++const CLEARED_PROMPT_TEXT = 'Ask anything…';const Body = styled.div`display: flex;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalResizeHandles.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/components/TerminalResizeHandles.tsxsimilarity index 97%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalResizeHandles.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/components/TerminalResizeHandles.tsxindex cea7801b878..8796de75a2b 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalResizeHandles.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/components/TerminalResizeHandles.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import type { PointerEvent as ReactPointerEvent } from 'react';-import type { WindowResizeHandle } from '../WindowInteraction/window-geometry';+import type { WindowResizeHandle } from '../../WindowInteraction/window-geometry';type StartTerminalResize = (handle: WindowResizeHandle,diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalToggle.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/components/TerminalToggle.tsxsimilarity index 95%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalToggle.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/components/TerminalToggle.tsxindex b348af08fa4..bd6494a8837 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalToggle.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/components/TerminalToggle.tsx@@ -4,10 +4,9 @@ import { styled } from '@linaria/react';import { useState } from 'react';import { ClaudeLogo } from './ClaudeLogo';import { CursorLogo } from './CursorLogo';-import { EDITOR_TOKENS } from './TerminalEditor/editorTokens';-import { TERMINAL_TOKENS } from './terminalTokens';--export type TerminalToggleValue = 'editor' | 'ai-chat';+import { EDITOR_TOKENS } from '../TerminalEditor/utils/editor-tokens';+import type { TerminalToggleValue } from '../types/terminal-toggle-types';+import { TERMINAL_TOKENS } from '../utils/terminal-tokens';type TerminalToggleProps = {value?: TerminalToggleValue;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTopBar.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/components/TerminalTopBar.tsxsimilarity index 82%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTopBar.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/components/TerminalTopBar.tsxindex 57b099781dc..703261b7616 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/TerminalTopBar.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/components/TerminalTopBar.tsx@@ -2,12 +2,13 @@import { styled } from '@linaria/react';import type { PointerEvent as ReactPointerEvent } from 'react';-import { DiffPill } from './TerminalDiff/DiffPill';-import { DIFF_TOTALS } from './TerminalDiff/diffData';-import { EDITOR_TOKENS } from './TerminalEditor/editorTokens';-import { TERMINAL_TOKENS } from './terminalTokens';-import { TerminalToggle, type TerminalToggleValue } from './TerminalToggle';-import { TerminalTrafficLights } from './TerminalTrafficLights/TerminalTrafficLights';+import { DiffPill } from '../TerminalDiff/DiffPill';+import { DIFF_TOTALS } from '../TerminalDiff/diff-data';+import { EDITOR_TOKENS } from '../TerminalEditor/utils/editor-tokens';+import type { TerminalToggleValue } from '../types/terminal-toggle-types';+import { TerminalTrafficLights } from '../TerminalTrafficLights/TerminalTrafficLights';+import { TERMINAL_TOKENS } from '../utils/terminal-tokens';+import { TerminalToggle } from './TerminalToggle';type TerminalTopBarProps = {onDragStart: (event: ReactPointerEvent<HTMLDivElement>) => void;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/use-terminal-conversation-workflow.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/hooks/use-terminal-conversation-workflow.tssimilarity index 94%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/use-terminal-conversation-workflow.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/hooks/use-terminal-conversation-workflow.tsindex e4984b92cb3..8dbb7c1854c 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/use-terminal-conversation-workflow.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/hooks/use-terminal-conversation-workflow.ts@@ -1,10 +1,10 @@import { useCallback, useReducer, useRef } from 'react';-import type { TerminalToggleValue } from './TerminalToggle';+import type { TerminalToggleValue } from '../types/terminal-toggle-types';import {INITIAL_TERMINAL_CONVERSATION_STATE,terminalConversationReducer,-} from './terminal-conversation-state';+} from '../utils/terminal-conversation-state';type UseTerminalConversationWorkflowOptions = {onChatFinished?: () => void;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/use-terminal-window-layout.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/hooks/use-terminal-window-layout.tssimilarity index 91%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/use-terminal-window-layout.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/hooks/use-terminal-window-layout.tsindex 115458acc2b..2cf00dea57a 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/use-terminal-window-layout.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/hooks/use-terminal-window-layout.ts@@ -7,13 +7,13 @@ import {type CSSProperties,} from 'react';import { useTimeoutRegistry } from '@/lib/react';-import { useWindowPointerInteractions } from '../WindowInteraction/use-window-pointer-interactions';+import { useWindowPointerInteractions } from '../../WindowInteraction/use-window-pointer-interactions';import type {WindowPosition as TerminalPosition,WindowSize as TerminalSize,-} from '../WindowInteraction/window-geometry';-import { useWindowOrder } from '../WindowOrder/WindowOrderProvider';-import type { TerminalToggleValue } from './TerminalToggle';+} from '../../WindowInteraction/window-geometry';+import { useWindowOrder } from '../../WindowOrder/use-window-order';+import type { TerminalToggleValue } from '../types/terminal-toggle-types';import {getAnchoredTerminalResizeLayout,getInitialTerminalLayout,@@ -23,7 +23,7 @@ import {TERMINAL_INITIAL_WIDTH,TERMINAL_MIN_HEIGHT,TERMINAL_MIN_WIDTH,-} from './terminal-window-geometry';+} from '../utils/terminal-window-geometry';const TERMINAL_WINDOW_ID = 'terminal-window';const TERMINAL_ANIMATION_ENABLE_DELAY = 150;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/types/terminal-toggle-types.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/types/terminal-toggle-types.tsnew file mode 100644index 00000000000..abc02b3ed1a--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/types/terminal-toggle-types.ts@@ -0,0 +1 @@+export type TerminalToggleValue = 'editor' | 'ai-chat';diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/terminal-conversation-state.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/utils/terminal-conversation-state.tssimilarity index 89%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/terminal-conversation-state.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/utils/terminal-conversation-state.tsindex 4fa4b1febeb..3f74cc7d7b2 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/terminal-conversation-state.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/utils/terminal-conversation-state.ts@@ -1,6 +1,6 @@-import type { ConversationMessage } from './Conversation/ConversationPanel';-import type { TerminalToggleValue } from './TerminalToggle';-import { INITIAL_PROMPT_TEXT } from './terminal-conversation-copy';+import type { ConversationMessage } from '../Conversation/types/conversation-message-types';+import type { TerminalToggleValue } from '../types/terminal-toggle-types';+import { INITIAL_PROMPT_TEXT } from './terminal-initial-prompt-text';export type TerminalConversationState = {instantComplete: boolean;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/terminal-conversation-copy.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/utils/terminal-initial-prompt-text.tssimilarity index 76%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/terminal-conversation-copy.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/utils/terminal-initial-prompt-text.tsindex c2451cb127e..8bc3e2a70fa 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/terminal-conversation-copy.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/utils/terminal-initial-prompt-text.ts@@ -1,4 +1,2 @@export const INITIAL_PROMPT_TEXT ='Scaffold a launch-ops CRM in my workspace with rockets, launches, payloads, customers, and launch sites, with relevant actions for each.';--export const CLEARED_PROMPT_TEXT = 'Ask anything…';diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/terminalTokens.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/utils/terminal-tokens.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/terminalTokens.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/utils/terminal-tokens.tsdiff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/terminal-window-geometry.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/utils/terminal-window-geometry.tssimilarity index 97%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/terminal-window-geometry.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/utils/terminal-window-geometry.tsindex 6513ca8da47..bd017e2512f 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/terminal-window-geometry.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/DraggableTerminal/utils/terminal-window-geometry.ts@@ -2,8 +2,8 @@ import type {WindowBounds,WindowPosition,WindowSize,-} from '../WindowInteraction/window-geometry';-import type { TerminalToggleValue } from './TerminalToggle';+} from '../../WindowInteraction/window-geometry';+import type { TerminalToggleValue } from '../types/terminal-toggle-types';export const TERMINAL_INITIAL_WIDTH = 380;export const TERMINAL_INITIAL_HEIGHT = 220;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/HomeVisual.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/HomeVisual.tsxindex 45bed5698d5..273ca7c1e88 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/HomeVisual.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/HomeVisual.tsx@@ -7,14 +7,12 @@ import { useEffect } from 'react';import type { HeroVisualType } from '@/sections/Hero/types';import { DraggableAppWindow } from './DraggableAppWindow/DraggableAppWindow';import { DraggableTerminal } from './DraggableTerminal/DraggableTerminal';-import { COLORS } from './Shared/home-visual-theme';+import { COLORS } from './Shared/utils/home-visual-theme';import { HomeVisualNavbar } from './Shell/HomeVisualNavbar';import { HomeVisualSidebar } from './Shell/HomeVisualSidebar';import { HomeVisualViewbar } from './Shell/HomeVisualViewbar';-import {- preloadDeferredHomeVisualPages,- renderPageDefinition,-} from './Shell/home-visual-page-renderers';+import { renderPageDefinition } from './Shell/HomeVisualPageRenderers';+import { preloadDeferredHomeVisualPages } from './Shell/preload-deferred-home-visual-pages';import { useHomeVisualState } from './Shell/use-home-visual-state';import { WindowOrderProvider } from './WindowOrder/WindowOrderProvider';diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Dashboard/SalesDashboardPage.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Dashboard/SalesDashboardPage.tsxindex dd41b9fb71a..ef5a7f5898c 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Dashboard/SalesDashboardPage.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Dashboard/SalesDashboardPage.tsx@@ -4,7 +4,7 @@ import type {} from '@/sections/Hero/types';import { theme } from '@/theme';import { styled } from '@linaria/react';-import { VISUAL_TOKENS } from '../../Shared/homeVisualTokens';+import { VISUAL_TOKENS } from '../../Shared/utils/home-visual-tokens';const APP_FONT = VISUAL_TOKENS.font.family;const CARD_BACKGROUND = VISUAL_TOKENS.background.secondary;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Kanban/KanbanCard.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Kanban/KanbanCard.tsxindex 0edcf010b27..e2a8b392cd3 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Kanban/KanbanCard.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Kanban/KanbanCard.tsx@@ -17,11 +17,9 @@ import type {HeroCellPerson,HeroKanbanCardType,} from '@/sections/Hero/types';-import {- HomeVisualFaviconLogo,- HomeVisualPersonAvatar,-} from '../../Shared/home-visual-identity';-import { Chip } from '../../Shared/homeVisualChip';+import { HomeVisualFaviconLogo } from '../../Shared/components/HomeVisualFaviconLogo';+import { HomeVisualPersonAvatar } from '../../Shared/components/HomeVisualPersonAvatar';+import { Chip } from '../../Shared/components/HomeVisualChip';import {KANBAN_PAGE_COLORS,KANBAN_PAGE_FONT,diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Kanban/kanban-page-theme.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Kanban/kanban-page-theme.tsindex ca1b512d7fe..6710ca82830 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Kanban/kanban-page-theme.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Kanban/kanban-page-theme.ts@@ -1,4 +1,4 @@-import { VISUAL_TOKENS } from '../../Shared/homeVisualTokens';+import { VISUAL_TOKENS } from '../../Shared/utils/home-visual-tokens';export const KANBAN_PAGE_FONT = VISUAL_TOKENS.font.family;export const KANBAN_PAGE_TABLER_STROKE = 1.6;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/CheckMini.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/CheckMini.tsxnew file mode 100644index 00000000000..848656b61d2--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/CheckMini.tsx@@ -0,0 +1,23 @@+import { IconCheck } from '@tabler/icons-react';++import {+ TABLE_PAGE_COLORS,+ TABLE_PAGE_TABLER_STROKE,+} from './table-page-theme';++export function CheckMini({+ color = TABLE_PAGE_COLORS.text,+ size = 12,+}: {+ color?: string;+ size?: number;+}) {+ return (+ <IconCheck+ aria-hidden+ color={color}+ size={size}+ stroke={TABLE_PAGE_TABLER_STROKE}+ />+ );+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/ChevronDownMini.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/ChevronDownMini.tsxnew file mode 100644index 00000000000..6ffa2a3be7b--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/ChevronDownMini.tsx@@ -0,0 +1,23 @@+import { IconChevronDown } from '@tabler/icons-react';++import {+ TABLE_PAGE_COLORS,+ TABLE_PAGE_TABLER_STROKE,+} from './table-page-theme';++export function ChevronDownMini({+ color = TABLE_PAGE_COLORS.textTertiary,+ size = 14,+}: {+ color?: string;+ size?: number;+}) {+ return (+ <IconChevronDown+ aria-hidden+ color={color}+ size={size}+ stroke={TABLE_PAGE_TABLER_STROKE}+ />+ );+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/CloseMini.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/CloseMini.tsxnew file mode 100644index 00000000000..ae9cfa505a0--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/CloseMini.tsx@@ -0,0 +1,23 @@+import { IconX } from '@tabler/icons-react';++import {+ TABLE_PAGE_COLORS,+ TABLE_PAGE_TABLER_STROKE,+} from './table-page-theme';++export function CloseMini({+ color = TABLE_PAGE_COLORS.text,+ size = 12,+}: {+ color?: string;+ size?: number;+}) {+ return (+ <IconX+ aria-hidden+ color={color}+ size={size}+ stroke={TABLE_PAGE_TABLER_STROKE}+ />+ );+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/CopyMini.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/CopyMini.tsxnew file mode 100644index 00000000000..9964a344069--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/CopyMini.tsx@@ -0,0 +1,23 @@+import { IconCopy } from '@tabler/icons-react';++import {+ TABLE_PAGE_COLORS,+ TABLE_PAGE_TABLER_STROKE,+} from './table-page-theme';++export function CopyMini({+ color = TABLE_PAGE_COLORS.textSecondary,+ size = 14,+}: {+ color?: string;+ size?: number;+}) {+ return (+ <IconCopy+ aria-hidden+ color={color}+ size={size}+ stroke={TABLE_PAGE_TABLER_STROKE}+ />+ );+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/PencilMini.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/PencilMini.tsxnew file mode 100644index 00000000000..f8cc6bbc9f3--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/PencilMini.tsx@@ -0,0 +1,23 @@+import { IconPencil } from '@tabler/icons-react';++import {+ TABLE_PAGE_COLORS,+ TABLE_PAGE_TABLER_STROKE,+} from './table-page-theme';++export function PencilMini({+ color = TABLE_PAGE_COLORS.textSecondary,+ size = 14,+}: {+ color?: string;+ size?: number;+}) {+ return (+ <IconPencil+ aria-hidden+ color={color}+ size={size}+ stroke={TABLE_PAGE_TABLER_STROKE}+ />+ );+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/PlusMini.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/PlusMini.tsxnew file mode 100644index 00000000000..ac254dc1ee6--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/PlusMini.tsx@@ -0,0 +1,23 @@+import { IconPlus } from '@tabler/icons-react';++import {+ TABLE_PAGE_COLORS,+ TABLE_PAGE_TABLER_STROKE,+} from './table-page-theme';++export function PlusMini({+ color = TABLE_PAGE_COLORS.textSecondary,+ size = 14,+}: {+ color?: string;+ size?: number;+}) {+ return (+ <IconPlus+ aria-hidden+ color={color}+ size={size}+ stroke={TABLE_PAGE_TABLER_STROKE}+ />+ );+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/TablePage.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/TablePage.tsxindex dc57a7bfb1e..2477ff32207 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/TablePage.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/TablePage.tsx@@ -7,11 +7,9 @@ import { useState } from 'react';import type { HeroTablePageDefinition } from '@/sections/Hero/types';import { TablePageCheckbox } from './TablePageCheckbox';import { renderTableCellValue } from './TablePageCellValue';-import {- ChevronDownMini,- PlusMini,- renderTableHeaderIcon,-} from './TablePageMiniIcons';+import { ChevronDownMini } from './ChevronDownMini';+import { PlusMini } from './PlusMini';+import { renderTableHeaderIcon } from './render-table-header-icon';import {TABLE_PAGE_CELL_HORIZONTAL_PADDING,TABLE_PAGE_COLORS,diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/TablePageCellValue.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/TablePageCellValue.tsxindex 18792cbd6e1..02cb0b64bf3 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/TablePageCellValue.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/TablePageCellValue.tsx@@ -9,20 +9,17 @@ import type {HeroCellText,HeroCellValue,} from '@/sections/Hero/types';-import {- getHomeVisualInitials,- HomeVisualAvatar,- HomeVisualFaviconLogo,- HomeVisualPersonAvatar,-} from '../../Shared/home-visual-identity';-import { Chip, ChipVariant } from '../../Shared/homeVisualChip';-import { VISUAL_TOKENS } from '../../Shared/homeVisualTokens';-import {- CheckMini,- CloseMini,- CopyMini,- PencilMini,-} from './TablePageMiniIcons';+import { getHomeVisualInitials } from '../../Shared/utils/get-home-visual-initials';+import { HomeVisualAvatar } from '../../Shared/components/HomeVisualAvatar';+import { HomeVisualFaviconLogo } from '../../Shared/components/HomeVisualFaviconLogo';+import { HomeVisualPersonAvatar } from '../../Shared/components/HomeVisualPersonAvatar';+import { ChipVariant } from '../../Shared/utils/chip-variant';+import { Chip } from '../../Shared/components/HomeVisualChip';+import { VISUAL_TOKENS } from '../../Shared/utils/home-visual-tokens';+import { CheckMini } from './CheckMini';+import { CloseMini } from './CloseMini';+import { CopyMini } from './CopyMini';+import { PencilMini } from './PencilMini';import { TablePageCheckbox } from './TablePageCheckbox';import {TABLE_PAGE_CELL_HORIZONTAL_PADDING,diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/TablePageMiniIcons.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/TablePageMiniIcons.tsxdeleted file mode 100644index da609cc6a56..00000000000--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/TablePageMiniIcons.tsx+++ /dev/null@@ -1,143 +0,0 @@-import {- IconBrandLinkedin,- IconBuildingFactory2,- IconCalendarEvent,- IconCheck,- IconChevronDown,- IconCopy,- IconCreativeCommonsSa,- IconLink,- IconMap2,- IconMoneybag,- IconPencil,- IconPlus,- IconTarget,- IconTargetArrow,- IconUser,- IconUserCircle,- IconUsers,- IconX,-} from '@tabler/icons-react';-import type { ReactNode } from 'react';--import {- TABLE_PAGE_COLORS,- TABLE_PAGE_TABLER_STROKE,-} from './table-page-theme';--type MiniIconProps = {- color?: string;- size?: number;-};--const HEADER_ICON_MAP: Record<string, typeof IconCalendarEvent> = {- added: IconCalendarEvent,- accountOwner: IconUserCircle,- address: IconMap2,- arr: IconMoneybag,- createdBy: IconCreativeCommonsSa,- employees: IconUsers,- icp: IconTarget,- industry: IconBuildingFactory2,- linkedin: IconBrandLinkedin,- mainContact: IconUser,- opportunities: IconTargetArrow,- url: IconLink,-};--export function PlusMini({- color = TABLE_PAGE_COLORS.textSecondary,- size = 14,-}: MiniIconProps) {- return (- <IconPlus- aria-hidden- color={color}- size={size}- stroke={TABLE_PAGE_TABLER_STROKE}- />- );-}--export function CheckMini({- color = TABLE_PAGE_COLORS.text,- size = 12,-}: MiniIconProps) {- return (- <IconCheck- aria-hidden- color={color}- size={size}- stroke={TABLE_PAGE_TABLER_STROKE}- />- );-}--export function CloseMini({- color = TABLE_PAGE_COLORS.text,- size = 12,-}: MiniIconProps) {- return (- <IconX- aria-hidden- color={color}- size={size}- stroke={TABLE_PAGE_TABLER_STROKE}- />- );-}--export function PencilMini({- color = TABLE_PAGE_COLORS.textSecondary,- size = 14,-}: MiniIconProps) {- return (- <IconPencil- aria-hidden- color={color}- size={size}- stroke={TABLE_PAGE_TABLER_STROKE}- />- );-}--export function CopyMini({- color = TABLE_PAGE_COLORS.textSecondary,- size = 14,-}: MiniIconProps) {- return (- <IconCopy- aria-hidden- color={color}- size={size}- stroke={TABLE_PAGE_TABLER_STROKE}- />- );-}--export function ChevronDownMini({- color = TABLE_PAGE_COLORS.textTertiary,- size = 14,-}: MiniIconProps) {- return (- <IconChevronDown- aria-hidden- color={color}- size={size}- stroke={TABLE_PAGE_TABLER_STROKE}- />- );-}--export function renderTableHeaderIcon(columnId: string): ReactNode {- const Icon = HEADER_ICON_MAP[columnId] ?? IconCalendarEvent;-- return (- <Icon- aria-hidden- color={TABLE_PAGE_COLORS.textTertiary}- size={16}- stroke={TABLE_PAGE_TABLER_STROKE}- />- );-}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/render-table-header-icon.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/render-table-header-icon.tsxnew file mode 100644index 00000000000..34da560093b--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/render-table-header-icon.tsx@@ -0,0 +1,48 @@+import {+ IconBrandLinkedin,+ IconBuildingFactory2,+ IconCalendarEvent,+ IconCreativeCommonsSa,+ IconLink,+ IconMap2,+ IconMoneybag,+ IconTarget,+ IconTargetArrow,+ IconUser,+ IconUserCircle,+ IconUsers,+} from '@tabler/icons-react';+import type { ReactNode } from 'react';++import {+ TABLE_PAGE_COLORS,+ TABLE_PAGE_TABLER_STROKE,+} from './table-page-theme';++const HEADER_ICON_MAP: Record<string, typeof IconCalendarEvent> = {+ added: IconCalendarEvent,+ accountOwner: IconUserCircle,+ address: IconMap2,+ arr: IconMoneybag,+ createdBy: IconCreativeCommonsSa,+ employees: IconUsers,+ icp: IconTarget,+ industry: IconBuildingFactory2,+ linkedin: IconBrandLinkedin,+ mainContact: IconUser,+ opportunities: IconTargetArrow,+ url: IconLink,+};++export function renderTableHeaderIcon(columnId: string): ReactNode {+ const Icon = HEADER_ICON_MAP[columnId] ?? IconCalendarEvent;++ return (+ <Icon+ aria-hidden+ color={TABLE_PAGE_COLORS.textTertiary}+ size={16}+ stroke={TABLE_PAGE_TABLER_STROKE}+ />+ );+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/table-page-theme.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/table-page-theme.tsindex 2812f1005d0..65d823df50a 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/table-page-theme.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Table/table-page-theme.ts@@ -1,4 +1,4 @@-import { VISUAL_TOKENS } from '../../Shared/homeVisualTokens';+import { VISUAL_TOKENS } from '../../Shared/utils/home-visual-tokens';export const TABLE_PAGE_FONT = VISUAL_TOKENS.font.family;export const TABLE_PAGE_CELL_HORIZONTAL_PADDING = 8;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Workflow/get-workflow-node-by-id.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Workflow/get-workflow-node-by-id.tsnew file mode 100644index 00000000000..9c3fa7f9ea8--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Workflow/get-workflow-node-by-id.ts@@ -0,0 +1,14 @@+import type { WorkflowNodeDefinition } from './workflow-page-data';++export function getWorkflowNodeById(+ nodes: ReadonlyArray<WorkflowNodeDefinition>,+ nodeId: string,+) {+ const node = nodes.find((workflowNode) => workflowNode.id === nodeId);++ if (!node) {+ throw new Error(`Unknown workflow node: ${nodeId}`);+ }++ return node;+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Workflow/workflow-page-geometry.test.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Workflow/workflow-page-geometry.test.tsindex d1227a2b84d..fa54ed64d19 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Workflow/workflow-page-geometry.test.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Workflow/workflow-page-geometry.test.ts@@ -1,8 +1,6 @@import type { WorkflowNodeDefinition } from './workflow-page-data';-import {- getWorkflowEdgePath,- getWorkflowNodeById,-} from './workflow-page-geometry';+import { getWorkflowNodeById } from './get-workflow-node-by-id';+import { getWorkflowEdgePath } from './workflow-page-geometry';import { IconPlug } from '@tabler/icons-react';const nodes: WorkflowNodeDefinition[] = [diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Workflow/workflow-page-geometry.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Workflow/workflow-page-geometry.tsindex c339095b97f..3c78df79251 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Workflow/workflow-page-geometry.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Workflow/workflow-page-geometry.ts@@ -3,25 +3,13 @@ import type {WorkflowEdgeDefinition,WorkflowNodeDefinition,} from './workflow-page-data';+import { getWorkflowNodeById } from './get-workflow-node-by-id';type Point = {x: number;y: number;};-export function getWorkflowNodeById(- nodes: ReadonlyArray<WorkflowNodeDefinition>,- nodeId: string,-) {- const node = nodes.find((workflowNode) => workflowNode.id === nodeId);-- if (!node) {- throw new Error(`Unknown workflow node: ${nodeId}`);- }-- return node;-}-function getNodeTopCenter(node: WorkflowNodeDefinition): Point {return {x: node.x + node.width / 2,diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Workflow/workflow-page-theme.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Workflow/workflow-page-theme.tsindex 40d68ecb563..51b9d04884e 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Workflow/workflow-page-theme.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Pages/Workflow/workflow-page-theme.ts@@ -1,4 +1,4 @@-import { VISUAL_TOKENS } from '../../Shared/homeVisualTokens';+import { VISUAL_TOKENS } from '../../Shared/utils/home-visual-tokens';export const WORKFLOW_PAGE_FONT = VISUAL_TOKENS.font.family;export const WORKFLOW_PAGE_TABLER_STROKE = 1.6;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualAvatar.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualAvatar.tsxnew file mode 100644index 00000000000..bc28626a448--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualAvatar.tsx@@ -0,0 +1,68 @@+import { theme } from '@/theme';+import { styled } from '@linaria/react';+import type { ReactNode } from 'react';++import { APP_FONT } from '../utils/home-visual-theme';++const HOME_VISUAL_PERSON_TONES: Record<+ string,+ { background: string; color: string }+> = {+ amber: { background: '#f6e6d7', color: '#7a4f2a' },+ blue: { background: '#dbeafe', color: '#1d4ed8' },+ gray: { background: '#e5e7eb', color: '#4b5563' },+ green: { background: '#dcfce7', color: '#15803d' },+ orange: { background: '#ffdcc3', color: '#ED5F00' },+ pink: { background: '#ffe4e6', color: '#be123c' },+ purple: { background: '#ede9fe', color: '#6d28d9' },+ red: { background: '#fee2e2', color: '#b91c1c' },+ teal: { background: '#ccfbf1', color: '#0f766e' },+};++const AvatarFrame = styled.div<{+ $background: string;+ $color: string;+ $size: number;+ $square?: boolean;+}>`+ align-items: center;+ background: ${({ $background }) => $background};+ border-radius: ${({ $square }) => ($square ? '4px' : '999px')};+ color: ${({ $color }) => $color};+ display: flex;+ flex: 0 0 auto;+ font-family: ${APP_FONT};+ font-size: 10px;+ font-weight: ${theme.font.weight.medium};+ height: ${({ $size }) => `${$size}px`};+ justify-content: center;+ line-height: 1;+ overflow: hidden;+ width: ${({ $size }) => `${$size}px`};+`;++export function HomeVisualAvatar({+ children,+ size = 14,+ square = false,+ tone = 'gray',+}: {+ children: ReactNode;+ size?: number;+ square?: boolean;+ tone?: string;+}) {+ const resolvedTone =+ HOME_VISUAL_PERSON_TONES[tone] ?? HOME_VISUAL_PERSON_TONES.gray;++ return (+ <AvatarFrame+ $background={resolvedTone.background}+ $color={resolvedTone.color}+ $size={size}+ $square={square}+ >+ {children}+ </AvatarFrame>+ );+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/homeVisualChip.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualChip.tsxsimilarity index 89%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/homeVisualChip.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualChip.tsxindex 58c73df227e..d1f8645f970 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/homeVisualChip.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualChip.tsx@@ -1,31 +1,9 @@import { styled } from '@linaria/react';-import {- type KeyboardEvent,- type MouseEvent,- type PointerEvent,- type ReactNode,-} from 'react';--import { VISUAL_TOKENS } from './homeVisualTokens';--export enum ChipVariant {- Highlighted = 'highlighted',- Regular = 'regular',- Transparent = 'transparent',- Rounded = 'rounded',- Static = 'static',-}--export type ChipProps = {- label: string;- clickable?: boolean;- isBold?: boolean;- leftComponent?: ReactNode | null;- className?: string;- maxWidth?: number;- onClick?: () => void;- variant?: ChipVariant;-};+import { type KeyboardEvent, type MouseEvent, type PointerEvent } from 'react';++import type { ChipProps } from '../utils/chip-props';+import { ChipVariant } from '../utils/chip-variant';+import { VISUAL_TOKENS } from '../utils/home-visual-tokens';const StyledContainer = styled.div<Pick<ChipProps, 'clickable' | 'isBold' | 'maxWidth' | 'variant'>diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualFaviconLogo.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualFaviconLogo.tsxnew file mode 100644index 00000000000..8d2960a9719--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualFaviconLogo.tsx@@ -0,0 +1,100 @@+import { getSharedCompanyLogoUrlFromDomainName } from '@/content/site/asset-paths';+import { createBoundedFailureCache } from '@/lib/visual-runtime';+import { styled } from '@linaria/react';+import { useState } from 'react';++import { getHomeVisualInitials } from '../utils/get-home-visual-initials';+import { APP_FONT } from '../utils/home-visual-theme';++const failedFaviconUrls = createBoundedFailureCache(256);++const FaviconFrame = styled.div<{ $size: number }>`+ align-items: center;+ border-radius: 4px;+ display: flex;+ flex: 0 0 auto;+ font-family: ${APP_FONT};+ font-size: ${({ $size }) => ($size <= 14 ? '8px' : '9px')};+ font-weight: 600;+ height: ${({ $size }) => `${$size}px`};+ justify-content: center;+ line-height: 1;+ overflow: hidden;+ width: ${({ $size }) => `${$size}px`};+`;++const FaviconFallbackFrame = styled(FaviconFrame)`+ background: #ebebeb;+ color: #666666;+`;++const FaviconImage = styled.img`+ display: block;+ height: 100%;+ object-fit: contain;+ width: 100%;+`;++function sanitizeURL(link: string | null | undefined) {+ return link+ ? link.replace(/(https?:\/\/)|(www\.)/g, '').replace(/\/$/, '')+ : '';+}++function getHomeVisualLogoUrlFromDomainName(+ domainName?: string,+): string | undefined {+ const sharedLogoUrl = getSharedCompanyLogoUrlFromDomainName(domainName);++ if (sharedLogoUrl) {+ return sharedLogoUrl;+ }++ const sanitizedDomain = sanitizeURL(domainName);++ return sanitizedDomain+ ? `https://twenty-icons.com/${sanitizedDomain}`+ : undefined;+}++export function HomeVisualFaviconLogo({+ domain,+ label,+ size = 14,+ src,+}: {+ domain?: string;+ label?: string;+ size?: number;+ src?: string;+}) {+ const faviconUrl = src ?? getHomeVisualLogoUrlFromDomainName(domain);+ const [localFailedUrl, setLocalFailedUrl] = useState<string | null>(null);+ const showFavicon =+ faviconUrl !== undefined &&+ !failedFaviconUrls.has(faviconUrl) &&+ localFailedUrl !== faviconUrl;++ if (showFavicon) {+ return (+ <FaviconFrame $size={size}>+ <FaviconImage+ alt={label ? `${label} logo` : ''}+ src={faviconUrl}+ onError={() => {+ failedFaviconUrls.add(faviconUrl);+ setLocalFailedUrl(faviconUrl);+ }}+ />+ </FaviconFrame>+ );+ }++ const initials = label ? getHomeVisualInitials(label) : '?';++ return (+ <FaviconFallbackFrame $size={size}>+ {initials.slice(0, 1)}+ </FaviconFallbackFrame>+ );+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/home-visual-icon.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualIcon.tsxsimilarity index 86%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/home-visual-icon.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualIcon.tsxindex 57af250d750..04a21aec165 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/home-visual-icon.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualIcon.tsx@@ -21,13 +21,13 @@ import {import type { ReactNode } from 'react';import type { HeroSidebarIcon } from '@/sections/Hero/types';-import { HomeVisualFaviconLogo } from './home-visual-identity';+import { HomeVisualFaviconLogo } from './HomeVisualFaviconLogo';import {APP_FONT,COLORS,NAVIGATION_TABLER_STROKE,TABLER_STROKE,-} from './home-visual-theme';+} from '../utils/home-visual-theme';const SIDEBAR_TONES: Record<string,@@ -45,26 +45,6 @@ const SIDEBAR_TONES: Record<violet: { background: '#ebe5ff', border: '#d8cbff', color: '#5b3fd1' },};-const hexToRgbTuple = (hex: string): string => {- const clean = hex.replace('#', '');- const expanded =- clean.length === 3- ? clean- .split('')- .map((char) => char + char)- .join('')- : clean;- const value = parseInt(expanded, 16);- return `${(value >> 16) & 255}, ${(value >> 8) & 255}, ${value & 255}`;-};--const SIDEBAR_TONE_RGB: Record<string, string> = Object.fromEntries(- Object.entries(SIDEBAR_TONES).map(([tone, palette]) => [- tone,- hexToRgbTuple(palette.color),- ]),-);-const TABLER_ICON_MAP: Record<string, typeof IconBuildingSkyscraper> = {book: IconBook,buildingSkyscraper: IconBuildingSkyscraper,@@ -178,13 +158,6 @@ function LinkOverlay() {);}-export function getSidebarIconToneRgb(icon: HeroSidebarIcon): string {- const iconTone =- 'tone' in icon && typeof icon.tone === 'string' ? icon.tone : 'gray';-- return SIDEBAR_TONE_RGB[iconTone] ?? SIDEBAR_TONE_RGB.gray;-}-export function renderHomeVisualIcon(icon: HeroSidebarIcon,pulse: boolean = false,diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/HomeVisualLoader.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualLoader.tsxsimilarity index 95%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/HomeVisualLoader.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualLoader.tsxindex 84082e0f980..9bb59ab90c8 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/HomeVisualLoader.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualLoader.tsx@@ -1,6 +1,6 @@import { styled } from '@linaria/react';import { motion } from 'framer-motion';-import { VISUAL_TOKENS } from './homeVisualTokens';+import { VISUAL_TOKENS } from '../utils/home-visual-tokens';const DEFAULT_LOADER_COLOR = `var(--tw-button-color, ${VISUAL_TOKENS.font.color.tertiary})`;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualPersonAvatar.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualPersonAvatar.tsxnew file mode 100644index 00000000000..210b2fb60b8--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/HomeVisualPersonAvatar.tsx@@ -0,0 +1,59 @@+import { createBoundedFailureCache } from '@/lib/visual-runtime';+import { styled } from '@linaria/react';+import { useState } from 'react';++import type { HeroCellPerson } from '@/sections/Hero/types';++import { getHomeVisualInitials } from '../utils/get-home-visual-initials';+import { HomeVisualAvatar } from './HomeVisualAvatar';++const failedAvatarUrls = createBoundedFailureCache(256);++type HomeVisualPersonIdentity = Pick<+ HeroCellPerson,+ 'avatarUrl' | 'kind' | 'name' | 'shortLabel' | 'tone'+>;++const AvatarImage = styled.img`+ display: block;+ height: 100%;+ object-fit: cover;+ width: 100%;+`;++export function HomeVisualPersonAvatar({+ person,+ size = 14,+}: {+ person: HomeVisualPersonIdentity;+ size?: number;+}) {+ const [localFailedUrl, setLocalFailedUrl] = useState<string | null>(null);+ const square =+ person.kind === 'api' ||+ person.kind === 'system' ||+ person.kind === 'workflow';+ const showAvatar =+ person.avatarUrl !== undefined &&+ !failedAvatarUrls.has(person.avatarUrl) &&+ localFailedUrl !== person.avatarUrl;++ return (+ <HomeVisualAvatar size={size} square={square} tone={person.tone}>+ {showAvatar ? (+ <AvatarImage+ alt=""+ src={person.avatarUrl}+ onError={() => {+ if (person.avatarUrl) {+ failedAvatarUrls.add(person.avatarUrl);+ setLocalFailedUrl(person.avatarUrl);+ }+ }}+ />+ ) : (+ (person.shortLabel ?? getHomeVisualInitials(person.name))+ )}+ </HomeVisualAvatar>+ );+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/PagePreviewLoader.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/PagePreviewLoader.tsxsimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/PagePreviewLoader.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/components/PagePreviewLoader.tsxdiff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/home-visual-identity.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/home-visual-identity.tsxdeleted file mode 100644index bb0c8ec1b57..00000000000--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/home-visual-identity.tsx+++ /dev/null@@ -1,224 +0,0 @@-import { getSharedCompanyLogoUrlFromDomainName } from '@/content/site/asset-paths';-import { createBoundedFailureCache } from '@/lib/visual-runtime';-import { theme } from '@/theme';-import { styled } from '@linaria/react';-import { useState, type ReactNode } from 'react';--import type { HeroCellPerson } from '@/sections/Hero/types';-import { APP_FONT } from './home-visual-theme';--const HOME_VISUAL_PERSON_TONES: Record<- string,- { background: string; color: string }-> = {- amber: { background: '#f6e6d7', color: '#7a4f2a' },- blue: { background: '#dbeafe', color: '#1d4ed8' },- gray: { background: '#e5e7eb', color: '#4b5563' },- green: { background: '#dcfce7', color: '#15803d' },- orange: { background: '#ffdcc3', color: '#ED5F00' },- pink: { background: '#ffe4e6', color: '#be123c' },- purple: { background: '#ede9fe', color: '#6d28d9' },- red: { background: '#fee2e2', color: '#b91c1c' },- teal: { background: '#ccfbf1', color: '#0f766e' },-};--const failedAvatarUrls = createBoundedFailureCache(256);-const failedFaviconUrls = createBoundedFailureCache(256);--type HomeVisualPersonIdentity = Pick<- HeroCellPerson,- 'avatarUrl' | 'kind' | 'name' | 'shortLabel' | 'tone'->;--const AvatarFrame = styled.div<{- $background: string;- $color: string;- $size: number;- $square?: boolean;-}>`- align-items: center;- background: ${({ $background }) => $background};- border-radius: ${({ $square }) => ($square ? '4px' : '999px')};- color: ${({ $color }) => $color};- display: flex;- flex: 0 0 auto;- font-family: ${APP_FONT};- font-size: 10px;- font-weight: ${theme.font.weight.medium};- height: ${({ $size }) => `${$size}px`};- justify-content: center;- line-height: 1;- overflow: hidden;- width: ${({ $size }) => `${$size}px`};-`;--const AvatarImage = styled.img`- display: block;- height: 100%;- object-fit: cover;- width: 100%;-`;--const FaviconFrame = styled.div<{ $size: number }>`- align-items: center;- border-radius: 4px;- display: flex;- flex: 0 0 auto;- font-family: ${APP_FONT};- font-size: ${({ $size }) => ($size <= 14 ? '8px' : '9px')};- font-weight: 600;- height: ${({ $size }) => `${$size}px`};- justify-content: center;- line-height: 1;- overflow: hidden;- width: ${({ $size }) => `${$size}px`};-`;--const FaviconFallbackFrame = styled(FaviconFrame)`- background: #ebebeb;- color: #666666;-`;--const FaviconImage = styled.img`- display: block;- height: 100%;- object-fit: contain;- width: 100%;-`;--export function getHomeVisualInitials(value: string) {- return value- .split(' ')- .filter(Boolean)- .slice(0, 2)- .map((part) => part[0])- .join('')- .toUpperCase();-}--function sanitizeURL(link: string | null | undefined) {- return link- ? link.replace(/(https?:\/\/)|(www\.)/g, '').replace(/\/$/, '')- : '';-}--function getHomeVisualLogoUrlFromDomainName(- domainName?: string,-): string | undefined {- const sharedLogoUrl = getSharedCompanyLogoUrlFromDomainName(domainName);-- if (sharedLogoUrl) {- return sharedLogoUrl;- }-- const sanitizedDomain = sanitizeURL(domainName);-- return sanitizedDomain- ? `https://twenty-icons.com/${sanitizedDomain}`- : undefined;-}--export function HomeVisualFaviconLogo({- domain,- label,- size = 14,- src,-}: {- domain?: string;- label?: string;- size?: number;- src?: string;-}) {- const faviconUrl = src ?? getHomeVisualLogoUrlFromDomainName(domain);- const [localFailedUrl, setLocalFailedUrl] = useState<string | null>(null);- const showFavicon =- faviconUrl !== undefined &&- !failedFaviconUrls.has(faviconUrl) &&- localFailedUrl !== faviconUrl;-- if (showFavicon) {- return (- <FaviconFrame $size={size}>- <FaviconImage- alt={label ? `${label} logo` : ''}- src={faviconUrl}- onError={() => {- failedFaviconUrls.add(faviconUrl);- setLocalFailedUrl(faviconUrl);- }}- />- </FaviconFrame>- );- }-- const initials = label ? getHomeVisualInitials(label) : '?';-- return (- <FaviconFallbackFrame $size={size}>- {initials.slice(0, 1)}- </FaviconFallbackFrame>- );-}--export function HomeVisualAvatar({- children,- size = 14,- square = false,- tone = 'gray',-}: {- children: ReactNode;- size?: number;- square?: boolean;- tone?: string;-}) {- const resolvedTone =- HOME_VISUAL_PERSON_TONES[tone] ?? HOME_VISUAL_PERSON_TONES.gray;-- return (- <AvatarFrame- $background={resolvedTone.background}- $color={resolvedTone.color}- $size={size}- $square={square}- >- {children}- </AvatarFrame>- );-}--export function HomeVisualPersonAvatar({- person,- size = 14,-}: {- person: HomeVisualPersonIdentity;- size?: number;-}) {- const [localFailedUrl, setLocalFailedUrl] = useState<string | null>(null);- const square =- person.kind === 'api' ||- person.kind === 'system' ||- person.kind === 'workflow';- const showAvatar =- person.avatarUrl !== undefined &&- !failedAvatarUrls.has(person.avatarUrl) &&- localFailedUrl !== person.avatarUrl;-- return (- <HomeVisualAvatar size={size} square={square} tone={person.tone}>- {showAvatar ? (- <AvatarImage- alt=""- src={person.avatarUrl}- onError={() => {- if (person.avatarUrl) {- failedAvatarUrls.add(person.avatarUrl);- setLocalFailedUrl(person.avatarUrl);- }- }}- />- ) : (- (person.shortLabel ?? getHomeVisualInitials(person.name))- )}- </HomeVisualAvatar>- );-}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/chip-props.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/chip-props.tsnew file mode 100644index 00000000000..daa2d3fe3a0--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/chip-props.ts@@ -0,0 +1,14 @@+import type { ReactNode } from 'react';++import type { ChipVariant } from './chip-variant';++export type ChipProps = {+ label: string;+ clickable?: boolean;+ isBold?: boolean;+ leftComponent?: ReactNode | null;+ className?: string;+ maxWidth?: number;+ onClick?: () => void;+ variant?: ChipVariant;+};diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/chip-variant.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/chip-variant.tsnew file mode 100644index 00000000000..39f8e01d665--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/chip-variant.ts@@ -0,0 +1,7 @@+export enum ChipVariant {+ Highlighted = 'highlighted',+ Regular = 'regular',+ Transparent = 'transparent',+ Rounded = 'rounded',+ Static = 'static',+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/get-home-visual-initials.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/get-home-visual-initials.tsnew file mode 100644index 00000000000..650b224d4a4--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/get-home-visual-initials.ts@@ -0,0 +1,9 @@+export function getHomeVisualInitials(value: string) {+ return value+ .split(' ')+ .filter(Boolean)+ .slice(0, 2)+ .map((part) => part[0])+ .join('')+ .toUpperCase();+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/get-sidebar-icon-tone-rgb.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/get-sidebar-icon-tone-rgb.tsnew file mode 100644index 00000000000..81da27f84a6--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/get-sidebar-icon-tone-rgb.ts@@ -0,0 +1,41 @@+import type { HeroSidebarIcon } from '@/sections/Hero/types';++const SIDEBAR_TONES: Record<string, { color: string }> = {+ amber: { color: '#35290F' },+ blue: { color: '#3A5CCC' },+ gray: { color: '#838383' },+ green: { color: '#153226' },+ orange: { color: '#ED5F00' },+ pink: { color: '#a51853' },+ purple: { color: '#4f46e5' },+ red: { color: '#DC3D43' },+ teal: { color: '#0E9888' },+ violet: { color: '#5b3fd1' },+};++const hexToRgbTuple = (hex: string): string => {+ const clean = hex.replace('#', '');+ const expanded =+ clean.length === 3+ ? clean+ .split('')+ .map((char) => char + char)+ .join('')+ : clean;+ const value = parseInt(expanded, 16);+ return `${(value >> 16) & 255}, ${(value >> 8) & 255}, ${value & 255}`;+};++const SIDEBAR_TONE_RGB: Record<string, string> = Object.fromEntries(+ Object.entries(SIDEBAR_TONES).map(([tone, palette]) => [+ tone,+ hexToRgbTuple(palette.color),+ ]),+);++export function getSidebarIconToneRgb(icon: HeroSidebarIcon): string {+ const iconTone =+ 'tone' in icon && typeof icon.tone === 'string' ? icon.tone : 'gray';++ return SIDEBAR_TONE_RGB[iconTone] ?? SIDEBAR_TONE_RGB.gray;+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/home-visual-theme.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/home-visual-theme.tssimilarity index 94%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/home-visual-theme.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/home-visual-theme.tsindex 5eaa9d85993..44b8a1254e1 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/home-visual-theme.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/home-visual-theme.ts@@ -1,4 +1,4 @@-import { VISUAL_TOKENS } from './homeVisualTokens';+import { VISUAL_TOKENS } from './home-visual-tokens';export const APP_FONT = VISUAL_TOKENS.font.family;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/homeVisualTokens.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/home-visual-tokens.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/homeVisualTokens.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/home-visual-tokens.tsdiff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/windowShadows.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/window-shadows.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/windowShadows.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shared/utils/window-shadows.tsdiff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualNavbar.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualNavbar.tsxindex 26b53304780..cdcca3550de 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualNavbar.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualNavbar.tsx@@ -23,14 +23,14 @@ import type {HeroNavbarActionType,HeroSidebarItem,} from '@/sections/Hero/types';-import { OBJECT_PINNED_ACTIONS } from '../Data/objectPinnedActions';-import { renderHomeVisualIcon } from '../Shared/home-visual-icon';+import { OBJECT_PINNED_ACTIONS } from '../Data/object-pinned-actions';+import { renderHomeVisualIcon } from '../Shared/components/HomeVisualIcon';import {APP_FONT,COLORS,NAVBAR_ACTION_TABLER_STROKE,-} from '../Shared/home-visual-theme';-import { VISUAL_TOKENS } from '../Shared/homeVisualTokens';+} from '../Shared/utils/home-visual-theme';+import { VISUAL_TOKENS } from '../Shared/utils/home-visual-tokens';const NAVBAR_ACTION_ICON_MAP: Record<string, typeof IconPlus> = {box: IconBox,@@ -335,7 +335,7 @@ function renderDefaultActions();}-export type HomeVisualNavbarProps = {+type HomeVisualNavbarProps = {activeItem?: HeroSidebarItem;activeLabel: string;navbarActions?: HeroNavbarActionType[];diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/home-visual-page-renderers.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualPageRenderers.tsxsimilarity index 80%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/home-visual-page-renderers.tsxrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualPageRenderers.tsxindex 1abfbcbe568..c18cd5b0379 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/home-visual-page-renderers.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualPageRenderers.tsx@@ -14,7 +14,7 @@ import type {} from '@/sections/Hero/types';import { KanbanPage } from '../Pages/Kanban/KanbanPage';import { TablePage } from '../Pages/Table/TablePage';-import { PagePreviewLoader } from '../Shared/PagePreviewLoader';+import { PagePreviewLoader } from '../Shared/components/PagePreviewLoader';const DashboardViewport = styled.div`flex: 1 1 auto;@@ -58,25 +58,6 @@ const WorkflowPage = dynamic(},);-let deferredPagePreloadPromise: Promise<void> | null = null;--export function preloadDeferredHomeVisualPages() {- deferredPagePreloadPromise ??= Promise.all([- loadSalesDashboardPageModule(),- loadWorkflowPageModule(),- ])- .then(() => undefined)- .catch((error: unknown) => {- deferredPagePreloadPromise = null;-- if (process.env.NODE_ENV !== 'production') {- console.error('Home visual deferred page preload failed:', error);- }- });-- return deferredPagePreloadPromise;-}-const PAGE_RENDERERS = {table: (page: HeroTablePageDefinition) => <TablePage page={page} />,kanban: (page: HeroKanbanPageDefinition) => <KanbanPage page={page} />,diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualSidebar.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualSidebar.tsxindex a107e4c9414..097df0ac394 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualSidebar.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualSidebar.tsx@@ -8,8 +8,8 @@ import type { HeroSidebarEntry, HeroSidebarItem } from '@/sections/Hero/types';import { HomeVisualSidebarControls } from './HomeVisualSidebarControls';import { HomeVisualSidebarHeader } from './HomeVisualSidebarHeader';import { HomeVisualSidebarItem } from './HomeVisualSidebarItem';-import { isFolder } from './home-visual-navigation';-import { APP_FONT, COLORS } from '../Shared/home-visual-theme';+import { isFolder } from './is-folder';+import { APP_FONT, COLORS } from '../Shared/utils/home-visual-theme';const SidebarPanel = styled.aside`background: transparent;@@ -63,7 +63,7 @@ const SidebarSectionLabel = styled.span<{ $workspace?: boolean }>`}`;-export type HomeVisualSidebarProps = {+type HomeVisualSidebarProps = {favoritesNav?: HeroSidebarItem[];highlightedItemId?: string;onSelectLabel: (label: string) => void;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualSidebarControls.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualSidebarControls.tsxindex 1a8e8b0c2ba..0f066623f3a 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualSidebarControls.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualSidebarControls.tsx@@ -8,7 +8,11 @@ import {IconMessageCirclePlus,} from '@tabler/icons-react';-import { APP_FONT, COLORS, TABLER_STROKE } from '../Shared/home-visual-theme';+import {+ APP_FONT,+ COLORS,+ TABLER_STROKE,+} from '../Shared/utils/home-visual-theme';const SidebarControls = styled.div`align-items: center;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualSidebarHeader.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualSidebarHeader.tsxindex e80b93e99f7..c4e8c66579f 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualSidebarHeader.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualSidebarHeader.tsx@@ -8,7 +8,11 @@ import {IconSearch,} from '@tabler/icons-react';-import { APP_FONT, COLORS, TABLER_STROKE } from '../Shared/home-visual-theme';+import {+ APP_FONT,+ COLORS,+ TABLER_STROKE,+} from '../Shared/utils/home-visual-theme';const APPLE_WORKSPACE_LOGO_SRC = '/images/home/hero/apple-rainbow-logo.svg';@@ -143,7 +147,7 @@ function CollapseSidebarMini({);}-export type HomeVisualSidebarHeaderProps = {+type HomeVisualSidebarHeaderProps = {workspaceName: string;};diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualSidebarItem.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualSidebarItem.tsxindex 6069408f294..95ab8291fa2 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualSidebarItem.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualSidebarItem.tsx@@ -5,12 +5,14 @@ import { styled } from '@linaria/react';import { IconChevronDown } from '@tabler/icons-react';import type { HeroSidebarItem } from '@/sections/Hero/types';+import { getSidebarIconToneRgb } from '../Shared/utils/get-sidebar-icon-tone-rgb';+import { renderHomeVisualIcon } from '../Shared/components/HomeVisualIcon';import {- getSidebarIconToneRgb,- renderHomeVisualIcon,-} from '../Shared/home-visual-icon';-import { APP_FONT, COLORS, TABLER_STROKE } from '../Shared/home-visual-theme';-import { VISUAL_TOKENS } from '../Shared/homeVisualTokens';+ APP_FONT,+ COLORS,+ TABLER_STROKE,+} from '../Shared/utils/home-visual-theme';+import { VISUAL_TOKENS } from '../Shared/utils/home-visual-tokens';const SidebarItemRow = styled.div<{$active?: boolean;@@ -258,7 +260,7 @@ function ChevronDownMini({);}-export type HomeVisualSidebarItemProps = {+type HomeVisualSidebarItemProps = {collapsible?: boolean;expanded?: boolean;depth?: number;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualViewbar.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualViewbar.tsxindex 54042c469c5..ff858fb242c 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualViewbar.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/HomeVisualViewbar.tsx@@ -9,7 +9,11 @@ import {} from '@tabler/icons-react';import type { HeroPageType } from '@/sections/Hero/types';-import { APP_FONT, COLORS, TABLER_STROKE } from '../Shared/home-visual-theme';+import {+ APP_FONT,+ COLORS,+ TABLER_STROKE,+} from '../Shared/utils/home-visual-theme';const ViewbarBar = styled.div`align-items: center;@@ -125,7 +129,7 @@ function KanbanMini({);}-export type HomeVisualViewbarProps = {+type HomeVisualViewbarProps = {actions: string[];count?: number;pageType: HeroPageType;diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/home-visual-navigation.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/find-active-item.tssimilarity index 61%rename from packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/home-visual-navigation.tsrename to packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/find-active-item.tsindex d19169c9a9f..58439e2f9c0 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/home-visual-navigation.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/find-active-item.ts@@ -1,16 +1,8 @@-import type {- HeroSidebarEntry,- HeroSidebarFolder,- HeroSidebarItem,-} from '@/sections/Hero/types';-import {- normalizeHeroPage,- type HeroPageDefaults,-} from '../Data/normalizeHeroPage';+import type { HeroSidebarEntry, HeroSidebarItem } from '@/sections/Hero/types';+import type { HeroPageDefaults } from '../Data/hero-page-defaults';+import { normalizeHeroPage } from '../Data/normalize-hero-page';-export function isFolder(entry: HeroSidebarEntry): entry is HeroSidebarFolder {- return 'items' in entry;-}+import { isFolder } from './is-folder';function hasRenderablePage(item: HeroSidebarItem,@@ -64,26 +56,3 @@ export function findActiveItem(return undefined;}--export function findContainingFolderId(- entries: HeroSidebarEntry[],- label: string,-): string | undefined {- for (const entry of entries) {- if (!isFolder(entry)) {- continue;- }-- if (- entry.items.some(- (item) =>- item.label === label ||- item.children?.some((child) => child.label === label) === true,- )- ) {- return entry.id;- }- }-- return undefined;-}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/find-containing-folder-id.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/find-containing-folder-id.tsnew file mode 100644index 00000000000..bd548ec9a18--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/find-containing-folder-id.ts@@ -0,0 +1,26 @@+import type { HeroSidebarEntry } from '@/sections/Hero/types';++import { isFolder } from './is-folder';++export function findContainingFolderId(+ entries: HeroSidebarEntry[],+ label: string,+): string | undefined {+ for (const entry of entries) {+ if (!isFolder(entry)) {+ continue;+ }++ if (+ entry.items.some(+ (item) =>+ item.label === label ||+ item.children?.some((child) => child.label === label) === true,+ )+ ) {+ return entry.id;+ }+ }++ return undefined;+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/is-folder.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/is-folder.tsnew file mode 100644index 00000000000..625e4ec9ca6--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/is-folder.ts@@ -0,0 +1,8 @@+import type {+ HeroSidebarEntry,+ HeroSidebarFolder,+} from '@/sections/Hero/types';++export function isFolder(entry: HeroSidebarEntry): entry is HeroSidebarFolder {+ return 'items' in entry;+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/preload-deferred-home-visual-pages.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/preload-deferred-home-visual-pages.tsnew file mode 100644index 00000000000..be7cfd8a748--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/preload-deferred-home-visual-pages.ts@@ -0,0 +1,23 @@+const loadSalesDashboardPageModule = () =>+ import('../Pages/Dashboard/SalesDashboardPage');++const loadWorkflowPageModule = () => import('../Pages/Workflow/WorkflowPage');++let deferredPagePreloadPromise: Promise<void> | null = null;++export function preloadDeferredHomeVisualPages() {+ deferredPagePreloadPromise ??= Promise.all([+ loadSalesDashboardPageModule(),+ loadWorkflowPageModule(),+ ])+ .then(() => undefined)+ .catch((error: unknown) => {+ deferredPagePreloadPromise = null;++ if (process.env.NODE_ENV !== 'production') {+ console.error('Home visual deferred page preload failed:', error);+ }+ });++ return deferredPagePreloadPromise;+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/use-home-visual-state.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/use-home-visual-state.tsindex f816e0991ac..08e63f59d36 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/use-home-visual-state.ts+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/Shell/use-home-visual-state.ts@@ -2,17 +2,15 @@ import { useTimeoutRegistry } from '@/lib/react';import { useCallback, useEffect, useMemo, useState } from 'react';import type { HeroSidebarEntry, HeroVisualType } from '@/sections/Hero/types';-import { normalizeHeroPage } from '../Data/normalizeHeroPage';-import {- findActiveItem,- findContainingFolderId,- isFolder,-} from './home-visual-navigation';+import { normalizeHeroPage } from '../Data/normalize-hero-page';+import { findActiveItem } from './find-active-item';+import { findContainingFolderId } from './find-containing-folder-id';+import { isFolder } from './is-folder';import {COMPANIES_ITEM_ID,COMPANIES_ITEM_LABEL,CRM_OBJECT_SEQUENCE,-} from '../Data/rocketObject';+} from '../Data/rocket-object';const DEFAULT_TABLE_WIDTH = 1700;const COMPLETED_CREATED_OBJECT_IDS = CRM_OBJECT_SEQUENCE.map(({ id }) => id);diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/WindowOrder/WindowOrderProvider.tsx b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/WindowOrder/WindowOrderProvider.tsxindex 90b023ab9d6..c5e7fd02fd6 100644--- a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/WindowOrder/WindowOrderProvider.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/WindowOrder/WindowOrderProvider.tsx@@ -1,14 +1,6 @@'use client';-import {- createContext,- useCallback,- useContext,- useEffect,- useMemo,- useState,- type ReactNode,-} from 'react';+import { createContext, useMemo, useState, type ReactNode } from 'react';type WindowOrderApi = {register: (id: string) => void;@@ -16,8 +8,8 @@ type WindowOrderApi = {activate: (id: string) => void;};-const WindowOrderApiContext = createContext<WindowOrderApi | null>(null);-const WindowOrderStackContext = createContext<ReadonlyArray<string>>([]);+export const WindowOrderApiContext = createContext<WindowOrderApi | null>(null);+export const WindowOrderStackContext = createContext<ReadonlyArray<string>>([]);export const WindowOrderProvider = ({ children }: { children: ReactNode }) => {const [stack, setStack] = useState<string[]>([]);@@ -49,29 +41,3 @@ export const WindowOrderProvider = ({ children }: { children: ReactNode }) => {</WindowOrderApiContext.Provider>);};--export const useWindowOrder = (id: string) => {- const api = useContext(WindowOrderApiContext);- const stack = useContext(WindowOrderStackContext);-- useEffect(() => {- if (!api) {- return undefined;- }- api.register(id);- return () => {- api.unregister(id);- };- }, [api, id]);-- const zIndex = useMemo(() => {- const index = stack.indexOf(id);- return index === -1 ? 1 : index + 2;- }, [stack, id]);-- const activate = useCallback(() => {- api?.activate(id);- }, [api, id]);-- return { activate, zIndex };-};diff --git a/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/WindowOrder/use-window-order.ts b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/WindowOrder/use-window-order.tsnew file mode 100644index 00000000000..452acadb026--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/HomeVisual/WindowOrder/use-window-order.ts@@ -0,0 +1,34 @@+'use client';++import { useCallback, useContext, useEffect, useMemo } from 'react';++import {+ WindowOrderApiContext,+ WindowOrderStackContext,+} from './WindowOrderProvider';++export const useWindowOrder = (id: string) => {+ const api = useContext(WindowOrderApiContext);+ const stack = useContext(WindowOrderStackContext);++ useEffect(() => {+ if (!api) {+ return undefined;+ }+ api.register(id);+ return () => {+ api.unregister(id);+ };+ }, [api, id]);++ const zIndex = useMemo(() => {+ const index = stack.indexOf(id);+ return index === -1 ? 1 : index + 2;+ }, [stack, id]);++ const activate = useCallback(() => {+ api?.activate(id);+ }, [api, id]);++ return { activate, zIndex };+};diff --git a/packages/twenty-website-new/src/sections/Hero/components/PartnerVisual/PartnerHalftoneOverlay.tsx b/packages/twenty-website-new/src/sections/Hero/components/PartnerVisual/PartnerHalftoneOverlay.tsxindex 07deb15b759..b9dc02ca439 100644--- a/packages/twenty-website-new/src/sections/Hero/components/PartnerVisual/PartnerHalftoneOverlay.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/PartnerVisual/PartnerHalftoneOverlay.tsx@@ -1,240 +1,8 @@'use client';import { styled } from '@linaria/react';-import { useEffect, useRef } from 'react';-import * as THREE from 'three';--import { getPrefersReducedMotionSnapshot } from '@/lib/motion';-import { observeElementSize } from '@/lib/dom/observe-element-size';-import {- createVisualRenderLoop,- loadVisualImage,- tryCreateSiteWebGlRenderer,- type VisualRenderLoop,-} from '@/lib/visual-runtime';--const PREVIEW_DISTANCE = 3.2;-const SOURCE_PREVIEW_DISTANCE = 6.1;-const REFERENCE_PREVIEW_DISTANCE = 4;-const VIRTUAL_RENDER_HEIGHT = 768;--const HALFTONE_TILE_SIZE = 10;-const HALFTONE_POWER = -0.1;-const HALFTONE_WIDTH = 0.45;-const HALFTONE_CONTRAST = 1;-const HALFTONE_DASH_COLOR = '#959595';-const HALFTONE_HOVER_COLOR = '#4A38F5';-const HALFTONE_HOVER_RADIUS = 0.6;-const HALFTONE_HOVER_POWER_SHIFT = 0.9;-const HALFTONE_HOVER_WIDTH_SHIFT = -0.2;-const HALFTONE_HOVER_LIGHT_INTENSITY = 0;-const HALFTONE_HOVER_LIGHT_RADIUS = 0.2;-const HALFTONE_HOVER_FADE_IN = 18;-const HALFTONE_HOVER_FADE_OUT = 7;--const IMAGE_POINTER_FOLLOW = 0.38;-const IMAGE_POINTER_VELOCITY_DAMPING = 0.82;-const MIN_FOOTPRINT_SCALE = 0.001;--const passThroughVertexShader = `- varying vec2 vUv;-- void main() {- vUv = uv;- gl_Position = vec4(position, 1.0);- }-`;--const imagePassthroughFragmentShader = `- precision highp float;-- uniform sampler2D tImage;- uniform vec2 imageSize;- uniform vec2 viewportSize;- uniform float zoom;- uniform float contrast;-- varying vec2 vUv;-- void main() {- float imageAspect = imageSize.x / imageSize.y;- float viewAspect = viewportSize.x / viewportSize.y;-- vec2 uv = vUv;-- if (imageAspect > viewAspect) {- float scale = viewAspect / imageAspect;- uv.y = (uv.y - 0.5) / scale + 0.5;- } else {- float scale = imageAspect / viewAspect;- uv.x = (uv.x - 0.5) / scale + 0.5;- }-- uv = (uv - 0.5) / zoom + 0.5;-- float inBounds = step(0.0, uv.x) * step(uv.x, 1.0)- * step(0.0, uv.y) * step(uv.y, 1.0);-- vec4 color = texture2D(tImage, clamp(uv, 0.0, 1.0));- vec3 contrastColor = clamp((color.rgb - 0.5) * contrast + 0.5, 0.0, 1.0);-- gl_FragColor = vec4(contrastColor, inBounds);- }-`;--const halftoneFragmentShader = `- precision highp float;-- uniform sampler2D tScene;- uniform vec2 effectResolution;- uniform vec2 logicalResolution;- uniform float tile;- uniform float s_3;- uniform float s_4;- uniform vec3 dashColor;- uniform vec3 hoverDashColor;- uniform float time;- uniform float waveAmount;- uniform float waveSpeed;- uniform float footprintScale;- uniform vec2 interactionUv;- uniform vec2 interactionVelocity;- uniform vec2 dragOffset;- uniform float hoverHalftoneActive;- uniform float hoverHalftonePowerShift;- uniform float hoverHalftoneRadius;- uniform float hoverHalftoneWidthShift;- uniform float hoverLightStrength;- uniform float hoverLightRadius;- uniform float hoverFlowStrength;- uniform float hoverFlowRadius;- uniform float dragFlowStrength;- uniform float cropToBounds;-- varying vec2 vUv;-- float distSegment(in vec2 p, in vec2 a, in vec2 b) {- vec2 pa = p - a;- vec2 ba = b - a;- float denom = max(dot(ba, ba), 0.000001);- float h = clamp(dot(pa, ba) / denom, 0.0, 1.0);- return length(pa - ba * h);- }-- float lineSimpleEt(in vec2 p, in float r, in float thickness) {- vec2 a = vec2(0.5) + vec2(-r, 0.0);- vec2 b = vec2(0.5) + vec2(r, 0.0);- float distToSegment = distSegment(p, a, b);- float halfThickness = thickness * r;- return distToSegment - halfThickness;- }-- void main() {- if (cropToBounds > 0.5) {- vec4 boundsCheck = texture2D(tScene, vUv);- if (boundsCheck.a < 0.01) {- gl_FragColor = vec4(0.0);- return;- }- }-- vec2 fragCoord =- (gl_FragCoord.xy / max(effectResolution, vec2(1.0))) * logicalResolution;- float halftoneSize = max(tile * max(footprintScale, 0.001), 1.0);- vec2 pointerPx = interactionUv * logicalResolution;- vec2 fragDelta = fragCoord - pointerPx;- float fragDist = length(fragDelta);- vec2 radialDir = fragDist > 0.001 ? fragDelta / fragDist : vec2(0.0, 1.0);- float velocityMagnitude = length(interactionVelocity);- vec2 motionDir = velocityMagnitude > 0.001- ? interactionVelocity / velocityMagnitude- : vec2(0.0, 0.0);- float motionBias = velocityMagnitude > 0.001- ? dot(-radialDir, motionDir) * 0.5 + 0.5- : 0.5;-- float hoverLightMask = 0.0;- if (hoverLightStrength > 0.0) {- float lightRadiusPx = hoverLightRadius * logicalResolution.y;- hoverLightMask = smoothstep(lightRadiusPx, 0.0, fragDist);- }-- float hoverHalftoneMask = 0.0;- if (hoverHalftoneActive > 0.0) {- float hoverHalftoneRadiusPx = hoverHalftoneRadius * logicalResolution.y;- hoverHalftoneMask =- smoothstep(hoverHalftoneRadiusPx, 0.0, fragDist) *- clamp(hoverHalftoneActive, 0.0, 1.0);- }-- float hoverFlowMask = 0.0;- if (hoverFlowStrength > 0.0) {- float hoverRadiusPx = hoverFlowRadius * logicalResolution.y;- hoverFlowMask = smoothstep(hoverRadiusPx, 0.0, fragDist);- }-- vec2 hoverDisplacement =- radialDir * hoverFlowStrength * hoverFlowMask * halftoneSize * 0.55 +- motionDir * hoverFlowStrength * hoverFlowMask * (0.4 + motionBias) * halftoneSize * 1.15;- vec2 travelDisplacement = dragOffset * dragFlowStrength * 0.45;- vec2 effectCoord = fragCoord + hoverDisplacement + travelDisplacement;-- float bandRow = floor(effectCoord.y / halftoneSize);- float waveOffset =- waveAmount * sin(time * waveSpeed + bandRow * 0.5) * halftoneSize;- effectCoord.x += waveOffset;-- vec2 cellIndex = floor(effectCoord / halftoneSize);- vec2 sampleUv = clamp(- (cellIndex + 0.5) * halftoneSize / logicalResolution,- vec2(0.0),- vec2(1.0)- );- vec2 cellUv = fract(effectCoord / halftoneSize);-- vec4 sceneSample = texture2D(tScene, sampleUv);- float mask = smoothstep(0.02, 0.08, sceneSample.a);- float localPower = clamp(- s_3 + hoverHalftonePowerShift * hoverHalftoneMask,- -1.5,- 1.5- );- float localWidth = clamp(- s_4 + hoverHalftoneWidthShift * hoverHalftoneMask,- 0.05,- 1.4- );- float lightLift =- hoverLightStrength * hoverLightMask * mix(0.78, 1.18, motionBias) * 0.22;- float bandRadius = clamp(- (- (- sceneSample.r +- sceneSample.g +- sceneSample.b +- localPower * length(vec2(0.5))- ) *- (1.0 / 3.0)- ) + lightLift,- 0.0,- 1.0- ) * 1.86 * 0.5;-- float alpha = 0.0;- if (bandRadius > 0.0001) {- float signedDistance = lineSimpleEt(cellUv, bandRadius, localWidth);- float edge = 0.02;- alpha = (1.0 - smoothstep(0.0, edge, signedDistance)) * mask;- }-- vec3 activeDashColor = mix(dashColor, hoverDashColor, hoverHalftoneMask);- vec3 color = activeDashColor * alpha;- gl_FragColor = vec4(color, alpha);-- #include <tonemapping_fragment>- #include <colorspace_fragment>- }-`;+import { useRef } from 'react';+import { usePartnerHalftoneOverlay } from './use-partner-halftone-overlay';const OverlayMount = styled.div`inset: 0;@@ -242,511 +10,6 @@ const OverlayMount = styled.div`z-index: 1;`;-type PointerState = {- hoverStrength: number;- mouseX: number;- mouseY: number;- pointerInside: boolean;- pointerVelocityX: number;- pointerVelocityY: number;- smoothedMouseX: number;- smoothedMouseY: number;-};--function clampRectToViewport(- rect: { height: number; width: number; x: number; y: number },- viewportWidth: number,- viewportHeight: number,-) {- const minX = Math.max(rect.x, 0);- const minY = Math.max(rect.y, 0);- const maxX = Math.min(rect.x + rect.width, viewportWidth);- const maxY = Math.min(rect.y + rect.height, viewportHeight);-- if (maxX <= minX || maxY <= minY) {- return null;- }-- return {- height: maxY - minY,- width: maxX - minX,- x: minX,- y: minY,- };-}--function getRectArea(rect: { height: number; width: number } | null) {- if (!rect) {- return 0;- }-- return Math.max(rect.width, 0) * Math.max(rect.height, 0);-}--function getImagePreviewZoom(previewDistance: number) {- return REFERENCE_PREVIEW_DISTANCE / Math.max(previewDistance, 0.001);-}--function getContainedImageRect({- imageHeight,- imageWidth,- viewportHeight,- viewportWidth,- zoom,-}: {- imageHeight: number;- imageWidth: number;- viewportHeight: number;- viewportWidth: number;- zoom: number;-}) {- if (- imageWidth <= 0 ||- imageHeight <= 0 ||- viewportWidth <= 0 ||- viewportHeight <= 0- ) {- return null;- }-- const imageAspect = imageWidth / imageHeight;- const viewAspect = viewportWidth / viewportHeight;-- let fittedWidth = viewportWidth;- let fittedHeight = viewportHeight;-- if (imageAspect > viewAspect) {- fittedHeight = viewportWidth / imageAspect;- } else {- fittedWidth = viewportHeight * imageAspect;- }-- const scaledWidth = fittedWidth * zoom;- const scaledHeight = fittedHeight * zoom;-- return clampRectToViewport(- {- height: scaledHeight,- width: scaledWidth,- x: (viewportWidth - scaledWidth) * 0.5,- y: (viewportHeight - scaledHeight) * 0.5,- },- viewportWidth,- viewportHeight,- );-}--function getFootprintScaleFromRects(- currentRect: { height: number; width: number } | null,- referenceRect: { height: number; width: number } | null,-) {- const currentArea = getRectArea(currentRect);- const referenceArea = getRectArea(referenceRect);-- if (currentArea <= 0 || referenceArea <= 0) {- return 1;- }-- return Math.max(Math.sqrt(currentArea / referenceArea), MIN_FOOTPRINT_SCALE);-}--function getImageFootprintScale({- imageHeight,- imageWidth,- previewDistance,- viewportHeight,- viewportWidth,-}: {- imageHeight: number;- imageWidth: number;- previewDistance: number;- viewportHeight: number;- viewportWidth: number;-}) {- const currentRect = getContainedImageRect({- imageHeight,- imageWidth,- viewportHeight,- viewportWidth,- zoom: getImagePreviewZoom(previewDistance),- });- const referenceRect = getContainedImageRect({- imageHeight,- imageWidth,- viewportHeight,- viewportWidth,- zoom: 1,- });-- return getFootprintScaleFromRects(currentRect, referenceRect);-}--function getRelativeImageScale({- imageHeight,- imageWidth,- previewDistance,- referencePreviewDistance,- viewportHeight,- viewportWidth,-}: {- imageHeight: number;- imageWidth: number;- previewDistance: number;- referencePreviewDistance: number;- viewportHeight: number;- viewportWidth: number;-}) {- const currentRect = getContainedImageRect({- imageHeight,- imageWidth,- viewportHeight,- viewportWidth,- zoom: getImagePreviewZoom(previewDistance),- });- const referenceRect = getContainedImageRect({- imageHeight,- imageWidth,- viewportHeight,- viewportWidth,- zoom: getImagePreviewZoom(referencePreviewDistance),- });-- return getFootprintScaleFromRects(currentRect, referenceRect);-}--function createRenderTarget(width: number, height: number) {- return new THREE.WebGLRenderTarget(width, height, {- format: THREE.RGBAFormat,- magFilter: THREE.LinearFilter,- minFilter: THREE.LinearFilter,- });-}--async function mountHalftoneOverlay({- container,- imageUrl,-}: {- container: HTMLDivElement;- imageUrl: string;-}): Promise<() => void> {- const image = await loadVisualImage(imageUrl, {- label: 'partner hero image',- });-- const getWidth = () => Math.max(container.clientWidth, 1);- const getHeight = () => Math.max(container.clientHeight, 1);- const getVirtualHeight = () => Math.max(VIRTUAL_RENDER_HEIGHT, getHeight());- const getVirtualWidth = () =>- Math.max(- Math.round(getVirtualHeight() * (getWidth() / Math.max(getHeight(), 1))),- 1,- );-- let renderLoop: VisualRenderLoop | null = null;- const renderer = tryCreateSiteWebGlRenderer({- alpha: true,- antialias: false,- onContextLost: () => {- renderLoop?.stop();- },- powerPreference: 'high-performance',- });-- if (renderer === null) {- return () => {};- }-- renderer.outputColorSpace = THREE.SRGBColorSpace;- renderer.setPixelRatio(1);- renderer.setClearColor(0x000000, 0);- renderer.setSize(getVirtualWidth(), getVirtualHeight(), false);-- const canvas = renderer.domElement;- canvas.setAttribute('aria-hidden', 'true');- canvas.style.cursor = 'crosshair';- canvas.style.display = 'block';- canvas.style.height = '100%';- canvas.style.width = '100%';- container.appendChild(canvas);-- const imageTexture = new THREE.Texture(image);- imageTexture.colorSpace = THREE.SRGBColorSpace;- imageTexture.generateMipmaps = false;- imageTexture.magFilter = THREE.LinearFilter;- imageTexture.minFilter = THREE.LinearFilter;- imageTexture.needsUpdate = true;-- const sceneTarget = createRenderTarget(getVirtualWidth(), getVirtualHeight());- const fullScreenGeometry = new THREE.PlaneGeometry(2, 2);- const orthographicCamera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);-- const imageMaterial = new THREE.ShaderMaterial({- fragmentShader: imagePassthroughFragmentShader,- uniforms: {- contrast: { value: HALFTONE_CONTRAST },- imageSize: { value: new THREE.Vector2(image.width, image.height) },- tImage: { value: imageTexture },- viewportSize: {- value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),- },- zoom: { value: getImagePreviewZoom(PREVIEW_DISTANCE) },- },- vertexShader: passThroughVertexShader,- });-- const imageScene = new THREE.Scene();- imageScene.add(new THREE.Mesh(fullScreenGeometry, imageMaterial));-- const halftoneMaterial = new THREE.ShaderMaterial({- fragmentShader: halftoneFragmentShader,- transparent: true,- uniforms: {- cropToBounds: { value: 1 },- dashColor: { value: new THREE.Color(HALFTONE_DASH_COLOR) },- dragFlowStrength: { value: 0 },- dragOffset: { value: new THREE.Vector2(0, 0) },- effectResolution: {- value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),- },- footprintScale: { value: 1 },- hoverDashColor: { value: new THREE.Color(HALFTONE_HOVER_COLOR) },- hoverFlowRadius: { value: 0.18 },- hoverFlowStrength: { value: 0 },- hoverHalftoneActive: { value: 0 },- hoverHalftonePowerShift: { value: 0 },- hoverHalftoneRadius: { value: HALFTONE_HOVER_RADIUS },- hoverHalftoneWidthShift: { value: 0 },- hoverLightRadius: { value: HALFTONE_HOVER_LIGHT_RADIUS },- hoverLightStrength: { value: 0 },- interactionUv: { value: new THREE.Vector2(0.5, 0.5) },- interactionVelocity: { value: new THREE.Vector2(0, 0) },- logicalResolution: {- value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),- },- s_3: { value: HALFTONE_POWER },- s_4: { value: HALFTONE_WIDTH },- tScene: { value: sceneTarget.texture },- tile: { value: HALFTONE_TILE_SIZE },- time: { value: 0 },- waveAmount: { value: 0 },- waveSpeed: { value: 1 },- },- vertexShader: passThroughVertexShader,- });-- const postScene = new THREE.Scene();- postScene.add(new THREE.Mesh(fullScreenGeometry, halftoneMaterial));-- const updateViewportUniforms = ({- effectHeight,- effectWidth,- logicalHeight,- logicalWidth,- }: {- effectHeight: number;- effectWidth: number;- logicalHeight: number;- logicalWidth: number;- }) => {- halftoneMaterial.uniforms.effectResolution.value.set(- effectWidth,- effectHeight,- );- halftoneMaterial.uniforms.logicalResolution.value.set(- logicalWidth,- logicalHeight,- );- imageMaterial.uniforms.viewportSize.value.set(logicalWidth, logicalHeight);- };-- const getHalftoneScale = () =>- getImageFootprintScale({- imageHeight: image.height,- imageWidth: image.width,- previewDistance: PREVIEW_DISTANCE,- viewportHeight: getVirtualHeight(),- viewportWidth: getVirtualWidth(),- });-- const getHoverScale = () =>- getRelativeImageScale({- imageHeight: image.height,- imageWidth: image.width,- previewDistance: PREVIEW_DISTANCE,- referencePreviewDistance: SOURCE_PREVIEW_DISTANCE,- viewportHeight: getVirtualHeight(),- viewportWidth: getVirtualWidth(),- });-- const pointer: PointerState = {- hoverStrength: 0,- mouseX: 0.5,- mouseY: 0.5,- pointerInside: false,- pointerVelocityX: 0,- pointerVelocityY: 0,- smoothedMouseX: 0.5,- smoothedMouseY: 0.5,- };-- const syncSize = () => {- const virtualWidth = getVirtualWidth();- const virtualHeight = getVirtualHeight();-- renderer.setSize(virtualWidth, virtualHeight, false);- sceneTarget.setSize(virtualWidth, virtualHeight);- updateViewportUniforms({- effectHeight: virtualHeight,- effectWidth: virtualWidth,- logicalHeight: virtualHeight,- logicalWidth: virtualWidth,- });- };-- const stopObservingSize = observeElementSize(container, syncSize);-- const updatePointerPosition = (- event: PointerEvent,- options?: { resetVelocity?: boolean },- ) => {- const rect = canvas.getBoundingClientRect();- const width = Math.max(rect.width, 1);- const height = Math.max(rect.height, 1);-- const nextMouseX = THREE.MathUtils.clamp(- (event.clientX - rect.left) / width,- 0,- 1,- );- const nextMouseY = THREE.MathUtils.clamp(- (event.clientY - rect.top) / height,- 0,- 1,- );-- const deltaX = nextMouseX - pointer.mouseX;- const deltaY = nextMouseY - pointer.mouseY;-- pointer.mouseX = nextMouseX;- pointer.mouseY = nextMouseY;- pointer.pointerInside =- event.clientX >= rect.left &&- event.clientX <= rect.right &&- event.clientY >= rect.top &&- event.clientY <= rect.bottom;-- if (options?.resetVelocity) {- pointer.pointerVelocityX = 0;- pointer.pointerVelocityY = 0;- pointer.smoothedMouseX = nextMouseX;- pointer.smoothedMouseY = nextMouseY;- return;- }-- pointer.pointerVelocityX = deltaX;- pointer.pointerVelocityY = deltaY;- };-- const handlePointerMove = (event: PointerEvent) => {- const resetVelocity = !pointer.pointerInside;- updatePointerPosition(- event,- resetVelocity ? { resetVelocity: true } : undefined,- );- };-- const handlePointerLeave = () => {- pointer.pointerInside = false;- pointer.pointerVelocityX = 0;- pointer.pointerVelocityY = 0;- };-- canvas.addEventListener('pointermove', handlePointerMove);- canvas.addEventListener('pointerleave', handlePointerLeave);-- let previousTimestamp = 0;-- const renderFrame = (timestamp: number) => {- halftoneMaterial.uniforms.time.value = timestamp / 1000;- const hoverScale = getHoverScale();- const deltaSeconds =- previousTimestamp === 0- ? 1 / 60- : Math.min((timestamp - previousTimestamp) / 1000, 0.1);- previousTimestamp = timestamp;- const hoverEasing =- 1 -- Math.exp(- -deltaSeconds *- (pointer.pointerInside- ? HALFTONE_HOVER_FADE_IN- : HALFTONE_HOVER_FADE_OUT),- );- pointer.hoverStrength +=- ((pointer.pointerInside ? 1 : 0) - pointer.hoverStrength) * hoverEasing;-- pointer.smoothedMouseX +=- (pointer.mouseX - pointer.smoothedMouseX) * IMAGE_POINTER_FOLLOW;- pointer.smoothedMouseY +=- (pointer.mouseY - pointer.smoothedMouseY) * IMAGE_POINTER_FOLLOW;- pointer.pointerVelocityX *= IMAGE_POINTER_VELOCITY_DAMPING;- pointer.pointerVelocityY *= IMAGE_POINTER_VELOCITY_DAMPING;-- halftoneMaterial.uniforms.interactionUv.value.set(- pointer.smoothedMouseX,- 1 - pointer.smoothedMouseY,- );- halftoneMaterial.uniforms.interactionVelocity.value.set(- pointer.pointerVelocityX * getVirtualWidth(),- -pointer.pointerVelocityY * getVirtualHeight(),- );- halftoneMaterial.uniforms.hoverHalftoneActive.value = pointer.hoverStrength;- halftoneMaterial.uniforms.hoverHalftonePowerShift.value =- HALFTONE_HOVER_POWER_SHIFT;- halftoneMaterial.uniforms.hoverHalftoneRadius.value =- HALFTONE_HOVER_RADIUS * hoverScale;- halftoneMaterial.uniforms.hoverHalftoneWidthShift.value =- HALFTONE_HOVER_WIDTH_SHIFT;- halftoneMaterial.uniforms.hoverLightStrength.value =- HALFTONE_HOVER_LIGHT_INTENSITY * pointer.hoverStrength;- halftoneMaterial.uniforms.hoverLightRadius.value =- HALFTONE_HOVER_LIGHT_RADIUS * hoverScale;- halftoneMaterial.uniforms.footprintScale.value = getHalftoneScale();- imageMaterial.uniforms.zoom.value = getImagePreviewZoom(PREVIEW_DISTANCE);-- renderer.setRenderTarget(sceneTarget);- renderer.render(imageScene, orthographicCamera);-- renderer.setRenderTarget(null);- renderer.clear();- renderer.render(postScene, orthographicCamera);- };-- renderLoop = createVisualRenderLoop({- renderFrame,- target: container,- targetVisibilityOptions: { rootMargin: '100px' },- });- renderLoop.start();-- return () => {- renderLoop?.dispose();- stopObservingSize();- canvas.removeEventListener('pointermove', handlePointerMove);- canvas.removeEventListener('pointerleave', handlePointerLeave);- halftoneMaterial.dispose();- imageMaterial.dispose();- imageTexture.dispose();- fullScreenGeometry.dispose();- sceneTarget.dispose();- renderer.dispose();-- if (canvas.parentNode === container) {- container.removeChild(canvas);- }- };-}-type PartnerHalftoneOverlayProps = {imageUrl: string;};@@ -756,37 +19,7 @@ export function PartnerHalftoneOverlay({}: PartnerHalftoneOverlayProps) {const mountRef = useRef<HTMLDivElement>(null);- useEffect(() => {- if (getPrefersReducedMotionSnapshot()) {- return;- }-- const container = mountRef.current;-- if (!container) {- return;- }-- let disposed = false;- const disposePromise = mountHalftoneOverlay({ container, imageUrl }).catch(- (error) => {- console.error(error);- return undefined;- },- );-- return () => {- disposed = true;-- void disposePromise.then((dispose) => {- if (!disposed) {- return;- }-- dispose?.();- });- };- }, [imageUrl]);+ usePartnerHalftoneOverlay({ imageUrl, mountRef });return <OverlayMount ref={mountRef} />;}diff --git a/packages/twenty-website-new/src/sections/Hero/components/PartnerVisual/PartnerVisual.tsx b/packages/twenty-website-new/src/sections/Hero/components/PartnerVisual/PartnerVisual.tsxindex 216e1ed6ce6..8f78085b523 100644--- a/packages/twenty-website-new/src/sections/Hero/components/PartnerVisual/PartnerVisual.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/PartnerVisual/PartnerVisual.tsx@@ -1,5 +1,5 @@import { WebGlMount } from '@/lib/visual-runtime';-import { PartnerHeroHalftoneIllustration } from '@/sections/Hero/visuals/PartnerHeroHalftoneIllustration';+import { PartnerHeroHalftoneIllustration } from '@/sections/Hero/visuals/components/PartnerHeroHalftoneIllustration';import { theme } from '@/theme';import { styled } from '@linaria/react';diff --git a/packages/twenty-website-new/src/sections/Hero/components/PartnerVisual/use-partner-halftone-overlay.ts b/packages/twenty-website-new/src/sections/Hero/components/PartnerVisual/use-partner-halftone-overlay.tsnew file mode 100644index 00000000000..2d2fb0a535c--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/components/PartnerVisual/use-partner-halftone-overlay.ts@@ -0,0 +1,781 @@+'use client';++import { useEffect, type RefObject } from 'react';+import * as THREE from 'three';++import { getPrefersReducedMotionSnapshot } from '@/lib/motion';+import { observeElementSize } from '@/lib/dom/observe-element-size';+import {+ createVisualRenderLoop,+ loadVisualImage,+ tryCreateSiteWebGlRenderer,+ type VisualRenderLoop,+} from '@/lib/visual-runtime';++const PREVIEW_DISTANCE = 3.2;+const SOURCE_PREVIEW_DISTANCE = 6.1;+const REFERENCE_PREVIEW_DISTANCE = 4;+const VIRTUAL_RENDER_HEIGHT = 768;++const HALFTONE_TILE_SIZE = 10;+const HALFTONE_POWER = -0.1;+const HALFTONE_WIDTH = 0.45;+const HALFTONE_CONTRAST = 1;+const HALFTONE_DASH_COLOR = '#959595';+const HALFTONE_HOVER_COLOR = '#4A38F5';+const HALFTONE_HOVER_RADIUS = 0.6;+const HALFTONE_HOVER_POWER_SHIFT = 0.9;+const HALFTONE_HOVER_WIDTH_SHIFT = -0.2;+const HALFTONE_HOVER_LIGHT_INTENSITY = 0;+const HALFTONE_HOVER_LIGHT_RADIUS = 0.2;+const HALFTONE_HOVER_FADE_IN = 18;+const HALFTONE_HOVER_FADE_OUT = 7;++const IMAGE_POINTER_FOLLOW = 0.38;+const IMAGE_POINTER_VELOCITY_DAMPING = 0.82;+const MIN_FOOTPRINT_SCALE = 0.001;++const passThroughVertexShader = `+ varying vec2 vUv;++ void main() {+ vUv = uv;+ gl_Position = vec4(position, 1.0);+ }+`;++const imagePassthroughFragmentShader = `+ precision highp float;++ uniform sampler2D tImage;+ uniform vec2 imageSize;+ uniform vec2 viewportSize;+ uniform float zoom;+ uniform float contrast;++ varying vec2 vUv;++ void main() {+ float imageAspect = imageSize.x / imageSize.y;+ float viewAspect = viewportSize.x / viewportSize.y;++ vec2 uv = vUv;++ if (imageAspect > viewAspect) {+ float scale = viewAspect / imageAspect;+ uv.y = (uv.y - 0.5) / scale + 0.5;+ } else {+ float scale = imageAspect / viewAspect;+ uv.x = (uv.x - 0.5) / scale + 0.5;+ }++ uv = (uv - 0.5) / zoom + 0.5;++ float inBounds = step(0.0, uv.x) * step(uv.x, 1.0)+ * step(0.0, uv.y) * step(uv.y, 1.0);++ vec4 color = texture2D(tImage, clamp(uv, 0.0, 1.0));+ vec3 contrastColor = clamp((color.rgb - 0.5) * contrast + 0.5, 0.0, 1.0);++ gl_FragColor = vec4(contrastColor, inBounds);+ }+`;++const halftoneFragmentShader = `+ precision highp float;++ uniform sampler2D tScene;+ uniform vec2 effectResolution;+ uniform vec2 logicalResolution;+ uniform float tile;+ uniform float s_3;+ uniform float s_4;+ uniform vec3 dashColor;+ uniform vec3 hoverDashColor;+ uniform float time;+ uniform float waveAmount;+ uniform float waveSpeed;+ uniform float footprintScale;+ uniform vec2 interactionUv;+ uniform vec2 interactionVelocity;+ uniform vec2 dragOffset;+ uniform float hoverHalftoneActive;+ uniform float hoverHalftonePowerShift;+ uniform float hoverHalftoneRadius;+ uniform float hoverHalftoneWidthShift;+ uniform float hoverLightStrength;+ uniform float hoverLightRadius;+ uniform float hoverFlowStrength;+ uniform float hoverFlowRadius;+ uniform float dragFlowStrength;+ uniform float cropToBounds;++ varying vec2 vUv;++ float distSegment(in vec2 p, in vec2 a, in vec2 b) {+ vec2 pa = p - a;+ vec2 ba = b - a;+ float denom = max(dot(ba, ba), 0.000001);+ float h = clamp(dot(pa, ba) / denom, 0.0, 1.0);+ return length(pa - ba * h);+ }++ float lineSimpleEt(in vec2 p, in float r, in float thickness) {+ vec2 a = vec2(0.5) + vec2(-r, 0.0);+ vec2 b = vec2(0.5) + vec2(r, 0.0);+ float distToSegment = distSegment(p, a, b);+ float halfThickness = thickness * r;+ return distToSegment - halfThickness;+ }++ void main() {+ if (cropToBounds > 0.5) {+ vec4 boundsCheck = texture2D(tScene, vUv);+ if (boundsCheck.a < 0.01) {+ gl_FragColor = vec4(0.0);+ return;+ }+ }++ vec2 fragCoord =+ (gl_FragCoord.xy / max(effectResolution, vec2(1.0))) * logicalResolution;+ float halftoneSize = max(tile * max(footprintScale, 0.001), 1.0);+ vec2 pointerPx = interactionUv * logicalResolution;+ vec2 fragDelta = fragCoord - pointerPx;+ float fragDist = length(fragDelta);+ vec2 radialDir = fragDist > 0.001 ? fragDelta / fragDist : vec2(0.0, 1.0);+ float velocityMagnitude = length(interactionVelocity);+ vec2 motionDir = velocityMagnitude > 0.001+ ? interactionVelocity / velocityMagnitude+ : vec2(0.0, 0.0);+ float motionBias = velocityMagnitude > 0.001+ ? dot(-radialDir, motionDir) * 0.5 + 0.5+ : 0.5;++ float hoverLightMask = 0.0;+ if (hoverLightStrength > 0.0) {+ float lightRadiusPx = hoverLightRadius * logicalResolution.y;+ hoverLightMask = smoothstep(lightRadiusPx, 0.0, fragDist);+ }++ float hoverHalftoneMask = 0.0;+ if (hoverHalftoneActive > 0.0) {+ float hoverHalftoneRadiusPx = hoverHalftoneRadius * logicalResolution.y;+ hoverHalftoneMask =+ smoothstep(hoverHalftoneRadiusPx, 0.0, fragDist) *+ clamp(hoverHalftoneActive, 0.0, 1.0);+ }++ float hoverFlowMask = 0.0;+ if (hoverFlowStrength > 0.0) {+ float hoverRadiusPx = hoverFlowRadius * logicalResolution.y;+ hoverFlowMask = smoothstep(hoverRadiusPx, 0.0, fragDist);+ }++ vec2 hoverDisplacement =+ radialDir * hoverFlowStrength * hoverFlowMask * halftoneSize * 0.55 ++ motionDir * hoverFlowStrength * hoverFlowMask * (0.4 + motionBias) * halftoneSize * 1.15;+ vec2 travelDisplacement = dragOffset * dragFlowStrength * 0.45;+ vec2 effectCoord = fragCoord + hoverDisplacement + travelDisplacement;++ float bandRow = floor(effectCoord.y / halftoneSize);+ float waveOffset =+ waveAmount * sin(time * waveSpeed + bandRow * 0.5) * halftoneSize;+ effectCoord.x += waveOffset;++ vec2 cellIndex = floor(effectCoord / halftoneSize);+ vec2 sampleUv = clamp(+ (cellIndex + 0.5) * halftoneSize / logicalResolution,+ vec2(0.0),+ vec2(1.0)+ );+ vec2 cellUv = fract(effectCoord / halftoneSize);++ vec4 sceneSample = texture2D(tScene, sampleUv);+ float mask = smoothstep(0.02, 0.08, sceneSample.a);+ float localPower = clamp(+ s_3 + hoverHalftonePowerShift * hoverHalftoneMask,+ -1.5,+ 1.5+ );+ float localWidth = clamp(+ s_4 + hoverHalftoneWidthShift * hoverHalftoneMask,+ 0.05,+ 1.4+ );+ float lightLift =+ hoverLightStrength * hoverLightMask * mix(0.78, 1.18, motionBias) * 0.22;+ float bandRadius = clamp(+ (+ (+ sceneSample.r ++ sceneSample.g ++ sceneSample.b ++ localPower * length(vec2(0.5))+ ) *+ (1.0 / 3.0)+ ) + lightLift,+ 0.0,+ 1.0+ ) * 1.86 * 0.5;++ float alpha = 0.0;+ if (bandRadius > 0.0001) {+ float signedDistance = lineSimpleEt(cellUv, bandRadius, localWidth);+ float edge = 0.02;+ alpha = (1.0 - smoothstep(0.0, edge, signedDistance)) * mask;+ }++ vec3 activeDashColor = mix(dashColor, hoverDashColor, hoverHalftoneMask);+ vec3 color = activeDashColor * alpha;+ gl_FragColor = vec4(color, alpha);++ #include <tonemapping_fragment>+ #include <colorspace_fragment>+ }+`;++type PointerState = {+ hoverStrength: number;+ mouseX: number;+ mouseY: number;+ pointerInside: boolean;+ pointerVelocityX: number;+ pointerVelocityY: number;+ smoothedMouseX: number;+ smoothedMouseY: number;+};++function clampRectToViewport(+ rect: { height: number; width: number; x: number; y: number },+ viewportWidth: number,+ viewportHeight: number,+) {+ const minX = Math.max(rect.x, 0);+ const minY = Math.max(rect.y, 0);+ const maxX = Math.min(rect.x + rect.width, viewportWidth);+ const maxY = Math.min(rect.y + rect.height, viewportHeight);++ if (maxX <= minX || maxY <= minY) {+ return null;+ }++ return {+ height: maxY - minY,+ width: maxX - minX,+ x: minX,+ y: minY,+ };+}++function getRectArea(rect: { height: number; width: number } | null) {+ if (!rect) {+ return 0;+ }++ return Math.max(rect.width, 0) * Math.max(rect.height, 0);+}++function getImagePreviewZoom(previewDistance: number) {+ return REFERENCE_PREVIEW_DISTANCE / Math.max(previewDistance, 0.001);+}++function getContainedImageRect({+ imageHeight,+ imageWidth,+ viewportHeight,+ viewportWidth,+ zoom,+}: {+ imageHeight: number;+ imageWidth: number;+ viewportHeight: number;+ viewportWidth: number;+ zoom: number;+}) {+ if (+ imageWidth <= 0 ||+ imageHeight <= 0 ||+ viewportWidth <= 0 ||+ viewportHeight <= 0+ ) {+ return null;+ }++ const imageAspect = imageWidth / imageHeight;+ const viewAspect = viewportWidth / viewportHeight;++ let fittedWidth = viewportWidth;+ let fittedHeight = viewportHeight;++ if (imageAspect > viewAspect) {+ fittedHeight = viewportWidth / imageAspect;+ } else {+ fittedWidth = viewportHeight * imageAspect;+ }++ const scaledWidth = fittedWidth * zoom;+ const scaledHeight = fittedHeight * zoom;++ return clampRectToViewport(+ {+ height: scaledHeight,+ width: scaledWidth,+ x: (viewportWidth - scaledWidth) * 0.5,+ y: (viewportHeight - scaledHeight) * 0.5,+ },+ viewportWidth,+ viewportHeight,+ );+}++function getFootprintScaleFromRects(+ currentRect: { height: number; width: number } | null,+ referenceRect: { height: number; width: number } | null,+) {+ const currentArea = getRectArea(currentRect);+ const referenceArea = getRectArea(referenceRect);++ if (currentArea <= 0 || referenceArea <= 0) {+ return 1;+ }++ return Math.max(Math.sqrt(currentArea / referenceArea), MIN_FOOTPRINT_SCALE);+}++function getImageFootprintScale({+ imageHeight,+ imageWidth,+ previewDistance,+ viewportHeight,+ viewportWidth,+}: {+ imageHeight: number;+ imageWidth: number;+ previewDistance: number;+ viewportHeight: number;+ viewportWidth: number;+}) {+ const currentRect = getContainedImageRect({+ imageHeight,+ imageWidth,+ viewportHeight,+ viewportWidth,+ zoom: getImagePreviewZoom(previewDistance),+ });+ const referenceRect = getContainedImageRect({+ imageHeight,+ imageWidth,+ viewportHeight,+ viewportWidth,+ zoom: 1,+ });++ return getFootprintScaleFromRects(currentRect, referenceRect);+}++function getRelativeImageScale({+ imageHeight,+ imageWidth,+ previewDistance,+ referencePreviewDistance,+ viewportHeight,+ viewportWidth,+}: {+ imageHeight: number;+ imageWidth: number;+ previewDistance: number;+ referencePreviewDistance: number;+ viewportHeight: number;+ viewportWidth: number;+}) {+ const currentRect = getContainedImageRect({+ imageHeight,+ imageWidth,+ viewportHeight,+ viewportWidth,+ zoom: getImagePreviewZoom(previewDistance),+ });+ const referenceRect = getContainedImageRect({+ imageHeight,+ imageWidth,+ viewportHeight,+ viewportWidth,+ zoom: getImagePreviewZoom(referencePreviewDistance),+ });++ return getFootprintScaleFromRects(currentRect, referenceRect);+}++function createRenderTarget(width: number, height: number) {+ return new THREE.WebGLRenderTarget(width, height, {+ format: THREE.RGBAFormat,+ magFilter: THREE.LinearFilter,+ minFilter: THREE.LinearFilter,+ });+}++async function mountHalftoneOverlay({+ container,+ imageUrl,+}: {+ container: HTMLDivElement;+ imageUrl: string;+}): Promise<() => void> {+ const image = await loadVisualImage(imageUrl, {+ label: 'partner hero image',+ });++ const getWidth = () => Math.max(container.clientWidth, 1);+ const getHeight = () => Math.max(container.clientHeight, 1);+ const getVirtualHeight = () => Math.max(VIRTUAL_RENDER_HEIGHT, getHeight());+ const getVirtualWidth = () =>+ Math.max(+ Math.round(getVirtualHeight() * (getWidth() / Math.max(getHeight(), 1))),+ 1,+ );++ let renderLoop: VisualRenderLoop | null = null;+ const renderer = tryCreateSiteWebGlRenderer({+ alpha: true,+ antialias: false,+ onContextLost: () => {+ renderLoop?.stop();+ },+ powerPreference: 'high-performance',+ });++ if (renderer === null) {+ return () => {};+ }++ renderer.outputColorSpace = THREE.SRGBColorSpace;+ renderer.setPixelRatio(1);+ renderer.setClearColor(0x000000, 0);+ renderer.setSize(getVirtualWidth(), getVirtualHeight(), false);++ const canvas = renderer.domElement;+ canvas.setAttribute('aria-hidden', 'true');+ canvas.style.cursor = 'crosshair';+ canvas.style.display = 'block';+ canvas.style.height = '100%';+ canvas.style.width = '100%';+ container.appendChild(canvas);++ const imageTexture = new THREE.Texture(image);+ imageTexture.colorSpace = THREE.SRGBColorSpace;+ imageTexture.generateMipmaps = false;+ imageTexture.magFilter = THREE.LinearFilter;+ imageTexture.minFilter = THREE.LinearFilter;+ imageTexture.needsUpdate = true;++ const sceneTarget = createRenderTarget(getVirtualWidth(), getVirtualHeight());+ const fullScreenGeometry = new THREE.PlaneGeometry(2, 2);+ const orthographicCamera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);++ const imageMaterial = new THREE.ShaderMaterial({+ fragmentShader: imagePassthroughFragmentShader,+ uniforms: {+ contrast: { value: HALFTONE_CONTRAST },+ imageSize: { value: new THREE.Vector2(image.width, image.height) },+ tImage: { value: imageTexture },+ viewportSize: {+ value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),+ },+ zoom: { value: getImagePreviewZoom(PREVIEW_DISTANCE) },+ },+ vertexShader: passThroughVertexShader,+ });++ const imageScene = new THREE.Scene();+ imageScene.add(new THREE.Mesh(fullScreenGeometry, imageMaterial));++ const halftoneMaterial = new THREE.ShaderMaterial({+ fragmentShader: halftoneFragmentShader,+ transparent: true,+ uniforms: {+ cropToBounds: { value: 1 },+ dashColor: { value: new THREE.Color(HALFTONE_DASH_COLOR) },+ dragFlowStrength: { value: 0 },+ dragOffset: { value: new THREE.Vector2(0, 0) },+ effectResolution: {+ value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),+ },+ footprintScale: { value: 1 },+ hoverDashColor: { value: new THREE.Color(HALFTONE_HOVER_COLOR) },+ hoverFlowRadius: { value: 0.18 },+ hoverFlowStrength: { value: 0 },+ hoverHalftoneActive: { value: 0 },+ hoverHalftonePowerShift: { value: 0 },+ hoverHalftoneRadius: { value: HALFTONE_HOVER_RADIUS },+ hoverHalftoneWidthShift: { value: 0 },+ hoverLightRadius: { value: HALFTONE_HOVER_LIGHT_RADIUS },+ hoverLightStrength: { value: 0 },+ interactionUv: { value: new THREE.Vector2(0.5, 0.5) },+ interactionVelocity: { value: new THREE.Vector2(0, 0) },+ logicalResolution: {+ value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),+ },+ s_3: { value: HALFTONE_POWER },+ s_4: { value: HALFTONE_WIDTH },+ tScene: { value: sceneTarget.texture },+ tile: { value: HALFTONE_TILE_SIZE },+ time: { value: 0 },+ waveAmount: { value: 0 },+ waveSpeed: { value: 1 },+ },+ vertexShader: passThroughVertexShader,+ });++ const postScene = new THREE.Scene();+ postScene.add(new THREE.Mesh(fullScreenGeometry, halftoneMaterial));++ const updateViewportUniforms = ({+ effectHeight,+ effectWidth,+ logicalHeight,+ logicalWidth,+ }: {+ effectHeight: number;+ effectWidth: number;+ logicalHeight: number;+ logicalWidth: number;+ }) => {+ halftoneMaterial.uniforms.effectResolution.value.set(+ effectWidth,+ effectHeight,+ );+ halftoneMaterial.uniforms.logicalResolution.value.set(+ logicalWidth,+ logicalHeight,+ );+ imageMaterial.uniforms.viewportSize.value.set(logicalWidth, logicalHeight);+ };++ const getHalftoneScale = () =>+ getImageFootprintScale({+ imageHeight: image.height,+ imageWidth: image.width,+ previewDistance: PREVIEW_DISTANCE,+ viewportHeight: getVirtualHeight(),+ viewportWidth: getVirtualWidth(),+ });++ const getHoverScale = () =>+ getRelativeImageScale({+ imageHeight: image.height,+ imageWidth: image.width,+ previewDistance: PREVIEW_DISTANCE,+ referencePreviewDistance: SOURCE_PREVIEW_DISTANCE,+ viewportHeight: getVirtualHeight(),+ viewportWidth: getVirtualWidth(),+ });++ const pointer: PointerState = {+ hoverStrength: 0,+ mouseX: 0.5,+ mouseY: 0.5,+ pointerInside: false,+ pointerVelocityX: 0,+ pointerVelocityY: 0,+ smoothedMouseX: 0.5,+ smoothedMouseY: 0.5,+ };++ const syncSize = () => {+ const virtualWidth = getVirtualWidth();+ const virtualHeight = getVirtualHeight();++ renderer.setSize(virtualWidth, virtualHeight, false);+ sceneTarget.setSize(virtualWidth, virtualHeight);+ updateViewportUniforms({+ effectHeight: virtualHeight,+ effectWidth: virtualWidth,+ logicalHeight: virtualHeight,+ logicalWidth: virtualWidth,+ });+ };++ const stopObservingSize = observeElementSize(container, syncSize);++ const updatePointerPosition = (+ event: PointerEvent,+ options?: { resetVelocity?: boolean },+ ) => {+ const rect = canvas.getBoundingClientRect();+ const width = Math.max(rect.width, 1);+ const height = Math.max(rect.height, 1);++ const nextMouseX = THREE.MathUtils.clamp(+ (event.clientX - rect.left) / width,+ 0,+ 1,+ );+ const nextMouseY = THREE.MathUtils.clamp(+ (event.clientY - rect.top) / height,+ 0,+ 1,+ );++ const deltaX = nextMouseX - pointer.mouseX;+ const deltaY = nextMouseY - pointer.mouseY;++ pointer.mouseX = nextMouseX;+ pointer.mouseY = nextMouseY;+ pointer.pointerInside =+ event.clientX >= rect.left &&+ event.clientX <= rect.right &&+ event.clientY >= rect.top &&+ event.clientY <= rect.bottom;++ if (options?.resetVelocity) {+ pointer.pointerVelocityX = 0;+ pointer.pointerVelocityY = 0;+ pointer.smoothedMouseX = nextMouseX;+ pointer.smoothedMouseY = nextMouseY;+ return;+ }++ pointer.pointerVelocityX = deltaX;+ pointer.pointerVelocityY = deltaY;+ };++ const handlePointerMove = (event: PointerEvent) => {+ const resetVelocity = !pointer.pointerInside;+ updatePointerPosition(+ event,+ resetVelocity ? { resetVelocity: true } : undefined,+ );+ };++ const handlePointerLeave = () => {+ pointer.pointerInside = false;+ pointer.pointerVelocityX = 0;+ pointer.pointerVelocityY = 0;+ };++ canvas.addEventListener('pointermove', handlePointerMove);+ canvas.addEventListener('pointerleave', handlePointerLeave);++ let previousTimestamp = 0;++ const renderFrame = (timestamp: number) => {+ halftoneMaterial.uniforms.time.value = timestamp / 1000;+ const hoverScale = getHoverScale();+ const deltaSeconds =+ previousTimestamp === 0+ ? 1 / 60+ : Math.min((timestamp - previousTimestamp) / 1000, 0.1);+ previousTimestamp = timestamp;+ const hoverEasing =+ 1 -+ Math.exp(+ -deltaSeconds *+ (pointer.pointerInside+ ? HALFTONE_HOVER_FADE_IN+ : HALFTONE_HOVER_FADE_OUT),+ );+ pointer.hoverStrength +=+ ((pointer.pointerInside ? 1 : 0) - pointer.hoverStrength) * hoverEasing;++ pointer.smoothedMouseX +=+ (pointer.mouseX - pointer.smoothedMouseX) * IMAGE_POINTER_FOLLOW;+ pointer.smoothedMouseY +=+ (pointer.mouseY - pointer.smoothedMouseY) * IMAGE_POINTER_FOLLOW;+ pointer.pointerVelocityX *= IMAGE_POINTER_VELOCITY_DAMPING;+ pointer.pointerVelocityY *= IMAGE_POINTER_VELOCITY_DAMPING;++ halftoneMaterial.uniforms.interactionUv.value.set(+ pointer.smoothedMouseX,+ 1 - pointer.smoothedMouseY,+ );+ halftoneMaterial.uniforms.interactionVelocity.value.set(+ pointer.pointerVelocityX * getVirtualWidth(),+ -pointer.pointerVelocityY * getVirtualHeight(),+ );+ halftoneMaterial.uniforms.hoverHalftoneActive.value = pointer.hoverStrength;+ halftoneMaterial.uniforms.hoverHalftonePowerShift.value =+ HALFTONE_HOVER_POWER_SHIFT;+ halftoneMaterial.uniforms.hoverHalftoneRadius.value =+ HALFTONE_HOVER_RADIUS * hoverScale;+ halftoneMaterial.uniforms.hoverHalftoneWidthShift.value =+ HALFTONE_HOVER_WIDTH_SHIFT;+ halftoneMaterial.uniforms.hoverLightStrength.value =+ HALFTONE_HOVER_LIGHT_INTENSITY * pointer.hoverStrength;+ halftoneMaterial.uniforms.hoverLightRadius.value =+ HALFTONE_HOVER_LIGHT_RADIUS * hoverScale;+ halftoneMaterial.uniforms.footprintScale.value = getHalftoneScale();+ imageMaterial.uniforms.zoom.value = getImagePreviewZoom(PREVIEW_DISTANCE);++ renderer.setRenderTarget(sceneTarget);+ renderer.render(imageScene, orthographicCamera);++ renderer.setRenderTarget(null);+ renderer.clear();+ renderer.render(postScene, orthographicCamera);+ };++ renderLoop = createVisualRenderLoop({+ renderFrame,+ target: container,+ targetVisibilityOptions: { rootMargin: '100px' },+ });+ renderLoop.start();++ return () => {+ renderLoop?.dispose();+ stopObservingSize();+ canvas.removeEventListener('pointermove', handlePointerMove);+ canvas.removeEventListener('pointerleave', handlePointerLeave);+ halftoneMaterial.dispose();+ imageMaterial.dispose();+ imageTexture.dispose();+ fullScreenGeometry.dispose();+ sceneTarget.dispose();+ renderer.dispose();++ if (canvas.parentNode === container) {+ container.removeChild(canvas);+ }+ };+}++export function usePartnerHalftoneOverlay({+ imageUrl,+ mountRef,+}: {+ imageUrl: string;+ mountRef: RefObject<HTMLDivElement | null>;+}) {+ useEffect(() => {+ if (getPrefersReducedMotionSnapshot()) {+ return;+ }++ const container = mountRef.current;++ if (!container) {+ return;+ }++ let disposed = false;+ const disposePromise = mountHalftoneOverlay({ container, imageUrl }).catch(+ (error) => {+ console.error(error);+ return undefined;+ },+ );++ return () => {+ disposed = true;++ void disposePromise.then((dispose) => {+ if (!disposed) {+ return;+ }++ dispose?.();+ });+ };+ }, [imageUrl, mountRef]);+}diff --git a/packages/twenty-website-new/src/sections/Hero/components/ProductVisual.tsx b/packages/twenty-website-new/src/sections/Hero/components/ProductVisual.tsxindex 1d2db0f27cc..4731b8caa73 100644--- a/packages/twenty-website-new/src/sections/Hero/components/ProductVisual.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/ProductVisual.tsx@@ -1,9 +1,10 @@import { WebGlMount } from '@/lib/visual-runtime';-import { Product } from '@/sections/Hero/visuals/Product';+import { Product } from '@/sections/Hero/visuals/components/Product';+import { ProductPlaceholder } from '@/sections/Hero/visuals/components/ProductPlaceholder';export function ProductVisual() {return (- <WebGlMount priority>+ <WebGlMount priority fallback={<ProductPlaceholder />}><Product /></WebGlMount>);diff --git a/packages/twenty-website-new/src/sections/Hero/components/ReleaseNotesVisual.tsx b/packages/twenty-website-new/src/sections/Hero/components/ReleaseNotesVisual.tsxindex f6cbc083cff..08f38bdee14 100644--- a/packages/twenty-website-new/src/sections/Hero/components/ReleaseNotesVisual.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/ReleaseNotesVisual.tsx@@ -1,5 +1,5 @@import { WebGlMount } from '@/lib/visual-runtime';-import { ReleaseNotes } from '@/sections/Hero/visuals/ReleaseNotes';+import { ReleaseNotes } from '@/sections/Hero/visuals/components/ReleaseNotes';export function ReleaseNotesVisual() {return (diff --git a/packages/twenty-website-new/src/sections/Hero/components/Root.tsx b/packages/twenty-website-new/src/sections/Hero/components/Root.tsxindex 5e4f0a22685..5873eef6f57 100644--- a/packages/twenty-website-new/src/sections/Hero/components/Root.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/Root.tsx@@ -1,7 +1,7 @@import { Container } from '@/design-system/components';import { WebGlMount } from '@/lib/visual-runtime';-import { HomeBackgroundHalftone } from '@/sections/Hero/visuals/HomeBackgroundHalftone';-import { theme } from '@/theme';+import { HomeBackgroundHalftone } from '@/sections/Hero/visuals/components/HomeBackgroundHalftone';+import { theme, type Scheme } from '@/theme';import { styled } from '@linaria/react';import type { ReactNode } from 'react';@@ -16,6 +16,21 @@ const StyledSection = styled.section`color: ${theme.colors.secondary.text[100]};}+ &[data-scheme='light'] {+ background-color: var(--color-white);+ color: var(--color-text);+ }++ &[data-scheme='muted'] {+ background-color: var(--color-neutral);+ color: var(--color-text);+ }++ &[data-scheme='dark'] {+ background-color: var(--color-black);+ color: var(--color-text);+ }+min-width: 0;overflow: clip;padding-bottom: ${theme.spacing(6)};@@ -24,6 +39,11 @@ const StyledSection = styled.section``;const StyledBackground = styled.div`+ background: radial-gradient(+ ellipse 80% 60% at 50% 40%,+ rgba(245, 243, 240, 0.6) 0%,+ transparent 70%+ );bottom: 0;left: -20%;overflow: clip;@@ -55,9 +75,10 @@ const StyledContainer = styled(Container)``;type RootProps = {- backgroundColor: string;+ backgroundColor?: string;children: ReactNode;colorScheme?: 'primary' | 'secondary';+ scheme?: Scheme;showHomeBackground?: boolean;};@@ -65,10 +86,15 @@ export function Root({backgroundColor,children,colorScheme = 'primary',+ scheme,showHomeBackground = false,}: RootProps) {return (- <StyledSection data-color-scheme={colorScheme} style={{ backgroundColor }}>+ <StyledSection+ data-color-scheme={scheme ? undefined : colorScheme}+ data-scheme={scheme}+ style={scheme ? undefined : { backgroundColor }}+ >{showHomeBackground ? (<StyledBackground><WebGlMount priority>diff --git a/packages/twenty-website-new/src/sections/Hero/components/WhyTwentyVisual.tsx b/packages/twenty-website-new/src/sections/Hero/components/WhyTwentyVisual.tsxindex 00787708cce..9e8749c79fd 100644--- a/packages/twenty-website-new/src/sections/Hero/components/WhyTwentyVisual.tsx+++ b/packages/twenty-website-new/src/sections/Hero/components/WhyTwentyVisual.tsx@@ -1,7 +1,7 @@'use client';import { WebGlMount } from '@/lib/visual-runtime';-import { WhyTwenty } from '@/sections/Hero/visuals/WhyTwenty';+import { WhyTwenty } from '@/sections/Hero/visuals/components/WhyTwenty';import { theme } from '@/theme';import { css } from '@linaria/core';import { styled } from '@linaria/react';diff --git a/packages/twenty-website-new/src/sections/Hero/index.ts b/packages/twenty-website-new/src/sections/Hero/index.tsnew file mode 100644index 00000000000..d8b61ce37fd--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/index.ts@@ -0,0 +1,36 @@+export { Hero } from './components';+export { Chip } from './components/HomeVisual/Shared/components/HomeVisualChip';+export { type ChipProps } from './components/HomeVisual/Shared/utils/chip-props';+export { ChipVariant } from './components/HomeVisual/Shared/utils/chip-variant';+export { VISUAL_TOKENS } from './components/HomeVisual/Shared/utils/home-visual-tokens';+export type {+ HeroCellBoolean,+ HeroCellEntity,+ HeroCellLink,+ HeroCellNumber,+ HeroCellPerson,+ HeroCellRelation,+ HeroCellTag,+ HeroCellText,+ HeroCellValue,+ HeroColumnDef,+ HeroDashboardChartImageType,+ HeroDashboardDataType,+ HeroDashboardMetricType,+ HeroDashboardPageDefinition,+ HeroKanbanCardType,+ HeroKanbanLaneType,+ HeroKanbanPageDefinition,+ HeroNavbarActionType,+ HeroPageDefinition,+ HeroPageHeaderType,+ HeroPageType,+ HeroRowDef,+ HeroSidebarEntry,+ HeroSidebarFolder,+ HeroSidebarIcon,+ HeroSidebarItem,+ HeroTablePageDefinition,+ HeroVisualType,+ HeroWorkflowPageDefinition,+} from './types';diff --git a/packages/twenty-website-new/src/sections/Hero/types/HeroHomeData.ts b/packages/twenty-website-new/src/sections/Hero/types/hero-home-data.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/types/HeroHomeData.tsrename to packages/twenty-website-new/src/sections/Hero/types/hero-home-data.tsdiff --git a/packages/twenty-website-new/src/sections/Hero/types/index.ts b/packages/twenty-website-new/src/sections/Hero/types/index.tsindex f9174038bf6..fc7fb825612 100644--- a/packages/twenty-website-new/src/sections/Hero/types/index.ts+++ b/packages/twenty-website-new/src/sections/Hero/types/index.ts@@ -28,4 +28,4 @@ export type {HeroSidebarItem,HeroTablePageDefinition,HeroVisualType,-} from './HeroHomeData';+} from './hero-home-data';diff --git a/packages/twenty-website-new/src/sections/Hero/visuals/components/HomeBackgroundHalftone.tsx b/packages/twenty-website-new/src/sections/Hero/visuals/components/HomeBackgroundHalftone.tsxnew file mode 100644index 00000000000..e9ef8bb7aa9--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/visuals/components/HomeBackgroundHalftone.tsx@@ -0,0 +1,21 @@+'use client';++import { styled } from '@linaria/react';+import { useRef } from 'react';+import { useHomeBackgroundHalftone } from '../hooks/use-home-background-halftone';++const StyledMount = styled.div<{ $isReady: boolean }>`+ height: calc(100% + 80px);+ inset: -40px;+ opacity: ${({ $isReady }) => ($isReady ? 1 : 0)};+ position: absolute;+ transition: opacity 600ms ease;+ width: calc(100% + 80px);+`;++export function HomeBackgroundHalftone() {+ const mountReference = useRef<HTMLDivElement>(null);+ const isReady = useHomeBackgroundHalftone({ mountRef: mountReference });++ return <StyledMount aria-hidden ref={mountReference} $isReady={isReady} />;+}diff --git a/packages/twenty-website-new/src/sections/Hero/visuals/Milestone.tsx b/packages/twenty-website-new/src/sections/Hero/visuals/components/Milestone.tsxsimilarity index 92%rename from packages/twenty-website-new/src/sections/Hero/visuals/Milestone.tsxrename to packages/twenty-website-new/src/sections/Hero/visuals/components/Milestone.tsxindex f5e2272891a..08b44b3a0b4 100644--- a/packages/twenty-website-new/src/sections/Hero/visuals/Milestone.tsx+++ b/packages/twenty-website-new/src/sections/Hero/visuals/components/Milestone.tsx@@ -14,7 +14,7 @@ import {MILESTONE_INITIAL_POSE,MILESTONE_PREVIEW_DISTANCE,type MilestoneSettingsOverrides,-} from './milestone-config';+} from '../utils/milestone-config';const StyledVisualMount = styled.div`background: transparent;@@ -56,7 +56,3 @@ export function Milestone({</StyledVisualMount>);}--export type { MilestoneSettingsOverrides };--export default Milestone;diff --git a/packages/twenty-website-new/src/sections/Hero/visuals/PartnerHeroHalftoneIllustration.tsx b/packages/twenty-website-new/src/sections/Hero/visuals/components/PartnerHeroHalftoneIllustration.tsxsimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/visuals/PartnerHeroHalftoneIllustration.tsxrename to packages/twenty-website-new/src/sections/Hero/visuals/components/PartnerHeroHalftoneIllustration.tsxdiff --git a/packages/twenty-website-new/src/sections/Hero/visuals/Product.tsx b/packages/twenty-website-new/src/sections/Hero/visuals/components/Product.tsxsimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/visuals/Product.tsxrename to packages/twenty-website-new/src/sections/Hero/visuals/components/Product.tsxdiff --git a/packages/twenty-website-new/src/sections/Hero/visuals/ProductEffect.tsx b/packages/twenty-website-new/src/sections/Hero/visuals/components/ProductEffect.tsxsimilarity index 94%rename from packages/twenty-website-new/src/sections/Hero/visuals/ProductEffect.tsxrename to packages/twenty-website-new/src/sections/Hero/visuals/components/ProductEffect.tsxindex 41bf0f455aa..1c623de7729 100644--- a/packages/twenty-website-new/src/sections/Hero/visuals/ProductEffect.tsx+++ b/packages/twenty-website-new/src/sections/Hero/visuals/components/ProductEffect.tsx@@ -10,7 +10,7 @@ import {PRODUCT_EFFECT_PREVIEW_DISTANCE,PRODUCT_EFFECT_SETTINGS,PRODUCT_EFFECT_VIRTUAL_RENDER_HEIGHT,-} from './product-effect-config';+} from '../utils/product-effect-config';const StyledVisualMount = styled.div`background: transparent;@@ -42,5 +42,3 @@ export function ProductEffect({</StyledVisualMount>);}--export default ProductEffect;diff --git a/packages/twenty-website-new/src/sections/Hero/visuals/components/ProductPlaceholder.tsx b/packages/twenty-website-new/src/sections/Hero/visuals/components/ProductPlaceholder.tsxnew file mode 100644index 00000000000..8d478f5b0f3--- /dev/null+++ b/packages/twenty-website-new/src/sections/Hero/visuals/components/ProductPlaceholder.tsx@@ -0,0 +1,15 @@+'use client';++import { theme } from '@/theme';+import { styled } from '@linaria/react';++const StyledContainer = styled.div`+ background-color: ${theme.colors.secondary.background[5]};+ height: 462px;+ margin-top: ${theme.spacing(6)};+ width: 100%;+`;++export function ProductPlaceholder() {+ return <StyledContainer />;+}diff --git a/packages/twenty-website-new/src/sections/Hero/visuals/ReleaseNotes.tsx b/packages/twenty-website-new/src/sections/Hero/visuals/components/ReleaseNotes.tsxsimilarity index 88%rename from packages/twenty-website-new/src/sections/Hero/visuals/ReleaseNotes.tsxrename to packages/twenty-website-new/src/sections/Hero/visuals/components/ReleaseNotes.tsxindex a320c2dc15c..48f1d91f632 100644--- a/packages/twenty-website-new/src/sections/Hero/visuals/ReleaseNotes.tsx+++ b/packages/twenty-website-new/src/sections/Hero/visuals/components/ReleaseNotes.tsx@@ -2,7 +2,8 @@import { theme } from '@/theme';import { styled } from '@linaria/react';-import { Milestone, type MilestoneSettingsOverrides } from './Milestone';+import { Milestone } from './Milestone';+import type { MilestoneSettingsOverrides } from '../utils/milestone-config';const RELEASE_NOTES_SETTINGS = {animation: {diff --git a/packages/twenty-website-new/src/sections/Hero/visuals/WhyTwenty.tsx b/packages/twenty-website-new/src/sections/Hero/visuals/components/WhyTwenty.tsxsimilarity index 99%rename from packages/twenty-website-new/src/sections/Hero/visuals/WhyTwenty.tsxrename to packages/twenty-website-new/src/sections/Hero/visuals/components/WhyTwenty.tsxindex 293215f9cc9..f2091afd82b 100644--- a/packages/twenty-website-new/src/sections/Hero/visuals/WhyTwenty.tsx+++ b/packages/twenty-website-new/src/sections/Hero/visuals/components/WhyTwenty.tsx@@ -11,7 +11,7 @@ import {type VisualRenderLoop,type VisualRenderLoopFrame,} from '@/lib/visual-runtime';-import { DRACO_DECODER_PATH } from '@/lib/visual-runtime/draco-decoder-path';+import { DRACO_DECODER_PATH } from '@/lib/visual-runtime/utils/draco-decoder-path';const GLB_URL = '/illustrations/why-twenty/hero/hero.glb';diff --git a/packages/twenty-website-new/src/sections/Hero/visuals/HomeBackgroundHalftone.tsx b/packages/twenty-website-new/src/sections/Hero/visuals/hooks/use-home-background-halftone.tssimilarity index 97%rename from packages/twenty-website-new/src/sections/Hero/visuals/HomeBackgroundHalftone.tsxrename to packages/twenty-website-new/src/sections/Hero/visuals/hooks/use-home-background-halftone.tsindex 4d79d69b209..ffe38c61516 100644--- a/packages/twenty-website-new/src/sections/Hero/visuals/HomeBackgroundHalftone.tsx+++ b/packages/twenty-website-new/src/sections/Hero/visuals/hooks/use-home-background-halftone.ts@@ -9,8 +9,7 @@ import {type VisualRenderLoop,} from '@/lib/visual-runtime';import { observeElementSize } from '@/lib/dom/observe-element-size';-import { styled } from '@linaria/react';-import { useEffect, useRef, useState } from 'react';+import { useEffect, useState, type RefObject } from 'react';import * as THREE from 'three';const HOME_BACKGROUND_IMAGE_URL =@@ -78,6 +77,7 @@ function getActiveTuneValues(): HomeBackgroundTuneValues {: 'desktop';return HOME_BACKGROUND_TUNE_VALUES[key];}+const VIRTUAL_RENDER_HEIGHT = 768;const MIN_FOOTPRINT_SCALE = 0.001;@@ -265,15 +265,6 @@ const halftoneFragmentShader = `}`;-const StyledMount = styled.div<{ $isReady: boolean }>`- height: calc(100% + 80px);- inset: -40px;- opacity: ${({ $isReady }) => ($isReady ? 1 : 0)};- position: absolute;- transition: opacity 600ms ease;- width: calc(100% + 80px);-`;-type Rect = { height: number; width: number; x: number; y: number };function clampRectToViewport(@@ -679,12 +670,15 @@ async function mountHomeBackgroundCanvas({};}-export function HomeBackgroundHalftone() {- const mountReference = useRef<HTMLDivElement>(null);+export function useHomeBackgroundHalftone({+ mountRef,+}: {+ mountRef: RefObject<HTMLDivElement | null>;+}) {const [isReady, setIsReady] = useState(false);useEffect(() => {- const container = mountReference.current;+ const container = mountRef.current;if (!container) {return;@@ -720,7 +714,7 @@ export function HomeBackgroundHalftone() {readyTask.stop();unmount?.();};- }, []);+ }, [mountRef]);- return <StyledMount aria-hidden ref={mountReference} $isReady={isReady} />;+ return isReady;}diff --git a/packages/twenty-website-new/src/sections/Hero/visuals/milestone-config.ts b/packages/twenty-website-new/src/sections/Hero/visuals/utils/milestone-config.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/visuals/milestone-config.tsrename to packages/twenty-website-new/src/sections/Hero/visuals/utils/milestone-config.tsdiff --git a/packages/twenty-website-new/src/sections/Hero/visuals/product-effect-config.ts b/packages/twenty-website-new/src/sections/Hero/visuals/utils/product-effect-config.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Hero/visuals/product-effect-config.tsrename to packages/twenty-website-new/src/sections/Hero/visuals/utils/product-effect-config.tsdiff --git a/packages/twenty-website-new/src/sections/HomeStepper/components/Flow.tsx b/packages/twenty-website-new/src/sections/HomeStepper/components/Flow.tsxindex 03cebfea978..7278ae03a17 100644--- a/packages/twenty-website-new/src/sections/HomeStepper/components/Flow.tsx+++ b/packages/twenty-website-new/src/sections/HomeStepper/components/Flow.tsx@@ -1,9 +1,10 @@'use client';import { ScrollProgressEffect } from '@/lib/scroll';-import { useStepperMdUp } from '@/lib/stepper';-import type { HomeStepperStepType } from '@/sections/HomeStepper/types/HomeStepperStep';-import { useEffect, useRef, useState, type RefObject } from 'react';+import { useStepperMdUp } from '@/sections/Stepper';+import { useBreakpointStepSync } from '@/sections/Stepper/use-breakpoint-step-sync';+import type { HomeStepperStepType } from '@/sections/HomeStepper/types/home-stepper-step';+import { useState, type RefObject } from 'react';import { LeftColumn } from './LeftColumn';import { RightColumn } from './RightColumn';import { Visual } from './Visual/Visual';@@ -16,27 +17,12 @@ type FlowProps = {export function Flow({ scrollContainerRef, steps }: FlowProps) {const isMdUp = useStepperMdUp();const [scrollProgress, setScrollProgress] = useState(0);- const [mobileStepIndex, setMobileStepIndex] = useState(0);- const previousMdUpRef = useRef(isMdUp);-- useEffect(() => {- if (previousMdUpRef.current && !isMdUp) {- const scrollDerivedIndex = Math.min(- steps.length - 1,- Math.floor(scrollProgress * steps.length),- );- setMobileStepIndex(scrollDerivedIndex);- }- previousMdUpRef.current = isMdUp;- }, [isMdUp, scrollProgress, steps.length]);-- const activeStepIndex = isMdUp- ? Math.min(steps.length - 1, Math.floor(scrollProgress * steps.length))- : mobileStepIndex;-- const localProgress = isMdUp- ? scrollProgress * steps.length - activeStepIndex- : 0;+ const {+ activeStepIndex,+ localProgress,+ mobileStepIndex,+ setMobileStepIndex,+ } = useBreakpointStepSync(isMdUp, scrollProgress, steps.length);const visualScrollProgress = isMdUp? scrollProgressdiff --git a/packages/twenty-website-new/src/sections/HomeStepper/components/LeftColumn.tsx b/packages/twenty-website-new/src/sections/HomeStepper/components/LeftColumn.tsxindex c8853402f29..0be45b50f28 100644--- a/packages/twenty-website-new/src/sections/HomeStepper/components/LeftColumn.tsx+++ b/packages/twenty-website-new/src/sections/HomeStepper/components/LeftColumn.tsx@@ -1,14 +1,19 @@'use client';-import { Body, Heading } from '@/design-system/components';-import { useRenderMessage } from '@/lib/i18n/use-render-message';-import { StepperSwipeDeck } from '@/lib/stepper';-import { HOME_STEPPER_HOLD_FRACTIONS } from '@/sections/HomeStepper/utils/home-stepper-lottie-frame-map';+import { Body } from '@/design-system/components';+import { StepperSwipeDeck } from '@/sections/Stepper';import { theme } from '@/theme';import { styled } from '@linaria/react';-import type { HomeStepperStepType } from './../types/HomeStepperStep';+import { useLingui } from '@lingui/react';+import type { HomeStepperStepType } from './../types/home-stepper-step';import { ProgressBar } from './ProgressBar';+const HOME_STEPPER_HOLD_FRACTIONS = [+ 240 / 285,+ (880 - 285) / (925 - 285),+ 1,+] as const;+const LeftColumnRoot = styled.div`min-width: 0;@@ -96,9 +101,9 @@ const SwipeStepBlock = styled.div`row-gap: ${theme.spacing(4)};`;-export type HomeStepperLayoutMode = 'scroll' | 'swipe';+type HomeStepperLayoutMode = 'scroll' | 'swipe';-export type HomeStepperLeftColumnProps = {+type HomeStepperLeftColumnProps = {activeStepIndex: number;layoutMode: HomeStepperLayoutMode;localProgress: number;@@ -143,7 +148,7 @@ export function LeftColumn({onMobileStepIndexChange,steps,}: HomeStepperLeftColumnProps) {- const renderText = useRenderMessage();+ const { i18n } = useLingui();return (<LeftColumnRoot>@@ -164,13 +169,8 @@ export function LeftColumn({const step = steps[stepIndex];return (<SwipeStepBlock>- <Heading- renderText={renderText}- segments={step.heading}- size="lg"- weight="light"- />- <Body body={step.body} renderText={renderText} size="sm" />+ {step.heading}+ <Body size="sm">{i18n._(step.body)}</Body></SwipeStepBlock>);}}@@ -190,14 +190,10 @@ export function LeftColumn({$transform={transform}data-active={String(index === activeStepIndex)}key={index}+ suppressHydrationWarning>- <Heading- renderText={renderText}- segments={step.heading}- size="lg"- weight="light"- />- <Body body={step.body} renderText={renderText} size="sm" />+ {step.heading}+ <Body size="sm">{i18n._(step.body)}</Body></StepBlock>);})diff --git a/packages/twenty-website-new/src/sections/HomeStepper/components/ProgressBar.tsx b/packages/twenty-website-new/src/sections/HomeStepper/components/ProgressBar.tsxindex 16d33092e42..2def61dab2f 100644--- a/packages/twenty-website-new/src/sections/HomeStepper/components/ProgressBar.tsx+++ b/packages/twenty-website-new/src/sections/HomeStepper/components/ProgressBar.tsx@@ -1,5 +1,5 @@import { StepperProgressRail } from '@/design-system/components';-import type { HomeStepperStepType } from './../types/HomeStepperStep';+import type { HomeStepperStepType } from './../types/home-stepper-step';type ProgressBarProps = {activeStepIndex: number;diff --git a/packages/twenty-website-new/src/sections/HomeStepper/components/ScrollSection.tsx b/packages/twenty-website-new/src/sections/HomeStepper/components/ScrollSection.tsxindex 7efaffd0c6f..47fec39b3ed 100644--- a/packages/twenty-website-new/src/sections/HomeStepper/components/ScrollSection.tsx+++ b/packages/twenty-website-new/src/sections/HomeStepper/components/ScrollSection.tsx@@ -1,6 +1,6 @@'use client';-import type { HomeStepperStepType } from '@/sections/HomeStepper/types/HomeStepperStep';+import type { HomeStepperStepType } from '@/sections/HomeStepper/types/home-stepper-step';import { useRef } from 'react';import { Flow } from './Flow';import { Root } from './Root';diff --git a/packages/twenty-website-new/src/sections/HomeStepper/components/StepperVisualFrame.tsx b/packages/twenty-website-new/src/sections/HomeStepper/components/StepperVisualFrame.tsxindex 87c2e7a44c1..8a50372ef33 100644--- a/packages/twenty-website-new/src/sections/HomeStepper/components/StepperVisualFrame.tsx+++ b/packages/twenty-website-new/src/sections/HomeStepper/components/StepperVisualFrame.tsx@@ -9,13 +9,11 @@ const FRAME_MASK_PATH =const frameMask = `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 672 705' preserveAspectRatio='none'%3E%3Cpath d='${encodeURIComponent(FRAME_MASK_PATH)}' fill='black'/%3E%3C/svg%3E")`;-export const STEPPER_VISUAL_POINTER_ROOT_SELECTOR =- '[data-stepper-visual-pointer-root]';-const FrameRoot = styled.div`+ aspect-ratio: 672 / 705;+ contain: layout style paint;position: relative;width: 100%;- aspect-ratio: 672 / 705;`;const PatternBackdrop = styled.div`diff --git a/packages/twenty-website-new/src/sections/HomeStepper/components/Visual/StepperBackgroundHalftone.tsx b/packages/twenty-website-new/src/sections/HomeStepper/components/Visual/StepperBackgroundHalftone.tsxindex 35825d6d44d..36f27755965 100644--- a/packages/twenty-website-new/src/sections/HomeStepper/components/Visual/StepperBackgroundHalftone.tsx+++ b/packages/twenty-website-new/src/sections/HomeStepper/components/Visual/StepperBackgroundHalftone.tsx@@ -1,252 +1,8 @@'use client';-import {- VIRTUAL_RENDER_HEIGHT,- getImageFootprintScale,- getImagePreviewZoom,-} from '@/lib/halftone';-import { observeElementSize } from '@/lib/dom/observe-element-size';-import { getPrefersReducedMotionSnapshot } from '@/lib/motion';-import {- createVisualRenderLoop,- loadVisualImage,- tryCreateSiteWebGlRenderer,- type VisualRenderLoop,-} from '@/lib/visual-runtime';import { styled } from '@linaria/react';-import { useEffect, useRef } from 'react';-import * as THREE from 'three';-import { STEPPER_VISUAL_POINTER_ROOT_SELECTOR } from '../StepperVisualFrame';--const PREVIEW_DISTANCE = 4;-const HOVER_FADE_IN = 18;-const HOVER_FADE_OUT = 7;--const HALFTONE_SETTINGS = {- animation: {- hoverHalftoneEnabled: true,- hoverHalftonePowerShift: 0.62,- hoverHalftoneRadius: 0.6,- hoverHalftoneWidthShift: -0.18,- hoverLightEnabled: false,- hoverLightIntensity: 0.12,- hoverLightRadius: 0.8,- waveAmount: 2,- waveEnabled: false,- waveSpeed: 1,- },- halftone: {- dashColor: '#dddddd',- hoverDashColor: '#FFF',- imageContrast: 1.12,- minimumTone: 0.26,- power: 0.18,- scale: 12,- width: 0.72,- },-};--const passThroughVertexShader = /* glsl */ `- varying vec2 vUv;-- void main() {- vUv = uv;- gl_Position = vec4(position, 1.0);- }-`;--const imagePassthroughFragmentShader = /* glsl */ `- precision highp float;-- uniform sampler2D tImage;- uniform vec2 imageSize;- uniform vec2 viewportSize;- uniform float zoom;- uniform float contrast;-- varying vec2 vUv;-- void main() {- float imageAspect = imageSize.x / imageSize.y;- float viewAspect = viewportSize.x / viewportSize.y;-- vec2 uv = vUv;-- if (imageAspect > viewAspect) {- float scale = viewAspect / imageAspect;- uv.x = (uv.x - 0.5) * scale + 0.5;- } else {- float scale = imageAspect / viewAspect;- uv.y = (uv.y - 0.5) * scale + 0.5;- }-- uv = (uv - 0.5) / zoom + 0.5;-- float inBounds = step(0.0, uv.x) * step(uv.x, 1.0)- * step(0.0, uv.y) * step(uv.y, 1.0);-- vec4 color = texture2D(tImage, clamp(uv, 0.0, 1.0));- vec3 contrastColor = clamp((color.rgb - 0.5) * contrast + 0.5, 0.0, 1.0);-- gl_FragColor = vec4(contrastColor, inBounds);- }-`;--const halftoneFragmentShader = /* glsl */ `- precision highp float;-- uniform sampler2D tScene;- uniform vec2 effectResolution;- uniform vec2 logicalResolution;- uniform float tile;- uniform float s_3;- uniform float s_4;- uniform vec3 dashColor;- uniform vec3 hoverDashColor;- uniform float minimumTone;- uniform float time;- uniform float waveAmount;- uniform float waveSpeed;- uniform float footprintScale;- uniform vec2 interactionUv;- uniform vec2 interactionVelocity;- uniform vec2 dragOffset;- uniform float hoverHalftoneActive;- uniform float hoverHalftonePowerShift;- uniform float hoverHalftoneRadius;- uniform float hoverHalftoneWidthShift;- uniform float hoverLightStrength;- uniform float hoverLightRadius;- uniform float hoverFlowStrength;- uniform float hoverFlowRadius;- uniform float dragFlowStrength;- uniform float cropToBounds;-- varying vec2 vUv;-- float distSegment(in vec2 p, in vec2 a, in vec2 b) {- vec2 pa = p - a;- vec2 ba = b - a;- float denom = max(dot(ba, ba), 0.000001);- float h = clamp(dot(pa, ba) / denom, 0.0, 1.0);- return length(pa - ba * h);- }-- float lineSimpleEt(in vec2 p, in float r, in float thickness) {- vec2 a = vec2(0.5) + vec2(-r, 0.0);- vec2 b = vec2(0.5) + vec2(r, 0.0);- float distToSegment = distSegment(p, a, b);- float halfThickness = thickness * r;- return distToSegment - halfThickness;- }-- void main() {- if (cropToBounds > 0.5) {- vec4 boundsCheck = texture2D(tScene, vUv);- if (boundsCheck.a < 0.01) {- gl_FragColor = vec4(0.0);- return;- }- }-- vec2 fragCoord =- (gl_FragCoord.xy / max(effectResolution, vec2(1.0))) * logicalResolution;- float halftoneSize = max(tile * max(footprintScale, 0.001), 1.0);- vec2 pointerPx = interactionUv * logicalResolution;- vec2 fragDelta = fragCoord - pointerPx;- float fragDist = length(fragDelta);- vec2 radialDir = fragDist > 0.001 ? fragDelta / fragDist : vec2(0.0, 1.0);- float velocityMagnitude = length(interactionVelocity);- vec2 motionDir = velocityMagnitude > 0.001- ? interactionVelocity / velocityMagnitude- : vec2(0.0, 0.0);- float motionBias = velocityMagnitude > 0.001- ? dot(-radialDir, motionDir) * 0.5 + 0.5- : 0.5;-- float hoverLightMask = 0.0;- if (hoverLightStrength > 0.0) {- float lightRadiusPx = hoverLightRadius * logicalResolution.y;- hoverLightMask = smoothstep(lightRadiusPx, 0.0, fragDist);- }-- float hoverHalftoneMask = 0.0;- if (hoverHalftoneActive > 0.0) {- float hoverHalftoneRadiusPx = hoverHalftoneRadius * logicalResolution.y;- hoverHalftoneMask =- smoothstep(hoverHalftoneRadiusPx, 0.0, fragDist) *- clamp(hoverHalftoneActive, 0.0, 1.0);- }-- float hoverFlowMask = 0.0;- if (hoverFlowStrength > 0.0) {- float hoverRadiusPx = hoverFlowRadius * logicalResolution.y;- hoverFlowMask = smoothstep(hoverRadiusPx, 0.0, fragDist);- }-- vec2 hoverDisplacement =- radialDir * hoverFlowStrength * hoverFlowMask * halftoneSize * 0.55 +- motionDir * hoverFlowStrength * hoverFlowMask * (0.4 + motionBias) * halftoneSize * 1.15;- vec2 travelDisplacement = dragOffset * dragFlowStrength * 0.45;- vec2 effectCoord = fragCoord + hoverDisplacement + travelDisplacement;-- float bandRow = floor(effectCoord.y / halftoneSize);- float waveOffset =- waveAmount * sin(time * waveSpeed + bandRow * 0.5) * halftoneSize;- effectCoord.x += waveOffset;-- vec2 cellIndex = floor(effectCoord / halftoneSize);- vec2 sampleUv = clamp(- (cellIndex + 0.5) * halftoneSize / logicalResolution,- vec2(0.0),- vec2(1.0)- );- vec2 cellUv = fract(effectCoord / halftoneSize);-- vec4 sceneSample = texture2D(tScene, sampleUv);- float mask = smoothstep(0.02, 0.08, sceneSample.a);- float localPower = clamp(- s_3 + hoverHalftonePowerShift * hoverHalftoneMask,- -1.5,- 1.5- );- float localWidth = clamp(- s_4 + hoverHalftoneWidthShift * hoverHalftoneMask,- 0.05,- 1.4- );- float lightLift =- hoverLightStrength * hoverLightMask * mix(0.78, 1.18, motionBias) * 0.22;- float tonalAverage = (- (- sceneSample.r +- sceneSample.g +- sceneSample.b +- localPower * length(vec2(0.5))- ) *- (1.0 / 3.0)- ) + lightLift;- float bandRadius = clamp(- max(tonalAverage, minimumTone),- 0.0,- 1.0- ) * 1.86 * 0.5;-- float alpha = 0.0;- if (bandRadius > 0.0001) {- float signedDistance = lineSimpleEt(cellUv, bandRadius, localWidth);- float edge = 0.02;- alpha = (1.0 - smoothstep(0.0, edge, signedDistance)) * mask;- }-- vec3 activeDashColor = mix(dashColor, hoverDashColor, hoverHalftoneMask);- vec3 color = activeDashColor * alpha;- gl_FragColor = vec4(color, alpha);-- #include <tonemapping_fragment>- #include <colorspace_fragment>- }-`;+import { useRef } from 'react';+import { useStepperBackgroundHalftone } from './use-stepper-background-halftone';const OverlayRoot = styled.div`inset: 0;@@ -255,353 +11,6 @@ const OverlayRoot = styled.div`z-index: 1;`;-type PointerState = {- hoverStrength: number;- mouseX: number;- mouseY: number;- pointerInside: boolean;- pointerVelocityX: number;- pointerVelocityY: number;- smoothedMouseX: number;- smoothedMouseY: number;-};--function createRenderTarget(width: number, height: number) {- return new THREE.WebGLRenderTarget(width, height, {- format: THREE.RGBAFormat,- magFilter: THREE.LinearFilter,- minFilter: THREE.LinearFilter,- });-}--function createPointerState(): PointerState {- return {- hoverStrength: 0,- mouseX: 0.5,- mouseY: 0.5,- pointerInside: false,- pointerVelocityX: 0,- pointerVelocityY: 0,- smoothedMouseX: 0.5,- smoothedMouseY: 0.5,- };-}--async function mountHalftoneCanvas({- container,- imageUrl,-}: {- container: HTMLDivElement;- imageUrl: string;-}) {- const getHeight = () => Math.max(container.clientHeight, 1);- const getWidth = () => Math.max(container.clientWidth, 1);- const getVirtualHeight = () => Math.max(VIRTUAL_RENDER_HEIGHT, getHeight());- const getVirtualWidth = () =>- Math.max(- Math.round(getVirtualHeight() * (getWidth() / Math.max(getHeight(), 1))),- 1,- );-- const image = await loadVisualImage(imageUrl, {- label: 'stepper background image',- });-- if (!container.isConnected) {- return;- }-- let renderLoop: VisualRenderLoop | null = null;- const renderer = tryCreateSiteWebGlRenderer({- alpha: true,- antialias: false,- onContextLost: () => {- renderLoop?.stop();- },- powerPreference: 'high-performance',- });-- if (renderer === null) {- return undefined;- }-- renderer.outputColorSpace = THREE.SRGBColorSpace;- renderer.setClearColor(0x000000, 0);- renderer.setPixelRatio(1);- renderer.setSize(getVirtualWidth(), getVirtualHeight(), false);-- const canvas = renderer.domElement;- canvas.setAttribute('aria-hidden', 'true');- canvas.style.display = 'block';- canvas.style.height = '100%';- canvas.style.touchAction = 'auto';- canvas.style.width = '100%';- container.appendChild(canvas);-- const interactionElement =- container.closest(STEPPER_VISUAL_POINTER_ROOT_SELECTOR) ??- container.parentElement?.parentElement ??- container;-- const interactionTarget: HTMLElement =- interactionElement instanceof HTMLElement ? interactionElement : container;-- const imageTexture = new THREE.Texture(image);- imageTexture.colorSpace = THREE.SRGBColorSpace;- imageTexture.generateMipmaps = false;- imageTexture.magFilter = THREE.LinearFilter;- imageTexture.minFilter = THREE.LinearFilter;- imageTexture.needsUpdate = true;-- const sceneTarget = createRenderTarget(getVirtualWidth(), getVirtualHeight());- const fullScreenGeometry = new THREE.PlaneGeometry(2, 2);- const orthographicCamera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);-- const imageMaterial = new THREE.ShaderMaterial({- fragmentShader: imagePassthroughFragmentShader,- uniforms: {- contrast: { value: HALFTONE_SETTINGS.halftone.imageContrast },- imageSize: { value: new THREE.Vector2(image.width, image.height) },- tImage: { value: imageTexture },- viewportSize: {- value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),- },- zoom: { value: getImagePreviewZoom(PREVIEW_DISTANCE) },- },- vertexShader: passThroughVertexShader,- });-- const halftoneMaterial = new THREE.ShaderMaterial({- fragmentShader: halftoneFragmentShader,- transparent: true,- uniforms: {- cropToBounds: { value: 1 },- dashColor: {- value: new THREE.Color(HALFTONE_SETTINGS.halftone.dashColor),- },- dragFlowStrength: { value: 0 },- dragOffset: { value: new THREE.Vector2(0, 0) },- effectResolution: {- value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),- },- footprintScale: { value: 1 },- hoverDashColor: {- value: new THREE.Color(HALFTONE_SETTINGS.halftone.hoverDashColor),- },- hoverFlowRadius: { value: 0.18 },- hoverFlowStrength: { value: 0 },- hoverHalftoneActive: { value: 0 },- hoverHalftonePowerShift: {- value: HALFTONE_SETTINGS.animation.hoverHalftonePowerShift,- },- hoverHalftoneRadius: {- value: HALFTONE_SETTINGS.animation.hoverHalftoneRadius,- },- hoverHalftoneWidthShift: { value: 0 },- hoverLightRadius: {- value: HALFTONE_SETTINGS.animation.hoverLightRadius,- },- hoverLightStrength: { value: 0 },- interactionUv: { value: new THREE.Vector2(0.5, 0.5) },- interactionVelocity: { value: new THREE.Vector2(0, 0) },- logicalResolution: {- value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),- },- minimumTone: { value: HALFTONE_SETTINGS.halftone.minimumTone },- s_3: { value: HALFTONE_SETTINGS.halftone.power },- s_4: { value: HALFTONE_SETTINGS.halftone.width },- tScene: { value: sceneTarget.texture },- tile: { value: HALFTONE_SETTINGS.halftone.scale },- time: { value: 0 },- waveAmount: {- value: HALFTONE_SETTINGS.animation.waveEnabled- ? HALFTONE_SETTINGS.animation.waveAmount- : 0,- },- waveSpeed: { value: HALFTONE_SETTINGS.animation.waveSpeed },- },- vertexShader: passThroughVertexShader,- });-- const imageScene = new THREE.Scene();- imageScene.add(new THREE.Mesh(fullScreenGeometry, imageMaterial));-- const postScene = new THREE.Scene();- postScene.add(new THREE.Mesh(fullScreenGeometry, halftoneMaterial));-- const updateViewportUniforms = (width: number, height: number) => {- halftoneMaterial.uniforms.effectResolution.value.set(width, height);- halftoneMaterial.uniforms.logicalResolution.value.set(width, height);- imageMaterial.uniforms.viewportSize.value.set(width, height);- };-- const getHalftoneScale = () =>- getImageFootprintScale({- imageHeight: image.height,- imageWidth: image.width,- previewDistance: PREVIEW_DISTANCE,- viewportHeight: getVirtualHeight(),- viewportWidth: getVirtualWidth(),- });-- const pointerState = createPointerState();-- const syncSize = () => {- const virtualWidth = getVirtualWidth();- const virtualHeight = getVirtualHeight();-- renderer.setSize(virtualWidth, virtualHeight, false);- sceneTarget.setSize(virtualWidth, virtualHeight);- updateViewportUniforms(virtualWidth, virtualHeight);- };-- const stopObservingSize = observeElementSize(container, syncSize);-- const updatePointerPosition = (- event: PointerEvent,- options?: { resetVelocity?: boolean },- ) => {- const rect = interactionTarget.getBoundingClientRect();- const width = Math.max(rect.width, 1);- const height = Math.max(rect.height, 1);-- const nextMouseX = THREE.MathUtils.clamp(- (event.clientX - rect.left) / width,- 0,- 1,- );- const nextMouseY = THREE.MathUtils.clamp(- (event.clientY - rect.top) / height,- 0,- 1,- );-- const deltaX = nextMouseX - pointerState.mouseX;- const deltaY = nextMouseY - pointerState.mouseY;-- pointerState.mouseX = nextMouseX;- pointerState.mouseY = nextMouseY;- pointerState.pointerInside =- event.clientX >= rect.left &&- event.clientX <= rect.right &&- event.clientY >= rect.top &&- event.clientY <= rect.bottom;-- if (options?.resetVelocity) {- pointerState.pointerVelocityX = 0;- pointerState.pointerVelocityY = 0;- pointerState.smoothedMouseX = nextMouseX;- pointerState.smoothedMouseY = nextMouseY;- return;- }-- pointerState.pointerVelocityX = deltaX;- pointerState.pointerVelocityY = deltaY;- };-- const handlePointerMove = (event: PointerEvent) => {- const shouldResetVelocity = !pointerState.pointerInside;- updatePointerPosition(- event,- shouldResetVelocity ? { resetVelocity: true } : undefined,- );- };-- const handlePointerLeave = () => {- pointerState.pointerInside = false;- pointerState.pointerVelocityX = 0;- pointerState.pointerVelocityY = 0;- };-- interactionTarget.addEventListener('pointerleave', handlePointerLeave);- interactionTarget.addEventListener('pointermove', handlePointerMove);-- const clock = new THREE.Timer();- clock.connect(document);-- const renderFrame = (timestamp?: number) => {- clock.update(timestamp);- const deltaSeconds = clock.getDelta();- const hoverEasing =- 1 -- Math.exp(- -deltaSeconds *- (pointerState.pointerInside ? HOVER_FADE_IN : HOVER_FADE_OUT),- );- pointerState.hoverStrength +=- ((pointerState.pointerInside ? 1 : 0) - pointerState.hoverStrength) *- hoverEasing;-- pointerState.smoothedMouseX +=- (pointerState.mouseX - pointerState.smoothedMouseX) * 0.38;- pointerState.smoothedMouseY +=- (pointerState.mouseY - pointerState.smoothedMouseY) * 0.38;- pointerState.pointerVelocityX *= 0.82;- pointerState.pointerVelocityY *= 0.82;-- halftoneMaterial.uniforms.footprintScale.value = getHalftoneScale();- halftoneMaterial.uniforms.hoverHalftoneActive.value = HALFTONE_SETTINGS- .animation.hoverHalftoneEnabled- ? pointerState.hoverStrength- : 0;- halftoneMaterial.uniforms.hoverHalftonePowerShift.value = HALFTONE_SETTINGS- .animation.hoverHalftoneEnabled- ? HALFTONE_SETTINGS.animation.hoverHalftonePowerShift- : 0;- halftoneMaterial.uniforms.hoverHalftoneWidthShift.value = HALFTONE_SETTINGS- .animation.hoverHalftoneEnabled- ? HALFTONE_SETTINGS.animation.hoverHalftoneWidthShift- : 0;- halftoneMaterial.uniforms.hoverLightStrength.value = HALFTONE_SETTINGS- .animation.hoverLightEnabled- ? HALFTONE_SETTINGS.animation.hoverLightIntensity *- pointerState.hoverStrength- : 0;- halftoneMaterial.uniforms.interactionUv.value.set(- pointerState.smoothedMouseX,- 1 - pointerState.smoothedMouseY,- );- halftoneMaterial.uniforms.interactionVelocity.value.set(- pointerState.pointerVelocityX * getVirtualWidth(),- -pointerState.pointerVelocityY * getVirtualHeight(),- );- halftoneMaterial.uniforms.time.value = clock.getElapsed();- imageMaterial.uniforms.zoom.value = getImagePreviewZoom(PREVIEW_DISTANCE);-- renderer.setRenderTarget(sceneTarget);- renderer.render(imageScene, orthographicCamera);-- renderer.setRenderTarget(null);- renderer.clear();- renderer.render(postScene, orthographicCamera);- };-- renderLoop = createVisualRenderLoop({- renderFrame,- target: container,- targetVisibilityOptions: { rootMargin: '100px' },- });- renderLoop.start();-- return () => {- renderLoop?.dispose();- clock.dispose();- stopObservingSize();- interactionTarget.removeEventListener('pointerleave', handlePointerLeave);- interactionTarget.removeEventListener('pointermove', handlePointerMove);- fullScreenGeometry.dispose();- halftoneMaterial.dispose();- imageMaterial.dispose();- imageTexture.dispose();- renderer.dispose();- sceneTarget.dispose();-- if (canvas.parentNode === container) {- container.removeChild(canvas);- }- };-}-type StepperBackgroundHalftoneProps = {imageUrl?: string;};@@ -611,42 +20,7 @@ export function StepperBackgroundHalftone({}: StepperBackgroundHalftoneProps) {const mountReference = useRef<HTMLDivElement>(null);- useEffect(() => {- if (getPrefersReducedMotionSnapshot()) {- return;- }-- const container = mountReference.current;-- if (!container) {- return;- }-- let cleanup: (() => void) | undefined;- let isDisposed = false;-- void mountHalftoneCanvas({ container, imageUrl })- .then((nextCleanup) => {- if (!nextCleanup) {- return;- }-- if (isDisposed) {- nextCleanup();- return;- }-- cleanup = nextCleanup;- })- .catch((error: unknown) => {- console.error(error);- });-- return () => {- isDisposed = true;- cleanup?.();- };- }, [imageUrl]);+ useStepperBackgroundHalftone({ imageUrl, mountRef: mountReference });return <OverlayRoot aria-hidden ref={mountReference} />;}diff --git a/packages/twenty-website-new/src/sections/HomeStepper/components/Visual/StepperLottie.tsx b/packages/twenty-website-new/src/sections/HomeStepper/components/Visual/StepperLottie.tsxindex 863474b424f..8bbf876810b 100644--- a/packages/twenty-website-new/src/sections/HomeStepper/components/Visual/StepperLottie.tsx+++ b/packages/twenty-website-new/src/sections/HomeStepper/components/Visual/StepperLottie.tsx@@ -1,22 +1,13 @@'use client';import { styled } from '@linaria/react';-import { DotLottieReact, type DotLottie } from '@lottiefiles/dotlottie-react';-import {- useCallback,- useEffect,- useLayoutEffect,- useRef,- useState,-} from 'react';+import { DotLottieReact } from '@lottiefiles/dotlottie-react';-import {- HOME_STEPPER_LOTTIE_EXPECTED_TOTAL_FRAMES,- scrollProgressToHomeStepperLottieFrame,-} from '@/sections/HomeStepper/utils/home-stepper-lottie-frame-map';import { theme } from '@/theme';-export const HOME_STEPPER_LOTTIE_SRC =+import { useDotLottieScrollSync } from './use-dot-lottie-scroll-sync';++const HOME_STEPPER_LOTTIE_SRC ='/lottie/stepper/stepper.lottie?v=data-model-icon-white-4-logic-outline';const LottieSlot = styled.div`@@ -32,64 +23,8 @@ type StepperLottieProps = {scrollProgress: number;};-function applyScrollToDotLottie(- dotLottie: DotLottie | null,- scrollProgress: number,- totalFrames: number,-) {- if (!dotLottie?.isLoaded || totalFrames <= 0) {- return;- }- const frame = scrollProgressToHomeStepperLottieFrame(- scrollProgress,- totalFrames,- );- dotLottie.setFrame(frame);-}-export function StepperLottie({ scrollProgress }: StepperLottieProps) {- const [player, setPlayer] = useState<DotLottie | null>(null);- const [totalFrames, setTotalFrames] = useState(0);- const scrollProgressRef = useRef(scrollProgress);- scrollProgressRef.current = scrollProgress;-- const dotLottieRefCallback = useCallback((instance: DotLottie | null) => {- setPlayer(instance);- }, []);-- useEffect(() => {- if (!player) {- setTotalFrames(0);- return;- }-- const onReady = () => {- const frames = Math.floor(player.totalFrames);- if (frames > 0 && frames !== HOME_STEPPER_LOTTIE_EXPECTED_TOTAL_FRAMES) {- console.error(- `[StepperLottie] Lottie totalFrames mismatch — expected ${HOME_STEPPER_LOTTIE_EXPECTED_TOTAL_FRAMES}, got ${frames} (raw player.totalFrames=${player.totalFrames}). ` +- 'The scroll → frame mapping in home-stepper-lottie-frame-map.ts is tied to the authored timeline; ' +- 'update HOME_STEPPER_LOTTIE_EXPECTED_TOTAL_FRAMES and the STEP_*_END constants together.',- );- }- setTotalFrames(frames);- applyScrollToDotLottie(player, scrollProgressRef.current, frames);- };-- if (player.isLoaded) {- onReady();- return;- }-- player.addEventListener('load', onReady);- return () => {- player.removeEventListener('load', onReady);- };- }, [player]);-- useLayoutEffect(() => {- applyScrollToDotLottie(player, scrollProgress, totalFrames);- }, [player, scrollProgress, totalFrames]);+ const dotLottieRefCallback = useDotLottieScrollSync(scrollProgress);return (<LottieSlot aria-hidden>diff --git a/packages/twenty-website-new/src/sections/HomeStepper/components/Visual/use-dot-lottie-scroll-sync.ts b/packages/twenty-website-new/src/sections/HomeStepper/components/Visual/use-dot-lottie-scroll-sync.tsnew file mode 100644index 00000000000..b7755c36462--- /dev/null+++ b/packages/twenty-website-new/src/sections/HomeStepper/components/Visual/use-dot-lottie-scroll-sync.ts@@ -0,0 +1,71 @@+'use client';++import { useCallback, useEffect, useRef, useState } from 'react';++import type { DotLottie } from '@lottiefiles/dotlottie-react';++import { scrollProgressToHomeStepperLottieFrame } from '@/sections/HomeStepper/utils/home-stepper-lottie-frame-map';++const HOME_STEPPER_LOTTIE_EXPECTED_TOTAL_FRAMES = 1439;++function applyScrollToDotLottie(+ dotLottie: DotLottie | null,+ scrollProgress: number,+ totalFrames: number,+) {+ if (!dotLottie?.isLoaded || totalFrames <= 0) {+ return;+ }+ const frame = scrollProgressToHomeStepperLottieFrame(+ scrollProgress,+ totalFrames,+ );+ dotLottie.setFrame(frame);+}++export function useDotLottieScrollSync(scrollProgress: number) {+ const [player, setPlayer] = useState<DotLottie | null>(null);+ const [totalFrames, setTotalFrames] = useState(0);+ const scrollProgressRef = useRef(scrollProgress);+ scrollProgressRef.current = scrollProgress;++ const dotLottieRefCallback = useCallback((instance: DotLottie | null) => {+ setPlayer(instance);+ }, []);++ useEffect(() => {+ if (!player) {+ setTotalFrames(0);+ return;+ }++ const onReady = () => {+ const frames = Math.floor(player.totalFrames);+ if (frames > 0 && frames !== HOME_STEPPER_LOTTIE_EXPECTED_TOTAL_FRAMES) {+ console.error(+ `[StepperLottie] Lottie totalFrames mismatch — expected ${HOME_STEPPER_LOTTIE_EXPECTED_TOTAL_FRAMES}, got ${frames} (raw player.totalFrames=${player.totalFrames}). ` ++ 'The scroll → frame mapping in home-stepper-lottie-frame-map.ts is tied to the authored timeline; ' ++ 'update HOME_STEPPER_LOTTIE_EXPECTED_TOTAL_FRAMES and the STEP_*_END constants together.',+ );+ }+ setTotalFrames(frames);+ applyScrollToDotLottie(player, scrollProgressRef.current, frames);+ };++ if (player.isLoaded) {+ onReady();+ return;+ }++ player.addEventListener('load', onReady);+ return () => {+ player.removeEventListener('load', onReady);+ };+ }, [player]);++ useEffect(() => {+ applyScrollToDotLottie(player, scrollProgress, totalFrames);+ }, [player, scrollProgress, totalFrames]);++ return dotLottieRefCallback;+}diff --git a/packages/twenty-website-new/src/sections/HomeStepper/components/Visual/use-stepper-background-halftone.ts b/packages/twenty-website-new/src/sections/HomeStepper/components/Visual/use-stepper-background-halftone.tsnew file mode 100644index 00000000000..102b64a077e--- /dev/null+++ b/packages/twenty-website-new/src/sections/HomeStepper/components/Visual/use-stepper-background-halftone.ts@@ -0,0 +1,640 @@+'use client';++import {+ VIRTUAL_RENDER_HEIGHT,+ getImageFootprintScale,+ getImagePreviewZoom,+} from '@/lib/halftone';+import { observeElementSize } from '@/lib/dom/observe-element-size';+import { getPrefersReducedMotionSnapshot } from '@/lib/motion';+import {+ createVisualRenderLoop,+ loadVisualImage,+ tryCreateSiteWebGlRenderer,+ type VisualRenderLoop,+} from '@/lib/visual-runtime';+import { useEffect, type RefObject } from 'react';+import * as THREE from 'three';+import { STEPPER_VISUAL_POINTER_ROOT_SELECTOR } from '../stepper-visual-pointer-root-selector';++const PREVIEW_DISTANCE = 4;+const HOVER_FADE_IN = 18;+const HOVER_FADE_OUT = 7;++const HALFTONE_SETTINGS = {+ animation: {+ hoverHalftoneEnabled: true,+ hoverHalftonePowerShift: 0.62,+ hoverHalftoneRadius: 0.6,+ hoverHalftoneWidthShift: -0.18,+ hoverLightEnabled: false,+ hoverLightIntensity: 0.12,+ hoverLightRadius: 0.8,+ waveAmount: 2,+ waveEnabled: false,+ waveSpeed: 1,+ },+ halftone: {+ dashColor: '#dddddd',+ hoverDashColor: '#FFF',+ imageContrast: 1.12,+ minimumTone: 0.26,+ power: 0.18,+ scale: 12,+ width: 0.72,+ },+};++const passThroughVertexShader = /* glsl */ `+ varying vec2 vUv;++ void main() {+ vUv = uv;+ gl_Position = vec4(position, 1.0);+ }+`;++const imagePassthroughFragmentShader = /* glsl */ `+ precision highp float;++ uniform sampler2D tImage;+ uniform vec2 imageSize;+ uniform vec2 viewportSize;+ uniform float zoom;+ uniform float contrast;++ varying vec2 vUv;++ void main() {+ float imageAspect = imageSize.x / imageSize.y;+ float viewAspect = viewportSize.x / viewportSize.y;++ vec2 uv = vUv;++ if (imageAspect > viewAspect) {+ float scale = viewAspect / imageAspect;+ uv.x = (uv.x - 0.5) * scale + 0.5;+ } else {+ float scale = imageAspect / viewAspect;+ uv.y = (uv.y - 0.5) * scale + 0.5;+ }++ uv = (uv - 0.5) / zoom + 0.5;++ float inBounds = step(0.0, uv.x) * step(uv.x, 1.0)+ * step(0.0, uv.y) * step(uv.y, 1.0);++ vec4 color = texture2D(tImage, clamp(uv, 0.0, 1.0));+ vec3 contrastColor = clamp((color.rgb - 0.5) * contrast + 0.5, 0.0, 1.0);++ gl_FragColor = vec4(contrastColor, inBounds);+ }+`;++const halftoneFragmentShader = /* glsl */ `+ precision highp float;++ uniform sampler2D tScene;+ uniform vec2 effectResolution;+ uniform vec2 logicalResolution;+ uniform float tile;+ uniform float s_3;+ uniform float s_4;+ uniform vec3 dashColor;+ uniform vec3 hoverDashColor;+ uniform float minimumTone;+ uniform float time;+ uniform float waveAmount;+ uniform float waveSpeed;+ uniform float footprintScale;+ uniform vec2 interactionUv;+ uniform vec2 interactionVelocity;+ uniform vec2 dragOffset;+ uniform float hoverHalftoneActive;+ uniform float hoverHalftonePowerShift;+ uniform float hoverHalftoneRadius;+ uniform float hoverHalftoneWidthShift;+ uniform float hoverLightStrength;+ uniform float hoverLightRadius;+ uniform float hoverFlowStrength;+ uniform float hoverFlowRadius;+ uniform float dragFlowStrength;+ uniform float cropToBounds;++ varying vec2 vUv;++ float distSegment(in vec2 p, in vec2 a, in vec2 b) {+ vec2 pa = p - a;+ vec2 ba = b - a;+ float denom = max(dot(ba, ba), 0.000001);+ float h = clamp(dot(pa, ba) / denom, 0.0, 1.0);+ return length(pa - ba * h);+ }++ float lineSimpleEt(in vec2 p, in float r, in float thickness) {+ vec2 a = vec2(0.5) + vec2(-r, 0.0);+ vec2 b = vec2(0.5) + vec2(r, 0.0);+ float distToSegment = distSegment(p, a, b);+ float halfThickness = thickness * r;+ return distToSegment - halfThickness;+ }++ void main() {+ if (cropToBounds > 0.5) {+ vec4 boundsCheck = texture2D(tScene, vUv);+ if (boundsCheck.a < 0.01) {+ gl_FragColor = vec4(0.0);+ return;+ }+ }++ vec2 fragCoord =+ (gl_FragCoord.xy / max(effectResolution, vec2(1.0))) * logicalResolution;+ float halftoneSize = max(tile * max(footprintScale, 0.001), 1.0);+ vec2 pointerPx = interactionUv * logicalResolution;+ vec2 fragDelta = fragCoord - pointerPx;+ float fragDist = length(fragDelta);+ vec2 radialDir = fragDist > 0.001 ? fragDelta / fragDist : vec2(0.0, 1.0);+ float velocityMagnitude = length(interactionVelocity);+ vec2 motionDir = velocityMagnitude > 0.001+ ? interactionVelocity / velocityMagnitude+ : vec2(0.0, 0.0);+ float motionBias = velocityMagnitude > 0.001+ ? dot(-radialDir, motionDir) * 0.5 + 0.5+ : 0.5;++ float hoverLightMask = 0.0;+ if (hoverLightStrength > 0.0) {+ float lightRadiusPx = hoverLightRadius * logicalResolution.y;+ hoverLightMask = smoothstep(lightRadiusPx, 0.0, fragDist);+ }++ float hoverHalftoneMask = 0.0;+ if (hoverHalftoneActive > 0.0) {+ float hoverHalftoneRadiusPx = hoverHalftoneRadius * logicalResolution.y;+ hoverHalftoneMask =+ smoothstep(hoverHalftoneRadiusPx, 0.0, fragDist) *+ clamp(hoverHalftoneActive, 0.0, 1.0);+ }++ float hoverFlowMask = 0.0;+ if (hoverFlowStrength > 0.0) {+ float hoverRadiusPx = hoverFlowRadius * logicalResolution.y;+ hoverFlowMask = smoothstep(hoverRadiusPx, 0.0, fragDist);+ }++ vec2 hoverDisplacement =+ radialDir * hoverFlowStrength * hoverFlowMask * halftoneSize * 0.55 ++ motionDir * hoverFlowStrength * hoverFlowMask * (0.4 + motionBias) * halftoneSize * 1.15;+ vec2 travelDisplacement = dragOffset * dragFlowStrength * 0.45;+ vec2 effectCoord = fragCoord + hoverDisplacement + travelDisplacement;++ float bandRow = floor(effectCoord.y / halftoneSize);+ float waveOffset =+ waveAmount * sin(time * waveSpeed + bandRow * 0.5) * halftoneSize;+ effectCoord.x += waveOffset;++ vec2 cellIndex = floor(effectCoord / halftoneSize);+ vec2 sampleUv = clamp(+ (cellIndex + 0.5) * halftoneSize / logicalResolution,+ vec2(0.0),+ vec2(1.0)+ );+ vec2 cellUv = fract(effectCoord / halftoneSize);++ vec4 sceneSample = texture2D(tScene, sampleUv);+ float mask = smoothstep(0.02, 0.08, sceneSample.a);+ float localPower = clamp(+ s_3 + hoverHalftonePowerShift * hoverHalftoneMask,+ -1.5,+ 1.5+ );+ float localWidth = clamp(+ s_4 + hoverHalftoneWidthShift * hoverHalftoneMask,+ 0.05,+ 1.4+ );+ float lightLift =+ hoverLightStrength * hoverLightMask * mix(0.78, 1.18, motionBias) * 0.22;+ float tonalAverage = (+ (+ sceneSample.r ++ sceneSample.g ++ sceneSample.b ++ localPower * length(vec2(0.5))+ ) *+ (1.0 / 3.0)+ ) + lightLift;+ float bandRadius = clamp(+ max(tonalAverage, minimumTone),+ 0.0,+ 1.0+ ) * 1.86 * 0.5;++ float alpha = 0.0;+ if (bandRadius > 0.0001) {+ float signedDistance = lineSimpleEt(cellUv, bandRadius, localWidth);+ float edge = 0.02;+ alpha = (1.0 - smoothstep(0.0, edge, signedDistance)) * mask;+ }++ vec3 activeDashColor = mix(dashColor, hoverDashColor, hoverHalftoneMask);+ vec3 color = activeDashColor * alpha;+ gl_FragColor = vec4(color, alpha);++ #include <tonemapping_fragment>+ #include <colorspace_fragment>+ }+`;++type PointerState = {+ hoverStrength: number;+ mouseX: number;+ mouseY: number;+ pointerInside: boolean;+ pointerVelocityX: number;+ pointerVelocityY: number;+ smoothedMouseX: number;+ smoothedMouseY: number;+};++function createRenderTarget(width: number, height: number) {+ return new THREE.WebGLRenderTarget(width, height, {+ format: THREE.RGBAFormat,+ magFilter: THREE.LinearFilter,+ minFilter: THREE.LinearFilter,+ });+}++function createPointerState(): PointerState {+ return {+ hoverStrength: 0,+ mouseX: 0.5,+ mouseY: 0.5,+ pointerInside: false,+ pointerVelocityX: 0,+ pointerVelocityY: 0,+ smoothedMouseX: 0.5,+ smoothedMouseY: 0.5,+ };+}++async function mountHalftoneCanvas({+ container,+ imageUrl,+}: {+ container: HTMLDivElement;+ imageUrl: string;+}) {+ const getHeight = () => Math.max(container.clientHeight, 1);+ const getWidth = () => Math.max(container.clientWidth, 1);+ const getVirtualHeight = () => Math.max(VIRTUAL_RENDER_HEIGHT, getHeight());+ const getVirtualWidth = () =>+ Math.max(+ Math.round(getVirtualHeight() * (getWidth() / Math.max(getHeight(), 1))),+ 1,+ );++ const image = await loadVisualImage(imageUrl, {+ label: 'stepper background image',+ });++ if (!container.isConnected) {+ return;+ }++ let renderLoop: VisualRenderLoop | null = null;+ const renderer = tryCreateSiteWebGlRenderer({+ alpha: true,+ antialias: false,+ onContextLost: () => {+ renderLoop?.stop();+ },+ powerPreference: 'high-performance',+ });++ if (renderer === null) {+ return undefined;+ }++ renderer.outputColorSpace = THREE.SRGBColorSpace;+ renderer.setClearColor(0x000000, 0);+ renderer.setPixelRatio(1);+ renderer.setSize(getVirtualWidth(), getVirtualHeight(), false);++ const canvas = renderer.domElement;+ canvas.setAttribute('aria-hidden', 'true');+ canvas.style.display = 'block';+ canvas.style.height = '100%';+ canvas.style.touchAction = 'auto';+ canvas.style.width = '100%';+ container.appendChild(canvas);++ const interactionElement =+ container.closest(STEPPER_VISUAL_POINTER_ROOT_SELECTOR) ??+ container.parentElement?.parentElement ??+ container;++ const interactionTarget: HTMLElement =+ interactionElement instanceof HTMLElement ? interactionElement : container;++ const imageTexture = new THREE.Texture(image);+ imageTexture.colorSpace = THREE.SRGBColorSpace;+ imageTexture.generateMipmaps = false;+ imageTexture.magFilter = THREE.LinearFilter;+ imageTexture.minFilter = THREE.LinearFilter;+ imageTexture.needsUpdate = true;++ const sceneTarget = createRenderTarget(getVirtualWidth(), getVirtualHeight());+ const fullScreenGeometry = new THREE.PlaneGeometry(2, 2);+ const orthographicCamera = new THREE.OrthographicCamera(-1, 1, 1, -1, 0, 1);++ const imageMaterial = new THREE.ShaderMaterial({+ fragmentShader: imagePassthroughFragmentShader,+ uniforms: {+ contrast: { value: HALFTONE_SETTINGS.halftone.imageContrast },+ imageSize: { value: new THREE.Vector2(image.width, image.height) },+ tImage: { value: imageTexture },+ viewportSize: {+ value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),+ },+ zoom: { value: getImagePreviewZoom(PREVIEW_DISTANCE) },+ },+ vertexShader: passThroughVertexShader,+ });++ const halftoneMaterial = new THREE.ShaderMaterial({+ fragmentShader: halftoneFragmentShader,+ transparent: true,+ uniforms: {+ cropToBounds: { value: 1 },+ dashColor: {+ value: new THREE.Color(HALFTONE_SETTINGS.halftone.dashColor),+ },+ dragFlowStrength: { value: 0 },+ dragOffset: { value: new THREE.Vector2(0, 0) },+ effectResolution: {+ value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),+ },+ footprintScale: { value: 1 },+ hoverDashColor: {+ value: new THREE.Color(HALFTONE_SETTINGS.halftone.hoverDashColor),+ },+ hoverFlowRadius: { value: 0.18 },+ hoverFlowStrength: { value: 0 },+ hoverHalftoneActive: { value: 0 },+ hoverHalftonePowerShift: {+ value: HALFTONE_SETTINGS.animation.hoverHalftonePowerShift,+ },+ hoverHalftoneRadius: {+ value: HALFTONE_SETTINGS.animation.hoverHalftoneRadius,+ },+ hoverHalftoneWidthShift: { value: 0 },+ hoverLightRadius: {+ value: HALFTONE_SETTINGS.animation.hoverLightRadius,+ },+ hoverLightStrength: { value: 0 },+ interactionUv: { value: new THREE.Vector2(0.5, 0.5) },+ interactionVelocity: { value: new THREE.Vector2(0, 0) },+ logicalResolution: {+ value: new THREE.Vector2(getVirtualWidth(), getVirtualHeight()),+ },+ minimumTone: { value: HALFTONE_SETTINGS.halftone.minimumTone },+ s_3: { value: HALFTONE_SETTINGS.halftone.power },+ s_4: { value: HALFTONE_SETTINGS.halftone.width },+ tScene: { value: sceneTarget.texture },+ tile: { value: HALFTONE_SETTINGS.halftone.scale },+ time: { value: 0 },+ waveAmount: {+ value: HALFTONE_SETTINGS.animation.waveEnabled+ ? HALFTONE_SETTINGS.animation.waveAmount+ : 0,+ },+ waveSpeed: { value: HALFTONE_SETTINGS.animation.waveSpeed },+ },+ vertexShader: passThroughVertexShader,+ });++ const imageScene = new THREE.Scene();+ imageScene.add(new THREE.Mesh(fullScreenGeometry, imageMaterial));++ const postScene = new THREE.Scene();+ postScene.add(new THREE.Mesh(fullScreenGeometry, halftoneMaterial));++ const updateViewportUniforms = (width: number, height: number) => {+ halftoneMaterial.uniforms.effectResolution.value.set(width, height);+ halftoneMaterial.uniforms.logicalResolution.value.set(width, height);+ imageMaterial.uniforms.viewportSize.value.set(width, height);+ };++ const getHalftoneScale = () =>+ getImageFootprintScale({+ imageHeight: image.height,+ imageWidth: image.width,+ previewDistance: PREVIEW_DISTANCE,+ viewportHeight: getVirtualHeight(),+ viewportWidth: getVirtualWidth(),+ });++ const pointerState = createPointerState();++ const syncSize = () => {+ const virtualWidth = getVirtualWidth();+ const virtualHeight = getVirtualHeight();++ renderer.setSize(virtualWidth, virtualHeight, false);+ sceneTarget.setSize(virtualWidth, virtualHeight);+ updateViewportUniforms(virtualWidth, virtualHeight);+ };++ const stopObservingSize = observeElementSize(container, syncSize);++ const updatePointerPosition = (+ event: PointerEvent,+ options?: { resetVelocity?: boolean },+ ) => {+ const rect = interactionTarget.getBoundingClientRect();+ const width = Math.max(rect.width, 1);+ const height = Math.max(rect.height, 1);++ const nextMouseX = THREE.MathUtils.clamp(+ (event.clientX - rect.left) / width,+ 0,+ 1,+ );+ const nextMouseY = THREE.MathUtils.clamp(+ (event.clientY - rect.top) / height,+ 0,+ 1,+ );++ const deltaX = nextMouseX - pointerState.mouseX;+ const deltaY = nextMouseY - pointerState.mouseY;++ pointerState.mouseX = nextMouseX;+ pointerState.mouseY = nextMouseY;+ pointerState.pointerInside =+ event.clientX >= rect.left &&+ event.clientX <= rect.right &&+ event.clientY >= rect.top &&+ event.clientY <= rect.bottom;++ if (options?.resetVelocity) {+ pointerState.pointerVelocityX = 0;+ pointerState.pointerVelocityY = 0;+ pointerState.smoothedMouseX = nextMouseX;+ pointerState.smoothedMouseY = nextMouseY;+ return;+ }++ pointerState.pointerVelocityX = deltaX;+ pointerState.pointerVelocityY = deltaY;+ };++ const handlePointerMove = (event: PointerEvent) => {+ const shouldResetVelocity = !pointerState.pointerInside;+ updatePointerPosition(+ event,+ shouldResetVelocity ? { resetVelocity: true } : undefined,+ );+ };++ const handlePointerLeave = () => {+ pointerState.pointerInside = false;+ pointerState.pointerVelocityX = 0;+ pointerState.pointerVelocityY = 0;+ };++ interactionTarget.addEventListener('pointerleave', handlePointerLeave);+ interactionTarget.addEventListener('pointermove', handlePointerMove);++ const clock = new THREE.Timer();+ clock.connect(document);++ const renderFrame = (timestamp?: number) => {+ clock.update(timestamp);+ const deltaSeconds = clock.getDelta();+ const hoverEasing =+ 1 -+ Math.exp(+ -deltaSeconds *+ (pointerState.pointerInside ? HOVER_FADE_IN : HOVER_FADE_OUT),+ );+ pointerState.hoverStrength +=+ ((pointerState.pointerInside ? 1 : 0) - pointerState.hoverStrength) *+ hoverEasing;++ pointerState.smoothedMouseX +=+ (pointerState.mouseX - pointerState.smoothedMouseX) * 0.38;+ pointerState.smoothedMouseY +=+ (pointerState.mouseY - pointerState.smoothedMouseY) * 0.38;+ pointerState.pointerVelocityX *= 0.82;+ pointerState.pointerVelocityY *= 0.82;++ halftoneMaterial.uniforms.footprintScale.value = getHalftoneScale();+ halftoneMaterial.uniforms.hoverHalftoneActive.value = HALFTONE_SETTINGS+ .animation.hoverHalftoneEnabled+ ? pointerState.hoverStrength+ : 0;+ halftoneMaterial.uniforms.hoverHalftonePowerShift.value = HALFTONE_SETTINGS+ .animation.hoverHalftoneEnabled+ ? HALFTONE_SETTINGS.animation.hoverHalftonePowerShift+ : 0;+ halftoneMaterial.uniforms.hoverHalftoneWidthShift.value = HALFTONE_SETTINGS+ .animation.hoverHalftoneEnabled+ ? HALFTONE_SETTINGS.animation.hoverHalftoneWidthShift+ : 0;+ halftoneMaterial.uniforms.hoverLightStrength.value = HALFTONE_SETTINGS+ .animation.hoverLightEnabled+ ? HALFTONE_SETTINGS.animation.hoverLightIntensity *+ pointerState.hoverStrength+ : 0;+ halftoneMaterial.uniforms.interactionUv.value.set(+ pointerState.smoothedMouseX,+ 1 - pointerState.smoothedMouseY,+ );+ halftoneMaterial.uniforms.interactionVelocity.value.set(+ pointerState.pointerVelocityX * getVirtualWidth(),+ -pointerState.pointerVelocityY * getVirtualHeight(),+ );+ halftoneMaterial.uniforms.time.value = clock.getElapsed();+ imageMaterial.uniforms.zoom.value = getImagePreviewZoom(PREVIEW_DISTANCE);++ renderer.setRenderTarget(sceneTarget);+ renderer.render(imageScene, orthographicCamera);++ renderer.setRenderTarget(null);+ renderer.clear();+ renderer.render(postScene, orthographicCamera);+ };++ renderLoop = createVisualRenderLoop({+ renderFrame,+ target: container,+ targetVisibilityOptions: { rootMargin: '100px' },+ });+ renderLoop.start();++ return () => {+ renderLoop?.dispose();+ clock.dispose();+ stopObservingSize();+ interactionTarget.removeEventListener('pointerleave', handlePointerLeave);+ interactionTarget.removeEventListener('pointermove', handlePointerMove);+ fullScreenGeometry.dispose();+ halftoneMaterial.dispose();+ imageMaterial.dispose();+ imageTexture.dispose();+ renderer.dispose();+ sceneTarget.dispose();++ if (canvas.parentNode === container) {+ container.removeChild(canvas);+ }+ };+}++export function useStepperBackgroundHalftone({+ imageUrl,+ mountRef,+}: {+ imageUrl: string;+ mountRef: RefObject<HTMLDivElement | null>;+}) {+ useEffect(() => {+ if (getPrefersReducedMotionSnapshot()) {+ return;+ }++ const container = mountRef.current;++ if (!container) {+ return;+ }++ let cleanup: (() => void) | undefined;+ let isDisposed = false;++ void mountHalftoneCanvas({ container, imageUrl })+ .then((nextCleanup) => {+ if (!nextCleanup) {+ return;+ }++ if (isDisposed) {+ nextCleanup();+ return;+ }++ cleanup = nextCleanup;+ })+ .catch((error: unknown) => {+ console.error(error);+ });++ return () => {+ isDisposed = true;+ cleanup?.();+ };+ }, [imageUrl, mountRef]);+}diff --git a/packages/twenty-website-new/src/sections/HomeStepper/components/stepper-visual-pointer-root-selector.ts b/packages/twenty-website-new/src/sections/HomeStepper/components/stepper-visual-pointer-root-selector.tsnew file mode 100644index 00000000000..ad24c6b2c19--- /dev/null+++ b/packages/twenty-website-new/src/sections/HomeStepper/components/stepper-visual-pointer-root-selector.ts@@ -0,0 +1,2 @@+export const STEPPER_VISUAL_POINTER_ROOT_SELECTOR =+ '[data-stepper-visual-pointer-root]';diff --git a/packages/twenty-website-new/src/sections/HomeStepper/index.ts b/packages/twenty-website-new/src/sections/HomeStepper/index.tsnew file mode 100644index 00000000000..33ed602e6c3--- /dev/null+++ b/packages/twenty-website-new/src/sections/HomeStepper/index.ts@@ -0,0 +1,2 @@+export { HomeStepper } from './components';+export type { HomeStepperStepType } from './types';diff --git a/packages/twenty-website-new/src/sections/HomeStepper/types/HomeStepperData.ts b/packages/twenty-website-new/src/sections/HomeStepper/types/HomeStepperData.tsdeleted file mode 100644index 7986a031a7f..00000000000--- a/packages/twenty-website-new/src/sections/HomeStepper/types/HomeStepperData.ts+++ /dev/null@@ -1,5 +0,0 @@-import type { HomeStepperStepType } from '@/sections/HomeStepper/types/HomeStepperStep';--export type HomeStepperDataType = {- steps: HomeStepperStepType[];-};diff --git a/packages/twenty-website-new/src/sections/HomeStepper/types/HomeStepperStep.ts b/packages/twenty-website-new/src/sections/HomeStepper/types/HomeStepperStep.tsdeleted file mode 100644index 5baa6332932..00000000000--- a/packages/twenty-website-new/src/sections/HomeStepper/types/HomeStepperStep.ts+++ /dev/null@@ -1,7 +0,0 @@-import type { MessageBody } from '@/lib/i18n/message-body';-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';--export type HomeStepperStepType = {- body: MessageBody;- heading: MessageHeadingSegment[];-};diff --git a/packages/twenty-website-new/src/sections/HomeStepper/types/home-stepper-step.ts b/packages/twenty-website-new/src/sections/HomeStepper/types/home-stepper-step.tsnew file mode 100644index 00000000000..1e94c39cdbf--- /dev/null+++ b/packages/twenty-website-new/src/sections/HomeStepper/types/home-stepper-step.ts@@ -0,0 +1,7 @@+import type { MessageDescriptor } from '@lingui/core';+import type { ReactNode } from 'react';++export type HomeStepperStepType = {+ body: MessageDescriptor;+ heading: ReactNode;+};diff --git a/packages/twenty-website-new/src/sections/HomeStepper/types/index.ts b/packages/twenty-website-new/src/sections/HomeStepper/types/index.tsindex 7a81adbfe2b..e151f513fe4 100644--- a/packages/twenty-website-new/src/sections/HomeStepper/types/index.ts+++ b/packages/twenty-website-new/src/sections/HomeStepper/types/index.ts@@ -1,2 +1 @@-export type { HomeStepperDataType } from './HomeStepperData';-export type { HomeStepperStepType } from './HomeStepperStep';+export type { HomeStepperStepType } from './home-stepper-step';diff --git a/packages/twenty-website-new/src/sections/HomeStepper/utils/home-stepper-lottie-frame-map.ts b/packages/twenty-website-new/src/sections/HomeStepper/utils/home-stepper-lottie-frame-map.tsindex 4ca4aefc1fb..1e53e5cacb3 100644--- a/packages/twenty-website-new/src/sections/HomeStepper/utils/home-stepper-lottie-frame-map.ts+++ b/packages/twenty-website-new/src/sections/HomeStepper/utils/home-stepper-lottie-frame-map.ts@@ -4,20 +4,9 @@ function clampUnit(value: number): number {return Math.max(0, Math.min(1, value));}-const STEP_1_HOLD_END = 240;const STEP_1_TRANSITION_END = 285;-const STEP_2_HOLD_END = 880;const STEP_2_TRANSITION_END = 925;-export const HOME_STEPPER_LOTTIE_EXPECTED_TOTAL_FRAMES = 1439;--export const HOME_STEPPER_HOLD_FRACTIONS = [- STEP_1_HOLD_END / STEP_1_TRANSITION_END,- (STEP_2_HOLD_END - STEP_1_TRANSITION_END) /- (STEP_2_TRANSITION_END - STEP_1_TRANSITION_END),- 1,-] as const;-export function scrollProgressToHomeStepperLottieFrame(scrollProgress: number,totalFrames: number,diff --git a/packages/twenty-website-new/src/sections/LegalDocument/components/LegalDocumentPage.tsx b/packages/twenty-website-new/src/sections/LegalDocument/components/LegalDocumentPage.tsxindex 6c64b54804e..8b6dac280c3 100644--- a/packages/twenty-website-new/src/sections/LegalDocument/components/LegalDocumentPage.tsx+++ b/packages/twenty-website-new/src/sections/LegalDocument/components/LegalDocumentPage.tsx@@ -2,8 +2,7 @@ import { styled } from '@linaria/react';import type { ReactNode } from 'react';import { Container } from '@/design-system/components';-import { Menu } from '@/sections/Menu/components';-import type { MenuDataType } from '@/sections/Menu/types';+import { Menu, type MenuDataType } from '@/sections/Menu';import { theme } from '@/theme';const PageSection = styled.section`diff --git a/packages/twenty-website-new/src/sections/LegalDocument/index.ts b/packages/twenty-website-new/src/sections/LegalDocument/index.tsnew file mode 100644index 00000000000..a7fa4e6ef42--- /dev/null+++ b/packages/twenty-website-new/src/sections/LegalDocument/index.ts@@ -0,0 +1 @@+export { LegalDocument } from './components';diff --git a/packages/twenty-website-new/src/sections/Marquee/Marquee.tsx b/packages/twenty-website-new/src/sections/Marquee/Marquee.tsxnew file mode 100644index 00000000000..9a588a3ddb2--- /dev/null+++ b/packages/twenty-website-new/src/sections/Marquee/Marquee.tsx@@ -0,0 +1,172 @@+import { theme } from '@/theme';+import { styled } from '@linaria/react';+import type { ReactNode } from 'react';++export type MarqueeSegment = {+ fontFamily: string;+ text: ReactNode;+};++const MARQUEE_REPEAT = 6;++const StyledSection = styled.section`+ min-width: 0;+ overflow: clip;+ padding-bottom: ${theme.spacing(20)};+ padding-top: ${theme.spacing(20)};+ width: 100%;++ &[data-scheme='light'] {+ background-color: var(--color-white);+ color: var(--color-text);+ }++ &[data-scheme='muted'] {+ background-color: var(--color-neutral);+ color: var(--color-text);+ }++ &[data-scheme='dark'] {+ background-color: var(--color-black);+ color: var(--color-text);+ }+`;++const Viewport = styled.div`+ display: flex;+ flex-direction: column;+ height: 280px;+ overflow: hidden;+ width: 100%;+`;++const Row = styled.div`+ align-items: center;+ display: flex;+ flex: 1 1 0;+ min-height: 0;+ overflow: hidden;+ width: 100%;+`;++const AnimatedTrack = styled.div`+ @keyframes marqueeMarqueeSlide {+ from {+ transform: translate3d(0, 0, 0);+ }++ to {+ transform: translate3d(-50%, 0, 0);+ }+ }++ animation: marqueeMarqueeSlide 55s linear infinite;+ display: flex;+ flex-shrink: 0;+ width: max-content;++ &[data-reversed] {+ animation-direction: reverse;+ }+`;++const TrackHalf = styled.div`+ column-gap: ${theme.spacing(6)};+ display: flex;+ flex-shrink: 0;+`;++const PhraseGroup = styled.div`+ align-items: center;+ column-gap: ${theme.spacing(3)};+ display: flex;+ flex-shrink: 0;+`;++const Segment = styled.span`+ flex-shrink: 0;+ font-weight: ${theme.font.weight.light};+ line-height: 1;+ white-space: nowrap;++ &[data-segment-index='0'] {+ color: inherit;+ font-family: ${theme.font.family.serif};+ font-size: clamp(3rem, 9.6vw, 8.625rem);+ text-transform: uppercase;+ }++ &[data-segment-index='1'] {+ color: inherit;+ font-family: ${theme.font.family.sans};+ font-size: clamp(1.5rem, 4.9vw, 4.4375rem);+ text-transform: lowercase;+ }++ &[data-segment-index='2'] {+ color: ${theme.colors.highlight[100]};+ font-family: ${theme.font.family.sans};+ font-size: clamp(3rem, 9.6vw, 8.625rem);+ text-transform: uppercase;+ }+`;++type Scheme = 'light' | 'muted' | 'dark';++function Phrase({ segments }: { segments: MarqueeSegment[] }) {+ return (+ <PhraseGroup>+ {segments.map((segment, segmentIndex) => (+ <Segment key={segmentIndex} data-segment-index={segmentIndex}>+ {segment.text}+ </Segment>+ ))}+ </PhraseGroup>+ );+}++function Track({+ segments,+ reversed,+}: {+ segments: MarqueeSegment[];+ reversed: boolean;+}) {+ const phrases = Array.from({ length: MARQUEE_REPEAT }, (_, index) => (+ <Phrase key={index} segments={segments} />+ ));++ return (+ <AnimatedTrack data-reversed={reversed ? '' : undefined}>+ <TrackHalf>{phrases}</TrackHalf>+ <TrackHalf aria-hidden>{phrases}</TrackHalf>+ </AnimatedTrack>+ );+}++type RootProps = {+ backgroundColor?: string;+ color?: string;+ segments: MarqueeSegment[];+ scheme?: Scheme;+};++function Root({ backgroundColor, color, segments, scheme }: RootProps) {+ return (+ <StyledSection+ data-scheme={scheme}+ style={scheme ? undefined : { backgroundColor, color }}+ >+ <Viewport>+ <Row>+ <Track segments={segments} reversed={false} />+ </Row>+ <Row>+ <Track segments={segments} reversed />+ </Row>+ </Viewport>+ </StyledSection>+ );+}++export const Marquee = { Root };diff --git a/packages/twenty-website-new/src/sections/Marquee/components/Heading.tsx b/packages/twenty-website-new/src/sections/Marquee/components/Heading.tsxdeleted file mode 100644index fdf680c2fc4..00000000000--- a/packages/twenty-website-new/src/sections/Marquee/components/Heading.tsx+++ /dev/null@@ -1,11 +0,0 @@-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';--type HeadingProps = {- segments: MessageHeadingSegment[];-};--export function Heading(_props: HeadingProps) {- return null;-}--Heading.displayName = 'Marquee.Heading';diff --git a/packages/twenty-website-new/src/sections/Marquee/components/Phrase.tsx b/packages/twenty-website-new/src/sections/Marquee/components/Phrase.tsxdeleted file mode 100644index 6ad57a198a7..00000000000--- a/packages/twenty-website-new/src/sections/Marquee/components/Phrase.tsx+++ /dev/null@@ -1,57 +0,0 @@-import { styled } from '@linaria/react';--import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';-import { theme } from '@/theme';-import type { MessageDescriptor } from '@lingui/core';--const PhraseGroup = styled.div`- align-items: center;- column-gap: ${theme.spacing(3)};- display: flex;- flex-shrink: 0;-`;--const Segment = styled.span`- flex-shrink: 0;- font-weight: ${theme.font.weight.light};- line-height: 1;- white-space: nowrap;-- &[data-segment-index='0'] {- color: inherit;- font-family: ${theme.font.family.serif};- font-size: clamp(3rem, 9.6vw, 8.625rem);- text-transform: uppercase;- }-- &[data-segment-index='1'] {- color: inherit;- font-family: ${theme.font.family.sans};- font-size: clamp(1.5rem, 4.9vw, 4.4375rem);- text-transform: lowercase;- }-- &[data-segment-index='2'] {- color: ${theme.colors.highlight[100]};- font-family: ${theme.font.family.sans};- font-size: clamp(3rem, 9.6vw, 8.625rem);- text-transform: uppercase;- }-`;--type PhraseProps = {- renderText: (descriptor: MessageDescriptor) => string;- segments: MessageHeadingSegment[];-};--export function Phrase({ renderText, segments }: PhraseProps) {- return (- <PhraseGroup>- {segments.map((segment, segmentIndex) => (- <Segment key={segmentIndex} data-segment-index={segmentIndex}>- {renderText(segment.text)}- </Segment>- ))}- </PhraseGroup>- );-}diff --git a/packages/twenty-website-new/src/sections/Marquee/components/Root.tsx b/packages/twenty-website-new/src/sections/Marquee/components/Root.tsxdeleted file mode 100644index 4918c54fb92..00000000000--- a/packages/twenty-website-new/src/sections/Marquee/components/Root.tsx+++ /dev/null@@ -1,95 +0,0 @@-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';-import { theme } from '@/theme';-import type { MessageDescriptor } from '@lingui/core';-import { styled } from '@linaria/react';-import {- Children,- isValidElement,- type ReactElement,- type ReactNode,-} from 'react';--import { Heading } from './Heading';-import { Track } from './Track';--const StyledSection = styled.section`- min-width: 0;- overflow: clip;- padding-bottom: ${theme.spacing(20)};- padding-top: ${theme.spacing(20)};- width: 100%;-`;--const Viewport = styled.div`- display: flex;- flex-direction: column;- height: 280px;- overflow: hidden;- width: 100%;-`;--const Row = styled.div`- align-items: center;- display: flex;- flex: 1 1 0;- min-height: 0;- overflow: hidden;- width: 100%;-`;--type RootProps = {- backgroundColor: string;- color: string;- children: ReactNode;- renderText: (descriptor: MessageDescriptor) => string;-};--type HeadingElement = ReactElement<{ segments: MessageHeadingSegment[] }>;--function findHeadingSlot(children: ReactNode): HeadingElement | null {- let found: HeadingElement | null = null;- Children.forEach(children, (child) => {- if (- isValidElement(child) &&- typeof child.type === 'function' &&- (child.type as { displayName?: string }).displayName ===- Heading.displayName- ) {- found = child as HeadingElement;- }- });- return found;-}--export function Root({- backgroundColor,- children,- color,- renderText,-}: RootProps) {- const headingSlot = findHeadingSlot(children);-- if (headingSlot === null) {- if (process.env.NODE_ENV !== 'production') {- throw new Error(- '<Marquee.Root> requires a <Marquee.Heading segments={...} /> child.',- );- }- return null;- }-- const segments = headingSlot.props.segments;-- return (- <StyledSection style={{ backgroundColor, color }}>- <Viewport>- <Row>- <Track heading={segments} renderText={renderText} reversed={false} />- </Row>- <Row>- <Track heading={segments} renderText={renderText} reversed />- </Row>- </Viewport>- </StyledSection>- );-}diff --git a/packages/twenty-website-new/src/sections/Marquee/components/Track.tsx b/packages/twenty-website-new/src/sections/Marquee/components/Track.tsxdeleted file mode 100644index afcad9e24a8..00000000000--- a/packages/twenty-website-new/src/sections/Marquee/components/Track.tsx+++ /dev/null@@ -1,55 +0,0 @@-import { styled } from '@linaria/react';--import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';-import { theme } from '@/theme';-import type { MessageDescriptor } from '@lingui/core';--import { Phrase } from './Phrase';--const MARQUEE_REPEAT = 6;--const AnimatedTrack = styled.div`- @keyframes marqueeMarqueeSlide {- from {- transform: translate3d(0, 0, 0);- }-- to {- transform: translate3d(-50%, 0, 0);- }- }-- animation: marqueeMarqueeSlide 55s linear infinite;- display: flex;- flex-shrink: 0;- width: max-content;-- &[data-reversed] {- animation-direction: reverse;- }-`;--const TrackHalf = styled.div`- column-gap: ${theme.spacing(6)};- display: flex;- flex-shrink: 0;-`;--type TrackProps = {- heading: MessageHeadingSegment[];- renderText: (descriptor: MessageDescriptor) => string;- reversed: boolean;-};--export function Track({ heading, renderText, reversed }: TrackProps) {- const phrases = Array.from({ length: MARQUEE_REPEAT }, (_, index) => (- <Phrase key={index} renderText={renderText} segments={heading} />- ));-- return (- <AnimatedTrack data-reversed={reversed ? '' : undefined}>- <TrackHalf>{phrases}</TrackHalf>- <TrackHalf aria-hidden>{phrases}</TrackHalf>- </AnimatedTrack>- );-}diff --git a/packages/twenty-website-new/src/sections/Marquee/components/index.ts b/packages/twenty-website-new/src/sections/Marquee/components/index.tsdeleted file mode 100644index 0eb45f28ec7..00000000000--- a/packages/twenty-website-new/src/sections/Marquee/components/index.ts+++ /dev/null@@ -1,4 +0,0 @@-import { Heading } from './Heading';-import { Root } from './Root';--export const Marquee = { Root, Heading };diff --git a/packages/twenty-website-new/src/sections/Marquee/index.ts b/packages/twenty-website-new/src/sections/Marquee/index.tsnew file mode 100644index 00000000000..9ba90c81f62--- /dev/null+++ b/packages/twenty-website-new/src/sections/Marquee/index.ts@@ -0,0 +1 @@+export { Marquee } from './Marquee';diff --git a/packages/twenty-website-new/src/sections/Marquee/types/MarqueeData.ts b/packages/twenty-website-new/src/sections/Marquee/types/MarqueeData.tsdeleted file mode 100644index 83c529865ec..00000000000--- a/packages/twenty-website-new/src/sections/Marquee/types/MarqueeData.ts+++ /dev/null@@ -1,5 +0,0 @@-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';--export type MarqueeDataType = {- heading: MessageHeadingSegment[];-};diff --git a/packages/twenty-website-new/src/sections/Marquee/types/index.ts b/packages/twenty-website-new/src/sections/Marquee/types/index.tsdeleted file mode 100644index c02eb63d350..00000000000--- a/packages/twenty-website-new/src/sections/Marquee/types/index.ts+++ /dev/null@@ -1 +0,0 @@-export type { MarqueeDataType } from './MarqueeData';diff --git a/packages/twenty-website-new/src/sections/Menu/components/Cta.tsx b/packages/twenty-website-new/src/sections/Menu/components/Cta.tsxindex eb2772933f4..b1f05680de5 100644--- a/packages/twenty-website-new/src/sections/Menu/components/Cta.tsx+++ b/packages/twenty-website-new/src/sections/Menu/components/Cta.tsx@@ -1,7 +1,7 @@'use client';import { LinkButton } from '@/design-system/components';-import { useRenderMessage } from '@/lib/i18n/use-render-message';+import { useLingui } from '@lingui/react';import type { MenuScheme } from '@/sections/Menu/types';import { theme } from '@/theme';import { msg } from '@lingui/core/macro';@@ -23,7 +23,7 @@ type CtaProps = {};export function Cta({ scheme }: CtaProps) {- const renderText = useRenderMessage();+ const { i18n } = useLingui();const buttonColor = scheme === 'primary' ? 'secondary' : 'primary';return (@@ -31,14 +31,14 @@ export function Cta({ scheme }: CtaProps) {<LinkButtoncolor={buttonColor}href="https://app.twenty.com/welcome"- label={renderText(msg`Log in`)}+ label={i18n._(msg`Log in`)}size="small"variant="outlined"/><LinkButtoncolor={buttonColor}href="https://app.twenty.com/welcome"- label={renderText(msg`Get started`)}+ label={i18n._(msg`Get started`)}size="small"variant="contained"/>diff --git a/packages/twenty-website-new/src/sections/Menu/components/Drawer.tsx b/packages/twenty-website-new/src/sections/Menu/components/Drawer.tsxindex 6a7aaaa38e8..f0c805422fd 100644--- a/packages/twenty-website-new/src/sections/Menu/components/Drawer.tsx+++ b/packages/twenty-website-new/src/sections/Menu/components/Drawer.tsx@@ -1,7 +1,7 @@'use client';import { LinkButton } from '@/design-system/components';-import { ArrowRightUpIcon, INFORMATIVE_ICONS, SOCIAL_ICONS } from '@/icons';+import { ArrowRightUpIcon, SOCIAL_ICONS } from '@/icons';import type {MenuNavItemType,MenuScheme,@@ -10,12 +10,13 @@ import type {import { theme } from '@/theme';import { Drawer } from '@base-ui/react/drawer';import { Separator } from '@base-ui/react/separator';-import type { MessageDescriptor } from '@lingui/core';import { msg } from '@lingui/core/macro';import { styled } from '@linaria/react';import { LocalizedLink, useUnlocalizedPathname } from '@/lib/i18n';-import { useRenderMessage } from '@/lib/i18n/use-render-message';-import React, { useState } from 'react';+import { useLingui } from '@lingui/react';+import React from 'react';++import { DrawerNavGroup } from './DrawerNavGroup';const StyledDrawerContent = styled.div`display: grid;@@ -29,9 +30,9 @@ const StyledDrawerContent = styled.div`left: 0;overflow-y: auto;padding-bottom: ${theme.spacing(4)};- padding-left: ${theme.spacing(4)};- padding-right: ${theme.spacing(4)};- padding-top: ${theme.spacing(35)};+ padding-left: ${theme.spacing(7)};+ padding-right: ${theme.spacing(7)};+ padding-top: ${theme.spacing(22)};position: fixed;top: 0;width: 100vw;@@ -99,121 +100,6 @@ const NavItem = styled(LocalizedLink)`${navItemStyles}`;-const NavGroupButton = styled.button`- ${navItemStyles}- align-items: center;- background: none;- border: none;- column-gap: ${theme.spacing(2)};- cursor: pointer;- display: flex;- justify-content: space-between;- padding: 0;- text-align: left;-`;--const NavGroupChevron = styled.span`- align-items: center;- display: inline-flex;- flex-shrink: 0;- transform: rotate(0deg);- transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);-- ${NavGroupButton}[aria-expanded='true'] & {- transform: rotate(180deg);- }-- svg {- display: block;- }-`;--const NavGroupChildren = styled.div`- display: grid;- margin-top: ${theme.spacing(7)};- padding-left: ${theme.spacing(4)};- row-gap: ${theme.spacing(5)};-`;--const NavChildItemStyles = `- align-items: center;- column-gap: ${theme.spacing(3)};- display: grid;- font-family: ${theme.font.family.mono};- font-size: ${theme.font.size(6)};- font-weight: ${theme.font.weight.light};- grid-template-columns: auto 1fr;- letter-spacing: 0;- line-height: 28px;- text-decoration: none;- text-transform: uppercase;- width: 100%;-- &[data-scheme='primary'] {- color: ${theme.colors.primary.text[100]};- }-- &[data-scheme='secondary'] {- color: ${theme.colors.secondary.text[100]};- }-- &[data-active] {- color: ${theme.colors.highlight[100]};- }-- &:focus-visible {- outline: 1px solid ${theme.colors.highlight[100]};- outline-offset: 1px;- }-`;--const NavChildItem = styled(LocalizedLink)`- ${NavChildItemStyles}-`;--const ExternalNavChildItem = styled.a`- ${NavChildItemStyles}-`;--const NavChildIcon = styled.span`- align-items: center;- display: inline-flex;- flex-shrink: 0;- height: 24px;- justify-content: center;- width: 24px;-- &[data-scheme='primary'] {- color: ${theme.colors.primary.text[60]};- }-- &[data-scheme='secondary'] {- color: ${theme.colors.secondary.text[60]};- }-- ${NavChildItem}[data-active] &,- ${ExternalNavChildItem}[data-active] & {- color: ${theme.colors.highlight[100]};- }-`;--const NavChildLabel = styled.span`- &::before {- background: ${theme.colors.highlight[100]};- content: '';- display: none;- height: 2px;- margin-right: ${theme.spacing(2)};- vertical-align: middle;- width: 10px;- }-- ${NavChildItem}[data-active] &::before,- ${ExternalNavChildItem}[data-active] &::before {- display: inline-block;- }-`;-const HorizontalSeparator = styled(Separator)`background: repeating-linear-gradient(90deg,@@ -280,91 +166,6 @@ const Divider = styled(Separator)`}`;-type NavGroupProps = {- item: MenuNavItemType;- pathname: string;- renderText: (descriptor: MessageDescriptor) => string;- scheme: MenuScheme;-};--function NavGroup({ item, pathname, renderText, scheme }: NavGroupProps) {- const hasActiveChild =- item.children?.some(- (child) => !child.external && pathname.startsWith(child.href),- ) ?? false;- const [isOpen, setIsOpen] = useState(hasActiveChild);-- return (- <div>- <NavGroupButton- type="button"- aria-expanded={isOpen}- data-scheme={scheme}- data-active={hasActiveChild || undefined}- onClick={() => setIsOpen((prev) => !prev)}- >- {renderText(item.label)}- <NavGroupChevron aria-hidden>- <svg- width="12"- height="12"- viewBox="0 0 10 10"- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- <path- d="M2 3.5L5 6.5L8 3.5"- stroke="currentColor"- strokeWidth="1.5"- strokeLinecap="round"- strokeLinejoin="round"- />- </svg>- </NavGroupChevron>- </NavGroupButton>- {isOpen && (- <NavGroupChildren>- {item.children?.map((child) => {- const IconComponent = child.icon- ? INFORMATIVE_ICONS[child.icon]- : null;-- return (- <Drawer.Close- key={child.href}- nativeButton={false}- render={- child.external ? (- <ExternalNavChildItem- data-scheme={scheme}- href={child.href}- rel="noopener noreferrer"- target="_blank"- />- ) : (- <NavChildItem- data-scheme={scheme}- data-active={pathname.startsWith(child.href) || undefined}- href={child.href}- />- )- }- >- <NavChildIcon data-scheme={scheme} aria-hidden>- {IconComponent && (- <IconComponent size={20} color="currentColor" />- )}- </NavChildIcon>- <NavChildLabel>{renderText(child.label)}</NavChildLabel>- </Drawer.Close>- );- })}- </NavGroupChildren>- )}- </div>- );-}-type MenuDrawerProps = {navItems: MenuNavItemType[];scheme: MenuScheme;@@ -372,7 +173,7 @@ type MenuDrawerProps = {};export function MenuDrawer({ navItems, scheme, socialLinks }: MenuDrawerProps) {- const renderText = useRenderMessage();+ const { i18n } = useLingui();const pathname = useUnlocalizedPathname();const buttonColor = scheme === 'primary' ? 'secondary' : 'primary';@@ -396,10 +197,9 @@ export function MenuDrawer({ navItems, scheme, socialLinks }: MenuDrawerProps) {{topLevelItems.map((item, index) => (<React.Fragment key={`${index}-${item.href ?? 'group'}`}>{item.children ? (- <NavGroup+ <DrawerNavGroupitem={item}pathname={pathname}- renderText={renderText}scheme={scheme}/>) : item.href ? (@@ -415,7 +215,7 @@ export function MenuDrawer({ navItems, scheme, socialLinks }: MenuDrawerProps) {/>}>- {renderText(item.label)}+ {i18n._(item.label)}</Drawer.Close>) : null}{index < topLevelItems.length - 1 && (@@ -436,7 +236,7 @@ export function MenuDrawer({ navItems, scheme, socialLinks }: MenuDrawerProps) {<LinkButtoncolor={buttonColor}href="https://app.twenty.com/welcome"- label={renderText(msg`Log in`)}+ label={i18n._(msg`Log in`)}variant="outlined"/></CtaContainer>diff --git a/packages/twenty-website-new/src/sections/Menu/components/DrawerNavGroup.tsx b/packages/twenty-website-new/src/sections/Menu/components/DrawerNavGroup.tsxnew file mode 100644index 00000000000..85181c6e542--- /dev/null+++ b/packages/twenty-website-new/src/sections/Menu/components/DrawerNavGroup.tsx@@ -0,0 +1,255 @@+'use client';++import { INFORMATIVE_ICONS } from '@/icons';+import { LocalizedLink } from '@/lib/i18n';+import type { MenuNavItemType, MenuScheme } from '@/sections/Menu/types';+import { theme } from '@/theme';+import { Drawer } from '@base-ui/react/drawer';+import { styled } from '@linaria/react';+import { useLingui } from '@lingui/react';+import { useState } from 'react';++const navItemStyles = `+ border-radius: ${theme.radius(2)};+ display: block;+ font-family: ${theme.font.family.mono};+ font-size: ${theme.font.size(8)};+ font-weight: ${theme.font.weight.light};+ letter-spacing: 0;+ line-height: 38px;+ text-decoration: none;+ text-transform: uppercase;+ width: 100%;++ &[data-scheme='primary'] {+ color: ${theme.colors.primary.text[100]};+ }++ &[data-scheme='secondary'] {+ color: ${theme.colors.secondary.text[100]};+ }++ position: relative;++ &[data-active] {+ color: ${theme.colors.highlight[100]};+ &::after {+ content: '';+ position: absolute;+ bottom: -6px;+ left: 25%;+ width: 50%;+ height: 1px;+ background: ${theme.colors.highlight[100]};+ }+ }++ &:focus-visible {+ outline: 1px solid ${theme.colors.highlight[100]};+ outline-offset: 1px;+ }+`;++const NavGroupButton = styled.button`+ ${navItemStyles}+ align-items: center;+ background: none;+ border: none;+ column-gap: ${theme.spacing(2)};+ cursor: pointer;+ display: flex;+ justify-content: space-between;+ padding: 0;+ text-align: left;+`;++const NavGroupChevron = styled.span`+ align-items: center;+ display: inline-flex;+ flex-shrink: 0;+ transform: rotate(0deg);+ transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);++ ${NavGroupButton}[aria-expanded='true'] & {+ transform: rotate(180deg);+ }++ svg {+ display: block;+ }+`;++const NavGroupChildren = styled.div`+ display: grid;+ margin-top: ${theme.spacing(7)};+ padding-left: ${theme.spacing(4)};+ row-gap: ${theme.spacing(5)};+`;++const NavChildItemStyles = `+ align-items: center;+ column-gap: ${theme.spacing(3)};+ display: grid;+ font-family: ${theme.font.family.mono};+ font-size: ${theme.font.size(6)};+ font-weight: ${theme.font.weight.light};+ grid-template-columns: auto 1fr;+ letter-spacing: 0;+ line-height: 28px;+ text-decoration: none;+ text-transform: uppercase;+ width: 100%;++ &[data-scheme='primary'] {+ color: ${theme.colors.primary.text[100]};+ }++ &[data-scheme='secondary'] {+ color: ${theme.colors.secondary.text[100]};+ }++ &[data-active] {+ color: ${theme.colors.highlight[100]};+ }++ &:focus-visible {+ outline: 1px solid ${theme.colors.highlight[100]};+ outline-offset: 1px;+ }+`;++const NavChildItem = styled(LocalizedLink)`+ ${NavChildItemStyles}+`;++const ExternalNavChildItem = styled.a`+ ${NavChildItemStyles}+`;++const NavChildIcon = styled.span`+ align-items: center;+ display: inline-flex;+ flex-shrink: 0;+ height: 24px;+ justify-content: center;+ width: 24px;++ &[data-scheme='primary'] {+ color: ${theme.colors.primary.text[60]};+ }++ &[data-scheme='secondary'] {+ color: ${theme.colors.secondary.text[60]};+ }++ ${NavChildItem}[data-active] &,+ ${ExternalNavChildItem}[data-active] & {+ color: ${theme.colors.highlight[100]};+ }+`;++const NavChildLabel = styled.span`+ &::before {+ background: ${theme.colors.highlight[100]};+ content: '';+ display: none;+ height: 2px;+ margin-right: ${theme.spacing(2)};+ vertical-align: middle;+ width: 10px;+ }++ ${NavChildItem}[data-active] &::before,+ ${ExternalNavChildItem}[data-active] &::before {+ display: inline-block;+ }+`;++type DrawerNavGroupProps = {+ item: MenuNavItemType;+ pathname: string;+ scheme: MenuScheme;+};++export function DrawerNavGroup({+ item,+ pathname,+ scheme,+}: DrawerNavGroupProps) {+ const { i18n } = useLingui();+ const hasActiveChild =+ item.children?.some(+ (child) => !child.external && pathname.startsWith(child.href),+ ) ?? false;+ const [isOpen, setIsOpen] = useState(hasActiveChild);++ return (+ <div>+ <NavGroupButton+ type="button"+ aria-expanded={isOpen}+ data-scheme={scheme}+ data-active={hasActiveChild || undefined}+ onClick={() => setIsOpen((prev) => !prev)}+ >+ {i18n._(item.label)}+ <NavGroupChevron aria-hidden>+ <svg+ width="12"+ height="12"+ viewBox="0 0 10 10"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ d="M2 3.5L5 6.5L8 3.5"+ stroke="currentColor"+ strokeWidth="1.5"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </svg>+ </NavGroupChevron>+ </NavGroupButton>+ {isOpen && (+ <NavGroupChildren>+ {item.children?.map((child) => {+ const IconComponent = child.icon+ ? INFORMATIVE_ICONS[child.icon]+ : null;++ return (+ <Drawer.Close+ key={child.href}+ nativeButton={false}+ render={+ child.external ? (+ <ExternalNavChildItem+ data-scheme={scheme}+ href={child.href}+ rel="noopener noreferrer"+ target="_blank"+ />+ ) : (+ <NavChildItem+ data-scheme={scheme}+ data-active={pathname.startsWith(child.href) || undefined}+ href={child.href}+ />+ )+ }+ >+ <NavChildIcon data-scheme={scheme} aria-hidden>+ {IconComponent && (+ <IconComponent size={20} color="currentColor" />+ )}+ </NavChildIcon>+ <NavChildLabel>{i18n._(child.label)}</NavChildLabel>+ </Drawer.Close>+ );+ })}+ </NavGroupChildren>+ )}+ </div>+ );+}diff --git a/packages/twenty-website-new/src/sections/Menu/components/Nav.tsx b/packages/twenty-website-new/src/sections/Menu/components/Nav.tsxindex 54ed227ca3c..6c159c492a9 100644--- a/packages/twenty-website-new/src/sections/Menu/components/Nav.tsx+++ b/packages/twenty-website-new/src/sections/Menu/components/Nav.tsx@@ -1,20 +1,15 @@'use client';-import { ArrowRightUpIcon, INFORMATIVE_ICONS } from '@/icons';-import type {- MenuNavChildItemType,- MenuNavItemType,- MenuScheme,-} from '@/sections/Menu/types';+import type { MenuNavItemType, MenuScheme } from '@/sections/Menu/types';import { theme } from '@/theme';import { NavigationMenu } from '@base-ui/react/navigation-menu';import { Separator } from '@base-ui/react/separator';-import type { MessageDescriptor } from '@lingui/core';import { styled } from '@linaria/react';import { LocalizedLink, useUnlocalizedPathname } from '@/lib/i18n';-import { useRenderMessage } from '@/lib/i18n/use-render-message';-import Image from 'next/image';-import React, { useState } from 'react';+import { useLingui } from '@lingui/react';+import React from 'react';++import { NavDropdownContent } from './NavDropdown';const NavList = styled(NavigationMenu.List)`display: none;@@ -180,367 +175,13 @@ const DropdownViewport = styled(NavigationMenu.Viewport)`position: relative;`;-const DropdownLayout = styled.div`- display: grid;- grid-template-columns: 1fr;-- &[data-has-preview='true'] {- grid-template-columns: minmax(280px, 320px) minmax(320px, 360px);- }-`;--const DropdownList = styled.ul`- align-content: start;- display: grid;- gap: 0;- grid-auto-rows: min-content;- grid-template-columns: 1fr;- list-style: none;- margin: 0;- padding: ${theme.spacing(2)};-`;--const PreviewPanel = styled.div`- border-left: 1px solid ${theme.colors.primary.border[10]};- display: flex;- flex-direction: column;- gap: ${theme.spacing(3)};- min-height: 0;- padding: ${theme.spacing(3)};-- &[data-scheme='secondary'] {- border-left-color: ${theme.colors.secondary.border[10]};- }-`;--const PreviewFrame = styled.div`- border: 1px solid ${theme.colors.primary.border[10]};- border-radius: ${theme.radius(2)};- flex: 1;- min-height: 0;- overflow: hidden;- position: relative;- width: 100%;-- &[data-scheme='primary'] {- background: ${theme.colors.primary.text[5]};- }-- &[data-scheme='secondary'] {- background: ${theme.colors.secondary.text[10]};- border-color: ${theme.colors.secondary.border[10]};- }-- img {- height: 100%;- object-fit: cover;- object-position: top left;- width: 100%;- }-`;--const PreviewText = styled.div`- display: grid;- row-gap: ${theme.spacing(1)};-`;--const PreviewTitle = styled.span`- font-family: ${theme.font.family.sans};- font-size: ${theme.font.size(3.5)};- font-weight: ${theme.font.weight.medium};- letter-spacing: -0.01em;- line-height: 1.2;-- &[data-scheme='primary'] {- color: ${theme.colors.primary.text[100]};- }-- &[data-scheme='secondary'] {- color: ${theme.colors.secondary.text[100]};- }-`;--const PreviewDescription = styled.span`- font-family: ${theme.font.family.sans};- font-size: ${theme.font.size(3)};- font-weight: ${theme.font.weight.regular};- letter-spacing: 0;- line-height: 1.4;-- &[data-scheme='primary'] {- color: ${theme.colors.primary.text[60]};- }-- &[data-scheme='secondary'] {- color: ${theme.colors.secondary.text[60]};- }-`;--const DropdownLink = styled(NavigationMenu.Link)`- align-items: center;- border-radius: ${theme.radius(2)};- column-gap: ${theme.spacing(3)};- display: grid;- grid-template-columns: auto 1fr;- padding: ${theme.spacing(3)} ${theme.spacing(3)};- position: relative;- text-decoration: none;- transition:- background 0.18s cubic-bezier(0.22, 1, 0.36, 1),- transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);-- &[data-scheme='primary']:hover {- background: ${theme.colors.primary.text[5]};- }-- &[data-scheme='secondary']:hover {- background: ${theme.colors.secondary.text[10]};- }-- &[data-scheme='primary']:active {- background: ${theme.colors.primary.text[10]};- }-- &[data-scheme='secondary']:active {- background: ${theme.colors.secondary.text[20]};- }-- &:focus-visible {- outline: 1px solid ${theme.colors.highlight[100]};- outline-offset: -1px;- }-`;--const DropdownIconWrap = styled.span`- align-items: center;- border-radius: ${theme.radius(1.5)};- display: inline-flex;- height: 32px;- justify-content: center;- position: relative;- width: 32px;-- &[data-scheme='primary'] {- background: ${theme.colors.primary.text[5]};- color: ${theme.colors.primary.text[60]};- }-- &[data-scheme='secondary'] {- background: ${theme.colors.secondary.text[10]};- color: ${theme.colors.secondary.text[60]};- }-- ${DropdownLink}[data-active] & {- color: ${theme.colors.highlight[100]};- }-`;--const ExternalBadge = styled.span`- align-items: center;- background: ${theme.colors.primary.background[100]};- border-radius: 999px;- bottom: -3px;- display: inline-flex;- height: 12px;- justify-content: center;- pointer-events: none;- position: absolute;- right: -3px;- width: 12px;-- ${DropdownIconWrap}[data-scheme='secondary'] & {- background: ${theme.colors.secondary.background[100]};- }-`;--const DropdownTextStack = styled.span`- display: grid;- min-width: 0;- row-gap: 3px;-`;--const DropdownLabel = styled.span`- font-family: ${theme.font.family.mono};- font-size: ${theme.font.size(3)};- font-weight: ${theme.font.weight.medium};- letter-spacing: 0;- line-height: 1.1;- text-transform: uppercase;- transition: color 0.18s cubic-bezier(0.22, 1, 0.36, 1);-- &::before {- background: ${theme.colors.highlight[100]};- content: '';- display: none;- height: 2px;- margin-right: ${theme.spacing(1.5)};- vertical-align: middle;- width: 8px;- }-- &[data-scheme='primary'] {- color: ${theme.colors.primary.text[100]};- }-- &[data-scheme='secondary'] {- color: ${theme.colors.secondary.text[100]};- }-- ${DropdownLink}[data-active] & {- color: ${theme.colors.highlight[100]};- }-- ${DropdownLink}[data-active] &::before {- display: inline-block;- }-`;--const DropdownDescription = styled.span`- font-family: ${theme.font.family.sans};- font-size: ${theme.font.size(3.5)};- font-weight: ${theme.font.weight.regular};- letter-spacing: 0;- line-height: 1.3;-- &[data-scheme='primary'] {- color: ${theme.colors.primary.text[40]};- }-- &[data-scheme='secondary'] {- color: ${theme.colors.secondary.text[40]};- }-`;--type DropdownContentProps = {- items: MenuNavChildItemType[];- pathname: string;- renderText: (descriptor: MessageDescriptor) => string;- scheme: MenuScheme;-};--function DropdownContent({- items,- pathname,- renderText,- scheme,-}: DropdownContentProps) {- const previewItems = items.filter((item) => item.preview);- const hasPreview = previewItems.length > 0;- const defaultPreviewItem = previewItems[0] ?? null;- const [activeHref, setActiveHref] = useState<string | null>(- defaultPreviewItem?.href ?? null,- );-- const activePreviewItem =- previewItems.find((item) => item.href === activeHref) ?? defaultPreviewItem;- const activePreview = activePreviewItem?.preview;-- return (- <DropdownLayout data-has-preview={hasPreview ? 'true' : 'false'}>- <DropdownList>- {items.map((child) => {- const IconComponent = child.icon- ? INFORMATIVE_ICONS[child.icon]- : null;-- const handleActivate = () => {- if (child.preview) {- setActiveHref(child.href);- }- };-- return (- <li- key={child.href}- onMouseEnter={handleActivate}- onFocus={handleActivate}- >- <DropdownLink- data-scheme={scheme}- data-active={- !child.external && pathname.startsWith(child.href)- ? true- : undefined- }- render={- child.external ? (- <a- href={child.href}- target="_blank"- rel="noopener noreferrer"- />- ) : (- <LocalizedLink href={child.href} />- )- }- >- <DropdownIconWrap data-scheme={scheme} aria-hidden>- {IconComponent && (- <IconComponent size={16} color="currentColor" />- )}- {child.external && (- <ExternalBadge aria-hidden>- <ArrowRightUpIcon- size={6}- strokeColor={theme.colors.highlight[100]}- />- </ExternalBadge>- )}- </DropdownIconWrap>- <DropdownTextStack>- <DropdownLabel data-scheme={scheme}>- {renderText(child.label)}- </DropdownLabel>- {child.description && (- <DropdownDescription data-scheme={scheme}>- {renderText(child.description)}- </DropdownDescription>- )}- </DropdownTextStack>- </DropdownLink>- </li>- );- })}- </DropdownList>- {hasPreview && activePreview && (- <PreviewPanel data-scheme={scheme}>- <PreviewFrame data-scheme={scheme}>- <Image- src={activePreview.image}- alt={activePreview.imageAlt}- fill- sizes="360px"- style={{- objectFit: 'cover',- objectPosition: activePreview.imagePosition ?? 'top left',- transform: activePreview.imageScale- ? `scale(${activePreview.imageScale})`- : undefined,- transformOrigin: 'center',- }}- />- </PreviewFrame>- <PreviewText>- <PreviewTitle data-scheme={scheme}>- {renderText(activePreview.title)}- </PreviewTitle>- <PreviewDescription data-scheme={scheme}>- {renderText(activePreview.description)}- </PreviewDescription>- </PreviewText>- </PreviewPanel>- )}- </DropdownLayout>- );-}-type NavProps = {navItems: MenuNavItemType[];scheme: MenuScheme;};export function Nav({ navItems, scheme }: NavProps) {- const renderText = useRenderMessage();+ const { i18n } = useLingui();const pathname = useUnlocalizedPathname();const hasDropdown = navItems.some((item) => item.children);@@ -565,7 +206,7 @@ export function Nav({ navItems, scheme }: NavProps) {) || undefined}>- {renderText(item.label)}+ {i18n._(item.label)}<TriggerChevron aria-hidden><svgwidth="8"@@ -585,10 +226,9 @@ export function Nav({ navItems, scheme }: NavProps) {</TriggerChevron></NavTrigger><NavigationMenu.Content>- <DropdownContent+ <NavDropdownContentitems={item.children}pathname={pathname}- renderText={renderText}scheme={scheme}/></NavigationMenu.Content>@@ -600,7 +240,7 @@ export function Nav({ navItems, scheme }: NavProps) {data-active={pathname.startsWith(item.href) || undefined}render={<LocalizedLink href={item.href} />}>- {renderText(item.label)}+ {i18n._(item.label)}</NavLink>))}diff --git a/packages/twenty-website-new/src/sections/Menu/components/NavDropdown.tsx b/packages/twenty-website-new/src/sections/Menu/components/NavDropdown.tsxnew file mode 100644index 00000000000..453bfb88dd3--- /dev/null+++ b/packages/twenty-website-new/src/sections/Menu/components/NavDropdown.tsx@@ -0,0 +1,364 @@+'use client';++import { ArrowRightUpIcon, INFORMATIVE_ICONS } from '@/icons';+import { LocalizedLink } from '@/lib/i18n';+import type { MenuNavChildItemType, MenuScheme } from '@/sections/Menu/types';+import { theme } from '@/theme';+import { NavigationMenu } from '@base-ui/react/navigation-menu';+import { styled } from '@linaria/react';+import { useLingui } from '@lingui/react';+import Image from 'next/image';+import { useState } from 'react';++const DropdownLayout = styled.div`+ display: grid;+ grid-template-columns: 1fr;++ &[data-has-preview='true'] {+ grid-template-columns: minmax(280px, 320px) minmax(320px, 360px);+ }+`;++const DropdownList = styled.ul`+ align-content: start;+ display: grid;+ gap: 0;+ grid-auto-rows: min-content;+ grid-template-columns: 1fr;+ list-style: none;+ margin: 0;+ padding: ${theme.spacing(2)};+`;++const PreviewPanel = styled.div`+ border-left: 1px solid ${theme.colors.primary.border[10]};+ display: flex;+ flex-direction: column;+ gap: ${theme.spacing(3)};+ min-height: 0;+ padding: ${theme.spacing(3)};++ &[data-scheme='secondary'] {+ border-left-color: ${theme.colors.secondary.border[10]};+ }+`;++const PreviewFrame = styled.div`+ border: 1px solid ${theme.colors.primary.border[10]};+ border-radius: ${theme.radius(2)};+ flex: 1;+ min-height: 0;+ overflow: hidden;+ position: relative;+ width: 100%;++ &[data-scheme='primary'] {+ background: ${theme.colors.primary.text[5]};+ }++ &[data-scheme='secondary'] {+ background: ${theme.colors.secondary.text[10]};+ border-color: ${theme.colors.secondary.border[10]};+ }++ img {+ height: 100%;+ object-fit: cover;+ object-position: top left;+ width: 100%;+ }+`;++const PreviewText = styled.div`+ display: grid;+ row-gap: ${theme.spacing(1)};+`;++const PreviewTitle = styled.span`+ font-family: ${theme.font.family.sans};+ font-size: ${theme.font.size(3.5)};+ font-weight: ${theme.font.weight.medium};+ letter-spacing: -0.01em;+ line-height: 1.2;++ &[data-scheme='primary'] {+ color: ${theme.colors.primary.text[100]};+ }++ &[data-scheme='secondary'] {+ color: ${theme.colors.secondary.text[100]};+ }+`;++const PreviewDescription = styled.span`+ font-family: ${theme.font.family.sans};+ font-size: ${theme.font.size(3)};+ font-weight: ${theme.font.weight.regular};+ letter-spacing: 0;+ line-height: 1.4;++ &[data-scheme='primary'] {+ color: ${theme.colors.primary.text[60]};+ }++ &[data-scheme='secondary'] {+ color: ${theme.colors.secondary.text[60]};+ }+`;++const DropdownLink = styled(NavigationMenu.Link)`+ align-items: center;+ border-radius: ${theme.radius(2)};+ column-gap: ${theme.spacing(3)};+ display: grid;+ grid-template-columns: auto 1fr;+ padding: ${theme.spacing(3)} ${theme.spacing(3)};+ position: relative;+ text-decoration: none;+ transition:+ background 0.18s cubic-bezier(0.22, 1, 0.36, 1),+ transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);++ &[data-scheme='primary']:hover {+ background: ${theme.colors.primary.text[5]};+ }++ &[data-scheme='secondary']:hover {+ background: ${theme.colors.secondary.text[10]};+ }++ &[data-scheme='primary']:active {+ background: ${theme.colors.primary.text[10]};+ }++ &[data-scheme='secondary']:active {+ background: ${theme.colors.secondary.text[20]};+ }++ &:focus-visible {+ outline: 1px solid ${theme.colors.highlight[100]};+ outline-offset: -1px;+ }+`;++const DropdownIconWrap = styled.span`+ align-items: center;+ border-radius: ${theme.radius(1.5)};+ display: inline-flex;+ height: 32px;+ justify-content: center;+ position: relative;+ width: 32px;++ &[data-scheme='primary'] {+ background: ${theme.colors.primary.text[5]};+ color: ${theme.colors.primary.text[60]};+ }++ &[data-scheme='secondary'] {+ background: ${theme.colors.secondary.text[10]};+ color: ${theme.colors.secondary.text[60]};+ }++ ${DropdownLink}[data-active] & {+ color: ${theme.colors.highlight[100]};+ }+`;++const ExternalBadge = styled.span`+ align-items: center;+ background: ${theme.colors.primary.background[100]};+ border-radius: 999px;+ bottom: -3px;+ display: inline-flex;+ height: 12px;+ justify-content: center;+ pointer-events: none;+ position: absolute;+ right: -3px;+ width: 12px;++ ${DropdownIconWrap}[data-scheme='secondary'] & {+ background: ${theme.colors.secondary.background[100]};+ }+`;++const DropdownTextStack = styled.span`+ display: grid;+ min-width: 0;+ row-gap: 3px;+`;++const DropdownLabel = styled.span`+ font-family: ${theme.font.family.mono};+ font-size: ${theme.font.size(3)};+ font-weight: ${theme.font.weight.medium};+ letter-spacing: 0;+ line-height: 1.1;+ text-transform: uppercase;+ transition: color 0.18s cubic-bezier(0.22, 1, 0.36, 1);++ &::before {+ background: ${theme.colors.highlight[100]};+ content: '';+ display: none;+ height: 2px;+ margin-right: ${theme.spacing(1.5)};+ vertical-align: middle;+ width: 8px;+ }++ &[data-scheme='primary'] {+ color: ${theme.colors.primary.text[100]};+ }++ &[data-scheme='secondary'] {+ color: ${theme.colors.secondary.text[100]};+ }++ ${DropdownLink}[data-active] & {+ color: ${theme.colors.highlight[100]};+ }++ ${DropdownLink}[data-active] &::before {+ display: inline-block;+ }+`;++const DropdownDescription = styled.span`+ font-family: ${theme.font.family.sans};+ font-size: ${theme.font.size(3.5)};+ font-weight: ${theme.font.weight.regular};+ letter-spacing: 0;+ line-height: 1.3;++ &[data-scheme='primary'] {+ color: ${theme.colors.primary.text[40]};+ }++ &[data-scheme='secondary'] {+ color: ${theme.colors.secondary.text[40]};+ }+`;++type NavDropdownContentProps = {+ items: MenuNavChildItemType[];+ pathname: string;+ scheme: MenuScheme;+};++export function NavDropdownContent({+ items,+ pathname,+ scheme,+}: NavDropdownContentProps) {+ const { i18n } = useLingui();+ const previewItems = items.filter((item) => item.preview);+ const hasPreview = previewItems.length > 0;+ const defaultPreviewItem = previewItems[0] ?? null;+ const [activeHref, setActiveHref] = useState<string | null>(+ defaultPreviewItem?.href ?? null,+ );++ const activePreviewItem =+ previewItems.find((item) => item.href === activeHref) ?? defaultPreviewItem;+ const activePreview = activePreviewItem?.preview;++ return (+ <DropdownLayout data-has-preview={hasPreview ? 'true' : 'false'}>+ <DropdownList>+ {items.map((child) => {+ const IconComponent = child.icon+ ? INFORMATIVE_ICONS[child.icon]+ : null;++ const handleActivate = () => {+ if (child.preview) {+ setActiveHref(child.href);+ }+ };++ return (+ <li+ key={child.href}+ onMouseEnter={handleActivate}+ onFocus={handleActivate}+ >+ <DropdownLink+ data-scheme={scheme}+ data-active={+ !child.external && pathname.startsWith(child.href)+ ? true+ : undefined+ }+ render={+ child.external ? (+ <a+ href={child.href}+ target="_blank"+ rel="noopener noreferrer"+ />+ ) : (+ <LocalizedLink href={child.href} />+ )+ }+ >+ <DropdownIconWrap data-scheme={scheme} aria-hidden>+ {IconComponent && (+ <IconComponent size={16} color="currentColor" />+ )}+ {child.external && (+ <ExternalBadge aria-hidden>+ <ArrowRightUpIcon+ size={6}+ strokeColor={theme.colors.highlight[100]}+ />+ </ExternalBadge>+ )}+ </DropdownIconWrap>+ <DropdownTextStack>+ <DropdownLabel data-scheme={scheme}>+ {i18n._(child.label)}+ </DropdownLabel>+ {child.description && (+ <DropdownDescription data-scheme={scheme}>+ {i18n._(child.description)}+ </DropdownDescription>+ )}+ </DropdownTextStack>+ </DropdownLink>+ </li>+ );+ })}+ </DropdownList>+ {hasPreview && activePreview && (+ <PreviewPanel data-scheme={scheme}>+ <PreviewFrame data-scheme={scheme}>+ <Image+ src={activePreview.image}+ alt={activePreview.imageAlt}+ fill+ sizes="360px"+ style={{+ objectFit: 'cover',+ objectPosition: activePreview.imagePosition ?? 'top left',+ transform: activePreview.imageScale+ ? `scale(${activePreview.imageScale})`+ : undefined,+ transformOrigin: 'center',+ }}+ />+ </PreviewFrame>+ <PreviewText>+ <PreviewTitle data-scheme={scheme}>+ {i18n._(activePreview.title)}+ </PreviewTitle>+ <PreviewDescription data-scheme={scheme}>+ {i18n._(activePreview.description)}+ </PreviewDescription>+ </PreviewText>+ </PreviewPanel>+ )}+ </DropdownLayout>+ );+}diff --git a/packages/twenty-website-new/src/sections/Menu/components/Root.tsx b/packages/twenty-website-new/src/sections/Menu/components/Root.tsxindex 242addacb93..f636ee18a2a 100644--- a/packages/twenty-website-new/src/sections/Menu/components/Root.tsx+++ b/packages/twenty-website-new/src/sections/Menu/components/Root.tsx@@ -2,8 +2,7 @@import { Container, IconButton, LinkButton } from '@/design-system/components';import { CloseIcon, MenuIcon } from '@/icons';-import { useRenderMessage } from '@/lib/i18n/use-render-message';-import { useTimeoutRegistry } from '@/lib/react';+import { useLingui } from '@lingui/react';import type {MenuNavItemType,MenuScheme,@@ -13,12 +12,11 @@ import { theme } from '@/theme';import { Drawer } from '@base-ui/react/drawer';import { msg } from '@lingui/core/macro';import { styled } from '@linaria/react';-import { useEffect, useState, type ReactNode } from 'react';+import { useCallback, useState, type ReactNode } from 'react';import { CloseDrawerWhenNavigationExpandsEffect } from './../effect-components/CloseDrawerWhenNavigationExpandsEffect';+import { ScrollTrackingEffect } from './../effect-components/ScrollTrackingEffect';import { MenuDrawer } from './Drawer';-const SCROLL_IDLE_TIMEOUT_MS = 150;-const StyledSection = styled.section<{$enableBackdropBlur: boolean;$isElevated: boolean;@@ -103,35 +101,18 @@ export function Root({surfaceColor,socialLinks,}: RootProps) {- const renderText = useRenderMessage();+ const { i18n } = useLingui();const [isDrawerOpen, setIsDrawerOpen] = useState(false);const [hasScrolled, setHasScrolled] = useState(false);const [isScrolling, setIsScrolling] = useState(false);- const timeoutRegistry = useTimeoutRegistry();-- useEffect(() => {- let cancelScrollIdle: (() => void) | null = null;-- const handleScroll = () => {- setHasScrolled(window.scrollY > 8);- setIsScrolling(true);-- cancelScrollIdle?.();- cancelScrollIdle = timeoutRegistry.schedule(() => {- setIsScrolling(false);- cancelScrollIdle = null;- }, SCROLL_IDLE_TIMEOUT_MS);- };-- setHasScrolled(window.scrollY > 8);- window.addEventListener('scroll', handleScroll, { passive: true });-- return () => {- window.removeEventListener('scroll', handleScroll);- cancelScrollIdle?.();- };- }, [timeoutRegistry]);+ const handleScrollStateChange = useCallback(+ (scrolled: boolean, scrolling: boolean) => {+ setHasScrolled(scrolled);+ setIsScrolling(scrolling);+ },+ [],+ );const buttonColor: {border: string;@@ -166,6 +147,7 @@ export function Root({<CloseDrawerWhenNavigationExpandsEffectonClose={() => setIsDrawerOpen(false)}/>+ <ScrollTrackingEffect onScrollStateChange={handleScrollStateChange} /><StyledSection$enableBackdropBlur={enableBackdropBlur}$isElevated={isScrolling || hasScrolled}@@ -182,7 +164,7 @@ export function Root({<LinkButtoncolor={buttonColor.linkButton}href="https://app.twenty.com/welcome"- label={renderText(msg`Get started`)}+ label={i18n._(msg`Get started`)}variant="contained"/><IconButtondiff --git a/packages/twenty-website-new/src/sections/Menu/data.ts b/packages/twenty-website-new/src/sections/Menu/data.tsindex 922f2b307da..c487d87094d 100644--- a/packages/twenty-website-new/src/sections/Menu/data.ts+++ b/packages/twenty-website-new/src/sections/Menu/data.ts@@ -47,7 +47,7 @@ function buildNavItems(): MenuNavItemType[] {external: true,icon: 'code',preview: {- image: '/images/shared/menu/developers-preview.png',+ image: '/images/shared/menu/developers-preview.webp',imageAlt: 'Blue developer illustration with branching arrows',imagePosition: 'center',imageScale: 1.6,@@ -58,7 +58,7 @@ function buildNavItems(): MenuNavItemType[] {{label: msg`Why Twenty`,description: msg`The open source CRM built to be customised`,- href: '/resources/why-twenty',+ href: '/why-twenty',preview: {image: '/images/why-twenty/hero/background.webp',imageAlt: 'Why Twenty',diff --git a/packages/twenty-website-new/src/sections/Menu/effect-components/ScrollTrackingEffect.tsx b/packages/twenty-website-new/src/sections/Menu/effect-components/ScrollTrackingEffect.tsxnew file mode 100644index 00000000000..84a2a48d136--- /dev/null+++ b/packages/twenty-website-new/src/sections/Menu/effect-components/ScrollTrackingEffect.tsx@@ -0,0 +1,41 @@+'use client';++import { useTimeoutRegistry } from '@/lib/react';+import { useEffect } from 'react';++const SCROLL_IDLE_TIMEOUT_MS = 150;++type ScrollTrackingEffectProps = {+ onScrollStateChange: (hasScrolled: boolean, isScrolling: boolean) => void;+};++export function ScrollTrackingEffect({+ onScrollStateChange,+}: ScrollTrackingEffectProps) {+ const timeoutRegistry = useTimeoutRegistry();++ useEffect(() => {+ let cancelScrollIdle: (() => void) | null = null;++ const handleScroll = () => {+ onScrollStateChange(window.scrollY > 8, true);++ cancelScrollIdle?.();++ cancelScrollIdle = timeoutRegistry.schedule(() => {+ onScrollStateChange(window.scrollY > 8, false);+ cancelScrollIdle = null;+ }, SCROLL_IDLE_TIMEOUT_MS);+ };++ onScrollStateChange(window.scrollY > 8, false);+ window.addEventListener('scroll', handleScroll, { passive: true });++ return () => {+ window.removeEventListener('scroll', handleScroll);+ cancelScrollIdle?.();+ };+ }, [onScrollStateChange, timeoutRegistry]);++ return null;+}diff --git a/packages/twenty-website-new/src/sections/Menu/index.ts b/packages/twenty-website-new/src/sections/Menu/index.tsnew file mode 100644index 00000000000..68b15f3fa33--- /dev/null+++ b/packages/twenty-website-new/src/sections/Menu/index.ts@@ -0,0 +1,10 @@+export { Menu } from './components';+export { MENU_DATA } from './data';+export type {+ MenuDataType,+ MenuNavChildItemType,+ MenuNavChildPreview,+ MenuNavItemType,+ MenuSocialLinkType,+} from './types';+export type { MenuScheme } from './types';diff --git a/packages/twenty-website-new/src/sections/Menu/types/MenuData.ts b/packages/twenty-website-new/src/sections/Menu/types/MenuData.tsdeleted file mode 100644index c0c6a67c935..00000000000--- a/packages/twenty-website-new/src/sections/Menu/types/MenuData.ts+++ /dev/null@@ -1,7 +0,0 @@-import type { MenuNavItemType } from './MenuNavItem';-import type { MenuSocialLinkType } from './MenuSocialLink';--export type MenuDataType = {- navItems: MenuNavItemType[];- socialLinks: MenuSocialLinkType[];-};diff --git a/packages/twenty-website-new/src/sections/Menu/types/index.ts b/packages/twenty-website-new/src/sections/Menu/types/index.tsindex 1cd10e97d4a..c289d8f43a2 100644--- a/packages/twenty-website-new/src/sections/Menu/types/index.ts+++ b/packages/twenty-website-new/src/sections/Menu/types/index.ts@@ -1,8 +1,8 @@-export type { MenuDataType } from './MenuData';+export type { MenuDataType } from './menu-data';export type {MenuNavChildItemType,MenuNavChildPreview,MenuNavItemType,-} from './MenuNavItem';+} from './menu-nav-item';export type MenuScheme = 'primary' | 'secondary';-export type { MenuSocialLinkType } from './MenuSocialLink';+export type { MenuSocialLinkType } from './menu-social-link';diff --git a/packages/twenty-website-new/src/sections/Menu/types/menu-data.ts b/packages/twenty-website-new/src/sections/Menu/types/menu-data.tsnew file mode 100644index 00000000000..303f2f68118--- /dev/null+++ b/packages/twenty-website-new/src/sections/Menu/types/menu-data.ts@@ -0,0 +1,7 @@+import type { MenuNavItemType } from './menu-nav-item';+import type { MenuSocialLinkType } from './menu-social-link';++export type MenuDataType = {+ navItems: MenuNavItemType[];+ socialLinks: MenuSocialLinkType[];+};diff --git a/packages/twenty-website-new/src/sections/Menu/types/MenuNavItem.ts b/packages/twenty-website-new/src/sections/Menu/types/menu-nav-item.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Menu/types/MenuNavItem.tsrename to packages/twenty-website-new/src/sections/Menu/types/menu-nav-item.tsdiff --git a/packages/twenty-website-new/src/sections/Menu/types/MenuSocialLink.ts b/packages/twenty-website-new/src/sections/Menu/types/menu-social-link.tssimilarity index 100%rename from packages/twenty-website-new/src/sections/Menu/types/MenuSocialLink.tsrename to packages/twenty-website-new/src/sections/Menu/types/menu-social-link.tsdiff --git a/packages/twenty-website-new/src/lib/partner-application/PartnerApplicationModal.tsx b/packages/twenty-website-new/src/sections/PartnerApplication/PartnerApplicationModal.tsxsimilarity index 82%rename from packages/twenty-website-new/src/lib/partner-application/PartnerApplicationModal.tsxrename to packages/twenty-website-new/src/sections/PartnerApplication/PartnerApplicationModal.tsxindex 89f4ac74dfb..17ccabde0a6 100644--- a/packages/twenty-website-new/src/lib/partner-application/PartnerApplicationModal.tsx+++ b/packages/twenty-website-new/src/sections/PartnerApplication/PartnerApplicationModal.tsx@@ -1,23 +1,31 @@'use client';-import { Body, Form, Heading, Modal } from '@/design-system/components';+import {+ Body,+ Form,+ Heading,+ HeadingPart,+ Modal,+} from '@/design-system/components';import {BUTTON_HEIGHTS_PX,buttonBaseStyles,} from '@/design-system/components/Button/BaseButton';import { ButtonShape } from '@/design-system/components/Button/ButtonShape';-import { useRenderMessage } from '@/lib/i18n/use-render-message';+import { useLingui } from '@lingui/react';import {PARTNER_APPLICATION_MODAL_COPY,PARTNER_PROGRAM_IDS,PARTNER_PROGRAM_LABELS,type PartnerProgramId,-} from '@/lib/partner-application/partner-application-modal-data';+} from '@/sections/PartnerApplication/partner-application-modal-data';import { theme } from '@/theme';import { css } from '@linaria/core';import { styled } from '@linaria/react';import { IconChevronDown } from '@tabler/icons-react';-import { useCallback, useEffect, useRef, useState } from 'react';+import { useCallback, useMemo, useRef, useState } from 'react';++import { usePartnerFormReset } from './use-partner-form-reset';const partnerPanelClass = css`--modal-panel-width: min(360px, 100%);@@ -268,7 +276,7 @@ export function PartnerApplicationModal({onClose,initialProgramId = 'technology',}: PartnerApplicationModalProps) {- const renderText = useRenderMessage();+ const { i18n } = useLingui();const formRef = useRef<HTMLFormElement>(null);const dropdownRef = useRef<HTMLDivElement>(null);const [programId, setProgramId] =@@ -278,24 +286,18 @@ export function PartnerApplicationModal({const [isSubmitting, setIsSubmitting] = useState(false);const copy = PARTNER_APPLICATION_MODAL_COPY;- useEffect(() => {- if (open) {- setProgramId(initialProgramId);- }- }, [open, initialProgramId]);-- useEffect(() => {- if (open) {- setSubmitError(null);- return;- }+ const formResetCallbacks = useMemo(+ () => ({+ formRef,+ setProgramId,+ setDropdownOpen,+ setSubmitError,+ setIsSubmitting,+ }),+ [],+ );- formRef.current?.reset();- setProgramId('technology');- setDropdownOpen(false);- setSubmitError(null);- setIsSubmitting(false);- }, [open]);+ usePartnerFormReset(open, initialProgramId, formResetCallbacks);const handleDropdownBlur = useCallback((event: React.FocusEvent<HTMLDivElement>) => {@@ -340,12 +342,12 @@ export function PartnerApplicationModal({setSubmitError(null);if (!name || !email || !company || !website || !message) {- setSubmitError(renderText(validationCopy.incompleteForm));+ setSubmitError(i18n._(validationCopy.incompleteForm));return;}if (!emailLooksValid) {- setSubmitError(renderText(validationCopy.invalidEmail));+ setSubmitError(i18n._(validationCopy.invalidEmail));return;}@@ -367,18 +369,18 @@ export function PartnerApplicationModal({});if (!response.ok) {- setSubmitError(renderText(validationCopy.submitFailed));+ setSubmitError(i18n._(validationCopy.submitFailed));return;}onClose();} catch {- setSubmitError(renderText(validationCopy.submitFailed));+ setSubmitError(i18n._(validationCopy.submitFailed));} finally {setIsSubmitting(false);}},- [isSubmitting, onClose, programId, renderText],+ [isSubmitting, onClose, programId, i18n],);return (@@ -393,41 +395,23 @@ export function PartnerApplicationModal({<Modal.Titlerender={<TitleHeadingWrapper>- <Heading- as="h2"- segments={[- {- fontFamily: 'serif',- text: copy.titleSerif,- fontWeight: 'light',- },- {- fontFamily: 'sans',- text: copy.titleSans,- fontWeight: 'light',- newLine: true,- },- ]}- renderText={renderText}- size="lg"- weight="light"- />+ <Heading as="h2" size="lg" weight="light">+ <HeadingPart fontFamily="serif" fontWeight="light">+ {i18n._(copy.titleSerif)}+ </HeadingPart>+ <br />+ <HeadingPart fontFamily="sans" fontWeight="light">+ {i18n._(copy.titleSans)}+ </HeadingPart>+ </Heading></TitleHeadingWrapper>}/><Modal.Descriptionrender={<SubtitleStack>- <Body- body={{ text: copy.subtitleLine1 }}- renderText={renderText}- size="md"- />- <Body- body={{ text: copy.subtitleLine2 }}- renderText={renderText}- size="md"- />+ <Body size="md">{i18n._(copy.subtitleLine1)}</Body>+ <Body size="md">{i18n._(copy.subtitleLine2)}</Body></SubtitleStack>}/>@@ -435,7 +419,7 @@ export function PartnerApplicationModal({<form ref={formRef} autoComplete="off" noValidate onSubmit={handleSubmit}><FormFields>- <Segments role="radiogroup" aria-label={renderText(copy.selectLabel)}>+ <Segments role="radiogroup" aria-label={i18n._(copy.selectLabel)}>{PARTNER_PROGRAM_IDS.map((id) => (<SegmentButtonkey={id}@@ -447,7 +431,7 @@ export function PartnerApplicationModal({setProgramId(id);}}>- {renderText(PARTNER_PROGRAM_LABELS[id])}+ {i18n._(PARTNER_PROGRAM_LABELS[id])}</SegmentButton>))}</Segments>@@ -457,16 +441,16 @@ export function PartnerApplicationModal({<DropdownTriggeraria-expanded={dropdownOpen}aria-haspopup="listbox"- aria-label={renderText(copy.selectLabel)}+ aria-label={i18n._(copy.selectLabel)}type="button"onClick={() => {setDropdownOpen((previous) => !previous);}}><DropdownTriggerContent>- <DropdownLabel>{renderText(copy.selectLabel)}</DropdownLabel>+ <DropdownLabel>{i18n._(copy.selectLabel)}</DropdownLabel><DropdownValue>- {renderText(PARTNER_PROGRAM_LABELS[programId])}+ {i18n._(PARTNER_PROGRAM_LABELS[programId])}</DropdownValue></DropdownTriggerContent><DropdownIconContainer aria-hidden>@@ -477,7 +461,7 @@ export function PartnerApplicationModal({{dropdownOpen && (<DropdownPanelrole="listbox"- aria-label={renderText(copy.selectLabel)}+ aria-label={i18n._(copy.selectLabel)}>{PARTNER_PROGRAM_IDS.map((id) => (<DropdownOption@@ -491,7 +475,7 @@ export function PartnerApplicationModal({setDropdownOpen(false);}}>- {renderText(PARTNER_PROGRAM_LABELS[id])}+ {i18n._(PARTNER_PROGRAM_LABELS[id])}</DropdownOption>))}</DropdownPanel>@@ -504,7 +488,7 @@ export function PartnerApplicationModal({aria-required="true"autoComplete="off"name="name"- placeholder={renderText(copy.fields.name)}+ placeholder={i18n._(copy.fields.name)}type="text"/></Form.Field>@@ -516,7 +500,7 @@ export function PartnerApplicationModal({autoComplete="off"inputMode="email"name="email"- placeholder={renderText(copy.fields.email)}+ placeholder={i18n._(copy.fields.email)}type="text"/></Form.Field>@@ -525,7 +509,7 @@ export function PartnerApplicationModal({aria-required="true"autoComplete="off"name="company"- placeholder={renderText(copy.fields.company)}+ placeholder={i18n._(copy.fields.company)}type="text"/></Form.Field>@@ -536,7 +520,7 @@ export function PartnerApplicationModal({aria-required="true"autoComplete="off"name="website"- placeholder={renderText(copy.fields.website)}+ placeholder={i18n._(copy.fields.website)}type="text"/></Form.Field>@@ -545,7 +529,7 @@ export function PartnerApplicationModal({<Form.InputautoComplete="off"name="opportunities"- placeholder={renderText(copy.fields.opportunities)}+ placeholder={i18n._(copy.fields.opportunities)}type="text"/></Form.Field>@@ -555,7 +539,7 @@ export function PartnerApplicationModal({aria-required="true"autoComplete="off"name="message"- placeholder={`${renderText(copy.fields.messageLabel)}\n\n${renderText(copy.fields.messageHint)}`}+ placeholder={`${i18n._(copy.fields.messageLabel)}\n\n${i18n._(copy.fields.messageHint)}`}/></Form.Field>@@ -574,7 +558,7 @@ export function PartnerApplicationModal({strokeColor="none"/><SubmitLabel>- {renderText(isSubmitting ? copy.submitInFlight : copy.submit)}+ {i18n._(isSubmitting ? copy.submitInFlight : copy.submit)}</SubmitLabel></SubmitButton></Modal.Footer>diff --git a/packages/twenty-website-new/src/lib/partner-application/PartnerApplicationModalRoot.tsx b/packages/twenty-website-new/src/sections/PartnerApplication/PartnerApplicationModalRoot.tsxsimilarity index 52%rename from packages/twenty-website-new/src/lib/partner-application/PartnerApplicationModalRoot.tsxrename to packages/twenty-website-new/src/sections/PartnerApplication/PartnerApplicationModalRoot.tsxindex dbe5d962cea..46f4a683c44 100644--- a/packages/twenty-website-new/src/lib/partner-application/PartnerApplicationModalRoot.tsx+++ b/packages/twenty-website-new/src/sections/PartnerApplication/PartnerApplicationModalRoot.tsx@@ -1,16 +1,9 @@'use client';-import {- createContext,- useCallback,- useContext,- useMemo,- useState,- type ReactNode,-} from 'react';+import { createContext, useContext, useState, type ReactNode } from 'react';-import { PartnerApplicationModal } from '@/lib/partner-application/PartnerApplicationModal';-import type { PartnerProgramId } from '@/lib/partner-application/partner-application-modal-data';+import { PartnerApplicationModal } from '@/sections/PartnerApplication/PartnerApplicationModal';+import type { PartnerProgramId } from '@/sections/PartnerApplication/partner-application-modal-data';type PartnerApplicationModalContextValue = {openPartnerApplicationModal: (programId?: PartnerProgramId) => void;@@ -38,31 +31,21 @@ export function PartnerApplicationModalRoot({const [initialProgramId, setInitialProgramId] =useState<PartnerProgramId>('technology');- const openPartnerApplicationModal = useCallback(- (programId?: PartnerProgramId) => {- if (programId !== undefined) {- setInitialProgramId(programId);- }- setOpen(true);- },- [],- );-- const closePartnerApplicationModal = useCallback(() => {- setOpen(false);- }, []);-- const contextValue = useMemo(- () => ({ openPartnerApplicationModal }),- [openPartnerApplicationModal],- );-return (- <PartnerApplicationModalContext.Provider value={contextValue}>+ <PartnerApplicationModalContext.Provider+ value={{+ openPartnerApplicationModal: (programId?: PartnerProgramId) => {+ if (programId !== undefined) {+ setInitialProgramId(programId);+ }+ setOpen(true);+ },+ }}+ >{children}<PartnerApplicationModalinitialProgramId={initialProgramId}- onClose={closePartnerApplicationModal}+ onClose={() => setOpen(false)}open={open}/></PartnerApplicationModalContext.Provider>diff --git a/packages/twenty-website-new/src/lib/partner-application/__tests__/split-full-name.test.ts b/packages/twenty-website-new/src/sections/PartnerApplication/__tests__/split-full-name.test.tssimilarity index 93%rename from packages/twenty-website-new/src/lib/partner-application/__tests__/split-full-name.test.tsrename to packages/twenty-website-new/src/sections/PartnerApplication/__tests__/split-full-name.test.tsindex 143a08c3e44..3ea7a04be76 100644--- a/packages/twenty-website-new/src/lib/partner-application/__tests__/split-full-name.test.ts+++ b/packages/twenty-website-new/src/sections/PartnerApplication/__tests__/split-full-name.test.ts@@ -1,4 +1,4 @@-import { splitFullName } from '@/lib/partner-application/split-full-name';+import { splitFullName } from '@/sections/PartnerApplication/split-full-name';describe('splitFullName', () => {it('splits a standard "first last" name', () => {diff --git a/packages/twenty-website-new/src/lib/partner-application/index.ts b/packages/twenty-website-new/src/sections/PartnerApplication/index.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/partner-application/index.tsrename to packages/twenty-website-new/src/sections/PartnerApplication/index.tsdiff --git a/packages/twenty-website-new/src/lib/partner-application/partner-application-modal-data.ts b/packages/twenty-website-new/src/sections/PartnerApplication/partner-application-modal-data.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/partner-application/partner-application-modal-data.tsrename to packages/twenty-website-new/src/sections/PartnerApplication/partner-application-modal-data.tsdiff --git a/packages/twenty-website-new/src/lib/partner-application/split-full-name.ts b/packages/twenty-website-new/src/sections/PartnerApplication/split-full-name.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/partner-application/split-full-name.tsrename to packages/twenty-website-new/src/sections/PartnerApplication/split-full-name.tsdiff --git a/packages/twenty-website-new/src/sections/PartnerApplication/use-partner-form-reset.ts b/packages/twenty-website-new/src/sections/PartnerApplication/use-partner-form-reset.tsnew file mode 100644index 00000000000..b93cf83bda0--- /dev/null+++ b/packages/twenty-website-new/src/sections/PartnerApplication/use-partner-form-reset.ts@@ -0,0 +1,36 @@+'use client';++import { useEffect } from 'react';++import type { PartnerProgramId } from './partner-application-modal-data';++export function usePartnerFormReset(+ open: boolean,+ initialProgramId: PartnerProgramId,+ callbacks: {+ formRef: React.RefObject<HTMLFormElement | null>;+ setProgramId: (id: PartnerProgramId) => void;+ setDropdownOpen: (open: boolean) => void;+ setSubmitError: (error: string | null) => void;+ setIsSubmitting: (submitting: boolean) => void;+ },+) {+ useEffect(() => {+ if (open) {+ callbacks.setProgramId(initialProgramId);+ }+ }, [open, initialProgramId, callbacks]);++ useEffect(() => {+ if (open) {+ callbacks.setSubmitError(null);+ return;+ }++ callbacks.formRef.current?.reset();+ callbacks.setProgramId('technology');+ callbacks.setDropdownOpen(false);+ callbacks.setSubmitError(null);+ callbacks.setIsSubmitting(false);+ }, [open, callbacks]);+}diff --git a/packages/twenty-website-new/src/sections/PlanTable/components/CalculatorEmbed.tsx b/packages/twenty-website-new/src/sections/PlanTable/components/CalculatorEmbed.tsxindex 7e199c195f0..593456d84c7 100644--- a/packages/twenty-website-new/src/sections/PlanTable/components/CalculatorEmbed.tsx+++ b/packages/twenty-website-new/src/sections/PlanTable/components/CalculatorEmbed.tsx@@ -1,9 +1,10 @@import { Body, Heading } from '@/design-system/components';+import { useLingui } from '@lingui/react';import type { PlanTableCalculatorDataType } from '@/sections/PlanTable/types';import { theme } from '@/theme';-import type { MessageDescriptor } from '@lingui/core';import { styled } from '@linaria/react';import NextImage from 'next/image';+import type { ReactNode } from 'react';const CALCULATOR_BORDER = '#feffb7';@@ -165,14 +166,15 @@ const PricePeriod = styled.span``;type CalculatorEmbedProps = {- calculator: PlanTableCalculatorDataType;- renderText: (descriptor: MessageDescriptor) => string;+ calculator: Omit<PlanTableCalculatorDataType, 'visual'> & {+ visual: Omit<PlanTableCalculatorDataType['visual'], 'heading'> & {+ heading: ReactNode;+ };+ };};-export function CalculatorEmbed({- calculator,- renderText,-}: CalculatorEmbedProps) {+export function CalculatorEmbed({ calculator }: CalculatorEmbedProps) {+ const { i18n } = useLingui();const { priceLine, sections, visual } = calculator;return (@@ -189,35 +191,25 @@ export function CalculatorEmbed({/></VisualFrame>) : null}- <Heading- as="h3"- renderText={renderText}- segments={visual.heading}- size="lg"- weight="light"- />+ <Heading as="h3" size="lg" weight="light">+ {visual.heading}+ </Heading><BodyOnDark>- <Body- body={visual.body}- family="sans"- renderText={renderText}- size="md"- weight="regular"- />+ <Body family="sans" size="md" weight="regular">+ {i18n._(visual.body)}+ </Body></BodyOnDark></VisualColumn><ControlsColumn>{sections.map((section) => (<SectionBlock key={section.id}><SectionTitleRow>- <span>{renderText(section.title)}</span>+ <span>{i18n._(section.title)}</span><span aria-hidden="true">☑</span></SectionTitleRow><FieldsRow><Field>- <FieldLabel>- {renderText(section.requestField.label)}- </FieldLabel>+ <FieldLabel>{i18n._(section.requestField.label)}</FieldLabel><FakeInput><StepperInner><StepperBtn aria-hidden="true">‹</StepperBtn>@@ -227,7 +219,7 @@ export function CalculatorEmbed({</FakeInput></Field><Field>- <FieldLabel>{renderText(section.tasksField.label)}</FieldLabel>+ <FieldLabel>{i18n._(section.tasksField.label)}</FieldLabel><FakeInput><span>{section.tasksField.value}</span><span aria-hidden="true">▾</span>@@ -236,7 +228,7 @@ export function CalculatorEmbed({</FieldsRow>{section.modelField ? (<Field>- <FieldLabel>{renderText(section.modelField.label)}</FieldLabel>+ <FieldLabel>{i18n._(section.modelField.label)}</FieldLabel><FakeInput><span>{section.modelField.value}</span><span aria-hidden="true">▾</span>@@ -247,10 +239,10 @@ export function CalculatorEmbed({))}<PriceFooter><PriceRow>- <span>{renderText(priceLine.label)}</span>+ <span>{i18n._(priceLine.label)}</span><span><PriceAmount>{priceLine.amount}</PriceAmount>- <PricePeriod> {renderText(priceLine.periodSuffix)}</PricePeriod>+ <PricePeriod> {i18n._(priceLine.periodSuffix)}</PricePeriod></span></PriceRow></PriceFooter>diff --git a/packages/twenty-website-new/src/sections/PlanTable/components/Content.tsx b/packages/twenty-website-new/src/sections/PlanTable/components/Content.tsxindex 238bf0174a5..97d83f090c6 100644--- a/packages/twenty-website-new/src/sections/PlanTable/components/Content.tsx+++ b/packages/twenty-website-new/src/sections/PlanTable/components/Content.tsx@@ -5,9 +5,9 @@ import {buttonBaseStyles,} from '@/design-system/components/Button/BaseButton';import { CheckIcon } from '@/icons';-import { useRenderMessage } from '@/lib/i18n/use-render-message';+import { useLingui } from '@lingui/react';import type { MessageDescriptor } from '@lingui/core';-import { usePricingState } from '@/sections/Plans/context/PricingStateContext';+import { usePricingState } from '@/sections/Plans';import type {PlanTableBodyRowDataType,PlanTableCellType,@@ -136,16 +136,16 @@ const ToggleButton = styled.button`type CellValueProps = {cell: PlanTableCellType;- renderText: (descriptor: MessageDescriptor) => string;};-function CellValue({ cell, renderText }: CellValueProps) {+function CellValue({ cell }: CellValueProps) {+ const { i18n } = useLingui();if (cell.kind === 'dash') {- return <TierText>{renderText(msg`No`)}</TierText>;+ return <TierText>{i18n._(msg`No`)}</TierText>;}if (cell.kind === 'text') {- return <TierText>{renderText(cell.text)}</TierText>;+ return <TierText>{i18n._(cell.text)}</TierText>;}const label = cell.label ?? msg`Yes`;@@ -153,7 +153,7 @@ function CellValue({ cell, renderText }: CellValueProps) {return (<YesRow><CheckIcon color={theme.colors.highlight[100]} size={16} />- <TierText>{renderText(label)}</TierText>+ <TierText>{i18n._(label)}</TierText></YesRow>);}@@ -192,18 +192,18 @@ function resolveVisibleRows(}type FeatureRowProps = {- renderText: (descriptor: MessageDescriptor) => string;row: PlanTableFeatureRowDataType;tierColumns: PlanTableTierColumnType[];};-function FeatureRow({ renderText, row, tierColumns }: FeatureRowProps) {+function FeatureRow({ row, tierColumns }: FeatureRowProps) {+ const { i18n } = useLingui();return (<GridRow>- <FeatureLabel>{renderText(row.featureLabel)}</FeatureLabel>+ <FeatureLabel>{i18n._(row.featureLabel)}</FeatureLabel>{tierColumns.map((column) => (<TierCell key={column.id}>- <CellValue cell={row.tiers[column.id]} renderText={renderText} />+ <CellValue cell={row.tiers[column.id]} /></TierCell>))}</GridRow>@@ -211,15 +211,15 @@ function FeatureRow({ renderText, row, tierColumns }: FeatureRowProps) {}type CategoryRowProps = {- renderText: (descriptor: MessageDescriptor) => string;title: MessageDescriptor;};-function CategoryRow({ renderText, title }: CategoryRowProps) {+function CategoryRow({ title }: CategoryRowProps) {+ const { i18n } = useLingui();return (<GridRow><CategoryBand>- <CategoryTitle>{renderText(title)}</CategoryTitle>+ <CategoryTitle>{i18n._(title)}</CategoryTitle></CategoryBand><CategoryBand aria-hidden="true" /><CategoryBand aria-hidden="true" />@@ -232,7 +232,7 @@ type ContentProps = {};export function Content({ data }: ContentProps) {- const renderText = useRenderMessage();+ const { i18n } = useLingui();const [expanded, setExpanded] = useState(false);const { hosting } = usePricingState();@@ -255,11 +255,7 @@ export function Content({ data }: ContentProps) {if (row.type === 'category') {return (- <CategoryRow- key={`${row.title}-${rowIndex}`}- renderText={renderText}- title={row.title}- />+ <CategoryRow key={`${row.title}-${rowIndex}`} title={row.title} />);}@@ -268,7 +264,6 @@ export function Content({ data }: ContentProps) {<CalculatorEmbedcalculator={row.calculator}key={`calculator-${rowIndex}`}- renderText={renderText}/>);}@@ -276,7 +271,6 @@ export function Content({ data }: ContentProps) {return (<FeatureRowkey={`${row.featureLabel}-${rowIndex}`}- renderText={renderText}row={row}tierColumns={data.tierColumns}/>@@ -286,9 +280,9 @@ export function Content({ data }: ContentProps) {return (<TableScope><GridRow>- <HeadFeature>{renderText(data.featureColumnLabel)}</HeadFeature>+ <HeadFeature>{i18n._(data.featureColumnLabel)}</HeadFeature>{data.tierColumns.map((column) => (- <HeadTier key={column.id}>{renderText(column.label)}</HeadTier>+ <HeadTier key={column.id}>{i18n._(column.label)}</HeadTier>))}</GridRow>@@ -312,7 +306,7 @@ export function Content({ data }: ContentProps) {><BaseButtoncolor="primary"- label={renderText(toggleLabel)}+ label={i18n._(toggleLabel)}variant="outlined"/></ToggleButton>diff --git a/packages/twenty-website-new/src/sections/PlanTable/components/Root.tsx b/packages/twenty-website-new/src/sections/PlanTable/components/Root.tsxindex 3892514a75a..281878ca04a 100644--- a/packages/twenty-website-new/src/sections/PlanTable/components/Root.tsx+++ b/packages/twenty-website-new/src/sections/PlanTable/components/Root.tsx@@ -1,10 +1,22 @@import { Container } from '@/design-system/components';-import { theme } from '@/theme';+import { theme, type Scheme } from '@/theme';import { styled } from '@linaria/react';import type { ReactNode } from 'react';const StyledSection = styled.section`width: 100%;++ &[data-scheme='light'] {+ background-color: var(--color-white);+ }++ &[data-scheme='muted'] {+ background-color: var(--color-neutral);+ }++ &[data-scheme='dark'] {+ background-color: var(--color-black);+ }`;const StyledContainer = styled(Container)`@@ -26,13 +38,17 @@ const StyledContainer = styled(Container)``;type RootProps = {- backgroundColor: string;+ backgroundColor?: string;children: ReactNode;+ scheme?: Scheme;};-export function Root({ backgroundColor, children }: RootProps) {+export function Root({ backgroundColor, children, scheme }: RootProps) {return (- <StyledSection style={{ backgroundColor }}>+ <StyledSection+ data-scheme={scheme}+ style={scheme ? undefined : { backgroundColor }}+ ><StyledContainer>{children}</StyledContainer></StyledSection>);diff --git a/packages/twenty-website-new/src/sections/PlanTable/index.ts b/packages/twenty-website-new/src/sections/PlanTable/index.tsnew file mode 100644index 00000000000..152701dc651--- /dev/null+++ b/packages/twenty-website-new/src/sections/PlanTable/index.ts@@ -0,0 +1,12 @@+export { PlanTable } from './components';+export type {+ PlanTableBodyRowDataType,+ PlanTableCalculatorDataType,+ PlanTableCalculatorEmbedDataType,+ PlanTableCalculatorSectionDataType,+ PlanTableCategoryRowDataType,+ PlanTableCellType,+ PlanTableDataType,+ PlanTableFeatureRowDataType,+ PlanTableTierColumnType,+} from './types';diff --git a/packages/twenty-website-new/src/sections/PlanTable/types/index.ts b/packages/twenty-website-new/src/sections/PlanTable/types/index.tsindex c7e902ececd..6324c01b99e 100644--- a/packages/twenty-website-new/src/sections/PlanTable/types/index.ts+++ b/packages/twenty-website-new/src/sections/PlanTable/types/index.ts@@ -8,4 +8,4 @@ export type {PlanTableDataType,PlanTableFeatureRowDataType,PlanTableTierColumnType,-} from './PlanTableData';+} from './plan-table-data';diff --git a/packages/twenty-website-new/src/sections/PlanTable/types/PlanTableData.ts b/packages/twenty-website-new/src/sections/PlanTable/types/plan-table-data.tssimilarity index 89%rename from packages/twenty-website-new/src/sections/PlanTable/types/PlanTableData.tsrename to packages/twenty-website-new/src/sections/PlanTable/types/plan-table-data.tsindex 7efdaeb3cd4..5861299eec9 100644--- a/packages/twenty-website-new/src/sections/PlanTable/types/PlanTableData.ts+++ b/packages/twenty-website-new/src/sections/PlanTable/types/plan-table-data.ts@@ -1,7 +1,6 @@-import type { MessageBody } from '@/lib/i18n/message-body';-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';import type { MessageDescriptor } from '@lingui/core';-import type { PlansHostingMode, PlansTierId } from '@/sections/Plans/types';+import type { ReactNode } from 'react';+import type { PlansHostingMode, PlansTierId } from '@/sections/Plans';export type PlanTableTierColumnType = {id: PlansTierId;@@ -54,8 +53,8 @@ export type PlanTableCalculatorDataType = {};sections: PlanTableCalculatorSectionDataType[];visual: {- body: MessageBody;- heading: MessageHeadingSegment[];+ body: MessageDescriptor;+ heading: ReactNode;imageAlt?: string;imageSrc?: string;};diff --git a/packages/twenty-website-new/src/sections/Plans/components/Card.tsx b/packages/twenty-website-new/src/sections/Plans/components/Card.tsxindex e460071e570..3ae2a758ee0 100644--- a/packages/twenty-website-new/src/sections/Plans/components/Card.tsx+++ b/packages/twenty-website-new/src/sections/Plans/components/Card.tsx@@ -3,17 +3,21 @@import { styled } from '@linaria/react';import NextImage from 'next/image';-import { Body, Heading, LinkButton } from '@/design-system/components';-import { CheckIcon } from '@/icons/informative/Check';+import {+ Body,+ Heading,+ HeadingPart,+ LinkButton,+} from '@/design-system/components';import { useAnimatedNumber } from '@/lib/animation';-import { getMessageDescriptorSource } from '@/lib/i18n/get-message-descriptor-source';-import { useRenderMessage } from '@/lib/i18n/use-render-message';-import { useTimeoutRegistry } from '@/lib/react';import type { PlanCardType } from '@/sections/Plans/types';import { theme } from '@/theme';import { msg } from '@lingui/core/macro';+import { useLingui } from '@lingui/react';import { css } from '@linaria/core';-import { useEffect, useState } from 'react';++import { PlanFeatureList } from './PlanFeatureList';+import { useFeatureTransition } from './use-feature-transition';const StyledCard = styled.div`background-color: ${theme.colors.primary.background[100]};@@ -140,109 +144,7 @@ const CtaWrapper = styled.div`}`;-const FEATURES_SWITCH_ANIMATION_MS = 110;-const FEATURE_ITEM_STAGGER_MS = 8;-const FEATURE_ITEM_EXPANDED_HEIGHT = theme.spacing(8);-const FEATURE_ITEM_SPACING = theme.spacing(4);-const FEATURE_LIST_ROW_LAYOUT_HEIGHT = theme.spacing(5.5);--const FeaturesViewport = styled.div<{ $featuresHeight: string }>`- flex: 1 1 auto;- min-height: ${({ $featuresHeight }) => $featuresHeight};- min-width: 0;- overflow: hidden;- position: relative;- transition: min-height ${FEATURES_SWITCH_ANIMATION_MS}ms- cubic-bezier(0.2, 0.8, 0.2, 1);-- @media (prefers-reduced-motion: reduce) {- transition: none;- }-`;--const FeaturesList = styled.ul`- display: flex;- flex-direction: column;- list-style: none;- margin: 0;- min-width: 0;- padding: 0;- width: 100%;-`;--const FeatureCheck = styled.span`- align-items: center;- display: inline-flex;- height: 16px;- justify-content: center;- width: 16px;-`;--const FeatureItem = styled.li<{- $featureIndex: number;- $featureSpacing: string;-}>`- @keyframes pricingFeatureItemEnter {- from {- margin-top: 0;- max-height: 0;- opacity: 0;- }-- to {- margin-top: ${({ $featureSpacing }) => $featureSpacing};- max-height: ${FEATURE_ITEM_EXPANDED_HEIGHT};- opacity: 1;- }- }-- @keyframes pricingFeatureItemExit {- from {- margin-top: ${({ $featureSpacing }) => $featureSpacing};- max-height: ${FEATURE_ITEM_EXPANDED_HEIGHT};- opacity: 1;- }-- to {- margin-top: 0;- max-height: 0;- opacity: 0;- }- }-- align-items: center;- column-gap: ${theme.spacing(2)};- display: grid;- grid-template-columns: auto 1fr;- margin-top: ${({ $featureSpacing }) => $featureSpacing};- max-height: ${FEATURE_ITEM_EXPANDED_HEIGHT};- min-width: 0;- overflow: hidden;-- &[data-state='stable'] {- max-height: none;- }-- &[data-state='entering'] {- animation: pricingFeatureItemEnter ${FEATURES_SWITCH_ANIMATION_MS}ms- cubic-bezier(0.2, 0.8, 0.2, 1) both;- animation-delay: calc(- ${({ $featureIndex }) => $featureIndex} * ${FEATURE_ITEM_STAGGER_MS}ms- );- }-- &[data-state='exiting'] {- animation: pricingFeatureItemExit ${FEATURES_SWITCH_ANIMATION_MS}ms- cubic-bezier(0.2, 0.8, 0.2, 1) both;- animation-delay: calc(- ${({ $featureIndex }) => $featureIndex} * ${FEATURE_ITEM_STAGGER_MS}ms- );- }-- @media (prefers-reduced-motion: reduce) {- animation: none;- }-`;+const PRICE_NUMBER_FORMATTER = new Intl.NumberFormat('en-US');type CardProps = {card: PlanCardType;@@ -250,165 +152,12 @@ type CardProps = {maxBullets: number;};-const PRICE_NUMBER_FORMATTER = new Intl.NumberFormat('en-US');-const PRICE_HEADING_NUMBER_REGEX = /^(.*?)(\d[\d,]*)(.*)$/;--function getHeadingSegments(heading: PlanCardType['price']['heading']) {- return Array.isArray(heading) ? heading : [heading];-}--function getPriceHeadingNumericValue(- heading: PlanCardType['price']['heading'],-) {- const segments = getHeadingSegments(heading);-- for (const segment of segments) {- const match = getMessageDescriptorSource(segment.text).match(- PRICE_HEADING_NUMBER_REGEX,- );-- if (!match) {- continue;- }-- return Number(match[2].replaceAll(',', ''));- }-- return null;-}--function getAnimatedPriceHeading(- heading: PlanCardType['price']['heading'],- animatedValue: number,-) {- const originalIsArray = Array.isArray(heading);- let replaced = false;-- const nextSegments = getHeadingSegments(heading).map((segment) => {- if (replaced) {- return segment;- }-- const match = getMessageDescriptorSource(segment.text).match(- PRICE_HEADING_NUMBER_REGEX,- );-- if (!match) {- return segment;- }-- replaced = true;-- return {- ...segment,- text: `${match[1]}${PRICE_NUMBER_FORMATTER.format(animatedValue)}${match[3]}`,- };- });-- return originalIsArray ? nextSegments : nextSegments[0];-}--function getBulletsKey(bullets: PlanCardType['features']['bullets']) {- return bullets- .map((bullet) => getMessageDescriptorSource(bullet.text))- .join('||');-}--function getFeaturesLayoutMinHeight(maxBullets: number) {- if (maxBullets <= 0) {- return '0px';- }-- return `calc((${FEATURE_LIST_ROW_LAYOUT_HEIGHT} * ${maxBullets}) + (${theme.spacing(- 4,- )} * ${maxBullets - 1}))`;-}--function getFeaturesAnimationMinHeight(maxBullets: number) {- if (maxBullets <= 0) {- return '0px';- }-- return `calc((${FEATURE_ITEM_EXPANDED_HEIGHT} * ${maxBullets}) + (${theme.spacing(- 4,- )} * ${maxBullets - 1}))`;-}-export function Card({ card, highlighted = false, maxBullets }: CardProps) {- const renderText = useRenderMessage();- const timeoutRegistry = useTimeoutRegistry();+ const { i18n } = useLingui();const iconWidth = card.icon.width ?? 80;- const targetPriceValue = getPriceHeadingNumericValue(card.price.heading);- const animatedPriceValue = useAnimatedNumber(targetPriceValue ?? 0);- const animatedPriceHeading =- targetPriceValue === null- ? card.price.heading- : getAnimatedPriceHeading(card.price.heading, animatedPriceValue);- const [visibleBullets, setVisibleBullets] = useState(card.features.bullets);- const [queuedBullets, setQueuedBullets] = useState<- PlanCardType['features']['bullets'] | null- >(null);- const [comparisonBullets, setComparisonBullets] = useState<- PlanCardType['features']['bullets'] | null- >(null);- const [featuresPhase, setFeaturesPhase] = useState<- 'stable' | 'exiting' | 'entering'- >('stable');-- useEffect(() => {- const nextBullets = card.features.bullets;- const nextBulletsKey = getBulletsKey(nextBullets);-- if (- nextBulletsKey === getBulletsKey(visibleBullets) ||- nextBulletsKey === getBulletsKey(queuedBullets ?? [])- ) {- return;- }-- setQueuedBullets(nextBullets);-- if (featuresPhase === 'stable') {- setFeaturesPhase('exiting');- }- }, [card.features.bullets, featuresPhase, queuedBullets, visibleBullets]);-- useEffect(() => {- if (featuresPhase !== 'exiting' || !queuedBullets) {- return;- }-- return timeoutRegistry.schedule(- () => {- setComparisonBullets(visibleBullets);- setVisibleBullets(queuedBullets);- setQueuedBullets(null);- setFeaturesPhase('entering');- },- FEATURES_SWITCH_ANIMATION_MS +- FEATURE_ITEM_STAGGER_MS * visibleBullets.length,- );- }, [featuresPhase, queuedBullets, timeoutRegistry, visibleBullets]);-- useEffect(() => {- if (featuresPhase !== 'entering') {- return;- }-- return timeoutRegistry.schedule(- () => {- setComparisonBullets(null);- setFeaturesPhase('stable');- },- FEATURES_SWITCH_ANIMATION_MS +- FEATURE_ITEM_STAGGER_MS * visibleBullets.length,- );- }, [featuresPhase, timeoutRegistry, visibleBullets]);-- const comparisonBulletTexts = new Set(- (featuresPhase === 'exiting' ? queuedBullets : comparisonBullets)?.map(- (bullet) => getMessageDescriptorSource(bullet.text),- ) ?? [],+ const animatedPriceValue = useAnimatedNumber(card.price.value);+ const { comparisonBulletTexts, phase, visibleBullets } = useFeatureTransition(+ card.features.bullets,);return (@@ -418,26 +167,21 @@ export function Card({ card, highlighted = false, maxBullets }: CardProps) {<Headingas="h3"className={cardPlanTitleClassName}- renderText={renderText}- segments={card.heading}size="xs"weight="light"- />+ >+ <HeadingPart fontFamily="sans">{i18n._(card.heading)}</HeadingPart>+ </Heading><PriceLine>- <Heading- as="h4"- renderText={renderText}- segments={animatedPriceHeading}- size="sm"- weight="regular"- />- <Body- as="span"- body={card.price.body}- className={priceBodyClassName}- renderText={renderText}- size="sm"- />+ <Heading as="h4" size="sm" weight="regular">+ <HeadingPart fontFamily="sans">+ {card.price.prefix}+ {PRICE_NUMBER_FORMATTER.format(animatedPriceValue)}+ </HeadingPart>+ </Heading>+ <Body as="span" className={priceBodyClassName} size="sm">+ {i18n._(card.price.suffix)}+ </Body></PriceLine></CardHeaderInfo><CardIcon $iconWidth={iconWidth}>@@ -452,47 +196,18 @@ export function Card({ card, highlighted = false, maxBullets }: CardProps) {<CardRule />- <FeaturesViewport- $featuresHeight={- featuresPhase === 'stable'- ? getFeaturesLayoutMinHeight(maxBullets)- : getFeaturesAnimationMinHeight(maxBullets)- }- >- <FeaturesList data-state={featuresPhase}>- {visibleBullets.map((bullet, index) => (- <FeatureItem- $featureIndex={index}- $featureSpacing={index > 0 ? FEATURE_ITEM_SPACING : '0px'}- data-state={- featuresPhase === 'stable'- ? 'stable'- : comparisonBulletTexts.has(- getMessageDescriptorSource(bullet.text),- )- ? 'stable'- : featuresPhase- }- key={`${getMessageDescriptorSource(bullet.text)}-${index}`}- >- <FeatureCheck>- <CheckIcon- color={theme.colors.highlight[100]}- size={16}- strokeWidth={1.5}- />- </FeatureCheck>- <Body as="span" body={bullet} renderText={renderText} size="sm" />- </FeatureItem>- ))}- </FeaturesList>- </FeaturesViewport>+ <PlanFeatureList+ comparisonBulletTexts={comparisonBulletTexts}+ maxBullets={maxBullets}+ phase={phase}+ visibleBullets={visibleBullets}+ /><CtaWrapper><LinkButtoncolor="secondary"href="https://app.twenty.com/welcome"- label={renderText(msg`Start for free`)}+ label={i18n._(msg`Start for free`)}variant={highlighted ? 'contained' : 'outlined'}/></CtaWrapper>diff --git a/packages/twenty-website-new/src/sections/Plans/components/PlanFeatureList.tsx b/packages/twenty-website-new/src/sections/Plans/components/PlanFeatureList.tsxnew file mode 100644index 00000000000..fac78205bab--- /dev/null+++ b/packages/twenty-website-new/src/sections/Plans/components/PlanFeatureList.tsx@@ -0,0 +1,185 @@+'use client';++import { Body } from '@/design-system/components';+import { CheckIcon } from '@/icons/informative/Check';+import { getMessageDescriptorSource } from '@/lib/i18n/utils/get-message-descriptor-source';+import { theme } from '@/theme';+import type { MessageDescriptor } from '@lingui/core';+import { useLingui } from '@lingui/react';+import { styled } from '@linaria/react';++import { FEATURE_ITEM_STAGGER_MS } from './feature-item-stagger-ms';+import type { FeatureTransitionPhase } from './feature-transition-phase';++const FEATURES_SWITCH_ANIMATION_MS = 110;+const FEATURE_ITEM_EXPANDED_HEIGHT = theme.spacing(8);+const FEATURE_ITEM_SPACING = theme.spacing(4);+const FEATURE_LIST_ROW_LAYOUT_HEIGHT = theme.spacing(5.5);++const FeaturesViewport = styled.div<{ $featuresHeight: string }>`+ flex: 1 1 auto;+ min-height: ${({ $featuresHeight }) => $featuresHeight};+ min-width: 0;+ overflow: hidden;+ position: relative;+ transition: min-height ${FEATURES_SWITCH_ANIMATION_MS}ms+ cubic-bezier(0.2, 0.8, 0.2, 1);++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+`;++const StyledList = styled.ul`+ display: flex;+ flex-direction: column;+ list-style: none;+ margin: 0;+ min-width: 0;+ padding: 0;+ width: 100%;+`;++const FeatureCheck = styled.span`+ align-items: center;+ display: inline-flex;+ height: 16px;+ justify-content: center;+ width: 16px;+`;++const FeatureItem = styled.li<{+ $featureIndex: number;+ $featureSpacing: string;+}>`+ @keyframes pricingFeatureItemEnter {+ from {+ margin-top: 0;+ max-height: 0;+ opacity: 0;+ }++ to {+ margin-top: ${({ $featureSpacing }) => $featureSpacing};+ max-height: ${FEATURE_ITEM_EXPANDED_HEIGHT};+ opacity: 1;+ }+ }++ @keyframes pricingFeatureItemExit {+ from {+ margin-top: ${({ $featureSpacing }) => $featureSpacing};+ max-height: ${FEATURE_ITEM_EXPANDED_HEIGHT};+ opacity: 1;+ }++ to {+ margin-top: 0;+ max-height: 0;+ opacity: 0;+ }+ }++ align-items: center;+ column-gap: ${theme.spacing(2)};+ display: grid;+ grid-template-columns: auto 1fr;+ margin-top: ${({ $featureSpacing }) => $featureSpacing};+ max-height: ${FEATURE_ITEM_EXPANDED_HEIGHT};+ min-width: 0;+ overflow: hidden;++ &[data-state='stable'] {+ max-height: none;+ }++ &[data-state='entering'] {+ animation: pricingFeatureItemEnter ${FEATURES_SWITCH_ANIMATION_MS}ms+ cubic-bezier(0.2, 0.8, 0.2, 1) both;+ animation-delay: calc(+ ${({ $featureIndex }) => $featureIndex} * ${FEATURE_ITEM_STAGGER_MS}ms+ );+ }++ &[data-state='exiting'] {+ animation: pricingFeatureItemExit ${FEATURES_SWITCH_ANIMATION_MS}ms+ cubic-bezier(0.2, 0.8, 0.2, 1) both;+ animation-delay: calc(+ ${({ $featureIndex }) => $featureIndex} * ${FEATURE_ITEM_STAGGER_MS}ms+ );+ }++ @media (prefers-reduced-motion: reduce) {+ animation: none;+ }+`;++function getLayoutMinHeight(maxBullets: number) {+ if (maxBullets <= 0) {+ return '0px';+ }++ return `calc((${FEATURE_LIST_ROW_LAYOUT_HEIGHT} * ${maxBullets}) + (${theme.spacing(4)} * ${maxBullets - 1}))`;+}++function getAnimationMinHeight(maxBullets: number) {+ if (maxBullets <= 0) {+ return '0px';+ }++ return `calc((${FEATURE_ITEM_EXPANDED_HEIGHT} * ${maxBullets}) + (${theme.spacing(4)} * ${maxBullets - 1}))`;+}++type PlanFeatureListProps = {+ comparisonBulletTexts: Set<string>;+ maxBullets: number;+ phase: FeatureTransitionPhase;+ visibleBullets: MessageDescriptor[];+};++export function PlanFeatureList({+ comparisonBulletTexts,+ maxBullets,+ phase,+ visibleBullets,+}: PlanFeatureListProps) {+ const { i18n } = useLingui();++ return (+ <FeaturesViewport+ $featuresHeight={+ phase === 'stable'+ ? getLayoutMinHeight(maxBullets)+ : getAnimationMinHeight(maxBullets)+ }+ >+ <StyledList data-state={phase}>+ {visibleBullets.map((bullet, index) => (+ <FeatureItem+ $featureIndex={index}+ $featureSpacing={index > 0 ? FEATURE_ITEM_SPACING : '0px'}+ data-state={+ phase === 'stable'+ ? 'stable'+ : comparisonBulletTexts.has(getMessageDescriptorSource(bullet))+ ? 'stable'+ : phase+ }+ key={`${getMessageDescriptorSource(bullet)}-${index}`}+ >+ <FeatureCheck>+ <CheckIcon+ color={theme.colors.highlight[100]}+ size={16}+ strokeWidth={1.5}+ />+ </FeatureCheck>+ <Body as="span" size="sm">+ {i18n._(bullet)}+ </Body>+ </FeatureItem>+ ))}+ </StyledList>+ </FeaturesViewport>+ );+}diff --git a/packages/twenty-website-new/src/sections/Plans/components/PlansContent.tsx b/packages/twenty-website-new/src/sections/Plans/components/PlansContent.tsxindex d17719afead..3a8ab7ec64d 100644--- a/packages/twenty-website-new/src/sections/Plans/components/PlansContent.tsx+++ b/packages/twenty-website-new/src/sections/Plans/components/PlansContent.tsx@@ -1,7 +1,7 @@'use client';import { PLANS_DATA } from '@/sections/Plans/data';-import { usePricingState } from '@/sections/Plans/context/PricingStateContext';+import { usePricingState } from '@/sections/Plans/context/use-pricing-state';import type { PlansBillingPeriod } from '@/sections/Plans/types';import { getPlanCard } from '@/sections/Plans/utils';import { theme } from '@/theme';diff --git a/packages/twenty-website-new/src/sections/Plans/components/Root.tsx b/packages/twenty-website-new/src/sections/Plans/components/Root.tsxindex d5fa7174f3c..de344e31dd5 100644--- a/packages/twenty-website-new/src/sections/Plans/components/Root.tsx+++ b/packages/twenty-website-new/src/sections/Plans/components/Root.tsx@@ -1,10 +1,22 @@import { Container } from '@/design-system/components';-import { theme } from '@/theme';+import { theme, type Scheme } from '@/theme';import { styled } from '@linaria/react';import type { ReactNode } from 'react';const StyledSection = styled.section`width: 100%;++ &[data-scheme='light'] {+ background-color: var(--color-white);+ }++ &[data-scheme='muted'] {+ background-color: var(--color-neutral);+ }++ &[data-scheme='dark'] {+ background-color: var(--color-black);+ }`;const StyledContainer = styled(Container)`@@ -26,13 +38,17 @@ const StyledContainer = styled(Container)``;type RootProps = {- backgroundColor: string;+ backgroundColor?: string;children: ReactNode;+ scheme?: Scheme;};-export function Root({ backgroundColor, children }: RootProps) {+export function Root({ backgroundColor, children, scheme }: RootProps) {return (- <StyledSection style={{ backgroundColor }}>+ <StyledSection+ data-scheme={scheme}+ style={scheme ? undefined : { backgroundColor }}+ ><StyledContainer>{children}</StyledContainer></StyledSection>);diff --git a/packages/twenty-website-new/src/sections/Plans/components/feature-item-stagger-ms.ts b/packages/twenty-website-new/src/sections/Plans/components/feature-item-stagger-ms.tsnew file mode 100644index 00000000000..7a8b02b12dd--- /dev/null+++ b/packages/twenty-website-new/src/sections/Plans/components/feature-item-stagger-ms.ts@@ -0,0 +1 @@+export const FEATURE_ITEM_STAGGER_MS = 8;diff --git a/packages/twenty-website-new/src/sections/Plans/components/feature-transition-phase.ts b/packages/twenty-website-new/src/sections/Plans/components/feature-transition-phase.tsnew file mode 100644index 00000000000..788097f4b87--- /dev/null+++ b/packages/twenty-website-new/src/sections/Plans/components/feature-transition-phase.ts@@ -0,0 +1 @@+export type FeatureTransitionPhase = 'stable' | 'exiting' | 'entering';diff --git a/packages/twenty-website-new/src/sections/Plans/components/use-feature-transition.ts b/packages/twenty-website-new/src/sections/Plans/components/use-feature-transition.tsnew file mode 100644index 00000000000..4dcb171dbb1--- /dev/null+++ b/packages/twenty-website-new/src/sections/Plans/components/use-feature-transition.ts@@ -0,0 +1,83 @@+import type { MessageDescriptor } from '@lingui/core';++import { getMessageDescriptorSource } from '@/lib/i18n/utils/get-message-descriptor-source';+import { useTimeoutRegistry } from '@/lib/react';+import { useEffect, useState } from 'react';++import { FEATURE_ITEM_STAGGER_MS } from './feature-item-stagger-ms';+import type { FeatureTransitionPhase } from './feature-transition-phase';++const FEATURES_SWITCH_ANIMATION_MS = 110;++function getBulletsKey(bullets: MessageDescriptor[]) {+ return bullets.map((bullet) => getMessageDescriptorSource(bullet)).join('||');+}++export function useFeatureTransition(nextBullets: MessageDescriptor[]) {+ const timeoutRegistry = useTimeoutRegistry();+ const [visibleBullets, setVisibleBullets] = useState(nextBullets);+ const [queuedBullets, setQueuedBullets] = useState<+ MessageDescriptor[] | null+ >(null);+ const [comparisonBullets, setComparisonBullets] = useState<+ MessageDescriptor[] | null+ >(null);+ const [phase, setPhase] = useState<FeatureTransitionPhase>('stable');++ useEffect(() => {+ const nextKey = getBulletsKey(nextBullets);++ if (+ nextKey === getBulletsKey(visibleBullets) ||+ nextKey === getBulletsKey(queuedBullets ?? [])+ ) {+ return;+ }++ setQueuedBullets(nextBullets);++ if (phase === 'stable') {+ setPhase('exiting');+ }+ }, [nextBullets, phase, queuedBullets, visibleBullets]);++ useEffect(() => {+ if (phase !== 'exiting' || !queuedBullets) {+ return;+ }++ return timeoutRegistry.schedule(+ () => {+ setComparisonBullets(visibleBullets);+ setVisibleBullets(queuedBullets);+ setQueuedBullets(null);+ setPhase('entering');+ },+ FEATURES_SWITCH_ANIMATION_MS ++ FEATURE_ITEM_STAGGER_MS * visibleBullets.length,+ );+ }, [phase, queuedBullets, timeoutRegistry, visibleBullets]);++ useEffect(() => {+ if (phase !== 'entering') {+ return;+ }++ return timeoutRegistry.schedule(+ () => {+ setComparisonBullets(null);+ setPhase('stable');+ },+ FEATURES_SWITCH_ANIMATION_MS ++ FEATURE_ITEM_STAGGER_MS * visibleBullets.length,+ );+ }, [phase, timeoutRegistry, visibleBullets]);++ const comparisonBulletTexts = new Set(+ (phase === 'exiting' ? queuedBullets : comparisonBullets)?.map((bullet) =>+ getMessageDescriptorSource(bullet),+ ) ?? [],+ );++ return { comparisonBulletTexts, phase, visibleBullets };+}diff --git a/packages/twenty-website-new/src/sections/Plans/context/PricingStateContext.tsx b/packages/twenty-website-new/src/sections/Plans/context/PricingStateContext.tsxindex 3aa3b91918f..95bc5bda646 100644--- a/packages/twenty-website-new/src/sections/Plans/context/PricingStateContext.tsx+++ b/packages/twenty-website-new/src/sections/Plans/context/PricingStateContext.tsx@@ -1,16 +1,9 @@'use client';import type { PlansHostingMode } from '@/sections/Plans/types';-import { createContext, type ReactNode, useContext, useState } from 'react';+import { type ReactNode, useState } from 'react';-type PricingStateContextValue = {- hosting: PlansHostingMode;- setHosting: (hosting: PlansHostingMode) => void;-};--const PricingStateContext = createContext<PricingStateContextValue | null>(- null,-);+import { PricingStateContext } from './pricing-state-context-value';type PricingStateProviderProps = {children: ReactNode;@@ -25,15 +18,3 @@ export function PricingStateProvider({ children }: PricingStateProviderProps) {</PricingStateContext.Provider>);}--export function usePricingState() {- const context = useContext(PricingStateContext);-- if (context === null) {- throw new Error(- 'usePricingState must be used within a PricingStateProvider',- );- }-- return context;-}diff --git a/packages/twenty-website-new/src/sections/Plans/context/pricing-state-context-value.ts b/packages/twenty-website-new/src/sections/Plans/context/pricing-state-context-value.tsnew file mode 100644index 00000000000..dadb74cf79e--- /dev/null+++ b/packages/twenty-website-new/src/sections/Plans/context/pricing-state-context-value.ts@@ -0,0 +1,10 @@+import type { PlansHostingMode } from '@/sections/Plans/types';+import { createContext } from 'react';++type PricingStateContextValue = {+ hosting: PlansHostingMode;+ setHosting: (hosting: PlansHostingMode) => void;+};++export const PricingStateContext =+ createContext<PricingStateContextValue | null>(null);diff --git a/packages/twenty-website-new/src/sections/Plans/context/use-pricing-state.ts b/packages/twenty-website-new/src/sections/Plans/context/use-pricing-state.tsnew file mode 100644index 00000000000..f1a6d7f7dfb--- /dev/null+++ b/packages/twenty-website-new/src/sections/Plans/context/use-pricing-state.ts@@ -0,0 +1,17 @@+'use client';++import { useContext } from 'react';++import { PricingStateContext } from './pricing-state-context-value';++export function usePricingState() {+ const context = useContext(PricingStateContext);++ if (context === null) {+ throw new Error(+ 'usePricingState must be used within a PricingStateProvider',+ );+ }++ return context;+}diff --git a/packages/twenty-website-new/src/sections/Plans/data.ts b/packages/twenty-website-new/src/sections/Plans/data.tsindex 3fe3a10d77a..395e087d23f 100644--- a/packages/twenty-website-new/src/sections/Plans/data.ts+++ b/packages/twenty-website-new/src/sections/Plans/data.ts@@ -1,54 +1,51 @@import { msg } from '@lingui/core/macro';import type { PlansDataType } from '@/sections/Plans/types';-const PRO_HEADING = { fontFamily: 'sans' as const, text: msg`Pro` };-const ORGANIZATION_HEADING = {- fontFamily: 'sans' as const,- text: msg`Organization`,-};+const PRO_HEADING = msg`Pro`;+const ORGANIZATION_HEADING = msg`Organization`;const PRO_BULLETS_MONTHLY = [- { text: msg`Full customization` },- { text: msg`Create custom apps` },- { text: msg`AI Agents with custom skills` },- { text: msg`Up to 5M automation credits/month` },- { text: msg`Standard support` },+ msg`Full customization`,+ msg`Create custom apps`,+ msg`AI Agents with custom skills`,+ msg`Up to 5M automation credits/month`,+ msg`Standard support`,];const PRO_BULLETS_YEARLY = [- { text: msg`Full customization` },- { text: msg`Create custom apps` },- { text: msg`AI Agents with custom skills` },- { text: msg`Up to 50M automation credits/year` },- { text: msg`Standard support` },+ msg`Full customization`,+ msg`Create custom apps`,+ msg`AI Agents with custom skills`,+ msg`Up to 50M automation credits/year`,+ msg`Standard support`,];const PRO_BULLETS_SELF_HOST = [- { text: msg`Full customization` },- { text: msg`Create custom apps` },- { text: msg`Community support` },+ msg`Full customization`,+ msg`Create custom apps`,+ msg`Community support`,];const ORGANIZATION_BULLETS_MONTHLY = [- { text: msg`Everything in Pro` },- { text: msg`Roles & Permissions` },- { text: msg`SAML/OIDC SSO` },- { text: msg`Priority support` },+ msg`Everything in Pro`,+ msg`Roles & Permissions`,+ msg`SAML/OIDC SSO`,+ msg`Priority support`,];const ORGANIZATION_BULLETS_YEARLY = [- { text: msg`Everything in Pro` },- { text: msg`Roles & Permissions` },- { text: msg`SAML/OIDC SSO` },- { text: msg`Priority support` },+ msg`Everything in Pro`,+ msg`Roles & Permissions`,+ msg`SAML/OIDC SSO`,+ msg`Priority support`,];const ORGANIZATION_BULLETS_SELF_HOST = [- { text: msg`Everything in Pro` },- { text: msg`Roles & Permissions` },- { text: msg`SAML/OIDC SSO` },- { text: msg`Twenty team support` },- { text: msg`No open-source distribution requirement` },+ msg`Everything in Pro`,+ msg`Roles & Permissions`,+ msg`SAML/OIDC SSO`,+ msg`Twenty team support`,+ msg`No open-source distribution requirement`,];export const PLANS_DATA = {@@ -57,40 +54,28 @@ export const PLANS_DATA = {cloud: {monthly: {featureBullets: ORGANIZATION_BULLETS_MONTHLY,- price: {- body: { text: msg`/user/month` },- heading: { fontFamily: 'sans', text: msg`$25` },- },+ price: { value: 25, prefix: '$', suffix: msg`/user/month` },},yearly: {featureBullets: ORGANIZATION_BULLETS_YEARLY,- price: {- body: { text: msg`/user/month` },- heading: { fontFamily: 'sans', text: msg`$19` },- },+ price: { value: 19, prefix: '$', suffix: msg`/user/month` },},},selfHost: {monthly: {featureBullets: ORGANIZATION_BULLETS_SELF_HOST,- price: {- body: { text: msg`/user/month` },- heading: { fontFamily: 'sans', text: msg`$25` },- },+ price: { value: 25, prefix: '$', suffix: msg`/user/month` },},yearly: {featureBullets: ORGANIZATION_BULLETS_SELF_HOST,- price: {- body: { text: msg`/user/month` },- heading: { fontFamily: 'sans', text: msg`$19` },- },+ price: { value: 19, prefix: '$', suffix: msg`/user/month` },},},},heading: ORGANIZATION_HEADING,icon: {alt: 'Organization plan icon',- src: '/images/pricing/plans/organization-icon.png',+ src: '/images/pricing/plans/organization-icon.webp',},},pro: {@@ -98,40 +83,28 @@ export const PLANS_DATA = {cloud: {monthly: {featureBullets: PRO_BULLETS_MONTHLY,- price: {- body: { text: msg`/user/month` },- heading: { fontFamily: 'sans', text: msg`$12` },- },+ price: { value: 12, prefix: '$', suffix: msg`/user/month` },},yearly: {featureBullets: PRO_BULLETS_YEARLY,- price: {- body: { text: msg`/user/month` },- heading: { fontFamily: 'sans', text: msg`$9` },- },+ price: { value: 9, prefix: '$', suffix: msg`/user/month` },},},selfHost: {monthly: {featureBullets: PRO_BULLETS_SELF_HOST,- price: {- body: { text: msg`/user/month` },- heading: { fontFamily: 'sans', text: msg`$0` },- },+ price: { value: 0, prefix: '$', suffix: msg`/user/month` },},yearly: {featureBullets: PRO_BULLETS_SELF_HOST,- price: {- body: { text: msg`/user/month` },- heading: { fontFamily: 'sans', text: msg`$0` },- },+ price: { value: 0, prefix: '$', suffix: msg`/user/month` },},},},heading: PRO_HEADING,icon: {alt: 'Pro plan icon',- src: '/images/pricing/plans/pro-icon.png',+ src: '/images/pricing/plans/pro-icon.webp',width: 60,},},diff --git a/packages/twenty-website-new/src/sections/Plans/index.ts b/packages/twenty-website-new/src/sections/Plans/index.tsnew file mode 100644index 00000000000..8fc313688de--- /dev/null+++ b/packages/twenty-website-new/src/sections/Plans/index.ts@@ -0,0 +1,16 @@+export { Plans } from './components';+export { PricingStateProvider } from './context/PricingStateContext';+export { usePricingState } from './context/use-pricing-state';+export type {+ PlanCardType,+ PlanFeaturesType,+ PlanPriceType,+ PlansBillingPeriod,+ PlansDataType,+ PlansHostingMode,+ PlansTierBillingMatrixType,+ PlansTierCellType,+ PlansTierCellsType,+ PlansTierId,+ PlansTierType,+} from './types';diff --git a/packages/twenty-website-new/src/sections/Plans/types/PlanCard.ts b/packages/twenty-website-new/src/sections/Plans/types/PlanCard.tsdeleted file mode 100644index 20dbd2d6af1..00000000000--- a/packages/twenty-website-new/src/sections/Plans/types/PlanCard.ts+++ /dev/null@@ -1,15 +0,0 @@-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';-import type { ImageType } from '@/design-system/components/Image';-import { type PlanFeaturesType } from '@/sections/Plans/types/PlanFeatures';-import { type PlanPriceType } from '@/sections/Plans/types/PlanPrice';--export type PlanIconType = ImageType & {- width?: number;-};--export type PlanCardType = {- heading: MessageHeadingSegment;- price: PlanPriceType;- icon: PlanIconType;- features: PlanFeaturesType;-};diff --git a/packages/twenty-website-new/src/sections/Plans/types/PlanFeatures.ts b/packages/twenty-website-new/src/sections/Plans/types/PlanFeatures.tsdeleted file mode 100644index 93658a1f9a6..00000000000--- a/packages/twenty-website-new/src/sections/Plans/types/PlanFeatures.ts+++ /dev/null@@ -1,5 +0,0 @@-import type { MessageBody } from '@/lib/i18n/message-body';--export type PlanFeaturesType = {- bullets: MessageBody[];-};diff --git a/packages/twenty-website-new/src/sections/Plans/types/PlanPrice.ts b/packages/twenty-website-new/src/sections/Plans/types/PlanPrice.tsdeleted file mode 100644index 77374abef69..00000000000--- a/packages/twenty-website-new/src/sections/Plans/types/PlanPrice.ts+++ /dev/null@@ -1,7 +0,0 @@-import type { MessageBody } from '@/lib/i18n/message-body';-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';--export type PlanPriceType = {- heading: MessageHeadingSegment;- body: MessageBody;-};diff --git a/packages/twenty-website-new/src/sections/Plans/types/index.ts b/packages/twenty-website-new/src/sections/Plans/types/index.tsindex 62fb7f4ba83..d5c5ae1697e 100644--- a/packages/twenty-website-new/src/sections/Plans/types/index.ts+++ b/packages/twenty-website-new/src/sections/Plans/types/index.ts@@ -1,6 +1,6 @@-export type { PlanCardType } from './PlanCard';-export type { PlanFeaturesType } from './PlanFeatures';-export type { PlanPriceType } from './PlanPrice';+export type { PlanCardType } from './plan-card';+export type { PlanFeaturesType } from './plan-features';+export type { PlanPriceType } from './plan-price';export type {PlansBillingPeriod,PlansDataType,@@ -10,4 +10,4 @@ export type {PlansTierCellsType,PlansTierId,PlansTierType,-} from './PlansData';+} from './plans-data';diff --git a/packages/twenty-website-new/src/sections/Plans/types/plan-card.ts b/packages/twenty-website-new/src/sections/Plans/types/plan-card.tsnew file mode 100644index 00000000000..4ed457b7836--- /dev/null+++ b/packages/twenty-website-new/src/sections/Plans/types/plan-card.ts@@ -0,0 +1,15 @@+import type { MessageDescriptor } from '@lingui/core';+import type { ImageType } from '@/design-system/components/Image';+import { type PlanFeaturesType } from '@/sections/Plans/types/plan-features';+import { type PlanPriceType } from '@/sections/Plans/types/plan-price';++export type PlanIconType = ImageType & {+ width?: number;+};++export type PlanCardType = {+ heading: MessageDescriptor;+ price: PlanPriceType;+ icon: PlanIconType;+ features: PlanFeaturesType;+};diff --git a/packages/twenty-website-new/src/sections/Plans/types/plan-features.ts b/packages/twenty-website-new/src/sections/Plans/types/plan-features.tsnew file mode 100644index 00000000000..86b3094cd26--- /dev/null+++ b/packages/twenty-website-new/src/sections/Plans/types/plan-features.ts@@ -0,0 +1,5 @@+import type { MessageDescriptor } from '@lingui/core';++export type PlanFeaturesType = {+ bullets: MessageDescriptor[];+};diff --git a/packages/twenty-website-new/src/sections/Plans/types/plan-price.ts b/packages/twenty-website-new/src/sections/Plans/types/plan-price.tsnew file mode 100644index 00000000000..a6a60e29948--- /dev/null+++ b/packages/twenty-website-new/src/sections/Plans/types/plan-price.ts@@ -0,0 +1,7 @@+import type { MessageDescriptor } from '@lingui/core';++export type PlanPriceType = {+ value: number;+ prefix: string;+ suffix: MessageDescriptor;+};diff --git a/packages/twenty-website-new/src/sections/Plans/types/PlansData.ts b/packages/twenty-website-new/src/sections/Plans/types/plans-data.tssimilarity index 66%rename from packages/twenty-website-new/src/sections/Plans/types/PlansData.tsrename to packages/twenty-website-new/src/sections/Plans/types/plans-data.tsindex 888faf1ebf8..b1cda9b941a 100644--- a/packages/twenty-website-new/src/sections/Plans/types/PlansData.ts+++ b/packages/twenty-website-new/src/sections/Plans/types/plans-data.ts@@ -1,14 +1,13 @@-import type { MessageBody } from '@/lib/i18n/message-body';-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';-import type { PlanIconType } from './PlanCard';-import type { PlanPriceType } from './PlanPrice';+import type { MessageDescriptor } from '@lingui/core';+import type { PlanIconType } from './plan-card';+import type { PlanPriceType } from './plan-price';export type PlansHostingMode = 'cloud' | 'selfHost';export type PlansBillingPeriod = 'monthly' | 'yearly';export type PlansTierId = 'pro' | 'organization';export type PlansTierCellType = {- featureBullets: MessageBody[];+ featureBullets: MessageDescriptor[];price: PlanPriceType;};@@ -24,7 +23,7 @@ export type PlansTierCellsType = {export type PlansTierType = {cells: PlansTierCellsType;- heading: MessageHeadingSegment;+ heading: MessageDescriptor;icon: PlanIconType;};diff --git a/packages/twenty-website-new/src/sections/Plans/utils/get-plan-card.ts b/packages/twenty-website-new/src/sections/Plans/utils/get-plan-card.tsindex 380827c5b15..be3c974b258 100644--- a/packages/twenty-website-new/src/sections/Plans/utils/get-plan-card.ts+++ b/packages/twenty-website-new/src/sections/Plans/utils/get-plan-card.ts@@ -1,10 +1,10 @@-import type { PlanCardType } from '@/sections/Plans/types/PlanCard';+import type { PlanCardType } from '@/sections/Plans/types/plan-card';import type {PlansBillingPeriod,PlansDataType,PlansHostingMode,PlansTierId,-} from '@/sections/Plans/types/PlansData';+} from '@/sections/Plans/types/plans-data';export function getPlanCard(plansData: PlansDataType,diff --git a/packages/twenty-website-new/src/sections/Problem/Problem.tsx b/packages/twenty-website-new/src/sections/Problem/Problem.tsxnew file mode 100644index 00000000000..a46e5531095--- /dev/null+++ b/packages/twenty-website-new/src/sections/Problem/Problem.tsx@@ -0,0 +1,101 @@+import { Container } from '@/design-system/components';+import {+ Heading as BaseHeading,+ type HeadingProps,+} from '@/design-system/components/Heading';+import { theme } from '@/theme';+import { css } from '@linaria/core';+import { styled } from '@linaria/react';+import type { ReactNode } from 'react';++import { Points } from './ProblemPoints';+import { Visual } from './components/Visual/Visual';++const StyledSection = styled.section`+ width: 100%;+`;++const StyledContainer = styled(Container)`+ display: grid;+ grid-template-columns: 1fr;+ row-gap: ${theme.spacing(12)};+ padding-bottom: ${theme.spacing(12)};+ padding-left: ${theme.spacing(4)};+ padding-right: ${theme.spacing(4)};+ padding-top: ${theme.spacing(6)};++ @media (min-width: ${theme.breakpoints.md}px) {+ column-gap: ${theme.spacing(4)};+ grid-template-columns: 1fr 1fr;+ padding-left: ${theme.spacing(10)};+ padding-right: ${theme.spacing(10)};+ padding-top: ${theme.spacing(6)};+ padding-bottom: ${theme.spacing(10)};+ row-gap: ${theme.spacing(20)};+ }+`;++const StyledContent = styled.div`+ display: grid;+ grid-template-columns: 1fr;+ row-gap: ${theme.spacing(10)};++ @media (min-width: ${theme.breakpoints.md}px) {+ padding-bottom: ${theme.spacing(15)};+ padding-left: ${theme.spacing(15)};+ padding-right: ${theme.spacing(15)};+ padding-top: ${theme.spacing(15)};+ row-gap: ${theme.spacing(20)};+ }+`;++const problemHeadingClassName = css`+ margin-top: calc(${theme.spacing(2)} - ${theme.spacing(10)});++ @media (min-width: ${theme.breakpoints.md}px) {+ margin-top: calc(${theme.spacing(2)} - ${theme.spacing(16)});+ }+`;++type RootProps = { children: ReactNode };++function Root({ children }: RootProps) {+ return (+ <StyledSection>+ <StyledContainer>{children}</StyledContainer>+ </StyledSection>+ );+}++type ContentProps = { children: ReactNode };++function Content({ children }: ContentProps) {+ return <StyledContent>{children}</StyledContent>;+}++function Heading({+ as = 'h2',+ children,+ className,+ size = 'md',+ weight = 'light',+}: HeadingProps & { children?: ReactNode }) {+ return (+ <BaseHeading+ as={as}+ className={[problemHeadingClassName, className].filter(Boolean).join(' ')}+ size={size}+ weight={weight}+ >+ {children}+ </BaseHeading>+ );+}++export const Problem = {+ Root,+ Visual,+ Content,+ Heading,+ Points,+};diff --git a/packages/twenty-website-new/src/sections/Problem/components/Points.tsx b/packages/twenty-website-new/src/sections/Problem/ProblemPoints.tsxsimilarity index 60%rename from packages/twenty-website-new/src/sections/Problem/components/Points.tsxrename to packages/twenty-website-new/src/sections/Problem/ProblemPoints.tsxindex 88451c71f37..9912520c133 100644--- a/packages/twenty-website-new/src/sections/Problem/components/Points.tsx+++ b/packages/twenty-website-new/src/sections/Problem/ProblemPoints.tsx@@ -1,10 +1,10 @@import { Body } from '@/design-system/components/Body';-import { Heading } from '@/design-system/components/Heading';-import type { ProblemPointType } from '@/sections/Problem/types';+import { getServerI18n } from '@/lib/i18n/utils/get-server-i18n';import { theme } from '@/theme';-import type { MessageDescriptor } from '@lingui/core';import { styled } from '@linaria/react';-import React, { type ReactNode } from 'react';+import React from 'react';++import type { ProblemPointType } from './problem-point-type';const StyledPoints = styled.div`display: grid;@@ -34,25 +34,20 @@ const StyledPoint = styled.div`}`;-export type PointsProps = {+type PointsProps = {points: ProblemPointType[];- renderText: (descriptor: MessageDescriptor) => ReactNode;};-export function Points({ points, renderText }: PointsProps) {+export function Points({ points }: PointsProps) {+ const i18n = getServerI18n();return (<StyledPoints>{points.map((point, index) => (<React.Fragment key={index}><StyledDivider /><StyledPoint>- <Heading- renderText={renderText}- segments={point.heading}- weight="medium"- size="xs"- />- <Body body={point.body} renderText={renderText} size="sm" />+ {point.heading}+ <Body size="sm">{i18n._(point.body)}</Body></StyledPoint></React.Fragment>))}diff --git a/packages/twenty-website-new/src/sections/Problem/components/Content.tsx b/packages/twenty-website-new/src/sections/Problem/components/Content.tsxdeleted file mode 100644index da229641a70..00000000000--- a/packages/twenty-website-new/src/sections/Problem/components/Content.tsx+++ /dev/null@@ -1,25 +0,0 @@-import { theme } from '@/theme';-import { styled } from '@linaria/react';-import type { ReactNode } from 'react';--const StyledContent = styled.div`- display: grid;- grid-template-columns: 1fr;- row-gap: ${theme.spacing(10)};-- @media (min-width: ${theme.breakpoints.md}px) {- padding-bottom: ${theme.spacing(15)};- padding-left: ${theme.spacing(15)};- padding-right: ${theme.spacing(15)};- padding-top: ${theme.spacing(15)};- row-gap: ${theme.spacing(20)};- }-`;--type ContentProps = {- children: ReactNode;-};--export function Content({ children }: ContentProps) {- return <StyledContent>{children}</StyledContent>;-}diff --git a/packages/twenty-website-new/src/sections/Problem/components/Heading.tsx b/packages/twenty-website-new/src/sections/Problem/components/Heading.tsxdeleted file mode 100644index ac804d31273..00000000000--- a/packages/twenty-website-new/src/sections/Problem/components/Heading.tsx+++ /dev/null@@ -1,36 +0,0 @@-import {- Heading as BaseHeading,- type HeadingProps,-} from '@/design-system/components/Heading';-import { theme } from '@/theme';-import { css } from '@linaria/core';-import type { ReactNode } from 'react';--const problemHeadingClassName = css`- margin-top: calc(${theme.spacing(2)} - ${theme.spacing(10)});-- @media (min-width: ${theme.breakpoints.md}px) {- margin-top: calc(${theme.spacing(2)} - ${theme.spacing(16)});- }-`;--export function Heading({- as = 'h2',- children,- className,- size = 'md',- weight = 'light',-}: HeadingProps & {- children?: ReactNode;-}) {- return (- <BaseHeading- as={as}- className={[problemHeadingClassName, className].filter(Boolean).join(' ')}- size={size}- weight={weight}- >- {children}- </BaseHeading>- );-}diff --git a/packages/twenty-website-new/src/sections/Problem/components/Root.tsx b/packages/twenty-website-new/src/sections/Problem/components/Root.tsxdeleted file mode 100644index 9d387ceb8f8..00000000000--- a/packages/twenty-website-new/src/sections/Problem/components/Root.tsx+++ /dev/null@@ -1,38 +0,0 @@-import { Container } from '@/design-system/components';-import { theme } from '@/theme';-import { styled } from '@linaria/react';-import type { ReactNode } from 'react';--const StyledSection = styled.section`- width: 100%;-`;--const StyledContainer = styled(Container)`- display: grid;- grid-template-columns: 1fr;- row-gap: ${theme.spacing(12)};- padding-bottom: ${theme.spacing(12)};- padding-left: ${theme.spacing(4)};- padding-right: ${theme.spacing(4)};- padding-top: ${theme.spacing(6)};-- @media (min-width: ${theme.breakpoints.md}px) {- column-gap: ${theme.spacing(4)};- grid-template-columns: 1fr 1fr;- padding-left: ${theme.spacing(10)};- padding-right: ${theme.spacing(10)};- padding-top: ${theme.spacing(6)};- padding-bottom: ${theme.spacing(10)};- row-gap: ${theme.spacing(20)};- }-`;--type RootProps = { children: ReactNode };--export function Root({ children }: RootProps) {- return (- <StyledSection>- <StyledContainer>{children}</StyledContainer>- </StyledSection>- );-}diff --git a/packages/twenty-website-new/src/sections/Problem/components/Visual/Monolith.tsx b/packages/twenty-website-new/src/sections/Problem/components/Visual/Monolith.tsxnew file mode 100644index 00000000000..c8755141cca--- /dev/null+++ b/packages/twenty-website-new/src/sections/Problem/components/Visual/Monolith.tsx@@ -0,0 +1,33 @@+'use client';++import { useRef, type CSSProperties } from 'react';+import { DEFAULT_TUNING } from './monolith-halftone-mount';+import { useMonolithHalftone } from './use-monolith-halftone';++const IMAGE_SRC = '/images/home/problem/monolith-problem.webp';++type MonolithProps = {+ imageUrl?: string;+ style?: CSSProperties;+};++export default function Monolith({+ imageUrl = IMAGE_SRC,+ style,+}: MonolithProps) {+ const mountReference = useRef<HTMLDivElement>(null);++ useMonolithHalftone({ imageUrl, mountRef: mountReference });++ return (+ <div+ ref={mountReference}+ style={{+ background: DEFAULT_TUNING.backgroundColor,+ height: '100%',+ width: '100%',+ ...style,+ }}+ />+ );+}diff --git a/packages/twenty-website-new/src/sections/Problem/components/Visual/Visual.tsx b/packages/twenty-website-new/src/sections/Problem/components/Visual/Visual.tsxindex 4d9555de92f..35764113c37 100644--- a/packages/twenty-website-new/src/sections/Problem/components/Visual/Visual.tsx+++ b/packages/twenty-website-new/src/sections/Problem/components/Visual/Visual.tsx@@ -1,7 +1,7 @@import { WebGlMount } from '@/lib/visual-runtime';-import { ProblemMonolithIllustration } from '@/sections/Problem/visuals/ProblemMonolithIllustration';import { theme } from '@/theme';import { styled } from '@linaria/react';+import Monolith from './Monolith';const DESKTOP_PATH ='M672 395.498V701a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4h664a4 4 0 0 1 4 4v65.155c0 2.363-.837 4.65-2.361 6.454l-23.603 27.936a10 10 0 0 0-2.362 6.453v242.614c0 2.245.756 4.424 2.145 6.188l24.036 30.51a10 10 0 0 1 2.145 6.188';@@ -55,7 +55,7 @@ export function Visual() {<StyledMasked><StyledHalftoneLayer><WebGlMount>- <ProblemMonolithIllustration />+ <Monolith /></WebGlMount></StyledHalftoneLayer></StyledMasked>diff --git a/packages/twenty-website-new/src/sections/Problem/components/Visual/monolith.tsx b/packages/twenty-website-new/src/sections/Problem/components/Visual/monolith-halftone-mount.tssimilarity index 94%rename from packages/twenty-website-new/src/sections/Problem/components/Visual/monolith.tsxrename to packages/twenty-website-new/src/sections/Problem/components/Visual/monolith-halftone-mount.tsindex c4b3f8304a1..6a1a47d015e 100644--- a/packages/twenty-website-new/src/sections/Problem/components/Visual/monolith.tsx+++ b/packages/twenty-website-new/src/sections/Problem/components/Visual/monolith-halftone-mount.ts@@ -1,6 +1,3 @@-'use client';--import { useEffect, useRef, type CSSProperties } from 'react';import * as THREE from 'three';import { observeElementSize } from '@/lib/dom/observe-element-size';import {@@ -11,7 +8,6 @@ import {type VisualRenderLoopFrame,} from '@/lib/visual-runtime';-const IMAGE_SRC = '/images/home/problem/monolith-problem.webp';const PREVIEW_DISTANCE = 4;const VIRTUAL_RENDER_HEIGHT = 768;const REFERENCE_PREVIEW_DISTANCE = 4;@@ -19,7 +15,7 @@ const MIN_FOOTPRINT_SCALE = 0.001;const IMAGE_POINTER_FOLLOW = 0.38;const IMAGE_POINTER_VELOCITY_DAMPING = 0.82;-type HalftoneTuning = {+export type HalftoneTuning = {dashColor: string;imageContrast: number;power: number;@@ -27,20 +23,20 @@ type HalftoneTuning = {width: number;};-type AnimationTuning = {+export type AnimationTuning = {hoverLightEnabled: boolean;hoverLightIntensity: number;hoverLightRadius: number;waveSpeed: number;};-type MonolithTuning = {+export type MonolithTuning = {animation: AnimationTuning;backgroundColor: string;halftone: HalftoneTuning;};-const DEFAULT_TUNING: MonolithTuning = {+export const DEFAULT_TUNING: MonolithTuning = {halftone: {dashColor: '#BABABA',imageContrast: 1,@@ -284,17 +280,12 @@ type InteractionState = {smoothedMouseY: number;};-type MountHalftoneCanvasOptions = {+export type MountHalftoneCanvasOptions = {container: HTMLDivElement;imageUrl: string;signal: AbortSignal;};-type MonolithProps = {- imageUrl?: string;- style?: CSSProperties;-};-function clampRectToViewport(rect: Rect,viewportWidth: number,@@ -466,7 +457,7 @@ function createAbortTask(signal: AbortSignal) {return { cleanup, promise };}-async function mountHalftoneCanvas(options: MountHalftoneCanvasOptions) {+export async function mountHalftoneCanvas(options: MountHalftoneCanvasOptions) {const { container, imageUrl, signal } = options;const tuning = DEFAULT_TUNING;@@ -826,47 +817,3 @@ async function mountHalftoneCanvas(options: MountHalftoneCanvasOptions) {}};}--export default function Monolith({- imageUrl = IMAGE_SRC,- style,-}: MonolithProps) {- const mountReference = useRef<HTMLDivElement>(null);-- useEffect(() => {- const container = mountReference.current;-- if (!container) {- return;- }-- const abortController = new AbortController();- const unmountPromise = mountHalftoneCanvas({- container,- imageUrl,- signal: abortController.signal,- }).catch((error) => {- if (error.name !== 'AbortError') {- console.error(error);- }- return undefined;- });-- return () => {- abortController.abort();- void unmountPromise.then((dispose) => dispose?.());- };- }, [imageUrl]);-- return (- <div- ref={mountReference}- style={{- background: DEFAULT_TUNING.backgroundColor,- height: '100%',- width: '100%',- ...style,- }}- />- );-}diff --git a/packages/twenty-website-new/src/sections/Problem/components/Visual/use-monolith-halftone.ts b/packages/twenty-website-new/src/sections/Problem/components/Visual/use-monolith-halftone.tsnew file mode 100644index 00000000000..5f9d025052b--- /dev/null+++ b/packages/twenty-website-new/src/sections/Problem/components/Visual/use-monolith-halftone.ts@@ -0,0 +1,37 @@+'use client';++import { useEffect, type RefObject } from 'react';+import { mountHalftoneCanvas } from './monolith-halftone-mount';++export function useMonolithHalftone({+ imageUrl,+ mountRef,+}: {+ imageUrl: string;+ mountRef: RefObject<HTMLDivElement | null>;+}) {+ useEffect(() => {+ const container = mountRef.current;++ if (!container) {+ return;+ }++ const abortController = new AbortController();+ const unmountPromise = mountHalftoneCanvas({+ container,+ imageUrl,+ signal: abortController.signal,+ }).catch((error) => {+ if (error.name !== 'AbortError') {+ console.error(error);+ }+ return undefined;+ });++ return () => {+ abortController.abort();+ void unmountPromise.then((dispose) => dispose?.());+ };+ }, [imageUrl, mountRef]);+}diff --git a/packages/twenty-website-new/src/sections/Problem/components/index.ts b/packages/twenty-website-new/src/sections/Problem/components/index.tsdeleted file mode 100644index 6e6d7792835..00000000000--- a/packages/twenty-website-new/src/sections/Problem/components/index.ts+++ /dev/null@@ -1,13 +0,0 @@-import { Content } from './Content';-import { Heading } from './Heading';-import { Points } from './Points';-import { Root } from './Root';-import { Visual } from './Visual/Visual';--export const Problem = {- Root,- Visual,- Content,- Heading,- Points,-};diff --git a/packages/twenty-website-new/src/sections/Problem/index.ts b/packages/twenty-website-new/src/sections/Problem/index.tsnew file mode 100644index 00000000000..9df76fd0698--- /dev/null+++ b/packages/twenty-website-new/src/sections/Problem/index.ts@@ -0,0 +1,2 @@+export { Problem } from './Problem';+export type { ProblemPointType } from './problem-point-type';diff --git a/packages/twenty-website-new/src/sections/Problem/problem-point-type.ts b/packages/twenty-website-new/src/sections/Problem/problem-point-type.tsnew file mode 100644index 00000000000..621bcd1c6b6--- /dev/null+++ b/packages/twenty-website-new/src/sections/Problem/problem-point-type.ts@@ -0,0 +1,7 @@+import type { MessageDescriptor } from '@lingui/core';+import type { ReactNode } from 'react';++export type ProblemPointType = {+ heading: ReactNode;+ body: MessageDescriptor;+};diff --git a/packages/twenty-website-new/src/sections/Problem/types/ProblemData.ts b/packages/twenty-website-new/src/sections/Problem/types/ProblemData.tsdeleted file mode 100644index c2b245854a2..00000000000--- a/packages/twenty-website-new/src/sections/Problem/types/ProblemData.ts+++ /dev/null@@ -1,7 +0,0 @@-import type { MessageEyebrow } from '@/lib/i18n/message-eyebrow';-import type { ProblemPointType } from './ProblemPoint';--export type ProblemDataType = {- eyebrow: MessageEyebrow;- points: ProblemPointType[];-};diff --git a/packages/twenty-website-new/src/sections/Problem/types/ProblemPoint.ts b/packages/twenty-website-new/src/sections/Problem/types/ProblemPoint.tsdeleted file mode 100644index f55a7c7f5d4..00000000000--- a/packages/twenty-website-new/src/sections/Problem/types/ProblemPoint.ts+++ /dev/null@@ -1,7 +0,0 @@-import type { MessageBody } from '@/lib/i18n/message-body';-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';--export type ProblemPointType = {- heading: MessageHeadingSegment;- body: MessageBody;-};diff --git a/packages/twenty-website-new/src/sections/Problem/types/index.ts b/packages/twenty-website-new/src/sections/Problem/types/index.tsdeleted file mode 100644index 7d26c65b686..00000000000--- a/packages/twenty-website-new/src/sections/Problem/types/index.ts+++ /dev/null@@ -1,2 +0,0 @@-export type { ProblemPointType } from './ProblemPoint';-export type { ProblemDataType } from './ProblemData';diff --git a/packages/twenty-website-new/src/sections/Problem/visuals/ProblemMonolithIllustration.tsx b/packages/twenty-website-new/src/sections/Problem/visuals/ProblemMonolithIllustration.tsxdeleted file mode 100644index 65461457ef3..00000000000--- a/packages/twenty-website-new/src/sections/Problem/visuals/ProblemMonolithIllustration.tsx+++ /dev/null@@ -1,7 +0,0 @@-'use client';--import Monolith from '@/sections/Problem/components/Visual/monolith';--export function ProblemMonolithIllustration() {- return <Monolith />;-}diff --git a/packages/twenty-website-new/src/sections/ProductStepper/components/Content.tsx b/packages/twenty-website-new/src/sections/ProductStepper/Content.tsxsimilarity index 82%rename from packages/twenty-website-new/src/sections/ProductStepper/components/Content.tsxrename to packages/twenty-website-new/src/sections/ProductStepper/Content.tsxindex d6e05e58dff..63a6ccd0f9b 100644--- a/packages/twenty-website-new/src/sections/ProductStepper/components/Content.tsx+++ b/packages/twenty-website-new/src/sections/ProductStepper/Content.tsx@@ -4,16 +4,35 @@ import {Body,Eyebrow,Heading,+ HeadingPart,StepperProgressRail,} from '@/design-system/components';import { INFORMATIVE_ICONS } from '@/icons';-import { useRenderMessage } from '@/lib/i18n/use-render-message';-import { StepperSwipeDeck } from '@/lib/stepper';-import type { ProductStepperContentProps } from '@/sections/ProductStepper/types';-import type { ProductStepperContentStepType } from '@/sections/ProductStepper/types/ProductStepperContentStep';+import { StepperSwipeDeck } from '@/sections/Stepper';import { theme } from '@/theme';import type { MessageDescriptor } from '@lingui/core';+import { useLingui } from '@lingui/react';import { styled } from '@linaria/react';+import type { ReactNode } from 'react';++type ProductStepperContentStepType = {+ body: MessageDescriptor;+ heading: ReactNode;+ icon: string;+};++type ProductStepperLayoutMode = 'scroll' | 'swipe';++type ProductStepperContentProps = {+ activeStepIndex: number;+ body: ReactNode;+ eyebrow: ReactNode;+ heading: ReactNode;+ layoutMode: ProductStepperLayoutMode;+ localProgress: number;+ onMobileStepIndexChange: (nextIndex: number) => void;+ steps: ProductStepperContentStepType[];+};const ContentRoot = styled.div`display: grid;@@ -105,7 +124,7 @@ function renderProductStepBlock(index: number,activeStepIndex: number,localProgress: number,- renderText: (descriptor: MessageDescriptor) => string,+ translate: (descriptor: MessageDescriptor) => string,variant: 'scroll' | 'swipe',) {const Icon = INFORMATIVE_ICONS[step.icon];@@ -141,14 +160,9 @@ function renderProductStepBlock(/>) : null}</StepIconBox>- <Heading- renderText={renderText}- segments={step.heading}- size="sm"- weight="regular"- />+ {step.heading}</StepRowHeader>- <Body body={step.body} renderText={renderText} size="sm" />+ <Body size="sm">{translate(step.body)}</Body></>);@@ -166,6 +180,7 @@ function renderProductStepBlock($translateY={translateY}data-active={String(isActive)}key={index}+ suppressHydrationWarning>{inner}</StepBlock>@@ -182,7 +197,7 @@ export function Content({onMobileStepIndexChange,steps,}: ProductStepperContentProps) {- const renderText = useRenderMessage();+ const { i18n } = useLingui();return (<ContentRoot>@@ -194,15 +209,13 @@ export function Content({/><StepsColumn><IntroBlock>- <Eyebrow- colorScheme="primary"- heading={eyebrow.heading}- renderText={renderText}- />+ <Eyebrow colorScheme="primary">+ <HeadingPart fontFamily="sans">{eyebrow}</HeadingPart>+ </Eyebrow><Heading size="lg" weight="light">{heading}</Heading>- <Body body={body} renderText={renderText} size="sm" />+ <Body size="sm">{body}</Body></IntroBlock>{layoutMode === 'swipe' ? (<StepperSwipeDeck@@ -216,7 +229,7 @@ export function Content({stepIndex,activeStepIndex,localProgress,- renderText,+ (d) => i18n._(d),'swipe',)}@@ -228,7 +241,7 @@ export function Content({index,activeStepIndex,localProgress,- renderText,+ (d) => i18n._(d),'scroll',),)diff --git a/packages/twenty-website-new/src/sections/ProductStepper/Flow.tsx b/packages/twenty-website-new/src/sections/ProductStepper/Flow.tsxnew file mode 100644index 00000000000..0e22ea9f36c--- /dev/null+++ b/packages/twenty-website-new/src/sections/ProductStepper/Flow.tsx@@ -0,0 +1,93 @@+'use client';++import { Container } from '@/design-system/components';+import { ScrollProgressEffect } from '@/lib/scroll';+import { useStepperMdUp } from '@/sections/Stepper';+import { useBreakpointStepSync } from '@/sections/Stepper/use-breakpoint-step-sync';+import { theme } from '@/theme';+import { styled } from '@linaria/react';+import { type ReactNode, useRef, useState } from 'react';+import { Content } from './Content';+import type { ProductStepperStepType } from './types';+import { Visual } from './Visual';++const StyledSection = styled.section`+ background-color: ${theme.colors.primary.text[5]};+ width: 100%;++ @media (min-width: ${theme.breakpoints.md}px) {+ height: 300vh;+ }+`;++const Grid = styled(Container)`+ display: grid;+ grid-template-columns: 1fr;+ min-width: 0;+ padding-bottom: ${theme.spacing(12)};+ padding-left: ${theme.spacing(4)};+ padding-right: ${theme.spacing(4)};+ padding-top: ${theme.spacing(12)};+ row-gap: ${theme.spacing(10)};+ width: 100%;++ @media (min-width: ${theme.breakpoints.md}px) {+ align-items: start;+ column-gap: ${theme.spacing(10)};+ grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);+ min-height: 100%;+ padding-bottom: ${theme.spacing(20)};+ padding-left: ${theme.spacing(10)};+ padding-right: ${theme.spacing(10)};+ padding-top: ${theme.spacing(20)};+ row-gap: ${theme.spacing(12)};+ }+`;++type FlowProps = {+ body: ReactNode;+ children: ReactNode;+ eyebrow: ReactNode;+ steps: ProductStepperStepType[];+};++export function Flow({ body, children, eyebrow, steps }: FlowProps) {+ const isMdUp = useStepperMdUp();+ const [scrollProgress, setScrollProgress] = useState(0);+ const scrollContainerRef = useRef<HTMLElement>(null);+ const { activeStepIndex, localProgress, setMobileStepIndex } =+ useBreakpointStepSync(isMdUp, scrollProgress, steps.length);++ const contentSteps = steps.map(+ ({ body: stepBody, heading: stepHeading, icon }) => ({+ body: stepBody,+ heading: stepHeading,+ icon,+ }),+ );++ const images = steps.map((step) => step.image);++ return (+ <StyledSection ref={scrollContainerRef}>+ <Grid>+ <ScrollProgressEffect+ onScrollProgress={setScrollProgress}+ scrollContainerRef={scrollContainerRef}+ enabled={isMdUp}+ />+ <Content+ activeStepIndex={activeStepIndex}+ body={body}+ heading={children}+ eyebrow={eyebrow}+ layoutMode={isMdUp ? 'scroll' : 'swipe'}+ localProgress={localProgress}+ onMobileStepIndexChange={setMobileStepIndex}+ steps={contentSteps}+ />+ <Visual activeStepIndex={activeStepIndex} images={images} />+ </Grid>+ </StyledSection>+ );+}diff --git a/packages/twenty-website-new/src/sections/ProductStepper/ProductStepper.tsx b/packages/twenty-website-new/src/sections/ProductStepper/ProductStepper.tsxnew file mode 100644index 00000000000..efa8f7b5bbe--- /dev/null+++ b/packages/twenty-website-new/src/sections/ProductStepper/ProductStepper.tsx@@ -0,0 +1,5 @@+import { Flow } from './Flow';++export const ProductStepper = {+ Flow,+};diff --git a/packages/twenty-website-new/src/sections/ProductStepper/components/StepperVisualFrame.tsx b/packages/twenty-website-new/src/sections/ProductStepper/StepperVisualFrame.tsxsimilarity index 100%rename from packages/twenty-website-new/src/sections/ProductStepper/components/StepperVisualFrame.tsxrename to packages/twenty-website-new/src/sections/ProductStepper/StepperVisualFrame.tsxdiff --git a/packages/twenty-website-new/src/sections/ProductStepper/components/Visual.tsx b/packages/twenty-website-new/src/sections/ProductStepper/Visual.tsxsimilarity index 92%rename from packages/twenty-website-new/src/sections/ProductStepper/components/Visual.tsxrename to packages/twenty-website-new/src/sections/ProductStepper/Visual.tsxindex 2f52a59b4ae..7b1c432fe09 100644--- a/packages/twenty-website-new/src/sections/ProductStepper/components/Visual.tsx+++ b/packages/twenty-website-new/src/sections/ProductStepper/Visual.tsx@@ -1,10 +1,15 @@-import type { ProductStepperVisualProps } from '@/sections/ProductStepper/types';+import type { ImageType } from '@/design-system/components/Image';import { theme } from '@/theme';import { css } from '@linaria/core';import { styled } from '@linaria/react';import NextImage from 'next/image';import { StepperVisualFrame } from './StepperVisualFrame';+type ProductStepperVisualProps = {+ activeStepIndex: number;+ images: ImageType[];+};+const PRODUCT_STEPPER_BACKGROUND = '/images/product/stepper/background.webp';const PRODUCT_STEPPER_SHAPE = '/images/product/stepper/background-shape.webp';diff --git a/packages/twenty-website-new/src/sections/ProductStepper/components/Flow.tsx b/packages/twenty-website-new/src/sections/ProductStepper/components/Flow.tsxdeleted file mode 100644index b56dce7ee80..00000000000--- a/packages/twenty-website-new/src/sections/ProductStepper/components/Flow.tsx+++ /dev/null@@ -1,78 +0,0 @@-'use client';--import type { MessageBody } from '@/lib/i18n/message-body';-import type { MessageEyebrow } from '@/lib/i18n/message-eyebrow';-import { ScrollProgressEffect } from '@/lib/scroll';-import { useStepperMdUp } from '@/lib/stepper';-import type { ProductStepperStepType } from '@/sections/ProductStepper/types/ProductStepperStep';-import { type ReactNode, useEffect, useMemo, useRef, useState } from 'react';-import { Content } from './Content';-import { Root } from './Root';-import { Visual } from './Visual';--type FlowProps = {- body: MessageBody;- children: ReactNode;- eyebrow: MessageEyebrow;- steps: ProductStepperStepType[];-};--export function Flow({ body, children, eyebrow, steps }: FlowProps) {- const isMdUp = useStepperMdUp();- const [scrollProgress, setScrollProgress] = useState(0);- const [mobileStepIndex, setMobileStepIndex] = useState(0);- const scrollContainerRef = useRef<HTMLElement>(null);- const previousMdUpRef = useRef(isMdUp);-- useEffect(() => {- if (previousMdUpRef.current && !isMdUp) {- const scrollDerivedIndex = Math.min(- steps.length - 1,- Math.floor(scrollProgress * steps.length),- );- setMobileStepIndex(scrollDerivedIndex);- }- previousMdUpRef.current = isMdUp;- }, [isMdUp, scrollProgress, steps.length]);-- const activeStepIndex = isMdUp- ? Math.min(steps.length - 1, Math.floor(scrollProgress * steps.length))- : mobileStepIndex;-- const localProgress = isMdUp- ? scrollProgress * steps.length - activeStepIndex- : 0;-- const contentSteps = useMemo(- () =>- steps.map(({ body: stepBody, heading: stepHeading, icon }) => ({- body: stepBody,- heading: stepHeading,- icon,- })),- [steps],- );-- const images = useMemo(() => steps.map((step) => step.image), [steps]);-- return (- <Root scrollContainerRef={scrollContainerRef}>- <ScrollProgressEffect- onScrollProgress={setScrollProgress}- scrollContainerRef={scrollContainerRef}- enabled={isMdUp}- />- <Content- activeStepIndex={activeStepIndex}- body={body}- heading={children}- eyebrow={eyebrow}- layoutMode={isMdUp ? 'scroll' : 'swipe'}- localProgress={localProgress}- onMobileStepIndexChange={setMobileStepIndex}- steps={contentSteps}- />- <Visual activeStepIndex={activeStepIndex} images={images} />- </Root>- );-}diff --git a/packages/twenty-website-new/src/sections/ProductStepper/components/Root.tsx b/packages/twenty-website-new/src/sections/ProductStepper/components/Root.tsxdeleted file mode 100644index aa6c216926f..00000000000--- a/packages/twenty-website-new/src/sections/ProductStepper/components/Root.tsx+++ /dev/null@@ -1,50 +0,0 @@-import { Container } from '@/design-system/components';-import { theme } from '@/theme';-import { styled } from '@linaria/react';-import type { ReactNode, RefObject } from 'react';--const StyledSection = styled.section`- background-color: ${theme.colors.primary.text[5]};- width: 100%;-- @media (min-width: ${theme.breakpoints.md}px) {- height: 300vh;- }-`;--const Grid = styled(Container)`- display: grid;- grid-template-columns: 1fr;- min-width: 0;- padding-bottom: ${theme.spacing(12)};- padding-left: ${theme.spacing(4)};- padding-right: ${theme.spacing(4)};- padding-top: ${theme.spacing(12)};- row-gap: ${theme.spacing(10)};- width: 100%;-- @media (min-width: ${theme.breakpoints.md}px) {- align-items: start;- column-gap: ${theme.spacing(10)};- grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);- min-height: 100%;- padding-bottom: ${theme.spacing(20)};- padding-left: ${theme.spacing(10)};- padding-right: ${theme.spacing(10)};- padding-top: ${theme.spacing(20)};- row-gap: ${theme.spacing(12)};- }-`;--type RootProps = {- children: ReactNode;- scrollContainerRef?: RefObject<HTMLElement | null>;-};--export function Root({ children, scrollContainerRef }: RootProps) {- return (- <StyledSection ref={scrollContainerRef}>- <Grid>{children}</Grid>- </StyledSection>- );-}diff --git a/packages/twenty-website-new/src/sections/ProductStepper/components/index.ts b/packages/twenty-website-new/src/sections/ProductStepper/components/index.tsdeleted file mode 100644index 70843a2e5b2..00000000000--- a/packages/twenty-website-new/src/sections/ProductStepper/components/index.ts+++ /dev/null@@ -1,11 +0,0 @@-import { Content } from './Content';-import { Flow } from './Flow';-import { Root } from './Root';-import { Visual } from './Visual';--export const ProductStepper = {- Content,- Flow,- Root,- Visual,-};diff --git a/packages/twenty-website-new/src/sections/ProductStepper/index.ts b/packages/twenty-website-new/src/sections/ProductStepper/index.tsnew file mode 100644index 00000000000..b5a218f10a6--- /dev/null+++ b/packages/twenty-website-new/src/sections/ProductStepper/index.ts@@ -0,0 +1,2 @@+export { ProductStepper } from './ProductStepper';+export type { ProductStepperStepType } from './types';diff --git a/packages/twenty-website-new/src/sections/ProductStepper/types.ts b/packages/twenty-website-new/src/sections/ProductStepper/types.tsnew file mode 100644index 00000000000..8ab135c268b--- /dev/null+++ b/packages/twenty-website-new/src/sections/ProductStepper/types.ts@@ -0,0 +1,10 @@+import type { ImageType } from '@/design-system/components/Image';+import type { MessageDescriptor } from '@lingui/core';+import type { ReactNode } from 'react';++export type ProductStepperStepType = {+ body: MessageDescriptor;+ heading: ReactNode;+ icon: string;+ image: ImageType;+};diff --git a/packages/twenty-website-new/src/sections/ProductStepper/types/ProductStepperContentProps.ts b/packages/twenty-website-new/src/sections/ProductStepper/types/ProductStepperContentProps.tsdeleted file mode 100644index 1781b168fbc..00000000000--- a/packages/twenty-website-new/src/sections/ProductStepper/types/ProductStepperContentProps.ts+++ /dev/null@@ -1,17 +0,0 @@-import type { MessageBody } from '@/lib/i18n/message-body';-import type { MessageEyebrow } from '@/lib/i18n/message-eyebrow';-import type { ProductStepperContentStepType } from '@/sections/ProductStepper/types/ProductStepperContentStep';-import type { ReactNode } from 'react';--export type ProductStepperLayoutMode = 'scroll' | 'swipe';--export type ProductStepperContentProps = {- activeStepIndex: number;- body: MessageBody;- eyebrow: MessageEyebrow;- heading: ReactNode;- layoutMode: ProductStepperLayoutMode;- localProgress: number;- onMobileStepIndexChange: (nextIndex: number) => void;- steps: ProductStepperContentStepType[];-};diff --git a/packages/twenty-website-new/src/sections/ProductStepper/types/ProductStepperContentStep.ts b/packages/twenty-website-new/src/sections/ProductStepper/types/ProductStepperContentStep.tsdeleted file mode 100644index 44a73adc249..00000000000--- a/packages/twenty-website-new/src/sections/ProductStepper/types/ProductStepperContentStep.ts+++ /dev/null@@ -1,6 +0,0 @@-import type { ProductStepperStepType } from '@/sections/ProductStepper/types/ProductStepperStep';--export type ProductStepperContentStepType = Omit<- ProductStepperStepType,- 'image'->;diff --git a/packages/twenty-website-new/src/sections/ProductStepper/types/ProductStepperData.ts b/packages/twenty-website-new/src/sections/ProductStepper/types/ProductStepperData.tsdeleted file mode 100644index 60ba7a55a3d..00000000000--- a/packages/twenty-website-new/src/sections/ProductStepper/types/ProductStepperData.ts+++ /dev/null@@ -1,9 +0,0 @@-import type { MessageBody } from '@/lib/i18n/message-body';-import type { MessageEyebrow } from '@/lib/i18n/message-eyebrow';-import type { ProductStepperStepType } from '@/sections/ProductStepper/types/ProductStepperStep';--export type ProductStepperDataType = {- body: MessageBody;- eyebrow: MessageEyebrow;- steps: ProductStepperStepType[];-};diff --git a/packages/twenty-website-new/src/sections/ProductStepper/types/ProductStepperStep.ts b/packages/twenty-website-new/src/sections/ProductStepper/types/ProductStepperStep.tsdeleted file mode 100644index 973fd451df0..00000000000--- a/packages/twenty-website-new/src/sections/ProductStepper/types/ProductStepperStep.ts+++ /dev/null@@ -1,10 +0,0 @@-import type { MessageBody } from '@/lib/i18n/message-body';-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';-import type { ImageType } from '@/design-system/components/Image';--export type ProductStepperStepType = {- body: MessageBody;- heading: MessageHeadingSegment;- icon: string;- image: ImageType;-};diff --git a/packages/twenty-website-new/src/sections/ProductStepper/types/ProductStepperVisualProps.ts b/packages/twenty-website-new/src/sections/ProductStepper/types/ProductStepperVisualProps.tsdeleted file mode 100644index 4471f17148c..00000000000--- a/packages/twenty-website-new/src/sections/ProductStepper/types/ProductStepperVisualProps.ts+++ /dev/null@@ -1,6 +0,0 @@-import type { ImageType } from '@/design-system/components/Image';--export type ProductStepperVisualProps = {- activeStepIndex: number;- images: ImageType[];-};diff --git a/packages/twenty-website-new/src/sections/ProductStepper/types/index.ts b/packages/twenty-website-new/src/sections/ProductStepper/types/index.tsdeleted file mode 100644index 92e7ecf0d66..00000000000--- a/packages/twenty-website-new/src/sections/ProductStepper/types/index.ts+++ /dev/null@@ -1,8 +0,0 @@-export type {- ProductStepperContentProps,- ProductStepperLayoutMode,-} from './ProductStepperContentProps';-export type { ProductStepperContentStepType } from './ProductStepperContentStep';-export type { ProductStepperDataType } from './ProductStepperData';-export type { ProductStepperStepType } from './ProductStepperStep';-export type { ProductStepperVisualProps } from './ProductStepperVisualProps';diff --git a/packages/twenty-website-new/src/sections/ReleaseNotes/index.ts b/packages/twenty-website-new/src/sections/ReleaseNotes/index.tsnew file mode 100644index 00000000000..9b61d6623d0--- /dev/null+++ b/packages/twenty-website-new/src/sections/ReleaseNotes/index.ts@@ -0,0 +1 @@+export { ReleaseNotes } from './components';diff --git a/packages/twenty-website-new/src/sections/Salesforce/components/Flow.tsx b/packages/twenty-website-new/src/sections/Salesforce/components/Flow.tsxindex 76d2c74f3e3..63027c974a8 100644--- a/packages/twenty-website-new/src/sections/Salesforce/components/Flow.tsx+++ b/packages/twenty-website-new/src/sections/Salesforce/components/Flow.tsx@@ -1,7 +1,7 @@'use client';import { Body, Heading } from '@/design-system/components';-import { useRenderMessage } from '@/lib/i18n/use-render-message';+import { useLingui } from '@lingui/react';import type { MessageDescriptor } from '@lingui/core';import type {SalesforceAddonRowType,@@ -13,7 +13,8 @@ import { styled } from '@linaria/react';import { type ReactNode, useCallback, useRef, useState } from 'react';import { PricingWindow } from './PricingWindow';import { Root } from './Root';-import { WrongChoicePopup, WRONG_CHOICE_POPUP_WIDTH } from './WrongChoicePopup';+import { WrongChoicePopup } from './WrongChoicePopup';+import { WRONG_CHOICE_POPUP_WIDTH } from './wrong-choice-popup-constants';const CopyColumn = styled.div`color: ${theme.colors.primary.text[100]};@@ -135,12 +136,19 @@ const getScatteredPopupPosition = (};type FlowProps = Omit<SalesforceDataType, 'heading'> & {- backgroundColor: string;+ backgroundColor?: string;children: ReactNode;+ scheme?: 'light' | 'muted' | 'dark';};-export function Flow({ backgroundColor, body, children, pricing }: FlowProps) {- const renderText = useRenderMessage();+export function Flow({+ backgroundColor,+ body,+ children,+ pricing,+ scheme,+}: FlowProps) {+ const { i18n } = useLingui();const rightColumnRef = useRef<HTMLDivElement>(null);const popupSequenceRef = useRef(0);const [isPricingWindowVisible, setIsPricingWindowVisible] = useState(true);@@ -272,18 +280,14 @@ export function Flow({ backgroundColor, body, children, pricing }: FlowProps) {}, []);return (- <Root backgroundColor={backgroundColor}>+ <Root backgroundColor={backgroundColor} scheme={scheme}><CopyColumn><Heading as="h2" size="lg" weight="light">{children}</Heading>- <Body- body={body}- family="sans"- renderText={renderText}- size="md"- weight="regular"- />+ <Body family="sans" size="md" weight="regular">+ {i18n._(body)}+ </Body></CopyColumn><RightColumn ref={rightColumnRef}>{isPricingWindowVisible ? (diff --git a/packages/twenty-website-new/src/sections/Salesforce/components/PricingWindow.tsx b/packages/twenty-website-new/src/sections/Salesforce/components/PricingWindow.tsxindex 1e20367a12f..07a87c4061d 100644--- a/packages/twenty-website-new/src/sections/Salesforce/components/PricingWindow.tsx+++ b/packages/twenty-website-new/src/sections/Salesforce/components/PricingWindow.tsx@@ -6,7 +6,7 @@ import type {SalesforceRichTextPartType,} from '@/sections/Salesforce/types';import { useAnimatedNumber } from '@/lib/animation';-import { useRenderMessage } from '@/lib/i18n/use-render-message';+import { useLingui } from '@lingui/react';import type { MessageDescriptor } from '@lingui/core';import { theme } from '@/theme';import { msg } from '@lingui/core/macro';@@ -544,7 +544,7 @@ const AddonRightPart = styled.span`const renderRightLabelParts = (lines: SalesforceRichTextPartType[][],- renderText: (descriptor: MessageDescriptor) => string,+ translate: (descriptor: MessageDescriptor) => string,) =>lines.map((line, lineIndex) => (<AddonRightLine key={lineIndex} data-muted={lineIndex > 0 || undefined}>@@ -561,7 +561,7 @@ const renderRightLabelParts = (}>{partIndex > 0 ? ' ' : null}- {renderText(part.text)}+ {translate(part.text)}</AddonRightPart>))}</AddonRightLine>@@ -569,8 +569,8 @@ const renderRightLabelParts = (const renderRightLabel = (label: MessageDescriptor,- renderText: (descriptor: MessageDescriptor) => string,-) => <AddonRightLine>{renderText(label)}</AddonRightLine>;+ translate: (descriptor: MessageDescriptor) => string,+) => <AddonRightLine>{translate(label)}</AddonRightLine>;const SelectAllButton = styled.button`align-items: center;@@ -598,7 +598,7 @@ const SelectAllButton = styled.button`}`;-export type PricingWindowProps = {+type PricingWindowProps = {checkedIds: ReadonlySet<string>;onAddonToggle: (addon: SalesforceAddonRowType,@@ -616,7 +616,7 @@ export function PricingWindow({onSelectAll,pricing,}: PricingWindowProps) {- const renderText = useRenderMessage();+ const { i18n } = useLingui();const addonAnchorRefs = useRef<Record<string, HTMLLabelElement | null>>({});const { fixedPriceAmount, perSeatPriceAmount, totalPriceAmount } =calculatePriceAmounts(pricing, checkedIds);@@ -628,14 +628,14 @@ export function PricingWindow({<PanelWrapper>{pricing.promoTag ? (<PromoTagBorder>- <PromoTagInner>{renderText(pricing.promoTag)}</PromoTagInner>+ <PromoTagInner>{i18n._(pricing.promoTag)}</PromoTagInner></PromoTagBorder>) : null}<Panel><WindowChrome aria-hidden="true" /><PricingHeader><TitleBar>- <TitleBarText>{renderText(pricing.windowTitle)}</TitleBarText>+ <TitleBarText>{i18n._(pricing.windowTitle)}</TitleBarText><TitleBarActions><TitleBarActionButtonaria-label="Help"@@ -658,9 +658,7 @@ export function PricingWindow({<ProductBlock><ProductHeader><ProductCopy>- <ProductTitle>- {renderText(pricing.productTitle)}- </ProductTitle>+ <ProductTitle>{i18n._(pricing.productTitle)}</ProductTitle><PriceRow>{perSeatPriceAmount > pricing.basePriceAmount ? (<BasePriceAmount>@@ -670,10 +668,7 @@ export function PricingWindow({<PriceAmount>{formatPriceAmount(animatedPerSeat)}</PriceAmount>- <PriceSuffix>- {' '}- {renderText(pricing.priceSuffix)}- </PriceSuffix>+ <PriceSuffix> {i18n._(pricing.priceSuffix)}</PriceSuffix></PriceRow>{fixedPriceAmount > 0 ? (<TotalPriceRow>@@ -681,7 +676,7 @@ export function PricingWindow({{formatPriceAmount(animatedTotal)}</TotalPriceAmount><TotalPriceLabel>- {renderText(pricing.totalPriceLabel)}+ {i18n._(pricing.totalPriceLabel)}</TotalPriceLabel></TotalPriceRow>) : null}@@ -700,10 +695,10 @@ export function PricingWindow({<Inner><SectionHeader><SectionLabel>- {renderText(pricing.featureSectionHeading)}+ {i18n._(pricing.featureSectionHeading)}</SectionLabel><SelectAllButton onClick={onSelectAll} type="button">- {renderText(msg`Select all`)}+ {i18n._(msg`Select all`)}</SelectAllButton></SectionHeader>{pricing.addons.map((addon) => {@@ -732,21 +727,21 @@ export function PricingWindow({<CheckboxFace checked={checked} aria-hidden="true">{checked ? <CheckGlyph>✓</CheckGlyph> : null}</CheckboxFace>- <AddonLabelText>{renderText(addon.label)}</AddonLabelText>+ <AddonLabelText>{i18n._(addon.label)}</AddonLabelText></CheckboxLabel><AddonRightText>{addon.rightLabelParts- ? renderRightLabelParts(addon.rightLabelParts, renderText)- : renderRightLabel(addon.rightLabel, renderText)}+ ? renderRightLabelParts(addon.rightLabelParts, (d) =>+ i18n._(d),+ )+ : renderRightLabel(addon.rightLabel, (d) => i18n._(d))}</AddonRightText>{addon.tooltip ? (<Tooltip><TooltipTitleBar>- {renderText(addon.tooltip.title)}+ {i18n._(addon.tooltip.title)}</TooltipTitleBar>- <TooltipBody>- {renderText(addon.tooltip.body)}- </TooltipBody>+ <TooltipBody>{i18n._(addon.tooltip.body)}</TooltipBody></Tooltip>) : null}</AddonRow>@@ -755,14 +750,14 @@ export function PricingWindow({<FooterCtaSection><Separator aria-hidden="true" />{pricing.secondaryCtaNote ? (- <FooterNote>{renderText(pricing.secondaryCtaNote)}</FooterNote>+ <FooterNote>{i18n._(pricing.secondaryCtaNote)}</FooterNote>) : null}<FakeButtonhref={pricing.secondaryCtaHref}rel="noreferrer"target="_blank">- {renderText(pricing.secondaryCtaLabel)}+ {i18n._(pricing.secondaryCtaLabel)}</FakeButton></FooterCtaSection></Inner>diff --git a/packages/twenty-website-new/src/sections/Salesforce/components/Root.tsx b/packages/twenty-website-new/src/sections/Salesforce/components/Root.tsxindex 44cc76db691..88fe032f64b 100644--- a/packages/twenty-website-new/src/sections/Salesforce/components/Root.tsx+++ b/packages/twenty-website-new/src/sections/Salesforce/components/Root.tsx@@ -1,10 +1,22 @@import { Container } from '@/design-system/components';-import { theme } from '@/theme';+import { theme, type Scheme } from '@/theme';import { styled } from '@linaria/react';import type { ReactNode } from 'react';const StyledSection = styled.section`width: 100%;++ &[data-scheme='light'] {+ background-color: var(--color-white);+ }++ &[data-scheme='muted'] {+ background-color: var(--color-neutral);+ }++ &[data-scheme='dark'] {+ background-color: var(--color-black);+ }`;const Grid = styled(Container)`@@ -31,13 +43,17 @@ const Grid = styled(Container)``;type RootProps = {- backgroundColor: string;+ backgroundColor?: string;children: ReactNode;+ scheme?: Scheme;};-export function Root({ backgroundColor, children }: RootProps) {+export function Root({ backgroundColor, children, scheme }: RootProps) {return (- <StyledSection style={{ backgroundColor }}>+ <StyledSection+ data-scheme={scheme}+ style={scheme ? undefined : { backgroundColor }}+ ><Grid>{children}</Grid></StyledSection>);diff --git a/packages/twenty-website-new/src/sections/Salesforce/components/WrongChoicePopup.tsx b/packages/twenty-website-new/src/sections/Salesforce/components/WrongChoicePopup.tsxindex f29c4db25b6..781d6015ddd 100644--- a/packages/twenty-website-new/src/sections/Salesforce/components/WrongChoicePopup.tsx+++ b/packages/twenty-website-new/src/sections/Salesforce/components/WrongChoicePopup.tsx@@ -1,14 +1,12 @@'use client';-import { useRenderMessage } from '@/lib/i18n/use-render-message';-import { useTimeoutRegistry } from '@/lib/react';+import { useLingui } from '@lingui/react';import type { MessageDescriptor } from '@lingui/core';import { theme } from '@/theme';import { styled } from '@linaria/react';-import { useEffect, useState } from 'react';-export const WRONG_CHOICE_POPUP_WIDTH = 321;-const POPUP_VISIBLE_DURATION_MS = 3000;+import { useTimedPopupDismissal } from './use-timed-popup-dismissal';+import { WRONG_CHOICE_POPUP_WIDTH } from './wrong-choice-popup-constants';const POPUP_FADE_DURATION_MS = 240;const Shell = styled.div<{@@ -99,7 +97,7 @@ const BodyText = styled.p`margin: 0;`;-export type WrongChoicePopupProps = {+type WrongChoicePopupProps = {body: MessageDescriptor;isClosingRequested?: boolean;layerIndex: number;@@ -120,31 +118,8 @@ export function WrongChoicePopup({titleBar,titleId,}: WrongChoicePopupProps) {- const renderText = useRenderMessage();- const timeoutRegistry = useTimeoutRegistry();- const [isClosing, setIsClosing] = useState(false);-- useEffect(() => {- return timeoutRegistry.schedule(() => {- setIsClosing(true);- }, POPUP_VISIBLE_DURATION_MS);- }, [timeoutRegistry]);-- useEffect(() => {- if (isClosingRequested) {- setIsClosing(true);- }- }, [isClosingRequested]);-- useEffect(() => {- if (!isClosing) {- return;- }-- return timeoutRegistry.schedule(() => {- onClose();- }, POPUP_FADE_DURATION_MS);- }, [isClosing, onClose, timeoutRegistry]);+ const { i18n } = useLingui();+ const isClosing = useTimedPopupDismissal(isClosingRequested, onClose);return (<Shell@@ -156,7 +131,7 @@ export function WrongChoicePopup({top={top}><TitleBar>- <TitleText id={titleId}>{renderText(titleBar)}</TitleText>+ <TitleText id={titleId}>{i18n._(titleBar)}</TitleText><CloseButtonaria-label="Close dialog"onClick={() => undefined}@@ -167,7 +142,7 @@ export function WrongChoicePopup({</TitleBar><BodyRow><IconMark aria-hidden="true">⊘</IconMark>- <BodyText>{renderText(body)}</BodyText>+ <BodyText>{i18n._(body)}</BodyText></BodyRow></Shell>);diff --git a/packages/twenty-website-new/src/sections/Salesforce/components/use-timed-popup-dismissal.ts b/packages/twenty-website-new/src/sections/Salesforce/components/use-timed-popup-dismissal.tsnew file mode 100644index 00000000000..3e43432770d--- /dev/null+++ b/packages/twenty-website-new/src/sections/Salesforce/components/use-timed-popup-dismissal.ts@@ -0,0 +1,40 @@+'use client';++import { useEffect, useState } from 'react';++import { useTimeoutRegistry } from '@/lib/react';++const POPUP_VISIBLE_DURATION_MS = 3000;+const POPUP_FADE_DURATION_MS = 240;++export function useTimedPopupDismissal(+ isClosingRequested: boolean,+ onClose: () => void,+) {+ const timeoutRegistry = useTimeoutRegistry();+ const [isClosing, setIsClosing] = useState(false);++ useEffect(() => {+ return timeoutRegistry.schedule(() => {+ setIsClosing(true);+ }, POPUP_VISIBLE_DURATION_MS);+ }, [timeoutRegistry]);++ useEffect(() => {+ if (isClosingRequested) {+ setIsClosing(true);+ }+ }, [isClosingRequested]);++ useEffect(() => {+ if (!isClosing) {+ return;+ }++ return timeoutRegistry.schedule(() => {+ onClose();+ }, POPUP_FADE_DURATION_MS);+ }, [isClosing, onClose, timeoutRegistry]);++ return isClosing;+}diff --git a/packages/twenty-website-new/src/sections/Salesforce/components/wrong-choice-popup-constants.ts b/packages/twenty-website-new/src/sections/Salesforce/components/wrong-choice-popup-constants.tsnew file mode 100644index 00000000000..a4e1b19a404--- /dev/null+++ b/packages/twenty-website-new/src/sections/Salesforce/components/wrong-choice-popup-constants.ts@@ -0,0 +1 @@+export const WRONG_CHOICE_POPUP_WIDTH = 321;diff --git a/packages/twenty-website-new/src/sections/Salesforce/index.ts b/packages/twenty-website-new/src/sections/Salesforce/index.tsnew file mode 100644index 00000000000..2286b30b9e9--- /dev/null+++ b/packages/twenty-website-new/src/sections/Salesforce/index.ts@@ -0,0 +1,2 @@+export { Salesforce } from './components';+export type { SalesforceDataType } from './types';diff --git a/packages/twenty-website-new/src/sections/Salesforce/types/index.ts b/packages/twenty-website-new/src/sections/Salesforce/types/index.tsindex 211598f3580..af9f133d827 100644--- a/packages/twenty-website-new/src/sections/Salesforce/types/index.ts+++ b/packages/twenty-website-new/src/sections/Salesforce/types/index.ts@@ -4,4 +4,4 @@ export type {SalesforcePricingPanelType,SalesforceRichTextPartType,SalesforceWrongChoicePopupType,-} from './SalesforceData';+} from './salesforce-data';diff --git a/packages/twenty-website-new/src/sections/Salesforce/types/SalesforceData.ts b/packages/twenty-website-new/src/sections/Salesforce/types/salesforce-data.tssimilarity index 94%rename from packages/twenty-website-new/src/sections/Salesforce/types/SalesforceData.tsrename to packages/twenty-website-new/src/sections/Salesforce/types/salesforce-data.tsindex 47b846e106f..182c9725858 100644--- a/packages/twenty-website-new/src/sections/Salesforce/types/SalesforceData.ts+++ b/packages/twenty-website-new/src/sections/Salesforce/types/salesforce-data.ts@@ -1,4 +1,3 @@-import type { MessageBody } from '@/lib/i18n/message-body';import type { MessageDescriptor } from '@lingui/core';export type SalesforceWrongChoicePopupType = {@@ -48,6 +47,6 @@ export type SalesforcePricingPanelType = {};export type SalesforceDataType = {- body: MessageBody;+ body: MessageDescriptor;pricing: SalesforcePricingPanelType;};diff --git a/packages/twenty-website-new/src/sections/Signoff/Signoff.tsx b/packages/twenty-website-new/src/sections/Signoff/Signoff.tsxnew file mode 100644index 00000000000..c268197d769--- /dev/null+++ b/packages/twenty-website-new/src/sections/Signoff/Signoff.tsx@@ -0,0 +1,244 @@+import { styled } from '@linaria/react';+import type { ReactNode } from 'react';++import {+ Body as BaseBody,+ Container,+ GuideCrosshair,+ Heading as BaseHeading,+} from '@/design-system/components';+import { type Page, Pages } from '@/lib/pages';+import { theme, type Scheme } from '@/theme';++const SIGNOFF_SHAPE_PATH =+ 'M0 4a4 4 0 0 1 4-4h344.32c4.197 0 8.369.66 12.361 1.958l49.5 16.084A40 40 0 0 0 422.542 20h517.7c4.293 0 8.559-.691 12.633-2.047l47.785-15.906A40 40 0 0 1 1013.29 0H1356a4 4 0 0 1 4 4v16H0z';++const GUIDE_CROSSHAIR_BY_PAGE: Partial<+ Record<Page, { crossX: string; crossY: string; lineColor?: string }>+> = {+ [Pages.Partners]: { crossX: 'calc(50% + 334px)', crossY: '198px' },+};++const StyledSection = styled.section`+ min-width: 0;+ width: 100%;++ &[data-scheme='light'] {+ background-color: var(--color-white);+ color: var(--color-text);+ }++ &[data-scheme='muted'] {+ background-color: var(--color-neutral);+ color: var(--color-text);+ }++ &[data-scheme='dark'] {+ background-color: var(--color-black);+ color: var(--color-text);+ }++ &[data-page='partners'] {+ position: relative;+ }++ &[data-shaped] {+ isolation: isolate;+ overflow: hidden;+ position: relative;+ }++ @media (min-width: ${theme.breakpoints.md}px) {+ &[data-page='partners'][data-center='true'] {+ min-height: 759px;+ overflow: hidden;+ position: relative;+ }++ &[data-page='partners'][data-center='true'] > div {+ justify-content: center;+ min-height: 759px;+ padding-bottom: 0;+ padding-top: 0;+ }+ }+`;++const StyledContainer = styled(Container)`+ align-items: center;+ display: flex;+ flex-direction: column;+ padding-bottom: ${theme.spacing(20)};+ padding-left: ${theme.spacing(4)};+ padding-right: ${theme.spacing(4)};+ padding-top: ${theme.spacing(20)};+ text-align: center;+ position: relative;+ z-index: 10;++ @media (min-width: ${theme.breakpoints.md}px) {+ padding-bottom: ${theme.spacing(28)};+ padding-left: ${theme.spacing(10)};+ padding-right: ${theme.spacing(10)};+ padding-top: ${theme.spacing(28)};+ }+`;++const HeadingWrap = styled.div`+ margin-bottom: ${theme.spacing(2)};+ margin-left: auto;+ margin-right: auto;+ max-width: ${theme.layout.editorial};+ min-width: 0;+ width: 100%;++ @media (min-width: ${theme.breakpoints.md}px) {+ &[data-page='partners'] {+ white-space: pre-line;+ }+ }+`;++const Subline = styled.div`+ color: var(+ --color-text-muted,+ color-mix(in srgb, currentColor 80%, transparent)+ );+ margin-bottom: ${theme.spacing(6)};+ max-width: 452px;+ min-width: 0;+ width: 100%;++ @media (min-width: ${theme.breakpoints.md}px) {+ &[data-page='partners'] {+ white-space: pre-line;+ }+ }+`;++const Actions = styled.div`+ display: flex;+ flex-wrap: wrap;+ column-gap: ${theme.spacing(2)};+ justify-content: center;+ row-gap: ${theme.spacing(1)};+`;++function SignoffShape({ fillColor }: { fillColor: string }) {+ return (+ <div+ aria-hidden+ style={{+ width: '100%',+ height: '100%',+ position: 'absolute',+ inset: 0,+ pointerEvents: 'none',+ zIndex: -1,+ }}+ >+ <svg+ width="100%"+ height="20"+ viewBox="0 0 1360 20"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ preserveAspectRatio="none"+ style={{ display: 'block' }}+ >+ <path d={SIGNOFF_SHAPE_PATH} fill={fillColor} />+ </svg>+ <div+ style={{+ position: 'absolute',+ top: 19,+ bottom: 0,+ left: 0,+ right: 0,+ backgroundColor: fillColor,+ borderBottomLeftRadius: 4,+ borderBottomRightRadius: 4,+ }}+ />+ </div>+ );+}++type RootPropsSimple = {+ backgroundColor?: string;+ centerContent?: boolean;+ children: ReactNode;+ color?: string;+ page?: Page;+ scheme?: Scheme;+ variant?: 'simple';+};++type RootPropsShaped = {+ backgroundColor?: string;+ centerContent?: boolean;+ children: ReactNode;+ color?: string;+ page?: Page;+ scheme?: Scheme;+ shapeFillColor: string;+ variant: 'shaped';+};++type RootProps = RootPropsSimple | RootPropsShaped;++function Root(props: RootProps) {+ const { backgroundColor, centerContent, children, color, page, scheme } =+ props;+ const isShaped = props.variant === 'shaped';+ const shapeFillColor = isShaped ? props.shapeFillColor : undefined;+ const shouldCenterContent = centerContent ?? page === Pages.Partners;++ return (+ <StyledSection+ data-center={shouldCenterContent ? 'true' : undefined}+ data-page={page}+ data-scheme={scheme}+ data-shaped={isShaped ? '' : undefined}+ style={scheme ? undefined : { backgroundColor, color }}+ >+ {isShaped && shapeFillColor ? (+ <SignoffShape fillColor={shapeFillColor} />+ ) : null}+ {page && GUIDE_CROSSHAIR_BY_PAGE[page] ? (+ <GuideCrosshair+ crossX={GUIDE_CROSSHAIR_BY_PAGE[page]!.crossX}+ crossY={GUIDE_CROSSHAIR_BY_PAGE[page]!.crossY}+ lineColor={GUIDE_CROSSHAIR_BY_PAGE[page]!.lineColor}+ />+ ) : null}+ <StyledContainer>{children}</StyledContainer>+ </StyledSection>+ );+}++function Heading({ children, page }: { children: ReactNode; page?: Page }) {+ return (+ <HeadingWrap data-page={page}>+ <BaseHeading as="h2" size="xl" weight="light">+ {children}+ </BaseHeading>+ </HeadingWrap>+ );+}++function Body({ children, page }: { children: ReactNode; page?: Page }) {+ return (+ <Subline data-page={page}>+ <BaseBody as="p" size="sm" weight="regular">+ {children}+ </BaseBody>+ </Subline>+ );+}++function Cta({ children }: { children: ReactNode }) {+ return <Actions>{children}</Actions>;+}++export const Signoff = { Body, Cta, Heading, Root };diff --git a/packages/twenty-website-new/src/sections/Signoff/components/Body.tsx b/packages/twenty-website-new/src/sections/Signoff/components/Body.tsxdeleted file mode 100644index 40f4ad26e41..00000000000--- a/packages/twenty-website-new/src/sections/Signoff/components/Body.tsx+++ /dev/null@@ -1,55 +0,0 @@-import { styled } from '@linaria/react';-import type { ReactNode } from 'react';--import { Body as BaseBody } from '@/design-system/components';-import type { BodyType } from '@/design-system/components/Body';-import type { Page } from '@/lib/pages';-import { theme } from '@/theme';--const Subline = styled.div`- --body-sm-color: currentColor;- color: color-mix(in srgb, currentColor 80%, transparent);- margin-bottom: ${theme.spacing(6)};- max-width: 452px;- min-width: 0;- width: 100%;-- @media (min-width: ${theme.breakpoints.md}px) {- &[data-page='partners'] {- white-space: pre-line;- }- }-`;--type BodyProps<TText = ReactNode> = {- body: BodyType<TText>;- page?: Page;- renderText?: (text: TText) => ReactNode;-};--export function Body<TText = ReactNode>({- body,- page,- renderText,-}: BodyProps<TText>) {- return (- <Subline data-page={page}>- {renderText === undefined ? (- <BaseBody- as="p"- body={body as BodyType<ReactNode>}- size="sm"- weight="regular"- />- ) : (- <BaseBody<TText>- as="p"- body={body}- renderText={renderText}- size="sm"- weight="regular"- />- )}- </Subline>- );-}diff --git a/packages/twenty-website-new/src/sections/Signoff/components/Cta.tsx b/packages/twenty-website-new/src/sections/Signoff/components/Cta.tsxdeleted file mode 100644index bcc7ed6d786..00000000000--- a/packages/twenty-website-new/src/sections/Signoff/components/Cta.tsx+++ /dev/null@@ -1,20 +0,0 @@-import { styled } from '@linaria/react';-import type { ReactNode } from 'react';--import { theme } from '@/theme';--const Actions = styled.div`- display: flex;- flex-wrap: wrap;- column-gap: ${theme.spacing(2)};- justify-content: center;- row-gap: ${theme.spacing(1)};-`;--type CtaProps = {- children: ReactNode;-};--export function Cta({ children }: CtaProps) {- return <Actions>{children}</Actions>;-}diff --git a/packages/twenty-website-new/src/sections/Signoff/components/Heading.tsx b/packages/twenty-website-new/src/sections/Signoff/components/Heading.tsxdeleted file mode 100644index ce7366890d8..00000000000--- a/packages/twenty-website-new/src/sections/Signoff/components/Heading.tsx+++ /dev/null@@ -1,36 +0,0 @@-import { styled } from '@linaria/react';--import { Heading as BaseHeading } from '@/design-system/components';-import type { Page } from '@/lib/pages';-import { theme } from '@/theme';-import type { ReactNode } from 'react';--const HeadingWrap = styled.div`- margin-bottom: ${theme.spacing(2)};- margin-left: auto;- margin-right: auto;- max-width: ${theme.layout.editorial};- min-width: 0;- width: 100%;-- @media (min-width: ${theme.breakpoints.md}px) {- &[data-page='partners'] {- white-space: pre-line;- }- }-`;--type HeadingProps = {- children: ReactNode;- page?: Page;-};--export function Heading({ children, page }: HeadingProps) {- return (- <HeadingWrap data-page={page}>- <BaseHeading as="h2" size="xl" weight="light">- {children}- </BaseHeading>- </HeadingWrap>- );-}diff --git a/packages/twenty-website-new/src/sections/Signoff/components/Root.tsx b/packages/twenty-website-new/src/sections/Signoff/components/Root.tsxdeleted file mode 100644index a1a43e5fe33..00000000000--- a/packages/twenty-website-new/src/sections/Signoff/components/Root.tsx+++ /dev/null@@ -1,112 +0,0 @@-import { styled } from '@linaria/react';-import type { ReactNode } from 'react';--import { Container, GuideCrosshair } from '@/design-system/components';-import { type Page, Pages } from '@/lib/pages';-import { SignoffShape } from '@/sections/Signoff/components/SignoffShape';-import { theme } from '@/theme';--const GUIDE_CROSSHAIR_BY_PAGE: Partial<- Record<Page, { crossX: string; crossY: string; lineColor?: string }>-> = {- [Pages.Partners]: { crossX: 'calc(50% + 334px)', crossY: '198px' },-};--const StyledSection = styled.section`- min-width: 0;- width: 100%;-- &[data-page='partners'] {- position: relative;- }-- &[data-shaped] {- isolation: isolate;- overflow: hidden;- position: relative;- }-- @media (min-width: ${theme.breakpoints.md}px) {- &[data-page='partners'][data-center='true'] {- min-height: 759px;- overflow: hidden;- position: relative;- }-- &[data-page='partners'][data-center='true'] > div {- justify-content: center;- min-height: 759px;- padding-bottom: 0;- padding-top: 0;- }- }-`;--const StyledContainer = styled(Container)`- align-items: center;- display: flex;- flex-direction: column;- padding-bottom: ${theme.spacing(20)};- padding-left: ${theme.spacing(4)};- padding-right: ${theme.spacing(4)};- padding-top: ${theme.spacing(20)};- text-align: center;- position: relative;- z-index: 10;-- @media (min-width: ${theme.breakpoints.md}px) {- padding-bottom: ${theme.spacing(28)};- padding-left: ${theme.spacing(10)};- padding-right: ${theme.spacing(10)};- padding-top: ${theme.spacing(28)};- }-`;--type RootPropsSimple = {- backgroundColor: string;- centerContent?: boolean;- children: ReactNode;- color: string;- page?: Page;- variant?: 'simple';-};--type RootPropsShaped = {- backgroundColor: string;- centerContent?: boolean;- children: ReactNode;- color: string;- page?: Page;- shapeFillColor: string;- variant: 'shaped';-};--type RootProps = RootPropsSimple | RootPropsShaped;--export function Root(props: RootProps) {- const { backgroundColor, centerContent, children, color, page } = props;- const isShaped = props.variant === 'shaped';- const shapeFillColor = isShaped ? props.shapeFillColor : undefined;- const shouldCenterContent = centerContent ?? page === Pages.Partners;-- return (- <StyledSection- data-center={shouldCenterContent ? 'true' : undefined}- data-page={page}- data-shaped={isShaped ? '' : undefined}- style={{ backgroundColor, color }}- >- {isShaped && shapeFillColor ? (- <SignoffShape fillColor={shapeFillColor} />- ) : null}- {page && GUIDE_CROSSHAIR_BY_PAGE[page] ? (- <GuideCrosshair- crossX={GUIDE_CROSSHAIR_BY_PAGE[page]!.crossX}- crossY={GUIDE_CROSSHAIR_BY_PAGE[page]!.crossY}- lineColor={GUIDE_CROSSHAIR_BY_PAGE[page]!.lineColor}- />- ) : null}- <StyledContainer>{children}</StyledContainer>- </StyledSection>- );-}diff --git a/packages/twenty-website-new/src/sections/Signoff/components/SignoffShape.tsx b/packages/twenty-website-new/src/sections/Signoff/components/SignoffShape.tsxdeleted file mode 100644index ba1840c5fc7..00000000000--- a/packages/twenty-website-new/src/sections/Signoff/components/SignoffShape.tsx+++ /dev/null@@ -1,46 +0,0 @@-const SIGNOFF_SHAPE_PATH =- 'M0 4a4 4 0 0 1 4-4h344.32c4.197 0 8.369.66 12.361 1.958l49.5 16.084A40 40 0 0 0 422.542 20h517.7c4.293 0 8.559-.691 12.633-2.047l47.785-15.906A40 40 0 0 1 1013.29 0H1356a4 4 0 0 1 4 4v16H0z';--interface SignoffShapeProps {- fillColor: string;-}--export function SignoffShape({ fillColor }: SignoffShapeProps) {- return (- <div- aria-hidden- style={{- width: '100%',- height: '100%',- position: 'absolute',- inset: 0,- pointerEvents: 'none',- zIndex: -1,- }}- >- <svg- width="100%"- height="20"- viewBox="0 0 1360 20"- fill="none"- xmlns="http://www.w3.org/2000/svg"- preserveAspectRatio="none"- style={{ display: 'block' }}- >- <path d={SIGNOFF_SHAPE_PATH} fill={fillColor} />- </svg>- <div- style={{- position: 'absolute',- top: 19,- bottom: 0,- left: 0,- right: 0,- backgroundColor: fillColor,- borderBottomLeftRadius: 4,- borderBottomRightRadius: 4,- }}- />- </div>- );-}diff --git a/packages/twenty-website-new/src/sections/Signoff/components/index.ts b/packages/twenty-website-new/src/sections/Signoff/components/index.tsdeleted file mode 100644index 9d309e9f3fd..00000000000--- a/packages/twenty-website-new/src/sections/Signoff/components/index.ts+++ /dev/null@@ -1,6 +0,0 @@-import { Body } from './Body';-import { Cta } from './Cta';-import { Heading } from './Heading';-import { Root } from './Root';--export const Signoff = { Body, Cta, Heading, Root };diff --git a/packages/twenty-website-new/src/sections/Signoff/index.ts b/packages/twenty-website-new/src/sections/Signoff/index.tsnew file mode 100644index 00000000000..5c1298d5650--- /dev/null+++ b/packages/twenty-website-new/src/sections/Signoff/index.ts@@ -0,0 +1 @@+export { Signoff } from './Signoff';diff --git a/packages/twenty-website-new/src/lib/stepper/stepper-swipe-deck.tsx b/packages/twenty-website-new/src/sections/Stepper/StepperSwipeDeck.tsxsimilarity index 100%rename from packages/twenty-website-new/src/lib/stepper/stepper-swipe-deck.tsxrename to packages/twenty-website-new/src/sections/Stepper/StepperSwipeDeck.tsxdiff --git a/packages/twenty-website-new/src/sections/Stepper/index.ts b/packages/twenty-website-new/src/sections/Stepper/index.tsnew file mode 100644index 00000000000..a3e1fbb2b73--- /dev/null+++ b/packages/twenty-website-new/src/sections/Stepper/index.ts@@ -0,0 +1,3 @@+export { StepperSwipeDeck } from './StepperSwipeDeck';+export { useBreakpointStepSync } from './use-breakpoint-step-sync';+export { getStepperMdUpSnapshot, useStepperMdUp } from './use-stepper-md-up';diff --git a/packages/twenty-website-new/src/sections/Stepper/use-breakpoint-step-sync.ts b/packages/twenty-website-new/src/sections/Stepper/use-breakpoint-step-sync.tsnew file mode 100644index 00000000000..6101af228ff--- /dev/null+++ b/packages/twenty-website-new/src/sections/Stepper/use-breakpoint-step-sync.ts@@ -0,0 +1,36 @@+import { useEffect, useRef, useState } from 'react';++export function useBreakpointStepSync(+ isMdUp: boolean,+ scrollProgress: number,+ stepCount: number,+) {+ const [mobileStepIndex, setMobileStepIndex] = useState(0);+ const previousMdUpRef = useRef(isMdUp);++ useEffect(() => {+ if (previousMdUpRef.current && !isMdUp) {+ const scrollDerivedIndex = Math.min(+ stepCount - 1,+ Math.floor(scrollProgress * stepCount),+ );+ setMobileStepIndex(scrollDerivedIndex);+ }+ previousMdUpRef.current = isMdUp;+ }, [isMdUp, scrollProgress, stepCount]);++ const activeStepIndex = isMdUp+ ? Math.min(stepCount - 1, Math.floor(scrollProgress * stepCount))+ : mobileStepIndex;++ const localProgress = isMdUp+ ? scrollProgress * stepCount - activeStepIndex+ : 0;++ return {+ activeStepIndex,+ localProgress,+ mobileStepIndex,+ setMobileStepIndex,+ };+}diff --git a/packages/twenty-website-new/src/lib/stepper/use-stepper-md-up.ts b/packages/twenty-website-new/src/sections/Stepper/use-stepper-md-up.tssimilarity index 100%rename from packages/twenty-website-new/src/lib/stepper/use-stepper-md-up.tsrename to packages/twenty-website-new/src/sections/Stepper/use-stepper-md-up.tsdiff --git a/packages/twenty-website-new/src/sections/Tabs/components/Root.tsx b/packages/twenty-website-new/src/sections/Tabs/components/Root.tsxindex cee2170e9b9..1ce1cc817ad 100644--- a/packages/twenty-website-new/src/sections/Tabs/components/Root.tsx+++ b/packages/twenty-website-new/src/sections/Tabs/components/Root.tsx@@ -124,7 +124,7 @@ export function Root({ children }: RootProps) {</BackgroundShape></TabBackgrounds><StyledSection>- <StyledContainer>{children}</StyledContainer>+ <StyledContainer data-scheme="dark">{children}</StyledContainer></StyledSection></RootWrapper>);diff --git a/packages/twenty-website-new/src/sections/Tabs/components/TabButton.tsx b/packages/twenty-website-new/src/sections/Tabs/components/TabButton.tsxindex af63537efce..2dcbe331d56 100644--- a/packages/twenty-website-new/src/sections/Tabs/components/TabButton.tsx+++ b/packages/twenty-website-new/src/sections/Tabs/components/TabButton.tsx@@ -1,6 +1,6 @@'use client';-import { useRenderMessage } from '@/lib/i18n/use-render-message';+import { useLingui } from '@lingui/react';import { INFORMATIVE_ICONS } from '@/icons';import type { TabType } from '@/sections/Tabs/types';import { theme } from '@/theme';@@ -96,7 +96,7 @@ export function TabButton({onSelect,tab,}: TabButtonProps) {- const renderText = useRenderMessage();+ const { i18n } = useLingui();const iconColor = isActive? theme.colors.highlight[100]@@ -114,7 +114,7 @@ export function TabButton({role="tab"type="button">- <Label>{renderText(tab.body)}</Label>+ <Label>{i18n._(tab.body)}</Label><TabIconBox data-active={String(isActive)}>{Icon ? <Icon color={iconColor} size={16} /> : null}</TabIconBox>diff --git a/packages/twenty-website-new/src/sections/Tabs/index.ts b/packages/twenty-website-new/src/sections/Tabs/index.tsnew file mode 100644index 00000000000..37d2b1a677d--- /dev/null+++ b/packages/twenty-website-new/src/sections/Tabs/index.ts@@ -0,0 +1,2 @@+export { Tabs } from './components';+export type { TabType } from './types';diff --git a/packages/twenty-website-new/src/sections/Testimonials/Testimonials.tsx b/packages/twenty-website-new/src/sections/Testimonials/Testimonials.tsxnew file mode 100644index 00000000000..339fe6059d8--- /dev/null+++ b/packages/twenty-website-new/src/sections/Testimonials/Testimonials.tsx@@ -0,0 +1,140 @@+import { Container } from '@/design-system/components';+import { theme } from '@/theme';+import { styled } from '@linaria/react';+import type { ReactNode } from 'react';+import { Carousel } from './components/TestimonialsCarousel';+import { PartnerCarousel } from './components/TestimonialsPartnerCarousel';+import { MountedTestimonialsHomeVisual } from './components/MountedTestimonialsHomeVisual';+import { MountedTestimonialsPartnerVisual } from './components/MountedTestimonialsPartnerVisual';++const TESTIMONIALS_SHAPE_PATH =+ 'M0 4a4 4 0 0 1 4-4h344.32c4.197 0 8.369.66 12.361 1.958l49.5 16.084A40 40 0 0 0 422.542 20h517.7c4.293 0 8.559-.691 12.633-2.047l47.785-15.906A40 40 0 0 1 1013.29 0H1356a4 4 0 0 1 4 4v16H0z';++function TestimonialsShape({ fillColor }: { fillColor: string }) {+ return (+ <div+ aria-hidden+ style={{+ width: '100%',+ height: '100%',+ position: 'absolute',+ inset: 0,+ pointerEvents: 'none',+ }}+ >+ <svg+ width="100%"+ height="20"+ viewBox="0 0 1360 20"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ preserveAspectRatio="none"+ style={{ display: 'block' }}+ >+ <path d={TESTIMONIALS_SHAPE_PATH} fill={fillColor} />+ </svg>+ <div+ style={{+ position: 'absolute',+ top: 19,+ bottom: 0,+ left: 0,+ right: 0,+ backgroundColor: fillColor,+ borderBottomLeftRadius: 4,+ borderBottomRightRadius: 4,+ }}+ />+ </div>+ );+}++const StyledSection = styled.section`+ min-width: 0;+ overflow: hidden;+ position: relative;+ width: 100%;++ &[data-scheme='light'] {+ background-color: var(--color-white);+ color: var(--color-text);+ }++ &[data-scheme='muted'] {+ background-color: var(--color-neutral);+ color: var(--color-text);+ }++ &[data-scheme='dark'] {+ background-color: var(--color-black);+ color: var(--color-text);+ }+`;++const BackgroundShape = styled.div`+ bottom: 0;+ left: 0;+ pointer-events: none;+ position: absolute;+ right: 0;+ top: 0;+ z-index: 0;+`;++const StyledContainer = styled(Container)<{ $compactBottom: boolean }>`+ padding-bottom: ${({ $compactBottom }) =>+ $compactBottom ? theme.spacing(6) : theme.spacing(22)};+ padding-left: ${theme.spacing(4)};+ padding-right: ${theme.spacing(4)};+ padding-top: ${theme.spacing(22)};+ position: relative;+ z-index: 1;++ @media (min-width: ${theme.breakpoints.md}px) {+ padding-left: ${theme.spacing(10)};+ padding-right: ${theme.spacing(10)};+ padding-top: ${theme.spacing(25)};+ padding-bottom: ${({ $compactBottom }) =>+ $compactBottom ? theme.spacing(8) : theme.spacing(25)};+ }+`;++type RootProps = {+ backgroundColor?: string;+ children: ReactNode;+ color?: string;+ compactBottom?: boolean;+ scheme?: 'light' | 'muted' | 'dark';+ shapeFillColor?: string;+};++function Root({+ backgroundColor,+ children,+ color,+ compactBottom = false,+ scheme,+ shapeFillColor = theme.colors.primary.background[100],+}: RootProps) {+ return (+ <StyledSection+ data-scheme={scheme}+ style={scheme ? undefined : { backgroundColor, color }}+ >+ <BackgroundShape>+ <TestimonialsShape fillColor={shapeFillColor} />+ </BackgroundShape>+ <StyledContainer $compactBottom={compactBottom}>+ {children}+ </StyledContainer>+ </StyledSection>+ );+}++export const Testimonials = {+ Carousel,+ HomeVisual: MountedTestimonialsHomeVisual,+ PartnerCarousel,+ PartnerVisual: MountedTestimonialsPartnerVisual,+ Root,+};diff --git a/packages/twenty-website-new/src/sections/Testimonials/visuals/Hourglass.tsx b/packages/twenty-website-new/src/sections/Testimonials/components/Hourglass.tsxsimilarity index 73%rename from packages/twenty-website-new/src/sections/Testimonials/visuals/Hourglass.tsxrename to packages/twenty-website-new/src/sections/Testimonials/components/Hourglass.tsxindex 9444ae888e2..33d70172955 100644--- a/packages/twenty-website-new/src/sections/Testimonials/visuals/Hourglass.tsx+++ b/packages/twenty-website-new/src/sections/Testimonials/components/Hourglass.tsx@@ -1,8 +1,8 @@'use client';+import { useAsyncGeometry } from '@/lib/visual-runtime/hooks/use-async-geometry';import { styled } from '@linaria/react';-import { useEffect, useState } from 'react';-import type * as THREE from 'three';+import { useCallback } from 'react';import { loadImportedGeometryFromUrl } from '@/lib/halftone';import { HourglassCanvas } from './HourglassCanvas';@@ -81,34 +81,11 @@ const HourglassFill = styled.div``;export function Hourglass() {- const [geometry, setGeometry] = useState<THREE.BufferGeometry | null>(null);-- useEffect(() => {- let cancelled = false;- let loadedGeometry: THREE.BufferGeometry | null = null;-- void loadImportedGeometryFromUrl('glb', GLB_URL, 'hourglass.glb')- .then((nextGeometry) => {- if (cancelled) {- nextGeometry.dispose();- return;- }-- loadedGeometry = nextGeometry;- setGeometry(nextGeometry);- })- .catch((error) => {- console.error(error);- });-- return () => {- cancelled = true;-- if (loadedGeometry) {- loadedGeometry.dispose();- }- };- }, []);+ const loadGeometry = useCallback(+ () => loadImportedGeometryFromUrl('glb', GLB_URL, 'hourglass.glb'),+ [],+ );+ const geometry = useAsyncGeometry(loadGeometry, [loadGeometry]);return (<HourglassFill>diff --git a/packages/twenty-website-new/src/sections/Testimonials/components/HourglassCanvas.tsx b/packages/twenty-website-new/src/sections/Testimonials/components/HourglassCanvas.tsxnew file mode 100644index 00000000000..bf98446d407--- /dev/null+++ b/packages/twenty-website-new/src/sections/Testimonials/components/HourglassCanvas.tsx@@ -0,0 +1,46 @@+'use client';++import { styled } from '@linaria/react';+import { useRef } from 'react';+import type * as THREE from 'three';+import {+ useHourglassCanvas,+ type HourglassPose,+ type HourglassSettings,+} from '../hooks/use-hourglass-canvas';++const CanvasMount = styled.div<{ $background: string }>`+ background: ${(props) => props.$background};+ display: block;+ height: 100%;+ min-width: 0;+ width: 100%;+`;++type HourglassCanvasProps = {+ geometry: THREE.BufferGeometry;+ initialPose?: Partial<HourglassPose>;+ previewDistance: number;+ settings: HourglassSettings;+};++export function HourglassCanvas({+ geometry,+ initialPose,+ previewDistance,+ settings,+}: HourglassCanvasProps) {+ const mountReference = useRef<HTMLDivElement>(null);++ useHourglassCanvas({+ geometry,+ initialPose,+ mountRef: mountReference,+ previewDistance,+ settings,+ });++ return (+ <CanvasMount $background={settings.background.color} ref={mountReference} />+ );+}diff --git a/packages/twenty-website-new/src/sections/Testimonials/components/MountedTestimonialsHomeVisual.tsx b/packages/twenty-website-new/src/sections/Testimonials/components/MountedTestimonialsHomeVisual.tsxnew file mode 100644index 00000000000..7866a2d99d8--- /dev/null+++ b/packages/twenty-website-new/src/sections/Testimonials/components/MountedTestimonialsHomeVisual.tsx@@ -0,0 +1,30 @@+'use client';++import { WebGlMount } from '@/lib/visual-runtime';+import { Hourglass } from './Hourglass';+import { theme } from '@/theme';+import { styled } from '@linaria/react';++const TestimonialsVisualFrame = styled.div`+ background-color: transparent;+ border-radius: ${theme.radius(1)};+ height: 279px;+ overflow: hidden;+ position: relative;+ width: 198px;++ @media (min-width: ${theme.breakpoints.md}px) {+ height: 476px;+ width: 336px;+ }+`;++export function MountedTestimonialsHomeVisual() {+ return (+ <TestimonialsVisualFrame>+ <WebGlMount>+ <Hourglass />+ </WebGlMount>+ </TestimonialsVisualFrame>+ );+}diff --git a/packages/twenty-website-new/src/sections/Testimonials/components/MountedTestimonialsVisuals.tsx b/packages/twenty-website-new/src/sections/Testimonials/components/MountedTestimonialsPartnerVisual.tsxsimilarity index 65%rename from packages/twenty-website-new/src/sections/Testimonials/components/MountedTestimonialsVisuals.tsxrename to packages/twenty-website-new/src/sections/Testimonials/components/MountedTestimonialsPartnerVisual.tsxindex 4fb1f393951..b5ffc08e9c5 100644--- a/packages/twenty-website-new/src/sections/Testimonials/components/MountedTestimonialsVisuals.tsx+++ b/packages/twenty-website-new/src/sections/Testimonials/components/MountedTestimonialsPartnerVisual.tsx@@ -1,8 +1,7 @@'use client';import { WebGlMount } from '@/lib/visual-runtime';-import { Hourglass } from '@/sections/Testimonials/visuals/Hourglass';-import { Partner } from '@/sections/Testimonials/visuals/Partner';+import { Partner } from './Partner';import { theme } from '@/theme';import { styled } from '@linaria/react';@@ -20,16 +19,6 @@ const TestimonialsVisualFrame = styled.div`}`;-export function MountedTestimonialsHomeVisual() {- return (- <TestimonialsVisualFrame>- <WebGlMount>- <Hourglass />- </WebGlMount>- </TestimonialsVisualFrame>- );-}-export function MountedTestimonialsPartnerVisual() {return (<TestimonialsVisualFrame>diff --git a/packages/twenty-website-new/src/sections/Testimonials/visuals/Partner.tsx b/packages/twenty-website-new/src/sections/Testimonials/components/Partner.tsxsimilarity index 83%rename from packages/twenty-website-new/src/sections/Testimonials/visuals/Partner.tsxrename to packages/twenty-website-new/src/sections/Testimonials/components/Partner.tsxindex 6b3ba4aa968..f8a4b6e818f 100644--- a/packages/twenty-website-new/src/sections/Testimonials/visuals/Partner.tsx+++ b/packages/twenty-website-new/src/sections/Testimonials/components/Partner.tsx@@ -6,8 +6,9 @@ import {type HalftoneExportPose,type HalftoneStudioSettings,} from '@/lib/halftone';+import { useAsyncGeometry } from '@/lib/visual-runtime/hooks/use-async-geometry';import { styled } from '@linaria/react';-import { useEffect, useState } from 'react';+import { useCallback } from 'react';import * as THREE from 'three';const GLB_URL = '/illustrations/partner/testimonials/quote.glb';@@ -123,32 +124,11 @@ const PartnerFill = styled.div``;export function Partner() {- const [geometry, setGeometry] = useState<THREE.BufferGeometry | null>(null);-- useEffect(() => {- let cancelled = false;- let loadedGeometry: THREE.BufferGeometry | null = null;-- void loadImportedGeometryFromUrl('glb', GLB_URL, PARTNER_QUOTE_LABEL).then(- (nextGeometry) => {- if (cancelled) {- nextGeometry.dispose();- return;- }-- loadedGeometry = nextGeometry;- setGeometry(nextGeometry);- },- (error) => {- console.error(error);- },- );-- return () => {- cancelled = true;- loadedGeometry?.dispose();- };- }, []);+ const loadGeometry = useCallback(+ () => loadImportedGeometryFromUrl('glb', GLB_URL, PARTNER_QUOTE_LABEL),+ [],+ );+ const geometry = useAsyncGeometry(loadGeometry, [loadGeometry]);return (<PartnerFill>diff --git a/packages/twenty-website-new/src/sections/Testimonials/visuals/PartnerEffect.tsx b/packages/twenty-website-new/src/sections/Testimonials/components/PartnerEffect.tsxsimilarity index 88%rename from packages/twenty-website-new/src/sections/Testimonials/visuals/PartnerEffect.tsxrename to packages/twenty-website-new/src/sections/Testimonials/components/PartnerEffect.tsxindex 59b1c597206..b0367ddb2cc 100644--- a/packages/twenty-website-new/src/sections/Testimonials/visuals/PartnerEffect.tsx+++ b/packages/twenty-website-new/src/sections/Testimonials/components/PartnerEffect.tsx@@ -1,10 +1,11 @@'use client';import { HalftoneCanvas, type HalftoneStudioSettings } from '@/lib/halftone';+import { useAsyncImage } from '@/lib/visual-runtime/hooks/use-async-image';import { loadVisualImage } from '@/lib/visual-runtime';import { theme } from '@/theme';import { styled } from '@linaria/react';-import { useEffect, useRef, useState } from 'react';+import { useCallback, useEffect, useRef } from 'react';import * as THREE from 'three';const PARTNER_EFFECT_PREVIEW_DISTANCE = 4;@@ -138,9 +139,6 @@ type PartnerEffectProps = {};export function PartnerEffect({ alt, fallback, src }: PartnerEffectProps) {- const [imageElement, setImageElement] = useState<HTMLImageElement | null>(- null,- );const geometryReference = useRef<THREE.PlaneGeometry | null>(null);if (geometryReference.current === null) {@@ -156,27 +154,11 @@ export function PartnerEffect({ alt, fallback, src }: PartnerEffectProps) {};}, []);- useEffect(() => {- let cancelled = false;-- setImageElement(null);-- void loadVisualImage(src, { label: 'testimonial portrait' })- .then((image) => {- if (!cancelled) {- setImageElement(image);- }- })- .catch((error: unknown) => {- if (!cancelled) {- console.error(error);- }- });-- return () => {- cancelled = true;- };- }, [src]);+ const loadImage = useCallback(+ () => loadVisualImage(src, { label: 'testimonial portrait' }),+ [src],+ );+ const imageElement = useAsyncImage(loadImage, [loadImage]);return (<EffectFrame aria-label={alt} role="img">diff --git a/packages/twenty-website-new/src/sections/Testimonials/components/Root.tsx b/packages/twenty-website-new/src/sections/Testimonials/components/Root.tsxdeleted file mode 100644index fe2c15fb68e..00000000000--- a/packages/twenty-website-new/src/sections/Testimonials/components/Root.tsx+++ /dev/null@@ -1,67 +0,0 @@-import { Container } from '@/design-system/components';-import { TestimonialsShape } from '@/sections/Testimonials/components/TestimonialsShape';-import { theme } from '@/theme';-import { styled } from '@linaria/react';-import type { ReactNode } from 'react';--const StyledSection = styled.section`- min-width: 0;- overflow: hidden;- position: relative;- width: 100%;-`;--const BackgroundShape = styled.div`- bottom: 0;- left: 0;- pointer-events: none;- position: absolute;- right: 0;- top: 0;- z-index: 0;-`;--const StyledContainer = styled(Container)<{ $compactBottom: boolean }>`- padding-bottom: ${({ $compactBottom }) =>- $compactBottom ? theme.spacing(6) : theme.spacing(22)};- padding-left: ${theme.spacing(4)};- padding-right: ${theme.spacing(4)};- padding-top: ${theme.spacing(22)};- position: relative;- z-index: 1;-- @media (min-width: ${theme.breakpoints.md}px) {- padding-left: ${theme.spacing(10)};- padding-right: ${theme.spacing(10)};- padding-top: ${theme.spacing(25)};- padding-bottom: ${({ $compactBottom }) =>- $compactBottom ? theme.spacing(8) : theme.spacing(25)};- }-`;--type RootProps = {- backgroundColor: string;- children: ReactNode;- color: string;- compactBottom?: boolean;- shapeFillColor?: string;-};--export function Root({- backgroundColor,- children,- color,- compactBottom = false,- shapeFillColor = theme.colors.primary.background[100],-}: RootProps) {- return (- <StyledSection style={{ backgroundColor, color }}>- <BackgroundShape>- <TestimonialsShape fillColor={shapeFillColor} />- </BackgroundShape>- <StyledContainer $compactBottom={compactBottom}>- {children}- </StyledContainer>- </StyledSection>- );-}diff --git a/packages/twenty-website-new/src/sections/Testimonials/components/Carousel.tsx b/packages/twenty-website-new/src/sections/Testimonials/components/TestimonialsCarousel.tsxsimilarity index 82%rename from packages/twenty-website-new/src/sections/Testimonials/components/Carousel.tsxrename to packages/twenty-website-new/src/sections/Testimonials/components/TestimonialsCarousel.tsxindex 34d46ee05e3..909e7ed97ae 100644--- a/packages/twenty-website-new/src/sections/Testimonials/components/Carousel.tsx+++ b/packages/twenty-website-new/src/sections/Testimonials/components/TestimonialsCarousel.tsx@@ -1,14 +1,19 @@'use client';-import { Body, Eyebrow, Heading, IconButton } from '@/design-system/components';-import type { MessageEyebrow } from '@/lib/i18n/message-eyebrow';-import { useRenderMessage } from '@/lib/i18n/use-render-message';+import {+ Body,+ Eyebrow,+ Heading,+ HeadingPart,+ IconButton,+} from '@/design-system/components';import { ArrowLeftIcon, ArrowRightIcon } from '@/icons';-import type { TestimonialCardType } from '@/sections/Testimonials/types/TestimonialCard';+import type { TestimonialCardType } from '../types/types';import { theme } from '@/theme';+import { useLingui } from '@lingui/react';import { styled } from '@linaria/react';import { type ReactNode, useState } from 'react';-import { Separator } from './Separator';+import { Separator } from './TestimonialsSeparator';const StyledCarousel = styled.div`display: grid;@@ -50,9 +55,11 @@ const CounterSlot = styled.div`const VisualSlot = styled.div`align-self: start;justify-self: start;+ min-height: 279px;order: 2;@media (min-width: ${theme.breakpoints.md}px) {+ min-height: 476px;order: 1;}`;@@ -150,12 +157,12 @@ const AuthorBlock = styled.div`type CarouselProps = {children: ReactNode;- eyebrow: MessageEyebrow;+ eyebrow: ReactNode;testimonials: TestimonialCardType[];};export function Carousel({ children, eyebrow, testimonials }: CarouselProps) {- const renderText = useRenderMessage();+ const { i18n } = useLingui();const [index, setIndex] = useState(0);const total = testimonials.length;@@ -192,22 +199,19 @@ export function Carousel({ children, eyebrow, testimonials }: CarouselProps) {<Separator /><RightColumn>- <Eyebrow- colorScheme="primary"- heading={eyebrow.heading}- renderText={renderText}- />+ <Eyebrow colorScheme="primary">+ <HeadingPart fontFamily="sans">{eyebrow}</HeadingPart>+ </Eyebrow><HeadingContainer>- {testimonials.map((t, i) => (- <HeadingWrapper key={i} data-active={i === index}>- <Heading- as="h2"- renderText={renderText}- segments={t.heading}- size="md"- weight="light"- />+ {testimonials.map((testimonial, testimonialIndex) => (+ <HeadingWrapper+ key={testimonialIndex}+ data-active={testimonialIndex === index}+ >+ <Heading as="h2" size="md" weight="light">+ {i18n._(testimonial.heading)}+ </Heading></HeadingWrapper>))}</HeadingContainer>@@ -253,21 +257,13 @@ export function Carousel({ children, eyebrow, testimonials }: CarouselProps) {</NavGroup><AuthorBlock>- <Body- as="span"- body={current.author.name}- renderText={renderText}- size="sm"- weight="medium"- />+ <Body as="span" size="sm" weight="medium">+ {i18n._(current.author.name)}+ </Body>{authorSecondaryLine ? (- <Body- as="span"- body={authorSecondaryLine}- renderText={renderText}- size="xs"- weight="light"- />+ <Body as="span" size="xs" weight="light">+ {i18n._(authorSecondaryLine)}+ </Body>) : null}</AuthorBlock></FooterRow>diff --git a/packages/twenty-website-new/src/sections/Testimonials/components/PartnerCarousel.tsx b/packages/twenty-website-new/src/sections/Testimonials/components/TestimonialsPartnerCarousel.tsxsimilarity index 86%rename from packages/twenty-website-new/src/sections/Testimonials/components/PartnerCarousel.tsxrename to packages/twenty-website-new/src/sections/Testimonials/components/TestimonialsPartnerCarousel.tsxindex 528678df03e..a476f317e3c 100644--- a/packages/twenty-website-new/src/sections/Testimonials/components/PartnerCarousel.tsx+++ b/packages/twenty-website-new/src/sections/Testimonials/components/TestimonialsPartnerCarousel.tsx@@ -1,22 +1,22 @@'use client';-import { Body, Eyebrow, Heading, IconButton } from '@/design-system/components';-import type { MessageEyebrow } from '@/lib/i18n/message-eyebrow';-import { useRenderMessage } from '@/lib/i18n/use-render-message';+import { formatArticleDate } from '@/lib/articles/format-article-date';+import {+ Body,+ Eyebrow,+ Heading,+ HeadingPart,+ IconButton,+} from '@/design-system/components';import { ArrowLeftIcon, ArrowRightIcon } from '@/icons';-import { PartnerEffect } from '@/sections/Testimonials/visuals/PartnerEffect';-import type { TestimonialCardType } from '@/sections/Testimonials/types/TestimonialCard';+import { PartnerEffect } from './PartnerEffect';+import type { TestimonialCardType } from '../types/types';import { theme } from '@/theme';import { css } from '@linaria/core';import { styled } from '@linaria/react';+import { useLingui } from '@lingui/react';import { type ReactNode, useState } from 'react';-import { Separator } from './Separator';--const DATE_FORMATTER = new Intl.DateTimeFormat('en-US', {- day: 'numeric',- month: 'long',- year: 'numeric',-});+import { Separator } from './TestimonialsSeparator';const nameTextClassName = css`&&& {@@ -34,13 +34,8 @@ const dateTextClassName = css`color: ${theme.colors.secondary.text[80]};`;-const quoteHeadingClassName = css`- color: ${theme.colors.secondary.text[100]};- position: relative;- z-index: 1;-`;-const StyledCarousel = styled.div`+ --color-text-muted: ${theme.colors.secondary.text[80]};display: grid;grid-template-columns: minmax(0, 1fr);position: relative;@@ -156,6 +151,12 @@ const QuoteArea = styled.div`}`;+const quoteHeadingClassName = css`+ color: ${theme.colors.secondary.text[100]};+ position: relative;+ z-index: 1;+`;+const QuoteStack = styled.div`display: grid;min-width: 0;@@ -222,7 +223,7 @@ const NavGroup = styled.div`type PartnerCarouselProps = {children?: ReactNode;- eyebrow: MessageEyebrow;+ eyebrow: ReactNode;testimonials: TestimonialCardType[];};@@ -231,7 +232,7 @@ export function PartnerCarousel({eyebrow,testimonials,}: PartnerCarouselProps) {- const renderText = useRenderMessage();+ const { i18n } = useLingui();const [index, setIndex] = useState(0);const total = testimonials.length;@@ -250,7 +251,7 @@ export function PartnerCarousel({};const avatar = current.author.avatar;- const authorName = renderText(current.author.name.text);+ const authorName = i18n._(current.author.name);const authorInitials = authorName.split(/\s+/).map((word) => word[0])@@ -285,26 +286,22 @@ export function PartnerCarousel({<NameHandleRow><Bodyas="span"- body={current.author.name}className={nameTextClassName}- renderText={renderText}size="sm"weight="medium"- />+ >+ {i18n._(current.author.name)}+ </Body><HandleText>- <Body- as="span"- body={current.author.designation}- className={handleTextClassName}- renderText={renderText}- size="sm"- />+ <Body as="span" className={handleTextClassName} size="sm">+ {i18n._(current.author.designation)}+ </Body></HandleText></NameHandleRow>{current.author.date ? (<p className={dateTextClassName}>- {DATE_FORMATTER.format(current.author.date)}+ {formatArticleDate(current.author.date!)}</p>) : null}</AuthorMeta>@@ -318,11 +315,9 @@ export function PartnerCarousel({<Separator colorScheme="secondary" /><RightColumn>- <Eyebrow- colorScheme="secondary"- heading={eyebrow.heading}- renderText={renderText}- />+ <Eyebrow colorScheme="secondary">+ <HeadingPart fontFamily="sans">{eyebrow}</HeadingPart>+ </Eyebrow><QuoteArea><QuoteStack>@@ -334,11 +329,11 @@ export function PartnerCarousel({<Headingas="h2"className={quoteHeadingClassName}- renderText={renderText}- segments={testimonial.heading}size="md"weight="light"- />+ >+ {i18n._(testimonial.heading)}+ </Heading></QuoteWrapper>))}</QuoteStack>diff --git a/packages/twenty-website-new/src/sections/Testimonials/components/Separator.tsx b/packages/twenty-website-new/src/sections/Testimonials/components/TestimonialsSeparator.tsxsimilarity index 100%rename from packages/twenty-website-new/src/sections/Testimonials/components/Separator.tsxrename to packages/twenty-website-new/src/sections/Testimonials/components/TestimonialsSeparator.tsxdiff --git a/packages/twenty-website-new/src/sections/Testimonials/components/TestimonialsShape.tsx b/packages/twenty-website-new/src/sections/Testimonials/components/TestimonialsShape.tsxdeleted file mode 100644index 7a508699b96..00000000000--- a/packages/twenty-website-new/src/sections/Testimonials/components/TestimonialsShape.tsx+++ /dev/null@@ -1,45 +0,0 @@-const TESTIMONIALS_SHAPE_PATH =- 'M0 4a4 4 0 0 1 4-4h344.32c4.197 0 8.369.66 12.361 1.958l49.5 16.084A40 40 0 0 0 422.542 20h517.7c4.293 0 8.559-.691 12.633-2.047l47.785-15.906A40 40 0 0 1 1013.29 0H1356a4 4 0 0 1 4 4v16H0z';--type TestimonialsShapeProps = {- fillColor: string;-};--export function TestimonialsShape({ fillColor }: TestimonialsShapeProps) {- return (- <div- aria-hidden- style={{- width: '100%',- height: '100%',- position: 'absolute',- inset: 0,- pointerEvents: 'none',- }}- >- <svg- width="100%"- height="20"- viewBox="0 0 1360 20"- fill="none"- xmlns="http://www.w3.org/2000/svg"- preserveAspectRatio="none"- style={{ display: 'block' }}- >- <path d={TESTIMONIALS_SHAPE_PATH} fill={fillColor} />- </svg>- <div- style={{- position: 'absolute',- top: 19,- bottom: 0,- left: 0,- right: 0,- backgroundColor: fillColor,- borderBottomLeftRadius: 4,- borderBottomRightRadius: 4,- }}- />- </div>- );-}diff --git a/packages/twenty-website-new/src/sections/Testimonials/components/index.ts b/packages/twenty-website-new/src/sections/Testimonials/components/index.tsdeleted file mode 100644index af4fa4b531a..00000000000--- a/packages/twenty-website-new/src/sections/Testimonials/components/index.ts+++ /dev/null@@ -1,17 +0,0 @@-import { Carousel } from './Carousel';-import {- MountedTestimonialsHomeVisual,- MountedTestimonialsPartnerVisual,-} from './MountedTestimonialsVisuals';-import { PartnerCarousel } from './PartnerCarousel';-import { Root } from './Root';-import { Separator } from './Separator';--export const Testimonials = {- Carousel,- HomeVisual: MountedTestimonialsHomeVisual,- PartnerCarousel,- PartnerVisual: MountedTestimonialsPartnerVisual,- Root,- Separator,-};diff --git a/packages/twenty-website-new/src/sections/Testimonials/visuals/HourglassCanvas.tsx b/packages/twenty-website-new/src/sections/Testimonials/hooks/use-hourglass-canvas.tssimilarity index 90%rename from packages/twenty-website-new/src/sections/Testimonials/visuals/HourglassCanvas.tsxrename to packages/twenty-website-new/src/sections/Testimonials/hooks/use-hourglass-canvas.tsindex aa508c8dcb7..d0fb450c9c8 100644--- a/packages/twenty-website-new/src/sections/Testimonials/visuals/HourglassCanvas.tsx+++ b/packages/twenty-website-new/src/sections/Testimonials/hooks/use-hourglass-canvas.ts@@ -1,8 +1,7 @@'use client';import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment.js';-import { styled } from '@linaria/react';-import { useEffect, useRef } from 'react';+import { useEffect, type RefObject } from 'react';import * as THREE from 'three';import { observeElementSize } from '@/lib/dom/observe-element-size';import {@@ -12,78 +11,10 @@ import {type VisualRenderLoopFrame,} from '@/lib/visual-runtime';-interface HourglassLightingSettings {- intensity: number;- fillIntensity: number;- ambientIntensity: number;- angleDegrees: number;- height: number;-}--interface HourglassMaterialSettings {- roughness: number;- metalness: number;-}--interface HourglassEffectSettings {- enabled: boolean;- numRows: number;- contrast: number;- power: number;- shading: number;- baseInk: number;- maxBar: number;- rowMerge: number;- cellRatio: number;- cutoff: number;- highlightOpen: number;- shadowGrouping: number;- shadowCrush: number;- dashColor: string;-}--interface HourglassAnimationSettings {- autoRotateEnabled: boolean;- followHoverEnabled: boolean;- followDragEnabled: boolean;- rotateEnabled: boolean;- autoSpeed: number;- autoWobble: number;- hoverRange: number;- hoverEase: number;- hoverReturn: boolean;- dragSens: number;- dragFriction: number;- dragMomentum: boolean;- rotateAxis: 'x' | 'y' | 'z' | 'xy' | '-x' | '-y' | '-z' | '-xy';- rotatePreset: 'axis' | 'lissajous' | 'orbit' | 'tumble';- rotateSpeed: number;- rotatePingPong: boolean;- waveEnabled: boolean;- waveSpeed: number;- waveAmount: number;-}--interface HourglassSettings {- lighting: HourglassLightingSettings;- material: HourglassMaterialSettings;- halftone: HourglassEffectSettings;- background: {- color: string;- };- animation: HourglassAnimationSettings;-}+import type { HourglassPose } from '../types/hourglass-pose';+import type { HourglassSettings } from '../types/hourglass-settings';-interface HourglassPose {- autoElapsed: number;- rotateElapsed: number;- rotationX: number;- rotationY: number;- rotationZ: number;- targetRotationX: number;- targetRotationY: number;- timeElapsed: number;-}+export type { HourglassPose, HourglassSettings };const VIRTUAL_RENDER_HEIGHT = 768;const REFERENCE_PREVIEW_DISTANCE = 4;@@ -295,31 +226,21 @@ function createInteractionState(initialPose?: Partial<HourglassPose>) {};}-const CanvasMount = styled.div<{ $background: string }>`- background: ${(props) => props.$background};- display: block;- height: 100%;- min-width: 0;- width: 100%;-`;--type HourglassCanvasProps = {- geometry: THREE.BufferGeometry;- initialPose?: Partial<HourglassPose>;- previewDistance: number;- settings: HourglassSettings;-};--export function HourglassCanvas({+export function useHourglassCanvas({geometry,initialPose,+ mountRef,previewDistance,settings,-}: HourglassCanvasProps) {- const mountReference = useRef<HTMLDivElement>(null);-+}: {+ geometry: THREE.BufferGeometry;+ initialPose?: Partial<HourglassPose>;+ mountRef: RefObject<HTMLDivElement | null>;+ previewDistance: number;+ settings: HourglassSettings;+}) {useEffect(() => {- const container = mountReference.current;+ const container = mountRef.current;if (!container) {return;@@ -775,9 +696,5 @@ export function HourglassCanvas({container.removeChild(canvas);}};- }, [geometry, initialPose, previewDistance, settings]);-- return (- <CanvasMount $background={settings.background.color} ref={mountReference} />- );+ }, [geometry, initialPose, mountRef, previewDistance, settings]);}diff --git a/packages/twenty-website-new/src/sections/Testimonials/index.ts b/packages/twenty-website-new/src/sections/Testimonials/index.tsnew file mode 100644index 00000000000..fd912fdd5e4--- /dev/null+++ b/packages/twenty-website-new/src/sections/Testimonials/index.ts@@ -0,0 +1,2 @@+export { Testimonials } from './Testimonials';+export type { TestimonialCardType } from './types/types';diff --git a/packages/twenty-website-new/src/sections/Testimonials/types/TestimonialAuthor.ts b/packages/twenty-website-new/src/sections/Testimonials/types/TestimonialAuthor.tsdeleted file mode 100644index 54dd6436351..00000000000--- a/packages/twenty-website-new/src/sections/Testimonials/types/TestimonialAuthor.ts+++ /dev/null@@ -1,11 +0,0 @@-import type { MessageBody } from '@/lib/i18n/message-body';--export type TestimonialAuthorType = {- name: MessageBody;- designation: MessageBody;- avatar?: {- src: string;- alt?: string;- };- date?: Date;-};diff --git a/packages/twenty-website-new/src/sections/Testimonials/types/TestimonialCard.ts b/packages/twenty-website-new/src/sections/Testimonials/types/TestimonialCard.tsdeleted file mode 100644index e5276fc9df3..00000000000--- a/packages/twenty-website-new/src/sections/Testimonials/types/TestimonialCard.ts+++ /dev/null@@ -1,7 +0,0 @@-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';-import type { TestimonialAuthorType } from '@/sections/Testimonials/types/TestimonialAuthor';--export type TestimonialCardType = {- heading: MessageHeadingSegment;- author: TestimonialAuthorType;-};diff --git a/packages/twenty-website-new/src/sections/Testimonials/types/TestimonialsData.ts b/packages/twenty-website-new/src/sections/Testimonials/types/TestimonialsData.tsdeleted file mode 100644index d3725163355..00000000000--- a/packages/twenty-website-new/src/sections/Testimonials/types/TestimonialsData.ts+++ /dev/null@@ -1,7 +0,0 @@-import type { MessageEyebrow } from '@/lib/i18n/message-eyebrow';-import type { TestimonialCardType } from '@/sections/Testimonials/types/TestimonialCard';--export type TestimonialsDataType = {- eyebrow: MessageEyebrow;- testimonials: TestimonialCardType[];-};diff --git a/packages/twenty-website-new/src/sections/Testimonials/types/hourglass-pose.ts b/packages/twenty-website-new/src/sections/Testimonials/types/hourglass-pose.tsnew file mode 100644index 00000000000..b112569f021--- /dev/null+++ b/packages/twenty-website-new/src/sections/Testimonials/types/hourglass-pose.ts@@ -0,0 +1,10 @@+export interface HourglassPose {+ autoElapsed: number;+ rotateElapsed: number;+ rotationX: number;+ rotationY: number;+ rotationZ: number;+ targetRotationX: number;+ targetRotationY: number;+ timeElapsed: number;+}diff --git a/packages/twenty-website-new/src/sections/Testimonials/types/hourglass-settings.ts b/packages/twenty-website-new/src/sections/Testimonials/types/hourglass-settings.tsnew file mode 100644index 00000000000..fefac850dca--- /dev/null+++ b/packages/twenty-website-new/src/sections/Testimonials/types/hourglass-settings.ts@@ -0,0 +1,53 @@+export interface HourglassSettings {+ lighting: {+ intensity: number;+ fillIntensity: number;+ ambientIntensity: number;+ angleDegrees: number;+ height: number;+ };+ material: {+ roughness: number;+ metalness: number;+ };+ halftone: {+ enabled: boolean;+ numRows: number;+ contrast: number;+ power: number;+ shading: number;+ baseInk: number;+ maxBar: number;+ rowMerge: number;+ cellRatio: number;+ cutoff: number;+ highlightOpen: number;+ shadowGrouping: number;+ shadowCrush: number;+ dashColor: string;+ };+ background: {+ color: string;+ };+ animation: {+ autoRotateEnabled: boolean;+ followHoverEnabled: boolean;+ followDragEnabled: boolean;+ rotateEnabled: boolean;+ autoSpeed: number;+ autoWobble: number;+ hoverRange: number;+ hoverEase: number;+ hoverReturn: boolean;+ dragSens: number;+ dragFriction: number;+ dragMomentum: boolean;+ rotateAxis: 'x' | 'y' | 'z' | 'xy' | '-x' | '-y' | '-z' | '-xy';+ rotatePreset: 'axis' | 'lissajous' | 'orbit' | 'tumble';+ rotateSpeed: number;+ rotatePingPong: boolean;+ waveEnabled: boolean;+ waveSpeed: number;+ waveAmount: number;+ };+}diff --git a/packages/twenty-website-new/src/sections/Testimonials/types/index.ts b/packages/twenty-website-new/src/sections/Testimonials/types/index.tsdeleted file mode 100644index 0b2599ad81a..00000000000--- a/packages/twenty-website-new/src/sections/Testimonials/types/index.ts+++ /dev/null@@ -1 +0,0 @@-export type { TestimonialsDataType } from './TestimonialsData';diff --git a/packages/twenty-website-new/src/sections/Testimonials/types/types.ts b/packages/twenty-website-new/src/sections/Testimonials/types/types.tsnew file mode 100644index 00000000000..6f6f938affa--- /dev/null+++ b/packages/twenty-website-new/src/sections/Testimonials/types/types.ts@@ -0,0 +1,16 @@+import type { MessageDescriptor } from '@lingui/core';++type TestimonialAuthorType = {+ name: MessageDescriptor;+ designation: MessageDescriptor;+ avatar?: {+ src: string;+ alt?: string;+ };+ date?: Date;+};++export type TestimonialCardType = {+ heading: MessageDescriptor;+ author: TestimonialAuthorType;+};diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/FeatureCard.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/FeatureCard.tsxindex 339e4ea5f15..d3f093eceaa 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/FeatureCard.tsx+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/FeatureCard.tsx@@ -1,17 +1,17 @@'use client';-import { Body, Heading } from '@/design-system/components';+import { Body, Heading, HeadingPart } from '@/design-system/components';import { FastPathIcon, LiveDataIcon } from '@/icons';-import { useRenderMessage } from '@/lib/i18n/use-render-message';import type { ThreeCardsFeatureCardType } from '@/sections/ThreeCards/types';import { theme } from '@/theme';+import { useLingui } from '@lingui/react';import { styled } from '@linaria/react';import { IconUsersGroup } from '@tabler/icons-react';import Image from 'next/image';import { type ReactNode, useRef, useState } from 'react';-import { FamiliarInterfaceVisual } from './FamiliarInterfaceVisual';-import { FastPathVisual } from './FastPathVisual';-import { LiveDataVisual } from './LiveDataVisual';+import { FamiliarInterfaceVisual } from './components/FamiliarInterfaceVisual';+import { FastPathVisual } from './components/FastPathVisual';+import { LiveDataVisual } from './components/LiveDataVisual';const FeatureCardContainer = styled.div`display: grid;@@ -133,7 +133,7 @@ function renderFeatureCardIcon(icon: ThreeCardsFeatureCardType['icon']) {}export function FeatureCard({ featureCard }: FeatureCardProps) {- const renderText = useRenderMessage();+ const { i18n } = useLingui();const [isHovered, setIsHovered] = useState(false);const imageFrameRef = useRef<HTMLDivElement>(null);let visual: ReactNode;@@ -177,6 +177,7 @@ export function FeatureCard({ featureCard }: FeatureCardProps) {src={featureCard.image.src}alt={featureCard.image.alt}fill+ sizes="(max-width: 768px) 100vw, 411px"style={{ objectFit: 'cover' }}/>);@@ -198,21 +199,16 @@ export function FeatureCard({ featureCard }: FeatureCardProps) {<CardTitleRow><CardIcon>{renderFeatureCardIcon(featureCard.icon)}</CardIcon><CardTitleWrap>- <Heading- as="h3"- renderText={renderText}- segments={featureCard.heading}- size="xs"- weight="medium"- />+ <Heading as="h3" size="xs" weight="medium">+ <HeadingPart fontFamily="sans">+ {i18n._(featureCard.heading)}+ </HeadingPart>+ </Heading></CardTitleWrap></CardTitleRow>- <Body- body={featureCard.body}- renderText={renderText}- size="sm"- weight="regular"- />+ <Body size="sm" weight="regular">+ {i18n._(featureCard.body)}+ </Body></CardContent></FeatureCardContainer>);diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/LiveDataVisual.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/LiveDataVisual.tsxdeleted file mode 100644index c6f0976662d..00000000000--- a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/LiveDataVisual.tsx+++ /dev/null@@ -1,1088 +0,0 @@-'use client';--import { createAnimationFrameLoop } from '@/lib/animation';-import { useTimeoutRegistry } from '@/lib/react';-import { WebGlMount } from '@/lib/visual-runtime';-import { useScaleToFit } from '@/sections/ThreeCards/utils/use-scale-to-fit';-import { theme } from '@/theme';-import { styled } from '@linaria/react';-import {- IconChevronDown,- IconHeartHandshake,- IconList,- IconPlus,- IconUser,- IconX,-} from '@tabler/icons-react';-import { type RefObject, useEffect, useRef, useState } from 'react';-import { LiveDataGradientBackdrop } from './LiveDataGradientBackdrop';-import { LiveDataHeroTable } from './LiveDataHeroTable';--const APP_FONT = `'Inter', ${theme.font.family.sans}`;-const SCENE_HEIGHT = 508;-const SCENE_WIDTH = 411;-const TABLE_PANEL_HOVER_SCALE = 1.012;-const TABLER_STROKE = 1.65;-const FILTER_ICON_STROKE = 1.33;-const FILTER_ROW_GAP = 4;-const BOB_READY_CURSOR_ROTATION = 135;-const MARKER_CURSOR_HEIGHT = 32;-const MARKER_CURSOR_WIDTH = 29;-const BOB_MARKER_LEFT = 196;-const BOB_MARKER_TOP = 372;-const BOB_ARROW_LEFT_OFFSET = 20;-const DEFAULT_ADD_FILTER_LEFTS = {- docked: 152,- parked: 276,-};--const COLORS = {- backdrop: '#1b1b1b',- black: '#1f1f1f',- bobCursor: '#EDB7FF',- blue: '#1961ed',- blueBorder: '#edf2fe',- blueSurface: '#f5f9fd',- green: '#18794e',- greenSurface: '#ddf3e4',- muted: '#999999',- orange: '#ffb08d',- purple: '#7869ff',- text: '#333333',- textLight: '#b3b3b3',- textSecondary: '#666666',- white: '#ffffff',- yellow: '#fff6a5',-} as const;--type AliceReturnPhase = 'return-to-start';-type BobLiveDataPhase =- | 'bob-ready'- | 'move-to-filter'- | 'remove-filter'- | 'return-bob';--type LiveDataPhase =- | 'idle'- | 'move-to-tag'- | 'rename-tag'- | AliceReturnPhase- | BobLiveDataPhase- | 'settle';--const LIVE_DATA_SEQUENCE: Array<{- delay: number;- phase: Exclude<LiveDataPhase, 'idle'>;-}> = [- { delay: 0, phase: 'move-to-tag' },- { delay: 760, phase: 'rename-tag' },- { delay: 1700, phase: 'return-to-start' },- { delay: 2380, phase: 'bob-ready' },- { delay: 2620, phase: 'move-to-filter' },- { delay: 3260, phase: 'remove-filter' },- { delay: 3900, phase: 'return-bob' },- { delay: 4680, phase: 'settle' },-];--const EDITED_TAG_LABEL = 'Priority';-const TYPING_STEP_MS = 90;-const ALICE_IDLE_MARKER = { left: 238, rotation: 0, top: 90 };-const BOB_READY_MARKER = {- bottom: SCENE_HEIGHT - (BOB_MARKER_TOP + MARKER_CURSOR_HEIGHT / 2),- right:- SCENE_WIDTH -- (BOB_MARKER_LEFT + BOB_ARROW_LEFT_OFFSET + MARKER_CURSOR_WIDTH / 2),- rotation: BOB_READY_CURSOR_ROTATION,-};-const BOB_FILTER_CURSOR_ROTATION = 132;-const BOB_FILTER_MARKER = {- bottom: 301,- right: 50,- rotation: BOB_FILTER_CURSOR_ROTATION,-};--const ALICE_MARKER_POSITIONS: Record<- LiveDataPhase,- { left: number; rotation: number; top: number }-> = {- idle: ALICE_IDLE_MARKER,- 'move-to-tag': { left: 286, rotation: -38, top: 246 },- 'rename-tag': { left: 279, rotation: -18, top: 247 },- 'return-to-start': ALICE_IDLE_MARKER,- 'bob-ready': ALICE_IDLE_MARKER,- 'move-to-filter': ALICE_IDLE_MARKER,- 'remove-filter': ALICE_IDLE_MARKER,- 'return-bob': ALICE_IDLE_MARKER,- settle: ALICE_IDLE_MARKER,-};--const VisualRoot = styled.div`- background: ${COLORS.backdrop};- height: 100%;- overflow: hidden;- position: relative;- width: 100%;-`;--const SceneViewport = styled.div<{ $sceneScale: number }>`- /*- * Fixed 411 × 508 design box. The previous "width: 101%; top: 0; bottom: 0"- * sizing made the viewport responsive AND we then applied a scale on top —- * a double-responsive coupling that shrank the visual quadratically with- * card width and made absolute-positioned children (TablePanel etc.) drift- * around as the card resized. Locking the box to design size means inner- * content lives in a stable 411 × 508 coordinate system; only the single- * uniform scale changes with the card.- */- height: ${SCENE_HEIGHT}px;- left: 50%;- position: absolute;- top: 0;- transform: translateX(-50%) scale(${({ $sceneScale }) => $sceneScale});- transform-origin: top center;- width: ${SCENE_WIDTH}px;-`;--const SceneFrame = styled.div`- border-radius: 2px;- height: 100%;- overflow: hidden;- position: relative;- width: 100%;-`;--const SceneBackdrop = styled.div<{- $backgroundImageRotationDeg?: number;-}>`- background-color: ${COLORS.backdrop};- inset: 0;- pointer-events: none;- position: absolute;-`;--const SceneContent = styled.div`- inset: 16px 0 0;- position: absolute;- width: 100%;-`;--const TablePanel = styled.div<{ $active?: boolean }>`- backface-visibility: hidden;- background: ${COLORS.white};- border-top-left-radius: 8px;- box-shadow: ${({ $active }) =>- $active- ? '0 0 0 1px rgba(241, 241, 241, 0.9), 0 14px 28px rgba(15, 23, 42, 0.08)'- : '0 0 0 1px rgba(241, 241, 241, 0.9)'};- contain: paint;- display: grid;- grid-template-rows: auto auto minmax(0, 1fr);- height: 376px;- bottom: -4px;- overflow: hidden;- position: absolute;- right: 0px;- transform: ${({ $active }) =>- `translate3d(0, 0, 0) scale(${$active ? TABLE_PANEL_HOVER_SCALE : 1})`};- transform-origin: bottom right;- transition:- box-shadow 260ms cubic-bezier(0.22, 1, 0.36, 1),- transform 260ms cubic-bezier(0.22, 1, 0.36, 1);- will-change: transform, box-shadow;- width: 355px;-`;--const ViewRow = styled.div`- align-items: center;- border-bottom: 1px solid #f1f1f1;- display: flex;- height: 40px;- padding: 0 8px;-`;--const ViewSwitcher = styled.div`- align-items: center;- border-radius: 4px;- cursor: pointer;- display: inline-flex;- gap: 4px;- height: 24px;- padding: 0 4px;- transition: background-color 120ms ease;-- &:hover {- background: rgba(0, 0, 0, 0.04);- }-`;--const ViewSwitcherLeft = styled.div`- align-items: center;- display: inline-flex;- gap: 4px;- height: 100%;-`;--const ViewSwitcherIcon = styled.span`- align-items: center;- display: inline-flex;- flex: 0 0 auto;- height: 16px;- justify-content: center;- width: 16px;-`;--const ViewLabel = styled.span`- color: ${COLORS.textSecondary};- font-family: ${APP_FONT};- font-size: 13px;- font-weight: ${theme.font.weight.medium};- line-height: 1.4;- white-space: nowrap;-`;--const ViewDot = styled.div`- background: ${COLORS.textLight};- border-radius: 999px;- height: 2px;- width: 2px;-`;--const ViewCount = styled.span`- color: ${COLORS.textLight};- font-family: ${APP_FONT};- font-size: 13px;- font-weight: ${theme.font.weight.medium};- line-height: 1.4;- white-space: nowrap;-`;--const ViewSwitcherChevron = styled.span`- align-items: center;- display: inline-flex;- flex: 0 0 auto;- height: 14px;- justify-content: center;- width: 14px;-`;--const FilterRow = styled.div`- align-items: center;- border-bottom: 1px solid #f1f1f1;- display: flex;- gap: ${FILTER_ROW_GAP}px;- height: 48px;- padding: 0 12px;- position: relative;-`;--const FilterChipMotion = styled.div<{ $removing?: boolean; $visible: boolean }>`- display: inline-flex;- max-width: ${({ $visible }) => ($visible ? '172px' : '0')};- opacity: ${({ $removing, $visible }) => ($visible || $removing ? 1 : 0)};- overflow: ${({ $removing }) => ($removing ? 'visible' : 'hidden')};- pointer-events: ${({ $removing, $visible }) =>- $visible && !$removing ? 'auto' : 'none'};- transform: ${({ $removing, $visible }) =>- $visible || $removing- ? 'translateX(0) scale(1)'- : 'translateX(-8px) scale(0.92)'};- transform-origin: right center;- transition:- max-width 280ms cubic-bezier(0.22, 1, 0.36, 1)- ${({ $removing }) => ($removing ? '180ms' : '0ms')},- opacity 180ms ease ${({ $removing }) => ($removing ? '180ms' : '0ms')},- transform 280ms cubic-bezier(0.22, 1, 0.36, 1)- ${({ $removing }) => ($removing ? '180ms' : '0ms')};- white-space: nowrap;-`;--const FilterChip = styled.div<{ $pressed?: boolean; $removing?: boolean }>`- align-items: center;- background: ${COLORS.blueSurface};- border: 1px solid ${COLORS.blueBorder};- border-radius: 4px;- box-shadow: ${({ $pressed }) =>- $pressed ? 'inset 0 0 0 1px rgba(25, 97, 237, 0.08)' : 'none'};- color: ${COLORS.blue};- display: inline-flex;- font-family: ${APP_FONT};- font-size: 12px;- gap: 2px;- height: 24px;- line-height: 1.4;- padding: 2px 2px 2px 4px;- opacity: 1;- transform: ${({ $pressed }) => ($pressed ? 'scale(0.985)' : 'scale(1)')};- transition:- box-shadow 180ms ease,- transform 180ms ease;- white-space: nowrap;-- animation: ${({ $removing }) =>- $removing- ? 'employees-filter-pop-away 320ms cubic-bezier(0.18, 1, 0.32, 1) forwards'- : 'none'};- transform-origin: right center;- will-change: opacity, transform;-- @keyframes employees-filter-pop-away {- 0% {- opacity: 1;- transform: scale(0.985) translate3d(0, 0, 0);- }-- 36% {- opacity: 1;- transform: scale(1.08) translate3d(2px, -1px, 0);- }-- 100% {- opacity: 0;- transform: scale(0.64) translate3d(18px, -6px, 0);- }- }-- @media (prefers-reduced-motion: reduce) {- /* Snap-hide the chip when removing — animation-end still fires (the- parent uses it as the removal signal) but the decorative pop is- collapsed to a single frame. */- animation-duration: 1ms;- animation-timing-function: linear;- }-`;--const FilterChipLabel = styled.span`- align-items: center;- display: inline-flex;- gap: 4px;-`;--const FilterChipIcon = styled.span`- align-items: center;- display: inline-flex;- flex: 0 0 auto;- height: 14px;- justify-content: center;- width: 14px;-`;--const FilterName = styled.span`- font-size: 12px;- line-height: 1.4;- font-weight: ${theme.font.weight.medium};-`;--const FilterValue = styled.span`- font-size: 12px;- line-height: 1.4;- font-weight: ${theme.font.weight.regular};-`;--const FilterCloseButton = styled.button<{ $pressed?: boolean }>`- align-items: center;- background: ${({ $pressed }) =>- $pressed ? 'rgba(25, 97, 237, 0.08)' : 'transparent'};- border: 0;- border-radius: 2px;- color: ${COLORS.blue};- cursor: pointer;- display: inline-flex;- flex: 0 0 auto;- height: 20px;- justify-content: center;- padding: 0;- transition: background-color 140ms ease;- width: 20px;-- &:hover {- background: ${({ $pressed }) =>- $pressed ? 'rgba(25, 97, 237, 0.08)' : 'rgba(25, 97, 237, 0.06)'};- }-- &:focus-visible {- background: rgba(25, 97, 237, 0.06);- outline: none;- }-`;--const AddFilter = styled.button`- align-items: center;- background: transparent;- border: 0;- border-radius: 4px;- color: ${COLORS.muted};- cursor: pointer;- display: inline-flex;- font-family: ${APP_FONT};- font-size: 13px;- font-weight: ${theme.font.weight.regular};- gap: 4px;- height: 24px;- line-height: 1.4;- margin-left: 1px;- padding: 0 8px;- transition: background-color 120ms ease;- white-space: nowrap;-- &:hover {- background: rgba(0, 0, 0, 0.04);- }-`;--const FloatingAddFilter = styled(AddFilter)<{- $animated: boolean;- $left: number;-}>`- left: ${({ $left }) => `${$left}px`};- margin-left: 0;- position: absolute;- top: 50%;- transform: translateY(-50%);- transition: ${({ $animated }) =>- $animated ? 'left 340ms cubic-bezier(0.22, 1, 0.36, 1)' : 'none'};-`;--const TableBodyArea = styled.div`- min-height: 0;- min-width: 0;- overflow: hidden;-`;--const MarkerText = styled.span`- color: ${COLORS.black};- font-family: ${theme.font.family.mono};- font-size: 20px;- font-weight: ${theme.font.weight.medium};- line-height: 17.011px;- text-transform: uppercase;-`;--const CursorGlyph = styled.svg<{- $height: number;- $rotation: number;- $width: number;-}>`- display: block;- filter: drop-shadow(0 2px 4px rgba(28, 28, 28, 0.12));- height: ${({ $height }) => `${$height}px`};- transform: ${({ $rotation }) => `rotate(${$rotation}deg)`};- transform-origin: center;- transition: transform 140ms ease;- width: ${({ $width }) => `${$width}px`};-`;--const AnimatedMarkerGroup = styled.div<{- $left: number;- $top: number;-}>`- left: ${({ $left }) => `${$left}px`};- pointer-events: none;- position: absolute;- top: ${({ $top }) => `${$top}px`};- transition:- left 620ms cubic-bezier(0.22, 1, 0.36, 1),- top 620ms cubic-bezier(0.22, 1, 0.36, 1);- z-index: 9;-`;--const AnchoredMarkerGroup = styled.div<{- $bottom: number;- $right: number;-}>`- bottom: ${({ $bottom }) => `${$bottom}px`};- pointer-events: none;- position: absolute;- right: ${({ $right }) => `${$right}px`};- transition:- bottom 620ms cubic-bezier(0.22, 1, 0.36, 1),- right 620ms cubic-bezier(0.22, 1, 0.36, 1);- z-index: 9;-`;--const MarkerCursorSlot = styled.div<{- $pressed?: boolean;- $visible?: boolean;-}>`- animation: ${({ $pressed, $visible }) =>- $pressed && $visible- ? 'cursor-pop 240ms cubic-bezier(0.22, 1, 0.36, 1)'- : 'none'};- left: 0;- opacity: ${({ $visible = true }) => ($visible ? 1 : 0)};- position: absolute;- top: 0;- transform: translate(-50%, -50%) scale(1);- transition:- opacity 180ms ease,- transform 140ms ease;-- @keyframes cursor-pop {- 0% {- transform: translate(-50%, -50%) scale(1);- }-- 38% {- transform: translate(-50%, -50%) scale(1.16);- }-- 68% {- transform: translate(-50%, -50%) scale(0.93);- }-- 100% {- transform: translate(-50%, -50%) scale(1);- }- }-- @media (prefers-reduced-motion: reduce) {- animation: none;- }-`;--const MarkerLabelTop = styled.div`- left: 0;- position: absolute;- top: 0;- transform: translate(-50%, calc(-100% - 24px));- z-index: 10;-`;--const MarkerLabelBottom = styled.div`- left: 0;- position: absolute;- top: 0;- transform: translate(-50%, 26px);- z-index: 10;-`;--const AliceLabel = styled.div`- align-items: center;- background: ${COLORS.yellow};- border-radius: 4px;- display: inline-flex;- height: 38px;- justify-content: center;- min-width: 86px;- padding: 0 12px;-`;--const TomMarker = styled.div`- left: 31px;- pointer-events: auto;- position: absolute;- top: 271px;- height: 112px;- width: 92px;- z-index: 8;-`;--const TomMarkerMotion = styled.div<{ $hovered: boolean }>`- align-items: flex-start;- display: flex;- flex-direction: column;- gap: 10px;- transform: ${({ $hovered }) =>- $hovered ? 'translate3d(12px, -14px, 0)' : 'translate3d(0, 0, 0)'};- transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);- width: 60px;- will-change: transform;-`;--const TomArrow = styled.div`- align-self: flex-end;- align-items: center;- display: flex;- height: 41px;- justify-content: center;- width: 38px;- z-index: 2;-`;--const TomLabel = styled.div`- align-items: center;- background: ${COLORS.orange};- border-radius: 4px;- box-sizing: border-box;- display: inline-flex;- height: 38px;- justify-content: center;- padding: 0 10px;- position: relative;- width: 60px;- z-index: 1;-`;--const TomCursorGlyph = styled.svg`- display: block;- filter: drop-shadow(0 2px 4px rgba(28, 28, 28, 0.12));- height: 38px;- transform: rotate(-90deg) scaleY(-1);- transform-origin: center;- width: 41px;-`;--const BobMarker = styled.div<{ $hidden?: boolean }>`- left: ${BOB_MARKER_LEFT}px;- opacity: ${({ $hidden }) => ($hidden ? 0 : 1)};- pointer-events: ${({ $hidden }) => ($hidden ? 'none' : 'auto')};- position: absolute;- top: ${BOB_MARKER_TOP}px;- transition: opacity 180ms ease;- height: 112px;- width: 96px;- z-index: 8;-`;--const BobMarkerMotion = styled.div<{ $hovered: boolean }>`- transform: ${({ $hovered }) =>- $hovered ? 'translate3d(-14px, -16px, 0)' : 'translate3d(0, 0, 0)'};- transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);- will-change: transform;-`;--const BobArrow = styled.div`- height: ${MARKER_CURSOR_HEIGHT}px;- margin-left: ${BOB_ARROW_LEFT_OFFSET}px;- position: relative;- width: ${MARKER_CURSOR_WIDTH}px;- z-index: 2;-`;--const BobLabel = styled.div<{ $withTopMargin?: boolean }>`- align-items: center;- background: ${COLORS.bobCursor};- border-radius: 4px;- display: inline-flex;- height: 38px;- justify-content: center;- margin-top: ${({ $withTopMargin }) => ($withTopMargin ? '10px' : '0')};- min-width: 60px;- padding: 0 12px;- position: relative;- z-index: 1;-`;--function MarkerCursor({- color,- height = 32,- rotation,- width = 29,-}: {- color: string;- height?: number;- rotation: number;- width?: number;-}) {- return (- <CursorGlyph- $height={height}- $rotation={rotation}- $width={width}- fill="none"- viewBox="0 0 36 40"- xmlns="http://www.w3.org/2000/svg"- >- <path- d="M19.0238 38.4628C19.5211 39.3742 20.8559 39.2915 21.2369 38.3257L35.6951 1.67609C36.0779 0.70584 35.1494 -0.267942 34.162 0.0682245L18.411 5.43091C18.2041 5.50136 17.9821 5.51512 17.768 5.47075L1.47559 2.09311C0.454282 1.88138 -0.346937 2.96232 0.152654 3.87791L19.0238 38.4628Z"- fill={color}- />- </CursorGlyph>- );-}--function TomCursor() {- return (- <TomCursorGlyph- fill="none"- viewBox="0 0 40.7459 37.7835"- xmlns="http://www.w3.org/2000/svg"- >- <path- d="M39.2312 0.0359766C40.2403 -0.208095 41.0759 0.836037 40.6166 1.76715L23.188 37.1009C22.7265 38.0363 21.3815 38.003 20.967 37.0458L14.3553 21.777C14.2684 21.5764 14.1294 21.4027 13.9528 21.274L0.503957 11.477C-0.339096 10.8629 -0.0768831 9.54315 0.936912 9.29795L39.2312 0.0359766Z"- fill={COLORS.orange}- />- </TomCursorGlyph>- );-}--type LiveDataVisualProps = {- active?: boolean;- backgroundImageRotationDeg?: number;- backgroundImageSrc?: string;- pointerTargetRef?: RefObject<HTMLElement | null>;-};--export function LiveDataVisual({- active = false,- backgroundImageSrc,- pointerTargetRef,-}: LiveDataVisualProps) {- const rootRef = useRef<HTMLDivElement>(null);- const typeFilterRef = useRef<HTMLDivElement>(null);- const employeesFilterRef = useRef<HTMLDivElement>(null);- const sceneScale = useScaleToFit(rootRef, SCENE_WIDTH, SCENE_HEIGHT);- const timeoutRegistry = useTimeoutRegistry();- const [isBobHovered, setIsBobHovered] = useState(false);- const [isTomHovered, setIsTomHovered] = useState(false);- const [phase, setPhase] = useState<LiveDataPhase>('idle');- const [typedTagLabel, setTypedTagLabel] = useState('');- const [addFilterLefts, setAddFilterLefts] = useState<{- docked: number;- parked: number;- } | null>(null);-- useEffect(() => {- if (!active) {- setPhase('idle');- return;- }-- const cancelSequenceSteps: Array<() => void> = [];- setPhase('move-to-tag');-- for (const step of LIVE_DATA_SEQUENCE.slice(1)) {- cancelSequenceSteps.push(- timeoutRegistry.schedule(() => {- setPhase(step.phase);- }, step.delay),- );- }-- return () => {- cancelSequenceSteps.forEach((cancelSequenceStep) => cancelSequenceStep());- };- }, [active, timeoutRegistry]);-- useEffect(() => {- if (phase === 'rename-tag') {- setTypedTagLabel(EDITED_TAG_LABEL.slice(0, 1));-- let nextIndex = 2;- const cancelTypingSteps: Array<() => void> = [];-- const scheduleNextTypingStep = () => {- const cancelTypingStep = timeoutRegistry.schedule(() => {- setTypedTagLabel(EDITED_TAG_LABEL.slice(0, nextIndex));- nextIndex += 1;-- if (nextIndex <= EDITED_TAG_LABEL.length) {- scheduleNextTypingStep();- }- }, TYPING_STEP_MS);-- cancelTypingSteps.push(cancelTypingStep);- };-- scheduleNextTypingStep();-- return () => {- cancelTypingSteps.forEach((cancelTypingStep) => cancelTypingStep());- };- }-- if (- phase === 'return-to-start' ||- phase === 'bob-ready' ||- phase === 'move-to-filter' ||- phase === 'remove-filter' ||- phase === 'return-bob' ||- phase === 'settle'- ) {- setTypedTagLabel(EDITED_TAG_LABEL);- return;- }-- setTypedTagLabel('');- }, [phase, timeoutRegistry]);-- useEffect(() => {- let isMounted = true;-- const measureAddFilterLefts = () => {- if (!isMounted) {- return;- }-- const typeFilter = typeFilterRef.current;- const employeesFilter = employeesFilterRef.current;-- if (- !typeFilter ||- !employeesFilter ||- employeesFilter.offsetWidth === 0- ) {- return;- }-- const nextLefts = {- docked: typeFilter.offsetLeft + typeFilter.offsetWidth + FILTER_ROW_GAP,- parked:- employeesFilter.offsetLeft +- employeesFilter.offsetWidth +- FILTER_ROW_GAP,- };-- setAddFilterLefts((current) =>- current?.docked === nextLefts.docked &&- current?.parked === nextLefts.parked- ? current- : nextLefts,- );- };-- const measureTask = createAnimationFrameLoop({- onFrame: () => {- measureAddFilterLefts();- return false;- },- });-- measureTask.start();- window.addEventListener('resize', measureAddFilterLefts);- void document.fonts?.ready.then(measureAddFilterLefts);-- return () => {- isMounted = false;- measureTask.stop();- window.removeEventListener('resize', measureAddFilterLefts);- };- }, []);-- const aliceMarker = ALICE_MARKER_POSITIONS[phase];- const bobCursor = active- ? phase === 'move-to-filter' || phase === 'remove-filter'- ? BOB_FILTER_MARKER- : BOB_READY_MARKER- : null;- const isAliceCursorVisible =- phase === 'idle' ||- phase === 'move-to-tag' ||- phase === 'rename-tag' ||- phase === 'return-to-start' ||- phase === 'bob-ready' ||- phase === 'move-to-filter' ||- phase === 'remove-filter' ||- phase === 'return-bob' ||- phase === 'settle';- const isBobCursorVisible = active;- const isEmployeesFilterRemoving = phase === 'remove-filter';- const isEmployeesFilterVisible =- phase !== 'remove-filter' && phase !== 'return-bob' && phase !== 'settle';- const hasEmployeesFilterBeenRemoved =- phase === 'remove-filter' || phase === 'return-bob' || phase === 'settle';- const isFirstTagRenamed =- phase === 'rename-tag' ||- phase === 'return-to-start' ||- phase === 'bob-ready' ||- phase === 'move-to-filter' ||- phase === 'remove-filter' ||- phase === 'return-bob' ||- phase === 'settle';- const isFirstTagEdited = isFirstTagRenamed;- const isFirstTagHoveredByAlice =- phase === 'move-to-tag' || phase === 'rename-tag';- const isAddFilterDocked = phase === 'return-bob' || phase === 'settle';- const addFilterLeft = isAddFilterDocked- ? (addFilterLefts?.docked ?? DEFAULT_ADD_FILTER_LEFTS.docked)- : (addFilterLefts?.parked ?? DEFAULT_ADD_FILTER_LEFTS.parked);- const viewCount = hasEmployeesFilterBeenRemoved ? 11 : 9;-- return (- <VisualRoot aria-hidden ref={rootRef}>- <SceneViewport $sceneScale={sceneScale}>- <SceneFrame>- <SceneBackdrop>- <WebGlMount detachFromLayout>- <LiveDataGradientBackdrop- active={active}- imageUrl={backgroundImageSrc}- pointerTargetRef={pointerTargetRef ?? rootRef}- />- </WebGlMount>- </SceneBackdrop>- <SceneContent>- <AnimatedMarkerGroup- $left={aliceMarker.left}- $top={aliceMarker.top}- >- <MarkerLabelTop>- <AliceLabel>- <MarkerText>Alice</MarkerText>- </AliceLabel>- </MarkerLabelTop>- <MarkerCursorSlot- $pressed={phase === 'rename-tag'}- $visible={isAliceCursorVisible}- >- <MarkerCursor- color={COLORS.yellow}- rotation={aliceMarker.rotation}- />- </MarkerCursorSlot>- </AnimatedMarkerGroup>- {bobCursor ? (- <AnchoredMarkerGroup- $bottom={bobCursor.bottom}- $right={bobCursor.right}- >- <MarkerCursorSlot $pressed={phase === 'remove-filter'} $visible>- <MarkerCursor- color={COLORS.bobCursor}- rotation={bobCursor.rotation}- />- </MarkerCursorSlot>- <MarkerLabelBottom>- <BobLabel>- <MarkerText>Bob</MarkerText>- </BobLabel>- </MarkerLabelBottom>- </AnchoredMarkerGroup>- ) : null}-- <TablePanel $active={active}>- <ViewRow>- <ViewSwitcher>- <ViewSwitcherLeft>- <ViewSwitcherIcon>- <IconList- aria-hidden- color={COLORS.textSecondary}- size={16}- stroke={TABLER_STROKE}- />- </ViewSwitcherIcon>- <ViewLabel>All</ViewLabel>- <ViewDot />- <ViewCount>{viewCount}</ViewCount>- </ViewSwitcherLeft>- <ViewSwitcherChevron>- <IconChevronDown- aria-hidden- color={COLORS.textLight}- size={14}- stroke={TABLER_STROKE}- />- </ViewSwitcherChevron>- </ViewSwitcher>- </ViewRow>-- <FilterRow>- <FilterChip ref={typeFilterRef}>- <FilterChipLabel>- <FilterChipIcon>- <IconHeartHandshake- aria-hidden- color={COLORS.blue}- size={14}- stroke={FILTER_ICON_STROKE}- />- </FilterChipIcon>- <FilterName>Type</FilterName>- </FilterChipLabel>- <FilterValue>is Customer</FilterValue>- <FilterCloseButton type="button">- <IconX- aria-hidden- color={COLORS.blue}- size={14}- stroke={FILTER_ICON_STROKE}- />- </FilterCloseButton>- </FilterChip>-- <FilterChipMotion- ref={employeesFilterRef}- $removing={isEmployeesFilterRemoving}- $visible={isEmployeesFilterVisible}- >- <FilterChip- $pressed={phase === 'remove-filter'}- $removing={isEmployeesFilterRemoving}- >- <FilterChipLabel>- <FilterChipIcon>- <IconUser- aria-hidden- color={COLORS.blue}- size={14}- stroke={FILTER_ICON_STROKE}- />- </FilterChipIcon>- <FilterName>Employees</FilterName>- </FilterChipLabel>- <FilterValue>{'>500'}</FilterValue>- <FilterCloseButton- $pressed={phase === 'remove-filter'}- type="button"- >- <IconX- aria-hidden- color={COLORS.blue}- size={14}- stroke={FILTER_ICON_STROKE}- />- </FilterCloseButton>- </FilterChip>- </FilterChipMotion>-- <FloatingAddFilter- $animated={addFilterLefts !== null}- $left={addFilterLeft}- type="button"- >- <FilterChipIcon>- <IconPlus- aria-hidden- color={COLORS.muted}- size={14}- stroke={FILTER_ICON_STROKE}- />- </FilterChipIcon>- Add filter- </FloatingAddFilter>- </FilterRow>-- <TableBodyArea>- <LiveDataHeroTable- editedStatusLabel={isFirstTagRenamed ? typedTagLabel : ''}- isFirstTagEdited={isFirstTagEdited}- isFirstTagHoveredByAlice={isFirstTagHoveredByAlice}- showExtendedRows={hasEmployeesFilterBeenRemoved}- />- </TableBodyArea>- </TablePanel>-- <TomMarker- onPointerEnter={() => setIsTomHovered(true)}- onPointerLeave={() => setIsTomHovered(false)}- >- <TomMarkerMotion $hovered={isTomHovered}>- <TomArrow>- <TomCursor />- </TomArrow>- <TomLabel>- <MarkerText>Tom</MarkerText>- </TomLabel>- </TomMarkerMotion>- </TomMarker>-- <BobMarker- $hidden={isBobCursorVisible}- onPointerEnter={() => setIsBobHovered(true)}- onPointerLeave={() => setIsBobHovered(false)}- >- <BobMarkerMotion $hovered={isBobHovered}>- <BobArrow>- <MarkerCursor color={COLORS.bobCursor} rotation={135} />- </BobArrow>- <BobLabel $withTopMargin>- <MarkerText>Bob</MarkerText>- </BobLabel>- </BobMarkerMotion>- </BobMarker>- </SceneContent>- </SceneFrame>- </SceneViewport>- </VisualRoot>- );-}diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/FamiliarInterfaceGradientBackdrop.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/FamiliarInterfaceGradientBackdrop.tsxsimilarity index 87%rename from packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/FamiliarInterfaceGradientBackdrop.tsxrename to packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/FamiliarInterfaceGradientBackdrop.tsxindex 25485f641b2..1ed23bf249a 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/FamiliarInterfaceGradientBackdrop.tsx+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/FamiliarInterfaceGradientBackdrop.tsx@@ -2,10 +2,8 @@import { type RefObject } from 'react';-import {- HalftoneImageBackdrop,- type HalftoneImageBackdropConfig,-} from './HalftoneImageBackdrop';+import { HalftoneImageBackdrop } from './HalftoneImageBackdrop';+import type { HalftoneImageBackdropConfig } from '../utils/halftone-image-backdrop-config';const DEFAULT_IMAGE_URL ='/images/home/three-cards-feature/familiar-interface-gradient.webp';diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/FamiliarInterfaceVisual.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/FamiliarInterfaceVisual.tsxsimilarity index 65%rename from packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/FamiliarInterfaceVisual.tsxrename to packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/FamiliarInterfaceVisual.tsxindex 387af6ae314..56f4cf793eb 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/FamiliarInterfaceVisual.tsx+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/FamiliarInterfaceVisual.tsx@@ -1,13 +1,7 @@'use client';import { RatingStarIcon } from '@/icons';-import {- SHARED_COMPANY_LOGO_URLS,- SHARED_PEOPLE_AVATAR_URLS,-} from '@/content/site/asset-paths';import { WebGlMount, createBoundedFailureCache } from '@/lib/visual-runtime';-import { theme } from '@/theme';-import { styled } from '@linaria/react';import {IconBuildingSkyscraper,IconCalendarEvent,@@ -29,47 +23,80 @@ import {useState,} from 'react';import { useScaleToFit } from '@/sections/ThreeCards/utils/use-scale-to-fit';+import {+ INITIAL_FLOATING_CARD_ID,+ INITIAL_LANE_CARDS,+ OPPORTUNITY_CARDS,+} from '../utils/familiar-interface-cards.data';import { FamiliarInterfaceGradientBackdrop } from './FamiliarInterfaceGradientBackdrop';-const APP_FONT = `'Inter', ${theme.font.family.sans}`;+type CardId = keyof typeof OPPORTUNITY_CARDS;+type OpportunityCardData = (typeof OPPORTUNITY_CARDS)[CardId];+type CompanyData = OpportunityCardData['company'];+type PersonData = OpportunityCardData['contact'];+type LaneCards = [CardId[], CardId[]];+import {+ AddCardRow,+ BoardGroup,+ BoardSurface,+ BoardTitleCount,+ BoardTitleDot,+ BoardTitleMeta,+ BoardTitleRow,+ BoardTitleText,+ CardFields,+ CardHeader,+ CheckboxBox,+ CheckboxShell,+ COLORS,+ ColumnsGrid,+ ColumnsHeaderGrid,+ DragCursor,+ DragCursorInner,+ DraggableCardShell,+ FieldIcon,+ FieldRow,+ FieldValue,+ FIGMA_CHECKBOX_SIZE,+ HeaderTokenChip,+ HeaderTokenLabel,+ HeaderTokenLogoImage,+ HeaderTokenMark,+ InteractionLayer,+ LaneBody,+ LaneCount,+ LaneDraggableCard,+ LaneHeader,+ LanePill,+ OpportunityCard,+ RatingRow,+ RatingStar,+ SCENE_HEIGHT,+ SCENE_WIDTH,+ SceneBackdrop,+ SceneFrame,+ SceneViewport,+ TokenChip,+ TokenLabel,+ TokenLogoImage,+ TokenMark,+ TokenPhotoImage,+ ValueText,+ ViewSwitcher,+ ViewSwitcherIcon,+ VisualRoot,+} from '../utils/familiar-interface-visual.styles';+const TABLER_STROKE = 1.6;-const SCENE_WIDTH = 411;-const SCENE_HEIGHT = 508;-const FIGMA_CARD_WIDTH = 174.301;-const FIGMA_FIELD_HEIGHT = 22.063;-const FIGMA_FIELD_GAP = 3.677;-const FIGMA_FIELD_STACK_GAP = 1.839;-const FIGMA_CARD_RADIUS = 3.677;-const FIGMA_CARD_SHADOW =- '0px 0px 3.677px rgba(0, 0, 0, 0.08), 0px 1.839px 3.677px rgba(0, 0, 0, 0.04)';-const FIGMA_COLUMN_GAP = 8;-const FIGMA_COLUMN_SIDE_PADDING = 5.516;-const FIGMA_HEADER_PADDING_X = 5.516;-const FIGMA_HEADER_PADDING_TOP = 7.354;-const FIGMA_HEADER_PADDING_BOTTOM = 3.677;-const FIGMA_FIELDS_PADDING_RIGHT = 5.516;-const FIGMA_FIELDS_PADDING_LEFT = 5.516;-const FIGMA_FIELDS_PADDING_BOTTOM = 3.677;-const FIGMA_CHECKBOX_SIZE = 14;-const FIGMA_ICON_BOX = 14.709;-const FIGMA_TOKEN_MARK_SIZE = 12.87;-const FIGMA_TOKEN_HEIGHT = 18.386;-const HAND_CURSOR_IDLE_POSITION = { x: 132, y: 170 };-const HAND_CURSOR_HOVER_SHIFT_X = 78;-const HAND_CURSOR_HOVER_SHIFT_Y = 10;-const HAND_CURSOR_HOVER_ROTATION_DEG = -6;const CARD_DROP_ANIMATION_MS = 320;const CARD_DROP_EASING = 'cubic-bezier(0.22, 1, 0.36, 1)';-const INITIAL_FLOATING_CARD_POSITION = { x: 210, y: 257 };type LaneIndex = 0 | 1;-type CardId = 'airbnb' | 'figma' | 'github' | 'notion';type CardPlacement =| { type: 'floating' }| { laneIndex: LaneIndex; type: 'lane' };type DropTarget = { cardIndex: number; laneIndex: LaneIndex };-type LaneCards = [CardId[], CardId[]];type FamiliarInterfaceVisualProps = {active?: boolean;backgroundImageRotationDeg?: number;@@ -77,718 +104,9 @@ type FamiliarInterfaceVisualProps = {pointerTargetRef?: RefObject<HTMLElement | null>;};-const COLORS = {- backdrop: '#1b1b1b',- border: '#ebebeb',- borderLight: '#f1f1f1',- borderStrong: '#d6d6d6',- boardSurface: '#ffffff',- cardSurface: '#fcfcfc',- activeCardBorder: '#b5ccff',- activeCardSurface: '#e8f1ff',- imageAreaSurface: '#f5f5f3',- laneCount: '#999999',- laneLabelPink: '#d6409f',- laneLabelPinkSurface: '#fce5f3',- laneLabelPurple: '#8e4ec6',- laneLabelPurpleSurface: '#ede9fe',- textLight: '#b3b3b3',- textPrimary: '#333333',- textSecondary: '#666666',- textTertiary: '#999999',-};--const TOKEN_TONES = {- amber: { background: '#f6e6d7', color: '#7a4f2a' },- blue: { background: '#dbeafe', color: '#1d4ed8' },- gray: { background: '#e5e7eb', color: '#4b5563' },- pink: { background: '#ffe4e6', color: '#be123c' },- purple: { background: '#ede9fe', color: '#6d28d9' },- red: { background: '#fee2e2', color: '#b91c1c' },- teal: { background: '#ccfbf1', color: '#0f766e' },- yellow: { background: '#fef2a4', color: '#35290f' },-} as const;--type TokenTone = keyof typeof TOKEN_TONES;--type PersonData = {- avatarUrl?: string;- initials: string;- name: string;- tone: TokenTone;-};--type CompanyData = {- domain?: string;- initials: string;- logoSrc?: string;- name: string;- squareTone: TokenTone;-};--type OpportunityCardData = {- amount: string;- company: CompanyData;- contact: PersonData;- date: string;- header: CompanyData;- id: CardId;- owner: PersonData;- rating: number;- recordId: string;-};-const failedAvatarUrls = createBoundedFailureCache(256);const failedFaviconUrls = createBoundedFailureCache(256);-const GITHUB_CARD: OpportunityCardData = {- id: 'github',- header: {- domain: 'github.com',- initials: 'G',- logoSrc: SHARED_COMPANY_LOGO_URLS.github,- name: 'Github',- squareTone: 'gray',- },- amount: '$6,562.04',- company: {- domain: 'github.com',- initials: 'G',- logoSrc: SHARED_COMPANY_LOGO_URLS.github,- name: 'Github',- squareTone: 'gray',- },- owner: {- avatarUrl: SHARED_PEOPLE_AVATAR_URLS.eddyCue,- initials: 'E',- name: 'Eddy Cue',- tone: 'amber',- },- rating: 2,- date: 'Jun 16, 2023',- contact: {- avatarUrl: SHARED_PEOPLE_AVATAR_URLS.chrisWanstrath,- initials: 'C',- name: 'Chris Wanstrath',- tone: 'gray',- },- recordId: 'OPP-1',-};--const FIGMA_CARD: OpportunityCardData = {- id: 'figma',- header: {- domain: 'figma.com',- initials: 'F',- logoSrc: SHARED_COMPANY_LOGO_URLS.figma,- name: 'Figma',- squareTone: 'purple',- },- amount: '$6,562.04',- company: {- domain: 'figma.com',- initials: 'F',- logoSrc: SHARED_COMPANY_LOGO_URLS.figma,- name: 'Figma',- squareTone: 'purple',- },- owner: {- avatarUrl: SHARED_PEOPLE_AVATAR_URLS.jeffWilliams,- initials: 'J',- name: 'Jeff Williams',- tone: 'blue',- },- rating: 2,- date: 'Jun 21, 2023',- contact: {- avatarUrl: SHARED_PEOPLE_AVATAR_URLS.dylanField,- initials: 'D',- name: 'Dylan Field',- tone: 'pink',- },- recordId: 'OPP-2',-};--const QUALIFIED_CARD: OpportunityCardData = {- id: 'notion',- header: {- domain: 'notion.so',- initials: 'N',- logoSrc: SHARED_COMPANY_LOGO_URLS.notion,- name: 'Notion',- squareTone: 'gray',- },- amount: '$2,650',- company: {- domain: 'notion.so',- initials: 'N',- logoSrc: SHARED_COMPANY_LOGO_URLS.notion,- name: 'Notion',- squareTone: 'gray',- },- owner: { initials: 'A', name: 'Airbnb', tone: 'yellow' },- rating: 2,- date: 'Jun 6, 2023',- contact: {- avatarUrl: undefined,- initials: 'I',- name: 'Ivan Zhao',- tone: 'gray',- },- recordId: 'OPP-6',-};--const AIRBNB_CARD: OpportunityCardData = {- id: 'airbnb',- header: {- domain: 'airbnb.com',- initials: 'A',- logoSrc: SHARED_COMPANY_LOGO_URLS.airbnb,- name: 'Airbnb',- squareTone: 'pink',- },- amount: '$2,433.89',- company: {- domain: 'airbnb.com',- initials: 'A',- logoSrc: SHARED_COMPANY_LOGO_URLS.airbnb,- name: 'Airbnb',- squareTone: 'pink',- },- owner: {- avatarUrl: SHARED_PEOPLE_AVATAR_URLS.katherineAdams,- initials: 'K',- name: 'Katherine Adams',- tone: 'red',- },- rating: 3,- date: 'Jun 6, 2023',- contact: {- avatarUrl: undefined,- initials: 'I',- name: 'Ivan Zhao',- tone: 'gray',- },- recordId: 'OPP-8',-};--const OPPORTUNITY_CARDS: Record<CardId, OpportunityCardData> = {- airbnb: AIRBNB_CARD,- figma: FIGMA_CARD,- github: GITHUB_CARD,- notion: QUALIFIED_CARD,-};--const INITIAL_LANE_CARDS: LaneCards = [- ['github', 'figma', 'airbnb'],- ['notion'],-];-const INITIAL_FLOATING_CARD_ID: CardId | null = null;--const VisualRoot = styled.div`- background: ${COLORS.imageAreaSurface};- height: 100%;- overflow: hidden;- position: relative;- width: 100%;-`;--const SceneViewport = styled.div<{ $sceneScale: number }>`- height: ${SCENE_HEIGHT}px;- left: 50%;- position: absolute;- top: 0;- transform: translateX(-50%) scale(${({ $sceneScale }) => $sceneScale});- transform-origin: top center;- width: ${SCENE_WIDTH}px;-`;--const SceneFrame = styled.div`- background: ${COLORS.backdrop};- border-radius: 2px;- height: 508px;- overflow: hidden;- position: relative;- width: 411px;-`;--const SceneBackdrop = styled.div<{- $backgroundImageRotationDeg?: number;-}>`- background-color: ${COLORS.backdrop};- inset: 0;- overflow: hidden;- pointer-events: none;- position: absolute;- transform: rotate(- ${({ $backgroundImageRotationDeg = 0 }) => $backgroundImageRotationDeg}deg- );- transform-origin: center center;-`;--const BoardGroup = styled.div<{ $active: boolean }>`- height: 563.255px;- left: -28px;- position: absolute;- top: 101px;- transform: scale(${({ $active }) => ($active ? 1.014 : 1)});- transform-origin: center center;- transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);- width: 412.302px;- will-change: transform;- z-index: 1;-- @media (prefers-reduced-motion: reduce) {- transition: none;- }-`;--const BoardSurface = styled.div`- background: ${COLORS.boardSurface};- border: 1px solid ${COLORS.border};- border-radius: 7.354px;- box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6);- display: flex;- flex-direction: column;- height: 563.255px;- overflow: hidden;- width: 386.453px;-`;--const BoardTitleRow = styled.div`- align-items: center;- background: ${COLORS.boardSurface};- border-bottom: 1px solid ${COLORS.borderLight};- display: flex;- height: 36.772px;- padding: 7.354px 12px;-`;--const ViewSwitcher = styled.div`- align-items: center;- display: inline-flex;- gap: 4px;- height: 24px;- min-width: 0;- padding: 0 4px;- border-radius: 4px;- transition: background-color 120ms ease;-- &:hover {- background: rgba(0, 0, 0, 0.04);- }-`;--const ViewSwitcherIcon = styled.span`- align-items: center;- color: ${COLORS.textSecondary};- display: inline-flex;- flex: 0 0 auto;- height: 16px;- justify-content: center;- width: 16px;-`;--const BoardTitleMeta = styled.div`- align-items: center;- display: inline-flex;- gap: 4px;- min-width: 0;-`;--const BoardTitleText = styled.span`- color: ${COLORS.textSecondary};- font-family: ${APP_FONT};- font-size: 13px;- font-weight: ${theme.font.weight.medium};- line-height: 1.4;- white-space: nowrap;-`;--const BoardTitleDot = styled.span`- background: ${COLORS.textLight};- border-radius: 999px;- display: inline-flex;- flex: 0 0 auto;- height: 2px;- width: 2px;-`;--const BoardTitleCount = styled.span`- color: ${COLORS.textLight};- font-family: ${APP_FONT};- font-size: 13px;- font-weight: ${theme.font.weight.medium};- line-height: 1.4;- white-space: nowrap;-`;--const ColumnsHeaderGrid = styled.div`- background: ${COLORS.boardSurface};- display: grid;- grid-template-columns: repeat(2, 186.355px);- justify-content: center;- min-height: 29.354px;- position: relative;- z-index: 1;-`;--const LaneHeader = styled.div`- align-items: flex-start;- border-right: 1px solid ${COLORS.borderLight};- display: flex;- gap: 4px;- min-height: 29.354px;- padding: 7.354px ${FIGMA_COLUMN_SIDE_PADDING}px 0;-- &:last-child {- border-right: none;- }-`;--const LanePill = styled.span<{ $tone: 'pink' | 'purple' }>`- align-items: center;- background: ${({ $tone }) =>- $tone === 'pink'- ? COLORS.laneLabelPinkSurface- : COLORS.laneLabelPurpleSurface};- border-radius: 4px;- color: ${({ $tone }) =>- $tone === 'pink' ? COLORS.laneLabelPink : COLORS.laneLabelPurple};- display: inline-flex;- font-family: ${APP_FONT};- font-size: 13px;- font-weight: ${theme.font.weight.medium};- height: 22px;- padding: 0 8px;-`;--const LaneCount = styled.span`- color: ${COLORS.laneCount};- font-family: ${APP_FONT};- font-size: 13px;- line-height: 1.4;-`;--const ColumnsGrid = styled.div`- display: grid;- grid-template-columns: repeat(2, 186.355px);- justify-content: center;- flex: 1 1 auto;- min-height: 0;-`;--const LaneBody = styled.div`- border-right: 1px solid ${COLORS.borderLight};- display: flex;- flex-direction: column;- gap: ${FIGMA_COLUMN_GAP}px;- min-height: 0;- padding: 7.354px ${FIGMA_COLUMN_SIDE_PADDING}px 8px;-- &:last-child {- border-right: none;- }-`;--const AddCardRow = styled.div`- align-items: center;- color: ${COLORS.textTertiary};- display: inline-flex;- font-family: ${APP_FONT};- font-size: 13px;- gap: ${FIGMA_FIELD_GAP}px;- height: ${FIGMA_FIELD_HEIGHT}px;- padding: 0 4px;-`;--const OpportunityCard = styled.div<{ $variant?: 'active' | 'board' }>`- background: ${({ $variant }) =>- $variant === 'active' ? COLORS.activeCardSurface : COLORS.cardSurface};- border: ${({ $variant }) => ($variant === 'active' ? '0.919px' : '1px')} solid- ${({ $variant }) =>- $variant === 'active' ? COLORS.activeCardBorder : COLORS.border};- border-radius: ${FIGMA_CARD_RADIUS}px;- box-shadow: ${FIGMA_CARD_SHADOW};- display: flex;- flex-direction: column;- overflow: hidden;- position: relative;- transition: background-color 120ms ease;- width: ${FIGMA_CARD_WIDTH}px;-- &::after {- background: rgba(0, 0, 0, 0.04);- content: '';- inset: 0;- opacity: 0;- pointer-events: none;- position: absolute;- transition: opacity 120ms ease;- }-- @media (hover: hover) {- &:hover::after {- opacity: ${({ $variant }) => ($variant === 'board' ? 1 : 0)};- }- }-`;--const CardHeader = styled.div`- align-items: center;- display: flex;- justify-content: space-between;- min-height: 33.095px;- padding: ${FIGMA_HEADER_PADDING_TOP}px ${FIGMA_HEADER_PADDING_X}px- ${FIGMA_HEADER_PADDING_BOTTOM}px;-`;--const CardFields = styled.div`- display: flex;- flex-direction: column;- gap: ${FIGMA_FIELD_STACK_GAP}px;- padding: 0 ${FIGMA_FIELDS_PADDING_RIGHT}px ${FIGMA_FIELDS_PADDING_BOTTOM}px- ${FIGMA_FIELDS_PADDING_LEFT}px;-`;--const FieldRow = styled.div`- align-items: center;- display: flex;- gap: ${FIGMA_FIELD_GAP}px;- min-height: ${FIGMA_FIELD_HEIGHT}px;-`;--const FieldIcon = styled.div`- align-items: center;- color: ${COLORS.textTertiary};- display: flex;- flex: 0 0 ${FIGMA_ICON_BOX}px;- height: ${FIGMA_ICON_BOX}px;- justify-content: center;- width: ${FIGMA_ICON_BOX}px;-`;--const FieldValue = styled.div`- align-items: center;- display: flex;- flex: 1 1 auto;- min-width: 0;-`;--const ValueText = styled.span`- color: ${COLORS.textPrimary};- font-family: ${APP_FONT};- font-size: 11.95px;- line-height: 1.4;- min-width: 0;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;-`;--const CheckboxShell = styled.div`- align-items: center;- display: flex;- height: ${FIGMA_FIELD_HEIGHT}px;- justify-content: center;- width: ${FIGMA_FIELD_HEIGHT}px;-`;--const CheckboxBox = styled.div`- align-items: center;- display: flex;- height: ${FIGMA_CHECKBOX_SIZE}px;- justify-content: center;- width: ${FIGMA_CHECKBOX_SIZE}px;-`;--const TokenChip = styled.span<{ $soft?: boolean }>`- align-items: center;- background: ${({ $soft }) => ($soft ? 'rgba(0, 0, 0, 0.04)' : 'transparent')};- border-radius: 4px;- display: inline-flex;- gap: ${FIGMA_FIELD_GAP}px;- height: ${FIGMA_TOKEN_HEIGHT}px;- max-width: 100%;- overflow: hidden;- padding: ${({ $soft }) =>- $soft ? '2.758px 3.677px' : '2.758px 3.677px 2.758px 0'};-`;--const HeaderTokenChip = styled.span`- align-items: center;- border-radius: 4px;- display: inline-flex;- gap: 4px;- height: 22.063px;- max-width: 100%;- overflow: hidden;- padding: 4px;-`;--const TokenMark = styled.span<{- $round?: boolean;- $tone: TokenTone;-}>`- align-items: center;- background: ${({ $tone }) => TOKEN_TONES[$tone].background};- border-radius: ${({ $round }) => ($round ? '999px' : '3px')};- color: ${({ $tone }) => TOKEN_TONES[$tone].color};- display: inline-flex;- flex: 0 0 auto;- font-family: ${APP_FONT};- font-size: 9.19px;- font-weight: ${theme.font.weight.medium};- height: ${FIGMA_TOKEN_MARK_SIZE}px;- justify-content: center;- overflow: hidden;- position: relative;- width: ${FIGMA_TOKEN_MARK_SIZE}px;-`;--const HeaderTokenMark = styled.span<{ $tone: TokenTone }>`- align-items: center;- background: ${({ $tone }) => TOKEN_TONES[$tone].background};- border-radius: 2px;- color: ${({ $tone }) => TOKEN_TONES[$tone].color};- display: inline-flex;- flex: 0 0 auto;- font-family: ${APP_FONT};- font-size: 9.19px;- font-weight: ${theme.font.weight.medium};- height: 14px;- justify-content: center;- overflow: hidden;- position: relative;- width: 14px;-`;--const TokenPhotoImage = styled.img`- display: block;- height: 100%;- object-fit: cover;- width: 100%;-`;--const TokenLogoImage = styled.img`- box-sizing: border-box;- display: block;- height: 100%;- object-fit: contain;- padding: 1px;- width: 100%;-`;--const HeaderTokenLogoImage = styled.img`- display: block;- height: 100%;- object-fit: contain;- width: 100%;-`;--const TokenLabel = styled.span`- color: ${COLORS.textPrimary};- font-family: ${APP_FONT};- font-size: 11.95px;- line-height: 1.4;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;-`;--const HeaderTokenLabel = styled(TokenLabel)`- font-weight: ${theme.font.weight.medium};-`;--const RatingRow = styled.div`- display: inline-flex;- gap: 1px;- padding: 0 3.677px;-`;--const RatingStar = styled.span`- align-items: center;- display: inline-flex;- height: 12px;- justify-content: center;- width: 12px;-`;--const InteractionLayer = styled.div`- inset: 0;- pointer-events: none;- position: absolute;- z-index: 2;-`;--const DragCursor = styled.div<{ $active: boolean }>`- left: 0;- pointer-events: none;- position: absolute;- top: 0;- transform: translate3d(- ${({ $active }) =>- HAND_CURSOR_IDLE_POSITION.x +- ($active ? HAND_CURSOR_HOVER_SHIFT_X : 0)}px,- 0,- 0- );- transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);- will-change: transform;- z-index: 4;-- @media (hover: none) {- display: none;- }-- @media (prefers-reduced-motion: reduce) {- transition: none;- }-`;--const DragCursorInner = styled.div<{ $active: boolean }>`- transform: translate3d(- 0,- ${({ $active }) =>- HAND_CURSOR_IDLE_POSITION.y +- ($active ? HAND_CURSOR_HOVER_SHIFT_Y : 0)}px,- 0- )- rotate(- ${({ $active }) => ($active ? HAND_CURSOR_HOVER_ROTATION_DEG : 0)}deg- );- transition: transform 520ms cubic-bezier(0.18, 0.9, 0.22, 1.18);- will-change: transform;-- @media (prefers-reduced-motion: reduce) {- transition: none;- }-`;--const LaneDraggableCard = styled.div<{ $dragging: boolean }>`- touch-action: none;- user-select: none;-- ${OpportunityCard} {- cursor: ${({ $dragging }) => ($dragging ? 'grabbing' : 'grab')};- }-`;--const DraggableCardShell = styled.div<{ $dragging: boolean }>`- left: 0;- pointer-events: auto;- position: absolute;- top: 0;- touch-action: none;- user-select: none;- will-change: transform;- z-index: 3;-- ${OpportunityCard} {- cursor: ${({ $dragging }) => ($dragging ? 'grabbing' : 'grab')};- }-`;-function clamp(value: number, min: number, max: number) {return Math.min(Math.max(value, min), max);}diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/FastPathGradientBackdrop.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/FastPathGradientBackdrop.tsxsimilarity index 86%rename from packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/FastPathGradientBackdrop.tsxrename to packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/FastPathGradientBackdrop.tsxindex 06c85d75383..07328eed260 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/FastPathGradientBackdrop.tsx+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/FastPathGradientBackdrop.tsx@@ -2,10 +2,8 @@import { type RefObject } from 'react';-import {- HalftoneImageBackdrop,- type HalftoneImageBackdropConfig,-} from './HalftoneImageBackdrop';+import { HalftoneImageBackdrop } from './HalftoneImageBackdrop';+import type { HalftoneImageBackdropConfig } from '../utils/halftone-image-backdrop-config';const DEFAULT_IMAGE_URL ='/images/home/three-cards-feature/fast-path-gradient.webp';diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/FastPathVisual.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/FastPathVisual.tsxsimilarity index 83%rename from packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/FastPathVisual.tsxrename to packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/FastPathVisual.tsxindex a2af52181db..512267eb035 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/FastPathVisual.tsx+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/FastPathVisual.tsx@@ -26,6 +26,7 @@ import {useRef,useState,} from 'react';+import { DENSE_CONFETTI_PARTICLES } from '../utils/fast-path-confetti.data';import { FastPathGradientBackdrop } from './FastPathGradientBackdrop';const APP_FONT = `'Inter', ${theme.font.family.sans}`;@@ -61,12 +62,6 @@ const COLORS = {black: '#111111',border: '#ebebeb',borderLight: '#f1f1f1',- confettiMist: '#d4cec4',- confettiPearl: '#ece7de',- confettiSilver: '#bbb5ac',- confettiSmoke: '#a6a095',- confettiSoftWhite: '#f7f4ee',- confettiWhite: '#ffffff',muted: '#b3b3b3',mutedStrong: '#999999',offWhite: '#f8f7f2',@@ -436,316 +431,6 @@ const SearchSparkles = styled.div`justify-content: center;`;-const CONFETTI_PARTICLES = [- {- color: COLORS.confettiWhite,- delay: 0,- height: 14,- left: 55,- radius: 2,- rotation: -154,- top: 25,- tx: -104,- ty: -70,- width: 8,- },- {- color: COLORS.confettiPearl,- delay: 26,- height: 10,- left: 58,- radius: 999,- rotation: 168,- top: 29,- tx: -126,- ty: -12,- width: 10,- },- {- color: COLORS.confettiSilver,- delay: 40,- height: 12,- left: 60,- radius: 2,- rotation: 224,- top: 34,- tx: -96,- ty: 42,- width: 7,- },- {- color: COLORS.confettiSoftWhite,- delay: 58,- height: 14,- left: 62,- radius: 3,- rotation: -220,- top: 36,- tx: -62,- ty: 86,- width: 9,- },- {- color: COLORS.confettiMist,- delay: 70,- height: 8,- left: 57,- radius: 999,- rotation: 144,- top: 24,- tx: -28,- ty: -92,- width: 8,- },- {- color: COLORS.confettiSmoke,- delay: 88,- height: 15,- left: 54,- radius: 2,- rotation: 206,- top: 31,- tx: -136,- ty: 18,- width: 7,- },- {- color: COLORS.confettiWhite,- delay: 108,- height: 12,- left: 64,- radius: 2,- rotation: -192,- top: 28,- tx: -18,- ty: -56,- width: 7,- },- {- color: COLORS.confettiPearl,- delay: 124,- height: 10,- left: 59,- radius: 999,- rotation: 182,- top: 39,- tx: -90,- ty: 104,- width: 10,- },- {- color: COLORS.confettiSilver,- delay: 148,- height: 16,- left: 52,- radius: 2,- rotation: -246,- top: 27,- tx: -150,- ty: -28,- width: 8,- },- {- color: COLORS.confettiSoftWhite,- delay: 166,- height: 12,- left: 66,- radius: 2,- rotation: 198,- top: 33,- tx: -36,- ty: 62,- width: 6,- },- {- color: COLORS.confettiMist,- delay: 184,- height: 8,- left: 56,- radius: 999,- rotation: -164,- top: 35,- tx: -118,- ty: 74,- width: 8,- },- {- color: COLORS.confettiSmoke,- delay: 206,- height: 14,- left: 61,- radius: 2,- rotation: 236,- top: 22,- tx: -68,- ty: -102,- width: 7,- },- {- color: COLORS.confettiWhite,- delay: 18,- height: 9,- left: 53,- radius: 999,- rotation: -126,- top: 21,- tx: -82,- ty: -88,- width: 9,- },- {- color: COLORS.confettiPearl,- delay: 52,- height: 13,- left: 50,- radius: 2,- rotation: 188,- top: 30,- tx: -126,- ty: -18,- width: 6,- },- {- color: COLORS.confettiSilver,- delay: 76,- height: 15,- left: 63,- radius: 2,- rotation: -204,- top: 23,- tx: -56,- ty: -76,- width: 7,- },- {- color: COLORS.confettiSoftWhite,- delay: 94,- height: 8,- left: 48,- radius: 999,- rotation: 164,- top: 37,- tx: -112,- ty: 58,- width: 8,- },- {- color: COLORS.confettiMist,- delay: 116,- height: 12,- left: 67,- radius: 3,- rotation: 214,- top: 27,- tx: -18,- ty: -42,- width: 8,- },- {- color: COLORS.confettiSmoke,- delay: 136,- height: 14,- left: 51,- radius: 2,- rotation: -182,- top: 34,- tx: -138,- ty: 36,- width: 7,- },- {- color: COLORS.confettiWhite,- delay: 156,- height: 10,- left: 58,- radius: 999,- rotation: 172,- top: 19,- tx: -74,- ty: -104,- width: 10,- },- {- color: COLORS.confettiPearl,- delay: 176,- height: 13,- left: 46,- radius: 2,- rotation: -236,- top: 28,- tx: -154,- ty: 6,- width: 6,- },- {- color: COLORS.confettiSilver,- delay: 196,- height: 8,- left: 69,- radius: 999,- rotation: 146,- top: 31,- tx: -8,- ty: 52,- width: 8,- },- {- color: COLORS.confettiSoftWhite,- delay: 216,- height: 15,- left: 57,- radius: 2,- rotation: 242,- top: 40,- tx: -96,- ty: 118,- width: 7,- },- {- color: COLORS.confettiMist,- delay: 238,- height: 11,- left: 61,- radius: 3,- rotation: -168,- top: 26,- tx: -46,- ty: -66,- width: 7,- },- {- color: COLORS.confettiSmoke,- delay: 258,- height: 13,- left: 49,- radius: 2,- rotation: 206,- top: 24,- tx: -136,- ty: -54,- width: 6,- },-] as const;--const DENSE_CONFETTI_PARTICLES = [- ...CONFETTI_PARTICLES,- ...CONFETTI_PARTICLES.map((particle, index) => ({- ...particle,- delay: particle.delay + 12 + (index % 4) * 6,- height: Math.max(7, particle.height - (index % 3 === 0 ? 1 : 0)),- left: Math.max(- 44,- Math.min(72, particle.left + (index % 2 === 0 ? -3 : 3)),- ),- radius: index % 5 === 0 ? 999 : particle.radius,- rotation: particle.rotation + (index % 2 === 0 ? 22 : -26),- top: Math.max(18, Math.min(42, particle.top + (index % 3 === 0 ? -2 : 2))),- tx: particle.tx + (index % 2 === 0 ? -18 : 18),- ty: particle.ty + (index % 3 === 0 ? -14 : 14),- width: Math.max(6, particle.width - (index % 4 === 0 ? 1 : 0)),- })),-] as const;-function PreviewCursorIcon() {return (<svgdiff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/HalftoneImageBackdrop.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/HalftoneImageBackdrop.tsxnew file mode 100644index 00000000000..fb8aeb902bc--- /dev/null+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/HalftoneImageBackdrop.tsx@@ -0,0 +1,38 @@+'use client';++import { styled } from '@linaria/react';+import { type RefObject, useRef } from 'react';+import { useHalftoneImageBackdrop } from '../hooks/use-halftone-image-backdrop';++import type { HalftoneImageBackdropConfig } from '../utils/halftone-image-backdrop-config';++const VisualMount = styled.div`+ background: transparent;+ display: block;+ height: 100%;+ min-width: 0;+ width: 100%;+`;++type HalftoneImageBackdropProps = {+ active?: boolean;+ config: HalftoneImageBackdropConfig;+ pointerTargetRef?: RefObject<HTMLElement | null>;+};++export function HalftoneImageBackdrop({+ active = false,+ config,+ pointerTargetRef,+}: HalftoneImageBackdropProps) {+ const mountRef = useRef<HTMLDivElement>(null);++ useHalftoneImageBackdrop({+ active,+ config,+ mountRef,+ pointerTargetRef,+ });++ return <VisualMount aria-hidden ref={mountRef} />;+}diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/LiveDataGradientBackdrop.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/LiveDataGradientBackdrop.tsxsimilarity index 86%rename from packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/LiveDataGradientBackdrop.tsxrename to packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/LiveDataGradientBackdrop.tsxindex 1cbeed4fb9f..5ddfa9f1a7a 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/LiveDataGradientBackdrop.tsx+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/LiveDataGradientBackdrop.tsx@@ -2,10 +2,8 @@import { type RefObject } from 'react';-import {- HalftoneImageBackdrop,- type HalftoneImageBackdropConfig,-} from './HalftoneImageBackdrop';+import { HalftoneImageBackdrop } from './HalftoneImageBackdrop';+import type { HalftoneImageBackdropConfig } from '../utils/halftone-image-backdrop-config';const DEFAULT_IMAGE_URL ='/images/home/three-cards-feature/live-data-gradient.webp';diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/LiveDataHeroTable.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/LiveDataHeroTable.tsxsimilarity index 98%rename from packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/LiveDataHeroTable.tsxrename to packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/LiveDataHeroTable.tsxindex e0b433c3e23..d893036bf9e 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/LiveDataHeroTable.tsx+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/LiveDataHeroTable.tsx@@ -2,11 +2,7 @@import { SHARED_COMPANY_LOGO_URLS } from '@/content/site/asset-paths';import { useHorizontalDragScroll } from '@/lib/dom/use-horizontal-drag-scroll';-import {- Chip,- ChipVariant,-} from '@/sections/Hero/components/HomeVisual/Shared/homeVisualChip';-import { VISUAL_TOKENS } from '@/sections/Hero/components/HomeVisual/Shared/homeVisualTokens';+import { Chip, ChipVariant, VISUAL_TOKENS } from '@/sections/Hero';import { theme } from '@/theme';import { styled } from '@linaria/react';import {diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/LiveDataVisual.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/LiveDataVisual.tsxnew file mode 100644index 00000000000..e790143f3da--- /dev/null+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/LiveDataVisual.tsx@@ -0,0 +1,366 @@+'use client';++import { WebGlMount } from '@/lib/visual-runtime';+import { useScaleToFit } from '@/sections/ThreeCards/utils/use-scale-to-fit';+import {+ IconChevronDown,+ IconHeartHandshake,+ IconList,+ IconPlus,+ IconUser,+ IconX,+} from '@tabler/icons-react';+import { type RefObject, useRef, useState } from 'react';+import { LiveDataGradientBackdrop } from './LiveDataGradientBackdrop';+import { LiveDataHeroTable } from './LiveDataHeroTable';+import { MarkerCursor } from './MarkerCursor';+import { TomCursor } from './TomCursor';+import {+ AliceLabel,+ AnchoredMarkerGroup,+ AnimatedMarkerGroup,+ BOB_ARROW_LEFT_OFFSET,+ BOB_MARKER_LEFT,+ BOB_MARKER_TOP,+ BOB_READY_CURSOR_ROTATION,+ BobArrow,+ BobLabel,+ BobMarker,+ BobMarkerMotion,+ COLORS,+ DEFAULT_ADD_FILTER_LEFTS,+ FILTER_ICON_STROKE,+ FilterChip,+ FilterChipIcon,+ FilterChipLabel,+ FilterChipMotion,+ FilterCloseButton,+ FilterName,+ FilterRow,+ FilterValue,+ FloatingAddFilter,+ MARKER_CURSOR_HEIGHT,+ MARKER_CURSOR_WIDTH,+ MarkerCursorSlot,+ MarkerLabelBottom,+ MarkerLabelTop,+ MarkerText,+ SCENE_HEIGHT,+ SCENE_WIDTH,+ SceneBackdrop,+ SceneContent,+ SceneFrame,+ SceneViewport,+ TABLER_STROKE,+ TableBodyArea,+ TablePanel,+ TomArrow,+ TomLabel,+ TomMarker,+ TomMarkerMotion,+ ViewCount,+ ViewDot,+ ViewLabel,+ ViewRow,+ ViewSwitcher,+ ViewSwitcherChevron,+ ViewSwitcherIcon,+ ViewSwitcherLeft,+ VisualRoot,+} from '../utils/live-data-visual.styles';+import type { LiveDataPhase } from '../utils/live-data-phase';+import { useLiveDataDemoTimeline } from '../hooks/use-live-data-demo-timeline';+import { useLiveDataFilterLayout } from '../hooks/use-live-data-filter-layout';++const ALICE_IDLE_MARKER = { left: 238, rotation: 0, top: 90 };+const BOB_READY_MARKER = {+ bottom: SCENE_HEIGHT - (BOB_MARKER_TOP + MARKER_CURSOR_HEIGHT / 2),+ right:+ SCENE_WIDTH -+ (BOB_MARKER_LEFT + BOB_ARROW_LEFT_OFFSET + MARKER_CURSOR_WIDTH / 2),+ rotation: BOB_READY_CURSOR_ROTATION,+};+const BOB_FILTER_CURSOR_ROTATION = 132;+const BOB_FILTER_MARKER = {+ bottom: 301,+ right: 50,+ rotation: BOB_FILTER_CURSOR_ROTATION,+};++const ALICE_MARKER_POSITIONS: Record<+ LiveDataPhase,+ { left: number; rotation: number; top: number }+> = {+ idle: ALICE_IDLE_MARKER,+ 'move-to-tag': { left: 286, rotation: -38, top: 246 },+ 'rename-tag': { left: 279, rotation: -18, top: 247 },+ 'return-to-start': ALICE_IDLE_MARKER,+ 'bob-ready': ALICE_IDLE_MARKER,+ 'move-to-filter': ALICE_IDLE_MARKER,+ 'remove-filter': ALICE_IDLE_MARKER,+ 'return-bob': ALICE_IDLE_MARKER,+ settle: ALICE_IDLE_MARKER,+};++type LiveDataVisualProps = {+ active?: boolean;+ backgroundImageRotationDeg?: number;+ backgroundImageSrc?: string;+ pointerTargetRef?: RefObject<HTMLElement | null>;+};++export function LiveDataVisual({+ active = false,+ backgroundImageSrc,+ pointerTargetRef,+}: LiveDataVisualProps) {+ const rootRef = useRef<HTMLDivElement>(null);+ const typeFilterRef = useRef<HTMLDivElement>(null);+ const employeesFilterRef = useRef<HTMLDivElement>(null);+ const sceneScale = useScaleToFit(rootRef, SCENE_WIDTH, SCENE_HEIGHT);+ const [isBobHovered, setIsBobHovered] = useState(false);+ const [isTomHovered, setIsTomHovered] = useState(false);+ const { phase, typedTagLabel } = useLiveDataDemoTimeline(active);+ const addFilterLefts = useLiveDataFilterLayout(+ typeFilterRef,+ employeesFilterRef,+ );++ const aliceMarker = ALICE_MARKER_POSITIONS[phase];+ const bobCursor = active+ ? phase === 'move-to-filter' || phase === 'remove-filter'+ ? BOB_FILTER_MARKER+ : BOB_READY_MARKER+ : null;+ const isAliceCursorVisible =+ phase === 'idle' ||+ phase === 'move-to-tag' ||+ phase === 'rename-tag' ||+ phase === 'return-to-start' ||+ phase === 'bob-ready' ||+ phase === 'move-to-filter' ||+ phase === 'remove-filter' ||+ phase === 'return-bob' ||+ phase === 'settle';+ const isBobCursorVisible = active;+ const isEmployeesFilterRemoving = phase === 'remove-filter';+ const isEmployeesFilterVisible =+ phase !== 'remove-filter' && phase !== 'return-bob' && phase !== 'settle';+ const hasEmployeesFilterBeenRemoved =+ phase === 'remove-filter' || phase === 'return-bob' || phase === 'settle';+ const isFirstTagRenamed =+ phase === 'rename-tag' ||+ phase === 'return-to-start' ||+ phase === 'bob-ready' ||+ phase === 'move-to-filter' ||+ phase === 'remove-filter' ||+ phase === 'return-bob' ||+ phase === 'settle';+ const isFirstTagEdited = isFirstTagRenamed;+ const isFirstTagHoveredByAlice =+ phase === 'move-to-tag' || phase === 'rename-tag';+ const isAddFilterDocked = phase === 'return-bob' || phase === 'settle';+ const addFilterLeft = isAddFilterDocked+ ? (addFilterLefts?.docked ?? DEFAULT_ADD_FILTER_LEFTS.docked)+ : (addFilterLefts?.parked ?? DEFAULT_ADD_FILTER_LEFTS.parked);+ const viewCount = hasEmployeesFilterBeenRemoved ? 11 : 9;++ return (+ <VisualRoot aria-hidden ref={rootRef}>+ <SceneViewport $sceneScale={sceneScale}>+ <SceneFrame>+ <SceneBackdrop>+ <WebGlMount detachFromLayout>+ <LiveDataGradientBackdrop+ active={active}+ imageUrl={backgroundImageSrc}+ pointerTargetRef={pointerTargetRef ?? rootRef}+ />+ </WebGlMount>+ </SceneBackdrop>+ <SceneContent>+ <AnimatedMarkerGroup+ $left={aliceMarker.left}+ $top={aliceMarker.top}+ >+ <MarkerLabelTop>+ <AliceLabel>+ <MarkerText>Alice</MarkerText>+ </AliceLabel>+ </MarkerLabelTop>+ <MarkerCursorSlot+ $pressed={phase === 'rename-tag'}+ $visible={isAliceCursorVisible}+ >+ <MarkerCursor+ color={COLORS.yellow}+ rotation={aliceMarker.rotation}+ />+ </MarkerCursorSlot>+ </AnimatedMarkerGroup>+ {bobCursor ? (+ <AnchoredMarkerGroup+ $bottom={bobCursor.bottom}+ $right={bobCursor.right}+ >+ <MarkerCursorSlot $pressed={phase === 'remove-filter'} $visible>+ <MarkerCursor+ color={COLORS.bobCursor}+ rotation={bobCursor.rotation}+ />+ </MarkerCursorSlot>+ <MarkerLabelBottom>+ <BobLabel>+ <MarkerText>Bob</MarkerText>+ </BobLabel>+ </MarkerLabelBottom>+ </AnchoredMarkerGroup>+ ) : null}++ <TablePanel $active={active}>+ <ViewRow>+ <ViewSwitcher>+ <ViewSwitcherLeft>+ <ViewSwitcherIcon>+ <IconList+ aria-hidden+ color={COLORS.textSecondary}+ size={16}+ stroke={TABLER_STROKE}+ />+ </ViewSwitcherIcon>+ <ViewLabel>All</ViewLabel>+ <ViewDot />+ <ViewCount>{viewCount}</ViewCount>+ </ViewSwitcherLeft>+ <ViewSwitcherChevron>+ <IconChevronDown+ aria-hidden+ color={COLORS.textLight}+ size={14}+ stroke={TABLER_STROKE}+ />+ </ViewSwitcherChevron>+ </ViewSwitcher>+ </ViewRow>++ <FilterRow>+ <FilterChip ref={typeFilterRef}>+ <FilterChipLabel>+ <FilterChipIcon>+ <IconHeartHandshake+ aria-hidden+ color={COLORS.blue}+ size={14}+ stroke={FILTER_ICON_STROKE}+ />+ </FilterChipIcon>+ <FilterName>Type</FilterName>+ </FilterChipLabel>+ <FilterValue>is Customer</FilterValue>+ <FilterCloseButton type="button">+ <IconX+ aria-hidden+ color={COLORS.blue}+ size={14}+ stroke={FILTER_ICON_STROKE}+ />+ </FilterCloseButton>+ </FilterChip>++ <FilterChipMotion+ ref={employeesFilterRef}+ $removing={isEmployeesFilterRemoving}+ $visible={isEmployeesFilterVisible}+ >+ <FilterChip+ $pressed={phase === 'remove-filter'}+ $removing={isEmployeesFilterRemoving}+ >+ <FilterChipLabel>+ <FilterChipIcon>+ <IconUser+ aria-hidden+ color={COLORS.blue}+ size={14}+ stroke={FILTER_ICON_STROKE}+ />+ </FilterChipIcon>+ <FilterName>Employees</FilterName>+ </FilterChipLabel>+ <FilterValue>{'>500'}</FilterValue>+ <FilterCloseButton+ $pressed={phase === 'remove-filter'}+ type="button"+ >+ <IconX+ aria-hidden+ color={COLORS.blue}+ size={14}+ stroke={FILTER_ICON_STROKE}+ />+ </FilterCloseButton>+ </FilterChip>+ </FilterChipMotion>++ <FloatingAddFilter+ $animated={addFilterLefts !== null}+ $left={addFilterLeft}+ type="button"+ >+ <FilterChipIcon>+ <IconPlus+ aria-hidden+ color={COLORS.muted}+ size={14}+ stroke={FILTER_ICON_STROKE}+ />+ </FilterChipIcon>+ Add filter+ </FloatingAddFilter>+ </FilterRow>++ <TableBodyArea>+ <LiveDataHeroTable+ editedStatusLabel={isFirstTagRenamed ? typedTagLabel : ''}+ isFirstTagEdited={isFirstTagEdited}+ isFirstTagHoveredByAlice={isFirstTagHoveredByAlice}+ showExtendedRows={hasEmployeesFilterBeenRemoved}+ />+ </TableBodyArea>+ </TablePanel>++ <TomMarker+ onPointerEnter={() => setIsTomHovered(true)}+ onPointerLeave={() => setIsTomHovered(false)}+ >+ <TomMarkerMotion $hovered={isTomHovered}>+ <TomArrow>+ <TomCursor />+ </TomArrow>+ <TomLabel>+ <MarkerText>Tom</MarkerText>+ </TomLabel>+ </TomMarkerMotion>+ </TomMarker>++ <BobMarker+ $hidden={isBobCursorVisible}+ onPointerEnter={() => setIsBobHovered(true)}+ onPointerLeave={() => setIsBobHovered(false)}+ >+ <BobMarkerMotion $hovered={isBobHovered}>+ <BobArrow>+ <MarkerCursor color={COLORS.bobCursor} rotation={135} />+ </BobArrow>+ <BobLabel $withTopMargin>+ <MarkerText>Bob</MarkerText>+ </BobLabel>+ </BobMarkerMotion>+ </BobMarker>+ </SceneContent>+ </SceneFrame>+ </SceneViewport>+ </VisualRoot>+ );+}diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/MarkerCursor.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/MarkerCursor.tsxnew file mode 100644index 00000000000..8bf2be99216--- /dev/null+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/MarkerCursor.tsx@@ -0,0 +1,43 @@+import { styled } from '@linaria/react';++const CursorGlyph = styled.svg<{+ $height: number;+ $rotation: number;+ $width: number;+}>`+ display: block;+ filter: drop-shadow(0 2px 4px rgba(28, 28, 28, 0.12));+ height: ${({ $height }) => `${$height}px`};+ transform: ${({ $rotation }) => `rotate(${$rotation}deg)`};+ transform-origin: center;+ transition: transform 140ms ease;+ width: ${({ $width }) => `${$width}px`};+`;++export function MarkerCursor({+ color,+ height = 32,+ rotation,+ width = 29,+}: {+ color: string;+ height?: number;+ rotation: number;+ width?: number;+}) {+ return (+ <CursorGlyph+ $height={height}+ $rotation={rotation}+ $width={width}+ fill="none"+ viewBox="0 0 36 40"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ d="M19.0238 38.4628C19.5211 39.3742 20.8559 39.2915 21.2369 38.3257L35.6951 1.67609C36.0779 0.70584 35.1494 -0.267942 34.162 0.0682245L18.411 5.43091C18.2041 5.50136 17.9821 5.51512 17.768 5.47075L1.47559 2.09311C0.454282 1.88138 -0.346937 2.96232 0.152654 3.87791L19.0238 38.4628Z"+ fill={color}+ />+ </CursorGlyph>+ );+}diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/TomCursor.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/TomCursor.tsxnew file mode 100644index 00000000000..bcc75a3b453--- /dev/null+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/components/TomCursor.tsx@@ -0,0 +1,27 @@+import { styled } from '@linaria/react';++import { COLORS } from '../utils/live-data-visual.styles';++const TomCursorGlyph = styled.svg`+ display: block;+ filter: drop-shadow(0 2px 4px rgba(28, 28, 28, 0.12));+ height: 38px;+ transform: rotate(-90deg) scaleY(-1);+ transform-origin: center;+ width: 41px;+`;++export function TomCursor() {+ return (+ <TomCursorGlyph+ fill="none"+ viewBox="0 0 40.7459 37.7835"+ xmlns="http://www.w3.org/2000/svg"+ >+ <path+ d="M39.2312 0.0359766C40.2403 -0.208095 41.0759 0.836037 40.6166 1.76715L23.188 37.1009C22.7265 38.0363 21.3815 38.003 20.967 37.0458L14.3553 21.777C14.2684 21.5764 14.1294 21.4027 13.9528 21.274L0.503957 11.477C-0.339096 10.8629 -0.0768831 9.54315 0.936912 9.29795L39.2312 0.0359766Z"+ fill={COLORS.orange}+ />+ </TomCursorGlyph>+ );+}diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/HalftoneImageBackdrop.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/hooks/use-halftone-image-backdrop.tssimilarity index 94%rename from packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/HalftoneImageBackdrop.tsxrename to packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/hooks/use-halftone-image-backdrop.tsindex 707f3e5cd60..8ce8b137e8b 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/HalftoneImageBackdrop.tsx+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/hooks/use-halftone-image-backdrop.ts@@ -1,9 +1,9 @@'use client';-import { styled } from '@linaria/react';-import { type RefObject, useEffect, useRef } from 'react';-import * as THREE from 'three';+import { useEffect, useRef, type RefObject } from 'react';+import type { HalftoneImageBackdropConfig } from '../utils/halftone-image-backdrop-config';+import * as THREE from 'three';import { observeElementSize } from '@/lib/dom/observe-element-size';import {createVisualRenderLoop,@@ -148,23 +148,6 @@ const HOVER_STRENGTH_STOP_EPSILON = 0.001;const POINTER_POSITION_STOP_EPSILON = 0.001;const POINTER_VELOCITY_STOP_EPSILON = 0.0001;-export type HalftoneImageBackdropConfig = {- activeHoverX: number;- activeHoverY: number;- dashColor: string;- flipImageY: boolean;- halftonePower: number;- halftoneScalePx: number;- halftoneWidth: number;- hoverDashColor: string;- hoverHalftoneRadius: number;- hoverLightIntensity: number;- hoverLightRadius: number;- imageContrast: number;- imageUrl: string;- previewDistance: number;-};-type InteractionState = {hoverStrength: number;mouseX: number;@@ -513,26 +496,17 @@ async function mountHalftoneImageBackdrop({};}-const VisualMount = styled.div`- background: transparent;- display: block;- height: 100%;- min-width: 0;- width: 100%;-`;--type HalftoneImageBackdropProps = {- active?: boolean;- config: HalftoneImageBackdropConfig;- pointerTargetRef?: RefObject<HTMLElement | null>;-};--export function HalftoneImageBackdrop({- active = false,+export function useHalftoneImageBackdrop({+ active,config,+ mountRef,pointerTargetRef,-}: HalftoneImageBackdropProps) {- const mountRef = useRef<HTMLDivElement>(null);+}: {+ active: boolean;+ config: HalftoneImageBackdropConfig;+ mountRef: RefObject<HTMLDivElement | null>;+ pointerTargetRef?: RefObject<HTMLElement | null>;+}) {const activeRef = useRef(active);const wakeRef = useRef<VoidFunction | null>(null);const {@@ -617,6 +591,7 @@ export function HalftoneImageBackdrop({hoverLightRadius,imageContrast,imageUrl,+ mountRef,previewDistance,pointerTargetRef,]);@@ -624,6 +599,4 @@ export function HalftoneImageBackdrop({useEffect(() => {wakeRef.current?.();}, [active]);-- return <VisualMount aria-hidden ref={mountRef} />;}diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/hooks/use-live-data-demo-timeline.ts b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/hooks/use-live-data-demo-timeline.tsnew file mode 100644index 00000000000..de221f96c04--- /dev/null+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/hooks/use-live-data-demo-timeline.ts@@ -0,0 +1,96 @@+'use client';++import { useEffect, useState } from 'react';++import { useTimeoutRegistry } from '@/lib/react';++import type { LiveDataPhase } from '../utils/live-data-phase';++const LIVE_DATA_SEQUENCE: Array<{+ delay: number;+ phase: Exclude<LiveDataPhase, 'idle'>;+}> = [+ { delay: 0, phase: 'move-to-tag' },+ { delay: 760, phase: 'rename-tag' },+ { delay: 1700, phase: 'return-to-start' },+ { delay: 2380, phase: 'bob-ready' },+ { delay: 2620, phase: 'move-to-filter' },+ { delay: 3260, phase: 'remove-filter' },+ { delay: 3900, phase: 'return-bob' },+ { delay: 4680, phase: 'settle' },+];++const EDITED_TAG_LABEL = 'Priority';+const TYPING_STEP_MS = 90;++export function useLiveDataDemoTimeline(active: boolean) {+ const timeoutRegistry = useTimeoutRegistry();+ const [phase, setPhase] = useState<LiveDataPhase>('idle');+ const [typedTagLabel, setTypedTagLabel] = useState('');++ useEffect(() => {+ if (!active) {+ setPhase('idle');+ return;+ }++ const cancelSequenceSteps: Array<() => void> = [];+ setPhase('move-to-tag');++ for (const step of LIVE_DATA_SEQUENCE.slice(1)) {+ cancelSequenceSteps.push(+ timeoutRegistry.schedule(() => {+ setPhase(step.phase);+ }, step.delay),+ );+ }++ return () => {+ cancelSequenceSteps.forEach((cancelSequenceStep) => cancelSequenceStep());+ };+ }, [active, timeoutRegistry]);++ useEffect(() => {+ if (phase === 'rename-tag') {+ setTypedTagLabel(EDITED_TAG_LABEL.slice(0, 1));++ let nextIndex = 2;+ const cancelTypingSteps: Array<() => void> = [];++ const scheduleNextTypingStep = () => {+ const cancelTypingStep = timeoutRegistry.schedule(() => {+ setTypedTagLabel(EDITED_TAG_LABEL.slice(0, nextIndex));+ nextIndex += 1;++ if (nextIndex <= EDITED_TAG_LABEL.length) {+ scheduleNextTypingStep();+ }+ }, TYPING_STEP_MS);++ cancelTypingSteps.push(cancelTypingStep);+ };++ scheduleNextTypingStep();++ return () => {+ cancelTypingSteps.forEach((cancelTypingStep) => cancelTypingStep());+ };+ }++ if (+ phase === 'return-to-start' ||+ phase === 'bob-ready' ||+ phase === 'move-to-filter' ||+ phase === 'remove-filter' ||+ phase === 'return-bob' ||+ phase === 'settle'+ ) {+ setTypedTagLabel(EDITED_TAG_LABEL);+ return;+ }++ setTypedTagLabel('');+ }, [phase, timeoutRegistry]);++ return { phase, typedTagLabel };+}diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/hooks/use-live-data-filter-layout.ts b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/hooks/use-live-data-filter-layout.tsnew file mode 100644index 00000000000..c4d97324679--- /dev/null+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/hooks/use-live-data-filter-layout.ts@@ -0,0 +1,72 @@+'use client';++import { type RefObject, useEffect, useState } from 'react';++import { createAnimationFrameLoop } from '@/lib/animation';++import { FILTER_ROW_GAP } from '../utils/live-data-visual.styles';++export function useLiveDataFilterLayout(+ typeFilterRef: RefObject<HTMLDivElement | null>,+ employeesFilterRef: RefObject<HTMLDivElement | null>,+) {+ const [addFilterLefts, setAddFilterLefts] = useState<{+ docked: number;+ parked: number;+ } | null>(null);++ useEffect(() => {+ let isMounted = true;++ const measureAddFilterLefts = () => {+ if (!isMounted) {+ return;+ }++ const typeFilter = typeFilterRef.current;+ const employeesFilter = employeesFilterRef.current;++ if (+ !typeFilter ||+ !employeesFilter ||+ employeesFilter.offsetWidth === 0+ ) {+ return;+ }++ const nextLefts = {+ docked: typeFilter.offsetLeft + typeFilter.offsetWidth + FILTER_ROW_GAP,+ parked:+ employeesFilter.offsetLeft ++ employeesFilter.offsetWidth ++ FILTER_ROW_GAP,+ };++ setAddFilterLefts((current) =>+ current?.docked === nextLefts.docked &&+ current?.parked === nextLefts.parked+ ? current+ : nextLefts,+ );+ };++ const measureTask = createAnimationFrameLoop({+ onFrame: () => {+ measureAddFilterLefts();+ return false;+ },+ });++ measureTask.start();+ window.addEventListener('resize', measureAddFilterLefts);+ void document.fonts?.ready.then(measureAddFilterLefts);++ return () => {+ isMounted = false;+ measureTask.stop();+ window.removeEventListener('resize', measureAddFilterLefts);+ };+ }, [typeFilterRef, employeesFilterRef]);++ return addFilterLefts;+}diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/familiar-interface-cards.data.ts b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/familiar-interface-cards.data.tsnew file mode 100644index 00000000000..ca7560ba275--- /dev/null+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/familiar-interface-cards.data.ts@@ -0,0 +1,184 @@+import {+ SHARED_COMPANY_LOGO_URLS,+ SHARED_PEOPLE_AVATAR_URLS,+} from '@/content/site/asset-paths';++import { type TOKEN_TONES } from './token-tones';++type TokenTone = keyof typeof TOKEN_TONES;++type PersonData = {+ avatarUrl?: string;+ initials: string;+ name: string;+ tone: TokenTone;+};++type CompanyData = {+ domain?: string;+ initials: string;+ logoSrc?: string;+ name: string;+ squareTone: TokenTone;+};++type CardId = 'airbnb' | 'figma' | 'github' | 'notion';++type OpportunityCardData = {+ amount: string;+ company: CompanyData;+ contact: PersonData;+ date: string;+ header: CompanyData;+ id: CardId;+ owner: PersonData;+ rating: number;+ recordId: string;+};++const GITHUB_CARD: OpportunityCardData = {+ id: 'github',+ header: {+ domain: 'github.com',+ initials: 'G',+ logoSrc: SHARED_COMPANY_LOGO_URLS.github,+ name: 'Github',+ squareTone: 'gray',+ },+ amount: '$6,562.04',+ company: {+ domain: 'github.com',+ initials: 'G',+ logoSrc: SHARED_COMPANY_LOGO_URLS.github,+ name: 'Github',+ squareTone: 'gray',+ },+ owner: {+ avatarUrl: SHARED_PEOPLE_AVATAR_URLS.eddyCue,+ initials: 'E',+ name: 'Eddy Cue',+ tone: 'amber',+ },+ rating: 2,+ date: 'Jun 16, 2023',+ contact: {+ avatarUrl: SHARED_PEOPLE_AVATAR_URLS.chrisWanstrath,+ initials: 'C',+ name: 'Chris Wanstrath',+ tone: 'gray',+ },+ recordId: 'OPP-1',+};++const FIGMA_CARD: OpportunityCardData = {+ id: 'figma',+ header: {+ domain: 'figma.com',+ initials: 'F',+ logoSrc: SHARED_COMPANY_LOGO_URLS.figma,+ name: 'Figma',+ squareTone: 'purple',+ },+ amount: '$6,562.04',+ company: {+ domain: 'figma.com',+ initials: 'F',+ logoSrc: SHARED_COMPANY_LOGO_URLS.figma,+ name: 'Figma',+ squareTone: 'purple',+ },+ owner: {+ avatarUrl: SHARED_PEOPLE_AVATAR_URLS.jeffWilliams,+ initials: 'J',+ name: 'Jeff Williams',+ tone: 'blue',+ },+ rating: 2,+ date: 'Jun 21, 2023',+ contact: {+ avatarUrl: SHARED_PEOPLE_AVATAR_URLS.dylanField,+ initials: 'D',+ name: 'Dylan Field',+ tone: 'pink',+ },+ recordId: 'OPP-2',+};++const QUALIFIED_CARD: OpportunityCardData = {+ id: 'notion',+ header: {+ domain: 'notion.so',+ initials: 'N',+ logoSrc: SHARED_COMPANY_LOGO_URLS.notion,+ name: 'Notion',+ squareTone: 'gray',+ },+ amount: '$2,650',+ company: {+ domain: 'notion.so',+ initials: 'N',+ logoSrc: SHARED_COMPANY_LOGO_URLS.notion,+ name: 'Notion',+ squareTone: 'gray',+ },+ owner: { initials: 'A', name: 'Airbnb', tone: 'yellow' },+ rating: 2,+ date: 'Jun 6, 2023',+ contact: {+ avatarUrl: undefined,+ initials: 'I',+ name: 'Ivan Zhao',+ tone: 'gray',+ },+ recordId: 'OPP-6',+};++const AIRBNB_CARD: OpportunityCardData = {+ id: 'airbnb',+ header: {+ domain: 'airbnb.com',+ initials: 'A',+ logoSrc: SHARED_COMPANY_LOGO_URLS.airbnb,+ name: 'Airbnb',+ squareTone: 'pink',+ },+ amount: '$2,433.89',+ company: {+ domain: 'airbnb.com',+ initials: 'A',+ logoSrc: SHARED_COMPANY_LOGO_URLS.airbnb,+ name: 'Airbnb',+ squareTone: 'pink',+ },+ owner: {+ avatarUrl: SHARED_PEOPLE_AVATAR_URLS.katherineAdams,+ initials: 'K',+ name: 'Katherine Adams',+ tone: 'red',+ },+ rating: 3,+ date: 'Jun 6, 2023',+ contact: {+ avatarUrl: undefined,+ initials: 'I',+ name: 'Ivan Zhao',+ tone: 'gray',+ },+ recordId: 'OPP-8',+};++export const OPPORTUNITY_CARDS: Record<CardId, OpportunityCardData> = {+ airbnb: AIRBNB_CARD,+ figma: FIGMA_CARD,+ github: GITHUB_CARD,+ notion: QUALIFIED_CARD,+};++type LaneCards = [CardId[], CardId[]];++export const INITIAL_LANE_CARDS: LaneCards = [+ ['github', 'figma', 'airbnb'],+ ['notion'],+];++export const INITIAL_FLOATING_CARD_ID: CardId | null = null;diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/familiar-interface-visual.styles.ts b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/familiar-interface-visual.styles.tsnew file mode 100644index 00000000000..d9f762e1f76--- /dev/null+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/familiar-interface-visual.styles.ts@@ -0,0 +1,558 @@+import { theme } from '@/theme';+import { styled } from '@linaria/react';+import { TOKEN_TONES } from './token-tones';++type TokenTone = keyof typeof TOKEN_TONES;++const APP_FONT = `'Inter', ${theme.font.family.sans}`;++export const SCENE_WIDTH = 411;+export const SCENE_HEIGHT = 508;+const FIGMA_CARD_WIDTH = 174.301;+const FIGMA_FIELD_HEIGHT = 22.063;+const FIGMA_FIELD_GAP = 3.677;+const FIGMA_FIELD_STACK_GAP = 1.839;+const FIGMA_CARD_RADIUS = 3.677;+const FIGMA_CARD_SHADOW =+ '0px 0px 3.677px rgba(0, 0, 0, 0.08), 0px 1.839px 3.677px rgba(0, 0, 0, 0.04)';+const FIGMA_COLUMN_GAP = 8;+const FIGMA_COLUMN_SIDE_PADDING = 5.516;+const FIGMA_HEADER_PADDING_X = 5.516;+const FIGMA_HEADER_PADDING_TOP = 7.354;+const FIGMA_HEADER_PADDING_BOTTOM = 3.677;+const FIGMA_FIELDS_PADDING_RIGHT = 5.516;+const FIGMA_FIELDS_PADDING_LEFT = 5.516;+const FIGMA_FIELDS_PADDING_BOTTOM = 3.677;+export const FIGMA_CHECKBOX_SIZE = 14;+const FIGMA_ICON_BOX = 14.709;+const FIGMA_TOKEN_MARK_SIZE = 12.87;+const FIGMA_TOKEN_HEIGHT = 18.386;+const HAND_CURSOR_IDLE_POSITION = { x: 132, y: 170 };+const HAND_CURSOR_HOVER_SHIFT_X = 78;+const HAND_CURSOR_HOVER_SHIFT_Y = 10;+const HAND_CURSOR_HOVER_ROTATION_DEG = -6;++export const COLORS = {+ backdrop: '#1b1b1b',+ border: '#ebebeb',+ borderLight: '#f1f1f1',+ borderStrong: '#d6d6d6',+ boardSurface: '#ffffff',+ cardSurface: '#fcfcfc',+ activeCardBorder: '#b5ccff',+ activeCardSurface: '#e8f1ff',+ imageAreaSurface: '#f5f5f3',+ laneCount: '#999999',+ laneLabelPink: '#d6409f',+ laneLabelPinkSurface: '#fce5f3',+ laneLabelPurple: '#8e4ec6',+ laneLabelPurpleSurface: '#ede9fe',+ textLight: '#b3b3b3',+ textPrimary: '#333333',+ textSecondary: '#666666',+ textTertiary: '#999999',+};++export const VisualRoot = styled.div`+ background: ${COLORS.imageAreaSurface};+ height: 100%;+ overflow: hidden;+ position: relative;+ width: 100%;+`;++export const SceneViewport = styled.div<{ $sceneScale: number }>`+ height: ${SCENE_HEIGHT}px;+ left: 50%;+ position: absolute;+ top: 0;+ transform: translateX(-50%) scale(${({ $sceneScale }) => $sceneScale});+ transform-origin: top center;+ width: ${SCENE_WIDTH}px;+`;++export const SceneFrame = styled.div`+ background: ${COLORS.backdrop};+ border-radius: 2px;+ height: 508px;+ overflow: hidden;+ position: relative;+ width: 411px;+`;++export const SceneBackdrop = styled.div<{+ $backgroundImageRotationDeg?: number;+}>`+ background-color: ${COLORS.backdrop};+ inset: 0;+ overflow: hidden;+ pointer-events: none;+ position: absolute;+ transform: rotate(+ ${({ $backgroundImageRotationDeg = 0 }) => $backgroundImageRotationDeg}deg+ );+ transform-origin: center center;+`;++export const BoardGroup = styled.div<{ $active: boolean }>`+ height: 563.255px;+ left: -28px;+ position: absolute;+ top: 101px;+ transform: scale(${({ $active }) => ($active ? 1.014 : 1)});+ transform-origin: center center;+ transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);+ width: 412.302px;+ will-change: transform;+ z-index: 1;++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+`;++export const BoardSurface = styled.div`+ background: ${COLORS.boardSurface};+ border: 1px solid ${COLORS.border};+ border-radius: 7.354px;+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6);+ display: flex;+ flex-direction: column;+ height: 563.255px;+ overflow: hidden;+ width: 386.453px;+`;++export const BoardTitleRow = styled.div`+ align-items: center;+ background: ${COLORS.boardSurface};+ border-bottom: 1px solid ${COLORS.borderLight};+ display: flex;+ height: 36.772px;+ padding: 7.354px 12px;+`;++export const ViewSwitcher = styled.div`+ align-items: center;+ display: inline-flex;+ gap: 4px;+ height: 24px;+ min-width: 0;+ padding: 0 4px;+ border-radius: 4px;+ transition: background-color 120ms ease;++ &:hover {+ background: rgba(0, 0, 0, 0.04);+ }+`;++export const ViewSwitcherIcon = styled.span`+ align-items: center;+ color: ${COLORS.textSecondary};+ display: inline-flex;+ flex: 0 0 auto;+ height: 16px;+ justify-content: center;+ width: 16px;+`;++export const BoardTitleMeta = styled.div`+ align-items: center;+ display: inline-flex;+ gap: 4px;+ min-width: 0;+`;++export const BoardTitleText = styled.span`+ color: ${COLORS.textSecondary};+ font-family: ${APP_FONT};+ font-size: 13px;+ font-weight: ${theme.font.weight.medium};+ line-height: 1.4;+ white-space: nowrap;+`;++export const BoardTitleDot = styled.span`+ background: ${COLORS.textLight};+ border-radius: 999px;+ display: inline-flex;+ flex: 0 0 auto;+ height: 2px;+ width: 2px;+`;++export const BoardTitleCount = styled.span`+ color: ${COLORS.textLight};+ font-family: ${APP_FONT};+ font-size: 13px;+ font-weight: ${theme.font.weight.medium};+ line-height: 1.4;+ white-space: nowrap;+`;++export const ColumnsHeaderGrid = styled.div`+ background: ${COLORS.boardSurface};+ display: grid;+ grid-template-columns: repeat(2, 186.355px);+ justify-content: center;+ min-height: 29.354px;+ position: relative;+ z-index: 1;+`;++export const LaneHeader = styled.div`+ align-items: flex-start;+ border-right: 1px solid ${COLORS.borderLight};+ display: flex;+ gap: 4px;+ min-height: 29.354px;+ padding: 7.354px ${FIGMA_COLUMN_SIDE_PADDING}px 0;++ &:last-child {+ border-right: none;+ }+`;++export const LanePill = styled.span<{ $tone: 'pink' | 'purple' }>`+ align-items: center;+ background: ${({ $tone }) =>+ $tone === 'pink'+ ? COLORS.laneLabelPinkSurface+ : COLORS.laneLabelPurpleSurface};+ border-radius: 4px;+ color: ${({ $tone }) =>+ $tone === 'pink' ? COLORS.laneLabelPink : COLORS.laneLabelPurple};+ display: inline-flex;+ font-family: ${APP_FONT};+ font-size: 13px;+ font-weight: ${theme.font.weight.medium};+ height: 22px;+ padding: 0 8px;+`;++export const LaneCount = styled.span`+ color: ${COLORS.laneCount};+ font-family: ${APP_FONT};+ font-size: 13px;+ line-height: 1.4;+`;++export const ColumnsGrid = styled.div`+ display: grid;+ grid-template-columns: repeat(2, 186.355px);+ justify-content: center;+ flex: 1 1 auto;+ min-height: 0;+`;++export const LaneBody = styled.div`+ border-right: 1px solid ${COLORS.borderLight};+ display: flex;+ flex-direction: column;+ gap: ${FIGMA_COLUMN_GAP}px;+ min-height: 0;+ padding: 7.354px ${FIGMA_COLUMN_SIDE_PADDING}px 8px;++ &:last-child {+ border-right: none;+ }+`;++export const AddCardRow = styled.div`+ align-items: center;+ color: ${COLORS.textTertiary};+ display: inline-flex;+ font-family: ${APP_FONT};+ font-size: 13px;+ gap: ${FIGMA_FIELD_GAP}px;+ height: ${FIGMA_FIELD_HEIGHT}px;+ padding: 0 4px;+`;++export const OpportunityCard = styled.div<{ $variant?: 'active' | 'board' }>`+ background: ${({ $variant }) =>+ $variant === 'active' ? COLORS.activeCardSurface : COLORS.cardSurface};+ border: ${({ $variant }) => ($variant === 'active' ? '0.919px' : '1px')} solid+ ${({ $variant }) =>+ $variant === 'active' ? COLORS.activeCardBorder : COLORS.border};+ border-radius: ${FIGMA_CARD_RADIUS}px;+ box-shadow: ${FIGMA_CARD_SHADOW};+ display: flex;+ flex-direction: column;+ overflow: hidden;+ position: relative;+ transition: background-color 120ms ease;+ width: ${FIGMA_CARD_WIDTH}px;++ &::after {+ background: rgba(0, 0, 0, 0.04);+ content: '';+ inset: 0;+ opacity: 0;+ pointer-events: none;+ position: absolute;+ transition: opacity 120ms ease;+ }++ @media (hover: hover) {+ &:hover::after {+ opacity: ${({ $variant }) => ($variant === 'board' ? 1 : 0)};+ }+ }+`;++export const CardHeader = styled.div`+ align-items: center;+ display: flex;+ justify-content: space-between;+ min-height: 33.095px;+ padding: ${FIGMA_HEADER_PADDING_TOP}px ${FIGMA_HEADER_PADDING_X}px+ ${FIGMA_HEADER_PADDING_BOTTOM}px;+`;++export const CardFields = styled.div`+ display: flex;+ flex-direction: column;+ gap: ${FIGMA_FIELD_STACK_GAP}px;+ padding: 0 ${FIGMA_FIELDS_PADDING_RIGHT}px ${FIGMA_FIELDS_PADDING_BOTTOM}px+ ${FIGMA_FIELDS_PADDING_LEFT}px;+`;++export const FieldRow = styled.div`+ align-items: center;+ display: flex;+ gap: ${FIGMA_FIELD_GAP}px;+ min-height: ${FIGMA_FIELD_HEIGHT}px;+`;++export const FieldIcon = styled.div`+ align-items: center;+ color: ${COLORS.textTertiary};+ display: flex;+ flex: 0 0 ${FIGMA_ICON_BOX}px;+ height: ${FIGMA_ICON_BOX}px;+ justify-content: center;+ width: ${FIGMA_ICON_BOX}px;+`;++export const FieldValue = styled.div`+ align-items: center;+ display: flex;+ flex: 1 1 auto;+ min-width: 0;+`;++export const ValueText = styled.span`+ color: ${COLORS.textPrimary};+ font-family: ${APP_FONT};+ font-size: 11.95px;+ line-height: 1.4;+ min-width: 0;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+`;++export const CheckboxShell = styled.div`+ align-items: center;+ display: flex;+ height: ${FIGMA_FIELD_HEIGHT}px;+ justify-content: center;+ width: ${FIGMA_FIELD_HEIGHT}px;+`;++export const CheckboxBox = styled.div`+ align-items: center;+ display: flex;+ height: ${FIGMA_CHECKBOX_SIZE}px;+ justify-content: center;+ width: ${FIGMA_CHECKBOX_SIZE}px;+`;++export const TokenChip = styled.span<{ $soft?: boolean }>`+ align-items: center;+ background: ${({ $soft }) => ($soft ? 'rgba(0, 0, 0, 0.04)' : 'transparent')};+ border-radius: 4px;+ display: inline-flex;+ gap: ${FIGMA_FIELD_GAP}px;+ height: ${FIGMA_TOKEN_HEIGHT}px;+ max-width: 100%;+ overflow: hidden;+ padding: ${({ $soft }) =>+ $soft ? '2.758px 3.677px' : '2.758px 3.677px 2.758px 0'};+`;++export const HeaderTokenChip = styled.span`+ align-items: center;+ border-radius: 4px;+ display: inline-flex;+ gap: 4px;+ height: 22.063px;+ max-width: 100%;+ overflow: hidden;+ padding: 4px;+`;++export const TokenMark = styled.span<{+ $round?: boolean;+ $tone: TokenTone;+}>`+ align-items: center;+ background: ${({ $tone }) => TOKEN_TONES[$tone].background};+ border-radius: ${({ $round }) => ($round ? '999px' : '3px')};+ color: ${({ $tone }) => TOKEN_TONES[$tone].color};+ display: inline-flex;+ flex: 0 0 auto;+ font-family: ${APP_FONT};+ font-size: 9.19px;+ font-weight: ${theme.font.weight.medium};+ height: ${FIGMA_TOKEN_MARK_SIZE}px;+ justify-content: center;+ overflow: hidden;+ position: relative;+ width: ${FIGMA_TOKEN_MARK_SIZE}px;+`;++export const HeaderTokenMark = styled.span<{ $tone: TokenTone }>`+ align-items: center;+ background: ${({ $tone }) => TOKEN_TONES[$tone].background};+ border-radius: 2px;+ color: ${({ $tone }) => TOKEN_TONES[$tone].color};+ display: inline-flex;+ flex: 0 0 auto;+ font-family: ${APP_FONT};+ font-size: 9.19px;+ font-weight: ${theme.font.weight.medium};+ height: 14px;+ justify-content: center;+ overflow: hidden;+ position: relative;+ width: 14px;+`;++export const TokenPhotoImage = styled.img`+ display: block;+ height: 100%;+ object-fit: cover;+ width: 100%;+`;++export const TokenLogoImage = styled.img`+ box-sizing: border-box;+ display: block;+ height: 100%;+ object-fit: contain;+ padding: 1px;+ width: 100%;+`;++export const HeaderTokenLogoImage = styled.img`+ display: block;+ height: 100%;+ object-fit: contain;+ width: 100%;+`;++export const TokenLabel = styled.span`+ color: ${COLORS.textPrimary};+ font-family: ${APP_FONT};+ font-size: 11.95px;+ line-height: 1.4;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+`;++export const HeaderTokenLabel = styled(TokenLabel)`+ font-weight: ${theme.font.weight.medium};+`;++export const RatingRow = styled.div`+ display: inline-flex;+ gap: 1px;+ padding: 0 3.677px;+`;++export const RatingStar = styled.span`+ align-items: center;+ display: inline-flex;+ height: 12px;+ justify-content: center;+ width: 12px;+`;++export const InteractionLayer = styled.div`+ inset: 0;+ pointer-events: none;+ position: absolute;+ z-index: 2;+`;++export const DragCursor = styled.div<{ $active: boolean }>`+ left: 0;+ pointer-events: none;+ position: absolute;+ top: 0;+ transform: translate3d(+ ${({ $active }) =>+ HAND_CURSOR_IDLE_POSITION.x ++ ($active ? HAND_CURSOR_HOVER_SHIFT_X : 0)}px,+ 0,+ 0+ );+ transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1);+ will-change: transform;+ z-index: 4;++ @media (hover: none) {+ display: none;+ }++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+`;++export const DragCursorInner = styled.div<{ $active: boolean }>`+ transform: translate3d(+ 0,+ ${({ $active }) =>+ HAND_CURSOR_IDLE_POSITION.y ++ ($active ? HAND_CURSOR_HOVER_SHIFT_Y : 0)}px,+ 0+ )+ rotate(+ ${({ $active }) => ($active ? HAND_CURSOR_HOVER_ROTATION_DEG : 0)}deg+ );+ transition: transform 520ms cubic-bezier(0.18, 0.9, 0.22, 1.18);+ will-change: transform;++ @media (prefers-reduced-motion: reduce) {+ transition: none;+ }+`;++export const LaneDraggableCard = styled.div<{ $dragging: boolean }>`+ touch-action: none;+ user-select: none;++ ${OpportunityCard} {+ cursor: ${({ $dragging }) => ($dragging ? 'grabbing' : 'grab')};+ }+`;++export const DraggableCardShell = styled.div<{ $dragging: boolean }>`+ left: 0;+ pointer-events: auto;+ position: absolute;+ top: 0;+ touch-action: none;+ user-select: none;+ will-change: transform;+ z-index: 3;++ ${OpportunityCard} {+ cursor: ${({ $dragging }) => ($dragging ? 'grabbing' : 'grab')};+ }+`;diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/fast-path-confetti.data.ts b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/fast-path-confetti.data.tsnew file mode 100644index 00000000000..149c39eb12c--- /dev/null+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/fast-path-confetti.data.ts@@ -0,0 +1,318 @@+const CONFETTI_COLORS = {+ mist: '#d4cec4',+ pearl: '#ece7de',+ silver: '#bbb5ac',+ smoke: '#a6a095',+ softWhite: '#f7f4ee',+ white: '#ffffff',+} as const;++const CONFETTI_PARTICLES = [+ {+ color: CONFETTI_COLORS.white,+ delay: 0,+ height: 14,+ left: 55,+ radius: 2,+ rotation: -154,+ top: 25,+ tx: -104,+ ty: -70,+ width: 8,+ },+ {+ color: CONFETTI_COLORS.pearl,+ delay: 26,+ height: 10,+ left: 58,+ radius: 999,+ rotation: 168,+ top: 29,+ tx: -126,+ ty: -12,+ width: 10,+ },+ {+ color: CONFETTI_COLORS.silver,+ delay: 40,+ height: 12,+ left: 60,+ radius: 2,+ rotation: 224,+ top: 34,+ tx: -96,+ ty: 42,+ width: 7,+ },+ {+ color: CONFETTI_COLORS.softWhite,+ delay: 58,+ height: 14,+ left: 62,+ radius: 3,+ rotation: -220,+ top: 36,+ tx: -62,+ ty: 86,+ width: 9,+ },+ {+ color: CONFETTI_COLORS.mist,+ delay: 70,+ height: 8,+ left: 57,+ radius: 999,+ rotation: 144,+ top: 24,+ tx: -28,+ ty: -92,+ width: 8,+ },+ {+ color: CONFETTI_COLORS.smoke,+ delay: 88,+ height: 15,+ left: 54,+ radius: 2,+ rotation: 206,+ top: 31,+ tx: -136,+ ty: 18,+ width: 7,+ },+ {+ color: CONFETTI_COLORS.white,+ delay: 108,+ height: 12,+ left: 64,+ radius: 2,+ rotation: -192,+ top: 28,+ tx: -18,+ ty: -56,+ width: 7,+ },+ {+ color: CONFETTI_COLORS.pearl,+ delay: 124,+ height: 10,+ left: 59,+ radius: 999,+ rotation: 182,+ top: 39,+ tx: -90,+ ty: 104,+ width: 10,+ },+ {+ color: CONFETTI_COLORS.silver,+ delay: 148,+ height: 16,+ left: 52,+ radius: 2,+ rotation: -246,+ top: 27,+ tx: -150,+ ty: -28,+ width: 8,+ },+ {+ color: CONFETTI_COLORS.softWhite,+ delay: 166,+ height: 12,+ left: 66,+ radius: 2,+ rotation: 198,+ top: 33,+ tx: -36,+ ty: 62,+ width: 6,+ },+ {+ color: CONFETTI_COLORS.mist,+ delay: 184,+ height: 8,+ left: 56,+ radius: 999,+ rotation: -164,+ top: 35,+ tx: -118,+ ty: 74,+ width: 8,+ },+ {+ color: CONFETTI_COLORS.smoke,+ delay: 206,+ height: 14,+ left: 61,+ radius: 2,+ rotation: 236,+ top: 22,+ tx: -68,+ ty: -102,+ width: 7,+ },+ {+ color: CONFETTI_COLORS.white,+ delay: 18,+ height: 9,+ left: 53,+ radius: 999,+ rotation: -126,+ top: 21,+ tx: -82,+ ty: -88,+ width: 9,+ },+ {+ color: CONFETTI_COLORS.pearl,+ delay: 52,+ height: 13,+ left: 50,+ radius: 2,+ rotation: 188,+ top: 30,+ tx: -126,+ ty: -18,+ width: 6,+ },+ {+ color: CONFETTI_COLORS.silver,+ delay: 76,+ height: 15,+ left: 63,+ radius: 2,+ rotation: -204,+ top: 23,+ tx: -56,+ ty: -76,+ width: 7,+ },+ {+ color: CONFETTI_COLORS.softWhite,+ delay: 94,+ height: 8,+ left: 48,+ radius: 999,+ rotation: 164,+ top: 37,+ tx: -112,+ ty: 58,+ width: 8,+ },+ {+ color: CONFETTI_COLORS.mist,+ delay: 116,+ height: 12,+ left: 67,+ radius: 3,+ rotation: 214,+ top: 27,+ tx: -18,+ ty: -42,+ width: 8,+ },+ {+ color: CONFETTI_COLORS.smoke,+ delay: 136,+ height: 14,+ left: 51,+ radius: 2,+ rotation: -182,+ top: 34,+ tx: -138,+ ty: 36,+ width: 7,+ },+ {+ color: CONFETTI_COLORS.white,+ delay: 156,+ height: 10,+ left: 58,+ radius: 999,+ rotation: 172,+ top: 19,+ tx: -74,+ ty: -104,+ width: 10,+ },+ {+ color: CONFETTI_COLORS.pearl,+ delay: 176,+ height: 13,+ left: 46,+ radius: 2,+ rotation: -236,+ top: 28,+ tx: -154,+ ty: 6,+ width: 6,+ },+ {+ color: CONFETTI_COLORS.silver,+ delay: 196,+ height: 8,+ left: 69,+ radius: 999,+ rotation: 146,+ top: 31,+ tx: -8,+ ty: 52,+ width: 8,+ },+ {+ color: CONFETTI_COLORS.softWhite,+ delay: 216,+ height: 15,+ left: 57,+ radius: 2,+ rotation: 242,+ top: 40,+ tx: -96,+ ty: 118,+ width: 7,+ },+ {+ color: CONFETTI_COLORS.mist,+ delay: 238,+ height: 11,+ left: 61,+ radius: 3,+ rotation: -168,+ top: 26,+ tx: -46,+ ty: -66,+ width: 7,+ },+ {+ color: CONFETTI_COLORS.smoke,+ delay: 258,+ height: 13,+ left: 49,+ radius: 2,+ rotation: 206,+ top: 24,+ tx: -136,+ ty: -54,+ width: 6,+ },+] as const;++export const DENSE_CONFETTI_PARTICLES = [+ ...CONFETTI_PARTICLES,+ ...CONFETTI_PARTICLES.map((particle, index) => ({+ ...particle,+ delay: particle.delay + 12 + (index % 4) * 6,+ height: Math.max(7, particle.height - (index % 3 === 0 ? 1 : 0)),+ left: Math.max(+ 44,+ Math.min(72, particle.left + (index % 2 === 0 ? -3 : 3)),+ ),+ radius: index % 5 === 0 ? 999 : particle.radius,+ rotation: particle.rotation + (index % 2 === 0 ? 22 : -26),+ top: Math.max(18, Math.min(42, particle.top + (index % 3 === 0 ? -2 : 2))),+ tx: particle.tx + (index % 2 === 0 ? -18 : 18),+ ty: particle.ty + (index % 3 === 0 ? -14 : 14),+ width: Math.max(6, particle.width - (index % 4 === 0 ? 1 : 0)),+ })),+] as const;diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/halftone-image-backdrop-config.ts b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/halftone-image-backdrop-config.tsnew file mode 100644index 00000000000..6051b189546--- /dev/null+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/halftone-image-backdrop-config.ts@@ -0,0 +1,16 @@+export type HalftoneImageBackdropConfig = {+ activeHoverX: number;+ activeHoverY: number;+ dashColor: string;+ flipImageY: boolean;+ halftonePower: number;+ halftoneScalePx: number;+ halftoneWidth: number;+ hoverDashColor: string;+ hoverHalftoneRadius: number;+ hoverLightIntensity: number;+ hoverLightRadius: number;+ imageContrast: number;+ imageUrl: string;+ previewDistance: number;+};diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/live-data-phase.ts b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/live-data-phase.tsnew file mode 100644index 00000000000..07103395206--- /dev/null+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/live-data-phase.ts@@ -0,0 +1,14 @@+type AliceReturnPhase = 'return-to-start';+type BobLiveDataPhase =+ | 'bob-ready'+ | 'move-to-filter'+ | 'remove-filter'+ | 'return-bob';++export type LiveDataPhase =+ | 'idle'+ | 'move-to-tag'+ | 'rename-tag'+ | AliceReturnPhase+ | BobLiveDataPhase+ | 'settle';diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/live-data-visual.styles.ts b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/live-data-visual.styles.tsnew file mode 100644index 00000000000..377211e8500--- /dev/null+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/live-data-visual.styles.ts@@ -0,0 +1,568 @@+import { theme } from '@/theme';+import { styled } from '@linaria/react';++const APP_FONT = `'Inter', ${theme.font.family.sans}`;+export const SCENE_HEIGHT = 508;+export const SCENE_WIDTH = 411;+export const TABLE_PANEL_HOVER_SCALE = 1.012;+export const TABLER_STROKE = 1.65;+export const FILTER_ICON_STROKE = 1.33;+export const FILTER_ROW_GAP = 4;+export const BOB_READY_CURSOR_ROTATION = 135;+export const MARKER_CURSOR_HEIGHT = 32;+export const MARKER_CURSOR_WIDTH = 29;+export const BOB_MARKER_LEFT = 196;+export const BOB_MARKER_TOP = 372;+export const BOB_ARROW_LEFT_OFFSET = 20;+export const DEFAULT_ADD_FILTER_LEFTS = {+ docked: 152,+ parked: 276,+};++export const COLORS = {+ backdrop: '#1b1b1b',+ black: '#1f1f1f',+ bobCursor: '#EDB7FF',+ blue: '#1961ed',+ blueBorder: '#edf2fe',+ blueSurface: '#f5f9fd',+ green: '#18794e',+ greenSurface: '#ddf3e4',+ muted: '#999999',+ orange: '#ffb08d',+ purple: '#7869ff',+ text: '#333333',+ textLight: '#b3b3b3',+ textSecondary: '#666666',+ white: '#ffffff',+ yellow: '#fff6a5',+} as const;++export const VisualRoot = styled.div`+ background: ${COLORS.backdrop};+ height: 100%;+ overflow: hidden;+ position: relative;+ width: 100%;+`;++export const SceneViewport = styled.div<{ $sceneScale: number }>`+ /*+ * Fixed 411 × 508 design box. The previous "width: 101%; top: 0; bottom: 0"+ * sizing made the viewport responsive AND we then applied a scale on top —+ * a double-responsive coupling that shrank the visual quadratically with+ * card width and made absolute-positioned children (TablePanel etc.) drift+ * around as the card resized. Locking the box to design size means inner+ * content lives in a stable 411 × 508 coordinate system; only the single+ * uniform scale changes with the card.+ */+ height: ${SCENE_HEIGHT}px;+ left: 50%;+ position: absolute;+ top: 0;+ transform: translateX(-50%) scale(${({ $sceneScale }) => $sceneScale});+ transform-origin: top center;+ width: ${SCENE_WIDTH}px;+`;++export const SceneFrame = styled.div`+ border-radius: 2px;+ height: 100%;+ overflow: hidden;+ position: relative;+ width: 100%;+`;++export const SceneBackdrop = styled.div<{+ $backgroundImageRotationDeg?: number;+}>`+ background-color: ${COLORS.backdrop};+ inset: 0;+ pointer-events: none;+ position: absolute;+`;++export const SceneContent = styled.div`+ inset: 16px 0 0;+ position: absolute;+ width: 100%;+`;++export const TablePanel = styled.div<{ $active?: boolean }>`+ backface-visibility: hidden;+ background: ${COLORS.white};+ border-top-left-radius: 8px;+ box-shadow: ${({ $active }) =>+ $active+ ? '0 0 0 1px rgba(241, 241, 241, 0.9), 0 14px 28px rgba(15, 23, 42, 0.08)'+ : '0 0 0 1px rgba(241, 241, 241, 0.9)'};+ contain: paint;+ display: grid;+ grid-template-rows: auto auto minmax(0, 1fr);+ height: 376px;+ bottom: -4px;+ overflow: hidden;+ position: absolute;+ right: 0px;+ transform: ${({ $active }) =>+ `translate3d(0, 0, 0) scale(${$active ? TABLE_PANEL_HOVER_SCALE : 1})`};+ transform-origin: bottom right;+ transition:+ box-shadow 260ms cubic-bezier(0.22, 1, 0.36, 1),+ transform 260ms cubic-bezier(0.22, 1, 0.36, 1);+ will-change: transform, box-shadow;+ width: 355px;+`;++export const ViewRow = styled.div`+ align-items: center;+ border-bottom: 1px solid #f1f1f1;+ display: flex;+ height: 40px;+ padding: 0 8px;+`;++export const ViewSwitcher = styled.div`+ align-items: center;+ border-radius: 4px;+ cursor: pointer;+ display: inline-flex;+ gap: 4px;+ height: 24px;+ padding: 0 4px;+ transition: background-color 120ms ease;++ &:hover {+ background: rgba(0, 0, 0, 0.04);+ }+`;++export const ViewSwitcherLeft = styled.div`+ align-items: center;+ display: inline-flex;+ gap: 4px;+ height: 100%;+`;++export const ViewSwitcherIcon = styled.span`+ align-items: center;+ display: inline-flex;+ flex: 0 0 auto;+ height: 16px;+ justify-content: center;+ width: 16px;+`;++export const ViewLabel = styled.span`+ color: ${COLORS.textSecondary};+ font-family: ${APP_FONT};+ font-size: 13px;+ font-weight: ${theme.font.weight.medium};+ line-height: 1.4;+ white-space: nowrap;+`;++export const ViewDot = styled.div`+ background: ${COLORS.textLight};+ border-radius: 999px;+ height: 2px;+ width: 2px;+`;++export const ViewCount = styled.span`+ color: ${COLORS.textLight};+ font-family: ${APP_FONT};+ font-size: 13px;+ font-weight: ${theme.font.weight.medium};+ line-height: 1.4;+ white-space: nowrap;+`;++export const ViewSwitcherChevron = styled.span`+ align-items: center;+ display: inline-flex;+ flex: 0 0 auto;+ height: 14px;+ justify-content: center;+ width: 14px;+`;++export const FilterRow = styled.div`+ align-items: center;+ border-bottom: 1px solid #f1f1f1;+ display: flex;+ gap: ${FILTER_ROW_GAP}px;+ height: 48px;+ padding: 0 12px;+ position: relative;+`;++export const FilterChipMotion = styled.div<{+ $removing?: boolean;+ $visible: boolean;+}>`+ display: inline-flex;+ max-width: ${({ $visible }) => ($visible ? '172px' : '0')};+ opacity: ${({ $removing, $visible }) => ($visible || $removing ? 1 : 0)};+ overflow: ${({ $removing }) => ($removing ? 'visible' : 'hidden')};+ pointer-events: ${({ $removing, $visible }) =>+ $visible && !$removing ? 'auto' : 'none'};+ transform: ${({ $removing, $visible }) =>+ $visible || $removing+ ? 'translateX(0) scale(1)'+ : 'translateX(-8px) scale(0.92)'};+ transform-origin: right center;+ transition:+ max-width 280ms cubic-bezier(0.22, 1, 0.36, 1)+ ${({ $removing }) => ($removing ? '180ms' : '0ms')},+ opacity 180ms ease ${({ $removing }) => ($removing ? '180ms' : '0ms')},+ transform 280ms cubic-bezier(0.22, 1, 0.36, 1)+ ${({ $removing }) => ($removing ? '180ms' : '0ms')};+ white-space: nowrap;+`;++export const FilterChip = styled.div<{+ $pressed?: boolean;+ $removing?: boolean;+}>`+ align-items: center;+ background: ${COLORS.blueSurface};+ border: 1px solid ${COLORS.blueBorder};+ border-radius: 4px;+ box-shadow: ${({ $pressed }) =>+ $pressed ? 'inset 0 0 0 1px rgba(25, 97, 237, 0.08)' : 'none'};+ color: ${COLORS.blue};+ display: inline-flex;+ font-family: ${APP_FONT};+ font-size: 12px;+ gap: 2px;+ height: 24px;+ line-height: 1.4;+ padding: 2px 2px 2px 4px;+ opacity: 1;+ transform: ${({ $pressed }) => ($pressed ? 'scale(0.985)' : 'scale(1)')};+ transition:+ box-shadow 180ms ease,+ transform 180ms ease;+ white-space: nowrap;++ animation: ${({ $removing }) =>+ $removing+ ? 'employees-filter-pop-away 320ms cubic-bezier(0.18, 1, 0.32, 1) forwards'+ : 'none'};+ transform-origin: right center;+ will-change: opacity, transform;++ @keyframes employees-filter-pop-away {+ 0% {+ opacity: 1;+ transform: scale(0.985) translate3d(0, 0, 0);+ }++ 36% {+ opacity: 1;+ transform: scale(1.08) translate3d(2px, -1px, 0);+ }++ 100% {+ opacity: 0;+ transform: scale(0.64) translate3d(18px, -6px, 0);+ }+ }++ @media (prefers-reduced-motion: reduce) {+ /* Snap-hide the chip when removing — animation-end still fires (the+ parent uses it as the removal signal) but the decorative pop is+ collapsed to a single frame. */+ animation-duration: 1ms;+ animation-timing-function: linear;+ }+`;++export const FilterChipLabel = styled.span`+ align-items: center;+ display: inline-flex;+ gap: 4px;+`;++export const FilterChipIcon = styled.span`+ align-items: center;+ display: inline-flex;+ flex: 0 0 auto;+ height: 14px;+ justify-content: center;+ width: 14px;+`;++export const FilterName = styled.span`+ font-size: 12px;+ line-height: 1.4;+ font-weight: ${theme.font.weight.medium};+`;++export const FilterValue = styled.span`+ font-size: 12px;+ line-height: 1.4;+ font-weight: ${theme.font.weight.regular};+`;++export const FilterCloseButton = styled.button<{ $pressed?: boolean }>`+ align-items: center;+ background: ${({ $pressed }) =>+ $pressed ? 'rgba(25, 97, 237, 0.08)' : 'transparent'};+ border: 0;+ border-radius: 2px;+ color: ${COLORS.blue};+ cursor: pointer;+ display: inline-flex;+ flex: 0 0 auto;+ height: 20px;+ justify-content: center;+ padding: 0;+ transition: background-color 140ms ease;+ width: 20px;++ &:hover {+ background: ${({ $pressed }) =>+ $pressed ? 'rgba(25, 97, 237, 0.08)' : 'rgba(25, 97, 237, 0.06)'};+ }++ &:focus-visible {+ background: rgba(25, 97, 237, 0.06);+ outline: none;+ }+`;++export const AddFilter = styled.button`+ align-items: center;+ background: transparent;+ border: 0;+ border-radius: 4px;+ color: ${COLORS.muted};+ cursor: pointer;+ display: inline-flex;+ font-family: ${APP_FONT};+ font-size: 13px;+ font-weight: ${theme.font.weight.regular};+ gap: 4px;+ height: 24px;+ line-height: 1.4;+ margin-left: 1px;+ padding: 0 8px;+ transition: background-color 120ms ease;+ white-space: nowrap;++ &:hover {+ background: rgba(0, 0, 0, 0.04);+ }+`;++export const FloatingAddFilter = styled(AddFilter)<{+ $animated: boolean;+ $left: number;+}>`+ left: ${({ $left }) => `${$left}px`};+ margin-left: 0;+ position: absolute;+ top: 50%;+ transform: translateY(-50%);+ transition: ${({ $animated }) =>+ $animated ? 'left 340ms cubic-bezier(0.22, 1, 0.36, 1)' : 'none'};+`;++export const TableBodyArea = styled.div`+ min-height: 0;+ min-width: 0;+ overflow: hidden;+`;++export const MarkerText = styled.span`+ color: ${COLORS.black};+ font-family: ${theme.font.family.mono};+ font-size: 20px;+ font-weight: ${theme.font.weight.medium};+ line-height: 17.011px;+ text-transform: uppercase;+`;++export const AnimatedMarkerGroup = styled.div<{+ $left: number;+ $top: number;+}>`+ left: ${({ $left }) => `${$left}px`};+ pointer-events: none;+ position: absolute;+ top: ${({ $top }) => `${$top}px`};+ transition:+ left 620ms cubic-bezier(0.22, 1, 0.36, 1),+ top 620ms cubic-bezier(0.22, 1, 0.36, 1);+ z-index: 9;+`;++export const AnchoredMarkerGroup = styled.div<{+ $bottom: number;+ $right: number;+}>`+ bottom: ${({ $bottom }) => `${$bottom}px`};+ pointer-events: none;+ position: absolute;+ right: ${({ $right }) => `${$right}px`};+ transition:+ bottom 620ms cubic-bezier(0.22, 1, 0.36, 1),+ right 620ms cubic-bezier(0.22, 1, 0.36, 1);+ z-index: 9;+`;++export const MarkerCursorSlot = styled.div<{+ $pressed?: boolean;+ $visible?: boolean;+}>`+ animation: ${({ $pressed, $visible }) =>+ $pressed && $visible+ ? 'cursor-pop 240ms cubic-bezier(0.22, 1, 0.36, 1)'+ : 'none'};+ left: 0;+ opacity: ${({ $visible = true }) => ($visible ? 1 : 0)};+ position: absolute;+ top: 0;+ transform: translate(-50%, -50%) scale(1);+ transition:+ opacity 180ms ease,+ transform 140ms ease;++ @keyframes cursor-pop {+ 0% {+ transform: translate(-50%, -50%) scale(1);+ }++ 38% {+ transform: translate(-50%, -50%) scale(1.16);+ }++ 68% {+ transform: translate(-50%, -50%) scale(0.93);+ }++ 100% {+ transform: translate(-50%, -50%) scale(1);+ }+ }++ @media (prefers-reduced-motion: reduce) {+ animation: none;+ }+`;++export const MarkerLabelTop = styled.div`+ left: 0;+ position: absolute;+ top: 0;+ transform: translate(-50%, calc(-100% - 24px));+ z-index: 10;+`;++export const MarkerLabelBottom = styled.div`+ left: 0;+ position: absolute;+ top: 0;+ transform: translate(-50%, 26px);+ z-index: 10;+`;++export const AliceLabel = styled.div`+ align-items: center;+ background: ${COLORS.yellow};+ border-radius: 4px;+ display: inline-flex;+ height: 38px;+ justify-content: center;+ min-width: 86px;+ padding: 0 12px;+`;++export const TomMarker = styled.div`+ left: 31px;+ pointer-events: auto;+ position: absolute;+ top: 271px;+ height: 112px;+ width: 92px;+ z-index: 8;+`;++export const TomMarkerMotion = styled.div<{ $hovered: boolean }>`+ align-items: flex-start;+ display: flex;+ flex-direction: column;+ gap: 10px;+ transform: ${({ $hovered }) =>+ $hovered ? 'translate3d(12px, -14px, 0)' : 'translate3d(0, 0, 0)'};+ transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);+ width: 60px;+ will-change: transform;+`;++export const TomArrow = styled.div`+ align-self: flex-end;+ align-items: center;+ display: flex;+ height: 41px;+ justify-content: center;+ width: 38px;+ z-index: 2;+`;++export const TomLabel = styled.div`+ align-items: center;+ background: ${COLORS.orange};+ border-radius: 4px;+ box-sizing: border-box;+ display: inline-flex;+ height: 38px;+ justify-content: center;+ padding: 0 10px;+ position: relative;+ width: 60px;+ z-index: 1;+`;++export const BobMarker = styled.div<{ $hidden?: boolean }>`+ left: ${BOB_MARKER_LEFT}px;+ opacity: ${({ $hidden }) => ($hidden ? 0 : 1)};+ pointer-events: ${({ $hidden }) => ($hidden ? 'none' : 'auto')};+ position: absolute;+ top: ${BOB_MARKER_TOP}px;+ transition: opacity 180ms ease;+ height: 112px;+ width: 96px;+ z-index: 8;+`;++export const BobMarkerMotion = styled.div<{ $hovered: boolean }>`+ transform: ${({ $hovered }) =>+ $hovered ? 'translate3d(-14px, -16px, 0)' : 'translate3d(0, 0, 0)'};+ transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);+ will-change: transform;+`;++export const BobArrow = styled.div`+ height: ${MARKER_CURSOR_HEIGHT}px;+ margin-left: ${BOB_ARROW_LEFT_OFFSET}px;+ position: relative;+ width: ${MARKER_CURSOR_WIDTH}px;+ z-index: 2;+`;++export const BobLabel = styled.div<{ $withTopMargin?: boolean }>`+ align-items: center;+ background: ${COLORS.bobCursor};+ border-radius: 4px;+ display: inline-flex;+ height: 38px;+ justify-content: center;+ margin-top: ${({ $withTopMargin }) => ($withTopMargin ? '10px' : '0')};+ min-width: 60px;+ padding: 0 12px;+ position: relative;+ z-index: 1;+`;diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/token-tones.ts b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/token-tones.tsnew file mode 100644index 00000000000..513460969cb--- /dev/null+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCard/utils/token-tones.ts@@ -0,0 +1,10 @@+export const TOKEN_TONES = {+ amber: { background: '#f6e6d7', color: '#7a4f2a' },+ blue: { background: '#dbeafe', color: '#1d4ed8' },+ gray: { background: '#e5e7eb', color: '#4b5563' },+ pink: { background: '#ffe4e6', color: '#be123c' },+ purple: { background: '#ede9fe', color: '#6d28d9' },+ red: { background: '#fee2e2', color: '#b91c1c' },+ teal: { background: '#ccfbf1', color: '#0f766e' },+ yellow: { background: '#fef2a4', color: '#35290f' },+} as const;diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCards.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCards.tsxindex 0448993ac1a..38fcbe8607f 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCards.tsx+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/FeatureCards.tsx@@ -2,7 +2,7 @@import { ThreeCardsScrollLayoutEffect } from '@/sections/ThreeCards/effect-components/ThreeCardsScrollLayoutEffect';import type { ThreeCardsFeatureCardType } from '@/sections/ThreeCards/types';-import type { ThreeCardsScrollLayoutOptions } from '@/sections/ThreeCards/utils/three-cards-scroll-layout';+import type { ThreeCardsScrollLayoutOptions } from '@/sections/ThreeCards/utils/three-cards-scroll-layout-options';import { theme } from '@/theme';import { styled } from '@linaria/react';import { useRef } from 'react';diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/IllustrationCard/IllustrationCard.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/IllustrationCard/IllustrationCard.tsxindex db1a253e8c2..9fee8479dd9 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/components/IllustrationCard/IllustrationCard.tsx+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/IllustrationCard/IllustrationCard.tsx@@ -1,17 +1,17 @@'use client';import { ButtonShape } from '@/design-system/components/Button/ButtonShape';-import { Body, Heading } from '@/design-system/components';+import { Body, Heading, HeadingPart } from '@/design-system/components';import { ArrowRightIcon } from '@/icons';import { INFORMATIVE_ICONS } from '@/icons/informative';import { LocalizedLink } from '@/lib/i18n';-import { useRenderMessage } from '@/lib/i18n/use-render-message';-import { usePartnerApplicationModal } from '@/lib/partner-application';+import { usePartnerApplicationModal } from '@/sections/PartnerApplication';import { WebGlMount } from '@/lib/visual-runtime';import type { ThreeCardsIllustrationCardType } from '@/sections/ThreeCards/types';import { THREE_CARDS_VISUALS } from '@/sections/ThreeCards/visuals';import { theme } from '@/theme';import type { MessageDescriptor } from '@lingui/core';+import { useLingui } from '@lingui/react';import { css } from '@linaria/core';import { styled } from '@linaria/react';import { ThreeCardsCardShape } from './CardShape';@@ -113,13 +113,12 @@ const BenefitIconSlot = styled.span`const benefitLabelClassName = css`display: block;overflow-wrap: anywhere;- --body-sm-color: ${theme.colors.primary.text[80]};+ --color-text-muted: ${theme.colors.primary.text[80]};`;const simpleCardBodyClassName = css`&& {- color: ${theme.colors.primary.text[80]};- --body-sm-color: ${theme.colors.primary.text[80]};+ --color-text-muted: ${theme.colors.primary.text[80]};}`;@@ -326,9 +325,9 @@ function PartnerProgramAction({label: MessageDescriptor;programId: 'technology' | 'content' | 'solutions';}) {- const renderText = useRenderMessage();+ const { i18n } = useLingui();const { openPartnerApplicationModal } = usePartnerApplicationModal();- const translatedLabel = renderText(label);+ const translatedLabel = i18n._(label);const openModal = () => {openPartnerApplicationModal(programId);@@ -371,7 +370,7 @@ export function IllustrationCard({illustrationCard,variant = 'shaped',}: IllustrationCardProps) {- const renderText = useRenderMessage();+ const { i18n } = useLingui();const Visual = THREE_CARDS_VISUALS[illustrationCard.illustration];return (@@ -382,13 +381,11 @@ export function IllustrationCard({strokeColor={CARD_OUTLINE_COLOR}/>)}- <Heading- as="h3"- renderText={renderText}- segments={illustrationCard.heading}- size="xs"- weight="medium"- />+ <Heading as="h3" size="xs" weight="medium">+ <HeadingPart fontFamily="sans">+ {i18n._(illustrationCard.heading)}+ </HeadingPart>+ </Heading><CardRule /><CardEmbed><WebGlMount>@@ -399,14 +396,14 @@ export function IllustrationCard({<CardLowerSection><CardBodyCell><Body- body={illustrationCard.body}className={variant === 'simple' ? simpleCardBodyClassName : undefined}- renderText={renderText}size="sm"weight="regular"- />+ >+ {i18n._(illustrationCard.body)}+ </Body></CardBodyCell>{variant === 'simple' && illustrationCard.benefits?.length ? (@@ -425,12 +422,12 @@ export function IllustrationCard({</BenefitIconSlot><Bodyas="span"- body={benefit}className={benefitLabelClassName}- renderText={renderText}size="sm"weight="regular"- />+ >+ {i18n._(benefit.text)}+ </Body></BenefitItem>);})}@@ -447,19 +444,13 @@ export function IllustrationCard({{illustrationCard.attribution && (<CardFooter>- <Body- body={illustrationCard.attribution.role}- renderText={renderText}- size="xs"- weight="medium"- />+ <Body size="xs" weight="medium">+ {i18n._(illustrationCard.attribution.role)}+ </Body><AttributionPipe aria-hidden />- <Body- body={illustrationCard.attribution.company}- renderText={renderText}- size="xs"- weight="regular"- />+ <Body size="xs" weight="regular">+ {i18n._(illustrationCard.attribution.company)}+ </Body>{illustrationCard.caseStudySlug !== undefined ? (<FooterTrailingAction><PartnerActionIconLinkButtondiff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/IllustrationCards.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/IllustrationCards.tsxindex 55b26864788..47a0f602fe3 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/components/IllustrationCards.tsx+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/IllustrationCards.tsx@@ -2,7 +2,7 @@import { ThreeCardsScrollLayoutEffect } from '@/sections/ThreeCards/effect-components/ThreeCardsScrollLayoutEffect';import type { ThreeCardsIllustrationCardType } from '@/sections/ThreeCards/types';-import type { ThreeCardsScrollLayoutOptions } from '@/sections/ThreeCards/utils/three-cards-scroll-layout';+import type { ThreeCardsScrollLayoutOptions } from '@/sections/ThreeCards/utils/three-cards-scroll-layout-options';import { theme } from '@/theme';import { styled } from '@linaria/react';import { useRef } from 'react';diff --git a/packages/twenty-website-new/src/sections/ThreeCards/components/Root.tsx b/packages/twenty-website-new/src/sections/ThreeCards/components/Root.tsxindex 7ba69d107fa..1bc72871da0 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/components/Root.tsx+++ b/packages/twenty-website-new/src/sections/ThreeCards/components/Root.tsx@@ -1,10 +1,22 @@import { Container } from '@/design-system/components';-import { theme } from '@/theme';+import { theme, type Scheme } from '@/theme';import { styled } from '@linaria/react';import type { ReactNode } from 'react';const StyledSection = styled.section`width: 100%;++ &[data-scheme='light'] {+ background-color: var(--color-white);+ }++ &[data-scheme='muted'] {+ background-color: var(--color-neutral);+ }++ &[data-scheme='dark'] {+ background-color: var(--color-black);+ }`;const StyledContainer = styled(Container)<{ compactTop: boolean }>`@@ -28,18 +40,23 @@ const StyledContainer = styled(Container)<{ compactTop: boolean }>``;type RootProps = {- backgroundColor: string;+ backgroundColor?: string;children: ReactNode;compactTop?: boolean;+ scheme?: Scheme;};export function Root({backgroundColor,children,compactTop = false,+ scheme,}: RootProps) {return (- <StyledSection style={{ backgroundColor }}>+ <StyledSection+ data-scheme={scheme}+ style={scheme ? undefined : { backgroundColor }}+ ><StyledContainer compactTop={compactTop}>{children}</StyledContainer></StyledSection>);diff --git a/packages/twenty-website-new/src/sections/ThreeCards/effect-components/ThreeCardsScrollLayoutEffect.tsx b/packages/twenty-website-new/src/sections/ThreeCards/effect-components/ThreeCardsScrollLayoutEffect.tsxindex ac05a35705f..60ffba45ae7 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/effect-components/ThreeCardsScrollLayoutEffect.tsx+++ b/packages/twenty-website-new/src/sections/ThreeCards/effect-components/ThreeCardsScrollLayoutEffect.tsx@@ -1,16 +1,15 @@'use client';-import { useCallback } from 'react';+import { type RefObject, useCallback } from 'react';import { useScheduledOnScroll } from '@/lib/scroll';-import {- applyThreeCardsScrollLayout,- type ThreeCardsScrollLayoutOptions,- type ThreeCardsScrollLayoutRefs,-} from '@/sections/ThreeCards/utils/three-cards-scroll-layout';+import { applyThreeCardsScrollLayout } from '@/sections/ThreeCards/utils/three-cards-scroll-layout';+import type { ThreeCardsScrollLayoutOptions } from '@/sections/ThreeCards/utils/three-cards-scroll-layout-options';-type ThreeCardsScrollLayoutEffectProps = ThreeCardsScrollLayoutRefs & {+type ThreeCardsScrollLayoutEffectProps = {cardCount: number;+ cardRefs: RefObject<(HTMLDivElement | null)[]>;+ gridRef: RefObject<HTMLDivElement | null>;layoutOptions?: ThreeCardsScrollLayoutOptions;};diff --git a/packages/twenty-website-new/src/sections/ThreeCards/index.ts b/packages/twenty-website-new/src/sections/ThreeCards/index.tsnew file mode 100644index 00000000000..c054b4458c2--- /dev/null+++ b/packages/twenty-website-new/src/sections/ThreeCards/index.ts@@ -0,0 +1,7 @@+export { ThreeCards } from './components';+export type {+ ThreeCardsFeatureCardType,+ ThreeCardsIllustrationCardAttributionType,+ ThreeCardsIllustrationCardType,+} from './types';+export type { ThreeCardsScrollLayoutOptions } from './utils/three-cards-scroll-layout-options';diff --git a/packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsBase.ts b/packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsBase.tsdeleted file mode 100644index 9e34d8beff3..00000000000--- a/packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsBase.ts+++ /dev/null@@ -1,5 +0,0 @@-import type { MessageEyebrow } from '@/lib/i18n/message-eyebrow';--export type ThreeCardsBaseDataType = {- eyebrow: MessageEyebrow;-};diff --git a/packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsFeatureData.ts b/packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsFeatureData.tsdeleted file mode 100644index 3b09eecae61..00000000000--- a/packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsFeatureData.ts+++ /dev/null@@ -1,6 +0,0 @@-import type { ThreeCardsBaseDataType } from './ThreeCardsBase';-import type { ThreeCardsFeatureCardType } from './ThreeCardsFeatureCard';--export type ThreeCardsFeatureCardsDataType = ThreeCardsBaseDataType & {- featureCards: ThreeCardsFeatureCardType[];-};diff --git a/packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsIllustrationCardAttribution.ts b/packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsIllustrationCardAttribution.tsdeleted file mode 100644index d284354be27..00000000000--- a/packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsIllustrationCardAttribution.ts+++ /dev/null@@ -1,6 +0,0 @@-import type { MessageBody } from '@/lib/i18n/message-body';--export type ThreeCardsIllustrationCardAttributionType = {- role: MessageBody;- company: MessageBody;-};diff --git a/packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsIllustrationData.ts b/packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsIllustrationData.tsdeleted file mode 100644index f1b14875654..00000000000--- a/packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsIllustrationData.ts+++ /dev/null@@ -1,8 +0,0 @@-import type { MessageBody } from '@/lib/i18n/message-body';-import type { ThreeCardsBaseDataType } from './ThreeCardsBase';-import type { ThreeCardsIllustrationCardType } from './ThreeCardsIllustrationCard';--export type ThreeCardsIllustrationDataType = ThreeCardsBaseDataType & {- body?: MessageBody;- illustrationCards: ThreeCardsIllustrationCardType[];-};diff --git a/packages/twenty-website-new/src/sections/ThreeCards/types/index.ts b/packages/twenty-website-new/src/sections/ThreeCards/types/index.tsindex 6a366c8ed92..48109d2c8ff 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/types/index.ts+++ b/packages/twenty-website-new/src/sections/ThreeCards/types/index.ts@@ -1,6 +1,3 @@-export type { ThreeCardsBaseDataType } from './ThreeCardsBase';-export type { ThreeCardsIllustrationCardAttributionType } from './ThreeCardsIllustrationCardAttribution';-export type { ThreeCardsIllustrationCardType } from './ThreeCardsIllustrationCard';-export type { ThreeCardsIllustrationDataType } from './ThreeCardsIllustrationData';-export type { ThreeCardsFeatureCardType } from './ThreeCardsFeatureCard';-export type { ThreeCardsFeatureCardsDataType } from './ThreeCardsFeatureData';+export type { ThreeCardsIllustrationCardAttributionType } from './three-cards-illustration-card-attribution';+export type { ThreeCardsIllustrationCardType } from './three-cards-illustration-card';+export type { ThreeCardsFeatureCardType } from './three-cards-feature-card';diff --git a/packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsFeatureCard.ts b/packages/twenty-website-new/src/sections/ThreeCards/types/three-cards-feature-card.tssimilarity index 75%rename from packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsFeatureCard.tsrename to packages/twenty-website-new/src/sections/ThreeCards/types/three-cards-feature-card.tsindex 85172ed3fe3..81ca846b0d7 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsFeatureCard.ts+++ b/packages/twenty-website-new/src/sections/ThreeCards/types/three-cards-feature-card.ts@@ -1,10 +1,9 @@-import type { MessageBody } from '@/lib/i18n/message-body';-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';+import type { MessageDescriptor } from '@lingui/core';import type { ImageType } from '@/design-system/components/Image';type ThreeCardsFeatureCardBaseType = {- heading: MessageHeadingSegment;- body: MessageBody;+ heading: MessageDescriptor;+ body: MessageDescriptor;backgroundImageSrc?: string;backgroundImageRotationDeg?: number;icon: 'fast-path' | 'live-data' | 'users-group';diff --git a/packages/twenty-website-new/src/sections/ThreeCards/types/three-cards-illustration-card-attribution.ts b/packages/twenty-website-new/src/sections/ThreeCards/types/three-cards-illustration-card-attribution.tsnew file mode 100644index 00000000000..8d6845bf20b--- /dev/null+++ b/packages/twenty-website-new/src/sections/ThreeCards/types/three-cards-illustration-card-attribution.ts@@ -0,0 +1,6 @@+import type { MessageDescriptor } from '@lingui/core';++export type ThreeCardsIllustrationCardAttributionType = {+ role: MessageDescriptor;+ company: MessageDescriptor;+};diff --git a/packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsIllustrationCard.ts b/packages/twenty-website-new/src/sections/ThreeCards/types/three-cards-illustration-card.tssimilarity index 54%rename from packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsIllustrationCard.tsrename to packages/twenty-website-new/src/sections/ThreeCards/types/three-cards-illustration-card.tsindex a5bc3f61699..f845b1a08a9 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/types/ThreeCardsIllustrationCard.ts+++ b/packages/twenty-website-new/src/sections/ThreeCards/types/three-cards-illustration-card.ts@@ -1,26 +1,15 @@-import type { MessageBody } from '@/lib/i18n/message-body';-import type { MessageHeadingSegment } from '@/lib/i18n/message-heading-segment';import type { MessageDescriptor } from '@lingui/core';-import { type ThreeCardsIllustrationCardAttributionType } from './ThreeCardsIllustrationCardAttribution';+import { type ThreeCardsIllustrationCardAttributionType } from './three-cards-illustration-card-attribution';+import type { ThreeCardsIllustrationId } from './three-cards-illustration-id';-export type ThreeCardsIllustrationId =- | 'connect'- | 'diamond'- | 'eye'- | 'flash'- | 'grow'- | 'lock'- | 'programming'- | 'singleScreen'- | 'speed';--export type ThreeCardsIllustrationCardActionType = {+type ThreeCardsIllustrationCardActionType = {kind: 'partnerApplication';label: MessageDescriptor;programId: 'technology' | 'content' | 'solutions';};-export type ThreeCardsIllustrationBenefitType = MessageBody & {+type ThreeCardsIllustrationBenefitType = {+ text: MessageDescriptor;icon?:| 'book'| 'check'@@ -33,8 +22,8 @@ export type ThreeCardsIllustrationBenefitType = MessageBody & {};export type ThreeCardsIllustrationCardType = {- heading: MessageHeadingSegment;- body: MessageBody;+ heading: MessageDescriptor;+ body: MessageDescriptor;benefits?: ThreeCardsIllustrationBenefitType[];action?: ThreeCardsIllustrationCardActionType;attribution?: ThreeCardsIllustrationCardAttributionType;diff --git a/packages/twenty-website-new/src/sections/ThreeCards/types/three-cards-illustration-id.ts b/packages/twenty-website-new/src/sections/ThreeCards/types/three-cards-illustration-id.tsnew file mode 100644index 00000000000..f43a6520ee6--- /dev/null+++ b/packages/twenty-website-new/src/sections/ThreeCards/types/three-cards-illustration-id.ts@@ -0,0 +1,10 @@+export type ThreeCardsIllustrationId =+ | 'connect'+ | 'diamond'+ | 'eye'+ | 'flash'+ | 'grow'+ | 'lock'+ | 'programming'+ | 'singleScreen'+ | 'speed';diff --git a/packages/twenty-website-new/src/sections/ThreeCards/utils/three-cards-scroll-layout-options.ts b/packages/twenty-website-new/src/sections/ThreeCards/utils/three-cards-scroll-layout-options.tsnew file mode 100644index 00000000000..4a966e11489--- /dev/null+++ b/packages/twenty-website-new/src/sections/ThreeCards/utils/three-cards-scroll-layout-options.ts@@ -0,0 +1,7 @@+export type ThreeCardsScrollLayoutOptions = {+ endEdgeRatio?: number;+ initialScale?: number;+ initialTranslateY?: number;+ opacityRamp?: number;+ stagger?: number;+};diff --git a/packages/twenty-website-new/src/sections/ThreeCards/utils/three-cards-scroll-layout.ts b/packages/twenty-website-new/src/sections/ThreeCards/utils/three-cards-scroll-layout.tsindex 719ae82af99..7eeeae44f39 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/utils/three-cards-scroll-layout.ts+++ b/packages/twenty-website-new/src/sections/ThreeCards/utils/three-cards-scroll-layout.ts@@ -2,6 +2,8 @@ import type { RefObject } from 'react';import { theme } from '@/theme';+import type { ThreeCardsScrollLayoutOptions } from './three-cards-scroll-layout-options';+function clamp01(value: number) {return Math.min(1, Math.max(0, value));}@@ -10,19 +12,11 @@ function easeOutQuint(t: number) {return 1 - Math.pow(1 - t, 5);}-export type ThreeCardsScrollLayoutRefs = {+type ThreeCardsScrollLayoutRefs = {cardRefs: RefObject<(HTMLDivElement | null)[]>;gridRef: RefObject<HTMLDivElement | null>;};-export type ThreeCardsScrollLayoutOptions = {- endEdgeRatio?: number;- initialScale?: number;- initialTranslateY?: number;- opacityRamp?: number;- stagger?: number;-};-const DEFAULT_SCROLL_LAYOUT_OPTIONS: Required<ThreeCardsScrollLayoutOptions> = {endEdgeRatio: 0.2,initialScale: 0.88,diff --git a/packages/twenty-website-new/src/sections/ThreeCards/visuals/PartnerThreeCard.tsx b/packages/twenty-website-new/src/sections/ThreeCards/visuals/PartnerThreeCard.tsxindex 19f3d4ff33d..874cd64be30 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/visuals/PartnerThreeCard.tsx+++ b/packages/twenty-website-new/src/sections/ThreeCards/visuals/PartnerThreeCard.tsx@@ -4,18 +4,196 @@ import {createFallbackGeometry,HalftoneCanvas,loadImportedGeometryFromUrl,+ normalizeHalftoneStudioSettings,type HalftoneAnimationSettings,type HalftoneExportPose,+ type HalftoneStudioSettings,+ type ImportedGeometryNormalizationOptions,} from '@/lib/halftone';-import { type CSSProperties, useEffect, useState } from 'react';+import { useAsyncGeometry } from '@/lib/visual-runtime/hooks/use-async-geometry';+import { type CSSProperties, useCallback } from 'react';import type * as THREE from 'three';-import {- buildPartnerThreeCardInitialPose,- buildPartnerThreeCardSettings,- getPartnerThreeCardGeometryOptions,- PARTNER_THREE_CARD_PREVIEW_DISTANCE,-} from './partner-three-card-config';+const PARTNER_THREE_CARD_PREVIEW_DISTANCE = 4.5;++const DIAMOND_MODEL_URL = '/illustrations/home/three-cards/diamond.glb';++const BASE_PARTNER_THREE_CARD_SETTINGS = normalizeHalftoneStudioSettings({+ sourceMode: 'shape',+ shapeKey: 'userUpload_1776089370856',+ lighting: {+ intensity: 1.5,+ fillIntensity: 0.48,+ ambientIntensity: 0.3,+ angleDegrees: 53,+ height: 2,+ },+ material: {+ surface: 'solid',+ color: '#d4d0c8',+ roughness: 0.42,+ metalness: 0.15,+ thickness: 150,+ refraction: 2,+ environmentPower: 5,+ },+ halftone: {+ enabled: true,+ scale: 14,+ power: 0.4,+ toneTarget: 'light',+ width: 0.5,+ imageContrast: 1,+ dashColor: '#4A38F5',+ hoverDashColor: '#4A38F5',+ },+ background: {+ transparent: true,+ color: '#000000',+ },+ animation: {+ autoRotateEnabled: true,+ breatheEnabled: false,+ cameraParallaxEnabled: false,+ followHoverEnabled: false,+ followDragEnabled: true,+ floatEnabled: false,+ hoverHalftoneEnabled: false,+ hoverLightEnabled: false,+ dragFlowEnabled: false,+ lightSweepEnabled: false,+ rotateEnabled: false,+ autoSpeed: 0.1,+ autoWobble: 0,+ breatheAmount: 0.04,+ breatheSpeed: 0.8,+ cameraParallaxAmount: 0.3,+ cameraParallaxEase: 0.08,+ driftAmount: 8,+ hoverRange: 25,+ hoverEase: 0.19,+ hoverReturn: true,+ dragSens: 0.008,+ dragFriction: 0.08,+ dragMomentum: true,+ rotateAxis: 'y',+ rotatePreset: 'axis',+ rotateSpeed: 0.1,+ rotatePingPong: false,+ floatAmplitude: 0.16,+ floatSpeed: 0.8,+ lightSweepHeightRange: 0.5,+ lightSweepRange: 28,+ lightSweepSpeed: 0.7,+ springDamping: 0.6,+ springReturnEnabled: true,+ springStrength: 0.06,+ hoverHalftonePowerShift: 0.42,+ hoverHalftoneRadius: 0.2,+ hoverHalftoneWidthShift: -0.18,+ hoverLightIntensity: 0.8,+ hoverLightRadius: 0.2,+ dragFlowDecay: 0.08,+ dragFlowRadius: 0.24,+ dragFlowStrength: 1.8,+ hoverWarpStrength: 3,+ hoverWarpRadius: 0.15,+ dragWarpStrength: 5,+ waveEnabled: false,+ waveSpeed: 1,+ waveAmount: 2,+ },+});++const BASE_PARTNER_THREE_CARD_INITIAL_POSE: HalftoneExportPose = {+ autoElapsed: 11.523399999928483,+ rotateElapsed: 0,+ rotationX: -4.020043134225878e-15,+ rotationY: 1.1339840023154435,+ rotationZ: 0,+ targetRotationX: 0,+ targetRotationY: 0,+ timeElapsed: 11.523399999928476,+};++type PartnerThreeCardModelOverrides = {+ geometryOptions?: ImportedGeometryNormalizationOptions;+ initialPose?: Partial<HalftoneExportPose>;+};++const getPartnerThreeCardModelOverrides = (+ modelUrl: string,+): PartnerThreeCardModelOverrides => {+ if (modelUrl !== DIAMOND_MODEL_URL) {+ return {};+ }++ return {+ geometryOptions: {+ postRotateZ: 1,+ useLegacyNormalization: true,+ },+ initialPose: {+ autoElapsed: 0,+ rotateElapsed: 0,+ rotationX: 0,+ rotationY: 0,+ rotationZ: 0,+ targetRotationX: 0,+ targetRotationY: 0,+ timeElapsed: 0,+ },+ };+};++const buildPartnerThreeCardSettings = (+ animationOverrides?: Partial<HalftoneAnimationSettings>,+): HalftoneStudioSettings => ({+ ...BASE_PARTNER_THREE_CARD_SETTINGS,+ animation: {+ ...BASE_PARTNER_THREE_CARD_SETTINGS.animation,+ ...animationOverrides,+ },+});++const buildPartnerThreeCardInitialPose = ({+ initialRotationX,+ initialRotationY,+ initialRotationZ,+ modelUrl,+}: {+ initialRotationX?: number;+ initialRotationY?: number;+ initialRotationZ?: number;+ modelUrl: string;+}): HalftoneExportPose => {+ const modelOverrides = getPartnerThreeCardModelOverrides(modelUrl);+ const initialPose = {+ ...BASE_PARTNER_THREE_CARD_INITIAL_POSE,+ ...modelOverrides.initialPose,+ };++ return {+ ...initialPose,+ rotationX:+ initialRotationX ??+ modelOverrides.initialPose?.rotationX ??+ BASE_PARTNER_THREE_CARD_INITIAL_POSE.rotationX,+ rotationY:+ initialRotationY ??+ modelOverrides.initialPose?.rotationY ??+ BASE_PARTNER_THREE_CARD_INITIAL_POSE.rotationY,+ rotationZ:+ initialRotationZ ??+ modelOverrides.initialPose?.rotationZ ??+ BASE_PARTNER_THREE_CARD_INITIAL_POSE.rotationZ,+ };+};++const getPartnerThreeCardGeometryOptions = (+ modelUrl: string,+): ImportedGeometryNormalizationOptions | undefined =>+ getPartnerThreeCardModelOverrides(modelUrl).geometryOptions;type PartnerThreeCardProps = {animationOverrides?: Partial<HalftoneAnimationSettings>;@@ -76,31 +254,11 @@ export function PartnerThreeCard({modelUrl,style,}: PartnerThreeCardProps) {- const [geometry, setGeometry] = useState<THREE.BufferGeometry | null>(null);-- useEffect(() => {- let cancelled = false;- let loadedGeometry: THREE.BufferGeometry | null = null;-- setGeometry(null);-- void loadPartnerThreeCardGeometry({ meshScaleMultiplier, modelUrl }).then(- (nextGeometry) => {- if (cancelled) {- nextGeometry.dispose();- return;- }-- loadedGeometry = nextGeometry;- setGeometry(nextGeometry);- },- );-- return () => {- cancelled = true;- loadedGeometry?.dispose();- };- }, [meshScaleMultiplier, modelUrl]);+ const loadGeometry = useCallback(+ () => loadPartnerThreeCardGeometry({ meshScaleMultiplier, modelUrl }),+ [meshScaleMultiplier, modelUrl],+ );+ const geometry = useAsyncGeometry(loadGeometry, [loadGeometry]);return (<div@@ -130,5 +288,3 @@ export function PartnerThreeCard({</div>);}--export default PartnerThreeCard;diff --git a/packages/twenty-website-new/src/sections/ThreeCards/visuals/index.tsx b/packages/twenty-website-new/src/sections/ThreeCards/visuals/index.tsxindex 311c5308fbc..7f630b111ea 100644--- a/packages/twenty-website-new/src/sections/ThreeCards/visuals/index.tsx+++ b/packages/twenty-website-new/src/sections/ThreeCards/visuals/index.tsx@@ -1,5 +1,5 @@import type { ComponentType } from 'react';-import type { ThreeCardsIllustrationId } from '@/sections/ThreeCards/types/ThreeCardsIllustrationCard';+import type { ThreeCardsIllustrationId } from '@/sections/ThreeCards/types/three-cards-illustration-id';import { Eye } from './Eye';import { PartnerThreeCard } from './PartnerThreeCard';import { SingleScreen } from './SingleScreen';diff --git a/packages/twenty-website-new/src/sections/ThreeCards/visuals/partner-three-card-config.ts b/packages/twenty-website-new/src/sections/ThreeCards/visuals/partner-three-card-config.tsdeleted file mode 100644index 5260d2fd5c6..00000000000--- a/packages/twenty-website-new/src/sections/ThreeCards/visuals/partner-three-card-config.ts+++ /dev/null@@ -1,188 +0,0 @@-import {- normalizeHalftoneStudioSettings,- type HalftoneAnimationSettings,- type HalftoneExportPose,- type HalftoneStudioSettings,- type ImportedGeometryNormalizationOptions,-} from '@/lib/halftone';--export const PARTNER_THREE_CARD_PREVIEW_DISTANCE = 4.5;--const DIAMOND_MODEL_URL = '/illustrations/home/three-cards/diamond.glb';--const BASE_PARTNER_THREE_CARD_SETTINGS = normalizeHalftoneStudioSettings({- sourceMode: 'shape',- shapeKey: 'userUpload_1776089370856',- lighting: {- intensity: 1.5,- fillIntensity: 0.48,- ambientIntensity: 0.3,- angleDegrees: 53,- height: 2,- },- material: {- surface: 'solid',- color: '#d4d0c8',- roughness: 0.42,- metalness: 0.15,- thickness: 150,- refraction: 2,- environmentPower: 5,- },- halftone: {- enabled: true,- scale: 14,- power: 0.4,- toneTarget: 'light',- width: 0.5,- imageContrast: 1,- dashColor: '#4A38F5',- hoverDashColor: '#4A38F5',- },- background: {- transparent: true,- color: '#000000',- },- animation: {- autoRotateEnabled: true,- breatheEnabled: false,- cameraParallaxEnabled: false,- followHoverEnabled: false,- followDragEnabled: true,- floatEnabled: false,- hoverHalftoneEnabled: false,- hoverLightEnabled: false,- dragFlowEnabled: false,- lightSweepEnabled: false,- rotateEnabled: false,- autoSpeed: 0.1,- autoWobble: 0,- breatheAmount: 0.04,- breatheSpeed: 0.8,- cameraParallaxAmount: 0.3,- cameraParallaxEase: 0.08,- driftAmount: 8,- hoverRange: 25,- hoverEase: 0.19,- hoverReturn: true,- dragSens: 0.008,- dragFriction: 0.08,- dragMomentum: true,- rotateAxis: 'y',- rotatePreset: 'axis',- rotateSpeed: 0.1,- rotatePingPong: false,- floatAmplitude: 0.16,- floatSpeed: 0.8,- lightSweepHeightRange: 0.5,- lightSweepRange: 28,- lightSweepSpeed: 0.7,- springDamping: 0.6,- springReturnEnabled: true,- springStrength: 0.06,- hoverHalftonePowerShift: 0.42,- hoverHalftoneRadius: 0.2,- hoverHalftoneWidthShift: -0.18,- hoverLightIntensity: 0.8,- hoverLightRadius: 0.2,- dragFlowDecay: 0.08,- dragFlowRadius: 0.24,- dragFlowStrength: 1.8,- hoverWarpStrength: 3,- hoverWarpRadius: 0.15,- dragWarpStrength: 5,- waveEnabled: false,- waveSpeed: 1,- waveAmount: 2,- },-});--const BASE_PARTNER_THREE_CARD_INITIAL_POSE: HalftoneExportPose = {- autoElapsed: 11.523399999928483,- rotateElapsed: 0,- rotationX: -4.020043134225878e-15,- rotationY: 1.1339840023154435,- rotationZ: 0,- targetRotationX: 0,- targetRotationY: 0,- timeElapsed: 11.523399999928476,-};--type PartnerThreeCardModelOverrides = {- geometryOptions?: ImportedGeometryNormalizationOptions;- initialPose?: Partial<HalftoneExportPose>;-};--const getPartnerThreeCardModelOverrides = (- modelUrl: string,-): PartnerThreeCardModelOverrides => {- if (modelUrl !== DIAMOND_MODEL_URL) {- return {};- }-- return {- geometryOptions: {- postRotateZ: 1,- useLegacyNormalization: true,- },- initialPose: {- autoElapsed: 0,- rotateElapsed: 0,- rotationX: 0,- rotationY: 0,- rotationZ: 0,- targetRotationX: 0,- targetRotationY: 0,- timeElapsed: 0,- },- };-};--export const buildPartnerThreeCardSettings = (- animationOverrides?: Partial<HalftoneAnimationSettings>,-): HalftoneStudioSettings => ({- ...BASE_PARTNER_THREE_CARD_SETTINGS,- animation: {- ...BASE_PARTNER_THREE_CARD_SETTINGS.animation,- ...animationOverrides,- },-});--export const buildPartnerThreeCardInitialPose = ({- initialRotationX,- initialRotationY,- initialRotationZ,- modelUrl,-}: {- initialRotationX?: number;- initialRotationY?: number;- initialRotationZ?: number;- modelUrl: string;-}): HalftoneExportPose => {- const modelOverrides = getPartnerThreeCardModelOverrides(modelUrl);- const initialPose = {- ...BASE_PARTNER_THREE_CARD_INITIAL_POSE,- ...modelOverrides.initialPose,- };-- return {- ...initialPose,- rotationX:- initialRotationX ??- modelOverrides.initialPose?.rotationX ??- BASE_PARTNER_THREE_CARD_INITIAL_POSE.rotationX,- rotationY:- initialRotationY ??- modelOverrides.initialPose?.rotationY ??- BASE_PARTNER_THREE_CARD_INITIAL_POSE.rotationY,- rotationZ:- initialRotationZ ??- modelOverrides.initialPose?.rotationZ ??- BASE_PARTNER_THREE_CARD_INITIAL_POSE.rotationZ,- };-};--export const getPartnerThreeCardGeometryOptions = (- modelUrl: string,-): ImportedGeometryNormalizationOptions | undefined =>- getPartnerThreeCardModelOverrides(modelUrl).geometryOptions;diff --git a/packages/twenty-website-new/src/sections/TrustedBy/components/Root.tsx b/packages/twenty-website-new/src/sections/TrustedBy/TrustedBy.tsxsimilarity index 56%rename from packages/twenty-website-new/src/sections/TrustedBy/components/Root.tsxrename to packages/twenty-website-new/src/sections/TrustedBy/TrustedBy.tsxindex 355b1787205..8c5a1d4045a 100644--- a/packages/twenty-website-new/src/sections/TrustedBy/components/Root.tsx+++ b/packages/twenty-website-new/src/sections/TrustedBy/TrustedBy.tsx@@ -2,19 +2,20 @@ import { Container } from '@/design-system/components';import { PlusIcon } from '@/icons';import { theme } from '@/theme';import { styled } from '@linaria/react';-import {- Children,- isValidElement,- type ReactElement,- type ReactNode,-} from 'react';+import NextImage from 'next/image';+import type { ReactNode } from 'react';-import { ClientCount } from './ClientCount/ClientCount';-import { Logos } from './Logos';-import { Separator } from './Separator';+export type TrustedByLogosType = {+ fit?: 'contain' | 'cover';+ grayBrightness?: number;+ grayOpacity?: number;+ src: string;+};const CORNER_SIZE = 14;const CORNER_OFFSET = '-7px';+const DEFAULT_GRAY_BRIGHTNESS = 1;+const DEFAULT_GRAY_OPACITY = 0.72;const StyledSection = styled.section<{compactTop: boolean;@@ -49,9 +50,7 @@ const StyledContainer = styled(Container)`}`;-const StyledCard = styled.div<{- backgroundColor?: string;-}>`+const StyledCard = styled.div<{ backgroundColor?: string }>`align-items: center;background-color: ${({ backgroundColor }) =>backgroundColor ?? theme.colors.primary.background[100]};@@ -137,60 +136,123 @@ const CornerBottomRight = styled(CornerMarker)`right: ${CORNER_OFFSET};`;+const SeparatorRow = styled.div`+ display: flex;+ justify-content: center;+ width: 100%;+`;++const SeparatorText = styled.p`+ color: ${theme.colors.primary.text[60]};+ font-size: ${theme.font.size(3)};+ font-family: ${theme.font.family.mono};+ font-weight: ${theme.font.weight.medium};+ text-transform: uppercase;+ white-space: nowrap;+ letter-spacing: 0;+ line-height: ${theme.font.size(4)};+`;++const LogoStrip = styled.div`+ align-items: center;+ display: grid;+ gap: ${theme.spacing(4)} ${theme.spacing(4)};+ grid-template-columns: repeat(3, minmax(0, max-content));+ justify-content: center;+ justify-items: center;++ & > :last-child:nth-child(3n + 1) {+ grid-column: 2;+ }++ @media (min-width: ${theme.breakpoints.md}px) {+ display: flex;+ flex-wrap: wrap;+ gap: ${theme.spacing(8)};+ justify-content: center;+ }+`;++const StyledLogo = styled.div`+ height: 28px;+ flex-shrink: 0;+ overflow: clip;+ position: relative;+ width: 56px;++ @media (min-width: ${theme.breakpoints.md}px) {+ height: 32px;+ width: 64px;+ }+`;++const StyledChip = styled.div`+ align-items: center;+ display: inline-flex;+ flex-shrink: 0;+ gap: ${theme.spacing(2)};++ img {+ filter: grayscale(1);+ opacity: 0.72;+ }+`;++const StyledCountText = styled.span`+ color: ${theme.colors.primary.text[80]};+ font-family: ${theme.font.family.mono};+ font-size: ${theme.font.size(3)};+ font-weight: ${theme.font.weight.medium};+ letter-spacing: 0.02em;+ line-height: 1;+ text-transform: uppercase;+ white-space: nowrap;+`;++function Logo({+ fit = 'contain',+ grayBrightness = DEFAULT_GRAY_BRIGHTNESS,+ grayOpacity = DEFAULT_GRAY_OPACITY,+ src,+}: TrustedByLogosType) {+ return (+ <StyledLogo aria-hidden="true">+ <NextImage+ alt=""+ fill+ sizes="(min-width: 921px) 80px, 64px"+ src={src}+ unoptimized+ style={{+ filter: `grayscale(1) brightness(${grayBrightness})`,+ objectFit: fit,+ objectPosition: 'center',+ opacity: grayOpacity,+ }}+ />+ </StyledLogo>+ );+}+interface RootProps {- children: ReactNode;+ separator: ReactNode;+ logos: TrustedByLogosType[];+ clientCount: ReactNode;compactTop?: boolean;compactBottom?: boolean;backgroundColor?: string;cardBackgroundColor?: string;}-function findSlot(- children: ReactNode,- type: { displayName?: string },-): ReactElement | null {- let found: ReactElement | null = null;- let count = 0;- Children.forEach(children, (child) => {- if (- isValidElement(child) &&- typeof child.type === 'function' &&- (child.type as { displayName?: string }).displayName === type.displayName- ) {- if (found === null) {- found = child;- }- count += 1;- }- });- if (count > 1 && process.env.NODE_ENV !== 'production') {- throw new Error(- `<TrustedBy.Root> received ${count} <${type.displayName}> children — exactly one is expected.`,- );- }- return found;-}--export function Root({- children,+function Root({+ separator,+ logos,+ clientCount,compactTop = false,compactBottom = false,backgroundColor,cardBackgroundColor,}: RootProps) {- const label = findSlot(children, Separator);- const logos = findSlot(children, Logos);- const count = findSlot(children, ClientCount);-- if (- process.env.NODE_ENV !== 'production' &&- (label === null || logos === null || count === null)- ) {- throw new Error(- '<TrustedBy.Root> requires <TrustedBy.Separator>, <TrustedBy.Logos>, and <TrustedBy.ClientCount> children.',- );- }-return (<StyledSectionaria-label="Trusted by leading organizations"@@ -224,11 +286,40 @@ export function Root({strokeColor={theme.colors.highlight[100]}/></CornerBottomRight>- <StyledLabelCell>{label}</StyledLabelCell>- <StyledLogosCell>{logos}</StyledLogosCell>- <StyledCountCell>{count}</StyledCountCell>+ <StyledLabelCell>+ <SeparatorRow>+ <SeparatorText>{separator}</SeparatorText>+ </SeparatorRow>+ </StyledLabelCell>+ <StyledLogosCell>+ <LogoStrip>+ {logos.map((logo, index) => (+ <Logo+ fit={logo.fit}+ grayBrightness={logo.grayBrightness}+ grayOpacity={logo.grayOpacity}+ key={`${logo.src}-${index}`}+ src={logo.src}+ />+ ))}+ </LogoStrip>+ </StyledLogosCell>+ <StyledCountCell>+ <StyledChip>+ <NextImage+ alt=""+ height={14}+ src="/images/home/logo-bar/others-icon.svg"+ unoptimized+ width={14}+ />+ <StyledCountText>{clientCount}</StyledCountText>+ </StyledChip>+ </StyledCountCell></StyledCard></StyledContainer></StyledSection>);}++export const TrustedBy = { Root };diff --git a/packages/twenty-website-new/src/sections/TrustedBy/components/ClientCount/ClientCount.tsx b/packages/twenty-website-new/src/sections/TrustedBy/components/ClientCount/ClientCount.tsxdeleted file mode 100644index 20bf9fac335..00000000000--- a/packages/twenty-website-new/src/sections/TrustedBy/components/ClientCount/ClientCount.tsx+++ /dev/null@@ -1,49 +0,0 @@-import type { MessageDescriptor } from '@lingui/core';-import { theme } from '@/theme';-import { styled } from '@linaria/react';-import NextImage from 'next/image';--const StyledChip = styled.div`- align-items: center;- display: inline-flex;- flex-shrink: 0;- gap: ${theme.spacing(2)};-- img {- filter: grayscale(1);- opacity: 0.72;- }-`;--const StyledText = styled.span`- color: ${theme.colors.primary.text[80]};- font-family: ${theme.font.family.mono};- font-size: ${theme.font.size(3)};- font-weight: ${theme.font.weight.medium};- letter-spacing: 0.02em;- line-height: 1;- text-transform: uppercase;- white-space: nowrap;-`;--type ClientCountProps = {- label: MessageDescriptor;- renderText: (descriptor: MessageDescriptor) => string;-};--export function ClientCount({ label, renderText }: ClientCountProps) {- return (- <StyledChip>- <NextImage- alt=""- height={14}- src="/images/home/logo-bar/others-icon.svg"- unoptimized- width={14}- />- <StyledText>{renderText(label)}</StyledText>- </StyledChip>- );-}--ClientCount.displayName = 'TrustedBy.ClientCount';diff --git a/packages/twenty-website-new/src/sections/TrustedBy/components/Logo.tsx b/packages/twenty-website-new/src/sections/TrustedBy/components/Logo.tsxdeleted file mode 100644index a19684a21df..00000000000--- a/packages/twenty-website-new/src/sections/TrustedBy/components/Logo.tsx+++ /dev/null@@ -1,47 +0,0 @@-import type { TrustedByLogosType } from '@/sections/TrustedBy/types';-import { theme } from '@/theme';-import { styled } from '@linaria/react';-import NextImage from 'next/image';--const StyledLogo = styled.div`- height: 28px;- flex-shrink: 0;- overflow: clip;- position: relative;- width: 56px;-- @media (min-width: ${theme.breakpoints.md}px) {- height: 32px;- width: 64px;- }-`;--type LogoProps = TrustedByLogosType;--const DEFAULT_GRAY_BRIGHTNESS = 1;-const DEFAULT_GRAY_OPACITY = 0.72;--export function Logo({- fit = 'contain',- grayBrightness = DEFAULT_GRAY_BRIGHTNESS,- grayOpacity = DEFAULT_GRAY_OPACITY,- src,-}: LogoProps) {- return (- <StyledLogo aria-hidden="true">- <NextImage- alt=""- fill- sizes="(min-width: 921px) 80px, 64px"- src={src}- unoptimized- style={{- filter: `grayscale(1) brightness(${grayBrightness})`,- objectFit: fit,- objectPosition: 'center',- opacity: grayOpacity,- }}- />- </StyledLogo>- );-}diff --git a/packages/twenty-website-new/src/sections/TrustedBy/components/Logos.tsx b/packages/twenty-website-new/src/sections/TrustedBy/components/Logos.tsxdeleted file mode 100644index 99046466900..00000000000--- a/packages/twenty-website-new/src/sections/TrustedBy/components/Logos.tsx+++ /dev/null@@ -1,46 +0,0 @@-import { type TrustedByLogosType } from '@/sections/TrustedBy/types';-import { theme } from '@/theme';-import { styled } from '@linaria/react';-import { Logo } from './Logo';--const LogoStrip = styled.div`- align-items: center;- display: grid;- gap: ${theme.spacing(4)} ${theme.spacing(4)};- grid-template-columns: repeat(3, minmax(0, max-content));- justify-content: center;- justify-items: center;-- & > :last-child:nth-child(3n + 1) {- grid-column: 2;- }-- @media (min-width: ${theme.breakpoints.md}px) {- display: flex;- flex-wrap: wrap;- gap: ${theme.spacing(8)};- justify-content: center;- }-`;--type LogosProps = {- logos: TrustedByLogosType[];-};--export function Logos({ logos }: LogosProps) {- return (- <LogoStrip>- {logos.map((logo, index) => (- <Logo- fit={logo.fit}- grayBrightness={logo.grayBrightness}- grayOpacity={logo.grayOpacity}- key={`${logo.src}-${index}`}- src={logo.src}- />- ))}- </LogoStrip>- );-}--Logos.displayName = 'TrustedBy.Logos';diff --git a/packages/twenty-website-new/src/sections/TrustedBy/components/Separator.tsx b/packages/twenty-website-new/src/sections/TrustedBy/components/Separator.tsxdeleted file mode 100644index 4615d92508e..00000000000--- a/packages/twenty-website-new/src/sections/TrustedBy/components/Separator.tsx+++ /dev/null@@ -1,36 +0,0 @@-import type { TrustedBySeparatorType } from '@/sections/TrustedBy/types';-import { theme } from '@/theme';-import type { MessageDescriptor } from '@lingui/core';-import { styled } from '@linaria/react';--const StyledSeparatorRow = styled.div`- display: flex;- justify-content: center;- width: 100%;-`;--const SeparatorText = styled.p`- color: ${theme.colors.primary.text[60]};- font-size: ${theme.font.size(3)};- font-family: ${theme.font.family.mono};- font-weight: ${theme.font.weight.medium};- text-transform: uppercase;- white-space: nowrap;- letter-spacing: 0;- line-height: ${theme.font.size(4)};-`;--type SeparatorProps = {- renderText: (descriptor: MessageDescriptor) => string;- separator: TrustedBySeparatorType;-};--export function Separator({ renderText, separator }: SeparatorProps) {- return (- <StyledSeparatorRow>- <SeparatorText>{renderText(separator.text)}</SeparatorText>- </StyledSeparatorRow>- );-}--Separator.displayName = 'TrustedBy.Separator';diff --git a/packages/twenty-website-new/src/sections/TrustedBy/components/index.ts b/packages/twenty-website-new/src/sections/TrustedBy/components/index.tsdeleted file mode 100644index 01814ece793..00000000000--- a/packages/twenty-website-new/src/sections/TrustedBy/components/index.ts+++ /dev/null@@ -1,13 +0,0 @@-import { Root } from './Root';-import { Separator } from './Separator';-import { Logos } from './Logos';-import { Logo } from './Logo';-import { ClientCount } from './ClientCount/ClientCount';--export const TrustedBy = {- Root,- Separator,- Logos,- Logo,- ClientCount,-};diff --git a/packages/twenty-website-new/src/sections/TrustedBy/data.ts b/packages/twenty-website-new/src/sections/TrustedBy/data.tsdeleted file mode 100644index dfcb41be196..00000000000--- a/packages/twenty-website-new/src/sections/TrustedBy/data.ts+++ /dev/null@@ -1,34 +0,0 @@-import { msg } from '@lingui/core/macro';-import type { TrustedByDataType } from '@/sections/TrustedBy/types';--export const TRUSTED_BY_DATA: TrustedByDataType = {- clientCountLabel: { text: msg`+10k others` },- logos: [- { grayOpacity: 0.52, src: '/images/home/logo-bar/french-republic.webp' },- {- grayBrightness: 0.9,- grayOpacity: 0.74,- src: '/images/home/logo-bar/bayer.webp',- },- {- fit: 'cover',- grayOpacity: 0.43,- src: '/images/home/logo-bar/pwc.webp',- },- {- grayOpacity: 0.7,- src: '/images/home/logo-bar/windmill-logo.png',- },- { grayOpacity: 0.48, src: '/images/home/logo-bar/fora.svg' },- { grayOpacity: 0.55, src: '/images/home/logo-bar/wazoku.svg' },- { grayOpacity: 0.68, src: '/images/home/logo-bar/civicactions.svg' },- { grayOpacity: 0.41, src: '/images/home/logo-bar/otiima.svg' },- { grayOpacity: 0.42, src: '/images/home/logo-bar/nic.webp' },- {- grayBrightness: 0.72,- grayOpacity: 0.74,- src: '/images/home/logo-bar/shiawase-home.webp',- },- ],- separator: { text: msg`trusted by` },-};diff --git a/packages/twenty-website-new/src/sections/TrustedBy/index.ts b/packages/twenty-website-new/src/sections/TrustedBy/index.tsnew file mode 100644index 00000000000..99c563bc1e9--- /dev/null+++ b/packages/twenty-website-new/src/sections/TrustedBy/index.ts@@ -0,0 +1,2 @@+export { TrustedBy } from './TrustedBy';+export { TRUSTED_BY_LOGOS } from './trusted-by.data';diff --git a/packages/twenty-website-new/src/sections/TrustedBy/trusted-by.data.ts b/packages/twenty-website-new/src/sections/TrustedBy/trusted-by.data.tsnew file mode 100644index 00000000000..dd36c5fbe0e--- /dev/null+++ b/packages/twenty-website-new/src/sections/TrustedBy/trusted-by.data.ts@@ -0,0 +1,29 @@+import type { TrustedByLogosType } from '@/sections/TrustedBy/TrustedBy';++export const TRUSTED_BY_LOGOS: TrustedByLogosType[] = [+ { grayOpacity: 0.52, src: '/images/home/logo-bar/french-republic.webp' },+ {+ grayBrightness: 0.9,+ grayOpacity: 0.74,+ src: '/images/home/logo-bar/bayer.webp',+ },+ {+ fit: 'cover',+ grayOpacity: 0.43,+ src: '/images/home/logo-bar/pwc.webp',+ },+ {+ grayOpacity: 0.7,+ src: '/images/home/logo-bar/windmill-logo.webp',+ },+ { grayOpacity: 0.48, src: '/images/home/logo-bar/fora.svg' },+ { grayOpacity: 0.55, src: '/images/home/logo-bar/wazoku.svg' },+ { grayOpacity: 0.68, src: '/images/home/logo-bar/civicactions.svg' },+ { grayOpacity: 0.41, src: '/images/home/logo-bar/otiima.svg' },+ { grayOpacity: 0.42, src: '/images/home/logo-bar/nic.webp' },+ {+ grayBrightness: 0.72,+ grayOpacity: 0.74,+ src: '/images/home/logo-bar/shiawase-home.webp',+ },+];diff --git a/packages/twenty-website-new/src/sections/TrustedBy/types/TrustedByClientCountLabel.ts b/packages/twenty-website-new/src/sections/TrustedBy/types/TrustedByClientCountLabel.tsdeleted file mode 100644index 0c37fdde1b1..00000000000--- a/packages/twenty-website-new/src/sections/TrustedBy/types/TrustedByClientCountLabel.ts+++ /dev/null@@ -1,5 +0,0 @@-import type { MessageDescriptor } from '@lingui/core';--export type TrustedByClientCountLabelType = {- text: MessageDescriptor;-};diff --git a/packages/twenty-website-new/src/sections/TrustedBy/types/TrustedByData.ts b/packages/twenty-website-new/src/sections/TrustedBy/types/TrustedByData.tsdeleted file mode 100644index d535b4e646e..00000000000--- a/packages/twenty-website-new/src/sections/TrustedBy/types/TrustedByData.ts+++ /dev/null@@ -1,9 +0,0 @@-import type { TrustedByClientCountLabelType } from './TrustedByClientCountLabel';-import type { TrustedByLogosType } from './TrustedByLogos';-import type { TrustedBySeparatorType } from './TrustedBySeparator';--export type TrustedByDataType = {- clientCountLabel: TrustedByClientCountLabelType;- logos: TrustedByLogosType[];- separator: TrustedBySeparatorType;-};diff --git a/packages/twenty-website-new/src/sections/TrustedBy/types/TrustedByLogos.ts b/packages/twenty-website-new/src/sections/TrustedBy/types/TrustedByLogos.tsdeleted file mode 100644index 8aa521e1561..00000000000--- a/packages/twenty-website-new/src/sections/TrustedBy/types/TrustedByLogos.ts+++ /dev/null@@ -1,6 +0,0 @@-export type TrustedByLogosType = {- fit?: 'contain' | 'cover';- grayBrightness?: number;- grayOpacity?: number;- src: string;-};diff --git a/packages/twenty-website-new/src/sections/TrustedBy/types/TrustedBySeparator.ts b/packages/twenty-website-new/src/sections/TrustedBy/types/TrustedBySeparator.tsdeleted file mode 100644index dd071059861..00000000000--- a/packages/twenty-website-new/src/sections/TrustedBy/types/TrustedBySeparator.ts+++ /dev/null@@ -1,5 +0,0 @@-import type { MessageDescriptor } from '@lingui/core';--export type TrustedBySeparatorType = {- text: MessageDescriptor;-};diff --git a/packages/twenty-website-new/src/sections/TrustedBy/types/index.ts b/packages/twenty-website-new/src/sections/TrustedBy/types/index.tsdeleted file mode 100644index 52dc86f83d4..00000000000--- a/packages/twenty-website-new/src/sections/TrustedBy/types/index.ts+++ /dev/null@@ -1,4 +0,0 @@-export type { TrustedByClientCountLabelType } from './TrustedByClientCountLabel';-export type { TrustedByDataType } from './TrustedByData';-export type { TrustedBySeparatorType } from './TrustedBySeparator';-export type { TrustedByLogosType } from './TrustedByLogos';diff --git a/packages/twenty-website-new/src/theme/css-variables.ts b/packages/twenty-website-new/src/theme/css-variables.tsindex 6d8e9ea0365..b613fef4ae5 100644--- a/packages/twenty-website-new/src/theme/css-variables.ts+++ b/packages/twenty-website-new/src/theme/css-variables.ts@@ -30,10 +30,40 @@ export const cssVariables = css`--color-green-100: #89fc9a;--color-green-70: #b0fdbe;+ --color-black: #1c1c1c;+ --color-white: #ffffff;+ --color-neutral: #f4f4f4;+ --color-blue: #4a38f5;+ --color-blue-muted: #8174f8;+ --color-pink: #ed87fc;+ --color-pink-muted: #f3abfd;+ --color-yellow: #feffb7;+ --color-yellow-muted: #feffd9;+ --color-green: #89fc9a;+ --color-green-muted: #b0fdbe;++ --color-text: #1c1c1c;+ --color-text-muted: #1c1c1c99;+ --color-text-subtle: #1c1c1c66;+ --color-bg: #ffffff;+ --color-bg-muted: #f4f4f4;+ --color-border: #1c1c1c1a;+ --color-border-strong: #1c1c1c33;+--radius-base: 2px;--spacing-base: 4px;--font-base: 0.25rem;--line-height-base: 0.25rem;}++ :global([data-scheme='dark']) {+ --color-text: #ffffff;+ --color-text-muted: #ffffffcc;+ --color-text-subtle: #ffffff99;+ --color-bg: #1c1c1c;+ --color-bg-muted: #333333;+ --color-border: #ffffff1a;+ --color-border-strong: #ffffff33;+ }`;diff --git a/packages/twenty-website-new/src/theme/index.ts b/packages/twenty-website-new/src/theme/index.tsindex a45250e8d2b..1b686e20304 100644--- a/packages/twenty-website-new/src/theme/index.ts+++ b/packages/twenty-website-new/src/theme/index.ts@@ -19,3 +19,5 @@ export const theme = {};export type Theme = typeof theme;++export type Scheme = 'light' | 'muted' | 'dark';diff --git a/yarn.lock b/yarn.lockindex 4ae5b399b1b..cc5d4585aa7 100644--- a/yarn.lock+++ b/yarn.lock@@ -3365,13 +3365,6 @@ __metadata:languageName: nodelinkType: hard-"@babel/runtime@npm:^7.17.8, @babel/runtime@npm:^7.26.0":- version: 7.29.2- resolution: "@babel/runtime@npm:7.29.2"- checksum: 10c0/30b80a0140d16467792e1bbeb06f655b0dab70407da38dfac7fedae9c859f9ae9d846ef14ad77bd3814c064295fe9b1bc551f1541ea14646ae9f22b71a8bc17a- languageName: node- linkType: hard-"@babel/runtime@npm:^7.28.6, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.7":version: 7.28.6resolution: "@babel/runtime@npm:7.28.6"@@ -6913,16 +6906,6 @@ __metadata:languageName: nodelinkType: hard-"@gsap/react@npm:2.1.2":- version: 2.1.2- resolution: "@gsap/react@npm:2.1.2"- peerDependencies:- gsap: ^3.12.5- react: ">=17"- checksum: 10c0/d0285391cfd7cef8125e6ddf81a063121bdb92ddf633d76c6144d8b93e3b7f7d837ec75f1fda8fd33d7efac0ad4c1aad89647e81446e9363012ada7db9f67daf- languageName: node- linkType: hard-"@handlewithcare/prosemirror-inputrules@npm:^0.1.4":version: 0.1.4resolution: "@handlewithcare/prosemirror-inputrules@npm:0.1.4"@@ -9859,13 +9842,6 @@ __metadata:languageName: nodelinkType: hard-"@mediapipe/tasks-vision@npm:0.10.17":- version: 0.10.17- resolution: "@mediapipe/tasks-vision@npm:0.10.17"- checksum: 10c0/f2f5dd9ca39d562b902a6d964f8b786f17a143f42776d0d26b8c79632b10cf210e28d98ec92de757b7bb2e6595ed4f9bbf5e49f1709b09dc08709bd276ced442- languageName: node- linkType: hard-"@messageformat/parser@npm:^5.0.0":version: 5.1.1resolution: "@messageformat/parser@npm:5.1.1"@@ -10609,17 +10585,6 @@ __metadata:languageName: nodelinkType: hard-"@monogrid/gainmap-js@npm:^3.0.6":- version: 3.4.0- resolution: "@monogrid/gainmap-js@npm:3.4.0"- dependencies:- promise-worker-transferable: "npm:^1.0.4"- peerDependencies:- three: ">= 0.159.0"- checksum: 10c0/06104767a0f542b36e1e203fe569f78996babcdd52661f42db4f079f372b272e0849b86f84f7690b2c165a8ba931f77ad324fe82a09c9b23e26d20e76cabd3e7- languageName: node- linkType: hard-"@motionone/animation@npm:^10.12.0":version: 10.18.0resolution: "@motionone/animation@npm:10.18.0"@@ -16586,83 +16551,6 @@ __metadata:languageName: nodelinkType: hard-"@react-three/drei@npm:^10.7.7":- version: 10.7.7- resolution: "@react-three/drei@npm:10.7.7"- dependencies:- "@babel/runtime": "npm:^7.26.0"- "@mediapipe/tasks-vision": "npm:0.10.17"- "@monogrid/gainmap-js": "npm:^3.0.6"- "@use-gesture/react": "npm:^10.3.1"- camera-controls: "npm:^3.1.0"- cross-env: "npm:^7.0.3"- detect-gpu: "npm:^5.0.56"- glsl-noise: "npm:^0.0.0"- hls.js: "npm:^1.5.17"- maath: "npm:^0.10.8"- meshline: "npm:^3.3.1"- stats-gl: "npm:^2.2.8"- stats.js: "npm:^0.17.0"- suspend-react: "npm:^0.1.3"- three-mesh-bvh: "npm:^0.8.3"- three-stdlib: "npm:^2.35.6"- troika-three-text: "npm:^0.52.4"- tunnel-rat: "npm:^0.1.2"- use-sync-external-store: "npm:^1.4.0"- utility-types: "npm:^3.11.0"- zustand: "npm:^5.0.1"- peerDependencies:- "@react-three/fiber": ^9.0.0- react: ^19- react-dom: ^19- three: ">=0.159"- peerDependenciesMeta:- react-dom:- optional: true- checksum: 10c0/d328b6cd748abc8063a596176189261a60af6a905df8bfaa0eb708149c6afb264fe021eb2265991c3ccbcecabf464e38511cc631f846378b7af105d62ab7f524- languageName: node- linkType: hard--"@react-three/fiber@npm:^9.5.0":- version: 9.5.0- resolution: "@react-three/fiber@npm:9.5.0"- dependencies:- "@babel/runtime": "npm:^7.17.8"- "@types/webxr": "npm:*"- base64-js: "npm:^1.5.1"- buffer: "npm:^6.0.3"- its-fine: "npm:^2.0.0"- react-use-measure: "npm:^2.1.7"- scheduler: "npm:^0.27.0"- suspend-react: "npm:^0.1.3"- use-sync-external-store: "npm:^1.4.0"- zustand: "npm:^5.0.3"- peerDependencies:- expo: ">=43.0"- expo-asset: ">=8.4"- expo-file-system: ">=11.0"- expo-gl: ">=11.0"- react: ">=19 <19.3"- react-dom: ">=19 <19.3"- react-native: ">=0.78"- three: ">=0.156"- peerDependenciesMeta:- expo:- optional: true- expo-asset:- optional: true- expo-file-system:- optional: true- expo-gl:- optional: true- react-dom:- optional: true- react-native:- optional: true- checksum: 10c0/88daa671550a4383636e41ae9358747baa45ca9b02787f4dcf427a1778faf135c5e0f328fce0a1a152c653446cb3544004260c99807c0685ed0ebc60cf1c8a51- languageName: node- linkType: hard-"@recallai/desktop-sdk@npm:^2.0.0":version: 2.0.8resolution: "@recallai/desktop-sdk@npm:2.0.8"@@ -20910,13 +20798,6 @@ __metadata:languageName: nodelinkType: hard-"@types/draco3d@npm:^1.4.0":- version: 1.4.10- resolution: "@types/draco3d@npm:1.4.10"- checksum: 10c0/431e333b2fd67e2b081e8697e71dfb82a125fc04b2cbfa0205e4d521719d3749c964b2bf82bb7944ba0a12e5bc3d9afe387a58e68b195d838fcdbc65c8572a35- languageName: node- linkType: hard-"@types/es-aggregate-error@npm:^1.0.2":version: 1.0.6resolution: "@types/es-aggregate-error@npm:1.0.6"@@ -21832,13 +21713,6 @@ __metadata:languageName: nodelinkType: hard-"@types/offscreencanvas@npm:^2019.6.4":- version: 2019.7.3- resolution: "@types/offscreencanvas@npm:2019.7.3"- checksum: 10c0/6d1dfae721d321cd2b5435f347a0e53b09f33b2f9e9333396480f592823bc323847b8169f7d251d2285cb93dbc1ba2e30741ac5cf4b1c003d660fd4c24526963- languageName: node- linkType: hard-"@types/openid-client@npm:^3.7.0":version: 3.7.0resolution: "@types/openid-client@npm:3.7.0"@@ -22072,15 +21946,6 @@ __metadata:languageName: nodelinkType: hard-"@types/react-reconciler@npm:^0.28.9":- version: 0.28.9- resolution: "@types/react-reconciler@npm:0.28.9"- peerDependencies:- "@types/react": "*"- checksum: 10c0/9fe71fa856aab2cd4742fe0416bdd4f5c82ecc05ef6451ee7fcb65a5efdf5fa588f5820fbe2a665b15371b0da3bfc4097f28bb6d450b9a834af2d0fc00f403bd- languageName: node- linkType: hard-"@types/react-transition-group@npm:^4.4.12":version: 4.4.12resolution: "@types/react-transition-group@npm:4.4.12"@@ -22326,7 +22191,7 @@ __metadata:languageName: nodelinkType: hard-"@types/three@npm:*, @types/three@npm:^0.183.1":+"@types/three@npm:^0.183.1":version: 0.183.1resolution: "@types/three@npm:0.183.1"dependencies:@@ -22453,7 +22318,7 @@ __metadata:languageName: nodelinkType: hard-"@types/webxr@npm:*, @types/webxr@npm:>=0.5.17, @types/webxr@npm:^0.5.2":+"@types/webxr@npm:>=0.5.17":version: 0.5.24resolution: "@types/webxr@npm:0.5.24"checksum: 10c0/ff59ffd390d06ca3f89ab2531d583ac10bc5e2ab82e5a01ecc40fbc365224a3375e7caa5b14649cf6141db21fb024940da7ad2bd8faa3cd497a6665257cb53b5@@ -22822,24 +22687,6 @@ __metadata:languageName: nodelinkType: hard-"@use-gesture/core@npm:10.3.1":- version: 10.3.1- resolution: "@use-gesture/core@npm:10.3.1"- checksum: 10c0/2e3b5c0f7fe26cdb47be3a9c2a58a6a9edafc5b2895b07d2898eda9ab5a2b29fb0098b15597baa0856907b593075cd44cc69bba4785c9cfb7b6fabaa3b52cd3e- languageName: node- linkType: hard--"@use-gesture/react@npm:^10.3.1":- version: 10.3.1- resolution: "@use-gesture/react@npm:10.3.1"- dependencies:- "@use-gesture/core": "npm:10.3.1"- peerDependencies:- react: ">= 16.8.0"- checksum: 10c0/978da66e4e7c424866ad52eba8fdf0ce93a4c8fc44f8837c7043e68c6a6107cd67e817fffb27f7db2ae871ef2f6addb0c8ddf1586f24c67b7e6aef1646c668cf- languageName: node- linkType: hard-"@vercel/oidc@npm:3.1.0":version: 3.1.0resolution: "@vercel/oidc@npm:3.1.0"@@ -28249,15 +28096,6 @@ __metadata:languageName: nodelinkType: hard-"camera-controls@npm:^3.1.0":- version: 3.1.2- resolution: "camera-controls@npm:3.1.2"- peerDependencies:- three: ">=0.126.1"- checksum: 10c0/2d42162efd6789e713332a72212819fb04b261f7babc45b5794cd902997e4a4826c9401b672ffab2e09f9808fc2b615d9154d67c57f38a7c90487d4cf5429655- languageName: node- linkType: hard-"caniuse-lite@npm:^1.0.30001520, caniuse-lite@npm:^1.0.30001579, caniuse-lite@npm:^1.0.30001726":version: 1.0.30001733resolution: "caniuse-lite@npm:1.0.30001733"@@ -30190,18 +30028,6 @@ __metadata:languageName: nodelinkType: hard-"cross-env@npm:^7.0.3":- version: 7.0.3- resolution: "cross-env@npm:7.0.3"- dependencies:- cross-spawn: "npm:^7.0.1"- bin:- cross-env: src/bin/cross-env.js- cross-env-shell: src/bin/cross-env-shell.js- checksum: 10c0/f3765c25746c69fcca369655c442c6c886e54ccf3ab8c16847d5ad0e91e2f337d36eedc6599c1227904bf2a228d721e690324446876115bc8e7b32a866735ecf- languageName: node- linkType: hard-"cross-fetch@npm:^3.0.4, cross-fetch@npm:^3.1.5":version: 3.1.8resolution: "cross-fetch@npm:3.1.8"@@ -31404,15 +31230,6 @@ __metadata:languageName: nodelinkType: hard-"detect-gpu@npm:^5.0.56":- version: 5.0.70- resolution: "detect-gpu@npm:5.0.70"- dependencies:- webgl-constants: "npm:^1.1.1"- checksum: 10c0/5a2053d4779edb3490821599b316b5362c8b55c30b82806c64bcfd21f40c67e2debfd677937899080aea2b27765471552bafeeae9c9f1cf63bdd07461a7e2163- languageName: node- linkType: hard-"detect-indent@npm:^6.0.0":version: 6.1.0resolution: "detect-indent@npm:6.1.0"@@ -31862,13 +31679,6 @@ __metadata:languageName: nodelinkType: hard-"draco3d@npm:^1.4.1":- version: 1.5.7- resolution: "draco3d@npm:1.5.7"- checksum: 10c0/4419509bb93c31560a22a1a54e1c394a5b5017cab39941120c75151d941c11dec05925abf31f597ac2694c570b78c04f82aa3d69e5311f8f8e71fc8b9d92d12f- languageName: node- linkType: hard-"ds-store@npm:^0.1.5":version: 0.1.6resolution: "ds-store@npm:0.1.6"@@ -33890,13 +33700,6 @@ __metadata:languageName: nodelinkType: hard-"fflate@npm:^0.6.9":- version: 0.6.10- resolution: "fflate@npm:0.6.10"- checksum: 10c0/c452f720e4cb404b300fceb8ef0bdf345f18fbfd3f57f7d0974dce5f5e2ac0e8dd4b6ff4bb7061ae74fd919b9c707172f9dbd44d91149b1137199b8c705768f1- languageName: node- linkType: hard-"fflate@npm:^0.8.2, fflate@npm:~0.8.2":version: 0.8.2resolution: "fflate@npm:0.8.2"@@ -35329,13 +35132,6 @@ __metadata:languageName: nodelinkType: hard-"glsl-noise@npm:^0.0.0":- version: 0.0.0- resolution: "glsl-noise@npm:0.0.0"- checksum: 10c0/442630e86ed109079f4ed92f3b59d24d0b9da60c03cb8ac9313a056996bf4b5d696b4c6121ee29952e8a19c5cf174a999cfe672464959db36fc75334c3134677- languageName: node- linkType: hard-"google-auth-library@npm:8.9.0, google-auth-library@npm:^8.0.2":version: 8.9.0resolution: "google-auth-library@npm:8.9.0"@@ -36423,13 +36219,6 @@ __metadata:languageName: nodelinkType: hard-"hls.js@npm:^1.5.17":- version: 1.6.15- resolution: "hls.js@npm:1.6.15"- checksum: 10c0/a3558909506b9d93420b395b1d9508df364f911ebc19b315f98bd4c1b94973ed996a95fe8662756a3fca96b762af741d13df81987bc68322f473acacbecbc6d9- languageName: node- linkType: hard-"hmac-drbg@npm:^1.0.1":version: 1.0.1resolution: "hmac-drbg@npm:1.0.1"@@ -38701,17 +38490,6 @@ __metadata:languageName: nodelinkType: hard-"its-fine@npm:^2.0.0":- version: 2.0.0- resolution: "its-fine@npm:2.0.0"- dependencies:- "@types/react-reconciler": "npm:^0.28.9"- peerDependencies:- react: ^19.0.0- checksum: 10c0/1ff1ff3257c0c7eb115c9c26cf0506eb84162edc1a63d3136780d146f7c7833298b240d0fcb46888909773f1a7d16539e0c03f2482cff1a5a502d6436686fe21- languageName: node- linkType: hard-"jackspeak@npm:^3.1.2":version: 3.4.3resolution: "jackspeak@npm:3.4.3"@@ -40573,7 +40351,7 @@ __metadata:languageName: nodelinkType: hard-"lie@npm:^3.0.2, lie@npm:~3.3.0":+"lie@npm:~3.3.0":version: 3.3.0resolution: "lie@npm:3.3.0"dependencies:@@ -41448,16 +41226,6 @@ __metadata:languageName: nodelinkType: hard-"maath@npm:^0.10.8":- version: 0.10.8- resolution: "maath@npm:0.10.8"- peerDependencies:- "@types/three": ">=0.134.0"- three: ">=0.134.0"- checksum: 10c0/fb61faac89567595f7e25f261f8a9750d0ced674fd16c77c6e486a0c4a00c572fa37969d613d017380f8ea4e8ff357d481dcd94240a104a7969bc7e95b9fe99e- languageName: node- linkType: hard-"macos-alias@npm:~0.2.5":version: 0.2.12resolution: "macos-alias@npm:0.2.12"@@ -42285,15 +42053,6 @@ __metadata:languageName: nodelinkType: hard-"meshline@npm:^3.3.1":- version: 3.3.1- resolution: "meshline@npm:3.3.1"- peerDependencies:- three: ">=0.137"- checksum: 10c0/95d5c7c90aca350530f37f9ea5c5e333a66ea0c50416fa6372c24a23321837a4c70d92d6a9a5942ee124484855a2d3fc8ca0656305feb8d8f86aa10513e324e4- languageName: node- linkType: hard-"meshoptimizer@npm:~1.0.1":version: 1.0.1resolution: "meshoptimizer@npm:1.0.1"@@ -46916,13 +46675,6 @@ __metadata:languageName: nodelinkType: hard-"potpack@npm:^1.0.1":- version: 1.0.2- resolution: "potpack@npm:1.0.2"- checksum: 10c0/670c23898a4257130858b960c2e654d3327c0f6a7e7091ff5846f213e65af8f9476320b995b8ad561a47a4d1c359c7ef347de57d22e7b02597051abb52bc85c4- languageName: node- linkType: hard-"preact@npm:^10.28.3":version: 10.28.3resolution: "preact@npm:10.28.3"@@ -47218,16 +46970,6 @@ __metadata:languageName: nodelinkType: hard-"promise-worker-transferable@npm:^1.0.4":- version: 1.0.4- resolution: "promise-worker-transferable@npm:1.0.4"- dependencies:- is-promise: "npm:^2.1.0"- lie: "npm:^3.0.2"- checksum: 10c0/110d273cbba2631c318762f02c159531f1e05e4af91080368b9d4c02b880824ae4c49a8ec7094c6434989ea2ee8de913b21c809279babeaf447fc90a682dcd7c- languageName: node- linkType: hard-"promise@npm:^7.1.1":version: 7.3.1resolution: "promise@npm:7.3.1"@@ -48628,19 +48370,6 @@ __metadata:languageName: nodelinkType: hard-"react-use-measure@npm:^2.1.7":- version: 2.1.7- resolution: "react-use-measure@npm:2.1.7"- peerDependencies:- react: ">=16.13"- react-dom: ">=16.13"- peerDependenciesMeta:- react-dom:- optional: true- checksum: 10c0/ff24130e6f95e853feb6892fb74af08dbc5aae3574b701169e3bc3adb392c3162f51a58ddfe39bb7337db13ae609bbec0bb51a9de8b5fae5420f9d17e1f8b542- languageName: node- linkType: hard-"react-virtualized-auto-sizer@npm:^1.0.26":version: 1.0.26resolution: "react-virtualized-auto-sizer@npm:1.0.26"@@ -51922,26 +51651,6 @@ __metadata:languageName: nodelinkType: hard-"stats-gl@npm:^2.2.8":- version: 2.4.2- resolution: "stats-gl@npm:2.4.2"- dependencies:- "@types/three": "npm:*"- three: "npm:^0.170.0"- peerDependencies:- "@types/three": "*"- three: "*"- checksum: 10c0/cff079103d4004cdfd72d65c977b7237a929b02f57b275081188e9313d74620b70ea0a57e0561fb6a43b1597830068b4adb2625dbc08b99799fd12a71ec54729- languageName: node- linkType: hard--"stats.js@npm:^0.17.0":- version: 0.17.0- resolution: "stats.js@npm:0.17.0"- checksum: 10c0/03392b4b9eb15cb285b8cf46c5dd68e4e7b556d8e4c72a3a48e6bd2ab6f2e72a02b145d465f594450df081d8f94a45e8ac1112a0d507a200a5768504082ca080- languageName: node- linkType: hard-"statuses@npm:2.0.1, statuses@npm:^2.0.1":version: 2.0.1resolution: "statuses@npm:2.0.1"@@ -52834,15 +52543,6 @@ __metadata:languageName: nodelinkType: hard-"suspend-react@npm:^0.1.3":- version: 0.1.3- resolution: "suspend-react@npm:0.1.3"- peerDependencies:- react: ">=17.0"- checksum: 10c0/c35436f492a5cab85a2aac8f5ee5af8f67edbab3a49e12d15c7f770aae4cf09fe2925b3b8c122929210c1f28aa0958f91684a687d6608f116f7da8406d8a2f1c- languageName: node- linkType: hard-"svg-arc-to-cubic-bezier@npm:^3.0.0, svg-arc-to-cubic-bezier@npm:^3.2.0":version: 3.2.0resolution: "svg-arc-to-cubic-bezier@npm:3.2.0"@@ -53287,38 +52987,6 @@ __metadata:languageName: nodelinkType: hard-"three-mesh-bvh@npm:^0.8.3":- version: 0.8.3- resolution: "three-mesh-bvh@npm:0.8.3"- peerDependencies:- three: ">= 0.159.0"- checksum: 10c0/d1f052d4606498acf57e08e28d01c84157eb388d46be8e03bc839630dc4eb919d5bb5e2ed4e9113d39cbc3cda29f09212e3450e1bb21de6615ec330f2575fc28- languageName: node- linkType: hard--"three-stdlib@npm:^2.35.6":- version: 2.36.1- resolution: "three-stdlib@npm:2.36.1"- dependencies:- "@types/draco3d": "npm:^1.4.0"- "@types/offscreencanvas": "npm:^2019.6.4"- "@types/webxr": "npm:^0.5.2"- draco3d: "npm:^1.4.1"- fflate: "npm:^0.6.9"- potpack: "npm:^1.0.1"- peerDependencies:- three: ">=0.128.0"- checksum: 10c0/6d04a3e6e1cf5a23e1d8807085609e5cfa999d342a8f4a3168432c4152e99ab555f7fd7ab22903d9639f33d8d19d2183c62931be34ad6c3ac8bd3ed879d973c2- languageName: node- linkType: hard--"three@npm:^0.170.0":- version: 0.170.0- resolution: "three@npm:0.170.0"- checksum: 10c0/eeaa1eccb31467654a044fb90634b3b6bb8d0768a4f029c082fb6aa22aec0d6362d0e3af74938caa1db512b7823a031b54a76e88fba6cfd535054165ea9667c9- languageName: node- linkType: hard-"three@npm:^0.183.2":version: 0.183.2resolution: "three@npm:0.183.2"@@ -53758,36 +53426,6 @@ __metadata:languageName: nodelinkType: hard-"troika-three-text@npm:^0.52.4":- version: 0.52.4- resolution: "troika-three-text@npm:0.52.4"- dependencies:- bidi-js: "npm:^1.0.2"- troika-three-utils: "npm:^0.52.4"- troika-worker-utils: "npm:^0.52.0"- webgl-sdf-generator: "npm:1.1.1"- peerDependencies:- three: ">=0.125.0"- checksum: 10c0/61475643728472df1e4169ff3167c5ae740bcf4b13d2680b2a1046613b5b65e6e573fc2afcd27e517f163e6885a7dd1287307c476139a6b98a8256d26fcd50e1- languageName: node- linkType: hard--"troika-three-utils@npm:^0.52.4":- version: 0.52.4- resolution: "troika-three-utils@npm:0.52.4"- peerDependencies:- three: ">=0.125.0"- checksum: 10c0/06de01ed332b755e5a1f376ea047f5e3585c71c98e2216822011fcf25e107fa9e28cbdd6586d3507eec45973998de80db0a2f07efba550b62623ceb58c955c98- languageName: node- linkType: hard--"troika-worker-utils@npm:^0.52.0":- version: 0.52.0- resolution: "troika-worker-utils@npm:0.52.0"- checksum: 10c0/bcd776324ce3e941c1a913531cee6022c867b71bc2d6bb67f1eadf6df96fd4f865c51b90ac58fc5c0ae3346a4bd8360b0a52398864800a7a9c60473151d452d5- languageName: node- linkType: hard-"trough@npm:^2.0.0":version: 2.2.0resolution: "trough@npm:2.2.0"@@ -54081,15 +53719,6 @@ __metadata:languageName: nodelinkType: hard-"tunnel-rat@npm:^0.1.2":- version: 0.1.2- resolution: "tunnel-rat@npm:0.1.2"- dependencies:- zustand: "npm:^4.3.2"- checksum: 10c0/93cd50c7c9141e2662707602a21401145092e5a3c815b57a752937419ab6187a2ff36fa7e0f65e0c587022149bf2d323ace07dff61106511b7d4845e53390cc9- languageName: node- linkType: hard-"tweetnacl@npm:^0.14.3, tweetnacl@npm:~0.14.0":version: 0.14.5resolution: "tweetnacl@npm:0.14.5"@@ -54843,7 +54472,6 @@ __metadata:"@base-ui/react": "npm:^1.3.0""@base-ui/utils": "npm:^0.2.6""@calcom/embed-react": "npm:^1.5.3"- "@gsap/react": "npm:2.1.2""@linaria/core": "npm:^7.0.0""@linaria/react": "npm:^7.0.1""@lingui/cli": "npm:^5.1.2"@@ -54853,8 +54481,6 @@ __metadata:"@lingui/react": "npm:^5.1.2""@lingui/swc-plugin": "npm:^5.11.0""@lottiefiles/dotlottie-react": "npm:^0.18.10"- "@react-three/drei": "npm:^10.7.7"- "@react-three/fiber": "npm:^9.5.0""@swc/core": "npm:^1.15.11""@swc/jest": "npm:^0.2.39""@tabler/icons-react": "npm:^3.41.1"@@ -56189,7 +55815,7 @@ __metadata:languageName: nodelinkType: hard-"use-sync-external-store@npm:1.6.0, use-sync-external-store@npm:^1.2.2, use-sync-external-store@npm:^1.5.0, use-sync-external-store@npm:^1.6.0":+"use-sync-external-store@npm:1.6.0, use-sync-external-store@npm:^1.5.0, use-sync-external-store@npm:^1.6.0":version: 1.6.0resolution: "use-sync-external-store@npm:1.6.0"peerDependencies:@@ -56253,7 +55879,7 @@ __metadata:languageName: nodelinkType: hard-"utility-types@npm:^3.10.0, utility-types@npm:^3.11.0":+"utility-types@npm:^3.10.0":version: 3.11.0resolution: "utility-types@npm:3.11.0"checksum: 10c0/2f1580137b0c3e6cf5405f37aaa8f5249961a76d26f1ca8efc0ff49a2fc0e0b2db56de8e521a174d075758e0c7eb3e590edec0832eb44478b958f09914920f19@@ -57027,20 +56653,6 @@ __metadata:languageName: nodelinkType: hard-"webgl-constants@npm:^1.1.1":- version: 1.1.1- resolution: "webgl-constants@npm:1.1.1"- checksum: 10c0/525a9838b0cbcbab902d1bc5457882424a9c146f851042c901ae457123193f5c5e47846b47c1c999e4f3abc24322cac494cea0cc52fec28bd8eb3a05cd79d573- languageName: node- linkType: hard--"webgl-sdf-generator@npm:1.1.1":- version: 1.1.1- resolution: "webgl-sdf-generator@npm:1.1.1"- checksum: 10c0/769bfab22a9485a59bda9448d1d8684228adc9ebdac2cc69012a0854282385d1bef319f703758829e2c647e7532a9844e62977110e825bd75a3e0b8a0ee276ce- languageName: node- linkType: hard-"webidl-conversions@npm:^3.0.0":version: 3.0.1resolution: "webidl-conversions@npm:3.0.1"@@ -58442,26 +58054,6 @@ __metadata:languageName: nodelinkType: hard-"zustand@npm:^4.3.2":- version: 4.5.7- resolution: "zustand@npm:4.5.7"- dependencies:- use-sync-external-store: "npm:^1.2.2"- peerDependencies:- "@types/react": ">=16.8"- immer: ">=9.0.6"- react: ">=16.8"- peerDependenciesMeta:- "@types/react":- optional: true- immer:- optional: true- react:- optional: true- checksum: 10c0/55559e37a82f0c06cadc61cb08f08314c0fe05d6a93815e41e3376130c13db22a5017cbb0cd1f018c82f2dad0051afe3592561d40f980bd4082e32005e8a950c- languageName: node- linkType: hard-"zustand@npm:^4.4.0":version: 4.5.4resolution: "zustand@npm:4.5.4"@@ -58482,27 +58074,6 @@ __metadata:languageName: nodelinkType: hard-"zustand@npm:^5.0.1, zustand@npm:^5.0.3":- version: 5.0.12- resolution: "zustand@npm:5.0.12"- peerDependencies:- "@types/react": ">=18.0.0"- immer: ">=9.0.6"- react: ">=18.0.0"- use-sync-external-store: ">=1.2.0"- peerDependenciesMeta:- "@types/react":- optional: true- immer:- optional: true- react:- optional: true- use-sync-external-store:- optional: true- checksum: 10c0/304c1dfb6033d758ddc7606c15df8566e6cace83ee4eeec721e8975f7813fd4cca2c68ff6b3eaa1841a9e53f0cf8486007217479785eccb845e3596de4df7f1e- languageName: node- linkType: hard-"zwitch@npm:^2.0.0, zwitch@npm:^2.0.4":version: 2.0.4resolution: "zwitch@npm:2.0.4"