@pol-studios/powersync 1.0.25 → 1.0.32

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 (118) hide show
  1. package/README.md +0 -1
  2. package/dist/{CacheSettingsManager-uz-kbnRH.d.ts → CacheSettingsManager-0H_7thHW.d.ts} +21 -3
  3. package/dist/attachments/index.d.ts +30 -30
  4. package/dist/attachments/index.js +13 -4
  5. package/dist/{background-sync-ChCXW-EV.d.ts → background-sync-BujnI3IR.d.ts} +1 -1
  6. package/dist/{chunk-55DKCJV4.js → chunk-2RDWLXJW.js} +408 -78
  7. package/dist/chunk-2RDWLXJW.js.map +1 -0
  8. package/dist/{chunk-P4HZA6ZT.js → chunk-4665ZSE5.js} +2 -2
  9. package/dist/chunk-4665ZSE5.js.map +1 -0
  10. package/dist/{chunk-XOY2CJ67.js → chunk-4F5B5CZ7.js} +3 -3
  11. package/dist/chunk-5WRI5ZAA.js +31 -0
  12. package/dist/{chunk-BGBQYQV3.js → chunk-65A3SYJZ.js} +193 -299
  13. package/dist/chunk-65A3SYJZ.js.map +1 -0
  14. package/dist/chunk-6SZ64KCZ.js +755 -0
  15. package/dist/chunk-6SZ64KCZ.js.map +1 -0
  16. package/dist/{chunk-YSTEESEG.js → chunk-74TBHWJ4.js} +122 -11
  17. package/dist/chunk-74TBHWJ4.js.map +1 -0
  18. package/dist/chunk-ANXWYQEJ.js +1 -0
  19. package/dist/chunk-ANXWYQEJ.js.map +1 -0
  20. package/dist/{chunk-CAB26E6F.js → chunk-C4J4MLER.js} +29 -24
  21. package/dist/chunk-C4J4MLER.js.map +1 -0
  22. package/dist/{chunk-C5ODS3XH.js → chunk-EOW7JK7Q.js} +9 -16
  23. package/dist/chunk-EOW7JK7Q.js.map +1 -0
  24. package/dist/chunk-HRAVPIAZ.js +220 -0
  25. package/dist/chunk-HRAVPIAZ.js.map +1 -0
  26. package/dist/{chunk-XAEII4ZX.js → chunk-NUGQOTEM.js} +32 -4
  27. package/dist/chunk-NUGQOTEM.js.map +1 -0
  28. package/dist/chunk-OGUFUZSY.js +5415 -0
  29. package/dist/chunk-OGUFUZSY.js.map +1 -0
  30. package/dist/{chunk-VB737IVN.js → chunk-P4D6BQ4X.js} +328 -706
  31. package/dist/chunk-P4D6BQ4X.js.map +1 -0
  32. package/dist/{chunk-CACKC6XG.js → chunk-PGEDE6IM.js} +136 -89
  33. package/dist/chunk-PGEDE6IM.js.map +1 -0
  34. package/dist/{chunk-A4IBBWGO.js → chunk-RALHHPTU.js} +1 -1
  35. package/dist/chunk-RIDSPLE5.js +42 -0
  36. package/dist/chunk-RIDSPLE5.js.map +1 -0
  37. package/dist/{chunk-Z6VOBGTU.js → chunk-UOMHWUHV.js} +2 -12
  38. package/dist/chunk-UOMHWUHV.js.map +1 -0
  39. package/dist/{chunk-WGHNIAF7.js → chunk-YONQYTVH.js} +2 -2
  40. package/dist/chunk-ZAN22NGL.js +13 -0
  41. package/dist/chunk-ZAN22NGL.js.map +1 -0
  42. package/dist/config/index.d.ts +200 -0
  43. package/dist/config/index.js +23 -0
  44. package/dist/config/index.js.map +1 -0
  45. package/dist/connector/index.d.ts +23 -5
  46. package/dist/connector/index.js +4 -2
  47. package/dist/core/index.d.ts +2 -2
  48. package/dist/core/index.js +1 -0
  49. package/dist/error/index.js +1 -0
  50. package/dist/generator/index.js +2 -0
  51. package/dist/generator/index.js.map +1 -1
  52. package/dist/index.d.ts +19 -16
  53. package/dist/index.js +88 -46
  54. package/dist/index.native.d.ts +18 -14
  55. package/dist/index.native.js +93 -44
  56. package/dist/index.web.d.ts +17 -14
  57. package/dist/index.web.js +88 -46
  58. package/dist/maintenance/index.d.ts +2 -2
  59. package/dist/maintenance/index.js +3 -2
  60. package/dist/platform/index.d.ts +1 -1
  61. package/dist/platform/index.js +2 -0
  62. package/dist/platform/index.js.map +1 -1
  63. package/dist/platform/index.native.d.ts +1 -1
  64. package/dist/platform/index.native.js +1 -0
  65. package/dist/platform/index.web.d.ts +1 -1
  66. package/dist/platform/index.web.js +1 -0
  67. package/dist/pol-attachment-queue-DqBvLAEY.d.ts +255 -0
  68. package/dist/provider/index.d.ts +319 -124
  69. package/dist/provider/index.js +21 -16
  70. package/dist/provider/index.native.d.ts +108 -0
  71. package/dist/provider/index.native.js +121 -0
  72. package/dist/provider/index.native.js.map +1 -0
  73. package/dist/provider/index.web.d.ts +16 -0
  74. package/dist/provider/index.web.js +112 -0
  75. package/dist/provider/index.web.js.map +1 -0
  76. package/dist/react/index.d.ts +16 -65
  77. package/dist/react/index.js +2 -9
  78. package/dist/storage/index.d.ts +5 -4
  79. package/dist/storage/index.js +12 -9
  80. package/dist/storage/index.native.d.ts +5 -4
  81. package/dist/storage/index.native.js +8 -5
  82. package/dist/storage/index.web.d.ts +5 -4
  83. package/dist/storage/index.web.js +11 -8
  84. package/dist/storage/upload/index.d.ts +4 -3
  85. package/dist/storage/upload/index.js +4 -2
  86. package/dist/storage/upload/index.native.d.ts +4 -3
  87. package/dist/storage/upload/index.native.js +4 -2
  88. package/dist/storage/upload/index.web.d.ts +2 -1
  89. package/dist/storage/upload/index.web.js +4 -2
  90. package/dist/{supabase-connector-D2oIl2t8.d.ts → supabase-connector-HMxBA9Kg.d.ts} +23 -25
  91. package/dist/sync/index.d.ts +183 -11
  92. package/dist/sync/index.js +13 -3
  93. package/dist/{types-CyvBaAl8.d.ts → types-6QHGELuY.d.ts} +4 -1
  94. package/dist/{types-CDqWh56B.d.ts → types-B9MptP7E.d.ts} +13 -1
  95. package/dist/types-BhAEsJj-.d.ts +330 -0
  96. package/dist/{types-D0WcHrq6.d.ts → types-CGMibJKD.d.ts} +8 -0
  97. package/dist/{types-DiBvmGEi.d.ts → types-DqJnP50o.d.ts} +22 -24
  98. package/dist/{pol-attachment-queue-BE2HU3Us.d.ts → types-JCEhw2Lf.d.ts} +139 -346
  99. package/package.json +18 -4
  100. package/dist/chunk-24RDMMCL.js +0 -44
  101. package/dist/chunk-24RDMMCL.js.map +0 -1
  102. package/dist/chunk-55DKCJV4.js.map +0 -1
  103. package/dist/chunk-654ERHA7.js +0 -1
  104. package/dist/chunk-BGBQYQV3.js.map +0 -1
  105. package/dist/chunk-C5ODS3XH.js.map +0 -1
  106. package/dist/chunk-CAB26E6F.js.map +0 -1
  107. package/dist/chunk-CACKC6XG.js.map +0 -1
  108. package/dist/chunk-P4HZA6ZT.js.map +0 -1
  109. package/dist/chunk-TIFL2KWE.js +0 -358
  110. package/dist/chunk-TIFL2KWE.js.map +0 -1
  111. package/dist/chunk-VB737IVN.js.map +0 -1
  112. package/dist/chunk-XAEII4ZX.js.map +0 -1
  113. package/dist/chunk-YSTEESEG.js.map +0 -1
  114. package/dist/chunk-Z6VOBGTU.js.map +0 -1
  115. /package/dist/{chunk-XOY2CJ67.js.map → chunk-4F5B5CZ7.js.map} +0 -0
  116. /package/dist/{chunk-654ERHA7.js.map → chunk-5WRI5ZAA.js.map} +0 -0
  117. /package/dist/{chunk-A4IBBWGO.js.map → chunk-RALHHPTU.js.map} +0 -0
  118. /package/dist/{chunk-WGHNIAF7.js.map → chunk-YONQYTVH.js.map} +0 -0
