{
  "componentId": "shadcn:MessageScroller",
  "projectionState": "actual-normal-entry-source-SSR",
  "sourceRule": "MessageScrollerProvider is headless, with autoScroll=false default, defaultScrollPosition=end, scrollEdgeThreshold8px, previous-item peek64px, scrollMargin0. Root is div; actual Viewport defaults named region Messages, tabIndex0. Content defaults role=log/aria-relevant=additions; reference supplies transcript name and speaker text. Item is div with stable messageId and optional scrollAnchor=false; every direct content row is an Item, including separators/loading rows if supplied. Stable IDs—not array index or text—drive command targets, visibility and prepend preservation. Viewport preserveScrollOnPrepend defaults true. Initial default position applies once on first nonempty render (start|end|last-anchor), pending-scroll marks initial layout until applied. With autoScroll true, new content follows only while already following the bottom; deliberate wheel/touch/viewport scroll keys release follow, and readers away from end are not pulled down. Native geometry and Resize/Mutation/Intersection observers derive edges, anchor positioning and visibility; internal modes following-bottom/free-scrolling/anchored-to-message/settling-jump are not public controlled props. Anchored turns reserve a hidden accessibility spacer as needed. useMessageScroller returns scrollToMessage/scrollToStart/scrollToEnd with optional align/behavior/scrollMargin; commands return false when viewport/eligible target unavailable and may defer a known target until mounted. useMessageScrollerScrollable exposes start/end overflow booleans, useMessageScrollerVisibility exposes currentAnchorId and visibleMessageIds using lazily subscribed observers. These are hook snapshots, not fabricated change events. Button defaults direction=end, behavior=smooth, native type=button and readable source label; inactive button is inert/tabIndex-1. Active Button invokes onClick first, preventDefault vetoes command; accepted command blurs button then uses the real scroll command. Viewport onScroll syncs actual geometry before caller onScroll; wheel/touch/key user intent is observed before caller callbacks, so preventDefault there is not an invented undo of source intent.",
  "keyboardAndFocus": "Named viewport is natively focusable; Home/End/Page/arrow/Space scroll according to browser and release auto-follow intent. Scroll changes do not imply a selected message, move keyboard focus to a message, or announce every streamed token. Native scroll buttons support Enter/Space only while active, have meaningful names and preserve caller cancellation. The source intentionally blurs accepted scroll buttons; reference does not claim a focus trap or automatic focus return. Escape is passive. Essential speaker attribution/text remains readable; role=log additions is the source policy, and repeated complete-text rerenders must not become the only task status. Loading/network errors are caller feedback, not scroll state.",
  "referenceDecision": "Reference has14 stable report message IDs, an explicit turn anchor, autoScroll=true and opening=end. Named log/region and speaker text are caller composition. Append/prepend actions only change local arrays, jump uses actual hook; no AI/backend transport is implied. A constrained viewport and measurable row heights are validation geometry, not replacement native FIG styling. No message selection API, generic ARIA grid or invented source position event is added.",
  "protocol": "SCXML observes actual public callbacks and delegates native/source effects, retaining original event/updater identity. SOURCE_GEOMETRY/STATUS and _effect.* are internal reference observations/work, never new DOM events or public props. Independent item/answer, geometry/focus, and table feature authorities are not collapsed into one fake value. HTML comes from the exact normal-entry reference composition using pinned runtime packages; client registrations/observer effects are separately browser tested.",
  "semanticParts": {
    "provider": {
      "kind": "controller",
      "description": "Headless primitive context/observers; no fake provider DOM."
    },
    "commands": {
      "kind": "controller",
      "description": "Real native scroll command hook; no output element or fabricated callback."
    },
    "scrollable": {
      "kind": "controller",
      "description": "Source start/end edge snapshot subscription."
    },
    "visibility": {
      "kind": "controller",
      "description": "Source currentAnchorId/visibleMessageIds observer snapshot."
    },
    "root": {
      "kind": "element",
      "selector": "[data-slot=\"message-scroller\"]",
      "description": "Bounded relative scroll region container"
    },
    "viewport": {
      "kind": "element",
      "selector": "[data-slot=\"message-scroller-viewport\"]",
      "description": "Native focusable named scroll viewport"
    },
    "content": {
      "kind": "element",
      "selector": "[data-slot=\"message-scroller-content\"]",
      "description": "Actual named log content"
    },
    "item": {
      "kind": "element",
      "selector": "[data-slot=\"message-scroller-item\"]",
      "description": "Stable messageId row; optional turn anchor"
    },
    "spacer": {
      "kind": "element",
      "selector": "[data-message-scroller-spacer]",
      "description": "Private accessibility-hidden primitive measured anchor spacer"
    },
    "button-label": {
      "kind": "element",
      "selector": "[data-slot=\"message-scroller-button\"]>.sr-only",
      "description": "Visually hidden source button name; standalone component owns the hiding rule"
    },
    "button": {
      "kind": "element",
      "selector": "[data-slot=\"message-scroller-button\"]",
      "description": "Native active/inert command button; source Button rendered adapter"
    }
  },
  "visualStateMapping": {
    "pending": {
      "source": "initial geometry state",
      "attribute": "data-pending-scroll"
    },
    "active": {
      "source": "actual overflow edge",
      "attribute": "data-active=true|false"
    },
    "direction": {
      "source": "Button.direction",
      "values": [
        "start",
        "end"
      ]
    },
    "anchor": {
      "source": "Item.scrollAnchor",
      "attribute": "data-scroll-anchor=true|false"
    }
  }
}
