@expofp/floorplan
Version:
Interactive floor plan library for expos and events
32 lines • 1.48 kB
TypeScript
import type RootStore from './RootStore';
/**
* View-model store for the overlay bottom-sheet: derives the sizing inputs the
* pure `<Overlay>` component needs (how tall the medium/full sheet should be)
* from the current UI state. Keeps this presentation math out of the Container
* and out of the already-large UIState.
*/
export default class OverlayStore {
private readonly rootStore;
constructor(rootStore: RootStore);
private get ui();
private get isRouteActive();
private get isSearchListOpen();
/**
* Divisor for the medium sheet height (viewportHeight / multiplier) — larger = shorter sheet.
*
* Plain `@computed`, deliberately: a `keepAlive` computed never suspends, so
* it stays registered on its whole transitive dependency chain — which ends
* at the module-scope locale box in `utils/i18n.ts`. That box outlives the
* plan, so a keepAlive here pins this store, its `rootStore`, the FloorPlan
* instance and its render target for the life of the page (ADR-0011). The
* body is arithmetic; there is nothing to memoize.
*/
get mediumSizeMultiplier(): 3 | 7 | 9;
/**
* Pixels subtracted from viewport height for the full sheet (search box,
* banners, safe padding). Plain `@computed` for the reason above — this one
* reaches the locale box through `ui.shouldShowSearchButtons`.
*/
get fullSizeOffset(): number;
}
//# sourceMappingURL=OverlayStore.d.ts.map