konva 10.5.0 → 10.6.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 (62) hide show
  1. package/README.md +4 -4
  2. package/konva.js +3247 -3746
  3. package/konva.min.js +4 -4
  4. package/lib/Animation.d.ts +2 -2
  5. package/lib/Animation.js +2 -2
  6. package/lib/BezierFunctions.d.ts +1 -1
  7. package/lib/BezierFunctions.js +76 -116
  8. package/lib/Canvas.d.ts +1 -1
  9. package/lib/Canvas.js +8 -5
  10. package/lib/Container.js +9 -6
  11. package/lib/Context.d.ts +4 -5
  12. package/lib/Context.js +77 -72
  13. package/lib/DragAndDrop.d.ts +4 -3
  14. package/lib/DragAndDrop.js +39 -25
  15. package/lib/Factory.d.ts +3 -2
  16. package/lib/Factory.js +10 -9
  17. package/lib/Global.d.ts +0 -6
  18. package/lib/Global.js +2 -8
  19. package/lib/Layer.js +9 -6
  20. package/lib/Node.d.ts +21 -12
  21. package/lib/Node.js +159 -126
  22. package/lib/PointerEvents.d.ts +1 -2
  23. package/lib/PointerEvents.js +20 -18
  24. package/lib/Shape.d.ts +2 -2
  25. package/lib/Shape.js +51 -7
  26. package/lib/Stage.d.ts +19 -13
  27. package/lib/Stage.js +182 -86
  28. package/lib/Tween.js +59 -66
  29. package/lib/Util.d.ts +2 -2
  30. package/lib/Util.js +21 -16
  31. package/lib/_CoreInternals.d.ts +23 -11
  32. package/lib/_FullInternals.d.ts +23 -11
  33. package/lib/filters/Blur.js +16 -12
  34. package/lib/filters/Brighten.d.ts +1 -0
  35. package/lib/filters/Brighten.js +1 -0
  36. package/lib/filters/Brightness.d.ts +2 -1
  37. package/lib/filters/Brightness.js +4 -4
  38. package/lib/filters/Emboss.js +16 -58
  39. package/lib/filters/Kaleidoscope.js +8 -15
  40. package/lib/filters/Mask.js +8 -8
  41. package/lib/filters/Pixelate.js +16 -29
  42. package/lib/filters/Threshold.d.ts +1 -1
  43. package/lib/filters/Threshold.js +1 -1
  44. package/lib/shapes/Arc.js +5 -3
  45. package/lib/shapes/Arrow.d.ts +2 -6
  46. package/lib/shapes/Arrow.js +68 -46
  47. package/lib/shapes/Image.js +16 -19
  48. package/lib/shapes/Label.d.ts +2 -3
  49. package/lib/shapes/Label.js +7 -21
  50. package/lib/shapes/Line.d.ts +1 -1
  51. package/lib/shapes/Line.js +1 -1
  52. package/lib/shapes/Path.d.ts +11 -2
  53. package/lib/shapes/Path.js +132 -142
  54. package/lib/shapes/RegularPolygon.js +1 -1
  55. package/lib/shapes/Sprite.js +2 -6
  56. package/lib/shapes/Text.d.ts +12 -4
  57. package/lib/shapes/Text.js +96 -54
  58. package/lib/shapes/TextPath.d.ts +4 -3
  59. package/lib/shapes/TextPath.js +40 -26
  60. package/lib/shapes/Transformer.js +88 -91
  61. package/lib/types.d.ts +2 -2
  62. package/package.json +4 -3
package/README.md CHANGED
@@ -133,7 +133,7 @@ npm install konva canvas
133
133
  npm install konva skia-canvas
134
134
  ```
135
135
 
136
- Then you can use the same Konva API and all Konva demos will work just fine. You just don't need to use `container` attribute in your stage.
136
+ Use the same scene graph API for server-side rendering and omit the stage's `container` attribute. DOM events require a browser, and canvas feature support depends on the selected backend.
137
137
 
138
138
  ```js
139
139
  import Konva from 'konva';
@@ -143,7 +143,7 @@ const stage = new Konva.Stage({
143
143
  width: 500,
144
144
  height: 500,
145
145
  });
146
- // then all regular Konva code will work
146
+ // Add shapes and export the stage with the usual Konva drawing API.
147
147
  ```
148
148
 
149
149
  # Backers
@@ -172,11 +172,11 @@ Konva uses Mocha for testing.
172
172
  - While developing it is easy to use `npm start`. Just run it and go to [http://localhost:1234/unit-tests.html](http://localhost:1234/unit-tests.html). The watcher will rebuild the bundle on any change.
173
173
 
174
174
  Konva is covered with hundreds of tests and well over a thousand assertions.
175
- Konva uses TDD (test driven development) which means that every new feature or bug fix is accompanied with at least one new test.
175
+ For each feature or bug fix, write a failing test first, implement the behavior, then verify that the test passes (test-driven development).
176
176
 
177
177
  ## Generate documentation
178
178
 
179
- Run `npx gulp api` which will build the documentation files and place them in the `api` folder.
179
+ Run `npm run build`, then `npx gulp api` to generate documentation from the current bundle in the `api` folder.
180
180
 
181
181
  # Pull Requests
182
182