@mindexec/cli 0.2.219 → 0.2.221

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.
Files changed (22) hide show
  1. package/package.json +1 -1
  2. package/scripts/remote-fleet-render-smoke.mjs +11 -0
  3. package/wwwroot/_content/MindExecution.Shared/js/background-themes.js +28 -113
  4. package/wwwroot/_content/MindExecution.Shared/js/mind-map-core.js +1952 -152
  5. package/wwwroot/_content/MindExecution.Shared/js/mind-map-css3d-manager.js +375 -98
  6. package/wwwroot/_content/MindExecution.Shared/js/mind-map-interactions.js +108 -49
  7. package/wwwroot/_content/MindExecution.Shared/js/mind-map-lod-renderer.js +85 -3
  8. package/wwwroot/_content/MindExecution.Shared/js/mind-map-nodes.js +83 -14
  9. package/wwwroot/_content/MindExecution.Shared/js/mind-map-text-overlay-v2.js +5 -0
  10. package/wwwroot/_content/MindExecution.Shared/js/renderers/CSS3DRenderer.js +2 -2
  11. package/wwwroot/_framework/{MindExecution.Core.c9wgwsw9z6.dll → MindExecution.Core.xsad4wu36e.dll} +0 -0
  12. package/wwwroot/_framework/{MindExecution.Plugins.Admin.29mytzdaun.dll → MindExecution.Plugins.Admin.m5d94977um.dll} +0 -0
  13. package/wwwroot/_framework/{MindExecution.Plugins.Business.g8txk1zzic.dll → MindExecution.Plugins.Business.ntqdn1hta3.dll} +0 -0
  14. package/wwwroot/_framework/{MindExecution.Plugins.Concept.u9kzsgf64o.dll → MindExecution.Plugins.Concept.mqiyx4db4r.dll} +0 -0
  15. package/wwwroot/_framework/{MindExecution.Plugins.PlanMaster.kibqg6rvqh.dll → MindExecution.Plugins.PlanMaster.fnortumnuu.dll} +0 -0
  16. package/wwwroot/_framework/{MindExecution.Plugins.YouTube.089r64n2hv.dll → MindExecution.Plugins.YouTube.86osu6wpgh.dll} +0 -0
  17. package/wwwroot/_framework/{MindExecution.Shared.tbutfszqeu.dll → MindExecution.Shared.wg2otcw4bv.dll} +0 -0
  18. package/wwwroot/_framework/{MindExecution.Web.7axuoygrwi.dll → MindExecution.Web.gfio3kfxrd.dll} +0 -0
  19. package/wwwroot/_framework/blazor.boot.json +17 -17
  20. package/wwwroot/index.html +3 -3
  21. package/wwwroot/service-worker-assets.js +27 -27
  22. package/wwwroot/service-worker.js +1 -1
@@ -7676,14 +7676,15 @@
7676
7676
 
7677
7677
  function isBusinessAutomationTooltipMotionSuppressed(options = {}) {
7678
7678
  const now = getBusinessAutomationTooltipNow();
7679
- const bodyClassList = document?.body?.classList;
7679
+ const css3dClassList = _module?.cssRenderer?.domElement?.classList ||
7680
+ document?.getElementById?.('css3d-dom-wrapper')?.classList;
7680
7681
  const explicitClickGraceActive = now < Number(businessAutomationTooltipState.explicitClickOpenUntil || 0);
7681
7682
  const ignoreCameraMotionSuppression = options.ignoreCameraMotionSuppression === true
7682
7683
  || explicitClickGraceActive;
7683
7684
  const cameraMotionActive = _module?.isPanning === true
7684
7685
  || _module?.isZooming === true
7685
- || bodyClassList?.contains?.('is-panning') === true
7686
- || bodyClassList?.contains?.('is-zooming') === true;
7686
+ || css3dClassList?.contains?.('is-panning') === true
7687
+ || css3dClassList?.contains?.('is-zooming') === true;
7687
7688
  const dragMotionActive = _module?.isDraggingNode === true
7688
7689
  || _module?.isDraggingMultipleNodes === true;
7689
7690
 
@@ -9778,6 +9779,105 @@
9778
9779
  }
9779
9780
  }
9780
9781
 
