entviz — @entviz/core & @entviz/react API
    Preparing search index...

    Interface EntvizCompareProps

    interface EntvizCompareProps {
        allow?: {
            drop?: boolean;
            file?: boolean;
            paste?: boolean;
            url?: boolean;
        };
        className?: string;
        confidence?: "strong"
        | "quick"
        | "paranoid";
        fetchReference?: (
            url: string,
            ctx: { origin: string; signal: AbortSignal },
        ) => Promise<{ text: string } | { blob: Blob }>;
        fontSizePt?: number;
        includeContent?: boolean;
        layout?: EntvizLayout;
        locale?: string;
        messages?: Partial<CompareMessages>;
        note?: string | null;
        onEvent?: (e: EntvizEvent) => void;
        onVerdict?: (v: Verdict) => void;
        reference?: { data: string; kind: "text" | "svg" };
        rng?: () => number;
        style?: CSSProperties;
        targetAr?: number;
        value: string;
    }
    Index
    allow?: { drop?: boolean; file?: boolean; paste?: boolean; url?: boolean }

    ALLOWLIST-CLOSED, restrict-only. When ABSENT, all four acquisition methods are ON (today's behavior). When PRESENT, a method is enabled ONLY if its key is exactly true; any missing/false/undefined key is OFF. So allow={{paste:true}} disables file, url, and drop. This is a light DLP / host-policy convenience (least acquisition surface) — NOT the primary asset (secret.detected-style hygiene). NEVER allow.x ?? true: that would leave a method live when the host thought it locked it down.

    className?: string
    confidence?: "strong" | "quick" | "paranoid"

    Reserved for the deferred guided walk; accepted but unused in M1a/M1b.

    fetchReference?: (
        url: string,
        ctx: { origin: string; signal: AbortSignal },
    ) => Promise<{ text: string } | { blob: Blob }>

    Host-injected URL fetcher (proxy/auth/CORS/tests). When provided, the URL path calls THIS instead of the built-in fetch. Integrity guard (§4/§5.8): the returned bytes are attacker-authorable and flow through the SAME classifyResult/compareSvg §6.2 gauntlet as pasted bytes — the fetcher supplies BYTES, never a verdict, and cannot mark a reference identical. { text } sets text/svg content; { blob } is read to a data URL (raster).

    fontSizePt?: number
    includeContent?: boolean

    A light convenience: when true, reference.acquired carries content (the raw reference bytes). OFF by default so a pasted-secret corner case isn't ambiently logged. Confidentiality is OUT of scope — values are public — so this is hygiene, not a security firewall; nothing else is gated on it.

    layout?: EntvizLayout

    Panel arrangement: "side-by-side" (default — the two figures sit next to each other so a comparison is a saccade, not a scroll), "stacked" (one above the other), or "auto" (side-by-side, wrapping to stacked when too narrow).

    locale?: string
    messages?: Partial<CompareMessages>
    note?: string | null
    onEvent?: (e: EntvizEvent) => void

    The typed event firehose (see events.ts). Notify-only, in addition to the specific callbacks; only fetch.start is advisory-cancelable.

    onVerdict?: (v: Verdict) => void
    reference?: { data: string; kind: "text" | "svg" }
    rng?: () => number

    A [0,1) source for the unpredictable check ORDER, threaded down to the / this launches — the platform CSPRNG by default; a seeded source in tests/repro demos. PROD GATE (§5.4): each child re-gates via safeRng, so a prod bundle always uses the platform CSPRNG regardless of an injected rng and a predictable order can't be shipped.

    style?: CSSProperties
    targetAr?: number
    value: string