/** * `localStorage` access that survives having no `localStorage`. * * The shell's stores are created at module scope, so their initialisers run on * import — before any component renders, and in environments with no DOM at * all. Touching `localStorage` unguarded there throws and takes the whole * import down with it, which breaks server-side rendering and any test file * that has not set up jsdom. * * The try/catch is not redundant with the `typeof` check: Safari's private mode * and browsers with site data blocked expose `localStorage` but throw on * access. A failed read is "nothing stored"; a failed write costs the value its * persistence, never the caller its behaviour. */ /** The `localStorage` keys the shell itself writes. */ export declare const STORAGE_KEYS: { readonly layout: "nexus-shell-layout"; readonly theme: "nexus-shell-theme"; readonly userProfile: "nexus-shell-user-profile"; readonly leftPane: "nexus-shell-pane-left"; readonly rightPane: "nexus-shell-pane-right"; readonly bottomPane: "nexus-shell-pane-bottom"; }; /** Read a value, or `null` when it is absent or storage is unavailable. */ export declare const readStored: (key: string) => string | null; /** Write a value. `null` removes the key. Never throws. */ export declare const writeStored: (key: string, value: string | null) => void; /** Read and parse a JSON value, or `null` when absent, unavailable or invalid. */ export declare const readStoredJson: (key: string) => T | null;