react-pdf-highlighter-plus 1.1.2 → 1.1.4

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.
@@ -0,0 +1,98 @@
1
+ .ImageHighlight {
2
+ position: absolute;
3
+ }
4
+
5
+ .ImageHighlight__container {
6
+ width: 100%;
7
+ height: 100%;
8
+ display: flex;
9
+ flex-direction: column;
10
+ border-radius: 4px;
11
+ overflow: visible;
12
+ transition: box-shadow 0.2s ease;
13
+ }
14
+
15
+ .ImageHighlight__container:hover {
16
+ box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.3);
17
+ }
18
+
19
+ .ImageHighlight__toolbar {
20
+ display: flex;
21
+ align-items: center;
22
+ gap: 4px;
23
+ padding: 2px 4px;
24
+ background: rgba(0, 0, 0, 0.6);
25
+ border-radius: 4px;
26
+ position: absolute;
27
+ top: 4px;
28
+ left: 4px;
29
+ z-index: 10;
30
+ opacity: 0;
31
+ transition: opacity 0.2s ease;
32
+ }
33
+
34
+ .ImageHighlight__container:hover .ImageHighlight__toolbar,
35
+ .ImageHighlight--scrolledTo .ImageHighlight__toolbar {
36
+ opacity: 1;
37
+ }
38
+
39
+ .ImageHighlight__drag-handle {
40
+ display: flex;
41
+ align-items: center;
42
+ justify-content: center;
43
+ width: 20px;
44
+ height: 20px;
45
+ cursor: grab;
46
+ color: white;
47
+ border-radius: 3px;
48
+ transition: background 0.2s;
49
+ }
50
+
51
+ .ImageHighlight__drag-handle:hover {
52
+ background: rgba(255, 255, 255, 0.2);
53
+ }
54
+
55
+ .ImageHighlight__drag-handle:active {
56
+ cursor: grabbing;
57
+ }
58
+
59
+ .ImageHighlight__content {
60
+ flex: 1;
61
+ display: flex;
62
+ align-items: center;
63
+ justify-content: center;
64
+ background: white;
65
+ overflow: hidden;
66
+ border-radius: 4px;
67
+ }
68
+
69
+ .ImageHighlight__image {
70
+ width: 100%;
71
+ height: 100%;
72
+ object-fit: fill;
73
+ pointer-events: none;
74
+ user-select: none;
75
+ }
76
+
77
+ .ImageHighlight--scrolledTo .ImageHighlight__container {
78
+ box-shadow: 0 0 0 3px #ff4141, 2px 2px 8px rgba(0, 0, 0, 0.2);
79
+ }
80
+
81
+ .ImageHighlight__delete-button {
82
+ display: flex;
83
+ align-items: center;
84
+ justify-content: center;
85
+ width: 20px;
86
+ height: 20px;
87
+ border: none;
88
+ background: transparent;
89
+ cursor: pointer;
90
+ color: white;
91
+ border-radius: 3px;
92
+ padding: 0;
93
+ transition: background 0.2s;
94
+ }
95
+
96
+ .ImageHighlight__delete-button:hover {
97
+ background: rgba(255, 100, 100, 0.6);
98
+ }
@@ -0,0 +1,15 @@
1
+ .MouseSelection {
2
+ position: absolute;
3
+ border: 1px dashed #333;
4
+ background: rgba(153,193,218,255);
5
+ mix-blend-mode: multiply;
6
+ }
7
+ /* Internet Explorer support method */
8
+ @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
9
+ .MouseSelection {opacity: 0.5 }
10
+ }
11
+
12
+ /* Microsoft Edge Browser 12+ (All) - @supports method */
13
+ @supports (-ms-ime-align:auto) {
14
+ .MouseSelection {opacity: 0.5 }
15
+ }
@@ -0,0 +1,146 @@
1
+ .PdfHighlighter {
2
+ position: absolute;
3
+ overflow: auto;
4
+ width: 100%;
5
+ height: 100%;
6
+ /* background-color is now controlled via inline style for theming */
7
+ }
8
+
9
+ /* Style the scrollbar */
10
+ .PdfHighlighter::-webkit-scrollbar {
11
+ width: 10px;
12
+ height: 10px;
13
+ }
14
+
15
+ .PdfHighlighter::-webkit-scrollbar-thumb {
16
+ background-color: #9f9f9f;
17
+ border-radius: 5px;
18
+ }
19
+
20
+ .PdfHighlighter::-webkit-scrollbar-thumb:hover {
21
+ background-color: #d1d1d1;
22
+ }
23
+
24
+ .PdfHighlighter::-webkit-scrollbar-track {
25
+ background-color: #2c2c2c;
26
+ border-radius: 5px;
27
+ }
28
+
29
+ .PdfHighlighter::-webkit-scrollbar-track-piece {
30
+ background-color: #2c2c2c;
31
+ }
32
+
33
+ .PdfHighlighter__tip-container {
34
+ z-index: 6;
35
+ position: absolute;
36
+ }
37
+
38
+ .PdfHighlighter__highlight-layer {
39
+ position: absolute;
40
+ inset: 0;
41
+ z-index: 4;
42
+ pointer-events: none;
43
+ }
44
+
45
+ .textLayer > .PdfHighlighter__highlight-layer {
46
+ z-index: 4;
47
+ }
48
+
49
+ .PdfHighlighter__note-layer {
50
+ position: absolute;
51
+ inset: 0;
52
+ z-index: 5;
53
+ mix-blend-mode: normal;
54
+ pointer-events: none;
55
+ }
56
+
57
+ .PdfHighlighter__config-layer {
58
+ position: absolute;
59
+ inset: 0;
60
+ z-index: 6;
61
+ mix-blend-mode: normal;
62
+ pointer-events: none;
63
+ }
64
+
65
+ .PdfHighlighter__highlight-layer > div,
66
+ .PdfHighlighter__highlight-layer .MonitoredHighlightContainer,
67
+ .PdfHighlighter__highlight-layer .TextHighlight,
68
+ .PdfHighlighter__highlight-layer .AreaHighlight,
69
+ .PdfHighlighter__highlight-layer .FreetextHighlight,
70
+ .PdfHighlighter__highlight-layer .ImageHighlight,
71
+ .PdfHighlighter__highlight-layer .DrawingHighlight,
72
+ .PdfHighlighter__highlight-layer .ShapeHighlight {
73
+ pointer-events: auto;
74
+ }
75
+
76
+ .PdfHighlighter__note-layer > div,
77
+ .PdfHighlighter__note-layer .FreetextHighlight {
78
+ pointer-events: auto;
79
+ }
80
+
81
+ .PdfHighlighter__config-layer > * {
82
+ pointer-events: auto;
83
+ }
84
+
85
+ .PdfHighlighter--disable-selection {
86
+ user-select: none;
87
+ pointer-events: none;
88
+ }
89
+
90
+ .PdfHighlighter--freetext-mode {
91
+ cursor: crosshair;
92
+ }
93
+
94
+ .PdfHighlighter--freetext-mode .pdfViewer,
95
+ .PdfHighlighter--freetext-mode .textLayer {
96
+ cursor: crosshair;
97
+ }
98
+
99
+ .PdfHighlighter--image-mode {
100
+ cursor: crosshair;
101
+ }
102
+
103
+ .PdfHighlighter--image-mode .pdfViewer,
104
+ .PdfHighlighter--image-mode .textLayer {
105
+ cursor: crosshair;
106
+ }
107
+
108
+ .PdfHighlighter--drawing-mode {
109
+ cursor: crosshair;
110
+ }
111
+
112
+ .PdfHighlighter--drawing-mode .pdfViewer,
113
+ .PdfHighlighter--drawing-mode .textLayer {
114
+ cursor: crosshair;
115
+ }
116
+
117
+ .PdfHighlighter--area-mode {
118
+ cursor: crosshair;
119
+ }
120
+
121
+ .PdfHighlighter--area-mode .pdfViewer,
122
+ .PdfHighlighter--area-mode .textLayer {
123
+ cursor: crosshair;
124
+ }
125
+
126
+ /* Dark mode - softer inversion for comfortable reading
127
+ Uses 0.9 intensity by default for a dark gray (~#1a1a1a) instead of pure black.
128
+ The brightness adjustment helps maintain readability.
129
+ Note: These are fallback values - actual intensity is controlled via inline styles
130
+ when darkModeInvertIntensity is customized in the theme prop. */
131
+ .PdfHighlighter--dark .page {
132
+ filter: invert(0.9) hue-rotate(180deg) brightness(1.05);
133
+ }
134
+
135
+ /* Double-invert highlights to preserve their original colors */
136
+ .PdfHighlighter--dark .PdfHighlighter__highlight-layer {
137
+ filter: invert(0.9) hue-rotate(180deg) brightness(0.95);
138
+ }
139
+
140
+ .PdfHighlighter--dark .PdfHighlighter__note-layer {
141
+ filter: invert(0.9) hue-rotate(180deg) brightness(0.95);
142
+ }
143
+
144
+ .PdfHighlighter--dark .PdfHighlighter__config-layer {
145
+ filter: invert(0.9) hue-rotate(180deg) brightness(0.95);
146
+ }
@@ -0,0 +1,47 @@
1
+ .ShapeCanvas {
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ width: 100%;
6
+ height: 100%;
7
+ cursor: crosshair;
8
+ z-index: 1000;
9
+ background: rgba(0, 0, 0, 0.1);
10
+ }
11
+
12
+ .ShapeCanvas__controls {
13
+ position: fixed;
14
+ bottom: 20px;
15
+ left: 50%;
16
+ transform: translateX(-50%);
17
+ display: flex;
18
+ flex-direction: column;
19
+ align-items: center;
20
+ gap: 12px;
21
+ z-index: 1002;
22
+ }
23
+
24
+ .ShapeCanvas__hint {
25
+ background: rgba(0, 0, 0, 0.8);
26
+ color: white;
27
+ padding: 8px 16px;
28
+ border-radius: 6px;
29
+ font-size: 14px;
30
+ white-space: nowrap;
31
+ }
32
+
33
+ .ShapeCanvas__cancelButton {
34
+ padding: 8px 20px;
35
+ background: #f44336;
36
+ color: white;
37
+ border: none;
38
+ border-radius: 4px;
39
+ cursor: pointer;
40
+ font-size: 14px;
41
+ font-weight: 500;
42
+ transition: background 0.2s;
43
+ }
44
+
45
+ .ShapeCanvas__cancelButton:hover {
46
+ background: #d32f2f;
47
+ }
@@ -0,0 +1,182 @@
1
+ .ShapeHighlight {
2
+ position: absolute;
3
+ }
4
+
5
+ .ShapeHighlight__rnd {
6
+ cursor: move;
7
+ }
8
+
9
+ .ShapeHighlight__container {
10
+ width: 100%;
11
+ height: 100%;
12
+ position: relative;
13
+ }
14
+
15
+ .ShapeHighlight__svg {
16
+ width: 100%;
17
+ height: 100%;
18
+ display: block;
19
+ }
20
+
21
+ .ShapeHighlight--scrolledTo .ShapeHighlight__svg rect,
22
+ .ShapeHighlight--scrolledTo .ShapeHighlight__svg ellipse,
23
+ .ShapeHighlight--scrolledTo .ShapeHighlight__svg line {
24
+ stroke: #ff4141 !important;
25
+ }
26
+
27
+ .ShapeHighlight--scrolledTo .ShapeHighlight__svg polygon {
28
+ fill: #ff4141 !important;
29
+ }
30
+
31
+ /* Toolbar wrapper - creates hover bridge between toolbar and shape */
32
+ .ShapeHighlight__toolbar-wrapper {
33
+ z-index: 10;
34
+ }
35
+
36
+ /* Toolbar - appears on hover */
37
+ .ShapeHighlight__toolbar {
38
+ display: flex;
39
+ align-items: center;
40
+ gap: 4px;
41
+ padding: 2px 4px;
42
+ background: rgba(0, 0, 0, 0.7);
43
+ border-radius: 4px;
44
+ opacity: 0;
45
+ pointer-events: none;
46
+ transition: opacity 0.2s ease;
47
+ }
48
+
49
+ .ShapeHighlight__toolbar--visible {
50
+ opacity: 1;
51
+ pointer-events: auto;
52
+ }
53
+
54
+ .ShapeHighlight__style-button,
55
+ .ShapeHighlight__delete-button {
56
+ display: flex;
57
+ align-items: center;
58
+ justify-content: center;
59
+ width: 20px;
60
+ height: 20px;
61
+ border: none;
62
+ background: transparent;
63
+ cursor: pointer;
64
+ color: white;
65
+ border-radius: 3px;
66
+ padding: 0;
67
+ transition: background 0.2s;
68
+ }
69
+
70
+ .ShapeHighlight__style-button:hover {
71
+ background: rgba(255, 255, 255, 0.2);
72
+ }
73
+
74
+ .ShapeHighlight__delete-button:hover {
75
+ background: rgba(255, 100, 100, 0.6);
76
+ }
77
+
78
+ /* Style Panel */
79
+ .ShapeHighlight__style-panel {
80
+ margin-top: 4px;
81
+ background: rgba(0, 0, 0, 0.9);
82
+ border-radius: 6px;
83
+ padding: 8px;
84
+ min-width: 180px;
85
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
86
+ }
87
+
88
+ .ShapeHighlight__style-row {
89
+ display: flex;
90
+ align-items: center;
91
+ justify-content: space-between;
92
+ margin-bottom: 8px;
93
+ }
94
+
95
+ .ShapeHighlight__style-row:last-child {
96
+ margin-bottom: 0;
97
+ }
98
+
99
+ .ShapeHighlight__style-row label {
100
+ color: #ccc;
101
+ font-size: 11px;
102
+ text-transform: uppercase;
103
+ letter-spacing: 0.5px;
104
+ margin-right: 8px;
105
+ }
106
+
107
+ /* Color options */
108
+ .ShapeHighlight__color-options {
109
+ display: flex;
110
+ align-items: center;
111
+ gap: 6px;
112
+ }
113
+
114
+ .ShapeHighlight__color-presets {
115
+ display: flex;
116
+ gap: 4px;
117
+ }
118
+
119
+ .ShapeHighlight__color-preset {
120
+ width: 18px;
121
+ height: 18px;
122
+ border: 2px solid transparent;
123
+ border-radius: 50%;
124
+ cursor: pointer;
125
+ transition: transform 0.2s, border-color 0.2s;
126
+ padding: 0;
127
+ }
128
+
129
+ .ShapeHighlight__color-preset:hover {
130
+ transform: scale(1.15);
131
+ }
132
+
133
+ .ShapeHighlight__color-preset.active {
134
+ border-color: #b958ff;
135
+ }
136
+
137
+ .ShapeHighlight__color-options input[type="color"] {
138
+ width: 24px;
139
+ height: 24px;
140
+ padding: 0;
141
+ border: none;
142
+ border-radius: 4px;
143
+ cursor: pointer;
144
+ background: transparent;
145
+ }
146
+
147
+ .ShapeHighlight__color-options input[type="color"]::-webkit-color-swatch-wrapper {
148
+ padding: 0;
149
+ }
150
+
151
+ .ShapeHighlight__color-options input[type="color"]::-webkit-color-swatch {
152
+ border: 1px solid #666;
153
+ border-radius: 4px;
154
+ }
155
+
156
+ /* Stroke width options */
157
+ .ShapeHighlight__width-options {
158
+ display: flex;
159
+ gap: 4px;
160
+ }
161
+
162
+ .ShapeHighlight__width-button {
163
+ padding: 4px 8px;
164
+ background: transparent;
165
+ border: 1px solid #666;
166
+ border-radius: 4px;
167
+ cursor: pointer;
168
+ color: #ccc;
169
+ font-size: 11px;
170
+ transition: all 0.2s;
171
+ }
172
+
173
+ .ShapeHighlight__width-button:hover {
174
+ border-color: #b958ff;
175
+ color: white;
176
+ }
177
+
178
+ .ShapeHighlight__width-button.active {
179
+ background: rgba(185, 88, 255, 0.2);
180
+ border-color: #b958ff;
181
+ color: #b958ff;
182
+ }
@@ -0,0 +1,83 @@
1
+ .SignaturePad__overlay {
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ right: 0;
6
+ bottom: 0;
7
+ background: rgba(0, 0, 0, 0.5);
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ z-index: 10000;
12
+ }
13
+
14
+ .SignaturePad__modal {
15
+ background: white;
16
+ border-radius: 8px;
17
+ padding: 16px;
18
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
19
+ }
20
+
21
+ .SignaturePad__title {
22
+ margin: 0 0 12px 0;
23
+ font-size: 16px;
24
+ font-weight: 600;
25
+ color: #333;
26
+ }
27
+
28
+ .SignaturePad__canvas {
29
+ display: block;
30
+ border: 1px solid #ccc;
31
+ border-radius: 4px;
32
+ cursor: crosshair;
33
+ touch-action: none;
34
+ background: white;
35
+ }
36
+
37
+ .SignaturePad__buttons {
38
+ display: flex;
39
+ gap: 8px;
40
+ margin-top: 12px;
41
+ justify-content: flex-end;
42
+ }
43
+
44
+ .SignaturePad__button {
45
+ padding: 8px 16px;
46
+ font-size: 14px;
47
+ border-radius: 4px;
48
+ cursor: pointer;
49
+ transition: background-color 0.2s, border-color 0.2s;
50
+ }
51
+
52
+ .SignaturePad__button--clear {
53
+ background: white;
54
+ border: 1px solid #ccc;
55
+ color: #666;
56
+ }
57
+
58
+ .SignaturePad__button--clear:hover {
59
+ background: #f5f5f5;
60
+ border-color: #999;
61
+ }
62
+
63
+ .SignaturePad__button--cancel {
64
+ background: white;
65
+ border: 1px solid #ccc;
66
+ color: #666;
67
+ }
68
+
69
+ .SignaturePad__button--cancel:hover {
70
+ background: #f5f5f5;
71
+ border-color: #999;
72
+ }
73
+
74
+ .SignaturePad__button--done {
75
+ background: #2196f3;
76
+ border: 1px solid #2196f3;
77
+ color: white;
78
+ }
79
+
80
+ .SignaturePad__button--done:hover {
81
+ background: #1976d2;
82
+ border-color: #1976d2;
83
+ }