snapexcel 1.1.0 → 1.2.1

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.1.0",
3
+ "version": "1.2.1",
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/src/index.html CHANGED
@@ -11,7 +11,16 @@
11
11
  <!-- Header -->
12
12
  <header class="header">
13
13
  <div class="logo">
14
- <span class="logo-icon">📸</span>
14
+ <div class="logo-icon-wrapper">
15
+ <svg class="logo-icon-svg" width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
16
+ <rect x="2" y="5" width="20" height="14" rx="2" stroke="white" stroke-width="1.5"/>
17
+ <circle cx="12" cy="12" r="3.5" stroke="white" stroke-width="1.5"/>
18
+ <circle cx="12" cy="12" r="1.5" fill="white"/>
19
+ <path d="M7 5V4C7 3.44772 7.44772 3 8 3H10" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
20
+ <circle cx="17" cy="8" r="1" fill="#FFC107"/>
21
+ <path d="M2 8H4" stroke="white" stroke-width="1.5" stroke-linecap="round"/>
22
+ </svg>
23
+ </div>
15
24
  <h1>Screenshot Logger</h1>
16
25
  </div>
17
26
  <div class="header-actions">
@@ -39,8 +48,8 @@
39
48
  <path d="M13 15.5H16V18H13" stroke="#217346" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
40
49
  </svg>
41
50
  </div>
42
- <h2>Start New Session</h2>
43
- <p>Capture screenshots and export to Excel</p>
51
+ <h2>New Capture Session</h2>
52
+ <p>Document your workflow with screenshots</p>
44
53
 
45
54
  <div class="form-group">
46
55
  <label for="file-name">Excel File Name</label>
@@ -53,15 +62,28 @@
53
62
  </div>
54
63
 
55
64
  <button id="btn-start-session" class="btn btn-primary btn-large">
56
- Start Session
65
+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="margin-right: 6px;">
66
+ <circle cx="12" cy="12" r="9" stroke="white" stroke-width="2"/>
67
+ <circle cx="12" cy="12" r="3" fill="white"/>
68
+ <path d="M12 5V3" stroke="white" stroke-width="2" stroke-linecap="round"/>
69
+ <path d="M12 21V19" stroke="white" stroke-width="2" stroke-linecap="round"/>
70
+ <path d="M5 12H3" stroke="white" stroke-width="2" stroke-linecap="round"/>
71
+ <path d="M21 12H19" stroke="white" stroke-width="2" stroke-linecap="round"/>
72
+ </svg>
73
+ Start Capturing
57
74
  </button>
58
75
 
59
76
  <div class="divider-text">
60
77
  <span>or</span>
61
78
  </div>
62
79
 
63
- <button id="btn-import-excel" class="btn btn-secondary btn-large">
64
- 📂 Import Existing Excel
80
+ <button id="btn-import-excel" class="btn-import-excel">
81
+ <svg class="btn-import-icon" width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
82
+ <path d="M14 2H6C4.89543 2 4 2.89543 4 4V20C4 21.1046 4.89543 22 6 22H18C19.1046 22 20 21.1046 20 20V8L14 2Z" fill="white" stroke="white" stroke-width="0.5"/>
83
+ <path d="M14 2V8H20" fill="rgba(255,255,255,0.8)" stroke="white" stroke-width="0.5"/>
84
+ <text x="12" y="16" text-anchor="middle" fill="#185c37" font-size="7" font-weight="bold" font-family="Arial">XLS</text>
85
+ </svg>
86
+ Open Excel
65
87
  </button>
66
88
  </div>
67
89
  </div>
