@mindexec/cli 0.2.218 → 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 (23) hide show
  1. package/package.json +1 -1
  2. package/scripts/remote-fleet-render-smoke.mjs +11 -0
  3. package/wwwroot/_content/MindExecution.Shared/css/mind-map-overrides.css +36 -6
  4. package/wwwroot/_content/MindExecution.Shared/js/background-themes.js +28 -113
  5. package/wwwroot/_content/MindExecution.Shared/js/mind-map-core.js +2157 -104
  6. package/wwwroot/_content/MindExecution.Shared/js/mind-map-css3d-manager.js +399 -96
  7. package/wwwroot/_content/MindExecution.Shared/js/mind-map-interactions.js +121 -49
  8. package/wwwroot/_content/MindExecution.Shared/js/mind-map-lod-renderer.js +77 -3
  9. package/wwwroot/_content/MindExecution.Shared/js/mind-map-nodes.js +83 -14
  10. package/wwwroot/_content/MindExecution.Shared/js/mind-map-text-overlay-v2.js +5 -0
  11. package/wwwroot/_content/MindExecution.Shared/js/renderers/CSS3DRenderer.js +2 -2
  12. package/wwwroot/_framework/{MindExecution.Core.21gc0645uz.dll → MindExecution.Core.xsad4wu36e.dll} +0 -0
  13. package/wwwroot/_framework/{MindExecution.Plugins.Admin.29mytzdaun.dll → MindExecution.Plugins.Admin.m5d94977um.dll} +0 -0
  14. package/wwwroot/_framework/{MindExecution.Plugins.Business.asckvekct8.dll → MindExecution.Plugins.Business.ntqdn1hta3.dll} +0 -0
  15. package/wwwroot/_framework/{MindExecution.Plugins.Concept.u9kzsgf64o.dll → MindExecution.Plugins.Concept.mqiyx4db4r.dll} +0 -0
  16. package/wwwroot/_framework/{MindExecution.Plugins.PlanMaster.kibqg6rvqh.dll → MindExecution.Plugins.PlanMaster.fnortumnuu.dll} +0 -0
  17. package/wwwroot/_framework/{MindExecution.Plugins.YouTube.089r64n2hv.dll → MindExecution.Plugins.YouTube.86osu6wpgh.dll} +0 -0
  18. package/wwwroot/_framework/{MindExecution.Shared.tlbhl3vzry.dll → MindExecution.Shared.wg2otcw4bv.dll} +0 -0
  19. package/wwwroot/_framework/{MindExecution.Web.7axuoygrwi.dll → MindExecution.Web.gfio3kfxrd.dll} +0 -0
  20. package/wwwroot/_framework/blazor.boot.json +17 -17
  21. package/wwwroot/index.html +3 -3
  22. package/wwwroot/service-worker-assets.js +28 -28
  23. package/wwwroot/service-worker.js +1 -1
@@ -830,7 +830,11 @@
830
830
  body.is-zooming .css3d-resolution-wrapper,
831
831
  body.is-panning .css3d-resolution-wrapper,
832
832
  body.mindcanvas-is-moving .css3d-resolution-wrapper,
