@ue-too/board / index / KmtInputStateMachineWebWorkerProxy
Class: KmtInputStateMachineWebWorkerProxy
Defined in: packages/board/src/input-interpretation/input-state-machine/kmt-input-state-machine.ts:764
Extends
TemplateStateMachine<KmtInputEventMapping,KmtInputContext,KmtInputStates,KmtInputEventOutputMapping>
Constructors
Constructor
new KmtInputStateMachineWebWorkerProxy(
webworker):KmtInputStateMachineWebWorkerProxy
Defined in: packages/board/src/input-interpretation/input-state-machine/kmt-input-state-machine.ts:772
Parameters
webworker
Worker
Returns
KmtInputStateMachineWebWorkerProxy
Overrides
TemplateStateMachine< KmtInputEventMapping, KmtInputContext, KmtInputStates, KmtInputEventOutputMapping >.constructor
Properties
_context
protected_context:KmtInputContext
Defined in: packages/being/dist/interface.d.ts:468
Inherited from
TemplateStateMachine._context
_currentState
protected_currentState:"INITIAL"|"TERMINAL"|"IDLE"|"READY_TO_PAN_VIA_SPACEBAR"|"READY_TO_PAN_VIA_SCROLL_WHEEL"|"PAN"|"INITIAL_PAN"|"PAN_VIA_SCROLL_WHEEL"|"DISABLED"
Defined in: packages/being/dist/interface.d.ts:466
Inherited from
TemplateStateMachine._currentState
_eventResultCallbacks
protected_eventResultCallbacks:EventResultCallback<KmtInputEventMapping,KmtInputContext,"IDLE"|"READY_TO_PAN_VIA_SPACEBAR"|"READY_TO_PAN_VIA_SCROLL_WHEEL"|"PAN"|"INITIAL_PAN"|"PAN_VIA_SCROLL_WHEEL"|"DISABLED">[]
Defined in: packages/being/dist/interface.d.ts:472
Inherited from
TemplateStateMachine._eventResultCallbacks
_happensCallbacks
protected_happensCallbacks: (args,context) =>void[]
Defined in: packages/being/dist/interface.d.ts:471
Parameters
args
[string, unknown] | ["leftPointerDown", PointerEventPayload] | ["leftPointerUp", PointerEventPayload] | ["leftPointerMove", PointerEventPayload] | ["spacebarDown"] | ["spacebarUp"] | ["escapeKey"] | ["stayIdle"] | ["cursorOnElement"] | ["scroll", ScrollWithCtrlEventPayload] | ["scrollWithCtrl", ScrollWithCtrlEventPayload] | ["middlePointerDown", PointerEventPayload] | ["middlePointerUp", PointerEventPayload] | ["middlePointerMove", PointerEventPayload] | ["disable"] | ["enable"] | ["pointerMove", PointerEventPayload] | ["arrowUp"] | ["arrowDown"] | ["F"] | ["G"] | ["Q"]
context
Returns
void
Inherited from
TemplateStateMachine._happensCallbacks
_initialState
protected_initialState:"IDLE"|"READY_TO_PAN_VIA_SPACEBAR"|"READY_TO_PAN_VIA_SCROLL_WHEEL"|"PAN"|"INITIAL_PAN"|"PAN_VIA_SCROLL_WHEEL"|"DISABLED"
Defined in: packages/being/dist/interface.d.ts:474
Inherited from
TemplateStateMachine._initialState
_stateChangeCallbacks
protected_stateChangeCallbacks:StateChangeCallback<"IDLE"|"READY_TO_PAN_VIA_SPACEBAR"|"READY_TO_PAN_VIA_SCROLL_WHEEL"|"PAN"|"INITIAL_PAN"|"PAN_VIA_SCROLL_WHEEL"|"DISABLED">[]
Defined in: packages/being/dist/interface.d.ts:470
Inherited from
TemplateStateMachine._stateChangeCallbacks
_states
protected_states:Record<States,State<EventPayloadMapping,Context,States,EventOutputMapping>>
Defined in: packages/being/dist/interface.d.ts:467
Inherited from
TemplateStateMachine._states
_statesArray
protected_statesArray: ("IDLE"|"READY_TO_PAN_VIA_SPACEBAR"|"READY_TO_PAN_VIA_SCROLL_WHEEL"|"PAN"|"INITIAL_PAN"|"PAN_VIA_SCROLL_WHEEL"|"DISABLED")[]
Defined in: packages/being/dist/interface.d.ts:469
Inherited from
TemplateStateMachine._statesArray
_timeouts
protected_timeouts:number|undefined
Defined in: packages/being/dist/interface.d.ts:473
Inherited from
TemplateStateMachine._timeouts
Accessors
context
Get Signature
get context():
Context
Defined in: packages/being/dist/interface.d.ts:487
Read-only access to the machine's live context object. Optional so existing StateMachine implementations remain valid; TemplateStateMachine always provides it. Intended for tooling/introspection (e.g. visualizers evaluating guards against the current context) — mutate state through events, not through this reference.
Returns
Context
Inherited from
TemplateStateMachine.context
currentState
Get Signature
get currentState():
States|"INITIAL"|"TERMINAL"
Defined in: packages/being/dist/interface.d.ts:485
Returns
States | "INITIAL" | "TERMINAL"
Inherited from
TemplateStateMachine.currentState
possibleStates
Get Signature
get possibleStates():
States[]
Defined in: packages/being/dist/interface.d.ts:488
Returns
States[]
Inherited from
TemplateStateMachine.possibleStates
states
Get Signature
get states():
Record<States,State<EventPayloadMapping,Context,States,EventOutputMapping>>
Defined in: packages/being/dist/interface.d.ts:489
Returns
Record<States, State<EventPayloadMapping, Context, States, EventOutputMapping>>
Inherited from
TemplateStateMachine.states
Methods
happens()
happens(...
args):EventResult<"IDLE"|"READY_TO_PAN_VIA_SPACEBAR"|"READY_TO_PAN_VIA_SCROLL_WHEEL"|"PAN"|"INITIAL_PAN"|"PAN_VIA_SCROLL_WHEEL"|"DISABLED">
Defined in: packages/board/src/input-interpretation/input-state-machine/kmt-input-state-machine.ts:789
Parameters
args
...[string, unknown]
Returns
EventResult<"IDLE" | "READY_TO_PAN_VIA_SPACEBAR" | "READY_TO_PAN_VIA_SCROLL_WHEEL" | "PAN" | "INITIAL_PAN" | "PAN_VIA_SCROLL_WHEEL" | "DISABLED">
Overrides
TemplateStateMachine.happens
onEventResult()
onEventResult(
callback): () =>void
Defined in: packages/being/dist/interface.d.ts:484
Subscribe to every event result. Optional so existing StateMachine implementations remain valid; TemplateStateMachine always provides it. Returns a disposer on implementations that support one. Disposing during a dispatch takes effect starting with the next dispatch, not the one in progress — see EventResultCallback for the exact snapshot-iteration semantics.
Parameters
callback
EventResultCallback<KmtInputEventMapping, KmtInputContext, "IDLE" | "READY_TO_PAN_VIA_SPACEBAR" | "READY_TO_PAN_VIA_SCROLL_WHEEL" | "PAN" | "INITIAL_PAN" | "PAN_VIA_SCROLL_WHEEL" | "DISABLED">
Returns
():
void
Returns
void
Inherited from
TemplateStateMachine.onEventResult
onHappens()
onHappens(
callback): () =>void
Defined in: packages/being/dist/interface.d.ts:483
Subscribe to every happens() call, before the state handles it. Returns a disposer on implementations that support one. Disposing during a dispatch takes effect starting with the next dispatch, not the one in progress — see EventResultCallback for the exact snapshot-iteration semantics.
Parameters
callback
(args, context) => void
Returns
():
void
Returns
void
Inherited from
TemplateStateMachine.onHappens
onStateChange()
onStateChange(
callback): () =>void
Defined in: packages/being/dist/interface.d.ts:482
Subscribe to state changes. Returns a disposer on implementations that support one. Disposing during a dispatch takes effect starting with the next dispatch, not the one in progress — see EventResultCallback for the exact snapshot-iteration semantics.
Parameters
callback
StateChangeCallback<"IDLE" | "READY_TO_PAN_VIA_SPACEBAR" | "READY_TO_PAN_VIA_SCROLL_WHEEL" | "PAN" | "INITIAL_PAN" | "PAN_VIA_SCROLL_WHEEL" | "DISABLED">
Returns
():
void
Returns
void
Inherited from
TemplateStateMachine.onStateChange
reset()
reset():
void
Defined in: packages/being/dist/interface.d.ts:476
Returns
void
Inherited from
TemplateStateMachine.reset
setContext()
setContext(
context):void
Defined in: packages/being/dist/interface.d.ts:486
Parameters
context
Returns
void
Inherited from
TemplateStateMachine.setContext
start()
start():
void
Defined in: packages/being/dist/interface.d.ts:477
Returns
void
Inherited from
TemplateStateMachine.start
switchTo()
switchTo(
state):void
Defined in: packages/being/dist/interface.d.ts:479
Parameters
state
"INITIAL" | "TERMINAL" | "IDLE" | "READY_TO_PAN_VIA_SPACEBAR" | "READY_TO_PAN_VIA_SCROLL_WHEEL" | "PAN" | "INITIAL_PAN" | "PAN_VIA_SCROLL_WHEEL" | "DISABLED"
Returns
void
Inherited from
TemplateStateMachine.switchTo
wrapup()
wrapup():
void
Defined in: packages/being/dist/interface.d.ts:478
Returns
void
Inherited from
TemplateStateMachine.wrapup