react-pdf-highlighter-plus 1.0.0
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/LICENSE +22 -0
- package/README.md +411 -0
- package/dist/esm/components/AreaHighlight.d.ts +82 -0
- package/dist/esm/components/AreaHighlight.js +109 -0
- package/dist/esm/components/AreaHighlight.js.map +1 -0
- package/dist/esm/components/DrawingCanvas.d.ts +48 -0
- package/dist/esm/components/DrawingCanvas.js +277 -0
- package/dist/esm/components/DrawingCanvas.js.map +1 -0
- package/dist/esm/components/DrawingHighlight.d.ts +70 -0
- package/dist/esm/components/DrawingHighlight.js +164 -0
- package/dist/esm/components/DrawingHighlight.js.map +1 -0
- package/dist/esm/components/FreetextHighlight.d.ts +112 -0
- package/dist/esm/components/FreetextHighlight.js +193 -0
- package/dist/esm/components/FreetextHighlight.js.map +1 -0
- package/dist/esm/components/HighlightLayer.d.ts +49 -0
- package/dist/esm/components/HighlightLayer.js +37 -0
- package/dist/esm/components/HighlightLayer.js.map +1 -0
- package/dist/esm/components/ImageHighlight.d.ts +63 -0
- package/dist/esm/components/ImageHighlight.js +65 -0
- package/dist/esm/components/ImageHighlight.js.map +1 -0
- package/dist/esm/components/MonitoredHighlightContainer.d.ts +37 -0
- package/dist/esm/components/MonitoredHighlightContainer.js +42 -0
- package/dist/esm/components/MonitoredHighlightContainer.js.map +1 -0
- package/dist/esm/components/MouseMonitor.d.ts +34 -0
- package/dist/esm/components/MouseMonitor.js +30 -0
- package/dist/esm/components/MouseMonitor.js.map +1 -0
- package/dist/esm/components/MouseSelection.d.ts +66 -0
- package/dist/esm/components/MouseSelection.js +122 -0
- package/dist/esm/components/MouseSelection.js.map +1 -0
- package/dist/esm/components/PdfHighlighter.d.ts +184 -0
- package/dist/esm/components/PdfHighlighter.js +410 -0
- package/dist/esm/components/PdfHighlighter.js.map +1 -0
- package/dist/esm/components/PdfLoader.d.ts +55 -0
- package/dist/esm/components/PdfLoader.js +57 -0
- package/dist/esm/components/PdfLoader.js.map +1 -0
- package/dist/esm/components/ShapeCanvas.d.ts +51 -0
- package/dist/esm/components/ShapeCanvas.js +205 -0
- package/dist/esm/components/ShapeCanvas.js.map +1 -0
- package/dist/esm/components/ShapeHighlight.d.ts +107 -0
- package/dist/esm/components/ShapeHighlight.js +140 -0
- package/dist/esm/components/ShapeHighlight.js.map +1 -0
- package/dist/esm/components/SignaturePad.d.ts +40 -0
- package/dist/esm/components/SignaturePad.js +138 -0
- package/dist/esm/components/SignaturePad.js.map +1 -0
- package/dist/esm/components/TextHighlight.d.ts +93 -0
- package/dist/esm/components/TextHighlight.js +115 -0
- package/dist/esm/components/TextHighlight.js.map +1 -0
- package/dist/esm/components/TipContainer.d.ts +27 -0
- package/dist/esm/components/TipContainer.js +58 -0
- package/dist/esm/components/TipContainer.js.map +1 -0
- package/dist/esm/contexts/HighlightContext.d.ts +44 -0
- package/dist/esm/contexts/HighlightContext.js +16 -0
- package/dist/esm/contexts/HighlightContext.js.map +1 -0
- package/dist/esm/contexts/PdfHighlighterContext.d.ts +89 -0
- package/dist/esm/contexts/PdfHighlighterContext.js +16 -0
- package/dist/esm/contexts/PdfHighlighterContext.js.map +1 -0
- package/dist/esm/index.d.ts +19 -0
- package/dist/esm/index.js +19 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/coordinates.d.ts +16 -0
- package/dist/esm/lib/coordinates.js +69 -0
- package/dist/esm/lib/coordinates.js.map +1 -0
- package/dist/esm/lib/export-pdf.d.ts +81 -0
- package/dist/esm/lib/export-pdf.js +511 -0
- package/dist/esm/lib/export-pdf.js.map +1 -0
- package/dist/esm/lib/get-bounding-rect.d.ts +3 -0
- package/dist/esm/lib/get-bounding-rect.js +35 -0
- package/dist/esm/lib/get-bounding-rect.js.map +1 -0
- package/dist/esm/lib/get-client-rects.d.ts +3 -0
- package/dist/esm/lib/get-client-rects.js +43 -0
- package/dist/esm/lib/get-client-rects.js.map +1 -0
- package/dist/esm/lib/group-highlights-by-page.d.ts +6 -0
- package/dist/esm/lib/group-highlights-by-page.js +23 -0
- package/dist/esm/lib/group-highlights-by-page.js.map +1 -0
- package/dist/esm/lib/optimize-client-rects.d.ts +3 -0
- package/dist/esm/lib/optimize-client-rects.js +65 -0
- package/dist/esm/lib/optimize-client-rects.js.map +1 -0
- package/dist/esm/lib/pdfjs-dom.d.ts +9 -0
- package/dist/esm/lib/pdfjs-dom.js +55 -0
- package/dist/esm/lib/pdfjs-dom.js.map +1 -0
- package/dist/esm/lib/screenshot.d.ts +4 -0
- package/dist/esm/lib/screenshot.js +24 -0
- package/dist/esm/lib/screenshot.js.map +1 -0
- package/dist/esm/style/AreaHighlight.css +134 -0
- package/dist/esm/style/DrawingCanvas.css +62 -0
- package/dist/esm/style/DrawingHighlight.css +184 -0
- package/dist/esm/style/FreetextHighlight.css +249 -0
- package/dist/esm/style/ImageHighlight.css +97 -0
- package/dist/esm/style/MouseSelection.css +15 -0
- package/dist/esm/style/PdfHighlighter.css +77 -0
- package/dist/esm/style/ShapeCanvas.css +47 -0
- package/dist/esm/style/ShapeHighlight.css +182 -0
- package/dist/esm/style/SignaturePad.css +83 -0
- package/dist/esm/style/TextHighlight.css +199 -0
- package/dist/esm/style/pdf_viewer.css +41 -0
- package/dist/esm/types.d.ts +213 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/package.json +91 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
.FreetextHighlight {
|
|
2
|
+
position: absolute;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.FreetextHighlight__container {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
border-radius: 4px;
|
|
11
|
+
box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
|
|
12
|
+
overflow: visible;
|
|
13
|
+
transition: box-shadow 0.2s ease;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.FreetextHighlight__container:hover {
|
|
17
|
+
box-shadow: 2px 2px 12px rgba(0, 0, 0, 0.3);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.FreetextHighlight__toolbar {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: 4px;
|
|
24
|
+
padding: 2px 4px;
|
|
25
|
+
background: rgba(0, 0, 0, 0.6);
|
|
26
|
+
border-radius: 4px;
|
|
27
|
+
position: absolute;
|
|
28
|
+
top: 4px;
|
|
29
|
+
left: 4px;
|
|
30
|
+
z-index: 10;
|
|
31
|
+
opacity: 0;
|
|
32
|
+
transition: opacity 0.2s ease;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.FreetextHighlight__container:hover .FreetextHighlight__toolbar {
|
|
36
|
+
opacity: 1;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.FreetextHighlight__drag-handle {
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
width: 20px;
|
|
44
|
+
height: 20px;
|
|
45
|
+
cursor: grab;
|
|
46
|
+
user-select: none;
|
|
47
|
+
color: white;
|
|
48
|
+
border-radius: 3px;
|
|
49
|
+
transition: background 0.2s;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.FreetextHighlight__drag-handle:hover {
|
|
53
|
+
background: rgba(255, 255, 255, 0.2);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.FreetextHighlight__drag-handle:active {
|
|
57
|
+
cursor: grabbing;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.FreetextHighlight__edit-button {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
justify-content: center;
|
|
64
|
+
width: 20px;
|
|
65
|
+
height: 20px;
|
|
66
|
+
border: none;
|
|
67
|
+
background: transparent;
|
|
68
|
+
cursor: pointer;
|
|
69
|
+
color: white;
|
|
70
|
+
border-radius: 3px;
|
|
71
|
+
padding: 0;
|
|
72
|
+
transition: background 0.2s;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.FreetextHighlight__edit-button:hover {
|
|
76
|
+
background: rgba(255, 255, 255, 0.2);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.FreetextHighlight__content {
|
|
80
|
+
flex: 1;
|
|
81
|
+
padding: 8px;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
position: relative;
|
|
84
|
+
z-index: 1;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.FreetextHighlight__text {
|
|
88
|
+
width: 100%;
|
|
89
|
+
height: 100%;
|
|
90
|
+
cursor: text;
|
|
91
|
+
overflow: auto;
|
|
92
|
+
word-wrap: break-word;
|
|
93
|
+
white-space: pre-wrap;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.FreetextHighlight__input {
|
|
97
|
+
width: 100%;
|
|
98
|
+
height: 100%;
|
|
99
|
+
border: none;
|
|
100
|
+
background: transparent;
|
|
101
|
+
font: inherit;
|
|
102
|
+
color: inherit;
|
|
103
|
+
resize: none;
|
|
104
|
+
outline: none;
|
|
105
|
+
padding: 0;
|
|
106
|
+
margin: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.FreetextHighlight--scrolledTo .FreetextHighlight__container {
|
|
110
|
+
box-shadow: 0 0 0 3px #ff4141, 2px 2px 8px rgba(0, 0, 0, 0.2);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.FreetextHighlight--editing .FreetextHighlight__container {
|
|
114
|
+
box-shadow: 0 0 0 2px #4a90d9, 2px 2px 8px rgba(0, 0, 0, 0.2);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.FreetextHighlight__style-button {
|
|
118
|
+
display: flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
justify-content: center;
|
|
121
|
+
width: 20px;
|
|
122
|
+
height: 20px;
|
|
123
|
+
border: none;
|
|
124
|
+
background: transparent;
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
color: white;
|
|
127
|
+
border-radius: 3px;
|
|
128
|
+
padding: 0;
|
|
129
|
+
transition: background 0.2s;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.FreetextHighlight__style-button:hover {
|
|
133
|
+
background: rgba(255, 255, 255, 0.2);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.FreetextHighlight__style-panel {
|
|
137
|
+
position: absolute;
|
|
138
|
+
top: 100%;
|
|
139
|
+
left: 0;
|
|
140
|
+
right: 0;
|
|
141
|
+
background: white;
|
|
142
|
+
border: 1px solid rgba(0, 0, 0, 0.15);
|
|
143
|
+
border-radius: 4px;
|
|
144
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
|
|
145
|
+
padding: 8px;
|
|
146
|
+
z-index: 9999;
|
|
147
|
+
margin-top: 2px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.FreetextHighlight__style-row {
|
|
151
|
+
display: flex;
|
|
152
|
+
flex-direction: column;
|
|
153
|
+
align-items: flex-start;
|
|
154
|
+
gap: 4px;
|
|
155
|
+
margin-bottom: 8px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.FreetextHighlight__style-row:last-child {
|
|
159
|
+
margin-bottom: 0;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.FreetextHighlight__style-row label {
|
|
163
|
+
font-size: 11px;
|
|
164
|
+
color: #555;
|
|
165
|
+
white-space: nowrap;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.FreetextHighlight__style-row input[type="color"] {
|
|
169
|
+
width: 28px;
|
|
170
|
+
height: 24px;
|
|
171
|
+
border: 1px solid rgba(0, 0, 0, 0.15);
|
|
172
|
+
border-radius: 3px;
|
|
173
|
+
padding: 0;
|
|
174
|
+
cursor: pointer;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.FreetextHighlight__style-row select {
|
|
178
|
+
padding: 4px 6px;
|
|
179
|
+
font-size: 11px;
|
|
180
|
+
border: 1px solid rgba(0, 0, 0, 0.15);
|
|
181
|
+
border-radius: 3px;
|
|
182
|
+
background: white;
|
|
183
|
+
cursor: pointer;
|
|
184
|
+
min-width: 80px;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.FreetextHighlight__color-options {
|
|
188
|
+
display: flex;
|
|
189
|
+
align-items: center;
|
|
190
|
+
gap: 6px;
|
|
191
|
+
flex-wrap: wrap;
|
|
192
|
+
width: 100%;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.FreetextHighlight__color-presets {
|
|
196
|
+
display: flex;
|
|
197
|
+
gap: 4px;
|
|
198
|
+
flex-wrap: wrap;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.FreetextHighlight__color-preset {
|
|
202
|
+
width: 20px;
|
|
203
|
+
height: 20px;
|
|
204
|
+
border: 2px solid rgba(0, 0, 0, 0.15);
|
|
205
|
+
border-radius: 3px;
|
|
206
|
+
cursor: pointer;
|
|
207
|
+
padding: 0;
|
|
208
|
+
transition: transform 0.15s, border-color 0.15s;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.FreetextHighlight__color-preset:hover {
|
|
212
|
+
transform: scale(1.15);
|
|
213
|
+
border-color: rgba(0, 0, 0, 0.3);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.FreetextHighlight__color-preset.active {
|
|
217
|
+
border-color: #333;
|
|
218
|
+
box-shadow: 0 0 0 1px white, 0 0 0 2px #333;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.FreetextHighlight__color-preset--transparent {
|
|
222
|
+
background:
|
|
223
|
+
linear-gradient(45deg, #ccc 25%, transparent 25%),
|
|
224
|
+
linear-gradient(-45deg, #ccc 25%, transparent 25%),
|
|
225
|
+
linear-gradient(45deg, transparent 75%, #ccc 75%),
|
|
226
|
+
linear-gradient(-45deg, transparent 75%, #ccc 75%);
|
|
227
|
+
background-size: 8px 8px;
|
|
228
|
+
background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
|
|
229
|
+
background-color: white;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.FreetextHighlight__delete-button {
|
|
233
|
+
display: flex;
|
|
234
|
+
align-items: center;
|
|
235
|
+
justify-content: center;
|
|
236
|
+
width: 20px;
|
|
237
|
+
height: 20px;
|
|
238
|
+
border: none;
|
|
239
|
+
background: transparent;
|
|
240
|
+
cursor: pointer;
|
|
241
|
+
color: white;
|
|
242
|
+
border-radius: 3px;
|
|
243
|
+
padding: 0;
|
|
244
|
+
transition: background 0.2s;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.FreetextHighlight__delete-button:hover {
|
|
248
|
+
background: rgba(255, 100, 100, 0.6);
|
|
249
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
opacity: 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ImageHighlight__drag-handle {
|
|
39
|
+
display: flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
width: 20px;
|
|
43
|
+
height: 20px;
|
|
44
|
+
cursor: grab;
|
|
45
|
+
color: white;
|
|
46
|
+
border-radius: 3px;
|
|
47
|
+
transition: background 0.2s;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ImageHighlight__drag-handle:hover {
|
|
51
|
+
background: rgba(255, 255, 255, 0.2);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.ImageHighlight__drag-handle:active {
|
|
55
|
+
cursor: grabbing;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.ImageHighlight__content {
|
|
59
|
+
flex: 1;
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
background: white;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
border-radius: 4px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.ImageHighlight__image {
|
|
69
|
+
width: 100%;
|
|
70
|
+
height: 100%;
|
|
71
|
+
object-fit: fill;
|
|
72
|
+
pointer-events: none;
|
|
73
|
+
user-select: none;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.ImageHighlight--scrolledTo .ImageHighlight__container {
|
|
77
|
+
box-shadow: 0 0 0 3px #ff4141, 2px 2px 8px rgba(0, 0, 0, 0.2);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.ImageHighlight__delete-button {
|
|
81
|
+
display: flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
justify-content: center;
|
|
84
|
+
width: 20px;
|
|
85
|
+
height: 20px;
|
|
86
|
+
border: none;
|
|
87
|
+
background: transparent;
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
color: white;
|
|
90
|
+
border-radius: 3px;
|
|
91
|
+
padding: 0;
|
|
92
|
+
transition: background 0.2s;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.ImageHighlight__delete-button:hover {
|
|
96
|
+
background: rgba(255, 100, 100, 0.6);
|
|
97
|
+
}
|
|
@@ -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,77 @@
|
|
|
1
|
+
.PdfHighlighter {
|
|
2
|
+
position: absolute;
|
|
3
|
+
overflow: auto;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
background-color: #333;
|
|
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--disable-selection {
|
|
39
|
+
user-select: none;
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.PdfHighlighter--freetext-mode {
|
|
44
|
+
cursor: crosshair;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.PdfHighlighter--freetext-mode .pdfViewer,
|
|
48
|
+
.PdfHighlighter--freetext-mode .textLayer {
|
|
49
|
+
cursor: crosshair;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.PdfHighlighter--image-mode {
|
|
53
|
+
cursor: crosshair;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.PdfHighlighter--image-mode .pdfViewer,
|
|
57
|
+
.PdfHighlighter--image-mode .textLayer {
|
|
58
|
+
cursor: crosshair;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.PdfHighlighter--drawing-mode {
|
|
62
|
+
cursor: crosshair;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.PdfHighlighter--drawing-mode .pdfViewer,
|
|
66
|
+
.PdfHighlighter--drawing-mode .textLayer {
|
|
67
|
+
cursor: crosshair;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.PdfHighlighter--area-mode {
|
|
71
|
+
cursor: crosshair;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.PdfHighlighter--area-mode .pdfViewer,
|
|
75
|
+
.PdfHighlighter--area-mode .textLayer {
|
|
76
|
+
cursor: crosshair;
|
|
77
|
+
}
|
|
@@ -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
|
+
}
|