node-mac-recorder 2.5.2 → 2.5.3

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.2",
3
+ "version": "2.5.3",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -71,10 +71,10 @@ bool hideScreenRecordingPreview();
71
71
  [[NSColor colorWithRed:0.4 green:0.3 blue:0.8 alpha:0.08] setFill];
72
72
  NSRectFill(self.bounds);
73
73
 
74
- // Thin border with darker purple
75
- [[NSColor colorWithRed:0.3 green:0.2 blue:0.6 alpha:0.6] setStroke];
76
- NSBezierPath *border = [NSBezierPath bezierPathWithRoundedRect:NSInsetRect(self.bounds, 0.5, 0.5) xRadius:12 yRadius:12];
77
- [border setLineWidth:1.0];
74
+ // Ultra-thin border with darker purple
75
+ [[NSColor colorWithRed:0.5 green:0.3 blue:0.7 alpha:0.4] setStroke];
76
+ NSBezierPath *border = [NSBezierPath bezierPathWithRoundedRect:NSInsetRect(self.bounds, 0.125, 0.125) xRadius:12 yRadius:12];
77
+ [border setLineWidth:0.25];
78
78
  [border stroke];
79
79
 
80
80
  // Text will be handled by separate label above button
@@ -159,10 +159,10 @@ bool hideScreenRecordingPreview();
159
159
  [[NSColor colorWithRed:0.4 green:0.3 blue:0.8 alpha:0.12] setFill];
160
160
  NSRectFill(self.bounds);
161
161
 
162
- // Thin border with darker purple
163
- [[NSColor colorWithRed:0.3 green:0.2 blue:0.6 alpha:0.5] setStroke];
164
- NSBezierPath *border = [NSBezierPath bezierPathWithRoundedRect:NSInsetRect(self.bounds, 0.5, 0.5) xRadius:15 yRadius:15];
165
- [border setLineWidth:1.0];
162
+ // Ultra-thin border with darker purple
163
+ [[NSColor colorWithRed:0.5 green:0.3 blue:0.7 alpha:0.3] setStroke];
164
+ NSBezierPath *border = [NSBezierPath bezierPathWithRoundedRect:NSInsetRect(self.bounds, 0.125, 0.125) xRadius:15 yRadius:15];
165
+ [border setLineWidth:0.25];
166
166
  [border stroke];
167
167
 
168
168
  // Text will be handled by separate label above button
@@ -521,9 +521,13 @@ void updateOverlay() {
521
521
  appIconView = [[NSImageView alloc] initWithFrame:NSMakeRect(0, 0, 96, 96)];
522
522
  [appIconView setImageScaling:NSImageScaleProportionallyUpOrDown];
523
523
  [appIconView setWantsLayer:YES];
524
- [appIconView.layer setCornerRadius:16.0]; // Rounded corners like iOS
524
+ [appIconView.layer setCornerRadius:16.0];
525
525
  [appIconView.layer setMasksToBounds:YES];
526
+ [appIconView.layer setBackgroundColor:[[NSColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:0.3] CGColor]]; // Debug background
526
527
  [g_overlayWindow.contentView addSubview:appIconView];
528
+ NSLog(@"🖼️ Created app icon view at frame: (%.0f, %.0f, %.0f, %.0f)",
529
+ appIconView.frame.origin.x, appIconView.frame.origin.y,
530
+ appIconView.frame.size.width, appIconView.frame.size.height);
527
531
  }
528
532
 
529
533
  // Get app icon using NSWorkspace