9782
+ function getBusinessAutomationCachedViewportMetrics(module) {
9783
+ const width = Math.max(0, Number(module?._lastViewportWidth || 0));
9784
+ const height = Math.max(0, Number(module?._lastViewportHeight || 0));
9785
+ if (width > 0 && height > 0) {
9786
+ return { width, height };
9787
+ }
9788
+
9789
+ const containerWidth = Math.max(0, Number(module?._lastContainerWidth || 0));
9790
+ const containerHeight = Math.max(0, Number(module?._lastContainerHeight || 0));
9791
+ if (containerWidth > 0 && containerHeight > 0) {
9792
+ return { width: containerWidth, height: containerHeight };
9793
+ }
9794
+
9795
+ return {
9796
+ width: Math.max(1, Number(module?.container?.clientWidth || 0)),
9797
+ height: Math.max(1, Number(module?.container?.clientHeight || 0))
9798
+ };
9799
+ }
9800
+
9801
+ function recordBusinessAutomationEdgeCameraState(module, width, height) {
9802
+ if (!module?.camera) {
9803
+ return;
9804
+ }
9805
+
9806
+ module._lastBusinessAutomationEdgeCameraState = {
9807
+ x: Number(module.camera.position?.x || 0),
9808
+ y: Number(module.camera.position?.y || 0),
9809
+ z: Math.max(1, Number(module.camera.position?.z || 1)),
9810
+ width: Math.max(1, Number(width || 1)),
9811
+ height: Math.max(1, Number(height || 1)),
9812
+ fov: Number(module.camera.fov || 45)
9813
+ };
9814
+ }
9815
+
9816
+ function clearBusinessAutomationEdgeCameraTransform(module) {
9817
+ const layers = [
9818
+ module?._businessAutomationEdgeVisualLayer || null,
9819
+ module?._businessAutomationEdgeLayer || null
9820
+ ].filter(Boolean);
9821
+ if (layers.length === 0 || module?._businessAutomationEdgeCameraTransformActive !== true) {
9822
+ return false;
9823
+ }
9824
+
9825
+ for (const layer of layers) {
9826
+ if (!layer?.style) continue;
9827
+ layer.style.transform = '';
9828
+ layer.style.transformOrigin = '';
9829
+ layer.style.willChange = '';
9830
+ }
9831
+ module._businessAutomationEdgeCameraTransformActive = false;
9832
+ module._lastBusinessAutomationEdgeTransformKey = '';
9833
+ return true;
9834
+ }
9835
+
9836
+ function syncBusinessAutomationEdgesForCameraMotion(module = _module) {
9837
+ const visualLayer = module?._businessAutomationEdgeVisualLayer || null;
9838
+ const hitLayer = module?._businessAutomationEdgeLayer || null;
9839
+ const camera = module?.camera || null;
9840
+ const last = module?._lastBusinessAutomationEdgeCameraState || null;
9841
+ if (!camera || !last || (!visualLayer?.isConnected && !hitLayer?.isConnected)) {
9842
+ return false;
9843
+ }
9844
+
9845
+ const viewportMetrics = getBusinessAutomationCachedViewportMetrics(module);
9846
+ const width = Math.max(1, Number(viewportMetrics.width || last.width || 1));
9847
+ const height = Math.max(1, Number(viewportMetrics.height || last.height || 1));
9848
+ const currentZ = Math.max(1, Number(camera.position?.z || 1));
9849
+ const lastZ = Math.max(1, Number(last.z || currentZ));
9850
+ const vfov = (Number(camera.fov || last.fov || 45) * Math.PI) / 180;
9851
+ const viewHeight = 2 * Math.tan(vfov / 2) * currentZ;
9852
+ const pxPerWorld = height / Math.max(1, viewHeight);
9853
+ const scale = Math.max(0.05, Math.min(20, lastZ / currentZ));
9854
+ const currentX = Number(camera.position?.x || 0);
9855
+ const currentY = Number(camera.position?.y || 0);
9856
+ const translateX = (Number(last.x || 0) - currentX) * pxPerWorld;
9857
+ const translateY = (currentY - Number(last.y || 0)) * pxPerWorld;
9858
+ const transformKey = [
9859
+ Math.round(width),
9860
+ Math.round(height),
9861
+ Math.round(translateX * 100),
9862
+ Math.round(translateY * 100),
9863
+ Math.round(scale * 10000)
9864
+ ].join('|');
9865
+
9866
+ if (transformKey !== module._lastBusinessAutomationEdgeTransformKey) {
9867
+ const transform = `translate3d(${translateX.toFixed(3)}px, ${translateY.toFixed(3)}px, 0) scale(${scale.toFixed(5)})`;
9868
+ for (const layer of [visualLayer, hitLayer]) {
9869
+ if (!layer?.style) continue;
9870
+ layer.style.transformOrigin = '50% 50%';
9871
+ layer.style.willChange = 'transform';
9872
+ layer.style.transform = transform;
9873
+ }
9874
+ module._lastBusinessAutomationEdgeTransformKey = transformKey;
9875
+ }
9876
+
9877
+ module._businessAutomationEdgeCameraTransformActive = true;
9878
+ return true;
9879
+ }
9880
+
9781
9881
  function getBusinessAutomationPinAnchorElement(pinElement) {
9782
9882
  return pinElement?.querySelector?.('.map-node-memo__automation-pin-dot') || pinElement || null;
9783
9883
  }
