@fanvue/ui 3.38.0 → 3.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -106,6 +106,7 @@ function Scrim({ experience }) {
106
106
  }
107
107
  function CreatorName({
108
108
  verified,
109
+ verifiedLabel,
109
110
  aiDisclosure,
110
111
  aiDisclosureLabel,
111
112
  nameId,
@@ -118,6 +119,7 @@ function CreatorName({
118
119
  {
119
120
  component: "p",
120
121
  verified,
122
+ verifiedLabel,
121
123
  className: cn.cn("m-0 [&>[role=img]]:ml-1 [&>span:empty+[role=img]]:ml-0", className),
122
124
  children: children && /* @__PURE__ */ jsxRuntime.jsx("span", { id: nameId, children })
123
125
  }
@@ -181,6 +183,7 @@ const ChatEmbed = React__namespace.forwardRef(
181
183
  title,
182
184
  subtitle,
183
185
  verified = false,
186
+ verifiedLabel = "Verified",
184
187
  aiDisclosure = false,
185
188
  aiDisclosureLabel = "AI creator",
186
189
  action,
@@ -198,7 +201,7 @@ const ChatEmbed = React__namespace.forwardRef(
198
201
  const titleId = React__namespace.useId();
199
202
  const isExperience = variant === "experience";
200
203
  const hasTopRow = Boolean(badge || category || meta);
201
- const badges = { verified, aiDisclosure, aiDisclosureLabel };
204
+ const badges = { verified, verifiedLabel, aiDisclosure, aiDisclosureLabel };
202
205
  return /* @__PURE__ */ jsxRuntime.jsxs(
203
206
  "div",
204
207
  {
@@ -1 +1 @@
1
- {"version":3,"file":"ChatEmbed.cjs","sources":["../../../../src/components/ChatEmbed/ChatEmbed.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { AiDisclosureBadge } from \"../AiDisclosureBadge/AiDisclosureBadge\";\nimport { Avatar, type AvatarProps } from \"../Avatar/Avatar\";\nimport { Skeleton } from \"../Skeleton/Skeleton\";\nimport { UserDisplayName } from \"../UserDisplayName/UserDisplayName\";\n\n/** Layout of the embed: a creator profile card or a fan experience card. */\nexport type ChatEmbedVariant = \"creator\" | \"experience\";\n\n/** Overlapping avatars and copy showing who else is taking part. */\nexport interface ChatEmbedSocialProof {\n /** Avatars shown in the overlapping stack, left to right. */\n avatars: AvatarProps[];\n /** Name shown in bold before the label, truncated at 120px. */\n name?: React.ReactNode;\n /** Copy shown after the name, e.g. \"+2 watching\". */\n label: React.ReactNode;\n}\n\ninterface ChatEmbedBaseProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\" | \"onClick\"> {\n /** Media filling the card, typically an `img` or `video`, over a dark surface. */\n media?: React.ReactNode;\n /** Still image blurred behind `verticalMedia`, e.g. the same image or a video's poster frame. */\n mediaBackdrop?: React.ReactNode;\n /** Frame portrait media in a centred 9:16 column over `mediaBackdrop`. @default false */\n verticalMedia?: boolean;\n /** Avatar shown at the start of the profile row. */\n avatar?: AvatarProps;\n /** Primary line of the profile row: a display name or an experience title. */\n title: React.ReactNode;\n /** Secondary line under the title, e.g. a handle or \"Made by @jane_doe\". */\n subtitle?: React.ReactNode;\n /** Show the verified badge on the creator line. @default false */\n verified?: boolean;\n /** Show the EU AI-disclosure badge on the creator line. @default false */\n aiDisclosure?: boolean;\n /** Accessible label for the AI-disclosure badge. @default \"AI creator\" */\n aiDisclosureLabel?: string;\n /** Action at the end of the profile row, typically a `Button` with `variant=\"white\"` and `size=\"32\"`. */\n action?: React.ReactNode;\n /** Badge in the top-left corner, typically a {@link LiveStatus}. */\n badge?: React.ReactNode;\n /** Short category label shown as a tag after the badge, e.g. \"Game\" or \"Audio\". */\n category?: React.ReactNode;\n /** Short copy in a translucent pill in the top-right corner, e.g. \"2 hours ago\". */\n meta?: React.ReactNode;\n /** Renders the media in greyscale, e.g. once a live has ended. @default false */\n inactive?: boolean;\n}\n\ninterface ChatEmbedLinkProps {\n /** Makes the whole card a link to this URL, named by the title. */\n href: string;\n /** Where to open `href`; `\"_blank\"` adds `rel=\"noopener noreferrer\"`. */\n target?: React.HTMLAttributeAnchorTarget;\n /** Not available with `href`. */\n onOpen?: never;\n}\n\ninterface ChatEmbedButtonProps {\n /** Not available with `onOpen`. */\n href?: never;\n /** Not available with `onOpen`. */\n target?: never;\n /** Makes the whole card a button named by the title, e.g. to open a dialog. */\n onOpen?: () => void;\n}\n\ninterface ChatEmbedCreatorProps extends ChatEmbedBaseProps {\n /** Layout of the embed. @default \"creator\" */\n variant?: \"creator\";\n /** Only available on the `experience` variant. */\n socialProof?: never;\n}\n\ninterface ChatEmbedExperienceProps extends ChatEmbedBaseProps {\n /** Layout of the embed. */\n variant: \"experience\";\n /** Social proof row shown above the profile row. */\n socialProof?: ChatEmbedSocialProof;\n}\n\n/** Props for {@link ChatEmbed}. `socialProof` is only accepted on `experience`, and `href` and `onOpen` are exclusive. */\nexport type ChatEmbedProps = (ChatEmbedCreatorProps | ChatEmbedExperienceProps) &\n (ChatEmbedLinkProps | ChatEmbedButtonProps);\n\nexport interface ChatEmbedSkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Layout to match while the embed loads. @default \"creator\" */\n variant?: ChatEmbedVariant;\n /** Visually hidden text read by screen readers in place of the placeholder. @default \"Loading\" */\n label?: string;\n}\n\nexport interface ChatEmbedUnavailableProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Layout to match the embed it replaces. @default \"creator\" */\n variant?: ChatEmbedVariant;\n /** Icon shown above the message. */\n icon?: React.ReactNode;\n}\n\nconst FRAME =\n \"relative isolate flex w-full max-w-100 flex-col overflow-hidden rounded-sm after:pointer-events-none after:absolute after:inset-0 after:z-10 after:rounded-[inherit] after:border after:border-neutral-alphas-100\";\n\nconst HEIGHT: Record<ChatEmbedVariant, string> = {\n creator: \"h-40\",\n experience: \"h-[239px]\",\n};\n\nconst SCRIM_FADE =\n \"bg-linear-to-b from-transparent via-40% via-[color-mix(in_srgb,var(--color-content-always-black)_40%,transparent)] to-[color-mix(in_srgb,var(--color-content-always-black)_88%,transparent)]\";\n\nconst SCRIM_SOFT =\n \"bg-linear-to-b from-transparent via-40% via-[color-mix(in_srgb,var(--color-content-always-black)_24%,transparent)] to-[color-mix(in_srgb,var(--color-content-always-black)_40%,transparent)]\";\n\nconst PROGRESSIVE_BLUR = [\n \"backdrop-blur-[4px] [mask-image:linear-gradient(to_bottom,transparent_13%,black_42%)]\",\n \"backdrop-blur-[8px] [mask-image:linear-gradient(to_bottom,transparent_42%,black_71%)]\",\n \"backdrop-blur-[12px] [mask-image:linear-gradient(to_bottom,transparent_71%,black)]\",\n];\n\nconst MEDIA_FILL = \"*:size-full [&>img]:object-cover [&>video]:object-cover\";\n\nconst OVERLAY =\n \"absolute inset-0 z-[1] cursor-pointer rounded-[inherit] focus-visible:shadow-focus-ring focus-visible:outline-none\";\n\nconst DEFAULT_UNAVAILABLE: Record<ChatEmbedVariant, string> = {\n creator: \"This profile is no longer available\",\n experience: \"This experience is no longer available\",\n};\n\nfunction SocialProof({ avatars, name, label }: ChatEmbedSocialProof) {\n return (\n <div className=\"flex min-w-0 items-center gap-2\">\n <div className=\"flex shrink-0\">\n {avatars.map((avatar, index) => (\n <span\n // biome-ignore lint/suspicious/noArrayIndexKey: avatars can share a src and the stack never reorders\n key={index}\n className={cn(\n \"flex\",\n index < avatars.length - 1 && \"-mr-2\",\n index > 0 &&\n \"[mask-image:radial-gradient(circle_at_-4px_50%,transparent_14px,black_14.5px)]\",\n )}\n >\n <Avatar size={24} {...avatar} />\n </span>\n ))}\n </div>\n <p className=\"m-0 flex min-w-0 items-center gap-1 whitespace-nowrap text-content-always-white\">\n {name && (\n <span className=\"typography-body-small-14px-semibold max-w-30 truncate\">{name}</span>\n )}\n <span className=\"typography-body-small-14px-regular shrink-0\">{label}</span>\n </p>\n </div>\n );\n}\n\nfunction Media({\n media,\n backdrop,\n vertical,\n greyscale,\n}: {\n media?: React.ReactNode;\n backdrop?: React.ReactNode;\n vertical: boolean;\n greyscale: boolean;\n}) {\n if (!media) return null;\n\n return (\n <div className=\"pointer-events-none absolute inset-0 select-none\">\n {vertical ? (\n <>\n <div\n aria-hidden=\"true\"\n className={cn(\n \"-translate-1/2 absolute top-1/2 left-1/2 h-[709px] w-[475px] blur-[20px]\",\n MEDIA_FILL,\n )}\n >\n {backdrop}\n </div>\n <div\n className={cn(\n \"absolute inset-y-0 left-1/2 aspect-9/16 -translate-x-1/2 shadow-md\",\n MEDIA_FILL,\n )}\n >\n {media}\n </div>\n </>\n ) : (\n <div className={cn(\"absolute inset-0\", MEDIA_FILL)}>{media}</div>\n )}\n {greyscale && (\n <div className=\"absolute inset-0 bg-content-always-black mix-blend-saturation\" />\n )}\n </div>\n );\n}\n\nfunction Scrim({ experience }: { experience: boolean }) {\n return (\n <>\n {PROGRESSIVE_BLUR.map((step) => (\n <div key={step} aria-hidden=\"true\" className={cn(\"absolute inset-0\", step)} />\n ))}\n <div aria-hidden=\"true\" className={cn(\"absolute inset-0 mix-blend-luminosity\", SCRIM_FADE)} />\n {experience && (\n <div aria-hidden=\"true\" className={cn(\"absolute inset-0 mix-blend-multiply\", SCRIM_SOFT)} />\n )}\n </>\n );\n}\n\nfunction CreatorName({\n verified,\n aiDisclosure,\n aiDisclosureLabel,\n nameId,\n className,\n children,\n}: {\n verified: boolean;\n aiDisclosure: boolean;\n aiDisclosureLabel: string;\n nameId?: string;\n className: string;\n children?: React.ReactNode;\n}) {\n return (\n <div className=\"flex min-w-0 items-center gap-1\">\n <UserDisplayName\n component=\"p\"\n verified={verified}\n className={cn(\"m-0 [&>[role=img]]:ml-1 [&>span:empty+[role=img]]:ml-0\", className)}\n >\n {children && <span id={nameId}>{children}</span>}\n </UserDisplayName>\n {aiDisclosure && (\n <AiDisclosureBadge\n tone=\"light\"\n role=\"img\"\n aria-hidden={false}\n aria-label={aiDisclosureLabel}\n className=\"shrink-0\"\n />\n )}\n </div>\n );\n}\n\nfunction TopRow({\n badge,\n category,\n meta,\n}: Pick<ChatEmbedBaseProps, \"badge\" | \"category\" | \"meta\">) {\n return (\n <div className=\"relative flex items-center justify-between gap-2 px-3 pt-3\">\n <div className=\"flex min-w-0 items-center gap-1\">\n {badge}\n {category && (\n <span className=\"typography-description-12px-semibold whitespace-nowrap rounded-xs bg-buttons-always-white-default px-2 py-1 text-content-always-black\">\n {category}\n </span>\n )}\n </div>\n {meta && (\n <span className=\"typography-description-12px-semibold whitespace-nowrap rounded-full bg-background-overlay-default px-2 py-1 text-center text-content-always-white backdrop-blur-[10px]\">\n {meta}\n </span>\n )}\n </div>\n );\n}\n\nfunction OpenOverlay({\n href,\n target,\n onOpen,\n labelledBy,\n}: {\n href?: string;\n target?: React.HTMLAttributeAnchorTarget;\n onOpen?: () => void;\n labelledBy: string;\n}) {\n if (href) {\n return (\n // biome-ignore lint/a11y/useAnchorContent: Named by the visible title via aria-labelledby\n <a\n href={href}\n target={target}\n rel={target === \"_blank\" ? \"noopener noreferrer\" : undefined}\n aria-labelledby={labelledBy}\n className={OVERLAY}\n />\n );\n }\n if (!onOpen) return null;\n return <button type=\"button\" onClick={onOpen} aria-labelledby={labelledBy} className={OVERLAY} />;\n}\n\n/**\n * A card embedded in a chat thread that links out to a creator profile or a fan\n * experience such as a live stream or game. Media fills the card and the profile\n * row sits on a blurred scrim along the bottom edge.\n *\n * The `creator` variant is 160px tall and the `experience` variant 239px; both\n * fill their container up to 400px wide. Pass `href` (or `onOpen`) to make the\n * whole card clickable; the `action` stays separately clickable above it. Use\n * {@link ChatEmbedSkeleton} while the embed's data loads and\n * {@link ChatEmbedUnavailable} when the shared item no longer exists.\n *\n * Give `media` meaningful alt text when it conveys content, or `alt=\"\"` when the\n * title already describes it. When `media` is a video with `verticalMedia`, pass\n * its poster frame as `mediaBackdrop` so the video is not decoded twice.\n * `socialProof` is shown to everyone in the chat, so prefer a count over naming\n * other fans.\n *\n * @example\n * ```tsx\n * <ChatEmbed\n * variant=\"experience\"\n * href=\"https://www.fanvue.com\"\n * badge={<LiveStatus variant=\"live\" />}\n * category=\"Audio\"\n * media={<img src=\"/stream.jpg\" alt=\"\" />}\n * avatar={{ src: \"/avatar.jpg\", fallback: \"JD\" }}\n * title=\"Friday night Q&A\"\n * subtitle=\"@jane_doe\"\n * action={<Button variant=\"white\" size=\"32\">Join</Button>}\n * />\n * ```\n */\nexport const ChatEmbed = React.forwardRef<HTMLDivElement, ChatEmbedProps>(\n (\n {\n variant = \"creator\",\n media,\n mediaBackdrop,\n verticalMedia = false,\n avatar,\n title,\n subtitle,\n verified = false,\n aiDisclosure = false,\n aiDisclosureLabel = \"AI creator\",\n action,\n badge,\n category,\n meta,\n inactive = false,\n href,\n target,\n onOpen,\n socialProof,\n className,\n ...props\n },\n ref,\n ) => {\n const titleId = React.useId();\n const isExperience = variant === \"experience\";\n const hasTopRow = Boolean(badge || category || meta);\n const badges = { verified, aiDisclosure, aiDisclosureLabel };\n\n return (\n <div\n ref={ref}\n className={cn(\n FRAME,\n HEIGHT[variant],\n \"bg-content-always-black\",\n hasTopRow ? \"justify-between\" : \"justify-end\",\n className,\n )}\n {...props}\n >\n <Media\n media={media}\n backdrop={mediaBackdrop}\n vertical={verticalMedia}\n greyscale={inactive}\n />\n <OpenOverlay href={href} target={target} onOpen={onOpen} labelledBy={titleId} />\n\n {hasTopRow && <TopRow badge={badge} category={category} meta={meta} />}\n\n <div\n className={cn(\"relative flex flex-col gap-2 px-3 pb-3\", isExperience ? \"pt-6\" : \"pt-3\")}\n >\n <Scrim experience={isExperience} />\n\n {isExperience && socialProof && (\n <div className=\"relative\">\n <SocialProof {...socialProof} />\n </div>\n )}\n\n <div className={cn(\"relative flex items-center\", isExperience ? \"gap-6\" : \"gap-2\")}>\n <div className=\"flex min-w-0 flex-1 items-center gap-3\">\n {avatar && <Avatar size={40} {...avatar} />}\n <div className=\"flex min-w-0 flex-col justify-center text-content-always-white\">\n {isExperience ? (\n <>\n <p id={titleId} className=\"typography-body-default-16px-semibold m-0 truncate\">\n {title}\n </p>\n {(subtitle || verified || aiDisclosure) && (\n <CreatorName {...badges} className=\"typography-body-small-14px-regular\">\n {subtitle}\n </CreatorName>\n )}\n </>\n ) : (\n <>\n <CreatorName\n {...badges}\n nameId={titleId}\n className=\"typography-body-default-16px-semibold\"\n >\n {title}\n </CreatorName>\n {subtitle && (\n <p className=\"typography-body-small-14px-regular m-0 truncate\">{subtitle}</p>\n )}\n </>\n )}\n </div>\n </div>\n {action && <div className=\"relative z-[2] shrink-0\">{action}</div>}\n </div>\n </div>\n </div>\n );\n },\n);\n\nChatEmbed.displayName = \"ChatEmbed\";\n\n/**\n * Loading placeholder sized to match a {@link ChatEmbed}, shown while the data\n * for a shared link is being fetched.\n *\n * @example\n * ```tsx\n * <ChatEmbedSkeleton variant=\"experience\" />\n * ```\n */\nexport const ChatEmbedSkeleton = React.forwardRef<HTMLDivElement, ChatEmbedSkeletonProps>(\n ({ variant = \"creator\", label = \"Loading\", className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n aria-busy=\"true\"\n className={cn(FRAME, HEIGHT[variant], \"justify-end bg-surface-secondary\", className)}\n {...props}\n >\n <span className=\"sr-only\">{label}</span>\n <div className=\"relative flex items-center gap-3 p-3\">\n <Skeleton variant=\"circular\" width={40} height={40} className=\"shrink-0\" />\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <Skeleton width=\"50%\" height={16} />\n <Skeleton width=\"30%\" height={14} />\n </div>\n </div>\n </div>\n );\n },\n);\n\nChatEmbedSkeleton.displayName = \"ChatEmbedSkeleton\";\n\n/**\n * Placeholder sized to match a {@link ChatEmbed}, shown in place of the card when\n * the shared profile or experience has been removed, hidden or unpublished.\n * Pass `children` to localise the message.\n *\n * @example\n * ```tsx\n * <ChatEmbedUnavailable variant=\"experience\" />\n * ```\n */\nexport const ChatEmbedUnavailable = React.forwardRef<HTMLDivElement, ChatEmbedUnavailableProps>(\n ({ variant = \"creator\", icon, className, children, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n FRAME,\n HEIGHT[variant],\n \"items-center justify-center gap-2 bg-surface-secondary px-6 text-center text-content-secondary\",\n className,\n )}\n {...props}\n >\n {icon && (\n <span aria-hidden=\"true\" className=\"flex\">\n {icon}\n </span>\n )}\n <p className=\"typography-body-small-14px-regular m-0\">\n {children ?? DEFAULT_UNAVAILABLE[variant]}\n </p>\n </div>\n );\n },\n);\n\nChatEmbedUnavailable.displayName = \"ChatEmbedUnavailable\";\n"],"names":["jsxs","jsx","cn","Avatar","Fragment","UserDisplayName","AiDisclosureBadge","React","Skeleton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAsGA,MAAM,QACJ;AAEF,MAAM,SAA2C;AAAA,EAC/C,SAAS;AAAA,EACT,YAAY;AACd;AAEA,MAAM,aACJ;AAEF,MAAM,aACJ;AAEF,MAAM,mBAAmB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,aAAa;AAEnB,MAAM,UACJ;AAEF,MAAM,sBAAwD;AAAA,EAC5D,SAAS;AAAA,EACT,YAAY;AACd;AAEA,SAAS,YAAY,EAAE,SAAS,MAAM,SAA+B;AACnE,SACEA,2BAAAA,KAAC,OAAA,EAAI,WAAU,mCACb,UAAA;AAAA,IAAAC,2BAAAA,IAAC,SAAI,WAAU,iBACZ,kBAAQ,IAAI,CAAC,QAAQ,UACpBA,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QAGC,WAAWC,GAAAA;AAAAA,UACT;AAAA,UACA,QAAQ,QAAQ,SAAS,KAAK;AAAA,UAC9B,QAAQ,KACN;AAAA,QAAA;AAAA,QAGJ,UAAAD,2BAAAA,IAACE,OAAAA,QAAA,EAAO,MAAM,IAAK,GAAG,OAAA,CAAQ;AAAA,MAAA;AAAA,MARzB;AAAA,IAAA,CAUR,GACH;AAAA,IACAH,2BAAAA,KAAC,KAAA,EAAE,WAAU,mFACV,UAAA;AAAA,MAAA,QACCC,2BAAAA,IAAC,QAAA,EAAK,WAAU,yDAAyD,UAAA,MAAK;AAAA,MAEhFA,2BAAAA,IAAC,QAAA,EAAK,WAAU,+CAA+C,UAAA,MAAA,CAAM;AAAA,IAAA,EAAA,CACvE;AAAA,EAAA,GACF;AAEJ;AAE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"version":3,"file":"ChatEmbed.cjs","sources":["../../../../src/components/ChatEmbed/ChatEmbed.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { AiDisclosureBadge } from \"../AiDisclosureBadge/AiDisclosureBadge\";\nimport { Avatar, type AvatarProps } from \"../Avatar/Avatar\";\nimport { Skeleton } from \"../Skeleton/Skeleton\";\nimport { UserDisplayName } from \"../UserDisplayName/UserDisplayName\";\n\n/** Layout of the embed: a creator profile card or a fan experience card. */\nexport type ChatEmbedVariant = \"creator\" | \"experience\";\n\n/** Overlapping avatars and copy showing who else is taking part. */\nexport interface ChatEmbedSocialProof {\n /** Avatars shown in the overlapping stack, left to right. */\n avatars: AvatarProps[];\n /** Name shown in bold before the label, truncated at 120px. */\n name?: React.ReactNode;\n /** Copy shown after the name, e.g. \"+2 watching\". */\n label: React.ReactNode;\n}\n\ninterface ChatEmbedBaseProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\" | \"onClick\"> {\n /** Media filling the card, typically an `img` or `video`, over a dark surface. */\n media?: React.ReactNode;\n /** Still image blurred behind `verticalMedia`, e.g. the same image or a video's poster frame. */\n mediaBackdrop?: React.ReactNode;\n /** Frame portrait media in a centred 9:16 column over `mediaBackdrop`. @default false */\n verticalMedia?: boolean;\n /** Avatar shown at the start of the profile row. */\n avatar?: AvatarProps;\n /** Primary line of the profile row: a display name or an experience title. */\n title: React.ReactNode;\n /** Secondary line under the title, e.g. a handle or \"Made by @jane_doe\". */\n subtitle?: React.ReactNode;\n /** Show the verified badge on the creator line. @default false */\n verified?: boolean;\n /** Accessible label for the verified badge. @default \"Verified\" */\n verifiedLabel?: string;\n /** Show the EU AI-disclosure badge on the creator line. @default false */\n aiDisclosure?: boolean;\n /** Accessible label for the AI-disclosure badge. @default \"AI creator\" */\n aiDisclosureLabel?: string;\n /** Action at the end of the profile row, typically a `Button` with `variant=\"white\"` and `size=\"32\"`. */\n action?: React.ReactNode;\n /** Badge in the top-left corner, typically a {@link LiveStatus}. */\n badge?: React.ReactNode;\n /** Short category label shown as a tag after the badge, e.g. \"Game\" or \"Audio\". */\n category?: React.ReactNode;\n /** Short copy in a translucent pill in the top-right corner, e.g. \"2 hours ago\". */\n meta?: React.ReactNode;\n /** Renders the media in greyscale, e.g. once a live has ended. @default false */\n inactive?: boolean;\n}\n\ninterface ChatEmbedLinkProps {\n /** Makes the whole card a link to this URL, named by the title. */\n href: string;\n /** Where to open `href`; `\"_blank\"` adds `rel=\"noopener noreferrer\"`. */\n target?: React.HTMLAttributeAnchorTarget;\n /** Not available with `href`. */\n onOpen?: never;\n}\n\ninterface ChatEmbedButtonProps {\n /** Not available with `onOpen`. */\n href?: never;\n /** Not available with `onOpen`. */\n target?: never;\n /** Makes the whole card a button named by the title, e.g. to open a dialog. */\n onOpen?: () => void;\n}\n\ninterface ChatEmbedCreatorProps extends ChatEmbedBaseProps {\n /** Layout of the embed. @default \"creator\" */\n variant?: \"creator\";\n /** Only available on the `experience` variant. */\n socialProof?: never;\n}\n\ninterface ChatEmbedExperienceProps extends ChatEmbedBaseProps {\n /** Layout of the embed. */\n variant: \"experience\";\n /** Social proof row shown above the profile row. */\n socialProof?: ChatEmbedSocialProof;\n}\n\n/** Props for {@link ChatEmbed}. `socialProof` is only accepted on `experience`, and `href` and `onOpen` are exclusive. */\nexport type ChatEmbedProps = (ChatEmbedCreatorProps | ChatEmbedExperienceProps) &\n (ChatEmbedLinkProps | ChatEmbedButtonProps);\n\nexport interface ChatEmbedSkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Layout to match while the embed loads. @default \"creator\" */\n variant?: ChatEmbedVariant;\n /** Visually hidden text read by screen readers in place of the placeholder. @default \"Loading\" */\n label?: string;\n}\n\nexport interface ChatEmbedUnavailableProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Layout to match the embed it replaces. @default \"creator\" */\n variant?: ChatEmbedVariant;\n /** Icon shown above the message. */\n icon?: React.ReactNode;\n}\n\nconst FRAME =\n \"relative isolate flex w-full max-w-100 flex-col overflow-hidden rounded-sm after:pointer-events-none after:absolute after:inset-0 after:z-10 after:rounded-[inherit] after:border after:border-neutral-alphas-100\";\n\nconst HEIGHT: Record<ChatEmbedVariant, string> = {\n creator: \"h-40\",\n experience: \"h-[239px]\",\n};\n\nconst SCRIM_FADE =\n \"bg-linear-to-b from-transparent via-40% via-[color-mix(in_srgb,var(--color-content-always-black)_40%,transparent)] to-[color-mix(in_srgb,var(--color-content-always-black)_88%,transparent)]\";\n\nconst SCRIM_SOFT =\n \"bg-linear-to-b from-transparent via-40% via-[color-mix(in_srgb,var(--color-content-always-black)_24%,transparent)] to-[color-mix(in_srgb,var(--color-content-always-black)_40%,transparent)]\";\n\nconst PROGRESSIVE_BLUR = [\n \"backdrop-blur-[4px] [mask-image:linear-gradient(to_bottom,transparent_13%,black_42%)]\",\n \"backdrop-blur-[8px] [mask-image:linear-gradient(to_bottom,transparent_42%,black_71%)]\",\n \"backdrop-blur-[12px] [mask-image:linear-gradient(to_bottom,transparent_71%,black)]\",\n];\n\nconst MEDIA_FILL = \"*:size-full [&>img]:object-cover [&>video]:object-cover\";\n\nconst OVERLAY =\n \"absolute inset-0 z-[1] cursor-pointer rounded-[inherit] focus-visible:shadow-focus-ring focus-visible:outline-none\";\n\nconst DEFAULT_UNAVAILABLE: Record<ChatEmbedVariant, string> = {\n creator: \"This profile is no longer available\",\n experience: \"This experience is no longer available\",\n};\n\nfunction SocialProof({ avatars, name, label }: ChatEmbedSocialProof) {\n return (\n <div className=\"flex min-w-0 items-center gap-2\">\n <div className=\"flex shrink-0\">\n {avatars.map((avatar, index) => (\n <span\n // biome-ignore lint/suspicious/noArrayIndexKey: avatars can share a src and the stack never reorders\n key={index}\n className={cn(\n \"flex\",\n index < avatars.length - 1 && \"-mr-2\",\n index > 0 &&\n \"[mask-image:radial-gradient(circle_at_-4px_50%,transparent_14px,black_14.5px)]\",\n )}\n >\n <Avatar size={24} {...avatar} />\n </span>\n ))}\n </div>\n <p className=\"m-0 flex min-w-0 items-center gap-1 whitespace-nowrap text-content-always-white\">\n {name && (\n <span className=\"typography-body-small-14px-semibold max-w-30 truncate\">{name}</span>\n )}\n <span className=\"typography-body-small-14px-regular shrink-0\">{label}</span>\n </p>\n </div>\n );\n}\n\nfunction Media({\n media,\n backdrop,\n vertical,\n greyscale,\n}: {\n media?: React.ReactNode;\n backdrop?: React.ReactNode;\n vertical: boolean;\n greyscale: boolean;\n}) {\n if (!media) return null;\n\n return (\n <div className=\"pointer-events-none absolute inset-0 select-none\">\n {vertical ? (\n <>\n <div\n aria-hidden=\"true\"\n className={cn(\n \"-translate-1/2 absolute top-1/2 left-1/2 h-[709px] w-[475px] blur-[20px]\",\n MEDIA_FILL,\n )}\n >\n {backdrop}\n </div>\n <div\n className={cn(\n \"absolute inset-y-0 left-1/2 aspect-9/16 -translate-x-1/2 shadow-md\",\n MEDIA_FILL,\n )}\n >\n {media}\n </div>\n </>\n ) : (\n <div className={cn(\"absolute inset-0\", MEDIA_FILL)}>{media}</div>\n )}\n {greyscale && (\n <div className=\"absolute inset-0 bg-content-always-black mix-blend-saturation\" />\n )}\n </div>\n );\n}\n\nfunction Scrim({ experience }: { experience: boolean }) {\n return (\n <>\n {PROGRESSIVE_BLUR.map((step) => (\n <div key={step} aria-hidden=\"true\" className={cn(\"absolute inset-0\", step)} />\n ))}\n <div aria-hidden=\"true\" className={cn(\"absolute inset-0 mix-blend-luminosity\", SCRIM_FADE)} />\n {experience && (\n <div aria-hidden=\"true\" className={cn(\"absolute inset-0 mix-blend-multiply\", SCRIM_SOFT)} />\n )}\n </>\n );\n}\n\nfunction CreatorName({\n verified,\n verifiedLabel,\n aiDisclosure,\n aiDisclosureLabel,\n nameId,\n className,\n children,\n}: {\n verified: boolean;\n verifiedLabel: string;\n aiDisclosure: boolean;\n aiDisclosureLabel: string;\n nameId?: string;\n className: string;\n children?: React.ReactNode;\n}) {\n return (\n <div className=\"flex min-w-0 items-center gap-1\">\n <UserDisplayName\n component=\"p\"\n verified={verified}\n verifiedLabel={verifiedLabel}\n className={cn(\"m-0 [&>[role=img]]:ml-1 [&>span:empty+[role=img]]:ml-0\", className)}\n >\n {children && <span id={nameId}>{children}</span>}\n </UserDisplayName>\n {aiDisclosure && (\n <AiDisclosureBadge\n tone=\"light\"\n role=\"img\"\n aria-hidden={false}\n aria-label={aiDisclosureLabel}\n className=\"shrink-0\"\n />\n )}\n </div>\n );\n}\n\nfunction TopRow({\n badge,\n category,\n meta,\n}: Pick<ChatEmbedBaseProps, \"badge\" | \"category\" | \"meta\">) {\n return (\n <div className=\"relative flex items-center justify-between gap-2 px-3 pt-3\">\n <div className=\"flex min-w-0 items-center gap-1\">\n {badge}\n {category && (\n <span className=\"typography-description-12px-semibold whitespace-nowrap rounded-xs bg-buttons-always-white-default px-2 py-1 text-content-always-black\">\n {category}\n </span>\n )}\n </div>\n {meta && (\n <span className=\"typography-description-12px-semibold whitespace-nowrap rounded-full bg-background-overlay-default px-2 py-1 text-center text-content-always-white backdrop-blur-[10px]\">\n {meta}\n </span>\n )}\n </div>\n );\n}\n\nfunction OpenOverlay({\n href,\n target,\n onOpen,\n labelledBy,\n}: {\n href?: string;\n target?: React.HTMLAttributeAnchorTarget;\n onOpen?: () => void;\n labelledBy: string;\n}) {\n if (href) {\n return (\n // biome-ignore lint/a11y/useAnchorContent: Named by the visible title via aria-labelledby\n <a\n href={href}\n target={target}\n rel={target === \"_blank\" ? \"noopener noreferrer\" : undefined}\n aria-labelledby={labelledBy}\n className={OVERLAY}\n />\n );\n }\n if (!onOpen) return null;\n return <button type=\"button\" onClick={onOpen} aria-labelledby={labelledBy} className={OVERLAY} />;\n}\n\n/**\n * A card embedded in a chat thread that links out to a creator profile or a fan\n * experience such as a live stream or game. Media fills the card and the profile\n * row sits on a blurred scrim along the bottom edge.\n *\n * The `creator` variant is 160px tall and the `experience` variant 239px; both\n * fill their container up to 400px wide. Pass `href` (or `onOpen`) to make the\n * whole card clickable; the `action` stays separately clickable above it. Use\n * {@link ChatEmbedSkeleton} while the embed's data loads and\n * {@link ChatEmbedUnavailable} when the shared item no longer exists.\n *\n * Give `media` meaningful alt text when it conveys content, or `alt=\"\"` when the\n * title already describes it. When `media` is a video with `verticalMedia`, pass\n * its poster frame as `mediaBackdrop` so the video is not decoded twice.\n * `socialProof` is shown to everyone in the chat, so prefer a count over naming\n * other fans.\n *\n * @example\n * ```tsx\n * <ChatEmbed\n * variant=\"experience\"\n * href=\"https://www.fanvue.com\"\n * badge={<LiveStatus variant=\"live\" />}\n * category=\"Audio\"\n * media={<img src=\"/stream.jpg\" alt=\"\" />}\n * avatar={{ src: \"/avatar.jpg\", fallback: \"JD\" }}\n * title=\"Friday night Q&A\"\n * subtitle=\"@jane_doe\"\n * action={<Button variant=\"white\" size=\"32\">Join</Button>}\n * />\n * ```\n */\nexport const ChatEmbed = React.forwardRef<HTMLDivElement, ChatEmbedProps>(\n (\n {\n variant = \"creator\",\n media,\n mediaBackdrop,\n verticalMedia = false,\n avatar,\n title,\n subtitle,\n verified = false,\n verifiedLabel = \"Verified\",\n aiDisclosure = false,\n aiDisclosureLabel = \"AI creator\",\n action,\n badge,\n category,\n meta,\n inactive = false,\n href,\n target,\n onOpen,\n socialProof,\n className,\n ...props\n },\n ref,\n ) => {\n const titleId = React.useId();\n const isExperience = variant === \"experience\";\n const hasTopRow = Boolean(badge || category || meta);\n const badges = { verified, verifiedLabel, aiDisclosure, aiDisclosureLabel };\n\n return (\n <div\n ref={ref}\n className={cn(\n FRAME,\n HEIGHT[variant],\n \"bg-content-always-black\",\n hasTopRow ? \"justify-between\" : \"justify-end\",\n className,\n )}\n {...props}\n >\n <Media\n media={media}\n backdrop={mediaBackdrop}\n vertical={verticalMedia}\n greyscale={inactive}\n />\n <OpenOverlay href={href} target={target} onOpen={onOpen} labelledBy={titleId} />\n\n {hasTopRow && <TopRow badge={badge} category={category} meta={meta} />}\n\n <div\n className={cn(\"relative flex flex-col gap-2 px-3 pb-3\", isExperience ? \"pt-6\" : \"pt-3\")}\n >\n <Scrim experience={isExperience} />\n\n {isExperience && socialProof && (\n <div className=\"relative\">\n <SocialProof {...socialProof} />\n </div>\n )}\n\n <div className={cn(\"relative flex items-center\", isExperience ? \"gap-6\" : \"gap-2\")}>\n <div className=\"flex min-w-0 flex-1 items-center gap-3\">\n {avatar && <Avatar size={40} {...avatar} />}\n <div className=\"flex min-w-0 flex-col justify-center text-content-always-white\">\n {isExperience ? (\n <>\n <p id={titleId} className=\"typography-body-default-16px-semibold m-0 truncate\">\n {title}\n </p>\n {(subtitle || verified || aiDisclosure) && (\n <CreatorName {...badges} className=\"typography-body-small-14px-regular\">\n {subtitle}\n </CreatorName>\n )}\n </>\n ) : (\n <>\n <CreatorName\n {...badges}\n nameId={titleId}\n className=\"typography-body-default-16px-semibold\"\n >\n {title}\n </CreatorName>\n {subtitle && (\n <p className=\"typography-body-small-14px-regular m-0 truncate\">{subtitle}</p>\n )}\n </>\n )}\n </div>\n </div>\n {action && <div className=\"relative z-[2] shrink-0\">{action}</div>}\n </div>\n </div>\n </div>\n );\n },\n);\n\nChatEmbed.displayName = \"ChatEmbed\";\n\n/**\n * Loading placeholder sized to match a {@link ChatEmbed}, shown while the data\n * for a shared link is being fetched.\n *\n * @example\n * ```tsx\n * <ChatEmbedSkeleton variant=\"experience\" />\n * ```\n */\nexport const ChatEmbedSkeleton = React.forwardRef<HTMLDivElement, ChatEmbedSkeletonProps>(\n ({ variant = \"creator\", label = \"Loading\", className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n aria-busy=\"true\"\n className={cn(FRAME, HEIGHT[variant], \"justify-end bg-surface-secondary\", className)}\n {...props}\n >\n <span className=\"sr-only\">{label}</span>\n <div className=\"relative flex items-center gap-3 p-3\">\n <Skeleton variant=\"circular\" width={40} height={40} className=\"shrink-0\" />\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <Skeleton width=\"50%\" height={16} />\n <Skeleton width=\"30%\" height={14} />\n </div>\n </div>\n </div>\n );\n },\n);\n\nChatEmbedSkeleton.displayName = \"ChatEmbedSkeleton\";\n\n/**\n * Placeholder sized to match a {@link ChatEmbed}, shown in place of the card when\n * the shared profile or experience has been removed, hidden or unpublished.\n * Pass `children` to localise the message.\n *\n * @example\n * ```tsx\n * <ChatEmbedUnavailable variant=\"experience\" />\n * ```\n */\nexport const ChatEmbedUnavailable = React.forwardRef<HTMLDivElement, ChatEmbedUnavailableProps>(\n ({ variant = \"creator\", icon, className, children, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n FRAME,\n HEIGHT[variant],\n \"items-center justify-center gap-2 bg-surface-secondary px-6 text-center text-content-secondary\",\n className,\n )}\n {...props}\n >\n {icon && (\n <span aria-hidden=\"true\" className=\"flex\">\n {icon}\n </span>\n )}\n <p className=\"typography-body-small-14px-regular m-0\">\n {children ?? DEFAULT_UNAVAILABLE[variant]}\n </p>\n </div>\n );\n },\n);\n\nChatEmbedUnavailable.displayName = \"ChatEmbedUnavailable\";\n"],"names":["jsxs","jsx","cn","Avatar","Fragment","UserDisplayName","AiDisclosureBadge","React","Skeleton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAwGA,MAAM,QACJ;AAEF,MAAM,SAA2C;AAAA,EAC/C,SAAS;AAAA,EACT,YAAY;AACd;AAEA,MAAM,aACJ;AAEF,MAAM,aACJ;AAEF,MAAM,mBAAmB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,aAAa;AAEnB,MAAM,UACJ;AAEF,MAAM,sBAAwD;AAAA,EAC5D,SAAS;AAAA,EACT,YAAY;AACd;AAEA,SAAS,YAAY,EAAE,SAAS,MAAM,SAA+B;AACnE,SACEA,2BAAAA,KAAC,OAAA,EAAI,WAAU,mCACb,UAAA;AAAA,IAAAC,2BAAAA,IAAC,SAAI,WAAU,iBACZ,kBAAQ,IAAI,CAAC,QAAQ,UACpBA,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QAGC,WAAWC,GAAAA;AAAAA,UACT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BAAuBD,iBAAM;AAAA,EACxC,CAAC,EAAE,UAAU,WAAW,MAAM,WAAW,UAAU,GAAG,MAAA,GAAS,QAAQ;AACrE,WACEP,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAWE,GAAAA;AAAAA,UACT;AAAA,UACA,OAAO,OAAO;AAAA,UACd;AAAA,UACA;AAAA,QAAA;AAAA,QAED,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,uCACE,QAAA,EAAK,eAAY,QAAO,WAAU,QAChC,UAAA,MACH;AAAA,yCAED,KAAA,EAAE,WAAU,0CACV,UAAA,YAAY,oBAAoB,OAAO,EAAA,CAC1C;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,qBAAqB,cAAc;;;;"}
@@ -87,6 +87,7 @@ function Scrim({ experience }) {
87
87
  }
88
88
  function CreatorName({
89
89
  verified,
90
+ verifiedLabel,
90
91
  aiDisclosure,
91
92
  aiDisclosureLabel,
92
93
  nameId,
@@ -99,6 +100,7 @@ function CreatorName({
99
100
  {
100
101
  component: "p",
101
102
  verified,
103
+ verifiedLabel,
102
104
  className: cn("m-0 [&>[role=img]]:ml-1 [&>span:empty+[role=img]]:ml-0", className),
103
105
  children: children && /* @__PURE__ */ jsx("span", { id: nameId, children })
104
106
  }
@@ -162,6 +164,7 @@ const ChatEmbed = React.forwardRef(
162
164
  title,
163
165
  subtitle,
164
166
  verified = false,
167
+ verifiedLabel = "Verified",
165
168
  aiDisclosure = false,
166
169
  aiDisclosureLabel = "AI creator",
167
170
  action,
@@ -179,7 +182,7 @@ const ChatEmbed = React.forwardRef(
179
182
  const titleId = React.useId();
180
183
  const isExperience = variant === "experience";
181
184
  const hasTopRow = Boolean(badge || category || meta);
182
- const badges = { verified, aiDisclosure, aiDisclosureLabel };
185
+ const badges = { verified, verifiedLabel, aiDisclosure, aiDisclosureLabel };
183
186
  return /* @__PURE__ */ jsxs(
184
187
  "div",
185
188
  {
@@ -1 +1 @@
1
- {"version":3,"file":"ChatEmbed.mjs","sources":["../../../src/components/ChatEmbed/ChatEmbed.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { AiDisclosureBadge } from \"../AiDisclosureBadge/AiDisclosureBadge\";\nimport { Avatar, type AvatarProps } from \"../Avatar/Avatar\";\nimport { Skeleton } from \"../Skeleton/Skeleton\";\nimport { UserDisplayName } from \"../UserDisplayName/UserDisplayName\";\n\n/** Layout of the embed: a creator profile card or a fan experience card. */\nexport type ChatEmbedVariant = \"creator\" | \"experience\";\n\n/** Overlapping avatars and copy showing who else is taking part. */\nexport interface ChatEmbedSocialProof {\n /** Avatars shown in the overlapping stack, left to right. */\n avatars: AvatarProps[];\n /** Name shown in bold before the label, truncated at 120px. */\n name?: React.ReactNode;\n /** Copy shown after the name, e.g. \"+2 watching\". */\n label: React.ReactNode;\n}\n\ninterface ChatEmbedBaseProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\" | \"onClick\"> {\n /** Media filling the card, typically an `img` or `video`, over a dark surface. */\n media?: React.ReactNode;\n /** Still image blurred behind `verticalMedia`, e.g. the same image or a video's poster frame. */\n mediaBackdrop?: React.ReactNode;\n /** Frame portrait media in a centred 9:16 column over `mediaBackdrop`. @default false */\n verticalMedia?: boolean;\n /** Avatar shown at the start of the profile row. */\n avatar?: AvatarProps;\n /** Primary line of the profile row: a display name or an experience title. */\n title: React.ReactNode;\n /** Secondary line under the title, e.g. a handle or \"Made by @jane_doe\". */\n subtitle?: React.ReactNode;\n /** Show the verified badge on the creator line. @default false */\n verified?: boolean;\n /** Show the EU AI-disclosure badge on the creator line. @default false */\n aiDisclosure?: boolean;\n /** Accessible label for the AI-disclosure badge. @default \"AI creator\" */\n aiDisclosureLabel?: string;\n /** Action at the end of the profile row, typically a `Button` with `variant=\"white\"` and `size=\"32\"`. */\n action?: React.ReactNode;\n /** Badge in the top-left corner, typically a {@link LiveStatus}. */\n badge?: React.ReactNode;\n /** Short category label shown as a tag after the badge, e.g. \"Game\" or \"Audio\". */\n category?: React.ReactNode;\n /** Short copy in a translucent pill in the top-right corner, e.g. \"2 hours ago\". */\n meta?: React.ReactNode;\n /** Renders the media in greyscale, e.g. once a live has ended. @default false */\n inactive?: boolean;\n}\n\ninterface ChatEmbedLinkProps {\n /** Makes the whole card a link to this URL, named by the title. */\n href: string;\n /** Where to open `href`; `\"_blank\"` adds `rel=\"noopener noreferrer\"`. */\n target?: React.HTMLAttributeAnchorTarget;\n /** Not available with `href`. */\n onOpen?: never;\n}\n\ninterface ChatEmbedButtonProps {\n /** Not available with `onOpen`. */\n href?: never;\n /** Not available with `onOpen`. */\n target?: never;\n /** Makes the whole card a button named by the title, e.g. to open a dialog. */\n onOpen?: () => void;\n}\n\ninterface ChatEmbedCreatorProps extends ChatEmbedBaseProps {\n /** Layout of the embed. @default \"creator\" */\n variant?: \"creator\";\n /** Only available on the `experience` variant. */\n socialProof?: never;\n}\n\ninterface ChatEmbedExperienceProps extends ChatEmbedBaseProps {\n /** Layout of the embed. */\n variant: \"experience\";\n /** Social proof row shown above the profile row. */\n socialProof?: ChatEmbedSocialProof;\n}\n\n/** Props for {@link ChatEmbed}. `socialProof` is only accepted on `experience`, and `href` and `onOpen` are exclusive. */\nexport type ChatEmbedProps = (ChatEmbedCreatorProps | ChatEmbedExperienceProps) &\n (ChatEmbedLinkProps | ChatEmbedButtonProps);\n\nexport interface ChatEmbedSkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Layout to match while the embed loads. @default \"creator\" */\n variant?: ChatEmbedVariant;\n /** Visually hidden text read by screen readers in place of the placeholder. @default \"Loading\" */\n label?: string;\n}\n\nexport interface ChatEmbedUnavailableProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Layout to match the embed it replaces. @default \"creator\" */\n variant?: ChatEmbedVariant;\n /** Icon shown above the message. */\n icon?: React.ReactNode;\n}\n\nconst FRAME =\n \"relative isolate flex w-full max-w-100 flex-col overflow-hidden rounded-sm after:pointer-events-none after:absolute after:inset-0 after:z-10 after:rounded-[inherit] after:border after:border-neutral-alphas-100\";\n\nconst HEIGHT: Record<ChatEmbedVariant, string> = {\n creator: \"h-40\",\n experience: \"h-[239px]\",\n};\n\nconst SCRIM_FADE =\n \"bg-linear-to-b from-transparent via-40% via-[color-mix(in_srgb,var(--color-content-always-black)_40%,transparent)] to-[color-mix(in_srgb,var(--color-content-always-black)_88%,transparent)]\";\n\nconst SCRIM_SOFT =\n \"bg-linear-to-b from-transparent via-40% via-[color-mix(in_srgb,var(--color-content-always-black)_24%,transparent)] to-[color-mix(in_srgb,var(--color-content-always-black)_40%,transparent)]\";\n\nconst PROGRESSIVE_BLUR = [\n \"backdrop-blur-[4px] [mask-image:linear-gradient(to_bottom,transparent_13%,black_42%)]\",\n \"backdrop-blur-[8px] [mask-image:linear-gradient(to_bottom,transparent_42%,black_71%)]\",\n \"backdrop-blur-[12px] [mask-image:linear-gradient(to_bottom,transparent_71%,black)]\",\n];\n\nconst MEDIA_FILL = \"*:size-full [&>img]:object-cover [&>video]:object-cover\";\n\nconst OVERLAY =\n \"absolute inset-0 z-[1] cursor-pointer rounded-[inherit] focus-visible:shadow-focus-ring focus-visible:outline-none\";\n\nconst DEFAULT_UNAVAILABLE: Record<ChatEmbedVariant, string> = {\n creator: \"This profile is no longer available\",\n experience: \"This experience is no longer available\",\n};\n\nfunction SocialProof({ avatars, name, label }: ChatEmbedSocialProof) {\n return (\n <div className=\"flex min-w-0 items-center gap-2\">\n <div className=\"flex shrink-0\">\n {avatars.map((avatar, index) => (\n <span\n // biome-ignore lint/suspicious/noArrayIndexKey: avatars can share a src and the stack never reorders\n key={index}\n className={cn(\n \"flex\",\n index < avatars.length - 1 && \"-mr-2\",\n index > 0 &&\n \"[mask-image:radial-gradient(circle_at_-4px_50%,transparent_14px,black_14.5px)]\",\n )}\n >\n <Avatar size={24} {...avatar} />\n </span>\n ))}\n </div>\n <p className=\"m-0 flex min-w-0 items-center gap-1 whitespace-nowrap text-content-always-white\">\n {name && (\n <span className=\"typography-body-small-14px-semibold max-w-30 truncate\">{name}</span>\n )}\n <span className=\"typography-body-small-14px-regular shrink-0\">{label}</span>\n </p>\n </div>\n );\n}\n\nfunction Media({\n media,\n backdrop,\n vertical,\n greyscale,\n}: {\n media?: React.ReactNode;\n backdrop?: React.ReactNode;\n vertical: boolean;\n greyscale: boolean;\n}) {\n if (!media) return null;\n\n return (\n <div className=\"pointer-events-none absolute inset-0 select-none\">\n {vertical ? (\n <>\n <div\n aria-hidden=\"true\"\n className={cn(\n \"-translate-1/2 absolute top-1/2 left-1/2 h-[709px] w-[475px] blur-[20px]\",\n MEDIA_FILL,\n )}\n >\n {backdrop}\n </div>\n <div\n className={cn(\n \"absolute inset-y-0 left-1/2 aspect-9/16 -translate-x-1/2 shadow-md\",\n MEDIA_FILL,\n )}\n >\n {media}\n </div>\n </>\n ) : (\n <div className={cn(\"absolute inset-0\", MEDIA_FILL)}>{media}</div>\n )}\n {greyscale && (\n <div className=\"absolute inset-0 bg-content-always-black mix-blend-saturation\" />\n )}\n </div>\n );\n}\n\nfunction Scrim({ experience }: { experience: boolean }) {\n return (\n <>\n {PROGRESSIVE_BLUR.map((step) => (\n <div key={step} aria-hidden=\"true\" className={cn(\"absolute inset-0\", step)} />\n ))}\n <div aria-hidden=\"true\" className={cn(\"absolute inset-0 mix-blend-luminosity\", SCRIM_FADE)} />\n {experience && (\n <div aria-hidden=\"true\" className={cn(\"absolute inset-0 mix-blend-multiply\", SCRIM_SOFT)} />\n )}\n </>\n );\n}\n\nfunction CreatorName({\n verified,\n aiDisclosure,\n aiDisclosureLabel,\n nameId,\n className,\n children,\n}: {\n verified: boolean;\n aiDisclosure: boolean;\n aiDisclosureLabel: string;\n nameId?: string;\n className: string;\n children?: React.ReactNode;\n}) {\n return (\n <div className=\"flex min-w-0 items-center gap-1\">\n <UserDisplayName\n component=\"p\"\n verified={verified}\n className={cn(\"m-0 [&>[role=img]]:ml-1 [&>span:empty+[role=img]]:ml-0\", className)}\n >\n {children && <span id={nameId}>{children}</span>}\n </UserDisplayName>\n {aiDisclosure && (\n <AiDisclosureBadge\n tone=\"light\"\n role=\"img\"\n aria-hidden={false}\n aria-label={aiDisclosureLabel}\n className=\"shrink-0\"\n />\n )}\n </div>\n );\n}\n\nfunction TopRow({\n badge,\n category,\n meta,\n}: Pick<ChatEmbedBaseProps, \"badge\" | \"category\" | \"meta\">) {\n return (\n <div className=\"relative flex items-center justify-between gap-2 px-3 pt-3\">\n <div className=\"flex min-w-0 items-center gap-1\">\n {badge}\n {category && (\n <span className=\"typography-description-12px-semibold whitespace-nowrap rounded-xs bg-buttons-always-white-default px-2 py-1 text-content-always-black\">\n {category}\n </span>\n )}\n </div>\n {meta && (\n <span className=\"typography-description-12px-semibold whitespace-nowrap rounded-full bg-background-overlay-default px-2 py-1 text-center text-content-always-white backdrop-blur-[10px]\">\n {meta}\n </span>\n )}\n </div>\n );\n}\n\nfunction OpenOverlay({\n href,\n target,\n onOpen,\n labelledBy,\n}: {\n href?: string;\n target?: React.HTMLAttributeAnchorTarget;\n onOpen?: () => void;\n labelledBy: string;\n}) {\n if (href) {\n return (\n // biome-ignore lint/a11y/useAnchorContent: Named by the visible title via aria-labelledby\n <a\n href={href}\n target={target}\n rel={target === \"_blank\" ? \"noopener noreferrer\" : undefined}\n aria-labelledby={labelledBy}\n className={OVERLAY}\n />\n );\n }\n if (!onOpen) return null;\n return <button type=\"button\" onClick={onOpen} aria-labelledby={labelledBy} className={OVERLAY} />;\n}\n\n/**\n * A card embedded in a chat thread that links out to a creator profile or a fan\n * experience such as a live stream or game. Media fills the card and the profile\n * row sits on a blurred scrim along the bottom edge.\n *\n * The `creator` variant is 160px tall and the `experience` variant 239px; both\n * fill their container up to 400px wide. Pass `href` (or `onOpen`) to make the\n * whole card clickable; the `action` stays separately clickable above it. Use\n * {@link ChatEmbedSkeleton} while the embed's data loads and\n * {@link ChatEmbedUnavailable} when the shared item no longer exists.\n *\n * Give `media` meaningful alt text when it conveys content, or `alt=\"\"` when the\n * title already describes it. When `media` is a video with `verticalMedia`, pass\n * its poster frame as `mediaBackdrop` so the video is not decoded twice.\n * `socialProof` is shown to everyone in the chat, so prefer a count over naming\n * other fans.\n *\n * @example\n * ```tsx\n * <ChatEmbed\n * variant=\"experience\"\n * href=\"https://www.fanvue.com\"\n * badge={<LiveStatus variant=\"live\" />}\n * category=\"Audio\"\n * media={<img src=\"/stream.jpg\" alt=\"\" />}\n * avatar={{ src: \"/avatar.jpg\", fallback: \"JD\" }}\n * title=\"Friday night Q&A\"\n * subtitle=\"@jane_doe\"\n * action={<Button variant=\"white\" size=\"32\">Join</Button>}\n * />\n * ```\n */\nexport const ChatEmbed = React.forwardRef<HTMLDivElement, ChatEmbedProps>(\n (\n {\n variant = \"creator\",\n media,\n mediaBackdrop,\n verticalMedia = false,\n avatar,\n title,\n subtitle,\n verified = false,\n aiDisclosure = false,\n aiDisclosureLabel = \"AI creator\",\n action,\n badge,\n category,\n meta,\n inactive = false,\n href,\n target,\n onOpen,\n socialProof,\n className,\n ...props\n },\n ref,\n ) => {\n const titleId = React.useId();\n const isExperience = variant === \"experience\";\n const hasTopRow = Boolean(badge || category || meta);\n const badges = { verified, aiDisclosure, aiDisclosureLabel };\n\n return (\n <div\n ref={ref}\n className={cn(\n FRAME,\n HEIGHT[variant],\n \"bg-content-always-black\",\n hasTopRow ? \"justify-between\" : \"justify-end\",\n className,\n )}\n {...props}\n >\n <Media\n media={media}\n backdrop={mediaBackdrop}\n vertical={verticalMedia}\n greyscale={inactive}\n />\n <OpenOverlay href={href} target={target} onOpen={onOpen} labelledBy={titleId} />\n\n {hasTopRow && <TopRow badge={badge} category={category} meta={meta} />}\n\n <div\n className={cn(\"relative flex flex-col gap-2 px-3 pb-3\", isExperience ? \"pt-6\" : \"pt-3\")}\n >\n <Scrim experience={isExperience} />\n\n {isExperience && socialProof && (\n <div className=\"relative\">\n <SocialProof {...socialProof} />\n </div>\n )}\n\n <div className={cn(\"relative flex items-center\", isExperience ? \"gap-6\" : \"gap-2\")}>\n <div className=\"flex min-w-0 flex-1 items-center gap-3\">\n {avatar && <Avatar size={40} {...avatar} />}\n <div className=\"flex min-w-0 flex-col justify-center text-content-always-white\">\n {isExperience ? (\n <>\n <p id={titleId} className=\"typography-body-default-16px-semibold m-0 truncate\">\n {title}\n </p>\n {(subtitle || verified || aiDisclosure) && (\n <CreatorName {...badges} className=\"typography-body-small-14px-regular\">\n {subtitle}\n </CreatorName>\n )}\n </>\n ) : (\n <>\n <CreatorName\n {...badges}\n nameId={titleId}\n className=\"typography-body-default-16px-semibold\"\n >\n {title}\n </CreatorName>\n {subtitle && (\n <p className=\"typography-body-small-14px-regular m-0 truncate\">{subtitle}</p>\n )}\n </>\n )}\n </div>\n </div>\n {action && <div className=\"relative z-[2] shrink-0\">{action}</div>}\n </div>\n </div>\n </div>\n );\n },\n);\n\nChatEmbed.displayName = \"ChatEmbed\";\n\n/**\n * Loading placeholder sized to match a {@link ChatEmbed}, shown while the data\n * for a shared link is being fetched.\n *\n * @example\n * ```tsx\n * <ChatEmbedSkeleton variant=\"experience\" />\n * ```\n */\nexport const ChatEmbedSkeleton = React.forwardRef<HTMLDivElement, ChatEmbedSkeletonProps>(\n ({ variant = \"creator\", label = \"Loading\", className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n aria-busy=\"true\"\n className={cn(FRAME, HEIGHT[variant], \"justify-end bg-surface-secondary\", className)}\n {...props}\n >\n <span className=\"sr-only\">{label}</span>\n <div className=\"relative flex items-center gap-3 p-3\">\n <Skeleton variant=\"circular\" width={40} height={40} className=\"shrink-0\" />\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <Skeleton width=\"50%\" height={16} />\n <Skeleton width=\"30%\" height={14} />\n </div>\n </div>\n </div>\n );\n },\n);\n\nChatEmbedSkeleton.displayName = \"ChatEmbedSkeleton\";\n\n/**\n * Placeholder sized to match a {@link ChatEmbed}, shown in place of the card when\n * the shared profile or experience has been removed, hidden or unpublished.\n * Pass `children` to localise the message.\n *\n * @example\n * ```tsx\n * <ChatEmbedUnavailable variant=\"experience\" />\n * ```\n */\nexport const ChatEmbedUnavailable = React.forwardRef<HTMLDivElement, ChatEmbedUnavailableProps>(\n ({ variant = \"creator\", icon, className, children, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n FRAME,\n HEIGHT[variant],\n \"items-center justify-center gap-2 bg-surface-secondary px-6 text-center text-content-secondary\",\n className,\n )}\n {...props}\n >\n {icon && (\n <span aria-hidden=\"true\" className=\"flex\">\n {icon}\n </span>\n )}\n <p className=\"typography-body-small-14px-regular m-0\">\n {children ?? DEFAULT_UNAVAILABLE[variant]}\n </p>\n </div>\n );\n },\n);\n\nChatEmbedUnavailable.displayName = \"ChatEmbedUnavailable\";\n"],"names":[],"mappings":";;;;;;;;AAsGA,MAAM,QACJ;AAEF,MAAM,SAA2C;AAAA,EAC/C,SAAS;AAAA,EACT,YAAY;AACd;AAEA,MAAM,aACJ;AAEF,MAAM,aACJ;AAEF,MAAM,mBAAmB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,aAAa;AAEnB,MAAM,UACJ;AAEF,MAAM,sBAAwD;AAAA,EAC5D,SAAS;AAAA,EACT,YAAY;AACd;AAEA,SAAS,YAAY,EAAE,SAAS,MAAM,SAA+B;AACnE,SACE,qBAAC,OAAA,EAAI,WAAU,mCACb,UAAA;AAAA,IAAA,oBAAC,SAAI,WAAU,iBACZ,kBAAQ,IAAI,CAAC,QAAQ,UACpB;AAAA,MAAC;AAAA,MAAA;AAAA,QAGC,WAAW;AAAA,UACT;AAAA,UACA,QAAQ,QAAQ,SAAS,KAAK;AAAA,UAC9B,QAAQ,KACN;AAAA,QAAA;AAAA,QAGJ,UAAA,oBAAC,QAAA,EAAO,MAAM,IAAK,GAAG,OAAA,CAAQ;AAAA,MAAA;AAAA,MARzB;AAAA,IAAA,CAUR,GACH;AAAA,IACA,qBAAC,KAAA,EAAE,WAAU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ACjC,qBAAC,OAAA,EAAI,WAAU,wCACb,UAAA;AAAA,YAAA,oBAAC,UAAA,EAAS,SAAQ,YAAW,OAAO,IAAI,QAAQ,IAAI,WAAU,WAAA,CAAW;AAAA,YACzE,qBAAC,OAAA,EAAI,WAAU,sCACb,UAAA;AAAA,cAAA,oBAAC,UAAA,EAAS,OAAM,OAAM,QAAQ,IAAI;AAAA,cAClC,oBAAC,UAAA,EAAS,OAAM,OAAM,QAAQ,GAAA,CAAI;AAAA,YAAA,EAAA,CACpC;AAAA,UAAA,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,kBAAkB,cAAc;AAYzB,MAAM,uBAAuB,MAAM;AAAA,EACxC,CAAC,EAAE,UAAU,WAAW,MAAM,WAAW,UAAU,GAAG,MAAA,GAAS,QAAQ;AACrE,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA,OAAO,OAAO;AAAA,UACd;AAAA,UACA;AAAA,QAAA;AAAA,QAED,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,4BACE,QAAA,EAAK,eAAY,QAAO,WAAU,QAChC,UAAA,MACH;AAAA,8BAED,KAAA,EAAE,WAAU,0CACV,UAAA,YAAY,oBAAoB,OAAO,EAAA,CAC1C;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,qBAAqB,cAAc;"}
1
+ {"version":3,"file":"ChatEmbed.mjs","sources":["../../../src/components/ChatEmbed/ChatEmbed.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { AiDisclosureBadge } from \"../AiDisclosureBadge/AiDisclosureBadge\";\nimport { Avatar, type AvatarProps } from \"../Avatar/Avatar\";\nimport { Skeleton } from \"../Skeleton/Skeleton\";\nimport { UserDisplayName } from \"../UserDisplayName/UserDisplayName\";\n\n/** Layout of the embed: a creator profile card or a fan experience card. */\nexport type ChatEmbedVariant = \"creator\" | \"experience\";\n\n/** Overlapping avatars and copy showing who else is taking part. */\nexport interface ChatEmbedSocialProof {\n /** Avatars shown in the overlapping stack, left to right. */\n avatars: AvatarProps[];\n /** Name shown in bold before the label, truncated at 120px. */\n name?: React.ReactNode;\n /** Copy shown after the name, e.g. \"+2 watching\". */\n label: React.ReactNode;\n}\n\ninterface ChatEmbedBaseProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, \"title\" | \"onClick\"> {\n /** Media filling the card, typically an `img` or `video`, over a dark surface. */\n media?: React.ReactNode;\n /** Still image blurred behind `verticalMedia`, e.g. the same image or a video's poster frame. */\n mediaBackdrop?: React.ReactNode;\n /** Frame portrait media in a centred 9:16 column over `mediaBackdrop`. @default false */\n verticalMedia?: boolean;\n /** Avatar shown at the start of the profile row. */\n avatar?: AvatarProps;\n /** Primary line of the profile row: a display name or an experience title. */\n title: React.ReactNode;\n /** Secondary line under the title, e.g. a handle or \"Made by @jane_doe\". */\n subtitle?: React.ReactNode;\n /** Show the verified badge on the creator line. @default false */\n verified?: boolean;\n /** Accessible label for the verified badge. @default \"Verified\" */\n verifiedLabel?: string;\n /** Show the EU AI-disclosure badge on the creator line. @default false */\n aiDisclosure?: boolean;\n /** Accessible label for the AI-disclosure badge. @default \"AI creator\" */\n aiDisclosureLabel?: string;\n /** Action at the end of the profile row, typically a `Button` with `variant=\"white\"` and `size=\"32\"`. */\n action?: React.ReactNode;\n /** Badge in the top-left corner, typically a {@link LiveStatus}. */\n badge?: React.ReactNode;\n /** Short category label shown as a tag after the badge, e.g. \"Game\" or \"Audio\". */\n category?: React.ReactNode;\n /** Short copy in a translucent pill in the top-right corner, e.g. \"2 hours ago\". */\n meta?: React.ReactNode;\n /** Renders the media in greyscale, e.g. once a live has ended. @default false */\n inactive?: boolean;\n}\n\ninterface ChatEmbedLinkProps {\n /** Makes the whole card a link to this URL, named by the title. */\n href: string;\n /** Where to open `href`; `\"_blank\"` adds `rel=\"noopener noreferrer\"`. */\n target?: React.HTMLAttributeAnchorTarget;\n /** Not available with `href`. */\n onOpen?: never;\n}\n\ninterface ChatEmbedButtonProps {\n /** Not available with `onOpen`. */\n href?: never;\n /** Not available with `onOpen`. */\n target?: never;\n /** Makes the whole card a button named by the title, e.g. to open a dialog. */\n onOpen?: () => void;\n}\n\ninterface ChatEmbedCreatorProps extends ChatEmbedBaseProps {\n /** Layout of the embed. @default \"creator\" */\n variant?: \"creator\";\n /** Only available on the `experience` variant. */\n socialProof?: never;\n}\n\ninterface ChatEmbedExperienceProps extends ChatEmbedBaseProps {\n /** Layout of the embed. */\n variant: \"experience\";\n /** Social proof row shown above the profile row. */\n socialProof?: ChatEmbedSocialProof;\n}\n\n/** Props for {@link ChatEmbed}. `socialProof` is only accepted on `experience`, and `href` and `onOpen` are exclusive. */\nexport type ChatEmbedProps = (ChatEmbedCreatorProps | ChatEmbedExperienceProps) &\n (ChatEmbedLinkProps | ChatEmbedButtonProps);\n\nexport interface ChatEmbedSkeletonProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Layout to match while the embed loads. @default \"creator\" */\n variant?: ChatEmbedVariant;\n /** Visually hidden text read by screen readers in place of the placeholder. @default \"Loading\" */\n label?: string;\n}\n\nexport interface ChatEmbedUnavailableProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Layout to match the embed it replaces. @default \"creator\" */\n variant?: ChatEmbedVariant;\n /** Icon shown above the message. */\n icon?: React.ReactNode;\n}\n\nconst FRAME =\n \"relative isolate flex w-full max-w-100 flex-col overflow-hidden rounded-sm after:pointer-events-none after:absolute after:inset-0 after:z-10 after:rounded-[inherit] after:border after:border-neutral-alphas-100\";\n\nconst HEIGHT: Record<ChatEmbedVariant, string> = {\n creator: \"h-40\",\n experience: \"h-[239px]\",\n};\n\nconst SCRIM_FADE =\n \"bg-linear-to-b from-transparent via-40% via-[color-mix(in_srgb,var(--color-content-always-black)_40%,transparent)] to-[color-mix(in_srgb,var(--color-content-always-black)_88%,transparent)]\";\n\nconst SCRIM_SOFT =\n \"bg-linear-to-b from-transparent via-40% via-[color-mix(in_srgb,var(--color-content-always-black)_24%,transparent)] to-[color-mix(in_srgb,var(--color-content-always-black)_40%,transparent)]\";\n\nconst PROGRESSIVE_BLUR = [\n \"backdrop-blur-[4px] [mask-image:linear-gradient(to_bottom,transparent_13%,black_42%)]\",\n \"backdrop-blur-[8px] [mask-image:linear-gradient(to_bottom,transparent_42%,black_71%)]\",\n \"backdrop-blur-[12px] [mask-image:linear-gradient(to_bottom,transparent_71%,black)]\",\n];\n\nconst MEDIA_FILL = \"*:size-full [&>img]:object-cover [&>video]:object-cover\";\n\nconst OVERLAY =\n \"absolute inset-0 z-[1] cursor-pointer rounded-[inherit] focus-visible:shadow-focus-ring focus-visible:outline-none\";\n\nconst DEFAULT_UNAVAILABLE: Record<ChatEmbedVariant, string> = {\n creator: \"This profile is no longer available\",\n experience: \"This experience is no longer available\",\n};\n\nfunction SocialProof({ avatars, name, label }: ChatEmbedSocialProof) {\n return (\n <div className=\"flex min-w-0 items-center gap-2\">\n <div className=\"flex shrink-0\">\n {avatars.map((avatar, index) => (\n <span\n // biome-ignore lint/suspicious/noArrayIndexKey: avatars can share a src and the stack never reorders\n key={index}\n className={cn(\n \"flex\",\n index < avatars.length - 1 && \"-mr-2\",\n index > 0 &&\n \"[mask-image:radial-gradient(circle_at_-4px_50%,transparent_14px,black_14.5px)]\",\n )}\n >\n <Avatar size={24} {...avatar} />\n </span>\n ))}\n </div>\n <p className=\"m-0 flex min-w-0 items-center gap-1 whitespace-nowrap text-content-always-white\">\n {name && (\n <span className=\"typography-body-small-14px-semibold max-w-30 truncate\">{name}</span>\n )}\n <span className=\"typography-body-small-14px-regular shrink-0\">{label}</span>\n </p>\n </div>\n );\n}\n\nfunction Media({\n media,\n backdrop,\n vertical,\n greyscale,\n}: {\n media?: React.ReactNode;\n backdrop?: React.ReactNode;\n vertical: boolean;\n greyscale: boolean;\n}) {\n if (!media) return null;\n\n return (\n <div className=\"pointer-events-none absolute inset-0 select-none\">\n {vertical ? (\n <>\n <div\n aria-hidden=\"true\"\n className={cn(\n \"-translate-1/2 absolute top-1/2 left-1/2 h-[709px] w-[475px] blur-[20px]\",\n MEDIA_FILL,\n )}\n >\n {backdrop}\n </div>\n <div\n className={cn(\n \"absolute inset-y-0 left-1/2 aspect-9/16 -translate-x-1/2 shadow-md\",\n MEDIA_FILL,\n )}\n >\n {media}\n </div>\n </>\n ) : (\n <div className={cn(\"absolute inset-0\", MEDIA_FILL)}>{media}</div>\n )}\n {greyscale && (\n <div className=\"absolute inset-0 bg-content-always-black mix-blend-saturation\" />\n )}\n </div>\n );\n}\n\nfunction Scrim({ experience }: { experience: boolean }) {\n return (\n <>\n {PROGRESSIVE_BLUR.map((step) => (\n <div key={step} aria-hidden=\"true\" className={cn(\"absolute inset-0\", step)} />\n ))}\n <div aria-hidden=\"true\" className={cn(\"absolute inset-0 mix-blend-luminosity\", SCRIM_FADE)} />\n {experience && (\n <div aria-hidden=\"true\" className={cn(\"absolute inset-0 mix-blend-multiply\", SCRIM_SOFT)} />\n )}\n </>\n );\n}\n\nfunction CreatorName({\n verified,\n verifiedLabel,\n aiDisclosure,\n aiDisclosureLabel,\n nameId,\n className,\n children,\n}: {\n verified: boolean;\n verifiedLabel: string;\n aiDisclosure: boolean;\n aiDisclosureLabel: string;\n nameId?: string;\n className: string;\n children?: React.ReactNode;\n}) {\n return (\n <div className=\"flex min-w-0 items-center gap-1\">\n <UserDisplayName\n component=\"p\"\n verified={verified}\n verifiedLabel={verifiedLabel}\n className={cn(\"m-0 [&>[role=img]]:ml-1 [&>span:empty+[role=img]]:ml-0\", className)}\n >\n {children && <span id={nameId}>{children}</span>}\n </UserDisplayName>\n {aiDisclosure && (\n <AiDisclosureBadge\n tone=\"light\"\n role=\"img\"\n aria-hidden={false}\n aria-label={aiDisclosureLabel}\n className=\"shrink-0\"\n />\n )}\n </div>\n );\n}\n\nfunction TopRow({\n badge,\n category,\n meta,\n}: Pick<ChatEmbedBaseProps, \"badge\" | \"category\" | \"meta\">) {\n return (\n <div className=\"relative flex items-center justify-between gap-2 px-3 pt-3\">\n <div className=\"flex min-w-0 items-center gap-1\">\n {badge}\n {category && (\n <span className=\"typography-description-12px-semibold whitespace-nowrap rounded-xs bg-buttons-always-white-default px-2 py-1 text-content-always-black\">\n {category}\n </span>\n )}\n </div>\n {meta && (\n <span className=\"typography-description-12px-semibold whitespace-nowrap rounded-full bg-background-overlay-default px-2 py-1 text-center text-content-always-white backdrop-blur-[10px]\">\n {meta}\n </span>\n )}\n </div>\n );\n}\n\nfunction OpenOverlay({\n href,\n target,\n onOpen,\n labelledBy,\n}: {\n href?: string;\n target?: React.HTMLAttributeAnchorTarget;\n onOpen?: () => void;\n labelledBy: string;\n}) {\n if (href) {\n return (\n // biome-ignore lint/a11y/useAnchorContent: Named by the visible title via aria-labelledby\n <a\n href={href}\n target={target}\n rel={target === \"_blank\" ? \"noopener noreferrer\" : undefined}\n aria-labelledby={labelledBy}\n className={OVERLAY}\n />\n );\n }\n if (!onOpen) return null;\n return <button type=\"button\" onClick={onOpen} aria-labelledby={labelledBy} className={OVERLAY} />;\n}\n\n/**\n * A card embedded in a chat thread that links out to a creator profile or a fan\n * experience such as a live stream or game. Media fills the card and the profile\n * row sits on a blurred scrim along the bottom edge.\n *\n * The `creator` variant is 160px tall and the `experience` variant 239px; both\n * fill their container up to 400px wide. Pass `href` (or `onOpen`) to make the\n * whole card clickable; the `action` stays separately clickable above it. Use\n * {@link ChatEmbedSkeleton} while the embed's data loads and\n * {@link ChatEmbedUnavailable} when the shared item no longer exists.\n *\n * Give `media` meaningful alt text when it conveys content, or `alt=\"\"` when the\n * title already describes it. When `media` is a video with `verticalMedia`, pass\n * its poster frame as `mediaBackdrop` so the video is not decoded twice.\n * `socialProof` is shown to everyone in the chat, so prefer a count over naming\n * other fans.\n *\n * @example\n * ```tsx\n * <ChatEmbed\n * variant=\"experience\"\n * href=\"https://www.fanvue.com\"\n * badge={<LiveStatus variant=\"live\" />}\n * category=\"Audio\"\n * media={<img src=\"/stream.jpg\" alt=\"\" />}\n * avatar={{ src: \"/avatar.jpg\", fallback: \"JD\" }}\n * title=\"Friday night Q&A\"\n * subtitle=\"@jane_doe\"\n * action={<Button variant=\"white\" size=\"32\">Join</Button>}\n * />\n * ```\n */\nexport const ChatEmbed = React.forwardRef<HTMLDivElement, ChatEmbedProps>(\n (\n {\n variant = \"creator\",\n media,\n mediaBackdrop,\n verticalMedia = false,\n avatar,\n title,\n subtitle,\n verified = false,\n verifiedLabel = \"Verified\",\n aiDisclosure = false,\n aiDisclosureLabel = \"AI creator\",\n action,\n badge,\n category,\n meta,\n inactive = false,\n href,\n target,\n onOpen,\n socialProof,\n className,\n ...props\n },\n ref,\n ) => {\n const titleId = React.useId();\n const isExperience = variant === \"experience\";\n const hasTopRow = Boolean(badge || category || meta);\n const badges = { verified, verifiedLabel, aiDisclosure, aiDisclosureLabel };\n\n return (\n <div\n ref={ref}\n className={cn(\n FRAME,\n HEIGHT[variant],\n \"bg-content-always-black\",\n hasTopRow ? \"justify-between\" : \"justify-end\",\n className,\n )}\n {...props}\n >\n <Media\n media={media}\n backdrop={mediaBackdrop}\n vertical={verticalMedia}\n greyscale={inactive}\n />\n <OpenOverlay href={href} target={target} onOpen={onOpen} labelledBy={titleId} />\n\n {hasTopRow && <TopRow badge={badge} category={category} meta={meta} />}\n\n <div\n className={cn(\"relative flex flex-col gap-2 px-3 pb-3\", isExperience ? \"pt-6\" : \"pt-3\")}\n >\n <Scrim experience={isExperience} />\n\n {isExperience && socialProof && (\n <div className=\"relative\">\n <SocialProof {...socialProof} />\n </div>\n )}\n\n <div className={cn(\"relative flex items-center\", isExperience ? \"gap-6\" : \"gap-2\")}>\n <div className=\"flex min-w-0 flex-1 items-center gap-3\">\n {avatar && <Avatar size={40} {...avatar} />}\n <div className=\"flex min-w-0 flex-col justify-center text-content-always-white\">\n {isExperience ? (\n <>\n <p id={titleId} className=\"typography-body-default-16px-semibold m-0 truncate\">\n {title}\n </p>\n {(subtitle || verified || aiDisclosure) && (\n <CreatorName {...badges} className=\"typography-body-small-14px-regular\">\n {subtitle}\n </CreatorName>\n )}\n </>\n ) : (\n <>\n <CreatorName\n {...badges}\n nameId={titleId}\n className=\"typography-body-default-16px-semibold\"\n >\n {title}\n </CreatorName>\n {subtitle && (\n <p className=\"typography-body-small-14px-regular m-0 truncate\">{subtitle}</p>\n )}\n </>\n )}\n </div>\n </div>\n {action && <div className=\"relative z-[2] shrink-0\">{action}</div>}\n </div>\n </div>\n </div>\n );\n },\n);\n\nChatEmbed.displayName = \"ChatEmbed\";\n\n/**\n * Loading placeholder sized to match a {@link ChatEmbed}, shown while the data\n * for a shared link is being fetched.\n *\n * @example\n * ```tsx\n * <ChatEmbedSkeleton variant=\"experience\" />\n * ```\n */\nexport const ChatEmbedSkeleton = React.forwardRef<HTMLDivElement, ChatEmbedSkeletonProps>(\n ({ variant = \"creator\", label = \"Loading\", className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n aria-busy=\"true\"\n className={cn(FRAME, HEIGHT[variant], \"justify-end bg-surface-secondary\", className)}\n {...props}\n >\n <span className=\"sr-only\">{label}</span>\n <div className=\"relative flex items-center gap-3 p-3\">\n <Skeleton variant=\"circular\" width={40} height={40} className=\"shrink-0\" />\n <div className=\"flex min-w-0 flex-1 flex-col gap-1\">\n <Skeleton width=\"50%\" height={16} />\n <Skeleton width=\"30%\" height={14} />\n </div>\n </div>\n </div>\n );\n },\n);\n\nChatEmbedSkeleton.displayName = \"ChatEmbedSkeleton\";\n\n/**\n * Placeholder sized to match a {@link ChatEmbed}, shown in place of the card when\n * the shared profile or experience has been removed, hidden or unpublished.\n * Pass `children` to localise the message.\n *\n * @example\n * ```tsx\n * <ChatEmbedUnavailable variant=\"experience\" />\n * ```\n */\nexport const ChatEmbedUnavailable = React.forwardRef<HTMLDivElement, ChatEmbedUnavailableProps>(\n ({ variant = \"creator\", icon, className, children, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n FRAME,\n HEIGHT[variant],\n \"items-center justify-center gap-2 bg-surface-secondary px-6 text-center text-content-secondary\",\n className,\n )}\n {...props}\n >\n {icon && (\n <span aria-hidden=\"true\" className=\"flex\">\n {icon}\n </span>\n )}\n <p className=\"typography-body-small-14px-regular m-0\">\n {children ?? DEFAULT_UNAVAILABLE[variant]}\n </p>\n </div>\n );\n },\n);\n\nChatEmbedUnavailable.displayName = \"ChatEmbedUnavailable\";\n"],"names":[],"mappings":";;;;;;;;AAwGA,MAAM,QACJ;AAEF,MAAM,SAA2C;AAAA,EAC/C,SAAS;AAAA,EACT,YAAY;AACd;AAEA,MAAM,aACJ;AAEF,MAAM,aACJ;AAEF,MAAM,mBAAmB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,aAAa;AAEnB,MAAM,UACJ;AAEF,MAAM,sBAAwD;AAAA,EAC5D,SAAS;AAAA,EACT,YAAY;AACd;AAEA,SAAS,YAAY,EAAE,SAAS,MAAM,SAA+B;AACnE,SACE,qBAAC,OAAA,EAAI,WAAU,mCACb,UAAA;AAAA,IAAA,oBAAC,SAAI,WAAU,iBACZ,kBAAQ,IAAI,CAAC,QAAQ,UACpB;AAAA,MAAC;AAAA,MAAA;AAAA,QAGC,WAAW;AAAA,UACT;AAAA,UACA,QAAQ,QAAQ,SAAS,KAAK;AAAA,UAC9B,QAAQ,KACN;AAAA,QAAA;AAAA,QAGJ,UAAA,oBAAC,QAAA,EAAO,MAAM,IAAK,GAAG,OAAA,CAAQ;AAAA,MAAA;AAAA,MARzB;AAAA,IAAA,CAUR,GACH;AAAA,IACA,qBAAC,KAAA,EAAE,WAAU,mFACV,UAAA;AAAA,MAAA,QACC,oBAAC,QAAA,EAAK,WAAU,yDAAyD,UAAA,MAAK;AAAA,MAEhF,oBAAC,QAAA,EAAK,WAAU,+CAA+C,UAAA,MAAA,CAAM;AAAA,IAAA,EAAA,CACvE;AAAA,EAAA,GACF;AAEJ;AAEA,SAAS,MAAM;AAA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AU,sCACb,UAAA;AAAA,cAAA,oBAAC,UAAA,EAAS,OAAM,OAAM,QAAQ,IAAI;AAAA,cAClC,oBAAC,UAAA,EAAS,OAAM,OAAM,QAAQ,GAAA,CAAI;AAAA,YAAA,EAAA,CACpC;AAAA,UAAA,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,kBAAkB,cAAc;AAYzB,MAAM,uBAAuB,MAAM;AAAA,EACxC,CAAC,EAAE,UAAU,WAAW,MAAM,WAAW,UAAU,GAAG,MAAA,GAAS,QAAQ;AACrE,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA,OAAO,OAAO;AAAA,UACd;AAAA,UACA;AAAA,QAAA;AAAA,QAED,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,4BACE,QAAA,EAAK,eAAY,QAAO,WAAU,QAChC,UAAA,MACH;AAAA,8BAED,KAAA,EAAE,WAAU,0CACV,UAAA,YAAY,oBAAoB,OAAO,EAAA,CAC1C;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEA,qBAAqB,cAAc;"}
package/dist/index.d.ts CHANGED
@@ -1508,6 +1508,8 @@ declare interface ChatEmbedBaseProps extends Omit<React_2.HTMLAttributes<HTMLDiv
1508
1508
  subtitle?: React_2.ReactNode;
1509
1509
  /** Show the verified badge on the creator line. @default false */
1510
1510
  verified?: boolean;
1511
+ /** Accessible label for the verified badge. @default "Verified" */
1512
+ verifiedLabel?: string;
1511
1513
  /** Show the EU AI-disclosure badge on the creator line. @default false */
1512
1514
  aiDisclosure?: boolean;
1513
1515
  /** Accessible label for the AI-disclosure badge. @default "AI creator" */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fanvue/ui",
3
- "version": "3.38.0",
3
+ "version": "3.39.0",
4
4
  "description": "React component library built with Tailwind CSS for Fanvue ecosystem",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org",