@polargold/pg-frontend-core
    Preparing search index...

    Interface LocalStorageOptions

    interface LocalStorageOptions {
        mode?: string;
        storage?: Storage;
        version?: string;
    }
    Index
    mode?: string

    The consuming app's build mode (e.g. import.meta.env.MODE). Always included in the key when given. Deliberately supplied by the caller: this class ships pre-built in a published package, so it has no access to a consuming app's own build mode - each of the four app-level StorageHelper copies this replaces read that from their own app directly, which only worked because that code lived inside the app itself.

    storage?: Storage

    Where to actually read/write. Defaults to window.localStorage. Pass a wrapper (e.g. a private-browsing/SSR-safe storage shim) to override - data-sheet-portal's copy of StorageHelper already wrapped safeLocalStorage (silently no-ops instead of throwing when storage is unavailable) instead of the raw global, and this class had no way to preserve that until this option was added. Same pattern as AuthServiceOptions.userStore.

    version?: string

    The consuming app's own version (e.g. from its package.json). Included in the key only when given - omit it to let a value survive app version bumps/deploys instead of resetting on every release.

    This is the direct replacement for StorageHelper's versioned boolean: luv-autoq-frontend passes versioned: false for exactly one key, the access token (new StorageHelper(StorageName.AccessToken, false), in both authenticationStore and api/modules/base.ts), so a deploy doesn't force every logged-in user to sign in again - every other key there (filters, pagination, business unit) stays versioned so stale UI state doesn't carry across releases. Match that: pass version for most keys, omit it for session/auth tokens.