node-mac-recorder 2.5.4 → 2.5.5

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.4",
3
+ "version": "2.5.5",
4
4
  "description": "Native macOS screen recording package for Node.js applications",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -510,7 +510,7 @@ void updateOverlay() {
510
510
  appIconView = [[NSImageView alloc] initWithFrame:NSMakeRect(0, 0, 96, 96)];
511
511
  [appIconView setImageScaling:NSImageScaleProportionallyUpOrDown];
512
512
  [appIconView setWantsLayer:YES];
513
- [appIconView.layer setCornerRadius:16.0];
513
+ [appIconView.layer setCornerRadius:8.0];
514
514
  [appIconView.layer setMasksToBounds:YES];
515
515
  [appIconView.layer setBackgroundColor:[[NSColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:0.3] CGColor]]; // Debug background
516
516
  [g_overlayWindow.contentView addSubview:appIconView];
@@ -566,30 +566,20 @@ void updateOverlay() {
566
566
  NSLog(@"🎯 Positioning app icon at: (%.0f, %.0f) for window size: (%.0f, %.0f)",
567
567
  iconCenter.x, iconCenter.y, (float)width, (float)height);
568
568
 
569
- // Add smooth floating animation after positioning
570
- [appIconView.layer removeAnimationForKey:@"floatAnimation"];
569
+ // Add fast horizontal floating animation after positioning
570
+ [appIconView.layer removeAnimationForKey:@"floatAnimationX"];
571
571
  [appIconView.layer removeAnimationForKey:@"floatAnimationY"];
572
572
 
573
- // Horizontal float animation
573
+ // Faster horizontal float animation only
574
574
  CABasicAnimation *floatAnimationX = [CABasicAnimation animationWithKeyPath:@"transform.translation.x"];
575
- floatAnimationX.fromValue = @(-5.0);
576
- floatAnimationX.toValue = @(5.0);
577
- floatAnimationX.duration = 3.5;
575
+ floatAnimationX.fromValue = @(-4.0);
576
+ floatAnimationX.toValue = @(4.0);
577
+ floatAnimationX.duration = 2.5; // Faster animation
578
578
  floatAnimationX.repeatCount = HUGE_VALF;
579
579
  floatAnimationX.autoreverses = YES;
580
580
  floatAnimationX.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
581
581
  [appIconView.layer addAnimation:floatAnimationX forKey:@"floatAnimationX"];
582
582
 
583
- // Subtle vertical float animation (slightly offset timing)
584
- CABasicAnimation *floatAnimationY = [CABasicAnimation animationWithKeyPath:@"transform.translation.y"];
585
- floatAnimationY.fromValue = @(-2.0);
586
- floatAnimationY.toValue = @(2.0);
587
- floatAnimationY.duration = 4.5;
588
- floatAnimationY.repeatCount = HUGE_VALF;
589
- floatAnimationY.autoreverses = YES;
590
- floatAnimationY.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
591
- [appIconView.layer addAnimation:floatAnimationY forKey:@"floatAnimationY"];
592
-
593
583
  // Position info label at overlay center, above button
594
584
  NSPoint labelCenter = NSMakePoint(
595
585
  (width - [infoLabel frame].size.width) / 2, // Center horizontally
@@ -838,14 +828,14 @@ bool startScreenSelection() {
838
828
  NSButton *selectButton = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 200, 60)];
839
829
  [selectButton setTitle:@"Start Record"];
840
830
  [selectButton setButtonType:NSButtonTypeMomentaryPushIn];
841
- [selectButton setBezelStyle:NSBezelStyleRegularSquare];
831
+ [selectButton setBordered:NO];
842
832
  [selectButton setFont:[NSFont systemFontOfSize:16 weight:NSFontWeightRegular]];
843
833
  [selectButton setTag:i]; // Set screen index as tag
844
834
 
845
835
  // Modern button styling with purple tone
846
836
  [selectButton setWantsLayer:YES];
847
837
  [selectButton.layer setBackgroundColor:[[NSColor colorWithRed:0.55 green:0.3 blue:0.75 alpha:0.95] CGColor]];
848
- [selectButton.layer setCornerRadius:14.0];
838
+ [selectButton.layer setCornerRadius:8.0];
849
839
  [selectButton.layer setBorderWidth:0.0];
850
840
 
851
841
  // Clean white text - normal weight
@@ -871,13 +861,13 @@ bool startScreenSelection() {
871
861
  NSButton *screenCancelButton = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 120, 40)];
872
862
  [screenCancelButton setTitle:@"Cancel"];
873
863
  [screenCancelButton setButtonType:NSButtonTypeMomentaryPushIn];
874
- [screenCancelButton setBezelStyle:NSBezelStyleRegularSquare];
864
+ [screenCancelButton setBordered:NO];
875
865
  [screenCancelButton setFont:[NSFont systemFontOfSize:14 weight:NSFontWeightMedium]];
876
866
 
877
867
  // Modern cancel button styling - darker gray, clean
878
868
  [screenCancelButton setWantsLayer:YES];
879
869
  [screenCancelButton.layer setBackgroundColor:[[NSColor colorWithRed:0.35 green:0.35 blue:0.4 alpha:0.9] CGColor]];
880
- [screenCancelButton.layer setCornerRadius:12.0];
870
+ [screenCancelButton.layer setCornerRadius:8.0];
881
871
  [screenCancelButton.layer setBorderWidth:0.0];
882
872
 
883
873
  // Clean white text for cancel button
@@ -906,7 +896,7 @@ bool startScreenSelection() {
906
896
  NSImageView *screenIconView = [[NSImageView alloc] initWithFrame:NSMakeRect(0, 0, 96, 96)];
907
897
  [screenIconView setImageScaling:NSImageScaleProportionallyUpOrDown];
908
898
  [screenIconView setWantsLayer:YES];
909
- [screenIconView.layer setCornerRadius:16.0];
899
+ [screenIconView.layer setCornerRadius:8.0];
910
900
  [screenIconView.layer setMasksToBounds:YES];
911
901
 
912
902
  // Set display icon
@@ -933,26 +923,16 @@ bool startScreenSelection() {
933
923
  );
934
924
  [screenIconView setFrameOrigin:iconCenter];
935
925
 
936
- // Add smooth floating animation to screen icon
926
+ // Add fast horizontal floating animation to screen icon
937
927
  CABasicAnimation *screenFloatAnimationX = [CABasicAnimation animationWithKeyPath:@"transform.translation.x"];
938
- screenFloatAnimationX.fromValue = @(-5.0);
939
- screenFloatAnimationX.toValue = @(5.0);
940
- screenFloatAnimationX.duration = 4.0; // Slightly different duration for variety
928
+ screenFloatAnimationX.fromValue = @(-4.0);
929
+ screenFloatAnimationX.toValue = @(4.0);
930
+ screenFloatAnimationX.duration = 2.8; // Slightly different timing for variety
941
931
  screenFloatAnimationX.repeatCount = HUGE_VALF;
942
932
  screenFloatAnimationX.autoreverses = YES;
943
933
  screenFloatAnimationX.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
944
934
  [screenIconView.layer addAnimation:screenFloatAnimationX forKey:@"floatAnimationX"];
945
935
 
946
- // Subtle vertical float for screen icon
947
- CABasicAnimation *screenFloatAnimationY = [CABasicAnimation animationWithKeyPath:@"transform.translation.y"];
948
- screenFloatAnimationY.fromValue = @(-2.0);
949
- screenFloatAnimationY.toValue = @(2.0);
950
- screenFloatAnimationY.duration = 5.0; // Different timing than window icons
951
- screenFloatAnimationY.repeatCount = HUGE_VALF;
952
- screenFloatAnimationY.autoreverses = YES;
953
- screenFloatAnimationY.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
954
- [screenIconView.layer addAnimation:screenFloatAnimationY forKey:@"floatAnimationY"];
955
-
956
936
  // Position info label at screen center, above button
957
937
  NSPoint labelCenter = NSMakePoint(
958
938
  (screenFrame.size.width - [screenInfoLabel frame].size.width) / 2, // Center horizontally
@@ -1127,13 +1107,13 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1127
1107
  g_selectButton = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 200, 60)];
1128
1108
  [g_selectButton setTitle:@"Start Record"];
1129
1109
  [g_selectButton setButtonType:NSButtonTypeMomentaryPushIn];
1130
- [g_selectButton setBezelStyle:NSBezelStyleRegularSquare];
1110
+ [g_selectButton setBordered:NO];
1131
1111
  [g_selectButton setFont:[NSFont systemFontOfSize:16 weight:NSFontWeightRegular]];
1132
1112
 
1133
1113
  // Modern button styling with purple tone
1134
1114
  [g_selectButton setWantsLayer:YES];
1135
1115
  [g_selectButton.layer setBackgroundColor:[[NSColor colorWithRed:0.55 green:0.3 blue:0.75 alpha:0.95] CGColor]];
1136
- [g_selectButton.layer setCornerRadius:14.0];
1116
+ [g_selectButton.layer setCornerRadius:8.0];
1137
1117
  [g_selectButton.layer setBorderWidth:0.0];
1138
1118
 
1139
1119
  // Clean white text - normal weight
@@ -1156,13 +1136,13 @@ Napi::Value StartWindowSelection(const Napi::CallbackInfo& info) {
1156
1136
  NSButton *cancelButton = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, 120, 40)];
1157
1137
  [cancelButton setTitle:@"Cancel"];
1158
1138
  [cancelButton setButtonType:NSButtonTypeMomentaryPushIn];
1159
- [cancelButton setBezelStyle:NSBezelStyleRegularSquare];
1139
+ [cancelButton setBordered:NO];
1160
1140
  [cancelButton setFont:[NSFont systemFontOfSize:14 weight:NSFontWeightRegular]];
1161
1141
 
1162
1142
  // Modern cancel button styling - darker gray, clean
1163
1143
  [cancelButton setWantsLayer:YES];
1164
1144
  [cancelButton.layer setBackgroundColor:[[NSColor colorWithRed:0.35 green:0.35 blue:0.4 alpha:0.9] CGColor]];
1165
- [cancelButton.layer setCornerRadius:12.0];
1145
+ [cancelButton.layer setCornerRadius:8.0];
1166
1146
  [cancelButton.layer setBorderWidth:0.0];
1167
1147
 
1168
1148
  // Clean white text for cancel button