833
- body.mindcanvas-is-dense .css3d-resolution-wrapper {
833
+ body.mindcanvas-is-dense .css3d-resolution-wrapper,
834
+ #css3d-dom-wrapper.is-zooming .css3d-resolution-wrapper,
835
+ #css3d-dom-wrapper.is-panning .css3d-resolution-wrapper,
836
+ #css3d-dom-wrapper.mindcanvas-is-moving .css3d-resolution-wrapper,
837
+ #css3d-dom-wrapper.mindcanvas-is-dense .css3d-resolution-wrapper {
834
838
  transition: none !important;
835
839
  -webkit-transition: none !important;
836
840
  filter: none !important;
@@ -844,7 +848,15 @@
844
848
  body.is-zooming .css3d-resolution-wrapper [id^="css3d-node-"],
845
849
  body.is-panning .css3d-resolution-wrapper [id^="css3d-node-"],
846
850
  body.mindcanvas-is-moving .css3d-resolution-wrapper [id^="css3d-node-"],
847
- body.mindcanvas-is-dense .css3d-resolution-wrapper [id^="css3d-node-"] {
851
+ body.mindcanvas-is-dense .css3d-resolution-wrapper [id^="css3d-node-"],
852
+ #css3d-dom-wrapper.is-zooming .css3d-resolution-wrapper .css3d-dynamic-node,
853
+ #css3d-dom-wrapper.is-panning .css3d-resolution-wrapper .css3d-dynamic-node,
854
+ #css3d-dom-wrapper.mindcanvas-is-moving .css3d-resolution-wrapper .css3d-dynamic-node,
855
+ #css3d-dom-wrapper.mindcanvas-is-dense .css3d-resolution-wrapper .css3d-dynamic-node,
856
+ #css3d-dom-wrapper.is-zooming .css3d-resolution-wrapper [id^="css3d-node-"],
857
+ #css3d-dom-wrapper.is-panning .css3d-resolution-wrapper [id^="css3d-node-"],
858
+ #css3d-dom-wrapper.mindcanvas-is-moving .css3d-resolution-wrapper [id^="css3d-node-"],
859
+ #css3d-dom-wrapper.mindcanvas-is-dense .css3d-resolution-wrapper [id^="css3d-node-"] {
848
860
  box-shadow: none !important;
849
861
  filter: none !important;
850
862
  -webkit-filter: none !important;
@@ -858,6 +870,12 @@
858
870
  body.is-zooming .embed-card *,
859
871
  body.is-zooming .embed-action,
860
872
  body.is-zooming .embed-play-button,
873
+ #css3d-dom-wrapper.is-zooming .embed-content iframe,
874
+ #css3d-dom-wrapper.is-zooming .embed-iframe-host iframe,
875
+ #css3d-dom-wrapper.is-zooming .embed-card,
876
+ #css3d-dom-wrapper.is-zooming .embed-card *,
877
+ #css3d-dom-wrapper.is-zooming .embed-action,
878
+ #css3d-dom-wrapper.is-zooming .embed-play-button,
861
879
  body.is-panning .embed-content iframe,
862
880
  body.is-panning .embed-iframe-host iframe,
863
881
  body.is-panning .embed-card,
@@ -876,6 +894,12 @@
876
894
  body.mindcanvas-is-moving .embed-card *,
877
895
  body.mindcanvas-is-moving .embed-action,
878
896
  body.mindcanvas-is-moving .embed-play-button,
897
+ #css3d-dom-wrapper.mindcanvas-is-moving .embed-content iframe,
898
+ #css3d-dom-wrapper.mindcanvas-is-moving .embed-iframe-host iframe,
899
+ #css3d-dom-wrapper.mindcanvas-is-moving .embed-card,
900
+ #css3d-dom-wrapper.mindcanvas-is-moving .embed-card *,
901
+ #css3d-dom-wrapper.mindcanvas-is-moving .embed-action,
902
+ #css3d-dom-wrapper.mindcanvas-is-moving .embed-play-button,
879
903
  .is-dragging .embed-content iframe,
880
904
  .is-dragging .embed-iframe-host iframe,
881
905
  .is-dragging .embed-card,
@@ -908,12 +932,16 @@
908
932
 
909
933
  body.is-zooming .css3d-resolution-wrapper.node-type-embed .embed-content[data-iframe-interacting="true"] .embed-iframe-host,
910
934
  body.is-zooming .css3d-resolution-wrapper.node-type-embed .embed-content[data-iframe-interacting="true"] .embed-iframe-host iframe,
935
+ #css3d-dom-wrapper.is-zooming .css3d-resolution-wrapper.node-type-embed .embed-content[data-iframe-interacting="true"] .embed-iframe-host,
936
+ #css3d-dom-wrapper.is-zooming .css3d-resolution-wrapper.node-type-embed .embed-content[data-iframe-interacting="true"] .embed-iframe-host iframe,
911
937
  body.is-panning .css3d-resolution-wrapper.node-type-embed .embed-content[data-iframe-interacting="true"] .embed-iframe-host,
912
938
  body.is-panning .css3d-resolution-wrapper.node-type-embed .embed-content[data-iframe-interacting="true"] .embed-iframe-host iframe,
913
939
  body.is-node-dragging .css3d-resolution-wrapper.node-type-embed .embed-content[data-iframe-interacting="true"] .embed-iframe-host,
914
940
  body.is-node-dragging .css3d-resolution-wrapper.node-type-embed .embed-content[data-iframe-interacting="true"] .embed-iframe-host iframe,
915
941
  body.mindcanvas-is-moving .css3d-resolution-wrapper.node-type-embed .embed-content[data-iframe-interacting="true"] .embed-iframe-host,
916
942
  body.mindcanvas-is-moving .css3d-resolution-wrapper.node-type-embed .embed-content[data-iframe-interacting="true"] .embed-iframe-host iframe,
943
+ #css3d-dom-wrapper.mindcanvas-is-moving .css3d-resolution-wrapper.node-type-embed .embed-content[data-iframe-interacting="true"] .embed-iframe-host,
944
+ #css3d-dom-wrapper.mindcanvas-is-moving .css3d-resolution-wrapper.node-type-embed .embed-content[data-iframe-interacting="true"] .embed-iframe-host iframe,
917
945
  .is-dragging .css3d-resolution-wrapper.node-type-embed .embed-content[data-iframe-interacting="true"] .embed-iframe-host,
918
946
  .is-dragging .css3d-resolution-wrapper.node-type-embed .embed-content[data-iframe-interacting="true"] .embed-iframe-host iframe,
919
947
  .is-panning .css3d-resolution-wrapper.node-type-embed .embed-content[data-iframe-interacting="true"] .embed-iframe-host,
@@ -928,7 +956,15 @@
928
956
  body.is-zooming .css3d-resolution-wrapper .map-node-memo__agent-console-panel,
929
957
  body.is-panning .css3d-resolution-wrapper .map-node-memo__agent-console-panel,
930
958
  body.mindcanvas-is-moving .css3d-resolution-wrapper .map-node-memo__agent-console-panel,
931
- body.mindcanvas-is-dense .css3d-resolution-wrapper .map-node-memo__agent-console-panel {
959
+ body.mindcanvas-is-dense .css3d-resolution-wrapper .map-node-memo__agent-console-panel,
960
+ #css3d-dom-wrapper.is-zooming .ai-loading-row.ai-loading-row-media,
961
+ #css3d-dom-wrapper.is-panning .ai-loading-row.ai-loading-row-media,
962
+ #css3d-dom-wrapper.mindcanvas-is-moving .ai-loading-row.ai-loading-row-media,
963
+ #css3d-dom-wrapper.mindcanvas-is-dense .ai-loading-row.ai-loading-row-media,
964
+ #css3d-dom-wrapper.is-zooming .css3d-resolution-wrapper .map-node-memo__agent-console-panel,
965
+ #css3d-dom-wrapper.is-panning .css3d-resolution-wrapper .map-node-memo__agent-console-panel,
966
+ #css3d-dom-wrapper.mindcanvas-is-moving .css3d-resolution-wrapper .map-node-memo__agent-console-panel,
967
+ #css3d-dom-wrapper.mindcanvas-is-dense .css3d-resolution-wrapper .map-node-memo__agent-console-panel {
932
968
  box-shadow: none !important;
933
969
  backdrop-filter: none !important;
934
970
  -webkit-backdrop-filter: none !important;
@@ -9742,6 +9778,99 @@
9742
9778
  }
9743
9779
  }
9744
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
+
9745
9874
  function getBusinessAutomationPinAnchorElement(pinElement) {
9746
9875
  return pinElement?.querySelector?.('.map-node-memo__automation-pin-dot') || pinElement || null;
9747
9876
  }
@@ -10086,14 +10215,46 @@
10086
10215
  }
