node-mac-recorder 2.6.11 → 2.6.13

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.6.11",
3
+ "version": "2.6.13",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -120,6 +120,10 @@ void updateScreenOverlays();
120
120
  // Ensure no borders or decorations
121
121
  self.layer.borderWidth = 0.0;
122
122
  self.layer.cornerRadius = 0.0;
123
+ self.layer.masksToBounds = YES;
124
+ self.layer.shadowOpacity = 0.0;
125
+ self.layer.shadowRadius = 0.0;
126
+ self.layer.shadowOffset = NSMakeSize(0, 0);
123
127
  }
124
128
  return self;
125
129
  }
@@ -176,6 +180,10 @@ void updateScreenOverlays();
176
180
  // Ensure no borders or decorations
177
181
  self.layer.borderWidth = 0.0;
178
182
  self.layer.cornerRadius = 0.0;
183
+ self.layer.masksToBounds = YES;
184
+ self.layer.shadowOpacity = 0.0;
185
+ self.layer.shadowRadius = 0.0;
186
+ self.layer.shadowOffset = NSMakeSize(0, 0);
179
187
  self.isActiveScreen = NO;
180
188
  }
181
189
  return self;
@@ -542,6 +550,13 @@ void updateOverlay() {
542
550
  [infoLabel setFont:[NSFont systemFontOfSize:18 weight:NSFontWeightMedium]];
543
551
  [infoLabel setTextColor:[NSColor whiteColor]];
544
552
 
553
+ // Force no borders on info label
554
+ [infoLabel setWantsLayer:YES];
555
+ infoLabel.layer.borderWidth = 0.0;
556
+ infoLabel.layer.borderColor = [[NSColor clearColor] CGColor];
557
+ infoLabel.layer.cornerRadius = 0.0;
558
+ infoLabel.layer.masksToBounds = YES;
559
+
545
560
  [g_overlayWindow.contentView addSubview:infoLabel];
546
561
  }
547
562
 