package/src/renderer.js CHANGED
@@ -299,6 +299,14 @@ function setupEventListeners() {
299
299
  elements.btnCancelNote.addEventListener('click', closeNoteModal);
300
300
  elements.btnSaveNote.addEventListener('click', saveNote);
301
301
 
302
+ // Save note on Ctrl+Enter or Cmd+Enter
303
+ elements.noteText.addEventListener('keydown', (e) => {
304
+ if (e.key === 'Enter' && (e.ctrlKey || e.metaKey)) {
305
+ e.preventDefault();
306
+ saveNote();
307
+ }
308
+ });
309
+
302
310
  // Preview Modal
303
311
  elements.btnPreviewClose.addEventListener('click', closePreview);
304
312
  elements.btnPreviewPrev.addEventListener('click', showPrevPreview);
@@ -1045,6 +1053,27 @@ function handlePreviewKeyboard(e) {
1045
1053
  // Only handle if preview is open
1046
1054
  if (state.previewIndex < 0) return;
1047
1055
 
1056
+ // Don't handle keyboard shortcuts if user is typing in an input or textarea
1057
+ const activeElement = document.activeElement;
1058
+ const isTyping = activeElement && (
1059
+ activeElement.tagName === 'INPUT' ||
1060
+ activeElement.tagName === 'TEXTAREA' ||
1061
+ activeElement.isContentEditable
1062
+ );
1063
+
1064
+ // If note modal is open, only handle Escape to close it
1065
+ if (!elements.noteModal.classList.contains('hidden')) {
1066
+ if (e.key === 'Escape') {
1067
+ closeNoteModal();
1068
+ e.preventDefault();
1069
+ }
1070
+ // Don't process other keys when note modal is open
1071
+ return;
1072
+ }
1073
+
1074
+ // If user is typing somewhere, don't intercept
1075
+ if (isTyping) return;
1076
+
1048
1077
  switch (e.key) {
1049
1078
  case 'Escape':
1050
1079
  closePreview();
@@ -1060,9 +1089,9 @@ function handlePreviewKeyboard(e) {
1060
1089
  openNoteFromPreview();
1061
1090
  break;
1062
1091
  case 'Delete':
1063
- case 'Backspace':
1064
1092
  deleteFromPreview();
1065
1093
  break;
1094
+ // Don't capture Backspace - it's used for typing
1066
1095
  }
1067
1096
  }
1068
1097
 
@@ -1617,10 +1646,11 @@ async function generateXLSX() {
1617
1646
  // xl/styles.xml - Dark Blue Corporate Theme with timestamp style
1618
1647
  zip.file('xl/styles.xml', `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
1619
1648
  <styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
1620
- <fonts count="3">
1649
+ <fonts count="4">
1621
1650
  <font><sz val="11"/><name val="Calibri"/></font>
1622
1651
  <font><b/><sz val="11"/><color rgb="FFFFFFFF"/><name val="Calibri"/></font>
1623
1652
  <font><sz val="10"/><color rgb="FF666666"/><name val="Calibri"/></font>
1653
+ <font><sz val="16"/><name val="Calibri"/></font>
1624
1654
  </fonts>
1625
1655
  <fills count="3">
1626
1656
  <fill><patternFill patternType="none"/></fill>
@@ -1632,11 +1662,12 @@ async function generateXLSX() {
1632
1662
  <border><left style="thin"><color rgb="FF041E42"/></left><right style="thin"><color rgb="FF041E42"/></right><top style="thin"><color rgb="FF041E42"/></top><bottom style="thin"><color rgb="FF041E42"/></bottom></border>
1633
1663
  </borders>
1634
1664
  <cellStyleXfs count="1"><xf/></cellStyleXfs>
1635
- <cellXfs count="4">
1665
+ <cellXfs count="5">
1636
1666
  <xf/>
1637
1667
  <xf fontId="1" fillId="2" borderId="1" applyFont="1" applyFill="1" applyBorder="1" applyAlignment="1"><alignment horizontal="center" vertical="center"/></xf>
1638
1668
  <xf borderId="1" applyBorder="1" applyAlignment="1"><alignment vertical="top" wrapText="1"/></xf>
1639
1669
  <xf fontId="2" borderId="1" applyFont="1" applyBorder="1" applyAlignment="1"><alignment vertical="top" wrapText="1"/></xf>
1670
+ <xf fontId="3" borderId="1" applyFont="1" applyBorder="1" applyAlignment="1"><alignment vertical="top" wrapText="1"/></xf>
1640
1671
  </cellXfs>
1641
1672
  </styleSheet>`);
1642
1673
 
@@ -1707,12 +1738,12 @@ async function generateXLSX() {
1707
1738
  // Row height: 540 for landscape (~7.5 inches), 720 for portrait (~10 inches)
1708
1739
  const rowHeight = isPortrait ? 720 : 540;
1709
1740
 
1710
- // Timestamp shown at top of cell B (above image), Notes in column C
1741
+ // Timestamp shown at top of cell B (above image), Notes in column C with 16pt font
1711
1742
  sheetXml += `
1712
1743
  <row r="${rowNum}" ht="${rowHeight}" customHeight="1">
1713
1744
  <c r="A${rowNum}" s="2"><v>${i + 1}</v></c>
1714
1745
  <c r="B${rowNum}" s="3" t="s"><v>${stringIndex[timestamp]}</v></c>
1715
- <c r="C${rowNum}" s="2" t="s"><v>${stringIndex[notes]}</v></c>
1746
+ <c r="C${rowNum}" s="4" t="s"><v>${stringIndex[notes]}</v></c>
1716
1747
  </row>`;
1717
1748
  }
1718
1749
 
package/src/styles.css CHANGED
@@ -66,17 +66,36 @@ body {
66
66
  .logo {
67
67
  display: flex;
68
68
  align-items: center;
69
- gap: 8px;
69
+ gap: 10px;
70
70
  }
71
71
 
72
- .logo-icon {
73
- font-size: 20px;
72
+ .logo-icon-wrapper {
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ width: 38px;
77
+ height: 38px;
78
+ background: rgba(255, 255, 255, 0.15);
79
+ border-radius: 10px;
80
+ backdrop-filter: blur(4px);
81
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
82
+ transition: all 0.3s ease;
83
+ }
84
+
85
+ .logo-icon-wrapper:hover {
86
+ background: rgba(255, 255, 255, 0.25);
87
+ transform: scale(1.05);
88
+ }
89
+
90
+ .logo-icon-svg {
91
+ filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
74
92
  }
75
93
 
76
94
  .logo h1 {
77
- font-size: 15px;
95
+ font-size: 16px;
78
96
  font-weight: 600;
79
97
  letter-spacing: -0.3px;
98
+ text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
80
99
  }
81
100
 
82
101
  .header-actions {
@@ -862,7 +881,7 @@ body {
862
881
  align-items: center;
863
882
  width: 100%;
864
883
  max-width: 280px;
865
- margin: 16px 0;
884
+ margin: 20px 0 16px 0;
866
885
  }
867
886
 
868
887
  .divider-text::before,
@@ -879,6 +898,41 @@ body {
879
898
  font-size: 12px;
880
899
  }
881
900
 
901
+ /* Import Excel Button - Rich Excel Green Theme */
902
+ .btn-import-excel {
903
+ display: inline-flex;
904
+ align-items: center;
905
+ justify-content: center;
906
+ gap: 10px;
907
+ width: 100%;
908
+ max-width: 280px;
909
+ padding: 14px 28px;
910
+ background: linear-gradient(135deg, #217346 0%, #185c37 100%);
911
+ border: none;
912
+ border-radius: 10px;
913
+ color: white;
914
+ font-size: 15px;
915
+ font-weight: 600;
916
+ cursor: pointer;
917
+ transition: all 0.25s ease;
918
+ box-shadow: 0 3px 10px rgba(33, 115, 70, 0.35);
919
+ }
920
+
921
+ .btn-import-excel:hover {
922
+ background: linear-gradient(135deg, #28a745 0%, #217346 100%);
923
+ transform: translateY(-2px);
924
+ box-shadow: 0 6px 16px rgba(33, 115, 70, 0.45);
925
+ }
926
+
927
+ .btn-import-excel:active {
928
+ transform: translateY(0);
929
+ box-shadow: 0 3px 10px rgba(33, 115, 70, 0.35);
930
+ }
931
+
932
+ .btn-import-icon {
933
+ flex-shrink: 0;
934
+ }
935
+
882
936
  /* Fullscreen Preview Modal */
883
937
  .preview-modal {
884
938
  position: fixed;