paper 0.12.20 → 0.14.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.
Files changed (54) hide show
  1. package/CHANGELOG.md +318 -0
  2. package/README.md +45 -26
  3. package/dist/docs/assets/js/paper.js +1210 -481
  4. package/dist/docs/classes/ChangeFlag.html +384 -0
  5. package/dist/docs/classes/Color.html +63 -47
  6. package/dist/docs/classes/CompoundPath.html +219 -62
  7. package/dist/docs/classes/Curve.html +9 -7
  8. package/dist/docs/classes/CurveLocation.html +1 -1
  9. package/dist/docs/classes/Event.html +1 -1
  10. package/dist/docs/classes/Gradient.html +1 -1
  11. package/dist/docs/classes/GradientStop.html +1 -1
  12. package/dist/docs/classes/Group.html +151 -27
  13. package/dist/docs/classes/HitResult.html +3 -2
  14. package/dist/docs/classes/HostItem.html +6721 -0
  15. package/dist/docs/classes/Item.html +120 -27
  16. package/dist/docs/classes/Key.html +1 -1
  17. package/dist/docs/classes/KeyEvent.html +1 -1
  18. package/dist/docs/classes/Layer.html +151 -27
  19. package/dist/docs/classes/Matrix.html +1 -1
  20. package/dist/docs/classes/MouseEvent.html +1 -1
  21. package/dist/docs/classes/PaperScope.html +88 -1
  22. package/dist/docs/classes/PaperScript.html +2 -1
  23. package/dist/docs/classes/Path.html +232 -72
  24. package/dist/docs/classes/PathItem.html +337 -180
  25. package/dist/docs/classes/Point.html +143 -21
  26. package/dist/docs/classes/PointText.html +151 -27
  27. package/dist/docs/classes/Project.html +201 -8
  28. package/dist/docs/classes/Raster.html +150 -38
  29. package/dist/docs/classes/Rectangle.html +12 -11
  30. package/dist/docs/classes/Segment.html +1 -1
  31. package/dist/docs/classes/Shape.html +120 -27
  32. package/dist/docs/classes/Size.html +81 -21
  33. package/dist/docs/classes/Style.html +35 -3
  34. package/dist/docs/classes/SymbolDefinition.html +1 -1
  35. package/dist/docs/classes/SymbolItem.html +121 -28
  36. package/dist/docs/classes/TextItem.html +151 -27
  37. package/dist/docs/classes/Tool.html +127 -1
  38. package/dist/docs/classes/ToolEvent.html +27 -1
  39. package/dist/docs/classes/Tween.html +1 -1
  40. package/dist/docs/classes/View.html +345 -10
  41. package/dist/docs/classes/global.html +1 -1
  42. package/dist/docs/classes/index.html +2 -2
  43. package/dist/docs/index.html +1 -1
  44. package/dist/node/canvas.js +1 -1
  45. package/dist/node/self.js +4 -3
  46. package/dist/paper-core.js +1182 -465
  47. package/dist/paper-core.min.js +3 -3
  48. package/dist/paper-full.js +1210 -481
  49. package/dist/paper-full.min.js +3 -3
  50. package/dist/paper-sourced.js +18631 -0
  51. package/dist/paper.d.ts +606 -78
  52. package/examples/Rasters/Smoothing.html +1 -1
  53. package/package.json +6 -17
  54. package/dist/node/xml.js +0 -40
@@ -13,7 +13,7 @@
13
13
  var clone = raster.clone();
14
14
  clone.scale(scale);
15
15
  clone.smoothing = value;