@@ -1,10 +1,24 @@
1
- import "./chunk-654ERHA7.js";
2
1
  import {
3
- SlimPowerSyncProvider,
2
+ OfflineDataProvider
3
+ } from "./chunk-6SZ64KCZ.js";
4
+ import "./chunk-YHTZ7VMV.js";
5
+ import "./chunk-C4J4MLER.js";
6
+ import "./chunk-ANXWYQEJ.js";
7
+ import {
4
8
  useAttachmentQueueContext,
5
9
  usePowerSyncContext,
6
10
  useSyncStatusContext
7
- } from "./chunk-TIFL2KWE.js";
11
+ } from "./chunk-RIDSPLE5.js";
12
+ import {
13
+ createSchemaRouter,
14
+ definePolConfig,
15
+ generatePowerSyncSchema,
16
+ getTableFromSchema,
17
+ getTableStrategy,
18
+ isProcessedPolConfig,
19
+ isTablePowerSync,
20
+ normalizeTableSpec
21
+ } from "./chunk-HRAVPIAZ.js";
8
22
  import {
9
23
  DOWNLOAD_WORKFLOW_STATES,
10
24
  STATE_MAPPING,
@@ -16,7 +30,7 @@ import {
16
30
  buildRecordFetchQuery,
17
31
  buildWatchQuery,
18
32
  createMigrationStats,
19
- createWatchIds,
33
+ createWatchPaths,
20
34
  extractIdsFromRows,
21
35
  formatMigrationStats,
22
36
  getStateName,
@@ -30,17 +44,17 @@ import {
30
44
  validateSqlIdentifier as validateSqlIdentifier2,
31
45
  validateWhereClause,
32
46
  watchConfigToSourceConfig
33
- } from "./chunk-C5ODS3XH.js";
34
- import {
35
- ConflictBus,
36
- OfflineDataProvider,
37
- PowerSyncProvider,
38
- ProviderBridge
39
- } from "./chunk-VB737IVN.js";
40
- import "./chunk-YHTZ7VMV.js";
47
+ } from "./chunk-EOW7JK7Q.js";
41
48
  import {
42
49
  PowerSyncErrorBoundary
43
50
  } from "./chunk-P6WOZO7H.js";
51
+ import {
52
+ ConflictBus,
53
+ PowerSyncProvider,
54
+ ProviderBridge,
55
+ UPLOAD_BACKOFF_DELAYS,
56
+ UPLOAD_MAX_RETRIES
57
+ } from "./chunk-P4D6BQ4X.js";
44
58
  import {
45
59
  ATTACHMENT_TABLE,
46
60
  AbstractAttachmentQueue,
@@ -75,6 +89,7 @@ import {
75
89
  extractErrorCode,
76
90
  formatCacheSize,
77
91
  getCachedSize,
92
+ getCustomUrlResolver,
78
93
  getEvictionCandidates,
79
94
  getExcludeProtectedStatesCondition,
80
95
  getExtensionFromMimeType,
@@ -89,22 +104,25 @@ import {
89
104
  getSyncedUploadsWithPendingCallback,
90
105
  isAudioMimeType,
91
106
  isCacheNearCapacity,
107
+ isCustomSource,
92
108
  isDocumentMimeType,
93
109
  isImageMimeType,
94
110
  isLocallyAvailable,
95
111
  isPendingDownloadState,
96
112
  isPermanentError,
97
113
  isProtectedUploadState,
114
+ isSignedUrlSource,
98
115
  isStateTransitionAllowed,
99
116
  isVideoMimeType,
100
117
  markUploadPermanentFailure,
101
118
  markUploadSynced,
119
+ resolveBucketFromConfig,
102
120
  scheduleUploadRetry,
103
121
  startUploadProcessing,
104
122
  stripFileUri,
105
123
  uploadOne,
106
124
  validateSqlIdentifier
107
- } from "./chunk-CACKC6XG.js";
125
+ } from "./chunk-PGEDE6IM.js";
108
126
  import {
109
127
  DeadLetterQueue,
110
128
  createDeadLetterEntry,
@@ -114,18 +132,22 @@ import {
114
132
  isBackgroundSyncRegistered,
115
133
  registerBackgroundSync,
116
134
  unregisterBackgroundSync
117
- } from "./chunk-A4IBBWGO.js";
135
+ } from "./chunk-RALHHPTU.js";
118
136
  import {
137
+ DEFAULT_CONNECTION_HEALTH,
138
+ DEFAULT_SYNC_CONFIG,
139
+ DEFAULT_SYNC_METRICS,
140
+ DEFAULT_SYNC_STATUS,
119
141
  HealthMonitor,
120
142
  MetricsCollector,
121
143
  SyncStatusTracker
122
- } from "./chunk-55DKCJV4.js";
144
+ } from "./chunk-2RDWLXJW.js";
123
145
  import {
124
- DEFAULT_CONNECTION_HEALTH,
125
- DEFAULT_SYNC_CONFIG,
126
- DEFAULT_SYNC_METRICS,
127
- DEFAULT_SYNC_STATUS
128
- } from "./chunk-24RDMMCL.js";
146
+ CompletedTransactionsTable,
147
+ FailedTransactionsTable,
148
+ LOCAL_ONLY_TABLES,
149
+ LOCAL_TABLE_NAMES
150
+ } from "./chunk-OGUFUZSY.js";
129
151
  import {
130
152
  checkIntegrityImpl,
131
153
  checkStorageQuotaImpl,
@@ -133,7 +155,7 @@ import {
133
155
  formatBytes,
134
156
  getCacheStatsImpl,
135
157
  useDatabaseMaintenance
136
- } from "./chunk-WGHNIAF7.js";
158
+ } from "./chunk-YONQYTVH.js";
137
159
  import {
138
160
  AttachmentQueueContext,
139
161
  CompletedTransactionsContext,
@@ -163,6 +185,7 @@ import {
163
185
  usePendingMutationsContext,
164
186
  usePlatform,
165
187
  usePowerSync,
188
+ useRetryCountdown,
166
189
  useSyncActivity,
167
190
  useSyncActivityContext,
168
191
  useSyncControl,
@@ -170,33 +193,45 @@ import {
170
193
  useSyncMode,
171
194
  useSyncModeContext,
172
195
  useSyncStatus,
196
+ useUploadBlockedReason,
197
+ useUploadRetry,
173
198
  useUploadStatus
174
- } from "./chunk-YSTEESEG.js";
199
+ } from "./chunk-74TBHWJ4.js";
175
200
  import "./chunk-T4AO7JIG.js";
176
- import "./chunk-CAB26E6F.js";
201
+ import "./chunk-TGBT5XBE.js";
202
+ import {
203
+ SupabaseUploadHandler,
204
+ createSupabaseUploadHandler
205
+ } from "./chunk-4665ZSE5.js";
177
206
  import {
178
207
  CacheSettingsManager,
179
208
  DEFAULT_CACHE_SETTINGS,
180
209
  createSupabaseStorage,
181
210
  isBlobResult,
182
211
  isFileResult
183
- } from "./chunk-XOY2CJ67.js";
212
+ } from "./chunk-4F5B5CZ7.js";
213
+ import {
214
+ DEFAULT_UPLOAD_NOTIFICATION
215
+ } from "./chunk-ZAN22NGL.js";
184
216
  import {
185
217
  SupabaseStorageAdapter,
186
218
  createSupabaseStorageAdapter,
187
219
  getStorageErrorMessage,
188
220
  isStorageAuthError,
189
221
  normalizeStoragePath
190
- } from "./chunk-XAEII4ZX.js";
191
- import "./chunk-TGBT5XBE.js";
192
- import {
193
- SupabaseUploadHandler,
194
- createSupabaseUploadHandler
195
- } from "./chunk-P4HZA6ZT.js";
222
+ } from "./chunk-NUGQOTEM.js";
196
223
  import {
197
- DEFAULT_UPLOAD_NOTIFICATION,
198
224
  resolveBucket
199
- } from "./chunk-Z6VOBGTU.js";
225
+ } from "./chunk-UOMHWUHV.js";
226
+ import {
227
+ AbortError,
228
+ DEFAULT_BACKOFF_CONFIG,
229
+ RetryExhaustedError,
230
+ addJitter,
231
+ calculateBackoffDelay,
232
+ sleep,
233
+ withExponentialBackoff
234
+ } from "./chunk-FV2HXEIY.js";
200
235
  import "./chunk-W7HSR35B.js";
