@mindexec/cli 0.2.477 → 0.2.478
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.
- package/README.md +323 -323
- package/codex-model-catalog.js +202 -202
- package/codex-runtime.js +1608 -1608
- package/desktop-workspace-state.cjs +120 -120
- package/electron/main.cjs +517 -517
- package/electron/preload.cjs +17 -17
- package/electron/recurring-update-owner-smoke.mjs +55 -55
- package/electron/recurring-update-owner.cjs +97 -97
- package/electron/source-smoke.mjs +108 -108
- package/electron/update-feed-resolver.cjs +79 -79
- package/electron/update-feed.json +10 -10
- package/electron/update-manager-smoke.mjs +146 -146
- package/electron/update-manager.cjs +297 -297
- package/electron/windows-package-smoke.mjs +156 -156
- package/launch-bridge.cjs +236 -236
- package/lzo1x.js +110 -110
- package/mode4-atlas-worker.js +440 -440
- package/mode4-atlas.js +130 -130
- package/package.json +1 -1
- package/port-guard.cjs +285 -285
- package/remote-fast/osx-arm64/MacScreenCaptureKitH264.swift +339 -339
- package/remote-fast/osx-arm64/MacSystemAudioCapture.swift +214 -214
- package/remote-fast/osx-arm64/UnixRawCaptureHelper.mjs +80 -80
- package/remote-fast/osx-arm64/livedesk-raw-capture-resampler.mjs +73 -73
- package/remote-fast/osx-arm64/mindexec-remote-fast.dll +0 -0
- package/remote-fast/osx-x64/MacScreenCaptureKitH264.swift +339 -339
- package/remote-fast/osx-x64/MacSystemAudioCapture.swift +214 -214
- package/remote-fast/osx-x64/UnixRawCaptureHelper.mjs +80 -80
- package/remote-fast/osx-x64/livedesk-raw-capture-resampler.mjs +73 -73
- package/remote-fast/osx-x64/mindexec-remote-fast.dll +0 -0
- package/remote-fast/win-x64/mindexec-remote-fast.dll +0 -0
- package/remote-hub.js +3698 -3698
- package/scripts/auth-session-smoke.mjs +262 -262
- package/scripts/board-render-ownership-smoke.mjs +85 -85
- package/scripts/codex-model-catalog-smoke.mjs +150 -150
- package/scripts/codex-runtime-home-smoke.mjs +58 -58
- package/scripts/codex-sdk-image-live-smoke.mjs +43 -43
- package/scripts/codex-sdk-image-runtime-smoke.mjs +122 -122
- package/scripts/codex-sdk-runtime-smoke.mjs +89 -89
- package/scripts/desktop-update-publisher-smoke.mjs +89 -89
- package/scripts/desktop-update-worker-smoke.mjs +72 -72
- package/scripts/desktop-workspace-state-smoke.mjs +81 -81
- package/scripts/drive-installed-update-smoke.mjs +67 -67
- package/scripts/npm-fresh-install-smoke.mjs +216 -216
- package/scripts/publish-mindexec-desktop-updates.mjs +224 -224
- package/scripts/remote-agent-managed-smoke.mjs +318 -318
- package/scripts/remote-agent-package-smoke.mjs +64 -64
- package/scripts/remote-agent-ws-smoke.mjs +269 -269
- package/scripts/remote-fast-live-rate-smoke.mjs +343 -343
- package/scripts/remote-fast-mdm-browser-smoke.mjs +453 -453
- package/scripts/remote-fleet-render-smoke.mjs +1350 -1350
- package/scripts/remote-frame-ws-smoke.mjs +234 -234
- package/scripts/remote-http-smoke.mjs +592 -592
- package/scripts/remote-hub-identity-smoke.mjs +146 -146
- package/scripts/remote-hub-scale-smoke.mjs +124 -124
- package/scripts/remote-hub-smoke.mjs +699 -699
- package/scripts/remote-input-ws-smoke.mjs +263 -263
- package/scripts/remote-registry-follower-smoke.mjs +815 -815
- package/scripts/setup-tree-sitter-grammars.mjs +59 -59
- package/server.js +7690 -7690
- package/start-bridge.bat +32 -32
- package/start-bridge.sh +81 -81
- package/wwwroot/_content/MindExecution.Plugins.Admin/css/admin-dashboard.css +546 -546
- package/wwwroot/_content/MindExecution.Plugins.YouTube/css/youtube-search.css +251 -251
- package/wwwroot/_content/MindExecution.Shared/css/app.css +1 -1
- package/wwwroot/_content/MindExecution.Shared/css/mind-map-overrides.css +3789 -3789
- package/wwwroot/_content/MindExecution.Shared/js/agent-visualization.js +27 -27
- package/wwwroot/_content/MindExecution.Shared/js/background-themes.js +1449 -1449
- package/wwwroot/_content/MindExecution.Shared/js/code-master.js +8316 -8316
- package/wwwroot/_content/MindExecution.Shared/js/file-system-helper.js +338 -338
- package/wwwroot/_content/MindExecution.Shared/js/marked.min.js +69 -69
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-animated-image-preview.js +270 -270
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-automation-edge-motion.js +170 -170
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-board-render-ownership.js +81 -81
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-core.js +10506 -10506
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-css3d-hotpath.js +902 -902
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-css3d-manager.js +24637 -24637
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-dev-guards.js +325 -325
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-dnd.js +1491 -1491
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-glow-shader.js +70 -70
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-image-policy.js +218 -218
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-interactions.js +7065 -7065
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-lod-plan-worker.js +160 -160
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-lod-renderer.js +9956 -9956
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-lod-video-placeholder.js +107 -107
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-logic-workers.js +1004 -1004
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-menu-manager.js +1351 -1351
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-multi-select.js +865 -865
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-node-search-worker.js +554 -554
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-nodes.js +4744 -4744
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-normal-boundary-optimizer.js +624 -624
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-object-manager.js +241 -241
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-pipeline.js +2290 -2290
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-remote-codecs.js +202 -202
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-render-plan.js +1971 -1971
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-text-lod-system.js +93 -93
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-texture-factory.js +2391 -2391
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-video-playback-controls.js +95 -95
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-visibility-worker.js +895 -895
- package/wwwroot/_content/MindExecution.Shared/js/mindmap-toolbar.js +636 -636
- package/wwwroot/_content/MindExecution.Shared/js/native-drop-handler.js +45 -45
- package/wwwroot/_content/MindExecution.Shared/js/plan-master.js +117 -117
- package/wwwroot/_content/MindExecution.Shared/js/renderers/CSS3DRenderer.js +114 -114
- package/wwwroot/_content/MindExecution.Shared/js/texture-worker-manager.js +10 -10
- package/wwwroot/_content/MindExecution.Shared/js/three.min.js +6 -6
- package/wwwroot/_content/MindExecution.Shared/js/token-manager.js +7 -7
- package/wwwroot/_content/MindExecution.Shared/js/troika-bundle.js +6 -6
- package/wwwroot/_content/MindExecution.Shared/js/troika-bundle.js.map +2 -2
- package/wwwroot/_content/MindExecution.Shared/lib/font-awesome/css/all.min.css +8 -8
- package/wwwroot/_content/MindExecution.Shared/models/vocab.txt +30522 -30522
- package/wwwroot/_framework/{Google.Protobuf.9h59ukbel7.dll → Google.Protobuf.33g2gb5is0.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Core.ty1xewqp36.dll → MindExecution.Core.z100xo4mg0.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Kernel.h7rqjoo69o.dll → MindExecution.Kernel.i9cldrx8yc.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.Admin.wrfrcvhjde.dll → MindExecution.Plugins.Admin.48lzqddb0a.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.Business.csbcyjurdh.dll → MindExecution.Plugins.Business.7m8u1q142p.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.Concept.buomiysqjn.dll → MindExecution.Plugins.Concept.cl5wmr53od.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.Directory.7k00i2v769.dll → MindExecution.Plugins.Directory.slipi39041.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.PlanMaster.85i5ocraro.dll → MindExecution.Plugins.PlanMaster.qfge05l671.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.YouTube.nbolrfakte.dll → MindExecution.Plugins.YouTube.tn7v29ut77.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Shared.nqh4porv7x.dll → MindExecution.Shared.rjqlf0umjn.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Web.211q3bf4mr.dll → MindExecution.Web.rwawrxxk38.dll} +0 -0
- package/wwwroot/_framework/blazor.boot.json +23 -23
- package/wwwroot/_headers +40 -40
- package/wwwroot/_redirects +1 -1
- package/wwwroot/index.html +772 -772
- package/wwwroot/js/marketing-tool.js +180 -180
- package/wwwroot/manifest.webmanifest +23 -23
- package/wwwroot/service-worker-assets.js +78 -106
- package/wwwroot/service-worker.js +33 -33
- package/tree-sitter-grammars/README.md +0 -18
- package/tree-sitter-grammars/tree-sitter-c_sharp.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-go.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-java.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-javascript.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-python.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-rust.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-tsx.wasm +0 -0
- package/tree-sitter-grammars/tree-sitter-typescript.wasm +0 -0
- package/wwwroot/_content/MindExecution.Plugins.Directory/background.png +0 -0
- package/wwwroot/_content/MindExecution.Shared/fonts/NotoSansKR-Bold.ttf +0 -0
- package/wwwroot/_content/MindExecution.Shared/fonts/NotoSansKR-Regular.ttf +0 -0
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-core.js.backup +0 -1059
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-dnd.js.bak +0 -434
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-object-manager.js.backup +0 -372
- package/wwwroot/_content/MindExecution.Shared/js/mind-map-texture-factory.js.backup +0 -1258
|
@@ -1,170 +1,170 @@
|
|
|
1
|
-
(function (global) {
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
function setSvgAttributes(element, attributes) {
|
|
5
|
-
if (!element) {
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
Object.entries(attributes).forEach(([name, value]) => {
|
|
10
|
-
const text = String(value);
|
|
11
|
-
if (element.getAttribute(name) !== text) {
|
|
12
|
-
element.setAttribute(name, text);
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function buildEdgePathData(source, target) {
|
|
18
|
-
const deltaX = target.x - source.x;
|
|
19
|
-
const absDeltaX = Math.abs(deltaX);
|
|
20
|
-
const direction = deltaX < 0 ? -1 : 1;
|
|
21
|
-
const handleDistance = Math.min(180, Math.max(12, absDeltaX * 0.38), Math.max(0, absDeltaX * 0.45));
|
|
22
|
-
const signedHandleDistance = direction * handleDistance;
|
|
23
|
-
return `M ${source.x.toFixed(1)} ${source.y.toFixed(1)} C ${(source.x + signedHandleDistance).toFixed(1)} ${source.y.toFixed(1)}, ${(target.x - signedHandleDistance).toFixed(1)} ${target.y.toFixed(1)}, ${target.x.toFixed(1)} ${target.y.toFixed(1)}`;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function getCachedViewportMetrics(module) {
|
|
27
|
-
const width = Math.max(0, Number(module?._lastViewportWidth || module?._lastContainerWidth || 0));
|
|
28
|
-
const height = Math.max(0, Number(module?._lastViewportHeight || module?._lastContainerHeight || 0));
|
|
29
|
-
if (width > 0 && height > 0) {
|
|
30
|
-
return { width, height };
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return {
|
|
34
|
-
width: Math.max(1, Number(module?.container?.clientWidth || 0)),
|
|
35
|
-
height: Math.max(1, Number(module?.container?.clientHeight || 0))
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function recordCameraState(module, width, height) {
|
|
40
|
-
if (!module?.camera) {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
module._lastBusinessAutomationEdgeCameraState = {
|
|
45
|
-
x: Number(module.camera.position?.x || 0),
|
|
46
|
-
y: Number(module.camera.position?.y || 0),
|
|
47
|
-
z: Math.max(1, Number(module.camera.position?.z || 1)),
|
|
48
|
-
width: Math.max(1, Number(width || 1)),
|
|
49
|
-
height: Math.max(1, Number(height || 1)),
|
|
50
|
-
fov: Number(module.camera.fov || 45)
|
|
51
|
-
};
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function clearCameraMotion(module) {
|
|
56
|
-
const layers = [
|
|
57
|
-
module?._businessAutomationEdgeVisualLayer || null,
|
|
58
|
-
module?._businessAutomationEdgeLayer || null
|
|
59
|
-
].filter(Boolean);
|
|
60
|
-
if (layers.length === 0 || module?._businessAutomationEdgeCameraTransformActive !== true) {
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
layers.forEach(layer => {
|
|
65
|
-
if (!layer?.style) return;
|
|
66
|
-
layer.style.transform = '';
|
|
67
|
-
layer.style.transformOrigin = '';
|
|
68
|
-
layer.style.willChange = '';
|
|
69
|
-
});
|
|
70
|
-
module?._businessAutomationEdgeRenderState?.occlusionMaskState?.blackGroup?.removeAttribute?.('transform');
|
|
71
|
-
module._businessAutomationEdgeCameraTransformActive = false;
|
|
72
|
-
module._lastBusinessAutomationEdgeTransformKey = '';
|
|
73
|
-
module._businessAutomationEdgeMotionSyncMode = 'settled';
|
|
74
|
-
module._businessAutomationEdgeMotionSyncCount = 0;
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function transformPoint(point, scale, offsetX, offsetY) {
|
|
79
|
-
const x = Number(point?.x);
|
|
80
|
-
const y = Number(point?.y);
|
|
81
|
-
if (!Number.isFinite(x) || !Number.isFinite(y)) {
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return { x: x * scale + offsetX, y: y * scale + offsetY };
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function updateEdgeItem(item, scale, offsetX, offsetY) {
|
|
89
|
-
if (!item || item.motionVisible !== true) {
|
|
90
|
-
return false;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const source = transformPoint(item.motionSource, scale, offsetX, offsetY);
|
|
94
|
-
const target = transformPoint(item.motionTarget, scale, offsetX, offsetY);
|
|
95
|
-
if (!source || !target) {
|
|
96
|
-
return false;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
const pathData = buildEdgePathData(source, target);
|
|
100
|
-
setSvgAttributes(item.hitPath, { d: pathData });
|
|
101
|
-
setSvgAttributes(item.path, { d: pathData });
|
|
102
|
-
setSvgAttributes(item.sourceDot, { cx: source.x.toFixed(1), cy: source.y.toFixed(1) });
|
|
103
|
-
setSvgAttributes(item.targetDot, { cx: target.x.toFixed(1), cy: target.y.toFixed(1) });
|
|
104
|
-
return true;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function syncForCameraMotion(module) {
|
|
108
|
-
const visualLayer = module?._businessAutomationEdgeVisualLayer || null;
|
|
109
|
-
const hitLayer = module?._businessAutomationEdgeLayer || null;
|
|
110
|
-
const camera = module?.camera || null;
|
|
111
|
-
const last = module?._lastBusinessAutomationEdgeCameraState || null;
|
|
112
|
-
if (!camera || !last || (!visualLayer?.isConnected && !hitLayer?.isConnected)) {
|
|
113
|
-
return false;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
const viewport = getCachedViewportMetrics(module);
|
|
117
|
-
const width = Math.max(1, Number(viewport.width || last.width || 1));
|
|
118
|
-
const height = Math.max(1, Number(viewport.height || last.height || 1));
|
|
119
|
-
const currentZ = Math.max(1, Number(camera.position?.z || 1));
|
|
120
|
-
const lastZ = Math.max(1, Number(last.z || currentZ));
|
|
121
|
-
const vfov = (Number(camera.fov || last.fov || 45) * Math.PI) / 180;
|
|
122
|
-
const pxPerWorld = height / Math.max(1, 2 * Math.tan(vfov / 2) * currentZ);
|
|
123
|
-
const scale = Math.max(0.05, Math.min(20, lastZ / currentZ));
|
|
124
|
-
const translateX = (Number(last.x || 0) - Number(camera.position?.x || 0)) * pxPerWorld;
|
|
125
|
-
const translateY = (Number(camera.position?.y || 0) - Number(last.y || 0)) * pxPerWorld;
|
|
126
|
-
const offsetX = (1 - scale) * width * 0.5 + translateX;
|
|
127
|
-
const offsetY = (1 - scale) * height * 0.5 + translateY;
|
|
128
|
-
const transformKey = [
|
|
129
|
-
Math.round(width),
|
|
130
|
-
Math.round(height),
|
|
131
|
-
Math.round(translateX * 100),
|
|
132
|
-
Math.round(translateY * 100),
|
|
133
|
-
Math.round(scale * 10000)
|
|
134
|
-
].join('|');
|
|
135
|
-
|
|
136
|
-
if (transformKey !== module._lastBusinessAutomationEdgeTransformKey) {
|
|
137
|
-
let updatedEdgeCount = 0;
|
|
138
|
-
const renderState = module?._businessAutomationEdgeRenderState || null;
|
|
139
|
-
renderState?.edgeItems?.forEach?.(item => {
|
|
140
|
-
if (updateEdgeItem(item, scale, offsetX, offsetY)) {
|
|
141
|
-
updatedEdgeCount += 1;
|
|
142
|
-
}
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
[visualLayer, hitLayer].forEach(layer => {
|
|
146
|
-
if (!layer?.style) return;
|
|
147
|
-
layer.style.transform = '';
|
|
148
|
-
layer.style.transformOrigin = '';
|
|
149
|
-
layer.style.willChange = '';
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
renderState?.occlusionMaskState?.blackGroup?.setAttribute?.(
|
|
153
|
-
'transform',
|
|
154
|
-
`matrix(${scale.toFixed(7)} 0 0 ${scale.toFixed(7)} ${offsetX.toFixed(3)} ${offsetY.toFixed(3)})`
|
|
155
|
-
);
|
|
156
|
-
module._businessAutomationEdgeMotionSyncMode = 'keyed-geometry';
|
|
157
|
-
module._businessAutomationEdgeMotionSyncCount = updatedEdgeCount;
|
|
158
|
-
module._lastBusinessAutomationEdgeTransformKey = transformKey;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
module._businessAutomationEdgeCameraTransformActive = true;
|
|
162
|
-
return true;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
global.MindMapAutomationEdgeMotion = Object.freeze({
|
|
166
|
-
recordCameraState,
|
|
167
|
-
clearCameraMotion,
|
|
168
|
-
syncForCameraMotion
|
|
169
|
-
});
|
|
170
|
-
})(typeof window !== 'undefined' ? window : globalThis);
|
|
1
|
+
(function (global) {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
function setSvgAttributes(element, attributes) {
|
|
5
|
+
if (!element) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
Object.entries(attributes).forEach(([name, value]) => {
|
|
10
|
+
const text = String(value);
|
|
11
|
+
if (element.getAttribute(name) !== text) {
|
|
12
|
+
element.setAttribute(name, text);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function buildEdgePathData(source, target) {
|
|
18
|
+
const deltaX = target.x - source.x;
|
|
19
|
+
const absDeltaX = Math.abs(deltaX);
|
|
20
|
+
const direction = deltaX < 0 ? -1 : 1;
|
|
21
|
+
const handleDistance = Math.min(180, Math.max(12, absDeltaX * 0.38), Math.max(0, absDeltaX * 0.45));
|
|
22
|
+
const signedHandleDistance = direction * handleDistance;
|
|
23
|
+
return `M ${source.x.toFixed(1)} ${source.y.toFixed(1)} C ${(source.x + signedHandleDistance).toFixed(1)} ${source.y.toFixed(1)}, ${(target.x - signedHandleDistance).toFixed(1)} ${target.y.toFixed(1)}, ${target.x.toFixed(1)} ${target.y.toFixed(1)}`;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function getCachedViewportMetrics(module) {
|
|
27
|
+
const width = Math.max(0, Number(module?._lastViewportWidth || module?._lastContainerWidth || 0));
|
|
28
|
+
const height = Math.max(0, Number(module?._lastViewportHeight || module?._lastContainerHeight || 0));
|
|
29
|
+
if (width > 0 && height > 0) {
|
|
30
|
+
return { width, height };
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return {
|
|
34
|
+
width: Math.max(1, Number(module?.container?.clientWidth || 0)),
|
|
35
|
+
height: Math.max(1, Number(module?.container?.clientHeight || 0))
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function recordCameraState(module, width, height) {
|
|
40
|
+
if (!module?.camera) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
module._lastBusinessAutomationEdgeCameraState = {
|
|
45
|
+
x: Number(module.camera.position?.x || 0),
|
|
46
|
+
y: Number(module.camera.position?.y || 0),
|
|
47
|
+
z: Math.max(1, Number(module.camera.position?.z || 1)),
|
|
48
|
+
width: Math.max(1, Number(width || 1)),
|
|
49
|
+
height: Math.max(1, Number(height || 1)),
|
|
50
|
+
fov: Number(module.camera.fov || 45)
|
|
51
|
+
};
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function clearCameraMotion(module) {
|
|
56
|
+
const layers = [
|
|
57
|
+
module?._businessAutomationEdgeVisualLayer || null,
|
|
58
|
+
module?._businessAutomationEdgeLayer || null
|
|
59
|
+
].filter(Boolean);
|
|
60
|
+
if (layers.length === 0 || module?._businessAutomationEdgeCameraTransformActive !== true) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
layers.forEach(layer => {
|
|
65
|
+
if (!layer?.style) return;
|
|
66
|
+
layer.style.transform = '';
|
|
67
|
+
layer.style.transformOrigin = '';
|
|
68
|
+
layer.style.willChange = '';
|
|
69
|
+
});
|
|
70
|
+
module?._businessAutomationEdgeRenderState?.occlusionMaskState?.blackGroup?.removeAttribute?.('transform');
|
|
71
|
+
module._businessAutomationEdgeCameraTransformActive = false;
|
|
72
|
+
module._lastBusinessAutomationEdgeTransformKey = '';
|
|
73
|
+
module._businessAutomationEdgeMotionSyncMode = 'settled';
|
|
74
|
+
module._businessAutomationEdgeMotionSyncCount = 0;
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function transformPoint(point, scale, offsetX, offsetY) {
|
|
79
|
+
const x = Number(point?.x);
|
|
80
|
+
const y = Number(point?.y);
|
|
81
|
+
if (!Number.isFinite(x) || !Number.isFinite(y)) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return { x: x * scale + offsetX, y: y * scale + offsetY };
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function updateEdgeItem(item, scale, offsetX, offsetY) {
|
|
89
|
+
if (!item || item.motionVisible !== true) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const source = transformPoint(item.motionSource, scale, offsetX, offsetY);
|
|
94
|
+
const target = transformPoint(item.motionTarget, scale, offsetX, offsetY);
|
|
95
|
+
if (!source || !target) {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const pathData = buildEdgePathData(source, target);
|
|
100
|
+
setSvgAttributes(item.hitPath, { d: pathData });
|
|
101
|
+
setSvgAttributes(item.path, { d: pathData });
|
|
102
|
+
setSvgAttributes(item.sourceDot, { cx: source.x.toFixed(1), cy: source.y.toFixed(1) });
|
|
103
|
+
setSvgAttributes(item.targetDot, { cx: target.x.toFixed(1), cy: target.y.toFixed(1) });
|
|
104
|
+
return true;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function syncForCameraMotion(module) {
|
|
108
|
+
const visualLayer = module?._businessAutomationEdgeVisualLayer || null;
|
|
109
|
+
const hitLayer = module?._businessAutomationEdgeLayer || null;
|
|
110
|
+
const camera = module?.camera || null;
|
|
111
|
+
const last = module?._lastBusinessAutomationEdgeCameraState || null;
|
|
112
|
+
if (!camera || !last || (!visualLayer?.isConnected && !hitLayer?.isConnected)) {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const viewport = getCachedViewportMetrics(module);
|
|
117
|
+
const width = Math.max(1, Number(viewport.width || last.width || 1));
|
|
118
|
+
const height = Math.max(1, Number(viewport.height || last.height || 1));
|
|
119
|
+
const currentZ = Math.max(1, Number(camera.position?.z || 1));
|
|
120
|
+
const lastZ = Math.max(1, Number(last.z || currentZ));
|
|
121
|
+
const vfov = (Number(camera.fov || last.fov || 45) * Math.PI) / 180;
|
|
122
|
+
const pxPerWorld = height / Math.max(1, 2 * Math.tan(vfov / 2) * currentZ);
|
|
123
|
+
const scale = Math.max(0.05, Math.min(20, lastZ / currentZ));
|
|
124
|
+
const translateX = (Number(last.x || 0) - Number(camera.position?.x || 0)) * pxPerWorld;
|
|
125
|
+
const translateY = (Number(camera.position?.y || 0) - Number(last.y || 0)) * pxPerWorld;
|
|
126
|
+
const offsetX = (1 - scale) * width * 0.5 + translateX;
|
|
127
|
+
const offsetY = (1 - scale) * height * 0.5 + translateY;
|
|
128
|
+
const transformKey = [
|
|
129
|
+
Math.round(width),
|
|
130
|
+
Math.round(height),
|
|
131
|
+
Math.round(translateX * 100),
|
|
132
|
+
Math.round(translateY * 100),
|
|
133
|
+
Math.round(scale * 10000)
|
|
134
|
+
].join('|');
|
|
135
|
+
|
|
136
|
+
if (transformKey !== module._lastBusinessAutomationEdgeTransformKey) {
|
|
137
|
+
let updatedEdgeCount = 0;
|
|
138
|
+
const renderState = module?._businessAutomationEdgeRenderState || null;
|
|
139
|
+
renderState?.edgeItems?.forEach?.(item => {
|
|
140
|
+
if (updateEdgeItem(item, scale, offsetX, offsetY)) {
|
|
141
|
+
updatedEdgeCount += 1;
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
[visualLayer, hitLayer].forEach(layer => {
|
|
146
|
+
if (!layer?.style) return;
|
|
147
|
+
layer.style.transform = '';
|
|
148
|
+
layer.style.transformOrigin = '';
|
|
149
|
+
layer.style.willChange = '';
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
renderState?.occlusionMaskState?.blackGroup?.setAttribute?.(
|
|
153
|
+
'transform',
|
|
154
|
+
`matrix(${scale.toFixed(7)} 0 0 ${scale.toFixed(7)} ${offsetX.toFixed(3)} ${offsetY.toFixed(3)})`
|
|
155
|
+
);
|
|
156
|
+
module._businessAutomationEdgeMotionSyncMode = 'keyed-geometry';
|
|
157
|
+
module._businessAutomationEdgeMotionSyncCount = updatedEdgeCount;
|
|
158
|
+
module._lastBusinessAutomationEdgeTransformKey = transformKey;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
module._businessAutomationEdgeCameraTransformActive = true;
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
global.MindMapAutomationEdgeMotion = Object.freeze({
|
|
166
|
+
recordCameraState,
|
|
167
|
+
clearCameraMotion,
|
|
168
|
+
syncForCameraMotion
|
|
169
|
+
});
|
|
170
|
+
})(typeof window !== 'undefined' ? window : globalThis);
|
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
(function () {
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
const BUILD_ID = '20260819-board-render-owner-v1';
|
|
5
|
-
|
|
6
|
-
function normalizeBoardId(value) {
|
|
7
|
-
return String(value || '').trim().toLowerCase();
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function clearResidentGeometry(mesh, useDrawRange = false) {
|
|
11
|
-
if (!mesh) return;
|
|
12
|
-
|
|
13
|
-
mesh.visible = false;
|
|
14
|
-
const geometry = mesh.geometry;
|
|
15
|
-
if (!geometry) return;
|
|
16
|
-
|
|
17
|
-
if ('instanceCount' in geometry) {
|
|
18
|
-
geometry.instanceCount = 0;
|
|
19
|
-
}
|
|
20
|
-
if (useDrawRange && typeof geometry.setDrawRange === 'function') {
|
|
21
|
-
geometry.setDrawRange(0, 0);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function retireResidentBoard(renderer, module, details = {}) {
|
|
26
|
-
if (!renderer) return false;
|
|
27
|
-
|
|
28
|
-
renderer.resetState?.();
|
|
29
|
-
renderer.pendingNodes?.clear?.();
|
|
30
|
-
|
|
31
|
-
clearResidentGeometry(renderer.instancedHaloMesh);
|
|
32
|
-
clearResidentGeometry(renderer.instancedMesh);
|
|
33
|
-
clearResidentGeometry(renderer.instancedLineMesh);
|
|
34
|
-
clearResidentGeometry(renderer.instancedBorderLineMesh, true);
|
|
35
|
-
clearResidentGeometry(renderer.instancedConsoleMesh);
|
|
36
|
-
clearResidentGeometry(renderer.instancedImageMesh);
|
|
37
|
-
|
|
38
|
-
renderer._activeBoardRenderId = normalizeBoardId(details.toBoardId);
|
|
39
|
-
renderer._boardRenderEpoch = Math.max(0, Number(renderer._boardRenderEpoch || 0)) + 1;
|
|
40
|
-
renderer._residentBuilt = false;
|
|
41
|
-
renderer._residentBuildPhase = 'board-switch';
|
|
42
|
-
|
|
43
|
-
if (module) {
|
|
44
|
-
module._forceUpdateFrames = Math.max(Number(module._forceUpdateFrames || 0), 2);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
window.MindCanvasTrace?.emit?.('board.resident.retired', {
|
|
48
|
-
fromBoardId: details.fromBoardId || null,
|
|
49
|
-
toBoardId: details.toBoardId || null,
|
|
50
|
-
reason: details.reason || 'board-switch',
|
|
51
|
-
epoch: renderer._boardRenderEpoch
|
|
52
|
-
});
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function prepareCachedBoard(renderer, module, details = {}) {
|
|
57
|
-
if (!renderer) return false;
|
|
58
|
-
|
|
59
|
-
const boardId = normalizeBoardId(details.boardId);
|
|
60
|
-
renderer._activeBoardRenderId = boardId;
|
|
61
|
-
if (details.lineDataCache instanceof Map) {
|
|
62
|
-
renderer.lineDataCache = details.lineDataCache;
|
|
63
|
-
}
|
|
64
|
-
renderer.requestResidentPatch?.('board-reload');
|
|
65
|
-
|
|
66
|
-
if (module) {
|
|
67
|
-
module._forceUpdateFrames = Math.max(Number(module._forceUpdateFrames || 0), 2);
|
|
68
|
-
}
|
|
69
|
-
return true;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
window.MindMapBoardRenderOwnership = Object.freeze({
|
|
73
|
-
BUILD_ID,
|
|
74
|
-
normalizeBoardId,
|
|
75
|
-
retireResidentBoard,
|
|
76
|
-
prepareCachedBoard
|
|
77
|
-
});
|
|
78
|
-
window.MindCanvasBuildInfo?.registerPart?.('boardRenderOwnership', BUILD_ID, {
|
|
79
|
-
file: 'mind-map-board-render-ownership.js'
|
|
80
|
-
});
|
|
81
|
-
})();
|
|
1
|
+
(function () {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const BUILD_ID = '20260819-board-render-owner-v1';
|
|
5
|
+
|
|
6
|
+
function normalizeBoardId(value) {
|
|
7
|
+
return String(value || '').trim().toLowerCase();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function clearResidentGeometry(mesh, useDrawRange = false) {
|
|
11
|
+
if (!mesh) return;
|
|
12
|
+
|
|
13
|
+
mesh.visible = false;
|
|
14
|
+
const geometry = mesh.geometry;
|
|
15
|
+
if (!geometry) return;
|
|
16
|
+
|
|
17
|
+
if ('instanceCount' in geometry) {
|
|
18
|
+
geometry.instanceCount = 0;
|
|
19
|
+
}
|
|
20
|
+
if (useDrawRange && typeof geometry.setDrawRange === 'function') {
|
|
21
|
+
geometry.setDrawRange(0, 0);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function retireResidentBoard(renderer, module, details = {}) {
|
|
26
|
+
if (!renderer) return false;
|
|
27
|
+
|
|
28
|
+
renderer.resetState?.();
|
|
29
|
+
renderer.pendingNodes?.clear?.();
|
|
30
|
+
|
|
31
|
+
clearResidentGeometry(renderer.instancedHaloMesh);
|
|
32
|
+
clearResidentGeometry(renderer.instancedMesh);
|
|
33
|
+
clearResidentGeometry(renderer.instancedLineMesh);
|
|
34
|
+
clearResidentGeometry(renderer.instancedBorderLineMesh, true);
|
|
35
|
+
clearResidentGeometry(renderer.instancedConsoleMesh);
|
|
36
|
+
clearResidentGeometry(renderer.instancedImageMesh);
|
|
37
|
+
|
|
38
|
+
renderer._activeBoardRenderId = normalizeBoardId(details.toBoardId);
|
|
39
|
+
renderer._boardRenderEpoch = Math.max(0, Number(renderer._boardRenderEpoch || 0)) + 1;
|
|
40
|
+
renderer._residentBuilt = false;
|
|
41
|
+
renderer._residentBuildPhase = 'board-switch';
|
|
42
|
+
|
|
43
|
+
if (module) {
|
|
44
|
+
module._forceUpdateFrames = Math.max(Number(module._forceUpdateFrames || 0), 2);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
window.MindCanvasTrace?.emit?.('board.resident.retired', {
|
|
48
|
+
fromBoardId: details.fromBoardId || null,
|
|
49
|
+
toBoardId: details.toBoardId || null,
|
|
50
|
+
reason: details.reason || 'board-switch',
|
|
51
|
+
epoch: renderer._boardRenderEpoch
|
|
52
|
+
});
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function prepareCachedBoard(renderer, module, details = {}) {
|
|
57
|
+
if (!renderer) return false;
|
|
58
|
+
|
|
59
|
+
const boardId = normalizeBoardId(details.boardId);
|
|
60
|
+
renderer._activeBoardRenderId = boardId;
|
|
61
|
+
if (details.lineDataCache instanceof Map) {
|
|
62
|
+
renderer.lineDataCache = details.lineDataCache;
|
|
63
|
+
}
|
|
64
|
+
renderer.requestResidentPatch?.('board-reload');
|
|
65
|
+
|
|
66
|
+
if (module) {
|
|
67
|
+
module._forceUpdateFrames = Math.max(Number(module._forceUpdateFrames || 0), 2);
|
|
68
|
+
}
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
window.MindMapBoardRenderOwnership = Object.freeze({
|
|
73
|
+
BUILD_ID,
|
|
74
|
+
normalizeBoardId,
|
|
75
|
+
retireResidentBoard,
|
|
76
|
+
prepareCachedBoard
|
|
77
|
+
});
|
|
78
|
+
window.MindCanvasBuildInfo?.registerPart?.('boardRenderOwnership', BUILD_ID, {
|
|
79
|
+
file: 'mind-map-board-render-ownership.js'
|
|
80
|
+
});
|
|
81
|
+
})();
|