MosaicDependencyInjectionConfig

data class MosaicDependencyInjectionConfig(val additionalKoinModule: Module, val logger: MosaicLogger, val tileDefinitions: List<TileDefinition<out TileSchema>>, val eventDefinitions: List<EventDefinition<out EventSchema>>, val eventTriggerDefinition: List<EventTriggerDefinition<out EventTrigger>>, val additionalSerializersModule: SerializersModule, val drawableResources: Map<String, DrawableResource>)

Every knob a consuming app can turn on mosaic-client's DI graph — the whole surface for registering custom tiles/events/triggers, swapping the logger, adding Koin bindings of your own (including a custom dev.catbit.mosaic.client.ui.sdui.foundation.data_processor.DataProcessor via additionalKoinModule), and supplying bundled drawables.

Constructors

Link copied to clipboard
constructor(additionalKoinModule: Module, logger: MosaicLogger, tileDefinitions: List<TileDefinition<out TileSchema>>, eventDefinitions: List<EventDefinition<out EventSchema>>, eventTriggerDefinition: List<EventTriggerDefinition<out EventTrigger>>, additionalSerializersModule: SerializersModule, drawableResources: Map<String, DrawableResource>)

Properties

Link copied to clipboard

extra Koin bindings the app needs — the way to register a custom dev.catbit.mosaic.client.ui.sdui.foundation.data_processor.DataProcessor (single { MyProcessor } bind DataProcessor::class) or any other dependency a custom TileRenderer/EventRunner wants to get<T>().

Link copied to clipboard
val additionalSerializersModule: SerializersModule

extra polymorphic serializers unrelated to tile/event schema registration (which is always automatic from the 3 definition lists above) — only needed if a field type itself needs its own serializer.

Link copied to clipboard
val drawableResources: Map<String, DrawableResource>

names an Image tile's resourceName can resolve to, backing dev.catbit.mosaic.client.ui.sdui.foundation.resources.DrawableResourcesHolder.

Link copied to clipboard

custom EventDefinitions, merged with the built-in ones.

Link copied to clipboard

custom EventTriggerDefinitions, merged with the built-in ones.

Link copied to clipboard

replaces the app-wide MosaicLogger every framework log call routes through.

Link copied to clipboard

custom TileDefinitions, merged with the built-in ones.