@mindexec/cli 0.2.476 → 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 -10517
- 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.cx2pre7qz2.dll → MindExecution.Core.z100xo4mg0.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Kernel.engfih12kr.dll → MindExecution.Kernel.i9cldrx8yc.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.Admin.xfunemn9zi.dll → MindExecution.Plugins.Admin.48lzqddb0a.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.Business.ja94a5ze3i.dll → MindExecution.Plugins.Business.7m8u1q142p.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.Concept.3q05vzviqb.dll → MindExecution.Plugins.Concept.cl5wmr53od.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.Directory.re4jjs91d1.dll → MindExecution.Plugins.Directory.slipi39041.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.PlanMaster.89etwfquz1.dll → MindExecution.Plugins.PlanMaster.qfge05l671.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Plugins.YouTube.aqf4vztjji.dll → MindExecution.Plugins.YouTube.tn7v29ut77.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Shared.9b1rucdxvv.dll → MindExecution.Shared.rjqlf0umjn.dll} +0 -0
- package/wwwroot/_framework/{MindExecution.Web.ssp0n0xf1e.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,180 +1,180 @@
|
|
|
1
|
-
(function () {
|
|
2
|
-
const globalKey = "__mindexecMarketingToolEvents";
|
|
3
|
-
|
|
4
|
-
function ensureStore() {
|
|
5
|
-
if (!Array.isArray(window[globalKey])) {
|
|
6
|
-
window[globalKey] = [];
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
return window[globalKey];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function toPlainObject(value) {
|
|
13
|
-
if (!value || typeof value !== "object") {
|
|
14
|
-
return {};
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return JSON.parse(JSON.stringify(value));
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
window.mindexecMarketingTools = window.mindexecMarketingTools || {
|
|
21
|
-
track(payload) {
|
|
22
|
-
const data = toPlainObject(payload);
|
|
23
|
-
const eventName = data.eventName || "tool_event";
|
|
24
|
-
const enriched = {
|
|
25
|
-
...data,
|
|
26
|
-
path: window.location.pathname,
|
|
27
|
-
referrer: document.referrer || "",
|
|
28
|
-
timestamp: new Date().toISOString()
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
ensureStore().push(enriched);
|
|
32
|
-
|
|
33
|
-
try {
|
|
34
|
-
window.dispatchEvent(new CustomEvent("mindexec:tool-event", { detail: enriched }));
|
|
35
|
-
} catch (_) {
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (Array.isArray(window.dataLayer)) {
|
|
39
|
-
window.dataLayer.push({ event: eventName, ...enriched });
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (typeof window.plausible === "function") {
|
|
43
|
-
const props = {
|
|
44
|
-
toolKey: enriched.toolKey || "",
|
|
45
|
-
host: enriched.host || "",
|
|
46
|
-
ctaKind: enriched.ctaKind || "",
|
|
47
|
-
textLengthBucket: enriched.textLengthBucket || "",
|
|
48
|
-
fileCountBucket: enriched.fileCountBucket || ""
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
window.plausible(eventName, { props });
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
initMiniCanvas() {
|
|
56
|
-
const roots = document.querySelectorAll("[data-mini-canvas-root]");
|
|
57
|
-
roots.forEach((root) => {
|
|
58
|
-
if (!(root instanceof HTMLElement) || root.dataset.miniCanvasReady === "true") {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
const viewport = root.querySelector("[data-mini-canvas-viewport]");
|
|
63
|
-
const stage = root.querySelector("[data-mini-canvas-stage]");
|
|
64
|
-
if (!(viewport instanceof HTMLElement) || !(stage instanceof HTMLElement)) {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
root.dataset.miniCanvasReady = "true";
|
|
69
|
-
|
|
70
|
-
const centerBoard = () => {
|
|
71
|
-
if (window.matchMedia("(max-width: 960px)").matches) {
|
|
72
|
-
viewport.scrollLeft = 0;
|
|
73
|
-
viewport.scrollTop = 0;
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
viewport.scrollLeft = Math.max(0, (stage.scrollWidth - viewport.clientWidth) / 2);
|
|
78
|
-
viewport.scrollTop = Math.max(0, (stage.scrollHeight - viewport.clientHeight) / 2 - 80);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
requestAnimationFrame(centerBoard);
|
|
82
|
-
window.setTimeout(centerBoard, 120);
|
|
83
|
-
|
|
84
|
-
const scrollToAnchor = (anchor) => {
|
|
85
|
-
const target = stage.querySelector(`[data-mini-canvas-anchor="${anchor}"]`);
|
|
86
|
-
if (!(target instanceof HTMLElement)) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
target.scrollIntoView({
|
|
91
|
-
behavior: "smooth",
|
|
92
|
-
block: "center",
|
|
93
|
-
inline: "center"
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
root.querySelectorAll("[data-mini-canvas-action]").forEach((button) => {
|
|
98
|
-
if (!(button instanceof HTMLElement) || button.dataset.miniCanvasBound === "true") {
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
button.dataset.miniCanvasBound = "true";
|
|
103
|
-
button.addEventListener("click", () => {
|
|
104
|
-
const action = button.dataset.miniCanvasAction || "";
|
|
105
|
-
if (action === "center") {
|
|
106
|
-
centerBoard();
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
scrollToAnchor(action);
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
let isDragging = false;
|
|
115
|
-
let startX = 0;
|
|
116
|
-
let startY = 0;
|
|
117
|
-
let startScrollLeft = 0;
|
|
118
|
-
let startScrollTop = 0;
|
|
119
|
-
|
|
120
|
-
const isInteractiveTarget = (target) => {
|
|
121
|
-
if (!(target instanceof Element)) {
|
|
122
|
-
return false;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
return !!target.closest("textarea,input,button,a,label,select,[data-no-canvas-pan]");
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
viewport.addEventListener("pointerdown", (event) => {
|
|
129
|
-
if (window.matchMedia("(max-width: 960px)").matches) {
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
if (event.button !== 0 || isInteractiveTarget(event.target)) {
|
|
134
|
-
return;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
isDragging = true;
|
|
138
|
-
startX = event.clientX;
|
|
139
|
-
startY = event.clientY;
|
|
140
|
-
startScrollLeft = viewport.scrollLeft;
|
|
141
|
-
startScrollTop = viewport.scrollTop;
|
|
142
|
-
viewport.classList.add("is-dragging");
|
|
143
|
-
|
|
144
|
-
try {
|
|
145
|
-
viewport.setPointerCapture(event.pointerId);
|
|
146
|
-
} catch (_) {
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
viewport.addEventListener("pointermove", (event) => {
|
|
151
|
-
if (!isDragging) {
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
const dx = event.clientX - startX;
|
|
156
|
-
const dy = event.clientY - startY;
|
|
157
|
-
viewport.scrollLeft = startScrollLeft - dx;
|
|
158
|
-
viewport.scrollTop = startScrollTop - dy;
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
const endDrag = (event) => {
|
|
162
|
-
if (!isDragging) {
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
isDragging = false;
|
|
167
|
-
viewport.classList.remove("is-dragging");
|
|
168
|
-
try {
|
|
169
|
-
viewport.releasePointerCapture(event.pointerId);
|
|
170
|
-
} catch (_) {
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
|
|
174
|
-
viewport.addEventListener("pointerup", endDrag);
|
|
175
|
-
viewport.addEventListener("pointercancel", endDrag);
|
|
176
|
-
viewport.addEventListener("pointerleave", endDrag);
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
})();
|
|
1
|
+
(function () {
|
|
2
|
+
const globalKey = "__mindexecMarketingToolEvents";
|
|
3
|
+
|
|
4
|
+
function ensureStore() {
|
|
5
|
+
if (!Array.isArray(window[globalKey])) {
|
|
6
|
+
window[globalKey] = [];
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
return window[globalKey];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function toPlainObject(value) {
|
|
13
|
+
if (!value || typeof value !== "object") {
|
|
14
|
+
return {};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return JSON.parse(JSON.stringify(value));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
window.mindexecMarketingTools = window.mindexecMarketingTools || {
|
|
21
|
+
track(payload) {
|
|
22
|
+
const data = toPlainObject(payload);
|
|
23
|
+
const eventName = data.eventName || "tool_event";
|
|
24
|
+
const enriched = {
|
|
25
|
+
...data,
|
|
26
|
+
path: window.location.pathname,
|
|
27
|
+
referrer: document.referrer || "",
|
|
28
|
+
timestamp: new Date().toISOString()
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
ensureStore().push(enriched);
|
|
32
|
+
|
|
33
|
+
try {
|
|
34
|
+
window.dispatchEvent(new CustomEvent("mindexec:tool-event", { detail: enriched }));
|
|
35
|
+
} catch (_) {
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (Array.isArray(window.dataLayer)) {
|
|
39
|
+
window.dataLayer.push({ event: eventName, ...enriched });
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (typeof window.plausible === "function") {
|
|
43
|
+
const props = {
|
|
44
|
+
toolKey: enriched.toolKey || "",
|
|
45
|
+
host: enriched.host || "",
|
|
46
|
+
ctaKind: enriched.ctaKind || "",
|
|
47
|
+
textLengthBucket: enriched.textLengthBucket || "",
|
|
48
|
+
fileCountBucket: enriched.fileCountBucket || ""
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
window.plausible(eventName, { props });
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
initMiniCanvas() {
|
|
56
|
+
const roots = document.querySelectorAll("[data-mini-canvas-root]");
|
|
57
|
+
roots.forEach((root) => {
|
|
58
|
+
if (!(root instanceof HTMLElement) || root.dataset.miniCanvasReady === "true") {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const viewport = root.querySelector("[data-mini-canvas-viewport]");
|
|
63
|
+
const stage = root.querySelector("[data-mini-canvas-stage]");
|
|
64
|
+
if (!(viewport instanceof HTMLElement) || !(stage instanceof HTMLElement)) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
root.dataset.miniCanvasReady = "true";
|
|
69
|
+
|
|
70
|
+
const centerBoard = () => {
|
|
71
|
+
if (window.matchMedia("(max-width: 960px)").matches) {
|
|
72
|
+
viewport.scrollLeft = 0;
|
|
73
|
+
viewport.scrollTop = 0;
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
viewport.scrollLeft = Math.max(0, (stage.scrollWidth - viewport.clientWidth) / 2);
|
|
78
|
+
viewport.scrollTop = Math.max(0, (stage.scrollHeight - viewport.clientHeight) / 2 - 80);
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
requestAnimationFrame(centerBoard);
|
|
82
|
+
window.setTimeout(centerBoard, 120);
|
|
83
|
+
|
|
84
|
+
const scrollToAnchor = (anchor) => {
|
|
85
|
+
const target = stage.querySelector(`[data-mini-canvas-anchor="${anchor}"]`);
|
|
86
|
+
if (!(target instanceof HTMLElement)) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
target.scrollIntoView({
|
|
91
|
+
behavior: "smooth",
|
|
92
|
+
block: "center",
|
|
93
|
+
inline: "center"
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
root.querySelectorAll("[data-mini-canvas-action]").forEach((button) => {
|
|
98
|
+
if (!(button instanceof HTMLElement) || button.dataset.miniCanvasBound === "true") {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
button.dataset.miniCanvasBound = "true";
|
|
103
|
+
button.addEventListener("click", () => {
|
|
104
|
+
const action = button.dataset.miniCanvasAction || "";
|
|
105
|
+
if (action === "center") {
|
|
106
|
+
centerBoard();
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
scrollToAnchor(action);
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
let isDragging = false;
|
|
115
|
+
let startX = 0;
|
|
116
|
+
let startY = 0;
|
|
117
|
+
let startScrollLeft = 0;
|
|
118
|
+
let startScrollTop = 0;
|
|
119
|
+
|
|
120
|
+
const isInteractiveTarget = (target) => {
|
|
121
|
+
if (!(target instanceof Element)) {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return !!target.closest("textarea,input,button,a,label,select,[data-no-canvas-pan]");
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
viewport.addEventListener("pointerdown", (event) => {
|
|
129
|
+
if (window.matchMedia("(max-width: 960px)").matches) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (event.button !== 0 || isInteractiveTarget(event.target)) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
isDragging = true;
|
|
138
|
+
startX = event.clientX;
|
|
139
|
+
startY = event.clientY;
|
|
140
|
+
startScrollLeft = viewport.scrollLeft;
|
|
141
|
+
startScrollTop = viewport.scrollTop;
|
|
142
|
+
viewport.classList.add("is-dragging");
|
|
143
|
+
|
|
144
|
+
try {
|
|
145
|
+
viewport.setPointerCapture(event.pointerId);
|
|
146
|
+
} catch (_) {
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
viewport.addEventListener("pointermove", (event) => {
|
|
151
|
+
if (!isDragging) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const dx = event.clientX - startX;
|
|
156
|
+
const dy = event.clientY - startY;
|
|
157
|
+
viewport.scrollLeft = startScrollLeft - dx;
|
|
158
|
+
viewport.scrollTop = startScrollTop - dy;
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
const endDrag = (event) => {
|
|
162
|
+
if (!isDragging) {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
isDragging = false;
|
|
167
|
+
viewport.classList.remove("is-dragging");
|
|
168
|
+
try {
|
|
169
|
+
viewport.releasePointerCapture(event.pointerId);
|
|
170
|
+
} catch (_) {
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
viewport.addEventListener("pointerup", endDrag);
|
|
175
|
+
viewport.addEventListener("pointercancel", endDrag);
|
|
176
|
+
viewport.addEventListener("pointerleave", endDrag);
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
})();
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "MindExec",
|
|
3
|
-
"short_name": "MindExec",
|
|
4
|
-
"id": "./",
|
|
5
|
-
"start_url": "./",
|
|
6
|
-
"display": "standalone",
|
|
7
|
-
"background_color": "#f8fafc",
|
|
8
|
-
"theme_color": "#f8fafc",
|
|
9
|
-
"prefer_related_applications": false,
|
|
10
|
-
"icons": [
|
|
11
|
-
{
|
|
12
|
-
"src": "icon-512.png?v=20260815-app-icon-v2",
|
|
13
|
-
"type": "image/png",
|
|
14
|
-
"sizes": "512x512",
|
|
15
|
-
"purpose": "any maskable"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"src": "icon-192.png?v=20260815-app-icon-v2",
|
|
19
|
-
"type": "image/png",
|
|
20
|
-
"sizes": "192x192",
|
|
21
|
-
"purpose": "any maskable"
|
|
22
|
-
}
|
|
23
|
-
]
|
|
24
|
-
}
|
|
2
|
+
"name": "MindExec",
|
|
3
|
+
"short_name": "MindExec",
|
|
4
|
+
"id": "./",
|
|
5
|
+
"start_url": "./",
|
|
6
|
+
"display": "standalone",
|
|
7
|
+
"background_color": "#f8fafc",
|
|
8
|
+
"theme_color": "#f8fafc",
|
|
9
|
+
"prefer_related_applications": false,
|
|
10
|
+
"icons": [
|
|
11
|
+
{
|
|
12
|
+
"src": "icon-512.png?v=20260815-app-icon-v2",
|
|
13
|
+
"type": "image/png",
|
|
14
|
+
"sizes": "512x512",
|
|
15
|
+
"purpose": "any maskable"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"src": "icon-192.png?v=20260815-app-icon-v2",
|
|
19
|
+
"type": "image/png",
|
|
20
|
+
"sizes": "192x192",
|
|
21
|
+
"purpose": "any maskable"
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|