@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.
Files changed (145) hide show
  1. package/README.md +323 -323
  2. package/codex-model-catalog.js +202 -202
  3. package/codex-runtime.js +1608 -1608
  4. package/desktop-workspace-state.cjs +120 -120
  5. package/electron/main.cjs +517 -517
  6. package/electron/preload.cjs +17 -17
  7. package/electron/recurring-update-owner-smoke.mjs +55 -55
  8. package/electron/recurring-update-owner.cjs +97 -97
  9. package/electron/source-smoke.mjs +108 -108
  10. package/electron/update-feed-resolver.cjs +79 -79
  11. package/electron/update-feed.json +10 -10
  12. package/electron/update-manager-smoke.mjs +146 -146
  13. package/electron/update-manager.cjs +297 -297
  14. package/electron/windows-package-smoke.mjs +156 -156
  15. package/launch-bridge.cjs +236 -236
  16. package/lzo1x.js +110 -110
  17. package/mode4-atlas-worker.js +440 -440
  18. package/mode4-atlas.js +130 -130
  19. package/package.json +1 -1
  20. package/port-guard.cjs +285 -285
  21. package/remote-fast/osx-arm64/MacScreenCaptureKitH264.swift +339 -339
  22. package/remote-fast/osx-arm64/MacSystemAudioCapture.swift +214 -214
  23. package/remote-fast/osx-arm64/UnixRawCaptureHelper.mjs +80 -80
  24. package/remote-fast/osx-arm64/livedesk-raw-capture-resampler.mjs +73 -73
  25. package/remote-fast/osx-arm64/mindexec-remote-fast.dll +0 -0
  26. package/remote-fast/osx-x64/MacScreenCaptureKitH264.swift +339 -339
  27. package/remote-fast/osx-x64/MacSystemAudioCapture.swift +214 -214
  28. package/remote-fast/osx-x64/UnixRawCaptureHelper.mjs +80 -80
  29. package/remote-fast/osx-x64/livedesk-raw-capture-resampler.mjs +73 -73
  30. package/remote-fast/osx-x64/mindexec-remote-fast.dll +0 -0
  31. package/remote-fast/win-x64/mindexec-remote-fast.dll +0 -0
  32. package/remote-hub.js +3698 -3698
  33. package/scripts/auth-session-smoke.mjs +262 -262
  34. package/scripts/board-render-ownership-smoke.mjs +85 -85
  35. package/scripts/codex-model-catalog-smoke.mjs +150 -150
  36. package/scripts/codex-runtime-home-smoke.mjs +58 -58
  37. package/scripts/codex-sdk-image-live-smoke.mjs +43 -43
  38. package/scripts/codex-sdk-image-runtime-smoke.mjs +122 -122
  39. package/scripts/codex-sdk-runtime-smoke.mjs +89 -89
  40. package/scripts/desktop-update-publisher-smoke.mjs +89 -89
  41. package/scripts/desktop-update-worker-smoke.mjs +72 -72
  42. package/scripts/desktop-workspace-state-smoke.mjs +81 -81
  43. package/scripts/drive-installed-update-smoke.mjs +67 -67
  44. package/scripts/npm-fresh-install-smoke.mjs +216 -216
  45. package/scripts/publish-mindexec-desktop-updates.mjs +224 -224
  46. package/scripts/remote-agent-managed-smoke.mjs +318 -318
  47. package/scripts/remote-agent-package-smoke.mjs +64 -64
  48. package/scripts/remote-agent-ws-smoke.mjs +269 -269
  49. package/scripts/remote-fast-live-rate-smoke.mjs +343 -343
  50. package/scripts/remote-fast-mdm-browser-smoke.mjs +453 -453
  51. package/scripts/remote-fleet-render-smoke.mjs +1350 -1350
  52. package/scripts/remote-frame-ws-smoke.mjs +234 -234
  53. package/scripts/remote-http-smoke.mjs +592 -592
  54. package/scripts/remote-hub-identity-smoke.mjs +146 -146
  55. package/scripts/remote-hub-scale-smoke.mjs +124 -124
  56. package/scripts/remote-hub-smoke.mjs +699 -699
  57. package/scripts/remote-input-ws-smoke.mjs +263 -263
  58. package/scripts/remote-registry-follower-smoke.mjs +815 -815
  59. package/scripts/setup-tree-sitter-grammars.mjs +59 -59
  60. package/server.js +7690 -7690
  61. package/start-bridge.bat +32 -32
  62. package/start-bridge.sh +81 -81
  63. package/wwwroot/_content/MindExecution.Plugins.Admin/css/admin-dashboard.css +546 -546
  64. package/wwwroot/_content/MindExecution.Plugins.YouTube/css/youtube-search.css +251 -251
  65. package/wwwroot/_content/MindExecution.Shared/css/app.css +1 -1
  66. package/wwwroot/_content/MindExecution.Shared/css/mind-map-overrides.css +3789 -3789
  67. package/wwwroot/_content/MindExecution.Shared/js/agent-visualization.js +27 -27
  68. package/wwwroot/_content/MindExecution.Shared/js/background-themes.js +1449 -1449
  69. package/wwwroot/_content/MindExecution.Shared/js/code-master.js +8316 -8316
  70. package/wwwroot/_content/MindExecution.Shared/js/file-system-helper.js +338 -338
  71. package/wwwroot/_content/MindExecution.Shared/js/marked.min.js +69 -69
  72. package/wwwroot/_content/MindExecution.Shared/js/mind-map-animated-image-preview.js +270 -270
  73. package/wwwroot/_content/MindExecution.Shared/js/mind-map-automation-edge-motion.js +170 -170
  74. package/wwwroot/_content/MindExecution.Shared/js/mind-map-board-render-ownership.js +81 -81
  75. package/wwwroot/_content/MindExecution.Shared/js/mind-map-core.js +10506 -10506
  76. package/wwwroot/_content/MindExecution.Shared/js/mind-map-css3d-hotpath.js +902 -902
  77. package/wwwroot/_content/MindExecution.Shared/js/mind-map-css3d-manager.js +24637 -24637
  78. package/wwwroot/_content/MindExecution.Shared/js/mind-map-dev-guards.js +325 -325
  79. package/wwwroot/_content/MindExecution.Shared/js/mind-map-dnd.js +1491 -1491
  80. package/wwwroot/_content/MindExecution.Shared/js/mind-map-glow-shader.js +70 -70
  81. package/wwwroot/_content/MindExecution.Shared/js/mind-map-image-policy.js +218 -218
  82. package/wwwroot/_content/MindExecution.Shared/js/mind-map-interactions.js +7065 -7065
  83. package/wwwroot/_content/MindExecution.Shared/js/mind-map-lod-plan-worker.js +160 -160
  84. package/wwwroot/_content/MindExecution.Shared/js/mind-map-lod-renderer.js +9956 -9956
  85. package/wwwroot/_content/MindExecution.Shared/js/mind-map-lod-video-placeholder.js +107 -107
  86. package/wwwroot/_content/MindExecution.Shared/js/mind-map-logic-workers.js +1004 -1004
  87. package/wwwroot/_content/MindExecution.Shared/js/mind-map-menu-manager.js +1351 -1351
  88. package/wwwroot/_content/MindExecution.Shared/js/mind-map-multi-select.js +865 -865
  89. package/wwwroot/_content/MindExecution.Shared/js/mind-map-node-search-worker.js +554 -554
  90. package/wwwroot/_content/MindExecution.Shared/js/mind-map-nodes.js +4744 -4744
  91. package/wwwroot/_content/MindExecution.Shared/js/mind-map-normal-boundary-optimizer.js +624 -624
  92. package/wwwroot/_content/MindExecution.Shared/js/mind-map-object-manager.js +241 -241
  93. package/wwwroot/_content/MindExecution.Shared/js/mind-map-pipeline.js +2290 -2290
  94. package/wwwroot/_content/MindExecution.Shared/js/mind-map-remote-codecs.js +202 -202
  95. package/wwwroot/_content/MindExecution.Shared/js/mind-map-render-plan.js +1971 -1971
  96. package/wwwroot/_content/MindExecution.Shared/js/mind-map-text-lod-system.js +93 -93
  97. package/wwwroot/_content/MindExecution.Shared/js/mind-map-texture-factory.js +2391 -2391
  98. package/wwwroot/_content/MindExecution.Shared/js/mind-map-video-playback-controls.js +95 -95
  99. package/wwwroot/_content/MindExecution.Shared/js/mind-map-visibility-worker.js +895 -895
  100. package/wwwroot/_content/MindExecution.Shared/js/mindmap-toolbar.js +636 -636
  101. package/wwwroot/_content/MindExecution.Shared/js/native-drop-handler.js +45 -45
  102. package/wwwroot/_content/MindExecution.Shared/js/plan-master.js +117 -117
  103. package/wwwroot/_content/MindExecution.Shared/js/renderers/CSS3DRenderer.js +114 -114
  104. package/wwwroot/_content/MindExecution.Shared/js/texture-worker-manager.js +10 -10
  105. package/wwwroot/_content/MindExecution.Shared/js/three.min.js +6 -6
  106. package/wwwroot/_content/MindExecution.Shared/js/token-manager.js +7 -7
  107. package/wwwroot/_content/MindExecution.Shared/js/troika-bundle.js +6 -6
  108. package/wwwroot/_content/MindExecution.Shared/js/troika-bundle.js.map +2 -2
  109. package/wwwroot/_content/MindExecution.Shared/lib/font-awesome/css/all.min.css +8 -8
  110. package/wwwroot/_content/MindExecution.Shared/models/vocab.txt +30522 -30522
  111. package/wwwroot/_framework/{Google.Protobuf.9h59ukbel7.dll → Google.Protobuf.33g2gb5is0.dll} +0 -0
  112. package/wwwroot/_framework/{MindExecution.Core.ty1xewqp36.dll → MindExecution.Core.z100xo4mg0.dll} +0 -0
  113. package/wwwroot/_framework/{MindExecution.Kernel.h7rqjoo69o.dll → MindExecution.Kernel.i9cldrx8yc.dll} +0 -0
  114. package/wwwroot/_framework/{MindExecution.Plugins.Admin.wrfrcvhjde.dll → MindExecution.Plugins.Admin.48lzqddb0a.dll} +0 -0
  115. package/wwwroot/_framework/{MindExecution.Plugins.Business.csbcyjurdh.dll → MindExecution.Plugins.Business.7m8u1q142p.dll} +0 -0
  116. package/wwwroot/_framework/{MindExecution.Plugins.Concept.buomiysqjn.dll → MindExecution.Plugins.Concept.cl5wmr53od.dll} +0 -0
  117. package/wwwroot/_framework/{MindExecution.Plugins.Directory.7k00i2v769.dll → MindExecution.Plugins.Directory.slipi39041.dll} +0 -0
  118. package/wwwroot/_framework/{MindExecution.Plugins.PlanMaster.85i5ocraro.dll → MindExecution.Plugins.PlanMaster.qfge05l671.dll} +0 -0
  119. package/wwwroot/_framework/{MindExecution.Plugins.YouTube.nbolrfakte.dll → MindExecution.Plugins.YouTube.tn7v29ut77.dll} +0 -0
  120. package/wwwroot/_framework/{MindExecution.Shared.nqh4porv7x.dll → MindExecution.Shared.rjqlf0umjn.dll} +0 -0
  121. package/wwwroot/_framework/{MindExecution.Web.211q3bf4mr.dll → MindExecution.Web.rwawrxxk38.dll} +0 -0
  122. package/wwwroot/_framework/blazor.boot.json +23 -23
  123. package/wwwroot/_headers +40 -40
  124. package/wwwroot/_redirects +1 -1
  125. package/wwwroot/index.html +772 -772
  126. package/wwwroot/js/marketing-tool.js +180 -180
  127. package/wwwroot/manifest.webmanifest +23 -23
  128. package/wwwroot/service-worker-assets.js +78 -106
  129. package/wwwroot/service-worker.js +33 -33
  130. package/tree-sitter-grammars/README.md +0 -18
  131. package/tree-sitter-grammars/tree-sitter-c_sharp.wasm +0 -0
  132. package/tree-sitter-grammars/tree-sitter-go.wasm +0 -0
  133. package/tree-sitter-grammars/tree-sitter-java.wasm +0 -0
  134. package/tree-sitter-grammars/tree-sitter-javascript.wasm +0 -0
  135. package/tree-sitter-grammars/tree-sitter-python.wasm +0 -0
  136. package/tree-sitter-grammars/tree-sitter-rust.wasm +0 -0
  137. package/tree-sitter-grammars/tree-sitter-tsx.wasm +0 -0
  138. package/tree-sitter-grammars/tree-sitter-typescript.wasm +0 -0
  139. package/wwwroot/_content/MindExecution.Plugins.Directory/background.png +0 -0
  140. package/wwwroot/_content/MindExecution.Shared/fonts/NotoSansKR-Bold.ttf +0 -0
  141. package/wwwroot/_content/MindExecution.Shared/fonts/NotoSansKR-Regular.ttf +0 -0
  142. package/wwwroot/_content/MindExecution.Shared/js/mind-map-core.js.backup +0 -1059
  143. package/wwwroot/_content/MindExecution.Shared/js/mind-map-dnd.js.bak +0 -434
  144. package/wwwroot/_content/MindExecution.Shared/js/mind-map-object-manager.js.backup +0 -372
  145. package/wwwroot/_content/MindExecution.Shared/js/mind-map-texture-factory.js.backup +0 -1258
