@lvce-editor/renderer-process 30.43.1 → 30.43.3
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/rendererProcessMain.js +22 -5
- package/package.json +1 -1
|
@@ -5604,6 +5604,7 @@ const setIdentifiers = identifiers => {
|
|
|
5604
5604
|
setIdentifiers$1(identifiers);
|
|
5605
5605
|
};
|
|
5606
5606
|
|
|
5607
|
+
const appliedBatches = new Map();
|
|
5607
5608
|
const pendingBatches = new Map();
|
|
5608
5609
|
const state$2 = {
|
|
5609
5610
|
nextTransactionId: 1
|
|
@@ -5619,13 +5620,32 @@ const queue = (uid, commands) => {
|
|
|
5619
5620
|
const take = (uid, transactionId) => {
|
|
5620
5621
|
const batch = pendingBatches.get(transactionId);
|
|
5621
5622
|
if (!batch) {
|
|
5623
|
+
const appliedUid = appliedBatches.get(transactionId);
|
|
5624
|
+
if (appliedUid !== undefined) {
|
|
5625
|
+
if (appliedUid !== uid) {
|
|
5626
|
+
throw new Error(`pending viewlet command transaction ${transactionId} belongs to ${appliedUid}, not ${uid}`);
|
|
5627
|
+
}
|
|
5628
|
+
appliedBatches.delete(transactionId);
|
|
5629
|
+
return [];
|
|
5630
|
+
}
|
|
5622
5631
|
throw new Error(`pending viewlet command transaction not found: ${transactionId}`);
|
|
5623
5632
|
}
|
|
5624
5633
|
if (batch.uid !== uid) {
|
|
5625
5634
|
throw new Error(`pending viewlet command transaction ${transactionId} belongs to ${batch.uid}, not ${uid}`);
|
|
5626
5635
|
}
|
|
5627
|
-
|
|
5628
|
-
|
|
5636
|
+
const commands = [];
|
|
5637
|
+
for (const [pendingTransactionId, pendingBatch] of pendingBatches) {
|
|
5638
|
+
if (pendingBatch.uid !== uid) {
|
|
5639
|
+
continue;
|
|
5640
|
+
}
|
|
5641
|
+
commands.push(...pendingBatch.commands);
|
|
5642
|
+
pendingBatches.delete(pendingTransactionId);
|
|
5643
|
+
if (pendingTransactionId === transactionId) {
|
|
5644
|
+
break;
|
|
5645
|
+
}
|
|
5646
|
+
appliedBatches.set(pendingTransactionId, uid);
|
|
5647
|
+
}
|
|
5648
|
+
return commands;
|
|
5629
5649
|
};
|
|
5630
5650
|
|
|
5631
5651
|
const rememberFocus = rememberFocus$1;
|
|
@@ -8608,9 +8628,6 @@ const handleFocusOut = event => {
|
|
|
8608
8628
|
}
|
|
8609
8629
|
const uid = fromEvent(event);
|
|
8610
8630
|
if (!relatedTarget && target && isInsideTitleBarMenu(target)) {
|
|
8611
|
-
if (!target.isConnected) {
|
|
8612
|
-
return;
|
|
8613
|
-
}
|
|
8614
8631
|
queueMicrotask(() => {
|
|
8615
8632
|
const {
|
|
8616
8633
|
activeElement
|