{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "bubble", "title": "Bubble", "description": "Chat message bubble primitive for the agent sidebar.", "dependencies": [ "class-variance-authority", "cn" ], "files": [ { "path": "src/registry/components/editor/bubble.tsx", "content": "import { type VariantProps, cva } from 'class-variance-authority';\nimport { cn } from 'cn';\nimport * as React from 'react';\n\nfunction BubbleGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n \n );\n}\n\nconst bubbleVariants = cva(\n 'group/bubble relative flex w-fit max-w-[85%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full',\n {\n defaultVariants: {\n variant: 'default',\n },\n variants: {\n variant: {\n default:\n '*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80',\n destructive:\n '*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30',\n ghost:\n 'border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50',\n muted:\n '*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]',\n outline:\n '*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30',\n secondary:\n '*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]',\n tinted:\n '*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]',\n },\n },\n }\n);\n\nfunction Bubble({\n align = 'start',\n className,\n variant = 'default',\n ...props\n}: React.ComponentProps<'div'> &\n VariantProps & {\n align?: 'end' | 'start';\n }) {\n return (\n \n );\n}\n\nfunction BubbleContent({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n \n );\n}\n\nconst bubbleReactionsVariants = cva(\n 'absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0',\n {\n defaultVariants: {\n align: 'end',\n side: 'bottom',\n },\n variants: {\n align: {\n end: 'right-3',\n start: 'left-3',\n },\n side: {\n bottom: 'bottom-0 translate-y-3/4',\n top: 'top-0 -translate-y-3/4',\n },\n },\n }\n);\n\nfunction BubbleReactions({\n align = 'end',\n className,\n side = 'bottom',\n ...props\n}: React.ComponentProps<'div'> & {\n align?: 'end' | 'start';\n side?: 'bottom' | 'top';\n}) {\n return (\n \n );\n}\n\nexport { Bubble, BubbleContent, BubbleGroup, BubbleReactions };\n", "type": "registry:component", "target": "@components/editor/bubble.tsx" } ], "type": "registry:component" }