@mindexec/cli 0.2.219 → 0.2.220

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 +1910 -147
  5. package/wwwroot/_content/MindExecution.Shared/js/mind-map-css3d-manager.js +360 -93
  6. package/wwwroot/_content/MindExecution.Shared/js/mind-map-interactions.js +106 -43
  7. package/wwwroot/_content/MindExecution.Shared/js/mind-map-lod-renderer.js +77 -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
@@ -9778,6 +9778,99 @@
9778
9778
  }
9779
9779
  }
9780
9780
 
9781
+ function getBusinessAutomationCachedViewportMetrics(module) {
9782
+ const width = Math.max(0, Number(module?._lastViewportWidth || 0));
9783
+ const height = Math.max(0, Number(module?._lastViewportHeight || 0));
9784
+ if (width > 0 && height > 0) {
9785
+ return { width, height };
9786
+ }
9787
+
9788
+ return {
9789
+ width: Math.max(1, Number(module?.container?.clientWidth || 0)),
9790
+ height: Math.max(1, Number(module?.container?.clientHeight || 0))
9791
+ };
9792
+ }
9793
+
9794
+ function recordBusinessAutomationEdgeCameraState(module, width, height) {
9795
+ if (!module?.camera) {
9796
+ return;
9797
+ }
9798
+
9799
+ module._lastBusinessAutomationEdgeCameraState = {
9800
+ x: Number(module.camera.position?.x || 0),
9801
+ y: Number(module.camera.position?.y || 0),
9802
+ z: Math.max(1, Number(module.camera.position?.z || 1)),
9803
+ width: Math.max(1, Number(width || 1)),
9804
+ height: Math.max(1, Number(height || 1)),
9805
+ fov: Number(module.camera.fov || 45)
9806
+ };
9807
+ }
9808
+
9809
+ function clearBusinessAutomationEdgeCameraTransform(module) {
9810
+ const layers = [
9811
+ module?._businessAutomationEdgeVisualLayer || null,
9812
+ module?._businessAutomationEdgeLayer || null
9813
+ ].filter(Boolean);
9814
+ if (layers.length === 0 || module?._businessAutomationEdgeCameraTransformActive !== true) {
9815
+ return false;
9816
+ }
9817
+
9818
+ for (const layer of layers) {
9819
+ if (!layer?.style) continue;
9820
+ layer.style.transform = '';
9821
+ layer.style.transformOrigin = '';
9822
+ layer.style.willChange = '';
9823
+ }
9824
+ module._businessAutomationEdgeCameraTransformActive = false;
9825
+ module._lastBusinessAutomationEdgeTransformKey = '';
9826
+ return true;
9827
+ }
9828
+
9829
+ function syncBusinessAutomationEdgesForCameraMotion(module = _module) {
9830
+ const visualLayer = module?._businessAutomationEdgeVisualLayer || null;
9831
+ const hitLayer = module?._businessAutomationEdgeLayer || null;
9832
+ const camera = module?.camera || null;
9833
+ const last = module?._lastBusinessAutomationEdgeCameraState || null;
9834
+ if (!camera || !last || (!visualLayer?.isConnected && !hitLayer?.isConnected)) {
9835
+ return false;
9836
+ }
9837
+
9838
+ const viewportMetrics = getBusinessAutomationCachedViewportMetrics(module);
9839
+ const width = Math.max(1, Number(viewportMetrics.width || last.width || 1));
9840
+ const height = Math.max(1, Number(viewportMetrics.height || last.height || 1));
9841
+ const currentZ = Math.max(1, Number(camera.position?.z || 1));
9842
+ const lastZ = Math.max(1, Number(last.z || currentZ));
9843
+ const vfov = (Number(camera.fov || last.fov || 45) * Math.PI) / 180;
9844
+ const viewHeight = 2 * Math.tan(vfov / 2) * currentZ;
9845
+ const pxPerWorld = height / Math.max(1, viewHeight);
9846
+ const scale = Math.max(0.05, Math.min(20, lastZ / currentZ));
9847
+ const currentX = Number(camera.position?.x || 0);
9848
+ const currentY = Number(camera.position?.y || 0);
9849
+ const translateX = (Number(last.x || 0) - currentX) * pxPerWorld;
9850
+ const translateY = (currentY - Number(last.y || 0)) * pxPerWorld;
9851
+ const transformKey = [
9852
+ Math.round(width),
9853
+ Math.round(height),
9854
+ Math.round(translateX * 100),
9855
+ Math.round(translateY * 100),
9856
+ Math.round(scale * 10000)
9857
+ ].join('|');
9858
+
9859
+ if (transformKey !== module._lastBusinessAutomationEdgeTransformKey) {
9860
+ const transform = `translate3d(${translateX.toFixed(3)}px, ${translateY.toFixed(3)}px, 0) scale(${scale.toFixed(5)})`;
9861
+ for (const layer of [visualLayer, hitLayer]) {
9862
+ if (!layer?.style) continue;
9863
+ layer.style.transformOrigin = '50% 50%';
9864
+ layer.style.willChange = 'transform';
9865
+ layer.style.transform = transform;
9866
+ }
9867
+ module._lastBusinessAutomationEdgeTransformKey = transformKey;
9868
+ }
9869
+
9870
+ module._businessAutomationEdgeCameraTransformActive = true;
9871
+ return true;
9872
+ }
9873
+
9781
9874
  function getBusinessAutomationPinAnchorElement(pinElement) {
9782
9875
  return pinElement?.querySelector?.('.map-node-memo__automation-pin-dot') || pinElement || null;
9783
9876
  }
