storage
npmHigh-performance, client-side, encrypted, and dynamically compressed reactive state and storage utilities.
import { STORAGE_TRANSPORT, LocalStorageTransport } from '@angular-helpers/storage';
bootstrapApplication(AppComponent, {
providers: [
// Provide the default storage transport
{ provide: STORAGE_TRANSPORT, useClass: LocalStorageTransport }
],
});πΎ Core Primitives
injectStorageSignal
An advanced reactive L1 Signal backed by asynchronous L2 storage transport. Now featuring direct data access and separate loading/error sub-signals.
injectEntityStore
Surgical, reactive entity management store with strict immutability (Freeze-on-Write) and optional L2 storage persistence. Now with batch write debouncing and easy patch/update API.
injectStorageResource
Provides a reactive Angular Resource wrapper around StorageTransport. Handles async serialization/deserialization and syncs reactively.
β Transports & Protocols
LocalStorageTransport
Strategy-based storage transport implementation. Supports LocalStorage, SessionStorage, CacheAPI, and IndexedDB with automatic worker delegation support.
OfflineSyncService
A reactive main-thread service that bridges network status changes to the background Http Web Worker. Monitors navigator.onLine reactively using Angular Signals, counts pending queued offline mutations, and triggers background synchronization on network recovery.
WorkerStorageTransport
Web Worker based storage transport. Proxies storage operations to a dedicated worker thread for high performance and isolation.
StorageTransport
Interface definition for pluggable storage backends. Enables the Strategy pattern used by LocalStorageTransport.