16
- clone.bounds.topLeft = position + [400 * index, 0];
16
+ clone.bounds.point = position + [400 * index, 0];
17
17
  new PointText({
18
18
  point: clone.bounds.topLeft + [0, -10],
19
19
  content: value
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paper",
3
- "version": "0.12.20",
3
+ "version": "0.14.0",
4
4
  "description": "The Swiss Army Knife of Vector Graphics Scripting",
5
5
  "license": "MIT",
6
6
  "homepage": "http://paperjs.org",
@@ -26,7 +26,9 @@
26
26
  "jshint": "gulp jshint",
27
27
  "test": "gulp test",
28
28
  "test:browser": "gulp test:browser",
29
- "test:node": "gulp test:node"
29
+ "test:chrome": "gulp test:chrome",
30
+ "test:node": "gulp test:node",
31
+ "prepare": "husky"
30
32
  },
31
33
  "files": [
32
34
  "AUTHORS.md",
@@ -42,12 +44,6 @@
42
44
  "engines": {
43
45
  "node": ">=8.0.0"
44
46
  },
45
- "husky": {
46
- "hooks": {
47
- "pre-commit": "yarn jshint --ensure-branch develop",
48
- "pre-push": "yarn test --ensure-branch develop"
49
- }
50
- },
51
47
  "browser": {
52
48
  "./dist/node/extend.js": false,
53
49
  "./dist/node/self.js": false,
@@ -78,14 +74,14 @@
78
74
  "gulp-webserver": "^0.9.1",
79
75
  "gulp-whitespace": "^0.1.0",
80
76
  "gulp-zip": "^5.1.0",
81
- "husky": "^4.3.8",
77
+ "husky": "^9.1.7",
82
78
  "jsdom": "^28.1.0",
83
79
  "jshint": "^2.13.6",
84
80
  "jshint-summary": "^0.4.0",
85
81
  "merge-stream": "^2.0.0",
86
82
  "minimist": "^1.2.8",
87
83
  "mustache": "^4.2.0",
88
- "prepro": "^2.4.0",
84
+ "prepro": "^2.5.0",
89
85
  "qunitjs": "^1.23.1",
90
86
  "require-dir": "^1.2.0",
91
87
  "resemblejs": "^3.2.5",
@@ -95,13 +91,6 @@
95
91
  "straps": "^3.0.1",
96
92
  "typescript": "^3.9.10"
97
93
  },
98
- "workspaces": [
99
- "packages/*"
100
- ],
101
- "resolutions": {
102
- "graceful-fs": "4.2.2",
103
- "resemblejs/canvas": "^3.2.3"
104
- },
105
94
  "keywords": [
106
95
  "vector",
107
96
  "graphic",
package/dist/node/xml.js DELETED
@@ -1,40 +0,0 @@
1
- /*
2
- * Paper.js - The Swiss Army Knife of Vector Graphics Scripting.
3
- * http://paperjs.org/
4
- *
5
- * Copyright (c) 2011 - 2020, Jürg Lehni & Jonathan Puckey
6
- * http://juerglehni.com/ & https://puckey.studio/
7
- *
8
- * Distributed under the MIT license. See LICENSE file for details.
9
- *
10
- * All rights reserved.
11
- */
12
-
13
- module.exports = function(self) {
14
- // Define XMLSerializer shim, to emulate browser behavior.
15
- // Effort to bring XMLSerializer to jsdom:
16
- // https://github.com/tmpvar/jsdom/issues/1368
17
- self.XMLSerializer = function XMLSerializer() {
18
- };
19
-
20
- self.XMLSerializer.prototype = {
21
- serializeToString: function(node) {
22
- if (!node)
23
- return '';
24
- // Fix a jsdom issue where all SVG tagNames are lowercased:
25
- // https://github.com/tmpvar/jsdom/issues/620
26
- var text = node.outerHTML,
27
- tagNames = ['linearGradient', 'radialGradient', 'clipPath',
28
- 'textPath'];
29
- for (var i = 0, l = tagNames.length; i < l; i++) {
30
- var tagName = tagNames[i];
31
- text = text.replace(
32
- new RegExp('(<|</)' + tagName.toLowerCase() + '\\b', 'g'),
33
- function(match, start) {
34
- return start + tagName;
35
- });
36
- }
37
- return text;
38
- }
39
- };
40
- };