@@ -10122,14 +10215,46 @@
10122
10215
  }
10123
10216
 
10124
10217
  const rects = collectBusinessAutomationResidentOcclusionRects(module, containerRect, viewportWidth, viewportHeight);
10218
+ const renderState = module?._businessAutomationEdgeRenderState || null;
10125
10219
  if (rects.length === 0) {
10126
10220
  visualGroup.removeAttribute('mask');
10221
+ if (renderState?.occlusionMaskState) {
10222
+ renderState.occlusionMaskState.activeCount = 0;
10223
+ renderState.occlusionMaskState.blackRects?.forEach?.(element => {
10224
+ if (element?.parentNode) {
10225
+ element.remove();
10226
+ }
10227
+ });
10228
+ }
10127
10229
  return;
10128
10230
  }
10129
10231
 
10130
10232
  const maskId = 'mind-map-business-automation-resident-occlusion-mask';
10131
- const defs = createBusinessAutomationSvgElement('defs');
10132
- const mask = createBusinessAutomationSvgElement('mask', {
10233
+ const state = renderState || {};
10234
+ let maskState = state.occlusionMaskState || null;
10235
+ if (!maskState) {
10236
+ maskState = {
10237
+ defs: createBusinessAutomationSvgElement('defs'),
10238
+ mask: createBusinessAutomationSvgElement('mask'),
10239
+ baseRect: createBusinessAutomationSvgElement('rect'),
10240
+ blackRects: [],
10241
+ activeCount: 0
10242
+ };
10243
+ maskState.mask.style.maskType = 'luminance';
10244
+ maskState.mask.appendChild(maskState.baseRect);
10245
+ maskState.defs.appendChild(maskState.mask);
10246
+ if (renderState) {
10247
+ renderState.occlusionMaskState = maskState;
10248
+ }
10249
+ }
10250
+
10251
+ if (maskState.defs.parentNode !== visualLayer) {
10252
+ visualLayer.insertBefore(maskState.defs, visualGroup);
10253
+ } else if (maskState.defs.nextSibling !== visualGroup && visualGroup.parentNode === visualLayer) {
10254
+ visualLayer.insertBefore(maskState.defs, visualGroup);
10255
+ }
10256
+
10257
+ setBusinessAutomationSvgAttributes(maskState.mask, {
10133
10258
  id: maskId,
10134
10259
  x: '-80',
10135
10260
  y: '-80',
@@ -10137,17 +10262,21 @@
10137
10262
  height: String(viewportHeight + 160),
10138
10263
  maskUnits: 'userSpaceOnUse'
10139
10264
  });
10140
- mask.style.maskType = 'luminance';
10141
- mask.appendChild(createBusinessAutomationSvgElement('rect', {
10265
+ setBusinessAutomationSvgAttributes(maskState.baseRect, {
10142
10266
  x: '-80',
10143
10267
  y: '-80',
10144
10268
  width: String(viewportWidth + 160),
10145
10269
  height: String(viewportHeight + 160),
10146
10270
  fill: '#ffffff'
10147
- }));
10271
+ });
10148
10272
 
10149
- rects.forEach(rect => {
10150
- mask.appendChild(createBusinessAutomationSvgElement('rect', {
10273
+ rects.forEach((rect, index) => {
10274
+ let element = maskState.blackRects[index] || null;
10275
+ if (!element) {
10276
+ element = createBusinessAutomationSvgElement('rect');
10277
+ maskState.blackRects[index] = element;
10278
+ }
10279
+ setBusinessAutomationSvgAttributes(element, {
10151
10280
  x: rect.x.toFixed(1),
10152
10281
  y: rect.y.toFixed(1),
10153
10282
  width: rect.width.toFixed(1),
@@ -10155,11 +10284,19 @@
10155
10284
  rx: '6',
10156
10285
  ry: '6',
10157
10286
  fill: '#000000'
10158
- }));
10287
+ });
10288
+ if (element.parentNode !== maskState.mask) {
10289
+ maskState.mask.appendChild(element);
10290
+ }
10159
10291
  });
10292
+ for (let i = rects.length; i < maskState.blackRects.length; i++) {
10293
+ const element = maskState.blackRects[i];
10294
+ if (element?.parentNode) {
10295
+ element.remove();
10296
+ }
10297
+ }
10298
+ maskState.activeCount = rects.length;
10160
10299
 
10161
- defs.appendChild(mask);
10162
- visualLayer.appendChild(defs);
10163
10300
  visualGroup.setAttribute('mask', `url(#${maskId})`);
10164
10301
  }
10165
10302
 
@@ -10230,11 +10367,26 @@
10230
10367
  return true;
10231
10368
  }
10232
10369
 
10233
- function createBusinessAutomationSvgElement(name, attributes) {
10234
- const element = document.createElementNS('http://www.w3.org/2000/svg', name);
10370
+ function setBusinessAutomationSvgAttribute(element, key, value) {
10371
+ if (!element || !key) {
10372
+ return;
10373
+ }
10374
+
10375
+ const nextValue = String(value ?? '');
10376
+ if (element.getAttribute(key) !== nextValue) {
10377
+ element.setAttribute(key, nextValue);
10378
+ }
10379
+ }
10380
+
10381
+ function setBusinessAutomationSvgAttributes(element, attributes) {
10235
10382
  Object.entries(attributes || {}).forEach(([key, value]) => {
10236
- element.setAttribute(key, String(value));
10383
+ setBusinessAutomationSvgAttribute(element, key, value);
10237
10384
  });
10385
+ }
10386
+
10387
+ function createBusinessAutomationSvgElement(name, attributes) {
10388
+ const element = document.createElementNS('http://www.w3.org/2000/svg', name);
10389
+ setBusinessAutomationSvgAttributes(element, attributes);
10238
10390
  return element;
10239
10391
  }
10240
10392
 
@@ -10366,6 +10518,144 @@
10366
10518
  };
10367
10519
  }
10368
10520
 
10521
+ function setBusinessAutomationSvgElementsVisible(elements, visible) {
10522
+ const display = visible ? '' : 'none';
10523
+ (Array.isArray(elements) ? elements : [elements]).forEach(element => {
10524
+ if (element?.style && element.style.display !== display) {
10525
+ element.style.display = display;
10526
+ }
10527
+ });
10528
+ }
10529
+
10530
+ function ensureBusinessAutomationEdgeRenderState(module, visualLayer, hitLayer) {
10531
+ let state = module._businessAutomationEdgeRenderState || null;
10532
+ if (!state) {
10533
+ state = {
10534
+ edgeItems: new Map(),
10535
+ visualGroup: createBusinessAutomationSvgElement('g'),
10536
+ hitGroup: createBusinessAutomationSvgElement('g'),
10537
+ draftPath: createBusinessAutomationSvgElement('path'),
10538
+ draftTarget: createBusinessAutomationSvgElement('circle'),
10539
+ occlusionMaskState: null
10540
+ };
10541
+ state.draftPath.style.pointerEvents = 'none';
10542
+ state.draftTarget.style.pointerEvents = 'none';
10543
+ module._businessAutomationEdgeRenderState = state;
10544
+ }
10545
+
10546
+ setBusinessAutomationSvgAttributes(state.visualGroup, {
10547
+ fill: 'none',
10548
+ 'stroke-linecap': 'round',
10549
+ 'stroke-linejoin': 'round'
10550
+ });
10551
+ setBusinessAutomationSvgAttributes(state.hitGroup, {
10552
+ fill: 'none',
10553
+ 'stroke-linecap': 'round',
10554
+ 'stroke-linejoin': 'round'
10555
+ });
10556
+
10557
+ if (state.visualGroup.parentNode !== visualLayer) {
10558
+ visualLayer.appendChild(state.visualGroup);
10559
+ }
10560
+ if (state.hitGroup.parentNode !== hitLayer) {
10561
+ hitLayer.appendChild(state.hitGroup);
10562
+ }
10563
+
10564
+ return state;
10565
+ }
10566
+
10567
+ function ensureBusinessAutomationEdgeItem(renderState, edgeId) {
10568
+ const normalizedId = String(edgeId || '').trim();
10569
+ let item = renderState.edgeItems.get(normalizedId) || null;
10570
+ if (item) {
10571
+ return item;
10572
+ }
10573
+
10574
+ const hitPath = createBusinessAutomationSvgElement('path', {
10575
+ class: 'mind-map-business-automation-edge-hit',
10576
+ stroke: '#000000',
10577
+ 'stroke-width': '18',
10578
+ opacity: '0'
10579
+ });
10580
+ hitPath.style.cursor = 'pointer';
10581
+ hitPath.addEventListener('pointerdown', handleBusinessAutomationEdgePointerDown);
10582
+ hitPath.addEventListener('wheel', handleBusinessAutomationEdgeWheel, { passive: false });
10583
+ hitPath.addEventListener('click', handleBusinessAutomationEdgeClick);
10584
+
10585
+ const path = createBusinessAutomationSvgElement('path');
10586
+ path.style.pointerEvents = 'none';
10587
+ const sourceDot = createBusinessAutomationSvgElement('circle');
10588
+ sourceDot.style.pointerEvents = 'none';
10589
+ const targetDot = createBusinessAutomationSvgElement('circle');
10590
+ targetDot.style.pointerEvents = 'none';
10591
+
10592
+ renderState.hitGroup.appendChild(hitPath);
10593
+ renderState.visualGroup.appendChild(path);
10594
+ renderState.visualGroup.appendChild(sourceDot);
10595
+ renderState.visualGroup.appendChild(targetDot);
10596
+
10597
+ item = { edgeId: normalizedId, hitPath, path, sourceDot, targetDot };
10598
+ renderState.edgeItems.set(normalizedId, item);
10599
+ return item;
10600
+ }
10601
+
10602
+ function removeBusinessAutomationEdgeItem(item) {
10603
+ if (!item) {
10604
+ return;
10605
+ }
10606
+
10607
+ item.hitPath?.remove?.();
10608
+ item.path?.remove?.();
10609
+ item.sourceDot?.remove?.();
10610
+ item.targetDot?.remove?.();
10611
+ }
10612
+
10613
+ function updateBusinessAutomationEdgeItem(item, edge, pathData, source, target, theme, isContextEdge, isSelected, isRelationHighlighted, hitPointerEvents) {
10614
+ setBusinessAutomationSvgAttributes(item.hitPath, {
10615
+ d: pathData,
10616
+ class: 'mind-map-business-automation-edge-hit',
10617
+ stroke: '#000000',
10618
+ 'stroke-width': '18',
10619
+ opacity: '0',
10620
+ 'pointer-events': hitPointerEvents,
10621
+ 'data-edge-id': edge.id,
10622
+ 'data-edge-contract': edge.contract || ''
10623
+ });
10624
+ item.hitPath.style.pointerEvents = hitPointerEvents;
10625
+
10626
+ setBusinessAutomationSvgAttributes(item.path, {
10627
+ d: pathData,
10628
+ class: `mind-map-business-automation-edge-path${isSelected ? ' is-selected' : ''}${isRelationHighlighted ? ' is-relation-highlight' : ''}`,
10629
+ stroke: theme.edge,
10630
+ 'stroke-width': isSelected ? '3.6' : (isRelationHighlighted ? (isContextEdge ? '2.45' : '2.65') : (isContextEdge ? '2.1' : '2.4')),
10631
+ opacity: isSelected ? '0.96' : (isRelationHighlighted ? (isContextEdge ? '0.72' : '0.78') : (isContextEdge ? '0.68' : '0.82')),
10632
+ 'stroke-dasharray': isContextEdge ? '7 7' : '',
10633
+ filter: ''
10634
+ });
10635
+ item.path.dataset.edgeId = edge.id;
10636
+ item.path.dataset.edgeContract = edge.contract || '';
10637
+
10638
+ setBusinessAutomationSvgAttributes(item.sourceDot, {
10639
+ cx: source.x.toFixed(1),
10640
+ cy: source.y.toFixed(1),
10641
+ r: isSelected ? '4.2' : (isRelationHighlighted ? '3.7' : '3.2'),
10642
+ fill: '#ffffff',
10643
+ stroke: theme.edge,
10644
+ 'stroke-width': '1.8',
10645
+ opacity: isSelected ? '0.96' : (isRelationHighlighted ? '0.84' : (isContextEdge ? '0.82' : '0.96'))
10646
+ });
10647
+ setBusinessAutomationSvgAttributes(item.targetDot, {
10648
+ cx: target.x.toFixed(1),
10649
+ cy: target.y.toFixed(1),
10650
+ r: isSelected ? '4.2' : (isRelationHighlighted ? '3.7' : '3.2'),
10651
+ fill: theme.edge,
10652
+ stroke: '#ffffff',
10653
+ 'stroke-width': '1.4',
10654
+ opacity: isSelected ? '0.96' : (isRelationHighlighted ? '0.84' : (isContextEdge ? '0.82' : '0.96'))
10655
+ });
10656
+ setBusinessAutomationSvgElementsVisible([item.hitPath, item.path, item.sourceDot, item.targetDot], true);
10657
+ }
10658
+
10369
10659
  function renderBusinessAutomationEdges(module = _module) {
10370
10660
  if (!module?.container) {
10371
10661
  return;
@@ -10374,7 +10664,7 @@
10374
10664
  const edges = collectBusinessAutomationEdges(module);
10375
10665
  const relationContext = syncBusinessAutomationSelectionContext(module, {
10376
10666
  edges,
10377
- force: true,
10667
+ force: false,
10378
10668
  scheduleRender: false
10379
10669
  });
10380
10670
  if (_businessAutomationSelectedEdgeId
@@ -10388,33 +10678,38 @@
10388
10678
  return;
10389
10679
  }
10390
10680
  syncBusinessAutomationEdgeLayerOrder(module);
10681
+ clearBusinessAutomationEdgeCameraTransform(module);
10391
10682
 
10392
10683
  const containerRect = module.container.getBoundingClientRect();
10393
10684
  const width = Math.max(1, Math.round(containerRect.width || 1));
10394
10685
  const height = Math.max(1, Math.round(containerRect.height || 1));
10686
+ recordBusinessAutomationEdgeCameraState(module, width, height);
10395
10687
  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();
10688
+ setBusinessAutomationSvgAttributes(layer, {
10689
+ viewBox: `0 0 ${width} ${height}`,
10690
+ width: String(width),
10691
+ height: String(height)
10692
+ });
10400
10693
  }
10694
+ const renderState = ensureBusinessAutomationEdgeRenderState(module, visualLayer, hitLayer);
10695
+ const currentEdgeIds = new Set(
10696
+ edges
10697
+ .map(edge => String(edge?.id || '').trim())
10698
+ .filter(Boolean)
10699
+ );
10401
10700
 
10402
10701
  if (edges.length === 0 && !_businessAutomationConnectionDraft) {
10702
+ setBusinessAutomationSvgElementsVisible([renderState.visualGroup, renderState.hitGroup], false);
10403
10703
  return;
10404
10704
  }
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
- });
10705
+ setBusinessAutomationSvgElementsVisible([renderState.visualGroup, renderState.hitGroup], true);
10706
+ const liveEdgeIds = new Set();
10416
10707
 
