fabric 6.0.0-beta16 → 6.0.0-beta17

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 (69) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/fabric.d.ts +1 -0
  3. package/dist/index.js +265 -221
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.mjs +265 -221
  7. package/dist/index.mjs.map +1 -1
  8. package/dist/index.node.cjs +154 -110
  9. package/dist/index.node.cjs.map +1 -1
  10. package/dist/index.node.mjs +154 -110
  11. package/dist/index.node.mjs.map +1 -1
  12. package/dist/src/LayoutManager/LayoutManager.d.ts +9 -0
  13. package/dist/src/LayoutManager/types.d.ts +0 -1
  14. package/dist/src/Pattern/Pattern.d.ts +2 -2
  15. package/dist/src/Pattern/types.d.ts +4 -1
  16. package/dist/src/gradient/typedefs.d.ts +1 -1
  17. package/dist/src/shapes/Group.d.ts +6 -4
  18. package/dist/src/shapes/Image.d.ts +1 -1
  19. package/dist/src/shapes/Object/AnimatableObject.d.ts +1 -1
  20. package/dist/src/shapes/Object/InteractiveObject.d.ts +0 -1
  21. package/dist/src/shapes/Object/Object.d.ts +3 -2
  22. package/dist/src/shapes/Object/ObjectGeometry.d.ts +4 -0
  23. package/dist/src/shapes/Object/defaultValues.d.ts +46 -46
  24. package/dist/src/shapes/Object/types/BaseProps.d.ts +30 -26
  25. package/dist/src/shapes/Object/types/FabricObjectProps.d.ts +0 -30
  26. package/dist/src/shapes/Object/types/ObjectProps.d.ts +2 -10
  27. package/dist/src/shapes/Object/types/ObjectTransformProps.d.ts +34 -0
  28. package/dist/src/shapes/Path.d.ts +9 -9
  29. package/dist/src/shapes/Polyline.d.ts +5 -1
  30. package/fabric.ts +1 -0
  31. package/package.json +6 -7
  32. package/src/LayoutManager/LayoutManager.spec.ts +20 -11
  33. package/src/LayoutManager/LayoutManager.ts +32 -22
  34. package/src/LayoutManager/LayoutStrategies/ClipPathLayout.ts +4 -0
  35. package/src/LayoutManager/LayoutStrategies/FitContentLayout.ts +3 -0
  36. package/src/LayoutManager/LayoutStrategies/FixedLayout.ts +3 -0
  37. package/src/LayoutManager/LayoutStrategies/utils.ts +11 -8
  38. package/src/LayoutManager/README.md +1 -4
  39. package/src/LayoutManager/__snapshots__/LayoutManager.spec.ts.snap +0 -35
  40. package/src/LayoutManager/types.ts +0 -1
  41. package/src/Pattern/Pattern.ts +2 -2
  42. package/src/Pattern/types.ts +4 -1
  43. package/src/benchmarks/pathCloning.mjs +111 -0
  44. package/src/benchmarks/pathData.mjs +5 -0
  45. package/src/config.ts +2 -1
  46. package/src/controls/polyControl.ts +2 -1
  47. package/src/env/browser.ts +0 -4
  48. package/src/gradient/Gradient.ts +1 -1
  49. package/src/gradient/typedefs.ts +1 -1
  50. package/src/parkinglot/straighten.ts +7 -0
  51. package/src/shapes/Group.spec.ts +249 -5
  52. package/src/shapes/Group.ts +37 -27
  53. package/src/shapes/Image.ts +1 -1
  54. package/src/shapes/Object/AnimatableObject.ts +4 -2
  55. package/src/shapes/Object/InteractiveObject.spec.ts +7 -2
  56. package/src/shapes/Object/InteractiveObject.ts +11 -12
  57. package/src/shapes/Object/Object.spec.ts +32 -0
  58. package/src/shapes/Object/Object.ts +8 -4
  59. package/src/shapes/Object/ObjectGeometry.ts +13 -6
  60. package/src/shapes/Object/__snapshots__/InteractiveObject.spec.ts.snap +1 -7
  61. package/src/shapes/Object/defaultValues.ts +45 -43
  62. package/src/shapes/Object/types/BaseProps.ts +33 -29
  63. package/src/shapes/Object/types/FabricObjectProps.ts +0 -34
  64. package/src/shapes/Object/types/ObjectProps.ts +5 -11
  65. package/src/shapes/Object/types/ObjectTransformProps.ts +37 -0
  66. package/src/shapes/Path.ts +1 -2
  67. package/src/shapes/Polyline.ts +14 -4
  68. package/src/util/typeAssertions.spec.ts +109 -0
  69. package/src/util/typeAssertions.ts +9 -5
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  ## [next]
4
4
 
