node-mac-recorder 2.10.26 → 2.10.28

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.26",
3
+ "version": "2.10.28",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -117,14 +117,14 @@ void updateScreenOverlays();
117
117
  NSColor *strokeColor;
118
118
 
119
119
  if (self.isToggled) {
120
- // Locked state: slightly different opacity with darker purple stroke
121
- fillColor = [NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.5];
122
- strokeColor = [NSColor colorWithRed:0.45 green:0.25 blue:0.75 alpha:0.9];
120
+ // Locked state: 50% less transparency (more opaque)
121
+ fillColor = [NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.75]; // 0.5 -> 0.75
122
+ strokeColor = [NSColor colorWithRed:0.45 green:0.25 blue:0.75 alpha:0.95]; // 0.9 -> 0.95
123
123
  } else {
124
- // Normal state: purple fill with lighter purple stroke
125
- fillColor = [NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.4];
126
- strokeColor = [NSColor colorWithRed:0.7 green:0.5 blue:0.95 alpha:0.8];
127
- }
124
+ // Normal state: 50% less transparency (more opaque)
125
+ fillColor = [NSColor colorWithRed:0.6 green:0.4 blue:0.9 alpha:0.6]; // 0.4 -> 0.6
126
+ strokeColor = [NSColor colorWithRed:0.7 green:0.5 blue:0.95 alpha:0.9]; // 0.8 -> 0.9
127
+ }
128
128
 
129
129
  [fillColor setFill];
130
130
  [highlightPath fill];
@@ -222,11 +222,34 @@ void updateScreenOverlays();
222
222
  - (void)mouseEntered:(NSEvent *)event {
223
223
  self.isHovered = YES;
224
224
  [[NSCursor pointingHandCursor] set];
225
+
226
+ // Brighten background on hover
227
+ if (self.layer.backgroundColor) {
228
+ CGFloat red, green, blue, alpha;
229
+ NSColor *currentColor = [NSColor colorWithCGColor:self.layer.backgroundColor];
230
+ [currentColor getRed:&red green:&green blue:&blue alpha:&alpha];
231
+
232
+ // Increase brightness by 20%
233
+ red = MIN(1.0, red * 1.2);
234
+ green = MIN(1.0, green * 1.2);
235
+ blue = MIN(1.0, blue * 1.2);
236
+
237
+ NSColor *brighterColor = [NSColor colorWithRed:red green:green blue:blue alpha:alpha];
238
+ self.layer.backgroundColor = [brighterColor CGColor];
239
+ }
225
240
  }
226
241
 
227
242
  - (void)mouseExited:(NSEvent *)event {
228
243
  self.isHovered = NO;
229
244
  [[NSCursor arrowCursor] set];
245
+
246
+ // Restore original background color
247
+ NSString *title = [self title];
248
+ if ([title isEqualToString:@"Start Record"]) {
249
+ self.layer.backgroundColor = [[NSColor colorWithRed:90.0/255.0 green:50.0/255.0 blue:250.0/255.0 alpha:1.0] CGColor];
250
+ } else if ([title isEqualToString:@"Cancel"]) {
251
+ self.layer.backgroundColor = [[NSColor colorWithRed:0.4 green:0.4 blue:0.45 alpha:1.0] CGColor];
252
+ }
230
253
  }
231
254
 
