@turbowarp/paper 0.12.202505131813 → 0.13.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/README.md +2 -2
- package/dist/docs/assets/css/docs.css +414 -0
- package/dist/docs/assets/js/codemirror.js +4 -0
- package/dist/docs/assets/js/docs.js +493 -0
- package/dist/docs/assets/js/jquery.js +6 -0
- package/dist/docs/assets/js/paper.js +15592 -0
- package/dist/docs/classes/Color.html +2188 -0
- package/dist/docs/classes/CompoundPath.html +8493 -0
- package/dist/docs/classes/Curve.html +2323 -0
- package/dist/docs/classes/CurveLocation.html +672 -0
- package/dist/docs/classes/Event.html +176 -0
- package/dist/docs/classes/Gradient.html +240 -0
- package/dist/docs/classes/GradientStop.html +273 -0
- package/dist/docs/classes/Group.html +6480 -0
- package/dist/docs/classes/HitResult.html +239 -0
- package/dist/docs/classes/Item.html +6244 -0
- package/dist/docs/classes/Key.html +139 -0
- package/dist/docs/classes/KeyEvent.html +308 -0
- package/dist/docs/classes/Layer.html +6466 -0
- package/dist/docs/classes/Matrix.html +1744 -0
- package/dist/docs/classes/MouseEvent.html +355 -0
- package/dist/docs/classes/PaperScope.html +459 -0
- package/dist/docs/classes/PaperScript.html +41 -0
- package/dist/docs/classes/Path.html +11391 -0
- package/dist/docs/classes/PathItem.html +8255 -0
- package/dist/docs/classes/Point.html +2699 -0
- package/dist/docs/classes/PointText.html +6645 -0
- package/dist/docs/classes/Project.html +1305 -0
- package/dist/docs/classes/Raster.html +7387 -0
- package/dist/docs/classes/Rectangle.html +1654 -0
- package/dist/docs/classes/Segment.html +939 -0
- package/dist/docs/classes/Shape.html +6979 -0
- package/dist/docs/classes/Size.html +1825 -0
- package/dist/docs/classes/Style.html +919 -0
- package/dist/docs/classes/SymbolDefinition.html +311 -0
- package/dist/docs/classes/SymbolItem.html +6371 -0
- package/dist/docs/classes/TextItem.html +6485 -0
- package/dist/docs/classes/Tool.html +761 -0
- package/dist/docs/classes/ToolEvent.html +446 -0
- package/dist/docs/classes/View.html +1772 -0
- package/dist/docs/classes/global.html +425 -0
- package/dist/docs/classes/index.html +88 -0
- package/dist/docs/index.html +11 -0
- package/dist/paper-core.js +3 -278
- package/dist/paper-core.min.js +30 -0
- package/dist/paper-full.js +3 -278
- package/dist/paper-full.min.js +30 -0
- package/dist/paper.d.ts +7182 -0
- package/dist/paperjs.zip +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
This is a fork of Paper.js with bug fixes and security hardening.
|
|
4
4
|
|
|
5
|
-
Getting this fork to build on modern systems may be a challenge. As of
|
|
5
|
+
Getting this fork to build on modern systems may be a challenge. As of March 2026, a viable development environment is known to be:
|
|
6
6
|
|
|
7
7
|
- Linux
|
|
8
8
|
- Node.js v18.20.8 (20 and later are known to not work due to old dependencies)
|
|
9
9
|
- Run `npm test` to run the unit tests.
|
|
10
|
-
- Use
|
|
10
|
+
- Use trusted publishing to release on npm.
|
|
11
11
|
- Good luck!
|
|
12
12
|
|
|
13
13
|
Original README.md below.
|
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
form,
|
|
3
|
+
img,
|
|
4
|
+
ul,
|
|
5
|
+
ol,
|
|
6
|
+
table,
|
|
7
|
+
td,
|
|
8
|
+
article,
|
|
9
|
+
figure,
|
|
10
|
+
figcaption {
|
|
11
|
+
margin: 0;
|
|
12
|
+
padding: 0;
|
|
13
|
+
border: 0; }
|
|
14
|
+
|
|
15
|
+
a {
|
|
16
|
+
outline: none;
|
|
17
|
+
border: 0; }
|
|
18
|
+
|
|
19
|
+
ul,
|
|
20
|
+
ol {
|
|
21
|
+
list-style: none outside none; }
|
|
22
|
+
|
|
23
|
+
table {
|
|
24
|
+
border-spacing: 0; }
|
|
25
|
+
|
|
26
|
+
td {
|
|
27
|
+
vertical-align: top; }
|
|
28
|
+
|
|
29
|
+
html {
|
|
30
|
+
-webkit-text-size-adjust: none; }
|
|
31
|
+
|
|
32
|
+
/* Content Styles */
|
|
33
|
+
article {
|
|
34
|
+
/* Text Content */ }
|
|
35
|
+
article,
|
|
36
|
+
article a {
|
|
37
|
+
color: #333333; }
|
|
38
|
+
article a {
|
|
39
|
+
border-bottom: 1px solid; }
|
|
40
|
+
article a:hover,
|
|
41
|
+
article a:hover em {
|
|
42
|
+
background: #e5e5e5; }
|
|
43
|
+
article em {
|
|
44
|
+
font-style: normal;
|
|
45
|
+
background: #efefef; }
|
|
46
|
+
article p,
|
|
47
|
+
article ul,
|
|
48
|
+
article ol {
|
|
49
|
+
margin: 0 8px 16px 0; }
|
|
50
|
+
article p.small,
|
|
51
|
+
article ul.small,
|
|
52
|
+
article ol.small {
|
|
53
|
+
margin-bottom: 8px; }
|
|
54
|
+
article figure,
|
|
55
|
+
article .CodeMirror,
|
|
56
|
+
article .paperscript {
|
|
57
|
+
margin-bottom: 16px; }
|
|
58
|
+
article ul,
|
|
59
|
+
article ol {
|
|
60
|
+
padding: 0;
|
|
61
|
+
list-style: none outside none; }
|
|
62
|
+
article ul ul,
|
|
63
|
+
article ul ol,
|
|
64
|
+
article ol ul,
|
|
65
|
+
article ol ol {
|
|
66
|
+
margin-bottom: 0; }
|
|
67
|
+
article ul > li {
|
|
68
|
+
margin-left: 1em;
|
|
69
|
+
position: relative; }
|
|
70
|
+
article ul > li:before {
|
|
71
|
+
content: '–';
|
|
72
|
+
position: absolute;
|
|
73
|
+
left: -1em; }
|
|
74
|
+
article ol {
|
|
75
|
+
counter-reset: item; }
|
|
76
|
+
article ol > li {
|
|
77
|
+
margin-left: 1.5em;
|
|
78
|
+
position: relative; }
|
|
79
|
+
article ol > li:before {
|
|
80
|
+
position: absolute;
|
|
81
|
+
left: -1.5em;
|
|
82
|
+
content: counter(item,upper-latin) ") ";
|
|
83
|
+
counter-increment: item; }
|
|
84
|
+
|
|
85
|
+
section {
|
|
86
|
+
clear: both;
|
|
87
|
+
margin: 0 0 16px;
|
|
88
|
+
padding: 0; }
|
|
89
|
+
|
|
90
|
+
.column {
|
|
91
|
+
width: 260px;
|
|
92
|
+
float: left; }
|
|
93
|
+
.column + .column {
|
|
94
|
+
margin-left: 16px; }
|
|
95
|
+
|
|
96
|
+
.row {
|
|
97
|
+
clear: both; }
|
|
98
|
+
|
|
99
|
+
.donation {
|
|
100
|
+
padding-bottom: 16px; }
|
|
101
|
+
.donation input,
|
|
102
|
+
.donation select {
|
|
103
|
+
margin-right: 0.35em; }
|
|
104
|
+
|
|
105
|
+
.reference h1,
|
|
106
|
+
.reference h2,
|
|
107
|
+
.reference h3,
|
|
108
|
+
.reference h4 {
|
|
109
|
+
font-size: 13px;
|
|
110
|
+
font-weight: normal;
|
|
111
|
+
margin: 0; }
|
|
112
|
+
.reference h1,
|
|
113
|
+
.reference h2,
|
|
114
|
+
.reference h3 {
|
|
115
|
+
height: 18px;
|
|
116
|
+
border-bottom: 1px solid;
|
|
117
|
+
margin-bottom: 16px; }
|
|
118
|
+
.reference h2 a {
|
|
119
|
+
font-weight: bold; }
|
|
120
|
+
.reference h3 {
|
|
121
|
+
margin-top: 16px;
|
|
122
|
+
border-bottom-style: dotted; }
|
|
123
|
+
.reference h4 {
|
|
124
|
+
font-weight: bold; }
|
|
125
|
+
.reference h4 .description {
|
|
126
|
+
font-weight: normal; }
|
|
127
|
+
.reference h4 .description:before {
|
|
128
|
+
content: ' — '; }
|
|
129
|
+
.reference h4 + ul, .reference h4 + pre, .reference h4 + .paperscript {
|
|
130
|
+
margin-top: 8px;
|
|
131
|
+
margin-bottom: 16px; }
|
|
132
|
+
.reference a tt {
|
|
133
|
+
line-height: 17px; }
|
|
134
|
+
.reference ul,
|
|
135
|
+
.reference p {
|
|
136
|
+
margin-bottom: 16px; }
|
|
137
|
+
.reference hr {
|
|
138
|
+
border: none;
|
|
139
|
+
border-bottom: 1px dotted; }
|
|
140
|
+
.reference .reference-list ul,
|
|
141
|
+
.reference .reference-inherited ul {
|
|
142
|
+
margin-left: 16px; }
|
|
143
|
+
.reference .reference-inherited ul li {
|
|
144
|
+
text-indent: -30px;
|
|
145
|
+
padding-left: 30px; }
|
|
146
|
+
.reference ul.reference-classes {
|
|
147
|
+
padding-bottom: 4px; }
|
|
148
|
+
.reference ul.reference-classes li {
|
|
149
|
+
margin: 0;
|
|
150
|
+
text-indent: 0; }
|
|
151
|
+
.reference ul.reference-classes ul {
|
|
152
|
+
margin: 0 0 10px 10px; }
|
|
153
|
+
.reference ul.reference-classes h2,
|
|
154
|
+
.reference ul.reference-classes h3,
|
|
155
|
+
.reference ul.reference-classes hr {
|
|
156
|
+
margin: 10px 0 10px 0; }
|
|
157
|
+
.reference ul.reference-classes .first h2 {
|
|
158
|
+
margin-top: 0; }
|
|
159
|
+
* html .reference ul.reference-classes img {
|
|
160
|
+
margin-top: 5px; }
|
|
161
|
+
.reference ul.member-list li {
|
|
162
|
+
margin-left: 2em;
|
|
163
|
+
margin-bottom: 8px;
|
|
164
|
+
text-indent: -2em; }
|
|
165
|
+
.reference ul.member-list li:before {
|
|
166
|
+
display: none; }
|
|
167
|
+
.reference .reference-members {
|
|
168
|
+
margin-bottom: 16px; }
|
|
169
|
+
.reference .member-group-text {
|
|
170
|
+
margin-bottom: 16px; }
|
|
171
|
+
.reference .member-description {
|
|
172
|
+
border: 1px solid #999;
|
|
173
|
+
border-top: 0;
|
|
174
|
+
margin: 16px 0 16px 0; }
|
|
175
|
+
.reference .member-header {
|
|
176
|
+
border-top: 1px solid #999;
|
|
177
|
+
padding: 10px;
|
|
178
|
+
*zoom: 1; }
|
|
179
|
+
.reference .member-header .member-link {
|
|
180
|
+
float: left; }
|
|
181
|
+
.reference .member-header .member-close {
|
|
182
|
+
float: right; }
|
|
183
|
+
.reference .member-header:before, .reference .member-header:after {
|
|
184
|
+
content: " ";
|
|
185
|
+
display: table; }
|
|
186
|
+
.reference .member-header:after {
|
|
187
|
+
clear: both; }
|
|
188
|
+
.reference .member-text {
|
|
189
|
+
border-top: 1px dashed #999;
|
|
190
|
+
padding: 10px 10px 0 10px;
|
|
191
|
+
margin-bottom: -6px; }
|
|
192
|
+
.reference .member-text ul ul,
|
|
193
|
+
.reference .member-text ul ol,
|
|
194
|
+
.reference .member-text ol ul,
|
|
195
|
+
.reference .member-text ol ol,
|
|
196
|
+
.reference .member-text ul p,
|
|
197
|
+
.reference .member-text ol p {
|
|
198
|
+
margin-bottom: 8px; }
|
|
199
|
+
.reference .member-link {
|
|
200
|
+
text-indent: -30px;
|
|
201
|
+
padding-left: 30px; }
|
|
202
|
+
|
|
203
|
+
body,
|
|
204
|
+
select,
|
|
205
|
+
input,
|
|
206
|
+
textarea {
|
|
207
|
+
font-family: "Lucida Grande", Geneva, Verdana, Arial, sans-serif; }
|
|
208
|
+
|
|
209
|
+
tt,
|
|
210
|
+
pre,
|
|
211
|
+
.CodeMirror {
|
|
212
|
+
font-family: Menlo, Consolas, "Vera Mono", monospace;
|
|
213
|
+
font-size: 12px;
|
|
214
|
+
line-height: 17px; }
|
|
215
|
+
|
|
216
|
+
body {
|
|
217
|
+
background: #fff;
|
|
218
|
+
margin: 16px;
|
|
219
|
+
font-size: 13px;
|
|
220
|
+
line-height: 20px;
|
|
221
|
+
color: #333333;
|
|
222
|
+
max-width: 540px; }
|
|
223
|
+
|
|
224
|
+
select,
|
|
225
|
+
input,
|
|
226
|
+
textarea {
|
|
227
|
+
font-size: 11px;
|
|
228
|
+
margin: 0;
|
|
229
|
+
color: #000; }
|
|
230
|
+
|
|
231
|
+
a {
|
|
232
|
+
color: #333333;
|
|
233
|
+
text-decoration: none;
|
|
234
|
+
border-bottom: 1px solid #333333; }
|
|
235
|
+
a:hover {
|
|
236
|
+
background: #e5e5e5; }
|
|
237
|
+
|
|
238
|
+
img {
|
|
239
|
+
border: 0; }
|
|
240
|
+
|
|
241
|
+
p {
|
|
242
|
+
margin: 0 0 16px 0; }
|
|
243
|
+
|
|
244
|
+
ul,
|
|
245
|
+
ol {
|
|
246
|
+
padding: 0;
|
|
247
|
+
margin: 0 0 16px 0;
|
|
248
|
+
list-style: none; }
|
|
249
|
+
|
|
250
|
+
.clear {
|
|
251
|
+
clear: both; }
|
|
252
|
+
|
|
253
|
+
.hidden {
|
|
254
|
+
display: none; }
|
|
255
|
+
|
|
256
|
+
.reference-index,
|
|
257
|
+
.reference-index a {
|
|
258
|
+
color: #009dec;
|
|
259
|
+
border-bottom: 0px; }
|
|
260
|
+
.reference-index a:hover {
|
|
261
|
+
background: #e3f4fc; }
|
|
262
|
+
.reference-index h2,
|
|
263
|
+
.reference-index h3,
|
|
264
|
+
.reference-index hr {
|
|
265
|
+
border-color: #009dec; }
|
|
266
|
+
|
|
267
|
+
.reference h1 {
|
|
268
|
+
font-size: 18px;
|
|
269
|
+
font-weight: normal;
|
|
270
|
+
line-height: 24px;
|
|
271
|
+
border: none; }
|
|
272
|
+
.reference h1 .version {
|
|
273
|
+
font-size: 10px;
|
|
274
|
+
line-height: 16px;
|
|
275
|
+
vertical-align: top;
|
|
276
|
+
margin-left: 0.35em; }
|
|
277
|
+
|
|
278
|
+
.footer {
|
|
279
|
+
margin-top: 16px; }
|
|
280
|
+
|
|
281
|
+
.CodeMirror pre {
|
|
282
|
+
margin: 0;
|
|
283
|
+
padding: 0;
|
|
284
|
+
background: transparent; }
|
|
285
|
+
.paperscript .CodeMirror {
|
|
286
|
+
height: 100%; }
|
|
287
|
+
|
|
288
|
+
.CodeMirror-scroll {
|
|
289
|
+
min-height: 100%;
|
|
290
|
+
overflow: auto; }
|
|
291
|
+
|
|
292
|
+
.CodeMirror-gutter {
|
|
293
|
+
position: absolute;
|
|
294
|
+
left: 0;
|
|
295
|
+
top: 0;
|
|
296
|
+
min-width: 30px;
|
|
297
|
+
height: 100%;
|
|
298
|
+
background-color: #f4f4f4;
|
|
299
|
+
border-right: 1px solid #999; }
|
|
300
|
+
|
|
301
|
+
.CodeMirror-gutter-text {
|
|
302
|
+
color: #aaa;
|
|
303
|
+
text-align: right;
|
|
304
|
+
padding: 2px 8px 2px 8px; }
|
|
305
|
+
.CodeMirror-gutter-text pre {
|
|
306
|
+
font-size: 10px; }
|
|
307
|
+
|
|
308
|
+
.CodeMirror-lines {
|
|
309
|
+
background: #ffffff;
|
|
310
|
+
padding: 2px 0 2px 8px; }
|
|
311
|
+
.CodeMirror-lines pre.highlight {
|
|
312
|
+
background-color: #edf5fc; }
|
|
313
|
+
|
|
314
|
+
.CodeMirror-cursor {
|
|
315
|
+
z-index: 10;
|
|
316
|
+
position: absolute;
|
|
317
|
+
visibility: hidden;
|
|
318
|
+
border-left: 1px solid #7c7c7c !important;
|
|
319
|
+
height: 17px; }
|
|
320
|
+
|
|
321
|
+
.CodeMirror-selected {
|
|
322
|
+
background: #ccc !important;
|
|
323
|
+
color: HighlightText !important;
|
|
324
|
+
padding: 2px 0 2px 0; }
|
|
325
|
+
|
|
326
|
+
.CodeMirror-focused .CodeMirror-cursor {
|
|
327
|
+
visibility: visible; }
|
|
328
|
+
.CodeMirror-focused .CodeMirror-selected {
|
|
329
|
+
background: Highlight !important; }
|
|
330
|
+
|
|
331
|
+
.CodeMirror-matchingbracket {
|
|
332
|
+
background: #e3fc8d !important; }
|
|
333
|
+
|
|
334
|
+
.CodeMirror-nonmatchingbracket {
|
|
335
|
+
color: #d62a28 !important; }
|
|
336
|
+
|
|
337
|
+
/* JavaScript & HTML Modes */
|
|
338
|
+
span.cm-keyword {
|
|
339
|
+
color: #ff7800; }
|
|
340
|
+
span.cm-atom, span.cm-number {
|
|
341
|
+
color: #3b5bb5; }
|
|
342
|
+
span.cm-def, span.cm-variable-2, span.cm-variable-3 {
|
|
343
|
+
color: #3a4a64; }
|
|
344
|
+
span.cm-variable {
|
|
345
|
+
color: #000; }
|
|
346
|
+
span.cm-property {
|
|
347
|
+
color: #000; }
|
|
348
|
+
span.cm-operator {
|
|
349
|
+
color: #000; }
|
|
350
|
+
span.cm-comment {
|
|
351
|
+
color: #8c868f; }
|
|
352
|
+
span.cm-string {
|
|
353
|
+
color: #409b1c; }
|
|
354
|
+
span.cm-meta {
|
|
355
|
+
color: #555; }
|
|
356
|
+
span.cm-error {
|
|
357
|
+
color: #f30; }
|
|
358
|
+
span.cm-qualifier {
|
|
359
|
+
color: #555; }
|
|
360
|
+
span.cm-builtin {
|
|
361
|
+
color: #30a; }
|
|
362
|
+
span.cm-bracket {
|
|
363
|
+
color: #cc7; }
|
|
364
|
+
span.cm-tag {
|
|
365
|
+
font-weight: bold;
|
|
366
|
+
color: #3b5bb5; }
|
|
367
|
+
span.cm-attribute {
|
|
368
|
+
font-style: italic;
|
|
369
|
+
color: #3b5bb5; }
|
|
370
|
+
|
|
371
|
+
.paperscript {
|
|
372
|
+
position: relative; }
|
|
373
|
+
.paperscript .buttons {
|
|
374
|
+
position: absolute;
|
|
375
|
+
right: 0;
|
|
376
|
+
z-index: 1; }
|
|
377
|
+
.paperscript .button,
|
|
378
|
+
.paperscript .explain {
|
|
379
|
+
float: right;
|
|
380
|
+
display: none;
|
|
381
|
+
font-size: 12px;
|
|
382
|
+
line-height: 16px;
|
|
383
|
+
padding: 2px 6px;
|
|
384
|
+
border-radius: 4px;
|
|
385
|
+
-moz-border-radius: 4px;
|
|
386
|
+
-webkit-border-radius: 4px;
|
|
387
|
+
margin: 8px 8px 0 0; }
|
|
388
|
+
.paperscript .button {
|
|
389
|
+
background: #eee; }
|
|
390
|
+
.paperscript .explain {
|
|
391
|
+
background: #e3f4fc; }
|
|
392
|
+
.paperscript .explain, .paperscript:hover .button {
|
|
393
|
+
display: inline-block; }
|
|
394
|
+
.paperscript .button:hover {
|
|
395
|
+
background: #ddd;
|
|
396
|
+
cursor: pointer; }
|
|
397
|
+
.paperscript .tools {
|
|
398
|
+
display: inline; }
|
|
399
|
+
.paperscript .source {
|
|
400
|
+
overflow: auto;
|
|
401
|
+
border: 1px solid #999; }
|
|
402
|
+
.paperscript .CodeMirror {
|
|
403
|
+
margin: 0 !important; }
|
|
404
|
+
.paperscript .CodeMirror-gutter-text,
|
|
405
|
+
.paperscript .CodeMirror-lines {
|
|
406
|
+
padding-top: 8px;
|
|
407
|
+
padding-bottom: 8px; }
|
|
408
|
+
.paperscript .canvas {
|
|
409
|
+
line-height: 0; }
|
|
410
|
+
.paperscript .canvas.border canvas {
|
|
411
|
+
border: 1px solid #999; }
|
|
412
|
+
.paperscript.split .canvas {
|
|
413
|
+
border: 1px solid #999;
|
|
414
|
+
border-top: 0; }
|