node-mac-recorder 2.10.22 → 2.10.24

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.10.22",
3
+ "version": "2.10.24",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -108,29 +108,19 @@ void updateScreenOverlays();
108
108
  xRadius:8.0
109
109
  yRadius:8.0];
110
110
 
111
- // Fill color and border based on toggle state
111
+ // Fill color only - no border
112
112
  NSColor *fillColor;
113
- NSColor *strokeColor;
114
- CGFloat lineWidth;
115
113
 
116
114
  if (self.isToggled) {
117
- // Locked state: same 1px border but different color
118
- fillColor = [NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.4];
119
- strokeColor = [NSColor colorWithRed:0.45 green:0.25 blue:0.75 alpha:0.9];
120
- lineWidth = 1.0;
115
+ // Locked state: slightly different opacity
116
+ fillColor = [NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.5];
121
117
  } else {
122
- // Normal state: 1px border
118
+ // Normal state: standard fill
123
119
  fillColor = [NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.4];
124
- strokeColor = [NSColor whiteColor];
125
- lineWidth = 1.0;
126
120
  }
127
121
 
128
122
  [fillColor setFill];
129
123
  [highlightPath fill];
130
-
131
- [strokeColor setStroke];
132
- [highlightPath setLineWidth:lineWidth];
133
- [highlightPath stroke];
134
124
  }
135
125
 
136
126
  - (void)updateAppearance {
@@ -201,6 +191,9 @@ void updateScreenOverlays();
201
191
  self = [super initWithFrame:frameRect];
202
192
  if (self) {
203
193
  self.isHovered = NO;
194
+ self.wantsLayer = YES;
195
+ // Set anchor point to center once for consistent scaling
196
+ self.layer.anchorPoint = CGPointMake(0.5, 0.5);
204
197
  [self setupHoverTracking];
205
198
  }
206
199
  return self;
@@ -217,18 +210,15 @@ void updateScreenOverlays();
217
210
 
218
211
  - (void)mouseEntered:(NSEvent *)event {
219
212
  self.isHovered = YES;
220
- [self animateScale:1.2 duration:0.15];
213
+ [[NSCursor pointingHandCursor] set];
221
214
  }
222
215
 
223
216
  - (void)mouseExited:(NSEvent *)event {
224
217
  self.isHovered = NO;
225
- [self animateScale:1.0 duration:0.15];
218
+ [[NSCursor arrowCursor] set];
226
219
  }
227
220
 
228
221
  - (void)animateScale:(CGFloat)scale duration:(NSTimeInterval)duration {
229
- // Set anchor point to center for center-based scaling
230
- self.layer.anchorPoint = CGPointMake(0.5, 0.5);
231
-
232
222
  [NSAnimationContext beginGrouping];
233
223
  [NSAnimationContext currentContext].duration = duration;
234
224
  [NSAnimationContext currentContext].timingFunction =
@@ -554,6 +544,9 @@ NSArray* getAllSelectableWindows() {
554
544
  if ([windowOwner isEqualToString:@"WindowServer"]) continue;
555
545
  if ([windowOwner isEqualToString:@"Dock"]) continue;
556
546
 
547
+ // Skip Electron windows (our own overlay)
548
+ if ([windowOwner containsString:@"Electron"] || [windowOwner containsString:@"node"]) continue;
549
+
557
550
  // Extract bounds
558
551
  int x = [[bounds objectForKey:@"X"] intValue];
559
552
  int y = [[bounds objectForKey:@"Y"] intValue];
@@ -590,6 +583,13 @@ NSDictionary* getWindowUnderCursor(CGPoint point) {
590
583
 
591
584
  // Find window that contains the cursor point
592
585
  for (NSDictionary *window in g_allWindows) {
586
+ NSString *appName = [window objectForKey:@"appName"];
587
+
588
+ // Skip Electron windows (our own overlay)
589
+ if (appName && ([appName containsString:@"Electron"] || [appName containsString:@"node"])) {
590
+ continue;
591
+ }
592
+
593
593
  int x = [[window objectForKey:@"x"] intValue];
594
594
  int y = [[window objectForKey:@"y"] intValue];
595
595
  int width = [[window objectForKey:@"width"] intValue];
@@ -1359,7 +1359,7 @@ bool startScreenSelection() {
1359
1359
 
1360
1360
  // Modern button styling with new RGB color
1361
1361
  [selectButton setWantsLayer:YES];
1362
- [selectButton.layer setBackgroundColor:[[NSColor colorWithRed:77.0/255.0 green:30.0/255.0 blue:231.0/255.0 alpha:0.95] CGColor]];
1362
+ [selectButton.layer setBackgroundColor:[[NSColor colorWithRed:90.0/255.0 green:50.0/255.0 blue:250.0/255.0 alpha:1.0] CGColor]];
1363
1363
  [selectButton.layer setCornerRadius:8.0];
1364
1364
  [selectButton.layer setBorderWidth:0.0];
1365
1365
 
@@ -1401,7 +1401,7 @@ bool startScreenSelection() {
1401
1401
 
1402
1402
  // Modern cancel button styling - darker gray, clean
1403
1403
  [screenCancelButton setWantsLayer:YES];
1404
- [screenCancelButton.layer setBackgroundColor:[[NSColor colorWithRed:0.35 green:0.35 blue:0.4 alpha:0.9] CGColor]];
1404
+ [screenCancelButton.layer setBackgroundColor:[[NSColor colorWithRed:0.4 green:0.4 blue:0.45 alpha:1.0] CGColor]];
1405
1405
  [screenCancelButton.layer setCornerRadius:8.0];
1406
1406
  [screenCancelButton.layer setBorderWidth:0.0];
1407
1407
 
@@ -1776,7 +1776,7 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1776
1776
 
1777
1777
  // Modern button styling with new RGB color
1778
1778
  [g_selectButton setWantsLayer:YES];
1779
- [g_selectButton.layer setBackgroundColor:[[NSColor colorWithRed:77.0/255.0 green:30.0/255.0 blue:231.0/255.0 alpha:0.95] CGColor]];
1779
+ [g_selectButton.layer setBackgroundColor:[[NSColor colorWithRed:90.0/255.0 green:50.0/255.0 blue:250.0/255.0 alpha:1.0] CGColor]];
1780
1780
  [g_selectButton.layer setCornerRadius:8.0];
1781
1781
  [g_selectButton.layer setBorderWidth:0.0];
1782
1782
 
@@ -1817,7 +1817,7 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1817
1817
 
1818
1818
  // Modern cancel button styling - darker gray, clean
1819
1819
  [cancelButton setWantsLayer:YES];
1820
- [cancelButton.layer setBackgroundColor:[[NSColor colorWithRed:0.35 green:0.35 blue:0.4 alpha:0.9] CGColor]];
1820
+ [cancelButton.layer setBackgroundColor:[[NSColor colorWithRed:0.4 green:0.4 blue:0.45 alpha:1.0] CGColor]];
1821
1821
  [cancelButton.layer setCornerRadius:8.0];
1822
1822
  [cancelButton.layer setBorderWidth:0.0];
1823
1823