10087
10216
 
10088
10217
  const rects = collectBusinessAutomationResidentOcclusionRects(module, containerRect, viewportWidth, viewportHeight);
10218
+ const renderState = module?._businessAutomationEdgeRenderState || null;
10089
10219
  if (rects.length === 0) {
10090
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
+ }
10091
10229
  return;
10092
10230
  }
10093
10231
 
10094
10232
  const maskId = 'mind-map-business-automation-resident-occlusion-mask';
10095
- const defs = createBusinessAutomationSvgElement('defs');
10096
- 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, {
10097
10258
  id: maskId,
10098
10259
  x: '-80',
10099
10260
  y: '-80',
@@ -10101,17 +10262,21 @@
10101
10262
  height: String(viewportHeight + 160),
10102
10263
  maskUnits: 'userSpaceOnUse'
10103
10264
  });
10104
- mask.style.maskType = 'luminance';
10105
- mask.appendChild(createBusinessAutomationSvgElement('rect', {
10265
+ setBusinessAutomationSvgAttributes(maskState.baseRect, {
10106
10266
  x: '-80',
10107
10267
  y: '-80',
10108
10268
  width: String(viewportWidth + 160),
10109
10269
  height: String(viewportHeight + 160),
10110
10270
  fill: '#ffffff'
10111
- }));
10271
+ });
10112
10272
 