@@ -10122,14 +10222,46 @@
10122
10222
  }
10123
10223
 
10124
10224
  const rects = collectBusinessAutomationResidentOcclusionRects(module, containerRect, viewportWidth, viewportHeight);
10225
+ const renderState = module?._businessAutomationEdgeRenderState || null;
10125
10226
  if (rects.length === 0) {
10126
10227
  visualGroup.removeAttribute('mask');
10228
+ if (renderState?.occlusionMaskState) {
10229
+ renderState.occlusionMaskState.activeCount = 0;
10230
+ renderState.occlusionMaskState.blackRects?.forEach?.(element => {
10231
+ if (element?.parentNode) {
10232
+ element.remove();
10233
+ }
10234
+ });
10235
+ }
10127
10236
  return;
10128
10237
  }
10129
10238
 
10130
10239
  const maskId = 'mind-map-business-automation-resident-occlusion-mask';
10131
- const defs = createBusinessAutomationSvgElement('defs');
10132
- const mask = createBusinessAutomationSvgElement('mask', {
10240
+ const state = renderState || {};
10241
+ let maskState = state.occlusionMaskState || null;
10242
+ if (!maskState) {
10243
+ maskState = {
10244
+ defs: createBusinessAutomationSvgElement('defs'),
10245
+ mask: createBusinessAutomationSvgElement('mask'),
10246
+ baseRect: createBusinessAutomationSvgElement('rect'),
10247
+ blackRects: [],
10248
+ activeCount: 0
10249
+ };
10250
+ maskState.mask.style.maskType = 'luminance';
10251
+ maskState.mask.appendChild(maskState.baseRect);
10252
+ maskState.defs.appendChild(maskState.mask);
10253
+ if (renderState) {
10254
+ renderState.occlusionMaskState = maskState;
10255
+ }
10256
+ }
10257
+
10258
+ if (maskState.defs.parentNode !== visualLayer) {
10259
+ visualLayer.insertBefore(maskState.defs, visualGroup);
10260
+ } else if (maskState.defs.nextSibling !== visualGroup && visualGroup.parentNode === visualLayer) {
10261
+ visualLayer.insertBefore(maskState.defs, visualGroup);
10262
+ }
10263
+
10264
+ setBusinessAutomationSvgAttributes(maskState.mask, {
10133
10265
  id: maskId,
10134
10266
  x: '-80',
10135
10267
  y: '-80',
@@ -10137,17 +10269,21 @@
10137
10269
  height: String(viewportHeight + 160),
10138
10270
  maskUnits: 'userSpaceOnUse'
10139
10271
  });
10140
- mask.style.maskType = 'luminance';
10141
- mask.appendChild(createBusinessAutomationSvgElement('rect', {
10272
+ setBusinessAutomationSvgAttributes(maskState.baseRect, {
10142
10273
  x: '-80',
10143
10274
  y: '-80',
10144
10275
  width: String(viewportWidth + 160),
10145
10276
  height: String(viewportHeight + 160),
10146
10277
  fill: '#ffffff'
10147
- }));
10278
+ });
10148
10279
 
10149
- rects.forEach(rect => {
10150
- mask.appendChild(createBusinessAutomationSvgElement('rect', {
10280
+ rects.forEach((rect, index) => {
10281
+ let element = maskState.blackRects[index] || null;
10282
+ if (!element) {
10283
+ element = createBusinessAutomationSvgElement('rect');
10284
+ maskState.blackRects[index] = element;
10285
+ }
10286
+ setBusinessAutomationSvgAttributes(element, {
10151
10287
  x: rect.x.toFixed(1),
10152
10288
  y: rect.y.toFixed(1),
10153
10289
  width: rect.width.toFixed(1),
@@ -10155,11 +10291,19 @@
10155
10291
  rx: '6',
10156
10292
  ry: '6',
10157
10293
  fill: '#000000'
10158
- }));
10294
+ });
10295
+ if (element.parentNode !== maskState.mask) {
10296
+ maskState.mask.appendChild(element);
10297
+ }
10159
10298
  });
10299
+ for (let i = rects.length; i < maskState.blackRects.length; i++) {
10300
+ const element = maskState.blackRects[i];
10301
+ if (element?.parentNode) {
10302
+ element.remove();
10303
+ }
10304
+ }
10305
+ maskState.activeCount = rects.length;
10160
10306
 
10161
- defs.appendChild(mask);
10162
- visualLayer.appendChild(defs);
10163
10307
  visualGroup.setAttribute('mask', `url(#${maskId})`);
10164
10308
  }
10165
10309
 
@@ -10230,11 +10374,26 @@
10230
10374
  return true;
10231
10375
  }
10232
10376
 
10233
- function createBusinessAutomationSvgElement(name, attributes) {
10234
- const element = document.createElementNS('http://www.w3.org/2000/svg', name);
10377
+ function setBusinessAutomationSvgAttribute(element, key, value) {
10378
+ if (!element || !key) {
10379
+ return;
10380
+ }
10381
+
10382
+ const nextValue = String(value ?? '');
10383
+ if (element.getAttribute(key) !== nextValue) {
10384
+ element.setAttribute(key, nextValue);
10385
+ }
10386
+ }
10387
+
10388
+ function setBusinessAutomationSvgAttributes(element, attributes) {
10235
10389
  Object.entries(attributes || {}).forEach(([key, value]) => {
10236
- element.setAttribute(key, String(value));
10390
+ setBusinessAutomationSvgAttribute(element, key, value);
10237
10391
  });
10392
+ }
10393
+
10394
+ function createBusinessAutomationSvgElement(name, attributes) {
10395
+ const element = document.createElementNS('http://www.w3.org/2000/svg', name);
10396
+ setBusinessAutomationSvgAttributes(element, attributes);
10238
10397
  return element;
10239
10398
  }
10240
10399
 
@@ -10366,6 +10525,144 @@
10366
10525
  };
10367
10526
  }
10368
10527
 
10528
+ function setBusinessAutomationSvgElementsVisible(elements, visible) {
10529
+ const display = visible ? '' : 'none';
10530
+ (Array.isArray(elements) ? elements : [elements]).forEach(element => {
10531
+ if (element?.style && element.style.display !== display) {
10532
+ element.style.display = display;
10533
+ }
10534
+ });
10535
+ }
10536
+
10537
+ function ensureBusinessAutomationEdgeRenderState(module, visualLayer, hitLayer) {
10538
+ let state = module._businessAutomationEdgeRenderState || null;
10539
+ if (!state) {
10540
+ state = {
10541
+ edgeItems: new Map(),
10542
+ visualGroup: createBusinessAutomationSvgElement('g'),
10543
+ hitGroup: createBusinessAutomationSvgElement('g'),
10544
+ draftPath: createBusinessAutomationSvgElement('path'),
10545
+ draftTarget: createBusinessAutomationSvgElement('circle'),
10546
+ occlusionMaskState: null
10547
+ };
10548
+ state.draftPath.style.pointerEvents = 'none';
10549
+ state.draftTarget.style.pointerEvents = 'none';
10550
+ module._businessAutomationEdgeRenderState = state;
10551
+ }
10552
+
10553
+ setBusinessAutomationSvgAttributes(state.visualGroup, {
10554
+ fill: 'none',
10555
+ 'stroke-linecap': 'round',
10556
+ 'stroke-linejoin': 'round'
10557
+ });
10558
+ setBusinessAutomationSvgAttributes(state.hitGroup, {
10559
+ fill: 'none',
10560
+ 'stroke-linecap': 'round',
10561
+ 'stroke-linejoin': 'round'
10562
+ });
10563
+
10564
+ if (state.visualGroup.parentNode !== visualLayer) {
10565
+ visualLayer.appendChild(state.visualGroup);
10566
+ }
10567
+ if (state.hitGroup.parentNode !== hitLayer) {
10568
+ hitLayer.appendChild(state.hitGroup);
10569
+ }
10570
+
10571
+ return state;
10572
+ }
10573
+
10574
+ function ensureBusinessAutomationEdgeItem(renderState, edgeId) {
10575
+ const normalizedId = String(edgeId || '').trim();
10576
+ let item = renderState.edgeItems.get(normalizedId) || null;
10577
+ if (item) {
10578
+ return item;
10579
+ }
10580
+
10581
+ const hitPath = createBusinessAutomationSvgElement('path', {
10582
+ class: 'mind-map-business-automation-edge-hit',
10583
+ stroke: '#000000',
10584
+ 'stroke-width': '18',
10585
+ opacity: '0'
10586
+ });
10587
+ hitPath.style.cursor = 'pointer';
10588
+ hitPath.addEventListener('pointerdown', handleBusinessAutomationEdgePointerDown);
10589
+ hitPath.addEventListener('wheel', handleBusinessAutomationEdgeWheel, { passive: false });
10590
+ hitPath.addEventListener('click', handleBusinessAutomationEdgeClick);
10591
+
10592
+ const path = createBusinessAutomationSvgElement('path');
10593
+ path.style.pointerEvents = 'none';
10594
+ const sourceDot = createBusinessAutomationSvgElement('circle');
10595
+ sourceDot.style.pointerEvents = 'none';
10596
+ const targetDot = createBusinessAutomationSvgElement('circle');
10597
+ targetDot.style.pointerEvents = 'none';
10598
+
10599
+ renderState.hitGroup.appendChild(hitPath);
10600
+ renderState.visualGroup.appendChild(path);
10601
+ renderState.visualGroup.appendChild(sourceDot);
10602
+ renderState.visualGroup.appendChild(targetDot);
10603
+
10604
+ item = { edgeId: normalizedId, hitPath, path, sourceDot, targetDot };
10605
+ renderState.edgeItems.set(normalizedId, item);
10606
+ return item;
10607
+ }
10608
+
10609
+ function removeBusinessAutomationEdgeItem(item) {
10610
+ if (!item) {
10611
+ return;
10612
+ }
10613
+
10614
+ item.hitPath?.remove?.();
10615
+ item.path?.remove?.();
10616
+ item.sourceDot?.remove?.();
10617
+ item.targetDot?.remove?.();
10618
+ }
10619
+
10620
+ function updateBusinessAutomationEdgeItem(item, edge, pathData, source, target, theme, isContextEdge, isSelected, isRelationHighlighted, hitPointerEvents) {
10621
+ setBusinessAutomationSvgAttributes(item.hitPath, {
10622
+ d: pathData,
10623
+ class: 'mind-map-business-automation-edge-hit',
10624
+ stroke: '#000000',
10625
+ 'stroke-width': '18',
10626
+ opacity: '0',
10627
+ 'pointer-events': hitPointerEvents,
10628
+ 'data-edge-id': edge.id,
10629
+ 'data-edge-contract': edge.contract || ''
10630
+ });
10631
+ item.hitPath.style.pointerEvents = hitPointerEvents;
10632
+
10633
+ setBusinessAutomationSvgAttributes(item.path, {
10634
+ d: pathData,
10635
+ class: `mind-map-business-automation-edge-path${isSelected ? ' is-selected' : ''}${isRelationHighlighted ? ' is-relation-highlight' : ''}`,
10636
+ stroke: theme.edge,
10637
+ 'stroke-width': isSelected ? '3.6' : (isRelationHighlighted ? (isContextEdge ? '2.45' : '2.65') : (isContextEdge ? '2.1' : '2.4')),
10638
+ opacity: isSelected ? '0.96' : (isRelationHighlighted ? (isContextEdge ? '0.72' : '0.78') : (isContextEdge ? '0.68' : '0.82')),
10639
+ 'stroke-dasharray': isContextEdge ? '7 7' : '',
10640
+ filter: ''
10641
+ });
10642
+ item.path.dataset.edgeId = edge.id;
10643
+ item.path.dataset.edgeContract = edge.contract || '';
10644
+
10645
+ setBusinessAutomationSvgAttributes(item.sourceDot, {
10646
+ cx: source.x.toFixed(1),
10647
+ cy: source.y.toFixed(1),
10648
+ r: isSelected ? '4.2' : (isRelationHighlighted ? '3.7' : '3.2'),
10649
+ fill: '#ffffff',
10650
+ stroke: theme.edge,
10651
+ 'stroke-width': '1.8',
10652
+ opacity: isSelected ? '0.96' : (isRelationHighlighted ? '0.84' : (isContextEdge ? '0.82' : '0.96'))
10653
+ });
10654
+ setBusinessAutomationSvgAttributes(item.targetDot, {
10655
+ cx: target.x.toFixed(1),
10656
+ cy: target.y.toFixed(1),
10657
+ r: isSelected ? '4.2' : (isRelationHighlighted ? '3.7' : '3.2'),
10658
+ fill: theme.edge,
10659
+ stroke: '#ffffff',
10660
+ 'stroke-width': '1.4',
10661
+ opacity: isSelected ? '0.96' : (isRelationHighlighted ? '0.84' : (isContextEdge ? '0.82' : '0.96'))
10662
+ });
10663
+ setBusinessAutomationSvgElementsVisible([item.hitPath, item.path, item.sourceDot, item.targetDot], true);
10664
+ }
10665
+
10369
10666
  function renderBusinessAutomationEdges(module = _module) {
10370
10667
  if (!module?.container) {
10371
10668
  return;
@@ -10374,7 +10671,7 @@
10374
10671
  const edges = collectBusinessAutomationEdges(module);
10375
10672
  const relationContext = syncBusinessAutomationSelectionContext(module, {
10376
10673
  edges,
10377
- force: true,
10674
+ force: false,
10378
10675
  scheduleRender: false
10379
10676
  });
10380
10677
  if (_businessAutomationSelectedEdgeId
@@ -10388,33 +10685,38 @@
10388
10685
  return;
10389
10686
  }
10390
10687
  syncBusinessAutomationEdgeLayerOrder(module);
10688
+ clearBusinessAutomationEdgeCameraTransform(module);
10391
10689
 
10392
10690
  const containerRect = module.container.getBoundingClientRect();
10393
10691
  const width = Math.max(1, Math.round(containerRect.width || 1));
10394
10692
  const height = Math.max(1, Math.round(containerRect.height || 1));
10693
+ recordBusinessAutomationEdgeCameraState(module, width, height);
10395
10694
  for (const layer of [visualLayer, hitLayer]) {
10396
- layer.setAttribute('viewBox', `0 0 ${width} ${height}`);
10397
- layer.setAttribute('width', String(width));
10398
- layer.setAttribute('height', String(height));
10399
- layer.replaceChildren();
10695
+ setBusinessAutomationSvgAttributes(layer, {
10696
+ viewBox: `0 0 ${width} ${height}`,
10697
+ width: String(width),
10698
+ height: String(height)
10699
+ });
10400
10700
  }
10701
+ const renderState = ensureBusinessAutomationEdgeRenderState(module, visualLayer, hitLayer);
10702
+ const currentEdgeIds = new Set(
10703
+ edges
10704
+ .map(edge => String(edge?.id || '').trim())
10705
+ .filter(Boolean)
10706
+ );
10401
10707
 
10402
10708
  if (edges.length === 0 && !_businessAutomationConnectionDraft) {
10709
+ setBusinessAutomationSvgElementsVisible([renderState.visualGroup, renderState.hitGroup], false);
10403
10710
  return;
10404
10711
  }
10405
-
10406
- const visualGroup = createBusinessAutomationSvgElement('g', {
10407
- fill: 'none',
10408
- 'stroke-linecap': 'round',
10409
- 'stroke-linejoin': 'round'
10410
- });
10411
- const hitGroup = createBusinessAutomationSvgElement('g', {
10412
- fill: 'none',
10413
- 'stroke-linecap': 'round',
10414
- 'stroke-linejoin': 'round'
10415
- });
10712
+ setBusinessAutomationSvgElementsVisible([renderState.visualGroup, renderState.hitGroup], true);
10713
+ const liveEdgeIds = new Set();
10416
10714
 
10417
10715
  for (const edge of edges) {
10716
+ const edgeId = String(edge?.id || '').trim();
10717
+ if (!edgeId) {
10718
+ continue;
10719
+ }
10418
10720
  const sourcePin = findBusinessAutomationPinElement(module, edge.sourceNodeId, edge.sourcePinId, 'output');
10419
10721
  const targetPin = findBusinessAutomationPinElement(module, edge.targetNodeId, edge.targetPinId, 'input');
10420
10722
  const source = getBusinessAutomationEndpointRelativeToContainer(
@@ -10434,10 +10736,18 @@
10434
10736
  containerRect
10435
10737
  );
10436
10738
  if (!source || !target) {
10739
+ const existing = renderState.edgeItems.get(edgeId);
10740
+ if (existing) {
10741
+ setBusinessAutomationSvgElementsVisible([existing.hitPath, existing.path, existing.sourceDot, existing.targetDot], false);
10742
+ }
10437
10743
  continue;
10438
10744
  }
10439
10745
 
10440
10746
  if (!doesBusinessAutomationSegmentIntersectViewport(source, target, width, height)) {
10747
+ const existing = renderState.edgeItems.get(edgeId);
10748
+ if (existing) {
10749
+ setBusinessAutomationSvgElementsVisible([existing.hitPath, existing.path, existing.sourceDot, existing.targetDot], false);
10750
+ }
10441
10751
  continue;
10442
10752
  }
10443
10753
 
@@ -10456,63 +10766,24 @@
10456
10766
  const isSelected = String(edge.id || '') === _businessAutomationSelectedEdgeId;
10457
10767
  const isRelationHighlighted = relationContext?.edgeIds?.has?.(String(edge.id || '').trim()) === true;
10458
10768
  const hitPointerEvents = _businessAutomationConnectionDraft ? 'none' : 'stroke';
10459
- const hitPath = createBusinessAutomationSvgElement('path', {
10460
- d: pathData,
10461
- class: 'mind-map-business-automation-edge-hit',
10462
- stroke: '#000000',
10463
- 'stroke-width': '18',
10464
- opacity: '0',
10465
- 'pointer-events': hitPointerEvents,
10466
- 'data-edge-id': edge.id,
10467
- 'data-edge-contract': edge.contract || ''
10468
- });
10469
- hitPath.style.pointerEvents = hitPointerEvents;
10470
- hitPath.style.cursor = 'pointer';
10471
- hitPath.addEventListener('pointerdown', handleBusinessAutomationEdgePointerDown);
10472
- hitPath.addEventListener('wheel', handleBusinessAutomationEdgeWheel, { passive: false });
10473
- hitPath.addEventListener('click', handleBusinessAutomationEdgeClick);
10474
-
10475
- const path = createBusinessAutomationSvgElement('path', {
10476
- d: pathData,
10477
- class: `mind-map-business-automation-edge-path${isSelected ? ' is-selected' : ''}${isRelationHighlighted ? ' is-relation-highlight' : ''}`,
10478
- stroke: theme.edge,
10479
- 'stroke-width': isSelected ? '3.6' : (isRelationHighlighted ? (isContextEdge ? '2.45' : '2.65') : (isContextEdge ? '2.1' : '2.4')),
10480
- opacity: isSelected ? '0.96' : (isRelationHighlighted ? (isContextEdge ? '0.72' : '0.78') : (isContextEdge ? '0.68' : '0.82')),
10481
- 'stroke-dasharray': isContextEdge ? '7 7' : '',
10482
- filter: ''
10483
- });
10484
- path.style.pointerEvents = 'none';
10485
- path.dataset.edgeId = edge.id;
10486
- path.dataset.edgeContract = edge.contract || '';
10487
-
10488
- const sourceDot = createBusinessAutomationSvgElement('circle', {
10489
- cx: source.x.toFixed(1),
10490
- cy: source.y.toFixed(1),
10491
- r: isSelected ? '4.2' : (isRelationHighlighted ? '3.7' : '3.2'),
10492
- fill: '#ffffff',
10493
- stroke: theme.edge,
10494
- 'stroke-width': '1.8',
10495
- opacity: isSelected ? '0.96' : (isRelationHighlighted ? '0.84' : (isContextEdge ? '0.82' : '0.96'))
10496
- });
10497
- sourceDot.style.pointerEvents = 'none';
10498
- const targetDot = createBusinessAutomationSvgElement('circle', {
10499
- cx: target.x.toFixed(1),
10500
- cy: target.y.toFixed(1),
10501
- r: isSelected ? '4.2' : (isRelationHighlighted ? '3.7' : '3.2'),
10502
- fill: theme.edge,
10503
- stroke: '#ffffff',
10504
- 'stroke-width': '1.4',
10505
- opacity: isSelected ? '0.96' : (isRelationHighlighted ? '0.84' : (isContextEdge ? '0.82' : '0.96'))
10506
- });
10507
- targetDot.style.pointerEvents = 'none';
10508
-
10509
- hitGroup.appendChild(hitPath);
10510
- visualGroup.appendChild(path);
10511
- visualGroup.appendChild(sourceDot);
10512
- visualGroup.appendChild(targetDot);
10769
+ const item = ensureBusinessAutomationEdgeItem(renderState, edgeId);
10770
+ updateBusinessAutomationEdgeItem(item, edge, pathData, source, target, theme, isContextEdge, isSelected, isRelationHighlighted, hitPointerEvents);
10771
+ liveEdgeIds.add(edgeId);
10513
10772
  }
10514
10773
 
10774
+ renderState.edgeItems.forEach((item, edgeId) => {
10775
+ if (!liveEdgeIds.has(edgeId) && !currentEdgeIds.has(edgeId)) {
10776
+ removeBusinessAutomationEdgeItem(item);
10777
+ renderState.edgeItems.delete(edgeId);
10778
+ return;
10779
+ }
10780
+ if (!liveEdgeIds.has(edgeId)) {
10781
+ setBusinessAutomationSvgElementsVisible([item.hitPath, item.path, item.sourceDot, item.targetDot], false);
10782
+ }
10783
+ });
10784
+
10515
10785
  const draft = _businessAutomationConnectionDraft;
10786
+ let draftVisible = false;
10516
10787
  if (draft) {
10517
10788
  const sourcePin = findBusinessAutomationPinElement(module, draft.sourceNodeId, draft.sourcePinId, 'output');
10518
10789
  const source = getBusinessAutomationEndpointRelativeToContainer(
@@ -10529,7 +10800,7 @@
10529
10800
  const theme = isContextDraft
10530
10801
  ? AUTOMATION_CONTEXT_PIN_THEME
10531
10802
  : getAutomationPinTheme(draft.sourceType || 'Text');
10532
- const draftPath = createBusinessAutomationSvgElement('path', {
10803
+ setBusinessAutomationSvgAttributes(renderState.draftPath, {
10533
10804
  d: buildBusinessAutomationEdgePathData(source, target),
10534
10805
  class: 'mind-map-business-automation-edge-draft',
10535
10806
  stroke: theme.edge,
@@ -10537,8 +10808,7 @@
10537
10808
  'stroke-dasharray': isContextDraft ? '7 7' : '8 7',
10538
10809
  opacity: isContextDraft ? '0.66' : '0.72'
10539
10810
  });
10540
- draftPath.style.pointerEvents = 'none';
10541
- const draftTarget = createBusinessAutomationSvgElement('circle', {
10811
+ setBusinessAutomationSvgAttributes(renderState.draftTarget, {
10542
10812
  cx: target.x.toFixed(1),
10543
10813
  cy: target.y.toFixed(1),
10544
10814
  r: '4',
@@ -10547,15 +10817,18 @@
10547
10817
  'stroke-width': '2',
10548
10818
  opacity: '0.9'
10549
10819
  });
10550
- draftTarget.style.pointerEvents = 'none';
10551
- visualGroup.appendChild(draftPath);
10552
- visualGroup.appendChild(draftTarget);
10820
+ if (renderState.draftPath.parentNode !== renderState.visualGroup) {
10821
+ renderState.visualGroup.appendChild(renderState.draftPath);
10822
+ }
10823
+ if (renderState.draftTarget.parentNode !== renderState.visualGroup) {
10824
+ renderState.visualGroup.appendChild(renderState.draftTarget);
10825
+ }
10826
+ draftVisible = true;
10553
10827
  }
10554
10828
  }
10829
+ setBusinessAutomationSvgElementsVisible([renderState.draftPath, renderState.draftTarget], draftVisible);
10555
10830
 
10556
- applyBusinessAutomationResidentOcclusionMask(visualLayer, visualGroup, module, containerRect, width, height);
10557
- visualLayer.appendChild(visualGroup);
10558
- hitLayer.appendChild(hitGroup);
10831
+ applyBusinessAutomationResidentOcclusionMask(visualLayer, renderState.visualGroup, module, containerRect, width, height);
10559
10832
  }
10560
10833
 
10561
10834
  function hasBusinessAutomationConnectionDraft() {
@@ -19050,7 +19323,7 @@
19050
19323
  });
19051
19324
  };
19052
19325
  getDeviceCards().forEach(card => {
19053
- ['pointerdown', 'mousedown', 'mouseup', 'dblclick'].forEach(eventName => {
19326
+ ['pointerdown', 'mousedown', 'mouseup'].forEach(eventName => {
19054
19327
  card.addEventListener(eventName, event => {
19055
19328
  if (event.button === 1 || event.button === 2) {
19056
19329
  if (eventName === 'mousedown') {
@@ -21071,6 +21344,8 @@
21071
21344
 
21072
21345
  function isCanvasMotionInteractionActive() {
21073
21346
  const body = document.body;
21347
+ const css3dClassList = _module?.cssRenderer?.domElement?.classList ||
21348
+ document?.getElementById?.('css3d-dom-wrapper')?.classList;
21074
21349
  const now = typeof performance !== 'undefined' && typeof performance.now === 'function'
21075
21350
  ? performance.now()
21076
21351
  : Date.now();
@@ -21080,8 +21355,9 @@
21080
21355
  || 0
21081
21356
  );
21082
21357
 
21083
- return body?.classList?.contains?.('is-zooming') === true
21084
- || body?.classList?.contains?.('is-panning') === true
21358
+ return css3dClassList?.contains?.('is-zooming') === true
21359
+ || css3dClassList?.contains?.('is-panning') === true
21360
+ || css3dClassList?.contains?.('is-dragging') === true
21085
21361
  || body?.classList?.contains?.('is-node-dragging') === true
21086
21362
  || body?.classList?.contains?.('mindcanvas-is-moving') === true
21087
21363
  || _module?.isZooming === true
@@ -23612,6 +23888,7 @@
23612
23888
  openRemoteFleetControlPopupForTest: openRemoteFleetControlPopup,
23613
23889
  closeRemoteFleetControlPopupForTest: closeRemoteFleetControlPopup,
23614
23890
  hasBusinessAutomationConnectionDraft: hasBusinessAutomationConnectionDraft,
23891
+ syncBusinessAutomationEdgesForCameraMotion: syncBusinessAutomationEdgesForCameraMotion,
23615
23892
  renderBusinessAutomationEdges: renderBusinessAutomationEdges,
23616
23893
  scheduleBusinessAutomationEdgeRender: scheduleBusinessAutomationEdgeRender,
23617
23894
  syncBusinessAutomationSelectionContext: syncBusinessAutomationSelectionContext,