Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: icon gem
dev_wandry98926b909b37
diff --git a/components/docs/icons-gallery.tsx b/components/docs/icons-gallery.tsxindex c52bfe1d..0c13d82e 100644--- a/components/docs/icons-gallery.tsx+++ b/components/docs/icons-gallery.tsx@@ -43,6 +43,7 @@ import { FileTextIconStatic } from "@/registry/remocn/icon-file-text";import { FilterIconStatic } from "@/registry/remocn/icon-filter";import { FlameIconStatic } from "@/registry/remocn/icon-flame";import { FolderIconStatic } from "@/registry/remocn/icon-folder";+import { GemIconStatic } from "@/registry/remocn/icon-gem";import { GiftIconStatic } from "@/registry/remocn/icon-gift";import { GlobeIconStatic } from "@/registry/remocn/icon-globe";import { HeartIconStatic } from "@/registry/remocn/icon-heart";@@ -637,6 +638,12 @@ export const ICONS: IconEntry[] = [category: "Emotion & accents",Static: CrownIconStatic,},+ {+ name: "icon-gem",+ label: "Gem",+ category: "Emotion & accents",+ Static: GemIconStatic,+ },{name: "icon-star",label: "Star",diff --git a/registry/__index__.tsx b/registry/__index__.tsxindex 3128d937..7bd81d99 100644--- a/registry/__index__.tsx+++ b/registry/__index__.tsx@@ -59,6 +59,7 @@ import { iconFileTextConfig } from "@/registry/remocn/icon-file-text/config";import { iconFilterConfig } from "@/registry/remocn/icon-filter/config";import { iconFlameConfig } from "@/registry/remocn/icon-flame/config";import { iconFolderConfig } from "@/registry/remocn/icon-folder/config";+import { iconGemConfig } from "@/registry/remocn/icon-gem/config";import { iconGiftConfig } from "@/registry/remocn/icon-gift/config";import { iconGlobeConfig } from "@/registry/remocn/icon-globe/config";import { iconHeartConfig } from "@/registry/remocn/icon-heart/config";@@ -894,6 +895,13 @@ const registry: Record<string, RegistryEntry> = {})),config: iconFolderConfig,},+ "icon-gem": {+ load: () =>+ import("@/registry/remocn/icon-gem").then((m) => ({+ default: m.GemIcon,+ })),+ config: iconGemConfig,+ },"icon-gift": {load: () =>import("@/registry/remocn/icon-gift").then((m) => ({diff --git a/registry/remocn/icon-gem/config.ts b/registry/remocn/icon-gem/config.tsnew file mode 100644index 00000000..0c8f96e2--- /dev/null+++ b/registry/remocn/icon-gem/config.ts@@ -0,0 +1,44 @@+import { type ComponentConfig, FPS } from "@/lib/customizer-config";++export const iconGemConfig: ComponentConfig = {+ componentName: "GemIcon",+ importPath: "@/components/remocn/icon-gem",+ controls: {+ animation: {+ type: "select",+ default: "both",+ options: ["draw", "action", "both"],+ label: "Animation",+ },+ loop: {+ type: "boolean",+ default: false,+ label: "Loop",+ },+ size: {+ type: "number",+ default: 48,+ min: 24,+ max: 200,+ step: 4,+ label: "Size",+ },+ color: {+ type: "color",+ default: "#171717",+ label: "Color",+ },+ strokeWidth: {+ type: "number",+ default: 2,+ min: 1,+ max: 3,+ step: 0.25,+ label: "Stroke width",+ },+ },+ durationInFrames: 80,+ fps: FPS,+ compositionWidth: 48,+ compositionHeight: 48,+};diff --git a/registry/remocn/icon-gem/index.tsx b/registry/remocn/icon-gem/index.tsxnew file mode 100644index 00000000..3c4c5821--- /dev/null+++ b/registry/remocn/icon-gem/index.tsx@@ -0,0 +1,150 @@+"use client";++import { Easing, interpolate } from "remotion";+import {+ drawnPathProps,+ type IconAnimationProps,+ useIconAnimation,+} from "@/lib/remocn-icons";++const STONE_PATH =+ "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";+const VCUT_PATH = "M10.5 3 8 9l4 13 4-13-2.5-6";+const BAND_PATH = "M2 9h20";++const CENTER = 12;++const TIMINGS = {+ drawDurationInFrames: 18,+ actionDelayInFrames: 2,+ actionDurationInFrames: 24,+ loop: false,+} as const;++export function GemIcon({+ animation = "both",+ loop,+ speed,+ size = 48,+ color = "currentColor",+ strokeWidth = 2,+ className,+}: IconAnimationProps) {+ const { drawProgress, scaleIn, actionProgress, actionFrame } =+ useIconAnimation({ animation, loop, speed }, TIMINGS);++ const linearDraw = 1 - (1 - drawProgress) ** (1 / 3);+ const acting = animation !== "draw" && actionFrame >= 0;++ const stoneDraw = interpolate(linearDraw, [0, 0.67], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });+ const vcutDraw = interpolate(linearDraw, [0.44, 0.89], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });+ const bandDraw = interpolate(linearDraw, [0.67, 1], [0, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.out(Easing.quad),+ });++ const pop = acting+ ? interpolate(actionProgress, [0, 0.35, 0.6, 1], [1, 1.06, 1, 1], {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.quad),+ })+ : 1;+ const shimmer = acting+ ? interpolate(+ actionProgress,+ [0, 0.25, 0.45, 0.65, 0.85, 1],+ [1, 0.7, 1, 0.78, 1, 1],+ {+ extrapolateLeft: "clamp",+ extrapolateRight: "clamp",+ easing: Easing.inOut(Easing.sin),+ },+ )+ : 1;++ const stone = drawnPathProps(STONE_PATH, acting ? 1 : stoneDraw);+ const vcut = drawnPathProps(VCUT_PATH, acting ? 1 : vcutDraw);+ const band = drawnPathProps(BAND_PATH, acting ? 1 : bandDraw);++ const scale = 0.85 + 0.15 * scaleIn;+ const popTransform = `translate(${CENTER * (1 - pop)} ${CENTER * (1 - pop)}) scale(${pop})`;++ return (+ <svg+ className={className}+ width={size}+ height={size}+ viewBox="0 0 24 24"+ fill="none"+ stroke={color}+ strokeWidth={strokeWidth}+ strokeLinecap="round"+ strokeLinejoin="round"+ style={{+ overflow: "visible",+ transformOrigin: "center",+ transform: `scale(${scale})`,+ }}+ >+ <g transform={popTransform}>+ <path+ d={STONE_PATH}+ strokeDasharray={stone.strokeDasharray}+ strokeDashoffset={stone.strokeDashoffset}+ />+ <g opacity={shimmer}>+ <path+ d={VCUT_PATH}+ strokeDasharray={vcut.strokeDasharray}+ strokeDashoffset={vcut.strokeDashoffset}+ />+ <path+ d={BAND_PATH}+ strokeDasharray={band.strokeDasharray}+ strokeDashoffset={band.strokeDashoffset}+ />+ </g>+ </g>+ </svg>+ );+}++export function GemIconStatic({+ size = 48,+ color = "currentColor",+ strokeWidth = 2,+ className,+}: {+ size?: number;+ color?: string;+ strokeWidth?: number;+ className?: string;+}) {+ return (+ <svg+ className={className}+ width={size}+ height={size}+ viewBox="0 0 24 24"+ fill="none"+ stroke={color}+ strokeWidth={strokeWidth}+ strokeLinecap="round"+ strokeLinejoin="round"+ >+ <path d="M10.5 3 8 9l4 13 4-13-2.5-6" />+ <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" />+ <path d="M2 9h20" />+ </svg>+ );+}diff --git a/registry/remocn/registry.json b/registry/remocn/registry.jsonindex aae8224e..d812f177 100644--- a/registry/remocn/registry.json+++ b/registry/remocn/registry.json@@ -2629,6 +2629,21 @@}]},+ {+ "name": "icon-gem",+ "type": "registry:component",+ "title": "Gem",+ "description": "Animated Lucide gem icon — the stone draws on, then light catches it: facets re-trace in sequence with a flicker and a pop.",+ "dependencies": ["remotion"],+ "registryDependencies": ["@remocn/icons-core"],+ "files": [+ {+ "path": "icon-gem/index.tsx",+ "type": "registry:component",+ "target": "components/remocn/icon-gem.tsx"+ }+ ]+ },{"name": "icon-gift","type": "registry:component",