type Listener = () => void; /** * Ephemeral per-plugin state, keyed by plugin and then by the plugin's own key. * * A plugin's surfaces render in unrelated React subtrees — a map tool, a viewer sidebar tab, * a dialog and a data page have no common ancestor below the host — so they cannot share * state through context or props. `usePluginStore` is the persisted alternative and costs a * server round trip per write, which is wrong for a selection. * * Module scope rather than a provider, for the same reason: a provider would have to sit * above every surface, and the surfaces do not share one. */ declare class PluginStateStore { private values; private listeners; private static scopedKey; get(pluginId: string, key: string, initial: T): T; set(pluginId: string, key: string, value: T): void; subscribe(pluginId: string, key: string, listener: Listener): () => void; /** * Drops everything one plugin holds. Called when it is disabled or unloaded, so a plugin * re-enabled in the same session starts clean rather than resuming a stale selection. */ clear(pluginId: string): void; } export declare const pluginStateStore: PluginStateStore; export {}; //# sourceMappingURL=pluginState.d.ts.map