@pol-studios/powersync 1.0.7 → 1.0.11

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 (103) hide show
  1. package/README.md +933 -0
  2. package/dist/CacheSettingsManager-uz-kbnRH.d.ts +461 -0
  3. package/dist/attachments/index.d.ts +709 -6
  4. package/dist/attachments/index.js +133 -5
  5. package/dist/chunk-24RDMMCL.js +44 -0
  6. package/dist/chunk-24RDMMCL.js.map +1 -0
  7. package/dist/chunk-4TXTAEF2.js +2060 -0
  8. package/dist/chunk-4TXTAEF2.js.map +1 -0
  9. package/dist/chunk-63PXSPIN.js +358 -0
  10. package/dist/chunk-63PXSPIN.js.map +1 -0
  11. package/dist/chunk-654ERHA7.js +1 -0
  12. package/dist/{chunk-BREGB4WL.js → chunk-BRXQNASY.js} +287 -335
  13. package/dist/chunk-BRXQNASY.js.map +1 -0
  14. package/dist/{chunk-DHYUBVP7.js → chunk-CAB26E6F.js} +20 -9
  15. package/dist/chunk-CAB26E6F.js.map +1 -0
  16. package/dist/{chunk-H772V6XQ.js → chunk-CUCAYK7Z.js} +7 -43
  17. package/dist/chunk-CUCAYK7Z.js.map +1 -0
  18. package/dist/{chunk-4C3RY5SU.js → chunk-HWSNV45P.js} +76 -1
  19. package/dist/chunk-HWSNV45P.js.map +1 -0
  20. package/dist/{chunk-HFOFLW5F.js → chunk-KN2IZERF.js} +139 -6
  21. package/dist/chunk-KN2IZERF.js.map +1 -0
  22. package/dist/{chunk-UEYRTLKE.js → chunk-P4HZA6ZT.js} +20 -9
  23. package/dist/chunk-P4HZA6ZT.js.map +1 -0
  24. package/dist/chunk-T4AO7JIG.js +1 -0
  25. package/dist/{chunk-XQAJM2MW.js → chunk-VACPAAQZ.js} +33 -2
  26. package/dist/{chunk-XQAJM2MW.js.map → chunk-VACPAAQZ.js.map} +1 -1
  27. package/dist/{chunk-53WH2JJV.js → chunk-WN5ZJ3E2.js} +5 -8
  28. package/dist/chunk-WN5ZJ3E2.js.map +1 -0
  29. package/dist/chunk-XAEII4ZX.js +456 -0
  30. package/dist/chunk-XAEII4ZX.js.map +1 -0
  31. package/dist/chunk-XOY2CJ67.js +289 -0
  32. package/dist/chunk-XOY2CJ67.js.map +1 -0
  33. package/dist/chunk-YHTZ7VMV.js +1 -0
  34. package/dist/{chunk-MKD2VCX3.js → chunk-Z6VOBGTU.js} +8 -8
  35. package/dist/chunk-Z6VOBGTU.js.map +1 -0
  36. package/dist/chunk-ZM4ENYMF.js +230 -0
  37. package/dist/chunk-ZM4ENYMF.js.map +1 -0
  38. package/dist/connector/index.d.ts +56 -3
  39. package/dist/connector/index.js +8 -5
  40. package/dist/core/index.d.ts +12 -1
  41. package/dist/core/index.js +3 -2
  42. package/dist/error/index.js +0 -1
  43. package/dist/generator/cli.js +527 -0
  44. package/dist/generator/index.d.ts +168 -0
  45. package/dist/generator/index.js +370 -0
  46. package/dist/generator/index.js.map +1 -0
  47. package/dist/index.d.ts +12 -10
  48. package/dist/index.js +191 -29
  49. package/dist/index.native.d.ts +11 -9
  50. package/dist/index.native.js +191 -29
  51. package/dist/index.web.d.ts +11 -9
  52. package/dist/index.web.js +191 -29
  53. package/dist/maintenance/index.js +0 -1
  54. package/dist/platform/index.js +0 -2
  55. package/dist/platform/index.js.map +1 -1
  56. package/dist/platform/index.native.js +1 -2
  57. package/dist/platform/index.web.js +0 -1
  58. package/dist/pol-attachment-queue-BVAIueoP.d.ts +817 -0
  59. package/dist/provider/index.d.ts +38 -34
  60. package/dist/provider/index.js +11 -12
  61. package/dist/react/index.d.ts +372 -0
  62. package/dist/react/index.js +25 -0
  63. package/dist/storage/index.d.ts +3 -3
  64. package/dist/storage/index.js +22 -8
  65. package/dist/storage/index.native.d.ts +3 -3
  66. package/dist/storage/index.native.js +21 -7
  67. package/dist/storage/index.web.d.ts +3 -3
  68. package/dist/storage/index.web.js +21 -7
  69. package/dist/storage/upload/index.d.ts +7 -8
  70. package/dist/storage/upload/index.js +3 -3
  71. package/dist/storage/upload/index.native.d.ts +7 -8
  72. package/dist/storage/upload/index.native.js +4 -3
  73. package/dist/storage/upload/index.web.d.ts +1 -4
  74. package/dist/storage/upload/index.web.js +3 -3
  75. package/dist/supabase-connector-T9vHq_3i.d.ts +202 -0
  76. package/dist/sync/index.js +3 -3
  77. package/dist/{supabase-connector-qLm-WHkM.d.ts → types-B212hgfA.d.ts} +48 -170
  78. package/dist/{types-BVacP54t.d.ts → types-CyvBaAl8.d.ts} +12 -4
  79. package/dist/types-D0WcHrq6.d.ts +234 -0
  80. package/package.json +28 -4
  81. package/dist/CacheSettingsManager-1exbOC6S.d.ts +0 -261
  82. package/dist/chunk-4C3RY5SU.js.map +0 -1
  83. package/dist/chunk-53WH2JJV.js.map +0 -1
  84. package/dist/chunk-BREGB4WL.js.map +0 -1
  85. package/dist/chunk-DGUM43GV.js +0 -11
  86. package/dist/chunk-DHYUBVP7.js.map +0 -1
  87. package/dist/chunk-GKF7TOMT.js +0 -1
  88. package/dist/chunk-H772V6XQ.js.map +0 -1
  89. package/dist/chunk-HFOFLW5F.js.map +0 -1
  90. package/dist/chunk-KGSFAE5B.js +0 -1
  91. package/dist/chunk-LNL64IJZ.js +0 -1
  92. package/dist/chunk-MKD2VCX3.js.map +0 -1
  93. package/dist/chunk-UEYRTLKE.js.map +0 -1
  94. package/dist/chunk-WQ5MPAVC.js +0 -449
  95. package/dist/chunk-WQ5MPAVC.js.map +0 -1
  96. package/dist/chunk-ZEOKPWUC.js +0 -1165
  97. package/dist/chunk-ZEOKPWUC.js.map +0 -1
  98. package/dist/pol-attachment-queue-C7YNXXhK.d.ts +0 -676
  99. package/dist/types-Bgvx7-E8.d.ts +0 -187
  100. /package/dist/{chunk-DGUM43GV.js.map → chunk-654ERHA7.js.map} +0 -0
  101. /package/dist/{chunk-GKF7TOMT.js.map → chunk-T4AO7JIG.js.map} +0 -0
  102. /package/dist/{chunk-KGSFAE5B.js.map → chunk-YHTZ7VMV.js.map} +0 -0
  103. /package/dist/{chunk-LNL64IJZ.js.map → react/index.js.map} +0 -0
