Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "invite-team",
"title": "Invite Team",
"description": "An invite field types emails, sends invites and a toast confirms in a project list.",
"dependencies": ["remotion", "@remotion/google-fonts"],
"registryDependencies": ["@remocn/gsh"],
"files": [
{
"path": "registry/remocn/invite-team/index.tsx",
"content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/HankenGrotesk\";\nimport {\n AbsoluteFill,\n Easing,\n Img,\n interpolate,\n spring,\n staticFile,\n useCurrentFrame,\n useVideoConfig,\n} from \"remotion\";\nimport type { GradientParams } from \"@/lib/remocn/gsh/gradient-engine\";\nimport { GshGround } from \"@/lib/remocn/gsh/gsh-ground\";\nimport type { GshPresetId } from \"@/lib/remocn/gsh/presets\";\n\nconst { fontFamily } = loadFont(\"normal\", {\n weights: [\"300\", \"400\"],\n subsets: [\"latin\"],\n});\n\nexport interface InviteTeamProps {\n /** Emails typed into the invite field (up to 3 fit the layout best). */\n emails?: string[];\n /** Role the select switches to. */\n role?: string;\n workspace?: string;\n /** Project thumbnails in the app behind the modal. */\n images?: string[];\n theme?: \"light\" | \"dark\";\n accent?: string;\n speed?: number;\n ground?: GshPresetId;\n groundParams?: Partial<GradientParams>;\n}\n\nconst SPR = {\n heavy: { mass: 1, damping: 26, stiffness: 120 },\n card: { mass: 0.8, damping: 18, stiffness: 160 },\n chip: { mass: 0.5, damping: 12, stiffness: 200 },\n morph: { damping: 200 },\n};\nconst EASE = {\n enter: Easing.bezier(0.32, 0.72, 0, 1),\n soft: Easing.bezier(0.22, 1, 0.36, 1),\n move: Easing.bezier(0.65, 0, 0.35, 1),\n exit: Easing.bezier(0.55, 0, 1, 0.45),\n camera: Easing.bezier(0.87, 0, 0.13, 1),\n};\nconst CL = { extrapolateLeft: \"clamp\", extrapolateRight: \"clamp\" } as const;\nconst clamp01 = (v: number) => Math.min(1, Math.max(0, v));\nconst tween = (\n f: number,\n from: number,\n len: number,\n easing: (t: number) => number,\n) => interpolate(f, [from, from + len], [0, 1], { ...CL, easing });\n\nconst BEAT = { window: 0, modal: 6, cursor: 8, focus: 24, type: 28 };\n\nconst AV_TONES = [\"#D9C6B0\", \"#B5C8D6\", \"#C6D3B4\", \"#DDBBB8\", \"#C3BEDD\"];\nconst EXISTING = [\n { initials: \"AB\", tone: \"#C9D3DC\" },\n { initials: \"OH\", tone: \"#DCCFC0\" },\n];\nconst ROLE_INFO: Record<string, string> = {\n Admin: \"Members, billing and brand kit\",\n Editor: \"Create, edit and render videos\",\n Member: \"View projects and leave comments\",\n Viewer: \"Read-only access to shared projects\",\n};\nconst PROJECTS = [\n [\"Launch teaser\", \"0:45\", \"Edited 2h ago\"],\n [\"Onboarding walkthrough\", \"1:20\", \"Edited yesterday\"],\n [\"October changelog\", \"0:30\", \"Edited Oct 28\"],\n [\"Pricing explainer\", \"0:52\", \"Edited Oct 24\"],\n [\"Customer story\", \"2:05\", \"Edited Oct 21\"],\n [\"Holiday promo\", \"0:15\", \"Edited Oct 17\"],\n] as const;\nconst DEFAULT_IMAGES = [1, 2, 3, 4, 5, 6].map((i) =>\n staticFile(`reel/reel-${i}.jpg`),\n);\n\nconst GLYPH: Record<string, number> = {\n i: 0.23,\n l: 0.23,\n j: 0.24,\n \".\": 0.25,\n f: 0.32,\n t: 0.34,\n r: 0.36,\n \"@\": 0.9,\n m: 0.84,\n w: 0.74,\n k: 0.5,\n};\nconst textW = (s: string, size: number) =>\n [...s].reduce((a, ch) => a + (GLYPH[ch] ?? 0.54), 0) * size;\n\nconst CHIP_H = 34;\nconst chipW = (e: string) => 4 + 24 + 8 + textW(e, 16) + 10 + 14 + 10;\nfunction layoutChips(emails: string[], fieldW: number) {\n let x = 8;\n let y = 8;\n return emails.map((e) => {\n const w = chipW(e);\n if (x + w > fieldW - 8 && x > 8) {\n x = 8;\n y += CHIP_H + 8;\n }\n const slot = { x, y, w };\n x += w + 8;\n return slot;\n });\n}\n\nfunction withAlpha(color: string, alpha: number) {\n const hex = color.replace(\"#\", \"\");\n const full = hex.length === 3 ? hex.replace(/(.)/g, \"$1$1\") : hex;\n if (!/^[0-9a-fA-F]{6}$/.test(full)) return color;\n const n = Number.parseInt(full, 16);\n return `rgba(${(n >> 16) & 255}, ${(n >> 8) & 255}, ${n & 255}, ${alpha})`;\n}\n\nfunction palette(dark: boolean) {\n return {\n dark,\n win: dark ? \"#0F1012\" : \"#FCFCFB\",\n modal: dark ? \"#17181B\" : \"#FFFFFF\",\n field: dark ? \"rgba(255,255,255,0.03)\" : \"#FFFFFF\",\n line: dark ? \"rgba(255,255,255,0.07)\" : \"rgba(24,24,27,0.08)\",\n strong: dark ? \"rgba(255,255,255,0.14)\" : \"rgba(24,24,27,0.14)\",\n text: dark ? \"#EDEDEF\" : \"#18181B\",\n muted: dark ? \"#8E9097\" : \"#71717A\",\n faint: dark ? \"#55575E\" : \"#A1A1AA\",\n chip: dark ? \"rgba(255,255,255,0.07)\" : \"rgba(24,24,27,0.05)\",\n hover: dark ? \"rgba(255,255,255,0.06)\" : \"rgba(24,24,27,0.045)\",\n overlay: dark ? \"rgba(0,0,0,0.45)\" : \"rgba(24,24,27,0.16)\",\n ink: dark ? \"#EDEDEF\" : \"#18181B\",\n inkText: dark ? \"#141518\" : \"#FFFFFF\",\n winShadow: dark\n ? \"0 0 0 1px rgba(255,255,255,0.08), inset 0 1px 0 rgba(255,255,255,0.05), 0 40px 90px -30px rgba(0,0,0,0.7)\"\n : \"0 0 0 1px rgba(24,24,27,0.06), 0 2px 6px rgba(24,24,27,0.04), 0 40px 90px -30px rgba(24,24,40,0.35)\",\n modalShadow: dark\n ? \"0 0 0 1px rgba(255,255,255,0.09), inset 0 1px 0 rgba(255,255,255,0.06), 0 30px 70px -16px rgba(0,0,0,0.7)\"\n : \"0 0 0 1px rgba(24,24,27,0.06), 0 2px 4px rgba(24,24,27,0.04), 0 30px 70px -16px rgba(24,24,40,0.32)\",\n pop: dark\n ? \"0 0 0 1px rgba(255,255,255,0.1), 0 16px 36px -8px rgba(0,0,0,0.6)\"\n : \"0 0 0 1px rgba(24,24,27,0.07), 0 2px 4px rgba(24,24,27,0.04), 0 16px 36px -8px rgba(24,24,40,0.22)\",\n ghost: dark\n ? \"0 0 0 1px rgba(255,255,255,0.1)\"\n : \"0 0 0 1px rgba(24,24,27,0.1), 0 1px 2px rgba(24,24,27,0.05)\",\n };\n}\n\nconst ICON: Record<string, string> = {\n link: \"M10 14a4 4 0 005.66 0l3-3a4 4 0 00-5.66-5.66l-1 1M14 10a4 4 0 00-5.66 0l-3 3a4 4 0 005.66 5.66l1-1\",\n x: \"M6.5 6.5l11 11M17.5 6.5l-11 11\",\n chev: \"M7 10l5 5 5-5\",\n check: \"M5.5 12.5l4 4 9-9.5\",\n plus: \"M12 5.5v13M5.5 12h13\",\n users:\n \"M9 11a3.5 3.5 0 100-7 3.5 3.5 0 000 7zM2.5 20c.6-3.4 3.2-5.5 6.5-5.5s5.9 2.1 6.5 5.5M16 4.3a3.5 3.5 0 010 6.4M18 14.8c1.9.7 3.2 2.5 3.5 5.2\",\n};\nfunction Icon({\n name,\n size = 18,\n color,\n}: {\n name: string;\n size?: number;\n color: string;\n}) {\n return (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke={color}\n strokeWidth={1.5}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden\n style={{ display: \"block\", flexShrink: 0 }}\n >\n <path d={ICON[name]} />\n </svg>\n );\n}\n\nfunction Avatar({\n label,\n tone,\n size,\n ring,\n}: {\n label: string;\n tone: string;\n size: number;\n ring?: string;\n}) {\n return (\n <div\n style={{\n width: size,\n height: size,\n borderRadius: \"50%\",\n background: tone,\n color: \"#1F1F22\",\n fontSize: Math.round(size * 0.4),\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n boxShadow: ring\n ? `0 0 0 2px ${ring}, inset 0 0 0 1px rgba(0,0,0,0.08)`\n : \"inset 0 0 0 1px rgba(0,0,0,0.08)\",\n flexShrink: 0,\n }}\n >\n {label}\n </div>\n );\n}\n\nexport function InviteTeam({\n emails = [\"[email protected]\", \"[email protected]\", \"[email protected]\"],\n role = \"Editor\",\n workspace = \"Kitebase\",\n images = DEFAULT_IMAGES,\n theme = \"light\",\n accent = \"#3B5BFD\",\n speed = 1,\n ground,\n groundParams,\n}: InviteTeamProps) {\n const frame = useCurrentFrame() * speed;\n const { width, height, fps } = useVideoConfig();\n const tall = height > width;\n const SW = tall ? 600 : 1280;\n const SH = tall ? (600 * height) / width : 720;\n const k = width / SW;\n const dark = theme === \"dark\";\n const pal = palette(dark);\n const sp = (at: number, config: Record<string, number>) =>\n spring({ frame: frame - at, fps, config });\n\n const WIN = tall\n ? { x: 20, y: 72, w: SW - 40, h: SH }\n : { x: 96, y: 44, w: SW - 192, h: 632 };\n const MW = tall ? SW - 60 : 520;\n const MX = (SW - MW) / 2;\n const MODAL_H = 368;\n const MY = tall ? 360 : (SH - MODAL_H) / 2 + 8;\n const INPUT = { x: 24, y: 104, w: MW - 48, h: 2 * CHIP_H + 24 };\n const SELECT = { x: MW - 24 - 172, y: 220, w: 172, h: 44 };\n const BUTTON = { x: MW - 24 - 214, y: 300, w: 214, h: 44 };\n const OPT_H = 40;\n const AV = 34;\n const STEP = 24;\n const btnInvite = { w: 104 };\n const btnNew = { w: tall ? 0 : 136 };\n const headerRight = WIN.x + WIN.w - 32;\n const inviteX = headerRight - btnNew.w - (tall ? 0 : 10) - btnInvite.w;\n const PILE_RIGHT = inviteX - 18;\n const PILE_Y = WIN.y + 34;\n\n const list = emails.slice(0, 3);\n const n = list.length;\n const chips = layoutChips(list, INPUT.w);\n const roles = [\"Admin\", \"Member\", \"Viewer\"].includes(role)\n ? [\"Admin\", \"Editor\", \"Member\", \"Viewer\"]\n : [\"Admin\", role, \"Member\", \"Viewer\"];\n const roleIdx = Math.max(0, roles.indexOf(role));\n\n const typeStart: number[] = [];\n const chipAt: number[] = [];\n list.forEach((e, i) => {\n typeStart.push(i === 0 ? BEAT.type : chipAt[i - 1] + 4);\n chipAt.push(typeStart[i] + Math.ceil(e.length / 2) + 2);\n });\n const typedEnd = chipAt[n - 1] ?? BEAT.type + 6;\n const selClick = typedEnd + 14;\n const optClick = selClick + 14;\n const btnClick = optClick + 16;\n const doneAt = btnClick + 18;\n const outAt = doneAt + 8;\n const flyAt = list.map((_, j) => outAt - 2 + j * 3);\n const landAt = flyAt.map((f) => f + 12);\n const toastAt = (landAt[n - 1] ?? outAt) + 4;\n\n const winIn = sp(BEAT.window, SPR.heavy);\n const winOp = tween(frame, BEAT.window, 10, EASE.enter);\n const modalIn = sp(BEAT.modal, SPR.card);\n const modalOp = tween(frame, BEAT.modal, 8, EASE.enter);\n const modalOut = tween(frame, outAt, 7, EASE.exit);\n const dim =\n tween(frame, BEAT.modal, 12, EASE.soft) *\n (1 - tween(frame, outAt, 10, EASE.soft));\n const focus =\n tween(frame, BEAT.focus, 4, EASE.enter) *\n (1 - tween(frame, selClick - 2, 4, EASE.enter));\n const dropIn =\n clamp01(sp(selClick + 1, SPR.card)) *\n (1 - tween(frame, optClick + 1, 6, EASE.exit));\n const roleNow = frame >= optClick + 1 ? role : \"Member\";\n const loading = frame >= btnClick + 2 && frame < doneAt;\n const done = frame >= doneAt;\n const shownChips = chipAt.filter((c) => frame >= c).length;\n const pressOf = (at: number) =>\n clamp01(sp(at - 2, SPR.chip) - sp(at + 3, SPR.chip));\n const toast = sp(toastAt, SPR.card);\n const toastOp = tween(frame, toastAt, 6, EASE.enter);\n const cam =\n 1 +\n 0.03 * tween(frame, 8, 70, EASE.camera) -\n 0.03 * tween(frame, outAt - 4, 28, EASE.camera);\n\n const field = { x: MX + INPUT.x + INPUT.w * 0.62, y: MY + INPUT.y + 50 };\n const sel = { x: MX + SELECT.x + 120, y: MY + SELECT.y + 26 };\n const opt = {\n x: MX + SELECT.x + 80,\n y: MY + SELECT.y + SELECT.h + 6 + OPT_H * roleIdx + 24,\n };\n const btn = { x: MX + BUTTON.x + 130, y: MY + BUTTON.y + 28 };\n const start = tall ? { x: 660, y: 1120 } : { x: 1360, y: 800 };\n const legs = [\n { at: BEAT.cursor, from: start, to: field, arc: 1 },\n { at: selClick - 16, from: field, to: sel, arc: -1 },\n { at: optClick - 13, from: sel, to: opt, arc: 1 },\n { at: btnClick - 15, from: opt, to: btn, arc: -1 },\n {\n at: outAt + 2,\n from: btn,\n to: { x: btn.x + 90, y: btn.y + 120 },\n arc: 1,\n },\n ];\n let curX = start.x;\n let curY = start.y;\n for (const leg of legs) {\n const p = sp(leg.at, SPR.heavy);\n const dx = leg.to.x - leg.from.x;\n const dy = leg.to.y - leg.from.y;\n const len = Math.hypot(dx, dy) || 1;\n const bend = Math.sin(clamp01(p) * Math.PI) * Math.min(56, len * 0.14);\n curX += dx * p + (-dy / len) * bend * leg.arc;\n curY += dy * p + (dx / len) * bend * leg.arc;\n }\n const curPress = Math.max(\n pressOf(BEAT.focus),\n pressOf(selClick),\n pressOf(optClick),\n pressOf(btnClick),\n );\n const curOp =\n tween(frame, BEAT.cursor, 5, EASE.enter) *\n (1 - tween(frame, BEAT.type + 2, 4, EASE.exit)) +\n tween(frame, typedEnd + 2, 5, EASE.enter);\n const optTop = MY + SELECT.y + SELECT.h + 6 + 6;\n const hovered = Math.floor((curY - optTop) / OPT_H);\n\n const btnLabel =\n shownChips === 0\n ? \"Send invites\"\n : `Invite ${shownChips} ${shownChips === 1 ? \"teammate\" : \"teammates\"}`;\n const typingIdx = list.findIndex(\n (_, i) => frame >= typeStart[i] && frame < chipAt[i],\n );\n const caretOn =\n Math.floor(frame / 8) % 2 === 0 || (frame >= BEAT.type && frame < typedEnd);\n const caretSlot =\n typingIdx >= 0\n ? chips[typingIdx]\n : shownChips < n\n ? chips[shownChips]\n : {\n x: (chips[n - 1]?.x ?? 0) + (chips[n - 1]?.w ?? 0) + 10,\n y: chips[n - 1]?.y ?? 8,\n w: 0,\n };\n\n const cols = tall ? 2 : 3;\n const gridW = WIN.w - 64;\n const tileW = (gridW - (cols - 1) * 20) / cols;\n const tileH = tileW * 0.5625;\n const shown = PROJECTS;\n\n return (\n <AbsoluteFill\n style={{\n fontFamily,\n overflow: \"hidden\",\n WebkitFontSmoothing: \"antialiased\",\n }}\n >\n <GshGround\n preset={ground ?? (dark ? \"europa\" : \"paper-crease\")}\n params={groundParams}\n timeOffset={4}\n timeScale={0.5}\n />\n <div\n style={{\n position: \"absolute\",\n left: 0,\n top: 0,\n width: SW,\n height: SH,\n transform: `scale(${k})`,\n transformOrigin: \"0 0\",\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n transform: `scale(${cam})`,\n transformOrigin: `${SW / 2}px ${MY + MODAL_H / 2}px`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: WIN.x,\n top: WIN.y,\n width: WIN.w,\n height: WIN.h,\n borderRadius: 18,\n overflow: \"hidden\",\n background: pal.win,\n boxShadow: pal.winShadow,\n opacity: winOp,\n transform: `translateY(${(1 - winIn) * 40}px)`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n filter: `blur(${dim * 2.5}px)`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 32,\n top: 30,\n display: \"flex\",\n alignItems: \"baseline\",\n gap: 12,\n }}\n >\n <span\n style={{\n fontSize: 30,\n letterSpacing: \"-0.025em\",\n color: pal.text,\n }}\n >\n Projects\n </span>\n <span style={{ fontSize: 17, color: pal.muted }}>\n 12 videos\n </span>\n </div>\n {EXISTING.map((p, i) => (\n <div\n key={p.initials}\n style={{\n position: \"absolute\",\n left: PILE_RIGHT - AV - i * STEP - WIN.x,\n top: PILE_Y - WIN.y,\n zIndex: 2 - i,\n }}\n >\n <Avatar\n label={p.initials}\n tone={p.tone}\n size={AV}\n ring={pal.win}\n />\n </div>\n ))}\n <div\n style={{\n position: \"absolute\",\n left: inviteX - WIN.x,\n top: 30,\n display: \"flex\",\n gap: 10,\n }}\n >\n <div\n style={{\n width: btnInvite.w,\n height: 42,\n borderRadius: 10,\n boxShadow: pal.ghost,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: 8,\n fontSize: 16,\n color: pal.text,\n }}\n >\n <Icon name=\"users\" size={18} color={pal.text} />\n Invite\n </div>\n {tall ? null : (\n <div\n style={{\n width: btnNew.w,\n height: 42,\n borderRadius: 10,\n background: pal.ink,\n color: pal.inkText,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: 8,\n fontSize: 16,\n }}\n >\n <Icon name=\"plus\" size={18} color={pal.inkText} />\n New video\n </div>\n )}\n </div>\n <div\n style={{\n position: \"absolute\",\n left: 32,\n top: 104,\n width: gridW,\n display: \"grid\",\n gridTemplateColumns: `repeat(${cols}, 1fr)`,\n columnGap: 20,\n rowGap: 22,\n }}\n >\n {shown.map(([title, len, meta], i) => (\n <div key={title}>\n <div\n style={{\n position: \"relative\",\n height: tileH,\n borderRadius: 12,\n overflow: \"hidden\",\n }}\n >\n <Img\n src={images[i % images.length]}\n style={{\n width: \"100%\",\n height: \"100%\",\n objectFit: \"cover\",\n }}\n />\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n borderRadius: 12,\n boxShadow: `inset 0 0 0 1px ${dark ? \"rgba(255,255,255,0.1)\" : \"rgba(0,0,0,0.1)\"}`,\n }}\n />\n <div\n style={{\n position: \"absolute\",\n right: 10,\n bottom: 10,\n fontSize: 15,\n fontVariantNumeric: \"tabular-nums\",\n color: \"#FFFFFF\",\n background: \"rgba(0,0,0,0.5)\",\n padding: \"2px 8px\",\n borderRadius: 6,\n }}\n >\n {len}\n </div>\n </div>\n <div\n style={{ fontSize: 17, color: pal.text, marginTop: 12 }}\n >\n {title}\n </div>\n <div\n style={{ fontSize: 16, color: pal.muted, marginTop: 2 }}\n >\n {meta}\n </div>\n </div>\n ))}\n </div>\n </div>\n <div\n style={{\n position: \"absolute\",\n inset: 0,\n background: pal.overlay,\n opacity: dim,\n }}\n />\n </div>\n <div\n style={{\n position: \"absolute\",\n left: MX,\n top: MY,\n width: MW,\n height: MODAL_H,\n borderRadius: 20,\n background: pal.modal,\n boxShadow: pal.modalShadow,\n opacity: modalOp * (1 - modalOut),\n transform: `translateY(${(1 - modalIn) * 18 + modalOut * 10}px) scale(${(0.97 + 0.03 * modalIn) * (1 - 0.03 * modalOut)})`,\n }}\n >\n <div\n style={{\n position: \"absolute\",\n left: 24,\n top: 24,\n fontSize: 23,\n letterSpacing: \"-0.02em\",\n color: pal.text,\n }}\n >\n Invite to {workspace}\n </div>\n <div style={{ position: \"absolute\", right: 22, top: 26 }}>\n <Icon name=\"x\" size={20} color={pal.muted} />\n </div>\n <div\n style={{\n position: \"absolute\",\n left: 24,\n top: 74,\n fontSize: 16,\n color: pal.muted,\n }}\n >\n Email addresses\n </div>\n <div\n style={{\n position: \"absolute\",\n left: INPUT.x,\n top: INPUT.y,\n width: INPUT.w,\n height: INPUT.h,\n borderRadius: 12,\n background: pal.field,\n boxShadow: `inset 0 0 0 1px ${focus > 0.5 ? withAlpha(accent, 0.9) : pal.strong}, 0 0 0 ${focus * 3}px ${withAlpha(accent, 0.16)}`,\n }}\n >\n {shownChips === 0 && typingIdx < 0 ? (\n <div\n style={{\n position: \"absolute\",\n left: 14,\n top: 15,\n fontSize: 17,\n color: pal.faint,\n }}\n >\n [email protected]\n </div>\n ) : null}\n {list.map((e, i) => {\n const cs = chips[i];\n const pop = sp(chipAt[i], SPR.chip);\n const typing = frame >= typeStart[i] && frame < chipAt[i] + 1;\n const typed = Math.floor(\n clamp01(\n (frame - typeStart[i]) / (chipAt[i] - 2 - typeStart[i]),\n ) * e.length,\n );\n const flying = frame >= flyAt[i];\n return (\n <div key={e}>\n {typing && frame < chipAt[i] ? (\n <div\n style={{\n position: \"absolute\",\n left: cs.x + 6,\n top: cs.y + 6,\n fontSize: 17,\n lineHeight: \"22px\",\n color: pal.text,\n whiteSpace: \"nowrap\",\n display: \"flex\",\n alignItems: \"center\",\n }}\n >\n {e.slice(0, typed)}\n <span\n style={{\n display: \"inline-block\",\n width: 1.5,\n height: 20,\n marginLeft: 1,\n background: accent,\n }}\n />\n </div>\n ) : null}\n {frame >= chipAt[i] ? (\n <div\n style={{\n position: \"absolute\",\n left: cs.x,\n top: cs.y,\n width: cs.w,\n height: CHIP_H,\n borderRadius: CHIP_H / 2,\n background: pal.chip,\n display: \"flex\",\n alignItems: \"center\",\n gap: 8,\n padding: \"0 10px 0 5px\",\n boxSizing: \"border-box\",\n transform: `scale(${0.85 + 0.15 * pop})`,\n transformOrigin: \"15% 50%\",\n opacity: clamp01(pop * 2),\n }}\n >\n <div style={{ opacity: flying ? 0 : 1 }}>\n <Avatar\n label={e[0].toUpperCase()}\n tone={AV_TONES[i % AV_TONES.length]}\n size={24}\n />\n </div>\n <span\n style={{\n fontSize: 16,\n color: pal.text,\n whiteSpace: \"nowrap\",\n flex: 1,\n }}\n >\n {e}\n </span>\n <Icon name=\"x\" size={14} color={pal.muted} />\n </div>\n ) : null}\n </div>\n );\n })}\n {focus > 0.5 && caretOn && typingIdx < 0 ? (\n <div\n style={{\n position: \"absolute\",\n left: caretSlot.x + 6,\n top: caretSlot.y + 7,\n width: 1.5,\n height: 20,\n background: accent,\n }}\n />\n ) : null}\n </div>\n\n <div style={{ position: \"absolute\", left: 24, top: SELECT.y }}>\n <div style={{ fontSize: 17, color: pal.text }}>Role</div>\n <div style={{ fontSize: 16, color: pal.muted, marginTop: 3 }}>\n {ROLE_INFO[roleNow] ?? \"Custom permissions\"}\n </div>\n </div>\n <div\n style={{\n position: \"absolute\",\n left: SELECT.x,\n top: SELECT.y,\n width: SELECT.w,\n height: SELECT.h,\n borderRadius: 10,\n boxShadow: `inset 0 0 0 1px ${dropIn > 0.5 ? withAlpha(accent, 0.9) : pal.strong}, 0 0 0 ${dropIn * 3}px ${withAlpha(accent, 0.16)}`,\n background: pal.field,\n display: \"flex\",\n alignItems: \"center\",\n padding: \"0 12px 0 14px\",\n fontSize: 17,\n color: pal.text,\n transform: `scale(${1 - 0.04 * pressOf(selClick)})`,\n }}\n >\n {roleNow}\n <div style={{ marginLeft: \"auto\" }}>\n <Icon name=\"chev\" size={18} color={pal.muted} />\n </div>\n </div>\n\n <div\n style={{\n position: \"absolute\",\n left: 0,\n right: 0,\n top: 284,\n height: 1,\n background: pal.line,\n }}\n />\n <div\n style={{\n position: \"absolute\",\n left: 24,\n top: BUTTON.y,\n height: BUTTON.h,\n display: \"flex\",\n alignItems: \"center\",\n gap: 8,\n fontSize: 16,\n color: pal.muted,\n }}\n >\n <Icon name=\"link\" size={18} color={pal.muted} />\n Copy invite link\n </div>\n <div\n style={{\n position: \"absolute\",\n left: BUTTON.x,\n top: BUTTON.y,\n width: BUTTON.w,\n height: BUTTON.h,\n borderRadius: 10,\n background: accent,\n boxShadow: \"inset 0 1px 0 rgba(255,255,255,0.16)\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n gap: 8,\n fontSize: 16,\n color: \"#FFFFFF\",\n opacity: shownChips === 0 ? 0.5 : 1,\n transform: `scale(${1 - 0.04 * pressOf(btnClick)})`,\n }}\n >\n {loading ? (\n <svg\n width={18}\n height={18}\n viewBox=\"0 0 16 16\"\n aria-hidden\n style={{ transform: `rotate(${(frame - btnClick) * 16}deg)` }}\n >\n <circle\n cx={8}\n cy={8}\n r={6}\n stroke=\"rgba(255,255,255,0.3)\"\n strokeWidth={1.5}\n fill=\"none\"\n />\n <path\n d=\"M8 2 A6 6 0 0 1 14 8\"\n stroke=\"#FFFFFF\"\n strokeWidth={1.5}\n fill=\"none\"\n strokeLinecap=\"round\"\n />\n </svg>\n ) : done ? (\n <div style={{ transform: `scale(${sp(doneAt, SPR.chip)})` }}>\n <Icon name=\"check\" size={18} color=\"#FFFFFF\" />\n </div>\n ) : null}\n {loading ? \"Sending\" : done ? \"Invites sent\" : btnLabel}\n </div>\n\n {dropIn > 0.01 ? (\n <div\n style={{\n position: \"absolute\",\n left: SELECT.x - 28,\n top: SELECT.y + SELECT.h + 6,\n width: SELECT.w + 28,\n padding: 6,\n borderRadius: 14,\n background: pal.modal,\n boxShadow: pal.pop,\n opacity: clamp01(dropIn * 1.6),\n transform: `translateY(${(1 - dropIn) * -8}px) scale(${0.96 + 0.04 * dropIn})`,\n transformOrigin: \"70% 0\",\n }}\n >\n {roles.map((r, i) => (\n <div\n key={r}\n style={{\n height: OPT_H,\n borderRadius: 8,\n display: \"flex\",\n alignItems: \"center\",\n padding: \"0 12px\",\n fontSize: 17,\n color: pal.text,\n background: i === hovered ? pal.hover : \"transparent\",\n }}\n >\n {r}\n {r === roleNow ? (\n <div style={{ marginLeft: \"auto\" }}>\n <Icon name=\"check\" size={18} color={accent} />\n </div>\n ) : null}\n </div>\n ))}\n </div>\n ) : null}\n </div>\n\n {list.map((e, j) => {\n if (frame < flyAt[j]) return null;\n const t = sp(flyAt[j], SPR.card);\n const from = {\n x: MX + INPUT.x + chips[j].x + 5,\n y: MY + INPUT.y + chips[j].y + (CHIP_H - 24) / 2,\n };\n const to = {\n x: PILE_RIGHT - AV - (EXISTING.length + j) * STEP,\n y: PILE_Y,\n };\n const ctrl = {\n x: from.x + (to.x - from.x) * 0.25 - 40,\n y: Math.min(from.y, to.y) - 70,\n };\n const m = 1 - t;\n const x = m * m * from.x + 2 * m * t * ctrl.x + t * t * to.x;\n const y = m * m * from.y + 2 * m * t * ctrl.y + t * t * to.y;\n const size = 24 + (AV - 24) * clamp01(t);\n const land = frame >= landAt[j] ? sp(landAt[j], SPR.chip) : 0;\n const scale =\n frame >= landAt[j]\n ? 1.12 - 0.12 * land\n : 1 + 0.1 * Math.sin(clamp01(t) * Math.PI);\n const lift = Math.sin(clamp01(t) * Math.PI);\n return (\n <div\n key={e}\n style={{\n position: \"absolute\",\n left: x,\n top: y,\n zIndex: 20 - j,\n transform: `scale(${scale})`,\n filter: `drop-shadow(0 ${8 * lift}px ${10 * lift}px rgba(0,0,0,${0.25 * lift}))`,\n }}\n >\n <Avatar\n label={e[0].toUpperCase()}\n tone={AV_TONES[j % AV_TONES.length]}\n size={size}\n ring={pal.win}\n />\n </div>\n );\n })}\n\n {frame >= toastAt ? (\n <div\n style={{\n position: \"absolute\",\n left: SW / 2 - (tall ? 240 : 220),\n top: tall ? SH - 150 : WIN.y + WIN.h - 92,\n width: tall ? 480 : 440,\n height: 60,\n padding: \"0 18px\",\n boxSizing: \"border-box\",\n borderRadius: 14,\n background: dark ? \"#EDEDEF\" : \"#18181B\",\n color: dark ? \"#141518\" : \"#FAFAFA\",\n boxShadow: dark\n ? \"0 18px 40px -12px rgba(0,0,0,0.6)\"\n : \"0 2px 6px rgba(24,24,27,0.1), 0 18px 40px -12px rgba(24,24,40,0.45)\",\n display: \"flex\",\n gap: 12,\n alignItems: \"center\",\n opacity: toastOp,\n transform: `translateY(${(1 - toast) * 28}px) scale(${0.97 + 0.03 * toast})`,\n }}\n >\n <Icon\n name=\"check\"\n size={20}\n color={dark ? \"#141518\" : \"#FAFAFA\"}\n />\n <span style={{ fontSize: 17 }}>\n {n} {n === 1 ? \"invite\" : \"invites\"} sent\n </span>\n <span\n style={{\n marginLeft: \"auto\",\n fontSize: 16,\n color: dark ? \"#6B6D74\" : \"#A1A1AA\",\n }}\n >\n {role} access\n </span>\n </div>\n ) : null}\n\n <svg\n width={26}\n height={26}\n viewBox=\"0 0 24 24\"\n aria-hidden\n style={{\n position: \"absolute\",\n left: curX - 2,\n top: curY - 2,\n overflow: \"visible\",\n opacity: clamp01(curOp),\n transform: `scale(${1 - 0.04 * curPress})`,\n transformOrigin: \"2px 2px\",\n filter: \"drop-shadow(0 2px 3px rgba(0,0,0,0.3))\",\n zIndex: 30,\n }}\n >\n <path\n d=\"M1 1 L1 18.5 L5.6 14.4 L8.7 21.6 L11.6 20.4 L8.5 13.2 L14.5 13.2 Z\"\n fill=\"#FFFFFF\"\n stroke=\"#111111\"\n strokeWidth={1.1}\n strokeLinejoin=\"round\"\n />\n </svg>\n </div>\n </div>\n </AbsoluteFill>\n );\n}\n",
"type": "registry:component",
"target": "components/remocn/invite-team.tsx"
}
],
"type": "registry:component"
}