10417
10708
  for (const edge of edges) {
10709
+ const edgeId = String(edge?.id || '').trim();
10710
+ if (!edgeId) {
10711
+ continue;
10712
+ }
10418
10713
  const sourcePin = findBusinessAutomationPinElement(module, edge.sourceNodeId, edge.sourcePinId, 'output');
10419
10714
  const targetPin = findBusinessAutomationPinElement(module, edge.targetNodeId, edge.targetPinId, 'input');
10420
10715
  const source = getBusinessAutomationEndpointRelativeToContainer(
@@ -10434,10 +10729,18 @@
10434
10729
  containerRect
10435
10730
  );
10436
10731
  if (!source || !target) {
10732
+ const existing = renderState.edgeItems.get(edgeId);
10733
+ if (existing) {
10734
+ setBusinessAutomationSvgElementsVisible([existing.hitPath, existing.path, existing.sourceDot, existing.targetDot], false);
10735
+ }
10437
10736
  continue;
10438
10737
  }
10439
10738
 
10440
10739
  if (!doesBusinessAutomationSegmentIntersectViewport(source, target, width, height)) {
10740
+ const existing = renderState.edgeItems.get(edgeId);
10741
+ if (existing) {
10742
+ setBusinessAutomationSvgElementsVisible([existing.hitPath, existing.path, existing.sourceDot, existing.targetDot], false);
10743
+ }
10441
10744
  continue;
10442
10745
  }
10443
10746
 
@@ -10456,63 +10759,24 @@
10456
10759
  const isSelected = String(edge.id || '') === _businessAutomationSelectedEdgeId;
10457
10760
  const isRelationHighlighted = relationContext?.edgeIds?.has?.(String(edge.id || '').trim()) === true;
10458
10761
  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);
