node-mac-recorder 2.5.9 → 2.6.0

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": "node-mac-recorder",
3
- "version": "2.5.9",
3
+ "version": "2.6.0",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -62,27 +62,18 @@ bool hideScreenRecordingPreview();
62
62
  // Ensure no borders or decorations
63
63
  self.layer.borderWidth = 0.0;
64
64
  self.layer.cornerRadius = 0.0;
65
- self.layer.borderColor = [[NSColor clearColor] CGColor];
66
- self.layer.shadowOpacity = 0.0;
67
- self.layer.shadowRadius = 0.0;
68
- self.layer.shadowOffset = NSMakeSize(0, 0);
69
- self.layer.masksToBounds = YES;
70
-
71
- // Disable focus ring and other default behaviors
72
- [self setFocusRingType:NSFocusRingTypeNone];
73
65
  }
74
66
  return self;
75
67
  }
76
68
 
77
69
  - (void)drawRect:(NSRect)dirtyRect {
78
- // Don't call super to avoid any default drawing
79
- // [super drawRect:dirtyRect];
70
+ [super drawRect:dirtyRect];
80
71
 
81
72
  if (!self.windowInfo) return;
82
73
 
83
- // No background fill - completely transparent overlay
84
- // [[NSColor colorWithRed:0.5 green:0.5 blue:0.5 alpha:0.15] setFill];
85
- // NSRectFill(self.bounds);
74
+ // Background with transparency - purple tone (no border)
75
+ [[NSColor colorWithRed:0.5 green:0.3 blue:0.8 alpha:0.25] setFill];
76
+ NSRectFill(self.bounds);
86
77
 
87
78
  // Ensure no borders or frames are drawn
88
79
  // Text will be handled by separate label above button
@@ -105,14 +96,6 @@ bool hideScreenRecordingPreview();
105
96
  // Ensure no borders or decorations
106
97
  self.layer.borderWidth = 0.0;
107
98
  self.layer.cornerRadius = 0.0;
108
- self.layer.borderColor = [[NSColor clearColor] CGColor];
109
- self.layer.shadowOpacity = 0.0;
110
- self.layer.shadowRadius = 0.0;
111
- self.layer.shadowOffset = NSMakeSize(0, 0);
112
- self.layer.masksToBounds = YES;
113
-
114
- // Disable focus ring and other default behaviors
115
- [self setFocusRingType:NSFocusRingTypeNone];
116
99
  }
117
100
  return self;
118
101
  }
@@ -168,28 +151,19 @@ bool hideScreenRecordingPreview();
168
151
  // Ensure no borders or decorations
169
152
  self.layer.borderWidth = 0.0;
170
153
  self.layer.cornerRadius = 0.0;
171
- self.layer.borderColor = [[NSColor clearColor] CGColor];
172
- self.layer.shadowOpacity = 0.0;
173
- self.layer.shadowRadius = 0.0;
174
- self.layer.shadowOffset = NSMakeSize(0, 0);
175
- self.layer.masksToBounds = YES;
176
-
177
- // Disable focus ring and other default behaviors
178
- [self setFocusRingType:NSFocusRingTypeNone];
179
154
  }
180
155
  return self;
181
156
  }
182
157
 
183
158
  - (void)drawRect:(NSRect)dirtyRect {
184
- // Don't call super to avoid any default drawing
185
- // [super drawRect:dirtyRect];
159
+ [super drawRect:dirtyRect];
186
160
 
187
161
  if (!self.screenInfo) return;
188
162
 
189
- // No background fill - completely transparent overlay
163
+ // Background with transparency - purple tone (no border)
190
164
  // Ensure no borders or frames are drawn
191
- // [[NSColor colorWithRed:0.5 green:0.5 blue:0.5 alpha:0.2] setFill];
192
- // NSRectFill(self.bounds);
165
+ [[NSColor colorWithRed:0.5 green:0.3 blue:0.8 alpha:0.3] setFill];
166
+ NSRectFill(self.bounds);
193
167
 
194
168
  // Text will be handled by separate label above button
195
169
  }
