@lvce-editor/renderer-process 30.43.3 → 30.43.5
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 +14 -13
- 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,7 +5611,6 @@ const setIdentifiers = identifiers => {
|
|
|
5604
5611
|
setIdentifiers$1(identifiers);
|
|
5605
5612
|
};
|
|
5606
5613
|
|
|
5607
|
-
const appliedBatches = new Map();
|
|
5608
5614
|
const pendingBatches = new Map();
|
|
5609
5615
|
const state$2 = {
|
|
5610
5616
|
nextTransactionId: 1
|
|
@@ -5613,6 +5619,7 @@ const queue = (uid, commands) => {
|
|
|
5613
5619
|
const transactionId = state$2.nextTransactionId++;
|
|
5614
5620
|
pendingBatches.set(transactionId, {
|
|
5615
5621
|
commands,
|
|
5622
|
+
committed: false,
|
|
5616
5623
|
uid
|
|
5617
5624
|
});
|
|
5618
5625
|
return transactionId;
|
|
@@ -5620,30 +5627,22 @@ const queue = (uid, commands) => {
|
|
|
5620
5627
|
const take = (uid, transactionId) => {
|
|
5621
5628
|
const batch = pendingBatches.get(transactionId);
|
|
5622
5629
|
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
|
-
}
|
|
5631
5630
|
throw new Error(`pending viewlet command transaction not found: ${transactionId}`);
|
|
5632
5631
|
}
|
|
5633
5632
|
if (batch.uid !== uid) {
|
|
5634
5633
|
throw new Error(`pending viewlet command transaction ${transactionId} belongs to ${batch.uid}, not ${uid}`);
|
|
5635
5634
|
}
|
|
5635
|
+
batch.committed = true;
|
|
5636
5636
|
const commands = [];
|
|
5637
5637
|
for (const [pendingTransactionId, pendingBatch] of pendingBatches) {
|
|
5638
5638
|
if (pendingBatch.uid !== uid) {
|
|
5639
5639
|
continue;
|
|
5640
5640
|
}
|
|
5641
|
-
|
|
5642
|
-
pendingBatches.delete(pendingTransactionId);
|
|
5643
|
-
if (pendingTransactionId === transactionId) {
|
|
5641
|
+
if (!pendingBatch.committed) {
|
|
5644
5642
|
break;
|
|
5645
5643
|
}
|
|
5646
|
-
|
|
5644
|
+
commands.push(...pendingBatch.commands);
|
|
5645
|
+
pendingBatches.delete(pendingTransactionId);
|
|
5647
5646
|
}
|
|
5648
5647
|
return commands;
|
|
5649
5648
|
};
|
|
@@ -10325,6 +10324,8 @@ const commandMap = {
|
|
|
10325
10324
|
'Notification.create': create$s,
|
|
10326
10325
|
'Notification.createWithOptions': createWithOptions,
|
|
10327
10326
|
'Notification.dispose': dispose$h,
|
|
10327
|
+
'ObjectUrl.create': createObjectUrl,
|
|
10328
|
+
'ObjectUrl.revoke': revokeObjectUrl,
|
|
10328
10329
|
'OffscreenCanvas.create': create$r,
|
|
10329
10330
|
'OffscreenCanvas.create2': create2,
|
|
10330
10331
|
'Open.openUrl': openUrl,
|