The summary clearly declares that it needs the model.
One object, every subscriber in step
Use the model controls in the left rail. The summary receives the live object directly. The token probe reads resolved facts from the cascade. The activity log at right receives only a bridged document event.
The experimental wrapper is deliberately small
class AtmosphereLiveModel extends EventTarget {
#current;
#revision = 0;
get current() { return this.#current; }
get revision() { return this.#revision; }
set(axis, value, options) {
return this.setComposition({ [axis]: value }, options);
}
subscribe(listener) {
const handler = event => listener(event.detail);
this.addEventListener('atmosphere:change', handler);
return () => this.removeEventListener('atmosphere:change', handler);
}
}
The model records decisions, invokes the current composition controller, observes the compatibility DOM surface, and emits immutable snapshots. CSS continues to resolve the result.
Give a related component the object directly
set model(nextModel) {
this.#unsubscribe?.();
this.#model = nextModel;
this.#unsubscribe = nextModel.subscribe(change => {
this.#render(change.coordinate, change.changed);
});
this.#render(nextModel.current, []);
}
The event says which coordinate fields changed.
The setter unsubscribes before binding another instance.
The coordinate summary and token probe on the first view use this pattern.
Bridge global effects without coupling every component
// Adapter: model event → document event
model.subscribe(detail => {
document.dispatchEvent(new CustomEvent(
'atmosphere:model-change', { detail }
));
});
// Distant subscriber: no model reference
connectedCallback() {
document.addEventListener(
'atmosphere:model-change', this.#onChange
);
}
URL synchronization, analytics, activity feeds, and host-level coordination benefit from decoupling. A closely related view is clearer with a direct dependency.
The activity component in the right rail demonstrates this path. It is never assigned AtmosphereModel.
The pattern works; the core migration is not yet complete
| Capability | Status |
|---|---|
| DOM-backed composition controller | Shipped |
Composite route plus ?at= | Shipped |
| Reactive wrapper used on this page | Experimental |
| One canonical atomic persistence record | Proposed |
| Drawer and every host write only through the model | Proposed |
Target source of truth.
Current compatibility surface.
Composition plus host route.
Future atomic record.
Drawer and tray migration.