package/dist/index.js CHANGED
@@ -1,11 +1,41 @@
1
- import "./chunk-KGSFAE5B.js";
2
- import "./chunk-GKF7TOMT.js";
1
+ import "./chunk-654ERHA7.js";
2
+ import {
3
+ SlimPowerSyncProvider,
4
+ useAttachmentQueueContext,
5
+ usePowerSyncContext,
6
+ useSyncStatusContext
7
+ } from "./chunk-63PXSPIN.js";
8
+ import {
9
+ DOWNLOAD_WORKFLOW_STATES,
10
+ STATE_MAPPING,
11
+ STATE_NAMES,
12
+ TERMINAL_STATES,
13
+ UPLOAD_WORKFLOW_STATES,
14
+ VALID_STATES,
15
+ buildIdOnlyWatchQuery,
16
+ buildRecordFetchQuery,
17
+ buildWatchQuery,
18
+ createMigrationStats,
19
+ formatMigrationStats,
20
+ getStateName,
21
+ isDownloadWorkflowState,
22
+ isTerminalState,
23
+ isUploadWorkflowState,
24
+ isValidAttachmentState,
25
+ migrateAttachmentState,
26
+ migrateAttachmentStateSafe,
27
+ recordMigration,
28
+ validateSqlIdentifier as validateSqlIdentifier2,
29
+ validateWhereClause,
30
+ watchConfigToSourceConfig
31
+ } from "./chunk-ZM4ENYMF.js";
3
32
  import {
4
33
  ConflictBus,
5
34
  OfflineDataProvider,
6
35
  PowerSyncProvider,
7
36
  ProviderBridge
8
- } from "./chunk-BREGB4WL.js";
37
+ } from "./chunk-BRXQNASY.js";
38
+ import "./chunk-YHTZ7VMV.js";
9
39
  import {
10
40
  PowerSyncErrorBoundary
11
41
  } from "./chunk-P6WOZO7H.js";