10113
- rects.forEach(rect => {
10114
- 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, {
10115
10280
  x: rect.x.toFixed(1),
10116
10281
  y: rect.y.toFixed(1),
10117
10282
  width: rect.width.toFixed(1),
@@ -10119,11 +10284,19 @@
10119
10284
  rx: '6',
10120
10285
  ry: '6',
10121
10286
  fill: '#000000'
10122
- }));
10287
+ });
10288
+ if (element.parentNode !== maskState.mask) {
10289
+ maskState.mask.appendChild(element);
10290
+ }
10123
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;
10124
10299
 
10125
- defs.appendChild(mask);
10126
- visualLayer.appendChild(defs);
10127
10300
  visualGroup.setAttribute('mask', `url(#${maskId})`);
10128
10301
  }
10129
10302
 
@@ -10194,11 +10367,26 @@
10194
10367
  return true;
10195
10368
  }
10196
10369
 
10197
- function createBusinessAutomationSvgElement(name, attributes) {
10198
- 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) {
10199
10382
  Object.entries(attributes || {}).forEach(([key, value]) => {
10200
- element.setAttribute(key, String(value));
10383
+ setBusinessAutomationSvgAttribute(element, key, value);
10201
10384
  });
10385
+ }
10386
+
10387
+ function createBusinessAutomationSvgElement(name, attributes) {
10388
+ const element = document.createElementNS('http://www.w3.org/2000/svg', name);
10389
+ setBusinessAutomationSvgAttributes(element, attributes);
10202
10390
  return element;
10203
10391
  }
10204
10392
 
@@ -10330,6 +10518,144 @@
10330
10518
  };
10331
10519
  }
10332
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
+
10333
10659
  function renderBusinessAutomationEdges(module = _module) {
10334
10660
  if (!module?.container) {
10335
10661
  return;
@@ -10338,7 +10664,7 @@
10338
10664
  const edges = collectBusinessAutomationEdges(module);
10339
10665
  const relationContext = syncBusinessAutomationSelectionContext(module, {
10340
10666
  edges,
10341
- force: true,
10667
+ force: false,
10342
10668
  scheduleRender: false
10343
10669
  });
10344
10670
  if (_businessAutomationSelectedEdgeId
@@ -10352,33 +10678,38 @@
10352
10678
  return;
10353
10679
  }
10354
10680
  syncBusinessAutomationEdgeLayerOrder(module);
10681
+ clearBusinessAutomationEdgeCameraTransform(module);
10355
10682
 
10356
10683
  const containerRect = module.container.getBoundingClientRect();
10357
10684
  const width = Math.max(1, Math.round(containerRect.width || 1));
10358
10685
  const height = Math.max(1, Math.round(containerRect.height || 1));
10686
+ recordBusinessAutomationEdgeCameraState(module, width, height);
10359
10687
  for (const layer of [visualLayer, hitLayer]) {
10360
- layer.setAttribute('viewBox', `0 0 ${width} ${height}`);
10361
- layer.setAttribute('width', String(width));
10362
- layer.setAttribute('height', String(height));
10363
- layer.replaceChildren();
10688
+ setBusinessAutomationSvgAttributes(layer, {
10689
+ viewBox: `0 0 ${width} ${height}`,
10690
+ width: String(width),
10691
+ height: String(height)
10692
+ });
10364
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
+ );
10365
10700
 
10366
10701
  if (edges.length === 0 && !_businessAutomationConnectionDraft) {
10702
+ setBusinessAutomationSvgElementsVisible([renderState.visualGroup, renderState.hitGroup], false);
10367
10703
  return;
10368
10704
  }
10369
-
10370
- const visualGroup = createBusinessAutomationSvgElement('g', {
10371
- fill: 'none',
10372
- 'stroke-linecap': 'round',
10373
- 'stroke-linejoin': 'round'
10374
- });
10375
- const hitGroup = createBusinessAutomationSvgElement('g', {
10376
- fill: 'none',
10377
- 'stroke-linecap': 'round',
10378
- 'stroke-linejoin': 'round'
10379
- });
10705
+ setBusinessAutomationSvgElementsVisible([renderState.visualGroup, renderState.hitGroup], true);
10706
+ const liveEdgeIds = new Set();
10380
10707
 
10381
10708
  for (const edge of edges) {
10709
+ const edgeId = String(edge?.id || '').trim();
10710
+ if (!edgeId) {
10711
+ continue;
10712
+ }
10382
10713
  const sourcePin = findBusinessAutomationPinElement(module, edge.sourceNodeId, edge.sourcePinId, 'output');
10383
10714
  const targetPin = findBusinessAutomationPinElement(module, edge.targetNodeId, edge.targetPinId, 'input');
10384
10715
  const source = getBusinessAutomationEndpointRelativeToContainer(
@@ -10398,10 +10729,18 @@
10398
10729
  containerRect
10399
10730
  );
10400
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
+ }
10401
10736
  continue;
10402
10737
  }
10403
10738
 
10404
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
+ }
10405
10744
  continue;