@@ -542,9 +546,13 @@ void updateOverlay() {
542
546
  // Fallback to generic app icon if not found
543
547
  if (!appIcon) {
544
548
  appIcon = [workspace iconForFileType:NSFileTypeForHFSTypeCode(kGenericApplicationIcon)];
549
+ NSLog(@"⚠️ Using fallback icon for app: %@", iconAppName);
550
+ } else {
551
+ NSLog(@"✅ Found app icon for: %@", iconAppName);
545
552
  }
546
553
 
547
554
  [appIconView setImage:appIcon];
555
+ NSLog(@"🖼️ Set icon image, size: %.0fx%.0f", [appIcon size].width, [appIcon size].height);
548
556
 
549
557
  // Update label text
550
558
  NSString *labelWindowTitle = [windowUnderCursor objectForKey:@"title"] ?: @"Unknown Window";
@@ -566,6 +574,8 @@ void updateOverlay() {
566
574
  buttonCenter.y + buttonSize.height + 60 + 10 // Above label + text height + margin
567
575
  );
568
576
  [appIconView setFrameOrigin:iconCenter];
577
+ NSLog(@"🎯 Positioning app icon at: (%.0f, %.0f) for window size: (%.0f, %.0f)",
578
+ iconCenter.x, iconCenter.y, (float)width, (float)height);
569
579
 
570
580
  // Position info label at overlay center, above button
571
581
  NSPoint labelCenter = NSMakePoint(
@@ -819,9 +829,9 @@ bool startScreenSelection() {
819
829
  [selectButton setFont:[NSFont systemFontOfSize:16 weight:NSFontWeightSemibold]];
820
830
  [selectButton setTag:i]; // Set screen index as tag
821
831
 
822
- // Modern button styling with gradient-like effect
832
+ // Modern button styling with purple gradient-like effect
823
833
  [selectButton setWantsLayer:YES];
824
- [selectButton.layer setBackgroundColor:[[NSColor colorWithRed:0.1 green:0.5 blue:0.9 alpha:0.95] CGColor]];
834
+ [selectButton.layer setBackgroundColor:[[NSColor colorWithRed:0.5 green:0.3 blue:0.8 alpha:0.95] CGColor]];
825
835
  [selectButton.layer setCornerRadius:14.0];
826
836
  [selectButton.layer setBorderWidth:0.0];
827
837
 
@@ -834,17 +844,17 @@ bool startScreenSelection() {
834
844
  range:NSMakeRange(0, [titleString length])];
835
845
  [selectButton setAttributedTitle:titleString];
836
846
 
837
- // Enhanced shadow for modern look
838
- [selectButton.layer setShadowColor:[[NSColor colorWithRed:0.0 green:0.3 blue:0.7 alpha:0.8] CGColor]];
847
+ // Enhanced shadow for modern look - purple tone
848
+ [selectButton.layer setShadowColor:[[NSColor colorWithRed:0.4 green:0.2 blue:0.6 alpha:0.8] CGColor]];
839
849
  [selectButton.layer setShadowOffset:NSMakeSize(0, -3)];
840
850
  [selectButton.layer setShadowRadius:8.0];
841
851
  [selectButton.layer setShadowOpacity:0.4];
842
852
 
843
- // Add subtle inner highlight
853
+ // Add subtle inner highlight - purple tone
844
854
  CALayer *highlightLayer = [CALayer layer];
845
855
  [highlightLayer setFrame:CGRectMake(0, selectButton.frame.size.height * 0.6,
846
856
  selectButton.frame.size.width, selectButton.frame.size.height * 0.4)];
847
- [highlightLayer setBackgroundColor:[[NSColor colorWithRed:0.3 green:0.7 blue:1.0 alpha:0.3] CGColor]];
857
+ [highlightLayer setBackgroundColor:[[NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.3] CGColor]];
848
858
  [highlightLayer setCornerRadius:14.0];
849
859
  [selectButton.layer addSublayer:highlightLayer];
850
860
 
@@ -1104,9 +1114,9 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1104
1114
  [g_selectButton setBezelStyle:NSBezelStyleRegularSquare];
1105
1115
  [g_selectButton setFont:[NSFont systemFontOfSize:16 weight:NSFontWeightSemibold]];
1106
1116
 
1107
- // Modern button styling with gradient-like effect
1117
+ // Modern button styling with purple gradient-like effect
1108
1118
  [g_selectButton setWantsLayer:YES];
1109
- [g_selectButton.layer setBackgroundColor:[[NSColor colorWithRed:0.1 green:0.5 blue:0.9 alpha:0.95] CGColor]];
1119
+ [g_selectButton.layer setBackgroundColor:[[NSColor colorWithRed:0.5 green:0.3 blue:0.8 alpha:0.95] CGColor]];
1110
1120
  [g_selectButton.layer setCornerRadius:14.0];
1111
1121
  [g_selectButton.layer setBorderWidth:0.0];
1112
1122
 
@@ -1119,8 +1129,8 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1119
1129
  range:NSMakeRange(0, [titleString length])];
1120
1130
  [g_selectButton setAttributedTitle:titleString];
1121
1131
 
1122
- // Enhanced shadow for modern look
1123
- [g_selectButton.layer setShadowColor:[[NSColor colorWithRed:0.0 green:0.3 blue:0.7 alpha:0.8] CGColor]];
1132
+ // Enhanced shadow for modern look - purple tone
1133
+ [g_selectButton.layer setShadowColor:[[NSColor colorWithRed:0.4 green:0.2 blue:0.6 alpha:0.8] CGColor]];
1124
1134
  [g_selectButton.layer setShadowOffset:NSMakeSize(0, -3)];
1125
1135
  [g_selectButton.layer setShadowRadius:8.0];
1126
1136
  [g_selectButton.layer setShadowOpacity:0.4];