@mindexec/cli 0.2.287 → 0.2.288

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mindexec/cli",
3
- "version": "0.2.287",
3
+ "version": "0.2.288",
4
4
  "description": "MindExec local runtime and bridge CLI",
5
5
  "main": "server.js",
6
6
  "type": "module",
@@ -5,7 +5,7 @@
5
5
  const DEBUG = false;
6
6
  const FPS_DEBUG = false;
7
7
  const FRAME_PERF_DEBUG = false;
8
- const MINDMAP_CORE_BUILD_ID = '20260620-css3d-flat-wheel-v733';
8
+ const MINDMAP_CORE_BUILD_ID = '20260620-css3d-flat-wheel-v734';
9
9
  const CanvasPhase = Object.freeze({
10
10
  Booting: 'booting',
11
11
  BoardFileLoading: 'board-file-loading',
@@ -4099,24 +4099,49 @@ ${summaryLines.map(line => `<div>${escapeNodeFrameDebugHtml(line)}</div>`).join(
4099
4099
 
4100
4100
  const roundedX = Math.round(nextX * 2) / 2;
4101
4101
  const roundedY = Math.round(nextY * 2) / 2;
4102
- if (this._lastSnapGridClientX === roundedX &&
4103
- this._lastSnapGridClientY === roundedY) {
4102
+ const previousX = this._lastSnapGridClientX;
4103
+ const previousY = this._lastSnapGridClientY;
4104
+ this._lastSnapGridClientX = roundedX;
4105
+ this._lastSnapGridClientY = roundedY;
4106
+
4107
+ const fallbackGrid = Math.max(1, Number(this.GRID_SIZE || 10));
4108
+ let pointerSnapKey = `screen:${Math.round(roundedX / fallbackGrid)}|${Math.round(roundedY / fallbackGrid)}`;
4109
+ if (this.container && this.camera?.isPerspectiveCamera) {
4110
+ const viewportMetrics = getCachedViewportMetrics(this);
4111
+ const width = Math.max(1, Number(viewportMetrics.width || 0));
4112
+ const height = Math.max(1, Number(viewportMetrics.height || 0));
4113
+ const left = Number(viewportMetrics.left || 0);
4114
+ const top = Number(viewportMetrics.top || 0);
4115
+ const centerX = Math.max(0, Math.min(width, roundedX - left));
4116
+ const centerY = Math.max(0, Math.min(height, roundedY - top));
4117
+ const snappedCenter = this._getLocalSnapGridSnappedScreenCenter(centerX, centerY, width, height, this.camera);
4118
+ pointerSnapKey = snappedCenter.snapKey || pointerSnapKey;
4119
+ }
4120
+
4121
+ if (this._lastLocalSnapGridPointerSnapKey === pointerSnapKey) {
4104
4122
  return false;
4105
4123
  }
4106
4124
 
4107
- this._lastSnapGridClientX = roundedX;
4108
- this._lastSnapGridClientY = roundedY;
4125
+ this._lastLocalSnapGridPointerSnapKey = pointerSnapKey;
4109
4126
  this._localSnapGridPointerRevision = Math.max(0, Number(this._localSnapGridPointerRevision || 0)) + 1;
4110
4127
  this._lastLocalSnapGridTransformKey = '';
4128
+ if (previousX !== roundedX || previousY !== roundedY) {
4129
+ this._lastLocalSnapGridClientMovedAt =
4130
+ typeof performance !== 'undefined' && typeof performance.now === 'function'
4131
+ ? performance.now()
4132
+ : Date.now();
4133
+ }
4111
4134
  return true;
4112
4135
  }
4113
4136
 
4114
4137
  _getLocalSnapGridSnappedScreenCenter(rawCenterX, rawCenterY, width, height, camera = null) {
4115
4138
  const safeWidth = Math.max(1, Number(width || 0));
4116
4139
  const safeHeight = Math.max(1, Number(height || 0));
4140
+ const fallbackGrid = Math.max(1, Number(this.GRID_SIZE || 10));
4117
4141
  const fallback = {
4118
4142
  centerX: Math.max(0, Math.min(safeWidth, Number(rawCenterX || 0))),
4119
- centerY: Math.max(0, Math.min(safeHeight, Number(rawCenterY || 0)))
4143
+ centerY: Math.max(0, Math.min(safeHeight, Number(rawCenterY || 0))),
4144
+ snapKey: `screen:${Math.round(Number(rawCenterX || 0) / fallbackGrid)}|${Math.round(Number(rawCenterY || 0) / fallbackGrid)}`
4120
4145
  };
4121
4146
  const activeCamera = camera || this.camera;
4122
4147
  if (!activeCamera?.isPerspectiveCamera) {
@@ -4135,7 +4160,7 @@ ${summaryLines.map(line => `<div>${escapeNodeFrameDebugHtml(line)}</div>`).join(
4135
4160
  const cameraY = Number(activeCamera.position?.y || 0);
4136
4161
  const worldX = cameraX + ((fallback.centerX / safeWidth) - 0.5) * viewWidth;
4137
4162
  const worldY = cameraY + (0.5 - (fallback.centerY / safeHeight)) * viewHeight;
4138
- const grid = Math.max(1, Number(this.GRID_SIZE || 10));
4163
+ const grid = fallbackGrid;
4139
4164
  const snappedWorldX = Math.round(worldX / grid) * grid;
4140
4165
  const snappedWorldY = Math.round(worldY / grid) * grid;
4141
4166
  const snappedCenterX = (((snappedWorldX - cameraX) / viewWidth) + 0.5) * safeWidth;
@@ -4143,7 +4168,8 @@ ${summaryLines.map(line => `<div>${escapeNodeFrameDebugHtml(line)}</div>`).join(
4143
4168
 
4144
4169
  return {
4145
4170
  centerX: Math.max(0, Math.min(safeWidth, snappedCenterX)),
4146
- centerY: Math.max(0, Math.min(safeHeight, snappedCenterY))
4171
+ centerY: Math.max(0, Math.min(safeHeight, snappedCenterY)),
4172
+ snapKey: `world:${Math.round(snappedWorldX / grid)}|${Math.round(snappedWorldY / grid)}`
4147
4173
  };
4148
4174
  }
4149
4175
 
@@ -1,5 +1,5 @@
1
1
  self.assetsManifest = {
2
- "version": "NBKXAh9r",
2
+ "version": "ToI1beX6",
3
3
  "assets": [
4
4
  {
5
5
  "hash": "sha256-+CSYMcqLNTsq3VnH11jgYyOCCdxvHzL74CBmo4sCmMU=",
@@ -78,7 +78,7 @@
78
78
  "url": "_content/MindExecution.Shared/js/marked.min.js"
79
79
  },
80
80
  {
81
- "hash": "sha256-T5U73XnB115kBUoRwO/5xm+idlSbeNKTOmEj27Y3wmA=",
81
+ "hash": "sha256-QITE2bVrNgLnaeels2LD0jTvsuO0skzETdnVSQylZwg=",
82
82
  "url": "_content/MindExecution.Shared/js/mind-map-core.js"
83
83
  },
84
84
  {
@@ -1,4 +1,4 @@
1
- /* Manifest version: NBKXAh9r */
1
+ /* Manifest version: ToI1beX6 */
2
2
  // Hosted deployments should prefer the network over stale offline caches.
3
3
  // This service worker immediately clears old Blazor offline caches and unregisters itself.
4
4