@pol-studios/db 1.0.58 → 1.0.59
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/dist/DataLayerContext-V5FotiSk.d.ts +563 -0
- package/dist/auth/context.js +2 -2
- package/dist/auth/hooks.js +3 -3
- package/dist/auth/index.js +3 -3
- package/dist/{chunk-YRIPM2AN.js → chunk-4PZ744G2.js} +207 -6
- package/dist/chunk-4PZ744G2.js.map +1 -0
- package/dist/{chunk-6SDH7M7J.js → chunk-ARALLEDJ.js} +2 -2
- package/dist/{chunk-Z456IHCB.js → chunk-F4HW4NT5.js} +1 -1
- package/dist/chunk-F4HW4NT5.js.map +1 -0
- package/dist/{chunk-OK2C54B6.js → chunk-K46TGKB2.js} +323 -379
- package/dist/chunk-K46TGKB2.js.map +1 -0
- package/dist/{chunk-GWYTROSD.js → chunk-L4DFVMTS.js} +335 -4
- package/dist/chunk-L4DFVMTS.js.map +1 -0
- package/dist/{chunk-MEBT5YHA.js → chunk-SNPZMRBC.js} +2 -2
- package/dist/{chunk-LG3OHLGB.js → chunk-VADZSRHY.js} +16 -337
- package/dist/chunk-VADZSRHY.js.map +1 -0
- package/dist/{chunk-4EO55YV2.js → chunk-VSY6766U.js} +4 -4
- package/dist/{chunk-VYFAMTHI.js → chunk-WY6MNB6K.js} +2 -2
- package/dist/core/index.d.ts +1 -1
- package/dist/{executor-D15yjeMo.d.ts → executor-Bu1OlqCl.d.ts} +43 -3
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/index.js +2 -2
- package/dist/{index-CFUuTzXO.d.ts → index-vwVJ0BWj.d.ts} +1 -9
- package/dist/index.d.ts +5 -5
- package/dist/index.js +20 -12
- package/dist/index.native.d.ts +77 -76
- package/dist/index.native.js +20 -12
- package/dist/index.web.d.ts +21 -44
- package/dist/index.web.js +215 -149
- package/dist/index.web.js.map +1 -1
- package/dist/powersync-bridge/index.d.ts +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/query/index.js +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.js +1 -1
- package/dist/{useDbCount-Ckb-FhZk.d.ts → useDbCount-dCkdaBpP.d.ts} +41 -83
- package/dist/{useResolveFeedback-CuUkdHoR.d.ts → useResolveFeedback-thFi-4h8.d.ts} +429 -5
- package/dist/with-auth/index.js +5 -5
- package/package.json +1 -1
- package/dist/DataLayerContext-BYZtDD0g.d.ts +0 -946
- package/dist/chunk-GWYTROSD.js.map +0 -1
- package/dist/chunk-LG3OHLGB.js.map +0 -1
- package/dist/chunk-OK2C54B6.js.map +0 -1
- package/dist/chunk-YRIPM2AN.js.map +0 -1
- package/dist/chunk-Z456IHCB.js.map +0 -1
- /package/dist/{chunk-6SDH7M7J.js.map → chunk-ARALLEDJ.js.map} +0 -0
- /package/dist/{chunk-MEBT5YHA.js.map → chunk-SNPZMRBC.js.map} +0 -0
- /package/dist/{chunk-4EO55YV2.js.map → chunk-VSY6766U.js.map} +0 -0
- /package/dist/{chunk-VYFAMTHI.js.map → chunk-WY6MNB6K.js.map} +0 -0
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
createAdapterRegistry,
|
|
2
|
+
SyncTrackingAdapter,
|
|
4
3
|
createSupabaseAdapter,
|
|
4
|
+
getPowerSyncAlias,
|
|
5
5
|
stripSchemaPrefix
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VADZSRHY.js";
|
|
7
7
|
import {
|
|
8
8
|
DataLayerContext,
|
|
9
9
|
DataLayerCoreContext,
|
|
10
10
|
DataLayerNestingContext,
|
|
11
11
|
DataLayerStatusContext
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-L4DFVMTS.js";
|
|
13
13
|
import {
|
|
14
|
-
QueryExecutor
|
|
15
|
-
|
|
14
|
+
QueryExecutor,
|
|
15
|
+
transformResultsFromStorage,
|
|
16
|
+
transformWithRelations
|
|
17
|
+
} from "./chunk-4PZ744G2.js";
|
|
16
18
|
import {
|
|
17
19
|
extractRelationNames,
|
|
18
20
|
parseSelect
|
|
@@ -1000,112 +1002,6 @@ var require_es = __commonJS({
|
|
|
1000
1002
|
}
|
|
1001
1003
|
});
|
|
1002
1004
|
|
|
1003
|
-
// src/utils/type-transformer.ts
|
|
1004
|
-
var columnMapCache = /* @__PURE__ */ new WeakMap();
|
|
1005
|
-
function getOrCreateSchemaCache(schema) {
|
|
1006
|
-
let cache = columnMapCache.get(schema);
|
|
1007
|
-
if (!cache) {
|
|
1008
|
-
cache = /* @__PURE__ */ new Map();
|
|
1009
|
-
columnMapCache.set(schema, cache);
|
|
1010
|
-
}
|
|
1011
|
-
return cache;
|
|
1012
|
-
}
|
|
1013
|
-
function transformValueFromStorage(value, columnInfo) {
|
|
1014
|
-
if (value === null || value === void 0) {
|
|
1015
|
-
return value;
|
|
1016
|
-
}
|
|
1017
|
-
switch (columnInfo.type) {
|
|
1018
|
-
case "boolean":
|
|
1019
|
-
if (typeof value === "number") {
|
|
1020
|
-
return value === 1;
|
|
1021
|
-
}
|
|
1022
|
-
if (typeof value === "string") {
|
|
1023
|
-
return value === "1" || value.toLowerCase() === "true";
|
|
1024
|
-
}
|
|
1025
|
-
return Boolean(value);
|
|
1026
|
-
case "number":
|
|
1027
|
-
if (typeof value === "string") {
|
|
1028
|
-
const num = Number(value);
|
|
1029
|
-
return isNaN(num) ? value : num;
|
|
1030
|
-
}
|
|
1031
|
-
return value;
|
|
1032
|
-
case "date":
|
|
1033
|
-
return value;
|
|
1034
|
-
case "enum":
|
|
1035
|
-
case "string":
|
|
1036
|
-
default:
|
|
1037
|
-
return value;
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
function getColumnInfoMap(schema, tableName) {
|
|
1041
|
-
const cache = getOrCreateSchemaCache(schema);
|
|
1042
|
-
if (cache.has(tableName)) {
|
|
1043
|
-
return cache.get(tableName);
|
|
1044
|
-
}
|
|
1045
|
-
const columnMap = /* @__PURE__ */ new Map();
|
|
1046
|
-
for (const schemaName of Object.keys(schema.schemas)) {
|
|
1047
|
-
const schemaData = schema.schemas[schemaName];
|
|
1048
|
-
const table = schemaData.tables?.[tableName];
|
|
1049
|
-
if (table) {
|
|
1050
|
-
for (const col of table.columns) {
|
|
1051
|
-
columnMap.set(col.name, col);
|
|
1052
|
-
}
|
|
1053
|
-
cache.set(tableName, columnMap);
|
|
1054
|
-
return columnMap;
|
|
1055
|
-
}
|
|
1056
|
-
const view = schemaData.views?.[tableName];
|
|
1057
|
-
if (view) {
|
|
1058
|
-
for (const col of view.columns) {
|
|
1059
|
-
columnMap.set(col.name, col);
|
|
1060
|
-
}
|
|
1061
|
-
cache.set(tableName, columnMap);
|
|
1062
|
-
return columnMap;
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
cache.set(tableName, null);
|
|
1066
|
-
return null;
|
|
1067
|
-
}
|
|
1068
|
-
function transformRowFromStorage(row, schema, tableName) {
|
|
1069
|
-
const columnMap = getColumnInfoMap(schema, tableName);
|
|
1070
|
-
if (!columnMap) {
|
|
1071
|
-
return row;
|
|
1072
|
-
}
|
|
1073
|
-
const result = {};
|
|
1074
|
-
for (const [key, value] of Object.entries(row)) {
|
|
1075
|
-
const columnInfo = columnMap.get(key);
|
|
1076
|
-
if (columnInfo) {
|
|
1077
|
-
result[key] = transformValueFromStorage(value, columnInfo);
|
|
1078
|
-
} else {
|
|
1079
|
-
result[key] = value;
|
|
1080
|
-
}
|
|
1081
|
-
}
|
|
1082
|
-
return result;
|
|
1083
|
-
}
|
|
1084
|
-
function transformResultsFromStorage(rows, schema, tableName) {
|
|
1085
|
-
return rows.map((row) => transformRowFromStorage(row, schema, tableName));
|
|
1086
|
-
}
|
|
1087
|
-
function transformWithRelations(row, schema, tableName) {
|
|
1088
|
-
const columnMap = getColumnInfoMap(schema, tableName);
|
|
1089
|
-
const result = {};
|
|
1090
|
-
for (const [key, value] of Object.entries(row)) {
|
|
1091
|
-
if (value !== null && typeof value === "object" && !Array.isArray(value)) {
|
|
1092
|
-
result[key] = transformWithRelations(value, schema, key);
|
|
1093
|
-
} else if (Array.isArray(value) && value.length > 0 && typeof value[0] === "object") {
|
|
1094
|
-
result[key] = value.map((item) => transformWithRelations(item, schema, key));
|
|
1095
|
-
} else if (columnMap) {
|
|
1096
|
-
const columnInfo = columnMap.get(key);
|
|
1097
|
-
if (columnInfo) {
|
|
1098
|
-
result[key] = transformValueFromStorage(value, columnInfo);
|
|
1099
|
-
} else {
|
|
1100
|
-
result[key] = value;
|
|
1101
|
-
}
|
|
1102
|
-
} else {
|
|
1103
|
-
result[key] = value;
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
return result;
|
|
1107
|
-
}
|
|
1108
|
-
|
|
1109
1005
|
// src/adapters/powersync-adapter.ts
|
|
1110
1006
|
import stringify from "fast-json-stable-stringify";
|
|
1111
1007
|
var DEFAULT_MAX_SUBSCRIPTIONS = 100;
|
|
@@ -1120,7 +1016,6 @@ var PowerSyncAdapter = class {
|
|
|
1120
1016
|
constructor(db, schema, options) {
|
|
1121
1017
|
this.db = db;
|
|
1122
1018
|
this.schema = schema;
|
|
1123
|
-
this.executor = new QueryExecutor(db, schema);
|
|
1124
1019
|
if (typeof options === "function") {
|
|
1125
1020
|
this.tableNameResolver = options;
|
|
1126
1021
|
this.maxSubscriptions = DEFAULT_MAX_SUBSCRIPTIONS;
|
|
@@ -1128,6 +1023,7 @@ var PowerSyncAdapter = class {
|
|
|
1128
1023
|
this.tableNameResolver = options?.tableNameResolver;
|
|
1129
1024
|
this.maxSubscriptions = options?.maxSubscriptions ?? DEFAULT_MAX_SUBSCRIPTIONS;
|
|
1130
1025
|
}
|
|
1026
|
+
this.executor = new QueryExecutor(db, schema, this.tableNameResolver);
|
|
1131
1027
|
}
|
|
1132
1028
|
/**
|
|
1133
1029
|
* Unique identifier for this adapter type
|
|
@@ -1494,12 +1390,13 @@ var PowerSyncAdapter = class {
|
|
|
1494
1390
|
return this.schema;
|
|
1495
1391
|
}
|
|
1496
1392
|
};
|
|
1497
|
-
function createPowerSyncAdapter(db, schema) {
|
|
1498
|
-
return new PowerSyncAdapter(db, schema);
|
|
1393
|
+
function createPowerSyncAdapter(db, schema, options) {
|
|
1394
|
+
return new PowerSyncAdapter(db, schema, options);
|
|
1499
1395
|
}
|
|
1500
1396
|
|
|
1501
1397
|
// src/providers/DataLayerProvider.tsx
|
|
1502
|
-
import {
|
|
1398
|
+
import { c as _c } from "react/compiler-runtime";
|
|
1399
|
+
import { useRef, useEffect, useContext } from "react";
|
|
1503
1400
|
import { jsx } from "react/jsx-runtime";
|
|
1504
1401
|
var defaultSyncStatus = {
|
|
1505
1402
|
isConnected: false,
|
|
@@ -1521,7 +1418,6 @@ var defaultSyncControl = {
|
|
|
1521
1418
|
setScope: async () => {
|
|
1522
1419
|
console.warn("Scope control not available: PowerSync not initialized");
|
|
1523
1420
|
},
|
|
1524
|
-
// Auto-retry controls
|
|
1525
1421
|
pauseAutoRetry: () => {
|
|
1526
1422
|
console.warn("Pause auto-retry not available: PowerSync not initialized");
|
|
1527
1423
|
},
|
|
@@ -1529,281 +1425,329 @@ var defaultSyncControl = {
|
|
|
1529
1425
|
console.warn("Resume auto-retry not available: PowerSync not initialized");
|
|
1530
1426
|
},
|
|
1531
1427
|
isAutoRetryPaused: false,
|
|
1532
|
-
// Pending mutations
|
|
1533
1428
|
addPendingMutation: () => {
|
|
1534
1429
|
},
|
|
1535
1430
|
removePendingMutation: () => {
|
|
1536
1431
|
}
|
|
1537
1432
|
};
|
|
1538
|
-
function DataLayerProvider({
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
}
|
|
1433
|
+
function DataLayerProvider(t0) {
|
|
1434
|
+
const $ = _c(68);
|
|
1435
|
+
const {
|
|
1436
|
+
config,
|
|
1437
|
+
children,
|
|
1438
|
+
powerSyncInstance: t1,
|
|
1439
|
+
supabaseClient,
|
|
1440
|
+
queryClient,
|
|
1441
|
+
syncControl: externalSyncControl,
|
|
1442
|
+
powerSyncSyncStatus
|
|
1443
|
+
} = t0;
|
|
1444
|
+
const powerSyncInstance = t1 === void 0 ? null : t1;
|
|
1445
|
+
const hasSynced = powerSyncSyncStatus?.hasSynced ?? (powerSyncInstance ? false : true);
|
|
1446
|
+
const isOnline = powerSyncSyncStatus?.isOnline ?? (typeof navigator !== "undefined" ? navigator.onLine : false);
|
|
1549
1447
|
const isNested = useContext(DataLayerNestingContext);
|
|
1550
1448
|
const hasWarnedNesting = useRef(false);
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1449
|
+
let t2;
|
|
1450
|
+
let t3;
|
|
1451
|
+
if ($[0] !== isNested) {
|
|
1452
|
+
t2 = () => {
|
|
1453
|
+
if (isNested && !hasWarnedNesting.current && typeof __DEV__ !== "undefined" && __DEV__) {
|
|
1454
|
+
hasWarnedNesting.current = true;
|
|
1455
|
+
console.warn("[DataLayerProvider] Nested DataLayerProvider detected! This usually indicates a setup issue. Remove the outer wrapper.");
|
|
1456
|
+
}
|
|
1457
|
+
};
|
|
1458
|
+
t3 = [isNested];
|
|
1459
|
+
$[0] = isNested;
|
|
1460
|
+
$[1] = t2;
|
|
1461
|
+
$[2] = t3;
|
|
1462
|
+
} else {
|
|
1463
|
+
t2 = $[1];
|
|
1464
|
+
t3 = $[2];
|
|
1554
1465
|
}
|
|
1555
|
-
|
|
1556
|
-
const
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1466
|
+
useEffect(t2, t3);
|
|
1467
|
+
const syncControl = externalSyncControl ?? defaultSyncControl;
|
|
1468
|
+
let t4;
|
|
1469
|
+
if ($[3] !== config.tables) {
|
|
1470
|
+
t4 = (table) => {
|
|
1471
|
+
const tableWithoutSchema = table.includes(".") ? stripSchemaPrefix(table) : table;
|
|
1472
|
+
return config.tables[table] ?? config.tables[tableWithoutSchema];
|
|
1473
|
+
};
|
|
1474
|
+
$[3] = config.tables;
|
|
1475
|
+
$[4] = t4;
|
|
1476
|
+
} else {
|
|
1477
|
+
t4 = $[4];
|
|
1478
|
+
}
|
|
1479
|
+
const getTableStrategy = t4;
|
|
1480
|
+
let t5;
|
|
1481
|
+
if ($[5] !== config.tables) {
|
|
1482
|
+
t5 = (table_0) => {
|
|
1483
|
+
const tableWithoutSchema_0 = table_0.includes(".") ? stripSchemaPrefix(table_0) : table_0;
|
|
1484
|
+
const strategy = config.tables[table_0] ?? config.tables[tableWithoutSchema_0];
|
|
1485
|
+
const configKey = config.tables[table_0] ? table_0 : tableWithoutSchema_0;
|
|
1486
|
+
return getPowerSyncAlias(configKey, strategy);
|
|
1487
|
+
};
|
|
1488
|
+
$[5] = config.tables;
|
|
1489
|
+
$[6] = t5;
|
|
1490
|
+
} else {
|
|
1491
|
+
t5 = $[6];
|
|
1492
|
+
}
|
|
1493
|
+
const getTableAlias = t5;
|
|
1494
|
+
let t6;
|
|
1495
|
+
if ($[7] !== config.schema || $[8] !== supabaseClient) {
|
|
1496
|
+
t6 = createSupabaseAdapter(supabaseClient, config.schema);
|
|
1497
|
+
$[7] = config.schema;
|
|
1498
|
+
$[8] = supabaseClient;
|
|
1499
|
+
$[9] = t6;
|
|
1500
|
+
} else {
|
|
1501
|
+
t6 = $[9];
|
|
1502
|
+
}
|
|
1503
|
+
const supabaseAdapter = t6;
|
|
1504
|
+
let powerSyncAdapter = null;
|
|
1505
|
+
let syncTrackingAdapter = null;
|
|
1506
|
+
if (powerSyncInstance) {
|
|
1507
|
+
if ($[10] !== config.schema || $[11] !== externalSyncControl || $[12] !== getTableAlias || $[13] !== powerSyncInstance) {
|
|
1508
|
+
powerSyncAdapter = createPowerSyncAdapter(powerSyncInstance, config.schema, {
|
|
1509
|
+
tableNameResolver: getTableAlias
|
|
1578
1510
|
});
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
registry.setPowerSyncAdapter(powerSyncAdapter);
|
|
1511
|
+
if (externalSyncControl?.addPendingMutation) {
|
|
1512
|
+
syncTrackingAdapter = new SyncTrackingAdapter(powerSyncAdapter, {
|
|
1513
|
+
addPendingMutation: externalSyncControl.addPendingMutation,
|
|
1514
|
+
removePendingMutation: externalSyncControl.removePendingMutation
|
|
1515
|
+
});
|
|
1585
1516
|
}
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
});
|
|
1596
|
-
registry.initializeAutoDetection(detector);
|
|
1597
|
-
const detection = detector.detect();
|
|
1598
|
-
setStatus({
|
|
1599
|
-
isInitialized: true,
|
|
1600
|
-
currentBackend: detection.recommendedBackend,
|
|
1601
|
-
powerSyncStatus: detection.powerSyncStatus,
|
|
1602
|
-
isOnline: detection.isOnline,
|
|
1603
|
-
lastDetection: detection,
|
|
1604
|
-
error: null,
|
|
1605
|
-
hasSynced: false
|
|
1606
|
-
// Will be updated by Sync Status Update Effect
|
|
1607
|
-
});
|
|
1608
|
-
} catch (error) {
|
|
1609
|
-
const err = error instanceof Error ? error : new Error(String(error));
|
|
1610
|
-
setStatus((prev) => ({
|
|
1611
|
-
...prev,
|
|
1612
|
-
error: err
|
|
1613
|
-
}));
|
|
1614
|
-
onError?.(err);
|
|
1615
|
-
}
|
|
1616
|
-
}, [powerSyncInstance, supabaseClient, queryClient, config.schema, registry, onError]);
|
|
1617
|
-
useEffect(() => {
|
|
1618
|
-
if (powerSyncSyncStatus?.isOnline !== void 0) {
|
|
1619
|
-
return;
|
|
1517
|
+
$[10] = config.schema;
|
|
1518
|
+
$[11] = externalSyncControl;
|
|
1519
|
+
$[12] = getTableAlias;
|
|
1520
|
+
$[13] = powerSyncInstance;
|
|
1521
|
+
$[14] = powerSyncAdapter;
|
|
1522
|
+
$[15] = syncTrackingAdapter;
|
|
1523
|
+
} else {
|
|
1524
|
+
powerSyncAdapter = $[14];
|
|
1525
|
+
syncTrackingAdapter = $[15];
|
|
1620
1526
|
}
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
setStatus((prev) => ({
|
|
1629
|
-
...prev,
|
|
1630
|
-
currentBackend: detection.recommendedBackend,
|
|
1631
|
-
powerSyncStatus: detection.powerSyncStatus,
|
|
1632
|
-
lastDetection: detection
|
|
1633
|
-
}));
|
|
1634
|
-
}
|
|
1527
|
+
}
|
|
1528
|
+
let t7;
|
|
1529
|
+
if ($[16] !== powerSyncAdapter || $[17] !== supabaseAdapter || $[18] !== syncTrackingAdapter) {
|
|
1530
|
+
t7 = {
|
|
1531
|
+
supabase: supabaseAdapter,
|
|
1532
|
+
powerSync: powerSyncAdapter,
|
|
1533
|
+
syncTracking: syncTrackingAdapter
|
|
1635
1534
|
};
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
}
|
|
1535
|
+
$[16] = powerSyncAdapter;
|
|
1536
|
+
$[17] = supabaseAdapter;
|
|
1537
|
+
$[18] = syncTrackingAdapter;
|
|
1538
|
+
$[19] = t7;
|
|
1539
|
+
} else {
|
|
1540
|
+
t7 = $[19];
|
|
1541
|
+
}
|
|
1542
|
+
const adapters = t7;
|
|
1543
|
+
let t8;
|
|
1544
|
+
if ($[20] !== getTableStrategy) {
|
|
1545
|
+
t8 = (table_1) => {
|
|
1546
|
+
const strategy_0 = getTableStrategy(table_1);
|
|
1547
|
+
return strategy_0?.strategy === "powersync" || strategy_0?.strategy === "hybrid" || strategy_0?.strategy === "auto" || !strategy_0;
|
|
1650
1548
|
};
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
useEffect(() => {
|
|
1675
|
-
const currentDetector = registry.getAutoDetector();
|
|
1676
|
-
if (!currentDetector) return;
|
|
1677
|
-
if (powerSyncInstance && currentDetector.getPowerSync() !== powerSyncInstance) {
|
|
1678
|
-
currentDetector.setPowerSyncDb(powerSyncInstance);
|
|
1679
|
-
}
|
|
1680
|
-
currentDetector.updateSyncStatus(powerSyncSyncStatus ?? null);
|
|
1681
|
-
setStatus((prev) => {
|
|
1682
|
-
const newHasSynced = powerSyncSyncStatus?.hasSynced ?? false;
|
|
1683
|
-
const newIsOnline = powerSyncSyncStatus?.isOnline;
|
|
1684
|
-
const hasSyncedChanged = prev.hasSynced !== newHasSynced;
|
|
1685
|
-
const isOnlineChanged = newIsOnline !== void 0 && prev.isOnline !== newIsOnline;
|
|
1686
|
-
if (!hasSyncedChanged && !isOnlineChanged) {
|
|
1687
|
-
return prev;
|
|
1549
|
+
$[20] = getTableStrategy;
|
|
1550
|
+
$[21] = t8;
|
|
1551
|
+
} else {
|
|
1552
|
+
t8 = $[21];
|
|
1553
|
+
}
|
|
1554
|
+
const usesPowerSync = t8;
|
|
1555
|
+
let t9;
|
|
1556
|
+
if ($[22] !== config.tables) {
|
|
1557
|
+
t9 = () => Object.entries(config.tables).filter(_temp).map(_temp2);
|
|
1558
|
+
$[22] = config.tables;
|
|
1559
|
+
$[23] = t9;
|
|
1560
|
+
} else {
|
|
1561
|
+
t9 = $[23];
|
|
1562
|
+
}
|
|
1563
|
+
const getPowerSyncTables = t9;
|
|
1564
|
+
let t10;
|
|
1565
|
+
if ($[24] !== adapters.powerSync || $[25] !== adapters.supabase || $[26] !== adapters.syncTracking || $[27] !== config.tables) {
|
|
1566
|
+
t10 = (table_2, t112) => {
|
|
1567
|
+
t112 === void 0 ? "read" : t112;
|
|
1568
|
+
const tableWithoutSchema_1 = table_2.includes(".") ? stripSchemaPrefix(table_2) : table_2;
|
|
1569
|
+
const strategy_3 = config.tables[table_2] ?? config.tables[tableWithoutSchema_1];
|
|
1570
|
+
if (strategy_3?.strategy === "supabase") {
|
|
1571
|
+
return adapters.supabase;
|
|
1688
1572
|
}
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1573
|
+
const isPowerSyncTable = !strategy_3 || strategy_3.strategy === "powersync" || strategy_3.strategy === "hybrid" || strategy_3.strategy === "auto";
|
|
1574
|
+
if (isPowerSyncTable && adapters.powerSync) {
|
|
1575
|
+
const powerSyncTableKeys = Object.keys(config.tables).filter((key_0) => {
|
|
1576
|
+
const s = config.tables[key_0];
|
|
1577
|
+
return s.strategy === "powersync" || s.strategy === "hybrid" || s.strategy === "auto";
|
|
1578
|
+
});
|
|
1579
|
+
const isConfigured = powerSyncTableKeys.some((key_1) => key_1 === table_2 || key_1 === tableWithoutSchema_1 || key_1.includes(".") && key_1.split(".")[1] === tableWithoutSchema_1);
|
|
1580
|
+
if (isConfigured) {
|
|
1581
|
+
return adapters.syncTracking ?? adapters.powerSync;
|
|
1582
|
+
}
|
|
1583
|
+
if (typeof __DEV__ !== "undefined" && __DEV__) {
|
|
1584
|
+
console.warn(`[DataLayerProvider] Table "${table_2}" is not configured for PowerSync. Using Supabase fallback.`);
|
|
1694
1585
|
}
|
|
1695
|
-
};
|
|
1696
|
-
});
|
|
1697
|
-
}, [
|
|
1698
|
-
// Note: We use registry.getAutoDetector() instead of autoDetector state
|
|
1699
|
-
// to avoid race conditions. The registry is stable and always has the latest detector.
|
|
1700
|
-
registry,
|
|
1701
|
-
powerSyncInstance,
|
|
1702
|
-
powerSyncSyncStatus?.hasSynced,
|
|
1703
|
-
powerSyncSyncStatus?.connected,
|
|
1704
|
-
powerSyncSyncStatus?.connecting,
|
|
1705
|
-
powerSyncSyncStatus?.isOnline
|
|
1706
|
-
]);
|
|
1707
|
-
useEffect(() => {
|
|
1708
|
-
if (registry) {
|
|
1709
|
-
registry.setSyncTracker({
|
|
1710
|
-
addPendingMutation: resolvedSyncControl.addPendingMutation,
|
|
1711
|
-
removePendingMutation: resolvedSyncControl.removePendingMutation
|
|
1712
|
-
});
|
|
1713
|
-
}
|
|
1714
|
-
}, [resolvedSyncControl, registry]);
|
|
1715
|
-
useEffect(() => {
|
|
1716
|
-
if (status.isInitialized && !status.error && onInitialized) {
|
|
1717
|
-
const contextValue2 = buildContextValue();
|
|
1718
|
-
if (contextValue2) {
|
|
1719
|
-
onInitialized(contextValue2);
|
|
1720
1586
|
}
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1587
|
+
if (!adapters.supabase) {
|
|
1588
|
+
throw new Error(`No adapter available for table "${table_2}". Ensure Supabase client is properly initialized.`);
|
|
1589
|
+
}
|
|
1590
|
+
return adapters.supabase;
|
|
1591
|
+
};
|
|
1592
|
+
$[24] = adapters.powerSync;
|
|
1593
|
+
$[25] = adapters.supabase;
|
|
1594
|
+
$[26] = adapters.syncTracking;
|
|
1595
|
+
$[27] = config.tables;
|
|
1596
|
+
$[28] = t10;
|
|
1597
|
+
} else {
|
|
1598
|
+
t10 = $[28];
|
|
1599
|
+
}
|
|
1600
|
+
const getAdapter = t10;
|
|
1601
|
+
let t11;
|
|
1602
|
+
if ($[29] !== adapters.powerSync || $[30] !== config.tables || $[31] !== getPowerSyncTables) {
|
|
1603
|
+
t11 = () => ({
|
|
1604
|
+
isInitialized: true,
|
|
1605
|
+
hasPowerSync: adapters.powerSync !== null,
|
|
1606
|
+
hasSupabase: true,
|
|
1607
|
+
configuredTableCount: Object.keys(config.tables).length,
|
|
1608
|
+
powerSyncTables: getPowerSyncTables()
|
|
1609
|
+
});
|
|
1610
|
+
$[29] = adapters.powerSync;
|
|
1611
|
+
$[30] = config.tables;
|
|
1612
|
+
$[31] = getPowerSyncTables;
|
|
1613
|
+
$[32] = t11;
|
|
1614
|
+
} else {
|
|
1615
|
+
t11 = $[32];
|
|
1616
|
+
}
|
|
1617
|
+
let t12;
|
|
1618
|
+
if ($[33] !== config || $[34] !== getAdapter || $[35] !== getPowerSyncTables || $[36] !== getTableAlias || $[37] !== getTableStrategy || $[38] !== t11 || $[39] !== usesPowerSync) {
|
|
1619
|
+
t12 = {
|
|
1735
1620
|
getAdapter,
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1621
|
+
getTableStrategy,
|
|
1622
|
+
usesPowerSync,
|
|
1623
|
+
getPowerSyncTables,
|
|
1624
|
+
getTableAlias,
|
|
1625
|
+
getDebugInfo: t11,
|
|
1626
|
+
config,
|
|
1627
|
+
isInitialized: true
|
|
1743
1628
|
};
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1629
|
+
$[33] = config;
|
|
1630
|
+
$[34] = getAdapter;
|
|
1631
|
+
$[35] = getPowerSyncTables;
|
|
1632
|
+
$[36] = getTableAlias;
|
|
1633
|
+
$[37] = getTableStrategy;
|
|
1634
|
+
$[38] = t11;
|
|
1635
|
+
$[39] = usesPowerSync;
|
|
1636
|
+
$[40] = t12;
|
|
1637
|
+
} else {
|
|
1638
|
+
t12 = $[40];
|
|
1639
|
+
}
|
|
1640
|
+
const registry = t12;
|
|
1641
|
+
let t13;
|
|
1642
|
+
if ($[41] !== config.schema || $[42] !== getAdapter || $[43] !== powerSyncInstance || $[44] !== queryClient || $[45] !== registry || $[46] !== supabaseClient || $[47] !== syncControl) {
|
|
1643
|
+
t13 = {
|
|
1748
1644
|
registry,
|
|
1749
1645
|
getAdapter,
|
|
1750
1646
|
powerSync: powerSyncInstance,
|
|
1751
1647
|
supabase: supabaseClient,
|
|
1752
1648
|
queryClient,
|
|
1753
1649
|
schema: config.schema,
|
|
1754
|
-
syncControl
|
|
1650
|
+
syncControl
|
|
1755
1651
|
};
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1652
|
+
$[41] = config.schema;
|
|
1653
|
+
$[42] = getAdapter;
|
|
1654
|
+
$[43] = powerSyncInstance;
|
|
1655
|
+
$[44] = queryClient;
|
|
1656
|
+
$[45] = registry;
|
|
1657
|
+
$[46] = supabaseClient;
|
|
1658
|
+
$[47] = syncControl;
|
|
1659
|
+
$[48] = t13;
|
|
1660
|
+
} else {
|
|
1661
|
+
t13 = $[48];
|
|
1662
|
+
}
|
|
1663
|
+
const coreContextValue = t13;
|
|
1664
|
+
const t14 = powerSyncInstance ? "powersync" : "supabase";
|
|
1665
|
+
const t15 = powerSyncInstance ? "available" /* AVAILABLE */ : "unavailable" /* UNAVAILABLE */;
|
|
1666
|
+
let t16;
|
|
1667
|
+
if ($[49] !== hasSynced || $[50] !== isOnline || $[51] !== t14 || $[52] !== t15) {
|
|
1668
|
+
t16 = {
|
|
1669
|
+
isInitialized: true,
|
|
1670
|
+
currentBackend: t14,
|
|
1671
|
+
powerSyncStatus: t15,
|
|
1672
|
+
isOnline,
|
|
1673
|
+
lastDetection: null,
|
|
1674
|
+
error: null,
|
|
1675
|
+
hasSynced
|
|
1676
|
+
};
|
|
1677
|
+
$[49] = hasSynced;
|
|
1678
|
+
$[50] = isOnline;
|
|
1679
|
+
$[51] = t14;
|
|
1680
|
+
$[52] = t15;
|
|
1681
|
+
$[53] = t16;
|
|
1682
|
+
} else {
|
|
1683
|
+
t16 = $[53];
|
|
1684
|
+
}
|
|
1685
|
+
const status = t16;
|
|
1686
|
+
let t17;
|
|
1687
|
+
if ($[54] !== status) {
|
|
1688
|
+
t17 = {
|
|
1760
1689
|
status,
|
|
1761
1690
|
syncStatus: defaultSyncStatus
|
|
1762
1691
|
};
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1692
|
+
$[54] = status;
|
|
1693
|
+
$[55] = t17;
|
|
1694
|
+
} else {
|
|
1695
|
+
t17 = $[55];
|
|
1696
|
+
}
|
|
1697
|
+
const statusContextValue = t17;
|
|
1698
|
+
let t18;
|
|
1699
|
+
if ($[56] !== coreContextValue || $[57] !== statusContextValue) {
|
|
1700
|
+
t18 = {
|
|
1767
1701
|
...coreContextValue,
|
|
1768
1702
|
...statusContextValue
|
|
1769
1703
|
};
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
}
|
|
1776
|
-
const
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
[
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
}
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1704
|
+
$[56] = coreContextValue;
|
|
1705
|
+
$[57] = statusContextValue;
|
|
1706
|
+
$[58] = t18;
|
|
1707
|
+
} else {
|
|
1708
|
+
t18 = $[58];
|
|
1709
|
+
}
|
|
1710
|
+
const contextValue = t18;
|
|
1711
|
+
let t19;
|
|
1712
|
+
if ($[59] !== children || $[60] !== statusContextValue) {
|
|
1713
|
+
t19 = /* @__PURE__ */ jsx(DataLayerStatusContext.Provider, { value: statusContextValue, children });
|
|
1714
|
+
$[59] = children;
|
|
1715
|
+
$[60] = statusContextValue;
|
|
1716
|
+
$[61] = t19;
|
|
1717
|
+
} else {
|
|
1718
|
+
t19 = $[61];
|
|
1719
|
+
}
|
|
1720
|
+
let t20;
|
|
1721
|
+
if ($[62] !== coreContextValue || $[63] !== t19) {
|
|
1722
|
+
t20 = /* @__PURE__ */ jsx(DataLayerCoreContext.Provider, { value: coreContextValue, children: t19 });
|
|
1723
|
+
$[62] = coreContextValue;
|
|
1724
|
+
$[63] = t19;
|
|
1725
|
+
$[64] = t20;
|
|
1726
|
+
} else {
|
|
1727
|
+
t20 = $[64];
|
|
1728
|
+
}
|
|
1729
|
+
let t21;
|
|
1730
|
+
if ($[65] !== contextValue || $[66] !== t20) {
|
|
1731
|
+
t21 = /* @__PURE__ */ jsx(DataLayerNestingContext.Provider, { value: true, children: /* @__PURE__ */ jsx(DataLayerContext.Provider, { value: contextValue, children: t20 }) });
|
|
1732
|
+
$[65] = contextValue;
|
|
1733
|
+
$[66] = t20;
|
|
1734
|
+
$[67] = t21;
|
|
1735
|
+
} else {
|
|
1736
|
+
t21 = $[67];
|
|
1737
|
+
}
|
|
1738
|
+
return t21;
|
|
1739
|
+
}
|
|
1740
|
+
function _temp2(t0) {
|
|
1741
|
+
const [key, strategy_2] = t0;
|
|
1742
|
+
return getPowerSyncAlias(key, strategy_2);
|
|
1743
|
+
}
|
|
1744
|
+
function _temp(t0) {
|
|
1745
|
+
const [, strategy_1] = t0;
|
|
1746
|
+
return strategy_1.strategy === "powersync" || strategy_1.strategy === "hybrid" || strategy_1.strategy === "auto";
|
|
1803
1747
|
}
|
|
1804
1748
|
|
|
1805
1749
|
// src/storage/use-supabase-upload.tsx
|
|
1806
|
-
import { useCallback as useCallback3, useEffect as useEffect3, useMemo as useMemo3, useState
|
|
1750
|
+
import { useCallback as useCallback3, useEffect as useEffect3, useMemo as useMemo3, useState } from "react";
|
|
1807
1751
|
|
|
1808
1752
|
// ../../../node_modules/.pnpm/react-dropzone@14.3.8_react@19.2.0/node_modules/react-dropzone/dist/es/index.js
|
|
1809
1753
|
var import_prop_types = __toESM(require_prop_types(), 1);
|
|
@@ -4220,10 +4164,10 @@ var useSupabaseUpload = (options) => {
|
|
|
4220
4164
|
cacheControl = 3600,
|
|
4221
4165
|
upsert = false
|
|
4222
4166
|
} = options;
|
|
4223
|
-
const [files, setFiles] =
|
|
4224
|
-
const [loading, setLoading] =
|
|
4225
|
-
const [errors, setErrors] =
|
|
4226
|
-
const [successes, setSuccesses] =
|
|
4167
|
+
const [files, setFiles] = useState([]);
|
|
4168
|
+
const [loading, setLoading] = useState(false);
|
|
4169
|
+
const [errors, setErrors] = useState([]);
|
|
4170
|
+
const [successes, setSuccesses] = useState([]);
|
|
4227
4171
|
const isSuccess = useMemo3(() => {
|
|
4228
4172
|
if (errors.length === 0 && successes.length === 0) {
|
|
4229
4173
|
return false;
|
|
@@ -4327,7 +4271,7 @@ var useSupabaseUpload = (options) => {
|
|
|
4327
4271
|
};
|
|
4328
4272
|
|
|
4329
4273
|
// src/conflicts/ConflictContext.tsx
|
|
4330
|
-
import { c as
|
|
4274
|
+
import { c as _c2 } from "react/compiler-runtime";
|
|
4331
4275
|
import { createContext, useEffect as useEffect4, useReducer as useReducer2, useRef as useRef3 } from "react";
|
|
4332
4276
|
|
|
4333
4277
|
// src/conflicts/storage.ts
|
|
@@ -4479,7 +4423,7 @@ function conflictReducer(state, action) {
|
|
|
4479
4423
|
}
|
|
4480
4424
|
}
|
|
4481
4425
|
function ConflictProvider(t0) {
|
|
4482
|
-
const $ =
|
|
4426
|
+
const $ = _c2(29);
|
|
4483
4427
|
const {
|
|
4484
4428
|
children,
|
|
4485
4429
|
conflictBus
|
|
@@ -4513,7 +4457,7 @@ function ConflictProvider(t0) {
|
|
|
4513
4457
|
conflicts
|
|
4514
4458
|
});
|
|
4515
4459
|
}
|
|
4516
|
-
}).catch(
|
|
4460
|
+
}).catch(_temp3).finally(() => {
|
|
4517
4461
|
hasFinishedLoadingRef.current = true;
|
|
4518
4462
|
});
|
|
4519
4463
|
};
|
|
@@ -4541,7 +4485,7 @@ function ConflictProvider(t0) {
|
|
|
4541
4485
|
updatedTimestamps.set(key, now);
|
|
4542
4486
|
}
|
|
4543
4487
|
}
|
|
4544
|
-
const currentKeys = new Set(state.pendingConflicts.map(
|
|
4488
|
+
const currentKeys = new Set(state.pendingConflicts.map(_temp22));
|
|
4545
4489
|
for (const key_0 of updatedTimestamps.keys()) {
|
|
4546
4490
|
if (!currentKeys.has(key_0)) {
|
|
4547
4491
|
updatedTimestamps.delete(key_0);
|
|
@@ -4721,15 +4665,15 @@ function ConflictProvider(t0) {
|
|
|
4721
4665
|
}
|
|
4722
4666
|
return t17;
|
|
4723
4667
|
}
|
|
4724
|
-
function
|
|
4668
|
+
function _temp22(c) {
|
|
4725
4669
|
return `${c.table}:${c.recordId}`;
|
|
4726
4670
|
}
|
|
4727
|
-
function
|
|
4671
|
+
function _temp3(err) {
|
|
4728
4672
|
console.warn("[ConflictProvider] Failed to load conflicts:", err);
|
|
4729
4673
|
}
|
|
4730
4674
|
|
|
4731
4675
|
// src/conflicts/useConflictState.ts
|
|
4732
|
-
import { c as
|
|
4676
|
+
import { c as _c3 } from "react/compiler-runtime";
|
|
4733
4677
|
import { useContext as useContext2 } from "react";
|
|
4734
4678
|
function useConflictState() {
|
|
4735
4679
|
const context = useContext2(ConflictContext);
|
|
@@ -4739,7 +4683,7 @@ function useConflictState() {
|
|
|
4739
4683
|
return context;
|
|
4740
4684
|
}
|
|
4741
4685
|
function usePendingConflicts() {
|
|
4742
|
-
const $ =
|
|
4686
|
+
const $ = _c3(2);
|
|
4743
4687
|
const context = useContext2(ConflictContext);
|
|
4744
4688
|
let t0;
|
|
4745
4689
|
if ($[0] !== context?.pendingConflicts) {
|
|
@@ -4756,7 +4700,7 @@ function useHasConflicts() {
|
|
|
4756
4700
|
return context?.hasConflicts ?? false;
|
|
4757
4701
|
}
|
|
4758
4702
|
function useConflictForRecord(table, recordId) {
|
|
4759
|
-
const $ =
|
|
4703
|
+
const $ = _c3(4);
|
|
4760
4704
|
const conflicts = usePendingConflicts();
|
|
4761
4705
|
let t0;
|
|
4762
4706
|
if ($[0] !== conflicts || $[1] !== recordId || $[2] !== table) {
|
|
@@ -4771,7 +4715,7 @@ function useConflictForRecord(table, recordId) {
|
|
|
4771
4715
|
return t0;
|
|
4772
4716
|
}
|
|
4773
4717
|
function useConflictsForTable(table) {
|
|
4774
|
-
const $ =
|
|
4718
|
+
const $ = _c3(5);
|
|
4775
4719
|
const conflicts = usePendingConflicts();
|
|
4776
4720
|
let t0;
|
|
4777
4721
|
if ($[0] !== conflicts || $[1] !== table) {
|
|
@@ -4793,7 +4737,7 @@ function useConflictsForTable(table) {
|
|
|
4793
4737
|
return t0;
|
|
4794
4738
|
}
|
|
4795
4739
|
function useConflictCountByTable() {
|
|
4796
|
-
const $ =
|
|
4740
|
+
const $ = _c3(2);
|
|
4797
4741
|
const conflicts = usePendingConflicts();
|
|
4798
4742
|
let counts;
|
|
4799
4743
|
if ($[0] !== conflicts) {
|
|
@@ -4810,9 +4754,9 @@ function useConflictCountByTable() {
|
|
|
4810
4754
|
}
|
|
4811
4755
|
|
|
4812
4756
|
// src/conflicts/useConflictResolution.ts
|
|
4813
|
-
import { c as
|
|
4757
|
+
import { c as _c4 } from "react/compiler-runtime";
|
|
4814
4758
|
function useConflictResolution(conflict) {
|
|
4815
|
-
const $ =
|
|
4759
|
+
const $ = _c4(28);
|
|
4816
4760
|
const {
|
|
4817
4761
|
resolveConflict
|
|
4818
4762
|
} = useConflictState();
|
|
@@ -4886,7 +4830,7 @@ function useConflictResolution(conflict) {
|
|
|
4886
4830
|
const syncFields = t4;
|
|
4887
4831
|
let t5;
|
|
4888
4832
|
if ($[13] !== conflict.conflicts) {
|
|
4889
|
-
t5 = new Set(conflict.conflicts.map(
|
|
4833
|
+
t5 = new Set(conflict.conflicts.map(_temp4));
|
|
4890
4834
|
$[13] = conflict.conflicts;
|
|
4891
4835
|
$[14] = t5;
|
|
4892
4836
|
} else {
|
|
@@ -4948,11 +4892,11 @@ function useConflictResolution(conflict) {
|
|
|
4948
4892
|
}
|
|
4949
4893
|
return t8;
|
|
4950
4894
|
}
|
|
4951
|
-
function
|
|
4895
|
+
function _temp4(c) {
|
|
4952
4896
|
return c.field;
|
|
4953
4897
|
}
|
|
4954
4898
|
function useBulkConflictResolution() {
|
|
4955
|
-
const $ =
|
|
4899
|
+
const $ = _c4(13);
|
|
4956
4900
|
const {
|
|
4957
4901
|
resolveAll,
|
|
4958
4902
|
resolveConflict,
|
|
@@ -5068,4 +5012,4 @@ object-assign/index.js:
|
|
|
5068
5012
|
@license MIT
|
|
5069
5013
|
*)
|
|
5070
5014
|
*/
|
|
5071
|
-
//# sourceMappingURL=chunk-
|
|
5015
|
+
//# sourceMappingURL=chunk-K46TGKB2.js.map
|