@rdlabo/ionic-angular-kit 21.6.7 → 21.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rdlabo/ionic-angular-kit",
3
- "version": "21.6.7",
3
+ "version": "21.6.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/rdlabo-dev/ionic-angular-library.git"
@@ -730,7 +730,7 @@ declare class OfflineReplicaPullService {
730
730
  }
731
731
 
732
732
  /**
733
- * Serializes only local replica read/derive/write critical sections. Network
733
+ * Serializes local replica reads and read/derive/write critical sections. Network
734
734
  * transport must stay outside this coordinator so synchronization never holds
735
735
  * the local mutation lane while waiting on I/O.
736
736
  *
@@ -742,7 +742,15 @@ declare class OfflineReplicaMutationCoordinator {
742
742
  #private;
743
743
  /** Enqueues one local replica critical section behind any in-flight mutation. */
744
744
  run<T>(operation: (repository: OfflineRepository) => Promise<T>): Promise<T>;
745
- /** Resolves after every currently queued replica mutation has settled. */
745
+ /**
746
+ * Enqueues an external local-replica read behind mutations and keeps later
747
+ * mutations behind that read until it settles.
748
+ *
749
+ * Do not invoke this from inside {@link run}; use the repository passed to
750
+ * that callback for reads owned by an atomic mutation.
751
+ */
752
+ runSerializedRead<T>(read: () => Promise<T>): Promise<T>;
753
+ /** Resolves after every currently queued replica read or mutation has settled. */
746
754
  drain(): Promise<void>;
747
755
  /**
748
756
  * Calls the product aggregate-intent projector and validates scope, schema,
@@ -1282,6 +1290,10 @@ declare class OfflineNetworkService {
1282
1290
  #private;
1283
1291
  readonly state: i0.Signal<OfflineNetworkState>;
1284
1292
  readonly connected: i0.Signal<boolean>;
1293
+ /** Whether Capacitor currently permits foreground transport work. */
1294
+ readonly appActive: i0.Signal<boolean>;
1295
+ /** Changes on every foreground/background transition, even when connectivity is unchanged. */
1296
+ readonly lifecycleRevision: i0.Signal<number>;
1285
1297
  initialize(): Promise<void>;
1286
1298
  markApiSuccess(): void;
1287
1299
  markApiFailure(): void;
@@ -1428,13 +1440,20 @@ interface CommunitySqliteDatabase {
1428
1440
  commitTransaction(): Promise<unknown>;
1429
1441
  rollbackTransaction(): Promise<unknown>;
1430
1442
  }
1431
- /** Community SQLite connection surface used to provision encrypted databases. */
1443
+ /**
1444
+ * Community SQLite connection surface used to provision encrypted databases.
1445
+ *
1446
+ * One object must exclusively own a native plugin connection registry. Consumers must not create another
1447
+ * wrapper over the same native plugin or call `closeConnection` while its canonical driver is active.
1448
+ * Destructive reset belongs before application bootstrap in the next JavaScript lifecycle.
1449
+ */
1432
1450
  interface CommunitySqliteConnection {
1433
1451
  isSecretStored(): Promise<{
1434
1452
  result?: boolean;
1435
1453
  }>;
1436
1454
  setEncryptionSecret(passphrase: string): Promise<void>;
1437
1455
  createConnection(database: string, encrypted: boolean, mode: string, version: number, readonly: boolean): Promise<CommunitySqliteDatabase>;
1456
+ closeConnection?(database: string, readonly: boolean): Promise<void>;
1438
1457
  }
1439
1458
  /** DI token for the native community SQLite driver. */
1440
1459
  declare const COMMUNITY_SQLITE: InjectionToken<CommunitySqliteDriver | null>;
@@ -1445,7 +1464,15 @@ declare const COMMUNITY_SQLITE: InjectionToken<CommunitySqliteDriver | null>;
1445
1464
  * `OfflineKitOptions.createEncryptionKey` and contains no device or user identifiers.
1446
1465
  */
1447
1466
  declare function createRandomOfflineEncryptionKey(): Promise<string>;
1448
- /** Create the standard encrypted `@capacitor-community/sqlite` driver. */
1467
+ /**
1468
+ * Create the canonical encrypted `@capacitor-community/sqlite` driver for a connection owner.
1469
+ *
1470
+ * The supplied connection is the identity and exclusive owner of its native plugin connections. Repeated
1471
+ * calls with the same object return the same driver so normal concurrent access cannot be mistaken for a
1472
+ * WebView-reload orphan. Consumers must route database access through this driver and must not close or
1473
+ * replace the connection while the driver is active. A real WebView reload creates a new JavaScript owner,
1474
+ * allowing the driver to close the native connection orphaned by the previous owner and recreate it.
1475
+ */
1449
1476
  declare function createCommunitySqliteDriver(connection: CommunitySqliteConnection): CommunitySqliteDriver;
1450
1477
  type SQLiteValue = string | number | null;
1451
1478
  /** Native iOS/Android repository backed by encrypted `@capacitor-community/sqlite`. */