Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
class EventManager(screenId: String, eventRunnerManager: EventRunnerManager, koinScope: Scope)

Owns the running of one screen's event chains — the counterpart of TilesManager on the event side, one instance per screen. Given an EventTrigger to look up, or an EventSchema/list of them to run directly, it builds a fresh EventRunningScope wired to that screen's collaborators and dispatches to the matching dev.catbit.mosaic.client.ui.sdui.foundation.events.EventRunner via eventRunnerManager.

Link copied to clipboard
interface EventRunner<out T : EventSchema>

Contract every Event — built-in or custom — implements to actually execute its own logic. Registered against T's class via an EventDefinition, and reached exclusively through EventManager.runEvent, which builds the EventRunningScope this receives and wraps the whole call in error handling — nothing else in the framework invokes an EventRunner directly.

Link copied to clipboard
class EventRunnerManager(eventRunners: Map<KClass<out EventSchema>, EventRunner<*>>)

Resolves an EventSchema's concrete class to its registered EventRunner and actually runs it — the single entry point every event, built-in or custom, goes through, reached via EventManager.runEvent.

Link copied to clipboard
data class EventRunningScope(val screenId: String, val triggerOwner: EventSchema, val incomingData: Any? = null, koinScope: Scope, eventManager: EventManager, val tilesEditor: TilesEditor, val tilesEventDispatcher: TilesEventDispatcher, val tilesOverlaysEditor: TilesOverlaysEditor, val tilesValueProducer: TilesValueProducer, val screenDataHolder: ScreenDataHolder, val screenBehaviorsHolder: ScreenBehaviorsHolder)

Receiver passed to every dev.catbit.mosaic.client.ui.sdui.foundation.events.EventRunner.runEvent call — one fresh instance per event execution, built by EventManager.runEvent right before dispatching to the matching EventRunner.

Link copied to clipboard
interface TileEvent

Marker interface for a tile's own local, synchronous state mutation — the payload of dev.catbit.mosaic.client.ui.sdui.foundation.tiles.renderer.TileRenderingScope.dispatchEvent, handled by that tile's own TileHolder.onTileEvent override. Empty by design: every tile that has local state defines its own sealed interface XTileEvents : TileEvent with one data class/ data object per distinct mutation (see CheckboxTileEvents.OnCheckChanged for the canonical example) — there's nothing to share across tiles beyond "this is a TileEvent."

Link copied to clipboard
interface TileGroupEvent

Marker interface for an event broadcast to every tile in the tree that opts in to receiving it — the payload of dev.catbit.mosaic.client.ui.sdui.foundation.tiles.renderer.TileRenderingScope.dispatchGroupEvent, delivered to every TileHolder whose handlesGroupEvent(event) returns true for it. Empty by design, the same way TileEvent is: RadioButton's mutual-exclusion mechanism is the built-in example — its own group event carries a groupId, and each RadioButtonTileHolder compares that against its own groupId to decide whether to clear its selected state.

Link copied to clipboard
sealed interface UIEvent

The 3 commands a TileRenderingScope emits through its onEvent sink — the wire between a tile's own Compose interaction handling and the screen's state holder, which observes these and mutates the live tile tree accordingly. Every TileRenderingScope method (triggerEvent, dispatchEvent, dispatchGroupEvent) produces exactly one of these.