10406
10745
  }
10407
10746
 
@@ -10420,63 +10759,24 @@
10420
10759
  const isSelected = String(edge.id || '') === _businessAutomationSelectedEdgeId;
10421
10760
  const isRelationHighlighted = relationContext?.edgeIds?.has?.(String(edge.id || '').trim()) === true;
10422
10761
  const hitPointerEvents = _businessAutomationConnectionDraft ? 'none' : 'stroke';
10423
- const hitPath = createBusinessAutomationSvgElement('path', {
10424
- d: pathData,
10425
- class: 'mind-map-business-automation-edge-hit',
10426
- stroke: '#000000',
10427
- 'stroke-width': '18',
10428
- opacity: '0',
10429
- 'pointer-events': hitPointerEvents,
10430
- 'data-edge-id': edge.id,
10431
- 'data-edge-contract': edge.contract || ''
10432
- });
10433
- hitPath.style.pointerEvents = hitPointerEvents;
10434
- hitPath.style.cursor = 'pointer';
10435
- hitPath.addEventListener('pointerdown', handleBusinessAutomationEdgePointerDown);
10436
- hitPath.addEventListener('wheel', handleBusinessAutomationEdgeWheel, { passive: false });
10437
- hitPath.addEventListener('click', handleBusinessAutomationEdgeClick);
10438
-
10439
- const path = createBusinessAutomationSvgElement('path', {
10440
- d: pathData,
10441
- class: `mind-map-business-automation-edge-path${isSelected ? ' is-selected' : ''}${isRelationHighlighted ? ' is-relation-highlight' : ''}`,
10442
- stroke: theme.edge,
10443
- 'stroke-width': isSelected ? '3.6' : (isRelationHighlighted ? (isContextEdge ? '2.45' : '2.65') : (isContextEdge ? '2.1' : '2.4')),
10444
- opacity: isSelected ? '0.96' : (isRelationHighlighted ? (isContextEdge ? '0.72' : '0.78') : (isContextEdge ? '0.68' : '0.82')),
10445
- 'stroke-dasharray': isContextEdge ? '7 7' : '',
10446
- filter: ''
10447
- });
10448
- path.style.pointerEvents = 'none';
10449
- path.dataset.edgeId = edge.id;
10450
- path.dataset.edgeContract = edge.contract || '';
10451
-
10452
- const sourceDot = createBusinessAutomationSvgElement('circle', {
10453
- cx: source.x.toFixed(1),
10454
- cy: source.y.toFixed(1),
10455
- r: isSelected ? '4.2' : (isRelationHighlighted ? '3.7' : '3.2'),
10456
- fill: '#ffffff',
10457
- stroke: theme.edge,
10458
- 'stroke-width': '1.8',
10459
- opacity: isSelected ? '0.96' : (isRelationHighlighted ? '0.84' : (isContextEdge ? '0.82' : '0.96'))
10460
- });
10461
- sourceDot.style.pointerEvents = 'none';
10462
- const targetDot = createBusinessAutomationSvgElement('circle', {
10463
- cx: target.x.toFixed(1),
10464
- cy: target.y.toFixed(1),
10465
- r: isSelected ? '4.2' : (isRelationHighlighted ? '3.7' : '3.2'),
10466
- fill: theme.edge,
10467
- stroke: '#ffffff',
10468
- 'stroke-width': '1.4',
10469
- opacity: isSelected ? '0.96' : (isRelationHighlighted ? '0.84' : (isContextEdge ? '0.82' : '0.96'))
10470
- });
10471
- targetDot.style.pointerEvents = 'none';
10472
-
10473
- hitGroup.appendChild(hitPath);
10474
- visualGroup.appendChild(path);
10475
- visualGroup.appendChild(sourceDot);
10476
- 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);
10477
10765
  }
