Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

feat: rebuild registry

dev_wandry5278067a32c1
diff --git a/public/r/chat-flow.json b/public/r/chat-flow.json
new file mode 100644
index 00000000..84498c83
--- /dev/null
+++ b/public/r/chat-flow.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
+ "name": "chat-flow",
+ "title": "UI Chat Flow",
+ "description": "A messaging composition: an outgoing message types into the composer, the send button presses, and the bubble rises in; the other side shows a typing indicator that swaps into the reply, and reactions pop in. A pure orchestrator — every channel comes from a composed primitive's hook (Input, MessageBubble, TypingIndicator).",
+ "dependencies": [
+ "remotion"
+ ],
+ "registryDependencies": [
+ "@remocn/remocn-ui",
+ "@remocn/caret",
+ "@remocn/message-bubble",
+ "@remocn/typing-indicator"
+ ],
+ "files": [
+ {
+ "path": "registry/remocn-ui/chat-flow/index.tsx",
+ "content": "\"use client\";\n\nimport { interpolate, spring, useCurrentFrame, useVideoConfig } from \"remotion\";\nimport {\n type RemocnTheme,\n mixOklch,\n revealedText,\n useRemocnTheme,\n} from \"@/lib/remocn-ui\";\nimport { Caret } from \"@/components/remocn/caret\";\nimport {\n MessageBubble,\n type MessageBubbleReactionStyle,\n type MessageBubbleStyle,\n} from \"@/components/remocn/message-bubble\";\nimport { useMessageBubbleTransition } from \"@/components/remocn/use-message-bubble-transition\";\nimport { TypingIndicator } from \"@/components/remocn/typing-indicator\";\n\nexport interface ChatMessage {\n from: \"me\" | \"them\";\n text: string;\n reaction?: string;\n}\n\nexport interface ChatContact {\n name: string;\n avatar?: string;\n}\n\nexport interface ChatFlowProps {\n messages?: ChatMessage[];\n contact?: ChatContact;\n accentColor?: string;\n speed?: number;\n theme?: Partial<RemocnTheme>;\n}\n\nconst MOBILE_WIDTH = 460;\nconst LEAD_IN = 12;\nconst FRAMES_PER_CHAR = 2.2;\nconst MIN_TYPE = 18;\nconst MAX_TYPE = 86;\nconst SEND_GAP = 10;\nconst REVEAL = 14;\nconst REACT_DELAY = 8;\nconst REACT_DUR = 14;\nconst MSG_GAP = 18;\nconst TYPING_MIN = 34;\nconst TYPING_MAX = 70;\nconst TAIL = 28;\nconst PRESS_WINDOW = 7;\n\nconst DEFAULT_MESSAGES: ChatMessage[] = [\n { from: \"me\", text: \"Hey — ready for the demo?\" },\n { from: \"them\", text: \"Yep, pushing it live now\", reaction: \"🔥\" },\n { from: \"me\", text: \"Perfect, sending the link over\", reaction: \"👍\" },\n];\n\nfunction clamp(value: number, lo: number, hi: number): number {\n return Math.max(lo, Math.min(hi, value));\n}\n\nexport interface ScheduledMessage {\n index: number;\n from: \"me\" | \"them\";\n text: string;\n reaction?: string;\n presenceStart: number;\n typeStart?: number;\n sendAt?: number;\n typingStart?: number;\n revealAt: number;\n reactAt?: number;\n}\n\nexport interface ChatFlowSchedule {\n items: ScheduledMessage[];\n duration: number;\n}\n\nexport function chatFlowSchedule(messages: ChatMessage[]): ChatFlowSchedule {\n const items: ScheduledMessage[] = [];\n let cursor = LEAD_IN;\n\n messages.forEach((message, index) => {\n const hasReaction =\n message.reaction !== undefined && message.reaction !== \"\";\n if (message.from === \"me\") {\n const typeStart = cursor;\n const typeDur = clamp(\n Math.round(message.text.length * FRAMES_PER_CHAR),\n MIN_TYPE,\n MAX_TYPE,\n );\n const sendAt = typeStart + typeDur + SEND_GAP;\n const revealAt = sendAt;\n const reactAt = hasReaction ? revealAt + REVEAL + REACT_DELAY : undefined;\n items.push({\n index,\n from: \"me\",\n text: message.text,\n reaction: hasReaction ? message.reaction : undefined,\n presenceStart: sendAt - 2,\n typeStart,\n sendAt,\n revealAt,\n reactAt,\n });\n cursor =\n revealAt +\n REVEAL +\n (hasReaction ? REACT_DELAY + REACT_DUR : 0) +\n MSG_GAP;\n } else {\n const typingStart = cursor;\n const typingDur = clamp(\n Math.round(message.text.length * FRAMES_PER_CHAR),\n TYPING_MIN,\n TYPING_MAX,\n );\n const revealAt = typingStart + typingDur;\n const reactAt = hasReaction ? revealAt + REVEAL + REACT_DELAY : undefined;\n items.push({\n index,\n from: \"them\",\n text: message.text,\n reaction: hasReaction ? message.reaction : undefined,\n presenceStart: typingStart,\n typingStart,\n revealAt,\n reactAt,\n });\n cursor =\n revealAt +\n REVEAL +\n (hasReaction ? REACT_DELAY + REACT_DUR : 0) +\n MSG_GAP;\n }\n });\n\n const duration = Math.max(cursor - MSG_GAP + TAIL, LEAD_IN + TAIL);\n return { items, duration };\n}\n\nexport function chatFlowDuration(\n messages: ChatMessage[] = DEFAULT_MESSAGES,\n speed = 1,\n): number {\n const raw = chatFlowSchedule(messages).duration;\n return Math.ceil(raw / (speed <= 0 ? 1 : speed));\n}\n\nexport function sendPulse(items: ScheduledMessage[], eff: number): number {\n let best = 0;\n for (const item of items) {\n if (item.sendAt === undefined) continue;\n const distance = Math.abs(eff - item.sendAt);\n if (distance <= PRESS_WINDOW) {\n best = Math.max(best, 1 - distance / PRESS_WINDOW);\n }\n }\n return best;\n}\n\nfunction typingBubbleStyle(\n eff: number,\n typingStart: number,\n revealAt: number,\n): MessageBubbleStyle {\n const inOpacity = interpolate(eff, [typingStart, typingStart + 8], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n const outOpacity = interpolate(eff, [revealAt - 6, revealAt], [1, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n const translateY = interpolate(eff, [typingStart, typingStart + 8], [10, 0], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n return { opacity: inOpacity * outOpacity, translateY, scale: 1 };\n}\n\nfunction Avatar({\n contact,\n theme,\n}: {\n contact: ChatContact;\n theme: RemocnTheme;\n}) {\n const initial = contact.name.trim().charAt(0).toUpperCase();\n return (\n <div\n style={{\n flexShrink: 0,\n width: 32,\n height: 32,\n minWidth: 32,\n borderRadius: \"50%\",\n overflow: \"hidden\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: theme.muted,\n color: theme.mutedForeground,\n fontSize: 14,\n fontWeight: 600,\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {contact.avatar !== undefined ? (\n <img\n src={contact.avatar}\n alt={contact.name}\n style={{ width: \"100%\", height: \"100%\", objectFit: \"cover\" }}\n />\n ) : (\n initial\n )}\n </div>\n );\n}\n\nfunction SendIcon({ color }: { color: string }) {\n return (\n <svg width={20} height={20} viewBox=\"0 0 24 24\" fill=\"none\">\n <path\n d=\"M12 19V5M12 5l-6 6M12 5l6 6\"\n stroke={color}\n strokeWidth={2.2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n );\n}\n\nfunction PlusIcon({ color }: { color: string }) {\n return (\n <svg width={20} height={20} viewBox=\"0 0 24 24\" fill=\"none\">\n <path\n d=\"M12 5v14M5 12h14\"\n stroke={color}\n strokeWidth={2.2}\n strokeLinecap=\"round\"\n />\n </svg>\n );\n}\n\nexport function ChatFlow({\n messages = DEFAULT_MESSAGES,\n contact,\n accentColor,\n speed = 1,\n theme: themeOverride,\n}: ChatFlowProps) {\n const frame = useCurrentFrame();\n const eff = frame * speed;\n\n const themeProp = {\n ...themeOverride,\n ...(accentColor ? { primary: accentColor } : {}),\n };\n const resolved = useRemocnTheme(themeProp, \"light\");\n\n const { items } = chatFlowSchedule(messages);\n\n const activeMe = items.find(\n (item) =>\n item.from === \"me\" &&\n item.typeStart !== undefined &&\n item.sendAt !== undefined &&\n eff >= item.typeStart &&\n eff < item.sendAt,\n );\n let composerText = \"\";\n let typing = false;\n if (\n activeMe &&\n activeMe.typeStart !== undefined &&\n activeMe.sendAt !== undefined\n ) {\n const typeDur = Math.max(\n activeMe.sendAt - SEND_GAP - activeMe.typeStart,\n 1,\n );\n const progress = clamp((eff - activeMe.typeStart) / typeDur, 0, 1);\n composerText = revealedText(\n activeMe.text,\n Math.floor(progress * activeMe.text.length),\n );\n typing = true;\n }\n\n const sendActive = composerText.length > 0;\n const sendScale = 1 - 0.16 * sendPulse(items, eff);\n const present = items.filter((item) => eff >= item.presenceStart);\n\n const composerBackground = mixOklch(\n resolved.background,\n resolved.muted,\n 0.55,\n );\n\n return (\n <div\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n background: \"transparent\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n width: \"100%\",\n maxWidth: MOBILE_WIDTH,\n height: \"100%\",\n padding: \"24px 16px 18px\",\n boxSizing: \"border-box\",\n }}\n >\n {contact !== undefined && (\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 10,\n paddingBottom: 16,\n marginBottom: 8,\n borderBottom: `1px solid ${resolved.border}`,\n }}\n >\n <Avatar contact={contact} theme={resolved} />\n <div style={{ display: \"flex\", flexDirection: \"column\", gap: 2 }}>\n <span\n style={{\n fontSize: 15,\n fontWeight: 600,\n lineHeight: 1.25,\n letterSpacing: \"-0.01em\",\n color: resolved.foreground,\n }}\n >\n {contact.name}\n </span>\n <span\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 5,\n fontSize: 12,\n lineHeight: 1.2,\n color: \"oklch(0.62 0.17 150)\",\n }}\n >\n <span\n style={{\n width: 6,\n height: 6,\n borderRadius: \"50%\",\n background: \"oklch(0.62 0.17 150)\",\n }}\n />\n online\n </span>\n </div>\n </div>\n )}\n\n <div\n style={{\n position: \"relative\",\n flex: 1,\n minHeight: 0,\n overflow: \"hidden\",\n WebkitMaskImage:\n \"linear-gradient(to bottom, transparent 0, #000 48px, #000 100%)\",\n maskImage:\n \"linear-gradient(to bottom, transparent 0, #000 48px, #000 100%)\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"flex-end\",\n gap: 20,\n minHeight: \"100%\",\n paddingTop: 24,\n paddingBottom: 22,\n }}\n >\n {present.map((item) => (\n <ChatRow\n key={item.index}\n item={item}\n eff={eff}\n speed={speed}\n contact={contact}\n themeProp={themeProp}\n theme={resolved}\n />\n ))}\n </div>\n </div>\n\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n gap: 10,\n marginTop: 14,\n padding: 14,\n borderRadius: 24,\n background: composerBackground,\n border: `1px solid ${resolved.border}`,\n }}\n >\n <div\n style={{\n display: \"flex\",\n alignItems: \"flex-start\",\n minHeight: 24,\n fontSize: 15,\n lineHeight: 1.45,\n letterSpacing: \"-0.01em\",\n color: sendActive\n ? resolved.foreground\n : resolved.mutedForeground,\n }}\n >\n <span style={{ whiteSpace: \"pre-wrap\", wordBreak: \"break-word\" }}>\n {sendActive ? composerText : \"Message\"}\n </span>\n {typing && (\n <Caret\n color={resolved.foreground}\n height={18}\n radius={1}\n blink\n marginLeft={composerText.length > 0 ? 2 : 0}\n />\n )}\n </div>\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n }}\n >\n <div\n style={{\n width: 38,\n height: 38,\n borderRadius: \"50%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n border: `1px solid ${resolved.border}`,\n background: \"transparent\",\n }}\n >\n <PlusIcon color={resolved.mutedForeground} />\n </div>\n <div\n style={{\n width: 38,\n height: 38,\n borderRadius: \"50%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: sendActive\n ? resolved.primary\n : mixOklch(resolved.background, resolved.muted, 0.6),\n transform: `scale(${sendScale})`,\n }}\n >\n <SendIcon\n color={\n sendActive\n ? resolved.primaryForeground\n : resolved.mutedForeground\n }\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n}\n\nfunction ChatRow({\n item,\n eff,\n speed,\n contact,\n themeProp,\n theme,\n}: {\n item: ScheduledMessage;\n eff: number;\n speed: number;\n contact?: ChatContact;\n themeProp: Partial<RemocnTheme>;\n theme: RemocnTheme;\n}) {\n const { fps } = useVideoConfig();\n const variant = item.from === \"me\" ? \"outgoing\" : \"incoming\";\n const showTyping =\n item.from === \"them\" &&\n item.typingStart !== undefined &&\n eff < item.revealAt;\n\n const bubbleStyle = useMessageBubbleTransition(\n [{ at: item.revealAt, state: \"visible\", duration: REVEAL }],\n { speed },\n );\n\n let reactionStyle: MessageBubbleReactionStyle | undefined;\n if (item.reactAt !== undefined) {\n const reactAt = item.reactAt;\n const pop = spring({\n fps,\n frame: eff - reactAt,\n config: { damping: 11, stiffness: 220, mass: 0.6 },\n });\n const opacity = interpolate(eff, [reactAt, reactAt + 5], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n reactionStyle = { opacity, scale: pop };\n }\n\n const bubbleNode = showTyping ? (\n <MessageBubble\n variant=\"incoming\"\n style={typingBubbleStyle(eff, item.typingStart ?? 0, item.revealAt)}\n theme={themeProp}\n >\n <TypingIndicator color={theme.mutedForeground} />\n </MessageBubble>\n ) : (\n <MessageBubble\n variant={variant}\n style={bubbleStyle}\n reaction={item.reaction}\n reactionStyle={reactionStyle}\n theme={themeProp}\n >\n {item.text}\n </MessageBubble>\n );\n\n if (item.from === \"them\" && contact !== undefined) {\n return (\n <div style={{ display: \"flex\", alignItems: \"flex-end\", gap: 8 }}>\n <Avatar contact={contact} theme={theme} />\n <div style={{ flex: 1, minWidth: 0 }}>{bubbleNode}</div>\n </div>\n );\n }\n\n return bubbleNode;\n}\n",
+ "type": "registry:component",
+ "target": "components/remocn/chat-flow.tsx"
+ }
+ ],
+ "type": "registry:component"
+}
\ No newline at end of file
diff --git a/public/r/glass-code-block.json b/public/r/glass-code-block.json
index 09645b4c..eacadb41 100644
--- a/public/r/glass-code-block.json
+++ b/public/r/glass-code-block.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "registry/remocn/glass-code-block/index.tsx",
- "content": "\"use client\";\n\nimport { Sequence, interpolate, 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 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;\n while ((match = re.exec(line)) !== 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 }\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 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 {/* Animated background hint behind the glass so the blur has something\n to chew on. Pure CSS — no extra deps. */}\n <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 { Sequence, interpolate, 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;\n while ((match = re.exec(line)) !== 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 }\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",
"type": "registry:component",
"target": "components/remocn/glass-code-block.tsx"
}
diff --git a/public/r/glass-code-walk.json b/public/r/glass-code-walk.json
new file mode 100644
index 00000000..7bb98ac4
--- /dev/null
+++ b/public/r/glass-code-walk.json
@@ -0,0 +1,21 @@
+{
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
+ "name": "glass-code-walk",
+ "title": "Glass Code Walk",
+ "description": "A camera that scans a glass code block top to bottom as it types, then pulls back to a centered hold.",
+ "dependencies": [
+ "remotion"
+ ],
+ "registryDependencies": [
+ "@remocn/glass-code-block"
+ ],
+ "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",
+ "type": "registry:component",
+ "target": "components/remocn/glass-code-walk.tsx"
+ }
+ ],
+ "type": "registry:component"
+}
\ No newline at end of file
diff --git a/public/r/imessage-chat-flow.json b/public/r/imessage-chat-flow.json
new file mode 100644
index 00000000..fccf51e8
--- /dev/null
+++ b/public/r/imessage-chat-flow.json
@@ -0,0 +1,24 @@
+{
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
+ "name": "imessage-chat-flow",
+ "title": "UI iMessage Chat Flow",
+ "description": "An iMessage-styled messaging composition: gray incoming and blue outgoing bubbles with tails, an in-thread typing bubble with dots, a Delivered label, and tapback-style reaction badges. The composer types the outgoing message before sending. Chrome icons come from lucide-react; self-contained otherwise, composing the caret and typing-indicator primitives.",
+ "dependencies": [
+ "remotion",
+ "lucide-react"
+ ],
+ "registryDependencies": [
+ "@remocn/remocn-ui",
+ "@remocn/caret",
+ "@remocn/typing-indicator"
+ ],
+ "files": [
+ {
+ "path": "registry/remocn-ui/imessage-chat-flow/index.tsx",
+ "content": "\"use client\";\n\nimport {\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { ArrowUp, ChevronLeft, Plus, Video } from \"lucide-react\";\nimport { type RemocnTheme, revealedText } from \"@/lib/remocn-ui\";\nimport { Caret } from \"@/components/remocn/caret\";\nimport { TypingIndicator } from \"@/components/remocn/typing-indicator\";\n\nexport interface ImessageMessage {\n from: \"me\" | \"them\";\n text: string;\n reaction?: string;\n}\n\nexport interface ImessageContact {\n name: string;\n avatar?: string;\n}\n\nexport interface ImessageChatFlowProps {\n messages?: ImessageMessage[];\n contact?: ImessageContact;\n accentColor?: string;\n speed?: number;\n theme?: Partial<RemocnTheme>;\n}\n\nconst MOBILE_WIDTH = 460;\nconst LEAD_IN = 12;\nconst FRAMES_PER_CHAR = 2.2;\nconst MIN_TYPE = 18;\nconst MAX_TYPE = 86;\nconst SEND_GAP = 10;\nconst REVEAL = 14;\nconst REACT_DELAY = 8;\nconst REACT_DUR = 14;\nconst MSG_GAP = 18;\nconst TYPING_MIN = 34;\nconst TYPING_MAX = 70;\nconst TAIL = 28;\nconst PRESS_WINDOW = 7;\n\nconst IMESSAGE_BLUE = \"#0a7cff\";\nconst SYSTEM_BLUE = \"#007aff\";\nconst INCOMING_BG = \"#e9e9eb\";\nconst INCOMING_FG = \"#000000\";\nconst OUTGOING_FG = \"#ffffff\";\nconst META_GRAY = \"#8e8e93\";\n\nconst DEFAULT_MESSAGES: ImessageMessage[] = [\n { from: \"me\", text: \"Hey — ready for the demo?\" },\n { from: \"them\", text: \"Yep, pushing it live now\", reaction: \"❤️\" },\n { from: \"me\", text: \"Perfect, sending the link over\", reaction: \"👍\" },\n];\n\nfunction clamp(value: number, lo: number, hi: number): number {\n return Math.max(lo, Math.min(hi, value));\n}\n\nexport interface ScheduledMessage {\n index: number;\n from: \"me\" | \"them\";\n text: string;\n reaction?: string;\n presenceStart: number;\n typeStart?: number;\n sendAt?: number;\n typingStart?: number;\n revealAt: number;\n reactAt?: number;\n}\n\nexport interface ImessageChatFlowSchedule {\n items: ScheduledMessage[];\n duration: number;\n}\n\nexport function imessageChatFlowSchedule(\n messages: ImessageMessage[],\n): ImessageChatFlowSchedule {\n const items: ScheduledMessage[] = [];\n let cursor = LEAD_IN;\n\n messages.forEach((message, index) => {\n const hasReaction = message.reaction !== undefined && message.reaction !== \"\";\n if (message.from === \"me\") {\n const typeStart = cursor;\n const typeDur = clamp(\n Math.round(message.text.length * FRAMES_PER_CHAR),\n MIN_TYPE,\n MAX_TYPE,\n );\n const sendAt = typeStart + typeDur + SEND_GAP;\n const revealAt = sendAt;\n const reactAt = hasReaction ? revealAt + REVEAL + REACT_DELAY : undefined;\n items.push({\n index,\n from: \"me\",\n text: message.text,\n reaction: hasReaction ? message.reaction : undefined,\n presenceStart: sendAt - 2,\n typeStart,\n sendAt,\n revealAt,\n reactAt,\n });\n cursor =\n revealAt + REVEAL + (hasReaction ? REACT_DELAY + REACT_DUR : 0) + MSG_GAP;\n } else {\n const typingStart = cursor;\n const typingDur = clamp(\n Math.round(message.text.length * FRAMES_PER_CHAR),\n TYPING_MIN,\n TYPING_MAX,\n );\n const revealAt = typingStart + typingDur;\n const reactAt = hasReaction ? revealAt + REVEAL + REACT_DELAY : undefined;\n items.push({\n index,\n from: \"them\",\n text: message.text,\n reaction: hasReaction ? message.reaction : undefined,\n presenceStart: typingStart,\n typingStart,\n revealAt,\n reactAt,\n });\n cursor =\n revealAt + REVEAL + (hasReaction ? REACT_DELAY + REACT_DUR : 0) + MSG_GAP;\n }\n });\n\n const duration = Math.max(cursor - MSG_GAP + TAIL, LEAD_IN + TAIL);\n return { items, duration };\n}\n\nexport function imessageChatFlowDuration(\n messages: ImessageMessage[] = DEFAULT_MESSAGES,\n speed = 1,\n): number {\n const raw = imessageChatFlowSchedule(messages).duration;\n return Math.ceil(raw / (speed <= 0 ? 1 : speed));\n}\n\nexport function sendPulse(items: ScheduledMessage[], eff: number): number {\n let best = 0;\n for (const item of items) {\n if (item.sendAt === undefined) continue;\n const distance = Math.abs(eff - item.sendAt);\n if (distance <= PRESS_WINDOW) {\n best = Math.max(best, 1 - distance / PRESS_WINDOW);\n }\n }\n return best;\n}\n\nfunction Avatar({ contact, size }: { contact: ImessageContact; size: number }) {\n const initial = contact.name.trim().charAt(0).toUpperCase();\n return (\n <div\n style={{\n flexShrink: 0,\n width: size,\n height: size,\n minWidth: size,\n borderRadius: \"50%\",\n overflow: \"hidden\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"linear-gradient(180deg, #b8c0c9 0%, #8e99a4 100%)\",\n color: \"#ffffff\",\n fontSize: size * 0.42,\n fontWeight: 600,\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {contact.avatar !== undefined ? (\n <img\n src={contact.avatar}\n alt={contact.name}\n style={{ width: \"100%\", height: \"100%\", objectFit: \"cover\" }}\n />\n ) : (\n initial\n )}\n </div>\n );\n}\n\nfunction BubbleTail({ side, color }: { side: \"left\" | \"right\"; color: string }) {\n const path =\n side === \"right\"\n ? \"M0 0 C2 8 6 12 12 13 C7 14 1 13 0 8 Z\"\n : \"M13 0 C11 8 7 12 1 13 C6 14 12 13 13 8 Z\";\n return (\n <svg\n width={13}\n height={14}\n viewBox=\"0 0 13 14\"\n style={{\n position: \"absolute\",\n bottom: 0,\n left: side === \"left\" ? -5 : undefined,\n right: side === \"right\" ? -5 : undefined,\n }}\n >\n <path d={path} fill={color} />\n </svg>\n );\n}\n\nexport function ImessageChatFlow({\n messages = DEFAULT_MESSAGES,\n contact,\n accentColor,\n speed = 1,\n}: ImessageChatFlowProps) {\n const frame = useCurrentFrame();\n const eff = frame * speed;\n const accent = accentColor ?? IMESSAGE_BLUE;\n\n const { items } = imessageChatFlowSchedule(messages);\n\n const activeMe = items.find(\n (item) =>\n item.from === \"me\" &&\n item.typeStart !== undefined &&\n item.sendAt !== undefined &&\n eff >= item.typeStart &&\n eff < item.sendAt,\n );\n let composerText = \"\";\n let typing = false;\n if (\n activeMe &&\n activeMe.typeStart !== undefined &&\n activeMe.sendAt !== undefined\n ) {\n const typeDur = Math.max(activeMe.sendAt - SEND_GAP - activeMe.typeStart, 1);\n const progress = clamp((eff - activeMe.typeStart) / typeDur, 0, 1);\n composerText = revealedText(\n activeMe.text,\n Math.floor(progress * activeMe.text.length),\n );\n typing = true;\n }\n\n const sendActive = composerText.length > 0;\n const sendScale = 1 - 0.16 * sendPulse(items, eff);\n const present = items.filter((item) => eff >= item.presenceStart);\n\n let lastMeIndex = -1;\n items.forEach((item) => {\n if (item.from === \"me\") lastMeIndex = item.index;\n });\n const deliveredIndex =\n lastMeIndex === messages.length - 1 ? lastMeIndex : -1;\n\n return (\n <div\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n background: \"transparent\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n width: \"100%\",\n maxWidth: MOBILE_WIDTH,\n height: \"100%\",\n boxSizing: \"border-box\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n padding: \"10px 12px\",\n background: \"rgba(255,255,255,0.82)\",\n backdropFilter: \"blur(12px)\",\n borderBottom: \"1px solid rgba(0,0,0,0.08)\",\n }}\n >\n <ChevronLeft size={28} color={SYSTEM_BLUE} strokeWidth={2.25} />\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: \"center\",\n gap: 2,\n flex: 1,\n }}\n >\n {contact !== undefined && <Avatar contact={contact} size={30} />}\n <span\n style={{\n fontSize: 12,\n fontWeight: 600,\n color: \"#000000\",\n }}\n >\n {contact?.name ?? \"Chat\"}\n </span>\n </div>\n <Video size={24} color={SYSTEM_BLUE} strokeWidth={2} />\n </div>\n\n <div\n style={{\n position: \"relative\",\n flex: 1,\n minHeight: 0,\n overflow: \"hidden\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"flex-end\",\n gap: 18,\n minHeight: \"100%\",\n padding: \"16px 14px 12px\",\n }}\n >\n {present.map((item) => (\n <ImessageRow\n key={item.index}\n item={item}\n eff={eff}\n contact={contact}\n accent={accent}\n showDelivered={item.index === deliveredIndex}\n />\n ))}\n </div>\n </div>\n\n <div\n style={{\n display: \"flex\",\n alignItems: \"flex-end\",\n gap: 8,\n padding: \"8px 12px 12px\",\n }}\n >\n <div\n style={{\n width: 34,\n height: 34,\n borderRadius: \"50%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: \"#e9e9eb\",\n }}\n >\n <Plus size={22} color=\"#3c3c43\" strokeWidth={2} />\n </div>\n <div\n style={{\n flex: 1,\n display: \"flex\",\n alignItems: \"center\",\n gap: 6,\n minHeight: 36,\n padding: \"0 6px 0 14px\",\n borderRadius: 18,\n border: \"1px solid #d1d1d6\",\n background: \"#ffffff\",\n }}\n >\n <div\n style={{\n flex: 1,\n display: \"flex\",\n alignItems: \"center\",\n fontSize: 16,\n color: sendActive ? \"#000000\" : \"#9b9ba1\",\n }}\n >\n <span style={{ whiteSpace: \"pre-wrap\", wordBreak: \"break-word\" }}>\n {sendActive ? composerText : \"iMessage\"}\n </span>\n {typing && (\n <Caret\n color={accent}\n height={18}\n radius={1}\n blink\n marginLeft={composerText.length > 0 ? 2 : 0}\n />\n )}\n </div>\n <div\n style={{\n flexShrink: 0,\n width: 28,\n height: 28,\n borderRadius: \"50%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: sendActive ? accent : \"#c6c6cc\",\n transform: `scale(${sendScale})`,\n }}\n >\n <ArrowUp size={20} color=\"#ffffff\" strokeWidth={2.75} />\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n}\n\nfunction ImessageRow({\n item,\n eff,\n contact,\n accent,\n showDelivered,\n}: {\n item: ScheduledMessage;\n eff: number;\n contact?: ImessageContact;\n accent: string;\n showDelivered: boolean;\n}) {\n const { fps } = useVideoConfig();\n const outgoing = item.from === \"me\";\n const showTyping =\n item.from === \"them\" &&\n item.typingStart !== undefined &&\n eff < item.revealAt;\n\n const enter = spring({\n fps,\n frame: eff - (showTyping ? (item.typingStart ?? 0) : item.revealAt),\n config: { damping: 16, stiffness: 200, mass: 0.7 },\n });\n const opacity = interpolate(enter, [0, 1], [0, 1]);\n const translateY = interpolate(enter, [0, 1], [10, 0]);\n const scale = interpolate(enter, [0, 1], [0.92, 1]);\n\n let reactionScale = 0;\n let reactionOpacity = 0;\n if (item.reactAt !== undefined) {\n reactionScale = spring({\n fps,\n frame: eff - item.reactAt,\n config: { damping: 11, stiffness: 220, mass: 0.6 },\n });\n reactionOpacity = interpolate(eff, [item.reactAt, item.reactAt + 5], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n }\n\n const bg = outgoing ? accent : INCOMING_BG;\n const fg = outgoing ? OUTGOING_FG : INCOMING_FG;\n const delivered =\n showDelivered && !showTyping && eff > item.revealAt + REVEAL;\n\n const bubble = (\n <div\n style={{\n position: \"relative\",\n maxWidth: \"72%\",\n padding: showTyping ? \"11px 14px\" : \"7px 13px 8px\",\n background: bg,\n color: fg,\n borderRadius: 19,\n borderBottomRightRadius: outgoing ? 7 : 19,\n borderBottomLeftRadius: outgoing ? 19 : 7,\n fontSize: 16,\n lineHeight: 1.32,\n }}\n >\n {showTyping ? (\n <TypingIndicator color={META_GRAY} />\n ) : (\n <span style={{ wordBreak: \"break-word\", overflowWrap: \"break-word\" }}>\n {item.text}\n </span>\n )}\n {!showTyping && <BubbleTail side={outgoing ? \"right\" : \"left\"} color={bg} />}\n {item.reaction !== undefined && (\n <div\n style={{\n position: \"absolute\",\n top: -16,\n left: outgoing ? -14 : undefined,\n right: outgoing ? undefined : -14,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n width: 30,\n height: 30,\n borderRadius: \"50%\",\n background: INCOMING_BG,\n fontSize: 15,\n boxShadow: \"0 1px 2px rgba(0,0,0,0.12)\",\n opacity: reactionOpacity,\n transform: `scale(${reactionScale})`,\n transformOrigin: outgoing ? \"bottom left\" : \"bottom right\",\n }}\n >\n {item.reaction}\n </div>\n )}\n </div>\n );\n\n return (\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n alignItems: outgoing ? \"flex-end\" : \"flex-start\",\n gap: 2,\n width: \"100%\",\n opacity,\n transform: `translateY(${translateY}px) scale(${scale})`,\n transformOrigin: outgoing ? \"bottom right\" : \"bottom left\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n alignItems: \"flex-end\",\n justifyContent: outgoing ? \"flex-end\" : \"flex-start\",\n gap: 7,\n width: \"100%\",\n }}\n >\n {!outgoing && contact !== undefined && (\n <Avatar contact={contact} size={28} />\n )}\n {bubble}\n </div>\n {delivered && (\n <span\n style={{\n fontSize: 11,\n color: META_GRAY,\n paddingRight: 4,\n }}\n >\n Delivered\n </span>\n )}\n </div>\n );\n}\n",
+ "type": "registry:component",
+ "target": "components/remocn/imessage-chat-flow.tsx"
+ }
+ ],
+ "type": "registry:component"
+}
\ No newline at end of file
diff --git a/public/r/logo-enter.json b/public/r/logo-enter.json
new file mode 100644
index 00000000..c0723aef
--- /dev/null
+++ b/public/r/logo-enter.json
@@ -0,0 +1,18 @@
+{
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
+ "name": "logo-enter",
+ "title": "Logo Enter",
+ "description": "A stacked group of round brand chips that spring in one-by-one, then hold. Swap the logos to feature any set of marks. Horizontal or vertical stacking.",
+ "dependencies": [
+ "remotion"
+ ],
+ "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",
+ "type": "registry:component",
+ "target": "components/remocn/logo-enter.tsx"
+ }
+ ],
+ "type": "registry:component"
+}
\ No newline at end of file
diff --git a/public/r/message-bubble.json b/public/r/message-bubble.json
new file mode 100644
index 00000000..319d5be6
--- /dev/null
+++ b/public/r/message-bubble.json
@@ -0,0 +1,27 @@
+{
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
+ "name": "message-bubble",
+ "title": "UI Message Bubble",
+ "description": "A chat message bubble whose hidden/visible state is a pure function of the timeline. The renderer is a pure function of a MessageBubbleStyle (opacity, translateY, scale); useMessageBubbleTransition eases the rise-in enter. The incoming/outgoing variant resolves bubble color and alignment from the theme, and an optional reaction badge pops in on its own channel.",
+ "dependencies": [
+ "remotion"
+ ],
+ "registryDependencies": [
+ "@remocn/remocn-ui"
+ ],
+ "files": [
+ {
+ "path": "registry/remocn-ui/message-bubble/index.tsx",
+ "content": "\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { type RemocnTheme, useRemocnTheme } from \"@/lib/remocn-ui\";\n\nexport type MessageBubbleState = \"hidden\" | \"visible\";\n\nexport type MessageBubbleVariant = \"incoming\" | \"outgoing\";\n\nexport interface MessageBubbleProps {\n state?: MessageBubbleState;\n style?: MessageBubbleStyle;\n variant?: MessageBubbleVariant;\n children?: ReactNode;\n reaction?: string;\n reactionStyle?: MessageBubbleReactionStyle;\n maxWidth?: number | string;\n theme?: Partial<RemocnTheme>;\n className?: string;\n}\n\nexport interface MessageBubbleStyle {\n opacity: number;\n translateY: number;\n scale: number;\n}\n\nexport interface MessageBubbleReactionStyle {\n opacity: number;\n scale: number;\n}\n\nexport interface MessageBubbleStyleContext {\n background: string;\n color: string;\n align: \"flex-start\" | \"flex-end\";\n reactionSide: \"left\" | \"right\";\n reactionBackground: string;\n reactionColor: string;\n reactionRing: string;\n}\n\nexport function messageBubbleStyleContext(\n variant: MessageBubbleVariant,\n theme: RemocnTheme,\n): MessageBubbleStyleContext {\n const reaction = {\n reactionBackground: theme.muted,\n reactionColor: theme.foreground,\n reactionRing: theme.card,\n };\n if (variant === \"outgoing\") {\n return {\n background: theme.primary,\n color: theme.primaryForeground,\n align: \"flex-end\",\n reactionSide: \"right\",\n ...reaction,\n };\n }\n return {\n background: theme.muted,\n color: theme.foreground,\n align: \"flex-start\",\n reactionSide: \"left\",\n ...reaction,\n };\n}\n\nexport function messageBubbleStyle(state: MessageBubbleState): MessageBubbleStyle {\n switch (state) {\n case \"visible\":\n return { opacity: 1, translateY: 0, scale: 1 };\n default:\n return { opacity: 0, translateY: 12, scale: 0.94 };\n }\n}\n\nexport function messageBubbleReactionStyle(\n state: MessageBubbleState,\n): MessageBubbleReactionStyle {\n return state === \"visible\"\n ? { opacity: 1, scale: 1 }\n : { opacity: 0, scale: 0 };\n}\n\nexport function MessageBubble({\n state = \"hidden\",\n style,\n variant = \"incoming\",\n children,\n reaction,\n reactionStyle,\n maxWidth = \"80%\",\n theme: themeOverride,\n className,\n}: MessageBubbleProps) {\n const theme = useRemocnTheme(themeOverride, \"light\");\n const ctx = messageBubbleStyleContext(variant, theme);\n const v = style ?? messageBubbleStyle(state);\n const reaction_ = reactionStyle ?? messageBubbleReactionStyle(state);\n\n return (\n <div\n className={className}\n style={{\n display: \"flex\",\n justifyContent: ctx.align,\n width: \"100%\",\n opacity: v.opacity,\n transform: `translateY(${v.translateY}px) scale(${v.scale})`,\n transformOrigin: ctx.align === \"flex-end\" ? \"bottom right\" : \"bottom left\",\n }}\n >\n <div style={{ position: \"relative\", maxWidth, minWidth: 0 }}>\n <div\n style={{\n display: \"inline-block\",\n maxWidth: \"100%\",\n padding: \"10px 14px\",\n background: ctx.background,\n color: ctx.color,\n border: \"1px solid transparent\",\n borderRadius: 24,\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n fontSize: 14,\n lineHeight: 1.625,\n overflowWrap: \"break-word\",\n wordBreak: \"break-word\",\n }}\n >\n {children}\n </div>\n {reaction !== undefined && (\n <div\n style={{\n position: \"absolute\",\n bottom: 0,\n left: ctx.reactionSide === \"left\" ? 12 : undefined,\n right: ctx.reactionSide === \"right\" ? 12 : undefined,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: 4,\n minWidth: 24,\n padding: \"2px 6px\",\n background: ctx.reactionBackground,\n color: ctx.reactionColor,\n borderRadius: 999,\n fontSize: 14,\n lineHeight: 1,\n boxShadow: `0 0 0 3px ${ctx.reactionRing}`,\n opacity: reaction_.opacity,\n transform: `translateY(75%) scale(${reaction_.scale})`,\n transformOrigin: \"center\",\n }}\n >\n {reaction}\n </div>\n )}\n </div>\n </div>\n );\n}\n",
+ "type": "registry:component",
+ "target": "components/remocn/message-bubble.tsx"
+ },
+ {
+ "path": "registry/remocn-ui/message-bubble/use-message-bubble-transition.ts",
+ "content": "\"use client\";\n\nimport { easings, type Step, useStateTransition } from \"@/lib/remocn-ui\";\nimport {\n messageBubbleStyle,\n type MessageBubbleState,\n type MessageBubbleStyle,\n} from \"@/components/remocn/message-bubble\";\n\nexport const DEFAULT_DURATION = 14;\n\nexport function tweenMessageBubbleStyle(\n a: MessageBubbleStyle,\n b: MessageBubbleStyle,\n t: number,\n): MessageBubbleStyle {\n return {\n opacity: a.opacity + (b.opacity - a.opacity) * t,\n translateY: a.translateY + (b.translateY - a.translateY) * t,\n scale: a.scale + (b.scale - a.scale) * t,\n };\n}\n\nexport interface MessageBubbleTransitionOptions {\n speed?: number;\n defaultDuration?: number;\n}\n\nexport function useMessageBubbleTransition(\n steps: Step<MessageBubbleState>[],\n opts: MessageBubbleTransitionOptions = {},\n): MessageBubbleStyle {\n const { speed = 1, defaultDuration = DEFAULT_DURATION } = opts;\n const { from, to, progress } = useStateTransition(\n steps,\n \"hidden\",\n speed,\n defaultDuration,\n );\n const t = easings.out(progress);\n return tweenMessageBubbleStyle(messageBubbleStyle(from), messageBubbleStyle(to), t);\n}\n",
+ "type": "registry:component",
+ "target": "components/remocn/use-message-bubble-transition.ts"
+ }
+ ],
+ "type": "registry:component"
+}
\ No newline at end of file
diff --git a/public/r/registry.json b/public/r/registry.json
index b3c69925..064864db 100644
--- a/public/r/registry.json
+++ b/public/r/registry.json
@@ -631,6 +631,25 @@
],
"type": "registry:component"
},
+ {
+ "name": "terminal-cursor-zoom",
+ "title": "Terminal Cursor Zoom",
+ "description": "Camera locked to the typing cursor, dollying across a terminal as a command types at high zoom.",
+ "dependencies": [
+ "remotion"
+ ],
+ "registryDependencies": [
+ "@remocn/terminal-simulator"
+ ],
+ "files": [
+ {
+ "path": "registry/remocn/terminal-cursor-zoom/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/terminal-cursor-zoom.tsx"
+ }
+ ],
+ "type": "registry:component"
+ },
{
"name": "code-diff-wipe",
"title": "Code Diff Wipe",
@@ -727,6 +746,25 @@
],
"type": "registry:component"
},
+ {
+ "name": "glass-code-walk",
+ "title": "Glass Code Walk",
+ "description": "A camera that scans a glass code block top to bottom as it types, then pulls back to a centered hold.",
+ "dependencies": [
+ "remotion"
+ ],
+ "registryDependencies": [
+ "@remocn/glass-code-block"
+ ],
+ "files": [
+ {
+ "path": "registry/remocn/glass-code-walk/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/glass-code-walk.tsx"
+ }
+ ],
+ "type": "registry:component"
+ },
{
"name": "spotlight-card",
"title": "Spotlight Card",
@@ -1247,6 +1285,22 @@
],
"type": "registry:component"
},
+ {
+ "name": "logo-enter",
+ "title": "Logo Enter",
+ "description": "A stacked group of round brand chips that spring in one-by-one, then hold. Swap the logos to feature any set of marks. Horizontal or vertical stacking.",
+ "dependencies": [
+ "remotion"
+ ],
+ "files": [
+ {
+ "path": "registry/remocn/logo-enter/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/logo-enter.tsx"
+ }
+ ],
+ "type": "registry:component"
+ },
{
"name": "remocn-ui",
"title": "remocn UI Core",
@@ -2217,6 +2271,113 @@
}
],
"type": "registry:component"
+ },
+ {
+ "name": "message-bubble",
+ "title": "UI Message Bubble",
+ "description": "A chat message bubble whose hidden/visible state is a pure function of the timeline. The renderer is a pure function of a MessageBubbleStyle (opacity, translateY, scale); useMessageBubbleTransition eases the rise-in enter. The incoming/outgoing variant resolves bubble color and alignment from the theme, and an optional reaction badge pops in on its own channel.",
+ "dependencies": [
+ "remotion"
+ ],
+ "registryDependencies": [
+ "@remocn/remocn-ui"
+ ],
+ "files": [
+ {
+ "path": "registry/remocn-ui/message-bubble/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/message-bubble.tsx"
+ },
+ {
+ "path": "registry/remocn-ui/message-bubble/use-message-bubble-transition.ts",
+ "type": "registry:component",
+ "target": "components/remocn/use-message-bubble-transition.ts"
+ }
+ ],
+ "type": "registry:component"
+ },
+ {
+ "name": "typing-indicator",
+ "title": "UI Typing Indicator",
+ "description": "A continuous typing animation: N dots bounce with a staggered sine wave. A motion atom — it reads the frame and takes color, size, gap, and speed props, defaulting to currentColor so it inherits the bubble it sits in.",
+ "dependencies": [
+ "remotion"
+ ],
+ "registryDependencies": [
+ "@remocn/remocn-ui"
+ ],
+ "files": [
+ {
+ "path": "registry/remocn-ui/typing-indicator/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/typing-indicator.tsx"
+ }
+ ],
+ "type": "registry:component"
+ },
+ {
+ "name": "chat-flow",
+ "title": "UI Chat Flow",
+ "description": "A messaging composition: an outgoing message types into the composer, the send button presses, and the bubble rises in; the other side shows a typing indicator that swaps into the reply, and reactions pop in. A pure orchestrator — every channel comes from a composed primitive's hook (Input, MessageBubble, TypingIndicator).",
+ "dependencies": [
+ "remotion"
+ ],
+ "registryDependencies": [
+ "@remocn/remocn-ui",
+ "@remocn/caret",
+ "@remocn/message-bubble",
+ "@remocn/typing-indicator"
+ ],
+ "files": [
+ {
+ "path": "registry/remocn-ui/chat-flow/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/chat-flow.tsx"
+ }
+ ],
+ "type": "registry:component"
+ },
+ {
+ "name": "telegram-chat-flow",
+ "title": "UI Telegram Chat Flow",
+ "description": "A Telegram-styled messaging composition: tailed bubbles (white incoming, blue outgoing) with in-bubble timestamps and delivery checks, a header that flips to 'typing…' while the other side replies, reaction chips, and a Telegram composer that types the outgoing message before sending. Self-contained — it owns its timeline and only composes the caret primitive.",
+ "dependencies": [
+ "remotion"
+ ],
+ "registryDependencies": [
+ "@remocn/remocn-ui",
+ "@remocn/caret"
+ ],
+ "files": [
+ {
+ "path": "registry/remocn-ui/telegram-chat-flow/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/telegram-chat-flow.tsx"
+ }
+ ],
+ "type": "registry:component"
+ },
+ {
+ "name": "imessage-chat-flow",
+ "title": "UI iMessage Chat Flow",
+ "description": "An iMessage-styled messaging composition: gray incoming and blue outgoing bubbles with tails, an in-thread typing bubble with dots, a Delivered label, and tapback-style reaction badges. The composer types the outgoing message before sending. Chrome icons come from lucide-react; self-contained otherwise, composing the caret and typing-indicator primitives.",
+ "dependencies": [
+ "remotion",
+ "lucide-react"
+ ],
+ "registryDependencies": [
+ "@remocn/remocn-ui",
+ "@remocn/caret",
+ "@remocn/typing-indicator"
+ ],
+ "files": [
+ {
+ "path": "registry/remocn-ui/imessage-chat-flow/index.tsx",
+ "type": "registry:component",
+ "target": "components/remocn/imessage-chat-flow.tsx"
+ }
+ ],
+ "type": "registry:component"
}
]
}
\ No newline at end of file
diff --git a/public/r/telegram-chat-flow.json b/public/r/telegram-chat-flow.json
new file mode 100644
index 00000000..d7ca6f71
--- /dev/null
+++ b/public/r/telegram-chat-flow.json
@@ -0,0 +1,22 @@
+{
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
+ "name": "telegram-chat-flow",
+ "title": "UI Telegram Chat Flow",
+ "description": "A Telegram-styled messaging composition: tailed bubbles (white incoming, blue outgoing) with in-bubble timestamps and delivery checks, a header that flips to 'typing…' while the other side replies, reaction chips, and a Telegram composer that types the outgoing message before sending. Self-contained — it owns its timeline and only composes the caret primitive.",
+ "dependencies": [
+ "remotion"
+ ],
+ "registryDependencies": [
+ "@remocn/remocn-ui",
+ "@remocn/caret"
+ ],
+ "files": [
+ {
+ "path": "registry/remocn-ui/telegram-chat-flow/index.tsx",
+ "content": "\"use client\";\n\nimport {\n interpolate,\n spring,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport { type RemocnTheme, revealedText } from \"@/lib/remocn-ui\";\nimport { Caret } from \"@/components/remocn/caret\";\n\nexport interface TelegramMessage {\n from: \"me\" | \"them\";\n text: string;\n reaction?: string;\n time?: string;\n}\n\nexport interface TelegramContact {\n name: string;\n avatar?: string;\n}\n\nexport interface TelegramChatFlowProps {\n messages?: TelegramMessage[];\n contact?: TelegramContact;\n accentColor?: string;\n speed?: number;\n theme?: Partial<RemocnTheme>;\n}\n\nconst MOBILE_WIDTH = 460;\nconst LEAD_IN = 12;\nconst FRAMES_PER_CHAR = 2.2;\nconst MIN_TYPE = 18;\nconst MAX_TYPE = 86;\nconst SEND_GAP = 10;\nconst REVEAL = 14;\nconst REACT_DELAY = 8;\nconst REACT_DUR = 14;\nconst MSG_GAP = 16;\nconst TYPING_MIN = 34;\nconst TYPING_MAX = 70;\nconst TAIL = 28;\nconst PRESS_WINDOW = 7;\n\nconst TELEGRAM_BLUE = \"#3390ec\";\nconst INCOMING_BG = \"#ffffff\";\nconst INCOMING_FG = \"#0f1419\";\nconst INCOMING_META = \"#8a99a5\";\nconst OUTGOING_FG = \"#ffffff\";\nconst OUTGOING_META = \"rgba(255,255,255,0.82)\";\n\nconst DEFAULT_MESSAGES: TelegramMessage[] = [\n { from: \"me\", text: \"Hey — ready for the demo?\", time: \"9:40\" },\n { from: \"them\", text: \"Yep, pushing it live now\", reaction: \"🔥\", time: \"9:41\" },\n { from: \"me\", text: \"Perfect, sending the link over\", reaction: \"👍\", time: \"9:41\" },\n];\n\nfunction clamp(value: number, lo: number, hi: number): number {\n return Math.max(lo, Math.min(hi, value));\n}\n\nexport interface ScheduledMessage {\n index: number;\n from: \"me\" | \"them\";\n text: string;\n reaction?: string;\n time?: string;\n presenceStart: number;\n typeStart?: number;\n sendAt?: number;\n typingStart?: number;\n revealAt: number;\n reactAt?: number;\n}\n\nexport interface TelegramChatFlowSchedule {\n items: ScheduledMessage[];\n duration: number;\n}\n\nexport function telegramChatFlowSchedule(\n messages: TelegramMessage[],\n): TelegramChatFlowSchedule {\n const items: ScheduledMessage[] = [];\n let cursor = LEAD_IN;\n\n messages.forEach((message, index) => {\n const hasReaction = message.reaction !== undefined && message.reaction !== \"\";\n if (message.from === \"me\") {\n const typeStart = cursor;\n const typeDur = clamp(\n Math.round(message.text.length * FRAMES_PER_CHAR),\n MIN_TYPE,\n MAX_TYPE,\n );\n const sendAt = typeStart + typeDur + SEND_GAP;\n const revealAt = sendAt;\n const reactAt = hasReaction ? revealAt + REVEAL + REACT_DELAY : undefined;\n items.push({\n index,\n from: \"me\",\n text: message.text,\n reaction: hasReaction ? message.reaction : undefined,\n time: message.time,\n presenceStart: sendAt - 2,\n typeStart,\n sendAt,\n revealAt,\n reactAt,\n });\n cursor =\n revealAt + REVEAL + (hasReaction ? REACT_DELAY + REACT_DUR : 0) + MSG_GAP;\n } else {\n const typingStart = cursor;\n const typingDur = clamp(\n Math.round(message.text.length * FRAMES_PER_CHAR),\n TYPING_MIN,\n TYPING_MAX,\n );\n const revealAt = typingStart + typingDur;\n const reactAt = hasReaction ? revealAt + REVEAL + REACT_DELAY : undefined;\n items.push({\n index,\n from: \"them\",\n text: message.text,\n reaction: hasReaction ? message.reaction : undefined,\n time: message.time,\n presenceStart: revealAt,\n typingStart,\n revealAt,\n reactAt,\n });\n cursor =\n revealAt + REVEAL + (hasReaction ? REACT_DELAY + REACT_DUR : 0) + MSG_GAP;\n }\n });\n\n const duration = Math.max(cursor - MSG_GAP + TAIL, LEAD_IN + TAIL);\n return { items, duration };\n}\n\nexport function telegramChatFlowDuration(\n messages: TelegramMessage[] = DEFAULT_MESSAGES,\n speed = 1,\n): number {\n const raw = telegramChatFlowSchedule(messages).duration;\n return Math.ceil(raw / (speed <= 0 ? 1 : speed));\n}\n\nexport function sendPulse(items: ScheduledMessage[], eff: number): number {\n let best = 0;\n for (const item of items) {\n if (item.sendAt === undefined) continue;\n const distance = Math.abs(eff - item.sendAt);\n if (distance <= PRESS_WINDOW) {\n best = Math.max(best, 1 - distance / PRESS_WINDOW);\n }\n }\n return best;\n}\n\nfunction Avatar({ contact, size }: { contact: TelegramContact; size: number }) {\n const initial = contact.name.trim().charAt(0).toUpperCase();\n return (\n <div\n style={{\n flexShrink: 0,\n width: size,\n height: size,\n minWidth: size,\n borderRadius: \"50%\",\n overflow: \"hidden\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: `linear-gradient(180deg, #72d5fd 0%, ${TELEGRAM_BLUE} 100%)`,\n color: \"#ffffff\",\n fontSize: size * 0.42,\n fontWeight: 600,\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n {contact.avatar !== undefined ? (\n <img\n src={contact.avatar}\n alt={contact.name}\n style={{ width: \"100%\", height: \"100%\", objectFit: \"cover\" }}\n />\n ) : (\n initial\n )}\n </div>\n );\n}\n\nfunction DoubleCheck({ color }: { color: string }) {\n return (\n <svg\n width={16}\n height={16}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M18 6 7 17l-5-5\" />\n <path d=\"m22 10-7.5 7.5L13 16\" />\n </svg>\n );\n}\n\nfunction PaperPlane({ color }: { color: string }) {\n return (\n <svg\n width={20}\n height={20}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"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\" />\n <path d=\"m21.854 2.147-10.94 10.939\" />\n </svg>\n );\n}\n\nfunction MicIcon({ color }: { color: string }) {\n return (\n <svg\n width={22}\n height={22}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M12 19v3\" />\n <path d=\"M19 10v2a7 7 0 0 1-14 0v-2\" />\n <rect x={9} y={2} width={6} height={13} rx={3} />\n </svg>\n );\n}\n\nfunction SmileIcon({ color }: { color: string }) {\n return (\n <svg\n width={22}\n height={22}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx={12} cy={12} r={10} />\n <path d=\"M8 14s1.5 2 4 2 4-2 4-2\" />\n <line x1={9} x2={9.01} y1={9} y2={9} />\n <line x1={15} x2={15.01} y1={9} y2={9} />\n </svg>\n );\n}\n\nfunction AttachIcon({ color }: { color: string }) {\n return (\n <svg\n width={22}\n height={22}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551\" />\n </svg>\n );\n}\n\nfunction PhoneIcon({ color }: { color: string }) {\n return (\n <svg\n width={22}\n height={22}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"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 </svg>\n );\n}\n\nfunction MoreIcon({ color }: { color: string }) {\n return (\n <svg\n width={22}\n height={22}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={2}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <circle cx={12} cy={12} r={1} />\n <circle cx={12} cy={5} r={1} />\n <circle cx={12} cy={19} r={1} />\n </svg>\n );\n}\n\nfunction BubbleTail({ side, color }: { side: \"left\" | \"right\"; color: string }) {\n const path =\n side === \"right\"\n ? \"M0 0 H4 C4 7 7 12 13 13 C6 13 0 9 0 0 Z\"\n : \"M13 0 H9 C9 7 6 12 0 13 C7 13 13 9 13 0 Z\";\n return (\n <svg\n width={13}\n height={13}\n viewBox=\"0 0 13 13\"\n style={{\n position: \"absolute\",\n bottom: 0,\n left: side === \"left\" ? -6 : undefined,\n right: side === \"right\" ? -6 : undefined,\n }}\n >\n <path d={path} fill={color} />\n </svg>\n );\n}\n\nexport function TelegramChatFlow({\n messages = DEFAULT_MESSAGES,\n contact,\n accentColor,\n speed = 1,\n}: TelegramChatFlowProps) {\n const frame = useCurrentFrame();\n const eff = frame * speed;\n const accent = accentColor ?? TELEGRAM_BLUE;\n\n const { items } = telegramChatFlowSchedule(messages);\n\n const activeMe = items.find(\n (item) =>\n item.from === \"me\" &&\n item.typeStart !== undefined &&\n item.sendAt !== undefined &&\n eff >= item.typeStart &&\n eff < item.sendAt,\n );\n let composerText = \"\";\n let typing = false;\n if (\n activeMe &&\n activeMe.typeStart !== undefined &&\n activeMe.sendAt !== undefined\n ) {\n const typeDur = Math.max(activeMe.sendAt - SEND_GAP - activeMe.typeStart, 1);\n const progress = clamp((eff - activeMe.typeStart) / typeDur, 0, 1);\n composerText = revealedText(\n activeMe.text,\n Math.floor(progress * activeMe.text.length),\n );\n typing = true;\n }\n\n const themTyping = items.some(\n (item) =>\n item.from === \"them\" &&\n item.typingStart !== undefined &&\n eff >= item.typingStart &&\n eff < item.revealAt,\n );\n\n const sendActive = composerText.length > 0;\n const sendScale = 1 - 0.16 * sendPulse(items, eff);\n const present = items.filter((item) => eff >= item.presenceStart);\n\n return (\n <div\n style={{\n position: \"relative\",\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n justifyContent: \"center\",\n background: \"transparent\",\n fontFamily:\n \"var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n width: \"100%\",\n maxWidth: MOBILE_WIDTH,\n height: \"100%\",\n boxSizing: \"border-box\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n gap: 12,\n padding: \"12px 14px\",\n background: \"#ffffff\",\n boxShadow: \"0 1px 0 rgba(0,0,0,0.06)\",\n }}\n >\n {contact !== undefined && (\n <Avatar contact={contact} size={38} />\n )}\n <div style={{ display: \"flex\", flexDirection: \"column\", gap: 0, flex: 1 }}>\n <span\n style={{\n fontSize: 15,\n fontWeight: 600,\n lineHeight: 1.2,\n letterSpacing: \"-0.01em\",\n color: \"#0f1419\",\n }}\n >\n {contact?.name ?? \"Chat\"}\n </span>\n <span\n style={{\n fontSize: 13,\n lineHeight: 1.15,\n color: accent,\n fontStyle: themTyping ? \"italic\" : \"normal\",\n }}\n >\n {themTyping ? \"typing…\" : \"online\"}\n </span>\n </div>\n <div style={{ display: \"flex\", alignItems: \"center\", gap: 18 }}>\n <PhoneIcon color=\"#8a99a5\" />\n <MoreIcon color=\"#8a99a5\" />\n </div>\n </div>\n\n <div\n style={{\n position: \"relative\",\n flex: 1,\n minHeight: 0,\n overflow: \"hidden\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"flex-end\",\n gap: 4,\n minHeight: \"100%\",\n padding: \"16px 12px 14px\",\n }}\n >\n <div style={{ display: \"flex\", justifyContent: \"center\", marginBottom: 8 }}>\n <span\n style={{\n padding: \"3px 11px\",\n borderRadius: 14,\n background: \"rgba(0,0,0,0.18)\",\n color: \"#ffffff\",\n fontSize: 12,\n fontWeight: 500,\n }}\n >\n Today\n </span>\n </div>\n {present.map((item) => (\n <TelegramRow\n key={item.index}\n item={item}\n eff={eff}\n contact={contact}\n accent={accent}\n />\n ))}\n </div>\n </div>\n\n <div\n style={{\n display: \"flex\",\n alignItems: \"flex-end\",\n gap: 8,\n padding: \"8px 10px 12px\",\n background: \"#ffffff\",\n boxShadow: \"0 -1px 0 rgba(0,0,0,0.06)\",\n }}\n >\n <div\n style={{\n flex: 1,\n display: \"flex\",\n alignItems: \"center\",\n gap: 8,\n minHeight: 44,\n padding: \"0 12px\",\n borderRadius: 22,\n background: \"#f1f3f5\",\n }}\n >\n <SmileIcon color=\"#8a99a5\" />\n <div\n style={{\n flex: 1,\n display: \"flex\",\n alignItems: \"center\",\n fontSize: 15,\n color: sendActive ? \"#0f1419\" : \"#8a99a5\",\n }}\n >\n <span style={{ whiteSpace: \"pre-wrap\", wordBreak: \"break-word\" }}>\n {sendActive ? composerText : \"Message\"}\n </span>\n {typing && (\n <Caret\n color={accent}\n height={18}\n radius={1}\n blink\n marginLeft={composerText.length > 0 ? 2 : 0}\n />\n )}\n </div>\n <AttachIcon color=\"#8a99a5\" />\n </div>\n <div\n style={{\n flexShrink: 0,\n width: 46,\n height: 46,\n borderRadius: \"50%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n background: accent,\n transform: `scale(${sendScale})`,\n }}\n >\n {sendActive ? (\n <PaperPlane color=\"#ffffff\" />\n ) : (\n <MicIcon color=\"#ffffff\" />\n )}\n </div>\n </div>\n </div>\n </div>\n );\n}\n\nfunction TelegramRow({\n item,\n eff,\n contact,\n accent,\n}: {\n item: ScheduledMessage;\n eff: number;\n contact?: TelegramContact;\n accent: string;\n}) {\n const { fps } = useVideoConfig();\n const outgoing = item.from === \"me\";\n\n const enter = spring({\n fps,\n frame: eff - item.revealAt,\n config: { damping: 16, stiffness: 200, mass: 0.7 },\n });\n const opacity = interpolate(enter, [0, 1], [0, 1]);\n const translateY = interpolate(enter, [0, 1], [10, 0]);\n const scale = interpolate(enter, [0, 1], [0.92, 1]);\n\n let reactionScale = 0;\n let reactionOpacity = 0;\n if (item.reactAt !== undefined) {\n reactionScale = spring({\n fps,\n frame: eff - item.reactAt,\n config: { damping: 11, stiffness: 220, mass: 0.6 },\n });\n reactionOpacity = interpolate(eff, [item.reactAt, item.reactAt + 5], [0, 1], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\n });\n }\n\n const bg = outgoing ? accent : INCOMING_BG;\n const fg = outgoing ? OUTGOING_FG : INCOMING_FG;\n const metaColor = outgoing ? OUTGOING_META : INCOMING_META;\n const tailColor = outgoing ? accent : INCOMING_BG;\n\n const bubble = (\n <div\n style={{\n position: \"relative\",\n maxWidth: \"76%\",\n padding: \"6px 11px 7px\",\n background: bg,\n color: fg,\n borderRadius: 16,\n borderBottomRightRadius: outgoing ? 6 : 16,\n borderBottomLeftRadius: outgoing ? 16 : 6,\n boxShadow: outgoing ? \"none\" : \"0 1px 1px rgba(0,0,0,0.1)\",\n fontSize: 15,\n lineHeight: 1.35,\n }}\n >\n <span style={{ wordBreak: \"break-word\", overflowWrap: \"break-word\" }}>\n {item.text}\n </span>\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: item.reaction !== undefined ? \"space-between\" : \"flex-end\",\n gap: 8,\n marginTop: 2,\n }}\n >\n {item.reaction !== undefined && (\n <span\n style={{\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: 4,\n padding: \"1px 7px\",\n borderRadius: 11,\n background: outgoing ? \"rgba(255,255,255,0.22)\" : \"rgba(51,144,236,0.12)\",\n color: outgoing ? \"#ffffff\" : accent,\n fontSize: 13,\n fontWeight: 600,\n opacity: reactionOpacity,\n transform: `scale(${reactionScale})`,\n transformOrigin: \"left center\",\n }}\n >\n {item.reaction} 1\n </span>\n )}\n <span\n style={{\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: 3,\n fontSize: 12,\n color: metaColor,\n whiteSpace: \"nowrap\",\n }}\n >\n {item.time ?? \"9:41\"}\n {outgoing && <DoubleCheck color={metaColor} />}\n </span>\n </div>\n <BubbleTail side={outgoing ? \"right\" : \"left\"} color={tailColor} />\n </div>\n );\n\n return (\n <div\n style={{\n display: \"flex\",\n alignItems: \"flex-end\",\n justifyContent: outgoing ? \"flex-end\" : \"flex-start\",\n gap: 7,\n width: \"100%\",\n opacity,\n transform: `translateY(${translateY}px) scale(${scale})`,\n transformOrigin: outgoing ? \"bottom right\" : \"bottom left\",\n }}\n >\n {!outgoing && contact !== undefined && (\n <Avatar contact={contact} size={30} />\n )}\n {bubble}\n </div>\n );\n}\n",
+ "type": "registry:component",
+ "target": "components/remocn/telegram-chat-flow.tsx"
+ }
+ ],
+ "type": "registry:component"
+}
\ No newline at end of file
diff --git a/public/r/terminal-cursor-zoom.json b/public/r/terminal-cursor-zoom.json
new file mode 100644
index 00000000..bc8f7afe
--- /dev/null
+++ b/public/r/terminal-cursor-zoom.json
@@ -0,0 +1,21 @@
+{
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
+ "name": "terminal-cursor-zoom",
+ "title": "Terminal Cursor Zoom",
+ "description": "Camera locked to the typing cursor, dollying across a terminal as a command types at high zoom.",
+ "dependencies": [
+ "remotion"
+ ],
+ "registryDependencies": [
+ "@remocn/terminal-simulator"
+ ],
+ "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(localFrame, [0, command.length / charsPerFrame], [0, command.length], {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\",\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",
+ "type": "registry:component",
+ "target": "components/remocn/terminal-cursor-zoom.tsx"
+ }
+ ],
+ "type": "registry:component"
+}
\ No newline at end of file
diff --git a/public/r/terminal-simulator.json b/public/r/terminal-simulator.json
index 920c4e9e..5b8d242d 100644
--- a/public/r/terminal-simulator.json
+++ b/public/r/terminal-simulator.json
@@ -9,7 +9,7 @@
"files": [
{
"path": "registry/remocn/terminal-simulator/index.tsx",
- "content": "\"use client\";\n\nimport {\n Sequence,\n interpolate,\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 background: \"#050505\",\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 Sequence,\n interpolate,\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",
"type": "registry:component",
"target": "components/remocn/terminal-simulator.tsx"
}
diff --git a/public/r/typing-indicator.json b/public/r/typing-indicator.json
new file mode 100644
index 00000000..da3fcc98
--- /dev/null
+++ b/public/r/typing-indicator.json
@@ -0,0 +1,21 @@
+{
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
+ "name": "typing-indicator",
+ "title": "UI Typing Indicator",
+ "description": "A continuous typing animation: N dots bounce with a staggered sine wave. A motion atom — it reads the frame and takes color, size, gap, and speed props, defaulting to currentColor so it inherits the bubble it sits in.",
+ "dependencies": [
+ "remotion"
+ ],
+ "registryDependencies": [
+ "@remocn/remocn-ui"
+ ],
+ "files": [
+ {
+ "path": "registry/remocn-ui/typing-indicator/index.tsx",
+ "content": "\"use client\";\n\nimport { useCurrentFrame, useVideoConfig } from \"remotion\";\n\nexport interface TypingIndicatorProps {\n dotCount?: number;\n color?: string;\n size?: number;\n gap?: number;\n amplitude?: number;\n speed?: number;\n cyclesPerSecond?: number;\n className?: string;\n}\n\nexport interface TypingDotOptions {\n fps: number;\n dotCount: number;\n amplitude: number;\n speed: number;\n cyclesPerSecond: number;\n}\n\nexport function typingDotOffset(\n frame: number,\n index: number,\n opts: TypingDotOptions,\n): { translateY: number; opacity: number } {\n const cps = opts.cyclesPerSecond <= 0 ? 1 : opts.cyclesPerSecond;\n const periodFrames = opts.fps / cps;\n const stagger = opts.dotCount > 0 ? periodFrames / (opts.dotCount * 2) : 0;\n const phase =\n ((frame * opts.speed - index * stagger) / periodFrames) * Math.PI * 2;\n const wave = (Math.sin(phase) + 1) / 2;\n return {\n translateY: -opts.amplitude * wave,\n opacity: 0.45 + 0.55 * wave,\n };\n}\n\nexport function TypingIndicator({\n dotCount = 3,\n color = \"currentColor\",\n size = 8,\n gap = 5,\n amplitude = 5,\n speed = 1,\n cyclesPerSecond = 1.1,\n className,\n}: TypingIndicatorProps) {\n const frame = useCurrentFrame();\n const { fps } = useVideoConfig();\n const opts: TypingDotOptions = {\n fps,\n dotCount,\n amplitude,\n speed,\n cyclesPerSecond,\n };\n\n return (\n <div\n className={className}\n style={{\n display: \"inline-flex\",\n alignItems: \"center\",\n gap,\n height: size + amplitude * 2,\n }}\n >\n {Array.from({ length: dotCount }, (_, i) => {\n const { translateY, opacity } = typingDotOffset(frame, i, opts);\n return (\n <span\n key={i}\n style={{\n display: \"inline-block\",\n width: size,\n height: size,\n borderRadius: \"50%\",\n background: color,\n opacity,\n transform: `translateY(${translateY}px)`,\n }}\n />\n );\n })}\n </div>\n );\n}\n",
+ "type": "registry:component",
+ "target": "components/remocn/typing-indicator.tsx"
+ }
+ ],
+ "type": "registry:component"
+}
\ No newline at end of file