@@ -14,16 +44,65 @@ import {
14
44
  AbstractAttachmentQueue,
15
45
  AttachmentState,
16
46
  AttachmentTable,
47
+ CACHE_SIZE_PRESETS,
17
48
  DEFAULT_ATTACHMENT_QUEUE_OPTIONS,
18
49
  DEFAULT_CACHE_CONFIG,
19
50
  DEFAULT_COMPRESSION_CONFIG,
51
+ DEFAULT_DOWNLOAD_CONFIG,
20
52
  DEFAULT_UPLOAD_CONFIG,
21
53
  EncodingType,
54
+ LOCALLY_AVAILABLE_STATES,
55
+ PENDING_DOWNLOAD_STATES,
56
+ PROTECTED_UPLOAD_STATES,
22
57
  PolAttachmentQueue,
23
58
  PolAttachmentState,
24
59
  PolStorageAdapter,
25
- createPolAttachmentQueue
26
- } from "./chunk-ZEOKPWUC.js";
60
+ blobToArrayBuffer,
61
+ cacheLocalFile,
62
+ clearCache,
63
+ clearUploadCallback,
64
+ copyToManagedCache,
65
+ createCacheManagerDeps,
66
+ createPolAttachmentQueue,
67
+ createUploadManagerDeps,
68
+ createUploadManagerState,
69
+ determineAttachmentState,
70
+ downloadRecord,
71
+ enforceCacheLimit,
72
+ ensureFileUri,
73
+ extractErrorCode,
74
+ formatCacheSize,
75
+ getCachedSize,
76
+ getEvictionCandidates,
77
+ getExcludeProtectedStatesCondition,
78
+ getExtensionFromMimeType,
79
+ getFailedPermanentUploads,
80
+ getLocalUriForStoragePath,
81
+ getMimeType,
82
+ getMimeTypeFromPath,
83
+ getPendingUploads,
84
+ getProtectedStatesInClause,
85
+ getSoonestRetryTime,
86
+ getStaleUploads,
87
+ getSyncedUploadsWithPendingCallback,
88
+ isAudioMimeType,
89
+ isCacheNearCapacity,
90
+ isDocumentMimeType,
91
+ isImageMimeType,
92
+ isLocallyAvailable,
93
+ isPendingDownloadState,
94
+ isPermanentError,
95
+ isProtectedUploadState,
96
+ isStateTransitionAllowed,
97
+ isVideoMimeType,
98
+ markUploadPermanentFailure,
99
+ markUploadSynced,
100
+ scheduleUploadRetry,
101
+ startUploadProcessing,
102
+ stripFileUri,
103
+ uploadOne,
104
+ validateSqlIdentifier
105
+ } from "./chunk-4TXTAEF2.js";
27
106
  import {
28
107
  DeadLetterQueue,
29
108
  createDeadLetterEntry,
@@ -35,14 +114,16 @@ import {
35
114
  unregisterBackgroundSync
36
115
  } from "./chunk-A4IBBWGO.js";
37
116
  import {
38
- DEFAULT_CONNECTION_HEALTH,
39
- DEFAULT_SYNC_CONFIG,
40
- DEFAULT_SYNC_METRICS,
41
- DEFAULT_SYNC_STATUS,
42
117
  HealthMonitor,
43
118
  MetricsCollector,
44
119
  SyncStatusTracker
45
- } from "./chunk-H772V6XQ.js";
120
+ } from "./chunk-CUCAYK7Z.js";
121
+ import {
122
+ DEFAULT_CONNECTION_HEALTH,
123
+ DEFAULT_SYNC_CONFIG,
124
+ DEFAULT_SYNC_METRICS,
125
+ DEFAULT_SYNC_STATUS
126
+ } from "./chunk-24RDMMCL.js";
46
127
  import {
47
128
  checkIntegrityImpl,
48
129
  checkStorageQuotaImpl,
@@ -89,29 +170,31 @@ import {
89
170
  useSyncStatus,
90
171
  useUploadStatus
91
172
  } from "./chunk-YSTEESEG.js";
92
- import "./chunk-LNL64IJZ.js";
173
+ import "./chunk-T4AO7JIG.js";
174
+ import "./chunk-CAB26E6F.js";
93
175
  import {
94
176
  CacheSettingsManager,
95
177
  DEFAULT_CACHE_SETTINGS,
178
+ createSupabaseStorage,
179
+ isBlobResult,
180
+ isFileResult
181
+ } from "./chunk-XOY2CJ67.js";
182
+ import {
96
183
  SupabaseStorageAdapter,
97
184
  createSupabaseStorageAdapter,
98
- getExtensionFromMimeType,
99
- getMimeType,
100
- getMimeTypeFromPath,
101
- isAudioMimeType,
102
- isDocumentMimeType,
103
- isImageMimeType,
104
- isVideoMimeType
105
- } from "./chunk-WQ5MPAVC.js";
185
+ getStorageErrorMessage,
186
+ isStorageAuthError,
187
+ normalizeStoragePath
188
+ } from "./chunk-XAEII4ZX.js";
106
189
  import "./chunk-TGBT5XBE.js";
107
190
  import {
108
191
  SupabaseUploadHandler,
109
192
  createSupabaseUploadHandler
110
- } from "./chunk-UEYRTLKE.js";
193
+ } from "./chunk-P4HZA6ZT.js";
111
194
  import {
112
195
  DEFAULT_UPLOAD_NOTIFICATION,
113
- resolveBucketFromConfig
114
- } from "./chunk-MKD2VCX3.js";
196
+ resolveBucket
197
+ } from "./chunk-Z6VOBGTU.js";
115
198
  import "./chunk-W7HSR35B.js";