10478
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
+
10479
10778
  const draft = _businessAutomationConnectionDraft;
10779
+ let draftVisible = false;
10480
10780
  if (draft) {
10481
10781
  const sourcePin = findBusinessAutomationPinElement(module, draft.sourceNodeId, draft.sourcePinId, 'output');
10482
10782
  const source = getBusinessAutomationEndpointRelativeToContainer(
@@ -10493,7 +10793,7 @@
10493
10793
  const theme = isContextDraft
10494
10794
  ? AUTOMATION_CONTEXT_PIN_THEME
10495
10795
  : getAutomationPinTheme(draft.sourceType || 'Text');
10496
- const draftPath = createBusinessAutomationSvgElement('path', {
10796
+ setBusinessAutomationSvgAttributes(renderState.draftPath, {
10497
10797
  d: buildBusinessAutomationEdgePathData(source, target),
10498
10798
  class: 'mind-map-business-automation-edge-draft',
10499
10799
  stroke: theme.edge,
@@ -10501,8 +10801,7 @@
10501
10801
  'stroke-dasharray': isContextDraft ? '7 7' : '8 7',
10502
10802
  opacity: isContextDraft ? '0.66' : '0.72'
10503
10803
  });
10504
- draftPath.style.pointerEvents = 'none';
10505
- const draftTarget = createBusinessAutomationSvgElement('circle', {
10804
+ setBusinessAutomationSvgAttributes(renderState.draftTarget, {
10506
10805
  cx: target.x.toFixed(1),
10507
10806
  cy: target.y.toFixed(1),
10508
10807
  r: '4',
@@ -10511,15 +10810,18 @@
10511
10810
  'stroke-width': '2',
10512
10811
  opacity: '0.9'
10513
10812
  });
10514
- draftTarget.style.pointerEvents = 'none';
10515
- visualGroup.appendChild(draftPath);
10516
- 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;
10517
10820
  }
10518
10821
  }
10822
+ setBusinessAutomationSvgElementsVisible([renderState.draftPath, renderState.draftTarget], draftVisible);
10519
10823
 
10520
- applyBusinessAutomationResidentOcclusionMask(visualLayer, visualGroup, module, containerRect, width, height);
10521
- visualLayer.appendChild(visualGroup);
10522
- hitLayer.appendChild(hitGroup);
10824
+ applyBusinessAutomationResidentOcclusionMask(visualLayer, renderState.visualGroup, module, containerRect, width, height);
10523
10825
  }
10524
10826
 
10525
10827
  function hasBusinessAutomationConnectionDraft() {
@@ -19014,7 +19316,7 @@
19014
19316
  });
19015
19317
  };
19016
19318
  getDeviceCards().forEach(card => {
19017
- ['pointerdown', 'mousedown', 'mouseup', 'dblclick'].forEach(eventName => {
19319
+ ['pointerdown', 'mousedown', 'mouseup'].forEach(eventName => {
19018
19320
  card.addEventListener(eventName, event => {
19019
19321
  if (event.button === 1 || event.button === 2) {
19020
19322
  if (eventName === 'mousedown') {
@@ -23576,6 +23878,7 @@
23576
23878
  openRemoteFleetControlPopupForTest: openRemoteFleetControlPopup,
23577
23879
  closeRemoteFleetControlPopupForTest: closeRemoteFleetControlPopup,
23578
23880
  hasBusinessAutomationConnectionDraft: hasBusinessAutomationConnectionDraft,
23881
+ syncBusinessAutomationEdgesForCameraMotion: syncBusinessAutomationEdgesForCameraMotion,
23579
23882
  renderBusinessAutomationEdges: renderBusinessAutomationEdges,
23580
23883
  scheduleBusinessAutomationEdgeRender: scheduleBusinessAutomationEdgeRender,
23581
23884
  syncBusinessAutomationSelectionContext: syncBusinessAutomationSelectionContext,