@@ -561,6 +576,14 @@ void updateOverlay() {
561
576
  [appIconView.layer setCornerRadius:8.0];
562
577
  [appIconView.layer setMasksToBounds:YES];
563
578
  [appIconView.layer setBackgroundColor:[[NSColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:0.3] CGColor]]; // Debug background
579
+
580
+ // Force no borders on app icon view
581
+ appIconView.layer.borderWidth = 0.0;
582
+ appIconView.layer.borderColor = [[NSColor clearColor] CGColor];
583
+ appIconView.layer.shadowOpacity = 0.0;
584
+ appIconView.layer.shadowRadius = 0.0;
585
+ appIconView.layer.shadowOffset = NSMakeSize(0, 0);
586
+
564
587
  [g_overlayWindow.contentView addSubview:appIconView];
565
588
  NSLog(@"🖼️ Created app icon view at frame: (%.0f, %.0f, %.0f, %.0f)",
566
589
  appIconView.frame.origin.x, appIconView.frame.origin.y,
@@ -622,7 +645,7 @@ void updateOverlay() {
622
645
  CABasicAnimation *floatAnimationX = [CABasicAnimation animationWithKeyPath:@"transform.translation.x"];
623
646
  floatAnimationX.fromValue = @(-4.0);
624
647
  floatAnimationX.toValue = @(4.0);
625
- floatAnimationX.duration = 1.8; // Much faster animation
648
+ floatAnimationX.duration = 1.0; // Much faster animation
626
649
  floatAnimationX.repeatCount = HUGE_VALF;
627
650
  floatAnimationX.autoreverses = YES;
628
651
  floatAnimationX.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
@@ -658,6 +681,22 @@ void updateOverlay() {
658
681
  [g_overlayWindow orderFront:nil];
659
682
  [g_overlayWindow makeKeyAndOrderFront:nil];
660
683
 
684
+ // Ensure all subviews have no borders after positioning
685
+ for (NSView *subview in [g_overlayWindow.contentView subviews]) {
686
+ if ([subview respondsToSelector:@selector(setWantsLayer:)]) {
687
+ [subview setWantsLayer:YES];
688
+ if (subview.layer) {
689
+ subview.layer.borderWidth = 0.0;
690
+ subview.layer.borderColor = [[NSColor clearColor] CGColor];
691
+ subview.layer.cornerRadius = 0.0;
692
+ subview.layer.masksToBounds = YES;
693
+ subview.layer.shadowOpacity = 0.0;
694
+ subview.layer.shadowRadius = 0.0;
695
+ subview.layer.shadowOffset = NSMakeSize(0, 0);
696
+ }
697
+ }
698
+ }
699
+
661
700
  NSLog(@" ✅ Overlay Status: Level=%ld, Alpha=%.1f, Visible=%s, Frame Set=YES",
662
701
  [g_overlayWindow level], [g_overlayWindow alphaValue],
663
702
  [g_overlayWindow isVisible] ? "YES" : "NO");
@@ -849,12 +888,12 @@ void updateScreenOverlays() {
849
888
  NSButton *button = (NSButton *)subview;
850
889
  if ([button.title isEqualToString:@"Start Record"]) {
851
890
  if (isActiveScreen) {
852
- // Active screen: bright, prominent button
853
- [button.layer setBackgroundColor:[[NSColor colorWithRed:0.7 green:0.45 blue:0.9 alpha:1.0] CGColor]];
891
+ // Active screen: bright, prominent button with new RGB color
892
+ [button.layer setBackgroundColor:[[NSColor colorWithRed:77.0/255.0 green:30.0/255.0 blue:231.0/255.0 alpha:1.0] CGColor]];
854
893
  [button setAlphaValue:1.0];
855
894
  } else {
856
- // Inactive screen: dimmer button
857
- [button.layer setBackgroundColor:[[NSColor colorWithRed:0.4 green:0.25 blue:0.55 alpha:0.8] CGColor]];
895
+ // Inactive screen: dimmer button with new RGB color
896
+ [button.layer setBackgroundColor:[[NSColor colorWithRed:77.0/255.0 green:30.0/255.0 blue:231.0/255.0 alpha:0.6] CGColor]];
858
897
  [button setAlphaValue:0.7];
859
898
  }
860
899
  }
@@ -1037,11 +1076,23 @@ bool startScreenSelection() {
1037
1076
  [overlayWindow setMovable:NO];
1038
1077
  [overlayWindow setMovableByWindowBackground:NO];
1039
1078
 
1079
+ // Force remove all borders and decorations
1080
+ [overlayWindow setHasShadow:NO];
1081
+ [overlayWindow setOpaque:NO];
1082
+ [overlayWindow setBackgroundColor:[NSColor clearColor]];
1083
+
1040
1084
  // Create overlay view
1041
1085
  ScreenSelectorOverlayView *overlayView = [[ScreenSelectorOverlayView alloc] initWithFrame:screenFrame];
1042
1086
  [overlayView setScreenInfo:screenInfo];
1043
1087
  [overlayWindow setContentView:overlayView];
1044
1088
 
1089
+ // Force window layer to have no borders
1090
+ [overlayWindow setWantsLayer:YES];
1091
+ overlayWindow.layer.borderWidth = 0.0;
1092
+ overlayWindow.layer.borderColor = [[NSColor clearColor] CGColor];
1093
+ overlayWindow.layer.cornerRadius = 0.0;
1094
+ overlayWindow.layer.masksToBounds = YES;
1095
+
1045
1096
  // Create select button with more padding
1046
1097
  NSButton *selectButton = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 200, 60)];
1047
1098
  [selectButton setTitle:@"Start Record"];
@@ -1050,9 +1101,9 @@ bool startScreenSelection() {
1050
1101
  [selectButton setFont:[NSFont systemFontOfSize:16 weight:NSFontWeightRegular]];
1051
1102
  [selectButton setTag:i]; // Set screen index as tag
1052
1103
 
1053
- // Modern button styling with purple tone
1104
+ // Modern button styling with new RGB color
1054
1105
  [selectButton setWantsLayer:YES];
1055
- [selectButton.layer setBackgroundColor:[[NSColor colorWithRed:0.55 green:0.3 blue:0.75 alpha:0.95] CGColor]];
1106
+ [selectButton.layer setBackgroundColor:[[NSColor colorWithRed:77.0/255.0 green:30.0/255.0 blue:231.0/255.0 alpha:0.95] CGColor]];
1056
1107
  [selectButton.layer setCornerRadius:8.0];
1057
1108
  [selectButton.layer setBorderWidth:0.0];
1058
1109
 
@@ -1165,7 +1216,7 @@ bool startScreenSelection() {
1165
1216
  CABasicAnimation *screenFloatAnimationX = [CABasicAnimation animationWithKeyPath:@"transform.translation.x"];
1166
1217
  screenFloatAnimationX.fromValue = @(-4.0);
1167
1218
  screenFloatAnimationX.toValue = @(4.0);
1168
- screenFloatAnimationX.duration = 1.6; // Much faster animation
1219
+ screenFloatAnimationX.duration = 1.2; // Much faster animation
1169
1220
  screenFloatAnimationX.repeatCount = HUGE_VALF;
1170
1221
  screenFloatAnimationX.autoreverses = YES;
1171
1222
  screenFloatAnimationX.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
@@ -1328,9 +1379,21 @@ bool showScreenRecordingPreview(NSDictionary *screenInfo) {
1328
1379
  [overlayWindow setMovable:NO];
1329
1380
  [overlayWindow setMovableByWindowBackground:NO];
1330
1381
 
1382
+ // Force remove all borders and decorations
1383
+ [overlayWindow setHasShadow:NO];
1384
+ [overlayWindow setOpaque:NO];
1385
+ [overlayWindow setBackgroundColor:[NSColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.5]];
1386
+
1331
1387
  [overlayWindow orderFront:nil];
1332
1388
  [overlayWindow makeKeyAndOrderFront:nil];
1333
1389
 
1390
+ // Force window layer to have no borders
1391
+ [overlayWindow setWantsLayer:YES];
1392
+ overlayWindow.layer.borderWidth = 0.0;
1393
+ overlayWindow.layer.borderColor = [[NSColor clearColor] CGColor];
1394
+ overlayWindow.layer.cornerRadius = 0.0;
1395
+ overlayWindow.layer.masksToBounds = YES;
1396
+
1334
1397
  // Store for cleanup (reuse recording preview window variable)
1335
1398
  if (!g_recordingPreviewWindow) {
1336
1399
  g_recordingPreviewWindow = overlayWindow;
@@ -1376,6 +1439,9 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1376
1439
  backing:NSBackingStoreBuffered
1377
1440
  defer:NO];
1378
1441
 
1442
+ // Force completely borderless appearance
1443
+ [g_overlayWindow setStyleMask:NSWindowStyleMaskBorderless];
1444
+
1379
1445
  [g_overlayWindow setLevel:CGWindowLevelForKey(kCGMaximumWindowLevelKey)]; // Absolute highest level
1380
1446
  [g_overlayWindow setOpaque:NO];
1381
1447
  [g_overlayWindow setBackgroundColor:[NSColor clearColor]];
@@ -1391,10 +1457,29 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1391
1457
  [g_overlayWindow setMovable:NO];
1392
1458
  [g_overlayWindow setMovableByWindowBackground:NO];
1393
1459
 
1460
+ // Force remove all borders and decorations
1461
+ [g_overlayWindow setHasShadow:NO];
1462
+ [g_overlayWindow setOpaque:NO];
1463
+ [g_overlayWindow setBackgroundColor:[NSColor clearColor]];
1464
+
1394
1465
  // Create overlay view
1395
1466
  g_overlayView = [[WindowSelectorOverlayView alloc] initWithFrame:initialFrame];
1396
1467
  [g_overlayWindow setContentView:g_overlayView];
1397
1468
 
1469
+ // Force window layer to have no borders
1470
+ [g_overlayWindow setWantsLayer:YES];
1471
+ g_overlayWindow.layer.borderWidth = 0.0;
1472
+ g_overlayWindow.layer.borderColor = [[NSColor clearColor] CGColor];
1473
+ g_overlayWindow.layer.cornerRadius = 0.0;
1474
+ g_overlayWindow.layer.masksToBounds = YES;
1475
+
1476
+ // Force content view to have no borders
1477
+ g_overlayWindow.contentView.wantsLayer = YES;
1478
+ g_overlayWindow.contentView.layer.borderWidth = 0.0;
1479
+ g_overlayWindow.contentView.layer.borderColor = [[NSColor clearColor] CGColor];
1480
+ g_overlayWindow.contentView.layer.cornerRadius = 0.0;
1481
+ g_overlayWindow.contentView.layer.masksToBounds = YES;
1482
+
1398
1483
  // Additional window styling to ensure no borders or decorations
1399
1484
  [g_overlayWindow setMovable:NO];
1400
1485
  [g_overlayWindow setMovableByWindowBackground:NO];
@@ -1406,9 +1491,9 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1406
1491
  [g_selectButton setBordered:NO];
1407
1492
  [g_selectButton setFont:[NSFont systemFontOfSize:16 weight:NSFontWeightRegular]];
1408
1493
 
1409
- // Modern button styling with purple tone
1494
+ // Modern button styling with new RGB color
1410
1495
  [g_selectButton setWantsLayer:YES];
1411
- [g_selectButton.layer setBackgroundColor:[[NSColor colorWithRed:0.55 green:0.3 blue:0.75 alpha:0.95] CGColor]];
1496
+ [g_selectButton.layer setBackgroundColor:[[NSColor colorWithRed:77.0/255.0 green:30.0/255.0 blue:231.0/255.0 alpha:0.95] CGColor]];
1412
1497
  [g_selectButton.layer setCornerRadius:8.0];
1413
1498
  [g_selectButton.layer setBorderWidth:0.0];
1414
1499
 
@@ -1479,6 +1564,22 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1479
1564
  // Add cancel button to window
1480
1565
  [g_overlayWindow.contentView addSubview:cancelButton];
1481
1566
 
1567
+ // Force all subviews to have no borders
1568
+ for (NSView *subview in [g_overlayWindow.contentView subviews]) {
1569
+ if ([subview respondsToSelector:@selector(setWantsLayer:)]) {
1570
+ [subview setWantsLayer:YES];
1571
+ if (subview.layer) {
1572
+ subview.layer.borderWidth = 0.0;
1573
+ subview.layer.borderColor = [[NSColor clearColor] CGColor];
1574
+ subview.layer.cornerRadius = 0.0;
1575
+ subview.layer.masksToBounds = YES;
1576
+ subview.layer.shadowOpacity = 0.0;
1577
+ subview.layer.shadowRadius = 0.0;
1578
+ subview.layer.shadowOffset = NSMakeSize(0, 0);
1579
+ }
1580
+ }
1581
+ }
1582
+
1482
1583
  // Cancel button reference will be found dynamically in positioning code
1483
1584
 
1484
1585
  // Timer approach doesn't work well with Node.js