@anfenn/dync 1.0.2 → 1.0.4

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.
Files changed (35) hide show
  1. package/README.md +33 -15
  2. package/dist/{chunk-66PSQW4D.js → chunk-PCA4XM2N.js} +17 -17
  3. package/dist/chunk-PCA4XM2N.js.map +1 -0
  4. package/dist/{dexie-Bv-fV10P.d.cts → dexie-1_xyU5MV.d.cts} +41 -38
  5. package/dist/{dexie-DJFApKsM.d.ts → dexie-ChZ0o0Sz.d.ts} +41 -38
  6. package/dist/dexie.cjs +40 -40
  7. package/dist/dexie.cjs.map +1 -1
  8. package/dist/dexie.d.cts +1 -1
  9. package/dist/dexie.d.ts +1 -1
  10. package/dist/dexie.js +40 -40
  11. package/dist/dexie.js.map +1 -1
  12. package/dist/index.cjs +16 -16
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.d.cts +2 -2
  15. package/dist/index.d.ts +2 -2
  16. package/dist/index.js +1 -1
  17. package/dist/{index.shared-CkYsQYyn.d.ts → index.shared-Byhq6TyU.d.ts} +1 -1
  18. package/dist/{index.shared-BGwvMH8f.d.cts → index.shared-DsDBNWlz.d.cts} +1 -1
  19. package/dist/react/index.cjs +2 -2
  20. package/dist/react/index.cjs.map +1 -1
  21. package/dist/react/index.d.cts +2 -2
  22. package/dist/react/index.d.ts +2 -2
  23. package/dist/react/index.js +1 -1
  24. package/package.json +9 -1
  25. package/src/core/tableEnhancers.ts +17 -17
  26. package/src/storage/dexie/DexieAdapter.ts +2 -2
  27. package/src/storage/dexie/{DexieStorageCollection.ts → DexieCollection.ts} +12 -12
  28. package/src/storage/dexie/DexieTable.ts +123 -0
  29. package/src/storage/dexie/{DexieStorageWhereClause.ts → DexieWhereClause.ts} +21 -21
  30. package/src/storage/dexie/index.ts +3 -3
  31. package/src/storage/memory/MemoryTable.ts +40 -40
  32. package/src/storage/sqlite/SQLiteTable.ts +34 -36
  33. package/src/storage/types.ts +22 -19
  34. package/dist/chunk-66PSQW4D.js.map +0 -1
  35. package/src/storage/dexie/DexieStorageTable.ts +0 -123
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- export { A as AfterRemoteAddCallback, a as ApiFunctions, d as BatchFirstLoadResult, b as BatchPushPayload, c as BatchPushResult, B as BatchSync, C as ConflictResolutionStrategy, D as Dync, F as FirstLoadProgress, e as FirstLoadProgressCallback, f as MissingRemoteRecordDuringUpdateCallback, M as MissingRemoteRecordStrategy, g as MutationEvent, S as SyncAction, h as SyncOptions, i as SyncState, j as SyncedRecord, T as TableMap } from './index.shared-BGwvMH8f.cjs';
2
- export { M as MemoryAdapter, a as MemoryQueryContext, S as SQLiteAdapter, b as SqliteQueryContext, c as StorageAdapter } from './dexie-Bv-fV10P.cjs';
1
+ export { A as AfterRemoteAddCallback, a as ApiFunctions, d as BatchFirstLoadResult, b as BatchPushPayload, c as BatchPushResult, B as BatchSync, C as ConflictResolutionStrategy, D as Dync, F as FirstLoadProgress, e as FirstLoadProgressCallback, f as MissingRemoteRecordDuringUpdateCallback, M as MissingRemoteRecordStrategy, g as MutationEvent, S as SyncAction, h as SyncOptions, i as SyncState, j as SyncedRecord, T as TableMap } from './index.shared-DsDBNWlz.cjs';
2
+ export { M as MemoryAdapter, a as MemoryQueryContext, S as SQLiteAdapter, b as SqliteQueryContext, c as StorageAdapter } from './dexie-1_xyU5MV.cjs';
3
3
  export { S as SQLiteDatabaseDriver, b as SQLiteQueryResult, a as SQLiteRunResult } from './types-CSbIAfu2.cjs';
4
4
  import 'dexie';
