wirestate-lit
Lit integration APIs for container providers, injection decorators, and element-scoped message handlers.
Commands
| Name | Description |
|---|---|
| OnCommandController | Reactive controller that registers a command handler. |
| OnCommandDecorator | Describes type returned by onCommand. |
| UseOnCommandOptions | Describes options for useOnCommand. |
| onCommand | Decorator for Lit element methods that handle a specific command. |
| useOnCommand | Registers a command handler for the host element's lifetime. |
Container
| Name | Description |
|---|---|
| ContainerProvider | Reactive controller that provides a root container through Lit context. |
| ContainerProviderOptions | Describes options for ContainerProvider. |
| ProvideContainerDecorator | Describes the type returned by provideContainer. |
| UseContainerProviderOptions | Describes options for useContainerProvider. |
| ContainerContext | Lit context object for providing and consuming the container. |
| provideContainer | Decorator that provides an IoC container to child components. |
| useContainerProvider | Hook that provides a container to the host element and its children. |
Events
| Name | Description |
|---|---|
| OnEventController | Reactive controller that subscribes to container events. |
| OnEventDecorator | Describes type returned by onEvent. |
| UseOnEventsOptions | Describes options for useOnEvents. |
| onEvent | Decorator for Lit element methods that handle events from the event bus. |
| useOnEvents | Subscribes to events for the host element's lifetime. |
Injection
| Name | Description |
|---|---|
| InjectionDecorator | Describes type returned by injection. |
| InjectionOptions | Describes options for injection. |
| UseContainerValue | Describes value returned by useContainer. |
| UseInjectionOptions | Describes options for useInjection. |
| UseInjectionValue | Describes value returned by useInjection. |
| InjectionFallback | A fallback for an optional injection: a raw value or a (container) => value factory, used only when the token is not bound. |
| injection | Injects a container value into a Lit element property. |
| useContainer | Consumes the active container from the nearest Lit context. |
| useInjection | Consumes a value from the nearest Lit container context. |
Queries
| Name | Description |
|---|---|
| OnQueryController | Reactive controller that registers a query handler. |
| OnQueryDecorator | Describes type returned by onQuery. |
| UseOnQueryOptions | Describes options for useOnQuery. |
| onQuery | Decorator for Lit element methods that handle a specific query. |
| useOnQuery | Registers a query handler for the host element's lifetime. |