@braine/quantum-query 1.2.7 → 1.2.8
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/index.cjs +10 -5
- package/dist/index.js +10 -5
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1323,8 +1323,11 @@ var FocusManager = class {
|
|
|
1323
1323
|
return this.focused;
|
|
1324
1324
|
}
|
|
1325
1325
|
setFocused(focused) {
|
|
1326
|
+
const wasUnfocused = !this.focused;
|
|
1326
1327
|
this.focused = focused;
|
|
1327
|
-
if (focused)
|
|
1328
|
+
if (focused && wasUnfocused) {
|
|
1329
|
+
this.onFocus();
|
|
1330
|
+
}
|
|
1328
1331
|
}
|
|
1329
1332
|
};
|
|
1330
1333
|
var focusManager = new FocusManager();
|
|
@@ -1588,10 +1591,12 @@ var MutationObserver = class {
|
|
|
1588
1591
|
});
|
|
1589
1592
|
this.client.mutationCache.notify(id, pendingState);
|
|
1590
1593
|
const unsubscribe = this.client.mutationCache.getSignal(id).subscribe((state) => {
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1594
|
+
untracked(() => {
|
|
1595
|
+
const current = this.signal.get();
|
|
1596
|
+
if (current.status !== state.status || current.data !== state.data || current.error !== state.error) {
|
|
1597
|
+
this.signal.set(state);
|
|
1598
|
+
}
|
|
1599
|
+
});
|
|
1595
1600
|
});
|
|
1596
1601
|
return this.executeMutation(id, variables).finally(() => {
|
|
1597
1602
|
});
|
package/dist/index.js
CHANGED
|
@@ -1282,8 +1282,11 @@ var FocusManager = class {
|
|
|
1282
1282
|
return this.focused;
|
|
1283
1283
|
}
|
|
1284
1284
|
setFocused(focused) {
|
|
1285
|
+
const wasUnfocused = !this.focused;
|
|
1285
1286
|
this.focused = focused;
|
|
1286
|
-
if (focused)
|
|
1287
|
+
if (focused && wasUnfocused) {
|
|
1288
|
+
this.onFocus();
|
|
1289
|
+
}
|
|
1287
1290
|
}
|
|
1288
1291
|
};
|
|
1289
1292
|
var focusManager = new FocusManager();
|
|
@@ -1547,10 +1550,12 @@ var MutationObserver = class {
|
|
|
1547
1550
|
});
|
|
1548
1551
|
this.client.mutationCache.notify(id, pendingState);
|
|
1549
1552
|
const unsubscribe = this.client.mutationCache.getSignal(id).subscribe((state) => {
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1553
|
+
untracked(() => {
|
|
1554
|
+
const current = this.signal.get();
|
|
1555
|
+
if (current.status !== state.status || current.data !== state.data || current.error !== state.error) {
|
|
1556
|
+
this.signal.set(state);
|
|
1557
|
+
}
|
|
1558
|
+
});
|
|
1554
1559
|
});
|
|
1555
1560
|
return this.executeMutation(id, variables).finally(() => {
|
|
1556
1561
|
});
|