@@ -549,7 +523,7 @@ void updateOverlay() {
549
523
  [appIconView setWantsLayer:YES];
550
524
  [appIconView.layer setCornerRadius:8.0];
551
525
  [appIconView.layer setMasksToBounds:YES];
552
- [appIconView.layer setBackgroundColor:[[NSColor colorWithRed:0.2 green:0.2 blue:0.1 alpha:0.3] CGColor]]; // Debug background
526
+ [appIconView.layer setBackgroundColor:[[NSColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:0.3] CGColor]]; // Debug background
553
527
  [g_overlayWindow.contentView addSubview:appIconView];
554
528
  NSLog(@"🖼️ Created app icon view at frame: (%.0f, %.0f, %.0f, %.0f)",
555
529
  appIconView.frame.origin.x, appIconView.frame.origin.y,
@@ -755,11 +729,6 @@ bool showRecordingPreview(NSDictionary *windowInfo) {
755
729
  [g_recordingPreviewWindow setMovable:NO];
756
730
  [g_recordingPreviewWindow setMovableByWindowBackground:NO];
757
731
 
758
- // Additional window styling to completely remove borders
759
- [g_recordingPreviewWindow setToolbar:nil];
760
- [g_recordingPreviewWindow setShowsResizeIndicator:NO];
761
- [g_recordingPreviewWindow setShowsToolbarButton:NO];
762
-
763
732
  // Create preview view
764
733
  g_recordingPreviewView = [[RecordingPreviewView alloc] initWithFrame:screenFrame];
765
734
  [(RecordingPreviewView *)g_recordingPreviewView setRecordingWindowInfo:windowInfo];
@@ -873,18 +842,11 @@ bool startScreenSelection() {
873
842
  [overlayWindow setMovable:NO];
874
843
  [overlayWindow setMovableByWindowBackground:NO];
875
844
 
876
-
877
-
878
845
  // Create overlay view
879
846
  ScreenSelectorOverlayView *overlayView = [[ScreenSelectorOverlayView alloc] initWithFrame:screenFrame];
880
847
  [overlayView setScreenInfo:screenInfo];
881
848
  [overlayWindow setContentView:overlayView];
882
849
 
883
- // Additional window styling to completely remove borders
884
- [overlayWindow setToolbar:nil];
885
- [overlayWindow setShowsResizeIndicator:NO];
886
- [overlayWindow setShowsToolbarButton:NO];
887
-
888
850
  // Create select button with more padding
889
851
  NSButton *selectButton = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 200, 60)];
890
852
  [selectButton setTitle:@"Start Record"];
@@ -895,7 +857,7 @@ bool startScreenSelection() {
895
857
 
896
858
  // Modern button styling with purple tone
897
859
  [selectButton setWantsLayer:YES];
898
- [selectButton.layer setBackgroundColor:[[NSColor colorWithRed:0.55 green:0.3 blue:0.3 alpha:0.95] CGColor]];
860
+ [selectButton.layer setBackgroundColor:[[NSColor colorWithRed:0.55 green:0.3 blue:0.75 alpha:0.95] CGColor]];
899
861
  [selectButton.layer setCornerRadius:8.0];
900
862
  [selectButton.layer setBorderWidth:0.0];
901
863
 
@@ -937,7 +899,7 @@ bool startScreenSelection() {
937
899
 
938
900
  // Modern cancel button styling - darker gray, clean
939
901
  [screenCancelButton setWantsLayer:YES];
940
- [screenCancelButton.layer setBackgroundColor:[[NSColor colorWithRed:0.35 green:0.35 blue:0.2 alpha:0.9] CGColor]];
902
+ [screenCancelButton.layer setBackgroundColor:[[NSColor colorWithRed:0.35 green:0.35 blue:0.4 alpha:0.9] CGColor]];
941
903
  [screenCancelButton.layer setCornerRadius:8.0];
942
904
  [screenCancelButton.layer setBorderWidth:0.0];
943
905
 
@@ -1129,11 +1091,6 @@ bool showScreenRecordingPreview(NSDictionary *screenInfo) {
1129
1091
  [overlayWindow setMovable:NO];
1130
1092
  [overlayWindow setMovableByWindowBackground:NO];
1131
1093
 
1132
- // Additional window styling to completely remove borders
1133
- [overlayWindow setToolbar:nil];
1134
- [overlayWindow setShowsResizeIndicator:NO];
1135
- [overlayWindow setShowsToolbarButton:NO];
1136
-
1137
1094
  [overlayWindow orderFront:nil];
1138
1095
  [overlayWindow makeKeyAndOrderFront:nil];
1139
1096
 
@@ -1197,24 +1154,13 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1197
1154
  [g_overlayWindow setMovable:NO];
1198
1155
  [g_overlayWindow setMovableByWindowBackground:NO];
1199
1156
 
1200
- // Additional window styling to completely remove borders
1201
- [g_overlayWindow setToolbar:nil];
1202
- [g_overlayWindow setShowsResizeIndicator:NO];
1203
- [g_overlayWindow setShowsToolbarButton:NO];
1204
-
1205
1157
  // Create overlay view
1206
1158
  g_overlayView = [[WindowSelectorOverlayView alloc] initWithFrame:initialFrame];
1207
1159
  [g_overlayWindow setContentView:g_overlayView];
1208
1160
 
1209
- // Ensure view layer has no borders
1210
- [g_overlayView setWantsLayer:YES];
1211
- [g_overlayView.layer setBorderWidth:0.0];
1212
- [g_overlayView.layer setCornerRadius:0.0];
1213
- [g_overlayView.layer setMasksToBounds:YES];
1214
- [g_overlayView.layer setBorderColor:[[NSColor clearColor] CGColor]];
1215
- [g_overlayView.layer setShadowOpacity:0.0];
1216
- [g_overlayView.layer setShadowRadius:0.0];
1217
- [g_overlayView.layer setShadowOffset:NSMakeSize(0, 0)];
1161
+ // Additional window styling to ensure no borders or decorations
1162
+ [g_overlayWindow setMovable:NO];
1163
+ [g_overlayWindow setMovableByWindowBackground:NO];
1218
1164
 
1219
1165
  // Create select button with purple theme
1220
1166
  g_selectButton = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 200, 60)];
@@ -1225,7 +1171,7 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1225
1171
 
1226
1172
  // Modern button styling with purple tone
1227
1173
  [g_selectButton setWantsLayer:YES];
1228
- [g_selectButton.layer setBackgroundColor:[[NSColor colorWithRed:0.55 green:0.3 blue:0.3 alpha:0.95] CGColor]];
1174
+ [g_selectButton.layer setBackgroundColor:[[NSColor colorWithRed:0.55 green:0.3 blue:0.75 alpha:0.95] CGColor]];
1229
1175
  [g_selectButton.layer setCornerRadius:8.0];
1230
1176
  [g_selectButton.layer setBorderWidth:0.0];
1231
1177
 
@@ -1264,7 +1210,7 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1264
1210
 
1265
1211
  // Modern cancel button styling - darker gray, clean
1266
1212
  [cancelButton setWantsLayer:YES];
1267
- [cancelButton.layer setBackgroundColor:[[NSColor colorWithRed:0.35 green:0.35 blue:0.2 alpha:0.9] CGColor]];
1213
+ [cancelButton.layer setBackgroundColor:[[NSColor colorWithRed:0.35 green:0.35 blue:0.4 alpha:0.9] CGColor]];
1268
1214
  [cancelButton.layer setCornerRadius:8.0];
1269
1215
  [cancelButton.layer setBorderWidth:0.0];
1270
1216