232
255
  - (void)animateScale:(CGFloat)scale duration:(NSTimeInterval)duration {
@@ -304,7 +327,7 @@ void updateScreenOverlays();
304
327
  self.wantsLayer = YES;
305
328
  self.layer.backgroundColor = [[NSColor clearColor] CGColor];
306
329
  // Ensure no borders or decorations
307
- self.layer.borderWidth = 0.0;
330
+ self.layer.borderWidth = 1.0;
308
331
  self.layer.cornerRadius = 8.0;
309
332
  self.layer.masksToBounds = YES;
310
333
  self.layer.shadowOpacity = 0.0;
@@ -364,7 +387,7 @@ void updateScreenOverlays();
364
387
  self.wantsLayer = YES;
365
388
  self.layer.backgroundColor = [[NSColor clearColor] CGColor];
366
389
  // Ensure no borders or decorations
367
- self.layer.borderWidth = 0.0;
390
+ self.layer.borderWidth = 1.0;
368
391
  self.layer.cornerRadius = 8.0;
369
392
  self.layer.masksToBounds = YES;
370
393
  self.layer.shadowOpacity = 0.0;
@@ -834,12 +857,12 @@ void updateOverlay() {
834
857
  [infoLabel setBezeled:NO];
835
858
  [infoLabel setDrawsBackground:NO];
836
859
  [infoLabel setAlignment:NSTextAlignmentCenter];
837
- [infoLabel setFont:[NSFont systemFontOfSize:18 weight:NSFontWeightMedium]];
860
+ [infoLabel setFont:[NSFont systemFontOfSize:23.4 weight:NSFontWeightMedium]]; // 18 * 1.3 = 23.4
838
861
  [infoLabel setTextColor:[NSColor whiteColor]];
839
862
 
840
863
  // Force no borders on info label
841
864
  [infoLabel setWantsLayer:YES];
842
- infoLabel.layer.borderWidth = 0.0;
865
+ infoLabel.layer.borderWidth = 1.0;
843
866
  infoLabel.layer.borderColor = [[NSColor clearColor] CGColor];
844
867
  infoLabel.layer.cornerRadius = 0.0;
845
868
  infoLabel.layer.masksToBounds = YES;
@@ -865,7 +888,7 @@ void updateOverlay() {
865
888
  [appIconView.layer setBackgroundColor:[[NSColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:0.3] CGColor]]; // Debug background
866
889
 
867
890
  // Force no borders on app icon view
868
- appIconView.layer.borderWidth = 0.0;
891
+ appIconView.layer.borderWidth = 1.0;
869
892
  appIconView.layer.borderColor = [[NSColor clearColor] CGColor];
870
893
  appIconView.layer.shadowOpacity = 0.0;
871
894
  appIconView.layer.shadowRadius = 0.0;
@@ -906,20 +929,19 @@ void updateOverlay() {
906
929
  NSString *labelAppName = [windowUnderCursor objectForKey:@"appName"] ?: @"Unknown App";
907
930
  [infoLabel setStringValue:[NSString stringWithFormat:@"%@\n%@", labelAppName, labelWindowTitle]];
908
931
 
909
- // Position buttons - Start Record in center of highlighted window
932
+ // Position buttons - Start Record in absolute center of screen
910
933
  if (g_selectButton) {
911
934
  NSSize buttonSize = [g_selectButton frame].size;
912
- // Convert window coordinates to overlay view coordinates
913
- NSRect highlightFrame = NSMakeRect(x, [g_overlayView frame].size.height - y - height, width, height);
935
+ NSRect screenFrame = [[NSScreen mainScreen] frame]; // Use main screen frame instead of overlay view
914
936
  NSPoint buttonCenter = NSMakePoint(
915
- highlightFrame.origin.x + (highlightFrame.size.width - buttonSize.width) / 2,
916
- highlightFrame.origin.y + (highlightFrame.size.height - buttonSize.height) / 2 + 15
937
+ (screenFrame.size.width - buttonSize.width) / 2,
938
+ (screenFrame.size.height - buttonSize.height) / 2 + 30 // Slightly above center
917
939
  );
918
940
  [g_selectButton setFrameOrigin:buttonCenter];
919
941
 
920
- // Position app icon above text label within highlighted area
942
+ // Position app icon above text label in absolute screen center
921
943
  NSPoint iconCenter = NSMakePoint(
922
- highlightFrame.origin.x + (highlightFrame.size.width - 96) / 2, // Center horizontally within highlight
944
+ (screenFrame.size.width - 96) / 2, // Center horizontally on main screen
923
945
  buttonCenter.y + buttonSize.height + 60 + 10 // Above label + text height + margin
924
946
  );
925
947
  [appIconView setFrameOrigin:iconCenter];
@@ -940,9 +962,9 @@ void updateOverlay() {
940
962
  floatAnimationX.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
941
963
  [appIconView.layer addAnimation:floatAnimationX forKey:@"floatAnimationX"];
942
964
 
943
- // Position info label within highlighted area, above button
965
+ // Position info label in absolute screen center, above button
944
966
  NSPoint labelCenter = NSMakePoint(
945
- highlightFrame.origin.x + (highlightFrame.size.width - [infoLabel frame].size.width) / 2, // Center horizontally within highlight
967
+ (screenFrame.size.width - [infoLabel frame].size.width) / 2, // Center horizontally on main screen
946
968
  buttonCenter.y + buttonSize.height + 10 // 10px above button, below icon
947
969
  );
948
970
  [infoLabel setFrameOrigin:labelCenter];
@@ -960,7 +982,7 @@ void updateOverlay() {
960
982
  if (cancelButton) {
961
983
  NSSize cancelButtonSize = [cancelButton frame].size;
962
984
  NSPoint cancelButtonCenter = NSMakePoint(
963
- highlightFrame.origin.x + (highlightFrame.size.width - cancelButtonSize.width) / 2,
985
+ (screenFrame.size.width - cancelButtonSize.width) / 2, // Center horizontally on main screen
964
986
  buttonCenter.y - buttonSize.height - 20 // 20px below main button
965
987
  );
966
988
  [cancelButton setFrameOrigin:cancelButtonCenter];
@@ -979,7 +1001,7 @@ void updateOverlay() {
979
1001
  if ([subview respondsToSelector:@selector(setWantsLayer:)]) {
980
1002
  [subview setWantsLayer:YES];
981
1003
  if (subview.layer) {
982
- subview.layer.borderWidth = 0.0;
1004
+ subview.layer.borderWidth = 1.0;
983
1005
  subview.layer.borderColor = [[NSColor clearColor] CGColor];
984
1006
  subview.layer.masksToBounds = YES;
985
1007
  subview.layer.shadowOpacity = 0.0;