@lvce-editor/renderer-process 30.43.2 → 30.43.4
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 +31 -2
- package/package.json +1 -1
|
@@ -4288,6 +4288,13 @@ const dispose$h = id => {
|
|
|
4288
4288
|
// const $Notification = state.$Notifications
|
|
4289
4289
|
};
|
|
4290
4290
|
|
|
4291
|
+
const createObjectUrl = blob => {
|
|
4292
|
+
return URL.createObjectURL(blob);
|
|
4293
|
+
};
|
|
4294
|
+
const revokeObjectUrl = url => {
|
|
4295
|
+
URL.revokeObjectURL(url);
|
|
4296
|
+
};
|
|
4297
|
+
|
|
4291
4298
|
const state$7 = {
|
|
4292
4299
|
canvasObjects: Object.create(null)
|
|
4293
4300
|
};
|
|
@@ -5604,6 +5611,7 @@ const setIdentifiers = identifiers => {
|
|
|
5604
5611
|
setIdentifiers$1(identifiers);
|
|
5605
5612
|
};
|
|
5606
5613
|
|
|
5614
|
+
const appliedBatches = new Map();
|
|
5607
5615
|
const pendingBatches = new Map();
|
|
5608
5616
|
const state$2 = {
|
|
5609
5617
|
nextTransactionId: 1
|
|
@@ -5619,13 +5627,32 @@ const queue = (uid, commands) => {
|
|
|
5619
5627
|
const take = (uid, transactionId) => {
|
|
5620
5628
|
const batch = pendingBatches.get(transactionId);
|
|
5621
5629
|
if (!batch) {
|
|
5630
|
+
const appliedUid = appliedBatches.get(transactionId);
|
|
5631
|
+
if (appliedUid !== undefined) {
|
|
5632
|
+
if (appliedUid !== uid) {
|
|
5633
|
+
throw new Error(`pending viewlet command transaction ${transactionId} belongs to ${appliedUid}, not ${uid}`);
|
|
5634
|
+
}
|
|
5635
|
+
appliedBatches.delete(transactionId);
|
|
5636
|
+
return [];
|
|
5637
|
+
}
|
|
5622
5638
|
throw new Error(`pending viewlet command transaction not found: ${transactionId}`);
|
|
5623
5639
|
}
|
|
5624
5640
|
if (batch.uid !== uid) {
|
|
5625
5641
|
throw new Error(`pending viewlet command transaction ${transactionId} belongs to ${batch.uid}, not ${uid}`);
|
|
5626
5642
|
}
|
|
5627
|
-
|
|
5628
|
-
|
|
5643
|
+
const commands = [];
|
|
5644
|
+
for (const [pendingTransactionId, pendingBatch] of pendingBatches) {
|
|
5645
|
+
if (pendingBatch.uid !== uid) {
|
|
5646
|
+
continue;
|
|
5647
|
+
}
|
|
5648
|
+
commands.push(...pendingBatch.commands);
|
|
5649
|
+
pendingBatches.delete(pendingTransactionId);
|
|
5650
|
+
if (pendingTransactionId === transactionId) {
|
|
5651
|
+
break;
|
|
5652
|
+
}
|
|
5653
|
+
appliedBatches.set(pendingTransactionId, uid);
|
|
5654
|
+
}
|
|
5655
|
+
return commands;
|
|
5629
5656
|
};
|
|
5630
5657
|
|
|
5631
5658
|
const rememberFocus = rememberFocus$1;
|
|
@@ -10305,6 +10332,8 @@ const commandMap = {
|
|
|
10305
10332
|
'Notification.create': create$s,
|
|
10306
10333
|
'Notification.createWithOptions': createWithOptions,
|
|
10307
10334
|
'Notification.dispose': dispose$h,
|
|
10335
|
+
'ObjectUrl.create': createObjectUrl,
|
|
10336
|
+
'ObjectUrl.revoke': revokeObjectUrl,
|
|
10308
10337
|
'OffscreenCanvas.create': create$r,
|
|
10309
10338
|
'OffscreenCanvas.create2': create2,
|
|
10310
10339
|
'Open.openUrl': openUrl,
|