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

    Interface EntvizPillProps

    interface EntvizPillProps {
        className?: string;
        corner?: "round" | "sharp" | "leaf";
        dir?: "auto" | "ltr" | "rtl";
        fontSizePt?: number;
        highlight?: boolean;
        label?: string;
        locale?: string;
        maxWidth?: string | number;
        messages?: Partial<Messages>;
        note?: string | null;
        onCompare?: () => void;
        onCopy?: (kind: CopyKind) => void;
        onError?: (message: string) => void;
        onEvent?: (e: EntvizEvent) => void;
        onExpand?: () => void;
        onLocate?: () => void;
        onOpenChange?: (open: boolean) => void;
        open?: boolean;
        showCompareAffordance?: boolean;
        showLocateAffordance?: boolean;
        style?: CSSProperties;
        targetAr?: number;
        trust?: TrustAssumption;
        typeSignal?: "text" | "none" | "icon" | "autoCombo";
        value: string;
    }
    Index
    className?: string
    corner?: "round" | "sharp" | "leaf"

    Corner-shape (this.i gk37dm5n): an explicit, optional pill corner style (round · sharp · leaf). Corners are no longer derived from the value's type — the trailing role icon carries that cue. Defaults to the themeable round.

    dir?: "auto" | "ltr" | "rtl"

    Chrome writing direction. "auto" (default) follows the locale's script.

    fontSizePt?: number
    highlight?: boolean

    Persistently highlight this pill (e.g. to mark 3 of 10 on a page) WITHOUT hover or focus. Draws a ring via box-shadow, so it coexists with the hover/focus outline; color/width are set by --entviz-pill-highlight (a full box-shadow value; default a 2px currentColor mix). Host-driven, not derived from the value.

    label?: string

    First-party custom text shown after the type (host-set, trusted — unlike the note).

    locale?: string
    maxWidth?: string | number
    messages?: Partial<Messages>
    note?: string | null
    onCompare?: () => void

    Called when the user enters the compare state from the expanded popover. Providing it opts the pill into the in-popover "Compare against a reference…" affordance; the pill then renders in place, so recognition → verification stays a deliberate, reference-requiring act (design Seam 2).

    onCopy?: (kind: CopyKind) => void
    onError?: (message: string) => void
    onEvent?: (e: EntvizEvent) => void

    The typed event firehose (see events.ts). Notify-only, in addition to the specific callbacks (disclosure.change / copy / render.error).

    onExpand?: () => void
    onLocate?: () => void

    Called when the user asks to LOCATE this value's other occurrences in the host's own corpus (e.g. "highlight every pill with this value"). Providing it opts the pill into the in-popover "Find other occurrences…" affordance. This is the honest in-corpus companion to the recognition aids — a RECOGNITION act, never an equality verdict (that stays behind onCompare / the reference-requiring compare flow). The pill holds no knowledge of the corpus, so it only surfaces the affordance and fires the hook; finding + revealing the occurrences is the host's job.

    onOpenChange?: (open: boolean) => void

    Called on every open/close transition with the NEXT open state. Under controlled open this is how the pill asks the host to change state; when uncontrolled it is a notification alongside the internal state flip.

    open?: boolean

    Controlled disclosure of the popover's open/closed state (proposal §3, §5.3). When PROVIDED, the popover follows this prop (controlled): the pill's own open/collapse actions call onOpenChange(next) instead of only flipping internal state. When ABSENT, the popover is uncontrolled (today's behavior), and onOpenChange still fires on every open/close TRANSITION. SECURITY (§5.3): controlling open does NOT suppress the provenance chrome or the §2.4 scoping copy — those live inside (the pill's compare state) and are structurally always-rendered, so controlled open can't skip the reference gate. open === true maps to the VISUALIZE state (never straight to a verdict); entering compare stays a deliberate, reference-requiring act.

    showCompareAffordance?: boolean

    Show the in-popover compare affordance (default true when onCompare is set). Lets a host keep the onCompare hook but suppress the built-in button.

    showLocateAffordance?: boolean

    Show the in-popover locate affordance (default true when onLocate is set). Lets a host keep the onLocate hook but suppress the built-in button.

    style?: CSSProperties
    targetAr?: number

    The value's trust posture (this.i ujdwjtex) — a shareable, host-declared object that gates the value-derived channels. Absent, or posture:"wild", keeps them all OFF (the default, maximum-safety wild posture). posture:"corpus" opts a same-origin, already-trusted set of values into the recognition affordances it enables (e.g. mnemonic). NEVER expose changing this to the end user.

    typeSignal?: "text" | "none" | "icon" | "autoCombo"

    How to signal the value's type:

    • autoCombo (default): the trailing role icon, plus the type text ("cesr key") only when there's no label/mnemonic — so a pill is never empty.
    • icon: just the role icon (never the redundant type word).
    • text: just the parser-derived type text.
    • none: neither. Independent of label, which still shows either way.
    value: string