lcms-pdf-annotation 0.0.0-stage → 1.0.2
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/README.md +361 -2
- package/dist/TwoDshapes.d.ts +20 -0
- package/dist/TwoDshapes.js +148 -0
- package/dist/TwoDshapes.js.map +1 -0
- package/dist/assets/cursor-highlighter.svg +5 -0
- package/dist/assets/cursor-pencil.svg +6 -0
- package/dist/constants.d.ts +80 -0
- package/dist/constants.js +81 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.css +515 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +969 -0
- package/dist/index.js.map +1 -0
- package/dist/interface.d.ts +69 -0
- package/dist/interface.js +2 -0
- package/dist/interface.js.map +1 -0
- package/dist/utils.d.ts +33 -0
- package/dist/utils.js +225 -0
- package/dist/utils.js.map +1 -0
- package/package.json +72 -4
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export const COLORS = {
|
|
2
|
+
PEN: {
|
|
3
|
+
default: '#f8f8f8',
|
|
4
|
+
black: '#262626',
|
|
5
|
+
silver: '#c0c0c0',
|
|
6
|
+
gray: '#808080',
|
|
7
|
+
red: '#ff0000',
|
|
8
|
+
maroon: '#800000',
|
|
9
|
+
yellow: '#ffff00',
|
|
10
|
+
olive: '#808000',
|
|
11
|
+
lime: '#00ff00',
|
|
12
|
+
green: '#008000',
|
|
13
|
+
aqua: '#00ffff',
|
|
14
|
+
teal: '#008080',
|
|
15
|
+
blue: '#0000ff',
|
|
16
|
+
navy: '#000080',
|
|
17
|
+
fuchsia: '#ff00ff',
|
|
18
|
+
purple: '#800080'
|
|
19
|
+
},
|
|
20
|
+
HIGHLIGHTER: {
|
|
21
|
+
default: 'rgba(225, 203, 5, 0.7)',
|
|
22
|
+
blue: 'rgba(39, 152, 177, 0.7)',
|
|
23
|
+
purple: 'rgba(234, 151, 255, 0.7)',
|
|
24
|
+
green: 'rgba(100, 255, 75, 0.7)',
|
|
25
|
+
orange: 'rgba(255, 172, 75, 0.7)'
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
export const TOOLS = {
|
|
29
|
+
SELECT: 'select',
|
|
30
|
+
LASER: 'laser',
|
|
31
|
+
PEN: 'pen',
|
|
32
|
+
ERASER: 'eraser',
|
|
33
|
+
HIGHLIGHTER: 'highlighter',
|
|
34
|
+
SHAPES: {
|
|
35
|
+
TWO_D: {
|
|
36
|
+
LINE: 'line',
|
|
37
|
+
PARABOLA: 'parabola',
|
|
38
|
+
RECTANGLE: 'rectangle',
|
|
39
|
+
CIRCLE: 'circle',
|
|
40
|
+
TRIANGLE: 'triangle',
|
|
41
|
+
PENTAGON: 'pentagon',
|
|
42
|
+
HEXAGON: 'hexagon',
|
|
43
|
+
OCTAGON: 'octagon',
|
|
44
|
+
TWO_D_GRAPH: 'twoDgraph',
|
|
45
|
+
THREE_D_GRAPH: 'threeDgraph',
|
|
46
|
+
ARROW: 'arrowline'
|
|
47
|
+
},
|
|
48
|
+
THREE_D: {
|
|
49
|
+
CUBE: 'cuboid',
|
|
50
|
+
CONE: 'cone',
|
|
51
|
+
CYLINDER: 'cylinder'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
TEXT: 'text'
|
|
55
|
+
};
|
|
56
|
+
export const LINEWIDTH = {
|
|
57
|
+
PEN: {
|
|
58
|
+
small: 2,
|
|
59
|
+
medium: 4,
|
|
60
|
+
large: 6
|
|
61
|
+
},
|
|
62
|
+
HIGHLIGHTER: {
|
|
63
|
+
small: 16,
|
|
64
|
+
medium: 18,
|
|
65
|
+
large: 24
|
|
66
|
+
},
|
|
67
|
+
ERASER: {
|
|
68
|
+
small: 16,
|
|
69
|
+
medium: 36,
|
|
70
|
+
large: 60
|
|
71
|
+
},
|
|
72
|
+
DEFAULT: 2
|
|
73
|
+
};
|
|
74
|
+
export const TOOLS_CLASSES = {
|
|
75
|
+
select: '',
|
|
76
|
+
pen: 'pen',
|
|
77
|
+
eraser: 'eraser',
|
|
78
|
+
highlighter: 'highlighter'
|
|
79
|
+
};
|
|
80
|
+
export const TEXT_MAX_WIDTH = 400;
|
|
81
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,GAAG,EAAE;QACH,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,SAAS;QACjB,IAAI,EAAE,SAAS;QACf,GAAG,EAAE,SAAS;QACd,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,SAAS;KAClB;IACD,WAAW,EAAE;QACX,OAAO,EAAE,wBAAwB;QACjC,IAAI,EAAE,yBAAyB;QAC/B,MAAM,EAAE,0BAA0B;QAClC,KAAK,EAAE,yBAAyB;QAChC,MAAM,EAAE,yBAAyB;KAClC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,aAAa;IAC1B,MAAM,EAAE;QACN,KAAK,EAAE;YACL,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,UAAU;YACpB,SAAS,EAAE,WAAW;YACtB,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,UAAU;YACpB,QAAQ,EAAE,UAAU;YACpB,OAAO,EAAE,SAAS;YAClB,OAAO,EAAE,SAAS;YAClB,WAAW,EAAE,WAAW;YACxB,aAAa,EAAE,aAAa;YAC5B,KAAK,EAAE,WAAW;SACnB;QACD,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,UAAU;SACrB;KACF;IACD,IAAI,EAAE,MAAM;CACb,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,GAAG,EAAE;QACH,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,CAAC;QACT,KAAK,EAAE,CAAC;KACT;IACD,WAAW,EAAE;QACX,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;KACV;IACD,MAAM,EAAE;QACN,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;KACV;IACD,OAAO,EAAE,CAAC;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,MAAM,EAAE,EAAE;IACV,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,aAAa;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC"}
|
package/dist/index.css
ADDED
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties;
|
|
3
|
+
@layer theme, base, components, utilities;
|
|
4
|
+
@layer theme {
|
|
5
|
+
:root, :host {
|
|
6
|
+
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
|
|
7
|
+
"Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
|
|
8
|
+
"Segoe UI Symbol", "Noto Color Emoji";
|
|
9
|
+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
|
10
|
+
"Courier New", monospace;
|
|
11
|
+
--color-yellow-400: oklch(85.2% 0.199 91.936);
|
|
12
|
+
--color-green-600: oklch(62.7% 0.194 149.214);
|
|
13
|
+
--color-blue-500: oklch(62.3% 0.214 259.815);
|
|
14
|
+
--color-blue-600: oklch(54.6% 0.245 262.881);
|
|
15
|
+
--color-gray-100: oklch(96.7% 0.003 264.542);
|
|
16
|
+
--color-gray-200: oklch(92.8% 0.006 264.531);
|
|
17
|
+
--color-gray-400: oklch(70.7% 0.022 261.325);
|
|
18
|
+
--color-gray-500: oklch(55.1% 0.027 264.364);
|
|
19
|
+
--color-black: #000;
|
|
20
|
+
--color-white: #fff;
|
|
21
|
+
--spacing: 0.25rem;
|
|
22
|
+
--text-xs: 0.75rem;
|
|
23
|
+
--text-xs--line-height: calc(1 / 0.75);
|
|
24
|
+
--text-sm: 0.875rem;
|
|
25
|
+
--text-sm--line-height: calc(1.25 / 0.875);
|
|
26
|
+
--font-weight-semibold: 600;
|
|
27
|
+
--default-font-family: var(--font-sans);
|
|
28
|
+
--default-mono-font-family: var(--font-mono);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
@layer base {
|
|
32
|
+
*, ::after, ::before, ::backdrop, ::file-selector-button {
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
margin: 0;
|
|
35
|
+
padding: 0;
|
|
36
|
+
border: 0 solid;
|
|
37
|
+
}
|
|
38
|
+
html, :host {
|
|
39
|
+
line-height: 1.5;
|
|
40
|
+
-webkit-text-size-adjust: 100%;
|
|
41
|
+
tab-size: 4;
|
|
42
|
+
font-family: var(--default-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
|
|
43
|
+
font-feature-settings: var(--default-font-feature-settings, normal);
|
|
44
|
+
font-variation-settings: var(--default-font-variation-settings, normal);
|
|
45
|
+
-webkit-tap-highlight-color: transparent;
|
|
46
|
+
}
|
|
47
|
+
hr {
|
|
48
|
+
height: 0;
|
|
49
|
+
color: inherit;
|
|
50
|
+
border-top-width: 1px;
|
|
51
|
+
}
|
|
52
|
+
abbr:where([title]) {
|
|
53
|
+
-webkit-text-decoration: underline dotted;
|
|
54
|
+
text-decoration: underline dotted;
|
|
55
|
+
}
|
|
56
|
+
h1, h2, h3, h4, h5, h6 {
|
|
57
|
+
font-size: inherit;
|
|
58
|
+
font-weight: inherit;
|
|
59
|
+
}
|
|
60
|
+
a {
|
|
61
|
+
color: inherit;
|
|
62
|
+
-webkit-text-decoration: inherit;
|
|
63
|
+
text-decoration: inherit;
|
|
64
|
+
}
|
|
65
|
+
b, strong {
|
|
66
|
+
font-weight: bolder;
|
|
67
|
+
}
|
|
68
|
+
code, kbd, samp, pre {
|
|
69
|
+
font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
|
|
70
|
+
font-feature-settings: var(--default-mono-font-feature-settings, normal);
|
|
71
|
+
font-variation-settings: var(--default-mono-font-variation-settings, normal);
|
|
72
|
+
font-size: 1em;
|
|
73
|
+
}
|
|
74
|
+
small {
|
|
75
|
+
font-size: 80%;
|
|
76
|
+
}
|
|
77
|
+
sub, sup {
|
|
78
|
+
font-size: 75%;
|
|
79
|
+
line-height: 0;
|
|
80
|
+
position: relative;
|
|
81
|
+
vertical-align: baseline;
|
|
82
|
+
}
|
|
83
|
+
sub {
|
|
84
|
+
bottom: -0.25em;
|
|
85
|
+
}
|
|
86
|
+
sup {
|
|
87
|
+
top: -0.5em;
|
|
88
|
+
}
|
|
89
|
+
table {
|
|
90
|
+
text-indent: 0;
|
|
91
|
+
border-color: inherit;
|
|
92
|
+
border-collapse: collapse;
|
|
93
|
+
}
|
|
94
|
+
:-moz-focusring:where(:not(iframe)) {
|
|
95
|
+
outline: auto;
|
|
96
|
+
}
|
|
97
|
+
progress {
|
|
98
|
+
vertical-align: baseline;
|
|
99
|
+
}
|
|
100
|
+
summary {
|
|
101
|
+
display: list-item;
|
|
102
|
+
}
|
|
103
|
+
ol, ul, menu {
|
|
104
|
+
list-style: none;
|
|
105
|
+
}
|
|
106
|
+
img, svg, video, canvas, audio, iframe, embed, object {
|
|
107
|
+
display: block;
|
|
108
|
+
vertical-align: middle;
|
|
109
|
+
}
|
|
110
|
+
img, video {
|
|
111
|
+
max-width: 100%;
|
|
112
|
+
height: auto;
|
|
113
|
+
}
|
|
114
|
+
button, input, select, optgroup, textarea, ::file-selector-button {
|
|
115
|
+
font: inherit;
|
|
116
|
+
font-feature-settings: inherit;
|
|
117
|
+
font-variation-settings: inherit;
|
|
118
|
+
letter-spacing: inherit;
|
|
119
|
+
color: inherit;
|
|
120
|
+
border-radius: 0;
|
|
121
|
+
background-color: transparent;
|
|
122
|
+
opacity: 1;
|
|
123
|
+
}
|
|
124
|
+
:where(select:is([multiple], [size])) optgroup {
|
|
125
|
+
font-weight: bolder;
|
|
126
|
+
}
|
|
127
|
+
:where(select:is([multiple], [size])) optgroup option {
|
|
128
|
+
padding-inline-start: 20px;
|
|
129
|
+
}
|
|
130
|
+
::file-selector-button {
|
|
131
|
+
margin-inline-end: 4px;
|
|
132
|
+
}
|
|
133
|
+
::placeholder {
|
|
134
|
+
opacity: 1;
|
|
135
|
+
}
|
|
136
|
+
@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
|
|
137
|
+
::placeholder {
|
|
138
|
+
color: currentcolor;
|
|
139
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
140
|
+
color: color-mix(in oklab, currentcolor 50%, transparent);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
textarea {
|
|
145
|
+
resize: vertical;
|
|
146
|
+
}
|
|
147
|
+
::-webkit-search-decoration {
|
|
148
|
+
-webkit-appearance: none;
|
|
149
|
+
}
|
|
150
|
+
::-webkit-date-and-time-value {
|
|
151
|
+
min-height: 1lh;
|
|
152
|
+
text-align: inherit;
|
|
153
|
+
}
|
|
154
|
+
::-webkit-datetime-edit {
|
|
155
|
+
display: inline-flex;
|
|
156
|
+
}
|
|
157
|
+
::-webkit-datetime-edit-fields-wrapper {
|
|
158
|
+
padding: 0;
|
|
159
|
+
}
|
|
160
|
+
::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
|
|
161
|
+
padding-block: 0;
|
|
162
|
+
}
|
|
163
|
+
::-webkit-calendar-picker-indicator {
|
|
164
|
+
line-height: 1;
|
|
165
|
+
}
|
|
166
|
+
:-moz-ui-invalid {
|
|
167
|
+
box-shadow: none;
|
|
168
|
+
}
|
|
169
|
+
button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
|
|
170
|
+
appearance: button;
|
|
171
|
+
}
|
|
172
|
+
::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
|
|
173
|
+
height: auto;
|
|
174
|
+
}
|
|
175
|
+
[hidden]:where(:not([hidden="until-found"])) {
|
|
176
|
+
display: none !important;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
@layer utilities {
|
|
180
|
+
.pointer-events-none {
|
|
181
|
+
pointer-events: none;
|
|
182
|
+
}
|
|
183
|
+
.absolute {
|
|
184
|
+
position: absolute;
|
|
185
|
+
}
|
|
186
|
+
.relative {
|
|
187
|
+
position: relative;
|
|
188
|
+
}
|
|
189
|
+
.top-0 {
|
|
190
|
+
top: 0px;
|
|
191
|
+
}
|
|
192
|
+
.left-0 {
|
|
193
|
+
left: 0px;
|
|
194
|
+
}
|
|
195
|
+
.z-0 {
|
|
196
|
+
z-index: 0;
|
|
197
|
+
}
|
|
198
|
+
.z-10 {
|
|
199
|
+
z-index: 10;
|
|
200
|
+
}
|
|
201
|
+
.z-20 {
|
|
202
|
+
z-index: 20;
|
|
203
|
+
}
|
|
204
|
+
.z-30 {
|
|
205
|
+
z-index: 30;
|
|
206
|
+
}
|
|
207
|
+
.container {
|
|
208
|
+
width: 100%;
|
|
209
|
+
@media (width >= 40rem) {
|
|
210
|
+
max-width: 40rem;
|
|
211
|
+
}
|
|
212
|
+
@media (width >= 48rem) {
|
|
213
|
+
max-width: 48rem;
|
|
214
|
+
}
|
|
215
|
+
@media (width >= 64rem) {
|
|
216
|
+
max-width: 64rem;
|
|
217
|
+
}
|
|
218
|
+
@media (width >= 80rem) {
|
|
219
|
+
max-width: 80rem;
|
|
220
|
+
}
|
|
221
|
+
@media (width >= 96rem) {
|
|
222
|
+
max-width: 96rem;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
.mt-0\.5 {
|
|
226
|
+
margin-top: calc(var(--spacing) * 0.5);
|
|
227
|
+
}
|
|
228
|
+
.mb-1 {
|
|
229
|
+
margin-bottom: var(--spacing);
|
|
230
|
+
}
|
|
231
|
+
.flex {
|
|
232
|
+
display: flex;
|
|
233
|
+
}
|
|
234
|
+
.hidden {
|
|
235
|
+
display: none;
|
|
236
|
+
}
|
|
237
|
+
.h-full {
|
|
238
|
+
height: 100%;
|
|
239
|
+
}
|
|
240
|
+
.w-full {
|
|
241
|
+
width: 100%;
|
|
242
|
+
}
|
|
243
|
+
.w-max {
|
|
244
|
+
width: max-content;
|
|
245
|
+
}
|
|
246
|
+
.max-w-\[400px\] {
|
|
247
|
+
max-width: 400px;
|
|
248
|
+
}
|
|
249
|
+
.min-w-\[50px\] {
|
|
250
|
+
min-width: 50px;
|
|
251
|
+
}
|
|
252
|
+
.transform {
|
|
253
|
+
transform: var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,);
|
|
254
|
+
}
|
|
255
|
+
.cursor-move {
|
|
256
|
+
cursor: move;
|
|
257
|
+
}
|
|
258
|
+
.cursor-pointer {
|
|
259
|
+
cursor: pointer;
|
|
260
|
+
}
|
|
261
|
+
.resize {
|
|
262
|
+
resize: both;
|
|
263
|
+
}
|
|
264
|
+
.flex-col {
|
|
265
|
+
flex-direction: column;
|
|
266
|
+
}
|
|
267
|
+
.items-center {
|
|
268
|
+
align-items: center;
|
|
269
|
+
}
|
|
270
|
+
.justify-center {
|
|
271
|
+
justify-content: center;
|
|
272
|
+
}
|
|
273
|
+
.gap-1 {
|
|
274
|
+
gap: var(--spacing);
|
|
275
|
+
}
|
|
276
|
+
.gap-2 {
|
|
277
|
+
gap: calc(var(--spacing) * 2);
|
|
278
|
+
}
|
|
279
|
+
.overflow-hidden {
|
|
280
|
+
overflow: hidden;
|
|
281
|
+
}
|
|
282
|
+
.overflow-x-clip {
|
|
283
|
+
overflow-x: clip;
|
|
284
|
+
}
|
|
285
|
+
.rounded {
|
|
286
|
+
border-radius: 0.25rem;
|
|
287
|
+
}
|
|
288
|
+
.rounded-full {
|
|
289
|
+
border-radius: calc(infinity * 1px);
|
|
290
|
+
}
|
|
291
|
+
.border {
|
|
292
|
+
border-style: var(--tw-border-style);
|
|
293
|
+
border-width: 1px;
|
|
294
|
+
}
|
|
295
|
+
.border-dashed {
|
|
296
|
+
--tw-border-style: dashed;
|
|
297
|
+
border-style: dashed;
|
|
298
|
+
}
|
|
299
|
+
.border-gray-200 {
|
|
300
|
+
border-color: var(--color-gray-200);
|
|
301
|
+
}
|
|
302
|
+
.border-gray-400 {
|
|
303
|
+
border-color: var(--color-gray-400);
|
|
304
|
+
}
|
|
305
|
+
.bg-blue-500 {
|
|
306
|
+
background-color: var(--color-blue-500);
|
|
307
|
+
}
|
|
308
|
+
.bg-transparent {
|
|
309
|
+
background-color: transparent;
|
|
310
|
+
}
|
|
311
|
+
.bg-white {
|
|
312
|
+
background-color: var(--color-white);
|
|
313
|
+
}
|
|
314
|
+
.bg-yellow-400 {
|
|
315
|
+
background-color: var(--color-yellow-400);
|
|
316
|
+
}
|
|
317
|
+
.p-1 {
|
|
318
|
+
padding: var(--spacing);
|
|
319
|
+
}
|
|
320
|
+
.px-1 {
|
|
321
|
+
padding-inline: var(--spacing);
|
|
322
|
+
}
|
|
323
|
+
.px-3 {
|
|
324
|
+
padding-inline: calc(var(--spacing) * 3);
|
|
325
|
+
}
|
|
326
|
+
.py-0\.5 {
|
|
327
|
+
padding-block: calc(var(--spacing) * 0.5);
|
|
328
|
+
}
|
|
329
|
+
.py-2 {
|
|
330
|
+
padding-block: calc(var(--spacing) * 2);
|
|
331
|
+
}
|
|
332
|
+
.text-sm {
|
|
333
|
+
font-size: var(--text-sm);
|
|
334
|
+
line-height: var(--tw-leading, var(--text-sm--line-height));
|
|
335
|
+
}
|
|
336
|
+
.text-xs {
|
|
337
|
+
font-size: var(--text-xs);
|
|
338
|
+
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
339
|
+
}
|
|
340
|
+
.font-semibold {
|
|
341
|
+
--tw-font-weight: var(--font-weight-semibold);
|
|
342
|
+
font-weight: var(--font-weight-semibold);
|
|
343
|
+
}
|
|
344
|
+
.whitespace-pre-wrap {
|
|
345
|
+
white-space: pre-wrap;
|
|
346
|
+
}
|
|
347
|
+
.text-black {
|
|
348
|
+
color: var(--color-black);
|
|
349
|
+
}
|
|
350
|
+
.text-gray-500 {
|
|
351
|
+
color: var(--color-gray-500);
|
|
352
|
+
}
|
|
353
|
+
.text-green-600 {
|
|
354
|
+
color: var(--color-green-600);
|
|
355
|
+
}
|
|
356
|
+
.text-white {
|
|
357
|
+
color: var(--color-white);
|
|
358
|
+
}
|
|
359
|
+
.italic {
|
|
360
|
+
font-style: italic;
|
|
361
|
+
}
|
|
362
|
+
.opacity-70 {
|
|
363
|
+
opacity: 70%;
|
|
364
|
+
}
|
|
365
|
+
.shadow-lg {
|
|
366
|
+
--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
367
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
368
|
+
}
|
|
369
|
+
.shadow-md {
|
|
370
|
+
--tw-shadow: 0 4px 6px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 2px 4px -2px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
371
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
372
|
+
}
|
|
373
|
+
.outline-none {
|
|
374
|
+
--tw-outline-style: none;
|
|
375
|
+
outline-style: none;
|
|
376
|
+
}
|
|
377
|
+
@media (hover: hover) {
|
|
378
|
+
.hover\:bg-blue-600:hover {
|
|
379
|
+
background-color: var(--color-blue-600);
|
|
380
|
+
}
|
|
381
|
+
.hover\:bg-gray-100:hover {
|
|
382
|
+
background-color: var(--color-gray-100);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
.pen {
|
|
387
|
+
cursor: url('assets/cursor-pencil.svg') 0 24, pointer;
|
|
388
|
+
}
|
|
389
|
+
.eraser {
|
|
390
|
+
cursor: none;
|
|
391
|
+
}
|
|
392
|
+
.highlighter {
|
|
393
|
+
cursor: url('assets/cursor-highlighter.svg') 0 24, pointer;
|
|
394
|
+
}
|
|
395
|
+
@property --tw-rotate-x {
|
|
396
|
+
syntax: "*";
|
|
397
|
+
inherits: false;
|
|
398
|
+
}
|
|
399
|
+
@property --tw-rotate-y {
|
|
400
|
+
syntax: "*";
|
|
401
|
+
inherits: false;
|
|
402
|
+
}
|
|
403
|
+
@property --tw-rotate-z {
|
|
404
|
+
syntax: "*";
|
|
405
|
+
inherits: false;
|
|
406
|
+
}
|
|
407
|
+
@property --tw-skew-x {
|
|
408
|
+
syntax: "*";
|
|
409
|
+
inherits: false;
|
|
410
|
+
}
|
|
411
|
+
@property --tw-skew-y {
|
|
412
|
+
syntax: "*";
|
|
413
|
+
inherits: false;
|
|
414
|
+
}
|
|
415
|
+
@property --tw-border-style {
|
|
416
|
+
syntax: "*";
|
|
417
|
+
inherits: false;
|
|
418
|
+
initial-value: solid;
|
|
419
|
+
}
|
|
420
|
+
@property --tw-font-weight {
|
|
421
|
+
syntax: "*";
|
|
422
|
+
inherits: false;
|
|
423
|
+
}
|
|
424
|
+
@property --tw-shadow {
|
|
425
|
+
syntax: "*";
|
|
426
|
+
inherits: false;
|
|
427
|
+
initial-value: 0 0 #0000;
|
|
428
|
+
}
|
|
429
|
+
@property --tw-shadow-color {
|
|
430
|
+
syntax: "*";
|
|
431
|
+
inherits: false;
|
|
432
|
+
}
|
|
433
|
+
@property --tw-shadow-alpha {
|
|
434
|
+
syntax: "<percentage>";
|
|
435
|
+
inherits: false;
|
|
436
|
+
initial-value: 100%;
|
|
437
|
+
}
|
|
438
|
+
@property --tw-inset-shadow {
|
|
439
|
+
syntax: "*";
|
|
440
|
+
inherits: false;
|
|
441
|
+
initial-value: 0 0 #0000;
|
|
442
|
+
}
|
|
443
|
+
@property --tw-inset-shadow-color {
|
|
444
|
+
syntax: "*";
|
|
445
|
+
inherits: false;
|
|
446
|
+
}
|
|
447
|
+
@property --tw-inset-shadow-alpha {
|
|
448
|
+
syntax: "<percentage>";
|
|
449
|
+
inherits: false;
|
|
450
|
+
initial-value: 100%;
|
|
451
|
+
}
|
|
452
|
+
@property --tw-ring-color {
|
|
453
|
+
syntax: "*";
|
|
454
|
+
inherits: false;
|
|
455
|
+
}
|
|
456
|
+
@property --tw-ring-shadow {
|
|
457
|
+
syntax: "*";
|
|
458
|
+
inherits: false;
|
|
459
|
+
initial-value: 0 0 #0000;
|
|
460
|
+
}
|
|
461
|
+
@property --tw-inset-ring-color {
|
|
462
|
+
syntax: "*";
|
|
463
|
+
inherits: false;
|
|
464
|
+
}
|
|
465
|
+
@property --tw-inset-ring-shadow {
|
|
466
|
+
syntax: "*";
|
|
467
|
+
inherits: false;
|
|
468
|
+
initial-value: 0 0 #0000;
|
|
469
|
+
}
|
|
470
|
+
@property --tw-ring-inset {
|
|
471
|
+
syntax: "*";
|
|
472
|
+
inherits: false;
|
|
473
|
+
}
|
|
474
|
+
@property --tw-ring-offset-width {
|
|
475
|
+
syntax: "<length>";
|
|
476
|
+
inherits: false;
|
|
477
|
+
initial-value: 0px;
|
|
478
|
+
}
|
|
479
|
+
@property --tw-ring-offset-color {
|
|
480
|
+
syntax: "*";
|
|
481
|
+
inherits: false;
|
|
482
|
+
initial-value: #fff;
|
|
483
|
+
}
|
|
484
|
+
@property --tw-ring-offset-shadow {
|
|
485
|
+
syntax: "*";
|
|
486
|
+
inherits: false;
|
|
487
|
+
initial-value: 0 0 #0000;
|
|
488
|
+
}
|
|
489
|
+
@layer properties {
|
|
490
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
491
|
+
*, ::before, ::after, ::backdrop {
|
|
492
|
+
--tw-rotate-x: initial;
|
|
493
|
+
--tw-rotate-y: initial;
|
|
494
|
+
--tw-rotate-z: initial;
|
|
495
|
+
--tw-skew-x: initial;
|
|
496
|
+
--tw-skew-y: initial;
|
|
497
|
+
--tw-border-style: solid;
|
|
498
|
+
--tw-font-weight: initial;
|
|
499
|
+
--tw-shadow: 0 0 #0000;
|
|
500
|
+
--tw-shadow-color: initial;
|
|
501
|
+
--tw-shadow-alpha: 100%;
|
|
502
|
+
--tw-inset-shadow: 0 0 #0000;
|
|
503
|
+
--tw-inset-shadow-color: initial;
|
|
504
|
+
--tw-inset-shadow-alpha: 100%;
|
|
505
|
+
--tw-ring-color: initial;
|
|
506
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
507
|
+
--tw-inset-ring-color: initial;
|
|
508
|
+
--tw-inset-ring-shadow: 0 0 #0000;
|
|
509
|
+
--tw-ring-inset: initial;
|
|
510
|
+
--tw-ring-offset-width: 0px;
|
|
511
|
+
--tw-ring-offset-color: #fff;
|
|
512
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BoardItem, internalState, LineElement, Point, RotationDirection, ToolTypes } from './interface.js';
|
|
2
|
+
import './index.css';
|
|
3
|
+
export declare const useBoundStore: import("zustand").UseBoundStore<import("zustand").StoreApi<internalState>>;
|
|
4
|
+
export declare const setTool: (tool: ToolTypes) => void;
|
|
5
|
+
export declare const setColor: (color: string) => void;
|
|
6
|
+
export declare const setHighlighterColor: (highlighterColor: string) => void;
|
|
7
|
+
export declare const setLineWidth: (lineWidth: number, type: "PEN" | "HIGHLIGHTER" | "ERASER") => void;
|
|
8
|
+
export declare const undo: () => void;
|
|
9
|
+
export declare const redo: () => void;
|
|
10
|
+
export declare const clearBoard: (boardId: number) => void;
|
|
11
|
+
export declare const addBoard: () => void;
|
|
12
|
+
export declare const removeBoard: (boardId: number) => void;
|
|
13
|
+
export declare const setCurrentBoardIndex: (currentBoardIndex: number) => void;
|
|
14
|
+
export declare const uploadPDF: (pdf: File | string) => Promise<void>;
|
|
15
|
+
export declare const exportPDF: (container: HTMLDivElement) => Promise<File | undefined>;
|
|
16
|
+
export declare const totalBoards: () => number;
|
|
17
|
+
export declare const currentBoard: () => number;
|
|
18
|
+
export declare const rotateBoard: (direction?: RotationDirection, boardIndex?: number) => Promise<void>;
|
|
19
|
+
export declare const rotateClockwise: (boardIndex?: number) => Promise<void>;
|
|
20
|
+
export declare const rotateAntiClockwise: (boardIndex?: number) => Promise<void>;
|
|
21
|
+
export declare const rotateCounterClockwise: (boardIndex?: number) => Promise<void>;
|
|
22
|
+
export declare const getBoardRotation: (boardIndex?: number) => number;
|
|
23
|
+
export type { BoardItem, internalState, LineElement, Point, RotationDirection, ToolTypes };
|
|
24
|
+
declare const CrystalDraw: ({ className, style }: {
|
|
25
|
+
className?: string;
|
|
26
|
+
style?: React.CSSProperties;
|
|
27
|
+
}) => import("react").JSX.Element | null;
|
|
28
|
+
export default CrystalDraw;
|