react-pdf-highlighter-plus 1.1.3 → 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.
@@ -6,11 +6,13 @@
6
6
  cursor: pointer;
7
7
  position: absolute;
8
8
  background: rgba(255, 226, 143, 1);
9
- transition: background 0.3s;
9
+ transition: background 0.3s, box-shadow 0.2s ease;
10
10
  }
11
11
 
12
12
  .AreaHighlight--scrolledTo .AreaHighlight__part {
13
- background: #ff4141;
13
+ box-shadow:
14
+ 0 0 0 2px #ff4141,
15
+ 0 0 0 4px rgba(255, 65, 65, 0.2);
14
16
  }
15
17
 
16
18
  /* Toolbar wrapper - creates hover bridge between toolbar and highlight */
@@ -37,6 +39,7 @@
37
39
  }
38
40
 
39
41
  .AreaHighlight__style-button,
42
+ .AreaHighlight__copy-button,
40
43
  .AreaHighlight__delete-button {
41
44
  display: flex;
42
45
  align-items: center;
@@ -56,6 +59,10 @@
56
59
  background: rgba(255, 255, 255, 0.2);
57
60
  }
58
61
 
62
+ .AreaHighlight__copy-button:hover {
63
+ background: rgba(255, 255, 255, 0.2);
64
+ }
65
+
59
66
  .AreaHighlight__delete-button:hover {
60
67
  background: rgba(255, 100, 100, 0.6);
61
68
  }
@@ -31,6 +31,16 @@
31
31
  transition: opacity 0.2s ease;
32
32
  }
33
33
 
34
+ .DrawingHighlight__toolbar--floating {
35
+ position: absolute;
36
+ top: auto;
37
+ left: auto;
38
+ }
39
+
40
+ .DrawingHighlight__toolbar--visible {
41
+ opacity: 1;
42
+ }
43
+
34
44
  .DrawingHighlight__container:hover .DrawingHighlight__toolbar {
35
45
  opacity: 1;
36
46
  }
@@ -1,5 +1,16 @@
1
1
  .FreetextHighlight {
2
2
  position: absolute;
3
+ z-index: 30;
4
+ isolation: isolate;
5
+ }
6
+
7
+ .FreetextHighlight--editing,
8
+ .FreetextHighlight:hover {
9
+ z-index: 40;
10
+ }
11
+
12
+ .FreetextHighlight--collapsed {
13
+ z-index: 35;
3
14
  }
4
15
 
5
16
  .FreetextHighlight__container {
@@ -13,6 +24,10 @@
13
24
  transition: box-shadow 0.2s ease;
14
25
  }
15
26
 
27
+ .FreetextHighlight__rnd {
28
+ z-index: inherit;
29
+ }
30
+
16
31
  .FreetextHighlight__container:hover {
17
32
  box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.3);
18
33
  }
@@ -247,3 +262,48 @@
247
262
  .FreetextHighlight__delete-button:hover {
248
263
  background: rgba(255, 100, 100, 0.6);
249
264
  }
265
+
266
+ .FreetextHighlight__collapse-button {
267
+ display: flex;
268
+ align-items: center;
269
+ justify-content: center;
270
+ width: 20px;
271
+ height: 20px;
272
+ border: none;
273
+ background: transparent;
274
+ cursor: pointer;
275
+ color: white;
276
+ border-radius: 3px;
277
+ padding: 0;
278
+ transition: background 0.2s;
279
+ }
280
+
281
+ .FreetextHighlight__collapse-button:hover {
282
+ background: rgba(255, 255, 255, 0.2);
283
+ }
284
+
285
+ .FreetextHighlight--collapsed .FreetextHighlight__container {
286
+ align-items: center;
287
+ justify-content: center;
288
+ border-radius: 999px;
289
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
290
+ overflow: hidden;
291
+ }
292
+
293
+ .FreetextHighlight__compact-button {
294
+ display: flex;
295
+ align-items: center;
296
+ justify-content: center;
297
+ width: 100%;
298
+ height: 100%;
299
+ border: none;
300
+ border-radius: inherit;
301
+ background: transparent;
302
+ color: inherit;
303
+ cursor: pointer;
304
+ padding: 0;
305
+ }
306
+
307
+ .FreetextHighlight__compact-button:hover {
308
+ background: rgba(0, 0, 0, 0.08);
309
+ }
@@ -31,7 +31,8 @@
31
31
  transition: opacity 0.2s ease;
32
32
  }
33
33
 
34
- .ImageHighlight__container:hover .ImageHighlight__toolbar {
34
+ .ImageHighlight__container:hover .ImageHighlight__toolbar,
35
+ .ImageHighlight--scrolledTo .ImageHighlight__toolbar {
35
36
  opacity: 1;
36
37
  }
37
38
 
@@ -35,6 +35,53 @@
35
35
  position: absolute;
36
36
  }
37
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
+
38
85
  .PdfHighlighter--disable-selection {
39
86
  user-select: none;
40
87
  pointer-events: none;
@@ -89,3 +136,11 @@
89
136
  .PdfHighlighter--dark .PdfHighlighter__highlight-layer {
90
137
  filter: invert(0.9) hue-rotate(180deg) brightness(0.95);
91
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
+ }
@@ -10,11 +10,13 @@
10
10
  cursor: pointer;
11
11
  position: absolute;
12
12
  background: rgba(255, 226, 143, 1);
13
- transition: background 0.3s;
13
+ transition: background 0.3s, box-shadow 0.2s ease;
14
14
  }
15
15
 
16
16
  .TextHighlight--scrolledTo .TextHighlight__part {
17
- background: #ff4141;
17
+ box-shadow:
18
+ 0 0 0 2px #ff4141,
19
+ 0 0 0 4px rgba(255, 65, 65, 0.2);
18
20
  }
19
21
 
20
22
  /* Toolbar wrapper - creates hover bridge between toolbar and highlight */
@@ -41,6 +43,7 @@
41
43
  }
42
44
 
43
45
  .TextHighlight__style-button,
46
+ .TextHighlight__copy-button,
44
47
  .TextHighlight__delete-button {
45
48
  display: flex;
46
49
  align-items: center;
@@ -60,6 +63,10 @@
60
63
  background: rgba(255, 255, 255, 0.2);
61
64
  }
62
65
 
66
+ .TextHighlight__copy-button:hover {
67
+ background: rgba(255, 255, 255, 0.2);
68
+ }
69
+
63
70
  .TextHighlight__delete-button:hover {
64
71
  background: rgba(255, 100, 100, 0.6);
65
72
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-pdf-highlighter-plus",
3
3
  "type": "module",
4
- "version": "1.1.3",
4
+ "version": "1.1.4",
5
5
  "description": "Set of modern React components for PDF highlighting",
6
6
  "author": "Edward Ha <quocvietha08@gmail.com>",
7
7
  "license": "MIT",