weasel API - v0.8.0
    Preparing search index...

    Type Alias TargetSpec

    TargetSpec:
        | "empty"
        | "selected-body"
        | "unselected-body"
        | `kind:${string}`
        | `kind:${string}:selected`
        | `affordance:${string}`
        | { kindOf: (hit: unknown, bodyTarget?: string) => boolean }

    Target selector for click and drag gesture specs. String forms are sugar for the kit-owned object-kind registry (TODO.md Tier 1 follow-up); until that ships, consumers can pass { kindOf: predicate } to classify hits themselves.

    Type Declaration

    • "empty"
    • "selected-body"
    • "unselected-body"
    • `kind:${string}`
    • `kind:${string}:selected`
    • `affordance:${string}`
    • { kindOf: (hit: unknown, bodyTarget?: string) => boolean }
      • kindOf: (hit: unknown, bodyTarget?: string) => boolean

        Predicate. hit is the raw target (affordance for drag, e.target otherwise); bodyTarget is the optional body-class string ('empty' | 'selected-body' | 'unselected-body') when classifyTarget is wired. Predicates that only need one of the two can ignore the other.