gitmaps 1.1.14 → 1.1.15

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/app/analytics.db CHANGED
Binary file
@@ -37,6 +37,7 @@ const VIEWPORT_MARGIN = 500;
37
37
  // LOD threshold: below this zoom level, use lightweight pill placeholders
38
38
  const LOD_ZOOM_THRESHOLD = 0.25;
39
39
  const LOW_ZOOM_MODE_STORAGE_KEY = 'gitmaps:detailMode';
40
+ const PREVIEW_HINT_SHOWN_KEY = 'gitmaps:previewModeHintShown';
40
41
 
41
42
  // Maximum deferred cards to materialize per animation frame
42
43
  // Prevents frame drops when zooming out then back in on huge repos
@@ -120,6 +121,21 @@ export function isPreviewModeForced() {
120
121
  return _detailMode === 'preview';
121
122
  }
122
123
 
124
+ function maybeShowPreviewModeHint() {
125
+ if (_detailMode !== 'preview') return;
126
+ try {
127
+ if (localStorage.getItem(PREVIEW_HINT_SHOWN_KEY) === 'true') return;
128
+ localStorage.setItem(PREVIEW_HINT_SHOWN_KEY, 'true');
129
+ } catch { }
130
+
131
+ setTimeout(() => {
132
+ try {
133
+ const { showToast } = require('./utils');
134
+ showToast('Preview mode: wheel scrolls card content · right rail shows scroll + diff markers · top-right switch returns to Classic', 'info');
135
+ } catch { }
136
+ }, 120);
137
+ }
138
+
123
139
  // ── Status colors for low-zoom cards
124
140
  const PILL_COLORS: Record<string, string> = {
125
141
  'ts': '#3178c6',
@@ -441,6 +457,7 @@ export function performViewportCulling(ctx: CanvasContext) {
441
457
  if (isChanged) pill.dataset.changed = 'true';
442
458
  ctx.canvas.appendChild(pill);
443
459
  pillCards.set(path, pill);
460
+ maybeShowPreviewModeHint();
444
461
  } else if (inView && pillCards.has(path)) {
445
462
  updatePillCardLayout(ctx, pillCards.get(path)!, zoom, !!isChanged);
446
463
  } else if (!inView && pillCards.has(path)) {
@@ -470,6 +487,7 @@ export function performViewportCulling(ctx: CanvasContext) {
470
487
  if (isChanged) pill.dataset.changed = 'true';
471
488
  ctx.canvas.appendChild(pill);
472
489
  pillCards.set(path, pill);
490
+ maybeShowPreviewModeHint();
473
491
  }
474
492
  } else {
475
493
  updatePillCardLayout(ctx, pillCards.get(path)!, zoom, card.dataset.changed === 'true');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitmaps",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "gitmaps": "cli.ts"