116
199
  import {
117
200
  ATTACHMENT_DOWNLOAD_TIMEOUT_MS,
@@ -146,12 +229,14 @@ import {
146
229
  STORAGE_KEY_SYNC_MODE,
147
230
  STORAGE_WARNING_THRESHOLD
148
231
  } from "./chunk-CGL33PL4.js";
149
- import "./chunk-53WH2JJV.js";
232
+ import "./chunk-WN5ZJ3E2.js";
150
233
  import {
234
+ AuthRefreshError,
151
235
  CircuitBreaker,
152
236
  CircuitOpenError,
153
- DEFAULT_CIRCUIT_BREAKER_CONFIG
154
- } from "./chunk-4C3RY5SU.js";
237
+ DEFAULT_CIRCUIT_BREAKER_CONFIG,
238
+ createSupabaseAuth
239
+ } from "./chunk-HWSNV45P.js";
155
240
  import {
156
241
  ConflictDetectionError,
157
242
  DEFAULT_RETRY_CONFIG,
@@ -161,7 +246,7 @@ import {
161
246
  fetchServerVersion,
162
247
  getLocalVersion,
163
248
  hasVersionColumn
164
- } from "./chunk-HFOFLW5F.js";
249
+ } from "./chunk-KN2IZERF.js";
165
250
  import {
166
251
  AbortError,
167
252
  DEFAULT_BACKOFF_CONFIG,
@@ -185,9 +270,9 @@ import {
185
270
  extractEntityIds,
186
271
  extractTableNames,
187
272
  generateFailureId,
273
+ isRlsError,
188
274
  toSyncOperationError
189
- } from "./chunk-XQAJM2MW.js";
190
- import "./chunk-DGUM43GV.js";
275
+ } from "./chunk-VACPAAQZ.js";
191
276
  export {
192
277
  ATTACHMENT_DOWNLOAD_TIMEOUT_MS,
193
278
  ATTACHMENT_RETRY_DELAY_MS,
@@ -198,6 +283,8 @@ export {
198
283
  AttachmentQueueContext,
199
284
  AttachmentState,
200
285
  AttachmentTable,
286
+ AuthRefreshError,
287
+ CACHE_SIZE_PRESETS,
201
288
  COMPRESSION_MAX_WIDTH,
202
289
  COMPRESSION_SKIP_SIZE_BYTES,
203
290
  COMPRESSION_TARGET_SIZE_BYTES,
@@ -221,6 +308,7 @@ export {
221
308
  DEFAULT_COMPRESSION_CONFIG,
222
309
  DEFAULT_COMPRESSION_QUALITY,
223
310
  DEFAULT_CONNECTION_HEALTH,
311
+ DEFAULT_DOWNLOAD_CONFIG,
224
312
  DEFAULT_MAX_RETRY_ATTEMPTS,
225
313
  DEFAULT_RETRY_BACKOFF_MULTIPLIER,
226
314
  DEFAULT_RETRY_BASE_DELAY_MS,
@@ -234,6 +322,7 @@ export {
234
322
  DEFAULT_UPLOAD_CONFIG,
235
323
  DEFAULT_UPLOAD_NOTIFICATION,
236
324
  DOWNLOAD_STOP_THRESHOLD,
325
+ DOWNLOAD_WORKFLOW_STATES,
237
326
  DeadLetterQueue,
238
327
  EVICTION_TRIGGER_THRESHOLD,
239
328
  EncodingType,
@@ -243,9 +332,12 @@ export {
243
332
  HealthMonitor,
244
333
  InitializationError,
245
334
  LATENCY_DEGRADED_THRESHOLD_MS,
335
+ LOCALLY_AVAILABLE_STATES,
246
336
  MAX_CONSECUTIVE_FAILURES,
247
337
  MetricsCollector,
248
338
  OfflineDataProvider,
339
+ PENDING_DOWNLOAD_STATES,
340
+ PROTECTED_UPLOAD_STATES,
249
341
  PendingMutationsContext,
250
342
  PlatformAdapterError,
251
343
  PolAttachmentQueue,
@@ -257,6 +349,8 @@ export {
257
349
  PowerSyncProvider,
258
350
  ProviderBridge,
259
351
  RetryExhaustedError,
352
+ STATE_MAPPING,
353
+ STATE_NAMES,
260
354
  STATS_CACHE_TTL_MS,
261
355
  STATUS_NOTIFY_THROTTLE_MS,
262
356
  STORAGE_CRITICAL_THRESHOLD,
@@ -268,6 +362,7 @@ export {
268
362
  STORAGE_KEY_PREFIX,
269
363
  STORAGE_KEY_SYNC_MODE,
270
364
  STORAGE_WARNING_THRESHOLD,
365
+ SlimPowerSyncProvider,
271
366
  SupabaseConnector,
272
367
  SupabaseStorageAdapter,
273
368
  SupabaseUploadHandler,
@@ -277,45 +372,106 @@ export {
277
372
  SyncOperationError,
278
373
  SyncStatusContext,
279
374
  SyncStatusTracker,
375
+ TERMINAL_STATES,
376
+ UPLOAD_WORKFLOW_STATES,
377
+ VALID_STATES,
280
378
  addJitter,
379
+ blobToArrayBuffer,
380
+ buildIdOnlyWatchQuery,
381
+ buildRecordFetchQuery,
382
+ buildWatchQuery,
383
+ cacheLocalFile,
281
384
  calculateBackoffDelay,
282
385
  checkIntegrityImpl,
283
386
  checkStorageQuotaImpl,
284
387
  classifyError,
285
388
  classifySupabaseError,
389
+ clearCache,
390
+ clearUploadCallback,
286
391
  compactDatabaseImpl,
392
+ copyToManagedCache,
393
+ createCacheManagerDeps,
287
394
  createDeadLetterEntry,
395
+ createMigrationStats,
288
396
  createPolAttachmentQueue,
397
+ createSupabaseAuth,
398
+ createSupabaseStorage,
289
399
  createSupabaseStorageAdapter,
290
400
  createSupabaseUploadHandler,
291
401
  createSyncError,
402
+ createUploadManagerDeps,
403
+ createUploadManagerState,
292
404
  defaultSchemaRouter,
293
405
  defineBackgroundSyncTask,
294
406
  detectConflicts,
407
+ determineAttachmentState,
408
+ downloadRecord,
409
+ enforceCacheLimit,
410
+ ensureFileUri,
295
411
  extractEntityIds,
412
+ extractErrorCode,
296
413
  extractTableNames,
297
414
  fetchServerVersion,
298
415
  formatBytes,
416
+ formatCacheSize,
417
+ formatMigrationStats,
299
418
  generateDLQEntryId,
300
419
  generateFailureId,
301
420
  getCacheStatsImpl,
421
+ getCachedSize,
422
+ getEvictionCandidates,
423
+ getExcludeProtectedStatesCondition,
302
424
  getExtensionFromMimeType,
425
+ getFailedPermanentUploads,
426
+ getLocalUriForStoragePath,
303
427
  getLocalVersion,
304
428
  getMimeType,
305
429
  getMimeTypeFromPath,
430
+ getPendingUploads,
431
+ getProtectedStatesInClause,
432
+ getSoonestRetryTime,
433
+ getStaleUploads,
434
+ getStateName,
435
+ getStorageErrorMessage,
436
+ getSyncedUploadsWithPendingCallback,
306
437
  hasVersionColumn,
307
438
  initializeBackgroundSync,
308
439
  isAudioMimeType,
309
440
  isBackgroundSyncRegistered,
441
+ isBlobResult,
442
+ isCacheNearCapacity,
310
443
  isDocumentMimeType,
444
+ isDownloadWorkflowState,
445
+ isFileResult,
311
446
  isImageMimeType,
447
+ isLocallyAvailable,
448
+ isPendingDownloadState,
449
+ isPermanentError,
450
+ isProtectedUploadState,
451
+ isRlsError,
452
+ isStateTransitionAllowed,
453
+ isStorageAuthError,
454
+ isTerminalState,
455
+ isUploadWorkflowState,
456
+ isValidAttachmentState,
312
457
  isVideoMimeType,
458
+ markUploadPermanentFailure,
459
+ markUploadSynced,
460
+ migrateAttachmentState,
461
+ migrateAttachmentStateSafe,
462
+ normalizeStoragePath,
463
+ recordMigration,
313
464
  registerBackgroundSync,
314
- resolveBucketFromConfig,
465
+ resolveBucket,
466
+ scheduleUploadRetry,
315
467
  sleep,
468
+ startUploadProcessing,
469
+ stripFileUri,
316
470
  toSyncOperationError,
317
471
  unregisterBackgroundSync,
472
+ uploadOne,
318
473
  useAttachmentQueue,
474
+ useAttachmentQueueContext,
319
475
  useAttachmentQueueReady,
320
476
  useCompletedTransactions,
321
477
  useCompletedTransactionsContext,
@@ -333,6 +489,7 @@ export {
333
489
  usePendingMutationsContext,
334
490
  usePlatform,
335
491
  usePowerSync,
492
+ usePowerSyncContext,
336
493
  useSyncActivity,
337
494
  useSyncActivityContext,
338
495
  useSyncControl,
@@ -340,7 +497,12 @@ export {
340
497
  useSyncMode,
341
498
  useSyncModeContext,
342
499
  useSyncStatus,
500
+ useSyncStatusContext,
343
501
  useUploadStatus,
502
+ validateSqlIdentifier2 as validateSqlIdentifier,
503
+ validateSqlIdentifier as validateSqlIdentifierFromStateMachine,
504
+ validateWhereClause,
505
+ watchConfigToSourceConfig,
344
506
  withExponentialBackoff
345
507
  };
346
508
  //# sourceMappingURL=index.js.map
@@ -1,24 +1,26 @@
1
1
  export { A as AbstractPowerSyncDatabase, k as CacheStats, i as ClassifiedError, j as CompactResult, h as CompletedTransaction, b as ConnectionHealth, o as CountRow, C as CrudEntry, l as CrudTransaction, n as DbStatRow, D as DownloadProgress, E as EntitySyncState, F as FailedTransaction, r as FreelistCountRow, s as IntegrityCheckRow, I as IntegrityResult, q as PageCountRow, p as PageSizeRow, P as PowerSyncBackendConnector, m as SqliteTableRow, c as StorageInfo, d as StorageQuota, f as SyncError, g as SyncErrorType, e as SyncMetrics, S as SyncMode, a as SyncStatus, T as TableCacheStats } from './types-CDqWh56B.js';
2
- export { ATTACHMENT_DOWNLOAD_TIMEOUT_MS, ATTACHMENT_RETRY_DELAY_MS, AttachmentError, COMPRESSION_MAX_WIDTH, COMPRESSION_SKIP_SIZE_BYTES, COMPRESSION_TARGET_SIZE_BYTES, ConfigurationError, ConnectorError, DEFAULT_ATTACHMENT_CACHE_SIZE, DEFAULT_ATTACHMENT_CONCURRENCY, DEFAULT_COMPRESSION_QUALITY, DEFAULT_MAX_RETRY_ATTEMPTS, DEFAULT_RETRY_BACKOFF_MULTIPLIER, DEFAULT_RETRY_BASE_DELAY_MS, DEFAULT_RETRY_MAX_DELAY_MS, DEFAULT_SYNC_INTERVAL_MS, DEFAULT_SYNC_MODE, DOWNLOAD_STOP_THRESHOLD, EVICTION_TRIGGER_THRESHOLD, HEALTH_CHECK_INTERVAL_MS, HEALTH_CHECK_TIMEOUT_MS, InitializationError, LATENCY_DEGRADED_THRESHOLD_MS, MAX_CONSECUTIVE_FAILURES, PlatformAdapterError, PowerSyncError, STATS_CACHE_TTL_MS, STATUS_NOTIFY_THROTTLE_MS, STORAGE_CRITICAL_THRESHOLD, STORAGE_KEY_ATTACHMENT_SETTINGS, STORAGE_KEY_AUTO_OFFLINE, STORAGE_KEY_ENABLED, STORAGE_KEY_METRICS, STORAGE_KEY_PAUSED, STORAGE_KEY_PREFIX, STORAGE_KEY_SYNC_MODE, STORAGE_WARNING_THRESHOLD, SyncOperationError, classifyError, classifySupabaseError, createSyncError, extractEntityIds, extractTableNames, generateFailureId, toSyncOperationError } from './core/index.js';
3
- export { g as ConflictBus, h as ConflictCheckResult, k as ConflictDetectionConfig, j as ConflictHandler, l as ConflictListener, i as ConflictResolution, C as ConnectorCircuitBreakerConfig, b as ConnectorConfig, e as CrudHandler, D as DEFAULT_RETRY_CONFIG, F as FieldConflict, P as PowerSyncCredentials, m as ResolutionListener, f as RetryConfig, R as RetryStrategyConfig, c as SchemaRouter, S as SupabaseConnector, a as SupabaseConnectorOptions, d as defaultSchemaRouter } from './supabase-connector-qLm-WHkM.js';
4
- export { CircuitBreaker, CircuitBreakerConfig, CircuitBreakerStats, CircuitOpenError, CircuitState, DEFAULT_CIRCUIT_BREAKER_CONFIG } from './connector/index.js';
5
- export { t as AttachmentRecord, A as AttachmentSourceConfig, q as AttachmentStatsRow, e as AttachmentStorageAdapter, p as AttachmentSyncStats, o as AttachmentSyncStatus, h as CacheConfig, r as CacheFileRow, s as CachedSizeRow, C as CompressionConfig, i as DEFAULT_CACHE_CONFIG, D as DEFAULT_COMPRESSION_CONFIG, f as DEFAULT_UPLOAD_CONFIG, k as DownloadPhase, l as DownloadStatus, E as EvictRow, I as IdRow, P as PolAttachmentQueue, j as PolAttachmentQueueConfig, a as PolAttachmentQueueOptions, d as PolAttachmentRecord, b as PolAttachmentState, U as UploadConfig, g as UploadHandler, m as UploadPhase, n as UploadStatus, c as createPolAttachmentQueue } from './pol-attachment-queue-C7YNXXhK.js';
6
- export { PolStorageAdapter, PolStorageAdapterOptions } from './attachments/index.js';
2
+ export { ATTACHMENT_DOWNLOAD_TIMEOUT_MS, ATTACHMENT_RETRY_DELAY_MS, AttachmentError, COMPRESSION_MAX_WIDTH, COMPRESSION_SKIP_SIZE_BYTES, COMPRESSION_TARGET_SIZE_BYTES, ConfigurationError, ConnectorError, DEFAULT_ATTACHMENT_CACHE_SIZE, DEFAULT_ATTACHMENT_CONCURRENCY, DEFAULT_COMPRESSION_QUALITY, DEFAULT_MAX_RETRY_ATTEMPTS, DEFAULT_RETRY_BACKOFF_MULTIPLIER, DEFAULT_RETRY_BASE_DELAY_MS, DEFAULT_RETRY_MAX_DELAY_MS, DEFAULT_SYNC_INTERVAL_MS, DEFAULT_SYNC_MODE, DOWNLOAD_STOP_THRESHOLD, EVICTION_TRIGGER_THRESHOLD, HEALTH_CHECK_INTERVAL_MS, HEALTH_CHECK_TIMEOUT_MS, InitializationError, LATENCY_DEGRADED_THRESHOLD_MS, MAX_CONSECUTIVE_FAILURES, PlatformAdapterError, PowerSyncError, STATS_CACHE_TTL_MS, STATUS_NOTIFY_THROTTLE_MS, STORAGE_CRITICAL_THRESHOLD, STORAGE_KEY_ATTACHMENT_SETTINGS, STORAGE_KEY_AUTO_OFFLINE, STORAGE_KEY_ENABLED, STORAGE_KEY_METRICS, STORAGE_KEY_PAUSED, STORAGE_KEY_PREFIX, STORAGE_KEY_SYNC_MODE, STORAGE_WARNING_THRESHOLD, SyncOperationError, classifyError, classifySupabaseError, createSyncError, extractEntityIds, extractTableNames, generateFailureId, isRlsError, toSyncOperationError } from './core/index.js';
3
+ export { A as AuthProvider, g as ConflictBus, h as ConflictCheckResult, k as ConflictDetectionConfig, j as ConflictHandler, l as ConflictListener, i as ConflictResolution, C as ConnectorCircuitBreakerConfig, a as ConnectorConfig, c as CrudHandler, D as DEFAULT_RETRY_CONFIG, F as FieldConflict, P as PowerSyncCredentials, m as ResolutionListener, e as RetryConfig, R as RetryStrategyConfig, b as SchemaRouter, f as Session, S as SupabaseConnectorOptions, d as defaultSchemaRouter } from './types-B212hgfA.js';
4
+ export { S as SupabaseConnector } from './supabase-connector-T9vHq_3i.js';
5
+ export { AuthRefreshError, CircuitBreaker, CircuitBreakerConfig, CircuitBreakerStats, CircuitOpenError, CircuitState, DEFAULT_CIRCUIT_BREAKER_CONFIG, SupabaseAuthOptions, createSupabaseAuth } from './connector/index.js';
6
+ export { e as AttachmentConfig, z as AttachmentRecord, A as AttachmentSourceConfig, w as AttachmentStatsRow, f as AttachmentStorageAdapter, v as AttachmentSyncStats, u as AttachmentSyncStatus, B as BatchFilterContext, m as CACHE_SIZE_PRESETS, k as CacheConfig, x as CacheFileRow, n as CacheSizePreset, o as CacheSizeValue, y as CachedSizeRow, C as CompressionConfig, l as DEFAULT_CACHE_CONFIG, D as DEFAULT_COMPRESSION_CONFIG, j as DEFAULT_DOWNLOAD_CONFIG, g as DEFAULT_UPLOAD_CONFIG, i as DownloadConfig, q as DownloadPhase, r as DownloadStatus, E as EvictRow, I as IdRow, P as PolAttachmentQueue, a as PolAttachmentQueueOptions, d as PolAttachmentRecord, b as PolAttachmentState, S as SkipDownloadContext, U as UploadConfig, h as UploadHandler, s as UploadPhase, t as UploadStatus, W as WatchConfig, c as createPolAttachmentQueue, p as formatCacheSize } from './pol-attachment-queue-BVAIueoP.js';
7
+ export { CacheManagerDeps, DOWNLOAD_WORKFLOW_STATES, DownloadManagerDeps, LOCALLY_AVAILABLE_STATES, MigrationStats, PENDING_DOWNLOAD_STATES, PROTECTED_UPLOAD_STATES, PolStorageAdapter, PolStorageAdapterOptions, STATE_MAPPING, STATE_NAMES, TERMINAL_STATES, UPLOAD_WORKFLOW_STATES, UploadManagerDeps, UploadManagerState, VALID_STATES, blobToArrayBuffer, buildIdOnlyWatchQuery, buildRecordFetchQuery, buildWatchQuery, cacheLocalFile, clearCache, clearUploadCallback, copyToManagedCache, createCacheManagerDeps, createMigrationStats, createUploadManagerDeps, createUploadManagerState, determineAttachmentState, downloadRecord, enforceCacheLimit, ensureFileUri, extractErrorCode, formatMigrationStats, getCachedSize, getEvictionCandidates, getExcludeProtectedStatesCondition, getFailedPermanentUploads, getLocalUriForStoragePath, getPendingUploads, getProtectedStatesInClause, getSoonestRetryTime, getStaleUploads, getStateName, getSyncedUploadsWithPendingCallback, isCacheNearCapacity, isDownloadWorkflowState, isLocallyAvailable, isPendingDownloadState, isPermanentError, isProtectedUploadState, isStateTransitionAllowed, isTerminalState, isUploadWorkflowState, isValidAttachmentState, markUploadPermanentFailure, markUploadSynced, migrateAttachmentState, migrateAttachmentStateSafe, recordMigration, scheduleUploadRetry, startUploadProcessing, stripFileUri, uploadOne, validateSqlIdentifier, validateSqlIdentifierFromStateMachine, validateWhereClause, watchConfigToSourceConfig } from './attachments/index.js';
7
8
  export { B as BackgroundSyncOptions, h as BackgroundSyncSystem, e as HealthCheckResult, H as HealthMonitorOptions, M as MetricsCollectorOptions, P as PowerSyncRawStatus, c as SyncControlActions, f as SyncEvent, g as SyncEventListener, d as SyncOperationData, S as SyncScope, a as SyncStatusState, b as SyncStatusTrackerOptions, U as Unsubscribe, i as defineBackgroundSyncTask, j as initializeBackgroundSync, k as isBackgroundSyncRegistered, r as registerBackgroundSync, u as unregisterBackgroundSync } from './background-sync-ChCXW-EV.js';
8
9
  export { DeadLetterEntry, DeadLetterQueue, DeadLetterQueueListener, DeadLetterQueueOptions, DeadLetterReason, HealthMonitor, MetricsCollector, SyncStatusTracker, createDeadLetterEntry, generateDLQEntryId } from './sync/index.js';
9
10
  export { AbortError, BackoffConfig, BackoffOptions, ConflictDetectionError, DEFAULT_BACKOFF_CONFIG, RetryExhaustedError, addJitter, calculateBackoffDelay, detectConflicts, fetchServerVersion, formatBytes, getExtensionFromMimeType, getLocalVersion, getMimeType, getMimeTypeFromPath, hasVersionColumn, isAudioMimeType, isDocumentMimeType, isImageMimeType, isVideoMimeType, sleep, withExponentialBackoff } from './index.js';
10
11
  export { DatabaseMaintenanceUtils, checkIntegrityImpl, checkStorageQuotaImpl, compactDatabaseImpl, getCacheStatsImpl, useDatabaseMaintenance } from './maintenance/index.js';
11
- export { A as AttachmentUploadHandler, a as BucketConfig, B as BucketResolver, D as DownloadResult, P as PowerSyncStorageAdapter, R as RemoteStorageAdapter, S as StorageUploadHandler, b as SupabaseStorageAdapterOptions, U as UploadOptions, r as resolveBucketFromConfig } from './types-Bgvx7-E8.js';
12
- export { a as CacheSettings, C as CacheSettingsManager, b as CacheSettingsManagerOptions, D as DEFAULT_CACHE_SETTINGS, S as SupabaseStorageAdapter, c as createSupabaseStorageAdapter } from './CacheSettingsManager-1exbOC6S.js';
13
- export { D as DEFAULT_UPLOAD_NOTIFICATION, S as SupabaseUploadHandlerOptions, U as UploadEventHandlers, a as UploadNotificationConfig } from './types-BVacP54t.js';
12
+ export { D as DownloadResult, a as StorageBackend, b as StorageUploadOptions, d as SupabaseClient, S as SupabaseStorage, c as SupabaseStorageOptions, e as SupabaseTransformOptions, U as UploadProgress, r as resolveBucket } from './types-D0WcHrq6.js';
13
+ export { f as CacheSettings, C as CacheSettingsManager, h as CacheSettingsManagerOptions, D as DEFAULT_CACHE_SETTINGS, I as ImageTransformOptions, S as SupabaseStorageAdapter, e as SupabaseStorageAdapterOptions, c as createSupabaseStorage, d as createSupabaseStorageAdapter, g as getStorageErrorMessage, a as isBlobResult, i as isFileResult, b as isStorageAuthError, n as normalizeStoragePath } from './CacheSettingsManager-uz-kbnRH.js';
14
+ export { D as DEFAULT_UPLOAD_NOTIFICATION, S as SupabaseUploadHandlerOptions, U as UploadEventHandlers, a as UploadNotificationConfig } from './types-CyvBaAl8.js';
14
15
  export { SupabaseUploadHandler, createSupabaseUploadHandler } from './storage/upload/index.js';
15
16
  export { PowerSyncErrorBoundary } from './error/index.js';
16
17
  export { AttachmentQueueContext, BackgroundSyncCallbacks, BackgroundSyncConfig, BackgroundSyncStatus, CompletedTransactionsContext, CompletedTransactionsContextValue, ConnectionHealthContext, ConnectionHealthContextValue, ConnectionStatusContext, ConnectionStatusContextValue, DEFAULT_CONNECTION_HEALTH, DEFAULT_SYNC_CONFIG, DEFAULT_SYNC_METRICS, DEFAULT_SYNC_STATUS, DataLayerConfig, DataLayerIntegration, EntitySyncStatusResult, FailedTransactionsContext, FailedTransactionsContextValue, OfflineDataAttachmentConfig, OfflineDataProvider, OfflineDataProviderConfig, OfflineDataProviderProps, PendingMutationsContext, PendingMutationsContextValue, PowerSyncConfig, PowerSyncContext, PowerSyncContextValue, PowerSyncProvider, PowerSyncProviderProps, PowerSyncSyncStatusSnapshot, ProviderBridge, ProviderBridgeProps, SyncActivityContext, SyncActivityContextValue, SyncActivityResult, SyncConfig, SyncMetricsContext, SyncMetricsContextValue, SyncModeContext, SyncModeContextValue, SyncStatusContext, SyncStatusContextValue, UploadStatusResult, useAttachmentQueue, useAttachmentQueueReady, useCompletedTransactions, useCompletedTransactionsContext, useConnectionHealth, useConnectionStatus, useDatabase, useDownloadProgress, useEntitySyncStatus, useFailedTransactions, useFailedTransactionsContext, useIsSyncing, useOnlineStatus, usePendingMutations, usePendingMutationsContext, usePlatform, usePowerSync, useSyncActivity, useSyncActivityContext, useSyncControl, useSyncMetrics, useSyncMode, useSyncModeContext, useSyncStatus, useUploadStatus } from './provider/index.js';
18
+ export { AttachmentQueueContextValue, SlimPowerSyncProvider, useAttachmentQueueContext, usePowerSyncContext, useSyncStatusContext } from './react/index.js';
17
19
  export { AsyncStorageAdapter, CompressedImage, CompressionOptions, ConnectionType, DatabaseOptions, FileInfo, FileSystemAdapter, ImageProcessorAdapter, LoggerAdapter, NetworkAdapter, PlatformAdapter, PlatformType, detectPlatform } from './platform/index.js';
18
20
  export { createNativePlatformAdapter } from './platform/index.native.js';
19
21
  export { ATTACHMENT_TABLE, AbstractAttachmentQueue, AttachmentState, AttachmentTable, AttachmentTableOptions, AttachmentQueueOptions as BaseAttachmentQueueOptions, DEFAULT_ATTACHMENT_QUEUE_OPTIONS, EncodingType, AttachmentRecord as OfficialAttachmentRecord, StorageAdapter } from '@powersync/attachments';
22
+ export { AbstractPowerSyncDatabase as PowerSyncDBInterface } from '@powersync/common';
20
23
  import '@supabase/supabase-js';
21
- import '@powersync/common';
22
24
  import 'react';
23
25
  import '@tanstack/react-query';
24
26
  import '@powersync/react-native';