Start here

5.0.0-rc.2 · release candidate (published on npm) · f4243b83 snapshot. Reading source: f4243b8334cafe0bd1b06eba85d87e2310cb3618. Match APIs to your installed version.

API reference#

These references target 5.0.0-rc.2. Use the page for the class or contract you need. Class pages define supported APIs and link shared contracts; task guides show how to use them.

Core classes#

Class Reference scope
View Construction, rendering, UI bindings, named Regions, lifecycle, ownership, and extension points.
Region Showing, replacing, detaching and emptying Views; element configuration and lifecycle.
Application Preparation, lifecycle results/cancellation, restart, child Applications, root ownership, state and Radio bindings.
CollectionView Collection observation, sorting/filtering, empty presentation, child lookup/ownership, rendering and lifecycle.
Behavior Host composition, reusable local interaction, UI/data bindings, forwarded events, and teardown.
MnObject Nonvisual objects, construction, state/Radio bindings, and synchronous destruction.

Shared class contracts#

These behaviors apply across several classes. Class pages link to the relevant contracts.

  • Common class methods: construction, extension, options and binding helpers.
  • Events: subscription methods, notification arguments and cleanup.
  • Errors and diagnostics: error properties, diagnostic codes, and installed lookup.
  • State: creating, borrowing, observing and disposing state.
  • Rendering and View bindings: templates, UI, DOM/entity events and child event forwarding shared by View and CollectionView.

Runtime configuration#

Runtime configuration covers defaults, configuration scope, setters, and isolated class families.

Provider interfaces#

Use these contracts when implementing or adapting an integration. For configuration with supplied packages, start with the setup guide.

Companion packages#

@mnjs/data: Model and Collection is an optional observable data solution. Its reference covers operations, events, identity, disposal, and exported types. API access and persistence require a separate solution. Marionette can use another data layer through its core provider contracts.

@mnjs/radio: channels and requests covers channel registries, events, replies, cleanup, logging, and standalone use.

@mnjs/utils: shared utilities covers standalone component methods, callbacks, object helpers, and exports. Shared Events and class methods remain at their canonical references.

@mnjs/adapters covers optional data and DOM integrations, their imports, configuration, observation, and cleanup.

Integration and task guides#

Renderer and data setup connects Lit and @mnjs/data to Marionette. Integration guides explain configuration and use; package references define the APIs supplied by each package.

Check and debug an application covers consumer lint, declaration checks, and diagnostic lookup. Practical TypeScript covers options, handlers, state and lifecycle results. Migration and consumer testing provide upgrade and verification paths.

Existing UI and navigation cover mounting and destination ownership. Lists, imperative controls, accessibility/rendering, and production provide further task paths.

Class pages link to the relevant shared configuration contracts; Region documents its own DOM setter.

For a first runnable result, use the quick start. For composition guidance, see architecture.

Detailed coverage still pending: a complete custom immutable-store integration. The provider contracts describe the integration boundary. Application lifecycle details include destination binding order and restart from start completion.