@vectoriox/iox-builder 1.4.50 → 1.4.52

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.
@@ -414,7 +414,13 @@ class DragEngineService {
414
414
  // (e.g. the built-in blocks panel stores one pre-built node object and
415
415
  // reuses it across drags). Deep-clone with fresh IDs so each drop
416
416
  // produces a fully independent node, preventing shared CSS rules.
417
- const cloned = deepCloneNode(item);
417
+ // The panel may supply a bare ComponentNode OR a block wrapper object
418
+ // { node, symbolId, syncInstances } — extract the node first.
419
+ const nodeData = item.node ?? item;
420
+ const cloned = deepCloneNode(nodeData);
421
+ if (item.syncInstances && item.symbolId) {
422
+ cloned.symbolId = item.symbolId;
423
+ }
418
424
  children.splice(insertIndex, 0, cloned);
419
425
  cdr.detectChanges();
420
426
  this.dropComplete$.next(cloned);
@@ -692,9 +698,8 @@ class DragEngineService {
692
698
  // whose DOM element lives inside the dragged source wrapper.
693
699
  if (this._sourceEl?.contains(el))
694
700
  continue;
695
- // Skip elements hidden by interaction pre-state (pointer-events: none marks
696
- // entrance-type targets that are currently opacity:0 in the canvas).
697
- if (el.style.pointerEvents === 'none')
701
+ // Skip elements hidden by interaction pre-state, and any of their children.
702
+ if (el.closest('[data-iox-hidden]'))
698
703
  continue;
699
704
  const rect = this._dropzoneRectCache.get(id) ?? el.getBoundingClientRect();
700
705
  if (px >= rect.left && px <= rect.right && py >= rect.top && py <= rect.bottom) {
@@ -1451,6 +1456,7 @@ class InteractionEngineService {
1451
1456
  if (this.ENTRANCE_TYPES.has(action.type)) {
1452
1457
  anim.finished.then(() => {
1453
1458
  element.style.removeProperty('pointer-events');
1459
+ element.removeAttribute('data-iox-hidden');
1454
1460
  this.preStatedElements.delete(element);
1455
1461
  // Builder: clear inline pre-state so cancelling animations later
1456
1462
  // doesn't leave the element invisible after a play preview.
@@ -1483,11 +1489,10 @@ class InteractionEngineService {
1483
1489
  for (const [prop, val] of Object.entries(first)) {
1484
1490
  element.style[prop] = String(val);
1485
1491
  }
1486
- // Invisible element must not intercept pointer events.
1487
- const opacity = first['opacity'];
1488
- if (opacity === '0' || opacity === 0) {
1489
- element.style.setProperty('pointer-events', 'none');
1490
- }
1492
+ // Mark as hidden so the builder overlay and drag engine can ignore this element
1493
+ // and all of its children regardless of which entrance animation type is used.
1494
+ element.setAttribute('data-iox-hidden', '');
1495
+ element.style.setProperty('pointer-events', 'none');
1491
1496
  this.preStatedElements.add(element);
1492
1497
  }
1493
1498
  clearInlineAnimationStyles(element) {
@@ -1495,6 +1500,7 @@ class InteractionEngineService {
1495
1500
  element.style.removeProperty('transform');
1496
1501
  element.style.removeProperty('visibility');
1497
1502
  element.style.removeProperty('pointer-events');
1503
+ element.removeAttribute('data-iox-hidden');
1498
1504
  }
1499
1505
  reverseAction(element, action) {
1500
1506
  const { keyframes } = this.buildAnimation(action);