snapexcel 1.2.6 → 1.2.7

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": "snapexcel",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "Desktop Screenshot Logger for UI Testing - Capture any window including Android emulators",
5
5
  "main": "src/main.js",
6
6
  "bin": {
package/publish.sh ADDED
@@ -0,0 +1,5 @@
1
+ #!/bin/bash
2
+
3
+ # SnapExcel - Publish to npm script
4
+
5
+ git add . && git commit -m "fix: responsive layout, prevent focus stealing, UI improvements" && npm version patch && npm publish
package/src/main.js CHANGED
@@ -195,16 +195,20 @@ ipcMain.handle('start-region-capture', async () => {
195
195
  regionWindow.webContents.send('set-background', fullScreenshot, display.size);
196
196
  });
197
197
 
198
- // Function to restore main window properly
198
+ // Function to restore main window without stealing focus
199
199
  const restoreMainWindow = () => {
200
- if (mainWindow && mainWindowBounds) {
201
- // Use setTimeout to let the region window fully close first
200
+ if (mainWindow) {
201
+ // Just restore the window state without bringing it to foreground
202
+ // This prevents pulling user to SnapExcel window when they're on different screen
202
203
  setTimeout(() => {
203
- mainWindow.restore();
204
- mainWindow.setSize(mainWindowBounds.width, mainWindowBounds.height);
205
- mainWindow.setPosition(mainWindowBounds.x, mainWindowBounds.y);
206
- // Don't focus - let user continue with their app
207
- mainWindow.blur();
204
+ if (mainWindow.isMinimized()) {
205
+ // Use showInactive to restore without stealing focus
206
+ mainWindow.showInactive();
207
+ }
208
+ // Don't change size/position - keep window where it was
209
+ if (isAlwaysOnTop) {
210
+ mainWindow.setAlwaysOnTop(true);
211
+ }
208
212
  }, 100);
209
213
  }
210
214
  };
package/src/renderer.js CHANGED
@@ -733,6 +733,9 @@ async function captureScreenshot() {
733
733
 
734
734
  state.sheets[state.currentSheetIndex].screenshots.push(screenshot);
735
735
  saveState();
736
+
737
+ // Small delay to let window fully restore before updating UI
738
+ await new Promise(resolve => setTimeout(resolve, 100));
736
739
  updateUI();
737
740
  lastCaptureTime = Date.now();
738
741
 
@@ -798,6 +801,10 @@ async function captureRegion() {
798
801
 
799
802
  state.sheets[state.currentSheetIndex].screenshots.push(screenshot);
800
803
  saveState();
804
+
805
+ // Small delay to let window fully restore before updating UI
806
+ await new Promise(resolve => setTimeout(resolve, 100));
807
+
801
808
  // Don't call updateUI() which might resize the window - just update the grid
802
809
  updateScreenshotsGrid(state.sheets[state.currentSheetIndex].screenshots);
803
810
  elements.screenshotCount.textContent = state.sheets[state.currentSheetIndex].screenshots.length;
package/src/styles.css CHANGED
@@ -47,8 +47,7 @@ body {
47
47
  .app-container {
48
48
  display: flex;
49
49
  flex-direction: column;
50
- min-height: 100vh;
51
- max-height: 100vh;
50
+ height: 100vh;
52
51
  overflow: hidden;
53
52
  }
54
53
 
@@ -159,7 +158,9 @@ body {
159
158
  display: flex;
160
159
  flex-direction: column;
161
160
  overflow-y: auto;
161
+ overflow-x: hidden;
162
162
  padding: 16px;
163
+ flex: 1;
163
164
  }
164
165
 
165
166
  .view.hidden {
@@ -534,6 +535,9 @@ body {
534
535
  border-radius: 5px;
535
536
  border: 0.5px solid rgba(4, 30, 66, 0.04);
536
537
  padding: 5px;
538
+ flex: 1;
539
+ min-height: 100px;
540
+ overflow: hidden;
537
541
  }
538
542
 
539
543
  .section-header {
@@ -559,14 +563,16 @@ body {
559
563
 
560
564
  .screenshots-grid {
561
565
  display: grid;
562
- grid-template-columns: repeat(4, 1fr);
566
+ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
567
+ grid-auto-rows: min-content;
568
+ align-content: start;
563
569
  gap: 8px;
564
570
  overflow-y: auto;
565
571
  padding: 5px;
566
572
  background: rgba(255, 255, 255, 0.5);
567
573
  border-radius: 3px;
574
+ flex: 1;
568
575
  min-height: 70px;
569
- max-height: 200px;
570
576
  }
571
577
 
572
578
  /* Ultra thin scrollbar - both vertical and horizontal */