Member Junction
    Preparing search index...

    LIVE WHITEBOARD host (mj-realtime-whiteboard-host): board header (title / saved chip / ownership legend / "What [Agent] sees" popover / Focus toggle), the board surface with its floating toolbar + zoom cluster, the agent action toast with Undo, and the status footer — everything EXCEPT the overlay/tab chrome, which the session shell owns.

    Integration contract:

    • State is created by the integration layer (channel state of record) and passed in;
    • SceneDelta emits the debounced (750 ms), coalesced scene-delta JSON on user changes — the perception feed the integration pipes into the live agent context;
    • ApplyAgentTool(toolName, argsJson) executes one agent channel tool (Whiteboard_AddNote … see WHITEBOARD_TOOL_DEFINITIONS) with the violet pop-in, toast and presence-cursor garnish, returning the result JSON for the tool round-trip;
    • AgentUndo fires when the user clicks Undo on the agent-action toast;
    • FocusModeChange asks the shell to collapse/restore the call rail ("Focus board").

    Extensibility (before/after events): the host mirrors the engine's cancelable BEFORE / AFTER mutation pairs as outputs (ItemAdding/ItemAdded, ItemUpdating/ItemUpdated, ItemRemoving/ItemRemoved) and forwards the board's editor + widget pairs (ContentApplying/ContentApplied, WidgetSubmitting/WidgetSubmitted). All BEFORE events honor Cancel = true set synchronously by a handler.

    Implements

    • OnInit
    • OnDestroy
    Index

    Constructors

    Properties

    AgentName: string = 'Agent'

    Display name of the session's agent (legend, chips, popover, toast).

    AgentPresence: WhiteboardAgentPresence = null
    AgentUndo: EventEmitter<void> = ...

    The user clicked Undo on the agent-action toast (the undo itself already applied).

    BoardTitle: string = 'Whiteboard'

    Board title shown in the header.

    ContentApplied: EventEmitter<WhiteboardContentAppliedEventArgs> = ...

    AFTER event (forwarded from the board): an editor commit applied.

    ContentApplying: EventEmitter<WhiteboardContentApplyingEventArgs> = ...

    Cancelable BEFORE event (forwarded from the board): an in-board editor commit is about to write to the state engine. Set Cancel = true synchronously to discard it.

    ExportOpen: boolean = false
    FocusMode: boolean = false
    FocusModeChange: EventEmitter<boolean> = ...

    Focus-board toggle — the session shell collapses/restores the call rail.

    ItemAdded: EventEmitter<WhiteboardItemAddedEventArgs> = ...

    AFTER mirror of WhiteboardState.ItemAdded$.

    ItemAdding: EventEmitter<WhiteboardItemAddingEventArgs> = ...

    Cancelable BEFORE mirror of WhiteboardState.ItemAdding$.

    ItemRemoved: EventEmitter<WhiteboardItemRemovedEventArgs> = ...
    ItemRemoving: EventEmitter<WhiteboardItemRemovingEventArgs> = ...

    Cancelable BEFORE mirror of WhiteboardState.ItemRemoving$.

    ItemUpdated: EventEmitter<WhiteboardItemUpdatedEventArgs> = ...
    ItemUpdating: EventEmitter<WhiteboardItemUpdatingEventArgs> = ...

    Cancelable BEFORE mirror of WhiteboardState.ItemUpdating$ (update / move / reorder).

    LastDeltaJson: string = ''
    NowTick: number = ...
    PenColor: string = ...
    PenWidth: number = 4
    SavedLabel: string = 'Saved to session'

    Persistence chip text (e.g. "Saved to session · v14").

    SaveToArtifactsRequested: EventEmitter<void> = ...

    Emitted when the user picks "Save to artifacts" — the channel plugin persists via its host context.

    SceneDelta: EventEmitter<string> = ...

    Debounced (750 ms), coalesced scene-delta JSON — the live perception feed.

    SeesOpen: boolean = false
    ShapeKind: "rect" | "ellipse" | "diamond" = 'rect'

    Shared board state engine, owned by the integration layer.

    TextBold: boolean = true
    TextColor: string = null
    TextFamily: WhiteboardFontFamily = 'sans'
    TextSize: number = 12
    ToastText: string = null
    Tool: WhiteboardTool = 'select'
    WidgetInteraction: EventEmitter<WhiteboardWidgetInteractionEvent> = ...

    AMBIENT widget telemetry (forwarded from the board): the injected recorder observed passive form activity (clicks / changes / typing / focus) inside a sandboxed HTML widget, validated + pre-summarized. Integration layers forward it to their agent runtime as throttled, low-priority background context — e.g. MJ's channel plugin sends an "ambient activity" [whiteboard] note at most once per widget per few seconds.

    WidgetSubmitted: EventEmitter<WhiteboardWidgetSubmitEvent> = ...

    AFTER event: a sandboxed HTML widget submitted user input via MJWhiteboard.submit (validated + size-capped by the board, not canceled). Integration layers forward it to their agent runtime — e.g. MJ's channel plugin sends a [whiteboard] context note.

    WidgetSubmitting: EventEmitter<WhiteboardWidgetSubmittingEventArgs> = ...

    Cancelable BEFORE event (forwarded from the board): a sandboxed HTML widget submitted input via MJWhiteboard.submit and it passed validation. Set Cancel = true synchronously to drop it before WidgetSubmitted fires.

    Accessors

    • get HasMultiplePages(): boolean

      Whether the board has more than one page (gates the "all pages" export entries).

      Returns boolean

    • get LastDeltaLabel(): string

      "2 s ago" style age of the last emitted delta (the ticker keeps it fresh).

      Returns string

    Methods

    • Execute one agent whiteboard tool (author 'agent', one undo batch), with the UI garnish: presence cursor glides to the mutation point, the new item pops in violet, and the action toast (with Undo) appears. Returns the result JSON string that the integration layer feeds back to the realtime model as the tool_response.

      Parameters

      • toolName: string
      • argsJson: string

      Returns string

    • Download ONE self-contained HTML document containing EVERY page (titled sections).

      Returns void

    • Download EVERY page as its own standalone SVG document (SVG is single-image, so "all pages" is one file per page, downloaded sequentially with the page name slug-suffixed into each filename).

      Returns void

    • Print the board: open a blank window, write the self-contained export document and invoke the print dialog (same precedent as the artifact viewer's print path). When the popup is blocked this is a logged no-op — nothing breaks, the user can retry.

      Returns void

    • Request a first-class artifact snapshot of the board (handled by the channel plugin).

      Returns void

    • A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.

      Returns void

    • A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.

      Returns void