Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: bump remotion version. generate RSP artifacts
KapishDimac967730fb16b
diff --git a/bun.lock b/bun.lockindex a88a1769..ccb5852e 100644--- a/bun.lock+++ b/bun.lock@@ -10,12 +10,13 @@"@openpanel/nextjs": "^1.0.13","@openpanel/sdk": "^1.3.1","@paper-design/shaders-react": "0.0.76",- "@remotion/bundler": "^4.0.499",- "@remotion/google-fonts": "^4.0.499",- "@remotion/paths": "^4.0.499",- "@remotion/player": "^4.0.499",- "@remotion/renderer": "^4.0.499",- "@remotion/transitions": "^4.0.499",+ "@remotion/bundler": "4.0.513",+ "@remotion/google-fonts": "4.0.513",+ "@remotion/paths": "4.0.513",+ "@remotion/player": "4.0.513",+ "@remotion/renderer": "4.0.513",+ "@remotion/studio-protocol": "4.0.513",+ "@remotion/transitions": "4.0.513","@shadcn/react": "^0.1.0","@uidotdev/usehooks": "^2.4.1","class-variance-authority": "^0.7.1",@@ -39,7 +40,7 @@"react-dom": "19.2.4","react-resizable-panels": "^4.9.0","rehype-pretty-code": "^0.14.4",- "remotion": "^4.0.499",+ "remotion": "4.0.513","server-only": "^0.0.1","sonner": "^2.0.7","tailwind-merge": "^3.5.0",@@ -429,55 +430,55 @@"@radix-ui/rect": ["@radix-ui/[email protected]", "", {}, "sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw=="],- "@remotion/bundler": ["@remotion/[email protected]", "", { "dependencies": { "@remotion/media-parser": "4.0.499", "@remotion/studio": "4.0.499", "@remotion/studio-shared": "4.0.499", "@remotion/timeline-utils": "4.0.499", "@rspack/core": "1.7.11", "@rspack/plugin-react-refresh": "1.6.1", "css-loader": "7.1.4", "esbuild": "0.28.1", "react-refresh": "0.18.0", "remotion": "4.0.499", "style-loader": "4.0.0", "webpack": "5.105.0" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-88C7WxlC9DSxEOSnJL/HV7Xl16OIKnEzl90BvIM083pNBA/laAEJvryaXmSQ3FuI5CSGuVA336YgboOWagqmAg=="],+ "@remotion/bundler": ["@remotion/[email protected]", "", { "dependencies": { "@remotion/media-parser": "4.0.513", "@remotion/studio": "4.0.513", "@remotion/studio-shared": "4.0.513", "@remotion/timeline-utils": "4.0.513", "@rspack/core": "1.7.11", "@rspack/plugin-react-refresh": "1.6.1", "css-loader": "7.1.4", "esbuild": "0.28.1", "react-refresh": "0.18.0", "remotion": "4.0.513", "style-loader": "4.0.0", "webpack": "5.105.0" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-z12SAftOpLiJBXcIMU46rZbcJAXVwvYolbgZCctueIMMgGXkqevK65KFIG2YflsS6biLql3lAyuC8xovdOYzGg=="],- "@remotion/canvas-capture": ["@remotion/[email protected]", "", { "dependencies": { "mediabunny": "1.50.8", "remotion": "4.0.499" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-S2Q5eqNnjkRmxm5FZMadI21bPuLyKa2+zRLh3c2EDjRS1C400rx19UCmG1Ne9W38ybInm/MohcLS3EkaNHZqrw=="],+ "@remotion/captions": ["@remotion/[email protected]", "", {}, "sha512-b2bqswypfeOYiOOhnvW/WMncCKBBougnYl4wnZDkeQ2ni+zxJkV9xWCBO59BeeoUn4e/UIsgKA0YaQiMvf4NvA=="],- "@remotion/compositor-darwin-arm64": ["@remotion/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-7pBC1NwnzFFHRmCIx0DlRMb53SIwGb24Abx28f3wSdrgYVAU9A0Ema/Y+h0dZVGIwC3RO0iUQgs3h8ra7XVB6Q=="],+ "@remotion/compositor-darwin-arm64": ["@remotion/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-ZsCB+HLjwhmotGKU/TIlkoalAozzXjubB/8mOvWgLdO7XcSugGmvDJ17dHiXGcIadF9Mwy0zykiquArEnjJfnA=="],- "@remotion/compositor-darwin-x64": ["@remotion/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-gFGYRH7CRIqhOuxQDGnIoHCEMhUeu7zJWuA/fy0hPPnWayDMsWChfY9+yGHsWGBePbNdXEM2HBcuC4RxDLORtQ=="],+ "@remotion/compositor-darwin-x64": ["@remotion/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-Xr2zphIHAgLnIZNE+ZJlj8bgVg7Z39BSzXDD0HYTfs9N5u78rNf+LXKGgAZ6eCMZpTpZP06qI9mzYeI1wAjLeQ=="],- "@remotion/compositor-linux-arm64-gnu": ["@remotion/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-aLSwT8857xWuPaYFDSOVPSVp6efXnPYS8MEUdKQdCoqXNpgufugCAGL/xzagPo2A3wD+Ocuzj6+bcsBna3ivMg=="],+ "@remotion/compositor-linux-arm64-gnu": ["@remotion/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-rp5d/6osutZwKlPcWRaYEibSTRCUvsAoR4/ammTilN9gXWXRvFJRhAc0nPuoiiKO1Ler6xekyQ9vxRa2NNLkFg=="],- "@remotion/compositor-linux-arm64-musl": ["@remotion/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-bC3/NocB8FUiieUBZtE2A19sr34cLDHo5r0Q1aUevsI/RpJkq9LYJzmifMgO+8OxVxv4nxg8cSryHrDpEsylZQ=="],+ "@remotion/compositor-linux-arm64-musl": ["@remotion/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-c8doabV2HK5tgWh3JDKqFDWc8Ss7riF6uNx8TSrDLb1QHV55PYPQclMPHvzEUdQNu/qXSFEaebttsfK4OWKNvw=="],- "@remotion/compositor-linux-x64-gnu": ["@remotion/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-I9aOX1tpdSwi+jwYcZjg0V8jnp0eVKBWe6iaD3V85USrxxFu4LdvHwJ+Lh6kWC7L1mlrlrac9AGkZm70AoBvWQ=="],+ "@remotion/compositor-linux-x64-gnu": ["@remotion/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-IJ7TJ2jXv4lGmXdzs/dEF8M7FzSHJb9DUwPcdnf9Z9IP0+NQ/8xgON/JQzm01COmLG+ExGoBoaUlupzZ5fRUvw=="],- "@remotion/compositor-linux-x64-musl": ["@remotion/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-pDBDfyuaVBueuIqd88SSdCerSzixm3toZZfLbS4ACxLUqtGJshRcmuFeWiaUALSbtwa4KIPMPzgPGCu5cmnuRA=="],+ "@remotion/compositor-linux-x64-musl": ["@remotion/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-ngdsEt3qN6tEc0UZhz6ppnFY3Wyd//ZKddkZBHgXTU+dzBsHpEEVTTqmlkiAOQ/c0LmOJOUMu8qWovqmEr//dQ=="],- "@remotion/compositor-win32-x64-msvc": ["@remotion/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-sOYpHz3LmW7u0JR3qg3FA2fTP07pEzY6lhKutwTUDAoQ7MJaHdRYBU7DGf/dpBbaGugQ36hi9GKh0jJLbt1aWw=="],+ "@remotion/compositor-win32-x64-msvc": ["@remotion/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-hW5L6Et+KZsjLYbEhos/aEO1MqNRUuPDg+ICWu8abIL2WPRpsXixaYsver/bS7UbTQlxrjE6e83kdpO/lM+yoQ=="],- "@remotion/drag-and-drop": ["@remotion/[email protected]", "", {}, "sha512-0BBcRlRvkfbTo/ZhLLCOlaXvtFGO4Am6M8YGemEjh/HS7wkIkftpWlLDEEJwNeAlWEa11/EYpgWxFGF3huYOBQ=="],+ "@remotion/google-fonts": ["@remotion/[email protected]", "", { "dependencies": { "remotion": "4.0.513" } }, "sha512-aZ5yJO3p1ccnePOW1/s0pLjfvk1z0U0eE4NcSja2XQK6r+javWA2V4n2UY0drM42F/jBF3T0nzybNIfslpBEjA=="],- "@remotion/google-fonts": ["@remotion/[email protected]", "", { "dependencies": { "remotion": "4.0.499" } }, "sha512-CSCbNvNGLUFlZZiwQlz5FljLBxN5jKWbNU5KLekM4H/8lXsRjCUnd+yMdUaTGHZFFTwTzB/TPkmZPIhr++foMg=="],+ "@remotion/licensing": ["@remotion/[email protected]", "", {}, "sha512-KThoRJcXhGT1y30YeSiQVmHjqav/y7hMGpDjQYDEVi64JZAfbkYqHpmXN/otSztWnceeqcg+u1ApDT8liqqLSQ=="],- "@remotion/licensing": ["@remotion/[email protected]", "", {}, "sha512-dKjaYAJsxCUXDvAjJW8bHIUe+dYAXEcq2M0RVrqdS1CEUZPUQXhzIbYILX+slcVb5c8/DD5t+edm7d2VSY81Tg=="],+ "@remotion/media-parser": ["@remotion/[email protected]", "", {}, "sha512-rCQRn1EFVB8Xa51ojLdSWv6bPoGSoXwLjAlX6fkuaqSJRmjq3nvbKR6rzRL3uB6esTjVysaeiXuTzaPMsXoTLQ=="],- "@remotion/media-parser": ["@remotion/[email protected]", "", {}, "sha512-3RX9OFko0gW1ixi87eoYx2FLOndVb4eo/KONIiq0yKwho1IMYAq8r8tIkqmSksVG0RlWqW4FwXa9kp9lhiqfDA=="],+ "@remotion/media-utils": ["@remotion/[email protected]", "", { "dependencies": { "mediabunny": "1.50.8", "remotion": "4.0.513" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-4retja3Q9IHicW48wbjKB+lXjB1yiNtXZ3H/Pa+1Nd0DNK1IvMGYSxDms3LR4ZByucIsdXrBTJIcIoldqL7KVg=="],- "@remotion/media-utils": ["@remotion/[email protected]", "", { "dependencies": { "mediabunny": "1.50.8", "remotion": "4.0.499" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-XqCX58ZwI80YM9CqzasKYeCVGRaINMhRvaCQ4H953PD+pRkTxk3bFcx97x4oj0Y0KjGDWnBvzsa5Tt0Jx7JUBA=="],+ "@remotion/paths": ["@remotion/[email protected]", "", {}, "sha512-2RqXYcz3uiwlG8VuyCxtRKhKsn29Ogfou1bukntZdEb2QSa2DNjWo2mMFnqrnrDQRD4Xb0zPs4IfV3YI0O69jQ=="],- "@remotion/paths": ["@remotion/[email protected]", "", {}, "sha512-RVUzWEEJZui00REAeSDRHeAvtkRbtseR0K1lE08wzAilsIiMr0IYhpFS9I2wsQdC58NG+1d+sD58gzG7KDCZvQ=="],+ "@remotion/player": ["@remotion/[email protected]", "", { "dependencies": { "remotion": "4.0.513" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-7zBJIypNp7duagRy7SghedEPtIpIF96Lb+r2EZnGMKRbm8PYc6nO2JOnX+gRnMszaULmaLId3pQHMThOy7CJyA=="],- "@remotion/player": ["@remotion/[email protected]", "", { "dependencies": { "remotion": "4.0.499" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-3qEjNUj0KamSgWLXDhXnHdVMIx0EBsdr7XM5+QGldj1EiZH54vXVKJsWJj6SYfPbaskfEWI0wjKGGh0ml3vJrw=="],+ "@remotion/renderer": ["@remotion/[email protected]", "", { "dependencies": { "@remotion/licensing": "4.0.513", "@remotion/streaming": "4.0.513", "execa": "5.1.1", "remotion": "4.0.513", "source-map": "0.8.0", "ws": "8.21.0" }, "optionalDependencies": { "@remotion/compositor-darwin-arm64": "4.0.513", "@remotion/compositor-darwin-x64": "4.0.513", "@remotion/compositor-linux-arm64-gnu": "4.0.513", "@remotion/compositor-linux-arm64-musl": "4.0.513", "@remotion/compositor-linux-x64-gnu": "4.0.513", "@remotion/compositor-linux-x64-musl": "4.0.513", "@remotion/compositor-win32-x64-msvc": "4.0.513" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-jW7mDpEIDKsWJrQ3L7Vi0Xp6PXvc54yaf9Bd9lIhMMpnBEWgZ9uMlqq8ewHjfRJrdchwCDUkhUNRr/XvQLpzhg=="],- "@remotion/renderer": ["@remotion/[email protected]", "", { "dependencies": { "@remotion/licensing": "4.0.499", "@remotion/streaming": "4.0.499", "execa": "5.1.1", "remotion": "4.0.499", "source-map": "0.8.0-beta.0", "ws": "8.21.0" }, "optionalDependencies": { "@remotion/compositor-darwin-arm64": "4.0.499", "@remotion/compositor-darwin-x64": "4.0.499", "@remotion/compositor-linux-arm64-gnu": "4.0.499", "@remotion/compositor-linux-arm64-musl": "4.0.499", "@remotion/compositor-linux-x64-gnu": "4.0.499", "@remotion/compositor-linux-x64-musl": "4.0.499", "@remotion/compositor-win32-x64-msvc": "4.0.499" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-KqzYTBIYVWuqKd5tfYaBq9CWKRYZJq6/PL5++/20dQaTSHQQEMTpyyGrOs0RsyCiy8Ofr8eYB765mIeIxulS4Q=="],+ "@remotion/shapes": ["@remotion/[email protected]", "", { "dependencies": { "@remotion/paths": "4.0.513", "remotion": "4.0.513" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-5E+PBDpfHHkEpy7oBLCd/s43YQ3CXVeA29U+wQZxJKs7xSWGEjbDpX01Ib+ct/tc1pY5SrSOu6qFnSAYngXWpg=="],- "@remotion/shapes": ["@remotion/[email protected]", "", { "dependencies": { "@remotion/paths": "4.0.499", "remotion": "4.0.499" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-BiPPosvImIyzmWU7a0+9Xg00MIHrGwRO4NvYf/KKQEeLJVzTbKrZeVnhLRla9ihsF2cyz/k2Vf/Fgpnpadmpew=="],+ "@remotion/streaming": ["@remotion/[email protected]", "", {}, "sha512-0iL5y5uWJDhyqXX566SV/zsS/duByYvUTNrrOKzUDL3M8Z/ysPkWPI3mT2d51DdWWr3KfV06Ci7iW/abBu8JYw=="],- "@remotion/streaming": ["@remotion/[email protected]", "", {}, "sha512-PYIZc7KNJyG+qvKYzftrPbfVJw5B31F+6Uage0Qf54c+cpa69Us/kFK8quNbd/zZcwxvGvCR+fCkn41TJ53FfQ=="],+ "@remotion/studio": ["@remotion/[email protected]", "", { "dependencies": { "@jridgewell/trace-mapping": "0.3.31", "@remotion/captions": "4.0.513", "@remotion/media-utils": "4.0.513", "@remotion/player": "4.0.513", "@remotion/renderer": "4.0.513", "@remotion/studio-protocol": "4.0.513", "@remotion/studio-shared": "4.0.513", "@remotion/timeline-utils": "4.0.513", "@remotion/web-renderer": "4.0.513", "@remotion/zod-types": "4.0.513", "mediabunny": "1.50.8", "memfs": "3.4.3", "open": "8.4.2", "remotion": "4.0.513", "semver": "7.5.3", "zod": "4.4.3" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-hEg6CNTf/XQQUyv/1ccXfCZ1LaHXFInnR4mb3HzDE9aIbzo+GSgspsgB8W7OiWfOfEZVpI4HAFPRRtw1GCay1w=="],- "@remotion/studio": ["@remotion/[email protected]", "", { "dependencies": { "@jridgewell/trace-mapping": "0.3.31", "@remotion/canvas-capture": "4.0.499", "@remotion/drag-and-drop": "4.0.499", "@remotion/media-utils": "4.0.499", "@remotion/player": "4.0.499", "@remotion/renderer": "4.0.499", "@remotion/studio-shared": "4.0.499", "@remotion/timeline-utils": "4.0.499", "@remotion/web-renderer": "4.0.499", "@remotion/zod-types": "4.0.499", "mediabunny": "1.50.8", "memfs": "3.4.3", "open": "8.4.2", "remotion": "4.0.499", "semver": "7.5.3", "zod": "4.4.3" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-oW5hvpwZmstFY9zQZuqAjoAUfujoZna2T9Eq636RwhzDqTaCa3zvV8ojrPfAgFOl8XEFwHLK+UPxAijzOXVYMg=="],+ "@remotion/studio-protocol": ["@remotion/[email protected]", "", {}, "sha512-wRfIxboi3Np5z16NhkM2K8DT+rBvBb4hfbXpTV9nmcS+IVeuVeptTUSu5r7L9fE9zlbY/gag/V7ThS/CyYsrvg=="],- "@remotion/studio-shared": ["@remotion/[email protected]", "", { "dependencies": { "@remotion/drag-and-drop": "4.0.499", "remotion": "4.0.499" } }, "sha512-wGMhqAk8t4UtFneYY8mkUQEWFM95ACQ0Tf87Oh1rPV3RVSN49irQLcBK1eQ8kDM9I9G3oFGQdMYS/6BA8dHnWw=="],+ "@remotion/studio-shared": ["@remotion/[email protected]", "", { "dependencies": { "@remotion/studio-protocol": "4.0.513", "remotion": "4.0.513" } }, "sha512-RuXntxoeu8SSzPN037vwWtiV/IGYXxmrHztMXk0I0Kyf/R6qz5DupVYEJoBUA53rVOrCFo+2k1jH3IOBixRUBw=="],- "@remotion/timeline-utils": ["@remotion/[email protected]", "", { "dependencies": { "mediabunny": "1.50.8" } }, "sha512-1ml1W9ia/Aaqauqjj7XRMbY3IMIybzZKZJ7C5tm+Dm8lq2QmCH5QQHi84ToLLVOF8T6m/n+wIZXyhUsNQLh94g=="],+ "@remotion/timeline-utils": ["@remotion/[email protected]", "", { "dependencies": { "mediabunny": "1.50.8" } }, "sha512-PYpK/VRh1kdrjE4kcNkatsLBeVa1yL+tTqoj0lRVW2N/5NXP9PNTwXF5/CsTZyjGPz01FF0lj+mOW2J8ECCdDg=="],- "@remotion/transitions": ["@remotion/[email protected]", "", { "dependencies": { "@remotion/paths": "4.0.499", "@remotion/shapes": "4.0.499", "remotion": "4.0.499" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-+k7b/DgDOGrGUXCSTdakgBHowiZ/m5jUrflp3MaWEoW/SrKtgAodrzjABL7CGUB5YJ+InJdowFXm6HX0IGkvlQ=="],+ "@remotion/transitions": ["@remotion/[email protected]", "", { "dependencies": { "@remotion/paths": "4.0.513", "@remotion/shapes": "4.0.513", "remotion": "4.0.513" }, "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-OG1lijDiNCf7SzJXLMTyLzXwQ6ENz4Jp7iRS4x1ycsbD/kCumTgj3nPJeWQc9VPt1lDAmdcIboVYnTM61cqM/w=="],- "@remotion/web-renderer": ["@remotion/[email protected]", "", { "dependencies": { "@mediabunny/aac-encoder": "1.50.8", "@mediabunny/flac-encoder": "1.50.8", "@mediabunny/mp3-encoder": "1.50.8", "@remotion/licensing": "4.0.499", "mediabunny": "1.50.8", "remotion": "4.0.499" }, "peerDependencies": { "react": ">=18.0.0", "react-dom": ">=18.0.0" } }, "sha512-wjxJ1wLrzLxO0nTu/1IdRVd3J1kipzatkfkaXwre8gdEwVTg10XD33niufGuD35ykCH4LGOCmkMlhRcXopJ1lA=="],+ "@remotion/web-renderer": ["@remotion/[email protected]", "", { "dependencies": { "@mediabunny/aac-encoder": "1.50.8", "@mediabunny/flac-encoder": "1.50.8", "@mediabunny/mp3-encoder": "1.50.8", "@remotion/licensing": "4.0.513", "mediabunny": "1.50.8", "remotion": "4.0.513" }, "peerDependencies": { "react": ">=18.0.0", "react-dom": ">=18.0.0" } }, "sha512-yDpjBV9mHD60UBPLcNHT9Ac9ONfBJP3S7egkYYWK68Q+o13+8eXuhTVTuKBUQ0JMljOJCRQ4DzqGyebbWz9sOw=="],- "@remotion/zod-types": ["@remotion/[email protected]", "", { "dependencies": { "remotion": "4.0.499" } }, "sha512-UyKMhwnS9T6NgHUznscZ4+pPkvjEIqfd6gEVqW6JkM3C7OcZfOBRcF7FWZZq96eyTIxJHLxCUDdlAZr8JcRlTA=="],+ "@remotion/zod-types": ["@remotion/[email protected]", "", { "dependencies": { "remotion": "4.0.513" } }, "sha512-G0zkfZoXc/QqOoxDNVbuRQbpC+AlpRaePeC5SYzZMV6SMjA4WxkE/K1lEE0Ml4ECd/JwiIWzy4C+FVlw3Th16A=="],"@rrweb/types": ["@rrweb/[email protected]", "", {}, "sha512-RbnDgKxA/odwB1R4gF7eUUj+rdSrq6ROQJsnMw7MIsGzlbSYvJeZN8YY4XqU0G6sKJvXI6bSzk7w/G94jNwzhw=="],@@ -1129,8 +1130,6 @@"loader-runner": ["[email protected]", "", {}, "sha512-DFEqQ3ihfS9blba08cLfYf1NRAIEm+dDjic073DRDc3/JspI/8wYmtDsHwd3+4hwvdxSK7PGaElfTmm0awWJ4w=="],- "lodash.sortby": ["[email protected]", "", {}, "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA=="],-"log-symbols": ["[email protected]", "", { "dependencies": { "chalk": "^5.3.0", "is-unicode-supported": "^1.3.0" } }, "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw=="],"longest-streak": ["[email protected]", "", {}, "sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g=="],@@ -1381,8 +1380,6 @@"proxy-addr": ["[email protected]", "", { "dependencies": { "forwarded": "0.2.0", "ipaddr.js": "1.9.1" } }, "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg=="],- "punycode": ["[email protected]", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="],-"qs": ["[email protected]", "", { "dependencies": { "side-channel": "^1.1.0" } }, "sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ=="],"queue-microtask": ["[email protected]", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="],@@ -1445,7 +1442,7 @@"remark-stringify": ["[email protected]", "", { "dependencies": { "@types/mdast": "^4.0.0", "mdast-util-to-markdown": "^2.0.0", "unified": "^11.0.0" } }, "sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw=="],- "remotion": ["[email protected]", "", { "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-QX5B1XDFBQpr8mYUBqhgCrH0cQJmqfI7zA46k9CsZhri/H9quXObYQBgeNDcxUhoulVvOOjVQqp5d0RAwB94HA=="],+ "remotion": ["[email protected]", "", { "peerDependencies": { "react": ">=16.8.0", "react-dom": ">=16.8.0" } }, "sha512-cDaUqFq7GBuxYYSINhfXy5+X7V4L3fSy3lDL4G/7v61jCpEzYcRQftAKo2Cyj1evHt34bn++4eMMUZBMh624yA=="],"require-from-string": ["[email protected]", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="],@@ -1511,7 +1508,7 @@"sonner": ["[email protected]", "", { "peerDependencies": { "react": "^18.0.0 || ^19.0.0 || ^19.0.0-rc", "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-rc" } }, "sha512-W6ZN4p58k8aDKA4XPcx2hpIQXBRAgyiWVkYhT7CvK6D3iAu7xjvVyhQHg2/iaKJZ1XVJ4r7XuwGL+WGEK37i9w=="],- "source-map": ["[email protected]", "", { "dependencies": { "whatwg-url": "^7.0.0" } }, "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA=="],+ "source-map": ["[email protected]", "", {}, "sha512-d8EqvL+k/SOXCreS/SUzg2ciyHqBBLcN/yuRjFsbvVhHTE2pgei7oAhmPM7kWFbkX6OSMQfUq4KbkF3au9lhYQ=="],"source-map-js": ["[email protected]", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="],@@ -1571,8 +1568,6 @@"toidentifier": ["[email protected]", "", {}, "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="],- "tr46": ["[email protected]", "", { "dependencies": { "punycode": "^2.1.0" } }, "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA=="],-"trim-lines": ["[email protected]", "", {}, "sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg=="],"trough": ["[email protected]", "", {}, "sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw=="],@@ -1641,14 +1636,10 @@"web-streams-polyfill": ["[email protected]", "", {}, "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw=="],- "webidl-conversions": ["[email protected]", "", {}, "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg=="],-"webpack": ["[email protected]", "", { "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.8", "@types/json-schema": "^7.0.15", "@webassemblyjs/ast": "^1.14.1", "@webassemblyjs/wasm-edit": "^1.14.1", "@webassemblyjs/wasm-parser": "^1.14.1", "acorn": "^8.15.0", "acorn-import-phases": "^1.0.3", "browserslist": "^4.28.1", "chrome-trace-event": "^1.0.2", "enhanced-resolve": "^5.19.0", "es-module-lexer": "^2.0.0", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.3.1", "mime-types": "^2.1.27", "neo-async": "^2.6.2", "schema-utils": "^4.3.3", "tapable": "^2.3.0", "terser-webpack-plugin": "^5.3.16", "watchpack": "^2.5.1", "webpack-sources": "^3.3.3" }, "bin": { "webpack": "bin/webpack.js" } }, "sha512-gX/dMkRQc7QOMzgTe6KsYFM7DxeIONQSui1s0n/0xht36HvrgbxtM1xBlgx596NbpHuQU8P7QpKwrZYwUX48nw=="],"webpack-sources": ["[email protected]", "", {}, "sha512-HPuy+uuoTCaaoEoI1LQ3JN9+vrPBvEesnnX1jADHy728cHSMlq4wUc4afYqahq2B1mhQVZxCXOkNTnXltr+2vQ=="],- "whatwg-url": ["[email protected]", "", { "dependencies": { "lodash.sortby": "^4.7.0", "tr46": "^1.0.1", "webidl-conversions": "^4.0.2" } }, "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg=="],-"which": ["[email protected]", "", { "dependencies": { "isexe": "^3.1.1" }, "bin": { "node-which": "bin/which.js" } }, "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg=="],"wrappy": ["[email protected]", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="],diff --git a/components/docs/component-preview-mdx.tsx b/components/docs/component-preview-mdx.tsxnew file mode 100644index 00000000..d642f078--- /dev/null+++ b/components/docs/component-preview-mdx.tsx@@ -0,0 +1,19 @@+import { existsSync, readFileSync } from "node:fs";+import { join } from "node:path";+import type { StudioElementPayload } from "@remotion/studio-protocol";+import { ComponentPreview } from "@/components/docs/component-preview";++const ELEMENTS_DIR = join(process.cwd(), "registry-artifacts", "elements");++function loadStudioElement(name: string): StudioElementPayload | undefined {+ if (!/^[a-z0-9-]+$/.test(name)) return undefined;+ const file = join(ELEMENTS_DIR, `${name}.json`);+ if (!existsSync(file)) return undefined;+ return JSON.parse(readFileSync(file, "utf8")) as StudioElementPayload;+}++export function ComponentPreviewMdx({ name }: { name: string }) {+ return (+ <ComponentPreview name={name} studioElement={loadStudioElement(name)} />+ );+}diff --git a/components/docs/component-preview.tsx b/components/docs/component-preview.tsxindex 2542d167..819b0702 100644--- a/components/docs/component-preview.tsx+++ b/components/docs/component-preview.tsx@@ -1,5 +1,6 @@"use client";+import type { StudioElementPayload } from "@remotion/studio-protocol";import { CheckIcon, LinkIcon, RotateCcwIcon } from "lucide-react";import { useQueryStates } from "nuqs";import { Suspense, use, useEffect, useMemo, useRef, useState } from "react";@@ -7,12 +8,22 @@ import { CodeBlock } from "@/components/docs/code-block";import { Button } from "@/components/ui/button";import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";import { useTrackEvent } from "@/lib/analytics";-import { type ComponentConfig, getDefaults } from "@/lib/customizer-config";+import {+ getDefaults,+ type ResolvedComponentConfig,+} from "@/lib/customizer-config";import { buildParsers, PreviewStage } from "@/lib/ui-preview-internals";import registry, { loadComponentConfig } from "@/registry/__index__";import { ComponentCustomizer } from "./component-customizer";+import { StudioActions } from "./studio-actions";-export function ComponentPreview({ name }: { name: string }) {+export function ComponentPreview({+ name,+ studioElement,+}: {+ name: string;+ studioElement?: StudioElementPayload;+}) {const entry = registry[name];if (!entry) {@@ -29,7 +40,7 @@ export function ComponentPreview({ name }: { name: string }) {<div className="not-prose mb-6 aspect-[1.9/1] w-full animate-pulse rounded-2xl bg-muted" />}>- <Preview name={name} load={entry.load} />+ <Preview name={name} load={entry.load} studioElement={studioElement} /></Suspense>);}@@ -37,8 +48,10 @@ export function ComponentPreview({ name }: { name: string }) {function Preview({name,load,+ studioElement,}: {name: string;+ studioElement?: StudioElementPayload;// biome-ignore lint/suspicious/noExplicitAny: dynamically-loaded Remotion composition, props shape varies per componentload: () => Promise<{ default: React.ComponentType<any> }>;}) {@@ -112,10 +125,15 @@ function Preview({return (<div className="not-prose mb-6 flex w-full flex-col gap-4"><Tabs defaultValue="preview" className="gap-3">- <TabsList>- <TabsTrigger value="preview">Preview</TabsTrigger>- <TabsTrigger value="code">Code</TabsTrigger>- </TabsList>+ <div className="flex items-center justify-between gap-3">+ <TabsList>+ <TabsTrigger value="preview">Preview</TabsTrigger>+ <TabsTrigger value="code">Code</TabsTrigger>+ </TabsList>+ {studioElement ? (+ <StudioActions name={name} payload={studioElement} />+ ) : null}+ </div><TabsContent value="preview" className="mt-0"><PreviewStage@@ -176,7 +194,10 @@ function Preview({);}-function generateCode(config: ComponentConfig, props: Record<string, unknown>) {+function generateCode(+ config: ResolvedComponentConfig,+ props: Record<string, unknown>,+) {if (config.snippet) return config.snippet(props);const propsString = Object.entries(props).map(([k, v]) => {diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex 75a60511..545fe3cc 100644--- a/components/docs/icons-gallery.tsx+++ b/components/docs/icons-gallery.tsx@@ -1,10 +1,16 @@"use client";import { Player, type PlayerRef } from "@remotion/player";-import { Check, Copy, Search } from "lucide-react";+import { installInStudio, setStudioDragData } from "@remotion/studio-protocol";+import { Check, Copy, Loader2, Search } from "lucide-react";import type { ComponentType } from "react";import { useEffect, useMemo, useRef, useState } from "react";import { AbsoluteFill } from "remotion";+import { Remotion } from "@/components/ui/svgs/remotion";+import {+ getCachedStudioElement,+ loadStudioElement,+} from "@/lib/studio-element";import { usePrefersReducedMotion } from "@/lib/use-prefers-reduced-motion";import { cn } from "@/lib/utils";import registry, { type RegistryEntry } from "@/registry/__index__";@@ -841,6 +847,8 @@ function IconTile({}) {const reducedMotion = usePrefersReducedMotion();const [copied, setCopied] = useState(false);+ const [installing, setInstalling] = useState(false);+ const [installError, setInstallError] = useState<string | null>(null);const entry = registry[icon.name];const preview = previewManifest[icon.name];const command = `npx shadcn@latest add @remocn/${icon.name}`;@@ -853,40 +861,93 @@ function IconTile({setTimeout(() => setCopied(false), 1500);};+ const handleActivate = () => {+ onActivate();+ void loadStudioElement(icon.name);+ };++ const handleDragStart = (event: React.DragEvent) => {+ const payload = getCachedStudioElement(icon.name);+ if (!payload) return;+ setStudioDragData({ dataTransfer: event.dataTransfer, payload });+ };++ const handleInstall = async () => {+ if (installing) return;+ setInstalling(true);+ setInstallError(null);+ const payload = await loadStudioElement(icon.name);+ if (!payload) {+ setInstalling(false);+ return;+ }+ const result = await installInStudio({ payload });+ setInstalling(false);+ if (!result.success) {+ setInstallError(result.message);+ setTimeout(() => setInstallError(null), 5000);+ }+ };+return (- <button- type="button"- onClick={handleCopy}- onMouseEnter={onActivate}- onMouseLeave={onDeactivate}- onFocus={onActivate}- onBlur={onDeactivate}- title={command}- aria-label={`Copy install command for ${icon.label}`}- className={cn(- "surface-card surface-card-interactive group relative flex aspect-square flex-col items-center justify-center gap-2 rounded-xl p-3 text-muted-foreground transition-[color,box-shadow]",- "hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",- )}- >- <span- className="flex items-center justify-center"- style={{ width: MEDIA_SIZE, height: MEDIA_SIZE }}- >- {playing && entry && preview ? (- <IconPlayer load={entry.load} preview={preview} />- ) : (- <Static size={GLYPH_SIZE} strokeWidth={2} />+ <div className="group relative">+ <button+ type="button"+ draggable+ onDragStart={handleDragStart}+ onClick={handleCopy}+ onMouseEnter={handleActivate}+ onMouseLeave={onDeactivate}+ onFocus={handleActivate}+ onBlur={onDeactivate}+ title={command}+ aria-label={`Copy install command for ${icon.label}`}+ className={cn(+ "surface-card surface-card-interactive relative flex aspect-square w-full flex-col items-center justify-center gap-2 rounded-xl p-3 text-muted-foreground transition-[color,box-shadow]",+ "hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",)}- </span>- <span className="max-w-full truncate text-xs">{icon.label}</span>- <span className="absolute top-1.5 right-1.5 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100">- {copied ? (- <Check className="size-3.5" />+ >+ <span+ className="flex items-center justify-center"+ style={{ width: MEDIA_SIZE, height: MEDIA_SIZE }}+ >+ {playing && entry && preview ? (+ <IconPlayer load={entry.load} preview={preview} />+ ) : (+ <Static size={GLYPH_SIZE} strokeWidth={2} />+ )}+ </span>+ <span className="max-w-full truncate text-xs">{icon.label}</span>+ <span className="absolute top-1.5 right-1.5 opacity-0 transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100">+ {copied ? (+ <Check className="size-3.5" />+ ) : (+ <Copy className="size-3.5" />+ )}+ </span>+ </button>+ <button+ type="button"+ onClick={handleInstall}+ aria-label={`Add ${icon.label} to Remotion Studio`}+ title="Add to Remotion Studio"+ className="absolute top-1.5 left-1.5 rounded-md p-0.5 text-muted-foreground opacity-0 transition-opacity hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 group-hover:opacity-100"+ >+ {installing ? (+ <Loader2 className="size-3.5 animate-spin" />) : (- <Copy className="size-3.5" />+ <Remotion className="size-3.5" />)}- </span>- </button>+ </button>+ {installError ? (+ <span+ title={installError}+ className="absolute inset-x-1.5 bottom-1.5 truncate rounded-md bg-background/90 px-1.5 py-0.5 text-[10px] text-muted-foreground"+ >+ {installError}+ </span>+ ) : null}+ </div>);}diff --git a/components/docs/studio-actions.tsx b/components/docs/studio-actions.tsxnew file mode 100644index 00000000..6c1c6aa1--- /dev/null+++ b/components/docs/studio-actions.tsx@@ -0,0 +1,92 @@+"use client";++import {+ installInStudio,+ type StudioElementPayload,+ setStudioDragData,+} from "@remotion/studio-protocol";+import { GripVerticalIcon, Loader2Icon } from "lucide-react";+import { useEffect, useRef, useState } from "react";+import { Button } from "@/components/ui/button";+import { Remotion } from "@/components/ui/svgs/remotion";+import { useTrackEvent } from "@/lib/analytics";++type Status = "idle" | "pending" | "error";++export function StudioActions({+ name,+ payload,+}: {+ name: string;+ payload: StudioElementPayload;+}) {+ const trackEvent = useTrackEvent();+ const [status, setStatus] = useState<Status>("idle");+ const [message, setMessage] = useState<string | null>(null);+ const resetTimer = useRef<ReturnType<typeof setTimeout> | null>(null);++ useEffect(() => {+ return () => {+ if (resetTimer.current) clearTimeout(resetTimer.current);+ };+ }, []);++ const handleInstall = async () => {+ if (status === "pending") return;+ setStatus("pending");+ setMessage(null);+ trackEvent("studio_install_clicked", { component: name });+ const result = await installInStudio({ payload });+ if (result.success) {+ setStatus("idle");+ } else {+ setStatus("error");+ setMessage(result.message);+ if (resetTimer.current) clearTimeout(resetTimer.current);+ resetTimer.current = setTimeout(() => {+ setStatus("idle");+ setMessage(null);+ }, 6000);+ }+ };++ const handleDragStart = (event: React.DragEvent) => {+ setStudioDragData({ dataTransfer: event.dataTransfer, payload });+ trackEvent("studio_drag_started", { component: name });+ };++ return (+ <div className="flex min-w-0 items-center gap-1.5">+ {message ? (+ <span className="truncate text-xs text-muted-foreground">+ {message}+ </span>+ ) : null}+ <Button+ variant="outline"+ size="sm"+ onClick={handleInstall}+ disabled={status === "pending"}+ className="text-muted-foreground hover:text-foreground"+ >+ {status === "pending" ? (+ <Loader2Icon className="size-3.5 animate-spin" />+ ) : (+ <Remotion className="size-3.5" />+ )}+ Add to Remotion Studio+ </Button>+ <Button+ variant="outline"+ size="icon-sm"+ draggable+ onDragStart={handleDragStart}+ aria-label="Drag into Remotion Studio"+ title="Drag into Remotion Studio"+ className="cursor-grab text-muted-foreground hover:text-foreground active:cursor-grabbing"+ >+ <GripVerticalIcon className="size-3.5" />+ </Button>+ </div>+ );+}diff --git a/components/ui/svgs/remotion.tsx b/components/ui/svgs/remotion.tsxindex 697ec109..aa57f59b 100644--- a/components/ui/svgs/remotion.tsx+++ b/components/ui/svgs/remotion.tsx@@ -5,12 +5,12 @@ const Remotion = (props: SVGProps<SVGSVGElement>) => (<pathd="M81.0309 33.9631C77.1822 34.1706 74.0808 34.777 70.9553 35.9581C69.3966 36.5407 66.8415 37.8095 65.4355 38.6874C59.554 42.3503 55.0706 47.8566 52.7325 54.2647C52.2665 55.5335 51.0051 59.5795 50.1936 62.3646C44.7862 80.9823 41.7169 101.34 41.0581 122.886C40.9536 126.318 40.9536 134.489 41.0581 137.865C41.5 152.15 42.8739 165.046 45.3647 178.197C46.3771 183.52 48.0001 190.67 48.9401 193.918C50.8604 200.517 54.7814 206.135 60.3575 210.253C64.0937 213.014 68.336 214.866 73.0363 215.776C75.3021 216.214 78.291 216.414 80.4925 216.27C83.5377 216.071 89.5798 215.265 94.489 214.395C116.617 210.477 137.057 203.462 155.593 193.423C167.332 187.063 177.367 180.176 187.049 171.821C196.699 163.505 204.926 154.56 212.166 144.521C213.845 142.198 214.689 140.842 215.532 139.134C217.702 134.729 218.722 130.348 218.714 125.448C218.714 120.883 217.846 116.829 215.974 112.68C215.074 110.677 214.215 109.24 212.286 106.511C205.184 96.4639 197.301 87.7096 187.692 79.2027C172.796 66.0195 155.103 55.2063 135.346 47.2022C131.063 45.4705 126.845 43.9463 121.767 42.2944C111.016 38.8071 97.711 35.7826 86.4543 34.2743C84.6867 34.0349 82.2843 33.8992 81.0309 33.9631Z"fill="currentColor"- fillOpacity={0.1}+ fillOpacity="0.1"/><pathd="M91.4565 53.3788C88.428 53.5421 85.9875 54.0193 83.528 54.9487C82.3015 55.4071 80.2909 56.4056 79.1844 57.0964C74.5563 59.9787 71.0284 64.3116 69.1885 69.3542C68.8218 70.3526 67.8291 73.5364 67.1906 75.728C62.9355 90.3783 60.5203 106.398 60.0018 123.353C59.9196 126.053 59.9196 132.483 60.0018 135.139C60.3496 146.38 61.4307 156.528 63.3907 166.877C64.1874 171.065 65.4645 176.692 66.2042 179.248C67.7153 184.441 70.8007 188.862 75.1886 192.102C78.1286 194.275 81.4669 195.732 85.1656 196.447C86.9485 196.793 89.3005 196.95 91.0329 196.837C93.4291 196.68 98.1837 196.046 102.047 195.361C119.459 192.278 135.544 186.758 150.13 178.858C159.367 173.853 167.264 168.434 174.882 161.859C182.476 155.316 188.95 148.276 194.647 140.377C195.968 138.549 196.632 137.482 197.296 136.138C199.003 132.672 199.806 129.224 199.8 125.368C199.8 121.776 199.117 118.586 197.644 115.321C196.936 113.745 196.259 112.614 194.742 110.467C189.152 102.561 182.95 95.6721 175.388 88.978C163.666 78.6041 149.744 70.0952 134.197 63.7967C130.827 62.434 127.508 61.2346 123.512 59.9347C115.052 57.1905 104.582 54.8106 95.7242 53.6237C94.3333 53.4353 92.4428 53.3286 91.4565 53.3788Z"fill="currentColor"- fillOpacity={0.3}+ fillOpacity="0.3"/><pathd="M102.247 73.5165C100.069 73.6339 98.314 73.9771 96.5452 74.6455C95.6632 74.9751 94.2173 75.6932 93.4216 76.1899C90.0933 78.2628 87.5562 81.3787 86.2331 85.005C85.9694 85.7231 85.2555 88.0126 84.7963 89.5887C81.7363 100.124 79.9994 111.644 79.6266 123.838C79.5675 125.779 79.5675 130.404 79.6266 132.314C79.8767 140.397 80.6542 147.695 82.0637 155.137C82.6366 158.15 83.555 162.196 84.087 164.034C85.1737 167.768 87.3925 170.948 90.548 173.278C92.6623 174.84 95.063 175.888 97.7229 176.403C99.0051 176.651 100.696 176.764 101.942 176.683C103.666 176.57 107.085 176.114 109.863 175.622C122.385 173.404 133.952 169.435 144.441 163.754C151.084 160.155 156.763 156.257 162.242 151.529C167.703 146.824 172.359 141.761 176.455 136.08C177.406 134.766 177.883 133.998 178.36 133.032C179.588 130.539 180.165 128.06 180.161 125.287C180.161 122.704 179.67 120.41 178.61 118.062C178.101 116.928 177.615 116.115 176.523 114.571C172.504 108.885 168.044 103.931 162.606 99.1173C154.176 91.657 144.164 85.5379 132.983 81.0084C130.56 80.0285 128.173 79.1659 125.299 78.2311C119.216 76.2577 111.686 74.5461 105.316 73.6926C104.316 73.5571 102.956 73.4804 102.247 73.5165Z"diff --git a/content/changelog/2026-08-19-studio-protocol.mdx b/content/changelog/2026-08-19-studio-protocol.mdxnew file mode 100644index 00000000..f0982c04--- /dev/null+++ b/content/changelog/2026-08-19-studio-protocol.mdx@@ -0,0 +1,13 @@+---+title: Add to Studio+date: 2026-08-19+---++Until now there was one way to get a remocn component into your project — `npx shadcn add`, then wire it into a composition by hand. That is still the canonical path, but if a Remotion Studio (4.0.502+) is running locally, the site can now talk to it directly through the [Remotion Studio Protocol](https://www.remotion.dev/docs/studio-protocol/).++### Improvements++- Component pages grew an **Add to Studio** button and a drag handle next to the Preview/Code tabs. The button finds your running Studio and installs the component into the active composition; the handle lets you drag the element onto the timeline and choose its place yourself. Both deliver the same thing the CLI does — editable source code in your project, not a black box.+- The [icons gallery](/docs/icons/gallery) works the same way: every tile is draggable, and a hover button installs the icon in one click.+- Elements arrive editable, not frozen. Almost every element ships with the same knobs its docs page has — text, colors, timings, speed — declared through Remotion's own `InteractivitySchema` and rendered as native controls in the Studio sidebar, plus the standard timeline and transform controls on top. Under the hood the whole catalog now authors its controls in that schema format, so the docs customizer and the Studio panel are generated from one source.+- Coverage is honest rather than total. Primitives, shaders, effects, filters and all icons ship as Studio Elements; compositions and components that build on other remocn components keep the CLI as their only path, because flattening them into a single file would produce source nobody wants to remix. Where the button is absent, `npx shadcn add` is the answer.diff --git a/content/docs/getting-started/installation.mdx b/content/docs/getting-started/installation.mdxindex 718266c3..b8e73793 100644--- a/content/docs/getting-started/installation.mdx+++ b/content/docs/getting-started/installation.mdx@@ -27,6 +27,12 @@ Want the whole library at once? Copy this command to add every remocn component<InstallAll />+## Add straight to Remotion Studio++If a [Remotion Studio](https://www.remotion.dev/docs/studio) (4.0.502 or newer) is running locally, most components can skip the CLI entirely. Component pages show an **Add to Studio** button next to the preview — it finds your running Studio and drops the component into the active composition as source code. The drag handle beside it does the same thing by drag and drop, so you can place the element on the timeline yourself. Icons work the same way from the [icons gallery](/docs/icons/gallery).++Either way the result matches `npx shadcn add`: the source lands in your project and is yours to edit. On top of that, elements arrive with editable controls — the same knobs each docs page shows (text, colors, timings, speed) appear as native controls in the Studio sidebar, alongside the standard timeline and transform handles. Compositions and components that build on other remocn components install through the CLI only.+## 3. Use it in a Remotion composition```tsxdiff --git a/docs/plans/2026-08-20-staging-checks-design.md b/docs/plans/2026-08-20-staging-checks-design.mdnew file mode 100644index 00000000..4d24e78a--- /dev/null+++ b/docs/plans/2026-08-20-staging-checks-design.md@@ -0,0 +1,13 @@+# Staging checks repair++## Goal++Make the checks defined by `.github/workflows/ci.yml` pass on `staging`, without broad refactors or unrelated behavior changes.++## Approach++Treat existing focused tests as the behavioral contract. Repair production implementations when they diverge from that contract. Change a test only when inspection shows that it encodes an obsolete API or is isolated incorrectly. Keep lint-warning cleanup out of scope because Biome currently exits successfully and those warnings are unrelated to the failing CI checks.++## Verification++Run lint, typecheck, the full Bun test suite, registry consistency, and the production Next.js build. Review the resulting diff, commit the repair, and push the local `staging` branch to `origin/staging`.diff --git a/lib/__tests__/github-stargazers.test.ts b/lib/__tests__/github-stargazers.test.tsindex ad1eb73c..1a199296 100644--- a/lib/__tests__/github-stargazers.test.ts+++ b/lib/__tests__/github-stargazers.test.ts@@ -218,10 +218,7 @@ describe("fetchStargazers", () => {const repoBody = { stargazers_count: total };// Build 200 entries on a single pageconst starBody = Array.from({ length: total }, (_, i) =>- rawEntry(- `user${i}`,- `2021-01-${String(i + 1).padStart(2, "0")}T00:00:00Z`,- ),+ rawEntry(`user${i}`, new Date(Date.UTC(2021, 0, i + 1)).toISOString()),);global.fetch = mock()diff --git a/lib/analytics.ts b/lib/analytics.tsindex c1869068..8b69b0e3 100644--- a/lib/analytics.ts+++ b/lib/analytics.ts@@ -52,6 +52,12 @@ type AnalyticsEvents = {docs_component_viewed: {component: string;};+ studio_install_clicked: {+ component: string;+ };+ studio_drag_started: {+ component: string;+ };};export function useTrackEvent() {diff --git a/lib/customizer-config.test.ts b/lib/customizer-config.test.tsnew file mode 100644index 00000000..e4cae578--- /dev/null+++ b/lib/customizer-config.test.ts@@ -0,0 +1,51 @@+import { describe, expect, it } from "bun:test";+import { resolve } from "node:path";+import { Glob } from "bun";+import type { ComponentConfig } from "./customizer-config";+import { schemaFieldToControl } from "./customizer-config";++const configFiles = [...new Glob("registry/*/*/config.ts").scanSync(".")];++async function loadConfigs(): Promise<[string, ComponentConfig][]> {+ return Promise.all(+ configFiles.map(async (file) => {+ const mod = await import(resolve(file));+ const config = Object.values(mod).find(+ (v) => v && typeof v === "object" && "controls" in (v as object),+ ) as ComponentConfig | undefined;+ if (!config) throw new Error(`${file}: no exported config with controls`);+ return [file, config] as [string, ComponentConfig];+ }),+ );+}++describe("config schemas", () => {+ it("every schema field has a concrete default", async () => {+ const bad: string[] = [];+ for (const [file, config] of await loadConfigs()) {+ for (const [key, field] of Object.entries(config.controls)) {+ if (field.type === "hidden") continue;+ if (+ !("default" in field) ||+ field.default === undefined ||+ field.default === null+ ) {+ bad.push(`${file}: ${key}`);+ }+ }+ }+ expect(bad).toEqual([]);+ });++ it("every schema field renders in the docs customizer", async () => {+ const bad: string[] = [];+ for (const [file, config] of await loadConfigs()) {+ for (const [key, field] of Object.entries(config.controls)) {+ if (schemaFieldToControl(field) === null) {+ bad.push(`${file}: ${key} (${field.type})`);+ }+ }+ }+ expect(bad).toEqual([]);+ });+});diff --git a/lib/customizer-config.ts b/lib/customizer-config.tsindex 40bbfb35..52a1b923 100644--- a/lib/customizer-config.ts+++ b/lib/customizer-config.ts@@ -1,5 +1,11 @@+import type { InteractivitySchema, InteractivitySchemaField } from "remotion";import type { BackdropFill } from "@/registry/remocn/backdrop";+/**+ * Internal control descriptors consumed by the docs customizer UI and the+ * nuqs parsers. Authored configs no longer use this shape — they declare a+ * Remotion `InteractivitySchema` and `resolveControls` converts it here.+ */export type ControlType =| { type: "text"; default: string; label: string }| {@@ -25,7 +31,23 @@ export type ControlType =export type ControlConfig = Record<string, ControlType>;export interface ComponentConfig {- controls: ControlConfig;+ /**+ * Remotion `InteractivitySchema` describing the component's props — the+ * same format official Remotion Elements use, so the Studio element+ * generator can embed it verbatim. Convention: a `number` field with `max`+ * renders as a slider in the docs customizer, without `max` as an input.+ * Defaults must be concrete (the site needs them), even though Remotion's+ * type allows `undefined`.+ */+ controls: InteractivitySchema;+ /**+ * Element bounding box in composition pixels (1920×1080 space) for the+ * Studio element payload. Sized to the rendered content at default props,+ * with headroom for the animation's travel. Omit for full-frame components+ * (backgrounds, shaders, filters, transitions) — they keep a `null` box+ * and fill the composition.+ */+ dimensions?: { width: number; height: number };durationInFrames: number;fps: number;compositionWidth: number;@@ -49,24 +71,40 @@ export interface ComponentConfig {previewBackdrop?: BackdropFill;}+/** `ComponentConfig` after `resolveConfig`: schema converted for the site UI. */+export interface ResolvedComponentConfig+ extends Omit<ComponentConfig, "controls"> {+ controls: ControlConfig;+}+export const FPS = 30;export const W = 1280;export const H = 720;export const FONT_WEIGHT_OPTIONS = ["400", "500", "600", "700"];+/** Flat select options expressed as InteractivitySchema enum variants. */+export function enumVariants(+ options: readonly string[],+): Record<string, InteractivitySchema> {+ const out: Record<string, InteractivitySchema> = {};+ for (const option of options) out[option] = {};+ return out;+}+/**- * Controls present on every animation. Merged into each component's controls+ * Controls present on every animation. Merged into each component's schema* by `resolveControls` so every animation in the customizer exposes the same* baseline knobs.*/-export const SHARED_CONTROLS: ControlConfig = {+export const SHARED_CONTROLS: InteractivitySchema = {speed: {type: "number",default: 1,min: 0.25,max: 4,step: 0.25,- label: "Speed",+ description: "Speed",+ hiddenFromList: false,},};@@ -93,33 +131,107 @@ const SPEED_MIN_ONE = new Set(["x-followers-overview",]);-const SPEED_MIN_ONE_CONTROL: ControlType = {+const SPEED_MIN_ONE_FIELD: InteractivitySchemaField = {type: "number",default: 1,min: 1,max: 4,step: 0.25,- label: "Speed",+ description: "Speed",+ hiddenFromList: false,};-export function resolveControls(+/**+ * Merges the shared schema fields into a component's schema, applying the+ * per-component speed rules. Returns the schema that also feeds the Studio+ * element generator.+ */+export function resolveSchema(slug: string,- controls: ControlConfig,-): ControlConfig {- const out: ControlConfig = { ...controls, ...SHARED_CONTROLS };+ schema: InteractivitySchema,+): InteractivitySchema {+ const out: InteractivitySchema = { ...schema, ...SHARED_CONTROLS };if (NO_SHARED_SPEED.has(slug)) {delete out.speed;return out;}// Reassigning the existing key keeps `speed` in its merged position.- if (SPEED_MIN_ONE.has(slug)) out.speed = SPEED_MIN_ONE_CONTROL;+ if (SPEED_MIN_ONE.has(slug)) out.speed = SPEED_MIN_ONE_FIELD;+ return out;+}++/**+ * Converts one schema field into the customizer's internal control shape.+ * Returns null for field types the docs customizer does not render+ * (`hidden`, transform fields, captions, …).+ */+export function schemaFieldToControl(+ field: InteractivitySchemaField,+): ControlType | null {+ switch (field.type) {+ case "text-content":+ return {+ type: "text",+ default: field.default,+ label: field.description ?? "",+ };+ case "number": {+ if (field.default === null || field.default === undefined) return null;+ const base = {+ default: field.default,+ min: field.min ?? 0,+ step: field.step ?? 1,+ label: field.description ?? "",+ };+ return field.max === undefined+ ? { type: "number-input", max: Number.MAX_SAFE_INTEGER, ...base }+ : { type: "number", max: field.max, ...base };+ }+ case "color":+ if (field.default === undefined) return null;+ return {+ type: "color",+ default: field.default,+ label: field.description ?? "",+ };+ case "boolean":+ return {+ type: "boolean",+ default: field.default,+ label: field.description ?? "",+ };+ case "enum":+ return {+ type: "select",+ default: field.default,+ options: Object.keys(field.variants),+ label: field.description ?? "",+ };+ default:+ return null;+ }+}++export function schemaToControls(schema: InteractivitySchema): ControlConfig {+ const out: ControlConfig = {};+ for (const [key, field] of Object.entries(schema)) {+ const control = schemaFieldToControl(field);+ if (control) out[key] = control;+ }return out;}+export function resolveControls(+ slug: string,+ schema: InteractivitySchema,+): ControlConfig {+ return schemaToControls(resolveSchema(slug, schema));+}+export function resolveConfig(slug: string,config: ComponentConfig,-): ComponentConfig {+): ResolvedComponentConfig {return { ...config, controls: resolveControls(slug, config.controls) };}diff --git a/lib/server/__tests__/cleanup.test.ts b/lib/server/__tests__/cleanup.test.tsindex eaf38108..e3726155 100644--- a/lib/server/__tests__/cleanup.test.ts+++ b/lib/server/__tests__/cleanup.test.ts@@ -1,4 +1,5 @@-import { describe, expect, it, mock } from "bun:test";+import { describe, expect, it, mock, spyOn } from "bun:test";+import * as fsPromises from "node:fs/promises";import type { RenderInput } from "@/lib/server/validate-input";const mockRender = mock();@@ -7,9 +8,7 @@ mock.module("@/lib/server/render", () => ({renderStarsVideo: mockRender,}));-mock.module("node:fs/promises", () => ({- mkdir: mock(() => Promise.resolve(undefined)),-}));+spyOn(fsPromises, "mkdir").mockResolvedValue(undefined);mock.module("server-only", () => ({}));diff --git a/lib/server/__tests__/render-queue.test.ts b/lib/server/__tests__/render-queue.test.tsindex a89fe4b8..e74c6653 100644--- a/lib/server/__tests__/render-queue.test.ts+++ b/lib/server/__tests__/render-queue.test.ts@@ -18,7 +18,16 @@* sufficient.*/-import { afterEach, beforeEach, describe, expect, it, mock } from "bun:test";+import {+ afterEach,+ beforeEach,+ describe,+ expect,+ it,+ mock,+ spyOn,+} from "bun:test";+import * as fsPromises from "node:fs/promises";import type { RenderInput } from "@/lib/server/validate-input";// ---------------------------------------------------------------------------@@ -31,10 +40,7 @@ mock.module("@/lib/server/render", () => ({renderStarsVideo: mockRender,}));-// Mock mkdir so no real fs ops happen.-mock.module("node:fs/promises", () => ({- mkdir: mock(() => Promise.resolve(undefined)),-}));+spyOn(fsPromises, "mkdir").mockResolvedValue(undefined);// Mock server-only so it doesn't blow up outside Next.js.mock.module("server-only", () => ({}));diff --git a/lib/studio-element.ts b/lib/studio-element.tsnew file mode 100644index 00000000..1e4f456d--- /dev/null+++ b/lib/studio-element.ts@@ -0,0 +1,25 @@+import type { StudioElementPayload } from "@remotion/studio-protocol";++const cache = new Map<string, StudioElementPayload | null>();++export function getCachedStudioElement(+ name: string,+): StudioElementPayload | null {+ return cache.get(name) ?? null;+}++export async function loadStudioElement(+ name: string,+): Promise<StudioElementPayload | null> {+ const cached = cache.get(name);+ if (cached !== undefined) return cached;+ try {+ const mod = await import(`@/registry-artifacts/elements/${name}.json`);+ const payload = mod.default as StudioElementPayload;+ cache.set(name, payload);+ return payload;+ } catch {+ cache.set(name, null);+ return null;+ }+}diff --git a/mdx-components.tsx b/mdx-components.tsxindex a54aca95..d02cad59 100644--- a/mdx-components.tsx+++ b/mdx-components.tsx@@ -8,7 +8,7 @@ import { CanvasTransitionNote } from "@/components/docs/canvas-transition-note";import { getIconForLanguage } from "@/components/docs/code-icons";import { ComponentCardGrid } from "@/components/docs/component-card-grid";import { ComponentExample } from "@/components/docs/component-example";-import { ComponentPreview } from "@/components/docs/component-preview";+import { ComponentPreviewMdx } from "@/components/docs/component-preview-mdx";import { CopyButton } from "@/components/docs/copy-button";import { Dependencies } from "@/components/docs/dependencies";import { GuideVideo } from "@/components/docs/guide-video";@@ -104,7 +104,7 @@ export function getMDXComponents(components?: MDXComponents): MDXComponents {code: Code,// Custom doc widgets — registrations only, not reimplemented here.- ComponentPreview,+ ComponentPreview: ComponentPreviewMdx,ComponentExample,UiComponentPreview,BlockPreview,diff --git a/package.json b/package.jsonindex 6038c911..d10b473c 100644--- a/package.json+++ b/package.json@@ -12,8 +12,8 @@"typecheck": "tsc --noEmit","lint": "biome check","format": "biome format --write",- "registry:build": "shadcn build --output registry-artifacts && biome format --write registry-artifacts",- "registry:check": "shadcn build --output registry-artifacts && biome format --write registry-artifacts && git diff --quiet -- registry-artifacts || (echo 'registry-artifacts is out of sync with registry/ sources. Run: bun run registry:build and commit the result.' && exit 1)",+ "registry:build": "shadcn build --output registry-artifacts && bun scripts/build-elements.mts && biome format --write registry-artifacts",+ "registry:check": "shadcn build --output registry-artifacts && bun scripts/build-elements.mts && biome format --write registry-artifacts && git diff --quiet -- registry-artifacts || (echo 'registry-artifacts is out of sync with registry/ sources. Run: bun run registry:build and commit the result.' && exit 1)","manifest:build": "bun scripts/build-preview-manifest.mts && biome format --write registry/__manifest__.ts","manifest:check": "bun run manifest:build && git diff --quiet -- registry/__manifest__.ts || (echo 'registry/__manifest__.ts is out of sync with registry config sources. Run: bun run manifest:build and commit the result.' && exit 1)","remotion:browser": "bun scripts/ensure-browser.mts",@@ -29,12 +29,13 @@"@openpanel/nextjs": "^1.0.13","@openpanel/sdk": "^1.3.1","@paper-design/shaders-react": "0.0.76",- "@remotion/bundler": "^4.0.499",- "@remotion/google-fonts": "^4.0.499",- "@remotion/paths": "^4.0.499",- "@remotion/player": "^4.0.499",- "@remotion/renderer": "^4.0.499",- "@remotion/transitions": "^4.0.499",+ "@remotion/bundler": "4.0.513",+ "@remotion/google-fonts": "4.0.513",+ "@remotion/paths": "4.0.513",+ "@remotion/player": "4.0.513",+ "@remotion/renderer": "4.0.513",+ "@remotion/studio-protocol": "4.0.513",+ "@remotion/transitions": "4.0.513","@shadcn/react": "^0.1.0","@uidotdev/usehooks": "^2.4.1","class-variance-authority": "^0.7.1",@@ -58,7 +59,7 @@"react-dom": "19.2.4","react-resizable-panels": "^4.9.0","rehype-pretty-code": "^0.14.4",- "remotion": "^4.0.499",+ "remotion": "4.0.513","server-only": "^0.0.1","sonner": "^2.0.7","tailwind-merge": "^3.5.0",diff --git a/registry-artifacts/animated-bar-chart.json b/registry-artifacts/animated-bar-chart.jsonindex bd672a89..99d769ae 100644--- a/registry-artifacts/animated-bar-chart.json+++ b/registry-artifacts/animated-bar-chart.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/animated-bar-chart/index.tsx",- "content": "\"use client\";\n\nimport { spring, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface AnimatedBarChartProps {\n data?: number[];\n labels?: string[];\n width?: number;\n height?: number;\n barColor?: string;\n gap?: number;\n staggerFrames?: number;\n speed?: number;\n className?: string;\n}\n\nexport function AnimatedBarChart({\n data = [35, 60, 45, 80, 55, 70, 90, 65],\n labels,\n width = 1000,\n height = 500,\n barColor = \"#0ea5e9\",\n gap = 16,\n staggerFrames = 6,\n speed = 1,\n className,\n}: AnimatedBarChartProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const padding = 60;\n const labelSpace = labels ? 40 : 0;\n const innerWidth = width - padding * 2;\n const innerHeight = height - padding * 2 - labelSpace;\n const max = Math.max(...data);\n const barWidth = (innerWidth - gap * (data.length - 1)) / data.length;\n const baseY = padding + innerHeight;\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n <svg width={width} height={height} viewBox={`0 0 ${width} ${height}`}>\n {/* Baseline */}\n <line\n x1={padding}\n x2={padding + innerWidth}\n y1={baseY}\n y2={baseY}\n stroke=\"#27272a\"\n strokeWidth={2}\n />\n\n {data.map((value, index) => {\n const targetHeight = (value / max) * innerHeight;\n const x = padding + index * (barWidth + gap);\n const y = baseY - targetHeight;\n\n const scaleY = spring({\n frame: frame - index * staggerFrames,\n fps,\n config: { damping: 12, stiffness: 100, mass: 0.8 },\n from: 0,\n to: 1,\n });\n\n return (\n <g key={index}>\n <rect\n x={x}\n y={y}\n width={barWidth}\n height={targetHeight}\n rx={6}\n fill={barColor}\n style={{\n transform: `scaleY(${scaleY})`,\n transformOrigin: `${x + barWidth / 2}px ${baseY}px`,\n transformBox: \"fill-box\",\n filter: `drop-shadow(0 4px 16px ${barColor}55)`,\n }}\n />\n {labels?.[index] && (\n <text\n x={x + barWidth / 2}\n y={baseY + 28}\n fill=\"#a1a1aa\"\n fontSize={16}\n textAnchor=\"middle\"\n style={{\n opacity: scaleY,\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {labels[index]}\n </text>\n )}\n </g>\n );\n })}\n </svg>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { spring, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface AnimatedBarChartProps {\n data?: number[];\n labels?: string[];\n width?: number;\n height?: number;\n barColor?: string;\n gap?: number;\n staggerFrames?: number;\n speed?: number;\n className?: string;\n}\n\nexport function AnimatedBarChart({\n data = [35, 60, 45, 80, 55, 70, 90, 65],\n labels,\n width = 1000,\n height = 500,\n barColor = \"#0ea5e9\",\n gap = 16,\n staggerFrames = 6,\n speed = 1,\n className,\n}: AnimatedBarChartProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const padding = 60;\n const labelSpace = labels ? 40 : 0;\n const innerWidth = width - padding * 2;\n const innerHeight = height - padding * 2 - labelSpace;\n const max = Math.max(...data);\n const barWidth = (innerWidth - gap * (data.length - 1)) / data.length;\n const baseY = padding + innerHeight;\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n <svg width={width} height={height} viewBox={`0 0 ${width} ${height}`}>\n {/* Baseline */}\n <line\n x1={padding}\n x2={padding + innerWidth}\n y1={baseY}\n y2={baseY}\n stroke=\"#27272a\"\n strokeWidth={2}\n />\n\n {data.map((value, index) => {\n const targetHeight = (value / max) * innerHeight;\n const x = padding + index * (barWidth + gap);\n const y = baseY - targetHeight;\n\n const scaleY = spring({\n frame: frame - index * staggerFrames,\n fps,\n config: { damping: 12, stiffness: 100, mass: 0.8 },\n from: 0,\n to: 1,\n });\n\n return (\n <g key={index}>\n <rect\n x={x}\n y={y}\n width={barWidth}\n height={targetHeight}\n rx={6}\n fill={barColor}\n style={{\n scale: `1 ${scaleY}`,\n transformOrigin: `${x + barWidth / 2}px ${baseY}px`,\n transformBox: \"fill-box\",\n filter: `drop-shadow(0 4px 16px ${barColor}55)`,\n }}\n />\n {labels?.[index] && (\n <text\n x={x + barWidth / 2}\n y={baseY + 28}\n fill=\"#a1a1aa\"\n fontSize={16}\n textAnchor=\"middle\"\n style={{\n opacity: scaleY,\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {labels[index]}\n </text>\n )}\n </g>\n );\n })}\n </svg>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/animated-bar-chart.tsx"}diff --git a/registry-artifacts/ascii-dissolve.json b/registry-artifacts/ascii-dissolve.jsonindex 83a9b1f9..4f154746 100644--- a/registry-artifacts/ascii-dissolve.json+++ b/registry-artifacts/ascii-dissolve.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/ascii-dissolve/index.tsx",- "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport React from \"react\";\nimport {\n AbsoluteFill,\n continueRender,\n delayRender,\n Easing,\n interpolate,\n random,\n useVideoConfig,\n} from \"remotion\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\n// ---------------------------------------------------------------------------\n// ascii-dissolve — the frame becomes plain text. The outgoing scene fades as\n// a fullscreen field of monospace glyphs rises over it: a deterministic\n// noise field drives each cell through a density ramp (\" .:-=+*#%@\"), so the\n// cover reads as living ASCII. It holds fully opaque long enough to be READ\n// as text, then the cells drop back down the ramp to space while the\n// incoming scene resolves beneath.\n//\n// Text mode (enterText): the outgoing scene blurs out under the rising\n// field; the incoming headline is never previewed as ascii — the field\n// dissolves cell by cell (per-cell staggered, never a flat plane) while\n// the real text fades in over it. `enterStyle` picks what happens AROUND\n// the arriving text:\n// \"fade\" — plain: staggered dissolve everywhere, text fades in.\n// \"clearing\" — the dissolve order is biased by distance to the text:\n// cells near the headline vanish first, the field opens a\n// granular cavity around it.\n// \"halo\" — a smooth radial attenuation grows around the text: near\n// cells slide down the ramp into thin glyphs, a soft dark\n// well forms behind the headline.\n// \"wave\" — one density impulse rides outward from the text: cells\n// on the wavefront jump up the ramp for a beat, then the\n// front leaves cleared field behind it.\n// \"focus\" — the field defocuses: it blurs and dims while the sharp\n// text resolves — a depth-of-field handoff.\n// \"lime-echo\" — on landing, a sparse ring of accent-colored glyphs\n// flashes once around the headline and settles.\n//\n// Fully deterministic: per-cell jitter comes from remotion's seeded random,\n// the flow from fixed sinusoids over progress, the letterform masks from a\n// one-time offscreen-canvas sample of the loaded fonts.\n// ---------------------------------------------------------------------------\n\nexport type AsciiTextSpec = {\n /** The incoming headline (used for timing and the zone styles). */\n text: string;\n /** Must match the scene's rendered text exactly. */\n fontSize: number;\n /** Concrete family list for canvas sampling (CSS vars won't resolve). */\n fontFamily: string;\n /** Default 400. */\n fontWeight?: number;\n /** Letter-spacing in em, if the scene's text carries one. Default 0. */\n letterSpacingEm?: number;\n /** Glyph color of the ASCII letterform. Default ink. */\n color?: string;\n /** Vertical offset from frame center, px. Default 0. */\n offsetY?: number;\n};\n\nexport type AsciiEnterStyle =\n | \"fade\"\n | \"clearing\"\n | \"halo\"\n | \"wave\"\n | \"focus\"\n | \"lime-echo\";\n\nexport type AsciiDissolveProps = {\n /** Row height of one glyph cell in px. Default 22 (use ~14 in text mode). */\n cellSize?: number;\n /** Glyph color. Default translucent ink. */\n colorFront?: string;\n /** Canvas behind the glyphs during the hold. Default near-black. */\n colorBack?: string;\n /** Optional second color for a sparse scattering of accent cells. */\n accentColor?: string;\n /** Share of cells rendered in the accent color, 0..1. Default 0.05. */\n accentDensity?: number;\n /** Density ramp, lightest → densest. Default \" .:-=+*#%@\". */\n ramp?: string;\n /** Monospace stack for the field. */\n fontFamily?: string;\n /** Text mode: the incoming headline (used for timing and as the zone). */\n enterText?: AsciiTextSpec;\n /** What happens around the arriving text. Default \"fade\". */\n enterStyle?: AsciiEnterStyle;\n /** Progress window over which the outgoing scene fades out. */\n exitFade?: [number, number];\n /** Progress window over which the incoming scene resolves. */\n enterFade?: [number, number];\n};\n\n// Per-cell stagger: global window progress g plus jitter j → this cell's\n// local progress. spread controls how far cells drift apart.\nconst stagger = (g: number, j: number, spread = 0.55) =>\n Math.max(0, Math.min(1, (g - j * spread) / (1 - spread)));\n\n// The field's mono advance, measured at the size the <pre> renders.\nconst measureAdvance = (fontFamily: string, fontSize: number): number => {\n const fallback = fontSize * 0.6;\n if (typeof document === \"undefined\") return fallback;\n const ctx = document.createElement(\"canvas\").getContext(\"2d\");\n if (!ctx) return fallback;\n ctx.font = `400 ${fontSize}px ${fontFamily}`;\n const w = ctx.measureText(\"0\").width;\n return w > 0 ? w : fallback;\n};\n\n// Sample the headline's letterforms: draw the text once on an offscreen\n// canvas at 2× cell resolution and grade each cell by subsample coverage\n// (0..4). Edge cells get mid-ramp glyphs, core cells the densest — the\n// grading anti-aliases the letter contours, so strokes thinner than a cell\n// still read as continuous letters.\nconst buildTextMask = (\n spec: AsciiTextSpec,\n width: number,\n height: number,\n cols: number,\n rows: number,\n advance: number,\n cellH: number,\n): Uint8Array | null => {\n if (typeof document === \"undefined\") return null;\n const canvas = document.createElement(\"canvas\");\n canvas.width = cols * 2;\n canvas.height = rows * 2;\n const ctx = canvas.getContext(\"2d\", { willReadFrequently: true });\n if (!ctx) return null;\n ctx.setTransform(2 / advance, 0, 0, 2 / cellH, 0, 0);\n ctx.font = `${spec.fontWeight ?? 400} ${spec.fontSize}px ${spec.fontFamily}`;\n const spacing = (spec.letterSpacingEm ?? 0) * spec.fontSize;\n if (spacing !== 0) {\n (\n ctx as CanvasRenderingContext2D & { letterSpacing?: string }\n ).letterSpacing = `${spacing}px`;\n }\n ctx.textAlign = \"center\";\n // Canvas \"middle\" baseline is computed from the em square and lands\n // visibly ABOVE where a flex-centered DOM span puts the same text. Rebuild\n // the DOM's math instead: a flex-centered span (line-height normal) puts\n // its baseline at H/2 + (ascent - descent)/2, with ascent/descent taken\n // from the font's own metrics.\n ctx.textBaseline = \"alphabetic\";\n ctx.fillStyle = \"#fff\";\n const metrics = ctx.measureText(spec.text);\n const ascent = metrics.fontBoundingBoxAscent ?? spec.fontSize * 0.8;\n const descent = metrics.fontBoundingBoxDescent ?? spec.fontSize * 0.2;\n const baselineY = height / 2 + (ascent - descent) / 2 + (spec.offsetY ?? 0);\n ctx.fillText(spec.text, width / 2, baselineY);\n const data = ctx.getImageData(0, 0, cols * 2, rows * 2).data;\n const mask = new Uint8Array(cols * rows);\n for (let y = 0; y < rows; y++) {\n for (let x = 0; x < cols; x++) {\n let hits = 0;\n if (data[(y * 2 * cols * 2 + x * 2) * 4 + 3] > 100) hits++;\n if (data[(y * 2 * cols * 2 + x * 2 + 1) * 4 + 3] > 100) hits++;\n if (data[((y * 2 + 1) * cols * 2 + x * 2) * 4 + 3] > 100) hits++;\n if (data[((y * 2 + 1) * cols * 2 + x * 2 + 1) * 4 + 3] > 100) hits++;\n mask[y * cols + x] = hits;\n }\n }\n return mask;\n};\n\nconst AsciiDissolvePresentation: React.FC<\n TransitionPresentationComponentProps<AsciiDissolveProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n cellSize = 22,\n colorFront = \"rgba(242,242,242,0.6)\",\n colorBack = \"#0d0d10\",\n accentColor,\n accentDensity = 0.05,\n ramp = \" .:-=+*#%@\",\n fontFamily = \"ui-monospace, SFMono-Regular, Menlo, monospace\",\n enterText,\n enterStyle = \"fade\",\n exitFade,\n enterFade,\n } = passedProps;\n const { width, height } = useVideoConfig();\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n const textMode = enterText !== undefined;\n\n // The outgoing scene blurs out under the rising field.\n const exitWindow = exitFade ?? [0.14, 0.3];\n // The real text fades in while the field dissolves cell by cell.\n const enterWindow = enterFade ?? (textMode ? [0.6, 0.8] : [0.62, 0.8]);\n\n // The masks and the mono advance must be measured with the REAL webfonts.\n // The component can mount while they are still loading (a fallback font\n // would bake wrong metrics into the memoized masks and shift the letterform\n // off the scene's text) — so gate on document.fonts and hold the render.\n const [fontsReady, setFontsReady] = React.useState(\n () => typeof document === \"undefined\" || document.fonts.status === \"loaded\",\n );\n React.useEffect(() => {\n if (fontsReady || typeof document === \"undefined\") return;\n const handle = delayRender(\"ascii-dissolve: waiting for fonts\");\n let alive = true;\n document.fonts.ready.then(() => {\n if (alive) setFontsReady(true);\n continueRender(handle);\n });\n return () => {\n alive = false;\n continueRender(handle);\n };\n }, [fontsReady]);\n\n const fontSize = cellSize * 0.86;\n // biome-ignore lint/correctness/useExhaustiveDependencies: fontsReady is an intentional extra dep — remeasure the mono advance once the real webfonts load\n const advance = React.useMemo(\n () => measureAdvance(fontFamily, fontSize),\n [fontFamily, fontSize, fontsReady],\n );\n const cols = Math.ceil(width / advance);\n const rows = Math.ceil(height / cellSize) + 1;\n\n // The zone styles need to know where the incoming text sits — a capsule\n // around its center line, derived from the letterform mask's bounds. The\n // mask itself is never displayed.\n const zoneStyles: AsciiEnterStyle[] = [\n \"clearing\",\n \"halo\",\n \"wave\",\n \"lime-echo\",\n ];\n const needZone = enterText !== undefined && zoneStyles.includes(enterStyle);\n const enterMask = React.useMemo(\n () =>\n enterText && needZone && fontsReady\n ? buildTextMask(enterText, width, height, cols, rows, advance, cellSize)\n : null,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n enterText,\n needZone,\n fontsReady,\n width,\n height,\n cols,\n rows,\n advance,\n cellSize,\n ],\n );\n const enterZone = React.useMemo(() => {\n if (enterMask === null) return null;\n let minX = Infinity;\n let maxX = -Infinity;\n let minY = Infinity;\n let maxY = -Infinity;\n for (let y = 0; y < rows; y++) {\n for (let x = 0; x < cols; x++) {\n if (enterMask[y * cols + x] > 0) {\n if (x < minX) minX = x;\n if (x > maxX) maxX = x;\n if (y < minY) minY = y;\n if (y > maxY) maxY = y;\n }\n }\n }\n if (maxX < minX) return null;\n return {\n x0: minX * advance,\n x1: (maxX + 1) * advance,\n cy: ((minY + maxY + 1) / 2) * cellSize,\n halfH: ((maxY - minY + 1) / 2) * cellSize,\n };\n }, [enterMask, cols, rows, advance, cellSize]);\n\n if (!entering) {\n const exitStyle: React.CSSProperties = {\n opacity: interpolate(p, exitWindow, [1, 0], clampOpts),\n filter: `blur(${interpolate(p, [exitWindow[0], exitWindow[1] + 0.06], [0, 8], clampOpts)}px)`,\n };\n return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;\n }\n\n // -------------------------------------------------------------------------\n // Envelopes.\n // -------------------------------------------------------------------------\n // Generic mode keeps the original flat envelopes; text mode staggers the\n // rise and the dissolve per cell instead, so nothing moves as one plane.\n const coverage = textMode\n ? 1\n : interpolate(p, [0.06, 0.28, 0.6, 0.9], [0, 1, 1, 0], clampOpts);\n const fieldOpacity = textMode\n ? 1\n : interpolate(p, [0.04, 0.2, 0.66, 0.94], [0, 1, 1, 0], clampOpts);\n const panelOpacity = textMode\n ? interpolate(p, [0.06, 0.24, 0.55, 0.75], [0, 1, 1, 0], clampOpts)\n : fieldOpacity;\n\n // Text-mode phase clocks. The outgoing scene blurs out as the field\n // rises; the field boils, then dissolves cell by cell while the real\n // text fades in.\n const riseG = interpolate(p, [0.04, 0.3], [0, 1], clampOpts);\n const dissolveG = interpolate(\n p,\n enterStyle === \"clearing\" ? [0.52, 0.85] : [0.5, 0.82],\n [0, 1],\n clampOpts,\n );\n\n // Style clocks for the arriving text's surroundings.\n const haloG = interpolate(p, [0.52, 0.74], [0, 1], clampOpts);\n const waveT = interpolate(p, [0.56, 0.94], [0, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.quad),\n });\n const waveR = waveT * 860; // the impulse front, px from the text capsule\n const echoFlash = interpolate(p, [0.56, 0.64, 0.82], [0, 0.9, 0], clampOpts);\n const focusBlur = interpolate(p, [0.55, 0.9], [0, 4], clampOpts);\n const focusFade = interpolate(p, [0.62, 0.94], [1, 0], clampOpts);\n\n const cx = cols / 2;\n const cy = rows / 2;\n const t = p * 5;\n const rampLen = ramp.length;\n\n const mainRows: string[] = [];\n const accentRows: string[] = [];\n const echoRows: string[] = [];\n const fieldAlive = textMode ? p < 0.999 : fieldOpacity > 0.001;\n\n if (fieldAlive) {\n for (let y = 0; y < rows; y++) {\n let mainRow = \"\";\n let accentRow = \"\";\n let echoRow = \"\";\n for (let x = 0; x < cols; x++) {\n // A slow sinusoid flow plus per-cell jitter — organic, but textual.\n const base =\n 0.5 +\n (Math.sin(x * 0.33 + t * 1.7) +\n Math.sin(y * 0.51 - t * 1.2) +\n Math.sin((x * 0.5 + y) * 0.24 + t * 0.9) +\n Math.sin(Math.hypot(x - cx, (y - cy) * 1.8) * 0.42 - t * 2.1)) /\n 8;\n const jitter = random(`ascii-${x}-${y}`);\n\n // Distance to the incoming text's capsule, for the zone styles —\n // and the plain circular distance from its center, for the wave.\n let dist = Infinity;\n let distC = Infinity;\n let s = 0; // proximity, 1 at the text's center line → 0 far away\n if (enterZone !== null) {\n const px = (x + 0.5) * advance;\n const py = (y + 0.5) * cellSize;\n const nx = Math.min(Math.max(px, enterZone.x0), enterZone.x1);\n dist = Math.hypot(px - nx, py - enterZone.cy);\n distC = Math.hypot(\n px - (enterZone.x0 + enterZone.x1) / 2,\n py - enterZone.cy,\n );\n s = Math.max(0, 1 - dist / (enterZone.halfH + 64));\n }\n\n let cellCoverage: number;\n if (!textMode) {\n cellCoverage = coverage;\n } else if (enterStyle === \"clearing\" && enterZone !== null) {\n // Dissolve order biased by proximity: cells near the headline\n // vanish first, a granular cavity opens outward.\n const order = (1 - s) * 0.6 + random(`ascii-d-${x}-${y}`) * 0.4;\n const gone = Math.max(\n 0,\n Math.min(1, (dissolveG * 1.35 - order) / 0.3),\n );\n cellCoverage = stagger(riseG, jitter) * (1 - gone);\n } else if (enterStyle === \"wave\" && enterZone !== null) {\n // The impulse front — a CIRCLE from the text's center — clears\n // the field behind it.\n const passed = Math.max(0, Math.min(1, (waveR - distC) / 55));\n cellCoverage = stagger(riseG, jitter) * (1 - passed);\n } else {\n cellCoverage =\n stagger(riseG, jitter) *\n (1 - stagger(dissolveG, random(`ascii-d-${x}-${y}`)));\n }\n\n let d = Math.max(\n 0,\n Math.min(\n 0.999,\n (base * 0.72 + jitter * 0.28) * cellCoverage * 1.2 - 0.08,\n ),\n );\n if (enterStyle === \"halo\" && enterZone !== null) {\n // A smooth radial attenuation: near cells slide down the ramp.\n d *= 1 - haloG * s;\n }\n if (enterStyle === \"wave\" && enterZone !== null && waveT > 0) {\n // Cells on the circular wavefront jump up the ramp for a beat.\n const bump = Math.exp(-(((distC - waveR) / 55) ** 2));\n d = Math.min(0.999, d + bump * 0.5);\n }\n const ch = ramp[Math.floor(d * rampLen)] ?? \" \";\n const isAccent =\n accentColor !== undefined &&\n random(`ascii-a-${x}-${y}`) < accentDensity;\n mainRow += isAccent ? \" \" : ch;\n accentRow += isAccent ? ch : \" \";\n\n // The lime echo: a sparse ring of accent glyphs around the headline.\n if (\n enterStyle === \"lime-echo\" &&\n enterZone !== null &&\n echoFlash > 0.01 &&\n dist > 8 &&\n dist < 84 &&\n ch !== \" \" &&\n random(`ascii-e-${x}-${y}`) < 0.5\n ) {\n echoRow += ch;\n } else {\n echoRow += \" \";\n }\n }\n mainRows.push(mainRow);\n accentRows.push(accentRow);\n echoRows.push(echoRow);\n }\n }\n\n // The blur must hit exactly 0 by p = 1: the entering presentation stays\n // mounted at p = 1 for the whole scene, so any residue would soften the\n // incoming scene permanently. In text mode the incoming scene resolves\n // with NO transform at all — it must sit pixel-exact under the letterform.\n const enterBlur = textMode\n ? 0\n : interpolate(\n p,\n [enterWindow[0], Math.min(1, enterWindow[1] + 0.05)],\n [10, 0],\n clampOpts,\n );\n const childStyle: React.CSSProperties = textMode\n ? { opacity: interpolate(p, enterWindow, [0, 1], clampOpts) }\n : {\n opacity: interpolate(p, enterWindow, [0, 1], clampOpts),\n transform: `scale(${interpolate(p, [enterWindow[0], 1], [1.04, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n })})`,\n filter: enterBlur > 0.01 ? `blur(${enterBlur}px)` : undefined,\n };\n\n const preStyle: React.CSSProperties = {\n margin: 0,\n position: \"absolute\",\n inset: 0,\n overflow: \"hidden\",\n whiteSpace: \"pre\",\n fontFamily,\n fontSize,\n lineHeight: `${cellSize}px`,\n color: colorFront,\n };\n\n const renderLayer = (\n layerRows: string[],\n color: string,\n layerOpacity: number,\n ) =>\n layerOpacity > 0.001 ? (\n <pre style={{ ...preStyle, color, opacity: layerOpacity }}>\n {layerRows.join(\"\\n\")}\n </pre>\n ) : null;\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>\n {fieldAlive ? (\n <AbsoluteFill style={{ pointerEvents: \"none\" }}>\n <AbsoluteFill\n style={{ background: colorBack, opacity: panelOpacity }}\n />\n <AbsoluteFill\n style={\n enterStyle === \"focus\" && textMode\n ? {\n opacity: focusFade,\n filter:\n focusBlur > 0.01 ? `blur(${focusBlur}px)` : undefined,\n }\n : undefined\n }\n >\n {renderLayer(mainRows, colorFront, fieldOpacity)}\n {accentColor !== undefined\n ? renderLayer(accentRows, accentColor, fieldOpacity)\n : null}\n </AbsoluteFill>\n {enterStyle === \"lime-echo\"\n ? renderLayer(echoRows, accentColor ?? \"#C3E88D\", echoFlash)\n : null}\n </AbsoluteFill>\n ) : null}\n </AbsoluteFill>\n );\n};\n\nexport function asciiDissolve(\n props: AsciiDissolveProps = {},\n): TransitionPresentation<AsciiDissolveProps> {\n return {\n component: AsciiDissolvePresentation,\n props,\n };\n}\n",+ "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport React from \"react\";\nimport {\n AbsoluteFill,\n continueRender,\n delayRender,\n Easing,\n interpolate,\n random,\n useVideoConfig,\n} from \"remotion\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\n// ---------------------------------------------------------------------------\n// ascii-dissolve — the frame becomes plain text. The outgoing scene fades as\n// a fullscreen field of monospace glyphs rises over it: a deterministic\n// noise field drives each cell through a density ramp (\" .:-=+*#%@\"), so the\n// cover reads as living ASCII. It holds fully opaque long enough to be READ\n// as text, then the cells drop back down the ramp to space while the\n// incoming scene resolves beneath.\n//\n// Text mode (enterText): the outgoing scene blurs out under the rising\n// field; the incoming headline is never previewed as ascii — the field\n// dissolves cell by cell (per-cell staggered, never a flat plane) while\n// the real text fades in over it. `enterStyle` picks what happens AROUND\n// the arriving text:\n// \"fade\" — plain: staggered dissolve everywhere, text fades in.\n// \"clearing\" — the dissolve order is biased by distance to the text:\n// cells near the headline vanish first, the field opens a\n// granular cavity around it.\n// \"halo\" — a smooth radial attenuation grows around the text: near\n// cells slide down the ramp into thin glyphs, a soft dark\n// well forms behind the headline.\n// \"wave\" — one density impulse rides outward from the text: cells\n// on the wavefront jump up the ramp for a beat, then the\n// front leaves cleared field behind it.\n// \"focus\" — the field defocuses: it blurs and dims while the sharp\n// text resolves — a depth-of-field handoff.\n// \"lime-echo\" — on landing, a sparse ring of accent-colored glyphs\n// flashes once around the headline and settles.\n//\n// Fully deterministic: per-cell jitter comes from remotion's seeded random,\n// the flow from fixed sinusoids over progress, the letterform masks from a\n// one-time offscreen-canvas sample of the loaded fonts.\n// ---------------------------------------------------------------------------\n\nexport type AsciiTextSpec = {\n /** The incoming headline (used for timing and the zone styles). */\n text: string;\n /** Must match the scene's rendered text exactly. */\n fontSize: number;\n /** Concrete family list for canvas sampling (CSS vars won't resolve). */\n fontFamily: string;\n /** Default 400. */\n fontWeight?: number;\n /** Letter-spacing in em, if the scene's text carries one. Default 0. */\n letterSpacingEm?: number;\n /** Glyph color of the ASCII letterform. Default ink. */\n color?: string;\n /** Vertical offset from frame center, px. Default 0. */\n offsetY?: number;\n};\n\nexport type AsciiEnterStyle =\n | \"fade\"\n | \"clearing\"\n | \"halo\"\n | \"wave\"\n | \"focus\"\n | \"lime-echo\";\n\nexport type AsciiDissolveProps = {\n /** Row height of one glyph cell in px. Default 22 (use ~14 in text mode). */\n cellSize?: number;\n /** Glyph color. Default translucent ink. */\n colorFront?: string;\n /** Canvas behind the glyphs during the hold. Default near-black. */\n colorBack?: string;\n /** Optional second color for a sparse scattering of accent cells. */\n accentColor?: string;\n /** Share of cells rendered in the accent color, 0..1. Default 0.05. */\n accentDensity?: number;\n /** Density ramp, lightest → densest. Default \" .:-=+*#%@\". */\n ramp?: string;\n /** Monospace stack for the field. */\n fontFamily?: string;\n /** Text mode: the incoming headline (used for timing and as the zone). */\n enterText?: AsciiTextSpec;\n /** What happens around the arriving text. Default \"fade\". */\n enterStyle?: AsciiEnterStyle;\n /** Progress window over which the outgoing scene fades out. */\n exitFade?: [number, number];\n /** Progress window over which the incoming scene resolves. */\n enterFade?: [number, number];\n};\n\n// Per-cell stagger: global window progress g plus jitter j → this cell's\n// local progress. spread controls how far cells drift apart.\nconst stagger = (g: number, j: number, spread = 0.55) =>\n Math.max(0, Math.min(1, (g - j * spread) / (1 - spread)));\n\n// The field's mono advance, measured at the size the <pre> renders.\nconst measureAdvance = (fontFamily: string, fontSize: number): number => {\n const fallback = fontSize * 0.6;\n if (typeof document === \"undefined\") return fallback;\n const ctx = document.createElement(\"canvas\").getContext(\"2d\");\n if (!ctx) return fallback;\n ctx.font = `400 ${fontSize}px ${fontFamily}`;\n const w = ctx.measureText(\"0\").width;\n return w > 0 ? w : fallback;\n};\n\n// Sample the headline's letterforms: draw the text once on an offscreen\n// canvas at 2× cell resolution and grade each cell by subsample coverage\n// (0..4). Edge cells get mid-ramp glyphs, core cells the densest — the\n// grading anti-aliases the letter contours, so strokes thinner than a cell\n// still read as continuous letters.\nconst buildTextMask = (\n spec: AsciiTextSpec,\n width: number,\n height: number,\n cols: number,\n rows: number,\n advance: number,\n cellH: number,\n): Uint8Array | null => {\n if (typeof document === \"undefined\") return null;\n const canvas = document.createElement(\"canvas\");\n canvas.width = cols * 2;\n canvas.height = rows * 2;\n const ctx = canvas.getContext(\"2d\", { willReadFrequently: true });\n if (!ctx) return null;\n ctx.setTransform(2 / advance, 0, 0, 2 / cellH, 0, 0);\n ctx.font = `${spec.fontWeight ?? 400} ${spec.fontSize}px ${spec.fontFamily}`;\n const spacing = (spec.letterSpacingEm ?? 0) * spec.fontSize;\n if (spacing !== 0) {\n (\n ctx as CanvasRenderingContext2D & { letterSpacing?: string }\n ).letterSpacing = `${spacing}px`;\n }\n ctx.textAlign = \"center\";\n // Canvas \"middle\" baseline is computed from the em square and lands\n // visibly ABOVE where a flex-centered DOM span puts the same text. Rebuild\n // the DOM's math instead: a flex-centered span (line-height normal) puts\n // its baseline at H/2 + (ascent - descent)/2, with ascent/descent taken\n // from the font's own metrics.\n ctx.textBaseline = \"alphabetic\";\n ctx.fillStyle = \"#fff\";\n const metrics = ctx.measureText(spec.text);\n const ascent = metrics.fontBoundingBoxAscent ?? spec.fontSize * 0.8;\n const descent = metrics.fontBoundingBoxDescent ?? spec.fontSize * 0.2;\n const baselineY = height / 2 + (ascent - descent) / 2 + (spec.offsetY ?? 0);\n ctx.fillText(spec.text, width / 2, baselineY);\n const data = ctx.getImageData(0, 0, cols * 2, rows * 2).data;\n const mask = new Uint8Array(cols * rows);\n for (let y = 0; y < rows; y++) {\n for (let x = 0; x < cols; x++) {\n let hits = 0;\n if (data[(y * 2 * cols * 2 + x * 2) * 4 + 3] > 100) hits++;\n if (data[(y * 2 * cols * 2 + x * 2 + 1) * 4 + 3] > 100) hits++;\n if (data[((y * 2 + 1) * cols * 2 + x * 2) * 4 + 3] > 100) hits++;\n if (data[((y * 2 + 1) * cols * 2 + x * 2 + 1) * 4 + 3] > 100) hits++;\n mask[y * cols + x] = hits;\n }\n }\n return mask;\n};\n\nconst AsciiDissolvePresentation: React.FC<\n TransitionPresentationComponentProps<AsciiDissolveProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n cellSize = 22,\n colorFront = \"rgba(242,242,242,0.6)\",\n colorBack = \"#0d0d10\",\n accentColor,\n accentDensity = 0.05,\n ramp = \" .:-=+*#%@\",\n fontFamily = \"ui-monospace, SFMono-Regular, Menlo, monospace\",\n enterText,\n enterStyle = \"fade\",\n exitFade,\n enterFade,\n } = passedProps;\n const { width, height } = useVideoConfig();\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n const textMode = enterText !== undefined;\n\n // The outgoing scene blurs out under the rising field.\n const exitWindow = exitFade ?? [0.14, 0.3];\n // The real text fades in while the field dissolves cell by cell.\n const enterWindow = enterFade ?? (textMode ? [0.6, 0.8] : [0.62, 0.8]);\n\n // The masks and the mono advance must be measured with the REAL webfonts.\n // The component can mount while they are still loading (a fallback font\n // would bake wrong metrics into the memoized masks and shift the letterform\n // off the scene's text) — so gate on document.fonts and hold the render.\n const [fontsReady, setFontsReady] = React.useState(\n () => typeof document === \"undefined\" || document.fonts.status === \"loaded\",\n );\n React.useEffect(() => {\n if (fontsReady || typeof document === \"undefined\") return;\n const handle = delayRender(\"ascii-dissolve: waiting for fonts\");\n let alive = true;\n document.fonts.ready.then(() => {\n if (alive) setFontsReady(true);\n continueRender(handle);\n });\n return () => {\n alive = false;\n continueRender(handle);\n };\n }, [fontsReady]);\n\n const fontSize = cellSize * 0.86;\n // biome-ignore lint/correctness/useExhaustiveDependencies: fontsReady is an intentional extra dep — remeasure the mono advance once the real webfonts load\n const advance = React.useMemo(\n () => measureAdvance(fontFamily, fontSize),\n [fontFamily, fontSize, fontsReady],\n );\n const cols = Math.ceil(width / advance);\n const rows = Math.ceil(height / cellSize) + 1;\n\n // The zone styles need to know where the incoming text sits — a capsule\n // around its center line, derived from the letterform mask's bounds. The\n // mask itself is never displayed.\n const zoneStyles: AsciiEnterStyle[] = [\n \"clearing\",\n \"halo\",\n \"wave\",\n \"lime-echo\",\n ];\n const needZone = enterText !== undefined && zoneStyles.includes(enterStyle);\n const enterMask = React.useMemo(\n () =>\n enterText && needZone && fontsReady\n ? buildTextMask(enterText, width, height, cols, rows, advance, cellSize)\n : null,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n enterText,\n needZone,\n fontsReady,\n width,\n height,\n cols,\n rows,\n advance,\n cellSize,\n ],\n );\n const enterZone = React.useMemo(() => {\n if (enterMask === null) return null;\n let minX = Infinity;\n let maxX = -Infinity;\n let minY = Infinity;\n let maxY = -Infinity;\n for (let y = 0; y < rows; y++) {\n for (let x = 0; x < cols; x++) {\n if (enterMask[y * cols + x] > 0) {\n if (x < minX) minX = x;\n if (x > maxX) maxX = x;\n if (y < minY) minY = y;\n if (y > maxY) maxY = y;\n }\n }\n }\n if (maxX < minX) return null;\n return {\n x0: minX * advance,\n x1: (maxX + 1) * advance,\n cy: ((minY + maxY + 1) / 2) * cellSize,\n halfH: ((maxY - minY + 1) / 2) * cellSize,\n };\n }, [enterMask, cols, rows, advance, cellSize]);\n\n if (!entering) {\n const exitStyle: React.CSSProperties = {\n opacity: interpolate(p, exitWindow, [1, 0], clampOpts),\n filter: `blur(${interpolate(p, [exitWindow[0], exitWindow[1] + 0.06], [0, 8], clampOpts)}px)`,\n };\n return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;\n }\n\n // -------------------------------------------------------------------------\n // Envelopes.\n // -------------------------------------------------------------------------\n // Generic mode keeps the original flat envelopes; text mode staggers the\n // rise and the dissolve per cell instead, so nothing moves as one plane.\n const coverage = textMode\n ? 1\n : interpolate(p, [0.06, 0.28, 0.6, 0.9], [0, 1, 1, 0], clampOpts);\n const fieldOpacity = textMode\n ? 1\n : interpolate(p, [0.04, 0.2, 0.66, 0.94], [0, 1, 1, 0], clampOpts);\n const panelOpacity = textMode\n ? interpolate(p, [0.06, 0.24, 0.55, 0.75], [0, 1, 1, 0], clampOpts)\n : fieldOpacity;\n\n // Text-mode phase clocks. The outgoing scene blurs out as the field\n // rises; the field boils, then dissolves cell by cell while the real\n // text fades in.\n const riseG = interpolate(p, [0.04, 0.3], [0, 1], clampOpts);\n const dissolveG = interpolate(\n p,\n enterStyle === \"clearing\" ? [0.52, 0.85] : [0.5, 0.82],\n [0, 1],\n clampOpts,\n );\n\n // Style clocks for the arriving text's surroundings.\n const haloG = interpolate(p, [0.52, 0.74], [0, 1], clampOpts);\n const waveT = interpolate(p, [0.56, 0.94], [0, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.quad),\n });\n const waveR = waveT * 860; // the impulse front, px from the text capsule\n const echoFlash = interpolate(p, [0.56, 0.64, 0.82], [0, 0.9, 0], clampOpts);\n const focusBlur = interpolate(p, [0.55, 0.9], [0, 4], clampOpts);\n const focusFade = interpolate(p, [0.62, 0.94], [1, 0], clampOpts);\n\n const cx = cols / 2;\n const cy = rows / 2;\n const t = p * 5;\n const rampLen = ramp.length;\n\n const mainRows: string[] = [];\n const accentRows: string[] = [];\n const echoRows: string[] = [];\n const fieldAlive = textMode ? p < 0.999 : fieldOpacity > 0.001;\n\n if (fieldAlive) {\n for (let y = 0; y < rows; y++) {\n let mainRow = \"\";\n let accentRow = \"\";\n let echoRow = \"\";\n for (let x = 0; x < cols; x++) {\n // A slow sinusoid flow plus per-cell jitter — organic, but textual.\n const base =\n 0.5 +\n (Math.sin(x * 0.33 + t * 1.7) +\n Math.sin(y * 0.51 - t * 1.2) +\n Math.sin((x * 0.5 + y) * 0.24 + t * 0.9) +\n Math.sin(Math.hypot(x - cx, (y - cy) * 1.8) * 0.42 - t * 2.1)) /\n 8;\n const jitter = random(`ascii-${x}-${y}`);\n\n // Distance to the incoming text's capsule, for the zone styles —\n // and the plain circular distance from its center, for the wave.\n let dist = Infinity;\n let distC = Infinity;\n let s = 0; // proximity, 1 at the text's center line → 0 far away\n if (enterZone !== null) {\n const px = (x + 0.5) * advance;\n const py = (y + 0.5) * cellSize;\n const nx = Math.min(Math.max(px, enterZone.x0), enterZone.x1);\n dist = Math.hypot(px - nx, py - enterZone.cy);\n distC = Math.hypot(\n px - (enterZone.x0 + enterZone.x1) / 2,\n py - enterZone.cy,\n );\n s = Math.max(0, 1 - dist / (enterZone.halfH + 64));\n }\n\n let cellCoverage: number;\n if (!textMode) {\n cellCoverage = coverage;\n } else if (enterStyle === \"clearing\" && enterZone !== null) {\n // Dissolve order biased by proximity: cells near the headline\n // vanish first, a granular cavity opens outward.\n const order = (1 - s) * 0.6 + random(`ascii-d-${x}-${y}`) * 0.4;\n const gone = Math.max(\n 0,\n Math.min(1, (dissolveG * 1.35 - order) / 0.3),\n );\n cellCoverage = stagger(riseG, jitter) * (1 - gone);\n } else if (enterStyle === \"wave\" && enterZone !== null) {\n // The impulse front — a CIRCLE from the text's center — clears\n // the field behind it.\n const passed = Math.max(0, Math.min(1, (waveR - distC) / 55));\n cellCoverage = stagger(riseG, jitter) * (1 - passed);\n } else {\n cellCoverage =\n stagger(riseG, jitter) *\n (1 - stagger(dissolveG, random(`ascii-d-${x}-${y}`)));\n }\n\n let d = Math.max(\n 0,\n Math.min(\n 0.999,\n (base * 0.72 + jitter * 0.28) * cellCoverage * 1.2 - 0.08,\n ),\n );\n if (enterStyle === \"halo\" && enterZone !== null) {\n // A smooth radial attenuation: near cells slide down the ramp.\n d *= 1 - haloG * s;\n }\n if (enterStyle === \"wave\" && enterZone !== null && waveT > 0) {\n // Cells on the circular wavefront jump up the ramp for a beat.\n const bump = Math.exp(-(((distC - waveR) / 55) ** 2));\n d = Math.min(0.999, d + bump * 0.5);\n }\n const ch = ramp[Math.floor(d * rampLen)] ?? \" \";\n const isAccent =\n accentColor !== undefined &&\n random(`ascii-a-${x}-${y}`) < accentDensity;\n mainRow += isAccent ? \" \" : ch;\n accentRow += isAccent ? ch : \" \";\n\n // The lime echo: a sparse ring of accent glyphs around the headline.\n if (\n enterStyle === \"lime-echo\" &&\n enterZone !== null &&\n echoFlash > 0.01 &&\n dist > 8 &&\n dist < 84 &&\n ch !== \" \" &&\n random(`ascii-e-${x}-${y}`) < 0.5\n ) {\n echoRow += ch;\n } else {\n echoRow += \" \";\n }\n }\n mainRows.push(mainRow);\n accentRows.push(accentRow);\n echoRows.push(echoRow);\n }\n }\n\n // The blur must hit exactly 0 by p = 1: the entering presentation stays\n // mounted at p = 1 for the whole scene, so any residue would soften the\n // incoming scene permanently. In text mode the incoming scene resolves\n // with NO transform at all — it must sit pixel-exact under the letterform.\n const enterBlur = textMode\n ? 0\n : interpolate(\n p,\n [enterWindow[0], Math.min(1, enterWindow[1] + 0.05)],\n [10, 0],\n clampOpts,\n );\n const childStyle: React.CSSProperties = textMode\n ? { opacity: interpolate(p, enterWindow, [0, 1], clampOpts) }\n : {\n opacity: interpolate(p, enterWindow, [0, 1], clampOpts),\n scale: `${interpolate(p, [enterWindow[0], 1], [1.04, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n })}`,\n filter: enterBlur > 0.01 ? `blur(${enterBlur}px)` : undefined,\n };\n\n const preStyle: React.CSSProperties = {\n margin: 0,\n position: \"absolute\",\n inset: 0,\n overflow: \"hidden\",\n whiteSpace: \"pre\",\n fontFamily,\n fontSize,\n lineHeight: `${cellSize}px`,\n color: colorFront,\n };\n\n const renderLayer = (\n layerRows: string[],\n color: string,\n layerOpacity: number,\n ) =>\n layerOpacity > 0.001 ? (\n <pre style={{ ...preStyle, color, opacity: layerOpacity }}>\n {layerRows.join(\"\\n\")}\n </pre>\n ) : null;\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>\n {fieldAlive ? (\n <AbsoluteFill style={{ pointerEvents: \"none\" }}>\n <AbsoluteFill\n style={{ background: colorBack, opacity: panelOpacity }}\n />\n <AbsoluteFill\n style={\n enterStyle === \"focus\" && textMode\n ? {\n opacity: focusFade,\n filter:\n focusBlur > 0.01 ? `blur(${focusBlur}px)` : undefined,\n }\n : undefined\n }\n >\n {renderLayer(mainRows, colorFront, fieldOpacity)}\n {accentColor !== undefined\n ? renderLayer(accentRows, accentColor, fieldOpacity)\n : null}\n </AbsoluteFill>\n {enterStyle === \"lime-echo\"\n ? renderLayer(echoRows, accentColor ?? \"#C3E88D\", echoFlash)\n : null}\n </AbsoluteFill>\n ) : null}\n </AbsoluteFill>\n );\n};\n\nexport function asciiDissolve(\n props: AsciiDissolveProps = {},\n): TransitionPresentation<AsciiDissolveProps> {\n return {\n component: AsciiDissolvePresentation,\n props,\n };\n}\n","type": "registry:component","target": "components/remocn/ascii-dissolve.tsx"}diff --git a/registry-artifacts/blur-in.json b/registry-artifacts/blur-in.jsonindex 9415726b..4352755c 100644--- a/registry-artifacts/blur-in.json+++ b/registry-artifacts/blur-in.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn-ui/blur-in/index.tsx",- "content": "\"use client\";\n\nimport type { CSSProperties, ReactNode } from \"react\";\n\nexport type BlurInState = \"hidden\" | \"revealed\";\nexport type BlurInDirection = \"up\" | \"down\" | \"left\" | \"right\";\n\nexport interface BlurInStyle {\n blur: number;\n opacity: number;\n translateX: number;\n translateY: number;\n}\n\nexport interface BlurInStyleContext {\n blur: number;\n distance: number;\n axis: \"x\" | \"y\";\n sign: 1 | -1;\n}\n\nexport function blurInStyleContext(\n blur: number,\n direction: BlurInDirection,\n distance: number,\n): BlurInStyleContext {\n const axis: \"x\" | \"y\" =\n direction === \"left\" || direction === \"right\" ? \"x\" : \"y\";\n const sign: 1 | -1 = direction === \"up\" || direction === \"left\" ? 1 : -1;\n return { blur, distance, axis, sign };\n}\n\nexport function blurInStyle(\n state: BlurInState,\n ctx: BlurInStyleContext,\n): BlurInStyle {\n if (state === \"revealed\")\n return { blur: 0, opacity: 1, translateX: 0, translateY: 0 };\n return {\n blur: ctx.blur,\n opacity: 0,\n translateX: ctx.axis === \"x\" ? ctx.sign * ctx.distance : 0,\n translateY: ctx.axis === \"y\" ? ctx.sign * ctx.distance : 0,\n };\n}\n\nexport interface BlurInProps {\n state?: BlurInState;\n style?: BlurInStyle;\n children: ReactNode;\n blur?: number;\n direction?: BlurInDirection;\n distance?: number;\n display?: CSSProperties[\"display\"];\n className?: string;\n}\n\nexport function BlurIn({\n state = \"hidden\",\n style,\n children,\n blur = 8,\n direction = \"up\",\n distance = 12,\n display = \"inline-block\",\n className,\n}: BlurInProps) {\n const v =\n style ?? blurInStyle(state, blurInStyleContext(blur, direction, distance));\n return (\n <div\n className={className}\n style={{\n display,\n opacity: v.opacity,\n filter: v.blur > 0 ? `blur(${v.blur}px)` : \"none\",\n transform: `translate(${v.translateX}px, ${v.translateY}px)`,\n }}\n >\n {children}\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport type { CSSProperties, ReactNode } from \"react\";\n\nexport type BlurInState = \"hidden\" | \"revealed\";\nexport type BlurInDirection = \"up\" | \"down\" | \"left\" | \"right\";\n\nexport interface BlurInStyle {\n blur: number;\n opacity: number;\n translateX: number;\n translateY: number;\n}\n\nexport interface BlurInStyleContext {\n blur: number;\n distance: number;\n axis: \"x\" | \"y\";\n sign: 1 | -1;\n}\n\nexport function blurInStyleContext(\n blur: number,\n direction: BlurInDirection,\n distance: number,\n): BlurInStyleContext {\n const axis: \"x\" | \"y\" =\n direction === \"left\" || direction === \"right\" ? \"x\" : \"y\";\n const sign: 1 | -1 = direction === \"up\" || direction === \"left\" ? 1 : -1;\n return { blur, distance, axis, sign };\n}\n\nexport function blurInStyle(\n state: BlurInState,\n ctx: BlurInStyleContext,\n): BlurInStyle {\n if (state === \"revealed\")\n return { blur: 0, opacity: 1, translateX: 0, translateY: 0 };\n const offset = ctx.distance === 0 ? 0 : ctx.sign * ctx.distance;\n return {\n blur: ctx.blur,\n opacity: 0,\n translateX: ctx.axis === \"x\" ? offset : 0,\n translateY: ctx.axis === \"y\" ? offset : 0,\n };\n}\n\nexport interface BlurInProps {\n state?: BlurInState;\n style?: BlurInStyle;\n children: ReactNode;\n blur?: number;\n direction?: BlurInDirection;\n distance?: number;\n display?: CSSProperties[\"display\"];\n className?: string;\n}\n\nexport function BlurIn({\n state = \"hidden\",\n style,\n children,\n blur = 8,\n direction = \"up\",\n distance = 12,\n display = \"inline-block\",\n className,\n}: BlurInProps) {\n const v =\n style ?? blurInStyle(state, blurInStyleContext(blur, direction, distance));\n return (\n <div\n className={className}\n style={{\n display,\n opacity: v.opacity,\n filter: v.blur > 0 ? `blur(${v.blur}px)` : \"none\",\n transform: `translate(${v.translateX}px, ${v.translateY}px)`,\n }}\n >\n {children}\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/blur-in.tsx"},diff --git a/registry-artifacts/blur-out-up.json b/registry-artifacts/blur-out-up.jsonindex 3db0941b..8fb82657 100644--- a/registry-artifacts/blur-out-up.json+++ b/registry-artifacts/blur-out-up.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/blur-out-up/index.tsx",- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface BlurOutUpProps {\n text: string;\n staggerDelay?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function BlurOutUp({\n text,\n staggerDelay = 1,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: BlurOutUpProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const words = text.split(\" \");\n\n const enterDur = 17;\n const enterTravel = 6;\n const exitDur = 14;\n const exitTravelFrom = 8;\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterEnd = enterDur + (words.length - 1) * staggerDelay;\n const exitStart = Math.max(\n enterEnd,\n durationInFrames - exitDur - (words.length - 1) * staggerDelay,\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {words.map((word, i) => {\n const enterLocal = frame - i * staggerDelay;\n const exitLocal = frame - exitStart - i * staggerDelay;\n\n const enterP = interpolate(enterLocal, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(exitLocal, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const yEnter = interpolate(enterLocal, [0, enterTravel], [10, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const yExit = interpolate(\n exitLocal,\n [exitTravelFrom, exitDur],\n [0, -14],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n },\n );\n\n const y = yEnter + yExit;\n\n const blurEnter = interpolate(enterLocal, [0, enterDur], [6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const blurExit = interpolate(exitLocal, [0, exitDur], [0, 8], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const blur = blurEnter + blurExit;\n\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n filter: `blur(${blur}px)`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface BlurOutUpProps {\n text: string;\n staggerDelay?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function BlurOutUp({\n text,\n staggerDelay = 1,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: BlurOutUpProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const words = text.split(\" \");\n\n const enterDur = 17;\n const enterTravel = 6;\n const exitDur = 14;\n const exitTravelFrom = 8;\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterEnd = enterDur + (words.length - 1) * staggerDelay;\n const exitStart = Math.max(\n enterEnd,\n durationInFrames - exitDur - (words.length - 1) * staggerDelay,\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {words.map((word, i) => {\n const enterLocal = frame - i * staggerDelay;\n const exitLocal = frame - exitStart - i * staggerDelay;\n\n const enterP = interpolate(enterLocal, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(exitLocal, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const yEnter = interpolate(enterLocal, [0, enterTravel], [10, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const yExit = interpolate(\n exitLocal,\n [exitTravelFrom, exitDur],\n [0, -14],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n },\n );\n\n const y = yEnter + yExit;\n\n const blurEnter = interpolate(enterLocal, [0, enterDur], [6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const blurExit = interpolate(exitLocal, [0, exitDur], [0, 8], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const blur = blurEnter + blurExit;\n\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 55%\",\n opacity,\n translate: `0 ${y}px`,\n filter: `blur(${blur}px)`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/blur-out-up.tsx"}diff --git a/registry-artifacts/bottom-up-letters.json b/registry-artifacts/bottom-up-letters.jsonindex 2303f13c..ad9286d6 100644--- a/registry-artifacts/bottom-up-letters.json+++ b/registry-artifacts/bottom-up-letters.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/bottom-up-letters/index.tsx",- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface BottomUpLettersProps {\n text: string;\n staggerDelay?: number;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function BottomUpLetters({\n text,\n staggerDelay = 3,\n distance = 46,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: BottomUpLettersProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 12;\n const charTravelFrames = 7;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerDelay;\n const easing = Easing.bezier(0.18, 1, 0.32, 1);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charTravelFrames], [distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface BottomUpLettersProps {\n text: string;\n staggerDelay?: number;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function BottomUpLetters({\n text,\n staggerDelay = 3,\n distance = 46,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: BottomUpLettersProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 12;\n const charTravelFrames = 7;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerDelay;\n const easing = Easing.bezier(0.18, 1, 0.32, 1);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charTravelFrames], [distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n translate: `0 ${y}px`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/bottom-up-letters.tsx"}diff --git a/registry-artifacts/caret-wipe.json b/registry-artifacts/caret-wipe.jsonindex 176f66c4..465efeae 100644--- a/registry-artifacts/caret-wipe.json+++ b/registry-artifacts/caret-wipe.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/caret-wipe/index.tsx",- "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nexport type CaretWipeProps = {\n /** Sweep direction. `right` types the screen left→right; `left` reverses it. */\n direction?: \"left\" | \"right\";\n /** The caret's color — the remocn lime by default. */\n caretColor?: string;\n /** Caret bar width in px. */\n caretWidth?: number;\n /** Caret bar height as a fraction of frame height (0–1), vertically centered. */\n caretHeight?: number;\n};\n\n// ---------------------------------------------------------------------------\n// caret-wipe — a typographic scene transition.\n//\n// A single tall caret (the remocn text cursor) sweeps across the frame in one\n// eased pass. The caret IS the wipe boundary: the region it has PASSED shows\n// the incoming scene (freshly \"typed in\" — it settles down and un-blurs just\n// behind the caret), while the region it has NOT reached still shows the\n// outgoing scene (being \"backspaced\" — it lifts and blurs as it's consumed).\n//\n// Both scenes share whatever backdrop sits behind the TransitionSeries, so the\n// complementary clips never expose a seam. Pure frame-driven interpolate — no\n// CSS keyframes — so it seeks correctly and renders identically every time.\n// ---------------------------------------------------------------------------\nconst CaretWipePresentation: React.FC<\n TransitionPresentationComponentProps<CaretWipeProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n direction = \"right\",\n caretColor = \"#C3E88D\",\n caretWidth = 3,\n caretHeight = 0.5,\n } = passedProps;\n\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n const goingRight = direction === \"right\";\n\n // Eased sweep so the caret decelerates as it lands the last column.\n const eased = interpolate(p, [0, 1], [0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.65, 0, 0.35, 1),\n });\n // Caret position as a percent of frame width; the wipe boundary.\n const caretX = goingRight ? eased * 100 : (1 - eased) * 100;\n\n if (!entering) {\n // Outgoing: keep only the column the caret hasn't reached yet, and let it\n // lift + blur as it's consumed (backspaced).\n const keep = goingRight\n ? `inset(0 0 0 ${caretX}%)` // keep the right band [caretX, 100]\n : `inset(0 ${100 - caretX}% 0 0)`; // keep the left band [0, caretX]\n return (\n <AbsoluteFill\n style={{\n clipPath: keep,\n WebkitClipPath: keep,\n transform: `translateY(${interpolate(p, [0, 1], [0, -6], clampOpts)}px)`,\n filter: `blur(${interpolate(p, [0.1, 1], [0, 4], clampOpts)}px)`,\n }}\n >\n {children}\n </AbsoluteFill>\n );\n }\n\n // Incoming: reveal only the column the caret has already passed, and let it\n // settle down + sharpen just behind the caret (typed in).\n const reveal = goingRight\n ? `inset(0 ${100 - caretX}% 0 0)` // reveal the left band [0, caretX]\n : `inset(0 0 0 ${caretX}%)`; // reveal the right band [caretX, 100]\n\n // The caret fades in at the very start and out at the very end so it never\n // pops on/off at the transition's frame edges.\n const caretOpacity = interpolate(\n p,\n [0, 0.08, 0.92, 1],\n [0, 1, 1, 0],\n clampOpts,\n );\n\n return (\n <AbsoluteFill>\n {/* Freshly typed content, clipped to the passed column. */}\n <AbsoluteFill\n style={{\n clipPath: reveal,\n WebkitClipPath: reveal,\n transform: `translateY(${interpolate(p, [0, 1], [3, 0], clampOpts)}px)`,\n filter: `blur(${interpolate(p, [0, 0.8], [2, 0], clampOpts)}px)`,\n }}\n >\n {children}\n </AbsoluteFill>\n\n {/* The caret — drawn on top, unclipped, only in the entering pass so it\n appears exactly once. */}\n <AbsoluteFill style={{ pointerEvents: \"none\", opacity: caretOpacity }}>\n <div\n style={{\n position: \"absolute\",\n left: `${caretX}%`,\n top: `${(1 - caretHeight) * 50}%`,\n height: `${caretHeight * 100}%`,\n width: caretWidth,\n transform: \"translateX(-50%)\",\n background: caretColor,\n borderRadius: caretWidth,\n boxShadow: `0 0 18px ${caretColor}, 0 0 6px ${caretColor}`,\n }}\n />\n </AbsoluteFill>\n </AbsoluteFill>\n );\n};\n\nexport function caretWipe(\n props: CaretWipeProps = {},\n): TransitionPresentation<CaretWipeProps> {\n return {\n component: CaretWipePresentation,\n props,\n };\n}\n",+ "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nexport type CaretWipeProps = {\n /** Sweep direction. `right` types the screen left→right; `left` reverses it. */\n direction?: \"left\" | \"right\";\n /** The caret's color — the remocn lime by default. */\n caretColor?: string;\n /** Caret bar width in px. */\n caretWidth?: number;\n /** Caret bar height as a fraction of frame height (0–1), vertically centered. */\n caretHeight?: number;\n};\n\n// ---------------------------------------------------------------------------\n// caret-wipe — a typographic scene transition.\n//\n// A single tall caret (the remocn text cursor) sweeps across the frame in one\n// eased pass. The caret IS the wipe boundary: the region it has PASSED shows\n// the incoming scene (freshly \"typed in\" — it settles down and un-blurs just\n// behind the caret), while the region it has NOT reached still shows the\n// outgoing scene (being \"backspaced\" — it lifts and blurs as it's consumed).\n//\n// Both scenes share whatever backdrop sits behind the TransitionSeries, so the\n// complementary clips never expose a seam. Pure frame-driven interpolate — no\n// CSS keyframes — so it seeks correctly and renders identically every time.\n// ---------------------------------------------------------------------------\nconst CaretWipePresentation: React.FC<\n TransitionPresentationComponentProps<CaretWipeProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n direction = \"right\",\n caretColor = \"#C3E88D\",\n caretWidth = 3,\n caretHeight = 0.5,\n } = passedProps;\n\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n const goingRight = direction === \"right\";\n\n // Eased sweep so the caret decelerates as it lands the last column.\n const eased = interpolate(p, [0, 1], [0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.65, 0, 0.35, 1),\n });\n // Caret position as a percent of frame width; the wipe boundary.\n const caretX = goingRight ? eased * 100 : (1 - eased) * 100;\n\n if (!entering) {\n // Outgoing: keep only the column the caret hasn't reached yet, and let it\n // lift + blur as it's consumed (backspaced).\n const keep = goingRight\n ? `inset(0 0 0 ${caretX}%)` // keep the right band [caretX, 100]\n : `inset(0 ${100 - caretX}% 0 0)`; // keep the left band [0, caretX]\n return (\n <AbsoluteFill\n style={{\n clipPath: keep,\n WebkitClipPath: keep,\n translate: `0 ${interpolate(p, [0, 1], [0, -6], clampOpts)}px`,\n filter: `blur(${interpolate(p, [0.1, 1], [0, 4], clampOpts)}px)`,\n }}\n >\n {children}\n </AbsoluteFill>\n );\n }\n\n // Incoming: reveal only the column the caret has already passed, and let it\n // settle down + sharpen just behind the caret (typed in).\n const reveal = goingRight\n ? `inset(0 ${100 - caretX}% 0 0)` // reveal the left band [0, caretX]\n : `inset(0 0 0 ${caretX}%)`; // reveal the right band [caretX, 100]\n\n // The caret fades in at the very start and out at the very end so it never\n // pops on/off at the transition's frame edges.\n const caretOpacity = interpolate(\n p,\n [0, 0.08, 0.92, 1],\n [0, 1, 1, 0],\n clampOpts,\n );\n\n return (\n <AbsoluteFill>\n {/* Freshly typed content, clipped to the passed column. */}\n <AbsoluteFill\n style={{\n clipPath: reveal,\n WebkitClipPath: reveal,\n translate: `0 ${interpolate(p, [0, 1], [3, 0], clampOpts)}px`,\n filter: `blur(${interpolate(p, [0, 0.8], [2, 0], clampOpts)}px)`,\n }}\n >\n {children}\n </AbsoluteFill>\n\n {/* The caret — drawn on top, unclipped, only in the entering pass so it\n appears exactly once. */}\n <AbsoluteFill style={{ pointerEvents: \"none\", opacity: caretOpacity }}>\n <div\n style={{\n position: \"absolute\",\n left: `${caretX}%`,\n top: `${(1 - caretHeight) * 50}%`,\n height: `${caretHeight * 100}%`,\n width: caretWidth,\n translate: \"-50%\",\n background: caretColor,\n borderRadius: caretWidth,\n boxShadow: `0 0 18px ${caretColor}, 0 0 6px ${caretColor}`,\n }}\n />\n </AbsoluteFill>\n </AbsoluteFill>\n );\n};\n\nexport function caretWipe(\n props: CaretWipeProps = {},\n): TransitionPresentation<CaretWipeProps> {\n return {\n component: CaretWipePresentation,\n props,\n };\n}\n","type": "registry:component","target": "components/remocn/caret-wipe.tsx"}diff --git a/registry-artifacts/chat-gpt.json b/registry-artifacts/chat-gpt.jsonindex 986a9227..7b857705 100644--- a/registry-artifacts/chat-gpt.json+++ b/registry-artifacts/chat-gpt.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/chat-gpt/index.tsx",- "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/Inter\";\nimport {\n AbsoluteFill,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { Caret } from \"@/components/remocn/caret\";\nimport { useTypewriter } from \"@/lib/remocn-ui\";\n\nconst { fontFamily: SANS_FAMILY } = loadFont();\n\nexport interface ChatGptProps {\n greeting?: string;\n placeholder?: string;\n prompt?: string;\n accentColor?: string;\n speed?: number;\n}\n\ninterface Theme {\n page: string;\n inputBg: string;\n inputBorder: string;\n fg: string;\n fgMuted: string;\n chipBorder: string;\n chipFg: string;\n sendBg: string;\n sendArrow: string;\n iconColor: string;\n}\n\nexport const THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n page: \"#FFFFFF\",\n inputBg: \"#FFFFFF\",\n inputBorder: \"#E3E3E3\",\n fg: \"#0D0D0D\",\n fgMuted: \"#9B9B9B\",\n chipBorder: \"#E3E3E3\",\n chipFg: \"#5D5D5D\",\n sendBg: \"#0D0D0D\",\n sendArrow: \"#FFFFFF\",\n iconColor: \"#5D5D5D\",\n },\n dark: {\n page: \"#212121\",\n inputBg: \"#303030\",\n inputBorder: \"#454545\",\n fg: \"#ECECEC\",\n fgMuted: \"#9B9B9B\",\n chipBorder: \"#454545\",\n chipFg: \"#C5C5C5\",\n sendBg: \"#FFFFFF\",\n sendArrow: \"#0D0D0D\",\n iconColor: \"#C5C5C5\",\n },\n};\n\nexport const TYPING_START_FRAME = 42;\n\nexport const TYPING_CPS = 22;\n\nexport function morphProgressAt(\n frame: number,\n opts: { startFrame?: number; fps: number; speed: number },\n): number {\n const startFrame = opts.startFrame ?? TYPING_START_FRAME;\n const value = spring({\n fps: opts.fps,\n frame: frame * opts.speed - startFrame,\n config: { damping: 14, stiffness: 200, mass: 0.6 },\n });\n return Math.max(0, Math.min(value, 1));\n}\n\nfunction introBounceIn(\n frame: number,\n fps: number,\n): { translateY: number; scale: number } {\n const s = spring({\n fps,\n frame,\n config: { damping: 14, stiffness: 110, mass: 0.7 },\n });\n const translateY = interpolate(s, [0, 1], [28, 0]);\n const scale = interpolate(s, [0, 1], [0.97, 1]);\n return { translateY, scale };\n}\n\nfunction fadeUpAt(\n frame: number,\n range: [number, number],\n): { opacity: number; translateY: number } {\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n };\n return {\n opacity: interpolate(frame, range, [0, 1], opts),\n translateY: interpolate(frame, range, [12, 0], opts),\n };\n}\n\nfunction PlusIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Add</title>\n <path\n d=\"M12 5v14M5 12h14\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n />\n </svg>\n );\n}\n\nfunction MicIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Voice input</title>\n <rect\n x={9}\n y={3}\n width={6}\n height={11}\n rx={3}\n stroke={color}\n strokeWidth={1.8}\n />\n <path\n d=\"M5.5 11a6.5 6.5 0 0013 0M12 17.5V21M9 21h6\"\n stroke={color}\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction WaveformIcon({ size, color }: { size: number; color: string }) {\n const bars = [\n { x: 4, h: 8 },\n { x: 9, h: 16 },\n { x: 14, h: 12 },\n { x: 19, h: 20 },\n ];\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Voice</title>\n {bars.map((bar) => (\n <rect\n key={bar.x}\n x={bar.x - 1}\n y={(24 - bar.h) / 2}\n width={2.4}\n height={bar.h}\n rx={1.2}\n fill={color}\n />\n ))}\n </svg>\n );\n}\n\nfunction ArrowUpIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Send</title>\n <path\n d=\"M12 19V6M12 6l-6 6M12 6l6 6\"\n stroke={color}\n strokeWidth={2.2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction ImageIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Create an image</title>\n <rect\n x={3}\n y={4}\n width={18}\n height={16}\n rx={3}\n stroke={color}\n strokeWidth={1.7}\n />\n <circle cx={8.5} cy={9} r={1.6} stroke={color} strokeWidth={1.7} />\n <path\n d=\"M5 18l5-5 4 4 2-2 3 3\"\n stroke={color}\n strokeWidth={1.7}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction PencilIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Write or edit</title>\n <path\n d=\"M4 20h4L19 9a2.1 2.1 0 00-3-3L5 17v3z\"\n stroke={color}\n strokeWidth={1.7}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M14 7l3 3\"\n stroke={color}\n strokeWidth={1.7}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction GlobeIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Look something up</title>\n <circle cx={12} cy={12} r={9} stroke={color} strokeWidth={1.7} />\n <path\n d=\"M3 12h18M12 3c2.5 2.5 2.5 15 0 18M12 3c-2.5 2.5-2.5 15 0 18\"\n stroke={color}\n strokeWidth={1.7}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction SuggestionChip({\n label,\n border,\n color,\n icon,\n}: {\n label: string;\n border: string;\n color: string;\n icon: React.ReactNode;\n}) {\n return (\n <div\n style={{\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: 8,\n padding: \"10px 16px\",\n borderRadius: 20,\n border: `1px solid ${border}`,\n color,\n fontFamily: SANS_FAMILY,\n fontSize: 15,\n }}\n >\n {icon}\n <span>{label}</span>\n </div>\n );\n}\n\nexport function ChatGpt({\n greeting = \"What's on your mind today?\",\n placeholder = \"Ask anything\",\n prompt = \"Make a sunset over a calm ocean\",\n accentColor = \"#2F6FED\",\n speed = 1,\n}: ChatGptProps) {\n const frame = useCurrentFrame();\n const { width, height, fps } = useVideoConfig();\n const t = THEMES.light;\n\n const refW = 1280;\n const refH = 720;\n const stageScale = Math.min(width / refW, height / refH);\n\n const tw = useTypewriter(prompt, {\n cps: TYPING_CPS,\n speed,\n startFrame: TYPING_START_FRAME,\n });\n const visibleText = tw.text;\n const showText = tw.count > 0;\n const morph = morphProgressAt(frame, { fps, speed });\n\n const intro = introBounceIn(frame * speed, fps);\n const headingFade = fadeUpAt(frame * speed, [4, 20]);\n const pillFade = fadeUpAt(frame * speed, [10, 26]);\n const chipsFade = fadeUpAt(frame * speed, [16, 32]);\n\n const pillWidth = 820;\n const pillLeft = (refW - pillWidth) / 2;\n const pillTop = 300;\n const pillHeight = 64;\n const morphSize = 44;\n\n const chipsOpacity = chipsFade.opacity * (1 - morph);\n const chipsShift = chipsFade.translateY + 8 * morph;\n\n return (\n <AbsoluteFill style={{ background: \"transparent\" }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: refW,\n height: refH,\n transform: `translate(-50%, -50%) scale(${stageScale})`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 196,\n width: refW,\n textAlign: \"center\",\n fontFamily: SANS_FAMILY,\n fontSize: 40,\n fontWeight: 700,\n color: t.fg,\n opacity: headingFade.opacity,\n transform: `translateY(${headingFade.translateY + intro.translateY * 0.4}px)`,\n }}\n >\n {greeting}\n </div>\n\n <div\n style={{\n position: \"absolute\",\n left: pillLeft,\n top: pillTop,\n width: pillWidth,\n height: pillHeight,\n background: t.inputBg,\n border: `1px solid ${t.inputBorder}`,\n borderRadius: 32,\n boxShadow: \"0 8px 30px -14px rgba(13,13,13,0.14)\",\n opacity: pillFade.opacity,\n transform: `translateY(${pillFade.translateY + intro.translateY * 0.6}px) scale(${intro.scale})`,\n transformOrigin: \"center top\",\n display: \"flex\",\n alignItems: \"center\",\n paddingLeft: 20,\n paddingRight: 12,\n boxSizing: \"border-box\",\n }}\n >\n <PlusIcon size={24} color={t.fg} />\n\n <div\n style={{\n flex: 1,\n display: \"flex\",\n alignItems: \"center\",\n marginLeft: 14,\n fontFamily: SANS_FAMILY,\n fontSize: 19,\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n }}\n >\n {showText ? (\n <span\n style={{\n color: t.fg,\n display: \"inline-flex\",\n alignItems: \"center\",\n }}\n >\n {visibleText}\n <Caret\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n height={22}\n marginLeft={2}\n />\n </span>\n ) : (\n <span\n style={{\n color: t.fgMuted,\n display: \"inline-flex\",\n alignItems: \"center\",\n }}\n >\n <Caret\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n height={22}\n />\n <span style={{ marginLeft: 6 }}>{placeholder}</span>\n </span>\n )}\n </div>\n\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 8,\n flexShrink: 0,\n }}\n >\n <div\n style={{\n width: 40,\n height: 40,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <MicIcon size={22} color={t.iconColor} />\n </div>\n\n <div\n style={{\n position: \"relative\",\n width: morphSize,\n height: morphSize,\n flexShrink: 0,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderRadius: \"100%\",\n background: accentColor,\n opacity: 1 - morph,\n transform: `scale(${1 - 0.1 * morph})`,\n }}\n >\n <WaveformIcon size={22} color=\"#FFFFFF\" />\n </div>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderRadius: \"100%\",\n background: t.sendBg,\n opacity: morph,\n transform: `scale(${0.8 + 0.2 * morph})`,\n }}\n >\n <ArrowUpIcon size={22} color={t.sendArrow} />\n </div>\n </div>\n </div>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: pillTop + pillHeight + 24,\n width: refW,\n display: \"flex\",\n justifyContent: \"center\",\n gap: 12,\n opacity: chipsOpacity,\n transform: `translateY(${chipsShift}px)`,\n }}\n >\n <SuggestionChip\n label=\"Create an image\"\n border={t.chipBorder}\n color={t.chipFg}\n icon={<ImageIcon size={18} color={t.chipFg} />}\n />\n <SuggestionChip\n label=\"Write or edit\"\n border={t.chipBorder}\n color={t.chipFg}\n icon={<PencilIcon size={18} color={t.chipFg} />}\n />\n <SuggestionChip\n label=\"Look something up\"\n border={t.chipBorder}\n color={t.chipFg}\n icon={<GlobeIcon size={18} color={t.chipFg} />}\n />\n </div>\n </div>\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/Inter\";\nimport {\n AbsoluteFill,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { Caret } from \"@/components/remocn/caret\";\nimport { useTypewriter } from \"@/lib/remocn-ui\";\n\nconst { fontFamily: SANS_FAMILY } = loadFont();\n\nexport interface ChatGptProps {\n greeting?: string;\n placeholder?: string;\n prompt?: string;\n accentColor?: string;\n speed?: number;\n}\n\ninterface Theme {\n page: string;\n inputBg: string;\n inputBorder: string;\n fg: string;\n fgMuted: string;\n chipBorder: string;\n chipFg: string;\n sendBg: string;\n sendArrow: string;\n iconColor: string;\n}\n\nexport const THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n page: \"#FFFFFF\",\n inputBg: \"#FFFFFF\",\n inputBorder: \"#E3E3E3\",\n fg: \"#0D0D0D\",\n fgMuted: \"#9B9B9B\",\n chipBorder: \"#E3E3E3\",\n chipFg: \"#5D5D5D\",\n sendBg: \"#0D0D0D\",\n sendArrow: \"#FFFFFF\",\n iconColor: \"#5D5D5D\",\n },\n dark: {\n page: \"#212121\",\n inputBg: \"#303030\",\n inputBorder: \"#454545\",\n fg: \"#ECECEC\",\n fgMuted: \"#9B9B9B\",\n chipBorder: \"#454545\",\n chipFg: \"#C5C5C5\",\n sendBg: \"#FFFFFF\",\n sendArrow: \"#0D0D0D\",\n iconColor: \"#C5C5C5\",\n },\n};\n\nexport const TYPING_START_FRAME = 42;\n\nexport const TYPING_CPS = 22;\n\nexport function morphProgressAt(\n frame: number,\n opts: { startFrame?: number; fps: number; speed: number },\n): number {\n const startFrame = opts.startFrame ?? TYPING_START_FRAME;\n const value = spring({\n fps: opts.fps,\n frame: frame * opts.speed - startFrame,\n config: { damping: 14, stiffness: 200, mass: 0.6 },\n });\n return Math.max(0, Math.min(value, 1));\n}\n\nfunction introBounceIn(\n frame: number,\n fps: number,\n): { translateY: number; scale: number } {\n const s = spring({\n fps,\n frame,\n config: { damping: 14, stiffness: 110, mass: 0.7 },\n });\n const translateY = interpolate(s, [0, 1], [28, 0]);\n const scale = interpolate(s, [0, 1], [0.97, 1]);\n return { translateY, scale };\n}\n\nfunction fadeUpAt(\n frame: number,\n range: [number, number],\n): { opacity: number; translateY: number } {\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n };\n return {\n opacity: interpolate(frame, range, [0, 1], opts),\n translateY: interpolate(frame, range, [12, 0], opts),\n };\n}\n\nfunction PlusIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Add</title>\n <path\n d=\"M12 5v14M5 12h14\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n />\n </svg>\n );\n}\n\nfunction MicIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Voice input</title>\n <rect\n x={9}\n y={3}\n width={6}\n height={11}\n rx={3}\n stroke={color}\n strokeWidth={1.8}\n />\n <path\n d=\"M5.5 11a6.5 6.5 0 0013 0M12 17.5V21M9 21h6\"\n stroke={color}\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction WaveformIcon({ size, color }: { size: number; color: string }) {\n const bars = [\n { x: 4, h: 8 },\n { x: 9, h: 16 },\n { x: 14, h: 12 },\n { x: 19, h: 20 },\n ];\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Voice</title>\n {bars.map((bar) => (\n <rect\n key={bar.x}\n x={bar.x - 1}\n y={(24 - bar.h) / 2}\n width={2.4}\n height={bar.h}\n rx={1.2}\n fill={color}\n />\n ))}\n </svg>\n );\n}\n\nfunction ArrowUpIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Send</title>\n <path\n d=\"M12 19V6M12 6l-6 6M12 6l6 6\"\n stroke={color}\n strokeWidth={2.2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction ImageIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Create an image</title>\n <rect\n x={3}\n y={4}\n width={18}\n height={16}\n rx={3}\n stroke={color}\n strokeWidth={1.7}\n />\n <circle cx={8.5} cy={9} r={1.6} stroke={color} strokeWidth={1.7} />\n <path\n d=\"M5 18l5-5 4 4 2-2 3 3\"\n stroke={color}\n strokeWidth={1.7}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction PencilIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Write or edit</title>\n <path\n d=\"M4 20h4L19 9a2.1 2.1 0 00-3-3L5 17v3z\"\n stroke={color}\n strokeWidth={1.7}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M14 7l3 3\"\n stroke={color}\n strokeWidth={1.7}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction GlobeIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Look something up</title>\n <circle cx={12} cy={12} r={9} stroke={color} strokeWidth={1.7} />\n <path\n d=\"M3 12h18M12 3c2.5 2.5 2.5 15 0 18M12 3c-2.5 2.5-2.5 15 0 18\"\n stroke={color}\n strokeWidth={1.7}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction SuggestionChip({\n label,\n border,\n color,\n icon,\n}: {\n label: string;\n border: string;\n color: string;\n icon: React.ReactNode;\n}) {\n return (\n <div\n style={{\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: 8,\n padding: \"10px 16px\",\n borderRadius: 20,\n border: `1px solid ${border}`,\n color,\n fontFamily: SANS_FAMILY,\n fontSize: 15,\n }}\n >\n {icon}\n <span>{label}</span>\n </div>\n );\n}\n\nexport function ChatGpt({\n greeting = \"What's on your mind today?\",\n placeholder = \"Ask anything\",\n prompt = \"Make a sunset over a calm ocean\",\n accentColor = \"#2F6FED\",\n speed = 1,\n}: ChatGptProps) {\n const frame = useCurrentFrame();\n const { width, height, fps } = useVideoConfig();\n const t = THEMES.light;\n\n const refW = 1280;\n const refH = 720;\n const stageScale = Math.min(width / refW, height / refH);\n\n const tw = useTypewriter(prompt, {\n cps: TYPING_CPS,\n speed,\n startFrame: TYPING_START_FRAME,\n });\n const visibleText = tw.text;\n const showText = tw.count > 0;\n const morph = morphProgressAt(frame, { fps, speed });\n\n const intro = introBounceIn(frame * speed, fps);\n const headingFade = fadeUpAt(frame * speed, [4, 20]);\n const pillFade = fadeUpAt(frame * speed, [10, 26]);\n const chipsFade = fadeUpAt(frame * speed, [16, 32]);\n\n const pillWidth = 820;\n const pillLeft = (refW - pillWidth) / 2;\n const pillTop = 300;\n const pillHeight = 64;\n const morphSize = 44;\n\n const chipsOpacity = chipsFade.opacity * (1 - morph);\n const chipsShift = chipsFade.translateY + 8 * morph;\n\n return (\n <AbsoluteFill style={{ background: \"transparent\" }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: refW,\n height: refH,\n translate: \"-50% -50%\",\n scale: `${stageScale}`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 196,\n width: refW,\n textAlign: \"center\",\n fontFamily: SANS_FAMILY,\n fontSize: 40,\n fontWeight: 700,\n color: t.fg,\n opacity: headingFade.opacity,\n translate: `0 ${headingFade.translateY + intro.translateY * 0.4}px`,\n }}\n >\n {greeting}\n </div>\n\n <div\n style={{\n position: \"absolute\",\n left: pillLeft,\n top: pillTop,\n width: pillWidth,\n height: pillHeight,\n background: t.inputBg,\n border: `1px solid ${t.inputBorder}`,\n borderRadius: 32,\n boxShadow: \"0 8px 30px -14px rgba(13,13,13,0.14)\",\n opacity: pillFade.opacity,\n translate: `0 ${pillFade.translateY + intro.translateY * 0.6}px`,\n scale: `${intro.scale}`,\n transformOrigin: \"center top\",\n display: \"flex\",\n alignItems: \"center\",\n paddingLeft: 20,\n paddingRight: 12,\n boxSizing: \"border-box\",\n }}\n >\n <PlusIcon size={24} color={t.fg} />\n\n <div\n style={{\n flex: 1,\n display: \"flex\",\n alignItems: \"center\",\n marginLeft: 14,\n fontFamily: SANS_FAMILY,\n fontSize: 19,\n overflow: \"hidden\",\n whiteSpace: \"nowrap\",\n }}\n >\n {showText ? (\n <span\n style={{\n color: t.fg,\n display: \"inline-flex\",\n alignItems: \"center\",\n }}\n >\n {visibleText}\n <Caret\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n height={22}\n marginLeft={2}\n />\n </span>\n ) : (\n <span\n style={{\n color: t.fgMuted,\n display: \"inline-flex\",\n alignItems: \"center\",\n }}\n >\n <Caret\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n height={22}\n />\n <span style={{ marginLeft: 6 }}>{placeholder}</span>\n </span>\n )}\n </div>\n\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 8,\n flexShrink: 0,\n }}\n >\n <div\n style={{\n width: 40,\n height: 40,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <MicIcon size={22} color={t.iconColor} />\n </div>\n\n <div\n style={{\n position: \"relative\",\n width: morphSize,\n height: morphSize,\n flexShrink: 0,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderRadius: \"100%\",\n background: accentColor,\n opacity: 1 - morph,\n scale: `${1 - 0.1 * morph}`,\n }}\n >\n <WaveformIcon size={22} color=\"#FFFFFF\" />\n </div>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderRadius: \"100%\",\n background: t.sendBg,\n opacity: morph,\n scale: `${0.8 + 0.2 * morph}`,\n }}\n >\n <ArrowUpIcon size={22} color={t.sendArrow} />\n </div>\n </div>\n </div>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: pillTop + pillHeight + 24,\n width: refW,\n display: \"flex\",\n justifyContent: \"center\",\n gap: 12,\n opacity: chipsOpacity,\n translate: `0 ${chipsShift}px`,\n }}\n >\n <SuggestionChip\n label=\"Create an image\"\n border={t.chipBorder}\n color={t.chipFg}\n icon={<ImageIcon size={18} color={t.chipFg} />}\n />\n <SuggestionChip\n label=\"Write or edit\"\n border={t.chipBorder}\n color={t.chipFg}\n icon={<PencilIcon size={18} color={t.chipFg} />}\n />\n <SuggestionChip\n label=\"Look something up\"\n border={t.chipBorder}\n color={t.chipFg}\n icon={<GlobeIcon size={18} color={t.chipFg} />}\n />\n </div>\n </div>\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/chat-gpt.tsx"}diff --git a/registry-artifacts/chat-to-preview-layout.json b/registry-artifacts/chat-to-preview-layout.jsonindex 444c480b..632dd167 100644--- a/registry-artifacts/chat-to-preview-layout.json+++ b/registry-artifacts/chat-to-preview-layout.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/chat-to-preview-layout/index.tsx",- "content": "\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface ChatToPreviewLayoutProps {\n chat?: ReactNode;\n preview?: ReactNode;\n startChatRatio?: number;\n endChatRatio?: number;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\nfunction DefaultChat() {\n const messages = [\n { from: \"user\", text: \"Build me a landing page\" },\n { from: \"ai\", text: \"Sure — what should it feature?\" },\n { from: \"user\", text: \"Hero, pricing, footer.\" },\n { from: \"ai\", text: \"On it. Generating now...\" },\n ];\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n padding: 24,\n display: \"flex\",\n flexDirection: \"column\",\n gap: 12,\n fontFamily: FONT_FAMILY,\n background: \"#111\",\n }}\n >\n <div\n style={{\n color: \"#888\",\n fontSize: 12,\n fontWeight: 600,\n letterSpacing: \"0.08em\",\n textTransform: \"uppercase\",\n marginBottom: 8,\n }}\n >\n Chat\n </div>\n {messages.map((m, i) => (\n <div\n key={i}\n style={{\n alignSelf: m.from === \"user\" ? \"flex-end\" : \"flex-start\",\n background: m.from === \"user\" ? \"#0ea5e9\" : \"#262626\",\n color: \"white\",\n padding: \"10px 14px\",\n borderRadius: 14,\n fontSize: 14,\n maxWidth: \"85%\",\n }}\n >\n {m.text}\n </div>\n ))}\n </div>\n );\n}\n\nfunction DefaultPreview() {\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"white\",\n display: \"flex\",\n flexDirection: \"column\",\n fontFamily: FONT_FAMILY,\n }}\n >\n <div\n style={{\n height: 36,\n background: \"#f4f4f5\",\n borderBottom: \"1px solid #e4e4e7\",\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n padding: \"0 12px\",\n }}\n >\n <div\n style={{\n width: 10,\n height: 10,\n borderRadius: 999,\n background: \"#ef4444\",\n }}\n />\n <div\n style={{\n width: 10,\n height: 10,\n borderRadius: 999,\n background: \"#f59e0b\",\n }}\n />\n <div\n style={{\n width: 10,\n height: 10,\n borderRadius: 999,\n background: \"#22c55e\",\n }}\n />\n </div>\n <div\n style={{\n flex: 1,\n padding: 32,\n display: \"flex\",\n flexDirection: \"column\",\n gap: 16,\n }}\n >\n <div\n style={{\n fontSize: 36,\n fontWeight: 700,\n letterSpacing: \"-0.03em\",\n color: \"#0a0a0a\",\n }}\n >\n Ship faster.\n </div>\n <div style={{ fontSize: 16, color: \"#71717a\", maxWidth: 360 }}>\n The fastest way to launch your idea. Built with Remotion.\n </div>\n <div\n style={{\n marginTop: 12,\n display: \"inline-flex\",\n background: \"#0a0a0a\",\n color: \"white\",\n padding: \"10px 18px\",\n borderRadius: 10,\n alignSelf: \"flex-start\",\n fontSize: 14,\n fontWeight: 600,\n }}\n >\n Get started\n </div>\n </div>\n </div>\n );\n}\n\nexport function ChatToPreviewLayout({\n chat,\n preview,\n startChatRatio = 0.5,\n endChatRatio = 0.25,\n speed = 1,\n className,\n}: ChatToPreviewLayoutProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n // Apple's signature ease — slow start, dramatic settle. Replaces the older\n // symmetric bezier so the morph feels deliberate instead of mechanical.\n const APPLE_EASE = Easing.bezier(0.16, 1, 0.3, 1);\n\n const morphStart = durationInFrames * 0.1;\n const morphEnd = durationInFrames * 0.7;\n\n const ratio = interpolate(\n frame,\n [morphStart, morphEnd],\n [startChatRatio, endChatRatio],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: APPLE_EASE,\n },\n );\n\n // Right (preview) panel reveal: fade in + slide left into its growing slot.\n // Anchored to the same morph window so it feels like the chat is physically\n // dragging the preview into existence.\n const previewOpacity = interpolate(frame, [morphStart, morphEnd], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: APPLE_EASE,\n });\n const previewTx = interpolate(frame, [morphStart, morphEnd], [40, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: APPLE_EASE,\n });\n\n const chatBasis = `${ratio * 100}%`;\n const previewBasis = `${(1 - ratio) * 100}%`;\n\n // Inner content min-widths. These are the lever that prevents text from\n // re-flowing inside the columns as the parent flex-basis morphs — content\n // is rendered at a fixed virtual width, then clipped by `overflow: hidden`\n // on the outer column. No reflow → no jumping characters.\n const CHAT_INNER_MIN = 520;\n const PREVIEW_INNER_MIN = 720;\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n padding: 32,\n display: \"flex\",\n gap: 16,\n }}\n >\n <div\n style={{\n flexBasis: chatBasis,\n flexGrow: 0,\n flexShrink: 0,\n position: \"relative\",\n overflow: \"hidden\",\n borderRadius: 16,\n border: \"1px solid rgba(255,255,255,0.08)\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n minWidth: CHAT_INNER_MIN,\n }}\n >\n {chat ?? <DefaultChat />}\n </div>\n </div>\n <div\n style={{\n flexBasis: previewBasis,\n flexGrow: 0,\n flexShrink: 0,\n position: \"relative\",\n overflow: \"hidden\",\n borderRadius: 16,\n border: \"1px solid rgba(255,255,255,0.08)\",\n opacity: previewOpacity,\n transform: `translateX(${previewTx}px)`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n minWidth: PREVIEW_INNER_MIN,\n }}\n >\n {preview ?? <DefaultPreview />}\n </div>\n </div>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface ChatToPreviewLayoutProps {\n chat?: ReactNode;\n preview?: ReactNode;\n startChatRatio?: number;\n endChatRatio?: number;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\nfunction DefaultChat() {\n const messages = [\n { from: \"user\", text: \"Build me a landing page\" },\n { from: \"ai\", text: \"Sure — what should it feature?\" },\n { from: \"user\", text: \"Hero, pricing, footer.\" },\n { from: \"ai\", text: \"On it. Generating now...\" },\n ];\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n padding: 24,\n display: \"flex\",\n flexDirection: \"column\",\n gap: 12,\n fontFamily: FONT_FAMILY,\n background: \"#111\",\n }}\n >\n <div\n style={{\n color: \"#888\",\n fontSize: 12,\n fontWeight: 600,\n letterSpacing: \"0.08em\",\n textTransform: \"uppercase\",\n marginBottom: 8,\n }}\n >\n Chat\n </div>\n {messages.map((m, i) => (\n <div\n key={i}\n style={{\n alignSelf: m.from === \"user\" ? \"flex-end\" : \"flex-start\",\n background: m.from === \"user\" ? \"#0ea5e9\" : \"#262626\",\n color: \"white\",\n padding: \"10px 14px\",\n borderRadius: 14,\n fontSize: 14,\n maxWidth: \"85%\",\n }}\n >\n {m.text}\n </div>\n ))}\n </div>\n );\n}\n\nfunction DefaultPreview() {\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"white\",\n display: \"flex\",\n flexDirection: \"column\",\n fontFamily: FONT_FAMILY,\n }}\n >\n <div\n style={{\n height: 36,\n background: \"#f4f4f5\",\n borderBottom: \"1px solid #e4e4e7\",\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n padding: \"0 12px\",\n }}\n >\n <div\n style={{\n width: 10,\n height: 10,\n borderRadius: 999,\n background: \"#ef4444\",\n }}\n />\n <div\n style={{\n width: 10,\n height: 10,\n borderRadius: 999,\n background: \"#f59e0b\",\n }}\n />\n <div\n style={{\n width: 10,\n height: 10,\n borderRadius: 999,\n background: \"#22c55e\",\n }}\n />\n </div>\n <div\n style={{\n flex: 1,\n padding: 32,\n display: \"flex\",\n flexDirection: \"column\",\n gap: 16,\n }}\n >\n <div\n style={{\n fontSize: 36,\n fontWeight: 700,\n letterSpacing: \"-0.03em\",\n color: \"#0a0a0a\",\n }}\n >\n Ship faster.\n </div>\n <div style={{ fontSize: 16, color: \"#71717a\", maxWidth: 360 }}>\n The fastest way to launch your idea. Built with Remotion.\n </div>\n <div\n style={{\n marginTop: 12,\n display: \"inline-flex\",\n background: \"#0a0a0a\",\n color: \"white\",\n padding: \"10px 18px\",\n borderRadius: 10,\n alignSelf: \"flex-start\",\n fontSize: 14,\n fontWeight: 600,\n }}\n >\n Get started\n </div>\n </div>\n </div>\n );\n}\n\nexport function ChatToPreviewLayout({\n chat,\n preview,\n startChatRatio = 0.5,\n endChatRatio = 0.25,\n speed = 1,\n className,\n}: ChatToPreviewLayoutProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n // Apple's signature ease — slow start, dramatic settle. Replaces the older\n // symmetric bezier so the morph feels deliberate instead of mechanical.\n const APPLE_EASE = Easing.bezier(0.16, 1, 0.3, 1);\n\n const morphStart = durationInFrames * 0.1;\n const morphEnd = durationInFrames * 0.7;\n\n const ratio = interpolate(\n frame,\n [morphStart, morphEnd],\n [startChatRatio, endChatRatio],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: APPLE_EASE,\n },\n );\n\n // Right (preview) panel reveal: fade in + slide left into its growing slot.\n // Anchored to the same morph window so it feels like the chat is physically\n // dragging the preview into existence.\n const previewOpacity = interpolate(frame, [morphStart, morphEnd], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: APPLE_EASE,\n });\n const previewTx = interpolate(frame, [morphStart, morphEnd], [40, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: APPLE_EASE,\n });\n\n const chatBasis = `${ratio * 100}%`;\n const previewBasis = `${(1 - ratio) * 100}%`;\n\n // Inner content min-widths. These are the lever that prevents text from\n // re-flowing inside the columns as the parent flex-basis morphs — content\n // is rendered at a fixed virtual width, then clipped by `overflow: hidden`\n // on the outer column. No reflow → no jumping characters.\n const CHAT_INNER_MIN = 520;\n const PREVIEW_INNER_MIN = 720;\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n padding: 32,\n display: \"flex\",\n gap: 16,\n }}\n >\n <div\n style={{\n flexBasis: chatBasis,\n flexGrow: 0,\n flexShrink: 0,\n position: \"relative\",\n overflow: \"hidden\",\n borderRadius: 16,\n border: \"1px solid rgba(255,255,255,0.08)\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n minWidth: CHAT_INNER_MIN,\n }}\n >\n {chat ?? <DefaultChat />}\n </div>\n </div>\n <div\n style={{\n flexBasis: previewBasis,\n flexGrow: 0,\n flexShrink: 0,\n position: \"relative\",\n overflow: \"hidden\",\n borderRadius: 16,\n border: \"1px solid rgba(255,255,255,0.08)\",\n opacity: previewOpacity,\n translate: `${previewTx}px`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n minWidth: PREVIEW_INNER_MIN,\n }}\n >\n {preview ?? <DefaultPreview />}\n </div>\n </div>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/chat-to-preview-layout.tsx"}diff --git a/registry-artifacts/claude-chat.json b/registry-artifacts/claude-chat.jsonindex ab1113de..743a47a9 100644--- a/registry-artifacts/claude-chat.json+++ b/registry-artifacts/claude-chat.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/claude-chat/index.tsx",- "content": "\"use client\";\n\nimport { loadFont as loadBodyFont } from \"@remotion/google-fonts/Inter\";\nimport {\n AbsoluteFill,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { Caret } from \"@/components/remocn/caret\";\nimport { useTypewriter } from \"@/lib/remocn-ui\";\n\nconst { fontFamily: SANS_FAMILY } = loadBodyFont();\n\nexport interface ClaudeChatProps {\n greeting?: string;\n placeholder?: string;\n prompt?: string;\n modelName?: string;\n modelTier?: string;\n accentColor?: string;\n speed?: number;\n}\n\ninterface Theme {\n page: string;\n cardBg: string;\n cardBorder: string;\n fg: string;\n fgMuted: string;\n placeholder: string;\n iconBtnBorder: string;\n}\n\nexport const THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n page: \"#F5F4EF\",\n cardBg: \"#FFFFFF\",\n cardBorder: \"#E8E5DD\",\n fg: \"#1F1E1D\",\n fgMuted: \"#73726C\",\n placeholder: \"#A3A097\",\n iconBtnBorder: \"#E0DDD4\",\n },\n dark: {\n page: \"#262624\",\n cardBg: \"#1F1E1D\",\n cardBorder: \"#3A3936\",\n fg: \"#F0EEE6\",\n fgMuted: \"#9B9892\",\n placeholder: \"#73726C\",\n iconBtnBorder: \"#3A3936\",\n },\n};\n\nexport const TYPING_START_FRAME = 42;\n\nexport const TYPING_CPS = 22;\n\nexport function morphProgressAt(\n frame: number,\n opts: { startFrame?: number; fps: number; speed: number },\n): number {\n const startFrame = opts.startFrame ?? TYPING_START_FRAME;\n const value = spring({\n fps: opts.fps,\n frame: frame * opts.speed - startFrame,\n config: { damping: 14, stiffness: 200, mass: 0.6 },\n });\n return Math.max(0, Math.min(value, 1));\n}\n\nexport function introBounceIn(\n frame: number,\n fps: number,\n): { translateY: number; scale: number } {\n const s = spring({\n fps,\n frame,\n config: { damping: 14, stiffness: 110, mass: 0.7 },\n });\n const translateY = interpolate(s, [0, 1], [28, 0]);\n const scale = interpolate(s, [0, 1], [0.97, 1]);\n return { translateY, scale };\n}\n\nexport function fadeUpAt(\n frame: number,\n range: [number, number],\n): { opacity: number; translateY: number } {\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n };\n return {\n opacity: interpolate(frame, range, [0, 1], opts),\n translateY: interpolate(frame, range, [12, 0], opts),\n };\n}\n\nfunction ChevronDown({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Expand</title>\n <path\n d=\"M6 9l6 6 6-6\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction PlusIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Add</title>\n <path\n d=\"M12 5v14M5 12h14\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n />\n </svg>\n );\n}\n\nfunction MicIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Voice input</title>\n <rect\n x={9}\n y={3}\n width={6}\n height={11}\n rx={3}\n stroke={color}\n strokeWidth={1.8}\n />\n <path\n d=\"M5.5 11a6.5 6.5 0 0013 0M12 17.5V21M9 21h6\"\n stroke={color}\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction WaveformIcon({ size, color }: { size: number; color: string }) {\n const bars = [\n { x: 4, h: 8 },\n { x: 9, h: 16 },\n { x: 14, h: 12 },\n { x: 19, h: 20 },\n ];\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Voice</title>\n {bars.map((bar) => (\n <rect\n key={bar.x}\n x={bar.x - 1}\n y={(24 - bar.h) / 2}\n width={2.4}\n height={bar.h}\n rx={1.2}\n fill={color}\n />\n ))}\n </svg>\n );\n}\n\nfunction SendIcon({ size }: { size: number }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Send</title>\n <path\n d=\"M12 19V5M12 5l-6 6M12 5l6 6\"\n stroke=\"#FFFFFF\"\n strokeWidth={2.2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction IconButton({\n size,\n border,\n children,\n}: {\n size: number;\n border: string;\n children: React.ReactNode;\n}) {\n return (\n <div\n style={{\n width: size,\n height: size,\n borderRadius: \"100%\",\n border: `1px solid ${border}`,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n flexShrink: 0,\n }}\n >\n {children}\n </div>\n );\n}\n\nexport function ClaudeChat({\n placeholder = \"Try: draft an email · summarize a doc · plan your week\",\n prompt = \"Draft a launch tweet for our new release\",\n modelName = \"Opus 4.8\",\n modelTier = \"Max\",\n accentColor = \"#D97757\",\n speed = 1,\n}: ClaudeChatProps) {\n const frame = useCurrentFrame();\n const { width, height, fps } = useVideoConfig();\n const t = THEMES.light;\n\n const refW = 1280;\n const refH = 720;\n const stageScale = Math.min(width / refW, height / refH);\n\n const tw = useTypewriter(prompt, {\n cps: TYPING_CPS,\n speed,\n startFrame: TYPING_START_FRAME,\n });\n const visibleText = tw.text;\n const showText = tw.count > 0;\n const morph = morphProgressAt(frame, { fps, speed });\n\n const intro = introBounceIn(frame * speed, fps);\n const cardFade = fadeUpAt(frame * speed, [6, 22]);\n\n const cardWidth = 860;\n const cardLeft = (refW - cardWidth) / 2;\n const iconBtnSize = 36;\n const morphSize = 40;\n\n return (\n <AbsoluteFill style={{ background: \"transparent\" }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: refW,\n height: refH,\n transform: `translate(-50%, -50%) scale(${stageScale})`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: cardLeft,\n top: 300,\n width: cardWidth,\n background: t.cardBg,\n border: `1px solid ${t.cardBorder}`,\n borderRadius: 24,\n boxShadow: \"0 8px 30px -12px rgba(31,30,29,0.12)\",\n opacity: cardFade.opacity,\n transform: `translateY(${cardFade.translateY + intro.translateY}px) scale(${intro.scale})`,\n transformOrigin: \"center top\",\n }}\n >\n <div\n style={{\n padding: \"26px 28px\",\n minHeight: 58,\n fontFamily: SANS_FAMILY,\n fontSize: 21,\n lineHeight: 1.3,\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n {showText ? (\n <span style={{ color: t.fg }}>\n {visibleText}\n <Caret\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n height={24}\n radius={0}\n marginLeft={1}\n style={{\n verticalAlign: \"text-bottom\",\n transform: \"translateY(3px)\",\n }}\n />\n </span>\n ) : (\n <span\n style={{\n color: t.placeholder,\n display: \"inline-flex\",\n alignItems: \"center\",\n }}\n >\n <Caret\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n height={24}\n radius={0}\n marginLeft={1}\n style={{\n verticalAlign: \"text-bottom\",\n transform: \"translateY(3px)\",\n }}\n />\n <span style={{ marginLeft: 2 }}>{placeholder}</span>\n </span>\n )}\n </div>\n\n <div\n style={{\n padding: \"14px 18px\",\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n }}\n >\n <IconButton size={iconBtnSize} border={t.iconBtnBorder}>\n <PlusIcon size={20} color={t.fg} />\n </IconButton>\n\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 14,\n }}\n >\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 7,\n }}\n >\n <span\n style={{\n fontFamily: SANS_FAMILY,\n fontSize: 18,\n fontWeight: 500,\n color: t.fg,\n }}\n >\n {modelName}\n </span>\n <span\n style={{\n fontFamily: SANS_FAMILY,\n fontSize: 18,\n fontWeight: 400,\n color: t.fgMuted,\n }}\n >\n {modelTier}\n </span>\n <ChevronDown size={16} color={t.fgMuted} />\n </div>\n\n <IconButton size={iconBtnSize} border={t.iconBtnBorder}>\n <MicIcon size={20} color={t.fg} />\n </IconButton>\n\n <div\n style={{\n position: \"relative\",\n width: morphSize,\n height: morphSize,\n flexShrink: 0,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderRadius: \"100%\",\n border: `1px solid ${t.iconBtnBorder}`,\n opacity: 1 - morph,\n transform: `scale(${1 - 0.1 * morph})`,\n }}\n >\n <WaveformIcon size={22} color={t.fg} />\n </div>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderRadius: 10,\n background: accentColor,\n opacity: morph,\n transform: `scale(${0.8 + 0.2 * morph})`,\n }}\n >\n <SendIcon size={22} />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport { loadFont as loadBodyFont } from \"@remotion/google-fonts/Inter\";\nimport {\n AbsoluteFill,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { Caret } from \"@/components/remocn/caret\";\nimport { useTypewriter } from \"@/lib/remocn-ui\";\n\nconst { fontFamily: SANS_FAMILY } = loadBodyFont();\n\nexport interface ClaudeChatProps {\n greeting?: string;\n placeholder?: string;\n prompt?: string;\n modelName?: string;\n modelTier?: string;\n accentColor?: string;\n speed?: number;\n}\n\ninterface Theme {\n page: string;\n cardBg: string;\n cardBorder: string;\n fg: string;\n fgMuted: string;\n placeholder: string;\n iconBtnBorder: string;\n}\n\nexport const THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n page: \"#F5F4EF\",\n cardBg: \"#FFFFFF\",\n cardBorder: \"#E8E5DD\",\n fg: \"#1F1E1D\",\n fgMuted: \"#73726C\",\n placeholder: \"#A3A097\",\n iconBtnBorder: \"#E0DDD4\",\n },\n dark: {\n page: \"#262624\",\n cardBg: \"#1F1E1D\",\n cardBorder: \"#3A3936\",\n fg: \"#F0EEE6\",\n fgMuted: \"#9B9892\",\n placeholder: \"#73726C\",\n iconBtnBorder: \"#3A3936\",\n },\n};\n\nexport const TYPING_START_FRAME = 42;\n\nexport const TYPING_CPS = 22;\n\nexport function morphProgressAt(\n frame: number,\n opts: { startFrame?: number; fps: number; speed: number },\n): number {\n const startFrame = opts.startFrame ?? TYPING_START_FRAME;\n const value = spring({\n fps: opts.fps,\n frame: frame * opts.speed - startFrame,\n config: { damping: 14, stiffness: 200, mass: 0.6 },\n });\n return Math.max(0, Math.min(value, 1));\n}\n\nexport function introBounceIn(\n frame: number,\n fps: number,\n): { translateY: number; scale: number } {\n const s = spring({\n fps,\n frame,\n config: { damping: 14, stiffness: 110, mass: 0.7 },\n });\n const translateY = interpolate(s, [0, 1], [28, 0]);\n const scale = interpolate(s, [0, 1], [0.97, 1]);\n return { translateY, scale };\n}\n\nexport function fadeUpAt(\n frame: number,\n range: [number, number],\n): { opacity: number; translateY: number } {\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n };\n return {\n opacity: interpolate(frame, range, [0, 1], opts),\n translateY: interpolate(frame, range, [12, 0], opts),\n };\n}\n\nfunction ChevronDown({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Expand</title>\n <path\n d=\"M6 9l6 6 6-6\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction PlusIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Add</title>\n <path\n d=\"M12 5v14M5 12h14\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n />\n </svg>\n );\n}\n\nfunction MicIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Voice input</title>\n <rect\n x={9}\n y={3}\n width={6}\n height={11}\n rx={3}\n stroke={color}\n strokeWidth={1.8}\n />\n <path\n d=\"M5.5 11a6.5 6.5 0 0013 0M12 17.5V21M9 21h6\"\n stroke={color}\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction WaveformIcon({ size, color }: { size: number; color: string }) {\n const bars = [\n { x: 4, h: 8 },\n { x: 9, h: 16 },\n { x: 14, h: 12 },\n { x: 19, h: 20 },\n ];\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Voice</title>\n {bars.map((bar) => (\n <rect\n key={bar.x}\n x={bar.x - 1}\n y={(24 - bar.h) / 2}\n width={2.4}\n height={bar.h}\n rx={1.2}\n fill={color}\n />\n ))}\n </svg>\n );\n}\n\nfunction SendIcon({ size }: { size: number }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Send</title>\n <path\n d=\"M12 19V5M12 5l-6 6M12 5l6 6\"\n stroke=\"#FFFFFF\"\n strokeWidth={2.2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction IconButton({\n size,\n border,\n children,\n}: {\n size: number;\n border: string;\n children: React.ReactNode;\n}) {\n return (\n <div\n style={{\n width: size,\n height: size,\n borderRadius: \"100%\",\n border: `1px solid ${border}`,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n flexShrink: 0,\n }}\n >\n {children}\n </div>\n );\n}\n\nexport function ClaudeChat({\n placeholder = \"Try: draft an email · summarize a doc · plan your week\",\n prompt = \"Draft a launch tweet for our new release\",\n modelName = \"Opus 4.8\",\n modelTier = \"Max\",\n accentColor = \"#D97757\",\n speed = 1,\n}: ClaudeChatProps) {\n const frame = useCurrentFrame();\n const { width, height, fps } = useVideoConfig();\n const t = THEMES.light;\n\n const refW = 1280;\n const refH = 720;\n const stageScale = Math.min(width / refW, height / refH);\n\n const tw = useTypewriter(prompt, {\n cps: TYPING_CPS,\n speed,\n startFrame: TYPING_START_FRAME,\n });\n const visibleText = tw.text;\n const showText = tw.count > 0;\n const morph = morphProgressAt(frame, { fps, speed });\n\n const intro = introBounceIn(frame * speed, fps);\n const cardFade = fadeUpAt(frame * speed, [6, 22]);\n\n const cardWidth = 860;\n const cardLeft = (refW - cardWidth) / 2;\n const iconBtnSize = 36;\n const morphSize = 40;\n\n return (\n <AbsoluteFill style={{ background: \"transparent\" }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: refW,\n height: refH,\n translate: \"-50% -50%\",\n scale: `${stageScale}`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: cardLeft,\n top: 300,\n width: cardWidth,\n background: t.cardBg,\n border: `1px solid ${t.cardBorder}`,\n borderRadius: 24,\n boxShadow: \"0 8px 30px -12px rgba(31,30,29,0.12)\",\n opacity: cardFade.opacity,\n translate: `0 ${cardFade.translateY + intro.translateY}px`,\n scale: `${intro.scale}`,\n transformOrigin: \"center top\",\n }}\n >\n <div\n style={{\n padding: \"26px 28px\",\n minHeight: 58,\n fontFamily: SANS_FAMILY,\n fontSize: 21,\n lineHeight: 1.3,\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n {showText ? (\n <span style={{ color: t.fg }}>\n {visibleText}\n <Caret\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n height={24}\n radius={0}\n marginLeft={1}\n style={{\n verticalAlign: \"text-bottom\",\n translate: \"0 3px\",\n }}\n />\n </span>\n ) : (\n <span\n style={{\n color: t.placeholder,\n display: \"inline-flex\",\n alignItems: \"center\",\n }}\n >\n <Caret\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n height={24}\n radius={0}\n marginLeft={1}\n style={{\n verticalAlign: \"text-bottom\",\n translate: \"0 3px\",\n }}\n />\n <span style={{ marginLeft: 2 }}>{placeholder}</span>\n </span>\n )}\n </div>\n\n <div\n style={{\n padding: \"14px 18px\",\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n }}\n >\n <IconButton size={iconBtnSize} border={t.iconBtnBorder}>\n <PlusIcon size={20} color={t.fg} />\n </IconButton>\n\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 14,\n }}\n >\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 7,\n }}\n >\n <span\n style={{\n fontFamily: SANS_FAMILY,\n fontSize: 18,\n fontWeight: 500,\n color: t.fg,\n }}\n >\n {modelName}\n </span>\n <span\n style={{\n fontFamily: SANS_FAMILY,\n fontSize: 18,\n fontWeight: 400,\n color: t.fgMuted,\n }}\n >\n {modelTier}\n </span>\n <ChevronDown size={16} color={t.fgMuted} />\n </div>\n\n <IconButton size={iconBtnSize} border={t.iconBtnBorder}>\n <MicIcon size={20} color={t.fg} />\n </IconButton>\n\n <div\n style={{\n position: \"relative\",\n width: morphSize,\n height: morphSize,\n flexShrink: 0,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderRadius: \"100%\",\n border: `1px solid ${t.iconBtnBorder}`,\n opacity: 1 - morph,\n scale: `${1 - 0.1 * morph}`,\n }}\n >\n <WaveformIcon size={22} color={t.fg} />\n </div>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderRadius: 10,\n background: accentColor,\n opacity: morph,\n scale: `${0.8 + 0.2 * morph}`,\n }}\n >\n <SendIcon size={22} />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/claude-chat.tsx"}diff --git a/registry-artifacts/claude-code.json b/registry-artifacts/claude-code.jsonindex d1d535c5..21e1d87a 100644--- a/registry-artifacts/claude-code.json+++ b/registry-artifacts/claude-code.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/claude-code/index.tsx",- "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/JetBrainsMono\";\nimport {\n AbsoluteFill,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { Caret } from \"@/components/remocn/caret\";\nimport { useTypewriter } from \"@/lib/remocn-ui\";\n\nconst { fontFamily: MONO_FAMILY } = loadFont();\n\nexport interface ClaudeCodeProps {\n title?: string;\n userName?: string;\n model?: string;\n cwd?: string;\n placeholder?: string;\n prompt?: string;\n accentColor?: string;\n speed?: number;\n}\n\ninterface Theme {\n page: string;\n windowBar: string;\n windowBody: string;\n fg: string;\n fgMuted: string;\n fgDim: string;\n boxBorder: string;\n}\n\nexport const THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n page: \"#E8E5DD\",\n windowBar: \"#D8D3CA\",\n windowBody: \"#FBFAF7\",\n fg: \"#1F1E1D\",\n fgMuted: \"#73726C\",\n fgDim: \"#A3A097\",\n boxBorder: \"#D97757\",\n },\n dark: {\n page: \"#2B2A28\",\n windowBar: \"#3A3633\",\n windowBody: \"#1B1A18\",\n fg: \"#E8E5DD\",\n fgMuted: \"#8A857C\",\n fgDim: \"#6B6660\",\n boxBorder: \"#D97757\",\n },\n};\n\nexport const TYPING_START_FRAME = 48;\n\nexport const TYPING_CPS = 18;\n\nexport const WHATS_NEW: string[] = [\n \"/agents to create subagents\",\n \"/security-review for review agent\",\n \"ctrl+b to background bashes\",\n];\n\nfunction introBounceIn(\n frame: number,\n fps: number,\n): { translateY: number; scale: number } {\n const s = spring({\n fps,\n frame,\n config: { damping: 14, stiffness: 110, mass: 0.7 },\n });\n const translateY = interpolate(s, [0, 1], [28, 0]);\n const scale = interpolate(s, [0, 1], [0.97, 1]);\n return { translateY, scale };\n}\n\nfunction fadeUpAt(\n frame: number,\n range: [number, number],\n): { opacity: number; translateY: number } {\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n };\n return {\n opacity: interpolate(frame, range, [0, 1], opts),\n translateY: interpolate(frame, range, [12, 0], opts),\n };\n}\n\nfunction Mascot({ accent, size = 96 }: { accent: string; size?: number }) {\n return (\n <svg\n height={size}\n viewBox=\"0 0 24 24\"\n width={size}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <title>Claude Code</title>\n <path\n clipRule=\"evenodd\"\n d=\"M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z\"\n fill={accent}\n fillRule=\"evenodd\"\n />\n </svg>\n );\n}\n\nexport function ClaudeCode({\n title = \"Claude Code v2.0.0\",\n userName = \"Meaghan\",\n model = \"Opus 4.8 • Max 20x\",\n cwd = \"/users/meaghan/code/apps\",\n placeholder = 'Try \"edit <filepath> to ...\"',\n prompt = \"edit src/theme.ts to add a dark mode toggle\",\n accentColor = \"#D97757\",\n speed = 1,\n}: ClaudeCodeProps) {\n const frame = useCurrentFrame();\n const { width, height, fps } = useVideoConfig();\n const t = THEMES.dark;\n\n const refW = 1280;\n const refH = 720;\n const stageScale = Math.min(width / refW, height / refH);\n\n const tw = useTypewriter(prompt, {\n cps: TYPING_CPS,\n speed,\n startFrame: TYPING_START_FRAME,\n });\n const showText = tw.count > 0;\n\n const intro = introBounceIn(frame * speed, fps);\n const leftFade = fadeUpAt(frame * speed, [6, 22]);\n const rightFade = fadeUpAt(frame * speed, [12, 30]);\n const promptFade = fadeUpAt(frame * speed, [18, 36]);\n\n const border = accentColor;\n\n const winLeft = 90;\n const winTop = 40;\n const winWidth = 1100;\n const winHeight = 620;\n const barHeight = 40;\n\n return (\n <AbsoluteFill style={{ background: \"transparent\" }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: refW,\n height: refH,\n transform: `translate(-50%, -50%) scale(${stageScale})`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: winLeft,\n top: winTop,\n width: winWidth,\n height: winHeight,\n background: t.windowBody,\n borderRadius: 12,\n overflow: \"hidden\",\n boxShadow: \"0 24px 60px -20px rgba(0,0,0,0.6)\",\n opacity: intro.scale,\n transform: `translateY(${intro.translateY}px) scale(${intro.scale})`,\n transformOrigin: \"center top\",\n display: \"flex\",\n flexDirection: \"column\",\n boxSizing: \"border-box\",\n }}\n >\n <div\n style={{\n height: barHeight,\n background: t.windowBar,\n display: \"flex\",\n alignItems: \"center\",\n gap: 8,\n paddingLeft: 16,\n flexShrink: 0,\n }}\n >\n <div\n style={{\n width: 12,\n height: 12,\n borderRadius: \"50%\",\n background: \"#FF5F57\",\n }}\n />\n <div\n style={{\n width: 12,\n height: 12,\n borderRadius: \"50%\",\n background: \"#FEBC2E\",\n }}\n />\n <div\n style={{\n width: 12,\n height: 12,\n borderRadius: \"50%\",\n background: \"#28C840\",\n }}\n />\n </div>\n\n <div\n style={{\n flex: 1,\n position: \"relative\",\n padding: 28,\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"column\",\n }}\n >\n <div\n style={{\n position: \"relative\",\n border: `1px dashed ${border}`,\n borderRadius: 6,\n padding: \"28px 24px 24px\",\n opacity: leftFade.opacity,\n transform: `translateY(${leftFade.translateY}px)`,\n }}\n >\n <span\n style={{\n position: \"absolute\",\n top: -11,\n left: 22,\n padding: \"0 10px\",\n background: t.windowBody,\n color: accentColor,\n fontFamily: MONO_FAMILY,\n fontSize: 16,\n fontWeight: 700,\n }}\n >\n {title}\n </span>\n\n <div style={{ display: \"flex\", flexDirection: \"row\" }}>\n <div\n style={{\n width: \"42%\",\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: 16,\n paddingRight: 24,\n boxSizing: \"border-box\",\n }}\n >\n <div\n style={{\n fontFamily: MONO_FAMILY,\n fontSize: 20,\n color: t.fg,\n }}\n >\n Welcome back {userName}!\n </div>\n <div style={{ alignSelf: \"center\" }}>\n <Mascot accent={accentColor} />\n </div>\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: 4,\n }}\n >\n <div\n style={{\n fontFamily: MONO_FAMILY,\n fontSize: 15,\n color: t.fgMuted,\n }}\n >\n {model}\n </div>\n <div\n style={{\n fontFamily: MONO_FAMILY,\n fontSize: 15,\n color: t.fgMuted,\n }}\n >\n {cwd}\n </div>\n </div>\n </div>\n\n <div\n style={{\n width: \"58%\",\n borderLeft: `1px dashed ${border}`,\n paddingLeft: 24,\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"column\",\n opacity: rightFade.opacity,\n transform: `translateY(${rightFade.translateY}px)`,\n }}\n >\n <div>\n <div\n style={{\n fontFamily: MONO_FAMILY,\n fontSize: 15,\n fontWeight: 700,\n color: accentColor,\n marginBottom: 10,\n }}\n >\n What's new\n </div>\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: 6,\n }}\n >\n {WHATS_NEW.map((line) => (\n <div\n key={line}\n style={{\n fontFamily: MONO_FAMILY,\n fontSize: 14,\n color: t.fg,\n }}\n >\n {line}\n </div>\n ))}\n <div\n style={{\n fontFamily: MONO_FAMILY,\n fontSize: 14,\n color: t.fgDim,\n }}\n >\n ... /help for more\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div style={{ height: 32 }} />\n\n <div\n style={{\n opacity: promptFade.opacity,\n transform: `translateY(${promptFade.translateY}px)`,\n }}\n >\n <div\n style={{\n height: 1,\n background: t.fgDim,\n opacity: 0.4,\n marginBottom: 16,\n }}\n />\n <div\n style={{\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n fontFamily: MONO_FAMILY,\n fontSize: 17,\n whiteSpace: \"pre\",\n }}\n >\n <span style={{ color: t.fgMuted }}>{\"> \"}</span>\n {showText ? (\n <span\n style={{\n position: \"relative\",\n color: t.fg,\n display: \"inline-flex\",\n alignItems: \"center\",\n }}\n >\n {tw.text}\n <span style={{ opacity: 0.55, display: \"inline-flex\" }}>\n <Caret\n width={11}\n height={22}\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n marginLeft={2}\n />\n </span>\n </span>\n ) : (\n <span\n style={{\n position: \"relative\",\n color: t.fgMuted,\n display: \"inline-flex\",\n alignItems: \"center\",\n }}\n >\n <span style={{ opacity: 0.55, display: \"inline-flex\" }}>\n <Caret\n width={11}\n height={22}\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n />\n </span>\n <span style={{ marginLeft: 6 }}>{placeholder}</span>\n </span>\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/JetBrainsMono\";\nimport {\n AbsoluteFill,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { Caret } from \"@/components/remocn/caret\";\nimport { useTypewriter } from \"@/lib/remocn-ui\";\n\nconst { fontFamily: MONO_FAMILY } = loadFont();\n\nexport interface ClaudeCodeProps {\n title?: string;\n userName?: string;\n model?: string;\n cwd?: string;\n placeholder?: string;\n prompt?: string;\n accentColor?: string;\n speed?: number;\n}\n\ninterface Theme {\n page: string;\n windowBar: string;\n windowBody: string;\n fg: string;\n fgMuted: string;\n fgDim: string;\n boxBorder: string;\n}\n\nexport const THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n page: \"#E8E5DD\",\n windowBar: \"#D8D3CA\",\n windowBody: \"#FBFAF7\",\n fg: \"#1F1E1D\",\n fgMuted: \"#73726C\",\n fgDim: \"#A3A097\",\n boxBorder: \"#D97757\",\n },\n dark: {\n page: \"#2B2A28\",\n windowBar: \"#3A3633\",\n windowBody: \"#1B1A18\",\n fg: \"#E8E5DD\",\n fgMuted: \"#8A857C\",\n fgDim: \"#6B6660\",\n boxBorder: \"#D97757\",\n },\n};\n\nexport const TYPING_START_FRAME = 48;\n\nexport const TYPING_CPS = 18;\n\nexport const WHATS_NEW: string[] = [\n \"/agents to create subagents\",\n \"/security-review for review agent\",\n \"ctrl+b to background bashes\",\n];\n\nfunction introBounceIn(\n frame: number,\n fps: number,\n): { translateY: number; scale: number } {\n const s = spring({\n fps,\n frame,\n config: { damping: 14, stiffness: 110, mass: 0.7 },\n });\n const translateY = interpolate(s, [0, 1], [28, 0]);\n const scale = interpolate(s, [0, 1], [0.97, 1]);\n return { translateY, scale };\n}\n\nfunction fadeUpAt(\n frame: number,\n range: [number, number],\n): { opacity: number; translateY: number } {\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n };\n return {\n opacity: interpolate(frame, range, [0, 1], opts),\n translateY: interpolate(frame, range, [12, 0], opts),\n };\n}\n\nfunction Mascot({ accent, size = 96 }: { accent: string; size?: number }) {\n return (\n <svg\n height={size}\n viewBox=\"0 0 24 24\"\n width={size}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <title>Claude Code</title>\n <path\n clipRule=\"evenodd\"\n d=\"M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z\"\n fill={accent}\n fillRule=\"evenodd\"\n />\n </svg>\n );\n}\n\nexport function ClaudeCode({\n title = \"Claude Code v2.0.0\",\n userName = \"Meaghan\",\n model = \"Opus 4.8 • Max 20x\",\n cwd = \"/users/meaghan/code/apps\",\n placeholder = 'Try \"edit <filepath> to ...\"',\n prompt = \"edit src/theme.ts to add a dark mode toggle\",\n accentColor = \"#D97757\",\n speed = 1,\n}: ClaudeCodeProps) {\n const frame = useCurrentFrame();\n const { width, height, fps } = useVideoConfig();\n const t = THEMES.dark;\n\n const refW = 1280;\n const refH = 720;\n const stageScale = Math.min(width / refW, height / refH);\n\n const tw = useTypewriter(prompt, {\n cps: TYPING_CPS,\n speed,\n startFrame: TYPING_START_FRAME,\n });\n const showText = tw.count > 0;\n\n const intro = introBounceIn(frame * speed, fps);\n const leftFade = fadeUpAt(frame * speed, [6, 22]);\n const rightFade = fadeUpAt(frame * speed, [12, 30]);\n const promptFade = fadeUpAt(frame * speed, [18, 36]);\n\n const border = accentColor;\n\n const winLeft = 90;\n const winTop = 40;\n const winWidth = 1100;\n const winHeight = 620;\n const barHeight = 40;\n\n return (\n <AbsoluteFill style={{ background: \"transparent\" }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: refW,\n height: refH,\n translate: \"-50% -50%\",\n scale: `${stageScale}`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: winLeft,\n top: winTop,\n width: winWidth,\n height: winHeight,\n background: t.windowBody,\n borderRadius: 12,\n overflow: \"hidden\",\n boxShadow: \"0 24px 60px -20px rgba(0,0,0,0.6)\",\n opacity: intro.scale,\n translate: `0 ${intro.translateY}px`,\n scale: `${intro.scale}`,\n transformOrigin: \"center top\",\n display: \"flex\",\n flexDirection: \"column\",\n boxSizing: \"border-box\",\n }}\n >\n <div\n style={{\n height: barHeight,\n background: t.windowBar,\n display: \"flex\",\n alignItems: \"center\",\n gap: 8,\n paddingLeft: 16,\n flexShrink: 0,\n }}\n >\n <div\n style={{\n width: 12,\n height: 12,\n borderRadius: \"50%\",\n background: \"#FF5F57\",\n }}\n />\n <div\n style={{\n width: 12,\n height: 12,\n borderRadius: \"50%\",\n background: \"#FEBC2E\",\n }}\n />\n <div\n style={{\n width: 12,\n height: 12,\n borderRadius: \"50%\",\n background: \"#28C840\",\n }}\n />\n </div>\n\n <div\n style={{\n flex: 1,\n position: \"relative\",\n padding: 28,\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"column\",\n }}\n >\n <div\n style={{\n position: \"relative\",\n border: `1px dashed ${border}`,\n borderRadius: 6,\n padding: \"28px 24px 24px\",\n opacity: leftFade.opacity,\n translate: `0 ${leftFade.translateY}px`,\n }}\n >\n <span\n style={{\n position: \"absolute\",\n top: -11,\n left: 22,\n padding: \"0 10px\",\n background: t.windowBody,\n color: accentColor,\n fontFamily: MONO_FAMILY,\n fontSize: 16,\n fontWeight: 700,\n }}\n >\n {title}\n </span>\n\n <div style={{ display: \"flex\", flexDirection: \"row\" }}>\n <div\n style={{\n width: \"42%\",\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n gap: 16,\n paddingRight: 24,\n boxSizing: \"border-box\",\n }}\n >\n <div\n style={{\n fontFamily: MONO_FAMILY,\n fontSize: 20,\n color: t.fg,\n }}\n >\n Welcome back {userName}!\n </div>\n <div style={{ alignSelf: \"center\" }}>\n <Mascot accent={accentColor} />\n </div>\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: 4,\n }}\n >\n <div\n style={{\n fontFamily: MONO_FAMILY,\n fontSize: 15,\n color: t.fgMuted,\n }}\n >\n {model}\n </div>\n <div\n style={{\n fontFamily: MONO_FAMILY,\n fontSize: 15,\n color: t.fgMuted,\n }}\n >\n {cwd}\n </div>\n </div>\n </div>\n\n <div\n style={{\n width: \"58%\",\n borderLeft: `1px dashed ${border}`,\n paddingLeft: 24,\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"column\",\n opacity: rightFade.opacity,\n translate: `0 ${rightFade.translateY}px`,\n }}\n >\n <div>\n <div\n style={{\n fontFamily: MONO_FAMILY,\n fontSize: 15,\n fontWeight: 700,\n color: accentColor,\n marginBottom: 10,\n }}\n >\n What's new\n </div>\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: 6,\n }}\n >\n {WHATS_NEW.map((line) => (\n <div\n key={line}\n style={{\n fontFamily: MONO_FAMILY,\n fontSize: 14,\n color: t.fg,\n }}\n >\n {line}\n </div>\n ))}\n <div\n style={{\n fontFamily: MONO_FAMILY,\n fontSize: 14,\n color: t.fgDim,\n }}\n >\n ... /help for more\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <div style={{ height: 32 }} />\n\n <div\n style={{\n opacity: promptFade.opacity,\n translate: `0 ${promptFade.translateY}px`,\n }}\n >\n <div\n style={{\n height: 1,\n background: t.fgDim,\n opacity: 0.4,\n marginBottom: 16,\n }}\n />\n <div\n style={{\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n fontFamily: MONO_FAMILY,\n fontSize: 17,\n whiteSpace: \"pre\",\n }}\n >\n <span style={{ color: t.fgMuted }}>{\"> \"}</span>\n {showText ? (\n <span\n style={{\n position: \"relative\",\n color: t.fg,\n display: \"inline-flex\",\n alignItems: \"center\",\n }}\n >\n {tw.text}\n <span style={{ opacity: 0.55, display: \"inline-flex\" }}>\n <Caret\n width={11}\n height={22}\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n marginLeft={2}\n />\n </span>\n </span>\n ) : (\n <span\n style={{\n position: \"relative\",\n color: t.fgMuted,\n display: \"inline-flex\",\n alignItems: \"center\",\n }}\n >\n <span style={{ opacity: 0.55, display: \"inline-flex\" }}>\n <Caret\n width={11}\n height={22}\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n />\n </span>\n <span style={{ marginLeft: 6 }}>{placeholder}</span>\n </span>\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/claude-code.tsx"}diff --git a/registry-artifacts/confetti.json b/registry-artifacts/confetti.jsonindex ca74a6f0..cdd1f8b0 100644--- a/registry-artifacts/confetti.json+++ b/registry-artifacts/confetti.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/confetti/index.tsx",- "content": "\"use client\";\n\nimport {\n AbsoluteFill,\n interpolate,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nexport interface ConfettiProps {\n /** Number of confetti pieces. */\n particleCount?: number;\n colors?: string[];\n /** Burst origin as a 0..1 fraction of the canvas. */\n originX?: number;\n originY?: number;\n /** Frame the burst fires on. */\n startFrame?: number;\n /** Lifetime of the burst, in frames. */\n lifetime?: number;\n /** Initial launch speed (px/frame at the 720px reference height). */\n power?: number;\n /** Downward acceleration (px/frame² at the 720px reference height). */\n gravity?: number;\n /** Base piece size in reference px. */\n size?: number;\n /** PRNG seed — same seed renders an identical burst every time. */\n seed?: number;\n}\n\nexport interface Particle {\n angle: number;\n speed: number;\n color: string;\n size: number;\n rot0: number;\n spin: number;\n drift: number;\n}\n\nconst DEFAULT_COLORS = [\n \"#1d9bf0\",\n \"#ff5da2\",\n \"#ffd23f\",\n \"#22c55e\",\n \"#a855f7\",\n \"#ff7a45\",\n];\n\n// --- Pure helpers (unit-tested) -------------------------------------------\n\n/** Deterministic PRNG (mulberry32) — returns a function yielding [0, 1). */\nexport function mulberry32(seed: number): () => number {\n let a = seed >>> 0;\n return () => {\n a = (a + 0x6d2b79f5) | 0;\n let t = Math.imul(a ^ (a >>> 15), 1 | a);\n t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;\n return ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n };\n}\n\n/** Build a deterministic particle set for a seed (stable across renders). */\nexport function makeParticles({\n count,\n seed,\n colors,\n}: {\n count: number;\n seed: number;\n colors: string[];\n}): Particle[] {\n const rand = mulberry32(seed);\n const palette = colors.length > 0 ? colors : DEFAULT_COLORS;\n const out: Particle[] = [];\n for (let i = 0; i < count; i++) {\n const angle = rand() * Math.PI * 2;\n const speed = 0.35 + 0.65 * rand();\n out.push({\n angle,\n speed,\n color: palette[Math.floor(rand() * palette.length)],\n size: 0.7 + 0.6 * rand(),\n rot0: rand() * Math.PI * 2,\n spin: (rand() - 0.5) * 0.6,\n drift: (rand() - 0.5) * 2,\n });\n }\n return out;\n}\n\n/** Opacity envelope over a particle's lifetime: quick fade-in, slow fade-out. */\nexport function particleOpacity(tt: number, lifetime: number): number {\n if (tt < 0 || tt > lifetime) return 0;\n const fadeIn = interpolate(tt, [0, 4], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n const fadeOut = interpolate(tt, [lifetime * 0.7, lifetime], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n return Math.min(fadeIn, fadeOut);\n}\n\n// --- Component -------------------------------------------------------------\n\nexport function Confetti({\n particleCount = 140,\n colors = DEFAULT_COLORS,\n originX = 0.5,\n originY = 0.5,\n startFrame = 0,\n lifetime = 90,\n power = 17,\n gravity = 0.45,\n size = 13,\n seed = 1,\n}: ConfettiProps) {\n const frame = useCurrentFrame();\n const { width, height } = useVideoConfig();\n\n const tt = frame - startFrame;\n if (tt < 0 || tt > lifetime) return null;\n\n const sc = height / 720;\n const ox = width * originX;\n const oy = height * originY;\n const particles = makeParticles({ count: particleCount, seed, colors });\n\n return (\n <AbsoluteFill style={{ pointerEvents: \"none\" }}>\n {particles.map((p, i) => {\n const opacity = particleOpacity(tt, lifetime);\n if (opacity <= 0) return null;\n\n const vx = Math.cos(p.angle) * p.speed * power + p.drift;\n const vy = Math.sin(p.angle) * p.speed * power;\n const x = ox + vx * tt * sc;\n const y = oy + (vy * tt + 0.5 * gravity * tt * tt) * sc;\n const rot = p.rot0 + p.spin * tt;\n const flutter = Math.cos(p.rot0 + p.spin * tt * 1.6);\n const w = size * p.size * sc;\n\n return (\n <div\n key={i}\n style={{\n position: \"absolute\",\n left: x,\n top: y,\n width: w,\n height: w * 0.62,\n borderRadius: 2,\n background: p.color,\n opacity,\n transform: `translate(-50%, -50%) rotate(${rot}rad) scaleX(${flutter})`,\n }}\n />\n );\n })}\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport {\n AbsoluteFill,\n interpolate,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nexport interface ConfettiProps {\n /** Number of confetti pieces. */\n particleCount?: number;\n colors?: string[];\n /** Burst origin as a 0..1 fraction of the canvas. */\n originX?: number;\n originY?: number;\n /** Frame the burst fires on. */\n startFrame?: number;\n /** Lifetime of the burst, in frames. */\n lifetime?: number;\n /** Initial launch speed (px/frame at the 720px reference height). */\n power?: number;\n /** Downward acceleration (px/frame² at the 720px reference height). */\n gravity?: number;\n /** Base piece size in reference px. */\n size?: number;\n /** PRNG seed — same seed renders an identical burst every time. */\n seed?: number;\n}\n\nexport interface Particle {\n angle: number;\n speed: number;\n color: string;\n size: number;\n rot0: number;\n spin: number;\n drift: number;\n}\n\nconst DEFAULT_COLORS = [\n \"#1d9bf0\",\n \"#ff5da2\",\n \"#ffd23f\",\n \"#22c55e\",\n \"#a855f7\",\n \"#ff7a45\",\n];\n\n// --- Pure helpers (unit-tested) -------------------------------------------\n\n/** Deterministic PRNG (mulberry32) — returns a function yielding [0, 1). */\nexport function mulberry32(seed: number): () => number {\n let a = seed >>> 0;\n return () => {\n a = (a + 0x6d2b79f5) | 0;\n let t = Math.imul(a ^ (a >>> 15), 1 | a);\n t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;\n return ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n };\n}\n\n/** Build a deterministic particle set for a seed (stable across renders). */\nexport function makeParticles({\n count,\n seed,\n colors,\n}: {\n count: number;\n seed: number;\n colors: string[];\n}): Particle[] {\n const rand = mulberry32(seed);\n const palette = colors.length > 0 ? colors : DEFAULT_COLORS;\n const out: Particle[] = [];\n for (let i = 0; i < count; i++) {\n const angle = rand() * Math.PI * 2;\n const speed = 0.35 + 0.65 * rand();\n out.push({\n angle,\n speed,\n color: palette[Math.floor(rand() * palette.length)],\n size: 0.7 + 0.6 * rand(),\n rot0: rand() * Math.PI * 2,\n spin: (rand() - 0.5) * 0.6,\n drift: (rand() - 0.5) * 2,\n });\n }\n return out;\n}\n\n/** Opacity envelope over a particle's lifetime: quick fade-in, slow fade-out. */\nexport function particleOpacity(tt: number, lifetime: number): number {\n if (tt < 0 || tt > lifetime) return 0;\n const fadeIn = interpolate(tt, [0, 4], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n const fadeOut = interpolate(tt, [lifetime * 0.7, lifetime], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n return Math.min(fadeIn, fadeOut);\n}\n\n// --- Component -------------------------------------------------------------\n\nexport function Confetti({\n particleCount = 140,\n colors = DEFAULT_COLORS,\n originX = 0.5,\n originY = 0.5,\n startFrame = 0,\n lifetime = 90,\n power = 17,\n gravity = 0.45,\n size = 13,\n seed = 1,\n}: ConfettiProps) {\n const frame = useCurrentFrame();\n const { width, height } = useVideoConfig();\n\n const tt = frame - startFrame;\n if (tt < 0 || tt > lifetime) return null;\n\n const sc = height / 720;\n const ox = width * originX;\n const oy = height * originY;\n const particles = makeParticles({ count: particleCount, seed, colors });\n\n return (\n <AbsoluteFill style={{ pointerEvents: \"none\" }}>\n {particles.map((p, i) => {\n const opacity = particleOpacity(tt, lifetime);\n if (opacity <= 0) return null;\n\n const vx = Math.cos(p.angle) * p.speed * power + p.drift;\n const vy = Math.sin(p.angle) * p.speed * power;\n const x = ox + vx * tt * sc;\n const y = oy + (vy * tt + 0.5 * gravity * tt * tt) * sc;\n const rot = p.rot0 + p.spin * tt;\n const flutter = Math.cos(p.rot0 + p.spin * tt * 1.6);\n const w = size * p.size * sc;\n\n return (\n <div\n key={i}\n style={{\n position: \"absolute\",\n left: x,\n top: y,\n width: w,\n height: w * 0.62,\n borderRadius: 2,\n background: p.color,\n opacity,\n translate: \"-50% -50%\",\n rotate: `${rot}rad`,\n scale: `${flutter} 1`,\n }}\n />\n );\n })}\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/confetti.tsx"}diff --git a/registry-artifacts/crumple-toss.json b/registry-artifacts/crumple-toss.jsonindex 80c1075a..bceadee1 100644--- a/registry-artifacts/crumple-toss.json+++ b/registry-artifacts/crumple-toss.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/crumple-toss/index.tsx",- "content": "\"use client\";\n\nimport type React from \"react\";\nimport { useCurrentFrame } from \"remotion\";\nimport { DEFAULT_STEP, hashRange, qstep } from \"@/lib/remocn/stop-motion\";\n\nconst GRAVITY = 0.9;\nconst FLIGHT_SHRINK = 0.5;\nconst EXIT_OPACITY = 0.4;\n\nconst FOLD_TILT = 46;\nconst WAD_REACH = 0.27;\nconst WAD_SPREAD = 0.07;\nconst ANGLE_JITTER = 0.22;\nconst SCALE_SPREAD = 0.25;\nconst DEFAULT_RANDOMNESS = 0.6;\nconst DEFAULT_LAYERS = 2;\nconst LAYER_TILT_FLOOR = 0.45;\nconst FACET_SIZE = 0.5;\nconst FACET_CAP = 0.5;\n\nconst TONE_PATTERN = [0, 1, 3, 1, 0, 2, 1, 2, 0];\n\nconst TONES = [\n { lit: \"rgba(255,255,255,0.66)\", dark: \"rgba(255,255,255,0.18)\" },\n { lit: \"rgba(255,255,255,0.30)\", dark: \"rgba(38,36,44,0.10)\" },\n { lit: \"rgba(255,255,255,0.08)\", dark: \"rgba(38,36,44,0.20)\" },\n { lit: \"rgba(38,36,44,0.06)\", dark: \"rgba(38,36,44,0.30)\" },\n];\n\nconst LIGHT_ANGLE = -55;\nconst CREASE_BLEND = 9;\n\nexport type CrumplePhase = \"idle\" | \"crumple\" | \"toss\" | \"gone\";\n\nexport type CrumplePose = {\n phase: CrumplePhase;\n crush: number;\n scale: number;\n rotate: number;\n x: number;\n y: number;\n opacity: number;\n};\n\nexport type CrumpleSegment = {\n clip: [number, number][];\n origin: [number, number];\n dx: number;\n dy: number;\n scale: number;\n rotate: number;\n tone: number;\n crease: number;\n};\n\nexport type CrumpleTossTiming = {\n at: number;\n crumpleSteps?: number;\n tossSteps?: number;\n direction?: number;\n distance?: number;\n spin?: number;\n crushTo?: number;\n seed?: string;\n step?: number;\n};\n\nconst rayToEdge = (\n angle: number,\n halfWidth: number,\n halfHeight: number,\n): [number, number] => {\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n const t = Math.min(\n halfWidth / (Math.abs(cos) || 1e-9),\n halfHeight / (Math.abs(sin) || 1e-9),\n );\n return [cos * t, sin * t];\n};\n\nconst normalize = (angle: number) => {\n const turn = Math.PI * 2;\n return ((angle % turn) + turn) % turn;\n};\n\nconst shrinkToward = (\n [x, y]: [number, number],\n factor: number,\n): [number, number] => [x * factor, y * factor];\n\nconst averageOf = (points: [number, number][]): [number, number] => [\n points.reduce((sum, p) => sum + p[0], 0) / points.length,\n points.reduce((sum, p) => sum + p[1], 0) / points.length,\n];\n\nexport function crumpleSegments(args: {\n width: number;\n height: number;\n segments?: number;\n layers?: number;\n crushTo?: number;\n randomness?: number;\n seed?: string;\n}): CrumpleSegment[] {\n const count = Math.max(3, Math.round(args.segments ?? 9));\n const layers = Math.max(1, Math.round(args.layers ?? DEFAULT_LAYERS));\n const crushTo = args.crushTo ?? 0.34;\n const chaos = Math.min(1, Math.max(0, args.randomness ?? DEFAULT_RANDOMNESS));\n const seed = args.seed ?? \"toss\";\n const halfWidth = args.width / 2;\n const halfHeight = args.height / 2;\n const wad = Math.min(args.width, args.height) * crushTo;\n\n const angles = Array.from(\n { length: count },\n (_, i) =>\n (i / count) * Math.PI * 2 +\n hashRange(`${seed}:ang${i}`, -ANGLE_JITTER, ANGLE_JITTER) * chaos,\n );\n\n const corners: [number, number][] = [\n [halfWidth, halfHeight],\n [-halfWidth, halfHeight],\n [-halfWidth, -halfHeight],\n [halfWidth, -halfHeight],\n ];\n\n const toPercent = ([x, y]: [number, number]): [number, number] => [\n ((x + halfWidth) / args.width) * 100,\n ((y + halfHeight) / args.height) * 100,\n ];\n\n const panels: CrumpleSegment[] = [];\n\n angles.forEach((angle, i) => {\n const nextAngle =\n angles[(i + 1) % count] + (i === count - 1 ? Math.PI * 2 : 0);\n const from = rayToEdge(angle, halfWidth, halfHeight);\n const to = rayToEdge(nextAngle, halfWidth, halfHeight);\n\n const span = normalize(nextAngle - angle);\n const between = corners\n .map((corner): [[number, number], number] => [\n corner,\n normalize(Math.atan2(corner[1], corner[0]) - angle),\n ])\n .filter(([, spanned]) => spanned > 0 && spanned < span)\n .sort((a, b) => a[1] - b[1])\n .map(([corner]) => corner);\n\n const rim: [number, number][] = [from, ...between, to];\n\n for (let layer = 0; layer < layers; layer++) {\n const inner = layer / layers;\n const outer = (layer + 1) / layers;\n const depth = (layer + 1) / layers;\n const shape: [number, number][] =\n layer === 0\n ? [[0, 0], ...rim.map((point) => shrinkToward(point, outer))]\n : [\n ...rim.map((point) => shrinkToward(point, outer)),\n ...[...rim].reverse().map((point) => shrinkToward(point, inner)),\n ];\n\n const centroid = averageOf(shape);\n const extent =\n Math.max(\n ...shape.map((point) =>\n Math.hypot(point[0] - centroid[0], point[1] - centroid[1]),\n ),\n ) || 1;\n const key = `${seed}:${i}:${layer}`;\n\n const reach =\n wad *\n (WAD_REACH * depth +\n hashRange(`${key}:reach`, -WAD_SPREAD, WAD_SPREAD) * chaos * depth);\n const heading = Math.atan2(centroid[1], centroid[0]);\n\n panels.push({\n clip: shape.map(toPercent),\n origin: toPercent(centroid),\n dx: Math.cos(heading) * reach - centroid[0],\n dy: Math.sin(heading) * reach - centroid[1],\n scale:\n Math.min(FACET_CAP, (wad * FACET_SIZE) / extent) *\n (1 + hashRange(`${key}:size`, -SCALE_SPREAD, SCALE_SPREAD) * chaos),\n rotate:\n chaos === 0\n ? 0\n : hashRange(`${seed}:tilt${i}`, -FOLD_TILT, FOLD_TILT) *\n chaos *\n (LAYER_TILT_FLOOR + (1 - LAYER_TILT_FLOOR) * depth),\n tone: Math.min(\n TONES.length - 1,\n TONE_PATTERN[panels.length % TONE_PATTERN.length] +\n Math.ceil((1 - depth) * 2),\n ),\n crease: 0.5 + hashRange(`${key}:crease`, -0.2, 0.2) * chaos,\n });\n }\n });\n\n return panels;\n}\n\nexport function creaseShading(\n piece: Pick<CrumpleSegment, \"tone\" | \"rotate\" | \"crease\">,\n crush: number,\n): string {\n const tone = TONES[piece.tone];\n const fold = piece.crease * 100;\n const lit = Math.max(0, fold - CREASE_BLEND).toFixed(1);\n const dark = Math.min(100, fold + CREASE_BLEND).toFixed(1);\n const angle = (LIGHT_ANGLE - piece.rotate * crush).toFixed(1);\n return `linear-gradient(${angle}deg, ${tone.lit} 0%, ${tone.lit} ${lit}%, ${tone.dark} ${dark}%, ${tone.dark} 100%)`;\n}\n\nexport function crumpleTossLanding(options?: {\n direction?: number;\n distance?: number;\n}): { x: number; y: number } {\n const distance = options?.distance ?? 900;\n const radians = ((options?.direction ?? -35) * Math.PI) / 180;\n return {\n x: distance * Math.cos(radians),\n y: distance * Math.sin(radians) + GRAVITY * distance,\n };\n}\n\nexport function crumpleTossPose(\n args: CrumpleTossTiming & { frame: number },\n): CrumplePose {\n const crumpleSteps = args.crumpleSteps ?? 4;\n const tossSteps = args.tossSteps ?? 5;\n const direction = args.direction ?? -35;\n const distance = args.distance ?? 900;\n const spin = args.spin ?? 220;\n const step = args.step ?? DEFAULT_STEP;\n\n if (args.frame < args.at) {\n return {\n phase: \"idle\",\n crush: 0,\n scale: 1,\n rotate: 0,\n x: 0,\n y: 0,\n opacity: 1,\n };\n }\n\n const pose = qstep(args.frame - args.at, step);\n\n if (pose < crumpleSteps) {\n return {\n phase: \"crumple\",\n crush: (pose + 1) / crumpleSteps,\n scale: 1,\n rotate: 0,\n x: 0,\n y: 0,\n opacity: 1,\n };\n }\n\n if (pose < crumpleSteps + tossSteps) {\n const t = (pose - crumpleSteps + 1) / tossSteps;\n const radians = (direction * Math.PI) / 180;\n return {\n phase: \"toss\",\n crush: 1,\n scale: 1 - FLIGHT_SHRINK * t,\n rotate: spin * t,\n x: distance * Math.cos(radians) * t,\n y: distance * Math.sin(radians) * t + GRAVITY * distance * t * t,\n opacity: t === 1 ? EXIT_OPACITY : 1,\n };\n }\n\n return {\n phase: \"gone\",\n crush: 1,\n scale: 0,\n rotate: 0,\n x: 0,\n y: 0,\n opacity: 0,\n };\n}\n\nexport interface CrumpleTossProps extends CrumpleTossTiming {\n children: React.ReactNode;\n width: number;\n height: number;\n segments?: number;\n layers?: number;\n randomness?: number;\n}\n\nexport function CrumpleToss({\n children,\n width,\n height,\n segments,\n layers,\n randomness,\n ...timing\n}: CrumpleTossProps) {\n const frame = useCurrentFrame();\n const pose = crumpleTossPose({ frame, ...timing });\n if (pose.phase === \"gone\") return null;\n\n const pieces = crumpleSegments({\n width,\n height,\n segments,\n layers,\n randomness,\n crushTo: timing.crushTo,\n seed: timing.seed,\n });\n const c = pose.crush;\n\n return (\n <div\n style={{\n position: \"relative\",\n width,\n height,\n transformOrigin: \"center\",\n opacity: pose.opacity,\n transform: `translate(${pose.x}px, ${pose.y}px) rotate(${pose.rotate}deg) scale(${pose.scale})`,\n }}\n >\n {pieces.map((piece, i) => (\n <div\n key={`piece:${i}`}\n style={{\n position: \"absolute\",\n inset: 0,\n clipPath: `polygon(${piece.clip.map(([x, y]) => `${x}% ${y}%`).join(\", \")})`,\n transformOrigin: `${piece.origin[0]}% ${piece.origin[1]}%`,\n transform: `translate(${piece.dx * c}px, ${piece.dy * c}px) rotate(${piece.rotate * c}deg) scale(${1 + (piece.scale - 1) * c})`,\n filter:\n c > 0\n ? `drop-shadow(0 0 ${0.6 * c}px rgba(38,36,44,0.55))`\n : undefined,\n }}\n >\n <div style={{ position: \"absolute\", inset: 0 }}>{children}</div>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n background: creaseShading(piece, c),\n opacity: c,\n }}\n />\n </div>\n ))}\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport type React from \"react\";\nimport { useCurrentFrame } from \"remotion\";\nimport { DEFAULT_STEP, hashRange, qstep } from \"@/lib/remocn/stop-motion\";\n\nconst GRAVITY = 0.9;\nconst FLIGHT_SHRINK = 0.5;\nconst EXIT_OPACITY = 0.4;\n\nconst FOLD_TILT = 46;\nconst WAD_REACH = 0.27;\nconst WAD_SPREAD = 0.07;\nconst ANGLE_JITTER = 0.22;\nconst SCALE_SPREAD = 0.25;\nconst DEFAULT_RANDOMNESS = 0.6;\nconst DEFAULT_LAYERS = 2;\nconst LAYER_TILT_FLOOR = 0.45;\nconst FACET_SIZE = 0.5;\nconst FACET_CAP = 0.5;\n\nconst TONE_PATTERN = [0, 1, 3, 1, 0, 2, 1, 2, 0];\n\nconst TONES = [\n { lit: \"rgba(255,255,255,0.66)\", dark: \"rgba(255,255,255,0.18)\" },\n { lit: \"rgba(255,255,255,0.30)\", dark: \"rgba(38,36,44,0.10)\" },\n { lit: \"rgba(255,255,255,0.08)\", dark: \"rgba(38,36,44,0.20)\" },\n { lit: \"rgba(38,36,44,0.06)\", dark: \"rgba(38,36,44,0.30)\" },\n];\n\nconst LIGHT_ANGLE = -55;\nconst CREASE_BLEND = 9;\n\nexport type CrumplePhase = \"idle\" | \"crumple\" | \"toss\" | \"gone\";\n\nexport type CrumplePose = {\n phase: CrumplePhase;\n crush: number;\n scale: number;\n rotate: number;\n x: number;\n y: number;\n opacity: number;\n};\n\nexport type CrumpleSegment = {\n clip: [number, number][];\n origin: [number, number];\n dx: number;\n dy: number;\n scale: number;\n rotate: number;\n tone: number;\n crease: number;\n};\n\nexport type CrumpleTossTiming = {\n at: number;\n crumpleSteps?: number;\n tossSteps?: number;\n direction?: number;\n distance?: number;\n spin?: number;\n crushTo?: number;\n seed?: string;\n step?: number;\n};\n\nconst rayToEdge = (\n angle: number,\n halfWidth: number,\n halfHeight: number,\n): [number, number] => {\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n const t = Math.min(\n halfWidth / (Math.abs(cos) || 1e-9),\n halfHeight / (Math.abs(sin) || 1e-9),\n );\n return [cos * t, sin * t];\n};\n\nconst normalize = (angle: number) => {\n const turn = Math.PI * 2;\n return ((angle % turn) + turn) % turn;\n};\n\nconst shrinkToward = (\n [x, y]: [number, number],\n factor: number,\n): [number, number] => [x * factor, y * factor];\n\nconst averageOf = (points: [number, number][]): [number, number] => [\n points.reduce((sum, p) => sum + p[0], 0) / points.length,\n points.reduce((sum, p) => sum + p[1], 0) / points.length,\n];\n\nexport function crumpleSegments(args: {\n width: number;\n height: number;\n segments?: number;\n layers?: number;\n crushTo?: number;\n randomness?: number;\n seed?: string;\n}): CrumpleSegment[] {\n const count = Math.max(3, Math.round(args.segments ?? 9));\n const layers = Math.max(1, Math.round(args.layers ?? DEFAULT_LAYERS));\n const crushTo = args.crushTo ?? 0.34;\n const chaos = Math.min(1, Math.max(0, args.randomness ?? DEFAULT_RANDOMNESS));\n const seed = args.seed ?? \"toss\";\n const halfWidth = args.width / 2;\n const halfHeight = args.height / 2;\n const wad = Math.min(args.width, args.height) * crushTo;\n\n const angles = Array.from(\n { length: count },\n (_, i) =>\n (i / count) * Math.PI * 2 +\n hashRange(`${seed}:ang${i}`, -ANGLE_JITTER, ANGLE_JITTER) * chaos,\n );\n\n const corners: [number, number][] = [\n [halfWidth, halfHeight],\n [-halfWidth, halfHeight],\n [-halfWidth, -halfHeight],\n [halfWidth, -halfHeight],\n ];\n\n const toPercent = ([x, y]: [number, number]): [number, number] => [\n ((x + halfWidth) / args.width) * 100,\n ((y + halfHeight) / args.height) * 100,\n ];\n\n const panels: CrumpleSegment[] = [];\n\n angles.forEach((angle, i) => {\n const nextAngle =\n angles[(i + 1) % count] + (i === count - 1 ? Math.PI * 2 : 0);\n const from = rayToEdge(angle, halfWidth, halfHeight);\n const to = rayToEdge(nextAngle, halfWidth, halfHeight);\n\n const span = normalize(nextAngle - angle);\n const between = corners\n .map((corner): [[number, number], number] => [\n corner,\n normalize(Math.atan2(corner[1], corner[0]) - angle),\n ])\n .filter(([, spanned]) => spanned > 0 && spanned < span)\n .sort((a, b) => a[1] - b[1])\n .map(([corner]) => corner);\n\n const rim: [number, number][] = [from, ...between, to];\n\n for (let layer = 0; layer < layers; layer++) {\n const inner = layer / layers;\n const outer = (layer + 1) / layers;\n const depth = (layer + 1) / layers;\n const shape: [number, number][] =\n layer === 0\n ? [[0, 0], ...rim.map((point) => shrinkToward(point, outer))]\n : [\n ...rim.map((point) => shrinkToward(point, outer)),\n ...[...rim].reverse().map((point) => shrinkToward(point, inner)),\n ];\n\n const centroid = averageOf(shape);\n const extent =\n Math.max(\n ...shape.map((point) =>\n Math.hypot(point[0] - centroid[0], point[1] - centroid[1]),\n ),\n ) || 1;\n const key = `${seed}:${i}:${layer}`;\n\n const reach =\n wad *\n (WAD_REACH * depth +\n hashRange(`${key}:reach`, -WAD_SPREAD, WAD_SPREAD) * chaos * depth);\n const heading = Math.atan2(centroid[1], centroid[0]);\n\n panels.push({\n clip: shape.map(toPercent),\n origin: toPercent(centroid),\n dx: Math.cos(heading) * reach - centroid[0],\n dy: Math.sin(heading) * reach - centroid[1],\n scale:\n Math.min(FACET_CAP, (wad * FACET_SIZE) / extent) *\n (1 + hashRange(`${key}:size`, -SCALE_SPREAD, SCALE_SPREAD) * chaos),\n rotate:\n chaos === 0\n ? 0\n : hashRange(`${seed}:tilt${i}`, -FOLD_TILT, FOLD_TILT) *\n chaos *\n (LAYER_TILT_FLOOR + (1 - LAYER_TILT_FLOOR) * depth),\n tone: Math.min(\n TONES.length - 1,\n TONE_PATTERN[panels.length % TONE_PATTERN.length] +\n Math.ceil((1 - depth) * 2),\n ),\n crease: 0.5 + hashRange(`${key}:crease`, -0.2, 0.2) * chaos,\n });\n }\n });\n\n return panels;\n}\n\nexport function creaseShading(\n piece: Pick<CrumpleSegment, \"tone\" | \"rotate\" | \"crease\">,\n crush: number,\n): string {\n const tone = TONES[piece.tone];\n const fold = piece.crease * 100;\n const lit = Math.max(0, fold - CREASE_BLEND).toFixed(1);\n const dark = Math.min(100, fold + CREASE_BLEND).toFixed(1);\n const angle = (LIGHT_ANGLE - piece.rotate * crush).toFixed(1);\n return `linear-gradient(${angle}deg, ${tone.lit} 0%, ${tone.lit} ${lit}%, ${tone.dark} ${dark}%, ${tone.dark} 100%)`;\n}\n\nexport function crumpleTossLanding(options?: {\n direction?: number;\n distance?: number;\n}): { x: number; y: number } {\n const distance = options?.distance ?? 900;\n const radians = ((options?.direction ?? -35) * Math.PI) / 180;\n return {\n x: distance * Math.cos(radians),\n y: distance * Math.sin(radians) + GRAVITY * distance,\n };\n}\n\nexport function crumpleTossPose(\n args: CrumpleTossTiming & { frame: number },\n): CrumplePose {\n const crumpleSteps = args.crumpleSteps ?? 4;\n const tossSteps = args.tossSteps ?? 5;\n const direction = args.direction ?? -35;\n const distance = args.distance ?? 900;\n const spin = args.spin ?? 220;\n const step = args.step ?? DEFAULT_STEP;\n\n if (args.frame < args.at) {\n return {\n phase: \"idle\",\n crush: 0,\n scale: 1,\n rotate: 0,\n x: 0,\n y: 0,\n opacity: 1,\n };\n }\n\n const pose = qstep(args.frame - args.at, step);\n\n if (pose < crumpleSteps) {\n return {\n phase: \"crumple\",\n crush: (pose + 1) / crumpleSteps,\n scale: 1,\n rotate: 0,\n x: 0,\n y: 0,\n opacity: 1,\n };\n }\n\n if (pose < crumpleSteps + tossSteps) {\n const t = (pose - crumpleSteps + 1) / tossSteps;\n const radians = (direction * Math.PI) / 180;\n return {\n phase: \"toss\",\n crush: 1,\n scale: 1 - FLIGHT_SHRINK * t,\n rotate: spin * t,\n x: distance * Math.cos(radians) * t,\n y: distance * Math.sin(radians) * t + GRAVITY * distance * t * t,\n opacity: t === 1 ? EXIT_OPACITY : 1,\n };\n }\n\n return {\n phase: \"gone\",\n crush: 1,\n scale: 0,\n rotate: 0,\n x: 0,\n y: 0,\n opacity: 0,\n };\n}\n\nexport interface CrumpleTossProps extends CrumpleTossTiming {\n children: React.ReactNode;\n width: number;\n height: number;\n segments?: number;\n layers?: number;\n randomness?: number;\n}\n\nexport function CrumpleToss({\n children,\n width,\n height,\n segments,\n layers,\n randomness,\n ...timing\n}: CrumpleTossProps) {\n const frame = useCurrentFrame();\n const pose = crumpleTossPose({ frame, ...timing });\n if (pose.phase === \"gone\") return null;\n\n const pieces = crumpleSegments({\n width,\n height,\n segments,\n layers,\n randomness,\n crushTo: timing.crushTo,\n seed: timing.seed,\n });\n const c = pose.crush;\n\n return (\n <div\n style={{\n position: \"relative\",\n width,\n height,\n transformOrigin: \"center\",\n opacity: pose.opacity,\n translate: `${pose.x}px ${pose.y}px`,\n rotate: `${pose.rotate}deg`,\n scale: `${pose.scale}`,\n }}\n >\n {pieces.map((piece, i) => (\n <div\n key={`piece:${i}`}\n style={{\n position: \"absolute\",\n inset: 0,\n clipPath: `polygon(${piece.clip.map(([x, y]) => `${x}% ${y}%`).join(\", \")})`,\n transformOrigin: `${piece.origin[0]}% ${piece.origin[1]}%`,\n translate: `${piece.dx * c}px ${piece.dy * c}px`,\n rotate: `${piece.rotate * c}deg`,\n scale: `${1 + (piece.scale - 1) * c}`,\n filter:\n c > 0\n ? `drop-shadow(0 0 ${0.6 * c}px rgba(38,36,44,0.55))`\n : undefined,\n }}\n >\n <div style={{ position: \"absolute\", inset: 0 }}>{children}</div>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n background: creaseShading(piece, c),\n opacity: c,\n }}\n />\n </div>\n ))}\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/crumple-toss.tsx"}diff --git a/registry-artifacts/cursor.json b/registry-artifacts/cursor.jsonindex 9c91ef22..40cff81a 100644--- a/registry-artifacts/cursor.json+++ b/registry-artifacts/cursor.json@@ -14,7 +14,7 @@},{"path": "registry/remocn-ui/cursor/use-cursor-path.ts",- "content": "\"use client\";\n\nimport { useCurrentFrame } from \"remotion\";\nimport type { CursorStyle } from \"@/components/remocn/cursor\";\nimport { clamp01, type EasingName, easings } from \"@/lib/remocn-ui\";\n\nexport interface CursorWaypoint {\n at: number;\n x: number;\n y: number;\n duration?: number;\n click?: boolean;\n press?: boolean;\n easing?: EasingName;\n}\n\nexport const DEFAULT_DURATION = 24;\n\nexport const CLICK_FRAMES = 16;\n\nexport const PRESS_FRAMES = 8;\n\nexport interface CursorPathOptions {\n speed?: number;\n defaultDuration?: number;\n}\n\nfunction lerp(a: number, b: number, t: number): number {\n return a + (b - a) * t;\n}\n\nexport function ripplePhase(framesSinceClick: number): {\n rippleOpacity: number;\n rippleScale: number;\n} {\n if (framesSinceClick < 0 || framesSinceClick >= CLICK_FRAMES) {\n return { rippleOpacity: 0, rippleScale: 0 };\n }\n const p = clamp01(framesSinceClick / CLICK_FRAMES);\n return {\n rippleOpacity: 0.5 * (1 - p),\n rippleScale: 2.5 * easings.out(p),\n };\n}\n\nexport function clickPress(framesSinceClick: number): number {\n if (framesSinceClick < 0 || framesSinceClick >= PRESS_FRAMES) return 1;\n const half = PRESS_FRAMES / 2;\n const p =\n framesSinceClick < half\n ? framesSinceClick / half\n : 1 - (framesSinceClick - half) / half;\n return 1 - clamp01(p);\n}\n\nexport function useCursorPath(\n waypoints: CursorWaypoint[],\n opts: CursorPathOptions = {},\n): CursorStyle {\n const { speed = 1 } = opts;\n const raw = useCurrentFrame() * speed;\n return cursorPathAt(waypoints, raw, opts);\n}\n\nexport function cursorPathAt(\n waypoints: CursorWaypoint[],\n raw: number,\n opts: CursorPathOptions = {},\n): CursorStyle {\n const { defaultDuration = DEFAULT_DURATION } = opts;\n\n if (waypoints.length === 0) {\n return { x: 0, y: 0, scale: 1, rippleOpacity: 0, rippleScale: 0 };\n }\n\n const first = waypoints[0];\n\n if (raw <= first.at) {\n return {\n x: first.x,\n y: first.y,\n scale: 1,\n rippleOpacity: 0,\n rippleScale: 0,\n pressScale: 1,\n };\n }\n\n let toIndex = waypoints.length - 1;\n for (let i = 1; i < waypoints.length; i++) {\n if (waypoints[i].at > raw) {\n toIndex = i;\n break;\n }\n }\n const pastLast = raw >= waypoints[waypoints.length - 1].at;\n const to = pastLast ? waypoints[waypoints.length - 1] : waypoints[toIndex];\n const from = pastLast\n ? waypoints[waypoints.length - 1]\n : waypoints[toIndex - 1];\n\n const dur = to.duration ?? defaultDuration;\n const ease = easings[to.easing ?? \"inOut\"];\n const start = to.at - dur;\n const t = pastLast || dur <= 0 ? 1 : ease(clamp01((raw - start) / dur));\n const x = lerp(from.x, to.x, t);\n const y = lerp(from.y, to.y, t);\n\n let lastClickAt = -Infinity;\n for (const wp of waypoints) {\n if (wp.click && wp.at <= raw && wp.at > lastClickAt) lastClickAt = wp.at;\n }\n const sinceClick = lastClickAt === -Infinity ? -1 : raw - lastClickAt;\n const ripple = ripplePhase(sinceClick);\n const clickDip = clickPress(sinceClick);\n\n const holdWp = pastLast ? waypoints[waypoints.length - 1] : from;\n const heldPress = holdWp.press ? 0 : 1;\n\n const pressScale = Math.min(clickDip, heldPress);\n\n return {\n x,\n y,\n scale: 1,\n rippleOpacity: ripple.rippleOpacity,\n rippleScale: ripple.rippleScale,\n pressScale,\n };\n}\n",+ "content": "\"use client\";\n\nimport { useCurrentFrame } from \"remotion\";\nimport type { CursorStyle } from \"@/components/remocn/cursor\";\nimport { clamp01, type EasingName, easings } from \"@/lib/remocn-ui\";\n\nexport interface CursorWaypoint {\n at: number;\n x: number;\n y: number;\n duration?: number;\n click?: boolean;\n press?: boolean;\n easing?: EasingName;\n}\n\nexport const DEFAULT_DURATION = 24;\n\nexport const CLICK_FRAMES = 16;\n\nexport const PRESS_FRAMES = 8;\n\nexport interface CursorPathOptions {\n speed?: number;\n defaultDuration?: number;\n}\n\nfunction lerp(a: number, b: number, t: number): number {\n return a + (b - a) * t;\n}\n\nexport function ripplePhase(framesSinceClick: number): {\n rippleOpacity: number;\n rippleScale: number;\n} {\n if (framesSinceClick < 0 || framesSinceClick >= CLICK_FRAMES) {\n return { rippleOpacity: 0, rippleScale: 0 };\n }\n const p = clamp01(framesSinceClick / CLICK_FRAMES);\n return {\n rippleOpacity: 0.5 * (1 - p),\n rippleScale: 2.5 * easings.out(p),\n };\n}\n\nexport function clickPress(framesSinceClick: number): number {\n if (framesSinceClick < 0 || framesSinceClick >= PRESS_FRAMES) return 1;\n const half = PRESS_FRAMES / 2;\n const p =\n framesSinceClick < half\n ? framesSinceClick / half\n : 1 - (framesSinceClick - half) / half;\n return 1 - clamp01(p);\n}\n\nexport function useCursorPath(\n waypoints: CursorWaypoint[],\n opts: CursorPathOptions = {},\n): CursorStyle {\n const raw = useCurrentFrame();\n return cursorPathAt(waypoints, raw, opts);\n}\n\nexport function cursorPathAt(\n waypoints: CursorWaypoint[],\n raw: number,\n opts: CursorPathOptions = {},\n): CursorStyle {\n const { speed = 1, defaultDuration = DEFAULT_DURATION } = opts;\n const effectiveFrame = raw * speed;\n\n if (waypoints.length === 0) {\n return { x: 0, y: 0, scale: 1, rippleOpacity: 0, rippleScale: 0 };\n }\n\n const first = waypoints[0];\n\n if (effectiveFrame <= first.at) {\n return {\n x: first.x,\n y: first.y,\n scale: 1,\n rippleOpacity: 0,\n rippleScale: 0,\n pressScale: 1,\n };\n }\n\n let toIndex = waypoints.length - 1;\n for (let i = 1; i < waypoints.length; i++) {\n if (waypoints[i].at > effectiveFrame) {\n toIndex = i;\n break;\n }\n }\n const pastLast = effectiveFrame >= waypoints[waypoints.length - 1].at;\n const to = pastLast ? waypoints[waypoints.length - 1] : waypoints[toIndex];\n const from = pastLast\n ? waypoints[waypoints.length - 1]\n : waypoints[toIndex - 1];\n\n const dur = to.duration ?? defaultDuration;\n const ease = easings[to.easing ?? \"inOut\"];\n const start = to.at - dur;\n const t =\n pastLast || dur <= 0 ? 1 : ease(clamp01((effectiveFrame - start) / dur));\n const x = lerp(from.x, to.x, t);\n const y = lerp(from.y, to.y, t);\n\n let lastClickAt = -Infinity;\n for (const wp of waypoints) {\n if (wp.click && wp.at <= effectiveFrame && wp.at > lastClickAt)\n lastClickAt = wp.at;\n }\n const sinceClick =\n lastClickAt === -Infinity ? -1 : effectiveFrame - lastClickAt;\n const ripple = ripplePhase(sinceClick);\n const clickDip = clickPress(sinceClick);\n\n const holdWp = pastLast ? waypoints[waypoints.length - 1] : from;\n const heldPress = holdWp.press ? 0 : 1;\n\n const pressScale = Math.min(clickDip, heldPress);\n\n return {\n x,\n y,\n scale: 1,\n rippleOpacity: ripple.rippleOpacity,\n rippleScale: ripple.rippleScale,\n pressScale,\n };\n}\n","type": "registry:component","target": "components/remocn/use-cursor-path.ts"}diff --git a/registry-artifacts/displacement.json b/registry-artifacts/displacement.jsonindex b080e7cf..899350c0 100644--- a/registry-artifacts/displacement.json+++ b/registry-artifacts/displacement.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/displacement/index.tsx",- "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill } from \"remotion\";\nimport {\n makeCanvasPresentation,\n makeSceneShader,\n} from \"@/lib/remocn/canvas-presentation\";\n\nexport type DisplacementProps = {\n grid?: number;\n cellAspect?: number;\n shift?: number;\n aberration?: number;\n grain?: number;\n stagger?: number;\n};\n\nconst DEFAULTS = {\n grid: 60,\n cellAspect: 1,\n shift: 1,\n aberration: 1,\n grain: 0.5,\n stagger: 0.45,\n};\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_from;\nuniform sampler2D u_to;\nuniform float u_progress;\nuniform float u_aspect;\nuniform vec2 u_cells;\nuniform float u_shift;\nuniform float u_aberration;\nuniform float u_grain;\nuniform float u_stagger;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst float PI = 3.141592653589793;\n\nfloat hash(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);\n}\n\nvoid main() {\n vec2 cell = floor(v_uv * u_cells);\n float h1 = hash(cell);\n float h2 = hash(cell + 7.3);\n float h3 = hash(cell + 13.1);\n\n float delay = h3 * u_stagger;\n float phase =\n clamp((u_progress - delay) / max(1.0 - u_stagger, 0.1), 0.0, 1.0);\n float shear = sin(phase * PI);\n\n vec2 aim = vec2((h1 - 0.5) * 2.0, (h2 - 0.5) * 0.7);\n vec2 dir = aim / max(length(aim), 0.0001);\n vec2 slide = dir * shear * u_shift * 1.4;\n vec2 off = slide / u_cells;\n vec2 fringe = off * u_aberration * 0.35;\n\n float swap = smoothstep(0.34, 0.66, phase);\n\n vec4 mid = mix(\n texture(u_from, v_uv - off),\n texture(u_to, v_uv - off),\n swap\n );\n float red = mix(\n texture(u_from, v_uv - off - fringe).r,\n texture(u_to, v_uv - off - fringe).r,\n swap\n );\n float blue = mix(\n texture(u_from, v_uv - off + fringe).b,\n texture(u_to, v_uv - off + fringe).b,\n swap\n );\n\n vec4 col = vec4(red, mid.g, blue, mid.a);\n\n float tick = floor(u_progress * 30.0);\n float speck =\n hash(floor(v_uv * vec2(u_aspect, 1.0) * 460.0) + tick * 1.7) - 0.5;\n col.rgb += vec3(speck * u_grain * shear * 0.5) * col.a;\n col.rgb *= 1.0 - 0.12 * shear;\n\n outColor = col;\n}`;\n\nconst shader = makeSceneShader<DisplacementProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, width, height, passedProps }) => {\n const {\n grid = DEFAULTS.grid,\n cellAspect = DEFAULTS.cellAspect,\n shift = DEFAULTS.shift,\n aberration = DEFAULTS.aberration,\n grain = DEFAULTS.grain,\n stagger = DEFAULTS.stagger,\n } = passedProps;\n const across = Math.max(grid, 4);\n const ratio = Math.max(cellAspect, 0.25);\n gl.uniform2f(\n uniform(\"u_cells\"),\n across,\n Math.max((across * ratio * height) / width, 2),\n );\n gl.uniform1f(uniform(\"u_shift\"), shift);\n gl.uniform1f(uniform(\"u_aberration\"), aberration);\n gl.uniform1f(uniform(\"u_grain\"), grain);\n gl.uniform1f(uniform(\"u_stagger\"), Math.min(Math.max(stagger, 0), 0.85));\n },\n);\n\nconst DisplacementFallback: React.FC<\n TransitionPresentationComponentProps<DisplacementProps>\n> = ({ children, presentationProgress, presentationDirection }) => {\n const p = presentationProgress;\n const entering = presentationDirection === \"entering\";\n const t = entering ? p : 1 - p;\n const settle = Math.min(1, Math.max(0, (t - 0.3) / 0.4));\n const jolt = Math.max(0, Math.sin(t * Math.PI)) * 10;\n\n return (\n <AbsoluteFill\n style={{\n opacity: settle,\n transform: `translateX(${entering ? jolt : -jolt}px)`,\n }}\n >\n {children}\n </AbsoluteFill>\n );\n};\n\nconst presentation = makeCanvasPresentation<DisplacementProps>({\n shader,\n fallback: DisplacementFallback,\n});\n\nexport function displacement(\n props: DisplacementProps = {},\n): TransitionPresentation<DisplacementProps> {\n return presentation(props);\n}\n",+ "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill } from \"remotion\";\nimport {\n makeCanvasPresentation,\n makeSceneShader,\n} from \"@/lib/remocn/canvas-presentation\";\n\nexport type DisplacementProps = {\n grid?: number;\n cellAspect?: number;\n shift?: number;\n aberration?: number;\n grain?: number;\n stagger?: number;\n};\n\nconst DEFAULTS = {\n grid: 60,\n cellAspect: 1,\n shift: 1,\n aberration: 1,\n grain: 0.5,\n stagger: 0.45,\n};\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_from;\nuniform sampler2D u_to;\nuniform float u_progress;\nuniform float u_aspect;\nuniform vec2 u_cells;\nuniform float u_shift;\nuniform float u_aberration;\nuniform float u_grain;\nuniform float u_stagger;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst float PI = 3.141592653589793;\n\nfloat hash(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);\n}\n\nvoid main() {\n vec2 cell = floor(v_uv * u_cells);\n float h1 = hash(cell);\n float h2 = hash(cell + 7.3);\n float h3 = hash(cell + 13.1);\n\n float delay = h3 * u_stagger;\n float phase =\n clamp((u_progress - delay) / max(1.0 - u_stagger, 0.1), 0.0, 1.0);\n float shear = sin(phase * PI);\n\n vec2 aim = vec2((h1 - 0.5) * 2.0, (h2 - 0.5) * 0.7);\n vec2 dir = aim / max(length(aim), 0.0001);\n vec2 slide = dir * shear * u_shift * 1.4;\n vec2 off = slide / u_cells;\n vec2 fringe = off * u_aberration * 0.35;\n\n float swap = smoothstep(0.34, 0.66, phase);\n\n vec4 mid = mix(\n texture(u_from, v_uv - off),\n texture(u_to, v_uv - off),\n swap\n );\n float red = mix(\n texture(u_from, v_uv - off - fringe).r,\n texture(u_to, v_uv - off - fringe).r,\n swap\n );\n float blue = mix(\n texture(u_from, v_uv - off + fringe).b,\n texture(u_to, v_uv - off + fringe).b,\n swap\n );\n\n vec4 col = vec4(red, mid.g, blue, mid.a);\n\n float tick = floor(u_progress * 30.0);\n float speck =\n hash(floor(v_uv * vec2(u_aspect, 1.0) * 460.0) + tick * 1.7) - 0.5;\n col.rgb += vec3(speck * u_grain * shear * 0.5) * col.a;\n col.rgb *= 1.0 - 0.12 * shear;\n\n outColor = col;\n}`;\n\nconst shader = makeSceneShader<DisplacementProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, width, height, passedProps }) => {\n const {\n grid = DEFAULTS.grid,\n cellAspect = DEFAULTS.cellAspect,\n shift = DEFAULTS.shift,\n aberration = DEFAULTS.aberration,\n grain = DEFAULTS.grain,\n stagger = DEFAULTS.stagger,\n } = passedProps;\n const across = Math.max(grid, 4);\n const ratio = Math.max(cellAspect, 0.25);\n gl.uniform2f(\n uniform(\"u_cells\"),\n across,\n Math.max((across * ratio * height) / width, 2),\n );\n gl.uniform1f(uniform(\"u_shift\"), shift);\n gl.uniform1f(uniform(\"u_aberration\"), aberration);\n gl.uniform1f(uniform(\"u_grain\"), grain);\n gl.uniform1f(uniform(\"u_stagger\"), Math.min(Math.max(stagger, 0), 0.85));\n },\n);\n\nconst DisplacementFallback: React.FC<\n TransitionPresentationComponentProps<DisplacementProps>\n> = ({ children, presentationProgress, presentationDirection }) => {\n const p = presentationProgress;\n const entering = presentationDirection === \"entering\";\n const t = entering ? p : 1 - p;\n const settle = Math.min(1, Math.max(0, (t - 0.3) / 0.4));\n const jolt = Math.max(0, Math.sin(t * Math.PI)) * 10;\n\n return (\n <AbsoluteFill\n style={{\n opacity: settle,\n translate: `${entering ? jolt : -jolt}px`,\n }}\n >\n {children}\n </AbsoluteFill>\n );\n};\n\nconst presentation = makeCanvasPresentation<DisplacementProps>({\n shader,\n fallback: DisplacementFallback,\n});\n\nexport function displacement(\n props: DisplacementProps = {},\n): TransitionPresentation<DisplacementProps> {\n return presentation(props);\n}\n","type": "registry:component","target": "components/remocn/displacement.tsx"}diff --git a/registry-artifacts/drift.json b/registry-artifacts/drift.jsonindex 1a4ead4e..aa492227 100644--- a/registry-artifacts/drift.json+++ b/registry-artifacts/drift.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/drift/index.tsx",- "content": "\"use client\";\n\nimport type React from \"react\";\nimport {\n AbsoluteFill,\n interpolate,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nexport interface DriftProps {\n children: React.ReactNode;\n grow?: number;\n}\n\nexport function Drift({ children, grow = 0.035 }: DriftProps) {\n const frame = useCurrentFrame();\n const { durationInFrames } = useVideoConfig();\n const scale = interpolate(frame, [0, durationInFrames], [1, 1 + grow]);\n return (\n <AbsoluteFill style={{ transform: `scale(${scale})` }}>\n {children}\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport type React from \"react\";\nimport {\n AbsoluteFill,\n interpolate,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nexport interface DriftProps {\n children: React.ReactNode;\n grow?: number;\n}\n\nexport function Drift({ children, grow = 0.035 }: DriftProps) {\n const frame = useCurrentFrame();\n const { durationInFrames } = useVideoConfig();\n const scale = interpolate(frame, [0, durationInFrames], [1, 1 + grow]);\n return <AbsoluteFill style={{ scale: `${scale}` }}>{children}</AbsoluteFill>;\n}\n","type": "registry:component","target": "components/remocn/drift.tsx"}diff --git a/registry-artifacts/ecosystem-constellation.json b/registry-artifacts/ecosystem-constellation.jsonindex 9c97e315..6254a12a 100644--- a/registry-artifacts/ecosystem-constellation.json+++ b/registry-artifacts/ecosystem-constellation.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/ecosystem-constellation/index.tsx",- "content": "\"use client\";\n\nimport type { ComponentType } from \"react\";\nimport { interpolate, spring, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface EcosystemConstellationProps {\n satelliteCount?: number;\n centerLabel?: string;\n accentColor?: string;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\n// Inline brand mark components — stylized for demo identification, drawn from\n// primitive SVG shapes only so the component stays self-contained.\n\nfunction GitHubMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={30} height={30} aria-hidden=\"true\">\n <path\n fill=\"#fff\"\n d=\"M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.11.79-.25.79-.55v-2.06c-3.2.7-3.87-1.36-3.87-1.36-.52-1.33-1.27-1.69-1.27-1.69-1.04-.71.08-.7.08-.7 1.15.08 1.76 1.18 1.76 1.18 1.02 1.75 2.69 1.24 3.35.95.1-.74.4-1.24.72-1.53-2.55-.29-5.24-1.28-5.24-5.7 0-1.26.45-2.29 1.18-3.1-.12-.29-.51-1.46.11-3.05 0 0 .97-.31 3.18 1.18.92-.26 1.91-.39 2.89-.39s1.97.13 2.89.39c2.21-1.49 3.18-1.18 3.18-1.18.62 1.59.23 2.76.11 3.05.74.81 1.18 1.84 1.18 3.1 0 4.43-2.7 5.41-5.27 5.69.41.36.77 1.06.77 2.13v3.16c0 .31.21.67.8.55C20.21 21.39 23.5 17.08 23.5 12 23.5 5.65 18.35.5 12 .5z\"\n />\n </svg>\n );\n}\n\nfunction VercelMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={28} height={28} aria-hidden=\"true\">\n <path fill=\"#fff\" d=\"M12 2 L23 21 L1 21 Z\" />\n </svg>\n );\n}\n\nfunction StripeMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={28} height={28} aria-hidden=\"true\">\n <path\n fill=\"#fff\"\n d=\"M13.5 9.6c0-.6.5-.85 1.3-.85 1.15 0 2.6.35 3.75.97V6.16c-1.25-.5-2.5-.7-3.75-.7C11.7 5.46 9.6 7.06 9.6 9.7c0 4.13 5.7 3.47 5.7 5.25 0 .7-.6.93-1.45.93-1.25 0-2.85-.52-4.1-1.2v3.65c1.4.6 2.8.85 4.1.85 3.2 0 5.4-1.55 5.4-4.25-.02-4.45-5.75-3.65-5.75-5.33z\"\n />\n </svg>\n );\n}\n\nfunction SlackMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={26} height={26} aria-hidden=\"true\">\n <rect x=\"2\" y=\"10\" width=\"9\" height=\"2.5\" rx=\"1.25\" fill=\"#36C5F0\" />\n <rect x=\"13\" y=\"10\" width=\"9\" height=\"2.5\" rx=\"1.25\" fill=\"#2EB67D\" />\n <rect x=\"10\" y=\"2\" width=\"2.5\" height=\"9\" rx=\"1.25\" fill=\"#ECB22E\" />\n <rect x=\"10\" y=\"13\" width=\"2.5\" height=\"9\" rx=\"1.25\" fill=\"#E01E5A\" />\n </svg>\n );\n}\n\nfunction LinearMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={28} height={28} aria-hidden=\"true\">\n <defs>\n <linearGradient id=\"linear-grad\" x1=\"0\" x2=\"1\" y1=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor=\"#fff\" stopOpacity=\"0.95\" />\n <stop offset=\"100%\" stopColor=\"#fff\" stopOpacity=\"0.55\" />\n </linearGradient>\n </defs>\n <circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"url(#linear-grad)\" />\n <path\n d=\"M5 13 L11 19 M5 9 L15 19 M5 5 L19 19 M9 5 L19 15 M13 5 L19 11\"\n stroke=\"#0a0a0a\"\n strokeWidth=\"0.9\"\n strokeLinecap=\"round\"\n opacity=\"0.85\"\n />\n </svg>\n );\n}\n\nfunction FigmaMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={26} height={26} aria-hidden=\"true\">\n <circle cx=\"9\" cy=\"4\" r=\"3.5\" fill=\"#F24E1E\" />\n <circle cx=\"15\" cy=\"4\" r=\"3.5\" fill=\"#FF7262\" />\n <circle cx=\"9\" cy=\"11\" r=\"3.5\" fill=\"#A259FF\" />\n <circle cx=\"15\" cy=\"11\" r=\"3.5\" fill=\"#1ABCFE\" />\n <circle cx=\"9\" cy=\"18\" r=\"3.5\" fill=\"#0ACF83\" />\n </svg>\n );\n}\n\nfunction NotionMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={26} height={26} aria-hidden=\"true\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"3\" fill=\"#fff\" />\n <path\n d=\"M8 7 V17 M8 7 L16 17 M16 7 V17\"\n stroke=\"#0a0a0a\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n fill=\"none\"\n />\n </svg>\n );\n}\n\nfunction DiscordMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={28} height={28} aria-hidden=\"true\">\n <path\n fill=\"#fff\"\n d=\"M19.5 4.7A18 18 0 0 0 15 3.3l-.2.4a16.5 16.5 0 0 0-5.6 0L9 3.3a18 18 0 0 0-4.5 1.4C2 8.7 1.4 12.5 1.7 16.3a18 18 0 0 0 5.5 2.8l.4-.6a13 13 0 0 1-2-1l.5-.4a13 13 0 0 0 11.7 0l.5.4a13 13 0 0 1-2 1l.4.6a18 18 0 0 0 5.5-2.8c.4-4.4-.6-8.2-2.7-11.6zM8.5 14c-.9 0-1.7-.9-1.7-2s.8-2 1.7-2 1.7.9 1.7 2-.8 2-1.7 2zm7 0c-.9 0-1.7-.9-1.7-2s.8-2 1.7-2 1.7.9 1.7 2-.8 2-1.7 2z\"\n />\n </svg>\n );\n}\n\ninterface SatelliteBrand {\n Logo: ComponentType;\n bg: string;\n}\n\nconst SATELLITE_BRANDS: SatelliteBrand[] = [\n { Logo: GitHubMark, bg: \"#1f1f23\" },\n { Logo: VercelMark, bg: \"#0a0a0a\" },\n { Logo: StripeMark, bg: \"#635bff\" },\n { Logo: SlackMark, bg: \"#1a1d21\" },\n { Logo: LinearMark, bg: \"#5e6ad2\" },\n { Logo: FigmaMark, bg: \"#1e1e1e\" },\n { Logo: NotionMark, bg: \"#1a1a1a\" },\n { Logo: DiscordMark, bg: \"#5865f2\" },\n];\n\nexport function EcosystemConstellation({\n satelliteCount = 6,\n centerLabel = \"V\",\n accentColor = \"#a855f7\",\n speed = 1,\n className,\n}: EcosystemConstellationProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const count = Math.max(\n 3,\n Math.min(SATELLITE_BRANDS.length, Math.floor(satelliteCount)),\n );\n\n // Center pulse (0..1)\n const pulse = (Math.sin(frame / 12) + 1) / 2;\n const centerScale = 1 + pulse * 0.06;\n\n // Geometry\n const cx = 640;\n const cy = 360;\n const baseRadiusX = 230;\n const baseRadiusY = 180;\n const offscreenRadius = 1200; // 150% of width\n\n // Per-satellite assembly spring (staggered)\n const satellites = Array.from({ length: count }).map((_, i) => {\n const stagger = i * 4;\n const sp = spring({\n frame: frame - stagger,\n fps,\n config: { mass: 1.1, damping: 16, stiffness: 70 },\n durationInFrames: 50,\n });\n const radiusFactor = interpolate(sp, [0, 1], [offscreenRadius, 1]);\n\n // Slight elliptical variation per satellite\n const orbitOffset = i * 22;\n const rX = baseRadiusX + orbitOffset;\n const rY = baseRadiusY + orbitOffset * 0.7;\n // Different angular speed per orbit (slower for outer)\n const angularSpeed = 0.012 - i * 0.0008;\n const baseAngle = (i / count) * Math.PI * 2;\n const angle = baseAngle + frame * angularSpeed;\n\n // Use radiusFactor as a multiplier on the orbit radius\n const x = cx + Math.cos(angle) * rX * radiusFactor;\n const y = cy + Math.sin(angle) * rY * radiusFactor;\n\n // Data pulse: which satellite is currently \"firing\"\n const activeIdx = Math.floor(frame / 30) % count;\n const isActive = activeIdx === i;\n // Within the active 30-frame window, fade the line in/out\n const localFrame = frame - Math.floor(frame / 30) * 30;\n const lineOpacity = isActive\n ? interpolate(localFrame, [0, 8, 22, 30], [0.15, 0.9, 0.9, 0.15], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : 0.15;\n const satScale = isActive\n ? interpolate(localFrame, [0, 8, 22, 30], [1, 1.1, 1.1, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : 1;\n\n const brand = SATELLITE_BRANDS[i % SATELLITE_BRANDS.length];\n return {\n x,\n y,\n Logo: brand.Logo,\n color: brand.bg,\n lineOpacity,\n satScale,\n visible: sp > 0.02,\n };\n });\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n overflow: \"hidden\",\n background: \"transparent\",\n fontFamily: FONT_FAMILY,\n }}\n >\n <svg\n width=\"100%\"\n height=\"100%\"\n viewBox=\"0 0 1280 720\"\n style={{ position: \"absolute\", inset: 0 }}\n >\n {/* Connection lines */}\n {satellites.map((s, i) => (\n <line\n key={`line-${i}`}\n x1={cx}\n y1={cy}\n x2={s.x}\n y2={s.y}\n stroke={accentColor}\n strokeWidth={2}\n strokeLinecap=\"round\"\n opacity={s.visible ? s.lineOpacity : 0}\n />\n ))}\n\n {/* Center glow */}\n <circle\n cx={cx}\n cy={cy}\n r={70 + pulse * 8}\n fill={accentColor}\n opacity={0.12}\n />\n <circle\n cx={cx}\n cy={cy}\n r={50 + pulse * 4}\n fill={accentColor}\n opacity={0.2}\n />\n </svg>\n\n {/* Center logo */}\n <div\n style={{\n position: \"absolute\",\n left: cx,\n top: cy,\n width: 96,\n height: 96,\n marginLeft: -48,\n marginTop: -48,\n borderRadius: 24,\n background: `linear-gradient(180deg, ${accentColor} 0%, ${accentColor}cc 100%)`,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: \"white\",\n fontWeight: 800,\n fontSize: 52,\n letterSpacing: \"-0.05em\",\n transform: `scale(${centerScale})`,\n boxShadow: `0 0 60px ${accentColor}66, inset 0 1px 0 rgba(255,255,255,0.3)`,\n border: \"1px solid rgba(255,255,255,0.15)\",\n }}\n >\n {centerLabel}\n </div>\n\n {/* Satellites */}\n {satellites.map((s, i) => {\n const Logo = s.Logo;\n return (\n <div\n key={`sat-${i}`}\n style={{\n position: \"absolute\",\n left: s.x,\n top: s.y,\n width: 56,\n height: 56,\n marginLeft: -28,\n marginTop: -28,\n borderRadius: 14,\n background: `linear-gradient(180deg, ${s.color} 0%, ${s.color}dd 100%)`,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n transform: `scale(${s.satScale})`,\n boxShadow: `0 8px 30px ${s.color}66, inset 0 1px 0 rgba(255,255,255,0.18)`,\n border: \"1px solid rgba(255,255,255,0.12)\",\n opacity: s.visible ? 1 : 0,\n willChange: \"transform\",\n }}\n >\n <Logo />\n </div>\n );\n })}\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport type { ComponentType } from \"react\";\nimport { interpolate, spring, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface EcosystemConstellationProps {\n satelliteCount?: number;\n centerLabel?: string;\n accentColor?: string;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\n// Inline brand mark components — stylized for demo identification, drawn from\n// primitive SVG shapes only so the component stays self-contained.\n\nfunction GitHubMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={30} height={30} aria-hidden=\"true\">\n <path\n fill=\"#fff\"\n d=\"M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.11.79-.25.79-.55v-2.06c-3.2.7-3.87-1.36-3.87-1.36-.52-1.33-1.27-1.69-1.27-1.69-1.04-.71.08-.7.08-.7 1.15.08 1.76 1.18 1.76 1.18 1.02 1.75 2.69 1.24 3.35.95.1-.74.4-1.24.72-1.53-2.55-.29-5.24-1.28-5.24-5.7 0-1.26.45-2.29 1.18-3.1-.12-.29-.51-1.46.11-3.05 0 0 .97-.31 3.18 1.18.92-.26 1.91-.39 2.89-.39s1.97.13 2.89.39c2.21-1.49 3.18-1.18 3.18-1.18.62 1.59.23 2.76.11 3.05.74.81 1.18 1.84 1.18 3.1 0 4.43-2.7 5.41-5.27 5.69.41.36.77 1.06.77 2.13v3.16c0 .31.21.67.8.55C20.21 21.39 23.5 17.08 23.5 12 23.5 5.65 18.35.5 12 .5z\"\n />\n </svg>\n );\n}\n\nfunction VercelMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={28} height={28} aria-hidden=\"true\">\n <path fill=\"#fff\" d=\"M12 2 L23 21 L1 21 Z\" />\n </svg>\n );\n}\n\nfunction StripeMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={28} height={28} aria-hidden=\"true\">\n <path\n fill=\"#fff\"\n d=\"M13.5 9.6c0-.6.5-.85 1.3-.85 1.15 0 2.6.35 3.75.97V6.16c-1.25-.5-2.5-.7-3.75-.7C11.7 5.46 9.6 7.06 9.6 9.7c0 4.13 5.7 3.47 5.7 5.25 0 .7-.6.93-1.45.93-1.25 0-2.85-.52-4.1-1.2v3.65c1.4.6 2.8.85 4.1.85 3.2 0 5.4-1.55 5.4-4.25-.02-4.45-5.75-3.65-5.75-5.33z\"\n />\n </svg>\n );\n}\n\nfunction SlackMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={26} height={26} aria-hidden=\"true\">\n <rect x=\"2\" y=\"10\" width=\"9\" height=\"2.5\" rx=\"1.25\" fill=\"#36C5F0\" />\n <rect x=\"13\" y=\"10\" width=\"9\" height=\"2.5\" rx=\"1.25\" fill=\"#2EB67D\" />\n <rect x=\"10\" y=\"2\" width=\"2.5\" height=\"9\" rx=\"1.25\" fill=\"#ECB22E\" />\n <rect x=\"10\" y=\"13\" width=\"2.5\" height=\"9\" rx=\"1.25\" fill=\"#E01E5A\" />\n </svg>\n );\n}\n\nfunction LinearMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={28} height={28} aria-hidden=\"true\">\n <defs>\n <linearGradient id=\"linear-grad\" x1=\"0\" x2=\"1\" y1=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor=\"#fff\" stopOpacity=\"0.95\" />\n <stop offset=\"100%\" stopColor=\"#fff\" stopOpacity=\"0.55\" />\n </linearGradient>\n </defs>\n <circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"url(#linear-grad)\" />\n <path\n d=\"M5 13 L11 19 M5 9 L15 19 M5 5 L19 19 M9 5 L19 15 M13 5 L19 11\"\n stroke=\"#0a0a0a\"\n strokeWidth=\"0.9\"\n strokeLinecap=\"round\"\n opacity=\"0.85\"\n />\n </svg>\n );\n}\n\nfunction FigmaMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={26} height={26} aria-hidden=\"true\">\n <circle cx=\"9\" cy=\"4\" r=\"3.5\" fill=\"#F24E1E\" />\n <circle cx=\"15\" cy=\"4\" r=\"3.5\" fill=\"#FF7262\" />\n <circle cx=\"9\" cy=\"11\" r=\"3.5\" fill=\"#A259FF\" />\n <circle cx=\"15\" cy=\"11\" r=\"3.5\" fill=\"#1ABCFE\" />\n <circle cx=\"9\" cy=\"18\" r=\"3.5\" fill=\"#0ACF83\" />\n </svg>\n );\n}\n\nfunction NotionMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={26} height={26} aria-hidden=\"true\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"3\" fill=\"#fff\" />\n <path\n d=\"M8 7 V17 M8 7 L16 17 M16 7 V17\"\n stroke=\"#0a0a0a\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n fill=\"none\"\n />\n </svg>\n );\n}\n\nfunction DiscordMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={28} height={28} aria-hidden=\"true\">\n <path\n fill=\"#fff\"\n d=\"M19.5 4.7A18 18 0 0 0 15 3.3l-.2.4a16.5 16.5 0 0 0-5.6 0L9 3.3a18 18 0 0 0-4.5 1.4C2 8.7 1.4 12.5 1.7 16.3a18 18 0 0 0 5.5 2.8l.4-.6a13 13 0 0 1-2-1l.5-.4a13 13 0 0 0 11.7 0l.5.4a13 13 0 0 1-2 1l.4.6a18 18 0 0 0 5.5-2.8c.4-4.4-.6-8.2-2.7-11.6zM8.5 14c-.9 0-1.7-.9-1.7-2s.8-2 1.7-2 1.7.9 1.7 2-.8 2-1.7 2zm7 0c-.9 0-1.7-.9-1.7-2s.8-2 1.7-2 1.7.9 1.7 2-.8 2-1.7 2z\"\n />\n </svg>\n );\n}\n\ninterface SatelliteBrand {\n Logo: ComponentType;\n bg: string;\n}\n\nconst SATELLITE_BRANDS: SatelliteBrand[] = [\n { Logo: GitHubMark, bg: \"#1f1f23\" },\n { Logo: VercelMark, bg: \"#0a0a0a\" },\n { Logo: StripeMark, bg: \"#635bff\" },\n { Logo: SlackMark, bg: \"#1a1d21\" },\n { Logo: LinearMark, bg: \"#5e6ad2\" },\n { Logo: FigmaMark, bg: \"#1e1e1e\" },\n { Logo: NotionMark, bg: \"#1a1a1a\" },\n { Logo: DiscordMark, bg: \"#5865f2\" },\n];\n\nexport function EcosystemConstellation({\n satelliteCount = 6,\n centerLabel = \"V\",\n accentColor = \"#a855f7\",\n speed = 1,\n className,\n}: EcosystemConstellationProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const count = Math.max(\n 3,\n Math.min(SATELLITE_BRANDS.length, Math.floor(satelliteCount)),\n );\n\n // Center pulse (0..1)\n const pulse = (Math.sin(frame / 12) + 1) / 2;\n const centerScale = 1 + pulse * 0.06;\n\n // Geometry\n const cx = 640;\n const cy = 360;\n const baseRadiusX = 230;\n const baseRadiusY = 180;\n const offscreenRadius = 1200; // 150% of width\n\n // Per-satellite assembly spring (staggered)\n const satellites = Array.from({ length: count }).map((_, i) => {\n const stagger = i * 4;\n const sp = spring({\n frame: frame - stagger,\n fps,\n config: { mass: 1.1, damping: 16, stiffness: 70 },\n durationInFrames: 50,\n });\n const radiusFactor = interpolate(sp, [0, 1], [offscreenRadius, 1]);\n\n // Slight elliptical variation per satellite\n const orbitOffset = i * 22;\n const rX = baseRadiusX + orbitOffset;\n const rY = baseRadiusY + orbitOffset * 0.7;\n // Different angular speed per orbit (slower for outer)\n const angularSpeed = 0.012 - i * 0.0008;\n const baseAngle = (i / count) * Math.PI * 2;\n const angle = baseAngle + frame * angularSpeed;\n\n // Use radiusFactor as a multiplier on the orbit radius\n const x = cx + Math.cos(angle) * rX * radiusFactor;\n const y = cy + Math.sin(angle) * rY * radiusFactor;\n\n // Data pulse: which satellite is currently \"firing\"\n const activeIdx = Math.floor(frame / 30) % count;\n const isActive = activeIdx === i;\n // Within the active 30-frame window, fade the line in/out\n const localFrame = frame - Math.floor(frame / 30) * 30;\n const lineOpacity = isActive\n ? interpolate(localFrame, [0, 8, 22, 30], [0.15, 0.9, 0.9, 0.15], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : 0.15;\n const satScale = isActive\n ? interpolate(localFrame, [0, 8, 22, 30], [1, 1.1, 1.1, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : 1;\n\n const brand = SATELLITE_BRANDS[i % SATELLITE_BRANDS.length];\n return {\n x,\n y,\n Logo: brand.Logo,\n color: brand.bg,\n lineOpacity,\n satScale,\n visible: sp > 0.02,\n };\n });\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n overflow: \"hidden\",\n background: \"transparent\",\n fontFamily: FONT_FAMILY,\n }}\n >\n <svg\n width=\"100%\"\n height=\"100%\"\n viewBox=\"0 0 1280 720\"\n style={{ position: \"absolute\", inset: 0 }}\n >\n {/* Connection lines */}\n {satellites.map((s, i) => (\n <line\n key={`line-${i}`}\n x1={cx}\n y1={cy}\n x2={s.x}\n y2={s.y}\n stroke={accentColor}\n strokeWidth={2}\n strokeLinecap=\"round\"\n opacity={s.visible ? s.lineOpacity : 0}\n />\n ))}\n\n {/* Center glow */}\n <circle\n cx={cx}\n cy={cy}\n r={70 + pulse * 8}\n fill={accentColor}\n opacity={0.12}\n />\n <circle\n cx={cx}\n cy={cy}\n r={50 + pulse * 4}\n fill={accentColor}\n opacity={0.2}\n />\n </svg>\n\n {/* Center logo */}\n <div\n style={{\n position: \"absolute\",\n left: cx,\n top: cy,\n width: 96,\n height: 96,\n marginLeft: -48,\n marginTop: -48,\n borderRadius: 24,\n background: `linear-gradient(180deg, ${accentColor} 0%, ${accentColor}cc 100%)`,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: \"white\",\n fontWeight: 800,\n fontSize: 52,\n letterSpacing: \"-0.05em\",\n scale: `${centerScale}`,\n boxShadow: `0 0 60px ${accentColor}66, inset 0 1px 0 rgba(255,255,255,0.3)`,\n border: \"1px solid rgba(255,255,255,0.15)\",\n }}\n >\n {centerLabel}\n </div>\n\n {/* Satellites */}\n {satellites.map((s, i) => {\n const Logo = s.Logo;\n return (\n <div\n key={`sat-${i}`}\n style={{\n position: \"absolute\",\n left: s.x,\n top: s.y,\n width: 56,\n height: 56,\n marginLeft: -28,\n marginTop: -28,\n borderRadius: 14,\n background: `linear-gradient(180deg, ${s.color} 0%, ${s.color}dd 100%)`,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n scale: `${s.satScale}`,\n boxShadow: `0 8px 30px ${s.color}66, inset 0 1px 0 rgba(255,255,255,0.18)`,\n border: \"1px solid rgba(255,255,255,0.12)\",\n opacity: s.visible ? 1 : 0,\n willChange: \"transform\",\n }}\n >\n <Logo />\n </div>\n );\n })}\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/ecosystem-constellation.tsx"}diff --git a/registry-artifacts/elements/animated-bar-chart.json b/registry-artifacts/elements/animated-bar-chart.jsonnew file mode 100644index 00000000..02dce19f--- /dev/null+++ b/registry-artifacts/elements/animated-bar-chart.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 1000,+ "height": 500+ },+ "displayName": "Animated Bar Chart",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "animated-bar-chart",+ "sourceCode": "import { Interactive, Sequence, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface AnimatedBarChartProps {\n data?: number[];\n labels?: string[];\n width?: number;\n height?: number;\n barColor?: string;\n gap?: number;\n staggerFrames?: number;\n speed?: number;\n className?: string;\n}\n\nfunction AnimatedBarChartBase({\n data = [35, 60, 45, 80, 55, 70, 90, 65],\n labels,\n width = 1000,\n height = 500,\n barColor = \"#0ea5e9\",\n gap = 16,\n staggerFrames = 6,\n speed = 1,\n className,\n}: AnimatedBarChartProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const padding = 60;\n const labelSpace = labels ? 40 : 0;\n const innerWidth = width - padding * 2;\n const innerHeight = height - padding * 2 - labelSpace;\n const max = Math.max(...data);\n const barWidth = (innerWidth - gap * (data.length - 1)) / data.length;\n const baseY = padding + innerHeight;\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n <svg width={width} height={height} viewBox={`0 0 ${width} ${height}`}>\n {/* Baseline */}\n <line\n x1={padding}\n x2={padding + innerWidth}\n y1={baseY}\n y2={baseY}\n stroke=\"#27272a\"\n strokeWidth={2}\n />\n\n {data.map((value, index) => {\n const targetHeight = (value / max) * innerHeight;\n const x = padding + index * (barWidth + gap);\n const y = baseY - targetHeight;\n\n const scaleY = spring({\n frame: frame - index * staggerFrames,\n fps,\n config: { damping: 12, stiffness: 100, mass: 0.8 },\n from: 0,\n to: 1,\n });\n\n return (\n <g key={index}>\n <rect\n x={x}\n y={y}\n width={barWidth}\n height={targetHeight}\n rx={6}\n fill={barColor}\n style={{\n scale: `1 ${scaleY}`,\n transformOrigin: `${x + barWidth / 2}px ${baseY}px`,\n transformBox: \"fill-box\",\n filter: `drop-shadow(0 4px 16px ${barColor}55)`,\n }}\n />\n {labels?.[index] && (\n <text\n x={x + barWidth / 2}\n y={baseY + 28}\n fill=\"#a1a1aa\"\n fontSize={16}\n textAnchor=\"middle\"\n style={{\n opacity: scaleY,\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {labels[index]}\n </text>\n )}\n </g>\n );\n })}\n </svg>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n barColor: {\n type: \"color\",\n default: \"#0ea5e9\",\n description: \"Bar color\",\n },\n gap: {\n type: \"number\",\n min: 0,\n max: 80,\n step: 2,\n default: 16,\n description: \"Gap\",\n hiddenFromList: false,\n },\n staggerFrames: {\n type: \"number\",\n min: 0,\n max: 30,\n step: 1,\n default: 6,\n description: \"Stagger frames\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 1000,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 500,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"barColor\",\"gap\",\"staggerFrames\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n barColor: \"#0ea5e9\",\n gap: 16,\n staggerFrames: 6,\n speed: 1,\n};\n\ntype AnimatedBarChartElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof AnimatedBarChartBase>;\n\nconst AnimatedBarChartInner = forwardRef<\n HTMLDivElement,\n AnimatedBarChartElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 1000, height = 500, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<AnimatedBarChart>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <AnimatedBarChartBase\n {...(componentProps as unknown as ComponentProps<typeof AnimatedBarChartBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const AnimatedBarChart = Interactive.withSchema({\n Component: AnimatedBarChartInner,\n componentName: \"<AnimatedBarChart>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/animated-line-chart.json b/registry-artifacts/elements/animated-line-chart.jsonnew file mode 100644index 00000000..6bc8e631--- /dev/null+++ b/registry-artifacts/elements/animated-line-chart.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 1000,+ "height": 500+ },+ "displayName": "Animated Line Chart",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "animated-line-chart",+ "sourceCode": "import { Interactive, Sequence, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface AnimatedLineChartProps {\n data?: number[];\n width?: number;\n height?: number;\n strokeColor?: string;\n strokeWidth?: number;\n gridColor?: string;\n showDot?: boolean;\n speed?: number;\n className?: string;\n}\n\nfunction AnimatedLineChartBase({\n data = [12, 19, 8, 15, 22, 18, 28, 25, 32],\n width = 1000,\n height = 500,\n strokeColor = \"#22c55e\",\n strokeWidth = 4,\n gridColor = \"#27272a\",\n showDot = true,\n speed = 1,\n className,\n}: AnimatedLineChartProps) {\n const frame = useCurrentFrame() * speed;\n const { fps, durationInFrames } = useVideoConfig();\n\n const padding = 60;\n const innerWidth = width - padding * 2;\n const innerHeight = height - padding * 2;\n\n const min = Math.min(...data);\n const max = Math.max(...data);\n const range = max - min || 1;\n\n const points = data.map((value, index) => {\n const x = padding + (index / (data.length - 1)) * innerWidth;\n const y = padding + innerHeight - ((value - min) / range) * innerHeight;\n return { x, y };\n });\n\n // Analytical path length: sum of segment distances\n let pathLength = 0;\n for (let i = 1; i < points.length; i++) {\n const dx = points[i].x - points[i - 1].x;\n const dy = points[i].y - points[i - 1].y;\n pathLength += Math.sqrt(dx * dx + dy * dy);\n }\n\n const d = points\n .map((p, i) => `${i === 0 ? \"M\" : \"L\"}${p.x.toFixed(2)},${p.y.toFixed(2)}`)\n .join(\" \");\n\n // Spring-driven progress: smooth, no bounce. Matches the \"smooth\" preset\n // from remotion-best-practices/timing.md.\n const progress = spring({\n frame,\n fps,\n durationInFrames: Math.round(durationInFrames * 0.85),\n config: { damping: 200 },\n });\n\n const dashOffset = pathLength * (1 - progress);\n\n // Find dot position along the path at current progress\n const targetLen = pathLength * progress;\n let traveled = 0;\n let dotX = points[0].x;\n let dotY = points[0].y;\n for (let i = 1; i < points.length; i++) {\n const dx = points[i].x - points[i - 1].x;\n const dy = points[i].y - points[i - 1].y;\n const segLen = Math.sqrt(dx * dx + dy * dy);\n if (traveled + segLen >= targetLen) {\n const t = (targetLen - traveled) / segLen;\n dotX = points[i - 1].x + dx * t;\n dotY = points[i - 1].y + dy * t;\n break;\n }\n traveled += segLen;\n dotX = points[i].x;\n dotY = points[i].y;\n }\n\n const gridRows = 4;\n const gridCols = data.length - 1;\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n <svg\n width={width}\n height={height}\n viewBox={`0 0 ${width} ${height}`}\n style={{ overflow: \"visible\" }}\n >\n {/* Horizontal grid */}\n {Array.from({ length: gridRows + 1 }).map((_, i) => {\n const y = padding + (i / gridRows) * innerHeight;\n return (\n <line\n key={`h-${i}`}\n x1={padding}\n x2={padding + innerWidth}\n y1={y}\n y2={y}\n stroke={gridColor}\n strokeWidth={1}\n />\n );\n })}\n {/* Vertical grid */}\n {Array.from({ length: gridCols + 1 }).map((_, i) => {\n const x = padding + (i / gridCols) * innerWidth;\n return (\n <line\n key={`v-${i}`}\n x1={x}\n x2={x}\n y1={padding}\n y2={padding + innerHeight}\n stroke={gridColor}\n strokeWidth={1}\n />\n );\n })}\n {/* Axis */}\n <line\n x1={padding}\n x2={padding}\n y1={padding}\n y2={padding + innerHeight}\n stroke={gridColor}\n strokeWidth={2}\n />\n <line\n x1={padding}\n x2={padding + innerWidth}\n y1={padding + innerHeight}\n y2={padding + innerHeight}\n stroke={gridColor}\n strokeWidth={2}\n />\n\n {/* Animated line */}\n <path\n d={d}\n fill=\"none\"\n stroke={strokeColor}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeDasharray={pathLength}\n strokeDashoffset={dashOffset}\n style={{\n filter: `drop-shadow(0 0 12px ${strokeColor}55)`,\n }}\n />\n\n {showDot && progress > 0 && progress < 1 && (\n <circle\n cx={dotX}\n cy={dotY}\n r={strokeWidth * 2}\n fill={strokeColor}\n style={{\n filter: `drop-shadow(0 0 8px ${strokeColor})`,\n }}\n />\n )}\n </svg>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n strokeColor: {\n type: \"color\",\n default: \"#22c55e\",\n description: \"Stroke color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 16,\n step: 1,\n default: 4,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n gridColor: {\n type: \"color\",\n default: \"#27272a\",\n description: \"Grid color\",\n },\n showDot: {\n type: \"boolean\",\n default: true,\n description: \"Show leading dot\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 1000,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 500,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"strokeColor\",\"strokeWidth\",\"gridColor\",\"showDot\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n strokeColor: \"#22c55e\",\n strokeWidth: 4,\n gridColor: \"#27272a\",\n showDot: true,\n speed: 1,\n};\n\ntype AnimatedLineChartElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof AnimatedLineChartBase>;\n\nconst AnimatedLineChartInner = forwardRef<\n HTMLDivElement,\n AnimatedLineChartElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 1000, height = 500, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<AnimatedLineChart>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <AnimatedLineChartBase\n {...(componentProps as unknown as ComponentProps<typeof AnimatedLineChartBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const AnimatedLineChart = Interactive.withSchema({\n Component: AnimatedLineChartInner,\n componentName: \"<AnimatedLineChart>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/ascii-render.json b/registry-artifacts/elements/ascii-render.jsonnew file mode 100644index 00000000..209c93da--- /dev/null+++ b/registry-artifacts/elements/ascii-render.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/transitions",+ "version": null+ }+ ],+ "dimensions": null,+ "displayName": "ASCII Render",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "ascii-render",+ "sourceCode": "import { AbsoluteFill, Interactive, Sequence, isHtmlInCanvasSupported, useCurrentFrame, useDelayRender, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport React, { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\nimport { type TransitionPresentation, type TransitionPresentationComponentProps } from \"@remotion/transitions\";\n\nconst QUAD = new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]);\n\nconst VERTEX_SHADER = `#version 300 es\nin vec2 a_pos;\nout vec2 v_uv;\nvoid main() {\n v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);\n gl_Position = vec4(a_pos, 0.0, 1.0);\n}`;\n\nconst LAYER: React.CSSProperties = {\n position: \"absolute\",\n inset: 0,\n width: \"100%\",\n height: \"100%\",\n};\n\nconst OUTPUT_LAYER: React.CSSProperties = { ...LAYER, pointerEvents: \"none\" };\n\nconst isCanvasTransitionSupported = (): boolean =>\n isHtmlInCanvasSupported();\n\nconst isCanvasFilterSupported = (): boolean => isHtmlInCanvasSupported();\n\ntype SceneShaderFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderDrawParams<Props> = {\n from: OffscreenCanvas | null;\n to: OffscreenCanvas | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderInstance<Props> = {\n draw: (params: SceneShaderDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneShader<Props> = (\n canvas: OffscreenCanvas,\n) => SceneShaderInstance<Props>;\n\ntype SceneFilterFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterDrawParams<Props> = {\n scene: OffscreenCanvas | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterInstance<Props> = {\n draw: (params: SceneFilterDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneFilter<Props> = (\n canvas: OffscreenCanvas,\n) => SceneFilterInstance<Props>;\n\nfunction compileShader(\n gl: WebGL2RenderingContext,\n source: string,\n type: GLenum,\n): WebGLShader {\n const shader = gl.createShader(type);\n if (!shader) {\n throw new Error(\"canvas-presentation: failed to create shader\");\n }\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n const log = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error(`canvas-presentation: failed to compile shader: ${log}`);\n }\n return shader;\n}\n\nfunction createProgram(\n gl: WebGL2RenderingContext,\n fragment: string,\n): WebGLProgram {\n const program = gl.createProgram();\n if (!program) {\n throw new Error(\"canvas-presentation: failed to create program\");\n }\n const vs = compileShader(gl, VERTEX_SHADER, gl.VERTEX_SHADER);\n const fs = compileShader(gl, fragment, gl.FRAGMENT_SHADER);\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n gl.deleteShader(vs);\n gl.deleteShader(fs);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n const log = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n throw new Error(`canvas-presentation: failed to link program: ${log}`);\n }\n return program;\n}\n\nfunction createSceneTexture(gl: WebGL2RenderingContext): WebGLTexture {\n const texture = gl.createTexture();\n if (!texture) {\n throw new Error(\"canvas-presentation: failed to create texture\");\n }\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n 1,\n 1,\n 0,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n new Uint8Array([0, 0, 0, 0]),\n );\n return texture;\n}\n\nfunction createQuadSurface(canvas: OffscreenCanvas, fragment: string) {\n const gl = canvas.getContext(\"webgl2\", { premultipliedAlpha: true });\n if (!gl) {\n throw new Error(\"canvas-presentation: WebGL2 is unavailable\");\n }\n\n const program = createProgram(gl, fragment);\n const vao = gl.createVertexArray();\n gl.bindVertexArray(vao);\n const buffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, QUAD, gl.STATIC_DRAW);\n const aPos = gl.getAttribLocation(program, \"a_pos\");\n gl.enableVertexAttribArray(aPos);\n gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 0, 0);\n\n const locations = new Map<string, WebGLUniformLocation | null>();\n const uniform = (name: string) => {\n const cached = locations.get(name);\n if (cached !== undefined) {\n return cached;\n }\n const location = gl.getUniformLocation(program, name);\n locations.set(name, location);\n return location;\n };\n\n const clear = () => {\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n };\n\n const textures: WebGLTexture[] = [];\n const createTexture = () => {\n const texture = createSceneTexture(gl);\n textures.push(texture);\n return texture;\n };\n\n const begin = (width: number, height: number) => {\n gl.viewport(0, 0, width, height);\n clear();\n gl.useProgram(program);\n gl.bindVertexArray(vao);\n };\n\n const bindScene = (\n image: OffscreenCanvas | null,\n texture: WebGLTexture,\n unit: number,\n name: string,\n ) => {\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n if (image) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n image,\n );\n }\n gl.uniform1i(uniform(name), unit);\n };\n\n const draw = () => gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n\n const cleanup = () => {\n gl.deleteProgram(program);\n for (const texture of textures) {\n gl.deleteTexture(texture);\n }\n gl.deleteBuffer(buffer);\n gl.deleteVertexArray(vao);\n };\n\n return {\n gl,\n uniform,\n clear,\n createTexture,\n begin,\n bindScene,\n draw,\n cleanup,\n };\n}\n\nfunction makeSceneShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneShaderFrame<Props>) => void,\n): SceneShader<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const fromTexture = surface.createTexture();\n const toTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ from, to, width, height, progress, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(from, fromTexture, 0, \"u_from\");\n surface.bindScene(to, toTexture, 1, \"u_to\");\n\n surface.gl.uniform1f(surface.uniform(\"u_progress\"), progress);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n progress,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nfunction makeFilterShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneFilterFrame<Props>) => void,\n): SceneFilter<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const sceneTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ scene, width, height, frame, time, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(scene, sceneTexture, 0, \"u_scene\");\n\n surface.gl.uniform1f(surface.uniform(\"u_frame\"), frame);\n surface.gl.uniform1f(surface.uniform(\"u_time\"), time);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n frame,\n time,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nconst transferred = new WeakMap<HTMLCanvasElement, OffscreenCanvas>();\n\nfunction takeOffscreen(canvas: HTMLCanvasElement): OffscreenCanvas {\n const existing = transferred.get(canvas);\n if (existing) {\n return existing;\n }\n const created = canvas.transferControlToOffscreen();\n transferred.set(canvas, created);\n return created;\n}\n\nfunction makeCanvasComponent<Props extends Record<string, unknown>>(\n shader: SceneShader<Props>,\n): React.FC<TransitionPresentationComponentProps<Props>> {\n return function CanvasScenePresentation({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n onElementImage,\n onUnmount,\n bothEnteringAndExiting,\n }) {\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneShaderInstance<Props> | null>(null);\n const passedPropsRef = React.useRef(passedProps);\n passedPropsRef.current = passedProps;\n const onElementImageRef = React.useRef(onElementImage);\n onElementImageRef.current = onElementImage;\n const onUnmountRef = React.useRef(onUnmount);\n onUnmountRef.current = onUnmount;\n\n const { delayRender, continueRender } = useDelayRender();\n const passThrough =\n bothEnteringAndExiting && presentationDirection === \"exiting\";\n\n const drawRef = React.useRef<\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => void\n >(() => undefined);\n drawRef.current = (prevImage, nextImage, progress) => {\n const instance = instanceRef.current;\n if (!instance) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: paint\");\n const to = prevImage;\n const from = nextImage;\n const width = from?.width ?? to?.width ?? 0;\n const height = from?.height ?? to?.height ?? 0;\n if (width === 0 || height === 0) {\n instance.clear();\n continueRender(handle);\n return;\n }\n instance.draw({\n from,\n to,\n width,\n height,\n progress: !to ? 0 : !from ? 1 : progress,\n passedProps: passedPropsRef.current,\n });\n continueRender(handle);\n };\n\n const draw = React.useCallback(\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => drawRef.current(prevImage, nextImage, progress),\n [],\n );\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [passThrough, shader]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n if (!scene || !capture || !context) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n onElementImageRef.current(capture, draw);\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, [passThrough, draw]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, [passThrough]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: presentationProgress is the intentional trigger — a new progress value is what schedules the next paint\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n layoutRef.current?.requestPaint?.();\n }, [passThrough, presentationProgress]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n return () => onUnmountRef.current();\n }, [passThrough]);\n\n if (passThrough) {\n return <>{children}</>;\n }\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasFilterProps = {\n children: React.ReactNode;\n};\n\nfunction makeFilterComponent<Props extends Record<string, unknown>>(\n shader: SceneFilter<Props>,\n): React.FC<Props & CanvasFilterProps> {\n return function CanvasSceneFilter(props) {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const { delayRender, continueRender } = useDelayRender();\n\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneFilterInstance<Props> | null>(null);\n\n const passedPropsRef = React.useRef(props);\n passedPropsRef.current = props;\n const frameRef = React.useRef(frame);\n frameRef.current = frame;\n const timeRef = React.useRef(frame / fps);\n timeRef.current = frame / fps;\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [shader]);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n const instance = instanceRef.current;\n if (!scene || !capture || !context || !instance) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n if (capture.width === 0 || capture.height === 0) {\n instance.clear();\n return;\n }\n instance.draw({\n scene: capture,\n width: capture.width,\n height: capture.height,\n frame: frameRef.current,\n time: timeRef.current,\n passedProps: passedPropsRef.current,\n });\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: filter paint\");\n const settle = () => continueRender(handle);\n layout.addEventListener(\"paint\", settle, { once: true });\n layout.requestPaint?.();\n return () => {\n layout.removeEventListener(\"paint\", settle);\n continueRender(handle);\n };\n });\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {props.children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasPresentationOptions<Props extends Record<string, unknown>> = {\n shader: SceneShader<Props>;\n fallback: React.FC<TransitionPresentationComponentProps<Props>>;\n};\n\nfunction makeCanvasPresentation<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasPresentationOptions<Props>): (\n props: Props,\n) => TransitionPresentation<Props> {\n const Canvas = makeCanvasComponent(shader);\n\n const Presentation: React.FC<TransitionPresentationComponentProps<Props>> = (\n props,\n ) =>\n isCanvasTransitionSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n\n return (props) => ({ component: Presentation, props });\n}\n\ntype CanvasFilterOptions<Props extends Record<string, unknown>> = {\n shader: SceneFilter<Props>;\n fallback: React.FC<Props & CanvasFilterProps>;\n};\n\nfunction makeCanvasFilter<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasFilterOptions<Props>): React.FC<Props & CanvasFilterProps> {\n const Canvas = makeFilterComponent(shader);\n\n return function CanvasFilter(props) {\n return isCanvasFilterSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n };\n}\n\ntype AsciiRenderProps = {\n glyphSize?: number;\n charset?: string;\n colored?: boolean;\n ink?: string;\n intensity?: number;\n};\n\nconst DEFAULTS = {\n glyphSize: 26,\n charset: \" .:-=+*#%@\",\n colored: false,\n ink: \"#9dff9d\",\n intensity: 1,\n};\n\nconst GLYPH_ASPECT = 0.545;\nconst ATLAS_CELL_W = 24;\nconst ATLAS_CELL_H = 44;\nconst ATLAS_FONT =\n 'ui-monospace, SFMono-Regular, Menlo, Consolas, \"Liberation Mono\", monospace';\n\ntype NormalizedProps = {\n cellX: number;\n cellY: number;\n charset: string;\n colored: boolean;\n ink: string;\n intensity: number;\n};\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_scene;\nuniform sampler2D u_atlas;\nuniform vec2 u_cell;\nuniform float u_glyph_count;\nuniform float u_colored;\nuniform vec3 u_ink;\nuniform float u_intensity;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst int TAPS = 3;\n\nvec4 cellAverage(vec2 center, vec2 cell) {\n vec4 sum = vec4(0.0);\n for (int y = 0; y < TAPS; y++) {\n for (int x = 0; x < TAPS; x++) {\n vec2 offset = (vec2(float(x), float(y)) + 0.5) / float(TAPS) - 0.5;\n sum += texture(u_scene, center + offset * cell);\n }\n }\n return sum / float(TAPS * TAPS);\n}\n\nvoid main() {\n vec2 cell = max(u_cell, vec2(0.001));\n vec2 origin = floor(v_uv / cell) * cell;\n vec4 sampled = cellAverage(origin + cell * 0.5, cell);\n\n float luma = dot(sampled.rgb, vec3(0.299, 0.587, 0.114));\n float index = min(floor(luma * u_glyph_count), u_glyph_count - 1.0);\n\n vec2 local = clamp((v_uv - origin) / cell, 0.008, 0.992);\n float mask =\n texture(u_atlas, vec2((index + local.x) / u_glyph_count, local.y)).r;\n\n vec3 glyph = mix(u_ink, sampled.rgb, u_colored) * mask;\n vec4 source = texture(u_scene, v_uv);\n float amount = clamp(u_intensity, 0.0, 1.0);\n\n outColor = vec4(\n mix(source.rgb, glyph, amount),\n mix(source.a, max(mask, sampled.a), amount)\n );\n}`;\n\ntype Atlas = { charset: string; texture: WebGLTexture };\n\nconst atlases = new WeakMap<WebGL2RenderingContext, Atlas>();\n\nfunction drawAtlas(charset: string): OffscreenCanvas {\n const canvas = new OffscreenCanvas(\n ATLAS_CELL_W * charset.length,\n ATLAS_CELL_H,\n );\n const context = canvas.getContext(\"2d\");\n if (!context) {\n throw new Error(\"ascii-render: failed to acquire a 2D context\");\n }\n context.fillStyle = \"#000000\";\n context.fillRect(0, 0, canvas.width, canvas.height);\n context.fillStyle = \"#ffffff\";\n context.font = `${Math.round(ATLAS_CELL_H * 0.74)}px ${ATLAS_FONT}`;\n context.textAlign = \"center\";\n context.textBaseline = \"middle\";\n for (let i = 0; i < charset.length; i++) {\n context.fillText(\n charset[i],\n i * ATLAS_CELL_W + ATLAS_CELL_W / 2,\n ATLAS_CELL_H / 2,\n );\n }\n return canvas;\n}\n\nfunction bindAtlas(gl: WebGL2RenderingContext, charset: string): void {\n gl.activeTexture(gl.TEXTURE1);\n\n let atlas = atlases.get(gl);\n if (!atlas) {\n const texture = gl.createTexture();\n if (!texture) {\n throw new Error(\"ascii-render: failed to create the glyph atlas\");\n }\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n atlas = { charset: \"\", texture };\n atlases.set(gl, atlas);\n } else {\n gl.bindTexture(gl.TEXTURE_2D, atlas.texture);\n }\n\n if (atlas.charset !== charset) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n drawAtlas(charset),\n );\n atlas.charset = charset;\n }\n}\n\nfunction toRgb(hex: string): [number, number, number] {\n const value = hex.replace(\"#\", \"\");\n const full =\n value.length === 3\n ? value\n .split(\"\")\n .map((c) => c + c)\n .join(\"\")\n : value;\n const int = Number.parseInt(full, 16);\n if (Number.isNaN(int)) return [1, 1, 1];\n return [\n ((int >> 16) & 255) / 255,\n ((int >> 8) & 255) / 255,\n (int & 255) / 255,\n ];\n}\n\nconst shader = makeFilterShader<NormalizedProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, passedProps }) => {\n const { cellX, cellY, charset, colored, ink, intensity } = passedProps;\n bindAtlas(gl, charset);\n gl.uniform1i(uniform(\"u_atlas\"), 1);\n gl.uniform1f(uniform(\"u_glyph_count\"), charset.length);\n gl.uniform2f(uniform(\"u_cell\"), cellX, cellY);\n gl.uniform1f(uniform(\"u_colored\"), colored ? 1 : 0);\n gl.uniform3fv(uniform(\"u_ink\"), toRgb(ink));\n gl.uniform1f(uniform(\"u_intensity\"), intensity);\n },\n);\n\nconst AsciiRenderFallback: React.FC<NormalizedProps & CanvasFilterProps> = ({\n children,\n}) => <AbsoluteFill>{children}</AbsoluteFill>;\n\nconst AsciiRenderCanvas = makeCanvasFilter<NormalizedProps>({\n shader,\n fallback: AsciiRenderFallback,\n});\n\nconst AsciiRenderBase: React.FC<AsciiRenderProps & CanvasFilterProps> = ({\n glyphSize = DEFAULTS.glyphSize,\n charset = DEFAULTS.charset,\n colored = DEFAULTS.colored,\n ink = DEFAULTS.ink,\n intensity = DEFAULTS.intensity,\n children,\n}) => {\n const { width, height } = useVideoConfig();\n const resolved = charset.length > 0 ? charset : DEFAULTS.charset;\n\n return (\n <AsciiRenderCanvas\n cellX={(glyphSize * GLYPH_ASPECT) / width}\n cellY={glyphSize / height}\n charset={resolved}\n colored={colored}\n ink={ink}\n intensity={intensity}\n >\n {children}\n </AsciiRenderCanvas>\n );\n};\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n glyphSize: {\n type: \"number\",\n min: 10,\n max: 64,\n step: 2,\n default: 26,\n description: \"Glyph size\",\n hiddenFromList: false,\n },\n charset: {\n type: \"text-content\",\n default: \" .:-=+*#%@\",\n description: \"Charset\",\n },\n colored: {\n type: \"boolean\",\n default: false,\n description: \"Source colour\",\n },\n ink: {\n type: \"color\",\n default: \"#9dff9d\",\n description: \"Ink\",\n },\n intensity: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 1,\n description: \"Intensity\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"glyphSize\",\"charset\",\"colored\",\"ink\",\"intensity\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n glyphSize: 26,\n charset: \" .:-=+*#%@\",\n colored: false,\n ink: \"#9dff9d\",\n intensity: 1,\n speed: 1,\n};\n\ntype AsciiRenderElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof AsciiRenderBase>;\n\nconst AsciiRenderInner = forwardRef<\n HTMLDivElement,\n AsciiRenderElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<AsciiRender>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <AsciiRenderBase\n {...(componentProps as unknown as ComponentProps<typeof AsciiRenderBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const AsciiRender = Interactive.withSchema({\n Component: AsciiRenderInner,\n componentName: \"<AsciiRender>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/backdrop.json b/registry-artifacts/elements/backdrop.jsonnew file mode 100644index 00000000..4efb532b--- /dev/null+++ b/registry-artifacts/elements/backdrop.json@@ -0,0 +1,14 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": null,+ "displayName": "Backdrop",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "backdrop",+ "sourceCode": "import { forwardRef, isValidElement, useImperativeHandle, useRef, type ComponentProps, type ReactNode } from \"react\";\nimport { AbsoluteFill, Img, Interactive, Sequence, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\ntype BackdropFill =\n | { type: \"color\"; value: string }\n | { type: \"gradient\"; value: string }\n | { type: \"image\"; src: string; fit?: \"cover\" | \"contain\" };\n\ninterface BackdropProps {\n fill?: BackdropFill | ReactNode;\n padding?: number;\n radius?: number;\n shadow?: string;\n children?: ReactNode;\n className?: string;\n}\n\nconst DEFAULT_FILL: BackdropFill = { type: \"color\", value: \"#0a0a0a\" };\n\nfunction FillLayer({ fill }: { fill: BackdropFill }) {\n if (fill.type === \"image\") {\n return (\n <AbsoluteFill>\n <Img\n src={fill.src}\n style={{\n width: \"100%\",\n height: \"100%\",\n objectFit: fill.fit ?? \"cover\",\n }}\n />\n </AbsoluteFill>\n );\n }\n\n return <AbsoluteFill style={{ background: fill.value }} />;\n}\n\nfunction BackdropBase({\n fill,\n padding = 4,\n radius = 1,\n shadow = \"0 20px 60px rgba(0,0,0,0.4)\",\n children,\n className,\n}: BackdropProps) {\n const { width } = useVideoConfig();\n\n const paddingPx = (padding / 100) * width;\n const radiusPx = (radius / 100) * width;\n\n const fillLayer = isValidElement(fill) ? (\n <AbsoluteFill>{fill}</AbsoluteFill>\n ) : (\n <FillLayer fill={(fill as BackdropFill | undefined) ?? DEFAULT_FILL} />\n );\n\n return (\n <AbsoluteFill className={className}>\n {fillLayer}\n {children != null && (\n <div\n style={{\n position: \"absolute\",\n inset: paddingPx,\n overflow: \"hidden\",\n borderRadius: radiusPx,\n display: \"flex\",\n ...(shadow === \"\" ? {} : { boxShadow: shadow }),\n }}\n >\n <div style={{ width: \"100%\", height: \"100%\" }}>{children}</div>\n </div>\n )}\n </AbsoluteFill>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n fillType: {\n type: \"enum\",\n default: \"gradient\",\n variants: {\n color: {},\n gradient: {},\n image: {},\n },\n description: \"Fill type\",\n },\n color: {\n type: \"color\",\n default: \"#6366f1\",\n description: \"Color\",\n },\n gradient: {\n type: \"text-content\",\n default: \"linear-gradient(135deg, #6366f1 0%, #a855f7 100%)\",\n description: \"Gradient (CSS)\",\n },\n image: {\n type: \"text-content\",\n default: \"/hero.png\",\n description: \"Image URL\",\n },\n padding: {\n type: \"number\",\n min: 0,\n max: 12,\n step: 0.5,\n default: 4,\n description: \"Padding\",\n hiddenFromList: false,\n },\n radius: {\n type: \"number\",\n min: 0,\n max: 4,\n step: 0.25,\n default: 1,\n description: \"Radius\",\n hiddenFromList: false,\n },\n shadow: {\n type: \"text-content\",\n default: \"0 20px 60px rgba(0,0,0,0.4)\",\n description: \"Shadow\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"fillType\",\"color\",\"gradient\",\"image\",\"padding\",\"radius\",\"shadow\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n fillType: \"gradient\",\n color: \"#6366f1\",\n gradient: \"linear-gradient(135deg, #6366f1 0%, #a855f7 100%)\",\n image: \"/hero.png\",\n padding: 4,\n radius: 1,\n shadow: \"0 20px 60px rgba(0,0,0,0.4)\",\n};\n\ntype BackdropElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof BackdropBase>;\n\nconst BackdropInner = forwardRef<\n HTMLDivElement,\n BackdropElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<Backdrop>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <BackdropBase\n {...(componentProps as unknown as ComponentProps<typeof BackdropBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const Backdrop = Interactive.withSchema({\n Component: BackdropInner,\n componentName: \"<Backdrop>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/blur-out-up.json b/registry-artifacts/elements/blur-out-up.jsonnew file mode 100644index 00000000..7169284e--- /dev/null+++ b/registry-artifacts/elements/blur-out-up.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 720,+ "height": 100+ },+ "displayName": "Blur Out Up",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "blur-out-up",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface BlurOutUpProps {\n text: string;\n staggerDelay?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction BlurOutUpBase({\n text,\n staggerDelay = 1,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: BlurOutUpProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const words = text.split(\" \");\n\n const enterDur = 17;\n const enterTravel = 6;\n const exitDur = 14;\n const exitTravelFrom = 8;\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterEnd = enterDur + (words.length - 1) * staggerDelay;\n const exitStart = Math.max(\n enterEnd,\n durationInFrames - exitDur - (words.length - 1) * staggerDelay,\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {words.map((word, i) => {\n const enterLocal = frame - i * staggerDelay;\n const exitLocal = frame - exitStart - i * staggerDelay;\n\n const enterP = interpolate(enterLocal, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(exitLocal, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const yEnter = interpolate(enterLocal, [0, enterTravel], [10, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const yExit = interpolate(\n exitLocal,\n [exitTravelFrom, exitDur],\n [0, -14],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n },\n );\n\n const y = yEnter + yExit;\n\n const blurEnter = interpolate(enterLocal, [0, enterDur], [6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const blurExit = interpolate(exitLocal, [0, exitDur], [0, 8], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const blur = blurEnter + blurExit;\n\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 55%\",\n opacity,\n translate: `0 ${y}px`,\n filter: `blur(${blur}px)`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"Clear in, airy out.\",\n description: \"Text\",\n },\n staggerDelay: {\n type: \"number\",\n min: 0,\n max: 8,\n step: 1,\n default: 1,\n description: \"Stagger\",\n hiddenFromList: false,\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 720,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"staggerDelay\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"Clear in, airy out.\",\n staggerDelay: 1,\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype BlurOutUpElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof BlurOutUpBase>;\n\nconst BlurOutUpInner = forwardRef<\n HTMLDivElement,\n BlurOutUpElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 720, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<BlurOutUp>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <BlurOutUpBase\n {...(componentProps as unknown as ComponentProps<typeof BlurOutUpBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const BlurOutUp = Interactive.withSchema({\n Component: BlurOutUpInner,\n componentName: \"<BlurOutUp>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/bottom-up-letters.json b/registry-artifacts/elements/bottom-up-letters.jsonnew file mode 100644index 00000000..6a556dfe--- /dev/null+++ b/registry-artifacts/elements/bottom-up-letters.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 190,+ "height": 100+ },+ "displayName": "Bottom-Up Letters",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "bottom-up-letters",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface BottomUpLettersProps {\n text: string;\n staggerDelay?: number;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction BottomUpLettersBase({\n text,\n staggerDelay = 3,\n distance = 46,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: BottomUpLettersProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 12;\n const charTravelFrames = 7;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerDelay;\n const easing = Easing.bezier(0.18, 1, 0.32, 1);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charTravelFrames], [distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n translate: `0 ${y}px`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"Shift\",\n description: \"Text\",\n },\n staggerDelay: {\n type: \"number\",\n min: 1,\n max: 12,\n step: 1,\n default: 3,\n description: \"Stagger\",\n hiddenFromList: false,\n },\n distance: {\n type: \"number\",\n min: 0,\n max: 120,\n step: 1,\n default: 46,\n description: \"Distance\",\n hiddenFromList: false,\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 190,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"staggerDelay\",\"distance\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"Shift\",\n staggerDelay: 3,\n distance: 46,\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype BottomUpLettersElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof BottomUpLettersBase>;\n\nconst BottomUpLettersInner = forwardRef<\n HTMLDivElement,\n BottomUpLettersElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 190, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<BottomUpLetters>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <BottomUpLettersBase\n {...(componentProps as unknown as ComponentProps<typeof BottomUpLettersBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const BottomUpLetters = Interactive.withSchema({\n Component: BottomUpLettersInner,\n componentName: \"<BottomUpLetters>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/camera-lens.json b/registry-artifacts/elements/camera-lens.jsonnew file mode 100644index 00000000..4d51bcd1--- /dev/null+++ b/registry-artifacts/elements/camera-lens.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/transitions",+ "version": null+ }+ ],+ "dimensions": null,+ "displayName": "Camera Lens",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "camera-lens",+ "sourceCode": "import { AbsoluteFill, Interactive, Sequence, isHtmlInCanvasSupported, useCurrentFrame, useDelayRender, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport React, { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\nimport { type TransitionPresentation, type TransitionPresentationComponentProps } from \"@remotion/transitions\";\n\nconst QUAD = new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]);\n\nconst VERTEX_SHADER = `#version 300 es\nin vec2 a_pos;\nout vec2 v_uv;\nvoid main() {\n v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);\n gl_Position = vec4(a_pos, 0.0, 1.0);\n}`;\n\nconst LAYER: React.CSSProperties = {\n position: \"absolute\",\n inset: 0,\n width: \"100%\",\n height: \"100%\",\n};\n\nconst OUTPUT_LAYER: React.CSSProperties = { ...LAYER, pointerEvents: \"none\" };\n\nconst isCanvasTransitionSupported = (): boolean =>\n isHtmlInCanvasSupported();\n\nconst isCanvasFilterSupported = (): boolean => isHtmlInCanvasSupported();\n\ntype SceneShaderFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderDrawParams<Props> = {\n from: OffscreenCanvas | null;\n to: OffscreenCanvas | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderInstance<Props> = {\n draw: (params: SceneShaderDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneShader<Props> = (\n canvas: OffscreenCanvas,\n) => SceneShaderInstance<Props>;\n\ntype SceneFilterFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterDrawParams<Props> = {\n scene: OffscreenCanvas | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterInstance<Props> = {\n draw: (params: SceneFilterDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneFilter<Props> = (\n canvas: OffscreenCanvas,\n) => SceneFilterInstance<Props>;\n\nfunction compileShader(\n gl: WebGL2RenderingContext,\n source: string,\n type: GLenum,\n): WebGLShader {\n const shader = gl.createShader(type);\n if (!shader) {\n throw new Error(\"canvas-presentation: failed to create shader\");\n }\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n const log = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error(`canvas-presentation: failed to compile shader: ${log}`);\n }\n return shader;\n}\n\nfunction createProgram(\n gl: WebGL2RenderingContext,\n fragment: string,\n): WebGLProgram {\n const program = gl.createProgram();\n if (!program) {\n throw new Error(\"canvas-presentation: failed to create program\");\n }\n const vs = compileShader(gl, VERTEX_SHADER, gl.VERTEX_SHADER);\n const fs = compileShader(gl, fragment, gl.FRAGMENT_SHADER);\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n gl.deleteShader(vs);\n gl.deleteShader(fs);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n const log = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n throw new Error(`canvas-presentation: failed to link program: ${log}`);\n }\n return program;\n}\n\nfunction createSceneTexture(gl: WebGL2RenderingContext): WebGLTexture {\n const texture = gl.createTexture();\n if (!texture) {\n throw new Error(\"canvas-presentation: failed to create texture\");\n }\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n 1,\n 1,\n 0,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n new Uint8Array([0, 0, 0, 0]),\n );\n return texture;\n}\n\nfunction createQuadSurface(canvas: OffscreenCanvas, fragment: string) {\n const gl = canvas.getContext(\"webgl2\", { premultipliedAlpha: true });\n if (!gl) {\n throw new Error(\"canvas-presentation: WebGL2 is unavailable\");\n }\n\n const program = createProgram(gl, fragment);\n const vao = gl.createVertexArray();\n gl.bindVertexArray(vao);\n const buffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, QUAD, gl.STATIC_DRAW);\n const aPos = gl.getAttribLocation(program, \"a_pos\");\n gl.enableVertexAttribArray(aPos);\n gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 0, 0);\n\n const locations = new Map<string, WebGLUniformLocation | null>();\n const uniform = (name: string) => {\n const cached = locations.get(name);\n if (cached !== undefined) {\n return cached;\n }\n const location = gl.getUniformLocation(program, name);\n locations.set(name, location);\n return location;\n };\n\n const clear = () => {\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n };\n\n const textures: WebGLTexture[] = [];\n const createTexture = () => {\n const texture = createSceneTexture(gl);\n textures.push(texture);\n return texture;\n };\n\n const begin = (width: number, height: number) => {\n gl.viewport(0, 0, width, height);\n clear();\n gl.useProgram(program);\n gl.bindVertexArray(vao);\n };\n\n const bindScene = (\n image: OffscreenCanvas | null,\n texture: WebGLTexture,\n unit: number,\n name: string,\n ) => {\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n if (image) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n image,\n );\n }\n gl.uniform1i(uniform(name), unit);\n };\n\n const draw = () => gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n\n const cleanup = () => {\n gl.deleteProgram(program);\n for (const texture of textures) {\n gl.deleteTexture(texture);\n }\n gl.deleteBuffer(buffer);\n gl.deleteVertexArray(vao);\n };\n\n return {\n gl,\n uniform,\n clear,\n createTexture,\n begin,\n bindScene,\n draw,\n cleanup,\n };\n}\n\nfunction makeSceneShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneShaderFrame<Props>) => void,\n): SceneShader<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const fromTexture = surface.createTexture();\n const toTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ from, to, width, height, progress, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(from, fromTexture, 0, \"u_from\");\n surface.bindScene(to, toTexture, 1, \"u_to\");\n\n surface.gl.uniform1f(surface.uniform(\"u_progress\"), progress);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n progress,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nfunction makeFilterShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneFilterFrame<Props>) => void,\n): SceneFilter<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const sceneTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ scene, width, height, frame, time, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(scene, sceneTexture, 0, \"u_scene\");\n\n surface.gl.uniform1f(surface.uniform(\"u_frame\"), frame);\n surface.gl.uniform1f(surface.uniform(\"u_time\"), time);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n frame,\n time,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nconst transferred = new WeakMap<HTMLCanvasElement, OffscreenCanvas>();\n\nfunction takeOffscreen(canvas: HTMLCanvasElement): OffscreenCanvas {\n const existing = transferred.get(canvas);\n if (existing) {\n return existing;\n }\n const created = canvas.transferControlToOffscreen();\n transferred.set(canvas, created);\n return created;\n}\n\nfunction makeCanvasComponent<Props extends Record<string, unknown>>(\n shader: SceneShader<Props>,\n): React.FC<TransitionPresentationComponentProps<Props>> {\n return function CanvasScenePresentation({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n onElementImage,\n onUnmount,\n bothEnteringAndExiting,\n }) {\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneShaderInstance<Props> | null>(null);\n const passedPropsRef = React.useRef(passedProps);\n passedPropsRef.current = passedProps;\n const onElementImageRef = React.useRef(onElementImage);\n onElementImageRef.current = onElementImage;\n const onUnmountRef = React.useRef(onUnmount);\n onUnmountRef.current = onUnmount;\n\n const { delayRender, continueRender } = useDelayRender();\n const passThrough =\n bothEnteringAndExiting && presentationDirection === \"exiting\";\n\n const drawRef = React.useRef<\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => void\n >(() => undefined);\n drawRef.current = (prevImage, nextImage, progress) => {\n const instance = instanceRef.current;\n if (!instance) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: paint\");\n const to = prevImage;\n const from = nextImage;\n const width = from?.width ?? to?.width ?? 0;\n const height = from?.height ?? to?.height ?? 0;\n if (width === 0 || height === 0) {\n instance.clear();\n continueRender(handle);\n return;\n }\n instance.draw({\n from,\n to,\n width,\n height,\n progress: !to ? 0 : !from ? 1 : progress,\n passedProps: passedPropsRef.current,\n });\n continueRender(handle);\n };\n\n const draw = React.useCallback(\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => drawRef.current(prevImage, nextImage, progress),\n [],\n );\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [passThrough, shader]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n if (!scene || !capture || !context) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n onElementImageRef.current(capture, draw);\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, [passThrough, draw]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, [passThrough]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: presentationProgress is the intentional trigger — a new progress value is what schedules the next paint\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n layoutRef.current?.requestPaint?.();\n }, [passThrough, presentationProgress]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n return () => onUnmountRef.current();\n }, [passThrough]);\n\n if (passThrough) {\n return <>{children}</>;\n }\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasFilterProps = {\n children: React.ReactNode;\n};\n\nfunction makeFilterComponent<Props extends Record<string, unknown>>(\n shader: SceneFilter<Props>,\n): React.FC<Props & CanvasFilterProps> {\n return function CanvasSceneFilter(props) {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const { delayRender, continueRender } = useDelayRender();\n\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneFilterInstance<Props> | null>(null);\n\n const passedPropsRef = React.useRef(props);\n passedPropsRef.current = props;\n const frameRef = React.useRef(frame);\n frameRef.current = frame;\n const timeRef = React.useRef(frame / fps);\n timeRef.current = frame / fps;\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [shader]);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n const instance = instanceRef.current;\n if (!scene || !capture || !context || !instance) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n if (capture.width === 0 || capture.height === 0) {\n instance.clear();\n return;\n }\n instance.draw({\n scene: capture,\n width: capture.width,\n height: capture.height,\n frame: frameRef.current,\n time: timeRef.current,\n passedProps: passedPropsRef.current,\n });\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: filter paint\");\n const settle = () => continueRender(handle);\n layout.addEventListener(\"paint\", settle, { once: true });\n layout.requestPaint?.();\n return () => {\n layout.removeEventListener(\"paint\", settle);\n continueRender(handle);\n };\n });\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {props.children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasPresentationOptions<Props extends Record<string, unknown>> = {\n shader: SceneShader<Props>;\n fallback: React.FC<TransitionPresentationComponentProps<Props>>;\n};\n\nfunction makeCanvasPresentation<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasPresentationOptions<Props>): (\n props: Props,\n) => TransitionPresentation<Props> {\n const Canvas = makeCanvasComponent(shader);\n\n const Presentation: React.FC<TransitionPresentationComponentProps<Props>> = (\n props,\n ) =>\n isCanvasTransitionSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n\n return (props) => ({ component: Presentation, props });\n}\n\ntype CanvasFilterOptions<Props extends Record<string, unknown>> = {\n shader: SceneFilter<Props>;\n fallback: React.FC<Props & CanvasFilterProps>;\n};\n\nfunction makeCanvasFilter<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasFilterOptions<Props>): React.FC<Props & CanvasFilterProps> {\n const Canvas = makeFilterComponent(shader);\n\n return function CanvasFilter(props) {\n return isCanvasFilterSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n };\n}\n\ntype CameraLensProps = {\n softness?: number;\n bloom?: number;\n aberration?: number;\n vignette?: number;\n distortion?: number;\n};\n\nconst DEFAULTS = {\n softness: 0.5,\n bloom: 0.5,\n aberration: 0.5,\n vignette: 0.5,\n distortion: 0.05,\n};\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_scene;\nuniform float u_aspect;\nuniform float u_softness;\nuniform float u_bloom;\nuniform float u_aberration;\nuniform float u_vignette;\nuniform float u_distortion;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst int SOFT_TAPS = 6;\nconst int GLARE_TAPS = 8;\nconst float GOLDEN = 2.39996323;\n\nvec2 lensUv(vec2 direction, float distance) {\n vec2 q = direction * distance;\n q.x /= u_aspect;\n return q * 0.5 + 0.5;\n}\n\nvec2 spiral(int index, int count, float radius, float turn) {\n float angle = float(index) * GOLDEN + turn;\n float step = sqrt((float(index) + 0.5) / float(count)) * radius;\n return vec2(cos(angle) * step / u_aspect, sin(angle) * step);\n}\n\nvec4 softSample(vec2 uv, float radius) {\n vec4 sum = texture(u_scene, uv);\n if (radius <= 0.00002) {\n return sum;\n }\n for (int i = 0; i < SOFT_TAPS; i++) {\n sum += texture(u_scene, uv + spiral(i, SOFT_TAPS, radius, 0.0));\n }\n return sum / float(SOFT_TAPS + 1);\n}\n\nvoid main() {\n vec2 p = (v_uv - 0.5) * 2.0;\n p.x *= u_aspect;\n\n float span = sqrt(u_aspect * u_aspect + 1.0);\n float reach = length(p);\n float radius = reach / span;\n vec2 direction = reach > 0.0001 ? p / reach : vec2(0.0);\n\n float bend = 1.0 / (1.0 + clamp(u_distortion, 0.0, 1.0) * radius * radius);\n float focused = reach * bend;\n vec2 base = lensUv(direction, focused);\n\n float soft = u_softness * 0.011 * smoothstep(0.22, 1.0, radius);\n float split = u_aberration * 0.0035 * radius;\n\n vec4 mid = softSample(base, soft);\n float red = softSample(lensUv(direction, focused * (1.0 + split)), soft).r;\n float blue = softSample(lensUv(direction, focused * (1.0 - split)), soft).b;\n vec3 color = vec3(red, mid.g, blue);\n\n vec3 glare = vec3(0.0);\n for (int i = 0; i < GLARE_TAPS; i++) {\n vec3 tap =\n texture(u_scene, base + spiral(i, GLARE_TAPS, u_bloom * 0.026, 0.7)).rgb;\n glare += max(tap - 0.62, vec3(0.0));\n }\n color += (glare / float(GLARE_TAPS)) * u_bloom * 1.4;\n\n float falloff = pow(cos(min(radius, 1.0) * 0.55), 4.0);\n color *= mix(1.0, falloff, clamp(u_vignette, 0.0, 1.5));\n\n outColor = vec4(clamp(color, 0.0, 1.0), mid.a);\n}`;\n\nconst shader = makeFilterShader<CameraLensProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, passedProps }) => {\n const {\n softness = DEFAULTS.softness,\n bloom = DEFAULTS.bloom,\n aberration = DEFAULTS.aberration,\n vignette = DEFAULTS.vignette,\n distortion = DEFAULTS.distortion,\n } = passedProps;\n gl.uniform1f(uniform(\"u_softness\"), softness);\n gl.uniform1f(uniform(\"u_bloom\"), bloom);\n gl.uniform1f(uniform(\"u_aberration\"), aberration);\n gl.uniform1f(uniform(\"u_vignette\"), vignette);\n gl.uniform1f(uniform(\"u_distortion\"), distortion);\n },\n);\n\nconst CameraLensFallback: React.FC<CameraLensProps & CanvasFilterProps> = ({\n children,\n bloom = DEFAULTS.bloom,\n vignette = DEFAULTS.vignette,\n}) => (\n <AbsoluteFill>\n <AbsoluteFill>{children}</AbsoluteFill>\n <AbsoluteFill\n style={{\n filter: `blur(${6 * bloom}px) brightness(1.5) contrast(1.3)`,\n mixBlendMode: \"screen\",\n opacity: 0.3 * bloom,\n }}\n >\n {children}\n </AbsoluteFill>\n <AbsoluteFill\n style={{\n background:\n \"radial-gradient(ellipse 78% 76% at 50% 50%, transparent 52%, rgba(0, 0, 0, 0.5) 100%)\",\n opacity: Math.min(vignette, 1),\n }}\n />\n </AbsoluteFill>\n);\n\nconst CameraLensBase = makeCanvasFilter<CameraLensProps>({\n shader,\n fallback: CameraLensFallback,\n});\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n softness: {\n type: \"number\",\n min: 0,\n max: 2,\n step: 0.05,\n default: 0.5,\n description: \"Corner softness\",\n hiddenFromList: false,\n },\n bloom: {\n type: \"number\",\n min: 0,\n max: 2,\n step: 0.05,\n default: 0.5,\n description: \"Bloom\",\n hiddenFromList: false,\n },\n aberration: {\n type: \"number\",\n min: 0,\n max: 3,\n step: 0.1,\n default: 0.5,\n description: \"Aberration\",\n hiddenFromList: false,\n },\n vignette: {\n type: \"number\",\n min: 0,\n max: 1.5,\n step: 0.05,\n default: 0.5,\n description: \"Vignette\",\n hiddenFromList: false,\n },\n distortion: {\n type: \"number\",\n min: 0,\n max: 0.6,\n step: 0.01,\n default: 0.05,\n description: \"Distortion\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"softness\",\"bloom\",\"aberration\",\"vignette\",\"distortion\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n softness: 0.5,\n bloom: 0.5,\n aberration: 0.5,\n vignette: 0.5,\n distortion: 0.05,\n speed: 1,\n};\n\ntype CameraLensElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof CameraLensBase>;\n\nconst CameraLensInner = forwardRef<\n HTMLDivElement,\n CameraLensElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<CameraLens>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <CameraLensBase\n {...(componentProps as unknown as ComponentProps<typeof CameraLensBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const CameraLens = Interactive.withSchema({\n Component: CameraLensInner,\n componentName: \"<CameraLens>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/chat-to-preview-layout.json b/registry-artifacts/elements/chat-to-preview-layout.jsonnew file mode 100644index 00000000..4165bbb9--- /dev/null+++ b/registry-artifacts/elements/chat-to-preview-layout.json@@ -0,0 +1,14 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": null,+ "displayName": "Chat to Preview Layout",+ "durationInFrames": 120,+ "installationMode": "component-owned-sequence",+ "slug": "chat-to-preview-layout",+ "sourceCode": "import { forwardRef, useImperativeHandle, useRef, type ComponentProps, type ReactNode } from \"react\";\nimport { Easing, Interactive, Sequence, interpolate, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\ninterface ChatToPreviewLayoutProps {\n chat?: ReactNode;\n preview?: ReactNode;\n startChatRatio?: number;\n endChatRatio?: number;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\nfunction DefaultChat() {\n const messages = [\n { from: \"user\", text: \"Build me a landing page\" },\n { from: \"ai\", text: \"Sure — what should it feature?\" },\n { from: \"user\", text: \"Hero, pricing, footer.\" },\n { from: \"ai\", text: \"On it. Generating now...\" },\n ];\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n padding: 24,\n display: \"flex\",\n flexDirection: \"column\",\n gap: 12,\n fontFamily: FONT_FAMILY,\n background: \"#111\",\n }}\n >\n <div\n style={{\n color: \"#888\",\n fontSize: 12,\n fontWeight: 600,\n letterSpacing: \"0.08em\",\n textTransform: \"uppercase\",\n marginBottom: 8,\n }}\n >\n Chat\n </div>\n {messages.map((m, i) => (\n <div\n key={i}\n style={{\n alignSelf: m.from === \"user\" ? \"flex-end\" : \"flex-start\",\n background: m.from === \"user\" ? \"#0ea5e9\" : \"#262626\",\n color: \"white\",\n padding: \"10px 14px\",\n borderRadius: 14,\n fontSize: 14,\n maxWidth: \"85%\",\n }}\n >\n {m.text}\n </div>\n ))}\n </div>\n );\n}\n\nfunction DefaultPreview() {\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"white\",\n display: \"flex\",\n flexDirection: \"column\",\n fontFamily: FONT_FAMILY,\n }}\n >\n <div\n style={{\n height: 36,\n background: \"#f4f4f5\",\n borderBottom: \"1px solid #e4e4e7\",\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n padding: \"0 12px\",\n }}\n >\n <div\n style={{\n width: 10,\n height: 10,\n borderRadius: 999,\n background: \"#ef4444\",\n }}\n />\n <div\n style={{\n width: 10,\n height: 10,\n borderRadius: 999,\n background: \"#f59e0b\",\n }}\n />\n <div\n style={{\n width: 10,\n height: 10,\n borderRadius: 999,\n background: \"#22c55e\",\n }}\n />\n </div>\n <div\n style={{\n flex: 1,\n padding: 32,\n display: \"flex\",\n flexDirection: \"column\",\n gap: 16,\n }}\n >\n <div\n style={{\n fontSize: 36,\n fontWeight: 700,\n letterSpacing: \"-0.03em\",\n color: \"#0a0a0a\",\n }}\n >\n Ship faster.\n </div>\n <div style={{ fontSize: 16, color: \"#71717a\", maxWidth: 360 }}>\n The fastest way to launch your idea. Built with Remotion.\n </div>\n <div\n style={{\n marginTop: 12,\n display: \"inline-flex\",\n background: \"#0a0a0a\",\n color: \"white\",\n padding: \"10px 18px\",\n borderRadius: 10,\n alignSelf: \"flex-start\",\n fontSize: 14,\n fontWeight: 600,\n }}\n >\n Get started\n </div>\n </div>\n </div>\n );\n}\n\nfunction ChatToPreviewLayoutBase({\n chat,\n preview,\n startChatRatio = 0.5,\n endChatRatio = 0.25,\n speed = 1,\n className,\n}: ChatToPreviewLayoutProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n // Apple's signature ease — slow start, dramatic settle. Replaces the older\n // symmetric bezier so the morph feels deliberate instead of mechanical.\n const APPLE_EASE = Easing.bezier(0.16, 1, 0.3, 1);\n\n const morphStart = durationInFrames * 0.1;\n const morphEnd = durationInFrames * 0.7;\n\n const ratio = interpolate(\n frame,\n [morphStart, morphEnd],\n [startChatRatio, endChatRatio],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: APPLE_EASE,\n },\n );\n\n // Right (preview) panel reveal: fade in + slide left into its growing slot.\n // Anchored to the same morph window so it feels like the chat is physically\n // dragging the preview into existence.\n const previewOpacity = interpolate(frame, [morphStart, morphEnd], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: APPLE_EASE,\n });\n const previewTx = interpolate(frame, [morphStart, morphEnd], [40, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: APPLE_EASE,\n });\n\n const chatBasis = `${ratio * 100}%`;\n const previewBasis = `${(1 - ratio) * 100}%`;\n\n // Inner content min-widths. These are the lever that prevents text from\n // re-flowing inside the columns as the parent flex-basis morphs — content\n // is rendered at a fixed virtual width, then clipped by `overflow: hidden`\n // on the outer column. No reflow → no jumping characters.\n const CHAT_INNER_MIN = 520;\n const PREVIEW_INNER_MIN = 720;\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n padding: 32,\n display: \"flex\",\n gap: 16,\n }}\n >\n <div\n style={{\n flexBasis: chatBasis,\n flexGrow: 0,\n flexShrink: 0,\n position: \"relative\",\n overflow: \"hidden\",\n borderRadius: 16,\n border: \"1px solid rgba(255,255,255,0.08)\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n minWidth: CHAT_INNER_MIN,\n }}\n >\n {chat ?? <DefaultChat />}\n </div>\n </div>\n <div\n style={{\n flexBasis: previewBasis,\n flexGrow: 0,\n flexShrink: 0,\n position: \"relative\",\n overflow: \"hidden\",\n borderRadius: 16,\n border: \"1px solid rgba(255,255,255,0.08)\",\n opacity: previewOpacity,\n translate: `${previewTx}px`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n minWidth: PREVIEW_INNER_MIN,\n }}\n >\n {preview ?? <DefaultPreview />}\n </div>\n </div>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n startChatRatio: {\n type: \"number\",\n min: 0.1,\n max: 0.9,\n step: 0.05,\n default: 0.5,\n description: \"Start chat ratio\",\n hiddenFromList: false,\n },\n endChatRatio: {\n type: \"number\",\n min: 0.05,\n max: 0.9,\n step: 0.05,\n default: 0.25,\n description: \"End chat ratio\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"startChatRatio\",\"endChatRatio\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n startChatRatio: 0.5,\n endChatRatio: 0.25,\n speed: 1,\n};\n\ntype ChatToPreviewLayoutElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ChatToPreviewLayoutBase>;\n\nconst ChatToPreviewLayoutInner = forwardRef<\n HTMLDivElement,\n ChatToPreviewLayoutElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ChatToPreviewLayout>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ChatToPreviewLayoutBase\n {...(componentProps as unknown as ComponentProps<typeof ChatToPreviewLayoutBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ChatToPreviewLayout = Interactive.withSchema({\n Component: ChatToPreviewLayoutInner,\n componentName: \"<ChatToPreviewLayout>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 120+}diff --git a/registry-artifacts/elements/chromatic-wave.json b/registry-artifacts/elements/chromatic-wave.jsonnew file mode 100644index 00000000..eed8e46c--- /dev/null+++ b/registry-artifacts/elements/chromatic-wave.json@@ -0,0 +1,14 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": null,+ "displayName": "Chromatic Wave",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "chromatic-wave",+ "sourceCode": "import { forwardRef, useId, useImperativeHandle, useRef, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, interpolate, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\ninterface ChromaticWaveProps {\n className?: string;\n width?: number;\n height?: number;\n headline?: string;\n kicker?: string;\n headlineFontFamily?: string;\n kickerFontFamily?: string;\n headlineFontSize?: number;\n kickerFontSize?: number;\n kickerTracking?: number;\n headlineBaselineY?: number;\n kickerBaselines?: [number, number];\n textCenterX?: number;\n fill?: string;\n background?: string;\n bandHeight?: number;\n bandCopies?: number;\n bandPitch?: number;\n mapStartY?: number;\n mapEndY?: number;\n mapTravelFrames?: number;\n waveHeight?: number;\n waveWidth?: number;\n waveSpeed?: number;\n turbulentAmount?: number;\n turbulentSize?: number;\n evolutionPerSecond?: number;\n mapBlurRadius?: number;\n mapBlurIterations?: number;\n glassDisplacement?: number;\n maxDisplacementPx?: number;\n glassPasses?: number;\n channelOrder?: (\"red\" | \"green\" | \"blue\")[];\n}\n\nfunction boxBlurSigma(radius: number, iterations: number): number {\n const w = 2 * radius + 1;\n return Math.sqrt((iterations * (w * w - 1)) / 12);\n}\n\nfunction buildMapUri({\n width,\n height,\n bandHeight,\n bandCopies,\n bandPitch,\n mapY,\n waveHeight,\n waveWidth,\n phase,\n}: {\n width: number;\n height: number;\n bandHeight: number;\n bandCopies: number;\n bandPitch: number;\n mapY: number;\n waveHeight: number;\n waveWidth: number;\n phase: number;\n}): string {\n const overhang = 120;\n const segments = 48;\n\n const bands = Array.from({ length: bandCopies }, (_, i) => {\n const top = mapY + i * bandPitch - bandHeight / 2;\n const pts = Array.from({ length: segments + 1 }, (_, s) => {\n const x = -overhang + (s / segments) * (width + overhang * 2);\n const y =\n top + Math.sin((x / waveWidth) * Math.PI * 2 + phase) * waveHeight;\n return `${x},${y}`;\n });\n const back = Array.from({ length: segments + 1 }, (_, s) => {\n const x =\n -overhang + ((segments - s) / segments) * (width + overhang * 2);\n const y =\n top +\n bandHeight +\n Math.sin((x / waveWidth) * Math.PI * 2 + phase) * waveHeight;\n return `${x},${y}`;\n });\n return `<path d=\"M${pts.join(\"L\")}L${back.join(\"L\")}Z\" fill=\"url(#g)\"/>`;\n }).join(\"\");\n\n const svg =\n `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"${width}\" height=\"${height}\">` +\n `<defs><linearGradient id=\"g\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">` +\n `<stop offset=\"0\" stop-color=\"rgb(128,128,128)\"/>` +\n `<stop offset=\"0.25\" stop-color=\"rgb(0,0,0)\"/>` +\n `<stop offset=\"0.5\" stop-color=\"rgb(128,128,128)\"/>` +\n `<stop offset=\"0.75\" stop-color=\"rgb(255,255,255)\"/>` +\n `<stop offset=\"1\" stop-color=\"rgb(128,128,128)\"/>` +\n `</linearGradient></defs>` +\n `<rect width=\"${width}\" height=\"${height}\" fill=\"rgb(128,128,128)\"/>` +\n bands +\n `</svg>`;\n\n return `data:image/svg+xml;utf8,${encodeURIComponent(svg)}`;\n}\n\nfunction ChromaticWaveBase({\n className,\n width = 1920,\n height = 1080,\n headline = \"MUSIC\",\n kicker = \"APPLES\",\n headlineFontFamily = \"'Helvetica Neue', Helvetica, Arial, sans-serif\",\n kickerFontFamily = \"'Helvetica Neue', Helvetica, Arial, sans-serif\",\n headlineFontSize = 174,\n kickerFontSize = 52,\n kickerTracking = 32,\n headlineBaselineY = 601,\n kickerBaselines = [444, 670],\n textCenterX = 960,\n fill = \"#ffffff\",\n background = \"#000000\",\n bandHeight = 147.1,\n bandCopies = 7,\n bandPitch = 750,\n mapStartY = 31,\n mapEndY = 1560,\n mapTravelFrames = 150,\n waveHeight = 28,\n waveWidth = 272,\n waveSpeed = 1,\n turbulentAmount = 130,\n turbulentSize = 163,\n evolutionPerSecond = 50,\n mapBlurRadius = 13,\n mapBlurIterations = 6,\n glassDisplacement = 100,\n maxDisplacementPx = 39,\n glassPasses = 3,\n channelOrder = [\"blue\", \"green\", \"red\"],\n}: ChromaticWaveProps) {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const filterId = useId();\n const seconds = frame / fps;\n\n const mapY = interpolate(frame, [0, mapTravelFrames], [mapStartY, mapEndY], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const mapUri = buildMapUri({\n width,\n height,\n bandHeight,\n bandCopies,\n bandPitch,\n mapY,\n waveHeight,\n waveWidth,\n phase: seconds * waveSpeed * Math.PI * 2,\n });\n\n const mapSigma = boxBlurSigma(mapBlurRadius, mapBlurIterations);\n const evolution = seconds * evolutionPerSecond;\n\n const channelMatrix: Record<string, string> = {\n red: \"1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0\",\n green: \"0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0\",\n blue: \"0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0\",\n };\n\n const content = (\n <>\n <text\n x={textCenterX}\n y={kickerBaselines[0]}\n textAnchor=\"middle\"\n fontFamily={kickerFontFamily}\n fontSize={kickerFontSize}\n letterSpacing={kickerTracking}\n fill={fill}\n >\n {kicker}\n </text>\n <text\n x={textCenterX}\n y={headlineBaselineY}\n textAnchor=\"middle\"\n fontFamily={headlineFontFamily}\n fontWeight={700}\n fontSize={headlineFontSize}\n fill={fill}\n >\n {headline}\n </text>\n <text\n x={textCenterX}\n y={kickerBaselines[1]}\n textAnchor=\"middle\"\n fontFamily={kickerFontFamily}\n fontSize={kickerFontSize}\n letterSpacing={kickerTracking}\n fill={fill}\n >\n {kicker}\n </text>\n </>\n );\n\n return (\n <div\n className={className}\n style={{ position: \"absolute\", inset: 0, overflow: \"hidden\" }}\n >\n <svg\n width=\"100%\"\n height=\"100%\"\n viewBox={`0 0 ${width} ${height}`}\n preserveAspectRatio=\"xMidYMid meet\"\n style={{ display: \"block\" }}\n >\n <defs>\n {Array.from({ length: glassPasses }, (_, i) => {\n const depth =\n ((i + 1) / glassPasses) *\n maxDisplacementPx *\n (glassDisplacement / 100);\n return (\n <filter\n key={channelOrder[i] ?? i}\n id={`${filterId}-${i}`}\n filterUnits=\"userSpaceOnUse\"\n x=\"0\"\n y=\"0\"\n width={width}\n height={height}\n colorInterpolationFilters=\"sRGB\"\n >\n <feImage\n href={mapUri}\n x=\"0\"\n y=\"0\"\n width={width}\n height={height}\n result=\"rawMap\"\n />\n <feTurbulence\n type=\"turbulence\"\n baseFrequency={1 / Math.max(turbulentSize, 1)}\n numOctaves={1}\n seed={11}\n result=\"noise\"\n />\n <feOffset\n in=\"noise\"\n dx={evolution}\n dy={evolution * 0.4}\n result=\"noiseMoved\"\n />\n <feDisplacementMap\n in=\"rawMap\"\n in2=\"noiseMoved\"\n scale={turbulentAmount}\n xChannelSelector=\"R\"\n yChannelSelector=\"G\"\n result=\"turbulentMap\"\n />\n <feGaussianBlur\n in=\"turbulentMap\"\n stdDeviation={mapSigma}\n result=\"slopeMap\"\n />\n <feDisplacementMap\n in=\"SourceGraphic\"\n in2=\"slopeMap\"\n scale={depth}\n xChannelSelector=\"R\"\n yChannelSelector=\"R\"\n result=\"displaced\"\n />\n <feColorMatrix\n in=\"displaced\"\n type=\"matrix\"\n values={channelMatrix[channelOrder[i] ?? \"red\"]}\n />\n </filter>\n );\n })}\n </defs>\n\n <rect width={width} height={height} fill={background} />\n\n {Array.from({ length: glassPasses }, (_, i) => (\n <g\n key={channelOrder[i] ?? i}\n filter={`url(#${filterId}-${i})`}\n style={{ mixBlendMode: \"screen\" }}\n >\n {content}\n </g>\n ))}\n </svg>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n headline: {\n type: \"text-content\",\n default: \"MUSIC\",\n description: \"Headline\",\n },\n kicker: {\n type: \"text-content\",\n default: \"APPLES\",\n description: \"Kicker\",\n },\n fill: {\n type: \"color\",\n default: \"#ffffff\",\n description: \"Fill\",\n },\n waveHeight: {\n type: \"number\",\n min: 0,\n max: 40,\n step: 1,\n default: 28,\n description: \"Wave height\",\n hiddenFromList: false,\n },\n maxDisplacementPx: {\n type: \"number\",\n min: 0,\n max: 60,\n step: 1,\n default: 39,\n description: \"Displacement (px)\",\n hiddenFromList: false,\n },\n turbulentAmount: {\n type: \"number\",\n min: 0,\n max: 200,\n step: 2,\n default: 130,\n description: \"Turbulence\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"headline\",\"kicker\",\"fill\",\"waveHeight\",\"maxDisplacementPx\",\"turbulentAmount\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n headline: \"MUSIC\",\n kicker: \"APPLES\",\n fill: \"#ffffff\",\n waveHeight: 28,\n maxDisplacementPx: 39,\n turbulentAmount: 130,\n speed: 1,\n};\n\ntype ChromaticWaveElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ChromaticWaveBase>;\n\nconst ChromaticWaveInner = forwardRef<\n HTMLDivElement,\n ChromaticWaveElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ChromaticWave>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ChromaticWaveBase\n {...(componentProps as unknown as ComponentProps<typeof ChromaticWaveBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ChromaticWave = Interactive.withSchema({\n Component: ChromaticWaveInner,\n componentName: \"<ChromaticWave>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/confetti.json b/registry-artifacts/elements/confetti.jsonnew file mode 100644index 00000000..4c2077bf--- /dev/null+++ b/registry-artifacts/elements/confetti.json@@ -0,0 +1,14 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": null,+ "displayName": "Confetti",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "confetti",+ "sourceCode": "import { AbsoluteFill, Interactive, Sequence, interpolate, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface ConfettiProps {\n /** Number of confetti pieces. */\n particleCount?: number;\n colors?: string[];\n /** Burst origin as a 0..1 fraction of the canvas. */\n originX?: number;\n originY?: number;\n /** Frame the burst fires on. */\n startFrame?: number;\n /** Lifetime of the burst, in frames. */\n lifetime?: number;\n /** Initial launch speed (px/frame at the 720px reference height). */\n power?: number;\n /** Downward acceleration (px/frame² at the 720px reference height). */\n gravity?: number;\n /** Base piece size in reference px. */\n size?: number;\n /** PRNG seed — same seed renders an identical burst every time. */\n seed?: number;\n}\n\ninterface Particle {\n angle: number;\n speed: number;\n color: string;\n size: number;\n rot0: number;\n spin: number;\n drift: number;\n}\n\nconst DEFAULT_COLORS = [\n \"#1d9bf0\",\n \"#ff5da2\",\n \"#ffd23f\",\n \"#22c55e\",\n \"#a855f7\",\n \"#ff7a45\",\n];\n\n// --- Pure helpers (unit-tested) -------------------------------------------\n\n/** Deterministic PRNG (mulberry32) — returns a function yielding [0, 1). */\nfunction mulberry32(seed: number): () => number {\n let a = seed >>> 0;\n return () => {\n a = (a + 0x6d2b79f5) | 0;\n let t = Math.imul(a ^ (a >>> 15), 1 | a);\n t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;\n return ((t ^ (t >>> 14)) >>> 0) / 4294967296;\n };\n}\n\n/** Build a deterministic particle set for a seed (stable across renders). */\nfunction makeParticles({\n count,\n seed,\n colors,\n}: {\n count: number;\n seed: number;\n colors: string[];\n}): Particle[] {\n const rand = mulberry32(seed);\n const palette = colors.length > 0 ? colors : DEFAULT_COLORS;\n const out: Particle[] = [];\n for (let i = 0; i < count; i++) {\n const angle = rand() * Math.PI * 2;\n const speed = 0.35 + 0.65 * rand();\n out.push({\n angle,\n speed,\n color: palette[Math.floor(rand() * palette.length)],\n size: 0.7 + 0.6 * rand(),\n rot0: rand() * Math.PI * 2,\n spin: (rand() - 0.5) * 0.6,\n drift: (rand() - 0.5) * 2,\n });\n }\n return out;\n}\n\n/** Opacity envelope over a particle's lifetime: quick fade-in, slow fade-out. */\nfunction particleOpacity(tt: number, lifetime: number): number {\n if (tt < 0 || tt > lifetime) return 0;\n const fadeIn = interpolate(tt, [0, 4], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n const fadeOut = interpolate(tt, [lifetime * 0.7, lifetime], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n return Math.min(fadeIn, fadeOut);\n}\n\n// --- Component -------------------------------------------------------------\n\nfunction ConfettiBase({\n particleCount = 140,\n colors = DEFAULT_COLORS,\n originX = 0.5,\n originY = 0.5,\n startFrame = 0,\n lifetime = 90,\n power = 17,\n gravity = 0.45,\n size = 13,\n seed = 1,\n}: ConfettiProps) {\n const frame = useCurrentFrame();\n const { width, height } = useVideoConfig();\n\n const tt = frame - startFrame;\n if (tt < 0 || tt > lifetime) return null;\n\n const sc = height / 720;\n const ox = width * originX;\n const oy = height * originY;\n const particles = makeParticles({ count: particleCount, seed, colors });\n\n return (\n <AbsoluteFill style={{ pointerEvents: \"none\" }}>\n {particles.map((p, i) => {\n const opacity = particleOpacity(tt, lifetime);\n if (opacity <= 0) return null;\n\n const vx = Math.cos(p.angle) * p.speed * power + p.drift;\n const vy = Math.sin(p.angle) * p.speed * power;\n const x = ox + vx * tt * sc;\n const y = oy + (vy * tt + 0.5 * gravity * tt * tt) * sc;\n const rot = p.rot0 + p.spin * tt;\n const flutter = Math.cos(p.rot0 + p.spin * tt * 1.6);\n const w = size * p.size * sc;\n\n return (\n <div\n key={i}\n style={{\n position: \"absolute\",\n left: x,\n top: y,\n width: w,\n height: w * 0.62,\n borderRadius: 2,\n background: p.color,\n opacity,\n translate: \"-50% -50%\",\n rotate: `${rot}rad`,\n scale: `${flutter} 1`,\n }}\n />\n );\n })}\n </AbsoluteFill>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n particleCount: {\n type: \"number\",\n min: 10,\n max: 400,\n step: 10,\n default: 140,\n description: \"Particles\",\n hiddenFromList: false,\n },\n power: {\n type: \"number\",\n min: 4,\n max: 40,\n step: 1,\n default: 17,\n description: \"Power\",\n hiddenFromList: false,\n },\n gravity: {\n type: \"number\",\n min: 0,\n max: 1.5,\n step: 0.05,\n default: 0.45,\n description: \"Gravity\",\n hiddenFromList: false,\n },\n size: {\n type: \"number\",\n min: 4,\n max: 30,\n step: 1,\n default: 13,\n description: \"Size\",\n hiddenFromList: false,\n },\n seed: {\n type: \"number\",\n min: 1,\n step: 1,\n default: 1,\n description: \"Seed\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"particleCount\",\"power\",\"gravity\",\"size\",\"seed\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n particleCount: 140,\n power: 17,\n gravity: 0.45,\n size: 13,\n seed: 1,\n speed: 1,\n};\n\ntype ConfettiElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ConfettiBase>;\n\nconst ConfettiInner = forwardRef<\n HTMLDivElement,\n ConfettiElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<Confetti>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ConfettiBase\n {...(componentProps as unknown as ComponentProps<typeof ConfettiBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const Confetti = Interactive.withSchema({\n Component: ConfettiInner,\n componentName: \"<Confetti>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/crt-screen.json b/registry-artifacts/elements/crt-screen.jsonnew file mode 100644index 00000000..dbee8ea3--- /dev/null+++ b/registry-artifacts/elements/crt-screen.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/transitions",+ "version": null+ }+ ],+ "dimensions": null,+ "displayName": "CRT Screen",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "crt-screen",+ "sourceCode": "import { AbsoluteFill, Interactive, Sequence, isHtmlInCanvasSupported, useCurrentFrame, useDelayRender, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport React, { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\nimport { type TransitionPresentation, type TransitionPresentationComponentProps } from \"@remotion/transitions\";\n\nconst QUAD = new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]);\n\nconst VERTEX_SHADER = `#version 300 es\nin vec2 a_pos;\nout vec2 v_uv;\nvoid main() {\n v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);\n gl_Position = vec4(a_pos, 0.0, 1.0);\n}`;\n\nconst LAYER: React.CSSProperties = {\n position: \"absolute\",\n inset: 0,\n width: \"100%\",\n height: \"100%\",\n};\n\nconst OUTPUT_LAYER: React.CSSProperties = { ...LAYER, pointerEvents: \"none\" };\n\nconst isCanvasTransitionSupported = (): boolean =>\n isHtmlInCanvasSupported();\n\nconst isCanvasFilterSupported = (): boolean => isHtmlInCanvasSupported();\n\ntype SceneShaderFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderDrawParams<Props> = {\n from: OffscreenCanvas | null;\n to: OffscreenCanvas | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderInstance<Props> = {\n draw: (params: SceneShaderDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneShader<Props> = (\n canvas: OffscreenCanvas,\n) => SceneShaderInstance<Props>;\n\ntype SceneFilterFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterDrawParams<Props> = {\n scene: OffscreenCanvas | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterInstance<Props> = {\n draw: (params: SceneFilterDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneFilter<Props> = (\n canvas: OffscreenCanvas,\n) => SceneFilterInstance<Props>;\n\nfunction compileShader(\n gl: WebGL2RenderingContext,\n source: string,\n type: GLenum,\n): WebGLShader {\n const shader = gl.createShader(type);\n if (!shader) {\n throw new Error(\"canvas-presentation: failed to create shader\");\n }\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n const log = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error(`canvas-presentation: failed to compile shader: ${log}`);\n }\n return shader;\n}\n\nfunction createProgram(\n gl: WebGL2RenderingContext,\n fragment: string,\n): WebGLProgram {\n const program = gl.createProgram();\n if (!program) {\n throw new Error(\"canvas-presentation: failed to create program\");\n }\n const vs = compileShader(gl, VERTEX_SHADER, gl.VERTEX_SHADER);\n const fs = compileShader(gl, fragment, gl.FRAGMENT_SHADER);\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n gl.deleteShader(vs);\n gl.deleteShader(fs);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n const log = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n throw new Error(`canvas-presentation: failed to link program: ${log}`);\n }\n return program;\n}\n\nfunction createSceneTexture(gl: WebGL2RenderingContext): WebGLTexture {\n const texture = gl.createTexture();\n if (!texture) {\n throw new Error(\"canvas-presentation: failed to create texture\");\n }\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n 1,\n 1,\n 0,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n new Uint8Array([0, 0, 0, 0]),\n );\n return texture;\n}\n\nfunction createQuadSurface(canvas: OffscreenCanvas, fragment: string) {\n const gl = canvas.getContext(\"webgl2\", { premultipliedAlpha: true });\n if (!gl) {\n throw new Error(\"canvas-presentation: WebGL2 is unavailable\");\n }\n\n const program = createProgram(gl, fragment);\n const vao = gl.createVertexArray();\n gl.bindVertexArray(vao);\n const buffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, QUAD, gl.STATIC_DRAW);\n const aPos = gl.getAttribLocation(program, \"a_pos\");\n gl.enableVertexAttribArray(aPos);\n gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 0, 0);\n\n const locations = new Map<string, WebGLUniformLocation | null>();\n const uniform = (name: string) => {\n const cached = locations.get(name);\n if (cached !== undefined) {\n return cached;\n }\n const location = gl.getUniformLocation(program, name);\n locations.set(name, location);\n return location;\n };\n\n const clear = () => {\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n };\n\n const textures: WebGLTexture[] = [];\n const createTexture = () => {\n const texture = createSceneTexture(gl);\n textures.push(texture);\n return texture;\n };\n\n const begin = (width: number, height: number) => {\n gl.viewport(0, 0, width, height);\n clear();\n gl.useProgram(program);\n gl.bindVertexArray(vao);\n };\n\n const bindScene = (\n image: OffscreenCanvas | null,\n texture: WebGLTexture,\n unit: number,\n name: string,\n ) => {\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n if (image) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n image,\n );\n }\n gl.uniform1i(uniform(name), unit);\n };\n\n const draw = () => gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n\n const cleanup = () => {\n gl.deleteProgram(program);\n for (const texture of textures) {\n gl.deleteTexture(texture);\n }\n gl.deleteBuffer(buffer);\n gl.deleteVertexArray(vao);\n };\n\n return {\n gl,\n uniform,\n clear,\n createTexture,\n begin,\n bindScene,\n draw,\n cleanup,\n };\n}\n\nfunction makeSceneShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneShaderFrame<Props>) => void,\n): SceneShader<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const fromTexture = surface.createTexture();\n const toTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ from, to, width, height, progress, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(from, fromTexture, 0, \"u_from\");\n surface.bindScene(to, toTexture, 1, \"u_to\");\n\n surface.gl.uniform1f(surface.uniform(\"u_progress\"), progress);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n progress,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nfunction makeFilterShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneFilterFrame<Props>) => void,\n): SceneFilter<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const sceneTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ scene, width, height, frame, time, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(scene, sceneTexture, 0, \"u_scene\");\n\n surface.gl.uniform1f(surface.uniform(\"u_frame\"), frame);\n surface.gl.uniform1f(surface.uniform(\"u_time\"), time);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n frame,\n time,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nconst transferred = new WeakMap<HTMLCanvasElement, OffscreenCanvas>();\n\nfunction takeOffscreen(canvas: HTMLCanvasElement): OffscreenCanvas {\n const existing = transferred.get(canvas);\n if (existing) {\n return existing;\n }\n const created = canvas.transferControlToOffscreen();\n transferred.set(canvas, created);\n return created;\n}\n\nfunction makeCanvasComponent<Props extends Record<string, unknown>>(\n shader: SceneShader<Props>,\n): React.FC<TransitionPresentationComponentProps<Props>> {\n return function CanvasScenePresentation({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n onElementImage,\n onUnmount,\n bothEnteringAndExiting,\n }) {\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneShaderInstance<Props> | null>(null);\n const passedPropsRef = React.useRef(passedProps);\n passedPropsRef.current = passedProps;\n const onElementImageRef = React.useRef(onElementImage);\n onElementImageRef.current = onElementImage;\n const onUnmountRef = React.useRef(onUnmount);\n onUnmountRef.current = onUnmount;\n\n const { delayRender, continueRender } = useDelayRender();\n const passThrough =\n bothEnteringAndExiting && presentationDirection === \"exiting\";\n\n const drawRef = React.useRef<\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => void\n >(() => undefined);\n drawRef.current = (prevImage, nextImage, progress) => {\n const instance = instanceRef.current;\n if (!instance) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: paint\");\n const to = prevImage;\n const from = nextImage;\n const width = from?.width ?? to?.width ?? 0;\n const height = from?.height ?? to?.height ?? 0;\n if (width === 0 || height === 0) {\n instance.clear();\n continueRender(handle);\n return;\n }\n instance.draw({\n from,\n to,\n width,\n height,\n progress: !to ? 0 : !from ? 1 : progress,\n passedProps: passedPropsRef.current,\n });\n continueRender(handle);\n };\n\n const draw = React.useCallback(\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => drawRef.current(prevImage, nextImage, progress),\n [],\n );\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [passThrough, shader]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n if (!scene || !capture || !context) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n onElementImageRef.current(capture, draw);\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, [passThrough, draw]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, [passThrough]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: presentationProgress is the intentional trigger — a new progress value is what schedules the next paint\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n layoutRef.current?.requestPaint?.();\n }, [passThrough, presentationProgress]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n return () => onUnmountRef.current();\n }, [passThrough]);\n\n if (passThrough) {\n return <>{children}</>;\n }\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasFilterProps = {\n children: React.ReactNode;\n};\n\nfunction makeFilterComponent<Props extends Record<string, unknown>>(\n shader: SceneFilter<Props>,\n): React.FC<Props & CanvasFilterProps> {\n return function CanvasSceneFilter(props) {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const { delayRender, continueRender } = useDelayRender();\n\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneFilterInstance<Props> | null>(null);\n\n const passedPropsRef = React.useRef(props);\n passedPropsRef.current = props;\n const frameRef = React.useRef(frame);\n frameRef.current = frame;\n const timeRef = React.useRef(frame / fps);\n timeRef.current = frame / fps;\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [shader]);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n const instance = instanceRef.current;\n if (!scene || !capture || !context || !instance) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n if (capture.width === 0 || capture.height === 0) {\n instance.clear();\n return;\n }\n instance.draw({\n scene: capture,\n width: capture.width,\n height: capture.height,\n frame: frameRef.current,\n time: timeRef.current,\n passedProps: passedPropsRef.current,\n });\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: filter paint\");\n const settle = () => continueRender(handle);\n layout.addEventListener(\"paint\", settle, { once: true });\n layout.requestPaint?.();\n return () => {\n layout.removeEventListener(\"paint\", settle);\n continueRender(handle);\n };\n });\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {props.children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasPresentationOptions<Props extends Record<string, unknown>> = {\n shader: SceneShader<Props>;\n fallback: React.FC<TransitionPresentationComponentProps<Props>>;\n};\n\nfunction makeCanvasPresentation<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasPresentationOptions<Props>): (\n props: Props,\n) => TransitionPresentation<Props> {\n const Canvas = makeCanvasComponent(shader);\n\n const Presentation: React.FC<TransitionPresentationComponentProps<Props>> = (\n props,\n ) =>\n isCanvasTransitionSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n\n return (props) => ({ component: Presentation, props });\n}\n\ntype CanvasFilterOptions<Props extends Record<string, unknown>> = {\n shader: SceneFilter<Props>;\n fallback: React.FC<Props & CanvasFilterProps>;\n};\n\nfunction makeCanvasFilter<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasFilterOptions<Props>): React.FC<Props & CanvasFilterProps> {\n const Canvas = makeFilterComponent(shader);\n\n return function CanvasFilter(props) {\n return isCanvasFilterSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n };\n}\n\ntype CrtScreenProps = {\n curvature?: number;\n scanlines?: number;\n maskScale?: number;\n vignette?: number;\n};\n\nconst DEFAULTS = {\n curvature: 1,\n scanlines: 1,\n maskScale: 2,\n vignette: 1,\n};\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_scene;\nuniform float u_frame;\nuniform float u_curvature;\nuniform float u_scanlines;\nuniform float u_mask_scale;\nuniform float u_vignette;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst float PI = 3.141592653589793;\nconst float SCAN_LINES = 240.0;\n\nvec2 warpTube(vec2 uv, float k) {\n vec2 p = uv * 2.0 - 1.0;\n float x2 = p.x * p.x;\n float y2 = p.y * p.y;\n p.x *= 1.0 + k * 0.11 * y2;\n p.y *= 1.0 + k * 0.17 * x2;\n p /= 1.0 + k * 0.045;\n return p * 0.5 + 0.5;\n}\n\nvec3 phosphorMask(float x, float scale) {\n float sub = mod(floor(x / max(scale, 1.0)), 3.0);\n vec3 lit = vec3(\n step(sub, 0.5),\n step(0.5, sub) * step(sub, 1.5),\n step(1.5, sub)\n );\n return mix(vec3(0.34), vec3(1.0), lit);\n}\n\nvoid main() {\n vec2 uv = warpTube(v_uv, u_curvature);\n\n vec2 edge =\n smoothstep(vec2(0.0), vec2(0.005), uv) *\n smoothstep(vec2(0.0), vec2(0.005), 1.0 - uv);\n float inside = edge.x * edge.y;\n\n vec4 base = texture(u_scene, uv);\n\n vec3 spread = vec3(0.0);\n for (int i = -2; i <= 2; i++) {\n spread += texture(u_scene, uv + vec2(float(i) * 0.0018, 0.0)).rgb;\n }\n spread /= 5.0;\n vec3 bloom = max(spread - 0.5, vec3(0.0));\n\n vec3 color = base.rgb;\n color *= phosphorMask(gl_FragCoord.x, u_mask_scale);\n color += bloom * 0.75;\n\n float scan = mix(1.0, 0.5 + 0.5 * cos(uv.y * SCAN_LINES * PI * 2.0), 0.55);\n color *= mix(1.0, scan, clamp(u_scanlines, 0.0, 1.5));\n\n vec2 vc = uv * 2.0 - 1.0;\n float radius = length(vc * vec2(0.86, 1.0));\n color *= mix(1.0, smoothstep(1.6, 0.35, radius), clamp(u_vignette, 0.0, 1.5));\n\n color *= 1.0 + 0.012 * sin(u_frame * PI / 30.0);\n color *= inside;\n\n outColor = vec4(clamp(color, 0.0, 1.0), max(base.a, 1.0 - inside));\n}`;\n\nconst shader = makeFilterShader<CrtScreenProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, passedProps }) => {\n const {\n curvature = DEFAULTS.curvature,\n scanlines = DEFAULTS.scanlines,\n maskScale = DEFAULTS.maskScale,\n vignette = DEFAULTS.vignette,\n } = passedProps;\n gl.uniform1f(uniform(\"u_curvature\"), curvature);\n gl.uniform1f(uniform(\"u_scanlines\"), scanlines);\n gl.uniform1f(uniform(\"u_mask_scale\"), maskScale);\n gl.uniform1f(uniform(\"u_vignette\"), vignette);\n },\n);\n\nconst CrtScreenFallback: React.FC<CrtScreenProps & CanvasFilterProps> = ({\n children,\n scanlines = DEFAULTS.scanlines,\n vignette = DEFAULTS.vignette,\n}) => (\n <AbsoluteFill>\n <AbsoluteFill style={{ filter: \"saturate(1.1) contrast(1.06)\" }}>\n {children}\n </AbsoluteFill>\n <AbsoluteFill\n style={{\n background:\n \"repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.34) 0px, rgba(0, 0, 0, 0.34) 1.5px, transparent 1.5px, transparent 3px)\",\n opacity: Math.min(scanlines, 1),\n }}\n />\n <AbsoluteFill\n style={{\n background:\n \"radial-gradient(ellipse 82% 78% at 50% 50%, transparent 45%, rgba(0, 0, 0, 0.72) 100%)\",\n opacity: Math.min(vignette, 1),\n }}\n />\n </AbsoluteFill>\n);\n\nconst CrtScreenBase = makeCanvasFilter<CrtScreenProps>({\n shader,\n fallback: CrtScreenFallback,\n});\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n curvature: {\n type: \"number\",\n min: 0,\n max: 2,\n step: 0.05,\n default: 1,\n description: \"Curvature\",\n hiddenFromList: false,\n },\n scanlines: {\n type: \"number\",\n min: 0,\n max: 1.5,\n step: 0.05,\n default: 1,\n description: \"Scanlines\",\n hiddenFromList: false,\n },\n maskScale: {\n type: \"number\",\n min: 1,\n max: 6,\n step: 1,\n default: 2,\n description: \"Mask pitch\",\n hiddenFromList: false,\n },\n vignette: {\n type: \"number\",\n min: 0,\n max: 1.5,\n step: 0.05,\n default: 1,\n description: \"Vignette\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"curvature\",\"scanlines\",\"maskScale\",\"vignette\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n curvature: 1,\n scanlines: 1,\n maskScale: 2,\n vignette: 1,\n speed: 1,\n};\n\ntype CrtScreenElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof CrtScreenBase>;\n\nconst CrtScreenInner = forwardRef<\n HTMLDivElement,\n CrtScreenElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<CrtScreen>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <CrtScreenBase\n {...(componentProps as unknown as ComponentProps<typeof CrtScreenBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const CrtScreen = Interactive.withSchema({\n Component: CrtScreenInner,\n componentName: \"<CrtScreen>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/drift.json b/registry-artifacts/elements/drift.jsonnew file mode 100644index 00000000..04ae0b03--- /dev/null+++ b/registry-artifacts/elements/drift.json@@ -0,0 +1,14 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": null,+ "displayName": "Drift",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "drift",+ "sourceCode": "import { AbsoluteFill, Interactive, Sequence, interpolate, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport React, { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface DriftProps {\n children: React.ReactNode;\n grow?: number;\n}\n\nfunction DriftBase({ children, grow = 0.035 }: DriftProps) {\n const frame = useCurrentFrame();\n const { durationInFrames } = useVideoConfig();\n const scale = interpolate(frame, [0, durationInFrames], [1, 1 + grow]);\n return <AbsoluteFill style={{ scale: `${scale}` }}>{children}</AbsoluteFill>;\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n grow: {\n type: \"number\",\n min: -0.1,\n max: 0.15,\n step: 0.005,\n default: 0.035,\n description: \"Grow\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"grow\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n grow: 0.035,\n speed: 1,\n};\n\ntype DriftElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof DriftBase>;\n\nconst DriftInner = forwardRef<\n HTMLDivElement,\n DriftElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<Drift>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <DriftBase\n {...(componentProps as unknown as ComponentProps<typeof DriftBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const Drift = Interactive.withSchema({\n Component: DriftInner,\n componentName: \"<Drift>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/ecosystem-constellation.json b/registry-artifacts/elements/ecosystem-constellation.jsonnew file mode 100644index 00000000..af404af2--- /dev/null+++ b/registry-artifacts/elements/ecosystem-constellation.json@@ -0,0 +1,14 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": null,+ "displayName": "Ecosystem Constellation",+ "durationInFrames": 240,+ "installationMode": "component-owned-sequence",+ "slug": "ecosystem-constellation",+ "sourceCode": "import { forwardRef, useImperativeHandle, useRef, type ComponentProps, type ComponentType } from \"react\";\nimport { Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\ninterface EcosystemConstellationProps {\n satelliteCount?: number;\n centerLabel?: string;\n accentColor?: string;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\n// Inline brand mark components — stylized for demo identification, drawn from\n// primitive SVG shapes only so the component stays self-contained.\n\nfunction GitHubMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={30} height={30} aria-hidden=\"true\">\n <path\n fill=\"#fff\"\n d=\"M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.11.79-.25.79-.55v-2.06c-3.2.7-3.87-1.36-3.87-1.36-.52-1.33-1.27-1.69-1.27-1.69-1.04-.71.08-.7.08-.7 1.15.08 1.76 1.18 1.76 1.18 1.02 1.75 2.69 1.24 3.35.95.1-.74.4-1.24.72-1.53-2.55-.29-5.24-1.28-5.24-5.7 0-1.26.45-2.29 1.18-3.1-.12-.29-.51-1.46.11-3.05 0 0 .97-.31 3.18 1.18.92-.26 1.91-.39 2.89-.39s1.97.13 2.89.39c2.21-1.49 3.18-1.18 3.18-1.18.62 1.59.23 2.76.11 3.05.74.81 1.18 1.84 1.18 3.1 0 4.43-2.7 5.41-5.27 5.69.41.36.77 1.06.77 2.13v3.16c0 .31.21.67.8.55C20.21 21.39 23.5 17.08 23.5 12 23.5 5.65 18.35.5 12 .5z\"\n />\n </svg>\n );\n}\n\nfunction VercelMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={28} height={28} aria-hidden=\"true\">\n <path fill=\"#fff\" d=\"M12 2 L23 21 L1 21 Z\" />\n </svg>\n );\n}\n\nfunction StripeMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={28} height={28} aria-hidden=\"true\">\n <path\n fill=\"#fff\"\n d=\"M13.5 9.6c0-.6.5-.85 1.3-.85 1.15 0 2.6.35 3.75.97V6.16c-1.25-.5-2.5-.7-3.75-.7C11.7 5.46 9.6 7.06 9.6 9.7c0 4.13 5.7 3.47 5.7 5.25 0 .7-.6.93-1.45.93-1.25 0-2.85-.52-4.1-1.2v3.65c1.4.6 2.8.85 4.1.85 3.2 0 5.4-1.55 5.4-4.25-.02-4.45-5.75-3.65-5.75-5.33z\"\n />\n </svg>\n );\n}\n\nfunction SlackMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={26} height={26} aria-hidden=\"true\">\n <rect x=\"2\" y=\"10\" width=\"9\" height=\"2.5\" rx=\"1.25\" fill=\"#36C5F0\" />\n <rect x=\"13\" y=\"10\" width=\"9\" height=\"2.5\" rx=\"1.25\" fill=\"#2EB67D\" />\n <rect x=\"10\" y=\"2\" width=\"2.5\" height=\"9\" rx=\"1.25\" fill=\"#ECB22E\" />\n <rect x=\"10\" y=\"13\" width=\"2.5\" height=\"9\" rx=\"1.25\" fill=\"#E01E5A\" />\n </svg>\n );\n}\n\nfunction LinearMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={28} height={28} aria-hidden=\"true\">\n <defs>\n <linearGradient id=\"linear-grad\" x1=\"0\" x2=\"1\" y1=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor=\"#fff\" stopOpacity=\"0.95\" />\n <stop offset=\"100%\" stopColor=\"#fff\" stopOpacity=\"0.55\" />\n </linearGradient>\n </defs>\n <circle cx=\"12\" cy=\"12\" r=\"10\" fill=\"url(#linear-grad)\" />\n <path\n d=\"M5 13 L11 19 M5 9 L15 19 M5 5 L19 19 M9 5 L19 15 M13 5 L19 11\"\n stroke=\"#0a0a0a\"\n strokeWidth=\"0.9\"\n strokeLinecap=\"round\"\n opacity=\"0.85\"\n />\n </svg>\n );\n}\n\nfunction FigmaMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={26} height={26} aria-hidden=\"true\">\n <circle cx=\"9\" cy=\"4\" r=\"3.5\" fill=\"#F24E1E\" />\n <circle cx=\"15\" cy=\"4\" r=\"3.5\" fill=\"#FF7262\" />\n <circle cx=\"9\" cy=\"11\" r=\"3.5\" fill=\"#A259FF\" />\n <circle cx=\"15\" cy=\"11\" r=\"3.5\" fill=\"#1ABCFE\" />\n <circle cx=\"9\" cy=\"18\" r=\"3.5\" fill=\"#0ACF83\" />\n </svg>\n );\n}\n\nfunction NotionMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={26} height={26} aria-hidden=\"true\">\n <rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"3\" fill=\"#fff\" />\n <path\n d=\"M8 7 V17 M8 7 L16 17 M16 7 V17\"\n stroke=\"#0a0a0a\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n fill=\"none\"\n />\n </svg>\n );\n}\n\nfunction DiscordMark() {\n return (\n <svg viewBox=\"0 0 24 24\" width={28} height={28} aria-hidden=\"true\">\n <path\n fill=\"#fff\"\n d=\"M19.5 4.7A18 18 0 0 0 15 3.3l-.2.4a16.5 16.5 0 0 0-5.6 0L9 3.3a18 18 0 0 0-4.5 1.4C2 8.7 1.4 12.5 1.7 16.3a18 18 0 0 0 5.5 2.8l.4-.6a13 13 0 0 1-2-1l.5-.4a13 13 0 0 0 11.7 0l.5.4a13 13 0 0 1-2 1l.4.6a18 18 0 0 0 5.5-2.8c.4-4.4-.6-8.2-2.7-11.6zM8.5 14c-.9 0-1.7-.9-1.7-2s.8-2 1.7-2 1.7.9 1.7 2-.8 2-1.7 2zm7 0c-.9 0-1.7-.9-1.7-2s.8-2 1.7-2 1.7.9 1.7 2-.8 2-1.7 2z\"\n />\n </svg>\n );\n}\n\ninterface SatelliteBrand {\n Logo: ComponentType;\n bg: string;\n}\n\nconst SATELLITE_BRANDS: SatelliteBrand[] = [\n { Logo: GitHubMark, bg: \"#1f1f23\" },\n { Logo: VercelMark, bg: \"#0a0a0a\" },\n { Logo: StripeMark, bg: \"#635bff\" },\n { Logo: SlackMark, bg: \"#1a1d21\" },\n { Logo: LinearMark, bg: \"#5e6ad2\" },\n { Logo: FigmaMark, bg: \"#1e1e1e\" },\n { Logo: NotionMark, bg: \"#1a1a1a\" },\n { Logo: DiscordMark, bg: \"#5865f2\" },\n];\n\nfunction EcosystemConstellationBase({\n satelliteCount = 6,\n centerLabel = \"V\",\n accentColor = \"#a855f7\",\n speed = 1,\n className,\n}: EcosystemConstellationProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const count = Math.max(\n 3,\n Math.min(SATELLITE_BRANDS.length, Math.floor(satelliteCount)),\n );\n\n // Center pulse (0..1)\n const pulse = (Math.sin(frame / 12) + 1) / 2;\n const centerScale = 1 + pulse * 0.06;\n\n // Geometry\n const cx = 640;\n const cy = 360;\n const baseRadiusX = 230;\n const baseRadiusY = 180;\n const offscreenRadius = 1200; // 150% of width\n\n // Per-satellite assembly spring (staggered)\n const satellites = Array.from({ length: count }).map((_, i) => {\n const stagger = i * 4;\n const sp = spring({\n frame: frame - stagger,\n fps,\n config: { mass: 1.1, damping: 16, stiffness: 70 },\n durationInFrames: 50,\n });\n const radiusFactor = interpolate(sp, [0, 1], [offscreenRadius, 1]);\n\n // Slight elliptical variation per satellite\n const orbitOffset = i * 22;\n const rX = baseRadiusX + orbitOffset;\n const rY = baseRadiusY + orbitOffset * 0.7;\n // Different angular speed per orbit (slower for outer)\n const angularSpeed = 0.012 - i * 0.0008;\n const baseAngle = (i / count) * Math.PI * 2;\n const angle = baseAngle + frame * angularSpeed;\n\n // Use radiusFactor as a multiplier on the orbit radius\n const x = cx + Math.cos(angle) * rX * radiusFactor;\n const y = cy + Math.sin(angle) * rY * radiusFactor;\n\n // Data pulse: which satellite is currently \"firing\"\n const activeIdx = Math.floor(frame / 30) % count;\n const isActive = activeIdx === i;\n // Within the active 30-frame window, fade the line in/out\n const localFrame = frame - Math.floor(frame / 30) * 30;\n const lineOpacity = isActive\n ? interpolate(localFrame, [0, 8, 22, 30], [0.15, 0.9, 0.9, 0.15], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : 0.15;\n const satScale = isActive\n ? interpolate(localFrame, [0, 8, 22, 30], [1, 1.1, 1.1, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : 1;\n\n const brand = SATELLITE_BRANDS[i % SATELLITE_BRANDS.length];\n return {\n x,\n y,\n Logo: brand.Logo,\n color: brand.bg,\n lineOpacity,\n satScale,\n visible: sp > 0.02,\n };\n });\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n overflow: \"hidden\",\n background: \"transparent\",\n fontFamily: FONT_FAMILY,\n }}\n >\n <svg\n width=\"100%\"\n height=\"100%\"\n viewBox=\"0 0 1280 720\"\n style={{ position: \"absolute\", inset: 0 }}\n >\n {/* Connection lines */}\n {satellites.map((s, i) => (\n <line\n key={`line-${i}`}\n x1={cx}\n y1={cy}\n x2={s.x}\n y2={s.y}\n stroke={accentColor}\n strokeWidth={2}\n strokeLinecap=\"round\"\n opacity={s.visible ? s.lineOpacity : 0}\n />\n ))}\n\n {/* Center glow */}\n <circle\n cx={cx}\n cy={cy}\n r={70 + pulse * 8}\n fill={accentColor}\n opacity={0.12}\n />\n <circle\n cx={cx}\n cy={cy}\n r={50 + pulse * 4}\n fill={accentColor}\n opacity={0.2}\n />\n </svg>\n\n {/* Center logo */}\n <div\n style={{\n position: \"absolute\",\n left: cx,\n top: cy,\n width: 96,\n height: 96,\n marginLeft: -48,\n marginTop: -48,\n borderRadius: 24,\n background: `linear-gradient(180deg, ${accentColor} 0%, ${accentColor}cc 100%)`,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: \"white\",\n fontWeight: 800,\n fontSize: 52,\n letterSpacing: \"-0.05em\",\n scale: `${centerScale}`,\n boxShadow: `0 0 60px ${accentColor}66, inset 0 1px 0 rgba(255,255,255,0.3)`,\n border: \"1px solid rgba(255,255,255,0.15)\",\n }}\n >\n {centerLabel}\n </div>\n\n {/* Satellites */}\n {satellites.map((s, i) => {\n const Logo = s.Logo;\n return (\n <div\n key={`sat-${i}`}\n style={{\n position: \"absolute\",\n left: s.x,\n top: s.y,\n width: 56,\n height: 56,\n marginLeft: -28,\n marginTop: -28,\n borderRadius: 14,\n background: `linear-gradient(180deg, ${s.color} 0%, ${s.color}dd 100%)`,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n scale: `${s.satScale}`,\n boxShadow: `0 8px 30px ${s.color}66, inset 0 1px 0 rgba(255,255,255,0.18)`,\n border: \"1px solid rgba(255,255,255,0.12)\",\n opacity: s.visible ? 1 : 0,\n willChange: \"transform\",\n }}\n >\n <Logo />\n </div>\n );\n })}\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n satelliteCount: {\n type: \"number\",\n min: 3,\n max: 8,\n step: 1,\n default: 6,\n description: \"Satellite count\",\n hiddenFromList: false,\n },\n centerLabel: {\n type: \"text-content\",\n default: \"V\",\n description: \"Center label\",\n },\n accentColor: {\n type: \"color\",\n default: \"#a855f7\",\n description: \"Accent color\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"satelliteCount\",\"centerLabel\",\"accentColor\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n satelliteCount: 6,\n centerLabel: \"V\",\n accentColor: \"#a855f7\",\n speed: 1,\n};\n\ntype EcosystemConstellationElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof EcosystemConstellationBase>;\n\nconst EcosystemConstellationInner = forwardRef<\n HTMLDivElement,\n EcosystemConstellationElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<EcosystemConstellation>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <EcosystemConstellationBase\n {...(componentProps as unknown as ComponentProps<typeof EcosystemConstellationBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const EcosystemConstellation = Interactive.withSchema({\n Component: EcosystemConstellationInner,\n componentName: \"<EcosystemConstellation>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 240+}diff --git a/registry-artifacts/elements/extrude-pop.json b/registry-artifacts/elements/extrude-pop.jsonnew file mode 100644index 00000000..976624b8--- /dev/null+++ b/registry-artifacts/elements/extrude-pop.json@@ -0,0 +1,14 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": null,+ "displayName": "Extrude Pop",+ "durationInFrames": 48,+ "installationMode": "component-owned-sequence",+ "slug": "extrude-pop",+ "sourceCode": "import { forwardRef, useImperativeHandle, useMemo, useRef, type ComponentProps } from \"react\";\nimport { Easing, Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\ninterface ExtrudePopProps {\n className?: string;\n width?: number;\n height?: number;\n letter?: string;\n fontFamily?: string;\n fontWeight?: number | string;\n fontSize?: number;\n basePosition?: [number, number];\n maxTextWidth?: number;\n minimaxRadius?: number;\n extrudeAngleDeg?: number;\n extrudeSteps?: number;\n extrudeStartFrame?: number;\n extrudeEndFrame?: number;\n bodyColor?: string;\n faceColor?: string;\n}\n\nfunction ExtrudePopBase({\n className,\n width = 1920,\n height = 1080,\n letter = \"WIN\",\n fontFamily = \"'Helvetica Neue', Helvetica, Arial, sans-serif\",\n fontWeight = 700,\n fontSize = 603,\n basePosition = [959.2, 752.5],\n maxTextWidth = 1660,\n minimaxRadius = 80,\n extrudeAngleDeg = -58.6,\n extrudeSteps = 200,\n extrudeStartFrame = 0,\n extrudeEndFrame = 48,\n bodyColor = \"#e8192b\",\n faceColor = \"#ffffff\",\n}: ExtrudePopProps) {\n const frame = useCurrentFrame();\n\n const fit = useMemo(() => {\n if (typeof document === \"undefined\") return 1;\n const ctx = document.createElement(\"canvas\").getContext(\"2d\");\n if (!ctx) return 1;\n ctx.font = `${fontWeight} ${fontSize}px ${fontFamily}`;\n const measured = ctx.measureText(letter).width;\n if (measured <= 0) return 1;\n return Math.min(1, maxTextWidth / measured);\n }, [letter, fontFamily, fontWeight, fontSize, maxTextWidth]);\n\n const fitFontSize = fontSize * fit;\n const fitRadius = minimaxRadius * fit;\n\n const radius = interpolate(\n frame,\n [extrudeStartFrame, extrudeEndFrame],\n [0, fitRadius],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.bezier(0.16, 1, 0.3, 1),\n },\n );\n\n const depth = radius * 2;\n\n const theta = (extrudeAngleDeg * Math.PI) / 180;\n const stepX = (depth * Math.sin(theta)) / extrudeSteps;\n const stepY = (depth * Math.cos(theta)) / extrudeSteps;\n\n const glyph = (fill: string, dx: number, dy: number, key?: string) => (\n <text\n key={key}\n x={basePosition[0] + dx}\n y={basePosition[1] + dy}\n textAnchor=\"middle\"\n fontFamily={fontFamily}\n fontWeight={fontWeight}\n fontSize={fitFontSize}\n fill={fill}\n >\n {letter}\n </text>\n );\n\n return (\n <div\n className={className}\n style={{ position: \"absolute\", inset: 0, overflow: \"hidden\" }}\n >\n <svg\n width=\"100%\"\n height=\"100%\"\n viewBox={`0 0 ${width} ${height}`}\n preserveAspectRatio=\"xMidYMid meet\"\n style={{ display: \"block\" }}\n >\n <g>\n {Array.from(\n { length: extrudeSteps + 1 },\n (_, i) => extrudeSteps - i,\n ).map((i) => glyph(bodyColor, stepX * i, stepY * i, `body-${i}`))}\n </g>\n\n {glyph(faceColor, stepX * extrudeSteps, stepY * extrudeSteps)}\n </svg>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n letter: {\n type: \"text-content\",\n default: \"WIN\",\n description: \"Text\",\n },\n bodyColor: {\n type: \"color\",\n default: \"#e8192b\",\n description: \"Body color\",\n },\n faceColor: {\n type: \"color\",\n default: \"#ffffff\",\n description: \"Face color\",\n },\n minimaxRadius: {\n type: \"number\",\n min: 0,\n max: 200,\n step: 5,\n default: 80,\n description: \"Extrude radius\",\n hiddenFromList: false,\n },\n extrudeAngleDeg: {\n type: \"number\",\n min: -180,\n max: 180,\n step: 1,\n default: -58.6,\n description: \"Extrude angle\",\n hiddenFromList: false,\n },\n extrudeEndFrame: {\n type: \"number\",\n min: 10,\n max: 90,\n step: 1,\n default: 48,\n description: \"Extrude ends (frame)\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"letter\",\"bodyColor\",\"faceColor\",\"minimaxRadius\",\"extrudeAngleDeg\",\"extrudeEndFrame\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n letter: \"WIN\",\n bodyColor: \"#e8192b\",\n faceColor: \"#ffffff\",\n minimaxRadius: 80,\n extrudeAngleDeg: -58.6,\n extrudeEndFrame: 48,\n speed: 1,\n};\n\ntype ExtrudePopElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ExtrudePopBase>;\n\nconst ExtrudePopInner = forwardRef<\n HTMLDivElement,\n ExtrudePopElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ExtrudePop>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ExtrudePopBase\n {...(componentProps as unknown as ComponentProps<typeof ExtrudePopBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ExtrudePop = Interactive.withSchema({\n Component: ExtrudePopInner,\n componentName: \"<ExtrudePop>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 48+}diff --git a/registry-artifacts/elements/fade-through.json b/registry-artifacts/elements/fade-through.jsonnew file mode 100644index 00000000..390127f5--- /dev/null+++ b/registry-artifacts/elements/fade-through.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 640,+ "height": 100+ },+ "displayName": "Fade Through",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "fade-through",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface FadeThroughProps {\n fromText: string;\n toText: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction FadeThroughBase({\n fromText,\n toText,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: FadeThroughProps) {\n const frame = useCurrentFrame() * speed;\n\n const exitDur = 8;\n const enterDur = 13;\n const overlapF = 1;\n const microDelayF = 2;\n\n const exitTotal = exitDur;\n const newStart = Math.max(0, exitTotal - overlapF + microDelayF);\n\n const exitEasing = Easing.bezier(0.4, 0, 1, 1);\n const enterEasing = Easing.bezier(0.2, 0, 0, 1);\n\n const fromOpacity = interpolate(frame, [0, exitDur], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n const fromY = interpolate(frame, [0, exitDur], [0, -4], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const local = frame - newStart;\n const toOpacity = interpolate(local, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const toY = interpolate(local, [0, enterDur], [6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const toScale = interpolate(local, [0, enterDur], [0.99, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const blurVal = interpolate(local, [0, enterDur], [2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const fontStack =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"transparent\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity: fromOpacity,\n translate: `0 ${fromY}px`,\n }}\n >\n {fromText}\n </span>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity: toOpacity,\n translate: `0 ${toY}px`,\n scale: `${toScale}`,\n filter: `blur(${blurVal}px)`,\n }}\n >\n {toText}\n </span>\n </div>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n fromText: {\n type: \"text-content\",\n default: \"Calm transitions.\",\n description: \"From text\",\n },\n toText: {\n type: \"text-content\",\n default: \"Fade through content.\",\n description: \"To text\",\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 640,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"fromText\",\"toText\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n fromText: \"Calm transitions.\",\n toText: \"Fade through content.\",\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype FadeThroughElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof FadeThroughBase>;\n\nconst FadeThroughInner = forwardRef<\n HTMLDivElement,\n FadeThroughElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 640, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<FadeThrough>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <FadeThroughBase\n {...(componentProps as unknown as ComponentProps<typeof FadeThroughBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const FadeThrough = Interactive.withSchema({\n Component: FadeThroughInner,\n componentName: \"<FadeThrough>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/focus-blur-resolve.json b/registry-artifacts/elements/focus-blur-resolve.jsonnew file mode 100644index 00000000..04d4a403--- /dev/null+++ b/registry-artifacts/elements/focus-blur-resolve.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 870,+ "height": 100+ },+ "displayName": "Focus Blur Resolve",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "focus-blur-resolve",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface FocusBlurResolveProps {\n text: string;\n blur?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction FocusBlurResolveBase({\n text,\n blur = 14,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: FocusBlurResolveProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const enterDur = 23;\n const exitDur = 16;\n const exitStart = Math.max(enterDur, durationInFrames - exitDur);\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterP = interpolate(frame, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(frame, [exitStart, durationInFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const yEnter = interpolate(frame, [0, enterDur], [14, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const yExit = interpolate(frame, [exitStart, durationInFrames], [0, -10], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const y = yEnter + yExit;\n\n const blurEnter = interpolate(frame, [0, enterDur], [blur, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const blurExit = interpolate(frame, [exitStart, durationInFrames], [0, 10], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const blurVal = blurEnter + blurExit;\n\n const scale = interpolate(frame, [0, enterDur], [1.01, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity,\n translate: `0 ${y}px`,\n scale: `${scale}`,\n filter: `blur(${blurVal}px)`,\n }}\n >\n {text}\n </span>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"Focus resolves clearly.\",\n description: \"Text\",\n },\n blur: {\n type: \"number\",\n min: 1,\n max: 30,\n step: 1,\n default: 14,\n description: \"Blur\",\n hiddenFromList: false,\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 870,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"blur\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"Focus resolves clearly.\",\n blur: 14,\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype FocusBlurResolveElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof FocusBlurResolveBase>;\n\nconst FocusBlurResolveInner = forwardRef<\n HTMLDivElement,\n FocusBlurResolveElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 870, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<FocusBlurResolve>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <FocusBlurResolveBase\n {...(componentProps as unknown as ComponentProps<typeof FocusBlurResolveBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const FocusBlurResolve = Interactive.withSchema({\n Component: FocusBlurResolveInner,\n componentName: \"<FocusBlurResolve>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/gooey-morph.json b/registry-artifacts/elements/gooey-morph.jsonnew file mode 100644index 00000000..66980be3--- /dev/null+++ b/registry-artifacts/elements/gooey-morph.json@@ -0,0 +1,14 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": null,+ "displayName": "Gooey Morph",+ "durationInFrames": 76,+ "installationMode": "component-owned-sequence",+ "slug": "gooey-morph",+ "sourceCode": "import { forwardRef, useId, useImperativeHandle, useRef, type ComponentProps } from \"react\";\nimport { Easing, Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\ninterface GooeyMorphProps {\n className?: string;\n width?: number;\n height?: number;\n barWidth?: number;\n barHeight?: number;\n barStartPositions?: [number, number][];\n barRestPositions?: [number, number][];\n barEntryFrames?: number[];\n barTravelFrames?: number;\n word?: string;\n fontFamily?: string;\n fontSize?: number;\n tracking?: number;\n wordCenterX?: number;\n wordBaselineY?: number;\n blurRadius?: number;\n blurIterations?: number;\n alphaInputBlack?: number;\n alphaInputWhite?: number;\n morphStartFrame?: number;\n morphPeakFrame?: number;\n morphEndFrame?: number;\n displaceAmount?: number;\n displaceSize?: number;\n displaceComplexity?: number;\n displaceEvolutionPerSecond?: number;\n fill?: string;\n}\n\nfunction boxBlurSigma(radius: number, iterations: number): number {\n const w = 2 * radius + 1;\n return Math.sqrt((iterations * (w * w - 1)) / 12);\n}\n\nfunction GooeyMorphBase({\n className,\n width = 1920,\n height = 1080,\n barWidth = 213,\n barHeight = 181,\n barStartPositions = [\n [956.9, 764.9],\n [297.5, 799.9],\n [738.2, 257.9],\n [1617.9, 302.9],\n ],\n barRestPositions = [\n [634.9, 538.9],\n [852.5, 538.9],\n [1070.2, 538.9],\n [1287.9, 538.9],\n ],\n barEntryFrames = [8, 0, 4, 13],\n barTravelFrames = 30,\n word = \"HELLO\",\n fontFamily = \"sans-serif\",\n fontSize = 237,\n tracking = 0,\n wordCenterX = 961.4,\n wordBaselineY = 601.3,\n blurRadius = 6,\n blurIterations = 6,\n alphaInputBlack = 0.4588,\n alphaInputWhite = 0.5098,\n morphStartFrame = 50,\n morphPeakFrame = 63,\n morphEndFrame = 76,\n displaceAmount = 20,\n displaceSize = 19,\n displaceComplexity = 1,\n displaceEvolutionPerSecond = 50,\n fill = \"#ffffff\",\n}: GooeyMorphProps) {\n const frame = useCurrentFrame();\n const filterId = useId();\n\n const travelEase = Easing.bezier(0.88, 0.14, 0.12, 0.86);\n\n const morphWindow: [number, number, number] = [\n morphStartFrame,\n morphPeakFrame,\n morphEndFrame,\n ];\n\n const blur = interpolate(frame, morphWindow, [0, blurRadius, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.bezier(0.33, 0, 0.67, 1),\n });\n const sigma = boxBlurSigma(blur, blurIterations);\n\n const displaceScale = interpolate(\n frame,\n morphWindow,\n [0, displaceAmount, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.bezier(0.33, 0, 0.67, 1),\n },\n );\n\n const barsOpacity = interpolate(\n frame,\n [morphStartFrame, morphEndFrame],\n [1, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n },\n );\n const wordOpacity = interpolate(\n frame,\n [morphStartFrame, morphEndFrame],\n [0, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n },\n );\n\n const slope = 1 / Math.max(alphaInputWhite - alphaInputBlack, 1e-6);\n const offset = -alphaInputBlack * slope;\n\n const evolution = (frame / 30) * displaceEvolutionPerSecond;\n\n return (\n <div\n className={className}\n style={{ position: \"absolute\", inset: 0, overflow: \"hidden\" }}\n >\n <svg\n width=\"100%\"\n height=\"100%\"\n viewBox={`0 0 ${width} ${height}`}\n preserveAspectRatio=\"xMidYMid meet\"\n style={{ display: \"block\" }}\n >\n <defs>\n <filter\n id={filterId}\n x=\"-15%\"\n y=\"-15%\"\n width=\"130%\"\n height=\"130%\"\n colorInterpolationFilters=\"sRGB\"\n >\n <feGaussianBlur\n in=\"SourceGraphic\"\n stdDeviation={sigma}\n result=\"blurred\"\n />\n <feColorMatrix\n in=\"blurred\"\n type=\"matrix\"\n values={[\n \"1 0 0 0 0\",\n \"0 1 0 0 0\",\n \"0 0 1 0 0\",\n `0 0 0 ${slope} ${offset}`,\n ].join(\" \")}\n result=\"threshold\"\n />\n <feTurbulence\n type=\"fractalNoise\"\n baseFrequency={1 / Math.max(displaceSize, 1)}\n numOctaves={Math.max(1, Math.round(displaceComplexity))}\n seed={7}\n result=\"noise\"\n />\n <feOffset\n in=\"noise\"\n dx={evolution}\n dy={evolution * 0.6}\n result=\"noiseMoved\"\n />\n <feDisplacementMap\n in=\"threshold\"\n in2=\"noiseMoved\"\n scale={displaceScale}\n xChannelSelector=\"R\"\n yChannelSelector=\"G\"\n />\n </filter>\n </defs>\n\n <g filter={`url(#${filterId})`}>\n <g opacity={barsOpacity}>\n {barRestPositions.map((rest, i) => {\n const start = barStartPositions[i] ?? rest;\n const entry = barEntryFrames[i] ?? 0;\n const local = frame - entry;\n const stops = [0, barTravelFrames / 2, barTravelFrames];\n\n const x = interpolate(\n local,\n stops,\n [start[0], rest[0], rest[0]],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: travelEase,\n },\n );\n const y = interpolate(\n local,\n stops,\n [start[1], start[1], rest[1]],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: travelEase,\n },\n );\n\n return (\n <rect\n key={rest.join(\",\")}\n x={x - barWidth / 2}\n y={y - barHeight / 2}\n width={barWidth}\n height={barHeight}\n fill={fill}\n />\n );\n })}\n </g>\n\n <text\n x={wordCenterX}\n y={wordBaselineY}\n textAnchor=\"middle\"\n fontFamily={fontFamily}\n fontSize={fontSize}\n fontWeight={900}\n letterSpacing={tracking}\n fill={fill}\n opacity={wordOpacity}\n >\n {word}\n </text>\n </g>\n </svg>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n word: {\n type: \"text-content\",\n default: \"HELLO\",\n description: \"Word\",\n },\n fill: {\n type: \"color\",\n default: \"#f2f2f2\",\n description: \"Fill\",\n },\n fontFamily: {\n type: \"text-content\",\n default: \"'Bodoni Moda', Georgia, serif\",\n description: \"Font family\",\n },\n blurRadius: {\n type: \"number\",\n min: 0,\n max: 20,\n step: 1,\n default: 6,\n description: \"Goo blur radius\",\n hiddenFromList: false,\n },\n displaceAmount: {\n type: \"number\",\n min: 0,\n max: 80,\n step: 1,\n default: 20,\n description: \"Displace amount\",\n hiddenFromList: false,\n },\n barTravelFrames: {\n type: \"number\",\n min: 10,\n max: 60,\n step: 1,\n default: 30,\n description: \"Bar travel (frames)\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"word\",\"fill\",\"fontFamily\",\"blurRadius\",\"displaceAmount\",\"barTravelFrames\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n word: \"HELLO\",\n fill: \"#f2f2f2\",\n fontFamily: \"'Bodoni Moda', Georgia, serif\",\n blurRadius: 6,\n displaceAmount: 20,\n barTravelFrames: 30,\n speed: 1,\n};\n\ntype GooeyMorphElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof GooeyMorphBase>;\n\nconst GooeyMorphInner = forwardRef<\n HTMLDivElement,\n GooeyMorphElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<GooeyMorph>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <GooeyMorphBase\n {...(componentProps as unknown as ComponentProps<typeof GooeyMorphBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const GooeyMorph = Interactive.withSchema({\n Component: GooeyMorphInner,\n componentName: \"<GooeyMorph>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 76+}diff --git a/registry-artifacts/elements/halftone-print.json b/registry-artifacts/elements/halftone-print.jsonnew file mode 100644index 00000000..1017128b--- /dev/null+++ b/registry-artifacts/elements/halftone-print.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/transitions",+ "version": null+ }+ ],+ "dimensions": null,+ "displayName": "Halftone Print",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "halftone-print",+ "sourceCode": "import { AbsoluteFill, Interactive, Sequence, isHtmlInCanvasSupported, useCurrentFrame, useDelayRender, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport React, { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\nimport { type TransitionPresentation, type TransitionPresentationComponentProps } from \"@remotion/transitions\";\n\nconst QUAD = new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]);\n\nconst VERTEX_SHADER = `#version 300 es\nin vec2 a_pos;\nout vec2 v_uv;\nvoid main() {\n v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);\n gl_Position = vec4(a_pos, 0.0, 1.0);\n}`;\n\nconst LAYER: React.CSSProperties = {\n position: \"absolute\",\n inset: 0,\n width: \"100%\",\n height: \"100%\",\n};\n\nconst OUTPUT_LAYER: React.CSSProperties = { ...LAYER, pointerEvents: \"none\" };\n\nconst isCanvasTransitionSupported = (): boolean =>\n isHtmlInCanvasSupported();\n\nconst isCanvasFilterSupported = (): boolean => isHtmlInCanvasSupported();\n\ntype SceneShaderFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderDrawParams<Props> = {\n from: OffscreenCanvas | null;\n to: OffscreenCanvas | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderInstance<Props> = {\n draw: (params: SceneShaderDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneShader<Props> = (\n canvas: OffscreenCanvas,\n) => SceneShaderInstance<Props>;\n\ntype SceneFilterFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterDrawParams<Props> = {\n scene: OffscreenCanvas | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterInstance<Props> = {\n draw: (params: SceneFilterDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneFilter<Props> = (\n canvas: OffscreenCanvas,\n) => SceneFilterInstance<Props>;\n\nfunction compileShader(\n gl: WebGL2RenderingContext,\n source: string,\n type: GLenum,\n): WebGLShader {\n const shader = gl.createShader(type);\n if (!shader) {\n throw new Error(\"canvas-presentation: failed to create shader\");\n }\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n const log = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error(`canvas-presentation: failed to compile shader: ${log}`);\n }\n return shader;\n}\n\nfunction createProgram(\n gl: WebGL2RenderingContext,\n fragment: string,\n): WebGLProgram {\n const program = gl.createProgram();\n if (!program) {\n throw new Error(\"canvas-presentation: failed to create program\");\n }\n const vs = compileShader(gl, VERTEX_SHADER, gl.VERTEX_SHADER);\n const fs = compileShader(gl, fragment, gl.FRAGMENT_SHADER);\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n gl.deleteShader(vs);\n gl.deleteShader(fs);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n const log = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n throw new Error(`canvas-presentation: failed to link program: ${log}`);\n }\n return program;\n}\n\nfunction createSceneTexture(gl: WebGL2RenderingContext): WebGLTexture {\n const texture = gl.createTexture();\n if (!texture) {\n throw new Error(\"canvas-presentation: failed to create texture\");\n }\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n 1,\n 1,\n 0,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n new Uint8Array([0, 0, 0, 0]),\n );\n return texture;\n}\n\nfunction createQuadSurface(canvas: OffscreenCanvas, fragment: string) {\n const gl = canvas.getContext(\"webgl2\", { premultipliedAlpha: true });\n if (!gl) {\n throw new Error(\"canvas-presentation: WebGL2 is unavailable\");\n }\n\n const program = createProgram(gl, fragment);\n const vao = gl.createVertexArray();\n gl.bindVertexArray(vao);\n const buffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, QUAD, gl.STATIC_DRAW);\n const aPos = gl.getAttribLocation(program, \"a_pos\");\n gl.enableVertexAttribArray(aPos);\n gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 0, 0);\n\n const locations = new Map<string, WebGLUniformLocation | null>();\n const uniform = (name: string) => {\n const cached = locations.get(name);\n if (cached !== undefined) {\n return cached;\n }\n const location = gl.getUniformLocation(program, name);\n locations.set(name, location);\n return location;\n };\n\n const clear = () => {\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n };\n\n const textures: WebGLTexture[] = [];\n const createTexture = () => {\n const texture = createSceneTexture(gl);\n textures.push(texture);\n return texture;\n };\n\n const begin = (width: number, height: number) => {\n gl.viewport(0, 0, width, height);\n clear();\n gl.useProgram(program);\n gl.bindVertexArray(vao);\n };\n\n const bindScene = (\n image: OffscreenCanvas | null,\n texture: WebGLTexture,\n unit: number,\n name: string,\n ) => {\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n if (image) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n image,\n );\n }\n gl.uniform1i(uniform(name), unit);\n };\n\n const draw = () => gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n\n const cleanup = () => {\n gl.deleteProgram(program);\n for (const texture of textures) {\n gl.deleteTexture(texture);\n }\n gl.deleteBuffer(buffer);\n gl.deleteVertexArray(vao);\n };\n\n return {\n gl,\n uniform,\n clear,\n createTexture,\n begin,\n bindScene,\n draw,\n cleanup,\n };\n}\n\nfunction makeSceneShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneShaderFrame<Props>) => void,\n): SceneShader<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const fromTexture = surface.createTexture();\n const toTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ from, to, width, height, progress, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(from, fromTexture, 0, \"u_from\");\n surface.bindScene(to, toTexture, 1, \"u_to\");\n\n surface.gl.uniform1f(surface.uniform(\"u_progress\"), progress);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n progress,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nfunction makeFilterShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneFilterFrame<Props>) => void,\n): SceneFilter<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const sceneTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ scene, width, height, frame, time, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(scene, sceneTexture, 0, \"u_scene\");\n\n surface.gl.uniform1f(surface.uniform(\"u_frame\"), frame);\n surface.gl.uniform1f(surface.uniform(\"u_time\"), time);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n frame,\n time,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nconst transferred = new WeakMap<HTMLCanvasElement, OffscreenCanvas>();\n\nfunction takeOffscreen(canvas: HTMLCanvasElement): OffscreenCanvas {\n const existing = transferred.get(canvas);\n if (existing) {\n return existing;\n }\n const created = canvas.transferControlToOffscreen();\n transferred.set(canvas, created);\n return created;\n}\n\nfunction makeCanvasComponent<Props extends Record<string, unknown>>(\n shader: SceneShader<Props>,\n): React.FC<TransitionPresentationComponentProps<Props>> {\n return function CanvasScenePresentation({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n onElementImage,\n onUnmount,\n bothEnteringAndExiting,\n }) {\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneShaderInstance<Props> | null>(null);\n const passedPropsRef = React.useRef(passedProps);\n passedPropsRef.current = passedProps;\n const onElementImageRef = React.useRef(onElementImage);\n onElementImageRef.current = onElementImage;\n const onUnmountRef = React.useRef(onUnmount);\n onUnmountRef.current = onUnmount;\n\n const { delayRender, continueRender } = useDelayRender();\n const passThrough =\n bothEnteringAndExiting && presentationDirection === \"exiting\";\n\n const drawRef = React.useRef<\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => void\n >(() => undefined);\n drawRef.current = (prevImage, nextImage, progress) => {\n const instance = instanceRef.current;\n if (!instance) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: paint\");\n const to = prevImage;\n const from = nextImage;\n const width = from?.width ?? to?.width ?? 0;\n const height = from?.height ?? to?.height ?? 0;\n if (width === 0 || height === 0) {\n instance.clear();\n continueRender(handle);\n return;\n }\n instance.draw({\n from,\n to,\n width,\n height,\n progress: !to ? 0 : !from ? 1 : progress,\n passedProps: passedPropsRef.current,\n });\n continueRender(handle);\n };\n\n const draw = React.useCallback(\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => drawRef.current(prevImage, nextImage, progress),\n [],\n );\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [passThrough, shader]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n if (!scene || !capture || !context) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n onElementImageRef.current(capture, draw);\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, [passThrough, draw]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, [passThrough]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: presentationProgress is the intentional trigger — a new progress value is what schedules the next paint\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n layoutRef.current?.requestPaint?.();\n }, [passThrough, presentationProgress]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n return () => onUnmountRef.current();\n }, [passThrough]);\n\n if (passThrough) {\n return <>{children}</>;\n }\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasFilterProps = {\n children: React.ReactNode;\n};\n\nfunction makeFilterComponent<Props extends Record<string, unknown>>(\n shader: SceneFilter<Props>,\n): React.FC<Props & CanvasFilterProps> {\n return function CanvasSceneFilter(props) {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const { delayRender, continueRender } = useDelayRender();\n\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneFilterInstance<Props> | null>(null);\n\n const passedPropsRef = React.useRef(props);\n passedPropsRef.current = props;\n const frameRef = React.useRef(frame);\n frameRef.current = frame;\n const timeRef = React.useRef(frame / fps);\n timeRef.current = frame / fps;\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [shader]);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n const instance = instanceRef.current;\n if (!scene || !capture || !context || !instance) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n if (capture.width === 0 || capture.height === 0) {\n instance.clear();\n return;\n }\n instance.draw({\n scene: capture,\n width: capture.width,\n height: capture.height,\n frame: frameRef.current,\n time: timeRef.current,\n passedProps: passedPropsRef.current,\n });\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: filter paint\");\n const settle = () => continueRender(handle);\n layout.addEventListener(\"paint\", settle, { once: true });\n layout.requestPaint?.();\n return () => {\n layout.removeEventListener(\"paint\", settle);\n continueRender(handle);\n };\n });\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {props.children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasPresentationOptions<Props extends Record<string, unknown>> = {\n shader: SceneShader<Props>;\n fallback: React.FC<TransitionPresentationComponentProps<Props>>;\n};\n\nfunction makeCanvasPresentation<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasPresentationOptions<Props>): (\n props: Props,\n) => TransitionPresentation<Props> {\n const Canvas = makeCanvasComponent(shader);\n\n const Presentation: React.FC<TransitionPresentationComponentProps<Props>> = (\n props,\n ) =>\n isCanvasTransitionSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n\n return (props) => ({ component: Presentation, props });\n}\n\ntype CanvasFilterOptions<Props extends Record<string, unknown>> = {\n shader: SceneFilter<Props>;\n fallback: React.FC<Props & CanvasFilterProps>;\n};\n\nfunction makeCanvasFilter<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasFilterOptions<Props>): React.FC<Props & CanvasFilterProps> {\n const Canvas = makeFilterComponent(shader);\n\n return function CanvasFilter(props) {\n return isCanvasFilterSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n };\n}\n\ntype HalftonePrintProps = {\n dotSize?: number;\n angle?: number;\n misregistration?: number;\n paperTint?: string;\n};\n\nconst DEFAULTS = {\n dotSize: 10,\n angle: 0,\n misregistration: 1.2,\n paperTint: \"#f4efe4\",\n};\n\ntype NormalizedProps = {\n cell: number;\n angle: number;\n shift: number;\n paper: string;\n};\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_scene;\nuniform float u_aspect;\nuniform float u_cell;\nuniform float u_angle;\nuniform float u_shift;\nuniform vec3 u_paper;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst vec3 CYAN_ABSORB = vec3(0.92, 0.12, 0.02);\nconst vec3 MAGENTA_ABSORB = vec3(0.10, 0.88, 0.06);\nconst vec3 YELLOW_ABSORB = vec3(0.03, 0.10, 0.90);\n\nvec2 toSquare(vec2 uv) {\n return vec2(uv.x * u_aspect, uv.y);\n}\n\nvec2 fromSquare(vec2 p) {\n return vec2(p.x / u_aspect, p.y);\n}\n\nfloat screenInk(float angle, vec2 drift, vec3 pick) {\n vec2 p = toSquare(v_uv);\n float s = sin(angle);\n float c = cos(angle);\n vec2 r = vec2(p.x * c - p.y * s, p.x * s + p.y * c);\n\n vec2 center = (floor(r / u_cell) + 0.5) * u_cell;\n vec2 unrotated =\n vec2(center.x * c + center.y * s, -center.x * s + center.y * c);\n\n vec4 texel = texture(u_scene, fromSquare(unrotated + drift));\n vec3 straight = texel.rgb / max(texel.a, 0.004);\n float ink = clamp(1.0 - dot(straight, pick), 0.0, 1.0) * texel.a;\n\n float radius = sqrt(ink) * u_cell * 0.72;\n float aa = u_cell * 0.045;\n float coverage = 1.0 - smoothstep(radius - aa, radius + aa, length(r - center));\n return coverage * step(0.002, ink);\n}\n\nvoid main() {\n vec4 source = texture(u_scene, v_uv);\n\n float cyan =\n screenInk(u_angle + 0.2618, u_shift * vec2(1.0, 0.0), vec3(1.0, 0.0, 0.0));\n float magenta =\n screenInk(u_angle + 1.3090, u_shift * vec2(-0.5, 0.866), vec3(0.0, 1.0, 0.0));\n float yellow =\n screenInk(u_angle, u_shift * vec2(-0.5, -0.866), vec3(0.0, 0.0, 1.0));\n\n vec3 color = u_paper;\n color *= 1.0 - cyan * CYAN_ABSORB;\n color *= 1.0 - magenta * MAGENTA_ABSORB;\n color *= 1.0 - yellow * YELLOW_ABSORB;\n\n outColor = vec4(color * source.a, source.a);\n}`;\n\nfunction toRgb(hex: string): [number, number, number] {\n const value = hex.replace(\"#\", \"\");\n const full =\n value.length === 3\n ? value\n .split(\"\")\n .map((c) => c + c)\n .join(\"\")\n : value;\n const int = Number.parseInt(full, 16);\n if (Number.isNaN(int)) return [1, 1, 1];\n return [\n ((int >> 16) & 255) / 255,\n ((int >> 8) & 255) / 255,\n (int & 255) / 255,\n ];\n}\n\nconst shader = makeFilterShader<NormalizedProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, passedProps }) => {\n const { cell, angle, shift, paper } = passedProps;\n gl.uniform1f(uniform(\"u_cell\"), cell);\n gl.uniform1f(uniform(\"u_angle\"), angle);\n gl.uniform1f(uniform(\"u_shift\"), shift);\n gl.uniform3fv(uniform(\"u_paper\"), toRgb(paper));\n },\n);\n\nconst HalftonePrintFallback: React.FC<NormalizedProps & CanvasFilterProps> = ({\n children,\n}) => <AbsoluteFill>{children}</AbsoluteFill>;\n\nconst HalftonePrintCanvas = makeCanvasFilter<NormalizedProps>({\n shader,\n fallback: HalftonePrintFallback,\n});\n\nconst HalftonePrintBase: React.FC<\n HalftonePrintProps & CanvasFilterProps\n> = ({\n dotSize = DEFAULTS.dotSize,\n angle = DEFAULTS.angle,\n misregistration = DEFAULTS.misregistration,\n paperTint = DEFAULTS.paperTint,\n children,\n}) => {\n const { height } = useVideoConfig();\n\n return (\n <HalftonePrintCanvas\n cell={Math.max(dotSize, 1) / height}\n angle={(angle * Math.PI) / 180}\n shift={misregistration / height}\n paper={paperTint}\n >\n {children}\n </HalftonePrintCanvas>\n );\n};\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n dotSize: {\n type: \"number\",\n min: 4,\n max: 32,\n step: 1,\n default: 10,\n description: \"Dot size\",\n hiddenFromList: false,\n },\n angle: {\n type: \"number\",\n min: 0,\n max: 90,\n step: 1,\n default: 0,\n description: \"Screen angle\",\n hiddenFromList: false,\n },\n misregistration: {\n type: \"number\",\n min: 0,\n max: 6,\n step: 0.2,\n default: 1.2,\n description: \"Misregistration\",\n hiddenFromList: false,\n },\n paperTint: {\n type: \"color\",\n default: \"#f4efe4\",\n description: \"Paper\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"dotSize\",\"angle\",\"misregistration\",\"paperTint\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n dotSize: 10,\n angle: 0,\n misregistration: 1.2,\n paperTint: \"#f4efe4\",\n speed: 1,\n};\n\ntype HalftonePrintElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof HalftonePrintBase>;\n\nconst HalftonePrintInner = forwardRef<\n HTMLDivElement,\n HalftonePrintElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<HalftonePrint>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <HalftonePrintBase\n {...(componentProps as unknown as ComponentProps<typeof HalftonePrintBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const HalftonePrint = Interactive.withSchema({\n Component: HalftonePrintInner,\n componentName: \"<HalftonePrint>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/hologram.json b/registry-artifacts/elements/hologram.jsonnew file mode 100644index 00000000..dd26c0e7--- /dev/null+++ b/registry-artifacts/elements/hologram.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/transitions",+ "version": null+ }+ ],+ "dimensions": null,+ "displayName": "Hologram",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "hologram",+ "sourceCode": "import { AbsoluteFill, Interactive, Sequence, isHtmlInCanvasSupported, useCurrentFrame, useDelayRender, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport React, { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\nimport { type TransitionPresentation, type TransitionPresentationComponentProps } from \"@remotion/transitions\";\n\nconst QUAD = new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]);\n\nconst VERTEX_SHADER = `#version 300 es\nin vec2 a_pos;\nout vec2 v_uv;\nvoid main() {\n v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);\n gl_Position = vec4(a_pos, 0.0, 1.0);\n}`;\n\nconst LAYER: React.CSSProperties = {\n position: \"absolute\",\n inset: 0,\n width: \"100%\",\n height: \"100%\",\n};\n\nconst OUTPUT_LAYER: React.CSSProperties = { ...LAYER, pointerEvents: \"none\" };\n\nconst isCanvasTransitionSupported = (): boolean =>\n isHtmlInCanvasSupported();\n\nconst isCanvasFilterSupported = (): boolean => isHtmlInCanvasSupported();\n\ntype SceneShaderFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderDrawParams<Props> = {\n from: OffscreenCanvas | null;\n to: OffscreenCanvas | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderInstance<Props> = {\n draw: (params: SceneShaderDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneShader<Props> = (\n canvas: OffscreenCanvas,\n) => SceneShaderInstance<Props>;\n\ntype SceneFilterFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterDrawParams<Props> = {\n scene: OffscreenCanvas | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterInstance<Props> = {\n draw: (params: SceneFilterDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneFilter<Props> = (\n canvas: OffscreenCanvas,\n) => SceneFilterInstance<Props>;\n\nfunction compileShader(\n gl: WebGL2RenderingContext,\n source: string,\n type: GLenum,\n): WebGLShader {\n const shader = gl.createShader(type);\n if (!shader) {\n throw new Error(\"canvas-presentation: failed to create shader\");\n }\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n const log = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error(`canvas-presentation: failed to compile shader: ${log}`);\n }\n return shader;\n}\n\nfunction createProgram(\n gl: WebGL2RenderingContext,\n fragment: string,\n): WebGLProgram {\n const program = gl.createProgram();\n if (!program) {\n throw new Error(\"canvas-presentation: failed to create program\");\n }\n const vs = compileShader(gl, VERTEX_SHADER, gl.VERTEX_SHADER);\n const fs = compileShader(gl, fragment, gl.FRAGMENT_SHADER);\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n gl.deleteShader(vs);\n gl.deleteShader(fs);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n const log = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n throw new Error(`canvas-presentation: failed to link program: ${log}`);\n }\n return program;\n}\n\nfunction createSceneTexture(gl: WebGL2RenderingContext): WebGLTexture {\n const texture = gl.createTexture();\n if (!texture) {\n throw new Error(\"canvas-presentation: failed to create texture\");\n }\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n 1,\n 1,\n 0,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n new Uint8Array([0, 0, 0, 0]),\n );\n return texture;\n}\n\nfunction createQuadSurface(canvas: OffscreenCanvas, fragment: string) {\n const gl = canvas.getContext(\"webgl2\", { premultipliedAlpha: true });\n if (!gl) {\n throw new Error(\"canvas-presentation: WebGL2 is unavailable\");\n }\n\n const program = createProgram(gl, fragment);\n const vao = gl.createVertexArray();\n gl.bindVertexArray(vao);\n const buffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, QUAD, gl.STATIC_DRAW);\n const aPos = gl.getAttribLocation(program, \"a_pos\");\n gl.enableVertexAttribArray(aPos);\n gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 0, 0);\n\n const locations = new Map<string, WebGLUniformLocation | null>();\n const uniform = (name: string) => {\n const cached = locations.get(name);\n if (cached !== undefined) {\n return cached;\n }\n const location = gl.getUniformLocation(program, name);\n locations.set(name, location);\n return location;\n };\n\n const clear = () => {\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n };\n\n const textures: WebGLTexture[] = [];\n const createTexture = () => {\n const texture = createSceneTexture(gl);\n textures.push(texture);\n return texture;\n };\n\n const begin = (width: number, height: number) => {\n gl.viewport(0, 0, width, height);\n clear();\n gl.useProgram(program);\n gl.bindVertexArray(vao);\n };\n\n const bindScene = (\n image: OffscreenCanvas | null,\n texture: WebGLTexture,\n unit: number,\n name: string,\n ) => {\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n if (image) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n image,\n );\n }\n gl.uniform1i(uniform(name), unit);\n };\n\n const draw = () => gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n\n const cleanup = () => {\n gl.deleteProgram(program);\n for (const texture of textures) {\n gl.deleteTexture(texture);\n }\n gl.deleteBuffer(buffer);\n gl.deleteVertexArray(vao);\n };\n\n return {\n gl,\n uniform,\n clear,\n createTexture,\n begin,\n bindScene,\n draw,\n cleanup,\n };\n}\n\nfunction makeSceneShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneShaderFrame<Props>) => void,\n): SceneShader<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const fromTexture = surface.createTexture();\n const toTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ from, to, width, height, progress, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(from, fromTexture, 0, \"u_from\");\n surface.bindScene(to, toTexture, 1, \"u_to\");\n\n surface.gl.uniform1f(surface.uniform(\"u_progress\"), progress);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n progress,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nfunction makeFilterShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneFilterFrame<Props>) => void,\n): SceneFilter<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const sceneTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ scene, width, height, frame, time, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(scene, sceneTexture, 0, \"u_scene\");\n\n surface.gl.uniform1f(surface.uniform(\"u_frame\"), frame);\n surface.gl.uniform1f(surface.uniform(\"u_time\"), time);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n frame,\n time,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nconst transferred = new WeakMap<HTMLCanvasElement, OffscreenCanvas>();\n\nfunction takeOffscreen(canvas: HTMLCanvasElement): OffscreenCanvas {\n const existing = transferred.get(canvas);\n if (existing) {\n return existing;\n }\n const created = canvas.transferControlToOffscreen();\n transferred.set(canvas, created);\n return created;\n}\n\nfunction makeCanvasComponent<Props extends Record<string, unknown>>(\n shader: SceneShader<Props>,\n): React.FC<TransitionPresentationComponentProps<Props>> {\n return function CanvasScenePresentation({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n onElementImage,\n onUnmount,\n bothEnteringAndExiting,\n }) {\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneShaderInstance<Props> | null>(null);\n const passedPropsRef = React.useRef(passedProps);\n passedPropsRef.current = passedProps;\n const onElementImageRef = React.useRef(onElementImage);\n onElementImageRef.current = onElementImage;\n const onUnmountRef = React.useRef(onUnmount);\n onUnmountRef.current = onUnmount;\n\n const { delayRender, continueRender } = useDelayRender();\n const passThrough =\n bothEnteringAndExiting && presentationDirection === \"exiting\";\n\n const drawRef = React.useRef<\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => void\n >(() => undefined);\n drawRef.current = (prevImage, nextImage, progress) => {\n const instance = instanceRef.current;\n if (!instance) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: paint\");\n const to = prevImage;\n const from = nextImage;\n const width = from?.width ?? to?.width ?? 0;\n const height = from?.height ?? to?.height ?? 0;\n if (width === 0 || height === 0) {\n instance.clear();\n continueRender(handle);\n return;\n }\n instance.draw({\n from,\n to,\n width,\n height,\n progress: !to ? 0 : !from ? 1 : progress,\n passedProps: passedPropsRef.current,\n });\n continueRender(handle);\n };\n\n const draw = React.useCallback(\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => drawRef.current(prevImage, nextImage, progress),\n [],\n );\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [passThrough, shader]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n if (!scene || !capture || !context) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n onElementImageRef.current(capture, draw);\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, [passThrough, draw]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, [passThrough]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: presentationProgress is the intentional trigger — a new progress value is what schedules the next paint\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n layoutRef.current?.requestPaint?.();\n }, [passThrough, presentationProgress]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n return () => onUnmountRef.current();\n }, [passThrough]);\n\n if (passThrough) {\n return <>{children}</>;\n }\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasFilterProps = {\n children: React.ReactNode;\n};\n\nfunction makeFilterComponent<Props extends Record<string, unknown>>(\n shader: SceneFilter<Props>,\n): React.FC<Props & CanvasFilterProps> {\n return function CanvasSceneFilter(props) {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const { delayRender, continueRender } = useDelayRender();\n\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneFilterInstance<Props> | null>(null);\n\n const passedPropsRef = React.useRef(props);\n passedPropsRef.current = props;\n const frameRef = React.useRef(frame);\n frameRef.current = frame;\n const timeRef = React.useRef(frame / fps);\n timeRef.current = frame / fps;\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [shader]);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n const instance = instanceRef.current;\n if (!scene || !capture || !context || !instance) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n if (capture.width === 0 || capture.height === 0) {\n instance.clear();\n return;\n }\n instance.draw({\n scene: capture,\n width: capture.width,\n height: capture.height,\n frame: frameRef.current,\n time: timeRef.current,\n passedProps: passedPropsRef.current,\n });\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: filter paint\");\n const settle = () => continueRender(handle);\n layout.addEventListener(\"paint\", settle, { once: true });\n layout.requestPaint?.();\n return () => {\n layout.removeEventListener(\"paint\", settle);\n continueRender(handle);\n };\n });\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {props.children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasPresentationOptions<Props extends Record<string, unknown>> = {\n shader: SceneShader<Props>;\n fallback: React.FC<TransitionPresentationComponentProps<Props>>;\n};\n\nfunction makeCanvasPresentation<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasPresentationOptions<Props>): (\n props: Props,\n) => TransitionPresentation<Props> {\n const Canvas = makeCanvasComponent(shader);\n\n const Presentation: React.FC<TransitionPresentationComponentProps<Props>> = (\n props,\n ) =>\n isCanvasTransitionSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n\n return (props) => ({ component: Presentation, props });\n}\n\ntype CanvasFilterOptions<Props extends Record<string, unknown>> = {\n shader: SceneFilter<Props>;\n fallback: React.FC<Props & CanvasFilterProps>;\n};\n\nfunction makeCanvasFilter<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasFilterOptions<Props>): React.FC<Props & CanvasFilterProps> {\n const Canvas = makeFilterComponent(shader);\n\n return function CanvasFilter(props) {\n return isCanvasFilterSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n };\n}\n\ntype HologramProps = {\n tint?: string;\n glow?: number;\n ghost?: number;\n flicker?: number;\n intensity?: number;\n};\n\nconst DEFAULTS = {\n tint: \"#63e8ff\",\n glow: 1,\n ghost: 1,\n flicker: 1,\n intensity: 1,\n};\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_scene;\nuniform float u_aspect;\nuniform float u_frame;\nuniform vec3 u_tint;\nuniform float u_glow;\nuniform float u_ghost;\nuniform float u_flicker;\nuniform float u_intensity;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst float PI = 3.141592653589793;\nconst float TAU = 6.28318530718;\nconst float GOLDEN = 2.39996323;\nconst int HALO_TAPS = 8;\nconst vec3 LUMA = vec3(0.299, 0.587, 0.114);\n\nfloat hash(vec2 p) {\n return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453123);\n}\n\nfloat lumaAt(vec2 uv) {\n return dot(texture(u_scene, uv).rgb, LUMA);\n}\n\nvoid main() {\n vec4 src = texture(u_scene, v_uv);\n float amount = clamp(u_intensity, 0.0, 1.0);\n\n if (!(amount > 0.001)) {\n outColor = src;\n return;\n }\n\n float row = floor(v_uv.y * 300.0);\n float clock = floor(u_frame);\n float slip =\n (hash(vec2(row, clock)) - 0.5) * u_ghost * 0.006 * step(0.55, hash(vec2(row, clock + 3.0)));\n vec2 base = vec2(v_uv.x + slip / u_aspect, v_uv.y);\n\n vec4 held = texture(u_scene, base);\n float lit = dot(held.rgb, LUMA);\n\n vec2 apart = vec2(u_ghost * 0.0045 / u_aspect, u_ghost * 0.0035);\n vec3 twin = texture(u_scene, base + apart).rgb;\n\n float step2 = 0.0022;\n float gx =\n lumaAt(base + vec2(step2 / u_aspect, 0.0)) -\n lumaAt(base - vec2(step2 / u_aspect, 0.0));\n float gy = lumaAt(base + vec2(0.0, step2)) - lumaAt(base - vec2(0.0, step2));\n float rim = clamp(length(vec2(gx, gy)) * 7.0, 0.0, 1.0);\n\n vec3 halo = vec3(0.0);\n for (int i = 0; i < HALO_TAPS; i++) {\n float angle = float(i) * GOLDEN;\n float reach = sqrt((float(i) + 0.5) / float(HALO_TAPS)) * u_glow * 0.022;\n vec2 at = base + vec2(cos(angle) * reach / u_aspect, sin(angle) * reach);\n halo += max(texture(u_scene, at).rgb - 0.34, vec3(0.0));\n }\n halo /= float(HALO_TAPS);\n\n vec3 core = u_tint * (0.12 + lit * 1.55);\n core = mix(core, held.rgb * u_tint * 1.9, 0.12);\n core += u_tint * rim * 1.9 * u_glow;\n core += halo * u_tint * 2.4 * u_glow;\n core += twin * u_tint * 0.5 * u_ghost;\n\n float interlace = mod(row, 2.0) < 1.0 ? 1.0 : 0.58;\n core *= interlace;\n\n float blink =\n 1.0 -\n u_flicker *\n (0.04 + 0.05 * hash(vec2(clock, 7.0))) *\n (0.5 + 0.5 * sin(u_frame * TAU / 15.0));\n core *= blink;\n\n float presence = clamp(lit * 1.5 + rim * 0.8 + 0.03, 0.0, 1.0);\n vec3 painted = clamp(u_tint * 0.035 + core * presence, 0.0, 1.0);\n\n outColor = vec4(mix(src.rgb, painted, amount), src.a);\n}`;\n\nfunction toRgb(hex: string): [number, number, number] {\n const value = hex.replace(\"#\", \"\");\n const full =\n value.length === 3\n ? value\n .split(\"\")\n .map((c) => c + c)\n .join(\"\")\n : value;\n const int = Number.parseInt(full, 16);\n if (Number.isNaN(int)) return [1, 1, 1];\n return [\n ((int >> 16) & 255) / 255,\n ((int >> 8) & 255) / 255,\n (int & 255) / 255,\n ];\n}\n\nconst shader = makeFilterShader<HologramProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, passedProps }) => {\n const {\n tint = DEFAULTS.tint,\n glow = DEFAULTS.glow,\n ghost = DEFAULTS.ghost,\n flicker = DEFAULTS.flicker,\n intensity = DEFAULTS.intensity,\n } = passedProps;\n gl.uniform3fv(uniform(\"u_tint\"), toRgb(tint));\n gl.uniform1f(uniform(\"u_glow\"), glow);\n gl.uniform1f(uniform(\"u_ghost\"), ghost);\n gl.uniform1f(uniform(\"u_flicker\"), flicker);\n gl.uniform1f(uniform(\"u_intensity\"), intensity);\n },\n);\n\nconst HologramFallback: React.FC<HologramProps & CanvasFilterProps> = ({\n children,\n tint = DEFAULTS.tint,\n intensity = DEFAULTS.intensity,\n}) => (\n <AbsoluteFill>\n <AbsoluteFill style={{ filter: `saturate(${1 - 0.5 * intensity})` }}>\n {children}\n </AbsoluteFill>\n <AbsoluteFill\n style={{\n background: tint,\n mixBlendMode: \"color\",\n opacity: 0.75 * intensity,\n }}\n />\n <AbsoluteFill\n style={{\n background:\n \"repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.32) 0px, rgba(0, 0, 0, 0.32) 2px, transparent 2px, transparent 4px)\",\n opacity: intensity,\n }}\n />\n </AbsoluteFill>\n);\n\nconst HologramBase = makeCanvasFilter<HologramProps>({\n shader,\n fallback: HologramFallback,\n});\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n tint: {\n type: \"color\",\n default: \"#63e8ff\",\n description: \"Tint\",\n },\n glow: {\n type: \"number\",\n min: 0,\n max: 3,\n step: 0.1,\n default: 1,\n description: \"Glow\",\n hiddenFromList: false,\n },\n ghost: {\n type: \"number\",\n min: 0,\n max: 3,\n step: 0.1,\n default: 1,\n description: \"Ghost\",\n hiddenFromList: false,\n },\n flicker: {\n type: \"number\",\n min: 0,\n max: 3,\n step: 0.1,\n default: 1,\n description: \"Flicker\",\n hiddenFromList: false,\n },\n intensity: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 1,\n description: \"Intensity\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"tint\",\"glow\",\"ghost\",\"flicker\",\"intensity\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n tint: \"#63e8ff\",\n glow: 1,\n ghost: 1,\n flicker: 1,\n intensity: 1,\n speed: 1,\n};\n\ntype HologramElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof HologramBase>;\n\nconst HologramInner = forwardRef<\n HTMLDivElement,\n HologramElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<Hologram>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <HologramBase\n {...(componentProps as unknown as ComponentProps<typeof HologramBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const Hologram = Interactive.withSchema({\n Component: HologramInner,\n componentName: \"<Hologram>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/icon-activity.json b/registry-artifacts/elements/icon-activity.jsonnew file mode 100644index 00000000..2fac8ca4--- /dev/null+++ b/registry-artifacts/elements/icon-activity.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Activity",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "icon-activity",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst PULSE_PATH =\n \"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 45,\n loop: true,\n} as const;\n\nfunction ActivityIconBase({\n animation = \"both\",\n loop = true,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const beat = acting\n ? interpolate(\n actionProgress,\n [0, 0.1, 0.18, 0.28, 0.38, 1],\n [1, 1.07, 1, 1.05, 1, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n )\n : 1;\n\n const pulse = drawnPathProps(PULSE_PATH, acting ? 1 : drawProgress);\n\n const scale = (0.85 + 0.15 * scaleIn) * beat;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={PULSE_PATH}\n strokeDasharray={pulse.strokeDasharray}\n strokeDashoffset={pulse.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction ActivityIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: true,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: true,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype ActivityIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ActivityIconBase>;\n\nconst ActivityIconInner = forwardRef<\n HTMLDivElement,\n ActivityIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ActivityIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ActivityIconBase\n {...(componentProps as unknown as ComponentProps<typeof ActivityIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ActivityIcon = Interactive.withSchema({\n Component: ActivityIconInner,\n componentName: \"<ActivityIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/icon-alert-triangle.json b/registry-artifacts/elements/icon-alert-triangle.jsonnew file mode 100644index 00000000..e05576c1--- /dev/null+++ b/registry-artifacts/elements/icon-alert-triangle.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Alert Triangle",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-alert-triangle",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst TRIANGLE_PATH =\n \"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\";\nconst STEM_PATH = \"M12 9v4\";\nconst DOT_PATH = \"M12 17h.01\";\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 24,\n loop: false,\n} as const;\n\nfunction AlertTriangleIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const triangleProgress = interpolate(linearDraw, [0, 0.875], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const stemProgress = interpolate(linearDraw, [0.625, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const dotPop = interpolate(linearDraw, [0.85, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.back(1.8)),\n });\n\n const triangle = drawnPathProps(TRIANGLE_PATH, triangleProgress);\n const stem = drawnPathProps(STEM_PATH, stemProgress);\n\n const blinkOpacity = interpolate(\n actionProgress,\n [0, 0.2, 0.4, 0.6, 0.8],\n [1, 0.25, 1, 0.25, 1],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n const stemSquash = interpolate(\n actionProgress,\n [0, 0.2, 0.4, 0.6, 0.8],\n [1, 0.85, 1, 0.85, 1],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={TRIANGLE_PATH}\n strokeDasharray={triangle.strokeDasharray}\n strokeDashoffset={triangle.strokeDashoffset}\n />\n <g opacity={blinkOpacity}>\n <g\n transform={`translate(12 13) scale(1 ${stemSquash}) translate(-12 -13)`}\n >\n <path\n d={STEM_PATH}\n strokeDasharray={stem.strokeDasharray}\n strokeDashoffset={stem.strokeDashoffset}\n />\n </g>\n <g transform={`translate(12 17) scale(${dotPop}) translate(-12 -17)`}>\n <path d={DOT_PATH} />\n </g>\n </g>\n </svg>\n );\n}\n\nfunction AlertTriangleIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={TRIANGLE_PATH} />\n <path d={STEM_PATH} />\n <path d={DOT_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype AlertTriangleIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof AlertTriangleIconBase>;\n\nconst AlertTriangleIconInner = forwardRef<\n HTMLDivElement,\n AlertTriangleIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<AlertTriangleIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <AlertTriangleIconBase\n {...(componentProps as unknown as ComponentProps<typeof AlertTriangleIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const AlertTriangleIcon = Interactive.withSchema({\n Component: AlertTriangleIconInner,\n componentName: \"<AlertTriangleIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-arrow-down.json b/registry-artifacts/elements/icon-arrow-down.jsonnew file mode 100644index 00000000..7ab7448b--- /dev/null+++ b/registry-artifacts/elements/icon-arrow-down.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Arrow Down",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "icon-arrow-down",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst SHAFT_PATH = \"M12 5v14\";\nconst HEAD_PATH = \"m19 12-7 7-7-7\";\n\nconst TIMINGS = {\n drawDurationInFrames: 12,\n actionDelayInFrames: 2,\n actionDurationInFrames: 16,\n loop: false,\n} as const;\n\nfunction ArrowDownIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const shaftProgress = interpolate(linearDraw, [0, 0.66], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const headProgress = interpolate(linearDraw, [0.5, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n\n const shaft = drawnPathProps(SHAFT_PATH, shaftProgress);\n const head = drawnPathProps(HEAD_PATH, headProgress);\n\n const outward = interpolate(actionProgress, [0, 0.5], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.back(2.2)),\n });\n const settle = interpolate(actionProgress, [0.5, 1], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const nudgeY = 6 * (actionProgress < 0.5 ? outward : settle);\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`translate(0 ${nudgeY})`}>\n <path\n d={SHAFT_PATH}\n strokeDasharray={shaft.strokeDasharray}\n strokeDashoffset={shaft.strokeDashoffset}\n />\n <path\n d={HEAD_PATH}\n strokeDasharray={head.strokeDasharray}\n strokeDashoffset={head.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction ArrowDownIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={SHAFT_PATH} />\n <path d={HEAD_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype ArrowDownIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ArrowDownIconBase>;\n\nconst ArrowDownIconInner = forwardRef<\n HTMLDivElement,\n ArrowDownIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ArrowDownIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ArrowDownIconBase\n {...(componentProps as unknown as ComponentProps<typeof ArrowDownIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ArrowDownIcon = Interactive.withSchema({\n Component: ArrowDownIconInner,\n componentName: \"<ArrowDownIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/icon-arrow-left.json b/registry-artifacts/elements/icon-arrow-left.jsonnew file mode 100644index 00000000..322afe87--- /dev/null+++ b/registry-artifacts/elements/icon-arrow-left.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Arrow Left",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "icon-arrow-left",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst SHAFT_PATH = \"M19 12H5\";\nconst HEAD_PATH = \"m12 19-7-7 7-7\";\n\nconst TIMINGS = {\n drawDurationInFrames: 12,\n actionDelayInFrames: 2,\n actionDurationInFrames: 16,\n loop: false,\n} as const;\n\nfunction ArrowLeftIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const shaftProgress = interpolate(linearDraw, [0, 0.66], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const headProgress = interpolate(linearDraw, [0.5, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n\n const shaft = drawnPathProps(SHAFT_PATH, shaftProgress);\n const head = drawnPathProps(HEAD_PATH, headProgress);\n\n const outward = interpolate(actionProgress, [0, 0.5], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.back(2.2)),\n });\n const settle = interpolate(actionProgress, [0.5, 1], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const nudgeX = -6 * (actionProgress < 0.5 ? outward : settle);\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`translate(${nudgeX} 0)`}>\n <path\n d={SHAFT_PATH}\n strokeDasharray={shaft.strokeDasharray}\n strokeDashoffset={shaft.strokeDashoffset}\n />\n <path\n d={HEAD_PATH}\n strokeDasharray={head.strokeDasharray}\n strokeDashoffset={head.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction ArrowLeftIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={SHAFT_PATH} />\n <path d={HEAD_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype ArrowLeftIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ArrowLeftIconBase>;\n\nconst ArrowLeftIconInner = forwardRef<\n HTMLDivElement,\n ArrowLeftIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ArrowLeftIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ArrowLeftIconBase\n {...(componentProps as unknown as ComponentProps<typeof ArrowLeftIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ArrowLeftIcon = Interactive.withSchema({\n Component: ArrowLeftIconInner,\n componentName: \"<ArrowLeftIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/icon-arrow-right.json b/registry-artifacts/elements/icon-arrow-right.jsonnew file mode 100644index 00000000..b4ca1e45--- /dev/null+++ b/registry-artifacts/elements/icon-arrow-right.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Arrow Right",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "icon-arrow-right",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst SHAFT_PATH = \"M5 12h14\";\nconst HEAD_PATH = \"m12 5 7 7-7 7\";\n\nconst TIMINGS = {\n drawDurationInFrames: 12,\n actionDelayInFrames: 2,\n actionDurationInFrames: 16,\n loop: false,\n} as const;\n\nfunction ArrowRightIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const shaftProgress = interpolate(linearDraw, [0, 0.66], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const headProgress = interpolate(linearDraw, [0.5, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n\n const shaft = drawnPathProps(SHAFT_PATH, shaftProgress);\n const head = drawnPathProps(HEAD_PATH, headProgress);\n\n const outward = interpolate(actionProgress, [0, 0.5], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.back(2.2)),\n });\n const settle = interpolate(actionProgress, [0.5, 1], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const nudgeX = 6 * (actionProgress < 0.5 ? outward : settle);\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`translate(${nudgeX} 0)`}>\n <path\n d={SHAFT_PATH}\n strokeDasharray={shaft.strokeDasharray}\n strokeDashoffset={shaft.strokeDashoffset}\n />\n <path\n d={HEAD_PATH}\n strokeDasharray={head.strokeDasharray}\n strokeDashoffset={head.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction ArrowRightIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={SHAFT_PATH} />\n <path d={HEAD_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype ArrowRightIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ArrowRightIconBase>;\n\nconst ArrowRightIconInner = forwardRef<\n HTMLDivElement,\n ArrowRightIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ArrowRightIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ArrowRightIconBase\n {...(componentProps as unknown as ComponentProps<typeof ArrowRightIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ArrowRightIcon = Interactive.withSchema({\n Component: ArrowRightIconInner,\n componentName: \"<ArrowRightIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/icon-arrow-up.json b/registry-artifacts/elements/icon-arrow-up.jsonnew file mode 100644index 00000000..97092853--- /dev/null+++ b/registry-artifacts/elements/icon-arrow-up.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Arrow Up",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "icon-arrow-up",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst SHAFT_PATH = \"M12 19V5\";\nconst HEAD_PATH = \"m5 12 7-7 7 7\";\n\nconst TIMINGS = {\n drawDurationInFrames: 12,\n actionDelayInFrames: 2,\n actionDurationInFrames: 16,\n loop: false,\n} as const;\n\nfunction ArrowUpIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const shaftProgress = interpolate(linearDraw, [0, 0.66], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const headProgress = interpolate(linearDraw, [0.5, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n\n const shaft = drawnPathProps(SHAFT_PATH, shaftProgress);\n const head = drawnPathProps(HEAD_PATH, headProgress);\n\n const outward = interpolate(actionProgress, [0, 0.5], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.back(2.2)),\n });\n const settle = interpolate(actionProgress, [0.5, 1], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const nudgeY = -6 * (actionProgress < 0.5 ? outward : settle);\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`translate(0 ${nudgeY})`}>\n <path\n d={SHAFT_PATH}\n strokeDasharray={shaft.strokeDasharray}\n strokeDashoffset={shaft.strokeDashoffset}\n />\n <path\n d={HEAD_PATH}\n strokeDasharray={head.strokeDasharray}\n strokeDashoffset={head.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction ArrowUpIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={SHAFT_PATH} />\n <path d={HEAD_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype ArrowUpIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ArrowUpIconBase>;\n\nconst ArrowUpIconInner = forwardRef<\n HTMLDivElement,\n ArrowUpIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ArrowUpIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ArrowUpIconBase\n {...(componentProps as unknown as ComponentProps<typeof ArrowUpIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ArrowUpIcon = Interactive.withSchema({\n Component: ArrowUpIconInner,\n componentName: \"<ArrowUpIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/icon-at-sign.json b/registry-artifacts/elements/icon-at-sign.jsonnew file mode 100644index 00000000..fdf47b79--- /dev/null+++ b/registry-artifacts/elements/icon-at-sign.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "At Sign",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-at-sign",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst CIRCLE_PATH = \"M12 8a4 4 0 1 0 0 8 4 4 0 1 0 0-8Z\";\nconst SWOOSH_PATH = \"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8\";\n\nconst CENTER = 12;\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 22,\n loop: false,\n} as const;\n\nfunction AtSignIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const circleDraw = interpolate(linearDraw, [0, 0.55], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const swooshDraw = interpolate(linearDraw, [0.35, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const circlePop = acting\n ? interpolate(actionProgress, [0, 0.22, 0.45], [1, 1.15, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n const swooshProgress = acting ? 1 : swooshDraw;\n const circleProgress = acting ? 1 : circleDraw;\n\n const circle = drawnPathProps(CIRCLE_PATH, circleProgress);\n const swoosh = drawnPathProps(SWOOSH_PATH, swooshProgress);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const popTransform = `translate(${CENTER * (1 - circlePop)} ${CENTER * (1 - circlePop)}) scale(${circlePop})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={popTransform}>\n <path\n d={CIRCLE_PATH}\n strokeDasharray={circle.strokeDasharray}\n strokeDashoffset={circle.strokeDashoffset}\n />\n </g>\n <path\n d={SWOOSH_PATH}\n strokeDasharray={swoosh.strokeDasharray}\n strokeDashoffset={swoosh.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction AtSignIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <path d={SWOOSH_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype AtSignIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof AtSignIconBase>;\n\nconst AtSignIconInner = forwardRef<\n HTMLDivElement,\n AtSignIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<AtSignIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <AtSignIconBase\n {...(componentProps as unknown as ComponentProps<typeof AtSignIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const AtSignIcon = Interactive.withSchema({\n Component: AtSignIconInner,\n componentName: \"<AtSignIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-award.json b/registry-artifacts/elements/icon-award.jsonnew file mode 100644index 00000000..5abc672b--- /dev/null+++ b/registry-artifacts/elements/icon-award.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Award",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-award",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst MEDAL_PATH = \"M12 2a6 6 0 1 0 0 12 6 6 0 1 0 0-12Z\";\nconst RIBBON_PATH =\n \"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526\";\n\nconst MEDAL_CX = 12;\nconst MEDAL_CY = 8;\nconst PIVOT_X = 12;\nconst PIVOT_Y = 2;\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 30,\n loop: false,\n} as const;\n\nfunction AwardIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const ribbonDraw = acting\n ? interpolate(actionProgress, [0.05, 0.4], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n })\n : 0;\n const pop = acting\n ? interpolate(actionProgress, [0.35, 0.55, 1], [1, 1.15, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n const swing = acting\n ? interpolate(\n actionProgress,\n [0.35, 0.5, 0.65, 0.8, 1],\n [0, 4, -3, 1.5, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.sin),\n },\n )\n : 0;\n\n const medal = drawnPathProps(MEDAL_PATH, acting ? 1 : drawProgress);\n const ribbon = drawnPathProps(RIBBON_PATH, ribbonDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const popTransform = `translate(${MEDAL_CX * (1 - pop)} ${MEDAL_CY * (1 - pop)}) scale(${pop})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`rotate(${swing} ${PIVOT_X} ${PIVOT_Y})`}>\n <path\n d={RIBBON_PATH}\n strokeDasharray={ribbon.strokeDasharray}\n strokeDashoffset={ribbon.strokeDashoffset}\n />\n <g transform={popTransform}>\n <path\n d={MEDAL_PATH}\n strokeDasharray={medal.strokeDasharray}\n strokeDashoffset={medal.strokeDashoffset}\n />\n </g>\n </g>\n </svg>\n );\n}\n\nfunction AwardIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526\" />\n <circle cx=\"12\" cy=\"8\" r=\"6\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype AwardIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof AwardIconBase>;\n\nconst AwardIconInner = forwardRef<\n HTMLDivElement,\n AwardIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<AwardIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <AwardIconBase\n {...(componentProps as unknown as ComponentProps<typeof AwardIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const AwardIcon = Interactive.withSchema({\n Component: AwardIconInner,\n componentName: \"<AwardIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-bar-chart-3.json b/registry-artifacts/elements/icon-bar-chart-3.jsonnew file mode 100644index 00000000..d197d61b--- /dev/null+++ b/registry-artifacts/elements/icon-bar-chart-3.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Bar Chart 3",+ "durationInFrames": 80,+ "installationMode": "component-owned-sequence",+ "slug": "icon-bar-chart-3",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst AXIS_PATH = \"M3 3v16a2 2 0 0 0 2 2h16\";\nconst BARS = [\"M8 17V14\", \"M13 17V5\", \"M18 17V9\"];\nconst BASE_Y = 17;\n\nconst TIMINGS = {\n drawDurationInFrames: 12,\n actionDelayInFrames: 2,\n actionDurationInFrames: 30,\n loop: false,\n} as const;\n\nfunction BarChart3IconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const axis = drawnPathProps(AXIS_PATH, drawProgress);\n\n const bars = BARS.map((d, i) => {\n const start = i * 0.22;\n const grow = interpolate(\n actionProgress,\n [start, start + 0.3, start + 0.42],\n [0, 1.08, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n },\n );\n const scaleY = animation === \"draw\" ? 1 : acting ? grow : 0;\n return { d, scaleY };\n });\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={AXIS_PATH}\n strokeDasharray={axis.strokeDasharray}\n strokeDashoffset={axis.strokeDashoffset}\n />\n {bars.map((bar) => (\n <g\n key={bar.d}\n transform={`translate(0 ${BASE_Y * (1 - bar.scaleY)}) scale(1 ${bar.scaleY})`}\n >\n <path d={bar.d} />\n </g>\n ))}\n </svg>\n );\n}\n\nfunction BarChart3IconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={AXIS_PATH} />\n <path d=\"M18 17V9\" />\n <path d=\"M13 17V5\" />\n <path d=\"M8 17v-3\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype BarChart3IconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof BarChart3IconBase>;\n\nconst BarChart3IconInner = forwardRef<\n HTMLDivElement,\n BarChart3IconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<BarChart3Icon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <BarChart3IconBase\n {...(componentProps as unknown as ComponentProps<typeof BarChart3IconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const BarChart3Icon = Interactive.withSchema({\n Component: BarChart3IconInner,\n componentName: \"<BarChart3Icon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 80+}diff --git a/registry-artifacts/elements/icon-bell.json b/registry-artifacts/elements/icon-bell.jsonnew file mode 100644index 00000000..b56d2c47--- /dev/null+++ b/registry-artifacts/elements/icon-bell.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Bell",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-bell",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst BODY_PATH =\n \"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326\";\nconst CLAPPER_PATH = \"M10.268 21a2 2 0 0 0 3.464 0\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 30,\n loop: false,\n} as const;\n\nfunction BellIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const bodyProgress = interpolate(linearDraw, [0, 0.857], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const clapperProgress = interpolate(linearDraw, [0.714, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const body = drawnPathProps(BODY_PATH, bodyProgress);\n const clapper = drawnPathProps(CLAPPER_PATH, clapperProgress);\n\n const ring = interpolate(\n actionProgress,\n [0, 0.2, 0.4, 0.6, 0.8, 1],\n [0, 14, -11, 7, -3, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`rotate(${ring} 12 2)`}>\n <path\n d={BODY_PATH}\n strokeDasharray={body.strokeDasharray}\n strokeDashoffset={body.strokeDashoffset}\n />\n <path\n d={CLAPPER_PATH}\n strokeDasharray={clapper.strokeDasharray}\n strokeDashoffset={clapper.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction BellIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={BODY_PATH} />\n <path d={CLAPPER_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype BellIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof BellIconBase>;\n\nconst BellIconInner = forwardRef<\n HTMLDivElement,\n BellIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<BellIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <BellIconBase\n {...(componentProps as unknown as ComponentProps<typeof BellIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const BellIcon = Interactive.withSchema({\n Component: BellIconInner,\n componentName: \"<BellIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-bookmark.json b/registry-artifacts/elements/icon-bookmark.jsonnew file mode 100644index 00000000..d4ed27d3--- /dev/null+++ b/registry-artifacts/elements/icon-bookmark.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Bookmark",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-bookmark",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst BOOKMARK_PATH =\n \"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction BookmarkIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const drop = acting\n ? interpolate(actionProgress, [0, 0.4, 0.6, 1], [-3, 0.5, -0.2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const tilt = acting\n ? interpolate(actionProgress, [0, 0.35, 0.7], [0, -6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n\n const dash = drawnPathProps(BOOKMARK_PATH, drawProgress);\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`rotate(${tilt} 12 3) translate(0 ${drop})`}>\n <path\n d={BOOKMARK_PATH}\n strokeDasharray={dash.strokeDasharray}\n strokeDashoffset={dash.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction BookmarkIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={BOOKMARK_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype BookmarkIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof BookmarkIconBase>;\n\nconst BookmarkIconInner = forwardRef<\n HTMLDivElement,\n BookmarkIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<BookmarkIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <BookmarkIconBase\n {...(componentProps as unknown as ComponentProps<typeof BookmarkIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const BookmarkIcon = Interactive.withSchema({\n Component: BookmarkIconInner,\n componentName: \"<BookmarkIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-calendar.json b/registry-artifacts/elements/icon-calendar.jsonnew file mode 100644index 00000000..9f42abbc--- /dev/null+++ b/registry-artifacts/elements/icon-calendar.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Calendar",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-calendar",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst FRAME_PATH =\n \"M5 4H19A2 2 0 0 1 21 6V20A2 2 0 0 1 19 22H5A2 2 0 0 1 3 20V6A2 2 0 0 1 5 4Z\";\nconst RING1_PATH = \"M8 2v4\";\nconst RING2_PATH = \"M16 2v4\";\nconst RULE_PATH = \"M3 10H21\";\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction CalendarIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const frameDraw = interpolate(linearDraw, [0, 0.6], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const ringsDraw = interpolate(linearDraw, [0.4, 0.75], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const ruleDraw = interpolate(linearDraw, [0.65, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const ring1Dip = acting\n ? interpolate(actionProgress, [0, 0.25, 0.5], [0, 1.5, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const ring2Dip = acting\n ? interpolate(actionProgress, [0.1, 0.35, 0.6], [0, 1.5, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const pop = acting\n ? interpolate(actionProgress, [0.5, 0.7, 1], [1, 1.04, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const frame = drawnPathProps(FRAME_PATH, acting ? 1 : frameDraw);\n const ring1 = drawnPathProps(RING1_PATH, acting ? 1 : ringsDraw);\n const ring2 = drawnPathProps(RING2_PATH, acting ? 1 : ringsDraw);\n const rule = drawnPathProps(RULE_PATH, acting ? 1 : ruleDraw);\n\n const scale = (0.85 + 0.15 * scaleIn) * pop;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={FRAME_PATH}\n strokeDasharray={frame.strokeDasharray}\n strokeDashoffset={frame.strokeDashoffset}\n />\n <g transform={`translate(0 ${ring1Dip})`}>\n <path\n d={RING1_PATH}\n strokeDasharray={ring1.strokeDasharray}\n strokeDashoffset={ring1.strokeDashoffset}\n />\n </g>\n <g transform={`translate(0 ${ring2Dip})`}>\n <path\n d={RING2_PATH}\n strokeDasharray={ring2.strokeDasharray}\n strokeDashoffset={ring2.strokeDashoffset}\n />\n </g>\n <path\n d={RULE_PATH}\n strokeDasharray={rule.strokeDasharray}\n strokeDashoffset={rule.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction CalendarIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M8 2v4\" />\n <path d=\"M16 2v4\" />\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"4\" rx=\"2\" />\n <path d=\"M3 10h18\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype CalendarIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof CalendarIconBase>;\n\nconst CalendarIconInner = forwardRef<\n HTMLDivElement,\n CalendarIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<CalendarIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <CalendarIconBase\n {...(componentProps as unknown as ComponentProps<typeof CalendarIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const CalendarIcon = Interactive.withSchema({\n Component: CalendarIconInner,\n componentName: \"<CalendarIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-camera.json b/registry-artifacts/elements/icon-camera.jsonnew file mode 100644index 00000000..c20e2f71--- /dev/null+++ b/registry-artifacts/elements/icon-camera.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Camera",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-camera",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst BODY_PATH =\n \"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z\";\nconst LENS_PATH =\n \"M12 10 A3 3 0 0 1 15 13 A3 3 0 0 1 12 16 A3 3 0 0 1 9 13 A3 3 0 0 1 12 10\";\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 18,\n loop: false,\n} as const;\n\nfunction CameraIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const bodyDraw = interpolate(linearDraw, [0, 0.667], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const lensDraw = interpolate(linearDraw, [0.444, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const shutter = acting\n ? interpolate(\n actionProgress,\n [0, 0.28, 0.56, 0.78, 1],\n [1, 0.55, 1.08, 1, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n )\n : 1;\n\n const body = drawnPathProps(BODY_PATH, bodyDraw);\n const lens = drawnPathProps(LENS_PATH, lensDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const lensTransform = `translate(${12 * (1 - shutter)} ${13 * (1 - shutter)}) scale(${shutter})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={BODY_PATH}\n strokeDasharray={body.strokeDasharray}\n strokeDashoffset={body.strokeDashoffset}\n />\n <g transform={lensTransform}>\n <path\n d={LENS_PATH}\n strokeDasharray={lens.strokeDasharray}\n strokeDashoffset={lens.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction CameraIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={BODY_PATH} />\n <circle cx=\"12\" cy=\"13\" r=\"3\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype CameraIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof CameraIconBase>;\n\nconst CameraIconInner = forwardRef<\n HTMLDivElement,\n CameraIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<CameraIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <CameraIconBase\n {...(componentProps as unknown as ComponentProps<typeof CameraIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const CameraIcon = Interactive.withSchema({\n Component: CameraIconInner,\n componentName: \"<CameraIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-check-circle.json b/registry-artifacts/elements/icon-check-circle.jsonnew file mode 100644index 00000000..b066d8bb--- /dev/null+++ b/registry-artifacts/elements/icon-check-circle.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Check Circle",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-check-circle",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst CIRCLE_PATH =\n \"M12 2 A10 10 0 0 1 22 12 A10 10 0 0 1 12 22 A10 10 0 0 1 2 12 A10 10 0 0 1 12 2\";\nconst CHECK_PATH = \"M9 12 11 14 15 10\";\n\nconst TIMINGS = {\n drawDurationInFrames: 20,\n actionDelayInFrames: 2,\n actionDurationInFrames: 18,\n loop: false,\n} as const;\n\nfunction CheckCircleIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const circleProgress = interpolate(linearDraw, [0, 0.85], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const checkProgress = interpolate(linearDraw, [0.6, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const circle = drawnPathProps(CIRCLE_PATH, circleProgress);\n const check = drawnPathProps(CHECK_PATH, checkProgress);\n\n const pop = interpolate(actionProgress, [0, 0.4, 1], [0, 1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const scale = (0.85 + 0.15 * scaleIn) * (1 + 0.12 * pop);\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={CIRCLE_PATH}\n strokeDasharray={circle.strokeDasharray}\n strokeDashoffset={circle.strokeDashoffset}\n />\n <path\n d={CHECK_PATH}\n strokeDasharray={check.strokeDasharray}\n strokeDashoffset={check.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction CheckCircleIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d={CHECK_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype CheckCircleIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof CheckCircleIconBase>;\n\nconst CheckCircleIconInner = forwardRef<\n HTMLDivElement,\n CheckCircleIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<CheckCircleIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <CheckCircleIconBase\n {...(componentProps as unknown as ComponentProps<typeof CheckCircleIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const CheckCircleIcon = Interactive.withSchema({\n Component: CheckCircleIconInner,\n componentName: \"<CheckCircleIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-check.json b/registry-artifacts/elements/icon-check.jsonnew file mode 100644index 00000000..eadabccb--- /dev/null+++ b/registry-artifacts/elements/icon-check.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Check",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "icon-check",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst CHECK_PATH = \"M4 12 9 17 20 6\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 18,\n loop: false,\n} as const;\n\nfunction CheckIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const dash = drawnPathProps(CHECK_PATH, drawProgress);\n const pop = interpolate(actionProgress, [0, 0.4, 1], [0, 1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const rotate = interpolate(actionProgress, [0, 0.5], [-4, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n const scale = (0.85 + 0.15 * scaleIn) * (1 + 0.18 * pop);\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `rotate(${rotate}deg) scale(${scale})`,\n }}\n >\n <path\n d={CHECK_PATH}\n strokeDasharray={dash.strokeDasharray}\n strokeDashoffset={dash.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction CheckIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={CHECK_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype CheckIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof CheckIconBase>;\n\nconst CheckIconInner = forwardRef<\n HTMLDivElement,\n CheckIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<CheckIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <CheckIconBase\n {...(componentProps as unknown as ComponentProps<typeof CheckIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const CheckIcon = Interactive.withSchema({\n Component: CheckIconInner,\n componentName: \"<CheckIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/icon-chevron-down.json b/registry-artifacts/elements/icon-chevron-down.jsonnew file mode 100644index 00000000..a3fcb8a4--- /dev/null+++ b/registry-artifacts/elements/icon-chevron-down.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Chevron Down",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "icon-chevron-down",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst CHEVRON_PATH = \"M6 9 12 15 18 9\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 22,\n loop: false,\n} as const;\n\nfunction ChevronDownIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const dash = drawnPathProps(CHEVRON_PATH, drawProgress);\n const nudge = interpolate(\n actionProgress,\n [0, 0.22, 0.45, 0.68, 1],\n [0, 4, 0, 2, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n );\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `translateY(${nudge}px) scale(${scale})`,\n }}\n >\n <path\n d={CHEVRON_PATH}\n strokeDasharray={dash.strokeDasharray}\n strokeDashoffset={dash.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction ChevronDownIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={CHEVRON_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype ChevronDownIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ChevronDownIconBase>;\n\nconst ChevronDownIconInner = forwardRef<\n HTMLDivElement,\n ChevronDownIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ChevronDownIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ChevronDownIconBase\n {...(componentProps as unknown as ComponentProps<typeof ChevronDownIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ChevronDownIcon = Interactive.withSchema({\n Component: ChevronDownIconInner,\n componentName: \"<ChevronDownIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/icon-chevron-left.json b/registry-artifacts/elements/icon-chevron-left.jsonnew file mode 100644index 00000000..4ecbb13b--- /dev/null+++ b/registry-artifacts/elements/icon-chevron-left.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Chevron Left",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "icon-chevron-left",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst CHEVRON_PATH = \"M15 18 9 12 15 6\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 22,\n loop: false,\n} as const;\n\nfunction ChevronLeftIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const dash = drawnPathProps(CHEVRON_PATH, drawProgress);\n const nudge = interpolate(\n actionProgress,\n [0, 0.22, 0.45, 0.68, 1],\n [0, -4, 0, -2, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n );\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `translateX(${nudge}px) scale(${scale})`,\n }}\n >\n <path\n d={CHEVRON_PATH}\n strokeDasharray={dash.strokeDasharray}\n strokeDashoffset={dash.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction ChevronLeftIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={CHEVRON_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype ChevronLeftIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ChevronLeftIconBase>;\n\nconst ChevronLeftIconInner = forwardRef<\n HTMLDivElement,\n ChevronLeftIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ChevronLeftIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ChevronLeftIconBase\n {...(componentProps as unknown as ComponentProps<typeof ChevronLeftIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ChevronLeftIcon = Interactive.withSchema({\n Component: ChevronLeftIconInner,\n componentName: \"<ChevronLeftIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/icon-chevron-right.json b/registry-artifacts/elements/icon-chevron-right.jsonnew file mode 100644index 00000000..730b179d--- /dev/null+++ b/registry-artifacts/elements/icon-chevron-right.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Chevron Right",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "icon-chevron-right",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst CHEVRON_PATH = \"M9 18 15 12 9 6\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 22,\n loop: false,\n} as const;\n\nfunction ChevronRightIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const dash = drawnPathProps(CHEVRON_PATH, drawProgress);\n const nudge = interpolate(\n actionProgress,\n [0, 0.22, 0.45, 0.68, 1],\n [0, 4, 0, 2, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n );\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `translateX(${nudge}px) scale(${scale})`,\n }}\n >\n <path\n d={CHEVRON_PATH}\n strokeDasharray={dash.strokeDasharray}\n strokeDashoffset={dash.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction ChevronRightIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={CHEVRON_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype ChevronRightIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ChevronRightIconBase>;\n\nconst ChevronRightIconInner = forwardRef<\n HTMLDivElement,\n ChevronRightIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ChevronRightIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ChevronRightIconBase\n {...(componentProps as unknown as ComponentProps<typeof ChevronRightIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ChevronRightIcon = Interactive.withSchema({\n Component: ChevronRightIconInner,\n componentName: \"<ChevronRightIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/icon-chevron-up.json b/registry-artifacts/elements/icon-chevron-up.jsonnew file mode 100644index 00000000..bc7e2a55--- /dev/null+++ b/registry-artifacts/elements/icon-chevron-up.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Chevron Up",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "icon-chevron-up",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst CHEVRON_PATH = \"M18 15 12 9 6 15\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 22,\n loop: false,\n} as const;\n\nfunction ChevronUpIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const dash = drawnPathProps(CHEVRON_PATH, drawProgress);\n const nudge = interpolate(\n actionProgress,\n [0, 0.22, 0.45, 0.68, 1],\n [0, -4, 0, -2, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n );\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `translateY(${nudge}px) scale(${scale})`,\n }}\n >\n <path\n d={CHEVRON_PATH}\n strokeDasharray={dash.strokeDasharray}\n strokeDashoffset={dash.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction ChevronUpIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={CHEVRON_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype ChevronUpIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ChevronUpIconBase>;\n\nconst ChevronUpIconInner = forwardRef<\n HTMLDivElement,\n ChevronUpIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ChevronUpIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ChevronUpIconBase\n {...(componentProps as unknown as ComponentProps<typeof ChevronUpIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ChevronUpIcon = Interactive.withSchema({\n Component: ChevronUpIconInner,\n componentName: \"<ChevronUpIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/icon-clock.json b/registry-artifacts/elements/icon-clock.jsonnew file mode 100644index 00000000..086c25ee--- /dev/null+++ b/registry-artifacts/elements/icon-clock.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Clock",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "icon-clock",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst FACE_PATH = \"M12 2a10 10 0 1 0 0 20 10 10 0 1 0 0-20Z\";\nconst HANDS_PATH = \"M12 6v6l4 2\";\nconst MINUTE_PATH = \"M12 6V12\";\nconst HOUR_PATH = \"M12 12 16 14\";\n\nconst CENTER = 12;\nconst STEPS = 4;\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 40,\n loop: true,\n} as const;\n\nfunction ClockIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const faceDraw = interpolate(linearDraw, [0, 0.7], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const handsDraw = interpolate(linearDraw, [0.5, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const scaled = actionProgress * STEPS;\n const stepIndex = Math.floor(scaled);\n const frac = scaled - stepIndex;\n const eased = interpolate(frac, [0, 0.55, 1], [0, 1, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const tick = acting ? ((stepIndex + eased) / STEPS) * 360 : 0;\n\n const face = drawnPathProps(FACE_PATH, acting ? 1 : faceDraw);\n const minute = drawnPathProps(MINUTE_PATH, acting ? 1 : handsDraw);\n const hour = drawnPathProps(HOUR_PATH, acting ? 1 : handsDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={FACE_PATH}\n strokeDasharray={face.strokeDasharray}\n strokeDashoffset={face.strokeDashoffset}\n />\n <path\n d={HOUR_PATH}\n strokeDasharray={hour.strokeDasharray}\n strokeDashoffset={hour.strokeDashoffset}\n />\n <g transform={`rotate(${tick} ${CENTER} ${CENTER})`}>\n <path\n d={MINUTE_PATH}\n strokeDasharray={minute.strokeDasharray}\n strokeDashoffset={minute.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction ClockIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d={HANDS_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: true,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: true,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype ClockIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ClockIconBase>;\n\nconst ClockIconInner = forwardRef<\n HTMLDivElement,\n ClockIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ClockIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ClockIconBase\n {...(componentProps as unknown as ComponentProps<typeof ClockIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ClockIcon = Interactive.withSchema({\n Component: ClockIconInner,\n componentName: \"<ClockIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/icon-cloud.json b/registry-artifacts/elements/icon-cloud.jsonnew file mode 100644index 00000000..932e1004--- /dev/null+++ b/registry-artifacts/elements/icon-cloud.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Cloud",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-cloud",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst CLOUD_PATH = \"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 30,\n loop: false,\n} as const;\n\nfunction CloudIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const float = acting\n ? interpolate(actionProgress, [0, 0.35, 0.6, 0.8, 1], [0, -2, 0, -1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.sin),\n })\n : 0;\n\n const cloud = drawnPathProps(CLOUD_PATH, drawProgress);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `translateY(${float}px) scale(${scale})`,\n }}\n >\n <path\n d={CLOUD_PATH}\n strokeDasharray={cloud.strokeDasharray}\n strokeDashoffset={cloud.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction CloudIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={CLOUD_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype CloudIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof CloudIconBase>;\n\nconst CloudIconInner = forwardRef<\n HTMLDivElement,\n CloudIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<CloudIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <CloudIconBase\n {...(componentProps as unknown as ComponentProps<typeof CloudIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const CloudIcon = Interactive.withSchema({\n Component: CloudIconInner,\n componentName: \"<CloudIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-code.json b/registry-artifacts/elements/icon-code.jsonnew file mode 100644index 00000000..24e4f3e5--- /dev/null+++ b/registry-artifacts/elements/icon-code.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Code",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-code",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst RIGHT_PATH = \"M16 18 22 12 16 6\";\nconst LEFT_PATH = \"M8 6 2 12 8 18\";\n\nconst TIMINGS = {\n drawDurationInFrames: 12,\n actionDelayInFrames: 2,\n actionDurationInFrames: 22,\n loop: false,\n} as const;\n\nfunction CodeIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const open = acting\n ? interpolate(actionProgress, [0, 0.4, 1], [0, 2.5, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const pop = acting\n ? interpolate(actionProgress, [0.4, 0.7, 1], [1, 1.04, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const right = drawnPathProps(RIGHT_PATH, drawProgress);\n const left = drawnPathProps(LEFT_PATH, drawProgress);\n\n const scale = (0.85 + 0.15 * scaleIn) * pop;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`translate(${open} 0)`}>\n <path\n d={RIGHT_PATH}\n strokeDasharray={right.strokeDasharray}\n strokeDashoffset={right.strokeDashoffset}\n />\n </g>\n <g transform={`translate(${-open} 0)`}>\n <path\n d={LEFT_PATH}\n strokeDasharray={left.strokeDasharray}\n strokeDashoffset={left.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction CodeIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m16 18 6-6-6-6\" />\n <path d=\"m8 6-6 6 6 6\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype CodeIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof CodeIconBase>;\n\nconst CodeIconInner = forwardRef<\n HTMLDivElement,\n CodeIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<CodeIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <CodeIconBase\n {...(componentProps as unknown as ComponentProps<typeof CodeIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const CodeIcon = Interactive.withSchema({\n Component: CodeIconInner,\n componentName: \"<CodeIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-copy.json b/registry-artifacts/elements/icon-copy.jsonnew file mode 100644index 00000000..c170be85--- /dev/null+++ b/registry-artifacts/elements/icon-copy.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Copy",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-copy",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst BACK_PATH = \"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\";\nconst FRONT_PATH =\n \"M10 8H20A2 2 0 0 1 22 10V20A2 2 0 0 1 20 22H10A2 2 0 0 1 8 20V10A2 2 0 0 1 10 8Z\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction CopyIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const backProgress = interpolate(linearDraw, [0, 0.714], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const frontProgress = interpolate(linearDraw, [0.286, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const back = drawnPathProps(BACK_PATH, backProgress);\n const front = drawnPathProps(FRONT_PATH, frontProgress);\n\n const offset = interpolate(\n actionProgress,\n [0, 0.35, 0.65, 1],\n [0, -2, -2, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n );\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={BACK_PATH}\n strokeDasharray={back.strokeDasharray}\n strokeDashoffset={back.strokeDashoffset}\n />\n <g transform={`translate(${offset} ${offset})`}>\n <path\n d={FRONT_PATH}\n strokeDasharray={front.strokeDasharray}\n strokeDashoffset={front.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction CopyIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\" />\n <path d={BACK_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype CopyIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof CopyIconBase>;\n\nconst CopyIconInner = forwardRef<\n HTMLDivElement,\n CopyIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<CopyIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <CopyIconBase\n {...(componentProps as unknown as ComponentProps<typeof CopyIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const CopyIcon = Interactive.withSchema({\n Component: CopyIconInner,\n componentName: \"<CopyIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-credit-card.json b/registry-artifacts/elements/icon-credit-card.jsonnew file mode 100644index 00000000..2cd87f68--- /dev/null+++ b/registry-artifacts/elements/icon-credit-card.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Credit Card",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-credit-card",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst CARD_PATH =\n \"M4 5H20A2 2 0 0 1 22 7V17A2 2 0 0 1 20 19H4A2 2 0 0 1 2 17V7A2 2 0 0 1 4 5Z\";\nconst STRIPE_PATH = \"M2 10H22\";\n\nconst PIVOT_X = 12;\nconst PIVOT_Y = 19;\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 24,\n loop: false,\n} as const;\n\nfunction CreditCardIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const swipe = interpolate(actionProgress, [0.1, 0.45], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.cubic),\n });\n const tilt = acting\n ? interpolate(actionProgress, [0.4, 0.6, 1], [0, 4, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n\n const stripeProgress = animation === \"draw\" ? 1 : acting ? swipe : 0;\n\n const card = drawnPathProps(CARD_PATH, drawProgress);\n const stripe = drawnPathProps(STRIPE_PATH, stripeProgress);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`rotate(${tilt} ${PIVOT_X} ${PIVOT_Y})`}>\n <path\n d={CARD_PATH}\n strokeDasharray={card.strokeDasharray}\n strokeDashoffset={card.strokeDashoffset}\n />\n <path\n d={STRIPE_PATH}\n strokeDasharray={stripe.strokeDasharray}\n strokeDashoffset={stripe.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction CreditCardIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <rect width=\"20\" height=\"14\" x=\"2\" y=\"5\" rx=\"2\" />\n <line x1=\"2\" x2=\"22\" y1=\"10\" y2=\"10\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype CreditCardIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof CreditCardIconBase>;\n\nconst CreditCardIconInner = forwardRef<\n HTMLDivElement,\n CreditCardIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<CreditCardIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <CreditCardIconBase\n {...(componentProps as unknown as ComponentProps<typeof CreditCardIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const CreditCardIcon = Interactive.withSchema({\n Component: CreditCardIconInner,\n componentName: \"<CreditCardIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-crown.json b/registry-artifacts/elements/icon-crown.jsonnew file mode 100644index 00000000..0896f89a--- /dev/null+++ b/registry-artifacts/elements/icon-crown.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Crown",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-crown",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst CROWN_PATH =\n \"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z\";\nconst BAND_PATH = \"M5 21h14\";\n\nconst BASE_X = 12;\nconst BASE_Y = 21;\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 28,\n loop: false,\n} as const;\n\nfunction CrownIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const crownDraw = interpolate(linearDraw, [0, 0.75], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const bandDraw = interpolate(linearDraw, [0.5, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const descend = acting\n ? interpolate(actionProgress, [0, 0.22, 0.55], [0, -3, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.sin),\n })\n : 0;\n const pop = acting\n ? interpolate(actionProgress, [0.4, 0.55, 0.7], [1, 1.06, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n const rock = acting\n ? interpolate(\n actionProgress,\n [0.55, 0.68, 0.82, 0.94, 1],\n [0, 2, -1.5, 0.8, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.sin),\n },\n )\n : 0;\n\n const crown = drawnPathProps(CROWN_PATH, acting ? 1 : crownDraw);\n const band = drawnPathProps(BAND_PATH, acting ? 1 : bandDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const actionTransform = `translate(0 ${descend}) rotate(${rock} ${BASE_X} ${BASE_Y}) translate(${BASE_X * (1 - pop)} ${BASE_Y * (1 - pop)}) scale(${pop})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={actionTransform}>\n <path\n d={CROWN_PATH}\n strokeDasharray={crown.strokeDasharray}\n strokeDashoffset={crown.strokeDashoffset}\n />\n <path\n d={BAND_PATH}\n strokeDasharray={band.strokeDasharray}\n strokeDashoffset={band.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction CrownIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z\" />\n <path d=\"M5 21h14\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype CrownIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof CrownIconBase>;\n\nconst CrownIconInner = forwardRef<\n HTMLDivElement,\n CrownIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<CrownIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <CrownIconBase\n {...(componentProps as unknown as ComponentProps<typeof CrownIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const CrownIcon = Interactive.withSchema({\n Component: CrownIconInner,\n componentName: \"<CrownIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-database.json b/registry-artifacts/elements/icon-database.jsonnew file mode 100644index 00000000..2e4f3900--- /dev/null+++ b/registry-artifacts/elements/icon-database.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Database",+ "durationInFrames": 80,+ "installationMode": "component-owned-sequence",+ "slug": "icon-database",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst DISC_PATH = \"M3 5A9 3 0 0 0 21 5A9 3 0 0 0 3 5Z\";\nconst BODY_PATH = \"M3 5V19A9 3 0 0 0 21 19V5\";\nconst MID_PATH = \"M3 12A9 3 0 0 0 21 12\";\n\nconst DISC_CX = 12;\nconst DISC_CY = 5;\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 24,\n loop: false,\n} as const;\n\nfunction DatabaseIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const discDraw = interpolate(linearDraw, [0, 0.55], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const bodyDraw = interpolate(linearDraw, [0.35, 0.75], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const midDraw = interpolate(linearDraw, [0.6, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const discPop = acting\n ? interpolate(actionProgress, [0, 0.25, 0.5], [1, 1.06, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n const midDip = acting\n ? interpolate(actionProgress, [0.25, 0.5, 0.8], [0, 1.5, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n\n const disc = drawnPathProps(DISC_PATH, acting ? 1 : discDraw);\n const body = drawnPathProps(BODY_PATH, acting ? 1 : bodyDraw);\n const mid = drawnPathProps(MID_PATH, acting ? 1 : midDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const discTransform = `translate(${DISC_CX * (1 - discPop)} ${DISC_CY * (1 - discPop)}) scale(${discPop})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={BODY_PATH}\n strokeDasharray={body.strokeDasharray}\n strokeDashoffset={body.strokeDashoffset}\n />\n <g transform={`translate(0 ${midDip})`}>\n <path\n d={MID_PATH}\n strokeDasharray={mid.strokeDasharray}\n strokeDashoffset={mid.strokeDashoffset}\n />\n </g>\n <g transform={discTransform}>\n <path\n d={DISC_PATH}\n strokeDasharray={disc.strokeDasharray}\n strokeDashoffset={disc.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction DatabaseIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <ellipse cx=\"12\" cy=\"5\" rx=\"9\" ry=\"3\" />\n <path d=\"M3 5V19A9 3 0 0 0 21 19V5\" />\n <path d=\"M3 12A9 3 0 0 0 21 12\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype DatabaseIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof DatabaseIconBase>;\n\nconst DatabaseIconInner = forwardRef<\n HTMLDivElement,\n DatabaseIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<DatabaseIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <DatabaseIconBase\n {...(componentProps as unknown as ComponentProps<typeof DatabaseIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const DatabaseIcon = Interactive.withSchema({\n Component: DatabaseIconInner,\n componentName: \"<DatabaseIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 80+}diff --git a/registry-artifacts/elements/icon-dollar-sign.json b/registry-artifacts/elements/icon-dollar-sign.jsonnew file mode 100644index 00000000..0cfada6c--- /dev/null+++ b/registry-artifacts/elements/icon-dollar-sign.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Dollar Sign",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-dollar-sign",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst BAR_PATH = \"M12 2V22\";\nconst S_PATH = \"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6\";\n\nconst BASE_Y = 22;\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction DollarSignIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const barDraw = interpolate(linearDraw, [0, 0.55], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const sDraw = interpolate(linearDraw, [0.3, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const stretch = acting\n ? interpolate(actionProgress, [0.1, 0.5, 1], [1, 1.1, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const bar = drawnPathProps(BAR_PATH, acting ? 1 : barDraw);\n const s = drawnPathProps(S_PATH, acting ? 1 : sDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const stretchTransform = `translate(0 ${BASE_Y * (1 - stretch)}) scale(1 ${stretch})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={stretchTransform}>\n <path\n d={BAR_PATH}\n strokeDasharray={bar.strokeDasharray}\n strokeDashoffset={bar.strokeDashoffset}\n />\n <path\n d={S_PATH}\n strokeDasharray={s.strokeDasharray}\n strokeDashoffset={s.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction DollarSignIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <line x1=\"12\" x2=\"12\" y1=\"2\" y2=\"22\" />\n <path d={S_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype DollarSignIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof DollarSignIconBase>;\n\nconst DollarSignIconInner = forwardRef<\n HTMLDivElement,\n DollarSignIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<DollarSignIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <DollarSignIconBase\n {...(componentProps as unknown as ComponentProps<typeof DollarSignIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const DollarSignIcon = Interactive.withSchema({\n Component: DollarSignIconInner,\n componentName: \"<DollarSignIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-download.json b/registry-artifacts/elements/icon-download.jsonnew file mode 100644index 00000000..e85fe86c--- /dev/null+++ b/registry-artifacts/elements/icon-download.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Download",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-download",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst TRAY_DRAW = \"M3 15v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4\";\nconst TRAY_STATIC = \"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\";\nconst SHAFT_DRAW = \"M12 3V15\";\nconst SHAFT_STATIC = \"M12 15V3\";\nconst HEAD_PATH = \"M7 10 12 15 17 10\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 18,\n loop: false,\n} as const;\n\nfunction DownloadIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const trayProgress = interpolate(linearDraw, [0, 0.714], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const arrowProgress = interpolate(linearDraw, [0.429, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const arrowOpacity = interpolate(linearDraw, [0.429, 0.6], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const tray = drawnPathProps(TRAY_DRAW, trayProgress);\n const shaft = drawnPathProps(SHAFT_DRAW, arrowProgress);\n const head = drawnPathProps(HEAD_PATH, arrowProgress);\n\n const dropY = interpolate(actionProgress, [0, 0.25, 0.65, 1], [0, -4, 3, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const traySquash = interpolate(\n actionProgress,\n [0, 0.5, 0.65, 0.8, 1],\n [1, 1, 0.94, 1, 1],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g\n transform={`translate(12 21) scale(1 ${traySquash}) translate(-12 -21)`}\n >\n <path\n d={TRAY_DRAW}\n strokeDasharray={tray.strokeDasharray}\n strokeDashoffset={tray.strokeDashoffset}\n />\n </g>\n <g opacity={arrowOpacity} transform={`translate(0 ${dropY})`}>\n <path\n d={SHAFT_DRAW}\n strokeDasharray={shaft.strokeDasharray}\n strokeDashoffset={shaft.strokeDashoffset}\n />\n <path\n d={HEAD_PATH}\n strokeDasharray={head.strokeDasharray}\n strokeDashoffset={head.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction DownloadIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={SHAFT_STATIC} />\n <path d={TRAY_STATIC} />\n <path d={HEAD_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype DownloadIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof DownloadIconBase>;\n\nconst DownloadIconInner = forwardRef<\n HTMLDivElement,\n DownloadIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<DownloadIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <DownloadIconBase\n {...(componentProps as unknown as ComponentProps<typeof DownloadIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const DownloadIcon = Interactive.withSchema({\n Component: DownloadIconInner,\n componentName: \"<DownloadIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-external-link.json b/registry-artifacts/elements/icon-external-link.jsonnew file mode 100644index 00000000..2a5df021--- /dev/null+++ b/registry-artifacts/elements/icon-external-link.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "External Link",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-external-link",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst BOX_PATH = \"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\";\nconst SHAFT_PATH = \"M10 14 21 3\";\nconst HEAD_PATH = \"M15 3h6v6\";\n\nconst ARROW_CX = 15.5;\nconst ARROW_CY = 8.5;\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction ExternalLinkIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const boxProgress = interpolate(linearDraw, [0, 0.75], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const shaftProgress = interpolate(linearDraw, [0.5, 0.875], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const headProgress = interpolate(linearDraw, [0.75, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n\n const box = drawnPathProps(BOX_PATH, boxProgress);\n const shaft = drawnPathProps(SHAFT_PATH, shaftProgress);\n const head = drawnPathProps(HEAD_PATH, headProgress);\n\n const dart = interpolate(actionProgress, [0, 0.4, 0.6, 1], [0, 1, 1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const tx = 3 * dart;\n const ty = -3 * dart;\n const arrowScale = 1 + 0.05 * dart;\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={BOX_PATH}\n strokeDasharray={box.strokeDasharray}\n strokeDashoffset={box.strokeDashoffset}\n />\n <g\n transform={`translate(${tx} ${ty}) translate(${ARROW_CX} ${ARROW_CY}) scale(${arrowScale}) translate(${-ARROW_CX} ${-ARROW_CY})`}\n >\n <path\n d={SHAFT_PATH}\n strokeDasharray={shaft.strokeDasharray}\n strokeDashoffset={shaft.strokeDashoffset}\n />\n <path\n d={HEAD_PATH}\n strokeDasharray={head.strokeDasharray}\n strokeDashoffset={head.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction ExternalLinkIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={BOX_PATH} />\n <path d={SHAFT_PATH} />\n <path d={HEAD_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype ExternalLinkIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ExternalLinkIconBase>;\n\nconst ExternalLinkIconInner = forwardRef<\n HTMLDivElement,\n ExternalLinkIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ExternalLinkIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ExternalLinkIconBase\n {...(componentProps as unknown as ComponentProps<typeof ExternalLinkIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ExternalLinkIcon = Interactive.withSchema({\n Component: ExternalLinkIconInner,\n componentName: \"<ExternalLinkIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-eye-off.json b/registry-artifacts/elements/icon-eye-off.jsonnew file mode 100644index 00000000..bb212999--- /dev/null+++ b/registry-artifacts/elements/icon-eye-off.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Eye Off",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-eye-off",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst FRAG1_PATH =\n \"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49\";\nconst FRAG2_PATH = \"M14.084 14.158a3 3 0 0 1-4.242-4.242\";\nconst FRAG3_PATH =\n \"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143\";\nconst SLASH_PATH = \"M2 2 22 22\";\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 22,\n loop: false,\n} as const;\n\nconst FRAGMENTS = [\n { path: FRAG1_PATH, drawWindow: [0, 0.69] },\n { path: FRAG2_PATH, drawWindow: [0.19, 0.88] },\n { path: FRAG3_PATH, drawWindow: [0.375, 1] },\n] as const;\n\nfunction EyeOffIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const slashProgress = acting\n ? interpolate(actionProgress, [0, 0.45], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n })\n : 0;\n const fragOpacity = acting\n ? interpolate(actionProgress, [0.09, 0.5, 1], [1, 0.35, 0.6], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : 1;\n\n const slash = drawnPathProps(SLASH_PATH, slashProgress);\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g opacity={fragOpacity}>\n {FRAGMENTS.map((frag) => {\n const drawn = acting\n ? 1\n : interpolate(linearDraw, [...frag.drawWindow], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const dash = drawnPathProps(frag.path, drawn);\n return (\n <path\n key={frag.path}\n d={frag.path}\n strokeDasharray={dash.strokeDasharray}\n strokeDashoffset={dash.strokeDashoffset}\n />\n );\n })}\n </g>\n <path\n d={SLASH_PATH}\n strokeDasharray={slash.strokeDasharray}\n strokeDashoffset={slash.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction EyeOffIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={FRAG1_PATH} />\n <path d={FRAG2_PATH} />\n <path d={FRAG3_PATH} />\n <path d={SLASH_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype EyeOffIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof EyeOffIconBase>;\n\nconst EyeOffIconInner = forwardRef<\n HTMLDivElement,\n EyeOffIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<EyeOffIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <EyeOffIconBase\n {...(componentProps as unknown as ComponentProps<typeof EyeOffIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const EyeOffIcon = Interactive.withSchema({\n Component: EyeOffIconInner,\n componentName: \"<EyeOffIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-eye.json b/registry-artifacts/elements/icon-eye.jsonnew file mode 100644index 00000000..4ed42de3--- /dev/null+++ b/registry-artifacts/elements/icon-eye.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Eye",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-eye",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst OUTLINE_PATH =\n \"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0\";\nconst PUPIL_PATH =\n \"M12 9 A3 3 0 0 1 15 12 A3 3 0 0 1 12 15 A3 3 0 0 1 9 12 A3 3 0 0 1 12 9\";\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 22,\n loop: false,\n} as const;\n\nfunction EyeIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const outlineDraw = interpolate(linearDraw, [0, 0.75], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const pupilDraw = interpolate(linearDraw, [0.5, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const blink = acting\n ? interpolate(actionProgress, [0, 0.27, 0.55], [1, 0.4, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n const pupilPop =\n acting && actionProgress >= 0.55\n ? interpolate(actionProgress, [0.55, 0.77, 1], [0.8, 1.1, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const outline = drawnPathProps(OUTLINE_PATH, outlineDraw);\n const pupil = drawnPathProps(PUPIL_PATH, pupilDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const pupilTransform = `translate(${12 * (1 - pupilPop)} ${12 * (1 - pupilPop)}) scale(${pupilPop})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale}) scaleY(${blink})`,\n }}\n >\n <path\n d={OUTLINE_PATH}\n strokeDasharray={outline.strokeDasharray}\n strokeDashoffset={outline.strokeDashoffset}\n />\n <g transform={pupilTransform}>\n <path\n d={PUPIL_PATH}\n strokeDasharray={pupil.strokeDasharray}\n strokeDashoffset={pupil.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction EyeIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={OUTLINE_PATH} />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype EyeIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof EyeIconBase>;\n\nconst EyeIconInner = forwardRef<\n HTMLDivElement,\n EyeIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<EyeIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <EyeIconBase\n {...(componentProps as unknown as ComponentProps<typeof EyeIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const EyeIcon = Interactive.withSchema({\n Component: EyeIconInner,\n componentName: \"<EyeIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-file-text.json b/registry-artifacts/elements/icon-file-text.jsonnew file mode 100644index 00000000..6c4c9faf--- /dev/null+++ b/registry-artifacts/elements/icon-file-text.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "File Text",+ "durationInFrames": 80,+ "installationMode": "component-owned-sequence",+ "slug": "icon-file-text",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst PAGE_PATH =\n \"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\";\nconst FOLD_PATH = \"M14 2v5a1 1 0 0 0 1 1h5\";\nconst LINE1_PATH = \"M8 9H10\";\nconst LINE2_PATH = \"M8 13H16\";\nconst LINE3_PATH = \"M8 17H16\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 26,\n loop: false,\n} as const;\n\nfunction FileTextIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const pageDraw = interpolate(linearDraw, [0, 0.7], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const foldDraw = interpolate(linearDraw, [0.55, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const line1Type = interpolate(actionProgress, [0.05, 0.4], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.linear,\n });\n const line2Type = interpolate(actionProgress, [0.3, 0.65], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.linear,\n });\n const line3Type = interpolate(actionProgress, [0.55, 0.9], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.linear,\n });\n\n const line1Progress = animation === \"draw\" ? 1 : acting ? line1Type : 0;\n const line2Progress = animation === \"draw\" ? 1 : acting ? line2Type : 0;\n const line3Progress = animation === \"draw\" ? 1 : acting ? line3Type : 0;\n\n const page = drawnPathProps(PAGE_PATH, acting ? 1 : pageDraw);\n const fold = drawnPathProps(FOLD_PATH, acting ? 1 : foldDraw);\n const line1 = drawnPathProps(LINE1_PATH, line1Progress);\n const line2 = drawnPathProps(LINE2_PATH, line2Progress);\n const line3 = drawnPathProps(LINE3_PATH, line3Progress);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={PAGE_PATH}\n strokeDasharray={page.strokeDasharray}\n strokeDashoffset={page.strokeDashoffset}\n />\n <path\n d={FOLD_PATH}\n strokeDasharray={fold.strokeDasharray}\n strokeDashoffset={fold.strokeDashoffset}\n />\n <path\n d={LINE1_PATH}\n strokeDasharray={line1.strokeDasharray}\n strokeDashoffset={line1.strokeDashoffset}\n />\n <path\n d={LINE2_PATH}\n strokeDasharray={line2.strokeDasharray}\n strokeDashoffset={line2.strokeDashoffset}\n />\n <path\n d={LINE3_PATH}\n strokeDasharray={line3.strokeDasharray}\n strokeDashoffset={line3.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction FileTextIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={PAGE_PATH} />\n <path d={FOLD_PATH} />\n <path d=\"M10 9H8\" />\n <path d=\"M16 13H8\" />\n <path d=\"M16 17H8\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype FileTextIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof FileTextIconBase>;\n\nconst FileTextIconInner = forwardRef<\n HTMLDivElement,\n FileTextIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<FileTextIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <FileTextIconBase\n {...(componentProps as unknown as ComponentProps<typeof FileTextIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const FileTextIcon = Interactive.withSchema({\n Component: FileTextIconInner,\n componentName: \"<FileTextIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 80+}diff --git a/registry-artifacts/elements/icon-filter.json b/registry-artifacts/elements/icon-filter.jsonnew file mode 100644index 00000000..947caf08--- /dev/null+++ b/registry-artifacts/elements/icon-filter.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Filter",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-filter",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst FUNNEL_PATH =\n \"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction FilterIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const rotate = acting\n ? interpolate(actionProgress, [0, 0.3, 0.6, 1], [0, -5, 5, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const dip = acting\n ? interpolate(actionProgress, [0, 0.3, 0.6, 1], [0, 1, 1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n\n const dash = drawnPathProps(FUNNEL_PATH, drawProgress);\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`rotate(${rotate} 12 3) translate(0 ${dip})`}>\n <path\n d={FUNNEL_PATH}\n strokeDasharray={dash.strokeDasharray}\n strokeDashoffset={dash.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction FilterIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={FUNNEL_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype FilterIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof FilterIconBase>;\n\nconst FilterIconInner = forwardRef<\n HTMLDivElement,\n FilterIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<FilterIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <FilterIconBase\n {...(componentProps as unknown as ComponentProps<typeof FilterIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const FilterIcon = Interactive.withSchema({\n Component: FilterIconInner,\n componentName: \"<FilterIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-flame.json b/registry-artifacts/elements/icon-flame.jsonnew file mode 100644index 00000000..ecf6aabb--- /dev/null+++ b/registry-artifacts/elements/icon-flame.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Flame",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "icon-flame",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst FLAME_PATH =\n \"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 40,\n loop: true,\n} as const;\n\nfunction FlameIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const flameProgress = interpolate(linearDraw, [0, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const entrance = interpolate(linearDraw, [0, 1], [0.85, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const flame = drawnPathProps(FLAME_PATH, flameProgress);\n\n const flickerEase = {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n } as const;\n const scaleY = interpolate(\n actionProgress,\n [0, 0.25, 0.5, 0.75, 1],\n [1, 1.06, 0.97, 1.04, 1],\n flickerEase,\n );\n const skew = interpolate(\n actionProgress,\n [0, 0.25, 0.5, 0.75, 1],\n [0, -2, 2, -1, 0],\n flickerEase,\n );\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${entrance})`,\n }}\n >\n <g\n transform={`translate(12 22) scale(1 ${scaleY}) skewX(${skew}) translate(-12 -22)`}\n >\n <path\n d={FLAME_PATH}\n strokeDasharray={flame.strokeDasharray}\n strokeDashoffset={flame.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction FlameIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={FLAME_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: true,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: true,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype FlameIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof FlameIconBase>;\n\nconst FlameIconInner = forwardRef<\n HTMLDivElement,\n FlameIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<FlameIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <FlameIconBase\n {...(componentProps as unknown as ComponentProps<typeof FlameIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const FlameIcon = Interactive.withSchema({\n Component: FlameIconInner,\n componentName: \"<FlameIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/icon-folder.json b/registry-artifacts/elements/icon-folder.jsonnew file mode 100644index 00000000..653578db--- /dev/null+++ b/registry-artifacts/elements/icon-folder.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Folder",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-folder",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst FOLDER_PATH =\n \"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z\";\n\nconst PIVOT_X = 4;\nconst PIVOT_Y = 20;\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction FolderIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const peek = acting\n ? interpolate(actionProgress, [0, 0.45, 1], [0, -4, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n\n const folder = drawnPathProps(FOLDER_PATH, drawProgress);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`rotate(${peek} ${PIVOT_X} ${PIVOT_Y})`}>\n <path\n d={FOLDER_PATH}\n strokeDasharray={folder.strokeDasharray}\n strokeDashoffset={folder.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction FolderIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={FOLDER_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype FolderIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof FolderIconBase>;\n\nconst FolderIconInner = forwardRef<\n HTMLDivElement,\n FolderIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<FolderIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <FolderIconBase\n {...(componentProps as unknown as ComponentProps<typeof FolderIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const FolderIcon = Interactive.withSchema({\n Component: FolderIconInner,\n componentName: \"<FolderIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-gem.json b/registry-artifacts/elements/icon-gem.jsonnew file mode 100644index 00000000..f63140d2--- /dev/null+++ b/registry-artifacts/elements/icon-gem.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Gem",+ "durationInFrames": 80,+ "installationMode": "component-owned-sequence",+ "slug": "icon-gem",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst STONE_PATH =\n \"M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z\";\nconst VCUT_PATH = \"M10.5 3 8 9l4 13 4-13-2.5-6\";\nconst BAND_PATH = \"M2 9h20\";\n\nconst CENTER = 12;\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 24,\n loop: false,\n} as const;\n\nfunction GemIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const stoneDraw = interpolate(linearDraw, [0, 0.67], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const vcutDraw = interpolate(linearDraw, [0.44, 0.89], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const bandDraw = interpolate(linearDraw, [0.67, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const pop = acting\n ? interpolate(actionProgress, [0, 0.35, 0.6, 1], [1, 1.06, 1, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n const shimmer = acting\n ? interpolate(\n actionProgress,\n [0, 0.25, 0.45, 0.65, 0.85, 1],\n [1, 0.7, 1, 0.78, 1, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.sin),\n },\n )\n : 1;\n\n const stone = drawnPathProps(STONE_PATH, acting ? 1 : stoneDraw);\n const vcut = drawnPathProps(VCUT_PATH, acting ? 1 : vcutDraw);\n const band = drawnPathProps(BAND_PATH, acting ? 1 : bandDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const popTransform = `translate(${CENTER * (1 - pop)} ${CENTER * (1 - pop)}) scale(${pop})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={popTransform}>\n <path\n d={STONE_PATH}\n strokeDasharray={stone.strokeDasharray}\n strokeDashoffset={stone.strokeDashoffset}\n />\n <g opacity={shimmer}>\n <path\n d={VCUT_PATH}\n strokeDasharray={vcut.strokeDasharray}\n strokeDashoffset={vcut.strokeDashoffset}\n />\n <path\n d={BAND_PATH}\n strokeDasharray={band.strokeDasharray}\n strokeDashoffset={band.strokeDashoffset}\n />\n </g>\n </g>\n </svg>\n );\n}\n\nfunction GemIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M10.5 3 8 9l4 13 4-13-2.5-6\" />\n <path d=\"M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z\" />\n <path d=\"M2 9h20\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype GemIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof GemIconBase>;\n\nconst GemIconInner = forwardRef<\n HTMLDivElement,\n GemIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<GemIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <GemIconBase\n {...(componentProps as unknown as ComponentProps<typeof GemIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const GemIcon = Interactive.withSchema({\n Component: GemIconInner,\n componentName: \"<GemIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 80+}diff --git a/registry-artifacts/elements/icon-gift.json b/registry-artifacts/elements/icon-gift.jsonnew file mode 100644index 00000000..c43b9748--- /dev/null+++ b/registry-artifacts/elements/icon-gift.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Gift",+ "durationInFrames": 80,+ "installationMode": "component-owned-sequence",+ "slug": "icon-gift",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst BOX_PATH = \"M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8\";\nconst LID_PATH =\n \"M4 7H20A1 1 0 0 1 21 8V10A1 1 0 0 1 20 11H4A1 1 0 0 1 3 10V8A1 1 0 0 1 4 7Z\";\nconst CENTER_TOP_PATH = \"M12 7V11\";\nconst CENTER_BOTTOM_PATH = \"M12 11V21\";\nconst BOW_PATH =\n \"M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5\";\n\nconst LID_CX = 12;\nconst LID_CY = 9;\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 28,\n loop: false,\n} as const;\n\nfunction GiftIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const boxDraw = interpolate(linearDraw, [0, 0.55], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const lidDraw = interpolate(linearDraw, [0.35, 0.7], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const ribbonDraw = interpolate(linearDraw, [0.6, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const lidLift = acting\n ? interpolate(actionProgress, [0, 0.4, 0.65], [0, -2.5, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const lidTilt = acting\n ? interpolate(actionProgress, [0, 0.4, 0.65], [0, 3, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const lidPop = acting\n ? interpolate(actionProgress, [0.6, 0.78, 1], [1, 1.06, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const box = drawnPathProps(BOX_PATH, acting ? 1 : boxDraw);\n const lid = drawnPathProps(LID_PATH, acting ? 1 : lidDraw);\n const centerTop = drawnPathProps(CENTER_TOP_PATH, acting ? 1 : ribbonDraw);\n const centerBottom = drawnPathProps(\n CENTER_BOTTOM_PATH,\n acting ? 1 : ribbonDraw,\n );\n const bow = drawnPathProps(BOW_PATH, acting ? 1 : ribbonDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const lidTransform = `translate(0 ${lidLift}) rotate(${lidTilt} ${LID_CX} ${LID_CY}) translate(${LID_CX * (1 - lidPop)} ${LID_CY * (1 - lidPop)}) scale(${lidPop})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={BOX_PATH}\n strokeDasharray={box.strokeDasharray}\n strokeDashoffset={box.strokeDashoffset}\n />\n <path\n d={CENTER_BOTTOM_PATH}\n strokeDasharray={centerBottom.strokeDasharray}\n strokeDashoffset={centerBottom.strokeDashoffset}\n />\n <g transform={lidTransform}>\n <path\n d={LID_PATH}\n strokeDasharray={lid.strokeDasharray}\n strokeDashoffset={lid.strokeDashoffset}\n />\n <path\n d={CENTER_TOP_PATH}\n strokeDasharray={centerTop.strokeDasharray}\n strokeDashoffset={centerTop.strokeDashoffset}\n />\n <path\n d={BOW_PATH}\n strokeDasharray={bow.strokeDasharray}\n strokeDashoffset={bow.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction GiftIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M12 7v14\" />\n <path d={BOX_PATH} />\n <path d={BOW_PATH} />\n <rect x=\"3\" y=\"7\" width=\"18\" height=\"4\" rx=\"1\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype GiftIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof GiftIconBase>;\n\nconst GiftIconInner = forwardRef<\n HTMLDivElement,\n GiftIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<GiftIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <GiftIconBase\n {...(componentProps as unknown as ComponentProps<typeof GiftIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const GiftIcon = Interactive.withSchema({\n Component: GiftIconInner,\n componentName: \"<GiftIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 80+}diff --git a/registry-artifacts/elements/icon-globe.json b/registry-artifacts/elements/icon-globe.jsonnew file mode 100644index 00000000..e27c07aa--- /dev/null+++ b/registry-artifacts/elements/icon-globe.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Globe",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "icon-globe",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst SPHERE_PATH = \"M12 2a10 10 0 1 0 0 20 10 10 0 1 0 0-20Z\";\nconst MERIDIAN_PATH = \"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20\";\nconst EQUATOR_PATH = \"M2 12H22\";\n\nconst AXIS_X = 12;\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 40,\n loop: true,\n} as const;\n\nfunction GlobeIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const sphereDraw = interpolate(linearDraw, [0, 0.7], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const linesDraw = interpolate(linearDraw, [0.5, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const spinX = acting ? Math.cos(actionProgress * Math.PI * 2) : 1;\n\n const sphere = drawnPathProps(SPHERE_PATH, acting ? 1 : sphereDraw);\n const meridian = drawnPathProps(MERIDIAN_PATH, acting ? 1 : linesDraw);\n const equator = drawnPathProps(EQUATOR_PATH, acting ? 1 : linesDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const spinTransform = `translate(${AXIS_X * (1 - spinX)} 0) scale(${spinX} 1)`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={spinTransform}>\n <path\n d={SPHERE_PATH}\n strokeDasharray={sphere.strokeDasharray}\n strokeDashoffset={sphere.strokeDashoffset}\n />\n <path\n d={EQUATOR_PATH}\n strokeDasharray={equator.strokeDasharray}\n strokeDashoffset={equator.strokeDashoffset}\n />\n <path\n d={MERIDIAN_PATH}\n strokeDasharray={meridian.strokeDasharray}\n strokeDashoffset={meridian.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction GlobeIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d={MERIDIAN_PATH} />\n <path d=\"M2 12h20\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: true,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: true,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype GlobeIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof GlobeIconBase>;\n\nconst GlobeIconInner = forwardRef<\n HTMLDivElement,\n GlobeIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<GlobeIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <GlobeIconBase\n {...(componentProps as unknown as ComponentProps<typeof GlobeIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const GlobeIcon = Interactive.withSchema({\n Component: GlobeIconInner,\n componentName: \"<GlobeIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/icon-heart.json b/registry-artifacts/elements/icon-heart.jsonnew file mode 100644index 00000000..a906fb85--- /dev/null+++ b/registry-artifacts/elements/icon-heart.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Heart",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-heart",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst HEART_PATH =\n \"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 26,\n loop: false,\n} as const;\n\nfunction HeartIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const heartProgress = interpolate(linearDraw, [0, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n\n const heart = drawnPathProps(HEART_PATH, heartProgress);\n\n const beat = interpolate(\n actionProgress,\n [0, 0.2, 0.4, 0.6, 0.8, 1],\n [1, 1.16, 1, 1.1, 1, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n );\n\n const scale = (0.85 + 0.15 * scaleIn) * beat;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={HEART_PATH}\n strokeDasharray={heart.strokeDasharray}\n strokeDashoffset={heart.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction HeartIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={HEART_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype HeartIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof HeartIconBase>;\n\nconst HeartIconInner = forwardRef<\n HTMLDivElement,\n HeartIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<HeartIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <HeartIconBase\n {...(componentProps as unknown as ComponentProps<typeof HeartIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const HeartIcon = Interactive.withSchema({\n Component: HeartIconInner,\n componentName: \"<HeartIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-help-circle.json b/registry-artifacts/elements/icon-help-circle.jsonnew file mode 100644index 00000000..8c56da34--- /dev/null+++ b/registry-artifacts/elements/icon-help-circle.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Help Circle",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-help-circle",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst RING_PATH = \"M12 2a10 10 0 1 0 0 20 10 10 0 1 0 0-20Z\";\nconst CURVE_PATH = \"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3\";\nconst DOT_PATH = \"M12 17h.01\";\n\nconst PIVOT_X = 12;\nconst PIVOT_Y = 8;\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction HelpCircleIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const ringDraw = interpolate(linearDraw, [0, 0.6], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const curveDraw = interpolate(linearDraw, [0.4, 0.85], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const dotDraw = interpolate(linearDraw, [0.75, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const tilt = acting\n ? interpolate(actionProgress, [0, 0.4, 0.7, 1], [0, 6, -4, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n\n const ring = drawnPathProps(RING_PATH, acting ? 1 : ringDraw);\n const curve = drawnPathProps(CURVE_PATH, acting ? 1 : curveDraw);\n const dot = drawnPathProps(DOT_PATH, acting ? 1 : dotDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={RING_PATH}\n strokeDasharray={ring.strokeDasharray}\n strokeDashoffset={ring.strokeDashoffset}\n />\n <g transform={`rotate(${tilt} ${PIVOT_X} ${PIVOT_Y})`}>\n <path\n d={CURVE_PATH}\n strokeDasharray={curve.strokeDasharray}\n strokeDashoffset={curve.strokeDashoffset}\n />\n <path\n d={DOT_PATH}\n strokeDasharray={dot.strokeDasharray}\n strokeDashoffset={dot.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction HelpCircleIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d={CURVE_PATH} />\n <path d={DOT_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype HelpCircleIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof HelpCircleIconBase>;\n\nconst HelpCircleIconInner = forwardRef<\n HTMLDivElement,\n HelpCircleIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<HelpCircleIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <HelpCircleIconBase\n {...(componentProps as unknown as ComponentProps<typeof HelpCircleIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const HelpCircleIcon = Interactive.withSchema({\n Component: HelpCircleIconInner,\n componentName: \"<HelpCircleIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-home.json b/registry-artifacts/elements/icon-home.jsonnew file mode 100644index 00000000..b5142aeb--- /dev/null+++ b/registry-artifacts/elements/icon-home.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Home",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-home",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst DOOR_PATH = \"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8\";\nconst HOUSE_PATH =\n \"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 22,\n loop: false,\n} as const;\n\nfunction HomeIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const doorDraw = interpolate(actionProgress, [0.1, 0.5], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const pop = acting\n ? interpolate(actionProgress, [0.5, 0.7, 1], [1, 1.05, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const doorProgress = animation === \"draw\" ? 1 : acting ? doorDraw : 0;\n\n const house = drawnPathProps(HOUSE_PATH, drawProgress);\n const door = drawnPathProps(DOOR_PATH, doorProgress);\n\n const scale = (0.85 + 0.15 * scaleIn) * pop;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={HOUSE_PATH}\n strokeDasharray={house.strokeDasharray}\n strokeDashoffset={house.strokeDashoffset}\n />\n <path\n d={DOOR_PATH}\n strokeDasharray={door.strokeDasharray}\n strokeDashoffset={door.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction HomeIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={DOOR_PATH} />\n <path d={HOUSE_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype HomeIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof HomeIconBase>;\n\nconst HomeIconInner = forwardRef<\n HTMLDivElement,\n HomeIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<HomeIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <HomeIconBase\n {...(componentProps as unknown as ComponentProps<typeof HomeIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const HomeIcon = Interactive.withSchema({\n Component: HomeIconInner,\n componentName: \"<HomeIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-image.json b/registry-artifacts/elements/icon-image.jsonnew file mode 100644index 00000000..ff0c6d38--- /dev/null+++ b/registry-artifacts/elements/icon-image.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Image",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-image",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst FRAME_PATH =\n \"M5 3H19A2 2 0 0 1 21 5V19A2 2 0 0 1 19 21H5A2 2 0 0 1 3 19V5A2 2 0 0 1 5 3Z\";\nconst SUN_PATH =\n \"M9 7 A2 2 0 0 1 11 9 A2 2 0 0 1 9 11 A2 2 0 0 1 7 9 A2 2 0 0 1 9 7\";\nconst MOUNTAIN_PATH = \"M6 21 15.086 11.914A2 2 0 0 1 17.914 11.914L21 15\";\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction ImageIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const frameDraw = interpolate(linearDraw, [0, 0.667], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const sunDraw = interpolate(linearDraw, [0.444, 0.778], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const mountainDraw = interpolate(linearDraw, [0.556, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const mountainProgress = acting\n ? interpolate(actionProgress, [0, 0.6], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n })\n : mountainDraw;\n const sunShiftY = acting\n ? interpolate(actionProgress, [0, 0.6, 0.9], [1, -0.5, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n })\n : 0;\n const sunOpacity = acting\n ? interpolate(actionProgress, [0, 0.5], [0.6, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : 1;\n\n const frame = drawnPathProps(FRAME_PATH, frameDraw);\n const sun = drawnPathProps(SUN_PATH, acting ? 1 : sunDraw);\n const mountain = drawnPathProps(MOUNTAIN_PATH, mountainProgress);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={FRAME_PATH}\n strokeDasharray={frame.strokeDasharray}\n strokeDashoffset={frame.strokeDashoffset}\n />\n <g transform={`translate(0 ${sunShiftY})`} opacity={sunOpacity}>\n <path\n d={SUN_PATH}\n strokeDasharray={sun.strokeDasharray}\n strokeDashoffset={sun.strokeDashoffset}\n />\n </g>\n <path\n d={MOUNTAIN_PATH}\n strokeDasharray={mountain.strokeDasharray}\n strokeDashoffset={mountain.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction ImageIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" ry=\"2\" />\n <circle cx=\"9\" cy=\"9\" r=\"2\" />\n <path d=\"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype ImageIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ImageIconBase>;\n\nconst ImageIconInner = forwardRef<\n HTMLDivElement,\n ImageIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ImageIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ImageIconBase\n {...(componentProps as unknown as ComponentProps<typeof ImageIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ImageIcon = Interactive.withSchema({\n Component: ImageIconInner,\n componentName: \"<ImageIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-inbox.json b/registry-artifacts/elements/icon-inbox.jsonnew file mode 100644index 00000000..061043f9--- /dev/null+++ b/registry-artifacts/elements/icon-inbox.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Inbox",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-inbox",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst TRAY_PATH =\n \"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z\";\nconst LIP_PATH = \"M22 12H16L14 15H10L8 12H2\";\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 22,\n loop: false,\n} as const;\n\nfunction InboxIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const trayDraw = interpolate(linearDraw, [0, 0.7], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const lipDraw = interpolate(linearDraw, [0.45, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const dip = acting\n ? interpolate(actionProgress, [0, 0.25, 0.55, 1], [0, 0, 2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const pop = acting\n ? interpolate(actionProgress, [0.55, 0.75, 1], [1, 1.03, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const tray = drawnPathProps(TRAY_PATH, acting ? 1 : trayDraw);\n const lip = drawnPathProps(LIP_PATH, acting ? 1 : lipDraw);\n\n const scale = (0.85 + 0.15 * scaleIn) * pop;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `translateY(${dip}px) scale(${scale})`,\n }}\n >\n <path\n d={TRAY_PATH}\n strokeDasharray={tray.strokeDasharray}\n strokeDashoffset={tray.strokeDashoffset}\n />\n <path\n d={LIP_PATH}\n strokeDasharray={lip.strokeDasharray}\n strokeDashoffset={lip.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction InboxIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <polyline points=\"22 12 16 12 14 15 10 15 8 12 2 12\" />\n <path d={TRAY_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype InboxIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof InboxIconBase>;\n\nconst InboxIconInner = forwardRef<\n HTMLDivElement,\n InboxIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<InboxIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <InboxIconBase\n {...(componentProps as unknown as ComponentProps<typeof InboxIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const InboxIcon = Interactive.withSchema({\n Component: InboxIconInner,\n componentName: \"<InboxIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-info.json b/registry-artifacts/elements/icon-info.jsonnew file mode 100644index 00000000..1e639322--- /dev/null+++ b/registry-artifacts/elements/icon-info.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Info",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-info",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst CIRCLE_PATH =\n \"M12 2 A10 10 0 0 1 22 12 A10 10 0 0 1 12 22 A10 10 0 0 1 2 12 A10 10 0 0 1 12 2\";\nconst STEM_PATH = \"M12 12v4\";\nconst DOT_PATH = \"M12 8h.01\";\n\nconst TIMINGS = {\n drawDurationInFrames: 20,\n actionDelayInFrames: 2,\n actionDurationInFrames: 16,\n loop: false,\n} as const;\n\nfunction InfoIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const circleProgress = interpolate(linearDraw, [0, 0.7], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const stemProgress = interpolate(linearDraw, [0.7, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const dotPop = interpolate(linearDraw, [0.5, 0.65], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.back(1.8)),\n });\n\n const circle = drawnPathProps(CIRCLE_PATH, circleProgress);\n const stem = drawnPathProps(STEM_PATH, stemProgress);\n\n const bob = interpolate(actionProgress, [0, 0.5, 1], [0, -2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.sin),\n });\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={CIRCLE_PATH}\n strokeDasharray={circle.strokeDasharray}\n strokeDashoffset={circle.strokeDashoffset}\n />\n <path\n d={STEM_PATH}\n strokeDasharray={stem.strokeDasharray}\n strokeDashoffset={stem.strokeDashoffset}\n />\n <g\n transform={`translate(0 ${bob}) translate(12 8) scale(${dotPop}) translate(-12 -8)`}\n >\n <path d={DOT_PATH} />\n </g>\n </svg>\n );\n}\n\nfunction InfoIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d=\"M12 16v-4\" />\n <path d={DOT_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype InfoIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof InfoIconBase>;\n\nconst InfoIconInner = forwardRef<\n HTMLDivElement,\n InfoIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<InfoIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <InfoIconBase\n {...(componentProps as unknown as ComponentProps<typeof InfoIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const InfoIcon = Interactive.withSchema({\n Component: InfoIconInner,\n componentName: \"<InfoIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-key.json b/registry-artifacts/elements/icon-key.jsonnew file mode 100644index 00000000..3d8eb2c0--- /dev/null+++ b/registry-artifacts/elements/icon-key.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Key",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-key",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst HEAD_PATH =\n \"M7.5 10 A5.5 5.5 0 0 1 13 15.5 A5.5 5.5 0 0 1 7.5 21 A5.5 5.5 0 0 1 2 15.5 A5.5 5.5 0 0 1 7.5 10\";\nconst SHAFT_PATH = \"M21 2 11.4 11.6\";\nconst TEETH_PATH =\n \"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4\";\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 28,\n loop: false,\n} as const;\n\nfunction KeyIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const headDraw = interpolate(linearDraw, [0, 0.625], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const shaftDraw = interpolate(linearDraw, [0.375, 0.8], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const teethDraw = interpolate(linearDraw, [0.56, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const turn = acting\n ? interpolate(actionProgress, [0, 0.5, 0.64, 0.9, 1], [0, -25, -25, 2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n\n const head = drawnPathProps(HEAD_PATH, headDraw);\n const shaft = drawnPathProps(SHAFT_PATH, shaftDraw);\n const teeth = drawnPathProps(TEETH_PATH, teethDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`rotate(${turn} 7.5 15.5)`}>\n <path\n d={HEAD_PATH}\n strokeDasharray={head.strokeDasharray}\n strokeDashoffset={head.strokeDashoffset}\n />\n <path\n d={SHAFT_PATH}\n strokeDasharray={shaft.strokeDasharray}\n strokeDashoffset={shaft.strokeDashoffset}\n />\n <path\n d={TEETH_PATH}\n strokeDasharray={teeth.strokeDasharray}\n strokeDashoffset={teeth.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction KeyIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={TEETH_PATH} />\n <path d={SHAFT_PATH} />\n <circle cx=\"7.5\" cy=\"15.5\" r=\"5.5\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype KeyIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof KeyIconBase>;\n\nconst KeyIconInner = forwardRef<\n HTMLDivElement,\n KeyIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<KeyIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <KeyIconBase\n {...(componentProps as unknown as ComponentProps<typeof KeyIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const KeyIcon = Interactive.withSchema({\n Component: KeyIconInner,\n componentName: \"<KeyIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-layout-grid.json b/registry-artifacts/elements/icon-layout-grid.jsonnew file mode 100644index 00000000..fb81a6ca--- /dev/null+++ b/registry-artifacts/elements/icon-layout-grid.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Layout Grid",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-layout-grid",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst TL_PATH =\n \"M4 3H9A1 1 0 0 1 10 4V9A1 1 0 0 1 9 10H4A1 1 0 0 1 3 9V4A1 1 0 0 1 4 3Z\";\nconst TR_PATH =\n \"M15 3H20A1 1 0 0 1 21 4V9A1 1 0 0 1 20 10H15A1 1 0 0 1 14 9V4A1 1 0 0 1 15 3Z\";\nconst BR_PATH =\n \"M15 14H20A1 1 0 0 1 21 15V20A1 1 0 0 1 20 21H15A1 1 0 0 1 14 20V15A1 1 0 0 1 15 14Z\";\nconst BL_PATH =\n \"M4 14H9A1 1 0 0 1 10 15V20A1 1 0 0 1 9 21H4A1 1 0 0 1 3 20V15A1 1 0 0 1 4 14Z\";\n\nconst TIMINGS = {\n drawDurationInFrames: 20,\n actionDelayInFrames: 2,\n actionDurationInFrames: 26,\n loop: false,\n} as const;\n\nconst TILES = [\n { path: TL_PATH, cx: 6.5, cy: 6.5, drawWindow: [0, 0.4], stagger: 0 },\n { path: TR_PATH, cx: 17.5, cy: 6.5, drawWindow: [0.2, 0.6], stagger: 0.23 },\n { path: BR_PATH, cx: 17.5, cy: 17.5, drawWindow: [0.4, 0.8], stagger: 0.46 },\n { path: BL_PATH, cx: 6.5, cy: 17.5, drawWindow: [0.6, 1], stagger: 0.69 },\n] as const;\n\nfunction LayoutGridIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n {TILES.map((tile) => {\n const drawn = interpolate(linearDraw, [...tile.drawWindow], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const dash = drawnPathProps(tile.path, drawn);\n const pop =\n acting && actionProgress >= tile.stagger\n ? interpolate(\n actionProgress,\n [tile.stagger, tile.stagger + 0.25, tile.stagger + 0.5],\n [0.85, 1.06, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n )\n : 1;\n const tx = tile.cx * (1 - pop);\n const ty = tile.cy * (1 - pop);\n return (\n <g key={tile.path} transform={`translate(${tx} ${ty}) scale(${pop})`}>\n <path\n d={tile.path}\n strokeDasharray={dash.strokeDasharray}\n strokeDashoffset={dash.strokeDashoffset}\n />\n </g>\n );\n })}\n </svg>\n );\n}\n\nfunction LayoutGridIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <rect width=\"7\" height=\"7\" x=\"3\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"14\" y=\"3\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"14\" y=\"14\" rx=\"1\" />\n <rect width=\"7\" height=\"7\" x=\"3\" y=\"14\" rx=\"1\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype LayoutGridIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof LayoutGridIconBase>;\n\nconst LayoutGridIconInner = forwardRef<\n HTMLDivElement,\n LayoutGridIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<LayoutGridIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <LayoutGridIconBase\n {...(componentProps as unknown as ComponentProps<typeof LayoutGridIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const LayoutGridIcon = Interactive.withSchema({\n Component: LayoutGridIconInner,\n componentName: \"<LayoutGridIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-link.json b/registry-artifacts/elements/icon-link.jsonnew file mode 100644index 00000000..327b62fe--- /dev/null+++ b/registry-artifacts/elements/icon-link.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Link",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-link",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst TOP_PATH = \"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71\";\nconst BOTTOM_PATH =\n \"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction LinkIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const pull = acting\n ? interpolate(actionProgress, [0, 0.4, 0.75], [0, 1.06, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const pop = acting\n ? interpolate(actionProgress, [0.6, 0.78, 1], [1, 1.06, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const top = drawnPathProps(TOP_PATH, drawProgress);\n const bottom = drawnPathProps(BOTTOM_PATH, drawProgress);\n\n const scale = (0.85 + 0.15 * scaleIn) * pop;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`translate(${pull} ${-pull})`}>\n <path\n d={TOP_PATH}\n strokeDasharray={top.strokeDasharray}\n strokeDashoffset={top.strokeDashoffset}\n />\n </g>\n <g transform={`translate(${-pull} ${pull})`}>\n <path\n d={BOTTOM_PATH}\n strokeDasharray={bottom.strokeDasharray}\n strokeDashoffset={bottom.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction LinkIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={TOP_PATH} />\n <path d={BOTTOM_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype LinkIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof LinkIconBase>;\n\nconst LinkIconInner = forwardRef<\n HTMLDivElement,\n LinkIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<LinkIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <LinkIconBase\n {...(componentProps as unknown as ComponentProps<typeof LinkIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const LinkIcon = Interactive.withSchema({\n Component: LinkIconInner,\n componentName: \"<LinkIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-loader.json b/registry-artifacts/elements/icon-loader.jsonnew file mode 100644index 00000000..b72de460--- /dev/null+++ b/registry-artifacts/elements/icon-loader.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Loader",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "icon-loader",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst ARC_PATH = \"M21 12a9 9 0 1 1-6.219-8.56\";\n\nconst TIMINGS = {\n drawDurationInFrames: 10,\n actionDelayInFrames: 2,\n actionDurationInFrames: 40,\n loop: true,\n} as const;\n\nfunction LoaderIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, actionProgress, cycleIndex } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const arcProgress = interpolate(linearDraw, [0, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const entrance = interpolate(linearDraw, [0, 1], [0.9, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const arc = drawnPathProps(ARC_PATH, arcProgress);\n const rotate = (cycleIndex + actionProgress) * 360;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `rotate(${rotate}deg) scale(${entrance})`,\n }}\n >\n <path\n d={ARC_PATH}\n strokeDasharray={arc.strokeDasharray}\n strokeDashoffset={arc.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction LoaderIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={ARC_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: true,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: true,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype LoaderIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof LoaderIconBase>;\n\nconst LoaderIconInner = forwardRef<\n HTMLDivElement,\n LoaderIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<LoaderIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <LoaderIconBase\n {...(componentProps as unknown as ComponentProps<typeof LoaderIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const LoaderIcon = Interactive.withSchema({\n Component: LoaderIconInner,\n componentName: \"<LoaderIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/icon-lock.json b/registry-artifacts/elements/icon-lock.jsonnew file mode 100644index 00000000..cd70ed5e--- /dev/null+++ b/registry-artifacts/elements/icon-lock.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Lock",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-lock",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst BODY_PATH =\n \"M5 11H19A2 2 0 0 1 21 13V20A2 2 0 0 1 19 22H5A2 2 0 0 1 3 20V13A2 2 0 0 1 5 11Z\";\nconst SHACKLE_PATH = \"M7 11V7a5 5 0 0 1 10 0v4\";\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 22,\n loop: false,\n} as const;\n\nfunction LockIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const bodyDraw = interpolate(linearDraw, [0, 0.75], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const shackleDraw = interpolate(linearDraw, [0.5, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const lift = acting\n ? interpolate(actionProgress, [0, 0.35, 0.7], [0, -2.5, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.in(Easing.quad),\n })\n : 0;\n const pop = acting\n ? interpolate(actionProgress, [0.7, 0.85, 1], [1, 1.05, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const body = drawnPathProps(BODY_PATH, bodyDraw);\n const shackle = drawnPathProps(SHACKLE_PATH, shackleDraw);\n\n const scale = (0.85 + 0.15 * scaleIn) * pop;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={BODY_PATH}\n strokeDasharray={body.strokeDasharray}\n strokeDashoffset={body.strokeDashoffset}\n />\n <g transform={`translate(0 ${lift})`}>\n <path\n d={SHACKLE_PATH}\n strokeDasharray={shackle.strokeDasharray}\n strokeDashoffset={shackle.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction LockIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <rect width=\"18\" height=\"11\" x=\"3\" y=\"11\" rx=\"2\" ry=\"2\" />\n <path d={SHACKLE_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype LockIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof LockIconBase>;\n\nconst LockIconInner = forwardRef<\n HTMLDivElement,\n LockIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<LockIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <LockIconBase\n {...(componentProps as unknown as ComponentProps<typeof LockIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const LockIcon = Interactive.withSchema({\n Component: LockIconInner,\n componentName: \"<LockIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-log-out.json b/registry-artifacts/elements/icon-log-out.jsonnew file mode 100644index 00000000..3f2878af--- /dev/null+++ b/registry-artifacts/elements/icon-log-out.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Log Out",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-log-out",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst DOOR_PATH = \"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4\";\nconst SHAFT_PATH = \"M21 12H9\";\nconst HEAD_PATH = \"M16 17 21 12 16 7\";\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 22,\n loop: false,\n} as const;\n\nfunction LogOutIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const doorDraw = interpolate(linearDraw, [0, 0.625], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const shaftDraw = interpolate(linearDraw, [0.375, 0.8], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const headDraw = interpolate(linearDraw, [0.56, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const exit = acting\n ? interpolate(actionProgress, [0, 0.22, 0.45, 0.68, 1], [0, 4, 0, 2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n\n const door = drawnPathProps(DOOR_PATH, doorDraw);\n const shaft = drawnPathProps(SHAFT_PATH, shaftDraw);\n const head = drawnPathProps(HEAD_PATH, headDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={DOOR_PATH}\n strokeDasharray={door.strokeDasharray}\n strokeDashoffset={door.strokeDashoffset}\n />\n <g transform={`translate(${exit} 0)`}>\n <path\n d={SHAFT_PATH}\n strokeDasharray={shaft.strokeDasharray}\n strokeDashoffset={shaft.strokeDashoffset}\n />\n <path\n d={HEAD_PATH}\n strokeDasharray={head.strokeDasharray}\n strokeDashoffset={head.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction LogOutIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={HEAD_PATH} />\n <path d={SHAFT_PATH} />\n <path d={DOOR_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype LogOutIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof LogOutIconBase>;\n\nconst LogOutIconInner = forwardRef<\n HTMLDivElement,\n LogOutIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<LogOutIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <LogOutIconBase\n {...(componentProps as unknown as ComponentProps<typeof LogOutIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const LogOutIcon = Interactive.withSchema({\n Component: LogOutIconInner,\n componentName: \"<LogOutIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-mail.json b/registry-artifacts/elements/icon-mail.jsonnew file mode 100644index 00000000..d4b03c68--- /dev/null+++ b/registry-artifacts/elements/icon-mail.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Mail",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-mail",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst BODY_PATH =\n \"M4 4H20A2 2 0 0 1 22 6V18A2 2 0 0 1 20 20H4A2 2 0 0 1 2 18V6A2 2 0 0 1 4 4Z\";\nconst FLAP_PATH = \"M22 7 13.009 12.727a2 2 0 0 1-2.009 0L2 7\";\nconst FLAP_RIGHT_PATH = \"M22 7 13.009 12.727\";\nconst FLAP_LEFT_PATH = \"M2 7 11 12.727\";\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 24,\n loop: false,\n} as const;\n\nfunction MailIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const bodyDraw = interpolate(linearDraw, [0, 0.75], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const flapDraw = interpolate(linearDraw, [0.5, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const flapProgress = acting ? 1 : flapDraw;\n const pop = acting\n ? interpolate(actionProgress, [0, 0.45, 1], [1, 1.05, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n const bob = acting\n ? interpolate(actionProgress, [0, 0.45, 1], [0, -1.6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n\n const body = drawnPathProps(BODY_PATH, bodyDraw);\n const flapRight = drawnPathProps(FLAP_RIGHT_PATH, flapProgress);\n const flapLeft = drawnPathProps(FLAP_LEFT_PATH, flapProgress);\n\n const scale = (0.85 + 0.15 * scaleIn) * pop;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `translateY(${bob}px) scale(${scale})`,\n }}\n >\n <path\n d={BODY_PATH}\n strokeDasharray={body.strokeDasharray}\n strokeDashoffset={body.strokeDashoffset}\n />\n <path\n d={FLAP_RIGHT_PATH}\n strokeDasharray={flapRight.strokeDasharray}\n strokeDashoffset={flapRight.strokeDashoffset}\n />\n <path\n d={FLAP_LEFT_PATH}\n strokeDasharray={flapLeft.strokeDasharray}\n strokeDashoffset={flapLeft.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction MailIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={FLAP_PATH} />\n <rect x=\"2\" y=\"4\" width=\"20\" height=\"16\" rx=\"2\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype MailIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof MailIconBase>;\n\nconst MailIconInner = forwardRef<\n HTMLDivElement,\n MailIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<MailIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <MailIconBase\n {...(componentProps as unknown as ComponentProps<typeof MailIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const MailIcon = Interactive.withSchema({\n Component: MailIconInner,\n componentName: \"<MailIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-maximize.json b/registry-artifacts/elements/icon-maximize.jsonnew file mode 100644index 00000000..716c1972--- /dev/null+++ b/registry-artifacts/elements/icon-maximize.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Maximize",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-maximize",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst TL_PATH = \"M8 3H5a2 2 0 0 0-2 2v3\";\nconst TR_PATH = \"M21 8V5a2 2 0 0 0-2-2h-3\";\nconst BL_PATH = \"M3 16v3a2 2 0 0 0 2 2h3\";\nconst BR_PATH = \"M16 21h3a2 2 0 0 0 2-2v-3\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 24,\n loop: false,\n} as const;\n\nconst BRACKETS = [\n { path: TL_PATH, dx: -1, dy: -1 },\n { path: TR_PATH, dx: 1, dy: -1 },\n { path: BL_PATH, dx: -1, dy: 1 },\n { path: BR_PATH, dx: 1, dy: 1 },\n] as const;\n\nfunction MaximizeIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n const expand = acting\n ? interpolate(actionProgress, [0, 0.42, 1], [0, 1.77, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n {BRACKETS.map((bracket) => {\n const dash = drawnPathProps(bracket.path, drawProgress);\n return (\n <g\n key={bracket.path}\n transform={`translate(${bracket.dx * expand} ${bracket.dy * expand})`}\n >\n <path\n d={bracket.path}\n strokeDasharray={dash.strokeDasharray}\n strokeDashoffset={dash.strokeDashoffset}\n />\n </g>\n );\n })}\n </svg>\n );\n}\n\nfunction MaximizeIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={TL_PATH} />\n <path d={TR_PATH} />\n <path d={BL_PATH} />\n <path d={BR_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype MaximizeIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof MaximizeIconBase>;\n\nconst MaximizeIconInner = forwardRef<\n HTMLDivElement,\n MaximizeIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<MaximizeIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <MaximizeIconBase\n {...(componentProps as unknown as ComponentProps<typeof MaximizeIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const MaximizeIcon = Interactive.withSchema({\n Component: MaximizeIconInner,\n componentName: \"<MaximizeIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-menu.json b/registry-artifacts/elements/icon-menu.jsonnew file mode 100644index 00000000..92601274--- /dev/null+++ b/registry-artifacts/elements/icon-menu.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Menu",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-menu",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst TOP_PATH = \"M4 5 20 5\";\nconst MID_PATH = \"M4 12 20 12\";\nconst BOT_PATH = \"M4 19 20 19\";\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nconst BARS = [\n { path: TOP_PATH, drawWindow: [0, 0.5], stagger: 0 },\n { path: MID_PATH, drawWindow: [0.25, 0.75], stagger: 0.18 },\n { path: BOT_PATH, drawWindow: [0.5, 1], stagger: 0.36 },\n] as const;\n\nfunction MenuIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n {BARS.map((bar) => {\n const drawn = interpolate(linearDraw, [...bar.drawWindow], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const dash = drawnPathProps(bar.path, drawn);\n const slide = acting\n ? interpolate(\n actionProgress,\n [bar.stagger, bar.stagger + 0.3, bar.stagger + 0.55],\n [-3, 2, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n )\n : 0;\n return (\n <g key={bar.path} transform={`translate(${slide} 0)`}>\n <path\n d={bar.path}\n strokeDasharray={dash.strokeDasharray}\n strokeDashoffset={dash.strokeDashoffset}\n />\n </g>\n );\n })}\n </svg>\n );\n}\n\nfunction MenuIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={TOP_PATH} />\n <path d={MID_PATH} />\n <path d={BOT_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype MenuIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof MenuIconBase>;\n\nconst MenuIconInner = forwardRef<\n HTMLDivElement,\n MenuIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<MenuIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <MenuIconBase\n {...(componentProps as unknown as ComponentProps<typeof MenuIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const MenuIcon = Interactive.withSchema({\n Component: MenuIconInner,\n componentName: \"<MenuIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-message-circle.json b/registry-artifacts/elements/icon-message-circle.jsonnew file mode 100644index 00000000..6b243e7f--- /dev/null+++ b/registry-artifacts/elements/icon-message-circle.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Message Circle",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-message-circle",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst BUBBLE_PATH =\n \"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719\";\n\nconst TAIL_X = 4;\nconst TAIL_Y = 20;\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction MessageCircleIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const inflate = acting\n ? interpolate(actionProgress, [0, 0.45, 1], [0.9, 1.08, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const bubble = drawnPathProps(BUBBLE_PATH, drawProgress);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const inflateTransform = `translate(${TAIL_X * (1 - inflate)} ${TAIL_Y * (1 - inflate)}) scale(${inflate})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={inflateTransform}>\n <path\n d={BUBBLE_PATH}\n strokeDasharray={bubble.strokeDasharray}\n strokeDashoffset={bubble.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction MessageCircleIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={BUBBLE_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype MessageCircleIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof MessageCircleIconBase>;\n\nconst MessageCircleIconInner = forwardRef<\n HTMLDivElement,\n MessageCircleIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<MessageCircleIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <MessageCircleIconBase\n {...(componentProps as unknown as ComponentProps<typeof MessageCircleIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const MessageCircleIcon = Interactive.withSchema({\n Component: MessageCircleIconInner,\n componentName: \"<MessageCircleIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-mic.json b/registry-artifacts/elements/icon-mic.jsonnew file mode 100644index 00000000..3d8b90fb--- /dev/null+++ b/registry-artifacts/elements/icon-mic.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Mic",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-mic",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst CAPSULE_PATH =\n \"M12 2A3 3 0 0 1 15 5V12A3 3 0 0 1 12 15A3 3 0 0 1 9 12V5A3 3 0 0 1 12 2Z\";\nconst ARC_PATH = \"M19 10v2a7 7 0 0 1-14 0v-2\";\nconst STAND_PATH = \"M12 19v3\";\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 24,\n loop: false,\n} as const;\n\nfunction MicIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const capsuleDraw = interpolate(linearDraw, [0, 0.625], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const arcDraw = interpolate(linearDraw, [0.375, 0.875], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const standDraw = interpolate(linearDraw, [0.625, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const capsuleScaleY = acting\n ? interpolate(\n actionProgress,\n [0, 0.15, 0.3, 0.5, 0.65, 0.8, 1],\n [1, 0.94, 1.04, 1, 0.97, 1.02, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n )\n : 1;\n\n const capsule = drawnPathProps(CAPSULE_PATH, capsuleDraw);\n const arc = drawnPathProps(ARC_PATH, arcDraw);\n const stand = drawnPathProps(STAND_PATH, standDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const capsuleTransform = `translate(0 ${8.5 * (1 - capsuleScaleY)}) scale(1 ${capsuleScaleY})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={capsuleTransform}>\n <path\n d={CAPSULE_PATH}\n strokeDasharray={capsule.strokeDasharray}\n strokeDashoffset={capsule.strokeDashoffset}\n />\n </g>\n <path\n d={ARC_PATH}\n strokeDasharray={arc.strokeDasharray}\n strokeDashoffset={arc.strokeDashoffset}\n />\n <path\n d={STAND_PATH}\n strokeDasharray={stand.strokeDasharray}\n strokeDashoffset={stand.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction MicIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={STAND_PATH} />\n <path d={ARC_PATH} />\n <rect x=\"9\" y=\"2\" width=\"6\" height=\"13\" rx=\"3\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype MicIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof MicIconBase>;\n\nconst MicIconInner = forwardRef<\n HTMLDivElement,\n MicIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<MicIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <MicIconBase\n {...(componentProps as unknown as ComponentProps<typeof MicIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const MicIcon = Interactive.withSchema({\n Component: MicIconInner,\n componentName: \"<MicIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-monitor.json b/registry-artifacts/elements/icon-monitor.jsonnew file mode 100644index 00000000..2c615b92--- /dev/null+++ b/registry-artifacts/elements/icon-monitor.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Monitor",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-monitor",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst SCREEN_PATH =\n \"M4 3H20A2 2 0 0 1 22 5V15A2 2 0 0 1 20 17H4A2 2 0 0 1 2 15V5A2 2 0 0 1 4 3Z\";\nconst BASE_PATH = \"M8 21H16\";\nconst NECK_PATH = \"M12 17V21\";\n\nconst SCREEN_CY = 10;\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 18,\n loop: false,\n} as const;\n\nfunction MonitorIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const standDraw = interpolate(linearDraw, [0, 0.5], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const screenDraw = interpolate(linearDraw, [0.35, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const screenYScale = acting\n ? interpolate(actionProgress, [0, 0.45, 1], [0.92, 1.04, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n })\n : 1;\n const pop = acting\n ? interpolate(actionProgress, [0.5, 0.7, 1], [1, 1.02, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const screen = drawnPathProps(SCREEN_PATH, acting ? 1 : screenDraw);\n const base = drawnPathProps(BASE_PATH, acting ? 1 : standDraw);\n const neck = drawnPathProps(NECK_PATH, acting ? 1 : standDraw);\n\n const scale = (0.85 + 0.15 * scaleIn) * pop;\n const screenTransform = `translate(0 ${SCREEN_CY * (1 - screenYScale)}) scale(1 ${screenYScale})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={screenTransform}>\n <path\n d={SCREEN_PATH}\n strokeDasharray={screen.strokeDasharray}\n strokeDashoffset={screen.strokeDashoffset}\n />\n </g>\n <path\n d={BASE_PATH}\n strokeDasharray={base.strokeDasharray}\n strokeDashoffset={base.strokeDashoffset}\n />\n <path\n d={NECK_PATH}\n strokeDasharray={neck.strokeDasharray}\n strokeDashoffset={neck.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction MonitorIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <rect width=\"20\" height=\"14\" x=\"2\" y=\"3\" rx=\"2\" />\n <line x1=\"8\" x2=\"16\" y1=\"21\" y2=\"21\" />\n <line x1=\"12\" x2=\"12\" y1=\"17\" y2=\"21\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype MonitorIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof MonitorIconBase>;\n\nconst MonitorIconInner = forwardRef<\n HTMLDivElement,\n MonitorIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<MonitorIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <MonitorIconBase\n {...(componentProps as unknown as ComponentProps<typeof MonitorIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const MonitorIcon = Interactive.withSchema({\n Component: MonitorIconInner,\n componentName: \"<MonitorIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-moon.json b/registry-artifacts/elements/icon-moon.jsonnew file mode 100644index 00000000..4bcc74cd--- /dev/null+++ b/registry-artifacts/elements/icon-moon.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Moon",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-moon",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst MOON_PATH =\n \"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401\";\n\nconst CENTER = 12;\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 24,\n loop: false,\n} as const;\n\nfunction MoonIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const settle = acting\n ? interpolate(actionProgress, [0, 0.2, 0.5, 0.78, 1], [0, -16, 9, -3, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.sin),\n })\n : 0;\n\n const moon = drawnPathProps(MOON_PATH, drawProgress);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`rotate(${settle} ${CENTER} ${CENTER})`}>\n <path\n d={MOON_PATH}\n strokeDasharray={moon.strokeDasharray}\n strokeDashoffset={moon.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction MoonIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={MOON_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype MoonIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof MoonIconBase>;\n\nconst MoonIconInner = forwardRef<\n HTMLDivElement,\n MoonIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<MoonIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <MoonIconBase\n {...(componentProps as unknown as ComponentProps<typeof MoonIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const MoonIcon = Interactive.withSchema({\n Component: MoonIconInner,\n componentName: \"<MoonIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-more-horizontal.json b/registry-artifacts/elements/icon-more-horizontal.jsonnew file mode 100644index 00000000..20538802--- /dev/null+++ b/registry-artifacts/elements/icon-more-horizontal.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "More Horizontal",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-more-horizontal",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst LEFT_PATH =\n \"M5 11 A1 1 0 0 1 6 12 A1 1 0 0 1 5 13 A1 1 0 0 1 4 12 A1 1 0 0 1 5 11\";\nconst CENTER_PATH =\n \"M12 11 A1 1 0 0 1 13 12 A1 1 0 0 1 12 13 A1 1 0 0 1 11 12 A1 1 0 0 1 12 11\";\nconst RIGHT_PATH =\n \"M19 11 A1 1 0 0 1 20 12 A1 1 0 0 1 19 13 A1 1 0 0 1 18 12 A1 1 0 0 1 19 11\";\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 22,\n loop: false,\n} as const;\n\nconst DOTS = [\n { cx: 5, path: LEFT_PATH, drawWindow: [0, 0.5], stagger: 0 },\n { cx: 12, path: CENTER_PATH, drawWindow: [0.25, 0.75], stagger: 0.27 },\n { cx: 19, path: RIGHT_PATH, drawWindow: [0.5, 1], stagger: 0.54 },\n] as const;\n\nfunction MoreHorizontalIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n {DOTS.map((dot) => {\n const drawn = interpolate(linearDraw, [...dot.drawWindow], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const dash = drawnPathProps(dot.path, drawn);\n const dotScale = 0.6 + 0.4 * drawn;\n const lift = acting\n ? interpolate(\n actionProgress,\n [dot.stagger, dot.stagger + 0.2, dot.stagger + 0.4],\n [0, -3, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n )\n : 0;\n const tx = dot.cx * (1 - dotScale);\n const ty = 12 * (1 - dotScale) + lift;\n return (\n <g\n key={dot.cx}\n transform={`translate(${tx} ${ty}) scale(${dotScale})`}\n >\n <path\n d={dot.path}\n strokeDasharray={dash.strokeDasharray}\n strokeDashoffset={dash.strokeDashoffset}\n />\n </g>\n );\n })}\n </svg>\n );\n}\n\nfunction MoreHorizontalIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"5\" cy=\"12\" r=\"1\" />\n <circle cx=\"12\" cy=\"12\" r=\"1\" />\n <circle cx=\"19\" cy=\"12\" r=\"1\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype MoreHorizontalIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof MoreHorizontalIconBase>;\n\nconst MoreHorizontalIconInner = forwardRef<\n HTMLDivElement,\n MoreHorizontalIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<MoreHorizontalIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <MoreHorizontalIconBase\n {...(componentProps as unknown as ComponentProps<typeof MoreHorizontalIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const MoreHorizontalIcon = Interactive.withSchema({\n Component: MoreHorizontalIconInner,\n componentName: \"<MoreHorizontalIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-package.json b/registry-artifacts/elements/icon-package.jsonnew file mode 100644index 00000000..a48490ed--- /dev/null+++ b/registry-artifacts/elements/icon-package.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Package",+ "durationInFrames": 80,+ "installationMode": "component-owned-sequence",+ "slug": "icon-package",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst BOX_PATH =\n \"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z\";\nconst CENTER_PATH = \"M12 22V12\";\nconst EDGE_PATH = \"M7.5 4.27 16.5 9.42\";\nconst SEAM_PATH = \"M3.29 7 12 12 20.71 7\";\n\nconst BASE_Y = 22;\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 26,\n loop: false,\n} as const;\n\nfunction PackageIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const boxDraw = interpolate(linearDraw, [0, 0.7], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const edgesDraw = interpolate(linearDraw, [0.45, 0.8], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const seamDraw = interpolate(linearDraw, [0.7, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const drop = acting\n ? interpolate(actionProgress, [0, 0.25, 0.5], [0, 2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const squashY = acting\n ? interpolate(\n actionProgress,\n [0, 0.25, 0.5, 0.7, 1],\n [1, 0.95, 1.04, 1, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n )\n : 1;\n const box = drawnPathProps(BOX_PATH, acting ? 1 : boxDraw);\n const center = drawnPathProps(CENTER_PATH, acting ? 1 : edgesDraw);\n const edge = drawnPathProps(EDGE_PATH, acting ? 1 : edgesDraw);\n const seam = drawnPathProps(SEAM_PATH, acting ? 1 : seamDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const bodyTransform = `translate(0 ${drop + BASE_Y * (1 - squashY)}) scale(1 ${squashY})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={bodyTransform}>\n <path\n d={BOX_PATH}\n strokeDasharray={box.strokeDasharray}\n strokeDashoffset={box.strokeDashoffset}\n />\n <path\n d={CENTER_PATH}\n strokeDasharray={center.strokeDasharray}\n strokeDashoffset={center.strokeDashoffset}\n />\n <path\n d={EDGE_PATH}\n strokeDasharray={edge.strokeDasharray}\n strokeDashoffset={edge.strokeDashoffset}\n />\n <path\n d={SEAM_PATH}\n strokeDasharray={seam.strokeDasharray}\n strokeDashoffset={seam.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction PackageIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={BOX_PATH} />\n <path d={CENTER_PATH} />\n <polyline points=\"3.29 7 12 12 20.71 7\" />\n <path d=\"m7.5 4.27 9 5.15\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype PackageIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof PackageIconBase>;\n\nconst PackageIconInner = forwardRef<\n HTMLDivElement,\n PackageIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<PackageIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <PackageIconBase\n {...(componentProps as unknown as ComponentProps<typeof PackageIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const PackageIcon = Interactive.withSchema({\n Component: PackageIconInner,\n componentName: \"<PackageIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 80+}diff --git a/registry-artifacts/elements/icon-party-popper.json b/registry-artifacts/elements/icon-party-popper.jsonnew file mode 100644index 00000000..82835b71--- /dev/null+++ b/registry-artifacts/elements/icon-party-popper.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Party Popper",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-party-popper",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst CONE_MAIN = \"M5.8 11.3 2 22l10.7-3.79\";\nconst CONE_CURL =\n \"M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z\";\n\nconst CONFETTI = [\n {\n d: \"M11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7\",\n cx: 10,\n cy: 4.5,\n dx: 0.22,\n dy: -0.98,\n },\n { d: \"M4 3h.01\", cx: 4, cy: 3, dx: -0.64, dy: -0.77 },\n { d: \"M15 2h.01\", cx: 15, cy: 2, dx: 0.65, dy: -0.76 },\n {\n d: \"m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10\",\n cx: 18,\n cy: 6,\n dx: 0.95,\n dy: -0.32,\n },\n {\n d: \"m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17\",\n cx: 19,\n cy: 14,\n dx: 0.89,\n dy: 0.45,\n },\n { d: \"M22 8h.01\", cx: 22, cy: 8, dx: 1, dy: -0.08 },\n { d: \"M22 20h.01\", cx: 22, cy: 20, dx: 0.76, dy: 0.65 },\n] as const;\n\nconst TIMINGS = {\n drawDurationInFrames: 12,\n actionDelayInFrames: 2,\n actionDurationInFrames: 26,\n loop: false,\n} as const;\n\nfunction PartyPopperIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionFrame, actionProgress } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n const { fps } = useVideoConfig();\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const mainProgress = interpolate(linearDraw, [0, 0.6], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const curlProgress = interpolate(linearDraw, [0.4, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n\n const main = drawnPathProps(CONE_MAIN, mainProgress);\n const curl = drawnPathProps(CONE_CURL, curlProgress);\n\n const recoil = interpolate(actionProgress, [0, 0.35, 1], [0, -6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`rotate(${recoil} 2 22)`}>\n <path\n d={CONE_MAIN}\n strokeDasharray={main.strokeDasharray}\n strokeDashoffset={main.strokeDashoffset}\n />\n <path\n d={CONE_CURL}\n strokeDasharray={curl.strokeDasharray}\n strokeDashoffset={curl.strokeDashoffset}\n />\n </g>\n {CONFETTI.map((piece, index) => {\n const pieceFrame = actionFrame - index * 2;\n const burst =\n pieceFrame <= 0\n ? 0\n : spring({\n frame: pieceFrame,\n fps,\n config: { damping: 12, stiffness: 170, mass: 0.7 },\n durationInFrames: 20,\n });\n const dist = 3 * burst;\n const opacity = interpolate(burst, [0, 0.15], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n return (\n <path\n key={index}\n d={piece.d}\n opacity={opacity}\n transform={`translate(${piece.dx * dist} ${piece.dy * dist}) translate(${piece.cx} ${piece.cy}) scale(${burst}) translate(${-piece.cx} ${-piece.cy})`}\n />\n );\n })}\n </svg>\n );\n}\n\nfunction PartyPopperIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={CONE_MAIN} />\n <path d={CONE_CURL} />\n {CONFETTI.map((piece, index) => (\n <path key={index} d={piece.d} />\n ))}\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype PartyPopperIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof PartyPopperIconBase>;\n\nconst PartyPopperIconInner = forwardRef<\n HTMLDivElement,\n PartyPopperIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<PartyPopperIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <PartyPopperIconBase\n {...(componentProps as unknown as ComponentProps<typeof PartyPopperIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const PartyPopperIcon = Interactive.withSchema({\n Component: PartyPopperIconInner,\n componentName: \"<PartyPopperIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-pause.json b/registry-artifacts/elements/icon-pause.jsonnew file mode 100644index 00000000..c63fbffe--- /dev/null+++ b/registry-artifacts/elements/icon-pause.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Pause",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "icon-pause",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst LEFT_PATH =\n \"M6 21A1 1 0 0 1 5 20V4A1 1 0 0 1 6 3H9A1 1 0 0 1 10 4V20A1 1 0 0 1 9 21H6Z\";\nconst RIGHT_PATH =\n \"M18 21A1 1 0 0 0 19 20V4A1 1 0 0 0 18 3H15A1 1 0 0 0 14 4V20A1 1 0 0 0 15 21H18Z\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction PauseIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const leftProgress = interpolate(linearDraw, [0, 0.88], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const rightProgress = interpolate(linearDraw, [0.12, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const left = drawnPathProps(LEFT_PATH, leftProgress);\n const right = drawnPathProps(RIGHT_PATH, rightProgress);\n\n const pinch = interpolate(actionProgress, [0, 0.45, 1], [0, 1.5, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const squash = interpolate(actionProgress, [0, 0.45, 1], [1, 0.94, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scaleX(${scale}) scaleY(${scale * squash})`,\n }}\n >\n <g transform={`translate(${pinch} 0)`}>\n <path\n d={LEFT_PATH}\n strokeDasharray={left.strokeDasharray}\n strokeDashoffset={left.strokeDashoffset}\n />\n </g>\n <g transform={`translate(${-pinch} 0)`}>\n <path\n d={RIGHT_PATH}\n strokeDasharray={right.strokeDasharray}\n strokeDashoffset={right.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction PauseIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <rect x=\"14\" y=\"3\" width=\"5\" height=\"18\" rx=\"1\" />\n <rect x=\"5\" y=\"3\" width=\"5\" height=\"18\" rx=\"1\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype PauseIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof PauseIconBase>;\n\nconst PauseIconInner = forwardRef<\n HTMLDivElement,\n PauseIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<PauseIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <PauseIconBase\n {...(componentProps as unknown as ComponentProps<typeof PauseIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const PauseIcon = Interactive.withSchema({\n Component: PauseIconInner,\n componentName: \"<PauseIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/icon-pencil.json b/registry-artifacts/elements/icon-pencil.jsonnew file mode 100644index 00000000..12d3d787--- /dev/null+++ b/registry-artifacts/elements/icon-pencil.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Pencil",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-pencil",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst BODY_PATH =\n \"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z\";\nconst TIP_PATH = \"M15 5 19 9\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 24,\n loop: false,\n} as const;\n\nfunction PencilIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const bodyDraw = interpolate(linearDraw, [0, 0.857], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const tipDraw = interpolate(linearDraw, [0.571, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const rotate = acting\n ? interpolate(actionProgress, [0, 0.25, 0.5, 0.75, 1], [0, -6, 4, -2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const nudge = acting\n ? interpolate(\n actionProgress,\n [0, 0.25, 0.5, 0.75, 1],\n [0, 1, -0.5, 0.5, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n )\n : 0;\n\n const body = drawnPathProps(BODY_PATH, bodyDraw);\n const tip = drawnPathProps(TIP_PATH, tipDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`rotate(${rotate} 3 21) translate(${nudge} 0)`}>\n <path\n d={BODY_PATH}\n strokeDasharray={body.strokeDasharray}\n strokeDashoffset={body.strokeDashoffset}\n />\n <path\n d={TIP_PATH}\n strokeDasharray={tip.strokeDasharray}\n strokeDashoffset={tip.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction PencilIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={BODY_PATH} />\n <path d={TIP_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype PencilIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof PencilIconBase>;\n\nconst PencilIconInner = forwardRef<\n HTMLDivElement,\n PencilIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<PencilIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <PencilIconBase\n {...(componentProps as unknown as ComponentProps<typeof PencilIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const PencilIcon = Interactive.withSchema({\n Component: PencilIconInner,\n componentName: \"<PencilIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-phone.json b/registry-artifacts/elements/icon-phone.jsonnew file mode 100644index 00000000..922044e2--- /dev/null+++ b/registry-artifacts/elements/icon-phone.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Phone",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-phone",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst PHONE_PATH =\n \"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384\";\n\nconst CENTER = 12;\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 28,\n loop: false,\n} as const;\n\nfunction PhoneIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const ring = acting\n ? interpolate(\n actionProgress,\n [0, 0.18, 0.4, 0.62, 0.82, 1],\n [0, 10, -8, 5, -2, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n )\n : 0;\n\n const phone = drawnPathProps(PHONE_PATH, drawProgress);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`rotate(${ring} ${CENTER} ${CENTER})`}>\n <path\n d={PHONE_PATH}\n strokeDasharray={phone.strokeDasharray}\n strokeDashoffset={phone.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction PhoneIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={PHONE_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype PhoneIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof PhoneIconBase>;\n\nconst PhoneIconInner = forwardRef<\n HTMLDivElement,\n PhoneIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<PhoneIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <PhoneIconBase\n {...(componentProps as unknown as ComponentProps<typeof PhoneIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const PhoneIcon = Interactive.withSchema({\n Component: PhoneIconInner,\n componentName: \"<PhoneIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-play.json b/registry-artifacts/elements/icon-play.jsonnew file mode 100644index 00000000..562167cf--- /dev/null+++ b/registry-artifacts/elements/icon-play.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Play",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "icon-play",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst PLAY_PATH =\n \"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 18,\n loop: false,\n} as const;\n\nfunction PlayIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const dash = drawnPathProps(PLAY_PATH, drawProgress);\n const press = interpolate(\n actionProgress,\n [0, 0.33, 0.66, 1],\n [1, 0.92, 1.1, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n );\n const nudge = interpolate(actionProgress, [0.33, 0.66, 1], [0, 1.5, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const scale = (0.85 + 0.15 * scaleIn) * press;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `translateX(${nudge}px) scale(${scale})`,\n }}\n >\n <path\n d={PLAY_PATH}\n strokeDasharray={dash.strokeDasharray}\n strokeDashoffset={dash.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction PlayIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={PLAY_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype PlayIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof PlayIconBase>;\n\nconst PlayIconInner = forwardRef<\n HTMLDivElement,\n PlayIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<PlayIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <PlayIconBase\n {...(componentProps as unknown as ComponentProps<typeof PlayIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const PlayIcon = Interactive.withSchema({\n Component: PlayIconInner,\n componentName: \"<PlayIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/icon-plus-circle.json b/registry-artifacts/elements/icon-plus-circle.jsonnew file mode 100644index 00000000..82925bae--- /dev/null+++ b/registry-artifacts/elements/icon-plus-circle.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Plus Circle",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-plus-circle",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst RING_PATH = \"M12 2a10 10 0 1 0 0 20 10 10 0 1 0 0-20Z\";\nconst H_PATH = \"M8 12h8\";\nconst V_PATH = \"M12 8v8\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction PlusCircleIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const hDraw = interpolate(actionProgress, [0.1, 0.4], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const vDraw = interpolate(actionProgress, [0.25, 0.55], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const pop = acting\n ? interpolate(actionProgress, [0.55, 0.75, 1], [1, 1.06, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const hProgress = animation === \"draw\" ? 1 : acting ? hDraw : 0;\n const vProgress = animation === \"draw\" ? 1 : acting ? vDraw : 0;\n\n const ring = drawnPathProps(RING_PATH, drawProgress);\n const h = drawnPathProps(H_PATH, hProgress);\n const v = drawnPathProps(V_PATH, vProgress);\n\n const scale = (0.85 + 0.15 * scaleIn) * pop;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={RING_PATH}\n strokeDasharray={ring.strokeDasharray}\n strokeDashoffset={ring.strokeDashoffset}\n />\n <path\n d={H_PATH}\n strokeDasharray={h.strokeDasharray}\n strokeDashoffset={h.strokeDashoffset}\n />\n <path\n d={V_PATH}\n strokeDasharray={v.strokeDasharray}\n strokeDashoffset={v.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction PlusCircleIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d={H_PATH} />\n <path d={V_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype PlusCircleIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof PlusCircleIconBase>;\n\nconst PlusCircleIconInner = forwardRef<\n HTMLDivElement,\n PlusCircleIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<PlusCircleIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <PlusCircleIconBase\n {...(componentProps as unknown as ComponentProps<typeof PlusCircleIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const PlusCircleIcon = Interactive.withSchema({\n Component: PlusCircleIconInner,\n componentName: \"<PlusCircleIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-plus.json b/registry-artifacts/elements/icon-plus.jsonnew file mode 100644index 00000000..3dfe9f03--- /dev/null+++ b/registry-artifacts/elements/icon-plus.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Plus",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "icon-plus",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst HORIZONTAL_PATH = \"M5 12h14\";\nconst VERTICAL_PATH = \"M12 5v14\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 16,\n loop: false,\n} as const;\n\nfunction PlusIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionFrame, actionProgress } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n const { fps } = useVideoConfig();\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const horizontalProgress = interpolate(linearDraw, [0, 0.571], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const verticalProgress = interpolate(linearDraw, [0.286, 0.857], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n\n const horizontal = drawnPathProps(HORIZONTAL_PATH, horizontalProgress);\n const vertical = drawnPathProps(VERTICAL_PATH, verticalProgress);\n\n const rotate =\n 90 *\n spring({\n frame: actionFrame,\n fps,\n config: { damping: 14, stiffness: 130, mass: 0.8 },\n durationInFrames: 16,\n });\n const pop = interpolate(actionProgress, [0, 0.5, 1], [0, 1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const scale = (0.85 + 0.15 * scaleIn) * (1 + 0.15 * pop);\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `rotate(${rotate}deg) scale(${scale})`,\n }}\n >\n <path\n d={HORIZONTAL_PATH}\n strokeDasharray={horizontal.strokeDasharray}\n strokeDashoffset={horizontal.strokeDashoffset}\n />\n <path\n d={VERTICAL_PATH}\n strokeDasharray={vertical.strokeDasharray}\n strokeDashoffset={vertical.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction PlusIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={HORIZONTAL_PATH} />\n <path d={VERTICAL_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype PlusIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof PlusIconBase>;\n\nconst PlusIconInner = forwardRef<\n HTMLDivElement,\n PlusIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<PlusIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <PlusIconBase\n {...(componentProps as unknown as ComponentProps<typeof PlusIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const PlusIcon = Interactive.withSchema({\n Component: PlusIconInner,\n componentName: \"<PlusIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/icon-refresh-cw.json b/registry-artifacts/elements/icon-refresh-cw.jsonnew file mode 100644index 00000000..5b4685cd--- /dev/null+++ b/registry-artifacts/elements/icon-refresh-cw.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Refresh Cw",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "icon-refresh-cw",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst ARC_TOP = \"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8\";\nconst ARROW_TOP = \"M21 3v5h-5\";\nconst ARC_BOTTOM = \"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16\";\nconst ARROW_BOTTOM = \"M8 16H3v5\";\n\nconst SPIN_EASE = Easing.bezier(0.45, 0, 0.25, 1);\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 55,\n loop: true,\n} as const;\n\nfunction RefreshCwIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionFrame, cycleIndex } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n const { fps } = useVideoConfig();\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const arcProgress = interpolate(linearDraw, [0, 0.857], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const arrowTopPop = interpolate(linearDraw, [0.6, 0.714], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.back(1.8)),\n });\n const arrowBottomPop = interpolate(linearDraw, [0.76, 0.857], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.back(1.8)),\n });\n\n const arcTop = drawnPathProps(ARC_TOP, arcProgress);\n const arcBottom = drawnPathProps(ARC_BOTTOM, arcProgress);\n\n const resolvedLoop = loop ?? TIMINGS.loop;\n const rotate = resolvedLoop\n ? cycleIndex * 360 +\n interpolate(actionFrame, [0, 44], [0, 360], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: SPIN_EASE,\n })\n : 360 *\n spring({\n frame: actionFrame,\n fps,\n config: { damping: 14, stiffness: 120, mass: 0.9 },\n durationInFrames: 44,\n });\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `rotate(${rotate}deg) scale(${scale})`,\n }}\n >\n <path\n d={ARC_TOP}\n strokeDasharray={arcTop.strokeDasharray}\n strokeDashoffset={arcTop.strokeDashoffset}\n />\n <path\n d={ARC_BOTTOM}\n strokeDasharray={arcBottom.strokeDasharray}\n strokeDashoffset={arcBottom.strokeDashoffset}\n />\n <g transform={`translate(21 8) scale(${arrowTopPop}) translate(-21 -8)`}>\n <path d={ARROW_TOP} />\n </g>\n <g\n transform={`translate(3 16) scale(${arrowBottomPop}) translate(-3 -16)`}\n >\n <path d={ARROW_BOTTOM} />\n </g>\n </svg>\n );\n}\n\nfunction RefreshCwIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={ARC_TOP} />\n <path d={ARROW_TOP} />\n <path d={ARC_BOTTOM} />\n <path d={ARROW_BOTTOM} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: true,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: true,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype RefreshCwIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof RefreshCwIconBase>;\n\nconst RefreshCwIconInner = forwardRef<\n HTMLDivElement,\n RefreshCwIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<RefreshCwIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <RefreshCwIconBase\n {...(componentProps as unknown as ComponentProps<typeof RefreshCwIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const RefreshCwIcon = Interactive.withSchema({\n Component: RefreshCwIconInner,\n componentName: \"<RefreshCwIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/icon-rocket.json b/registry-artifacts/elements/icon-rocket.jsonnew file mode 100644index 00000000..6f436afe--- /dev/null+++ b/registry-artifacts/elements/icon-rocket.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Rocket",+ "durationInFrames": 80,+ "installationMode": "component-owned-sequence",+ "slug": "icon-rocket",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst BODY_PATH =\n \"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z\";\nconst FIN_RIGHT_PATH = \"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5\";\nconst FIN_LEFT_PATH = \"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05\";\nconst FLAME_PATH =\n \"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09\";\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 30,\n loop: false,\n} as const;\n\nfunction RocketIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const bodyDraw = interpolate(linearDraw, [0, 0.67], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const finsDraw = interpolate(linearDraw, [0.44, 0.89], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const flameDraw = interpolate(linearDraw, [0.67, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const rise = acting\n ? interpolate(actionProgress, [0, 0.45, 1], [0, -4, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const tilt = acting\n ? interpolate(actionProgress, [0, 0.45, 1], [0, -3, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const flicker = acting\n ? interpolate(\n actionProgress,\n [0, 0.2, 0.4, 0.6, 0.8],\n [1, 1.2, 1, 1.18, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n )\n : 1;\n\n const body = drawnPathProps(BODY_PATH, acting ? 1 : bodyDraw);\n const finRight = drawnPathProps(FIN_RIGHT_PATH, acting ? 1 : finsDraw);\n const finLeft = drawnPathProps(FIN_LEFT_PATH, acting ? 1 : finsDraw);\n const flame = drawnPathProps(FLAME_PATH, acting ? 1 : flameDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const flameTransform = `translate(${4.5 * (1 - flicker)} ${18 * (1 - flicker)}) scale(${flicker})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`translate(0 ${rise}) rotate(${tilt} 8 20)`}>\n <path\n d={BODY_PATH}\n strokeDasharray={body.strokeDasharray}\n strokeDashoffset={body.strokeDashoffset}\n />\n <path\n d={FIN_RIGHT_PATH}\n strokeDasharray={finRight.strokeDasharray}\n strokeDashoffset={finRight.strokeDashoffset}\n />\n <path\n d={FIN_LEFT_PATH}\n strokeDasharray={finLeft.strokeDasharray}\n strokeDashoffset={finLeft.strokeDashoffset}\n />\n <g transform={flameTransform}>\n <path\n d={FLAME_PATH}\n strokeDasharray={flame.strokeDasharray}\n strokeDashoffset={flame.strokeDashoffset}\n />\n </g>\n </g>\n </svg>\n );\n}\n\nfunction RocketIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5\" />\n <path d=\"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09\" />\n <path d=\"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z\" />\n <path d=\"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype RocketIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof RocketIconBase>;\n\nconst RocketIconInner = forwardRef<\n HTMLDivElement,\n RocketIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<RocketIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <RocketIconBase\n {...(componentProps as unknown as ComponentProps<typeof RocketIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const RocketIcon = Interactive.withSchema({\n Component: RocketIconInner,\n componentName: \"<RocketIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 80+}diff --git a/registry-artifacts/elements/icon-save.json b/registry-artifacts/elements/icon-save.jsonnew file mode 100644index 00000000..d9eaf21d--- /dev/null+++ b/registry-artifacts/elements/icon-save.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Save",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-save",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst DISK_PATH =\n \"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z\";\nconst LABEL_PATH = \"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7\";\nconst SLOT_PATH = \"M7 3v4a1 1 0 0 0 1 1h7\";\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 18,\n loop: false,\n} as const;\n\nfunction SaveIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const diskDraw = interpolate(linearDraw, [0, 0.667], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const labelDraw = interpolate(linearDraw, [0.444, 0.889], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const slotDraw = interpolate(linearDraw, [0.667, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const slotProgress = acting\n ? interpolate(actionProgress, [0.25, 0.75], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n })\n : slotDraw;\n\n const squash = acting\n ? interpolate(actionProgress, [0, 0.3, 0.6], [1, 0.92, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n const dip = acting\n ? interpolate(actionProgress, [0, 0.3, 0.6], [0, -1.5, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n\n const disk = drawnPathProps(DISK_PATH, diskDraw);\n const label = drawnPathProps(LABEL_PATH, labelDraw);\n const slot = drawnPathProps(SLOT_PATH, slotProgress);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `translateY(${dip}px) scale(${scale}) scaleY(${squash})`,\n }}\n >\n <path\n d={DISK_PATH}\n strokeDasharray={disk.strokeDasharray}\n strokeDashoffset={disk.strokeDashoffset}\n />\n <path\n d={LABEL_PATH}\n strokeDasharray={label.strokeDasharray}\n strokeDashoffset={label.strokeDashoffset}\n />\n <path\n d={SLOT_PATH}\n strokeDasharray={slot.strokeDasharray}\n strokeDashoffset={slot.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction SaveIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={DISK_PATH} />\n <path d={LABEL_PATH} />\n <path d={SLOT_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype SaveIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof SaveIconBase>;\n\nconst SaveIconInner = forwardRef<\n HTMLDivElement,\n SaveIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<SaveIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <SaveIconBase\n {...(componentProps as unknown as ComponentProps<typeof SaveIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const SaveIcon = Interactive.withSchema({\n Component: SaveIconInner,\n componentName: \"<SaveIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-search.json b/registry-artifacts/elements/icon-search.jsonnew file mode 100644index 00000000..7b056fa7--- /dev/null+++ b/registry-artifacts/elements/icon-search.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Search",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-search",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst CIRCLE_PATH =\n \"M11 3 A8 8 0 0 1 19 11 A8 8 0 0 1 11 19 A8 8 0 0 1 3 11 A8 8 0 0 1 11 3\";\nconst HANDLE_DRAW = \"M16.66 16.66 21 21\";\nconst HANDLE_STATIC = \"m21 21-4.34-4.34\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 40,\n loop: false,\n} as const;\n\nfunction SearchIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const circleProgress = interpolate(linearDraw, [0, 0.857], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const handleProgress = interpolate(linearDraw, [0.571, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const circle = drawnPathProps(CIRCLE_PATH, circleProgress);\n const handle = drawnPathProps(HANDLE_DRAW, handleProgress);\n\n const scanEase = {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n } as const;\n const scanX = interpolate(\n actionProgress,\n [0, 0.25, 0.5, 0.75, 1],\n [0, -3, 3, -1, 0],\n scanEase,\n );\n const scanY = interpolate(\n actionProgress,\n [0, 0.25, 0.5, 0.75, 1],\n [0, -2, -1, 2, 0],\n scanEase,\n );\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`translate(${scanX} ${scanY})`}>\n <path\n d={CIRCLE_PATH}\n strokeDasharray={circle.strokeDasharray}\n strokeDashoffset={circle.strokeDashoffset}\n />\n <path\n d={HANDLE_DRAW}\n strokeDasharray={handle.strokeDasharray}\n strokeDashoffset={handle.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction SearchIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"11\" cy=\"11\" r=\"8\" />\n <path d={HANDLE_STATIC} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype SearchIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof SearchIconBase>;\n\nconst SearchIconInner = forwardRef<\n HTMLDivElement,\n SearchIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<SearchIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <SearchIconBase\n {...(componentProps as unknown as ComponentProps<typeof SearchIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const SearchIcon = Interactive.withSchema({\n Component: SearchIconInner,\n componentName: \"<SearchIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-send.json b/registry-artifacts/elements/icon-send.jsonnew file mode 100644index 00000000..52b457b3--- /dev/null+++ b/registry-artifacts/elements/icon-send.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Send",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-send",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst PLANE_PATH =\n \"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z\";\nconst FOLD_PATH = \"m21.854 2.147-10.94 10.939\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 22,\n loop: false,\n} as const;\n\nfunction SendIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const planeProgress = interpolate(linearDraw, [0, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const foldProgress = interpolate(linearDraw, [0.714, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const plane = drawnPathProps(PLANE_PATH, planeProgress);\n const fold = drawnPathProps(FOLD_PATH, foldProgress);\n\n const dartEase = {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n } as const;\n const tx = interpolate(\n actionProgress,\n [0, 0.18, 0.5, 1],\n [0, -1.5, 5, 0],\n dartEase,\n );\n const ty = interpolate(\n actionProgress,\n [0, 0.18, 0.5, 1],\n [0, 1, -4, 0],\n dartEase,\n );\n const rot = interpolate(\n actionProgress,\n [0, 0.18, 0.5, 1],\n [0, 2, -12, 0],\n dartEase,\n );\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`translate(${tx} ${ty}) rotate(${rot} 12 12)`}>\n <path\n d={PLANE_PATH}\n strokeDasharray={plane.strokeDasharray}\n strokeDashoffset={plane.strokeDashoffset}\n />\n <path\n d={FOLD_PATH}\n strokeDasharray={fold.strokeDasharray}\n strokeDashoffset={fold.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction SendIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={PLANE_PATH} />\n <path d={FOLD_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype SendIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof SendIconBase>;\n\nconst SendIconInner = forwardRef<\n HTMLDivElement,\n SendIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<SendIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <SendIconBase\n {...(componentProps as unknown as ComponentProps<typeof SendIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const SendIcon = Interactive.withSchema({\n Component: SendIconInner,\n componentName: \"<SendIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-settings.json b/registry-artifacts/elements/icon-settings.jsonnew file mode 100644index 00000000..1d2d1819--- /dev/null+++ b/registry-artifacts/elements/icon-settings.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Settings",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-settings",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst GEAR_PATH =\n \"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915\";\nconst CIRCLE_PATH =\n \"M12 9 A3 3 0 0 1 15 12 A3 3 0 0 1 12 15 A3 3 0 0 1 9 12 A3 3 0 0 1 12 9\";\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 26,\n loop: false,\n} as const;\n\nfunction SettingsIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionFrame } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n const { fps } = useVideoConfig();\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const gearProgress = interpolate(linearDraw, [0, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const circleProgress = interpolate(linearDraw, [0.625, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const gear = drawnPathProps(GEAR_PATH, gearProgress);\n const circle = drawnPathProps(CIRCLE_PATH, circleProgress);\n\n const gearRotate =\n 60 *\n spring({\n frame: actionFrame,\n fps,\n config: { damping: 14, stiffness: 120, mass: 0.9 },\n durationInFrames: 26,\n });\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`rotate(${gearRotate} 12 12)`}>\n <path\n d={GEAR_PATH}\n strokeDasharray={gear.strokeDasharray}\n strokeDashoffset={gear.strokeDashoffset}\n />\n </g>\n <path\n d={CIRCLE_PATH}\n strokeDasharray={circle.strokeDasharray}\n strokeDashoffset={circle.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction SettingsIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={GEAR_PATH} />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype SettingsIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof SettingsIconBase>;\n\nconst SettingsIconInner = forwardRef<\n HTMLDivElement,\n SettingsIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<SettingsIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <SettingsIconBase\n {...(componentProps as unknown as ComponentProps<typeof SettingsIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const SettingsIcon = Interactive.withSchema({\n Component: SettingsIconInner,\n componentName: \"<SettingsIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-share-2.json b/registry-artifacts/elements/icon-share-2.jsonnew file mode 100644index 00000000..e316a9a6--- /dev/null+++ b/registry-artifacts/elements/icon-share-2.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Share 2",+ "durationInFrames": 80,+ "installationMode": "component-owned-sequence",+ "slug": "icon-share-2",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst LEFT_NODE_PATH =\n \"M6 9 A3 3 0 0 1 9 12 A3 3 0 0 1 6 15 A3 3 0 0 1 3 12 A3 3 0 0 1 6 9\";\nconst TOP_NODE_PATH =\n \"M18 2 A3 3 0 0 1 21 5 A3 3 0 0 1 18 8 A3 3 0 0 1 15 5 A3 3 0 0 1 18 2\";\nconst BOTTOM_NODE_PATH =\n \"M18 16 A3 3 0 0 1 21 19 A3 3 0 0 1 18 22 A3 3 0 0 1 15 19 A3 3 0 0 1 18 16\";\nconst TOP_LINE_PATH = \"M8.59 10.49 15.41 6.51\";\nconst BOTTOM_LINE_PATH = \"M8.59 13.51 15.42 17.49\";\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 26,\n loop: false,\n} as const;\n\nfunction Share2IconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const leftNodeDraw = interpolate(linearDraw, [0, 0.44], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const connectorDraw = interpolate(linearDraw, [0.33, 0.78], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const rightNodeDraw = interpolate(linearDraw, [0.56, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const topLineProgress = acting\n ? interpolate(actionProgress, [0, 0.4], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n })\n : connectorDraw;\n const bottomLineProgress = acting\n ? interpolate(actionProgress, [0.15, 0.55], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n })\n : connectorDraw;\n\n const topPop = acting\n ? interpolate(actionProgress, [0.3, 0.45, 0.65], [1, 1.25, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n const bottomPop = acting\n ? interpolate(actionProgress, [0.45, 0.6, 0.8], [1, 1.25, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const leftNode = drawnPathProps(LEFT_NODE_PATH, leftNodeDraw);\n const topLine = drawnPathProps(TOP_LINE_PATH, topLineProgress);\n const bottomLine = drawnPathProps(BOTTOM_LINE_PATH, bottomLineProgress);\n const topNode = drawnPathProps(TOP_NODE_PATH, rightNodeDraw);\n const bottomNode = drawnPathProps(BOTTOM_NODE_PATH, rightNodeDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const topTransform = `translate(${18 * (1 - topPop)} ${5 * (1 - topPop)}) scale(${topPop})`;\n const bottomTransform = `translate(${18 * (1 - bottomPop)} ${19 * (1 - bottomPop)}) scale(${bottomPop})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={LEFT_NODE_PATH}\n strokeDasharray={leftNode.strokeDasharray}\n strokeDashoffset={leftNode.strokeDashoffset}\n />\n <path\n d={TOP_LINE_PATH}\n strokeDasharray={topLine.strokeDasharray}\n strokeDashoffset={topLine.strokeDashoffset}\n />\n <path\n d={BOTTOM_LINE_PATH}\n strokeDasharray={bottomLine.strokeDasharray}\n strokeDashoffset={bottomLine.strokeDashoffset}\n />\n <g transform={topTransform}>\n <path\n d={TOP_NODE_PATH}\n strokeDasharray={topNode.strokeDasharray}\n strokeDashoffset={topNode.strokeDashoffset}\n />\n </g>\n <g transform={bottomTransform}>\n <path\n d={BOTTOM_NODE_PATH}\n strokeDasharray={bottomNode.strokeDasharray}\n strokeDashoffset={bottomNode.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction Share2IconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"18\" cy=\"5\" r=\"3\" />\n <circle cx=\"6\" cy=\"12\" r=\"3\" />\n <circle cx=\"18\" cy=\"19\" r=\"3\" />\n <line x1=\"8.59\" x2=\"15.42\" y1=\"13.51\" y2=\"17.49\" />\n <line x1=\"15.41\" x2=\"8.59\" y1=\"6.51\" y2=\"10.49\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype Share2IconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof Share2IconBase>;\n\nconst Share2IconInner = forwardRef<\n HTMLDivElement,\n Share2IconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<Share2Icon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <Share2IconBase\n {...(componentProps as unknown as ComponentProps<typeof Share2IconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const Share2Icon = Interactive.withSchema({\n Component: Share2IconInner,\n componentName: \"<Share2Icon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 80+}diff --git a/registry-artifacts/elements/icon-shield.json b/registry-artifacts/elements/icon-shield.jsonnew file mode 100644index 00000000..97548b26--- /dev/null+++ b/registry-artifacts/elements/icon-shield.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Shield",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-shield",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst SHIELD_PATH =\n \"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\";\n\nconst CENTER = 12;\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 18,\n loop: false,\n} as const;\n\nfunction ShieldIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const brace = acting\n ? interpolate(actionProgress, [0, 0.45, 1], [1, 1.1, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n })\n : 1;\n const lean = acting\n ? interpolate(actionProgress, [0, 0.45, 1], [0, -2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n })\n : 0;\n\n const shield = drawnPathProps(SHIELD_PATH, drawProgress);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g\n transform={`rotate(${lean} ${CENTER} ${CENTER}) translate(${CENTER * (1 - brace)} ${CENTER * (1 - brace)}) scale(${brace})`}\n >\n <path\n d={SHIELD_PATH}\n strokeDasharray={shield.strokeDasharray}\n strokeDashoffset={shield.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction ShieldIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={SHIELD_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype ShieldIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ShieldIconBase>;\n\nconst ShieldIconInner = forwardRef<\n HTMLDivElement,\n ShieldIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShieldIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ShieldIconBase\n {...(componentProps as unknown as ComponentProps<typeof ShieldIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ShieldIcon = Interactive.withSchema({\n Component: ShieldIconInner,\n componentName: \"<ShieldIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-shopping-cart.json b/registry-artifacts/elements/icon-shopping-cart.jsonnew file mode 100644index 00000000..b2251abf--- /dev/null+++ b/registry-artifacts/elements/icon-shopping-cart.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Shopping Cart",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-shopping-cart",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst BODY_PATH =\n \"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12\";\nconst BACK_WHEEL_PATH = \"M8 20a1 1 0 1 0 0 2 1 1 0 1 0 0-2Z\";\nconst FRONT_WHEEL_PATH = \"M19 20a1 1 0 1 0 0 2 1 1 0 1 0 0-2Z\";\n\nconst BACK_CX = 8;\nconst FRONT_CX = 19;\nconst WHEEL_CY = 21;\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 26,\n loop: false,\n} as const;\n\nfunction ShoppingCartIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const bodyDraw = interpolate(linearDraw, [0, 0.7], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const wheelsDraw = interpolate(linearDraw, [0.5, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const rollX = acting\n ? interpolate(actionProgress, [0, 0.4, 0.7], [0, 4, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const tilt = acting\n ? interpolate(actionProgress, [0, 0.4, 0.7], [0, -1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const backPop = acting\n ? interpolate(actionProgress, [0.5, 0.65, 0.85], [1, 1.2, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n const frontPop = acting\n ? interpolate(actionProgress, [0.6, 0.75, 0.95], [1, 1.2, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const body = drawnPathProps(BODY_PATH, acting ? 1 : bodyDraw);\n const backWheel = drawnPathProps(BACK_WHEEL_PATH, acting ? 1 : wheelsDraw);\n const frontWheel = drawnPathProps(FRONT_WHEEL_PATH, acting ? 1 : wheelsDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const backTransform = `translate(${BACK_CX * (1 - backPop)} ${WHEEL_CY * (1 - backPop)}) scale(${backPop})`;\n const frontTransform = `translate(${FRONT_CX * (1 - frontPop)} ${WHEEL_CY * (1 - frontPop)}) scale(${frontPop})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`translate(${rollX} 0) rotate(${tilt} 12 12)`}>\n <path\n d={BODY_PATH}\n strokeDasharray={body.strokeDasharray}\n strokeDashoffset={body.strokeDashoffset}\n />\n <g transform={backTransform}>\n <path\n d={BACK_WHEEL_PATH}\n strokeDasharray={backWheel.strokeDasharray}\n strokeDashoffset={backWheel.strokeDashoffset}\n />\n </g>\n <g transform={frontTransform}>\n <path\n d={FRONT_WHEEL_PATH}\n strokeDasharray={frontWheel.strokeDasharray}\n strokeDashoffset={frontWheel.strokeDashoffset}\n />\n </g>\n </g>\n </svg>\n );\n}\n\nfunction ShoppingCartIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"8\" cy=\"21\" r=\"1\" />\n <circle cx=\"19\" cy=\"21\" r=\"1\" />\n <path d={BODY_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype ShoppingCartIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ShoppingCartIconBase>;\n\nconst ShoppingCartIconInner = forwardRef<\n HTMLDivElement,\n ShoppingCartIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShoppingCartIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ShoppingCartIconBase\n {...(componentProps as unknown as ComponentProps<typeof ShoppingCartIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ShoppingCartIcon = Interactive.withSchema({\n Component: ShoppingCartIconInner,\n componentName: \"<ShoppingCartIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-skip-forward.json b/registry-artifacts/elements/icon-skip-forward.jsonnew file mode 100644index 00000000..4a695ef5--- /dev/null+++ b/registry-artifacts/elements/icon-skip-forward.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Skip Forward",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "icon-skip-forward",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst TRIANGLE_PATH =\n \"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z\";\nconst BAR_PATH = \"M21 4v16\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction SkipForwardIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const triangleProgress = interpolate(linearDraw, [0, 0.71], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const barProgress = interpolate(linearDraw, [0.43, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const triangle = drawnPathProps(TRIANGLE_PATH, triangleProgress);\n const bar = drawnPathProps(BAR_PATH, barProgress);\n\n const dash = interpolate(\n actionProgress,\n [0, 0.2, 0.6, 0.82, 1],\n [0, -1.2, 2, -0.3, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n );\n const squeeze = interpolate(actionProgress, [0.45, 0.6, 0.78], [1, 0.96, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const shove = interpolate(actionProgress, [0.55, 0.62, 1], [0, 0.5, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g\n transform={`translate(${dash} 0) scale(${squeeze} 1)`}\n style={{ transformOrigin: \"16px 12px\" }}\n >\n <path\n d={TRIANGLE_PATH}\n strokeDasharray={triangle.strokeDasharray}\n strokeDashoffset={triangle.strokeDashoffset}\n />\n </g>\n <g transform={`translate(${shove} 0)`}>\n <path\n d={BAR_PATH}\n strokeDasharray={bar.strokeDasharray}\n strokeDashoffset={bar.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction SkipForwardIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={BAR_PATH} />\n <path d={TRIANGLE_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype SkipForwardIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof SkipForwardIconBase>;\n\nconst SkipForwardIconInner = forwardRef<\n HTMLDivElement,\n SkipForwardIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<SkipForwardIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <SkipForwardIconBase\n {...(componentProps as unknown as ComponentProps<typeof SkipForwardIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const SkipForwardIcon = Interactive.withSchema({\n Component: SkipForwardIconInner,\n componentName: \"<SkipForwardIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/icon-smartphone.json b/registry-artifacts/elements/icon-smartphone.jsonnew file mode 100644index 00000000..ab1b1909--- /dev/null+++ b/registry-artifacts/elements/icon-smartphone.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Smartphone",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-smartphone",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst BODY_PATH =\n \"M7 2H17A2 2 0 0 1 19 4V20A2 2 0 0 1 17 22H7A2 2 0 0 1 5 20V4A2 2 0 0 1 7 2Z\";\nconst BUTTON_PATH = \"M12 18h.01\";\n\nconst CENTER = 12;\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 18,\n loop: false,\n} as const;\n\nfunction SmartphoneIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const bodyDraw = interpolate(linearDraw, [0, 0.75], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const buttonDraw = interpolate(linearDraw, [0.7, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const buzz = acting\n ? interpolate(\n actionProgress,\n [0, 0.2, 0.45, 0.7, 0.9, 1],\n [0, 3, -3, 2, -1, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n )\n : 0;\n\n const body = drawnPathProps(BODY_PATH, acting ? 1 : bodyDraw);\n const button = drawnPathProps(BUTTON_PATH, acting ? 1 : buttonDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`rotate(${buzz} ${CENTER} ${CENTER})`}>\n <path\n d={BODY_PATH}\n strokeDasharray={body.strokeDasharray}\n strokeDashoffset={body.strokeDashoffset}\n />\n <path\n d={BUTTON_PATH}\n strokeDasharray={button.strokeDasharray}\n strokeDashoffset={button.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction SmartphoneIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <rect width=\"14\" height=\"20\" x=\"5\" y=\"2\" rx=\"2\" ry=\"2\" />\n <path d=\"M12 18h.01\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype SmartphoneIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof SmartphoneIconBase>;\n\nconst SmartphoneIconInner = forwardRef<\n HTMLDivElement,\n SmartphoneIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<SmartphoneIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <SmartphoneIconBase\n {...(componentProps as unknown as ComponentProps<typeof SmartphoneIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const SmartphoneIcon = Interactive.withSchema({\n Component: SmartphoneIconInner,\n componentName: \"<SmartphoneIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-sparkles.json b/registry-artifacts/elements/icon-sparkles.jsonnew file mode 100644index 00000000..d5f3acf8--- /dev/null+++ b/registry-artifacts/elements/icon-sparkles.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Sparkles",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "icon-sparkles",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst MAIN_PATH =\n \"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z\";\nconst ACCENT_TR_V = \"M20 2v4\";\nconst ACCENT_TR_H = \"M22 4h-4\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 45,\n loop: true,\n} as const;\n\nfunction SparklesIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const mainProgress = interpolate(linearDraw, [0, 0.857], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const popTR = interpolate(linearDraw, [0.55, 0.714], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.back(1.8)),\n });\n const popBL = interpolate(linearDraw, [0.857, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.back(1.8)),\n });\n\n const main = drawnPathProps(MAIN_PATH, mainProgress);\n\n const mainPulse = interpolate(actionProgress, [0, 0.5, 1], [1, 1.08, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const smallPulse = interpolate(actionProgress, [0, 0.5, 1], [1, 0.7, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const smallOpacity = interpolate(actionProgress, [0, 0.5, 1], [1, 0.5, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n\n const scale = 0.85 + 0.15 * scaleIn;\n const trScale = popTR * smallPulse;\n const blScale = popBL * smallPulse;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`translate(12 12) scale(${mainPulse}) translate(-12 -12)`}>\n <path\n d={MAIN_PATH}\n strokeDasharray={main.strokeDasharray}\n strokeDashoffset={main.strokeDashoffset}\n />\n </g>\n <g\n opacity={smallOpacity}\n transform={`translate(20 4) scale(${trScale}) translate(-20 -4)`}\n >\n <path d={ACCENT_TR_V} />\n <path d={ACCENT_TR_H} />\n </g>\n <g\n opacity={smallOpacity}\n transform={`translate(4 20) scale(${blScale}) translate(-4 -20)`}\n >\n <circle cx=\"4\" cy=\"20\" r=\"2\" />\n </g>\n </svg>\n );\n}\n\nfunction SparklesIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={MAIN_PATH} />\n <path d={ACCENT_TR_V} />\n <path d={ACCENT_TR_H} />\n <circle cx=\"4\" cy=\"20\" r=\"2\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: true,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: true,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype SparklesIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof SparklesIconBase>;\n\nconst SparklesIconInner = forwardRef<\n HTMLDivElement,\n SparklesIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<SparklesIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <SparklesIconBase\n {...(componentProps as unknown as ComponentProps<typeof SparklesIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const SparklesIcon = Interactive.withSchema({\n Component: SparklesIconInner,\n componentName: \"<SparklesIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/icon-star.json b/registry-artifacts/elements/icon-star.jsonnew file mode 100644index 00000000..5c05034e--- /dev/null+++ b/registry-artifacts/elements/icon-star.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Star",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-star",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst STAR_PATH =\n \"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 18,\n loop: false,\n} as const;\n\nfunction StarIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionFrame, actionProgress } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n const { fps } = useVideoConfig();\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const starProgress = interpolate(linearDraw, [0, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n\n const star = drawnPathProps(STAR_PATH, starProgress);\n\n const settle = spring({\n frame: actionFrame,\n fps,\n config: { damping: 12, stiffness: 140, mass: 0.8 },\n durationInFrames: 18,\n });\n const rotate = -8 * (1 - settle);\n const pop = interpolate(actionProgress, [0, 0.5, 1], [0, 1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const scale = (0.85 + 0.15 * scaleIn) * (1 + 0.12 * pop);\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `rotate(${rotate}deg) scale(${scale})`,\n }}\n >\n <path\n d={STAR_PATH}\n strokeDasharray={star.strokeDasharray}\n strokeDashoffset={star.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction StarIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={STAR_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype StarIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof StarIconBase>;\n\nconst StarIconInner = forwardRef<\n HTMLDivElement,\n StarIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<StarIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <StarIconBase\n {...(componentProps as unknown as ComponentProps<typeof StarIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const StarIcon = Interactive.withSchema({\n Component: StarIconInner,\n componentName: \"<StarIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-sun.json b/registry-artifacts/elements/icon-sun.jsonnew file mode 100644index 00000000..486d05b0--- /dev/null+++ b/registry-artifacts/elements/icon-sun.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Sun",+ "durationInFrames": 85,+ "installationMode": "component-owned-sequence",+ "slug": "icon-sun",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst CORE_PATH = \"M12 8a4 4 0 1 0 0 8 4 4 0 1 0 0-8Z\";\n\nconst RAYS = [\n \"M12 4 12 2\",\n \"M17.66 6.34 19.07 4.93\",\n \"M20 12 22 12\",\n \"M17.66 17.66 19.07 19.07\",\n \"M12 20 12 22\",\n \"M6.34 17.66 4.93 19.07\",\n \"M4 12 2 12\",\n \"M6.34 6.34 4.93 4.93\",\n];\n\nconst CENTER = 12;\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 30,\n loop: false,\n} as const;\n\nfunction SunIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const corePop = acting\n ? interpolate(actionProgress, [0.55, 0.75, 1], [1, 1.08, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const core = drawnPathProps(CORE_PATH, drawProgress);\n\n const rays = RAYS.map((d, i) => {\n const start = i * 0.07;\n const rayFan = interpolate(actionProgress, [start, start + 0.28], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const progress = animation === \"draw\" ? 1 : acting ? rayFan : 0;\n return { d, ...drawnPathProps(d, progress) };\n });\n\n const scale = 0.85 + 0.15 * scaleIn;\n const coreTransform = `translate(${CENTER * (1 - corePop)} ${CENTER * (1 - corePop)}) scale(${corePop})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n {rays.map((ray) => (\n <path\n key={ray.d}\n d={ray.d}\n strokeDasharray={ray.strokeDasharray}\n strokeDashoffset={ray.strokeDashoffset}\n />\n ))}\n <g transform={coreTransform}>\n <path\n d={CORE_PATH}\n strokeDasharray={core.strokeDasharray}\n strokeDashoffset={core.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction SunIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"4\" />\n <path d=\"M12 2v2\" />\n <path d=\"M12 20v2\" />\n <path d=\"m4.93 4.93 1.41 1.41\" />\n <path d=\"m17.66 17.66 1.41 1.41\" />\n <path d=\"M2 12h2\" />\n <path d=\"M20 12h2\" />\n <path d=\"m6.34 17.66-1.41 1.41\" />\n <path d=\"m19.07 4.93-1.41 1.41\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype SunIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof SunIconBase>;\n\nconst SunIconInner = forwardRef<\n HTMLDivElement,\n SunIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<SunIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <SunIconBase\n {...(componentProps as unknown as ComponentProps<typeof SunIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const SunIcon = Interactive.withSchema({\n Component: SunIconInner,\n componentName: \"<SunIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 85+}diff --git a/registry-artifacts/elements/icon-tag.json b/registry-artifacts/elements/icon-tag.jsonnew file mode 100644index 00000000..2fd8452d--- /dev/null+++ b/registry-artifacts/elements/icon-tag.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Tag",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-tag",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst TAG_PATH =\n \"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z\";\n\nconst HOLE_X = 7.5;\nconst HOLE_Y = 7.5;\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 26,\n loop: false,\n} as const;\n\nfunction TagIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const holeScale = acting\n ? 1\n : interpolate(linearDraw, [0.7, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const swing = acting\n ? interpolate(actionProgress, [0, 0.2, 0.45, 0.7, 1], [0, 8, -6, 3, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.sin),\n })\n : 0;\n\n const tag = drawnPathProps(TAG_PATH, drawProgress);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const holeTransform = `translate(${HOLE_X * (1 - holeScale)} ${HOLE_Y * (1 - holeScale)}) scale(${holeScale})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`rotate(${swing} ${HOLE_X} ${HOLE_Y})`}>\n <path\n d={TAG_PATH}\n strokeDasharray={tag.strokeDasharray}\n strokeDashoffset={tag.strokeDashoffset}\n />\n <g transform={holeTransform}>\n <circle cx=\"7.5\" cy=\"7.5\" r=\"0.5\" fill={color} stroke=\"none\" />\n </g>\n </g>\n </svg>\n );\n}\n\nfunction TagIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={TAG_PATH} />\n <circle cx=\"7.5\" cy=\"7.5\" r=\"0.5\" fill={color} stroke=\"none\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype TagIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof TagIconBase>;\n\nconst TagIconInner = forwardRef<\n HTMLDivElement,\n TagIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<TagIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <TagIconBase\n {...(componentProps as unknown as ComponentProps<typeof TagIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const TagIcon = Interactive.withSchema({\n Component: TagIconInner,\n componentName: \"<TagIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-target.json b/registry-artifacts/elements/icon-target.jsonnew file mode 100644index 00000000..32fd20d5--- /dev/null+++ b/registry-artifacts/elements/icon-target.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Target",+ "durationInFrames": 80,+ "installationMode": "component-owned-sequence",+ "slug": "icon-target",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst RING_OUTER = \"M12 2a10 10 0 1 0 0 20 10 10 0 1 0 0-20Z\";\nconst RING_MID = \"M12 6a6 6 0 1 0 0 12 6 6 0 1 0 0-12Z\";\nconst RING_INNER = \"M12 10a2 2 0 1 0 0 4 2 2 0 1 0 0-4Z\";\n\nconst CENTER = 12;\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 24,\n loop: false,\n} as const;\n\nfunction TargetIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const outerDraw = interpolate(linearDraw, [0, 0.55], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const midDraw = interpolate(linearDraw, [0.28, 0.83], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const innerDraw = interpolate(linearDraw, [0.55, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const pop = acting\n ? interpolate(actionProgress, [0, 0.25, 0.6], [1, 1.5, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n const shake = acting\n ? interpolate(\n actionProgress,\n [0.6, 0.68, 0.78, 0.88, 1],\n [0, 0.6, -0.6, 0.3, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n },\n )\n : 0;\n\n const outer = drawnPathProps(RING_OUTER, acting ? 1 : outerDraw);\n const mid = drawnPathProps(RING_MID, acting ? 1 : midDraw);\n const inner = drawnPathProps(RING_INNER, acting ? 1 : innerDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const popTransform = `translate(${CENTER * (1 - pop)} ${CENTER * (1 - pop)}) scale(${pop})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`translate(${shake} 0)`}>\n <path\n d={RING_OUTER}\n strokeDasharray={outer.strokeDasharray}\n strokeDashoffset={outer.strokeDashoffset}\n />\n <path\n d={RING_MID}\n strokeDasharray={mid.strokeDasharray}\n strokeDashoffset={mid.strokeDashoffset}\n />\n <g transform={popTransform}>\n <path\n d={RING_INNER}\n strokeDasharray={inner.strokeDasharray}\n strokeDashoffset={inner.strokeDashoffset}\n />\n </g>\n </g>\n </svg>\n );\n}\n\nfunction TargetIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <circle cx=\"12\" cy=\"12\" r=\"6\" />\n <circle cx=\"12\" cy=\"12\" r=\"2\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype TargetIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof TargetIconBase>;\n\nconst TargetIconInner = forwardRef<\n HTMLDivElement,\n TargetIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<TargetIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <TargetIconBase\n {...(componentProps as unknown as ComponentProps<typeof TargetIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const TargetIcon = Interactive.withSchema({\n Component: TargetIconInner,\n componentName: \"<TargetIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 80+}diff --git a/registry-artifacts/elements/icon-terminal.json b/registry-artifacts/elements/icon-terminal.jsonnew file mode 100644index 00000000..56ac6e41--- /dev/null+++ b/registry-artifacts/elements/icon-terminal.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Terminal",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-terminal",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst CHEVRON_PATH = \"M4 17 10 11 4 5\";\nconst CURSOR_PATH = \"M12 19H20\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 32,\n loop: false,\n} as const;\n\nfunction TerminalIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const chevronDraw = interpolate(linearDraw, [0, 0.7], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const cursorDraw = interpolate(linearDraw, [0.55, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const nudge = acting\n ? interpolate(actionProgress, [0, 0.15, 0.35], [0, 2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const cursorOpacity = acting\n ? interpolate(\n actionProgress,\n [0.3, 0.42, 0.54, 0.66, 0.78],\n [1, 0, 1, 0, 1],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n )\n : 1;\n\n const chevron = drawnPathProps(CHEVRON_PATH, acting ? 1 : chevronDraw);\n const cursor = drawnPathProps(CURSOR_PATH, acting ? 1 : cursorDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`translate(${nudge} 0)`}>\n <path\n d={CHEVRON_PATH}\n strokeDasharray={chevron.strokeDasharray}\n strokeDashoffset={chevron.strokeDashoffset}\n />\n </g>\n <path\n d={CURSOR_PATH}\n strokeDasharray={cursor.strokeDasharray}\n strokeDashoffset={cursor.strokeDashoffset}\n opacity={cursorOpacity}\n />\n </svg>\n );\n}\n\nfunction TerminalIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M12 19h8\" />\n <path d=\"m4 17 6-6-6-6\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype TerminalIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof TerminalIconBase>;\n\nconst TerminalIconInner = forwardRef<\n HTMLDivElement,\n TerminalIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<TerminalIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <TerminalIconBase\n {...(componentProps as unknown as ComponentProps<typeof TerminalIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const TerminalIcon = Interactive.withSchema({\n Component: TerminalIconInner,\n componentName: \"<TerminalIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-thumbs-up.json b/registry-artifacts/elements/icon-thumbs-up.jsonnew file mode 100644index 00000000..a5864344--- /dev/null+++ b/registry-artifacts/elements/icon-thumbs-up.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Thumbs Up",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-thumbs-up",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst HAND_PATH =\n \"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z\";\nconst CUFF_PATH = \"M7 10v12\";\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 18,\n loop: false,\n} as const;\n\nfunction ThumbsUpIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionFrame, actionProgress } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n const { fps } = useVideoConfig();\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const handProgress = interpolate(linearDraw, [0.25, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const cuffProgress = interpolate(linearDraw, [0, 0.5], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n\n const hand = drawnPathProps(HAND_PATH, handProgress);\n const cuff = drawnPathProps(CUFF_PATH, cuffProgress);\n\n const settle = spring({\n frame: actionFrame,\n fps,\n config: { damping: 11, stiffness: 150, mass: 0.8 },\n durationInFrames: 18,\n });\n const rotate = -18 * (1 - settle);\n const pop = interpolate(actionProgress, [0, 0.5, 1], [1, 1.1, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const scale = (0.85 + 0.15 * scaleIn) * pop;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`rotate(${rotate} 4 22)`}>\n <path\n d={HAND_PATH}\n strokeDasharray={hand.strokeDasharray}\n strokeDashoffset={hand.strokeDashoffset}\n />\n <path\n d={CUFF_PATH}\n strokeDasharray={cuff.strokeDasharray}\n strokeDashoffset={cuff.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction ThumbsUpIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={HAND_PATH} />\n <path d={CUFF_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype ThumbsUpIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ThumbsUpIconBase>;\n\nconst ThumbsUpIconInner = forwardRef<\n HTMLDivElement,\n ThumbsUpIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ThumbsUpIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ThumbsUpIconBase\n {...(componentProps as unknown as ComponentProps<typeof ThumbsUpIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ThumbsUpIcon = Interactive.withSchema({\n Component: ThumbsUpIconInner,\n componentName: \"<ThumbsUpIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-timer.json b/registry-artifacts/elements/icon-timer.jsonnew file mode 100644index 00000000..4a4fd427--- /dev/null+++ b/registry-artifacts/elements/icon-timer.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Timer",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "icon-timer",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst DIAL_PATH = \"M12 6a8 8 0 1 0 0 16 8 8 0 1 0 0-16Z\";\nconst BUTTON_PATH = \"M10 2H14\";\nconst HAND_PATH = \"M12 14 15 11\";\n\nconst DIAL_CX = 12;\nconst DIAL_CY = 14;\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 48,\n loop: false,\n} as const;\n\nfunction TimerIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const dialDraw = interpolate(linearDraw, [0, 0.6], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const buttonDraw = interpolate(linearDraw, [0.45, 0.75], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const handDraw = interpolate(linearDraw, [0.7, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const buttonDip = acting\n ? interpolate(actionProgress, [0, 0.15, 0.3], [0, 1.5, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const handSweep = acting\n ? interpolate(actionProgress, [0.3, 1], [0, 360], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.cubic),\n })\n : 0;\n\n const dial = drawnPathProps(DIAL_PATH, acting ? 1 : dialDraw);\n const button = drawnPathProps(BUTTON_PATH, acting ? 1 : buttonDraw);\n const hand = drawnPathProps(HAND_PATH, acting ? 1 : handDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={DIAL_PATH}\n strokeDasharray={dial.strokeDasharray}\n strokeDashoffset={dial.strokeDashoffset}\n />\n <g transform={`translate(0 ${buttonDip})`}>\n <path\n d={BUTTON_PATH}\n strokeDasharray={button.strokeDasharray}\n strokeDashoffset={button.strokeDashoffset}\n />\n </g>\n <g transform={`rotate(${handSweep} ${DIAL_CX} ${DIAL_CY})`}>\n <path\n d={HAND_PATH}\n strokeDasharray={hand.strokeDasharray}\n strokeDashoffset={hand.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction TimerIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <line x1=\"10\" x2=\"14\" y1=\"2\" y2=\"2\" />\n <line x1=\"12\" x2=\"15\" y1=\"14\" y2=\"11\" />\n <circle cx=\"12\" cy=\"14\" r=\"8\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype TimerIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof TimerIconBase>;\n\nconst TimerIconInner = forwardRef<\n HTMLDivElement,\n TimerIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<TimerIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <TimerIconBase\n {...(componentProps as unknown as ComponentProps<typeof TimerIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const TimerIcon = Interactive.withSchema({\n Component: TimerIconInner,\n componentName: \"<TimerIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/icon-trash.json b/registry-artifacts/elements/icon-trash.jsonnew file mode 100644index 00000000..c64df927--- /dev/null+++ b/registry-artifacts/elements/icon-trash.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Trash",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-trash",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst BODY_PATH = \"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6\";\nconst INNER1_PATH = \"M10 11v6\";\nconst INNER2_PATH = \"M14 11v6\";\nconst LID_PATH = \"M3 6h18\";\nconst HANDLE_PATH = \"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 24,\n loop: false,\n} as const;\n\nfunction TrashIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const bodyProgress = interpolate(linearDraw, [0, 0.714], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const innerProgress = interpolate(linearDraw, [0.571, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const lidProgress = interpolate(linearDraw, [0.714, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const body = drawnPathProps(BODY_PATH, bodyProgress);\n const inner1 = drawnPathProps(INNER1_PATH, innerProgress);\n const inner2 = drawnPathProps(INNER2_PATH, innerProgress);\n const lid = drawnPathProps(LID_PATH, lidProgress);\n const handle = drawnPathProps(HANDLE_PATH, lidProgress);\n\n const lidRotate = interpolate(actionProgress, [0, 0.4, 1], [0, -14, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const lidLift = interpolate(actionProgress, [0, 0.4, 1], [0, -1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={BODY_PATH}\n strokeDasharray={body.strokeDasharray}\n strokeDashoffset={body.strokeDashoffset}\n />\n <path\n d={INNER1_PATH}\n strokeDasharray={inner1.strokeDasharray}\n strokeDashoffset={inner1.strokeDashoffset}\n />\n <path\n d={INNER2_PATH}\n strokeDasharray={inner2.strokeDasharray}\n strokeDashoffset={inner2.strokeDashoffset}\n />\n <g transform={`translate(0 ${lidLift}) rotate(${lidRotate} 3 6)`}>\n <path\n d={LID_PATH}\n strokeDasharray={lid.strokeDasharray}\n strokeDashoffset={lid.strokeDashoffset}\n />\n <path\n d={HANDLE_PATH}\n strokeDasharray={handle.strokeDasharray}\n strokeDashoffset={handle.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction TrashIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={INNER1_PATH} />\n <path d={INNER2_PATH} />\n <path d={BODY_PATH} />\n <path d={LID_PATH} />\n <path d={HANDLE_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype TrashIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof TrashIconBase>;\n\nconst TrashIconInner = forwardRef<\n HTMLDivElement,\n TrashIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<TrashIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <TrashIconBase\n {...(componentProps as unknown as ComponentProps<typeof TrashIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const TrashIcon = Interactive.withSchema({\n Component: TrashIconInner,\n componentName: \"<TrashIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-trending-down.json b/registry-artifacts/elements/icon-trending-down.jsonnew file mode 100644index 00000000..f2cf4044--- /dev/null+++ b/registry-artifacts/elements/icon-trending-down.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Trending Down",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-trending-down",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst TREND_PATH = \"M2 7 8.5 13.5 13.5 8.5 22 17\";\nconst ARROW_PATH = \"M16 17H22V11\";\n\nconst LOW_X = 22;\nconst LOW_Y = 17;\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction TrendingDownIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const trendDraw = interpolate(linearDraw, [0, 0.8], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.in(Easing.quad),\n });\n const arrowDraw = interpolate(linearDraw, [0.65, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const pop = acting\n ? interpolate(actionProgress, [0.1, 0.45, 1], [1, 1.15, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n const drop = acting\n ? interpolate(actionProgress, [0.1, 0.45, 1], [0, 1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n\n const trend = drawnPathProps(TREND_PATH, acting ? 1 : trendDraw);\n const arrow = drawnPathProps(ARROW_PATH, acting ? 1 : arrowDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const popTransform = `translate(${LOW_X * (1 - pop)} ${LOW_Y * (1 - pop) + drop}) scale(${pop})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={TREND_PATH}\n strokeDasharray={trend.strokeDasharray}\n strokeDashoffset={trend.strokeDashoffset}\n />\n <g transform={popTransform}>\n <path\n d={ARROW_PATH}\n strokeDasharray={arrow.strokeDasharray}\n strokeDashoffset={arrow.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction TrendingDownIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M16 17h6v-6\" />\n <path d=\"m22 17-8.5-8.5-5 5L2 7\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype TrendingDownIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof TrendingDownIconBase>;\n\nconst TrendingDownIconInner = forwardRef<\n HTMLDivElement,\n TrendingDownIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<TrendingDownIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <TrendingDownIconBase\n {...(componentProps as unknown as ComponentProps<typeof TrendingDownIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const TrendingDownIcon = Interactive.withSchema({\n Component: TrendingDownIconInner,\n componentName: \"<TrendingDownIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-trending-up.json b/registry-artifacts/elements/icon-trending-up.jsonnew file mode 100644index 00000000..01d8bd58--- /dev/null+++ b/registry-artifacts/elements/icon-trending-up.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Trending Up",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-trending-up",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst TREND_PATH = \"M2 17 8.5 10.5 13.5 15.5 22 7\";\nconst ARROW_PATH = \"M16 7H22V13\";\n\nconst PEAK_X = 22;\nconst PEAK_Y = 7;\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction TrendingUpIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const trendDraw = interpolate(linearDraw, [0, 0.8], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.in(Easing.quad),\n });\n const arrowDraw = interpolate(linearDraw, [0.65, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const pop = acting\n ? interpolate(actionProgress, [0.1, 0.45, 1], [1, 1.25, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const trend = drawnPathProps(TREND_PATH, acting ? 1 : trendDraw);\n const arrow = drawnPathProps(ARROW_PATH, acting ? 1 : arrowDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const popTransform = `translate(${PEAK_X * (1 - pop)} ${PEAK_Y * (1 - pop)}) scale(${pop})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={TREND_PATH}\n strokeDasharray={trend.strokeDasharray}\n strokeDashoffset={trend.strokeDashoffset}\n />\n <g transform={popTransform}>\n <path\n d={ARROW_PATH}\n strokeDasharray={arrow.strokeDasharray}\n strokeDashoffset={arrow.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction TrendingUpIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M16 7h6v6\" />\n <path d=\"m22 7-8.5 8.5-5-5L2 17\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype TrendingUpIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof TrendingUpIconBase>;\n\nconst TrendingUpIconInner = forwardRef<\n HTMLDivElement,\n TrendingUpIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<TrendingUpIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <TrendingUpIconBase\n {...(componentProps as unknown as ComponentProps<typeof TrendingUpIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const TrendingUpIcon = Interactive.withSchema({\n Component: TrendingUpIconInner,\n componentName: \"<TrendingUpIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-trophy.json b/registry-artifacts/elements/icon-trophy.jsonnew file mode 100644index 00000000..74537564--- /dev/null+++ b/registry-artifacts/elements/icon-trophy.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Trophy",+ "durationInFrames": 85,+ "installationMode": "component-owned-sequence",+ "slug": "icon-trophy",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst CUP_PATH = \"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z\";\nconst LEG_LEFT_PATH = \"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978\";\nconst LEG_RIGHT_PATH =\n \"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978\";\nconst BASE_PATH = \"M4 22h16\";\nconst HANDLE_LEFT_PATH = \"M6 9H4.5a1 1 0 0 1 0-5H6\";\nconst HANDLE_RIGHT_PATH = \"M18 9h1.5a1 1 0 0 0 0-5H18\";\n\nconst CENTER = 12;\n\nconst TIMINGS = {\n drawDurationInFrames: 18,\n actionDelayInFrames: 2,\n actionDurationInFrames: 24,\n loop: false,\n} as const;\n\nfunction TrophyIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const cupDraw = interpolate(linearDraw, [0, 0.78], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const legDraw = interpolate(linearDraw, [0.56, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const hop = acting\n ? interpolate(actionProgress, [0, 0.4, 1], [0, -3, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const pop = acting\n ? interpolate(actionProgress, [0, 0.4, 0.75, 1], [1, 1.08, 1, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n const handleDraw = acting\n ? interpolate(actionProgress, [0.1, 0.6], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n })\n : 0;\n\n const cup = drawnPathProps(CUP_PATH, acting ? 1 : cupDraw);\n const legLeft = drawnPathProps(LEG_LEFT_PATH, acting ? 1 : legDraw);\n const legRight = drawnPathProps(LEG_RIGHT_PATH, acting ? 1 : legDraw);\n const base = drawnPathProps(BASE_PATH, acting ? 1 : legDraw);\n const handleLeft = drawnPathProps(HANDLE_LEFT_PATH, handleDraw);\n const handleRight = drawnPathProps(HANDLE_RIGHT_PATH, handleDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const hoistTransform = `translate(${CENTER * (1 - pop)} ${CENTER * (1 - pop) + hop}) scale(${pop})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={hoistTransform}>\n <path\n d={HANDLE_LEFT_PATH}\n strokeDasharray={handleLeft.strokeDasharray}\n strokeDashoffset={handleLeft.strokeDashoffset}\n />\n <path\n d={HANDLE_RIGHT_PATH}\n strokeDasharray={handleRight.strokeDasharray}\n strokeDashoffset={handleRight.strokeDashoffset}\n />\n <path\n d={CUP_PATH}\n strokeDasharray={cup.strokeDasharray}\n strokeDashoffset={cup.strokeDashoffset}\n />\n <path\n d={LEG_LEFT_PATH}\n strokeDasharray={legLeft.strokeDasharray}\n strokeDashoffset={legLeft.strokeDashoffset}\n />\n <path\n d={LEG_RIGHT_PATH}\n strokeDasharray={legRight.strokeDasharray}\n strokeDashoffset={legRight.strokeDashoffset}\n />\n <path\n d={BASE_PATH}\n strokeDasharray={base.strokeDasharray}\n strokeDashoffset={base.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction TrophyIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M10 14.66v1.626a2 2 0 0 1-.976 1.696A5 5 0 0 0 7 21.978\" />\n <path d=\"M14 14.66v1.626a2 2 0 0 0 .976 1.696A5 5 0 0 1 17 21.978\" />\n <path d=\"M18 9h1.5a1 1 0 0 0 0-5H18\" />\n <path d=\"M4 22h16\" />\n <path d=\"M6 9a6 6 0 0 0 12 0V3a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1z\" />\n <path d=\"M6 9H4.5a1 1 0 0 1 0-5H6\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype TrophyIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof TrophyIconBase>;\n\nconst TrophyIconInner = forwardRef<\n HTMLDivElement,\n TrophyIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<TrophyIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <TrophyIconBase\n {...(componentProps as unknown as ComponentProps<typeof TrophyIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const TrophyIcon = Interactive.withSchema({\n Component: TrophyIconInner,\n componentName: \"<TrophyIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 85+}diff --git a/registry-artifacts/elements/icon-upload.json b/registry-artifacts/elements/icon-upload.jsonnew file mode 100644index 00000000..aa7ddab9--- /dev/null+++ b/registry-artifacts/elements/icon-upload.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Upload",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-upload",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst TRAY_DRAW = \"M3 15v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4\";\nconst TRAY_STATIC = \"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\";\nconst SHAFT_DRAW = \"M12 15V3\";\nconst SHAFT_STATIC = \"M12 3v12\";\nconst HEAD_PATH = \"M17 8 12 3 7 8\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 18,\n loop: false,\n} as const;\n\nfunction UploadIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const trayProgress = interpolate(linearDraw, [0, 0.714], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const arrowProgress = interpolate(linearDraw, [0.429, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const arrowOpacity = interpolate(linearDraw, [0.429, 0.6], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const tray = drawnPathProps(TRAY_DRAW, trayProgress);\n const shaft = drawnPathProps(SHAFT_DRAW, arrowProgress);\n const head = drawnPathProps(HEAD_PATH, arrowProgress);\n\n const launchY = interpolate(actionProgress, [0, 0.4, 0.7, 1], [0, -5, 1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const traySquash = interpolate(\n actionProgress,\n [0, 0.2, 0.4, 1],\n [1, 0.96, 1, 1],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g\n transform={`translate(12 21) scale(1 ${traySquash}) translate(-12 -21)`}\n >\n <path\n d={TRAY_DRAW}\n strokeDasharray={tray.strokeDasharray}\n strokeDashoffset={tray.strokeDashoffset}\n />\n </g>\n <g opacity={arrowOpacity} transform={`translate(0 ${launchY})`}>\n <path\n d={SHAFT_DRAW}\n strokeDasharray={shaft.strokeDasharray}\n strokeDashoffset={shaft.strokeDashoffset}\n />\n <path\n d={HEAD_PATH}\n strokeDasharray={head.strokeDasharray}\n strokeDashoffset={head.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction UploadIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={SHAFT_STATIC} />\n <path d={HEAD_PATH} />\n <path d={TRAY_STATIC} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype UploadIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof UploadIconBase>;\n\nconst UploadIconInner = forwardRef<\n HTMLDivElement,\n UploadIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<UploadIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <UploadIconBase\n {...(componentProps as unknown as ComponentProps<typeof UploadIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const UploadIcon = Interactive.withSchema({\n Component: UploadIconInner,\n componentName: \"<UploadIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-user-plus.json b/registry-artifacts/elements/icon-user-plus.jsonnew file mode 100644index 00000000..9d911eed--- /dev/null+++ b/registry-artifacts/elements/icon-user-plus.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "User Plus",+ "durationInFrames": 75,+ "installationMode": "component-owned-sequence",+ "slug": "icon-user-plus",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst HEAD_PATH =\n \"M9 3 A4 4 0 0 1 13 7 A4 4 0 0 1 9 11 A4 4 0 0 1 5 7 A4 4 0 0 1 9 3\";\nconst SHOULDERS_PATH = \"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\";\nconst PLUS_H_PATH = \"M22 11 16 11\";\nconst PLUS_V_PATH = \"M19 8 19 14\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 26,\n loop: false,\n} as const;\n\nfunction UserPlusIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const headDraw = interpolate(linearDraw, [0, 0.71], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const shouldersDraw = interpolate(linearDraw, [0.43, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const hProgress = acting\n ? interpolate(actionProgress, [0.08, 0.31], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n })\n : 0;\n const vProgress = acting\n ? interpolate(actionProgress, [0.19, 0.42], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n })\n : 0;\n const plusPop = acting\n ? interpolate(actionProgress, [0.42, 0.65, 1], [1, 1.3, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const head = drawnPathProps(HEAD_PATH, headDraw);\n const shoulders = drawnPathProps(SHOULDERS_PATH, shouldersDraw);\n const plusH = drawnPathProps(PLUS_H_PATH, hProgress);\n const plusV = drawnPathProps(PLUS_V_PATH, vProgress);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const plusTransform = `translate(${19 * (1 - plusPop)} ${11 * (1 - plusPop)}) scale(${plusPop})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={HEAD_PATH}\n strokeDasharray={head.strokeDasharray}\n strokeDashoffset={head.strokeDashoffset}\n />\n <path\n d={SHOULDERS_PATH}\n strokeDasharray={shoulders.strokeDasharray}\n strokeDashoffset={shoulders.strokeDashoffset}\n />\n <g transform={plusTransform}>\n <path\n d={PLUS_H_PATH}\n strokeDasharray={plusH.strokeDasharray}\n strokeDashoffset={plusH.strokeDashoffset}\n />\n <path\n d={PLUS_V_PATH}\n strokeDasharray={plusV.strokeDasharray}\n strokeDashoffset={plusV.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction UserPlusIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={SHOULDERS_PATH} />\n <circle cx=\"9\" cy=\"7\" r=\"4\" />\n <line x1=\"19\" x2=\"19\" y1=\"8\" y2=\"14\" />\n <line x1=\"22\" x2=\"16\" y1=\"11\" y2=\"11\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype UserPlusIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof UserPlusIconBase>;\n\nconst UserPlusIconInner = forwardRef<\n HTMLDivElement,\n UserPlusIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<UserPlusIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <UserPlusIconBase\n {...(componentProps as unknown as ComponentProps<typeof UserPlusIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const UserPlusIcon = Interactive.withSchema({\n Component: UserPlusIconInner,\n componentName: \"<UserPlusIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 75+}diff --git a/registry-artifacts/elements/icon-user.json b/registry-artifacts/elements/icon-user.jsonnew file mode 100644index 00000000..514dc1ea--- /dev/null+++ b/registry-artifacts/elements/icon-user.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "User",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-user",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst HEAD_PATH =\n \"M12 3 A4 4 0 0 1 16 7 A4 4 0 0 1 12 11 A4 4 0 0 1 8 7 A4 4 0 0 1 12 3\";\nconst SHOULDERS_PATH = \"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 22,\n loop: false,\n} as const;\n\nfunction UserIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const headDraw = interpolate(linearDraw, [0, 0.71], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const shouldersDraw = interpolate(linearDraw, [0.43, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const headDip = acting\n ? interpolate(actionProgress, [0, 0.45, 1], [0, 1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n const shoulderRise = acting\n ? interpolate(actionProgress, [0, 0.45, 1], [0, -1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n\n const head = drawnPathProps(HEAD_PATH, headDraw);\n const shoulders = drawnPathProps(SHOULDERS_PATH, shouldersDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`translate(0 ${headDip})`}>\n <path\n d={HEAD_PATH}\n strokeDasharray={head.strokeDasharray}\n strokeDashoffset={head.strokeDashoffset}\n />\n </g>\n <g transform={`translate(0 ${shoulderRise})`}>\n <path\n d={SHOULDERS_PATH}\n strokeDasharray={shoulders.strokeDasharray}\n strokeDashoffset={shoulders.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction UserIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={SHOULDERS_PATH} />\n <circle cx=\"12\" cy=\"7\" r=\"4\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype UserIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof UserIconBase>;\n\nconst UserIconInner = forwardRef<\n HTMLDivElement,\n UserIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<UserIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <UserIconBase\n {...(componentProps as unknown as ComponentProps<typeof UserIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const UserIcon = Interactive.withSchema({\n Component: UserIconInner,\n componentName: \"<UserIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-users.json b/registry-artifacts/elements/icon-users.jsonnew file mode 100644index 00000000..81392835--- /dev/null+++ b/registry-artifacts/elements/icon-users.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Users",+ "durationInFrames": 80,+ "installationMode": "component-owned-sequence",+ "slug": "icon-users",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst HEAD_PATH =\n \"M9 3 A4 4 0 0 1 13 7 A4 4 0 0 1 9 11 A4 4 0 0 1 5 7 A4 4 0 0 1 9 3\";\nconst SHOULDERS_PATH = \"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\";\nconst BACK_HEAD_PATH = \"M16 3.128a4 4 0 0 1 0 7.744\";\nconst BACK_SHOULDERS_PATH = \"M22 21v-2a4 4 0 0 0-3-3.87\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 24,\n loop: false,\n} as const;\n\nfunction UsersIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const headDraw = interpolate(linearDraw, [0, 0.71], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const shouldersDraw = interpolate(linearDraw, [0.43, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const pop = acting\n ? interpolate(actionProgress, [0, 0.25, 0.42], [1, 1.08, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n const backOpacity = acting\n ? interpolate(actionProgress, [0.33, 0.9], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : 0;\n const backSlide = acting\n ? interpolate(actionProgress, [0.33, 1], [-2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n })\n : -2;\n\n const head = drawnPathProps(HEAD_PATH, headDraw);\n const shoulders = drawnPathProps(SHOULDERS_PATH, shouldersDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const frontTransform = `translate(${9 * (1 - pop)} ${12 * (1 - pop)}) scale(${pop})`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={`translate(${backSlide} 0)`} opacity={backOpacity}>\n <path d={BACK_HEAD_PATH} />\n <path d={BACK_SHOULDERS_PATH} />\n </g>\n <g transform={frontTransform}>\n <path\n d={HEAD_PATH}\n strokeDasharray={head.strokeDasharray}\n strokeDashoffset={head.strokeDashoffset}\n />\n <path\n d={SHOULDERS_PATH}\n strokeDasharray={shoulders.strokeDasharray}\n strokeDashoffset={shoulders.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction UsersIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={SHOULDERS_PATH} />\n <path d={BACK_HEAD_PATH} />\n <path d={BACK_SHOULDERS_PATH} />\n <circle cx=\"9\" cy=\"7\" r=\"4\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype UsersIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof UsersIconBase>;\n\nconst UsersIconInner = forwardRef<\n HTMLDivElement,\n UsersIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<UsersIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <UsersIconBase\n {...(componentProps as unknown as ComponentProps<typeof UsersIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const UsersIcon = Interactive.withSchema({\n Component: UsersIconInner,\n componentName: \"<UsersIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 80+}diff --git a/registry-artifacts/elements/icon-video.json b/registry-artifacts/elements/icon-video.jsonnew file mode 100644index 00000000..8837bb19--- /dev/null+++ b/registry-artifacts/elements/icon-video.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Video",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-video",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst BODY_PATH =\n \"M4 6H14A2 2 0 0 1 16 8V16A2 2 0 0 1 14 18H4A2 2 0 0 1 2 16V8A2 2 0 0 1 4 6Z\";\nconst LENS_PATH =\n \"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5\";\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction VideoIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const bodyDraw = interpolate(linearDraw, [0, 0.75], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const lensDraw = interpolate(linearDraw, [0.5, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const pan = acting\n ? interpolate(actionProgress, [0, 0.5, 0.75, 1], [0, 8, -1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 0;\n\n const body = drawnPathProps(BODY_PATH, bodyDraw);\n const lens = drawnPathProps(LENS_PATH, lensDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={BODY_PATH}\n strokeDasharray={body.strokeDasharray}\n strokeDashoffset={body.strokeDashoffset}\n />\n <g transform={`rotate(${pan} 16 11.75)`}>\n <path\n d={LENS_PATH}\n strokeDasharray={lens.strokeDasharray}\n strokeDashoffset={lens.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction VideoIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={LENS_PATH} />\n <rect x=\"2\" y=\"6\" width=\"14\" height=\"12\" rx=\"2\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype VideoIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof VideoIconBase>;\n\nconst VideoIconInner = forwardRef<\n HTMLDivElement,\n VideoIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<VideoIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <VideoIconBase\n {...(componentProps as unknown as ComponentProps<typeof VideoIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const VideoIcon = Interactive.withSchema({\n Component: VideoIconInner,\n componentName: \"<VideoIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-volume-2.json b/registry-artifacts/elements/icon-volume-2.jsonnew file mode 100644index 00000000..0b237b25--- /dev/null+++ b/registry-artifacts/elements/icon-volume-2.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Volume 2",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-volume-2",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst SPEAKER_PATH =\n \"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z\";\nconst INNER_PATH = \"M16 9a5 5 0 0 1 0 6\";\nconst OUTER_PATH = \"M19.364 18.364a9 9 0 0 0 0-12.728\";\n\nconst TIMINGS = {\n drawDurationInFrames: 20,\n actionDelayInFrames: 2,\n actionDurationInFrames: 18,\n loop: false,\n} as const;\n\nfunction Volume2IconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const bodyDraw = interpolate(linearDraw, [0, 0.6], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const innerDraw = interpolate(linearDraw, [0.4, 0.8], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const outerDraw = interpolate(linearDraw, [0.6, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const innerProgress = acting ? 1 : innerDraw;\n const outerProgress = acting ? 1 : outerDraw;\n\n const innerShift = acting\n ? interpolate(actionProgress, [0, 0.35, 0.7], [0, 2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : 0;\n const innerGrow = acting\n ? interpolate(actionProgress, [0, 0.35, 0.7], [1, 1.08, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : 1;\n const outerShift = acting\n ? interpolate(actionProgress, [0.12, 0.47, 0.82], [0, 2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : 0;\n const outerGrow = acting\n ? interpolate(actionProgress, [0.12, 0.47, 0.82], [1, 1.08, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : 1;\n\n const body = drawnPathProps(SPEAKER_PATH, bodyDraw);\n const inner = drawnPathProps(INNER_PATH, innerProgress);\n const outer = drawnPathProps(OUTER_PATH, outerProgress);\n\n const innerTransform = `translate(${11 * (1 - innerGrow) + innerShift} ${12 * (1 - innerGrow)}) scale(${innerGrow})`;\n const outerTransform = `translate(${11 * (1 - outerGrow) + outerShift} ${12 * (1 - outerGrow)}) scale(${outerGrow})`;\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <path\n d={SPEAKER_PATH}\n strokeDasharray={body.strokeDasharray}\n strokeDashoffset={body.strokeDashoffset}\n />\n <g transform={innerTransform}>\n <path\n d={INNER_PATH}\n strokeDasharray={inner.strokeDasharray}\n strokeDashoffset={inner.strokeDashoffset}\n />\n </g>\n <g transform={outerTransform}>\n <path\n d={OUTER_PATH}\n strokeDasharray={outer.strokeDasharray}\n strokeDashoffset={outer.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction Volume2IconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={SPEAKER_PATH} />\n <path d={INNER_PATH} />\n <path d={OUTER_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype Volume2IconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof Volume2IconBase>;\n\nconst Volume2IconInner = forwardRef<\n HTMLDivElement,\n Volume2IconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<Volume2Icon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <Volume2IconBase\n {...(componentProps as unknown as ComponentProps<typeof Volume2IconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const Volume2Icon = Interactive.withSchema({\n Component: Volume2IconInner,\n componentName: \"<Volume2Icon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-volume-x.json b/registry-artifacts/elements/icon-volume-x.jsonnew file mode 100644index 00000000..2f28aa80--- /dev/null+++ b/registry-artifacts/elements/icon-volume-x.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Volume X",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-volume-x",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst SPEAKER_PATH =\n \"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z\";\nconst X1_PATH = \"M22 9 16 15\";\nconst X2_PATH = \"M16 9 22 15\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 22,\n loop: false,\n} as const;\n\nfunction VolumeXIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const x1Progress = acting\n ? interpolate(actionProgress, [0.09, 0.32], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n })\n : 0;\n const x2Progress = acting\n ? interpolate(actionProgress, [0.23, 0.45], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n })\n : 0;\n\n const shake = acting\n ? interpolate(\n actionProgress,\n [0.45, 0.55, 0.65, 0.75, 0.85, 1],\n [0, 2, -1.5, 1, -0.5, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n },\n )\n : 0;\n\n const body = drawnPathProps(SPEAKER_PATH, drawProgress);\n const x1 = drawnPathProps(X1_PATH, x1Progress);\n const x2 = drawnPathProps(X2_PATH, x2Progress);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `translateX(${shake}px) scale(${scale})`,\n }}\n >\n <path\n d={SPEAKER_PATH}\n strokeDasharray={body.strokeDasharray}\n strokeDashoffset={body.strokeDashoffset}\n />\n <path\n d={X1_PATH}\n strokeDasharray={x1.strokeDasharray}\n strokeDashoffset={x1.strokeDashoffset}\n />\n <path\n d={X2_PATH}\n strokeDasharray={x2.strokeDasharray}\n strokeDashoffset={x2.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction VolumeXIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={SPEAKER_PATH} />\n <line x1=\"22\" x2=\"16\" y1=\"9\" y2=\"15\" />\n <line x1=\"16\" x2=\"22\" y1=\"9\" y2=\"15\" />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype VolumeXIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof VolumeXIconBase>;\n\nconst VolumeXIconInner = forwardRef<\n HTMLDivElement,\n VolumeXIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<VolumeXIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <VolumeXIconBase\n {...(componentProps as unknown as ComponentProps<typeof VolumeXIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const VolumeXIcon = Interactive.withSchema({\n Component: VolumeXIconInner,\n componentName: \"<VolumeXIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-wallet.json b/registry-artifacts/elements/icon-wallet.jsonnew file mode 100644index 00000000..f2f8a7c7--- /dev/null+++ b/registry-artifacts/elements/icon-wallet.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Wallet",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-wallet",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst FLAP_PATH =\n \"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1\";\nconst BODY_PATH = \"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4\";\n\nconst CENTER = 12;\n\nconst TIMINGS = {\n drawDurationInFrames: 16,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction WalletIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const bodyDraw = interpolate(linearDraw, [0, 0.7], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const flapDraw = interpolate(linearDraw, [0.5, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const fatten = acting\n ? interpolate(actionProgress, [0.1, 0.5, 1], [1, 1.05, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n })\n : 1;\n\n const flap = drawnPathProps(FLAP_PATH, acting ? 1 : flapDraw);\n const body = drawnPathProps(BODY_PATH, acting ? 1 : bodyDraw);\n\n const scale = 0.85 + 0.15 * scaleIn;\n const fattenTransform = `translate(${CENTER * (1 - fatten)} 0) scale(${fatten} 1)`;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g transform={fattenTransform}>\n <path\n d={BODY_PATH}\n strokeDasharray={body.strokeDasharray}\n strokeDashoffset={body.strokeDashoffset}\n />\n <path\n d={FLAP_PATH}\n strokeDasharray={flap.strokeDasharray}\n strokeDashoffset={flap.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction WalletIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={FLAP_PATH} />\n <path d={BODY_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype WalletIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof WalletIconBase>;\n\nconst WalletIconInner = forwardRef<\n HTMLDivElement,\n WalletIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<WalletIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <WalletIconBase\n {...(componentProps as unknown as ComponentProps<typeof WalletIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const WalletIcon = Interactive.withSchema({\n Component: WalletIconInner,\n componentName: \"<WalletIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-x-circle.json b/registry-artifacts/elements/icon-x-circle.jsonnew file mode 100644index 00000000..924c6ddd--- /dev/null+++ b/registry-artifacts/elements/icon-x-circle.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "X Circle",+ "durationInFrames": 70,+ "installationMode": "component-owned-sequence",+ "slug": "icon-x-circle",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst RING_PATH = \"M12 2a10 10 0 1 0 0 20 10 10 0 1 0 0-20Z\";\nconst SLASH1_PATH = \"M15 9 9 15\";\nconst SLASH2_PATH = \"M9 9 15 15\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 20,\n loop: false,\n} as const;\n\nfunction XCircleIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress, actionFrame } =\n useIconAnimation({ animation, loop, speed }, TIMINGS);\n\n const acting = animation !== \"draw\" && actionFrame >= 0;\n\n const slash1Draw = interpolate(actionProgress, [0.1, 0.35], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const slash2Draw = interpolate(actionProgress, [0.25, 0.5], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n const shake = acting\n ? interpolate(\n actionProgress,\n [0.5, 0.62, 0.74, 0.86, 1],\n [0, 2, -2, 1, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n },\n )\n : 0;\n\n const slash1Progress = animation === \"draw\" ? 1 : acting ? slash1Draw : 0;\n const slash2Progress = animation === \"draw\" ? 1 : acting ? slash2Draw : 0;\n\n const ring = drawnPathProps(RING_PATH, drawProgress);\n const slash1 = drawnPathProps(SLASH1_PATH, slash1Progress);\n const slash2 = drawnPathProps(SLASH2_PATH, slash2Progress);\n\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `translateX(${shake}px) scale(${scale})`,\n }}\n >\n <path\n d={RING_PATH}\n strokeDasharray={ring.strokeDasharray}\n strokeDashoffset={ring.strokeDashoffset}\n />\n <path\n d={SLASH1_PATH}\n strokeDasharray={slash1.strokeDasharray}\n strokeDashoffset={slash1.strokeDashoffset}\n />\n <path\n d={SLASH2_PATH}\n strokeDasharray={slash2.strokeDasharray}\n strokeDashoffset={slash2.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction XCircleIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx=\"12\" cy=\"12\" r=\"10\" />\n <path d={SLASH1_PATH} />\n <path d={SLASH2_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype XCircleIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof XCircleIconBase>;\n\nconst XCircleIconInner = forwardRef<\n HTMLDivElement,\n XCircleIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<XCircleIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <XCircleIconBase\n {...(componentProps as unknown as ComponentProps<typeof XCircleIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const XCircleIcon = Interactive.withSchema({\n Component: XCircleIconInner,\n componentName: \"<XCircleIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 70+}diff --git a/registry-artifacts/elements/icon-x.json b/registry-artifacts/elements/icon-x.jsonnew file mode 100644index 00000000..1cbb21be--- /dev/null+++ b/registry-artifacts/elements/icon-x.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "X",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "icon-x",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst FIRST_PATH = \"M18 6 6 18\";\nconst SECOND_PATH = \"M6 6 18 18\";\n\nconst TIMINGS = {\n drawDurationInFrames: 14,\n actionDelayInFrames: 2,\n actionDurationInFrames: 18,\n loop: false,\n} as const;\n\nfunction XIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const firstProgress = interpolate(linearDraw, [0, 0.57], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const secondProgress = interpolate(linearDraw, [0.29, 0.86], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n\n const first = drawnPathProps(FIRST_PATH, firstProgress);\n const second = drawnPathProps(SECOND_PATH, secondProgress);\n\n const rotate = interpolate(\n actionProgress,\n [0, 0.25, 0.5, 0.75, 1],\n [0, -8, 6, -3, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n const scale = 0.85 + 0.15 * scaleIn;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `rotate(${rotate}deg) scale(${scale})`,\n }}\n >\n <path\n d={FIRST_PATH}\n strokeDasharray={first.strokeDasharray}\n strokeDashoffset={first.strokeDashoffset}\n />\n <path\n d={SECOND_PATH}\n strokeDasharray={second.strokeDasharray}\n strokeDashoffset={second.strokeDashoffset}\n />\n </svg>\n );\n}\n\nfunction XIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={FIRST_PATH} />\n <path d={SECOND_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype XIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof XIconBase>;\n\nconst XIconInner = forwardRef<\n HTMLDivElement,\n XIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<XIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <XIconBase\n {...(componentProps as unknown as ComponentProps<typeof XIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const XIcon = Interactive.withSchema({\n Component: XIconInner,\n componentName: \"<XIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/icon-zap.json b/registry-artifacts/elements/icon-zap.jsonnew file mode 100644index 00000000..d5683539--- /dev/null+++ b/registry-artifacts/elements/icon-zap.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/paths",+ "version": null+ }+ ],+ "dimensions": {+ "width": 48,+ "height": 48+ },+ "displayName": "Zap",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "icon-zap",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { evolvePath } from \"@remotion/paths\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface IconAnimationProps {\n animation?: \"draw\" | \"action\" | \"both\";\n loop?: boolean;\n speed?: number;\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}\n\ninterface IconTimings {\n drawDurationInFrames?: number;\n actionDelayInFrames?: number;\n actionDurationInFrames?: number;\n loop?: boolean;\n}\n\ninterface IconTimeline {\n drawProgress: number;\n scaleIn: number;\n actionFrame: number;\n actionProgress: number;\n cycleIndex: number;\n}\n\nfunction clamp01(t: number): number {\n return t < 0 ? 0 : t > 1 ? 1 : t;\n}\n\nfunction easeOut(t: number): number {\n return 1 - (1 - t) ** 3;\n}\n\nfunction iconTimeline(\n frame: number,\n fps: number,\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const animation = props.animation ?? \"both\";\n const loop = props.loop ?? timings.loop ?? false;\n const drawDuration = timings.drawDurationInFrames ?? 14;\n const actionDelay = timings.actionDelayInFrames ?? 2;\n const actionDuration = timings.actionDurationInFrames ?? 20;\n\n const drawProgress =\n animation === \"action\"\n ? 1\n : easeOut(clamp01(drawDuration > 0 ? frame / drawDuration : 1));\n\n const scaleIn = clamp01(\n spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 220, mass: 0.7 },\n durationInFrames: Math.max(1, drawDuration),\n }),\n );\n\n const actionStart = animation === \"action\" ? 0 : drawDuration + actionDelay;\n const sinceStart = frame - actionStart;\n\n if (animation === \"draw\" || sinceStart < 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 0,\n cycleIndex: 0,\n };\n }\n\n if (actionDuration <= 0) {\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: 1,\n cycleIndex: 0,\n };\n }\n\n if (loop) {\n const cycleIndex = Math.floor(sinceStart / actionDuration);\n const local = sinceStart - cycleIndex * actionDuration;\n return {\n drawProgress,\n scaleIn,\n actionFrame: local,\n actionProgress: local / actionDuration,\n cycleIndex,\n };\n }\n\n return {\n drawProgress,\n scaleIn,\n actionFrame: sinceStart,\n actionProgress: clamp01(sinceStart / actionDuration),\n cycleIndex: 0,\n };\n}\n\nfunction useIconAnimation(\n props: IconAnimationProps,\n timings: IconTimings,\n): IconTimeline {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const speed = props.speed ?? 1;\n return iconTimeline(frame * speed, fps, props, timings);\n}\n\nfunction staggeredProgress(\n progress: number,\n index: number,\n count: number,\n overlap = 0.5,\n): number {\n if (count <= 1) return clamp01(progress);\n const o = clamp01(overlap);\n const width = 1 / (count - (count - 1) * o);\n const start = index * width * (1 - o);\n return clamp01((progress - start) / width);\n}\n\nfunction drawnPathProps(\n d: string,\n progress: number,\n): { strokeDasharray: string; strokeDashoffset: number } {\n return evolvePath(clamp01(progress), d);\n}\n\nconst ZAP_PATH =\n \"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z\";\n\nconst TIMINGS = {\n drawDurationInFrames: 10,\n actionDelayInFrames: 2,\n actionDurationInFrames: 14,\n loop: false,\n} as const;\n\nfunction ZapIconBase({\n animation = \"both\",\n loop,\n speed,\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: IconAnimationProps) {\n const { drawProgress, scaleIn, actionProgress } = useIconAnimation(\n { animation, loop, speed },\n TIMINGS,\n );\n\n const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);\n\n const boltProgress = interpolate(linearDraw, [0, 0.8], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n });\n\n const bolt = drawnPathProps(ZAP_PATH, boltProgress);\n\n const flash = interpolate(\n actionProgress,\n [0, 0.15, 0.3, 0.45, 0.6, 1],\n [1, 0.3, 1, 0.3, 1, 1],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n const pop = interpolate(actionProgress, [0, 0.3, 0.6, 1], [1, 1.1, 1, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.quad),\n });\n const strikeEase = {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.out(Easing.quad),\n } as const;\n const strikeX = interpolate(\n actionProgress,\n [0, 0.15, 0.4, 1],\n [0, 1.5, -3, 0],\n strikeEase,\n );\n const strikeY = interpolate(\n actionProgress,\n [0, 0.15, 0.4, 1],\n [0, -2, 4, 0],\n strikeEase,\n );\n const skew = interpolate(\n actionProgress,\n [0, 0.15, 0.4, 0.7, 1],\n [0, -4, 9, -2, 0],\n strikeEase,\n );\n const scale = (0.85 + 0.15 * scaleIn) * pop;\n\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n overflow: \"visible\",\n transformOrigin: \"center\",\n transform: `scale(${scale})`,\n }}\n >\n <g\n opacity={flash}\n transform={`translate(${strikeX} ${strikeY}) translate(12 12) skewX(${skew}) translate(-12 -12)`}\n >\n <path\n d={ZAP_PATH}\n strokeDasharray={bolt.strokeDasharray}\n strokeDashoffset={bolt.strokeDashoffset}\n />\n </g>\n </svg>\n );\n}\n\nfunction ZapIconStatic({\n size = 48,\n color = \"currentColor\",\n strokeWidth = 2,\n className,\n}: {\n size?: number;\n color?: string;\n strokeWidth?: number;\n className?: string;\n}) {\n return (\n <svg\n className={className}\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d={ZAP_PATH} />\n </svg>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n animation: {\n type: \"enum\",\n default: \"both\",\n variants: {\n draw: {},\n action: {},\n both: {},\n },\n description: \"Animation\",\n },\n loop: {\n type: \"boolean\",\n default: false,\n description: \"Loop\",\n },\n size: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 4,\n default: 48,\n description: \"Size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n strokeWidth: {\n type: \"number\",\n min: 1,\n max: 3,\n step: 0.25,\n default: 2,\n description: \"Stroke width\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 48,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"animation\",\"loop\",\"size\",\"color\",\"strokeWidth\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n animation: \"both\",\n loop: false,\n size: 48,\n color: \"#171717\",\n strokeWidth: 2,\n speed: 1,\n};\n\ntype ZapIconElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ZapIconBase>;\n\nconst ZapIconInner = forwardRef<\n HTMLDivElement,\n ZapIconElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 48, height = 48, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ZapIcon>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ZapIconBase\n {...(componentProps as unknown as ComponentProps<typeof ZapIconBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ZapIcon = Interactive.withSchema({\n Component: ZapIconInner,\n componentName: \"<ZapIcon>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/infinite-bento-pan.json b/registry-artifacts/elements/infinite-bento-pan.jsonnew file mode 100644index 00000000..867e2879--- /dev/null+++ b/registry-artifacts/elements/infinite-bento-pan.json@@ -0,0 +1,14 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": null,+ "displayName": "Infinite Bento Pan",+ "durationInFrames": 300,+ "installationMode": "component-owned-sequence",+ "slug": "infinite-bento-pan",+ "sourceCode": "import { Interactive, Sequence, interpolate, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface InfiniteBentoPanProps {\n panSpeed?: number;\n accentColor?: string;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\nconst SUPER_W = 3500;\nconst SUPER_H = 2500;\n\ntype CardKind =\n | \"chart\"\n | \"counter\"\n | \"gradient\"\n | \"code\"\n | \"logo\"\n | \"stat\"\n | \"bars\";\n\ninterface CardDef {\n x: number;\n y: number;\n w: number;\n h: number;\n kind: CardKind;\n hue: number;\n label?: string;\n}\n\nconst CARDS: CardDef[] = [\n { x: 80, y: 80, w: 480, h: 280, kind: \"chart\", hue: 220, label: \"Revenue\" },\n { x: 600, y: 80, w: 280, h: 280, kind: \"counter\", hue: 280, label: \"MRR\" },\n { x: 920, y: 80, w: 360, h: 180, kind: \"gradient\", hue: 200 },\n { x: 1320, y: 80, w: 480, h: 280, kind: \"code\", hue: 0, label: \"deploy.ts\" },\n { x: 1840, y: 80, w: 280, h: 280, kind: \"logo\", hue: 320 },\n { x: 2160, y: 80, w: 380, h: 180, kind: \"stat\", hue: 160, label: \"Uptime\" },\n { x: 2580, y: 80, w: 360, h: 280, kind: \"bars\", hue: 40, label: \"Visits\" },\n { x: 920, y: 300, w: 360, h: 200, kind: \"counter\", hue: 180, label: \"Users\" },\n {\n x: 2160,\n y: 300,\n w: 380,\n h: 200,\n kind: \"chart\",\n hue: 100,\n label: \"Latency\",\n },\n { x: 80, y: 400, w: 280, h: 280, kind: \"gradient\", hue: 340 },\n { x: 400, y: 400, w: 480, h: 280, kind: \"code\", hue: 0, label: \"api.ts\" },\n { x: 1320, y: 420, w: 280, h: 280, kind: \"stat\", hue: 60, label: \"P95\" },\n { x: 1640, y: 420, w: 380, h: 280, kind: \"bars\", hue: 260, label: \"Builds\" },\n { x: 2580, y: 420, w: 360, h: 280, kind: \"logo\", hue: 200 },\n { x: 80, y: 720, w: 480, h: 240, kind: \"chart\", hue: 290, label: \"Errors\" },\n { x: 600, y: 720, w: 280, h: 240, kind: \"stat\", hue: 20, label: \"RPS\" },\n { x: 920, y: 740, w: 380, h: 220, kind: \"gradient\", hue: 240 },\n {\n x: 1320,\n y: 740,\n w: 360,\n h: 220,\n kind: \"counter\",\n hue: 140,\n label: \"Active\",\n },\n { x: 1720, y: 740, w: 480, h: 240, kind: \"code\", hue: 0, label: \"worker.ts\" },\n { x: 2240, y: 740, w: 360, h: 240, kind: \"bars\", hue: 320, label: \"Queue\" },\n { x: 80, y: 1000, w: 360, h: 220, kind: \"logo\", hue: 180 },\n { x: 460, y: 1000, w: 380, h: 220, kind: \"stat\", hue: 80, label: \"Cache\" },\n { x: 880, y: 1000, w: 480, h: 220, kind: \"chart\", hue: 200, label: \"CPU\" },\n {\n x: 1400,\n y: 1000,\n w: 280,\n h: 220,\n kind: \"counter\",\n hue: 360,\n label: \"Jobs\",\n },\n { x: 1720, y: 1020, w: 360, h: 220, kind: \"gradient\", hue: 120 },\n { x: 2120, y: 1020, w: 380, h: 220, kind: \"code\", hue: 0, label: \"db.sql\" },\n { x: 2540, y: 1020, w: 400, h: 220, kind: \"bars\", hue: 280, label: \"Tasks\" },\n { x: 80, y: 1280, w: 480, h: 260, kind: \"code\", hue: 0, label: \"edge.ts\" },\n { x: 600, y: 1280, w: 360, h: 260, kind: \"chart\", hue: 240, label: \"TTFB\" },\n { x: 1000, y: 1280, w: 280, h: 260, kind: \"logo\", hue: 60 },\n { x: 1320, y: 1280, w: 380, h: 260, kind: \"stat\", hue: 200, label: \"Hits\" },\n {\n x: 1740,\n y: 1280,\n w: 360,\n h: 260,\n kind: \"counter\",\n hue: 300,\n label: \"Bytes\",\n },\n { x: 2140, y: 1280, w: 380, h: 260, kind: \"gradient\", hue: 160 },\n { x: 2560, y: 1280, w: 380, h: 260, kind: \"bars\", hue: 0, label: \"Errors\" },\n { x: 80, y: 1600, w: 380, h: 220, kind: \"stat\", hue: 280, label: \"Saved\" },\n { x: 500, y: 1600, w: 480, h: 220, kind: \"chart\", hue: 40, label: \"Net Out\" },\n { x: 1020, y: 1600, w: 360, h: 220, kind: \"code\", hue: 0, label: \"auth.ts\" },\n { x: 1420, y: 1600, w: 280, h: 220, kind: \"logo\", hue: 220 },\n {\n x: 1740,\n y: 1620,\n w: 380,\n h: 220,\n kind: \"counter\",\n hue: 100,\n label: \"Hooks\",\n },\n { x: 2160, y: 1620, w: 360, h: 220, kind: \"bars\", hue: 340, label: \"Runs\" },\n { x: 2560, y: 1620, w: 380, h: 220, kind: \"gradient\", hue: 200 },\n { x: 80, y: 1880, w: 480, h: 240, kind: \"bars\", hue: 180, label: \"Edges\" },\n { x: 600, y: 1880, w: 380, h: 240, kind: \"gradient\", hue: 320 },\n { x: 1020, y: 1880, w: 360, h: 240, kind: \"logo\", hue: 80 },\n {\n x: 1420,\n y: 1880,\n w: 480,\n h: 240,\n kind: \"chart\",\n hue: 260,\n label: \"Tokens\",\n },\n {\n x: 1940,\n y: 1880,\n w: 280,\n h: 240,\n kind: \"counter\",\n hue: 20,\n label: \"Calls\",\n },\n { x: 2260, y: 1880, w: 380, h: 240, kind: \"stat\", hue: 140, label: \"Score\" },\n { x: 2680, y: 1880, w: 260, h: 240, kind: \"code\", hue: 0, label: \"ws.ts\" },\n];\n\nfunction noise(i: number, frame: number) {\n return Math.sin(frame / 30 + i) * 0.5 + 0.5;\n}\n\nfunction ChartCard({ accent, t }: { accent: string; t: number }) {\n const points: string[] = [];\n for (let i = 0; i < 12; i++) {\n const x = (i / 11) * 100;\n const y =\n 50 - (Math.sin(i * 0.7 + t) * 18 + Math.cos(i * 0.4 + t * 0.6) * 8);\n points.push(`${x},${y}`);\n }\n return (\n <svg\n viewBox=\"0 0 100 60\"\n preserveAspectRatio=\"none\"\n style={{ width: \"100%\", height: \"100%\" }}\n >\n <polyline\n points={points.join(\" \")}\n fill=\"none\"\n stroke={accent}\n strokeWidth={1.4}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <polyline\n points={`${points.join(\" \")} 100,60 0,60`}\n fill={`${accent}22`}\n stroke=\"none\"\n />\n </svg>\n );\n}\n\nfunction BarsCard({ accent, t }: { accent: string; t: number }) {\n return (\n <div\n style={{\n display: \"flex\",\n alignItems: \"flex-end\",\n gap: 6,\n height: \"100%\",\n width: \"100%\",\n }}\n >\n {Array.from({ length: 10 }).map((_, i) => {\n const h = 25 + (Math.sin(i * 0.8 + t) * 0.5 + 0.5) * 70;\n return (\n <div\n key={i}\n style={{\n flex: 1,\n height: `${h}%`,\n background: `linear-gradient(180deg, ${accent} 0%, ${accent}55 100%)`,\n borderRadius: 4,\n }}\n />\n );\n })}\n </div>\n );\n}\n\nfunction CodeCard() {\n const lines = [\n { indent: 0, w: 60, c: \"#7dd3fc\" },\n { indent: 1, w: 80, c: \"rgba(255,255,255,0.8)\" },\n { indent: 1, w: 50, c: \"#f9a8d4\" },\n { indent: 2, w: 70, c: \"rgba(255,255,255,0.8)\" },\n { indent: 2, w: 40, c: \"#fde047\" },\n { indent: 1, w: 30, c: \"rgba(255,255,255,0.6)\" },\n { indent: 0, w: 20, c: \"rgba(255,255,255,0.6)\" },\n ];\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: 8,\n fontFamily: \"ui-monospace, SFMono-Regular, Menlo, monospace\",\n }}\n >\n {lines.map((l, i) => (\n <div\n key={i}\n style={{\n marginLeft: l.indent * 14,\n width: `${l.w}%`,\n height: 8,\n borderRadius: 3,\n background: l.c,\n opacity: 0.7,\n }}\n />\n ))}\n </div>\n );\n}\n\nfunction LogoCard({ accent, hue }: { accent: string; hue: number }) {\n return (\n <div\n style={{\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n style={{\n width: 80,\n height: 80,\n borderRadius: 20,\n background: `linear-gradient(135deg, ${accent} 0%, hsl(${hue},70%,55%) 100%)`,\n boxShadow: `0 10px 30px ${accent}44`,\n }}\n />\n </div>\n );\n}\n\nfunction GradientCard({ hue }: { hue: number }) {\n return (\n <div\n style={{\n width: \"100%\",\n height: \"100%\",\n background: `radial-gradient(circle at 30% 30%, hsl(${hue},80%,60%) 0%, hsl(${(hue + 60) % 360},70%,40%) 50%, #0a0a0a 100%)`,\n }}\n />\n );\n}\n\nfunction Card({\n card,\n accent,\n index,\n frame,\n}: {\n card: CardDef;\n accent: string;\n index: number;\n frame: number;\n}) {\n const t = noise(index, frame) * 6.28;\n const baseStyle: React.CSSProperties = {\n position: \"absolute\",\n left: card.x,\n top: card.y,\n width: card.w,\n height: card.h,\n borderRadius: 18,\n background: \"linear-gradient(180deg, #131313 0%, #0a0a0a 100%)\",\n border: \"1px solid rgba(255,255,255,0.07)\",\n overflow: \"hidden\",\n padding: 18,\n color: \"white\",\n display: \"flex\",\n flexDirection: \"column\",\n };\n\n const labelEl = card.label ? (\n <div\n style={{\n fontSize: 12,\n fontWeight: 600,\n color: \"rgba(255,255,255,0.55)\",\n letterSpacing: \"0.04em\",\n textTransform: \"uppercase\",\n marginBottom: 8,\n }}\n >\n {card.label}\n </div>\n ) : null;\n\n if (card.kind === \"chart\") {\n return (\n <div style={baseStyle}>\n {labelEl}\n <div style={{ flex: 1 }}>\n <ChartCard accent={accent} t={t} />\n </div>\n </div>\n );\n }\n if (card.kind === \"bars\") {\n return (\n <div style={baseStyle}>\n {labelEl}\n <div style={{ flex: 1 }}>\n <BarsCard accent={accent} t={t} />\n </div>\n </div>\n );\n }\n if (card.kind === \"counter\") {\n const v = Math.floor(1200 + noise(index, frame) * 800);\n return (\n <div style={baseStyle}>\n {labelEl}\n <div\n style={{\n flex: 1,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n fontSize: 56,\n fontWeight: 700,\n letterSpacing: \"-0.04em\",\n color: \"white\",\n }}\n >\n {v.toLocaleString()}\n </div>\n <div style={{ fontSize: 12, color: accent, fontWeight: 600 }}>\n +{(noise(index + 1, frame) * 12).toFixed(1)}%\n </div>\n </div>\n );\n }\n if (card.kind === \"stat\") {\n const v = (95 + noise(index, frame) * 5).toFixed(2);\n return (\n <div style={baseStyle}>\n {labelEl}\n <div\n style={{\n flex: 1,\n display: \"flex\",\n alignItems: \"center\",\n fontSize: 48,\n fontWeight: 700,\n letterSpacing: \"-0.03em\",\n }}\n >\n {v}\n <span\n style={{\n fontSize: 20,\n color: \"rgba(255,255,255,0.5)\",\n marginLeft: 4,\n }}\n >\n %\n </span>\n </div>\n </div>\n );\n }\n if (card.kind === \"code\") {\n return (\n <div style={baseStyle}>\n {labelEl}\n <div style={{ flex: 1, display: \"flex\", alignItems: \"center\" }}>\n <div style={{ width: \"100%\" }}>\n <CodeCard />\n </div>\n </div>\n </div>\n );\n }\n if (card.kind === \"logo\") {\n return (\n <div style={{ ...baseStyle, padding: 0 }}>\n <LogoCard accent={accent} hue={card.hue} />\n </div>\n );\n }\n // gradient\n return (\n <div style={{ ...baseStyle, padding: 0 }}>\n <GradientCard hue={card.hue} />\n </div>\n );\n}\n\nfunction InfiniteBentoPanBase({\n panSpeed = 1,\n accentColor = \"#7c3aed\",\n speed = 1,\n className,\n}: InfiniteBentoPanProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames, width, height } = useVideoConfig();\n\n const maxX = SUPER_W - width;\n const maxY = SUPER_H - height;\n\n // diagonal pan: from top-left toward bottom-right\n const t = interpolate(frame, [0, durationInFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const px = t * maxX * Math.min(1, panSpeed);\n const py = t * maxY * Math.min(1, panSpeed);\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"transparent\",\n overflow: \"hidden\",\n fontFamily: FONT_FAMILY,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n width: SUPER_W,\n height: SUPER_H,\n translate: `${-px}px ${-py}px`,\n willChange: \"transform\",\n }}\n >\n {CARDS.map((c, i) => (\n <Card key={i} card={c} accent={accentColor} index={i} frame={frame} />\n ))}\n </div>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n background:\n \"radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.85) 80%, #000 100%)\",\n pointerEvents: \"none\",\n }}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n panSpeed: {\n type: \"number\",\n min: 0.25,\n max: 3,\n step: 0.25,\n default: 1,\n description: \"Pan speed\",\n hiddenFromList: false,\n },\n accentColor: {\n type: \"color\",\n default: \"#7c3aed\",\n description: \"Accent color\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"panSpeed\",\"accentColor\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n panSpeed: 1,\n accentColor: \"#7c3aed\",\n speed: 1,\n};\n\ntype InfiniteBentoPanElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof InfiniteBentoPanBase>;\n\nconst InfiniteBentoPanInner = forwardRef<\n HTMLDivElement,\n InfiniteBentoPanElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<InfiniteBentoPan>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <InfiniteBentoPanBase\n {...(componentProps as unknown as ComponentProps<typeof InfiniteBentoPanBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const InfiniteBentoPan = Interactive.withSchema({\n Component: InfiniteBentoPanInner,\n componentName: \"<InfiniteBentoPan>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 300+}diff --git a/registry-artifacts/elements/infinite-marquee.json b/registry-artifacts/elements/infinite-marquee.jsonnew file mode 100644index 00000000..62ab99c4--- /dev/null+++ b/registry-artifacts/elements/infinite-marquee.json@@ -0,0 +1,14 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": null,+ "displayName": "Infinite Marquee",+ "durationInFrames": 180,+ "installationMode": "component-owned-sequence",+ "slug": "infinite-marquee",+ "sourceCode": "import { Interactive, Sequence, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface InfiniteMarqueeProps {\n text?: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n pixelsPerFrame?: number;\n stroke?: boolean;\n strokeColor?: string;\n speed?: number;\n className?: string;\n}\n\nfunction InfiniteMarqueeBase({\n text = \"ship · build · animate · \",\n fontSize = 120,\n color = \"#171717\",\n fontWeight = 900,\n pixelsPerFrame = 4,\n stroke = false,\n strokeColor = \"#171717\",\n speed = 1,\n className,\n}: InfiniteMarqueeProps) {\n const frame = useCurrentFrame() * speed;\n\n const approxWidth = text.length * fontSize * 0.55;\n const offset = -((frame * pixelsPerFrame) % approxWidth);\n\n const spanStyle: React.CSSProperties = {\n fontSize,\n fontWeight,\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n color: stroke ? \"transparent\" : color,\n WebkitTextStroke: stroke ? `2px ${strokeColor}` : undefined,\n paddingRight: \"0.4em\",\n letterSpacing: \"-0.03em\",\n };\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n className={className}\n style={{\n display: \"flex\",\n whiteSpace: \"nowrap\",\n translate: `${offset}px`,\n }}\n >\n <span style={spanStyle}>{text}</span>\n <span style={spanStyle}>{text}</span>\n <span style={spanStyle}>{text}</span>\n </div>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"ship · build · animate · \",\n description: \"Text\",\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 240,\n step: 1,\n default: 120,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"700\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n pixelsPerFrame: {\n type: \"number\",\n min: 1,\n max: 30,\n step: 1,\n default: 4,\n description: \"Pixels / frame\",\n hiddenFromList: false,\n },\n stroke: {\n type: \"boolean\",\n default: false,\n description: \"Stroke\",\n },\n strokeColor: {\n type: \"color\",\n default: \"#171717\",\n description: \"Stroke color\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"fontSize\",\"color\",\"fontWeight\",\"pixelsPerFrame\",\"stroke\",\"strokeColor\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"ship · build · animate · \",\n fontSize: 120,\n color: \"#171717\",\n fontWeight: \"700\",\n pixelsPerFrame: 4,\n stroke: false,\n strokeColor: \"#171717\",\n speed: 1,\n};\n\ntype InfiniteMarqueeElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof InfiniteMarqueeBase>;\n\nconst InfiniteMarqueeInner = forwardRef<\n HTMLDivElement,\n InfiniteMarqueeElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<InfiniteMarquee>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <InfiniteMarqueeBase\n {...(componentProps as unknown as ComponentProps<typeof InfiniteMarqueeBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const InfiniteMarquee = Interactive.withSchema({\n Component: InfiniteMarqueeInner,\n componentName: \"<InfiniteMarquee>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 180+}diff --git a/registry-artifacts/elements/inline-highlight.json b/registry-artifacts/elements/inline-highlight.jsonnew file mode 100644index 00000000..1afd3b7d--- /dev/null+++ b/registry-artifacts/elements/inline-highlight.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 640,+ "height": 100+ },+ "displayName": "Inline Highlight",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "inline-highlight",+ "sourceCode": "import { Interactive, Sequence, interpolate, interpolateColors, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface InlineHighlightProps {\n before: string;\n highlight: string;\n after?: string;\n baseColor?: string;\n highlightColor?: string;\n fontSize?: number;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction InlineHighlightBase({\n before,\n highlight,\n after = \"\",\n baseColor = \"#171717\",\n highlightColor = \"#ff5e3a\",\n fontSize = 48,\n fontWeight = 600,\n speed = 1,\n className,\n}: InlineHighlightProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const progress = interpolate(\n frame,\n [durationInFrames * 0.2, durationInFrames * 0.7],\n [0, 1],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n\n const color = interpolateColors(\n progress,\n [0, 1],\n [baseColor, highlightColor],\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"white\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color: baseColor,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {before}\n <span style={{ color }}>{highlight}</span>\n {after}\n </span>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n before: {\n type: \"text-content\",\n default: \"Ship faster with \",\n description: \"Before\",\n },\n highlight: {\n type: \"text-content\",\n default: \"remocn\",\n description: \"Highlight\",\n },\n after: {\n type: \"text-content\",\n default: \".\",\n description: \"After\",\n },\n baseColor: {\n type: \"color\",\n default: \"#171717\",\n description: \"Base color\",\n },\n highlightColor: {\n type: \"color\",\n default: \"#ff5e3a\",\n description: \"Highlight color\",\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 640,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"before\",\"highlight\",\"after\",\"baseColor\",\"highlightColor\",\"fontSize\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n before: \"Ship faster with \",\n highlight: \"remocn\",\n after: \".\",\n baseColor: \"#171717\",\n highlightColor: \"#ff5e3a\",\n fontSize: 72,\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype InlineHighlightElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof InlineHighlightBase>;\n\nconst InlineHighlightInner = forwardRef<\n HTMLDivElement,\n InlineHighlightElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 640, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<InlineHighlight>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <InlineHighlightBase\n {...(componentProps as unknown as ComponentProps<typeof InlineHighlightBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const InlineHighlight = Interactive.withSchema({\n Component: InlineHighlightInner,\n componentName: \"<InlineHighlight>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/kinetic-center-build.json b/registry-artifacts/elements/kinetic-center-build.jsonnew file mode 100644index 00000000..c1a70955--- /dev/null+++ b/registry-artifacts/elements/kinetic-center-build.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 600,+ "height": 100+ },+ "displayName": "Kinetic Center Build",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "kinetic-center-build",+ "sourceCode": "import { forwardRef, useImperativeHandle, useMemo, useRef, type ComponentProps } from \"react\";\nimport { Easing, Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\ninterface KineticCenterBuildProps {\n text: string;\n entryOffset?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\nconst MEASURE_FONT =\n '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif';\n\nfunction measureWidths(\n words: string[],\n fontSize: number,\n fontWeight: number,\n): number[] {\n if (typeof document === \"undefined\") {\n return words.map((w) => w.length * fontSize * 0.55);\n }\n const ctx = document.createElement(\"canvas\").getContext(\"2d\");\n if (!ctx) return words.map((w) => w.length * fontSize * 0.55);\n ctx.font = `${fontWeight} ${fontSize}px ${MEASURE_FONT}`;\n return words.map((w) => ctx.measureText(w).width);\n}\n\nfunction KineticCenterBuildBase({\n text,\n entryOffset = 88,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: KineticCenterBuildProps) {\n const frame = useCurrentFrame() * speed;\n\n const words = useMemo(() => text.split(\" \"), [text]);\n const widths = useMemo(\n () => measureWidths(words, fontSize, fontWeight),\n [words, fontSize, fontWeight],\n );\n\n const gap = 10;\n const firstDur = 10;\n const pushDur = 13;\n const travelDur = 7;\n const entryScale = 0.992;\n const entryBlur = 3.5;\n const reflowBlur = 0.8;\n const firstWordY = 6;\n const easing = Easing.bezier(0.2, 0.8, 0.2, 1);\n\n const positionsAt = useMemo(() => {\n const out: number[][] = [];\n for (let k = 1; k <= words.length; k++) {\n let total = gap * (k - 1);\n for (let j = 0; j < k; j++) total += widths[j];\n let cursor = -total / 2;\n const xs: number[] = [];\n for (let j = 0; j < k; j++) {\n xs.push(cursor + widths[j] / 2);\n cursor += widths[j] + gap;\n }\n out.push(xs);\n }\n return out;\n }, [words, widths]);\n\n const n = words.length;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <div\n className={className}\n style={{\n position: \"relative\",\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: FONT_FAMILY,\n whiteSpace: \"nowrap\",\n }}\n >\n {words.map((word, j) => {\n const entryStart = j === 0 ? 0 : firstDur + (j - 1) * pushDur;\n const entryEnd = entryStart + (j === 0 ? firstDur : pushDur);\n const targetX = positionsAt[j][j];\n const xFrom = j === 0 ? 0 : targetX + entryOffset;\n\n let x = targetX;\n let opacity = 1;\n let scale = 1;\n let blur = 0;\n let y = 0;\n\n if (frame < entryStart) {\n opacity = 0;\n x = xFrom;\n scale = entryScale;\n blur = entryBlur;\n y = j === 0 ? firstWordY : 0;\n } else if (frame <= entryEnd) {\n const range: [number, number] = [entryStart, entryEnd];\n const travelRange: [number, number] = [\n entryStart,\n Math.min(entryStart + travelDur, entryEnd),\n ];\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n easing,\n };\n x = interpolate(frame, travelRange, [xFrom, targetX], opts);\n opacity = interpolate(frame, range, [0, 1], opts);\n scale = interpolate(frame, range, [entryScale, 1], opts);\n blur = interpolate(frame, range, [entryBlur, 0], opts);\n y =\n j === 0\n ? interpolate(frame, travelRange, [firstWordY, 0], opts)\n : 0;\n } else {\n for (let w = j + 1; w < n; w++) {\n const pushStart = firstDur + (w - 1) * pushDur;\n const pushEnd = pushStart + pushDur;\n const fromX = positionsAt[w - 1][j];\n const toX = positionsAt[w][j];\n if (frame >= pushEnd) {\n x = toX;\n } else if (frame >= pushStart) {\n x = interpolate(\n frame,\n [pushStart, Math.min(pushStart + travelDur, pushEnd)],\n [fromX, toX],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n },\n );\n blur = interpolate(\n frame,\n [pushStart, (pushStart + pushEnd) / 2, pushEnd],\n [0, reflowBlur, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n break;\n } else {\n x = fromX;\n break;\n }\n }\n }\n\n return (\n <span\n key={j}\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n whiteSpace: \"nowrap\",\n backfaceVisibility: \"hidden\",\n transform: `translate(-50%, -50%) translate3d(${x}px, ${y}px, 0) scale(${scale})`,\n filter: `blur(${blur}px)`,\n opacity,\n }}\n >\n {word}\n </span>\n );\n })}\n </div>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"Words push left.\",\n description: \"Text\",\n },\n entryOffset: {\n type: \"number\",\n min: 20,\n max: 160,\n step: 1,\n default: 88,\n description: \"Entry offset\",\n hiddenFromList: false,\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 600,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"entryOffset\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"Words push left.\",\n entryOffset: 88,\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype KineticCenterBuildElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof KineticCenterBuildBase>;\n\nconst KineticCenterBuildInner = forwardRef<\n HTMLDivElement,\n KineticCenterBuildElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 600, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<KineticCenterBuild>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <KineticCenterBuildBase\n {...(componentProps as unknown as ComponentProps<typeof KineticCenterBuildBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const KineticCenterBuild = Interactive.withSchema({\n Component: KineticCenterBuildInner,\n componentName: \"<KineticCenterBuild>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/kinetic-warp.json b/registry-artifacts/elements/kinetic-warp.jsonnew file mode 100644index 00000000..76e927ff--- /dev/null+++ b/registry-artifacts/elements/kinetic-warp.json@@ -0,0 +1,14 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": null,+ "displayName": "Kinetic Warp",+ "durationInFrames": 100,+ "installationMode": "component-owned-sequence",+ "slug": "kinetic-warp",+ "sourceCode": "import { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState, type ComponentProps } from \"react\";\nimport { Easing, Interactive, Sequence, continueRender, delayRender, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\ninterface KineticWarpProps {\n className?: string;\n compWidth?: number;\n compHeight?: number;\n textColor?: string;\n text?: string;\n fontFamily?: string;\n fontUrl?: string;\n fontWeight?: number;\n fontSize?: number;\n leading?: number;\n tracking?: number;\n layerScale?: number;\n positionX?: number;\n positionY?: number;\n meshRows?: number;\n meshColumns?: number;\n colRestX?: number;\n colRightX?: number;\n colLeftX?: number;\n rowRestY?: number;\n rowDownY?: number;\n rowUpY?: number;\n keyframeStride?: number;\n easingBezier?: [number, number, number, number];\n resampleStep?: number;\n}\n\nfunction monotoneSpline(xs: number[], ys: number[]): (x: number) => number {\n const n = xs.length;\n const dx: number[] = [];\n const secant: number[] = [];\n for (let i = 0; i < n - 1; i++) {\n dx.push(xs[i + 1] - xs[i]);\n secant.push((ys[i + 1] - ys[i]) / (xs[i + 1] - xs[i]));\n }\n\n const m: number[] = new Array(n);\n m[0] = secant[0];\n m[n - 1] = secant[n - 2];\n for (let i = 1; i < n - 1; i++) {\n m[i] = secant[i - 1] * secant[i] <= 0 ? 0 : (secant[i - 1] + secant[i]) / 2;\n }\n\n for (let i = 0; i < n - 1; i++) {\n if (secant[i] === 0) {\n m[i] = 0;\n m[i + 1] = 0;\n continue;\n }\n const a = m[i] / secant[i];\n const b = m[i + 1] / secant[i];\n const s = a * a + b * b;\n if (s > 9) {\n const t = 3 / Math.sqrt(s);\n m[i] = t * a * secant[i];\n m[i + 1] = t * b * secant[i];\n }\n }\n\n return (x: number) => {\n if (x <= xs[0]) return ys[0] + m[0] * (x - xs[0]);\n if (x >= xs[n - 1]) return ys[n - 1] + m[n - 1] * (x - xs[n - 1]);\n let i = n - 2;\n while (i > 0 && x < xs[i]) i--;\n const h = dx[i];\n const t = (x - xs[i]) / h;\n const t2 = t * t;\n const t3 = t2 * t;\n return (\n (2 * t3 - 3 * t2 + 1) * ys[i] +\n (t3 - 2 * t2 + t) * h * m[i] +\n (-2 * t3 + 3 * t2) * ys[i + 1] +\n (t3 - t2) * h * m[i + 1]\n );\n };\n}\n\nfunction KineticWarpBase({\n className,\n compWidth = 1920,\n compHeight = 1080,\n textColor = \"#FFFFFF\",\n text = \"REM\\nOCN\",\n fontFamily = \"sans-serif\",\n fontUrl = \"\",\n fontWeight = 700,\n fontSize = 107.1,\n leading = 70,\n tracking = -21,\n layerScale = 480,\n positionX = 960,\n positionY = 540,\n meshRows = 2,\n meshColumns = 4,\n colRestX = 960,\n colRightX = 1255,\n colLeftX = 678,\n rowRestY = 540,\n rowDownY = 850,\n rowUpY = 387,\n keyframeStride = 20,\n easingBezier = [0.3, 0.74, 0.09, 1],\n resampleStep = 4,\n}: KineticWarpProps) {\n const frame = useCurrentFrame();\n const canvasRef = useRef<HTMLCanvasElement | null>(null);\n const [fontReady, setFontReady] = useState(false);\n\n const scale = layerScale / 100;\n const pxSize = fontSize * scale;\n const pxLeading = leading * scale;\n const pxTracking = (tracking / 1000) * pxSize;\n\n useEffect(() => {\n const handle = delayRender(\"kinetic-warp: loading font\");\n let cancelled = false;\n const done = () => {\n if (!cancelled) setFontReady(true);\n continueRender(handle);\n };\n if (typeof document === \"undefined\" || !document.fonts) {\n done();\n return;\n }\n document.fonts\n .load(`${fontWeight} ${pxSize}px \"${fontFamily}\"`)\n .then(done, done);\n return () => {\n cancelled = true;\n };\n }, [fontFamily, fontWeight, pxSize]);\n\n const source = useMemo(() => {\n if (!fontReady || typeof document === \"undefined\") return null;\n const canvas = document.createElement(\"canvas\");\n canvas.width = compWidth;\n canvas.height = compHeight;\n const ctx = canvas.getContext(\"2d\");\n if (!ctx) return null;\n\n ctx.font = `${fontWeight} ${pxSize}px \"${fontFamily}\", sans-serif`;\n ctx.letterSpacing = `${pxTracking}px`;\n ctx.fillStyle = textColor;\n ctx.textAlign = \"left\";\n ctx.textBaseline = \"alphabetic\";\n\n const lines = text.split(\"\\n\");\n const metrics = lines.map((line) => ctx.measureText(line));\n\n const ascent = metrics[0].actualBoundingBoxAscent;\n const descent = metrics[metrics.length - 1].actualBoundingBoxDescent;\n const span = (lines.length - 1) * pxLeading;\n const firstBaseline = positionY - (span - ascent + descent) / 2;\n\n lines.forEach((line, i) => {\n const m = metrics[i];\n const x =\n positionX - (m.actualBoundingBoxRight - m.actualBoundingBoxLeft) / 2;\n ctx.fillText(line, x, firstBaseline + i * pxLeading);\n });\n\n return canvas;\n }, [\n compWidth,\n compHeight,\n text,\n fontFamily,\n fontWeight,\n pxSize,\n pxLeading,\n pxTracking,\n textColor,\n positionX,\n positionY,\n fontReady,\n ]);\n\n const scratch = useMemo(() => {\n if (typeof document === \"undefined\") return null;\n const canvas = document.createElement(\"canvas\");\n canvas.width = compWidth;\n canvas.height = compHeight;\n return canvas;\n }, [compWidth, compHeight]);\n\n const easing = Easing.bezier(...easingBezier);\n const stops = [0, 1, 2, 3, 4, 5].map((i) => i * keyframeStride);\n const clamp = {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n } as const;\n\n const colX = interpolate(\n frame,\n stops,\n [colRestX, colRightX, colRightX, colLeftX, colLeftX, colRestX],\n clamp,\n );\n const rowY = interpolate(\n frame,\n stops,\n [rowRestY, rowRestY, rowDownY, rowDownY, rowUpY, rowRestY],\n clamp,\n );\n\n useEffect(() => {\n const canvas = canvasRef.current;\n if (!canvas || !source || !scratch) return;\n const out = canvas.getContext(\"2d\");\n const mid = scratch.getContext(\"2d\");\n if (!out || !mid) return;\n\n const xs = Array.from(\n { length: meshColumns + 1 },\n (_, i) => (i * compWidth) / meshColumns,\n );\n const ys = Array.from(\n { length: meshRows + 1 },\n (_, i) => (i * compHeight) / meshRows,\n );\n const xd = xs.slice();\n const yd = ys.slice();\n xd[Math.round(meshColumns / 2)] = colX;\n yd[Math.round(meshRows / 2)] = rowY;\n\n const gx = monotoneSpline(xd, xs);\n const gy = monotoneSpline(yd, ys);\n\n mid.clearRect(0, 0, compWidth, compHeight);\n out.clearRect(0, 0, compWidth, compHeight);\n\n for (let d0 = 0; d0 < compWidth; d0 += resampleStep) {\n const d1 = Math.min(d0 + resampleStep, compWidth);\n const s0 = gx(d0);\n const sw = gx(d1) - s0;\n if (sw <= 0) continue;\n mid.drawImage(source, s0, 0, sw, compHeight, d0, 0, d1 - d0, compHeight);\n }\n\n for (let d0 = 0; d0 < compHeight; d0 += resampleStep) {\n const d1 = Math.min(d0 + resampleStep, compHeight);\n const s0 = gy(d0);\n const sh = gy(d1) - s0;\n if (sh <= 0) continue;\n out.drawImage(scratch, 0, s0, compWidth, sh, 0, d0, compWidth, d1 - d0);\n }\n }, [\n source,\n scratch,\n colX,\n rowY,\n compWidth,\n compHeight,\n meshRows,\n meshColumns,\n resampleStep,\n ]);\n\n return (\n <div\n className={className}\n style={{ position: \"absolute\", inset: 0, overflow: \"hidden\" }}\n >\n {fontUrl ? <link rel=\"stylesheet\" href={fontUrl} /> : null}\n <canvas\n ref={canvasRef}\n width={compWidth}\n height={compHeight}\n style={{ width: \"100%\", height: \"100%\", display: \"block\" }}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"REM\\nOCN\",\n description: \"Text\",\n },\n textColor: {\n type: \"color\",\n default: \"#FFFFFF\",\n description: \"Color\",\n },\n fontFamily: {\n type: \"text-content\",\n default: \"Passion One\",\n description: \"Font family\",\n },\n fontUrl: {\n type: \"text-content\",\n default: \"https://fonts.googleapis.com/css2?family=Passion+One:wght@400;700;900&display=block\",\n description: \"Font URL\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"700\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n fontSize: {\n type: \"number\",\n min: 40,\n max: 200,\n step: 0.1,\n default: 107.1,\n description: \"Font size\",\n hiddenFromList: false,\n },\n layerScale: {\n type: \"number\",\n min: 100,\n max: 800,\n step: 10,\n default: 480,\n description: \"Layer scale (%)\",\n hiddenFromList: false,\n },\n keyframeStride: {\n type: \"number\",\n min: 5,\n max: 40,\n step: 1,\n default: 20,\n description: \"Keyframe stride\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"textColor\",\"fontFamily\",\"fontUrl\",\"fontWeight\",\"fontSize\",\"layerScale\",\"keyframeStride\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"REM\\nOCN\",\n textColor: \"#FFFFFF\",\n fontFamily: \"Passion One\",\n fontUrl: \"https://fonts.googleapis.com/css2?family=Passion+One:wght@400;700;900&display=block\",\n fontWeight: \"700\",\n fontSize: 107.1,\n layerScale: 480,\n keyframeStride: 20,\n speed: 1,\n};\n\ntype KineticWarpElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof KineticWarpBase>;\n\nconst KineticWarpInner = forwardRef<\n HTMLDivElement,\n KineticWarpElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<KineticWarp>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <KineticWarpBase\n {...(componentProps as unknown as ComponentProps<typeof KineticWarpBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const KineticWarp = Interactive.withSchema({\n Component: KineticWarpInner,\n componentName: \"<KineticWarp>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 100+}diff --git a/registry-artifacts/elements/line-by-line-slide.json b/registry-artifacts/elements/line-by-line-slide.jsonnew file mode 100644index 00000000..133acd64--- /dev/null+++ b/registry-artifacts/elements/line-by-line-slide.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 600,+ "height": 200+ },+ "displayName": "Line-by-Line Slide",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "line-by-line-slide",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface LineByLineSlideProps {\n text: string;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction LineByLineSlideBase({\n text,\n distance = 48,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: LineByLineSlideProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const lines = text.split(\"\\n\");\n\n const enterDur = 27;\n const enterTravel = 14;\n const exitDur = 18;\n const exitTravelFrom = 8;\n const enterStagger = 4;\n const exitStagger = 2;\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterEnd = enterDur + (lines.length - 1) * enterStagger;\n const exitStart = Math.max(\n enterEnd,\n durationInFrames - exitDur - (lines.length - 1) * exitStagger,\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n lineHeight: 1.1,\n textAlign: \"left\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {lines.map((line, i) => {\n const enterLocal = frame - i * enterStagger;\n const exitLocal = frame - exitStart - i * exitStagger;\n\n const enterP = interpolate(enterLocal, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(exitLocal, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const xEnter = interpolate(\n enterLocal,\n [0, enterTravel],\n [-distance, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n },\n );\n\n const xExit = interpolate(\n exitLocal,\n [exitTravelFrom, exitDur],\n [0, distance],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n },\n );\n\n const x = xEnter + xExit;\n\n return (\n <span\n key={i}\n style={{\n display: \"block\",\n transformOrigin: \"0% 50%\",\n opacity,\n translate: `${x}px`,\n }}\n >\n {line}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"Think different.\\nDo more.\",\n description: \"Text\",\n },\n distance: {\n type: \"number\",\n min: 0,\n max: 160,\n step: 1,\n default: 48,\n description: \"Distance\",\n hiddenFromList: false,\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 600,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 200,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"distance\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"Think different.\\nDo more.\",\n distance: 48,\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype LineByLineSlideElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof LineByLineSlideBase>;\n\nconst LineByLineSlideInner = forwardRef<\n HTMLDivElement,\n LineByLineSlideElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 600, height = 200, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<LineByLineSlide>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <LineByLineSlideBase\n {...(componentProps as unknown as ComponentProps<typeof LineByLineSlideBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const LineByLineSlide = Interactive.withSchema({\n Component: LineByLineSlideInner,\n componentName: \"<LineByLineSlide>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/marker-highlight.json b/registry-artifacts/elements/marker-highlight.jsonnew file mode 100644index 00000000..85a5e811--- /dev/null+++ b/registry-artifacts/elements/marker-highlight.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 340,+ "height": 100+ },+ "displayName": "Marker Highlight",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "marker-highlight",+ "sourceCode": "import { Interactive, Sequence, interpolate, interpolateColors, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface MarkerHighlightProps {\n before?: string;\n highlight: string;\n after?: string;\n markerColor?: string;\n baseColor?: string;\n highlightedTextColor?: string;\n fontSize?: number;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction MarkerHighlightBase({\n before = \"\",\n highlight,\n after = \"\",\n markerColor = \"#facc15\",\n baseColor = \"#171717\",\n highlightedTextColor = \"#171717\",\n fontSize = 72,\n fontWeight = 600,\n speed = 1,\n className,\n}: MarkerHighlightProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const markerScale = spring({\n frame: frame - 15,\n fps,\n config: { damping: 14 },\n });\n\n const textColor = interpolateColors(\n interpolate(markerScale, [0.5, 0.8], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n }),\n [0, 1],\n [baseColor, highlightedTextColor],\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"white\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color: baseColor,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {before}\n <span style={{ position: \"relative\", display: \"inline-block\" }}>\n <span\n aria-hidden\n style={{\n position: \"absolute\",\n inset: \"0 -0.1em\",\n background: markerColor,\n transformOrigin: \"left center\",\n scale: `${markerScale} 1`,\n zIndex: 0,\n }}\n />\n <span style={{ position: \"relative\", zIndex: 1, color: textColor }}>\n {highlight}\n </span>\n </span>\n {after}\n </span>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n before: {\n type: \"text-content\",\n default: \"Made for \",\n description: \"Before\",\n },\n highlight: {\n type: \"text-content\",\n default: \"builders\",\n description: \"Highlight\",\n },\n after: {\n type: \"text-content\",\n default: \".\",\n description: \"After\",\n },\n markerColor: {\n type: \"color\",\n default: \"#facc15\",\n description: \"Marker color\",\n },\n baseColor: {\n type: \"color\",\n default: \"#171717\",\n description: \"Base color\",\n },\n highlightedTextColor: {\n type: \"color\",\n default: \"#171717\",\n description: \"Highlighted text color\",\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 340,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"before\",\"highlight\",\"after\",\"markerColor\",\"baseColor\",\"highlightedTextColor\",\"fontSize\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n before: \"Made for \",\n highlight: \"builders\",\n after: \".\",\n markerColor: \"#facc15\",\n baseColor: \"#171717\",\n highlightedTextColor: \"#171717\",\n fontSize: 72,\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype MarkerHighlightElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof MarkerHighlightBase>;\n\nconst MarkerHighlightInner = forwardRef<\n HTMLDivElement,\n MarkerHighlightElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 340, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<MarkerHighlight>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <MarkerHighlightBase\n {...(componentProps as unknown as ComponentProps<typeof MarkerHighlightBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const MarkerHighlight = Interactive.withSchema({\n Component: MarkerHighlightInner,\n componentName: \"<MarkerHighlight>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/mask-reveal-up.json b/registry-artifacts/elements/mask-reveal-up.jsonnew file mode 100644index 00000000..886ec035--- /dev/null+++ b/registry-artifacts/elements/mask-reveal-up.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 640,+ "height": 200+ },+ "displayName": "Mask Reveal Up",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "mask-reveal-up",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface MaskRevealUpProps {\n text: string;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction MaskRevealUpBase({\n text,\n distance = 30,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: MaskRevealUpProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const lines = text.split(\"\\n\");\n\n const enterDur = 23;\n const enterTravel = 11;\n const exitDur = 16;\n const exitTravelFrom = 8;\n const enterStagger = 3;\n const exitStagger = 2;\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterEnd = enterDur + (lines.length - 1) * enterStagger;\n const exitStart = Math.max(\n enterEnd,\n durationInFrames - exitDur - (lines.length - 1) * exitStagger,\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n lineHeight: 1.1,\n textAlign: \"center\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {lines.map((line, i) => {\n const enterLocal = frame - i * enterStagger;\n const exitLocal = frame - exitStart - i * exitStagger;\n\n const enterP = interpolate(enterLocal, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(exitLocal, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const yEnter = interpolate(\n enterLocal,\n [0, enterTravel],\n [distance, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n },\n );\n\n const yExit = interpolate(\n exitLocal,\n [exitTravelFrom, exitDur],\n [0, -22],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n },\n );\n\n const y = yEnter + yExit;\n\n const blurEnter = interpolate(enterLocal, [0, enterDur], [6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const blurExit = interpolate(exitLocal, [0, exitDur], [0, 6], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const blur = blurEnter + blurExit;\n\n return (\n <span\n key={i}\n style={{\n display: \"block\",\n transformOrigin: \"50% 50%\",\n opacity,\n translate: `0 ${y}px`,\n filter: `blur(${blur}px)`,\n }}\n >\n {line}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"Designed to move.\\nBuilt to focus.\",\n description: \"Text\",\n },\n distance: {\n type: \"number\",\n min: 0,\n max: 120,\n step: 1,\n default: 30,\n description: \"Distance\",\n hiddenFromList: false,\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 640,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 200,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"distance\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"Designed to move.\\nBuilt to focus.\",\n distance: 30,\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype MaskRevealUpElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof MaskRevealUpBase>;\n\nconst MaskRevealUpInner = forwardRef<\n HTMLDivElement,\n MaskRevealUpElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 640, height = 200, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<MaskRevealUp>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <MaskRevealUpBase\n {...(componentProps as unknown as ComponentProps<typeof MaskRevealUpBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const MaskRevealUp = Interactive.withSchema({\n Component: MaskRevealUpInner,\n componentName: \"<MaskRevealUp>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/matrix-decode.json b/registry-artifacts/elements/matrix-decode.jsonnew file mode 100644index 00000000..005e77a1--- /dev/null+++ b/registry-artifacts/elements/matrix-decode.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 340,+ "height": 100+ },+ "displayName": "Matrix Decode",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "matrix-decode",+ "sourceCode": "import { Interactive, Sequence, random, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface MatrixDecodeProps {\n text: string;\n charset?: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n revealDuration?: number;\n speed?: number;\n className?: string;\n}\n\nfunction MatrixDecodeBase({\n text,\n charset = \"!@#$%^&*()_+-=<>?/\\\\|\",\n fontSize = 72,\n color = \"#22c55e\",\n fontWeight = 600,\n revealDuration = 60,\n speed = 1,\n className,\n}: MatrixDecodeProps) {\n const frame = useCurrentFrame() * speed;\n // useVideoConfig kept for consistency with sibling primitives\n useVideoConfig();\n\n let output = \"\";\n for (let i = 0; i < text.length; i++) {\n const revealFrame = (i / Math.max(text.length, 1)) * revealDuration;\n if (text[i] === \" \") {\n output += \" \";\n } else if (frame >= revealFrame) {\n output += text[i];\n } else {\n const r = random(`${i}-${Math.floor(frame / 2)}`);\n const ch = charset[Math.floor(r * charset.length)];\n output += ch;\n }\n }\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"white\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"0.05em\",\n whiteSpace: \"pre\",\n fontFamily:\n \"var(--font-geist-mono), ui-monospace, SFMono-Regular, Menlo, monospace\",\n }}\n >\n {output}\n </span>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"DECRYPTED\",\n description: \"Text\",\n },\n charset: {\n type: \"text-content\",\n default: \"!@#$%^&*()_+-=<>?/\\\\|\",\n description: \"Charset\",\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#22c55e\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n revealDuration: {\n type: \"number\",\n min: 10,\n max: 240,\n step: 1,\n default: 60,\n description: \"Reveal duration\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 340,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"charset\",\"fontSize\",\"color\",\"fontWeight\",\"revealDuration\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"DECRYPTED\",\n charset: \"!@#$%^&*()_+-=<>?/\\\\|\",\n fontSize: 72,\n color: \"#22c55e\",\n fontWeight: \"600\",\n revealDuration: 60,\n speed: 1,\n};\n\ntype MatrixDecodeElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof MatrixDecodeBase>;\n\nconst MatrixDecodeInner = forwardRef<\n HTMLDivElement,\n MatrixDecodeElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 340, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<MatrixDecode>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <MatrixDecodeBase\n {...(componentProps as unknown as ComponentProps<typeof MatrixDecodeBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const MatrixDecode = Interactive.withSchema({\n Component: MatrixDecodeInner,\n componentName: \"<MatrixDecode>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/micro-scale-fade.json b/registry-artifacts/elements/micro-scale-fade.jsonnew file mode 100644index 00000000..910fe75c--- /dev/null+++ b/registry-artifacts/elements/micro-scale-fade.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 680,+ "height": 100+ },+ "displayName": "Micro Scale Fade",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "micro-scale-fade",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface MicroScaleFadeProps {\n text: string;\n scaleFrom?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction MicroScaleFadeBase({\n text,\n scaleFrom = 0.96,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: MicroScaleFadeProps) {\n const frame = useCurrentFrame() * speed;\n const easing = Easing.bezier(0.32, 0.72, 0, 1);\n\n const opacity = interpolate(frame, [0, 18], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n\n const scale = interpolate(frame, [0, 18], [scaleFrom, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity,\n scale: `${scale}`,\n }}\n >\n {text}\n </span>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"Welcome to motion.\",\n description: \"Text\",\n },\n scaleFrom: {\n type: \"number\",\n min: 0.8,\n max: 1,\n step: 0.01,\n default: 0.96,\n description: \"Scale from\",\n hiddenFromList: false,\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 680,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"scaleFrom\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"Welcome to motion.\",\n scaleFrom: 0.96,\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype MicroScaleFadeElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof MicroScaleFadeBase>;\n\nconst MicroScaleFadeInner = forwardRef<\n HTMLDivElement,\n MicroScaleFadeElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 680, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<MicroScaleFade>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <MicroScaleFadeBase\n {...(componentProps as unknown as ComponentProps<typeof MicroScaleFadeBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const MicroScaleFade = Interactive.withSchema({\n Component: MicroScaleFadeInner,\n componentName: \"<MicroScaleFade>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/per-character-rise.json b/registry-artifacts/elements/per-character-rise.jsonnew file mode 100644index 00000000..998bae18--- /dev/null+++ b/registry-artifacts/elements/per-character-rise.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 570,+ "height": 100+ },+ "displayName": "Per Character Rise",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "per-character-rise",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface PerCharacterRiseProps {\n text: string;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction PerCharacterRiseBase({\n text,\n distance = 32,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: PerCharacterRiseProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 21;\n const charTravelFrames = 10;\n const staggerFrames = 1;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerFrames;\n const easing = Easing.bezier(0.2, 0.8, 0.2, 1);\n const travelEasing = Easing.bezier(0.2, 0.8, 0.6, 0.85);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charTravelFrames], [distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: travelEasing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n translate: `0 ${y}px`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"One more thing.\",\n description: \"Text\",\n },\n distance: {\n type: \"number\",\n min: 0,\n max: 120,\n step: 1,\n default: 32,\n description: \"Distance\",\n hiddenFromList: false,\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 570,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"distance\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"One more thing.\",\n distance: 32,\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype PerCharacterRiseElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof PerCharacterRiseBase>;\n\nconst PerCharacterRiseInner = forwardRef<\n HTMLDivElement,\n PerCharacterRiseElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 570, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<PerCharacterRise>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <PerCharacterRiseBase\n {...(componentProps as unknown as ComponentProps<typeof PerCharacterRiseBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const PerCharacterRise = Interactive.withSchema({\n Component: PerCharacterRiseInner,\n componentName: \"<PerCharacterRise>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/per-word-crossfade.json b/registry-artifacts/elements/per-word-crossfade.jsonnew file mode 100644index 00000000..24cf8df7--- /dev/null+++ b/registry-artifacts/elements/per-word-crossfade.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 720,+ "height": 100+ },+ "displayName": "Per-Word Crossfade",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "per-word-crossfade",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface PerWordCrossfadeProps {\n fromText: string;\n toText: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction PerWordCrossfadeBase({\n fromText,\n toText,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: PerWordCrossfadeProps) {\n const frame = useCurrentFrame() * speed;\n\n const fromWords = fromText.split(\" \");\n const toWords = toText.split(\" \");\n\n const enterDur = 21;\n const enterTravel = 5;\n const exitDur = 15;\n const exitTravelFrom = 6;\n const enterStagger = 2;\n const exitStagger = 1;\n const overlapF = 5;\n const microDelayF = 2;\n\n const enterEasing = Easing.bezier(0.16, 1, 0.3, 1);\n const exitEasing = Easing.bezier(0.7, 0, 0.84, 0);\n\n const exitTotal = exitDur + (fromWords.length - 1) * exitStagger;\n const newStart = Math.max(0, exitTotal - overlapF + microDelayF);\n\n const fontStack =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"transparent\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n }}\n >\n {fromWords.map((word, i) => {\n const local = frame - i * exitStagger;\n const opacity = interpolate(local, [0, exitDur], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n const y = interpolate(local, [exitTravelFrom, exitDur], [0, -6], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 55%\",\n opacity,\n translate: `0 ${y}px`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n }}\n >\n {toWords.map((word, j) => {\n const local = frame - newStart - j * enterStagger;\n const opacity = interpolate(local, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const y = interpolate(local, [0, enterTravel], [8, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n return (\n <span\n key={j}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 55%\",\n opacity,\n translate: `0 ${y}px`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n fromText: {\n type: \"text-content\",\n default: \"Beautifully simple.\",\n description: \"From text\",\n },\n toText: {\n type: \"text-content\",\n default: \"Designed for focus.\",\n description: \"To text\",\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 720,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"fromText\",\"toText\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n fromText: \"Beautifully simple.\",\n toText: \"Designed for focus.\",\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype PerWordCrossfadeElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof PerWordCrossfadeBase>;\n\nconst PerWordCrossfadeInner = forwardRef<\n HTMLDivElement,\n PerWordCrossfadeElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 720, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<PerWordCrossfade>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <PerWordCrossfadeBase\n {...(componentProps as unknown as ComponentProps<typeof PerWordCrossfadeBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const PerWordCrossfade = Interactive.withSchema({\n Component: PerWordCrossfadeInner,\n componentName: \"<PerWordCrossfade>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/perspective-marquee.json b/registry-artifacts/elements/perspective-marquee.jsonnew file mode 100644index 00000000..a5a8dd48--- /dev/null+++ b/registry-artifacts/elements/perspective-marquee.json@@ -0,0 +1,14 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": null,+ "displayName": "Perspective Marquee",+ "durationInFrames": 240,+ "installationMode": "component-owned-sequence",+ "slug": "perspective-marquee",+ "sourceCode": "import { Interactive, Sequence, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface PerspectiveMarqueeProps {\n items?: string[];\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n pixelsPerFrame?: number;\n rotateY?: number;\n rotateX?: number;\n perspective?: number;\n fadeColor?: string;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\nconst DEFAULT_ITEMS = [\n \"Vercel\",\n \"Linear\",\n \"Stripe\",\n \"Figma\",\n \"Notion\",\n \"Raycast\",\n \"Arc\",\n \"Cursor\",\n];\n\nfunction PerspectiveMarqueeBase({\n items = DEFAULT_ITEMS,\n fontSize = 84,\n color = \"#fafafa\",\n fontWeight = 700,\n pixelsPerFrame = 2,\n rotateY = -28,\n rotateX = 8,\n perspective = 1200,\n fadeColor = \"#050505\",\n speed = 1,\n className,\n}: PerspectiveMarqueeProps) {\n const frame = useCurrentFrame() * speed;\n\n // Approximate width of one full item set so the modulo wraps cleanly.\n const itemPadding = fontSize * 0.9;\n const approxItemWidth = items.reduce(\n (acc, item) => acc + item.length * fontSize * 0.6 + itemPadding,\n 0,\n );\n\n const offset = -((frame * pixelsPerFrame) % approxItemWidth);\n\n // Render the row 3x so the loop is seamless even when rotated in 3D.\n const rendered = [...items, ...items, ...items];\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n perspective: `${perspective}px`,\n }}\n >\n <div\n style={{\n width: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n transform: `rotateX(${rotateX}deg) rotateY(${rotateY}deg)`,\n transformStyle: \"preserve-3d\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n whiteSpace: \"nowrap\",\n translate: `${offset}px`,\n }}\n >\n {rendered.map((item, i) => {\n // Approximate this item's center X (relative to the marquee row,\n // including the rolling offset). Used to dial in depth-of-field blur\n // and opacity by horizontal position on screen.\n const itemCenter =\n i * (approxItemWidth / items.length) +\n approxItemWidth / items.length / 2 +\n offset;\n // Normalize roughly to [-1, 1] across a 1280px viewport.\n const norm = (itemCenter - 640) / 640;\n const distance = Math.min(1, Math.abs(norm));\n const blurPx = distance * 6;\n const opacity = 1 - distance * 0.4;\n\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n fontFamily: FONT_FAMILY,\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n paddingRight: itemPadding,\n filter: `blur(${blurPx}px)`,\n opacity,\n }}\n >\n {item}\n </span>\n );\n })}\n </div>\n </div>\n\n {/* Vignette to fade marquee edges into background */}\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n pointerEvents: \"none\",\n background: `linear-gradient(90deg, ${fadeColor} 0%, transparent 18%, transparent 82%, ${fadeColor} 100%)`,\n }}\n />\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n pointerEvents: \"none\",\n background: `linear-gradient(180deg, ${fadeColor} 0%, transparent 25%, transparent 75%, ${fadeColor} 100%)`,\n }}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n fontSize: {\n type: \"number\",\n min: 24,\n max: 200,\n step: 2,\n default: 84,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#fafafa\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"700\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n pixelsPerFrame: {\n type: \"number\",\n min: 0.25,\n max: 10,\n step: 0.25,\n default: 2,\n description: \"Pixels / frame\",\n hiddenFromList: false,\n },\n rotateY: {\n type: \"number\",\n min: -60,\n max: 60,\n step: 1,\n default: -28,\n description: \"Rotate Y (deg)\",\n hiddenFromList: false,\n },\n rotateX: {\n type: \"number\",\n min: -30,\n max: 30,\n step: 1,\n default: 8,\n description: \"Rotate X (deg)\",\n hiddenFromList: false,\n },\n perspective: {\n type: \"number\",\n min: 400,\n max: 3000,\n step: 50,\n default: 1200,\n description: \"Perspective\",\n hiddenFromList: false,\n },\n fadeColor: {\n type: \"color\",\n default: \"#050505\",\n description: \"Fade color\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"fontSize\",\"color\",\"fontWeight\",\"pixelsPerFrame\",\"rotateY\",\"rotateX\",\"perspective\",\"fadeColor\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n fontSize: 84,\n color: \"#fafafa\",\n fontWeight: \"700\",\n pixelsPerFrame: 2,\n rotateY: -28,\n rotateX: 8,\n perspective: 1200,\n fadeColor: \"#050505\",\n speed: 1,\n};\n\ntype PerspectiveMarqueeElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof PerspectiveMarqueeBase>;\n\nconst PerspectiveMarqueeInner = forwardRef<\n HTMLDivElement,\n PerspectiveMarqueeElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<PerspectiveMarquee>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <PerspectiveMarqueeBase\n {...(componentProps as unknown as ComponentProps<typeof PerspectiveMarqueeBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const PerspectiveMarquee = Interactive.withSchema({\n Component: PerspectiveMarqueeInner,\n componentName: \"<PerspectiveMarquee>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 240+}diff --git a/registry-artifacts/elements/perspective-squeeze.json b/registry-artifacts/elements/perspective-squeeze.jsonnew file mode 100644index 00000000..802594a3--- /dev/null+++ b/registry-artifacts/elements/perspective-squeeze.json@@ -0,0 +1,14 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": null,+ "displayName": "Perspective Squeeze",+ "durationInFrames": 225,+ "installationMode": "component-owned-sequence",+ "slug": "perspective-squeeze",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ntype Corners = [\n [number, number],\n [number, number],\n [number, number],\n [number, number],\n];\n\ninterface PerspectiveSqueezeProps {\n className?: string;\n width?: number;\n height?: number;\n blockWidth?: number;\n blockHeight?: number;\n lowerBlockPosition?: [number, number];\n upperBlockPosition?: [number, number];\n cornersRest?: Corners;\n cornerKeyframes?: number[];\n upperCornersMid?: Corners;\n upperCornersEnd?: Corners;\n lowerCornersMid?: Corners;\n lowerCornersEnd?: Corners;\n upperText?: string;\n lowerText?: string;\n upperFontFamily?: string;\n lowerFontFamily?: string;\n upperFontSize?: number;\n lowerFontSize?: number;\n capRatio?: number;\n lineGap?: number;\n scaleKeyframes?: number[];\n lowerScaleY?: number[];\n upperScaleY?: number[];\n fill?: string;\n}\n\nfunction cornerPinMatrix(src: Corners, dst: Corners): string {\n const a: number[][] = [];\n const rhs: number[] = [];\n\n for (let i = 0; i < 4; i++) {\n const [x, y] = src[i];\n const [u, v] = dst[i];\n a.push([x, y, 1, 0, 0, 0, -u * x, -u * y]);\n rhs.push(u);\n a.push([0, 0, 0, x, y, 1, -v * x, -v * y]);\n rhs.push(v);\n }\n\n const n = 8;\n for (let col = 0; col < n; col++) {\n let pivot = col;\n for (let r = col + 1; r < n; r++) {\n if (Math.abs(a[r][col]) > Math.abs(a[pivot][col])) pivot = r;\n }\n [a[col], a[pivot]] = [a[pivot], a[col]];\n [rhs[col], rhs[pivot]] = [rhs[pivot], rhs[col]];\n\n const d = a[col][col];\n if (Math.abs(d) < 1e-12) continue;\n for (let c = col; c < n; c++) a[col][c] /= d;\n rhs[col] /= d;\n\n for (let r = 0; r < n; r++) {\n if (r === col) continue;\n const f = a[r][col];\n if (f === 0) continue;\n for (let c = col; c < n; c++) a[r][c] -= f * a[col][c];\n rhs[r] -= f * rhs[col];\n }\n }\n\n const [m0, m1, m2, m3, m4, m5, m6, m7] = rhs;\n return `matrix3d(${m0}, ${m3}, 0, ${m6}, ${m1}, ${m4}, 0, ${m7}, 0, 0, 1, 0, ${m2}, ${m5}, 0, 1)`;\n}\n\nfunction lerpCorners(from: Corners, to: Corners, t: number): Corners {\n return from.map((p, i) => [\n p[0] + (to[i][0] - p[0]) * t,\n p[1] + (to[i][1] - p[1]) * t,\n ]) as Corners;\n}\n\nfunction PerspectiveSqueezeBase({\n className,\n width = 1920,\n height = 1080,\n blockWidth = 990,\n blockHeight = 546,\n lowerBlockPosition = [960, 860],\n upperBlockPosition = [960, 314],\n cornersRest = [\n [0, 0],\n [990, 0],\n [0, 546],\n [990, 546],\n ],\n cornerKeyframes = [0, 45, 70],\n upperCornersMid = [\n [0, -326],\n [990, 0],\n [0, 546],\n [990, 546],\n ],\n upperCornersEnd = [\n [0, 352],\n [990, -428],\n [460, 546],\n [990, 546],\n ],\n lowerCornersMid = [\n [0, 0],\n [990, 0],\n [0, 225],\n [990, 546],\n ],\n lowerCornersEnd = [\n [0, 0],\n [990, 0],\n [0, 897],\n [990, 116],\n ],\n upperText = \"REMOCN\",\n lowerText = \"BEST\",\n upperFontFamily = \"sans-serif\",\n lowerFontFamily = \"sans-serif\",\n upperFontSize = 603,\n lowerFontSize = 124,\n capRatio = 0.65,\n lineGap = 50,\n scaleKeyframes = [0, 60, 118, 161, 196, 225],\n lowerScaleY = [100, 384.8, 270, 330, 150, 100],\n upperScaleY = [100, 35.8, 64, 45, 110, 100],\n fill = \"#ffffff\",\n}: PerspectiveSqueezeProps) {\n const frame = useCurrentFrame();\n const { width: compWidth, height: compHeight } = useVideoConfig();\n const stageScale = Math.min(compWidth / width, compHeight / height);\n\n const squishEase = Easing.bezier(0.6, 0, 0.4, 1);\n\n const scaleAt = (track: number[]) =>\n interpolate(frame, scaleKeyframes, track, {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: squishEase,\n }) / 100;\n\n const cornersAt = (mid: Corners, end: Corners): Corners => {\n const [k0, k1, k2] = cornerKeyframes;\n if (frame <= k0) return cornersRest;\n if (frame >= k2) return end;\n if (frame <= k1) {\n return lerpCorners(\n cornersRest,\n mid,\n squishEase((frame - k0) / Math.max(k1 - k0, 1)),\n );\n }\n return lerpCorners(\n mid,\n end,\n squishEase((frame - k1) / Math.max(k2 - k1, 1)),\n );\n };\n\n const upperScale = scaleAt(upperScaleY);\n const lowerScale = scaleAt(lowerScaleY);\n\n const upperBoxHeight = upperFontSize * capRatio * upperScale;\n const lowerBoxHeight = lowerFontSize * capRatio * lowerScale;\n const stackTop =\n (blockHeight - (upperBoxHeight + lineGap + lowerBoxHeight)) / 2;\n const upperBaseline = stackTop + upperBoxHeight;\n const lowerBaseline = upperBaseline + lineGap + lowerBoxHeight;\n\n const line = (\n text: string,\n family: string,\n size: number,\n baseline: number,\n scale: number,\n ) => (\n <text\n x={0}\n y={baseline}\n textLength={blockWidth}\n lengthAdjust=\"spacingAndGlyphs\"\n fontFamily={family}\n fontSize={size}\n fontWeight={800}\n fill={fill}\n transform={`matrix(1, 0, 0, ${scale}, 0, ${baseline * (1 - scale)})`}\n >\n {text}\n </text>\n );\n\n const block = (corners: Corners, position: [number, number]) => (\n <div\n style={{\n position: \"absolute\",\n left: position[0] - blockWidth / 2,\n top: position[1] - blockHeight / 2,\n width: blockWidth,\n height: blockHeight,\n transformOrigin: \"0 0\",\n transform: cornerPinMatrix(cornersRest, corners),\n }}\n >\n <svg\n width={blockWidth}\n height={blockHeight}\n viewBox={`0 0 ${blockWidth} ${blockHeight}`}\n style={{ display: \"block\", overflow: \"hidden\" }}\n >\n {line(\n upperText,\n upperFontFamily,\n upperFontSize,\n upperBaseline,\n upperScale,\n )}\n {line(\n lowerText,\n lowerFontFamily,\n lowerFontSize,\n lowerBaseline,\n lowerScale,\n )}\n </svg>\n </div>\n );\n\n return (\n <div\n className={className}\n style={{ position: \"absolute\", inset: 0, overflow: \"hidden\" }}\n >\n <div\n style={{\n position: \"absolute\",\n left: (compWidth - width * stageScale) / 2,\n top: (compHeight - height * stageScale) / 2,\n width,\n height,\n scale: `${stageScale}`,\n transformOrigin: \"0 0\",\n }}\n >\n {block(cornersAt(upperCornersMid, upperCornersEnd), upperBlockPosition)}\n {block(cornersAt(lowerCornersMid, lowerCornersEnd), lowerBlockPosition)}\n </div>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n upperText: {\n type: \"text-content\",\n default: \"REMOCN\",\n description: \"Upper line\",\n },\n lowerText: {\n type: \"text-content\",\n default: \"BEST\",\n description: \"Lower line\",\n },\n fill: {\n type: \"color\",\n default: \"#f2f2f2\",\n description: \"Fill\",\n },\n upperFontFamily: {\n type: \"text-content\",\n default: \"Impact, 'Arial Narrow', sans-serif\",\n description: \"Upper font\",\n },\n lowerFontFamily: {\n type: \"text-content\",\n default: \"Impact, 'Arial Narrow', sans-serif\",\n description: \"Lower font\",\n },\n lineGap: {\n type: \"number\",\n min: 0,\n max: 120,\n step: 2,\n default: 50,\n description: \"Line gap\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"upperText\",\"lowerText\",\"fill\",\"upperFontFamily\",\"lowerFontFamily\",\"lineGap\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n upperText: \"REMOCN\",\n lowerText: \"BEST\",\n fill: \"#f2f2f2\",\n upperFontFamily: \"Impact, 'Arial Narrow', sans-serif\",\n lowerFontFamily: \"Impact, 'Arial Narrow', sans-serif\",\n lineGap: 50,\n speed: 1,\n};\n\ntype PerspectiveSqueezeElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof PerspectiveSqueezeBase>;\n\nconst PerspectiveSqueezeInner = forwardRef<\n HTMLDivElement,\n PerspectiveSqueezeElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<PerspectiveSqueeze>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <PerspectiveSqueezeBase\n {...(componentProps as unknown as ComponentProps<typeof PerspectiveSqueezeBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const PerspectiveSqueeze = Interactive.withSchema({\n Component: PerspectiveSqueezeInner,\n componentName: \"<PerspectiveSqueeze>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 225+}diff --git a/registry-artifacts/elements/pixelate-region.json b/registry-artifacts/elements/pixelate-region.jsonnew file mode 100644index 00000000..41c2292d--- /dev/null+++ b/registry-artifacts/elements/pixelate-region.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/transitions",+ "version": null+ }+ ],+ "dimensions": null,+ "displayName": "Pixelate Region",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "pixelate-region",+ "sourceCode": "import { AbsoluteFill, Interactive, Sequence, isHtmlInCanvasSupported, useCurrentFrame, useDelayRender, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport React, { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\nimport { type TransitionPresentation, type TransitionPresentationComponentProps } from \"@remotion/transitions\";\n\nconst QUAD = new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]);\n\nconst VERTEX_SHADER = `#version 300 es\nin vec2 a_pos;\nout vec2 v_uv;\nvoid main() {\n v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);\n gl_Position = vec4(a_pos, 0.0, 1.0);\n}`;\n\nconst LAYER: React.CSSProperties = {\n position: \"absolute\",\n inset: 0,\n width: \"100%\",\n height: \"100%\",\n};\n\nconst OUTPUT_LAYER: React.CSSProperties = { ...LAYER, pointerEvents: \"none\" };\n\nconst isCanvasTransitionSupported = (): boolean =>\n isHtmlInCanvasSupported();\n\nconst isCanvasFilterSupported = (): boolean => isHtmlInCanvasSupported();\n\ntype SceneShaderFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderDrawParams<Props> = {\n from: OffscreenCanvas | null;\n to: OffscreenCanvas | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderInstance<Props> = {\n draw: (params: SceneShaderDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneShader<Props> = (\n canvas: OffscreenCanvas,\n) => SceneShaderInstance<Props>;\n\ntype SceneFilterFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterDrawParams<Props> = {\n scene: OffscreenCanvas | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterInstance<Props> = {\n draw: (params: SceneFilterDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneFilter<Props> = (\n canvas: OffscreenCanvas,\n) => SceneFilterInstance<Props>;\n\nfunction compileShader(\n gl: WebGL2RenderingContext,\n source: string,\n type: GLenum,\n): WebGLShader {\n const shader = gl.createShader(type);\n if (!shader) {\n throw new Error(\"canvas-presentation: failed to create shader\");\n }\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n const log = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error(`canvas-presentation: failed to compile shader: ${log}`);\n }\n return shader;\n}\n\nfunction createProgram(\n gl: WebGL2RenderingContext,\n fragment: string,\n): WebGLProgram {\n const program = gl.createProgram();\n if (!program) {\n throw new Error(\"canvas-presentation: failed to create program\");\n }\n const vs = compileShader(gl, VERTEX_SHADER, gl.VERTEX_SHADER);\n const fs = compileShader(gl, fragment, gl.FRAGMENT_SHADER);\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n gl.deleteShader(vs);\n gl.deleteShader(fs);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n const log = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n throw new Error(`canvas-presentation: failed to link program: ${log}`);\n }\n return program;\n}\n\nfunction createSceneTexture(gl: WebGL2RenderingContext): WebGLTexture {\n const texture = gl.createTexture();\n if (!texture) {\n throw new Error(\"canvas-presentation: failed to create texture\");\n }\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n 1,\n 1,\n 0,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n new Uint8Array([0, 0, 0, 0]),\n );\n return texture;\n}\n\nfunction createQuadSurface(canvas: OffscreenCanvas, fragment: string) {\n const gl = canvas.getContext(\"webgl2\", { premultipliedAlpha: true });\n if (!gl) {\n throw new Error(\"canvas-presentation: WebGL2 is unavailable\");\n }\n\n const program = createProgram(gl, fragment);\n const vao = gl.createVertexArray();\n gl.bindVertexArray(vao);\n const buffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, QUAD, gl.STATIC_DRAW);\n const aPos = gl.getAttribLocation(program, \"a_pos\");\n gl.enableVertexAttribArray(aPos);\n gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 0, 0);\n\n const locations = new Map<string, WebGLUniformLocation | null>();\n const uniform = (name: string) => {\n const cached = locations.get(name);\n if (cached !== undefined) {\n return cached;\n }\n const location = gl.getUniformLocation(program, name);\n locations.set(name, location);\n return location;\n };\n\n const clear = () => {\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n };\n\n const textures: WebGLTexture[] = [];\n const createTexture = () => {\n const texture = createSceneTexture(gl);\n textures.push(texture);\n return texture;\n };\n\n const begin = (width: number, height: number) => {\n gl.viewport(0, 0, width, height);\n clear();\n gl.useProgram(program);\n gl.bindVertexArray(vao);\n };\n\n const bindScene = (\n image: OffscreenCanvas | null,\n texture: WebGLTexture,\n unit: number,\n name: string,\n ) => {\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n if (image) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n image,\n );\n }\n gl.uniform1i(uniform(name), unit);\n };\n\n const draw = () => gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n\n const cleanup = () => {\n gl.deleteProgram(program);\n for (const texture of textures) {\n gl.deleteTexture(texture);\n }\n gl.deleteBuffer(buffer);\n gl.deleteVertexArray(vao);\n };\n\n return {\n gl,\n uniform,\n clear,\n createTexture,\n begin,\n bindScene,\n draw,\n cleanup,\n };\n}\n\nfunction makeSceneShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneShaderFrame<Props>) => void,\n): SceneShader<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const fromTexture = surface.createTexture();\n const toTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ from, to, width, height, progress, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(from, fromTexture, 0, \"u_from\");\n surface.bindScene(to, toTexture, 1, \"u_to\");\n\n surface.gl.uniform1f(surface.uniform(\"u_progress\"), progress);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n progress,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nfunction makeFilterShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneFilterFrame<Props>) => void,\n): SceneFilter<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const sceneTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ scene, width, height, frame, time, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(scene, sceneTexture, 0, \"u_scene\");\n\n surface.gl.uniform1f(surface.uniform(\"u_frame\"), frame);\n surface.gl.uniform1f(surface.uniform(\"u_time\"), time);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n frame,\n time,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nconst transferred = new WeakMap<HTMLCanvasElement, OffscreenCanvas>();\n\nfunction takeOffscreen(canvas: HTMLCanvasElement): OffscreenCanvas {\n const existing = transferred.get(canvas);\n if (existing) {\n return existing;\n }\n const created = canvas.transferControlToOffscreen();\n transferred.set(canvas, created);\n return created;\n}\n\nfunction makeCanvasComponent<Props extends Record<string, unknown>>(\n shader: SceneShader<Props>,\n): React.FC<TransitionPresentationComponentProps<Props>> {\n return function CanvasScenePresentation({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n onElementImage,\n onUnmount,\n bothEnteringAndExiting,\n }) {\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneShaderInstance<Props> | null>(null);\n const passedPropsRef = React.useRef(passedProps);\n passedPropsRef.current = passedProps;\n const onElementImageRef = React.useRef(onElementImage);\n onElementImageRef.current = onElementImage;\n const onUnmountRef = React.useRef(onUnmount);\n onUnmountRef.current = onUnmount;\n\n const { delayRender, continueRender } = useDelayRender();\n const passThrough =\n bothEnteringAndExiting && presentationDirection === \"exiting\";\n\n const drawRef = React.useRef<\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => void\n >(() => undefined);\n drawRef.current = (prevImage, nextImage, progress) => {\n const instance = instanceRef.current;\n if (!instance) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: paint\");\n const to = prevImage;\n const from = nextImage;\n const width = from?.width ?? to?.width ?? 0;\n const height = from?.height ?? to?.height ?? 0;\n if (width === 0 || height === 0) {\n instance.clear();\n continueRender(handle);\n return;\n }\n instance.draw({\n from,\n to,\n width,\n height,\n progress: !to ? 0 : !from ? 1 : progress,\n passedProps: passedPropsRef.current,\n });\n continueRender(handle);\n };\n\n const draw = React.useCallback(\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => drawRef.current(prevImage, nextImage, progress),\n [],\n );\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [passThrough, shader]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n if (!scene || !capture || !context) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n onElementImageRef.current(capture, draw);\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, [passThrough, draw]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, [passThrough]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: presentationProgress is the intentional trigger — a new progress value is what schedules the next paint\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n layoutRef.current?.requestPaint?.();\n }, [passThrough, presentationProgress]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n return () => onUnmountRef.current();\n }, [passThrough]);\n\n if (passThrough) {\n return <>{children}</>;\n }\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasFilterProps = {\n children: React.ReactNode;\n};\n\nfunction makeFilterComponent<Props extends Record<string, unknown>>(\n shader: SceneFilter<Props>,\n): React.FC<Props & CanvasFilterProps> {\n return function CanvasSceneFilter(props) {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const { delayRender, continueRender } = useDelayRender();\n\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneFilterInstance<Props> | null>(null);\n\n const passedPropsRef = React.useRef(props);\n passedPropsRef.current = props;\n const frameRef = React.useRef(frame);\n frameRef.current = frame;\n const timeRef = React.useRef(frame / fps);\n timeRef.current = frame / fps;\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [shader]);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n const instance = instanceRef.current;\n if (!scene || !capture || !context || !instance) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n if (capture.width === 0 || capture.height === 0) {\n instance.clear();\n return;\n }\n instance.draw({\n scene: capture,\n width: capture.width,\n height: capture.height,\n frame: frameRef.current,\n time: timeRef.current,\n passedProps: passedPropsRef.current,\n });\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: filter paint\");\n const settle = () => continueRender(handle);\n layout.addEventListener(\"paint\", settle, { once: true });\n layout.requestPaint?.();\n return () => {\n layout.removeEventListener(\"paint\", settle);\n continueRender(handle);\n };\n });\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {props.children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasPresentationOptions<Props extends Record<string, unknown>> = {\n shader: SceneShader<Props>;\n fallback: React.FC<TransitionPresentationComponentProps<Props>>;\n};\n\nfunction makeCanvasPresentation<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasPresentationOptions<Props>): (\n props: Props,\n) => TransitionPresentation<Props> {\n const Canvas = makeCanvasComponent(shader);\n\n const Presentation: React.FC<TransitionPresentationComponentProps<Props>> = (\n props,\n ) =>\n isCanvasTransitionSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n\n return (props) => ({ component: Presentation, props });\n}\n\ntype CanvasFilterOptions<Props extends Record<string, unknown>> = {\n shader: SceneFilter<Props>;\n fallback: React.FC<Props & CanvasFilterProps>;\n};\n\nfunction makeCanvasFilter<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasFilterOptions<Props>): React.FC<Props & CanvasFilterProps> {\n const Canvas = makeFilterComponent(shader);\n\n return function CanvasFilter(props) {\n return isCanvasFilterSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n };\n}\n\ntype PixelateRect = {\n x: number;\n y: number;\n width: number;\n height: number;\n};\n\ntype PixelateRegionProps = {\n regions: PixelateRect[];\n cellSize?: number;\n};\n\nconst MAX_REGIONS = 8;\n\nconst DEFAULTS = {\n cellSize: 24,\n};\n\ntype NormalizedProps = {\n rects: PixelateRect[];\n cellX: number;\n cellY: number;\n};\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_scene;\nuniform vec4 u_regions[${MAX_REGIONS}];\nuniform int u_region_count;\nuniform vec2 u_cell;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst int TAPS = 3;\n\nvec4 cellAverage(vec2 center, vec2 cell) {\n vec4 sum = vec4(0.0);\n for (int y = 0; y < TAPS; y++) {\n for (int x = 0; x < TAPS; x++) {\n vec2 offset =\n (vec2(float(x), float(y)) + 0.5) / float(TAPS) - 0.5;\n sum += texture(u_scene, center + offset * cell);\n }\n }\n return sum / float(TAPS * TAPS);\n}\n\nvoid main() {\n vec4 result = texture(u_scene, v_uv);\n vec2 cell = max(u_cell, vec2(0.0005));\n\n for (int i = 0; i < ${MAX_REGIONS}; i++) {\n if (i >= u_region_count) {\n continue;\n }\n vec4 region = u_regions[i];\n vec2 lo = region.xy;\n vec2 hi = region.xy + region.zw;\n vec2 hit = step(lo, v_uv) * step(v_uv, hi);\n if (hit.x * hit.y < 0.5) {\n continue;\n }\n vec2 center = lo + (floor((v_uv - lo) / cell) + 0.5) * cell;\n result = vec4(cellAverage(center, cell).rgb, 1.0);\n }\n\n outColor = result;\n}`;\n\nconst shader = makeFilterShader<NormalizedProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, passedProps }) => {\n const { rects, cellX, cellY } = passedProps;\n const packed = new Float32Array(MAX_REGIONS * 4);\n const count = Math.min(rects.length, MAX_REGIONS);\n for (let i = 0; i < count; i++) {\n const rect = rects[i];\n packed[i * 4] = rect.x;\n packed[i * 4 + 1] = rect.y;\n packed[i * 4 + 2] = rect.width;\n packed[i * 4 + 3] = rect.height;\n }\n gl.uniform4fv(uniform(\"u_regions[0]\"), packed);\n gl.uniform1i(uniform(\"u_region_count\"), count);\n gl.uniform2f(uniform(\"u_cell\"), cellX, cellY);\n },\n);\n\nconst PixelateRegionFallback: React.FC<NormalizedProps & CanvasFilterProps> = ({\n children,\n rects,\n}) => (\n <AbsoluteFill>\n {children}\n {rects.map((rect) => (\n <div\n key={`${rect.x}-${rect.y}-${rect.width}-${rect.height}`}\n style={{\n position: \"absolute\",\n left: `${rect.x * 100}%`,\n top: `${rect.y * 100}%`,\n width: `${rect.width * 100}%`,\n height: `${rect.height * 100}%`,\n background: \"#14161c\",\n }}\n />\n ))}\n </AbsoluteFill>\n);\n\nconst PixelateRegionCanvas = makeCanvasFilter<NormalizedProps>({\n shader,\n fallback: PixelateRegionFallback,\n});\n\nconst PixelateRegionBase: React.FC<\n PixelateRegionProps & CanvasFilterProps\n> = ({ regions, cellSize = DEFAULTS.cellSize, children }) => {\n const { width, height } = useVideoConfig();\n\n if (regions.length > MAX_REGIONS) {\n throw new Error(\n `pixelate-region: at most ${MAX_REGIONS} regions can be covered at once, received ${regions.length}. Dropping any of them would leave what it covered visible, so nest a second PixelateRegionBase instead.`,\n );\n }\n\n const rects = regions.map((region) => ({\n x: region.x / width,\n y: region.y / height,\n width: region.width / width,\n height: region.height / height,\n }));\n\n return (\n <PixelateRegionCanvas\n rects={rects}\n cellX={cellSize / width}\n cellY={cellSize / height}\n >\n {children}\n </PixelateRegionCanvas>\n );\n};\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n cellSize: {\n type: \"number\",\n min: 6,\n max: 72,\n step: 2,\n default: 24,\n description: \"Cell size\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"cellSize\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n cellSize: 24,\n speed: 1,\n};\n\ntype PixelateRegionElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof PixelateRegionBase>;\n\nconst PixelateRegionInner = forwardRef<\n HTMLDivElement,\n PixelateRegionElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<PixelateRegion>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <PixelateRegionBase\n {...(componentProps as unknown as ComponentProps<typeof PixelateRegionBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const PixelateRegion = Interactive.withSchema({\n Component: PixelateRegionInner,\n componentName: \"<PixelateRegion>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/reel.json b/registry-artifacts/elements/reel.jsonnew file mode 100644index 00000000..a530023d--- /dev/null+++ b/registry-artifacts/elements/reel.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 1180,+ "height": 676+ },+ "displayName": "Reel",+ "durationInFrames": 160,+ "installationMode": "component-owned-sequence",+ "slug": "reel",+ "sourceCode": "import { AbsoluteFill, Easing, Img, Interactive, Sequence, interpolate, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\nconst clamp = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\nconst EASE_OUT = Easing.out(Easing.cubic);\n\ntype ReelProps = {\n images: string[];\n width?: number;\n height?: number;\n radius?: number;\n step?: number;\n reveal?: number;\n objectPosition?: string;\n background?: string;\n};\n\nfunction ReelBase({\n images,\n width = 1180,\n height = 676,\n radius = 16,\n step = 20,\n reveal = 13,\n objectPosition = \"top\",\n background = \"#050506\",\n}: ReelProps) {\n const frame = useCurrentFrame();\n const { width: compWidth, height: compHeight } = useVideoConfig();\n const left = (compWidth - width) / 2;\n const top = (compHeight - height) / 2;\n\n return (\n <AbsoluteFill>\n {images.map((src, i) => {\n const p = interpolate(frame, [i * step, i * step + reveal], [0, 1], {\n ...clamp,\n easing: EASE_OUT,\n });\n if (p <= 0) return null;\n const inset = (1 - p) * 50;\n const imgScale = interpolate(p, [0, 1], [1.08, 1], clamp);\n return (\n <div\n key={i}\n style={{\n position: \"absolute\",\n left,\n top,\n width,\n height,\n zIndex: i,\n clipPath: `inset(${inset}% ${inset}% round ${radius}px)`,\n WebkitClipPath: `inset(${inset}% ${inset}% round ${radius}px)`,\n background,\n boxShadow: \"0 30px 80px rgba(0,0,0,0.6)\",\n willChange: \"clip-path\",\n }}\n >\n <Img\n src={src}\n style={{\n width: \"100%\",\n height: \"100%\",\n objectFit: \"cover\",\n objectPosition,\n scale: `${imgScale}`,\n willChange: \"transform\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n borderRadius: radius,\n border: \"1px solid rgba(255,255,255,0.08)\",\n }}\n />\n </div>\n );\n })}\n </AbsoluteFill>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n width: {\n type: \"number\",\n min: 600,\n max: 1280,\n step: 20,\n default: 1180,\n description: \"Card width\",\n hiddenFromList: false,\n },\n height: {\n type: \"number\",\n min: 360,\n max: 720,\n step: 4,\n default: 676,\n description: \"Card height\",\n hiddenFromList: false,\n },\n radius: {\n type: \"number\",\n min: 0,\n max: 40,\n step: 1,\n default: 16,\n description: \"Corner radius\",\n hiddenFromList: false,\n },\n step: {\n type: \"number\",\n min: 6,\n max: 40,\n step: 1,\n default: 20,\n description: \"Frames / image\",\n hiddenFromList: false,\n },\n reveal: {\n type: \"number\",\n min: 4,\n max: 30,\n step: 1,\n default: 13,\n description: \"Reveal frames\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"width\",\"height\",\"radius\",\"step\",\"reveal\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n width: 1180,\n height: 676,\n radius: 16,\n step: 20,\n reveal: 13,\n speed: 1,\n};\n\ntype ReelElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ReelBase>;\n\nconst ReelInner = forwardRef<\n HTMLDivElement,\n ReelElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<Reel>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: 1180,\n height: 676,\n ...style,\n }}\n >\n <ReelBase\n {...(componentProps as unknown as ComponentProps<typeof ReelBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const Reel = Interactive.withSchema({\n Component: ReelInner,\n componentName: \"<Reel>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 160+}diff --git a/registry-artifacts/elements/rgb-glitch-text.json b/registry-artifacts/elements/rgb-glitch-text.jsonnew file mode 100644index 00000000..a2bc8f12--- /dev/null+++ b/registry-artifacts/elements/rgb-glitch-text.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 300,+ "height": 130+ },+ "displayName": "RGB Glitch Text",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "rgb-glitch-text",+ "sourceCode": "import { Interactive, Sequence, random, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface RGBGlitchTextProps {\n text: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n glitchAt?: number;\n glitchDuration?: number;\n intensity?: number;\n seed?: string;\n speed?: number;\n className?: string;\n}\n\nfunction RGBGlitchTextBase({\n text,\n fontSize = 96,\n color = \"#171717\",\n fontWeight = 700,\n glitchAt = 20,\n glitchDuration = 8,\n intensity = 6,\n seed = \"glitch\",\n speed = 1,\n className,\n}: RGBGlitchTextProps) {\n const frame = useCurrentFrame() * speed;\n\n const isGlitching = frame >= glitchAt && frame < glitchAt + glitchDuration;\n\n const offset = (axisSeed: string, scale: number) =>\n (random(`${seed}-${axisSeed}-${frame}`) * 2 - 1) * scale;\n\n const rX = isGlitching ? offset(\"r-x\", intensity) : 0;\n const rY = isGlitching ? offset(\"r-y\", intensity * 0.4) : 0;\n const gX = isGlitching ? offset(\"g-x\", intensity) : 0;\n const gY = isGlitching ? offset(\"g-y\", intensity * 0.4) : 0;\n const bX = isGlitching ? offset(\"b-x\", intensity) : 0;\n const bY = isGlitching ? offset(\"b-y\", intensity * 0.4) : 0;\n\n const copyOpacity = isGlitching ? 1 : 0;\n\n const baseStyle: React.CSSProperties = {\n position: \"absolute\",\n top: 0,\n left: 0,\n fontSize,\n fontWeight,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n whiteSpace: \"pre\",\n mixBlendMode: \"multiply\",\n };\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"#fafafa\",\n }}\n >\n <div\n className={className}\n style={{ position: \"relative\", display: \"inline-block\" }}\n >\n <span\n style={{\n position: \"relative\",\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n whiteSpace: \"pre\",\n }}\n >\n {text}\n </span>\n <span\n style={{\n ...baseStyle,\n color: \"#ff0040\",\n opacity: copyOpacity,\n translate: `${rX}px ${rY}px`,\n }}\n >\n {text}\n </span>\n <span\n style={{\n ...baseStyle,\n color: \"#00ff80\",\n opacity: copyOpacity,\n translate: `${gX}px ${gY}px`,\n }}\n >\n {text}\n </span>\n <span\n style={{\n ...baseStyle,\n color: \"#0080ff\",\n opacity: copyOpacity,\n translate: `${bX}px ${bY}px`,\n }}\n >\n {text}\n </span>\n </div>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"GLITCH\",\n description: \"Text\",\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 200,\n step: 1,\n default: 96,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"700\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n glitchAt: {\n type: \"number\",\n min: 0,\n max: 120,\n step: 1,\n default: 20,\n description: \"Glitch at (frame)\",\n hiddenFromList: false,\n },\n glitchDuration: {\n type: \"number\",\n min: 1,\n max: 60,\n step: 1,\n default: 8,\n description: \"Glitch duration\",\n hiddenFromList: false,\n },\n intensity: {\n type: \"number\",\n min: 0,\n max: 30,\n step: 1,\n default: 6,\n description: \"Intensity (px)\",\n hiddenFromList: false,\n },\n seed: {\n type: \"text-content\",\n default: \"glitch\",\n description: \"Seed\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 300,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 130,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"fontSize\",\"color\",\"fontWeight\",\"glitchAt\",\"glitchDuration\",\"intensity\",\"seed\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"GLITCH\",\n fontSize: 96,\n color: \"#171717\",\n fontWeight: \"700\",\n glitchAt: 20,\n glitchDuration: 8,\n intensity: 6,\n seed: \"glitch\",\n speed: 1,\n};\n\ntype RGBGlitchTextElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof RGBGlitchTextBase>;\n\nconst RGBGlitchTextInner = forwardRef<\n HTMLDivElement,\n RGBGlitchTextElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 300, height = 130, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<RGBGlitchText>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <RGBGlitchTextBase\n {...(componentProps as unknown as ComponentProps<typeof RGBGlitchTextBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const RGBGlitchText = Interactive.withSchema({\n Component: RGBGlitchTextInner,\n componentName: \"<RGBGlitchText>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/rolling-number.json b/registry-artifacts/elements/rolling-number.jsonnew file mode 100644index 00000000..03c18bb9--- /dev/null+++ b/registry-artifacts/elements/rolling-number.json@@ -0,0 +1,22 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/google-fonts",+ "version": null+ }+ ],+ "dimensions": {+ "width": 380,+ "height": 140+ },+ "displayName": "Rolling Number",+ "durationInFrames": 150,+ "installationMode": "wrapped",+ "slug": "rolling-number",+ "sourceCode": "import { loadFont as loadMono } from \"@remotion/google-fonts/JetBrainsMono\";\nimport { AbsoluteFill, Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\nimport React from \"react\";\n\nconst { fontFamily: MONO_FAMILY } = loadMono();\n\nexport interface RollingNumberProps {\n from?: number;\n to?: number;\n fontSize?: number;\n color?: string;\n speed?: number;\n}\n\nconst COUNT_PORTION = 0.8;\nconst COUNT_EASING = Easing.out(Easing.poly(4));\nconst REVEAL_BAND = 0.4;\nconst REVEAL_EASING = Easing.inOut(Easing.sin);\nconst REVEAL_RISE_EM = 0.32;\n\nfunction easedProgress(\n frame: number,\n speed: number,\n durationInFrames: number,\n): number {\n return interpolate(\n frame * speed,\n [0, durationInFrames * COUNT_PORTION],\n [0, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: COUNT_EASING,\n },\n );\n}\n\nfunction placeTravel(start: number, end: number, place: number): number {\n const pow = 10 ** place;\n const up = end >= start;\n const diff = Math.abs(end - start);\n const startDigit = Math.floor(start / pow) % 10;\n const finalDigit = Math.floor(end / pow) % 10;\n const fullTurns = Math.floor(diff / (pow * 10));\n const stepDelta = up\n ? (finalDigit - startDigit + 10) % 10\n : (startDigit - finalDigit + 10) % 10;\n const magnitude = fullTurns * 10 + stepDelta;\n return up ? magnitude : -magnitude;\n}\n\nfunction placeReveal(current: number, place: number): number {\n if (place === 0) return 1;\n const threshold = 10 ** place;\n return interpolate(current, [threshold * REVEAL_BAND, threshold], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: REVEAL_EASING,\n });\n}\n\nfunction wrap10(value: number): number {\n return ((value % 10) + 10) % 10;\n}\n\nfunction DigitColumn({\n value,\n fontSize,\n reveal,\n}: {\n value: number;\n fontSize: number;\n reveal: number;\n}) {\n const cellHeight = fontSize * 1.1;\n return (\n <span\n style={{\n display: \"inline-block\",\n overflow: \"hidden\",\n height: cellHeight,\n width: \"0.62em\",\n verticalAlign: \"top\",\n textAlign: \"center\",\n opacity: reveal,\n translate: `0 ${(1 - reveal) * fontSize * REVEAL_RISE_EM}px`,\n }}\n >\n <span\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n translate: `0 ${-value * cellHeight}px`,\n }}\n >\n {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0].map((d, i) => (\n <span\n key={i}\n style={{ height: cellHeight, lineHeight: `${cellHeight}px` }}\n >\n {d}\n </span>\n ))}\n </span>\n </span>\n );\n}\n\nexport function RollingNumber({\n from = 0,\n to = 24813,\n fontSize = 120,\n color = \"#171717\",\n speed = 1,\n}: RollingNumberProps) {\n const frame = useCurrentFrame();\n const { durationInFrames } = useVideoConfig();\n\n const start = Math.max(0, Math.round(from));\n const end = Math.max(0, Math.round(to));\n\n const e = easedProgress(frame, speed, durationInFrames);\n const current = start + e * (end - start);\n\n const maxVal = Math.max(start, end);\n const digits = String(maxVal);\n const cellHeight = fontSize * 1.1;\n\n const cells: React.ReactNode[] = [];\n for (let place = 0; place < digits.length; place++) {\n if (place > 0 && place % 3 === 0) {\n cells.unshift(\n <span\n key={`s${place}`}\n style={{\n display: \"inline-block\",\n width: \"0.34em\",\n height: cellHeight,\n }}\n />,\n );\n }\n const pow = 10 ** place;\n const startDigit = Math.floor(start / pow) % 10;\n const travel = placeTravel(start, end, place);\n const pos = startDigit + e * travel;\n cells.unshift(\n <DigitColumn\n key={`d${place}`}\n value={wrap10(pos)}\n fontSize={fontSize}\n reveal={placeReveal(current, place)}\n />,\n );\n }\n\n return (\n <AbsoluteFill\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n alignItems: \"flex-start\",\n fontSize,\n fontWeight: 800,\n color,\n fontFamily: MONO_FAMILY,\n fontVariantNumeric: \"tabular-nums\",\n letterSpacing: \"-0.03em\",\n lineHeight: 1,\n }}\n >\n {cells}\n </div>\n </AbsoluteFill>\n );\n}"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/rolodex-flip.json b/registry-artifacts/elements/rolodex-flip.jsonnew file mode 100644index 00000000..90660886--- /dev/null+++ b/registry-artifacts/elements/rolodex-flip.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 220,+ "height": 60+ },+ "displayName": "Rolodex Flip",+ "durationInFrames": 110,+ "installationMode": "component-owned-sequence",+ "slug": "rolodex-flip",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport React, { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\ninterface RolodexFlipProps {\n items: string[];\n from?: number;\n interval?: number;\n flipDuration?: number;\n className?: string;\n style?: React.CSSProperties;\n}\n\nfunction RolodexFlipBase({\n items,\n from = 0,\n interval = 20,\n flipDuration = 10,\n className,\n style,\n}: RolodexFlipProps) {\n const frame = useCurrentFrame();\n const sizer = items.reduce((a, b) => (b.length > a.length ? b : a), \"\");\n return (\n <span\n className={className}\n style={{\n position: \"relative\",\n display: \"inline-block\",\n perspective: 420,\n verticalAlign: \"bottom\",\n ...style,\n }}\n >\n <span style={{ visibility: \"hidden\" }}>{sizer}</span>\n {items.map((item, i) => {\n const inStart = from + (i - 1) * interval + flipDuration / 2;\n const outStart = from + i * interval;\n\n let rotate = 0;\n let y = 0;\n let opacity = 1;\n\n if (i > 0) {\n const pIn = interpolate(\n frame,\n [inStart, inStart + flipDuration],\n [0, 1],\n { ...clampOpts, easing: Easing.out(Easing.cubic) },\n );\n rotate = (1 - pIn) * -85;\n y = (1 - pIn) * 20;\n opacity = pIn;\n }\n if (i < items.length - 1) {\n const pOut = interpolate(\n frame,\n [outStart, outStart + flipDuration],\n [0, 1],\n { ...clampOpts, easing: Easing.in(Easing.cubic) },\n );\n rotate += pOut * 85;\n y -= pOut * 20;\n opacity *= 1 - pOut;\n }\n if (opacity <= 0.001) return null;\n\n return (\n <span\n key={`${i}-${item}`}\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n whiteSpace: \"nowrap\",\n opacity,\n transform: `translateY(${y}px) rotateX(${rotate}deg)`,\n transformOrigin: \"50% 50%\",\n backfaceVisibility: \"hidden\",\n }}\n >\n {item}\n </span>\n );\n })}\n </span>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n interval: {\n type: \"number\",\n min: 10,\n max: 40,\n step: 2,\n default: 20,\n description: \"Interval\",\n hiddenFromList: false,\n },\n flipDuration: {\n type: \"number\",\n min: 4,\n max: 20,\n step: 1,\n default: 10,\n description: \"Flip duration\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 220,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 60,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"interval\",\"flipDuration\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n interval: 20,\n flipDuration: 10,\n speed: 1,\n};\n\ntype RolodexFlipElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof RolodexFlipBase>;\n\nconst RolodexFlipInner = forwardRef<\n HTMLDivElement,\n RolodexFlipElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 220, height = 60, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<RolodexFlip>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <RolodexFlipBase\n {...(componentProps as unknown as ComponentProps<typeof RolodexFlipBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const RolodexFlip = Interactive.withSchema({\n Component: RolodexFlipInner,\n componentName: \"<RolodexFlip>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 110+}diff --git a/registry-artifacts/elements/scale-down-fade.json b/registry-artifacts/elements/scale-down-fade.jsonnew file mode 100644index 00000000..fcb55da0--- /dev/null+++ b/registry-artifacts/elements/scale-down-fade.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 600,+ "height": 100+ },+ "displayName": "Scale Down Fade",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "scale-down-fade",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface ScaleDownFadeProps {\n text: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction ScaleDownFadeBase({\n text,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: ScaleDownFadeProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const enterDurFrames = 16;\n const exitDurFrames = 11;\n const exitStart = Math.max(enterDurFrames, durationInFrames - exitDurFrames);\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterP = interpolate(frame, [0, enterDurFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(frame, [exitStart, durationInFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const yEnter = interpolate(frame, [0, enterDurFrames], [8, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const yExit = interpolate(frame, [exitStart, durationInFrames], [0, -8], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const y = yEnter + yExit;\n\n const scaleEnter = interpolate(frame, [0, enterDurFrames], [1.04, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const scaleExitDelta = interpolate(\n frame,\n [exitStart, durationInFrames],\n [0, -0.06],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n },\n );\n\n const scale = scaleEnter + scaleExitDelta;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity,\n translate: `0 ${y}px`,\n scale: `${scale}`,\n }}\n >\n {text}\n </span>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"Quietly refined.\",\n description: \"Text\",\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 600,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"Quietly refined.\",\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype ScaleDownFadeElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ScaleDownFadeBase>;\n\nconst ScaleDownFadeInner = forwardRef<\n HTMLDivElement,\n ScaleDownFadeElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 600, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ScaleDownFade>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ScaleDownFadeBase\n {...(componentProps as unknown as ComponentProps<typeof ScaleDownFadeBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ScaleDownFade = Interactive.withSchema({\n Component: ScaleDownFadeInner,\n componentName: \"<ScaleDownFade>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/security-cam.json b/registry-artifacts/elements/security-cam.jsonnew file mode 100644index 00000000..e9a30f8f--- /dev/null+++ b/registry-artifacts/elements/security-cam.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/transitions",+ "version": null+ }+ ],+ "dimensions": null,+ "displayName": "Security Cam",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "security-cam",+ "sourceCode": "import { AbsoluteFill, Interactive, Sequence, isHtmlInCanvasSupported, useCurrentFrame, useDelayRender, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport React, { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\nimport { type TransitionPresentation, type TransitionPresentationComponentProps } from \"@remotion/transitions\";\n\nconst QUAD = new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]);\n\nconst VERTEX_SHADER = `#version 300 es\nin vec2 a_pos;\nout vec2 v_uv;\nvoid main() {\n v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);\n gl_Position = vec4(a_pos, 0.0, 1.0);\n}`;\n\nconst LAYER: React.CSSProperties = {\n position: \"absolute\",\n inset: 0,\n width: \"100%\",\n height: \"100%\",\n};\n\nconst OUTPUT_LAYER: React.CSSProperties = { ...LAYER, pointerEvents: \"none\" };\n\nconst isCanvasTransitionSupported = (): boolean =>\n isHtmlInCanvasSupported();\n\nconst isCanvasFilterSupported = (): boolean => isHtmlInCanvasSupported();\n\ntype SceneShaderFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderDrawParams<Props> = {\n from: OffscreenCanvas | null;\n to: OffscreenCanvas | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderInstance<Props> = {\n draw: (params: SceneShaderDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneShader<Props> = (\n canvas: OffscreenCanvas,\n) => SceneShaderInstance<Props>;\n\ntype SceneFilterFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterDrawParams<Props> = {\n scene: OffscreenCanvas | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterInstance<Props> = {\n draw: (params: SceneFilterDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneFilter<Props> = (\n canvas: OffscreenCanvas,\n) => SceneFilterInstance<Props>;\n\nfunction compileShader(\n gl: WebGL2RenderingContext,\n source: string,\n type: GLenum,\n): WebGLShader {\n const shader = gl.createShader(type);\n if (!shader) {\n throw new Error(\"canvas-presentation: failed to create shader\");\n }\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n const log = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error(`canvas-presentation: failed to compile shader: ${log}`);\n }\n return shader;\n}\n\nfunction createProgram(\n gl: WebGL2RenderingContext,\n fragment: string,\n): WebGLProgram {\n const program = gl.createProgram();\n if (!program) {\n throw new Error(\"canvas-presentation: failed to create program\");\n }\n const vs = compileShader(gl, VERTEX_SHADER, gl.VERTEX_SHADER);\n const fs = compileShader(gl, fragment, gl.FRAGMENT_SHADER);\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n gl.deleteShader(vs);\n gl.deleteShader(fs);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n const log = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n throw new Error(`canvas-presentation: failed to link program: ${log}`);\n }\n return program;\n}\n\nfunction createSceneTexture(gl: WebGL2RenderingContext): WebGLTexture {\n const texture = gl.createTexture();\n if (!texture) {\n throw new Error(\"canvas-presentation: failed to create texture\");\n }\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n 1,\n 1,\n 0,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n new Uint8Array([0, 0, 0, 0]),\n );\n return texture;\n}\n\nfunction createQuadSurface(canvas: OffscreenCanvas, fragment: string) {\n const gl = canvas.getContext(\"webgl2\", { premultipliedAlpha: true });\n if (!gl) {\n throw new Error(\"canvas-presentation: WebGL2 is unavailable\");\n }\n\n const program = createProgram(gl, fragment);\n const vao = gl.createVertexArray();\n gl.bindVertexArray(vao);\n const buffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, QUAD, gl.STATIC_DRAW);\n const aPos = gl.getAttribLocation(program, \"a_pos\");\n gl.enableVertexAttribArray(aPos);\n gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 0, 0);\n\n const locations = new Map<string, WebGLUniformLocation | null>();\n const uniform = (name: string) => {\n const cached = locations.get(name);\n if (cached !== undefined) {\n return cached;\n }\n const location = gl.getUniformLocation(program, name);\n locations.set(name, location);\n return location;\n };\n\n const clear = () => {\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n };\n\n const textures: WebGLTexture[] = [];\n const createTexture = () => {\n const texture = createSceneTexture(gl);\n textures.push(texture);\n return texture;\n };\n\n const begin = (width: number, height: number) => {\n gl.viewport(0, 0, width, height);\n clear();\n gl.useProgram(program);\n gl.bindVertexArray(vao);\n };\n\n const bindScene = (\n image: OffscreenCanvas | null,\n texture: WebGLTexture,\n unit: number,\n name: string,\n ) => {\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n if (image) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n image,\n );\n }\n gl.uniform1i(uniform(name), unit);\n };\n\n const draw = () => gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n\n const cleanup = () => {\n gl.deleteProgram(program);\n for (const texture of textures) {\n gl.deleteTexture(texture);\n }\n gl.deleteBuffer(buffer);\n gl.deleteVertexArray(vao);\n };\n\n return {\n gl,\n uniform,\n clear,\n createTexture,\n begin,\n bindScene,\n draw,\n cleanup,\n };\n}\n\nfunction makeSceneShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneShaderFrame<Props>) => void,\n): SceneShader<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const fromTexture = surface.createTexture();\n const toTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ from, to, width, height, progress, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(from, fromTexture, 0, \"u_from\");\n surface.bindScene(to, toTexture, 1, \"u_to\");\n\n surface.gl.uniform1f(surface.uniform(\"u_progress\"), progress);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n progress,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nfunction makeFilterShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneFilterFrame<Props>) => void,\n): SceneFilter<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const sceneTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ scene, width, height, frame, time, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(scene, sceneTexture, 0, \"u_scene\");\n\n surface.gl.uniform1f(surface.uniform(\"u_frame\"), frame);\n surface.gl.uniform1f(surface.uniform(\"u_time\"), time);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n frame,\n time,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nconst transferred = new WeakMap<HTMLCanvasElement, OffscreenCanvas>();\n\nfunction takeOffscreen(canvas: HTMLCanvasElement): OffscreenCanvas {\n const existing = transferred.get(canvas);\n if (existing) {\n return existing;\n }\n const created = canvas.transferControlToOffscreen();\n transferred.set(canvas, created);\n return created;\n}\n\nfunction makeCanvasComponent<Props extends Record<string, unknown>>(\n shader: SceneShader<Props>,\n): React.FC<TransitionPresentationComponentProps<Props>> {\n return function CanvasScenePresentation({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n onElementImage,\n onUnmount,\n bothEnteringAndExiting,\n }) {\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneShaderInstance<Props> | null>(null);\n const passedPropsRef = React.useRef(passedProps);\n passedPropsRef.current = passedProps;\n const onElementImageRef = React.useRef(onElementImage);\n onElementImageRef.current = onElementImage;\n const onUnmountRef = React.useRef(onUnmount);\n onUnmountRef.current = onUnmount;\n\n const { delayRender, continueRender } = useDelayRender();\n const passThrough =\n bothEnteringAndExiting && presentationDirection === \"exiting\";\n\n const drawRef = React.useRef<\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => void\n >(() => undefined);\n drawRef.current = (prevImage, nextImage, progress) => {\n const instance = instanceRef.current;\n if (!instance) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: paint\");\n const to = prevImage;\n const from = nextImage;\n const width = from?.width ?? to?.width ?? 0;\n const height = from?.height ?? to?.height ?? 0;\n if (width === 0 || height === 0) {\n instance.clear();\n continueRender(handle);\n return;\n }\n instance.draw({\n from,\n to,\n width,\n height,\n progress: !to ? 0 : !from ? 1 : progress,\n passedProps: passedPropsRef.current,\n });\n continueRender(handle);\n };\n\n const draw = React.useCallback(\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => drawRef.current(prevImage, nextImage, progress),\n [],\n );\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [passThrough, shader]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n if (!scene || !capture || !context) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n onElementImageRef.current(capture, draw);\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, [passThrough, draw]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, [passThrough]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: presentationProgress is the intentional trigger — a new progress value is what schedules the next paint\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n layoutRef.current?.requestPaint?.();\n }, [passThrough, presentationProgress]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n return () => onUnmountRef.current();\n }, [passThrough]);\n\n if (passThrough) {\n return <>{children}</>;\n }\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasFilterProps = {\n children: React.ReactNode;\n};\n\nfunction makeFilterComponent<Props extends Record<string, unknown>>(\n shader: SceneFilter<Props>,\n): React.FC<Props & CanvasFilterProps> {\n return function CanvasSceneFilter(props) {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const { delayRender, continueRender } = useDelayRender();\n\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneFilterInstance<Props> | null>(null);\n\n const passedPropsRef = React.useRef(props);\n passedPropsRef.current = props;\n const frameRef = React.useRef(frame);\n frameRef.current = frame;\n const timeRef = React.useRef(frame / fps);\n timeRef.current = frame / fps;\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [shader]);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n const instance = instanceRef.current;\n if (!scene || !capture || !context || !instance) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n if (capture.width === 0 || capture.height === 0) {\n instance.clear();\n return;\n }\n instance.draw({\n scene: capture,\n width: capture.width,\n height: capture.height,\n frame: frameRef.current,\n time: timeRef.current,\n passedProps: passedPropsRef.current,\n });\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: filter paint\");\n const settle = () => continueRender(handle);\n layout.addEventListener(\"paint\", settle, { once: true });\n layout.requestPaint?.();\n return () => {\n layout.removeEventListener(\"paint\", settle);\n continueRender(handle);\n };\n });\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {props.children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasPresentationOptions<Props extends Record<string, unknown>> = {\n shader: SceneShader<Props>;\n fallback: React.FC<TransitionPresentationComponentProps<Props>>;\n};\n\nfunction makeCanvasPresentation<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasPresentationOptions<Props>): (\n props: Props,\n) => TransitionPresentation<Props> {\n const Canvas = makeCanvasComponent(shader);\n\n const Presentation: React.FC<TransitionPresentationComponentProps<Props>> = (\n props,\n ) =>\n isCanvasTransitionSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n\n return (props) => ({ component: Presentation, props });\n}\n\ntype CanvasFilterOptions<Props extends Record<string, unknown>> = {\n shader: SceneFilter<Props>;\n fallback: React.FC<Props & CanvasFilterProps>;\n};\n\nfunction makeCanvasFilter<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasFilterOptions<Props>): React.FC<Props & CanvasFilterProps> {\n const Canvas = makeFilterComponent(shader);\n\n return function CanvasFilter(props) {\n return isCanvasFilterSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n };\n}\n\ntype SecurityCamProps = {\n compression?: number;\n blockSize?: number;\n noise?: number;\n intensity?: number;\n};\n\nconst DEFAULTS = {\n compression: 0.7,\n blockSize: 10,\n noise: 0.6,\n intensity: 1,\n};\n\ntype NormalizedProps = {\n compression: number;\n cellX: number;\n cellY: number;\n noise: number;\n intensity: number;\n};\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_scene;\nuniform float u_frame;\nuniform vec2 u_cell;\nuniform float u_compression;\nuniform float u_noise;\nuniform float u_intensity;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst float PI = 3.141592653589793;\n\nfloat hash(vec2 p) {\n return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453123);\n}\n\nfloat lumaOf(vec3 c) {\n return dot(c, vec3(0.299, 0.587, 0.114));\n}\n\nvec2 chromaOf(vec3 c) {\n return vec2(c.b - lumaOf(c), c.r - lumaOf(c));\n}\n\nvec3 fromLumaChroma(float y, vec2 cbcr) {\n return vec3(y + cbcr.y, y - 0.194 * cbcr.x - 0.509 * cbcr.y, y + cbcr.x);\n}\n\nvec3 blockMean(vec2 origin, vec2 cell) {\n vec3 total = vec3(0.0);\n for (int y = 0; y < 2; y++) {\n for (int x = 0; x < 2; x++) {\n vec2 at = origin + (vec2(float(x), float(y)) + 0.5) * cell * 0.5;\n total += texture(u_scene, at).rgb;\n }\n }\n return total * 0.25;\n}\n\nvoid main() {\n vec4 src = texture(u_scene, v_uv);\n float amount = clamp(u_intensity, 0.0, 1.0);\n\n if (!(amount > 0.001)) {\n outColor = src;\n return;\n }\n\n vec2 cell = max(u_cell, vec2(0.0008));\n vec2 wide = cell * 2.0;\n\n vec3 lumaBlock = blockMean(floor(v_uv / cell) * cell, cell);\n vec3 chromaBlock = blockMean(floor(v_uv / wide) * wide, wide);\n\n float squeeze = clamp(u_compression, 0.0, 1.0) * amount;\n\n float y = mix(lumaOf(src.rgb), lumaOf(lumaBlock), squeeze * 0.8);\n float levels = mix(255.0, 20.0, squeeze);\n y = floor(y * levels + 0.5) / levels;\n\n vec2 cbcr = mix(chromaOf(src.rgb), chromaOf(chromaBlock), squeeze);\n cbcr *= mix(1.0, 0.62, amount);\n\n vec3 color = fromLumaChroma(y, cbcr);\n\n float pump = 1.0 + 0.03 * sin(u_frame * PI / 45.0) * amount;\n color = clamp((color * pump - 0.05 * amount) / (1.0 - 0.14 * amount), 0.0, 1.0);\n\n float clock = mod(u_frame, 64.0);\n float shadow = 1.0 - smoothstep(0.0, 0.55, y);\n float grain =\n hash(v_uv + vec2(clock * 0.017, clock * 0.029)) - 0.5;\n color += grain * 0.16 * u_noise * amount * (0.25 + shadow);\n\n outColor = vec4(clamp(color, 0.0, 1.0), src.a);\n}`;\n\nconst shader = makeFilterShader<NormalizedProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, passedProps }) => {\n const { compression, cellX, cellY, noise, intensity } = passedProps;\n gl.uniform1f(uniform(\"u_compression\"), compression);\n gl.uniform2f(uniform(\"u_cell\"), cellX, cellY);\n gl.uniform1f(uniform(\"u_noise\"), noise);\n gl.uniform1f(uniform(\"u_intensity\"), intensity);\n },\n);\n\nconst SecurityCamFallback: React.FC<NormalizedProps & CanvasFilterProps> = ({\n children,\n intensity,\n}) => (\n <AbsoluteFill>\n <AbsoluteFill\n style={{\n filter: `saturate(${1 - 0.38 * intensity}) contrast(${1 + 0.22 * intensity}) brightness(${1 - 0.05 * intensity})`,\n }}\n >\n {children}\n </AbsoluteFill>\n <AbsoluteFill\n style={{\n background:\n \"radial-gradient(ellipse 82% 80% at 50% 50%, transparent 50%, rgba(0, 0, 0, 0.55) 100%)\",\n opacity: intensity,\n }}\n />\n </AbsoluteFill>\n);\n\nconst SecurityCamCanvas = makeCanvasFilter<NormalizedProps>({\n shader,\n fallback: SecurityCamFallback,\n});\n\nconst SecurityCamBase: React.FC<SecurityCamProps & CanvasFilterProps> = ({\n compression = DEFAULTS.compression,\n blockSize = DEFAULTS.blockSize,\n noise = DEFAULTS.noise,\n intensity = DEFAULTS.intensity,\n children,\n}) => {\n const { width, height } = useVideoConfig();\n\n return (\n <SecurityCamCanvas\n compression={compression}\n cellX={Math.max(blockSize, 1) / width}\n cellY={Math.max(blockSize, 1) / height}\n noise={noise}\n intensity={intensity}\n >\n {children}\n </SecurityCamCanvas>\n );\n};\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n compression: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.7,\n description: \"Compression\",\n hiddenFromList: false,\n },\n blockSize: {\n type: \"number\",\n min: 4,\n max: 32,\n step: 1,\n default: 10,\n description: \"Macroblock\",\n hiddenFromList: false,\n },\n noise: {\n type: \"number\",\n min: 0,\n max: 2,\n step: 0.05,\n default: 0.6,\n description: \"Sensor noise\",\n hiddenFromList: false,\n },\n intensity: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 1,\n description: \"Intensity\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"compression\",\"blockSize\",\"noise\",\"intensity\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n compression: 0.7,\n blockSize: 10,\n noise: 0.6,\n intensity: 1,\n speed: 1,\n};\n\ntype SecurityCamElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof SecurityCamBase>;\n\nconst SecurityCamInner = forwardRef<\n HTMLDivElement,\n SecurityCamElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<SecurityCam>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <SecurityCamBase\n {...(componentProps as unknown as ComponentProps<typeof SecurityCamBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const SecurityCam = Interactive.withSchema({\n Component: SecurityCamInner,\n componentName: \"<SecurityCam>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/shader-caustics.json b/registry-artifacts/elements/shader-caustics.jsonnew file mode 100644index 00000000..c146846f--- /dev/null+++ b/registry-artifacts/elements/shader-caustics.json@@ -0,0 +1,14 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": null,+ "displayName": "Shader Caustics",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-caustics",+ "sourceCode": "import { forwardRef, useEffect, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\n// A field of refracted light — caustics. The web of bright filaments light\n// makes when it passes through a surface and lands on the floor beneath.\n// Written for the remocn registry as a custom WebGL shader (not a\n// paper-design wrapper): frame-driven, deterministic, no wall-clock time.\n//\n// The filaments are slightly denser and brighter toward the bottom of the\n// frame — the light lands on the base — which makes it a natural carrier for\n// foundation stories. `accent` / `accentAmount` tint the filaments themselves\n// (not the floor), so an undertone can arrive mid-video by animating\n// `accentAmount` from the master timeline and stay in the light afterwards.\n\ninterface ShaderCausticsProps {\n /** [floor color, filament light color]. */\n colors?: [string, string];\n /** Tint mixed into the bright filaments. */\n accent?: string;\n /** 0..1 — how much of the accent the filaments take. */\n accentAmount?: number;\n /** Spatial frequency of the light web. */\n scale?: number;\n /** Overall brightness of the filaments. */\n intensity?: number;\n /** Global time multiplier. */\n speed?: number;\n className?: string;\n}\n\nconst VERT = `\nattribute vec2 a_pos;\nvoid main() {\n gl_Position = vec4(a_pos, 0.0, 1.0);\n}\n`;\n\nconst FRAG = `\nprecision highp float;\n\nuniform vec2 u_res;\nuniform float u_time;\nuniform float u_scale;\nuniform float u_intensity;\nuniform vec3 u_floor;\nuniform vec3 u_light;\nuniform vec3 u_accent;\nuniform float u_accentAmt;\n\nfloat hash(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);\n}\n\nvoid main() {\n vec2 uv = gl_FragCoord.xy / u_res;\n float aspect = u_res.x / u_res.y;\n vec2 p = vec2(uv.x * aspect, uv.y) * u_scale;\n\n // Iterative trigonometric warp: each pass bends the sample point by the\n // previous pass, and the reciprocal distance to the warped axes\n // accumulates into the caustic web.\n float t = u_time * 0.35;\n vec2 i = p;\n float c = 0.0;\n for (int n = 0; n < 4; n++) {\n float phase = t * (1.0 - 3.2 / float(n + 2));\n i = p + vec2(\n cos(phase - i.x) + sin(phase + i.y),\n sin(phase - i.y) + cos(phase + i.x)\n );\n c += 1.0 / length(vec2(\n p.x / (sin(i.x + phase) * 90.0),\n p.y / (cos(i.y + phase) * 90.0)\n ));\n }\n c /= 4.0;\n c = 1.24 - pow(abs(c), 1.35);\n // |c| collapses to zero along thin branching veins — that zero-crossing\n // set IS the caustic web. Light the veins with an exponential falloff\n // (sharp core + a soft halo) and leave everything else near-black.\n float web = exp(-abs(c) * 0.5) + 0.22 * exp(-abs(c) * 0.12);\n web = web / (1.0 + 0.6 * web);\n\n // The light lands on the base: filaments read stronger low in the frame.\n float ground = mix(1.25, 0.55, uv.y);\n web *= ground * u_intensity;\n\n // Vignette keeps the corners quiet so type always wins.\n vec2 v = uv - 0.5;\n float vig = 1.0 - dot(v, v) * 1.1;\n web *= clamp(vig, 0.0, 1.0);\n\n vec3 filament = mix(u_light, u_accent, clamp(u_accentAmt, 0.0, 1.0));\n vec3 col = u_floor + filament * web;\n\n // A whisper of living grain, time-derived so it stays deterministic.\n col += (hash(gl_FragCoord.xy + floor(u_time * 9.0)) - 0.5) * 0.012;\n\n gl_FragColor = vec4(col, 1.0);\n}\n`;\n\nconst hexToRgb = (hex: string): [number, number, number] => {\n const h = hex.replace(\"#\", \"\");\n const v =\n h.length === 3\n ? h\n .split(\"\")\n .map((c) => c + c)\n .join(\"\")\n : h;\n const n = parseInt(v, 16);\n return [((n >> 16) & 255) / 255, ((n >> 8) & 255) / 255, (n & 255) / 255];\n};\n\ntype GlState = {\n gl: WebGLRenderingContext;\n uniforms: Record<string, WebGLUniformLocation | null>;\n};\n\nfunction ShaderCausticsBase({\n colors = [\"#0a0a0a\", \"#2e2e33\"],\n accent = \"#7F57FF\",\n accentAmount = 0,\n scale = 5.2,\n intensity = 1,\n speed = 1,\n className,\n}: ShaderCausticsProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const stateRef = useRef<GlState | null>(null);\n const [handle] = useState(() => delayRender(\"shader-caustics\"));\n const continuedRef = useRef(false);\n\n useEffect(() => {\n const canvas = canvasRef.current;\n if (!canvas || stateRef.current) return;\n const gl = canvas.getContext(\"webgl\", {\n antialias: false,\n preserveDrawingBuffer: true,\n });\n if (!gl) return;\n\n const compile = (type: number, src: string) => {\n const shader = gl.createShader(type);\n if (!shader) throw new Error(\"Failed to create WebGL shader\");\n gl.shaderSource(shader, src);\n gl.compileShader(shader);\n return shader;\n };\n const program = gl.createProgram();\n if (!program) return;\n gl.attachShader(program, compile(gl.VERTEX_SHADER, VERT));\n gl.attachShader(program, compile(gl.FRAGMENT_SHADER, FRAG));\n gl.linkProgram(program);\n // biome-ignore lint/correctness/useHookAtTopLevel: gl.useProgram is a WebGL method, not a React hook\n gl.useProgram(program);\n\n const buf = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buf);\n gl.bufferData(\n gl.ARRAY_BUFFER,\n new Float32Array([-1, -1, 3, -1, -1, 3]),\n gl.STATIC_DRAW,\n );\n const loc = gl.getAttribLocation(program, \"a_pos\");\n gl.enableVertexAttribArray(loc);\n gl.vertexAttribPointer(loc, 2, gl.FLOAT, false, 0, 0);\n\n const uniforms: GlState[\"uniforms\"] = {};\n for (const name of [\n \"u_res\",\n \"u_time\",\n \"u_scale\",\n \"u_intensity\",\n \"u_floor\",\n \"u_light\",\n \"u_accent\",\n \"u_accentAmt\",\n ]) {\n uniforms[name] = gl.getUniformLocation(program, name);\n }\n stateRef.current = { gl, uniforms };\n }, []);\n\n useEffect(() => {\n const state = stateRef.current;\n const canvas = canvasRef.current;\n if (!state || !canvas) return;\n const { gl, uniforms } = state;\n\n gl.viewport(0, 0, canvas.width, canvas.height);\n gl.uniform2f(uniforms.u_res, canvas.width, canvas.height);\n gl.uniform1f(uniforms.u_time, (frame / fps) * speed);\n gl.uniform1f(uniforms.u_scale, scale);\n gl.uniform1f(uniforms.u_intensity, intensity);\n gl.uniform3fv(uniforms.u_floor, hexToRgb(colors[0]));\n gl.uniform3fv(uniforms.u_light, hexToRgb(colors[1]));\n gl.uniform3fv(uniforms.u_accent, hexToRgb(accent));\n gl.uniform1f(uniforms.u_accentAmt, accentAmount);\n gl.drawArrays(gl.TRIANGLES, 0, 3);\n\n if (!continuedRef.current) {\n continuedRef.current = true;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n }\n }, [\n frame,\n fps,\n speed,\n scale,\n intensity,\n colors,\n accent,\n accentAmount,\n handle,\n ]);\n\n return (\n <div className={className} style={{ position: \"absolute\", inset: 0 }}>\n <canvas\n ref={canvasRef}\n width={width}\n height={height}\n style={{ width: \"100%\", height: \"100%\", display: \"block\" }}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n scale: {\n type: \"number\",\n min: 1,\n max: 12,\n step: 0.1,\n default: 5.2,\n description: \"Scale\",\n hiddenFromList: false,\n },\n intensity: {\n type: \"number\",\n min: 0,\n max: 2,\n step: 0.1,\n default: 1,\n description: \"Intensity\",\n hiddenFromList: false,\n },\n accent: {\n type: \"color\",\n default: \"#7F57FF\",\n description: \"Accent\",\n },\n accentAmount: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0,\n description: \"Accent amount\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"scale\",\"intensity\",\"accent\",\"accentAmount\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n scale: 5.2,\n intensity: 1,\n accent: \"#7F57FF\",\n accentAmount: 0,\n};\n\ntype ShaderCausticsElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderCausticsBase>;\n\nconst ShaderCausticsInner = forwardRef<\n HTMLDivElement,\n ShaderCausticsElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderCaustics>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderCausticsBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderCausticsBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderCaustics = Interactive.withSchema({\n Component: ShaderCausticsInner,\n componentName: \"<ShaderCaustics>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-color-panels.json b/registry-artifacts/elements/shader-color-panels.jsonnew file mode 100644index 00000000..5d1b3d43--- /dev/null+++ b/registry-artifacts/elements/shader-color-panels.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Color Panels",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-color-panels",+ "sourceCode": "import { ColorPanels, type ColorPanelsProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\nconst NEUTRAL_COLORS = [\"#3a3a52\", \"#4a4a68\", \"#52527a\", \"#5a5a8a\"];\n\ninterface ShaderColorPanelsProps\n extends Omit<ColorPanelsProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderColorPanelsBase({\n speed = 1,\n colors = NEUTRAL_COLORS,\n colorBack = \"#12121a\",\n density = 3,\n length = 1.1,\n className,\n ...rest\n}: ShaderColorPanelsProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-color-panels\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <ColorPanels\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colors={colors}\n colorBack={colorBack}\n density={density}\n length={length}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n density: {\n type: \"number\",\n min: 1,\n max: 8,\n step: 1,\n default: 3,\n description: \"Density\",\n hiddenFromList: false,\n },\n length: {\n type: \"number\",\n min: 0.5,\n max: 3,\n step: 0.1,\n default: 1.1,\n description: \"Length\",\n hiddenFromList: false,\n },\n colorBack: {\n type: \"color\",\n default: \"#12121a\",\n description: \"Background\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"density\",\"length\",\"colorBack\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n density: 3,\n length: 1.1,\n colorBack: \"#12121a\",\n};\n\ntype ShaderColorPanelsElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderColorPanelsBase>;\n\nconst ShaderColorPanelsInner = forwardRef<\n HTMLDivElement,\n ShaderColorPanelsElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderColorPanels>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderColorPanelsBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderColorPanelsBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderColorPanels = Interactive.withSchema({\n Component: ShaderColorPanelsInner,\n componentName: \"<ShaderColorPanels>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-dithering.json b/registry-artifacts/elements/shader-dithering.jsonnew file mode 100644index 00000000..0de97f17--- /dev/null+++ b/registry-artifacts/elements/shader-dithering.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Dithering",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-dithering",+ "sourceCode": "import { Dithering, type DitheringProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\ninterface ShaderDitheringProps\n extends Omit<DitheringProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderDitheringBase({\n speed = 1,\n colorBack = \"#12121a\",\n colorFront = \"#6a6a85\",\n shape = \"wave\",\n type = \"4x4\",\n size = 2,\n className,\n ...rest\n}: ShaderDitheringProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-dithering\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <Dithering\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colorBack={colorBack}\n colorFront={colorFront}\n shape={shape}\n type={type}\n size={size}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n size: {\n type: \"number\",\n min: 1,\n max: 8,\n step: 1,\n default: 2,\n description: \"Dot Size\",\n hiddenFromList: false,\n },\n colorBack: {\n type: \"color\",\n default: \"#12121a\",\n description: \"Background\",\n },\n colorFront: {\n type: \"color\",\n default: \"#6a6a85\",\n description: \"Front\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"size\",\"colorBack\",\"colorFront\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n size: 2,\n colorBack: \"#12121a\",\n colorFront: \"#6a6a85\",\n};\n\ntype ShaderDitheringElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderDitheringBase>;\n\nconst ShaderDitheringInner = forwardRef<\n HTMLDivElement,\n ShaderDitheringElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderDithering>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderDitheringBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderDitheringBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderDithering = Interactive.withSchema({\n Component: ShaderDitheringInner,\n componentName: \"<ShaderDithering>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-dot-orbit.json b/registry-artifacts/elements/shader-dot-orbit.jsonnew file mode 100644index 00000000..eea044b5--- /dev/null+++ b/registry-artifacts/elements/shader-dot-orbit.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Dot Orbit",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-dot-orbit",+ "sourceCode": "import { DotOrbit, type DotOrbitProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\nconst NEUTRAL_COLORS = [\"#4a4a68\", \"#52527a\", \"#3a3a5c\"];\n\ninterface ShaderDotOrbitProps\n extends Omit<DotOrbitProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderDotOrbitBase({\n speed = 1,\n colorBack = \"#12121a\",\n colors = NEUTRAL_COLORS,\n size = 1,\n spreading = 1,\n className,\n ...rest\n}: ShaderDotOrbitProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-dot-orbit\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <DotOrbit\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colorBack={colorBack}\n colors={colors}\n size={size}\n spreading={spreading}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n size: {\n type: \"number\",\n min: 0.1,\n max: 3,\n step: 0.1,\n default: 1,\n description: \"Size\",\n hiddenFromList: false,\n },\n spreading: {\n type: \"number\",\n min: 0,\n max: 2,\n step: 0.1,\n default: 1,\n description: \"Spreading\",\n hiddenFromList: false,\n },\n colorBack: {\n type: \"color\",\n default: \"#12121a\",\n description: \"Background\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"size\",\"spreading\",\"colorBack\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n size: 1,\n spreading: 1,\n colorBack: \"#12121a\",\n};\n\ntype ShaderDotOrbitElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderDotOrbitBase>;\n\nconst ShaderDotOrbitInner = forwardRef<\n HTMLDivElement,\n ShaderDotOrbitElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderDotOrbit>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderDotOrbitBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderDotOrbitBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderDotOrbit = Interactive.withSchema({\n Component: ShaderDotOrbitInner,\n componentName: \"<ShaderDotOrbit>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-gem-smoke.json b/registry-artifacts/elements/shader-gem-smoke.jsonnew file mode 100644index 00000000..de5341f5--- /dev/null+++ b/registry-artifacts/elements/shader-gem-smoke.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Gem Smoke",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-gem-smoke",+ "sourceCode": "import { GemSmoke, type GemSmokeProps } from \"@paper-design/shaders-react\";\nimport React, { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\nconst NEUTRAL_COLORS = [\"#3a3a5c\", \"#52527a\"];\n\ninterface ShaderGemSmokeProps\n extends Omit<GemSmokeProps, \"frame\" | \"ref\"> {}\n\n/**\n * Paper's Gem Smoke shader, driven deterministically by the current frame.\n *\n * Animated color fields placed over a logo shape — smoke lives behind (and\n * inside) the glassy silhouette. Feed it a brand mark via `image` (a URL,\n * e.g. staticFile('prisma/symbol-light.svg')); the shape is processed once\n * and cached, so every frame renders the same smoke at the same time.\n */\nfunction ShaderGemSmokeBase({\n speed = 1,\n colors = NEUTRAL_COLORS,\n colorBack = \"#0a0a10\",\n innerDistortion = 0.8,\n outerDistortion = 0.6,\n outerGlow = 0.55,\n innerGlow = 1,\n size = 0.8,\n className,\n ...rest\n}: ShaderGemSmokeProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-gem-smoke\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <React.Suspense fallback={null}>\n <GemSmoke\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colors={colors}\n colorBack={colorBack}\n innerDistortion={innerDistortion}\n outerDistortion={outerDistortion}\n outerGlow={outerGlow}\n innerGlow={innerGlow}\n size={size}\n fit=\"cover\"\n width={width}\n height={height}\n suspendWhenProcessingImage\n {...rest}\n />\n </React.Suspense>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n colorBack: {\n type: \"color\",\n default: \"#0a0a10\",\n description: \"Background\",\n },\n innerDistortion: {\n type: \"number\",\n min: 0,\n max: 2,\n step: 0.05,\n default: 0.8,\n description: \"Inner distortion\",\n hiddenFromList: false,\n },\n outerDistortion: {\n type: \"number\",\n min: 0,\n max: 2,\n step: 0.05,\n default: 0.6,\n description: \"Outer distortion\",\n hiddenFromList: false,\n },\n size: {\n type: \"number\",\n min: 0.2,\n max: 1.5,\n step: 0.05,\n default: 0.8,\n description: \"Size\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"colorBack\",\"innerDistortion\",\"outerDistortion\",\"size\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n colorBack: \"#0a0a10\",\n innerDistortion: 0.8,\n outerDistortion: 0.6,\n size: 0.8,\n};\n\ntype ShaderGemSmokeElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderGemSmokeBase>;\n\nconst ShaderGemSmokeInner = forwardRef<\n HTMLDivElement,\n ShaderGemSmokeElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderGemSmoke>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderGemSmokeBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderGemSmokeBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderGemSmoke = Interactive.withSchema({\n Component: ShaderGemSmokeInner,\n componentName: \"<ShaderGemSmoke>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-god-rays.json b/registry-artifacts/elements/shader-god-rays.jsonnew file mode 100644index 00000000..3d147cd7--- /dev/null+++ b/registry-artifacts/elements/shader-god-rays.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader God Rays",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-god-rays",+ "sourceCode": "import { GodRays, type GodRaysProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\nconst NEUTRAL_COLORS = [\"#5a5a7e\", \"#8a8a95\", \"#ffffff\", \"#3a3a5c\"];\n\ninterface ShaderGodRaysProps\n extends Omit<GodRaysProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderGodRaysBase({\n speed = 1,\n colorBack = \"#12121a\",\n colorBloom = \"#3a3a5c\",\n colors = NEUTRAL_COLORS,\n intensity = 0.8,\n density = 0.3,\n bloom = 0.4,\n className,\n ...rest\n}: ShaderGodRaysProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-god-rays\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <GodRays\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colorBack={colorBack}\n colorBloom={colorBloom}\n colors={colors}\n intensity={intensity}\n density={density}\n bloom={bloom}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n intensity: {\n type: \"number\",\n min: 0,\n max: 2,\n step: 0.05,\n default: 0.8,\n description: \"Intensity\",\n hiddenFromList: false,\n },\n density: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.3,\n description: \"Density\",\n hiddenFromList: false,\n },\n bloom: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.4,\n description: \"Bloom\",\n hiddenFromList: false,\n },\n colorBack: {\n type: \"color\",\n default: \"#12121a\",\n description: \"Background\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"intensity\",\"density\",\"bloom\",\"colorBack\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n intensity: 0.8,\n density: 0.3,\n bloom: 0.4,\n colorBack: \"#12121a\",\n};\n\ntype ShaderGodRaysElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderGodRaysBase>;\n\nconst ShaderGodRaysInner = forwardRef<\n HTMLDivElement,\n ShaderGodRaysElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderGodRays>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderGodRaysBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderGodRaysBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderGodRays = Interactive.withSchema({\n Component: ShaderGodRaysInner,\n componentName: \"<ShaderGodRays>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-grain-gradient.json b/registry-artifacts/elements/shader-grain-gradient.jsonnew file mode 100644index 00000000..df8a7f8b--- /dev/null+++ b/registry-artifacts/elements/shader-grain-gradient.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Grain Gradient",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-grain-gradient",+ "sourceCode": "import { GrainGradient, type GrainGradientProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\nconst NEUTRAL_COLORS = [\"#3a3a52\", \"#4a4a68\", \"#5a5a7e\"];\n\ninterface ShaderGrainGradientProps\n extends Omit<GrainGradientProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderGrainGradientBase({\n speed = 1,\n colors = NEUTRAL_COLORS,\n colorBack = \"#12121a\",\n softness = 0.6,\n intensity = 0.2,\n noise = 0.15,\n className,\n ...rest\n}: ShaderGrainGradientProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-grain-gradient\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <GrainGradient\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colors={colors}\n colorBack={colorBack}\n softness={softness}\n intensity={intensity}\n noise={noise}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n softness: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.6,\n description: \"Softness\",\n hiddenFromList: false,\n },\n intensity: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.2,\n description: \"Intensity\",\n hiddenFromList: false,\n },\n noise: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.15,\n description: \"Noise\",\n hiddenFromList: false,\n },\n colorBack: {\n type: \"color\",\n default: \"#12121a\",\n description: \"Background\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"softness\",\"intensity\",\"noise\",\"colorBack\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n softness: 0.6,\n intensity: 0.2,\n noise: 0.15,\n colorBack: \"#12121a\",\n};\n\ntype ShaderGrainGradientElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderGrainGradientBase>;\n\nconst ShaderGrainGradientInner = forwardRef<\n HTMLDivElement,\n ShaderGrainGradientElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderGrainGradient>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderGrainGradientBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderGrainGradientBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderGrainGradient = Interactive.withSchema({\n Component: ShaderGrainGradientInner,\n componentName: \"<ShaderGrainGradient>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-liquid-metal.json b/registry-artifacts/elements/shader-liquid-metal.jsonnew file mode 100644index 00000000..1e71de47--- /dev/null+++ b/registry-artifacts/elements/shader-liquid-metal.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Liquid Metal",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-liquid-metal",+ "sourceCode": "import { LiquidMetal, type LiquidMetalProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\ninterface ShaderLiquidMetalProps\n extends Omit<LiquidMetalProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderLiquidMetalBase({\n speed = 1,\n colorBack = \"#2a2a30\",\n colorTint = \"#8a8a95\",\n distortion = 0.1,\n repetition = 1.5,\n contour = 0.4,\n softness = 0.05,\n shape = \"none\",\n className,\n ...rest\n}: ShaderLiquidMetalProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-liquid-metal\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <LiquidMetal\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colorBack={colorBack}\n colorTint={colorTint}\n distortion={distortion}\n repetition={repetition}\n contour={contour}\n softness={softness}\n shape={shape}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n distortion: {\n type: \"number\",\n min: 0,\n max: 0.5,\n step: 0.01,\n default: 0.1,\n description: \"Distortion\",\n hiddenFromList: false,\n },\n repetition: {\n type: \"number\",\n min: 1,\n max: 6,\n step: 0.5,\n default: 1.5,\n description: \"Repetition\",\n hiddenFromList: false,\n },\n contour: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.4,\n description: \"Contour\",\n hiddenFromList: false,\n },\n colorBack: {\n type: \"color\",\n default: \"#2a2a30\",\n description: \"Background\",\n },\n colorTint: {\n type: \"color\",\n default: \"#8a8a95\",\n description: \"Tint\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"distortion\",\"repetition\",\"contour\",\"colorBack\",\"colorTint\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n distortion: 0.1,\n repetition: 1.5,\n contour: 0.4,\n colorBack: \"#2a2a30\",\n colorTint: \"#8a8a95\",\n};\n\ntype ShaderLiquidMetalElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderLiquidMetalBase>;\n\nconst ShaderLiquidMetalInner = forwardRef<\n HTMLDivElement,\n ShaderLiquidMetalElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderLiquidMetal>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderLiquidMetalBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderLiquidMetalBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderLiquidMetal = Interactive.withSchema({\n Component: ShaderLiquidMetalInner,\n componentName: \"<ShaderLiquidMetal>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-mesh-gradient.json b/registry-artifacts/elements/shader-mesh-gradient.jsonnew file mode 100644index 00000000..15d16d3d--- /dev/null+++ b/registry-artifacts/elements/shader-mesh-gradient.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Mesh Gradient",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-mesh-gradient",+ "sourceCode": "import { MeshGradient, type MeshGradientProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\nconst NEUTRAL_COLORS = [\"#12121a\", \"#232338\", \"#3a3a5c\", \"#52527a\"];\n\ninterface ShaderMeshGradientProps\n extends Omit<MeshGradientProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderMeshGradientBase({\n speed = 1,\n colors = NEUTRAL_COLORS,\n distortion = 0.6,\n swirl = 0.1,\n className,\n ...rest\n}: ShaderMeshGradientProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-mesh-gradient\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <MeshGradient\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colors={colors}\n distortion={distortion}\n swirl={swirl}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n distortion: {\n type: \"number\",\n min: 0,\n max: 1.5,\n step: 0.05,\n default: 0.6,\n description: \"Distortion\",\n hiddenFromList: false,\n },\n swirl: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.1,\n description: \"Swirl\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"distortion\",\"swirl\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n distortion: 0.6,\n swirl: 0.1,\n};\n\ntype ShaderMeshGradientElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderMeshGradientBase>;\n\nconst ShaderMeshGradientInner = forwardRef<\n HTMLDivElement,\n ShaderMeshGradientElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderMeshGradient>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderMeshGradientBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderMeshGradientBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderMeshGradient = Interactive.withSchema({\n Component: ShaderMeshGradientInner,\n componentName: \"<ShaderMeshGradient>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-metaballs.json b/registry-artifacts/elements/shader-metaballs.jsonnew file mode 100644index 00000000..31578618--- /dev/null+++ b/registry-artifacts/elements/shader-metaballs.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Metaballs",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-metaballs",+ "sourceCode": "import { Metaballs, type MetaballsProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\nconst NEUTRAL_COLORS = [\"#3a3a5c\", \"#52527a\", \"#8a8a95\"];\n\ninterface ShaderMetaballsProps\n extends Omit<MetaballsProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderMetaballsBase({\n speed = 1,\n colorBack = \"#12121a\",\n colors = NEUTRAL_COLORS,\n count = 10,\n size = 0.83,\n className,\n ...rest\n}: ShaderMetaballsProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-metaballs\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <Metaballs\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colorBack={colorBack}\n colors={colors}\n count={count}\n size={size}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n count: {\n type: \"number\",\n min: 1,\n max: 20,\n step: 1,\n default: 10,\n description: \"Count\",\n hiddenFromList: false,\n },\n size: {\n type: \"number\",\n min: 0.2,\n max: 1.5,\n step: 0.05,\n default: 0.83,\n description: \"Size\",\n hiddenFromList: false,\n },\n colorBack: {\n type: \"color\",\n default: \"#12121a\",\n description: \"Background\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"count\",\"size\",\"colorBack\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n count: 10,\n size: 0.83,\n colorBack: \"#12121a\",\n};\n\ntype ShaderMetaballsElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderMetaballsBase>;\n\nconst ShaderMetaballsInner = forwardRef<\n HTMLDivElement,\n ShaderMetaballsElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderMetaballs>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderMetaballsBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderMetaballsBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderMetaballs = Interactive.withSchema({\n Component: ShaderMetaballsInner,\n componentName: \"<ShaderMetaballs>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-neuro-noise.json b/registry-artifacts/elements/shader-neuro-noise.jsonnew file mode 100644index 00000000..1c1832d8--- /dev/null+++ b/registry-artifacts/elements/shader-neuro-noise.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Neuro Noise",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-neuro-noise",+ "sourceCode": "import { NeuroNoise, type NeuroNoiseProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\ninterface ShaderNeuroNoiseProps\n extends Omit<NeuroNoiseProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderNeuroNoiseBase({\n speed = 1,\n colorFront = \"#8a8a95\",\n colorMid = \"#4a4a68\",\n colorBack = \"#12121a\",\n brightness = 0.05,\n contrast = 0.3,\n className,\n ...rest\n}: ShaderNeuroNoiseProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-neuro-noise\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <NeuroNoise\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colorFront={colorFront}\n colorMid={colorMid}\n colorBack={colorBack}\n brightness={brightness}\n contrast={contrast}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n brightness: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.05,\n description: \"Brightness\",\n hiddenFromList: false,\n },\n contrast: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.3,\n description: \"Contrast\",\n hiddenFromList: false,\n },\n colorBack: {\n type: \"color\",\n default: \"#12121a\",\n description: \"Background\",\n },\n colorMid: {\n type: \"color\",\n default: \"#4a4a68\",\n description: \"Mid\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"brightness\",\"contrast\",\"colorBack\",\"colorMid\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n brightness: 0.05,\n contrast: 0.3,\n colorBack: \"#12121a\",\n colorMid: \"#4a4a68\",\n};\n\ntype ShaderNeuroNoiseElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderNeuroNoiseBase>;\n\nconst ShaderNeuroNoiseInner = forwardRef<\n HTMLDivElement,\n ShaderNeuroNoiseElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderNeuroNoise>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderNeuroNoiseBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderNeuroNoiseBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderNeuroNoise = Interactive.withSchema({\n Component: ShaderNeuroNoiseInner,\n componentName: \"<ShaderNeuroNoise>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-perlin-noise.json b/registry-artifacts/elements/shader-perlin-noise.jsonnew file mode 100644index 00000000..6ebd18d4--- /dev/null+++ b/registry-artifacts/elements/shader-perlin-noise.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Perlin Noise",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-perlin-noise",+ "sourceCode": "import { PerlinNoise, type PerlinNoiseProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\ninterface ShaderPerlinNoiseProps\n extends Omit<PerlinNoiseProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderPerlinNoiseBase({\n speed = 1,\n colorBack = \"#12121a\",\n colorFront = \"#6a6a85\",\n proportion = 0.35,\n softness = 0.1,\n className,\n ...rest\n}: ShaderPerlinNoiseProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-perlin-noise\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <PerlinNoise\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colorBack={colorBack}\n colorFront={colorFront}\n proportion={proportion}\n softness={softness}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n proportion: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.35,\n description: \"Proportion\",\n hiddenFromList: false,\n },\n softness: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.1,\n description: \"Softness\",\n hiddenFromList: false,\n },\n colorBack: {\n type: \"color\",\n default: \"#12121a\",\n description: \"Background\",\n },\n colorFront: {\n type: \"color\",\n default: \"#6a6a85\",\n description: \"Front\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"proportion\",\"softness\",\"colorBack\",\"colorFront\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n proportion: 0.35,\n softness: 0.1,\n colorBack: \"#12121a\",\n colorFront: \"#6a6a85\",\n};\n\ntype ShaderPerlinNoiseElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderPerlinNoiseBase>;\n\nconst ShaderPerlinNoiseInner = forwardRef<\n HTMLDivElement,\n ShaderPerlinNoiseElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderPerlinNoise>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderPerlinNoiseBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderPerlinNoiseBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderPerlinNoise = Interactive.withSchema({\n Component: ShaderPerlinNoiseInner,\n componentName: \"<ShaderPerlinNoise>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-pulsing-border.json b/registry-artifacts/elements/shader-pulsing-border.jsonnew file mode 100644index 00000000..e865409d--- /dev/null+++ b/registry-artifacts/elements/shader-pulsing-border.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Pulsing Border",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-pulsing-border",+ "sourceCode": "import { PulsingBorder, type PulsingBorderProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\nconst NEUTRAL_COLORS = [\"#52527a\", \"#8a8a95\", \"#3a3a5c\"];\n\ninterface ShaderPulsingBorderProps\n extends Omit<PulsingBorderProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderPulsingBorderBase({\n speed = 1,\n colorBack = \"#12121a\",\n colors = NEUTRAL_COLORS,\n roundness = 0.25,\n thickness = 0.1,\n intensity = 0.2,\n bloom = 0.25,\n className,\n ...rest\n}: ShaderPulsingBorderProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-pulsing-border\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <PulsingBorder\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colorBack={colorBack}\n colors={colors}\n roundness={roundness}\n thickness={thickness}\n intensity={intensity}\n bloom={bloom}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n thickness: {\n type: \"number\",\n min: 0.02,\n max: 0.5,\n step: 0.02,\n default: 0.1,\n description: \"Thickness\",\n hiddenFromList: false,\n },\n roundness: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.25,\n description: \"Roundness\",\n hiddenFromList: false,\n },\n intensity: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.2,\n description: \"Intensity\",\n hiddenFromList: false,\n },\n colorBack: {\n type: \"color\",\n default: \"#12121a\",\n description: \"Background\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"thickness\",\"roundness\",\"intensity\",\"colorBack\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n thickness: 0.1,\n roundness: 0.25,\n intensity: 0.2,\n colorBack: \"#12121a\",\n};\n\ntype ShaderPulsingBorderElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderPulsingBorderBase>;\n\nconst ShaderPulsingBorderInner = forwardRef<\n HTMLDivElement,\n ShaderPulsingBorderElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderPulsingBorder>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderPulsingBorderBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderPulsingBorderBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderPulsingBorder = Interactive.withSchema({\n Component: ShaderPulsingBorderInner,\n componentName: \"<ShaderPulsingBorder>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-simplex-noise.json b/registry-artifacts/elements/shader-simplex-noise.jsonnew file mode 100644index 00000000..350ae367--- /dev/null+++ b/registry-artifacts/elements/shader-simplex-noise.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Simplex Noise",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-simplex-noise",+ "sourceCode": "import { SimplexNoise, type SimplexNoiseProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\nconst NEUTRAL_COLORS = [\"#12121a\", \"#3a3a5c\", \"#52527a\", \"#8a8a95\"];\n\ninterface ShaderSimplexNoiseProps\n extends Omit<SimplexNoiseProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderSimplexNoiseBase({\n speed = 1,\n colors = NEUTRAL_COLORS,\n stepsPerColor = 2,\n softness = 0.1,\n className,\n ...rest\n}: ShaderSimplexNoiseProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-simplex-noise\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <SimplexNoise\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colors={colors}\n stepsPerColor={stepsPerColor}\n softness={softness}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n stepsPerColor: {\n type: \"number\",\n min: 1,\n max: 6,\n step: 1,\n default: 2,\n description: \"Steps\",\n hiddenFromList: false,\n },\n softness: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.1,\n description: \"Softness\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"stepsPerColor\",\"softness\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n stepsPerColor: 2,\n softness: 0.1,\n};\n\ntype ShaderSimplexNoiseElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderSimplexNoiseBase>;\n\nconst ShaderSimplexNoiseInner = forwardRef<\n HTMLDivElement,\n ShaderSimplexNoiseElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderSimplexNoise>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderSimplexNoiseBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderSimplexNoiseBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderSimplexNoise = Interactive.withSchema({\n Component: ShaderSimplexNoiseInner,\n componentName: \"<ShaderSimplexNoise>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-smoke-ring.json b/registry-artifacts/elements/shader-smoke-ring.jsonnew file mode 100644index 00000000..3b08eccc--- /dev/null+++ b/registry-artifacts/elements/shader-smoke-ring.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Smoke Ring",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-smoke-ring",+ "sourceCode": "import { SmokeRing, type SmokeRingProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\nconst NEUTRAL_COLORS = [\"#c8c8d0\"];\n\ninterface ShaderSmokeRingProps\n extends Omit<SmokeRingProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderSmokeRingBase({\n speed = 1,\n colorBack = \"#12121a\",\n colors = NEUTRAL_COLORS,\n radius = 0.25,\n thickness = 0.65,\n scale = 0.8,\n className,\n ...rest\n}: ShaderSmokeRingProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-smoke-ring\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <SmokeRing\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colorBack={colorBack}\n colors={colors}\n radius={radius}\n thickness={thickness}\n scale={scale}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n radius: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.25,\n description: \"Radius\",\n hiddenFromList: false,\n },\n thickness: {\n type: \"number\",\n min: 0.1,\n max: 1.5,\n step: 0.05,\n default: 0.65,\n description: \"Thickness\",\n hiddenFromList: false,\n },\n scale: {\n type: \"number\",\n min: 0.3,\n max: 2,\n step: 0.05,\n default: 0.8,\n description: \"Scale\",\n hiddenFromList: false,\n },\n colorBack: {\n type: \"color\",\n default: \"#12121a\",\n description: \"Background\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"radius\",\"thickness\",\"scale\",\"colorBack\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n radius: 0.25,\n thickness: 0.65,\n scale: 0.8,\n colorBack: \"#12121a\",\n};\n\ntype ShaderSmokeRingElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderSmokeRingBase>;\n\nconst ShaderSmokeRingInner = forwardRef<\n HTMLDivElement,\n ShaderSmokeRingElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderSmokeRing>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderSmokeRingBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderSmokeRingBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderSmokeRing = Interactive.withSchema({\n Component: ShaderSmokeRingInner,\n componentName: \"<ShaderSmokeRing>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-spiral.json b/registry-artifacts/elements/shader-spiral.jsonnew file mode 100644index 00000000..631845b3--- /dev/null+++ b/registry-artifacts/elements/shader-spiral.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Spiral",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-spiral",+ "sourceCode": "import { Spiral, type SpiralProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\ninterface ShaderSpiralProps extends Omit<SpiralProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderSpiralBase({\n speed = 1,\n colorBack = \"#12121a\",\n colorFront = \"#52527a\",\n density = 1,\n strokeWidth = 0.5,\n softness = 0.2,\n className,\n ...rest\n}: ShaderSpiralProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-spiral\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <Spiral\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colorBack={colorBack}\n colorFront={colorFront}\n density={density}\n strokeWidth={strokeWidth}\n softness={softness}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n density: {\n type: \"number\",\n min: 0.2,\n max: 4,\n step: 0.1,\n default: 1,\n description: \"Density\",\n hiddenFromList: false,\n },\n strokeWidth: {\n type: \"number\",\n min: 0.05,\n max: 1,\n step: 0.05,\n default: 0.5,\n description: \"Stroke\",\n hiddenFromList: false,\n },\n softness: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.2,\n description: \"Softness\",\n hiddenFromList: false,\n },\n colorBack: {\n type: \"color\",\n default: \"#12121a\",\n description: \"Background\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"density\",\"strokeWidth\",\"softness\",\"colorBack\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n density: 1,\n strokeWidth: 0.5,\n softness: 0.2,\n colorBack: \"#12121a\",\n};\n\ntype ShaderSpiralElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderSpiralBase>;\n\nconst ShaderSpiralInner = forwardRef<\n HTMLDivElement,\n ShaderSpiralElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderSpiral>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderSpiralBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderSpiralBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderSpiral = Interactive.withSchema({\n Component: ShaderSpiralInner,\n componentName: \"<ShaderSpiral>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-strata.json b/registry-artifacts/elements/shader-strata.jsonnew file mode 100644index 00000000..e55e2b03--- /dev/null+++ b/registry-artifacts/elements/shader-strata.json@@ -0,0 +1,14 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": null,+ "displayName": "Shader Strata",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-strata",+ "sourceCode": "import { forwardRef, useEffect, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\n// A field of fine horizontal sediment layers — strata. Each layer's edge is\n// displaced by fbm noise and drifts at its own depth speed, so the stack reads\n// as a living foundation rather than a gradient. Written for the remocn\n// registry as a custom WebGL shader (not a paper-design wrapper): frame-driven,\n// deterministic, no wall-clock time anywhere.\n//\n// `accent` / `accentAmount` tint the DEEP strata (the bottom of the frame) —\n// the layers everything else stands on — which is what makes it a natural\n// carrier for \"base\" stories: the undertone can arrive mid-video by animating\n// `accentAmount` with the master timeline.\n\ninterface ShaderStrataProps {\n /** Palette from the deepest layer to the surface layer. Exactly 4 stops. */\n colors?: [string, string, string, string];\n /** Tint mixed into the deep strata. */\n accent?: string;\n /** 0..1 — how much of the accent the deep strata take. */\n accentAmount?: number;\n /** Number of strata bands across the frame height. */\n layers?: number;\n /** Edge waviness of each layer, in fractions of the frame height. */\n amplitude?: number;\n /** Global time multiplier. */\n speed?: number;\n className?: string;\n}\n\nconst VERT = `\nattribute vec2 a_pos;\nvoid main() {\n gl_Position = vec4(a_pos, 0.0, 1.0);\n}\n`;\n\nconst FRAG = `\nprecision highp float;\n\nuniform vec2 u_res;\nuniform float u_time;\nuniform float u_layers;\nuniform float u_amp;\nuniform vec3 u_c0;\nuniform vec3 u_c1;\nuniform vec3 u_c2;\nuniform vec3 u_c3;\nuniform vec3 u_accent;\nuniform float u_accentAmt;\n\nfloat hash(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);\n}\n\nfloat noise(vec2 p) {\n vec2 i = floor(p);\n vec2 f = fract(p);\n vec2 u = f * f * (3.0 - 2.0 * f);\n return mix(\n mix(hash(i), hash(i + vec2(1.0, 0.0)), u.x),\n mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), u.x),\n u.y\n );\n}\n\nfloat fbm(vec2 p) {\n float v = 0.0;\n float a = 0.5;\n for (int i = 0; i < 4; i++) {\n v += a * noise(p);\n p *= 2.03;\n a *= 0.5;\n }\n return v;\n}\n\nvoid main() {\n vec2 uv = gl_FragCoord.xy / u_res;\n float aspect = u_res.x / u_res.y;\n\n // Deeper layers drift faster — parallax without per-band recursion.\n float drift = u_time * (0.012 + 0.05 * (1.0 - uv.y));\n float w = fbm(vec2(uv.x * 2.6 * aspect + drift, uv.y * 2.2 - u_time * 0.01));\n\n float yd = uv.y + (w - 0.5) * u_amp;\n float band = yd * u_layers;\n float idx = floor(band);\n float f = fract(band);\n\n // Per-band value jitter + a soft sediment shadow at each band's lower edge.\n float j = hash(vec2(idx, 7.0));\n float edge = smoothstep(0.0, 0.4, f) * (1.0 - 0.3 * smoothstep(0.8, 1.0, f));\n\n float depth = clamp(idx / u_layers, 0.0, 1.0);\n vec3 col = mix(u_c0, u_c1, smoothstep(0.0, 0.4, depth));\n col = mix(col, u_c2, smoothstep(0.35, 0.75, depth));\n col = mix(col, u_c3, smoothstep(0.7, 1.0, depth));\n col *= 0.84 + 0.16 * j;\n col *= 0.92 + 0.08 * edge;\n\n // The accent rises from the deep strata and thins toward the surface.\n float mask = (1.0 - uv.y);\n mask *= mask;\n col = mix(col, u_accent, clamp(u_accentAmt, 0.0, 1.0) * mask * 0.38);\n\n // A whisper of living grain, time-derived so it stays deterministic.\n col += (hash(gl_FragCoord.xy + floor(u_time * 9.0)) - 0.5) * 0.012;\n\n gl_FragColor = vec4(col, 1.0);\n}\n`;\n\nconst hexToRgb = (hex: string): [number, number, number] => {\n const h = hex.replace(\"#\", \"\");\n const v =\n h.length === 3\n ? h\n .split(\"\")\n .map((c) => c + c)\n .join(\"\")\n : h;\n const n = parseInt(v, 16);\n return [((n >> 16) & 255) / 255, ((n >> 8) & 255) / 255, (n & 255) / 255];\n};\n\ntype GlState = {\n gl: WebGLRenderingContext;\n uniforms: Record<string, WebGLUniformLocation | null>;\n};\n\nfunction ShaderStrataBase({\n colors = [\"#050507\", \"#0a0a0d\", \"#111014\", \"#17161b\"],\n accent = \"#6733FF\",\n accentAmount = 0,\n layers = 14,\n amplitude = 0.16,\n speed = 1,\n className,\n}: ShaderStrataProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const stateRef = useRef<GlState | null>(null);\n const [handle] = useState(() => delayRender(\"shader-strata\"));\n const continuedRef = useRef(false);\n\n useEffect(() => {\n const canvas = canvasRef.current;\n if (!canvas || stateRef.current) return;\n const gl = canvas.getContext(\"webgl\", {\n antialias: false,\n preserveDrawingBuffer: true,\n });\n if (!gl) return;\n\n const compile = (type: number, src: string) => {\n const shader = gl.createShader(type);\n if (!shader) throw new Error(\"Failed to create WebGL shader\");\n gl.shaderSource(shader, src);\n gl.compileShader(shader);\n return shader;\n };\n const program = gl.createProgram();\n if (!program) return;\n gl.attachShader(program, compile(gl.VERTEX_SHADER, VERT));\n gl.attachShader(program, compile(gl.FRAGMENT_SHADER, FRAG));\n gl.linkProgram(program);\n // biome-ignore lint/correctness/useHookAtTopLevel: gl.useProgram is a WebGL method, not a React hook\n gl.useProgram(program);\n\n const buf = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buf);\n gl.bufferData(\n gl.ARRAY_BUFFER,\n new Float32Array([-1, -1, 3, -1, -1, 3]),\n gl.STATIC_DRAW,\n );\n const loc = gl.getAttribLocation(program, \"a_pos\");\n gl.enableVertexAttribArray(loc);\n gl.vertexAttribPointer(loc, 2, gl.FLOAT, false, 0, 0);\n\n const uniforms: GlState[\"uniforms\"] = {};\n for (const name of [\n \"u_res\",\n \"u_time\",\n \"u_layers\",\n \"u_amp\",\n \"u_c0\",\n \"u_c1\",\n \"u_c2\",\n \"u_c3\",\n \"u_accent\",\n \"u_accentAmt\",\n ]) {\n uniforms[name] = gl.getUniformLocation(program, name);\n }\n stateRef.current = { gl, uniforms };\n }, []);\n\n useEffect(() => {\n const state = stateRef.current;\n const canvas = canvasRef.current;\n if (!state || !canvas) return;\n const { gl, uniforms } = state;\n\n gl.viewport(0, 0, canvas.width, canvas.height);\n gl.uniform2f(uniforms.u_res, canvas.width, canvas.height);\n gl.uniform1f(uniforms.u_time, (frame / fps) * speed);\n gl.uniform1f(uniforms.u_layers, layers);\n gl.uniform1f(uniforms.u_amp, amplitude);\n gl.uniform3fv(uniforms.u_c0, hexToRgb(colors[0]));\n gl.uniform3fv(uniforms.u_c1, hexToRgb(colors[1]));\n gl.uniform3fv(uniforms.u_c2, hexToRgb(colors[2]));\n gl.uniform3fv(uniforms.u_c3, hexToRgb(colors[3]));\n gl.uniform3fv(uniforms.u_accent, hexToRgb(accent));\n gl.uniform1f(uniforms.u_accentAmt, accentAmount);\n gl.drawArrays(gl.TRIANGLES, 0, 3);\n\n if (!continuedRef.current) {\n continuedRef.current = true;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n }\n }, [\n frame,\n fps,\n speed,\n layers,\n amplitude,\n colors,\n accent,\n accentAmount,\n handle,\n ]);\n\n return (\n <div className={className} style={{ position: \"absolute\", inset: 0 }}>\n <canvas\n ref={canvasRef}\n width={width}\n height={height}\n style={{ width: \"100%\", height: \"100%\", display: \"block\" }}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n layers: {\n type: \"number\",\n min: 4,\n max: 30,\n step: 1,\n default: 14,\n description: \"Layers\",\n hiddenFromList: false,\n },\n amplitude: {\n type: \"number\",\n min: 0,\n max: 0.5,\n step: 0.01,\n default: 0.16,\n description: \"Amplitude\",\n hiddenFromList: false,\n },\n accent: {\n type: \"color\",\n default: \"#6733FF\",\n description: \"Accent\",\n },\n accentAmount: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0,\n description: \"Accent amount\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"layers\",\"amplitude\",\"accent\",\"accentAmount\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n layers: 14,\n amplitude: 0.16,\n accent: \"#6733FF\",\n accentAmount: 0,\n};\n\ntype ShaderStrataElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderStrataBase>;\n\nconst ShaderStrataInner = forwardRef<\n HTMLDivElement,\n ShaderStrataElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderStrata>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderStrataBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderStrataBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderStrata = Interactive.withSchema({\n Component: ShaderStrataInner,\n componentName: \"<ShaderStrata>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-swirl.json b/registry-artifacts/elements/shader-swirl.jsonnew file mode 100644index 00000000..c0d6e3af--- /dev/null+++ b/registry-artifacts/elements/shader-swirl.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Swirl",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-swirl",+ "sourceCode": "import { Swirl, type SwirlProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\nconst NEUTRAL_COLORS = [\"#52527a\", \"#3a3a5c\", \"#232338\"];\n\ninterface ShaderSwirlProps extends Omit<SwirlProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderSwirlBase({\n speed = 1,\n colors = NEUTRAL_COLORS,\n colorBack = \"#12121a\",\n bandCount = 4,\n twist = 0.1,\n softness = 0.2,\n className,\n ...rest\n}: ShaderSwirlProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-swirl\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <Swirl\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colors={colors}\n colorBack={colorBack}\n bandCount={bandCount}\n twist={twist}\n softness={softness}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n bandCount: {\n type: \"number\",\n min: 1,\n max: 12,\n step: 1,\n default: 4,\n description: \"Bands\",\n hiddenFromList: false,\n },\n twist: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.1,\n description: \"Twist\",\n hiddenFromList: false,\n },\n softness: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.2,\n description: \"Softness\",\n hiddenFromList: false,\n },\n colorBack: {\n type: \"color\",\n default: \"#12121a\",\n description: \"Background\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"bandCount\",\"twist\",\"softness\",\"colorBack\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n bandCount: 4,\n twist: 0.1,\n softness: 0.2,\n colorBack: \"#12121a\",\n};\n\ntype ShaderSwirlElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderSwirlBase>;\n\nconst ShaderSwirlInner = forwardRef<\n HTMLDivElement,\n ShaderSwirlElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderSwirl>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderSwirlBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderSwirlBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderSwirl = Interactive.withSchema({\n Component: ShaderSwirlInner,\n componentName: \"<ShaderSwirl>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-voronoi.json b/registry-artifacts/elements/shader-voronoi.jsonnew file mode 100644index 00000000..26cc0fbb--- /dev/null+++ b/registry-artifacts/elements/shader-voronoi.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Voronoi",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-voronoi",+ "sourceCode": "import { Voronoi, type VoronoiProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\nconst NEUTRAL_COLORS = [\"#3a3a5c\", \"#52527a\"];\n\ninterface ShaderVoronoiProps\n extends Omit<VoronoiProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderVoronoiBase({\n speed = 1,\n colors = NEUTRAL_COLORS,\n colorGap = \"#12121a\",\n distortion = 0.4,\n gap = 0.04,\n glow = 0,\n className,\n ...rest\n}: ShaderVoronoiProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-voronoi\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <Voronoi\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colors={colors}\n colorGap={colorGap}\n distortion={distortion}\n gap={gap}\n glow={glow}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n distortion: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.4,\n description: \"Distortion\",\n hiddenFromList: false,\n },\n gap: {\n type: \"number\",\n min: 0,\n max: 0.2,\n step: 0.01,\n default: 0.04,\n description: \"Gap\",\n hiddenFromList: false,\n },\n glow: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0,\n description: \"Glow\",\n hiddenFromList: false,\n },\n colorGap: {\n type: \"color\",\n default: \"#12121a\",\n description: \"Gap Color\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"distortion\",\"gap\",\"glow\",\"colorGap\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n distortion: 0.4,\n gap: 0.04,\n glow: 0,\n colorGap: \"#12121a\",\n};\n\ntype ShaderVoronoiElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderVoronoiBase>;\n\nconst ShaderVoronoiInner = forwardRef<\n HTMLDivElement,\n ShaderVoronoiElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderVoronoi>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderVoronoiBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderVoronoiBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderVoronoi = Interactive.withSchema({\n Component: ShaderVoronoiInner,\n componentName: \"<ShaderVoronoi>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-warp.json b/registry-artifacts/elements/shader-warp.jsonnew file mode 100644index 00000000..1b88038c--- /dev/null+++ b/registry-artifacts/elements/shader-warp.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Warp",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-warp",+ "sourceCode": "import { Warp, type WarpProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\nconst NEUTRAL_COLORS = [\"#12121a\", \"#3a3a5c\", \"#12121a\", \"#52527a\"];\n\ninterface ShaderWarpProps extends Omit<WarpProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderWarpBase({\n speed = 1,\n colors = NEUTRAL_COLORS,\n proportion = 0.5,\n softness = 1,\n distortion = 0.2,\n swirl = 0.4,\n className,\n ...rest\n}: ShaderWarpProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-warp\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <Warp\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colors={colors}\n proportion={proportion}\n softness={softness}\n distortion={distortion}\n swirl={swirl}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n distortion: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.2,\n description: \"Distortion\",\n hiddenFromList: false,\n },\n swirl: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.4,\n description: \"Swirl\",\n hiddenFromList: false,\n },\n softness: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 1,\n description: \"Softness\",\n hiddenFromList: false,\n },\n proportion: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.5,\n description: \"Proportion\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"distortion\",\"swirl\",\"softness\",\"proportion\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n distortion: 0.2,\n swirl: 0.4,\n softness: 1,\n proportion: 0.5,\n};\n\ntype ShaderWarpElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderWarpBase>;\n\nconst ShaderWarpInner = forwardRef<\n HTMLDivElement,\n ShaderWarpElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderWarp>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderWarpBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderWarpBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderWarp = Interactive.withSchema({\n Component: ShaderWarpInner,\n componentName: \"<ShaderWarp>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-water.json b/registry-artifacts/elements/shader-water.jsonnew file mode 100644index 00000000..6c55f247--- /dev/null+++ b/registry-artifacts/elements/shader-water.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@paper-design/shaders-react",+ "version": "0.0.76"+ }+ ],+ "dimensions": null,+ "displayName": "Shader Water",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-water",+ "sourceCode": "import { Water, type WaterProps } from \"@paper-design/shaders-react\";\nimport { forwardRef, useCallback, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\ninterface ShaderWaterProps extends Omit<WaterProps, \"frame\" | \"ref\"> {}\n\nfunction ShaderWaterBase({\n speed = 1,\n colorBack = \"#16202b\",\n colorHighlight = \"#5a6a7a\",\n highlights = 0.06,\n waves = 0.3,\n caustic = 0.08,\n className,\n ...rest\n}: ShaderWaterProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n\n const [handle] = useState(() => delayRender(\"shader-water\"));\n const gate = useCallback(\n (element: HTMLDivElement | null) => {\n if (!element) return;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n },\n [handle],\n );\n\n return (\n <div\n ref={gate}\n className={className}\n style={{ position: \"absolute\", inset: 0 }}\n >\n <Water\n speed={0}\n frame={(frame / fps) * speed * 1000}\n colorBack={colorBack}\n colorHighlight={colorHighlight}\n highlights={highlights}\n waves={waves}\n caustic={caustic}\n fit=\"cover\"\n width={width}\n height={height}\n {...rest}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n waves: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0.3,\n description: \"Waves\",\n hiddenFromList: false,\n },\n caustic: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.02,\n default: 0.08,\n description: \"Caustic\",\n hiddenFromList: false,\n },\n highlights: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.02,\n default: 0.06,\n description: \"Highlights\",\n hiddenFromList: false,\n },\n colorBack: {\n type: \"color\",\n default: \"#16202b\",\n description: \"Background\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"waves\",\"caustic\",\"highlights\",\"colorBack\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n waves: 0.3,\n caustic: 0.08,\n highlights: 0.06,\n colorBack: \"#16202b\",\n};\n\ntype ShaderWaterElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderWaterBase>;\n\nconst ShaderWaterInner = forwardRef<\n HTMLDivElement,\n ShaderWaterElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderWater>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderWaterBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderWaterBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderWater = Interactive.withSchema({\n Component: ShaderWaterInner,\n componentName: \"<ShaderWater>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shader-weave.json b/registry-artifacts/elements/shader-weave.jsonnew file mode 100644index 00000000..b7a3091d--- /dev/null+++ b/registry-artifacts/elements/shader-weave.json@@ -0,0 +1,14 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": null,+ "displayName": "Shader Weave",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "shader-weave",+ "sourceCode": "import { forwardRef, useEffect, useImperativeHandle, useRef, useState, type ComponentProps } from \"react\";\nimport { Interactive, Sequence, continueRender, delayRender, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\n// A woven substrate — warp and weft threads crossing on a domain-warped grid,\n// interlacing over/under like real cloth, with a slow sheen of light travelling\n// across the fabric rather than the grid scrolling. The metaphor: the base a\n// component is woven from. Written for the remocn registry as a custom WebGL\n// shader (not a paper-design wrapper): frame-driven, deterministic, no\n// wall-clock time anywhere.\n//\n// `accent` / `accentAmount` run a coloured thread through the weave — the tint\n// lives mostly IN the threads, so raising `accentAmount` mid-video reads as a\n// violet thread lighting up across the whole cloth (a natural carrier for a\n// \"new base\" story). The grid itself never moves; only the light does.\n\ninterface ShaderWeaveProps {\n /** Palette: fabric-shadow, fabric-mid, fabric-warm, thread-highlight. 4 stops. */\n colors?: [string, string, string, string];\n /** Tint carried by the threads. */\n accent?: string;\n /** 0..1 — how much accent the threads take. */\n accentAmount?: number;\n /** Thread density across the frame height. */\n scale?: number;\n /** Domain-warp amount — how hand-woven the threads bend (fractions of frame). */\n warp?: number;\n /** Global time multiplier (drives only the sheen, never the grid position). */\n speed?: number;\n className?: string;\n}\n\nconst VERT = `\nattribute vec2 a_pos;\nvoid main() {\n gl_Position = vec4(a_pos, 0.0, 1.0);\n}\n`;\n\nconst FRAG = `\nprecision highp float;\n\nuniform vec2 u_res;\nuniform float u_time;\nuniform float u_scale;\nuniform float u_warp;\nuniform vec3 u_c0;\nuniform vec3 u_c1;\nuniform vec3 u_c2;\nuniform vec3 u_c3;\nuniform vec3 u_accent;\nuniform float u_accentAmt;\n\nfloat hash(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);\n}\n\nfloat noise(vec2 p) {\n vec2 i = floor(p);\n vec2 f = fract(p);\n vec2 u = f * f * (3.0 - 2.0 * f);\n return mix(\n mix(hash(i), hash(i + vec2(1.0, 0.0)), u.x),\n mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), u.x),\n u.y\n );\n}\n\nfloat fbm(vec2 p) {\n float v = 0.0;\n float a = 0.5;\n for (int i = 0; i < 4; i++) {\n v += a * noise(p);\n p *= 2.03;\n a *= 0.5;\n }\n return v;\n}\n\n// A thin ridge line at every integer of x — the profile of one thread.\nfloat thread(float x, float sharp) {\n float f = fract(x);\n float d = min(f, 1.0 - f);\n return smoothstep(sharp, 0.0, d);\n}\n\nvoid main() {\n vec2 uv = gl_FragCoord.xy / u_res;\n float aspect = u_res.x / u_res.y;\n\n // Domain warp — bend the weave so it reads hand-made, not a CSS grid. The\n // warp field drifts very slowly; the grid lattice itself stays put.\n vec2 q = uv + u_warp * vec2(\n fbm(uv * 3.0 + vec2(u_time * 0.03, 0.0)) - 0.5,\n fbm(uv * 3.0 + vec2(7.3, -u_time * 0.02)) - 0.5\n );\n\n float qx = q.x * u_scale * aspect;\n float qy = q.y * u_scale;\n\n float tw = thread(qx, 0.09); // warp (vertical threads)\n float tf = thread(qy, 0.09); // weft (horizontal threads)\n\n // Interlace: per cell, one direction sits over the other.\n float over = mod(floor(qx) + floor(qy), 2.0);\n float warpB = tw * (over < 0.5 ? 1.0 : 0.5);\n float weftB = tf * (over < 0.5 ? 0.5 : 1.0);\n float weave = max(warpB, weftB);\n\n // Sheen — light travelling across a still cloth (this is the only motion).\n float sheen = fbm(q * 1.7 + vec2(u_time * 0.05, u_time * 0.028));\n weave *= 0.3 + 0.95 * sheen;\n\n // Fabric ground: near-black, faintly breathing between the shadow stops.\n vec3 base = mix(u_c0, u_c1, smoothstep(0.15, 0.8, sheen));\n base = mix(base, u_c2, smoothstep(0.62, 1.0, sheen) * 0.5);\n\n // Threads sit a touch above the ground.\n vec3 col = mix(base, u_c3, clamp(weave, 0.0, 1.0) * 0.55);\n\n // The accent runs through the threads — a violet thread across the cloth.\n float amt = clamp(u_accentAmt, 0.0, 1.0);\n col = mix(col, u_accent, amt * (0.08 + 0.34 * weave));\n col += u_accent * amt * 0.015;\n\n // A whisper of living grain, time-derived so it stays deterministic.\n col += (hash(gl_FragCoord.xy + floor(u_time * 9.0)) - 0.5) * 0.012;\n\n gl_FragColor = vec4(col, 1.0);\n}\n`;\n\nconst hexToRgb = (hex: string): [number, number, number] => {\n const h = hex.replace(\"#\", \"\");\n const v =\n h.length === 3\n ? h\n .split(\"\")\n .map((c) => c + c)\n .join(\"\")\n : h;\n const n = parseInt(v, 16);\n return [((n >> 16) & 255) / 255, ((n >> 8) & 255) / 255, (n & 255) / 255];\n};\n\ntype GlState = {\n gl: WebGLRenderingContext;\n uniforms: Record<string, WebGLUniformLocation | null>;\n};\n\nfunction ShaderWeaveBase({\n colors = [\"#050506\", \"#0a0a0c\", \"#111015\", \"#1b1a22\"],\n accent = \"#6733FF\",\n accentAmount = 0,\n scale = 22,\n warp = 0.03,\n speed = 1,\n className,\n}: ShaderWeaveProps) {\n const frame = useCurrentFrame();\n const { fps, width, height } = useVideoConfig();\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const stateRef = useRef<GlState | null>(null);\n const [handle] = useState(() => delayRender(\"shader-weave\"));\n const continuedRef = useRef(false);\n\n useEffect(() => {\n const canvas = canvasRef.current;\n if (!canvas || stateRef.current) return;\n const gl = canvas.getContext(\"webgl\", {\n antialias: false,\n preserveDrawingBuffer: true,\n });\n if (!gl) return;\n\n const compile = (type: number, src: string) => {\n const shader = gl.createShader(type);\n if (!shader) throw new Error(\"Failed to create WebGL shader\");\n gl.shaderSource(shader, src);\n gl.compileShader(shader);\n return shader;\n };\n const program = gl.createProgram();\n if (!program) return;\n gl.attachShader(program, compile(gl.VERTEX_SHADER, VERT));\n gl.attachShader(program, compile(gl.FRAGMENT_SHADER, FRAG));\n gl.linkProgram(program);\n // biome-ignore lint/correctness/useHookAtTopLevel: gl.useProgram is a WebGL method, not a React hook\n gl.useProgram(program);\n\n const buf = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buf);\n gl.bufferData(\n gl.ARRAY_BUFFER,\n new Float32Array([-1, -1, 3, -1, -1, 3]),\n gl.STATIC_DRAW,\n );\n const loc = gl.getAttribLocation(program, \"a_pos\");\n gl.enableVertexAttribArray(loc);\n gl.vertexAttribPointer(loc, 2, gl.FLOAT, false, 0, 0);\n\n const uniforms: GlState[\"uniforms\"] = {};\n for (const name of [\n \"u_res\",\n \"u_time\",\n \"u_scale\",\n \"u_warp\",\n \"u_c0\",\n \"u_c1\",\n \"u_c2\",\n \"u_c3\",\n \"u_accent\",\n \"u_accentAmt\",\n ]) {\n uniforms[name] = gl.getUniformLocation(program, name);\n }\n stateRef.current = { gl, uniforms };\n }, []);\n\n useEffect(() => {\n const state = stateRef.current;\n const canvas = canvasRef.current;\n if (!state || !canvas) return;\n const { gl, uniforms } = state;\n\n gl.viewport(0, 0, canvas.width, canvas.height);\n gl.uniform2f(uniforms.u_res, canvas.width, canvas.height);\n gl.uniform1f(uniforms.u_time, (frame / fps) * speed);\n gl.uniform1f(uniforms.u_scale, scale);\n gl.uniform1f(uniforms.u_warp, warp);\n gl.uniform3fv(uniforms.u_c0, hexToRgb(colors[0]));\n gl.uniform3fv(uniforms.u_c1, hexToRgb(colors[1]));\n gl.uniform3fv(uniforms.u_c2, hexToRgb(colors[2]));\n gl.uniform3fv(uniforms.u_c3, hexToRgb(colors[3]));\n gl.uniform3fv(uniforms.u_accent, hexToRgb(accent));\n gl.uniform1f(uniforms.u_accentAmt, accentAmount);\n gl.drawArrays(gl.TRIANGLES, 0, 3);\n\n if (!continuedRef.current) {\n continuedRef.current = true;\n requestAnimationFrame(() =>\n requestAnimationFrame(() => continueRender(handle)),\n );\n }\n }, [frame, fps, speed, scale, warp, colors, accent, accentAmount, handle]);\n\n return (\n <div className={className} style={{ position: \"absolute\", inset: 0 }}>\n <canvas\n ref={canvasRef}\n width={width}\n height={height}\n style={{ width: \"100%\", height: \"100%\", display: \"block\" }}\n />\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n scale: {\n type: \"number\",\n min: 6,\n max: 48,\n step: 1,\n default: 22,\n description: \"Scale\",\n hiddenFromList: false,\n },\n warp: {\n type: \"number\",\n min: 0,\n max: 0.2,\n step: 0.01,\n default: 0.03,\n description: \"Warp\",\n hiddenFromList: false,\n },\n accent: {\n type: \"color\",\n default: \"#6733FF\",\n description: \"Accent\",\n },\n accentAmount: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 0,\n description: \"Accent amount\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"speed\",\"scale\",\"warp\",\"accent\",\"accentAmount\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n speed: 1,\n scale: 22,\n warp: 0.03,\n accent: \"#6733FF\",\n accentAmount: 0,\n};\n\ntype ShaderWeaveElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof ShaderWeaveBase>;\n\nconst ShaderWeaveInner = forwardRef<\n HTMLDivElement,\n ShaderWeaveElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShaderWeave>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <ShaderWeaveBase\n {...(componentProps as unknown as ComponentProps<typeof ShaderWeaveBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const ShaderWeave = Interactive.withSchema({\n Component: ShaderWeaveInner,\n componentName: \"<ShaderWeave>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/shared-axis-y.json b/registry-artifacts/elements/shared-axis-y.jsonnew file mode 100644index 00000000..64fe18ba--- /dev/null+++ b/registry-artifacts/elements/shared-axis-y.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 720,+ "height": 100+ },+ "displayName": "Shared Axis Y",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "shared-axis-y",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface SharedAxisYProps {\n fromText: string;\n toText: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction SharedAxisYBase({\n fromText,\n toText,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: SharedAxisYProps) {\n const frame = useCurrentFrame() * speed;\n\n const fromWords = fromText.split(\" \");\n const toWords = toText.split(\" \");\n\n const enterDur = 5;\n const exitDur = 4;\n const enterStagger = 2;\n const exitStagger = 2;\n const overlapF = 0;\n const microDelayF = 1;\n\n const exitTotal = exitDur + (fromWords.length - 1) * exitStagger;\n const newStart = Math.max(0, exitTotal - overlapF + microDelayF);\n\n const fontStack =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"transparent\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n }}\n >\n {fromWords.map((word, i) => {\n const local = frame - i * exitStagger;\n const opacity = interpolate(local, [0, exitDur], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.step1,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n opacity,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n }}\n >\n {toWords.map((word, j) => {\n const local = frame - newStart - j * enterStagger;\n const opacity = interpolate(local, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.step1,\n });\n return (\n <span\n key={j}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n opacity,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n fromText: {\n type: \"text-content\",\n default: \"Layered navigation.\",\n description: \"From text\",\n },\n toText: {\n type: \"text-content\",\n default: \"Hierarchy made clear.\",\n description: \"To text\",\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 720,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"fromText\",\"toText\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n fromText: \"Layered navigation.\",\n toText: \"Hierarchy made clear.\",\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype SharedAxisYElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof SharedAxisYBase>;\n\nconst SharedAxisYInner = forwardRef<\n HTMLDivElement,\n SharedAxisYElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 720, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<SharedAxisY>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <SharedAxisYBase\n {...(componentProps as unknown as ComponentProps<typeof SharedAxisYBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const SharedAxisY = Interactive.withSchema({\n Component: SharedAxisYInner,\n componentName: \"<SharedAxisY>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/shared-axis-z.json b/registry-artifacts/elements/shared-axis-z.jsonnew file mode 100644index 00000000..6c666e1a--- /dev/null+++ b/registry-artifacts/elements/shared-axis-z.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 870,+ "height": 100+ },+ "displayName": "Shared Axis Z",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "shared-axis-z",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface SharedAxisZProps {\n fromText: string;\n toText: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction SharedAxisZBase({\n fromText,\n toText,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: SharedAxisZProps) {\n const frame = useCurrentFrame() * speed;\n\n const enterDur = 16;\n const exitDur = 11;\n const overlapF = 3;\n const microDelayF = 1;\n\n const exitTotal = exitDur;\n const newStart = Math.max(0, exitTotal - overlapF + microDelayF);\n\n const exitEasing = Easing.bezier(0.4, 0, 1, 1);\n const enterEasing = Easing.bezier(0.2, 0, 0, 1);\n\n const fromOpacity = interpolate(frame, [0, exitDur], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n const fromScale = interpolate(frame, [0, exitDur], [1, 1.06], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n const fromBlur = interpolate(frame, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const local = frame - newStart;\n const toOpacity = interpolate(local, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const toScale = interpolate(local, [0, enterDur], [0.9, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const toBlur = interpolate(local, [0, enterDur], [2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const fontStack =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"transparent\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity: fromOpacity,\n scale: `${fromScale}`,\n filter: `blur(${fromBlur}px)`,\n }}\n >\n {fromText}\n </span>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity: toOpacity,\n scale: `${toScale}`,\n filter: `blur(${toBlur}px)`,\n }}\n >\n {toText}\n </span>\n </div>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n fromText: {\n type: \"text-content\",\n default: \"Zooming between states.\",\n description: \"From text\",\n },\n toText: {\n type: \"text-content\",\n default: \"Elevate and settle.\",\n description: \"To text\",\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 870,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"fromText\",\"toText\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n fromText: \"Zooming between states.\",\n toText: \"Elevate and settle.\",\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype SharedAxisZElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof SharedAxisZBase>;\n\nconst SharedAxisZInner = forwardRef<\n HTMLDivElement,\n SharedAxisZElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 870, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<SharedAxisZ>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <SharedAxisZBase\n {...(componentProps as unknown as ComponentProps<typeof SharedAxisZBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const SharedAxisZ = Interactive.withSchema({\n Component: SharedAxisZInner,\n componentName: \"<SharedAxisZ>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/shimmer-sweep.json b/registry-artifacts/elements/shimmer-sweep.jsonnew file mode 100644index 00000000..b62ccf19--- /dev/null+++ b/registry-artifacts/elements/shimmer-sweep.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 500,+ "height": 130+ },+ "displayName": "Shimmer Sweep",+ "durationInFrames": 120,+ "installationMode": "component-owned-sequence",+ "slug": "shimmer-sweep",+ "sourceCode": "import { Interactive, Sequence, interpolate, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface ShimmerSweepProps {\n text: string;\n baseColor?: string;\n shineColor?: string;\n fontSize?: number;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction ShimmerSweepBase({\n text,\n baseColor = \"#3f3f46\",\n shineColor = \"#fafafa\",\n fontSize = 96,\n fontWeight = 700,\n speed = 1,\n className,\n}: ShimmerSweepProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const position = interpolate(\n frame,\n [0, durationInFrames * 0.8],\n [200, -100],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n\n const textStyle: React.CSSProperties = {\n fontSize,\n fontWeight,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n margin: 0,\n lineHeight: 1,\n };\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"white\",\n }}\n >\n <div style={{ position: \"relative\", display: \"inline-block\" }}>\n <span style={{ ...textStyle, color: baseColor }}>{text}</span>\n <span\n className={className}\n style={{\n ...textStyle,\n position: \"absolute\",\n inset: 0,\n color: \"transparent\",\n backgroundClip: \"text\",\n WebkitBackgroundClip: \"text\",\n backgroundImage: `linear-gradient(110deg, transparent 30%, ${shineColor} 50%, transparent 70%)`,\n backgroundSize: \"200% 100%\",\n backgroundPosition: `${position}% 50%`,\n }}\n >\n {text}\n </span>\n </div>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"Generating\",\n description: \"Text\",\n },\n baseColor: {\n type: \"color\",\n default: \"#3f3f46\",\n description: \"Base color\",\n },\n shineColor: {\n type: \"color\",\n default: \"#fafafa\",\n description: \"Shine color\",\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 200,\n step: 1,\n default: 96,\n description: \"Font size\",\n hiddenFromList: false,\n },\n fontWeight: {\n type: \"enum\",\n default: \"700\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 500,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 130,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"baseColor\",\"shineColor\",\"fontSize\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"Generating\",\n baseColor: \"#3f3f46\",\n shineColor: \"#fafafa\",\n fontSize: 96,\n fontWeight: \"700\",\n speed: 1,\n};\n\ntype ShimmerSweepElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ShimmerSweepBase>;\n\nconst ShimmerSweepInner = forwardRef<\n HTMLDivElement,\n ShimmerSweepElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 500, height = 130, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShimmerSweep>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ShimmerSweepBase\n {...(componentProps as unknown as ComponentProps<typeof ShimmerSweepBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ShimmerSweep = Interactive.withSchema({\n Component: ShimmerSweepInner,\n componentName: \"<ShimmerSweep>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 120+}diff --git a/registry-artifacts/elements/short-slide-down.json b/registry-artifacts/elements/short-slide-down.jsonnew file mode 100644index 00000000..62e8576f--- /dev/null+++ b/registry-artifacts/elements/short-slide-down.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 640,+ "height": 100+ },+ "displayName": "Short Slide Down",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "short-slide-down",+ "sourceCode": "import { forwardRef, useImperativeHandle, useMemo, useRef, type ComponentProps } from \"react\";\nimport { Easing, Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\ninterface ShortSlideDownProps {\n text: string;\n entryOffset?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\nfunction ShortSlideDownBase({\n text,\n entryOffset = 28,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: ShortSlideDownProps) {\n const frame = useCurrentFrame() * speed;\n\n const words = useMemo(() => text.split(\" \"), [text]);\n const n = words.length;\n\n const lineGap = 12;\n const rowHeight = fontSize;\n const firstDur = 11;\n const pushDur = 15;\n const travelDur = 8;\n const entryScale = 0.992;\n const entryBlur = 2.4;\n const reflowBlur = 0.7;\n const firstWordY = -14;\n const easing = Easing.bezier(0.2, 0.8, 0.2, 1);\n\n const positionsAt = useMemo(() => {\n const out: number[][] = [];\n for (let k = 1; k <= n; k++) {\n const total = rowHeight * k + lineGap * (k - 1);\n const start = -total / 2 + rowHeight / 2;\n const ys: number[] = [];\n for (let j = 0; j < k; j++) ys.push(start + j * (rowHeight + lineGap));\n out.push(ys);\n }\n return out;\n }, [n, rowHeight]);\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <div\n className={className}\n style={{\n position: \"relative\",\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: FONT_FAMILY,\n whiteSpace: \"nowrap\",\n }}\n >\n {words.map((word, j) => {\n const entryStart = j === 0 ? 0 : firstDur + (j - 1) * pushDur;\n const entryEnd = entryStart + (j === 0 ? firstDur : pushDur);\n const targetY = positionsAt[j][j];\n const yFrom = j === 0 ? firstWordY : targetY - entryOffset;\n\n let y = targetY;\n let opacity = 1;\n let scale = 1;\n let blur = 0;\n\n if (frame < entryStart) {\n opacity = 0;\n y = yFrom;\n scale = entryScale;\n blur = entryBlur;\n } else if (frame <= entryEnd) {\n const range: [number, number] = [entryStart, entryEnd];\n const travelRange: [number, number] = [\n entryStart,\n Math.min(entryStart + travelDur, entryEnd),\n ];\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n easing,\n };\n y = interpolate(frame, travelRange, [yFrom, targetY], opts);\n opacity = interpolate(frame, range, [0, 1], opts);\n scale = interpolate(frame, range, [entryScale, 1], opts);\n blur = interpolate(frame, range, [entryBlur, 0], opts);\n } else {\n for (let w = j + 1; w < n; w++) {\n const pushStart = firstDur + (w - 1) * pushDur;\n const pushEnd = pushStart + pushDur;\n const fromY = positionsAt[w - 1][j];\n const toY = positionsAt[w][j];\n if (frame >= pushEnd) {\n y = toY;\n } else if (frame >= pushStart) {\n y = interpolate(\n frame,\n [pushStart, Math.min(pushStart + travelDur, pushEnd)],\n [fromY, toY],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n },\n );\n blur = interpolate(\n frame,\n [pushStart, (pushStart + pushEnd) / 2, pushEnd],\n [0, reflowBlur, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n break;\n } else {\n y = fromY;\n break;\n }\n }\n }\n\n return (\n <span\n key={j}\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n whiteSpace: \"nowrap\",\n backfaceVisibility: \"hidden\",\n transform: `translate(-50%, -50%) translate3d(0px, ${y}px, 0) scale(${scale})`,\n filter: `blur(${blur}px)`,\n opacity,\n }}\n >\n {word}\n </span>\n );\n })}\n </div>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"Build from above.\",\n description: \"Text\",\n },\n entryOffset: {\n type: \"number\",\n min: 8,\n max: 80,\n step: 1,\n default: 28,\n description: \"Entry offset\",\n hiddenFromList: false,\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 640,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"entryOffset\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"Build from above.\",\n entryOffset: 28,\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype ShortSlideDownElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ShortSlideDownBase>;\n\nconst ShortSlideDownInner = forwardRef<\n HTMLDivElement,\n ShortSlideDownElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 640, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShortSlideDown>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ShortSlideDownBase\n {...(componentProps as unknown as ComponentProps<typeof ShortSlideDownBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ShortSlideDown = Interactive.withSchema({\n Component: ShortSlideDownInner,\n componentName: \"<ShortSlideDown>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/short-slide-right.json b/registry-artifacts/elements/short-slide-right.jsonnew file mode 100644index 00000000..8d74b097--- /dev/null+++ b/registry-artifacts/elements/short-slide-right.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 640,+ "height": 100+ },+ "displayName": "Short Slide Right",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "short-slide-right",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface ShortSlideRightProps {\n text: string;\n distance?: number;\n staggerDelay?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction ShortSlideRightBase({\n text,\n distance = 24,\n staggerDelay = 3,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: ShortSlideRightProps) {\n const frame = useCurrentFrame() * speed;\n\n const words = text.split(\" \");\n\n const enterDur = 16;\n const travelDur = 8;\n const wordOpacityDur = 6;\n const easing = Easing.bezier(0.2, 0.8, 0.2, 1);\n\n const x = interpolate(frame, [0, travelDur], [-distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n\n const blurVal = interpolate(frame, [0, enterDur], [1.2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n display: \"inline-block\",\n translate: `${x}px`,\n filter: `blur(${blurVal}px)`,\n }}\n >\n {words.map((word, i) => {\n const opacity = interpolate(\n frame - i * staggerDelay,\n [0, wordOpacityDur],\n [0, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n },\n );\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n opacity,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"Move with intent.\",\n description: \"Text\",\n },\n distance: {\n type: \"number\",\n min: 0,\n max: 120,\n step: 1,\n default: 24,\n description: \"Distance\",\n hiddenFromList: false,\n },\n staggerDelay: {\n type: \"number\",\n min: 0,\n max: 12,\n step: 1,\n default: 3,\n description: \"Stagger\",\n hiddenFromList: false,\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 640,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"distance\",\"staggerDelay\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"Move with intent.\",\n distance: 24,\n staggerDelay: 3,\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype ShortSlideRightElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ShortSlideRightBase>;\n\nconst ShortSlideRightInner = forwardRef<\n HTMLDivElement,\n ShortSlideRightElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 640, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ShortSlideRight>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ShortSlideRightBase\n {...(componentProps as unknown as ComponentProps<typeof ShortSlideRightBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ShortSlideRight = Interactive.withSchema({\n Component: ShortSlideRightInner,\n componentName: \"<ShortSlideRight>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/simulated-cursor.json b/registry-artifacts/elements/simulated-cursor.jsonnew file mode 100644index 00000000..e6f6ec73--- /dev/null+++ b/registry-artifacts/elements/simulated-cursor.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 890,+ "height": 450+ },+ "displayName": "Simulated Cursor",+ "durationInFrames": 150,+ "installationMode": "component-owned-sequence",+ "slug": "simulated-cursor",+ "sourceCode": "import { Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface CursorPoint {\n x: number;\n y: number;\n hold?: number;\n click?: boolean;\n}\n\ninterface SimulatedCursorProps {\n points?: CursorPoint[];\n color?: string;\n size?: number;\n speed?: number;\n className?: string;\n}\n\nconst DEFAULT_POINTS: CursorPoint[] = [\n { x: 200, y: 150, hold: 20 },\n { x: 800, y: 360, hold: 25, click: true },\n { x: 1050, y: 560, hold: 20 },\n];\n\nfunction SimulatedCursorBase({\n points = DEFAULT_POINTS,\n color = \"#ffffff\",\n size = 32,\n speed = 1,\n className,\n}: SimulatedCursorProps) {\n const frame = useCurrentFrame() * speed;\n const { fps, durationInFrames } = useVideoConfig();\n\n const travelPerLeg = 24;\n const segments: Array<{\n start: number;\n end: number;\n holdEnd: number;\n from: CursorPoint;\n to: CursorPoint;\n }> = [];\n\n let cursor = 0;\n for (let i = 0; i < points.length - 1; i++) {\n const from = points[i];\n const to = points[i + 1];\n const start = cursor;\n const end = start + travelPerLeg;\n const holdEnd = end + (to.hold ?? 15);\n segments.push({ start, end, holdEnd, from, to });\n cursor = holdEnd;\n }\n\n // Find current segment\n let x = points[0].x;\n let y = points[0].y;\n let activeClickFrame: number | null = null;\n let clickTarget: CursorPoint | null = null;\n\n if (segments.length === 0) {\n x = points[0].x;\n y = points[0].y;\n } else if (frame < segments[0].start + (points[0].hold ?? 0)) {\n x = points[0].x;\n y = points[0].y;\n } else {\n for (const seg of segments) {\n if (frame >= seg.start && frame < seg.holdEnd) {\n if (frame < seg.end) {\n // travelling\n x = interpolate(frame, [seg.start, seg.end], [seg.from.x, seg.to.x], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n y = interpolate(frame, [seg.start, seg.end], [seg.from.y, seg.to.y], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n } else {\n x = seg.to.x;\n y = seg.to.y;\n if (seg.to.click) {\n activeClickFrame = frame - seg.end;\n clickTarget = seg.to;\n }\n }\n break;\n }\n if (frame >= seg.holdEnd) {\n x = seg.to.x;\n y = seg.to.y;\n }\n }\n }\n\n // Click feedback\n let clickScale = 1;\n let rippleRadius = 0;\n let rippleOpacity = 0;\n if (activeClickFrame !== null && clickTarget) {\n const dip = spring({\n fps,\n frame: activeClickFrame,\n config: { damping: 10, stiffness: 200, mass: 0.6 },\n durationInFrames: 14,\n });\n clickScale = 1 - dip * 0.18;\n rippleRadius = interpolate(activeClickFrame, [0, 24], [4, 60], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n rippleOpacity = interpolate(activeClickFrame, [0, 24], [0.6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n }\n\n // Suppress unused warning when durationInFrames not used directly\n void durationInFrames;\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n overflow: \"hidden\",\n }}\n >\n {/* Click ripple */}\n {rippleOpacity > 0 && (\n <svg\n style={{\n position: \"absolute\",\n left: x - 80,\n top: y - 80,\n width: 160,\n height: 160,\n pointerEvents: \"none\",\n }}\n >\n <circle\n cx={80}\n cy={80}\n r={rippleRadius}\n fill=\"none\"\n stroke={color}\n strokeWidth={2}\n opacity={rippleOpacity}\n />\n </svg>\n )}\n\n {/* Cursor */}\n <div\n style={{\n position: \"absolute\",\n left: x,\n top: y,\n width: size,\n height: size,\n scale: `${clickScale}`,\n transformOrigin: \"top left\",\n zIndex: 2147483647,\n pointerEvents: \"none\",\n willChange: \"transform, left, top\",\n }}\n >\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5 3L5 19L9.5 14.5L12.5 21L15 20L12 13.5L18.5 13.5L5 3Z\"\n fill={color}\n stroke=\"#000000\"\n strokeWidth={1.2}\n strokeLinejoin=\"round\"\n />\n </svg>\n </div>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n color: {\n type: \"color\",\n default: \"#ffffff\",\n description: \"Color\",\n },\n size: {\n type: \"number\",\n min: 12,\n max: 96,\n step: 1,\n default: 32,\n description: \"Size\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 890,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 450,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"color\",\"size\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n color: \"#ffffff\",\n size: 32,\n speed: 1,\n};\n\ntype SimulatedCursorElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof SimulatedCursorBase>;\n\nconst SimulatedCursorInner = forwardRef<\n HTMLDivElement,\n SimulatedCursorElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 890, height = 450, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<SimulatedCursor>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <SimulatedCursorBase\n {...(componentProps as unknown as ComponentProps<typeof SimulatedCursorBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const SimulatedCursor = Interactive.withSchema({\n Component: SimulatedCursorInner,\n componentName: \"<SimulatedCursor>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 150+}diff --git a/registry-artifacts/elements/slot-machine-roll.json b/registry-artifacts/elements/slot-machine-roll.jsonnew file mode 100644index 00000000..e9ea0a45--- /dev/null+++ b/registry-artifacts/elements/slot-machine-roll.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 190,+ "height": 170+ },+ "displayName": "Slot Machine Roll",+ "durationInFrames": 90,+ "installationMode": "wrapped",+ "slug": "slot-machine-roll",+ "sourceCode": "import { spring, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface SlotMachineRollProps {\n from?: string;\n to?: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function SlotMachineRoll({\n from = \"$99\",\n to = \"$199\",\n fontSize = 120,\n color = \"#171717\",\n fontWeight = 700,\n speed = 1,\n className,\n}: SlotMachineRollProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const len = Math.max(from.length, to.length);\n const paddedFrom = from.padStart(len, \" \");\n const paddedTo = to.padStart(len, \" \");\n\n const columns = [];\n for (let i = 0; i < len; i++) {\n const raw = spring({\n frame: frame - i * 4,\n fps,\n config: { damping: 14 },\n });\n const t = Math.max(0, Math.min(1, raw));\n columns.push(\n <span\n key={i}\n style={{\n display: \"inline-block\",\n overflow: \"hidden\",\n height: \"1.1em\",\n lineHeight: \"1.1em\",\n verticalAlign: \"top\",\n width: \"0.7em\",\n textAlign: \"center\",\n }}\n >\n <span\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n translate: `0 ${-t * fontSize * 1.1}px`,\n }}\n >\n <span>{paddedFrom[i]}</span>\n <span>{paddedTo[i]}</span>\n </span>\n </span>,\n );\n }\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"white\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n lineHeight: 1.1,\n }}\n >\n {columns}\n </span>\n </div>\n );\n}"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/soft-blur-in.json b/registry-artifacts/elements/soft-blur-in.jsonnew file mode 100644index 00000000..248a08b4--- /dev/null+++ b/registry-artifacts/elements/soft-blur-in.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 600,+ "height": 100+ },+ "displayName": "Soft Blur In",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "soft-blur-in",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface SoftBlurInProps {\n text: string;\n blur?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction SoftBlurInBase({\n text,\n blur = 12,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: SoftBlurInProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 27;\n const charTravelFrames = 9;\n const staggerFrames = 1;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerFrames;\n const easing = Easing.bezier(0.22, 1, 0.36, 1);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charTravelFrames], [16, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const blurAmount = interpolate(\n local,\n [0, charDurationFrames],\n [blur, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\", easing },\n );\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n translate: `0 ${y}px`,\n filter: `blur(${blurAmount}px)`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"Think different.\",\n description: \"Text\",\n },\n blur: {\n type: \"number\",\n min: 1,\n max: 30,\n step: 1,\n default: 12,\n description: \"Blur\",\n hiddenFromList: false,\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 600,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"blur\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"Think different.\",\n blur: 12,\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype SoftBlurInElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof SoftBlurInBase>;\n\nconst SoftBlurInInner = forwardRef<\n HTMLDivElement,\n SoftBlurInElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 600, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<SoftBlurIn>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <SoftBlurInBase\n {...(componentProps as unknown as ComponentProps<typeof SoftBlurInBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const SoftBlurIn = Interactive.withSchema({\n Component: SoftBlurInInner,\n componentName: \"<SoftBlurIn>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/spring-scale-in.json b/registry-artifacts/elements/spring-scale-in.jsonnew file mode 100644index 00000000..f6c835c8--- /dev/null+++ b/registry-artifacts/elements/spring-scale-in.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 720,+ "height": 100+ },+ "displayName": "Spring Scale In",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "spring-scale-in",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface SpringScaleInProps {\n text: string;\n staggerDelay?: number;\n scaleFrom?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction SpringScaleInBase({\n text,\n staggerDelay = 3,\n scaleFrom = 0.7,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: SpringScaleInProps) {\n const frame = useCurrentFrame() * speed;\n\n const words = text.split(\" \");\n const wordDurationFrames = 11;\n const easing = Easing.bezier(0.34, 1.56, 0.64, 1);\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {words.map((word, i) => {\n const local = frame - i * staggerDelay;\n const opacity = interpolate(local, [0, wordDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const scale = interpolate(\n local,\n [0, wordDurationFrames],\n [scaleFrom, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n },\n );\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 50%\",\n opacity,\n scale: `${scale}`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"Fast. Crisp. Fluid.\",\n description: \"Text\",\n },\n staggerDelay: {\n type: \"number\",\n min: 1,\n max: 12,\n step: 1,\n default: 3,\n description: \"Stagger\",\n hiddenFromList: false,\n },\n scaleFrom: {\n type: \"number\",\n min: 0.1,\n max: 1,\n step: 0.05,\n default: 0.7,\n description: \"Scale from\",\n hiddenFromList: false,\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 720,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"staggerDelay\",\"scaleFrom\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"Fast. Crisp. Fluid.\",\n staggerDelay: 3,\n scaleFrom: 0.7,\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype SpringScaleInElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof SpringScaleInBase>;\n\nconst SpringScaleInInner = forwardRef<\n HTMLDivElement,\n SpringScaleInElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 720, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<SpringScaleIn>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <SpringScaleInBase\n {...(componentProps as unknown as ComponentProps<typeof SpringScaleInBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const SpringScaleIn = Interactive.withSchema({\n Component: SpringScaleInInner,\n componentName: \"<SpringScaleIn>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/staggered-fade-up.json b/registry-artifacts/elements/staggered-fade-up.jsonnew file mode 100644index 00000000..a57e39ef--- /dev/null+++ b/registry-artifacts/elements/staggered-fade-up.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 870,+ "height": 100+ },+ "displayName": "Staggered Fade Up",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "staggered-fade-up",+ "sourceCode": "import { Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface StaggeredFadeUpProps {\n text: string;\n staggerDelay?: number;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction StaggeredFadeUpBase({\n text,\n staggerDelay = 4,\n distance = 20,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: StaggeredFadeUpProps) {\n const frame = useCurrentFrame() * speed;\n\n const words = text.split(\" \");\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"white\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {words.map((word, i) => {\n const local = frame - i * staggerDelay;\n const opacity = interpolate(local, [0, 12], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n const y = interpolate(local, [0, 12], [distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n opacity,\n translate: `0 ${y}px`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"Ship faster with remocn\",\n description: \"Text\",\n },\n staggerDelay: {\n type: \"number\",\n min: 0,\n max: 30,\n step: 1,\n default: 4,\n description: \"Stagger delay\",\n hiddenFromList: false,\n },\n distance: {\n type: \"number\",\n min: 0,\n max: 120,\n step: 1,\n default: 20,\n description: \"Distance\",\n hiddenFromList: false,\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 870,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"staggerDelay\",\"distance\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"Ship faster with remocn\",\n staggerDelay: 4,\n distance: 20,\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype StaggeredFadeUpElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof StaggeredFadeUpBase>;\n\nconst StaggeredFadeUpInner = forwardRef<\n HTMLDivElement,\n StaggeredFadeUpElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 870, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<StaggeredFadeUp>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <StaggeredFadeUpBase\n {...(componentProps as unknown as ComponentProps<typeof StaggeredFadeUpBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const StaggeredFadeUp = Interactive.withSchema({\n Component: StaggeredFadeUpInner,\n componentName: \"<StaggeredFadeUp>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/stretch-in.json b/registry-artifacts/elements/stretch-in.jsonnew file mode 100644index 00000000..44f51e3e--- /dev/null+++ b/registry-artifacts/elements/stretch-in.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "opentype.js",+ "version": "2.0.0"+ }+ ],+ "dimensions": null,+ "displayName": "Stretch In",+ "durationInFrames": 48,+ "installationMode": "component-owned-sequence",+ "slug": "stretch-in",+ "sourceCode": "import { parse, type Font } from \"opentype.js\";\nimport { forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState, type ComponentProps } from \"react\";\nimport { Easing, Interactive, Sequence, continueRender, delayRender, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\n\ninterface StretchInProps {\n className?: string;\n width?: number;\n height?: number;\n text?: string;\n fontUrl?: string;\n fontSize?: number;\n letterSpacing?: number;\n baselineY?: number;\n entryStart?: number;\n entryStagger?: number;\n travelFrames?: number;\n travelDistance?: number;\n vertexLagFrames?: number;\n curveSteps?: number;\n fill?: string;\n strokeWidth?: number;\n stroke?: string;\n}\n\ntype Contour = [number, number][];\n\nfunction flattenPath(\n commands: ReturnType<Font[\"getPath\"]>[\"commands\"],\n steps: number,\n): Contour[] {\n const contours: Contour[] = [];\n let current: Contour = [];\n let cx = 0;\n let cy = 0;\n\n for (const cmd of commands) {\n if (cmd.type === \"M\") {\n if (current.length > 0) contours.push(current);\n current = [[cmd.x, cmd.y]];\n cx = cmd.x;\n cy = cmd.y;\n } else if (cmd.type === \"L\") {\n current.push([cmd.x, cmd.y]);\n cx = cmd.x;\n cy = cmd.y;\n } else if (cmd.type === \"Q\") {\n for (let i = 1; i <= steps; i++) {\n const t = i / steps;\n const mt = 1 - t;\n current.push([\n mt * mt * cx + 2 * mt * t * cmd.x1 + t * t * cmd.x,\n mt * mt * cy + 2 * mt * t * cmd.y1 + t * t * cmd.y,\n ]);\n }\n cx = cmd.x;\n cy = cmd.y;\n } else if (cmd.type === \"C\") {\n for (let i = 1; i <= steps; i++) {\n const t = i / steps;\n const mt = 1 - t;\n current.push([\n mt * mt * mt * cx +\n 3 * mt * mt * t * cmd.x1 +\n 3 * mt * t * t * cmd.x2 +\n t * t * t * cmd.x,\n mt * mt * mt * cy +\n 3 * mt * mt * t * cmd.y1 +\n 3 * mt * t * t * cmd.y2 +\n t * t * t * cmd.y,\n ]);\n }\n cx = cmd.x;\n cy = cmd.y;\n } else if (cmd.type === \"Z\") {\n if (current.length > 0) contours.push(current);\n current = [];\n }\n }\n if (current.length > 0) contours.push(current);\n return contours;\n}\n\nfunction StretchInBase({\n className,\n width = 1920,\n height = 1080,\n text = \"REMOCN\",\n fontUrl = \"https://fonts.gstatic.com/s/anton/v27/1Ptgg87LROyAm0K0.ttf\",\n fontSize = 510,\n letterSpacing = 0,\n baselineY,\n entryStart = 0,\n entryStagger = 3,\n travelFrames = 33,\n travelDistance = 1500,\n vertexLagFrames = 3.5,\n curveSteps = 8,\n fill = \"#ffffff\",\n strokeWidth = 0,\n stroke = \"#ffffff\",\n}: StretchInProps) {\n const frame = useCurrentFrame();\n const [font, setFont] = useState<Font | null>(null);\n\n useEffect(() => {\n const handle = delayRender(\"stretch-in: loading font\");\n let cancelled = false;\n fetch(fontUrl)\n .then((res) => res.arrayBuffer())\n .then((buffer) => {\n if (!cancelled) setFont(parse(buffer));\n continueRender(handle);\n })\n .catch(() => {\n continueRender(handle);\n });\n return () => {\n cancelled = true;\n };\n }, [fontUrl]);\n\n const letters = useMemo(() => {\n if (!font) return null;\n const scale = fontSize / font.unitsPerEm;\n const glyphs = font.stringToGlyphs(text);\n let x = 0;\n const items = glyphs.map((glyph, i) => {\n if (i > 0) x += font.getKerningValue(glyphs[i - 1], glyph) * scale;\n const left = x;\n const advance = (glyph.advanceWidth ?? 0) * scale;\n const contours = flattenPath(\n glyph.getPath(x, 0, fontSize).commands,\n curveSteps,\n );\n x += advance + letterSpacing;\n return { left, width: advance, contours };\n });\n return { items, totalWidth: Math.max(0, x - letterSpacing) };\n }, [font, text, fontSize, letterSpacing, curveSteps]);\n\n if (!letters) return null;\n\n const startX = (width - letters.totalWidth) / 2;\n const resolvedBaseline = baselineY ?? (height + fontSize * 0.72) / 2;\n\n return (\n <div\n className={className}\n style={{ position: \"absolute\", inset: 0, overflow: \"hidden\" }}\n >\n <svg\n width=\"100%\"\n height=\"100%\"\n viewBox={`0 0 ${width} ${height}`}\n preserveAspectRatio=\"xMidYMid meet\"\n style={{ display: \"block\" }}\n >\n {letters.items.map((glyph, i) => {\n const entry = entryStart + entryStagger * i;\n const run = Math.max(1, travelFrames - vertexLagFrames);\n\n const d = glyph.contours\n .map((contour) => {\n const pts = contour.map(([px, py]) => {\n const u =\n glyph.width === 0\n ? 0\n : Math.min(1, Math.max(0, (px - glyph.left) / glyph.width));\n const start = entry + u * vertexLagFrames;\n const remaining = interpolate(\n frame,\n [start, start + run],\n [1, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.bezier(0.2, 0.9, 0.25, 1),\n },\n );\n return [\n startX + px + travelDistance * remaining,\n resolvedBaseline + py,\n ];\n });\n return (\n `M${pts[0][0].toFixed(2)},${pts[0][1].toFixed(2)}` +\n pts\n .slice(1)\n .map((p) => `L${p[0].toFixed(2)},${p[1].toFixed(2)}`)\n .join(\"\") +\n \"Z\"\n );\n })\n .join(\" \");\n\n return (\n <path\n key={`${i}-${glyph.left}`}\n d={d}\n fill={fill}\n fillRule=\"evenodd\"\n stroke={strokeWidth > 0 ? stroke : \"none\"}\n strokeWidth={strokeWidth}\n />\n );\n })}\n </svg>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"REMOCN\",\n description: \"Text\",\n },\n fill: {\n type: \"color\",\n default: \"#ffffff\",\n description: \"Fill\",\n },\n fontSize: {\n type: \"number\",\n min: 100,\n max: 700,\n step: 10,\n default: 510,\n description: \"Font size\",\n hiddenFromList: false,\n },\n entryStagger: {\n type: \"number\",\n min: 0,\n max: 12,\n step: 1,\n default: 3,\n description: \"Letter stagger\",\n hiddenFromList: false,\n },\n travelFrames: {\n type: \"number\",\n min: 4,\n max: 40,\n step: 1,\n default: 33,\n description: \"Travel (frames)\",\n hiddenFromList: false,\n },\n vertexLagFrames: {\n type: \"number\",\n min: 0,\n max: 8,\n step: 0.5,\n default: 3.5,\n description: \"Smear lag (frames)\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"fill\",\"fontSize\",\"entryStagger\",\"travelFrames\",\"vertexLagFrames\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"REMOCN\",\n fill: \"#ffffff\",\n fontSize: 510,\n entryStagger: 3,\n travelFrames: 33,\n vertexLagFrames: 3.5,\n speed: 1,\n};\n\ntype StretchInElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof StretchInBase>;\n\nconst StretchInInner = forwardRef<\n HTMLDivElement,\n StretchInElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<StretchIn>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <StretchInBase\n {...(componentProps as unknown as ComponentProps<typeof StretchInBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const StretchIn = Interactive.withSchema({\n Component: StretchInInner,\n componentName: \"<StretchIn>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 48+}diff --git a/registry-artifacts/elements/strikethrough-replace.json b/registry-artifacts/elements/strikethrough-replace.jsonnew file mode 100644index 00000000..89a3737e--- /dev/null+++ b/registry-artifacts/elements/strikethrough-replace.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 300,+ "height": 130+ },+ "displayName": "Strikethrough Replace",+ "durationInFrames": 120,+ "installationMode": "wrapped",+ "slug": "strikethrough-replace",+ "sourceCode": "import { interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface StrikethroughReplaceProps {\n from: string;\n to: string;\n lineColor?: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function StrikethroughReplace({\n from,\n to,\n lineColor = \"#ff5e3a\",\n fontSize = 48,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: StrikethroughReplaceProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n // Phases:\n // 0 .. 40% -> draw strikethrough across `from`\n // 40% .. 60% -> fade out `from`, fade in `to`\n // 60% .. 100% -> hold\n const strikeEnd = durationInFrames * 0.4;\n const fadeStart = durationInFrames * 0.4;\n const fadeEnd = durationInFrames * 0.6;\n\n const linePct = interpolate(frame, [0, strikeEnd], [0, 100], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const fromOpacity = interpolate(frame, [fadeStart, fadeEnd], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const toOpacity = interpolate(frame, [fadeStart, fadeEnd], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n const toY = interpolate(frame, [fadeStart, fadeEnd], [8, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const textStyle: React.CSSProperties = {\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n whiteSpace: \"nowrap\",\n };\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"white\",\n }}\n >\n <div\n style={{\n position: \"relative\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n {/* from text with strikethrough line */}\n <span\n className={className}\n style={{\n ...textStyle,\n position: \"absolute\",\n opacity: fromOpacity,\n }}\n >\n {from}\n <span\n aria-hidden\n style={{\n position: \"absolute\",\n left: 0,\n top: \"50%\",\n height: Math.max(2, Math.round(fontSize * 0.08)),\n width: `${linePct}%`,\n background: lineColor,\n translate: \"0 -50%\",\n borderRadius: 2,\n }}\n />\n </span>\n\n {/* to text */}\n <span\n className={className}\n style={{\n ...textStyle,\n opacity: toOpacity,\n translate: `0 ${toY}px`,\n }}\n >\n {to}\n </span>\n </div>\n </div>\n );\n}"+ },+ "durationInFrames": 120+}diff --git a/registry-artifacts/elements/sustained-glitch.json b/registry-artifacts/elements/sustained-glitch.jsonnew file mode 100644index 00000000..35fe3d48--- /dev/null+++ b/registry-artifacts/elements/sustained-glitch.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/transitions",+ "version": null+ }+ ],+ "dimensions": null,+ "displayName": "Sustained Glitch",+ "durationInFrames": 120,+ "installationMode": "component-owned-sequence",+ "slug": "sustained-glitch",+ "sourceCode": "import { AbsoluteFill, Interactive, Sequence, isHtmlInCanvasSupported, random, useCurrentFrame, useDelayRender, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport React, { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\nimport { type TransitionPresentation, type TransitionPresentationComponentProps } from \"@remotion/transitions\";\n\nconst QUAD = new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]);\n\nconst VERTEX_SHADER = `#version 300 es\nin vec2 a_pos;\nout vec2 v_uv;\nvoid main() {\n v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);\n gl_Position = vec4(a_pos, 0.0, 1.0);\n}`;\n\nconst LAYER: React.CSSProperties = {\n position: \"absolute\",\n inset: 0,\n width: \"100%\",\n height: \"100%\",\n};\n\nconst OUTPUT_LAYER: React.CSSProperties = { ...LAYER, pointerEvents: \"none\" };\n\nconst isCanvasTransitionSupported = (): boolean =>\n isHtmlInCanvasSupported();\n\nconst isCanvasFilterSupported = (): boolean => isHtmlInCanvasSupported();\n\ntype SceneShaderFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderDrawParams<Props> = {\n from: OffscreenCanvas | null;\n to: OffscreenCanvas | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderInstance<Props> = {\n draw: (params: SceneShaderDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneShader<Props> = (\n canvas: OffscreenCanvas,\n) => SceneShaderInstance<Props>;\n\ntype SceneFilterFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterDrawParams<Props> = {\n scene: OffscreenCanvas | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterInstance<Props> = {\n draw: (params: SceneFilterDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneFilter<Props> = (\n canvas: OffscreenCanvas,\n) => SceneFilterInstance<Props>;\n\nfunction compileShader(\n gl: WebGL2RenderingContext,\n source: string,\n type: GLenum,\n): WebGLShader {\n const shader = gl.createShader(type);\n if (!shader) {\n throw new Error(\"canvas-presentation: failed to create shader\");\n }\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n const log = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error(`canvas-presentation: failed to compile shader: ${log}`);\n }\n return shader;\n}\n\nfunction createProgram(\n gl: WebGL2RenderingContext,\n fragment: string,\n): WebGLProgram {\n const program = gl.createProgram();\n if (!program) {\n throw new Error(\"canvas-presentation: failed to create program\");\n }\n const vs = compileShader(gl, VERTEX_SHADER, gl.VERTEX_SHADER);\n const fs = compileShader(gl, fragment, gl.FRAGMENT_SHADER);\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n gl.deleteShader(vs);\n gl.deleteShader(fs);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n const log = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n throw new Error(`canvas-presentation: failed to link program: ${log}`);\n }\n return program;\n}\n\nfunction createSceneTexture(gl: WebGL2RenderingContext): WebGLTexture {\n const texture = gl.createTexture();\n if (!texture) {\n throw new Error(\"canvas-presentation: failed to create texture\");\n }\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n 1,\n 1,\n 0,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n new Uint8Array([0, 0, 0, 0]),\n );\n return texture;\n}\n\nfunction createQuadSurface(canvas: OffscreenCanvas, fragment: string) {\n const gl = canvas.getContext(\"webgl2\", { premultipliedAlpha: true });\n if (!gl) {\n throw new Error(\"canvas-presentation: WebGL2 is unavailable\");\n }\n\n const program = createProgram(gl, fragment);\n const vao = gl.createVertexArray();\n gl.bindVertexArray(vao);\n const buffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, QUAD, gl.STATIC_DRAW);\n const aPos = gl.getAttribLocation(program, \"a_pos\");\n gl.enableVertexAttribArray(aPos);\n gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 0, 0);\n\n const locations = new Map<string, WebGLUniformLocation | null>();\n const uniform = (name: string) => {\n const cached = locations.get(name);\n if (cached !== undefined) {\n return cached;\n }\n const location = gl.getUniformLocation(program, name);\n locations.set(name, location);\n return location;\n };\n\n const clear = () => {\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n };\n\n const textures: WebGLTexture[] = [];\n const createTexture = () => {\n const texture = createSceneTexture(gl);\n textures.push(texture);\n return texture;\n };\n\n const begin = (width: number, height: number) => {\n gl.viewport(0, 0, width, height);\n clear();\n gl.useProgram(program);\n gl.bindVertexArray(vao);\n };\n\n const bindScene = (\n image: OffscreenCanvas | null,\n texture: WebGLTexture,\n unit: number,\n name: string,\n ) => {\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n if (image) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n image,\n );\n }\n gl.uniform1i(uniform(name), unit);\n };\n\n const draw = () => gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n\n const cleanup = () => {\n gl.deleteProgram(program);\n for (const texture of textures) {\n gl.deleteTexture(texture);\n }\n gl.deleteBuffer(buffer);\n gl.deleteVertexArray(vao);\n };\n\n return {\n gl,\n uniform,\n clear,\n createTexture,\n begin,\n bindScene,\n draw,\n cleanup,\n };\n}\n\nfunction makeSceneShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneShaderFrame<Props>) => void,\n): SceneShader<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const fromTexture = surface.createTexture();\n const toTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ from, to, width, height, progress, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(from, fromTexture, 0, \"u_from\");\n surface.bindScene(to, toTexture, 1, \"u_to\");\n\n surface.gl.uniform1f(surface.uniform(\"u_progress\"), progress);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n progress,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nfunction makeFilterShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneFilterFrame<Props>) => void,\n): SceneFilter<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const sceneTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ scene, width, height, frame, time, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(scene, sceneTexture, 0, \"u_scene\");\n\n surface.gl.uniform1f(surface.uniform(\"u_frame\"), frame);\n surface.gl.uniform1f(surface.uniform(\"u_time\"), time);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n frame,\n time,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nconst transferred = new WeakMap<HTMLCanvasElement, OffscreenCanvas>();\n\nfunction takeOffscreen(canvas: HTMLCanvasElement): OffscreenCanvas {\n const existing = transferred.get(canvas);\n if (existing) {\n return existing;\n }\n const created = canvas.transferControlToOffscreen();\n transferred.set(canvas, created);\n return created;\n}\n\nfunction makeCanvasComponent<Props extends Record<string, unknown>>(\n shader: SceneShader<Props>,\n): React.FC<TransitionPresentationComponentProps<Props>> {\n return function CanvasScenePresentation({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n onElementImage,\n onUnmount,\n bothEnteringAndExiting,\n }) {\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneShaderInstance<Props> | null>(null);\n const passedPropsRef = React.useRef(passedProps);\n passedPropsRef.current = passedProps;\n const onElementImageRef = React.useRef(onElementImage);\n onElementImageRef.current = onElementImage;\n const onUnmountRef = React.useRef(onUnmount);\n onUnmountRef.current = onUnmount;\n\n const { delayRender, continueRender } = useDelayRender();\n const passThrough =\n bothEnteringAndExiting && presentationDirection === \"exiting\";\n\n const drawRef = React.useRef<\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => void\n >(() => undefined);\n drawRef.current = (prevImage, nextImage, progress) => {\n const instance = instanceRef.current;\n if (!instance) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: paint\");\n const to = prevImage;\n const from = nextImage;\n const width = from?.width ?? to?.width ?? 0;\n const height = from?.height ?? to?.height ?? 0;\n if (width === 0 || height === 0) {\n instance.clear();\n continueRender(handle);\n return;\n }\n instance.draw({\n from,\n to,\n width,\n height,\n progress: !to ? 0 : !from ? 1 : progress,\n passedProps: passedPropsRef.current,\n });\n continueRender(handle);\n };\n\n const draw = React.useCallback(\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => drawRef.current(prevImage, nextImage, progress),\n [],\n );\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [passThrough, shader]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n if (!scene || !capture || !context) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n onElementImageRef.current(capture, draw);\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, [passThrough, draw]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, [passThrough]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: presentationProgress is the intentional trigger — a new progress value is what schedules the next paint\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n layoutRef.current?.requestPaint?.();\n }, [passThrough, presentationProgress]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n return () => onUnmountRef.current();\n }, [passThrough]);\n\n if (passThrough) {\n return <>{children}</>;\n }\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasFilterProps = {\n children: React.ReactNode;\n};\n\nfunction makeFilterComponent<Props extends Record<string, unknown>>(\n shader: SceneFilter<Props>,\n): React.FC<Props & CanvasFilterProps> {\n return function CanvasSceneFilter(props) {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const { delayRender, continueRender } = useDelayRender();\n\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneFilterInstance<Props> | null>(null);\n\n const passedPropsRef = React.useRef(props);\n passedPropsRef.current = props;\n const frameRef = React.useRef(frame);\n frameRef.current = frame;\n const timeRef = React.useRef(frame / fps);\n timeRef.current = frame / fps;\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [shader]);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n const instance = instanceRef.current;\n if (!scene || !capture || !context || !instance) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n if (capture.width === 0 || capture.height === 0) {\n instance.clear();\n return;\n }\n instance.draw({\n scene: capture,\n width: capture.width,\n height: capture.height,\n frame: frameRef.current,\n time: timeRef.current,\n passedProps: passedPropsRef.current,\n });\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: filter paint\");\n const settle = () => continueRender(handle);\n layout.addEventListener(\"paint\", settle, { once: true });\n layout.requestPaint?.();\n return () => {\n layout.removeEventListener(\"paint\", settle);\n continueRender(handle);\n };\n });\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {props.children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasPresentationOptions<Props extends Record<string, unknown>> = {\n shader: SceneShader<Props>;\n fallback: React.FC<TransitionPresentationComponentProps<Props>>;\n};\n\nfunction makeCanvasPresentation<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasPresentationOptions<Props>): (\n props: Props,\n) => TransitionPresentation<Props> {\n const Canvas = makeCanvasComponent(shader);\n\n const Presentation: React.FC<TransitionPresentationComponentProps<Props>> = (\n props,\n ) =>\n isCanvasTransitionSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n\n return (props) => ({ component: Presentation, props });\n}\n\ntype CanvasFilterOptions<Props extends Record<string, unknown>> = {\n shader: SceneFilter<Props>;\n fallback: React.FC<Props & CanvasFilterProps>;\n};\n\nfunction makeCanvasFilter<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasFilterOptions<Props>): React.FC<Props & CanvasFilterProps> {\n const Canvas = makeFilterComponent(shader);\n\n return function CanvasFilter(props) {\n return isCanvasFilterSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n };\n}\n\ntype SustainedGlitchProps = {\n intensity?: number;\n frequency?: number;\n slices?: number;\n seed?: number;\n};\n\nconst DEFAULTS = {\n intensity: 1,\n frequency: 1,\n slices: 24,\n seed: 1,\n};\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_scene;\nuniform float u_frame;\nuniform float u_intensity;\nuniform float u_frequency;\nuniform float u_slices;\nuniform float u_seed;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst float BLOCK_COLUMNS = 16.0;\n\nfloat hash(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);\n}\n\nvec4 sampleSplit(vec2 uv, float split) {\n vec4 center = texture(u_scene, uv);\n float r = texture(u_scene, fract(vec2(uv.x + split, uv.y))).r;\n float b = texture(u_scene, fract(vec2(uv.x - split, uv.y))).b;\n return vec4(r, center.g, b, center.a);\n}\n\nvoid main() {\n float slotLength = max(30.0 / max(u_frequency, 0.1), 4.0);\n float slot = floor(u_frame / slotLength);\n float local = u_frame - slot * slotLength;\n\n float burstLength = 2.0 + floor(hash(vec2(slot, u_seed + 2.0)) * 4.0);\n float start =\n floor(hash(vec2(slot, u_seed + 1.0)) * max(slotLength - burstLength, 1.0));\n float fires = step(0.25, hash(vec2(slot, u_seed + 3.0)));\n\n float age = local - start;\n float live = fires * step(0.0, age) * step(age, burstLength - 1.0);\n float energy =\n max(u_intensity, 0.0) * live * (1.0 - age / burstLength);\n\n if (energy <= 0.0) {\n outColor = texture(u_scene, v_uv);\n return;\n }\n\n float clock = mod(u_frame, 512.0) + u_seed;\n float row = floor(v_uv.y * max(u_slices, 2.0));\n float torn = step(0.45, hash(vec2(row, clock)));\n float amount = hash(vec2(row + 17.0, clock * 1.7 + 3.0)) - 0.5;\n float sliceShift = amount * 0.28 * energy * torn;\n\n vec2 block = vec2(floor(v_uv.x * BLOCK_COLUMNS), row);\n float corrupt = step(1.0 - 0.45 * min(energy, 1.0), hash(block + clock * 7.3));\n vec2 jump =\n vec2(\n hash(block + clock * 3.1 + 5.0) - 0.5,\n hash(block + clock * 9.7 + 11.0) - 0.5\n ) *\n vec2(0.62, 0.34) *\n corrupt;\n\n vec2 uv = fract(v_uv + vec2(sliceShift, 0.0) + jump);\n float split = 0.02 * energy * (0.35 + abs(amount));\n\n vec4 color = sampleSplit(uv, split);\n color.rgb +=\n vec3(0.05, 0.015, 0.09) *\n energy *\n torn *\n hash(vec2(row, clock + 41.0)) *\n color.a;\n\n outColor = vec4(clamp(color.rgb, 0.0, 1.0), color.a);\n}`;\n\nconst shader = makeFilterShader<SustainedGlitchProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, passedProps }) => {\n const {\n intensity = DEFAULTS.intensity,\n frequency = DEFAULTS.frequency,\n slices = DEFAULTS.slices,\n seed = DEFAULTS.seed,\n } = passedProps;\n gl.uniform1f(uniform(\"u_intensity\"), intensity);\n gl.uniform1f(uniform(\"u_frequency\"), frequency);\n gl.uniform1f(uniform(\"u_slices\"), slices);\n gl.uniform1f(uniform(\"u_seed\"), seed);\n },\n);\n\nfunction burstEnergy(\n frame: number,\n intensity: number,\n frequency: number,\n seed: number,\n): number {\n const slotLength = Math.max(30 / Math.max(frequency, 0.1), 4);\n const slot = Math.floor(frame / slotLength);\n const local = frame - slot * slotLength;\n\n const burstLength = 2 + Math.floor(random(`glitch-len-${seed}-${slot}`) * 4);\n const start = Math.floor(\n random(`glitch-start-${seed}-${slot}`) *\n Math.max(slotLength - burstLength, 1),\n );\n if (random(`glitch-fire-${seed}-${slot}`) < 0.25) return 0;\n\n const age = local - start;\n if (age < 0 || age > burstLength - 1) return 0;\n return Math.max(intensity, 0) * (1 - age / burstLength);\n}\n\nconst SustainedGlitchFallback: React.FC<\n SustainedGlitchProps & CanvasFilterProps\n> = ({\n children,\n intensity = DEFAULTS.intensity,\n frequency = DEFAULTS.frequency,\n slices = DEFAULTS.slices,\n seed = DEFAULTS.seed,\n}) => {\n const frame = useCurrentFrame();\n const energy = burstEnergy(frame, intensity, frequency, seed);\n\n if (energy <= 0) {\n return <AbsoluteFill>{children}</AbsoluteFill>;\n }\n\n const bands = Math.max(2, Math.min(6, Math.round(slices / 5)));\n const height = 100 / bands;\n\n return (\n <AbsoluteFill>\n {Array.from({ length: bands }, (_, band) => {\n const shift =\n (random(`glitch-shift-${seed}-${frame}-${band}`) - 0.5) * 46 * energy;\n const tint = band % 2 === 0 ? \"rgb(255, 42, 90)\" : \"rgb(0, 224, 255)\";\n return (\n <AbsoluteFill\n key={band}\n style={{\n clipPath: `inset(${band * height}% 0 ${100 - (band + 1) * height}% 0)`,\n translate: `${shift}px`,\n }}\n >\n {children}\n <AbsoluteFill\n style={{\n background: tint,\n mixBlendMode: \"screen\",\n opacity:\n 0.18 *\n energy *\n random(`glitch-tint-${seed}-${frame}-${band}`),\n }}\n />\n </AbsoluteFill>\n );\n })}\n </AbsoluteFill>\n );\n};\n\nconst SustainedGlitchBase = makeCanvasFilter<SustainedGlitchProps>({\n shader,\n fallback: SustainedGlitchFallback,\n});\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n intensity: {\n type: \"number\",\n min: 0,\n max: 2,\n step: 0.05,\n default: 1,\n description: \"Intensity\",\n hiddenFromList: false,\n },\n frequency: {\n type: \"number\",\n min: 0.1,\n max: 6,\n step: 0.1,\n default: 1,\n description: \"Frequency\",\n hiddenFromList: false,\n },\n slices: {\n type: \"number\",\n min: 6,\n max: 48,\n step: 1,\n default: 24,\n description: \"Slices\",\n hiddenFromList: false,\n },\n seed: {\n type: \"number\",\n min: 1,\n max: 20,\n step: 1,\n default: 1,\n description: \"Seed\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"intensity\",\"frequency\",\"slices\",\"seed\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n intensity: 1,\n frequency: 1,\n slices: 24,\n seed: 1,\n speed: 1,\n};\n\ntype SustainedGlitchElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof SustainedGlitchBase>;\n\nconst SustainedGlitchInner = forwardRef<\n HTMLDivElement,\n SustainedGlitchElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<SustainedGlitch>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <SustainedGlitchBase\n {...(componentProps as unknown as ComponentProps<typeof SustainedGlitchBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const SustainedGlitch = Interactive.withSchema({\n Component: SustainedGlitchInner,\n componentName: \"<SustainedGlitch>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 120+}diff --git a/registry-artifacts/elements/terminal-simulator.json b/registry-artifacts/elements/terminal-simulator.jsonnew file mode 100644index 00000000..eb0ec6ab--- /dev/null+++ b/registry-artifacts/elements/terminal-simulator.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 900,+ "height": 480+ },+ "displayName": "Terminal Simulator",+ "durationInFrames": 240,+ "installationMode": "component-owned-sequence",+ "slug": "terminal-simulator",+ "sourceCode": "import { Interactive, Sequence, interpolate, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ntype TerminalLineType = \"command\" | \"log\" | \"success\" | \"error\";\n\ninterface TerminalLine {\n text: string;\n type: TerminalLineType;\n delay?: number;\n /**\n * Extra freeze-frame pause AFTER this line finishes typing, in frames.\n * Use this to build dramatic tension before the next batch of logs.\n * If omitted, lines whose text ends in \"...\" auto-freeze for 18 frames.\n */\n pause?: number;\n}\n\ninterface TerminalSimulatorProps {\n lines?: TerminalLine[];\n prompt?: string;\n title?: string;\n background?: string;\n chromeColor?: string;\n fontSize?: number;\n /**\n * Reveal speed. Despite the name, the reveal is now CHUNKED — each\n * `1 / charsPerFrame` frames bumps the cursor by `chunkSize` characters,\n * so output appears in bursts instead of dripping char-by-char.\n */\n charsPerFrame?: number;\n /** Characters revealed per step. */\n chunkSize?: number;\n speed?: number;\n className?: string;\n}\n\nconst DEFAULT_LINES: TerminalLine[] = [\n { text: \"npm run build\", type: \"command\", delay: 0 },\n { text: \"Resolving dependencies...\", type: \"log\", delay: 6 },\n { text: \"> [email protected] build\", type: \"log\", delay: 4 },\n { text: \"> next build\", type: \"log\", delay: 4 },\n { text: \"Compiling...\", type: \"log\", delay: 12 },\n { text: \"Compiled successfully in 4.2s\", type: \"success\", delay: 14 },\n { text: \"Generating static pages (24/24)\", type: \"log\", delay: 10 },\n { text: \"Build completed without errors\", type: \"success\", delay: 12 },\n];\n\nconst TYPE_COLORS: Record<TerminalLineType, string> = {\n command: \"#fafafa\",\n log: \"#a1a1aa\",\n success: \"#22c55e\",\n error: \"#ef4444\",\n};\n\n/** Auto freeze-frame heuristic: any line ending in \"...\" holds the camera. */\nfunction autoPause(line: TerminalLine): number {\n if (line.pause !== undefined) return line.pause;\n if (line.text.trimEnd().endsWith(\"...\")) return 18;\n return 0;\n}\n\nfunction TerminalSimulatorBase({\n lines = DEFAULT_LINES,\n prompt = \"$\",\n title = \"~/projects/remocn\",\n background = \"#0a0a0a\",\n chromeColor = \"#1a1a1a\",\n fontSize = 18,\n charsPerFrame = 1,\n chunkSize = 1,\n speed = 1,\n className,\n}: TerminalSimulatorProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const lineHeight = Math.round(fontSize * 1.6);\n const visibleLines = 8;\n const windowWidth = 900;\n const windowHeight = 480;\n\n // Compute cumulative start frames for each line, including auto/explicit\n // pauses AFTER a line finishes typing.\n const starts: number[] = [];\n let acc = 10;\n for (let i = 0; i < lines.length; i++) {\n const delay = lines[i].delay ?? 8;\n acc += delay;\n starts.push(acc);\n // Approximate typing duration (in frames) for chunked output.\n const typingFrames = Math.ceil(\n lines[i].text.length / (chunkSize * charsPerFrame),\n );\n acc += typingFrames + autoPause(lines[i]);\n }\n\n // STEP-FUNCTION scroll. Each overflowing line snaps the buffer up by\n // exactly one lineHeight on the frame it begins. No interpolation, no\n // easing — terminals do not glide.\n let translateY = 0;\n for (let i = visibleLines; i < lines.length; i++) {\n if (frame >= starts[i]) {\n translateY -= lineHeight;\n }\n }\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n style={{\n width: windowWidth,\n height: windowHeight,\n background,\n borderRadius: 12,\n overflow: \"hidden\",\n boxShadow:\n \"0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06)\",\n display: \"flex\",\n flexDirection: \"column\",\n fontFamily:\n \"var(--font-geist-mono), ui-monospace, SFMono-Regular, monospace\",\n }}\n >\n {/* Chrome */}\n <div\n style={{\n height: 40,\n background: chromeColor,\n display: \"flex\",\n alignItems: \"center\",\n padding: \"0 16px\",\n gap: 8,\n borderBottom: \"1px solid rgba(255,255,255,0.06)\",\n }}\n >\n <Light color=\"#ff5f57\" />\n <Light color=\"#febc2e\" />\n <Light color=\"#28c840\" />\n <div\n style={{\n flex: 1,\n textAlign: \"center\",\n color: \"#71717a\",\n fontSize: 13,\n }}\n >\n {title}\n </div>\n </div>\n\n {/* Content */}\n <div\n style={{\n flex: 1,\n padding: 20,\n overflow: \"hidden\",\n position: \"relative\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 20,\n right: 20,\n top: 20,\n translate: `0 ${translateY}px`,\n }}\n >\n {lines.map((line, index) => (\n <Sequence\n key={index}\n from={Math.round(starts[index] / speed)}\n layout=\"none\"\n >\n <TerminalLineRow\n line={line}\n prompt={prompt}\n fontSize={fontSize}\n lineHeight={lineHeight}\n charsPerFrame={charsPerFrame}\n chunkSize={chunkSize}\n fps={fps}\n speed={speed}\n />\n </Sequence>\n ))}\n </div>\n </div>\n </div>\n </div>\n );\n}\n\nfunction Light({ color }: { color: string }) {\n return (\n <div\n style={{\n width: 12,\n height: 12,\n borderRadius: \"50%\",\n background: color,\n opacity: 0.85,\n }}\n />\n );\n}\n\nfunction TerminalLineRow({\n line,\n prompt,\n fontSize,\n lineHeight,\n charsPerFrame,\n chunkSize,\n fps,\n speed,\n}: {\n line: TerminalLine;\n prompt: string;\n fontSize: number;\n lineHeight: number;\n charsPerFrame: number;\n chunkSize: number;\n fps: number;\n speed: number;\n}) {\n const localFrame = useCurrentFrame() * speed;\n const totalChars = line.text.length;\n\n // Chunked reveal: Math.floor of an interpolated count, then snapped to the\n // nearest multiple of `chunkSize`. This is what gives the bursty terminal\n // feel — text doesn't drip, it lurches.\n const linearRevealed = Math.floor(\n interpolate(localFrame, [0, totalChars / charsPerFrame], [0, totalChars], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n }),\n );\n const revealed = Math.min(\n totalChars,\n Math.ceil(linearRevealed / chunkSize) * chunkSize,\n );\n const visible = line.text.substring(0, revealed);\n const typingDone = revealed >= totalChars;\n // 2 Hz blink at any framerate.\n const cursorVisible = Math.floor((localFrame / fps) * 2) % 2 === 0;\n\n return (\n <div\n style={{\n height: lineHeight,\n fontSize,\n color: TYPE_COLORS[line.type],\n display: \"flex\",\n alignItems: \"center\",\n whiteSpace: \"pre\",\n }}\n >\n {line.type === \"command\" && (\n <span style={{ color: \"#22c55e\", marginRight: 8 }}>{prompt}</span>\n )}\n <span>{visible}</span>\n {!typingDone && cursorVisible && (\n <span\n style={{\n display: \"inline-block\",\n width: fontSize * 0.55,\n height: fontSize,\n background: TYPE_COLORS[line.type],\n marginLeft: 2,\n }}\n />\n )}\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n prompt: {\n type: \"text-content\",\n default: \"$\",\n description: \"Prompt\",\n },\n title: {\n type: \"text-content\",\n default: \"~/projects/remocn\",\n description: \"Title\",\n },\n background: {\n type: \"color\",\n default: \"#0a0a0a\",\n description: \"Background\",\n },\n chromeColor: {\n type: \"color\",\n default: \"#1a1a1a\",\n description: \"Chrome color\",\n },\n fontSize: {\n type: \"number\",\n min: 10,\n max: 32,\n step: 1,\n default: 18,\n description: \"Font size\",\n hiddenFromList: false,\n },\n charsPerFrame: {\n type: \"number\",\n min: 0.25,\n max: 6,\n step: 0.25,\n default: 1,\n description: \"Chars / frame\",\n hiddenFromList: false,\n },\n chunkSize: {\n type: \"number\",\n min: 1,\n max: 20,\n step: 1,\n default: 1,\n description: \"Chunk size\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 900,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 480,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"prompt\",\"title\",\"background\",\"chromeColor\",\"fontSize\",\"charsPerFrame\",\"chunkSize\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n prompt: \"$\",\n title: \"~/projects/remocn\",\n background: \"#0a0a0a\",\n chromeColor: \"#1a1a1a\",\n fontSize: 18,\n charsPerFrame: 1,\n chunkSize: 1,\n speed: 1,\n};\n\ntype TerminalSimulatorElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof TerminalSimulatorBase>;\n\nconst TerminalSimulatorInner = forwardRef<\n HTMLDivElement,\n TerminalSimulatorElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 900, height = 480, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<TerminalSimulator>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <TerminalSimulatorBase\n {...(componentProps as unknown as ComponentProps<typeof TerminalSimulatorBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const TerminalSimulator = Interactive.withSchema({\n Component: TerminalSimulatorInner,\n componentName: \"<TerminalSimulator>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 240+}diff --git a/registry-artifacts/elements/top-down-letters.json b/registry-artifacts/elements/top-down-letters.jsonnew file mode 100644index 00000000..a8c3060e--- /dev/null+++ b/registry-artifacts/elements/top-down-letters.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 230,+ "height": 100+ },+ "displayName": "Top-Down Letters",+ "durationInFrames": 60,+ "installationMode": "component-owned-sequence",+ "slug": "top-down-letters",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface TopDownLettersProps {\n text: string;\n staggerDelay?: number;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction TopDownLettersBase({\n text,\n staggerDelay = 3,\n distance = 46,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: TopDownLettersProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 12;\n const charTravelFrames = 7;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerDelay;\n const easing = Easing.bezier(0.18, 1, 0.32, 1);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charTravelFrames], [-distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n translate: `0 ${y}px`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"Signal\",\n description: \"Text\",\n },\n staggerDelay: {\n type: \"number\",\n min: 1,\n max: 12,\n step: 1,\n default: 3,\n description: \"Stagger\",\n hiddenFromList: false,\n },\n distance: {\n type: \"number\",\n min: 0,\n max: 120,\n step: 1,\n default: 46,\n description: \"Distance\",\n hiddenFromList: false,\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 160,\n step: 1,\n default: 72,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"600\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 230,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 100,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"staggerDelay\",\"distance\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"Signal\",\n staggerDelay: 3,\n distance: 46,\n fontSize: 72,\n color: \"#171717\",\n fontWeight: \"600\",\n speed: 1,\n};\n\ntype TopDownLettersElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof TopDownLettersBase>;\n\nconst TopDownLettersInner = forwardRef<\n HTMLDivElement,\n TopDownLettersElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 230, height = 100, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<TopDownLetters>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <TopDownLettersBase\n {...(componentProps as unknown as ComponentProps<typeof TopDownLettersBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const TopDownLetters = Interactive.withSchema({\n Component: TopDownLettersInner,\n componentName: \"<TopDownLetters>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 60+}diff --git a/registry-artifacts/elements/tracking-in.json b/registry-artifacts/elements/tracking-in.jsonnew file mode 100644index 00000000..bac9fe14--- /dev/null+++ b/registry-artifacts/elements/tracking-in.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 550,+ "height": 130+ },+ "displayName": "Tracking In",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "tracking-in",+ "sourceCode": "import { Interactive, Sequence, interpolate, spring, useCurrentFrame, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\ninterface TrackingInProps {\n text: string;\n startTracking?: number;\n startBlur?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nfunction TrackingInBase({\n text,\n startTracking = 0.5,\n startBlur = 12,\n fontSize = 96,\n color = \"#171717\",\n fontWeight = 700,\n speed = 1,\n className,\n}: TrackingInProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const t = spring({\n frame,\n fps,\n config: { damping: 18, stiffness: 90 },\n });\n\n const letterSpacing = `${interpolate(t, [0, 1], [startTracking, -0.03])}em`;\n const blurAmount = interpolate(t, [0, 1], [startBlur, 0]);\n const opacity = interpolate(frame, [0, 15], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"white\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing,\n opacity,\n filter: `blur(${blurAmount}px)`,\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n whiteSpace: \"nowrap\",\n }}\n >\n {text}\n </span>\n </div>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n text: {\n type: \"text-content\",\n default: \"tracking in\",\n description: \"Text\",\n },\n startTracking: {\n type: \"number\",\n min: 0,\n max: 2,\n step: 0.05,\n default: 0.5,\n description: \"Start tracking (em)\",\n hiddenFromList: false,\n },\n startBlur: {\n type: \"number\",\n min: 0,\n max: 40,\n step: 1,\n default: 12,\n description: \"Start blur\",\n hiddenFromList: false,\n },\n fontSize: {\n type: \"number\",\n min: 12,\n max: 200,\n step: 1,\n default: 96,\n description: \"Font size\",\n hiddenFromList: false,\n },\n color: {\n type: \"color\",\n default: \"#171717\",\n description: \"Color\",\n },\n fontWeight: {\n type: \"enum\",\n default: \"700\",\n variants: {\n \"400\": {},\n \"500\": {},\n \"600\": {},\n \"700\": {},\n },\n description: \"Font weight\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 550,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 130,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"text\",\"startTracking\",\"startBlur\",\"fontSize\",\"color\",\"fontWeight\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n text: \"tracking in\",\n startTracking: 0.5,\n startBlur: 12,\n fontSize: 96,\n color: \"#171717\",\n fontWeight: \"700\",\n speed: 1,\n};\n\ntype TrackingInElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof TrackingInBase>;\n\nconst TrackingInInner = forwardRef<\n HTMLDivElement,\n TrackingInElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 550, height = 130, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<TrackingIn>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <TrackingInBase\n {...(componentProps as unknown as ComponentProps<typeof TrackingInBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const TrackingIn = Interactive.withSchema({\n Component: TrackingInInner,\n componentName: \"<TrackingIn>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/elements/tv-power-off.json b/registry-artifacts/elements/tv-power-off.jsonnew file mode 100644index 00000000..4fb7a2ef--- /dev/null+++ b/registry-artifacts/elements/tv-power-off.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/transitions",+ "version": null+ }+ ],+ "dimensions": null,+ "displayName": "TV Power Off",+ "durationInFrames": 18,+ "installationMode": "wrapped",+ "slug": "tv-power-off",+ "sourceCode": "import { AbsoluteFill, isHtmlInCanvasSupported, useCurrentFrame, useDelayRender, useVideoConfig } from \"remotion\";\nimport React from \"react\";\nimport { type TransitionPresentation, type TransitionPresentationComponentProps } from \"@remotion/transitions\";\n\nconst QUAD = new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]);\n\nconst VERTEX_SHADER = `#version 300 es\nin vec2 a_pos;\nout vec2 v_uv;\nvoid main() {\n v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);\n gl_Position = vec4(a_pos, 0.0, 1.0);\n}`;\n\nconst LAYER: React.CSSProperties = {\n position: \"absolute\",\n inset: 0,\n width: \"100%\",\n height: \"100%\",\n};\n\nconst OUTPUT_LAYER: React.CSSProperties = { ...LAYER, pointerEvents: \"none\" };\n\nconst isCanvasTransitionSupported = (): boolean =>\n isHtmlInCanvasSupported();\n\nconst isCanvasFilterSupported = (): boolean => isHtmlInCanvasSupported();\n\ntype SceneShaderFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderDrawParams<Props> = {\n from: OffscreenCanvas | null;\n to: OffscreenCanvas | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderInstance<Props> = {\n draw: (params: SceneShaderDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneShader<Props> = (\n canvas: OffscreenCanvas,\n) => SceneShaderInstance<Props>;\n\ntype SceneFilterFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterDrawParams<Props> = {\n scene: OffscreenCanvas | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterInstance<Props> = {\n draw: (params: SceneFilterDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneFilter<Props> = (\n canvas: OffscreenCanvas,\n) => SceneFilterInstance<Props>;\n\nfunction compileShader(\n gl: WebGL2RenderingContext,\n source: string,\n type: GLenum,\n): WebGLShader {\n const shader = gl.createShader(type);\n if (!shader) {\n throw new Error(\"canvas-presentation: failed to create shader\");\n }\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n const log = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error(`canvas-presentation: failed to compile shader: ${log}`);\n }\n return shader;\n}\n\nfunction createProgram(\n gl: WebGL2RenderingContext,\n fragment: string,\n): WebGLProgram {\n const program = gl.createProgram();\n if (!program) {\n throw new Error(\"canvas-presentation: failed to create program\");\n }\n const vs = compileShader(gl, VERTEX_SHADER, gl.VERTEX_SHADER);\n const fs = compileShader(gl, fragment, gl.FRAGMENT_SHADER);\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n gl.deleteShader(vs);\n gl.deleteShader(fs);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n const log = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n throw new Error(`canvas-presentation: failed to link program: ${log}`);\n }\n return program;\n}\n\nfunction createSceneTexture(gl: WebGL2RenderingContext): WebGLTexture {\n const texture = gl.createTexture();\n if (!texture) {\n throw new Error(\"canvas-presentation: failed to create texture\");\n }\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n 1,\n 1,\n 0,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n new Uint8Array([0, 0, 0, 0]),\n );\n return texture;\n}\n\nfunction createQuadSurface(canvas: OffscreenCanvas, fragment: string) {\n const gl = canvas.getContext(\"webgl2\", { premultipliedAlpha: true });\n if (!gl) {\n throw new Error(\"canvas-presentation: WebGL2 is unavailable\");\n }\n\n const program = createProgram(gl, fragment);\n const vao = gl.createVertexArray();\n gl.bindVertexArray(vao);\n const buffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, QUAD, gl.STATIC_DRAW);\n const aPos = gl.getAttribLocation(program, \"a_pos\");\n gl.enableVertexAttribArray(aPos);\n gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 0, 0);\n\n const locations = new Map<string, WebGLUniformLocation | null>();\n const uniform = (name: string) => {\n const cached = locations.get(name);\n if (cached !== undefined) {\n return cached;\n }\n const location = gl.getUniformLocation(program, name);\n locations.set(name, location);\n return location;\n };\n\n const clear = () => {\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n };\n\n const textures: WebGLTexture[] = [];\n const createTexture = () => {\n const texture = createSceneTexture(gl);\n textures.push(texture);\n return texture;\n };\n\n const begin = (width: number, height: number) => {\n gl.viewport(0, 0, width, height);\n clear();\n gl.useProgram(program);\n gl.bindVertexArray(vao);\n };\n\n const bindScene = (\n image: OffscreenCanvas | null,\n texture: WebGLTexture,\n unit: number,\n name: string,\n ) => {\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n if (image) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n image,\n );\n }\n gl.uniform1i(uniform(name), unit);\n };\n\n const draw = () => gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n\n const cleanup = () => {\n gl.deleteProgram(program);\n for (const texture of textures) {\n gl.deleteTexture(texture);\n }\n gl.deleteBuffer(buffer);\n gl.deleteVertexArray(vao);\n };\n\n return {\n gl,\n uniform,\n clear,\n createTexture,\n begin,\n bindScene,\n draw,\n cleanup,\n };\n}\n\nfunction makeSceneShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneShaderFrame<Props>) => void,\n): SceneShader<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const fromTexture = surface.createTexture();\n const toTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ from, to, width, height, progress, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(from, fromTexture, 0, \"u_from\");\n surface.bindScene(to, toTexture, 1, \"u_to\");\n\n surface.gl.uniform1f(surface.uniform(\"u_progress\"), progress);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n progress,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nfunction makeFilterShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneFilterFrame<Props>) => void,\n): SceneFilter<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const sceneTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ scene, width, height, frame, time, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(scene, sceneTexture, 0, \"u_scene\");\n\n surface.gl.uniform1f(surface.uniform(\"u_frame\"), frame);\n surface.gl.uniform1f(surface.uniform(\"u_time\"), time);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n frame,\n time,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nconst transferred = new WeakMap<HTMLCanvasElement, OffscreenCanvas>();\n\nfunction takeOffscreen(canvas: HTMLCanvasElement): OffscreenCanvas {\n const existing = transferred.get(canvas);\n if (existing) {\n return existing;\n }\n const created = canvas.transferControlToOffscreen();\n transferred.set(canvas, created);\n return created;\n}\n\nfunction makeCanvasComponent<Props extends Record<string, unknown>>(\n shader: SceneShader<Props>,\n): React.FC<TransitionPresentationComponentProps<Props>> {\n return function CanvasScenePresentation({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n onElementImage,\n onUnmount,\n bothEnteringAndExiting,\n }) {\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneShaderInstance<Props> | null>(null);\n const passedPropsRef = React.useRef(passedProps);\n passedPropsRef.current = passedProps;\n const onElementImageRef = React.useRef(onElementImage);\n onElementImageRef.current = onElementImage;\n const onUnmountRef = React.useRef(onUnmount);\n onUnmountRef.current = onUnmount;\n\n const { delayRender, continueRender } = useDelayRender();\n const passThrough =\n bothEnteringAndExiting && presentationDirection === \"exiting\";\n\n const drawRef = React.useRef<\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => void\n >(() => undefined);\n drawRef.current = (prevImage, nextImage, progress) => {\n const instance = instanceRef.current;\n if (!instance) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: paint\");\n const to = prevImage;\n const from = nextImage;\n const width = from?.width ?? to?.width ?? 0;\n const height = from?.height ?? to?.height ?? 0;\n if (width === 0 || height === 0) {\n instance.clear();\n continueRender(handle);\n return;\n }\n instance.draw({\n from,\n to,\n width,\n height,\n progress: !to ? 0 : !from ? 1 : progress,\n passedProps: passedPropsRef.current,\n });\n continueRender(handle);\n };\n\n const draw = React.useCallback(\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => drawRef.current(prevImage, nextImage, progress),\n [],\n );\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [passThrough, shader]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n if (!scene || !capture || !context) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n onElementImageRef.current(capture, draw);\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, [passThrough, draw]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, [passThrough]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: presentationProgress is the intentional trigger — a new progress value is what schedules the next paint\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n layoutRef.current?.requestPaint?.();\n }, [passThrough, presentationProgress]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n return () => onUnmountRef.current();\n }, [passThrough]);\n\n if (passThrough) {\n return <>{children}</>;\n }\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasFilterProps = {\n children: React.ReactNode;\n};\n\nfunction makeFilterComponent<Props extends Record<string, unknown>>(\n shader: SceneFilter<Props>,\n): React.FC<Props & CanvasFilterProps> {\n return function CanvasSceneFilter(props) {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const { delayRender, continueRender } = useDelayRender();\n\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneFilterInstance<Props> | null>(null);\n\n const passedPropsRef = React.useRef(props);\n passedPropsRef.current = props;\n const frameRef = React.useRef(frame);\n frameRef.current = frame;\n const timeRef = React.useRef(frame / fps);\n timeRef.current = frame / fps;\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [shader]);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n const instance = instanceRef.current;\n if (!scene || !capture || !context || !instance) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n if (capture.width === 0 || capture.height === 0) {\n instance.clear();\n return;\n }\n instance.draw({\n scene: capture,\n width: capture.width,\n height: capture.height,\n frame: frameRef.current,\n time: timeRef.current,\n passedProps: passedPropsRef.current,\n });\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: filter paint\");\n const settle = () => continueRender(handle);\n layout.addEventListener(\"paint\", settle, { once: true });\n layout.requestPaint?.();\n return () => {\n layout.removeEventListener(\"paint\", settle);\n continueRender(handle);\n };\n });\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {props.children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasPresentationOptions<Props extends Record<string, unknown>> = {\n shader: SceneShader<Props>;\n fallback: React.FC<TransitionPresentationComponentProps<Props>>;\n};\n\nfunction makeCanvasPresentation<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasPresentationOptions<Props>): (\n props: Props,\n) => TransitionPresentation<Props> {\n const Canvas = makeCanvasComponent(shader);\n\n const Presentation: React.FC<TransitionPresentationComponentProps<Props>> = (\n props,\n ) =>\n isCanvasTransitionSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n\n return (props) => ({ component: Presentation, props });\n}\n\ntype CanvasFilterOptions<Props extends Record<string, unknown>> = {\n shader: SceneFilter<Props>;\n fallback: React.FC<Props & CanvasFilterProps>;\n};\n\nfunction makeCanvasFilter<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasFilterOptions<Props>): React.FC<Props & CanvasFilterProps> {\n const Canvas = makeFilterComponent(shader);\n\n return function CanvasFilter(props) {\n return isCanvasFilterSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n };\n}\n\nexport type TvPowerOffProps = {\n durationInFrames?: number;\n delay?: number;\n gain?: number;\n afterglow?: number;\n phosphor?: string;\n};\n\nconst DEFAULTS = {\n durationInFrames: 18,\n delay: 0,\n gain: 1,\n afterglow: 1,\n phosphor: \"#d8ecff\",\n};\n\nconst COLLAPSE_END = 0.6;\nconst PINCH_END = 0.82;\nconst MIN_SQUASH = 0.0055;\nconst MIN_PINCH = 0.004;\nconst CONCENTRATION = 0.3;\nconst DECAY_CURVE = 2.6;\nconst BLACKOUT_IN = 0.06;\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_scene;\nuniform vec2 u_resolution;\nuniform float u_aspect;\nuniform float u_progress;\nuniform float u_gain;\nuniform float u_afterglow;\nuniform vec3 u_phosphor;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst int TAPS = 32;\nconst int COLUMN_TAPS = 8;\nconst float GOLDEN = 0.6180339887;\nconst float COLLAPSE_END = ${COLLAPSE_END.toFixed(4)};\nconst float PINCH_END = ${PINCH_END.toFixed(4)};\nconst float MIN_SQUASH = ${MIN_SQUASH.toFixed(5)};\nconst float MIN_PINCH = ${MIN_PINCH.toFixed(5)};\nconst float CONCENTRATION = ${CONCENTRATION.toFixed(4)};\nconst float DECAY_CURVE = ${DECAY_CURVE.toFixed(4)};\nconst float BLACKOUT_IN = ${BLACKOUT_IN.toFixed(4)};\n\nvoid main() {\n float p = u_progress;\n\n if (p <= 0.0) {\n outColor = texture(u_scene, v_uv);\n return;\n }\n if (p >= 1.0) {\n outColor = vec4(0.0, 0.0, 0.0, 1.0);\n return;\n }\n\n float collapse = clamp(p / COLLAPSE_END, 0.0, 1.0);\n float pinch = clamp((p - COLLAPSE_END) / (PINCH_END - COLLAPSE_END), 0.0, 1.0);\n float decayed = clamp((p - PINCH_END) / (1.0 - PINCH_END), 0.0, 1.0);\n\n vec2 scale = vec2(pow(MIN_PINCH, pinch), pow(MIN_SQUASH, collapse));\n vec2 centered = (v_uv - 0.5) / scale + 0.5;\n vec2 span = 1.0 / (scale * u_resolution);\n\n vec3 sum = vec3(0.0);\n for (int i = 0; i < TAPS; i++) {\n float fi = float(i);\n vec2 at = centered + vec2(\n (fract(fi * GOLDEN + 0.5) - 0.5) * span.x,\n ((fi + 0.5) / float(TAPS) - 0.5) * span.y\n );\n vec2 inside = step(vec2(0.0), at) * step(at, vec2(1.0));\n sum += texture(u_scene, at).rgb * inside.x * inside.y;\n }\n\n float concentrate = pow(1.0 / (scale.x * scale.y), CONCENTRATION);\n vec3 light =\n (sum / float(TAPS)) * (1.0 + (concentrate - 1.0) * max(u_gain, 0.0));\n\n float glow = max(u_afterglow, 0.0);\n float bleed = smoothstep(0.2, 0.8, collapse) * (1.0 - pinch) * glow;\n\n if (bleed > 0.0) {\n vec3 column = vec3(0.0);\n float cx = clamp(centered.x, 0.0, 1.0);\n for (int i = 0; i < COLUMN_TAPS; i++) {\n column +=\n texture(u_scene, vec2(cx, (float(i) + 0.5) / float(COLUMN_TAPS))).rgb;\n }\n column /= float(COLUMN_TAPS);\n\n float dy = v_uv.y - 0.5;\n float reach = 0.02 + 0.03 * collapse;\n light +=\n column *\n mix(vec3(1.0), u_phosphor, 0.65) *\n exp(-(dy * dy) / (reach * reach)) *\n bleed *\n 0.9;\n }\n\n if (pinch > 0.0) {\n vec2 d = (v_uv - 0.5) * vec2(u_aspect, 1.0);\n float radius = max(0.045 * glow, 0.0005);\n light +=\n u_phosphor *\n exp(-dot(d, d) / (radius * radius)) *\n smoothstep(0.0, 0.5, pinch) *\n 1.15;\n }\n\n light *= pow(max(1.0 - decayed, 0.0001), DECAY_CURVE);\n\n float blackout = smoothstep(0.0, BLACKOUT_IN, p);\n outColor = vec4(\n clamp(light, 0.0, 1.0),\n mix(texture(u_scene, v_uv).a, 1.0, blackout)\n );\n}`;\n\nconst clamp = (value: number, min: number, max: number) =>\n Math.min(max, Math.max(min, value));\n\nfunction toRgb(hex: string): [number, number, number] {\n const value = hex.replace(\"#\", \"\");\n const full =\n value.length === 3\n ? value\n .split(\"\")\n .map((c) => c + c)\n .join(\"\")\n : value;\n const int = Number.parseInt(full, 16);\n if (Number.isNaN(int)) return [1, 1, 1];\n return [\n ((int >> 16) & 255) / 255,\n ((int >> 8) & 255) / 255,\n (int & 255) / 255,\n ];\n}\n\nfunction powerProgress(props: TvPowerOffProps, frame: number): number {\n const {\n durationInFrames = DEFAULTS.durationInFrames,\n delay = DEFAULTS.delay,\n } = props;\n return clamp((frame - delay) / Math.max(1, durationInFrames), 0, 1);\n}\n\nconst shader = makeFilterShader<TvPowerOffProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, width, height, frame, passedProps }) => {\n const {\n gain = DEFAULTS.gain,\n afterglow = DEFAULTS.afterglow,\n phosphor = DEFAULTS.phosphor,\n } = passedProps;\n gl.uniform1f(uniform(\"u_progress\"), powerProgress(passedProps, frame));\n gl.uniform2f(uniform(\"u_resolution\"), width, height);\n gl.uniform1f(uniform(\"u_gain\"), gain);\n gl.uniform1f(uniform(\"u_afterglow\"), afterglow);\n gl.uniform3fv(uniform(\"u_phosphor\"), toRgb(phosphor));\n },\n);\n\nconst TvPowerOffFallback: React.FC<TvPowerOffProps & CanvasFilterProps> = (\n props,\n) => {\n const frame = useCurrentFrame();\n const {\n children,\n gain = DEFAULTS.gain,\n afterglow = DEFAULTS.afterglow,\n phosphor = DEFAULTS.phosphor,\n } = props;\n\n const p = powerProgress(props, frame);\n const collapse = clamp(p / COLLAPSE_END, 0, 1);\n const pinch = clamp((p - COLLAPSE_END) / (PINCH_END - COLLAPSE_END), 0, 1);\n const decayed = clamp((p - PINCH_END) / (1 - PINCH_END), 0, 1);\n\n const squash = MIN_SQUASH ** collapse;\n const pinchX = MIN_PINCH ** pinch;\n const concentrate = (1 / (squash * pinchX)) ** CONCENTRATION;\n const fade = (1 - decayed) ** DECAY_CURVE;\n\n return (\n <AbsoluteFill>\n <AbsoluteFill\n style={{\n background: \"#000000\",\n opacity: clamp(p / BLACKOUT_IN, 0, 1),\n }}\n />\n <AbsoluteFill\n style={{\n scale: `${pinchX} ${squash}`,\n filter: `brightness(${1 + (concentrate - 1) * Math.max(gain, 0)})`,\n opacity: fade,\n }}\n >\n {children}\n </AbsoluteFill>\n <AbsoluteFill\n style={{\n background: `radial-gradient(circle at 50% 50%, ${phosphor} 0%, transparent 55%)`,\n opacity: clamp(pinch * afterglow, 0, 1) * fade,\n }}\n />\n </AbsoluteFill>\n );\n};\n\nexport const TvPowerOff = makeCanvasFilter<TvPowerOffProps>({\n shader,\n fallback: TvPowerOffFallback,\n});"+ },+ "durationInFrames": 18+}diff --git a/registry-artifacts/elements/underwater-ripple.json b/registry-artifacts/elements/underwater-ripple.jsonnew file mode 100644index 00000000..6a93cca1--- /dev/null+++ b/registry-artifacts/elements/underwater-ripple.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/transitions",+ "version": null+ }+ ],+ "dimensions": null,+ "displayName": "Underwater Ripple",+ "durationInFrames": 120,+ "installationMode": "component-owned-sequence",+ "slug": "underwater-ripple",+ "sourceCode": "import { AbsoluteFill, Interactive, Sequence, isHtmlInCanvasSupported, useCurrentFrame, useDelayRender, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport React, { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\nimport { type TransitionPresentation, type TransitionPresentationComponentProps } from \"@remotion/transitions\";\n\nconst QUAD = new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]);\n\nconst VERTEX_SHADER = `#version 300 es\nin vec2 a_pos;\nout vec2 v_uv;\nvoid main() {\n v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);\n gl_Position = vec4(a_pos, 0.0, 1.0);\n}`;\n\nconst LAYER: React.CSSProperties = {\n position: \"absolute\",\n inset: 0,\n width: \"100%\",\n height: \"100%\",\n};\n\nconst OUTPUT_LAYER: React.CSSProperties = { ...LAYER, pointerEvents: \"none\" };\n\nconst isCanvasTransitionSupported = (): boolean =>\n isHtmlInCanvasSupported();\n\nconst isCanvasFilterSupported = (): boolean => isHtmlInCanvasSupported();\n\ntype SceneShaderFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderDrawParams<Props> = {\n from: OffscreenCanvas | null;\n to: OffscreenCanvas | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderInstance<Props> = {\n draw: (params: SceneShaderDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneShader<Props> = (\n canvas: OffscreenCanvas,\n) => SceneShaderInstance<Props>;\n\ntype SceneFilterFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterDrawParams<Props> = {\n scene: OffscreenCanvas | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterInstance<Props> = {\n draw: (params: SceneFilterDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneFilter<Props> = (\n canvas: OffscreenCanvas,\n) => SceneFilterInstance<Props>;\n\nfunction compileShader(\n gl: WebGL2RenderingContext,\n source: string,\n type: GLenum,\n): WebGLShader {\n const shader = gl.createShader(type);\n if (!shader) {\n throw new Error(\"canvas-presentation: failed to create shader\");\n }\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n const log = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error(`canvas-presentation: failed to compile shader: ${log}`);\n }\n return shader;\n}\n\nfunction createProgram(\n gl: WebGL2RenderingContext,\n fragment: string,\n): WebGLProgram {\n const program = gl.createProgram();\n if (!program) {\n throw new Error(\"canvas-presentation: failed to create program\");\n }\n const vs = compileShader(gl, VERTEX_SHADER, gl.VERTEX_SHADER);\n const fs = compileShader(gl, fragment, gl.FRAGMENT_SHADER);\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n gl.deleteShader(vs);\n gl.deleteShader(fs);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n const log = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n throw new Error(`canvas-presentation: failed to link program: ${log}`);\n }\n return program;\n}\n\nfunction createSceneTexture(gl: WebGL2RenderingContext): WebGLTexture {\n const texture = gl.createTexture();\n if (!texture) {\n throw new Error(\"canvas-presentation: failed to create texture\");\n }\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n 1,\n 1,\n 0,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n new Uint8Array([0, 0, 0, 0]),\n );\n return texture;\n}\n\nfunction createQuadSurface(canvas: OffscreenCanvas, fragment: string) {\n const gl = canvas.getContext(\"webgl2\", { premultipliedAlpha: true });\n if (!gl) {\n throw new Error(\"canvas-presentation: WebGL2 is unavailable\");\n }\n\n const program = createProgram(gl, fragment);\n const vao = gl.createVertexArray();\n gl.bindVertexArray(vao);\n const buffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, QUAD, gl.STATIC_DRAW);\n const aPos = gl.getAttribLocation(program, \"a_pos\");\n gl.enableVertexAttribArray(aPos);\n gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 0, 0);\n\n const locations = new Map<string, WebGLUniformLocation | null>();\n const uniform = (name: string) => {\n const cached = locations.get(name);\n if (cached !== undefined) {\n return cached;\n }\n const location = gl.getUniformLocation(program, name);\n locations.set(name, location);\n return location;\n };\n\n const clear = () => {\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n };\n\n const textures: WebGLTexture[] = [];\n const createTexture = () => {\n const texture = createSceneTexture(gl);\n textures.push(texture);\n return texture;\n };\n\n const begin = (width: number, height: number) => {\n gl.viewport(0, 0, width, height);\n clear();\n gl.useProgram(program);\n gl.bindVertexArray(vao);\n };\n\n const bindScene = (\n image: OffscreenCanvas | null,\n texture: WebGLTexture,\n unit: number,\n name: string,\n ) => {\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n if (image) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n image,\n );\n }\n gl.uniform1i(uniform(name), unit);\n };\n\n const draw = () => gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n\n const cleanup = () => {\n gl.deleteProgram(program);\n for (const texture of textures) {\n gl.deleteTexture(texture);\n }\n gl.deleteBuffer(buffer);\n gl.deleteVertexArray(vao);\n };\n\n return {\n gl,\n uniform,\n clear,\n createTexture,\n begin,\n bindScene,\n draw,\n cleanup,\n };\n}\n\nfunction makeSceneShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneShaderFrame<Props>) => void,\n): SceneShader<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const fromTexture = surface.createTexture();\n const toTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ from, to, width, height, progress, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(from, fromTexture, 0, \"u_from\");\n surface.bindScene(to, toTexture, 1, \"u_to\");\n\n surface.gl.uniform1f(surface.uniform(\"u_progress\"), progress);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n progress,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nfunction makeFilterShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneFilterFrame<Props>) => void,\n): SceneFilter<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const sceneTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ scene, width, height, frame, time, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(scene, sceneTexture, 0, \"u_scene\");\n\n surface.gl.uniform1f(surface.uniform(\"u_frame\"), frame);\n surface.gl.uniform1f(surface.uniform(\"u_time\"), time);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n frame,\n time,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nconst transferred = new WeakMap<HTMLCanvasElement, OffscreenCanvas>();\n\nfunction takeOffscreen(canvas: HTMLCanvasElement): OffscreenCanvas {\n const existing = transferred.get(canvas);\n if (existing) {\n return existing;\n }\n const created = canvas.transferControlToOffscreen();\n transferred.set(canvas, created);\n return created;\n}\n\nfunction makeCanvasComponent<Props extends Record<string, unknown>>(\n shader: SceneShader<Props>,\n): React.FC<TransitionPresentationComponentProps<Props>> {\n return function CanvasScenePresentation({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n onElementImage,\n onUnmount,\n bothEnteringAndExiting,\n }) {\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneShaderInstance<Props> | null>(null);\n const passedPropsRef = React.useRef(passedProps);\n passedPropsRef.current = passedProps;\n const onElementImageRef = React.useRef(onElementImage);\n onElementImageRef.current = onElementImage;\n const onUnmountRef = React.useRef(onUnmount);\n onUnmountRef.current = onUnmount;\n\n const { delayRender, continueRender } = useDelayRender();\n const passThrough =\n bothEnteringAndExiting && presentationDirection === \"exiting\";\n\n const drawRef = React.useRef<\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => void\n >(() => undefined);\n drawRef.current = (prevImage, nextImage, progress) => {\n const instance = instanceRef.current;\n if (!instance) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: paint\");\n const to = prevImage;\n const from = nextImage;\n const width = from?.width ?? to?.width ?? 0;\n const height = from?.height ?? to?.height ?? 0;\n if (width === 0 || height === 0) {\n instance.clear();\n continueRender(handle);\n return;\n }\n instance.draw({\n from,\n to,\n width,\n height,\n progress: !to ? 0 : !from ? 1 : progress,\n passedProps: passedPropsRef.current,\n });\n continueRender(handle);\n };\n\n const draw = React.useCallback(\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => drawRef.current(prevImage, nextImage, progress),\n [],\n );\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [passThrough, shader]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n if (!scene || !capture || !context) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n onElementImageRef.current(capture, draw);\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, [passThrough, draw]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, [passThrough]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: presentationProgress is the intentional trigger — a new progress value is what schedules the next paint\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n layoutRef.current?.requestPaint?.();\n }, [passThrough, presentationProgress]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n return () => onUnmountRef.current();\n }, [passThrough]);\n\n if (passThrough) {\n return <>{children}</>;\n }\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasFilterProps = {\n children: React.ReactNode;\n};\n\nfunction makeFilterComponent<Props extends Record<string, unknown>>(\n shader: SceneFilter<Props>,\n): React.FC<Props & CanvasFilterProps> {\n return function CanvasSceneFilter(props) {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const { delayRender, continueRender } = useDelayRender();\n\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneFilterInstance<Props> | null>(null);\n\n const passedPropsRef = React.useRef(props);\n passedPropsRef.current = props;\n const frameRef = React.useRef(frame);\n frameRef.current = frame;\n const timeRef = React.useRef(frame / fps);\n timeRef.current = frame / fps;\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [shader]);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n const instance = instanceRef.current;\n if (!scene || !capture || !context || !instance) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n if (capture.width === 0 || capture.height === 0) {\n instance.clear();\n return;\n }\n instance.draw({\n scene: capture,\n width: capture.width,\n height: capture.height,\n frame: frameRef.current,\n time: timeRef.current,\n passedProps: passedPropsRef.current,\n });\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: filter paint\");\n const settle = () => continueRender(handle);\n layout.addEventListener(\"paint\", settle, { once: true });\n layout.requestPaint?.();\n return () => {\n layout.removeEventListener(\"paint\", settle);\n continueRender(handle);\n };\n });\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {props.children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasPresentationOptions<Props extends Record<string, unknown>> = {\n shader: SceneShader<Props>;\n fallback: React.FC<TransitionPresentationComponentProps<Props>>;\n};\n\nfunction makeCanvasPresentation<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasPresentationOptions<Props>): (\n props: Props,\n) => TransitionPresentation<Props> {\n const Canvas = makeCanvasComponent(shader);\n\n const Presentation: React.FC<TransitionPresentationComponentProps<Props>> = (\n props,\n ) =>\n isCanvasTransitionSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n\n return (props) => ({ component: Presentation, props });\n}\n\ntype CanvasFilterOptions<Props extends Record<string, unknown>> = {\n shader: SceneFilter<Props>;\n fallback: React.FC<Props & CanvasFilterProps>;\n};\n\nfunction makeCanvasFilter<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasFilterOptions<Props>): React.FC<Props & CanvasFilterProps> {\n const Canvas = makeFilterComponent(shader);\n\n return function CanvasFilter(props) {\n return isCanvasFilterSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n };\n}\n\ntype UnderwaterRippleProps = {\n amplitude?: number;\n scale?: number;\n speed?: number;\n dispersion?: number;\n};\n\nconst DEFAULTS = {\n amplitude: 7,\n scale: 1,\n speed: 2,\n dispersion: 1,\n};\n\ntype NormalizedProps = {\n amplitude: number;\n scale: number;\n phase: number;\n dispersion: number;\n};\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_scene;\nuniform float u_aspect;\nuniform float u_phase;\nuniform float u_amplitude;\nuniform float u_scale;\nuniform float u_dispersion;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nvec2 fieldGradient(vec2 p, float phase) {\n float scale = max(u_scale, 0.05);\n vec2 k1 = vec2(1.0, 0.35);\n vec2 k2 = vec2(-0.42, 1.0);\n vec2 k3 = vec2(0.78, -0.63);\n float f1 = 6.1 * scale;\n float f2 = 8.7 * scale;\n float f3 = 12.3 * scale;\n\n vec2 g = vec2(0.0);\n g += cos(dot(p, k1) * f1 + phase) * f1 * k1;\n g += cos(dot(p, k2) * f2 - phase * 2.0) * f2 * k2;\n g += cos(dot(p, k3) * f3 + phase * 3.0) * f3 * k3;\n\n return g / (3.0 * f2);\n}\n\nvoid main() {\n vec2 p = vec2(v_uv.x * u_aspect, v_uv.y);\n vec2 grad = fieldGradient(p, u_phase);\n\n vec2 offset = grad * u_amplitude;\n float strength = length(grad);\n vec2 direction = strength > 0.0001 ? grad / strength : vec2(0.0);\n float spread = u_dispersion * u_amplitude * 0.3 * min(strength, 2.0);\n\n vec2 base = v_uv + vec2(offset.x / u_aspect, offset.y);\n vec2 lead = vec2(direction.x / u_aspect, direction.y) * spread;\n\n vec4 center = texture(u_scene, base);\n float r = texture(u_scene, base + lead).r;\n float b = texture(u_scene, base - lead).b;\n\n outColor = vec4(r, center.g, b, center.a);\n}`;\n\nconst shader = makeFilterShader<NormalizedProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, passedProps }) => {\n const { amplitude, scale, phase, dispersion } = passedProps;\n gl.uniform1f(uniform(\"u_amplitude\"), amplitude);\n gl.uniform1f(uniform(\"u_scale\"), scale);\n gl.uniform1f(uniform(\"u_phase\"), phase);\n gl.uniform1f(uniform(\"u_dispersion\"), dispersion);\n },\n);\n\nconst UnderwaterRippleFallback: React.FC<\n NormalizedProps & CanvasFilterProps\n> = ({ children }) => <AbsoluteFill>{children}</AbsoluteFill>;\n\nconst UnderwaterRippleCanvas = makeCanvasFilter<NormalizedProps>({\n shader,\n fallback: UnderwaterRippleFallback,\n});\n\nconst UnderwaterRippleBase: React.FC<\n UnderwaterRippleProps & CanvasFilterProps\n> = ({\n amplitude = DEFAULTS.amplitude,\n scale = DEFAULTS.scale,\n speed = DEFAULTS.speed,\n dispersion = DEFAULTS.dispersion,\n children,\n}) => {\n const frame = useCurrentFrame();\n const { height, durationInFrames } = useVideoConfig();\n const cycle = Math.max(durationInFrames, 1);\n\n return (\n <UnderwaterRippleCanvas\n amplitude={amplitude / height}\n scale={scale}\n phase={(frame / cycle) * speed * Math.PI * 2}\n dispersion={dispersion}\n >\n {children}\n </UnderwaterRippleCanvas>\n );\n};\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n amplitude: {\n type: \"number\",\n min: 0,\n max: 40,\n step: 1,\n default: 7,\n description: \"Amplitude\",\n hiddenFromList: false,\n },\n scale: {\n type: \"number\",\n min: 0.2,\n max: 4,\n step: 0.1,\n default: 1,\n description: \"Scale\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n dispersion: {\n type: \"number\",\n min: 0,\n max: 4,\n step: 0.1,\n default: 1,\n description: \"Dispersion\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"amplitude\",\"scale\",\"speed\",\"dispersion\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n amplitude: 7,\n scale: 1,\n speed: 1,\n dispersion: 1,\n};\n\ntype UnderwaterRippleElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof UnderwaterRippleBase>;\n\nconst UnderwaterRippleInner = forwardRef<\n HTMLDivElement,\n UnderwaterRippleElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<UnderwaterRipple>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <UnderwaterRippleBase\n {...(componentProps as unknown as ComponentProps<typeof UnderwaterRippleBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const UnderwaterRipple = Interactive.withSchema({\n Component: UnderwaterRippleInner,\n componentName: \"<UnderwaterRipple>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 120+}diff --git a/registry-artifacts/elements/value-swap.json b/registry-artifacts/elements/value-swap.jsonnew file mode 100644index 00000000..04c7a1dd--- /dev/null+++ b/registry-artifacts/elements/value-swap.json@@ -0,0 +1,17 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [],+ "dimensions": {+ "width": 220,+ "height": 70+ },+ "displayName": "Value Swap",+ "durationInFrames": 100,+ "installationMode": "component-owned-sequence",+ "slug": "value-swap",+ "sourceCode": "import { Easing, Interactive, Sequence, interpolate, useCurrentFrame, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport React, { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\ninterface ValueSwapProps {\n values: string[];\n at: number | number[];\n duration?: number;\n distance?: number;\n direction?: \"up\" | \"down\";\n className?: string;\n style?: React.CSSProperties;\n}\n\nfunction ValueSwapBase({\n values,\n at,\n duration = 10,\n distance = 12,\n direction = \"up\",\n className,\n style,\n}: ValueSwapProps) {\n const frame = useCurrentFrame();\n const ats = Array.isArray(at) ? at : [at];\n const d = direction === \"down\" ? -distance : distance;\n const count = Math.min(values.length, ats.length + 1);\n const rendered = values.slice(0, count);\n const sizer = rendered.reduce((a, b) => (b.length > a.length ? b : a), \"\");\n const swapP = (start: number) =>\n interpolate(frame, [start, start + duration], [0, 1], {\n ...clampOpts,\n easing: Easing.inOut(Easing.cubic),\n });\n return (\n <span\n className={className}\n style={{\n position: \"relative\",\n display: \"inline-block\",\n ...style,\n }}\n >\n <span style={{ visibility: \"hidden\" }}>{sizer}</span>\n {rendered.map((value, i) => {\n const pIn = i > 0 ? swapP(ats[i - 1]) : 1;\n const pOut = i < count - 1 ? swapP(ats[i]) : 0;\n const opacity = pIn * (1 - pOut);\n if (opacity <= 0.001) return null;\n const y = (1 - pIn) * d + pOut * -d;\n return (\n <span\n key={`${i}-${value}`}\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n whiteSpace: \"nowrap\",\n opacity,\n translate: `0 ${y}px`,\n }}\n >\n {value}\n </span>\n );\n })}\n </span>\n );\n}\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n duration: {\n type: \"number\",\n min: 4,\n max: 24,\n step: 1,\n default: 10,\n description: \"Duration\",\n hiddenFromList: false,\n },\n distance: {\n type: \"number\",\n min: 4,\n max: 32,\n step: 2,\n default: 12,\n description: \"Distance\",\n hiddenFromList: false,\n },\n direction: {\n type: \"enum\",\n default: \"up\",\n variants: {\n up: {},\n down: {},\n },\n description: \"Direction\",\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n width: {\n type: \"number\",\n default: 220,\n min: 10,\n step: 10,\n description: \"Width\",\n },\n height: {\n type: \"number\",\n default: 70,\n min: 10,\n step: 10,\n description: \"Height\",\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"duration\",\"distance\",\"direction\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n duration: 10,\n distance: 12,\n direction: \"up\",\n speed: 1,\n};\n\ntype ValueSwapElementProps = InteractiveBaseProps &\n InteractiveTransformProps & { readonly width?: number; readonly height?: number } &\n ComponentProps<typeof ValueSwapBase>;\n\nconst ValueSwapInner = forwardRef<\n HTMLDivElement,\n ValueSwapElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, width = 220, height = 70, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<ValueSwap>\"}\n outlineRef={outlineRef}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width,\n height,\n ...style,\n }}\n >\n <ValueSwapBase\n {...(componentProps as unknown as ComponentProps<typeof ValueSwapBase>)}\n />\n </div>\n </div>\n </Sequence>\n );\n});\n\nexport const ValueSwap = Interactive.withSchema({\n Component: ValueSwapInner,\n componentName: \"<ValueSwap>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 100+}diff --git a/registry-artifacts/elements/vhs-filter.json b/registry-artifacts/elements/vhs-filter.jsonnew file mode 100644index 00000000..fe7e53b9--- /dev/null+++ b/registry-artifacts/elements/vhs-filter.json@@ -0,0 +1,19 @@+{+ "type": "remotion-element",+ "version": 1,+ "element": {+ "dependencies": [+ {+ "name": "@remotion/transitions",+ "version": null+ }+ ],+ "dimensions": null,+ "displayName": "VHS Filter",+ "durationInFrames": 90,+ "installationMode": "component-owned-sequence",+ "slug": "vhs-filter",+ "sourceCode": "import { AbsoluteFill, Interactive, Sequence, isHtmlInCanvasSupported, random, useCurrentFrame, useDelayRender, useVideoConfig, type InteractiveBaseProps, type InteractiveTransformProps, type InteractivitySchema, type SequenceControls } from \"remotion\";\nimport React, { forwardRef, useImperativeHandle, useRef, type ComponentProps } from \"react\";\nimport { type TransitionPresentation, type TransitionPresentationComponentProps } from \"@remotion/transitions\";\n\nconst QUAD = new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]);\n\nconst VERTEX_SHADER = `#version 300 es\nin vec2 a_pos;\nout vec2 v_uv;\nvoid main() {\n v_uv = vec2(a_pos.x * 0.5 + 0.5, 0.5 - a_pos.y * 0.5);\n gl_Position = vec4(a_pos, 0.0, 1.0);\n}`;\n\nconst LAYER: React.CSSProperties = {\n position: \"absolute\",\n inset: 0,\n width: \"100%\",\n height: \"100%\",\n};\n\nconst OUTPUT_LAYER: React.CSSProperties = { ...LAYER, pointerEvents: \"none\" };\n\nconst isCanvasTransitionSupported = (): boolean =>\n isHtmlInCanvasSupported();\n\nconst isCanvasFilterSupported = (): boolean => isHtmlInCanvasSupported();\n\ntype SceneShaderFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderDrawParams<Props> = {\n from: OffscreenCanvas | null;\n to: OffscreenCanvas | null;\n width: number;\n height: number;\n progress: number;\n passedProps: Props;\n};\n\ntype SceneShaderInstance<Props> = {\n draw: (params: SceneShaderDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneShader<Props> = (\n canvas: OffscreenCanvas,\n) => SceneShaderInstance<Props>;\n\ntype SceneFilterFrame<Props> = {\n gl: WebGL2RenderingContext;\n uniform: (name: string) => WebGLUniformLocation | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterDrawParams<Props> = {\n scene: OffscreenCanvas | null;\n width: number;\n height: number;\n frame: number;\n time: number;\n passedProps: Props;\n};\n\ntype SceneFilterInstance<Props> = {\n draw: (params: SceneFilterDrawParams<Props>) => void;\n clear: () => void;\n cleanup: () => void;\n};\n\ntype SceneFilter<Props> = (\n canvas: OffscreenCanvas,\n) => SceneFilterInstance<Props>;\n\nfunction compileShader(\n gl: WebGL2RenderingContext,\n source: string,\n type: GLenum,\n): WebGLShader {\n const shader = gl.createShader(type);\n if (!shader) {\n throw new Error(\"canvas-presentation: failed to create shader\");\n }\n gl.shaderSource(shader, source);\n gl.compileShader(shader);\n if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n const log = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error(`canvas-presentation: failed to compile shader: ${log}`);\n }\n return shader;\n}\n\nfunction createProgram(\n gl: WebGL2RenderingContext,\n fragment: string,\n): WebGLProgram {\n const program = gl.createProgram();\n if (!program) {\n throw new Error(\"canvas-presentation: failed to create program\");\n }\n const vs = compileShader(gl, VERTEX_SHADER, gl.VERTEX_SHADER);\n const fs = compileShader(gl, fragment, gl.FRAGMENT_SHADER);\n gl.attachShader(program, vs);\n gl.attachShader(program, fs);\n gl.linkProgram(program);\n gl.deleteShader(vs);\n gl.deleteShader(fs);\n if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n const log = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n throw new Error(`canvas-presentation: failed to link program: ${log}`);\n }\n return program;\n}\n\nfunction createSceneTexture(gl: WebGL2RenderingContext): WebGLTexture {\n const texture = gl.createTexture();\n if (!texture) {\n throw new Error(\"canvas-presentation: failed to create texture\");\n }\n gl.bindTexture(gl.TEXTURE_2D, texture);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n 1,\n 1,\n 0,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n new Uint8Array([0, 0, 0, 0]),\n );\n return texture;\n}\n\nfunction createQuadSurface(canvas: OffscreenCanvas, fragment: string) {\n const gl = canvas.getContext(\"webgl2\", { premultipliedAlpha: true });\n if (!gl) {\n throw new Error(\"canvas-presentation: WebGL2 is unavailable\");\n }\n\n const program = createProgram(gl, fragment);\n const vao = gl.createVertexArray();\n gl.bindVertexArray(vao);\n const buffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, QUAD, gl.STATIC_DRAW);\n const aPos = gl.getAttribLocation(program, \"a_pos\");\n gl.enableVertexAttribArray(aPos);\n gl.vertexAttribPointer(aPos, 2, gl.FLOAT, false, 0, 0);\n\n const locations = new Map<string, WebGLUniformLocation | null>();\n const uniform = (name: string) => {\n const cached = locations.get(name);\n if (cached !== undefined) {\n return cached;\n }\n const location = gl.getUniformLocation(program, name);\n locations.set(name, location);\n return location;\n };\n\n const clear = () => {\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n };\n\n const textures: WebGLTexture[] = [];\n const createTexture = () => {\n const texture = createSceneTexture(gl);\n textures.push(texture);\n return texture;\n };\n\n const begin = (width: number, height: number) => {\n gl.viewport(0, 0, width, height);\n clear();\n gl.useProgram(program);\n gl.bindVertexArray(vao);\n };\n\n const bindScene = (\n image: OffscreenCanvas | null,\n texture: WebGLTexture,\n unit: number,\n name: string,\n ) => {\n gl.activeTexture(gl.TEXTURE0 + unit);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n if (image) {\n gl.texImage2D(\n gl.TEXTURE_2D,\n 0,\n gl.RGBA,\n gl.RGBA,\n gl.UNSIGNED_BYTE,\n image,\n );\n }\n gl.uniform1i(uniform(name), unit);\n };\n\n const draw = () => gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);\n\n const cleanup = () => {\n gl.deleteProgram(program);\n for (const texture of textures) {\n gl.deleteTexture(texture);\n }\n gl.deleteBuffer(buffer);\n gl.deleteVertexArray(vao);\n };\n\n return {\n gl,\n uniform,\n clear,\n createTexture,\n begin,\n bindScene,\n draw,\n cleanup,\n };\n}\n\nfunction makeSceneShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneShaderFrame<Props>) => void,\n): SceneShader<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const fromTexture = surface.createTexture();\n const toTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ from, to, width, height, progress, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(from, fromTexture, 0, \"u_from\");\n surface.bindScene(to, toTexture, 1, \"u_to\");\n\n surface.gl.uniform1f(surface.uniform(\"u_progress\"), progress);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n progress,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nfunction makeFilterShader<Props extends Record<string, unknown>>(\n fragment: string,\n setUniforms?: (frame: SceneFilterFrame<Props>) => void,\n): SceneFilter<Props> {\n return (canvas) => {\n const surface = createQuadSurface(canvas, fragment);\n const sceneTexture = surface.createTexture();\n\n return {\n clear: surface.clear,\n cleanup: surface.cleanup,\n draw: ({ scene, width, height, frame, time, passedProps }) => {\n surface.begin(width, height);\n surface.bindScene(scene, sceneTexture, 0, \"u_scene\");\n\n surface.gl.uniform1f(surface.uniform(\"u_frame\"), frame);\n surface.gl.uniform1f(surface.uniform(\"u_time\"), time);\n surface.gl.uniform1f(surface.uniform(\"u_aspect\"), width / height);\n setUniforms?.({\n gl: surface.gl,\n uniform: surface.uniform,\n width,\n height,\n frame,\n time,\n passedProps,\n });\n\n surface.draw();\n },\n };\n };\n}\n\nconst transferred = new WeakMap<HTMLCanvasElement, OffscreenCanvas>();\n\nfunction takeOffscreen(canvas: HTMLCanvasElement): OffscreenCanvas {\n const existing = transferred.get(canvas);\n if (existing) {\n return existing;\n }\n const created = canvas.transferControlToOffscreen();\n transferred.set(canvas, created);\n return created;\n}\n\nfunction makeCanvasComponent<Props extends Record<string, unknown>>(\n shader: SceneShader<Props>,\n): React.FC<TransitionPresentationComponentProps<Props>> {\n return function CanvasScenePresentation({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n onElementImage,\n onUnmount,\n bothEnteringAndExiting,\n }) {\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneShaderInstance<Props> | null>(null);\n const passedPropsRef = React.useRef(passedProps);\n passedPropsRef.current = passedProps;\n const onElementImageRef = React.useRef(onElementImage);\n onElementImageRef.current = onElementImage;\n const onUnmountRef = React.useRef(onUnmount);\n onUnmountRef.current = onUnmount;\n\n const { delayRender, continueRender } = useDelayRender();\n const passThrough =\n bothEnteringAndExiting && presentationDirection === \"exiting\";\n\n const drawRef = React.useRef<\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => void\n >(() => undefined);\n drawRef.current = (prevImage, nextImage, progress) => {\n const instance = instanceRef.current;\n if (!instance) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: paint\");\n const to = prevImage;\n const from = nextImage;\n const width = from?.width ?? to?.width ?? 0;\n const height = from?.height ?? to?.height ?? 0;\n if (width === 0 || height === 0) {\n instance.clear();\n continueRender(handle);\n return;\n }\n instance.draw({\n from,\n to,\n width,\n height,\n progress: !to ? 0 : !from ? 1 : progress,\n passedProps: passedPropsRef.current,\n });\n continueRender(handle);\n };\n\n const draw = React.useCallback(\n (\n prevImage: OffscreenCanvas | null,\n nextImage: OffscreenCanvas | null,\n progress: number,\n ) => drawRef.current(prevImage, nextImage, progress),\n [],\n );\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [passThrough, shader]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n if (!scene || !capture || !context) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n onElementImageRef.current(capture, draw);\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, [passThrough, draw]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, [passThrough]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: presentationProgress is the intentional trigger — a new progress value is what schedules the next paint\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n layoutRef.current?.requestPaint?.();\n }, [passThrough, presentationProgress]);\n\n React.useLayoutEffect(() => {\n if (passThrough) {\n return;\n }\n return () => onUnmountRef.current();\n }, [passThrough]);\n\n if (passThrough) {\n return <>{children}</>;\n }\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasFilterProps = {\n children: React.ReactNode;\n};\n\nfunction makeFilterComponent<Props extends Record<string, unknown>>(\n shader: SceneFilter<Props>,\n): React.FC<Props & CanvasFilterProps> {\n return function CanvasSceneFilter(props) {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const { delayRender, continueRender } = useDelayRender();\n\n const layoutRef = React.useRef<HTMLCanvasElement | null>(null);\n const outputRef = React.useRef<HTMLCanvasElement | null>(null);\n const captureRef = React.useRef<OffscreenCanvas | null>(null);\n const captureContextRef =\n React.useRef<OffscreenCanvasRenderingContext2D | null>(null);\n const outputSurfaceRef = React.useRef<OffscreenCanvas | null>(null);\n const instanceRef = React.useRef<SceneFilterInstance<Props> | null>(null);\n\n const passedPropsRef = React.useRef(props);\n passedPropsRef.current = props;\n const frameRef = React.useRef(frame);\n frameRef.current = frame;\n const timeRef = React.useRef(frame / fps);\n timeRef.current = frame / fps;\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n const output = outputRef.current;\n if (!layout || !output) {\n return;\n }\n const capture = takeOffscreen(layout);\n const context = capture.getContext(\"2d\");\n if (!context) {\n throw new Error(\"canvas-presentation: failed to acquire a 2D context\");\n }\n const surface = takeOffscreen(output);\n captureRef.current = capture;\n captureContextRef.current = context;\n outputSurfaceRef.current = surface;\n instanceRef.current = shader(surface);\n\n return () => {\n instanceRef.current?.cleanup();\n instanceRef.current = null;\n captureRef.current = null;\n captureContextRef.current = null;\n outputSurfaceRef.current = null;\n };\n }, [shader]);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n layout.layoutSubtree = true;\n const handlePaint = () => {\n const scene = layout.firstElementChild;\n const capture = captureRef.current;\n const context = captureContextRef.current;\n const instance = instanceRef.current;\n if (!scene || !capture || !context || !instance) {\n return;\n }\n const elementImage = layout.captureElementImage(scene);\n try {\n context.reset();\n context.drawElementImage(elementImage, 0, 0);\n } finally {\n elementImage.close();\n }\n if (capture.width === 0 || capture.height === 0) {\n instance.clear();\n return;\n }\n instance.draw({\n scene: capture,\n width: capture.width,\n height: capture.height,\n frame: frameRef.current,\n time: timeRef.current,\n passedProps: passedPropsRef.current,\n });\n };\n layout.addEventListener(\"paint\", handlePaint);\n return () => layout.removeEventListener(\"paint\", handlePaint);\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const observer = new ResizeObserver(([entry]) => {\n const capture = captureRef.current;\n const surface = outputSurfaceRef.current;\n if (!capture || !surface) {\n return;\n }\n const width = entry.devicePixelContentBoxSize[0].inlineSize;\n const height = entry.devicePixelContentBoxSize[0].blockSize;\n capture.width = width;\n capture.height = height;\n surface.width = width;\n surface.height = height;\n layout.requestPaint?.();\n });\n observer.observe(layout, { box: \"device-pixel-content-box\" });\n return () => observer.disconnect();\n }, []);\n\n React.useLayoutEffect(() => {\n const layout = layoutRef.current;\n if (!layout) {\n return;\n }\n const handle = delayRender(\"canvas-presentation: filter paint\");\n const settle = () => continueRender(handle);\n layout.addEventListener(\"paint\", settle, { once: true });\n layout.requestPaint?.();\n return () => {\n layout.removeEventListener(\"paint\", settle);\n continueRender(handle);\n };\n });\n\n return (\n <AbsoluteFill>\n <canvas ref={layoutRef} style={LAYER}>\n {props.children}\n </canvas>\n <canvas ref={outputRef} style={OUTPUT_LAYER} />\n </AbsoluteFill>\n );\n };\n}\n\ntype CanvasPresentationOptions<Props extends Record<string, unknown>> = {\n shader: SceneShader<Props>;\n fallback: React.FC<TransitionPresentationComponentProps<Props>>;\n};\n\nfunction makeCanvasPresentation<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasPresentationOptions<Props>): (\n props: Props,\n) => TransitionPresentation<Props> {\n const Canvas = makeCanvasComponent(shader);\n\n const Presentation: React.FC<TransitionPresentationComponentProps<Props>> = (\n props,\n ) =>\n isCanvasTransitionSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n\n return (props) => ({ component: Presentation, props });\n}\n\ntype CanvasFilterOptions<Props extends Record<string, unknown>> = {\n shader: SceneFilter<Props>;\n fallback: React.FC<Props & CanvasFilterProps>;\n};\n\nfunction makeCanvasFilter<Props extends Record<string, unknown>>({\n shader,\n fallback: Fallback,\n}: CanvasFilterOptions<Props>): React.FC<Props & CanvasFilterProps> {\n const Canvas = makeFilterComponent(shader);\n\n return function CanvasFilter(props) {\n return isCanvasFilterSupported() ? (\n <Canvas {...props} />\n ) : (\n <Fallback {...props} />\n );\n };\n}\n\ntype VhsFilterProps = {\n bleed?: number;\n wobble?: number;\n noise?: number;\n intensity?: number;\n};\n\nconst DEFAULTS = {\n bleed: 1,\n wobble: 1,\n noise: 1,\n intensity: 1,\n};\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_scene;\nuniform float u_frame;\nuniform float u_time;\nuniform float u_bleed;\nuniform float u_wobble;\nuniform float u_noise;\nuniform float u_intensity;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst float PI = 3.141592653589793;\nconst float LINES = 486.0;\nconst int TAPS = 6;\n\nfloat hash(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);\n}\n\nfloat valueNoise(float x) {\n float i = floor(x);\n float f = fract(x);\n float a = hash(vec2(i, 7.0));\n float b = hash(vec2(i + 1.0, 7.0));\n return mix(a, b, f * f * (3.0 - 2.0 * f));\n}\n\nvec3 rgb2yiq(vec3 c) {\n return vec3(\n dot(c, vec3(0.299, 0.587, 0.114)),\n dot(c, vec3(0.5959, -0.2746, -0.3213)),\n dot(c, vec3(0.2115, -0.5227, 0.3112))\n );\n}\n\nvec3 yiq2rgb(vec3 c) {\n return vec3(\n c.x + 0.956 * c.y + 0.619 * c.z,\n c.x - 0.272 * c.y - 0.647 * c.z,\n c.x - 1.106 * c.y + 1.703 * c.z\n );\n}\n\nvoid main() {\n float line = floor(v_uv.y * LINES);\n float clock = mod(u_frame, 64.0);\n\n float drift =\n sin(v_uv.y * 37.0 + u_time * 2.3) * 0.55 +\n sin(v_uv.y * 96.0 - u_time * 1.1) * 0.25;\n float jitter = valueNoise(line * 0.61 + u_time * 24.0) - 0.5;\n float wobble = (drift * 0.35 + jitter * 0.9) * 0.007 * u_wobble * u_intensity;\n\n float band = smoothstep(0.955, 0.994, v_uv.y);\n float tear = valueNoise(line * 2.7 + u_time * 43.0) - 0.5;\n float headSwitch = band * tear * 0.085 * u_intensity;\n\n vec2 uv = vec2(v_uv.x + wobble + headSwitch, v_uv.y);\n vec4 base = texture(u_scene, uv);\n float luma = rgb2yiq(base.rgb).x;\n\n float smear = u_bleed * 0.02 * u_intensity;\n vec2 chroma = vec2(0.0);\n float total = 0.0;\n for (int i = 0; i < TAPS; i++) {\n float t = float(i) / float(TAPS - 1);\n float weight = 1.0 - t * 0.72;\n vec3 tap = texture(u_scene, vec2(uv.x - smear * t, uv.y)).rgb;\n chroma += rgb2yiq(tap).yz * weight;\n total += weight;\n }\n\n vec3 color = yiq2rgb(vec3(luma, chroma / total));\n\n float scan = 0.94 + 0.06 * cos(v_uv.y * LINES * PI);\n color *= mix(1.0, scan, u_intensity);\n\n float grain =\n hash(vec2(v_uv.x * 640.0 + clock * 13.0, line + clock * 5.0)) - 0.5;\n color += grain * 0.07 * u_noise * u_intensity;\n\n color = mix(color, vec3(luma), band * 0.55 * u_intensity);\n color += band * (hash(vec2(line, clock * 3.0)) - 0.5) * 0.26 * u_intensity;\n\n outColor = vec4(clamp(color, 0.0, 1.0), base.a);\n}`;\n\nconst shader = makeFilterShader<VhsFilterProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, passedProps }) => {\n const {\n bleed = DEFAULTS.bleed,\n wobble = DEFAULTS.wobble,\n noise = DEFAULTS.noise,\n intensity = DEFAULTS.intensity,\n } = passedProps;\n gl.uniform1f(uniform(\"u_bleed\"), bleed);\n gl.uniform1f(uniform(\"u_wobble\"), wobble);\n gl.uniform1f(uniform(\"u_noise\"), noise);\n gl.uniform1f(uniform(\"u_intensity\"), intensity);\n },\n);\n\nconst VhsFilterFallback: React.FC<VhsFilterProps & CanvasFilterProps> = ({\n children,\n bleed = DEFAULTS.bleed,\n wobble = DEFAULTS.wobble,\n noise = DEFAULTS.noise,\n intensity = DEFAULTS.intensity,\n}) => {\n const frame = useCurrentFrame();\n const shift =\n (random(`vhs-wobble-${frame}`) - 0.5) * 3.4 * wobble * intensity;\n const flicker =\n 1 + (random(`vhs-flicker-${frame}`) - 0.5) * 0.07 * noise * intensity;\n const smear = 3 + bleed * 5;\n\n return (\n <AbsoluteFill>\n <AbsoluteFill\n style={{\n translate: `${shift}px`,\n filter: `saturate(${1 + bleed * 0.3}) contrast(1.04) brightness(${flicker}) blur(${0.3 * intensity}px)`,\n }}\n >\n {children}\n </AbsoluteFill>\n <AbsoluteFill\n style={{\n translate: `${shift - smear}px`,\n filter: \"saturate(2.2) blur(1.4px)\",\n mixBlendMode: \"screen\",\n opacity: 0.24 * bleed * intensity,\n }}\n >\n {children}\n </AbsoluteFill>\n <AbsoluteFill\n style={{\n background:\n \"repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.22) 0px, rgba(0, 0, 0, 0.22) 1px, transparent 1px, transparent 3px)\",\n opacity: intensity,\n }}\n />\n <div\n style={{\n position: \"absolute\",\n insetInline: 0,\n bottom: 0,\n height: \"3.6%\",\n translate: `${shift * 3}px`,\n background: `rgba(228, 228, 228, ${0.13 * intensity})`,\n mixBlendMode: \"screen\",\n }}\n />\n </AbsoluteFill>\n );\n};\n\nconst VhsFilterBase = makeCanvasFilter<VhsFilterProps>({\n shader,\n fallback: VhsFilterFallback,\n});\n\nconst elementSchema = {\n ...Interactive.baseSchema,\n bleed: {\n type: \"number\",\n min: 0,\n max: 3,\n step: 0.1,\n default: 1,\n description: \"Chroma bleed\",\n hiddenFromList: false,\n },\n wobble: {\n type: \"number\",\n min: 0,\n max: 3,\n step: 0.1,\n default: 1,\n description: \"Tape wobble\",\n hiddenFromList: false,\n },\n noise: {\n type: \"number\",\n min: 0,\n max: 3,\n step: 0.1,\n default: 1,\n description: \"Noise\",\n hiddenFromList: false,\n },\n intensity: {\n type: \"number\",\n min: 0,\n max: 1,\n step: 0.05,\n default: 1,\n description: \"Intensity\",\n hiddenFromList: false,\n },\n speed: {\n type: \"number\",\n default: 1,\n min: 0.25,\n max: 4,\n step: 0.25,\n description: \"Speed\",\n hiddenFromList: false,\n },\n ...Interactive.transformSchema,\n} as const satisfies InteractivitySchema;\n\nconst ELEMENT_PROP_KEYS = new Set([\"bleed\",\"wobble\",\"noise\",\"intensity\",\"speed\"]);\n\nconst ELEMENT_PROP_DEFAULTS: Record<string, unknown> = {\n bleed: 1,\n wobble: 1,\n noise: 1,\n intensity: 1,\n speed: 1,\n};\n\ntype VhsFilterElementProps = InteractiveBaseProps &\n InteractiveTransformProps &\n ComponentProps<typeof VhsFilterBase>;\n\nconst VhsFilterInner = forwardRef<\n HTMLDivElement,\n VhsFilterElementProps & { readonly controls: SequenceControls | undefined }\n>(({ controls, name, style, ...rest }, ref) => {\n const outlineRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);\n const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };\n const sequenceProps: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(rest)) {\n if (ELEMENT_PROP_KEYS.has(key)) {\n if (value !== undefined) componentProps[key] = value;\n } else {\n sequenceProps[key] = value;\n }\n }\n return (\n <Sequence\n layout=\"none\"\n {...sequenceProps}\n controls={controls}\n name={name ?? \"<VhsFilter>\"}\n outlineRef={outlineRef}\n >\n <div\n ref={outlineRef}\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n ...style,\n }}\n >\n <VhsFilterBase\n {...(componentProps as unknown as ComponentProps<typeof VhsFilterBase>)}\n />\n </div>\n </Sequence>\n );\n});\n\nexport const VhsFilter = Interactive.withSchema({\n Component: VhsFilterInner,\n componentName: \"<VhsFilter>\",\n componentIdentity: null,\n schema: elementSchema,\n supportsEffects: false,\n});\n"+ },+ "durationInFrames": 90+}diff --git a/registry-artifacts/fade-through.json b/registry-artifacts/fade-through.jsonindex 25e49259..733a3cdc 100644--- a/registry-artifacts/fade-through.json+++ b/registry-artifacts/fade-through.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/fade-through/index.tsx",- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface FadeThroughProps {\n fromText: string;\n toText: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function FadeThrough({\n fromText,\n toText,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: FadeThroughProps) {\n const frame = useCurrentFrame() * speed;\n\n const exitDur = 8;\n const enterDur = 13;\n const overlapF = 1;\n const microDelayF = 2;\n\n const exitTotal = exitDur;\n const newStart = Math.max(0, exitTotal - overlapF + microDelayF);\n\n const exitEasing = Easing.bezier(0.4, 0, 1, 1);\n const enterEasing = Easing.bezier(0.2, 0, 0, 1);\n\n const fromOpacity = interpolate(frame, [0, exitDur], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n const fromY = interpolate(frame, [0, exitDur], [0, -4], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const local = frame - newStart;\n const toOpacity = interpolate(local, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const toY = interpolate(local, [0, enterDur], [6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const toScale = interpolate(local, [0, enterDur], [0.99, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const blurVal = interpolate(local, [0, enterDur], [2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const fontStack =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"transparent\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity: fromOpacity,\n transform: `translateY(${fromY}px)`,\n }}\n >\n {fromText}\n </span>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity: toOpacity,\n transform: `translateY(${toY}px) scale(${toScale})`,\n filter: `blur(${blurVal}px)`,\n }}\n >\n {toText}\n </span>\n </div>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface FadeThroughProps {\n fromText: string;\n toText: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function FadeThrough({\n fromText,\n toText,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: FadeThroughProps) {\n const frame = useCurrentFrame() * speed;\n\n const exitDur = 8;\n const enterDur = 13;\n const overlapF = 1;\n const microDelayF = 2;\n\n const exitTotal = exitDur;\n const newStart = Math.max(0, exitTotal - overlapF + microDelayF);\n\n const exitEasing = Easing.bezier(0.4, 0, 1, 1);\n const enterEasing = Easing.bezier(0.2, 0, 0, 1);\n\n const fromOpacity = interpolate(frame, [0, exitDur], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n const fromY = interpolate(frame, [0, exitDur], [0, -4], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const local = frame - newStart;\n const toOpacity = interpolate(local, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const toY = interpolate(local, [0, enterDur], [6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const toScale = interpolate(local, [0, enterDur], [0.99, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const blurVal = interpolate(local, [0, enterDur], [2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const fontStack =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"transparent\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity: fromOpacity,\n translate: `0 ${fromY}px`,\n }}\n >\n {fromText}\n </span>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity: toOpacity,\n translate: `0 ${toY}px`,\n scale: `${toScale}`,\n filter: `blur(${blurVal}px)`,\n }}\n >\n {toText}\n </span>\n </div>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/fade-through.tsx"}diff --git a/registry-artifacts/focus-blur-resolve.json b/registry-artifacts/focus-blur-resolve.jsonindex e6f08724..f1502ab2 100644--- a/registry-artifacts/focus-blur-resolve.json+++ b/registry-artifacts/focus-blur-resolve.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/focus-blur-resolve/index.tsx",- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface FocusBlurResolveProps {\n text: string;\n blur?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function FocusBlurResolve({\n text,\n blur = 14,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: FocusBlurResolveProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const enterDur = 23;\n const exitDur = 16;\n const exitStart = Math.max(enterDur, durationInFrames - exitDur);\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterP = interpolate(frame, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(frame, [exitStart, durationInFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const yEnter = interpolate(frame, [0, enterDur], [14, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const yExit = interpolate(frame, [exitStart, durationInFrames], [0, -10], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const y = yEnter + yExit;\n\n const blurEnter = interpolate(frame, [0, enterDur], [blur, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const blurExit = interpolate(frame, [exitStart, durationInFrames], [0, 10], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const blurVal = blurEnter + blurExit;\n\n const scale = interpolate(frame, [0, enterDur], [1.01, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity,\n transform: `translateY(${y}px) scale(${scale})`,\n filter: `blur(${blurVal}px)`,\n }}\n >\n {text}\n </span>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface FocusBlurResolveProps {\n text: string;\n blur?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function FocusBlurResolve({\n text,\n blur = 14,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: FocusBlurResolveProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const enterDur = 23;\n const exitDur = 16;\n const exitStart = Math.max(enterDur, durationInFrames - exitDur);\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterP = interpolate(frame, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(frame, [exitStart, durationInFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const yEnter = interpolate(frame, [0, enterDur], [14, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const yExit = interpolate(frame, [exitStart, durationInFrames], [0, -10], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const y = yEnter + yExit;\n\n const blurEnter = interpolate(frame, [0, enterDur], [blur, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const blurExit = interpolate(frame, [exitStart, durationInFrames], [0, 10], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const blurVal = blurEnter + blurExit;\n\n const scale = interpolate(frame, [0, enterDur], [1.01, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity,\n translate: `0 ${y}px`,\n scale: `${scale}`,\n filter: `blur(${blurVal}px)`,\n }}\n >\n {text}\n </span>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/focus-blur-resolve.tsx"}diff --git a/registry-artifacts/focus-pull.json b/registry-artifacts/focus-pull.jsonindex edce11bf..b028d500 100644--- a/registry-artifacts/focus-pull.json+++ b/registry-artifacts/focus-pull.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/focus-pull/index.tsx",- "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nexport type FocusPullProps = {\n blur?: number;\n};\n\nconst FocusPullPresentation: React.FC<\n TransitionPresentationComponentProps<FocusPullProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const { blur = 16 } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n if (!entering) {\n const exitStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.42, 0.68], [1, 0], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n }),\n transform: `scale(${interpolate(p, [0, 0.6], [1, 1.05], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n })})`,\n filter: `blur(${interpolate(p, [0.05, 0.55], [0, blur], {\n ...clampOpts,\n easing: Easing.in(Easing.quad),\n })}px) brightness(${interpolate(p, [0.1, 0.55], [1, 1.3], clampOpts)})`,\n };\n return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;\n }\n\n const childStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.32, 0.52], [0, 1], clampOpts),\n transform: `scale(${interpolate(p, [0.35, 1], [0.97, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n })})`,\n filter: `blur(${interpolate(p, [0.35, 0.9], [blur, 0], {\n ...clampOpts,\n easing: Easing.out(Easing.quad),\n })}px) brightness(${interpolate(p, [0.4, 0.85], [1.25, 1], clampOpts)})`,\n };\n\n return <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>;\n};\n\nexport function focusPull(\n props: FocusPullProps = {},\n): TransitionPresentation<FocusPullProps> {\n return {\n component: FocusPullPresentation,\n props,\n };\n}\n",+ "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nexport type FocusPullProps = {\n blur?: number;\n};\n\nconst FocusPullPresentation: React.FC<\n TransitionPresentationComponentProps<FocusPullProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const { blur = 16 } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n if (!entering) {\n const exitStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.42, 0.68], [1, 0], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n }),\n scale: `${interpolate(p, [0, 0.6], [1, 1.05], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n })}`,\n filter: `blur(${interpolate(p, [0.05, 0.55], [0, blur], {\n ...clampOpts,\n easing: Easing.in(Easing.quad),\n })}px) brightness(${interpolate(p, [0.1, 0.55], [1, 1.3], clampOpts)})`,\n };\n return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;\n }\n\n const childStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.32, 0.52], [0, 1], clampOpts),\n scale: `${interpolate(p, [0.35, 1], [0.97, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n })}`,\n filter: `blur(${interpolate(p, [0.35, 0.9], [blur, 0], {\n ...clampOpts,\n easing: Easing.out(Easing.quad),\n })}px) brightness(${interpolate(p, [0.4, 0.85], [1.25, 1], clampOpts)})`,\n };\n\n return <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>;\n};\n\nexport function focusPull(\n props: FocusPullProps = {},\n): TransitionPresentation<FocusPullProps> {\n return {\n component: FocusPullPresentation,\n props,\n };\n}\n","type": "registry:component","target": "components/remocn/focus-pull.tsx"}diff --git a/registry-artifacts/github-sponsors.json b/registry-artifacts/github-sponsors.jsonindex c0a04288..6fae0784 100644--- a/registry-artifacts/github-sponsors.json+++ b/registry-artifacts/github-sponsors.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/github-sponsors/index.tsx",- "content": "\"use client\";\n\nimport { loadFont as loadSans } from \"@remotion/google-fonts/Manrope\";\nimport { memo, useMemo, useState } from \"react\";\nimport {\n AbsoluteFill,\n Easing,\n Img,\n interpolate,\n Sequence,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { BlurOutUp } from \"@/components/remocn/blur-out-up\";\nimport { SoftBlurIn } from \"@/components/remocn/soft-blur-in\";\n\nexport interface Sponsor {\n login: string;\n avatarUrl: string;\n}\n\nexport interface GitHubSponsorsProps {\n account?: string;\n sponsors?: Sponsor[];\n accentColor?: string;\n speed?: number;\n theme?: \"light\" | \"dark\";\n}\n\nexport const SAMPLE_SPONSORS: Sponsor[] = [\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n },\n {\n login: \"schacon\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/70?v=4\",\n },\n {\n login: \"rtomayko\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/5?v=4\",\n },\n {\n login: \"bmizerany\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/6?v=4\",\n },\n {\n login: \"atmos\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/38?v=4\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n },\n {\n login: \"macournoyer\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/15?v=4\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n },\n {\n login: \"uggedal\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/16?v=4\",\n },\n {\n login: \"anotherjesse\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/9?v=4\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n },\n {\n login: \"takeo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/22?v=4\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n },\n {\n login: \"kballard\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/7?v=4\",\n },\n {\n login: \"jnewland\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/12?v=4\",\n },\n {\n login: \"caged\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/13?v=4\",\n },\n { login: \"sr\", avatarUrl: \"https://avatars.githubusercontent.com/u/19?v=4\" },\n];\n\nconst { fontFamily: SANS_FAMILY } = loadSans();\nconst FONT_FAMILY = SANS_FAMILY;\n\nconst HEART_PATH =\n \"M12.0001 4.52853C14.2745 2.23823 17.9866 2.23823 20.2611 4.52853C22.5784 6.86156 22.5784 10.667 20.2611 13.0001L12.0001 21.3199L3.73907 13.0001C1.42175 10.667 1.42175 6.86156 3.73907 4.52853C6.01353 2.23823 9.72563 2.23823 12.0001 4.52853Z\";\n\nconst REF_W = 1280;\nconst REF_H = 720;\nconst GRID_CX = 640;\nconst GRID_CY = 304;\nconst GRID_BOX_W = 900;\nconst GRID_BOX_H = 236;\nconst HEART_START_Y = 286;\nconst HEART_HEADER_Y = 120;\n\nconst DRAW_END = 40;\nconst PULSE_END = 62;\nconst HEART_DOCK_START = 52;\nconst HEART_DOCK_END = 84;\nconst AVATAR_START = 70;\nconst AVATAR_STEP = 3;\nconst AVATAR_DUR = 22;\nconst AVATAR_WINDOW = 56;\nconst THANK_START = 150;\nconst SUB_START = 166;\nconst CTA_START = 182;\nconst CTA_DUR = 22;\n\ninterface Theme {\n bg: string;\n bgSubtle: string;\n fg: string;\n fgMuted: string;\n border: string;\n}\n\nconst THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n bg: \"#ffffff\",\n bgSubtle: \"#fafafa\",\n fg: \"#171717\",\n fgMuted: \"#737373\",\n border: \"#ededed\",\n },\n dark: {\n bg: \"#0a0a0a\",\n bgSubtle: \"#161618\",\n fg: \"#fafafa\",\n fgMuted: \"#a1a1aa\",\n border: \"#262626\",\n },\n};\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport function gridColumns(\n count: number,\n boxW = GRID_BOX_W,\n boxH = GRID_BOX_H,\n): number {\n if (count <= 0) return 0;\n return Math.max(\n 1,\n Math.min(count, Math.round(Math.sqrt((count * boxW) / boxH))),\n );\n}\n\nexport function gridLayout(\n count: number,\n cols: number,\n cellW: number,\n cellH: number,\n cx = GRID_CX,\n cy = GRID_CY,\n): Point[] {\n if (count <= 0 || cols <= 0) return [];\n const rows = Math.ceil(count / cols);\n const out: Point[] = [];\n for (let i = 0; i < count; i++) {\n const r = Math.floor(i / cols);\n const c = i % cols;\n const rowCount = Math.min(cols, count - r * cols);\n const rowW = (rowCount - 1) * cellW;\n const x = cx - rowW / 2 + c * cellW;\n const totalH = (rows - 1) * cellH;\n const y = cy - totalH / 2 + r * cellH;\n out.push({ x, y });\n }\n return out;\n}\n\nexport function heartDrawProgress(frame: number, speed = 1): number {\n return interpolate(frame * speed, [0, DRAW_END], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.bezier(0.22, 1, 0.36, 1),\n });\n}\n\nexport function heartPulseScale(frame: number, speed = 1): number {\n return interpolate(\n frame * speed,\n [DRAW_END - 2, DRAW_END + 6, DRAW_END + 17, PULSE_END],\n [1, 0.9, 1.06, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.ease),\n },\n );\n}\n\nfunction ramp(\n frame: number,\n speed: number,\n start: number,\n end: number,\n easing = Easing.bezier(0.22, 1, 0.36, 1),\n): number {\n return interpolate(frame * speed, [start, end], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n}\n\nfunction Avatar({\n login,\n avatarUrl,\n size,\n theme,\n grayscale,\n}: {\n login: string;\n avatarUrl: string;\n size: number;\n theme: Theme;\n grayscale: number;\n}) {\n const [errored, setErrored] = useState(false);\n const base = {\n width: size,\n height: size,\n borderRadius: 9999,\n border: `1px solid ${theme.border}`,\n flexShrink: 0,\n filter: `grayscale(${grayscale})`,\n } as const;\n\n if (errored || !avatarUrl) {\n return (\n <div\n style={{\n ...base,\n background: theme.bgSubtle,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: theme.fgMuted,\n fontSize: size * 0.42,\n fontWeight: 600,\n fontFamily: FONT_FAMILY,\n }}\n >\n {login.charAt(0).toUpperCase()}\n </div>\n );\n }\n\n return (\n <Img\n src={avatarUrl}\n crossOrigin=\"anonymous\"\n onError={() => setErrored(true)}\n style={{ ...base, objectFit: \"cover\" }}\n />\n );\n}\n\nconst SponsorNode = memo(function SponsorNode({\n sponsor,\n cell,\n progress,\n size,\n theme,\n}: {\n sponsor: Sponsor;\n cell: Point;\n progress: number;\n size: number;\n theme: Theme;\n}) {\n const y = (1 - progress) * 14;\n const blur = (1 - progress) * 10;\n\n return (\n <div\n style={{\n position: \"absolute\",\n left: cell.x,\n top: cell.y,\n transform: `translate(-50%, -50%) translateY(${y}px)`,\n opacity: progress,\n filter: `blur(${blur}px)`,\n willChange: \"transform, opacity, filter\",\n }}\n >\n <Avatar\n login={sponsor.login}\n avatarUrl={sponsor.avatarUrl}\n size={size}\n theme={theme}\n grayscale={1 - progress}\n />\n </div>\n );\n});\n\nfunction HeartGlyph({\n size,\n accent,\n draw,\n fill,\n}: {\n size: number;\n accent: string;\n draw: number;\n fill: number;\n}) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n width={size}\n height={size}\n >\n <title>GitHub Sponsors</title>\n <path\n d={HEART_PATH}\n pathLength={1}\n fill={accent}\n fillOpacity={fill}\n stroke={accent}\n strokeWidth={1.4}\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n strokeDasharray={1}\n strokeDashoffset={1 - draw}\n />\n </svg>\n );\n}\n\nexport function GitHubSponsors({\n account = \"remocn\",\n sponsors = SAMPLE_SPONSORS,\n accentColor = \"#db61a2\",\n speed = 1,\n theme = \"light\",\n}: GitHubSponsorsProps) {\n const frame = useCurrentFrame();\n const { width, height } = useVideoConfig();\n const t = THEMES[theme] ?? THEMES.light;\n const stageScale = Math.min(width / REF_W, height / REF_H);\n\n const count = sponsors.length;\n const avatarStep =\n count > 1 ? Math.min(AVATAR_STEP, AVATAR_WINDOW / (count - 1)) : 0;\n const cols = gridColumns(count);\n const rows = Math.max(1, Math.ceil(count / Math.max(1, cols)));\n const cellW = GRID_BOX_W / Math.max(1, cols);\n const cellH = GRID_BOX_H / rows;\n const avatarSize = Math.min(84, Math.min(cellW, cellH) * 0.76);\n\n const cells = useMemo(\n () => gridLayout(count, cols, cellW, cellH),\n [count, cols, cellW, cellH],\n );\n\n const draw = heartDrawProgress(frame, speed);\n const fillO = ramp(frame, speed, DRAW_END - 8, PULSE_END, Easing.linear);\n const pulse = heartPulseScale(frame, speed);\n const dock = ramp(frame, speed, HEART_DOCK_START, HEART_DOCK_END);\n\n const heartBase = 168;\n const heartScale = (1 - 0.62 * dock) * pulse;\n const heartDy = (HEART_HEADER_Y - HEART_START_Y) * dock;\n\n const ctaProgress = ramp(frame, speed, CTA_START, CTA_START + CTA_DUR);\n const ctaBlur = (1 - ctaProgress) * 10;\n const ctaY = (1 - ctaProgress) * 12;\n const accountOpacity = ramp(\n frame,\n speed,\n CTA_START + 8,\n CTA_START + CTA_DUR + 8,\n );\n\n return (\n <AbsoluteFill style={{ background: t.bg }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: REF_W,\n height: REF_H,\n transform: `translate(-50%, -50%) scale(${stageScale})`,\n }}\n >\n {sponsors.map((sponsor, i) => (\n <SponsorNode\n key={`node-${sponsor.login}-${i}`}\n sponsor={sponsor}\n cell={cells[i]}\n progress={ramp(\n frame,\n speed,\n AVATAR_START + i * avatarStep,\n AVATAR_START + i * avatarStep + AVATAR_DUR,\n )}\n size={avatarSize}\n theme={t}\n />\n ))}\n\n <div\n style={{\n position: \"absolute\",\n left: GRID_CX,\n top: HEART_START_Y,\n transform: `translate(-50%, -50%) translate(0px, ${heartDy}px) scale(${heartScale})`,\n width: heartBase,\n height: heartBase,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n willChange: \"transform\",\n }}\n >\n <HeartGlyph\n size={heartBase}\n accent={accentColor}\n draw={draw}\n fill={fillO}\n />\n </div>\n\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 444,\n width: REF_W,\n height: 84,\n }}\n >\n <Sequence from={Math.round(THANK_START / speed)} layout=\"none\">\n <SoftBlurIn\n text=\"Thank you\"\n fontSize={54}\n fontWeight={600}\n color={t.fg}\n speed={speed}\n />\n </Sequence>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 532,\n width: REF_W,\n height: 36,\n }}\n >\n <Sequence from={Math.round(SUB_START / speed)} layout=\"none\">\n <BlurOutUp\n text={`Powered by ${count} sponsors`}\n fontSize={24}\n fontWeight={500}\n color={t.fgMuted}\n speed={speed}\n />\n </Sequence>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 584,\n width: REF_W,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n gap: 12,\n }}\n >\n <div\n style={{\n transform: `translateY(${ctaY}px)`,\n opacity: ctaProgress,\n filter: `blur(${ctaBlur}px)`,\n display: \"flex\",\n alignItems: \"center\",\n gap: 10,\n padding: \"14px 26px\",\n borderRadius: 9999,\n background: accentColor,\n color: \"#ffffff\",\n fontSize: 24,\n fontWeight: 600,\n fontFamily: FONT_FAMILY,\n willChange: \"transform, opacity, filter\",\n }}\n >\n <HeartGlyph size={22} accent=\"#ffffff\" draw={1} fill={1} />\n Become a sponsor\n </div>\n <div\n style={{\n opacity: accountOpacity * 0.9,\n fontSize: 18,\n fontWeight: 400,\n color: t.fgMuted,\n fontFamily: FONT_FAMILY,\n }}\n >\n github.com/sponsors/{account}\n </div>\n </div>\n </div>\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport { loadFont as loadSans } from \"@remotion/google-fonts/Manrope\";\nimport { memo, useMemo, useState } from \"react\";\nimport {\n AbsoluteFill,\n Easing,\n Img,\n interpolate,\n Sequence,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { BlurOutUp } from \"@/components/remocn/blur-out-up\";\nimport { SoftBlurIn } from \"@/components/remocn/soft-blur-in\";\n\nexport interface Sponsor {\n login: string;\n avatarUrl: string;\n}\n\nexport interface GitHubSponsorsProps {\n account?: string;\n sponsors?: Sponsor[];\n accentColor?: string;\n speed?: number;\n theme?: \"light\" | \"dark\";\n}\n\nexport const SAMPLE_SPONSORS: Sponsor[] = [\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n },\n {\n login: \"schacon\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/70?v=4\",\n },\n {\n login: \"rtomayko\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/5?v=4\",\n },\n {\n login: \"bmizerany\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/6?v=4\",\n },\n {\n login: \"atmos\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/38?v=4\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n },\n {\n login: \"macournoyer\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/15?v=4\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n },\n {\n login: \"uggedal\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/16?v=4\",\n },\n {\n login: \"anotherjesse\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/9?v=4\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n },\n {\n login: \"takeo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/22?v=4\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n },\n {\n login: \"kballard\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/7?v=4\",\n },\n {\n login: \"jnewland\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/12?v=4\",\n },\n {\n login: \"caged\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/13?v=4\",\n },\n { login: \"sr\", avatarUrl: \"https://avatars.githubusercontent.com/u/19?v=4\" },\n];\n\nconst { fontFamily: SANS_FAMILY } = loadSans();\nconst FONT_FAMILY = SANS_FAMILY;\n\nconst HEART_PATH =\n \"M12.0001 4.52853C14.2745 2.23823 17.9866 2.23823 20.2611 4.52853C22.5784 6.86156 22.5784 10.667 20.2611 13.0001L12.0001 21.3199L3.73907 13.0001C1.42175 10.667 1.42175 6.86156 3.73907 4.52853C6.01353 2.23823 9.72563 2.23823 12.0001 4.52853Z\";\n\nconst REF_W = 1280;\nconst REF_H = 720;\nconst GRID_CX = 640;\nconst GRID_CY = 304;\nconst GRID_BOX_W = 900;\nconst GRID_BOX_H = 236;\nconst HEART_START_Y = 286;\nconst HEART_HEADER_Y = 120;\n\nconst DRAW_END = 40;\nconst PULSE_END = 62;\nconst HEART_DOCK_START = 52;\nconst HEART_DOCK_END = 84;\nconst AVATAR_START = 70;\nconst AVATAR_STEP = 3;\nconst AVATAR_DUR = 22;\nconst AVATAR_WINDOW = 56;\nconst THANK_START = 150;\nconst SUB_START = 166;\nconst CTA_START = 182;\nconst CTA_DUR = 22;\n\ninterface Theme {\n bg: string;\n bgSubtle: string;\n fg: string;\n fgMuted: string;\n border: string;\n}\n\nconst THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n bg: \"#ffffff\",\n bgSubtle: \"#fafafa\",\n fg: \"#171717\",\n fgMuted: \"#737373\",\n border: \"#ededed\",\n },\n dark: {\n bg: \"#0a0a0a\",\n bgSubtle: \"#161618\",\n fg: \"#fafafa\",\n fgMuted: \"#a1a1aa\",\n border: \"#262626\",\n },\n};\n\nexport interface Point {\n x: number;\n y: number;\n}\n\nexport function gridColumns(\n count: number,\n boxW = GRID_BOX_W,\n boxH = GRID_BOX_H,\n): number {\n if (count <= 0) return 0;\n return Math.max(\n 1,\n Math.min(count, Math.round(Math.sqrt((count * boxW) / boxH))),\n );\n}\n\nexport function gridLayout(\n count: number,\n cols: number,\n cellW: number,\n cellH: number,\n cx = GRID_CX,\n cy = GRID_CY,\n): Point[] {\n if (count <= 0 || cols <= 0) return [];\n const rows = Math.ceil(count / cols);\n const out: Point[] = [];\n for (let i = 0; i < count; i++) {\n const r = Math.floor(i / cols);\n const c = i % cols;\n const rowCount = Math.min(cols, count - r * cols);\n const rowW = (rowCount - 1) * cellW;\n const x = cx - rowW / 2 + c * cellW;\n const totalH = (rows - 1) * cellH;\n const y = cy - totalH / 2 + r * cellH;\n out.push({ x, y });\n }\n return out;\n}\n\nexport function heartDrawProgress(frame: number, speed = 1): number {\n return interpolate(frame * speed, [0, DRAW_END], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.bezier(0.22, 1, 0.36, 1),\n });\n}\n\nexport function heartPulseScale(frame: number, speed = 1): number {\n return interpolate(\n frame * speed,\n [DRAW_END - 2, DRAW_END + 6, DRAW_END + 17, PULSE_END],\n [1, 0.9, 1.06, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.ease),\n },\n );\n}\n\nfunction ramp(\n frame: number,\n speed: number,\n start: number,\n end: number,\n easing = Easing.bezier(0.22, 1, 0.36, 1),\n): number {\n return interpolate(frame * speed, [start, end], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n}\n\nfunction Avatar({\n login,\n avatarUrl,\n size,\n theme,\n grayscale,\n}: {\n login: string;\n avatarUrl: string;\n size: number;\n theme: Theme;\n grayscale: number;\n}) {\n const [errored, setErrored] = useState(false);\n const base = {\n width: size,\n height: size,\n borderRadius: 9999,\n border: `1px solid ${theme.border}`,\n flexShrink: 0,\n filter: `grayscale(${grayscale})`,\n } as const;\n\n if (errored || !avatarUrl) {\n return (\n <div\n style={{\n ...base,\n background: theme.bgSubtle,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: theme.fgMuted,\n fontSize: size * 0.42,\n fontWeight: 600,\n fontFamily: FONT_FAMILY,\n }}\n >\n {login.charAt(0).toUpperCase()}\n </div>\n );\n }\n\n return (\n <Img\n src={avatarUrl}\n crossOrigin=\"anonymous\"\n onError={() => setErrored(true)}\n style={{ ...base, objectFit: \"cover\" }}\n />\n );\n}\n\nconst SponsorNode = memo(function SponsorNode({\n sponsor,\n cell,\n progress,\n size,\n theme,\n}: {\n sponsor: Sponsor;\n cell: Point;\n progress: number;\n size: number;\n theme: Theme;\n}) {\n const y = (1 - progress) * 14;\n const blur = (1 - progress) * 10;\n\n return (\n <div\n style={{\n position: \"absolute\",\n left: cell.x,\n top: cell.y,\n translate: `-50% calc(-50% + ${y}px)`,\n opacity: progress,\n filter: `blur(${blur}px)`,\n willChange: \"transform, opacity, filter\",\n }}\n >\n <Avatar\n login={sponsor.login}\n avatarUrl={sponsor.avatarUrl}\n size={size}\n theme={theme}\n grayscale={1 - progress}\n />\n </div>\n );\n});\n\nfunction HeartGlyph({\n size,\n accent,\n draw,\n fill,\n}: {\n size: number;\n accent: string;\n draw: number;\n fill: number;\n}) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n width={size}\n height={size}\n >\n <title>GitHub Sponsors</title>\n <path\n d={HEART_PATH}\n pathLength={1}\n fill={accent}\n fillOpacity={fill}\n stroke={accent}\n strokeWidth={1.4}\n strokeLinejoin=\"round\"\n strokeLinecap=\"round\"\n strokeDasharray={1}\n strokeDashoffset={1 - draw}\n />\n </svg>\n );\n}\n\nexport function GitHubSponsors({\n account = \"remocn\",\n sponsors = SAMPLE_SPONSORS,\n accentColor = \"#db61a2\",\n speed = 1,\n theme = \"light\",\n}: GitHubSponsorsProps) {\n const frame = useCurrentFrame();\n const { width, height } = useVideoConfig();\n const t = THEMES[theme] ?? THEMES.light;\n const stageScale = Math.min(width / REF_W, height / REF_H);\n\n const count = sponsors.length;\n const avatarStep =\n count > 1 ? Math.min(AVATAR_STEP, AVATAR_WINDOW / (count - 1)) : 0;\n const cols = gridColumns(count);\n const rows = Math.max(1, Math.ceil(count / Math.max(1, cols)));\n const cellW = GRID_BOX_W / Math.max(1, cols);\n const cellH = GRID_BOX_H / rows;\n const avatarSize = Math.min(84, Math.min(cellW, cellH) * 0.76);\n\n const cells = useMemo(\n () => gridLayout(count, cols, cellW, cellH),\n [count, cols, cellW, cellH],\n );\n\n const draw = heartDrawProgress(frame, speed);\n const fillO = ramp(frame, speed, DRAW_END - 8, PULSE_END, Easing.linear);\n const pulse = heartPulseScale(frame, speed);\n const dock = ramp(frame, speed, HEART_DOCK_START, HEART_DOCK_END);\n\n const heartBase = 168;\n const heartScale = (1 - 0.62 * dock) * pulse;\n const heartDy = (HEART_HEADER_Y - HEART_START_Y) * dock;\n\n const ctaProgress = ramp(frame, speed, CTA_START, CTA_START + CTA_DUR);\n const ctaBlur = (1 - ctaProgress) * 10;\n const ctaY = (1 - ctaProgress) * 12;\n const accountOpacity = ramp(\n frame,\n speed,\n CTA_START + 8,\n CTA_START + CTA_DUR + 8,\n );\n\n return (\n <AbsoluteFill style={{ background: t.bg }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: REF_W,\n height: REF_H,\n translate: \"-50% -50%\",\n scale: `${stageScale}`,\n }}\n >\n {sponsors.map((sponsor, i) => (\n <SponsorNode\n key={`node-${sponsor.login}-${i}`}\n sponsor={sponsor}\n cell={cells[i]}\n progress={ramp(\n frame,\n speed,\n AVATAR_START + i * avatarStep,\n AVATAR_START + i * avatarStep + AVATAR_DUR,\n )}\n size={avatarSize}\n theme={t}\n />\n ))}\n\n <div\n style={{\n position: \"absolute\",\n left: GRID_CX,\n top: HEART_START_Y,\n translate: `-50% calc(-50% + ${heartDy}px)`,\n scale: `${heartScale}`,\n width: heartBase,\n height: heartBase,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n willChange: \"transform\",\n }}\n >\n <HeartGlyph\n size={heartBase}\n accent={accentColor}\n draw={draw}\n fill={fillO}\n />\n </div>\n\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 444,\n width: REF_W,\n height: 84,\n }}\n >\n <Sequence from={Math.round(THANK_START / speed)} layout=\"none\">\n <SoftBlurIn\n text=\"Thank you\"\n fontSize={54}\n fontWeight={600}\n color={t.fg}\n speed={speed}\n />\n </Sequence>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 532,\n width: REF_W,\n height: 36,\n }}\n >\n <Sequence from={Math.round(SUB_START / speed)} layout=\"none\">\n <BlurOutUp\n text={`Powered by ${count} sponsors`}\n fontSize={24}\n fontWeight={500}\n color={t.fgMuted}\n speed={speed}\n />\n </Sequence>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 584,\n width: REF_W,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n gap: 12,\n }}\n >\n <div\n style={{\n translate: `0 ${ctaY}px`,\n opacity: ctaProgress,\n filter: `blur(${ctaBlur}px)`,\n display: \"flex\",\n alignItems: \"center\",\n gap: 10,\n padding: \"14px 26px\",\n borderRadius: 9999,\n background: accentColor,\n color: \"#ffffff\",\n fontSize: 24,\n fontWeight: 600,\n fontFamily: FONT_FAMILY,\n willChange: \"transform, opacity, filter\",\n }}\n >\n <HeartGlyph size={22} accent=\"#ffffff\" draw={1} fill={1} />\n Become a sponsor\n </div>\n <div\n style={{\n opacity: accountOpacity * 0.9,\n fontSize: 18,\n fontWeight: 400,\n color: t.fgMuted,\n fontFamily: FONT_FAMILY,\n }}\n >\n github.com/sponsors/{account}\n </div>\n </div>\n </div>\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/github-sponsors.tsx"}diff --git a/registry-artifacts/github-stars.json b/registry-artifacts/github-stars.jsonindex 9dbd11a5..497daa02 100644--- a/registry-artifacts/github-stars.json+++ b/registry-artifacts/github-stars.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/github-stars/index.tsx",- "content": "\"use client\";\n\nimport { loadFont as loadMono } from \"@remotion/google-fonts/GeistMono\";\nimport { loadFont as loadSans } from \"@remotion/google-fonts/Manrope\";\nimport { format, parseISO } from \"date-fns\";\nimport { memo, useMemo, useState } from \"react\";\nimport {\n AbsoluteFill,\n Easing,\n Img,\n interpolate,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { Odometer } from \"@/components/remocn/number-wheel\";\n\nexport interface Stargazer {\n login: string;\n avatarUrl: string;\n /** ISO date string, e.g. \"2021-03-04\" */\n starredAt: string;\n}\n\nexport interface GitHubStarsProps {\n repo?: string;\n totalStars?: number;\n stargazers?: Stargazer[];\n orientation?: \"horizontal\" | \"vertical\";\n accentColor?: string;\n speed?: number;\n theme?: \"light\" | \"dark\";\n repoAvatarUrl?: string;\n}\n\n/**\n * Built-in mock stargazers so the composition renders immediately from defaults\n * (own-your-code: no external data needed after `shadcn add`). Real low-id GitHub\n * avatar URLs are CORS-ok, so the docs preview shows round photos.\n */\nexport const SAMPLE_STARGAZERS: Stargazer[] = [\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n];\n\n// Load fonts INSIDE the composition (via @remotion/google-fonts, which waits for\n// the font with delayRender before rendering frames). Server renders run in a\n// bare headless Chromium with no app CSS / `--font-*` vars, so without this the\n// MP4 falls back to the default sans-serif. Manrope for UI text, JetBrains Mono\n// for the numeric star counter (odometer).\nconst { fontFamily: SANS_FAMILY } = loadSans();\nconst { fontFamily: MONO_FAMILY } = loadMono();\n\nconst FONT_FAMILY = SANS_FAMILY;\n\ninterface Theme {\n bg: string;\n bgSubtle: string;\n fg: string;\n fgMuted: string;\n border: string;\n}\n\nconst THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n bg: \"#ffffff\",\n bgSubtle: \"#fafafa\",\n fg: \"#171717\",\n fgMuted: \"#737373\",\n border: \"#ededed\",\n },\n dark: {\n bg: \"#0a0a0a\",\n bgSubtle: \"#111113\",\n fg: \"#fafafa\",\n fgMuted: \"#a1a1aa\",\n border: \"#262626\",\n },\n};\n\n// --- Pure helpers (unit-tested) -------------------------------------------\n\n/**\n * Clamp a stargazer list to at most `max` evenly-sampled keyframe rows while\n * always preserving the first and last entry. Safety net for callers that pass\n * a huge array straight into the composition.\n */\nexport function downsampleStargazers(\n stargazers: Stargazer[],\n max = 60,\n): Stargazer[] {\n const len = stargazers.length;\n if (len <= max) return stargazers;\n if (max <= 1) return len ? [stargazers[0]] : [];\n const out: Stargazer[] = [];\n for (let i = 0; i < max; i++) {\n out.push(stargazers[Math.round((i * (len - 1)) / (max - 1))]);\n }\n return out;\n}\n\nconst MAX_ELASTIC_OVERSHOOT = 0.0658; // Easing.elastic(1) peak−1 (true ≈0.0657267), rounded UP for use as a safety bound\nconst SCROLL_OVERSHOOT = 1 + MAX_ELASTIC_OVERSHOOT; // ≈1.0658\nconst MASK_SOLID_FRACTION = 0.88; // bottom fade mask is solid until 88% of viewport height\nconst COUNT_PORTION = 0.8;\n\n/** Monotonic counter ramp — mirrors the reference StarCount easing. Drives the\n * odometer, which must stay monotonic or the digit wheels roll backward. */\nexport function computeCounterProgress({\n frame,\n speed = 1,\n durationInFrames,\n}: {\n frame: number;\n speed?: number;\n durationInFrames: number;\n}): number {\n return interpolate(\n frame * speed,\n [0, durationInFrames * COUNT_PORTION],\n [0, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.bezier(0.5, 1, 0.5, 1),\n },\n );\n}\n\n/** Elastic scroll ramp — mirrors the reference avatar slide. NON-monotonic:\n * overshoots to ~SCROLL_OVERSHOOT near t≈0.63 and settles to exactly 1 at t=1.\n * Drives only scrollY (never the odometer). */\nexport function computeScrollProgress({\n frame,\n speed = 1,\n durationInFrames,\n}: {\n frame: number;\n speed?: number;\n durationInFrames: number;\n}): number {\n return interpolate(frame * speed, [0, durationInFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.elastic(0.8),\n });\n}\n\n/** Empty rows appended below the last stargazer so the elastic recoil never\n * lifts real content off the mask-solid zone, revealing a void. Single source\n * of truth shared with isScrollContained so the two cannot drift. */\nexport function computeSpacerRows({\n N,\n rowH,\n viewportH,\n visibleRows,\n}: {\n N: number;\n rowH: number;\n viewportH: number;\n visibleRows: number;\n}): number {\n const D = Math.max(0, (N - visibleRows + 1) * rowH);\n const needPx =\n MASK_SOLID_FRACTION * viewportH - N * rowH + SCROLL_OVERSHOOT * D;\n return Math.max(0, Math.ceil(needPx / rowH));\n}\n\n/** True when, at the elastic overshoot peak, content still fills the mask-solid\n * zone (no void revealed). True by construction given computeSpacerRows. */\nexport function isScrollContained({\n N,\n rowH,\n viewportH,\n visibleRows,\n}: {\n N: number;\n rowH: number;\n viewportH: number;\n visibleRows: number;\n}): boolean {\n const D = Math.max(0, (N - visibleRows + 1) * rowH);\n const spacerPx =\n computeSpacerRows({ N, rowH, viewportH, visibleRows }) * rowH;\n return (\n N * rowH + spacerPx - SCROLL_OVERSHOOT * D >=\n MASK_SOLID_FRACTION * viewportH\n );\n}\n\n/** The running counter value for a given scroll progress. Locks at totalStars. */\nexport function getStarCount(\n scrollProgress: number,\n totalStars: number,\n): number {\n return Math.round(scrollProgress * totalStars);\n}\n\n// --- Sub-components --------------------------------------------------------\n\nfunction StarGlyph({ size, fill }: { size: number; fill: string }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n width={size}\n height={size}\n color={fill}\n fill={fill}\n stroke={fill}\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <title>Stars</title>\n <path d=\"M13.7276 3.44418L15.4874 6.99288C15.7274 7.48687 16.3673 7.9607 16.9073 8.05143L20.0969 8.58575C22.1367 8.92853 22.6167 10.4206 21.1468 11.8925L18.6671 14.3927C18.2471 14.8161 18.0172 15.6327 18.1471 16.2175L18.8571 19.3125C19.417 21.7623 18.1271 22.71 15.9774 21.4296L12.9877 19.6452C12.4478 19.3226 11.5579 19.3226 11.0079 19.6452L8.01827 21.4296C5.8785 22.71 4.57865 21.7522 5.13859 19.3125L5.84851 16.2175C5.97849 15.6327 5.74852 14.8161 5.32856 14.3927L2.84884 11.8925C1.389 10.4206 1.85895 8.92853 3.89872 8.58575L7.08837 8.05143C7.61831 7.9607 8.25824 7.48687 8.49821 6.99288L10.258 3.44418C11.2179 1.51861 12.7777 1.51861 13.7276 3.44418Z\"></path>\n </svg>\n );\n}\n\nfunction Avatar({\n login,\n avatarUrl,\n size,\n theme,\n}: {\n login: string;\n avatarUrl: string;\n size: number;\n theme: Theme;\n}) {\n const [errored, setErrored] = useState(false);\n const ringStyle = {\n width: size,\n height: size,\n borderRadius: 9999,\n border: `1px solid ${theme.border}`,\n flexShrink: 0,\n } as const;\n\n if (errored || !avatarUrl) {\n return (\n <div\n style={{\n ...ringStyle,\n background: theme.bgSubtle,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: theme.fgMuted,\n fontSize: size * 0.42,\n fontWeight: 600,\n }}\n >\n {login.charAt(0).toUpperCase()}\n </div>\n );\n }\n\n return (\n <Img\n src={avatarUrl}\n crossOrigin=\"anonymous\"\n onError={() => setErrored(true)}\n style={{ ...ringStyle, objectFit: \"cover\" }}\n />\n );\n}\n\ninterface RowProps {\n stargazer: Stargazer;\n index: number;\n rowH: number;\n avatarSize: number;\n loginSize: number;\n dateLabel: string;\n accent: string;\n theme: Theme;\n isActive: boolean;\n settle: number;\n showSeparator: boolean;\n opacity: number;\n}\n\nconst Row = memo(function Row({\n stargazer,\n index,\n rowH,\n avatarSize,\n loginSize,\n dateLabel,\n accent,\n theme,\n isActive,\n settle,\n showSeparator,\n opacity,\n}: RowProps) {\n return (\n <div\n style={{\n position: \"relative\",\n height: rowH,\n display: \"flex\",\n alignItems: \"center\",\n paddingLeft: 24,\n paddingRight: 24,\n background: \"transparent\",\n opacity,\n boxSizing: \"border-box\",\n borderBottom:\n showSeparator && !isActive ? `1px solid ${theme.border}` : \"none\",\n }}\n >\n {isActive && (\n <>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n background: theme.bgSubtle,\n opacity: settle,\n }}\n />\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n bottom: 0,\n width: 2,\n background: accent,\n opacity: settle,\n }}\n />\n </>\n )}\n <div\n style={{\n position: \"relative\",\n display: \"flex\",\n alignItems: \"center\",\n width: \"100%\",\n }}\n >\n <Avatar\n login={stargazer.login}\n avatarUrl={stargazer.avatarUrl}\n size={avatarSize}\n theme={theme}\n />\n <div style={{ marginLeft: 20, minWidth: 0, flex: 1 }}>\n <div\n style={{\n fontSize: loginSize,\n fontWeight: 600,\n color: theme.fg,\n fontFamily: FONT_FAMILY,\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n lineHeight: 1.2,\n }}\n >\n {stargazer.login}\n </div>\n <div\n style={{\n fontSize: 18,\n fontWeight: 400,\n color: theme.fgMuted,\n fontFamily: FONT_FAMILY,\n lineHeight: 1.3,\n }}\n >\n {dateLabel}\n </div>\n </div>\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 8,\n color: theme.fgMuted,\n fontFamily: MONO_FAMILY,\n fontSize: 18,\n fontVariantNumeric: \"tabular-nums\",\n flexShrink: 0,\n }}\n >\n <StarGlyph size={20} fill={accent} />\n <span>#{index + 1}</span>\n </div>\n </div>\n </div>\n );\n});\n\n// --- Main composition ------------------------------------------------------\n\nexport function GitHubStars({\n repo = \"remotion-dev/remotion\",\n totalStars = 24813,\n stargazers = SAMPLE_STARGAZERS,\n orientation = \"horizontal\",\n accentColor = \"#ffbb00\",\n speed = 1,\n theme = \"light\",\n repoAvatarUrl,\n}: GitHubStarsProps) {\n const frame = useCurrentFrame();\n const { durationInFrames, width, height } = useVideoConfig();\n const t = THEMES[theme] ?? THEMES.light;\n const isVertical = orientation === \"vertical\";\n\n // Render at the native reference size for the orientation, then scale to fit\n // the actual canvas — keeps proportions at any resolution and letterboxes a\n // vertical layout cleanly inside a horizontal preview canvas.\n const refW = isVertical ? 720 : 1280;\n const refH = isVertical ? 1280 : 720;\n const stageScale = Math.min(width / refW, height / refH);\n\n const rows = useMemo(() => downsampleStargazers(stargazers), [stargazers]);\n const N = rows.length;\n\n // Progress drivers: monotonic counter ramp + non-monotonic elastic scroll.\n const counterProgress = computeCounterProgress({\n frame,\n speed,\n durationInFrames,\n });\n const pScroll = computeScrollProgress({ frame, speed, durationInFrames });\n const p = Math.max(0, Math.min(1, (frame * speed) / durationInFrames));\n\n const current = counterProgress * totalStars;\n\n // List viewport geometry (in reference px).\n const rowH = isVertical ? 96 : 88;\n const avatarSize = isVertical ? 60 : 56;\n const loginSize = isVertical ? 30 : 28;\n const dateFormat = isVertical ? \"MMM yyyy\" : \"MMM d, yyyy\";\n const formattedRows = useMemo(\n () =>\n rows.map((sg) => {\n try {\n return { sg, dateLabel: format(parseISO(sg.starredAt), dateFormat) };\n } catch {\n return { sg, dateLabel: sg.starredAt };\n }\n }),\n [rows, dateFormat],\n );\n\n const viewport = isVertical\n ? { x: 48, y: 320, w: 624, h: 888, radius: 28 }\n : { x: 560, y: 60, w: 640, h: 600, radius: 24 };\n\n const visibleRows = Math.floor(viewport.h / rowH);\n const D = Math.max(0, (N - visibleRows + 1) * rowH);\n const scrollY = -pScroll * D;\n\n const spacerRows = computeSpacerRows({\n N,\n rowH,\n viewportH: viewport.h,\n visibleRows,\n });\n const spacerPx = spacerRows * rowH;\n\n const settle = interpolate(p, [0.92, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n // Counter zone type scale.\n const counterSize = isVertical ? 96 : 120;\n const starSize = isVertical ? 56 : 64;\n const underlineMax = isVertical ? 200 : 240;\n const underlineWidth = counterProgress * underlineMax;\n\n const fadeH = Math.round(viewport.h * 0.12);\n\n const listViewport = (\n <div\n style={{\n position: \"absolute\",\n left: viewport.x,\n top: viewport.y,\n width: viewport.w,\n height: viewport.h,\n overflow: \"hidden\",\n borderRadius: viewport.radius,\n border: `1px solid ${t.border}`,\n background: t.bg,\n }}\n >\n <div\n style={{\n transform: `translateY(${scrollY}px)`,\n willChange: \"transform\",\n }}\n >\n {formattedRows.map(({ sg, dateLabel }, i) => (\n <Row\n key={`${sg.login}-${i}`}\n stargazer={sg}\n index={i}\n rowH={rowH}\n avatarSize={avatarSize}\n loginSize={loginSize}\n dateLabel={dateLabel}\n accent={accentColor}\n theme={t}\n isActive={i === N - 1}\n settle={i === N - 1 ? settle : 0}\n showSeparator={i < N - 1}\n opacity={1}\n />\n ))}\n {spacerPx > 0 && (\n <div style={{ height: spacerPx }} aria-hidden=\"true\" />\n )}\n </div>\n <div\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n height: fadeH,\n background: `linear-gradient(to bottom, ${t.bg}, transparent)`,\n pointerEvents: \"none\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n bottom: 0,\n left: 0,\n right: 0,\n height: fadeH,\n background: `linear-gradient(to top, ${t.bg}, transparent)`,\n pointerEvents: \"none\",\n }}\n />\n </div>\n );\n\n const underline = (\n <div\n style={{\n height: 4,\n width: underlineWidth,\n background: accentColor,\n borderRadius: 2,\n }}\n />\n );\n\n const repoOwner = repo.split(\"/\")[0] || repo;\n const repoAvatarSize = isVertical ? 28 : 32;\n const repoAvatarSrc =\n repoAvatarUrl ?? `https://unavatar.io/github/${repoOwner}`;\n\n const repoSlug = (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 12,\n maxWidth: isVertical ? 600 : 392,\n }}\n >\n <Avatar\n login={repoOwner}\n avatarUrl={repoAvatarSrc}\n size={repoAvatarSize}\n theme={t}\n />\n <div\n style={{\n fontSize: isVertical ? 20 : 24,\n fontWeight: 500,\n color: t.fgMuted,\n fontFamily: FONT_FAMILY,\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }}\n >\n {repo}\n </div>\n </div>\n );\n\n const counterZone = isVertical ? (\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n width: refW,\n height: 300,\n paddingTop: 72,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n gap: 14,\n }}\n >\n <div style={{ display: \"flex\", alignItems: \"center\", gap: 20 }}>\n <StarGlyph size={starSize} fill={accentColor} />\n <Odometer current={current} fontSize={counterSize} color={t.fg} />\n </div>\n {underline}\n {repoSlug}\n </div>\n ) : (\n <div\n style={{\n position: \"absolute\",\n left: 80,\n top: 0,\n width: 392,\n height: refH,\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"center\",\n alignItems: \"flex-start\",\n }}\n >\n <StarGlyph size={starSize} fill={accentColor} />\n <div style={{ height: 20 }} />\n <Odometer current={current} fontSize={counterSize} color={t.fg} />\n <div style={{ height: 16 }} />\n {underline}\n <div style={{ height: 20 }} />\n\n {repoSlug}\n </div>\n );\n\n return (\n <AbsoluteFill style={{ background: t.bg }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: refW,\n height: refH,\n transform: `translate(-50%, -50%) scale(${stageScale})`,\n }}\n >\n {counterZone}\n {listViewport}\n </div>\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport { loadFont as loadMono } from \"@remotion/google-fonts/GeistMono\";\nimport { loadFont as loadSans } from \"@remotion/google-fonts/Manrope\";\nimport { format, parseISO } from \"date-fns\";\nimport { memo, useMemo, useState } from \"react\";\nimport {\n AbsoluteFill,\n Easing,\n Img,\n interpolate,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { Odometer } from \"@/components/remocn/number-wheel\";\n\nexport interface Stargazer {\n login: string;\n avatarUrl: string;\n /** ISO date string, e.g. \"2021-03-04\" */\n starredAt: string;\n}\n\nexport interface GitHubStarsProps {\n repo?: string;\n totalStars?: number;\n stargazers?: Stargazer[];\n orientation?: \"horizontal\" | \"vertical\";\n accentColor?: string;\n speed?: number;\n theme?: \"light\" | \"dark\";\n repoAvatarUrl?: string;\n}\n\n/**\n * Built-in mock stargazers so the composition renders immediately from defaults\n * (own-your-code: no external data needed after `shadcn add`). Real low-id GitHub\n * avatar URLs are CORS-ok, so the docs preview shows round photos.\n */\nconst RAW_SAMPLE_STARGAZERS: Stargazer[] = [\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n {\n login: \"mojombo\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/1?v=4\",\n starredAt: \"2021-03-04\",\n },\n {\n login: \"defunkt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/2?v=4\",\n starredAt: \"2021-06-12\",\n },\n {\n login: \"pjhyett\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/3?v=4\",\n starredAt: \"2021-09-21\",\n },\n {\n login: \"wycats\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/4?v=4\",\n starredAt: \"2021-12-08\",\n },\n {\n login: \"ezmobius\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/14?v=4\",\n starredAt: \"2022-03-17\",\n },\n {\n login: \"ivey\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/18?v=4\",\n starredAt: \"2022-06-29\",\n },\n {\n login: \"evanphx\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/25?v=4\",\n starredAt: \"2022-09-14\",\n },\n {\n login: \"vanpelt\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/26?v=4\",\n starredAt: \"2022-12-23\",\n },\n {\n login: \"wayneeseguin\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/28?v=4\",\n starredAt: \"2023-03-09\",\n },\n {\n login: \"brynary\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/30?v=4\",\n starredAt: \"2023-07-19\",\n },\n {\n login: \"kevinclark\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/31?v=4\",\n starredAt: \"2023-11-02\",\n },\n {\n login: \"technoweenie\",\n avatarUrl: \"https://avatars.githubusercontent.com/u/21?v=4\",\n starredAt: \"2024-02-15\",\n },\n];\n\nexport const SAMPLE_STARGAZERS: Stargazer[] = (() => {\n const occurrences = new Map<string, number>();\n return RAW_SAMPLE_STARGAZERS.map((stargazer) => {\n const occurrence = (occurrences.get(stargazer.login) ?? 0) + 1;\n occurrences.set(stargazer.login, occurrence);\n return occurrence === 1\n ? stargazer\n : { ...stargazer, login: `${stargazer.login}-${occurrence}` };\n });\n})();\n\n// Load fonts INSIDE the composition (via @remotion/google-fonts, which waits for\n// the font with delayRender before rendering frames). Server renders run in a\n// bare headless Chromium with no app CSS / `--font-*` vars, so without this the\n// MP4 falls back to the default sans-serif. Manrope for UI text, JetBrains Mono\n// for the numeric star counter (odometer).\nconst { fontFamily: SANS_FAMILY } = loadSans();\nconst { fontFamily: MONO_FAMILY } = loadMono();\n\nconst FONT_FAMILY = SANS_FAMILY;\n\ninterface Theme {\n bg: string;\n bgSubtle: string;\n fg: string;\n fgMuted: string;\n border: string;\n}\n\nconst THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n bg: \"#ffffff\",\n bgSubtle: \"#fafafa\",\n fg: \"#171717\",\n fgMuted: \"#737373\",\n border: \"#ededed\",\n },\n dark: {\n bg: \"#0a0a0a\",\n bgSubtle: \"#111113\",\n fg: \"#fafafa\",\n fgMuted: \"#a1a1aa\",\n border: \"#262626\",\n },\n};\n\n// --- Pure helpers (unit-tested) -------------------------------------------\n\n/**\n * Clamp a stargazer list to at most `max` evenly-sampled keyframe rows while\n * always preserving the first and last entry. Safety net for callers that pass\n * a huge array straight into the composition.\n */\nexport function downsampleStargazers(\n stargazers: Stargazer[],\n max = 60,\n): Stargazer[] {\n const len = stargazers.length;\n if (len <= max) return stargazers;\n if (max <= 1) return len ? [stargazers[0]] : [];\n const out: Stargazer[] = [];\n for (let i = 0; i < max; i++) {\n out.push(stargazers[Math.round((i * (len - 1)) / (max - 1))]);\n }\n return out;\n}\n\nconst MAX_ELASTIC_OVERSHOOT = 0.0658; // Easing.elastic(1) peak−1 (true ≈0.0657267), rounded UP for use as a safety bound\nconst SCROLL_OVERSHOOT = 1 + MAX_ELASTIC_OVERSHOOT; // ≈1.0658\nconst MASK_SOLID_FRACTION = 0.88; // bottom fade mask is solid until 88% of viewport height\nconst COUNT_PORTION = 0.8;\n\n/** Monotonic counter ramp — mirrors the reference StarCount easing. Drives the\n * odometer, which must stay monotonic or the digit wheels roll backward. */\nexport function computeCounterProgress({\n frame,\n speed = 1,\n durationInFrames,\n}: {\n frame: number;\n speed?: number;\n durationInFrames: number;\n}): number {\n return interpolate(\n frame * speed,\n [0, durationInFrames * COUNT_PORTION],\n [0, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.bezier(0.5, 1, 0.5, 1),\n },\n );\n}\n\n/** Elastic scroll ramp — mirrors the reference avatar slide. NON-monotonic:\n * overshoots to ~SCROLL_OVERSHOOT near t≈0.63 and settles to exactly 1 at t=1.\n * Drives only scrollY (never the odometer). */\nexport function computeScrollProgress({\n frame,\n speed = 1,\n durationInFrames,\n}: {\n frame: number;\n speed?: number;\n durationInFrames: number;\n}): number {\n return interpolate(frame * speed, [0, durationInFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.elastic(0.8),\n });\n}\n\n/** Empty rows appended below the last stargazer so the elastic recoil never\n * lifts real content off the mask-solid zone, revealing a void. Single source\n * of truth shared with isScrollContained so the two cannot drift. */\nexport function computeSpacerRows({\n N,\n rowH,\n viewportH,\n visibleRows,\n}: {\n N: number;\n rowH: number;\n viewportH: number;\n visibleRows: number;\n}): number {\n const D = Math.max(0, (N - visibleRows + 1) * rowH);\n const needPx =\n MASK_SOLID_FRACTION * viewportH - N * rowH + SCROLL_OVERSHOOT * D;\n return Math.max(0, Math.ceil(needPx / rowH));\n}\n\n/** True when, at the elastic overshoot peak, content still fills the mask-solid\n * zone (no void revealed). True by construction given computeSpacerRows. */\nexport function isScrollContained({\n N,\n rowH,\n viewportH,\n visibleRows,\n}: {\n N: number;\n rowH: number;\n viewportH: number;\n visibleRows: number;\n}): boolean {\n const D = Math.max(0, (N - visibleRows + 1) * rowH);\n const spacerPx =\n computeSpacerRows({ N, rowH, viewportH, visibleRows }) * rowH;\n return (\n N * rowH + spacerPx - SCROLL_OVERSHOOT * D >=\n MASK_SOLID_FRACTION * viewportH\n );\n}\n\n/** The running counter value for a given scroll progress. Locks at totalStars. */\nexport function getStarCount(\n scrollProgress: number,\n totalStars: number,\n): number {\n return Math.round(scrollProgress * totalStars);\n}\n\n// --- Sub-components --------------------------------------------------------\n\nfunction StarGlyph({ size, fill }: { size: number; fill: string }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n width={size}\n height={size}\n color={fill}\n fill={fill}\n stroke={fill}\n strokeWidth=\"1.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <title>Stars</title>\n <path d=\"M13.7276 3.44418L15.4874 6.99288C15.7274 7.48687 16.3673 7.9607 16.9073 8.05143L20.0969 8.58575C22.1367 8.92853 22.6167 10.4206 21.1468 11.8925L18.6671 14.3927C18.2471 14.8161 18.0172 15.6327 18.1471 16.2175L18.8571 19.3125C19.417 21.7623 18.1271 22.71 15.9774 21.4296L12.9877 19.6452C12.4478 19.3226 11.5579 19.3226 11.0079 19.6452L8.01827 21.4296C5.8785 22.71 4.57865 21.7522 5.13859 19.3125L5.84851 16.2175C5.97849 15.6327 5.74852 14.8161 5.32856 14.3927L2.84884 11.8925C1.389 10.4206 1.85895 8.92853 3.89872 8.58575L7.08837 8.05143C7.61831 7.9607 8.25824 7.48687 8.49821 6.99288L10.258 3.44418C11.2179 1.51861 12.7777 1.51861 13.7276 3.44418Z\"></path>\n </svg>\n );\n}\n\nfunction Avatar({\n login,\n avatarUrl,\n size,\n theme,\n}: {\n login: string;\n avatarUrl: string;\n size: number;\n theme: Theme;\n}) {\n const [errored, setErrored] = useState(false);\n const ringStyle = {\n width: size,\n height: size,\n borderRadius: 9999,\n border: `1px solid ${theme.border}`,\n flexShrink: 0,\n } as const;\n\n if (errored || !avatarUrl) {\n return (\n <div\n style={{\n ...ringStyle,\n background: theme.bgSubtle,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: theme.fgMuted,\n fontSize: size * 0.42,\n fontWeight: 600,\n }}\n >\n {login.charAt(0).toUpperCase()}\n </div>\n );\n }\n\n return (\n <Img\n src={avatarUrl}\n crossOrigin=\"anonymous\"\n onError={() => setErrored(true)}\n style={{ ...ringStyle, objectFit: \"cover\" }}\n />\n );\n}\n\ninterface RowProps {\n stargazer: Stargazer;\n index: number;\n rowH: number;\n avatarSize: number;\n loginSize: number;\n dateLabel: string;\n accent: string;\n theme: Theme;\n isActive: boolean;\n settle: number;\n showSeparator: boolean;\n opacity: number;\n}\n\nconst Row = memo(function Row({\n stargazer,\n index,\n rowH,\n avatarSize,\n loginSize,\n dateLabel,\n accent,\n theme,\n isActive,\n settle,\n showSeparator,\n opacity,\n}: RowProps) {\n return (\n <div\n style={{\n position: \"relative\",\n height: rowH,\n display: \"flex\",\n alignItems: \"center\",\n paddingLeft: 24,\n paddingRight: 24,\n background: \"transparent\",\n opacity,\n boxSizing: \"border-box\",\n borderBottom:\n showSeparator && !isActive ? `1px solid ${theme.border}` : \"none\",\n }}\n >\n {isActive && (\n <>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n background: theme.bgSubtle,\n opacity: settle,\n }}\n />\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n bottom: 0,\n width: 2,\n background: accent,\n opacity: settle,\n }}\n />\n </>\n )}\n <div\n style={{\n position: \"relative\",\n display: \"flex\",\n alignItems: \"center\",\n width: \"100%\",\n }}\n >\n <Avatar\n login={stargazer.login}\n avatarUrl={stargazer.avatarUrl}\n size={avatarSize}\n theme={theme}\n />\n <div style={{ marginLeft: 20, minWidth: 0, flex: 1 }}>\n <div\n style={{\n fontSize: loginSize,\n fontWeight: 600,\n color: theme.fg,\n fontFamily: FONT_FAMILY,\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n lineHeight: 1.2,\n }}\n >\n {stargazer.login}\n </div>\n <div\n style={{\n fontSize: 18,\n fontWeight: 400,\n color: theme.fgMuted,\n fontFamily: FONT_FAMILY,\n lineHeight: 1.3,\n }}\n >\n {dateLabel}\n </div>\n </div>\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 8,\n color: theme.fgMuted,\n fontFamily: MONO_FAMILY,\n fontSize: 18,\n fontVariantNumeric: \"tabular-nums\",\n flexShrink: 0,\n }}\n >\n <StarGlyph size={20} fill={accent} />\n <span>#{index + 1}</span>\n </div>\n </div>\n </div>\n );\n});\n\n// --- Main composition ------------------------------------------------------\n\nexport function GitHubStars({\n repo = \"remotion-dev/remotion\",\n totalStars = 24813,\n stargazers = SAMPLE_STARGAZERS,\n orientation = \"horizontal\",\n accentColor = \"#ffbb00\",\n speed = 1,\n theme = \"light\",\n repoAvatarUrl,\n}: GitHubStarsProps) {\n const frame = useCurrentFrame();\n const { durationInFrames, width, height } = useVideoConfig();\n const t = THEMES[theme] ?? THEMES.light;\n const isVertical = orientation === \"vertical\";\n\n // Render at the native reference size for the orientation, then scale to fit\n // the actual canvas — keeps proportions at any resolution and letterboxes a\n // vertical layout cleanly inside a horizontal preview canvas.\n const refW = isVertical ? 720 : 1280;\n const refH = isVertical ? 1280 : 720;\n const stageScale = Math.min(width / refW, height / refH);\n\n const rows = useMemo(() => downsampleStargazers(stargazers), [stargazers]);\n const N = rows.length;\n\n // Progress drivers: monotonic counter ramp + non-monotonic elastic scroll.\n const counterProgress = computeCounterProgress({\n frame,\n speed,\n durationInFrames,\n });\n const pScroll = computeScrollProgress({ frame, speed, durationInFrames });\n const p = Math.max(0, Math.min(1, (frame * speed) / durationInFrames));\n\n const current = counterProgress * totalStars;\n\n // List viewport geometry (in reference px).\n const rowH = isVertical ? 96 : 88;\n const avatarSize = isVertical ? 60 : 56;\n const loginSize = isVertical ? 30 : 28;\n const dateFormat = isVertical ? \"MMM yyyy\" : \"MMM d, yyyy\";\n const formattedRows = useMemo(\n () =>\n rows.map((sg) => {\n try {\n return { sg, dateLabel: format(parseISO(sg.starredAt), dateFormat) };\n } catch {\n return { sg, dateLabel: sg.starredAt };\n }\n }),\n [rows, dateFormat],\n );\n\n const viewport = isVertical\n ? { x: 48, y: 320, w: 624, h: 888, radius: 28 }\n : { x: 560, y: 60, w: 640, h: 600, radius: 24 };\n\n const visibleRows = Math.floor(viewport.h / rowH);\n const D = Math.max(0, (N - visibleRows + 1) * rowH);\n const scrollY = -pScroll * D;\n\n const spacerRows = computeSpacerRows({\n N,\n rowH,\n viewportH: viewport.h,\n visibleRows,\n });\n const spacerPx = spacerRows * rowH;\n\n const settle = interpolate(p, [0.92, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n // Counter zone type scale.\n const counterSize = isVertical ? 96 : 120;\n const starSize = isVertical ? 56 : 64;\n const underlineMax = isVertical ? 200 : 240;\n const underlineWidth = counterProgress * underlineMax;\n\n const fadeH = Math.round(viewport.h * 0.12);\n\n const listViewport = (\n <div\n style={{\n position: \"absolute\",\n left: viewport.x,\n top: viewport.y,\n width: viewport.w,\n height: viewport.h,\n overflow: \"hidden\",\n borderRadius: viewport.radius,\n border: `1px solid ${t.border}`,\n background: t.bg,\n }}\n >\n <div\n style={{\n translate: `0 ${scrollY}px`,\n willChange: \"transform\",\n }}\n >\n {formattedRows.map(({ sg, dateLabel }, i) => (\n <Row\n key={`${sg.login}-${i}`}\n stargazer={sg}\n index={i}\n rowH={rowH}\n avatarSize={avatarSize}\n loginSize={loginSize}\n dateLabel={dateLabel}\n accent={accentColor}\n theme={t}\n isActive={i === N - 1}\n settle={i === N - 1 ? settle : 0}\n showSeparator={i < N - 1}\n opacity={1}\n />\n ))}\n {spacerPx > 0 && (\n <div style={{ height: spacerPx }} aria-hidden=\"true\" />\n )}\n </div>\n <div\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n height: fadeH,\n background: `linear-gradient(to bottom, ${t.bg}, transparent)`,\n pointerEvents: \"none\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n bottom: 0,\n left: 0,\n right: 0,\n height: fadeH,\n background: `linear-gradient(to top, ${t.bg}, transparent)`,\n pointerEvents: \"none\",\n }}\n />\n </div>\n );\n\n const underline = (\n <div\n style={{\n height: 4,\n width: underlineWidth,\n background: accentColor,\n borderRadius: 2,\n }}\n />\n );\n\n const repoOwner = repo.split(\"/\")[0] || repo;\n const repoAvatarSize = isVertical ? 28 : 32;\n const repoAvatarSrc =\n repoAvatarUrl ?? `https://unavatar.io/github/${repoOwner}`;\n\n const repoSlug = (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 12,\n maxWidth: isVertical ? 600 : 392,\n }}\n >\n <Avatar\n login={repoOwner}\n avatarUrl={repoAvatarSrc}\n size={repoAvatarSize}\n theme={t}\n />\n <div\n style={{\n fontSize: isVertical ? 20 : 24,\n fontWeight: 500,\n color: t.fgMuted,\n fontFamily: FONT_FAMILY,\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }}\n >\n {repo}\n </div>\n </div>\n );\n\n const counterZone = isVertical ? (\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n width: refW,\n height: 300,\n paddingTop: 72,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n gap: 14,\n }}\n >\n <div style={{ display: \"flex\", alignItems: \"center\", gap: 20 }}>\n <StarGlyph size={starSize} fill={accentColor} />\n <Odometer current={current} fontSize={counterSize} color={t.fg} />\n </div>\n {underline}\n {repoSlug}\n </div>\n ) : (\n <div\n style={{\n position: \"absolute\",\n left: 80,\n top: 0,\n width: 392,\n height: refH,\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"center\",\n alignItems: \"flex-start\",\n }}\n >\n <StarGlyph size={starSize} fill={accentColor} />\n <div style={{ height: 20 }} />\n <Odometer current={current} fontSize={counterSize} color={t.fg} />\n <div style={{ height: 16 }} />\n {underline}\n <div style={{ height: 20 }} />\n\n {repoSlug}\n </div>\n );\n\n return (\n <AbsoluteFill style={{ background: t.bg }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: refW,\n height: refH,\n translate: \"-50% -50%\",\n scale: `${stageScale}`,\n }}\n >\n {counterZone}\n {listViewport}\n </div>\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/github-stars.tsx"}diff --git a/registry-artifacts/glass-code-block.json b/registry-artifacts/glass-code-block.jsonindex 253e725d..0099eab9 100644--- a/registry-artifacts/glass-code-block.json+++ b/registry-artifacts/glass-code-block.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/glass-code-block/index.tsx",- "content": "\"use client\";\n\nimport { interpolate, Sequence, useCurrentFrame } from \"remotion\";\n\nexport interface GlassCodeBlockProps {\n code?: string;\n title?: string;\n width?: number;\n height?: number;\n fontSize?: number;\n glassColor?: string;\n staggerFrames?: number;\n showTrafficLights?: boolean;\n aura?: boolean;\n speed?: number;\n className?: string;\n}\n\nconst FONT_MONO =\n \"var(--font-geist-mono), ui-monospace, SFMono-Regular, monospace\";\n\nconst DEFAULT_CODE = `import { motion } from \"remotion\";\n\n// Generate a hero scene\nexport function Hero() {\n const frame = useCurrentFrame();\n const opacity = frame / 30;\n return <h1 style={{ opacity }}>Hello</h1>;\n}`;\n\n// Minimal regex tokenizer. NOT a real syntax highlighter — just enough to\n// give the eye color anchors. Order matters: comments → strings → keywords.\nconst KEYWORDS = new Set([\n \"import\",\n \"from\",\n \"export\",\n \"function\",\n \"const\",\n \"let\",\n \"var\",\n \"return\",\n \"if\",\n \"else\",\n \"for\",\n \"while\",\n \"new\",\n \"class\",\n \"extends\",\n \"default\",\n \"true\",\n \"false\",\n \"null\",\n \"undefined\",\n]);\n\ntype Token = {\n text: string;\n kind: \"code\" | \"comment\" | \"string\" | \"keyword\" | \"number\";\n};\n\nfunction tokenizeLine(line: string): Token[] {\n // Whole-line comment.\n const trimmed = line.trimStart();\n if (trimmed.startsWith(\"//\")) {\n return [{ text: line, kind: \"comment\" }];\n }\n\n const tokens: Token[] = [];\n // Split keeping delimiters: words, strings, numbers, everything else.\n const re = /(\"[^\"]*\"|'[^']*'|`[^`]*`|\\b\\d+\\b|\\b[A-Za-z_$][\\w$]*\\b|[^\\w\"']+)/g;\n let match: RegExpExecArray | null = re.exec(line);\n while (match !== null) {\n const t = match[0];\n const first = t[0];\n if (first === '\"' || first === \"'\" || first === \"`\") {\n tokens.push({ text: t, kind: \"string\" });\n } else if (/^\\d+$/.test(t)) {\n tokens.push({ text: t, kind: \"number\" });\n } else if (/^[A-Za-z_$][\\w$]*$/.test(t) && KEYWORDS.has(t)) {\n tokens.push({ text: t, kind: \"keyword\" });\n } else {\n tokens.push({ text: t, kind: \"code\" });\n }\n match = re.exec(line);\n }\n return tokens;\n}\n\nconst TOKEN_COLORS: Record<Token[\"kind\"], string> = {\n code: \"#e4e4e7\",\n comment: \"#52525b\",\n string: \"#86efac\",\n keyword: \"#c4b5fd\",\n number: \"#fcd34d\",\n};\n\nexport function GlassCodeBlock({\n code = DEFAULT_CODE,\n title = \"hero.tsx\",\n width = 760,\n height = 460,\n fontSize = 16,\n glassColor = \"rgba(10, 10, 10, 0.6)\",\n staggerFrames = 4,\n showTrafficLights = true,\n aura = false,\n speed = 1,\n className,\n}: GlassCodeBlockProps) {\n const lines = code.split(\"\\n\");\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n {aura && <BackdropAura />}\n\n {/* 1px gradient ring acting as a microborder */}\n <div\n style={{\n position: \"relative\",\n padding: 1,\n borderRadius: 16,\n background:\n \"linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 100%)\",\n width,\n height,\n boxShadow: \"0 50px 120px rgba(0,0,0,0.55)\",\n }}\n >\n <div\n style={{\n width: \"100%\",\n height: \"100%\",\n borderRadius: 15,\n background: glassColor,\n backdropFilter: \"blur(16px)\",\n WebkitBackdropFilter: \"blur(16px)\",\n boxShadow: \"inset 0 1px 0 rgba(255,255,255,0.06)\",\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n fontFamily: FONT_MONO,\n }}\n >\n {/* Chrome */}\n <div\n style={{\n height: 40,\n display: \"flex\",\n alignItems: \"center\",\n gap: 8,\n padding: \"0 16px\",\n borderBottom: \"1px solid rgba(255,255,255,0.06)\",\n }}\n >\n {showTrafficLights && (\n <>\n <Light color=\"#ff5f57\" />\n <Light color=\"#febc2e\" />\n <Light color=\"#28c840\" />\n </>\n )}\n <div\n style={{\n flex: 1,\n textAlign: \"center\",\n color: \"#a1a1aa\",\n fontSize: 12,\n letterSpacing: \"0.02em\",\n }}\n >\n {title}\n </div>\n </div>\n\n {/* Code body */}\n <div\n style={{\n flex: 1,\n padding: \"20px 24px\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: 4,\n fontSize,\n lineHeight: 1.55,\n }}\n >\n {lines.map((line, i) => (\n <Sequence\n key={i}\n from={Math.round((i * staggerFrames) / speed)}\n layout=\"none\"\n >\n <CodeLine line={line} index={i} fontSize={fontSize} />\n </Sequence>\n ))}\n </div>\n </div>\n </div>\n </div>\n );\n}\n\nfunction Light({ color }: { color: string }) {\n return (\n <div\n style={{\n width: 12,\n height: 12,\n borderRadius: \"50%\",\n background: color,\n opacity: 0.6,\n }}\n />\n );\n}\n\nfunction CodeLine({\n line,\n index,\n fontSize,\n}: {\n line: string;\n index: number;\n fontSize: number;\n}) {\n const frame = useCurrentFrame();\n const opacity = interpolate(frame, [0, 8], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n const ty = interpolate(frame, [0, 8], [4, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const tokens = tokenizeLine(line);\n // Render an empty line as a half-height spacer so blank lines still take\n // visual space without collapsing the gap.\n if (tokens.length === 0) {\n return <div style={{ height: fontSize * 0.8, opacity }} />;\n }\n return (\n <div\n style={{\n opacity,\n transform: `translateY(${ty}px)`,\n whiteSpace: \"pre\",\n display: \"flex\",\n gap: 0,\n }}\n >\n <span style={{ width: 28, color: \"#3f3f46\", userSelect: \"none\" }}>\n {String(index + 1).padStart(2, \" \")}\n </span>\n <span>\n {tokens.map((t, i) => (\n <span key={i} style={{ color: TOKEN_COLORS[t.kind] }}>\n {t.text}\n </span>\n ))}\n </span>\n </div>\n );\n}\n\nfunction BackdropAura() {\n // Slow, low-amplitude blob behind the glass so the backdrop blur has\n // perceptible content to refract.\n const frame = useCurrentFrame();\n const t = frame / 60;\n const x = 50 + Math.sin(t) * 20;\n const y = 50 + Math.cos(t * 0.7) * 15;\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n pointerEvents: \"none\",\n background: `radial-gradient(circle at ${x}% ${y}%, rgba(56,189,248,0.22), transparent 50%), radial-gradient(circle at ${100 - x}% ${100 - y}%, rgba(168,85,247,0.18), transparent 55%)`,\n }}\n />\n );\n}\n",+ "content": "\"use client\";\n\nimport { interpolate, Sequence, useCurrentFrame } from \"remotion\";\n\nexport interface GlassCodeBlockProps {\n code?: string;\n title?: string;\n width?: number;\n height?: number;\n fontSize?: number;\n glassColor?: string;\n staggerFrames?: number;\n showTrafficLights?: boolean;\n aura?: boolean;\n speed?: number;\n className?: string;\n}\n\nconst FONT_MONO =\n \"var(--font-geist-mono), ui-monospace, SFMono-Regular, monospace\";\n\nconst DEFAULT_CODE = `import { motion } from \"remotion\";\n\n// Generate a hero scene\nexport function Hero() {\n const frame = useCurrentFrame();\n const opacity = frame / 30;\n return <h1 style={{ opacity }}>Hello</h1>;\n}`;\n\n// Minimal regex tokenizer. NOT a real syntax highlighter — just enough to\n// give the eye color anchors. Order matters: comments → strings → keywords.\nconst KEYWORDS = new Set([\n \"import\",\n \"from\",\n \"export\",\n \"function\",\n \"const\",\n \"let\",\n \"var\",\n \"return\",\n \"if\",\n \"else\",\n \"for\",\n \"while\",\n \"new\",\n \"class\",\n \"extends\",\n \"default\",\n \"true\",\n \"false\",\n \"null\",\n \"undefined\",\n]);\n\ntype Token = {\n text: string;\n kind: \"code\" | \"comment\" | \"string\" | \"keyword\" | \"number\";\n};\n\nfunction tokenizeLine(line: string): Token[] {\n // Whole-line comment.\n const trimmed = line.trimStart();\n if (trimmed.startsWith(\"//\")) {\n return [{ text: line, kind: \"comment\" }];\n }\n\n const tokens: Token[] = [];\n // Split keeping delimiters: words, strings, numbers, everything else.\n const re = /(\"[^\"]*\"|'[^']*'|`[^`]*`|\\b\\d+\\b|\\b[A-Za-z_$][\\w$]*\\b|[^\\w\"']+)/g;\n let match: RegExpExecArray | null = re.exec(line);\n while (match !== null) {\n const t = match[0];\n const first = t[0];\n if (first === '\"' || first === \"'\" || first === \"`\") {\n tokens.push({ text: t, kind: \"string\" });\n } else if (/^\\d+$/.test(t)) {\n tokens.push({ text: t, kind: \"number\" });\n } else if (/^[A-Za-z_$][\\w$]*$/.test(t) && KEYWORDS.has(t)) {\n tokens.push({ text: t, kind: \"keyword\" });\n } else {\n tokens.push({ text: t, kind: \"code\" });\n }\n match = re.exec(line);\n }\n return tokens;\n}\n\nconst TOKEN_COLORS: Record<Token[\"kind\"], string> = {\n code: \"#e4e4e7\",\n comment: \"#52525b\",\n string: \"#86efac\",\n keyword: \"#c4b5fd\",\n number: \"#fcd34d\",\n};\n\nexport function GlassCodeBlock({\n code = DEFAULT_CODE,\n title = \"hero.tsx\",\n width = 760,\n height = 460,\n fontSize = 16,\n glassColor = \"rgba(10, 10, 10, 0.6)\",\n staggerFrames = 4,\n showTrafficLights = true,\n aura = false,\n speed = 1,\n className,\n}: GlassCodeBlockProps) {\n const lines = code.split(\"\\n\");\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n {aura && <BackdropAura />}\n\n {/* 1px gradient ring acting as a microborder */}\n <div\n style={{\n position: \"relative\",\n padding: 1,\n borderRadius: 16,\n background:\n \"linear-gradient(180deg, rgba(255,255,255,0.18) 0%, rgba(255,255,255,0) 100%)\",\n width,\n height,\n boxShadow: \"0 50px 120px rgba(0,0,0,0.55)\",\n }}\n >\n <div\n style={{\n width: \"100%\",\n height: \"100%\",\n borderRadius: 15,\n background: glassColor,\n backdropFilter: \"blur(16px)\",\n WebkitBackdropFilter: \"blur(16px)\",\n boxShadow: \"inset 0 1px 0 rgba(255,255,255,0.06)\",\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n fontFamily: FONT_MONO,\n }}\n >\n {/* Chrome */}\n <div\n style={{\n height: 40,\n display: \"flex\",\n alignItems: \"center\",\n gap: 8,\n padding: \"0 16px\",\n borderBottom: \"1px solid rgba(255,255,255,0.06)\",\n }}\n >\n {showTrafficLights && (\n <>\n <Light color=\"#ff5f57\" />\n <Light color=\"#febc2e\" />\n <Light color=\"#28c840\" />\n </>\n )}\n <div\n style={{\n flex: 1,\n textAlign: \"center\",\n color: \"#a1a1aa\",\n fontSize: 12,\n letterSpacing: \"0.02em\",\n }}\n >\n {title}\n </div>\n </div>\n\n {/* Code body */}\n <div\n style={{\n flex: 1,\n padding: \"20px 24px\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: 4,\n fontSize,\n lineHeight: 1.55,\n }}\n >\n {lines.map((line, i) => (\n <Sequence\n key={i}\n from={Math.round((i * staggerFrames) / speed)}\n layout=\"none\"\n >\n <CodeLine line={line} index={i} fontSize={fontSize} />\n </Sequence>\n ))}\n </div>\n </div>\n </div>\n </div>\n );\n}\n\nfunction Light({ color }: { color: string }) {\n return (\n <div\n style={{\n width: 12,\n height: 12,\n borderRadius: \"50%\",\n background: color,\n opacity: 0.6,\n }}\n />\n );\n}\n\nfunction CodeLine({\n line,\n index,\n fontSize,\n}: {\n line: string;\n index: number;\n fontSize: number;\n}) {\n const frame = useCurrentFrame();\n const opacity = interpolate(frame, [0, 8], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n const ty = interpolate(frame, [0, 8], [4, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const tokens = tokenizeLine(line);\n // Render an empty line as a half-height spacer so blank lines still take\n // visual space without collapsing the gap.\n if (tokens.length === 0) {\n return <div style={{ height: fontSize * 0.8, opacity }} />;\n }\n return (\n <div\n style={{\n opacity,\n translate: `0 ${ty}px`,\n whiteSpace: \"pre\",\n display: \"flex\",\n gap: 0,\n }}\n >\n <span style={{ width: 28, color: \"#3f3f46\", userSelect: \"none\" }}>\n {String(index + 1).padStart(2, \" \")}\n </span>\n <span>\n {tokens.map((t, i) => (\n <span key={i} style={{ color: TOKEN_COLORS[t.kind] }}>\n {t.text}\n </span>\n ))}\n </span>\n </div>\n );\n}\n\nfunction BackdropAura() {\n // Slow, low-amplitude blob behind the glass so the backdrop blur has\n // perceptible content to refract.\n const frame = useCurrentFrame();\n const t = frame / 60;\n const x = 50 + Math.sin(t) * 20;\n const y = 50 + Math.cos(t * 0.7) * 15;\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n pointerEvents: \"none\",\n background: `radial-gradient(circle at ${x}% ${y}%, rgba(56,189,248,0.22), transparent 50%), radial-gradient(circle at ${100 - x}% ${100 - y}%, rgba(168,85,247,0.18), transparent 55%)`,\n }}\n />\n );\n}\n","type": "registry:component","target": "components/remocn/glass-code-block.tsx"}diff --git a/registry-artifacts/glass-code-walk.json b/registry-artifacts/glass-code-walk.jsonindex 89432d32..7241cc52 100644--- a/registry-artifacts/glass-code-walk.json+++ b/registry-artifacts/glass-code-walk.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/glass-code-walk/index.tsx",- "content": "\"use client\";\n\nimport { AbsoluteFill, Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nimport { GlassCodeBlock } from \"@/components/remocn/glass-code-block\";\n\nexport interface GlassCodeWalkProps {\n code?: string;\n title?: string;\n width?: number;\n height?: number;\n fontSize?: number;\n staggerFrames?: number;\n zoom?: number;\n speed?: number;\n className?: string;\n}\n\nconst STAGE_WIDTH = 1280;\nconst STAGE_HEIGHT = 720;\nconst RING = 1;\nconst CHROME_HEIGHT = 40;\nconst BODY_PADDING_TOP = 20;\nconst BODY_PADDING_LEFT = 24;\nconst LINE_GAP = 4;\nconst ANCHOR_SCREEN_X = 110;\nconst TARGET_Y = 360;\nconst PULL_BACK_FRAMES = 24;\n\nconst DEFAULT_CODE = `import { AbsoluteFill } from \"remotion\";\nimport { Typewriter } from \"@/components/remocn\";\n\nexport function Intro() {\n return (\n <AbsoluteFill>\n <Typewriter text=\"Ship it\" />\n </AbsoluteFill>\n );\n}`;\n\nexport function GlassCodeWalk({\n code = DEFAULT_CODE,\n title = \"scene.tsx\",\n width = 880,\n height = 420,\n fontSize = 18,\n staggerFrames = 10,\n zoom = 2.6,\n speed = 1,\n className,\n}: GlassCodeWalkProps) {\n const frame = useCurrentFrame();\n\n const lines = code.split(\"\\n\");\n const lineCount = lines.length;\n\n const blockLeft = (STAGE_WIDTH - width) / 2;\n const blockTop = (STAGE_HEIGHT - height) / 2;\n const bodyTop = blockTop + RING + CHROME_HEIGHT + BODY_PADDING_TOP;\n\n const lineHeightOf = (line: string) =>\n line.trim() === \"\" ? fontSize * 0.8 : fontSize * 1.55;\n\n const lineCenters: number[] = [];\n let walk = bodyTop;\n for (const line of lines) {\n const h = lineHeightOf(line);\n lineCenters.push(walk + h / 2);\n walk += h + LINE_GAP;\n }\n\n const anchorWorldX = blockLeft + RING + BODY_PADDING_LEFT;\n const scanStagger = staggerFrames / speed;\n const scanEnd = (lineCount - 1) * scanStagger;\n\n const linePosition = interpolate(frame, [0, scanEnd], [0, lineCount - 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n const lower = Math.floor(linePosition);\n const upper = Math.min(lower + 1, lineCount - 1);\n const trackedY =\n lineCenters[lower] +\n (lineCenters[upper] - lineCenters[lower]) * (linePosition - lower);\n\n const pinnedX = ANCHOR_SCREEN_X - zoom * anchorWorldX;\n const pinnedY = TARGET_Y - zoom * trackedY;\n\n const pullBack = interpolate(\n frame,\n [scanEnd, scanEnd + PULL_BACK_FRAMES / speed],\n [0, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.cubic),\n },\n );\n\n const scale = zoom + pullBack * (1 - zoom);\n const tx = (1 - pullBack) * pinnedX;\n const ty = (1 - pullBack) * pinnedY;\n\n return (\n <AbsoluteFill className={className} style={{ overflow: \"hidden\" }}>\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n width: STAGE_WIDTH,\n height: STAGE_HEIGHT,\n transform: `translate(${tx}px, ${ty}px) scale(${scale})`,\n transformOrigin: \"0 0\",\n }}\n >\n <GlassCodeBlock\n code={code}\n title={title}\n width={width}\n height={height}\n fontSize={fontSize}\n staggerFrames={staggerFrames}\n speed={speed}\n />\n </div>\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport { AbsoluteFill, Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nimport { GlassCodeBlock } from \"@/components/remocn/glass-code-block\";\n\nexport interface GlassCodeWalkProps {\n code?: string;\n title?: string;\n width?: number;\n height?: number;\n fontSize?: number;\n staggerFrames?: number;\n zoom?: number;\n speed?: number;\n className?: string;\n}\n\nconst STAGE_WIDTH = 1280;\nconst STAGE_HEIGHT = 720;\nconst RING = 1;\nconst CHROME_HEIGHT = 40;\nconst BODY_PADDING_TOP = 20;\nconst BODY_PADDING_LEFT = 24;\nconst LINE_GAP = 4;\nconst ANCHOR_SCREEN_X = 110;\nconst TARGET_Y = 360;\nconst PULL_BACK_FRAMES = 24;\n\nconst DEFAULT_CODE = `import { AbsoluteFill } from \"remotion\";\nimport { Typewriter } from \"@/components/remocn\";\n\nexport function Intro() {\n return (\n <AbsoluteFill>\n <Typewriter text=\"Ship it\" />\n </AbsoluteFill>\n );\n}`;\n\nexport function GlassCodeWalk({\n code = DEFAULT_CODE,\n title = \"scene.tsx\",\n width = 880,\n height = 420,\n fontSize = 18,\n staggerFrames = 10,\n zoom = 2.6,\n speed = 1,\n className,\n}: GlassCodeWalkProps) {\n const frame = useCurrentFrame();\n\n const lines = code.split(\"\\n\");\n const lineCount = lines.length;\n\n const blockLeft = (STAGE_WIDTH - width) / 2;\n const blockTop = (STAGE_HEIGHT - height) / 2;\n const bodyTop = blockTop + RING + CHROME_HEIGHT + BODY_PADDING_TOP;\n\n const lineHeightOf = (line: string) =>\n line.trim() === \"\" ? fontSize * 0.8 : fontSize * 1.55;\n\n const lineCenters: number[] = [];\n let walk = bodyTop;\n for (const line of lines) {\n const h = lineHeightOf(line);\n lineCenters.push(walk + h / 2);\n walk += h + LINE_GAP;\n }\n\n const anchorWorldX = blockLeft + RING + BODY_PADDING_LEFT;\n const scanStagger = staggerFrames / speed;\n const scanEnd = (lineCount - 1) * scanStagger;\n\n const linePosition = interpolate(frame, [0, scanEnd], [0, lineCount - 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n const lower = Math.floor(linePosition);\n const upper = Math.min(lower + 1, lineCount - 1);\n const trackedY =\n lineCenters[lower] +\n (lineCenters[upper] - lineCenters[lower]) * (linePosition - lower);\n\n const pinnedX = ANCHOR_SCREEN_X - zoom * anchorWorldX;\n const pinnedY = TARGET_Y - zoom * trackedY;\n\n const pullBack = interpolate(\n frame,\n [scanEnd, scanEnd + PULL_BACK_FRAMES / speed],\n [0, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.inOut(Easing.cubic),\n },\n );\n\n const scale = zoom + pullBack * (1 - zoom);\n const tx = (1 - pullBack) * pinnedX;\n const ty = (1 - pullBack) * pinnedY;\n\n return (\n <AbsoluteFill className={className} style={{ overflow: \"hidden\" }}>\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n width: STAGE_WIDTH,\n height: STAGE_HEIGHT,\n translate: `${tx}px ${ty}px`,\n scale: `${scale}`,\n transformOrigin: \"0 0\",\n }}\n >\n <GlassCodeBlock\n code={code}\n title={title}\n width={width}\n height={height}\n fontSize={fontSize}\n staggerFrames={staggerFrames}\n speed={speed}\n />\n </div>\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/glass-code-walk.tsx"}diff --git a/registry-artifacts/glitch-cut.json b/registry-artifacts/glitch-cut.jsonindex 9d2b8c05..fe3916fd 100644--- a/registry-artifacts/glitch-cut.json+++ b/registry-artifacts/glitch-cut.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/glitch-cut/index.tsx",- "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, random } from \"remotion\";\nimport {\n makeCanvasPresentation,\n makeSceneShader,\n} from \"@/lib/remocn/canvas-presentation\";\n\nexport type GlitchCutProps = {\n intensity?: number;\n slices?: number;\n rgbSplit?: number;\n blockNoise?: number;\n};\n\nconst DEFAULTS = {\n intensity: 1,\n slices: 24,\n rgbSplit: 1,\n blockNoise: 0.6,\n};\n\nconst STEPS = 22;\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_from;\nuniform sampler2D u_to;\nuniform float u_progress;\nuniform float u_intensity;\nuniform float u_slices;\nuniform float u_rgb_split;\nuniform float u_block_noise;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst float PI = 3.141592653589793;\nconst float STEPS = ${STEPS}.0;\nconst float BLOCK_COLUMNS = 16.0;\n\nfloat hash(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);\n}\n\nvec4 sampleSplit(sampler2D tex, vec2 uv, float split) {\n vec4 center = texture(tex, uv);\n float r = texture(tex, vec2(uv.x + split, uv.y)).r;\n float b = texture(tex, vec2(uv.x - split, uv.y)).b;\n return vec4(r, center.g, b, center.a);\n}\n\nvoid main() {\n float energy = pow(max(sin(u_progress * PI), 0.0), 0.7);\n float clock = floor(u_progress * STEPS);\n\n float row = floor(v_uv.y * u_slices);\n float torn = step(0.45, hash(vec2(row, clock)));\n float amount = hash(vec2(row + 17.0, clock * 1.7 + 3.0)) - 0.5;\n float sliceShift = amount * 0.3 * u_intensity * energy * torn;\n\n vec2 block = vec2(floor(v_uv.x * BLOCK_COLUMNS), row);\n float corrupt = step(\n 1.0 - u_block_noise * 0.5 * energy,\n hash(block + clock * 7.3)\n );\n float blockShift =\n (hash(block + clock * 3.1 + 5.0) - 0.5) * 0.2 * u_intensity * corrupt;\n\n vec2 uv = vec2(fract(v_uv.x + sliceShift + blockShift), v_uv.y);\n float split = u_rgb_split * 0.018 * energy * (0.35 + abs(amount));\n\n float cut = 0.5 + (hash(vec2(row, 91.0)) - 0.5) * 0.32;\n float handed = step(cut, u_progress);\n\n vec4 from = sampleSplit(u_from, uv, split);\n vec4 to = sampleSplit(u_to, uv, split);\n vec4 color = mix(from, to, handed);\n vec4 leaked = mix(to, from, handed);\n\n float leak = corrupt * step(0.55, hash(block + clock * 11.0 + 13.0));\n color = mix(color, leaked, leak * 0.8);\n\n color.rgb +=\n vec3(0.05, 0.015, 0.09) *\n energy *\n torn *\n hash(vec2(row, clock + 41.0)) *\n color.a;\n\n outColor = color;\n}`;\n\nconst shader = makeSceneShader<GlitchCutProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, passedProps }) => {\n const {\n intensity = DEFAULTS.intensity,\n slices = DEFAULTS.slices,\n rgbSplit = DEFAULTS.rgbSplit,\n blockNoise = DEFAULTS.blockNoise,\n } = passedProps;\n gl.uniform1f(uniform(\"u_intensity\"), intensity);\n gl.uniform1f(uniform(\"u_slices\"), slices);\n gl.uniform1f(uniform(\"u_rgb_split\"), rgbSplit);\n gl.uniform1f(uniform(\"u_block_noise\"), blockNoise);\n },\n);\n\nconst bandCut = (band: number) =>\n 0.5 + (random(`glitch-cut-handoff-${band}`) - 0.5) * 0.32;\n\nconst GlitchCutFallback: React.FC<\n TransitionPresentationComponentProps<GlitchCutProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n intensity = DEFAULTS.intensity,\n slices = DEFAULTS.slices,\n rgbSplit = DEFAULTS.rgbSplit,\n } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n const energy = Math.max(0, Math.sin(p * Math.PI)) ** 0.7;\n\n if (energy < 0.002) {\n const settled = entering ? (p >= 0.5 ? 1 : 0) : p < 0.5 ? 1 : 0;\n return <AbsoluteFill style={{ opacity: settled }}>{children}</AbsoluteFill>;\n }\n\n const clock = Math.floor(p * STEPS);\n const bands = Math.max(2, Math.min(6, Math.round(slices / 5)));\n const height = 100 / bands;\n\n return (\n <AbsoluteFill>\n {Array.from({ length: bands }, (_, band) => {\n const shown = p >= bandCut(band) ? entering : !entering;\n if (!shown) {\n return null;\n }\n const shift =\n (random(`glitch-cut-shift-${clock}-${band}`) - 0.5) *\n 52 *\n intensity *\n energy;\n const tint = band % 2 === 0 ? \"rgb(255, 42, 90)\" : \"rgb(0, 224, 255)\";\n const tintOpacity =\n rgbSplit * 0.2 * energy * random(`glitch-cut-tint-${clock}-${band}`);\n return (\n <AbsoluteFill\n key={band}\n style={{\n clipPath: `inset(${band * height}% 0 ${100 - (band + 1) * height}% 0)`,\n transform: `translateX(${shift}px)`,\n }}\n >\n {children}\n <AbsoluteFill\n style={{\n background: tint,\n mixBlendMode: \"screen\",\n opacity: tintOpacity,\n }}\n />\n </AbsoluteFill>\n );\n })}\n </AbsoluteFill>\n );\n};\n\nconst presentation = makeCanvasPresentation<GlitchCutProps>({\n shader,\n fallback: GlitchCutFallback,\n});\n\nexport function glitchCut(\n props: GlitchCutProps = {},\n): TransitionPresentation<GlitchCutProps> {\n return presentation(props);\n}\n",+ "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, random } from \"remotion\";\nimport {\n makeCanvasPresentation,\n makeSceneShader,\n} from \"@/lib/remocn/canvas-presentation\";\n\nexport type GlitchCutProps = {\n intensity?: number;\n slices?: number;\n rgbSplit?: number;\n blockNoise?: number;\n};\n\nconst DEFAULTS = {\n intensity: 1,\n slices: 24,\n rgbSplit: 1,\n blockNoise: 0.6,\n};\n\nconst STEPS = 22;\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_from;\nuniform sampler2D u_to;\nuniform float u_progress;\nuniform float u_intensity;\nuniform float u_slices;\nuniform float u_rgb_split;\nuniform float u_block_noise;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst float PI = 3.141592653589793;\nconst float STEPS = ${STEPS}.0;\nconst float BLOCK_COLUMNS = 16.0;\n\nfloat hash(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);\n}\n\nvec4 sampleSplit(sampler2D tex, vec2 uv, float split) {\n vec4 center = texture(tex, uv);\n float r = texture(tex, vec2(uv.x + split, uv.y)).r;\n float b = texture(tex, vec2(uv.x - split, uv.y)).b;\n return vec4(r, center.g, b, center.a);\n}\n\nvoid main() {\n float energy = pow(max(sin(u_progress * PI), 0.0), 0.7);\n float clock = floor(u_progress * STEPS);\n\n float row = floor(v_uv.y * u_slices);\n float torn = step(0.45, hash(vec2(row, clock)));\n float amount = hash(vec2(row + 17.0, clock * 1.7 + 3.0)) - 0.5;\n float sliceShift = amount * 0.3 * u_intensity * energy * torn;\n\n vec2 block = vec2(floor(v_uv.x * BLOCK_COLUMNS), row);\n float corrupt = step(\n 1.0 - u_block_noise * 0.5 * energy,\n hash(block + clock * 7.3)\n );\n float blockShift =\n (hash(block + clock * 3.1 + 5.0) - 0.5) * 0.2 * u_intensity * corrupt;\n\n vec2 uv = vec2(fract(v_uv.x + sliceShift + blockShift), v_uv.y);\n float split = u_rgb_split * 0.018 * energy * (0.35 + abs(amount));\n\n float cut = 0.5 + (hash(vec2(row, 91.0)) - 0.5) * 0.32;\n float handed = step(cut, u_progress);\n\n vec4 from = sampleSplit(u_from, uv, split);\n vec4 to = sampleSplit(u_to, uv, split);\n vec4 color = mix(from, to, handed);\n vec4 leaked = mix(to, from, handed);\n\n float leak = corrupt * step(0.55, hash(block + clock * 11.0 + 13.0));\n color = mix(color, leaked, leak * 0.8);\n\n color.rgb +=\n vec3(0.05, 0.015, 0.09) *\n energy *\n torn *\n hash(vec2(row, clock + 41.0)) *\n color.a;\n\n outColor = color;\n}`;\n\nconst shader = makeSceneShader<GlitchCutProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, passedProps }) => {\n const {\n intensity = DEFAULTS.intensity,\n slices = DEFAULTS.slices,\n rgbSplit = DEFAULTS.rgbSplit,\n blockNoise = DEFAULTS.blockNoise,\n } = passedProps;\n gl.uniform1f(uniform(\"u_intensity\"), intensity);\n gl.uniform1f(uniform(\"u_slices\"), slices);\n gl.uniform1f(uniform(\"u_rgb_split\"), rgbSplit);\n gl.uniform1f(uniform(\"u_block_noise\"), blockNoise);\n },\n);\n\nconst bandCut = (band: number) =>\n 0.5 + (random(`glitch-cut-handoff-${band}`) - 0.5) * 0.32;\n\nconst GlitchCutFallback: React.FC<\n TransitionPresentationComponentProps<GlitchCutProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n intensity = DEFAULTS.intensity,\n slices = DEFAULTS.slices,\n rgbSplit = DEFAULTS.rgbSplit,\n } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n const energy = Math.max(0, Math.sin(p * Math.PI)) ** 0.7;\n\n if (energy < 0.002) {\n const settled = entering ? (p >= 0.5 ? 1 : 0) : p < 0.5 ? 1 : 0;\n return <AbsoluteFill style={{ opacity: settled }}>{children}</AbsoluteFill>;\n }\n\n const clock = Math.floor(p * STEPS);\n const bands = Math.max(2, Math.min(6, Math.round(slices / 5)));\n const height = 100 / bands;\n\n return (\n <AbsoluteFill>\n {Array.from({ length: bands }, (_, band) => {\n const shown = p >= bandCut(band) ? entering : !entering;\n if (!shown) {\n return null;\n }\n const shift =\n (random(`glitch-cut-shift-${clock}-${band}`) - 0.5) *\n 52 *\n intensity *\n energy;\n const tint = band % 2 === 0 ? \"rgb(255, 42, 90)\" : \"rgb(0, 224, 255)\";\n const tintOpacity =\n rgbSplit * 0.2 * energy * random(`glitch-cut-tint-${clock}-${band}`);\n return (\n <AbsoluteFill\n key={band}\n style={{\n clipPath: `inset(${band * height}% 0 ${100 - (band + 1) * height}% 0)`,\n translate: `${shift}px`,\n }}\n >\n {children}\n <AbsoluteFill\n style={{\n background: tint,\n mixBlendMode: \"screen\",\n opacity: tintOpacity,\n }}\n />\n </AbsoluteFill>\n );\n })}\n </AbsoluteFill>\n );\n};\n\nconst presentation = makeCanvasPresentation<GlitchCutProps>({\n shader,\n fallback: GlitchCutFallback,\n});\n\nexport function glitchCut(\n props: GlitchCutProps = {},\n): TransitionPresentation<GlitchCutProps> {\n return presentation(props);\n}\n","type": "registry:component","target": "components/remocn/glitch-cut.tsx"}diff --git a/registry-artifacts/grain-dissolve.json b/registry-artifacts/grain-dissolve.jsonindex 38a0773c..f51316f3 100644--- a/registry-artifacts/grain-dissolve.json+++ b/registry-artifacts/grain-dissolve.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/grain-dissolve/index.tsx",- "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\nimport {\n ShaderGrainGradient,\n type ShaderGrainGradientProps,\n} from \"@/components/remocn/shader-grain-gradient\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nconst DEFAULT_COLORS = [\"#3a3a52\", \"#4a4a68\", \"#8f88ae\"];\n\nexport type GrainDissolveProps = {\n colors?: string[];\n colorBack?: string;\n shape?: NonNullable<ShaderGrainGradientProps[\"shape\"]>;\n noise?: number;\n zoom?: number;\n speed?: number;\n};\n\nconst GrainDissolvePresentation: React.FC<\n TransitionPresentationComponentProps<GrainDissolveProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n colors = DEFAULT_COLORS,\n colorBack = \"#141318\",\n shape = \"blob\",\n noise = 0.3,\n zoom = 2,\n speed = 1,\n } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n if (!entering) {\n const exitStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.14, 0.34], [1, 0], clampOpts),\n filter: `blur(${interpolate(p, [0.06, 0.34], [0, 10], clampOpts)}px)`,\n };\n return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;\n }\n\n const fieldOpacity = interpolate(p, [0, 0.26], [0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n });\n const intensity = interpolate(p, [0.08, 0.92], [0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n });\n const softness = interpolate(p, [0.08, 0.92], [0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n });\n const fieldScale = zoom * interpolate(p, [0, 1], [0.9, 1.15], clampOpts);\n\n const childStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.7, 0.86], [0, 1], clampOpts),\n transform: `scale(${interpolate(p, [0.7, 1], [1.05, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n })})`,\n filter: `blur(${interpolate(p, [0.7, 0.92], [10, 0], clampOpts)}px)`,\n };\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={{ opacity: fieldOpacity, pointerEvents: \"none\" }}>\n <ShaderGrainGradient\n speed={speed}\n colors={colors}\n colorBack={colorBack}\n shape={shape}\n noise={noise}\n intensity={intensity}\n softness={softness}\n scale={fieldScale}\n />\n </AbsoluteFill>\n <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>\n </AbsoluteFill>\n );\n};\n\nexport function grainDissolve(\n props: GrainDissolveProps = {},\n): TransitionPresentation<GrainDissolveProps> {\n return {\n component: GrainDissolvePresentation,\n props,\n };\n}\n",+ "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\nimport {\n ShaderGrainGradient,\n type ShaderGrainGradientProps,\n} from \"@/components/remocn/shader-grain-gradient\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nconst DEFAULT_COLORS = [\"#3a3a52\", \"#4a4a68\", \"#8f88ae\"];\n\nexport type GrainDissolveProps = {\n colors?: string[];\n colorBack?: string;\n shape?: NonNullable<ShaderGrainGradientProps[\"shape\"]>;\n noise?: number;\n zoom?: number;\n speed?: number;\n};\n\nconst GrainDissolvePresentation: React.FC<\n TransitionPresentationComponentProps<GrainDissolveProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n colors = DEFAULT_COLORS,\n colorBack = \"#141318\",\n shape = \"blob\",\n noise = 0.3,\n zoom = 2,\n speed = 1,\n } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n if (!entering) {\n const exitStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.14, 0.34], [1, 0], clampOpts),\n filter: `blur(${interpolate(p, [0.06, 0.34], [0, 10], clampOpts)}px)`,\n };\n return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;\n }\n\n const fieldOpacity = interpolate(p, [0, 0.26], [0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n });\n const intensity = interpolate(p, [0.08, 0.92], [0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n });\n const softness = interpolate(p, [0.08, 0.92], [0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n });\n const fieldScale = zoom * interpolate(p, [0, 1], [0.9, 1.15], clampOpts);\n\n const childStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.7, 0.86], [0, 1], clampOpts),\n scale: `${interpolate(p, [0.7, 1], [1.05, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n })})`,\n filter: `blur(${interpolate(p, [0.7, 0.92], [10, 0], clampOpts)}px)`,\n };\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={{ opacity: fieldOpacity, pointerEvents: \"none\" }}>\n <ShaderGrainGradient\n speed={speed}\n colors={colors}\n colorBack={colorBack}\n shape={shape}\n noise={noise}\n intensity={intensity}\n softness={softness}\n scale={fieldScale}\n />\n </AbsoluteFill>\n <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>\n </AbsoluteFill>\n );\n};\n\nexport function grainDissolve(\n props: GrainDissolveProps = {},\n): TransitionPresentation<GrainDissolveProps> {\n return {\n component: GrainDissolvePresentation,\n props,\n };\n}\n","type": "registry:component","target": "components/remocn/grain-dissolve.tsx"}diff --git a/registry-artifacts/grid-wave.json b/registry-artifacts/grid-wave.jsonindex e337d2ad..ed8f9c41 100644--- a/registry-artifacts/grid-wave.json+++ b/registry-artifacts/grid-wave.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/grid-wave/index.tsx",- "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill } from \"remotion\";\nimport {\n makeCanvasPresentation,\n makeSceneShader,\n} from \"@/lib/remocn/canvas-presentation\";\n\nexport type GridWaveDirection = \"ripple\" | \"left\" | \"right\" | \"up\" | \"down\";\n\nexport type GridWaveProps = {\n tileSize?: number;\n waveWidth?: number;\n lift?: number;\n gap?: number;\n tint?: string;\n direction?: GridWaveDirection;\n};\n\nconst DEFAULTS = {\n tileSize: 90,\n waveWidth: 0.16,\n lift: 2,\n gap: 0.12,\n tint: \"#8fb4ff\",\n direction: \"ripple\" as GridWaveDirection,\n};\n\nconst AXES: Record<GridWaveDirection, [number, number]> = {\n ripple: [0, 0],\n left: [1, 0],\n right: [-1, 0],\n up: [0, -1],\n down: [0, 1],\n};\n\nfunction hexToRgb(hex: string): [number, number, number] {\n const value = hex.replace(\"#\", \"\");\n const full =\n value.length === 3\n ? value\n .split(\"\")\n .map((c) => c + c)\n .join(\"\")\n : value;\n const int = Number.parseInt(full, 16);\n if (Number.isNaN(int)) {\n return [0.56, 0.71, 1];\n }\n return [\n ((int >> 16) & 255) / 255,\n ((int >> 8) & 255) / 255,\n (int & 255) / 255,\n ];\n}\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_from;\nuniform sampler2D u_to;\nuniform float u_progress;\nuniform float u_aspect;\nuniform vec2 u_grid;\nuniform float u_wave;\nuniform float u_lift;\nuniform float u_gap;\nuniform vec3 u_tint;\nuniform vec2 u_dir;\nuniform float u_radial;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nfloat hash(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);\n}\n\nfloat waveCoord(vec2 p) {\n vec2 off = (p - 0.5) * vec2(u_aspect, 1.0);\n float ring = length(off) / (0.5 * sqrt(u_aspect * u_aspect + 1.0));\n float sweep = clamp(dot(p - 0.5, u_dir) + 0.5, 0.0, 1.0);\n return mix(sweep, ring, u_radial);\n}\n\nvoid main() {\n float front = u_progress * (1.0 + 6.0 * u_wave) - 3.0 * u_wave;\n\n float selfPass =\n smoothstep(-u_wave * 0.4, u_wave * 0.4, front - waveCoord(v_uv));\n vec4 base = mix(texture(u_from, v_uv), texture(u_to, v_uv), selfPass);\n\n float edge = 0.5 - u_gap * 0.5;\n vec2 anchor = floor(v_uv * u_grid);\n\n vec4 face = vec4(0.0);\n float depth = -1.0;\n\n for (int oy = -1; oy <= 1; oy++) {\n for (int ox = -1; ox <= 1; ox++) {\n vec2 cell = anchor + vec2(float(ox), float(oy));\n vec2 centre = (cell + 0.5) / u_grid;\n\n float stagger = (hash(cell) - 0.5) * u_wave * 0.4;\n float w = front - waveCoord(centre) + stagger;\n float band = w / u_wave;\n float pulse = exp(-band * band);\n if (pulse <= depth) {\n continue;\n }\n\n float rise = pulse * u_lift;\n vec2 lean = centre - 0.5;\n lean = lean / max(length(lean), 0.0001) * rise * 0.15;\n float grow = 1.0 + rise * 0.5;\n\n vec2 q = (v_uv - centre) * u_grid;\n vec2 top = (q - lean) / grow;\n float onTop = max(abs(top.x), abs(top.y));\n float onFoot = max(abs(q.x), abs(q.y));\n bool lit = onTop <= edge;\n if (!lit && onFoot > edge) {\n continue;\n }\n depth = pulse;\n\n float pass = smoothstep(-u_wave * 0.4, u_wave * 0.4, w);\n vec2 local = lit ? top : clamp(top, -edge, edge);\n vec2 src = centre + local / u_grid;\n vec4 col = mix(texture(u_from, src), texture(u_to, src), pass);\n\n if (lit) {\n col.rgb = mix(col.rgb, u_tint, pulse * 0.12);\n col.rgb *= 1.0 + pulse * 0.06;\n } else {\n col.rgb = mix(col.rgb, u_tint, pulse * 0.06);\n col.rgb *= 1.0 - pulse * 0.24;\n }\n\n face = col;\n }\n }\n\n outColor = face + base * (1.0 - face.a);\n}`;\n\nconst shader = makeSceneShader<GridWaveProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, width, height, passedProps }) => {\n const {\n tileSize = DEFAULTS.tileSize,\n waveWidth = DEFAULTS.waveWidth,\n lift = DEFAULTS.lift,\n gap = DEFAULTS.gap,\n tint = DEFAULTS.tint,\n direction = DEFAULTS.direction,\n } = passedProps;\n const size = Math.max(tileSize, 8);\n const axis = AXES[direction] ?? AXES[DEFAULTS.direction];\n const rgb = hexToRgb(tint);\n gl.uniform2f(\n uniform(\"u_grid\"),\n Math.max(Math.round(width / size), 2),\n Math.max(Math.round(height / size), 2),\n );\n gl.uniform1f(uniform(\"u_wave\"), Math.max(waveWidth, 0.02));\n gl.uniform1f(uniform(\"u_lift\"), Math.max(lift, 0) * 0.35);\n gl.uniform1f(uniform(\"u_gap\"), Math.min(Math.max(gap, 0), 0.45));\n gl.uniform3f(uniform(\"u_tint\"), rgb[0], rgb[1], rgb[2]);\n gl.uniform2f(uniform(\"u_dir\"), axis[0], axis[1]);\n gl.uniform1f(uniform(\"u_radial\"), direction === \"ripple\" ? 1 : 0);\n },\n);\n\nconst GridWaveFallback: React.FC<\n TransitionPresentationComponentProps<GridWaveProps>\n> = ({ children, presentationProgress, presentationDirection }) => {\n const p = presentationProgress;\n\n if (presentationDirection === \"exiting\") {\n return <AbsoluteFill>{children}</AbsoluteFill>;\n }\n\n const reveal = Math.min(1, Math.max(0, (p - 0.2) / 0.6));\n\n return (\n <AbsoluteFill\n style={{\n opacity: reveal,\n transform: `scale(${1.04 - reveal * 0.04})`,\n }}\n >\n {children}\n </AbsoluteFill>\n );\n};\n\nconst presentation = makeCanvasPresentation<GridWaveProps>({\n shader,\n fallback: GridWaveFallback,\n});\n\nexport function gridWave(\n props: GridWaveProps = {},\n): TransitionPresentation<GridWaveProps> {\n return presentation(props);\n}\n",+ "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill } from \"remotion\";\nimport {\n makeCanvasPresentation,\n makeSceneShader,\n} from \"@/lib/remocn/canvas-presentation\";\n\nexport type GridWaveDirection = \"ripple\" | \"left\" | \"right\" | \"up\" | \"down\";\n\nexport type GridWaveProps = {\n tileSize?: number;\n waveWidth?: number;\n lift?: number;\n gap?: number;\n tint?: string;\n direction?: GridWaveDirection;\n};\n\nconst DEFAULTS = {\n tileSize: 90,\n waveWidth: 0.16,\n lift: 2,\n gap: 0.12,\n tint: \"#8fb4ff\",\n direction: \"ripple\" as GridWaveDirection,\n};\n\nconst AXES: Record<GridWaveDirection, [number, number]> = {\n ripple: [0, 0],\n left: [1, 0],\n right: [-1, 0],\n up: [0, -1],\n down: [0, 1],\n};\n\nfunction hexToRgb(hex: string): [number, number, number] {\n const value = hex.replace(\"#\", \"\");\n const full =\n value.length === 3\n ? value\n .split(\"\")\n .map((c) => c + c)\n .join(\"\")\n : value;\n const int = Number.parseInt(full, 16);\n if (Number.isNaN(int)) {\n return [0.56, 0.71, 1];\n }\n return [\n ((int >> 16) & 255) / 255,\n ((int >> 8) & 255) / 255,\n (int & 255) / 255,\n ];\n}\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_from;\nuniform sampler2D u_to;\nuniform float u_progress;\nuniform float u_aspect;\nuniform vec2 u_grid;\nuniform float u_wave;\nuniform float u_lift;\nuniform float u_gap;\nuniform vec3 u_tint;\nuniform vec2 u_dir;\nuniform float u_radial;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nfloat hash(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);\n}\n\nfloat waveCoord(vec2 p) {\n vec2 off = (p - 0.5) * vec2(u_aspect, 1.0);\n float ring = length(off) / (0.5 * sqrt(u_aspect * u_aspect + 1.0));\n float sweep = clamp(dot(p - 0.5, u_dir) + 0.5, 0.0, 1.0);\n return mix(sweep, ring, u_radial);\n}\n\nvoid main() {\n float front = u_progress * (1.0 + 6.0 * u_wave) - 3.0 * u_wave;\n\n float selfPass =\n smoothstep(-u_wave * 0.4, u_wave * 0.4, front - waveCoord(v_uv));\n vec4 base = mix(texture(u_from, v_uv), texture(u_to, v_uv), selfPass);\n\n float edge = 0.5 - u_gap * 0.5;\n vec2 anchor = floor(v_uv * u_grid);\n\n vec4 face = vec4(0.0);\n float depth = -1.0;\n\n for (int oy = -1; oy <= 1; oy++) {\n for (int ox = -1; ox <= 1; ox++) {\n vec2 cell = anchor + vec2(float(ox), float(oy));\n vec2 centre = (cell + 0.5) / u_grid;\n\n float stagger = (hash(cell) - 0.5) * u_wave * 0.4;\n float w = front - waveCoord(centre) + stagger;\n float band = w / u_wave;\n float pulse = exp(-band * band);\n if (pulse <= depth) {\n continue;\n }\n\n float rise = pulse * u_lift;\n vec2 lean = centre - 0.5;\n lean = lean / max(length(lean), 0.0001) * rise * 0.15;\n float grow = 1.0 + rise * 0.5;\n\n vec2 q = (v_uv - centre) * u_grid;\n vec2 top = (q - lean) / grow;\n float onTop = max(abs(top.x), abs(top.y));\n float onFoot = max(abs(q.x), abs(q.y));\n bool lit = onTop <= edge;\n if (!lit && onFoot > edge) {\n continue;\n }\n depth = pulse;\n\n float pass = smoothstep(-u_wave * 0.4, u_wave * 0.4, w);\n vec2 local = lit ? top : clamp(top, -edge, edge);\n vec2 src = centre + local / u_grid;\n vec4 col = mix(texture(u_from, src), texture(u_to, src), pass);\n\n if (lit) {\n col.rgb = mix(col.rgb, u_tint, pulse * 0.12);\n col.rgb *= 1.0 + pulse * 0.06;\n } else {\n col.rgb = mix(col.rgb, u_tint, pulse * 0.06);\n col.rgb *= 1.0 - pulse * 0.24;\n }\n\n face = col;\n }\n }\n\n outColor = face + base * (1.0 - face.a);\n}`;\n\nconst shader = makeSceneShader<GridWaveProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, width, height, passedProps }) => {\n const {\n tileSize = DEFAULTS.tileSize,\n waveWidth = DEFAULTS.waveWidth,\n lift = DEFAULTS.lift,\n gap = DEFAULTS.gap,\n tint = DEFAULTS.tint,\n direction = DEFAULTS.direction,\n } = passedProps;\n const size = Math.max(tileSize, 8);\n const axis = AXES[direction] ?? AXES[DEFAULTS.direction];\n const rgb = hexToRgb(tint);\n gl.uniform2f(\n uniform(\"u_grid\"),\n Math.max(Math.round(width / size), 2),\n Math.max(Math.round(height / size), 2),\n );\n gl.uniform1f(uniform(\"u_wave\"), Math.max(waveWidth, 0.02));\n gl.uniform1f(uniform(\"u_lift\"), Math.max(lift, 0) * 0.35);\n gl.uniform1f(uniform(\"u_gap\"), Math.min(Math.max(gap, 0), 0.45));\n gl.uniform3f(uniform(\"u_tint\"), rgb[0], rgb[1], rgb[2]);\n gl.uniform2f(uniform(\"u_dir\"), axis[0], axis[1]);\n gl.uniform1f(uniform(\"u_radial\"), direction === \"ripple\" ? 1 : 0);\n },\n);\n\nconst GridWaveFallback: React.FC<\n TransitionPresentationComponentProps<GridWaveProps>\n> = ({ children, presentationProgress, presentationDirection }) => {\n const p = presentationProgress;\n\n if (presentationDirection === \"exiting\") {\n return <AbsoluteFill>{children}</AbsoluteFill>;\n }\n\n const reveal = Math.min(1, Math.max(0, (p - 0.2) / 0.6));\n\n return (\n <AbsoluteFill\n style={{\n opacity: reveal,\n scale: `${1.04 - reveal * 0.04}`,\n }}\n >\n {children}\n </AbsoluteFill>\n );\n};\n\nconst presentation = makeCanvasPresentation<GridWaveProps>({\n shader,\n fallback: GridWaveFallback,\n});\n\nexport function gridWave(\n props: GridWaveProps = {},\n): TransitionPresentation<GridWaveProps> {\n return presentation(props);\n}\n","type": "registry:component","target": "components/remocn/grid-wave.tsx"}diff --git a/registry-artifacts/hand-count.json b/registry-artifacts/hand-count.jsonindex 99c00123..13d355e6 100644--- a/registry-artifacts/hand-count.json+++ b/registry-artifacts/hand-count.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/hand-count/index.tsx",- "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/Caveat\";\nimport { useCurrentFrame } from \"remotion\";\nimport {\n DEFAULT_STEP,\n hashRange,\n qstep,\n steppedRamp,\n} from \"@/lib/remocn/stop-motion\";\n\nconst { fontFamily: HAND_FAMILY } = loadFont(\"normal\", {\n subsets: [\"latin\"],\n weights: [\"400\", \"500\", \"600\", \"700\"],\n});\n\nconst easeOutCubic = (t: number) => 1 - (1 - t) ** 3;\n\nconst easeInOutCubic = (t: number) =>\n t < 0.5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2;\n\nconst DEFAULT_DURATION_STEPS = 18;\n\nexport type HandCountEase = \"in-out\" | \"out\" | \"linear\";\n\nconst EASES: Record<HandCountEase, (t: number) => number> = {\n \"in-out\": easeInOutCubic,\n out: easeOutCubic,\n linear: (t: number) => t,\n};\n\nexport type HandCountTiming = {\n delay?: number;\n durationSteps?: number;\n step?: number;\n};\n\nexport function handCountDuration(options?: HandCountTiming): number {\n const delay = options?.delay ?? 0;\n const durationSteps = options?.durationSteps ?? DEFAULT_DURATION_STEPS;\n const step = options?.step ?? DEFAULT_STEP;\n const end = delay + durationSteps * step;\n return Math.ceil(end / step) * step;\n}\n\nexport function handCountValue(\n args: HandCountTiming & {\n frame: number;\n to: number;\n from?: number;\n ease?: HandCountEase;\n },\n): number {\n const from = args.from ?? 0;\n const delay = args.delay ?? 0;\n const durationSteps = args.durationSteps ?? DEFAULT_DURATION_STEPS;\n const step = args.step ?? DEFAULT_STEP;\n const progress = steppedRamp(\n args.frame,\n delay,\n delay + durationSteps * step,\n {\n ease: EASES[args.ease ?? \"in-out\"],\n step,\n },\n );\n return from + (args.to - from) * progress;\n}\n\nexport function handCountText(\n value: number,\n options?: { decimals?: number; prefix?: string; suffix?: string },\n): string {\n return `${options?.prefix ?? \"\"}${value.toFixed(options?.decimals ?? 0)}${options?.suffix ?? \"\"}`;\n}\n\nexport function handCountPose(\n frame: number,\n options?: HandCountTiming,\n): number {\n const step = options?.step ?? DEFAULT_STEP;\n const settled = handCountDuration(options);\n return Math.min(qstep(Math.max(0, frame), step), qstep(settled, step));\n}\n\nexport function handCountJitter(\n args: HandCountTiming & { frame: number; index: number; seed?: string },\n): { rot: number; dy: number } {\n const seed = args.seed ?? \"count\";\n const pose = handCountPose(args.frame, args);\n return {\n rot: hashRange(`${seed}:${pose}:${args.index}:r`, -3.2, 3.2),\n dy: hashRange(`${seed}:${pose}:${args.index}:y`, -1.8, 1.8),\n };\n}\n\nexport interface HandCountProps {\n to: number;\n from?: number;\n delay?: number;\n durationSteps?: number;\n decimals?: number;\n prefix?: string;\n suffix?: string;\n fontSize?: number;\n color?: string;\n weight?: 400 | 500 | 600 | 700;\n ease?: HandCountEase;\n align?: \"left\" | \"center\";\n fontFamily?: string;\n seed?: string;\n step?: number;\n}\n\nexport function HandCount({\n to,\n from = 0,\n delay = 0,\n durationSteps = DEFAULT_DURATION_STEPS,\n decimals = 0,\n prefix = \"\",\n suffix = \"\",\n fontSize = 96,\n color = \"#26242c\",\n weight = 700,\n ease = \"in-out\",\n align = \"center\",\n fontFamily = HAND_FAMILY,\n seed = \"count\",\n step = DEFAULT_STEP,\n}: HandCountProps) {\n const frame = useCurrentFrame();\n const value = handCountValue({\n frame,\n to,\n from,\n delay,\n durationSteps,\n step,\n ease,\n });\n const chars = Array.from(handCountText(value, { decimals, prefix, suffix }));\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: align === \"center\" ? \"center\" : \"flex-start\",\n background: \"transparent\",\n }}\n >\n <span\n style={{\n display: \"inline-block\",\n fontFamily: `${fontFamily}, cursive`,\n fontWeight: weight,\n fontSize,\n lineHeight: 1.15,\n color,\n whiteSpace: \"pre\",\n textAlign: align,\n }}\n >\n {chars.map((char, i) => {\n const { rot, dy } = handCountJitter({\n frame,\n index: i,\n seed,\n delay,\n durationSteps,\n step,\n });\n return (\n <span\n key={`${i}:${char}`}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n transform: `translateY(${dy}px) rotate(${rot}deg)`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/Caveat\";\nimport { useCurrentFrame } from \"remotion\";\nimport {\n DEFAULT_STEP,\n hashRange,\n qstep,\n steppedRamp,\n} from \"@/lib/remocn/stop-motion\";\n\nconst { fontFamily: HAND_FAMILY } = loadFont(\"normal\", {\n subsets: [\"latin\"],\n weights: [\"400\", \"500\", \"600\", \"700\"],\n});\n\nconst easeOutCubic = (t: number) => 1 - (1 - t) ** 3;\n\nconst easeInOutCubic = (t: number) =>\n t < 0.5 ? 4 * t ** 3 : 1 - (-2 * t + 2) ** 3 / 2;\n\nconst DEFAULT_DURATION_STEPS = 18;\n\nexport type HandCountEase = \"in-out\" | \"out\" | \"linear\";\n\nconst EASES: Record<HandCountEase, (t: number) => number> = {\n \"in-out\": easeInOutCubic,\n out: easeOutCubic,\n linear: (t: number) => t,\n};\n\nexport type HandCountTiming = {\n delay?: number;\n durationSteps?: number;\n step?: number;\n};\n\nexport function handCountDuration(options?: HandCountTiming): number {\n const delay = options?.delay ?? 0;\n const durationSteps = options?.durationSteps ?? DEFAULT_DURATION_STEPS;\n const step = options?.step ?? DEFAULT_STEP;\n const end = delay + durationSteps * step;\n return Math.ceil(end / step) * step;\n}\n\nexport function handCountValue(\n args: HandCountTiming & {\n frame: number;\n to: number;\n from?: number;\n ease?: HandCountEase;\n },\n): number {\n const from = args.from ?? 0;\n const delay = args.delay ?? 0;\n const durationSteps = args.durationSteps ?? DEFAULT_DURATION_STEPS;\n const step = args.step ?? DEFAULT_STEP;\n const progress = steppedRamp(\n args.frame,\n delay,\n delay + durationSteps * step,\n {\n ease: EASES[args.ease ?? \"in-out\"],\n step,\n },\n );\n return from + (args.to - from) * progress;\n}\n\nexport function handCountText(\n value: number,\n options?: { decimals?: number; prefix?: string; suffix?: string },\n): string {\n return `${options?.prefix ?? \"\"}${value.toFixed(options?.decimals ?? 0)}${options?.suffix ?? \"\"}`;\n}\n\nexport function handCountPose(\n frame: number,\n options?: HandCountTiming,\n): number {\n const step = options?.step ?? DEFAULT_STEP;\n const settled = handCountDuration(options);\n return Math.min(qstep(Math.max(0, frame), step), qstep(settled, step));\n}\n\nexport function handCountJitter(\n args: HandCountTiming & { frame: number; index: number; seed?: string },\n): { rot: number; dy: number } {\n const seed = args.seed ?? \"count\";\n const pose = handCountPose(args.frame, args);\n return {\n rot: hashRange(`${seed}:${pose}:${args.index}:r`, -3.2, 3.2),\n dy: hashRange(`${seed}:${pose}:${args.index}:y`, -1.8, 1.8),\n };\n}\n\nexport interface HandCountProps {\n to: number;\n from?: number;\n delay?: number;\n durationSteps?: number;\n decimals?: number;\n prefix?: string;\n suffix?: string;\n fontSize?: number;\n color?: string;\n weight?: 400 | 500 | 600 | 700;\n ease?: HandCountEase;\n align?: \"left\" | \"center\";\n fontFamily?: string;\n seed?: string;\n step?: number;\n}\n\nexport function HandCount({\n to,\n from = 0,\n delay = 0,\n durationSteps = DEFAULT_DURATION_STEPS,\n decimals = 0,\n prefix = \"\",\n suffix = \"\",\n fontSize = 96,\n color = \"#26242c\",\n weight = 700,\n ease = \"in-out\",\n align = \"center\",\n fontFamily = HAND_FAMILY,\n seed = \"count\",\n step = DEFAULT_STEP,\n}: HandCountProps) {\n const frame = useCurrentFrame();\n const value = handCountValue({\n frame,\n to,\n from,\n delay,\n durationSteps,\n step,\n ease,\n });\n const chars = Array.from(handCountText(value, { decimals, prefix, suffix }));\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: align === \"center\" ? \"center\" : \"flex-start\",\n background: \"transparent\",\n }}\n >\n <span\n style={{\n display: \"inline-block\",\n fontFamily: `${fontFamily}, cursive`,\n fontWeight: weight,\n fontSize,\n lineHeight: 1.15,\n color,\n whiteSpace: \"pre\",\n textAlign: align,\n }}\n >\n {chars.map((char, i) => {\n const { rot, dy } = handCountJitter({\n frame,\n index: i,\n seed,\n delay,\n durationSteps,\n step,\n });\n return (\n <span\n key={`${i}:${char}`}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n translate: `0 ${dy}px`,\n rotate: `${rot}deg`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/hand-count.tsx"}diff --git a/registry-artifacts/handwrite.json b/registry-artifacts/handwrite.jsonindex 6c22f590..9fab359a 100644--- a/registry-artifacts/handwrite.json+++ b/registry-artifacts/handwrite.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/handwrite/index.tsx",- "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/Caveat\";\nimport { useCurrentFrame } from \"remotion\";\nimport { DEFAULT_STEP, hashRange, qf, qstep } from \"@/lib/remocn/stop-motion\";\n\nconst { fontFamily: HAND_FAMILY } = loadFont(\"normal\", {\n subsets: [\"latin\"],\n weights: [\"400\", \"500\", \"600\", \"700\"],\n});\n\nexport interface HandwriteProps {\n text: string;\n fontSize?: number;\n color?: string;\n delay?: number;\n perStep?: number;\n weight?: 400 | 500 | 600 | 700;\n align?: \"left\" | \"center\";\n fontFamily?: string;\n step?: number;\n}\n\nexport function Handwrite({\n text,\n fontSize = 54,\n color = \"#26242c\",\n delay = 0,\n perStep = 1.6,\n weight = 600,\n align = \"center\",\n fontFamily = HAND_FAMILY,\n step = DEFAULT_STEP,\n}: HandwriteProps) {\n const frame = useCurrentFrame();\n const steps = Math.max(0, qstep(Math.max(0, qf(frame, step) - delay), step));\n const shown = Math.floor(steps * perStep);\n const chars = Array.from(text);\n const freshFrom = shown - Math.ceil(perStep);\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: align === \"center\" ? \"center\" : \"flex-start\",\n background: \"transparent\",\n }}\n >\n <span\n style={{\n display: \"inline-block\",\n fontFamily: `${fontFamily}, cursive`,\n fontWeight: weight,\n fontSize,\n lineHeight: 1.15,\n color,\n whiteSpace: \"pre-wrap\",\n textAlign: align,\n }}\n >\n {chars.map((char, i) => {\n const visible = i < shown;\n const slant = hashRange(`hw:${text}:${i}:r`, -3.2, 3.2);\n const dy = hashRange(`hw:${text}:${i}:y`, -1.8, 1.8);\n const fresh = visible && i >= freshFrom;\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n opacity: visible ? 1 : 0,\n transform: visible\n ? `translateY(${dy}px) rotate(${slant}deg) scale(${fresh ? 1.06 : 1})`\n : undefined,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n\nexport function handwriteDuration(\n text: string,\n options?: { perStep?: number; step?: number },\n): number {\n const perStep = options?.perStep ?? 1.6;\n const step = options?.step ?? DEFAULT_STEP;\n return Math.ceil(Array.from(text).length / perStep) * step + step;\n}\n",+ "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/Caveat\";\nimport { useCurrentFrame } from \"remotion\";\nimport { DEFAULT_STEP, hashRange, qf, qstep } from \"@/lib/remocn/stop-motion\";\n\nconst { fontFamily: HAND_FAMILY } = loadFont(\"normal\", {\n subsets: [\"latin\"],\n weights: [\"400\", \"500\", \"600\", \"700\"],\n});\n\nexport interface HandwriteProps {\n text: string;\n fontSize?: number;\n color?: string;\n delay?: number;\n perStep?: number;\n weight?: 400 | 500 | 600 | 700;\n align?: \"left\" | \"center\";\n fontFamily?: string;\n step?: number;\n}\n\nexport function Handwrite({\n text,\n fontSize = 54,\n color = \"#26242c\",\n delay = 0,\n perStep = 1.6,\n weight = 600,\n align = \"center\",\n fontFamily = HAND_FAMILY,\n step = DEFAULT_STEP,\n}: HandwriteProps) {\n const frame = useCurrentFrame();\n const steps = Math.max(0, qstep(Math.max(0, qf(frame, step) - delay), step));\n const shown = Math.floor(steps * perStep);\n const chars = Array.from(text);\n const freshFrom = shown - Math.ceil(perStep);\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: align === \"center\" ? \"center\" : \"flex-start\",\n background: \"transparent\",\n }}\n >\n <span\n style={{\n display: \"inline-block\",\n fontFamily: `${fontFamily}, cursive`,\n fontWeight: weight,\n fontSize,\n lineHeight: 1.15,\n color,\n whiteSpace: \"pre-wrap\",\n textAlign: align,\n }}\n >\n {chars.map((char, i) => {\n const visible = i < shown;\n const slant = hashRange(`hw:${text}:${i}:r`, -3.2, 3.2);\n const dy = hashRange(`hw:${text}:${i}:y`, -1.8, 1.8);\n const fresh = visible && i >= freshFrom;\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n opacity: visible ? 1 : 0,\n translate: visible ? `0 ${dy}px` : undefined,\n rotate: visible ? `${slant}deg` : undefined,\n scale: visible ? `${fresh ? 1.06 : 1}` : undefined,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n\nexport function handwriteDuration(\n text: string,\n options?: { perStep?: number; step?: number },\n): number {\n const perStep = options?.perStep ?? 1.6;\n const step = options?.step ?? DEFAULT_STEP;\n return Math.ceil(Array.from(text).length / perStep) * step + step;\n}\n","type": "registry:component","target": "components/remocn/handwrite.tsx"}diff --git a/registry-artifacts/icon-scatter.json b/registry-artifacts/icon-scatter.jsonindex 85a9126d..d289e097 100644--- a/registry-artifacts/icon-scatter.json+++ b/registry-artifacts/icon-scatter.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/icon-scatter/index.tsx",- "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate, random } from \"remotion\";\n\n// ===========================================================================\n// icon-scatter — a scene change made of icons.\n//\n// The outgoing scene shatters into a deterministic field of line-icons that\n// draw themselves on, spin, and scatter outward; at mid-transition the field\n// is densest and covers the swap; then the icons fly off and draw away as the\n// incoming scene resolves through them. Motion-forward and self-contained —\n// the paths are inlined, the draw-on is CSS `pathLength` only, so the\n// transition ships as one file with no icon dependencies.\n//\n// Pace it with `linearTiming`/`springTiming` like any presentation. Reads\n// best over ~16–26 frames.\n// ===========================================================================\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\n// Single-path Lucide-style glyphs (viewBox 0 0 24 24) — each draws cleanly\n// from one continuous stroke via a normalized dashoffset.\nconst ICON_PATHS: string[] = [\n // star\n \"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z\",\n // heart\n \"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5\",\n // zap\n \"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z\",\n // sparkles\n \"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z\",\n // moon\n \"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401\",\n // play\n \"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\",\n // crown\n \"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z\",\n // circle\n \"M12 2 A10 10 0 0 1 22 12 A10 10 0 0 1 12 22 A10 10 0 0 1 2 12 A10 10 0 0 1 12 2\",\n // square (rounded)\n \"M7 4h10a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3z\",\n // triangle\n \"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3z\",\n // plus\n \"M12 5v14 M5 12h14\",\n];\n\nexport type IconScatterProps = {\n /** How many icons populate the field. Default 15. */\n count?: number;\n /** Icon stroke color. Default near-white ink. */\n color?: string;\n /** The fill that hides the swap at the field's peak. Default warm obsidian. */\n coverColor?: string;\n /** Peak opacity of the cover fill (0–1). Lower = more of the swap shows. */\n coverOpacity?: number;\n /** Stroke width of the icons, in their 24px viewBox units. Default 2. */\n strokeWidth?: number;\n /** How far icons fly on scatter, in px. Default 260. */\n flyDistance?: number;\n /** Seed so two scatters in one video can differ. Default \"icon-scatter\". */\n seed?: string;\n};\n\ntype Placed = {\n path: string;\n xPct: number;\n yPct: number;\n size: number;\n spin: number; // degrees swept over the whole transition\n dir: number; // outward scatter angle offset\n strokeOpacity: number;\n pStart: number; // when this icon begins drawing (p-space)\n pOut: number; // when this icon begins flying out (p-space)\n};\n\n// Jittered grid so the field reads as scattered but never clumps or overlaps.\nfunction placeIcons(count: number, seed: string): Placed[] {\n const cols = Math.ceil(Math.sqrt((count * 16) / 9));\n const rows = Math.ceil(count / cols);\n const out: Placed[] = [];\n for (let i = 0; i < count; i++) {\n const col = i % cols;\n const row = Math.floor(i / cols);\n const cellW = 100 / cols;\n const cellH = 100 / rows;\n const jx = (random(`${seed}-jx-${i}`) - 0.5) * cellW * 0.7;\n const jy = (random(`${seed}-jy-${i}`) - 0.5) * cellH * 0.7;\n out.push({\n path: ICON_PATHS[\n Math.floor(random(`${seed}-p-${i}`) * ICON_PATHS.length)\n ],\n xPct: cellW * (col + 0.5) + jx,\n yPct: cellH * (row + 0.5) + jy,\n size: 34 + random(`${seed}-s-${i}`) * 40,\n spin: (random(`${seed}-r-${i}`) - 0.5) * 320,\n dir: (random(`${seed}-d-${i}`) - 0.5) * 1.2,\n strokeOpacity: 0.5 + random(`${seed}-o-${i}`) * 0.5,\n pStart: random(`${seed}-a-${i}`) * 0.16,\n pOut: 0.52 + random(`${seed}-b-${i}`) * 0.16,\n });\n }\n return out;\n}\n\nconst IconField: React.FC<{\n p: number;\n placed: Placed[];\n color: string;\n strokeWidth: number;\n flyDistance: number;\n}> = ({ p, placed, color, strokeWidth, flyDistance }) => (\n <AbsoluteFill style={{ pointerEvents: \"none\" }}>\n {placed.map((icon, i) => {\n // Draw on over ~0.34 of p from the icon's start, then fly out.\n const draw = interpolate(p, [icon.pStart, icon.pStart + 0.34], [0, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n });\n const scaleIn = interpolate(\n p,\n [icon.pStart, icon.pStart + 0.3],\n [0.4, 1],\n {\n ...clampOpts,\n easing: Easing.out(Easing.back(1.6)),\n },\n );\n const outP = interpolate(p, [icon.pOut, 1], [0, 1], {\n ...clampOpts,\n easing: Easing.in(Easing.cubic),\n });\n\n // Scatter outward from the frame center, along the icon's own radial.\n const cx = icon.xPct - 50;\n const cy = icon.yPct - 50;\n const angle = Math.atan2(cy, cx) + icon.dir;\n const fly = outP * flyDistance;\n const tx = Math.cos(angle) * fly;\n const ty = Math.sin(angle) * fly;\n\n const spin =\n icon.spin * interpolate(p, [icon.pStart, 1], [0, 1], clampOpts);\n const opacity = Math.min(draw, 1 - outP) * icon.strokeOpacity;\n if (opacity <= 0.001) return null;\n\n return (\n <svg\n key={i}\n width={icon.size}\n height={icon.size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n position: \"absolute\",\n left: `${icon.xPct}%`,\n top: `${icon.yPct}%`,\n opacity,\n overflow: \"visible\",\n transform: `translate(-50%, -50%) translate(${tx}px, ${ty}px) scale(${\n scaleIn * (1 - outP * 0.3)\n }) rotate(${spin}deg)`,\n }}\n >\n <path\n d={icon.path}\n pathLength={1}\n strokeDasharray={1}\n strokeDashoffset={1 - draw}\n />\n </svg>\n );\n })}\n </AbsoluteFill>\n);\n\nconst IconScatterPresentation: React.FC<\n TransitionPresentationComponentProps<IconScatterProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n count = 15,\n color = \"#fafafa\",\n coverColor = \"#0a0a0a\",\n coverOpacity = 0.92,\n strokeWidth = 2,\n flyDistance = 260,\n seed = \"icon-scatter\",\n } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n if (!entering) {\n // The outgoing scene sinks back and blurs as the field rises over it.\n const exitStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.28, 0.5], [1, 0], clampOpts),\n transform: `scale(${interpolate(p, [0, 0.5], [1, 0.94], {\n ...clampOpts,\n easing: Easing.in(Easing.cubic),\n })})`,\n filter: `blur(${interpolate(p, [0.1, 0.45], [0, 10], clampOpts)}px)`,\n };\n return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;\n }\n\n const placed = placeIcons(count, seed);\n\n // The incoming scene resolves once the field starts clearing.\n const childStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.5, 0.68], [0, 1], clampOpts),\n transform: `scale(${interpolate(p, [0.5, 1], [1.06, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n })})`,\n filter: `blur(${interpolate(p, [0.5, 0.72], [8, 0], clampOpts)}px)`,\n };\n\n // The cover fill hides the swap while the field is densest.\n const cover = interpolate(p, [0, 0.3, 0.62, 0.9], [0, 1, 1, 0], clampOpts);\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>\n <AbsoluteFill\n style={{\n background: coverColor,\n opacity: cover * coverOpacity,\n pointerEvents: \"none\",\n }}\n />\n <IconField\n p={p}\n placed={placed}\n color={color}\n strokeWidth={strokeWidth}\n flyDistance={flyDistance}\n />\n </AbsoluteFill>\n );\n};\n\nexport function iconScatter(\n props: IconScatterProps = {},\n): TransitionPresentation<IconScatterProps> {\n return {\n component: IconScatterPresentation,\n props,\n };\n}\n",+ "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate, random } from \"remotion\";\n\n// ===========================================================================\n// icon-scatter — a scene change made of icons.\n//\n// The outgoing scene shatters into a deterministic field of line-icons that\n// draw themselves on, spin, and scatter outward; at mid-transition the field\n// is densest and covers the swap; then the icons fly off and draw away as the\n// incoming scene resolves through them. Motion-forward and self-contained —\n// the paths are inlined, the draw-on is CSS `pathLength` only, so the\n// transition ships as one file with no icon dependencies.\n//\n// Pace it with `linearTiming`/`springTiming` like any presentation. Reads\n// best over ~16–26 frames.\n// ===========================================================================\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\n// Single-path Lucide-style glyphs (viewBox 0 0 24 24) — each draws cleanly\n// from one continuous stroke via a normalized dashoffset.\nconst ICON_PATHS: string[] = [\n // star\n \"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z\",\n // heart\n \"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5\",\n // zap\n \"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z\",\n // sparkles\n \"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z\",\n // moon\n \"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401\",\n // play\n \"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z\",\n // crown\n \"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z\",\n // circle\n \"M12 2 A10 10 0 0 1 22 12 A10 10 0 0 1 12 22 A10 10 0 0 1 2 12 A10 10 0 0 1 12 2\",\n // square (rounded)\n \"M7 4h10a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3z\",\n // triangle\n \"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3z\",\n // plus\n \"M12 5v14 M5 12h14\",\n];\n\nexport type IconScatterProps = {\n /** How many icons populate the field. Default 15. */\n count?: number;\n /** Icon stroke color. Default near-white ink. */\n color?: string;\n /** The fill that hides the swap at the field's peak. Default warm obsidian. */\n coverColor?: string;\n /** Peak opacity of the cover fill (0–1). Lower = more of the swap shows. */\n coverOpacity?: number;\n /** Stroke width of the icons, in their 24px viewBox units. Default 2. */\n strokeWidth?: number;\n /** How far icons fly on scatter, in px. Default 260. */\n flyDistance?: number;\n /** Seed so two scatters in one video can differ. Default \"icon-scatter\". */\n seed?: string;\n};\n\ntype Placed = {\n path: string;\n xPct: number;\n yPct: number;\n size: number;\n spin: number; // degrees swept over the whole transition\n dir: number; // outward scatter angle offset\n strokeOpacity: number;\n pStart: number; // when this icon begins drawing (p-space)\n pOut: number; // when this icon begins flying out (p-space)\n};\n\n// Jittered grid so the field reads as scattered but never clumps or overlaps.\nfunction placeIcons(count: number, seed: string): Placed[] {\n const cols = Math.ceil(Math.sqrt((count * 16) / 9));\n const rows = Math.ceil(count / cols);\n const out: Placed[] = [];\n for (let i = 0; i < count; i++) {\n const col = i % cols;\n const row = Math.floor(i / cols);\n const cellW = 100 / cols;\n const cellH = 100 / rows;\n const jx = (random(`${seed}-jx-${i}`) - 0.5) * cellW * 0.7;\n const jy = (random(`${seed}-jy-${i}`) - 0.5) * cellH * 0.7;\n out.push({\n path: ICON_PATHS[\n Math.floor(random(`${seed}-p-${i}`) * ICON_PATHS.length)\n ],\n xPct: cellW * (col + 0.5) + jx,\n yPct: cellH * (row + 0.5) + jy,\n size: 34 + random(`${seed}-s-${i}`) * 40,\n spin: (random(`${seed}-r-${i}`) - 0.5) * 320,\n dir: (random(`${seed}-d-${i}`) - 0.5) * 1.2,\n strokeOpacity: 0.5 + random(`${seed}-o-${i}`) * 0.5,\n pStart: random(`${seed}-a-${i}`) * 0.16,\n pOut: 0.52 + random(`${seed}-b-${i}`) * 0.16,\n });\n }\n return out;\n}\n\nconst IconField: React.FC<{\n p: number;\n placed: Placed[];\n color: string;\n strokeWidth: number;\n flyDistance: number;\n}> = ({ p, placed, color, strokeWidth, flyDistance }) => (\n <AbsoluteFill style={{ pointerEvents: \"none\" }}>\n {placed.map((icon, i) => {\n // Draw on over ~0.34 of p from the icon's start, then fly out.\n const draw = interpolate(p, [icon.pStart, icon.pStart + 0.34], [0, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n });\n const scaleIn = interpolate(\n p,\n [icon.pStart, icon.pStart + 0.3],\n [0.4, 1],\n {\n ...clampOpts,\n easing: Easing.out(Easing.back(1.6)),\n },\n );\n const outP = interpolate(p, [icon.pOut, 1], [0, 1], {\n ...clampOpts,\n easing: Easing.in(Easing.cubic),\n });\n\n // Scatter outward from the frame center, along the icon's own radial.\n const cx = icon.xPct - 50;\n const cy = icon.yPct - 50;\n const angle = Math.atan2(cy, cx) + icon.dir;\n const fly = outP * flyDistance;\n const tx = Math.cos(angle) * fly;\n const ty = Math.sin(angle) * fly;\n\n const spin =\n icon.spin * interpolate(p, [icon.pStart, 1], [0, 1], clampOpts);\n const opacity = Math.min(draw, 1 - outP) * icon.strokeOpacity;\n if (opacity <= 0.001) return null;\n\n return (\n <svg\n key={i}\n width={icon.size}\n height={icon.size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n style={{\n position: \"absolute\",\n left: `${icon.xPct}%`,\n top: `${icon.yPct}%`,\n opacity,\n overflow: \"visible\",\n transform: `translate(-50%, -50%) translate(${tx}px, ${ty}px) scale(${\n scaleIn * (1 - outP * 0.3)\n }) rotate(${spin}deg)`,\n }}\n >\n <path\n d={icon.path}\n pathLength={1}\n strokeDasharray={1}\n strokeDashoffset={1 - draw}\n />\n </svg>\n );\n })}\n </AbsoluteFill>\n);\n\nconst IconScatterPresentation: React.FC<\n TransitionPresentationComponentProps<IconScatterProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n count = 15,\n color = \"#fafafa\",\n coverColor = \"#0a0a0a\",\n coverOpacity = 0.92,\n strokeWidth = 2,\n flyDistance = 260,\n seed = \"icon-scatter\",\n } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n if (!entering) {\n // The outgoing scene sinks back and blurs as the field rises over it.\n const exitStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.28, 0.5], [1, 0], clampOpts),\n scale: `${interpolate(p, [0, 0.5], [1, 0.94], {\n ...clampOpts,\n easing: Easing.in(Easing.cubic),\n })})`,\n filter: `blur(${interpolate(p, [0.1, 0.45], [0, 10], clampOpts)}px)`,\n };\n return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;\n }\n\n const placed = placeIcons(count, seed);\n\n // The incoming scene resolves once the field starts clearing.\n const childStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.5, 0.68], [0, 1], clampOpts),\n scale: `${interpolate(p, [0.5, 1], [1.06, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n })})`,\n filter: `blur(${interpolate(p, [0.5, 0.72], [8, 0], clampOpts)}px)`,\n };\n\n // The cover fill hides the swap while the field is densest.\n const cover = interpolate(p, [0, 0.3, 0.62, 0.9], [0, 1, 1, 0], clampOpts);\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>\n <AbsoluteFill\n style={{\n background: coverColor,\n opacity: cover * coverOpacity,\n pointerEvents: \"none\",\n }}\n />\n <IconField\n p={p}\n placed={placed}\n color={color}\n strokeWidth={strokeWidth}\n flyDistance={flyDistance}\n />\n </AbsoluteFill>\n );\n};\n\nexport function iconScatter(\n props: IconScatterProps = {},\n): TransitionPresentation<IconScatterProps> {\n return {\n component: IconScatterPresentation,\n props,\n };\n}\n","type": "registry:component","target": "components/remocn/icon-scatter.tsx"}diff --git a/registry-artifacts/infinite-bento-pan.json b/registry-artifacts/infinite-bento-pan.jsonindex be372579..1180619a 100644--- a/registry-artifacts/infinite-bento-pan.json+++ b/registry-artifacts/infinite-bento-pan.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/infinite-bento-pan/index.tsx",- "content": "\"use client\";\n\nimport { interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface InfiniteBentoPanProps {\n panSpeed?: number;\n accentColor?: string;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\nconst SUPER_W = 3500;\nconst SUPER_H = 2500;\n\ntype CardKind =\n | \"chart\"\n | \"counter\"\n | \"gradient\"\n | \"code\"\n | \"logo\"\n | \"stat\"\n | \"bars\";\n\ninterface CardDef {\n x: number;\n y: number;\n w: number;\n h: number;\n kind: CardKind;\n hue: number;\n label?: string;\n}\n\nconst CARDS: CardDef[] = [\n { x: 80, y: 80, w: 480, h: 280, kind: \"chart\", hue: 220, label: \"Revenue\" },\n { x: 600, y: 80, w: 280, h: 280, kind: \"counter\", hue: 280, label: \"MRR\" },\n { x: 920, y: 80, w: 360, h: 180, kind: \"gradient\", hue: 200 },\n { x: 1320, y: 80, w: 480, h: 280, kind: \"code\", hue: 0, label: \"deploy.ts\" },\n { x: 1840, y: 80, w: 280, h: 280, kind: \"logo\", hue: 320 },\n { x: 2160, y: 80, w: 380, h: 180, kind: \"stat\", hue: 160, label: \"Uptime\" },\n { x: 2580, y: 80, w: 360, h: 280, kind: \"bars\", hue: 40, label: \"Visits\" },\n { x: 920, y: 300, w: 360, h: 200, kind: \"counter\", hue: 180, label: \"Users\" },\n {\n x: 2160,\n y: 300,\n w: 380,\n h: 200,\n kind: \"chart\",\n hue: 100,\n label: \"Latency\",\n },\n { x: 80, y: 400, w: 280, h: 280, kind: \"gradient\", hue: 340 },\n { x: 400, y: 400, w: 480, h: 280, kind: \"code\", hue: 0, label: \"api.ts\" },\n { x: 1320, y: 420, w: 280, h: 280, kind: \"stat\", hue: 60, label: \"P95\" },\n { x: 1640, y: 420, w: 380, h: 280, kind: \"bars\", hue: 260, label: \"Builds\" },\n { x: 2580, y: 420, w: 360, h: 280, kind: \"logo\", hue: 200 },\n { x: 80, y: 720, w: 480, h: 240, kind: \"chart\", hue: 290, label: \"Errors\" },\n { x: 600, y: 720, w: 280, h: 240, kind: \"stat\", hue: 20, label: \"RPS\" },\n { x: 920, y: 740, w: 380, h: 220, kind: \"gradient\", hue: 240 },\n {\n x: 1320,\n y: 740,\n w: 360,\n h: 220,\n kind: \"counter\",\n hue: 140,\n label: \"Active\",\n },\n { x: 1720, y: 740, w: 480, h: 240, kind: \"code\", hue: 0, label: \"worker.ts\" },\n { x: 2240, y: 740, w: 360, h: 240, kind: \"bars\", hue: 320, label: \"Queue\" },\n { x: 80, y: 1000, w: 360, h: 220, kind: \"logo\", hue: 180 },\n { x: 460, y: 1000, w: 380, h: 220, kind: \"stat\", hue: 80, label: \"Cache\" },\n { x: 880, y: 1000, w: 480, h: 220, kind: \"chart\", hue: 200, label: \"CPU\" },\n {\n x: 1400,\n y: 1000,\n w: 280,\n h: 220,\n kind: \"counter\",\n hue: 360,\n label: \"Jobs\",\n },\n { x: 1720, y: 1020, w: 360, h: 220, kind: \"gradient\", hue: 120 },\n { x: 2120, y: 1020, w: 380, h: 220, kind: \"code\", hue: 0, label: \"db.sql\" },\n { x: 2540, y: 1020, w: 400, h: 220, kind: \"bars\", hue: 280, label: \"Tasks\" },\n { x: 80, y: 1280, w: 480, h: 260, kind: \"code\", hue: 0, label: \"edge.ts\" },\n { x: 600, y: 1280, w: 360, h: 260, kind: \"chart\", hue: 240, label: \"TTFB\" },\n { x: 1000, y: 1280, w: 280, h: 260, kind: \"logo\", hue: 60 },\n { x: 1320, y: 1280, w: 380, h: 260, kind: \"stat\", hue: 200, label: \"Hits\" },\n {\n x: 1740,\n y: 1280,\n w: 360,\n h: 260,\n kind: \"counter\",\n hue: 300,\n label: \"Bytes\",\n },\n { x: 2140, y: 1280, w: 380, h: 260, kind: \"gradient\", hue: 160 },\n { x: 2560, y: 1280, w: 380, h: 260, kind: \"bars\", hue: 0, label: \"Errors\" },\n { x: 80, y: 1600, w: 380, h: 220, kind: \"stat\", hue: 280, label: \"Saved\" },\n { x: 500, y: 1600, w: 480, h: 220, kind: \"chart\", hue: 40, label: \"Net Out\" },\n { x: 1020, y: 1600, w: 360, h: 220, kind: \"code\", hue: 0, label: \"auth.ts\" },\n { x: 1420, y: 1600, w: 280, h: 220, kind: \"logo\", hue: 220 },\n {\n x: 1740,\n y: 1620,\n w: 380,\n h: 220,\n kind: \"counter\",\n hue: 100,\n label: \"Hooks\",\n },\n { x: 2160, y: 1620, w: 360, h: 220, kind: \"bars\", hue: 340, label: \"Runs\" },\n { x: 2560, y: 1620, w: 380, h: 220, kind: \"gradient\", hue: 200 },\n { x: 80, y: 1880, w: 480, h: 240, kind: \"bars\", hue: 180, label: \"Edges\" },\n { x: 600, y: 1880, w: 380, h: 240, kind: \"gradient\", hue: 320 },\n { x: 1020, y: 1880, w: 360, h: 240, kind: \"logo\", hue: 80 },\n {\n x: 1420,\n y: 1880,\n w: 480,\n h: 240,\n kind: \"chart\",\n hue: 260,\n label: \"Tokens\",\n },\n {\n x: 1940,\n y: 1880,\n w: 280,\n h: 240,\n kind: \"counter\",\n hue: 20,\n label: \"Calls\",\n },\n { x: 2260, y: 1880, w: 380, h: 240, kind: \"stat\", hue: 140, label: \"Score\" },\n { x: 2680, y: 1880, w: 260, h: 240, kind: \"code\", hue: 0, label: \"ws.ts\" },\n];\n\nfunction noise(i: number, frame: number) {\n return Math.sin(frame / 30 + i) * 0.5 + 0.5;\n}\n\nfunction ChartCard({ accent, t }: { accent: string; t: number }) {\n const points: string[] = [];\n for (let i = 0; i < 12; i++) {\n const x = (i / 11) * 100;\n const y =\n 50 - (Math.sin(i * 0.7 + t) * 18 + Math.cos(i * 0.4 + t * 0.6) * 8);\n points.push(`${x},${y}`);\n }\n return (\n <svg\n viewBox=\"0 0 100 60\"\n preserveAspectRatio=\"none\"\n style={{ width: \"100%\", height: \"100%\" }}\n >\n <polyline\n points={points.join(\" \")}\n fill=\"none\"\n stroke={accent}\n strokeWidth={1.4}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <polyline\n points={`${points.join(\" \")} 100,60 0,60`}\n fill={`${accent}22`}\n stroke=\"none\"\n />\n </svg>\n );\n}\n\nfunction BarsCard({ accent, t }: { accent: string; t: number }) {\n return (\n <div\n style={{\n display: \"flex\",\n alignItems: \"flex-end\",\n gap: 6,\n height: \"100%\",\n width: \"100%\",\n }}\n >\n {Array.from({ length: 10 }).map((_, i) => {\n const h = 25 + (Math.sin(i * 0.8 + t) * 0.5 + 0.5) * 70;\n return (\n <div\n key={i}\n style={{\n flex: 1,\n height: `${h}%`,\n background: `linear-gradient(180deg, ${accent} 0%, ${accent}55 100%)`,\n borderRadius: 4,\n }}\n />\n );\n })}\n </div>\n );\n}\n\nfunction CodeCard() {\n const lines = [\n { indent: 0, w: 60, c: \"#7dd3fc\" },\n { indent: 1, w: 80, c: \"rgba(255,255,255,0.8)\" },\n { indent: 1, w: 50, c: \"#f9a8d4\" },\n { indent: 2, w: 70, c: \"rgba(255,255,255,0.8)\" },\n { indent: 2, w: 40, c: \"#fde047\" },\n { indent: 1, w: 30, c: \"rgba(255,255,255,0.6)\" },\n { indent: 0, w: 20, c: \"rgba(255,255,255,0.6)\" },\n ];\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: 8,\n fontFamily: \"ui-monospace, SFMono-Regular, Menlo, monospace\",\n }}\n >\n {lines.map((l, i) => (\n <div\n key={i}\n style={{\n marginLeft: l.indent * 14,\n width: `${l.w}%`,\n height: 8,\n borderRadius: 3,\n background: l.c,\n opacity: 0.7,\n }}\n />\n ))}\n </div>\n );\n}\n\nfunction LogoCard({ accent, hue }: { accent: string; hue: number }) {\n return (\n <div\n style={{\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n style={{\n width: 80,\n height: 80,\n borderRadius: 20,\n background: `linear-gradient(135deg, ${accent} 0%, hsl(${hue},70%,55%) 100%)`,\n boxShadow: `0 10px 30px ${accent}44`,\n }}\n />\n </div>\n );\n}\n\nfunction GradientCard({ hue }: { hue: number }) {\n return (\n <div\n style={{\n width: \"100%\",\n height: \"100%\",\n background: `radial-gradient(circle at 30% 30%, hsl(${hue},80%,60%) 0%, hsl(${(hue + 60) % 360},70%,40%) 50%, #0a0a0a 100%)`,\n }}\n />\n );\n}\n\nfunction Card({\n card,\n accent,\n index,\n frame,\n}: {\n card: CardDef;\n accent: string;\n index: number;\n frame: number;\n}) {\n const t = noise(index, frame) * 6.28;\n const baseStyle: React.CSSProperties = {\n position: \"absolute\",\n left: card.x,\n top: card.y,\n width: card.w,\n height: card.h,\n borderRadius: 18,\n background: \"linear-gradient(180deg, #131313 0%, #0a0a0a 100%)\",\n border: \"1px solid rgba(255,255,255,0.07)\",\n overflow: \"hidden\",\n padding: 18,\n color: \"white\",\n display: \"flex\",\n flexDirection: \"column\",\n };\n\n const labelEl = card.label ? (\n <div\n style={{\n fontSize: 12,\n fontWeight: 600,\n color: \"rgba(255,255,255,0.55)\",\n letterSpacing: \"0.04em\",\n textTransform: \"uppercase\",\n marginBottom: 8,\n }}\n >\n {card.label}\n </div>\n ) : null;\n\n if (card.kind === \"chart\") {\n return (\n <div style={baseStyle}>\n {labelEl}\n <div style={{ flex: 1 }}>\n <ChartCard accent={accent} t={t} />\n </div>\n </div>\n );\n }\n if (card.kind === \"bars\") {\n return (\n <div style={baseStyle}>\n {labelEl}\n <div style={{ flex: 1 }}>\n <BarsCard accent={accent} t={t} />\n </div>\n </div>\n );\n }\n if (card.kind === \"counter\") {\n const v = Math.floor(1200 + noise(index, frame) * 800);\n return (\n <div style={baseStyle}>\n {labelEl}\n <div\n style={{\n flex: 1,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n fontSize: 56,\n fontWeight: 700,\n letterSpacing: \"-0.04em\",\n color: \"white\",\n }}\n >\n {v.toLocaleString()}\n </div>\n <div style={{ fontSize: 12, color: accent, fontWeight: 600 }}>\n +{(noise(index + 1, frame) * 12).toFixed(1)}%\n </div>\n </div>\n );\n }\n if (card.kind === \"stat\") {\n const v = (95 + noise(index, frame) * 5).toFixed(2);\n return (\n <div style={baseStyle}>\n {labelEl}\n <div\n style={{\n flex: 1,\n display: \"flex\",\n alignItems: \"center\",\n fontSize: 48,\n fontWeight: 700,\n letterSpacing: \"-0.03em\",\n }}\n >\n {v}\n <span\n style={{\n fontSize: 20,\n color: \"rgba(255,255,255,0.5)\",\n marginLeft: 4,\n }}\n >\n %\n </span>\n </div>\n </div>\n );\n }\n if (card.kind === \"code\") {\n return (\n <div style={baseStyle}>\n {labelEl}\n <div style={{ flex: 1, display: \"flex\", alignItems: \"center\" }}>\n <div style={{ width: \"100%\" }}>\n <CodeCard />\n </div>\n </div>\n </div>\n );\n }\n if (card.kind === \"logo\") {\n return (\n <div style={{ ...baseStyle, padding: 0 }}>\n <LogoCard accent={accent} hue={card.hue} />\n </div>\n );\n }\n // gradient\n return (\n <div style={{ ...baseStyle, padding: 0 }}>\n <GradientCard hue={card.hue} />\n </div>\n );\n}\n\nexport function InfiniteBentoPan({\n panSpeed = 1,\n accentColor = \"#7c3aed\",\n speed = 1,\n className,\n}: InfiniteBentoPanProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames, width, height } = useVideoConfig();\n\n const maxX = SUPER_W - width;\n const maxY = SUPER_H - height;\n\n // diagonal pan: from top-left toward bottom-right\n const t = interpolate(frame, [0, durationInFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const px = t * maxX * Math.min(1, panSpeed);\n const py = t * maxY * Math.min(1, panSpeed);\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"transparent\",\n overflow: \"hidden\",\n fontFamily: FONT_FAMILY,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n width: SUPER_W,\n height: SUPER_H,\n transform: `translate(${-px}px, ${-py}px)`,\n willChange: \"transform\",\n }}\n >\n {CARDS.map((c, i) => (\n <Card key={i} card={c} accent={accentColor} index={i} frame={frame} />\n ))}\n </div>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n background:\n \"radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.85) 80%, #000 100%)\",\n pointerEvents: \"none\",\n }}\n />\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface InfiniteBentoPanProps {\n panSpeed?: number;\n accentColor?: string;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\nconst SUPER_W = 3500;\nconst SUPER_H = 2500;\n\ntype CardKind =\n | \"chart\"\n | \"counter\"\n | \"gradient\"\n | \"code\"\n | \"logo\"\n | \"stat\"\n | \"bars\";\n\ninterface CardDef {\n x: number;\n y: number;\n w: number;\n h: number;\n kind: CardKind;\n hue: number;\n label?: string;\n}\n\nconst CARDS: CardDef[] = [\n { x: 80, y: 80, w: 480, h: 280, kind: \"chart\", hue: 220, label: \"Revenue\" },\n { x: 600, y: 80, w: 280, h: 280, kind: \"counter\", hue: 280, label: \"MRR\" },\n { x: 920, y: 80, w: 360, h: 180, kind: \"gradient\", hue: 200 },\n { x: 1320, y: 80, w: 480, h: 280, kind: \"code\", hue: 0, label: \"deploy.ts\" },\n { x: 1840, y: 80, w: 280, h: 280, kind: \"logo\", hue: 320 },\n { x: 2160, y: 80, w: 380, h: 180, kind: \"stat\", hue: 160, label: \"Uptime\" },\n { x: 2580, y: 80, w: 360, h: 280, kind: \"bars\", hue: 40, label: \"Visits\" },\n { x: 920, y: 300, w: 360, h: 200, kind: \"counter\", hue: 180, label: \"Users\" },\n {\n x: 2160,\n y: 300,\n w: 380,\n h: 200,\n kind: \"chart\",\n hue: 100,\n label: \"Latency\",\n },\n { x: 80, y: 400, w: 280, h: 280, kind: \"gradient\", hue: 340 },\n { x: 400, y: 400, w: 480, h: 280, kind: \"code\", hue: 0, label: \"api.ts\" },\n { x: 1320, y: 420, w: 280, h: 280, kind: \"stat\", hue: 60, label: \"P95\" },\n { x: 1640, y: 420, w: 380, h: 280, kind: \"bars\", hue: 260, label: \"Builds\" },\n { x: 2580, y: 420, w: 360, h: 280, kind: \"logo\", hue: 200 },\n { x: 80, y: 720, w: 480, h: 240, kind: \"chart\", hue: 290, label: \"Errors\" },\n { x: 600, y: 720, w: 280, h: 240, kind: \"stat\", hue: 20, label: \"RPS\" },\n { x: 920, y: 740, w: 380, h: 220, kind: \"gradient\", hue: 240 },\n {\n x: 1320,\n y: 740,\n w: 360,\n h: 220,\n kind: \"counter\",\n hue: 140,\n label: \"Active\",\n },\n { x: 1720, y: 740, w: 480, h: 240, kind: \"code\", hue: 0, label: \"worker.ts\" },\n { x: 2240, y: 740, w: 360, h: 240, kind: \"bars\", hue: 320, label: \"Queue\" },\n { x: 80, y: 1000, w: 360, h: 220, kind: \"logo\", hue: 180 },\n { x: 460, y: 1000, w: 380, h: 220, kind: \"stat\", hue: 80, label: \"Cache\" },\n { x: 880, y: 1000, w: 480, h: 220, kind: \"chart\", hue: 200, label: \"CPU\" },\n {\n x: 1400,\n y: 1000,\n w: 280,\n h: 220,\n kind: \"counter\",\n hue: 360,\n label: \"Jobs\",\n },\n { x: 1720, y: 1020, w: 360, h: 220, kind: \"gradient\", hue: 120 },\n { x: 2120, y: 1020, w: 380, h: 220, kind: \"code\", hue: 0, label: \"db.sql\" },\n { x: 2540, y: 1020, w: 400, h: 220, kind: \"bars\", hue: 280, label: \"Tasks\" },\n { x: 80, y: 1280, w: 480, h: 260, kind: \"code\", hue: 0, label: \"edge.ts\" },\n { x: 600, y: 1280, w: 360, h: 260, kind: \"chart\", hue: 240, label: \"TTFB\" },\n { x: 1000, y: 1280, w: 280, h: 260, kind: \"logo\", hue: 60 },\n { x: 1320, y: 1280, w: 380, h: 260, kind: \"stat\", hue: 200, label: \"Hits\" },\n {\n x: 1740,\n y: 1280,\n w: 360,\n h: 260,\n kind: \"counter\",\n hue: 300,\n label: \"Bytes\",\n },\n { x: 2140, y: 1280, w: 380, h: 260, kind: \"gradient\", hue: 160 },\n { x: 2560, y: 1280, w: 380, h: 260, kind: \"bars\", hue: 0, label: \"Errors\" },\n { x: 80, y: 1600, w: 380, h: 220, kind: \"stat\", hue: 280, label: \"Saved\" },\n { x: 500, y: 1600, w: 480, h: 220, kind: \"chart\", hue: 40, label: \"Net Out\" },\n { x: 1020, y: 1600, w: 360, h: 220, kind: \"code\", hue: 0, label: \"auth.ts\" },\n { x: 1420, y: 1600, w: 280, h: 220, kind: \"logo\", hue: 220 },\n {\n x: 1740,\n y: 1620,\n w: 380,\n h: 220,\n kind: \"counter\",\n hue: 100,\n label: \"Hooks\",\n },\n { x: 2160, y: 1620, w: 360, h: 220, kind: \"bars\", hue: 340, label: \"Runs\" },\n { x: 2560, y: 1620, w: 380, h: 220, kind: \"gradient\", hue: 200 },\n { x: 80, y: 1880, w: 480, h: 240, kind: \"bars\", hue: 180, label: \"Edges\" },\n { x: 600, y: 1880, w: 380, h: 240, kind: \"gradient\", hue: 320 },\n { x: 1020, y: 1880, w: 360, h: 240, kind: \"logo\", hue: 80 },\n {\n x: 1420,\n y: 1880,\n w: 480,\n h: 240,\n kind: \"chart\",\n hue: 260,\n label: \"Tokens\",\n },\n {\n x: 1940,\n y: 1880,\n w: 280,\n h: 240,\n kind: \"counter\",\n hue: 20,\n label: \"Calls\",\n },\n { x: 2260, y: 1880, w: 380, h: 240, kind: \"stat\", hue: 140, label: \"Score\" },\n { x: 2680, y: 1880, w: 260, h: 240, kind: \"code\", hue: 0, label: \"ws.ts\" },\n];\n\nfunction noise(i: number, frame: number) {\n return Math.sin(frame / 30 + i) * 0.5 + 0.5;\n}\n\nfunction ChartCard({ accent, t }: { accent: string; t: number }) {\n const points: string[] = [];\n for (let i = 0; i < 12; i++) {\n const x = (i / 11) * 100;\n const y =\n 50 - (Math.sin(i * 0.7 + t) * 18 + Math.cos(i * 0.4 + t * 0.6) * 8);\n points.push(`${x},${y}`);\n }\n return (\n <svg\n viewBox=\"0 0 100 60\"\n preserveAspectRatio=\"none\"\n style={{ width: \"100%\", height: \"100%\" }}\n >\n <polyline\n points={points.join(\" \")}\n fill=\"none\"\n stroke={accent}\n strokeWidth={1.4}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <polyline\n points={`${points.join(\" \")} 100,60 0,60`}\n fill={`${accent}22`}\n stroke=\"none\"\n />\n </svg>\n );\n}\n\nfunction BarsCard({ accent, t }: { accent: string; t: number }) {\n return (\n <div\n style={{\n display: \"flex\",\n alignItems: \"flex-end\",\n gap: 6,\n height: \"100%\",\n width: \"100%\",\n }}\n >\n {Array.from({ length: 10 }).map((_, i) => {\n const h = 25 + (Math.sin(i * 0.8 + t) * 0.5 + 0.5) * 70;\n return (\n <div\n key={i}\n style={{\n flex: 1,\n height: `${h}%`,\n background: `linear-gradient(180deg, ${accent} 0%, ${accent}55 100%)`,\n borderRadius: 4,\n }}\n />\n );\n })}\n </div>\n );\n}\n\nfunction CodeCard() {\n const lines = [\n { indent: 0, w: 60, c: \"#7dd3fc\" },\n { indent: 1, w: 80, c: \"rgba(255,255,255,0.8)\" },\n { indent: 1, w: 50, c: \"#f9a8d4\" },\n { indent: 2, w: 70, c: \"rgba(255,255,255,0.8)\" },\n { indent: 2, w: 40, c: \"#fde047\" },\n { indent: 1, w: 30, c: \"rgba(255,255,255,0.6)\" },\n { indent: 0, w: 20, c: \"rgba(255,255,255,0.6)\" },\n ];\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: 8,\n fontFamily: \"ui-monospace, SFMono-Regular, Menlo, monospace\",\n }}\n >\n {lines.map((l, i) => (\n <div\n key={i}\n style={{\n marginLeft: l.indent * 14,\n width: `${l.w}%`,\n height: 8,\n borderRadius: 3,\n background: l.c,\n opacity: 0.7,\n }}\n />\n ))}\n </div>\n );\n}\n\nfunction LogoCard({ accent, hue }: { accent: string; hue: number }) {\n return (\n <div\n style={{\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n style={{\n width: 80,\n height: 80,\n borderRadius: 20,\n background: `linear-gradient(135deg, ${accent} 0%, hsl(${hue},70%,55%) 100%)`,\n boxShadow: `0 10px 30px ${accent}44`,\n }}\n />\n </div>\n );\n}\n\nfunction GradientCard({ hue }: { hue: number }) {\n return (\n <div\n style={{\n width: \"100%\",\n height: \"100%\",\n background: `radial-gradient(circle at 30% 30%, hsl(${hue},80%,60%) 0%, hsl(${(hue + 60) % 360},70%,40%) 50%, #0a0a0a 100%)`,\n }}\n />\n );\n}\n\nfunction Card({\n card,\n accent,\n index,\n frame,\n}: {\n card: CardDef;\n accent: string;\n index: number;\n frame: number;\n}) {\n const t = noise(index, frame) * 6.28;\n const baseStyle: React.CSSProperties = {\n position: \"absolute\",\n left: card.x,\n top: card.y,\n width: card.w,\n height: card.h,\n borderRadius: 18,\n background: \"linear-gradient(180deg, #131313 0%, #0a0a0a 100%)\",\n border: \"1px solid rgba(255,255,255,0.07)\",\n overflow: \"hidden\",\n padding: 18,\n color: \"white\",\n display: \"flex\",\n flexDirection: \"column\",\n };\n\n const labelEl = card.label ? (\n <div\n style={{\n fontSize: 12,\n fontWeight: 600,\n color: \"rgba(255,255,255,0.55)\",\n letterSpacing: \"0.04em\",\n textTransform: \"uppercase\",\n marginBottom: 8,\n }}\n >\n {card.label}\n </div>\n ) : null;\n\n if (card.kind === \"chart\") {\n return (\n <div style={baseStyle}>\n {labelEl}\n <div style={{ flex: 1 }}>\n <ChartCard accent={accent} t={t} />\n </div>\n </div>\n );\n }\n if (card.kind === \"bars\") {\n return (\n <div style={baseStyle}>\n {labelEl}\n <div style={{ flex: 1 }}>\n <BarsCard accent={accent} t={t} />\n </div>\n </div>\n );\n }\n if (card.kind === \"counter\") {\n const v = Math.floor(1200 + noise(index, frame) * 800);\n return (\n <div style={baseStyle}>\n {labelEl}\n <div\n style={{\n flex: 1,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n fontSize: 56,\n fontWeight: 700,\n letterSpacing: \"-0.04em\",\n color: \"white\",\n }}\n >\n {v.toLocaleString()}\n </div>\n <div style={{ fontSize: 12, color: accent, fontWeight: 600 }}>\n +{(noise(index + 1, frame) * 12).toFixed(1)}%\n </div>\n </div>\n );\n }\n if (card.kind === \"stat\") {\n const v = (95 + noise(index, frame) * 5).toFixed(2);\n return (\n <div style={baseStyle}>\n {labelEl}\n <div\n style={{\n flex: 1,\n display: \"flex\",\n alignItems: \"center\",\n fontSize: 48,\n fontWeight: 700,\n letterSpacing: \"-0.03em\",\n }}\n >\n {v}\n <span\n style={{\n fontSize: 20,\n color: \"rgba(255,255,255,0.5)\",\n marginLeft: 4,\n }}\n >\n %\n </span>\n </div>\n </div>\n );\n }\n if (card.kind === \"code\") {\n return (\n <div style={baseStyle}>\n {labelEl}\n <div style={{ flex: 1, display: \"flex\", alignItems: \"center\" }}>\n <div style={{ width: \"100%\" }}>\n <CodeCard />\n </div>\n </div>\n </div>\n );\n }\n if (card.kind === \"logo\") {\n return (\n <div style={{ ...baseStyle, padding: 0 }}>\n <LogoCard accent={accent} hue={card.hue} />\n </div>\n );\n }\n // gradient\n return (\n <div style={{ ...baseStyle, padding: 0 }}>\n <GradientCard hue={card.hue} />\n </div>\n );\n}\n\nexport function InfiniteBentoPan({\n panSpeed = 1,\n accentColor = \"#7c3aed\",\n speed = 1,\n className,\n}: InfiniteBentoPanProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames, width, height } = useVideoConfig();\n\n const maxX = SUPER_W - width;\n const maxY = SUPER_H - height;\n\n // diagonal pan: from top-left toward bottom-right\n const t = interpolate(frame, [0, durationInFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const px = t * maxX * Math.min(1, panSpeed);\n const py = t * maxY * Math.min(1, panSpeed);\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"transparent\",\n overflow: \"hidden\",\n fontFamily: FONT_FAMILY,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n width: SUPER_W,\n height: SUPER_H,\n translate: `${-px}px ${-py}px`,\n willChange: \"transform\",\n }}\n >\n {CARDS.map((c, i) => (\n <Card key={i} card={c} accent={accentColor} index={i} frame={frame} />\n ))}\n </div>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n background:\n \"radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.85) 80%, #000 100%)\",\n pointerEvents: \"none\",\n }}\n />\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/infinite-bento-pan.tsx"}diff --git a/registry-artifacts/infinite-marquee.json b/registry-artifacts/infinite-marquee.jsonindex feb96902..219df788 100644--- a/registry-artifacts/infinite-marquee.json+++ b/registry-artifacts/infinite-marquee.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/infinite-marquee/index.tsx",- "content": "\"use client\";\n\nimport { useCurrentFrame } from \"remotion\";\n\nexport interface InfiniteMarqueeProps {\n text?: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n pixelsPerFrame?: number;\n stroke?: boolean;\n strokeColor?: string;\n speed?: number;\n className?: string;\n}\n\nexport function InfiniteMarquee({\n text = \"ship · build · animate · \",\n fontSize = 120,\n color = \"#171717\",\n fontWeight = 900,\n pixelsPerFrame = 4,\n stroke = false,\n strokeColor = \"#171717\",\n speed = 1,\n className,\n}: InfiniteMarqueeProps) {\n const frame = useCurrentFrame() * speed;\n\n const approxWidth = text.length * fontSize * 0.55;\n const offset = -((frame * pixelsPerFrame) % approxWidth);\n\n const spanStyle: React.CSSProperties = {\n fontSize,\n fontWeight,\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n color: stroke ? \"transparent\" : color,\n WebkitTextStroke: stroke ? `2px ${strokeColor}` : undefined,\n paddingRight: \"0.4em\",\n letterSpacing: \"-0.03em\",\n };\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n className={className}\n style={{\n display: \"flex\",\n whiteSpace: \"nowrap\",\n transform: `translateX(${offset}px)`,\n }}\n >\n <span style={spanStyle}>{text}</span>\n <span style={spanStyle}>{text}</span>\n <span style={spanStyle}>{text}</span>\n </div>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { useCurrentFrame } from \"remotion\";\n\nexport interface InfiniteMarqueeProps {\n text?: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n pixelsPerFrame?: number;\n stroke?: boolean;\n strokeColor?: string;\n speed?: number;\n className?: string;\n}\n\nexport function InfiniteMarquee({\n text = \"ship · build · animate · \",\n fontSize = 120,\n color = \"#171717\",\n fontWeight = 900,\n pixelsPerFrame = 4,\n stroke = false,\n strokeColor = \"#171717\",\n speed = 1,\n className,\n}: InfiniteMarqueeProps) {\n const frame = useCurrentFrame() * speed;\n\n const approxWidth = text.length * fontSize * 0.55;\n const offset = -((frame * pixelsPerFrame) % approxWidth);\n\n const spanStyle: React.CSSProperties = {\n fontSize,\n fontWeight,\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n color: stroke ? \"transparent\" : color,\n WebkitTextStroke: stroke ? `2px ${strokeColor}` : undefined,\n paddingRight: \"0.4em\",\n letterSpacing: \"-0.03em\",\n };\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n className={className}\n style={{\n display: \"flex\",\n whiteSpace: \"nowrap\",\n translate: `${offset}px`,\n }}\n >\n <span style={spanStyle}>{text}</span>\n <span style={spanStyle}>{text}</span>\n <span style={spanStyle}>{text}</span>\n </div>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/infinite-marquee.tsx"}diff --git a/registry-artifacts/lens-zoom.json b/registry-artifacts/lens-zoom.jsonindex 836f8c18..4a9af26e 100644--- a/registry-artifacts/lens-zoom.json+++ b/registry-artifacts/lens-zoom.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/lens-zoom/index.tsx",- "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type { ReactNode } from \"react\";\nimport { useId } from \"react\";\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport const LENS_ZOOM_DURATION_IN_FRAMES = 28;\n\nexport const SHAKE_STOPS = [-9 / 11, -3 / 11, 4 / 11, 8 / 11] as const;\n\nexport const LENS_ZOOM_EASE_IN = Easing.bezier(0.54, 0, 0.82, 0.8);\nexport const LENS_ZOOM_EASE_OUT = Easing.bezier(0.18, 0.2, 0.46, 1);\n\nexport type LensZoomProps = {\n inScaleFrom?: number;\n inScaleTo?: number;\n inFovFrom?: number;\n inFovTo?: number;\n inBlurFrom?: number;\n inBlurTo?: number;\n inRotationFrom?: number;\n inRotationTo?: number;\n outScaleFrom?: number;\n outScaleTo?: number;\n outFovFrom?: number;\n outFovTo?: number;\n outBlurFrom?: number;\n outBlurTo?: number;\n outRotationFrom?: number;\n outRotationTo?: number;\n anticipateScale?: number;\n anticipatePortion?: number;\n lensSteps?: number;\n blurSamples?: number;\n blurScaleGain?: number;\n blurFade?: number;\n shakeAmount?: number;\n shakeFrequency?: number;\n shakeCyclesPerUnit?: number;\n shakeTranslatePx?: number;\n shakeRotateDeg?: number;\n redScale?: number;\n greenScale?: number;\n blueScale?: number;\n letterboxAspect?: number;\n width?: number;\n height?: number;\n distortionCenterX?: number;\n distortionCenterY?: number;\n};\n\nfunction hashed(seed: number, i: number): number {\n let t = Math.imul(i ^ seed, 0x27d4eb2d);\n t ^= t >>> 15;\n t = Math.imul(t, 0x85ebca6b);\n t ^= t >>> 13;\n return ((t >>> 0) / 4294967296) * 2 - 1;\n}\n\nfunction valueNoise(seed: number, t: number): number {\n const i = Math.floor(t);\n const f = t - i;\n const u = f * f * (3 - 2 * f);\n return hashed(seed, i) * (1 - u) + hashed(seed, i + 1) * u;\n}\n\nfunction fovHalf(fov: number): number {\n return (Math.min(fov, 178) / 2) * (Math.PI / 180);\n}\n\nfunction lensMagnification(r: number, fov: number): number {\n if (fov < 0.01) return 1;\n const theta = fovHalf(fov);\n const peak = Math.tan(theta) / theta;\n if (r <= 0) return peak;\n const a = r * theta;\n if (a >= Math.PI / 2 - 1e-3) return 1;\n const rSource = Math.tan(a) / Math.tan(theta);\n if (rSource <= 1e-6) return peak;\n return Math.max(1, r / rSource);\n}\n\nfunction radiusForMagnification(target: number, fov: number): number {\n let lo = 0;\n let hi = 1;\n for (let i = 0; i < 24; i++) {\n const mid = (lo + hi) / 2;\n if (lensMagnification(mid, fov) > target) lo = mid;\n else hi = mid;\n }\n return (lo + hi) / 2;\n}\n\nfunction ringClip(\n rInner: number,\n rOuter: number | null,\n w: number,\n h: number,\n cx: number,\n cy: number,\n): string {\n const circle = (r: number, clockwise: boolean) => {\n const s = clockwise ? 1 : 0;\n return `M ${cx + r} ${cy} A ${r} ${r} 0 1 ${s} ${cx - r} ${cy} A ${r} ${r} 0 1 ${s} ${cx + r} ${cy} Z`;\n };\n const outer =\n rOuter === null\n ? `M 0 0 L ${w} 0 L ${w} ${h} L 0 ${h} Z`\n : circle(rOuter, true);\n return rInner > 0 ? `${outer} ${circle(rInner, false)}` : outer;\n}\n\ntype HalfProps = {\n scene: ReactNode;\n scale: number;\n fov: number;\n blur: number;\n rotation: number;\n centerX: number;\n centerY: number;\n width: number;\n height: number;\n lensSteps: number;\n blurSamples: number;\n blurScaleGain: number;\n blurFade: number;\n};\n\nfunction TransitionHalf({\n scene,\n scale,\n fov,\n blur,\n rotation,\n centerX,\n centerY,\n width,\n height,\n lensSteps,\n blurSamples,\n blurScaleGain,\n blurFade,\n}: HalfProps) {\n const origin = `${centerX}px ${centerY}px`;\n const base = scale / 100;\n\n const peak = lensMagnification(0, fov);\n const steps = peak <= 1.001 ? 0 : lensSteps;\n const rings = Array.from({ length: steps }, (_, i) => {\n const s = 1 + ((peak - 1) * (i + 0.5)) / steps;\n return { s, r: radiusForMagnification(s, fov) };\n });\n\n const samples =\n blur <= 0.05 ? 1 : Math.max(2, Math.round((blurSamples * blur) / 60));\n const weights = Array.from(\n { length: samples },\n (_, j) => (1 - j / samples) ** blurFade,\n );\n\n const groups: {\n key: number;\n alpha: number;\n copies: { key: string; clip: string; k: number }[];\n }[] = [];\n let running = 0;\n for (let j = samples - 1; j >= 0; j--) {\n running += weights[j];\n const g =\n samples === 1\n ? 1\n : 1 + (blur / 100) * blurScaleGain * (j / (samples - 1));\n const halfWidth = (width / 2) * g;\n const copies: { key: string; clip: string; k: number }[] = [];\n\n copies.push({\n key: \"base\",\n clip: ringClip(\n rings.length ? rings[0].r * halfWidth : 0,\n null,\n width,\n height,\n centerX,\n centerY,\n ),\n k: g * base,\n });\n\n for (let i = 0; i < rings.length; i++) {\n const inner = i + 1 < rings.length ? rings[i + 1].r * halfWidth : 0;\n copies.push({\n key: `${i}`,\n clip: ringClip(\n inner,\n rings[i].r * halfWidth,\n width,\n height,\n centerX,\n centerY,\n ),\n k: g * rings[i].s * base,\n });\n }\n\n groups.push({ key: j, alpha: weights[j] / running, copies });\n }\n\n return (\n <div style={{ position: \"absolute\", inset: 0 }}>\n {groups.map(({ key, alpha, copies }) => (\n <div\n key={key}\n style={{ position: \"absolute\", inset: 0, opacity: alpha }}\n >\n {copies.map(({ key: ck, clip, k }) => (\n <div\n key={ck}\n style={{\n position: \"absolute\",\n inset: 0,\n clipPath: `path(\"${clip}\")`,\n transform: `rotate(${rotation}deg) scale(${k})`,\n transformOrigin: origin,\n }}\n >\n {scene}\n </div>\n ))}\n </div>\n ))}\n </div>\n );\n}\n\ninterface LensZoomStageProps extends HalfProps {\n shakeEnvelope: number;\n shakeFrequency: number;\n shakeCyclesPerUnit: number;\n shakeTranslatePx: number;\n shakeRotateDeg: number;\n redScale: number;\n greenScale: number;\n blueScale: number;\n letterboxAspect: number;\n}\n\nfunction LensZoomStage({\n shakeEnvelope,\n shakeFrequency,\n shakeCyclesPerUnit,\n shakeTranslatePx,\n shakeRotateDeg,\n redScale,\n greenScale,\n blueScale,\n letterboxAspect,\n ...half\n}: LensZoomStageProps) {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const filterId = useId();\n const { width, height, centerX, centerY } = half;\n\n const core = <TransitionHalf {...half} />;\n\n const split = redScale !== greenScale || blueScale !== greenScale;\n const channels: { id: string; scale: number; matrix: string }[] = [\n {\n id: \"r\",\n scale: redScale,\n matrix: \"1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0\",\n },\n {\n id: \"g\",\n scale: greenScale,\n matrix: \"0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0\",\n },\n {\n id: \"b\",\n scale: blueScale,\n matrix: \"0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0\",\n },\n ];\n\n const composited = split ? (\n <div style={{ position: \"absolute\", inset: 0, backgroundColor: \"#000000\" }}>\n {channels.map((c) => (\n <div\n key={c.id}\n style={{\n position: \"absolute\",\n inset: 0,\n mixBlendMode: \"screen\",\n filter: `url(#${filterId}-${c.id})`,\n transform: `scale(${c.scale})`,\n transformOrigin: `${centerX}px ${centerY}px`,\n }}\n >\n {core}\n </div>\n ))}\n </div>\n ) : (\n core\n );\n\n const t = (frame / fps) * shakeFrequency * shakeCyclesPerUnit;\n const octave = (seed: number) =>\n valueNoise(seed, t) + 0.45 * valueNoise(seed + 977, t * 2.6);\n const shakeX = octave(11) * shakeTranslatePx * shakeEnvelope;\n const shakeY = octave(23) * shakeTranslatePx * shakeEnvelope;\n const shakeR = octave(41) * shakeRotateDeg * shakeEnvelope;\n\n const barHeight =\n letterboxAspect > 0\n ? Math.max(0, (height - width / letterboxAspect) / 2)\n : 0;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n width,\n height,\n overflow: \"hidden\",\n backgroundColor: \"#000000\",\n }}\n >\n {split ? (\n <svg width={0} height={0} style={{ position: \"absolute\" }} aria-hidden>\n <defs>\n {channels.map((c) => (\n <filter\n key={c.id}\n id={`${filterId}-${c.id}`}\n colorInterpolationFilters=\"sRGB\"\n >\n <feColorMatrix type=\"matrix\" values={c.matrix} />\n </filter>\n ))}\n </defs>\n </svg>\n ) : null}\n\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n transform: `translate(${shakeX}px, ${shakeY}px) rotate(${shakeR}deg)`,\n transformOrigin: `${centerX}px ${centerY}px`,\n }}\n >\n {composited}\n </div>\n\n {barHeight > 0 ? (\n <>\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n top: 0,\n height: barHeight,\n backgroundColor: \"#000000\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n bottom: 0,\n height: barHeight,\n backgroundColor: \"#000000\",\n }}\n />\n </>\n ) : null}\n </div>\n );\n}\n\nconst LensZoomPresentation: React.FC<\n TransitionPresentationComponentProps<LensZoomProps>\n> = ({\n children,\n presentationDirection,\n presentationProgress,\n passedProps,\n}) => {\n const config = useVideoConfig();\n const {\n inScaleFrom = 100,\n inScaleTo = 150,\n inFovFrom = 0,\n inFovTo = 160,\n inBlurFrom = 0,\n inBlurTo = 60,\n inRotationFrom = 0,\n inRotationTo = -15,\n\n outScaleFrom = 135,\n outScaleTo = 100,\n outFovFrom = 135,\n outFovTo = 0,\n outBlurFrom = 45,\n outBlurTo = 0,\n outRotationFrom = 345,\n outRotationTo = 360,\n\n anticipateScale = 100,\n anticipatePortion = 0.35,\n\n lensSteps = 9,\n blurSamples = 7,\n blurScaleGain = 1,\n blurFade = 1.5,\n\n shakeAmount = 50,\n shakeFrequency = 1.4,\n shakeCyclesPerUnit = 8,\n shakeTranslatePx = 73,\n shakeRotateDeg = 1.1,\n\n redScale = 1.01,\n greenScale = 1.0,\n blueScale = 0.99,\n\n letterboxAspect = 0,\n\n width = config.width,\n height = config.height,\n distortionCenterX = width / 2,\n distortionCenterY = height / 2,\n } = passedProps;\n\n const exiting = presentationDirection === \"exiting\";\n\n if (exiting ? presentationProgress >= 0.5 : presentationProgress < 0.5)\n return null;\n\n const p = exiting\n ? interpolate(presentationProgress, [0, 0.5], [0, 1], {\n easing: LENS_ZOOM_EASE_IN,\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : interpolate(presentationProgress, [0.5, 1], [0, 1], {\n easing: LENS_ZOOM_EASE_OUT,\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const anticipating =\n exiting && anticipatePortion > 0 && anticipateScale < inScaleFrom;\n\n const pFx =\n anticipating && exiting\n ? interpolate(p, [anticipatePortion, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : p;\n\n const lerp = (from: number, to: number) => from + (to - from) * pFx;\n\n const exitScale = anticipating\n ? interpolate(\n p,\n [0, anticipatePortion, 1],\n [inScaleFrom, anticipateScale, inScaleTo],\n {\n easing: Easing.inOut(Easing.ease),\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n },\n )\n : lerp(inScaleFrom, inScaleTo);\n\n const shakeEnvelope =\n interpolate(\n presentationProgress,\n SHAKE_STOPS.map((s) => 0.5 + s / 2),\n [0, shakeAmount, shakeAmount, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n ) / 100;\n\n return (\n <LensZoomStage\n scene={children}\n scale={exiting ? exitScale : lerp(outScaleFrom, outScaleTo)}\n fov={exiting ? lerp(inFovFrom, inFovTo) : lerp(outFovFrom, outFovTo)}\n blur={exiting ? lerp(inBlurFrom, inBlurTo) : lerp(outBlurFrom, outBlurTo)}\n rotation={\n exiting\n ? lerp(inRotationFrom, inRotationTo)\n : lerp(outRotationFrom, outRotationTo)\n }\n centerX={distortionCenterX}\n centerY={distortionCenterY}\n width={width}\n height={height}\n lensSteps={lensSteps}\n blurSamples={blurSamples}\n blurScaleGain={blurScaleGain}\n blurFade={blurFade}\n shakeEnvelope={shakeEnvelope}\n shakeFrequency={shakeFrequency}\n shakeCyclesPerUnit={shakeCyclesPerUnit}\n shakeTranslatePx={shakeTranslatePx}\n shakeRotateDeg={shakeRotateDeg}\n redScale={redScale}\n greenScale={greenScale}\n blueScale={blueScale}\n letterboxAspect={letterboxAspect}\n />\n );\n};\n\nexport function lensZoom(\n props: LensZoomProps = {},\n): TransitionPresentation<LensZoomProps> {\n return {\n component: LensZoomPresentation,\n props,\n };\n}\n",+ "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type { ReactNode } from \"react\";\nimport { useId } from \"react\";\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport const LENS_ZOOM_DURATION_IN_FRAMES = 28;\n\nexport const SHAKE_STOPS = [-9 / 11, -3 / 11, 4 / 11, 8 / 11] as const;\n\nexport const LENS_ZOOM_EASE_IN = Easing.bezier(0.54, 0, 0.82, 0.8);\nexport const LENS_ZOOM_EASE_OUT = Easing.bezier(0.18, 0.2, 0.46, 1);\n\nexport type LensZoomProps = {\n inScaleFrom?: number;\n inScaleTo?: number;\n inFovFrom?: number;\n inFovTo?: number;\n inBlurFrom?: number;\n inBlurTo?: number;\n inRotationFrom?: number;\n inRotationTo?: number;\n outScaleFrom?: number;\n outScaleTo?: number;\n outFovFrom?: number;\n outFovTo?: number;\n outBlurFrom?: number;\n outBlurTo?: number;\n outRotationFrom?: number;\n outRotationTo?: number;\n anticipateScale?: number;\n anticipatePortion?: number;\n lensSteps?: number;\n blurSamples?: number;\n blurScaleGain?: number;\n blurFade?: number;\n shakeAmount?: number;\n shakeFrequency?: number;\n shakeCyclesPerUnit?: number;\n shakeTranslatePx?: number;\n shakeRotateDeg?: number;\n redScale?: number;\n greenScale?: number;\n blueScale?: number;\n letterboxAspect?: number;\n width?: number;\n height?: number;\n distortionCenterX?: number;\n distortionCenterY?: number;\n};\n\nfunction hashed(seed: number, i: number): number {\n let t = Math.imul(i ^ seed, 0x27d4eb2d);\n t ^= t >>> 15;\n t = Math.imul(t, 0x85ebca6b);\n t ^= t >>> 13;\n return ((t >>> 0) / 4294967296) * 2 - 1;\n}\n\nfunction valueNoise(seed: number, t: number): number {\n const i = Math.floor(t);\n const f = t - i;\n const u = f * f * (3 - 2 * f);\n return hashed(seed, i) * (1 - u) + hashed(seed, i + 1) * u;\n}\n\nfunction fovHalf(fov: number): number {\n return (Math.min(fov, 178) / 2) * (Math.PI / 180);\n}\n\nfunction lensMagnification(r: number, fov: number): number {\n if (fov < 0.01) return 1;\n const theta = fovHalf(fov);\n const peak = Math.tan(theta) / theta;\n if (r <= 0) return peak;\n const a = r * theta;\n if (a >= Math.PI / 2 - 1e-3) return 1;\n const rSource = Math.tan(a) / Math.tan(theta);\n if (rSource <= 1e-6) return peak;\n return Math.max(1, r / rSource);\n}\n\nfunction radiusForMagnification(target: number, fov: number): number {\n let lo = 0;\n let hi = 1;\n for (let i = 0; i < 24; i++) {\n const mid = (lo + hi) / 2;\n if (lensMagnification(mid, fov) > target) lo = mid;\n else hi = mid;\n }\n return (lo + hi) / 2;\n}\n\nfunction ringClip(\n rInner: number,\n rOuter: number | null,\n w: number,\n h: number,\n cx: number,\n cy: number,\n): string {\n const circle = (r: number, clockwise: boolean) => {\n const s = clockwise ? 1 : 0;\n return `M ${cx + r} ${cy} A ${r} ${r} 0 1 ${s} ${cx - r} ${cy} A ${r} ${r} 0 1 ${s} ${cx + r} ${cy} Z`;\n };\n const outer =\n rOuter === null\n ? `M 0 0 L ${w} 0 L ${w} ${h} L 0 ${h} Z`\n : circle(rOuter, true);\n return rInner > 0 ? `${outer} ${circle(rInner, false)}` : outer;\n}\n\ntype HalfProps = {\n scene: ReactNode;\n scale: number;\n fov: number;\n blur: number;\n rotation: number;\n centerX: number;\n centerY: number;\n width: number;\n height: number;\n lensSteps: number;\n blurSamples: number;\n blurScaleGain: number;\n blurFade: number;\n};\n\nfunction TransitionHalf({\n scene,\n scale,\n fov,\n blur,\n rotation,\n centerX,\n centerY,\n width,\n height,\n lensSteps,\n blurSamples,\n blurScaleGain,\n blurFade,\n}: HalfProps) {\n const origin = `${centerX}px ${centerY}px`;\n const base = scale / 100;\n\n const peak = lensMagnification(0, fov);\n const steps = peak <= 1.001 ? 0 : lensSteps;\n const rings = Array.from({ length: steps }, (_, i) => {\n const s = 1 + ((peak - 1) * (i + 0.5)) / steps;\n return { s, r: radiusForMagnification(s, fov) };\n });\n\n const samples =\n blur <= 0.05 ? 1 : Math.max(2, Math.round((blurSamples * blur) / 60));\n const weights = Array.from(\n { length: samples },\n (_, j) => (1 - j / samples) ** blurFade,\n );\n\n const groups: {\n key: number;\n alpha: number;\n copies: { key: string; clip: string; k: number }[];\n }[] = [];\n let running = 0;\n for (let j = samples - 1; j >= 0; j--) {\n running += weights[j];\n const g =\n samples === 1\n ? 1\n : 1 + (blur / 100) * blurScaleGain * (j / (samples - 1));\n const halfWidth = (width / 2) * g;\n const copies: { key: string; clip: string; k: number }[] = [];\n\n copies.push({\n key: \"base\",\n clip: ringClip(\n rings.length ? rings[0].r * halfWidth : 0,\n null,\n width,\n height,\n centerX,\n centerY,\n ),\n k: g * base,\n });\n\n for (let i = 0; i < rings.length; i++) {\n const inner = i + 1 < rings.length ? rings[i + 1].r * halfWidth : 0;\n copies.push({\n key: `${i}`,\n clip: ringClip(\n inner,\n rings[i].r * halfWidth,\n width,\n height,\n centerX,\n centerY,\n ),\n k: g * rings[i].s * base,\n });\n }\n\n groups.push({ key: j, alpha: weights[j] / running, copies });\n }\n\n return (\n <div style={{ position: \"absolute\", inset: 0 }}>\n {groups.map(({ key, alpha, copies }) => (\n <div\n key={key}\n style={{ position: \"absolute\", inset: 0, opacity: alpha }}\n >\n {copies.map(({ key: ck, clip, k }) => (\n <div\n key={ck}\n style={{\n position: \"absolute\",\n inset: 0,\n clipPath: `path(\"${clip}\")`,\n rotate: `${rotation}deg`,\n scale: `${k}`,\n transformOrigin: origin,\n }}\n >\n {scene}\n </div>\n ))}\n </div>\n ))}\n </div>\n );\n}\n\ninterface LensZoomStageProps extends HalfProps {\n shakeEnvelope: number;\n shakeFrequency: number;\n shakeCyclesPerUnit: number;\n shakeTranslatePx: number;\n shakeRotateDeg: number;\n redScale: number;\n greenScale: number;\n blueScale: number;\n letterboxAspect: number;\n}\n\nfunction LensZoomStage({\n shakeEnvelope,\n shakeFrequency,\n shakeCyclesPerUnit,\n shakeTranslatePx,\n shakeRotateDeg,\n redScale,\n greenScale,\n blueScale,\n letterboxAspect,\n ...half\n}: LensZoomStageProps) {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const filterId = useId();\n const { width, height, centerX, centerY } = half;\n\n const core = <TransitionHalf {...half} />;\n\n const split = redScale !== greenScale || blueScale !== greenScale;\n const channels: { id: string; scale: number; matrix: string }[] = [\n {\n id: \"r\",\n scale: redScale,\n matrix: \"1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0\",\n },\n {\n id: \"g\",\n scale: greenScale,\n matrix: \"0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0\",\n },\n {\n id: \"b\",\n scale: blueScale,\n matrix: \"0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0\",\n },\n ];\n\n const composited = split ? (\n <div style={{ position: \"absolute\", inset: 0, backgroundColor: \"#000000\" }}>\n {channels.map((c) => (\n <div\n key={c.id}\n style={{\n position: \"absolute\",\n inset: 0,\n mixBlendMode: \"screen\",\n filter: `url(#${filterId}-${c.id})`,\n scale: `${c.scale}`,\n transformOrigin: `${centerX}px ${centerY}px`,\n }}\n >\n {core}\n </div>\n ))}\n </div>\n ) : (\n core\n );\n\n const t = (frame / fps) * shakeFrequency * shakeCyclesPerUnit;\n const octave = (seed: number) =>\n valueNoise(seed, t) + 0.45 * valueNoise(seed + 977, t * 2.6);\n const shakeX = octave(11) * shakeTranslatePx * shakeEnvelope;\n const shakeY = octave(23) * shakeTranslatePx * shakeEnvelope;\n const shakeR = octave(41) * shakeRotateDeg * shakeEnvelope;\n\n const barHeight =\n letterboxAspect > 0\n ? Math.max(0, (height - width / letterboxAspect) / 2)\n : 0;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n width,\n height,\n overflow: \"hidden\",\n backgroundColor: \"#000000\",\n }}\n >\n {split ? (\n <svg width={0} height={0} style={{ position: \"absolute\" }} aria-hidden>\n <defs>\n {channels.map((c) => (\n <filter\n key={c.id}\n id={`${filterId}-${c.id}`}\n colorInterpolationFilters=\"sRGB\"\n >\n <feColorMatrix type=\"matrix\" values={c.matrix} />\n </filter>\n ))}\n </defs>\n </svg>\n ) : null}\n\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n translate: `${shakeX}px ${shakeY}px`,\n rotate: `${shakeR}deg`,\n transformOrigin: `${centerX}px ${centerY}px`,\n }}\n >\n {composited}\n </div>\n\n {barHeight > 0 ? (\n <>\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n top: 0,\n height: barHeight,\n backgroundColor: \"#000000\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n bottom: 0,\n height: barHeight,\n backgroundColor: \"#000000\",\n }}\n />\n </>\n ) : null}\n </div>\n );\n}\n\nconst LensZoomPresentation: React.FC<\n TransitionPresentationComponentProps<LensZoomProps>\n> = ({\n children,\n presentationDirection,\n presentationProgress,\n passedProps,\n}) => {\n const config = useVideoConfig();\n const {\n inScaleFrom = 100,\n inScaleTo = 150,\n inFovFrom = 0,\n inFovTo = 160,\n inBlurFrom = 0,\n inBlurTo = 60,\n inRotationFrom = 0,\n inRotationTo = -15,\n\n outScaleFrom = 135,\n outScaleTo = 100,\n outFovFrom = 135,\n outFovTo = 0,\n outBlurFrom = 45,\n outBlurTo = 0,\n outRotationFrom = 345,\n outRotationTo = 360,\n\n anticipateScale = 100,\n anticipatePortion = 0.35,\n\n lensSteps = 9,\n blurSamples = 7,\n blurScaleGain = 1,\n blurFade = 1.5,\n\n shakeAmount = 50,\n shakeFrequency = 1.4,\n shakeCyclesPerUnit = 8,\n shakeTranslatePx = 73,\n shakeRotateDeg = 1.1,\n\n redScale = 1.01,\n greenScale = 1.0,\n blueScale = 0.99,\n\n letterboxAspect = 0,\n\n width = config.width,\n height = config.height,\n distortionCenterX = width / 2,\n distortionCenterY = height / 2,\n } = passedProps;\n\n const exiting = presentationDirection === \"exiting\";\n\n if (exiting ? presentationProgress >= 0.5 : presentationProgress < 0.5)\n return null;\n\n const p = exiting\n ? interpolate(presentationProgress, [0, 0.5], [0, 1], {\n easing: LENS_ZOOM_EASE_IN,\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : interpolate(presentationProgress, [0.5, 1], [0, 1], {\n easing: LENS_ZOOM_EASE_OUT,\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const anticipating =\n exiting && anticipatePortion > 0 && anticipateScale < inScaleFrom;\n\n const pFx =\n anticipating && exiting\n ? interpolate(p, [anticipatePortion, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : p;\n\n const lerp = (from: number, to: number) => from + (to - from) * pFx;\n\n const exitScale = anticipating\n ? interpolate(\n p,\n [0, anticipatePortion, 1],\n [inScaleFrom, anticipateScale, inScaleTo],\n {\n easing: Easing.inOut(Easing.ease),\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n },\n )\n : lerp(inScaleFrom, inScaleTo);\n\n const shakeEnvelope =\n interpolate(\n presentationProgress,\n SHAKE_STOPS.map((s) => 0.5 + s / 2),\n [0, shakeAmount, shakeAmount, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n ) / 100;\n\n return (\n <LensZoomStage\n scene={children}\n scale={exiting ? exitScale : lerp(outScaleFrom, outScaleTo)}\n fov={exiting ? lerp(inFovFrom, inFovTo) : lerp(outFovFrom, outFovTo)}\n blur={exiting ? lerp(inBlurFrom, inBlurTo) : lerp(outBlurFrom, outBlurTo)}\n rotation={\n exiting\n ? lerp(inRotationFrom, inRotationTo)\n : lerp(outRotationFrom, outRotationTo)\n }\n centerX={distortionCenterX}\n centerY={distortionCenterY}\n width={width}\n height={height}\n lensSteps={lensSteps}\n blurSamples={blurSamples}\n blurScaleGain={blurScaleGain}\n blurFade={blurFade}\n shakeEnvelope={shakeEnvelope}\n shakeFrequency={shakeFrequency}\n shakeCyclesPerUnit={shakeCyclesPerUnit}\n shakeTranslatePx={shakeTranslatePx}\n shakeRotateDeg={shakeRotateDeg}\n redScale={redScale}\n greenScale={greenScale}\n blueScale={blueScale}\n letterboxAspect={letterboxAspect}\n />\n );\n};\n\nexport function lensZoom(\n props: LensZoomProps = {},\n): TransitionPresentation<LensZoomProps> {\n return {\n component: LensZoomPresentation,\n props,\n };\n}\n","type": "registry:component","target": "components/remocn/lens-zoom.tsx"}diff --git a/registry-artifacts/line-by-line-slide.json b/registry-artifacts/line-by-line-slide.jsonindex 8be0859d..bb895a4a 100644--- a/registry-artifacts/line-by-line-slide.json+++ b/registry-artifacts/line-by-line-slide.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/line-by-line-slide/index.tsx",- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface LineByLineSlideProps {\n text: string;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function LineByLineSlide({\n text,\n distance = 48,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: LineByLineSlideProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const lines = text.split(\"\\n\");\n\n const enterDur = 27;\n const enterTravel = 14;\n const exitDur = 18;\n const exitTravelFrom = 8;\n const enterStagger = 4;\n const exitStagger = 2;\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterEnd = enterDur + (lines.length - 1) * enterStagger;\n const exitStart = Math.max(\n enterEnd,\n durationInFrames - exitDur - (lines.length - 1) * exitStagger,\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n lineHeight: 1.1,\n textAlign: \"left\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {lines.map((line, i) => {\n const enterLocal = frame - i * enterStagger;\n const exitLocal = frame - exitStart - i * exitStagger;\n\n const enterP = interpolate(enterLocal, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(exitLocal, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const xEnter = interpolate(\n enterLocal,\n [0, enterTravel],\n [-distance, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n },\n );\n\n const xExit = interpolate(\n exitLocal,\n [exitTravelFrom, exitDur],\n [0, distance],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n },\n );\n\n const x = xEnter + xExit;\n\n return (\n <span\n key={i}\n style={{\n display: \"block\",\n transformOrigin: \"0% 50%\",\n opacity,\n transform: `translateX(${x}px)`,\n }}\n >\n {line}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface LineByLineSlideProps {\n text: string;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function LineByLineSlide({\n text,\n distance = 48,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: LineByLineSlideProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const lines = text.split(\"\\n\");\n\n const enterDur = 27;\n const enterTravel = 14;\n const exitDur = 18;\n const exitTravelFrom = 8;\n const enterStagger = 4;\n const exitStagger = 2;\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterEnd = enterDur + (lines.length - 1) * enterStagger;\n const exitStart = Math.max(\n enterEnd,\n durationInFrames - exitDur - (lines.length - 1) * exitStagger,\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n lineHeight: 1.1,\n textAlign: \"left\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {lines.map((line, i) => {\n const enterLocal = frame - i * enterStagger;\n const exitLocal = frame - exitStart - i * exitStagger;\n\n const enterP = interpolate(enterLocal, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(exitLocal, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const xEnter = interpolate(\n enterLocal,\n [0, enterTravel],\n [-distance, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n },\n );\n\n const xExit = interpolate(\n exitLocal,\n [exitTravelFrom, exitDur],\n [0, distance],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n },\n );\n\n const x = xEnter + xExit;\n\n return (\n <span\n key={i}\n style={{\n display: \"block\",\n transformOrigin: \"0% 50%\",\n opacity,\n translate: `${x}px`,\n }}\n >\n {line}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/line-by-line-slide.tsx"}diff --git a/registry-artifacts/logo-enter.json b/registry-artifacts/logo-enter.jsonindex cd4b83be..62674955 100644--- a/registry-artifacts/logo-enter.json+++ b/registry-artifacts/logo-enter.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/logo-enter/index.tsx",- "content": "\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport {\n AbsoluteFill,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nexport interface Logo {\n mark: ReactNode;\n bg?: string;\n}\n\nexport interface LogoEnterProps {\n logos?: Logo[];\n diameter?: number;\n overlap?: number;\n ringColor?: string;\n orientation?: \"horizontal\" | \"vertical\";\n stagger?: number;\n speed?: number;\n}\n\nconst ClaudeMark = () => (\n <svg\n width=\"100%\"\n height=\"100%\"\n preserveAspectRatio=\"xMidYMid\"\n viewBox=\"0 0 256 257\"\n >\n <path\n fill=\"#D97757\"\n d=\"m50.228 170.321 50.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0 125.796l.583-3.759 5.12-3.434 7.324.648 16.202 1.101 24.304 1.685 17.629 1.037 26.118 2.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758 7-7.713 9.397.649 2.398.648 9.527 7.323 20.35 15.75L94.817 91.9l3.889 3.24 1.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42 0 82.05 1.426l4.472 3.888 6.61 15.101 10.694 23.786 16.591 32.34 4.861 9.592 2.592 8.879.973 2.722h1.685v-1.556l1.36-18.211 2.528-22.36 2.463-28.776.843-8.1 4.018-9.722 7.971-5.25 6.222 2.981 5.12 7.324-.713 4.73-3.046 19.768-5.962 30.98-3.889 20.739h2.268l2.593-2.593 10.499-13.934 17.628-22.036 7.778-8.749 9.073-9.657 5.833-4.601h11.018l8.1 12.055-3.628 12.443-11.342 14.388-9.398 12.184-13.48 18.147-8.426 14.518.778 1.166 2.01-.194 30.46-6.481 16.462-2.982 19.637-3.37 8.88 4.148.971 4.213-3.5 8.62-20.998 5.184-24.628 4.926-36.682 8.685-.454.324.519.648 16.526 1.555 7.065.389h17.304l32.21 2.398 8.426 5.574 5.055 6.805-.843 5.184-12.962 6.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666 11.406 21.387 19.314 26.767 24.887 1.36 6.157-3.434 4.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73 6.935 25.017 37.59 1.296 11.536-1.814 3.76-6.481 2.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194 77.448-3.37 3.953-7.778 2.981-6.48-4.925-3.436-7.972 3.435-15.749 4.148-20.544 3.37-16.333 3.046-20.285 1.815-6.74-.13-.454-1.49.194-15.295 20.999-23.267 31.433-18.406 19.702-4.407 1.75-7.648-3.954.713-7.064 4.277-6.286 25.47-32.405 15.36-20.092 9.917-11.6-.065-1.686h-.583L44.07 198.125l-12.055 1.555-5.185-4.86.648-7.972 2.463-2.593 20.35-13.999-.064.065Z\"\n />\n </svg>\n);\n\nconst CodexMark = () => (\n <svg\n width=\"100%\"\n height=\"100%\"\n fill=\"#fff\"\n fillRule=\"evenodd\"\n viewBox=\"0 0 24 24\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z\"\n />\n </svg>\n);\n\nconst CursorMark = () => (\n <svg width=\"100%\" height=\"100%\" fill=\"#fff\" viewBox=\"0 0 466.73 532.09\">\n <path d=\"M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z\" />\n </svg>\n);\n\nconst GrokMark = () => (\n <svg width=\"100%\" height=\"100%\" fill=\"none\" viewBox=\"0 0 1024 1024\">\n <path\n fill=\"#fff\"\n d=\"M395.479 633.828L735.91 381.105C752.599 368.715 776.454 373.548 784.406 392.792C826.26 494.285 807.561 616.253 724.288 699.996C641.016 783.739 525.151 802.104 419.247 760.277L303.556 814.143C469.49 928.202 670.987 899.995 796.901 773.282C896.776 672.843 927.708 535.937 898.785 412.476L899.047 412.739C857.105 231.37 909.358 158.874 1016.4 10.6326C1018.93 7.11771 1021.47 3.60279 1024 0L883.144 141.651V141.212L395.392 633.916\"\n />\n <path\n fill=\"#fff\"\n d=\"M325.226 695.251C206.128 580.84 226.662 403.776 328.285 301.668C403.431 226.097 526.549 195.254 634.026 240.596L749.454 186.994C728.657 171.88 702.007 155.623 671.424 144.2C533.19 86.9942 367.693 115.465 255.323 228.382C147.234 337.081 113.244 504.215 171.613 646.833C215.216 753.423 143.739 828.818 71.7385 904.916C46.2237 931.893 20.6216 958.87 0 987.429L325.139 695.339\"\n />\n </svg>\n);\n\nexport const SAMPLE_LOGOS: Logo[] = [\n { mark: <ClaudeMark />, bg: \"#F0EEE6\" },\n { mark: <CodexMark />, bg: \"#0A0A0A\" },\n { mark: <CursorMark />, bg: \"#0A0A0A\" },\n { mark: <GrokMark />, bg: \"#0A0A0A\" },\n];\n\nexport function LogoEnter({\n logos = SAMPLE_LOGOS,\n diameter = 118,\n overlap = 38,\n ringColor = \"#fff\",\n orientation = \"horizontal\",\n stagger = 7,\n speed = 1,\n}: LogoEnterProps) {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const isVertical = orientation === \"vertical\";\n\n return (\n <AbsoluteFill\n style={{\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n flexDirection: isVertical ? \"column\" : \"row\",\n }}\n >\n {logos.map(({ mark, bg }, i) => {\n const s = spring({\n fps,\n frame: frame * speed - i * stagger,\n config: { damping: 13, stiffness: 130, mass: 0.8 },\n });\n const scale = interpolate(s, [0, 1], [0.5, 1]);\n const offset = interpolate(s, [0, 1], [22, 0]);\n const lead = i === 0 ? 0 : -overlap;\n return (\n <div\n key={i}\n style={{\n width: diameter,\n height: diameter,\n borderRadius: \"50%\",\n marginLeft: isVertical ? 0 : lead,\n marginTop: isVertical ? lead : 0,\n zIndex: logos.length - i,\n background: bg,\n border: `5px solid ${ringColor}`,\n boxShadow: \"0 20px 48px rgba(0,0,0,0.5)\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n opacity: s,\n transform: isVertical\n ? `translateX(${offset}px) scale(${scale})`\n : `translateY(${offset}px) scale(${scale})`,\n }}\n >\n <div\n style={{\n width: diameter * 0.52,\n height: diameter * 0.52,\n display: \"flex\",\n }}\n >\n {mark}\n </div>\n </div>\n );\n })}\n </div>\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport {\n AbsoluteFill,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nexport interface Logo {\n mark: ReactNode;\n bg?: string;\n}\n\nexport interface LogoEnterProps {\n logos?: Logo[];\n diameter?: number;\n overlap?: number;\n ringColor?: string;\n orientation?: \"horizontal\" | \"vertical\";\n stagger?: number;\n speed?: number;\n}\n\nconst ClaudeMark = () => (\n <svg\n width=\"100%\"\n height=\"100%\"\n preserveAspectRatio=\"xMidYMid\"\n viewBox=\"0 0 256 257\"\n >\n <path\n fill=\"#D97757\"\n d=\"m50.228 170.321 50.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0 125.796l.583-3.759 5.12-3.434 7.324.648 16.202 1.101 24.304 1.685 17.629 1.037 26.118 2.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758 7-7.713 9.397.649 2.398.648 9.527 7.323 20.35 15.75L94.817 91.9l3.889 3.24 1.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42 0 82.05 1.426l4.472 3.888 6.61 15.101 10.694 23.786 16.591 32.34 4.861 9.592 2.592 8.879.973 2.722h1.685v-1.556l1.36-18.211 2.528-22.36 2.463-28.776.843-8.1 4.018-9.722 7.971-5.25 6.222 2.981 5.12 7.324-.713 4.73-3.046 19.768-5.962 30.98-3.889 20.739h2.268l2.593-2.593 10.499-13.934 17.628-22.036 7.778-8.749 9.073-9.657 5.833-4.601h11.018l8.1 12.055-3.628 12.443-11.342 14.388-9.398 12.184-13.48 18.147-8.426 14.518.778 1.166 2.01-.194 30.46-6.481 16.462-2.982 19.637-3.37 8.88 4.148.971 4.213-3.5 8.62-20.998 5.184-24.628 4.926-36.682 8.685-.454.324.519.648 16.526 1.555 7.065.389h17.304l32.21 2.398 8.426 5.574 5.055 6.805-.843 5.184-12.962 6.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666 11.406 21.387 19.314 26.767 24.887 1.36 6.157-3.434 4.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73 6.935 25.017 37.59 1.296 11.536-1.814 3.76-6.481 2.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194 77.448-3.37 3.953-7.778 2.981-6.48-4.925-3.436-7.972 3.435-15.749 4.148-20.544 3.37-16.333 3.046-20.285 1.815-6.74-.13-.454-1.49.194-15.295 20.999-23.267 31.433-18.406 19.702-4.407 1.75-7.648-3.954.713-7.064 4.277-6.286 25.47-32.405 15.36-20.092 9.917-11.6-.065-1.686h-.583L44.07 198.125l-12.055 1.555-5.185-4.86.648-7.972 2.463-2.593 20.35-13.999-.064.065Z\"\n />\n </svg>\n);\n\nconst CodexMark = () => (\n <svg\n width=\"100%\"\n height=\"100%\"\n fill=\"#fff\"\n fillRule=\"evenodd\"\n viewBox=\"0 0 24 24\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z\"\n />\n </svg>\n);\n\nconst CursorMark = () => (\n <svg width=\"100%\" height=\"100%\" fill=\"#fff\" viewBox=\"0 0 466.73 532.09\">\n <path d=\"M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z\" />\n </svg>\n);\n\nconst GrokMark = () => (\n <svg width=\"100%\" height=\"100%\" fill=\"none\" viewBox=\"0 0 1024 1024\">\n <path\n fill=\"#fff\"\n d=\"M395.479 633.828L735.91 381.105C752.599 368.715 776.454 373.548 784.406 392.792C826.26 494.285 807.561 616.253 724.288 699.996C641.016 783.739 525.151 802.104 419.247 760.277L303.556 814.143C469.49 928.202 670.987 899.995 796.901 773.282C896.776 672.843 927.708 535.937 898.785 412.476L899.047 412.739C857.105 231.37 909.358 158.874 1016.4 10.6326C1018.93 7.11771 1021.47 3.60279 1024 0L883.144 141.651V141.212L395.392 633.916\"\n />\n <path\n fill=\"#fff\"\n d=\"M325.226 695.251C206.128 580.84 226.662 403.776 328.285 301.668C403.431 226.097 526.549 195.254 634.026 240.596L749.454 186.994C728.657 171.88 702.007 155.623 671.424 144.2C533.19 86.9942 367.693 115.465 255.323 228.382C147.234 337.081 113.244 504.215 171.613 646.833C215.216 753.423 143.739 828.818 71.7385 904.916C46.2237 931.893 20.6216 958.87 0 987.429L325.139 695.339\"\n />\n </svg>\n);\n\nexport const SAMPLE_LOGOS: Logo[] = [\n { mark: <ClaudeMark />, bg: \"#F0EEE6\" },\n { mark: <CodexMark />, bg: \"#0A0A0A\" },\n { mark: <CursorMark />, bg: \"#0A0A0A\" },\n { mark: <GrokMark />, bg: \"#0A0A0A\" },\n];\n\nexport function LogoEnter({\n logos = SAMPLE_LOGOS,\n diameter = 118,\n overlap = 38,\n ringColor = \"#fff\",\n orientation = \"horizontal\",\n stagger = 7,\n speed = 1,\n}: LogoEnterProps) {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const isVertical = orientation === \"vertical\";\n\n return (\n <AbsoluteFill\n style={{\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n flexDirection: isVertical ? \"column\" : \"row\",\n }}\n >\n {logos.map(({ mark, bg }, i) => {\n const s = spring({\n fps,\n frame: frame * speed - i * stagger,\n config: { damping: 13, stiffness: 130, mass: 0.8 },\n });\n const scale = interpolate(s, [0, 1], [0.5, 1]);\n const offset = interpolate(s, [0, 1], [22, 0]);\n const lead = i === 0 ? 0 : -overlap;\n return (\n <div\n key={i}\n style={{\n width: diameter,\n height: diameter,\n borderRadius: \"50%\",\n marginLeft: isVertical ? 0 : lead,\n marginTop: isVertical ? lead : 0,\n zIndex: logos.length - i,\n background: bg,\n border: `5px solid ${ringColor}`,\n boxShadow: \"0 20px 48px rgba(0,0,0,0.5)\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n opacity: s,\n translate: isVertical ? `${offset}px` : `0 ${offset}px`,\n scale: `${scale}`,\n }}\n >\n <div\n style={{\n width: diameter * 0.52,\n height: diameter * 0.52,\n display: \"flex\",\n }}\n >\n {mark}\n </div>\n </div>\n );\n })}\n </div>\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/logo-enter.tsx"}diff --git a/registry-artifacts/marker-highlight.json b/registry-artifacts/marker-highlight.jsonindex b0a7e9ed..da06a780 100644--- a/registry-artifacts/marker-highlight.json+++ b/registry-artifacts/marker-highlight.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/marker-highlight/index.tsx",- "content": "\"use client\";\n\nimport {\n interpolate,\n interpolateColors,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nexport interface MarkerHighlightProps {\n before?: string;\n highlight: string;\n after?: string;\n markerColor?: string;\n baseColor?: string;\n highlightedTextColor?: string;\n fontSize?: number;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function MarkerHighlight({\n before = \"\",\n highlight,\n after = \"\",\n markerColor = \"#facc15\",\n baseColor = \"#171717\",\n highlightedTextColor = \"#171717\",\n fontSize = 72,\n fontWeight = 600,\n speed = 1,\n className,\n}: MarkerHighlightProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const markerScale = spring({\n frame: frame - 15,\n fps,\n config: { damping: 14 },\n });\n\n const textColor = interpolateColors(\n interpolate(markerScale, [0.5, 0.8], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n }),\n [0, 1],\n [baseColor, highlightedTextColor],\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"white\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color: baseColor,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {before}\n <span style={{ position: \"relative\", display: \"inline-block\" }}>\n <span\n aria-hidden\n style={{\n position: \"absolute\",\n inset: \"0 -0.1em\",\n background: markerColor,\n transformOrigin: \"left center\",\n transform: `scaleX(${markerScale})`,\n zIndex: 0,\n }}\n />\n <span style={{ position: \"relative\", zIndex: 1, color: textColor }}>\n {highlight}\n </span>\n </span>\n {after}\n </span>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport {\n interpolate,\n interpolateColors,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nexport interface MarkerHighlightProps {\n before?: string;\n highlight: string;\n after?: string;\n markerColor?: string;\n baseColor?: string;\n highlightedTextColor?: string;\n fontSize?: number;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function MarkerHighlight({\n before = \"\",\n highlight,\n after = \"\",\n markerColor = \"#facc15\",\n baseColor = \"#171717\",\n highlightedTextColor = \"#171717\",\n fontSize = 72,\n fontWeight = 600,\n speed = 1,\n className,\n}: MarkerHighlightProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const markerScale = spring({\n frame: frame - 15,\n fps,\n config: { damping: 14 },\n });\n\n const textColor = interpolateColors(\n interpolate(markerScale, [0.5, 0.8], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n }),\n [0, 1],\n [baseColor, highlightedTextColor],\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"white\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color: baseColor,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {before}\n <span style={{ position: \"relative\", display: \"inline-block\" }}>\n <span\n aria-hidden\n style={{\n position: \"absolute\",\n inset: \"0 -0.1em\",\n background: markerColor,\n transformOrigin: \"left center\",\n scale: `${markerScale} 1`,\n zIndex: 0,\n }}\n />\n <span style={{ position: \"relative\", zIndex: 1, color: textColor }}>\n {highlight}\n </span>\n </span>\n {after}\n </span>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/marker-highlight.tsx"}diff --git a/registry-artifacts/mask-reveal-up.json b/registry-artifacts/mask-reveal-up.jsonindex e984ef1f..11d82da4 100644--- a/registry-artifacts/mask-reveal-up.json+++ b/registry-artifacts/mask-reveal-up.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/mask-reveal-up/index.tsx",- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface MaskRevealUpProps {\n text: string;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function MaskRevealUp({\n text,\n distance = 30,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: MaskRevealUpProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const lines = text.split(\"\\n\");\n\n const enterDur = 23;\n const enterTravel = 11;\n const exitDur = 16;\n const exitTravelFrom = 8;\n const enterStagger = 3;\n const exitStagger = 2;\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterEnd = enterDur + (lines.length - 1) * enterStagger;\n const exitStart = Math.max(\n enterEnd,\n durationInFrames - exitDur - (lines.length - 1) * exitStagger,\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n lineHeight: 1.1,\n textAlign: \"center\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {lines.map((line, i) => {\n const enterLocal = frame - i * enterStagger;\n const exitLocal = frame - exitStart - i * exitStagger;\n\n const enterP = interpolate(enterLocal, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(exitLocal, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const yEnter = interpolate(\n enterLocal,\n [0, enterTravel],\n [distance, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n },\n );\n\n const yExit = interpolate(\n exitLocal,\n [exitTravelFrom, exitDur],\n [0, -22],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n },\n );\n\n const y = yEnter + yExit;\n\n const blurEnter = interpolate(enterLocal, [0, enterDur], [6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const blurExit = interpolate(exitLocal, [0, exitDur], [0, 6], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const blur = blurEnter + blurExit;\n\n return (\n <span\n key={i}\n style={{\n display: \"block\",\n transformOrigin: \"50% 50%\",\n opacity,\n transform: `translateY(${y}px)`,\n filter: `blur(${blur}px)`,\n }}\n >\n {line}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface MaskRevealUpProps {\n text: string;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function MaskRevealUp({\n text,\n distance = 30,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: MaskRevealUpProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const lines = text.split(\"\\n\");\n\n const enterDur = 23;\n const enterTravel = 11;\n const exitDur = 16;\n const exitTravelFrom = 8;\n const enterStagger = 3;\n const exitStagger = 2;\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterEnd = enterDur + (lines.length - 1) * enterStagger;\n const exitStart = Math.max(\n enterEnd,\n durationInFrames - exitDur - (lines.length - 1) * exitStagger,\n );\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n lineHeight: 1.1,\n textAlign: \"center\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {lines.map((line, i) => {\n const enterLocal = frame - i * enterStagger;\n const exitLocal = frame - exitStart - i * exitStagger;\n\n const enterP = interpolate(enterLocal, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(exitLocal, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const yEnter = interpolate(\n enterLocal,\n [0, enterTravel],\n [distance, 0],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n },\n );\n\n const yExit = interpolate(\n exitLocal,\n [exitTravelFrom, exitDur],\n [0, -22],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n },\n );\n\n const y = yEnter + yExit;\n\n const blurEnter = interpolate(enterLocal, [0, enterDur], [6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const blurExit = interpolate(exitLocal, [0, exitDur], [0, 6], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const blur = blurEnter + blurExit;\n\n return (\n <span\n key={i}\n style={{\n display: \"block\",\n transformOrigin: \"50% 50%\",\n opacity,\n translate: `0 ${y}px`,\n filter: `blur(${blur}px)`,\n }}\n >\n {line}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/mask-reveal-up.tsx"}diff --git a/registry-artifacts/micro-scale-fade.json b/registry-artifacts/micro-scale-fade.jsonindex 4c2782f3..d38efee8 100644--- a/registry-artifacts/micro-scale-fade.json+++ b/registry-artifacts/micro-scale-fade.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/micro-scale-fade/index.tsx",- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface MicroScaleFadeProps {\n text: string;\n scaleFrom?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function MicroScaleFade({\n text,\n scaleFrom = 0.96,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: MicroScaleFadeProps) {\n const frame = useCurrentFrame() * speed;\n const easing = Easing.bezier(0.32, 0.72, 0, 1);\n\n const opacity = interpolate(frame, [0, 18], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n\n const scale = interpolate(frame, [0, 18], [scaleFrom, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity,\n transform: `scale(${scale})`,\n }}\n >\n {text}\n </span>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface MicroScaleFadeProps {\n text: string;\n scaleFrom?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function MicroScaleFade({\n text,\n scaleFrom = 0.96,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: MicroScaleFadeProps) {\n const frame = useCurrentFrame() * speed;\n const easing = Easing.bezier(0.32, 0.72, 0, 1);\n\n const opacity = interpolate(frame, [0, 18], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n\n const scale = interpolate(frame, [0, 18], [scaleFrom, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity,\n scale: `${scale}`,\n }}\n >\n {text}\n </span>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/micro-scale-fade.tsx"}diff --git a/registry-artifacts/number-wheel.json b/registry-artifacts/number-wheel.jsonindex f953e84b..58d49c15 100644--- a/registry-artifacts/number-wheel.json+++ b/registry-artifacts/number-wheel.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/number-wheel/index.tsx",- "content": "\"use client\";\n\nimport { loadFont as loadMono } from \"@remotion/google-fonts/JetBrainsMono\";\nimport type React from \"react\";\nimport {\n AbsoluteFill,\n Easing,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nconst { fontFamily: MONO_FAMILY } = loadMono();\n\nexport interface NumberWheelProps {\n from?: number;\n to?: number;\n fontSize?: number;\n color?: string;\n speed?: number;\n}\n\nexport interface OdometerProps {\n current: number;\n fontSize: number;\n color: string;\n}\n\nconst WHEEL_ROLL_START = 0.9;\nconst SPRING_FRAMES = 30;\nconst SPRING_CONFIG = { damping: 200, stiffness: 100, mass: 1 } as const;\nconst COUNT_PORTION = 0.8;\n\nfunction rollFraction(current: number, place: number): number {\n const v = current / 10 ** place;\n const frac = v - Math.floor(v);\n if (frac <= WHEEL_ROLL_START) return 0;\n return (frac - WHEEL_ROLL_START) / (1 - WHEEL_ROLL_START);\n}\n\nfunction computeWheel(\n current: number,\n place: number,\n springEased: (t: number) => number,\n): number {\n if (current <= 0) return 0;\n if (place === 0) return current % 10;\n\n const digit = Math.floor(current / 10 ** place) % 10;\n const t = rollFraction(current, place);\n if (t <= 0) return digit;\n return digit + springEased(t);\n}\n\nfunction placeOpacity(current: number, place: number): number {\n if (place === 0) return 1;\n const threshold = 10 ** place;\n return interpolate(current, [threshold * 0.9, threshold], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n}\n\nfunction DigitColumn({\n value,\n fontSize,\n opacity,\n}: {\n value: number;\n fontSize: number;\n opacity: number;\n}) {\n const cellHeight = fontSize * 1.1;\n return (\n <span\n style={{\n display: \"inline-block\",\n overflow: \"hidden\",\n height: cellHeight,\n width: \"0.62em\",\n verticalAlign: \"top\",\n textAlign: \"center\",\n opacity,\n }}\n >\n <span\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n transform: `translateY(${-value * cellHeight}px)`,\n }}\n >\n {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0].map((d, i) => (\n <span\n key={i}\n style={{ height: cellHeight, lineHeight: `${cellHeight}px` }}\n >\n {d}\n </span>\n ))}\n </span>\n </span>\n );\n}\n\nfunction OdometerColumns({\n current,\n templateValue,\n fontSize,\n color,\n fps,\n}: {\n current: number;\n templateValue: number;\n fontSize: number;\n color: string;\n fps: number;\n}) {\n const springAtEnd = spring({\n frame: SPRING_FRAMES,\n fps,\n config: SPRING_CONFIG,\n });\n const springEased = (t: number) =>\n spring({ frame: t * SPRING_FRAMES, fps, config: SPRING_CONFIG }) /\n springAtEnd;\n\n const template = templateValue.toLocaleString(\"en-US\");\n\n const cells: React.ReactNode[] = [];\n let place = 0;\n for (let i = template.length - 1; i >= 0; i--) {\n const ch = template[i];\n if (ch === \",\") {\n cells.unshift(\n <span\n key={`c${i}`}\n style={{\n display: \"inline-block\",\n width: \"0.32em\",\n color: \"currentColor\",\n fontSize: \"0.85em\",\n textAlign: \"center\",\n opacity: placeOpacity(current, place),\n }}\n >\n ,\n </span>,\n );\n } else {\n const wheel = computeWheel(current, place, springEased);\n cells.unshift(\n <DigitColumn\n key={`d${i}`}\n value={wheel}\n fontSize={fontSize}\n opacity={placeOpacity(current, place)}\n />,\n );\n place++;\n }\n }\n\n return (\n <div\n style={{\n display: \"flex\",\n alignItems: \"baseline\",\n fontSize,\n fontWeight: 800,\n color,\n fontFamily: MONO_FAMILY,\n fontVariantNumeric: \"tabular-nums\",\n letterSpacing: \"-0.03em\",\n lineHeight: 1,\n }}\n >\n {cells}\n </div>\n );\n}\n\nexport function Odometer({ current, fontSize, color }: OdometerProps) {\n const { fps } = useVideoConfig();\n const value = Math.max(0, Math.round(current));\n return (\n <OdometerColumns\n current={current}\n templateValue={value}\n fontSize={fontSize}\n color={color}\n fps={fps}\n />\n );\n}\n\nexport function NumberWheel({\n from = 0,\n to = 24813,\n fontSize = 120,\n color = \"#171717\",\n speed = 1,\n}: NumberWheelProps) {\n const frame = useCurrentFrame();\n const { durationInFrames, fps } = useVideoConfig();\n\n const start = Math.max(0, Math.round(from));\n const end = Math.max(0, Math.round(to));\n\n const progress = interpolate(\n frame * speed,\n [0, durationInFrames * COUNT_PORTION],\n [0, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.bezier(0.5, 1, 0.5, 1),\n },\n );\n const current = Math.max(0, start + progress * (end - start));\n const maxVal = Math.max(start, end);\n\n return (\n <AbsoluteFill\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <OdometerColumns\n current={current}\n templateValue={maxVal}\n fontSize={fontSize}\n color={color}\n fps={fps}\n />\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport { loadFont as loadMono } from \"@remotion/google-fonts/JetBrainsMono\";\nimport type React from \"react\";\nimport {\n AbsoluteFill,\n Easing,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nconst { fontFamily: MONO_FAMILY } = loadMono();\n\nexport interface NumberWheelProps {\n from?: number;\n to?: number;\n fontSize?: number;\n color?: string;\n speed?: number;\n}\n\nexport interface OdometerProps {\n current: number;\n fontSize: number;\n color: string;\n}\n\nconst WHEEL_ROLL_START = 0.9;\nconst SPRING_FRAMES = 30;\nconst SPRING_CONFIG = { damping: 200, stiffness: 100, mass: 1 } as const;\nconst COUNT_PORTION = 0.8;\n\nfunction rollFraction(current: number, place: number): number {\n const v = current / 10 ** place;\n const frac = v - Math.floor(v);\n if (frac <= WHEEL_ROLL_START) return 0;\n return (frac - WHEEL_ROLL_START) / (1 - WHEEL_ROLL_START);\n}\n\nfunction computeWheel(\n current: number,\n place: number,\n springEased: (t: number) => number,\n): number {\n if (current <= 0) return 0;\n if (place === 0) return current % 10;\n\n const digit = Math.floor(current / 10 ** place) % 10;\n const t = rollFraction(current, place);\n if (t <= 0) return digit;\n return digit + springEased(t);\n}\n\nfunction placeOpacity(current: number, place: number): number {\n if (place === 0) return 1;\n const threshold = 10 ** place;\n return interpolate(current, [threshold * 0.9, threshold], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n}\n\nfunction DigitColumn({\n value,\n fontSize,\n opacity,\n}: {\n value: number;\n fontSize: number;\n opacity: number;\n}) {\n const cellHeight = fontSize * 1.1;\n return (\n <span\n style={{\n display: \"inline-block\",\n overflow: \"hidden\",\n height: cellHeight,\n width: \"0.62em\",\n verticalAlign: \"top\",\n textAlign: \"center\",\n opacity,\n }}\n >\n <span\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n translate: `0 ${-value * cellHeight}px`,\n }}\n >\n {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0].map((d, i) => (\n <span\n key={i}\n style={{ height: cellHeight, lineHeight: `${cellHeight}px` }}\n >\n {d}\n </span>\n ))}\n </span>\n </span>\n );\n}\n\nfunction OdometerColumns({\n current,\n templateValue,\n fontSize,\n color,\n fps,\n}: {\n current: number;\n templateValue: number;\n fontSize: number;\n color: string;\n fps: number;\n}) {\n const springAtEnd = spring({\n frame: SPRING_FRAMES,\n fps,\n config: SPRING_CONFIG,\n });\n const springEased = (t: number) =>\n spring({ frame: t * SPRING_FRAMES, fps, config: SPRING_CONFIG }) /\n springAtEnd;\n\n const template = templateValue.toLocaleString(\"en-US\");\n\n const cells: React.ReactNode[] = [];\n let place = 0;\n for (let i = template.length - 1; i >= 0; i--) {\n const ch = template[i];\n if (ch === \",\") {\n cells.unshift(\n <span\n key={`c${i}`}\n style={{\n display: \"inline-block\",\n width: \"0.32em\",\n color: \"currentColor\",\n fontSize: \"0.85em\",\n textAlign: \"center\",\n opacity: placeOpacity(current, place),\n }}\n >\n ,\n </span>,\n );\n } else {\n const wheel = computeWheel(current, place, springEased);\n cells.unshift(\n <DigitColumn\n key={`d${i}`}\n value={wheel}\n fontSize={fontSize}\n opacity={placeOpacity(current, place)}\n />,\n );\n place++;\n }\n }\n\n return (\n <div\n style={{\n display: \"flex\",\n alignItems: \"baseline\",\n fontSize,\n fontWeight: 800,\n color,\n fontFamily: MONO_FAMILY,\n fontVariantNumeric: \"tabular-nums\",\n letterSpacing: \"-0.03em\",\n lineHeight: 1,\n }}\n >\n {cells}\n </div>\n );\n}\n\nexport function Odometer({ current, fontSize, color }: OdometerProps) {\n const { fps } = useVideoConfig();\n const value = Math.max(0, Math.round(current));\n return (\n <OdometerColumns\n current={current}\n templateValue={value}\n fontSize={fontSize}\n color={color}\n fps={fps}\n />\n );\n}\n\nexport function NumberWheel({\n from = 0,\n to = 24813,\n fontSize = 120,\n color = \"#171717\",\n speed = 1,\n}: NumberWheelProps) {\n const frame = useCurrentFrame();\n const { durationInFrames, fps } = useVideoConfig();\n\n const start = Math.max(0, Math.round(from));\n const end = Math.max(0, Math.round(to));\n\n const progress = interpolate(\n frame * speed,\n [0, durationInFrames * COUNT_PORTION],\n [0, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: Easing.bezier(0.5, 1, 0.5, 1),\n },\n );\n const current = Math.max(0, start + progress * (end - start));\n const maxVal = Math.max(start, end);\n\n return (\n <AbsoluteFill\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <OdometerColumns\n current={current}\n templateValue={maxVal}\n fontSize={fontSize}\n color={color}\n fps={fps}\n />\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/number-wheel.tsx"}diff --git a/registry-artifacts/opencode.json b/registry-artifacts/opencode.jsonindex ebf68a44..4e126bf1 100644--- a/registry-artifacts/opencode.json+++ b/registry-artifacts/opencode.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/opencode/index.tsx",- "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/JetBrainsMono\";\nimport {\n AbsoluteFill,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { Caret } from \"@/components/remocn/caret\";\nimport { useTypewriter } from \"@/lib/remocn-ui\";\n\nconst { fontFamily: MONO_FAMILY } = loadFont();\n\nexport interface OpenCodeProps {\n placeholder?: string;\n query?: string;\n agentName?: string;\n modelName?: string;\n provider?: string;\n accentColor?: string;\n speed?: number;\n}\n\ninterface Theme {\n page: string;\n boxBg: string;\n fg: string;\n fgMuted: string;\n fgQuery: string;\n logoOpen: string;\n logoCode: string;\n}\n\nexport const THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n page: \"#FFFFFF\",\n boxBg: \"#F2F2F2\",\n fg: \"#111111\",\n fgMuted: \"#888888\",\n fgQuery: \"#555555\",\n logoOpen: \"#999999\",\n logoCode: \"#111111\",\n },\n dark: {\n page: \"#000000\",\n boxBg: \"#161616\",\n fg: \"#EDEDED\",\n fgMuted: \"#6B6B6B\",\n fgQuery: \"#9A9A9A\",\n logoOpen: \"#6B6B6B\",\n logoCode: \"#EDEDED\",\n },\n};\n\nexport const TYPING_START_FRAME = 48;\n\nexport const TYPING_CPS = 20;\n\nfunction introBounceIn(\n frame: number,\n fps: number,\n): { translateY: number; scale: number } {\n const s = spring({\n fps,\n frame,\n config: { damping: 14, stiffness: 110, mass: 0.7 },\n });\n const translateY = interpolate(s, [0, 1], [28, 0]);\n const scale = interpolate(s, [0, 1], [0.97, 1]);\n return { translateY, scale };\n}\n\nfunction fadeUpAt(\n frame: number,\n range: [number, number],\n): { opacity: number; translateY: number } {\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n };\n return {\n opacity: interpolate(frame, range, [0, 1], opts),\n translateY: interpolate(frame, range, [12, 0], opts),\n };\n}\n\nexport function OpenCode({\n placeholder = \"Ask anything... \",\n query = '\"What is the tech stack of this project?\"',\n agentName = \"Build\",\n modelName = \"Kimi K2.5\",\n provider = \"Moonshot AI\",\n accentColor = \"#2B7FFF\",\n speed = 1,\n}: OpenCodeProps) {\n const frame = useCurrentFrame();\n const { width, height, fps } = useVideoConfig();\n const t = THEMES.dark;\n\n const refW = 1280;\n const refH = 720;\n const stageScale = Math.min(width / refW, height / refH);\n\n const tw = useTypewriter(query, {\n cps: TYPING_CPS,\n speed,\n startFrame: TYPING_START_FRAME,\n });\n\n const intro = introBounceIn(frame * speed, fps);\n const logoFade = fadeUpAt(frame * speed, [4, 22]);\n const boxFade = fadeUpAt(frame * speed, [12, 30]);\n const hintsFade = fadeUpAt(frame * speed, [20, 38]);\n\n const boxWidth = 1000;\n\n return (\n <AbsoluteFill style={{ background: \"transparent\" }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: refW,\n height: refH,\n transform: `translate(-50%, -50%) scale(${stageScale})`,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n style={{\n lineHeight: 0,\n opacity: logoFade.opacity,\n transform: `translateY(${logoFade.translateY + intro.translateY * 0.4}px)`,\n }}\n >\n <svg\n width={468}\n height={84}\n viewBox=\"0 0 234 42\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <title>opencode</title>\n <clipPath id=\"opencode-wordmark-clip\">\n <rect width={234} height={42} fill=\"#ffffff\" />\n </clipPath>\n <g clipPath=\"url(#opencode-wordmark-clip)\">\n <path d=\"M18 30H6V18H18V30Z\" fill=\"#4B4646\" />\n <path d=\"M18 12H6V30H18V12ZM24 36H0V6H24V36Z\" fill=\"#B7B1B1\" />\n <path d=\"M48 30H36V18H48V30Z\" fill=\"#4B4646\" />\n <path\n d=\"M36 30H48V12H36V30ZM54 36H36V42H30V6H54V36Z\"\n fill=\"#B7B1B1\"\n />\n <path d=\"M84 24V30H66V24H84Z\" fill=\"#4B4646\" />\n <path\n d=\"M84 24H66V30H84V36H60V6H84V24ZM66 18H78V12H66V18Z\"\n fill=\"#B7B1B1\"\n />\n <path d=\"M108 36H96V18H108V36Z\" fill=\"#4B4646\" />\n <path\n d=\"M108 12H96V36H90V6H108V12ZM114 36H108V12H114V36Z\"\n fill=\"#B7B1B1\"\n />\n <path d=\"M144 30H126V18H144V30Z\" fill=\"#4B4646\" />\n <path d=\"M144 12H126V30H144V36H120V6H144V12Z\" fill=\"#F1ECEC\" />\n <path d=\"M168 30H156V18H168V30Z\" fill=\"#4B4646\" />\n <path\n d=\"M168 12H156V30H168V12ZM174 36H150V6H174V36Z\"\n fill=\"#F1ECEC\"\n />\n <path d=\"M198 30H186V18H198V30Z\" fill=\"#4B4646\" />\n <path\n d=\"M198 12H186V30H198V12ZM204 36H180V6H198V0H204V36Z\"\n fill=\"#F1ECEC\"\n />\n <path d=\"M234 24V30H216V24H234Z\" fill=\"#4B4646\" />\n <path\n d=\"M216 12V18H228V12H216ZM234 24H216V30H234V36H210V6H234V24Z\"\n fill=\"#F1ECEC\"\n />\n </g>\n </svg>\n </div>\n\n <div\n style={{\n width: boxWidth,\n marginTop: 40,\n minHeight: 150,\n background: t.boxBg,\n borderLeft: `4px solid ${accentColor}`,\n padding: \"26px 28px\",\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"center\",\n gap: 26,\n opacity: boxFade.opacity,\n transform: `translateY(${boxFade.translateY + intro.translateY * 0.6}px) scale(${intro.scale})`,\n transformOrigin: \"center top\",\n }}\n >\n <div\n style={{\n display: \"inline-flex\",\n alignItems: \"center\",\n fontFamily: MONO_FAMILY,\n fontSize: 22,\n }}\n >\n <span style={{ color: t.fgMuted }}>{placeholder}</span>\n {tw.count > 0 ? (\n <span style={{ color: t.fgQuery }}>{tw.text}</span>\n ) : null}\n <span style={{ opacity: 0.6, display: \"inline-flex\" }}>\n <Caret\n width={12}\n height={24}\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n marginLeft={2}\n />\n </span>\n </div>\n\n <div\n style={{\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: 16,\n fontFamily: MONO_FAMILY,\n fontSize: 20,\n }}\n >\n <span style={{ color: accentColor, fontWeight: 600 }}>\n {agentName}\n </span>\n <span style={{ color: t.fg }}>{modelName}</span>\n <span style={{ color: t.fgMuted }}>{provider}</span>\n </div>\n </div>\n\n <div\n style={{\n width: boxWidth,\n marginTop: 18,\n display: \"flex\",\n justifyContent: \"flex-end\",\n gap: 22,\n fontFamily: MONO_FAMILY,\n fontSize: 18,\n opacity: hintsFade.opacity,\n transform: `translateY(${hintsFade.translateY}px)`,\n }}\n >\n <span style={{ display: \"inline-flex\", gap: 8 }}>\n <span style={{ color: t.fg, fontWeight: 700 }}>tab</span>\n <span style={{ color: t.fgMuted }}>agents</span>\n </span>\n <span style={{ display: \"inline-flex\", gap: 8 }}>\n <span style={{ color: t.fg, fontWeight: 700 }}>ctrl+p</span>\n <span style={{ color: t.fgMuted }}>commands</span>\n </span>\n </div>\n </div>\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/JetBrainsMono\";\nimport {\n AbsoluteFill,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { Caret } from \"@/components/remocn/caret\";\nimport { useTypewriter } from \"@/lib/remocn-ui\";\n\nconst { fontFamily: MONO_FAMILY } = loadFont();\n\nexport interface OpenCodeProps {\n placeholder?: string;\n query?: string;\n agentName?: string;\n modelName?: string;\n provider?: string;\n accentColor?: string;\n speed?: number;\n}\n\ninterface Theme {\n page: string;\n boxBg: string;\n fg: string;\n fgMuted: string;\n fgQuery: string;\n logoOpen: string;\n logoCode: string;\n}\n\nexport const THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n page: \"#FFFFFF\",\n boxBg: \"#F2F2F2\",\n fg: \"#111111\",\n fgMuted: \"#888888\",\n fgQuery: \"#555555\",\n logoOpen: \"#999999\",\n logoCode: \"#111111\",\n },\n dark: {\n page: \"#000000\",\n boxBg: \"#161616\",\n fg: \"#EDEDED\",\n fgMuted: \"#6B6B6B\",\n fgQuery: \"#9A9A9A\",\n logoOpen: \"#6B6B6B\",\n logoCode: \"#EDEDED\",\n },\n};\n\nexport const TYPING_START_FRAME = 48;\n\nexport const TYPING_CPS = 20;\n\nfunction introBounceIn(\n frame: number,\n fps: number,\n): { translateY: number; scale: number } {\n const s = spring({\n fps,\n frame,\n config: { damping: 14, stiffness: 110, mass: 0.7 },\n });\n const translateY = interpolate(s, [0, 1], [28, 0]);\n const scale = interpolate(s, [0, 1], [0.97, 1]);\n return { translateY, scale };\n}\n\nfunction fadeUpAt(\n frame: number,\n range: [number, number],\n): { opacity: number; translateY: number } {\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n };\n return {\n opacity: interpolate(frame, range, [0, 1], opts),\n translateY: interpolate(frame, range, [12, 0], opts),\n };\n}\n\nexport function OpenCode({\n placeholder = \"Ask anything... \",\n query = '\"What is the tech stack of this project?\"',\n agentName = \"Build\",\n modelName = \"Kimi K2.5\",\n provider = \"Moonshot AI\",\n accentColor = \"#2B7FFF\",\n speed = 1,\n}: OpenCodeProps) {\n const frame = useCurrentFrame();\n const { width, height, fps } = useVideoConfig();\n const t = THEMES.dark;\n\n const refW = 1280;\n const refH = 720;\n const stageScale = Math.min(width / refW, height / refH);\n\n const tw = useTypewriter(query, {\n cps: TYPING_CPS,\n speed,\n startFrame: TYPING_START_FRAME,\n });\n\n const intro = introBounceIn(frame * speed, fps);\n const logoFade = fadeUpAt(frame * speed, [4, 22]);\n const boxFade = fadeUpAt(frame * speed, [12, 30]);\n const hintsFade = fadeUpAt(frame * speed, [20, 38]);\n\n const boxWidth = 1000;\n\n return (\n <AbsoluteFill style={{ background: \"transparent\" }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: refW,\n height: refH,\n translate: \"-50% -50%\",\n scale: `${stageScale}`,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n style={{\n lineHeight: 0,\n opacity: logoFade.opacity,\n translate: `0 ${logoFade.translateY + intro.translateY * 0.4}px`,\n }}\n >\n <svg\n width={468}\n height={84}\n viewBox=\"0 0 234 42\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <title>opencode</title>\n <clipPath id=\"opencode-wordmark-clip\">\n <rect width={234} height={42} fill=\"#ffffff\" />\n </clipPath>\n <g clipPath=\"url(#opencode-wordmark-clip)\">\n <path d=\"M18 30H6V18H18V30Z\" fill=\"#4B4646\" />\n <path d=\"M18 12H6V30H18V12ZM24 36H0V6H24V36Z\" fill=\"#B7B1B1\" />\n <path d=\"M48 30H36V18H48V30Z\" fill=\"#4B4646\" />\n <path\n d=\"M36 30H48V12H36V30ZM54 36H36V42H30V6H54V36Z\"\n fill=\"#B7B1B1\"\n />\n <path d=\"M84 24V30H66V24H84Z\" fill=\"#4B4646\" />\n <path\n d=\"M84 24H66V30H84V36H60V6H84V24ZM66 18H78V12H66V18Z\"\n fill=\"#B7B1B1\"\n />\n <path d=\"M108 36H96V18H108V36Z\" fill=\"#4B4646\" />\n <path\n d=\"M108 12H96V36H90V6H108V12ZM114 36H108V12H114V36Z\"\n fill=\"#B7B1B1\"\n />\n <path d=\"M144 30H126V18H144V30Z\" fill=\"#4B4646\" />\n <path d=\"M144 12H126V30H144V36H120V6H144V12Z\" fill=\"#F1ECEC\" />\n <path d=\"M168 30H156V18H168V30Z\" fill=\"#4B4646\" />\n <path\n d=\"M168 12H156V30H168V12ZM174 36H150V6H174V36Z\"\n fill=\"#F1ECEC\"\n />\n <path d=\"M198 30H186V18H198V30Z\" fill=\"#4B4646\" />\n <path\n d=\"M198 12H186V30H198V12ZM204 36H180V6H198V0H204V36Z\"\n fill=\"#F1ECEC\"\n />\n <path d=\"M234 24V30H216V24H234Z\" fill=\"#4B4646\" />\n <path\n d=\"M216 12V18H228V12H216ZM234 24H216V30H234V36H210V6H234V24Z\"\n fill=\"#F1ECEC\"\n />\n </g>\n </svg>\n </div>\n\n <div\n style={{\n width: boxWidth,\n marginTop: 40,\n minHeight: 150,\n background: t.boxBg,\n borderLeft: `4px solid ${accentColor}`,\n padding: \"26px 28px\",\n boxSizing: \"border-box\",\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"center\",\n gap: 26,\n opacity: boxFade.opacity,\n translate: `0 ${boxFade.translateY + intro.translateY * 0.6}px`,\n scale: `${intro.scale}`,\n transformOrigin: \"center top\",\n }}\n >\n <div\n style={{\n display: \"inline-flex\",\n alignItems: \"center\",\n fontFamily: MONO_FAMILY,\n fontSize: 22,\n }}\n >\n <span style={{ color: t.fgMuted }}>{placeholder}</span>\n {tw.count > 0 ? (\n <span style={{ color: t.fgQuery }}>{tw.text}</span>\n ) : null}\n <span style={{ opacity: 0.6, display: \"inline-flex\" }}>\n <Caret\n width={12}\n height={24}\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n marginLeft={2}\n />\n </span>\n </div>\n\n <div\n style={{\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n gap: 16,\n fontFamily: MONO_FAMILY,\n fontSize: 20,\n }}\n >\n <span style={{ color: accentColor, fontWeight: 600 }}>\n {agentName}\n </span>\n <span style={{ color: t.fg }}>{modelName}</span>\n <span style={{ color: t.fgMuted }}>{provider}</span>\n </div>\n </div>\n\n <div\n style={{\n width: boxWidth,\n marginTop: 18,\n display: \"flex\",\n justifyContent: \"flex-end\",\n gap: 22,\n fontFamily: MONO_FAMILY,\n fontSize: 18,\n opacity: hintsFade.opacity,\n translate: `0 ${hintsFade.translateY}px`,\n }}\n >\n <span style={{ display: \"inline-flex\", gap: 8 }}>\n <span style={{ color: t.fg, fontWeight: 700 }}>tab</span>\n <span style={{ color: t.fgMuted }}>agents</span>\n </span>\n <span style={{ display: \"inline-flex\", gap: 8 }}>\n <span style={{ color: t.fg, fontWeight: 700 }}>ctrl+p</span>\n <span style={{ color: t.fgMuted }}>commands</span>\n </span>\n </div>\n </div>\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/opencode.tsx"}diff --git a/registry-artifacts/page-turn.json b/registry-artifacts/page-turn.jsonindex 174ba8f0..8066b5bc 100644--- a/registry-artifacts/page-turn.json+++ b/registry-artifacts/page-turn.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/page-turn/index.tsx",- "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, useVideoConfig } from \"remotion\";\n\nconst LIFT_RATIO = 1.28;\n\nexport function pageTurnPose(progress: number, poses: number): number {\n const clamped = Math.min(1, Math.max(0, progress));\n const eased = clamped ** 3;\n if (poses <= 1) return eased >= 1 ? 1 : 0;\n const bucket = Math.min(poses - 1, Math.floor(eased * poses));\n return bucket / (poses - 1);\n}\n\nexport type PageTurnProps = {\n angle?: number;\n origin?: string;\n poses?: number;\n};\n\nconst PageTurnPresentation: React.FC<\n TransitionPresentationComponentProps<PageTurnProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const { height } = useVideoConfig();\n const { angle = -7, origin = \"18% 100%\", poses = 8 } = passedProps;\n\n if (presentationDirection === \"entering\") {\n return <AbsoluteFill>{children}</AbsoluteFill>;\n }\n\n const pose = pageTurnPose(presentationProgress, poses);\n\n return (\n <AbsoluteFill\n style={{\n zIndex: 2,\n transformOrigin: origin,\n transform: `translateY(${-pose * height * LIFT_RATIO}px) rotate(${angle * pose}deg)`,\n }}\n >\n {children}\n </AbsoluteFill>\n );\n};\n\nexport function pageTurn(\n props: PageTurnProps = {},\n): TransitionPresentation<PageTurnProps> {\n return {\n component: PageTurnPresentation,\n props,\n };\n}\n",+ "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, useVideoConfig } from \"remotion\";\n\nconst LIFT_RATIO = 1.28;\n\nexport function pageTurnPose(progress: number, poses: number): number {\n const clamped = Math.min(1, Math.max(0, progress));\n const eased = clamped ** 3;\n if (poses <= 1) return eased >= 1 ? 1 : 0;\n const bucket = Math.min(poses - 1, Math.floor(eased * poses));\n return bucket / (poses - 1);\n}\n\nexport type PageTurnProps = {\n angle?: number;\n origin?: string;\n poses?: number;\n};\n\nconst PageTurnPresentation: React.FC<\n TransitionPresentationComponentProps<PageTurnProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const { height } = useVideoConfig();\n const { angle = -7, origin = \"18% 100%\", poses = 8 } = passedProps;\n\n if (presentationDirection === \"entering\") {\n return <AbsoluteFill>{children}</AbsoluteFill>;\n }\n\n const pose = pageTurnPose(presentationProgress, poses);\n\n return (\n <AbsoluteFill\n style={{\n zIndex: 2,\n transformOrigin: origin,\n translate: `0 ${-pose * height * LIFT_RATIO}px`,\n rotate: `${angle * pose}deg`,\n }}\n >\n {children}\n </AbsoluteFill>\n );\n};\n\nexport function pageTurn(\n props: PageTurnProps = {},\n): TransitionPresentation<PageTurnProps> {\n return {\n component: PageTurnPresentation,\n props,\n };\n}\n","type": "registry:component","target": "components/remocn/page-turn.tsx"}diff --git a/registry-artifacts/paper-sticker.json b/registry-artifacts/paper-sticker.jsonindex 0ef9920c..65ceeb3b 100644--- a/registry-artifacts/paper-sticker.json+++ b/registry-artifacts/paper-sticker.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/paper-sticker/index.tsx",- "content": "\"use client\";\n\nimport type React from \"react\";\nimport { useCurrentFrame } from \"remotion\";\nimport {\n DEFAULT_STEP,\n hashRange,\n paperJitter,\n steppedRamp,\n} from \"@/lib/remocn/stop-motion\";\n\nexport interface PaperStickerProps {\n children: React.ReactNode;\n at?: number;\n seed?: string;\n padding?: string;\n background?: string;\n borderColor?: string;\n maxTilt?: number;\n step?: number;\n}\n\nexport function PaperSticker({\n children,\n at = 0,\n seed = \"sticker\",\n padding = \"10px 16px\",\n background = \"#fbfaf6\",\n borderColor = \"rgba(38,36,44,0.55)\",\n maxTilt = 2.6,\n step = DEFAULT_STEP,\n}: PaperStickerProps) {\n const frame = useCurrentFrame();\n const progress = steppedRamp(frame, at, at + 2 * step, { step });\n if (progress === 0) return null;\n\n const tilt = hashRange(`${seed}:rot`, -maxTilt, maxTilt);\n const jitter = paperJitter(frame, `sticker:${seed}`, {\n amp: 0.7,\n rotAmp: 0.2,\n step,\n });\n\n return (\n <div\n style={{\n display: \"inline-block\",\n padding,\n background,\n border: `1px solid ${borderColor}`,\n borderRadius: 3,\n boxShadow: \"0 2px 5px rgba(38,36,44,0.14)\",\n transform: `translate(${jitter.x}px, ${jitter.y}px) rotate(${tilt + jitter.rot}deg) scale(${progress < 1 ? 1.12 : 1})`,\n }}\n >\n {children}\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport type React from \"react\";\nimport { useCurrentFrame } from \"remotion\";\nimport {\n DEFAULT_STEP,\n hashRange,\n paperJitter,\n steppedRamp,\n} from \"@/lib/remocn/stop-motion\";\n\nexport interface PaperStickerProps {\n children: React.ReactNode;\n at?: number;\n seed?: string;\n padding?: string;\n background?: string;\n borderColor?: string;\n maxTilt?: number;\n step?: number;\n}\n\nexport function PaperSticker({\n children,\n at = 0,\n seed = \"sticker\",\n padding = \"10px 16px\",\n background = \"#fbfaf6\",\n borderColor = \"rgba(38,36,44,0.55)\",\n maxTilt = 2.6,\n step = DEFAULT_STEP,\n}: PaperStickerProps) {\n const frame = useCurrentFrame();\n const progress = steppedRamp(frame, at, at + 2 * step, { step });\n if (progress === 0) return null;\n\n const tilt = hashRange(`${seed}:rot`, -maxTilt, maxTilt);\n const jitter = paperJitter(frame, `sticker:${seed}`, {\n amp: 0.7,\n rotAmp: 0.2,\n step,\n });\n\n return (\n <div\n style={{\n display: \"inline-block\",\n padding,\n background,\n border: `1px solid ${borderColor}`,\n borderRadius: 3,\n boxShadow: \"0 2px 5px rgba(38,36,44,0.14)\",\n translate: `${jitter.x}px ${jitter.y}px`,\n rotate: `${tilt + jitter.rot}deg`,\n scale: `${progress < 1 ? 1.12 : 1}`,\n }}\n >\n {children}\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/paper-sticker.tsx"}diff --git a/registry-artifacts/per-character-rise.json b/registry-artifacts/per-character-rise.jsonindex cb5fc6e2..8d449904 100644--- a/registry-artifacts/per-character-rise.json+++ b/registry-artifacts/per-character-rise.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/per-character-rise/index.tsx",- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface PerCharacterRiseProps {\n text: string;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function PerCharacterRise({\n text,\n distance = 32,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: PerCharacterRiseProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 21;\n const charTravelFrames = 10;\n const staggerFrames = 1;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerFrames;\n const easing = Easing.bezier(0.2, 0.8, 0.2, 1);\n const travelEasing = Easing.bezier(0.2, 0.8, 0.6, 0.85);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charTravelFrames], [distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: travelEasing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface PerCharacterRiseProps {\n text: string;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function PerCharacterRise({\n text,\n distance = 32,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: PerCharacterRiseProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 21;\n const charTravelFrames = 10;\n const staggerFrames = 1;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerFrames;\n const easing = Easing.bezier(0.2, 0.8, 0.2, 1);\n const travelEasing = Easing.bezier(0.2, 0.8, 0.6, 0.85);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charTravelFrames], [distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: travelEasing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n translate: `0 ${y}px`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/per-character-rise.tsx"}diff --git a/registry-artifacts/per-word-crossfade.json b/registry-artifacts/per-word-crossfade.jsonindex f84164d1..f5188135 100644--- a/registry-artifacts/per-word-crossfade.json+++ b/registry-artifacts/per-word-crossfade.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/per-word-crossfade/index.tsx",- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface PerWordCrossfadeProps {\n fromText: string;\n toText: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function PerWordCrossfade({\n fromText,\n toText,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: PerWordCrossfadeProps) {\n const frame = useCurrentFrame() * speed;\n\n const fromWords = fromText.split(\" \");\n const toWords = toText.split(\" \");\n\n const enterDur = 21;\n const enterTravel = 5;\n const exitDur = 15;\n const exitTravelFrom = 6;\n const enterStagger = 2;\n const exitStagger = 1;\n const overlapF = 5;\n const microDelayF = 2;\n\n const enterEasing = Easing.bezier(0.16, 1, 0.3, 1);\n const exitEasing = Easing.bezier(0.7, 0, 0.84, 0);\n\n const exitTotal = exitDur + (fromWords.length - 1) * exitStagger;\n const newStart = Math.max(0, exitTotal - overlapF + microDelayF);\n\n const fontStack =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"transparent\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n }}\n >\n {fromWords.map((word, i) => {\n const local = frame - i * exitStagger;\n const opacity = interpolate(local, [0, exitDur], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n const y = interpolate(local, [exitTravelFrom, exitDur], [0, -6], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n }}\n >\n {toWords.map((word, j) => {\n const local = frame - newStart - j * enterStagger;\n const opacity = interpolate(local, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const y = interpolate(local, [0, enterTravel], [8, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n return (\n <span\n key={j}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface PerWordCrossfadeProps {\n fromText: string;\n toText: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function PerWordCrossfade({\n fromText,\n toText,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: PerWordCrossfadeProps) {\n const frame = useCurrentFrame() * speed;\n\n const fromWords = fromText.split(\" \");\n const toWords = toText.split(\" \");\n\n const enterDur = 21;\n const enterTravel = 5;\n const exitDur = 15;\n const exitTravelFrom = 6;\n const enterStagger = 2;\n const exitStagger = 1;\n const overlapF = 5;\n const microDelayF = 2;\n\n const enterEasing = Easing.bezier(0.16, 1, 0.3, 1);\n const exitEasing = Easing.bezier(0.7, 0, 0.84, 0);\n\n const exitTotal = exitDur + (fromWords.length - 1) * exitStagger;\n const newStart = Math.max(0, exitTotal - overlapF + microDelayF);\n\n const fontStack =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"transparent\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n }}\n >\n {fromWords.map((word, i) => {\n const local = frame - i * exitStagger;\n const opacity = interpolate(local, [0, exitDur], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n const y = interpolate(local, [exitTravelFrom, exitDur], [0, -6], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 55%\",\n opacity,\n translate: `0 ${y}px`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n }}\n >\n {toWords.map((word, j) => {\n const local = frame - newStart - j * enterStagger;\n const opacity = interpolate(local, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const y = interpolate(local, [0, enterTravel], [8, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n return (\n <span\n key={j}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 55%\",\n opacity,\n translate: `0 ${y}px`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/per-word-crossfade.tsx"}diff --git a/registry-artifacts/perspective-marquee.json b/registry-artifacts/perspective-marquee.jsonindex bd7eaef0..aadc611d 100644--- a/registry-artifacts/perspective-marquee.json+++ b/registry-artifacts/perspective-marquee.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/perspective-marquee/index.tsx",- "content": "\"use client\";\n\nimport { useCurrentFrame } from \"remotion\";\n\nexport interface PerspectiveMarqueeProps {\n items?: string[];\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n pixelsPerFrame?: number;\n rotateY?: number;\n rotateX?: number;\n perspective?: number;\n fadeColor?: string;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\nconst DEFAULT_ITEMS = [\n \"Vercel\",\n \"Linear\",\n \"Stripe\",\n \"Figma\",\n \"Notion\",\n \"Raycast\",\n \"Arc\",\n \"Cursor\",\n];\n\nexport function PerspectiveMarquee({\n items = DEFAULT_ITEMS,\n fontSize = 84,\n color = \"#fafafa\",\n fontWeight = 700,\n pixelsPerFrame = 2,\n rotateY = -28,\n rotateX = 8,\n perspective = 1200,\n fadeColor = \"#050505\",\n speed = 1,\n className,\n}: PerspectiveMarqueeProps) {\n const frame = useCurrentFrame() * speed;\n\n // Approximate width of one full item set so the modulo wraps cleanly.\n const itemPadding = fontSize * 0.9;\n const approxItemWidth = items.reduce(\n (acc, item) => acc + item.length * fontSize * 0.6 + itemPadding,\n 0,\n );\n\n const offset = -((frame * pixelsPerFrame) % approxItemWidth);\n\n // Render the row 3x so the loop is seamless even when rotated in 3D.\n const rendered = [...items, ...items, ...items];\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n perspective: `${perspective}px`,\n }}\n >\n <div\n style={{\n width: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n transform: `rotateX(${rotateX}deg) rotateY(${rotateY}deg)`,\n transformStyle: \"preserve-3d\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n whiteSpace: \"nowrap\",\n transform: `translateX(${offset}px)`,\n }}\n >\n {rendered.map((item, i) => {\n // Approximate this item's center X (relative to the marquee row,\n // including the rolling offset). Used to dial in depth-of-field blur\n // and opacity by horizontal position on screen.\n const itemCenter =\n i * (approxItemWidth / items.length) +\n approxItemWidth / items.length / 2 +\n offset;\n // Normalize roughly to [-1, 1] across a 1280px viewport.\n const norm = (itemCenter - 640) / 640;\n const distance = Math.min(1, Math.abs(norm));\n const blurPx = distance * 6;\n const opacity = 1 - distance * 0.4;\n\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n fontFamily: FONT_FAMILY,\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n paddingRight: itemPadding,\n filter: `blur(${blurPx}px)`,\n opacity,\n }}\n >\n {item}\n </span>\n );\n })}\n </div>\n </div>\n\n {/* Vignette to fade marquee edges into background */}\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n pointerEvents: \"none\",\n background: `linear-gradient(90deg, ${fadeColor} 0%, transparent 18%, transparent 82%, ${fadeColor} 100%)`,\n }}\n />\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n pointerEvents: \"none\",\n background: `linear-gradient(180deg, ${fadeColor} 0%, transparent 25%, transparent 75%, ${fadeColor} 100%)`,\n }}\n />\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { useCurrentFrame } from \"remotion\";\n\nexport interface PerspectiveMarqueeProps {\n items?: string[];\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n pixelsPerFrame?: number;\n rotateY?: number;\n rotateX?: number;\n perspective?: number;\n fadeColor?: string;\n speed?: number;\n className?: string;\n}\n\nconst FONT_FAMILY =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\nconst DEFAULT_ITEMS = [\n \"Vercel\",\n \"Linear\",\n \"Stripe\",\n \"Figma\",\n \"Notion\",\n \"Raycast\",\n \"Arc\",\n \"Cursor\",\n];\n\nexport function PerspectiveMarquee({\n items = DEFAULT_ITEMS,\n fontSize = 84,\n color = \"#fafafa\",\n fontWeight = 700,\n pixelsPerFrame = 2,\n rotateY = -28,\n rotateX = 8,\n perspective = 1200,\n fadeColor = \"#050505\",\n speed = 1,\n className,\n}: PerspectiveMarqueeProps) {\n const frame = useCurrentFrame() * speed;\n\n // Approximate width of one full item set so the modulo wraps cleanly.\n const itemPadding = fontSize * 0.9;\n const approxItemWidth = items.reduce(\n (acc, item) => acc + item.length * fontSize * 0.6 + itemPadding,\n 0,\n );\n\n const offset = -((frame * pixelsPerFrame) % approxItemWidth);\n\n // Render the row 3x so the loop is seamless even when rotated in 3D.\n const rendered = [...items, ...items, ...items];\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n overflow: \"hidden\",\n perspective: `${perspective}px`,\n }}\n >\n <div\n style={{\n width: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"flex-start\",\n transform: `rotateX(${rotateX}deg) rotateY(${rotateY}deg)`,\n transformStyle: \"preserve-3d\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n whiteSpace: \"nowrap\",\n translate: `${offset}px`,\n }}\n >\n {rendered.map((item, i) => {\n // Approximate this item's center X (relative to the marquee row,\n // including the rolling offset). Used to dial in depth-of-field blur\n // and opacity by horizontal position on screen.\n const itemCenter =\n i * (approxItemWidth / items.length) +\n approxItemWidth / items.length / 2 +\n offset;\n // Normalize roughly to [-1, 1] across a 1280px viewport.\n const norm = (itemCenter - 640) / 640;\n const distance = Math.min(1, Math.abs(norm));\n const blurPx = distance * 6;\n const opacity = 1 - distance * 0.4;\n\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n fontFamily: FONT_FAMILY,\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n paddingRight: itemPadding,\n filter: `blur(${blurPx}px)`,\n opacity,\n }}\n >\n {item}\n </span>\n );\n })}\n </div>\n </div>\n\n {/* Vignette to fade marquee edges into background */}\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n pointerEvents: \"none\",\n background: `linear-gradient(90deg, ${fadeColor} 0%, transparent 18%, transparent 82%, ${fadeColor} 100%)`,\n }}\n />\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n pointerEvents: \"none\",\n background: `linear-gradient(180deg, ${fadeColor} 0%, transparent 25%, transparent 75%, ${fadeColor} 100%)`,\n }}\n />\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/perspective-marquee.tsx"}diff --git a/registry-artifacts/perspective-squeeze.json b/registry-artifacts/perspective-squeeze.jsonindex eec59955..837d00a1 100644--- a/registry-artifacts/perspective-squeeze.json+++ b/registry-artifacts/perspective-squeeze.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/perspective-squeeze/index.tsx",- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\ntype Corners = [\n [number, number],\n [number, number],\n [number, number],\n [number, number],\n];\n\nexport interface PerspectiveSqueezeProps {\n className?: string;\n width?: number;\n height?: number;\n blockWidth?: number;\n blockHeight?: number;\n lowerBlockPosition?: [number, number];\n upperBlockPosition?: [number, number];\n cornersRest?: Corners;\n cornerKeyframes?: number[];\n upperCornersMid?: Corners;\n upperCornersEnd?: Corners;\n lowerCornersMid?: Corners;\n lowerCornersEnd?: Corners;\n upperText?: string;\n lowerText?: string;\n upperFontFamily?: string;\n lowerFontFamily?: string;\n upperFontSize?: number;\n lowerFontSize?: number;\n capRatio?: number;\n lineGap?: number;\n scaleKeyframes?: number[];\n lowerScaleY?: number[];\n upperScaleY?: number[];\n fill?: string;\n}\n\nfunction cornerPinMatrix(src: Corners, dst: Corners): string {\n const a: number[][] = [];\n const rhs: number[] = [];\n\n for (let i = 0; i < 4; i++) {\n const [x, y] = src[i];\n const [u, v] = dst[i];\n a.push([x, y, 1, 0, 0, 0, -u * x, -u * y]);\n rhs.push(u);\n a.push([0, 0, 0, x, y, 1, -v * x, -v * y]);\n rhs.push(v);\n }\n\n const n = 8;\n for (let col = 0; col < n; col++) {\n let pivot = col;\n for (let r = col + 1; r < n; r++) {\n if (Math.abs(a[r][col]) > Math.abs(a[pivot][col])) pivot = r;\n }\n [a[col], a[pivot]] = [a[pivot], a[col]];\n [rhs[col], rhs[pivot]] = [rhs[pivot], rhs[col]];\n\n const d = a[col][col];\n if (Math.abs(d) < 1e-12) continue;\n for (let c = col; c < n; c++) a[col][c] /= d;\n rhs[col] /= d;\n\n for (let r = 0; r < n; r++) {\n if (r === col) continue;\n const f = a[r][col];\n if (f === 0) continue;\n for (let c = col; c < n; c++) a[r][c] -= f * a[col][c];\n rhs[r] -= f * rhs[col];\n }\n }\n\n const [m0, m1, m2, m3, m4, m5, m6, m7] = rhs;\n return `matrix3d(${m0}, ${m3}, 0, ${m6}, ${m1}, ${m4}, 0, ${m7}, 0, 0, 1, 0, ${m2}, ${m5}, 0, 1)`;\n}\n\nfunction lerpCorners(from: Corners, to: Corners, t: number): Corners {\n return from.map((p, i) => [\n p[0] + (to[i][0] - p[0]) * t,\n p[1] + (to[i][1] - p[1]) * t,\n ]) as Corners;\n}\n\nexport function PerspectiveSqueeze({\n className,\n width = 1920,\n height = 1080,\n blockWidth = 990,\n blockHeight = 546,\n lowerBlockPosition = [960, 860],\n upperBlockPosition = [960, 314],\n cornersRest = [\n [0, 0],\n [990, 0],\n [0, 546],\n [990, 546],\n ],\n cornerKeyframes = [0, 45, 70],\n upperCornersMid = [\n [0, -326],\n [990, 0],\n [0, 546],\n [990, 546],\n ],\n upperCornersEnd = [\n [0, 352],\n [990, -428],\n [460, 546],\n [990, 546],\n ],\n lowerCornersMid = [\n [0, 0],\n [990, 0],\n [0, 225],\n [990, 546],\n ],\n lowerCornersEnd = [\n [0, 0],\n [990, 0],\n [0, 897],\n [990, 116],\n ],\n upperText = \"REMOCN\",\n lowerText = \"BEST\",\n upperFontFamily = \"sans-serif\",\n lowerFontFamily = \"sans-serif\",\n upperFontSize = 603,\n lowerFontSize = 124,\n capRatio = 0.65,\n lineGap = 50,\n scaleKeyframes = [0, 60, 118, 161, 196, 225],\n lowerScaleY = [100, 384.8, 270, 330, 150, 100],\n upperScaleY = [100, 35.8, 64, 45, 110, 100],\n fill = \"#ffffff\",\n}: PerspectiveSqueezeProps) {\n const frame = useCurrentFrame();\n const { width: compWidth, height: compHeight } = useVideoConfig();\n const stageScale = Math.min(compWidth / width, compHeight / height);\n\n const squishEase = Easing.bezier(0.6, 0, 0.4, 1);\n\n const scaleAt = (track: number[]) =>\n interpolate(frame, scaleKeyframes, track, {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: squishEase,\n }) / 100;\n\n const cornersAt = (mid: Corners, end: Corners): Corners => {\n const [k0, k1, k2] = cornerKeyframes;\n if (frame <= k0) return cornersRest;\n if (frame >= k2) return end;\n if (frame <= k1) {\n return lerpCorners(\n cornersRest,\n mid,\n squishEase((frame - k0) / Math.max(k1 - k0, 1)),\n );\n }\n return lerpCorners(\n mid,\n end,\n squishEase((frame - k1) / Math.max(k2 - k1, 1)),\n );\n };\n\n const upperScale = scaleAt(upperScaleY);\n const lowerScale = scaleAt(lowerScaleY);\n\n const upperBoxHeight = upperFontSize * capRatio * upperScale;\n const lowerBoxHeight = lowerFontSize * capRatio * lowerScale;\n const stackTop =\n (blockHeight - (upperBoxHeight + lineGap + lowerBoxHeight)) / 2;\n const upperBaseline = stackTop + upperBoxHeight;\n const lowerBaseline = upperBaseline + lineGap + lowerBoxHeight;\n\n const line = (\n text: string,\n family: string,\n size: number,\n baseline: number,\n scale: number,\n ) => (\n <text\n x={0}\n y={baseline}\n textLength={blockWidth}\n lengthAdjust=\"spacingAndGlyphs\"\n fontFamily={family}\n fontSize={size}\n fontWeight={800}\n fill={fill}\n transform={`matrix(1, 0, 0, ${scale}, 0, ${baseline * (1 - scale)})`}\n >\n {text}\n </text>\n );\n\n const block = (corners: Corners, position: [number, number]) => (\n <div\n style={{\n position: \"absolute\",\n left: position[0] - blockWidth / 2,\n top: position[1] - blockHeight / 2,\n width: blockWidth,\n height: blockHeight,\n transformOrigin: \"0 0\",\n transform: cornerPinMatrix(cornersRest, corners),\n }}\n >\n <svg\n width={blockWidth}\n height={blockHeight}\n viewBox={`0 0 ${blockWidth} ${blockHeight}`}\n style={{ display: \"block\", overflow: \"hidden\" }}\n >\n {line(\n upperText,\n upperFontFamily,\n upperFontSize,\n upperBaseline,\n upperScale,\n )}\n {line(\n lowerText,\n lowerFontFamily,\n lowerFontSize,\n lowerBaseline,\n lowerScale,\n )}\n </svg>\n </div>\n );\n\n return (\n <div\n className={className}\n style={{ position: \"absolute\", inset: 0, overflow: \"hidden\" }}\n >\n <div\n style={{\n position: \"absolute\",\n left: (compWidth - width * stageScale) / 2,\n top: (compHeight - height * stageScale) / 2,\n width,\n height,\n transform: `scale(${stageScale})`,\n transformOrigin: \"0 0\",\n }}\n >\n {block(cornersAt(upperCornersMid, upperCornersEnd), upperBlockPosition)}\n {block(cornersAt(lowerCornersMid, lowerCornersEnd), lowerBlockPosition)}\n </div>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\ntype Corners = [\n [number, number],\n [number, number],\n [number, number],\n [number, number],\n];\n\nexport interface PerspectiveSqueezeProps {\n className?: string;\n width?: number;\n height?: number;\n blockWidth?: number;\n blockHeight?: number;\n lowerBlockPosition?: [number, number];\n upperBlockPosition?: [number, number];\n cornersRest?: Corners;\n cornerKeyframes?: number[];\n upperCornersMid?: Corners;\n upperCornersEnd?: Corners;\n lowerCornersMid?: Corners;\n lowerCornersEnd?: Corners;\n upperText?: string;\n lowerText?: string;\n upperFontFamily?: string;\n lowerFontFamily?: string;\n upperFontSize?: number;\n lowerFontSize?: number;\n capRatio?: number;\n lineGap?: number;\n scaleKeyframes?: number[];\n lowerScaleY?: number[];\n upperScaleY?: number[];\n fill?: string;\n}\n\nfunction cornerPinMatrix(src: Corners, dst: Corners): string {\n const a: number[][] = [];\n const rhs: number[] = [];\n\n for (let i = 0; i < 4; i++) {\n const [x, y] = src[i];\n const [u, v] = dst[i];\n a.push([x, y, 1, 0, 0, 0, -u * x, -u * y]);\n rhs.push(u);\n a.push([0, 0, 0, x, y, 1, -v * x, -v * y]);\n rhs.push(v);\n }\n\n const n = 8;\n for (let col = 0; col < n; col++) {\n let pivot = col;\n for (let r = col + 1; r < n; r++) {\n if (Math.abs(a[r][col]) > Math.abs(a[pivot][col])) pivot = r;\n }\n [a[col], a[pivot]] = [a[pivot], a[col]];\n [rhs[col], rhs[pivot]] = [rhs[pivot], rhs[col]];\n\n const d = a[col][col];\n if (Math.abs(d) < 1e-12) continue;\n for (let c = col; c < n; c++) a[col][c] /= d;\n rhs[col] /= d;\n\n for (let r = 0; r < n; r++) {\n if (r === col) continue;\n const f = a[r][col];\n if (f === 0) continue;\n for (let c = col; c < n; c++) a[r][c] -= f * a[col][c];\n rhs[r] -= f * rhs[col];\n }\n }\n\n const [m0, m1, m2, m3, m4, m5, m6, m7] = rhs;\n return `matrix3d(${m0}, ${m3}, 0, ${m6}, ${m1}, ${m4}, 0, ${m7}, 0, 0, 1, 0, ${m2}, ${m5}, 0, 1)`;\n}\n\nfunction lerpCorners(from: Corners, to: Corners, t: number): Corners {\n return from.map((p, i) => [\n p[0] + (to[i][0] - p[0]) * t,\n p[1] + (to[i][1] - p[1]) * t,\n ]) as Corners;\n}\n\nexport function PerspectiveSqueeze({\n className,\n width = 1920,\n height = 1080,\n blockWidth = 990,\n blockHeight = 546,\n lowerBlockPosition = [960, 860],\n upperBlockPosition = [960, 314],\n cornersRest = [\n [0, 0],\n [990, 0],\n [0, 546],\n [990, 546],\n ],\n cornerKeyframes = [0, 45, 70],\n upperCornersMid = [\n [0, -326],\n [990, 0],\n [0, 546],\n [990, 546],\n ],\n upperCornersEnd = [\n [0, 352],\n [990, -428],\n [460, 546],\n [990, 546],\n ],\n lowerCornersMid = [\n [0, 0],\n [990, 0],\n [0, 225],\n [990, 546],\n ],\n lowerCornersEnd = [\n [0, 0],\n [990, 0],\n [0, 897],\n [990, 116],\n ],\n upperText = \"REMOCN\",\n lowerText = \"BEST\",\n upperFontFamily = \"sans-serif\",\n lowerFontFamily = \"sans-serif\",\n upperFontSize = 603,\n lowerFontSize = 124,\n capRatio = 0.65,\n lineGap = 50,\n scaleKeyframes = [0, 60, 118, 161, 196, 225],\n lowerScaleY = [100, 384.8, 270, 330, 150, 100],\n upperScaleY = [100, 35.8, 64, 45, 110, 100],\n fill = \"#ffffff\",\n}: PerspectiveSqueezeProps) {\n const frame = useCurrentFrame();\n const { width: compWidth, height: compHeight } = useVideoConfig();\n const stageScale = Math.min(compWidth / width, compHeight / height);\n\n const squishEase = Easing.bezier(0.6, 0, 0.4, 1);\n\n const scaleAt = (track: number[]) =>\n interpolate(frame, scaleKeyframes, track, {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: squishEase,\n }) / 100;\n\n const cornersAt = (mid: Corners, end: Corners): Corners => {\n const [k0, k1, k2] = cornerKeyframes;\n if (frame <= k0) return cornersRest;\n if (frame >= k2) return end;\n if (frame <= k1) {\n return lerpCorners(\n cornersRest,\n mid,\n squishEase((frame - k0) / Math.max(k1 - k0, 1)),\n );\n }\n return lerpCorners(\n mid,\n end,\n squishEase((frame - k1) / Math.max(k2 - k1, 1)),\n );\n };\n\n const upperScale = scaleAt(upperScaleY);\n const lowerScale = scaleAt(lowerScaleY);\n\n const upperBoxHeight = upperFontSize * capRatio * upperScale;\n const lowerBoxHeight = lowerFontSize * capRatio * lowerScale;\n const stackTop =\n (blockHeight - (upperBoxHeight + lineGap + lowerBoxHeight)) / 2;\n const upperBaseline = stackTop + upperBoxHeight;\n const lowerBaseline = upperBaseline + lineGap + lowerBoxHeight;\n\n const line = (\n text: string,\n family: string,\n size: number,\n baseline: number,\n scale: number,\n ) => (\n <text\n x={0}\n y={baseline}\n textLength={blockWidth}\n lengthAdjust=\"spacingAndGlyphs\"\n fontFamily={family}\n fontSize={size}\n fontWeight={800}\n fill={fill}\n transform={`matrix(1, 0, 0, ${scale}, 0, ${baseline * (1 - scale)})`}\n >\n {text}\n </text>\n );\n\n const block = (corners: Corners, position: [number, number]) => (\n <div\n style={{\n position: \"absolute\",\n left: position[0] - blockWidth / 2,\n top: position[1] - blockHeight / 2,\n width: blockWidth,\n height: blockHeight,\n transformOrigin: \"0 0\",\n transform: cornerPinMatrix(cornersRest, corners),\n }}\n >\n <svg\n width={blockWidth}\n height={blockHeight}\n viewBox={`0 0 ${blockWidth} ${blockHeight}`}\n style={{ display: \"block\", overflow: \"hidden\" }}\n >\n {line(\n upperText,\n upperFontFamily,\n upperFontSize,\n upperBaseline,\n upperScale,\n )}\n {line(\n lowerText,\n lowerFontFamily,\n lowerFontSize,\n lowerBaseline,\n lowerScale,\n )}\n </svg>\n </div>\n );\n\n return (\n <div\n className={className}\n style={{ position: \"absolute\", inset: 0, overflow: \"hidden\" }}\n >\n <div\n style={{\n position: \"absolute\",\n left: (compWidth - width * stageScale) / 2,\n top: (compHeight - height * stageScale) / 2,\n width,\n height,\n scale: `${stageScale}`,\n transformOrigin: \"0 0\",\n }}\n >\n {block(cornersAt(upperCornersMid, upperCornersEnd), upperBlockPosition)}\n {block(cornersAt(lowerCornersMid, lowerCornersEnd), lowerBlockPosition)}\n </div>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/perspective-squeeze.tsx"}diff --git a/registry-artifacts/push-through.json b/registry-artifacts/push-through.jsonindex f7754162..f6bd860c 100644--- a/registry-artifacts/push-through.json+++ b/registry-artifacts/push-through.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/push-through/index.tsx",- "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nexport type PushThroughProps = {\n zoom?: number;\n blur?: number;\n};\n\nconst PushThroughPresentation: React.FC<\n TransitionPresentationComponentProps<PushThroughProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const { zoom = 2.4, blur = 14 } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n if (!entering) {\n const exitStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.4, 0.62], [1, 0], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n }),\n transform: `scale(${interpolate(p, [0, 0.65], [1, zoom], {\n ...clampOpts,\n easing: Easing.in(Easing.cubic),\n })})`,\n filter: `blur(${interpolate(p, [0.15, 0.6], [0, blur], clampOpts)}px)`,\n };\n return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;\n }\n\n const childStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.3, 0.5], [0, 1], clampOpts),\n transform: `scale(${interpolate(p, [0.3, 0.88, 1], [0.68, 1.02, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n })})`,\n filter: `blur(${interpolate(p, [0.3, 0.75], [blur * 0.7, 0], clampOpts)}px)`,\n };\n\n return <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>;\n};\n\nexport function pushThrough(\n props: PushThroughProps = {},\n): TransitionPresentation<PushThroughProps> {\n return {\n component: PushThroughPresentation,\n props,\n };\n}\n",+ "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nexport type PushThroughProps = {\n zoom?: number;\n blur?: number;\n};\n\nconst PushThroughPresentation: React.FC<\n TransitionPresentationComponentProps<PushThroughProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const { zoom = 2.4, blur = 14 } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n if (!entering) {\n const exitStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.4, 0.62], [1, 0], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n }),\n scale: `${interpolate(p, [0, 0.65], [1, zoom], {\n ...clampOpts,\n easing: Easing.in(Easing.cubic),\n })}`,\n filter: `blur(${interpolate(p, [0.15, 0.6], [0, blur], clampOpts)}px)`,\n };\n return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;\n }\n\n const childStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.3, 0.5], [0, 1], clampOpts),\n scale: `${interpolate(p, [0.3, 0.88, 1], [0.68, 1.02, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n })}`,\n filter: `blur(${interpolate(p, [0.3, 0.75], [blur * 0.7, 0], clampOpts)}px)`,\n };\n\n return <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>;\n};\n\nexport function pushThrough(\n props: PushThroughProps = {},\n): TransitionPresentation<PushThroughProps> {\n return {\n component: PushThroughPresentation,\n props,\n };\n}\n","type": "registry:component","target": "components/remocn/push-through.tsx"}diff --git a/registry-artifacts/reel.json b/registry-artifacts/reel.jsonindex 5171cdae..cd3cd798 100644--- a/registry-artifacts/reel.json+++ b/registry-artifacts/reel.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/reel/index.tsx",- "content": "\"use client\";\n\nimport {\n AbsoluteFill,\n Easing,\n Img,\n interpolate,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nconst clamp = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\nconst EASE_OUT = Easing.out(Easing.cubic);\n\nexport type ReelProps = {\n images: string[];\n width?: number;\n height?: number;\n radius?: number;\n step?: number;\n reveal?: number;\n objectPosition?: string;\n background?: string;\n};\n\nexport function Reel({\n images,\n width = 1180,\n height = 676,\n radius = 16,\n step = 20,\n reveal = 13,\n objectPosition = \"top\",\n background = \"#050506\",\n}: ReelProps) {\n const frame = useCurrentFrame();\n const { width: compWidth, height: compHeight } = useVideoConfig();\n const left = (compWidth - width) / 2;\n const top = (compHeight - height) / 2;\n\n return (\n <AbsoluteFill>\n {images.map((src, i) => {\n const p = interpolate(frame, [i * step, i * step + reveal], [0, 1], {\n ...clamp,\n easing: EASE_OUT,\n });\n if (p <= 0) return null;\n const inset = (1 - p) * 50;\n const imgScale = interpolate(p, [0, 1], [1.08, 1], clamp);\n return (\n <div\n key={i}\n style={{\n position: \"absolute\",\n left,\n top,\n width,\n height,\n zIndex: i,\n clipPath: `inset(${inset}% ${inset}% round ${radius}px)`,\n WebkitClipPath: `inset(${inset}% ${inset}% round ${radius}px)`,\n background,\n boxShadow: \"0 30px 80px rgba(0,0,0,0.6)\",\n willChange: \"clip-path\",\n }}\n >\n <Img\n src={src}\n style={{\n width: \"100%\",\n height: \"100%\",\n objectFit: \"cover\",\n objectPosition,\n transform: `scale(${imgScale})`,\n willChange: \"transform\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n borderRadius: radius,\n border: \"1px solid rgba(255,255,255,0.08)\",\n }}\n />\n </div>\n );\n })}\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport {\n AbsoluteFill,\n Easing,\n Img,\n interpolate,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nconst clamp = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\nconst EASE_OUT = Easing.out(Easing.cubic);\n\nexport type ReelProps = {\n images: string[];\n width?: number;\n height?: number;\n radius?: number;\n step?: number;\n reveal?: number;\n objectPosition?: string;\n background?: string;\n};\n\nexport function Reel({\n images,\n width = 1180,\n height = 676,\n radius = 16,\n step = 20,\n reveal = 13,\n objectPosition = \"top\",\n background = \"#050506\",\n}: ReelProps) {\n const frame = useCurrentFrame();\n const { width: compWidth, height: compHeight } = useVideoConfig();\n const left = (compWidth - width) / 2;\n const top = (compHeight - height) / 2;\n\n return (\n <AbsoluteFill>\n {images.map((src, i) => {\n const p = interpolate(frame, [i * step, i * step + reveal], [0, 1], {\n ...clamp,\n easing: EASE_OUT,\n });\n if (p <= 0) return null;\n const inset = (1 - p) * 50;\n const imgScale = interpolate(p, [0, 1], [1.08, 1], clamp);\n return (\n <div\n key={i}\n style={{\n position: \"absolute\",\n left,\n top,\n width,\n height,\n zIndex: i,\n clipPath: `inset(${inset}% ${inset}% round ${radius}px)`,\n WebkitClipPath: `inset(${inset}% ${inset}% round ${radius}px)`,\n background,\n boxShadow: \"0 30px 80px rgba(0,0,0,0.6)\",\n willChange: \"clip-path\",\n }}\n >\n <Img\n src={src}\n style={{\n width: \"100%\",\n height: \"100%\",\n objectFit: \"cover\",\n objectPosition,\n scale: `${imgScale}`,\n willChange: \"transform\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n borderRadius: radius,\n border: \"1px solid rgba(255,255,255,0.08)\",\n }}\n />\n </div>\n );\n })}\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/reel.tsx"}diff --git a/registry-artifacts/rgb-glitch-text.json b/registry-artifacts/rgb-glitch-text.jsonindex f02faf8f..44edb203 100644--- a/registry-artifacts/rgb-glitch-text.json+++ b/registry-artifacts/rgb-glitch-text.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/rgb-glitch-text/index.tsx",- "content": "\"use client\";\n\nimport { random, useCurrentFrame } from \"remotion\";\n\nexport interface RGBGlitchTextProps {\n text: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n glitchAt?: number;\n glitchDuration?: number;\n intensity?: number;\n seed?: string;\n speed?: number;\n className?: string;\n}\n\nexport function RGBGlitchText({\n text,\n fontSize = 96,\n color = \"#171717\",\n fontWeight = 700,\n glitchAt = 20,\n glitchDuration = 8,\n intensity = 6,\n seed = \"glitch\",\n speed = 1,\n className,\n}: RGBGlitchTextProps) {\n const frame = useCurrentFrame() * speed;\n\n const isGlitching = frame >= glitchAt && frame < glitchAt + glitchDuration;\n\n const offset = (axisSeed: string, scale: number) =>\n (random(`${seed}-${axisSeed}-${frame}`) * 2 - 1) * scale;\n\n const rX = isGlitching ? offset(\"r-x\", intensity) : 0;\n const rY = isGlitching ? offset(\"r-y\", intensity * 0.4) : 0;\n const gX = isGlitching ? offset(\"g-x\", intensity) : 0;\n const gY = isGlitching ? offset(\"g-y\", intensity * 0.4) : 0;\n const bX = isGlitching ? offset(\"b-x\", intensity) : 0;\n const bY = isGlitching ? offset(\"b-y\", intensity * 0.4) : 0;\n\n const copyOpacity = isGlitching ? 1 : 0;\n\n const baseStyle: React.CSSProperties = {\n position: \"absolute\",\n top: 0,\n left: 0,\n fontSize,\n fontWeight,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n whiteSpace: \"pre\",\n mixBlendMode: \"multiply\",\n };\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"#fafafa\",\n }}\n >\n <div\n className={className}\n style={{ position: \"relative\", display: \"inline-block\" }}\n >\n <span\n style={{\n position: \"relative\",\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n whiteSpace: \"pre\",\n }}\n >\n {text}\n </span>\n <span\n style={{\n ...baseStyle,\n color: \"#ff0040\",\n opacity: copyOpacity,\n transform: `translateX(${rX}px) translateY(${rY}px)`,\n }}\n >\n {text}\n </span>\n <span\n style={{\n ...baseStyle,\n color: \"#00ff80\",\n opacity: copyOpacity,\n transform: `translateX(${gX}px) translateY(${gY}px)`,\n }}\n >\n {text}\n </span>\n <span\n style={{\n ...baseStyle,\n color: \"#0080ff\",\n opacity: copyOpacity,\n transform: `translateX(${bX}px) translateY(${bY}px)`,\n }}\n >\n {text}\n </span>\n </div>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { random, useCurrentFrame } from \"remotion\";\n\nexport interface RGBGlitchTextProps {\n text: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n glitchAt?: number;\n glitchDuration?: number;\n intensity?: number;\n seed?: string;\n speed?: number;\n className?: string;\n}\n\nexport function RGBGlitchText({\n text,\n fontSize = 96,\n color = \"#171717\",\n fontWeight = 700,\n glitchAt = 20,\n glitchDuration = 8,\n intensity = 6,\n seed = \"glitch\",\n speed = 1,\n className,\n}: RGBGlitchTextProps) {\n const frame = useCurrentFrame() * speed;\n\n const isGlitching = frame >= glitchAt && frame < glitchAt + glitchDuration;\n\n const offset = (axisSeed: string, scale: number) =>\n (random(`${seed}-${axisSeed}-${frame}`) * 2 - 1) * scale;\n\n const rX = isGlitching ? offset(\"r-x\", intensity) : 0;\n const rY = isGlitching ? offset(\"r-y\", intensity * 0.4) : 0;\n const gX = isGlitching ? offset(\"g-x\", intensity) : 0;\n const gY = isGlitching ? offset(\"g-y\", intensity * 0.4) : 0;\n const bX = isGlitching ? offset(\"b-x\", intensity) : 0;\n const bY = isGlitching ? offset(\"b-y\", intensity * 0.4) : 0;\n\n const copyOpacity = isGlitching ? 1 : 0;\n\n const baseStyle: React.CSSProperties = {\n position: \"absolute\",\n top: 0,\n left: 0,\n fontSize,\n fontWeight,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n whiteSpace: \"pre\",\n mixBlendMode: \"multiply\",\n };\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"#fafafa\",\n }}\n >\n <div\n className={className}\n style={{ position: \"relative\", display: \"inline-block\" }}\n >\n <span\n style={{\n position: \"relative\",\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n whiteSpace: \"pre\",\n }}\n >\n {text}\n </span>\n <span\n style={{\n ...baseStyle,\n color: \"#ff0040\",\n opacity: copyOpacity,\n translate: `${rX}px ${rY}px`,\n }}\n >\n {text}\n </span>\n <span\n style={{\n ...baseStyle,\n color: \"#00ff80\",\n opacity: copyOpacity,\n translate: `${gX}px ${gY}px`,\n }}\n >\n {text}\n </span>\n <span\n style={{\n ...baseStyle,\n color: \"#0080ff\",\n opacity: copyOpacity,\n translate: `${bX}px ${bY}px`,\n }}\n >\n {text}\n </span>\n </div>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/rgb-glitch-text.tsx"}diff --git a/registry-artifacts/ripple-zoom.json b/registry-artifacts/ripple-zoom.jsonindex 5645db21..e380bf78 100644--- a/registry-artifacts/ripple-zoom.json+++ b/registry-artifacts/ripple-zoom.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/ripple-zoom/index.tsx",- "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\nimport { ShaderGrainGradient } from \"@/components/remocn/shader-grain-gradient\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nconst DEFAULT_COLORS = [\"#3a3a52\", \"#4a4a68\", \"#8f88ae\"];\n\nexport type RippleZoomProps = {\n colors?: string[];\n colorBack?: string;\n intensity?: number;\n softness?: number;\n noise?: number;\n zoom?: number;\n speed?: number;\n};\n\nconst RippleZoomPresentation: React.FC<\n TransitionPresentationComponentProps<RippleZoomProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n colors = DEFAULT_COLORS,\n colorBack = \"#141318\",\n intensity = 0.5,\n softness = 0.5,\n noise = 0.5,\n zoom = 4,\n speed = 1,\n } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n if (!entering) {\n const exitStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.35, 0.55], [1, 0], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n }),\n transform: `scale(${interpolate(p, [0.3, 0.62], [1, 1.6], {\n ...clampOpts,\n easing: Easing.in(Easing.cubic),\n })})`,\n };\n return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;\n }\n\n const fieldOpacity = interpolate(p, [0.08, 0.32], [0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n });\n const fieldScale = interpolate(p, [0.32, 1], [0.2, zoom], {\n ...clampOpts,\n easing: Easing.bezier(0.7, 0, 0.3, 1),\n });\n\n const childStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.45, 0.62], [0, 1], clampOpts),\n transform: `scale(${interpolate(p, [0.42, 0.97], [0.2, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.33, 1, 0.68, 1),\n })})`,\n filter: `blur(${interpolate(p, [0.42, 0.8], [8, 0], clampOpts)}px)`,\n };\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={{ opacity: fieldOpacity, pointerEvents: \"none\" }}>\n <ShaderGrainGradient\n speed={speed}\n shape=\"ripple\"\n colors={colors}\n colorBack={colorBack}\n intensity={intensity}\n softness={softness}\n noise={noise}\n scale={fieldScale}\n />\n </AbsoluteFill>\n <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>\n </AbsoluteFill>\n );\n};\n\nexport function rippleZoom(\n props: RippleZoomProps = {},\n): TransitionPresentation<RippleZoomProps> {\n return {\n component: RippleZoomPresentation,\n props,\n };\n}\n",+ "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\nimport { ShaderGrainGradient } from \"@/components/remocn/shader-grain-gradient\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nconst DEFAULT_COLORS = [\"#3a3a52\", \"#4a4a68\", \"#8f88ae\"];\n\nexport type RippleZoomProps = {\n colors?: string[];\n colorBack?: string;\n intensity?: number;\n softness?: number;\n noise?: number;\n zoom?: number;\n speed?: number;\n};\n\nconst RippleZoomPresentation: React.FC<\n TransitionPresentationComponentProps<RippleZoomProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n colors = DEFAULT_COLORS,\n colorBack = \"#141318\",\n intensity = 0.5,\n softness = 0.5,\n noise = 0.5,\n zoom = 4,\n speed = 1,\n } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n if (!entering) {\n const exitStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.35, 0.55], [1, 0], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n }),\n scale: `${interpolate(p, [0.3, 0.62], [1, 1.6], {\n ...clampOpts,\n easing: Easing.in(Easing.cubic),\n })}`,\n };\n return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;\n }\n\n const fieldOpacity = interpolate(p, [0.08, 0.32], [0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n });\n const fieldScale = interpolate(p, [0.32, 1], [0.2, zoom], {\n ...clampOpts,\n easing: Easing.bezier(0.7, 0, 0.3, 1),\n });\n\n const childStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.45, 0.62], [0, 1], clampOpts),\n scale: `${interpolate(p, [0.42, 0.97], [0.2, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.33, 1, 0.68, 1),\n })}`,\n filter: `blur(${interpolate(p, [0.42, 0.8], [8, 0], clampOpts)}px)`,\n };\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={{ opacity: fieldOpacity, pointerEvents: \"none\" }}>\n <ShaderGrainGradient\n speed={speed}\n shape=\"ripple\"\n colors={colors}\n colorBack={colorBack}\n intensity={intensity}\n softness={softness}\n noise={noise}\n scale={fieldScale}\n />\n </AbsoluteFill>\n <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>\n </AbsoluteFill>\n );\n};\n\nexport function rippleZoom(\n props: RippleZoomProps = {},\n): TransitionPresentation<RippleZoomProps> {\n return {\n component: RippleZoomPresentation,\n props,\n };\n}\n","type": "registry:component","target": "components/remocn/ripple-zoom.tsx"}diff --git a/registry-artifacts/rolling-number.json b/registry-artifacts/rolling-number.jsonindex 28e8f42d..69b8d23d 100644--- a/registry-artifacts/rolling-number.json+++ b/registry-artifacts/rolling-number.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/rolling-number/index.tsx",- "content": "\"use client\";\n\nimport { loadFont as loadMono } from \"@remotion/google-fonts/JetBrainsMono\";\nimport type React from \"react\";\nimport {\n AbsoluteFill,\n Easing,\n interpolate,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nconst { fontFamily: MONO_FAMILY } = loadMono();\n\nexport interface RollingNumberProps {\n from?: number;\n to?: number;\n fontSize?: number;\n color?: string;\n speed?: number;\n}\n\nconst COUNT_PORTION = 0.8;\nconst COUNT_EASING = Easing.out(Easing.poly(4));\nconst REVEAL_BAND = 0.4;\nconst REVEAL_EASING = Easing.inOut(Easing.sin);\nconst REVEAL_RISE_EM = 0.32;\n\nfunction easedProgress(\n frame: number,\n speed: number,\n durationInFrames: number,\n): number {\n return interpolate(\n frame * speed,\n [0, durationInFrames * COUNT_PORTION],\n [0, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: COUNT_EASING,\n },\n );\n}\n\nfunction placeTravel(start: number, end: number, place: number): number {\n const pow = 10 ** place;\n const up = end >= start;\n const diff = Math.abs(end - start);\n const startDigit = Math.floor(start / pow) % 10;\n const finalDigit = Math.floor(end / pow) % 10;\n const fullTurns = Math.floor(diff / (pow * 10));\n const stepDelta = up\n ? (finalDigit - startDigit + 10) % 10\n : (startDigit - finalDigit + 10) % 10;\n const magnitude = fullTurns * 10 + stepDelta;\n return up ? magnitude : -magnitude;\n}\n\nfunction placeReveal(current: number, place: number): number {\n if (place === 0) return 1;\n const threshold = 10 ** place;\n return interpolate(current, [threshold * REVEAL_BAND, threshold], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: REVEAL_EASING,\n });\n}\n\nfunction wrap10(value: number): number {\n return ((value % 10) + 10) % 10;\n}\n\nfunction DigitColumn({\n value,\n fontSize,\n reveal,\n}: {\n value: number;\n fontSize: number;\n reveal: number;\n}) {\n const cellHeight = fontSize * 1.1;\n return (\n <span\n style={{\n display: \"inline-block\",\n overflow: \"hidden\",\n height: cellHeight,\n width: \"0.62em\",\n verticalAlign: \"top\",\n textAlign: \"center\",\n opacity: reveal,\n transform: `translateY(${(1 - reveal) * fontSize * REVEAL_RISE_EM}px)`,\n }}\n >\n <span\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n transform: `translateY(${-value * cellHeight}px)`,\n }}\n >\n {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0].map((d, i) => (\n <span\n key={i}\n style={{ height: cellHeight, lineHeight: `${cellHeight}px` }}\n >\n {d}\n </span>\n ))}\n </span>\n </span>\n );\n}\n\nexport function RollingNumber({\n from = 0,\n to = 24813,\n fontSize = 120,\n color = \"#171717\",\n speed = 1,\n}: RollingNumberProps) {\n const frame = useCurrentFrame();\n const { durationInFrames } = useVideoConfig();\n\n const start = Math.max(0, Math.round(from));\n const end = Math.max(0, Math.round(to));\n\n const e = easedProgress(frame, speed, durationInFrames);\n const current = start + e * (end - start);\n\n const maxVal = Math.max(start, end);\n const digits = String(maxVal);\n const cellHeight = fontSize * 1.1;\n\n const cells: React.ReactNode[] = [];\n for (let place = 0; place < digits.length; place++) {\n if (place > 0 && place % 3 === 0) {\n cells.unshift(\n <span\n key={`s${place}`}\n style={{\n display: \"inline-block\",\n width: \"0.34em\",\n height: cellHeight,\n }}\n />,\n );\n }\n const pow = 10 ** place;\n const startDigit = Math.floor(start / pow) % 10;\n const travel = placeTravel(start, end, place);\n const pos = startDigit + e * travel;\n cells.unshift(\n <DigitColumn\n key={`d${place}`}\n value={wrap10(pos)}\n fontSize={fontSize}\n reveal={placeReveal(current, place)}\n />,\n );\n }\n\n return (\n <AbsoluteFill\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n alignItems: \"flex-start\",\n fontSize,\n fontWeight: 800,\n color,\n fontFamily: MONO_FAMILY,\n fontVariantNumeric: \"tabular-nums\",\n letterSpacing: \"-0.03em\",\n lineHeight: 1,\n }}\n >\n {cells}\n </div>\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport { loadFont as loadMono } from \"@remotion/google-fonts/JetBrainsMono\";\nimport type React from \"react\";\nimport {\n AbsoluteFill,\n Easing,\n interpolate,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nconst { fontFamily: MONO_FAMILY } = loadMono();\n\nexport interface RollingNumberProps {\n from?: number;\n to?: number;\n fontSize?: number;\n color?: string;\n speed?: number;\n}\n\nconst COUNT_PORTION = 0.8;\nconst COUNT_EASING = Easing.out(Easing.poly(4));\nconst REVEAL_BAND = 0.4;\nconst REVEAL_EASING = Easing.inOut(Easing.sin);\nconst REVEAL_RISE_EM = 0.32;\n\nfunction easedProgress(\n frame: number,\n speed: number,\n durationInFrames: number,\n): number {\n return interpolate(\n frame * speed,\n [0, durationInFrames * COUNT_PORTION],\n [0, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: COUNT_EASING,\n },\n );\n}\n\nfunction placeTravel(start: number, end: number, place: number): number {\n const pow = 10 ** place;\n const up = end >= start;\n const diff = Math.abs(end - start);\n const startDigit = Math.floor(start / pow) % 10;\n const finalDigit = Math.floor(end / pow) % 10;\n const fullTurns = Math.floor(diff / (pow * 10));\n const stepDelta = up\n ? (finalDigit - startDigit + 10) % 10\n : (startDigit - finalDigit + 10) % 10;\n const magnitude = fullTurns * 10 + stepDelta;\n return up ? magnitude : -magnitude;\n}\n\nfunction placeReveal(current: number, place: number): number {\n if (place === 0) return 1;\n const threshold = 10 ** place;\n return interpolate(current, [threshold * REVEAL_BAND, threshold], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: REVEAL_EASING,\n });\n}\n\nfunction wrap10(value: number): number {\n return ((value % 10) + 10) % 10;\n}\n\nfunction DigitColumn({\n value,\n fontSize,\n reveal,\n}: {\n value: number;\n fontSize: number;\n reveal: number;\n}) {\n const cellHeight = fontSize * 1.1;\n return (\n <span\n style={{\n display: \"inline-block\",\n overflow: \"hidden\",\n height: cellHeight,\n width: \"0.62em\",\n verticalAlign: \"top\",\n textAlign: \"center\",\n opacity: reveal,\n translate: `0 ${(1 - reveal) * fontSize * REVEAL_RISE_EM}px`,\n }}\n >\n <span\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n translate: `0 ${-value * cellHeight}px`,\n }}\n >\n {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0].map((d, i) => (\n <span\n key={i}\n style={{ height: cellHeight, lineHeight: `${cellHeight}px` }}\n >\n {d}\n </span>\n ))}\n </span>\n </span>\n );\n}\n\nexport function RollingNumber({\n from = 0,\n to = 24813,\n fontSize = 120,\n color = \"#171717\",\n speed = 1,\n}: RollingNumberProps) {\n const frame = useCurrentFrame();\n const { durationInFrames } = useVideoConfig();\n\n const start = Math.max(0, Math.round(from));\n const end = Math.max(0, Math.round(to));\n\n const e = easedProgress(frame, speed, durationInFrames);\n const current = start + e * (end - start);\n\n const maxVal = Math.max(start, end);\n const digits = String(maxVal);\n const cellHeight = fontSize * 1.1;\n\n const cells: React.ReactNode[] = [];\n for (let place = 0; place < digits.length; place++) {\n if (place > 0 && place % 3 === 0) {\n cells.unshift(\n <span\n key={`s${place}`}\n style={{\n display: \"inline-block\",\n width: \"0.34em\",\n height: cellHeight,\n }}\n />,\n );\n }\n const pow = 10 ** place;\n const startDigit = Math.floor(start / pow) % 10;\n const travel = placeTravel(start, end, place);\n const pos = startDigit + e * travel;\n cells.unshift(\n <DigitColumn\n key={`d${place}`}\n value={wrap10(pos)}\n fontSize={fontSize}\n reveal={placeReveal(current, place)}\n />,\n );\n }\n\n return (\n <AbsoluteFill\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n alignItems: \"flex-start\",\n fontSize,\n fontWeight: 800,\n color,\n fontFamily: MONO_FAMILY,\n fontVariantNumeric: \"tabular-nums\",\n letterSpacing: \"-0.03em\",\n lineHeight: 1,\n }}\n >\n {cells}\n </div>\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/rolling-number.tsx"}diff --git a/registry-artifacts/scale-down-fade.json b/registry-artifacts/scale-down-fade.jsonindex 835e7bf7..d5b7aa25 100644--- a/registry-artifacts/scale-down-fade.json+++ b/registry-artifacts/scale-down-fade.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/scale-down-fade/index.tsx",- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface ScaleDownFadeProps {\n text: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function ScaleDownFade({\n text,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: ScaleDownFadeProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const enterDurFrames = 16;\n const exitDurFrames = 11;\n const exitStart = Math.max(enterDurFrames, durationInFrames - exitDurFrames);\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterP = interpolate(frame, [0, enterDurFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(frame, [exitStart, durationInFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const yEnter = interpolate(frame, [0, enterDurFrames], [8, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const yExit = interpolate(frame, [exitStart, durationInFrames], [0, -8], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const y = yEnter + yExit;\n\n const scaleEnter = interpolate(frame, [0, enterDurFrames], [1.04, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const scaleExitDelta = interpolate(\n frame,\n [exitStart, durationInFrames],\n [0, -0.06],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n },\n );\n\n const scale = scaleEnter + scaleExitDelta;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity,\n transform: `translateY(${y}px) scale(${scale})`,\n }}\n >\n {text}\n </span>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface ScaleDownFadeProps {\n text: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function ScaleDownFade({\n text,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: ScaleDownFadeProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n const enterDurFrames = 16;\n const exitDurFrames = 11;\n const exitStart = Math.max(enterDurFrames, durationInFrames - exitDurFrames);\n\n const enterEasing = Easing.bezier(0.22, 1, 0.36, 1);\n const exitEasing = Easing.bezier(0.64, 0, 0.78, 0);\n\n const enterP = interpolate(frame, [0, enterDurFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const exitP = interpolate(frame, [exitStart, durationInFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const opacity = enterP * (1 - exitP);\n\n const yEnter = interpolate(frame, [0, enterDurFrames], [8, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const yExit = interpolate(frame, [exitStart, durationInFrames], [0, -8], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const y = yEnter + yExit;\n\n const scaleEnter = interpolate(frame, [0, enterDurFrames], [1.04, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const scaleExitDelta = interpolate(\n frame,\n [exitStart, durationInFrames],\n [0, -0.06],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n },\n );\n\n const scale = scaleEnter + scaleExitDelta;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity,\n translate: `0 ${y}px`,\n scale: `${scale}`,\n }}\n >\n {text}\n </span>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/scale-down-fade.tsx"}diff --git a/registry-artifacts/shared-axis-z.json b/registry-artifacts/shared-axis-z.jsonindex ce24bd3b..8e57377f 100644--- a/registry-artifacts/shared-axis-z.json+++ b/registry-artifacts/shared-axis-z.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/shared-axis-z/index.tsx",- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface SharedAxisZProps {\n fromText: string;\n toText: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function SharedAxisZ({\n fromText,\n toText,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: SharedAxisZProps) {\n const frame = useCurrentFrame() * speed;\n\n const enterDur = 16;\n const exitDur = 11;\n const overlapF = 3;\n const microDelayF = 1;\n\n const exitTotal = exitDur;\n const newStart = Math.max(0, exitTotal - overlapF + microDelayF);\n\n const exitEasing = Easing.bezier(0.4, 0, 1, 1);\n const enterEasing = Easing.bezier(0.2, 0, 0, 1);\n\n const fromOpacity = interpolate(frame, [0, exitDur], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n const fromScale = interpolate(frame, [0, exitDur], [1, 1.06], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n const fromBlur = interpolate(frame, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const local = frame - newStart;\n const toOpacity = interpolate(local, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const toScale = interpolate(local, [0, enterDur], [0.9, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const toBlur = interpolate(local, [0, enterDur], [2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const fontStack =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"transparent\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity: fromOpacity,\n transform: `scale(${fromScale})`,\n filter: `blur(${fromBlur}px)`,\n }}\n >\n {fromText}\n </span>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity: toOpacity,\n transform: `scale(${toScale})`,\n filter: `blur(${toBlur}px)`,\n }}\n >\n {toText}\n </span>\n </div>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface SharedAxisZProps {\n fromText: string;\n toText: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function SharedAxisZ({\n fromText,\n toText,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: SharedAxisZProps) {\n const frame = useCurrentFrame() * speed;\n\n const enterDur = 16;\n const exitDur = 11;\n const overlapF = 3;\n const microDelayF = 1;\n\n const exitTotal = exitDur;\n const newStart = Math.max(0, exitTotal - overlapF + microDelayF);\n\n const exitEasing = Easing.bezier(0.4, 0, 1, 1);\n const enterEasing = Easing.bezier(0.2, 0, 0, 1);\n\n const fromOpacity = interpolate(frame, [0, exitDur], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n const fromScale = interpolate(frame, [0, exitDur], [1, 1.06], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n const fromBlur = interpolate(frame, [0, exitDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: exitEasing,\n });\n\n const local = frame - newStart;\n const toOpacity = interpolate(local, [0, enterDur], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const toScale = interpolate(local, [0, enterDur], [0.9, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n const toBlur = interpolate(local, [0, enterDur], [2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing: enterEasing,\n });\n\n const fontStack =\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\";\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n background: \"transparent\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity: fromOpacity,\n scale: `${fromScale}`,\n filter: `blur(${fromBlur}px)`,\n }}\n >\n {fromText}\n </span>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <span\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily: fontStack,\n display: \"inline-block\",\n transformOrigin: \"50% 50%\",\n opacity: toOpacity,\n scale: `${toScale}`,\n filter: `blur(${toBlur}px)`,\n }}\n >\n {toText}\n </span>\n </div>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/shared-axis-z.tsx"}diff --git a/registry-artifacts/short-slide-right.json b/registry-artifacts/short-slide-right.jsonindex b6b74009..e6ab82b4 100644--- a/registry-artifacts/short-slide-right.json+++ b/registry-artifacts/short-slide-right.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/short-slide-right/index.tsx",- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface ShortSlideRightProps {\n text: string;\n distance?: number;\n staggerDelay?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function ShortSlideRight({\n text,\n distance = 24,\n staggerDelay = 3,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: ShortSlideRightProps) {\n const frame = useCurrentFrame() * speed;\n\n const words = text.split(\" \");\n\n const enterDur = 16;\n const travelDur = 8;\n const wordOpacityDur = 6;\n const easing = Easing.bezier(0.2, 0.8, 0.2, 1);\n\n const x = interpolate(frame, [0, travelDur], [-distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n\n const blurVal = interpolate(frame, [0, enterDur], [1.2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n display: \"inline-block\",\n transform: `translateX(${x}px)`,\n filter: `blur(${blurVal}px)`,\n }}\n >\n {words.map((word, i) => {\n const opacity = interpolate(\n frame - i * staggerDelay,\n [0, wordOpacityDur],\n [0, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n },\n );\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n opacity,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface ShortSlideRightProps {\n text: string;\n distance?: number;\n staggerDelay?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function ShortSlideRight({\n text,\n distance = 24,\n staggerDelay = 3,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: ShortSlideRightProps) {\n const frame = useCurrentFrame() * speed;\n\n const words = text.split(\" \");\n\n const enterDur = 16;\n const travelDur = 8;\n const wordOpacityDur = 6;\n const easing = Easing.bezier(0.2, 0.8, 0.2, 1);\n\n const x = interpolate(frame, [0, travelDur], [-distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n\n const blurVal = interpolate(frame, [0, enterDur], [1.2, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n display: \"inline-block\",\n translate: `${x}px`,\n filter: `blur(${blurVal}px)`,\n }}\n >\n {words.map((word, i) => {\n const opacity = interpolate(\n frame - i * staggerDelay,\n [0, wordOpacityDur],\n [0, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n },\n );\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n opacity,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/short-slide-right.tsx"}diff --git a/registry-artifacts/simulated-cursor.json b/registry-artifacts/simulated-cursor.jsonindex 574ed4c1..19ac4365 100644--- a/registry-artifacts/simulated-cursor.json+++ b/registry-artifacts/simulated-cursor.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/simulated-cursor/index.tsx",- "content": "\"use client\";\n\nimport { interpolate, spring, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface CursorPoint {\n x: number;\n y: number;\n hold?: number;\n click?: boolean;\n}\n\nexport interface SimulatedCursorProps {\n points?: CursorPoint[];\n color?: string;\n size?: number;\n speed?: number;\n className?: string;\n}\n\nconst DEFAULT_POINTS: CursorPoint[] = [\n { x: 200, y: 150, hold: 20 },\n { x: 800, y: 360, hold: 25, click: true },\n { x: 1050, y: 560, hold: 20 },\n];\n\nexport function SimulatedCursor({\n points = DEFAULT_POINTS,\n color = \"#ffffff\",\n size = 32,\n speed = 1,\n className,\n}: SimulatedCursorProps) {\n const frame = useCurrentFrame() * speed;\n const { fps, durationInFrames } = useVideoConfig();\n\n const travelPerLeg = 24;\n const segments: Array<{\n start: number;\n end: number;\n holdEnd: number;\n from: CursorPoint;\n to: CursorPoint;\n }> = [];\n\n let cursor = 0;\n for (let i = 0; i < points.length - 1; i++) {\n const from = points[i];\n const to = points[i + 1];\n const start = cursor;\n const end = start + travelPerLeg;\n const holdEnd = end + (to.hold ?? 15);\n segments.push({ start, end, holdEnd, from, to });\n cursor = holdEnd;\n }\n\n // Find current segment\n let x = points[0].x;\n let y = points[0].y;\n let activeClickFrame: number | null = null;\n let clickTarget: CursorPoint | null = null;\n\n if (segments.length === 0) {\n x = points[0].x;\n y = points[0].y;\n } else if (frame < segments[0].start + (points[0].hold ?? 0)) {\n x = points[0].x;\n y = points[0].y;\n } else {\n for (const seg of segments) {\n if (frame >= seg.start && frame < seg.holdEnd) {\n if (frame < seg.end) {\n // travelling\n x = interpolate(frame, [seg.start, seg.end], [seg.from.x, seg.to.x], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n y = interpolate(frame, [seg.start, seg.end], [seg.from.y, seg.to.y], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n } else {\n x = seg.to.x;\n y = seg.to.y;\n if (seg.to.click) {\n activeClickFrame = frame - seg.end;\n clickTarget = seg.to;\n }\n }\n break;\n }\n if (frame >= seg.holdEnd) {\n x = seg.to.x;\n y = seg.to.y;\n }\n }\n }\n\n // Click feedback\n let clickScale = 1;\n let rippleRadius = 0;\n let rippleOpacity = 0;\n if (activeClickFrame !== null && clickTarget) {\n const dip = spring({\n fps,\n frame: activeClickFrame,\n config: { damping: 10, stiffness: 200, mass: 0.6 },\n durationInFrames: 14,\n });\n clickScale = 1 - dip * 0.18;\n rippleRadius = interpolate(activeClickFrame, [0, 24], [4, 60], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n rippleOpacity = interpolate(activeClickFrame, [0, 24], [0.6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n }\n\n // Suppress unused warning when durationInFrames not used directly\n void durationInFrames;\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n overflow: \"hidden\",\n }}\n >\n {/* Click ripple */}\n {rippleOpacity > 0 && (\n <svg\n style={{\n position: \"absolute\",\n left: x - 80,\n top: y - 80,\n width: 160,\n height: 160,\n pointerEvents: \"none\",\n }}\n >\n <circle\n cx={80}\n cy={80}\n r={rippleRadius}\n fill=\"none\"\n stroke={color}\n strokeWidth={2}\n opacity={rippleOpacity}\n />\n </svg>\n )}\n\n {/* Cursor */}\n <div\n style={{\n position: \"absolute\",\n left: x,\n top: y,\n width: size,\n height: size,\n transform: `scale(${clickScale})`,\n transformOrigin: \"top left\",\n zIndex: 2147483647,\n pointerEvents: \"none\",\n willChange: \"transform, left, top\",\n }}\n >\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5 3L5 19L9.5 14.5L12.5 21L15 20L12 13.5L18.5 13.5L5 3Z\"\n fill={color}\n stroke=\"#000000\"\n strokeWidth={1.2}\n strokeLinejoin=\"round\"\n />\n </svg>\n </div>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { interpolate, spring, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface CursorPoint {\n x: number;\n y: number;\n hold?: number;\n click?: boolean;\n}\n\nexport interface SimulatedCursorProps {\n points?: CursorPoint[];\n color?: string;\n size?: number;\n speed?: number;\n className?: string;\n}\n\nconst DEFAULT_POINTS: CursorPoint[] = [\n { x: 200, y: 150, hold: 20 },\n { x: 800, y: 360, hold: 25, click: true },\n { x: 1050, y: 560, hold: 20 },\n];\n\nexport function SimulatedCursor({\n points = DEFAULT_POINTS,\n color = \"#ffffff\",\n size = 32,\n speed = 1,\n className,\n}: SimulatedCursorProps) {\n const frame = useCurrentFrame() * speed;\n const { fps, durationInFrames } = useVideoConfig();\n\n const travelPerLeg = 24;\n const segments: Array<{\n start: number;\n end: number;\n holdEnd: number;\n from: CursorPoint;\n to: CursorPoint;\n }> = [];\n\n let cursor = 0;\n for (let i = 0; i < points.length - 1; i++) {\n const from = points[i];\n const to = points[i + 1];\n const start = cursor;\n const end = start + travelPerLeg;\n const holdEnd = end + (to.hold ?? 15);\n segments.push({ start, end, holdEnd, from, to });\n cursor = holdEnd;\n }\n\n // Find current segment\n let x = points[0].x;\n let y = points[0].y;\n let activeClickFrame: number | null = null;\n let clickTarget: CursorPoint | null = null;\n\n if (segments.length === 0) {\n x = points[0].x;\n y = points[0].y;\n } else if (frame < segments[0].start + (points[0].hold ?? 0)) {\n x = points[0].x;\n y = points[0].y;\n } else {\n for (const seg of segments) {\n if (frame >= seg.start && frame < seg.holdEnd) {\n if (frame < seg.end) {\n // travelling\n x = interpolate(frame, [seg.start, seg.end], [seg.from.x, seg.to.x], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n y = interpolate(frame, [seg.start, seg.end], [seg.from.y, seg.to.y], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n } else {\n x = seg.to.x;\n y = seg.to.y;\n if (seg.to.click) {\n activeClickFrame = frame - seg.end;\n clickTarget = seg.to;\n }\n }\n break;\n }\n if (frame >= seg.holdEnd) {\n x = seg.to.x;\n y = seg.to.y;\n }\n }\n }\n\n // Click feedback\n let clickScale = 1;\n let rippleRadius = 0;\n let rippleOpacity = 0;\n if (activeClickFrame !== null && clickTarget) {\n const dip = spring({\n fps,\n frame: activeClickFrame,\n config: { damping: 10, stiffness: 200, mass: 0.6 },\n durationInFrames: 14,\n });\n clickScale = 1 - dip * 0.18;\n rippleRadius = interpolate(activeClickFrame, [0, 24], [4, 60], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n rippleOpacity = interpolate(activeClickFrame, [0, 24], [0.6, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n }\n\n // Suppress unused warning when durationInFrames not used directly\n void durationInFrames;\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n overflow: \"hidden\",\n }}\n >\n {/* Click ripple */}\n {rippleOpacity > 0 && (\n <svg\n style={{\n position: \"absolute\",\n left: x - 80,\n top: y - 80,\n width: 160,\n height: 160,\n pointerEvents: \"none\",\n }}\n >\n <circle\n cx={80}\n cy={80}\n r={rippleRadius}\n fill=\"none\"\n stroke={color}\n strokeWidth={2}\n opacity={rippleOpacity}\n />\n </svg>\n )}\n\n {/* Cursor */}\n <div\n style={{\n position: \"absolute\",\n left: x,\n top: y,\n width: size,\n height: size,\n scale: `${clickScale}`,\n transformOrigin: \"top left\",\n zIndex: 2147483647,\n pointerEvents: \"none\",\n willChange: \"transform, left, top\",\n }}\n >\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M5 3L5 19L9.5 14.5L12.5 21L15 20L12 13.5L18.5 13.5L5 3Z\"\n fill={color}\n stroke=\"#000000\"\n strokeWidth={1.2}\n strokeLinejoin=\"round\"\n />\n </svg>\n </div>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/simulated-cursor.tsx"}diff --git a/registry-artifacts/slide-swap.json b/registry-artifacts/slide-swap.jsonindex 230cca77..b7801474 100644--- a/registry-artifacts/slide-swap.json+++ b/registry-artifacts/slide-swap.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/slide-swap/index.tsx",- "content": "\"use client\";\n\nimport type { CSSProperties, ReactNode } from \"react\";\nimport {\n AbsoluteFill,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nexport type SlideSwapConfig = {\n sceneFrames: number;\n slideFrames: number;\n inDistance: number;\n inDamping: number;\n inStiffness: number;\n inMass: number;\n inFadeFrames: number;\n outFrames: number;\n outDistance: number;\n outPower: number;\n};\n\nexport const SLIDE_SWAP_DEFAULTS: SlideSwapConfig = {\n sceneFrames: 70,\n slideFrames: 30,\n inDistance: 0.28,\n inDamping: 60,\n inStiffness: 300,\n inMass: 0.5,\n inFadeFrames: 24,\n outFrames: 22,\n outDistance: 0.1,\n outPower: 5,\n};\n\nexport type SlideAxis = \"x\" | \"y\";\n\nconst translate = (axis: SlideAxis, v: number) =>\n axis === \"x\" ? `translateX(${v}px)` : `translateY(${v}px)`;\n\nexport const slideInStyle = (\n e: number,\n size: number,\n fps: number,\n config?: Partial<SlideSwapConfig>,\n axis: SlideAxis = \"x\",\n): CSSProperties => {\n const cfg = { ...SLIDE_SWAP_DEFAULTS, ...config };\n if (e >= cfg.slideFrames) return {};\n const p = spring({\n frame: Math.max(e, 0),\n fps,\n config: {\n damping: cfg.inDamping,\n stiffness: cfg.inStiffness,\n mass: cfg.inMass,\n overshootClamping: true,\n },\n });\n const tFade = Math.min(Math.max(e / cfg.inFadeFrames, 0), 1);\n return {\n transform: translate(axis, cfg.inDistance * size * (1 - p)),\n opacity: 1 - (1 - tFade) * (1 - tFade),\n willChange: \"transform, opacity\",\n };\n};\n\nexport const slideOutStyle = (\n e: number,\n size: number,\n config?: Partial<SlideSwapConfig>,\n axis: SlideAxis = \"x\",\n): CSSProperties => {\n const cfg = { ...SLIDE_SWAP_DEFAULTS, ...config };\n if (e <= 0) return {};\n const t = Math.min(e / cfg.outFrames, 1);\n return {\n transform: translate(axis, -cfg.outDistance * size * t ** cfg.outPower),\n opacity: 1 - t * t,\n willChange: \"transform, opacity\",\n };\n};\n\nexport type SlideSwapSceneDef = {\n name?: string;\n durationInFrames?: number;\n content: ReactNode;\n};\n\nexport type SlideSwapPhase = \"slide\" | \"dwell\" | \"exit\";\n\nexport type SlideSwapTimeline = {\n index: number;\n local: number;\n dwellFrames: number;\n phase: SlideSwapPhase;\n};\n\nexport const slideSwapTimeline = (\n frame: number,\n scenes: SlideSwapSceneDef[],\n config?: Partial<SlideSwapConfig>,\n opts?: { loop?: boolean },\n): SlideSwapTimeline => {\n const cfg = { ...SLIDE_SWAP_DEFAULTS, ...config };\n const lens = scenes.map((s) => s.durationInFrames ?? cfg.sceneFrames);\n const total = lens.reduce((a, b) => a + b, 0);\n let w = opts?.loop\n ? ((frame % total) + total) % total\n : Math.min(frame, total - 1);\n let index = 0;\n while (index < scenes.length - 1 && w >= lens[index]) {\n w -= lens[index];\n index += 1;\n }\n const local = Math.min(w, lens[index] - 1);\n const dwellFrames = lens[index];\n const exits = index < scenes.length - 1 || Boolean(opts?.loop);\n const enters = index > 0 || Boolean(opts?.loop);\n const phase: SlideSwapPhase =\n exits && local >= dwellFrames - cfg.outFrames\n ? \"exit\"\n : enters && local + 1 < cfg.slideFrames\n ? \"slide\"\n : \"dwell\";\n return { index, local, dwellFrames, phase };\n};\n\nexport interface SlideSwapScenesProps {\n scenes: SlideSwapSceneDef[];\n bg?: string;\n axis?: SlideAxis;\n config?: Partial<SlideSwapConfig>;\n loop?: boolean;\n style?: CSSProperties;\n}\n\nexport function SlideSwapScenes({\n scenes,\n bg,\n axis = \"x\",\n config,\n loop = false,\n style,\n}: SlideSwapScenesProps) {\n const frame = useCurrentFrame();\n const { width, height, fps } = useVideoConfig();\n const cfg = { ...SLIDE_SWAP_DEFAULTS, ...config };\n const size = axis === \"x\" ? width : height;\n\n const { index, local, dwellFrames, phase } = slideSwapTimeline(\n frame,\n scenes,\n cfg,\n { loop },\n );\n const cur = scenes[index];\n const enters = index > 0 || loop;\n\n const sceneStyle =\n phase === \"exit\"\n ? slideOutStyle(local - (dwellFrames - cfg.outFrames), size, cfg, axis)\n : enters\n ? slideInStyle(local + 1, size, fps, cfg, axis)\n : undefined;\n\n return (\n <AbsoluteFill style={{ background: bg, ...style }}>\n <AbsoluteFill style={sceneStyle}>{cur.content}</AbsoluteFill>\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport type { CSSProperties, ReactNode } from \"react\";\nimport {\n AbsoluteFill,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nexport type SlideSwapConfig = {\n sceneFrames: number;\n slideFrames: number;\n inDistance: number;\n inDamping: number;\n inStiffness: number;\n inMass: number;\n inFadeFrames: number;\n outFrames: number;\n outDistance: number;\n outPower: number;\n};\n\nexport const SLIDE_SWAP_DEFAULTS: SlideSwapConfig = {\n sceneFrames: 70,\n slideFrames: 30,\n inDistance: 0.28,\n inDamping: 60,\n inStiffness: 300,\n inMass: 0.5,\n inFadeFrames: 24,\n outFrames: 22,\n outDistance: 0.1,\n outPower: 5,\n};\n\nexport type SlideAxis = \"x\" | \"y\";\n\nconst translate = (axis: SlideAxis, v: number) =>\n axis === \"x\" ? `${v}px` : `0 ${v}px`;\n\nexport const slideInStyle = (\n e: number,\n size: number,\n fps: number,\n config?: Partial<SlideSwapConfig>,\n axis: SlideAxis = \"x\",\n): CSSProperties => {\n const cfg = { ...SLIDE_SWAP_DEFAULTS, ...config };\n if (e >= cfg.slideFrames) return {};\n const p = spring({\n frame: Math.max(e, 0),\n fps,\n config: {\n damping: cfg.inDamping,\n stiffness: cfg.inStiffness,\n mass: cfg.inMass,\n overshootClamping: true,\n },\n });\n const tFade = Math.min(Math.max(e / cfg.inFadeFrames, 0), 1);\n return {\n translate: translate(axis, cfg.inDistance * size * (1 - p)),\n opacity: 1 - (1 - tFade) * (1 - tFade),\n willChange: \"transform, opacity\",\n };\n};\n\nexport const slideOutStyle = (\n e: number,\n size: number,\n config?: Partial<SlideSwapConfig>,\n axis: SlideAxis = \"x\",\n): CSSProperties => {\n const cfg = { ...SLIDE_SWAP_DEFAULTS, ...config };\n if (e <= 0) return {};\n const t = Math.min(e / cfg.outFrames, 1);\n return {\n translate: translate(axis, -cfg.outDistance * size * t ** cfg.outPower),\n opacity: 1 - t * t,\n willChange: \"transform, opacity\",\n };\n};\n\nexport type SlideSwapSceneDef = {\n name?: string;\n durationInFrames?: number;\n content: ReactNode;\n};\n\nexport type SlideSwapPhase = \"slide\" | \"dwell\" | \"exit\";\n\nexport type SlideSwapTimeline = {\n index: number;\n local: number;\n dwellFrames: number;\n phase: SlideSwapPhase;\n};\n\nexport const slideSwapTimeline = (\n frame: number,\n scenes: SlideSwapSceneDef[],\n config?: Partial<SlideSwapConfig>,\n opts?: { loop?: boolean },\n): SlideSwapTimeline => {\n const cfg = { ...SLIDE_SWAP_DEFAULTS, ...config };\n const lens = scenes.map((s) => s.durationInFrames ?? cfg.sceneFrames);\n const total = lens.reduce((a, b) => a + b, 0);\n let w = opts?.loop\n ? ((frame % total) + total) % total\n : Math.min(frame, total - 1);\n let index = 0;\n while (index < scenes.length - 1 && w >= lens[index]) {\n w -= lens[index];\n index += 1;\n }\n const local = Math.min(w, lens[index] - 1);\n const dwellFrames = lens[index];\n const exits = index < scenes.length - 1 || Boolean(opts?.loop);\n const enters = index > 0 || Boolean(opts?.loop);\n const phase: SlideSwapPhase =\n exits && local >= dwellFrames - cfg.outFrames\n ? \"exit\"\n : enters && local + 1 < cfg.slideFrames\n ? \"slide\"\n : \"dwell\";\n return { index, local, dwellFrames, phase };\n};\n\nexport interface SlideSwapScenesProps {\n scenes: SlideSwapSceneDef[];\n bg?: string;\n axis?: SlideAxis;\n config?: Partial<SlideSwapConfig>;\n loop?: boolean;\n style?: CSSProperties;\n}\n\nexport function SlideSwapScenes({\n scenes,\n bg,\n axis = \"x\",\n config,\n loop = false,\n style,\n}: SlideSwapScenesProps) {\n const frame = useCurrentFrame();\n const { width, height, fps } = useVideoConfig();\n const cfg = { ...SLIDE_SWAP_DEFAULTS, ...config };\n const size = axis === \"x\" ? width : height;\n\n const { index, local, dwellFrames, phase } = slideSwapTimeline(\n frame,\n scenes,\n cfg,\n { loop },\n );\n const cur = scenes[index];\n const enters = index > 0 || loop;\n\n const sceneStyle =\n phase === \"exit\"\n ? slideOutStyle(local - (dwellFrames - cfg.outFrames), size, cfg, axis)\n : enters\n ? slideInStyle(local + 1, size, fps, cfg, axis)\n : undefined;\n\n return (\n <AbsoluteFill style={{ background: bg, ...style }}>\n <AbsoluteFill style={sceneStyle}>{cur.content}</AbsoluteFill>\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/slide-swap.tsx"}diff --git a/registry-artifacts/slot-machine-roll.json b/registry-artifacts/slot-machine-roll.jsonindex ed2c0998..f6976a4d 100644--- a/registry-artifacts/slot-machine-roll.json+++ b/registry-artifacts/slot-machine-roll.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/slot-machine-roll/index.tsx",- "content": "\"use client\";\n\nimport { spring, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface SlotMachineRollProps {\n from?: string;\n to?: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function SlotMachineRoll({\n from = \"$99\",\n to = \"$199\",\n fontSize = 120,\n color = \"#171717\",\n fontWeight = 700,\n speed = 1,\n className,\n}: SlotMachineRollProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const len = Math.max(from.length, to.length);\n const paddedFrom = from.padStart(len, \" \");\n const paddedTo = to.padStart(len, \" \");\n\n const columns = [];\n for (let i = 0; i < len; i++) {\n const raw = spring({\n frame: frame - i * 4,\n fps,\n config: { damping: 14 },\n });\n const t = Math.max(0, Math.min(1, raw));\n columns.push(\n <span\n key={i}\n style={{\n display: \"inline-block\",\n overflow: \"hidden\",\n height: \"1.1em\",\n lineHeight: \"1.1em\",\n verticalAlign: \"top\",\n width: \"0.7em\",\n textAlign: \"center\",\n }}\n >\n <span\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n transform: `translateY(${-t * fontSize * 1.1}px)`,\n }}\n >\n <span>{paddedFrom[i]}</span>\n <span>{paddedTo[i]}</span>\n </span>\n </span>,\n );\n }\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"white\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n lineHeight: 1.1,\n }}\n >\n {columns}\n </span>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { spring, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface SlotMachineRollProps {\n from?: string;\n to?: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function SlotMachineRoll({\n from = \"$99\",\n to = \"$199\",\n fontSize = 120,\n color = \"#171717\",\n fontWeight = 700,\n speed = 1,\n className,\n}: SlotMachineRollProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const len = Math.max(from.length, to.length);\n const paddedFrom = from.padStart(len, \" \");\n const paddedTo = to.padStart(len, \" \");\n\n const columns = [];\n for (let i = 0; i < len; i++) {\n const raw = spring({\n frame: frame - i * 4,\n fps,\n config: { damping: 14 },\n });\n const t = Math.max(0, Math.min(1, raw));\n columns.push(\n <span\n key={i}\n style={{\n display: \"inline-block\",\n overflow: \"hidden\",\n height: \"1.1em\",\n lineHeight: \"1.1em\",\n verticalAlign: \"top\",\n width: \"0.7em\",\n textAlign: \"center\",\n }}\n >\n <span\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n translate: `0 ${-t * fontSize * 1.1}px`,\n }}\n >\n <span>{paddedFrom[i]}</span>\n <span>{paddedTo[i]}</span>\n </span>\n </span>,\n );\n }\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"white\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n lineHeight: 1.1,\n }}\n >\n {columns}\n </span>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/slot-machine-roll.tsx"}diff --git a/registry-artifacts/smoke-dissolve.json b/registry-artifacts/smoke-dissolve.jsonindex 4847a3f2..ac7d8268 100644--- a/registry-artifacts/smoke-dissolve.json+++ b/registry-artifacts/smoke-dissolve.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/smoke-dissolve/index.tsx",- "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\nimport { ShaderSmokeRing } from \"@/components/remocn/shader-smoke-ring\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nconst DEFAULT_COLORS = [\"#8f88ae\"];\n\nexport type SmokeDissolveProps = {\n colorBack?: string;\n colors?: string[];\n speed?: number;\n};\n\nconst SmokeDissolvePresentation: React.FC<\n TransitionPresentationComponentProps<SmokeDissolveProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n colorBack = \"#141318\",\n colors = DEFAULT_COLORS,\n speed = 1,\n } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n const radius = interpolate(p, [0, 1], [0, 1], clampOpts);\n const scale = interpolate(p, [0, 1], [1, 2], clampOpts);\n const thickness = interpolate(p, [0, 1], [1, 1.5], clampOpts);\n\n const childStyle: React.CSSProperties = entering\n ? {\n opacity: interpolate(p, [0.55, 0.68], [0, 1], clampOpts),\n transform: `scale(${interpolate(p, [0.55, 1], [0.3, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n })})`,\n filter: `blur(${interpolate(p, [0.55, 0.75], [10, 0], clampOpts)}px)`,\n }\n : { opacity: interpolate(p, [0.06, 0.13], [1, 0], clampOpts) };\n\n return (\n <AbsoluteFill>\n {entering ? (\n <AbsoluteFill style={{ pointerEvents: \"none\" }}>\n <ShaderSmokeRing\n speed={speed}\n colorBack={colorBack}\n colors={colors}\n radius={radius}\n scale={scale}\n thickness={thickness}\n />\n </AbsoluteFill>\n ) : null}\n <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>\n </AbsoluteFill>\n );\n};\n\nexport function smokeDissolve(\n props: SmokeDissolveProps = {},\n): TransitionPresentation<SmokeDissolveProps> {\n return {\n component: SmokeDissolvePresentation,\n props,\n };\n}\n",+ "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\nimport { ShaderSmokeRing } from \"@/components/remocn/shader-smoke-ring\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nconst DEFAULT_COLORS = [\"#8f88ae\"];\n\nexport type SmokeDissolveProps = {\n colorBack?: string;\n colors?: string[];\n speed?: number;\n};\n\nconst SmokeDissolvePresentation: React.FC<\n TransitionPresentationComponentProps<SmokeDissolveProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n colorBack = \"#141318\",\n colors = DEFAULT_COLORS,\n speed = 1,\n } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n const radius = interpolate(p, [0, 1], [0, 1], clampOpts);\n const scale = interpolate(p, [0, 1], [1, 2], clampOpts);\n const thickness = interpolate(p, [0, 1], [1, 1.5], clampOpts);\n\n const childStyle: React.CSSProperties = entering\n ? {\n opacity: interpolate(p, [0.55, 0.68], [0, 1], clampOpts),\n scale: `${interpolate(p, [0.55, 1], [0.3, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n })}`,\n filter: `blur(${interpolate(p, [0.55, 0.75], [10, 0], clampOpts)}px)`,\n }\n : { opacity: interpolate(p, [0.06, 0.13], [1, 0], clampOpts) };\n\n return (\n <AbsoluteFill>\n {entering ? (\n <AbsoluteFill style={{ pointerEvents: \"none\" }}>\n <ShaderSmokeRing\n speed={speed}\n colorBack={colorBack}\n colors={colors}\n radius={radius}\n scale={scale}\n thickness={thickness}\n />\n </AbsoluteFill>\n ) : null}\n <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>\n </AbsoluteFill>\n );\n};\n\nexport function smokeDissolve(\n props: SmokeDissolveProps = {},\n): TransitionPresentation<SmokeDissolveProps> {\n return {\n component: SmokeDissolvePresentation,\n props,\n };\n}\n","type": "registry:component","target": "components/remocn/smoke-dissolve.tsx"}diff --git a/registry-artifacts/soft-blur-in.json b/registry-artifacts/soft-blur-in.jsonindex eed26a89..9cc8947c 100644--- a/registry-artifacts/soft-blur-in.json+++ b/registry-artifacts/soft-blur-in.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/soft-blur-in/index.tsx",- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface SoftBlurInProps {\n text: string;\n blur?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function SoftBlurIn({\n text,\n blur = 12,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: SoftBlurInProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 27;\n const charTravelFrames = 9;\n const staggerFrames = 1;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerFrames;\n const easing = Easing.bezier(0.22, 1, 0.36, 1);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charTravelFrames], [16, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const blurAmount = interpolate(\n local,\n [0, charDurationFrames],\n [blur, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\", easing },\n );\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n filter: `blur(${blurAmount}px)`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface SoftBlurInProps {\n text: string;\n blur?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function SoftBlurIn({\n text,\n blur = 12,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: SoftBlurInProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 27;\n const charTravelFrames = 9;\n const staggerFrames = 1;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerFrames;\n const easing = Easing.bezier(0.22, 1, 0.36, 1);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charTravelFrames], [16, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const blurAmount = interpolate(\n local,\n [0, charDurationFrames],\n [blur, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\", easing },\n );\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n translate: `0 ${y}px`,\n filter: `blur(${blurAmount}px)`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/soft-blur-in.tsx"}diff --git a/registry-artifacts/spring-scale-in.json b/registry-artifacts/spring-scale-in.jsonindex 5a0e3fe4..b5ace276 100644--- a/registry-artifacts/spring-scale-in.json+++ b/registry-artifacts/spring-scale-in.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/spring-scale-in/index.tsx",- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface SpringScaleInProps {\n text: string;\n staggerDelay?: number;\n scaleFrom?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function SpringScaleIn({\n text,\n staggerDelay = 3,\n scaleFrom = 0.7,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: SpringScaleInProps) {\n const frame = useCurrentFrame() * speed;\n\n const words = text.split(\" \");\n const wordDurationFrames = 11;\n const easing = Easing.bezier(0.34, 1.56, 0.64, 1);\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {words.map((word, i) => {\n const local = frame - i * staggerDelay;\n const opacity = interpolate(local, [0, wordDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const scale = interpolate(\n local,\n [0, wordDurationFrames],\n [scaleFrom, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n },\n );\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 50%\",\n opacity,\n transform: `scale(${scale})`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface SpringScaleInProps {\n text: string;\n staggerDelay?: number;\n scaleFrom?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function SpringScaleIn({\n text,\n staggerDelay = 3,\n scaleFrom = 0.7,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: SpringScaleInProps) {\n const frame = useCurrentFrame() * speed;\n\n const words = text.split(\" \");\n const wordDurationFrames = 11;\n const easing = Easing.bezier(0.34, 1.56, 0.64, 1);\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {words.map((word, i) => {\n const local = frame - i * staggerDelay;\n const opacity = interpolate(local, [0, wordDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const scale = interpolate(\n local,\n [0, wordDurationFrames],\n [scaleFrom, 1],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n },\n );\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n transformOrigin: \"50% 50%\",\n opacity,\n scale: `${scale}`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/spring-scale-in.tsx"}diff --git a/registry-artifacts/spring-settle.json b/registry-artifacts/spring-settle.jsonindex 6be7edcd..bbc9cf5c 100644--- a/registry-artifacts/spring-settle.json+++ b/registry-artifacts/spring-settle.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/spring-settle/index.tsx",- "content": "\"use client\";\n\nimport type { CSSProperties, ReactNode } from \"react\";\nimport { createContext, useContext } from \"react\";\nimport {\n AbsoluteFill,\n interpolate,\n interpolateColors,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { CLAMP, FADE, stagger } from \"@/lib/remocn/scene-motion\";\n\nexport type SpringSettleConfig = {\n sceneFrames: number;\n gapFrames: number;\n enterScale: number;\n enterFadeFrames: number;\n enterStagger: number;\n enterStaggerPower: number;\n enterStaggerJitter: number;\n springDamping: number;\n springStiffness: number;\n springMass: number;\n exitFrames: number;\n exitScale: number;\n exitPower: number;\n bgFadeFrames: number;\n};\n\nexport const SPRING_SETTLE_DEFAULTS: SpringSettleConfig = {\n sceneFrames: 70,\n gapFrames: 1,\n enterScale: 1.24,\n enterFadeFrames: 5,\n enterStagger: 3,\n enterStaggerPower: 0.8,\n enterStaggerJitter: 1,\n springDamping: 30,\n springStiffness: 320,\n springMass: 1,\n exitFrames: 6,\n exitScale: 0.84,\n exitPower: 5,\n bgFadeFrames: 4,\n};\n\nexport type SpringSettleSceneDef = {\n name?: string;\n bg?: string;\n durationInFrames?: number;\n content: ReactNode;\n};\n\nexport type SpringSettlePhase = \"enter\" | \"dwell\" | \"exit\" | \"gap\";\n\nexport type SpringSettleTimeline = {\n index: number;\n local: number;\n dwellFrames: number;\n};\n\ntype SceneClock = {\n local: number;\n cfg: SpringSettleConfig;\n fps: number;\n};\n\nconst SceneCtx = createContext<SceneClock | null>(null);\n\nconst resolveConfig = (\n config?: Partial<SpringSettleConfig>,\n): SpringSettleConfig => ({ ...SPRING_SETTLE_DEFAULTS, ...config });\n\nconst dwellOf = (scene: SpringSettleSceneDef, cfg: SpringSettleConfig) =>\n scene.durationInFrames ?? cfg.sceneFrames;\n\nexport const springSettleTimeline = (\n frame: number,\n scenes: SpringSettleSceneDef[],\n config?: Partial<SpringSettleConfig>,\n opts?: { loop?: boolean },\n): SpringSettleTimeline => {\n const cfg = resolveConfig(config);\n const lens = scenes.map((s) => dwellOf(s, cfg) + cfg.gapFrames);\n const total = lens.reduce((a, b) => a + b, 0);\n let w = opts?.loop ? ((frame % total) + total) % total : frame;\n let index = 0;\n while (index < scenes.length - 1 && w >= lens[index]) {\n w -= lens[index];\n index += 1;\n }\n const local = Math.min(w, lens[index] - 1);\n return { index, local, dwellFrames: dwellOf(scenes[index], cfg) };\n};\n\nexport const springSettlePhase = (\n timeline: SpringSettleTimeline,\n fps: number,\n config?: Partial<SpringSettleConfig>,\n): SpringSettlePhase => {\n const cfg = resolveConfig(config);\n const { local, dwellFrames } = timeline;\n if (local >= dwellFrames) return \"gap\";\n if (local >= dwellFrames - cfg.exitFrames) return \"exit\";\n const settled =\n spring({\n frame: local,\n fps,\n config: {\n damping: cfg.springDamping,\n stiffness: cfg.springStiffness,\n mass: cfg.springMass,\n },\n }) > 0.985;\n return settled ? \"dwell\" : \"enter\";\n};\n\nexport const springSettleExitStyle = (\n local: number,\n dwellFrames: number,\n config?: Partial<SpringSettleConfig>,\n): CSSProperties => {\n const cfg = resolveConfig(config);\n const tExit = interpolate(\n local,\n [dwellFrames - cfg.exitFrames, dwellFrames],\n [0, 1],\n CLAMP,\n );\n if (tExit <= 0) return {};\n const eExit = tExit ** cfg.exitPower;\n return {\n transform: `scale(${1 - (1 - cfg.exitScale) * eExit})`,\n opacity: 1 - eExit,\n willChange: \"transform, opacity\",\n };\n};\n\nexport interface SpringSettleEnterProps {\n local: number;\n config?: Partial<SpringSettleConfig>;\n children: ReactNode;\n}\n\nexport function SpringSettleEnter({\n local,\n config,\n children,\n}: SpringSettleEnterProps) {\n const { fps } = useVideoConfig();\n return (\n <SceneCtx.Provider value={{ local, cfg: resolveConfig(config), fps }}>\n {children}\n </SceneCtx.Provider>\n );\n}\n\nexport interface SpringSettleItemProps {\n index?: number;\n style?: CSSProperties;\n children: ReactNode;\n}\n\nexport function SpringSettleItem({\n index = 0,\n style,\n children,\n}: SpringSettleItemProps) {\n const clock = useContext(SceneCtx);\n if (!clock) {\n return <div style={style}>{children}</div>;\n }\n const { local, cfg, fps } = clock;\n const tEnter =\n local -\n stagger(\n index,\n cfg.enterStagger,\n cfg.enterStaggerPower,\n cfg.enterStaggerJitter,\n );\n const enterP = spring({\n frame: tEnter,\n fps,\n config: {\n damping: cfg.springDamping,\n stiffness: cfg.springStiffness,\n mass: cfg.springMass,\n },\n });\n const scaleEnter = interpolate(enterP, [0, 1], [cfg.enterScale, 1]);\n const opacityEnter = interpolate(tEnter, [0, cfg.enterFadeFrames], [0, 1], {\n ...CLAMP,\n easing: FADE,\n });\n return (\n <div\n style={{\n ...style,\n transform: `scale(${scaleEnter})`,\n opacity: opacityEnter,\n willChange: \"transform, opacity\",\n }}\n >\n {children}\n </div>\n );\n}\n\nconst wrapSigned = (d: number, total: number) =>\n (((d % total) + total * 1.5) % total) - total / 2;\n\nexport interface SpringSettleScenesProps {\n scenes: SpringSettleSceneDef[];\n config?: Partial<SpringSettleConfig>;\n loop?: boolean;\n style?: CSSProperties;\n}\n\nexport function SpringSettleScenes({\n scenes,\n config,\n loop = false,\n style,\n}: SpringSettleScenesProps) {\n const frame = useCurrentFrame();\n const cfg = resolveConfig(config);\n\n const lens = scenes.map((s) => dwellOf(s, cfg) + cfg.gapFrames);\n const total = lens.reduce((a, b) => a + b, 0);\n const { index, local, dwellFrames } = springSettleTimeline(\n frame,\n scenes,\n cfg,\n { loop },\n );\n\n const n = scenes.length;\n const cur = scenes[index];\n const prev = loop ? scenes[(index - 1 + n) % n] : scenes[index - 1];\n const next = loop ? scenes[(index + 1) % n] : scenes[index + 1];\n\n const w = loop ? ((frame % total) + total) % total : frame;\n const slotStart = w - local;\n const half = Math.max(cfg.bgFadeFrames, 0.001) / 2;\n let bg = cur.bg;\n if (prev?.bg && cur.bg) {\n let d = w - (slotStart - cfg.gapFrames / 2);\n if (loop) d = wrapSigned(d, total);\n if (Math.abs(d) <= half) {\n bg = interpolateColors(d, [-half, half], [prev.bg, cur.bg]);\n }\n }\n if (next?.bg && cur.bg && bg === cur.bg) {\n let d = w - (slotStart + dwellFrames + cfg.gapFrames / 2);\n if (loop) d = wrapSigned(d, total);\n if (Math.abs(d) <= half) {\n bg = interpolateColors(d, [-half, half], [cur.bg, next.bg]);\n }\n }\n\n return (\n <AbsoluteFill style={{ background: bg, ...style }}>\n {local < dwellFrames ? (\n <AbsoluteFill style={springSettleExitStyle(local, dwellFrames, cfg)}>\n <SpringSettleEnter local={local} config={cfg}>\n {cur.content}\n </SpringSettleEnter>\n </AbsoluteFill>\n ) : null}\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport type { CSSProperties, ReactNode } from \"react\";\nimport { createContext, useContext } from \"react\";\nimport {\n AbsoluteFill,\n interpolate,\n interpolateColors,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { CLAMP, FADE, stagger } from \"@/lib/remocn/scene-motion\";\n\nexport type SpringSettleConfig = {\n sceneFrames: number;\n gapFrames: number;\n enterScale: number;\n enterFadeFrames: number;\n enterStagger: number;\n enterStaggerPower: number;\n enterStaggerJitter: number;\n springDamping: number;\n springStiffness: number;\n springMass: number;\n exitFrames: number;\n exitScale: number;\n exitPower: number;\n bgFadeFrames: number;\n};\n\nexport const SPRING_SETTLE_DEFAULTS: SpringSettleConfig = {\n sceneFrames: 70,\n gapFrames: 1,\n enterScale: 1.24,\n enterFadeFrames: 5,\n enterStagger: 3,\n enterStaggerPower: 0.8,\n enterStaggerJitter: 1,\n springDamping: 30,\n springStiffness: 320,\n springMass: 1,\n exitFrames: 6,\n exitScale: 0.84,\n exitPower: 5,\n bgFadeFrames: 4,\n};\n\nexport type SpringSettleSceneDef = {\n name?: string;\n bg?: string;\n durationInFrames?: number;\n content: ReactNode;\n};\n\nexport type SpringSettlePhase = \"enter\" | \"dwell\" | \"exit\" | \"gap\";\n\nexport type SpringSettleTimeline = {\n index: number;\n local: number;\n dwellFrames: number;\n};\n\ntype SceneClock = {\n local: number;\n cfg: SpringSettleConfig;\n fps: number;\n};\n\nconst SceneCtx = createContext<SceneClock | null>(null);\n\nconst resolveConfig = (\n config?: Partial<SpringSettleConfig>,\n): SpringSettleConfig => ({ ...SPRING_SETTLE_DEFAULTS, ...config });\n\nconst dwellOf = (scene: SpringSettleSceneDef, cfg: SpringSettleConfig) =>\n scene.durationInFrames ?? cfg.sceneFrames;\n\nexport const springSettleTimeline = (\n frame: number,\n scenes: SpringSettleSceneDef[],\n config?: Partial<SpringSettleConfig>,\n opts?: { loop?: boolean },\n): SpringSettleTimeline => {\n const cfg = resolveConfig(config);\n const lens = scenes.map((s) => dwellOf(s, cfg) + cfg.gapFrames);\n const total = lens.reduce((a, b) => a + b, 0);\n let w = opts?.loop ? ((frame % total) + total) % total : frame;\n let index = 0;\n while (index < scenes.length - 1 && w >= lens[index]) {\n w -= lens[index];\n index += 1;\n }\n const local = Math.min(w, lens[index] - 1);\n return { index, local, dwellFrames: dwellOf(scenes[index], cfg) };\n};\n\nexport const springSettlePhase = (\n timeline: SpringSettleTimeline,\n fps: number,\n config?: Partial<SpringSettleConfig>,\n): SpringSettlePhase => {\n const cfg = resolveConfig(config);\n const { local, dwellFrames } = timeline;\n if (local >= dwellFrames) return \"gap\";\n if (local >= dwellFrames - cfg.exitFrames) return \"exit\";\n const settled =\n spring({\n frame: local,\n fps,\n config: {\n damping: cfg.springDamping,\n stiffness: cfg.springStiffness,\n mass: cfg.springMass,\n },\n }) > 0.985;\n return settled ? \"dwell\" : \"enter\";\n};\n\nexport const springSettleExitStyle = (\n local: number,\n dwellFrames: number,\n config?: Partial<SpringSettleConfig>,\n): CSSProperties => {\n const cfg = resolveConfig(config);\n const tExit = interpolate(\n local,\n [dwellFrames - cfg.exitFrames, dwellFrames],\n [0, 1],\n CLAMP,\n );\n if (tExit <= 0) return {};\n const eExit = tExit ** cfg.exitPower;\n return {\n scale: `${1 - (1 - cfg.exitScale) * eExit}`,\n opacity: 1 - eExit,\n willChange: \"transform, opacity\",\n };\n};\n\nexport interface SpringSettleEnterProps {\n local: number;\n config?: Partial<SpringSettleConfig>;\n children: ReactNode;\n}\n\nexport function SpringSettleEnter({\n local,\n config,\n children,\n}: SpringSettleEnterProps) {\n const { fps } = useVideoConfig();\n return (\n <SceneCtx.Provider value={{ local, cfg: resolveConfig(config), fps }}>\n {children}\n </SceneCtx.Provider>\n );\n}\n\nexport interface SpringSettleItemProps {\n index?: number;\n style?: CSSProperties;\n children: ReactNode;\n}\n\nexport function SpringSettleItem({\n index = 0,\n style,\n children,\n}: SpringSettleItemProps) {\n const clock = useContext(SceneCtx);\n if (!clock) {\n return <div style={style}>{children}</div>;\n }\n const { local, cfg, fps } = clock;\n const tEnter =\n local -\n stagger(\n index,\n cfg.enterStagger,\n cfg.enterStaggerPower,\n cfg.enterStaggerJitter,\n );\n const enterP = spring({\n frame: tEnter,\n fps,\n config: {\n damping: cfg.springDamping,\n stiffness: cfg.springStiffness,\n mass: cfg.springMass,\n },\n });\n const scaleEnter = interpolate(enterP, [0, 1], [cfg.enterScale, 1]);\n const opacityEnter = interpolate(tEnter, [0, cfg.enterFadeFrames], [0, 1], {\n ...CLAMP,\n easing: FADE,\n });\n return (\n <div\n style={{\n ...style,\n scale: `${scaleEnter}`,\n opacity: opacityEnter,\n willChange: \"transform, opacity\",\n }}\n >\n {children}\n </div>\n );\n}\n\nconst wrapSigned = (d: number, total: number) =>\n (((d % total) + total * 1.5) % total) - total / 2;\n\nexport interface SpringSettleScenesProps {\n scenes: SpringSettleSceneDef[];\n config?: Partial<SpringSettleConfig>;\n loop?: boolean;\n style?: CSSProperties;\n}\n\nexport function SpringSettleScenes({\n scenes,\n config,\n loop = false,\n style,\n}: SpringSettleScenesProps) {\n const frame = useCurrentFrame();\n const cfg = resolveConfig(config);\n\n const lens = scenes.map((s) => dwellOf(s, cfg) + cfg.gapFrames);\n const total = lens.reduce((a, b) => a + b, 0);\n const { index, local, dwellFrames } = springSettleTimeline(\n frame,\n scenes,\n cfg,\n { loop },\n );\n\n const n = scenes.length;\n const cur = scenes[index];\n const prev = loop ? scenes[(index - 1 + n) % n] : scenes[index - 1];\n const next = loop ? scenes[(index + 1) % n] : scenes[index + 1];\n\n const w = loop ? ((frame % total) + total) % total : frame;\n const slotStart = w - local;\n const half = Math.max(cfg.bgFadeFrames, 0.001) / 2;\n let bg = cur.bg;\n if (prev?.bg && cur.bg) {\n let d = w - (slotStart - cfg.gapFrames / 2);\n if (loop) d = wrapSigned(d, total);\n if (Math.abs(d) <= half) {\n bg = interpolateColors(d, [-half, half], [prev.bg, cur.bg]);\n }\n }\n if (next?.bg && cur.bg && bg === cur.bg) {\n let d = w - (slotStart + dwellFrames + cfg.gapFrames / 2);\n if (loop) d = wrapSigned(d, total);\n if (Math.abs(d) <= half) {\n bg = interpolateColors(d, [-half, half], [cur.bg, next.bg]);\n }\n }\n\n return (\n <AbsoluteFill style={{ background: bg, ...style }}>\n {local < dwellFrames ? (\n <AbsoluteFill style={springSettleExitStyle(local, dwellFrames, cfg)}>\n <SpringSettleEnter local={local} config={cfg}>\n {cur.content}\n </SpringSettleEnter>\n </AbsoluteFill>\n ) : null}\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/spring-settle.tsx"}diff --git a/registry-artifacts/staggered-fade-up.json b/registry-artifacts/staggered-fade-up.jsonindex 109ac2f1..253d499e 100644--- a/registry-artifacts/staggered-fade-up.json+++ b/registry-artifacts/staggered-fade-up.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/staggered-fade-up/index.tsx",- "content": "\"use client\";\n\nimport { interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface StaggeredFadeUpProps {\n text: string;\n staggerDelay?: number;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function StaggeredFadeUp({\n text,\n staggerDelay = 4,\n distance = 20,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: StaggeredFadeUpProps) {\n const frame = useCurrentFrame() * speed;\n\n const words = text.split(\" \");\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"white\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {words.map((word, i) => {\n const local = frame - i * staggerDelay;\n const opacity = interpolate(local, [0, 12], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n const y = interpolate(local, [0, 12], [distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n opacity,\n transform: `translateY(${y}px)`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface StaggeredFadeUpProps {\n text: string;\n staggerDelay?: number;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function StaggeredFadeUp({\n text,\n staggerDelay = 4,\n distance = 20,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: StaggeredFadeUpProps) {\n const frame = useCurrentFrame() * speed;\n\n const words = text.split(\" \");\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"white\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {words.map((word, i) => {\n const local = frame - i * staggerDelay;\n const opacity = interpolate(local, [0, 12], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n const y = interpolate(local, [0, 12], [distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n marginRight: \"0.25em\",\n opacity,\n translate: `0 ${y}px`,\n }}\n >\n {word}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/staggered-fade-up.tsx"}diff --git a/registry-artifacts/strikethrough-replace.json b/registry-artifacts/strikethrough-replace.jsonindex dc47926d..8895825f 100644--- a/registry-artifacts/strikethrough-replace.json+++ b/registry-artifacts/strikethrough-replace.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/strikethrough-replace/index.tsx",- "content": "\"use client\";\n\nimport { interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface StrikethroughReplaceProps {\n from: string;\n to: string;\n lineColor?: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function StrikethroughReplace({\n from,\n to,\n lineColor = \"#ff5e3a\",\n fontSize = 48,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: StrikethroughReplaceProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n // Phases:\n // 0 .. 40% -> draw strikethrough across `from`\n // 40% .. 60% -> fade out `from`, fade in `to`\n // 60% .. 100% -> hold\n const strikeEnd = durationInFrames * 0.4;\n const fadeStart = durationInFrames * 0.4;\n const fadeEnd = durationInFrames * 0.6;\n\n const linePct = interpolate(frame, [0, strikeEnd], [0, 100], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const fromOpacity = interpolate(frame, [fadeStart, fadeEnd], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const toOpacity = interpolate(frame, [fadeStart, fadeEnd], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n const toY = interpolate(frame, [fadeStart, fadeEnd], [8, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const textStyle: React.CSSProperties = {\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n whiteSpace: \"nowrap\",\n };\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"white\",\n }}\n >\n <div\n style={{\n position: \"relative\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n {/* from text with strikethrough line */}\n <span\n className={className}\n style={{\n ...textStyle,\n position: \"absolute\",\n opacity: fromOpacity,\n }}\n >\n {from}\n <span\n aria-hidden\n style={{\n position: \"absolute\",\n left: 0,\n top: \"50%\",\n height: Math.max(2, Math.round(fontSize * 0.08)),\n width: `${linePct}%`,\n background: lineColor,\n transform: \"translateY(-50%)\",\n borderRadius: 2,\n }}\n />\n </span>\n\n {/* to text */}\n <span\n className={className}\n style={{\n ...textStyle,\n opacity: toOpacity,\n transform: `translateY(${toY}px)`,\n }}\n >\n {to}\n </span>\n </div>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { interpolate, useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface StrikethroughReplaceProps {\n from: string;\n to: string;\n lineColor?: string;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function StrikethroughReplace({\n from,\n to,\n lineColor = \"#ff5e3a\",\n fontSize = 48,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: StrikethroughReplaceProps) {\n const frame = useCurrentFrame() * speed;\n const { durationInFrames } = useVideoConfig();\n\n // Phases:\n // 0 .. 40% -> draw strikethrough across `from`\n // 40% .. 60% -> fade out `from`, fade in `to`\n // 60% .. 100% -> hold\n const strikeEnd = durationInFrames * 0.4;\n const fadeStart = durationInFrames * 0.4;\n const fadeEnd = durationInFrames * 0.6;\n\n const linePct = interpolate(frame, [0, strikeEnd], [0, 100], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const fromOpacity = interpolate(frame, [fadeStart, fadeEnd], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const toOpacity = interpolate(frame, [fadeStart, fadeEnd], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n const toY = interpolate(frame, [fadeStart, fadeEnd], [8, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const textStyle: React.CSSProperties = {\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.03em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n whiteSpace: \"nowrap\",\n };\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"white\",\n }}\n >\n <div\n style={{\n position: \"relative\",\n display: \"inline-flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n {/* from text with strikethrough line */}\n <span\n className={className}\n style={{\n ...textStyle,\n position: \"absolute\",\n opacity: fromOpacity,\n }}\n >\n {from}\n <span\n aria-hidden\n style={{\n position: \"absolute\",\n left: 0,\n top: \"50%\",\n height: Math.max(2, Math.round(fontSize * 0.08)),\n width: `${linePct}%`,\n background: lineColor,\n translate: \"0 -50%\",\n borderRadius: 2,\n }}\n />\n </span>\n\n {/* to text */}\n <span\n className={className}\n style={{\n ...textStyle,\n opacity: toOpacity,\n translate: `0 ${toY}px`,\n }}\n >\n {to}\n </span>\n </div>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/strikethrough-replace.tsx"}diff --git a/registry-artifacts/sustained-glitch.json b/registry-artifacts/sustained-glitch.jsonindex f7f2da37..a1c828a1 100644--- a/registry-artifacts/sustained-glitch.json+++ b/registry-artifacts/sustained-glitch.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/sustained-glitch/index.tsx",- "content": "\"use client\";\n\nimport type React from \"react\";\nimport { AbsoluteFill, random, useCurrentFrame } from \"remotion\";\nimport {\n type CanvasFilterProps,\n makeCanvasFilter,\n makeFilterShader,\n} from \"@/lib/remocn/canvas-presentation\";\n\nexport type SustainedGlitchProps = {\n intensity?: number;\n frequency?: number;\n slices?: number;\n seed?: number;\n};\n\nconst DEFAULTS = {\n intensity: 1,\n frequency: 1,\n slices: 24,\n seed: 1,\n};\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_scene;\nuniform float u_frame;\nuniform float u_intensity;\nuniform float u_frequency;\nuniform float u_slices;\nuniform float u_seed;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst float BLOCK_COLUMNS = 16.0;\n\nfloat hash(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);\n}\n\nvec4 sampleSplit(vec2 uv, float split) {\n vec4 center = texture(u_scene, uv);\n float r = texture(u_scene, fract(vec2(uv.x + split, uv.y))).r;\n float b = texture(u_scene, fract(vec2(uv.x - split, uv.y))).b;\n return vec4(r, center.g, b, center.a);\n}\n\nvoid main() {\n float slotLength = max(30.0 / max(u_frequency, 0.1), 4.0);\n float slot = floor(u_frame / slotLength);\n float local = u_frame - slot * slotLength;\n\n float burstLength = 2.0 + floor(hash(vec2(slot, u_seed + 2.0)) * 4.0);\n float start =\n floor(hash(vec2(slot, u_seed + 1.0)) * max(slotLength - burstLength, 1.0));\n float fires = step(0.25, hash(vec2(slot, u_seed + 3.0)));\n\n float age = local - start;\n float live = fires * step(0.0, age) * step(age, burstLength - 1.0);\n float energy =\n max(u_intensity, 0.0) * live * (1.0 - age / burstLength);\n\n if (energy <= 0.0) {\n outColor = texture(u_scene, v_uv);\n return;\n }\n\n float clock = mod(u_frame, 512.0) + u_seed;\n float row = floor(v_uv.y * max(u_slices, 2.0));\n float torn = step(0.45, hash(vec2(row, clock)));\n float amount = hash(vec2(row + 17.0, clock * 1.7 + 3.0)) - 0.5;\n float sliceShift = amount * 0.28 * energy * torn;\n\n vec2 block = vec2(floor(v_uv.x * BLOCK_COLUMNS), row);\n float corrupt = step(1.0 - 0.45 * min(energy, 1.0), hash(block + clock * 7.3));\n vec2 jump =\n vec2(\n hash(block + clock * 3.1 + 5.0) - 0.5,\n hash(block + clock * 9.7 + 11.0) - 0.5\n ) *\n vec2(0.62, 0.34) *\n corrupt;\n\n vec2 uv = fract(v_uv + vec2(sliceShift, 0.0) + jump);\n float split = 0.02 * energy * (0.35 + abs(amount));\n\n vec4 color = sampleSplit(uv, split);\n color.rgb +=\n vec3(0.05, 0.015, 0.09) *\n energy *\n torn *\n hash(vec2(row, clock + 41.0)) *\n color.a;\n\n outColor = vec4(clamp(color.rgb, 0.0, 1.0), color.a);\n}`;\n\nconst shader = makeFilterShader<SustainedGlitchProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, passedProps }) => {\n const {\n intensity = DEFAULTS.intensity,\n frequency = DEFAULTS.frequency,\n slices = DEFAULTS.slices,\n seed = DEFAULTS.seed,\n } = passedProps;\n gl.uniform1f(uniform(\"u_intensity\"), intensity);\n gl.uniform1f(uniform(\"u_frequency\"), frequency);\n gl.uniform1f(uniform(\"u_slices\"), slices);\n gl.uniform1f(uniform(\"u_seed\"), seed);\n },\n);\n\nfunction burstEnergy(\n frame: number,\n intensity: number,\n frequency: number,\n seed: number,\n): number {\n const slotLength = Math.max(30 / Math.max(frequency, 0.1), 4);\n const slot = Math.floor(frame / slotLength);\n const local = frame - slot * slotLength;\n\n const burstLength = 2 + Math.floor(random(`glitch-len-${seed}-${slot}`) * 4);\n const start = Math.floor(\n random(`glitch-start-${seed}-${slot}`) *\n Math.max(slotLength - burstLength, 1),\n );\n if (random(`glitch-fire-${seed}-${slot}`) < 0.25) return 0;\n\n const age = local - start;\n if (age < 0 || age > burstLength - 1) return 0;\n return Math.max(intensity, 0) * (1 - age / burstLength);\n}\n\nconst SustainedGlitchFallback: React.FC<\n SustainedGlitchProps & CanvasFilterProps\n> = ({\n children,\n intensity = DEFAULTS.intensity,\n frequency = DEFAULTS.frequency,\n slices = DEFAULTS.slices,\n seed = DEFAULTS.seed,\n}) => {\n const frame = useCurrentFrame();\n const energy = burstEnergy(frame, intensity, frequency, seed);\n\n if (energy <= 0) {\n return <AbsoluteFill>{children}</AbsoluteFill>;\n }\n\n const bands = Math.max(2, Math.min(6, Math.round(slices / 5)));\n const height = 100 / bands;\n\n return (\n <AbsoluteFill>\n {Array.from({ length: bands }, (_, band) => {\n const shift =\n (random(`glitch-shift-${seed}-${frame}-${band}`) - 0.5) * 46 * energy;\n const tint = band % 2 === 0 ? \"rgb(255, 42, 90)\" : \"rgb(0, 224, 255)\";\n return (\n <AbsoluteFill\n key={band}\n style={{\n clipPath: `inset(${band * height}% 0 ${100 - (band + 1) * height}% 0)`,\n transform: `translateX(${shift}px)`,\n }}\n >\n {children}\n <AbsoluteFill\n style={{\n background: tint,\n mixBlendMode: \"screen\",\n opacity:\n 0.18 *\n energy *\n random(`glitch-tint-${seed}-${frame}-${band}`),\n }}\n />\n </AbsoluteFill>\n );\n })}\n </AbsoluteFill>\n );\n};\n\nexport const SustainedGlitch = makeCanvasFilter<SustainedGlitchProps>({\n shader,\n fallback: SustainedGlitchFallback,\n});\n",+ "content": "\"use client\";\n\nimport type React from \"react\";\nimport { AbsoluteFill, random, useCurrentFrame } from \"remotion\";\nimport {\n type CanvasFilterProps,\n makeCanvasFilter,\n makeFilterShader,\n} from \"@/lib/remocn/canvas-presentation\";\n\nexport type SustainedGlitchProps = {\n intensity?: number;\n frequency?: number;\n slices?: number;\n seed?: number;\n};\n\nconst DEFAULTS = {\n intensity: 1,\n frequency: 1,\n slices: 24,\n seed: 1,\n};\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_scene;\nuniform float u_frame;\nuniform float u_intensity;\nuniform float u_frequency;\nuniform float u_slices;\nuniform float u_seed;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst float BLOCK_COLUMNS = 16.0;\n\nfloat hash(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);\n}\n\nvec4 sampleSplit(vec2 uv, float split) {\n vec4 center = texture(u_scene, uv);\n float r = texture(u_scene, fract(vec2(uv.x + split, uv.y))).r;\n float b = texture(u_scene, fract(vec2(uv.x - split, uv.y))).b;\n return vec4(r, center.g, b, center.a);\n}\n\nvoid main() {\n float slotLength = max(30.0 / max(u_frequency, 0.1), 4.0);\n float slot = floor(u_frame / slotLength);\n float local = u_frame - slot * slotLength;\n\n float burstLength = 2.0 + floor(hash(vec2(slot, u_seed + 2.0)) * 4.0);\n float start =\n floor(hash(vec2(slot, u_seed + 1.0)) * max(slotLength - burstLength, 1.0));\n float fires = step(0.25, hash(vec2(slot, u_seed + 3.0)));\n\n float age = local - start;\n float live = fires * step(0.0, age) * step(age, burstLength - 1.0);\n float energy =\n max(u_intensity, 0.0) * live * (1.0 - age / burstLength);\n\n if (energy <= 0.0) {\n outColor = texture(u_scene, v_uv);\n return;\n }\n\n float clock = mod(u_frame, 512.0) + u_seed;\n float row = floor(v_uv.y * max(u_slices, 2.0));\n float torn = step(0.45, hash(vec2(row, clock)));\n float amount = hash(vec2(row + 17.0, clock * 1.7 + 3.0)) - 0.5;\n float sliceShift = amount * 0.28 * energy * torn;\n\n vec2 block = vec2(floor(v_uv.x * BLOCK_COLUMNS), row);\n float corrupt = step(1.0 - 0.45 * min(energy, 1.0), hash(block + clock * 7.3));\n vec2 jump =\n vec2(\n hash(block + clock * 3.1 + 5.0) - 0.5,\n hash(block + clock * 9.7 + 11.0) - 0.5\n ) *\n vec2(0.62, 0.34) *\n corrupt;\n\n vec2 uv = fract(v_uv + vec2(sliceShift, 0.0) + jump);\n float split = 0.02 * energy * (0.35 + abs(amount));\n\n vec4 color = sampleSplit(uv, split);\n color.rgb +=\n vec3(0.05, 0.015, 0.09) *\n energy *\n torn *\n hash(vec2(row, clock + 41.0)) *\n color.a;\n\n outColor = vec4(clamp(color.rgb, 0.0, 1.0), color.a);\n}`;\n\nconst shader = makeFilterShader<SustainedGlitchProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, passedProps }) => {\n const {\n intensity = DEFAULTS.intensity,\n frequency = DEFAULTS.frequency,\n slices = DEFAULTS.slices,\n seed = DEFAULTS.seed,\n } = passedProps;\n gl.uniform1f(uniform(\"u_intensity\"), intensity);\n gl.uniform1f(uniform(\"u_frequency\"), frequency);\n gl.uniform1f(uniform(\"u_slices\"), slices);\n gl.uniform1f(uniform(\"u_seed\"), seed);\n },\n);\n\nfunction burstEnergy(\n frame: number,\n intensity: number,\n frequency: number,\n seed: number,\n): number {\n const slotLength = Math.max(30 / Math.max(frequency, 0.1), 4);\n const slot = Math.floor(frame / slotLength);\n const local = frame - slot * slotLength;\n\n const burstLength = 2 + Math.floor(random(`glitch-len-${seed}-${slot}`) * 4);\n const start = Math.floor(\n random(`glitch-start-${seed}-${slot}`) *\n Math.max(slotLength - burstLength, 1),\n );\n if (random(`glitch-fire-${seed}-${slot}`) < 0.25) return 0;\n\n const age = local - start;\n if (age < 0 || age > burstLength - 1) return 0;\n return Math.max(intensity, 0) * (1 - age / burstLength);\n}\n\nconst SustainedGlitchFallback: React.FC<\n SustainedGlitchProps & CanvasFilterProps\n> = ({\n children,\n intensity = DEFAULTS.intensity,\n frequency = DEFAULTS.frequency,\n slices = DEFAULTS.slices,\n seed = DEFAULTS.seed,\n}) => {\n const frame = useCurrentFrame();\n const energy = burstEnergy(frame, intensity, frequency, seed);\n\n if (energy <= 0) {\n return <AbsoluteFill>{children}</AbsoluteFill>;\n }\n\n const bands = Math.max(2, Math.min(6, Math.round(slices / 5)));\n const height = 100 / bands;\n\n return (\n <AbsoluteFill>\n {Array.from({ length: bands }, (_, band) => {\n const shift =\n (random(`glitch-shift-${seed}-${frame}-${band}`) - 0.5) * 46 * energy;\n const tint = band % 2 === 0 ? \"rgb(255, 42, 90)\" : \"rgb(0, 224, 255)\";\n return (\n <AbsoluteFill\n key={band}\n style={{\n clipPath: `inset(${band * height}% 0 ${100 - (band + 1) * height}% 0)`,\n translate: `${shift}px`,\n }}\n >\n {children}\n <AbsoluteFill\n style={{\n background: tint,\n mixBlendMode: \"screen\",\n opacity:\n 0.18 *\n energy *\n random(`glitch-tint-${seed}-${frame}-${band}`),\n }}\n />\n </AbsoluteFill>\n );\n })}\n </AbsoluteFill>\n );\n};\n\nexport const SustainedGlitch = makeCanvasFilter<SustainedGlitchProps>({\n shader,\n fallback: SustainedGlitchFallback,\n});\n","type": "registry:component","target": "components/remocn/sustained-glitch.tsx"}diff --git a/registry-artifacts/swirl-dissolve.json b/registry-artifacts/swirl-dissolve.jsonindex 486b6a0b..52f45b9e 100644--- a/registry-artifacts/swirl-dissolve.json+++ b/registry-artifacts/swirl-dissolve.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/swirl-dissolve/index.tsx",- "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\nimport { ShaderSwirl } from \"@/components/remocn/shader-swirl\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nconst DEFAULT_COLORS = [\"#1f1d29\", \"#413d56\", \"#8f88ae\"];\n\nexport type SwirlDissolveProps = {\n colors?: string[];\n colorBack?: string;\n bandCount?: number;\n softness?: number;\n speed?: number;\n};\n\nconst SwirlDissolvePresentation: React.FC<\n TransitionPresentationComponentProps<SwirlDissolveProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n colors = DEFAULT_COLORS,\n colorBack = \"#141318\",\n bandCount = 10,\n softness = 0.35,\n speed = 1,\n } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n const twist = interpolate(p, [0.1, 0.42, 0.64, 1], [1, 0, 0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n });\n\n const childStyle: React.CSSProperties = entering\n ? {\n opacity: interpolate(p, [0.77, 0.87], [0, 1], clampOpts),\n transform: `scale(${interpolate(p, [0.77, 1], [0.3, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n })})`,\n filter: `blur(${interpolate(p, [0.77, 0.93], [10, 0], clampOpts)}px)`,\n }\n : { opacity: interpolate(p, [0.06, 0.13], [1, 0], clampOpts) };\n\n return (\n <AbsoluteFill>\n {entering ? (\n <AbsoluteFill style={{ pointerEvents: \"none\" }}>\n <ShaderSwirl\n speed={speed}\n twist={twist}\n colors={colors}\n colorBack={colorBack}\n bandCount={bandCount}\n softness={softness}\n />\n </AbsoluteFill>\n ) : null}\n <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>\n </AbsoluteFill>\n );\n};\n\nexport function swirlDissolve(\n props: SwirlDissolveProps = {},\n): TransitionPresentation<SwirlDissolveProps> {\n return {\n component: SwirlDissolvePresentation,\n props,\n };\n}\n",+ "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\nimport { ShaderSwirl } from \"@/components/remocn/shader-swirl\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nconst DEFAULT_COLORS = [\"#1f1d29\", \"#413d56\", \"#8f88ae\"];\n\nexport type SwirlDissolveProps = {\n colors?: string[];\n colorBack?: string;\n bandCount?: number;\n softness?: number;\n speed?: number;\n};\n\nconst SwirlDissolvePresentation: React.FC<\n TransitionPresentationComponentProps<SwirlDissolveProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n colors = DEFAULT_COLORS,\n colorBack = \"#141318\",\n bandCount = 10,\n softness = 0.35,\n speed = 1,\n } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n const twist = interpolate(p, [0.1, 0.42, 0.64, 1], [1, 0, 0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n });\n\n const childStyle: React.CSSProperties = entering\n ? {\n opacity: interpolate(p, [0.77, 0.87], [0, 1], clampOpts),\n scale: `${interpolate(p, [0.77, 1], [0.3, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n })}`,\n filter: `blur(${interpolate(p, [0.77, 0.93], [10, 0], clampOpts)}px)`,\n }\n : { opacity: interpolate(p, [0.06, 0.13], [1, 0], clampOpts) };\n\n return (\n <AbsoluteFill>\n {entering ? (\n <AbsoluteFill style={{ pointerEvents: \"none\" }}>\n <ShaderSwirl\n speed={speed}\n twist={twist}\n colors={colors}\n colorBack={colorBack}\n bandCount={bandCount}\n softness={softness}\n />\n </AbsoluteFill>\n ) : null}\n <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>\n </AbsoluteFill>\n );\n};\n\nexport function swirlDissolve(\n props: SwirlDissolveProps = {},\n): TransitionPresentation<SwirlDissolveProps> {\n return {\n component: SwirlDissolvePresentation,\n props,\n };\n}\n","type": "registry:component","target": "components/remocn/swirl-dissolve.tsx"}diff --git a/registry-artifacts/terminal-cursor-zoom.json b/registry-artifacts/terminal-cursor-zoom.jsonindex 569f283f..350b25f1 100644--- a/registry-artifacts/terminal-cursor-zoom.json+++ b/registry-artifacts/terminal-cursor-zoom.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/terminal-cursor-zoom/index.tsx",- "content": "\"use client\";\n\nimport { AbsoluteFill, interpolate, useCurrentFrame } from \"remotion\";\n\nimport { TerminalSimulator } from \"@/components/remocn/terminal-simulator\";\n\nexport interface TerminalCursorZoomProps {\n command?: string;\n zoom?: number;\n fontSize?: number;\n prompt?: string;\n title?: string;\n charsPerFrame?: number;\n chunkSize?: number;\n speed?: number;\n className?: string;\n}\n\nconst STAGE_WIDTH = 1280;\nconst STAGE_HEIGHT = 720;\nconst WINDOW_WIDTH = 900;\nconst WINDOW_HEIGHT = 480;\nconst CONTENT_PADDING = 20;\nconst CHROME_HEIGHT = 40;\nconst PROMPT_GAP = 8;\nconst FIRST_LINE_FRAME = 10;\n\nexport function TerminalCursorZoom({\n command = \"npx shadcn add @remocn/terminal-cursor-zoom\",\n zoom = 2.8,\n fontSize = 20,\n prompt = \"$\",\n title = \"~/code/remocn-demo\",\n charsPerFrame = 1,\n chunkSize = 1,\n speed = 1,\n className,\n}: TerminalCursorZoomProps) {\n const frame = useCurrentFrame();\n\n const charWidth = fontSize * 0.6;\n const windowLeft = (STAGE_WIDTH - WINDOW_WIDTH) / 2;\n const windowTop = (STAGE_HEIGHT - WINDOW_HEIGHT) / 2;\n const textStartX =\n windowLeft + CONTENT_PADDING + prompt.length * charWidth + PROMPT_GAP;\n const lineHeight = Math.round(fontSize * 1.6);\n const cursorY = windowTop + CHROME_HEIGHT + CONTENT_PADDING + lineHeight / 2;\n\n const lineStart = Math.round(FIRST_LINE_FRAME / speed);\n const localFrame = (frame - lineStart) * speed;\n const linearRevealed = Math.floor(\n interpolate(\n localFrame,\n [0, command.length / charsPerFrame],\n [0, command.length],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n },\n ),\n );\n const revealed = Math.min(\n command.length,\n Math.ceil(linearRevealed / chunkSize) * chunkSize,\n );\n\n const cursorX = textStartX + revealed * charWidth;\n const tx = STAGE_WIDTH / 2 - zoom * cursorX;\n const ty = STAGE_HEIGHT / 2 - zoom * cursorY;\n\n return (\n <AbsoluteFill className={className} style={{ overflow: \"hidden\" }}>\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n width: STAGE_WIDTH,\n height: STAGE_HEIGHT,\n transform: `translate(${tx}px, ${ty}px) scale(${zoom})`,\n transformOrigin: \"0 0\",\n }}\n >\n <TerminalSimulator\n lines={[{ text: command, type: \"command\", delay: 0 }]}\n prompt={prompt}\n title={title}\n fontSize={fontSize}\n charsPerFrame={charsPerFrame}\n chunkSize={chunkSize}\n speed={speed}\n />\n </div>\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport { AbsoluteFill, interpolate, useCurrentFrame } from \"remotion\";\n\nimport { TerminalSimulator } from \"@/components/remocn/terminal-simulator\";\n\nexport interface TerminalCursorZoomProps {\n command?: string;\n zoom?: number;\n fontSize?: number;\n prompt?: string;\n title?: string;\n charsPerFrame?: number;\n chunkSize?: number;\n speed?: number;\n className?: string;\n}\n\nconst STAGE_WIDTH = 1280;\nconst STAGE_HEIGHT = 720;\nconst WINDOW_WIDTH = 900;\nconst WINDOW_HEIGHT = 480;\nconst CONTENT_PADDING = 20;\nconst CHROME_HEIGHT = 40;\nconst PROMPT_GAP = 8;\nconst FIRST_LINE_FRAME = 10;\n\nexport function TerminalCursorZoom({\n command = \"npx shadcn add @remocn/terminal-cursor-zoom\",\n zoom = 2.8,\n fontSize = 20,\n prompt = \"$\",\n title = \"~/code/remocn-demo\",\n charsPerFrame = 1,\n chunkSize = 1,\n speed = 1,\n className,\n}: TerminalCursorZoomProps) {\n const frame = useCurrentFrame();\n\n const charWidth = fontSize * 0.6;\n const windowLeft = (STAGE_WIDTH - WINDOW_WIDTH) / 2;\n const windowTop = (STAGE_HEIGHT - WINDOW_HEIGHT) / 2;\n const textStartX =\n windowLeft + CONTENT_PADDING + prompt.length * charWidth + PROMPT_GAP;\n const lineHeight = Math.round(fontSize * 1.6);\n const cursorY = windowTop + CHROME_HEIGHT + CONTENT_PADDING + lineHeight / 2;\n\n const lineStart = Math.round(FIRST_LINE_FRAME / speed);\n const localFrame = (frame - lineStart) * speed;\n const linearRevealed = Math.floor(\n interpolate(\n localFrame,\n [0, command.length / charsPerFrame],\n [0, command.length],\n {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n },\n ),\n );\n const revealed = Math.min(\n command.length,\n Math.ceil(linearRevealed / chunkSize) * chunkSize,\n );\n\n const cursorX = textStartX + revealed * charWidth;\n const tx = STAGE_WIDTH / 2 - zoom * cursorX;\n const ty = STAGE_HEIGHT / 2 - zoom * cursorY;\n\n return (\n <AbsoluteFill className={className} style={{ overflow: \"hidden\" }}>\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n width: STAGE_WIDTH,\n height: STAGE_HEIGHT,\n translate: `${tx}px ${ty}px`,\n scale: `${zoom}`,\n transformOrigin: \"0 0\",\n }}\n >\n <TerminalSimulator\n lines={[{ text: command, type: \"command\", delay: 0 }]}\n prompt={prompt}\n title={title}\n fontSize={fontSize}\n charsPerFrame={charsPerFrame}\n chunkSize={chunkSize}\n speed={speed}\n />\n </div>\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/terminal-cursor-zoom.tsx"}diff --git a/registry-artifacts/terminal-simulator.json b/registry-artifacts/terminal-simulator.jsonindex f12f0d51..e57c031d 100644--- a/registry-artifacts/terminal-simulator.json+++ b/registry-artifacts/terminal-simulator.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/terminal-simulator/index.tsx",- "content": "\"use client\";\n\nimport {\n interpolate,\n Sequence,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nexport type TerminalLineType = \"command\" | \"log\" | \"success\" | \"error\";\n\nexport interface TerminalLine {\n text: string;\n type: TerminalLineType;\n delay?: number;\n /**\n * Extra freeze-frame pause AFTER this line finishes typing, in frames.\n * Use this to build dramatic tension before the next batch of logs.\n * If omitted, lines whose text ends in \"...\" auto-freeze for 18 frames.\n */\n pause?: number;\n}\n\nexport interface TerminalSimulatorProps {\n lines?: TerminalLine[];\n prompt?: string;\n title?: string;\n background?: string;\n chromeColor?: string;\n fontSize?: number;\n /**\n * Reveal speed. Despite the name, the reveal is now CHUNKED — each\n * `1 / charsPerFrame` frames bumps the cursor by `chunkSize` characters,\n * so output appears in bursts instead of dripping char-by-char.\n */\n charsPerFrame?: number;\n /** Characters revealed per step. */\n chunkSize?: number;\n speed?: number;\n className?: string;\n}\n\nconst DEFAULT_LINES: TerminalLine[] = [\n { text: \"npm run build\", type: \"command\", delay: 0 },\n { text: \"Resolving dependencies...\", type: \"log\", delay: 6 },\n { text: \"> [email protected] build\", type: \"log\", delay: 4 },\n { text: \"> next build\", type: \"log\", delay: 4 },\n { text: \"Compiling...\", type: \"log\", delay: 12 },\n { text: \"Compiled successfully in 4.2s\", type: \"success\", delay: 14 },\n { text: \"Generating static pages (24/24)\", type: \"log\", delay: 10 },\n { text: \"Build completed without errors\", type: \"success\", delay: 12 },\n];\n\nconst TYPE_COLORS: Record<TerminalLineType, string> = {\n command: \"#fafafa\",\n log: \"#a1a1aa\",\n success: \"#22c55e\",\n error: \"#ef4444\",\n};\n\n/** Auto freeze-frame heuristic: any line ending in \"...\" holds the camera. */\nfunction autoPause(line: TerminalLine): number {\n if (line.pause !== undefined) return line.pause;\n if (line.text.trimEnd().endsWith(\"...\")) return 18;\n return 0;\n}\n\nexport function TerminalSimulator({\n lines = DEFAULT_LINES,\n prompt = \"$\",\n title = \"~/projects/remocn\",\n background = \"#0a0a0a\",\n chromeColor = \"#1a1a1a\",\n fontSize = 18,\n charsPerFrame = 1,\n chunkSize = 1,\n speed = 1,\n className,\n}: TerminalSimulatorProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const lineHeight = Math.round(fontSize * 1.6);\n const visibleLines = 8;\n const windowWidth = 900;\n const windowHeight = 480;\n\n // Compute cumulative start frames for each line, including auto/explicit\n // pauses AFTER a line finishes typing.\n const starts: number[] = [];\n let acc = 10;\n for (let i = 0; i < lines.length; i++) {\n const delay = lines[i].delay ?? 8;\n acc += delay;\n starts.push(acc);\n // Approximate typing duration (in frames) for chunked output.\n const typingFrames = Math.ceil(\n lines[i].text.length / (chunkSize * charsPerFrame),\n );\n acc += typingFrames + autoPause(lines[i]);\n }\n\n // STEP-FUNCTION scroll. Each overflowing line snaps the buffer up by\n // exactly one lineHeight on the frame it begins. No interpolation, no\n // easing — terminals do not glide.\n let translateY = 0;\n for (let i = visibleLines; i < lines.length; i++) {\n if (frame >= starts[i]) {\n translateY -= lineHeight;\n }\n }\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n style={{\n width: windowWidth,\n height: windowHeight,\n background,\n borderRadius: 12,\n overflow: \"hidden\",\n boxShadow:\n \"0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06)\",\n display: \"flex\",\n flexDirection: \"column\",\n fontFamily:\n \"var(--font-geist-mono), ui-monospace, SFMono-Regular, monospace\",\n }}\n >\n {/* Chrome */}\n <div\n style={{\n height: 40,\n background: chromeColor,\n display: \"flex\",\n alignItems: \"center\",\n padding: \"0 16px\",\n gap: 8,\n borderBottom: \"1px solid rgba(255,255,255,0.06)\",\n }}\n >\n <Light color=\"#ff5f57\" />\n <Light color=\"#febc2e\" />\n <Light color=\"#28c840\" />\n <div\n style={{\n flex: 1,\n textAlign: \"center\",\n color: \"#71717a\",\n fontSize: 13,\n }}\n >\n {title}\n </div>\n </div>\n\n {/* Content */}\n <div\n style={{\n flex: 1,\n padding: 20,\n overflow: \"hidden\",\n position: \"relative\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 20,\n right: 20,\n top: 20,\n transform: `translateY(${translateY}px)`,\n }}\n >\n {lines.map((line, index) => (\n <Sequence\n key={index}\n from={Math.round(starts[index] / speed)}\n layout=\"none\"\n >\n <TerminalLineRow\n line={line}\n prompt={prompt}\n fontSize={fontSize}\n lineHeight={lineHeight}\n charsPerFrame={charsPerFrame}\n chunkSize={chunkSize}\n fps={fps}\n speed={speed}\n />\n </Sequence>\n ))}\n </div>\n </div>\n </div>\n </div>\n );\n}\n\nfunction Light({ color }: { color: string }) {\n return (\n <div\n style={{\n width: 12,\n height: 12,\n borderRadius: \"50%\",\n background: color,\n opacity: 0.85,\n }}\n />\n );\n}\n\nfunction TerminalLineRow({\n line,\n prompt,\n fontSize,\n lineHeight,\n charsPerFrame,\n chunkSize,\n fps,\n speed,\n}: {\n line: TerminalLine;\n prompt: string;\n fontSize: number;\n lineHeight: number;\n charsPerFrame: number;\n chunkSize: number;\n fps: number;\n speed: number;\n}) {\n const localFrame = useCurrentFrame() * speed;\n const totalChars = line.text.length;\n\n // Chunked reveal: Math.floor of an interpolated count, then snapped to the\n // nearest multiple of `chunkSize`. This is what gives the bursty terminal\n // feel — text doesn't drip, it lurches.\n const linearRevealed = Math.floor(\n interpolate(localFrame, [0, totalChars / charsPerFrame], [0, totalChars], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n }),\n );\n const revealed = Math.min(\n totalChars,\n Math.ceil(linearRevealed / chunkSize) * chunkSize,\n );\n const visible = line.text.substring(0, revealed);\n const typingDone = revealed >= totalChars;\n // 2 Hz blink at any framerate.\n const cursorVisible = Math.floor((localFrame / fps) * 2) % 2 === 0;\n\n return (\n <div\n style={{\n height: lineHeight,\n fontSize,\n color: TYPE_COLORS[line.type],\n display: \"flex\",\n alignItems: \"center\",\n whiteSpace: \"pre\",\n }}\n >\n {line.type === \"command\" && (\n <span style={{ color: \"#22c55e\", marginRight: 8 }}>{prompt}</span>\n )}\n <span>{visible}</span>\n {!typingDone && cursorVisible && (\n <span\n style={{\n display: \"inline-block\",\n width: fontSize * 0.55,\n height: fontSize,\n background: TYPE_COLORS[line.type],\n marginLeft: 2,\n }}\n />\n )}\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport {\n interpolate,\n Sequence,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\n\nexport type TerminalLineType = \"command\" | \"log\" | \"success\" | \"error\";\n\nexport interface TerminalLine {\n text: string;\n type: TerminalLineType;\n delay?: number;\n /**\n * Extra freeze-frame pause AFTER this line finishes typing, in frames.\n * Use this to build dramatic tension before the next batch of logs.\n * If omitted, lines whose text ends in \"...\" auto-freeze for 18 frames.\n */\n pause?: number;\n}\n\nexport interface TerminalSimulatorProps {\n lines?: TerminalLine[];\n prompt?: string;\n title?: string;\n background?: string;\n chromeColor?: string;\n fontSize?: number;\n /**\n * Reveal speed. Despite the name, the reveal is now CHUNKED — each\n * `1 / charsPerFrame` frames bumps the cursor by `chunkSize` characters,\n * so output appears in bursts instead of dripping char-by-char.\n */\n charsPerFrame?: number;\n /** Characters revealed per step. */\n chunkSize?: number;\n speed?: number;\n className?: string;\n}\n\nconst DEFAULT_LINES: TerminalLine[] = [\n { text: \"npm run build\", type: \"command\", delay: 0 },\n { text: \"Resolving dependencies...\", type: \"log\", delay: 6 },\n { text: \"> [email protected] build\", type: \"log\", delay: 4 },\n { text: \"> next build\", type: \"log\", delay: 4 },\n { text: \"Compiling...\", type: \"log\", delay: 12 },\n { text: \"Compiled successfully in 4.2s\", type: \"success\", delay: 14 },\n { text: \"Generating static pages (24/24)\", type: \"log\", delay: 10 },\n { text: \"Build completed without errors\", type: \"success\", delay: 12 },\n];\n\nconst TYPE_COLORS: Record<TerminalLineType, string> = {\n command: \"#fafafa\",\n log: \"#a1a1aa\",\n success: \"#22c55e\",\n error: \"#ef4444\",\n};\n\n/** Auto freeze-frame heuristic: any line ending in \"...\" holds the camera. */\nfunction autoPause(line: TerminalLine): number {\n if (line.pause !== undefined) return line.pause;\n if (line.text.trimEnd().endsWith(\"...\")) return 18;\n return 0;\n}\n\nexport function TerminalSimulator({\n lines = DEFAULT_LINES,\n prompt = \"$\",\n title = \"~/projects/remocn\",\n background = \"#0a0a0a\",\n chromeColor = \"#1a1a1a\",\n fontSize = 18,\n charsPerFrame = 1,\n chunkSize = 1,\n speed = 1,\n className,\n}: TerminalSimulatorProps) {\n const frame = useCurrentFrame() * speed;\n const { fps } = useVideoConfig();\n\n const lineHeight = Math.round(fontSize * 1.6);\n const visibleLines = 8;\n const windowWidth = 900;\n const windowHeight = 480;\n\n // Compute cumulative start frames for each line, including auto/explicit\n // pauses AFTER a line finishes typing.\n const starts: number[] = [];\n let acc = 10;\n for (let i = 0; i < lines.length; i++) {\n const delay = lines[i].delay ?? 8;\n acc += delay;\n starts.push(acc);\n // Approximate typing duration (in frames) for chunked output.\n const typingFrames = Math.ceil(\n lines[i].text.length / (chunkSize * charsPerFrame),\n );\n acc += typingFrames + autoPause(lines[i]);\n }\n\n // STEP-FUNCTION scroll. Each overflowing line snaps the buffer up by\n // exactly one lineHeight on the frame it begins. No interpolation, no\n // easing — terminals do not glide.\n let translateY = 0;\n for (let i = visibleLines; i < lines.length; i++) {\n if (frame >= starts[i]) {\n translateY -= lineHeight;\n }\n }\n\n return (\n <div\n className={className}\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div\n style={{\n width: windowWidth,\n height: windowHeight,\n background,\n borderRadius: 12,\n overflow: \"hidden\",\n boxShadow:\n \"0 30px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06)\",\n display: \"flex\",\n flexDirection: \"column\",\n fontFamily:\n \"var(--font-geist-mono), ui-monospace, SFMono-Regular, monospace\",\n }}\n >\n {/* Chrome */}\n <div\n style={{\n height: 40,\n background: chromeColor,\n display: \"flex\",\n alignItems: \"center\",\n padding: \"0 16px\",\n gap: 8,\n borderBottom: \"1px solid rgba(255,255,255,0.06)\",\n }}\n >\n <Light color=\"#ff5f57\" />\n <Light color=\"#febc2e\" />\n <Light color=\"#28c840\" />\n <div\n style={{\n flex: 1,\n textAlign: \"center\",\n color: \"#71717a\",\n fontSize: 13,\n }}\n >\n {title}\n </div>\n </div>\n\n {/* Content */}\n <div\n style={{\n flex: 1,\n padding: 20,\n overflow: \"hidden\",\n position: \"relative\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 20,\n right: 20,\n top: 20,\n translate: `0 ${translateY}px`,\n }}\n >\n {lines.map((line, index) => (\n <Sequence\n key={index}\n from={Math.round(starts[index] / speed)}\n layout=\"none\"\n >\n <TerminalLineRow\n line={line}\n prompt={prompt}\n fontSize={fontSize}\n lineHeight={lineHeight}\n charsPerFrame={charsPerFrame}\n chunkSize={chunkSize}\n fps={fps}\n speed={speed}\n />\n </Sequence>\n ))}\n </div>\n </div>\n </div>\n </div>\n );\n}\n\nfunction Light({ color }: { color: string }) {\n return (\n <div\n style={{\n width: 12,\n height: 12,\n borderRadius: \"50%\",\n background: color,\n opacity: 0.85,\n }}\n />\n );\n}\n\nfunction TerminalLineRow({\n line,\n prompt,\n fontSize,\n lineHeight,\n charsPerFrame,\n chunkSize,\n fps,\n speed,\n}: {\n line: TerminalLine;\n prompt: string;\n fontSize: number;\n lineHeight: number;\n charsPerFrame: number;\n chunkSize: number;\n fps: number;\n speed: number;\n}) {\n const localFrame = useCurrentFrame() * speed;\n const totalChars = line.text.length;\n\n // Chunked reveal: Math.floor of an interpolated count, then snapped to the\n // nearest multiple of `chunkSize`. This is what gives the bursty terminal\n // feel — text doesn't drip, it lurches.\n const linearRevealed = Math.floor(\n interpolate(localFrame, [0, totalChars / charsPerFrame], [0, totalChars], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n }),\n );\n const revealed = Math.min(\n totalChars,\n Math.ceil(linearRevealed / chunkSize) * chunkSize,\n );\n const visible = line.text.substring(0, revealed);\n const typingDone = revealed >= totalChars;\n // 2 Hz blink at any framerate.\n const cursorVisible = Math.floor((localFrame / fps) * 2) % 2 === 0;\n\n return (\n <div\n style={{\n height: lineHeight,\n fontSize,\n color: TYPE_COLORS[line.type],\n display: \"flex\",\n alignItems: \"center\",\n whiteSpace: \"pre\",\n }}\n >\n {line.type === \"command\" && (\n <span style={{ color: \"#22c55e\", marginRight: 8 }}>{prompt}</span>\n )}\n <span>{visible}</span>\n {!typingDone && cursorVisible && (\n <span\n style={{\n display: \"inline-block\",\n width: fontSize * 0.55,\n height: fontSize,\n background: TYPE_COLORS[line.type],\n marginLeft: 2,\n }}\n />\n )}\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/terminal-simulator.tsx"}diff --git a/registry-artifacts/top-down-letters.json b/registry-artifacts/top-down-letters.jsonindex 8d420086..44f910cf 100644--- a/registry-artifacts/top-down-letters.json+++ b/registry-artifacts/top-down-letters.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/top-down-letters/index.tsx",- "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface TopDownLettersProps {\n text: string;\n staggerDelay?: number;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function TopDownLetters({\n text,\n staggerDelay = 3,\n distance = 46,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: TopDownLettersProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 12;\n const charTravelFrames = 7;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerDelay;\n const easing = Easing.bezier(0.18, 1, 0.32, 1);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charTravelFrames], [-distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n transform: `translateY(${y}px)`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n",+ "content": "\"use client\";\n\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nexport interface TopDownLettersProps {\n text: string;\n staggerDelay?: number;\n distance?: number;\n fontSize?: number;\n color?: string;\n fontWeight?: number;\n speed?: number;\n className?: string;\n}\n\nexport function TopDownLetters({\n text,\n staggerDelay = 3,\n distance = 46,\n fontSize = 72,\n color = \"#171717\",\n fontWeight = 600,\n speed = 1,\n className,\n}: TopDownLettersProps) {\n const frame = useCurrentFrame() * speed;\n\n const chars = Array.from(text);\n const charDurationFrames = 12;\n const charTravelFrames = 7;\n\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"transparent\",\n }}\n >\n <span\n className={className}\n style={{\n fontSize,\n fontWeight,\n color,\n letterSpacing: \"-0.05em\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {chars.map((char, i) => {\n const local = frame - i * staggerDelay;\n const easing = Easing.bezier(0.18, 1, 0.32, 1);\n const opacity = interpolate(local, [0, charDurationFrames], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n const y = interpolate(local, [0, charTravelFrames], [-distance, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n easing,\n });\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n whiteSpace: \"pre\",\n backfaceVisibility: \"hidden\",\n transformOrigin: \"50% 55%\",\n opacity,\n translate: `0 ${y}px`,\n }}\n >\n {char}\n </span>\n );\n })}\n </span>\n </div>\n );\n}\n","type": "registry:component","target": "components/remocn/top-down-letters.tsx"}diff --git a/registry-artifacts/tv-power-off.json b/registry-artifacts/tv-power-off.jsonindex 301aeced..b24b3696 100644--- a/registry-artifacts/tv-power-off.json+++ b/registry-artifacts/tv-power-off.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/tv-power-off/index.tsx",- "content": "\"use client\";\n\nimport type React from \"react\";\nimport { AbsoluteFill, useCurrentFrame } from \"remotion\";\nimport {\n type CanvasFilterProps,\n makeCanvasFilter,\n makeFilterShader,\n} from \"@/lib/remocn/canvas-presentation\";\n\nexport type TvPowerOffProps = {\n durationInFrames?: number;\n delay?: number;\n gain?: number;\n afterglow?: number;\n phosphor?: string;\n};\n\nconst DEFAULTS = {\n durationInFrames: 18,\n delay: 0,\n gain: 1,\n afterglow: 1,\n phosphor: \"#d8ecff\",\n};\n\nconst COLLAPSE_END = 0.6;\nconst PINCH_END = 0.82;\nconst MIN_SQUASH = 0.0055;\nconst MIN_PINCH = 0.004;\nconst CONCENTRATION = 0.3;\nconst DECAY_CURVE = 2.6;\nconst BLACKOUT_IN = 0.06;\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_scene;\nuniform vec2 u_resolution;\nuniform float u_aspect;\nuniform float u_progress;\nuniform float u_gain;\nuniform float u_afterglow;\nuniform vec3 u_phosphor;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst int TAPS = 32;\nconst int COLUMN_TAPS = 8;\nconst float GOLDEN = 0.6180339887;\nconst float COLLAPSE_END = ${COLLAPSE_END.toFixed(4)};\nconst float PINCH_END = ${PINCH_END.toFixed(4)};\nconst float MIN_SQUASH = ${MIN_SQUASH.toFixed(5)};\nconst float MIN_PINCH = ${MIN_PINCH.toFixed(5)};\nconst float CONCENTRATION = ${CONCENTRATION.toFixed(4)};\nconst float DECAY_CURVE = ${DECAY_CURVE.toFixed(4)};\nconst float BLACKOUT_IN = ${BLACKOUT_IN.toFixed(4)};\n\nvoid main() {\n float p = u_progress;\n\n if (p <= 0.0) {\n outColor = texture(u_scene, v_uv);\n return;\n }\n if (p >= 1.0) {\n outColor = vec4(0.0, 0.0, 0.0, 1.0);\n return;\n }\n\n float collapse = clamp(p / COLLAPSE_END, 0.0, 1.0);\n float pinch = clamp((p - COLLAPSE_END) / (PINCH_END - COLLAPSE_END), 0.0, 1.0);\n float decayed = clamp((p - PINCH_END) / (1.0 - PINCH_END), 0.0, 1.0);\n\n vec2 scale = vec2(pow(MIN_PINCH, pinch), pow(MIN_SQUASH, collapse));\n vec2 centered = (v_uv - 0.5) / scale + 0.5;\n vec2 span = 1.0 / (scale * u_resolution);\n\n vec3 sum = vec3(0.0);\n for (int i = 0; i < TAPS; i++) {\n float fi = float(i);\n vec2 at = centered + vec2(\n (fract(fi * GOLDEN + 0.5) - 0.5) * span.x,\n ((fi + 0.5) / float(TAPS) - 0.5) * span.y\n );\n vec2 inside = step(vec2(0.0), at) * step(at, vec2(1.0));\n sum += texture(u_scene, at).rgb * inside.x * inside.y;\n }\n\n float concentrate = pow(1.0 / (scale.x * scale.y), CONCENTRATION);\n vec3 light =\n (sum / float(TAPS)) * (1.0 + (concentrate - 1.0) * max(u_gain, 0.0));\n\n float glow = max(u_afterglow, 0.0);\n float bleed = smoothstep(0.2, 0.8, collapse) * (1.0 - pinch) * glow;\n\n if (bleed > 0.0) {\n vec3 column = vec3(0.0);\n float cx = clamp(centered.x, 0.0, 1.0);\n for (int i = 0; i < COLUMN_TAPS; i++) {\n column +=\n texture(u_scene, vec2(cx, (float(i) + 0.5) / float(COLUMN_TAPS))).rgb;\n }\n column /= float(COLUMN_TAPS);\n\n float dy = v_uv.y - 0.5;\n float reach = 0.02 + 0.03 * collapse;\n light +=\n column *\n mix(vec3(1.0), u_phosphor, 0.65) *\n exp(-(dy * dy) / (reach * reach)) *\n bleed *\n 0.9;\n }\n\n if (pinch > 0.0) {\n vec2 d = (v_uv - 0.5) * vec2(u_aspect, 1.0);\n float radius = max(0.045 * glow, 0.0005);\n light +=\n u_phosphor *\n exp(-dot(d, d) / (radius * radius)) *\n smoothstep(0.0, 0.5, pinch) *\n 1.15;\n }\n\n light *= pow(max(1.0 - decayed, 0.0001), DECAY_CURVE);\n\n float blackout = smoothstep(0.0, BLACKOUT_IN, p);\n outColor = vec4(\n clamp(light, 0.0, 1.0),\n mix(texture(u_scene, v_uv).a, 1.0, blackout)\n );\n}`;\n\nconst clamp = (value: number, min: number, max: number) =>\n Math.min(max, Math.max(min, value));\n\nfunction toRgb(hex: string): [number, number, number] {\n const value = hex.replace(\"#\", \"\");\n const full =\n value.length === 3\n ? value\n .split(\"\")\n .map((c) => c + c)\n .join(\"\")\n : value;\n const int = Number.parseInt(full, 16);\n if (Number.isNaN(int)) return [1, 1, 1];\n return [\n ((int >> 16) & 255) / 255,\n ((int >> 8) & 255) / 255,\n (int & 255) / 255,\n ];\n}\n\nfunction powerProgress(props: TvPowerOffProps, frame: number): number {\n const {\n durationInFrames = DEFAULTS.durationInFrames,\n delay = DEFAULTS.delay,\n } = props;\n return clamp((frame - delay) / Math.max(1, durationInFrames), 0, 1);\n}\n\nconst shader = makeFilterShader<TvPowerOffProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, width, height, frame, passedProps }) => {\n const {\n gain = DEFAULTS.gain,\n afterglow = DEFAULTS.afterglow,\n phosphor = DEFAULTS.phosphor,\n } = passedProps;\n gl.uniform1f(uniform(\"u_progress\"), powerProgress(passedProps, frame));\n gl.uniform2f(uniform(\"u_resolution\"), width, height);\n gl.uniform1f(uniform(\"u_gain\"), gain);\n gl.uniform1f(uniform(\"u_afterglow\"), afterglow);\n gl.uniform3fv(uniform(\"u_phosphor\"), toRgb(phosphor));\n },\n);\n\nconst TvPowerOffFallback: React.FC<TvPowerOffProps & CanvasFilterProps> = (\n props,\n) => {\n const frame = useCurrentFrame();\n const {\n children,\n gain = DEFAULTS.gain,\n afterglow = DEFAULTS.afterglow,\n phosphor = DEFAULTS.phosphor,\n } = props;\n\n const p = powerProgress(props, frame);\n const collapse = clamp(p / COLLAPSE_END, 0, 1);\n const pinch = clamp((p - COLLAPSE_END) / (PINCH_END - COLLAPSE_END), 0, 1);\n const decayed = clamp((p - PINCH_END) / (1 - PINCH_END), 0, 1);\n\n const squash = MIN_SQUASH ** collapse;\n const pinchX = MIN_PINCH ** pinch;\n const concentrate = (1 / (squash * pinchX)) ** CONCENTRATION;\n const fade = (1 - decayed) ** DECAY_CURVE;\n\n return (\n <AbsoluteFill>\n <AbsoluteFill\n style={{\n background: \"#000000\",\n opacity: clamp(p / BLACKOUT_IN, 0, 1),\n }}\n />\n <AbsoluteFill\n style={{\n transform: `scale(${pinchX}, ${squash})`,\n filter: `brightness(${1 + (concentrate - 1) * Math.max(gain, 0)})`,\n opacity: fade,\n }}\n >\n {children}\n </AbsoluteFill>\n <AbsoluteFill\n style={{\n background: `radial-gradient(circle at 50% 50%, ${phosphor} 0%, transparent 55%)`,\n opacity: clamp(pinch * afterglow, 0, 1) * fade,\n }}\n />\n </AbsoluteFill>\n );\n};\n\nexport const TvPowerOff = makeCanvasFilter<TvPowerOffProps>({\n shader,\n fallback: TvPowerOffFallback,\n});\n",+ "content": "\"use client\";\n\nimport type React from \"react\";\nimport { AbsoluteFill, useCurrentFrame } from \"remotion\";\nimport {\n type CanvasFilterProps,\n makeCanvasFilter,\n makeFilterShader,\n} from \"@/lib/remocn/canvas-presentation\";\n\nexport type TvPowerOffProps = {\n durationInFrames?: number;\n delay?: number;\n gain?: number;\n afterglow?: number;\n phosphor?: string;\n};\n\nconst DEFAULTS = {\n durationInFrames: 18,\n delay: 0,\n gain: 1,\n afterglow: 1,\n phosphor: \"#d8ecff\",\n};\n\nconst COLLAPSE_END = 0.6;\nconst PINCH_END = 0.82;\nconst MIN_SQUASH = 0.0055;\nconst MIN_PINCH = 0.004;\nconst CONCENTRATION = 0.3;\nconst DECAY_CURVE = 2.6;\nconst BLACKOUT_IN = 0.06;\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_scene;\nuniform vec2 u_resolution;\nuniform float u_aspect;\nuniform float u_progress;\nuniform float u_gain;\nuniform float u_afterglow;\nuniform vec3 u_phosphor;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst int TAPS = 32;\nconst int COLUMN_TAPS = 8;\nconst float GOLDEN = 0.6180339887;\nconst float COLLAPSE_END = ${COLLAPSE_END.toFixed(4)};\nconst float PINCH_END = ${PINCH_END.toFixed(4)};\nconst float MIN_SQUASH = ${MIN_SQUASH.toFixed(5)};\nconst float MIN_PINCH = ${MIN_PINCH.toFixed(5)};\nconst float CONCENTRATION = ${CONCENTRATION.toFixed(4)};\nconst float DECAY_CURVE = ${DECAY_CURVE.toFixed(4)};\nconst float BLACKOUT_IN = ${BLACKOUT_IN.toFixed(4)};\n\nvoid main() {\n float p = u_progress;\n\n if (p <= 0.0) {\n outColor = texture(u_scene, v_uv);\n return;\n }\n if (p >= 1.0) {\n outColor = vec4(0.0, 0.0, 0.0, 1.0);\n return;\n }\n\n float collapse = clamp(p / COLLAPSE_END, 0.0, 1.0);\n float pinch = clamp((p - COLLAPSE_END) / (PINCH_END - COLLAPSE_END), 0.0, 1.0);\n float decayed = clamp((p - PINCH_END) / (1.0 - PINCH_END), 0.0, 1.0);\n\n vec2 scale = vec2(pow(MIN_PINCH, pinch), pow(MIN_SQUASH, collapse));\n vec2 centered = (v_uv - 0.5) / scale + 0.5;\n vec2 span = 1.0 / (scale * u_resolution);\n\n vec3 sum = vec3(0.0);\n for (int i = 0; i < TAPS; i++) {\n float fi = float(i);\n vec2 at = centered + vec2(\n (fract(fi * GOLDEN + 0.5) - 0.5) * span.x,\n ((fi + 0.5) / float(TAPS) - 0.5) * span.y\n );\n vec2 inside = step(vec2(0.0), at) * step(at, vec2(1.0));\n sum += texture(u_scene, at).rgb * inside.x * inside.y;\n }\n\n float concentrate = pow(1.0 / (scale.x * scale.y), CONCENTRATION);\n vec3 light =\n (sum / float(TAPS)) * (1.0 + (concentrate - 1.0) * max(u_gain, 0.0));\n\n float glow = max(u_afterglow, 0.0);\n float bleed = smoothstep(0.2, 0.8, collapse) * (1.0 - pinch) * glow;\n\n if (bleed > 0.0) {\n vec3 column = vec3(0.0);\n float cx = clamp(centered.x, 0.0, 1.0);\n for (int i = 0; i < COLUMN_TAPS; i++) {\n column +=\n texture(u_scene, vec2(cx, (float(i) + 0.5) / float(COLUMN_TAPS))).rgb;\n }\n column /= float(COLUMN_TAPS);\n\n float dy = v_uv.y - 0.5;\n float reach = 0.02 + 0.03 * collapse;\n light +=\n column *\n mix(vec3(1.0), u_phosphor, 0.65) *\n exp(-(dy * dy) / (reach * reach)) *\n bleed *\n 0.9;\n }\n\n if (pinch > 0.0) {\n vec2 d = (v_uv - 0.5) * vec2(u_aspect, 1.0);\n float radius = max(0.045 * glow, 0.0005);\n light +=\n u_phosphor *\n exp(-dot(d, d) / (radius * radius)) *\n smoothstep(0.0, 0.5, pinch) *\n 1.15;\n }\n\n light *= pow(max(1.0 - decayed, 0.0001), DECAY_CURVE);\n\n float blackout = smoothstep(0.0, BLACKOUT_IN, p);\n outColor = vec4(\n clamp(light, 0.0, 1.0),\n mix(texture(u_scene, v_uv).a, 1.0, blackout)\n );\n}`;\n\nconst clamp = (value: number, min: number, max: number) =>\n Math.min(max, Math.max(min, value));\n\nfunction toRgb(hex: string): [number, number, number] {\n const value = hex.replace(\"#\", \"\");\n const full =\n value.length === 3\n ? value\n .split(\"\")\n .map((c) => c + c)\n .join(\"\")\n : value;\n const int = Number.parseInt(full, 16);\n if (Number.isNaN(int)) return [1, 1, 1];\n return [\n ((int >> 16) & 255) / 255,\n ((int >> 8) & 255) / 255,\n (int & 255) / 255,\n ];\n}\n\nfunction powerProgress(props: TvPowerOffProps, frame: number): number {\n const {\n durationInFrames = DEFAULTS.durationInFrames,\n delay = DEFAULTS.delay,\n } = props;\n return clamp((frame - delay) / Math.max(1, durationInFrames), 0, 1);\n}\n\nconst shader = makeFilterShader<TvPowerOffProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, width, height, frame, passedProps }) => {\n const {\n gain = DEFAULTS.gain,\n afterglow = DEFAULTS.afterglow,\n phosphor = DEFAULTS.phosphor,\n } = passedProps;\n gl.uniform1f(uniform(\"u_progress\"), powerProgress(passedProps, frame));\n gl.uniform2f(uniform(\"u_resolution\"), width, height);\n gl.uniform1f(uniform(\"u_gain\"), gain);\n gl.uniform1f(uniform(\"u_afterglow\"), afterglow);\n gl.uniform3fv(uniform(\"u_phosphor\"), toRgb(phosphor));\n },\n);\n\nconst TvPowerOffFallback: React.FC<TvPowerOffProps & CanvasFilterProps> = (\n props,\n) => {\n const frame = useCurrentFrame();\n const {\n children,\n gain = DEFAULTS.gain,\n afterglow = DEFAULTS.afterglow,\n phosphor = DEFAULTS.phosphor,\n } = props;\n\n const p = powerProgress(props, frame);\n const collapse = clamp(p / COLLAPSE_END, 0, 1);\n const pinch = clamp((p - COLLAPSE_END) / (PINCH_END - COLLAPSE_END), 0, 1);\n const decayed = clamp((p - PINCH_END) / (1 - PINCH_END), 0, 1);\n\n const squash = MIN_SQUASH ** collapse;\n const pinchX = MIN_PINCH ** pinch;\n const concentrate = (1 / (squash * pinchX)) ** CONCENTRATION;\n const fade = (1 - decayed) ** DECAY_CURVE;\n\n return (\n <AbsoluteFill>\n <AbsoluteFill\n style={{\n background: \"#000000\",\n opacity: clamp(p / BLACKOUT_IN, 0, 1),\n }}\n />\n <AbsoluteFill\n style={{\n scale: `${pinchX} ${squash}`,\n filter: `brightness(${1 + (concentrate - 1) * Math.max(gain, 0)})`,\n opacity: fade,\n }}\n >\n {children}\n </AbsoluteFill>\n <AbsoluteFill\n style={{\n background: `radial-gradient(circle at 50% 50%, ${phosphor} 0%, transparent 55%)`,\n opacity: clamp(pinch * afterglow, 0, 1) * fade,\n }}\n />\n </AbsoluteFill>\n );\n};\n\nexport const TvPowerOff = makeCanvasFilter<TvPowerOffProps>({\n shader,\n fallback: TvPowerOffFallback,\n});\n","type": "registry:component","target": "components/remocn/tv-power-off.tsx"}diff --git a/registry-artifacts/v0.json b/registry-artifacts/v0.jsonindex a92777f6..db1aed2e 100644--- a/registry-artifacts/v0.json+++ b/registry-artifacts/v0.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/v0/index.tsx",- "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/Inter\";\nimport {\n AbsoluteFill,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { Caret } from \"@/components/remocn/caret\";\nimport { useTypewriter } from \"@/lib/remocn-ui\";\n\nconst { fontFamily: SANS_FAMILY } = loadFont();\n\nexport interface V0Props {\n greeting?: string;\n placeholder?: string;\n prompt?: string;\n modelName?: string;\n projectName?: string;\n speed?: number;\n}\n\ninterface Theme {\n page: string;\n boxBg: string;\n boxBorder: string;\n fg: string;\n fgMuted: string;\n iconColor: string;\n btnBg: string;\n btnFg: string;\n}\n\nexport const THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n page: \"#FFFFFF\",\n boxBg: \"#FFFFFF\",\n boxBorder: \"#E3E3E3\",\n fg: \"#0D0D0D\",\n fgMuted: \"#8A8A8A\",\n iconColor: \"#5D5D5D\",\n btnBg: \"#0D0D0D\",\n btnFg: \"#FFFFFF\",\n },\n dark: {\n page: \"#000000\",\n boxBg: \"#0A0A0A\",\n boxBorder: \"#2A2A2A\",\n fg: \"#EDEDED\",\n fgMuted: \"#8A8A8A\",\n iconColor: \"#A0A0A0\",\n btnBg: \"#FFFFFF\",\n btnFg: \"#0A0A0A\",\n },\n};\n\nexport const TYPING_START_FRAME = 42;\n\nexport const TYPING_CPS = 22;\n\nexport function morphProgressAt(\n frame: number,\n opts: { startFrame?: number; fps: number; speed: number },\n): number {\n const startFrame = opts.startFrame ?? TYPING_START_FRAME;\n const value = spring({\n fps: opts.fps,\n frame: frame * opts.speed - startFrame,\n config: { damping: 14, stiffness: 200, mass: 0.6 },\n });\n return Math.max(0, Math.min(value, 1));\n}\n\nfunction introBounceIn(\n frame: number,\n fps: number,\n): { translateY: number; scale: number } {\n const s = spring({\n fps,\n frame,\n config: { damping: 14, stiffness: 110, mass: 0.7 },\n });\n const translateY = interpolate(s, [0, 1], [28, 0]);\n const scale = interpolate(s, [0, 1], [0.97, 1]);\n return { translateY, scale };\n}\n\nfunction fadeUpAt(\n frame: number,\n range: [number, number],\n): { opacity: number; translateY: number } {\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n };\n return {\n opacity: interpolate(frame, range, [0, 1], opts),\n translateY: interpolate(frame, range, [12, 0], opts),\n };\n}\n\nfunction PlusIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Add</title>\n <path\n d=\"M12 5v14M5 12h14\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n />\n </svg>\n );\n}\n\nfunction V0LogoIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>v0</title>\n <rect\n x={2.5}\n y={2.5}\n width={19}\n height={19}\n rx={5}\n stroke={color}\n strokeWidth={1.8}\n />\n <rect\n x={7.5}\n y={7.5}\n width={9}\n height={9}\n rx={2.5}\n stroke={color}\n strokeWidth={1.8}\n />\n </svg>\n );\n}\n\nfunction ChevronDownIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Expand</title>\n <path\n d=\"M6 9l6 6 6-6\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction MicIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Voice input</title>\n <rect\n x={9}\n y={3}\n width={6}\n height={11}\n rx={3}\n stroke={color}\n strokeWidth={1.8}\n />\n <path\n d=\"M5.5 11a6.5 6.5 0 0013 0M12 17.5V21M9 21h6\"\n stroke={color}\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction ArrowUpIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Send</title>\n <path\n d=\"M12 19V6M12 6l-6 6M12 6l6 6\"\n stroke={color}\n strokeWidth={2.2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nexport function V0({\n greeting = \"What do you want to create?\",\n placeholder = \"Ask v0 to build…\",\n prompt = \"a landing page for my SaaS with pricing and testimonials\",\n modelName = \"v0 Max\",\n projectName = \"Project\",\n speed = 1,\n}: V0Props) {\n const frame = useCurrentFrame();\n const { width, height, fps } = useVideoConfig();\n const t = THEMES.dark;\n\n const refW = 1280;\n const refH = 720;\n const stageScale = Math.min(width / refW, height / refH);\n\n const tw = useTypewriter(prompt, {\n cps: TYPING_CPS,\n speed,\n startFrame: TYPING_START_FRAME,\n });\n const visibleText = tw.text;\n const showText = tw.count > 0;\n const morph = morphProgressAt(frame, { fps, speed });\n\n const intro = introBounceIn(frame * speed, fps);\n const headingFade = fadeUpAt(frame * speed, [4, 20]);\n const boxFade = fadeUpAt(frame * speed, [10, 26]);\n\n const boxWidth = 880;\n const boxLeft = (refW - boxWidth) / 2;\n const boxTop = 270;\n const boxHeight = 150;\n const btnSize = 40;\n\n return (\n <AbsoluteFill style={{ background: \"transparent\" }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: refW,\n height: refH,\n transform: `translate(-50%, -50%) scale(${stageScale})`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 150,\n width: refW,\n textAlign: \"center\",\n fontFamily: SANS_FAMILY,\n fontSize: 44,\n fontWeight: 700,\n color: t.fg,\n opacity: headingFade.opacity,\n transform: `translateY(${headingFade.translateY + intro.translateY * 0.4}px)`,\n }}\n >\n {greeting}\n </div>\n\n <div\n style={{\n position: \"absolute\",\n left: boxLeft,\n top: boxTop,\n width: boxWidth,\n height: boxHeight,\n background: t.boxBg,\n border: `1px solid ${t.boxBorder}`,\n borderRadius: 16,\n boxShadow: \"0 8px 40px -16px rgba(0,0,0,0.8)\",\n opacity: boxFade.opacity,\n transform: `translateY(${boxFade.translateY + intro.translateY * 0.6}px) scale(${intro.scale})`,\n transformOrigin: \"center top\",\n display: \"flex\",\n flexDirection: \"column\",\n boxSizing: \"border-box\",\n }}\n >\n <div\n style={{\n flex: 1,\n padding: \"18px 20px\",\n fontFamily: SANS_FAMILY,\n fontSize: 18,\n color: t.fg,\n display: \"flex\",\n alignItems: \"flex-start\",\n overflow: \"hidden\",\n }}\n >\n {showText ? (\n <span\n style={{\n color: t.fg,\n whiteSpace: \"pre-wrap\",\n }}\n >\n {visibleText}\n <Caret\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n height={20}\n marginLeft={2}\n />\n </span>\n ) : (\n <span\n style={{\n color: t.fgMuted,\n display: \"inline-flex\",\n alignItems: \"center\",\n }}\n >\n <Caret\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n height={20}\n />\n <span style={{ marginLeft: 6 }}>{placeholder}</span>\n </span>\n )}\n </div>\n\n <div\n style={{\n padding: \"12px 16px\",\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n }}\n >\n <div style={{ display: \"flex\", alignItems: \"center\", gap: 10 }}>\n <PlusIcon size={20} color={t.iconColor} />\n <div\n style={{\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: 7,\n }}\n >\n <V0LogoIcon size={18} color={t.fg} />\n <span\n style={{\n fontFamily: SANS_FAMILY,\n fontSize: 15,\n fontWeight: 500,\n color: t.fg,\n }}\n >\n {modelName}\n </span>\n <ChevronDownIcon size={14} color={t.fgMuted} />\n </div>\n </div>\n\n <div style={{ display: \"flex\", alignItems: \"center\", gap: 12 }}>\n <div\n style={{\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: 4,\n }}\n >\n <span\n style={{\n fontFamily: SANS_FAMILY,\n fontSize: 15,\n color: t.fgMuted,\n }}\n >\n {projectName}\n </span>\n <ChevronDownIcon size={14} color={t.fgMuted} />\n </div>\n\n <div\n style={{\n position: \"relative\",\n width: btnSize,\n height: btnSize,\n borderRadius: 10,\n background: t.btnBg,\n flexShrink: 0,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n opacity: 1 - morph,\n transform: `scale(${1 - 0.08 * morph})`,\n }}\n >\n <MicIcon size={20} color={t.btnFg} />\n </div>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n opacity: morph,\n transform: `scale(${0.85 + 0.15 * morph})`,\n }}\n >\n <ArrowUpIcon size={20} color={t.btnFg} />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/Inter\";\nimport {\n AbsoluteFill,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { Caret } from \"@/components/remocn/caret\";\nimport { useTypewriter } from \"@/lib/remocn-ui\";\n\nconst { fontFamily: SANS_FAMILY } = loadFont();\n\nexport interface V0Props {\n greeting?: string;\n placeholder?: string;\n prompt?: string;\n modelName?: string;\n projectName?: string;\n speed?: number;\n}\n\ninterface Theme {\n page: string;\n boxBg: string;\n boxBorder: string;\n fg: string;\n fgMuted: string;\n iconColor: string;\n btnBg: string;\n btnFg: string;\n}\n\nexport const THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n page: \"#FFFFFF\",\n boxBg: \"#FFFFFF\",\n boxBorder: \"#E3E3E3\",\n fg: \"#0D0D0D\",\n fgMuted: \"#8A8A8A\",\n iconColor: \"#5D5D5D\",\n btnBg: \"#0D0D0D\",\n btnFg: \"#FFFFFF\",\n },\n dark: {\n page: \"#000000\",\n boxBg: \"#0A0A0A\",\n boxBorder: \"#2A2A2A\",\n fg: \"#EDEDED\",\n fgMuted: \"#8A8A8A\",\n iconColor: \"#A0A0A0\",\n btnBg: \"#FFFFFF\",\n btnFg: \"#0A0A0A\",\n },\n};\n\nexport const TYPING_START_FRAME = 42;\n\nexport const TYPING_CPS = 22;\n\nexport function morphProgressAt(\n frame: number,\n opts: { startFrame?: number; fps: number; speed: number },\n): number {\n const startFrame = opts.startFrame ?? TYPING_START_FRAME;\n const value = spring({\n fps: opts.fps,\n frame: frame * opts.speed - startFrame,\n config: { damping: 14, stiffness: 200, mass: 0.6 },\n });\n return Math.max(0, Math.min(value, 1));\n}\n\nfunction introBounceIn(\n frame: number,\n fps: number,\n): { translateY: number; scale: number } {\n const s = spring({\n fps,\n frame,\n config: { damping: 14, stiffness: 110, mass: 0.7 },\n });\n const translateY = interpolate(s, [0, 1], [28, 0]);\n const scale = interpolate(s, [0, 1], [0.97, 1]);\n return { translateY, scale };\n}\n\nfunction fadeUpAt(\n frame: number,\n range: [number, number],\n): { opacity: number; translateY: number } {\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n };\n return {\n opacity: interpolate(frame, range, [0, 1], opts),\n translateY: interpolate(frame, range, [12, 0], opts),\n };\n}\n\nfunction PlusIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Add</title>\n <path\n d=\"M12 5v14M5 12h14\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n />\n </svg>\n );\n}\n\nfunction V0LogoIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>v0</title>\n <rect\n x={2.5}\n y={2.5}\n width={19}\n height={19}\n rx={5}\n stroke={color}\n strokeWidth={1.8}\n />\n <rect\n x={7.5}\n y={7.5}\n width={9}\n height={9}\n rx={2.5}\n stroke={color}\n strokeWidth={1.8}\n />\n </svg>\n );\n}\n\nfunction ChevronDownIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Expand</title>\n <path\n d=\"M6 9l6 6 6-6\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction MicIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Voice input</title>\n <rect\n x={9}\n y={3}\n width={6}\n height={11}\n rx={3}\n stroke={color}\n strokeWidth={1.8}\n />\n <path\n d=\"M5.5 11a6.5 6.5 0 0013 0M12 17.5V21M9 21h6\"\n stroke={color}\n strokeWidth={1.8}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction ArrowUpIcon({ size, color }: { size: number; color: string }) {\n return (\n <svg width={size} height={size} viewBox=\"0 0 24 24\" fill=\"none\">\n <title>Send</title>\n <path\n d=\"M12 19V6M12 6l-6 6M12 6l6 6\"\n stroke={color}\n strokeWidth={2.2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nexport function V0({\n greeting = \"What do you want to create?\",\n placeholder = \"Ask v0 to build…\",\n prompt = \"a landing page for my SaaS with pricing and testimonials\",\n modelName = \"v0 Max\",\n projectName = \"Project\",\n speed = 1,\n}: V0Props) {\n const frame = useCurrentFrame();\n const { width, height, fps } = useVideoConfig();\n const t = THEMES.dark;\n\n const refW = 1280;\n const refH = 720;\n const stageScale = Math.min(width / refW, height / refH);\n\n const tw = useTypewriter(prompt, {\n cps: TYPING_CPS,\n speed,\n startFrame: TYPING_START_FRAME,\n });\n const visibleText = tw.text;\n const showText = tw.count > 0;\n const morph = morphProgressAt(frame, { fps, speed });\n\n const intro = introBounceIn(frame * speed, fps);\n const headingFade = fadeUpAt(frame * speed, [4, 20]);\n const boxFade = fadeUpAt(frame * speed, [10, 26]);\n\n const boxWidth = 880;\n const boxLeft = (refW - boxWidth) / 2;\n const boxTop = 270;\n const boxHeight = 150;\n const btnSize = 40;\n\n return (\n <AbsoluteFill style={{ background: \"transparent\" }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: refW,\n height: refH,\n translate: \"-50% -50%\",\n scale: `${stageScale}`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 150,\n width: refW,\n textAlign: \"center\",\n fontFamily: SANS_FAMILY,\n fontSize: 44,\n fontWeight: 700,\n color: t.fg,\n opacity: headingFade.opacity,\n translate: `0 ${headingFade.translateY + intro.translateY * 0.4}px`,\n }}\n >\n {greeting}\n </div>\n\n <div\n style={{\n position: \"absolute\",\n left: boxLeft,\n top: boxTop,\n width: boxWidth,\n height: boxHeight,\n background: t.boxBg,\n border: `1px solid ${t.boxBorder}`,\n borderRadius: 16,\n boxShadow: \"0 8px 40px -16px rgba(0,0,0,0.8)\",\n opacity: boxFade.opacity,\n translate: `0 ${boxFade.translateY + intro.translateY * 0.6}px`,\n scale: `${intro.scale}`,\n transformOrigin: \"center top\",\n display: \"flex\",\n flexDirection: \"column\",\n boxSizing: \"border-box\",\n }}\n >\n <div\n style={{\n flex: 1,\n padding: \"18px 20px\",\n fontFamily: SANS_FAMILY,\n fontSize: 18,\n color: t.fg,\n display: \"flex\",\n alignItems: \"flex-start\",\n overflow: \"hidden\",\n }}\n >\n {showText ? (\n <span\n style={{\n color: t.fg,\n whiteSpace: \"pre-wrap\",\n }}\n >\n {visibleText}\n <Caret\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n height={20}\n marginLeft={2}\n />\n </span>\n ) : (\n <span\n style={{\n color: t.fgMuted,\n display: \"inline-flex\",\n alignItems: \"center\",\n }}\n >\n <Caret\n color={t.fg}\n blink={!tw.typing}\n speed={speed}\n height={20}\n />\n <span style={{ marginLeft: 6 }}>{placeholder}</span>\n </span>\n )}\n </div>\n\n <div\n style={{\n padding: \"12px 16px\",\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n }}\n >\n <div style={{ display: \"flex\", alignItems: \"center\", gap: 10 }}>\n <PlusIcon size={20} color={t.iconColor} />\n <div\n style={{\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: 7,\n }}\n >\n <V0LogoIcon size={18} color={t.fg} />\n <span\n style={{\n fontFamily: SANS_FAMILY,\n fontSize: 15,\n fontWeight: 500,\n color: t.fg,\n }}\n >\n {modelName}\n </span>\n <ChevronDownIcon size={14} color={t.fgMuted} />\n </div>\n </div>\n\n <div style={{ display: \"flex\", alignItems: \"center\", gap: 12 }}>\n <div\n style={{\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: 4,\n }}\n >\n <span\n style={{\n fontFamily: SANS_FAMILY,\n fontSize: 15,\n color: t.fgMuted,\n }}\n >\n {projectName}\n </span>\n <ChevronDownIcon size={14} color={t.fgMuted} />\n </div>\n\n <div\n style={{\n position: \"relative\",\n width: btnSize,\n height: btnSize,\n borderRadius: 10,\n background: t.btnBg,\n flexShrink: 0,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n opacity: 1 - morph,\n scale: `${1 - 0.08 * morph}`,\n }}\n >\n <MicIcon size={20} color={t.btnFg} />\n </div>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n opacity: morph,\n scale: `${0.85 + 0.15 * morph}`,\n }}\n >\n <ArrowUpIcon size={20} color={t.btnFg} />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/v0.tsx"}diff --git a/registry-artifacts/value-swap.json b/registry-artifacts/value-swap.jsonindex ca1f2772..05d2047f 100644--- a/registry-artifacts/value-swap.json+++ b/registry-artifacts/value-swap.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/value-swap/index.tsx",- "content": "\"use client\";\n\nimport type React from \"react\";\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nexport interface ValueSwapProps {\n values: string[];\n at: number | number[];\n duration?: number;\n distance?: number;\n direction?: \"up\" | \"down\";\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function ValueSwap({\n values,\n at,\n duration = 10,\n distance = 12,\n direction = \"up\",\n className,\n style,\n}: ValueSwapProps) {\n const frame = useCurrentFrame();\n const ats = Array.isArray(at) ? at : [at];\n const d = direction === \"down\" ? -distance : distance;\n const count = Math.min(values.length, ats.length + 1);\n const rendered = values.slice(0, count);\n const sizer = rendered.reduce((a, b) => (b.length > a.length ? b : a), \"\");\n const swapP = (start: number) =>\n interpolate(frame, [start, start + duration], [0, 1], {\n ...clampOpts,\n easing: Easing.inOut(Easing.cubic),\n });\n return (\n <span\n className={className}\n style={{\n position: \"relative\",\n display: \"inline-block\",\n ...style,\n }}\n >\n <span style={{ visibility: \"hidden\" }}>{sizer}</span>\n {rendered.map((value, i) => {\n const pIn = i > 0 ? swapP(ats[i - 1]) : 1;\n const pOut = i < count - 1 ? swapP(ats[i]) : 0;\n const opacity = pIn * (1 - pOut);\n if (opacity <= 0.001) return null;\n const y = (1 - pIn) * d + pOut * -d;\n return (\n <span\n key={`${i}-${value}`}\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n whiteSpace: \"nowrap\",\n opacity,\n transform: `translateY(${y}px)`,\n }}\n >\n {value}\n </span>\n );\n })}\n </span>\n );\n}\n",+ "content": "\"use client\";\n\nimport type React from \"react\";\nimport { Easing, interpolate, useCurrentFrame } from \"remotion\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nexport interface ValueSwapProps {\n values: string[];\n at: number | number[];\n duration?: number;\n distance?: number;\n direction?: \"up\" | \"down\";\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function ValueSwap({\n values,\n at,\n duration = 10,\n distance = 12,\n direction = \"up\",\n className,\n style,\n}: ValueSwapProps) {\n const frame = useCurrentFrame();\n const ats = Array.isArray(at) ? at : [at];\n const d = direction === \"down\" ? -distance : distance;\n const count = Math.min(values.length, ats.length + 1);\n const rendered = values.slice(0, count);\n const sizer = rendered.reduce((a, b) => (b.length > a.length ? b : a), \"\");\n const swapP = (start: number) =>\n interpolate(frame, [start, start + duration], [0, 1], {\n ...clampOpts,\n easing: Easing.inOut(Easing.cubic),\n });\n return (\n <span\n className={className}\n style={{\n position: \"relative\",\n display: \"inline-block\",\n ...style,\n }}\n >\n <span style={{ visibility: \"hidden\" }}>{sizer}</span>\n {rendered.map((value, i) => {\n const pIn = i > 0 ? swapP(ats[i - 1]) : 1;\n const pOut = i < count - 1 ? swapP(ats[i]) : 0;\n const opacity = pIn * (1 - pOut);\n if (opacity <= 0.001) return null;\n const y = (1 - pIn) * d + pOut * -d;\n return (\n <span\n key={`${i}-${value}`}\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n whiteSpace: \"nowrap\",\n opacity,\n translate: `0 ${y}px`,\n }}\n >\n {value}\n </span>\n );\n })}\n </span>\n );\n}\n","type": "registry:component","target": "components/remocn/value-swap.tsx"}diff --git a/registry-artifacts/vhs-filter.json b/registry-artifacts/vhs-filter.jsonindex 3873fbef..76353ca2 100644--- a/registry-artifacts/vhs-filter.json+++ b/registry-artifacts/vhs-filter.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/vhs-filter/index.tsx",- "content": "\"use client\";\n\nimport type React from \"react\";\nimport { AbsoluteFill, random, useCurrentFrame } from \"remotion\";\nimport {\n type CanvasFilterProps,\n makeCanvasFilter,\n makeFilterShader,\n} from \"@/lib/remocn/canvas-presentation\";\n\nexport type VhsFilterProps = {\n bleed?: number;\n wobble?: number;\n noise?: number;\n intensity?: number;\n};\n\nconst DEFAULTS = {\n bleed: 1,\n wobble: 1,\n noise: 1,\n intensity: 1,\n};\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_scene;\nuniform float u_frame;\nuniform float u_time;\nuniform float u_bleed;\nuniform float u_wobble;\nuniform float u_noise;\nuniform float u_intensity;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst float PI = 3.141592653589793;\nconst float LINES = 486.0;\nconst int TAPS = 6;\n\nfloat hash(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);\n}\n\nfloat valueNoise(float x) {\n float i = floor(x);\n float f = fract(x);\n float a = hash(vec2(i, 7.0));\n float b = hash(vec2(i + 1.0, 7.0));\n return mix(a, b, f * f * (3.0 - 2.0 * f));\n}\n\nvec3 rgb2yiq(vec3 c) {\n return vec3(\n dot(c, vec3(0.299, 0.587, 0.114)),\n dot(c, vec3(0.5959, -0.2746, -0.3213)),\n dot(c, vec3(0.2115, -0.5227, 0.3112))\n );\n}\n\nvec3 yiq2rgb(vec3 c) {\n return vec3(\n c.x + 0.956 * c.y + 0.619 * c.z,\n c.x - 0.272 * c.y - 0.647 * c.z,\n c.x - 1.106 * c.y + 1.703 * c.z\n );\n}\n\nvoid main() {\n float line = floor(v_uv.y * LINES);\n float clock = mod(u_frame, 64.0);\n\n float drift =\n sin(v_uv.y * 37.0 + u_time * 2.3) * 0.55 +\n sin(v_uv.y * 96.0 - u_time * 1.1) * 0.25;\n float jitter = valueNoise(line * 0.61 + u_time * 24.0) - 0.5;\n float wobble = (drift * 0.35 + jitter * 0.9) * 0.007 * u_wobble * u_intensity;\n\n float band = smoothstep(0.955, 0.994, v_uv.y);\n float tear = valueNoise(line * 2.7 + u_time * 43.0) - 0.5;\n float headSwitch = band * tear * 0.085 * u_intensity;\n\n vec2 uv = vec2(v_uv.x + wobble + headSwitch, v_uv.y);\n vec4 base = texture(u_scene, uv);\n float luma = rgb2yiq(base.rgb).x;\n\n float smear = u_bleed * 0.02 * u_intensity;\n vec2 chroma = vec2(0.0);\n float total = 0.0;\n for (int i = 0; i < TAPS; i++) {\n float t = float(i) / float(TAPS - 1);\n float weight = 1.0 - t * 0.72;\n vec3 tap = texture(u_scene, vec2(uv.x - smear * t, uv.y)).rgb;\n chroma += rgb2yiq(tap).yz * weight;\n total += weight;\n }\n\n vec3 color = yiq2rgb(vec3(luma, chroma / total));\n\n float scan = 0.94 + 0.06 * cos(v_uv.y * LINES * PI);\n color *= mix(1.0, scan, u_intensity);\n\n float grain =\n hash(vec2(v_uv.x * 640.0 + clock * 13.0, line + clock * 5.0)) - 0.5;\n color += grain * 0.07 * u_noise * u_intensity;\n\n color = mix(color, vec3(luma), band * 0.55 * u_intensity);\n color += band * (hash(vec2(line, clock * 3.0)) - 0.5) * 0.26 * u_intensity;\n\n outColor = vec4(clamp(color, 0.0, 1.0), base.a);\n}`;\n\nconst shader = makeFilterShader<VhsFilterProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, passedProps }) => {\n const {\n bleed = DEFAULTS.bleed,\n wobble = DEFAULTS.wobble,\n noise = DEFAULTS.noise,\n intensity = DEFAULTS.intensity,\n } = passedProps;\n gl.uniform1f(uniform(\"u_bleed\"), bleed);\n gl.uniform1f(uniform(\"u_wobble\"), wobble);\n gl.uniform1f(uniform(\"u_noise\"), noise);\n gl.uniform1f(uniform(\"u_intensity\"), intensity);\n },\n);\n\nconst VhsFilterFallback: React.FC<VhsFilterProps & CanvasFilterProps> = ({\n children,\n bleed = DEFAULTS.bleed,\n wobble = DEFAULTS.wobble,\n noise = DEFAULTS.noise,\n intensity = DEFAULTS.intensity,\n}) => {\n const frame = useCurrentFrame();\n const shift =\n (random(`vhs-wobble-${frame}`) - 0.5) * 3.4 * wobble * intensity;\n const flicker =\n 1 + (random(`vhs-flicker-${frame}`) - 0.5) * 0.07 * noise * intensity;\n const smear = 3 + bleed * 5;\n\n return (\n <AbsoluteFill>\n <AbsoluteFill\n style={{\n transform: `translateX(${shift}px)`,\n filter: `saturate(${1 + bleed * 0.3}) contrast(1.04) brightness(${flicker}) blur(${0.3 * intensity}px)`,\n }}\n >\n {children}\n </AbsoluteFill>\n <AbsoluteFill\n style={{\n transform: `translateX(${shift - smear}px)`,\n filter: \"saturate(2.2) blur(1.4px)\",\n mixBlendMode: \"screen\",\n opacity: 0.24 * bleed * intensity,\n }}\n >\n {children}\n </AbsoluteFill>\n <AbsoluteFill\n style={{\n background:\n \"repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.22) 0px, rgba(0, 0, 0, 0.22) 1px, transparent 1px, transparent 3px)\",\n opacity: intensity,\n }}\n />\n <div\n style={{\n position: \"absolute\",\n insetInline: 0,\n bottom: 0,\n height: \"3.6%\",\n transform: `translateX(${shift * 3}px)`,\n background: `rgba(228, 228, 228, ${0.13 * intensity})`,\n mixBlendMode: \"screen\",\n }}\n />\n </AbsoluteFill>\n );\n};\n\nexport const VhsFilter = makeCanvasFilter<VhsFilterProps>({\n shader,\n fallback: VhsFilterFallback,\n});\n",+ "content": "\"use client\";\n\nimport type React from \"react\";\nimport { AbsoluteFill, random, useCurrentFrame } from \"remotion\";\nimport {\n type CanvasFilterProps,\n makeCanvasFilter,\n makeFilterShader,\n} from \"@/lib/remocn/canvas-presentation\";\n\nexport type VhsFilterProps = {\n bleed?: number;\n wobble?: number;\n noise?: number;\n intensity?: number;\n};\n\nconst DEFAULTS = {\n bleed: 1,\n wobble: 1,\n noise: 1,\n intensity: 1,\n};\n\nconst FRAGMENT_SHADER = `#version 300 es\nprecision highp float;\n\nuniform sampler2D u_scene;\nuniform float u_frame;\nuniform float u_time;\nuniform float u_bleed;\nuniform float u_wobble;\nuniform float u_noise;\nuniform float u_intensity;\n\nin vec2 v_uv;\nout vec4 outColor;\n\nconst float PI = 3.141592653589793;\nconst float LINES = 486.0;\nconst int TAPS = 6;\n\nfloat hash(vec2 p) {\n return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123);\n}\n\nfloat valueNoise(float x) {\n float i = floor(x);\n float f = fract(x);\n float a = hash(vec2(i, 7.0));\n float b = hash(vec2(i + 1.0, 7.0));\n return mix(a, b, f * f * (3.0 - 2.0 * f));\n}\n\nvec3 rgb2yiq(vec3 c) {\n return vec3(\n dot(c, vec3(0.299, 0.587, 0.114)),\n dot(c, vec3(0.5959, -0.2746, -0.3213)),\n dot(c, vec3(0.2115, -0.5227, 0.3112))\n );\n}\n\nvec3 yiq2rgb(vec3 c) {\n return vec3(\n c.x + 0.956 * c.y + 0.619 * c.z,\n c.x - 0.272 * c.y - 0.647 * c.z,\n c.x - 1.106 * c.y + 1.703 * c.z\n );\n}\n\nvoid main() {\n float line = floor(v_uv.y * LINES);\n float clock = mod(u_frame, 64.0);\n\n float drift =\n sin(v_uv.y * 37.0 + u_time * 2.3) * 0.55 +\n sin(v_uv.y * 96.0 - u_time * 1.1) * 0.25;\n float jitter = valueNoise(line * 0.61 + u_time * 24.0) - 0.5;\n float wobble = (drift * 0.35 + jitter * 0.9) * 0.007 * u_wobble * u_intensity;\n\n float band = smoothstep(0.955, 0.994, v_uv.y);\n float tear = valueNoise(line * 2.7 + u_time * 43.0) - 0.5;\n float headSwitch = band * tear * 0.085 * u_intensity;\n\n vec2 uv = vec2(v_uv.x + wobble + headSwitch, v_uv.y);\n vec4 base = texture(u_scene, uv);\n float luma = rgb2yiq(base.rgb).x;\n\n float smear = u_bleed * 0.02 * u_intensity;\n vec2 chroma = vec2(0.0);\n float total = 0.0;\n for (int i = 0; i < TAPS; i++) {\n float t = float(i) / float(TAPS - 1);\n float weight = 1.0 - t * 0.72;\n vec3 tap = texture(u_scene, vec2(uv.x - smear * t, uv.y)).rgb;\n chroma += rgb2yiq(tap).yz * weight;\n total += weight;\n }\n\n vec3 color = yiq2rgb(vec3(luma, chroma / total));\n\n float scan = 0.94 + 0.06 * cos(v_uv.y * LINES * PI);\n color *= mix(1.0, scan, u_intensity);\n\n float grain =\n hash(vec2(v_uv.x * 640.0 + clock * 13.0, line + clock * 5.0)) - 0.5;\n color += grain * 0.07 * u_noise * u_intensity;\n\n color = mix(color, vec3(luma), band * 0.55 * u_intensity);\n color += band * (hash(vec2(line, clock * 3.0)) - 0.5) * 0.26 * u_intensity;\n\n outColor = vec4(clamp(color, 0.0, 1.0), base.a);\n}`;\n\nconst shader = makeFilterShader<VhsFilterProps>(\n FRAGMENT_SHADER,\n ({ gl, uniform, passedProps }) => {\n const {\n bleed = DEFAULTS.bleed,\n wobble = DEFAULTS.wobble,\n noise = DEFAULTS.noise,\n intensity = DEFAULTS.intensity,\n } = passedProps;\n gl.uniform1f(uniform(\"u_bleed\"), bleed);\n gl.uniform1f(uniform(\"u_wobble\"), wobble);\n gl.uniform1f(uniform(\"u_noise\"), noise);\n gl.uniform1f(uniform(\"u_intensity\"), intensity);\n },\n);\n\nconst VhsFilterFallback: React.FC<VhsFilterProps & CanvasFilterProps> = ({\n children,\n bleed = DEFAULTS.bleed,\n wobble = DEFAULTS.wobble,\n noise = DEFAULTS.noise,\n intensity = DEFAULTS.intensity,\n}) => {\n const frame = useCurrentFrame();\n const shift =\n (random(`vhs-wobble-${frame}`) - 0.5) * 3.4 * wobble * intensity;\n const flicker =\n 1 + (random(`vhs-flicker-${frame}`) - 0.5) * 0.07 * noise * intensity;\n const smear = 3 + bleed * 5;\n\n return (\n <AbsoluteFill>\n <AbsoluteFill\n style={{\n translate: `${shift}px`,\n filter: `saturate(${1 + bleed * 0.3}) contrast(1.04) brightness(${flicker}) blur(${0.3 * intensity}px)`,\n }}\n >\n {children}\n </AbsoluteFill>\n <AbsoluteFill\n style={{\n translate: `${shift - smear}px`,\n filter: \"saturate(2.2) blur(1.4px)\",\n mixBlendMode: \"screen\",\n opacity: 0.24 * bleed * intensity,\n }}\n >\n {children}\n </AbsoluteFill>\n <AbsoluteFill\n style={{\n background:\n \"repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.22) 0px, rgba(0, 0, 0, 0.22) 1px, transparent 1px, transparent 3px)\",\n opacity: intensity,\n }}\n />\n <div\n style={{\n position: \"absolute\",\n insetInline: 0,\n bottom: 0,\n height: \"3.6%\",\n translate: `${shift * 3}px`,\n background: `rgba(228, 228, 228, ${0.13 * intensity})`,\n mixBlendMode: \"screen\",\n }}\n />\n </AbsoluteFill>\n );\n};\n\nexport const VhsFilter = makeCanvasFilter<VhsFilterProps>({\n shader,\n fallback: VhsFilterFallback,\n});\n","type": "registry:component","target": "components/remocn/vhs-filter.tsx"}diff --git a/registry-artifacts/warp-dissolve.json b/registry-artifacts/warp-dissolve.jsonindex 836e44d2..92d4b9ff 100644--- a/registry-artifacts/warp-dissolve.json+++ b/registry-artifacts/warp-dissolve.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/warp-dissolve/index.tsx",- "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\nimport { ShaderWarp } from \"@/components/remocn/shader-warp\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nconst DEFAULT_COLORS = [\"#141318\", \"#3a3a5c\", \"#1f1d29\", \"#8f88ae\"];\n\nexport type WarpDissolveProps = {\n colors?: string[];\n distortion?: number;\n swirl?: number;\n softness?: number;\n speed?: number;\n};\n\nconst WarpDissolvePresentation: React.FC<\n TransitionPresentationComponentProps<WarpDissolveProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n colors = DEFAULT_COLORS,\n distortion = 0.8,\n swirl = 0.6,\n softness = 1,\n speed = 1,\n } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n if (!entering) {\n const meltStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.2, 0.38], [1, 0], clampOpts),\n transform: `scale(${interpolate(p, [0, 0.38], [1, 1.16], {\n ...clampOpts,\n easing: Easing.in(Easing.cubic),\n })})`,\n filter: `blur(${interpolate(p, [0.04, 0.38], [0, 18], clampOpts)}px)`,\n };\n return <AbsoluteFill style={meltStyle}>{children}</AbsoluteFill>;\n }\n\n const fieldOpacity = interpolate(p, [0, 0.32], [0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n });\n const fieldDistortion = interpolate(\n p,\n [0, 0.5, 1],\n [distortion * 0.3, distortion, distortion * 0.4],\n clampOpts,\n );\n\n const childStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.66, 0.82], [0, 1], clampOpts),\n transform: `scale(${interpolate(p, [0.66, 1], [1.18, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n })})`,\n filter: `blur(${interpolate(p, [0.66, 0.92], [16, 0], clampOpts)}px)`,\n };\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={{ opacity: fieldOpacity, pointerEvents: \"none\" }}>\n <ShaderWarp\n speed={speed}\n colors={colors}\n distortion={fieldDistortion}\n swirl={swirl}\n softness={softness}\n />\n </AbsoluteFill>\n <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>\n </AbsoluteFill>\n );\n};\n\nexport function warpDissolve(\n props: WarpDissolveProps = {},\n): TransitionPresentation<WarpDissolveProps> {\n return {\n component: WarpDissolvePresentation,\n props,\n };\n}\n",+ "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\nimport { ShaderWarp } from \"@/components/remocn/shader-warp\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nconst DEFAULT_COLORS = [\"#141318\", \"#3a3a5c\", \"#1f1d29\", \"#8f88ae\"];\n\nexport type WarpDissolveProps = {\n colors?: string[];\n distortion?: number;\n swirl?: number;\n softness?: number;\n speed?: number;\n};\n\nconst WarpDissolvePresentation: React.FC<\n TransitionPresentationComponentProps<WarpDissolveProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n colors = DEFAULT_COLORS,\n distortion = 0.8,\n swirl = 0.6,\n softness = 1,\n speed = 1,\n } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n if (!entering) {\n const meltStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.2, 0.38], [1, 0], clampOpts),\n scale: `${interpolate(p, [0, 0.38], [1, 1.16], {\n ...clampOpts,\n easing: Easing.in(Easing.cubic),\n })}`,\n filter: `blur(${interpolate(p, [0.04, 0.38], [0, 18], clampOpts)}px)`,\n };\n return <AbsoluteFill style={meltStyle}>{children}</AbsoluteFill>;\n }\n\n const fieldOpacity = interpolate(p, [0, 0.32], [0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n });\n const fieldDistortion = interpolate(\n p,\n [0, 0.5, 1],\n [distortion * 0.3, distortion, distortion * 0.4],\n clampOpts,\n );\n\n const childStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.66, 0.82], [0, 1], clampOpts),\n scale: `${interpolate(p, [0.66, 1], [1.18, 1], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n })}`,\n filter: `blur(${interpolate(p, [0.66, 0.92], [16, 0], clampOpts)}px)`,\n };\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={{ opacity: fieldOpacity, pointerEvents: \"none\" }}>\n <ShaderWarp\n speed={speed}\n colors={colors}\n distortion={fieldDistortion}\n swirl={swirl}\n softness={softness}\n />\n </AbsoluteFill>\n <AbsoluteFill style={childStyle}>{children}</AbsoluteFill>\n </AbsoluteFill>\n );\n};\n\nexport function warpDissolve(\n props: WarpDissolveProps = {},\n): TransitionPresentation<WarpDissolveProps> {\n return {\n component: WarpDissolvePresentation,\n props,\n };\n}\n","type": "registry:component","target": "components/remocn/warp-dissolve.tsx"}diff --git a/registry-artifacts/wave-wipe.json b/registry-artifacts/wave-wipe.jsonindex 16ff4017..3e8c4176 100644--- a/registry-artifacts/wave-wipe.json+++ b/registry-artifacts/wave-wipe.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/wave-wipe/index.tsx",- "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\nimport { ShaderGrainGradient } from \"@/components/remocn/shader-grain-gradient\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nconst DEFAULT_COLORS = [\"#3a3a52\", \"#4a4a68\", \"#8f88ae\"];\n\nexport type WaveWipeProps = {\n colors?: string[];\n colorBack?: string;\n intensity?: number;\n softness?: number;\n noise?: number;\n zoom?: number;\n speed?: number;\n};\n\nconst WaveWipePresentation: React.FC<\n TransitionPresentationComponentProps<WaveWipeProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n colors = DEFAULT_COLORS,\n colorBack = \"#141318\",\n intensity = 0.2,\n softness = 0.7,\n noise = 0.4,\n zoom = 1.16,\n speed = 1,\n } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n if (!entering) {\n const exitStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.3, 0.5], [1, 0], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n }),\n transform: `translateY(${interpolate(p, [0, 0.7], [0, -70], {\n ...clampOpts,\n easing: Easing.in(Easing.cubic),\n })}%)`,\n };\n return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;\n }\n\n const fieldOpacity = interpolate(p, [0.18, 0.45], [0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n });\n const drift = interpolate(p, [0, 1], [0, 0.7], {\n ...clampOpts,\n easing: Easing.bezier(0.45, 0, 0.55, 1),\n });\n const rise = interpolate(p, [0.4, 0.82, 1], [100, -3.5, 0], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n });\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={{ opacity: fieldOpacity, pointerEvents: \"none\" }}>\n <ShaderGrainGradient\n speed={speed}\n shape=\"wave\"\n colors={colors}\n colorBack={colorBack}\n intensity={intensity}\n softness={softness}\n noise={noise}\n scale={zoom}\n offsetY={drift}\n />\n </AbsoluteFill>\n <AbsoluteFill style={{ transform: `translateY(${rise}%)` }}>\n {children}\n </AbsoluteFill>\n </AbsoluteFill>\n );\n};\n\nexport function waveWipe(\n props: WaveWipeProps = {},\n): TransitionPresentation<WaveWipeProps> {\n return {\n component: WaveWipePresentation,\n props,\n };\n}\n",+ "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\nimport { ShaderGrainGradient } from \"@/components/remocn/shader-grain-gradient\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nconst DEFAULT_COLORS = [\"#3a3a52\", \"#4a4a68\", \"#8f88ae\"];\n\nexport type WaveWipeProps = {\n colors?: string[];\n colorBack?: string;\n intensity?: number;\n softness?: number;\n noise?: number;\n zoom?: number;\n speed?: number;\n};\n\nconst WaveWipePresentation: React.FC<\n TransitionPresentationComponentProps<WaveWipeProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const {\n colors = DEFAULT_COLORS,\n colorBack = \"#141318\",\n intensity = 0.2,\n softness = 0.7,\n noise = 0.4,\n zoom = 1.16,\n speed = 1,\n } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n if (!entering) {\n const exitStyle: React.CSSProperties = {\n opacity: interpolate(p, [0.3, 0.5], [1, 0], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n }),\n translate: `0 ${interpolate(p, [0, 0.7], [0, -70], {\n ...clampOpts,\n easing: Easing.in(Easing.cubic),\n })}%`,\n };\n return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;\n }\n\n const fieldOpacity = interpolate(p, [0.18, 0.45], [0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.42, 0, 0.58, 1),\n });\n const drift = interpolate(p, [0, 1], [0, 0.7], {\n ...clampOpts,\n easing: Easing.bezier(0.45, 0, 0.55, 1),\n });\n const rise = interpolate(p, [0.4, 0.82, 1], [100, -3.5, 0], {\n ...clampOpts,\n easing: Easing.out(Easing.cubic),\n });\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={{ opacity: fieldOpacity, pointerEvents: \"none\" }}>\n <ShaderGrainGradient\n speed={speed}\n shape=\"wave\"\n colors={colors}\n colorBack={colorBack}\n intensity={intensity}\n softness={softness}\n noise={noise}\n scale={zoom}\n offsetY={drift}\n />\n </AbsoluteFill>\n <AbsoluteFill style={{ translate: `0 ${rise}%` }}>\n {children}\n </AbsoluteFill>\n </AbsoluteFill>\n );\n};\n\nexport function waveWipe(\n props: WaveWipeProps = {},\n): TransitionPresentation<WaveWipeProps> {\n return {\n component: WaveWipePresentation,\n props,\n };\n}\n","type": "registry:component","target": "components/remocn/wave-wipe.tsx"}diff --git a/registry-artifacts/whip-pan.json b/registry-artifacts/whip-pan.jsonindex a1162d70..5fdab6cb 100644--- a/registry-artifacts/whip-pan.json+++ b/registry-artifacts/whip-pan.json@@ -7,7 +7,7 @@"files": [{"path": "registry/remocn/whip-pan/index.tsx",- "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nexport type WhipPanProps = {\n direction?: \"left\" | \"right\" | \"up\" | \"down\";\n blur?: number;\n};\n\nconst WhipPanPresentation: React.FC<\n TransitionPresentationComponentProps<WhipPanProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const { direction = \"left\", blur = 24 } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n const travel = interpolate(p, [0, 1], [0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.7, 0, 0.2, 1),\n });\n const velocity = Math.sin(Math.PI * travel);\n\n const axis: \"x\" | \"y\" =\n direction === \"left\" || direction === \"right\" ? \"x\" : \"y\";\n const sign = direction === \"left\" || direction === \"up\" ? -1 : 1;\n\n const offset = entering ? (travel - 1) * 110 * sign : travel * 110 * sign;\n const stretch = 1 + velocity * 0.12;\n\n const translate =\n axis === \"x\" ? `translateX(${offset}%)` : `translateY(${offset}%)`;\n const smear = axis === \"x\" ? `scaleX(${stretch})` : `scaleY(${stretch})`;\n\n const style: React.CSSProperties = {\n transform: `${translate} ${smear}`,\n filter: `blur(${velocity * blur}px)`,\n };\n\n return <AbsoluteFill style={style}>{children}</AbsoluteFill>;\n};\n\nexport function whipPan(\n props: WhipPanProps = {},\n): TransitionPresentation<WhipPanProps> {\n return {\n component: WhipPanPresentation,\n props,\n };\n}\n",+ "content": "\"use client\";\n\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { AbsoluteFill, Easing, interpolate } from \"remotion\";\n\nconst clampOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n};\n\nexport type WhipPanProps = {\n direction?: \"left\" | \"right\" | \"up\" | \"down\";\n blur?: number;\n};\n\nconst WhipPanPresentation: React.FC<\n TransitionPresentationComponentProps<WhipPanProps>\n> = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps,\n}) => {\n const { direction = \"left\", blur = 24 } = passedProps;\n const entering = presentationDirection === \"entering\";\n const p = presentationProgress;\n\n const travel = interpolate(p, [0, 1], [0, 1], {\n ...clampOpts,\n easing: Easing.bezier(0.7, 0, 0.2, 1),\n });\n const velocity = Math.sin(Math.PI * travel);\n\n const axis: \"x\" | \"y\" =\n direction === \"left\" || direction === \"right\" ? \"x\" : \"y\";\n const sign = direction === \"left\" || direction === \"up\" ? -1 : 1;\n\n const offset = entering ? (travel - 1) * 110 * sign : travel * 110 * sign;\n const stretch = 1 + velocity * 0.12;\n\n const translate = axis === \"x\" ? `${offset}%` : `0 ${offset}%`;\n const smear = axis === \"x\" ? `${stretch} 1` : `1 ${stretch}`;\n\n const style: React.CSSProperties = {\n translate,\n scale: smear,\n filter: `blur(${velocity * blur}px)`,\n };\n\n return <AbsoluteFill style={style}>{children}</AbsoluteFill>;\n};\n\nexport function whipPan(\n props: WhipPanProps = {},\n): TransitionPresentation<WhipPanProps> {\n return {\n component: WhipPanPresentation,\n props,\n };\n}\n","type": "registry:component","target": "components/remocn/whip-pan.tsx"}diff --git a/registry-artifacts/x-follow-card.json b/registry-artifacts/x-follow-card.jsonindex d7e2cb89..5ad297dd 100644--- a/registry-artifacts/x-follow-card.json+++ b/registry-artifacts/x-follow-card.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/x-follow-card/index.tsx",- "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/Inter\";\nimport { useState } from \"react\";\nimport {\n AbsoluteFill,\n Img,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { Cursor, type CursorStyle } from \"@/components/remocn/cursor\";\nimport {\n type CursorWaypoint,\n useCursorPath,\n} from \"@/components/remocn/use-cursor-path\";\n\nconst { fontFamily: FONT_FAMILY } = loadFont();\n\nexport interface XFollowCardProps {\n name?: string;\n handle?: string;\n bio?: string;\n avatarUrl?: string;\n coverUrl?: string;\n location?: string;\n website?: string;\n joined?: string;\n verified?: boolean;\n accentColor?: string;\n orientation?: \"horizontal\" | \"vertical\";\n speed?: number;\n}\n\ninterface Theme {\n page: string;\n cardBg: string;\n cardBorder: string;\n fg: string;\n fgMuted: string;\n divider: string;\n}\n\nexport const THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n page: \"#f5f7f9\",\n cardBg: \"#ffffff\",\n cardBorder: \"#e6e9eb\",\n fg: \"#0f1419\",\n fgMuted: \"#536471\",\n divider: \"#eff3f4\",\n },\n dark: {\n page: \"#0a0a0a\",\n cardBg: \"#16181c\",\n cardBorder: \"#2f3336\",\n fg: \"#e7e9ea\",\n fgMuted: \"#71767b\",\n divider: \"#2f3336\",\n },\n};\n\nexport const CLICK_FRAME = 110;\n\nconst BUTTON_LAYOUT: Record<\n \"horizontal\" | \"vertical\",\n { x: number; y: number; w: number; h: number }\n> = {\n horizontal: { x: 800, y: 240, w: 116, h: 40 },\n vertical: { x: 542, y: 336, w: 124, h: 44 },\n};\n\nexport function cardBounceIn(\n frame: number,\n fps: number,\n): { translateY: number; scale: number } {\n const s = spring({\n fps,\n frame,\n config: { damping: 12, stiffness: 120, mass: 0.8 },\n });\n const translateY = interpolate(s, [0, 1], [60, 0]);\n const scale = interpolate(s, [0, 1], [0.9, 1]);\n return { translateY, scale };\n}\n\nexport function blurInSchedule(): {\n group: number;\n start: number;\n end: number;\n}[] {\n return [\n { group: 0, start: 20, end: 26 },\n { group: 1, start: 22, end: 28 },\n { group: 2, start: 24, end: 30 },\n { group: 3, start: 26, end: 32 },\n { group: 4, start: 28, end: 34 },\n { group: 5, start: 30, end: 36 },\n { group: 6, start: 32, end: 38 },\n { group: 7, start: 34, end: 40 },\n { group: 8, start: 36, end: 42 },\n ];\n}\n\nexport function blurInAt(\n step: { start: number; end: number },\n frame: number,\n): { blur: number; opacity: number; translateY: number } {\n const range: [number, number] = [step.start, step.end];\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n };\n return {\n blur: interpolate(frame, range, [8, 0], opts),\n opacity: interpolate(frame, range, [0, 1], opts),\n translateY: interpolate(frame, range, [8, 0], opts),\n };\n}\n\nexport function followStateAt(frame: number, speed: number): boolean {\n return frame * speed >= CLICK_FRAME;\n}\n\nexport function buildFollowWaypoints(args: {\n buttonCenter: { x: number; y: number };\n orientation: \"horizontal\" | \"vertical\";\n}): CursorWaypoint[] {\n const { buttonCenter, orientation } = args;\n const rest =\n orientation === \"vertical\" ? { x: 640, y: 1120 } : { x: 1120, y: 600 };\n return [\n { at: 0, x: rest.x, y: rest.y },\n { at: 75, x: rest.x, y: rest.y },\n {\n at: CLICK_FRAME,\n x: buttonCenter.x,\n y: buttonCenter.y,\n duration: 32,\n click: true,\n easing: \"inOut\",\n },\n { at: CLICK_FRAME + 30, x: buttonCenter.x, y: buttonCenter.y },\n ];\n}\n\nfunction tintGradient(accent: string): string {\n return `linear-gradient(135deg, ${accent} 0%, ${accent}99 55%, ${accent}55 100%)`;\n}\n\nfunction Cover({\n coverUrl,\n accent,\n height,\n}: {\n coverUrl: string;\n accent: string;\n height: number;\n}) {\n const [errored, setErrored] = useState(false);\n const fallback = (\n <div\n style={{\n width: \"100%\",\n height,\n background: tintGradient(accent),\n }}\n />\n );\n if (errored || !coverUrl) return fallback;\n return (\n <Img\n src={coverUrl}\n crossOrigin=\"anonymous\"\n onError={() => setErrored(true)}\n style={{ width: \"100%\", height, objectFit: \"cover\", display: \"block\" }}\n />\n );\n}\n\nfunction Avatar({\n avatarUrl,\n name,\n size,\n accent,\n theme,\n}: {\n avatarUrl: string;\n name: string;\n size: number;\n accent: string;\n theme: Theme;\n}) {\n const [errored, setErrored] = useState(false);\n const ringStyle = {\n width: size,\n height: size,\n borderRadius: \"100%\",\n border: `4px solid ${theme.cardBg}`,\n flexShrink: 0,\n boxSizing: \"border-box\" as const,\n };\n\n if (errored || !avatarUrl) {\n return (\n <div\n style={{\n ...ringStyle,\n background: `${accent}33`,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: accent,\n fontSize: size * 0.4,\n fontWeight: 700,\n fontFamily: FONT_FAMILY,\n }}\n >\n {name.charAt(0).toUpperCase()}\n </div>\n );\n }\n\n return (\n <Img\n src={avatarUrl}\n crossOrigin=\"anonymous\"\n onError={() => setErrored(true)}\n style={{ ...ringStyle, objectFit: \"cover\" }}\n />\n );\n}\n\nfunction VerifiedBadge({ accent, size }: { accent: string; size: number }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 22 22\"\n width={size}\n height={size}\n fill={accent}\n >\n <title>Verified</title>\n <path d=\"M20.396 11c-.018-.646-.215-1.275-.57-1.816-.354-.54-.852-.972-1.438-1.246.223-.607.27-1.264.14-1.897-.131-.634-.437-1.218-.882-1.687-.47-.445-1.053-.75-1.687-.882-.633-.13-1.29-.083-1.897.14-.273-.587-.704-1.086-1.245-1.44S11.647 1.62 11 1.604c-.646.017-1.273.213-1.813.568s-.969.854-1.24 1.44c-.608-.223-1.267-.272-1.902-.14-.635.13-1.22.436-1.69.882-.445.47-.749 1.055-.878 1.688-.13.633-.08 1.29.144 1.896-.587.274-1.087.705-1.443 1.245-.356.54-.555 1.17-.574 1.817.02.647.218 1.276.574 1.817.356.54.856.972 1.443 1.245-.224.606-.274 1.263-.144 1.896.13.634.433 1.218.877 1.688.47.443 1.054.747 1.687.878.633.132 1.29.084 1.897-.136.274.586.705 1.084 1.246 1.439.54.354 1.17.551 1.816.569.647-.016 1.276-.213 1.817-.567s.972-.854 1.245-1.44c.604.239 1.266.296 1.903.164.636-.132 1.22-.447 1.68-.907.46-.46.776-1.044.908-1.681s.075-1.299-.165-1.903c.586-.274 1.084-.705 1.439-1.246.354-.54.551-1.17.569-1.816zM9.662 14.85l-3.429-3.428 1.293-1.302 2.072 2.072 4.4-4.794 1.347 1.246z\" />\n </svg>\n );\n}\n\nfunction ProfileInfo({\n name,\n handle,\n bio,\n verified,\n accent,\n theme,\n isVertical,\n nameStyle,\n handleStyle,\n bioStyle,\n}: {\n name: string;\n handle: string;\n bio: string;\n verified: boolean;\n accent: string;\n theme: Theme;\n isVertical: boolean;\n nameStyle: React.CSSProperties;\n handleStyle: React.CSSProperties;\n bioStyle: React.CSSProperties;\n}) {\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: 2,\n marginTop: 12,\n }}\n >\n <div\n style={{ ...nameStyle, display: \"flex\", alignItems: \"center\", gap: 6 }}\n >\n <span\n style={{\n fontSize: isVertical ? 28 : 24,\n fontWeight: 800,\n color: theme.fg,\n fontFamily: FONT_FAMILY,\n lineHeight: 1.2,\n letterSpacing: \"-0.01em\",\n }}\n >\n {name}\n </span>\n {verified && (\n <VerifiedBadge accent={accent} size={isVertical ? 24 : 22} />\n )}\n </div>\n <span\n style={{\n ...handleStyle,\n fontSize: isVertical ? 18 : 16,\n fontWeight: 400,\n color: theme.fgMuted,\n fontFamily: FONT_FAMILY,\n lineHeight: 1.3,\n }}\n >\n @{handle}\n </span>\n <p\n style={{\n ...bioStyle,\n margin: \"8px 0 0\",\n fontSize: isVertical ? 18 : 16,\n fontWeight: 400,\n color: theme.fg,\n fontFamily: FONT_FAMILY,\n lineHeight: 1.4,\n display: \"-webkit-box\",\n WebkitLineClamp: 2,\n WebkitBoxOrient: \"vertical\",\n overflow: \"hidden\",\n }}\n >\n {bio}\n </p>\n </div>\n );\n}\n\nfunction MetaRow({\n location,\n website,\n joined,\n accent,\n theme,\n}: {\n location: string;\n website: string;\n joined: string;\n accent: string;\n theme: Theme;\n}) {\n const itemStyle = {\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n fontSize: 15,\n color: theme.fgMuted,\n fontFamily: FONT_FAMILY,\n } as const;\n return (\n <div\n style={{\n display: \"flex\",\n flexWrap: \"wrap\",\n gap: 16,\n marginTop: 14,\n }}\n >\n <span style={itemStyle}>\n <PinIcon color={theme.fgMuted} />\n {location}\n </span>\n <span style={itemStyle}>\n <LinkIcon color={theme.fgMuted} />\n <span style={{ color: accent }}>{website}</span>\n </span>\n <span style={itemStyle}>\n <CalendarIcon color={theme.fgMuted} />\n {`Joined ${joined}`}\n </span>\n </div>\n );\n}\n\nfunction PinIcon({ color }: { color: string }) {\n return (\n <svg width={16} height={16} viewBox=\"0 0 24 24\" fill={color}>\n <title>Location</title>\n <path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 110-5 2.5 2.5 0 010 5z\" />\n </svg>\n );\n}\n\nfunction LinkIcon({ color }: { color: string }) {\n return (\n <svg width={16} height={16} viewBox=\"0 0 24 24\" fill={color}>\n <title>Website</title>\n <path d=\"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z\" />\n </svg>\n );\n}\n\nfunction CalendarIcon({ color }: { color: string }) {\n return (\n <svg width={16} height={16} viewBox=\"0 0 24 24\" fill={color}>\n <title>Joined</title>\n <path d=\"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zm0-12H5V6h14v2z\" />\n </svg>\n );\n}\n\nfunction FollowButton({\n frame,\n speed,\n accent,\n theme,\n layout,\n pressScale,\n}: {\n frame: number;\n speed: number;\n accent: string;\n theme: Theme;\n layout: { x: number; y: number; w: number; h: number };\n pressScale: number;\n}) {\n const _followed = followStateAt(frame, speed);\n const flip = interpolate(\n frame * speed,\n [CLICK_FRAME, CLICK_FRAME + 10],\n [0, 1],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n\n const base = {\n position: \"absolute\" as const,\n left: layout.x,\n top: layout.y,\n width: layout.w,\n height: layout.h,\n borderRadius: layout.h / 2,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n fontSize: 16,\n fontWeight: 700,\n fontFamily: FONT_FAMILY,\n boxSizing: \"border-box\" as const,\n transform: `scale(${pressScale})`,\n transformOrigin: \"center\",\n };\n\n return (\n <div style={base}>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n borderRadius: layout.h / 2,\n background: accent,\n color: \"#ffffff\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n opacity: 1 - flip,\n }}\n >\n Follow\n </div>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n borderRadius: layout.h / 2,\n background: theme.cardBg,\n border: `1px solid ${theme.cardBorder}`,\n color: theme.fg,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n opacity: flip,\n }}\n >\n Following\n </div>\n </div>\n );\n}\n\nfunction MessageButton({\n layout,\n theme,\n}: {\n layout: { x: number; y: number; size: number };\n theme: Theme;\n}) {\n return (\n <div\n style={{\n position: \"absolute\",\n left: layout.x,\n top: layout.y,\n width: layout.size,\n height: layout.size,\n borderRadius: layout.size / 2,\n border: `1px solid ${theme.cardBorder}`,\n background: theme.cardBg,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <svg width={20} height={20} viewBox=\"0 0 24 24\" fill={theme.fg}>\n <title>Message</title>\n <path d=\"M1.998 5.5c0-1.381 1.119-2.5 2.5-2.5h15c1.381 0 2.5 1.119 2.5 2.5v13c0 1.381-1.119 2.5-2.5 2.5h-15c-1.381 0-2.5-1.119-2.5-2.5v-13zm2.5-.5c-.276 0-.5.224-.5.5v2.764l8 3.638 8-3.638V5.5c0-.276-.224-.5-.5-.5h-15zm15.5 5.463l-8 3.638-8-3.638V18.5c0 .276.224.5.5.5h15c.276 0 .5-.224.5-.5v-8.037z\" />\n </svg>\n </div>\n );\n}\n\nfunction Tabs({\n accent,\n theme,\n isVertical,\n}: {\n accent: string;\n theme: Theme;\n isVertical: boolean;\n}) {\n const tabs = [\"Posts\", \"Replies\", \"Media\", \"Likes\"];\n return (\n <div\n style={{\n display: \"flex\",\n marginTop: 0,\n columnGap: 32,\n borderBottom: `1px solid ${theme.divider}`,\n }}\n >\n {tabs.map((tab, i) => {\n const active = i === 0;\n return (\n <div\n key={tab}\n style={{\n // flex: 1,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n paddingBottom: 12,\n position: \"relative\",\n }}\n >\n <span\n style={{\n fontSize: isVertical ? 17 : 15,\n fontWeight: active ? 700 : 500,\n color: active ? theme.fg : theme.fgMuted,\n fontFamily: FONT_FAMILY,\n }}\n >\n {tab}\n </span>\n {active && (\n <div\n style={{\n position: \"absolute\",\n bottom: -1,\n height: 4,\n width: 56,\n borderRadius: 2,\n background: accent,\n }}\n />\n )}\n </div>\n );\n })}\n </div>\n );\n}\n\nfunction SamplePost({\n name,\n handle,\n avatarUrl,\n accent,\n theme,\n}: {\n name: string;\n handle: string;\n avatarUrl: string;\n accent: string;\n theme: Theme;\n}) {\n return (\n <div\n style={{\n display: \"flex\",\n gap: 12,\n marginTop: 16,\n }}\n >\n <Avatar\n avatarUrl={avatarUrl}\n name={name}\n size={44}\n accent={accent}\n theme={theme}\n />\n <div style={{ flex: 1, minWidth: 0 }}>\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n fontFamily: FONT_FAMILY,\n }}\n >\n <span style={{ fontSize: 15, fontWeight: 700, color: theme.fg }}>\n {name}\n </span>\n <span style={{ fontSize: 15, color: theme.fgMuted }}>\n {`@${handle} · 2d`}\n </span>\n </div>\n <p\n style={{\n margin: \"4px 0 0\",\n fontSize: 15,\n color: theme.fg,\n fontFamily: FONT_FAMILY,\n lineHeight: 1.4,\n }}\n >\n Shipping something new today. Built entirely with Remotion and a lot\n of coffee. More soon.\n </p>\n <div\n style={{\n display: \"flex\",\n gap: 40,\n marginTop: 10,\n color: theme.fgMuted,\n fontFamily: FONT_FAMILY,\n fontSize: 13,\n }}\n >\n <span>12</span>\n <span>48</span>\n <span>312</span>\n </div>\n </div>\n </div>\n );\n}\n\nfunction CursorLayer({\n accent,\n style,\n}: {\n accent: string;\n style: CursorStyle;\n}) {\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n pointerEvents: \"none\",\n }}\n >\n <Cursor variant=\"pointer\" rippleColor={accent} style={style} />\n </div>\n );\n}\n\nexport function XFollowCard({\n name = \"remocn\",\n handle = \"remocn\",\n bio = \"Building the collaborative video toolkit for small teams.\\nShip demos faster with ready-made motion.\",\n avatarUrl = \"/logo.svg\",\n coverUrl = \"\",\n location = \"Tunisia\",\n website = \"remocn.tn\",\n joined = \"January 2024\",\n verified = true,\n accentColor = \"#1d9bf0\",\n orientation = \"horizontal\",\n speed = 1,\n}: XFollowCardProps) {\n const frame = useCurrentFrame();\n const { width, height, fps } = useVideoConfig();\n const t = THEMES.light;\n const isVertical = orientation === \"vertical\";\n\n const refW = isVertical ? 720 : 1280;\n const refH = isVertical ? 1280 : 720;\n const stageScale = Math.min(width / refW, height / refH);\n\n const cardWidth = isVertical ? 660 : 600;\n const cardLeft = (refW - cardWidth) / 2;\n const cardTop = isVertical ? 140 : 70;\n const coverHeight = isVertical ? 180 : 150;\n const avatarSize = isVertical ? 120 : 110;\n\n const bounce = cardBounceIn(frame * speed, fps);\n const schedule = blurInSchedule();\n\n const layout = BUTTON_LAYOUT[orientation];\n const buttonCenter = {\n x: layout.x + layout.w / 2,\n y: layout.y + layout.h / 2,\n };\n\n const cursorStyle = useCursorPath(\n buildFollowWaypoints({ buttonCenter, orientation }),\n { speed },\n );\n const pressScale = 0.9 + 0.1 * (cursorStyle.pressScale ?? 1);\n\n const messageLayout = {\n x: layout.x - layout.h - 8,\n y: layout.y,\n size: layout.h,\n };\n\n const groupStyle = (group: number) => {\n const step = schedule[group];\n const b = blurInAt(step, frame * speed);\n return {\n filter: b.blur > 0 ? `blur(${b.blur}px)` : \"none\",\n opacity: b.opacity,\n transform: `translateY(${b.translateY}px)`,\n };\n };\n\n return (\n <AbsoluteFill style={{ background: \"transparent\" }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: refW,\n height: refH,\n transform: `translate(-50%, -50%) scale(${stageScale})`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: cardLeft,\n top: cardTop,\n width: cardWidth,\n background: t.cardBg,\n border: `1px solid ${t.cardBorder}`,\n borderRadius: 24,\n overflow: \"hidden\",\n transform: `translateY(${bounce.translateY}px) scale(${bounce.scale})`,\n transformOrigin: \"center top\",\n boxShadow: \"0 12px 40px -16px rgba(15,20,25,0.18)\",\n }}\n >\n <div style={groupStyle(0)}>\n <Cover\n coverUrl={coverUrl}\n accent={accentColor}\n height={coverHeight}\n />\n </div>\n\n <div style={{ padding: \"0 24px 24px\" }}>\n <div\n style={{\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"flex-end\",\n marginTop: -(avatarSize / 2),\n position: \"relative\",\n }}\n >\n <div\n style={{\n width: avatarSize,\n height: avatarSize,\n borderRadius: \"100%\",\n background: t.cardBg,\n flexShrink: 0,\n }}\n >\n <div style={groupStyle(1)}>\n <Avatar\n avatarUrl={avatarUrl}\n name={name}\n size={avatarSize}\n accent={accentColor}\n theme={t}\n />\n </div>\n </div>\n </div>\n\n <ProfileInfo\n name={name}\n handle={handle}\n bio={bio}\n verified={verified}\n accent={accentColor}\n theme={t}\n isVertical={isVertical}\n nameStyle={groupStyle(2)}\n handleStyle={groupStyle(3)}\n bioStyle={groupStyle(4)}\n />\n\n <div style={groupStyle(5)}>\n <MetaRow\n location={location}\n website={website}\n joined={joined}\n accent={accentColor}\n theme={t}\n />\n </div>\n\n <div style={{ height: layout.h - 8 }} aria-hidden=\"true\" />\n\n <div style={groupStyle(7)}>\n <Tabs accent={accentColor} theme={t} isVertical={isVertical} />\n </div>\n\n <div style={groupStyle(8)}>\n <SamplePost\n name={name}\n handle={handle}\n avatarUrl={avatarUrl}\n accent={accentColor}\n theme={t}\n />\n </div>\n </div>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n transform: `translateY(${bounce.translateY}px) scale(${bounce.scale})`,\n transformOrigin: \"center top\",\n }}\n >\n <div style={{ ...groupStyle(6), position: \"absolute\", inset: 0 }}>\n <MessageButton layout={messageLayout} theme={t} />\n <FollowButton\n frame={frame}\n speed={speed}\n accent={accentColor}\n theme={t}\n layout={layout}\n pressScale={pressScale}\n />\n </div>\n </div>\n\n <CursorLayer accent={accentColor} style={cursorStyle} />\n </div>\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/Inter\";\nimport { useState } from \"react\";\nimport {\n AbsoluteFill,\n Img,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { Cursor, type CursorStyle } from \"@/components/remocn/cursor\";\nimport {\n type CursorWaypoint,\n useCursorPath,\n} from \"@/components/remocn/use-cursor-path\";\n\nconst { fontFamily: FONT_FAMILY } = loadFont();\n\nexport interface XFollowCardProps {\n name?: string;\n handle?: string;\n bio?: string;\n avatarUrl?: string;\n coverUrl?: string;\n location?: string;\n website?: string;\n joined?: string;\n verified?: boolean;\n accentColor?: string;\n orientation?: \"horizontal\" | \"vertical\";\n speed?: number;\n}\n\ninterface Theme {\n page: string;\n cardBg: string;\n cardBorder: string;\n fg: string;\n fgMuted: string;\n divider: string;\n}\n\nexport const THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n page: \"#f5f7f9\",\n cardBg: \"#ffffff\",\n cardBorder: \"#e6e9eb\",\n fg: \"#0f1419\",\n fgMuted: \"#536471\",\n divider: \"#eff3f4\",\n },\n dark: {\n page: \"#0a0a0a\",\n cardBg: \"#16181c\",\n cardBorder: \"#2f3336\",\n fg: \"#e7e9ea\",\n fgMuted: \"#71767b\",\n divider: \"#2f3336\",\n },\n};\n\nexport const CLICK_FRAME = 110;\n\nconst BUTTON_LAYOUT: Record<\n \"horizontal\" | \"vertical\",\n { x: number; y: number; w: number; h: number }\n> = {\n horizontal: { x: 800, y: 240, w: 116, h: 40 },\n vertical: { x: 542, y: 336, w: 124, h: 44 },\n};\n\nexport function cardBounceIn(\n frame: number,\n fps: number,\n): { translateY: number; scale: number } {\n const s = spring({\n fps,\n frame,\n config: { damping: 12, stiffness: 120, mass: 0.8 },\n });\n const translateY = interpolate(s, [0, 1], [60, 0]);\n const scale = interpolate(s, [0, 1], [0.9, 1]);\n return { translateY, scale };\n}\n\nexport function blurInSchedule(): {\n group: number;\n start: number;\n end: number;\n}[] {\n return [\n { group: 0, start: 20, end: 26 },\n { group: 1, start: 22, end: 28 },\n { group: 2, start: 24, end: 30 },\n { group: 3, start: 26, end: 32 },\n { group: 4, start: 28, end: 34 },\n { group: 5, start: 30, end: 36 },\n { group: 6, start: 32, end: 38 },\n { group: 7, start: 34, end: 40 },\n { group: 8, start: 36, end: 42 },\n ];\n}\n\nexport function blurInAt(\n step: { start: number; end: number },\n frame: number,\n): { blur: number; opacity: number; translateY: number } {\n const range: [number, number] = [step.start, step.end];\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n };\n return {\n blur: interpolate(frame, range, [8, 0], opts),\n opacity: interpolate(frame, range, [0, 1], opts),\n translateY: interpolate(frame, range, [8, 0], opts),\n };\n}\n\nexport function followStateAt(frame: number, speed: number): boolean {\n return frame * speed >= CLICK_FRAME;\n}\n\nexport function buildFollowWaypoints(args: {\n buttonCenter: { x: number; y: number };\n orientation: \"horizontal\" | \"vertical\";\n}): CursorWaypoint[] {\n const { buttonCenter, orientation } = args;\n const rest =\n orientation === \"vertical\" ? { x: 640, y: 1120 } : { x: 1120, y: 600 };\n return [\n { at: 0, x: rest.x, y: rest.y },\n { at: 75, x: rest.x, y: rest.y },\n {\n at: CLICK_FRAME,\n x: buttonCenter.x,\n y: buttonCenter.y,\n duration: 32,\n click: true,\n easing: \"inOut\",\n },\n { at: CLICK_FRAME + 30, x: buttonCenter.x, y: buttonCenter.y },\n ];\n}\n\nfunction tintGradient(accent: string): string {\n return `linear-gradient(135deg, ${accent} 0%, ${accent}99 55%, ${accent}55 100%)`;\n}\n\nfunction Cover({\n coverUrl,\n accent,\n height,\n}: {\n coverUrl: string;\n accent: string;\n height: number;\n}) {\n const [errored, setErrored] = useState(false);\n const fallback = (\n <div\n style={{\n width: \"100%\",\n height,\n background: tintGradient(accent),\n }}\n />\n );\n if (errored || !coverUrl) return fallback;\n return (\n <Img\n src={coverUrl}\n crossOrigin=\"anonymous\"\n onError={() => setErrored(true)}\n style={{ width: \"100%\", height, objectFit: \"cover\", display: \"block\" }}\n />\n );\n}\n\nfunction Avatar({\n avatarUrl,\n name,\n size,\n accent,\n theme,\n}: {\n avatarUrl: string;\n name: string;\n size: number;\n accent: string;\n theme: Theme;\n}) {\n const [errored, setErrored] = useState(false);\n const ringStyle = {\n width: size,\n height: size,\n borderRadius: \"100%\",\n border: `4px solid ${theme.cardBg}`,\n flexShrink: 0,\n boxSizing: \"border-box\" as const,\n };\n\n if (errored || !avatarUrl) {\n return (\n <div\n style={{\n ...ringStyle,\n background: `${accent}33`,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: accent,\n fontSize: size * 0.4,\n fontWeight: 700,\n fontFamily: FONT_FAMILY,\n }}\n >\n {name.charAt(0).toUpperCase()}\n </div>\n );\n }\n\n return (\n <Img\n src={avatarUrl}\n crossOrigin=\"anonymous\"\n onError={() => setErrored(true)}\n style={{ ...ringStyle, objectFit: \"cover\" }}\n />\n );\n}\n\nfunction VerifiedBadge({ accent, size }: { accent: string; size: number }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 22 22\"\n width={size}\n height={size}\n fill={accent}\n >\n <title>Verified</title>\n <path d=\"M20.396 11c-.018-.646-.215-1.275-.57-1.816-.354-.54-.852-.972-1.438-1.246.223-.607.27-1.264.14-1.897-.131-.634-.437-1.218-.882-1.687-.47-.445-1.053-.75-1.687-.882-.633-.13-1.29-.083-1.897.14-.273-.587-.704-1.086-1.245-1.44S11.647 1.62 11 1.604c-.646.017-1.273.213-1.813.568s-.969.854-1.24 1.44c-.608-.223-1.267-.272-1.902-.14-.635.13-1.22.436-1.69.882-.445.47-.749 1.055-.878 1.688-.13.633-.08 1.29.144 1.896-.587.274-1.087.705-1.443 1.245-.356.54-.555 1.17-.574 1.817.02.647.218 1.276.574 1.817.356.54.856.972 1.443 1.245-.224.606-.274 1.263-.144 1.896.13.634.433 1.218.877 1.688.47.443 1.054.747 1.687.878.633.132 1.29.084 1.897-.136.274.586.705 1.084 1.246 1.439.54.354 1.17.551 1.816.569.647-.016 1.276-.213 1.817-.567s.972-.854 1.245-1.44c.604.239 1.266.296 1.903.164.636-.132 1.22-.447 1.68-.907.46-.46.776-1.044.908-1.681s.075-1.299-.165-1.903c.586-.274 1.084-.705 1.439-1.246.354-.54.551-1.17.569-1.816zM9.662 14.85l-3.429-3.428 1.293-1.302 2.072 2.072 4.4-4.794 1.347 1.246z\" />\n </svg>\n );\n}\n\nfunction ProfileInfo({\n name,\n handle,\n bio,\n verified,\n accent,\n theme,\n isVertical,\n nameStyle,\n handleStyle,\n bioStyle,\n}: {\n name: string;\n handle: string;\n bio: string;\n verified: boolean;\n accent: string;\n theme: Theme;\n isVertical: boolean;\n nameStyle: React.CSSProperties;\n handleStyle: React.CSSProperties;\n bioStyle: React.CSSProperties;\n}) {\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: 2,\n marginTop: 12,\n }}\n >\n <div\n style={{ ...nameStyle, display: \"flex\", alignItems: \"center\", gap: 6 }}\n >\n <span\n style={{\n fontSize: isVertical ? 28 : 24,\n fontWeight: 800,\n color: theme.fg,\n fontFamily: FONT_FAMILY,\n lineHeight: 1.2,\n letterSpacing: \"-0.01em\",\n }}\n >\n {name}\n </span>\n {verified && (\n <VerifiedBadge accent={accent} size={isVertical ? 24 : 22} />\n )}\n </div>\n <span\n style={{\n ...handleStyle,\n fontSize: isVertical ? 18 : 16,\n fontWeight: 400,\n color: theme.fgMuted,\n fontFamily: FONT_FAMILY,\n lineHeight: 1.3,\n }}\n >\n @{handle}\n </span>\n <p\n style={{\n ...bioStyle,\n margin: \"8px 0 0\",\n fontSize: isVertical ? 18 : 16,\n fontWeight: 400,\n color: theme.fg,\n fontFamily: FONT_FAMILY,\n lineHeight: 1.4,\n display: \"-webkit-box\",\n WebkitLineClamp: 2,\n WebkitBoxOrient: \"vertical\",\n overflow: \"hidden\",\n }}\n >\n {bio}\n </p>\n </div>\n );\n}\n\nfunction MetaRow({\n location,\n website,\n joined,\n accent,\n theme,\n}: {\n location: string;\n website: string;\n joined: string;\n accent: string;\n theme: Theme;\n}) {\n const itemStyle = {\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n fontSize: 15,\n color: theme.fgMuted,\n fontFamily: FONT_FAMILY,\n } as const;\n return (\n <div\n style={{\n display: \"flex\",\n flexWrap: \"wrap\",\n gap: 16,\n marginTop: 14,\n }}\n >\n <span style={itemStyle}>\n <PinIcon color={theme.fgMuted} />\n {location}\n </span>\n <span style={itemStyle}>\n <LinkIcon color={theme.fgMuted} />\n <span style={{ color: accent }}>{website}</span>\n </span>\n <span style={itemStyle}>\n <CalendarIcon color={theme.fgMuted} />\n {`Joined ${joined}`}\n </span>\n </div>\n );\n}\n\nfunction PinIcon({ color }: { color: string }) {\n return (\n <svg width={16} height={16} viewBox=\"0 0 24 24\" fill={color}>\n <title>Location</title>\n <path d=\"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 110-5 2.5 2.5 0 010 5z\" />\n </svg>\n );\n}\n\nfunction LinkIcon({ color }: { color: string }) {\n return (\n <svg width={16} height={16} viewBox=\"0 0 24 24\" fill={color}>\n <title>Website</title>\n <path d=\"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z\" />\n </svg>\n );\n}\n\nfunction CalendarIcon({ color }: { color: string }) {\n return (\n <svg width={16} height={16} viewBox=\"0 0 24 24\" fill={color}>\n <title>Joined</title>\n <path d=\"M19 4h-1V2h-2v2H8V2H6v2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zm0-12H5V6h14v2z\" />\n </svg>\n );\n}\n\nfunction FollowButton({\n frame,\n speed,\n accent,\n theme,\n layout,\n pressScale,\n}: {\n frame: number;\n speed: number;\n accent: string;\n theme: Theme;\n layout: { x: number; y: number; w: number; h: number };\n pressScale: number;\n}) {\n const _followed = followStateAt(frame, speed);\n const flip = interpolate(\n frame * speed,\n [CLICK_FRAME, CLICK_FRAME + 10],\n [0, 1],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n\n const base = {\n position: \"absolute\" as const,\n left: layout.x,\n top: layout.y,\n width: layout.w,\n height: layout.h,\n borderRadius: layout.h / 2,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n fontSize: 16,\n fontWeight: 700,\n fontFamily: FONT_FAMILY,\n boxSizing: \"border-box\" as const,\n scale: `${pressScale}`,\n transformOrigin: \"center\",\n };\n\n return (\n <div style={base}>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n borderRadius: layout.h / 2,\n background: accent,\n color: \"#ffffff\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n opacity: 1 - flip,\n }}\n >\n Follow\n </div>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n borderRadius: layout.h / 2,\n background: theme.cardBg,\n border: `1px solid ${theme.cardBorder}`,\n color: theme.fg,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n opacity: flip,\n }}\n >\n Following\n </div>\n </div>\n );\n}\n\nfunction MessageButton({\n layout,\n theme,\n}: {\n layout: { x: number; y: number; size: number };\n theme: Theme;\n}) {\n return (\n <div\n style={{\n position: \"absolute\",\n left: layout.x,\n top: layout.y,\n width: layout.size,\n height: layout.size,\n borderRadius: layout.size / 2,\n border: `1px solid ${theme.cardBorder}`,\n background: theme.cardBg,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <svg width={20} height={20} viewBox=\"0 0 24 24\" fill={theme.fg}>\n <title>Message</title>\n <path d=\"M1.998 5.5c0-1.381 1.119-2.5 2.5-2.5h15c1.381 0 2.5 1.119 2.5 2.5v13c0 1.381-1.119 2.5-2.5 2.5h-15c-1.381 0-2.5-1.119-2.5-2.5v-13zm2.5-.5c-.276 0-.5.224-.5.5v2.764l8 3.638 8-3.638V5.5c0-.276-.224-.5-.5-.5h-15zm15.5 5.463l-8 3.638-8-3.638V18.5c0 .276.224.5.5.5h15c.276 0 .5-.224.5-.5v-8.037z\" />\n </svg>\n </div>\n );\n}\n\nfunction Tabs({\n accent,\n theme,\n isVertical,\n}: {\n accent: string;\n theme: Theme;\n isVertical: boolean;\n}) {\n const tabs = [\"Posts\", \"Replies\", \"Media\", \"Likes\"];\n return (\n <div\n style={{\n display: \"flex\",\n marginTop: 0,\n columnGap: 32,\n borderBottom: `1px solid ${theme.divider}`,\n }}\n >\n {tabs.map((tab, i) => {\n const active = i === 0;\n return (\n <div\n key={tab}\n style={{\n // flex: 1,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"flex-start\",\n paddingBottom: 12,\n position: \"relative\",\n }}\n >\n <span\n style={{\n fontSize: isVertical ? 17 : 15,\n fontWeight: active ? 700 : 500,\n color: active ? theme.fg : theme.fgMuted,\n fontFamily: FONT_FAMILY,\n }}\n >\n {tab}\n </span>\n {active && (\n <div\n style={{\n position: \"absolute\",\n bottom: -1,\n height: 4,\n width: 56,\n borderRadius: 2,\n background: accent,\n }}\n />\n )}\n </div>\n );\n })}\n </div>\n );\n}\n\nfunction SamplePost({\n name,\n handle,\n avatarUrl,\n accent,\n theme,\n}: {\n name: string;\n handle: string;\n avatarUrl: string;\n accent: string;\n theme: Theme;\n}) {\n return (\n <div\n style={{\n display: \"flex\",\n gap: 12,\n marginTop: 16,\n }}\n >\n <Avatar\n avatarUrl={avatarUrl}\n name={name}\n size={44}\n accent={accent}\n theme={theme}\n />\n <div style={{ flex: 1, minWidth: 0 }}>\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n fontFamily: FONT_FAMILY,\n }}\n >\n <span style={{ fontSize: 15, fontWeight: 700, color: theme.fg }}>\n {name}\n </span>\n <span style={{ fontSize: 15, color: theme.fgMuted }}>\n {`@${handle} · 2d`}\n </span>\n </div>\n <p\n style={{\n margin: \"4px 0 0\",\n fontSize: 15,\n color: theme.fg,\n fontFamily: FONT_FAMILY,\n lineHeight: 1.4,\n }}\n >\n Shipping something new today. Built entirely with Remotion and a lot\n of coffee. More soon.\n </p>\n <div\n style={{\n display: \"flex\",\n gap: 40,\n marginTop: 10,\n color: theme.fgMuted,\n fontFamily: FONT_FAMILY,\n fontSize: 13,\n }}\n >\n <span>12</span>\n <span>48</span>\n <span>312</span>\n </div>\n </div>\n </div>\n );\n}\n\nfunction CursorLayer({\n accent,\n style,\n}: {\n accent: string;\n style: CursorStyle;\n}) {\n return (\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n pointerEvents: \"none\",\n }}\n >\n <Cursor variant=\"pointer\" rippleColor={accent} style={style} />\n </div>\n );\n}\n\nexport function XFollowCard({\n name = \"remocn\",\n handle = \"remocn\",\n bio = \"Building the collaborative video toolkit for small teams.\\nShip demos faster with ready-made motion.\",\n avatarUrl = \"/logo.svg\",\n coverUrl = \"\",\n location = \"Tunisia\",\n website = \"remocn.tn\",\n joined = \"January 2024\",\n verified = true,\n accentColor = \"#1d9bf0\",\n orientation = \"horizontal\",\n speed = 1,\n}: XFollowCardProps) {\n const frame = useCurrentFrame();\n const { width, height, fps } = useVideoConfig();\n const t = THEMES.light;\n const isVertical = orientation === \"vertical\";\n\n const refW = isVertical ? 720 : 1280;\n const refH = isVertical ? 1280 : 720;\n const stageScale = Math.min(width / refW, height / refH);\n\n const cardWidth = isVertical ? 660 : 600;\n const cardLeft = (refW - cardWidth) / 2;\n const cardTop = isVertical ? 140 : 70;\n const coverHeight = isVertical ? 180 : 150;\n const avatarSize = isVertical ? 120 : 110;\n\n const bounce = cardBounceIn(frame * speed, fps);\n const schedule = blurInSchedule();\n\n const layout = BUTTON_LAYOUT[orientation];\n const buttonCenter = {\n x: layout.x + layout.w / 2,\n y: layout.y + layout.h / 2,\n };\n\n const cursorStyle = useCursorPath(\n buildFollowWaypoints({ buttonCenter, orientation }),\n { speed },\n );\n const pressScale = 0.9 + 0.1 * (cursorStyle.pressScale ?? 1);\n\n const messageLayout = {\n x: layout.x - layout.h - 8,\n y: layout.y,\n size: layout.h,\n };\n\n const groupStyle = (group: number) => {\n const step = schedule[group];\n const b = blurInAt(step, frame * speed);\n return {\n filter: b.blur > 0 ? `blur(${b.blur}px)` : \"none\",\n opacity: b.opacity,\n translate: `0 ${b.translateY}px`,\n };\n };\n\n return (\n <AbsoluteFill style={{ background: \"transparent\" }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: refW,\n height: refH,\n translate: \"-50% -50%\",\n scale: `${stageScale}`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: cardLeft,\n top: cardTop,\n width: cardWidth,\n background: t.cardBg,\n border: `1px solid ${t.cardBorder}`,\n borderRadius: 24,\n overflow: \"hidden\",\n translate: `0 ${bounce.translateY}px`,\n scale: `${bounce.scale}`,\n transformOrigin: \"center top\",\n boxShadow: \"0 12px 40px -16px rgba(15,20,25,0.18)\",\n }}\n >\n <div style={groupStyle(0)}>\n <Cover\n coverUrl={coverUrl}\n accent={accentColor}\n height={coverHeight}\n />\n </div>\n\n <div style={{ padding: \"0 24px 24px\" }}>\n <div\n style={{\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"flex-end\",\n marginTop: -(avatarSize / 2),\n position: \"relative\",\n }}\n >\n <div\n style={{\n width: avatarSize,\n height: avatarSize,\n borderRadius: \"100%\",\n background: t.cardBg,\n flexShrink: 0,\n }}\n >\n <div style={groupStyle(1)}>\n <Avatar\n avatarUrl={avatarUrl}\n name={name}\n size={avatarSize}\n accent={accentColor}\n theme={t}\n />\n </div>\n </div>\n </div>\n\n <ProfileInfo\n name={name}\n handle={handle}\n bio={bio}\n verified={verified}\n accent={accentColor}\n theme={t}\n isVertical={isVertical}\n nameStyle={groupStyle(2)}\n handleStyle={groupStyle(3)}\n bioStyle={groupStyle(4)}\n />\n\n <div style={groupStyle(5)}>\n <MetaRow\n location={location}\n website={website}\n joined={joined}\n accent={accentColor}\n theme={t}\n />\n </div>\n\n <div style={{ height: layout.h - 8 }} aria-hidden=\"true\" />\n\n <div style={groupStyle(7)}>\n <Tabs accent={accentColor} theme={t} isVertical={isVertical} />\n </div>\n\n <div style={groupStyle(8)}>\n <SamplePost\n name={name}\n handle={handle}\n avatarUrl={avatarUrl}\n accent={accentColor}\n theme={t}\n />\n </div>\n </div>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n translate: `0 ${bounce.translateY}px`,\n scale: `${bounce.scale}`,\n transformOrigin: \"center top\",\n }}\n >\n <div style={{ ...groupStyle(6), position: \"absolute\", inset: 0 }}>\n <MessageButton layout={messageLayout} theme={t} />\n <FollowButton\n frame={frame}\n speed={speed}\n accent={accentColor}\n theme={t}\n layout={layout}\n pressScale={pressScale}\n />\n </div>\n </div>\n\n <CursorLayer accent={accentColor} style={cursorStyle} />\n </div>\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/x-follow-card.tsx"}diff --git a/registry-artifacts/x-followers-overview.json b/registry-artifacts/x-followers-overview.jsonindex c5f22a24..27e0d3b7 100644--- a/registry-artifacts/x-followers-overview.json+++ b/registry-artifacts/x-followers-overview.json@@ -8,7 +8,7 @@"files": [{"path": "registry/remocn/x-followers-overview/index.tsx",- "content": "\"use client\";\n\nimport { loadFont as loadSans } from \"@remotion/google-fonts/Manrope\";\nimport { useState } from \"react\";\nimport {\n AbsoluteFill,\n Img,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { Confetti } from \"@/components/remocn/confetti\";\n\nexport interface FollowerNotification {\n name: string;\n verified: boolean;\n /** Relative time label, e.g. \"7h\", \"1d\". */\n time: string;\n}\n\nexport interface XFollowersOverviewProps {\n notifications?: FollowerNotification[];\n totalFollowers?: number;\n handle?: string;\n avatarUrl?: string;\n accentColor?: string;\n orientation?: \"horizontal\" | \"vertical\";\n speed?: number;\n}\n\nconst { fontFamily: SANS_FAMILY } = loadSans();\nconst FONT_FAMILY = SANS_FAMILY;\n\ninterface Theme {\n bg: string;\n fg: string;\n fgMuted: string;\n border: string;\n}\n\nconst THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n bg: \"#ffffff\",\n fg: \"#0f1419\",\n fgMuted: \"#536471\",\n border: \"#eff3f4\",\n },\n dark: {\n bg: \"#0a0a0a\",\n fg: \"#e7e9ea\",\n fgMuted: \"#71767b\",\n border: \"#2f3336\",\n },\n};\n\n/**\n * Hardcoded sample notifications so the composition renders immediately from\n * defaults. A future revision swaps this for live X API data.\n */\nexport const SAMPLE_FOLLOWERS: FollowerNotification[] = [\n { name: \"Andre Vitorio\", verified: true, time: \"7h\" },\n { name: \"Sarah Chen\", verified: true, time: \"7h\" },\n { name: \"marcus\", verified: false, time: \"8h\" },\n { name: \"Lena Powell\", verified: true, time: \"9h\" },\n { name: \"dev_jay\", verified: false, time: \"10h\" },\n { name: \"Priya Nair\", verified: true, time: \"11h\" },\n { name: \"Tomás Rivera\", verified: true, time: \"13h\" },\n { name: \"hana.eth\", verified: false, time: \"15h\" },\n { name: \"Will Carter\", verified: true, time: \"18h\" },\n { name: \"Yuki Tanaka\", verified: true, time: \"21h\" },\n { name: \"benoit\", verified: false, time: \"23h\" },\n { name: \"Amara Okafor\", verified: true, time: \"1d\" },\n { name: \"Leo Martins\", verified: true, time: \"1d\" },\n { name: \"sol\", verified: false, time: \"2d\" },\n];\n\n// --- Pure helpers (unit-tested) -------------------------------------------\n\n/** Map an effective frame to the active notification index + in-slot fraction. */\nexport function slotProgress(\n fc: number,\n slotFrames: number,\n count: number,\n): { idx: number; frac: number } {\n if (slotFrames <= 0 || count <= 0) return { idx: 0, frac: 0 };\n const pos = fc / slotFrames;\n const idx = Math.max(0, Math.min(Math.floor(pos), count - 1));\n const frac = Math.max(0, Math.min(pos - idx, 1));\n return { idx, frac };\n}\n\n/** Smoothstep flip ramp: rest for `hold` of the slot, then flip 0→1. */\nexport function flipEase(frac: number, hold: number): number {\n if (hold >= 1) return 0;\n const raw = (frac - hold) / (1 - hold);\n const c = Math.max(0, Math.min(raw, 1));\n return c * c * (3 - 2 * c);\n}\n\nexport function blurIn(\n frame: number,\n start: number,\n end: number,\n): { blur: number; opacity: number; translateY: number } {\n const range: [number, number] = [start, end];\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n };\n return {\n blur: interpolate(frame, range, [10, 0], opts),\n opacity: interpolate(frame, range, [0, 1], opts),\n translateY: interpolate(frame, range, [12, 0], opts),\n };\n}\n\n// --- Sub-components --------------------------------------------------------\n\nfunction VerifiedBadge({ accent, size }: { accent: string; size: number }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 22 22\"\n width={size}\n height={size}\n fill={accent}\n style={{ flexShrink: 0 }}\n >\n <title>Verified</title>\n <path d=\"M20.396 11c-.018-.646-.215-1.275-.57-1.816-.354-.54-.852-.972-1.438-1.246.223-.607.27-1.264.14-1.897-.131-.634-.437-1.218-.882-1.687-.47-.445-1.053-.75-1.687-.882-.633-.13-1.29-.083-1.897.14-.273-.587-.704-1.086-1.245-1.44S11.647 1.62 11 1.604c-.646.017-1.273.213-1.813.568s-.969.854-1.24 1.44c-.608-.223-1.267-.272-1.902-.14-.635.13-1.22.436-1.69.882-.445.47-.749 1.055-.878 1.688-.13.633-.08 1.29.144 1.896-.587.274-1.087.705-1.443 1.245-.356.54-.555 1.17-.574 1.817.02.647.218 1.276.574 1.817.356.54.856.972 1.443 1.245-.224.606-.274 1.263-.144 1.896.13.634.433 1.218.877 1.688.47.443 1.054.747 1.687.878.633.132 1.29.084 1.897-.136.274.586.705 1.084 1.246 1.439.54.354 1.17.551 1.816.569.647-.016 1.276-.213 1.817-.567s.972-.854 1.245-1.44c.604.239 1.266.296 1.903.164.636-.132 1.22-.447 1.68-.907.46-.46.776-1.044.908-1.681s.075-1.299-.165-1.903c.586-.274 1.084-.705 1.439-1.246.354-.54.551-1.17.569-1.816zM9.662 14.85l-3.429-3.428 1.293-1.302 2.072 2.072 4.4-4.794 1.347 1.246z\" />\n </svg>\n );\n}\n\nfunction Avatar({\n avatarUrl,\n handle,\n size,\n theme,\n}: {\n avatarUrl: string;\n handle: string;\n size: number;\n theme: Theme;\n}) {\n const [errored, setErrored] = useState(false);\n const ringStyle = {\n width: size,\n height: size,\n borderRadius: 9999,\n border: `1px solid ${theme.border}`,\n flexShrink: 0,\n } as const;\n\n if (errored || !avatarUrl) {\n return (\n <div\n style={{\n ...ringStyle,\n background: theme.border,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: theme.fgMuted,\n fontSize: size * 0.42,\n fontWeight: 700,\n fontFamily: FONT_FAMILY,\n }}\n >\n {handle.charAt(0).toUpperCase()}\n </div>\n );\n }\n\n return (\n <Img\n src={avatarUrl}\n crossOrigin=\"anonymous\"\n onError={() => setErrored(true)}\n style={{ ...ringStyle, objectFit: \"cover\" }}\n />\n );\n}\n\n/** Username + verified badge — the only part that flips. Absolutely overlaid\n * and centered inside a slot sized to the active name, so the line as a whole\n * stays centered while names swap. */\nfunction NameBlock({\n item,\n fontSize,\n height,\n theme,\n accent,\n deg,\n opacity,\n}: {\n item: FollowerNotification;\n fontSize: number;\n height: number;\n theme: Theme;\n accent: string;\n deg: number;\n opacity: number;\n}) {\n return (\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n top: 0,\n height,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: fontSize * 0.2,\n whiteSpace: \"nowrap\",\n transformOrigin: \"center\",\n backfaceVisibility: \"hidden\",\n transform: `rotateX(${deg}deg)`,\n opacity,\n }}\n >\n <span\n style={{\n fontFamily: FONT_FAMILY,\n fontSize,\n fontWeight: 800,\n color: theme.fg,\n lineHeight: 1,\n }}\n >\n {item.name}\n </span>\n {item.verified && (\n <VerifiedBadge accent={accent} size={fontSize * 0.66} />\n )}\n </div>\n );\n}\n\n// --- Main composition ------------------------------------------------------\n\nexport function XFollowersOverview({\n notifications = SAMPLE_FOLLOWERS,\n totalFollowers = 1709,\n handle = \"remocn\",\n avatarUrl = \"/logo.svg\",\n accentColor = \"#1d9bf0\",\n orientation = \"horizontal\",\n speed = 1,\n}: XFollowersOverviewProps) {\n const frame = useCurrentFrame();\n const { durationInFrames, width, height, fps } = useVideoConfig();\n const t = THEMES.light;\n const isVertical = orientation === \"vertical\";\n\n const refW = isVertical ? 720 : 1280;\n const refH = isVertical ? 1280 : 720;\n const stageScale = Math.min(width / refW, height / refH);\n\n const notifSize = isVertical ? 38 : 46;\n const countNum = isVertical ? 92 : 110;\n const countLabel = isVertical ? 40 : 46;\n const perspective = isVertical ? 1000 : 1200;\n const stageH = isVertical ? 160 : 180;\n const lineH = notifSize * 1.4;\n // Fast cadence: ~0.43s per username at speed 1; flip occupies the back half.\n const SLOT = 13;\n const HOLD = 0.45;\n\n const fc = frame * speed;\n const items = notifications.length > 0 ? notifications : SAMPLE_FOLLOWERS;\n const count = items.length;\n\n // Notifications cycle first, then the total blurs in. The reveal starts once\n // the list is exhausted, capped so it always fits before the timeline ends.\n const revealStart = Math.min(\n count * SLOT,\n Math.round(durationInFrames * 0.82),\n );\n\n const { idx, frac } = slotProgress(fc, SLOT, count);\n const flipP = flipEase(frac, HOLD);\n const hasNext = idx + 1 < count;\n\n const current = items[idx];\n const next = hasNext ? items[idx + 1] : undefined;\n const activeItem = flipP >= 0.5 && next ? next : current;\n\n const currentDeg = hasNext ? -90 * flipP : 0;\n const currentOpacity = hasNext\n ? interpolate(flipP, [0, 0.55], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : 1;\n const nextDeg = 90 * (1 - flipP);\n const nextOpacity = interpolate(flipP, [0.45, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const notifOpacity = interpolate(\n fc,\n [revealStart - 4, revealStart + 8],\n [1, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n const countIn = blurIn(fc, revealStart + 4, revealStart + 28);\n // Dynamic pop: spring overshoot on the total as it blurs in.\n const revealSpring = spring({\n fps,\n frame: fc - (revealStart + 2),\n config: { damping: 10, stiffness: 170, mass: 0.8 },\n });\n const revealScale = interpolate(revealSpring, [0, 1], [0.5, 1]);\n\n // Avatar + handle reveal in sync with the total: same window as countIn,\n // avatar sliding in from the left, handle from the right.\n const avatarSize = isVertical ? 72 : 64;\n const handleSize = isVertical ? 30 : 34;\n const avatarIn = blurIn(fc, revealStart + 4, revealStart + 28);\n const handleIn = avatarIn;\n const slideOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n };\n const avatarX = interpolate(\n fc,\n [revealStart + 4, revealStart + 28],\n [-36, 0],\n slideOpts,\n );\n const handleX = interpolate(\n fc,\n [revealStart + 4, revealStart + 28],\n [36, 0],\n slideOpts,\n );\n\n // Confetti fires on the real frame the reveal begins (sync across speeds),\n // centered on the canvas.\n const confettiStart = Math.round((revealStart + 2) / speed);\n const confettiColors = [\n accentColor,\n \"#ff5da2\",\n \"#ffd23f\",\n \"#22c55e\",\n \"#a855f7\",\n ];\n\n return (\n <AbsoluteFill style={{ background: \"transparent\" }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: refW,\n height: refH,\n transform: `translate(-50%, -50%) scale(${stageScale})`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div style={{ position: \"relative\", width: refW, height: stageH }}>\n {/* Cycling notifications — only the username flips in 3D, the\n \"followed you · <time>\" suffix stays put. */}\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: notifSize * 0.28,\n opacity: notifOpacity,\n }}\n >\n <div\n style={{\n position: \"relative\",\n height: lineH,\n perspective,\n display: \"inline-flex\",\n }}\n >\n {/* Invisible spacer sizes the slot to the active name so the\n whole line stays centered; flips overlay it absolutely. */}\n <div\n aria-hidden=\"true\"\n style={{\n visibility: \"hidden\",\n display: \"flex\",\n alignItems: \"center\",\n gap: notifSize * 0.2,\n whiteSpace: \"nowrap\",\n fontFamily: FONT_FAMILY,\n fontSize: notifSize,\n fontWeight: 800,\n }}\n >\n {activeItem.name}\n {activeItem.verified && (\n <span style={{ width: notifSize * 0.66 }} />\n )}\n </div>\n <NameBlock\n item={current}\n fontSize={notifSize}\n height={lineH}\n theme={t}\n accent={accentColor}\n deg={currentDeg}\n opacity={currentOpacity}\n />\n {next && (\n <NameBlock\n item={next}\n fontSize={notifSize}\n height={lineH}\n theme={t}\n accent={accentColor}\n deg={nextDeg}\n opacity={nextOpacity}\n />\n )}\n </div>\n <span\n style={{\n fontFamily: FONT_FAMILY,\n fontSize: notifSize,\n fontWeight: 500,\n color: t.fgMuted,\n whiteSpace: \"nowrap\",\n lineHeight: 1,\n }}\n >\n followed you · {activeItem.time}\n </span>\n </div>\n\n {/* Total reveal: avatar + handle above the count */}\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: isVertical ? 26 : 22,\n }}\n >\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 14,\n }}\n >\n <div\n style={{\n opacity: avatarIn.opacity,\n filter:\n avatarIn.blur > 0 ? `blur(${avatarIn.blur}px)` : \"none\",\n transform: `translateX(${avatarX}px)`,\n }}\n >\n <Avatar\n avatarUrl={avatarUrl}\n handle={handle}\n size={avatarSize}\n theme={t}\n />\n </div>\n <span\n style={{\n fontFamily: FONT_FAMILY,\n fontSize: handleSize,\n fontWeight: 700,\n color: t.fg,\n whiteSpace: \"nowrap\",\n opacity: handleIn.opacity,\n filter:\n handleIn.blur > 0 ? `blur(${handleIn.blur}px)` : \"none\",\n transform: `translateX(${handleX}px)`,\n }}\n >\n @{handle}\n </span>\n </div>\n\n <div\n style={{\n display: \"flex\",\n alignItems: \"baseline\",\n justifyContent: \"center\",\n gap: 18,\n opacity: countIn.opacity,\n filter: countIn.blur > 0 ? `blur(${countIn.blur}px)` : \"none\",\n transform: `translateY(${countIn.translateY}px) scale(${revealScale})`,\n }}\n >\n <span\n style={{\n fontFamily: FONT_FAMILY,\n fontSize: countNum,\n fontWeight: 800,\n color: t.fg,\n letterSpacing: \"-0.03em\",\n fontVariantNumeric: \"tabular-nums\",\n lineHeight: 1,\n }}\n >\n {totalFollowers.toLocaleString(\"en-US\")}\n </span>\n <span\n style={{\n fontFamily: FONT_FAMILY,\n fontSize: countLabel,\n fontWeight: 500,\n color: t.fgMuted,\n lineHeight: 1,\n }}\n >\n Followers\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <Confetti\n startFrame={confettiStart}\n originX={0.5}\n originY={0.5}\n colors={confettiColors}\n particleCount={160}\n />\n </AbsoluteFill>\n );\n}\n",+ "content": "\"use client\";\n\nimport { loadFont as loadSans } from \"@remotion/google-fonts/Manrope\";\nimport { useState } from \"react\";\nimport {\n AbsoluteFill,\n Img,\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { Confetti } from \"@/components/remocn/confetti\";\n\nexport interface FollowerNotification {\n name: string;\n verified: boolean;\n /** Relative time label, e.g. \"7h\", \"1d\". */\n time: string;\n}\n\nexport interface XFollowersOverviewProps {\n notifications?: FollowerNotification[];\n totalFollowers?: number;\n handle?: string;\n avatarUrl?: string;\n accentColor?: string;\n orientation?: \"horizontal\" | \"vertical\";\n speed?: number;\n}\n\nconst { fontFamily: SANS_FAMILY } = loadSans();\nconst FONT_FAMILY = SANS_FAMILY;\n\ninterface Theme {\n bg: string;\n fg: string;\n fgMuted: string;\n border: string;\n}\n\nconst THEMES: Record<\"light\" | \"dark\", Theme> = {\n light: {\n bg: \"#ffffff\",\n fg: \"#0f1419\",\n fgMuted: \"#536471\",\n border: \"#eff3f4\",\n },\n dark: {\n bg: \"#0a0a0a\",\n fg: \"#e7e9ea\",\n fgMuted: \"#71767b\",\n border: \"#2f3336\",\n },\n};\n\n/**\n * Hardcoded sample notifications so the composition renders immediately from\n * defaults. A future revision swaps this for live X API data.\n */\nexport const SAMPLE_FOLLOWERS: FollowerNotification[] = [\n { name: \"Andre Vitorio\", verified: true, time: \"7h\" },\n { name: \"Sarah Chen\", verified: true, time: \"7h\" },\n { name: \"marcus\", verified: false, time: \"8h\" },\n { name: \"Lena Powell\", verified: true, time: \"9h\" },\n { name: \"dev_jay\", verified: false, time: \"10h\" },\n { name: \"Priya Nair\", verified: true, time: \"11h\" },\n { name: \"Tomás Rivera\", verified: true, time: \"13h\" },\n { name: \"hana.eth\", verified: false, time: \"15h\" },\n { name: \"Will Carter\", verified: true, time: \"18h\" },\n { name: \"Yuki Tanaka\", verified: true, time: \"21h\" },\n { name: \"benoit\", verified: false, time: \"23h\" },\n { name: \"Amara Okafor\", verified: true, time: \"1d\" },\n { name: \"Leo Martins\", verified: true, time: \"1d\" },\n { name: \"sol\", verified: false, time: \"2d\" },\n];\n\n// --- Pure helpers (unit-tested) -------------------------------------------\n\n/** Map an effective frame to the active notification index + in-slot fraction. */\nexport function slotProgress(\n fc: number,\n slotFrames: number,\n count: number,\n): { idx: number; frac: number } {\n if (slotFrames <= 0 || count <= 0) return { idx: 0, frac: 0 };\n const pos = fc / slotFrames;\n const idx = Math.max(0, Math.min(Math.floor(pos), count - 1));\n const frac = Math.max(0, Math.min(pos - idx, 1));\n return { idx, frac };\n}\n\n/** Smoothstep flip ramp: rest for `hold` of the slot, then flip 0→1. */\nexport function flipEase(frac: number, hold: number): number {\n if (hold >= 1) return 0;\n const raw = (frac - hold) / (1 - hold);\n const c = Math.max(0, Math.min(raw, 1));\n return c * c * (3 - 2 * c);\n}\n\nexport function blurIn(\n frame: number,\n start: number,\n end: number,\n): { blur: number; opacity: number; translateY: number } {\n const range: [number, number] = [start, end];\n const opts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n };\n return {\n blur: interpolate(frame, range, [10, 0], opts),\n opacity: interpolate(frame, range, [0, 1], opts),\n translateY: interpolate(frame, range, [12, 0], opts),\n };\n}\n\n// --- Sub-components --------------------------------------------------------\n\nfunction VerifiedBadge({ accent, size }: { accent: string; size: number }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 22 22\"\n width={size}\n height={size}\n fill={accent}\n style={{ flexShrink: 0 }}\n >\n <title>Verified</title>\n <path d=\"M20.396 11c-.018-.646-.215-1.275-.57-1.816-.354-.54-.852-.972-1.438-1.246.223-.607.27-1.264.14-1.897-.131-.634-.437-1.218-.882-1.687-.47-.445-1.053-.75-1.687-.882-.633-.13-1.29-.083-1.897.14-.273-.587-.704-1.086-1.245-1.44S11.647 1.62 11 1.604c-.646.017-1.273.213-1.813.568s-.969.854-1.24 1.44c-.608-.223-1.267-.272-1.902-.14-.635.13-1.22.436-1.69.882-.445.47-.749 1.055-.878 1.688-.13.633-.08 1.29.144 1.896-.587.274-1.087.705-1.443 1.245-.356.54-.555 1.17-.574 1.817.02.647.218 1.276.574 1.817.356.54.856.972 1.443 1.245-.224.606-.274 1.263-.144 1.896.13.634.433 1.218.877 1.688.47.443 1.054.747 1.687.878.633.132 1.29.084 1.897-.136.274.586.705 1.084 1.246 1.439.54.354 1.17.551 1.816.569.647-.016 1.276-.213 1.817-.567s.972-.854 1.245-1.44c.604.239 1.266.296 1.903.164.636-.132 1.22-.447 1.68-.907.46-.46.776-1.044.908-1.681s.075-1.299-.165-1.903c.586-.274 1.084-.705 1.439-1.246.354-.54.551-1.17.569-1.816zM9.662 14.85l-3.429-3.428 1.293-1.302 2.072 2.072 4.4-4.794 1.347 1.246z\" />\n </svg>\n );\n}\n\nfunction Avatar({\n avatarUrl,\n handle,\n size,\n theme,\n}: {\n avatarUrl: string;\n handle: string;\n size: number;\n theme: Theme;\n}) {\n const [errored, setErrored] = useState(false);\n const ringStyle = {\n width: size,\n height: size,\n borderRadius: 9999,\n border: `1px solid ${theme.border}`,\n flexShrink: 0,\n } as const;\n\n if (errored || !avatarUrl) {\n return (\n <div\n style={{\n ...ringStyle,\n background: theme.border,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n color: theme.fgMuted,\n fontSize: size * 0.42,\n fontWeight: 700,\n fontFamily: FONT_FAMILY,\n }}\n >\n {handle.charAt(0).toUpperCase()}\n </div>\n );\n }\n\n return (\n <Img\n src={avatarUrl}\n crossOrigin=\"anonymous\"\n onError={() => setErrored(true)}\n style={{ ...ringStyle, objectFit: \"cover\" }}\n />\n );\n}\n\n/** Username + verified badge — the only part that flips. Absolutely overlaid\n * and centered inside a slot sized to the active name, so the line as a whole\n * stays centered while names swap. */\nfunction NameBlock({\n item,\n fontSize,\n height,\n theme,\n accent,\n deg,\n opacity,\n}: {\n item: FollowerNotification;\n fontSize: number;\n height: number;\n theme: Theme;\n accent: string;\n deg: number;\n opacity: number;\n}) {\n return (\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n top: 0,\n height,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: fontSize * 0.2,\n whiteSpace: \"nowrap\",\n transformOrigin: \"center\",\n backfaceVisibility: \"hidden\",\n transform: `rotateX(${deg}deg)`,\n opacity,\n }}\n >\n <span\n style={{\n fontFamily: FONT_FAMILY,\n fontSize,\n fontWeight: 800,\n color: theme.fg,\n lineHeight: 1,\n }}\n >\n {item.name}\n </span>\n {item.verified && (\n <VerifiedBadge accent={accent} size={fontSize * 0.66} />\n )}\n </div>\n );\n}\n\n// --- Main composition ------------------------------------------------------\n\nexport function XFollowersOverview({\n notifications = SAMPLE_FOLLOWERS,\n totalFollowers = 1709,\n handle = \"remocn\",\n avatarUrl = \"/logo.svg\",\n accentColor = \"#1d9bf0\",\n orientation = \"horizontal\",\n speed = 1,\n}: XFollowersOverviewProps) {\n const frame = useCurrentFrame();\n const { durationInFrames, width, height, fps } = useVideoConfig();\n const t = THEMES.light;\n const isVertical = orientation === \"vertical\";\n\n const refW = isVertical ? 720 : 1280;\n const refH = isVertical ? 1280 : 720;\n const stageScale = Math.min(width / refW, height / refH);\n\n const notifSize = isVertical ? 38 : 46;\n const countNum = isVertical ? 92 : 110;\n const countLabel = isVertical ? 40 : 46;\n const perspective = isVertical ? 1000 : 1200;\n const stageH = isVertical ? 160 : 180;\n const lineH = notifSize * 1.4;\n // Fast cadence: ~0.43s per username at speed 1; flip occupies the back half.\n const SLOT = 13;\n const HOLD = 0.45;\n\n const fc = frame * speed;\n const items = notifications.length > 0 ? notifications : SAMPLE_FOLLOWERS;\n const count = items.length;\n\n // Notifications cycle first, then the total blurs in. The reveal starts once\n // the list is exhausted, capped so it always fits before the timeline ends.\n const revealStart = Math.min(\n count * SLOT,\n Math.round(durationInFrames * 0.82),\n );\n\n const { idx, frac } = slotProgress(fc, SLOT, count);\n const flipP = flipEase(frac, HOLD);\n const hasNext = idx + 1 < count;\n\n const current = items[idx];\n const next = hasNext ? items[idx + 1] : undefined;\n const activeItem = flipP >= 0.5 && next ? next : current;\n\n const currentDeg = hasNext ? -90 * flipP : 0;\n const currentOpacity = hasNext\n ? interpolate(flipP, [0, 0.55], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n })\n : 1;\n const nextDeg = 90 * (1 - flipP);\n const nextOpacity = interpolate(flipP, [0.45, 1], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n\n const notifOpacity = interpolate(\n fc,\n [revealStart - 4, revealStart + 8],\n [1, 0],\n { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" },\n );\n const countIn = blurIn(fc, revealStart + 4, revealStart + 28);\n // Dynamic pop: spring overshoot on the total as it blurs in.\n const revealSpring = spring({\n fps,\n frame: fc - (revealStart + 2),\n config: { damping: 10, stiffness: 170, mass: 0.8 },\n });\n const revealScale = interpolate(revealSpring, [0, 1], [0.5, 1]);\n\n // Avatar + handle reveal in sync with the total: same window as countIn,\n // avatar sliding in from the left, handle from the right.\n const avatarSize = isVertical ? 72 : 64;\n const handleSize = isVertical ? 30 : 34;\n const avatarIn = blurIn(fc, revealStart + 4, revealStart + 28);\n const handleIn = avatarIn;\n const slideOpts = {\n extrapolateLeft: \"clamp\" as const,\n extrapolateRight: \"clamp\" as const,\n };\n const avatarX = interpolate(\n fc,\n [revealStart + 4, revealStart + 28],\n [-36, 0],\n slideOpts,\n );\n const handleX = interpolate(\n fc,\n [revealStart + 4, revealStart + 28],\n [36, 0],\n slideOpts,\n );\n\n // Confetti fires on the real frame the reveal begins (sync across speeds),\n // centered on the canvas.\n const confettiStart = Math.round((revealStart + 2) / speed);\n const confettiColors = [\n accentColor,\n \"#ff5da2\",\n \"#ffd23f\",\n \"#22c55e\",\n \"#a855f7\",\n ];\n\n return (\n <AbsoluteFill style={{ background: \"transparent\" }}>\n <div\n style={{\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n width: refW,\n height: refH,\n translate: \"-50% -50%\",\n scale: `${stageScale}`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <div style={{ position: \"relative\", width: refW, height: stageH }}>\n {/* Cycling notifications — only the username flips in 3D, the\n \"followed you · <time>\" suffix stays put. */}\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: notifSize * 0.28,\n opacity: notifOpacity,\n }}\n >\n <div\n style={{\n position: \"relative\",\n height: lineH,\n perspective,\n display: \"inline-flex\",\n }}\n >\n {/* Invisible spacer sizes the slot to the active name so the\n whole line stays centered; flips overlay it absolutely. */}\n <div\n aria-hidden=\"true\"\n style={{\n visibility: \"hidden\",\n display: \"flex\",\n alignItems: \"center\",\n gap: notifSize * 0.2,\n whiteSpace: \"nowrap\",\n fontFamily: FONT_FAMILY,\n fontSize: notifSize,\n fontWeight: 800,\n }}\n >\n {activeItem.name}\n {activeItem.verified && (\n <span style={{ width: notifSize * 0.66 }} />\n )}\n </div>\n <NameBlock\n item={current}\n fontSize={notifSize}\n height={lineH}\n theme={t}\n accent={accentColor}\n deg={currentDeg}\n opacity={currentOpacity}\n />\n {next && (\n <NameBlock\n item={next}\n fontSize={notifSize}\n height={lineH}\n theme={t}\n accent={accentColor}\n deg={nextDeg}\n opacity={nextOpacity}\n />\n )}\n </div>\n <span\n style={{\n fontFamily: FONT_FAMILY,\n fontSize: notifSize,\n fontWeight: 500,\n color: t.fgMuted,\n whiteSpace: \"nowrap\",\n lineHeight: 1,\n }}\n >\n followed you · {activeItem.time}\n </span>\n </div>\n\n {/* Total reveal: avatar + handle above the count */}\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: isVertical ? 26 : 22,\n }}\n >\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 14,\n }}\n >\n <div\n style={{\n opacity: avatarIn.opacity,\n filter:\n avatarIn.blur > 0 ? `blur(${avatarIn.blur}px)` : \"none\",\n translate: `${avatarX}px`,\n }}\n >\n <Avatar\n avatarUrl={avatarUrl}\n handle={handle}\n size={avatarSize}\n theme={t}\n />\n </div>\n <span\n style={{\n fontFamily: FONT_FAMILY,\n fontSize: handleSize,\n fontWeight: 700,\n color: t.fg,\n whiteSpace: \"nowrap\",\n opacity: handleIn.opacity,\n filter:\n handleIn.blur > 0 ? `blur(${handleIn.blur}px)` : \"none\",\n translate: `${handleX}px`,\n }}\n >\n @{handle}\n </span>\n </div>\n\n <div\n style={{\n display: \"flex\",\n alignItems: \"baseline\",\n justifyContent: \"center\",\n gap: 18,\n opacity: countIn.opacity,\n filter: countIn.blur > 0 ? `blur(${countIn.blur}px)` : \"none\",\n translate: `0 ${countIn.translateY}px`,\n scale: `${revealScale}`,\n }}\n >\n <span\n style={{\n fontFamily: FONT_FAMILY,\n fontSize: countNum,\n fontWeight: 800,\n color: t.fg,\n letterSpacing: \"-0.03em\",\n fontVariantNumeric: \"tabular-nums\",\n lineHeight: 1,\n }}\n >\n {totalFollowers.toLocaleString(\"en-US\")}\n </span>\n <span\n style={{\n fontFamily: FONT_FAMILY,\n fontSize: countLabel,\n fontWeight: 500,\n color: t.fgMuted,\n lineHeight: 1,\n }}\n >\n Followers\n </span>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <Confetti\n startFrame={confettiStart}\n originX={0.5}\n originY={0.5}\n colors={confettiColors}\n particleCount={160}\n />\n </AbsoluteFill>\n );\n}\n","type": "registry:component","target": "components/remocn/x-followers-overview.tsx"}diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex 1d4df436..09005663 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -1,5 +1,9 @@import type React from "react";-import { type ComponentConfig, resolveConfig } from "@/lib/customizer-config";+import {+ type ComponentConfig,+ type ResolvedComponentConfig,+ resolveConfig,+} from "@/lib/customizer-config";export interface RegistryEntry {// biome-ignore lint/suspicious/noExplicitAny: dynamically-loaded Remotion composition, props shape varies per component@@ -2655,9 +2659,11 @@ const registry: Record<string, RegistryEntry> = {},};-const configCache = new Map<string, Promise<ComponentConfig>>();+const configCache = new Map<string, Promise<ResolvedComponentConfig>>();-export function loadComponentConfig(slug: string): Promise<ComponentConfig> {+export function loadComponentConfig(+ slug: string,+): Promise<ResolvedComponentConfig> {let promise = configCache.get(slug);if (!promise) {const entry = registry[slug];diff --git a/registry/__manifest__.ts b/registry/__manifest__.tsindex 37139f2a..f5b36f3c 100644--- a/registry/__manifest__.ts+++ b/registry/__manifest__.ts@@ -323,6 +323,21 @@ export const previewManifest: Record<string, PreviewManifestEntry> = {speed: 1,},},+ "chromatic-wave": {+ durationInFrames: 100,+ fps: 30,+ compositionWidth: 1280,+ compositionHeight: 720,+ defaults: {+ headline: "MUSIC",+ kicker: "APPLES",+ fill: "#ffffff",+ waveHeight: 28,+ maxDisplacementPx: 39,+ turbulentAmount: 130,+ speed: 1,+ },+ },"claude-chat": {durationInFrames: 150,fps: 30,@@ -656,6 +671,25 @@ export const previewManifest: Record<string, PreviewManifestEntry> = {speed: 1,},},+ "extrude-pop": {+ durationInFrames: 90,+ fps: 30,+ compositionWidth: 1280,+ compositionHeight: 720,+ previewBackdrop: {+ type: "color",+ value: "#141318",+ },+ defaults: {+ letter: "WIN",+ bodyColor: "#e8192b",+ faceColor: "#ffffff",+ minimaxRadius: 80,+ extrudeAngleDeg: -58.6,+ extrudeEndFrame: 48,+ speed: 1,+ },+ },"fade-through": {durationInFrames: 90,fps: 30,@@ -788,6 +822,25 @@ export const previewManifest: Record<string, PreviewManifestEntry> = {speed: 1,},},+ "gooey-morph": {+ durationInFrames: 120,+ fps: 30,+ compositionWidth: 1280,+ compositionHeight: 720,+ previewBackdrop: {+ type: "color",+ value: "#141318",+ },+ defaults: {+ word: "HELLO",+ fill: "#f2f2f2",+ fontFamily: "'Bodoni Moda', Georgia, serif",+ blurRadius: 6,+ displaceAmount: 20,+ barTravelFrames: 30,+ speed: 1,+ },+ },"grain-dissolve": {durationInFrames: 116,fps: 30,@@ -2453,6 +2506,41 @@ export const previewManifest: Record<string, PreviewManifestEntry> = {speed: 1,},},+ "kinetic-warp": {+ durationInFrames: 120,+ fps: 30,+ compositionWidth: 1280,+ compositionHeight: 720,+ defaults: {+ text: "REM\nOCN",+ textColor: "#FFFFFF",+ fontFamily: "Passion One",+ fontUrl:+ "https://fonts.googleapis.com/css2?family=Passion+One:wght@400;700;900&display=block",+ fontWeight: "700",+ fontSize: 107.1,+ layerScale: 480,+ keyframeStride: 20,+ speed: 1,+ },+ },+ "lens-zoom": {+ durationInFrames: 112,+ fps: 30,+ compositionWidth: 1280,+ compositionHeight: 720,+ previewBackdrop: {+ type: "color",+ value: "#141318",+ },+ defaults: {+ lensSteps: 9,+ blurSamples: 7,+ shakeAmount: 50,+ shakeTranslatePx: 73,+ speed: 1,+ },+ },"line-by-line-slide": {durationInFrames: 90,fps: 30,@@ -2763,6 +2851,25 @@ export const previewManifest: Record<string, PreviewManifestEntry> = {speed: 1,},},+ "perspective-squeeze": {+ durationInFrames: 225,+ fps: 30,+ compositionWidth: 1280,+ compositionHeight: 720,+ previewBackdrop: {+ type: "color",+ value: "#141318",+ },+ defaults: {+ upperText: "REMOCN",+ lowerText: "BEST",+ fill: "#f2f2f2",+ upperFontFamily: "Impact, 'Arial Narrow', sans-serif",+ lowerFontFamily: "Impact, 'Arial Narrow', sans-serif",+ lineGap: 50,+ speed: 1,+ },+ },"pixelate-region": {durationInFrames: 90,fps: 30,@@ -3632,6 +3739,25 @@ export const previewManifest: Record<string, PreviewManifestEntry> = {speed: 1,},},+ "stretch-in": {+ durationInFrames: 60,+ fps: 30,+ compositionWidth: 1280,+ compositionHeight: 720,+ previewBackdrop: {+ type: "color",+ value: "#141318",+ },+ defaults: {+ text: "REMOCN",+ fill: "#ffffff",+ fontSize: 510,+ entryStagger: 3,+ travelFrames: 33,+ vertexLagFrames: 3.5,+ speed: 1,+ },+ },"strikethrough-replace": {durationInFrames: 120,fps: 30,diff --git a/registry/remocn-icons/icon-activity/config.ts b/registry/remocn-icons/icon-activity/config.tsindex d037266f..0df42cf5 100644--- a/registry/remocn-icons/icon-activity/config.ts+++ b/registry/remocn-icons/icon-activity/config.ts@@ -5,38 +5,45 @@ export const iconActivityConfig: ComponentConfig = {importPath: "@/components/remocn/icon-activity",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: true,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 90,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-alert-triangle/config.ts b/registry/remocn-icons/icon-alert-triangle/config.tsindex b32f99f2..c0ba31b6 100644--- a/registry/remocn-icons/icon-alert-triangle/config.ts+++ b/registry/remocn-icons/icon-alert-triangle/config.ts@@ -5,38 +5,45 @@ export const iconAlertTriangleConfig: ComponentConfig = {importPath: "@/components/remocn/icon-alert-triangle",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-arrow-down/config.ts b/registry/remocn-icons/icon-arrow-down/config.tsindex 52b5af60..f7ca7d0e 100644--- a/registry/remocn-icons/icon-arrow-down/config.ts+++ b/registry/remocn-icons/icon-arrow-down/config.ts@@ -5,38 +5,45 @@ export const iconArrowDownConfig: ComponentConfig = {importPath: "@/components/remocn/icon-arrow-down",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 60,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-arrow-left/config.ts b/registry/remocn-icons/icon-arrow-left/config.tsindex e438a8df..f25d811f 100644--- a/registry/remocn-icons/icon-arrow-left/config.ts+++ b/registry/remocn-icons/icon-arrow-left/config.ts@@ -5,38 +5,45 @@ export const iconArrowLeftConfig: ComponentConfig = {importPath: "@/components/remocn/icon-arrow-left",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 60,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-arrow-right/config.ts b/registry/remocn-icons/icon-arrow-right/config.tsindex 7867f9d9..b1c4cf4c 100644--- a/registry/remocn-icons/icon-arrow-right/config.ts+++ b/registry/remocn-icons/icon-arrow-right/config.ts@@ -5,38 +5,45 @@ export const iconArrowRightConfig: ComponentConfig = {importPath: "@/components/remocn/icon-arrow-right",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 60,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-arrow-up/config.ts b/registry/remocn-icons/icon-arrow-up/config.tsindex 6f6d9539..36d68314 100644--- a/registry/remocn-icons/icon-arrow-up/config.ts+++ b/registry/remocn-icons/icon-arrow-up/config.ts@@ -5,38 +5,45 @@ export const iconArrowUpConfig: ComponentConfig = {importPath: "@/components/remocn/icon-arrow-up",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 60,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-at-sign/config.ts b/registry/remocn-icons/icon-at-sign/config.tsindex eada2271..7de8e4a8 100644--- a/registry/remocn-icons/icon-at-sign/config.ts+++ b/registry/remocn-icons/icon-at-sign/config.ts@@ -5,38 +5,45 @@ export const iconAtSignConfig: ComponentConfig = {importPath: "@/components/remocn/icon-at-sign",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-award/config.ts b/registry/remocn-icons/icon-award/config.tsindex 19f44d30..35e7e380 100644--- a/registry/remocn-icons/icon-award/config.ts+++ b/registry/remocn-icons/icon-award/config.ts@@ -5,38 +5,45 @@ export const iconAwardConfig: ComponentConfig = {importPath: "@/components/remocn/icon-award",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-bar-chart-3/config.ts b/registry/remocn-icons/icon-bar-chart-3/config.tsindex 7bea95f2..0aa33dab 100644--- a/registry/remocn-icons/icon-bar-chart-3/config.ts+++ b/registry/remocn-icons/icon-bar-chart-3/config.ts@@ -5,38 +5,45 @@ export const iconBarChart3Config: ComponentConfig = {importPath: "@/components/remocn/icon-bar-chart-3",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 80,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-bell/config.ts b/registry/remocn-icons/icon-bell/config.tsindex 12e5fdf2..e5469d25 100644--- a/registry/remocn-icons/icon-bell/config.ts+++ b/registry/remocn-icons/icon-bell/config.ts@@ -5,38 +5,45 @@ export const iconBellConfig: ComponentConfig = {importPath: "@/components/remocn/icon-bell",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-bookmark/config.ts b/registry/remocn-icons/icon-bookmark/config.tsindex 57482c46..0714c2bb 100644--- a/registry/remocn-icons/icon-bookmark/config.ts+++ b/registry/remocn-icons/icon-bookmark/config.ts@@ -5,38 +5,45 @@ export const iconBookmarkConfig: ComponentConfig = {importPath: "@/components/remocn/icon-bookmark",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-calendar/config.ts b/registry/remocn-icons/icon-calendar/config.tsindex 4926dffb..8a2e0ded 100644--- a/registry/remocn-icons/icon-calendar/config.ts+++ b/registry/remocn-icons/icon-calendar/config.ts@@ -5,38 +5,45 @@ export const iconCalendarConfig: ComponentConfig = {importPath: "@/components/remocn/icon-calendar",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-camera/config.ts b/registry/remocn-icons/icon-camera/config.tsindex 38272a2b..1906fa4c 100644--- a/registry/remocn-icons/icon-camera/config.ts+++ b/registry/remocn-icons/icon-camera/config.ts@@ -5,38 +5,45 @@ export const iconCameraConfig: ComponentConfig = {importPath: "@/components/remocn/icon-camera",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-check-circle/config.ts b/registry/remocn-icons/icon-check-circle/config.tsindex 931d7f9e..596d49f5 100644--- a/registry/remocn-icons/icon-check-circle/config.ts+++ b/registry/remocn-icons/icon-check-circle/config.ts@@ -5,38 +5,45 @@ export const iconCheckCircleConfig: ComponentConfig = {importPath: "@/components/remocn/icon-check-circle",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-check/config.ts b/registry/remocn-icons/icon-check/config.tsindex cc48f451..281ee94b 100644--- a/registry/remocn-icons/icon-check/config.ts+++ b/registry/remocn-icons/icon-check/config.ts@@ -5,38 +5,45 @@ export const iconCheckConfig: ComponentConfig = {importPath: "@/components/remocn/icon-check",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 60,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-chevron-down/config.ts b/registry/remocn-icons/icon-chevron-down/config.tsindex a44cd7a5..9baa0ddc 100644--- a/registry/remocn-icons/icon-chevron-down/config.ts+++ b/registry/remocn-icons/icon-chevron-down/config.ts@@ -5,38 +5,45 @@ export const iconChevronDownConfig: ComponentConfig = {importPath: "@/components/remocn/icon-chevron-down",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 60,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-chevron-left/config.ts b/registry/remocn-icons/icon-chevron-left/config.tsindex 65373a3f..358e6664 100644--- a/registry/remocn-icons/icon-chevron-left/config.ts+++ b/registry/remocn-icons/icon-chevron-left/config.ts@@ -5,38 +5,45 @@ export const iconChevronLeftConfig: ComponentConfig = {importPath: "@/components/remocn/icon-chevron-left",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 60,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-chevron-right/config.ts b/registry/remocn-icons/icon-chevron-right/config.tsindex 6a80daad..b1c7c77d 100644--- a/registry/remocn-icons/icon-chevron-right/config.ts+++ b/registry/remocn-icons/icon-chevron-right/config.ts@@ -5,38 +5,45 @@ export const iconChevronRightConfig: ComponentConfig = {importPath: "@/components/remocn/icon-chevron-right",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 60,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-chevron-up/config.ts b/registry/remocn-icons/icon-chevron-up/config.tsindex 621173f8..d0ac1136 100644--- a/registry/remocn-icons/icon-chevron-up/config.ts+++ b/registry/remocn-icons/icon-chevron-up/config.ts@@ -5,38 +5,45 @@ export const iconChevronUpConfig: ComponentConfig = {importPath: "@/components/remocn/icon-chevron-up",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 60,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-clock/config.ts b/registry/remocn-icons/icon-clock/config.tsindex a82ed873..5cf649ce 100644--- a/registry/remocn-icons/icon-clock/config.ts+++ b/registry/remocn-icons/icon-clock/config.ts@@ -5,38 +5,45 @@ export const iconClockConfig: ComponentConfig = {importPath: "@/components/remocn/icon-clock",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: true,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 90,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-cloud/config.ts b/registry/remocn-icons/icon-cloud/config.tsindex 517b6aa0..c20ee5c4 100644--- a/registry/remocn-icons/icon-cloud/config.ts+++ b/registry/remocn-icons/icon-cloud/config.ts@@ -5,38 +5,45 @@ export const iconCloudConfig: ComponentConfig = {importPath: "@/components/remocn/icon-cloud",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-code/config.ts b/registry/remocn-icons/icon-code/config.tsindex 64ecc037..8d11b221 100644--- a/registry/remocn-icons/icon-code/config.ts+++ b/registry/remocn-icons/icon-code/config.ts@@ -5,38 +5,45 @@ export const iconCodeConfig: ComponentConfig = {importPath: "@/components/remocn/icon-code",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-copy/config.ts b/registry/remocn-icons/icon-copy/config.tsindex 72915046..3b2ca7a8 100644--- a/registry/remocn-icons/icon-copy/config.ts+++ b/registry/remocn-icons/icon-copy/config.ts@@ -5,38 +5,45 @@ export const iconCopyConfig: ComponentConfig = {importPath: "@/components/remocn/icon-copy",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-credit-card/config.ts b/registry/remocn-icons/icon-credit-card/config.tsindex a6636099..8418656c 100644--- a/registry/remocn-icons/icon-credit-card/config.ts+++ b/registry/remocn-icons/icon-credit-card/config.ts@@ -5,38 +5,45 @@ export const iconCreditCardConfig: ComponentConfig = {importPath: "@/components/remocn/icon-credit-card",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-crown/config.ts b/registry/remocn-icons/icon-crown/config.tsindex 93c6cc0b..634778f1 100644--- a/registry/remocn-icons/icon-crown/config.ts+++ b/registry/remocn-icons/icon-crown/config.ts@@ -5,38 +5,45 @@ export const iconCrownConfig: ComponentConfig = {importPath: "@/components/remocn/icon-crown",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-database/config.ts b/registry/remocn-icons/icon-database/config.tsindex 40750136..55465d02 100644--- a/registry/remocn-icons/icon-database/config.ts+++ b/registry/remocn-icons/icon-database/config.ts@@ -5,38 +5,45 @@ export const iconDatabaseConfig: ComponentConfig = {importPath: "@/components/remocn/icon-database",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 80,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-dollar-sign/config.ts b/registry/remocn-icons/icon-dollar-sign/config.tsindex f595f663..685d857e 100644--- a/registry/remocn-icons/icon-dollar-sign/config.ts+++ b/registry/remocn-icons/icon-dollar-sign/config.ts@@ -5,38 +5,45 @@ export const iconDollarSignConfig: ComponentConfig = {importPath: "@/components/remocn/icon-dollar-sign",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-download/config.ts b/registry/remocn-icons/icon-download/config.tsindex 6dd11234..9f50909a 100644--- a/registry/remocn-icons/icon-download/config.ts+++ b/registry/remocn-icons/icon-download/config.ts@@ -5,38 +5,45 @@ export const iconDownloadConfig: ComponentConfig = {importPath: "@/components/remocn/icon-download",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-external-link/config.ts b/registry/remocn-icons/icon-external-link/config.tsindex 9d298367..6881920c 100644--- a/registry/remocn-icons/icon-external-link/config.ts+++ b/registry/remocn-icons/icon-external-link/config.ts@@ -5,38 +5,45 @@ export const iconExternalLinkConfig: ComponentConfig = {importPath: "@/components/remocn/icon-external-link",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-eye-off/config.ts b/registry/remocn-icons/icon-eye-off/config.tsindex f41a04b7..a26d1a38 100644--- a/registry/remocn-icons/icon-eye-off/config.ts+++ b/registry/remocn-icons/icon-eye-off/config.ts@@ -5,38 +5,45 @@ export const iconEyeOffConfig: ComponentConfig = {importPath: "@/components/remocn/icon-eye-off",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-eye/config.ts b/registry/remocn-icons/icon-eye/config.tsindex d98ce1d8..fd8cbb00 100644--- a/registry/remocn-icons/icon-eye/config.ts+++ b/registry/remocn-icons/icon-eye/config.ts@@ -5,38 +5,45 @@ export const iconEyeConfig: ComponentConfig = {importPath: "@/components/remocn/icon-eye",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-file-text/config.ts b/registry/remocn-icons/icon-file-text/config.tsindex f8ff23f0..734fd740 100644--- a/registry/remocn-icons/icon-file-text/config.ts+++ b/registry/remocn-icons/icon-file-text/config.ts@@ -5,38 +5,45 @@ export const iconFileTextConfig: ComponentConfig = {importPath: "@/components/remocn/icon-file-text",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 80,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-filter/config.ts b/registry/remocn-icons/icon-filter/config.tsindex 365f9b9d..3594cf29 100644--- a/registry/remocn-icons/icon-filter/config.ts+++ b/registry/remocn-icons/icon-filter/config.ts@@ -5,38 +5,45 @@ export const iconFilterConfig: ComponentConfig = {importPath: "@/components/remocn/icon-filter",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-flame/config.ts b/registry/remocn-icons/icon-flame/config.tsindex b199a86f..db27f29b 100644--- a/registry/remocn-icons/icon-flame/config.ts+++ b/registry/remocn-icons/icon-flame/config.ts@@ -5,38 +5,45 @@ export const iconFlameConfig: ComponentConfig = {importPath: "@/components/remocn/icon-flame",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: true,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 90,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-folder/config.ts b/registry/remocn-icons/icon-folder/config.tsindex 1390d8a8..8cc5f4ba 100644--- a/registry/remocn-icons/icon-folder/config.ts+++ b/registry/remocn-icons/icon-folder/config.ts@@ -5,38 +5,45 @@ export const iconFolderConfig: ComponentConfig = {importPath: "@/components/remocn/icon-folder",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-gem/config.ts b/registry/remocn-icons/icon-gem/config.tsindex 0c8f96e2..222b796b 100644--- a/registry/remocn-icons/icon-gem/config.ts+++ b/registry/remocn-icons/icon-gem/config.ts@@ -5,38 +5,45 @@ export const iconGemConfig: ComponentConfig = {importPath: "@/components/remocn/icon-gem",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 80,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-gift/config.ts b/registry/remocn-icons/icon-gift/config.tsindex a8a93a41..c1c865fc 100644--- a/registry/remocn-icons/icon-gift/config.ts+++ b/registry/remocn-icons/icon-gift/config.ts@@ -5,38 +5,45 @@ export const iconGiftConfig: ComponentConfig = {importPath: "@/components/remocn/icon-gift",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 80,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-globe/config.ts b/registry/remocn-icons/icon-globe/config.tsindex 5c4289e4..de460694 100644--- a/registry/remocn-icons/icon-globe/config.ts+++ b/registry/remocn-icons/icon-globe/config.ts@@ -5,38 +5,45 @@ export const iconGlobeConfig: ComponentConfig = {importPath: "@/components/remocn/icon-globe",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: true,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 90,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-heart/config.ts b/registry/remocn-icons/icon-heart/config.tsindex 955803c9..e7cc73c5 100644--- a/registry/remocn-icons/icon-heart/config.ts+++ b/registry/remocn-icons/icon-heart/config.ts@@ -5,38 +5,45 @@ export const iconHeartConfig: ComponentConfig = {importPath: "@/components/remocn/icon-heart",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-help-circle/config.ts b/registry/remocn-icons/icon-help-circle/config.tsindex c07002cc..d05c4448 100644--- a/registry/remocn-icons/icon-help-circle/config.ts+++ b/registry/remocn-icons/icon-help-circle/config.ts@@ -5,38 +5,45 @@ export const iconHelpCircleConfig: ComponentConfig = {importPath: "@/components/remocn/icon-help-circle",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-home/config.ts b/registry/remocn-icons/icon-home/config.tsindex ab88ad1d..6d29d46c 100644--- a/registry/remocn-icons/icon-home/config.ts+++ b/registry/remocn-icons/icon-home/config.ts@@ -5,38 +5,45 @@ export const iconHomeConfig: ComponentConfig = {importPath: "@/components/remocn/icon-home",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-image/config.ts b/registry/remocn-icons/icon-image/config.tsindex 466f9f23..86ea398a 100644--- a/registry/remocn-icons/icon-image/config.ts+++ b/registry/remocn-icons/icon-image/config.ts@@ -5,38 +5,45 @@ export const iconImageConfig: ComponentConfig = {importPath: "@/components/remocn/icon-image",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-inbox/config.ts b/registry/remocn-icons/icon-inbox/config.tsindex eab22d29..d3f4ac9a 100644--- a/registry/remocn-icons/icon-inbox/config.ts+++ b/registry/remocn-icons/icon-inbox/config.ts@@ -5,38 +5,45 @@ export const iconInboxConfig: ComponentConfig = {importPath: "@/components/remocn/icon-inbox",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-info/config.ts b/registry/remocn-icons/icon-info/config.tsindex 46e4d36b..2526365f 100644--- a/registry/remocn-icons/icon-info/config.ts+++ b/registry/remocn-icons/icon-info/config.ts@@ -5,38 +5,45 @@ export const iconInfoConfig: ComponentConfig = {importPath: "@/components/remocn/icon-info",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-key/config.ts b/registry/remocn-icons/icon-key/config.tsindex 49f280b8..fcfa3a7f 100644--- a/registry/remocn-icons/icon-key/config.ts+++ b/registry/remocn-icons/icon-key/config.ts@@ -5,38 +5,45 @@ export const iconKeyConfig: ComponentConfig = {importPath: "@/components/remocn/icon-key",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-layout-grid/config.ts b/registry/remocn-icons/icon-layout-grid/config.tsindex d8ced674..c4baa29e 100644--- a/registry/remocn-icons/icon-layout-grid/config.ts+++ b/registry/remocn-icons/icon-layout-grid/config.ts@@ -5,38 +5,45 @@ export const iconLayoutGridConfig: ComponentConfig = {importPath: "@/components/remocn/icon-layout-grid",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-link/config.ts b/registry/remocn-icons/icon-link/config.tsindex 68cd3082..dd061793 100644--- a/registry/remocn-icons/icon-link/config.ts+++ b/registry/remocn-icons/icon-link/config.ts@@ -5,38 +5,45 @@ export const iconLinkConfig: ComponentConfig = {importPath: "@/components/remocn/icon-link",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-loader/config.ts b/registry/remocn-icons/icon-loader/config.tsindex 1c705e50..cdf635df 100644--- a/registry/remocn-icons/icon-loader/config.ts+++ b/registry/remocn-icons/icon-loader/config.ts@@ -5,38 +5,45 @@ export const iconLoaderConfig: ComponentConfig = {importPath: "@/components/remocn/icon-loader",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: true,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 90,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-lock/config.ts b/registry/remocn-icons/icon-lock/config.tsindex 823ee449..b6eed21b 100644--- a/registry/remocn-icons/icon-lock/config.ts+++ b/registry/remocn-icons/icon-lock/config.ts@@ -5,38 +5,45 @@ export const iconLockConfig: ComponentConfig = {importPath: "@/components/remocn/icon-lock",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-log-out/config.ts b/registry/remocn-icons/icon-log-out/config.tsindex 589e443f..2d20a407 100644--- a/registry/remocn-icons/icon-log-out/config.ts+++ b/registry/remocn-icons/icon-log-out/config.ts@@ -5,38 +5,45 @@ export const iconLogOutConfig: ComponentConfig = {importPath: "@/components/remocn/icon-log-out",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-mail/config.ts b/registry/remocn-icons/icon-mail/config.tsindex d8996e40..27ab1259 100644--- a/registry/remocn-icons/icon-mail/config.ts+++ b/registry/remocn-icons/icon-mail/config.ts@@ -5,38 +5,45 @@ export const iconMailConfig: ComponentConfig = {importPath: "@/components/remocn/icon-mail",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-maximize/config.ts b/registry/remocn-icons/icon-maximize/config.tsindex 4559298c..b6849028 100644--- a/registry/remocn-icons/icon-maximize/config.ts+++ b/registry/remocn-icons/icon-maximize/config.ts@@ -5,38 +5,45 @@ export const iconMaximizeConfig: ComponentConfig = {importPath: "@/components/remocn/icon-maximize",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-menu/config.ts b/registry/remocn-icons/icon-menu/config.tsindex 9302db12..069775a1 100644--- a/registry/remocn-icons/icon-menu/config.ts+++ b/registry/remocn-icons/icon-menu/config.ts@@ -5,38 +5,45 @@ export const iconMenuConfig: ComponentConfig = {importPath: "@/components/remocn/icon-menu",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-message-circle/config.ts b/registry/remocn-icons/icon-message-circle/config.tsindex d5fcf7e0..3109170a 100644--- a/registry/remocn-icons/icon-message-circle/config.ts+++ b/registry/remocn-icons/icon-message-circle/config.ts@@ -5,38 +5,45 @@ export const iconMessageCircleConfig: ComponentConfig = {importPath: "@/components/remocn/icon-message-circle",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-mic/config.ts b/registry/remocn-icons/icon-mic/config.tsindex 591bf01e..b5963a53 100644--- a/registry/remocn-icons/icon-mic/config.ts+++ b/registry/remocn-icons/icon-mic/config.ts@@ -5,38 +5,45 @@ export const iconMicConfig: ComponentConfig = {importPath: "@/components/remocn/icon-mic",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-monitor/config.ts b/registry/remocn-icons/icon-monitor/config.tsindex e3f9fd89..afc62121 100644--- a/registry/remocn-icons/icon-monitor/config.ts+++ b/registry/remocn-icons/icon-monitor/config.ts@@ -5,38 +5,45 @@ export const iconMonitorConfig: ComponentConfig = {importPath: "@/components/remocn/icon-monitor",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-moon/config.ts b/registry/remocn-icons/icon-moon/config.tsindex 4eb5b579..072e1cdf 100644--- a/registry/remocn-icons/icon-moon/config.ts+++ b/registry/remocn-icons/icon-moon/config.ts@@ -5,38 +5,45 @@ export const iconMoonConfig: ComponentConfig = {importPath: "@/components/remocn/icon-moon",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-more-horizontal/config.ts b/registry/remocn-icons/icon-more-horizontal/config.tsindex 9d0dd57f..5953dd2b 100644--- a/registry/remocn-icons/icon-more-horizontal/config.ts+++ b/registry/remocn-icons/icon-more-horizontal/config.ts@@ -5,38 +5,45 @@ export const iconMoreHorizontalConfig: ComponentConfig = {importPath: "@/components/remocn/icon-more-horizontal",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-package/config.ts b/registry/remocn-icons/icon-package/config.tsindex 3ea2bd09..573cae5e 100644--- a/registry/remocn-icons/icon-package/config.ts+++ b/registry/remocn-icons/icon-package/config.ts@@ -5,38 +5,45 @@ export const iconPackageConfig: ComponentConfig = {importPath: "@/components/remocn/icon-package",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 80,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-party-popper/config.ts b/registry/remocn-icons/icon-party-popper/config.tsindex 232292ae..816dd58f 100644--- a/registry/remocn-icons/icon-party-popper/config.ts+++ b/registry/remocn-icons/icon-party-popper/config.ts@@ -5,38 +5,45 @@ export const iconPartyPopperConfig: ComponentConfig = {importPath: "@/components/remocn/icon-party-popper",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-pause/config.ts b/registry/remocn-icons/icon-pause/config.tsindex 9b07983f..fc799f9e 100644--- a/registry/remocn-icons/icon-pause/config.ts+++ b/registry/remocn-icons/icon-pause/config.ts@@ -5,38 +5,45 @@ export const iconPauseConfig: ComponentConfig = {importPath: "@/components/remocn/icon-pause",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 60,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-pencil/config.ts b/registry/remocn-icons/icon-pencil/config.tsindex 71fb999a..24dcccfa 100644--- a/registry/remocn-icons/icon-pencil/config.ts+++ b/registry/remocn-icons/icon-pencil/config.ts@@ -5,38 +5,45 @@ export const iconPencilConfig: ComponentConfig = {importPath: "@/components/remocn/icon-pencil",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-phone/config.ts b/registry/remocn-icons/icon-phone/config.tsindex e5a382a4..5d7eae6a 100644--- a/registry/remocn-icons/icon-phone/config.ts+++ b/registry/remocn-icons/icon-phone/config.ts@@ -5,38 +5,45 @@ export const iconPhoneConfig: ComponentConfig = {importPath: "@/components/remocn/icon-phone",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-play/config.ts b/registry/remocn-icons/icon-play/config.tsindex 307130c9..2af22aa4 100644--- a/registry/remocn-icons/icon-play/config.ts+++ b/registry/remocn-icons/icon-play/config.ts@@ -5,38 +5,45 @@ export const iconPlayConfig: ComponentConfig = {importPath: "@/components/remocn/icon-play",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 60,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-plus-circle/config.ts b/registry/remocn-icons/icon-plus-circle/config.tsindex 2dc3998b..9833cdcd 100644--- a/registry/remocn-icons/icon-plus-circle/config.ts+++ b/registry/remocn-icons/icon-plus-circle/config.ts@@ -5,38 +5,45 @@ export const iconPlusCircleConfig: ComponentConfig = {importPath: "@/components/remocn/icon-plus-circle",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-plus/config.ts b/registry/remocn-icons/icon-plus/config.tsindex 57cdcc7c..2d2516b0 100644--- a/registry/remocn-icons/icon-plus/config.ts+++ b/registry/remocn-icons/icon-plus/config.ts@@ -5,38 +5,45 @@ export const iconPlusConfig: ComponentConfig = {importPath: "@/components/remocn/icon-plus",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 60,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-refresh-cw/config.ts b/registry/remocn-icons/icon-refresh-cw/config.tsindex 9d7d9862..4a240a8c 100644--- a/registry/remocn-icons/icon-refresh-cw/config.ts+++ b/registry/remocn-icons/icon-refresh-cw/config.ts@@ -5,38 +5,45 @@ export const iconRefreshCwConfig: ComponentConfig = {importPath: "@/components/remocn/icon-refresh-cw",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: true,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 90,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-rocket/config.ts b/registry/remocn-icons/icon-rocket/config.tsindex 3e84d7d0..93e36c50 100644--- a/registry/remocn-icons/icon-rocket/config.ts+++ b/registry/remocn-icons/icon-rocket/config.ts@@ -5,38 +5,45 @@ export const iconRocketConfig: ComponentConfig = {importPath: "@/components/remocn/icon-rocket",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 80,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-save/config.ts b/registry/remocn-icons/icon-save/config.tsindex 4af0852c..e66d8da7 100644--- a/registry/remocn-icons/icon-save/config.ts+++ b/registry/remocn-icons/icon-save/config.ts@@ -5,38 +5,45 @@ export const iconSaveConfig: ComponentConfig = {importPath: "@/components/remocn/icon-save",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-search/config.ts b/registry/remocn-icons/icon-search/config.tsindex 0c566f5d..1ea9428d 100644--- a/registry/remocn-icons/icon-search/config.ts+++ b/registry/remocn-icons/icon-search/config.ts@@ -5,38 +5,45 @@ export const iconSearchConfig: ComponentConfig = {importPath: "@/components/remocn/icon-search",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-send/config.ts b/registry/remocn-icons/icon-send/config.tsindex f5594dff..5b6b1679 100644--- a/registry/remocn-icons/icon-send/config.ts+++ b/registry/remocn-icons/icon-send/config.ts@@ -5,38 +5,45 @@ export const iconSendConfig: ComponentConfig = {importPath: "@/components/remocn/icon-send",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-settings/config.ts b/registry/remocn-icons/icon-settings/config.tsindex 62a53c2c..76491b2a 100644--- a/registry/remocn-icons/icon-settings/config.ts+++ b/registry/remocn-icons/icon-settings/config.ts@@ -5,38 +5,45 @@ export const iconSettingsConfig: ComponentConfig = {importPath: "@/components/remocn/icon-settings",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-share-2/config.ts b/registry/remocn-icons/icon-share-2/config.tsindex 97dd9520..c6b17fde 100644--- a/registry/remocn-icons/icon-share-2/config.ts+++ b/registry/remocn-icons/icon-share-2/config.ts@@ -5,38 +5,45 @@ export const iconShare2Config: ComponentConfig = {importPath: "@/components/remocn/icon-share-2",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 80,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-shield/config.ts b/registry/remocn-icons/icon-shield/config.tsindex 9ce73db7..878e614b 100644--- a/registry/remocn-icons/icon-shield/config.ts+++ b/registry/remocn-icons/icon-shield/config.ts@@ -5,38 +5,45 @@ export const iconShieldConfig: ComponentConfig = {importPath: "@/components/remocn/icon-shield",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-shopping-cart/config.ts b/registry/remocn-icons/icon-shopping-cart/config.tsindex a23d537b..c1a300b8 100644--- a/registry/remocn-icons/icon-shopping-cart/config.ts+++ b/registry/remocn-icons/icon-shopping-cart/config.ts@@ -5,38 +5,45 @@ export const iconShoppingCartConfig: ComponentConfig = {importPath: "@/components/remocn/icon-shopping-cart",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-skip-forward/config.ts b/registry/remocn-icons/icon-skip-forward/config.tsindex 52bf4470..93ddf8d4 100644--- a/registry/remocn-icons/icon-skip-forward/config.ts+++ b/registry/remocn-icons/icon-skip-forward/config.ts@@ -5,38 +5,45 @@ export const iconSkipForwardConfig: ComponentConfig = {importPath: "@/components/remocn/icon-skip-forward",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 60,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-smartphone/config.ts b/registry/remocn-icons/icon-smartphone/config.tsindex da07f44e..88629acf 100644--- a/registry/remocn-icons/icon-smartphone/config.ts+++ b/registry/remocn-icons/icon-smartphone/config.ts@@ -5,38 +5,45 @@ export const iconSmartphoneConfig: ComponentConfig = {importPath: "@/components/remocn/icon-smartphone",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-sparkles/config.ts b/registry/remocn-icons/icon-sparkles/config.tsindex 402e21c2..ec0bcedf 100644--- a/registry/remocn-icons/icon-sparkles/config.ts+++ b/registry/remocn-icons/icon-sparkles/config.ts@@ -5,38 +5,45 @@ export const iconSparklesConfig: ComponentConfig = {importPath: "@/components/remocn/icon-sparkles",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: true,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 90,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-star/config.ts b/registry/remocn-icons/icon-star/config.tsindex 75baa50a..b6128262 100644--- a/registry/remocn-icons/icon-star/config.ts+++ b/registry/remocn-icons/icon-star/config.ts@@ -5,38 +5,45 @@ export const iconStarConfig: ComponentConfig = {importPath: "@/components/remocn/icon-star",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-sun/config.ts b/registry/remocn-icons/icon-sun/config.tsindex c9d89f29..94b5b964 100644--- a/registry/remocn-icons/icon-sun/config.ts+++ b/registry/remocn-icons/icon-sun/config.ts@@ -5,38 +5,45 @@ export const iconSunConfig: ComponentConfig = {importPath: "@/components/remocn/icon-sun",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 85,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-tag/config.ts b/registry/remocn-icons/icon-tag/config.tsindex 138d537c..404d2cb3 100644--- a/registry/remocn-icons/icon-tag/config.ts+++ b/registry/remocn-icons/icon-tag/config.ts@@ -5,38 +5,45 @@ export const iconTagConfig: ComponentConfig = {importPath: "@/components/remocn/icon-tag",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-target/config.ts b/registry/remocn-icons/icon-target/config.tsindex bc4850d9..42bbbebf 100644--- a/registry/remocn-icons/icon-target/config.ts+++ b/registry/remocn-icons/icon-target/config.ts@@ -5,38 +5,45 @@ export const iconTargetConfig: ComponentConfig = {importPath: "@/components/remocn/icon-target",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 80,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-terminal/config.ts b/registry/remocn-icons/icon-terminal/config.tsindex 071ee491..be4991cf 100644--- a/registry/remocn-icons/icon-terminal/config.ts+++ b/registry/remocn-icons/icon-terminal/config.ts@@ -5,38 +5,45 @@ export const iconTerminalConfig: ComponentConfig = {importPath: "@/components/remocn/icon-terminal",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-thumbs-up/config.ts b/registry/remocn-icons/icon-thumbs-up/config.tsindex a5ea2edd..a0e481ff 100644--- a/registry/remocn-icons/icon-thumbs-up/config.ts+++ b/registry/remocn-icons/icon-thumbs-up/config.ts@@ -5,38 +5,45 @@ export const iconThumbsUpConfig: ComponentConfig = {importPath: "@/components/remocn/icon-thumbs-up",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-timer/config.ts b/registry/remocn-icons/icon-timer/config.tsindex e6f77ba4..6ae29d6a 100644--- a/registry/remocn-icons/icon-timer/config.ts+++ b/registry/remocn-icons/icon-timer/config.ts@@ -5,38 +5,45 @@ export const iconTimerConfig: ComponentConfig = {importPath: "@/components/remocn/icon-timer",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 90,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-trash/config.ts b/registry/remocn-icons/icon-trash/config.tsindex 4590a7e6..06db6305 100644--- a/registry/remocn-icons/icon-trash/config.ts+++ b/registry/remocn-icons/icon-trash/config.ts@@ -5,38 +5,45 @@ export const iconTrashConfig: ComponentConfig = {importPath: "@/components/remocn/icon-trash",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-trending-down/config.ts b/registry/remocn-icons/icon-trending-down/config.tsindex 7ce1ec87..f9978802 100644--- a/registry/remocn-icons/icon-trending-down/config.ts+++ b/registry/remocn-icons/icon-trending-down/config.ts@@ -5,38 +5,45 @@ export const iconTrendingDownConfig: ComponentConfig = {importPath: "@/components/remocn/icon-trending-down",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-trending-up/config.ts b/registry/remocn-icons/icon-trending-up/config.tsindex 4f9edeb6..25232708 100644--- a/registry/remocn-icons/icon-trending-up/config.ts+++ b/registry/remocn-icons/icon-trending-up/config.ts@@ -5,38 +5,45 @@ export const iconTrendingUpConfig: ComponentConfig = {importPath: "@/components/remocn/icon-trending-up",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-trophy/config.ts b/registry/remocn-icons/icon-trophy/config.tsindex b4feda82..e3d96236 100644--- a/registry/remocn-icons/icon-trophy/config.ts+++ b/registry/remocn-icons/icon-trophy/config.ts@@ -5,38 +5,45 @@ export const iconTrophyConfig: ComponentConfig = {importPath: "@/components/remocn/icon-trophy",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 85,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-upload/config.ts b/registry/remocn-icons/icon-upload/config.tsindex 7bce51e1..03b4e468 100644--- a/registry/remocn-icons/icon-upload/config.ts+++ b/registry/remocn-icons/icon-upload/config.ts@@ -5,38 +5,45 @@ export const iconUploadConfig: ComponentConfig = {importPath: "@/components/remocn/icon-upload",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-user-plus/config.ts b/registry/remocn-icons/icon-user-plus/config.tsindex 1fec0386..5e0e72a2 100644--- a/registry/remocn-icons/icon-user-plus/config.ts+++ b/registry/remocn-icons/icon-user-plus/config.ts@@ -5,38 +5,45 @@ export const iconUserPlusConfig: ComponentConfig = {importPath: "@/components/remocn/icon-user-plus",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 75,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-user/config.ts b/registry/remocn-icons/icon-user/config.tsindex d0310be0..b6581f33 100644--- a/registry/remocn-icons/icon-user/config.ts+++ b/registry/remocn-icons/icon-user/config.ts@@ -5,38 +5,45 @@ export const iconUserConfig: ComponentConfig = {importPath: "@/components/remocn/icon-user",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-users/config.ts b/registry/remocn-icons/icon-users/config.tsindex 69babff3..c97626c4 100644--- a/registry/remocn-icons/icon-users/config.ts+++ b/registry/remocn-icons/icon-users/config.ts@@ -5,38 +5,45 @@ export const iconUsersConfig: ComponentConfig = {importPath: "@/components/remocn/icon-users",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 80,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-video/config.ts b/registry/remocn-icons/icon-video/config.tsindex d813cb97..e754da8f 100644--- a/registry/remocn-icons/icon-video/config.ts+++ b/registry/remocn-icons/icon-video/config.ts@@ -5,38 +5,45 @@ export const iconVideoConfig: ComponentConfig = {importPath: "@/components/remocn/icon-video",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-volume-2/config.ts b/registry/remocn-icons/icon-volume-2/config.tsindex b6c6cb5d..19164d75 100644--- a/registry/remocn-icons/icon-volume-2/config.ts+++ b/registry/remocn-icons/icon-volume-2/config.ts@@ -5,38 +5,45 @@ export const iconVolume2Config: ComponentConfig = {importPath: "@/components/remocn/icon-volume-2",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-volume-x/config.ts b/registry/remocn-icons/icon-volume-x/config.tsindex 6d19e269..5597c758 100644--- a/registry/remocn-icons/icon-volume-x/config.ts+++ b/registry/remocn-icons/icon-volume-x/config.ts@@ -5,38 +5,45 @@ export const iconVolumeXConfig: ComponentConfig = {importPath: "@/components/remocn/icon-volume-x",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-wallet/config.ts b/registry/remocn-icons/icon-wallet/config.tsindex 26f05057..fb10d19c 100644--- a/registry/remocn-icons/icon-wallet/config.ts+++ b/registry/remocn-icons/icon-wallet/config.ts@@ -5,38 +5,45 @@ export const iconWalletConfig: ComponentConfig = {importPath: "@/components/remocn/icon-wallet",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-x-circle/config.ts b/registry/remocn-icons/icon-x-circle/config.tsindex dc127932..edfe2e78 100644--- a/registry/remocn-icons/icon-x-circle/config.ts+++ b/registry/remocn-icons/icon-x-circle/config.ts@@ -5,38 +5,45 @@ export const iconXCircleConfig: ComponentConfig = {importPath: "@/components/remocn/icon-x-circle",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 70,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-x/config.ts b/registry/remocn-icons/icon-x/config.tsindex ad672a3e..d1eef182 100644--- a/registry/remocn-icons/icon-x/config.ts+++ b/registry/remocn-icons/icon-x/config.ts@@ -5,38 +5,45 @@ export const iconXConfig: ComponentConfig = {importPath: "@/components/remocn/icon-x",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 60,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-icons/icon-zap/config.ts b/registry/remocn-icons/icon-zap/config.tsindex 0c493246..40c0d7aa 100644--- a/registry/remocn-icons/icon-zap/config.ts+++ b/registry/remocn-icons/icon-zap/config.ts@@ -5,38 +5,45 @@ export const iconZapConfig: ComponentConfig = {importPath: "@/components/remocn/icon-zap",controls: {animation: {- type: "select",+ type: "enum",default: "both",- options: ["draw", "action", "both"],- label: "Animation",+ variants: {+ draw: {},+ action: {},+ both: {},+ },+ description: "Animation",},loop: {type: "boolean",default: false,- label: "Loop",+ description: "Loop",},size: {type: "number",- default: 48,min: 24,max: 200,step: 4,- label: "Size",+ default: 48,+ description: "Size",+ hiddenFromList: false,},color: {type: "color",default: "#171717",- label: "Color",+ description: "Color",},strokeWidth: {type: "number",- default: 2,min: 1,max: 3,step: 0.25,- label: "Stroke width",+ default: 2,+ description: "Stroke width",+ hiddenFromList: false,},},+ dimensions: { width: 48, height: 48 },durationInFrames: 60,fps: FPS,compositionWidth: 48,diff --git a/registry/remocn-ui/accordion/config.ts b/registry/remocn-ui/accordion/config.tsindex 44dbf75f..e7a1ffa1 100644--- a/registry/remocn-ui/accordion/config.ts+++ b/registry/remocn-ui/accordion/config.ts@@ -5,23 +5,33 @@ export const accordionConfig: ComponentConfig = {componentName: "Accordion",importPath: "@/components/remocn/accordion",controls: {- title: { type: "text", default: "Is it accessible?", label: "Title" },+ title: {+ type: "text-content",+ default: "Is it accessible?",+ description: "Title",+ },content: {- type: "text",+ type: "text-content",default: "Yes. It adheres to the WAI-ARIA design pattern.",- label: "Content",+ description: "Content",},variant: {- type: "select",+ type: "enum",default: "default",- options: ["default", "ghost"],- label: "Variant",+ variants: {+ default: {},+ ghost: {},+ },+ description: "Variant",},state: {- type: "select",+ type: "enum",default: "opened",- options: ["opened", "closed"],- label: "State",+ variants: {+ opened: {},+ closed: {},+ },+ description: "State",},},durationInFrames: 120,diff --git a/registry/remocn-ui/alert-dialog/config.ts b/registry/remocn-ui/alert-dialog/config.tsindex 339915ea..b68c7ef3 100644--- a/registry/remocn-ui/alert-dialog/config.ts+++ b/registry/remocn-ui/alert-dialog/config.ts@@ -8,19 +8,35 @@ export const alertDialogConfig: ComponentConfig = {componentName: "AlertDialog",importPath: "@/components/remocn/alert-dialog",controls: {- title: { type: "text", default: "Delete account?", label: "Title" },+ title: {+ type: "text-content",+ default: "Delete account?",+ description: "Title",+ },description: {- type: "text",- default: DEFAULT_DESCRIPTION,- label: "Description",+ type: "text-content",+ default:+ "This action cannot be undone. This will permanently remove your data from our servers.",+ description: "Description",+ },+ actionLabel: {+ type: "text-content",+ default: "Delete",+ description: "Action Label",+ },+ cancelLabel: {+ type: "text-content",+ default: "Cancel",+ description: "Cancel Label",},- actionLabel: { type: "text", default: "Delete", label: "Action Label" },- cancelLabel: { type: "text", default: "Cancel", label: "Cancel Label" },state: {- type: "select",+ type: "enum",default: "opened",- options: ["opened", "closed"],- label: "State",+ variants: {+ opened: {},+ closed: {},+ },+ description: "State",},},durationInFrames: 120,diff --git a/registry/remocn-ui/blur-in/config.ts b/registry/remocn-ui/blur-in/config.tsindex 1e4cd44e..bc147eeb 100644--- a/registry/remocn-ui/blur-in/config.ts+++ b/registry/remocn-ui/blur-in/config.ts@@ -1,10 +1,4 @@-import {- type ComponentConfig,- FPS,- H,- SHARED_CONTROLS,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";import type {BlurInDirection,BlurInState,@@ -15,34 +9,52 @@ export const blurInConfig: ComponentConfig = {importPath: "@/components/remocn/blur-in",controls: {state: {- type: "select",+ type: "enum",default: "revealed",- options: ["hidden", "revealed"],- label: "State",+ variants: {+ hidden: {},+ revealed: {},+ },+ description: "State",},blur: {type: "number",- default: 8,min: 0,max: 40,step: 1,- label: "Blur",+ default: 8,+ description: "Blur",+ hiddenFromList: false,},distance: {type: "number",- default: 12,min: 0,max: 80,step: 1,- label: "Distance",+ default: 12,+ description: "Distance",+ hiddenFromList: false,},direction: {- type: "select",+ type: "enum",default: "up",- options: ["up", "down", "left", "right"],- label: "Direction",+ variants: {+ up: {},+ down: {},+ left: {},+ right: {},+ },+ description: "Direction",+ },+ speed: {+ type: "number",+ min: 0.25,+ max: 4,+ step: 0.25,+ default: 1,+ description: "",+ hiddenFromList: false,},- ...SHARED_CONTROLS,},durationInFrames: 120,fps: FPS,diff --git a/registry/remocn-ui/blur-in/index.tsx b/registry/remocn-ui/blur-in/index.tsxindex f1e2b2e3..8001251f 100644--- a/registry/remocn-ui/blur-in/index.tsx+++ b/registry/remocn-ui/blur-in/index.tsx@@ -36,11 +36,12 @@ export function blurInStyle(): BlurInStyle {if (state === "revealed")return { blur: 0, opacity: 1, translateX: 0, translateY: 0 };+ const offset = ctx.distance === 0 ? 0 : ctx.sign * ctx.distance;return {blur: ctx.blur,opacity: 0,- translateX: ctx.axis === "x" ? ctx.sign * ctx.distance : 0,- translateY: ctx.axis === "y" ? ctx.sign * ctx.distance : 0,+ translateX: ctx.axis === "x" ? offset : 0,+ translateY: ctx.axis === "y" ? offset : 0,};}diff --git a/registry/remocn-ui/button/config.ts b/registry/remocn-ui/button/config.tsindex fa5571ef..72947c09 100644--- a/registry/remocn-ui/button/config.ts+++ b/registry/remocn-ui/button/config.ts@@ -5,26 +5,50 @@ export const buttonConfig: ComponentConfig = {componentName: "Button",importPath: "@/components/remocn/button",controls: {- label: { type: "text", default: "Continue", label: "Label" },+ label: {+ type: "text-content",+ default: "Continue",+ description: "Label",+ },variant: {- type: "select",+ type: "enum",default: "default",- options: ["default", "secondary", "destructive", "outline", "ghost"],- label: "Variant",+ variants: {+ default: {},+ secondary: {},+ destructive: {},+ outline: {},+ ghost: {},+ },+ description: "Variant",},size: {- type: "select",+ type: "enum",default: "default",- options: ["sm", "default", "lg"],- label: "Size",+ variants: {+ sm: {},+ default: {},+ lg: {},+ },+ description: "Size",},state: {- type: "select",+ type: "enum",default: "loading",- options: ["idle", "hover", "press", "loading", "success"],- label: "State",+ variants: {+ idle: {},+ hover: {},+ press: {},+ loading: {},+ success: {},+ },+ description: "State",+ },+ primary: {+ type: "color",+ default: "#171717",+ description: "Primary",},- primary: { type: "color", default: "#171717", label: "Primary" },},durationInFrames: 120,fps: FPS,diff --git a/registry/remocn-ui/caret/config.ts b/registry/remocn-ui/caret/config.tsindex 095e6729..f466ccf6 100644--- a/registry/remocn-ui/caret/config.ts+++ b/registry/remocn-ui/caret/config.ts@@ -6,38 +6,50 @@ export const caretConfig: ComponentConfig = {controls: {height: {type: "number",- default: 28,min: 8,max: 80,step: 2,- label: "Height",+ default: 28,+ description: "Height",+ hiddenFromList: false,},width: {type: "number",- default: 3,min: 1,max: 8,step: 1,- label: "Width",+ default: 3,+ description: "Width",+ hiddenFromList: false,},radius: {type: "number",- default: 1,min: 0,max: 8,step: 1,- label: "Radius",+ default: 1,+ description: "Radius",+ hiddenFromList: false,+ },+ blink: {+ type: "boolean",+ default: true,+ description: "Blink",},- blink: { type: "boolean", default: true, label: "Blink" },blinkPerSecond: {type: "number",- default: 1,min: 0.25,max: 4,step: 0.25,- label: "Blink/sec",+ default: 1,+ description: "Blink/sec",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#1F1E1D",+ description: "Color",},- color: { type: "color", default: "#1F1E1D", label: "Color" },},durationInFrames: 120,fps: FPS,diff --git a/registry/remocn-ui/checkbox/config.ts b/registry/remocn-ui/checkbox/config.tsindex 9b31ae4c..350dbf7e 100644--- a/registry/remocn-ui/checkbox/config.ts+++ b/registry/remocn-ui/checkbox/config.ts@@ -5,20 +5,35 @@ export const checkboxConfig: ComponentConfig = {componentName: "Checkbox",importPath: "@/components/remocn/checkbox",controls: {- label: { type: "text", default: "", label: "Label" },+ label: {+ type: "text-content",+ default: "",+ description: "Label",+ },size: {- type: "select",+ type: "enum",default: "default",- options: ["sm", "default", "lg"],- label: "Size",+ variants: {+ sm: {},+ default: {},+ lg: {},+ },+ description: "Size",},state: {- type: "select",+ type: "enum",default: "checked",- options: ["unchecked", "checked"],- label: "State",+ variants: {+ unchecked: {},+ checked: {},+ },+ description: "State",+ },+ primary: {+ type: "color",+ default: "#171717",+ description: "Primary",},- primary: { type: "color", default: "#171717", label: "Primary" },},durationInFrames: 120,fps: FPS,diff --git a/registry/remocn-ui/combobox/__tests__/combobox.test.ts b/registry/remocn-ui/combobox/__tests__/combobox.test.tsindex 3f16011b..9bb2f0d0 100644--- a/registry/remocn-ui/combobox/__tests__/combobox.test.ts+++ b/registry/remocn-ui/combobox/__tests__/combobox.test.ts@@ -122,10 +122,11 @@ describe("filterComboboxItems: case-insensitivity", () => {});describe("filterComboboxItems: revealCount slices the query", () => {- it("revealCount=2 on 'apple' uses only 'ap' → matches Apple", () => {+ it("revealCount=2 on 'apple' uses only 'ap' → matches Apple and Grape", () => {const result = filterComboboxItems(SAMPLE_ITEMS, "apple", 2);- expect(result).toHaveLength(1);+ expect(result).toHaveLength(2);expect(result[0]).toBe("Apple");+ expect(result[1]).toBe("Grape");});it("revealCount=1 on 'banana' uses only 'b' → matches Banana", () => {@@ -142,8 +143,9 @@ describe("filterComboboxItems: revealCount slices the query", () => {it("revealCount > query length uses full query (no index error)", () => {const result = filterComboboxItems(SAMPLE_ITEMS, "ap", 100);- expect(result).toHaveLength(1);+ expect(result).toHaveLength(2);expect(result[0]).toBe("Apple");+ expect(result[1]).toBe("Grape");});});diff --git a/registry/remocn-ui/combobox/config.ts b/registry/remocn-ui/combobox/config.tsindex 3c17111a..c20a5d03 100644--- a/registry/remocn-ui/combobox/config.ts+++ b/registry/remocn-ui/combobox/config.ts@@ -9,40 +9,50 @@ export const comboboxConfig: ComponentConfig = {importPath: "@/components/remocn/combobox",controls: {state: {- type: "select",+ type: "enum",default: "opened",- options: ["opened", "closed"],- label: "State",+ variants: {+ opened: {},+ closed: {},+ },+ description: "State",+ },+ query: {+ type: "text-content",+ default: "",+ description: "Query",},- query: { type: "text", default: DEFAULT_QUERY, label: "Query" },revealCount: {type: "number",- default: 0,min: 0,max: 20,step: 1,- label: "Reveal Count",+ default: 0,+ description: "Reveal Count",+ hiddenFromList: false,},placeholder: {- type: "text",- default: DEFAULT_PLACEHOLDER,- label: "Placeholder",+ type: "text-content",+ default: "Select a fruit…",+ description: "Placeholder",},selectedIndex: {type: "number",- default: -1,min: -1,max: 5,step: 1,- label: "Selected Index",+ default: -1,+ description: "Selected Index",+ hiddenFromList: false,},highlightedIndex: {type: "number",- default: 0,min: -1,max: 5,step: 1,- label: "Highlighted Index",+ default: 0,+ description: "Highlighted Index",+ hiddenFromList: false,},},durationInFrames: 120,diff --git a/registry/remocn-ui/command-menu-item/config.ts b/registry/remocn-ui/command-menu-item/config.tsindex 4bfc44c6..cd550f00 100644--- a/registry/remocn-ui/command-menu-item/config.ts+++ b/registry/remocn-ui/command-menu-item/config.ts@@ -5,19 +5,37 @@ export const commandMenuItemConfig: ComponentConfig = {componentName: "CommandMenuItem",importPath: "@/components/remocn/command-menu-item",controls: {- label: { type: "text", default: "Settings", label: "Label" },+ label: {+ type: "text-content",+ default: "Settings",+ description: "Label",+ },icon: {- type: "select",+ type: "enum",default: "settings",- options: ["search", "settings", "user", "file"],- label: "Icon",+ variants: {+ search: {},+ settings: {},+ user: {},+ file: {},+ },+ description: "Icon",+ },+ shortcut: {+ type: "text-content",+ default: "⌘ S",+ description: "Shortcut",},- shortcut: { type: "text", default: "⌘ S", label: "Shortcut" },state: {- type: "select",+ type: "enum",default: "selected",- options: ["idle", "hover", "press", "selected"],- label: "State",+ variants: {+ idle: {},+ hover: {},+ press: {},+ selected: {},+ },+ description: "State",},},durationInFrames: 120,diff --git a/registry/remocn-ui/command-menu/__tests__/command-menu.test.ts b/registry/remocn-ui/command-menu/__tests__/command-menu.test.tsindex 50487065..ac1c8d1b 100644--- a/registry/remocn-ui/command-menu/__tests__/command-menu.test.ts+++ b/registry/remocn-ui/command-menu/__tests__/command-menu.test.ts@@ -79,10 +79,10 @@ describe("filterCommandItems: prefix narrows results", () => {expect(labels).toContain("Search docs");});- it("'file' matches New File (substring in middle of label)", () => {+ it("'file' matches Profile and New File as case-insensitive substrings", () => {const result = filterCommandItems(SAMPLE_ITEMS, "file", undefined);- expect(result).toHaveLength(1);- expect(result[0].label).toBe("New File");+ expect(result).toHaveLength(2);+ expect(result.map((item) => item.label)).toEqual(["Profile", "New File"]);});it("'new' matches New File", () => {diff --git a/registry/remocn-ui/command-menu/config.ts b/registry/remocn-ui/command-menu/config.tsindex 1b954769..cadbeedb 100644--- a/registry/remocn-ui/command-menu/config.ts+++ b/registry/remocn-ui/command-menu/config.ts@@ -8,35 +8,45 @@ export const commandMenuConfig: ComponentConfig = {importPath: "@/components/remocn/command-menu",controls: {state: {- type: "select",+ type: "enum",default: "opened",- options: ["opened", "closed"],- label: "State",+ variants: {+ opened: {},+ closed: {},+ },+ description: "State",+ },+ query: {+ type: "text-content",+ default: "",+ description: "Query",},- query: { type: "text", default: DEFAULT_QUERY, label: "Query" },revealCount: {type: "number",- default: 0,min: 0,max: 20,step: 1,- label: "Reveal Count",+ default: 0,+ description: "Reveal Count",+ hiddenFromList: false,},selectedIndex: {type: "number",- default: -1,min: -1,max: 5,step: 1,- label: "Selected Index",+ default: -1,+ description: "Selected Index",+ hiddenFromList: false,},highlightedIndex: {type: "number",- default: 0,min: -1,max: 5,step: 1,- label: "Highlighted Index",+ default: 0,+ description: "Highlighted Index",+ hiddenFromList: false,},},durationInFrames: 120,diff --git a/registry/remocn-ui/context-menu/config.ts b/registry/remocn-ui/context-menu/config.tsindex 12fd23a3..7bce55eb 100644--- a/registry/remocn-ui/context-menu/config.ts+++ b/registry/remocn-ui/context-menu/config.ts@@ -8,18 +8,22 @@ export const contextMenuConfig: ComponentConfig = {importPath: "@/components/remocn/context-menu",controls: {state: {- type: "select",+ type: "enum",default: "opened",- options: ["opened", "closed"],- label: "State",+ variants: {+ opened: {},+ closed: {},+ },+ description: "State",},highlightedIndex: {type: "number",- default: 1,min: -1,max: 5,step: 1,- label: "Highlighted Index",+ default: 1,+ description: "Highlighted Index",+ hiddenFromList: false,},},durationInFrames: 120,diff --git a/registry/remocn-ui/core/__tests__/timeline.test.ts b/registry/remocn-ui/core/__tests__/timeline.test.tsindex 9ac52820..d316a96b 100644--- a/registry/remocn-ui/core/__tests__/timeline.test.ts+++ b/registry/remocn-ui/core/__tests__/timeline.test.ts@@ -395,17 +395,17 @@ describe("resolveStateTransition: chained steps carry from=previous state", () =describe("resolveStateTransition: same-`at` ties — later array entry wins", () => {type S = "idle" | "a" | "b" | "c";- it("second entry at same `at` wins: to=second, from=default", () => {+ it("second entry at same `at` wins and transitions from the prior entry", () => {const steps: Step<S>[] = [{ at: 5, state: "a" },{ at: 5, state: "b" },];const r = resolveStateTransition(5, steps, "idle");expect(r.to).toBe("b");- expect(r.from).toBe("idle");+ expect(r.from).toBe("a");});- it("third entry at same `at` wins: to=third, from=default (all share same at)", () => {+ it("third entry at same `at` wins and transitions from the prior entry", () => {const steps: Step<S>[] = [{ at: 5, state: "a" },{ at: 5, state: "b" },@@ -413,7 +413,7 @@ describe("resolveStateTransition: same-`at` ties — later array entry wins", ()];const r = resolveStateTransition(5, steps, "idle");expect(r.to).toBe("c");- expect(r.from).toBe("idle");+ expect(r.from).toBe("b");});it("tie at second step: from=first step (different at), to=later-array winner", () => {diff --git a/registry/remocn-ui/cursor/config.ts b/registry/remocn-ui/cursor/config.tsindex 8c9614ad..892b6da9 100644--- a/registry/remocn-ui/cursor/config.ts+++ b/registry/remocn-ui/cursor/config.ts@@ -5,20 +5,28 @@ export const cursorConfig: ComponentConfig = {importPath: "@/components/remocn/cursor",controls: {variant: {- type: "select",+ type: "enum",default: "arrow",- options: ["arrow", "pointer"],- label: "Variant",+ variants: {+ arrow: {},+ pointer: {},+ },+ description: "Variant",},size: {type: "number",- default: 28,min: 16,max: 64,step: 2,- label: "Size",+ default: 28,+ description: "Size",+ hiddenFromList: false,+ },+ rippleColor: {+ type: "color",+ default: "#171717",+ description: "Ripple",},- rippleColor: { type: "color", default: "#171717", label: "Ripple" },},durationInFrames: 120,fps: FPS,diff --git a/registry/remocn-ui/cursor/use-cursor-path.ts b/registry/remocn-ui/cursor/use-cursor-path.tsindex 69a2f25e..c52dd7cb 100644--- a/registry/remocn-ui/cursor/use-cursor-path.ts+++ b/registry/remocn-ui/cursor/use-cursor-path.ts@@ -57,8 +57,7 @@ export function useCursorPath(waypoints: CursorWaypoint[],opts: CursorPathOptions = {},): CursorStyle {- const { speed = 1 } = opts;- const raw = useCurrentFrame() * speed;+ const raw = useCurrentFrame();return cursorPathAt(waypoints, raw, opts);}@@ -67,7 +66,8 @@ export function cursorPathAt(raw: number,opts: CursorPathOptions = {},): CursorStyle {- const { defaultDuration = DEFAULT_DURATION } = opts;+ const { speed = 1, defaultDuration = DEFAULT_DURATION } = opts;+ const effectiveFrame = raw * speed;if (waypoints.length === 0) {return { x: 0, y: 0, scale: 1, rippleOpacity: 0, rippleScale: 0 };@@ -75,7 +75,7 @@ export function cursorPathAt(const first = waypoints[0];- if (raw <= first.at) {+ if (effectiveFrame <= first.at) {return {x: first.x,y: first.y,@@ -88,12 +88,12 @@ export function cursorPathAt(let toIndex = waypoints.length - 1;for (let i = 1; i < waypoints.length; i++) {- if (waypoints[i].at > raw) {+ if (waypoints[i].at > effectiveFrame) {toIndex = i;break;}}- const pastLast = raw >= waypoints[waypoints.length - 1].at;+ const pastLast = effectiveFrame >= waypoints[waypoints.length - 1].at;const to = pastLast ? waypoints[waypoints.length - 1] : waypoints[toIndex];const from = pastLast? waypoints[waypoints.length - 1]@@ -102,15 +102,18 @@ export function cursorPathAt(const dur = to.duration ?? defaultDuration;const ease = easings[to.easing ?? "inOut"];const start = to.at - dur;- const t = pastLast || dur <= 0 ? 1 : ease(clamp01((raw - start) / dur));+ const t =+ pastLast || dur <= 0 ? 1 : ease(clamp01((effectiveFrame - start) / dur));const x = lerp(from.x, to.x, t);const y = lerp(from.y, to.y, t);let lastClickAt = -Infinity;for (const wp of waypoints) {- if (wp.click && wp.at <= raw && wp.at > lastClickAt) lastClickAt = wp.at;+ if (wp.click && wp.at <= effectiveFrame && wp.at > lastClickAt)+ lastClickAt = wp.at;}- const sinceClick = lastClickAt === -Infinity ? -1 : raw - lastClickAt;+ const sinceClick =+ lastClickAt === -Infinity ? -1 : effectiveFrame - lastClickAt;const ripple = ripplePhase(sinceClick);const clickDip = clickPress(sinceClick);diff --git a/registry/remocn-ui/dialog/config.ts b/registry/remocn-ui/dialog/config.tsindex 281e0172..44a3e827 100644--- a/registry/remocn-ui/dialog/config.ts+++ b/registry/remocn-ui/dialog/config.ts@@ -8,23 +8,35 @@ export const dialogConfig: ComponentConfig = {componentName: "Dialog",importPath: "@/components/remocn/dialog",controls: {- title: { type: "text", default: "Edit profile", label: "Title" },+ title: {+ type: "text-content",+ default: "Edit profile",+ description: "Title",+ },description: {- type: "text",- default: DEFAULT_DESCRIPTION,- label: "Description",+ type: "text-content",+ default:+ "Make changes to your profile here. Click save when you're done.",+ description: "Description",},actionLabel: {- type: "text",+ type: "text-content",default: "Save changes",- label: "Action Label",+ description: "Action Label",+ },+ cancelLabel: {+ type: "text-content",+ default: "Cancel",+ description: "Cancel Label",},- cancelLabel: { type: "text", default: "Cancel", label: "Cancel Label" },state: {- type: "select",+ type: "enum",default: "opened",- options: ["opened", "closed"],- label: "State",+ variants: {+ opened: {},+ closed: {},+ },+ description: "State",},},durationInFrames: 120,diff --git a/registry/remocn-ui/drawer/config.ts b/registry/remocn-ui/drawer/config.tsindex 2e24099f..02a3f7af 100644--- a/registry/remocn-ui/drawer/config.ts+++ b/registry/remocn-ui/drawer/config.ts@@ -8,23 +8,35 @@ export const drawerConfig: ComponentConfig = {componentName: "Drawer",importPath: "@/components/remocn/drawer",controls: {- title: { type: "text", default: "Edit profile", label: "Title" },+ title: {+ type: "text-content",+ default: "Edit profile",+ description: "Title",+ },description: {- type: "text",- default: DEFAULT_DESCRIPTION,- label: "Description",+ type: "text-content",+ default:+ "Make changes to your profile here. Click save when you're done.",+ description: "Description",},actionLabel: {- type: "text",+ type: "text-content",default: "Save changes",- label: "Action Label",+ description: "Action Label",+ },+ cancelLabel: {+ type: "text-content",+ default: "Cancel",+ description: "Cancel Label",},- cancelLabel: { type: "text", default: "Cancel", label: "Cancel Label" },state: {- type: "select",+ type: "enum",default: "opened",- options: ["opened", "closed"],- label: "State",+ variants: {+ opened: {},+ closed: {},+ },+ description: "State",},},durationInFrames: 120,diff --git a/registry/remocn-ui/dropdown-menu-item/config.ts b/registry/remocn-ui/dropdown-menu-item/config.tsindex 5b69a217..fda76222 100644--- a/registry/remocn-ui/dropdown-menu-item/config.ts+++ b/registry/remocn-ui/dropdown-menu-item/config.ts@@ -5,12 +5,20 @@ export const dropdownMenuItemConfig: ComponentConfig = {componentName: "DropdownMenuItem",importPath: "@/components/remocn/dropdown-menu-item",controls: {- label: { type: "text", default: "Profile", label: "Label" },+ label: {+ type: "text-content",+ default: "Profile",+ description: "Label",+ },state: {- type: "select",+ type: "enum",default: "hover",- options: ["idle", "hover", "press"],- label: "State",+ variants: {+ idle: {},+ hover: {},+ press: {},+ },+ description: "State",},},durationInFrames: 120,diff --git a/registry/remocn-ui/dropdown-menu/config.ts b/registry/remocn-ui/dropdown-menu/config.tsindex bf658f1a..e3068dd2 100644--- a/registry/remocn-ui/dropdown-menu/config.ts+++ b/registry/remocn-ui/dropdown-menu/config.ts@@ -5,20 +5,28 @@ export const dropdownMenuConfig: ComponentConfig = {componentName: "DropdownMenu",importPath: "@/components/remocn/dropdown-menu",controls: {- label: { type: "text", default: "Options", label: "Label" },+ label: {+ type: "text-content",+ default: "Options",+ description: "Label",+ },state: {- type: "select",+ type: "enum",default: "opened",- options: ["opened", "closed"],- label: "State",+ variants: {+ opened: {},+ closed: {},+ },+ description: "State",},highlightedIndex: {type: "number",- default: 0,min: -1,max: 3,step: 1,- label: "Highlighted Index",+ default: 0,+ description: "Highlighted Index",+ hiddenFromList: false,},},durationInFrames: 120,diff --git a/registry/remocn-ui/input/config.ts b/registry/remocn-ui/input/config.tsindex 52ba085e..bfc5763b 100644--- a/registry/remocn-ui/input/config.ts+++ b/registry/remocn-ui/input/config.ts@@ -6,24 +6,43 @@ export const inputConfig: ComponentConfig = {importPath: "@/components/remocn/input",controls: {placeholder: {- type: "text",+ type: "text-content",default: "[email protected]",- label: "Placeholder",+ description: "Placeholder",+ },+ value: {+ type: "text-content",+ default: "[email protected]",+ description: "Value",},- value: { type: "text", default: "[email protected]", label: "Value" },size: {- type: "select",+ type: "enum",default: "default",- options: ["sm", "default", "lg"],- label: "Size",+ variants: {+ sm: {},+ default: {},+ lg: {},+ },+ description: "Size",},state: {- type: "select",+ type: "enum",default: "typing",- options: ["idle", "hover", "active", "typing", "blur", "invalid"],- label: "State",+ variants: {+ idle: {},+ hover: {},+ active: {},+ typing: {},+ blur: {},+ invalid: {},+ },+ description: "State",+ },+ primary: {+ type: "color",+ default: "#171717",+ description: "Primary",},- primary: { type: "color", default: "#171717", label: "Primary" },},durationInFrames: 120,fps: FPS,diff --git a/registry/remocn-ui/message-bubble/config.ts b/registry/remocn-ui/message-bubble/config.tsindex 53b1c076..af5d7e4f 100644--- a/registry/remocn-ui/message-bubble/config.ts+++ b/registry/remocn-ui/message-bubble/config.ts@@ -5,25 +5,39 @@ import type {} from "@/registry/remocn-ui/message-bubble";const DEFAULT_TEXT = "Yep, pushing it live now";-const DEFAULT_REACTION = "🔥";+const _DEFAULT_REACTION = "🔥";export const messageBubbleConfig: ComponentConfig = {componentName: "MessageBubble",importPath: "@/components/remocn/message-bubble",controls: {- text: { type: "text", default: DEFAULT_TEXT, label: "Text" },+ text: {+ type: "text-content",+ default: "Yep, pushing it live now",+ description: "Text",+ },variant: {- type: "select",+ type: "enum",default: "incoming",- options: ["incoming", "outgoing"],- label: "Variant",+ variants: {+ incoming: {},+ outgoing: {},+ },+ description: "Variant",+ },+ reaction: {+ type: "text-content",+ default: "🔥",+ description: "Reaction",},- reaction: { type: "text", default: DEFAULT_REACTION, label: "Reaction" },state: {- type: "select",+ type: "enum",default: "visible",- options: ["hidden", "visible"],- label: "State",+ variants: {+ hidden: {},+ visible: {},+ },+ description: "State",},},durationInFrames: 120,diff --git a/registry/remocn-ui/popover/config.ts b/registry/remocn-ui/popover/config.tsindex 5d7ff77d..acf6f849 100644--- a/registry/remocn-ui/popover/config.ts+++ b/registry/remocn-ui/popover/config.ts@@ -1,38 +1,51 @@import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";import type { PopoverState } from "@/registry/remocn-ui/popover";-const DEFAULT_TITLE = "Dimensions";-const DEFAULT_DESCRIPTION = "Set the dimensions for the layer.";+const _DEFAULT_TITLE = "Dimensions";+const _DEFAULT_DESCRIPTION = "Set the dimensions for the layer.";export const popoverConfig: ComponentConfig = {componentName: "Popover",importPath: "@/components/remocn/popover",controls: {- title: { type: "text", default: DEFAULT_TITLE, label: "Title" },+ title: {+ type: "text-content",+ default: "Dimensions",+ description: "Title",+ },description: {- type: "text",- default: DEFAULT_DESCRIPTION,- label: "Description",+ type: "text-content",+ default: "Set the dimensions for the layer.",+ description: "Description",},side: {- type: "select",+ type: "enum",default: "bottom",- options: ["top", "bottom", "left", "right"],- label: "Side",+ variants: {+ top: {},+ bottom: {},+ left: {},+ right: {},+ },+ description: "Side",},width: {type: "number",- default: 288,min: 160,max: 480,step: 8,- label: "Width",+ default: 288,+ description: "Width",+ hiddenFromList: false,},state: {- type: "select",+ type: "enum",default: "opened",- options: ["opened", "closed"],- label: "State",+ variants: {+ opened: {},+ closed: {},+ },+ description: "State",},},durationInFrames: 120,diff --git a/registry/remocn-ui/progress/config.ts b/registry/remocn-ui/progress/config.tsindex d421227b..79839325 100644--- a/registry/remocn-ui/progress/config.ts+++ b/registry/remocn-ui/progress/config.ts@@ -6,21 +6,27 @@ export const progressConfig: ComponentConfig = {controls: {value: {type: "number",- default: 62,min: 0,max: 100,step: 1,- label: "Value",+ default: 62,+ description: "Value",+ hiddenFromList: false,},width: {type: "number",- default: 320,min: 120,max: 640,step: 20,- label: "Width",+ default: 320,+ description: "Width",+ hiddenFromList: false,+ },+ showLabel: {+ type: "boolean",+ default: true,+ description: "Show Label",},- showLabel: { type: "boolean", default: true, label: "Show Label" },},durationInFrames: 120,fps: FPS,diff --git a/registry/remocn-ui/radio/config.ts b/registry/remocn-ui/radio/config.tsindex c2d3ffe8..7f374ddc 100644--- a/registry/remocn-ui/radio/config.ts+++ b/registry/remocn-ui/radio/config.ts@@ -5,20 +5,35 @@ export const radioConfig: ComponentConfig = {componentName: "Radio",importPath: "@/components/remocn/radio",controls: {- label: { type: "text", default: "", label: "Label" },+ label: {+ type: "text-content",+ default: "",+ description: "Label",+ },size: {- type: "select",+ type: "enum",default: "default",- options: ["sm", "default", "lg"],- label: "Size",+ variants: {+ sm: {},+ default: {},+ lg: {},+ },+ description: "Size",},state: {- type: "select",+ type: "enum",default: "checked",- options: ["unchecked", "checked"],- label: "State",+ variants: {+ unchecked: {},+ checked: {},+ },+ description: "State",+ },+ primary: {+ type: "color",+ default: "#171717",+ description: "Primary",},- primary: { type: "color", default: "#171717", label: "Primary" },},durationInFrames: 120,fps: FPS,diff --git a/registry/remocn-ui/resizable/config.ts b/registry/remocn-ui/resizable/config.tsindex 0ba804a5..f6b331b3 100644--- a/registry/remocn-ui/resizable/config.ts+++ b/registry/remocn-ui/resizable/config.ts@@ -10,23 +10,31 @@ export const resizableConfig: ComponentConfig = {controls: {ratio: {type: "number",- default: 0.5,min: 0,max: 1,step: 0.05,- label: "Ratio",+ default: 0.5,+ description: "Ratio",+ hiddenFromList: false,},handleState: {- type: "select",+ type: "enum",default: "idle",- options: ["idle", "hover", "press"],- label: "Handle State",+ variants: {+ idle: {},+ hover: {},+ press: {},+ },+ description: "Handle State",},direction: {- type: "select",+ type: "enum",default: "horizontal",- options: ["horizontal", "vertical"],- label: "Direction",+ variants: {+ horizontal: {},+ vertical: {},+ },+ description: "Direction",},},durationInFrames: 120,diff --git a/registry/remocn-ui/select-item/config.ts b/registry/remocn-ui/select-item/config.tsindex 4c6a3759..34a9c4d4 100644--- a/registry/remocn-ui/select-item/config.ts+++ b/registry/remocn-ui/select-item/config.ts@@ -5,12 +5,21 @@ export const selectItemConfig: ComponentConfig = {componentName: "SelectItem",importPath: "@/components/remocn/select-item",controls: {- label: { type: "text", default: "Banana", label: "Label" },+ label: {+ type: "text-content",+ default: "Banana",+ description: "Label",+ },state: {- type: "select",+ type: "enum",default: "selected",- options: ["idle", "hover", "press", "selected"],- label: "State",+ variants: {+ idle: {},+ hover: {},+ press: {},+ selected: {},+ },+ description: "State",},},durationInFrames: 120,diff --git a/registry/remocn-ui/select/config.ts b/registry/remocn-ui/select/config.tsindex ee7da8c9..3ae070a9 100644--- a/registry/remocn-ui/select/config.ts+++ b/registry/remocn-ui/select/config.ts@@ -5,28 +5,37 @@ export const selectConfig: ComponentConfig = {componentName: "Select",importPath: "@/components/remocn/select",controls: {- label: { type: "text", default: "Select a fruit", label: "Label" },+ label: {+ type: "text-content",+ default: "Select a fruit",+ description: "Label",+ },state: {- type: "select",+ type: "enum",default: "opened",- options: ["opened", "closed"],- label: "State",+ variants: {+ opened: {},+ closed: {},+ },+ description: "State",},selectedIndex: {type: "number",- default: 1,min: -1,max: 3,step: 1,- label: "Selected Index",+ default: 1,+ description: "Selected Index",+ hiddenFromList: false,},highlightedIndex: {type: "number",- default: -1,min: -1,max: 3,step: 1,- label: "Highlighted Index",+ default: -1,+ description: "Highlighted Index",+ hiddenFromList: false,},},durationInFrames: 120,diff --git a/registry/remocn-ui/sheet/config.ts b/registry/remocn-ui/sheet/config.tsindex 2e3947aa..36cc6ce0 100644--- a/registry/remocn-ui/sheet/config.ts+++ b/registry/remocn-ui/sheet/config.ts@@ -8,23 +8,35 @@ export const sheetConfig: ComponentConfig = {componentName: "Sheet",importPath: "@/components/remocn/sheet",controls: {- title: { type: "text", default: "Edit profile", label: "Title" },+ title: {+ type: "text-content",+ default: "Edit profile",+ description: "Title",+ },description: {- type: "text",- default: DEFAULT_DESCRIPTION,- label: "Description",+ type: "text-content",+ default:+ "Make changes to your profile here. Click save when you're done.",+ description: "Description",},actionLabel: {- type: "text",+ type: "text-content",default: "Save changes",- label: "Action Label",+ description: "Action Label",+ },+ cancelLabel: {+ type: "text-content",+ default: "Cancel",+ description: "Cancel Label",},- cancelLabel: { type: "text", default: "Cancel", label: "Cancel Label" },state: {- type: "select",+ type: "enum",default: "opened",- options: ["opened", "closed"],- label: "State",+ variants: {+ opened: {},+ closed: {},+ },+ description: "State",},},durationInFrames: 120,diff --git a/registry/remocn-ui/skeleton-block/config.ts b/registry/remocn-ui/skeleton-block/config.tsindex ee420f5d..b92d85ce 100644--- a/registry/remocn-ui/skeleton-block/config.ts+++ b/registry/remocn-ui/skeleton-block/config.ts@@ -6,27 +6,30 @@ export const skeletonBlockConfig: ComponentConfig = {controls: {width: {type: "number",- default: 240,min: 40,max: 600,step: 10,- label: "Width",+ default: 240,+ description: "Width",+ hiddenFromList: false,},height: {type: "number",- default: 20,min: 8,max: 120,step: 2,- label: "Height",+ default: 20,+ description: "Height",+ hiddenFromList: false,},radius: {type: "number",- default: 6,min: 0,max: 60,step: 1,- label: "Radius",+ default: 6,+ description: "Radius",+ hiddenFromList: false,},},durationInFrames: 120,diff --git a/registry/remocn-ui/skeleton/config.ts b/registry/remocn-ui/skeleton/config.tsindex 058f3dce..91039770 100644--- a/registry/remocn-ui/skeleton/config.ts+++ b/registry/remocn-ui/skeleton/config.ts@@ -6,16 +6,22 @@ export const skeletonConfig: ComponentConfig = {importPath: "@/components/remocn/skeleton",controls: {layout: {- type: "select",+ type: "enum",default: "card",- options: ["lines", "card"],- label: "Layout",+ variants: {+ lines: {},+ card: {},+ },+ description: "Layout",},state: {- type: "select",+ type: "enum",default: "loading",- options: ["loading", "loaded"],- label: "State",+ variants: {+ loading: {},+ loaded: {},+ },+ description: "State",},},durationInFrames: 120,diff --git a/registry/remocn-ui/slider/config.ts b/registry/remocn-ui/slider/config.tsindex f0aeb97d..ffa689a4 100644--- a/registry/remocn-ui/slider/config.ts+++ b/registry/remocn-ui/slider/config.ts@@ -7,27 +7,37 @@ export const sliderConfig: ComponentConfig = {controls: {value: {type: "number",- default: 40,min: 0,max: 100,step: 1,- label: "Value",+ default: 40,+ description: "Value",+ hiddenFromList: false,},thumbState: {- type: "select",+ type: "enum",default: "idle",- options: ["idle", "hover", "press"],- label: "Thumb State",+ variants: {+ idle: {},+ hover: {},+ press: {},+ },+ description: "Thumb State",},width: {type: "number",- default: 320,min: 120,max: 640,step: 20,- label: "Width",+ default: 320,+ description: "Width",+ hiddenFromList: false,+ },+ showValue: {+ type: "boolean",+ default: true,+ description: "Show Value",},- showValue: { type: "boolean", default: true, label: "Show Value" },},durationInFrames: 120,fps: FPS,diff --git a/registry/remocn-ui/spinner/config.ts b/registry/remocn-ui/spinner/config.tsindex 55ab0669..e2ff337b 100644--- a/registry/remocn-ui/spinner/config.ts+++ b/registry/remocn-ui/spinner/config.ts@@ -6,19 +6,21 @@ export const spinnerConfig: ComponentConfig = {controls: {size: {type: "number",- default: 20,min: 8,max: 64,step: 2,- label: "Size",+ default: 20,+ description: "Size",+ hiddenFromList: false,},strokeWidth: {type: "number",- default: 2.5,min: 1,max: 6,step: 0.5,- label: "Stroke width",+ default: 2.5,+ description: "Stroke width",+ hiddenFromList: false,},},durationInFrames: 120,diff --git a/registry/remocn-ui/stepper/config.ts b/registry/remocn-ui/stepper/config.tsindex 18deaa9e..fcc66bb7 100644--- a/registry/remocn-ui/stepper/config.ts+++ b/registry/remocn-ui/stepper/config.ts@@ -8,11 +8,12 @@ export const stepperConfig: ComponentConfig = {controls: {activeIndex: {type: "number",- default: 1,min: 0,max: 2,step: 1,- label: "Active Index",+ default: 1,+ description: "Active Index",+ hiddenFromList: false,},},durationInFrames: 120,diff --git a/registry/remocn-ui/switch/config.ts b/registry/remocn-ui/switch/config.tsindex a189713b..db0bf4be 100644--- a/registry/remocn-ui/switch/config.ts+++ b/registry/remocn-ui/switch/config.ts@@ -5,20 +5,35 @@ export const switchConfig: ComponentConfig = {componentName: "Switch",importPath: "@/components/remocn/switch",controls: {- label: { type: "text", default: "", label: "Label" },+ label: {+ type: "text-content",+ default: "",+ description: "Label",+ },size: {- type: "select",+ type: "enum",default: "default",- options: ["sm", "default", "lg"],- label: "Size",+ variants: {+ sm: {},+ default: {},+ lg: {},+ },+ description: "Size",},state: {- type: "select",+ type: "enum",default: "checked",- options: ["unchecked", "checked"],- label: "State",+ variants: {+ unchecked: {},+ checked: {},+ },+ description: "State",+ },+ primary: {+ type: "color",+ default: "#171717",+ description: "Primary",},- primary: { type: "color", default: "#171717", label: "Primary" },},durationInFrames: 120,fps: FPS,diff --git a/registry/remocn-ui/tabs/config.ts b/registry/remocn-ui/tabs/config.tsindex ebf73a71..75585ce0 100644--- a/registry/remocn-ui/tabs/config.ts+++ b/registry/remocn-ui/tabs/config.ts@@ -6,16 +6,23 @@ export const tabsConfig: ComponentConfig = {importPath: "@/components/remocn/tabs",controls: {state: {- type: "select",+ type: "enum",default: "Account",- options: ["Account", "Password", "Settings"],- label: "State",+ variants: {+ Account: {},+ Password: {},+ Settings: {},+ },+ description: "State",},variant: {- type: "select",+ type: "enum",default: "pill",- options: ["pill", "underline"],- label: "Variant",+ variants: {+ pill: {},+ underline: {},+ },+ description: "Variant",},},durationInFrames: 120,diff --git a/registry/remocn-ui/toast/config.ts b/registry/remocn-ui/toast/config.tsindex 67cb58eb..9d2c321d 100644--- a/registry/remocn-ui/toast/config.ts+++ b/registry/remocn-ui/toast/config.ts@@ -8,23 +8,34 @@ export const toastConfig: ComponentConfig = {componentName: "Toast",importPath: "@/components/remocn/toast",controls: {- title: { type: "text", default: DEFAULT_TITLE, label: "Title" },+ title: {+ type: "text-content",+ default: "Changes saved",+ description: "Title",+ },description: {- type: "text",- default: DEFAULT_DESCRIPTION,- label: "Description",+ type: "text-content",+ default: "Your profile has been updated.",+ description: "Description",},variant: {- type: "select",+ type: "enum",default: "success",- options: ["default", "success", "error"],- label: "Variant",+ variants: {+ default: {},+ success: {},+ error: {},+ },+ description: "Variant",},state: {- type: "select",+ type: "enum",default: "visible",- options: ["hidden", "visible"],- label: "State",+ variants: {+ hidden: {},+ visible: {},+ },+ description: "State",},},durationInFrames: 120,@@ -44,7 +55,7 @@ export const toastConfig: ComponentConfig = {];if (description !== undefined && description !== DEFAULT_DESCRIPTION)props.push(` description="${description}"`);- if (variant !== undefined && variant !== "default")+ if (variant !== undefined && variant !== "success")props.push(` variant="${variant}"`);return `import { Toast } from "@/components/remocn/toast";diff --git a/registry/remocn-ui/toggle-group/__tests__/toggle-group.test.ts b/registry/remocn-ui/toggle-group/__tests__/toggle-group.test.tsindex 7109035a..187854bf 100644--- a/registry/remocn-ui/toggle-group/__tests__/toggle-group.test.ts+++ b/registry/remocn-ui/toggle-group/__tests__/toggle-group.test.ts@@ -239,10 +239,10 @@ function resolveToggleGroupTransition(}if (frame >= stepStart) {- from = step.state;+ from = next ? step.state : si === 0 ? defaultState : step.state;to = next?.state ?? step.state;- if (frame >= stepEnd || !next) {+ if (frame >= stepEnd) {from = next?.state ?? step.state;to = from;progress = 0;diff --git a/registry/remocn-ui/toggle-group/config.ts b/registry/remocn-ui/toggle-group/config.tsindex d111470c..1af6817a 100644--- a/registry/remocn-ui/toggle-group/config.ts+++ b/registry/remocn-ui/toggle-group/config.ts@@ -6,16 +6,22 @@ export const toggleGroupConfig: ComponentConfig = {importPath: "@/components/remocn/toggle-group",controls: {state: {- type: "select",+ type: "enum",default: "Monthly",- options: ["Monthly", "Yearly"],- label: "State",+ variants: {+ Monthly: {},+ Yearly: {},+ },+ description: "State",},size: {- type: "select",+ type: "enum",default: "default",- options: ["default", "sm"],- label: "Size",+ variants: {+ default: {},+ sm: {},+ },+ description: "Size",},},durationInFrames: 120,diff --git a/registry/remocn-ui/tooltip/config.ts b/registry/remocn-ui/tooltip/config.tsindex 7f450e14..45c9d7f5 100644--- a/registry/remocn-ui/tooltip/config.ts+++ b/registry/remocn-ui/tooltip/config.ts@@ -7,18 +7,30 @@ export const tooltipConfig: ComponentConfig = {componentName: "Tooltip",importPath: "@/components/remocn/tooltip",controls: {- label: { type: "text", default: DEFAULT_LABEL, label: "Label" },+ label: {+ type: "text-content",+ default: "Add to library",+ description: "Label",+ },side: {- type: "select",+ type: "enum",default: "top",- options: ["top", "bottom", "left", "right"],- label: "Side",+ variants: {+ top: {},+ bottom: {},+ left: {},+ right: {},+ },+ description: "Side",},state: {- type: "select",+ type: "enum",default: "visible",- options: ["hidden", "visible"],- label: "State",+ variants: {+ hidden: {},+ visible: {},+ },+ description: "State",},},durationInFrames: 120,diff --git a/registry/remocn-ui/typing-indicator/config.ts b/registry/remocn-ui/typing-indicator/config.tsindex f6673659..9858bffe 100644--- a/registry/remocn-ui/typing-indicator/config.ts+++ b/registry/remocn-ui/typing-indicator/config.ts@@ -6,27 +6,30 @@ export const typingIndicatorConfig: ComponentConfig = {controls: {dotCount: {type: "number",- default: 3,min: 2,max: 5,step: 1,- label: "Dots",+ default: 3,+ description: "Dots",+ hiddenFromList: false,},size: {type: "number",- default: 8,min: 4,max: 16,step: 1,- label: "Dot size",+ default: 8,+ description: "Dot size",+ hiddenFromList: false,},amplitude: {type: "number",- default: 5,min: 0,max: 14,step: 1,- label: "Bounce",+ default: 5,+ description: "Bounce",+ hiddenFromList: false,},},durationInFrames: 90,diff --git a/registry/remocn/a1-product-demo/acts/ai-planning.tsx b/registry/remocn/a1-product-demo/acts/ai-planning.tsxindex 4c6179cc..f381a359 100644--- a/registry/remocn/a1-product-demo/acts/ai-planning.tsx+++ b/registry/remocn/a1-product-demo/acts/ai-planning.tsx@@ -162,7 +162,7 @@ function TaskBlock({paddingRight: 12,overflow: "hidden",opacity: p,- transform: `translateX(${(1 - p) * -22}px)`,+ translate: `${(1 - p) * -22}px`,}}><div style={{ width: 4, height: "100%", background: ACCENT_BAR }} />@@ -277,7 +277,7 @@ export function AIPlanning({ speed = 1 }: { speed?: number }) {alignItems: "center",justifyContent: "space-between",opacity: headP,- transform: `translateY(${(1 - headP) * 8}px)`,+ translate: `0 ${(1 - headP) * 8}px`,}}><span@@ -308,7 +308,7 @@ export function AIPlanning({ speed = 1 }: { speed?: number }) {marginTop: 22,marginBottom: 26,opacity: titleP,- transform: `translateY(${(1 - titleP) * 10}px)`,+ translate: `0 ${(1 - titleP) * 10}px`,}}>Intelligently plan your entire day@@ -395,7 +395,7 @@ export function AIPlanning({ speed = 1 }: { speed?: number }) {height: ROW_H - 6,background: FLOW_YELLOW,opacity: markerP,- transform: `scaleY(${markerP})`,+ scale: `1 ${markerP}`,transformOrigin: "top",}}/>diff --git a/registry/remocn/a1-product-demo/acts/features-swap.tsx b/registry/remocn/a1-product-demo/acts/features-swap.tsxindex e30542d8..67f6795f 100644--- a/registry/remocn/a1-product-demo/acts/features-swap.tsx+++ b/registry/remocn/a1-product-demo/acts/features-swap.tsx@@ -37,7 +37,7 @@ export function FeaturesSwap({ speed = 1 }: { speed?: number }) {fontWeight: 400,color: FLOW_INK,opacity: lineReveal,- transform: `translateY(${lineShift}px)`,+ translate: `0 ${lineShift}px`,}}><span>Features designed to </span>@@ -70,7 +70,7 @@ export function FeaturesSwap({ speed = 1 }: { speed?: number }) {textAlign: "center",color: FLOW_YELLOW,opacity,- transform: `translateY(${ty}px)`,+ translate: `0 ${ty}px`,filter: blur > 0.05 ? `blur(${blur}px)` : undefined,willChange: "transform, filter, opacity",}}diff --git a/registry/remocn/a1-product-demo/acts/focus-analytics.tsx b/registry/remocn/a1-product-demo/acts/focus-analytics.tsxindex 4bb73f2e..8dcfee4f 100644--- a/registry/remocn/a1-product-demo/acts/focus-analytics.tsx+++ b/registry/remocn/a1-product-demo/acts/focus-analytics.tsx@@ -61,7 +61,7 @@ export function FocusAnalytics({ speed = 1 }: { speed?: number }) {<divstyle={{position: "relative",- transform: `scale(${cardScale})`,+ scale: `${cardScale}`,opacity: cardOpacity,}}>@@ -140,7 +140,7 @@ export function FocusAnalytics({ speed = 1 }: { speed?: number }) {height: `${h * 100}%`,borderRadius: 5,transformOrigin: "bottom",- transform: `scaleY(${grow})`,+ scale: `1 ${grow}`,background: isYellow ? FLOW_YELLOW : "#ECE9DA",}}/>@@ -154,7 +154,7 @@ export function FocusAnalytics({ speed = 1 }: { speed?: number }) {position: "absolute",top: -22,right: 70,- transform: `scale(${johnPop})`,+ scale: `${johnPop}`,transformOrigin: "center",}}>@@ -165,7 +165,7 @@ export function FocusAnalytics({ speed = 1 }: { speed?: number }) {position: "absolute",bottom: -22,right: -34,- transform: `scale(${amyPop})`,+ scale: `${amyPop}`,transformOrigin: "center",}}>diff --git a/registry/remocn/a1-product-demo/acts/icon-cloud.tsx b/registry/remocn/a1-product-demo/acts/icon-cloud.tsxindex d6b08ec6..fc9bb69f 100644--- a/registry/remocn/a1-product-demo/acts/icon-cloud.tsx+++ b/registry/remocn/a1-product-demo/acts/icon-cloud.tsx@@ -232,7 +232,8 @@ function ChipNode({position: "absolute",left: `calc(50% + ${x}px)`,top: `calc(50% + ${y}px)`,- transform: `translate(-50%, -50%) scale(${scale})`,+ translate: "-50% -50%",+ scale: `${scale}`,opacity: opacityIn * opacityOut,filter: blur > 0.05 ? `blur(${blur}px)` : undefined,willChange: "transform, filter, opacity",@@ -299,7 +300,7 @@ function HeadWord({style={{display: "inline-block",color,- transform: `translateY(${ty}%)`,+ translate: `0 ${ty}%`,filter: blur > 0.05 ? `blur(${blur}px)` : undefined,willChange: "transform, filter",}}@@ -376,7 +377,7 @@ export function IconCloud({ speed = 1 }: { speed?: number }) {style={{position: "absolute",opacity: lineBOpacity,- transform: `translateY(${lineBTy}px)`,+ translate: `0 ${lineBTy}px`,filter: lineBBlur > 0.05 ? `blur(${lineBBlur}px)` : undefined,fontFamily: FONT_SERIF,fontSize: 60,diff --git a/registry/remocn/a1-product-demo/acts/integrations.tsx b/registry/remocn/a1-product-demo/acts/integrations.tsxindex 1ed43e88..db05edf4 100644--- a/registry/remocn/a1-product-demo/acts/integrations.tsx+++ b/registry/remocn/a1-product-demo/acts/integrations.tsx@@ -46,7 +46,8 @@ export function Integrations({ speed = 1 }: { speed?: number }) {height: 2,background: FLOW_BORDER,transformOrigin: "center",- transform: `translateY(-50%) scaleX(${lineGrow})`,+ translate: "0 -50%",+ scale: `${lineGrow} 1`,}}/>{ICONS.map((kind, i) => {@@ -62,7 +63,7 @@ export function Integrations({ speed = 1 }: { speed?: number }) {key={kind}style={{position: "relative",- transform: `scale(${pop})`,+ scale: `${pop}`,transformOrigin: "center",}}>diff --git a/registry/remocn/a1-product-demo/acts/logo-outro.tsx b/registry/remocn/a1-product-demo/acts/logo-outro.tsxindex 7f18c1a3..0b9b364f 100644--- a/registry/remocn/a1-product-demo/acts/logo-outro.tsx+++ b/registry/remocn/a1-product-demo/acts/logo-outro.tsx@@ -65,7 +65,7 @@ export function LogoOutro({ speed = 1 }: { speed?: number }) {alignItems: "center",gap: 30,opacity,- transform: `scale(${scale})`,+ scale: `${scale}`,transformOrigin: "center",willChange: "transform, opacity",}}diff --git a/registry/remocn/a1-product-demo/acts/metrics-cards.tsx b/registry/remocn/a1-product-demo/acts/metrics-cards.tsxindex 8e6cbd28..6c49c4d5 100644--- a/registry/remocn/a1-product-demo/acts/metrics-cards.tsx+++ b/registry/remocn/a1-product-demo/acts/metrics-cards.tsx@@ -55,7 +55,8 @@ function Card({flexDirection: "column",justifyContent: "space-between",opacity,- transform: `translateY(${ty}px) scale(${scale})`,+ translate: `0 ${ty}px`,+ scale: `${scale}`,transformOrigin: "center bottom",willChange: "transform, opacity",}}diff --git a/registry/remocn/a1-product-demo/acts/positioning.tsx b/registry/remocn/a1-product-demo/acts/positioning.tsxindex f6226f7a..a276f5da 100644--- a/registry/remocn/a1-product-demo/acts/positioning.tsx+++ b/registry/remocn/a1-product-demo/acts/positioning.tsx@@ -87,7 +87,7 @@ function WordReveal({style={{display: "inline-block",color,- transform: `translateY(${ty}%)`,+ translate: `0 ${ty}%`,filter: blur > 0.05 ? `blur(${blur}px)` : undefined,willChange: "transform, filter",}}@@ -152,7 +152,7 @@ export function Positioning({ speed = 1 }: { speed?: number }) {alignItems: "center",justifyContent: "center",opacity: lockupOpacity,- transform: `scale(${lockupScale})`,+ scale: `${lockupScale}`,transformOrigin: "center",willChange: "transform, opacity",}}diff --git a/registry/remocn/a1-product-demo/acts/problem-hook.tsx b/registry/remocn/a1-product-demo/acts/problem-hook.tsxindex 1ce2ad6a..19c428b6 100644--- a/registry/remocn/a1-product-demo/acts/problem-hook.tsx+++ b/registry/remocn/a1-product-demo/acts/problem-hook.tsx@@ -62,7 +62,7 @@ function WordReveal({style={{display: "inline-block",color,- transform: `translateY(${ty}%)`,+ translate: `0 ${ty}%`,filter: blur > 0.05 ? `blur(${blur}px)` : undefined,willChange: "transform, filter",}}@@ -199,7 +199,7 @@ export function ProblemHook({ speed = 1 }: { speed?: number }) {top: "50%",marginLeft: -card.w / 2,marginTop: -card.h / 2,- transform: `translate(${sp * card.dx}px, ${sp * card.dy}px)`,+ translate: `${sp * card.dx}px ${sp * card.dy}px`,width: card.w,height: card.h,borderRadius: 10,@@ -225,7 +225,7 @@ export function ProblemHook({ speed = 1 }: { speed?: number }) {letterSpacing: "-0.01em",position: "relative",zIndex: 1,- transform: `translateY(${line2ty}%)`,+ translate: `0 ${line2ty}%`,filter: line2blur > 0.05 ? `blur(${line2blur}px)` : undefined,willChange: "transform, filter",}}@@ -249,7 +249,7 @@ export function ProblemHook({ speed = 1 }: { speed?: number }) {alignItems: "center",justifyContent: "center",opacity: beat3Opacity,- transform: `translateY(${beat3ty}px)`,+ translate: `0 ${beat3ty}px`,willChange: "transform, opacity",}}>diff --git a/registry/remocn/a1-product-demo/acts/social-proof.tsx b/registry/remocn/a1-product-demo/acts/social-proof.tsxindex a7ade567..f790901f 100644--- a/registry/remocn/a1-product-demo/acts/social-proof.tsx+++ b/registry/remocn/a1-product-demo/acts/social-proof.tsx@@ -97,7 +97,7 @@ function TestimonialCard({flexDirection: "column",gap: 20,opacity,- transform: `translateY(${ty}px)`,+ translate: `0 ${ty}px`,willChange: "transform, opacity",}}>@@ -191,7 +191,7 @@ export function SocialProof({ speed = 1 }: { speed?: number }) {flexDirection: "column",alignItems: "center",opacity: headOpacity,- transform: `translateY(${headTy}px)`,+ translate: `0 ${headTy}px`,willChange: "transform, opacity",}}>diff --git a/registry/remocn/a1-product-demo/acts/task-mgmt.tsx b/registry/remocn/a1-product-demo/acts/task-mgmt.tsxindex 238640ba..13af7ed4 100644--- a/registry/remocn/a1-product-demo/acts/task-mgmt.tsx+++ b/registry/remocn/a1-product-demo/acts/task-mgmt.tsx@@ -137,7 +137,7 @@ function ChecklistPill({boxShadow: row.highlighted? "0 14px 34px rgba(242, 210, 0, 0.30)": "0 8px 22px rgba(30, 28, 22, 0.06)",- transform: `translateX(${tx}px)`,+ translate: `${tx}px`,opacity,willChange: "transform, opacity",}}@@ -184,7 +184,8 @@ function DetailCard({borderRadius: 14,boxShadow: CARD_SHADOW,padding: "22px 26px 18px",- transform: `translateY(${ty}px) scale(${scale})`,+ translate: `0 ${ty}px`,+ scale: `${scale}`,opacity,transformOrigin: "left top",willChange: "transform, opacity",diff --git a/registry/remocn/a1-product-demo/acts/workflow-auto.tsx b/registry/remocn/a1-product-demo/acts/workflow-auto.tsxindex ae281e77..afff49e9 100644--- a/registry/remocn/a1-product-demo/acts/workflow-auto.tsx+++ b/registry/remocn/a1-product-demo/acts/workflow-auto.tsx@@ -143,7 +143,7 @@ export function WorkflowAuto({ speed = 1 }: { speed?: number }) {alignItems: "center",gap: 18,opacity: headerReveal,- transform: `translateY(${headerShift}px)`,+ translate: `0 ${headerShift}px`,}}><div style={{ display: "flex", alignItems: "center", gap: 10 }}>@@ -213,7 +213,8 @@ export function WorkflowAuto({ speed = 1 }: { speed?: number }) {position: "absolute",left: spec.x,top: spec.y,- transform: `translate(-50%, -50%) scale(${scale})`,+ translate: "-50% -50%",+ scale: `${scale}`,transformOrigin: "center",opacity: pop,}}diff --git a/registry/remocn/a1-product-demo/feature-frame.tsx b/registry/remocn/a1-product-demo/feature-frame.tsxindex 7b3ef7b8..9d87f493 100644--- a/registry/remocn/a1-product-demo/feature-frame.tsx+++ b/registry/remocn/a1-product-demo/feature-frame.tsx@@ -52,7 +52,8 @@ export function FeatureFrame({flex: "0 0 46%",display: "flex",opacity: cardOpacity,- transform: `translateX(${cardShift}px) scale(${cardScale})`,+ translate: `${cardShift}px`,+ scale: `${cardScale}`,}}><UiSnapshotCard@@ -162,7 +163,7 @@ function TitleBlock({display: "inline-block",marginRight: "0.26em",opacity,- transform: `translateY(${y}px)`,+ translate: `0 ${y}px`,}}>{word}@@ -180,7 +181,7 @@ function TitleBlock({borderRadius: 3,background: accent,transformOrigin: "left center",- transform: `scaleX(${underline})`,+ scale: `${underline} 1`,}}/></div>@@ -217,7 +218,7 @@ function BulletLine({letterSpacing: "-0.01em",color,opacity,- transform: `translateY(${y}px)`,+ translate: `0 ${y}px`,}}>{bullet}diff --git a/registry/remocn/a1-product-demo/foundation.tsx b/registry/remocn/a1-product-demo/foundation.tsxindex 80b8205e..64f3ce8b 100644--- a/registry/remocn/a1-product-demo/foundation.tsx+++ b/registry/remocn/a1-product-demo/foundation.tsx@@ -117,7 +117,8 @@ export function Camera({return (<AbsoluteFillstyle={{- transform: `translate(${x}px, ${y}px) scale(${scale})`,+ translate: `${x}px ${y}px`,+ scale: `${scale}`,transformOrigin: "center",filter: blur > 0.01 ? `blur(${blur}px)` : undefined,willChange: "transform, filter",@@ -150,7 +151,7 @@ const CameraCraneUpPresentation: FC<return (<AbsoluteFillstyle={{- transform: `translateY(${translateY}%)`,+ translate: `0 ${translateY}%`,filter: `blur(${blur}px)`,willChange: "transform, filter",}}@@ -184,7 +185,7 @@ const SpatialPushPresentation: FC<return (<AbsoluteFillstyle={{- transform: `scale(${scale})`,+ scale: `${scale}`,filter: `brightness(${brightness}) blur(${blur}px)`,willChange: "transform, filter",}}diff --git a/registry/remocn/a1-product-demo/index.tsx b/registry/remocn/a1-product-demo/index.tsxindex e87afe93..327b182d 100644--- a/registry/remocn/a1-product-demo/index.tsx+++ b/registry/remocn/a1-product-demo/index.tsx@@ -117,7 +117,7 @@ function SnapshotLine({borderRadius: 6,background: strong ? `${theme.foreground}30` : `${theme.foreground}16`,opacity: p,- transform: `scaleX(${interpolate(p, [0, 1], [0.6, 1])})`,+ scale: `${interpolate(p, [0, 1], [0.6, 1])} 1`,transformOrigin: "left center",}}/>diff --git a/registry/remocn/animated-bar-chart/config.ts b/registry/remocn/animated-bar-chart/config.tsindex dd7e3e62..e1fc73e7 100644--- a/registry/remocn/animated-bar-chart/config.ts+++ b/registry/remocn/animated-bar-chart/config.ts@@ -4,24 +4,31 @@ export const animatedBarChartConfig: ComponentConfig = {componentName: "AnimatedBarChart",importPath: "@/components/remocn/animated-bar-chart",controls: {- barColor: { type: "color", default: "#0ea5e9", label: "Bar color" },+ barColor: {+ type: "color",+ default: "#0ea5e9",+ description: "Bar color",+ },gap: {type: "number",- default: 16,min: 0,max: 80,step: 2,- label: "Gap",+ default: 16,+ description: "Gap",+ hiddenFromList: false,},staggerFrames: {type: "number",- default: 6,min: 0,max: 30,step: 1,- label: "Stagger frames",+ default: 6,+ description: "Stagger frames",+ hiddenFromList: false,},},+ dimensions: { width: 1000, height: 500 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/animated-bar-chart/index.tsx b/registry/remocn/animated-bar-chart/index.tsxindex f1867c27..d7419d37 100644--- a/registry/remocn/animated-bar-chart/index.tsx+++ b/registry/remocn/animated-bar-chart/index.tsx@@ -83,7 +83,7 @@ export function AnimatedBarChart({rx={6}fill={barColor}style={{- transform: `scaleY(${scaleY})`,+ scale: `1 ${scaleY}`,transformOrigin: `${x + barWidth / 2}px ${baseY}px`,transformBox: "fill-box",filter: `drop-shadow(0 4px 16px ${barColor}55)`,diff --git a/registry/remocn/animated-line-chart/config.ts b/registry/remocn/animated-line-chart/config.tsindex 8fa6c8bb..f7e5baa1 100644--- a/registry/remocn/animated-line-chart/config.ts+++ b/registry/remocn/animated-line-chart/config.ts@@ -4,18 +4,32 @@ export const animatedLineChartConfig: ComponentConfig = {componentName: "AnimatedLineChart",importPath: "@/components/remocn/animated-line-chart",controls: {- strokeColor: { type: "color", default: "#22c55e", label: "Stroke color" },+ strokeColor: {+ type: "color",+ default: "#22c55e",+ description: "Stroke color",+ },strokeWidth: {type: "number",- default: 4,min: 1,max: 16,step: 1,- label: "Stroke width",+ default: 4,+ description: "Stroke width",+ hiddenFromList: false,+ },+ gridColor: {+ type: "color",+ default: "#27272a",+ description: "Grid color",+ },+ showDot: {+ type: "boolean",+ default: true,+ description: "Show leading dot",},- gridColor: { type: "color", default: "#27272a", label: "Grid color" },- showDot: { type: "boolean", default: true, label: "Show leading dot" },},+ dimensions: { width: 1000, height: 500 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/ascii-dissolve/config.ts b/registry/remocn/ascii-dissolve/config.tsindex 4bbd26c7..a58da4d2 100644--- a/registry/remocn/ascii-dissolve/config.ts+++ b/registry/remocn/ascii-dissolve/config.ts@@ -5,15 +5,24 @@ export const asciiDissolveConfig: ComponentConfig = {componentName: "asciiDissolve",importPath: "@/components/remocn/ascii-dissolve",controls: {- colorBack: { type: "color", default: "#0d0d10", label: "Background" },- colorFront: { type: "color", default: "#f2f2f2", label: "Glyphs" },+ colorBack: {+ type: "color",+ default: "#0d0d10",+ description: "Background",+ },+ colorFront: {+ type: "color",+ default: "#f2f2f2",+ description: "Glyphs",+ },cellSize: {type: "number",- default: 22,min: 10,max: 36,step: 2,- label: "Cell size",+ default: 22,+ description: "Cell size",+ hiddenFromList: false,},},durationInFrames: 100,diff --git a/registry/remocn/ascii-dissolve/index.tsx b/registry/remocn/ascii-dissolve/index.tsxindex f0d68e6e..8d431646 100644--- a/registry/remocn/ascii-dissolve/index.tsx+++ b/registry/remocn/ascii-dissolve/index.tsx@@ -460,10 +460,10 @@ const AsciiDissolvePresentation: React.FC<? { opacity: interpolate(p, enterWindow, [0, 1], clampOpts) }: {opacity: interpolate(p, enterWindow, [0, 1], clampOpts),- transform: `scale(${interpolate(p, [enterWindow[0], 1], [1.04, 1], {+ scale: `${interpolate(p, [enterWindow[0], 1], [1.04, 1], {...clampOpts,easing: Easing.out(Easing.cubic),- })})`,+ })}`,filter: enterBlur > 0.01 ? `blur(${enterBlur}px)` : undefined,};diff --git a/registry/remocn/ascii-render/config.ts b/registry/remocn/ascii-render/config.tsindex c54e617b..af88a47f 100644--- a/registry/remocn/ascii-render/config.ts+++ b/registry/remocn/ascii-render/config.ts@@ -7,34 +7,36 @@ export const asciiRenderConfig: ComponentConfig = {controls: {glyphSize: {type: "number",- default: 26,min: 10,max: 64,step: 2,- label: "Glyph size",+ default: 26,+ description: "Glyph size",+ hiddenFromList: false,},charset: {- type: "text",+ type: "text-content",default: " .:-=+*#%@",- label: "Charset",+ description: "Charset",},colored: {type: "boolean",default: false,- label: "Source colour",+ description: "Source colour",},ink: {type: "color",default: "#9dff9d",- label: "Ink",+ description: "Ink",},intensity: {type: "number",- default: 1,min: 0,max: 1,step: 0.05,- label: "Intensity",+ default: 1,+ description: "Intensity",+ hiddenFromList: false,},},durationInFrames: 90,diff --git a/registry/remocn/backdrop/config.ts b/registry/remocn/backdrop/config.tsindex 2c4baf55..8985b29c 100644--- a/registry/remocn/backdrop/config.ts+++ b/registry/remocn/backdrop/config.ts@@ -5,42 +5,52 @@ export const backdropConfig: ComponentConfig = {importPath: "@/components/remocn/backdrop",controls: {fillType: {- type: "select",+ type: "enum",default: "gradient",- options: ["color", "gradient", "image"],- label: "Fill type",+ variants: {+ color: {},+ gradient: {},+ image: {},+ },+ description: "Fill type",+ },+ color: {+ type: "color",+ default: "#6366f1",+ description: "Color",},- color: { type: "color", default: "#6366f1", label: "Color" },gradient: {- type: "text",+ type: "text-content",default: "linear-gradient(135deg, #6366f1 0%, #a855f7 100%)",- label: "Gradient (CSS)",+ description: "Gradient (CSS)",},image: {- type: "text",+ type: "text-content",default: "/hero.png",- label: "Image URL",+ description: "Image URL",},padding: {type: "number",- default: 4,min: 0,max: 12,step: 0.5,- label: "Padding",+ default: 4,+ description: "Padding",+ hiddenFromList: false,},radius: {type: "number",- default: 1,min: 0,max: 4,step: 0.25,- label: "Radius",+ default: 1,+ description: "Radius",+ hiddenFromList: false,},shadow: {- type: "text",+ type: "text-content",default: "0 20px 60px rgba(0,0,0,0.4)",- label: "Shadow",+ description: "Shadow",},},durationInFrames: 150,diff --git a/registry/remocn/blur-out-up/config.ts b/registry/remocn/blur-out-up/config.tsindex 1570d0be..0844e0a5 100644--- a/registry/remocn/blur-out-up/config.ts+++ b/registry/remocn/blur-out-up/config.ts@@ -1,40 +1,50 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const blurOutUpConfig: ComponentConfig = {componentName: "BlurOutUp",importPath: "@/components/remocn/blur-out-up",controls: {- text: { type: "text", default: "Clear in, airy out.", label: "Text" },+ text: {+ type: "text-content",+ default: "Clear in, airy out.",+ description: "Text",+ },staggerDelay: {type: "number",- default: 1,min: 0,max: 8,step: 1,- label: "Stagger",+ default: 1,+ description: "Stagger",+ hiddenFromList: false,},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 720, height: 100 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/blur-out-up/index.tsx b/registry/remocn/blur-out-up/index.tsxindex 9457f5c4..3487fdc1 100644--- a/registry/remocn/blur-out-up/index.tsx+++ b/registry/remocn/blur-out-up/index.tsx@@ -121,7 +121,7 @@ export function BlurOutUp({marginRight: "0.25em",transformOrigin: "50% 55%",opacity,- transform: `translateY(${y}px)`,+ translate: `0 ${y}px`,filter: `blur(${blur}px)`,}}>diff --git a/registry/remocn/bottom-up-letters/config.ts b/registry/remocn/bottom-up-letters/config.tsindex 6257a136..afe56257 100644--- a/registry/remocn/bottom-up-letters/config.ts+++ b/registry/remocn/bottom-up-letters/config.ts@@ -1,48 +1,59 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const bottomUpLettersConfig: ComponentConfig = {componentName: "BottomUpLetters",importPath: "@/components/remocn/bottom-up-letters",controls: {- text: { type: "text", default: "Shift", label: "Text" },+ text: {+ type: "text-content",+ default: "Shift",+ description: "Text",+ },staggerDelay: {type: "number",- default: 3,min: 1,max: 12,step: 1,- label: "Stagger",+ default: 3,+ description: "Stagger",+ hiddenFromList: false,},distance: {type: "number",- default: 46,min: 0,max: 120,step: 1,- label: "Distance",+ default: 46,+ description: "Distance",+ hiddenFromList: false,},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 190, height: 100 },durationInFrames: 60,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/bottom-up-letters/index.tsx b/registry/remocn/bottom-up-letters/index.tsxindex 6f74e799..c7708bb3 100644--- a/registry/remocn/bottom-up-letters/index.tsx+++ b/registry/remocn/bottom-up-letters/index.tsx@@ -73,7 +73,7 @@ export function BottomUpLetters({backfaceVisibility: "hidden",transformOrigin: "50% 55%",opacity,- transform: `translateY(${y}px)`,+ translate: `0 ${y}px`,}}>{char}diff --git a/registry/remocn/camera-lens/config.ts b/registry/remocn/camera-lens/config.tsindex 16c1ae45..865faac7 100644--- a/registry/remocn/camera-lens/config.ts+++ b/registry/remocn/camera-lens/config.ts@@ -7,43 +7,48 @@ export const cameraLensConfig: ComponentConfig = {controls: {softness: {type: "number",- default: 0.5,min: 0,max: 2,step: 0.05,- label: "Corner softness",+ default: 0.5,+ description: "Corner softness",+ hiddenFromList: false,},bloom: {type: "number",- default: 0.5,min: 0,max: 2,step: 0.05,- label: "Bloom",+ default: 0.5,+ description: "Bloom",+ hiddenFromList: false,},aberration: {type: "number",- default: 0.5,min: 0,max: 3,step: 0.1,- label: "Aberration",+ default: 0.5,+ description: "Aberration",+ hiddenFromList: false,},vignette: {type: "number",- default: 0.5,min: 0,max: 1.5,step: 0.05,- label: "Vignette",+ default: 0.5,+ description: "Vignette",+ hiddenFromList: false,},distortion: {type: "number",- default: 0.05,min: 0,max: 0.6,step: 0.01,- label: "Distortion",+ default: 0.05,+ description: "Distortion",+ hiddenFromList: false,},},durationInFrames: 90,diff --git a/registry/remocn/caret-wipe/config.ts b/registry/remocn/caret-wipe/config.tsindex 3e929379..d2c1fb21 100644--- a/registry/remocn/caret-wipe/config.ts+++ b/registry/remocn/caret-wipe/config.ts@@ -6,19 +6,27 @@ export const caretWipeConfig: ComponentConfig = {importPath: "@/components/remocn/caret-wipe",controls: {direction: {- type: "select",+ type: "enum",default: "right",- options: ["left", "right"],- label: "Direction",+ variants: {+ left: {},+ right: {},+ },+ description: "Direction",+ },+ caretColor: {+ type: "color",+ default: "#C3E88D",+ description: "Caret",},- caretColor: { type: "color", default: "#C3E88D", label: "Caret" },caretWidth: {type: "number",- default: 3,min: 1,max: 8,step: 1,- label: "Caret width",+ default: 3,+ description: "Caret width",+ hiddenFromList: false,},},durationInFrames: 100,diff --git a/registry/remocn/caret-wipe/index.tsx b/registry/remocn/caret-wipe/index.tsxindex d8c23d0c..a094ad4e 100644--- a/registry/remocn/caret-wipe/index.tsx+++ b/registry/remocn/caret-wipe/index.tsx@@ -74,7 +74,7 @@ const CaretWipePresentation: React.FC<style={{clipPath: keep,WebkitClipPath: keep,- transform: `translateY(${interpolate(p, [0, 1], [0, -6], clampOpts)}px)`,+ translate: `0 ${interpolate(p, [0, 1], [0, -6], clampOpts)}px`,filter: `blur(${interpolate(p, [0.1, 1], [0, 4], clampOpts)}px)`,}}>@@ -105,7 +105,7 @@ const CaretWipePresentation: React.FC<style={{clipPath: reveal,WebkitClipPath: reveal,- transform: `translateY(${interpolate(p, [0, 1], [3, 0], clampOpts)}px)`,+ translate: `0 ${interpolate(p, [0, 1], [3, 0], clampOpts)}px`,filter: `blur(${interpolate(p, [0, 0.8], [2, 0], clampOpts)}px)`,}}>@@ -122,7 +122,7 @@ const CaretWipePresentation: React.FC<top: `${(1 - caretHeight) * 50}%`,height: `${caretHeight * 100}%`,width: caretWidth,- transform: "translateX(-50%)",+ translate: "-50%",background: caretColor,borderRadius: caretWidth,boxShadow: `0 0 18px ${caretColor}, 0 0 6px ${caretColor}`,diff --git a/registry/remocn/chat-gpt/config.ts b/registry/remocn/chat-gpt/config.tsindex 1352e1ba..cf8e7ac9 100644--- a/registry/remocn/chat-gpt/config.ts+++ b/registry/remocn/chat-gpt/config.ts@@ -5,21 +5,25 @@ export const chatGptConfig: ComponentConfig = {importPath: "@/components/remocn/chat-gpt",controls: {greeting: {- type: "text",+ type: "text-content",default: "What's on your mind today?",- label: "Greeting",+ description: "Greeting",},placeholder: {- type: "text",+ type: "text-content",default: "Ask anything",- label: "Placeholder",+ description: "Placeholder",},prompt: {- type: "text",+ type: "text-content",default: "Make a sunset over a calm ocean",- label: "Prompt",+ description: "Prompt",+ },+ accentColor: {+ type: "color",+ default: "#2F6FED",+ description: "Accent",},- accentColor: { type: "color", default: "#2F6FED", label: "Accent" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/chat-gpt/index.tsx b/registry/remocn/chat-gpt/index.tsxindex d55daaf0..e0ba1417 100644--- a/registry/remocn/chat-gpt/index.tsx+++ b/registry/remocn/chat-gpt/index.tsx@@ -325,7 +325,8 @@ export function ChatGpt({top: "50%",width: refW,height: refH,- transform: `translate(-50%, -50%) scale(${stageScale})`,+ translate: "-50% -50%",+ scale: `${stageScale}`,}}><div@@ -340,7 +341,7 @@ export function ChatGpt({fontWeight: 700,color: t.fg,opacity: headingFade.opacity,- transform: `translateY(${headingFade.translateY + intro.translateY * 0.4}px)`,+ translate: `0 ${headingFade.translateY + intro.translateY * 0.4}px`,}}>{greeting}@@ -358,7 +359,8 @@ export function ChatGpt({borderRadius: 32,boxShadow: "0 8px 30px -14px rgba(13,13,13,0.14)",opacity: pillFade.opacity,- transform: `translateY(${pillFade.translateY + intro.translateY * 0.6}px) scale(${intro.scale})`,+ translate: `0 ${pillFade.translateY + intro.translateY * 0.6}px`,+ scale: `${intro.scale}`,transformOrigin: "center top",display: "flex",alignItems: "center",@@ -455,7 +457,7 @@ export function ChatGpt({borderRadius: "100%",background: accentColor,opacity: 1 - morph,- transform: `scale(${1 - 0.1 * morph})`,+ scale: `${1 - 0.1 * morph}`,}}><WaveformIcon size={22} color="#FFFFFF" />@@ -470,7 +472,7 @@ export function ChatGpt({borderRadius: "100%",background: t.sendBg,opacity: morph,- transform: `scale(${0.8 + 0.2 * morph})`,+ scale: `${0.8 + 0.2 * morph}`,}}><ArrowUpIcon size={22} color={t.sendArrow} />@@ -489,7 +491,7 @@ export function ChatGpt({justifyContent: "center",gap: 12,opacity: chipsOpacity,- transform: `translateY(${chipsShift}px)`,+ translate: `0 ${chipsShift}px`,}}><SuggestionChipdiff --git a/registry/remocn/chat-to-preview-layout/config.ts b/registry/remocn/chat-to-preview-layout/config.tsindex 8d3cb9c1..d0f8d128 100644--- a/registry/remocn/chat-to-preview-layout/config.ts+++ b/registry/remocn/chat-to-preview-layout/config.ts@@ -6,19 +6,21 @@ export const chatToPreviewLayoutConfig: ComponentConfig = {controls: {startChatRatio: {type: "number",- default: 0.5,min: 0.1,max: 0.9,step: 0.05,- label: "Start chat ratio",+ default: 0.5,+ description: "Start chat ratio",+ hiddenFromList: false,},endChatRatio: {type: "number",- default: 0.25,min: 0.05,max: 0.9,step: 0.05,- label: "End chat ratio",+ default: 0.25,+ description: "End chat ratio",+ hiddenFromList: false,},},durationInFrames: 120,diff --git a/registry/remocn/chat-to-preview-layout/index.tsx b/registry/remocn/chat-to-preview-layout/index.tsxindex eb14d19b..90ad591c 100644--- a/registry/remocn/chat-to-preview-layout/index.tsx+++ b/registry/remocn/chat-to-preview-layout/index.tsx@@ -252,7 +252,7 @@ export function ChatToPreviewLayout({borderRadius: 16,border: "1px solid rgba(255,255,255,0.08)",opacity: previewOpacity,- transform: `translateX(${previewTx}px)`,+ translate: `${previewTx}px`,}}><divdiff --git a/registry/remocn/check-list/config.ts b/registry/remocn/check-list/config.tsindex 30c25760..7ae2dd85 100644--- a/registry/remocn/check-list/config.ts+++ b/registry/remocn/check-list/config.ts@@ -7,53 +7,67 @@ export const checkListConfig: ComponentConfig = {controls: {fontSize: {type: "number",- default: 40,min: 24,max: 64,step: 2,- label: "Font size",+ default: 40,+ description: "Font size",+ hiddenFromList: false,},itemGap: {type: "number",- default: 18,min: 6,max: 48,step: 3,- label: "Frames between items",+ default: 18,+ description: "Frames between items",+ hiddenFromList: false,},closeGap: {type: "number",- default: 9,min: 3,max: 24,step: 3,- label: "Frames between ticks",+ default: 9,+ description: "Frames between ticks",+ hiddenFromList: false,},perStep: {type: "number",- default: 1.6,min: 0.8,max: 3,step: 0.2,- label: "Letters / pose",+ default: 1.6,+ description: "Letters / pose",+ hiddenFromList: false,},strokeWidth: {type: "number",- default: 3,min: 1,max: 8,step: 1,- label: "Stroke width",+ default: 3,+ description: "Stroke width",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#26242c",+ description: "Label color",+ },+ tickColor: {+ type: "color",+ default: "#6f7f35",+ description: "Tick color",},- color: { type: "color", default: "#26242c", label: "Label color" },- tickColor: { type: "color", default: "#6f7f35", label: "Tick color" },step: {type: "number",- default: 3,min: 1,max: 6,step: 1,- label: "Frames / pose",+ default: 3,+ description: "Frames / pose",+ hiddenFromList: false,},},snippet: checkListExampleCode,diff --git a/registry/remocn/chromatic-wave/config.ts b/registry/remocn/chromatic-wave/config.tsindex b16b17e5..ddc8ff8a 100644--- a/registry/remocn/chromatic-wave/config.ts+++ b/registry/remocn/chromatic-wave/config.ts@@ -4,32 +4,47 @@ export const chromaticWaveConfig: ComponentConfig = {componentName: "ChromaticWave",importPath: "@/components/remocn/chromatic-wave",controls: {- headline: { type: "text", default: "MUSIC", label: "Headline" },- kicker: { type: "text", default: "APPLES", label: "Kicker" },- fill: { type: "color", default: "#ffffff", label: "Fill" },+ headline: {+ type: "text-content",+ default: "MUSIC",+ description: "Headline",+ },+ kicker: {+ type: "text-content",+ default: "APPLES",+ description: "Kicker",+ },+ fill: {+ type: "color",+ default: "#ffffff",+ description: "Fill",+ },waveHeight: {type: "number",- default: 28,min: 0,max: 40,step: 1,- label: "Wave height",+ default: 28,+ description: "Wave height",+ hiddenFromList: false,},maxDisplacementPx: {type: "number",- default: 39,min: 0,max: 60,step: 1,- label: "Displacement (px)",+ default: 39,+ description: "Displacement (px)",+ hiddenFromList: false,},turbulentAmount: {type: "number",- default: 130,min: 0,max: 200,step: 2,- label: "Turbulence",+ default: 130,+ description: "Turbulence",+ hiddenFromList: false,},},durationInFrames: 100,diff --git a/registry/remocn/claude-chat/config.ts b/registry/remocn/claude-chat/config.tsindex 15491119..eb45459c 100644--- a/registry/remocn/claude-chat/config.ts+++ b/registry/remocn/claude-chat/config.ts@@ -4,20 +4,36 @@ export const claudeChatConfig: ComponentConfig = {componentName: "ClaudeChat",importPath: "@/components/remocn/claude-chat",controls: {- greeting: { type: "text", default: "Back at it, Dima", label: "Greeting" },+ greeting: {+ type: "text-content",+ default: "Back at it, Dima",+ description: "Greeting",+ },placeholder: {- type: "text",+ type: "text-content",default: "Try: draft an email · summarize a doc · plan your week",- label: "Placeholder",+ description: "Placeholder",},prompt: {- type: "text",+ type: "text-content",default: "Draft a launch tweet for our new release",- label: "Prompt",+ description: "Prompt",+ },+ modelName: {+ type: "text-content",+ default: "Opus 4.8",+ description: "Model",+ },+ modelTier: {+ type: "text-content",+ default: "Max",+ description: "Tier",+ },+ accentColor: {+ type: "color",+ default: "#D97757",+ description: "Accent",},- modelName: { type: "text", default: "Opus 4.8", label: "Model" },- modelTier: { type: "text", default: "Max", label: "Tier" },- accentColor: { type: "color", default: "#D97757", label: "Accent" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/claude-chat/index.tsx b/registry/remocn/claude-chat/index.tsxindex 67c25773..5519273d 100644--- a/registry/remocn/claude-chat/index.tsx+++ b/registry/remocn/claude-chat/index.tsx@@ -261,7 +261,8 @@ export function ClaudeChat({top: "50%",width: refW,height: refH,- transform: `translate(-50%, -50%) scale(${stageScale})`,+ translate: "-50% -50%",+ scale: `${stageScale}`,}}><div@@ -275,7 +276,8 @@ export function ClaudeChat({borderRadius: 24,boxShadow: "0 8px 30px -12px rgba(31,30,29,0.12)",opacity: cardFade.opacity,- transform: `translateY(${cardFade.translateY + intro.translateY}px) scale(${intro.scale})`,+ translate: `0 ${cardFade.translateY + intro.translateY}px`,+ scale: `${intro.scale}`,transformOrigin: "center top",}}>@@ -302,7 +304,7 @@ export function ClaudeChat({marginLeft={1}style={{verticalAlign: "text-bottom",- transform: "translateY(3px)",+ translate: "0 3px",}}/></span>@@ -323,7 +325,7 @@ export function ClaudeChat({marginLeft={1}style={{verticalAlign: "text-bottom",- transform: "translateY(3px)",+ translate: "0 3px",}}/><span style={{ marginLeft: 2 }}>{placeholder}</span>@@ -402,7 +404,7 @@ export function ClaudeChat({borderRadius: "100%",border: `1px solid ${t.iconBtnBorder}`,opacity: 1 - morph,- transform: `scale(${1 - 0.1 * morph})`,+ scale: `${1 - 0.1 * morph}`,}}><WaveformIcon size={22} color={t.fg} />@@ -417,7 +419,7 @@ export function ClaudeChat({borderRadius: 10,background: accentColor,opacity: morph,- transform: `scale(${0.8 + 0.2 * morph})`,+ scale: `${0.8 + 0.2 * morph}`,}}><SendIcon size={22} />diff --git a/registry/remocn/claude-code/config.ts b/registry/remocn/claude-code/config.tsindex b37acdc2..d2d7d8ef 100644--- a/registry/remocn/claude-code/config.ts+++ b/registry/remocn/claude-code/config.ts@@ -4,21 +4,41 @@ export const claudeCodeConfig: ComponentConfig = {componentName: "ClaudeCode",importPath: "@/components/remocn/claude-code",controls: {- title: { type: "text", default: "Claude Code v2.0.0", label: "Title" },- userName: { type: "text", default: "Remocn", label: "User name" },- model: { type: "text", default: "Opus 4.8 • Max 20x", label: "Model" },- cwd: { type: "text", default: "/users/remocn/code/apps", label: "Cwd" },+ title: {+ type: "text-content",+ default: "Claude Code v2.0.0",+ description: "Title",+ },+ userName: {+ type: "text-content",+ default: "Remocn",+ description: "User name",+ },+ model: {+ type: "text-content",+ default: "Opus 4.8 • Max 20x",+ description: "Model",+ },+ cwd: {+ type: "text-content",+ default: "/users/remocn/code/apps",+ description: "Cwd",+ },placeholder: {- type: "text",+ type: "text-content",default: 'Try "edit <filepath> to ..."',- label: "Placeholder",+ description: "Placeholder",},prompt: {- type: "text",+ type: "text-content",default: "edit src/theme.ts to add a dark mode toggle",- label: "Prompt",+ description: "Prompt",+ },+ accentColor: {+ type: "color",+ default: "#D97757",+ description: "Accent",},- accentColor: { type: "color", default: "#D97757", label: "Accent" },},durationInFrames: 160,fps: FPS,diff --git a/registry/remocn/claude-code/index.tsx b/registry/remocn/claude-code/index.tsxindex 84999855..b3bb2277 100644--- a/registry/remocn/claude-code/index.tsx+++ b/registry/remocn/claude-code/index.tsx@@ -159,7 +159,8 @@ export function ClaudeCode({top: "50%",width: refW,height: refH,- transform: `translate(-50%, -50%) scale(${stageScale})`,+ translate: "-50% -50%",+ scale: `${stageScale}`,}}><div@@ -174,7 +175,8 @@ export function ClaudeCode({overflow: "hidden",boxShadow: "0 24px 60px -20px rgba(0,0,0,0.6)",opacity: intro.scale,- transform: `translateY(${intro.translateY}px) scale(${intro.scale})`,+ translate: `0 ${intro.translateY}px`,+ scale: `${intro.scale}`,transformOrigin: "center top",display: "flex",flexDirection: "column",@@ -235,7 +237,7 @@ export function ClaudeCode({borderRadius: 6,padding: "28px 24px 24px",opacity: leftFade.opacity,- transform: `translateY(${leftFade.translateY}px)`,+ translate: `0 ${leftFade.translateY}px`,}}><span@@ -315,7 +317,7 @@ export function ClaudeCode({display: "flex",flexDirection: "column",opacity: rightFade.opacity,- transform: `translateY(${rightFade.translateY}px)`,+ translate: `0 ${rightFade.translateY}px`,}}><div>@@ -369,7 +371,7 @@ export function ClaudeCode({<divstyle={{opacity: promptFade.opacity,- transform: `translateY(${promptFade.translateY}px)`,+ translate: `0 ${promptFade.translateY}px`,}}><divdiff --git a/registry/remocn/confetti/config.ts b/registry/remocn/confetti/config.tsindex 447a7919..06ddbfc4 100644--- a/registry/remocn/confetti/config.ts+++ b/registry/remocn/confetti/config.ts@@ -6,43 +6,47 @@ export const confettiConfig: ComponentConfig = {controls: {particleCount: {type: "number",- default: 140,min: 10,max: 400,step: 10,- label: "Particles",+ default: 140,+ description: "Particles",+ hiddenFromList: false,},power: {type: "number",- default: 17,min: 4,max: 40,step: 1,- label: "Power",+ default: 17,+ description: "Power",+ hiddenFromList: false,},gravity: {type: "number",- default: 0.45,min: 0,max: 1.5,step: 0.05,- label: "Gravity",+ default: 0.45,+ description: "Gravity",+ hiddenFromList: false,},size: {type: "number",- default: 13,min: 4,max: 30,step: 1,- label: "Size",+ default: 13,+ description: "Size",+ hiddenFromList: false,},seed: {- type: "number-input",- default: 1,+ type: "number",min: 1,- max: 9999,step: 1,- label: "Seed",+ default: 1,+ description: "Seed",+ hiddenFromList: false,},},durationInFrames: 90,diff --git a/registry/remocn/confetti/index.tsx b/registry/remocn/confetti/index.tsxindex 5df508f8..3ba6ba24 100644--- a/registry/remocn/confetti/index.tsx+++ b/registry/remocn/confetti/index.tsx@@ -154,7 +154,9 @@ export function Confetti({borderRadius: 2,background: p.color,opacity,- transform: `translate(-50%, -50%) rotate(${rot}rad) scaleX(${flutter})`,+ translate: "-50% -50%",+ rotate: `${rot}rad`,+ scale: `${flutter} 1`,}}/>);diff --git a/registry/remocn/crt-screen/config.ts b/registry/remocn/crt-screen/config.tsindex 8819fac5..4d25228c 100644--- a/registry/remocn/crt-screen/config.ts+++ b/registry/remocn/crt-screen/config.ts@@ -7,35 +7,39 @@ export const crtScreenConfig: ComponentConfig = {controls: {curvature: {type: "number",- default: 1,min: 0,max: 2,step: 0.05,- label: "Curvature",+ default: 1,+ description: "Curvature",+ hiddenFromList: false,},scanlines: {type: "number",- default: 1,min: 0,max: 1.5,step: 0.05,- label: "Scanlines",+ default: 1,+ description: "Scanlines",+ hiddenFromList: false,},maskScale: {type: "number",- default: 2,min: 1,max: 6,step: 1,- label: "Mask pitch",+ default: 2,+ description: "Mask pitch",+ hiddenFromList: false,},vignette: {type: "number",- default: 1,min: 0,max: 1.5,step: 0.05,- label: "Vignette",+ default: 1,+ description: "Vignette",+ hiddenFromList: false,},},durationInFrames: 90,diff --git a/registry/remocn/crumple-toss/config.ts b/registry/remocn/crumple-toss/config.tsindex dc9e2856..6c39de18 100644--- a/registry/remocn/crumple-toss/config.ts+++ b/registry/remocn/crumple-toss/config.ts@@ -7,92 +7,107 @@ export const crumpleTossConfig: ComponentConfig = {controls: {at: {type: "number",- default: 6,min: 0,max: 24,step: 3,- label: "Crumple starts",+ default: 6,+ description: "Crumple starts",+ hiddenFromList: false,},crumpleSteps: {type: "number",- default: 4,min: 2,max: 8,step: 1,- label: "Crush poses",+ default: 4,+ description: "Crush poses",+ hiddenFromList: false,},tossSteps: {type: "number",- default: 5,min: 2,max: 10,step: 1,- label: "Flight poses",+ default: 5,+ description: "Flight poses",+ hiddenFromList: false,},direction: {type: "number",- default: -35,min: -180,max: 180,step: 5,- label: "Throw angle",+ default: -35,+ description: "Throw angle",+ hiddenFromList: false,},distance: {type: "number",- default: 440,min: 200,max: 1600,step: 20,- label: "Arc scale",+ default: 440,+ description: "Arc scale",+ hiddenFromList: false,},spin: {type: "number",- default: 220,min: 0,max: 720,step: 10,- label: "Tumble",+ default: 220,+ description: "Tumble",+ hiddenFromList: false,},segments: {type: "number",- default: 9,min: 5,max: 14,step: 1,- label: "Paper segments",+ default: 9,+ description: "Paper segments",+ hiddenFromList: false,},layers: {type: "number",- default: 2,min: 1,max: 3,step: 1,- label: "Fold layers",+ default: 2,+ description: "Fold layers",+ hiddenFromList: false,},randomness: {type: "number",- default: 0.6,min: 0,max: 1,step: 0.05,- label: "Fold randomness",+ default: 0.6,+ description: "Fold randomness",+ hiddenFromList: false,},crushTo: {type: "number",- default: 0.34,min: 0.15,max: 0.7,step: 0.01,- label: "Wad size",+ default: 0.34,+ description: "Wad size",+ hiddenFromList: false,+ },+ seed: {+ type: "text-content",+ default: "toss",+ description: "Seed",},- seed: { type: "text", default: "toss", label: "Seed" },step: {type: "number",- default: 3,min: 1,max: 6,step: 1,- label: "Frames / pose",+ default: 3,+ description: "Frames / pose",+ hiddenFromList: false,},},snippet: crumpleTossExampleCode,diff --git a/registry/remocn/crumple-toss/index.tsx b/registry/remocn/crumple-toss/index.tsxindex 20ef02ac..503920f2 100644--- a/registry/remocn/crumple-toss/index.tsx+++ b/registry/remocn/crumple-toss/index.tsx@@ -332,7 +332,9 @@ export function CrumpleToss({height,transformOrigin: "center",opacity: pose.opacity,- transform: `translate(${pose.x}px, ${pose.y}px) rotate(${pose.rotate}deg) scale(${pose.scale})`,+ translate: `${pose.x}px ${pose.y}px`,+ rotate: `${pose.rotate}deg`,+ scale: `${pose.scale}`,}}>{pieces.map((piece, i) => (@@ -343,7 +345,9 @@ export function CrumpleToss({inset: 0,clipPath: `polygon(${piece.clip.map(([x, y]) => `${x}% ${y}%`).join(", ")})`,transformOrigin: `${piece.origin[0]}% ${piece.origin[1]}%`,- transform: `translate(${piece.dx * c}px, ${piece.dy * c}px) rotate(${piece.rotate * c}deg) scale(${1 + (piece.scale - 1) * c})`,+ translate: `${piece.dx * c}px ${piece.dy * c}px`,+ rotate: `${piece.rotate * c}deg`,+ scale: `${1 + (piece.scale - 1) * c}`,filter:c > 0? `drop-shadow(0 0 ${0.6 * c}px rgba(38,36,44,0.55))`diff --git a/registry/remocn/displacement/config.ts b/registry/remocn/displacement/config.tsindex 0b4353de..78e03dc1 100644--- a/registry/remocn/displacement/config.ts+++ b/registry/remocn/displacement/config.ts@@ -7,51 +7,57 @@ export const displacementConfig: ComponentConfig = {controls: {grid: {type: "number",- default: 60,min: 4,max: 100,step: 2,- label: "Grid",+ default: 60,+ description: "Grid",+ hiddenFromList: false,},cellAspect: {type: "number",- default: 1,min: 0.25,max: 4,step: 0.25,- label: "Cell aspect",+ default: 1,+ description: "Cell aspect",+ hiddenFromList: false,},shift: {type: "number",- default: 1,min: 0,max: 4,step: 0.1,- label: "Shift",+ default: 1,+ description: "Shift",+ hiddenFromList: false,},aberration: {type: "number",- default: 1,min: 0,max: 3,step: 0.1,- label: "Aberration",+ default: 1,+ description: "Aberration",+ hiddenFromList: false,},grain: {type: "number",- default: 0.5,min: 0,max: 1,step: 0.05,- label: "Grain",+ default: 0.5,+ description: "Grain",+ hiddenFromList: false,},stagger: {type: "number",- default: 0.45,min: 0,max: 0.85,step: 0.05,- label: "Stagger",+ default: 0.45,+ description: "Stagger",+ hiddenFromList: false,},},durationInFrames: 72,diff --git a/registry/remocn/displacement/index.tsx b/registry/remocn/displacement/index.tsxindex fcef7e50..e9f8dd21 100644--- a/registry/remocn/displacement/index.tsx+++ b/registry/remocn/displacement/index.tsx@@ -135,7 +135,7 @@ const DisplacementFallback: React.FC<<AbsoluteFillstyle={{opacity: settle,- transform: `translateX(${entering ? jolt : -jolt}px)`,+ translate: `${entering ? jolt : -jolt}px`,}}>{children}diff --git a/registry/remocn/dither-dissolve/config.ts b/registry/remocn/dither-dissolve/config.tsindex 9d8dac31..261a62ba 100644--- a/registry/remocn/dither-dissolve/config.ts+++ b/registry/remocn/dither-dissolve/config.ts@@ -6,13 +6,29 @@ export const ditherDissolveConfig: ComponentConfig = {importPath: "@/components/remocn/dither-dissolve",controls: {shape: {- type: "select",+ type: "enum",default: "simplex",- options: ["simplex", "warp", "dots", "wave", "ripple", "swirl", "sphere"],- label: "Shape",+ variants: {+ simplex: {},+ warp: {},+ dots: {},+ wave: {},+ ripple: {},+ swirl: {},+ sphere: {},+ },+ description: "Shape",+ },+ colorBack: {+ type: "color",+ default: "#141318",+ description: "Background",+ },+ colorFront: {+ type: "color",+ default: "#8f88ae",+ description: "Ink",},- colorBack: { type: "color", default: "#141318", label: "Background" },- colorFront: { type: "color", default: "#8f88ae", label: "Ink" },},durationInFrames: 100,fps: FPS,diff --git a/registry/remocn/drift/config.ts b/registry/remocn/drift/config.tsindex 743adfba..2f6afcb3 100644--- a/registry/remocn/drift/config.ts+++ b/registry/remocn/drift/config.ts@@ -7,11 +7,12 @@ export const driftConfig: ComponentConfig = {controls: {grow: {type: "number",- default: 0.035,min: -0.1,max: 0.15,step: 0.005,- label: "Grow",+ default: 0.035,+ description: "Grow",+ hiddenFromList: false,},},durationInFrames: 90,diff --git a/registry/remocn/drift/index.tsx b/registry/remocn/drift/index.tsxindex 58aa7828..f1be8a7d 100644--- a/registry/remocn/drift/index.tsx+++ b/registry/remocn/drift/index.tsx@@ -17,9 +17,5 @@ export function Drift({ children, grow = 0.035 }: DriftProps) {const frame = useCurrentFrame();const { durationInFrames } = useVideoConfig();const scale = interpolate(frame, [0, durationInFrames], [1, 1 + grow]);- return (- <AbsoluteFill style={{ transform: `scale(${scale})` }}>- {children}- </AbsoluteFill>- );+ return <AbsoluteFill style={{ scale: `${scale}` }}>{children}</AbsoluteFill>;}diff --git a/registry/remocn/ecosystem-constellation/config.ts b/registry/remocn/ecosystem-constellation/config.tsindex feac4703..79fd9bcf 100644--- a/registry/remocn/ecosystem-constellation/config.ts+++ b/registry/remocn/ecosystem-constellation/config.ts@@ -6,21 +6,22 @@ export const ecosystemConstellationConfig: ComponentConfig = {controls: {satelliteCount: {type: "number",- default: 6,min: 3,max: 8,step: 1,- label: "Satellite count",+ default: 6,+ description: "Satellite count",+ hiddenFromList: false,},centerLabel: {- type: "text",+ type: "text-content",default: "V",- label: "Center label",+ description: "Center label",},accentColor: {type: "color",default: "#a855f7",- label: "Accent color",+ description: "Accent color",},},durationInFrames: 240,diff --git a/registry/remocn/ecosystem-constellation/index.tsx b/registry/remocn/ecosystem-constellation/index.tsxindex e7090997..8f9ea275 100644--- a/registry/remocn/ecosystem-constellation/index.tsx+++ b/registry/remocn/ecosystem-constellation/index.tsx@@ -282,7 +282,7 @@ export function EcosystemConstellation({fontWeight: 800,fontSize: 52,letterSpacing: "-0.05em",- transform: `scale(${centerScale})`,+ scale: `${centerScale}`,boxShadow: `0 0 60px ${accentColor}66, inset 0 1px 0 rgba(255,255,255,0.3)`,border: "1px solid rgba(255,255,255,0.15)",}}@@ -309,7 +309,7 @@ export function EcosystemConstellation({display: "flex",alignItems: "center",justifyContent: "center",- transform: `scale(${s.satScale})`,+ scale: `${s.satScale}`,boxShadow: `0 8px 30px ${s.color}66, inset 0 1px 0 rgba(255,255,255,0.18)`,border: "1px solid rgba(255,255,255,0.12)",opacity: s.visible ? 1 : 0,diff --git a/registry/remocn/ember-burn/config.ts b/registry/remocn/ember-burn/config.tsindex 65e6bcf4..17f0a53f 100644--- a/registry/remocn/ember-burn/config.ts+++ b/registry/remocn/ember-burn/config.ts@@ -7,44 +7,53 @@ export const emberBurnConfig: ComponentConfig = {controls: {patches: {type: "number",- default: 5,min: 2,max: 16,step: 1,- label: "Patches",+ default: 5,+ description: "Patches",+ hiddenFromList: false,},edgeSoftness: {type: "number",- default: 0.07,min: 0.005,max: 0.2,step: 0.005,- label: "Edge softness",+ default: 0.07,+ description: "Edge softness",+ hiddenFromList: false,},contentBias: {type: "number",- default: 0.6,min: 0,max: 1,step: 0.05,- label: "Eats bright first",+ default: 0.6,+ description: "Eats bright first",+ hiddenFromList: false,},heat: {type: "number",- default: 0.5,min: 0,max: 1.5,step: 0.05,- label: "Heat distortion",+ default: 0.5,+ description: "Heat distortion",+ hiddenFromList: false,+ },+ glowColor: {+ type: "color",+ default: "#ff7a2f",+ description: "Glow",},- glowColor: { type: "color", default: "#ff7a2f", label: "Glow" },emberAmount: {type: "number",- default: 0.5,min: 0,max: 1,step: 0.05,- label: "Embers",+ default: 0.5,+ description: "Embers",+ hiddenFromList: false,},},durationInFrames: 80,diff --git a/registry/remocn/extrude-pop/config.ts b/registry/remocn/extrude-pop/config.tsindex 618e5e9d..bacce4b2 100644--- a/registry/remocn/extrude-pop/config.ts+++ b/registry/remocn/extrude-pop/config.ts@@ -4,32 +4,47 @@ export const extrudePopConfig: ComponentConfig = {componentName: "ExtrudePop",importPath: "@/components/remocn/extrude-pop",controls: {- letter: { type: "text", default: "WIN", label: "Text" },- bodyColor: { type: "color", default: "#e8192b", label: "Body color" },- faceColor: { type: "color", default: "#ffffff", label: "Face color" },+ letter: {+ type: "text-content",+ default: "WIN",+ description: "Text",+ },+ bodyColor: {+ type: "color",+ default: "#e8192b",+ description: "Body color",+ },+ faceColor: {+ type: "color",+ default: "#ffffff",+ description: "Face color",+ },minimaxRadius: {type: "number",- default: 80,min: 0,max: 200,step: 5,- label: "Extrude radius",+ default: 80,+ description: "Extrude radius",+ hiddenFromList: false,},extrudeAngleDeg: {type: "number",- default: -58.6,min: -180,max: 180,step: 1,- label: "Extrude angle",+ default: -58.6,+ description: "Extrude angle",+ hiddenFromList: false,},extrudeEndFrame: {type: "number",- default: 48,min: 10,max: 90,step: 1,- label: "Extrude ends (frame)",+ default: 48,+ description: "Extrude ends (frame)",+ hiddenFromList: false,},},durationInFrames: 90,diff --git a/registry/remocn/fade-through/config.ts b/registry/remocn/fade-through/config.tsindex 08463cbe..41aedd32 100644--- a/registry/remocn/fade-through/config.ts+++ b/registry/remocn/fade-through/config.ts@@ -1,41 +1,46 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const fadeThroughConfig: ComponentConfig = {componentName: "FadeThrough",importPath: "@/components/remocn/fade-through",controls: {fromText: {- type: "text",+ type: "text-content",default: "Calm transitions.",- label: "From text",+ description: "From text",},toText: {- type: "text",+ type: "text-content",default: "Fade through content.",- label: "To text",+ description: "To text",},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 640, height: 100 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/fade-through/index.tsx b/registry/remocn/fade-through/index.tsxindex acdf5946..27f3dd6f 100644--- a/registry/remocn/fade-through/index.tsx+++ b/registry/remocn/fade-through/index.tsx@@ -98,7 +98,7 @@ export function FadeThrough({display: "inline-block",transformOrigin: "50% 50%",opacity: fromOpacity,- transform: `translateY(${fromY}px)`,+ translate: `0 ${fromY}px`,}}>{fromText}@@ -124,7 +124,8 @@ export function FadeThrough({display: "inline-block",transformOrigin: "50% 50%",opacity: toOpacity,- transform: `translateY(${toY}px) scale(${toScale})`,+ translate: `0 ${toY}px`,+ scale: `${toScale}`,filter: `blur(${blurVal}px)`,}}>diff --git a/registry/remocn/focus-blur-resolve/config.ts b/registry/remocn/focus-blur-resolve/config.tsindex 0c7fecc8..7a89eed8 100644--- a/registry/remocn/focus-blur-resolve/config.ts+++ b/registry/remocn/focus-blur-resolve/config.ts@@ -1,40 +1,50 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const focusBlurResolveConfig: ComponentConfig = {componentName: "FocusBlurResolve",importPath: "@/components/remocn/focus-blur-resolve",controls: {- text: { type: "text", default: "Focus resolves clearly.", label: "Text" },+ text: {+ type: "text-content",+ default: "Focus resolves clearly.",+ description: "Text",+ },blur: {type: "number",- default: 14,min: 1,max: 30,step: 1,- label: "Blur",+ default: 14,+ description: "Blur",+ hiddenFromList: false,},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 870, height: 100 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/focus-blur-resolve/index.tsx b/registry/remocn/focus-blur-resolve/index.tsxindex 89bc5c4b..ffee523b 100644--- a/registry/remocn/focus-blur-resolve/index.tsx+++ b/registry/remocn/focus-blur-resolve/index.tsx@@ -102,7 +102,8 @@ export function FocusBlurResolve({display: "inline-block",transformOrigin: "50% 50%",opacity,- transform: `translateY(${y}px) scale(${scale})`,+ translate: `0 ${y}px`,+ scale: `${scale}`,filter: `blur(${blurVal}px)`,}}>diff --git a/registry/remocn/focus-pull/config.ts b/registry/remocn/focus-pull/config.tsindex b6bc50e8..93909c3a 100644--- a/registry/remocn/focus-pull/config.ts+++ b/registry/remocn/focus-pull/config.ts@@ -7,11 +7,12 @@ export const focusPullConfig: ComponentConfig = {controls: {blur: {type: "number",- default: 16,min: 4,max: 32,step: 1,- label: "Blur",+ default: 16,+ description: "Blur",+ hiddenFromList: false,},},durationInFrames: 114,diff --git a/registry/remocn/focus-pull/index.tsx b/registry/remocn/focus-pull/index.tsxindex cb220e9e..ec8d413d 100644--- a/registry/remocn/focus-pull/index.tsx+++ b/registry/remocn/focus-pull/index.tsx@@ -34,10 +34,10 @@ const FocusPullPresentation: React.FC<...clampOpts,easing: Easing.bezier(0.42, 0, 0.58, 1),}),- transform: `scale(${interpolate(p, [0, 0.6], [1, 1.05], {+ scale: `${interpolate(p, [0, 0.6], [1, 1.05], {...clampOpts,easing: Easing.bezier(0.42, 0, 0.58, 1),- })})`,+ })}`,filter: `blur(${interpolate(p, [0.05, 0.55], [0, blur], {...clampOpts,easing: Easing.in(Easing.quad),@@ -48,10 +48,10 @@ const FocusPullPresentation: React.FC<const childStyle: React.CSSProperties = {opacity: interpolate(p, [0.32, 0.52], [0, 1], clampOpts),- transform: `scale(${interpolate(p, [0.35, 1], [0.97, 1], {+ scale: `${interpolate(p, [0.35, 1], [0.97, 1], {...clampOpts,easing: Easing.out(Easing.cubic),- })})`,+ })}`,filter: `blur(${interpolate(p, [0.35, 0.9], [blur, 0], {...clampOpts,easing: Easing.out(Easing.quad),diff --git a/registry/remocn/github-sponsors/config.ts b/registry/remocn/github-sponsors/config.tsindex cff28b4a..8037ca22 100644--- a/registry/remocn/github-sponsors/config.ts+++ b/registry/remocn/github-sponsors/config.ts@@ -5,16 +5,23 @@ export const githubSponsorsConfig: ComponentConfig = {importPath: "@/components/remocn/github-sponsors",controls: {account: {- type: "text",+ type: "text-content",default: "remocn",- label: "Account",+ description: "Account",+ },+ accentColor: {+ type: "color",+ default: "#db61a2",+ description: "Accent",},- accentColor: { type: "color", default: "#db61a2", label: "Accent" },theme: {- type: "select",+ type: "enum",default: "light",- options: ["light", "dark"],- label: "Theme",+ variants: {+ light: {},+ dark: {},+ },+ description: "Theme",},},durationInFrames: 270,diff --git a/registry/remocn/github-sponsors/index.tsx b/registry/remocn/github-sponsors/index.tsxindex cf6c4d86..177419e9 100644--- a/registry/remocn/github-sponsors/index.tsx+++ b/registry/remocn/github-sponsors/index.tsx@@ -327,7 +327,7 @@ const SponsorNode = memo(function SponsorNode({position: "absolute",left: cell.x,top: cell.y,- transform: `translate(-50%, -50%) translateY(${y}px)`,+ translate: `-50% calc(-50% + ${y}px)`,opacity: progress,filter: `blur(${blur}px)`,willChange: "transform, opacity, filter",@@ -433,7 +433,8 @@ export function GitHubSponsors({top: "50%",width: REF_W,height: REF_H,- transform: `translate(-50%, -50%) scale(${stageScale})`,+ translate: "-50% -50%",+ scale: `${stageScale}`,}}>{sponsors.map((sponsor, i) => (@@ -457,7 +458,8 @@ export function GitHubSponsors({position: "absolute",left: GRID_CX,top: HEART_START_Y,- transform: `translate(-50%, -50%) translate(0px, ${heartDy}px) scale(${heartScale})`,+ translate: `-50% calc(-50% + ${heartDy}px)`,+ scale: `${heartScale}`,width: heartBase,height: heartBase,display: "flex",@@ -528,7 +530,7 @@ export function GitHubSponsors({><divstyle={{- transform: `translateY(${ctaY}px)`,+ translate: `0 ${ctaY}px`,opacity: ctaProgress,filter: `blur(${ctaBlur}px)`,display: "flex",diff --git a/registry/remocn/github-stars/config.ts b/registry/remocn/github-stars/config.tsindex ebc92d63..87039d61 100644--- a/registry/remocn/github-stars/config.ts+++ b/registry/remocn/github-stars/config.ts@@ -5,33 +5,41 @@ export const githubStarsConfig: ComponentConfig = {importPath: "@/components/remocn/github-stars",controls: {repo: {- type: "text",+ type: "text-content",default: "Remocn/remocn",- label: "Repository",+ description: "Repository",},totalStars: {- type: "number-input",- default: 24813,+ type: "number",min: 0,- max: 500000,step: 1,- label: "Total stars",+ default: 24813,+ description: "Total stars",+ hiddenFromList: false,},orientation: {- type: "select",+ type: "enum",default: "horizontal",- options: ["horizontal", "vertical"],- label: "Orientation",+ variants: {+ horizontal: {},+ vertical: {},+ },+ description: "Orientation",+ },+ accentColor: {+ type: "color",+ default: "#ffbb00",+ description: "Accent",},- accentColor: { type: "color", default: "#ffbb00", label: "Accent" },theme: {- type: "select",+ type: "enum",default: "light",- options: ["light", "dark"],- label: "Theme",+ variants: {+ light: {},+ dark: {},+ },+ description: "Theme",},- // `speed` is appended from SHARED_CONTROLS in registry/__index__.tsx.- // `stargazers` is an array → not a control; preview uses SAMPLE_STARGAZERS.},durationInFrames: 120,fps: FPS,diff --git a/registry/remocn/github-stars/index.tsx b/registry/remocn/github-stars/index.tsxindex 49b9d16f..b0a663c5 100644--- a/registry/remocn/github-stars/index.tsx+++ b/registry/remocn/github-stars/index.tsx@@ -37,7 +37,7 @@ export interface GitHubStarsProps {* (own-your-code: no external data needed after `shadcn add`). Real low-id GitHub* avatar URLs are CORS-ok, so the docs preview shows round photos.*/-export const SAMPLE_STARGAZERS: Stargazer[] = [+const RAW_SAMPLE_STARGAZERS: Stargazer[] = [{login: "mojombo",avatarUrl: "https://avatars.githubusercontent.com/u/1?v=4",@@ -580,6 +580,17 @@ export const SAMPLE_STARGAZERS: Stargazer[] = [},];+export const SAMPLE_STARGAZERS: Stargazer[] = (() => {+ const occurrences = new Map<string, number>();+ return RAW_SAMPLE_STARGAZERS.map((stargazer) => {+ const occurrence = (occurrences.get(stargazer.login) ?? 0) + 1;+ occurrences.set(stargazer.login, occurrence);+ return occurrence === 1+ ? stargazer+ : { ...stargazer, login: `${stargazer.login}-${occurrence}` };+ });+})();+// Load fonts INSIDE the composition (via @remotion/google-fonts, which waits for// the font with delayRender before rendering frames). Server renders run in a// bare headless Chromium with no app CSS / `--font-*` vars, so without this the@@ -1033,7 +1044,7 @@ export function GitHubStars({><divstyle={{- transform: `translateY(${scrollY}px)`,+ translate: `0 ${scrollY}px`,willChange: "transform",}}>@@ -1186,7 +1197,8 @@ export function GitHubStars({top: "50%",width: refW,height: refH,- transform: `translate(-50%, -50%) scale(${stageScale})`,+ translate: "-50% -50%",+ scale: `${stageScale}`,}}>{counterZone}diff --git a/registry/remocn/glass-code-block/config.ts b/registry/remocn/glass-code-block/config.tsindex 98326a91..9cc9f8d7 100644--- a/registry/remocn/glass-code-block/config.ts+++ b/registry/remocn/glass-code-block/config.ts@@ -4,48 +4,56 @@ export const glassCodeBlockConfig: ComponentConfig = {componentName: "GlassCodeBlock",importPath: "@/components/remocn/glass-code-block",controls: {- title: { type: "text", default: "hero.tsx", label: "Title" },+ title: {+ type: "text-content",+ default: "hero.tsx",+ description: "Title",+ },width: {type: "number",- default: 760,min: 300,max: 1100,step: 10,- label: "Width",+ default: 760,+ description: "Width",+ hiddenFromList: false,},height: {type: "number",- default: 460,min: 200,max: 700,step: 10,- label: "Height",+ default: 460,+ description: "Height",+ hiddenFromList: false,},fontSize: {type: "number",- default: 16,min: 10,max: 28,step: 1,- label: "Font size",+ default: 16,+ description: "Font size",+ hiddenFromList: false,},glassColor: {- type: "text",+ type: "text-content",default: "rgba(10, 10, 10, 0.6)",- label: "Glass color",+ description: "Glass color",},staggerFrames: {type: "number",- default: 4,min: 0,max: 30,step: 1,- label: "Stagger frames",+ default: 4,+ description: "Stagger frames",+ hiddenFromList: false,},showTrafficLights: {type: "boolean",default: true,- label: "Traffic lights",+ description: "Traffic lights",},},durationInFrames: 180,diff --git a/registry/remocn/glass-code-block/index.tsx b/registry/remocn/glass-code-block/index.tsxindex a58daf14..64ed3f0a 100644--- a/registry/remocn/glass-code-block/index.tsx+++ b/registry/remocn/glass-code-block/index.tsx@@ -252,7 +252,7 @@ function CodeLine({<divstyle={{opacity,- transform: `translateY(${ty}px)`,+ translate: `0 ${ty}px`,whiteSpace: "pre",display: "flex",gap: 0,diff --git a/registry/remocn/glass-code-walk/config.ts b/registry/remocn/glass-code-walk/config.tsindex 54a8dd86..13d2491b 100644--- a/registry/remocn/glass-code-walk/config.ts+++ b/registry/remocn/glass-code-walk/config.ts@@ -4,46 +4,55 @@ export const glassCodeWalkConfig: ComponentConfig = {componentName: "GlassCodeWalk",importPath: "@/components/remocn/glass-code-walk",controls: {- title: { type: "text", default: "scene.tsx", label: "Title" },+ title: {+ type: "text-content",+ default: "scene.tsx",+ description: "Title",+ },zoom: {type: "number",- default: 2.6,min: 1,max: 4,step: 0.1,- label: "Zoom",+ default: 2.6,+ description: "Zoom",+ hiddenFromList: false,},fontSize: {type: "number",- default: 18,min: 10,max: 28,step: 1,- label: "Font size",+ default: 18,+ description: "Font size",+ hiddenFromList: false,},staggerFrames: {type: "number",- default: 10,min: 1,max: 30,step: 1,- label: "Stagger frames",+ default: 10,+ description: "Stagger frames",+ hiddenFromList: false,},width: {type: "number",- default: 880,min: 300,max: 1100,step: 10,- label: "Width",+ default: 880,+ description: "Width",+ hiddenFromList: false,},height: {type: "number",- default: 420,min: 200,max: 700,step: 10,- label: "Height",+ default: 420,+ description: "Height",+ hiddenFromList: false,},},durationInFrames: 150,diff --git a/registry/remocn/glass-code-walk/index.tsx b/registry/remocn/glass-code-walk/index.tsxindex 35c25904..e0816e89 100644--- a/registry/remocn/glass-code-walk/index.tsx+++ b/registry/remocn/glass-code-walk/index.tsx@@ -110,7 +110,8 @@ export function GlassCodeWalk({top: 0,width: STAGE_WIDTH,height: STAGE_HEIGHT,- transform: `translate(${tx}px, ${ty}px) scale(${scale})`,+ translate: `${tx}px ${ty}px`,+ scale: `${scale}`,transformOrigin: "0 0",}}>diff --git a/registry/remocn/glitch-cut/config.ts b/registry/remocn/glitch-cut/config.tsindex c834a93b..f5ceb4d8 100644--- a/registry/remocn/glitch-cut/config.ts+++ b/registry/remocn/glitch-cut/config.ts@@ -7,35 +7,39 @@ export const glitchCutConfig: ComponentConfig = {controls: {intensity: {type: "number",- default: 1,min: 0,max: 2,step: 0.1,- label: "Intensity",+ default: 1,+ description: "Intensity",+ hiddenFromList: false,},slices: {type: "number",- default: 24,min: 8,max: 64,step: 2,- label: "Slices",+ default: 24,+ description: "Slices",+ hiddenFromList: false,},rgbSplit: {type: "number",- default: 1,min: 0,max: 2,step: 0.1,- label: "RGB split",+ default: 1,+ description: "RGB split",+ hiddenFromList: false,},blockNoise: {type: "number",- default: 0.6,min: 0,max: 1,step: 0.05,- label: "Block noise",+ default: 0.6,+ description: "Block noise",+ hiddenFromList: false,},},durationInFrames: 78,diff --git a/registry/remocn/glitch-cut/index.tsx b/registry/remocn/glitch-cut/index.tsxindex df2bec0b..513928fa 100644--- a/registry/remocn/glitch-cut/index.tsx+++ b/registry/remocn/glitch-cut/index.tsx@@ -162,7 +162,7 @@ const GlitchCutFallback: React.FC<key={band}style={{clipPath: `inset(${band * height}% 0 ${100 - (band + 1) * height}% 0)`,- transform: `translateX(${shift}px)`,+ translate: `${shift}px`,}}>{children}diff --git a/registry/remocn/gooey-morph/config.ts b/registry/remocn/gooey-morph/config.tsindex a3849ced..321ddde6 100644--- a/registry/remocn/gooey-morph/config.ts+++ b/registry/remocn/gooey-morph/config.ts@@ -4,36 +4,47 @@ export const gooeyMorphConfig: ComponentConfig = {componentName: "GooeyMorph",importPath: "@/components/remocn/gooey-morph",controls: {- word: { type: "text", default: "HELLO", label: "Word" },- fill: { type: "color", default: "#f2f2f2", label: "Fill" },+ word: {+ type: "text-content",+ default: "HELLO",+ description: "Word",+ },+ fill: {+ type: "color",+ default: "#f2f2f2",+ description: "Fill",+ },fontFamily: {- type: "text",+ type: "text-content",default: "'Bodoni Moda', Georgia, serif",- label: "Font family",+ description: "Font family",},blurRadius: {type: "number",- default: 6,min: 0,max: 20,step: 1,- label: "Goo blur radius",+ default: 6,+ description: "Goo blur radius",+ hiddenFromList: false,},displaceAmount: {type: "number",- default: 20,min: 0,max: 80,step: 1,- label: "Displace amount",+ default: 20,+ description: "Displace amount",+ hiddenFromList: false,},barTravelFrames: {type: "number",- default: 30,min: 10,max: 60,step: 1,- label: "Bar travel (frames)",+ default: 30,+ description: "Bar travel (frames)",+ hiddenFromList: false,},},durationInFrames: 120,diff --git a/registry/remocn/grain-dissolve/config.ts b/registry/remocn/grain-dissolve/config.tsindex b0220ecc..8811e566 100644--- a/registry/remocn/grain-dissolve/config.ts+++ b/registry/remocn/grain-dissolve/config.ts@@ -6,36 +6,42 @@ export const grainDissolveConfig: ComponentConfig = {importPath: "@/components/remocn/grain-dissolve",controls: {shape: {- type: "select",+ type: "enum",default: "blob",- options: [- "wave",- "dots",- "truchet",- "corners",- "ripple",- "blob",- "sphere",- ],- label: "Shape",+ variants: {+ wave: {},+ dots: {},+ truchet: {},+ corners: {},+ ripple: {},+ blob: {},+ sphere: {},+ },+ description: "Shape",},noise: {type: "number",- default: 0.3,min: 0,max: 1,step: 0.05,- label: "Noise",+ default: 0.3,+ description: "Noise",+ hiddenFromList: false,},zoom: {type: "number",- default: 2,min: 0.5,max: 4,step: 0.25,- label: "Zoom",+ default: 2,+ description: "Zoom",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#141318",+ description: "Background",},- colorBack: { type: "color", default: "#141318", label: "Background" },},durationInFrames: 116,fps: FPS,diff --git a/registry/remocn/grain-dissolve/index.tsx b/registry/remocn/grain-dissolve/index.tsxindex 90c8d423..8b059fba 100644--- a/registry/remocn/grain-dissolve/index.tsx+++ b/registry/remocn/grain-dissolve/index.tsx@@ -70,7 +70,7 @@ const GrainDissolvePresentation: React.FC<const childStyle: React.CSSProperties = {opacity: interpolate(p, [0.7, 0.86], [0, 1], clampOpts),- transform: `scale(${interpolate(p, [0.7, 1], [1.05, 1], {+ scale: `${interpolate(p, [0.7, 1], [1.05, 1], {...clampOpts,easing: Easing.out(Easing.cubic),})})`,diff --git a/registry/remocn/grid-wave/config.ts b/registry/remocn/grid-wave/config.tsindex 90a153f9..3ef0a43f 100644--- a/registry/remocn/grid-wave/config.ts+++ b/registry/remocn/grid-wave/config.ts@@ -7,42 +7,56 @@ export const gridWaveConfig: ComponentConfig = {controls: {tileSize: {type: "number",- default: 90,min: 30,max: 260,step: 10,- label: "Tile size",+ default: 90,+ description: "Tile size",+ hiddenFromList: false,},waveWidth: {type: "number",- default: 0.16,min: 0.04,max: 0.5,step: 0.02,- label: "Wave width",+ default: 0.16,+ description: "Wave width",+ hiddenFromList: false,},lift: {type: "number",- default: 2,min: 0,max: 4,step: 0.1,- label: "Lift",+ default: 2,+ description: "Lift",+ hiddenFromList: false,},gap: {type: "number",- default: 0.12,min: 0,max: 0.45,step: 0.01,- label: "Gap",+ default: 0.12,+ description: "Gap",+ hiddenFromList: false,+ },+ tint: {+ type: "color",+ default: "#8fb4ff",+ description: "Tint",},- tint: { type: "color", default: "#8fb4ff", label: "Tint" },direction: {- type: "select",+ type: "enum",default: "ripple",- options: ["ripple", "left", "right", "up", "down"],- label: "Direction",+ variants: {+ ripple: {},+ left: {},+ right: {},+ up: {},+ down: {},+ },+ description: "Direction",},},durationInFrames: 84,diff --git a/registry/remocn/grid-wave/index.tsx b/registry/remocn/grid-wave/index.tsxindex 8789f4bd..f120a064 100644--- a/registry/remocn/grid-wave/index.tsx+++ b/registry/remocn/grid-wave/index.tsx@@ -192,7 +192,7 @@ const GridWaveFallback: React.FC<<AbsoluteFillstyle={{opacity: reveal,- transform: `scale(${1.04 - reveal * 0.04})`,+ scale: `${1.04 - reveal * 0.04}`,}}>{children}diff --git a/registry/remocn/halftone-print/config.ts b/registry/remocn/halftone-print/config.tsindex 1c81d402..9c38338c 100644--- a/registry/remocn/halftone-print/config.ts+++ b/registry/remocn/halftone-print/config.ts@@ -7,32 +7,35 @@ export const halftonePrintConfig: ComponentConfig = {controls: {dotSize: {type: "number",- default: 10,min: 4,max: 32,step: 1,- label: "Dot size",+ default: 10,+ description: "Dot size",+ hiddenFromList: false,},angle: {type: "number",- default: 0,min: 0,max: 90,step: 1,- label: "Screen angle",+ default: 0,+ description: "Screen angle",+ hiddenFromList: false,},misregistration: {type: "number",- default: 1.2,min: 0,max: 6,step: 0.2,- label: "Misregistration",+ default: 1.2,+ description: "Misregistration",+ hiddenFromList: false,},paperTint: {type: "color",default: "#f4efe4",- label: "Paper",+ description: "Paper",},},durationInFrames: 90,diff --git a/registry/remocn/hand-count/config.ts b/registry/remocn/hand-count/config.tsindex 97ec7cf9..129d1524 100644--- a/registry/remocn/hand-count/config.ts+++ b/registry/remocn/hand-count/config.ts@@ -6,61 +6,87 @@ export const handCountConfig: ComponentConfig = {controls: {to: {type: "number",- default: 1284,min: 0,max: 10000,step: 1,- label: "Count to",+ default: 1284,+ description: "Count to",+ hiddenFromList: false,},from: {type: "number",- default: 0,min: 0,max: 1000,step: 1,- label: "Count from",+ default: 0,+ description: "Count from",+ hiddenFromList: false,},durationSteps: {type: "number",- default: 18,min: 2,max: 24,step: 1,- label: "Poses counting",+ default: 18,+ description: "Poses counting",+ hiddenFromList: false,},decimals: {type: "number",- default: 0,min: 0,max: 2,step: 1,- label: "Decimals",+ default: 0,+ description: "Decimals",+ hiddenFromList: false,+ },+ prefix: {+ type: "text-content",+ default: "",+ description: "Prefix",+ },+ suffix: {+ type: "text-content",+ default: "",+ description: "Suffix",},- prefix: { type: "text", default: "", label: "Prefix" },- suffix: { type: "text", default: "", label: "Suffix" },fontSize: {type: "number",- default: 96,min: 32,max: 200,step: 2,- label: "Font size",+ default: 96,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#26242c",+ description: "Color",},- color: { type: "color", default: "#26242c", label: "Color" },ease: {- type: "select",+ type: "enum",default: "in-out",- options: ["in-out", "out", "linear"],- label: "Ease",+ variants: {+ "in-out": {},+ out: {},+ linear: {},+ },+ description: "Ease",+ },+ seed: {+ type: "text-content",+ default: "count",+ description: "Seed",},- seed: { type: "text", default: "count", label: "Seed" },step: {type: "number",- default: 3,min: 1,max: 6,step: 1,- label: "Frames / pose",+ default: 3,+ description: "Frames / pose",+ hiddenFromList: false,},},durationInFrames: 90,diff --git a/registry/remocn/hand-count/index.tsx b/registry/remocn/hand-count/index.tsxindex 35156f17..9e8baeb5 100644--- a/registry/remocn/hand-count/index.tsx+++ b/registry/remocn/hand-count/index.tsx@@ -179,7 +179,8 @@ export function HandCount({style={{display: "inline-block",whiteSpace: "pre",- transform: `translateY(${dy}px) rotate(${rot}deg)`,+ translate: `0 ${dy}px`,+ rotate: `${rot}deg`,}}>{char}diff --git a/registry/remocn/handwrite/config.ts b/registry/remocn/handwrite/config.tsindex 3583c1a6..0ccfc56a 100644--- a/registry/remocn/handwrite/config.ts+++ b/registry/remocn/handwrite/config.ts@@ -1,52 +1,65 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const handwriteConfig: ComponentConfig = {componentName: "Handwrite",importPath: "@/components/remocn/handwrite",controls: {- text: { type: "text", default: "Made by hand", label: "Text" },+ text: {+ type: "text-content",+ default: "Made by hand",+ description: "Text",+ },fontSize: {type: "number",- default: 72,min: 24,max: 120,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,},perStep: {type: "number",- default: 1.6,min: 0.5,max: 4,step: 0.1,- label: "Letters / pose",+ default: 1.6,+ description: "Letters / pose",+ hiddenFromList: false,},weight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",+ },+ color: {+ type: "color",+ default: "#26242c",+ description: "Color",},- color: { type: "color", default: "#26242c", label: "Color" },align: {- type: "select",+ type: "enum",default: "center",- options: ["center", "left"],- label: "Align",+ variants: {+ center: {},+ left: {},+ },+ description: "Align",},step: {type: "number",- default: 3,min: 1,max: 6,step: 1,- label: "Frames / pose",+ default: 3,+ description: "Frames / pose",+ hiddenFromList: false,},},durationInFrames: 120,diff --git a/registry/remocn/handwrite/index.tsx b/registry/remocn/handwrite/index.tsxindex f2fb68fc..479a0176 100644--- a/registry/remocn/handwrite/index.tsx+++ b/registry/remocn/handwrite/index.tsx@@ -73,9 +73,9 @@ export function Handwrite({display: "inline-block",whiteSpace: "pre",opacity: visible ? 1 : 0,- transform: visible- ? `translateY(${dy}px) rotate(${slant}deg) scale(${fresh ? 1.06 : 1})`- : undefined,+ translate: visible ? `0 ${dy}px` : undefined,+ rotate: visible ? `${slant}deg` : undefined,+ scale: visible ? `${fresh ? 1.06 : 1}` : undefined,}}>{char}diff --git a/registry/remocn/hologram/config.ts b/registry/remocn/hologram/config.tsindex 7c5c621e..4703dc2d 100644--- a/registry/remocn/hologram/config.ts+++ b/registry/remocn/hologram/config.ts@@ -8,39 +8,43 @@ export const hologramConfig: ComponentConfig = {tint: {type: "color",default: "#63e8ff",- label: "Tint",+ description: "Tint",},glow: {type: "number",- default: 1,min: 0,max: 3,step: 0.1,- label: "Glow",+ default: 1,+ description: "Glow",+ hiddenFromList: false,},ghost: {type: "number",- default: 1,min: 0,max: 3,step: 0.1,- label: "Ghost",+ default: 1,+ description: "Ghost",+ hiddenFromList: false,},flicker: {type: "number",- default: 1,min: 0,max: 3,step: 0.1,- label: "Flicker",+ default: 1,+ description: "Flicker",+ hiddenFromList: false,},intensity: {type: "number",- default: 1,min: 0,max: 1,step: 0.05,- label: "Intensity",+ default: 1,+ description: "Intensity",+ hiddenFromList: false,},},durationInFrames: 90,diff --git a/registry/remocn/icon-scatter/config.ts b/registry/remocn/icon-scatter/config.tsindex 73241ef3..6a5d4901 100644--- a/registry/remocn/icon-scatter/config.ts+++ b/registry/remocn/icon-scatter/config.ts@@ -7,21 +7,31 @@ export const iconScatterConfig: ComponentConfig = {controls: {count: {type: "number",- default: 15,min: 4,max: 30,step: 1,- label: "Icon count",+ default: 15,+ description: "Icon count",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#fafafa",+ description: "Icons",+ },+ coverColor: {+ type: "color",+ default: "#0a0a0a",+ description: "Cover",},- color: { type: "color", default: "#fafafa", label: "Icons" },- coverColor: { type: "color", default: "#0a0a0a", label: "Cover" },flyDistance: {type: "number",- default: 260,min: 80,max: 500,step: 10,- label: "Fly distance",+ default: 260,+ description: "Fly distance",+ hiddenFromList: false,},},durationInFrames: 100,diff --git a/registry/remocn/icon-scatter/index.tsx b/registry/remocn/icon-scatter/index.tsxindex f9d20a5a..f2c87c70 100644--- a/registry/remocn/icon-scatter/index.tsx+++ b/registry/remocn/icon-scatter/index.tsx@@ -210,7 +210,7 @@ const IconScatterPresentation: React.FC<// The outgoing scene sinks back and blurs as the field rises over it.const exitStyle: React.CSSProperties = {opacity: interpolate(p, [0.28, 0.5], [1, 0], clampOpts),- transform: `scale(${interpolate(p, [0, 0.5], [1, 0.94], {+ scale: `${interpolate(p, [0, 0.5], [1, 0.94], {...clampOpts,easing: Easing.in(Easing.cubic),})})`,@@ -224,7 +224,7 @@ const IconScatterPresentation: React.FC<// The incoming scene resolves once the field starts clearing.const childStyle: React.CSSProperties = {opacity: interpolate(p, [0.5, 0.68], [0, 1], clampOpts),- transform: `scale(${interpolate(p, [0.5, 1], [1.06, 1], {+ scale: `${interpolate(p, [0.5, 1], [1.06, 1], {...clampOpts,easing: Easing.out(Easing.cubic),})})`,diff --git a/registry/remocn/infinite-bento-pan/config.ts b/registry/remocn/infinite-bento-pan/config.tsindex 3d712e6f..89688aef 100644--- a/registry/remocn/infinite-bento-pan/config.ts+++ b/registry/remocn/infinite-bento-pan/config.ts@@ -6,16 +6,17 @@ export const infiniteBentoPanConfig: ComponentConfig = {controls: {panSpeed: {type: "number",- default: 1,min: 0.25,max: 3,step: 0.25,- label: "Pan speed",+ default: 1,+ description: "Pan speed",+ hiddenFromList: false,},accentColor: {type: "color",default: "#7c3aed",- label: "Accent color",+ description: "Accent color",},},durationInFrames: 300,diff --git a/registry/remocn/infinite-bento-pan/index.tsx b/registry/remocn/infinite-bento-pan/index.tsxindex c9922238..566d7d7f 100644--- a/registry/remocn/infinite-bento-pan/index.tsx+++ b/registry/remocn/infinite-bento-pan/index.tsx@@ -460,7 +460,7 @@ export function InfiniteBentoPan({top: 0,width: SUPER_W,height: SUPER_H,- transform: `translate(${-px}px, ${-py}px)`,+ translate: `${-px}px ${-py}px`,willChange: "transform",}}>diff --git a/registry/remocn/infinite-marquee/config.ts b/registry/remocn/infinite-marquee/config.tsindex cb057c63..7e587d85 100644--- a/registry/remocn/infinite-marquee/config.ts+++ b/registry/remocn/infinite-marquee/config.ts@@ -1,41 +1,58 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const infiniteMarqueeConfig: ComponentConfig = {componentName: "InfiniteMarquee",importPath: "@/components/remocn/infinite-marquee",controls: {- text: { type: "text", default: "ship · build · animate · ", label: "Text" },+ text: {+ type: "text-content",+ default: "ship · build · animate · ",+ description: "Text",+ },fontSize: {type: "number",- default: 120,min: 12,max: 240,step: 1,- label: "Font size",+ default: 120,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "700",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},pixelsPerFrame: {type: "number",- default: 4,min: 1,max: 30,step: 1,- label: "Pixels / frame",+ default: 4,+ description: "Pixels / frame",+ hiddenFromList: false,+ },+ stroke: {+ type: "boolean",+ default: false,+ description: "Stroke",+ },+ strokeColor: {+ type: "color",+ default: "#171717",+ description: "Stroke color",},- stroke: { type: "boolean", default: false, label: "Stroke" },- strokeColor: { type: "color", default: "#171717", label: "Stroke color" },},durationInFrames: 180,fps: FPS,diff --git a/registry/remocn/infinite-marquee/index.tsx b/registry/remocn/infinite-marquee/index.tsxindex d46b0b93..b596b514 100644--- a/registry/remocn/infinite-marquee/index.tsx+++ b/registry/remocn/infinite-marquee/index.tsx@@ -56,7 +56,7 @@ export function InfiniteMarquee({style={{display: "flex",whiteSpace: "nowrap",- transform: `translateX(${offset}px)`,+ translate: `${offset}px`,}}><span style={spanStyle}>{text}</span>diff --git a/registry/remocn/ink-arrow/config.ts b/registry/remocn/ink-arrow/config.tsindex 4e725c06..76467497 100644--- a/registry/remocn/ink-arrow/config.ts+++ b/registry/remocn/ink-arrow/config.ts@@ -7,77 +7,94 @@ export const inkArrowConfig: ComponentConfig = {controls: {curvature: {type: "number",- default: 0.35,min: -1,max: 1,step: 0.05,- label: "Curvature",+ default: 0.35,+ description: "Curvature",+ hiddenFromList: false,},strokeWidth: {type: "number",- default: 8,min: 2,max: 24,step: 1,- label: "Brush width",+ default: 8,+ description: "Brush width",+ hiddenFromList: false,},pressure: {type: "number",- default: 0.2,min: 0.05,max: 1,step: 0.05,- label: "Opening pressure",+ default: 0.2,+ description: "Opening pressure",+ hiddenFromList: false,},release: {type: "number",- default: 1,min: 0.05,max: 1,step: 0.05,- label: "Closing pressure",+ default: 1,+ description: "Closing pressure",+ hiddenFromList: false,},grain: {type: "number",- default: 1,min: 0,max: 2,step: 0.1,- label: "Grain",+ default: 1,+ description: "Grain",+ hiddenFromList: false,},headSize: {type: "number",- default: 24,min: 8,max: 48,step: 1,- label: "Head size",+ default: 24,+ description: "Head size",+ hiddenFromList: false,},drawDur: {type: "number",- default: 36,min: 12,max: 90,step: 1,- label: "Draw frames",+ default: 36,+ description: "Draw frames",+ hiddenFromList: false,},headDur: {type: "number",- default: 12,min: 4,max: 48,step: 1,- label: "Head frames",+ default: 12,+ description: "Head frames",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#26242c",+ description: "Ink color",+ },+ seed: {+ type: "text-content",+ default: "arrow",+ description: "Seed",},- color: { type: "color", default: "#26242c", label: "Ink color" },- seed: { type: "text", default: "arrow", label: "Seed" },step: {type: "number",- default: 3,min: 1,max: 6,step: 1,- label: "Frames / pose",+ default: 3,+ description: "Frames / pose",+ hiddenFromList: false,},},snippet: inkArrowExampleCode,diff --git a/registry/remocn/ink-underline/config.ts b/registry/remocn/ink-underline/config.tsindex 884e31f6..6a3f88cb 100644--- a/registry/remocn/ink-underline/config.ts+++ b/registry/remocn/ink-underline/config.ts@@ -7,61 +7,76 @@ export const inkUnderlineConfig: ComponentConfig = {controls: {width: {type: "number",- default: 420,min: 100,max: 800,step: 10,- label: "Width",+ default: 420,+ description: "Width",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#6f7f35",+ description: "Ink color",},- color: { type: "color", default: "#6f7f35", label: "Ink color" },thickness: {type: "number",- default: 9,min: 2,max: 24,step: 1,- label: "Brush width",+ default: 9,+ description: "Brush width",+ hiddenFromList: false,},pressure: {type: "number",- default: 1,min: 0.05,max: 1,step: 0.05,- label: "Opening pressure",+ default: 1,+ description: "Opening pressure",+ hiddenFromList: false,},release: {type: "number",- default: 0.15,min: 0.05,max: 1,step: 0.05,- label: "Closing pressure",+ default: 0.15,+ description: "Closing pressure",+ hiddenFromList: false,},grain: {type: "number",- default: 1,min: 0,max: 2,step: 0.1,- label: "Grain",+ default: 1,+ description: "Grain",+ hiddenFromList: false,},durationSteps: {type: "number",- default: 5,min: 2,max: 10,step: 1,- label: "Poses to draw",+ default: 5,+ description: "Poses to draw",+ hiddenFromList: false,+ },+ seed: {+ type: "text-content",+ default: "ink",+ description: "Seed",},- seed: { type: "text", default: "ink", label: "Seed" },step: {type: "number",- default: 3,min: 1,max: 6,step: 1,- label: "Frames / pose",+ default: 3,+ description: "Frames / pose",+ hiddenFromList: false,},},snippet: inkUnderlineExampleCode,diff --git a/registry/remocn/inline-highlight/config.ts b/registry/remocn/inline-highlight/config.tsindex 636c27fe..e39a0742 100644--- a/registry/remocn/inline-highlight/config.ts+++ b/registry/remocn/inline-highlight/config.ts@@ -1,39 +1,56 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const inlineHighlightConfig: ComponentConfig = {componentName: "InlineHighlight",importPath: "@/components/remocn/inline-highlight",controls: {- before: { type: "text", default: "Ship faster with ", label: "Before" },- highlight: { type: "text", default: "remocn", label: "Highlight" },- after: { type: "text", default: ".", label: "After" },- baseColor: { type: "color", default: "#171717", label: "Base color" },+ before: {+ type: "text-content",+ default: "Ship faster with ",+ description: "Before",+ },+ highlight: {+ type: "text-content",+ default: "remocn",+ description: "Highlight",+ },+ after: {+ type: "text-content",+ default: ".",+ description: "After",+ },+ baseColor: {+ type: "color",+ default: "#171717",+ description: "Base color",+ },highlightColor: {type: "color",default: "#ff5e3a",- label: "Highlight color",+ description: "Highlight color",},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,},fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 640, height: 100 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/kinetic-center-build/config.ts b/registry/remocn/kinetic-center-build/config.tsindex eb8ef5d3..123b9d4f 100644--- a/registry/remocn/kinetic-center-build/config.ts+++ b/registry/remocn/kinetic-center-build/config.ts@@ -1,40 +1,50 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const kineticCenterBuildConfig: ComponentConfig = {componentName: "KineticCenterBuild",importPath: "@/components/remocn/kinetic-center-build",controls: {- text: { type: "text", default: "Words push left.", label: "Text" },+ text: {+ type: "text-content",+ default: "Words push left.",+ description: "Text",+ },entryOffset: {type: "number",- default: 88,min: 20,max: 160,step: 1,- label: "Entry offset",+ default: 88,+ description: "Entry offset",+ hiddenFromList: false,},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 600, height: 100 },durationInFrames: 60,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/kinetic-warp/config.ts b/registry/remocn/kinetic-warp/config.tsindex b6184c85..9a69ccd7 100644--- a/registry/remocn/kinetic-warp/config.ts+++ b/registry/remocn/kinetic-warp/config.ts@@ -1,53 +1,67 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const kineticWarpConfig: ComponentConfig = {componentName: "KineticWarp",importPath: "@/components/remocn/kinetic-warp",controls: {- text: { type: "text", default: "REM\nOCN", label: "Text" },- textColor: { type: "color", default: "#FFFFFF", label: "Color" },- fontFamily: { type: "text", default: "Passion One", label: "Font family" },+ text: {+ type: "text-content",+ default: "REM\nOCN",+ description: "Text",+ },+ textColor: {+ type: "color",+ default: "#FFFFFF",+ description: "Color",+ },+ fontFamily: {+ type: "text-content",+ default: "Passion One",+ description: "Font family",+ },fontUrl: {- type: "text",+ type: "text-content",default:"https://fonts.googleapis.com/css2?family=Passion+One:wght@400;700;900&display=block",- label: "Font URL",+ description: "Font URL",},fontWeight: {- type: "select",+ type: "enum",default: "700",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},fontSize: {type: "number",- default: 107.1,min: 40,max: 200,step: 0.1,- label: "Font size",+ default: 107.1,+ description: "Font size",+ hiddenFromList: false,},layerScale: {type: "number",- default: 480,min: 100,max: 800,step: 10,- label: "Layer scale (%)",+ default: 480,+ description: "Layer scale (%)",+ hiddenFromList: false,},keyframeStride: {type: "number",- default: 20,min: 5,max: 40,step: 1,- label: "Keyframe stride",+ default: 20,+ description: "Keyframe stride",+ hiddenFromList: false,},},durationInFrames: 120,diff --git a/registry/remocn/lens-zoom/config.ts b/registry/remocn/lens-zoom/config.tsindex f7cb62bf..1a2ffd61 100644--- a/registry/remocn/lens-zoom/config.ts+++ b/registry/remocn/lens-zoom/config.ts@@ -7,35 +7,39 @@ export const lensZoomConfig: ComponentConfig = {controls: {lensSteps: {type: "number",- default: 9,min: 4,max: 32,step: 1,- label: "Lens steps",+ default: 9,+ description: "Lens steps",+ hiddenFromList: false,},blurSamples: {type: "number",- default: 7,min: 2,max: 32,step: 1,- label: "Blur samples",+ default: 7,+ description: "Blur samples",+ hiddenFromList: false,},shakeAmount: {type: "number",- default: 50,min: 0,max: 300,step: 5,- label: "Shake amount",+ default: 50,+ description: "Shake amount",+ hiddenFromList: false,},shakeTranslatePx: {type: "number",- default: 73,min: 0,max: 80,step: 1,- label: "Shake travel (px)",+ default: 73,+ description: "Shake travel (px)",+ hiddenFromList: false,},},durationInFrames: 112,diff --git a/registry/remocn/lens-zoom/index.tsx b/registry/remocn/lens-zoom/index.tsxindex 9e6f63ba..46362024 100644--- a/registry/remocn/lens-zoom/index.tsx+++ b/registry/remocn/lens-zoom/index.tsx@@ -223,7 +223,8 @@ function TransitionHalf({position: "absolute",inset: 0,clipPath: `path("${clip}")`,- transform: `rotate(${rotation}deg) scale(${k})`,+ rotate: `${rotation}deg`,+ scale: `${k}`,transformOrigin: origin,}}>@@ -296,7 +297,7 @@ function LensZoomStage({inset: 0,mixBlendMode: "screen",filter: `url(#${filterId}-${c.id})`,- transform: `scale(${c.scale})`,+ scale: `${c.scale}`,transformOrigin: `${centerX}px ${centerY}px`,}}>@@ -351,7 +352,8 @@ function LensZoomStage({style={{position: "absolute",inset: 0,- transform: `translate(${shakeX}px, ${shakeY}px) rotate(${shakeR}deg)`,+ translate: `${shakeX}px ${shakeY}px`,+ rotate: `${shakeR}deg`,transformOrigin: `${centerX}px ${centerY}px`,}}>diff --git a/registry/remocn/line-by-line-slide/config.ts b/registry/remocn/line-by-line-slide/config.tsindex 57280776..8e7da638 100644--- a/registry/remocn/line-by-line-slide/config.ts+++ b/registry/remocn/line-by-line-slide/config.ts@@ -1,44 +1,50 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const lineByLineSlideConfig: ComponentConfig = {componentName: "LineByLineSlide",importPath: "@/components/remocn/line-by-line-slide",controls: {text: {- type: "text",+ type: "text-content",default: "Think different.\nDo more.",- label: "Text",+ description: "Text",},distance: {type: "number",- default: 48,min: 0,max: 160,step: 1,- label: "Distance",+ default: 48,+ description: "Distance",+ hiddenFromList: false,},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 600, height: 200 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/line-by-line-slide/index.tsx b/registry/remocn/line-by-line-slide/index.tsxindex 10c294d8..80805d0e 100644--- a/registry/remocn/line-by-line-slide/index.tsx+++ b/registry/remocn/line-by-line-slide/index.tsx@@ -115,7 +115,7 @@ export function LineByLineSlide({display: "block",transformOrigin: "0% 50%",opacity,- transform: `translateX(${x}px)`,+ translate: `${x}px`,}}>{line}diff --git a/registry/remocn/live-code-compilation/config.ts b/registry/remocn/live-code-compilation/config.tsindex 0bd02b28..dad9ec6e 100644--- a/registry/remocn/live-code-compilation/config.ts+++ b/registry/remocn/live-code-compilation/config.ts@@ -7,7 +7,7 @@ export const liveCodeCompilationConfig: ComponentConfig = {accentColor: {type: "color",default: "#3b82f6",- label: "Accent color",+ description: "Accent color",},},durationInFrames: 260,diff --git a/registry/remocn/logo-enter/config.ts b/registry/remocn/logo-enter/config.tsindex a031b824..e91662f7 100644--- a/registry/remocn/logo-enter/config.ts+++ b/registry/remocn/logo-enter/config.ts@@ -5,35 +5,42 @@ export const logoEnterConfig: ComponentConfig = {importPath: "@/components/remocn/logo-enter",controls: {diameter: {- type: "number-input",- default: 118,+ type: "number",min: 48,- max: 280,step: 1,- label: "Diameter",+ default: 118,+ description: "Diameter",+ hiddenFromList: false,},overlap: {- type: "number-input",- default: 38,+ type: "number",min: 0,- max: 160,step: 1,- label: "Overlap",+ default: 38,+ description: "Overlap",+ hiddenFromList: false,+ },+ ringColor: {+ type: "color",+ default: "#fff",+ description: "Ring",},- ringColor: { type: "color", default: "#fff", label: "Ring" },orientation: {- type: "select",+ type: "enum",default: "horizontal",- options: ["horizontal", "vertical"],- label: "Orientation",+ variants: {+ horizontal: {},+ vertical: {},+ },+ description: "Orientation",},stagger: {- type: "number-input",- default: 7,+ type: "number",min: 0,- max: 30,step: 1,- label: "Stagger",+ default: 7,+ description: "Stagger",+ hiddenFromList: false,},},durationInFrames: 90,diff --git a/registry/remocn/logo-enter/index.tsx b/registry/remocn/logo-enter/index.tsxindex f9bf9fbd..75061a94 100644--- a/registry/remocn/logo-enter/index.tsx+++ b/registry/remocn/logo-enter/index.tsx@@ -132,9 +132,8 @@ export function LogoEnter({alignItems: "center",justifyContent: "center",opacity: s,- transform: isVertical- ? `translateX(${offset}px) scale(${scale})`- : `translateY(${offset}px) scale(${scale})`,+ translate: isVertical ? `${offset}px` : `0 ${offset}px`,+ scale: `${scale}`,}}><divdiff --git a/registry/remocn/marker-highlight/config.ts b/registry/remocn/marker-highlight/config.tsindex bfc86382..5b5aeeb5 100644--- a/registry/remocn/marker-highlight/config.ts+++ b/registry/remocn/marker-highlight/config.ts@@ -1,40 +1,61 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const markerHighlightConfig: ComponentConfig = {componentName: "MarkerHighlight",importPath: "@/components/remocn/marker-highlight",controls: {- before: { type: "text", default: "Made for ", label: "Before" },- highlight: { type: "text", default: "builders", label: "Highlight" },- after: { type: "text", default: ".", label: "After" },- markerColor: { type: "color", default: "#facc15", label: "Marker color" },- baseColor: { type: "color", default: "#171717", label: "Base color" },+ before: {+ type: "text-content",+ default: "Made for ",+ description: "Before",+ },+ highlight: {+ type: "text-content",+ default: "builders",+ description: "Highlight",+ },+ after: {+ type: "text-content",+ default: ".",+ description: "After",+ },+ markerColor: {+ type: "color",+ default: "#facc15",+ description: "Marker color",+ },+ baseColor: {+ type: "color",+ default: "#171717",+ description: "Base color",+ },highlightedTextColor: {type: "color",default: "#171717",- label: "Highlighted text color",+ description: "Highlighted text color",},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,},fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 340, height: 100 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/marker-highlight/index.tsx b/registry/remocn/marker-highlight/index.tsxindex 2fc688c7..ebd60d02 100644--- a/registry/remocn/marker-highlight/index.tsx+++ b/registry/remocn/marker-highlight/index.tsx@@ -82,7 +82,7 @@ export function MarkerHighlight({inset: "0 -0.1em",background: markerColor,transformOrigin: "left center",- transform: `scaleX(${markerScale})`,+ scale: `${markerScale} 1`,zIndex: 0,}}/>diff --git a/registry/remocn/mask-reveal-up/config.ts b/registry/remocn/mask-reveal-up/config.tsindex 1bca3daa..e8206caa 100644--- a/registry/remocn/mask-reveal-up/config.ts+++ b/registry/remocn/mask-reveal-up/config.ts@@ -1,44 +1,50 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const maskRevealUpConfig: ComponentConfig = {componentName: "MaskRevealUp",importPath: "@/components/remocn/mask-reveal-up",controls: {text: {- type: "text",+ type: "text-content",default: "Designed to move.\nBuilt to focus.",- label: "Text",+ description: "Text",},distance: {type: "number",- default: 30,min: 0,max: 120,step: 1,- label: "Distance",+ default: 30,+ description: "Distance",+ hiddenFromList: false,},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 640, height: 200 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/mask-reveal-up/index.tsx b/registry/remocn/mask-reveal-up/index.tsxindex 7938e7ef..4fb218e7 100644--- a/registry/remocn/mask-reveal-up/index.tsx+++ b/registry/remocn/mask-reveal-up/index.tsx@@ -129,7 +129,7 @@ export function MaskRevealUp({display: "block",transformOrigin: "50% 50%",opacity,- transform: `translateY(${y}px)`,+ translate: `0 ${y}px`,filter: `blur(${blur}px)`,}}>diff --git a/registry/remocn/matrix-decode/config.ts b/registry/remocn/matrix-decode/config.tsindex 945b2226..b279a3c0 100644--- a/registry/remocn/matrix-decode/config.ts+++ b/registry/remocn/matrix-decode/config.ts@@ -1,45 +1,55 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const matrixDecodeConfig: ComponentConfig = {componentName: "MatrixDecode",importPath: "@/components/remocn/matrix-decode",controls: {- text: { type: "text", default: "DECRYPTED", label: "Text" },+ text: {+ type: "text-content",+ default: "DECRYPTED",+ description: "Text",+ },charset: {- type: "text",+ type: "text-content",default: "!@#$%^&*()_+-=<>?/\\|",- label: "Charset",+ description: "Charset",},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#22c55e",+ description: "Color",},- color: { type: "color", default: "#22c55e", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},revealDuration: {type: "number",- default: 60,min: 10,max: 240,step: 1,- label: "Reveal duration",+ default: 60,+ description: "Reveal duration",+ hiddenFromList: false,},},+ dimensions: { width: 340, height: 100 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/micro-scale-fade/config.ts b/registry/remocn/micro-scale-fade/config.tsindex 84e1bd8f..e003d8db 100644--- a/registry/remocn/micro-scale-fade/config.ts+++ b/registry/remocn/micro-scale-fade/config.ts@@ -1,40 +1,50 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const microScaleFadeConfig: ComponentConfig = {componentName: "MicroScaleFade",importPath: "@/components/remocn/micro-scale-fade",controls: {- text: { type: "text", default: "Welcome to motion.", label: "Text" },+ text: {+ type: "text-content",+ default: "Welcome to motion.",+ description: "Text",+ },scaleFrom: {type: "number",- default: 0.96,min: 0.8,max: 1,step: 0.01,- label: "Scale from",+ default: 0.96,+ description: "Scale from",+ hiddenFromList: false,},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 680, height: 100 },durationInFrames: 60,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/micro-scale-fade/index.tsx b/registry/remocn/micro-scale-fade/index.tsxindex 89a888d2..48cfcb23 100644--- a/registry/remocn/micro-scale-fade/index.tsx+++ b/registry/remocn/micro-scale-fade/index.tsx@@ -59,7 +59,7 @@ export function MicroScaleFade({display: "inline-block",transformOrigin: "50% 50%",opacity,- transform: `scale(${scale})`,+ scale: `${scale}`,}}>{text}diff --git a/registry/remocn/number-wheel/config.ts b/registry/remocn/number-wheel/config.tsindex de5068f2..3a06318e 100644--- a/registry/remocn/number-wheel/config.ts+++ b/registry/remocn/number-wheel/config.ts@@ -5,30 +5,35 @@ export const numberWheelConfig: ComponentConfig = {importPath: "@/components/remocn/number-wheel",controls: {from: {- type: "number-input",- default: 0,+ type: "number",min: 0,- max: 1000000,step: 1,- label: "From",+ default: 0,+ description: "From",+ hiddenFromList: false,},to: {- type: "number-input",- default: 24813,+ type: "number",min: 0,- max: 1000000,step: 1,- label: "To",+ default: 24813,+ description: "To",+ hiddenFromList: false,},fontSize: {type: "number",- default: 120,min: 24,max: 280,step: 4,- label: "Font size",+ default: 120,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },},durationInFrames: 112,fps: FPS,diff --git a/registry/remocn/number-wheel/index.tsx b/registry/remocn/number-wheel/index.tsxindex 071dc991..e02b9b78 100644--- a/registry/remocn/number-wheel/index.tsx+++ b/registry/remocn/number-wheel/index.tsx@@ -88,7 +88,7 @@ function DigitColumn({style={{display: "flex",flexDirection: "column",- transform: `translateY(${-value * cellHeight}px)`,+ translate: `0 ${-value * cellHeight}px`,}}>{[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0].map((d, i) => (diff --git a/registry/remocn/opencode/config.ts b/registry/remocn/opencode/config.tsindex 525e19b6..22d18611 100644--- a/registry/remocn/opencode/config.ts+++ b/registry/remocn/opencode/config.ts@@ -5,19 +5,35 @@ export const opencodeConfig: ComponentConfig = {importPath: "@/components/remocn/opencode",controls: {placeholder: {- type: "text",+ type: "text-content",default: "Ask anything... ",- label: "Placeholder",+ description: "Placeholder",},query: {- type: "text",+ type: "text-content",default: '"What is the tech stack of this project?"',- label: "Query",+ description: "Query",+ },+ agentName: {+ type: "text-content",+ default: "Build",+ description: "Agent",+ },+ modelName: {+ type: "text-content",+ default: "Kimi K2.5",+ description: "Model",+ },+ provider: {+ type: "text-content",+ default: "Moonshot AI",+ description: "Provider",+ },+ accentColor: {+ type: "color",+ default: "#2B7FFF",+ description: "Accent",},- agentName: { type: "text", default: "Build", label: "Agent" },- modelName: { type: "text", default: "Kimi K2.5", label: "Model" },- provider: { type: "text", default: "Moonshot AI", label: "Provider" },- accentColor: { type: "color", default: "#2B7FFF", label: "Accent" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/opencode/index.tsx b/registry/remocn/opencode/index.tsxindex ee2edad5..06411f6b 100644--- a/registry/remocn/opencode/index.tsx+++ b/registry/remocn/opencode/index.tsx@@ -125,7 +125,8 @@ export function OpenCode({top: "50%",width: refW,height: refH,- transform: `translate(-50%, -50%) scale(${stageScale})`,+ translate: "-50% -50%",+ scale: `${stageScale}`,display: "flex",flexDirection: "column",alignItems: "center",@@ -136,7 +137,7 @@ export function OpenCode({style={{lineHeight: 0,opacity: logoFade.opacity,- transform: `translateY(${logoFade.translateY + intro.translateY * 0.4}px)`,+ translate: `0 ${logoFade.translateY + intro.translateY * 0.4}px`,}}><svg@@ -203,7 +204,8 @@ export function OpenCode({justifyContent: "center",gap: 26,opacity: boxFade.opacity,- transform: `translateY(${boxFade.translateY + intro.translateY * 0.6}px) scale(${intro.scale})`,+ translate: `0 ${boxFade.translateY + intro.translateY * 0.6}px`,+ scale: `${intro.scale}`,transformOrigin: "center top",}}>@@ -259,7 +261,7 @@ export function OpenCode({fontFamily: MONO_FAMILY,fontSize: 18,opacity: hintsFade.opacity,- transform: `translateY(${hintsFade.translateY}px)`,+ translate: `0 ${hintsFade.translateY}px`,}}><span style={{ display: "inline-flex", gap: 8 }}>diff --git a/registry/remocn/page-turn/config.ts b/registry/remocn/page-turn/config.tsindex 7669c54e..6ad787c5 100644--- a/registry/remocn/page-turn/config.ts+++ b/registry/remocn/page-turn/config.ts@@ -7,19 +7,21 @@ export const pageTurnConfig: ComponentConfig = {controls: {angle: {type: "number",- default: -7,min: -20,max: 20,step: 1,- label: "Angle",+ default: -7,+ description: "Angle",+ hiddenFromList: false,},poses: {type: "number",- default: 8,min: 2,max: 16,step: 1,- label: "Poses",+ default: 8,+ description: "Poses",+ hiddenFromList: false,},},durationInFrames: 128,diff --git a/registry/remocn/page-turn/index.tsx b/registry/remocn/page-turn/index.tsxindex bf9bd0b4..4f303c7d 100644--- a/registry/remocn/page-turn/index.tsx+++ b/registry/remocn/page-turn/index.tsx@@ -45,7 +45,8 @@ const PageTurnPresentation: React.FC<style={{zIndex: 2,transformOrigin: origin,- transform: `translateY(${-pose * height * LIFT_RATIO}px) rotate(${angle * pose}deg)`,+ translate: `0 ${-pose * height * LIFT_RATIO}px`,+ rotate: `${angle * pose}deg`,}}>{children}diff --git a/registry/remocn/paper-sticker/config.ts b/registry/remocn/paper-sticker/config.tsindex 2e76a9ea..6fbffd50 100644--- a/registry/remocn/paper-sticker/config.ts+++ b/registry/remocn/paper-sticker/config.ts@@ -7,30 +7,45 @@ export const paperStickerConfig: ComponentConfig = {controls: {at: {type: "number",- default: 0,min: 0,max: 60,step: 1,- label: "Slap frame",+ default: 0,+ description: "Slap frame",+ hiddenFromList: false,+ },+ padding: {+ type: "text-content",+ default: "10px 16px",+ description: "Padding",+ },+ background: {+ type: "color",+ default: "#fbfaf6",+ description: "Paper",},- padding: { type: "text", default: "10px 16px", label: "Padding" },- background: { type: "color", default: "#fbfaf6", label: "Paper" },maxTilt: {type: "number",- default: 2.6,min: 0,max: 8,step: 0.2,- label: "Max tilt",+ default: 2.6,+ description: "Max tilt",+ hiddenFromList: false,+ },+ seed: {+ type: "text-content",+ default: "sticker",+ description: "Seed",},- seed: { type: "text", default: "sticker", label: "Seed" },step: {type: "number",- default: 3,min: 1,max: 6,step: 1,- label: "Frames / pose",+ default: 3,+ description: "Frames / pose",+ hiddenFromList: false,},},snippet: paperStickerExampleCode,diff --git a/registry/remocn/paper-sticker/index.tsx b/registry/remocn/paper-sticker/index.tsxindex dcc8b62c..ab6ade7f 100644--- a/registry/remocn/paper-sticker/index.tsx+++ b/registry/remocn/paper-sticker/index.tsx@@ -50,7 +50,9 @@ export function PaperSticker({border: `1px solid ${borderColor}`,borderRadius: 3,boxShadow: "0 2px 5px rgba(38,36,44,0.14)",- transform: `translate(${jitter.x}px, ${jitter.y}px) rotate(${tilt + jitter.rot}deg) scale(${progress < 1 ? 1.12 : 1})`,+ translate: `${jitter.x}px ${jitter.y}px`,+ rotate: `${tilt + jitter.rot}deg`,+ scale: `${progress < 1 ? 1.12 : 1}`,}}>{children}diff --git a/registry/remocn/paper-wobble/config.ts b/registry/remocn/paper-wobble/config.tsindex a2c1316d..f96ab2a0 100644--- a/registry/remocn/paper-wobble/config.ts+++ b/registry/remocn/paper-wobble/config.ts@@ -7,28 +7,35 @@ export const paperWobbleConfig: ComponentConfig = {controls: {amp: {type: "number",- default: 1.4,min: 0,max: 6,step: 0.1,- label: "Offset",+ default: 1.4,+ description: "Offset",+ hiddenFromList: false,},rotAmp: {type: "number",- default: 0.35,min: 0,max: 2,step: 0.05,- label: "Rotation",+ default: 0.35,+ description: "Rotation",+ hiddenFromList: false,+ },+ seed: {+ type: "text-content",+ default: "wobble",+ description: "Seed",},- seed: { type: "text", default: "wobble", label: "Seed" },step: {type: "number",- default: 3,min: 1,max: 6,step: 1,- label: "Frames / pose",+ default: 3,+ description: "Frames / pose",+ hiddenFromList: false,},},snippet: paperWobbleExampleCode,diff --git a/registry/remocn/particle-dissolve/config.ts b/registry/remocn/particle-dissolve/config.tsindex c1c233a7..0995cd22 100644--- a/registry/remocn/particle-dissolve/config.ts+++ b/registry/remocn/particle-dissolve/config.ts@@ -7,49 +7,60 @@ export const particleDissolveConfig: ComponentConfig = {controls: {particleSize: {type: "number",- default: 4,min: 1,max: 16,step: 1,- label: "Grain size",+ default: 4,+ description: "Grain size",+ hiddenFromList: false,},scatter: {type: "number",- default: 0.08,min: 0.01,max: 0.4,step: 0.01,- label: "Scatter",+ default: 0.08,+ description: "Scatter",+ hiddenFromList: false,},shimmer: {type: "number",- default: 0.6,min: 0,max: 1.5,step: 0.05,- label: "Shimmer",+ default: 0.6,+ description: "Shimmer",+ hiddenFromList: false,},aberration: {type: "number",- default: 0.5,min: 0,max: 1.5,step: 0.05,- label: "Aberration",+ default: 0.5,+ description: "Aberration",+ hiddenFromList: false,},direction: {- type: "select",+ type: "enum",default: "reveal",- options: ["reveal", "up", "down", "left", "right"],- label: "Direction",+ variants: {+ reveal: {},+ up: {},+ down: {},+ left: {},+ right: {},+ },+ description: "Direction",},stagger: {type: "number",- default: 0.55,min: 0,max: 0.9,step: 0.05,- label: "Stagger",+ default: 0.55,+ description: "Stagger",+ hiddenFromList: false,},},durationInFrames: 84,diff --git a/registry/remocn/per-character-rise/config.ts b/registry/remocn/per-character-rise/config.tsindex 5982fbca..7e67542d 100644--- a/registry/remocn/per-character-rise/config.ts+++ b/registry/remocn/per-character-rise/config.ts@@ -1,40 +1,50 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const perCharacterRiseConfig: ComponentConfig = {componentName: "PerCharacterRise",importPath: "@/components/remocn/per-character-rise",controls: {- text: { type: "text", default: "One more thing.", label: "Text" },+ text: {+ type: "text-content",+ default: "One more thing.",+ description: "Text",+ },distance: {type: "number",- default: 32,min: 0,max: 120,step: 1,- label: "Distance",+ default: 32,+ description: "Distance",+ hiddenFromList: false,},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 570, height: 100 },durationInFrames: 60,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/per-character-rise/index.tsx b/registry/remocn/per-character-rise/index.tsxindex 9ab6f456..e3728545 100644--- a/registry/remocn/per-character-rise/index.tsx+++ b/registry/remocn/per-character-rise/index.tsx@@ -73,7 +73,7 @@ export function PerCharacterRise({backfaceVisibility: "hidden",transformOrigin: "50% 55%",opacity,- transform: `translateY(${y}px)`,+ translate: `0 ${y}px`,}}>{char}diff --git a/registry/remocn/per-word-crossfade/config.ts b/registry/remocn/per-word-crossfade/config.tsindex 4e7ffa75..03a07f23 100644--- a/registry/remocn/per-word-crossfade/config.ts+++ b/registry/remocn/per-word-crossfade/config.ts@@ -1,37 +1,46 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const perWordCrossfadeConfig: ComponentConfig = {componentName: "PerWordCrossfade",importPath: "@/components/remocn/per-word-crossfade",controls: {fromText: {- type: "text",+ type: "text-content",default: "Beautifully simple.",- label: "From text",+ description: "From text",+ },+ toText: {+ type: "text-content",+ default: "Designed for focus.",+ description: "To text",},- toText: { type: "text", default: "Designed for focus.", label: "To text" },fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 720, height: 100 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/per-word-crossfade/index.tsx b/registry/remocn/per-word-crossfade/index.tsxindex 96f3cb47..35dd1114 100644--- a/registry/remocn/per-word-crossfade/index.tsx+++ b/registry/remocn/per-word-crossfade/index.tsx@@ -91,7 +91,7 @@ export function PerWordCrossfade({marginRight: "0.25em",transformOrigin: "50% 55%",opacity,- transform: `translateY(${y}px)`,+ translate: `0 ${y}px`,}}>{word}@@ -139,7 +139,7 @@ export function PerWordCrossfade({marginRight: "0.25em",transformOrigin: "50% 55%",opacity,- transform: `translateY(${y}px)`,+ translate: `0 ${y}px`,}}>{word}diff --git a/registry/remocn/perlin-dissolve/config.ts b/registry/remocn/perlin-dissolve/config.tsindex e9a80adb..5fe502b6 100644--- a/registry/remocn/perlin-dissolve/config.ts+++ b/registry/remocn/perlin-dissolve/config.ts@@ -5,15 +5,24 @@ export const perlinDissolveConfig: ComponentConfig = {componentName: "perlinDissolve",importPath: "@/components/remocn/perlin-dissolve",controls: {- colorFront: { type: "color", default: "#8f88ae", label: "Ink" },- colorBack: { type: "color", default: "#141318", label: "Background" },+ colorFront: {+ type: "color",+ default: "#8f88ae",+ description: "Ink",+ },+ colorBack: {+ type: "color",+ default: "#141318",+ description: "Background",+ },softness: {type: "number",- default: 0.1,min: 0,max: 1,step: 0.05,- label: "Softness",+ default: 0.1,+ description: "Softness",+ hiddenFromList: false,},},durationInFrames: 116,diff --git a/registry/remocn/perspective-marquee/config.ts b/registry/remocn/perspective-marquee/config.tsindex 4f96c9be..ff2632ba 100644--- a/registry/remocn/perspective-marquee/config.ts+++ b/registry/remocn/perspective-marquee/config.ts@@ -1,10 +1,4 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const perspectiveMarqueeConfig: ComponentConfig = {componentName: "PerspectiveMarquee",@@ -12,52 +6,70 @@ export const perspectiveMarqueeConfig: ComponentConfig = {controls: {fontSize: {type: "number",- default: 84,min: 24,max: 200,step: 2,- label: "Font size",+ default: 84,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#fafafa",+ description: "Color",},- color: { type: "color", default: "#fafafa", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "700",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},pixelsPerFrame: {type: "number",- default: 2,min: 0.25,max: 10,step: 0.25,- label: "Pixels / frame",+ default: 2,+ description: "Pixels / frame",+ hiddenFromList: false,},rotateY: {type: "number",- default: -28,min: -60,max: 60,step: 1,- label: "Rotate Y (deg)",+ default: -28,+ description: "Rotate Y (deg)",+ hiddenFromList: false,},rotateX: {type: "number",- default: 8,min: -30,max: 30,step: 1,- label: "Rotate X (deg)",+ default: 8,+ description: "Rotate X (deg)",+ hiddenFromList: false,},perspective: {type: "number",- default: 1200,min: 400,max: 3000,step: 50,- label: "Perspective",+ default: 1200,+ description: "Perspective",+ hiddenFromList: false,+ },+ fadeColor: {+ type: "color",+ default: "#050505",+ description: "Fade color",},- fadeColor: { type: "color", default: "#050505", label: "Fade color" },},durationInFrames: 240,fps: FPS,diff --git a/registry/remocn/perspective-marquee/index.tsx b/registry/remocn/perspective-marquee/index.tsxindex 50757028..e87325d9 100644--- a/registry/remocn/perspective-marquee/index.tsx+++ b/registry/remocn/perspective-marquee/index.tsx@@ -84,7 +84,7 @@ export function PerspectiveMarquee({style={{display: "flex",whiteSpace: "nowrap",- transform: `translateX(${offset}px)`,+ translate: `${offset}px`,}}>{rendered.map((item, i) => {diff --git a/registry/remocn/perspective-squeeze/config.ts b/registry/remocn/perspective-squeeze/config.tsindex 48591ed7..65ebcec5 100644--- a/registry/remocn/perspective-squeeze/config.ts+++ b/registry/remocn/perspective-squeeze/config.ts@@ -4,26 +4,39 @@ export const perspectiveSqueezeConfig: ComponentConfig = {componentName: "PerspectiveSqueeze",importPath: "@/components/remocn/perspective-squeeze",controls: {- upperText: { type: "text", default: "REMOCN", label: "Upper line" },- lowerText: { type: "text", default: "BEST", label: "Lower line" },- fill: { type: "color", default: "#f2f2f2", label: "Fill" },+ upperText: {+ type: "text-content",+ default: "REMOCN",+ description: "Upper line",+ },+ lowerText: {+ type: "text-content",+ default: "BEST",+ description: "Lower line",+ },+ fill: {+ type: "color",+ default: "#f2f2f2",+ description: "Fill",+ },upperFontFamily: {- type: "text",+ type: "text-content",default: "Impact, 'Arial Narrow', sans-serif",- label: "Upper font",+ description: "Upper font",},lowerFontFamily: {- type: "text",+ type: "text-content",default: "Impact, 'Arial Narrow', sans-serif",- label: "Lower font",+ description: "Lower font",},lineGap: {type: "number",- default: 50,min: 0,max: 120,step: 2,- label: "Line gap",+ default: 50,+ description: "Line gap",+ hiddenFromList: false,},},durationInFrames: 225,diff --git a/registry/remocn/perspective-squeeze/index.tsx b/registry/remocn/perspective-squeeze/index.tsxindex e4ece79b..1ba83d8c 100644--- a/registry/remocn/perspective-squeeze/index.tsx+++ b/registry/remocn/perspective-squeeze/index.tsx@@ -247,7 +247,7 @@ export function PerspectiveSqueeze({top: (compHeight - height * stageScale) / 2,width,height,- transform: `scale(${stageScale})`,+ scale: `${stageScale}`,transformOrigin: "0 0",}}>diff --git a/registry/remocn/pixelate-region/config.ts b/registry/remocn/pixelate-region/config.tsindex bdcd54bf..fac2c8c3 100644--- a/registry/remocn/pixelate-region/config.ts+++ b/registry/remocn/pixelate-region/config.ts@@ -7,11 +7,12 @@ export const pixelateRegionConfig: ComponentConfig = {controls: {cellSize: {type: "number",- default: 24,min: 6,max: 72,step: 2,- label: "Cell size",+ default: 24,+ description: "Cell size",+ hiddenFromList: false,},},durationInFrames: 90,diff --git a/registry/remocn/polaroid/config.ts b/registry/remocn/polaroid/config.tsindex 5dfc2ecc..af96b52f 100644--- a/registry/remocn/polaroid/config.ts+++ b/registry/remocn/polaroid/config.ts@@ -5,38 +5,46 @@ export const polaroidConfig: ComponentConfig = {componentName: "Polaroid",importPath: "@/components/remocn/polaroid",controls: {- caption: { type: "text", default: "first light", label: "Caption" },+ caption: {+ type: "text-content",+ default: "first light",+ description: "Caption",+ },captionAt: {type: "number",- default: 0,min: 0,max: 60,step: 1,- label: "Caption starts",+ default: 0,+ description: "Caption starts",+ hiddenFromList: false,},width: {type: "number",- default: 652,min: 320,max: 900,step: 4,- label: "Card width",+ default: 652,+ description: "Card width",+ hiddenFromList: false,},captionSize: {type: "number",- default: 36,min: 20,max: 56,step: 1,- label: "Caption size",+ default: 36,+ description: "Caption size",+ hiddenFromList: false,},step: {type: "number",- default: 3,min: 1,max: 6,step: 1,- label: "Frames / pose",+ default: 3,+ description: "Frames / pose",+ hiddenFromList: false,},},snippet: polaroidExampleCode,diff --git a/registry/remocn/push-through/config.ts b/registry/remocn/push-through/config.tsindex 6c54562a..7b23c722 100644--- a/registry/remocn/push-through/config.ts+++ b/registry/remocn/push-through/config.ts@@ -7,19 +7,21 @@ export const pushThroughConfig: ComponentConfig = {controls: {zoom: {type: "number",- default: 2.4,min: 1.5,max: 4,step: 0.1,- label: "Zoom",+ default: 2.4,+ description: "Zoom",+ hiddenFromList: false,},blur: {type: "number",- default: 14,min: 0,max: 30,step: 1,- label: "Blur",+ default: 14,+ description: "Blur",+ hiddenFromList: false,},},durationInFrames: 112,diff --git a/registry/remocn/push-through/index.tsx b/registry/remocn/push-through/index.tsxindex 7a5d918f..21dd1fc9 100644--- a/registry/remocn/push-through/index.tsx+++ b/registry/remocn/push-through/index.tsx@@ -35,10 +35,10 @@ const PushThroughPresentation: React.FC<...clampOpts,easing: Easing.bezier(0.42, 0, 0.58, 1),}),- transform: `scale(${interpolate(p, [0, 0.65], [1, zoom], {+ scale: `${interpolate(p, [0, 0.65], [1, zoom], {...clampOpts,easing: Easing.in(Easing.cubic),- })})`,+ })}`,filter: `blur(${interpolate(p, [0.15, 0.6], [0, blur], clampOpts)}px)`,};return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;@@ -46,10 +46,10 @@ const PushThroughPresentation: React.FC<const childStyle: React.CSSProperties = {opacity: interpolate(p, [0.3, 0.5], [0, 1], clampOpts),- transform: `scale(${interpolate(p, [0.3, 0.88, 1], [0.68, 1.02, 1], {+ scale: `${interpolate(p, [0.3, 0.88, 1], [0.68, 1.02, 1], {...clampOpts,easing: Easing.out(Easing.cubic),- })})`,+ })}`,filter: `blur(${interpolate(p, [0.3, 0.75], [blur * 0.7, 0], clampOpts)}px)`,};diff --git a/registry/remocn/reel/config.ts b/registry/remocn/reel/config.tsindex 4b8b2869..2da97f27 100644--- a/registry/remocn/reel/config.ts+++ b/registry/remocn/reel/config.ts@@ -7,45 +7,51 @@ export const reelConfig: ComponentConfig = {controls: {width: {type: "number",- default: 1180,min: 600,max: 1280,step: 20,- label: "Card width",+ default: 1180,+ description: "Card width",+ hiddenFromList: false,},height: {type: "number",- default: 676,min: 360,max: 720,step: 4,- label: "Card height",+ default: 676,+ description: "Card height",+ hiddenFromList: false,},radius: {type: "number",- default: 16,min: 0,max: 40,step: 1,- label: "Corner radius",+ default: 16,+ description: "Corner radius",+ hiddenFromList: false,},step: {type: "number",- default: 20,min: 6,max: 40,step: 1,- label: "Frames / image",+ default: 20,+ description: "Frames / image",+ hiddenFromList: false,},reveal: {type: "number",- default: 13,min: 4,max: 30,step: 1,- label: "Reveal frames",+ default: 13,+ description: "Reveal frames",+ hiddenFromList: false,},},+ dimensions: { width: 1180, height: 676 },durationInFrames: 160,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/reel/index.tsx b/registry/remocn/reel/index.tsxindex 3c4bea42..6078af1a 100644--- a/registry/remocn/reel/index.tsx+++ b/registry/remocn/reel/index.tsx@@ -75,7 +75,7 @@ export function Reel({height: "100%",objectFit: "cover",objectPosition,- transform: `scale(${imgScale})`,+ scale: `${imgScale}`,willChange: "transform",}}/>diff --git a/registry/remocn/rgb-glitch-text/config.ts b/registry/remocn/rgb-glitch-text/config.tsindex c1f11a32..2a93b574 100644--- a/registry/remocn/rgb-glitch-text/config.ts+++ b/registry/remocn/rgb-glitch-text/config.ts@@ -1,57 +1,73 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const rgbGlitchTextConfig: ComponentConfig = {componentName: "RGBGlitchText",importPath: "@/components/remocn/rgb-glitch-text",controls: {- text: { type: "text", default: "GLITCH", label: "Text" },+ text: {+ type: "text-content",+ default: "GLITCH",+ description: "Text",+ },fontSize: {type: "number",- default: 96,min: 12,max: 200,step: 1,- label: "Font size",+ default: 96,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "700",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},glitchAt: {type: "number",- default: 20,min: 0,max: 120,step: 1,- label: "Glitch at (frame)",+ default: 20,+ description: "Glitch at (frame)",+ hiddenFromList: false,},glitchDuration: {type: "number",- default: 8,min: 1,max: 60,step: 1,- label: "Glitch duration",+ default: 8,+ description: "Glitch duration",+ hiddenFromList: false,},intensity: {type: "number",- default: 6,min: 0,max: 30,step: 1,- label: "Intensity (px)",+ default: 6,+ description: "Intensity (px)",+ hiddenFromList: false,+ },+ seed: {+ type: "text-content",+ default: "glitch",+ description: "Seed",},- seed: { type: "text", default: "glitch", label: "Seed" },},+ dimensions: { width: 300, height: 130 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/rgb-glitch-text/index.tsx b/registry/remocn/rgb-glitch-text/index.tsxindex 6b2e6a79..cbf62535 100644--- a/registry/remocn/rgb-glitch-text/index.tsx+++ b/registry/remocn/rgb-glitch-text/index.tsx@@ -90,7 +90,7 @@ export function RGBGlitchText({...baseStyle,color: "#ff0040",opacity: copyOpacity,- transform: `translateX(${rX}px) translateY(${rY}px)`,+ translate: `${rX}px ${rY}px`,}}>{text}@@ -100,7 +100,7 @@ export function RGBGlitchText({...baseStyle,color: "#00ff80",opacity: copyOpacity,- transform: `translateX(${gX}px) translateY(${gY}px)`,+ translate: `${gX}px ${gY}px`,}}>{text}@@ -110,7 +110,7 @@ export function RGBGlitchText({...baseStyle,color: "#0080ff",opacity: copyOpacity,- transform: `translateX(${bX}px) translateY(${bY}px)`,+ translate: `${bX}px ${bY}px`,}}>{text}diff --git a/registry/remocn/ripple-zoom/config.ts b/registry/remocn/ripple-zoom/config.tsindex cf1ca2df..da696a5e 100644--- a/registry/remocn/ripple-zoom/config.ts+++ b/registry/remocn/ripple-zoom/config.ts@@ -7,29 +7,36 @@ export const rippleZoomConfig: ComponentConfig = {controls: {zoom: {type: "number",- default: 4,min: 1.5,max: 8,step: 0.25,- label: "Zoom",+ default: 4,+ description: "Zoom",+ hiddenFromList: false,},intensity: {type: "number",- default: 0.5,min: 0,max: 1,step: 0.05,- label: "Intensity",+ default: 0.5,+ description: "Intensity",+ hiddenFromList: false,},softness: {type: "number",- default: 0.5,min: 0,max: 1,step: 0.05,- label: "Softness",+ default: 0.5,+ description: "Softness",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#141318",+ description: "Background",},- colorBack: { type: "color", default: "#141318", label: "Background" },},durationInFrames: 116,fps: FPS,diff --git a/registry/remocn/ripple-zoom/index.tsx b/registry/remocn/ripple-zoom/index.tsxindex 30c0d760..155f2ab5 100644--- a/registry/remocn/ripple-zoom/index.tsx+++ b/registry/remocn/ripple-zoom/index.tsx@@ -51,10 +51,10 @@ const RippleZoomPresentation: React.FC<...clampOpts,easing: Easing.bezier(0.42, 0, 0.58, 1),}),- transform: `scale(${interpolate(p, [0.3, 0.62], [1, 1.6], {+ scale: `${interpolate(p, [0.3, 0.62], [1, 1.6], {...clampOpts,easing: Easing.in(Easing.cubic),- })})`,+ })}`,};return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;}@@ -70,10 +70,10 @@ const RippleZoomPresentation: React.FC<const childStyle: React.CSSProperties = {opacity: interpolate(p, [0.45, 0.62], [0, 1], clampOpts),- transform: `scale(${interpolate(p, [0.42, 0.97], [0.2, 1], {+ scale: `${interpolate(p, [0.42, 0.97], [0.2, 1], {...clampOpts,easing: Easing.bezier(0.33, 1, 0.68, 1),- })})`,+ })}`,filter: `blur(${interpolate(p, [0.42, 0.8], [8, 0], clampOpts)}px)`,};diff --git a/registry/remocn/rolling-number/config.ts b/registry/remocn/rolling-number/config.tsindex e60cfe75..6516bde8 100644--- a/registry/remocn/rolling-number/config.ts+++ b/registry/remocn/rolling-number/config.ts@@ -5,31 +5,37 @@ export const rollingNumberConfig: ComponentConfig = {importPath: "@/components/remocn/rolling-number",controls: {from: {- type: "number-input",- default: 0,+ type: "number",min: 0,- max: 1000000,step: 1,- label: "From",+ default: 0,+ description: "From",+ hiddenFromList: false,},to: {- type: "number-input",- default: 24813,+ type: "number",min: 0,- max: 1000000,step: 1,- label: "To",+ default: 24813,+ description: "To",+ hiddenFromList: false,},fontSize: {type: "number",- default: 120,min: 24,max: 280,step: 4,- label: "Font size",+ default: 120,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },},+ dimensions: { width: 380, height: 140 },durationInFrames: 150,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/rolling-number/index.tsx b/registry/remocn/rolling-number/index.tsxindex 86a0e393..4bff538d 100644--- a/registry/remocn/rolling-number/index.tsx+++ b/registry/remocn/rolling-number/index.tsx@@ -91,14 +91,14 @@ function DigitColumn({verticalAlign: "top",textAlign: "center",opacity: reveal,- transform: `translateY(${(1 - reveal) * fontSize * REVEAL_RISE_EM}px)`,+ translate: `0 ${(1 - reveal) * fontSize * REVEAL_RISE_EM}px`,}}><spanstyle={{display: "flex",flexDirection: "column",- transform: `translateY(${-value * cellHeight}px)`,+ translate: `0 ${-value * cellHeight}px`,}}>{[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0].map((d, i) => (diff --git a/registry/remocn/rolodex-flip/config.ts b/registry/remocn/rolodex-flip/config.tsindex a5fb3469..60a05d35 100644--- a/registry/remocn/rolodex-flip/config.ts+++ b/registry/remocn/rolodex-flip/config.ts@@ -7,21 +7,24 @@ export const rolodexFlipConfig: ComponentConfig = {controls: {interval: {type: "number",- default: 20,min: 10,max: 40,step: 2,- label: "Interval",+ default: 20,+ description: "Interval",+ hiddenFromList: false,},flipDuration: {type: "number",- default: 10,min: 4,max: 20,step: 1,- label: "Flip duration",+ default: 10,+ description: "Flip duration",+ hiddenFromList: false,},},+ dimensions: { width: 220, height: 60 },durationInFrames: 110,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/scale-down-fade/config.ts b/registry/remocn/scale-down-fade/config.tsindex d9da3bcd..53478bef 100644--- a/registry/remocn/scale-down-fade/config.ts+++ b/registry/remocn/scale-down-fade/config.ts@@ -1,32 +1,41 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const scaleDownFadeConfig: ComponentConfig = {componentName: "ScaleDownFade",importPath: "@/components/remocn/scale-down-fade",controls: {- text: { type: "text", default: "Quietly refined.", label: "Text" },+ text: {+ type: "text-content",+ default: "Quietly refined.",+ description: "Text",+ },fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 600, height: 100 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/scale-down-fade/index.tsx b/registry/remocn/scale-down-fade/index.tsxindex 0ed5eb3b..0f646148 100644--- a/registry/remocn/scale-down-fade/index.tsx+++ b/registry/remocn/scale-down-fade/index.tsx@@ -99,7 +99,8 @@ export function ScaleDownFade({display: "inline-block",transformOrigin: "50% 50%",opacity,- transform: `translateY(${y}px) scale(${scale})`,+ translate: `0 ${y}px`,+ scale: `${scale}`,}}>{text}diff --git a/registry/remocn/scribble-circle/config.ts b/registry/remocn/scribble-circle/config.tsindex 0947fc06..72bc1712 100644--- a/registry/remocn/scribble-circle/config.ts+++ b/registry/remocn/scribble-circle/config.ts@@ -7,53 +7,67 @@ export const scribbleCircleConfig: ComponentConfig = {controls: {laps: {type: "number",- default: 1.15,min: 0.5,max: 3,step: 0.05,- label: "Laps",+ default: 1.15,+ description: "Laps",+ hiddenFromList: false,},strokeWidth: {type: "number",- default: 14,min: 4,max: 32,step: 1,- label: "Brush width",+ default: 14,+ description: "Brush width",+ hiddenFromList: false,},pressure: {type: "number",- default: 0.2,min: 0.05,max: 1,step: 0.05,- label: "Opening pressure",+ default: 0.2,+ description: "Opening pressure",+ hiddenFromList: false,},grain: {type: "number",- default: 1,min: 0,max: 2,step: 0.1,- label: "Grain",+ default: 1,+ description: "Grain",+ hiddenFromList: false,},durationSteps: {type: "number",- default: 10,min: 2,max: 20,step: 1,- label: "Poses to draw",+ default: 10,+ description: "Poses to draw",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#6f7f35",+ description: "Ink color",+ },+ seed: {+ type: "text-content",+ default: "scribble",+ description: "Seed",},- color: { type: "color", default: "#6f7f35", label: "Ink color" },- seed: { type: "text", default: "scribble", label: "Seed" },step: {type: "number",- default: 3,min: 1,max: 6,step: 1,- label: "Frames / pose",+ default: 3,+ description: "Frames / pose",+ hiddenFromList: false,},},snippet: scribbleCircleExampleCode,diff --git a/registry/remocn/security-cam/config.ts b/registry/remocn/security-cam/config.tsindex 7e374e42..790819ad 100644--- a/registry/remocn/security-cam/config.ts+++ b/registry/remocn/security-cam/config.ts@@ -7,35 +7,39 @@ export const securityCamConfig: ComponentConfig = {controls: {compression: {type: "number",- default: 0.7,min: 0,max: 1,step: 0.05,- label: "Compression",+ default: 0.7,+ description: "Compression",+ hiddenFromList: false,},blockSize: {type: "number",- default: 10,min: 4,max: 32,step: 1,- label: "Macroblock",+ default: 10,+ description: "Macroblock",+ hiddenFromList: false,},noise: {type: "number",- default: 0.6,min: 0,max: 2,step: 0.05,- label: "Sensor noise",+ default: 0.6,+ description: "Sensor noise",+ hiddenFromList: false,},intensity: {type: "number",- default: 1,min: 0,max: 1,step: 0.05,- label: "Intensity",+ default: 1,+ description: "Intensity",+ hiddenFromList: false,},},durationInFrames: 90,diff --git a/registry/remocn/shader-caustics/config.ts b/registry/remocn/shader-caustics/config.tsindex 0450523c..57e56f47 100644--- a/registry/remocn/shader-caustics/config.ts+++ b/registry/remocn/shader-caustics/config.ts@@ -6,36 +6,44 @@ export const shaderCausticsConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0,max: 3,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},scale: {type: "number",- default: 5.2,min: 1,max: 12,step: 0.1,- label: "Scale",+ default: 5.2,+ description: "Scale",+ hiddenFromList: false,},intensity: {type: "number",- default: 1,min: 0,max: 2,step: 0.1,- label: "Intensity",+ default: 1,+ description: "Intensity",+ hiddenFromList: false,+ },+ accent: {+ type: "color",+ default: "#7F57FF",+ description: "Accent",},- accent: { type: "color", default: "#7F57FF", label: "Accent" },accentAmount: {type: "number",- default: 0,min: 0,max: 1,step: 0.05,- label: "Accent amount",+ default: 0,+ description: "Accent amount",+ hiddenFromList: false,},},durationInFrames: 150,diff --git a/registry/remocn/shader-color-panels/config.ts b/registry/remocn/shader-color-panels/config.tsindex 49a15646..c3c664ba 100644--- a/registry/remocn/shader-color-panels/config.ts+++ b/registry/remocn/shader-color-panels/config.ts@@ -6,29 +6,36 @@ export const shaderColorPanelsConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},density: {type: "number",- default: 3,min: 1,max: 8,step: 1,- label: "Density",+ default: 3,+ description: "Density",+ hiddenFromList: false,},length: {type: "number",- default: 1.1,min: 0.5,max: 3,step: 0.1,- label: "Length",+ default: 1.1,+ description: "Length",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#12121a",+ description: "Background",},- colorBack: { type: "color", default: "#12121a", label: "Background" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/shader-dithering/config.ts b/registry/remocn/shader-dithering/config.tsindex 9bac4830..b2d13790 100644--- a/registry/remocn/shader-dithering/config.ts+++ b/registry/remocn/shader-dithering/config.ts@@ -6,22 +6,32 @@ export const shaderDitheringConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},size: {type: "number",- default: 2,min: 1,max: 8,step: 1,- label: "Dot Size",+ default: 2,+ description: "Dot Size",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#12121a",+ description: "Background",+ },+ colorFront: {+ type: "color",+ default: "#6a6a85",+ description: "Front",},- colorBack: { type: "color", default: "#12121a", label: "Background" },- colorFront: { type: "color", default: "#6a6a85", label: "Front" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/shader-dot-orbit/config.ts b/registry/remocn/shader-dot-orbit/config.tsindex 91dcd00c..30d030db 100644--- a/registry/remocn/shader-dot-orbit/config.ts+++ b/registry/remocn/shader-dot-orbit/config.ts@@ -6,29 +6,36 @@ export const shaderDotOrbitConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},size: {type: "number",- default: 1,min: 0.1,max: 3,step: 0.1,- label: "Size",+ default: 1,+ description: "Size",+ hiddenFromList: false,},spreading: {type: "number",- default: 1,min: 0,max: 2,step: 0.1,- label: "Spreading",+ default: 1,+ description: "Spreading",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#12121a",+ description: "Background",},- colorBack: { type: "color", default: "#12121a", label: "Background" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/shader-gem-smoke/config.ts b/registry/remocn/shader-gem-smoke/config.tsindex 8494d202..ba0c387a 100644--- a/registry/remocn/shader-gem-smoke/config.ts+++ b/registry/remocn/shader-gem-smoke/config.ts@@ -6,36 +6,44 @@ export const shaderGemSmokeConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0,max: 3,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#0a0a10",+ description: "Background",},- colorBack: { type: "color", default: "#0a0a10", label: "Background" },innerDistortion: {type: "number",- default: 0.8,min: 0,max: 2,step: 0.05,- label: "Inner distortion",+ default: 0.8,+ description: "Inner distortion",+ hiddenFromList: false,},outerDistortion: {type: "number",- default: 0.6,min: 0,max: 2,step: 0.05,- label: "Outer distortion",+ default: 0.6,+ description: "Outer distortion",+ hiddenFromList: false,},size: {type: "number",- default: 0.8,min: 0.2,max: 1.5,step: 0.05,- label: "Size",+ default: 0.8,+ description: "Size",+ hiddenFromList: false,},},durationInFrames: 150,diff --git a/registry/remocn/shader-god-rays/config.ts b/registry/remocn/shader-god-rays/config.tsindex be593dae..565de616 100644--- a/registry/remocn/shader-god-rays/config.ts+++ b/registry/remocn/shader-god-rays/config.ts@@ -6,37 +6,45 @@ export const shaderGodRaysConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},intensity: {type: "number",- default: 0.8,min: 0,max: 2,step: 0.05,- label: "Intensity",+ default: 0.8,+ description: "Intensity",+ hiddenFromList: false,},density: {type: "number",- default: 0.3,min: 0,max: 1,step: 0.05,- label: "Density",+ default: 0.3,+ description: "Density",+ hiddenFromList: false,},bloom: {type: "number",- default: 0.4,min: 0,max: 1,step: 0.05,- label: "Bloom",+ default: 0.4,+ description: "Bloom",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#12121a",+ description: "Background",},- colorBack: { type: "color", default: "#12121a", label: "Background" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/shader-grain-gradient/config.ts b/registry/remocn/shader-grain-gradient/config.tsindex 82e2c897..8e8c53c5 100644--- a/registry/remocn/shader-grain-gradient/config.ts+++ b/registry/remocn/shader-grain-gradient/config.ts@@ -6,37 +6,45 @@ export const shaderGrainGradientConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},softness: {type: "number",- default: 0.6,min: 0,max: 1,step: 0.05,- label: "Softness",+ default: 0.6,+ description: "Softness",+ hiddenFromList: false,},intensity: {type: "number",- default: 0.2,min: 0,max: 1,step: 0.05,- label: "Intensity",+ default: 0.2,+ description: "Intensity",+ hiddenFromList: false,},noise: {type: "number",- default: 0.15,min: 0,max: 1,step: 0.05,- label: "Noise",+ default: 0.15,+ description: "Noise",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#12121a",+ description: "Background",},- colorBack: { type: "color", default: "#12121a", label: "Background" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/shader-liquid-metal/config.ts b/registry/remocn/shader-liquid-metal/config.tsindex aa4259ef..45a6cd8c 100644--- a/registry/remocn/shader-liquid-metal/config.ts+++ b/registry/remocn/shader-liquid-metal/config.ts@@ -6,38 +6,50 @@ export const shaderLiquidMetalConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},distortion: {type: "number",- default: 0.1,min: 0,max: 0.5,step: 0.01,- label: "Distortion",+ default: 0.1,+ description: "Distortion",+ hiddenFromList: false,},repetition: {type: "number",- default: 1.5,min: 1,max: 6,step: 0.5,- label: "Repetition",+ default: 1.5,+ description: "Repetition",+ hiddenFromList: false,},contour: {type: "number",- default: 0.4,min: 0,max: 1,step: 0.05,- label: "Contour",+ default: 0.4,+ description: "Contour",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#2a2a30",+ description: "Background",+ },+ colorTint: {+ type: "color",+ default: "#8a8a95",+ description: "Tint",},- colorBack: { type: "color", default: "#2a2a30", label: "Background" },- colorTint: { type: "color", default: "#8a8a95", label: "Tint" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/shader-mesh-gradient/config.ts b/registry/remocn/shader-mesh-gradient/config.tsindex 25967c5e..2542309a 100644--- a/registry/remocn/shader-mesh-gradient/config.ts+++ b/registry/remocn/shader-mesh-gradient/config.ts@@ -6,27 +6,30 @@ export const shaderMeshGradientConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},distortion: {type: "number",- default: 0.6,min: 0,max: 1.5,step: 0.05,- label: "Distortion",+ default: 0.6,+ description: "Distortion",+ hiddenFromList: false,},swirl: {type: "number",- default: 0.1,min: 0,max: 1,step: 0.05,- label: "Swirl",+ default: 0.1,+ description: "Swirl",+ hiddenFromList: false,},},durationInFrames: 150,diff --git a/registry/remocn/shader-metaballs/config.ts b/registry/remocn/shader-metaballs/config.tsindex a4f36b5d..386be456 100644--- a/registry/remocn/shader-metaballs/config.ts+++ b/registry/remocn/shader-metaballs/config.ts@@ -6,29 +6,36 @@ export const shaderMetaballsConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},count: {type: "number",- default: 10,min: 1,max: 20,step: 1,- label: "Count",+ default: 10,+ description: "Count",+ hiddenFromList: false,},size: {type: "number",- default: 0.83,min: 0.2,max: 1.5,step: 0.05,- label: "Size",+ default: 0.83,+ description: "Size",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#12121a",+ description: "Background",},- colorBack: { type: "color", default: "#12121a", label: "Background" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/shader-neuro-noise/config.ts b/registry/remocn/shader-neuro-noise/config.tsindex d3632a03..6f40b8d5 100644--- a/registry/remocn/shader-neuro-noise/config.ts+++ b/registry/remocn/shader-neuro-noise/config.ts@@ -6,30 +6,41 @@ export const shaderNeuroNoiseConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},brightness: {type: "number",- default: 0.05,min: 0,max: 1,step: 0.05,- label: "Brightness",+ default: 0.05,+ description: "Brightness",+ hiddenFromList: false,},contrast: {type: "number",- default: 0.3,min: 0,max: 1,step: 0.05,- label: "Contrast",+ default: 0.3,+ description: "Contrast",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#12121a",+ description: "Background",+ },+ colorMid: {+ type: "color",+ default: "#4a4a68",+ description: "Mid",},- colorBack: { type: "color", default: "#12121a", label: "Background" },- colorMid: { type: "color", default: "#4a4a68", label: "Mid" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/shader-perlin-noise/config.ts b/registry/remocn/shader-perlin-noise/config.tsindex 06decf29..25f3b571 100644--- a/registry/remocn/shader-perlin-noise/config.ts+++ b/registry/remocn/shader-perlin-noise/config.ts@@ -6,30 +6,41 @@ export const shaderPerlinNoiseConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},proportion: {type: "number",- default: 0.35,min: 0,max: 1,step: 0.05,- label: "Proportion",+ default: 0.35,+ description: "Proportion",+ hiddenFromList: false,},softness: {type: "number",- default: 0.1,min: 0,max: 1,step: 0.05,- label: "Softness",+ default: 0.1,+ description: "Softness",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#12121a",+ description: "Background",+ },+ colorFront: {+ type: "color",+ default: "#6a6a85",+ description: "Front",},- colorBack: { type: "color", default: "#12121a", label: "Background" },- colorFront: { type: "color", default: "#6a6a85", label: "Front" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/shader-pulsing-border/config.ts b/registry/remocn/shader-pulsing-border/config.tsindex 6407db58..28334b16 100644--- a/registry/remocn/shader-pulsing-border/config.ts+++ b/registry/remocn/shader-pulsing-border/config.ts@@ -6,37 +6,45 @@ export const shaderPulsingBorderConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},thickness: {type: "number",- default: 0.1,min: 0.02,max: 0.5,step: 0.02,- label: "Thickness",+ default: 0.1,+ description: "Thickness",+ hiddenFromList: false,},roundness: {type: "number",- default: 0.25,min: 0,max: 1,step: 0.05,- label: "Roundness",+ default: 0.25,+ description: "Roundness",+ hiddenFromList: false,},intensity: {type: "number",- default: 0.2,min: 0,max: 1,step: 0.05,- label: "Intensity",+ default: 0.2,+ description: "Intensity",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#12121a",+ description: "Background",},- colorBack: { type: "color", default: "#12121a", label: "Background" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/shader-simplex-noise/config.ts b/registry/remocn/shader-simplex-noise/config.tsindex ed873162..e49c2157 100644--- a/registry/remocn/shader-simplex-noise/config.ts+++ b/registry/remocn/shader-simplex-noise/config.ts@@ -6,27 +6,30 @@ export const shaderSimplexNoiseConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},stepsPerColor: {type: "number",- default: 2,min: 1,max: 6,step: 1,- label: "Steps",+ default: 2,+ description: "Steps",+ hiddenFromList: false,},softness: {type: "number",- default: 0.1,min: 0,max: 1,step: 0.05,- label: "Softness",+ default: 0.1,+ description: "Softness",+ hiddenFromList: false,},},durationInFrames: 150,diff --git a/registry/remocn/shader-smoke-ring/config.ts b/registry/remocn/shader-smoke-ring/config.tsindex c9d0c9d4..caefacd6 100644--- a/registry/remocn/shader-smoke-ring/config.ts+++ b/registry/remocn/shader-smoke-ring/config.ts@@ -6,37 +6,45 @@ export const shaderSmokeRingConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},radius: {type: "number",- default: 0.25,min: 0,max: 1,step: 0.05,- label: "Radius",+ default: 0.25,+ description: "Radius",+ hiddenFromList: false,},thickness: {type: "number",- default: 0.65,min: 0.1,max: 1.5,step: 0.05,- label: "Thickness",+ default: 0.65,+ description: "Thickness",+ hiddenFromList: false,},scale: {type: "number",- default: 0.8,min: 0.3,max: 2,step: 0.05,- label: "Scale",+ default: 0.8,+ description: "Scale",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#12121a",+ description: "Background",},- colorBack: { type: "color", default: "#12121a", label: "Background" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/shader-spiral/config.ts b/registry/remocn/shader-spiral/config.tsindex fbb2e3b8..804c1222 100644--- a/registry/remocn/shader-spiral/config.ts+++ b/registry/remocn/shader-spiral/config.ts@@ -6,37 +6,45 @@ export const shaderSpiralConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},density: {type: "number",- default: 1,min: 0.2,max: 4,step: 0.1,- label: "Density",+ default: 1,+ description: "Density",+ hiddenFromList: false,},strokeWidth: {type: "number",- default: 0.5,min: 0.05,max: 1,step: 0.05,- label: "Stroke",+ default: 0.5,+ description: "Stroke",+ hiddenFromList: false,},softness: {type: "number",- default: 0.2,min: 0,max: 1,step: 0.05,- label: "Softness",+ default: 0.2,+ description: "Softness",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#12121a",+ description: "Background",},- colorBack: { type: "color", default: "#12121a", label: "Background" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/shader-strata/config.ts b/registry/remocn/shader-strata/config.tsindex 8adcd174..704eb3e4 100644--- a/registry/remocn/shader-strata/config.ts+++ b/registry/remocn/shader-strata/config.ts@@ -6,36 +6,44 @@ export const shaderStrataConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0,max: 3,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},layers: {type: "number",- default: 14,min: 4,max: 30,step: 1,- label: "Layers",+ default: 14,+ description: "Layers",+ hiddenFromList: false,},amplitude: {type: "number",- default: 0.16,min: 0,max: 0.5,step: 0.01,- label: "Amplitude",+ default: 0.16,+ description: "Amplitude",+ hiddenFromList: false,+ },+ accent: {+ type: "color",+ default: "#6733FF",+ description: "Accent",},- accent: { type: "color", default: "#6733FF", label: "Accent" },accentAmount: {type: "number",- default: 0,min: 0,max: 1,step: 0.05,- label: "Accent amount",+ default: 0,+ description: "Accent amount",+ hiddenFromList: false,},},durationInFrames: 150,diff --git a/registry/remocn/shader-swirl/config.ts b/registry/remocn/shader-swirl/config.tsindex 5685531e..d56a87d2 100644--- a/registry/remocn/shader-swirl/config.ts+++ b/registry/remocn/shader-swirl/config.ts@@ -6,37 +6,45 @@ export const shaderSwirlConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},bandCount: {type: "number",- default: 4,min: 1,max: 12,step: 1,- label: "Bands",+ default: 4,+ description: "Bands",+ hiddenFromList: false,},twist: {type: "number",- default: 0.1,min: 0,max: 1,step: 0.05,- label: "Twist",+ default: 0.1,+ description: "Twist",+ hiddenFromList: false,},softness: {type: "number",- default: 0.2,min: 0,max: 1,step: 0.05,- label: "Softness",+ default: 0.2,+ description: "Softness",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#12121a",+ description: "Background",},- colorBack: { type: "color", default: "#12121a", label: "Background" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/shader-voronoi/config.ts b/registry/remocn/shader-voronoi/config.tsindex 7ad2108e..3a7250a2 100644--- a/registry/remocn/shader-voronoi/config.ts+++ b/registry/remocn/shader-voronoi/config.ts@@ -6,37 +6,45 @@ export const shaderVoronoiConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},distortion: {type: "number",- default: 0.4,min: 0,max: 1,step: 0.05,- label: "Distortion",+ default: 0.4,+ description: "Distortion",+ hiddenFromList: false,},gap: {type: "number",- default: 0.04,min: 0,max: 0.2,step: 0.01,- label: "Gap",+ default: 0.04,+ description: "Gap",+ hiddenFromList: false,},glow: {type: "number",- default: 0,min: 0,max: 1,step: 0.05,- label: "Glow",+ default: 0,+ description: "Glow",+ hiddenFromList: false,+ },+ colorGap: {+ type: "color",+ default: "#12121a",+ description: "Gap Color",},- colorGap: { type: "color", default: "#12121a", label: "Gap Color" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/shader-warp/config.ts b/registry/remocn/shader-warp/config.tsindex 062c8d2c..ce03a817 100644--- a/registry/remocn/shader-warp/config.ts+++ b/registry/remocn/shader-warp/config.ts@@ -6,43 +6,48 @@ export const shaderWarpConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},distortion: {type: "number",- default: 0.2,min: 0,max: 1,step: 0.05,- label: "Distortion",+ default: 0.2,+ description: "Distortion",+ hiddenFromList: false,},swirl: {type: "number",- default: 0.4,min: 0,max: 1,step: 0.05,- label: "Swirl",+ default: 0.4,+ description: "Swirl",+ hiddenFromList: false,},softness: {type: "number",- default: 1,min: 0,max: 1,step: 0.05,- label: "Softness",+ default: 1,+ description: "Softness",+ hiddenFromList: false,},proportion: {type: "number",- default: 0.5,min: 0,max: 1,step: 0.05,- label: "Proportion",+ default: 0.5,+ description: "Proportion",+ hiddenFromList: false,},},durationInFrames: 150,diff --git a/registry/remocn/shader-water/config.ts b/registry/remocn/shader-water/config.tsindex e0982647..2e528c2e 100644--- a/registry/remocn/shader-water/config.ts+++ b/registry/remocn/shader-water/config.ts@@ -6,37 +6,45 @@ export const shaderWaterConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0.1,max: 4,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},waves: {type: "number",- default: 0.3,min: 0,max: 1,step: 0.05,- label: "Waves",+ default: 0.3,+ description: "Waves",+ hiddenFromList: false,},caustic: {type: "number",- default: 0.08,min: 0,max: 1,step: 0.02,- label: "Caustic",+ default: 0.08,+ description: "Caustic",+ hiddenFromList: false,},highlights: {type: "number",- default: 0.06,min: 0,max: 1,step: 0.02,- label: "Highlights",+ default: 0.06,+ description: "Highlights",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#16202b",+ description: "Background",},- colorBack: { type: "color", default: "#16202b", label: "Background" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/shader-weave/config.ts b/registry/remocn/shader-weave/config.tsindex 743b7b0a..88cc71d7 100644--- a/registry/remocn/shader-weave/config.ts+++ b/registry/remocn/shader-weave/config.ts@@ -6,36 +6,44 @@ export const shaderWeaveConfig: ComponentConfig = {controls: {speed: {type: "number",- default: 1,min: 0,max: 3,step: 0.1,- label: "Speed",+ default: 1,+ description: "Speed",+ hiddenFromList: false,},scale: {type: "number",- default: 22,min: 6,max: 48,step: 1,- label: "Scale",+ default: 22,+ description: "Scale",+ hiddenFromList: false,},warp: {type: "number",- default: 0.03,min: 0,max: 0.2,step: 0.01,- label: "Warp",+ default: 0.03,+ description: "Warp",+ hiddenFromList: false,+ },+ accent: {+ type: "color",+ default: "#6733FF",+ description: "Accent",},- accent: { type: "color", default: "#6733FF", label: "Accent" },accentAmount: {type: "number",- default: 0,min: 0,max: 1,step: 0.05,- label: "Accent amount",+ default: 0,+ description: "Accent amount",+ hiddenFromList: false,},},durationInFrames: 150,diff --git a/registry/remocn/shared-axis-y/config.ts b/registry/remocn/shared-axis-y/config.tsindex 621000c4..b852ecd7 100644--- a/registry/remocn/shared-axis-y/config.ts+++ b/registry/remocn/shared-axis-y/config.ts@@ -1,41 +1,46 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const sharedAxisYConfig: ComponentConfig = {componentName: "SharedAxisY",importPath: "@/components/remocn/shared-axis-y",controls: {fromText: {- type: "text",+ type: "text-content",default: "Layered navigation.",- label: "From text",+ description: "From text",},toText: {- type: "text",+ type: "text-content",default: "Hierarchy made clear.",- label: "To text",+ description: "To text",},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 720, height: 100 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/shared-axis-z/config.ts b/registry/remocn/shared-axis-z/config.tsindex 75805447..b2c29b10 100644--- a/registry/remocn/shared-axis-z/config.ts+++ b/registry/remocn/shared-axis-z/config.ts@@ -1,37 +1,46 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const sharedAxisZConfig: ComponentConfig = {componentName: "SharedAxisZ",importPath: "@/components/remocn/shared-axis-z",controls: {fromText: {- type: "text",+ type: "text-content",default: "Zooming between states.",- label: "From text",+ description: "From text",+ },+ toText: {+ type: "text-content",+ default: "Elevate and settle.",+ description: "To text",},- toText: { type: "text", default: "Elevate and settle.", label: "To text" },fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 870, height: 100 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/shared-axis-z/index.tsx b/registry/remocn/shared-axis-z/index.tsxindex a65b86c7..86ff31c0 100644--- a/registry/remocn/shared-axis-z/index.tsx+++ b/registry/remocn/shared-axis-z/index.tsx@@ -98,7 +98,7 @@ export function SharedAxisZ({display: "inline-block",transformOrigin: "50% 50%",opacity: fromOpacity,- transform: `scale(${fromScale})`,+ scale: `${fromScale}`,filter: `blur(${fromBlur}px)`,}}>@@ -125,7 +125,7 @@ export function SharedAxisZ({display: "inline-block",transformOrigin: "50% 50%",opacity: toOpacity,- transform: `scale(${toScale})`,+ scale: `${toScale}`,filter: `blur(${toBlur}px)`,}}>diff --git a/registry/remocn/shimmer-sweep/config.ts b/registry/remocn/shimmer-sweep/config.tsindex 19fd3940..bd8fc996 100644--- a/registry/remocn/shimmer-sweep/config.ts+++ b/registry/remocn/shimmer-sweep/config.ts@@ -1,33 +1,46 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const shimmerSweepConfig: ComponentConfig = {componentName: "ShimmerSweep",importPath: "@/components/remocn/shimmer-sweep",controls: {- text: { type: "text", default: "Generating", label: "Text" },- baseColor: { type: "color", default: "#3f3f46", label: "Base color" },- shineColor: { type: "color", default: "#fafafa", label: "Shine color" },+ text: {+ type: "text-content",+ default: "Generating",+ description: "Text",+ },+ baseColor: {+ type: "color",+ default: "#3f3f46",+ description: "Base color",+ },+ shineColor: {+ type: "color",+ default: "#fafafa",+ description: "Shine color",+ },fontSize: {type: "number",- default: 96,min: 12,max: 200,step: 1,- label: "Font size",+ default: 96,+ description: "Font size",+ hiddenFromList: false,},fontWeight: {- type: "select",+ type: "enum",default: "700",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 500, height: 130 },durationInFrames: 120,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/short-slide-down/config.ts b/registry/remocn/short-slide-down/config.tsindex 4e51a7d6..e45ee101 100644--- a/registry/remocn/short-slide-down/config.ts+++ b/registry/remocn/short-slide-down/config.ts@@ -1,40 +1,50 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const shortSlideDownConfig: ComponentConfig = {componentName: "ShortSlideDown",importPath: "@/components/remocn/short-slide-down",controls: {- text: { type: "text", default: "Build from above.", label: "Text" },+ text: {+ type: "text-content",+ default: "Build from above.",+ description: "Text",+ },entryOffset: {type: "number",- default: 28,min: 8,max: 80,step: 1,- label: "Entry offset",+ default: 28,+ description: "Entry offset",+ hiddenFromList: false,},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 640, height: 100 },durationInFrames: 60,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/short-slide-right/config.ts b/registry/remocn/short-slide-right/config.tsindex d4ceb712..eba3586f 100644--- a/registry/remocn/short-slide-right/config.ts+++ b/registry/remocn/short-slide-right/config.ts@@ -1,48 +1,59 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const shortSlideRightConfig: ComponentConfig = {componentName: "ShortSlideRight",importPath: "@/components/remocn/short-slide-right",controls: {- text: { type: "text", default: "Move with intent.", label: "Text" },+ text: {+ type: "text-content",+ default: "Move with intent.",+ description: "Text",+ },distance: {type: "number",- default: 24,min: 0,max: 120,step: 1,- label: "Distance",+ default: 24,+ description: "Distance",+ hiddenFromList: false,},staggerDelay: {type: "number",- default: 3,min: 0,max: 12,step: 1,- label: "Stagger",+ default: 3,+ description: "Stagger",+ hiddenFromList: false,},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 640, height: 100 },durationInFrames: 60,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/short-slide-right/index.tsx b/registry/remocn/short-slide-right/index.tsxindex 84e16141..d80cbcd7 100644--- a/registry/remocn/short-slide-right/index.tsx+++ b/registry/remocn/short-slide-right/index.tsx@@ -65,7 +65,7 @@ export function ShortSlideRight({fontFamily:"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif",display: "inline-block",- transform: `translateX(${x}px)`,+ translate: `${x}px`,filter: `blur(${blurVal}px)`,}}>diff --git a/registry/remocn/simulated-cursor/config.ts b/registry/remocn/simulated-cursor/config.tsindex 2d0db66e..1625d657 100644--- a/registry/remocn/simulated-cursor/config.ts+++ b/registry/remocn/simulated-cursor/config.ts@@ -4,16 +4,22 @@ export const simulatedCursorConfig: ComponentConfig = {componentName: "SimulatedCursor",importPath: "@/components/remocn/simulated-cursor",controls: {- color: { type: "color", default: "#ffffff", label: "Color" },+ color: {+ type: "color",+ default: "#ffffff",+ description: "Color",+ },size: {type: "number",- default: 32,min: 12,max: 96,step: 1,- label: "Size",+ default: 32,+ description: "Size",+ hiddenFromList: false,},},+ dimensions: { width: 890, height: 450 },durationInFrames: 150,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/simulated-cursor/index.tsx b/registry/remocn/simulated-cursor/index.tsxindex e489a6ab..487e6a1d 100644--- a/registry/remocn/simulated-cursor/index.tsx+++ b/registry/remocn/simulated-cursor/index.tsx@@ -161,7 +161,7 @@ export function SimulatedCursor({top: y,width: size,height: size,- transform: `scale(${clickScale})`,+ scale: `${clickScale}`,transformOrigin: "top left",zIndex: 2147483647,pointerEvents: "none",diff --git a/registry/remocn/slide-swap/config.ts b/registry/remocn/slide-swap/config.tsindex f0f5fcdc..ba2c98f9 100644--- a/registry/remocn/slide-swap/config.ts+++ b/registry/remocn/slide-swap/config.ts@@ -6,34 +6,40 @@ export const slideSwapConfig: ComponentConfig = {importPath: "@/components/remocn/slide-swap",controls: {axis: {- type: "select",+ type: "enum",default: "x",- options: ["x", "y"],- label: "Axis",+ variants: {+ x: {},+ y: {},+ },+ description: "Axis",},inDistance: {type: "number",- default: 0.28,min: 0.05,max: 0.8,step: 0.01,- label: "Enter distance",+ default: 0.28,+ description: "Enter distance",+ hiddenFromList: false,},outDistance: {type: "number",- default: 0.1,min: 0,max: 0.5,step: 0.01,- label: "Exit distance",+ default: 0.1,+ description: "Exit distance",+ hiddenFromList: false,},slideFrames: {type: "number",- default: 30,min: 12,max: 60,step: 1,- label: "Enter window",+ default: 30,+ description: "Enter window",+ hiddenFromList: false,},},durationInFrames: 210,diff --git a/registry/remocn/slide-swap/index.tsx b/registry/remocn/slide-swap/index.tsxindex a45d3fef..d11b0540 100644--- a/registry/remocn/slide-swap/index.tsx+++ b/registry/remocn/slide-swap/index.tsx@@ -37,7 +37,7 @@ export const SLIDE_SWAP_DEFAULTS: SlideSwapConfig = {export type SlideAxis = "x" | "y";const translate = (axis: SlideAxis, v: number) =>- axis === "x" ? `translateX(${v}px)` : `translateY(${v}px)`;+ axis === "x" ? `${v}px` : `0 ${v}px`;export const slideInStyle = (e: number,@@ -60,7 +60,7 @@ export const slideInStyle = (});const tFade = Math.min(Math.max(e / cfg.inFadeFrames, 0), 1);return {- transform: translate(axis, cfg.inDistance * size * (1 - p)),+ translate: translate(axis, cfg.inDistance * size * (1 - p)),opacity: 1 - (1 - tFade) * (1 - tFade),willChange: "transform, opacity",};@@ -76,7 +76,7 @@ export const slideOutStyle = (if (e <= 0) return {};const t = Math.min(e / cfg.outFrames, 1);return {- transform: translate(axis, -cfg.outDistance * size * t ** cfg.outPower),+ translate: translate(axis, -cfg.outDistance * size * t ** cfg.outPower),opacity: 1 - t * t,willChange: "transform, opacity",};diff --git a/registry/remocn/slot-machine-roll/config.ts b/registry/remocn/slot-machine-roll/config.tsindex 7109c9db..83108502 100644--- a/registry/remocn/slot-machine-roll/config.ts+++ b/registry/remocn/slot-machine-roll/config.ts@@ -1,33 +1,46 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const slotMachineRollConfig: ComponentConfig = {componentName: "SlotMachineRoll",importPath: "@/components/remocn/slot-machine-roll",controls: {- from: { type: "text", default: "$99", label: "From" },- to: { type: "text", default: "$199", label: "To" },+ from: {+ type: "text-content",+ default: "$99",+ description: "From",+ },+ to: {+ type: "text-content",+ default: "$199",+ description: "To",+ },fontSize: {type: "number",- default: 120,min: 12,max: 240,step: 1,- label: "Font size",+ default: 120,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "700",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 190, height: 170 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/slot-machine-roll/index.tsx b/registry/remocn/slot-machine-roll/index.tsxindex 1651c6a2..9b7075f9 100644--- a/registry/remocn/slot-machine-roll/index.tsx+++ b/registry/remocn/slot-machine-roll/index.tsx@@ -53,7 +53,7 @@ export function SlotMachineRoll({style={{display: "flex",flexDirection: "column",- transform: `translateY(${-t * fontSize * 1.1}px)`,+ translate: `0 ${-t * fontSize * 1.1}px`,}}><span>{paddedFrom[i]}</span>diff --git a/registry/remocn/smoke-dissolve/config.ts b/registry/remocn/smoke-dissolve/config.tsindex b149784d..697aedee 100644--- a/registry/remocn/smoke-dissolve/config.ts+++ b/registry/remocn/smoke-dissolve/config.ts@@ -5,8 +5,16 @@ export const smokeDissolveConfig: ComponentConfig = {componentName: "smokeDissolve",importPath: "@/components/remocn/smoke-dissolve",controls: {- ringColor: { type: "color", default: "#8f88ae", label: "Ring" },- colorBack: { type: "color", default: "#141318", label: "Background" },+ ringColor: {+ type: "color",+ default: "#8f88ae",+ description: "Ring",+ },+ colorBack: {+ type: "color",+ default: "#141318",+ description: "Background",+ },},durationInFrames: 116,fps: FPS,diff --git a/registry/remocn/smoke-dissolve/index.tsx b/registry/remocn/smoke-dissolve/index.tsxindex 59317686..fc102ded 100644--- a/registry/remocn/smoke-dissolve/index.tsx+++ b/registry/remocn/smoke-dissolve/index.tsx@@ -44,10 +44,10 @@ const SmokeDissolvePresentation: React.FC<const childStyle: React.CSSProperties = entering? {opacity: interpolate(p, [0.55, 0.68], [0, 1], clampOpts),- transform: `scale(${interpolate(p, [0.55, 1], [0.3, 1], {+ scale: `${interpolate(p, [0.55, 1], [0.3, 1], {...clampOpts,easing: Easing.out(Easing.cubic),- })})`,+ })}`,filter: `blur(${interpolate(p, [0.55, 0.75], [10, 0], clampOpts)}px)`,}: { opacity: interpolate(p, [0.06, 0.13], [1, 0], clampOpts) };diff --git a/registry/remocn/soft-blur-in/config.ts b/registry/remocn/soft-blur-in/config.tsindex 45860e86..b9a6f761 100644--- a/registry/remocn/soft-blur-in/config.ts+++ b/registry/remocn/soft-blur-in/config.ts@@ -1,40 +1,50 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const softBlurInConfig: ComponentConfig = {componentName: "SoftBlurIn",importPath: "@/components/remocn/soft-blur-in",controls: {- text: { type: "text", default: "Think different.", label: "Text" },+ text: {+ type: "text-content",+ default: "Think different.",+ description: "Text",+ },blur: {type: "number",- default: 12,min: 1,max: 30,step: 1,- label: "Blur",+ default: 12,+ description: "Blur",+ hiddenFromList: false,},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 600, height: 100 },durationInFrames: 60,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/soft-blur-in/index.tsx b/registry/remocn/soft-blur-in/index.tsxindex 5b59195d..6bd443ca 100644--- a/registry/remocn/soft-blur-in/index.tsx+++ b/registry/remocn/soft-blur-in/index.tsx@@ -78,7 +78,7 @@ export function SoftBlurIn({backfaceVisibility: "hidden",transformOrigin: "50% 55%",opacity,- transform: `translateY(${y}px)`,+ translate: `0 ${y}px`,filter: `blur(${blurAmount}px)`,}}>diff --git a/registry/remocn/spring-scale-in/config.ts b/registry/remocn/spring-scale-in/config.tsindex fa3427be..0c8b50aa 100644--- a/registry/remocn/spring-scale-in/config.ts+++ b/registry/remocn/spring-scale-in/config.ts@@ -1,48 +1,59 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const springScaleInConfig: ComponentConfig = {componentName: "SpringScaleIn",importPath: "@/components/remocn/spring-scale-in",controls: {- text: { type: "text", default: "Fast. Crisp. Fluid.", label: "Text" },+ text: {+ type: "text-content",+ default: "Fast. Crisp. Fluid.",+ description: "Text",+ },staggerDelay: {type: "number",- default: 3,min: 1,max: 12,step: 1,- label: "Stagger",+ default: 3,+ description: "Stagger",+ hiddenFromList: false,},scaleFrom: {type: "number",- default: 0.7,min: 0.1,max: 1,step: 0.05,- label: "Scale from",+ default: 0.7,+ description: "Scale from",+ hiddenFromList: false,},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 720, height: 100 },durationInFrames: 60,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/spring-scale-in/index.tsx b/registry/remocn/spring-scale-in/index.tsxindex 8987fe1a..c23dd4f6 100644--- a/registry/remocn/spring-scale-in/index.tsx+++ b/registry/remocn/spring-scale-in/index.tsx@@ -76,7 +76,7 @@ export function SpringScaleIn({marginRight: "0.25em",transformOrigin: "50% 50%",opacity,- transform: `scale(${scale})`,+ scale: `${scale}`,}}>{word}diff --git a/registry/remocn/spring-settle/config.ts b/registry/remocn/spring-settle/config.tsindex c9390451..24c702d6 100644--- a/registry/remocn/spring-settle/config.ts+++ b/registry/remocn/spring-settle/config.ts@@ -7,35 +7,39 @@ export const springSettleConfig: ComponentConfig = {controls: {enterScale: {type: "number",- default: 1.24,min: 1,max: 1.8,step: 0.02,- label: "Enter scale",+ default: 1.24,+ description: "Enter scale",+ hiddenFromList: false,},enterStagger: {type: "number",- default: 3,min: 0,max: 10,step: 0.5,- label: "Stagger",+ default: 3,+ description: "Stagger",+ hiddenFromList: false,},exitScale: {type: "number",- default: 0.84,min: 0.5,max: 1,step: 0.02,- label: "Exit scale",+ default: 0.84,+ description: "Exit scale",+ hiddenFromList: false,},exitFrames: {type: "number",- default: 6,min: 2,max: 24,step: 1,- label: "Exit frames",+ default: 6,+ description: "Exit frames",+ hiddenFromList: false,},},durationInFrames: 213,diff --git a/registry/remocn/spring-settle/index.tsx b/registry/remocn/spring-settle/index.tsxindex c3dfd0fa..a8a15223 100644--- a/registry/remocn/spring-settle/index.tsx+++ b/registry/remocn/spring-settle/index.tsx@@ -132,7 +132,7 @@ export const springSettleExitStyle = (if (tExit <= 0) return {};const eExit = tExit ** cfg.exitPower;return {- transform: `scale(${1 - (1 - cfg.exitScale) * eExit})`,+ scale: `${1 - (1 - cfg.exitScale) * eExit}`,opacity: 1 - eExit,willChange: "transform, opacity",};@@ -199,7 +199,7 @@ export function SpringSettleItem({<divstyle={{...style,- transform: `scale(${scaleEnter})`,+ scale: `${scaleEnter}`,opacity: opacityEnter,willChange: "transform, opacity",}}diff --git a/registry/remocn/staggered-fade-up/config.ts b/registry/remocn/staggered-fade-up/config.tsindex 6ca0454a..150df313 100644--- a/registry/remocn/staggered-fade-up/config.ts+++ b/registry/remocn/staggered-fade-up/config.ts@@ -1,48 +1,59 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const staggeredFadeUpConfig: ComponentConfig = {componentName: "StaggeredFadeUp",importPath: "@/components/remocn/staggered-fade-up",controls: {- text: { type: "text", default: "Ship faster with remocn", label: "Text" },+ text: {+ type: "text-content",+ default: "Ship faster with remocn",+ description: "Text",+ },staggerDelay: {type: "number",- default: 4,min: 0,max: 30,step: 1,- label: "Stagger delay",+ default: 4,+ description: "Stagger delay",+ hiddenFromList: false,},distance: {type: "number",- default: 20,min: 0,max: 120,step: 1,- label: "Distance",+ default: 20,+ description: "Distance",+ hiddenFromList: false,},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 870, height: 100 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/staggered-fade-up/index.tsx b/registry/remocn/staggered-fade-up/index.tsxindex 1a126904..5fef4337 100644--- a/registry/remocn/staggered-fade-up/index.tsx+++ b/registry/remocn/staggered-fade-up/index.tsx@@ -66,7 +66,7 @@ export function StaggeredFadeUp({display: "inline-block",marginRight: "0.25em",opacity,- transform: `translateY(${y}px)`,+ translate: `0 ${y}px`,}}>{word}diff --git a/registry/remocn/stretch-in/config.ts b/registry/remocn/stretch-in/config.tsindex 399822e8..23d9fc4a 100644--- a/registry/remocn/stretch-in/config.ts+++ b/registry/remocn/stretch-in/config.ts@@ -4,39 +4,51 @@ export const stretchInConfig: ComponentConfig = {componentName: "StretchIn",importPath: "@/components/remocn/stretch-in",controls: {- text: { type: "text", default: "REMOCN", label: "Text" },- fill: { type: "color", default: "#ffffff", label: "Fill" },+ text: {+ type: "text-content",+ default: "REMOCN",+ description: "Text",+ },+ fill: {+ type: "color",+ default: "#ffffff",+ description: "Fill",+ },fontSize: {type: "number",- default: 510,min: 100,max: 700,step: 10,- label: "Font size",+ default: 510,+ description: "Font size",+ hiddenFromList: false,},entryStagger: {type: "number",- default: 3,min: 0,max: 12,step: 1,- label: "Letter stagger",+ default: 3,+ description: "Letter stagger",+ hiddenFromList: false,},travelFrames: {type: "number",- default: 33,min: 4,max: 40,step: 1,- label: "Travel (frames)",+ default: 33,+ description: "Travel (frames)",+ hiddenFromList: false,},vertexLagFrames: {type: "number",- default: 3.5,min: 0,max: 8,step: 0.5,- label: "Smear lag (frames)",+ default: 3.5,+ description: "Smear lag (frames)",+ hiddenFromList: false,},},durationInFrames: 60,diff --git a/registry/remocn/strikethrough-replace/config.ts b/registry/remocn/strikethrough-replace/config.tsindex 04110270..1dc61db2 100644--- a/registry/remocn/strikethrough-replace/config.ts+++ b/registry/remocn/strikethrough-replace/config.ts@@ -1,34 +1,51 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const strikethroughReplaceConfig: ComponentConfig = {componentName: "StrikethroughReplace",importPath: "@/components/remocn/strikethrough-replace",controls: {- from: { type: "text", default: "$49/mo", label: "From" },- to: { type: "text", default: "Free", label: "To" },- lineColor: { type: "color", default: "#ff5e3a", label: "Line color" },+ from: {+ type: "text-content",+ default: "$49/mo",+ description: "From",+ },+ to: {+ type: "text-content",+ default: "Free",+ description: "To",+ },+ lineColor: {+ type: "color",+ default: "#ff5e3a",+ description: "Line color",+ },fontSize: {type: "number",- default: 96,min: 12,max: 160,step: 1,- label: "Font size",+ default: 96,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "700",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 300, height: 130 },durationInFrames: 120,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/strikethrough-replace/index.tsx b/registry/remocn/strikethrough-replace/index.tsxindex d4cc978e..6229cde5 100644--- a/registry/remocn/strikethrough-replace/index.tsx+++ b/registry/remocn/strikethrough-replace/index.tsx@@ -101,7 +101,7 @@ export function StrikethroughReplace({height: Math.max(2, Math.round(fontSize * 0.08)),width: `${linePct}%`,background: lineColor,- transform: "translateY(-50%)",+ translate: "0 -50%",borderRadius: 2,}}/>@@ -113,7 +113,7 @@ export function StrikethroughReplace({style={{...textStyle,opacity: toOpacity,- transform: `translateY(${toY}px)`,+ translate: `0 ${toY}px`,}}>{to}diff --git a/registry/remocn/sustained-glitch/config.ts b/registry/remocn/sustained-glitch/config.tsindex 8f9c0aaa..ca0bb42d 100644--- a/registry/remocn/sustained-glitch/config.ts+++ b/registry/remocn/sustained-glitch/config.ts@@ -7,35 +7,39 @@ export const sustainedGlitchConfig: ComponentConfig = {controls: {intensity: {type: "number",- default: 1,min: 0,max: 2,step: 0.05,- label: "Intensity",+ default: 1,+ description: "Intensity",+ hiddenFromList: false,},frequency: {type: "number",- default: 1,min: 0.1,max: 6,step: 0.1,- label: "Frequency",+ default: 1,+ description: "Frequency",+ hiddenFromList: false,},slices: {type: "number",- default: 24,min: 6,max: 48,step: 1,- label: "Slices",+ default: 24,+ description: "Slices",+ hiddenFromList: false,},seed: {type: "number",- default: 1,min: 1,max: 20,step: 1,- label: "Seed",+ default: 1,+ description: "Seed",+ hiddenFromList: false,},},durationInFrames: 120,diff --git a/registry/remocn/sustained-glitch/index.tsx b/registry/remocn/sustained-glitch/index.tsxindex 70479a25..ddc5e0dd 100644--- a/registry/remocn/sustained-glitch/index.tsx+++ b/registry/remocn/sustained-glitch/index.tsx@@ -166,7 +166,7 @@ const SustainedGlitchFallback: React.FC<key={band}style={{clipPath: `inset(${band * height}% 0 ${100 - (band + 1) * height}% 0)`,- transform: `translateX(${shift}px)`,+ translate: `${shift}px`,}}>{children}diff --git a/registry/remocn/swirl-dissolve/config.ts b/registry/remocn/swirl-dissolve/config.tsindex c2cbd157..61345109 100644--- a/registry/remocn/swirl-dissolve/config.ts+++ b/registry/remocn/swirl-dissolve/config.ts@@ -7,21 +7,27 @@ export const swirlDissolveConfig: ComponentConfig = {controls: {bandCount: {type: "number",- default: 10,min: 1,max: 12,step: 1,- label: "Bands",+ default: 10,+ description: "Bands",+ hiddenFromList: false,},softness: {type: "number",- default: 0.35,min: 0,max: 1,step: 0.05,- label: "Softness",+ default: 0.35,+ description: "Softness",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#141318",+ description: "Background",},- colorBack: { type: "color", default: "#141318", label: "Background" },},durationInFrames: 116,fps: FPS,diff --git a/registry/remocn/swirl-dissolve/index.tsx b/registry/remocn/swirl-dissolve/index.tsxindex 2d03a326..d634bb4c 100644--- a/registry/remocn/swirl-dissolve/index.tsx+++ b/registry/remocn/swirl-dissolve/index.tsx@@ -49,10 +49,10 @@ const SwirlDissolvePresentation: React.FC<const childStyle: React.CSSProperties = entering? {opacity: interpolate(p, [0.77, 0.87], [0, 1], clampOpts),- transform: `scale(${interpolate(p, [0.77, 1], [0.3, 1], {+ scale: `${interpolate(p, [0.77, 1], [0.3, 1], {...clampOpts,easing: Easing.out(Easing.cubic),- })})`,+ })}`,filter: `blur(${interpolate(p, [0.77, 0.93], [10, 0], clampOpts)}px)`,}: { opacity: interpolate(p, [0.06, 0.13], [1, 0], clampOpts) };diff --git a/registry/remocn/terminal-cursor-zoom/config.ts b/registry/remocn/terminal-cursor-zoom/config.tsindex bbf96c06..88f1d28a 100644--- a/registry/remocn/terminal-cursor-zoom/config.ts+++ b/registry/remocn/terminal-cursor-zoom/config.ts@@ -5,28 +5,38 @@ export const terminalCursorZoomConfig: ComponentConfig = {importPath: "@/components/remocn/terminal-cursor-zoom",controls: {command: {- type: "text",+ type: "text-content",default: "npx shadcn add @remocn/terminal-cursor-zoom",- label: "Command",+ description: "Command",},zoom: {type: "number",- default: 2.8,min: 1,max: 4,step: 0.1,- label: "Zoom",+ default: 2.8,+ description: "Zoom",+ hiddenFromList: false,},fontSize: {type: "number",- default: 20,min: 10,max: 32,step: 1,- label: "Font size",+ default: 20,+ description: "Font size",+ hiddenFromList: false,+ },+ prompt: {+ type: "text-content",+ default: "$",+ description: "Prompt",+ },+ title: {+ type: "text-content",+ default: "~/code/remocn-demo",+ description: "Title",},- prompt: { type: "text", default: "$", label: "Prompt" },- title: { type: "text", default: "~/code/remocn-demo", label: "Title" },},durationInFrames: 90,fps: FPS,diff --git a/registry/remocn/terminal-cursor-zoom/index.tsx b/registry/remocn/terminal-cursor-zoom/index.tsxindex 93934a46..ce0a3567 100644--- a/registry/remocn/terminal-cursor-zoom/index.tsx+++ b/registry/remocn/terminal-cursor-zoom/index.tsx@@ -77,7 +77,8 @@ export function TerminalCursorZoom({top: 0,width: STAGE_WIDTH,height: STAGE_HEIGHT,- transform: `translate(${tx}px, ${ty}px) scale(${zoom})`,+ translate: `${tx}px ${ty}px`,+ scale: `${zoom}`,transformOrigin: "0 0",}}>diff --git a/registry/remocn/terminal-simulator/config.ts b/registry/remocn/terminal-simulator/config.tsindex 19c88147..034cb1fc 100644--- a/registry/remocn/terminal-simulator/config.ts+++ b/registry/remocn/terminal-simulator/config.ts@@ -4,35 +4,55 @@ export const terminalSimulatorConfig: ComponentConfig = {componentName: "TerminalSimulator",importPath: "@/components/remocn/terminal-simulator",controls: {- prompt: { type: "text", default: "$", label: "Prompt" },- title: { type: "text", default: "~/projects/remocn", label: "Title" },- background: { type: "color", default: "#0a0a0a", label: "Background" },- chromeColor: { type: "color", default: "#1a1a1a", label: "Chrome color" },+ prompt: {+ type: "text-content",+ default: "$",+ description: "Prompt",+ },+ title: {+ type: "text-content",+ default: "~/projects/remocn",+ description: "Title",+ },+ background: {+ type: "color",+ default: "#0a0a0a",+ description: "Background",+ },+ chromeColor: {+ type: "color",+ default: "#1a1a1a",+ description: "Chrome color",+ },fontSize: {type: "number",- default: 18,min: 10,max: 32,step: 1,- label: "Font size",+ default: 18,+ description: "Font size",+ hiddenFromList: false,},charsPerFrame: {type: "number",- default: 1,min: 0.25,max: 6,step: 0.25,- label: "Chars / frame",+ default: 1,+ description: "Chars / frame",+ hiddenFromList: false,},chunkSize: {type: "number",- default: 1,min: 1,max: 20,step: 1,- label: "Chunk size",+ default: 1,+ description: "Chunk size",+ hiddenFromList: false,},},+ dimensions: { width: 900, height: 480 },durationInFrames: 240,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/terminal-simulator/index.tsx b/registry/remocn/terminal-simulator/index.tsxindex 3927653b..54b3e8c2 100644--- a/registry/remocn/terminal-simulator/index.tsx+++ b/registry/remocn/terminal-simulator/index.tsx@@ -178,7 +178,7 @@ export function TerminalSimulator({left: 20,right: 20,top: 20,- transform: `translateY(${translateY}px)`,+ translate: `0 ${translateY}px`,}}>{lines.map((line, index) => (diff --git a/registry/remocn/top-down-letters/config.ts b/registry/remocn/top-down-letters/config.tsindex 37d18088..0b413d7b 100644--- a/registry/remocn/top-down-letters/config.ts+++ b/registry/remocn/top-down-letters/config.ts@@ -1,48 +1,59 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const topDownLettersConfig: ComponentConfig = {componentName: "TopDownLetters",importPath: "@/components/remocn/top-down-letters",controls: {- text: { type: "text", default: "Signal", label: "Text" },+ text: {+ type: "text-content",+ default: "Signal",+ description: "Text",+ },staggerDelay: {type: "number",- default: 3,min: 1,max: 12,step: 1,- label: "Stagger",+ default: 3,+ description: "Stagger",+ hiddenFromList: false,},distance: {type: "number",- default: 46,min: 0,max: 120,step: 1,- label: "Distance",+ default: 46,+ description: "Distance",+ hiddenFromList: false,},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 230, height: 100 },durationInFrames: 60,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/top-down-letters/index.tsx b/registry/remocn/top-down-letters/index.tsxindex a5533e63..65ed454f 100644--- a/registry/remocn/top-down-letters/index.tsx+++ b/registry/remocn/top-down-letters/index.tsx@@ -73,7 +73,7 @@ export function TopDownLetters({backfaceVisibility: "hidden",transformOrigin: "50% 55%",opacity,- transform: `translateY(${y}px)`,+ translate: `0 ${y}px`,}}>{char}diff --git a/registry/remocn/tracking-in/config.ts b/registry/remocn/tracking-in/config.tsindex db161726..88bf43d6 100644--- a/registry/remocn/tracking-in/config.ts+++ b/registry/remocn/tracking-in/config.ts@@ -1,48 +1,59 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const trackingInConfig: ComponentConfig = {componentName: "TrackingIn",importPath: "@/components/remocn/tracking-in",controls: {- text: { type: "text", default: "tracking in", label: "Text" },+ text: {+ type: "text-content",+ default: "tracking in",+ description: "Text",+ },startTracking: {type: "number",- default: 0.5,min: 0,max: 2,step: 0.05,- label: "Start tracking (em)",+ default: 0.5,+ description: "Start tracking (em)",+ hiddenFromList: false,},startBlur: {type: "number",- default: 12,min: 0,max: 40,step: 1,- label: "Start blur",+ default: 12,+ description: "Start blur",+ hiddenFromList: false,},fontSize: {type: "number",- default: 96,min: 12,max: 200,step: 1,- label: "Font size",+ default: 96,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",},- color: { type: "color", default: "#171717", label: "Color" },fontWeight: {- type: "select",+ type: "enum",default: "700",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},+ dimensions: { width: 550, height: 130 },durationInFrames: 90,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/tv-power-off/config.ts b/registry/remocn/tv-power-off/config.tsindex c19d2618..4c3450fe 100644--- a/registry/remocn/tv-power-off/config.ts+++ b/registry/remocn/tv-power-off/config.ts@@ -7,32 +7,35 @@ export const tvPowerOffConfig: ComponentConfig = {controls: {durationInFrames: {type: "number",- default: 18,min: 8,max: 30,step: 1,- label: "Duration",+ default: 18,+ description: "Duration",+ hiddenFromList: false,},gain: {type: "number",- default: 1,min: 0,max: 2,step: 0.05,- label: "Surge",+ default: 1,+ description: "Surge",+ hiddenFromList: false,},afterglow: {type: "number",- default: 1,min: 0,max: 2,step: 0.05,- label: "Afterglow",+ default: 1,+ description: "Afterglow",+ hiddenFromList: false,},phosphor: {type: "color",default: "#d8ecff",- label: "Phosphor",+ description: "Phosphor",},},durationInFrames: 62,diff --git a/registry/remocn/tv-power-off/index.tsx b/registry/remocn/tv-power-off/index.tsxindex db5d9999..8ad7caa8 100644--- a/registry/remocn/tv-power-off/index.tsx+++ b/registry/remocn/tv-power-off/index.tsx@@ -209,7 +209,7 @@ const TvPowerOffFallback: React.FC<TvPowerOffProps & CanvasFilterProps> = (/><AbsoluteFillstyle={{- transform: `scale(${pinchX}, ${squash})`,+ scale: `${pinchX} ${squash}`,filter: `brightness(${1 + (concentrate - 1) * Math.max(gain, 0)})`,opacity: fade,}}diff --git a/registry/remocn/typewriter/config.ts b/registry/remocn/typewriter/config.tsindex c26b8b47..c42c31f6 100644--- a/registry/remocn/typewriter/config.ts+++ b/registry/remocn/typewriter/config.ts@@ -1,44 +1,57 @@-import {- type ComponentConfig,- FONT_WEIGHT_OPTIONS,- FPS,- H,- W,-} from "@/lib/customizer-config";+import { type ComponentConfig, FPS, H, W } from "@/lib/customizer-config";export const typewriterConfig: ComponentConfig = {componentName: "Typewriter",importPath: "@/components/remocn/typewriter",controls: {text: {- type: "text",+ type: "text-content",default: "console.log('hello, world')",- label: "Text",+ description: "Text",+ },+ cursor: {+ type: "boolean",+ default: true,+ description: "Show cursor",},- cursor: { type: "boolean", default: true, label: "Show cursor" },charsPerSecond: {type: "number",- default: 22,min: 4,max: 60,step: 1,- label: "Chars / sec",+ default: 22,+ description: "Chars / sec",+ hiddenFromList: false,},fontSize: {type: "number",- default: 72,min: 12,max: 160,step: 1,- label: "Font size",+ default: 72,+ description: "Font size",+ hiddenFromList: false,+ },+ color: {+ type: "color",+ default: "#171717",+ description: "Color",+ },+ cursorColor: {+ type: "color",+ default: "#171717",+ description: "Cursor color",},- color: { type: "color", default: "#171717", label: "Color" },- cursorColor: { type: "color", default: "#171717", label: "Cursor color" },fontWeight: {- type: "select",+ type: "enum",default: "600",- options: FONT_WEIGHT_OPTIONS,- label: "Font weight",+ variants: {+ "400": {},+ "500": {},+ "600": {},+ "700": {},+ },+ description: "Font weight",},},durationInFrames: 120,diff --git a/registry/remocn/underwater-ripple/config.ts b/registry/remocn/underwater-ripple/config.tsindex 758dd668..dc363afe 100644--- a/registry/remocn/underwater-ripple/config.ts+++ b/registry/remocn/underwater-ripple/config.ts@@ -7,35 +7,39 @@ export const underwaterRippleConfig: ComponentConfig = {controls: {amplitude: {type: "number",- default: 7,min: 0,max: 40,step: 1,- label: "Amplitude",+ default: 7,+ description: "Amplitude",+ hiddenFromList: false,},scale: {type: "number",- default: 1,min: 0.2,max: 4,step: 0.1,- label: "Scale",+ default: 1,+ description: "Scale",+ hiddenFromList: false,},speed: {type: "number",- default: 2,min: 1,max: 8,step: 1,- label: "Cycles",+ default: 2,+ description: "Cycles",+ hiddenFromList: false,},dispersion: {type: "number",- default: 1,min: 0,max: 4,step: 0.1,- label: "Dispersion",+ default: 1,+ description: "Dispersion",+ hiddenFromList: false,},},durationInFrames: 120,diff --git a/registry/remocn/v0/config.ts b/registry/remocn/v0/config.tsindex d2984940..5c163482 100644--- a/registry/remocn/v0/config.ts+++ b/registry/remocn/v0/config.ts@@ -5,22 +5,30 @@ export const v0Config: ComponentConfig = {importPath: "@/components/remocn/v0",controls: {greeting: {- type: "text",+ type: "text-content",default: "What do you want to create?",- label: "Greeting",+ description: "Greeting",},placeholder: {- type: "text",+ type: "text-content",default: "Ask v0 to build…",- label: "Placeholder",+ description: "Placeholder",},prompt: {- type: "text",+ type: "text-content",default: "a landing page for my SaaS with pricing and testimonials",- label: "Prompt",+ description: "Prompt",+ },+ modelName: {+ type: "text-content",+ default: "v0 Max",+ description: "Model",+ },+ projectName: {+ type: "text-content",+ default: "Project",+ description: "Project",},- modelName: { type: "text", default: "v0 Max", label: "Model" },- projectName: { type: "text", default: "Project", label: "Project" },},durationInFrames: 150,fps: FPS,diff --git a/registry/remocn/v0/index.tsx b/registry/remocn/v0/index.tsxindex 87704dcd..2f53fb0f 100644--- a/registry/remocn/v0/index.tsx+++ b/registry/remocn/v0/index.tsx@@ -239,7 +239,8 @@ export function V0({top: "50%",width: refW,height: refH,- transform: `translate(-50%, -50%) scale(${stageScale})`,+ translate: "-50% -50%",+ scale: `${stageScale}`,}}><div@@ -254,7 +255,7 @@ export function V0({fontWeight: 700,color: t.fg,opacity: headingFade.opacity,- transform: `translateY(${headingFade.translateY + intro.translateY * 0.4}px)`,+ translate: `0 ${headingFade.translateY + intro.translateY * 0.4}px`,}}>{greeting}@@ -272,7 +273,8 @@ export function V0({borderRadius: 16,boxShadow: "0 8px 40px -16px rgba(0,0,0,0.8)",opacity: boxFade.opacity,- transform: `translateY(${boxFade.translateY + intro.translateY * 0.6}px) scale(${intro.scale})`,+ translate: `0 ${boxFade.translateY + intro.translateY * 0.6}px`,+ scale: `${intro.scale}`,transformOrigin: "center top",display: "flex",flexDirection: "column",@@ -396,7 +398,7 @@ export function V0({alignItems: "center",justifyContent: "center",opacity: 1 - morph,- transform: `scale(${1 - 0.08 * morph})`,+ scale: `${1 - 0.08 * morph}`,}}><MicIcon size={20} color={t.btnFg} />@@ -409,7 +411,7 @@ export function V0({alignItems: "center",justifyContent: "center",opacity: morph,- transform: `scale(${0.85 + 0.15 * morph})`,+ scale: `${0.85 + 0.15 * morph}`,}}><ArrowUpIcon size={20} color={t.btnFg} />diff --git a/registry/remocn/value-swap/config.ts b/registry/remocn/value-swap/config.tsindex d6333773..728ea443 100644--- a/registry/remocn/value-swap/config.ts+++ b/registry/remocn/value-swap/config.ts@@ -7,27 +7,33 @@ export const valueSwapConfig: ComponentConfig = {controls: {duration: {type: "number",- default: 10,min: 4,max: 24,step: 1,- label: "Duration",+ default: 10,+ description: "Duration",+ hiddenFromList: false,},distance: {type: "number",- default: 12,min: 4,max: 32,step: 2,- label: "Distance",+ default: 12,+ description: "Distance",+ hiddenFromList: false,},direction: {- type: "select",+ type: "enum",default: "up",- options: ["up", "down"],- label: "Direction",+ variants: {+ up: {},+ down: {},+ },+ description: "Direction",},},+ dimensions: { width: 220, height: 70 },durationInFrames: 100,fps: FPS,compositionWidth: W,diff --git a/registry/remocn/value-swap/index.tsx b/registry/remocn/value-swap/index.tsxindex 9f11b92f..4f5dc4cf 100644--- a/registry/remocn/value-swap/index.tsx+++ b/registry/remocn/value-swap/index.tsx@@ -63,7 +63,7 @@ export function ValueSwap({top: 0,whiteSpace: "nowrap",opacity,- transform: `translateY(${y}px)`,+ translate: `0 ${y}px`,}}>{value}diff --git a/registry/remocn/vhs-filter/config.ts b/registry/remocn/vhs-filter/config.tsindex a0b5b9d3..00bf07e6 100644--- a/registry/remocn/vhs-filter/config.ts+++ b/registry/remocn/vhs-filter/config.ts@@ -7,35 +7,39 @@ export const vhsFilterConfig: ComponentConfig = {controls: {bleed: {type: "number",- default: 1,min: 0,max: 3,step: 0.1,- label: "Chroma bleed",+ default: 1,+ description: "Chroma bleed",+ hiddenFromList: false,},wobble: {type: "number",- default: 1,min: 0,max: 3,step: 0.1,- label: "Tape wobble",+ default: 1,+ description: "Tape wobble",+ hiddenFromList: false,},noise: {type: "number",- default: 1,min: 0,max: 3,step: 0.1,- label: "Noise",+ default: 1,+ description: "Noise",+ hiddenFromList: false,},intensity: {type: "number",- default: 1,min: 0,max: 1,step: 0.05,- label: "Intensity",+ default: 1,+ description: "Intensity",+ hiddenFromList: false,},},durationInFrames: 90,diff --git a/registry/remocn/vhs-filter/index.tsx b/registry/remocn/vhs-filter/index.tsxindex babc06a7..ea1b5ead 100644--- a/registry/remocn/vhs-filter/index.tsx+++ b/registry/remocn/vhs-filter/index.tsx@@ -146,7 +146,7 @@ const VhsFilterFallback: React.FC<VhsFilterProps & CanvasFilterProps> = ({<AbsoluteFill><AbsoluteFillstyle={{- transform: `translateX(${shift}px)`,+ translate: `${shift}px`,filter: `saturate(${1 + bleed * 0.3}) contrast(1.04) brightness(${flicker}) blur(${0.3 * intensity}px)`,}}>@@ -154,7 +154,7 @@ const VhsFilterFallback: React.FC<VhsFilterProps & CanvasFilterProps> = ({</AbsoluteFill><AbsoluteFillstyle={{- transform: `translateX(${shift - smear}px)`,+ translate: `${shift - smear}px`,filter: "saturate(2.2) blur(1.4px)",mixBlendMode: "screen",opacity: 0.24 * bleed * intensity,@@ -175,7 +175,7 @@ const VhsFilterFallback: React.FC<VhsFilterProps & CanvasFilterProps> = ({insetInline: 0,bottom: 0,height: "3.6%",- transform: `translateX(${shift * 3}px)`,+ translate: `${shift * 3}px`,background: `rgba(228, 228, 228, ${0.13 * intensity})`,mixBlendMode: "screen",}}diff --git a/registry/remocn/volumetric-rays/index.tsx b/registry/remocn/volumetric-rays/index.tsxindex 910980cb..77b684b5 100644--- a/registry/remocn/volumetric-rays/index.tsx+++ b/registry/remocn/volumetric-rays/index.tsx@@ -82,7 +82,7 @@ export function VolumetricRays({...sharedTextStyle,color: rayColor,filter: `blur(${60 * intensity}px)`,- transform: "scale(1.2, 1.6)",+ scale: "1.2 1.6",transformOrigin: "center bottom",opacity: bloomOpacity * haloPulse,}}diff --git a/registry/remocn/warp-dissolve/config.ts b/registry/remocn/warp-dissolve/config.tsindex a9439204..d72d0b06 100644--- a/registry/remocn/warp-dissolve/config.ts+++ b/registry/remocn/warp-dissolve/config.ts@@ -7,27 +7,30 @@ export const warpDissolveConfig: ComponentConfig = {controls: {distortion: {type: "number",- default: 0.8,min: 0.1,max: 1,step: 0.05,- label: "Distortion",+ default: 0.8,+ description: "Distortion",+ hiddenFromList: false,},swirl: {type: "number",- default: 0.6,min: 0,max: 1,step: 0.05,- label: "Swirl",+ default: 0.6,+ description: "Swirl",+ hiddenFromList: false,},softness: {type: "number",- default: 1,min: 0,max: 1,step: 0.05,- label: "Softness",+ default: 1,+ description: "Softness",+ hiddenFromList: false,},},durationInFrames: 116,diff --git a/registry/remocn/warp-dissolve/index.tsx b/registry/remocn/warp-dissolve/index.tsxindex 91019ade..6f8ff2c8 100644--- a/registry/remocn/warp-dissolve/index.tsx+++ b/registry/remocn/warp-dissolve/index.tsx@@ -44,10 +44,10 @@ const WarpDissolvePresentation: React.FC<if (!entering) {const meltStyle: React.CSSProperties = {opacity: interpolate(p, [0.2, 0.38], [1, 0], clampOpts),- transform: `scale(${interpolate(p, [0, 0.38], [1, 1.16], {+ scale: `${interpolate(p, [0, 0.38], [1, 1.16], {...clampOpts,easing: Easing.in(Easing.cubic),- })})`,+ })}`,filter: `blur(${interpolate(p, [0.04, 0.38], [0, 18], clampOpts)}px)`,};return <AbsoluteFill style={meltStyle}>{children}</AbsoluteFill>;@@ -66,10 +66,10 @@ const WarpDissolvePresentation: React.FC<const childStyle: React.CSSProperties = {opacity: interpolate(p, [0.66, 0.82], [0, 1], clampOpts),- transform: `scale(${interpolate(p, [0.66, 1], [1.18, 1], {+ scale: `${interpolate(p, [0.66, 1], [1.18, 1], {...clampOpts,easing: Easing.out(Easing.cubic),- })})`,+ })}`,filter: `blur(${interpolate(p, [0.66, 0.92], [16, 0], clampOpts)}px)`,};diff --git a/registry/remocn/wave-wipe/config.ts b/registry/remocn/wave-wipe/config.tsindex d20d07cc..ea27aadd 100644--- a/registry/remocn/wave-wipe/config.ts+++ b/registry/remocn/wave-wipe/config.ts@@ -7,29 +7,36 @@ export const waveWipeConfig: ComponentConfig = {controls: {intensity: {type: "number",- default: 0.2,min: 0,max: 1,step: 0.05,- label: "Intensity",+ default: 0.2,+ description: "Intensity",+ hiddenFromList: false,},softness: {type: "number",- default: 0.7,min: 0,max: 1,step: 0.05,- label: "Softness",+ default: 0.7,+ description: "Softness",+ hiddenFromList: false,},noise: {type: "number",- default: 0.4,min: 0,max: 1,step: 0.05,- label: "Noise",+ default: 0.4,+ description: "Noise",+ hiddenFromList: false,+ },+ colorBack: {+ type: "color",+ default: "#141318",+ description: "Background",},- colorBack: { type: "color", default: "#141318", label: "Background" },},durationInFrames: 116,fps: FPS,diff --git a/registry/remocn/wave-wipe/index.tsx b/registry/remocn/wave-wipe/index.tsxindex 9994b468..82c5542a 100644--- a/registry/remocn/wave-wipe/index.tsx+++ b/registry/remocn/wave-wipe/index.tsx@@ -51,10 +51,10 @@ const WaveWipePresentation: React.FC<...clampOpts,easing: Easing.bezier(0.42, 0, 0.58, 1),}),- transform: `translateY(${interpolate(p, [0, 0.7], [0, -70], {+ translate: `0 ${interpolate(p, [0, 0.7], [0, -70], {...clampOpts,easing: Easing.in(Easing.cubic),- })}%)`,+ })}%`,};return <AbsoluteFill style={exitStyle}>{children}</AbsoluteFill>;}@@ -87,7 +87,7 @@ const WaveWipePresentation: React.FC<offsetY={drift}/></AbsoluteFill>- <AbsoluteFill style={{ transform: `translateY(${rise}%)` }}>+ <AbsoluteFill style={{ translate: `0 ${rise}%` }}>{children}</AbsoluteFill></AbsoluteFill>diff --git a/registry/remocn/whip-pan/config.ts b/registry/remocn/whip-pan/config.tsindex af50c5e4..7fe6518b 100644--- a/registry/remocn/whip-pan/config.ts+++ b/registry/remocn/whip-pan/config.ts@@ -6,18 +6,24 @@ export const whipPanConfig: ComponentConfig = {importPath: "@/components/remocn/whip-pan",controls: {direction: {- type: "select",+ type: "enum",default: "left",- options: ["left", "right", "up", "down"],- label: "Direction",+ variants: {+ left: {},+ right: {},+ up: {},+ down: {},+ },+ description: "Direction",},blur: {type: "number",- default: 24,min: 0,max: 48,step: 2,- label: "Blur",+ default: 24,+ description: "Blur",+ hiddenFromList: false,},},durationInFrames: 114,diff --git a/registry/remocn/whip-pan/index.tsx b/registry/remocn/whip-pan/index.tsxindex d563f68d..0af7a5b4 100644--- a/registry/remocn/whip-pan/index.tsx+++ b/registry/remocn/whip-pan/index.tsx@@ -42,12 +42,12 @@ const WhipPanPresentation: React.FC<const offset = entering ? (travel - 1) * 110 * sign : travel * 110 * sign;const stretch = 1 + velocity * 0.12;- const translate =- axis === "x" ? `translateX(${offset}%)` : `translateY(${offset}%)`;- const smear = axis === "x" ? `scaleX(${stretch})` : `scaleY(${stretch})`;+ const translate = axis === "x" ? `${offset}%` : `0 ${offset}%`;+ const smear = axis === "x" ? `${stretch} 1` : `1 ${stretch}`;const style: React.CSSProperties = {- transform: `${translate} ${smear}`,+ translate,+ scale: smear,filter: `blur(${velocity * blur}px)`,};diff --git a/registry/remocn/x-follow-card/config.ts b/registry/remocn/x-follow-card/config.tsindex 577d52e9..704fbc7a 100644--- a/registry/remocn/x-follow-card/config.ts+++ b/registry/remocn/x-follow-card/config.ts@@ -4,30 +4,65 @@ export const xFollowCardConfig: ComponentConfig = {componentName: "XFollowCard",importPath: "@/components/remocn/x-follow-card",controls: {- name: { type: "text", default: "remocn", label: "Name" },- handle: { type: "text", default: "remocn", label: "Handle" },+ name: {+ type: "text-content",+ default: "remocn",+ description: "Name",+ },+ handle: {+ type: "text-content",+ default: "remocn",+ description: "Handle",+ },bio: {- type: "text",+ type: "text-content",default:"Production-ready components for Remotion - text animations, backgrounds, transitions, UI blocks, and full scene compositions",- label: "Bio",+ description: "Bio",+ },+ avatarUrl: {+ type: "text-content",+ default: "/logo.svg",+ description: "Avatar URL",},- avatarUrl: { type: "text", default: "/logo.svg", label: "Avatar URL" },coverUrl: {- type: "text",+ type: "text-content",default: "/imgs/x-cover.png",- label: "Cover URL",+ description: "Cover URL",+ },+ location: {+ type: "text-content",+ default: "Ukraine",+ description: "Location",+ },+ website: {+ type: "text-content",+ default: "remocn.dev",+ description: "Website",+ },+ joined: {+ type: "text-content",+ default: "January 2024",+ description: "Joined",+ },+ verified: {+ type: "boolean",+ default: true,+ description: "Verified",+ },+ accentColor: {+ type: "color",+ default: "#1d9bf0",+ description: "Accent",},- location: { type: "text", default: "Ukraine", label: "Location" },- website: { type: "text", default: "remocn.dev", label: "Website" },- joined: { type: "text", default: "January 2024", label: "Joined" },- verified: { type: "boolean", default: true, label: "Verified" },- accentColor: { type: "color", default: "#1d9bf0", label: "Accent" },orientation: {- type: "select",+ type: "enum",default: "horizontal",- options: ["horizontal", "vertical"],- label: "Orientation",+ variants: {+ horizontal: {},+ vertical: {},+ },+ description: "Orientation",},},durationInFrames: 165,diff --git a/registry/remocn/x-follow-card/index.tsx b/registry/remocn/x-follow-card/index.tsxindex 58a8efa3..a2accee9 100644--- a/registry/remocn/x-follow-card/index.tsx+++ b/registry/remocn/x-follow-card/index.tsx@@ -441,7 +441,7 @@ function FollowButton({fontWeight: 700,fontFamily: FONT_FAMILY,boxSizing: "border-box" as const,- transform: `scale(${pressScale})`,+ scale: `${pressScale}`,transformOrigin: "center",};@@ -726,7 +726,7 @@ export function XFollowCard({return {filter: b.blur > 0 ? `blur(${b.blur}px)` : "none",opacity: b.opacity,- transform: `translateY(${b.translateY}px)`,+ translate: `0 ${b.translateY}px`,};};@@ -739,7 +739,8 @@ export function XFollowCard({top: "50%",width: refW,height: refH,- transform: `translate(-50%, -50%) scale(${stageScale})`,+ translate: "-50% -50%",+ scale: `${stageScale}`,}}><div@@ -752,7 +753,8 @@ export function XFollowCard({border: `1px solid ${t.cardBorder}`,borderRadius: 24,overflow: "hidden",- transform: `translateY(${bounce.translateY}px) scale(${bounce.scale})`,+ translate: `0 ${bounce.translateY}px`,+ scale: `${bounce.scale}`,transformOrigin: "center top",boxShadow: "0 12px 40px -16px rgba(15,20,25,0.18)",}}@@ -841,7 +843,8 @@ export function XFollowCard({style={{position: "absolute",inset: 0,- transform: `translateY(${bounce.translateY}px) scale(${bounce.scale})`,+ translate: `0 ${bounce.translateY}px`,+ scale: `${bounce.scale}`,transformOrigin: "center top",}}>diff --git a/registry/remocn/x-followers-overview/config.ts b/registry/remocn/x-followers-overview/config.tsindex 31eeaf93..a014d628 100644--- a/registry/remocn/x-followers-overview/config.ts+++ b/registry/remocn/x-followers-overview/config.ts@@ -5,24 +5,37 @@ export const xFollowersOverviewConfig: ComponentConfig = {importPath: "@/components/remocn/x-followers-overview",controls: {totalFollowers: {- type: "number-input",- default: 1709,+ type: "number",min: 0,- max: 10000000,step: 1,- label: "Total followers",+ default: 1709,+ description: "Total followers",+ hiddenFromList: false,+ },+ handle: {+ type: "text-content",+ default: "remocn",+ description: "Handle",+ },+ avatarUrl: {+ type: "text-content",+ default: "/logo.svg",+ description: "Avatar URL",+ },+ accentColor: {+ type: "color",+ default: "#1d9bf0",+ description: "Accent",},- handle: { type: "text", default: "remocn", label: "Handle" },- avatarUrl: { type: "text", default: "/logo.svg", label: "Avatar URL" },- accentColor: { type: "color", default: "#1d9bf0", label: "Accent" },orientation: {- type: "select",+ type: "enum",default: "horizontal",- options: ["horizontal", "vertical"],- label: "Orientation",+ variants: {+ horizontal: {},+ vertical: {},+ },+ description: "Orientation",},- // `speed` is appended from SHARED_CONTROLS in registry/__index__.tsx.- // `notifications` is an array → not a control; preview uses SAMPLE_FOLLOWERS.},durationInFrames: 360,fps: FPS,diff --git a/registry/remocn/x-followers-overview/index.tsx b/registry/remocn/x-followers-overview/index.tsxindex 19d0bcc2..7cf9c108 100644--- a/registry/remocn/x-followers-overview/index.tsx+++ b/registry/remocn/x-followers-overview/index.tsx@@ -360,7 +360,8 @@ export function XFollowersOverview({top: "50%",width: refW,height: refH,- transform: `translate(-50%, -50%) scale(${stageScale})`,+ translate: "-50% -50%",+ scale: `${stageScale}`,}}><div@@ -473,7 +474,7 @@ export function XFollowersOverview({opacity: avatarIn.opacity,filter:avatarIn.blur > 0 ? `blur(${avatarIn.blur}px)` : "none",- transform: `translateX(${avatarX}px)`,+ translate: `${avatarX}px`,}}><Avatar@@ -493,7 +494,7 @@ export function XFollowersOverview({opacity: handleIn.opacity,filter:handleIn.blur > 0 ? `blur(${handleIn.blur}px)` : "none",- transform: `translateX(${handleX}px)`,+ translate: `${handleX}px`,}}>@{handle}@@ -508,7 +509,8 @@ export function XFollowersOverview({gap: 18,opacity: countIn.opacity,filter: countIn.blur > 0 ? `blur(${countIn.blur}px)` : "none",- transform: `translateY(${countIn.translateY}px) scale(${revealScale})`,+ translate: `0 ${countIn.translateY}px`,+ scale: `${revealScale}`,}}><spandiff --git a/registry/remocn/zoom-blur/config.ts b/registry/remocn/zoom-blur/config.tsindex 1c96e0ba..c75ddee2 100644--- a/registry/remocn/zoom-blur/config.ts+++ b/registry/remocn/zoom-blur/config.ts@@ -7,19 +7,21 @@ export const zoomBlurConfig: ComponentConfig = {controls: {blur: {type: "number",- default: 16,min: 0,max: 40,step: 2,- label: "Blur",+ default: 16,+ description: "Blur",+ hiddenFromList: false,},rise: {type: "number",- default: 0,min: 0,max: 160,step: 10,- label: "Rise",+ default: 0,+ description: "Rise",+ hiddenFromList: false,},},durationInFrames: 114,diff --git a/scripts/build-elements.mts b/scripts/build-elements.mtsnew file mode 100644index 00000000..9e90c0a2--- /dev/null+++ b/scripts/build-elements.mts@@ -0,0 +1,539 @@+import {+ existsSync,+ mkdirSync,+ readdirSync,+ readFileSync,+ rmSync,+ writeFileSync,+} from "node:fs";+import { dirname, join, resolve } from "node:path";+import { createElementPayload } from "@remotion/studio-protocol";+import { Glob } from "bun";+import type { InteractivitySchema } from "remotion";+import { resolveSchema } from "../lib/customizer-config";+import { previewManifest } from "../registry/__manifest__";++const ARTIFACTS_DIR = "registry-artifacts";+const ELEMENTS_DIR = join(ARTIFACTS_DIR, "elements");++const INLINABLE_LIBS: Record<string, { artifact: string; importPath: string }> =+ {+ "@remocn/icons-core": {+ artifact: "icons-core",+ importPath: "@/lib/remocn-icons",+ },+ "@remocn/canvas-presentation": {+ artifact: "canvas-presentation",+ importPath: "@/lib/remocn/canvas-presentation",+ },+ };++interface RegistryItem {+ name: string;+ title?: string;+ description?: string;+ type: string;+ dependencies?: string[];+ registryDependencies?: string[];+ files: { path: string; content: string; type: string }[];+}++function readItem(name: string): RegistryItem {+ return JSON.parse(readFileSync(join(ARTIFACTS_DIR, `${name}.json`), "utf8"));+}++const pkg = JSON.parse(readFileSync("package.json", "utf8"));+const pinnedVersions: Record<string, string> = {+ ...pkg.devDependencies,+ ...pkg.dependencies,+};++function resolveDependencies(names: Set<string>) {+ return [...names]+ .filter((name) => name !== "remotion")+ .map((name) => {+ if (name.startsWith("@remotion/")) {+ return { name: name as `@remotion/${string}`, version: null };+ }+ const raw = pinnedVersions[name];+ if (!raw) {+ throw new Error(+ `No pinned version for dependency "${name}" in package.json`,+ );+ }+ return { name, version: raw.replace(/^[\^~]/, "") };+ });+}++function loadFrontmatterLengths(): Record<string, number> {+ const lengths: Record<string, number> = {};+ const glob = new Glob("content/docs/**/*.mdx");+ for (const file of glob.scanSync(".")) {+ const text = readFileSync(file, "utf8");+ const match = text.match(/^---\n([\s\S]*?)\n---/);+ if (!match) continue;+ const fm = match[1];+ const component = fm.match(/^component:\s*(\S+)\s*$/m)?.[1];+ const length = fm.match(/^length:\s*(\d+)\s*$/m)?.[1];+ if (component && length) {+ lengths[component] = Number(length);+ }+ }+ return lengths;+}++interface ParsedSource {+ imports: Map<+ string,+ { named: Set<string>; typeNamed: Set<string>; defaults: Set<string> }+ >;+ body: string;+}++function getImportEntry(imports: ParsedSource["imports"], module: string) {+ let entry = imports.get(module);+ if (!entry) {+ entry = { named: new Set(), typeNamed: new Set(), defaults: new Set() };+ imports.set(module, entry);+ }+ return entry;+}++function parseSource(source: string): ParsedSource {+ const imports: ParsedSource["imports"] = new Map();+ const importRe =+ /^import\s+(type\s+)?(?:([A-Za-z_$][\w$]*)\s*,\s*)?\{([\s\S]*?)\}\s+from\s+"([^"]+)";?\s*$/gm;+ const defaultImportRe =+ /^import\s+(?:type\s+)?([A-Za-z_$][\w$]*)\s+from\s+"([^"]+)";?\s*$/gm;+ const body = source+ .replace(/^"use client";\s*/m, "")+ .replace(+ importRe,+ (+ _,+ typeOnly: string | undefined,+ defaultName: string | undefined,+ specifiers: string,+ module: string,+ ) => {+ const entry = getImportEntry(imports, module);+ if (defaultName) entry.defaults.add(defaultName);+ for (const spec of specifiers.split(",")) {+ const trimmed = spec.trim();+ if (!trimmed) continue;+ if (typeOnly || trimmed.startsWith("type ")) {+ entry.typeNamed.add(trimmed.replace(/^type\s+/, ""));+ } else {+ entry.named.add(trimmed);+ }+ }+ return "";+ },+ )+ .replace(defaultImportRe, (_, defaultName: string, module: string) => {+ getImportEntry(imports, module).defaults.add(defaultName);+ return "";+ })+ .trim();+ return { imports, body };+}++function stripExports(body: string): string {+ return body.replace(+ /^export\s+(?=(function|const|class|interface|type|let)\b)/gm,+ "",+ );+}++const WRAPPER_IMPORTS: ParsedSource["imports"] = new Map([+ [+ "react",+ {+ named: new Set(["forwardRef", "useImperativeHandle", "useRef"]),+ typeNamed: new Set(["ComponentProps"]),+ defaults: new Set<string>(),+ },+ ],+ [+ "remotion",+ {+ named: new Set(["Interactive", "Sequence"]),+ typeNamed: new Set([+ "InteractiveBaseProps",+ "InteractiveTransformProps",+ "InteractivitySchema",+ "SequenceControls",+ ]),+ defaults: new Set<string>(),+ },+ ],+]);++function mergeSources(+ component: ParsedSource,+ libs: ParsedSource[],+ extra: ParsedSource["imports"] = new Map(),+): string {+ const merged: ParsedSource["imports"] = new Map();+ for (const source of [component, ...libs, { imports: extra, body: "" }]) {+ for (const [module, entry] of source.imports) {+ if (+ Object.values(INLINABLE_LIBS).some((lib) => lib.importPath === module)+ )+ continue;+ const target = getImportEntry(merged, module);+ for (const spec of entry.named) target.named.add(spec);+ for (const spec of entry.typeNamed) {+ target.typeNamed.add(spec);+ }+ for (const spec of entry.defaults) target.defaults.add(spec);+ }+ }+ const importLines = [...merged.entries()].map(([module, entry]) => {+ const specs = [+ ...[...entry.named].sort(),+ ...[...entry.typeNamed]+ .sort()+ .filter((spec) => !entry.named.has(spec))+ .map((spec) => `type ${spec}`),+ ];+ const defaultName = [...entry.defaults][0];+ if (defaultName && specs.length > 0) {+ return `import ${defaultName}, { ${specs.join(", ")} } from "${module}";`;+ }+ if (defaultName) return `import ${defaultName} from "${module}";`;+ return `import { ${specs.join(", ")} } from "${module}";`;+ });+ const libBodies = libs.map((lib) => stripExports(lib.body));+ return [importLines.join("\n"), ...libBodies, component.body].join("\n\n");+}++function countExportedComponents(source: string): string[] {+ return [+ ...new Set(+ [+ ...source.matchAll(+ /export\s+(?:const|function)\s+([A-Z_$][A-Za-z0-9_$]*)\b/g,+ ),+ ].map((m) => m[1]),+ ),+ ];+}++const RESERVED_SCHEMA_KEYS = new Set([+ "name",+ "style",+ "from",+ "durationInFrames",+ "trimBefore",+ "freeze",+ "hidden",+ "showInTimeline",+ "premountFor",+ "controls",+]);++const IDENT = /^[A-Za-z_$][\w$]*$/;++function serializeSchema(value: unknown, indent: string): string {+ if (value === null) return "null";+ if (typeof value === "string") return JSON.stringify(value);+ if (typeof value === "number" || typeof value === "boolean") {+ return String(value);+ }+ if (Array.isArray(value)) {+ return `[${value.map((v) => serializeSchema(v, indent)).join(", ")}]`;+ }+ const entries = Object.entries(value as Record<string, unknown>);+ if (entries.length === 0) return "{}";+ const inner = `${indent} `;+ const lines = entries.map(([k, v]) => {+ const key = IDENT.test(k) ? k : JSON.stringify(k);+ return `${inner}${key}: ${serializeSchema(v, inner)},`;+ });+ return `{\n${lines.join("\n")}\n${indent}}`;+}++interface ElementConfig {+ schema: InteractivitySchema | null;+ dimensions: { width: number; height: number } | null;+}++async function loadElementConfig(+ name: string,+ sourcePath: string,+): Promise<ElementConfig> {+ const configPath = join(dirname(sourcePath), "config.ts");+ if (!existsSync(configPath)) return { schema: null, dimensions: null };+ const mod = await import(resolve(configPath));+ const config = Object.values(mod).find(+ (v) => v && typeof v === "object" && "controls" in (v as object),+ ) as+ | {+ controls: InteractivitySchema;+ dimensions?: { width: number; height: number };+ }+ | undefined;+ if (!config) return { schema: null, dimensions: null };+ const dimensions = config.dimensions ?? null;+ const schema = resolveSchema(name, config.controls);+ if (Object.keys(schema).some((key) => RESERVED_SCHEMA_KEYS.has(key))) {+ return { schema: null, dimensions };+ }+ return { schema, dimensions };+}++function makeInteractiveWrapper(+ componentName: string,+ schema: InteractivitySchema,+ dimensions: { width: number; height: number } | null,+): string {+ const keys = Object.keys(schema);+ const sizeControls =+ dimensions !== null && !("width" in schema) && !("height" in schema);+ const sizeSchema = sizeControls+ ? ` width: {+ type: "number",+ default: ${dimensions?.width},+ min: 10,+ step: 10,+ description: "Width",+ },+ height: {+ type: "number",+ default: ${dimensions?.height},+ min: 10,+ step: 10,+ description: "Height",+ },+`+ : "";+ const content = dimensions+ ? `<div+ style={{+ position: "absolute",+ inset: 0,+ display: "flex",+ alignItems: "center",+ justifyContent: "center",+ }}+ >+ <div+ ref={outlineRef}+ style={{+ position: "relative",+ width${sizeControls ? "" : `: ${dimensions.width}`},+ height${sizeControls ? "" : `: ${dimensions.height}`},+ ...style,+ }}+ >+ <${componentName}Base+ {...(componentProps as unknown as ComponentProps<typeof ${componentName}Base>)}+ />+ </div>+ </div>`+ : `<div+ ref={outlineRef}+ style={{+ position: "relative",+ width: "100%",+ height: "100%",+ display: "flex",+ alignItems: "center",+ justifyContent: "center",+ ...style,+ }}+ >+ <${componentName}Base+ {...(componentProps as unknown as ComponentProps<typeof ${componentName}Base>)}+ />+ </div>`;+ return `const elementSchema = {+ ...Interactive.baseSchema,+${Object.entries(schema)+ .map(+ ([k, v]) =>+ ` ${IDENT.test(k) ? k : JSON.stringify(k)}: ${serializeSchema(v, " ")},`,+ )+ .join("\n")}+${sizeSchema} ...Interactive.transformSchema,+} as const satisfies InteractivitySchema;++const ELEMENT_PROP_KEYS = new Set(${JSON.stringify(keys)});++const ELEMENT_PROP_DEFAULTS: Record<string, unknown> = ${serializeSchema(+ Object.fromEntries(+ Object.entries(schema).flatMap(([k, v]) =>+ "default" in v && v.default !== undefined && v.default !== null+ ? [[k, v.default]]+ : [],+ ),+ ),+ "",+ )};++type ${componentName}ElementProps = InteractiveBaseProps &+ InteractiveTransformProps &${+ sizeControls+ ? ` { readonly width?: number; readonly height?: number } &`+ : ""+ }+ ComponentProps<typeof ${componentName}Base>;++const ${componentName}Inner = forwardRef<+ HTMLDivElement,+ ${componentName}ElementProps & { readonly controls: SequenceControls | undefined }+>(({ controls, name, style, ${+ sizeControls+ ? `width = ${dimensions?.width}, height = ${dimensions?.height}, `+ : ""+ }...rest }, ref) => {+ const outlineRef = useRef<HTMLDivElement>(null);+ useImperativeHandle(ref, () => outlineRef.current as HTMLDivElement, []);+ const componentProps: Record<string, unknown> = { ...ELEMENT_PROP_DEFAULTS };+ const sequenceProps: Record<string, unknown> = {};+ for (const [key, value] of Object.entries(rest)) {+ if (ELEMENT_PROP_KEYS.has(key)) {+ if (value !== undefined) componentProps[key] = value;+ } else {+ sequenceProps[key] = value;+ }+ }+ return (+ <Sequence+ layout="none"+ {...sequenceProps}+ controls={controls}+ name={name ?? "<${componentName}>"}+ outlineRef={outlineRef}+ >+ ${content}+ </Sequence>+ );+});++export const ${componentName} = Interactive.withSchema({+ Component: ${componentName}Inner,+ componentName: "<${componentName}>",+ componentIdentity: null,+ schema: elementSchema,+ supportsEffects: false,+});`;+}++const frontmatterLengths = loadFrontmatterLengths();+const libSources = new Map(+ Object.entries(INLINABLE_LIBS).map(([dep, { artifact }]) => {+ const item = readItem(artifact);+ return [+ dep,+ {+ parsed: parseSource(item.files[0].content),+ dependencies: item.dependencies ?? [],+ },+ ];+ }),+);++rmSync(ELEMENTS_DIR, { recursive: true, force: true });+mkdirSync(ELEMENTS_DIR, { recursive: true });++let built = 0;+let interactive = 0;+const skipped: string[] = [];++for (const file of readdirSync(ARTIFACTS_DIR).sort()) {+ if (!file.endsWith(".json")) continue;+ const item = readItem(file.replace(/\.json$/, ""));+ if (item.type !== "registry:component") continue;+ if (!item.files || item.files.length !== 1) continue;+ const path = item.files[0].path;+ if (+ !path.startsWith("registry/remocn/") &&+ !path.startsWith("registry/remocn-icons/")+ )+ continue;+ const regDeps = item.registryDependencies ?? [];+ if (!regDeps.every((dep) => dep in INLINABLE_LIBS)) {+ skipped.push(`${item.name} (registry deps: ${regDeps.join(", ")})`);+ continue;+ }+ const durationInFrames =+ frontmatterLengths[item.name] ??+ previewManifest[item.name]?.durationInFrames;+ if (!durationInFrames) {+ skipped.push(`${item.name} (no duration source)`);+ continue;+ }++ const libs = regDeps.flatMap((dep) => {+ const lib = libSources.get(dep);+ return lib ? [lib] : [];+ });+ const { schema, dimensions } = await loadElementConfig(item.name, path);+ let sourceCode = mergeSources(+ parseSource(item.files[0].content),+ libs.map((lib) => lib.parsed),+ schema ? WRAPPER_IMPORTS : undefined,+ );+ let exported = countExportedComponents(sourceCode);+ if (exported.length === 2) {+ const staticName = exported.find(+ (name) => name === `${exported.find((n) => n !== name)}Static`,+ );+ if (staticName) {+ sourceCode = sourceCode.replace(+ new RegExp(+ `^export\\s+(?=(?:const|function)\\s+${staticName}\\b)`,+ "m",+ ),+ "",+ );+ exported = countExportedComponents(sourceCode);+ }+ }+ if (exported.length !== 1) {+ skipped.push(`${item.name} (${exported.length} exported components)`);+ continue;+ }+ let installationMode: "wrapped" | "component-owned-sequence" = "wrapped";+ if (schema) {+ const componentName = exported[0];+ sourceCode = stripExports(+ sourceCode.replace(+ new RegExp(`\\b${componentName}\\b`, "g"),+ `${componentName}Base`,+ ),+ );+ sourceCode += `\n\n${makeInteractiveWrapper(componentName, schema, dimensions)}\n`;+ installationMode = "component-owned-sequence";+ interactive++;+ }++ const depNames = new Set([+ ...(item.dependencies ?? []),+ ...libs.flatMap((lib) => lib.dependencies),+ ]);++ const payload = createElementPayload({+ displayName: item.title ?? item.name,+ slug: item.name,+ sourceCode,+ dependencies: resolveDependencies(depNames),+ dimensions,+ durationInFrames,+ installationMode,+ });++ writeFileSync(+ join(ELEMENTS_DIR, `${item.name}.json`),+ `${JSON.stringify(payload, null, 2)}\n`,+ );+ built++;+}++console.log(+ `Built ${built} element payloads into ${ELEMENTS_DIR} (${interactive} interactive)`,+);+console.log(`Skipped ${skipped.length} incompatible items`);+for (const s of skipped) console.log(" -", s);diff --git a/scripts/codemod-controls.mts b/scripts/codemod-controls.mtsnew file mode 100644index 00000000..a2a4defd--- /dev/null+++ b/scripts/codemod-controls.mts@@ -0,0 +1,146 @@+import { readFileSync, writeFileSync } from "node:fs";+import { resolve } from "node:path";+import { Glob } from "bun";++type OldControl = {+ type: string;+ default: unknown;+ label?: string;+ min?: number;+ max?: number;+ step?: number;+ options?: string[];+};++function convertField(control: OldControl): Record<string, unknown> {+ const description = control.label ?? "";+ switch (control.type) {+ case "text":+ return { type: "text-content", default: control.default, description };+ case "number":+ return {+ type: "number",+ min: control.min,+ max: control.max,+ step: control.step,+ default: control.default,+ description,+ hiddenFromList: false,+ };+ case "number-input":+ return {+ type: "number",+ min: control.min,+ step: control.step,+ default: control.default,+ description,+ hiddenFromList: false,+ };+ case "color":+ return { type: "color", default: control.default, description };+ case "boolean":+ return { type: "boolean", default: control.default, description };+ case "select": {+ const variants: Record<string, Record<string, never>> = {};+ for (const option of control.options ?? []) variants[option] = {};+ return {+ type: "enum",+ default: control.default,+ variants,+ description,+ };+ }+ default:+ throw new Error(`Unknown control type: ${control.type}`);+ }+}++const IDENT = /^[A-Za-z_$][\w$]*$/;++function serialize(value: unknown, indent: string): string {+ if (value === null) return "null";+ if (typeof value === "string") return JSON.stringify(value);+ if (typeof value === "number" || typeof value === "boolean") {+ return String(value);+ }+ if (Array.isArray(value)) {+ return `[${value.map((v) => serialize(v, indent)).join(", ")}]`;+ }+ const entries = Object.entries(value as Record<string, unknown>);+ if (entries.length === 0) return "{}";+ const inner = indent + " ";+ const lines = entries.map(([k, v]) => {+ const key = IDENT.test(k) ? k : JSON.stringify(k);+ return `${inner}${key}: ${serialize(v, inner)},`;+ });+ return `{\n${lines.join("\n")}\n${indent}}`;+}++function findControlsBlock(source: string): { start: number; end: number } {+ const matches = [...source.matchAll(/controls:\s*\{/g)];+ if (matches.length !== 1) {+ throw new Error(+ `Expected exactly one "controls: {" (found ${matches.length})`,+ );+ }+ const match = matches[0];+ const braceStart = match.index + match[0].length - 1;+ let depth = 0;+ for (let i = braceStart; i < source.length; i++) {+ const ch = source[i];+ if (ch === "{") depth++;+ else if (ch === "}") {+ depth--;+ if (depth === 0) return { start: match.index, end: i + 1 };+ } else if (ch === '"' || ch === "'" || ch === "`") {+ const quote = ch;+ i++;+ while (i < source.length && source[i] !== quote) {+ if (source[i] === "\\") i++;+ i++;+ }+ }+ }+ throw new Error("Unbalanced braces in controls block");+}++const failures: string[] = [];+let changed = 0;++for (const file of new Glob("registry/*/*/config.ts").scanSync(".")) {+ try {+ const mod = await import(resolve(file));+ const config = Object.values(mod).find(+ (v) => v && typeof v === "object" && "controls" in (v as object),+ ) as { controls: Record<string, OldControl> } | undefined;+ if (!config) throw new Error("No exported config with controls");++ const schema: Record<string, unknown> = {};+ for (const [key, control] of Object.entries(config.controls)) {+ if (typeof control.type !== "string") {+ throw new Error(`Control "${key}" already migrated or malformed`);+ }+ schema[key] = convertField(control);+ }++ const source = readFileSync(file, "utf8");+ const { start, end } = findControlsBlock(source);+ const lineStart = source.lastIndexOf("\n", start) + 1;+ const indent = source.slice(lineStart, start);+ const replacement = `controls: ${serialize(schema, indent)}`;+ writeFileSync(+ file,+ source.slice(0, start) + replacement + source.slice(end),+ );+ changed++;+ } catch (error) {+ failures.push(`${file}: ${(error as Error).message}`);+ }+}++console.log(`Migrated ${changed} config files`);+if (failures.length > 0) {+ console.log(`Failed ${failures.length}:`);+ for (const f of failures) console.log(" -", f);+ process.exit(1);+}diff --git a/tsconfig.json b/tsconfig.jsonindex 61743722..36056a37 100644--- a/tsconfig.json+++ b/tsconfig.json@@ -172,5 +172,5 @@".next/dev/types/**/*.ts","**/*.mts"],- "exclude": ["node_modules", "**/__tests__/**"]+ "exclude": ["node_modules", "out", "**/__tests__/**"]}