10762
+ const item = ensureBusinessAutomationEdgeItem(renderState, edgeId);
10763
+ updateBusinessAutomationEdgeItem(item, edge, pathData, source, target, theme, isContextEdge, isSelected, isRelationHighlighted, hitPointerEvents);
10764
+ liveEdgeIds.add(edgeId);
10513
10765
  }
10514
10766
 
10767
+ renderState.edgeItems.forEach((item, edgeId) => {
10768
+ if (!liveEdgeIds.has(edgeId) && !currentEdgeIds.has(edgeId)) {
10769
+ removeBusinessAutomationEdgeItem(item);
10770
+ renderState.edgeItems.delete(edgeId);
10771
+ return;
10772
+ }
10773
+ if (!liveEdgeIds.has(edgeId)) {
10774
+ setBusinessAutomationSvgElementsVisible([item.hitPath, item.path, item.sourceDot, item.targetDot], false);
10775
+ }
10776
+ });
10777
+
10515
10778
  const draft = _businessAutomationConnectionDraft;
10779
+ let draftVisible = false;
10516
10780
  if (draft) {
10517
10781
  const sourcePin = findBusinessAutomationPinElement(module, draft.sourceNodeId, draft.sourcePinId, 'output');
10518
10782
  const source = getBusinessAutomationEndpointRelativeToContainer(
@@ -10529,7 +10793,7 @@
10529
10793
  const theme = isContextDraft
10530
10794
  ? AUTOMATION_CONTEXT_PIN_THEME
10531
10795
  : getAutomationPinTheme(draft.sourceType || 'Text');
10532
- const draftPath = createBusinessAutomationSvgElement('path', {
10796
+ setBusinessAutomationSvgAttributes(renderState.draftPath, {
10533
10797
  d: buildBusinessAutomationEdgePathData(source, target),
10534
10798
  class: 'mind-map-business-automation-edge-draft',
10535
10799
  stroke: theme.edge,
@@ -10537,8 +10801,7 @@
10537
10801
  'stroke-dasharray': isContextDraft ? '7 7' : '8 7',
10538
10802
  opacity: isContextDraft ? '0.66' : '0.72'
10539
10803
  });
10540
- draftPath.style.pointerEvents = 'none';
10541
- const draftTarget = createBusinessAutomationSvgElement('circle', {
10804
+ setBusinessAutomationSvgAttributes(renderState.draftTarget, {
10542
10805
  cx: target.x.toFixed(1),
10543
10806
  cy: target.y.toFixed(1),
10544
10807
  r: '4',
@@ -10547,15 +10810,18 @@
10547
10810
  'stroke-width': '2',
10548
10811
  opacity: '0.9'
10549
10812
  });
10550
- draftTarget.style.pointerEvents = 'none';
10551
- visualGroup.appendChild(draftPath);
10552
- visualGroup.appendChild(draftTarget);
10813
+ if (renderState.draftPath.parentNode !== renderState.visualGroup) {
10814
+ renderState.visualGroup.appendChild(renderState.draftPath);
10815
+ }
10816
+ if (renderState.draftTarget.parentNode !== renderState.visualGroup) {
10817
+ renderState.visualGroup.appendChild(renderState.draftTarget);
10818
+ }
10819
+ draftVisible = true;
10553
10820
  }
10554
10821
  }
10822
+ setBusinessAutomationSvgElementsVisible([renderState.draftPath, renderState.draftTarget], draftVisible);
10555
10823
 
10556
- applyBusinessAutomationResidentOcclusionMask(visualLayer, visualGroup, module, containerRect, width, height);
10557
- visualLayer.appendChild(visualGroup);
10558
- hitLayer.appendChild(hitGroup);
10824
+ applyBusinessAutomationResidentOcclusionMask(visualLayer, renderState.visualGroup, module, containerRect, width, height);
10559
10825
  }
10560
10826
 
10561
10827
  function hasBusinessAutomationConnectionDraft() {
@@ -19050,7 +19316,7 @@
19050
19316
  });
19051
19317
  };
19052
19318
  getDeviceCards().forEach(card => {
19053
- ['pointerdown', 'mousedown', 'mouseup', 'dblclick'].forEach(eventName => {
19319
+ ['pointerdown', 'mousedown', 'mouseup'].forEach(eventName => {
19054
19320
  card.addEventListener(eventName, event => {
19055
19321
  if (event.button === 1 || event.button === 2) {
19056
19322
  if (eventName === 'mousedown') {
@@ -23612,6 +23878,7 @@
23612
23878
  openRemoteFleetControlPopupForTest: openRemoteFleetControlPopup,
23613
23879
  closeRemoteFleetControlPopupForTest: closeRemoteFleetControlPopup,
23614
23880
  hasBusinessAutomationConnectionDraft: hasBusinessAutomationConnectionDraft,
23881
+ syncBusinessAutomationEdgesForCameraMotion: syncBusinessAutomationEdgesForCameraMotion,
23615
23882
  renderBusinessAutomationEdges: renderBusinessAutomationEdges,
23616
23883
  scheduleBusinessAutomationEdgeRender: scheduleBusinessAutomationEdgeRender,
23617
23884
  syncBusinessAutomationSelectionContext: syncBusinessAutomationSelectionContext,