5
+ ## [6.0.0-beta17]
6
+
7
+ - refactor(): Rewrite how typeAssertion works to avoid isType and add tests for subclasses [#9570](https://github.com/fabricjs/fabric.js/pull/9570)
8
+ - fix(): perform layout on poly change + initialization object subscription [#9537](https://github.com/fabricjs/fabric.js/pull/9537)
9
+ - fix(): Addressing path cloning slowness ( partially ) [#9573](https://github.com/fabricjs/fabric.js/pull/9573)
10
+ - fix(): `exactBoundingBox` stroke calculations [#9572](https://github.com/fabricjs/fabric.js/pull/9572)
11
+ - feat(): Add save/restore ability to group LayoutManager [#9564](https://github.com/fabricjs/fabric.js/pull/9564)
12
+ - fix(): Remove unwanted set type warning [#9569](https://github.com/fabricjs/fabric.js/pull/9569)
13
+ - refactor(): Separate defaults for base fabric object vs interactive object. Also some moving around of variables [#9474](https://github.com/fabricjs/fabric.js/pull/9474)
14
+ - refactor(): Change how LayoutManager handles restoring groups [#9522](https://github.com/fabricjs/fabric.js/pull/9522)
15
+ - fix(BaseConfiguration): set `devicePixelRatio` from window [#9470](https://github.com/fabricjs/fabric.js/pull/9470)
16
+ - fix(): bubble dirty flag for group only when true [#9540](https://github.com/fabricjs/fabric.js/pull/9540)
17
+ - test() Backport a test to capture a failing text style situation [#9531](https://github.com/fabricjs/fabric.js/pull/9531)
18
+
5
19
  ## [6.0.0-beta16]
6
20
 
7
21
  - fix(): block `enterEditing` after `endCurrentTransform` [#9513](https://github.com/fabricjs/fabric.js/pull/9513)
@@ -109,6 +123,7 @@
109
123
  - ci(): properly checkout head for stats [#9080](https://github.com/fabricjs/fabric.js/pull/9080)
110
124
  - fix(Text): `_getFontDeclaration` wasn't considering fontFamily from the style object [#9082](https://github.com/fabricjs/fabric.js/pull/9082)
111
125
  - chore(TS): Fix ITextBehaviour enterEditing type [#9075](https://github.com/fabricjs/fabric.js/pull/9075)
126
+ - cd(node): ban `package.json` main entry [#9068](https://github.com/fabricjs/fabric.js/pull/9068)
112
127
  - chore(TS): export FabricObjectProps and GroupProps [#9025](https://github.com/fabricjs/fabric.js/pull/9025)
113
128
  - chore(TS): Replace BaseFabricObject with FabricObject [#9016](https://github.com/fabricjs/fabric.js/pull/9016)
114
129
  - refactor(svgImport): remove the css/gradient/clipPath global definitions [#9030](https://github.com/fabricjs/fabric.js/pull/9030)
package/dist/fabric.d.ts CHANGED
@@ -78,6 +78,7 @@ export type { CompleteTextStyleDeclaration, TextStyleDeclaration, TextStyle, } f
78
78
  export type { GroupEvents, GroupProps, GroupOwnProps, SerializedGroupProps, } from './src/shapes/Group';
79
79
  export { Group } from './src/shapes/Group';
80
80
  export * from './src/LayoutManager';
81
+ export type { SerializedLayoutManager } from './src/LayoutManager';
81
82
  export type { ActiveSelectionOptions, MultiSelectionStacking, } from './src/shapes/ActiveSelection';
82
83
  export { ActiveSelection } from './src/shapes/ActiveSelection';
83
84
  export { FabricImage,