@@ -1,40 +1,40 @@
1
1
  // File: mind-map-object-manager.js
2
2
  // [Refactor] Creates and updates WebGL node groups (THREE.Group / THREE.Mesh).
3
- (function () {
4
- 'use strict';
5
- // Keep glow purely in CSS layers; avoid spending WebGL budget on halo effects.
6
- const ENABLE_WEBGL_GLOW = false;
7
- const MEMO_WEBGL_THEMES = {
8
- coral: { fill: 0xfff1eb, border: 0xf7b08d, accent: 0xff8052 },
9
- amber: { fill: 0xfff7df, border: 0xf4d06f, accent: 0xf59e0b },
10
- sun: { fill: 0xfff9d7, border: 0xe7d668, accent: 0xca8a04 },
11
- sage: { fill: 0xeef6e7, border: 0xbed79f, accent: 0x65a30d },
12
- mint: { fill: 0xe8faf4, border: 0x8fd8c1, accent: 0x10b981 },
13
- sky: { fill: 0xe8f4ff, border: 0x9dc7f7, accent: 0x3b82f6 },
14
- indigo: { fill: 0xeef0ff, border: 0xbcc2ff, accent: 0x6366f1 },
15
- violet: { fill: 0xf5ecff, border: 0xd6b8ff, accent: 0x8b5cf6 },
16
- rose: { fill: 0xffeef2, border: 0xf5b2c2, accent: 0xf43f5e },
17
- gray: { fill: 0xf3f4f6, border: 0xd1d5db, accent: 0x6b7280 },
18
- slate: { fill: 0xf3f5f7, border: 0xcbd5e1, accent: 0x64748b }
19
- };
20
-
21
- function getNodeMetadata(nodeModel) {
22
- return nodeModel?.metadata || nodeModel?.Metadata || null;
23
- }
24
-
25
- function isAgentStyledMemoNode(nodeModel) {
26
- const metadata = getNodeMetadata(nodeModel);
27
- const semanticType = String(metadata?.SemanticType || metadata?.semanticType || '').trim();
28
- return semanticType === 'MindCanvasAgent' || semanticType === 'AgentCommand';
29
- }
30
-
31
- function getMemoWebglTheme(nodeModel) {
32
- const fallbackKey = 'coral';
33
- const key = String(getNodeMetadata(nodeModel)?.memoColor || fallbackKey).toLowerCase();
34
- return MEMO_WEBGL_THEMES[key] || MEMO_WEBGL_THEMES[fallbackKey];
35
- }
36
-
37
- function createRoundedRectGeometry(width, height, radius) {
3
+ (function () {
4
+ 'use strict';
5
+ // Keep glow purely in CSS layers; avoid spending WebGL budget on halo effects.
6
+ const ENABLE_WEBGL_GLOW = false;
7
+ const MEMO_WEBGL_THEMES = {
8
+ coral: { fill: 0xfff1eb, border: 0xf7b08d, accent: 0xff8052 },
9
+ amber: { fill: 0xfff7df, border: 0xf4d06f, accent: 0xf59e0b },
10
+ sun: { fill: 0xfff9d7, border: 0xe7d668, accent: 0xca8a04 },
11
+ sage: { fill: 0xeef6e7, border: 0xbed79f, accent: 0x65a30d },
12
+ mint: { fill: 0xe8faf4, border: 0x8fd8c1, accent: 0x10b981 },
13
+ sky: { fill: 0xe8f4ff, border: 0x9dc7f7, accent: 0x3b82f6 },
14
+ indigo: { fill: 0xeef0ff, border: 0xbcc2ff, accent: 0x6366f1 },
15
+ violet: { fill: 0xf5ecff, border: 0xd6b8ff, accent: 0x8b5cf6 },
16
+ rose: { fill: 0xffeef2, border: 0xf5b2c2, accent: 0xf43f5e },
17
+ gray: { fill: 0xf3f4f6, border: 0xd1d5db, accent: 0x6b7280 },
18
+ slate: { fill: 0xf3f5f7, border: 0xcbd5e1, accent: 0x64748b }
19
+ };
20
+
21
+ function getNodeMetadata(nodeModel) {
22
+ return nodeModel?.metadata || nodeModel?.Metadata || null;
23
+ }
24
+
25
+ function isAgentStyledMemoNode(nodeModel) {
26
+ const metadata = getNodeMetadata(nodeModel);
27
+ const semanticType = String(metadata?.SemanticType || metadata?.semanticType || '').trim();
28
+ return semanticType === 'MindCanvasAgent' || semanticType === 'AgentCommand';
29
+ }
30
+
31
+ function getMemoWebglTheme(nodeModel) {
32
+ const fallbackKey = 'coral';
33
+ const key = String(getNodeMetadata(nodeModel)?.memoColor || fallbackKey).toLowerCase();
34
+ return MEMO_WEBGL_THEMES[key] || MEMO_WEBGL_THEMES[fallbackKey];
35
+ }
36
+
37
+ function createRoundedRectGeometry(width, height, radius) {
38
38
  const shape = new THREE.Shape();
39
39
  const x = -width / 2;
40
40
  const y = -height / 2;
@@ -60,11 +60,11 @@
60
60
 
61
61
  // ▼▼▼ [New] Create FILLED rounded rectangle for scrollbar ▼▼▼
62
62
  // Note: This draws DOWNWARD (negative Y) to match node coordinate system
63
- function createRoundedRectFilledGeometry(width, height, radius) {
64
- const shape = new THREE.Shape();
65
- const x = 0;
66
- const y = 0;
67
- const r = Math.min(radius, width / 2, height / 2);
63
+ function createRoundedRectFilledGeometry(width, height, radius) {
64
+ const shape = new THREE.Shape();
65
+ const x = 0;
66
+ const y = 0;
67
+ const r = Math.min(radius, width / 2, height / 2);
68
68
  const h = -height; // Draw downward (negative Y direction)
69
69
 
70
70
  // Start at top-left corner, draw clockwise (going down)
@@ -78,68 +78,68 @@
78
78
  shape.lineTo(x, y - r);
79
79
  shape.quadraticCurveTo(x, y, x + r, y);
80
80
 
81
- return new THREE.ShapeGeometry(shape);
82
- }
83
- // ▲▲▲ [New] ▲▲▲
84
-
85
- const IMAGE_SELECTION_GLOW_PAD = 18;
86
- const IMAGE_SELECTION_GLOW_COLOR = 0x1e3a8a;
87
- const IMAGE_SELECTION_GLOW_OPACITY = 0.18;
88
-
89
- function syncImageSelectionGlow(group, width, height, baseRenderOrder, isSelected) {
90
- if (!group) return null;
91
-
92
- let outline = group.getObjectByName('outline');
93
- if (!outline) {
94
- outline = new THREE.Mesh(
95
- createRoundedRectFilledGeometry(
96
- width + IMAGE_SELECTION_GLOW_PAD,
97
- height + IMAGE_SELECTION_GLOW_PAD,
98
- 20 + (IMAGE_SELECTION_GLOW_PAD * 0.5)
99
- ),
100
- new THREE.MeshBasicMaterial({
101
- color: IMAGE_SELECTION_GLOW_COLOR,
102
- transparent: true,
103
- opacity: 0,
104
- depthWrite: false,
105
- depthTest: false
106
- })
107
- );
108
- outline.name = 'outline';
109
- outline.userData = { ...(outline.userData || {}), isImageSelectionGlow: true };
110
- group.add(outline);
111
- }
112
-
113
- if (outline.geometry) {
114
- outline.geometry.dispose?.();
115
- }
116
- outline.geometry = createRoundedRectFilledGeometry(
117
- width + IMAGE_SELECTION_GLOW_PAD,
118
- height + IMAGE_SELECTION_GLOW_PAD,
119
- 20 + (IMAGE_SELECTION_GLOW_PAD * 0.5)
120
- );
121
- outline.position.set(-(IMAGE_SELECTION_GLOW_PAD / 2), IMAGE_SELECTION_GLOW_PAD / 2, 0);
122
- outline.renderOrder = baseRenderOrder - 1;
123
- outline.visible = !!isSelected;
124
-
125
- if (outline.material) {
126
- outline.material.color.setHex(IMAGE_SELECTION_GLOW_COLOR);
127
- outline.material.opacity = isSelected ? IMAGE_SELECTION_GLOW_OPACITY : 0;
128
- outline.material.transparent = true;
129
- outline.material.depthWrite = false;
130
- outline.material.depthTest = false;
131
- outline.material.needsUpdate = true;
132
- }
133
-
134
- return outline;
135
- }
136
-
137
- // ▲▲▲ [Change] ▲▲▲
138
-
139
- async function createOrUpdateCanvasTextureNode(module, nodeModel, existingGroup = null, zPos = 0, textures, width, height) {
81
+ return new THREE.ShapeGeometry(shape);
82
+ }
83
+ // ▲▲▲ [New] ▲▲▲
84
+
85
+ const IMAGE_SELECTION_GLOW_PAD = 18;
86
+ const IMAGE_SELECTION_GLOW_COLOR = 0x1e3a8a;
87
+ const IMAGE_SELECTION_GLOW_OPACITY = 0.18;
88
+
89
+ function syncImageSelectionGlow(group, width, height, baseRenderOrder, isSelected) {
90
+ if (!group) return null;
91
+
92
+ let outline = group.getObjectByName('outline');
93
+ if (!outline) {
94
+ outline = new THREE.Mesh(
95
+ createRoundedRectFilledGeometry(
96
+ width + IMAGE_SELECTION_GLOW_PAD,
97
+ height + IMAGE_SELECTION_GLOW_PAD,
98
+ 20 + (IMAGE_SELECTION_GLOW_PAD * 0.5)
99
+ ),
100
+ new THREE.MeshBasicMaterial({
101
+ color: IMAGE_SELECTION_GLOW_COLOR,
102
+ transparent: true,
103
+ opacity: 0,
104
+ depthWrite: false,
105
+ depthTest: false
106
+ })
107
+ );
108
+ outline.name = 'outline';
109
+ outline.userData = { ...(outline.userData || {}), isImageSelectionGlow: true };
110
+ group.add(outline);
111
+ }
112
+
113
+ if (outline.geometry) {
114
+ outline.geometry.dispose?.();
115
+ }
116
+ outline.geometry = createRoundedRectFilledGeometry(
117
+ width + IMAGE_SELECTION_GLOW_PAD,
118
+ height + IMAGE_SELECTION_GLOW_PAD,
119
+ 20 + (IMAGE_SELECTION_GLOW_PAD * 0.5)
120
+ );
121
+ outline.position.set(-(IMAGE_SELECTION_GLOW_PAD / 2), IMAGE_SELECTION_GLOW_PAD / 2, 0);
122
+ outline.renderOrder = baseRenderOrder - 1;
123
+ outline.visible = !!isSelected;
124
+
125
+ if (outline.material) {
126
+ outline.material.color.setHex(IMAGE_SELECTION_GLOW_COLOR);
127
+ outline.material.opacity = isSelected ? IMAGE_SELECTION_GLOW_OPACITY : 0;
128
+ outline.material.transparent = true;
129
+ outline.material.depthWrite = false;
130
+ outline.material.depthTest = false;
131
+ outline.material.needsUpdate = true;
132
+ }
133
+
134
+ return outline;
135
+ }
136
+
137
+ // ▲▲▲ [Change] ▲▲▲
138
+
139
+ async function createOrUpdateCanvasTextureNode(module, nodeModel, existingGroup = null, zPos = 0, textures, width, height) {
140
140
  // ▼▼▼ [Changed] Identify nodes handled by CSS3D (Text, Note, Code) ▼▼▼
141
141
  // These nodes render as simple background meshes in WebGL (Mesh), content is in DOM.
142
- const isCss3dNode = ['text', 'note', 'memo', 'code', 'markdown'].includes(nodeModel.contentType);
142
+ const isCss3dNode = ['text', 'note', 'memo', 'code', 'markdown'].includes(nodeModel.contentType);
143
143
  // ▲▲▲ [Changed] ▲▲▲
144
144
 
145
145
  // For non-CSS3D nodes, validate textures
@@ -149,24 +149,24 @@
149
149
  }
150
150
 
151
151
  const TAIL_HEIGHT = 12;
152
- const HANDLE_SIZE = 16; // Changed from 36 to 16 to match CSS handles and prevent ghost touches
153
- const CORNER_RADIUS = 20;
154
- const DEFAULT_OUTLINE_COLOR = 0x374151;
155
- const SELECTED_OUTLINE_COLOR = 0x2563eb;
156
- const memoTheme = String(nodeModel?.contentType ?? '').toLowerCase() === 'memo' ? getMemoWebglTheme(nodeModel) : null;
157
- const defaultBorderHex = memoTheme ? memoTheme.border : DEFAULT_OUTLINE_COLOR;
158
- const bodyFillHex = memoTheme ? memoTheme.fill : 0xfefefe;
159
- const isSelected = module.multiSelectedNodeIds.has(nodeModel.id);
160
- const selectedBorderHex = SELECTED_OUTLINE_COLOR;
161
- const outlineColor = isSelected ? selectedBorderHex : defaultBorderHex;
162
- const OUTLINE_SHRINK = 2;
163
- const OUTLINE_RADIUS = Math.max(1, CORNER_RADIUS - 1);
164
-
165
- if (existingGroup) {
166
- const active = isSelected ? (textures?.selected || {}) : (textures?.default || {});
167
- const bodyMesh = existingGroup.getObjectByName('body');
168
- const tailMesh = existingGroup.getObjectByName('tail');
169
- const glowMesh = existingGroup.getObjectByName('glow');
152
+ const HANDLE_SIZE = 16; // Changed from 36 to 16 to match CSS handles and prevent ghost touches
153
+ const CORNER_RADIUS = 20;
154
+ const DEFAULT_OUTLINE_COLOR = 0x374151;
155
+ const SELECTED_OUTLINE_COLOR = 0x2563eb;
156
+ const memoTheme = String(nodeModel?.contentType ?? '').toLowerCase() === 'memo' ? getMemoWebglTheme(nodeModel) : null;
157
+ const defaultBorderHex = memoTheme ? memoTheme.border : DEFAULT_OUTLINE_COLOR;
158
+ const bodyFillHex = memoTheme ? memoTheme.fill : 0xfefefe;
159
+ const isSelected = module.multiSelectedNodeIds.has(nodeModel.id);
160
+ const selectedBorderHex = SELECTED_OUTLINE_COLOR;
161
+ const outlineColor = isSelected ? selectedBorderHex : defaultBorderHex;
162
+ const OUTLINE_SHRINK = 2;
163
+ const OUTLINE_RADIUS = Math.max(1, CORNER_RADIUS - 1);
164
+
165
+ if (existingGroup) {
166
+ const active = isSelected ? (textures?.selected || {}) : (textures?.default || {});
167
+ const bodyMesh = existingGroup.getObjectByName('body');
168
+ const tailMesh = existingGroup.getObjectByName('tail');
169
+ const glowMesh = existingGroup.getObjectByName('glow');
170
170
  let outline = existingGroup.getObjectByName('outline');
171
171
  let baseRenderOrder = existingGroup.userData?.baseRenderOrder;
172
172
  if (baseRenderOrder === undefined) {
@@ -191,82 +191,82 @@
191
191
  OUTLINE_RADIUS
192
192
  );
193
193
  }
194
- }
195
- bodyMesh.position.set(width / 2, -height / 2, 0);
196
- if (nodeModel.contentType === 'image') {
197
- syncImageSelectionGlow(existingGroup, width, height, baseRenderOrder, isSelected);
198
- window.MindMapNodes?.syncImageMidLodDecorations?.(existingGroup, width, height, baseRenderOrder, isSelected);
199
- } else if (outline) {
200
- outline.position.copy(bodyMesh.position);
201
- outline.position.z = 0; // [Fix] Z=0 for parallax elimination
202
- outline.visible = false;
203
- if (outline.material) {
204
- outline.material.color.setHex(isSelected ? selectedBorderHex : defaultBorderHex);
205
- outline.material.opacity = isSelected ? 1.0 : 0.5;
206
- }
207
- }
208
-
209
- if (bodyMesh.material?.uniforms) {
210
- if (bodyMesh.material.uniforms.bgColor) {
211
- bodyMesh.material.uniforms.bgColor.value.setHex(bodyFillHex);
212
- }
213
- if (bodyMesh.material.uniforms.borderColor) {
214
- bodyMesh.material.uniforms.borderColor.value.setHex(isSelected ? selectedBorderHex : defaultBorderHex);
215
- }
216
- }
217
- }
218
- if (tailMesh) {
219
- tailMesh.position.set(width / 2, -height - (TAIL_HEIGHT / 2), 0);
220
- if (active?.tail && tailMesh.material) {
221
- tailMesh.material.map = active.tail;
222
- tailMesh.material.needsUpdate = true;
223
- }
224
- }
194
+ }
195
+ bodyMesh.position.set(width / 2, -height / 2, 0);
196
+ if (nodeModel.contentType === 'image') {
197
+ syncImageSelectionGlow(existingGroup, width, height, baseRenderOrder, isSelected);
198
+ window.MindMapNodes?.syncImageMidLodDecorations?.(existingGroup, width, height, baseRenderOrder, isSelected);
199
+ } else if (outline) {
200
+ outline.position.copy(bodyMesh.position);
201
+ outline.position.z = 0; // [Fix] Z=0 for parallax elimination
202
+ outline.visible = false;
203
+ if (outline.material) {
204
+ outline.material.color.setHex(isSelected ? selectedBorderHex : defaultBorderHex);
205
+ outline.material.opacity = isSelected ? 1.0 : 0.5;
206
+ }
207
+ }
208
+
209
+ if (bodyMesh.material?.uniforms) {
210
+ if (bodyMesh.material.uniforms.bgColor) {
211
+ bodyMesh.material.uniforms.bgColor.value.setHex(bodyFillHex);
212
+ }
213
+ if (bodyMesh.material.uniforms.borderColor) {
214
+ bodyMesh.material.uniforms.borderColor.value.setHex(isSelected ? selectedBorderHex : defaultBorderHex);
215
+ }
216
+ }
217
+ }
218
+ if (tailMesh) {
219
+ tailMesh.position.set(width / 2, -height - (TAIL_HEIGHT / 2), 0);
220
+ if (active?.tail && tailMesh.material) {
221
+ tailMesh.material.map = active.tail;
222
+ tailMesh.material.needsUpdate = true;
223
+ }
224
+ }
225
225
  // Update resize handles (omitted for brevity, handled by existing code flow if not changed)
226
- if (nodeModel.contentType !== 'pdf') {
227
- const edgeWidthLength = Math.max(10, width - HANDLE_SIZE * 2);
228
- const edgeHeightLength = Math.max(10, height - HANDLE_SIZE * 2);
229
- const handleConfigs = {
230
- // ▼▼▼ [Fix] Z값을 0으로 통일하여 시차(Parallax) 완전 제거 ▼▼▼
231
- 'resizeHandle_TL': { x: HANDLE_SIZE / 2, y: -HANDLE_SIZE / 2, w: HANDLE_SIZE, h: HANDLE_SIZE, z: 0 },
232
- 'resizeHandle_TR': { x: width - HANDLE_SIZE / 2, y: -HANDLE_SIZE / 2, w: HANDLE_SIZE, h: HANDLE_SIZE, z: 0 },
233
- 'resizeHandle_BL': { x: HANDLE_SIZE / 2, y: -height + HANDLE_SIZE / 2, w: HANDLE_SIZE, h: HANDLE_SIZE, z: 0 },
234
- 'resizeHandle_BR': { x: width - HANDLE_SIZE / 2, y: -height + HANDLE_SIZE / 2, w: HANDLE_SIZE, h: HANDLE_SIZE, z: 0 }
235
- // ▲▲▲ [Fix] ▲▲▲
236
- };
237
- if (nodeModel.contentType !== 'image') {
238
- Object.assign(handleConfigs, {
239
- 'resizeHandle_T': { x: width / 2, y: -HANDLE_SIZE / 2, w: edgeWidthLength, h: HANDLE_SIZE, z: 0 },
240
- 'resizeHandle_B': { x: width / 2, y: -height + HANDLE_SIZE / 2, w: edgeWidthLength, h: HANDLE_SIZE, z: 0 },
241
- 'resizeHandle_L': { x: HANDLE_SIZE / 2, y: -height / 2, w: HANDLE_SIZE, h: edgeHeightLength, z: 0 },
242
- 'resizeHandle_R': { x: width - HANDLE_SIZE / 2, y: -height / 2, w: HANDLE_SIZE, h: edgeHeightLength, z: 0 }
243
- });
244
- }
245
- Object.entries(handleConfigs).forEach(([name, cfg]) => {
246
- const handle = existingGroup.getObjectByName(name);
247
- if (handle) {
248
- handle.position.set(cfg.x, cfg.y, cfg.z);
249
- const gp = handle.geometry?.parameters;
250
- if (gp && (gp.width !== cfg.w || gp.height !== cfg.h)) {
251
- handle.geometry.dispose();
252
- handle.geometry = new THREE.PlaneGeometry(cfg.w, cfg.h);
253
- }
254
- if (nodeModel.contentType === 'image' && handle.material) {
255
- handle.material.opacity = 0.0;
256
- handle.material.colorWrite = false;
257
- handle.material.needsUpdate = true;
258
- }
259
- }
260
- });
261
- if (nodeModel.contentType === 'image') {
262
- ['resizeHandle_T', 'resizeHandle_B', 'resizeHandle_L', 'resizeHandle_R'].forEach(name => {
263
- const handle = existingGroup.getObjectByName(name);
264
- if (handle) {
265
- handle.visible = false;
266
- }
267
- });
268
- }
269
- }
226
+ if (nodeModel.contentType !== 'pdf') {
227
+ const edgeWidthLength = Math.max(10, width - HANDLE_SIZE * 2);
228
+ const edgeHeightLength = Math.max(10, height - HANDLE_SIZE * 2);
229
+ const handleConfigs = {
230
+ // ▼▼▼ [Fix] Z값을 0으로 통일하여 시차(Parallax) 완전 제거 ▼▼▼
231
+ 'resizeHandle_TL': { x: HANDLE_SIZE / 2, y: -HANDLE_SIZE / 2, w: HANDLE_SIZE, h: HANDLE_SIZE, z: 0 },
232
+ 'resizeHandle_TR': { x: width - HANDLE_SIZE / 2, y: -HANDLE_SIZE / 2, w: HANDLE_SIZE, h: HANDLE_SIZE, z: 0 },
233
+ 'resizeHandle_BL': { x: HANDLE_SIZE / 2, y: -height + HANDLE_SIZE / 2, w: HANDLE_SIZE, h: HANDLE_SIZE, z: 0 },
234
+ 'resizeHandle_BR': { x: width - HANDLE_SIZE / 2, y: -height + HANDLE_SIZE / 2, w: HANDLE_SIZE, h: HANDLE_SIZE, z: 0 }
235
+ // ▲▲▲ [Fix] ▲▲▲
236
+ };
237
+ if (nodeModel.contentType !== 'image') {
238
+ Object.assign(handleConfigs, {
239
+ 'resizeHandle_T': { x: width / 2, y: -HANDLE_SIZE / 2, w: edgeWidthLength, h: HANDLE_SIZE, z: 0 },
240
+ 'resizeHandle_B': { x: width / 2, y: -height + HANDLE_SIZE / 2, w: edgeWidthLength, h: HANDLE_SIZE, z: 0 },
241
+ 'resizeHandle_L': { x: HANDLE_SIZE / 2, y: -height / 2, w: HANDLE_SIZE, h: edgeHeightLength, z: 0 },
242
+ 'resizeHandle_R': { x: width - HANDLE_SIZE / 2, y: -height / 2, w: HANDLE_SIZE, h: edgeHeightLength, z: 0 }
243
+ });
244
+ }
245
+ Object.entries(handleConfigs).forEach(([name, cfg]) => {
246
+ const handle = existingGroup.getObjectByName(name);
247
+ if (handle) {
248
+ handle.position.set(cfg.x, cfg.y, cfg.z);
249
+ const gp = handle.geometry?.parameters;
250
+ if (gp && (gp.width !== cfg.w || gp.height !== cfg.h)) {
251
+ handle.geometry.dispose();
252
+ handle.geometry = new THREE.PlaneGeometry(cfg.w, cfg.h);
253
+ }
254
+ if (nodeModel.contentType === 'image' && handle.material) {
255
+ handle.material.opacity = 0.0;
256
+ handle.material.colorWrite = false;
257
+ handle.material.needsUpdate = true;
258
+ }
259
+ }
260
+ });
261
+ if (nodeModel.contentType === 'image') {
262
+ ['resizeHandle_T', 'resizeHandle_B', 'resizeHandle_L', 'resizeHandle_R'].forEach(name => {
263
+ const handle = existingGroup.getObjectByName(name);
264
+ if (handle) {
265
+ handle.visible = false;
266
+ }
267
+ });
268
+ }
269
+ }
270
270
 
271
271
  // ▼▼▼ [Changed] CSS3D nodes: keep simplified material (or shader), skip texture update ▼▼▼
272
272
  if (!isCss3dNode) {
@@ -331,14 +331,14 @@
331
331
  // This replaces the textured material for text/note/code
332
332
  bodyMaterial = new THREE.ShaderMaterial({
333
333
  transparent: false, // ★ 불투명하게 변경 - 그리드가 비치지 않도록
334
- depthWrite: true,
335
- depthTest: true,
336
- uniforms: {
337
- bgColor: { value: new THREE.Color(bodyFillHex) },
338
- borderColor: { value: new THREE.Color(isSelected ? selectedBorderHex : defaultBorderHex) },
339
- borderWidth: { value: 3.0 },
340
- meshSize: { value: new THREE.Vector2(width, height) }
341
- },
334
+ depthWrite: true,
335
+ depthTest: true,
336
+ uniforms: {
337
+ bgColor: { value: new THREE.Color(bodyFillHex) },
338
+ borderColor: { value: new THREE.Color(isSelected ? selectedBorderHex : defaultBorderHex) },
339
+ borderWidth: { value: 3.0 },
340
+ meshSize: { value: new THREE.Vector2(width, height) }
341
+ },
342
342
  vertexShader: `
343
343
  varying vec2 vUv;
344
344
  void main() {
@@ -382,19 +382,19 @@
382
382
  });
383
383
  }
384
384
 
385
- const bodyMesh = new THREE.Mesh(bodyGeometry, bodyMaterial);
386
- bodyMesh.renderOrder = baseRenderOrder;
387
- bodyMesh.name = 'body';
388
- bodyMesh.position.set(width / 2, -height / 2, 0.0); // ★ z=0.0: 그리드(z=0)와 밀착
389
- bodyMesh.userData.nodeId = nodeModel.id;
390
- group.add(bodyMesh);
391
-
392
- if (nodeModel.contentType === 'image') {
393
- syncImageSelectionGlow(group, width, height, baseRenderOrder, isSelected);
394
- window.MindMapNodes?.syncImageMidLodDecorations?.(group, width, height, baseRenderOrder, isSelected);
395
- }
396
-
397
- // Tail
385
+ const bodyMesh = new THREE.Mesh(bodyGeometry, bodyMaterial);
386
+ bodyMesh.renderOrder = baseRenderOrder;
387
+ bodyMesh.name = 'body';
388
+ bodyMesh.position.set(width / 2, -height / 2, 0.0); // ★ z=0.0: 그리드(z=0)와 밀착
389
+ bodyMesh.userData.nodeId = nodeModel.id;
390
+ group.add(bodyMesh);
391
+
392
+ if (nodeModel.contentType === 'image') {
393
+ syncImageSelectionGlow(group, width, height, baseRenderOrder, isSelected);
394
+ window.MindMapNodes?.syncImageMidLodDecorations?.(group, width, height, baseRenderOrder, isSelected);
395
+ }
396
+
397
+ // Tail
398
398
  const tailGeometry = new THREE.PlaneGeometry(TAIL_HEIGHT * 2, TAIL_HEIGHT);
399
399
  let tailMaterial;
400
400
  if (isCss3dNode && !active?.tail) {
@@ -456,33 +456,33 @@
456
456
  // ▲▲▲ [Changed] ▲▲▲
457
457
 
458
458
  group.position.set(nodeModel.positionX, nodeModel.positionY, zPos);
459
- group.userData = { worldWidth: width, worldHeight: height, nodeId: nodeModel.id, baseRenderOrder };
460
- return group;
461
- }
462
- }
463
-
464
- function createDeferredNodeShell(nodeModel, width, height, zPos = 0, baseRenderOrder = 0) {
465
- const group = new THREE.Group();
466
- group.position.set(nodeModel.positionX || 0, nodeModel.positionY || 0, zPos);
467
- group.visible = false;
468
- group.userData = {
469
- worldWidth: width,
470
- worldHeight: height,
471
- nodeId: nodeModel.id,
472
- baseRenderOrder,
473
- isDeferredShell: true,
474
- spatialGridKeys: new Set()
475
- };
476
- return group;
477
- }
478
-
479
- // Expose MindMapObjectManager globally
480
- window.MindMapObjectManager = {
481
- createOrUpdateCanvasTextureNode: createOrUpdateCanvasTextureNode,
482
- createDeferredNodeShell: createDeferredNodeShell,
483
- getMemoWebglTheme: getMemoWebglTheme,
484
- createRoundedRectFilledGeometry: createRoundedRectFilledGeometry // For scrollbar resize in pipeline
485
- };
459
+ group.userData = { worldWidth: width, worldHeight: height, nodeId: nodeModel.id, baseRenderOrder };
460
+ return group;
461
+ }
462
+ }
463
+
464
+ function createDeferredNodeShell(nodeModel, width, height, zPos = 0, baseRenderOrder = 0) {
465
+ const group = new THREE.Group();
466
+ group.position.set(nodeModel.positionX || 0, nodeModel.positionY || 0, zPos);
467
+ group.visible = false;
468
+ group.userData = {
469
+ worldWidth: width,
470
+ worldHeight: height,
471
+ nodeId: nodeModel.id,
472
+ baseRenderOrder,
473
+ isDeferredShell: true,
474
+ spatialGridKeys: new Set()
475
+ };
476
+ return group;
477
+ }
478
+
479
+ // Expose MindMapObjectManager globally
480
+ window.MindMapObjectManager = {
481
+ createOrUpdateCanvasTextureNode: createOrUpdateCanvasTextureNode,
482
+ createDeferredNodeShell: createDeferredNodeShell,
483
+ getMemoWebglTheme: getMemoWebglTheme,
484
+ createRoundedRectFilledGeometry: createRoundedRectFilledGeometry // For scrollbar resize in pipeline
485
+ };
486
486
 
487
487
  console.log('✅ mind-map-object-manager.js loaded (Rounded Outline)');
488
488
  })();