fabric 7.0.0-beta1 → 7.0.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/CHANGELOG.md +56 -1
- package/CONTRIBUTING.md +59 -135
- package/CONTRIBUTOR_LADDER.md +124 -0
- package/LICENSE +7 -1
- package/README.md +9 -24
- package/SECURITY.md +6 -2
- package/dist/extensions/aligning_guidelines/index.d.ts +49 -4
- package/dist/extensions/aligning_guidelines/index.d.ts.map +1 -1
- package/dist/extensions/aligning_guidelines/typedefs.d.ts +30 -21
- package/dist/extensions/aligning_guidelines/typedefs.d.ts.map +1 -1
- package/dist/extensions/aligning_guidelines/util/basic.d.ts +7 -1
- package/dist/extensions/aligning_guidelines/util/basic.d.ts.map +1 -1
- package/dist/extensions/aligning_guidelines/util/collect-line.d.ts +6 -11
- package/dist/extensions/aligning_guidelines/util/collect-line.d.ts.map +1 -1
- package/dist/extensions/aligning_guidelines/util/collect-point.d.ts +16 -12
- package/dist/extensions/aligning_guidelines/util/collect-point.d.ts.map +1 -1
- package/dist/extensions/aligning_guidelines/util/draw.d.ts +7 -5
- package/dist/extensions/aligning_guidelines/util/draw.d.ts.map +1 -1
- package/dist/extensions/index.d.ts +4 -2
- package/dist/extensions/index.d.ts.map +1 -1
- package/dist/extensions/westures_integration/index.d.ts +16 -0
- package/dist/extensions/westures_integration/index.d.ts.map +1 -0
- package/dist/index.js +322 -230
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +1 -1
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +322 -230
- package/dist/index.mjs.map +1 -1
- package/dist/index.node.cjs +322 -230
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.d.ts.map +1 -1
- package/dist/index.node.mjs +322 -230
- package/dist/index.node.mjs.map +1 -1
- package/dist/package.json.min.mjs +1 -1
- package/dist/package.json.mjs +1 -1
- package/dist/src/EventTypeDefs.d.ts +5 -1
- package/dist/src/EventTypeDefs.d.ts.map +1 -1
- package/dist/src/Intersection.d.ts +1 -2
- package/dist/src/Intersection.d.ts.map +1 -1
- package/dist/src/Intersection.min.mjs.map +1 -1
- package/dist/src/Intersection.mjs +1 -2
- package/dist/src/Intersection.mjs.map +1 -1
- package/dist/src/Observable.d.ts +2 -2
- package/dist/src/Observable.min.mjs.map +1 -1
- package/dist/src/Observable.mjs +2 -2
- package/dist/src/Observable.mjs.map +1 -1
- package/dist/src/Pattern/Pattern.d.ts +2 -2
- package/dist/src/Pattern/Pattern.min.mjs.map +1 -1
- package/dist/src/Pattern/Pattern.mjs +2 -2
- package/dist/src/Pattern/Pattern.mjs.map +1 -1
- package/dist/src/Point.d.ts +0 -10
- package/dist/src/Point.d.ts.map +1 -1
- package/dist/src/Point.min.mjs.map +1 -1
- package/dist/src/Point.mjs +0 -10
- package/dist/src/Point.mjs.map +1 -1
- package/dist/src/Shadow.d.ts +1 -1
- package/dist/src/Shadow.min.mjs.map +1 -1
- package/dist/src/Shadow.mjs +1 -1
- package/dist/src/Shadow.mjs.map +1 -1
- package/dist/src/brushes/BaseBrush.d.ts +1 -1
- package/dist/src/brushes/BaseBrush.min.mjs.map +1 -1
- package/dist/src/brushes/BaseBrush.mjs +1 -1
- package/dist/src/brushes/BaseBrush.mjs.map +1 -1
- package/dist/src/cache.d.ts +6 -4
- package/dist/src/cache.d.ts.map +1 -1
- package/dist/src/cache.min.mjs +1 -1
- package/dist/src/cache.min.mjs.map +1 -1
- package/dist/src/cache.mjs +16 -14
- package/dist/src/cache.mjs.map +1 -1
- package/dist/src/canvas/Canvas.d.ts +19 -1
- package/dist/src/canvas/Canvas.d.ts.map +1 -1
- package/dist/src/canvas/Canvas.min.mjs +1 -1
- package/dist/src/canvas/Canvas.min.mjs.map +1 -1
- package/dist/src/canvas/Canvas.mjs +65 -20
- package/dist/src/canvas/Canvas.mjs.map +1 -1
- package/dist/src/canvas/CanvasOptions.d.ts +9 -0
- package/dist/src/canvas/CanvasOptions.d.ts.map +1 -1
- package/dist/src/canvas/CanvasOptions.min.mjs +1 -1
- package/dist/src/canvas/CanvasOptions.min.mjs.map +1 -1
- package/dist/src/canvas/CanvasOptions.mjs +3 -3
- package/dist/src/canvas/CanvasOptions.mjs.map +1 -1
- package/dist/src/canvas/SelectableCanvas.d.ts +4 -4
- package/dist/src/canvas/SelectableCanvas.d.ts.map +1 -1
- package/dist/src/canvas/SelectableCanvas.min.mjs +1 -1
- package/dist/src/canvas/SelectableCanvas.min.mjs.map +1 -1
- package/dist/src/canvas/SelectableCanvas.mjs +4 -10
- package/dist/src/canvas/SelectableCanvas.mjs.map +1 -1
- package/dist/src/canvas/StaticCanvas.d.ts +10 -5
- package/dist/src/canvas/StaticCanvas.d.ts.map +1 -1
- package/dist/src/canvas/StaticCanvas.min.mjs +1 -1
- package/dist/src/canvas/StaticCanvas.min.mjs.map +1 -1
- package/dist/src/canvas/StaticCanvas.mjs +13 -7
- package/dist/src/canvas/StaticCanvas.mjs.map +1 -1
- package/dist/src/canvas/StaticCanvasOptions.d.ts.map +1 -1
- package/dist/src/canvas/StaticCanvasOptions.min.mjs +1 -1
- package/dist/src/canvas/StaticCanvasOptions.min.mjs.map +1 -1
- package/dist/src/canvas/StaticCanvasOptions.mjs +2 -1
- package/dist/src/canvas/StaticCanvasOptions.mjs.map +1 -1
- package/dist/src/color/Color.d.ts +1 -3
- package/dist/src/color/Color.d.ts.map +1 -1
- package/dist/src/color/Color.min.mjs +1 -1
- package/dist/src/color/Color.min.mjs.map +1 -1
- package/dist/src/color/Color.mjs +4 -5
- package/dist/src/color/Color.mjs.map +1 -1
- package/dist/src/color/constants.d.ts +26 -20
- package/dist/src/color/constants.d.ts.map +1 -1
- package/dist/src/color/constants.min.mjs +1 -1
- package/dist/src/color/constants.min.mjs.map +1 -1
- package/dist/src/color/constants.mjs +28 -22
- package/dist/src/color/constants.mjs.map +1 -1
- package/dist/src/constants.d.ts +3 -0
- package/dist/src/constants.d.ts.map +1 -1
- package/dist/src/constants.min.mjs +1 -1
- package/dist/src/constants.min.mjs.map +1 -1
- package/dist/src/constants.mjs +4 -1
- package/dist/src/constants.mjs.map +1 -1
- package/dist/src/controls/rotate.d.ts.map +1 -1
- package/dist/src/controls/rotate.min.mjs +1 -1
- package/dist/src/controls/rotate.min.mjs.map +1 -1
- package/dist/src/controls/rotate.mjs +1 -1
- package/dist/src/controls/rotate.mjs.map +1 -1
- package/dist/src/controls/wrapWithFixedAnchor.d.ts.map +1 -1
- package/dist/src/controls/wrapWithFixedAnchor.min.mjs +1 -1
- package/dist/src/controls/wrapWithFixedAnchor.min.mjs.map +1 -1
- package/dist/src/controls/wrapWithFixedAnchor.mjs +1 -2
- package/dist/src/controls/wrapWithFixedAnchor.mjs.map +1 -1
- package/dist/src/filters/ColorMatrix.d.ts +2 -2
- package/dist/src/filters/ColorMatrix.min.mjs.map +1 -1
- package/dist/src/filters/ColorMatrix.mjs +2 -2
- package/dist/src/filters/ColorMatrix.mjs.map +1 -1
- package/dist/src/filters/WebGLFilterBackend.d.ts.map +1 -1
- package/dist/src/filters/WebGLFilterBackend.min.mjs.map +1 -1
- package/dist/src/filters/WebGLFilterBackend.mjs +2 -0
- package/dist/src/filters/WebGLFilterBackend.mjs.map +1 -1
- package/dist/src/gradient/Gradient.d.ts +1 -1
- package/dist/src/gradient/Gradient.min.mjs.map +1 -1
- package/dist/src/gradient/Gradient.mjs +1 -1
- package/dist/src/gradient/Gradient.mjs.map +1 -1
- package/dist/src/gradient/parser/parseCoords.d.ts.map +1 -1
- package/dist/src/gradient/parser/parseCoords.min.mjs +1 -1
- package/dist/src/gradient/parser/parseCoords.min.mjs.map +1 -1
- package/dist/src/gradient/parser/parseCoords.mjs +5 -4
- package/dist/src/gradient/parser/parseCoords.mjs.map +1 -1
- package/dist/src/parser/parseFontDeclaration.d.ts +0 -2
- package/dist/src/parser/parseFontDeclaration.d.ts.map +1 -1
- package/dist/src/parser/parseFontDeclaration.min.mjs +1 -1
- package/dist/src/parser/parseFontDeclaration.min.mjs.map +1 -1
- package/dist/src/parser/parseFontDeclaration.mjs +2 -3
- package/dist/src/parser/parseFontDeclaration.mjs.map +1 -1
- package/dist/src/parser/parsePointsAttribute.d.ts +0 -1
- package/dist/src/parser/parsePointsAttribute.d.ts.map +1 -1
- package/dist/src/parser/parsePointsAttribute.min.mjs.map +1 -1
- package/dist/src/parser/parsePointsAttribute.mjs +0 -1
- package/dist/src/parser/parsePointsAttribute.mjs.map +1 -1
- package/dist/src/parser/parseSVGDocument.d.ts +0 -2
- package/dist/src/parser/parseSVGDocument.d.ts.map +1 -1
- package/dist/src/parser/parseSVGDocument.min.mjs.map +1 -1
- package/dist/src/parser/parseSVGDocument.mjs +0 -2
- package/dist/src/parser/parseSVGDocument.mjs.map +1 -1
- package/dist/src/parser/parseStyleAttribute.d.ts +0 -1
- package/dist/src/parser/parseStyleAttribute.d.ts.map +1 -1
- package/dist/src/parser/parseStyleAttribute.min.mjs.map +1 -1
- package/dist/src/parser/parseStyleAttribute.mjs +0 -1
- package/dist/src/parser/parseStyleAttribute.mjs.map +1 -1
- package/dist/src/parser/parseTransformAttribute.d.ts +0 -2
- package/dist/src/parser/parseTransformAttribute.d.ts.map +1 -1
- package/dist/src/parser/parseTransformAttribute.min.mjs.map +1 -1
- package/dist/src/parser/parseTransformAttribute.mjs +0 -2
- package/dist/src/parser/parseTransformAttribute.mjs.map +1 -1
- package/dist/src/parser/percent.d.ts +7 -2
- package/dist/src/parser/percent.d.ts.map +1 -1
- package/dist/src/parser/percent.min.mjs +1 -1
- package/dist/src/parser/percent.min.mjs.map +1 -1
- package/dist/src/parser/percent.mjs +9 -4
- package/dist/src/parser/percent.mjs.map +1 -1
- package/dist/src/shapes/Group.d.ts.map +1 -1
- package/dist/src/shapes/IText/IText.d.ts.map +1 -1
- package/dist/src/shapes/IText/IText.min.mjs +1 -1
- package/dist/src/shapes/IText/IText.min.mjs.map +1 -1
- package/dist/src/shapes/IText/IText.mjs +26 -18
- package/dist/src/shapes/IText/IText.mjs.map +1 -1
- package/dist/src/shapes/IText/ITextBehavior.d.ts +3 -0
- package/dist/src/shapes/IText/ITextBehavior.d.ts.map +1 -1
- package/dist/src/shapes/IText/ITextBehavior.min.mjs +1 -1
- package/dist/src/shapes/IText/ITextBehavior.min.mjs.map +1 -1
- package/dist/src/shapes/IText/ITextBehavior.mjs +22 -6
- package/dist/src/shapes/IText/ITextBehavior.mjs.map +1 -1
- package/dist/src/shapes/IText/ITextKeyBehavior.d.ts.map +1 -1
- package/dist/src/shapes/IText/ITextKeyBehavior.min.mjs +1 -1
- package/dist/src/shapes/IText/ITextKeyBehavior.min.mjs.map +1 -1
- package/dist/src/shapes/IText/ITextKeyBehavior.mjs +2 -1
- package/dist/src/shapes/IText/ITextKeyBehavior.mjs.map +1 -1
- package/dist/src/shapes/Image.d.ts +12 -12
- package/dist/src/shapes/Image.d.ts.map +1 -1
- package/dist/src/shapes/Image.min.mjs.map +1 -1
- package/dist/src/shapes/Image.mjs +1 -2
- package/dist/src/shapes/Image.mjs.map +1 -1
- package/dist/src/shapes/Line.d.ts +0 -1
- package/dist/src/shapes/Line.d.ts.map +1 -1
- package/dist/src/shapes/Line.min.mjs.map +1 -1
- package/dist/src/shapes/Line.mjs +0 -1
- package/dist/src/shapes/Line.mjs.map +1 -1
- package/dist/src/shapes/Object/InteractiveObject.d.ts +1 -1
- package/dist/src/shapes/Object/InteractiveObject.min.mjs.map +1 -1
- package/dist/src/shapes/Object/InteractiveObject.mjs +1 -1
- package/dist/src/shapes/Object/InteractiveObject.mjs.map +1 -1
- package/dist/src/shapes/Object/Object.d.ts +4 -2
- package/dist/src/shapes/Object/Object.d.ts.map +1 -1
- package/dist/src/shapes/Object/Object.min.mjs +1 -1
- package/dist/src/shapes/Object/Object.min.mjs.map +1 -1
- package/dist/src/shapes/Object/Object.mjs +5 -3
- package/dist/src/shapes/Object/Object.mjs.map +1 -1
- package/dist/src/shapes/Object/ObjectGeometry.d.ts +30 -18
- package/dist/src/shapes/Object/ObjectGeometry.d.ts.map +1 -1
- package/dist/src/shapes/Object/ObjectGeometry.min.mjs +1 -1
- package/dist/src/shapes/Object/ObjectGeometry.min.mjs.map +1 -1
- package/dist/src/shapes/Object/ObjectGeometry.mjs +37 -19
- package/dist/src/shapes/Object/ObjectGeometry.mjs.map +1 -1
- package/dist/src/shapes/Object/defaultValues.d.ts.map +1 -1
- package/dist/src/shapes/Object/defaultValues.min.mjs +1 -1
- package/dist/src/shapes/Object/defaultValues.min.mjs.map +1 -1
- package/dist/src/shapes/Object/defaultValues.mjs +3 -3
- package/dist/src/shapes/Object/defaultValues.mjs.map +1 -1
- package/dist/src/shapes/Object/types/BaseProps.d.ts +2 -2
- package/dist/src/shapes/Text/Text.d.ts +20 -7
- package/dist/src/shapes/Text/Text.d.ts.map +1 -1
- package/dist/src/shapes/Text/Text.min.mjs +1 -1
- package/dist/src/shapes/Text/Text.min.mjs.map +1 -1
- package/dist/src/shapes/Text/Text.mjs +52 -44
- package/dist/src/shapes/Text/Text.mjs.map +1 -1
- package/dist/src/shapes/Text/constants.min.mjs +1 -1
- package/dist/src/shapes/Text/constants.min.mjs.map +1 -1
- package/dist/src/shapes/Text/constants.mjs +4 -4
- package/dist/src/shapes/Text/constants.mjs.map +1 -1
- package/dist/src/shapes/Textbox.d.ts +0 -1
- package/dist/src/shapes/Textbox.d.ts.map +1 -1
- package/dist/src/shapes/Textbox.min.mjs.map +1 -1
- package/dist/src/shapes/Textbox.mjs +0 -1
- package/dist/src/shapes/Textbox.mjs.map +1 -1
- package/dist/src/typedefs.d.ts +1 -1
- package/dist/src/util/internals/cleanupSvgAttribute.d.ts.map +1 -1
- package/dist/src/util/internals/cleanupSvgAttribute.min.mjs +1 -1
- package/dist/src/util/internals/cleanupSvgAttribute.min.mjs.map +1 -1
- package/dist/src/util/internals/cleanupSvgAttribute.mjs +3 -2
- package/dist/src/util/internals/cleanupSvgAttribute.mjs.map +1 -1
- package/dist/src/util/internals/normalizeWhiteSpace.d.ts +2 -0
- package/dist/src/util/internals/normalizeWhiteSpace.d.ts.map +1 -0
- package/dist/src/util/internals/normalizeWhiteSpace.min.mjs +2 -0
- package/dist/src/util/internals/normalizeWhiteSpace.min.mjs.map +1 -0
- package/dist/src/util/internals/normalizeWhiteSpace.mjs +4 -0
- package/dist/src/util/internals/normalizeWhiteSpace.mjs.map +1 -0
- package/dist/src/util/misc/groupSVGElements.d.ts +0 -1
- package/dist/src/util/misc/groupSVGElements.d.ts.map +1 -1
- package/dist/src/util/misc/groupSVGElements.min.mjs.map +1 -1
- package/dist/src/util/misc/groupSVGElements.mjs +0 -1
- package/dist/src/util/misc/groupSVGElements.mjs.map +1 -1
- package/dist/src/util/misc/matrix.d.ts +5 -5
- package/dist/src/util/misc/matrix.min.mjs.map +1 -1
- package/dist/src/util/misc/matrix.mjs +5 -5
- package/dist/src/util/misc/matrix.mjs.map +1 -1
- package/dist/src/util/transform_matrix_removal.d.ts +2 -1
- package/dist/src/util/transform_matrix_removal.d.ts.map +1 -1
- package/dist/src/util/transform_matrix_removal.min.mjs.map +1 -1
- package/dist/src/util/transform_matrix_removal.mjs.map +1 -1
- package/dist-extensions/_virtual/_rollupPluginBabelHelpers.mjs +25 -0
- package/dist-extensions/_virtual/_rollupPluginBabelHelpers.mjs.map +1 -0
- package/dist-extensions/aligning_guidelines/index.mjs +201 -108
- package/dist-extensions/aligning_guidelines/index.mjs.map +1 -1
- package/dist-extensions/aligning_guidelines/util/basic.mjs +45 -5
- package/dist-extensions/aligning_guidelines/util/basic.mjs.map +1 -1
- package/dist-extensions/aligning_guidelines/util/collect-line.mjs +44 -170
- package/dist-extensions/aligning_guidelines/util/collect-line.mjs.map +1 -1
- package/dist-extensions/aligning_guidelines/util/collect-point.mjs +76 -67
- package/dist-extensions/aligning_guidelines/util/collect-point.mjs.map +1 -1
- package/dist-extensions/aligning_guidelines/util/draw.mjs +52 -46
- package/dist-extensions/aligning_guidelines/util/draw.mjs.map +1 -1
- package/dist-extensions/data_updaters/gradient/index.mjs +13 -2
- package/dist-extensions/data_updaters/gradient/index.mjs.map +1 -1
- package/dist-extensions/extensions/aligning_guidelines/index.d.ts +49 -4
- package/dist-extensions/extensions/aligning_guidelines/index.d.ts.map +1 -1
- package/dist-extensions/extensions/aligning_guidelines/typedefs.d.ts +30 -21
- package/dist-extensions/extensions/aligning_guidelines/typedefs.d.ts.map +1 -1
- package/dist-extensions/extensions/aligning_guidelines/util/basic.d.ts +7 -1
- package/dist-extensions/extensions/aligning_guidelines/util/basic.d.ts.map +1 -1
- package/dist-extensions/extensions/aligning_guidelines/util/collect-line.d.ts +6 -11
- package/dist-extensions/extensions/aligning_guidelines/util/collect-line.d.ts.map +1 -1
- package/dist-extensions/extensions/aligning_guidelines/util/collect-point.d.ts +16 -12
- package/dist-extensions/extensions/aligning_guidelines/util/collect-point.d.ts.map +1 -1
- package/dist-extensions/extensions/aligning_guidelines/util/draw.d.ts +7 -5
- package/dist-extensions/extensions/aligning_guidelines/util/draw.d.ts.map +1 -1
- package/dist-extensions/extensions/index.d.ts +4 -2
- package/dist-extensions/extensions/index.d.ts.map +1 -1
- package/dist-extensions/extensions/westures_integration/index.d.ts +16 -0
- package/dist-extensions/extensions/westures_integration/index.d.ts.map +1 -0
- package/dist-extensions/fabric-extensions.min.js +1 -1
- package/dist-extensions/fabric-extensions.min.js.map +1 -1
- package/dist-extensions/index.mjs +3 -2
- package/dist-extensions/index.mjs.map +1 -1
- package/dist-extensions/src/EventTypeDefs.d.ts +5 -1
- package/dist-extensions/src/EventTypeDefs.d.ts.map +1 -1
- package/dist-extensions/src/Intersection.d.ts +1 -2
- package/dist-extensions/src/Intersection.d.ts.map +1 -1
- package/dist-extensions/src/Observable.d.ts +2 -2
- package/dist-extensions/src/Pattern/Pattern.d.ts +2 -2
- package/dist-extensions/src/Point.d.ts +0 -10
- package/dist-extensions/src/Point.d.ts.map +1 -1
- package/dist-extensions/src/Shadow.d.ts +1 -1
- package/dist-extensions/src/brushes/BaseBrush.d.ts +1 -1
- package/dist-extensions/src/cache.d.ts +6 -4
- package/dist-extensions/src/cache.d.ts.map +1 -1
- package/dist-extensions/src/canvas/Canvas.d.ts +19 -1
- package/dist-extensions/src/canvas/Canvas.d.ts.map +1 -1
- package/dist-extensions/src/canvas/CanvasOptions.d.ts +9 -0
- package/dist-extensions/src/canvas/CanvasOptions.d.ts.map +1 -1
- package/dist-extensions/src/canvas/SelectableCanvas.d.ts +4 -4
- package/dist-extensions/src/canvas/SelectableCanvas.d.ts.map +1 -1
- package/dist-extensions/src/canvas/StaticCanvas.d.ts +10 -5
- package/dist-extensions/src/canvas/StaticCanvas.d.ts.map +1 -1
- package/dist-extensions/src/canvas/StaticCanvasOptions.d.ts.map +1 -1
- package/dist-extensions/src/color/Color.d.ts +1 -3
- package/dist-extensions/src/color/Color.d.ts.map +1 -1
- package/dist-extensions/src/color/constants.d.ts +26 -20
- package/dist-extensions/src/color/constants.d.ts.map +1 -1
- package/dist-extensions/src/constants.d.ts +3 -0
- package/dist-extensions/src/constants.d.ts.map +1 -1
- package/dist-extensions/src/controls/rotate.d.ts.map +1 -1
- package/dist-extensions/src/controls/wrapWithFixedAnchor.d.ts.map +1 -1
- package/dist-extensions/src/filters/ColorMatrix.d.ts +2 -2
- package/dist-extensions/src/filters/WebGLFilterBackend.d.ts.map +1 -1
- package/dist-extensions/src/gradient/Gradient.d.ts +1 -1
- package/dist-extensions/src/gradient/parser/parseCoords.d.ts.map +1 -1
- package/dist-extensions/src/parser/parseFontDeclaration.d.ts +0 -2
- package/dist-extensions/src/parser/parseFontDeclaration.d.ts.map +1 -1
- package/dist-extensions/src/parser/parsePointsAttribute.d.ts +0 -1
- package/dist-extensions/src/parser/parsePointsAttribute.d.ts.map +1 -1
- package/dist-extensions/src/parser/parseSVGDocument.d.ts +0 -2
- package/dist-extensions/src/parser/parseSVGDocument.d.ts.map +1 -1
- package/dist-extensions/src/parser/parseStyleAttribute.d.ts +0 -1
- package/dist-extensions/src/parser/parseStyleAttribute.d.ts.map +1 -1
- package/dist-extensions/src/parser/parseTransformAttribute.d.ts +0 -2
- package/dist-extensions/src/parser/parseTransformAttribute.d.ts.map +1 -1
- package/dist-extensions/src/parser/percent.d.ts +7 -2
- package/dist-extensions/src/parser/percent.d.ts.map +1 -1
- package/dist-extensions/src/shapes/Group.d.ts.map +1 -1
- package/dist-extensions/src/shapes/IText/IText.d.ts.map +1 -1
- package/dist-extensions/src/shapes/IText/ITextBehavior.d.ts +3 -0
- package/dist-extensions/src/shapes/IText/ITextBehavior.d.ts.map +1 -1
- package/dist-extensions/src/shapes/IText/ITextKeyBehavior.d.ts.map +1 -1
- package/dist-extensions/src/shapes/Image.d.ts +12 -12
- package/dist-extensions/src/shapes/Image.d.ts.map +1 -1
- package/dist-extensions/src/shapes/Line.d.ts +0 -1
- package/dist-extensions/src/shapes/Line.d.ts.map +1 -1
- package/dist-extensions/src/shapes/Object/InteractiveObject.d.ts +1 -1
- package/dist-extensions/src/shapes/Object/Object.d.ts +4 -2
- package/dist-extensions/src/shapes/Object/Object.d.ts.map +1 -1
- package/dist-extensions/src/shapes/Object/ObjectGeometry.d.ts +30 -18
- package/dist-extensions/src/shapes/Object/ObjectGeometry.d.ts.map +1 -1
- package/dist-extensions/src/shapes/Object/defaultValues.d.ts.map +1 -1
- package/dist-extensions/src/shapes/Object/types/BaseProps.d.ts +2 -2
- package/dist-extensions/src/shapes/Text/Text.d.ts +20 -7
- package/dist-extensions/src/shapes/Text/Text.d.ts.map +1 -1
- package/dist-extensions/src/shapes/Textbox.d.ts +0 -1
- package/dist-extensions/src/shapes/Textbox.d.ts.map +1 -1
- package/dist-extensions/src/typedefs.d.ts +1 -1
- package/dist-extensions/src/util/internals/cleanupSvgAttribute.d.ts.map +1 -1
- package/dist-extensions/src/util/internals/normalizeWhiteSpace.d.ts +2 -0
- package/dist-extensions/src/util/internals/normalizeWhiteSpace.d.ts.map +1 -0
- package/dist-extensions/src/util/misc/groupSVGElements.d.ts +0 -1
- package/dist-extensions/src/util/misc/groupSVGElements.d.ts.map +1 -1
- package/dist-extensions/src/util/misc/matrix.d.ts +5 -5
- package/dist-extensions/src/util/transform_matrix_removal.d.ts +2 -1
- package/dist-extensions/src/util/transform_matrix_removal.d.ts.map +1 -1
- package/dist-extensions/westures_integration/index.mjs +103 -0
- package/dist-extensions/westures_integration/index.mjs.map +1 -0
- package/eslint.config.mjs +5 -1
- package/extensions/aligning_guidelines/README.MD +160 -4
- package/extensions/aligning_guidelines/index.ts +221 -123
- package/extensions/aligning_guidelines/typedefs.ts +28 -23
- package/extensions/aligning_guidelines/util/basic.spec.ts +77 -19
- package/extensions/aligning_guidelines/util/basic.ts +43 -13
- package/extensions/aligning_guidelines/util/collect-line.ts +49 -156
- package/extensions/aligning_guidelines/util/collect-point.ts +97 -64
- package/extensions/aligning_guidelines/util/draw.ts +54 -44
- package/extensions/index.ts +12 -5
- package/extensions/types.d.ts +1 -0
- package/extensions/westures_integration/index.ts +133 -0
- package/index.node.ts +2 -3
- package/package.json +25 -29
- package/playwright.setup.ts +10 -4
- package/rollup.config.mjs +11 -4
- package/scripts/buildLock.mjs +6 -6
- package/scripts/colors.mjs +10 -0
- package/scripts/dataUpdater.mjs +350 -0
- package/scripts/date-time.mjs +19 -0
- package/scripts/dirname.mjs +1 -1
- package/scripts/index.mjs +10 -16
- package/scripts/sandbox.mjs +10 -11
- package/scripts/updater-reference.mjs +66 -0
- package/src/Collection.spec.ts +4 -4
- package/src/EventTypeDefs.ts +3 -2
- package/src/Intersection.ts +1 -2
- package/src/LayoutManager/LayoutManager.spec.ts +17 -8
- package/src/LayoutManager/__snapshots__/LayoutManager.spec.ts.snap +4 -4
- package/src/Observable.ts +2 -2
- package/src/Pattern/Pattern.ts +2 -2
- package/src/Point.ts +0 -10
- package/src/Shadow.ts +1 -1
- package/src/brushes/BaseBrush.ts +1 -1
- package/src/cache.spec.ts +25 -17
- package/src/cache.ts +20 -18
- package/src/canvas/Canvas-dispose.spec.ts +4 -2
- package/src/canvas/Canvas-events.spec.ts +102 -38
- package/src/canvas/Canvas.fixtures.ts +242 -0
- package/src/canvas/Canvas.spec.ts +59 -111
- package/src/canvas/Canvas.ts +67 -20
- package/src/canvas/CanvasOptions.ts +12 -3
- package/src/canvas/SelectableCanvas.spec.ts +7 -6
- package/src/canvas/SelectableCanvas.ts +5 -5
- package/src/canvas/StaticCanvas.fixtures.ts +292 -0
- package/src/canvas/StaticCanvas.spec.ts +52 -146
- package/src/canvas/StaticCanvas.ts +17 -15
- package/src/canvas/StaticCanvasOptions.ts +1 -0
- package/src/canvas/__tests__/eventData.test.ts +59 -55
- package/src/color/Color.ts +4 -5
- package/src/color/constants.ts +28 -22
- package/src/constants.ts +5 -0
- package/src/controls/Control-cursor.spec.ts +2 -2
- package/src/controls/Control-handlers.spec.ts +38 -40
- package/src/controls/changeWidth.test.ts +16 -16
- package/src/controls/rotate.ts +1 -5
- package/src/controls/wrapWithFixedAnchor.ts +1 -2
- package/src/filters/ColorMatrix.ts +2 -2
- package/src/filters/WebGLFilterBackend.ts +4 -2
- package/src/gradient/Gradient.ts +1 -1
- package/src/gradient/parser/parseCoords.ts +5 -6
- package/src/mixins/eraser_brush.mixin.ts +4 -4
- package/src/parser/parseFontDeclaration.ts +2 -3
- package/src/parser/parsePointsAttribute.ts +0 -1
- package/src/parser/parseSVGDocument.ts +0 -2
- package/src/parser/parseStyleAttribute.ts +0 -1
- package/src/parser/parseTransformAttribute.ts +0 -2
- package/src/parser/percent.ts +10 -6
- package/src/shapes/ActiveSelection.spec.ts +23 -23
- package/src/shapes/Circle.spec.ts +13 -3
- package/src/shapes/Ellipse.spec.ts +46 -13
- package/src/shapes/Group.spec.ts +50 -83
- package/src/shapes/IText/IText-click-behavior.spec.ts +7 -2
- package/src/shapes/IText/IText.test.ts +9 -9
- package/src/shapes/IText/IText.ts +25 -29
- package/src/shapes/IText/ITextBehavior.ts +25 -9
- package/src/shapes/IText/ITextKeyBehavior.test.ts +33 -0
- package/src/shapes/IText/ITextKeyBehavior.ts +1 -0
- package/src/shapes/Image.spec.ts +23 -16
- package/src/shapes/Image.ts +13 -3
- package/src/shapes/Line.spec.ts +4 -4
- package/src/shapes/Line.ts +0 -1
- package/src/shapes/Object/InteractiveObject.ts +1 -1
- package/src/shapes/Object/Object-clip-path.spec.ts +2 -2
- package/src/shapes/Object/Object-interactivity.spec.ts +6 -6
- package/src/shapes/Object/Object.spec.ts +8 -7
- package/src/shapes/Object/Object.ts +5 -7
- package/src/shapes/Object/ObjectGeometry.spec.ts +176 -176
- package/src/shapes/Object/ObjectGeometry.ts +37 -23
- package/src/shapes/Object/__snapshots__/InteractiveObject.spec.ts.snap +2 -2
- package/src/shapes/Object/__snapshots__/ObjectGeometry.spec.ts.snap +22 -0
- package/src/shapes/Object/defaultValues.ts +3 -2
- package/src/shapes/Object/types/BaseProps.ts +2 -2
- package/src/shapes/Path.spec.ts +9 -9
- package/src/shapes/Polygon.spec.ts +14 -14
- package/src/shapes/Polyline.spec.ts +20 -20
- package/src/shapes/Rect.spec.ts +12 -6
- package/src/shapes/Text/Text.spec.ts +32 -7
- package/src/shapes/Text/Text.ts +73 -69
- package/src/shapes/Text/TextSVGExportMixin.spec.ts +33 -3
- package/src/shapes/Text/__snapshots__/Text.spec.ts.snap +2 -2
- package/src/shapes/Text/__snapshots__/TextSVGExportMixin.spec.ts.snap +8 -1
- package/src/shapes/Text/constants.ts +4 -4
- package/src/shapes/Textbox.spec.ts +4 -3
- package/src/shapes/Textbox.ts +0 -1
- package/src/shapes/__snapshots__/Group.spec.ts.snap +37 -0
- package/src/shapes/__snapshots__/Textbox.spec.ts.snap +4 -4
- package/src/typedefs.ts +1 -1
- package/src/util/internals/cleanupSvgAttribute.ts +7 -5
- package/src/util/internals/normalizeWhiteSpace.ts +1 -0
- package/src/util/misc/groupSVGElements.ts +0 -1
- package/src/util/misc/matrix.ts +5 -5
- package/src/util/misc/mergeClipPaths.spec.ts +7 -2
- package/src/util/transform_matrix_removal.ts +2 -2
- package/tsconfig-extensions.json +1 -1
- package/tsconfig.json +1 -0
- package/typedoc.config.json +2 -1
- package/vitest.config.ts +9 -7
- package/vitest.d.ts +1 -1
- package/vitest.extend.ts +1 -1
- package/dist/extensions/aligning_guidelines/constant.d.ts +0 -3
- package/dist/extensions/aligning_guidelines/constant.d.ts.map +0 -1
- package/dist-extensions/aligning_guidelines/constant.mjs +0 -11
- package/dist-extensions/aligning_guidelines/constant.mjs.map +0 -1
- package/dist-extensions/extensions/aligning_guidelines/constant.d.ts +0 -3
- package/dist-extensions/extensions/aligning_guidelines/constant.d.ts.map +0 -1
- package/extensions/aligning_guidelines/constant.ts +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,61 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [
|
|
3
|
+
## [7.0.0]
|
|
4
|
+
|
|
5
|
+
- fix(): Fix toDataUrl writing on contextTop [#10820](https://github.com/fabricjs/fabric.js/pull/10820)
|
|
6
|
+
- feat(): Multi touch gesture support with module westures [#10813](https://github.com/fabricjs/fabric.js/pull/10813)
|
|
7
|
+
- fix(): Fix the situation where undefined + char exists when calculating couple [#10816](https://github.com/fabricjs/fabric.js/pull/10816)
|
|
8
|
+
- feat(): Add configuration parameter for patternQuality in node [#10804](https://github.com/fabricjs/fabric.js/pull/10804)
|
|
9
|
+
- fix(): BREAKING Fix text positioning [#10803](https://github.com/fabricjs/fabric.js/pull/10803)
|
|
10
|
+
- fix(AligningGuidelines): Guidelines features updates [#10120] (https://github.com/fabricjs/fabric.js/pull/10120)
|
|
11
|
+
- chore(deps-dev): bump inquirer from 12.9.6 to 12.10.0 [#10789](https://github.com/fabricjs/fabric.js/pull/10789)
|
|
12
|
+
- chore(deps-dev): bump @types/micromatch from 4.0.9 to 4.0.10 [#10788](https://github.com/fabricjs/fabric.js/pull/10788)
|
|
13
|
+
- chore(): update major version of vitest [#10786](https://github.com/fabricjs/fabric.js/pull/10786)
|
|
14
|
+
- fix(): Prototype pollution risk on text char cache [#10782](https://github.com/fabricjs/fabric.js/pull/10782)
|
|
15
|
+
- fix(): fix rendering of text when line height is set to 0 [#10785](https://github.com/fabricjs/fabric.js/pull/10785)
|
|
16
|
+
- chore(): update playwright [#10780](https://github.com/fabricjs/fabric.js/pull/10780)
|
|
17
|
+
- chore(deps-dev): bump es-toolkit from 1.39.10 to 1.40.0 [#10777](https://github.com/fabricjs/fabric.js/pull/10777)
|
|
18
|
+
- BREAKING chore(): Deprecate originX and originY and change their default to center/center [#10715](https://github.com/fabricjs/fabric.js/pull/10715)
|
|
19
|
+
- chore(deps-dev): bump @types/node from 24.7.0 to 24.7.2 [#10778](https://github.com/fabricjs/fabric.js/pull/10778)
|
|
20
|
+
- chore(deps-dev): bump @rollup/plugin-babel from 6.0.4 to 6.1.0 [#10776](https://github.com/fabricjs/fabric.js/pull/10776)
|
|
21
|
+
- chore(): up dev deps [#10773](https://github.com/fabricjs/fabric.js/pull/10773)
|
|
22
|
+
- chore(): up deps [#10771](https://github.com/fabricjs/fabric.js/pull/10771)
|
|
23
|
+
- chore(): remove moment dev dependency [#10770](https://github.com/fabricjs/fabric.js/pull/10770)
|
|
24
|
+
- ci(): Move firefox to headless: false to see if improves passing rate. Renamed config because of deprecation warning [#10769](https://github.com/fabricjs/fabric.js/pull/10769)
|
|
25
|
+
- chore(): remove fs-extra dev dependency [#10767](https://github.com/fabricjs/fabric.js/pull/10767)
|
|
26
|
+
- chore(deps-dev): bump @playwright/test from 1.55.0 to 1.55.1 [#10761](https://github.com/fabricjs/fabric.js/pull/10761)
|
|
27
|
+
- test(): Add new e2e import test for svg preserve aspect ratio [#10766](https://github.com/fabricjs/fabric.js/pull/10766)
|
|
28
|
+
- chore() Revisit and reduce contribution guidelines, try to streamline things [#10759](https://github.com/fabricjs/fabric.js/pull/10759)
|
|
29
|
+
- chore(deps): bump the npm_and_yarn group across 2 directories with 2 updates [#10734](https://github.com/fabricjs/fabric.js/pull/10734)
|
|
30
|
+
- chore(deps-dev): bump @babel/core from 7.28.3 to 7.28.4 [#10753](https://github.com/fabricjs/fabric.js/pull/10753)
|
|
31
|
+
- chore(): remove chalk [#10758](https://github.com/fabricjs/fabric.js/pull/10758)
|
|
32
|
+
- chore(deps-dev): bump commander from 14.0.0 to 14.0.1 [#10754](https://github.com/fabricjs/fabric.js/pull/10754)
|
|
33
|
+
- chore(deps-dev): bump chalk from 5.6.0 to 5.6.2 [#10752](https://github.com/fabricjs/fabric.js/pull/10752)
|
|
34
|
+
- fix(): Fix some weaknesses in the changelog-update action ( various CWE ) [#10747](https://github.com/fabricjs/fabric.js/pull/10747)
|
|
35
|
+
- fix(): CWE-1333 CWE-400 CWE-730 Simplify some regexes in order to avoid slowness with craft bad string [#10746](https://github.com/fabricjs/fabric.js/pull/10746)
|
|
36
|
+
- fix(): CWE-1333 CWE-400 CWE-730 in Text.ts regex [#10745](https://github.com/fabricjs/fabric.js/pull/10745)
|
|
37
|
+
- ci(): fix CWE-829 in action build-stats [#10744](https://github.com/fabricjs/fabric.js/pull/10744)
|
|
38
|
+
- ci(): Fix CWE-829 in the coverage report action [#10743](https://github.com/fabricjs/fabric.js/pull/10743)
|
|
39
|
+
- ci(): Foked the action find-create-update-comment in order to pin sha(s) [#10742](https://github.com/fabricjs/fabric.js/pull/10742)
|
|
40
|
+
- fix(): After executing loadFromJSON, it unexpectedly adds an objects property to the canvas.
|
|
41
|
+
- fix(): Incorrect sha for commenting action
|
|
42
|
+
- fix(IText): A form field element has neither an id nor a name attribute. [#10172](https://github.com/fabricjs/fabric.js/pull/10172)
|
|
43
|
+
- docs(): change CN comment to EN [#10727](https://github.com/fabricjs/fabric.js/pull/10727)
|
|
44
|
+
- chore(): Remove paths for codeQL let it scan all the repo [#10738](https://github.com/fabricjs/fabric.js/pull/10738)
|
|
45
|
+
- chore(): Pin all GitHub Actions to commit SHAs for security compliance [#10739](https://github.com/fabricjs/fabric.js/pull/10739)
|
|
46
|
+
- chore(deps-dev): bump es-toolkit from 1.39.7 to 1.39.10 [#10731](https://github.com/fabricjs/fabric.js/pull/10731)
|
|
47
|
+
- chore(deps-dev): bump serve from 14.2.4 to 14.2.5 [#10730](https://github.com/fabricjs/fabric.js/pull/10730)
|
|
48
|
+
- Update license to include 2016–2025 Fabric.js contributors [#10726](https://github.com/fabricjs/fabric.js/pull/10726)
|
|
49
|
+
- chore(deps-dev): bump @eslint/js from 9.34.0 to 9.35.0 [#10729](https://github.com/fabricjs/fabric.js/pull/10729)
|
|
50
|
+
- chore(): Format dependabot.yml with Prettier to ensure consistent code style [#10733](https://github.com/fabricjs/fabric.js/pull/10733)
|
|
51
|
+
- doc: Repair broken link in docs by targeting all demo and samples pages in old fabric docs. [#10723](https://github.com/fabricjs/fabric.js/pull/10723)
|
|
52
|
+
- Clarify MIT License [#10725](https://github.com/fabricjs/fabric.js/pull/10725)
|
|
53
|
+
- BREAKING(): Deprecate fireRightClick, fireMiddleClick, stopContextMenu and change their default value. [#10720](https://github.com/fabricjs/fabric.js/pull/10720)
|
|
54
|
+
- BREAKING: chore(): Update min node version to 20, add 24 [#10716](https://github.com/fabricjs/fabric.js/pull/10716)
|
|
55
|
+
- fix(): The mouse enter and leave events of child elements will be executed twice. [10698](https://github.com/fabricjs/fabric.js/issues/10698)
|
|
56
|
+
- chore(): Remove mouse wheel console warning by setting default explicitly. [#10712](https://github.com/fabricjs/fabric.js/pull/10712)
|
|
57
|
+
- chore(): Fixes to TypeDoc for compilation [#10709](https://github.com/fabricjs/fabric.js/pull/10709)
|
|
58
|
+
- chore(): Update typescript 5.9, eslint, babel and rollup to latest [#10708](https://github.com/fabricjs/fabric.js/pull/10708)
|
|
4
59
|
|
|
5
60
|
## [7.0.0-beta1]
|
|
6
61
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -1,101 +1,87 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Contributing to Fabric
|
|
2
|
+
|
|
3
|
+
First of all thank you for your interest in contributing. 🙏
|
|
2
4
|
|
|
3
5
|
This guide covers all you need to know from the start, for a first time contributor, advancing to the more advanced topics as you continue reading.
|
|
4
6
|
|
|
5
|
-
##
|
|
7
|
+
## What is a contribution, who is a contributor
|
|
8
|
+
|
|
9
|
+
A Contributor is anyone who simply adds to the project, without any formal membership. Contributions do not need to be code. Contributions can be code, docs, issue triaging, discussions, ideas.
|
|
10
|
+
|
|
11
|
+
If you are starting your coding journey, contributions are a good way to learn skills, learn development workflows, meet other developers.
|
|
6
12
|
|
|
7
|
-
|
|
13
|
+
If you find yourself contributing often you may be interested in the [Contributor ladder](CONTRIBUTOR_LADDER.md)
|
|
14
|
+
|
|
15
|
+
## Asking Questions
|
|
16
|
+
|
|
17
|
+
The place for questions is NOT the [Issue Tracker](#Issue-Tracker)
|
|
8
18
|
Please refer to available resources (read below) and refrain from opening an issue in such a case.
|
|
9
19
|
|
|
10
20
|
To find an answer, first [search the repository][search_issues]. It contains a lot of useful threads.
|
|
11
21
|
|
|
12
|
-
|
|
22
|
+
If you find an answer in the issue tracker or in the discussions, but not in the docs, you may consider [improving the docs](#improving-docs). Docs contributions are really appreciated above anything else
|
|
13
23
|
|
|
14
|
-
Demos and examples
|
|
24
|
+
Demos and examples can be found on [fabricjs.com][website], [`jsfiddle`][jsfiddles], [`codepen.io`][codepens] and more.
|
|
15
25
|
|
|
16
|
-
##
|
|
26
|
+
## Issue Tracker
|
|
17
27
|
|
|
18
28
|
- **Before You Begin** 🎬
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
29
|
+
- Make sure you didn't fall into a known [**GOTCHA**][gotchas].
|
|
30
|
+
- [**Searching**][search_issues] for existing issues and discussions is
|
|
31
|
+
**VITAL** in order to keep the community in a good state, prevent spamming and avoid consuming community time.
|
|
32
|
+
If you need to open a new issue then:
|
|
33
|
+
- **Fill out the [bug report][bug_report] with care**, it is there for a reason.
|
|
23
34
|
- The **Title** must be informative, short and 🧿 to the point.
|
|
24
35
|
- **Description**
|
|
25
36
|
- Describe the issue making sure you are very clear.
|
|
26
|
-
- Add
|
|
27
|
-
- Make an effort explaining yourself
|
|
28
|
-
-
|
|
37
|
+
- Add logs, screenshots or videos if that makes sense.
|
|
38
|
+
- Make an effort explaining yourself. Maintainers are busy, don't waste on action on your issue for just having them ask for more details. Put them in condition to answer immediately.
|
|
39
|
+
- Re read your description multiple times **before submitting**.
|
|
29
40
|
- **Test Case**
|
|
30
41
|
- Create a minimal and immediate test case, reproducing the bug.
|
|
31
42
|
- Add relevant explanations.
|
|
32
43
|
- It should be extremely **easy** for someone to understand your bug and **fast** to reproduce it. **Don't leave it to us to do your part**.
|
|
33
44
|
- Bug templates can be found within a bug report.
|
|
34
45
|
- Specify which **version** of Fabric.js you are using.
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
**These are minimal requirements. Without them issues shall be ⛔.**
|
|
46
|
+
- Verify your bug also on the latest version before submitting it.
|
|
38
47
|
|
|
39
|
-
|
|
48
|
+
**These are minimal requirements. Without them issues will be closed.**
|
|
40
49
|
|
|
41
|
-
|
|
50
|
+
If it's not a bug **OR** if you're unsure, start a [discussion][discussions].
|
|
42
51
|
|
|
43
52
|
---
|
|
44
53
|
|
|
45
|
-
##
|
|
54
|
+
## Fixing typos is appreciated
|
|
46
55
|
|
|
47
|
-
Typos
|
|
48
|
-
Though it may seem insignificant, typo fixes are appreciated
|
|
56
|
+
Typos happens.\
|
|
57
|
+
Though it may seem insignificant, typo fixes are appreciated!
|
|
49
58
|
It's a good and simple way to start contributing.
|
|
50
59
|
|
|
51
|
-
##
|
|
60
|
+
## Improving Docs
|
|
52
61
|
|
|
53
62
|
Improving **DOCS** is **SUPER** important for everyone.\
|
|
54
|
-
Even if it's a small fix it is valuable
|
|
63
|
+
Even if it's a small fix it is valuable **don't hesitate**!
|
|
55
64
|
|
|
56
|
-
We
|
|
65
|
+
We have a website that is easy to contribute to.
|
|
57
66
|
|
|
58
|
-
|
|
67
|
+
[Adding demos](#Adding Demos) is also a great contribution.
|
|
59
68
|
|
|
60
|
-
|
|
69
|
+
## Helping Out with other devs issues
|
|
70
|
+
|
|
71
|
+
Answering questions and addressing issues, as well as fixing and adding types (see [Pull Requests](#pull-requests)), are great ways to start contributing to fabric.
|
|
61
72
|
|
|
62
73
|
- [Issues][issues]
|
|
63
74
|
- [Discussions][discussions]
|
|
64
75
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
**New website is under construction. Contributions are welcome.**
|
|
68
|
-
|
|
69
|
-
Take a look at an existing [demo file][demo_file].\
|
|
70
|
-
Create a new file in the same directory (`posts/demos/_posts`) and follow [**developing the website**](#fabricjscom-deprecated).
|
|
71
|
-
|
|
72
|
-
### ~~`fabricjs.com`~~ (currently not possible)
|
|
73
|
-
|
|
74
|
-
To develop fabric's site you need to clone [`fabricjs.com`][website_repo] in the same parent folder of [`fabric.js`][repo], so that `fabric.js` and `fabricjs.com` are siblings.
|
|
75
|
-
|
|
76
|
-
To start the dev server run `npm start:dev` inside the `fabricjs.com` directory (after installing dependencies).
|
|
76
|
+
## Fixing Bugs
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
- Open an [issue](#issue-tracker), if there isn't any, addressing the bug.
|
|
79
|
+
- If the issue is labeled as 'bug' then it needs a fix. Do not open a PR before that moment.
|
|
80
|
+
- Once the issue is confirmed as a bug you can fix it, mention in the issue you are working to fix it and check [Developing](#developing).
|
|
81
|
+
- Add [tests](#testing).
|
|
82
|
+
- Open [PR](#pull-requests)
|
|
79
83
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
- Open an [issue](#-issue-tracker), if there isn't any, addressing the bug.
|
|
83
|
-
- Fix the bug, see [Developing](#-developing-).
|
|
84
|
-
- Add [tests](#-testing).
|
|
85
|
-
- [PR](#-pull-requests)
|
|
86
|
-
|
|
87
|
-
## 🚀 Pull Requests
|
|
88
|
-
|
|
89
|
-
Fabric is an open source project 🦄 and as such depends on the **genuine effort** of individuals and the community as a whole.
|
|
90
|
-
**Join Us** to make Fabric better 🌺 .
|
|
91
|
-
|
|
92
|
-
### Getting Started
|
|
93
|
-
|
|
94
|
-
- Read this section through.
|
|
95
|
-
- Take a look at [**GOTCHAS**][gotchas]
|
|
96
|
-
- Follow [Developing](#-developing-) and [Testing](#-testing).
|
|
97
|
-
|
|
98
|
-
### ✅ Guidelines
|
|
84
|
+
### General Guidelines
|
|
99
85
|
|
|
100
86
|
- **Be patient** \
|
|
101
87
|
Sometimes it takes time to get back to you. Someone eventually will. Having a small, concise and super clear change will make maintainers more prone to handle it quickly.
|
|
@@ -105,17 +91,18 @@ Fabric is an open source project 🦄 and as such depends on the **genuine effor
|
|
|
105
91
|
If that doesn't work, once the PR is ready run `npm run prettier:write` and commit the changes.
|
|
106
92
|
Do not reorder imports. Irrelevant changes in a PR that are not created by prettier aren't needed nor welcome.
|
|
107
93
|
- **Tests** \
|
|
108
|
-
PRs must be backed with relevant tests, follow [TESTING](
|
|
94
|
+
PRs must be backed with relevant tests, follow [TESTING](#testing). If you never wrote a test or you find our tests unclear to extend, just ask for help.
|
|
109
95
|
Aim to cover 100% of the changes.
|
|
110
96
|
- **Docs** \
|
|
111
97
|
Update guides if necessary.\
|
|
112
98
|
Add relevant comments to your code using [JSDoc3][jsdoc], [JSDoc reference supported by TS][tsjsdoc].\
|
|
113
99
|
The generated documentation can be found at [fabricjs.com][docs], see [DOCS](#-improving-docs).
|
|
114
100
|
- **Changelog**\
|
|
115
|
-
Add a concise listing to the [**CHANGELOG**](CHANGELOG.md) describing what has changed or let github actions add the PR title for you.
|
|
116
|
-
- **
|
|
101
|
+
Add a concise listing to the [**CHANGELOG**](CHANGELOG.md) describing what has changed or let github actions add the PR title for you. An action will add a changelog line with the title of the PR. Check the changelog file to understand the format.
|
|
102
|
+
- **One bug one PR, one feature one PR** \
|
|
117
103
|
Create a new branch for every pull request.\
|
|
118
|
-
|
|
104
|
+
Don't create a PR from your fork main branch.\
|
|
105
|
+
If you want to do more than one thing, create multiple pull requests.
|
|
119
106
|
If your bug fix or feature requires a refactor, don't refactor. Commit the bugfix or the feature with the current code structure, let it sink, give some time to surface issues with the change, then when the bug or the feature seem solid, a refactor or code improvement can be tried
|
|
120
107
|
- **And there you go!** \
|
|
121
108
|
If you still have questions we're always happy to help.
|
|
@@ -123,11 +110,9 @@ Fabric is an open source project 🦄 and as such depends on the **genuine effor
|
|
|
123
110
|
After you open a PR a maintainer will review it.
|
|
124
111
|
It is more than likely you will be requested to change stuff and refine your work before it is merged into the repo.
|
|
125
112
|
|
|
126
|
-
##
|
|
113
|
+
## Testing
|
|
127
114
|
|
|
128
|
-
|
|
129
|
-
[](../../actions/workflows/tests.yml)
|
|
130
|
-
[](../../actions/workflows/codeql-analysis.yml)
|
|
115
|
+
We use Vitest and Playwright.
|
|
131
116
|
|
|
132
117
|
| Suite | unit (node) | e2e (browser) |
|
|
133
118
|
| ------------------------------------------------------------------------------------------------------------- | :----------------------------------------------- | :----------------------------------------------------------------------------------- |
|
|
@@ -139,74 +124,13 @@ It is more than likely you will be requested to change stuff and refine your wor
|
|
|
139
124
|
| Test Spec | | - `index.ts`: built and loaded into the web app<br> - `index.spec.ts`: test spec<br> |
|
|
140
125
|
| Outputs | Snapshots next to the test file | - Snapshots next to the test file <br>- `e2e/test-report`<br>- `e2e/test-results` |
|
|
141
126
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
We **discourage** writing new tests in the legacy suite and **encourage** migrating failing tests to the new suite.
|
|
145
|
-
However, it is not carved in stone.
|
|
146
|
-
|
|
147
|
-
The test suites use [`QUnit`][qunit] for assertions and [`testem`][testem] for serving the browser tests.
|
|
148
|
-
|
|
149
|
-
- `unit` tests: test logic and state
|
|
150
|
-
- `visual` tests: test visual outcome against image refs located at `test/visual/golden`
|
|
151
|
-
|
|
152
|
-
#### Getting Started
|
|
153
|
-
|
|
154
|
-
- Build and watch for changes
|
|
155
|
-
```bash
|
|
156
|
-
npm run build -- -f -w
|
|
157
|
-
```
|
|
158
|
-
- Run the _legacy_ test suite on `chrome` (many tests are skipped on `node`)
|
|
159
|
-
```bash
|
|
160
|
-
npm test -- -a -c chrome
|
|
161
|
-
```
|
|
162
|
-
- Handle failing tests
|
|
163
|
-
- Fix logic
|
|
164
|
-
- If needed, alter tests with **caution**
|
|
165
|
-
- Rerun failing tests
|
|
166
|
-
- Save time by rerunning failing tests only
|
|
167
|
-
- Select failing test files
|
|
168
|
-
```bash
|
|
169
|
-
npm test -- -c chrome
|
|
170
|
-
```
|
|
171
|
-
- **OR** launch the browser test suite in _dev mode_ to watch for test changes
|
|
172
|
-
```bash
|
|
173
|
-
npm test -- -c chrome --dev -l
|
|
174
|
-
```
|
|
175
|
-
- In case of failing visual tests, there are 2 options to view visual diffs (in order to understand what is wrong)
|
|
176
|
-
- Testing in _visual debug mode_ is comfortable when using with `Github Desktop` to view the diffs since refs will be overwritten (rerunning tests will use the overwritten refs so be cautious)
|
|
177
|
-
```bash
|
|
178
|
-
npm test -- -d -c chrome
|
|
179
|
-
```
|
|
180
|
-
- Launching the browser test suite
|
|
181
|
-
```bash
|
|
182
|
-
npm test -- -c chrome --dev -l
|
|
183
|
-
```
|
|
184
|
-
- Take into account that different environments produce different outputs so it is advised to run both in `chrome` and `node`.
|
|
185
|
-
- Committing refs is done **ONLY** with `chrome` output.
|
|
186
|
-
- When you are done, rerun the entire test suit to verify all tests pass.
|
|
187
|
-
- If you are submitting a PR, visit the PR page on github to see all checks have passed (different platforms and config are covered by the checks).
|
|
188
|
-
- Refer to the command docs
|
|
189
|
-
```bash
|
|
190
|
-
npm test -- -h
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
#### Adding Tests
|
|
194
|
-
|
|
195
|
-
Add tests to relevant files or add new files when necessary under `test/unit` or `test/visual`.
|
|
196
|
-
|
|
197
|
-
- [`unit` test example][unit_test]
|
|
198
|
-
- [`visual` test example][visual_test]
|
|
199
|
-
|
|
200
|
-
If you need to change test config ask for guidance.
|
|
201
|
-
|
|
202
|
-
---
|
|
203
|
-
|
|
204
|
-
## 🚧🎢 Developing 💡✨
|
|
127
|
+
## Developing
|
|
205
128
|
|
|
206
129
|
### Getting Started
|
|
207
130
|
|
|
208
|
-
|
|
209
|
-
1.
|
|
131
|
+
0. You need to be comfortable with git
|
|
132
|
+
1. Fork and clone the repository
|
|
133
|
+
2. Install dependencies `npm i --include=dev`
|
|
210
134
|
|
|
211
135
|
### Starting an App
|
|
212
136
|
|
|
@@ -215,6 +139,8 @@ npm start <template>
|
|
|
215
139
|
npm start -- --help
|
|
216
140
|
```
|
|
217
141
|
|
|
142
|
+
I use `npm start vanilla` for a simple html page with a fabric canvas where i can test some changes.
|
|
143
|
+
|
|
218
144
|
You can deploy an app to codesandbox via the cli or build an app at a path of your choosing:
|
|
219
145
|
|
|
220
146
|
```bash
|
|
@@ -234,7 +160,7 @@ You can actively develop fabric online using [Github Codespaces][github_codespac
|
|
|
234
160
|
`A service is available on port ...` popups will show up.
|
|
235
161
|
- Codesandbox: _available soon_.
|
|
236
162
|
|
|
237
|
-
###
|
|
163
|
+
### Symlinking
|
|
238
164
|
|
|
239
165
|
Establish symlinking to work with a local version on separate projects.
|
|
240
166
|
|
|
@@ -252,7 +178,7 @@ Don't forget to unlink the package once you're done.
|
|
|
252
178
|
[bug_report]: ../../issues/new?template=bug_report.md
|
|
253
179
|
[website_repo]: https://github.com/fabricjs/fabricjs.com
|
|
254
180
|
[website]: http://fabricjs.com/
|
|
255
|
-
[docs]: http://fabricjs.com/
|
|
181
|
+
[docs]: http://fabricjs.com/api
|
|
256
182
|
[demos]: http://fabricjs.com/demos/
|
|
257
183
|
[gotchas]: https://fabricjs.com/docs/old-docs/gotchas/
|
|
258
184
|
[demo_file]: https://github.com/fabricjs/fabricjs.com/blob/gh-pages/posts/demos/_posts/2020-2-15-custom-control-render.md
|
|
@@ -269,8 +195,6 @@ Don't forget to unlink the package once you're done.
|
|
|
269
195
|
[vitest]: https://vitest.dev/
|
|
270
196
|
[qunit]: https://qunitjs.com/
|
|
271
197
|
[testem]: https://github.com/testem/testem
|
|
272
|
-
[unit_test]: https://github.com/fabricjs/fabric.js/blob/93dd2dcca705a4b481fbc9982da4952ef5b4ed1d/test/unit/point.js#L227-L237
|
|
273
|
-
[visual_test]: https://github.com/fabricjs/fabric.js/blob/93dd2dcca705a4b481fbc9982da4952ef5b4ed1d/test/visual/generic_rendering.js#L44-L67
|
|
274
198
|
[github_codespaces]: https://github.com/codespaces/new?hide_repo_select=true&ref=master&repo=712530
|
|
275
199
|
[gitpod]: https://gitpod.io/from-referrer/
|
|
276
200
|
[npm_link]: https://docs.npmjs.com/cli/v8/commands/npm-link
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Contributor Ladder
|
|
2
|
+
|
|
3
|
+
Hello! We are excited that you want to learn more about our project contributor ladder! This contributor ladder outlines the different contributor roles within the project, along with the responsibilities and privileges that come with them. Community members generally start at the first levels of the "ladder" and advance up it as their involvement in the project grows. Our project members are happy to help you advance along the contributor ladder.
|
|
4
|
+
|
|
5
|
+
Each of the roles is organized into lists of three types of things. "Responsibilities" are things that a contributor is expected to do. "Requirements" are qualifications a person needs to meet to be in that role, and "Privileges" are things contributors on that level are entitled to.
|
|
6
|
+
|
|
7
|
+
This document has been started September 2025 and will be subjected to changes depending on people feedback.
|
|
8
|
+
|
|
9
|
+
## Community Participant
|
|
10
|
+
|
|
11
|
+
A Community Participant engages with the project and its community, contributing their time, thoughts, etc. Community participants are usually users who have stopped being anonymous or silent discussion browsers and started being active in project discussions.
|
|
12
|
+
|
|
13
|
+
### Responsibilities
|
|
14
|
+
|
|
15
|
+
Must follow the [Code of conduct](./CODE_OF_CONDUCT.md)
|
|
16
|
+
|
|
17
|
+
### How users can get involved with the community
|
|
18
|
+
|
|
19
|
+
Participating in community discussions
|
|
20
|
+
Submitting bug reports
|
|
21
|
+
Commenting on issues
|
|
22
|
+
Trying out new releases
|
|
23
|
+
Reviewing pull requests
|
|
24
|
+
|
|
25
|
+
## Contributor
|
|
26
|
+
|
|
27
|
+
A Contributor is anyone who simply adds to the project, without any formal membership. Contributions do not have to be code. People at the contributor level may be new contributors, or they may only contribute occasionally.
|
|
28
|
+
|
|
29
|
+
### Requirements
|
|
30
|
+
|
|
31
|
+
Follow the [Code of conduct](./CODE_OF_CONDUCT.md)
|
|
32
|
+
Follow the [project contributing guide](./CONTRIBUTING.md)
|
|
33
|
+
|
|
34
|
+
### Responsibilities and privileges
|
|
35
|
+
|
|
36
|
+
Understand the nature of the change they are proposing or issue they are opening
|
|
37
|
+
Respond to questions and feedback from organization members
|
|
38
|
+
|
|
39
|
+
## Organization Member
|
|
40
|
+
|
|
41
|
+
An Organization Member is an established contributor who regularly participates in the project. Organization Members have privileges in project repositories and discussions around the direction of the project, and as such are expected to act in the interests of the whole project.
|
|
42
|
+
|
|
43
|
+
### Requirements
|
|
44
|
+
|
|
45
|
+
All the contributor requirements
|
|
46
|
+
Contributes regularly
|
|
47
|
+
Upholds community and code of conduct values
|
|
48
|
+
Enabled secure two-factor authentication on their GitHub account
|
|
49
|
+
|
|
50
|
+
### Responsibilities and privileges
|
|
51
|
+
|
|
52
|
+
All the contributor responsibilities and privileges
|
|
53
|
+
Organization members can meet regularly in a chat to discuss the project and priorities.
|
|
54
|
+
|
|
55
|
+
Organization member still contribute from forks.
|
|
56
|
+
|
|
57
|
+
FabricJS is a small project, if you want to be an organization member, ask the maintainer via email or in an issue, mention the work you have done, and self nominate you to become a member.
|
|
58
|
+
|
|
59
|
+
## Triager
|
|
60
|
+
|
|
61
|
+
Triagers assist the maintainer and approvers with issue tracking and backlog. The specific workflows and triage requirements depend on the project, and are set by the project maintainer.
|
|
62
|
+
|
|
63
|
+
Defined by: Triage permissions, with the names of the current Triagers committed to git, either in CONTRIBUTING, CODEOWNERS, or in the README.
|
|
64
|
+
|
|
65
|
+
Triagers may be code contributors, but writing code is not a requirement for becoming a triager. Triagers are encouraged to be active participants in project meetings, chat rooms, and other discussion forums.
|
|
66
|
+
|
|
67
|
+
### Requirements
|
|
68
|
+
|
|
69
|
+
All the requiremens of a Organization Member
|
|
70
|
+
Consistently contribute in meetings or in issues, PRs or discussions.
|
|
71
|
+
|
|
72
|
+
### Responsibilities and privileges
|
|
73
|
+
|
|
74
|
+
All the Organization member responsibilities and privileges
|
|
75
|
+
Have a limited understanding of the project goals as outlined by maintainers
|
|
76
|
+
Respond to issues by asking clarifying questions and suggesting labels.
|
|
77
|
+
Respond to pull requests by reviewing code, testing manually, and providing (non-binding) approval or requesting changes
|
|
78
|
+
|
|
79
|
+
### The process of becoming a Triager
|
|
80
|
+
|
|
81
|
+
Self nominate yourself to be one, ask a maintainer via email or open an issue, explain or reference the work you have done for the project.
|
|
82
|
+
|
|
83
|
+
## Approver
|
|
84
|
+
|
|
85
|
+
Code approvers are able to both review and approve code contributions, as well as help maintainers triage issues and do project management.
|
|
86
|
+
An Approver is a person that with time learned the project and has interest being involved with it, may it be learning or for fun or for work.
|
|
87
|
+
|
|
88
|
+
While code review is focused on code quality and correctness, approval is focused on holistic acceptance of a contribution including: backwards/forwards compatibility, adhering to API and flag conventions, subtle performance and correctness issues, interactions with other parts of the system, etc.
|
|
89
|
+
|
|
90
|
+
Approver status can be scoped to a part of the codebase. For example, critical core components may have higher bar for becoming an approver.
|
|
91
|
+
|
|
92
|
+
### Requirements
|
|
93
|
+
|
|
94
|
+
All the Triager requirements
|
|
95
|
+
Has deep knowledge of the codebase
|
|
96
|
+
Reviewer or author of PRs to the codebase, with the definition of substantial subject to the maintainer's discretion (e.g. refactors/adds new functionality rather than one-line pulls).
|
|
97
|
+
Nominated by a maintainer
|
|
98
|
+
With no objections from other maintainers
|
|
99
|
+
Done through PR to update the Community Configuration.
|
|
100
|
+
|
|
101
|
+
### Responsibilities and privileges
|
|
102
|
+
|
|
103
|
+
Have a robust understanding of the project goals as outlined by maintainers
|
|
104
|
+
Respond to issues by asking clarifying questions and suggesting labels
|
|
105
|
+
Respond to pull requests by reviewing code, testing manually, and providing approval or requesting changes
|
|
106
|
+
Expected to be responsive to review requests (inactivity for more than 1 month may result in falling back to triager until active again)
|
|
107
|
+
Mentor contributors and reviewers
|
|
108
|
+
|
|
109
|
+
### The process of becoming an Approver
|
|
110
|
+
|
|
111
|
+
If you are a Triager, self nominate yourself.
|
|
112
|
+
As of today ( sept 2025 ) clear project goals and guidelines are not written nor correctly nor in stone, so in practice we are not ready to give anyone the Approver role. There will be an effort to put these down in writing sooner than later.
|
|
113
|
+
|
|
114
|
+
## Maintainer
|
|
115
|
+
|
|
116
|
+
For now there is one maintainer. Andrea Bogazzi.
|
|
117
|
+
There is also another maintainer that is a dear friend and likely one between the first people to know if something happens to me and we lost the maintainer, but is not actively contributing to the project.
|
|
118
|
+
In the short term I don't plan to add more maintainers, unless my interest in the project diminishes and it is clear that I'm neglecting it.
|
|
119
|
+
|
|
120
|
+
Open source projects that are an hobby may have wave of contributions depending on the particular moment in the life of the project and the life of people contributing to it, if someone feels like to take a break for a period it should be free to do so without too many problems.
|
|
121
|
+
|
|
122
|
+
### Responsibilities
|
|
123
|
+
|
|
124
|
+
TBD
|
package/LICENSE
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
1
3
|
Copyright (c) 2008-2015 Printio (Juriy Zaytsev, Maxim Chernyak)
|
|
4
|
+
Copyright (c) 2016-present Andrea Bogazzi, Shachar Nen and Fabric.js contributors (https://github.com/fabricjs/fabric.js/graphs/contributors)
|
|
2
5
|
|
|
3
6
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
7
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -7,9 +10,12 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
7
10
|
copies of the Software, and to permit persons to whom the Software is
|
|
8
11
|
furnished to do so, subject to the following conditions:
|
|
9
12
|
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
10
16
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
17
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
-
FITNESS FOR A PARTICULAR PURPOSE AND
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
19
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
20
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
21
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Fabric.js
|
|
2
2
|
|
|
3
|
-
<a href="http://fabricjs.com/kitchensink" target="_blank"><img align="right" src="/lib/screenshot.png"
|
|
3
|
+
<a href="http://fabricjs.com/kitchensink" target="_blank"><img align="right" src="/lib/screenshot.png" width="400"></a>
|
|
4
4
|
|
|
5
5
|
A **simple and powerful Javascript HTML5 canvas library**.
|
|
6
6
|
|
|
@@ -9,34 +9,19 @@ A **simple and powerful Javascript HTML5 canvas library**.
|
|
|
9
9
|
- [**GOTCHAS**][gotchas]
|
|
10
10
|
- [**Contributing, Developing and More**](CONTRIBUTING.md)
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<!-- build/coverage status, climate -->
|
|
15
|
-
|
|
16
|
-
[](../../actions/workflows/build.yml)
|
|
17
|
-
[](../../actions/workflows/tests.yml)
|
|
18
|
-
[](../../actions/workflows/codeql-analysis.yml)
|
|
19
|
-
|
|
20
|
-
---
|
|
12
|
+
## Special Thanks
|
|
21
13
|
|
|
22
|
-
|
|
14
|
+
Here is a section for recognition of companies or individuals that support fabricJS with a sponsorship
|
|
23
15
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
<a href="https://go.warp.dev/fabric">
|
|
17
|
+
<img alt="Warp sponsorship" width="300" src="https://github.com/warpdotdev/brand-assets/blob/main/Github/Sponsor/Warp-Github-LG-01.png">
|
|
18
|
+
</a>
|
|
27
19
|
|
|
28
|
-
[
|
|
29
|
-
[](https://www.npmjs.org/package/fabric)
|
|
30
|
-
[](http://badge.fury.io/bo/fabric)
|
|
20
|
+
### [Warp, built for coding with multiple AI agents](https://go.warp.dev/fabric)
|
|
31
21
|
|
|
32
|
-
|
|
22
|
+
[Available for MacOS, Linux, & Windows](https://go.warp.dev/fabric)<br>
|
|
33
23
|
|
|
34
|
-
|
|
35
|
-
[](https://github.com/sponsors/melchiar)
|
|
36
|
-
[](https://github.com/sponsors/ShaMan123)
|
|
37
|
-
[](https://www.patreon.com/fabricJS)
|
|
38
|
-
|
|
39
|
-
---
|
|
24
|
+
</div>
|
|
40
25
|
|
|
41
26
|
## Features
|
|
42
27
|
|
package/SECURITY.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Security Policy
|
|
2
2
|
|
|
3
|
-
## Reporting
|
|
3
|
+
## Reporting Security Issues
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
If you believe you have found a security vulnerability, we encourage you to let us know right away.
|
|
6
|
+
|
|
7
|
+
We will investigate all legitimate reports and do our best to quickly fix the problem.
|
|
8
|
+
|
|
9
|
+
Please report any vulnerabilities in our open source repositories to andreabogazzi79@gmail.com.
|
|
@@ -1,5 +1,50 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { AligningLineConfig } from './typedefs';
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { type BasicTransformEvent, type Canvas, type FabricObject, type TPointerEvent, type Point } from 'fabric';
|
|
2
|
+
import type { AligningLineConfig, OriginMap } from './typedefs';
|
|
3
|
+
type TransformEvent = BasicTransformEvent<TPointerEvent> & {
|
|
4
|
+
target: FabricObject;
|
|
5
|
+
};
|
|
6
|
+
export declare class AligningGuidelines {
|
|
7
|
+
canvas: Canvas;
|
|
8
|
+
horizontalLines: Set<string>;
|
|
9
|
+
verticalLines: Set<string>;
|
|
10
|
+
cacheMap: Map<string, Point[]>;
|
|
11
|
+
/**
|
|
12
|
+
* When we drag to resize using center points like mt, ml, mb, and mr,
|
|
13
|
+
* we do not need to draw line segments; we only need to draw the target points.
|
|
14
|
+
*/
|
|
15
|
+
onlyDrawPoint: boolean;
|
|
16
|
+
/** Alignment method is required when customizing. */
|
|
17
|
+
contraryOriginMap: OriginMap;
|
|
18
|
+
xSize: number;
|
|
19
|
+
lineDash: number[] | undefined;
|
|
20
|
+
/** At what distance from the shape does alignment begin? */
|
|
21
|
+
margin: number;
|
|
22
|
+
/** Aligning line dimensions */
|
|
23
|
+
width: number;
|
|
24
|
+
/** Aligning line color */
|
|
25
|
+
color: string;
|
|
26
|
+
/** Close Vertical line, default false. */
|
|
27
|
+
closeVLine: boolean;
|
|
28
|
+
/** Close horizontal line, default false. */
|
|
29
|
+
closeHLine: boolean;
|
|
30
|
+
constructor(canvas: Canvas, options?: Partial<AligningLineConfig>);
|
|
31
|
+
initBehavior(): void;
|
|
32
|
+
/** Returns shapes that can draw aligning lines, default returns all shapes on the canvas excluding groups. */
|
|
33
|
+
getObjectsByTarget(target: FabricObject): Set<FabricObject<Partial<import("fabric").FabricObjectProps>, import("fabric").SerializedObjectProps, import("fabric").ObjectEvents>>;
|
|
34
|
+
/** When the user customizes the controller, this property is set to enable or disable automatic alignment through point scaling/resizing. */
|
|
35
|
+
getPointMap(target: FabricObject): import("./typedefs").PointMap;
|
|
36
|
+
/** When the user customizes the controller, this property is used to enable or disable alignment positioning through points. */
|
|
37
|
+
getContraryMap(target: FabricObject): import("./typedefs").PointMap;
|
|
38
|
+
/** Users can customize. */
|
|
39
|
+
getCaCheMapValue(object: FabricObject): Point[];
|
|
40
|
+
drawLine(origin: Point, target: Point): void;
|
|
41
|
+
drawX(point: Point, dir: number): void;
|
|
42
|
+
mouseUp(): void;
|
|
43
|
+
scalingOrResizing(e: TransformEvent): void;
|
|
44
|
+
moving(e: TransformEvent): void;
|
|
45
|
+
beforeRender(): void;
|
|
46
|
+
afterRender(): void;
|
|
47
|
+
dispose(): void;
|
|
48
|
+
}
|
|
49
|
+
export {};
|
|
5
50
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../extensions/aligning_guidelines/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../extensions/aligning_guidelines/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,KAAK,EAEX,MAAM,QAAQ,CAAC;AAahB,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIhE,KAAK,cAAc,GAAG,mBAAmB,CAAC,aAAa,CAAC,GAAG;IACzD,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AAEF,qBAAa,kBAAkB;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,cAAqB;IACpC,aAAa,cAAqB;IAClC,QAAQ,uBAA8B;IACtC;;;OAGG;IACH,aAAa,UAAS;IACtB,qDAAqD;IACrD,iBAAiB,EAAE,SAAS,CAS1B;IACF,KAAK,SAAO;IACZ,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC/B,4DAA4D;IAC5D,MAAM,SAAK;IACX,+BAA+B;IAC/B,KAAK,SAAK;IACV,0BAA0B;IAC1B,KAAK,SAAuB;IAC5B,0CAA0C;IAC1C,UAAU,UAAS;IACnB,4CAA4C;IAC5C,UAAU,UAAS;gBAEP,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,OAAO,CAAC,kBAAkB,CAAM;IAYrE,YAAY;IAQZ,8GAA8G;IAC9G,kBAAkB,CAAC,MAAM,EAAE,YAAY;IAGvC,6IAA6I;IAC7I,WAAW,CAAC,MAAM,EAAE,YAAY;IAGhC,gIAAgI;IAChI,cAAc,CAAC,MAAM,EAAE,YAAY;IAGnC,2BAA2B;IAC3B,gBAAgB,CAAC,MAAM,EAAE,YAAY;IAarC,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK;IAGrC,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM;IAG/B,OAAO;IAOP,iBAAiB,CAAC,CAAC,EAAE,cAAc;IAiGnC,MAAM,CAAC,CAAC,EAAE,cAAc;IAyBxB,YAAY;IAGZ,WAAW;IASX,OAAO;CAQR"}
|