5
5
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { A as AfterRemoteAddCallback, a as ApiFunctions, d as BatchFirstLoadResult, b as BatchPushPayload, c as BatchPushResult, B as BatchSync, C as ConflictResolutionStrategy, D as Dync, F as FirstLoadProgress, e as FirstLoadProgressCallback, f as MissingRemoteRecordDuringUpdateCallback, M as MissingRemoteRecordStrategy, g as MutationEvent, S as SyncAction, h as SyncOptions, i as SyncState, j as SyncedRecord, T as TableMap } from './index.shared-CkYsQYyn.js';
2
- export { M as MemoryAdapter, a as MemoryQueryContext, S as SQLiteAdapter, b as SqliteQueryContext, c as StorageAdapter } from './dexie-DJFApKsM.js';
1
+ export { A as AfterRemoteAddCallback, a as ApiFunctions, d as BatchFirstLoadResult, b as BatchPushPayload, c as BatchPushResult, B as BatchSync, C as ConflictResolutionStrategy, D as Dync, F as FirstLoadProgress, e as FirstLoadProgressCallback, f as MissingRemoteRecordDuringUpdateCallback, M as MissingRemoteRecordStrategy, g as MutationEvent, S as SyncAction, h as SyncOptions, i as SyncState, j as SyncedRecord, T as TableMap } from './index.shared-Byhq6TyU.js';
2
+ export { M as MemoryAdapter, a as MemoryQueryContext, S as SQLiteAdapter, b as SqliteQueryContext, c as StorageAdapter } from './dexie-ChZ0o0Sz.js';
3
3
  export { S as SQLiteDatabaseDriver, b as SQLiteQueryResult, a as SQLiteRunResult } from './types-CSbIAfu2.js';
4
4
  import 'dexie';
5
5
 
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  SqliteQueryContext,
7
7
  SyncAction,
8
8
  createLocalId
9
- } from "./chunk-66PSQW4D.js";
9
+ } from "./chunk-PCA4XM2N.js";
10
10
  import "./chunk-SQB6E7V2.js";
11
11
  export {
12
12
  Dync,
@@ -1,4 +1,4 @@
1
- import { d as StorageTable, c as StorageAdapter, T as TableSchemaDefinition, D as DexieQueryContext, b as SqliteQueryContext, a as MemoryQueryContext } from './dexie-DJFApKsM.js';
1
+ import { d as StorageTable, c as StorageAdapter, T as TableSchemaDefinition, D as DexieQueryContext, b as SqliteQueryContext, a as MemoryQueryContext } from './dexie-ChZ0o0Sz.js';
2
2
  import { c as SQLiteVersionConfigurator } from './types-CSbIAfu2.js';
3
3
 
4
4
  type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'none';
@@ -1,4 +1,4 @@
1
- import { d as StorageTable, c as StorageAdapter, T as TableSchemaDefinition, D as DexieQueryContext, b as SqliteQueryContext, a as MemoryQueryContext } from './dexie-Bv-fV10P.cjs';
1
+ import { d as StorageTable, c as StorageAdapter, T as TableSchemaDefinition, D as DexieQueryContext, b as SqliteQueryContext, a as MemoryQueryContext } from './dexie-1_xyU5MV.cjs';
2
2
  import { c as SQLiteVersionConfigurator } from './types-CSbIAfu2.cjs';
3
3
 
4
4
  type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'none';
@@ -504,7 +504,7 @@ function enhanceSyncTable({ table, tableName, withTransaction, state, enhancedTa
504
504
  }
505
505
  };
506
506
  const wrappedBulkAdd = async (items) => {
507
- if (items.length === 0) return;
507
+ if (items.length === 0) return [];
508
508
  const now = (/* @__PURE__ */ new Date()).toISOString();
509
509
  const syncedItems = items.map((item) => {
510
510
  const localId = item._localId || createLocalId();
@@ -532,7 +532,7 @@ function enhanceSyncTable({ table, tableName, withTransaction, state, enhancedTa
532
532
  return result;
533
533
  };
534
534
  const wrappedBulkPut = async (items) => {
535
- if (items.length === 0) return;
535
+ if (items.length === 0) return [];
536
536
  const now = (/* @__PURE__ */ new Date()).toISOString();
537
537
  const syncedItems = items.map((item) => {
538
538
  const localId = item._localId || createLocalId();