Files
agency/.pnpm-store/v3/files/99/37fa123ece04dad3b87fa2abc71a03c76c2fa5ba5ebfdb5ea31f4b1dbac184f4ed167121fcc8390b9554a15b03b381ee3c1781c6231dc8009b08041727c7e8
hanzo-agent 5af6960b87 run project
Run: sess_f37640604ae254cb4d11dc6217f7b721
2026-09-30 00:04:56 +00:00

56 lines
2.3 KiB
Plaintext

import { PointValues } from './client';
export type SharePlatformId = 'webshare' | 'email' | 'x' | 'linkedin' | 'facebook' | 'reddit' | 'telegram' | 'whatsapp' | 'sms' | 'copy';
export interface ShareTarget {
id: SharePlatformId | string;
label: string;
/** Points awarded for this action. If undefined, falls back to pointValues.SHARE. */
points?: number;
/**
* Returns a URL to open, OR `null` to skip the navigation (e.g. for copy /
* webshare which do their own thing in `onClick`).
*/
href: (ctx: ShareContext) => string | null;
/** Optional custom click handler — runs INSTEAD of href navigation. */
onClick?: (ctx: ShareContext) => void | Promise<void>;
}
export interface ShareContext {
url: string;
text: string;
rank: number;
refCode: string;
}
export interface WaitlistShareProps {
/** Slug of the waitlist (needed for track-share calls). */
waitlist: string;
/** The viewer's referral code (server credits points to this code). */
refCode: string;
/** Full share URL (typically the host page with `?ref=<code>` appended). */
shareUrl: string;
/** Optional viewer rank — used in default share text. */
rank?: number;
/** Optional total — used in default share text. */
total?: number;
/**
* Override the share message. Receives the same ctx as href functions.
* Default: `I'm #N on the waitlist. Join me:`
*/
message?: (ctx: ShareContext) => string;
/**
* Restrict / reorder targets. Pass an array of platform IDs from the
* built-in set, OR a full ShareTarget for custom platforms. Defaults to
* the full built-in roster.
*/
shareTargets?: Array<SharePlatformId | ShareTarget>;
/**
* Override the server's published point values for display only. The
* actual point award still happens server-side per pointValues; this is
* for showing custom labels.
*/
pointValues?: Partial<PointValues>;
/** Base server URL. Defaults to current origin. */
baseUrl?: string;
/** Callback after a successful track-share (or copy). */
onShared?: (platform: string, awarded: number, alreadyClaimed: boolean) => void;
}
export declare function WaitlistShare(props: WaitlistShareProps): import("react").JSX.Element;