201
236
  import {
202
237
  ATTACHMENT_DOWNLOAD_TIMEOUT_MS,
@@ -251,6 +286,7 @@ import {
251
286
  detectConflicts,
252
287
  discardOnHttpStatus,
253
288
  discardOnPgCodes,
289
+ discardOnRlsDenied,
254
290
  discardOrphaned,
255
291
  fetchServerVersion,
256
292
  getLocalVersion,
@@ -261,16 +297,7 @@ import {
261
297
  runUploadErrorMiddlewareSync,
262
298
  successOnPgCodes,
263
299
  tableHandlers
264
- } from "./chunk-BGBQYQV3.js";
265
- import {
266
- AbortError,
267
- DEFAULT_BACKOFF_CONFIG,
268
- RetryExhaustedError,
269
- addJitter,
270
- calculateBackoffDelay,
271
- sleep,
272
- withExponentialBackoff
273
- } from "./chunk-FV2HXEIY.js";
300
+ } from "./chunk-65A3SYJZ.js";
274
301
  import {
275
302
  AttachmentError,
276
303
  ConfigurationError,
@@ -289,6 +316,7 @@ import {
289
316
  isRlsError,
290
317
  toSyncOperationError
291
318
  } from "./chunk-I2AYMY5O.js";
319
+ import "./chunk-5WRI5ZAA.js";
292
320
  export {
293
321
  ATTACHMENT_DOWNLOAD_TIMEOUT_MS,
294
322
  ATTACHMENT_RETRY_DELAY_MS,
@@ -308,6 +336,7 @@ export {
308
336
  CircuitBreaker,
309
337
  CircuitOpenError,
310
338
  CompletedTransactionsContext,
339
+ CompletedTransactionsTable,
311
340
  ConfigurationError,
312
341
  ConflictBus,
313
342
  ConflictDetectionError,
@@ -344,12 +373,15 @@ export {
344
373
  EVICTION_TRIGGER_THRESHOLD,
345
374
  EncodingType,
346
375
  FailedTransactionsContext,
376
+ FailedTransactionsTable,
347
377
  HEALTH_CHECK_INTERVAL_MS,
348
378
  HEALTH_CHECK_TIMEOUT_MS,
349
379
  HealthMonitor,
350
380
  InitializationError,
351
381
  LATENCY_DEGRADED_THRESHOLD_MS,
352
382
  LOCALLY_AVAILABLE_STATES,
383
+ LOCAL_ONLY_TABLES,
384
+ LOCAL_TABLE_NAMES,
353
385
  MAX_CONSECUTIVE_FAILURES,
354
386
  MetricsCollector,
355
387
  OfflineDataProvider,
@@ -379,7 +411,6 @@ export {
379
411
  STORAGE_KEY_PREFIX,
380
412
  STORAGE_KEY_SYNC_MODE,
381
413
  STORAGE_WARNING_THRESHOLD,
382
- SlimPowerSyncProvider,
383
414
  SupabaseConnector,
384
415
  SupabaseStorageAdapter,
385
416
  SupabaseUploadHandler,
@@ -391,6 +422,8 @@ export {
391
422
  SyncStatusTracker,
392
423
  TERMINAL_STATES,
393
424
  TransactionAbortError,
425
+ UPLOAD_BACKOFF_DELAYS,
426
+ UPLOAD_MAX_RETRIES,
394
427
  UPLOAD_WORKFLOW_STATES,
395
428
  VALID_STATES,
396
429
  addJitter,
@@ -413,6 +446,7 @@ export {
413
446
  createMigrationStats,
414
447
  createNativePlatformAdapter,
415
448
  createPolAttachmentQueue,
449
+ createSchemaRouter,
416
450
  createSupabaseAuth,
417
451
  createSupabaseStorage,
418
452
  createSupabaseStorageAdapter,
@@ -420,13 +454,15 @@ export {
420
454
  createSyncError,
421
455
  createUploadManagerDeps,
422
456
  createUploadManagerState,
423
- createWatchIds,
457
+ createWatchPaths,
424
458
  defaultSchemaRouter,
425
459
  defineBackgroundSyncTask,
460
+ definePolConfig,
426
461
  detectConflicts,
427
462
  determineAttachmentState,
428
463
  discardOnHttpStatus,
429
464
  discardOnPgCodes,
465
+ discardOnRlsDenied,
430
466
  discardOrphaned,
431
467
  downloadRecord,
432
468
  enforceCacheLimit,
@@ -442,8 +478,10 @@ export {
442
478
  formatMigrationStats,
443
479
  generateDLQEntryId,
444
480
  generateFailureId,
481
+ generatePowerSyncSchema,
445
482
  getCacheStatsImpl,
446
483
  getCachedSize,
484
+ getCustomUrlResolver,
447
485
  getEvictionCandidates,
448
486
  getExcludeProtectedStatesCondition,
449
487
  getExtensionFromMimeType,
@@ -459,6 +497,8 @@ export {
459
497
  getStateName,
460
498
  getStorageErrorMessage,
461
499
  getSyncedUploadsWithPendingCallback,
500
+ getTableFromSchema,
501
+ getTableStrategy,
462
502
  hasVersionColumn,
463
503
  idempotentTables,
464
504
  initializeBackgroundSync,
@@ -466,6 +506,7 @@ export {
466
506
  isBackgroundSyncRegistered,
467
507
  isBlobResult,
468
508
  isCacheNearCapacity,
509
+ isCustomSource,
469
510
  isDocumentMimeType,
470
511
  isDownloadWorkflowState,
471
512
  isFileResult,
@@ -473,10 +514,13 @@ export {
473
514
  isLocallyAvailable,
474
515
  isPendingDownloadState,
475
516
  isPermanentError,
517
+ isProcessedPolConfig,
476
518
  isProtectedUploadState,
477
519
  isRlsError,
520
+ isSignedUrlSource,
478
521
  isStateTransitionAllowed,
479
522
  isStorageAuthError,
523
+ isTablePowerSync,
480
524
  isTerminalState,
481
525
  isUploadWorkflowState,
482
526
  isValidAttachmentState,
@@ -486,9 +530,11 @@ export {
486
530
  migrateAttachmentState,
487
531
  migrateAttachmentStateSafe,
488
532
  normalizeStoragePath,
533
+ normalizeTableSpec,
489
534
  recordMigration,
490
535
  registerBackgroundSync,
491
536
  resolveBucket,
537
+ resolveBucketFromConfig,
492
538
  retryOnHttpStatus,
493
539
  runUploadErrorMiddleware,
494
540
  runUploadErrorMiddlewareSync,
@@ -521,6 +567,7 @@ export {
521
567
  usePlatform,
522
568
  usePowerSync,
523
569
  usePowerSyncContext,
570
+ useRetryCountdown,
524
571
  useSyncActivity,
525
572
  useSyncActivityContext,
526
573
  useSyncControl,
@@ -529,6 +576,8 @@ export {
529
576
  useSyncModeContext,
530
577
  useSyncStatus,
531
578
  useSyncStatusContext,
579
+ useUploadBlockedReason,
580
+ useUploadRetry,
532
581
  useUploadStatus,
533
582
  validateSqlIdentifier2 as validateSqlIdentifier,
534
583
  validateSqlIdentifier as validateSqlIdentifierFromStateMachine,
@@ -1,26 +1,29 @@
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';
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, U as UploadBlockReason } from './types-B9MptP7E.js';
2
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, extractHttpStatusCode, extractTableNames, generateFailureId, isRlsError, toSyncOperationError } from './core/index.js';
3
- export { A as AuthProvider, i as ConflictBus, j as ConflictCheckResult, m as ConflictDetectionConfig, l as ConflictHandler, n as ConflictListener, k as ConflictResolution, C as ConnectorCircuitBreakerConfig, a as ConnectorConfig, c as CrudHandler, D as DEFAULT_RETRY_CONFIG, F as FieldConflict, P as PowerSyncCredentials, o as ResolutionListener, e as RetryConfig, R as RetryStrategyConfig, b as SchemaRouter, f as Session, S as SupabaseConnectorOptions, U as UploadErrorClassification, g as UploadErrorContext, h as UploadErrorMiddleware, d as defaultSchemaRouter } from './types-DiBvmGEi.js';
4
- export { S as SupabaseConnector } from './supabase-connector-D2oIl2t8.js';
5
- export { AuthRefreshError, CircuitBreaker, CircuitBreakerConfig, CircuitBreakerStats, CircuitOpenError, CircuitState, DEFAULT_CIRCUIT_BREAKER_CONFIG, DiscardEntryError, SupabaseAuthOptions, TransactionAbortError, createSupabaseAuth, discardOnHttpStatus, discardOnPgCodes, discardOrphaned, idempotentTables, retryOnHttpStatus, runUploadErrorMiddleware, runUploadErrorMiddlewareSync, successOnPgCodes, tableHandlers } from './connector/index.js';
6
- export { f as AttachmentConfig, F as AttachmentRecord, A as AttachmentSourceConfig, x as AttachmentStatsRow, g as AttachmentStorageAdapter, w as AttachmentSyncStats, v as AttachmentSyncStatus, B as BatchFilterContext, n as CACHE_SIZE_PRESETS, l as CacheConfig, y as CacheFileRow, o as CacheSizePreset, p as CacheSizeValue, z as CachedSizeRow, C as CompressionConfig, m as DEFAULT_CACHE_CONFIG, D as DEFAULT_COMPRESSION_CONFIG, k as DEFAULT_DOWNLOAD_CONFIG, h as DEFAULT_UPLOAD_CONFIG, j as DownloadConfig, r as DownloadPhase, s as DownloadStatus, E as EvictRow, I as IdRow, P as PolAttachmentQueue, a as PolAttachmentQueueOptions, d as PolAttachmentRecord, b as PolAttachmentState, S as SimpleAttachmentConfig, e as SkipDownloadContext, U as UploadConfig, i as UploadHandler, t as UploadPhase, u as UploadStatus, W as WatchConfig, c as createPolAttachmentQueue, q as formatCacheSize } from './pol-attachment-queue-BE2HU3Us.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, createWatchIds, determineAttachmentState, downloadRecord, enforceCacheLimit, ensureFileUri, extractErrorCode, extractIdsFromRows, 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';
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';
9
- export { DeadLetterEntry, DeadLetterQueue, DeadLetterQueueListener, DeadLetterQueueOptions, DeadLetterReason, HealthMonitor, MetricsCollector, SyncStatusTracker, createDeadLetterEntry, generateDLQEntryId } from './sync/index.js';
3
+ export { A as AuthProvider, i as ConflictBus, j as ConflictCheckResult, m as ConflictDetectionConfig, l as ConflictHandler, n as ConflictListener, k as ConflictResolution, C as ConnectorCircuitBreakerConfig, a as ConnectorConfig, c as CrudHandler, D as DEFAULT_RETRY_CONFIG, F as FieldConflict, P as PowerSyncCredentials, o as ResolutionListener, e as RetryConfig, R as RetryStrategyConfig, b as SchemaRouter, f as Session, S as SupabaseConnectorOptions, U as UploadErrorClassification, g as UploadErrorContext, h as UploadErrorMiddleware, d as defaultSchemaRouter } from './types-DqJnP50o.js';
4
+ export { S as SupabaseConnector } from './supabase-connector-HMxBA9Kg.js';
5
+ export { AuthRefreshError, CircuitBreaker, CircuitBreakerConfig, CircuitBreakerStats, CircuitOpenError, CircuitState, DEFAULT_CIRCUIT_BREAKER_CONFIG, DiscardEntryError, SupabaseAuthOptions, TransactionAbortError, createSupabaseAuth, discardOnHttpStatus, discardOnPgCodes, discardOnRlsDenied, discardOrphaned, idempotentTables, retryOnHttpStatus, runUploadErrorMiddleware, runUploadErrorMiddlewareSync, successOnPgCodes, tableHandlers } from './connector/index.js';
6
+ export { P as PolAttachmentQueue, a as PolAttachmentQueueOptions, c as createPolAttachmentQueue } from './pol-attachment-queue-DqBvLAEY.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, createWatchPaths, determineAttachmentState, downloadRecord, enforceCacheLimit, ensureFileUri, extractErrorCode, extractIdsFromRows, 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';
8
+ export { d as AttachmentConfig, z as AttachmentRecord, A as AttachmentSource, c as AttachmentSourceConfig, w as AttachmentStatsRow, e as AttachmentStorageAdapter, v as AttachmentSyncStats, u as AttachmentSyncStatus, m as CACHE_SIZE_PRESETS, k as CacheConfig, x as CacheFileRow, n as CacheSizePreset, o as CacheSizeValue, y as CachedSizeRow, f as CompressionConfig, C as CustomAttachmentSource, 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, a as PolAttachmentRecord, A as PolAttachmentSource, P as PolAttachmentState, S as SimpleAttachmentConfig, b as SupabaseBucketSource, U as UploadConfig, h as UploadHandler, s as UploadPhase, t as UploadStatus, W as WatchConfig, p as formatCacheSize, H as getCustomUrlResolver, G as isCustomSource, F as isSignedUrlSource, B as resolveBucketFromConfig } from './types-JCEhw2Lf.js';
9
+ 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-BujnI3IR.js';
10
+ export { CompletedTransactionsTable, DeadLetterEntry, DeadLetterQueue, DeadLetterQueueListener, DeadLetterQueueOptions, DeadLetterReason, FailedTransactionsTable, HealthMonitor, LOCAL_ONLY_TABLES, LOCAL_TABLE_NAMES, MetricsCollector, SyncStatusTracker, createDeadLetterEntry, generateDLQEntryId } from './sync/index.js';
10
11
  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';
12
+ export { createSchemaRouter, definePolConfig, generatePowerSyncSchema, getTableFromSchema, getTableStrategy, isProcessedPolConfig, isTablePowerSync, normalizeTableSpec } from './config/index.js';
11
13
  export { DatabaseMaintenanceUtils, checkIntegrityImpl, checkStorageQuotaImpl, compactDatabaseImpl, getCacheStatsImpl, useDatabaseMaintenance } from './maintenance/index.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
+ 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-CGMibJKD.js';
15
+ 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-0H_7thHW.js';
16
+ export { D as DEFAULT_UPLOAD_NOTIFICATION, S as SupabaseUploadHandlerOptions, U as UploadEventHandlers, a as UploadNotificationConfig } from './types-6QHGELuY.js';
15
17
  export { SupabaseUploadHandler, createSupabaseUploadHandler } from './storage/upload/index.js';
16
18
  export { PowerSyncErrorBoundary } from './error/index.js';
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';
19
+ 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, OfflineDataProviderConfig, OfflineDataProviderProps, PendingMutationsContext, PendingMutationsContextValue, PowerSyncConfig, PowerSyncContext, PowerSyncContextValue, PowerSyncProvider, PowerSyncProviderProps, PowerSyncSyncStatusSnapshot, ProviderBridge, ProviderBridgeProps, ResetSyncOptions, RetryCountdownResult, SyncActivityContext, SyncActivityContextValue, SyncActivityResult, SyncConfig, SyncMetricsContext, SyncMetricsContextValue, SyncModeContext, SyncModeContextValue, SyncStatusContext, SyncStatusContextValue, UPLOAD_BACKOFF_DELAYS, UPLOAD_MAX_RETRIES, UploadBlockedReasonResult, UploadStatusResult, useAttachmentQueue, useAttachmentQueueReady, useCompletedTransactions, useCompletedTransactionsContext, useConnectionHealth, useConnectionStatus, useDatabase, useDownloadProgress, useEntitySyncStatus, useFailedTransactions, useFailedTransactionsContext, useIsSyncing, useOnlineStatus, usePendingMutations, usePendingMutationsContext, usePlatform, usePowerSync, useRetryCountdown, useSyncActivity, useSyncActivityContext, useSyncControl, useSyncMetrics, useSyncMode, useSyncModeContext, useSyncStatus, useUploadBlockedReason, useUploadRetry, useUploadStatus } from './provider/index.js';
20
+ export { AttachmentQueueContextValue, useAttachmentQueueContext, usePowerSyncContext, useSyncStatusContext } from './react/index.js';
19
21
  export { AsyncStorageAdapter, CompressedImage, CompressionOptions, ConnectionType, DatabaseOptions, FileInfo, FileSystemAdapter, ImageProcessorAdapter, LoggerAdapter, NetworkAdapter, PlatformAdapter, PlatformType, detectPlatform } from './platform/index.js';
20
22
  export { createWebPlatformAdapter } from './platform/index.web.js';
21
23
  export { ATTACHMENT_TABLE, AbstractAttachmentQueue, AttachmentState, AttachmentTable, AttachmentTableOptions, AttachmentQueueOptions as BaseAttachmentQueueOptions, DEFAULT_ATTACHMENT_QUEUE_OPTIONS, EncodingType, AttachmentRecord as OfficialAttachmentRecord, StorageAdapter } from '@powersync/attachments';
22
24
  export { AbstractPowerSyncDatabase as PowerSyncDBInterface } from '@powersync/common';
25
+ export { g as DatabaseColumnDef, D as DatabaseSchemaObject, f as DatabaseTableDef, P as PolConfig, c as PolConfigAttachments, d as PolConfigConnector, e as PolConfigSync, a as ProcessedPolConfig, b as ProcessedTableStrategy, T as TableSpec } from './types-BhAEsJj-.js';
23
26
  import '@supabase/supabase-js';
27
+ import '@powersync/react-native';
24
28
  import 'react';
25
29
  import '@tanstack/react-query';
26
- import '@powersync/react-native';