@syntrologie/runtime-sdk 2.8.0-canary.79 → 2.8.0-canary.80

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.
@@ -3456,7 +3456,7 @@ function getAntiFlickerSnippet(config = {}) {
3456
3456
  }
3457
3457
 
3458
3458
  // src/version.ts
3459
- var SDK_VERSION = "2.8.0-canary.79";
3459
+ var SDK_VERSION = "2.8.0-canary.80";
3460
3460
 
3461
3461
  // src/types.ts
3462
3462
  var SDK_SCHEMA_VERSION = "2.0";
@@ -6539,6 +6539,7 @@ function SmartCanvasAppInner({
6539
6539
  const batchHandleRef = useRef7(initialBatchHandle != null ? initialBatchHandle : null);
6540
6540
  const adoptedInitialRef = useRef7(!!initialBatchHandle);
6541
6541
  const runVersionRef = useRef7(0);
6542
+ const pendingRevertRef = useRef7(null);
6542
6543
  useEffect9(() => {
6543
6544
  if (!(runtime3 == null ? void 0 : runtime3.actions)) return;
6544
6545
  if (adoptedInitialRef.current) {
@@ -6550,6 +6551,10 @@ function SmartCanvasAppInner({
6550
6551
  const version = ++runVersionRef.current;
6551
6552
  const stale = () => version !== runVersionRef.current;
6552
6553
  const run = async () => {
6554
+ if (pendingRevertRef.current) {
6555
+ await pendingRevertRef.current;
6556
+ pendingRevertRef.current = null;
6557
+ }
6553
6558
  if (batchHandleRef.current) {
6554
6559
  try {
6555
6560
  await batchHandleRef.current.revertAll();
@@ -6577,7 +6582,7 @@ function SmartCanvasAppInner({
6577
6582
  run();
6578
6583
  return () => {
6579
6584
  if (batchHandleRef.current) {
6580
- batchHandleRef.current.revertAll().catch((err) => {
6585
+ pendingRevertRef.current = batchHandleRef.current.revertAll().catch((err) => {
6581
6586
  console.error("[SmartCanvasApp] Failed to revert actions on cleanup:", err);
6582
6587
  });
6583
6588
  batchHandleRef.current = null;
@@ -12462,4 +12467,4 @@ export {
12462
12467
  encodeToken,
12463
12468
  Syntro
12464
12469
  };
12465
- //# sourceMappingURL=chunk-OQQ4NGSN.js.map
12470
+ //# sourceMappingURL=chunk-EELCEGS7.js.map