@visns-studio/visns-components 5.15.5 → 5.15.6

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.
@@ -1,12 +1,38 @@
1
1
  /* Mapbox GL and Mapbox Geocoder styles are imported in the component file */
2
2
 
3
+ // CSS Custom Properties for theme integration
4
+ :root {
5
+ --camera-primary-color: #3b82f6;
6
+ --camera-primary-hover: #2563eb;
7
+ --camera-success-color: #10b981;
8
+ --camera-success-hover: #059669;
9
+ --camera-warning-color: #f59e0b;
10
+ --camera-warning-hover: #d97706;
11
+ --camera-danger-color: #ef4444;
12
+ --camera-danger-hover: #dc2626;
13
+ --camera-purple-color: #8b5cf6;
14
+ --camera-purple-hover: #7c3aed;
15
+
16
+ --camera-background: #ffffff;
17
+ --camera-surface: #f8fafc;
18
+ --camera-border: #e5e7eb;
19
+ --camera-border-light: #f3f4f6;
20
+
21
+ --camera-text-primary: #1f2937;
22
+ --camera-text-secondary: #6b7280;
23
+ --camera-text-muted: #9ca3af;
24
+
25
+ --camera-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
26
+ --camera-shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
27
+ }
28
+
3
29
  .cameraPlacement {
4
30
  padding: 0;
5
31
  margin: 0;
6
32
  height: 100vh;
7
33
  display: flex;
8
34
  flex-direction: column;
9
- background: #f8fafc;
35
+ background: var(--camera-surface, #f8fafc);
10
36
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
11
37
 
12
38
  .header {
@@ -137,41 +163,41 @@
137
163
  }
138
164
 
139
165
  &.saveFileBtn {
140
- background: #8b5cf6;
141
- border-color: #7c3aed;
166
+ background: var(--camera-purple-color, #8b5cf6);
167
+ border-color: var(--camera-purple-hover, #7c3aed);
142
168
 
143
169
  &:hover:not(:disabled) {
144
- background: #7c3aed;
170
+ background: var(--camera-purple-hover, #7c3aed);
145
171
  transform: translateY(-1px);
146
172
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
147
173
  }
148
174
  }
149
175
 
150
176
  &.loadFileBtn {
151
- background: #f59e0b;
152
- border-color: #d97706;
177
+ background: var(--camera-warning-color, #f59e0b);
178
+ border-color: var(--camera-warning-hover, #d97706);
153
179
 
154
180
  &:hover:not(:disabled) {
155
- background: #d97706;
181
+ background: var(--camera-warning-hover, #d97706);
156
182
  transform: translateY(-1px);
157
183
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
158
184
  }
159
185
  }
160
186
 
161
187
  &.exportBtn {
162
- background: #10b981;
163
- border-color: #059669;
188
+ background: var(--camera-success-color, #10b981);
189
+ border-color: var(--camera-success-hover, #059669);
164
190
 
165
191
  &:hover:not(:disabled) {
166
- background: #059669;
192
+ background: var(--camera-success-hover, #059669);
167
193
  transform: translateY(-1px);
168
194
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
169
195
  }
170
196
  }
171
197
 
172
198
  &.activeControl {
173
- background: #3b82f6 !important;
174
- border-color: #2563eb !important;
199
+ background: var(--camera-primary-color, #3b82f6) !important;
200
+ border-color: var(--camera-primary-hover, #2563eb) !important;
175
201
  color: white !important;
176
202
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
177
203
 
@@ -212,8 +238,8 @@
212
238
  }
213
239
 
214
240
  &.activeControl {
215
- background: #3b82f6 !important;
216
- border-color: #2563eb !important;
241
+ background: var(--camera-primary-color, #3b82f6) !important;
242
+ border-color: var(--camera-primary-hover, #2563eb) !important;
217
243
  color: white !important;
218
244
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
219
245
 
@@ -434,48 +460,156 @@
434
460
 
435
461
  .rotationHandle {
436
462
  position: absolute;
437
- top: -15px;
438
- right: -15px;
439
- width: 12px;
440
- height: 12px;
441
- background: #ef4444;
463
+ top: -8px;
464
+ right: -8px;
465
+ width: 16px;
466
+ height: 16px;
467
+ background: #3b82f6;
442
468
  border: 2px solid white;
443
469
  border-radius: 50%;
444
470
  cursor: grab;
445
- opacity: 0;
446
- transition: opacity 0.2s ease;
447
- z-index: 10;
471
+ opacity: 0.9;
472
+ display: flex;
473
+ align-items: center;
474
+ justify-content: center;
475
+ transition: all 0.2s ease;
476
+ z-index: 1001; /* Higher than tooltip z-index */
477
+ box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
448
478
 
449
479
  &:hover {
450
- cursor: grabbing;
480
+ opacity: 1;
481
+ cursor: grab;
482
+ transform: scale(1.25);
483
+ background: #2563eb;
484
+ box-shadow: 0 3px 10px rgba(59, 130, 246, 0.6);
485
+ }
486
+
487
+ &:active {
488
+ background: #1d4ed8;
489
+ transform: scale(1.1);
451
490
  }
452
491
 
453
492
  &::after {
454
493
  content: '';
455
494
  position: absolute;
456
- top: 50%;
457
- left: 50%;
458
- width: 2px;
495
+ width: 6px;
459
496
  height: 6px;
460
- background: white;
461
- transform: translate(-50%, -50%);
462
- border-radius: 1px;
497
+ border: 1px solid white;
498
+ border-left-color: transparent;
499
+ border-radius: 50%;
500
+ animation: spin 2s linear infinite;
501
+ }
502
+ }
503
+
504
+ @keyframes spin {
505
+ 0% { transform: rotate(0deg); }
506
+ 100% { transform: rotate(360deg); }
507
+ }
508
+
509
+ // Ensure rotation handle is clickable and visible
510
+ .imageMarker {
511
+ .rotationHandle {
512
+ pointer-events: auto;
513
+ z-index: 1001; /* Ensure it's always on top */
514
+ }
515
+
516
+ &:hover .rotationHandle {
517
+ opacity: 1;
518
+ transform: scale(1.15);
519
+ background: #2563eb;
520
+ box-shadow: 0 4px 16px rgba(59, 130, 246, 0.5);
521
+ }
522
+
523
+ &.rotating {
524
+ .circularMarker {
525
+ transform: scale(1.1);
526
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
527
+ }
528
+
529
+ .rotationHandle {
530
+ opacity: 1 !important;
531
+ transform: scale(1.3) !important;
532
+ background: #1d4ed8 !important;
533
+ box-shadow: 0 8px 24px rgba(29, 78, 216, 0.6) !important;
534
+ cursor: grabbing !important;
535
+ z-index: 1002 !important; /* Even higher during rotation */
536
+ }
537
+ }
538
+ }
539
+
540
+ // Camera tooltip styles
541
+ .cameraTooltip {
542
+ position: absolute;
543
+ background: white;
544
+ border: 2px solid #e5e7eb;
545
+ border-radius: 12px;
546
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
547
+ padding: 0;
548
+ z-index: 999; /* Lower than rotation handle */
549
+ width: 280px;
550
+ pointer-events: none; /* Ensure tooltip doesn't interfere with clicks */
551
+ opacity: 0;
552
+ animation: fadeInTooltip 0.2s ease forwards;
553
+
554
+ @keyframes fadeInTooltip {
555
+ from {
556
+ opacity: 0;
557
+ transform: translateY(10px);
558
+ }
559
+ to {
560
+ opacity: 1;
561
+ transform: translateY(0);
562
+ }
463
563
  }
464
564
  }
465
565
 
466
- // Show rotation handle on marker hover
467
- .imageMarker:hover .rotationHandle {
468
- opacity: 1;
566
+ .tooltipImage {
567
+ width: 100%;
568
+ height: 80px;
569
+ overflow: hidden;
570
+ border-radius: 10px 10px 0 0;
571
+ background: #f8fafc;
572
+
573
+ img {
574
+ width: 100%;
575
+ height: 100%;
576
+ object-fit: contain;
577
+ padding: 8px;
578
+ }
579
+ }
580
+
581
+ .tooltipContent {
582
+ padding: 12px 16px;
583
+ }
584
+
585
+ .tooltipTitle {
586
+ font-size: 14px;
587
+ font-weight: 600;
588
+ color: #1f2937;
589
+ margin-bottom: 8px;
590
+ line-height: 1.3;
591
+ }
592
+
593
+ .tooltipSpecs {
594
+ display: flex;
595
+ flex-direction: column;
596
+ gap: 4px;
597
+
598
+ div {
599
+ font-size: 12px;
600
+ color: #6b7280;
601
+ line-height: 1.4;
602
+ }
469
603
  }
470
604
 
471
605
  .sidebar {
472
606
  position: absolute;
473
- top: 0;
607
+ top: 70px; /* Add top margin to clear navigation */
474
608
  right: 0;
475
609
  width: 400px;
476
- height: 100%;
477
- background: #ffffff;
478
- border-left: 1px solid #e5e7eb;
610
+ height: calc(100% - 70px); /* Adjust height to account for top margin */
611
+ background: var(--camera-background, #ffffff);
612
+ border-left: 1px solid var(--camera-border, #e5e7eb);
479
613
  display: flex;
480
614
  flex-direction: column;
481
615
  z-index: 20;
@@ -578,10 +712,49 @@
578
712
  align-items: center;
579
713
  margin-bottom: 12px;
580
714
 
715
+ .sidebarCameraInfo {
716
+ display: flex;
717
+ align-items: center;
718
+ gap: 12px;
719
+ flex: 1;
720
+ }
721
+
722
+ .sidebarCameraImageContainer {
723
+ position: relative;
724
+ width: 40px;
725
+ height: 40px;
726
+ flex-shrink: 0;
727
+ }
728
+
729
+ .sidebarCameraImage {
730
+ width: 100%;
731
+ height: 100%;
732
+ object-fit: contain;
733
+ border-radius: 6px;
734
+ background: #f8fafc;
735
+ border: 1px solid #e5e7eb;
736
+ padding: 2px;
737
+ }
738
+
739
+ .sidebarCameraIcon {
740
+ display: flex;
741
+ align-items: center;
742
+ justify-content: center;
743
+ width: 40px;
744
+ height: 40px;
745
+ background: #f3f4f6;
746
+ border-radius: 6px;
747
+ }
748
+
749
+ .sidebarCameraText {
750
+ flex: 1;
751
+ min-width: 0;
752
+ }
753
+
581
754
  .cameraName {
582
755
  font-size: 18px;
583
756
  font-weight: 700;
584
- color: #1e293b;
757
+ color: var(--camera-text-primary, #1e293b);
585
758
  margin: 0;
586
759
  letter-spacing: -0.2px;
587
760
  }
@@ -611,18 +784,18 @@
611
784
  }
612
785
 
613
786
  .indoor {
614
- background: #10b981;
787
+ background: var(--camera-success-color, #10b981);
615
788
  color: white;
616
789
  }
617
790
 
618
791
  .outdoor {
619
- background: #f59e0b;
792
+ background: var(--camera-warning-color, #f59e0b);
620
793
  color: white;
621
794
  }
622
795
 
623
796
  .cameraDetails {
624
797
  font-size: 14px;
625
- color: #64748b;
798
+ color: var(--camera-text-secondary, #64748b);
626
799
  margin-bottom: 10px;
627
800
  line-height: 1.5;
628
801
  font-weight: 500;
@@ -630,67 +803,50 @@
630
803
 
631
804
  .cameraCoords {
632
805
  font-size: 12px;
633
- color: #6b7280;
806
+ color: var(--camera-text-secondary, #6b7280);
634
807
  font-family: 'SF Mono', Monaco, 'Consolas', monospace;
635
808
  font-weight: 500;
636
809
  margin-bottom: 16px;
637
- background: #f3f4f6;
810
+ background: var(--camera-border-light, #f3f4f6);
638
811
  padding: 8px 12px;
639
812
  border-radius: 6px;
640
- border: 1px solid #e5e7eb;
813
+ border: 1px solid var(--camera-border, #e5e7eb);
641
814
  }
642
815
 
643
816
  .cameraActions {
644
817
  display: flex;
645
- gap: 12px;
646
-
647
- button {
648
- flex: 1;
649
- padding: 10px 16px;
650
- border: none;
651
- border-radius: 8px;
652
- cursor: pointer;
653
- font-size: 13px;
654
- font-weight: 600;
655
- transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
656
- position: relative;
657
- overflow: hidden;
658
-
659
- &::before {
660
- content: '';
661
- position: absolute;
662
- top: 0;
663
- left: -100%;
664
- width: 100%;
665
- height: 100%;
666
- background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
667
- transition: left 0.5s ease;
668
- }
669
-
670
- &:hover::before {
671
- left: 100%;
672
- }
673
-
674
- &.editBtn {
675
- background: #3b82f6;
676
- color: white;
677
- border: 1px solid #2563eb;
678
-
679
- &:hover {
680
- background: #2563eb;
681
- transform: translateY(-1px);
682
- }
683
- }
684
-
685
- &.removeBtn {
686
- background: #ef4444;
687
- color: white;
688
- border: 1px solid #dc2626;
818
+ gap: 6px;
819
+ align-items: center;
820
+ flex-shrink: 0;
821
+ }
689
822
 
690
- &:hover {
691
- background: #dc2626;
692
- transform: translateY(-1px);
693
- }
823
+ .iconBtn {
824
+ display: flex;
825
+ align-items: center;
826
+ justify-content: center;
827
+ width: 32px;
828
+ height: 32px;
829
+ border: none;
830
+ border-radius: 6px;
831
+ background: var(--camera-border-light, #f3f4f6);
832
+ color: var(--camera-text-secondary, #6b7280);
833
+ cursor: pointer;
834
+ transition: all 0.2s ease;
835
+
836
+ &:hover {
837
+ background: var(--camera-border, #e5e7eb);
838
+ color: var(--camera-text-primary, #374151);
839
+ transform: translateY(-1px);
840
+ }
841
+
842
+ &:active {
843
+ transform: translateY(0);
844
+ }
845
+
846
+ &:nth-child(2) { /* Remove button */
847
+ &:hover {
848
+ background: #fee2e2;
849
+ color: var(--camera-danger-hover, #dc2626);
694
850
  }
695
851
  }
696
852
  }
@@ -1001,12 +1157,33 @@
1001
1157
  gap: 12px;
1002
1158
  }
1003
1159
 
1160
+ .cameraImageContainer {
1161
+ position: relative;
1162
+ width: 60px;
1163
+ height: 60px;
1164
+ flex-shrink: 0;
1165
+ border: 2px solid #10b981;
1166
+ border-radius: 8px;
1167
+ background: #fef3c7;
1168
+ }
1169
+
1170
+ .cameraImage {
1171
+ width: 100%;
1172
+ height: 100%;
1173
+ object-fit: contain;
1174
+ border-radius: 8px;
1175
+ background: #f8fafc;
1176
+ border: 1px solid #e5e7eb;
1177
+ padding: 4px;
1178
+ transition: transform 0.2s ease;
1179
+ }
1180
+
1004
1181
  .cameraIcon {
1005
1182
  display: flex;
1006
1183
  align-items: center;
1007
1184
  justify-content: center;
1008
- width: 40px;
1009
- height: 40px;
1185
+ width: 60px;
1186
+ height: 60px;
1010
1187
  background: #f3f4f6;
1011
1188
  border-radius: 8px;
1012
1189
  flex-shrink: 0;