@nasser-sw/fabric 7.0.1-beta11 → 7.0.1-beta12
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/.babelrc +0 -0
- package/.babelrcAlt +0 -0
- package/.browserslistrc +0 -0
- package/.editorconfig +0 -0
- package/.gitattributes +0 -0
- package/.gitpod.yml +0 -0
- package/.prettierignore +0 -0
- package/.prettierrc +0 -0
- package/0 +0 -0
- package/CHANGELOG.md +0 -0
- package/CODE_OF_CONDUCT.md +0 -0
- package/CONTRIBUTING.md +0 -0
- package/LICENSE +0 -0
- package/OVERLAY_EDITOR_MIGRATION.md +0 -0
- package/README.md +0 -0
- package/SECURITY.md +0 -0
- package/debug/{konva → konva-master}/CHANGELOG.md +2 -1
- package/debug/{konva → konva-master}/LICENSE +0 -0
- package/debug/{konva → konva-master}/README.md +7 -3
- package/debug/{konva → konva-master}/gulpfile.mjs +0 -0
- package/debug/{konva → konva-master}/package.json +1 -1
- package/debug/{konva → konva-master}/release.sh +1 -4
- package/debug/{konva → konva-master}/resources/doc-includes/ContainerParams.txt +0 -0
- package/debug/{konva → konva-master}/resources/doc-includes/NodeParams.txt +0 -0
- package/debug/{konva → konva-master}/resources/doc-includes/ShapeParams.txt +0 -0
- package/debug/{konva → konva-master}/resources/jsdoc.conf.json +0 -0
- package/debug/{konva → konva-master}/rollup.config.mjs +0 -0
- package/debug/{konva → konva-master}/src/Animation.ts +0 -0
- package/debug/{konva → konva-master}/src/BezierFunctions.ts +0 -0
- package/debug/{konva → konva-master}/src/Canvas.ts +37 -0
- package/debug/{konva → konva-master}/src/Container.ts +0 -0
- package/debug/{konva → konva-master}/src/Context.ts +0 -0
- package/debug/{konva → konva-master}/src/Core.ts +0 -0
- package/debug/{konva → konva-master}/src/DragAndDrop.ts +0 -0
- package/debug/{konva → konva-master}/src/Factory.ts +0 -0
- package/debug/{konva → konva-master}/src/FastLayer.ts +0 -0
- package/debug/{konva → konva-master}/src/Global.ts +0 -0
- package/debug/{konva → konva-master}/src/Group.ts +0 -0
- package/debug/{konva → konva-master}/src/Layer.ts +0 -0
- package/debug/{konva → konva-master}/src/Node.ts +0 -0
- package/debug/{konva → konva-master}/src/PointerEvents.ts +0 -0
- package/debug/{konva → konva-master}/src/Shape.ts +0 -0
- package/debug/{konva → konva-master}/src/Stage.ts +0 -0
- package/debug/{konva → konva-master}/src/Tween.ts +0 -0
- package/debug/{konva → konva-master}/src/Util.ts +0 -0
- package/debug/{konva → konva-master}/src/Validators.ts +0 -0
- package/debug/{konva → konva-master}/src/_CoreInternals.ts +0 -0
- package/debug/{konva → konva-master}/src/_FullInternals.ts +0 -0
- package/debug/{konva → konva-master}/src/canvas-backend.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/Blur.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/Brighten.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/Brightness.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/Contrast.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/Emboss.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/Enhance.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/Grayscale.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/HSL.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/HSV.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/Invert.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/Kaleidoscope.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/Mask.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/Noise.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/Pixelate.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/Posterize.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/RGB.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/RGBA.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/Sepia.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/Solarize.ts +0 -0
- package/debug/{konva → konva-master}/src/filters/Threshold.ts +0 -0
- package/debug/{konva → konva-master}/src/index.ts +0 -0
- package/debug/{konva → konva-master}/src/shapes/Arc.ts +0 -0
- package/debug/{konva → konva-master}/src/shapes/Arrow.ts +0 -0
- package/debug/{konva → konva-master}/src/shapes/Circle.ts +0 -0
- package/debug/{konva → konva-master}/src/shapes/Ellipse.ts +0 -0
- package/debug/{konva → konva-master}/src/shapes/Image.ts +0 -0
- package/debug/{konva → konva-master}/src/shapes/Label.ts +0 -0
- package/debug/{konva → konva-master}/src/shapes/Line.ts +0 -0
- package/debug/{konva → konva-master}/src/shapes/Path.ts +0 -0
- package/debug/{konva → konva-master}/src/shapes/Rect.ts +0 -0
- package/debug/{konva → konva-master}/src/shapes/RegularPolygon.ts +0 -0
- package/debug/{konva → konva-master}/src/shapes/Ring.ts +0 -0
- package/debug/{konva → konva-master}/src/shapes/Sprite.ts +0 -0
- package/debug/{konva → konva-master}/src/shapes/Star.ts +0 -0
- package/debug/{konva → konva-master}/src/shapes/Text.ts +2 -2
- package/debug/{konva → konva-master}/src/shapes/TextPath.ts +0 -0
- package/debug/{konva → konva-master}/src/shapes/Transformer.ts +0 -0
- package/debug/{konva → konva-master}/src/shapes/Wedge.ts +0 -0
- package/debug/{konva → konva-master}/src/skia-backend.ts +0 -0
- package/debug/{konva → konva-master}/src/types.ts +0 -0
- package/debug/{konva → konva-master}/tsconfig.json +0 -0
- package/debug/{konva → konva-master}/tsconfig.test.json +0 -0
- package/dist/_virtual/_rollupPluginBabelHelpers.min.mjs +0 -0
- package/dist/_virtual/_rollupPluginBabelHelpers.min.mjs.map +0 -0
- package/dist/_virtual/_rollupPluginBabelHelpers.mjs +0 -0
- package/dist/_virtual/_rollupPluginBabelHelpers.mjs.map +0 -0
- package/dist/extensions/aligning_guidelines/constant.d.ts +0 -0
- package/dist/extensions/aligning_guidelines/constant.d.ts.map +0 -0
- package/dist/extensions/aligning_guidelines/index.d.ts +0 -0
- package/dist/extensions/aligning_guidelines/index.d.ts.map +0 -0
- package/dist/extensions/aligning_guidelines/typedefs.d.ts +0 -0
- package/dist/extensions/aligning_guidelines/typedefs.d.ts.map +0 -0
- package/dist/extensions/aligning_guidelines/util/basic.d.ts +0 -0
- package/dist/extensions/aligning_guidelines/util/basic.d.ts.map +0 -0
- package/dist/extensions/aligning_guidelines/util/collect-line.d.ts +0 -0
- package/dist/extensions/aligning_guidelines/util/collect-line.d.ts.map +0 -0
- package/dist/extensions/aligning_guidelines/util/collect-point.d.ts +0 -0
- package/dist/extensions/aligning_guidelines/util/collect-point.d.ts.map +0 -0
- package/dist/extensions/aligning_guidelines/util/draw.d.ts +0 -0
- package/dist/extensions/aligning_guidelines/util/draw.d.ts.map +0 -0
- package/dist/extensions/aligning_guidelines/util/get-objects-by-target.d.ts +0 -0
- package/dist/extensions/aligning_guidelines/util/get-objects-by-target.d.ts.map +0 -0
- package/dist/extensions/data_updaters/gradient/index.d.ts +0 -0
- package/dist/extensions/data_updaters/gradient/index.d.ts.map +0 -0
- package/dist/extensions/data_updaters/origins/index.d.ts +0 -0
- package/dist/extensions/data_updaters/origins/index.d.ts.map +0 -0
- package/dist/extensions/index.d.ts +0 -0
- package/dist/extensions/index.d.ts.map +0 -0
- package/dist/fabric.d.ts +0 -0
- package/dist/fabric.d.ts.map +0 -0
- package/dist/fabric.min.mjs +0 -0
- package/dist/fabric.min.mjs.map +0 -0
- package/dist/fabric.mjs +0 -0
- package/dist/fabric.mjs.map +0 -0
- package/dist/index.d.ts +0 -0
- package/dist/index.d.ts.map +0 -0
- package/dist/index.js +1133 -1129
- 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 +1133 -1129
- package/dist/index.mjs.map +1 -1
- package/dist/index.node.cjs +1133 -1129
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.d.ts +0 -0
- package/dist/index.node.d.ts.map +0 -0
- package/dist/index.node.mjs +1133 -1129
- package/dist/index.node.mjs.map +1 -1
- package/dist/package.json.min.mjs +1 -1
- package/dist/package.json.min.mjs.map +0 -0
- package/dist/package.json.mjs +1 -1
- package/dist/package.json.mjs.map +0 -0
- package/dist/src/ClassRegistry.d.ts +0 -0
- package/dist/src/ClassRegistry.d.ts.map +0 -0
- package/dist/src/ClassRegistry.min.mjs +0 -0
- package/dist/src/ClassRegistry.min.mjs.map +0 -0
- package/dist/src/ClassRegistry.mjs +0 -0
- package/dist/src/ClassRegistry.mjs.map +0 -0
- package/dist/src/Collection.d.ts +0 -0
- package/dist/src/Collection.d.ts.map +0 -0
- package/dist/src/Collection.min.mjs +0 -0
- package/dist/src/Collection.min.mjs.map +0 -0
- package/dist/src/Collection.mjs +0 -0
- package/dist/src/Collection.mjs.map +0 -0
- package/dist/src/CommonMethods.d.ts +0 -0
- package/dist/src/CommonMethods.d.ts.map +0 -0
- package/dist/src/CommonMethods.min.mjs +0 -0
- package/dist/src/CommonMethods.min.mjs.map +0 -0
- package/dist/src/CommonMethods.mjs +0 -0
- package/dist/src/CommonMethods.mjs.map +0 -0
- package/dist/src/EventTypeDefs.d.ts +0 -0
- package/dist/src/EventTypeDefs.d.ts.map +0 -0
- package/dist/src/Intersection.d.ts +0 -0
- package/dist/src/Intersection.d.ts.map +0 -0
- package/dist/src/Intersection.min.mjs +0 -0
- package/dist/src/Intersection.min.mjs.map +0 -0
- package/dist/src/Intersection.mjs +0 -0
- package/dist/src/Intersection.mjs.map +0 -0
- package/dist/src/LayoutManager/ActiveSelectionLayoutManager.d.ts +0 -0
- package/dist/src/LayoutManager/ActiveSelectionLayoutManager.d.ts.map +0 -0
- package/dist/src/LayoutManager/ActiveSelectionLayoutManager.min.mjs +0 -0
- package/dist/src/LayoutManager/ActiveSelectionLayoutManager.min.mjs.map +0 -0
- package/dist/src/LayoutManager/ActiveSelectionLayoutManager.mjs +0 -0
- package/dist/src/LayoutManager/ActiveSelectionLayoutManager.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutManager.d.ts +0 -0
- package/dist/src/LayoutManager/LayoutManager.d.ts.map +0 -0
- package/dist/src/LayoutManager/LayoutManager.min.mjs +0 -0
- package/dist/src/LayoutManager/LayoutManager.min.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutManager.mjs +0 -0
- package/dist/src/LayoutManager/LayoutManager.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.d.ts +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.d.ts.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.min.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.min.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.d.ts +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.d.ts.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.min.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.min.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.d.ts +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.d.ts.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.min.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.min.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.d.ts +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.d.ts.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.min.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.min.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/utils.d.ts +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/utils.d.ts.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/utils.min.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/utils.min.mjs.map +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/utils.mjs +0 -0
- package/dist/src/LayoutManager/LayoutStrategies/utils.mjs.map +0 -0
- package/dist/src/LayoutManager/constants.d.ts +0 -0
- package/dist/src/LayoutManager/constants.d.ts.map +0 -0
- package/dist/src/LayoutManager/constants.min.mjs +0 -0
- package/dist/src/LayoutManager/constants.min.mjs.map +0 -0
- package/dist/src/LayoutManager/constants.mjs +0 -0
- package/dist/src/LayoutManager/constants.mjs.map +0 -0
- package/dist/src/LayoutManager/index.d.ts +0 -0
- package/dist/src/LayoutManager/index.d.ts.map +0 -0
- package/dist/src/LayoutManager/types.d.ts +0 -0
- package/dist/src/LayoutManager/types.d.ts.map +0 -0
- package/dist/src/Observable.d.ts +0 -0
- package/dist/src/Observable.d.ts.map +0 -0
- package/dist/src/Observable.min.mjs +0 -0
- package/dist/src/Observable.min.mjs.map +0 -0
- package/dist/src/Observable.mjs +0 -0
- package/dist/src/Observable.mjs.map +0 -0
- package/dist/src/Pattern/Pattern.d.ts +0 -0
- package/dist/src/Pattern/Pattern.d.ts.map +0 -0
- package/dist/src/Pattern/Pattern.min.mjs +0 -0
- package/dist/src/Pattern/Pattern.min.mjs.map +0 -0
- package/dist/src/Pattern/Pattern.mjs +0 -0
- package/dist/src/Pattern/Pattern.mjs.map +0 -0
- package/dist/src/Pattern/index.d.ts +0 -0
- package/dist/src/Pattern/index.d.ts.map +0 -0
- package/dist/src/Pattern/types.d.ts +0 -0
- package/dist/src/Pattern/types.d.ts.map +0 -0
- package/dist/src/Point.d.ts +0 -0
- package/dist/src/Point.d.ts.map +0 -0
- package/dist/src/Point.min.mjs +0 -0
- package/dist/src/Point.min.mjs.map +0 -0
- package/dist/src/Point.mjs +0 -0
- package/dist/src/Point.mjs.map +0 -0
- package/dist/src/Shadow.d.ts +0 -0
- package/dist/src/Shadow.d.ts.map +0 -0
- package/dist/src/Shadow.min.mjs +0 -0
- package/dist/src/Shadow.min.mjs.map +0 -0
- package/dist/src/Shadow.mjs +0 -0
- package/dist/src/Shadow.mjs.map +0 -0
- package/dist/src/brushes/BaseBrush.d.ts +0 -0
- package/dist/src/brushes/BaseBrush.d.ts.map +0 -0
- package/dist/src/brushes/BaseBrush.min.mjs +0 -0
- package/dist/src/brushes/BaseBrush.min.mjs.map +0 -0
- package/dist/src/brushes/BaseBrush.mjs +0 -0
- package/dist/src/brushes/BaseBrush.mjs.map +0 -0
- package/dist/src/brushes/CircleBrush.d.ts +0 -0
- package/dist/src/brushes/CircleBrush.d.ts.map +0 -0
- package/dist/src/brushes/CircleBrush.min.mjs +0 -0
- package/dist/src/brushes/CircleBrush.min.mjs.map +0 -0
- package/dist/src/brushes/CircleBrush.mjs +0 -0
- package/dist/src/brushes/CircleBrush.mjs.map +0 -0
- package/dist/src/brushes/PatternBrush.d.ts +0 -0
- package/dist/src/brushes/PatternBrush.d.ts.map +0 -0
- package/dist/src/brushes/PatternBrush.min.mjs +0 -0
- package/dist/src/brushes/PatternBrush.min.mjs.map +0 -0
- package/dist/src/brushes/PatternBrush.mjs +0 -0
- package/dist/src/brushes/PatternBrush.mjs.map +0 -0
- package/dist/src/brushes/PencilBrush.d.ts +0 -0
- package/dist/src/brushes/PencilBrush.d.ts.map +0 -0
- package/dist/src/brushes/PencilBrush.min.mjs +0 -0
- package/dist/src/brushes/PencilBrush.min.mjs.map +0 -0
- package/dist/src/brushes/PencilBrush.mjs +0 -0
- package/dist/src/brushes/PencilBrush.mjs.map +0 -0
- package/dist/src/brushes/SprayBrush.d.ts +0 -0
- package/dist/src/brushes/SprayBrush.d.ts.map +0 -0
- package/dist/src/brushes/SprayBrush.min.mjs +0 -0
- package/dist/src/brushes/SprayBrush.min.mjs.map +0 -0
- package/dist/src/brushes/SprayBrush.mjs +0 -0
- package/dist/src/brushes/SprayBrush.mjs.map +0 -0
- package/dist/src/brushes/typedefs.d.ts +0 -0
- package/dist/src/brushes/typedefs.d.ts.map +0 -0
- package/dist/src/cache.d.ts +0 -0
- package/dist/src/cache.d.ts.map +0 -0
- package/dist/src/cache.min.mjs +0 -0
- package/dist/src/cache.min.mjs.map +0 -0
- package/dist/src/cache.mjs +0 -0
- package/dist/src/cache.mjs.map +0 -0
- package/dist/src/canvas/Canvas.d.ts +0 -0
- package/dist/src/canvas/Canvas.d.ts.map +0 -0
- package/dist/src/canvas/Canvas.min.mjs +0 -0
- package/dist/src/canvas/Canvas.min.mjs.map +0 -0
- package/dist/src/canvas/Canvas.mjs +0 -0
- package/dist/src/canvas/Canvas.mjs.map +0 -0
- package/dist/src/canvas/CanvasOptions.d.ts +0 -0
- package/dist/src/canvas/CanvasOptions.d.ts.map +0 -0
- package/dist/src/canvas/CanvasOptions.min.mjs +0 -0
- package/dist/src/canvas/CanvasOptions.min.mjs.map +0 -0
- package/dist/src/canvas/CanvasOptions.mjs +0 -0
- package/dist/src/canvas/CanvasOptions.mjs.map +0 -0
- package/dist/src/canvas/DOMManagers/CanvasDOMManager.d.ts +0 -0
- package/dist/src/canvas/DOMManagers/CanvasDOMManager.d.ts.map +0 -0
- package/dist/src/canvas/DOMManagers/CanvasDOMManager.min.mjs +0 -0
- package/dist/src/canvas/DOMManagers/CanvasDOMManager.min.mjs.map +0 -0
- package/dist/src/canvas/DOMManagers/CanvasDOMManager.mjs +0 -0
- package/dist/src/canvas/DOMManagers/CanvasDOMManager.mjs.map +0 -0
- package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.d.ts +0 -0
- package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.d.ts.map +0 -0
- package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.min.mjs +0 -0
- package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.min.mjs.map +0 -0
- package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.mjs +0 -0
- package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.mjs.map +0 -0
- package/dist/src/canvas/DOMManagers/util.d.ts +0 -0
- package/dist/src/canvas/DOMManagers/util.d.ts.map +0 -0
- package/dist/src/canvas/DOMManagers/util.min.mjs +0 -0
- package/dist/src/canvas/DOMManagers/util.min.mjs.map +0 -0
- package/dist/src/canvas/DOMManagers/util.mjs +0 -0
- package/dist/src/canvas/DOMManagers/util.mjs.map +0 -0
- package/dist/src/canvas/SelectableCanvas.d.ts +0 -0
- package/dist/src/canvas/SelectableCanvas.d.ts.map +0 -0
- package/dist/src/canvas/SelectableCanvas.min.mjs +0 -0
- package/dist/src/canvas/SelectableCanvas.min.mjs.map +0 -0
- package/dist/src/canvas/SelectableCanvas.mjs +0 -0
- package/dist/src/canvas/SelectableCanvas.mjs.map +0 -0
- package/dist/src/canvas/StaticCanvas.d.ts +0 -0
- package/dist/src/canvas/StaticCanvas.d.ts.map +0 -0
- package/dist/src/canvas/StaticCanvas.min.mjs +0 -0
- package/dist/src/canvas/StaticCanvas.min.mjs.map +0 -0
- package/dist/src/canvas/StaticCanvas.mjs +0 -0
- package/dist/src/canvas/StaticCanvas.mjs.map +0 -0
- package/dist/src/canvas/StaticCanvasOptions.d.ts +0 -0
- package/dist/src/canvas/StaticCanvasOptions.d.ts.map +0 -0
- package/dist/src/canvas/StaticCanvasOptions.min.mjs +0 -0
- package/dist/src/canvas/StaticCanvasOptions.min.mjs.map +0 -0
- package/dist/src/canvas/StaticCanvasOptions.mjs +0 -0
- package/dist/src/canvas/StaticCanvasOptions.mjs.map +0 -0
- package/dist/src/canvas/TextEditingManager.d.ts +0 -0
- package/dist/src/canvas/TextEditingManager.d.ts.map +0 -0
- package/dist/src/canvas/TextEditingManager.min.mjs +0 -0
- package/dist/src/canvas/TextEditingManager.min.mjs.map +0 -0
- package/dist/src/canvas/TextEditingManager.mjs +0 -0
- package/dist/src/canvas/TextEditingManager.mjs.map +0 -0
- package/dist/src/canvas/canvas_gestures.mixin.d.ts +0 -0
- package/dist/src/canvas/canvas_gestures.mixin.d.ts.map +0 -0
- package/dist/src/color/Color.d.ts +0 -0
- package/dist/src/color/Color.d.ts.map +0 -0
- package/dist/src/color/Color.min.mjs +0 -0
- package/dist/src/color/Color.min.mjs.map +0 -0
- package/dist/src/color/Color.mjs +0 -0
- package/dist/src/color/Color.mjs.map +0 -0
- package/dist/src/color/color_map.d.ts +0 -0
- package/dist/src/color/color_map.d.ts.map +0 -0
- package/dist/src/color/color_map.min.mjs +0 -0
- package/dist/src/color/color_map.min.mjs.map +0 -0
- package/dist/src/color/color_map.mjs +0 -0
- package/dist/src/color/color_map.mjs.map +0 -0
- package/dist/src/color/constants.d.ts +0 -0
- package/dist/src/color/constants.d.ts.map +0 -0
- package/dist/src/color/constants.min.mjs +0 -0
- package/dist/src/color/constants.min.mjs.map +0 -0
- package/dist/src/color/constants.mjs +0 -0
- package/dist/src/color/constants.mjs.map +0 -0
- package/dist/src/color/typedefs.d.ts +0 -0
- package/dist/src/color/typedefs.d.ts.map +0 -0
- package/dist/src/color/util.d.ts +0 -0
- package/dist/src/color/util.d.ts.map +0 -0
- package/dist/src/color/util.min.mjs +0 -0
- package/dist/src/color/util.min.mjs.map +0 -0
- package/dist/src/color/util.mjs +0 -0
- package/dist/src/color/util.mjs.map +0 -0
- package/dist/src/config.d.ts +0 -0
- package/dist/src/config.d.ts.map +0 -0
- package/dist/src/config.min.mjs +0 -0
- package/dist/src/config.min.mjs.map +0 -0
- package/dist/src/config.mjs +0 -0
- package/dist/src/config.mjs.map +0 -0
- package/dist/src/constants.d.ts +0 -0
- package/dist/src/constants.d.ts.map +0 -0
- package/dist/src/constants.min.mjs +0 -0
- package/dist/src/constants.min.mjs.map +0 -0
- package/dist/src/constants.mjs +0 -0
- package/dist/src/constants.mjs.map +0 -0
- package/dist/src/controls/Control.d.ts +0 -0
- package/dist/src/controls/Control.d.ts.map +0 -0
- package/dist/src/controls/Control.min.mjs +0 -0
- package/dist/src/controls/Control.min.mjs.map +0 -0
- package/dist/src/controls/Control.mjs +0 -0
- package/dist/src/controls/Control.mjs.map +0 -0
- package/dist/src/controls/changeHeight.d.ts +0 -0
- package/dist/src/controls/changeHeight.d.ts.map +0 -0
- package/dist/src/controls/changeWidth.d.ts +0 -0
- package/dist/src/controls/changeWidth.d.ts.map +0 -0
- package/dist/src/controls/changeWidth.min.mjs +0 -0
- package/dist/src/controls/changeWidth.min.mjs.map +0 -0
- package/dist/src/controls/changeWidth.mjs +0 -0
- package/dist/src/controls/changeWidth.mjs.map +0 -0
- package/dist/src/controls/commonControls.d.ts +0 -0
- package/dist/src/controls/commonControls.d.ts.map +0 -0
- package/dist/src/controls/commonControls.min.mjs +0 -0
- package/dist/src/controls/commonControls.min.mjs.map +0 -0
- package/dist/src/controls/commonControls.mjs +0 -0
- package/dist/src/controls/commonControls.mjs.map +0 -0
- package/dist/src/controls/controlRendering.d.ts +0 -0
- package/dist/src/controls/controlRendering.d.ts.map +0 -0
- package/dist/src/controls/controlRendering.min.mjs +0 -0
- package/dist/src/controls/controlRendering.min.mjs.map +0 -0
- package/dist/src/controls/controlRendering.mjs +0 -0
- package/dist/src/controls/controlRendering.mjs.map +0 -0
- package/dist/src/controls/drag.d.ts +0 -0
- package/dist/src/controls/drag.d.ts.map +0 -0
- package/dist/src/controls/drag.min.mjs +0 -0
- package/dist/src/controls/drag.min.mjs.map +0 -0
- package/dist/src/controls/drag.mjs +0 -0
- package/dist/src/controls/drag.mjs.map +0 -0
- package/dist/src/controls/fireEvent.d.ts +0 -0
- package/dist/src/controls/fireEvent.d.ts.map +0 -0
- package/dist/src/controls/fireEvent.min.mjs +0 -0
- package/dist/src/controls/fireEvent.min.mjs.map +0 -0
- package/dist/src/controls/fireEvent.mjs +0 -0
- package/dist/src/controls/fireEvent.mjs.map +0 -0
- package/dist/src/controls/index.d.ts +0 -0
- package/dist/src/controls/index.d.ts.map +0 -0
- package/dist/src/controls/index.min.mjs +0 -0
- package/dist/src/controls/index.min.mjs.map +0 -0
- package/dist/src/controls/index.mjs +0 -0
- package/dist/src/controls/index.mjs.map +0 -0
- package/dist/src/controls/pathControl.d.ts +0 -0
- package/dist/src/controls/pathControl.d.ts.map +0 -0
- package/dist/src/controls/pathControl.min.mjs +0 -0
- package/dist/src/controls/pathControl.min.mjs.map +0 -0
- package/dist/src/controls/pathControl.mjs +0 -0
- package/dist/src/controls/pathControl.mjs.map +0 -0
- package/dist/src/controls/polyControl.d.ts +0 -0
- package/dist/src/controls/polyControl.d.ts.map +0 -0
- package/dist/src/controls/polyControl.min.mjs +0 -0
- package/dist/src/controls/polyControl.min.mjs.map +0 -0
- package/dist/src/controls/polyControl.mjs +0 -0
- package/dist/src/controls/polyControl.mjs.map +0 -0
- package/dist/src/controls/rotate.d.ts +0 -0
- package/dist/src/controls/rotate.d.ts.map +0 -0
- package/dist/src/controls/rotate.min.mjs +0 -0
- package/dist/src/controls/rotate.min.mjs.map +0 -0
- package/dist/src/controls/rotate.mjs +0 -0
- package/dist/src/controls/rotate.mjs.map +0 -0
- package/dist/src/controls/scale.d.ts +0 -0
- package/dist/src/controls/scale.d.ts.map +0 -0
- package/dist/src/controls/scale.min.mjs +0 -0
- package/dist/src/controls/scale.min.mjs.map +0 -0
- package/dist/src/controls/scale.mjs +0 -0
- package/dist/src/controls/scale.mjs.map +0 -0
- package/dist/src/controls/scaleSkew.d.ts +0 -0
- package/dist/src/controls/scaleSkew.d.ts.map +0 -0
- package/dist/src/controls/scaleSkew.min.mjs +0 -0
- package/dist/src/controls/scaleSkew.min.mjs.map +0 -0
- package/dist/src/controls/scaleSkew.mjs +0 -0
- package/dist/src/controls/scaleSkew.mjs.map +0 -0
- package/dist/src/controls/skew.d.ts +0 -0
- package/dist/src/controls/skew.d.ts.map +0 -0
- package/dist/src/controls/skew.min.mjs +0 -0
- package/dist/src/controls/skew.min.mjs.map +0 -0
- package/dist/src/controls/skew.mjs +0 -0
- package/dist/src/controls/skew.mjs.map +0 -0
- package/dist/src/controls/util.d.ts +0 -0
- package/dist/src/controls/util.d.ts.map +0 -0
- package/dist/src/controls/util.min.mjs +0 -0
- package/dist/src/controls/util.min.mjs.map +0 -0
- package/dist/src/controls/util.mjs +0 -0
- package/dist/src/controls/util.mjs.map +0 -0
- package/dist/src/controls/wrapWithFireEvent.d.ts +0 -0
- package/dist/src/controls/wrapWithFireEvent.d.ts.map +0 -0
- package/dist/src/controls/wrapWithFireEvent.min.mjs +0 -0
- package/dist/src/controls/wrapWithFireEvent.min.mjs.map +0 -0
- package/dist/src/controls/wrapWithFireEvent.mjs +0 -0
- package/dist/src/controls/wrapWithFireEvent.mjs.map +0 -0
- package/dist/src/controls/wrapWithFixedAnchor.d.ts +0 -0
- package/dist/src/controls/wrapWithFixedAnchor.d.ts.map +0 -0
- package/dist/src/controls/wrapWithFixedAnchor.min.mjs +0 -0
- package/dist/src/controls/wrapWithFixedAnchor.min.mjs.map +0 -0
- package/dist/src/controls/wrapWithFixedAnchor.mjs +0 -0
- package/dist/src/controls/wrapWithFixedAnchor.mjs.map +0 -0
- package/dist/src/env/browser.d.ts +0 -0
- package/dist/src/env/browser.d.ts.map +0 -0
- package/dist/src/env/browser.min.mjs +0 -0
- package/dist/src/env/browser.min.mjs.map +0 -0
- package/dist/src/env/browser.mjs +0 -0
- package/dist/src/env/browser.mjs.map +0 -0
- package/dist/src/env/index.d.ts +0 -0
- package/dist/src/env/index.d.ts.map +0 -0
- package/dist/src/env/index.min.mjs +0 -0
- package/dist/src/env/index.min.mjs.map +0 -0
- package/dist/src/env/index.mjs +0 -0
- package/dist/src/env/index.mjs.map +0 -0
- package/dist/src/env/node.d.ts +0 -0
- package/dist/src/env/node.d.ts.map +0 -0
- package/dist/src/env/types.d.ts +0 -0
- package/dist/src/env/types.d.ts.map +0 -0
- package/dist/src/filters/BaseFilter.d.ts +0 -0
- package/dist/src/filters/BaseFilter.d.ts.map +0 -0
- package/dist/src/filters/BaseFilter.min.mjs +0 -0
- package/dist/src/filters/BaseFilter.min.mjs.map +0 -0
- package/dist/src/filters/BaseFilter.mjs +0 -0
- package/dist/src/filters/BaseFilter.mjs.map +0 -0
- package/dist/src/filters/BlendColor.d.ts +0 -0
- package/dist/src/filters/BlendColor.d.ts.map +0 -0
- package/dist/src/filters/BlendColor.min.mjs +0 -0
- package/dist/src/filters/BlendColor.min.mjs.map +0 -0
- package/dist/src/filters/BlendColor.mjs +0 -0
- package/dist/src/filters/BlendColor.mjs.map +0 -0
- package/dist/src/filters/BlendImage.d.ts +0 -0
- package/dist/src/filters/BlendImage.d.ts.map +0 -0
- package/dist/src/filters/BlendImage.min.mjs +0 -0
- package/dist/src/filters/BlendImage.min.mjs.map +0 -0
- package/dist/src/filters/BlendImage.mjs +0 -0
- package/dist/src/filters/BlendImage.mjs.map +0 -0
- package/dist/src/filters/Blur.d.ts +0 -0
- package/dist/src/filters/Blur.d.ts.map +0 -0
- package/dist/src/filters/Blur.min.mjs +0 -0
- package/dist/src/filters/Blur.min.mjs.map +0 -0
- package/dist/src/filters/Blur.mjs +0 -0
- package/dist/src/filters/Blur.mjs.map +0 -0
- package/dist/src/filters/Boilerplate.d.ts +0 -0
- package/dist/src/filters/Boilerplate.d.ts.map +0 -0
- package/dist/src/filters/Brightness.d.ts +0 -0
- package/dist/src/filters/Brightness.d.ts.map +0 -0
- package/dist/src/filters/Brightness.min.mjs +0 -0
- package/dist/src/filters/Brightness.min.mjs.map +0 -0
- package/dist/src/filters/Brightness.mjs +0 -0
- package/dist/src/filters/Brightness.mjs.map +0 -0
- package/dist/src/filters/Canvas2dFilterBackend.d.ts +0 -0
- package/dist/src/filters/Canvas2dFilterBackend.d.ts.map +0 -0
- package/dist/src/filters/Canvas2dFilterBackend.min.mjs +0 -0
- package/dist/src/filters/Canvas2dFilterBackend.min.mjs.map +0 -0
- package/dist/src/filters/Canvas2dFilterBackend.mjs +0 -0
- package/dist/src/filters/Canvas2dFilterBackend.mjs.map +0 -0
- package/dist/src/filters/ColorMatrix.d.ts +0 -0
- package/dist/src/filters/ColorMatrix.d.ts.map +0 -0
- package/dist/src/filters/ColorMatrix.min.mjs +0 -0
- package/dist/src/filters/ColorMatrix.min.mjs.map +0 -0
- package/dist/src/filters/ColorMatrix.mjs +0 -0
- package/dist/src/filters/ColorMatrix.mjs.map +0 -0
- package/dist/src/filters/ColorMatrixFilters.d.ts +0 -0
- package/dist/src/filters/ColorMatrixFilters.d.ts.map +0 -0
- package/dist/src/filters/ColorMatrixFilters.min.mjs +0 -0
- package/dist/src/filters/ColorMatrixFilters.min.mjs.map +0 -0
- package/dist/src/filters/ColorMatrixFilters.mjs +0 -0
- package/dist/src/filters/ColorMatrixFilters.mjs.map +0 -0
- package/dist/src/filters/Composed.d.ts +0 -0
- package/dist/src/filters/Composed.d.ts.map +0 -0
- package/dist/src/filters/Composed.min.mjs +0 -0
- package/dist/src/filters/Composed.min.mjs.map +0 -0
- package/dist/src/filters/Composed.mjs +0 -0
- package/dist/src/filters/Composed.mjs.map +0 -0
- package/dist/src/filters/Contrast.d.ts +0 -0
- package/dist/src/filters/Contrast.d.ts.map +0 -0
- package/dist/src/filters/Contrast.min.mjs +0 -0
- package/dist/src/filters/Contrast.min.mjs.map +0 -0
- package/dist/src/filters/Contrast.mjs +0 -0
- package/dist/src/filters/Contrast.mjs.map +0 -0
- package/dist/src/filters/Convolute.d.ts +0 -0
- package/dist/src/filters/Convolute.d.ts.map +0 -0
- package/dist/src/filters/Convolute.min.mjs +0 -0
- package/dist/src/filters/Convolute.min.mjs.map +0 -0
- package/dist/src/filters/Convolute.mjs +0 -0
- package/dist/src/filters/Convolute.mjs.map +0 -0
- package/dist/src/filters/FilterBackend.d.ts +0 -0
- package/dist/src/filters/FilterBackend.d.ts.map +0 -0
- package/dist/src/filters/FilterBackend.min.mjs +0 -0
- package/dist/src/filters/FilterBackend.min.mjs.map +0 -0
- package/dist/src/filters/FilterBackend.mjs +0 -0
- package/dist/src/filters/FilterBackend.mjs.map +0 -0
- package/dist/src/filters/GLProbes/GLProbe.d.ts +0 -0
- package/dist/src/filters/GLProbes/GLProbe.d.ts.map +0 -0
- package/dist/src/filters/GLProbes/GLProbe.min.mjs +0 -0
- package/dist/src/filters/GLProbes/GLProbe.min.mjs.map +0 -0
- package/dist/src/filters/GLProbes/GLProbe.mjs +0 -0
- package/dist/src/filters/GLProbes/GLProbe.mjs.map +0 -0
- package/dist/src/filters/GLProbes/NodeGLProbe.d.ts +0 -0
- package/dist/src/filters/GLProbes/NodeGLProbe.d.ts.map +0 -0
- package/dist/src/filters/GLProbes/WebGLProbe.d.ts +0 -0
- package/dist/src/filters/GLProbes/WebGLProbe.d.ts.map +0 -0
- package/dist/src/filters/GLProbes/WebGLProbe.min.mjs +0 -0
- package/dist/src/filters/GLProbes/WebGLProbe.min.mjs.map +0 -0
- package/dist/src/filters/GLProbes/WebGLProbe.mjs +0 -0
- package/dist/src/filters/GLProbes/WebGLProbe.mjs.map +0 -0
- package/dist/src/filters/Gamma.d.ts +0 -0
- package/dist/src/filters/Gamma.d.ts.map +0 -0
- package/dist/src/filters/Gamma.min.mjs +0 -0
- package/dist/src/filters/Gamma.min.mjs.map +0 -0
- package/dist/src/filters/Gamma.mjs +0 -0
- package/dist/src/filters/Gamma.mjs.map +0 -0
- package/dist/src/filters/Grayscale.d.ts +0 -0
- package/dist/src/filters/Grayscale.d.ts.map +0 -0
- package/dist/src/filters/Grayscale.min.mjs +0 -0
- package/dist/src/filters/Grayscale.min.mjs.map +0 -0
- package/dist/src/filters/Grayscale.mjs +0 -0
- package/dist/src/filters/Grayscale.mjs.map +0 -0
- package/dist/src/filters/HueRotation.d.ts +0 -0
- package/dist/src/filters/HueRotation.d.ts.map +0 -0
- package/dist/src/filters/HueRotation.min.mjs +0 -0
- package/dist/src/filters/HueRotation.min.mjs.map +0 -0
- package/dist/src/filters/HueRotation.mjs +0 -0
- package/dist/src/filters/HueRotation.mjs.map +0 -0
- package/dist/src/filters/Invert.d.ts +0 -0
- package/dist/src/filters/Invert.d.ts.map +0 -0
- package/dist/src/filters/Invert.min.mjs +0 -0
- package/dist/src/filters/Invert.min.mjs.map +0 -0
- package/dist/src/filters/Invert.mjs +0 -0
- package/dist/src/filters/Invert.mjs.map +0 -0
- package/dist/src/filters/Noise.d.ts +0 -0
- package/dist/src/filters/Noise.d.ts.map +0 -0
- package/dist/src/filters/Noise.min.mjs +0 -0
- package/dist/src/filters/Noise.min.mjs.map +0 -0
- package/dist/src/filters/Noise.mjs +0 -0
- package/dist/src/filters/Noise.mjs.map +0 -0
- package/dist/src/filters/Pixelate.d.ts +0 -0
- package/dist/src/filters/Pixelate.d.ts.map +0 -0
- package/dist/src/filters/Pixelate.min.mjs +0 -0
- package/dist/src/filters/Pixelate.min.mjs.map +0 -0
- package/dist/src/filters/Pixelate.mjs +0 -0
- package/dist/src/filters/Pixelate.mjs.map +0 -0
- package/dist/src/filters/RemoveColor.d.ts +0 -0
- package/dist/src/filters/RemoveColor.d.ts.map +0 -0
- package/dist/src/filters/RemoveColor.min.mjs +0 -0
- package/dist/src/filters/RemoveColor.min.mjs.map +0 -0
- package/dist/src/filters/RemoveColor.mjs +0 -0
- package/dist/src/filters/RemoveColor.mjs.map +0 -0
- package/dist/src/filters/Resize.d.ts +0 -0
- package/dist/src/filters/Resize.d.ts.map +0 -0
- package/dist/src/filters/Resize.min.mjs +0 -0
- package/dist/src/filters/Resize.min.mjs.map +0 -0
- package/dist/src/filters/Resize.mjs +0 -0
- package/dist/src/filters/Resize.mjs.map +0 -0
- package/dist/src/filters/Saturation.d.ts +0 -0
- package/dist/src/filters/Saturation.d.ts.map +0 -0
- package/dist/src/filters/Saturation.min.mjs +0 -0
- package/dist/src/filters/Saturation.min.mjs.map +0 -0
- package/dist/src/filters/Saturation.mjs +0 -0
- package/dist/src/filters/Saturation.mjs.map +0 -0
- package/dist/src/filters/Vibrance.d.ts +0 -0
- package/dist/src/filters/Vibrance.d.ts.map +0 -0
- package/dist/src/filters/Vibrance.min.mjs +0 -0
- package/dist/src/filters/Vibrance.min.mjs.map +0 -0
- package/dist/src/filters/Vibrance.mjs +0 -0
- package/dist/src/filters/Vibrance.mjs.map +0 -0
- package/dist/src/filters/WebGLFilterBackend.d.ts +0 -0
- package/dist/src/filters/WebGLFilterBackend.d.ts.map +0 -0
- package/dist/src/filters/WebGLFilterBackend.min.mjs +0 -0
- package/dist/src/filters/WebGLFilterBackend.min.mjs.map +0 -0
- package/dist/src/filters/WebGLFilterBackend.mjs +0 -0
- package/dist/src/filters/WebGLFilterBackend.mjs.map +0 -0
- package/dist/src/filters/filters.d.ts +0 -0
- package/dist/src/filters/filters.d.ts.map +0 -0
- package/dist/src/filters/filters.min.mjs +0 -0
- package/dist/src/filters/filters.min.mjs.map +0 -0
- package/dist/src/filters/filters.mjs +0 -0
- package/dist/src/filters/filters.mjs.map +0 -0
- package/dist/src/filters/index.d.ts +0 -0
- package/dist/src/filters/index.d.ts.map +0 -0
- package/dist/src/filters/shaders/baseFilter.d.ts +0 -0
- package/dist/src/filters/shaders/baseFilter.d.ts.map +0 -0
- package/dist/src/filters/shaders/baseFilter.min.mjs +0 -0
- package/dist/src/filters/shaders/baseFilter.min.mjs.map +0 -0
- package/dist/src/filters/shaders/baseFilter.mjs +0 -0
- package/dist/src/filters/shaders/baseFilter.mjs.map +0 -0
- package/dist/src/filters/shaders/blendColor.d.ts +0 -0
- package/dist/src/filters/shaders/blendColor.d.ts.map +0 -0
- package/dist/src/filters/shaders/blendColor.min.mjs +0 -0
- package/dist/src/filters/shaders/blendColor.min.mjs.map +0 -0
- package/dist/src/filters/shaders/blendColor.mjs +0 -0
- package/dist/src/filters/shaders/blendColor.mjs.map +0 -0
- package/dist/src/filters/shaders/blendImage.d.ts +0 -0
- package/dist/src/filters/shaders/blendImage.d.ts.map +0 -0
- package/dist/src/filters/shaders/blendImage.min.mjs +0 -0
- package/dist/src/filters/shaders/blendImage.min.mjs.map +0 -0
- package/dist/src/filters/shaders/blendImage.mjs +0 -0
- package/dist/src/filters/shaders/blendImage.mjs.map +0 -0
- package/dist/src/filters/shaders/blur.d.ts +0 -0
- package/dist/src/filters/shaders/blur.d.ts.map +0 -0
- package/dist/src/filters/shaders/blur.min.mjs +0 -0
- package/dist/src/filters/shaders/blur.min.mjs.map +0 -0
- package/dist/src/filters/shaders/blur.mjs +0 -0
- package/dist/src/filters/shaders/blur.mjs.map +0 -0
- package/dist/src/filters/shaders/brightness.d.ts +0 -0
- package/dist/src/filters/shaders/brightness.d.ts.map +0 -0
- package/dist/src/filters/shaders/brightness.min.mjs +0 -0
- package/dist/src/filters/shaders/brightness.min.mjs.map +0 -0
- package/dist/src/filters/shaders/brightness.mjs +0 -0
- package/dist/src/filters/shaders/brightness.mjs.map +0 -0
- package/dist/src/filters/shaders/colorMatrix.d.ts +0 -0
- package/dist/src/filters/shaders/colorMatrix.d.ts.map +0 -0
- package/dist/src/filters/shaders/colorMatrix.min.mjs +0 -0
- package/dist/src/filters/shaders/colorMatrix.min.mjs.map +0 -0
- package/dist/src/filters/shaders/colorMatrix.mjs +0 -0
- package/dist/src/filters/shaders/colorMatrix.mjs.map +0 -0
- package/dist/src/filters/shaders/constrast.d.ts +0 -0
- package/dist/src/filters/shaders/constrast.d.ts.map +0 -0
- package/dist/src/filters/shaders/constrast.min.mjs +0 -0
- package/dist/src/filters/shaders/constrast.min.mjs.map +0 -0
- package/dist/src/filters/shaders/constrast.mjs +0 -0
- package/dist/src/filters/shaders/constrast.mjs.map +0 -0
- package/dist/src/filters/shaders/convolute.d.ts +0 -0
- package/dist/src/filters/shaders/convolute.d.ts.map +0 -0
- package/dist/src/filters/shaders/convolute.min.mjs +0 -0
- package/dist/src/filters/shaders/convolute.min.mjs.map +0 -0
- package/dist/src/filters/shaders/convolute.mjs +0 -0
- package/dist/src/filters/shaders/convolute.mjs.map +0 -0
- package/dist/src/filters/shaders/gamma.d.ts +0 -0
- package/dist/src/filters/shaders/gamma.d.ts.map +0 -0
- package/dist/src/filters/shaders/gamma.min.mjs +0 -0
- package/dist/src/filters/shaders/gamma.min.mjs.map +0 -0
- package/dist/src/filters/shaders/gamma.mjs +0 -0
- package/dist/src/filters/shaders/gamma.mjs.map +0 -0
- package/dist/src/filters/shaders/grayscale.d.ts +0 -0
- package/dist/src/filters/shaders/grayscale.d.ts.map +0 -0
- package/dist/src/filters/shaders/grayscale.min.mjs +0 -0
- package/dist/src/filters/shaders/grayscale.min.mjs.map +0 -0
- package/dist/src/filters/shaders/grayscale.mjs +0 -0
- package/dist/src/filters/shaders/grayscale.mjs.map +0 -0
- package/dist/src/filters/shaders/invert.d.ts +0 -0
- package/dist/src/filters/shaders/invert.d.ts.map +0 -0
- package/dist/src/filters/shaders/invert.min.mjs +0 -0
- package/dist/src/filters/shaders/invert.min.mjs.map +0 -0
- package/dist/src/filters/shaders/invert.mjs +0 -0
- package/dist/src/filters/shaders/invert.mjs.map +0 -0
- package/dist/src/filters/shaders/noise.d.ts +0 -0
- package/dist/src/filters/shaders/noise.d.ts.map +0 -0
- package/dist/src/filters/shaders/noise.min.mjs +0 -0
- package/dist/src/filters/shaders/noise.min.mjs.map +0 -0
- package/dist/src/filters/shaders/noise.mjs +0 -0
- package/dist/src/filters/shaders/noise.mjs.map +0 -0
- package/dist/src/filters/shaders/pixelate.d.ts +0 -0
- package/dist/src/filters/shaders/pixelate.d.ts.map +0 -0
- package/dist/src/filters/shaders/pixelate.min.mjs +0 -0
- package/dist/src/filters/shaders/pixelate.min.mjs.map +0 -0
- package/dist/src/filters/shaders/pixelate.mjs +0 -0
- package/dist/src/filters/shaders/pixelate.mjs.map +0 -0
- package/dist/src/filters/shaders/removeColor.d.ts +0 -0
- package/dist/src/filters/shaders/removeColor.d.ts.map +0 -0
- package/dist/src/filters/shaders/removeColor.min.mjs +0 -0
- package/dist/src/filters/shaders/removeColor.min.mjs.map +0 -0
- package/dist/src/filters/shaders/removeColor.mjs +0 -0
- package/dist/src/filters/shaders/removeColor.mjs.map +0 -0
- package/dist/src/filters/shaders/saturation.d.ts +0 -0
- package/dist/src/filters/shaders/saturation.d.ts.map +0 -0
- package/dist/src/filters/shaders/saturation.min.mjs +0 -0
- package/dist/src/filters/shaders/saturation.min.mjs.map +0 -0
- package/dist/src/filters/shaders/saturation.mjs +0 -0
- package/dist/src/filters/shaders/saturation.mjs.map +0 -0
- package/dist/src/filters/shaders/vibrance.d.ts +0 -0
- package/dist/src/filters/shaders/vibrance.d.ts.map +0 -0
- package/dist/src/filters/shaders/vibrance.min.mjs +0 -0
- package/dist/src/filters/shaders/vibrance.min.mjs.map +0 -0
- package/dist/src/filters/shaders/vibrance.mjs +0 -0
- package/dist/src/filters/shaders/vibrance.mjs.map +0 -0
- package/dist/src/filters/typedefs.d.ts +0 -0
- package/dist/src/filters/typedefs.d.ts.map +0 -0
- package/dist/src/filters/utils.d.ts +0 -0
- package/dist/src/filters/utils.d.ts.map +0 -0
- package/dist/src/filters/utils.min.mjs +0 -0
- package/dist/src/filters/utils.min.mjs.map +0 -0
- package/dist/src/filters/utils.mjs +0 -0
- package/dist/src/filters/utils.mjs.map +0 -0
- package/dist/src/gradient/Gradient.d.ts +0 -0
- package/dist/src/gradient/Gradient.d.ts.map +0 -0
- package/dist/src/gradient/Gradient.min.mjs +0 -0
- package/dist/src/gradient/Gradient.min.mjs.map +0 -0
- package/dist/src/gradient/Gradient.mjs +0 -0
- package/dist/src/gradient/Gradient.mjs.map +0 -0
- package/dist/src/gradient/constants.d.ts +0 -0
- package/dist/src/gradient/constants.d.ts.map +0 -0
- package/dist/src/gradient/constants.min.mjs +0 -0
- package/dist/src/gradient/constants.min.mjs.map +0 -0
- package/dist/src/gradient/constants.mjs +0 -0
- package/dist/src/gradient/constants.mjs.map +0 -0
- package/dist/src/gradient/index.d.ts +0 -0
- package/dist/src/gradient/index.d.ts.map +0 -0
- package/dist/src/gradient/parser/misc.d.ts +0 -0
- package/dist/src/gradient/parser/misc.d.ts.map +0 -0
- package/dist/src/gradient/parser/misc.min.mjs +0 -0
- package/dist/src/gradient/parser/misc.min.mjs.map +0 -0
- package/dist/src/gradient/parser/misc.mjs +0 -0
- package/dist/src/gradient/parser/misc.mjs.map +0 -0
- package/dist/src/gradient/parser/parseColorStops.d.ts +0 -0
- package/dist/src/gradient/parser/parseColorStops.d.ts.map +0 -0
- package/dist/src/gradient/parser/parseColorStops.min.mjs +0 -0
- package/dist/src/gradient/parser/parseColorStops.min.mjs.map +0 -0
- package/dist/src/gradient/parser/parseColorStops.mjs +0 -0
- package/dist/src/gradient/parser/parseColorStops.mjs.map +0 -0
- package/dist/src/gradient/parser/parseCoords.d.ts +0 -0
- package/dist/src/gradient/parser/parseCoords.d.ts.map +0 -0
- package/dist/src/gradient/parser/parseCoords.min.mjs +0 -0
- package/dist/src/gradient/parser/parseCoords.min.mjs.map +0 -0
- package/dist/src/gradient/parser/parseCoords.mjs +0 -0
- package/dist/src/gradient/parser/parseCoords.mjs.map +0 -0
- package/dist/src/gradient/typedefs.d.ts +0 -0
- package/dist/src/gradient/typedefs.d.ts.map +0 -0
- package/dist/src/mixins/eraser_brush.mixin.d.ts +0 -0
- package/dist/src/mixins/eraser_brush.mixin.d.ts.map +0 -0
- package/dist/src/parkinglot/canvas_animation.mixin.d.ts +0 -0
- package/dist/src/parkinglot/canvas_animation.mixin.d.ts.map +0 -0
- package/dist/src/parkinglot/straighten.d.ts +0 -0
- package/dist/src/parkinglot/straighten.d.ts.map +0 -0
- package/dist/src/parser/applyViewboxTransform.d.ts +0 -0
- package/dist/src/parser/applyViewboxTransform.d.ts.map +0 -0
- package/dist/src/parser/applyViewboxTransform.min.mjs +0 -0
- package/dist/src/parser/applyViewboxTransform.min.mjs.map +0 -0
- package/dist/src/parser/applyViewboxTransform.mjs +0 -0
- package/dist/src/parser/applyViewboxTransform.mjs.map +0 -0
- package/dist/src/parser/attributes.d.ts +0 -0
- package/dist/src/parser/attributes.d.ts.map +0 -0
- package/dist/src/parser/attributes.min.mjs +0 -0
- package/dist/src/parser/attributes.min.mjs.map +0 -0
- package/dist/src/parser/attributes.mjs +0 -0
- package/dist/src/parser/attributes.mjs.map +0 -0
- package/dist/src/parser/constants.d.ts +0 -0
- package/dist/src/parser/constants.d.ts.map +0 -0
- package/dist/src/parser/constants.min.mjs +0 -0
- package/dist/src/parser/constants.min.mjs.map +0 -0
- package/dist/src/parser/constants.mjs +0 -0
- package/dist/src/parser/constants.mjs.map +0 -0
- package/dist/src/parser/doesSomeParentMatch.d.ts +0 -0
- package/dist/src/parser/doesSomeParentMatch.d.ts.map +0 -0
- package/dist/src/parser/doesSomeParentMatch.min.mjs +0 -0
- package/dist/src/parser/doesSomeParentMatch.min.mjs.map +0 -0
- package/dist/src/parser/doesSomeParentMatch.mjs +0 -0
- package/dist/src/parser/doesSomeParentMatch.mjs.map +0 -0
- package/dist/src/parser/elementMatchesRule.d.ts +0 -0
- package/dist/src/parser/elementMatchesRule.d.ts.map +0 -0
- package/dist/src/parser/elementMatchesRule.min.mjs +0 -0
- package/dist/src/parser/elementMatchesRule.min.mjs.map +0 -0
- package/dist/src/parser/elementMatchesRule.mjs +0 -0
- package/dist/src/parser/elementMatchesRule.mjs.map +0 -0
- package/dist/src/parser/elements_parser.d.ts +0 -0
- package/dist/src/parser/elements_parser.d.ts.map +0 -0
- package/dist/src/parser/elements_parser.min.mjs +0 -0
- package/dist/src/parser/elements_parser.min.mjs.map +0 -0
- package/dist/src/parser/elements_parser.mjs +0 -0
- package/dist/src/parser/elements_parser.mjs.map +0 -0
- package/dist/src/parser/getCSSRules.d.ts +0 -0
- package/dist/src/parser/getCSSRules.d.ts.map +0 -0
- package/dist/src/parser/getCSSRules.min.mjs +0 -0
- package/dist/src/parser/getCSSRules.min.mjs.map +0 -0
- package/dist/src/parser/getCSSRules.mjs +0 -0
- package/dist/src/parser/getCSSRules.mjs.map +0 -0
- package/dist/src/parser/getGlobalStylesForElement.d.ts +0 -0
- package/dist/src/parser/getGlobalStylesForElement.d.ts.map +0 -0
- package/dist/src/parser/getGlobalStylesForElement.min.mjs +0 -0
- package/dist/src/parser/getGlobalStylesForElement.min.mjs.map +0 -0
- package/dist/src/parser/getGlobalStylesForElement.mjs +0 -0
- package/dist/src/parser/getGlobalStylesForElement.mjs.map +0 -0
- package/dist/src/parser/getGradientDefs.d.ts +0 -0
- package/dist/src/parser/getGradientDefs.d.ts.map +0 -0
- package/dist/src/parser/getGradientDefs.min.mjs +0 -0
- package/dist/src/parser/getGradientDefs.min.mjs.map +0 -0
- package/dist/src/parser/getGradientDefs.mjs +0 -0
- package/dist/src/parser/getGradientDefs.mjs.map +0 -0
- package/dist/src/parser/getMultipleNodes.d.ts +0 -0
- package/dist/src/parser/getMultipleNodes.d.ts.map +0 -0
- package/dist/src/parser/getMultipleNodes.min.mjs +0 -0
- package/dist/src/parser/getMultipleNodes.min.mjs.map +0 -0
- package/dist/src/parser/getMultipleNodes.mjs +0 -0
- package/dist/src/parser/getMultipleNodes.mjs.map +0 -0
- package/dist/src/parser/getSvgRegex.d.ts +0 -0
- package/dist/src/parser/getSvgRegex.d.ts.map +0 -0
- package/dist/src/parser/getSvgRegex.min.mjs +0 -0
- package/dist/src/parser/getSvgRegex.min.mjs.map +0 -0
- package/dist/src/parser/getSvgRegex.mjs +0 -0
- package/dist/src/parser/getSvgRegex.mjs.map +0 -0
- package/dist/src/parser/getTagName.d.ts +0 -0
- package/dist/src/parser/getTagName.d.ts.map +0 -0
- package/dist/src/parser/getTagName.min.mjs +0 -0
- package/dist/src/parser/getTagName.min.mjs.map +0 -0
- package/dist/src/parser/getTagName.mjs +0 -0
- package/dist/src/parser/getTagName.mjs.map +0 -0
- package/dist/src/parser/hasInvalidAncestor.d.ts +0 -0
- package/dist/src/parser/hasInvalidAncestor.d.ts.map +0 -0
- package/dist/src/parser/hasInvalidAncestor.min.mjs +0 -0
- package/dist/src/parser/hasInvalidAncestor.min.mjs.map +0 -0
- package/dist/src/parser/hasInvalidAncestor.mjs +0 -0
- package/dist/src/parser/hasInvalidAncestor.mjs.map +0 -0
- package/dist/src/parser/loadSVGFromString.d.ts +0 -0
- package/dist/src/parser/loadSVGFromString.d.ts.map +0 -0
- package/dist/src/parser/loadSVGFromString.min.mjs +0 -0
- package/dist/src/parser/loadSVGFromString.min.mjs.map +0 -0
- package/dist/src/parser/loadSVGFromString.mjs +0 -0
- package/dist/src/parser/loadSVGFromString.mjs.map +0 -0
- package/dist/src/parser/loadSVGFromURL.d.ts +0 -0
- package/dist/src/parser/loadSVGFromURL.d.ts.map +0 -0
- package/dist/src/parser/loadSVGFromURL.min.mjs +0 -0
- package/dist/src/parser/loadSVGFromURL.min.mjs.map +0 -0
- package/dist/src/parser/loadSVGFromURL.mjs +0 -0
- package/dist/src/parser/loadSVGFromURL.mjs.map +0 -0
- package/dist/src/parser/normalizeAttr.d.ts +0 -0
- package/dist/src/parser/normalizeAttr.d.ts.map +0 -0
- package/dist/src/parser/normalizeAttr.min.mjs +0 -0
- package/dist/src/parser/normalizeAttr.min.mjs.map +0 -0
- package/dist/src/parser/normalizeAttr.mjs +0 -0
- package/dist/src/parser/normalizeAttr.mjs.map +0 -0
- package/dist/src/parser/normalizeValue.d.ts +0 -0
- package/dist/src/parser/normalizeValue.d.ts.map +0 -0
- package/dist/src/parser/normalizeValue.min.mjs +0 -0
- package/dist/src/parser/normalizeValue.min.mjs.map +0 -0
- package/dist/src/parser/normalizeValue.mjs +0 -0
- package/dist/src/parser/normalizeValue.mjs.map +0 -0
- package/dist/src/parser/parseAttributes.d.ts +0 -0
- package/dist/src/parser/parseAttributes.d.ts.map +0 -0
- package/dist/src/parser/parseAttributes.min.mjs +0 -0
- package/dist/src/parser/parseAttributes.min.mjs.map +0 -0
- package/dist/src/parser/parseAttributes.mjs +0 -0
- package/dist/src/parser/parseAttributes.mjs.map +0 -0
- package/dist/src/parser/parseFontDeclaration.d.ts +0 -0
- package/dist/src/parser/parseFontDeclaration.d.ts.map +0 -0
- package/dist/src/parser/parseFontDeclaration.min.mjs +0 -0
- package/dist/src/parser/parseFontDeclaration.min.mjs.map +0 -0
- package/dist/src/parser/parseFontDeclaration.mjs +0 -0
- package/dist/src/parser/parseFontDeclaration.mjs.map +0 -0
- package/dist/src/parser/parsePointsAttribute.d.ts +0 -0
- package/dist/src/parser/parsePointsAttribute.d.ts.map +0 -0
- package/dist/src/parser/parsePointsAttribute.min.mjs +0 -0
- package/dist/src/parser/parsePointsAttribute.min.mjs.map +0 -0
- package/dist/src/parser/parsePointsAttribute.mjs +0 -0
- package/dist/src/parser/parsePointsAttribute.mjs.map +0 -0
- package/dist/src/parser/parseSVGDocument.d.ts +0 -0
- package/dist/src/parser/parseSVGDocument.d.ts.map +0 -0
- package/dist/src/parser/parseSVGDocument.min.mjs +0 -0
- package/dist/src/parser/parseSVGDocument.min.mjs.map +0 -0
- package/dist/src/parser/parseSVGDocument.mjs +0 -0
- package/dist/src/parser/parseSVGDocument.mjs.map +0 -0
- package/dist/src/parser/parseStyleAttribute.d.ts +0 -0
- package/dist/src/parser/parseStyleAttribute.d.ts.map +0 -0
- package/dist/src/parser/parseStyleAttribute.min.mjs +0 -0
- package/dist/src/parser/parseStyleAttribute.min.mjs.map +0 -0
- package/dist/src/parser/parseStyleAttribute.mjs +0 -0
- package/dist/src/parser/parseStyleAttribute.mjs.map +0 -0
- package/dist/src/parser/parseStyleObject.d.ts +0 -0
- package/dist/src/parser/parseStyleObject.d.ts.map +0 -0
- package/dist/src/parser/parseStyleObject.min.mjs +0 -0
- package/dist/src/parser/parseStyleObject.min.mjs.map +0 -0
- package/dist/src/parser/parseStyleObject.mjs +0 -0
- package/dist/src/parser/parseStyleObject.mjs.map +0 -0
- package/dist/src/parser/parseStyleString.d.ts +0 -0
- package/dist/src/parser/parseStyleString.d.ts.map +0 -0
- package/dist/src/parser/parseStyleString.min.mjs +0 -0
- package/dist/src/parser/parseStyleString.min.mjs.map +0 -0
- package/dist/src/parser/parseStyleString.mjs +0 -0
- package/dist/src/parser/parseStyleString.mjs.map +0 -0
- package/dist/src/parser/parseTransformAttribute.d.ts +0 -0
- package/dist/src/parser/parseTransformAttribute.d.ts.map +0 -0
- package/dist/src/parser/parseTransformAttribute.min.mjs +0 -0
- package/dist/src/parser/parseTransformAttribute.min.mjs.map +0 -0
- package/dist/src/parser/parseTransformAttribute.mjs +0 -0
- package/dist/src/parser/parseTransformAttribute.mjs.map +0 -0
- package/dist/src/parser/parseUseDirectives.d.ts +0 -0
- package/dist/src/parser/parseUseDirectives.d.ts.map +0 -0
- package/dist/src/parser/parseUseDirectives.min.mjs +0 -0
- package/dist/src/parser/parseUseDirectives.min.mjs.map +0 -0
- package/dist/src/parser/parseUseDirectives.mjs +0 -0
- package/dist/src/parser/parseUseDirectives.mjs.map +0 -0
- package/dist/src/parser/percent.d.ts +0 -0
- package/dist/src/parser/percent.d.ts.map +0 -0
- package/dist/src/parser/percent.min.mjs +0 -0
- package/dist/src/parser/percent.min.mjs.map +0 -0
- package/dist/src/parser/percent.mjs +0 -0
- package/dist/src/parser/percent.mjs.map +0 -0
- package/dist/src/parser/recursivelyParseGradientsXlink.d.ts +0 -0
- package/dist/src/parser/recursivelyParseGradientsXlink.d.ts.map +0 -0
- package/dist/src/parser/recursivelyParseGradientsXlink.min.mjs +0 -0
- package/dist/src/parser/recursivelyParseGradientsXlink.min.mjs.map +0 -0
- package/dist/src/parser/recursivelyParseGradientsXlink.mjs +0 -0
- package/dist/src/parser/recursivelyParseGradientsXlink.mjs.map +0 -0
- package/dist/src/parser/selectorMatches.d.ts +0 -0
- package/dist/src/parser/selectorMatches.d.ts.map +0 -0
- package/dist/src/parser/selectorMatches.min.mjs +0 -0
- package/dist/src/parser/selectorMatches.min.mjs.map +0 -0
- package/dist/src/parser/selectorMatches.mjs +0 -0
- package/dist/src/parser/selectorMatches.mjs.map +0 -0
- package/dist/src/parser/setStrokeFillOpacity.d.ts +0 -0
- package/dist/src/parser/setStrokeFillOpacity.d.ts.map +0 -0
- package/dist/src/parser/setStrokeFillOpacity.min.mjs +0 -0
- package/dist/src/parser/setStrokeFillOpacity.min.mjs.map +0 -0
- package/dist/src/parser/setStrokeFillOpacity.mjs +0 -0
- package/dist/src/parser/setStrokeFillOpacity.mjs.map +0 -0
- package/dist/src/parser/typedefs.d.ts +0 -0
- package/dist/src/parser/typedefs.d.ts.map +0 -0
- package/dist/src/shapes/ActiveSelection.d.ts +0 -0
- package/dist/src/shapes/ActiveSelection.d.ts.map +0 -0
- package/dist/src/shapes/ActiveSelection.min.mjs +0 -0
- package/dist/src/shapes/ActiveSelection.min.mjs.map +0 -0
- package/dist/src/shapes/ActiveSelection.mjs +0 -0
- package/dist/src/shapes/ActiveSelection.mjs.map +0 -0
- package/dist/src/shapes/Circle.d.ts +0 -0
- package/dist/src/shapes/Circle.d.ts.map +0 -0
- package/dist/src/shapes/Circle.min.mjs +0 -0
- package/dist/src/shapes/Circle.min.mjs.map +0 -0
- package/dist/src/shapes/Circle.mjs +0 -0
- package/dist/src/shapes/Circle.mjs.map +0 -0
- package/dist/src/shapes/Ellipse.d.ts +0 -0
- package/dist/src/shapes/Ellipse.d.ts.map +0 -0
- package/dist/src/shapes/Ellipse.min.mjs +0 -0
- package/dist/src/shapes/Ellipse.min.mjs.map +0 -0
- package/dist/src/shapes/Ellipse.mjs +0 -0
- package/dist/src/shapes/Ellipse.mjs.map +0 -0
- package/dist/src/shapes/Group.d.ts +0 -0
- package/dist/src/shapes/Group.d.ts.map +0 -0
- package/dist/src/shapes/Group.min.mjs +0 -0
- package/dist/src/shapes/Group.min.mjs.map +0 -0
- package/dist/src/shapes/Group.mjs +0 -0
- package/dist/src/shapes/Group.mjs.map +0 -0
- package/dist/src/shapes/IText/DraggableTextDelegate.d.ts +0 -0
- package/dist/src/shapes/IText/DraggableTextDelegate.d.ts.map +0 -0
- package/dist/src/shapes/IText/DraggableTextDelegate.min.mjs +0 -0
- package/dist/src/shapes/IText/DraggableTextDelegate.min.mjs.map +0 -0
- package/dist/src/shapes/IText/DraggableTextDelegate.mjs +0 -0
- package/dist/src/shapes/IText/DraggableTextDelegate.mjs.map +0 -0
- package/dist/src/shapes/IText/IText.d.ts +0 -0
- package/dist/src/shapes/IText/IText.d.ts.map +0 -0
- package/dist/src/shapes/IText/IText.min.mjs +0 -0
- package/dist/src/shapes/IText/IText.min.mjs.map +1 -1
- package/dist/src/shapes/IText/IText.mjs +206 -206
- package/dist/src/shapes/IText/IText.mjs.map +1 -1
- package/dist/src/shapes/IText/ITextBehavior.d.ts +0 -0
- package/dist/src/shapes/IText/ITextBehavior.d.ts.map +0 -0
- package/dist/src/shapes/IText/ITextBehavior.min.mjs +0 -0
- package/dist/src/shapes/IText/ITextBehavior.min.mjs.map +1 -1
- package/dist/src/shapes/IText/ITextBehavior.mjs +152 -152
- package/dist/src/shapes/IText/ITextBehavior.mjs.map +1 -1
- package/dist/src/shapes/IText/ITextClickBehavior.d.ts +0 -0
- package/dist/src/shapes/IText/ITextClickBehavior.d.ts.map +0 -0
- package/dist/src/shapes/IText/ITextClickBehavior.min.mjs +0 -0
- package/dist/src/shapes/IText/ITextClickBehavior.min.mjs.map +1 -1
- package/dist/src/shapes/IText/ITextClickBehavior.mjs +36 -36
- package/dist/src/shapes/IText/ITextClickBehavior.mjs.map +1 -1
- package/dist/src/shapes/IText/ITextKeyBehavior.d.ts +0 -0
- package/dist/src/shapes/IText/ITextKeyBehavior.d.ts.map +0 -0
- package/dist/src/shapes/IText/ITextKeyBehavior.min.mjs +0 -0
- package/dist/src/shapes/IText/ITextKeyBehavior.min.mjs.map +1 -1
- package/dist/src/shapes/IText/ITextKeyBehavior.mjs +115 -115
- package/dist/src/shapes/IText/ITextKeyBehavior.mjs.map +1 -1
- package/dist/src/shapes/IText/constants.d.ts +0 -0
- package/dist/src/shapes/IText/constants.d.ts.map +0 -0
- package/dist/src/shapes/IText/constants.min.mjs +0 -0
- package/dist/src/shapes/IText/constants.min.mjs.map +0 -0
- package/dist/src/shapes/IText/constants.mjs +0 -0
- package/dist/src/shapes/IText/constants.mjs.map +0 -0
- package/dist/src/shapes/Image.d.ts +0 -0
- package/dist/src/shapes/Image.d.ts.map +0 -0
- package/dist/src/shapes/Image.min.mjs +0 -0
- package/dist/src/shapes/Image.min.mjs.map +0 -0
- package/dist/src/shapes/Image.mjs +0 -0
- package/dist/src/shapes/Image.mjs.map +0 -0
- package/dist/src/shapes/Line.d.ts +0 -0
- package/dist/src/shapes/Line.d.ts.map +0 -0
- package/dist/src/shapes/Line.min.mjs +0 -0
- package/dist/src/shapes/Line.min.mjs.map +0 -0
- package/dist/src/shapes/Line.mjs +0 -0
- package/dist/src/shapes/Line.mjs.map +0 -0
- package/dist/src/shapes/Object/FabricObject.d.ts +0 -0
- package/dist/src/shapes/Object/FabricObject.d.ts.map +0 -0
- package/dist/src/shapes/Object/FabricObject.min.mjs +0 -0
- package/dist/src/shapes/Object/FabricObject.min.mjs.map +0 -0
- package/dist/src/shapes/Object/FabricObject.mjs +0 -0
- package/dist/src/shapes/Object/FabricObject.mjs.map +0 -0
- package/dist/src/shapes/Object/FabricObjectSVGExportMixin.d.ts +0 -0
- package/dist/src/shapes/Object/FabricObjectSVGExportMixin.d.ts.map +0 -0
- package/dist/src/shapes/Object/FabricObjectSVGExportMixin.min.mjs +0 -0
- package/dist/src/shapes/Object/FabricObjectSVGExportMixin.min.mjs.map +0 -0
- package/dist/src/shapes/Object/FabricObjectSVGExportMixin.mjs +0 -0
- package/dist/src/shapes/Object/FabricObjectSVGExportMixin.mjs.map +0 -0
- package/dist/src/shapes/Object/InteractiveObject.d.ts +0 -0
- package/dist/src/shapes/Object/InteractiveObject.d.ts.map +0 -0
- package/dist/src/shapes/Object/InteractiveObject.min.mjs +0 -0
- package/dist/src/shapes/Object/InteractiveObject.min.mjs.map +0 -0
- package/dist/src/shapes/Object/InteractiveObject.mjs +0 -0
- package/dist/src/shapes/Object/InteractiveObject.mjs.map +0 -0
- package/dist/src/shapes/Object/Object.d.ts +0 -0
- package/dist/src/shapes/Object/Object.d.ts.map +0 -0
- package/dist/src/shapes/Object/Object.min.mjs +0 -0
- package/dist/src/shapes/Object/Object.min.mjs.map +0 -0
- package/dist/src/shapes/Object/Object.mjs +0 -0
- package/dist/src/shapes/Object/Object.mjs.map +0 -0
- package/dist/src/shapes/Object/ObjectGeometry.d.ts +0 -0
- package/dist/src/shapes/Object/ObjectGeometry.d.ts.map +0 -0
- package/dist/src/shapes/Object/ObjectGeometry.min.mjs +0 -0
- package/dist/src/shapes/Object/ObjectGeometry.min.mjs.map +0 -0
- package/dist/src/shapes/Object/ObjectGeometry.mjs +0 -0
- package/dist/src/shapes/Object/ObjectGeometry.mjs.map +0 -0
- package/dist/src/shapes/Object/defaultValues.d.ts +0 -0
- package/dist/src/shapes/Object/defaultValues.d.ts.map +0 -0
- package/dist/src/shapes/Object/defaultValues.min.mjs +0 -0
- package/dist/src/shapes/Object/defaultValues.min.mjs.map +0 -0
- package/dist/src/shapes/Object/defaultValues.mjs +0 -0
- package/dist/src/shapes/Object/defaultValues.mjs.map +0 -0
- package/dist/src/shapes/Object/types/BaseProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/BaseProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/BorderProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/BorderProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/ControlProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/ControlProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/FabricObjectProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/FabricObjectProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/FillStrokeProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/FillStrokeProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/LockInteractionProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/LockInteractionProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/ObjectProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/ObjectProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/ObjectTransformProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/ObjectTransformProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/SerializedObjectProps.d.ts +0 -0
- package/dist/src/shapes/Object/types/SerializedObjectProps.d.ts.map +0 -0
- package/dist/src/shapes/Object/types/index.d.ts +0 -0
- package/dist/src/shapes/Object/types/index.d.ts.map +0 -0
- package/dist/src/shapes/Path.d.ts +0 -0
- package/dist/src/shapes/Path.d.ts.map +0 -0
- package/dist/src/shapes/Path.min.mjs +0 -0
- package/dist/src/shapes/Path.min.mjs.map +0 -0
- package/dist/src/shapes/Path.mjs +0 -0
- package/dist/src/shapes/Path.mjs.map +0 -0
- package/dist/src/shapes/Polygon.d.ts +0 -0
- package/dist/src/shapes/Polygon.d.ts.map +0 -0
- package/dist/src/shapes/Polygon.min.mjs +0 -0
- package/dist/src/shapes/Polygon.min.mjs.map +0 -0
- package/dist/src/shapes/Polygon.mjs +0 -0
- package/dist/src/shapes/Polygon.mjs.map +0 -0
- package/dist/src/shapes/Polyline.d.ts +0 -0
- package/dist/src/shapes/Polyline.d.ts.map +0 -0
- package/dist/src/shapes/Polyline.min.mjs +0 -0
- package/dist/src/shapes/Polyline.min.mjs.map +0 -0
- package/dist/src/shapes/Polyline.mjs +0 -0
- package/dist/src/shapes/Polyline.mjs.map +0 -0
- package/dist/src/shapes/Rect.d.ts +0 -0
- package/dist/src/shapes/Rect.d.ts.map +0 -0
- package/dist/src/shapes/Rect.min.mjs +0 -0
- package/dist/src/shapes/Rect.min.mjs.map +0 -0
- package/dist/src/shapes/Rect.mjs +0 -0
- package/dist/src/shapes/Rect.mjs.map +0 -0
- package/dist/src/shapes/Text/StyledText.d.ts +0 -0
- package/dist/src/shapes/Text/StyledText.d.ts.map +0 -0
- package/dist/src/shapes/Text/StyledText.min.mjs +0 -0
- package/dist/src/shapes/Text/StyledText.min.mjs.map +0 -0
- package/dist/src/shapes/Text/StyledText.mjs +0 -0
- package/dist/src/shapes/Text/StyledText.mjs.map +0 -0
- package/dist/src/shapes/Text/Text.d.ts +0 -0
- 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 +298 -294
- package/dist/src/shapes/Text/Text.mjs.map +1 -1
- package/dist/src/shapes/Text/TextSVGExportMixin.d.ts +0 -0
- package/dist/src/shapes/Text/TextSVGExportMixin.d.ts.map +0 -0
- package/dist/src/shapes/Text/TextSVGExportMixin.min.mjs +0 -0
- package/dist/src/shapes/Text/TextSVGExportMixin.min.mjs.map +0 -0
- package/dist/src/shapes/Text/TextSVGExportMixin.mjs +0 -0
- package/dist/src/shapes/Text/TextSVGExportMixin.mjs.map +0 -0
- package/dist/src/shapes/Text/constants.d.ts +1 -1
- package/dist/src/shapes/Text/constants.d.ts.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 +1 -1
- package/dist/src/shapes/Text/constants.mjs.map +1 -1
- package/dist/src/shapes/Textbox.d.ts +0 -0
- package/dist/src/shapes/Textbox.d.ts.map +0 -0
- package/dist/src/shapes/Textbox.min.mjs +0 -0
- package/dist/src/shapes/Textbox.min.mjs.map +1 -1
- package/dist/src/shapes/Textbox.mjs +168 -168
- package/dist/src/shapes/Textbox.mjs.map +1 -1
- package/dist/src/shapes/Triangle.d.ts +0 -0
- package/dist/src/shapes/Triangle.d.ts.map +0 -0
- package/dist/src/shapes/Triangle.min.mjs +0 -0
- package/dist/src/shapes/Triangle.min.mjs.map +0 -0
- package/dist/src/shapes/Triangle.mjs +0 -0
- package/dist/src/shapes/Triangle.mjs.map +0 -0
- package/dist/src/text/browserLines.d.ts +0 -0
- package/dist/src/text/browserLines.d.ts.map +0 -0
- package/dist/src/text/browserLines.min.mjs +0 -0
- package/dist/src/text/browserLines.min.mjs.map +1 -1
- package/dist/src/text/browserLines.mjs +20 -20
- package/dist/src/text/browserLines.mjs.map +1 -1
- package/dist/src/text/ellipsis.d.ts +0 -0
- package/dist/src/text/ellipsis.d.ts.map +0 -0
- package/dist/src/text/ellipsis.min.mjs +0 -0
- package/dist/src/text/ellipsis.min.mjs.map +1 -1
- package/dist/src/text/ellipsis.mjs +11 -11
- package/dist/src/text/ellipsis.mjs.map +1 -1
- package/dist/src/text/examples/arabicTextExample.d.ts +60 -0
- package/dist/src/text/examples/arabicTextExample.d.ts.map +1 -0
- package/dist/src/text/hitTest.d.ts +0 -0
- package/dist/src/text/hitTest.d.ts.map +0 -0
- package/dist/src/text/hitTest.min.mjs +0 -0
- package/dist/src/text/hitTest.min.mjs.map +1 -1
- package/dist/src/text/hitTest.mjs +19 -19
- package/dist/src/text/hitTest.mjs.map +1 -1
- package/dist/src/text/layout.d.ts +0 -0
- package/dist/src/text/layout.d.ts.map +0 -0
- package/dist/src/text/layout.min.mjs +0 -0
- package/dist/src/text/layout.min.mjs.map +1 -1
- package/dist/src/text/layout.mjs +33 -33
- package/dist/src/text/layout.mjs.map +1 -1
- package/dist/src/text/measure.d.ts +0 -0
- package/dist/src/text/measure.d.ts.map +0 -0
- package/dist/src/text/measure.min.mjs +0 -0
- package/dist/src/text/measure.min.mjs.map +1 -1
- package/dist/src/text/measure.mjs +30 -30
- package/dist/src/text/measure.mjs.map +1 -1
- package/dist/src/text/overlayEditor.d.ts +0 -0
- package/dist/src/text/overlayEditor.d.ts.map +0 -0
- package/dist/src/text/overlayEditor.min.mjs +0 -0
- package/dist/src/text/overlayEditor.min.mjs.map +1 -1
- package/dist/src/text/overlayEditor.mjs +33 -33
- package/dist/src/text/overlayEditor.mjs.map +1 -1
- package/dist/src/text/scriptUtils.d.ts +142 -0
- package/dist/src/text/scriptUtils.d.ts.map +1 -0
- package/dist/src/text/scriptUtils.min.mjs +2 -0
- package/dist/src/text/scriptUtils.min.mjs.map +1 -0
- package/dist/src/text/scriptUtils.mjs +212 -0
- package/dist/src/text/scriptUtils.mjs.map +1 -0
- package/dist/src/text/unicode.d.ts +0 -0
- package/dist/src/text/unicode.d.ts.map +0 -0
- package/dist/src/text/unicode.min.mjs +0 -0
- package/dist/src/text/unicode.min.mjs.map +1 -1
- package/dist/src/text/unicode.mjs +8 -8
- package/dist/src/text/unicode.mjs.map +1 -1
- package/dist/src/typedefs.d.ts +0 -0
- package/dist/src/typedefs.d.ts.map +0 -0
- package/dist/src/util/animation/AnimationBase.d.ts +0 -0
- package/dist/src/util/animation/AnimationBase.d.ts.map +0 -0
- package/dist/src/util/animation/AnimationBase.min.mjs +0 -0
- package/dist/src/util/animation/AnimationBase.min.mjs.map +0 -0
- package/dist/src/util/animation/AnimationBase.mjs +0 -0
- package/dist/src/util/animation/AnimationBase.mjs.map +0 -0
- package/dist/src/util/animation/AnimationFrameProvider.d.ts +0 -0
- package/dist/src/util/animation/AnimationFrameProvider.d.ts.map +0 -0
- package/dist/src/util/animation/AnimationFrameProvider.min.mjs +0 -0
- package/dist/src/util/animation/AnimationFrameProvider.min.mjs.map +0 -0
- package/dist/src/util/animation/AnimationFrameProvider.mjs +0 -0
- package/dist/src/util/animation/AnimationFrameProvider.mjs.map +0 -0
- package/dist/src/util/animation/AnimationRegistry.d.ts +0 -0
- package/dist/src/util/animation/AnimationRegistry.d.ts.map +0 -0
- package/dist/src/util/animation/AnimationRegistry.min.mjs +0 -0
- package/dist/src/util/animation/AnimationRegistry.min.mjs.map +0 -0
- package/dist/src/util/animation/AnimationRegistry.mjs +0 -0
- package/dist/src/util/animation/AnimationRegistry.mjs.map +0 -0
- package/dist/src/util/animation/ArrayAnimation.d.ts +0 -0
- package/dist/src/util/animation/ArrayAnimation.d.ts.map +0 -0
- package/dist/src/util/animation/ArrayAnimation.min.mjs +0 -0
- package/dist/src/util/animation/ArrayAnimation.min.mjs.map +0 -0
- package/dist/src/util/animation/ArrayAnimation.mjs +0 -0
- package/dist/src/util/animation/ArrayAnimation.mjs.map +0 -0
- package/dist/src/util/animation/ColorAnimation.d.ts +0 -0
- package/dist/src/util/animation/ColorAnimation.d.ts.map +0 -0
- package/dist/src/util/animation/ColorAnimation.min.mjs +0 -0
- package/dist/src/util/animation/ColorAnimation.min.mjs.map +0 -0
- package/dist/src/util/animation/ColorAnimation.mjs +0 -0
- package/dist/src/util/animation/ColorAnimation.mjs.map +0 -0
- package/dist/src/util/animation/ValueAnimation.d.ts +0 -0
- package/dist/src/util/animation/ValueAnimation.d.ts.map +0 -0
- package/dist/src/util/animation/ValueAnimation.min.mjs +0 -0
- package/dist/src/util/animation/ValueAnimation.min.mjs.map +0 -0
- package/dist/src/util/animation/ValueAnimation.mjs +0 -0
- package/dist/src/util/animation/ValueAnimation.mjs.map +0 -0
- package/dist/src/util/animation/animate.d.ts +0 -0
- package/dist/src/util/animation/animate.d.ts.map +0 -0
- package/dist/src/util/animation/animate.min.mjs +0 -0
- package/dist/src/util/animation/animate.min.mjs.map +0 -0
- package/dist/src/util/animation/animate.mjs +0 -0
- package/dist/src/util/animation/animate.mjs.map +0 -0
- package/dist/src/util/animation/easing.d.ts +0 -0
- package/dist/src/util/animation/easing.d.ts.map +0 -0
- package/dist/src/util/animation/easing.min.mjs +0 -0
- package/dist/src/util/animation/easing.min.mjs.map +0 -0
- package/dist/src/util/animation/easing.mjs +0 -0
- package/dist/src/util/animation/easing.mjs.map +0 -0
- package/dist/src/util/animation/index.d.ts +0 -0
- package/dist/src/util/animation/index.d.ts.map +0 -0
- package/dist/src/util/animation/types.d.ts +0 -0
- package/dist/src/util/animation/types.d.ts.map +0 -0
- package/dist/src/util/applyMixins.d.ts +0 -0
- package/dist/src/util/applyMixins.d.ts.map +0 -0
- package/dist/src/util/applyMixins.min.mjs +0 -0
- package/dist/src/util/applyMixins.min.mjs.map +0 -0
- package/dist/src/util/applyMixins.mjs +0 -0
- package/dist/src/util/applyMixins.mjs.map +0 -0
- package/dist/src/util/dom_event.d.ts +0 -0
- package/dist/src/util/dom_event.d.ts.map +0 -0
- package/dist/src/util/dom_event.min.mjs +0 -0
- package/dist/src/util/dom_event.min.mjs.map +0 -0
- package/dist/src/util/dom_event.mjs +0 -0
- package/dist/src/util/dom_event.mjs.map +0 -0
- package/dist/src/util/dom_misc.d.ts +0 -0
- package/dist/src/util/dom_misc.d.ts.map +0 -0
- package/dist/src/util/dom_misc.min.mjs +0 -0
- package/dist/src/util/dom_misc.min.mjs.map +0 -0
- package/dist/src/util/dom_misc.mjs +0 -0
- package/dist/src/util/dom_misc.mjs.map +0 -0
- package/dist/src/util/index.d.ts +0 -0
- package/dist/src/util/index.d.ts.map +0 -0
- package/dist/src/util/index.min.mjs +0 -0
- package/dist/src/util/index.min.mjs.map +0 -0
- package/dist/src/util/index.mjs +0 -0
- package/dist/src/util/index.mjs.map +0 -0
- package/dist/src/util/internals/applyCanvasTransform.d.ts +0 -0
- package/dist/src/util/internals/applyCanvasTransform.d.ts.map +0 -0
- package/dist/src/util/internals/applyCanvasTransform.min.mjs +0 -0
- package/dist/src/util/internals/applyCanvasTransform.min.mjs.map +0 -0
- package/dist/src/util/internals/applyCanvasTransform.mjs +0 -0
- package/dist/src/util/internals/applyCanvasTransform.mjs.map +0 -0
- package/dist/src/util/internals/cleanupSvgAttribute.d.ts +0 -0
- package/dist/src/util/internals/cleanupSvgAttribute.d.ts.map +0 -0
- package/dist/src/util/internals/cleanupSvgAttribute.min.mjs +0 -0
- package/dist/src/util/internals/cleanupSvgAttribute.min.mjs.map +0 -0
- package/dist/src/util/internals/cleanupSvgAttribute.mjs +0 -0
- package/dist/src/util/internals/cleanupSvgAttribute.mjs.map +0 -0
- package/dist/src/util/internals/cloneStyles.d.ts +0 -0
- package/dist/src/util/internals/cloneStyles.d.ts.map +0 -0
- package/dist/src/util/internals/cloneStyles.min.mjs +0 -0
- package/dist/src/util/internals/cloneStyles.min.mjs.map +0 -0
- package/dist/src/util/internals/cloneStyles.mjs +0 -0
- package/dist/src/util/internals/cloneStyles.mjs.map +0 -0
- package/dist/src/util/internals/console.d.ts +0 -0
- package/dist/src/util/internals/console.d.ts.map +0 -0
- package/dist/src/util/internals/console.min.mjs +0 -0
- package/dist/src/util/internals/console.min.mjs.map +0 -0
- package/dist/src/util/internals/console.mjs +0 -0
- package/dist/src/util/internals/console.mjs.map +0 -0
- package/dist/src/util/internals/dom_style.d.ts +0 -0
- package/dist/src/util/internals/dom_style.d.ts.map +0 -0
- package/dist/src/util/internals/dom_style.min.mjs +0 -0
- package/dist/src/util/internals/dom_style.min.mjs.map +0 -0
- package/dist/src/util/internals/dom_style.mjs +0 -0
- package/dist/src/util/internals/dom_style.mjs.map +0 -0
- package/dist/src/util/internals/findRight.d.ts +0 -0
- package/dist/src/util/internals/findRight.d.ts.map +0 -0
- package/dist/src/util/internals/findRight.min.mjs +0 -0
- package/dist/src/util/internals/findRight.min.mjs.map +0 -0
- package/dist/src/util/internals/findRight.mjs +0 -0
- package/dist/src/util/internals/findRight.mjs.map +0 -0
- package/dist/src/util/internals/getRandomInt.d.ts +0 -0
- package/dist/src/util/internals/getRandomInt.d.ts.map +0 -0
- package/dist/src/util/internals/getRandomInt.min.mjs +0 -0
- package/dist/src/util/internals/getRandomInt.min.mjs.map +0 -0
- package/dist/src/util/internals/getRandomInt.mjs +0 -0
- package/dist/src/util/internals/getRandomInt.mjs.map +0 -0
- package/dist/src/util/internals/ifNaN.d.ts +0 -0
- package/dist/src/util/internals/ifNaN.d.ts.map +0 -0
- package/dist/src/util/internals/ifNaN.min.mjs +0 -0
- package/dist/src/util/internals/ifNaN.min.mjs.map +0 -0
- package/dist/src/util/internals/ifNaN.mjs +0 -0
- package/dist/src/util/internals/ifNaN.mjs.map +0 -0
- package/dist/src/util/internals/removeFromArray.d.ts +0 -0
- package/dist/src/util/internals/removeFromArray.d.ts.map +0 -0
- package/dist/src/util/internals/removeFromArray.min.mjs +0 -0
- package/dist/src/util/internals/removeFromArray.min.mjs.map +0 -0
- package/dist/src/util/internals/removeFromArray.mjs +0 -0
- package/dist/src/util/internals/removeFromArray.mjs.map +0 -0
- package/dist/src/util/internals/uid.d.ts +0 -0
- package/dist/src/util/internals/uid.d.ts.map +0 -0
- package/dist/src/util/internals/uid.min.mjs +0 -0
- package/dist/src/util/internals/uid.min.mjs.map +0 -0
- package/dist/src/util/internals/uid.mjs +0 -0
- package/dist/src/util/internals/uid.mjs.map +0 -0
- package/dist/src/util/lang_string.d.ts +0 -0
- package/dist/src/util/lang_string.d.ts.map +0 -0
- package/dist/src/util/lang_string.min.mjs +0 -0
- package/dist/src/util/lang_string.min.mjs.map +0 -0
- package/dist/src/util/lang_string.mjs +0 -0
- package/dist/src/util/lang_string.mjs.map +0 -0
- package/dist/src/util/misc/boundingBoxFromPoints.d.ts +0 -0
- package/dist/src/util/misc/boundingBoxFromPoints.d.ts.map +0 -0
- package/dist/src/util/misc/boundingBoxFromPoints.min.mjs +0 -0
- package/dist/src/util/misc/boundingBoxFromPoints.min.mjs.map +0 -0
- package/dist/src/util/misc/boundingBoxFromPoints.mjs +0 -0
- package/dist/src/util/misc/boundingBoxFromPoints.mjs.map +0 -0
- package/dist/src/util/misc/capValue.d.ts +0 -0
- package/dist/src/util/misc/capValue.d.ts.map +0 -0
- package/dist/src/util/misc/capValue.min.mjs +0 -0
- package/dist/src/util/misc/capValue.min.mjs.map +0 -0
- package/dist/src/util/misc/capValue.mjs +0 -0
- package/dist/src/util/misc/capValue.mjs.map +0 -0
- package/dist/src/util/misc/cornerRadius.d.ts +0 -0
- package/dist/src/util/misc/cornerRadius.d.ts.map +0 -0
- package/dist/src/util/misc/cornerRadius.min.mjs +0 -0
- package/dist/src/util/misc/cornerRadius.min.mjs.map +0 -0
- package/dist/src/util/misc/cornerRadius.mjs +0 -0
- package/dist/src/util/misc/cornerRadius.mjs.map +0 -0
- package/dist/src/util/misc/cos.d.ts +0 -0
- package/dist/src/util/misc/cos.d.ts.map +0 -0
- package/dist/src/util/misc/cos.min.mjs +0 -0
- package/dist/src/util/misc/cos.min.mjs.map +0 -0
- package/dist/src/util/misc/cos.mjs +0 -0
- package/dist/src/util/misc/cos.mjs.map +0 -0
- package/dist/src/util/misc/dom.d.ts +0 -0
- package/dist/src/util/misc/dom.d.ts.map +0 -0
- package/dist/src/util/misc/dom.min.mjs +0 -0
- package/dist/src/util/misc/dom.min.mjs.map +0 -0
- package/dist/src/util/misc/dom.mjs +0 -0
- package/dist/src/util/misc/dom.mjs.map +0 -0
- package/dist/src/util/misc/findScaleTo.d.ts +0 -0
- package/dist/src/util/misc/findScaleTo.d.ts.map +0 -0
- package/dist/src/util/misc/findScaleTo.min.mjs +0 -0
- package/dist/src/util/misc/findScaleTo.min.mjs.map +0 -0
- package/dist/src/util/misc/findScaleTo.mjs +0 -0
- package/dist/src/util/misc/findScaleTo.mjs.map +0 -0
- package/dist/src/util/misc/groupSVGElements.d.ts +0 -0
- package/dist/src/util/misc/groupSVGElements.d.ts.map +0 -0
- package/dist/src/util/misc/groupSVGElements.min.mjs +0 -0
- package/dist/src/util/misc/groupSVGElements.min.mjs.map +0 -0
- package/dist/src/util/misc/groupSVGElements.mjs +0 -0
- package/dist/src/util/misc/groupSVGElements.mjs.map +0 -0
- package/dist/src/util/misc/isTransparent.d.ts +0 -0
- package/dist/src/util/misc/isTransparent.d.ts.map +0 -0
- package/dist/src/util/misc/isTransparent.min.mjs +0 -0
- package/dist/src/util/misc/isTransparent.min.mjs.map +0 -0
- package/dist/src/util/misc/isTransparent.mjs +0 -0
- package/dist/src/util/misc/isTransparent.mjs.map +0 -0
- package/dist/src/util/misc/matrix.d.ts +0 -0
- package/dist/src/util/misc/matrix.d.ts.map +0 -0
- package/dist/src/util/misc/matrix.min.mjs +0 -0
- package/dist/src/util/misc/matrix.min.mjs.map +0 -0
- package/dist/src/util/misc/matrix.mjs +0 -0
- package/dist/src/util/misc/matrix.mjs.map +0 -0
- package/dist/src/util/misc/mergeClipPaths.d.ts +0 -0
- package/dist/src/util/misc/mergeClipPaths.d.ts.map +0 -0
- package/dist/src/util/misc/mergeClipPaths.min.mjs +0 -0
- package/dist/src/util/misc/mergeClipPaths.min.mjs.map +0 -0
- package/dist/src/util/misc/mergeClipPaths.mjs +0 -0
- package/dist/src/util/misc/mergeClipPaths.mjs.map +0 -0
- package/dist/src/util/misc/objectEnlive.d.ts +0 -0
- package/dist/src/util/misc/objectEnlive.d.ts.map +0 -0
- package/dist/src/util/misc/objectEnlive.min.mjs +0 -0
- package/dist/src/util/misc/objectEnlive.min.mjs.map +0 -0
- package/dist/src/util/misc/objectEnlive.mjs +0 -0
- package/dist/src/util/misc/objectEnlive.mjs.map +0 -0
- package/dist/src/util/misc/objectTransforms.d.ts +0 -0
- package/dist/src/util/misc/objectTransforms.d.ts.map +0 -0
- package/dist/src/util/misc/objectTransforms.min.mjs +0 -0
- package/dist/src/util/misc/objectTransforms.min.mjs.map +0 -0
- package/dist/src/util/misc/objectTransforms.mjs +0 -0
- package/dist/src/util/misc/objectTransforms.mjs.map +0 -0
- package/dist/src/util/misc/pick.d.ts +0 -0
- package/dist/src/util/misc/pick.d.ts.map +0 -0
- package/dist/src/util/misc/pick.min.mjs +0 -0
- package/dist/src/util/misc/pick.min.mjs.map +0 -0
- package/dist/src/util/misc/pick.mjs +0 -0
- package/dist/src/util/misc/pick.mjs.map +0 -0
- package/dist/src/util/misc/planeChange.d.ts +0 -0
- package/dist/src/util/misc/planeChange.d.ts.map +0 -0
- package/dist/src/util/misc/planeChange.min.mjs +0 -0
- package/dist/src/util/misc/planeChange.min.mjs.map +0 -0
- package/dist/src/util/misc/planeChange.mjs +0 -0
- package/dist/src/util/misc/planeChange.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.d.ts +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.d.ts.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.min.mjs +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.min.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.mjs +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.d.ts +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.d.ts.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.min.mjs +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.min.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.mjs +0 -0
- package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.d.ts +0 -0
- package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.d.ts.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.min.mjs +0 -0
- package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.min.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.mjs +0 -0
- package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/index.d.ts +0 -0
- package/dist/src/util/misc/projectStroke/index.d.ts.map +0 -0
- package/dist/src/util/misc/projectStroke/index.min.mjs +0 -0
- package/dist/src/util/misc/projectStroke/index.min.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/index.mjs +0 -0
- package/dist/src/util/misc/projectStroke/index.mjs.map +0 -0
- package/dist/src/util/misc/projectStroke/types.d.ts +0 -0
- package/dist/src/util/misc/projectStroke/types.d.ts.map +0 -0
- package/dist/src/util/misc/radiansDegreesConversion.d.ts +0 -0
- package/dist/src/util/misc/radiansDegreesConversion.d.ts.map +0 -0
- package/dist/src/util/misc/radiansDegreesConversion.min.mjs +0 -0
- package/dist/src/util/misc/radiansDegreesConversion.min.mjs.map +0 -0
- package/dist/src/util/misc/radiansDegreesConversion.mjs +0 -0
- package/dist/src/util/misc/radiansDegreesConversion.mjs.map +0 -0
- package/dist/src/util/misc/resolveOrigin.d.ts +0 -0
- package/dist/src/util/misc/resolveOrigin.d.ts.map +0 -0
- package/dist/src/util/misc/resolveOrigin.min.mjs +0 -0
- package/dist/src/util/misc/resolveOrigin.min.mjs.map +0 -0
- package/dist/src/util/misc/resolveOrigin.mjs +0 -0
- package/dist/src/util/misc/resolveOrigin.mjs.map +0 -0
- package/dist/src/util/misc/sin.d.ts +0 -0
- package/dist/src/util/misc/sin.d.ts.map +0 -0
- package/dist/src/util/misc/sin.min.mjs +0 -0
- package/dist/src/util/misc/sin.min.mjs.map +0 -0
- package/dist/src/util/misc/sin.mjs +0 -0
- package/dist/src/util/misc/sin.mjs.map +0 -0
- package/dist/src/util/misc/svgExport.d.ts +0 -0
- package/dist/src/util/misc/svgExport.d.ts.map +0 -0
- package/dist/src/util/misc/svgExport.min.mjs +0 -0
- package/dist/src/util/misc/svgExport.min.mjs.map +0 -0
- package/dist/src/util/misc/svgExport.mjs +0 -0
- package/dist/src/util/misc/svgExport.mjs.map +0 -0
- package/dist/src/util/misc/svgParsing.d.ts +0 -0
- package/dist/src/util/misc/svgParsing.d.ts.map +0 -0
- package/dist/src/util/misc/svgParsing.min.mjs +0 -0
- package/dist/src/util/misc/svgParsing.min.mjs.map +0 -0
- package/dist/src/util/misc/svgParsing.mjs +0 -0
- package/dist/src/util/misc/svgParsing.mjs.map +0 -0
- package/dist/src/util/misc/textStyles.d.ts +0 -0
- package/dist/src/util/misc/textStyles.d.ts.map +0 -0
- package/dist/src/util/misc/textStyles.min.mjs +0 -0
- package/dist/src/util/misc/textStyles.min.mjs.map +0 -0
- package/dist/src/util/misc/textStyles.mjs +0 -0
- package/dist/src/util/misc/textStyles.mjs.map +0 -0
- package/dist/src/util/misc/toFixed.d.ts +0 -0
- package/dist/src/util/misc/toFixed.d.ts.map +0 -0
- package/dist/src/util/misc/toFixed.min.mjs +0 -0
- package/dist/src/util/misc/toFixed.min.mjs.map +0 -0
- package/dist/src/util/misc/toFixed.mjs +0 -0
- package/dist/src/util/misc/toFixed.mjs.map +0 -0
- package/dist/src/util/misc/vectors.d.ts +0 -0
- package/dist/src/util/misc/vectors.d.ts.map +0 -0
- package/dist/src/util/misc/vectors.min.mjs +0 -0
- package/dist/src/util/misc/vectors.min.mjs.map +0 -0
- package/dist/src/util/misc/vectors.mjs +0 -0
- package/dist/src/util/misc/vectors.mjs.map +0 -0
- package/dist/src/util/path/index.d.ts +0 -0
- package/dist/src/util/path/index.d.ts.map +0 -0
- package/dist/src/util/path/index.min.mjs +0 -0
- package/dist/src/util/path/index.min.mjs.map +0 -0
- package/dist/src/util/path/index.mjs +0 -0
- package/dist/src/util/path/index.mjs.map +0 -0
- package/dist/src/util/path/regex.d.ts +0 -0
- package/dist/src/util/path/regex.d.ts.map +0 -0
- package/dist/src/util/path/regex.min.mjs +0 -0
- package/dist/src/util/path/regex.min.mjs.map +0 -0
- package/dist/src/util/path/regex.mjs +0 -0
- package/dist/src/util/path/regex.mjs.map +0 -0
- package/dist/src/util/path/typechecks.d.ts +0 -0
- package/dist/src/util/path/typechecks.d.ts.map +0 -0
- package/dist/src/util/path/typedefs.d.ts +0 -0
- package/dist/src/util/path/typedefs.d.ts.map +0 -0
- package/dist/src/util/transform_matrix_removal.d.ts +0 -0
- package/dist/src/util/transform_matrix_removal.d.ts.map +0 -0
- package/dist/src/util/transform_matrix_removal.min.mjs +0 -0
- package/dist/src/util/transform_matrix_removal.min.mjs.map +0 -0
- package/dist/src/util/transform_matrix_removal.mjs +0 -0
- package/dist/src/util/transform_matrix_removal.mjs.map +0 -0
- package/dist/src/util/typeAssertions.d.ts +0 -0
- package/dist/src/util/typeAssertions.d.ts.map +0 -0
- package/dist/src/util/typeAssertions.min.mjs +0 -0
- package/dist/src/util/typeAssertions.min.mjs.map +0 -0
- package/dist/src/util/typeAssertions.mjs +0 -0
- package/dist/src/util/typeAssertions.mjs.map +0 -0
- package/dist-extensions/aligning_guidelines/constant.mjs +0 -0
- package/dist-extensions/aligning_guidelines/constant.mjs.map +0 -0
- package/dist-extensions/aligning_guidelines/index.mjs +0 -0
- package/dist-extensions/aligning_guidelines/index.mjs.map +0 -0
- package/dist-extensions/aligning_guidelines/util/basic.mjs +0 -0
- package/dist-extensions/aligning_guidelines/util/basic.mjs.map +0 -0
- package/dist-extensions/aligning_guidelines/util/collect-line.mjs +0 -0
- package/dist-extensions/aligning_guidelines/util/collect-line.mjs.map +0 -0
- package/dist-extensions/aligning_guidelines/util/collect-point.mjs +0 -0
- package/dist-extensions/aligning_guidelines/util/collect-point.mjs.map +0 -0
- package/dist-extensions/aligning_guidelines/util/draw.mjs +0 -0
- package/dist-extensions/aligning_guidelines/util/draw.mjs.map +0 -0
- package/dist-extensions/aligning_guidelines/util/get-objects-by-target.mjs +0 -0
- package/dist-extensions/aligning_guidelines/util/get-objects-by-target.mjs.map +0 -0
- package/dist-extensions/data_updaters/gradient/index.mjs +0 -0
- package/dist-extensions/data_updaters/gradient/index.mjs.map +0 -0
- package/dist-extensions/data_updaters/origins/index.mjs +0 -0
- package/dist-extensions/data_updaters/origins/index.mjs.map +0 -0
- package/dist-extensions/extensions/aligning_guidelines/constant.d.ts +0 -0
- package/dist-extensions/extensions/aligning_guidelines/constant.d.ts.map +0 -0
- package/dist-extensions/extensions/aligning_guidelines/index.d.ts +0 -0
- package/dist-extensions/extensions/aligning_guidelines/index.d.ts.map +0 -0
- package/dist-extensions/extensions/aligning_guidelines/typedefs.d.ts +0 -0
- package/dist-extensions/extensions/aligning_guidelines/typedefs.d.ts.map +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/basic.d.ts +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/basic.d.ts.map +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/collect-line.d.ts +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/collect-line.d.ts.map +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/collect-point.d.ts +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/collect-point.d.ts.map +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/draw.d.ts +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/draw.d.ts.map +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/get-objects-by-target.d.ts +0 -0
- package/dist-extensions/extensions/aligning_guidelines/util/get-objects-by-target.d.ts.map +0 -0
- package/dist-extensions/extensions/data_updaters/gradient/index.d.ts +0 -0
- package/dist-extensions/extensions/data_updaters/gradient/index.d.ts.map +0 -0
- package/dist-extensions/extensions/data_updaters/origins/index.d.ts +0 -0
- package/dist-extensions/extensions/data_updaters/origins/index.d.ts.map +0 -0
- package/dist-extensions/extensions/index.d.ts +0 -0
- package/dist-extensions/extensions/index.d.ts.map +0 -0
- package/dist-extensions/fabric-extensions.min.js +0 -0
- package/dist-extensions/fabric-extensions.min.js.map +0 -0
- package/dist-extensions/fabric.d.ts +0 -0
- package/dist-extensions/fabric.d.ts.map +0 -0
- package/dist-extensions/index.d.ts +0 -0
- package/dist-extensions/index.d.ts.map +0 -0
- package/dist-extensions/index.mjs +0 -0
- package/dist-extensions/index.mjs.map +0 -0
- package/dist-extensions/src/ClassRegistry.d.ts +0 -0
- package/dist-extensions/src/ClassRegistry.d.ts.map +0 -0
- package/dist-extensions/src/Collection.d.ts +0 -0
- package/dist-extensions/src/Collection.d.ts.map +0 -0
- package/dist-extensions/src/CommonMethods.d.ts +0 -0
- package/dist-extensions/src/CommonMethods.d.ts.map +0 -0
- package/dist-extensions/src/EventTypeDefs.d.ts +0 -0
- package/dist-extensions/src/EventTypeDefs.d.ts.map +0 -0
- package/dist-extensions/src/Intersection.d.ts +0 -0
- package/dist-extensions/src/Intersection.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/ActiveSelectionLayoutManager.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/ActiveSelectionLayoutManager.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/LayoutManager.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/LayoutManager.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/ClipPathLayout.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/ClipPathLayout.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/FitContentLayout.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/FitContentLayout.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/FixedLayout.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/FixedLayout.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/LayoutStrategy.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/LayoutStrategy.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/utils.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/LayoutStrategies/utils.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/constants.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/constants.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/index.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/index.d.ts.map +0 -0
- package/dist-extensions/src/LayoutManager/types.d.ts +0 -0
- package/dist-extensions/src/LayoutManager/types.d.ts.map +0 -0
- package/dist-extensions/src/Observable.d.ts +0 -0
- package/dist-extensions/src/Observable.d.ts.map +0 -0
- package/dist-extensions/src/Pattern/Pattern.d.ts +0 -0
- package/dist-extensions/src/Pattern/Pattern.d.ts.map +0 -0
- package/dist-extensions/src/Pattern/index.d.ts +0 -0
- package/dist-extensions/src/Pattern/index.d.ts.map +0 -0
- package/dist-extensions/src/Pattern/types.d.ts +0 -0
- package/dist-extensions/src/Pattern/types.d.ts.map +0 -0
- package/dist-extensions/src/Point.d.ts +0 -0
- package/dist-extensions/src/Point.d.ts.map +0 -0
- package/dist-extensions/src/Shadow.d.ts +0 -0
- package/dist-extensions/src/Shadow.d.ts.map +0 -0
- package/dist-extensions/src/brushes/BaseBrush.d.ts +0 -0
- package/dist-extensions/src/brushes/BaseBrush.d.ts.map +0 -0
- package/dist-extensions/src/brushes/CircleBrush.d.ts +0 -0
- package/dist-extensions/src/brushes/CircleBrush.d.ts.map +0 -0
- package/dist-extensions/src/brushes/PatternBrush.d.ts +0 -0
- package/dist-extensions/src/brushes/PatternBrush.d.ts.map +0 -0
- package/dist-extensions/src/brushes/PencilBrush.d.ts +0 -0
- package/dist-extensions/src/brushes/PencilBrush.d.ts.map +0 -0
- package/dist-extensions/src/brushes/SprayBrush.d.ts +0 -0
- package/dist-extensions/src/brushes/SprayBrush.d.ts.map +0 -0
- package/dist-extensions/src/brushes/typedefs.d.ts +0 -0
- package/dist-extensions/src/brushes/typedefs.d.ts.map +0 -0
- package/dist-extensions/src/cache.d.ts +0 -0
- package/dist-extensions/src/cache.d.ts.map +0 -0
- package/dist-extensions/src/canvas/Canvas.d.ts +0 -0
- package/dist-extensions/src/canvas/Canvas.d.ts.map +0 -0
- package/dist-extensions/src/canvas/CanvasOptions.d.ts +0 -0
- package/dist-extensions/src/canvas/CanvasOptions.d.ts.map +0 -0
- package/dist-extensions/src/canvas/DOMManagers/CanvasDOMManager.d.ts +0 -0
- package/dist-extensions/src/canvas/DOMManagers/CanvasDOMManager.d.ts.map +0 -0
- package/dist-extensions/src/canvas/DOMManagers/StaticCanvasDOMManager.d.ts +0 -0
- package/dist-extensions/src/canvas/DOMManagers/StaticCanvasDOMManager.d.ts.map +0 -0
- package/dist-extensions/src/canvas/DOMManagers/util.d.ts +0 -0
- package/dist-extensions/src/canvas/DOMManagers/util.d.ts.map +0 -0
- package/dist-extensions/src/canvas/SelectableCanvas.d.ts +0 -0
- package/dist-extensions/src/canvas/SelectableCanvas.d.ts.map +0 -0
- package/dist-extensions/src/canvas/StaticCanvas.d.ts +0 -0
- package/dist-extensions/src/canvas/StaticCanvas.d.ts.map +0 -0
- package/dist-extensions/src/canvas/StaticCanvasOptions.d.ts +0 -0
- package/dist-extensions/src/canvas/StaticCanvasOptions.d.ts.map +0 -0
- package/dist-extensions/src/canvas/TextEditingManager.d.ts +0 -0
- package/dist-extensions/src/canvas/TextEditingManager.d.ts.map +0 -0
- package/dist-extensions/src/color/Color.d.ts +0 -0
- package/dist-extensions/src/color/Color.d.ts.map +0 -0
- package/dist-extensions/src/color/color_map.d.ts +0 -0
- package/dist-extensions/src/color/color_map.d.ts.map +0 -0
- package/dist-extensions/src/color/constants.d.ts +0 -0
- package/dist-extensions/src/color/constants.d.ts.map +0 -0
- package/dist-extensions/src/color/typedefs.d.ts +0 -0
- package/dist-extensions/src/color/typedefs.d.ts.map +0 -0
- package/dist-extensions/src/color/util.d.ts +0 -0
- package/dist-extensions/src/color/util.d.ts.map +0 -0
- package/dist-extensions/src/config.d.ts +0 -0
- package/dist-extensions/src/config.d.ts.map +0 -0
- package/dist-extensions/src/constants.d.ts +0 -0
- package/dist-extensions/src/constants.d.ts.map +0 -0
- package/dist-extensions/src/controls/Control.d.ts +0 -0
- package/dist-extensions/src/controls/Control.d.ts.map +0 -0
- package/dist-extensions/src/controls/changeHeight.d.ts +0 -0
- package/dist-extensions/src/controls/changeHeight.d.ts.map +0 -0
- package/dist-extensions/src/controls/changeWidth.d.ts +0 -0
- package/dist-extensions/src/controls/changeWidth.d.ts.map +0 -0
- package/dist-extensions/src/controls/commonControls.d.ts +0 -0
- package/dist-extensions/src/controls/commonControls.d.ts.map +0 -0
- package/dist-extensions/src/controls/controlRendering.d.ts +0 -0
- package/dist-extensions/src/controls/controlRendering.d.ts.map +0 -0
- package/dist-extensions/src/controls/drag.d.ts +0 -0
- package/dist-extensions/src/controls/drag.d.ts.map +0 -0
- package/dist-extensions/src/controls/fireEvent.d.ts +0 -0
- package/dist-extensions/src/controls/fireEvent.d.ts.map +0 -0
- package/dist-extensions/src/controls/index.d.ts +0 -0
- package/dist-extensions/src/controls/index.d.ts.map +0 -0
- package/dist-extensions/src/controls/pathControl.d.ts +0 -0
- package/dist-extensions/src/controls/pathControl.d.ts.map +0 -0
- package/dist-extensions/src/controls/polyControl.d.ts +0 -0
- package/dist-extensions/src/controls/polyControl.d.ts.map +0 -0
- package/dist-extensions/src/controls/rotate.d.ts +0 -0
- package/dist-extensions/src/controls/rotate.d.ts.map +0 -0
- package/dist-extensions/src/controls/scale.d.ts +0 -0
- package/dist-extensions/src/controls/scale.d.ts.map +0 -0
- package/dist-extensions/src/controls/scaleSkew.d.ts +0 -0
- package/dist-extensions/src/controls/scaleSkew.d.ts.map +0 -0
- package/dist-extensions/src/controls/skew.d.ts +0 -0
- package/dist-extensions/src/controls/skew.d.ts.map +0 -0
- package/dist-extensions/src/controls/util.d.ts +0 -0
- package/dist-extensions/src/controls/util.d.ts.map +0 -0
- package/dist-extensions/src/controls/wrapWithFireEvent.d.ts +0 -0
- package/dist-extensions/src/controls/wrapWithFireEvent.d.ts.map +0 -0
- package/dist-extensions/src/controls/wrapWithFixedAnchor.d.ts +0 -0
- package/dist-extensions/src/controls/wrapWithFixedAnchor.d.ts.map +0 -0
- package/dist-extensions/src/env/browser.d.ts +0 -0
- package/dist-extensions/src/env/browser.d.ts.map +0 -0
- package/dist-extensions/src/env/index.d.ts +0 -0
- package/dist-extensions/src/env/index.d.ts.map +0 -0
- package/dist-extensions/src/env/types.d.ts +0 -0
- package/dist-extensions/src/env/types.d.ts.map +0 -0
- package/dist-extensions/src/filters/BaseFilter.d.ts +0 -0
- package/dist-extensions/src/filters/BaseFilter.d.ts.map +0 -0
- package/dist-extensions/src/filters/BlendColor.d.ts +0 -0
- package/dist-extensions/src/filters/BlendColor.d.ts.map +0 -0
- package/dist-extensions/src/filters/BlendImage.d.ts +0 -0
- package/dist-extensions/src/filters/BlendImage.d.ts.map +0 -0
- package/dist-extensions/src/filters/Blur.d.ts +0 -0
- package/dist-extensions/src/filters/Blur.d.ts.map +0 -0
- package/dist-extensions/src/filters/Brightness.d.ts +0 -0
- package/dist-extensions/src/filters/Brightness.d.ts.map +0 -0
- package/dist-extensions/src/filters/Canvas2dFilterBackend.d.ts +0 -0
- package/dist-extensions/src/filters/Canvas2dFilterBackend.d.ts.map +0 -0
- package/dist-extensions/src/filters/ColorMatrix.d.ts +0 -0
- package/dist-extensions/src/filters/ColorMatrix.d.ts.map +0 -0
- package/dist-extensions/src/filters/ColorMatrixFilters.d.ts +0 -0
- package/dist-extensions/src/filters/ColorMatrixFilters.d.ts.map +0 -0
- package/dist-extensions/src/filters/Composed.d.ts +0 -0
- package/dist-extensions/src/filters/Composed.d.ts.map +0 -0
- package/dist-extensions/src/filters/Contrast.d.ts +0 -0
- package/dist-extensions/src/filters/Contrast.d.ts.map +0 -0
- package/dist-extensions/src/filters/Convolute.d.ts +0 -0
- package/dist-extensions/src/filters/Convolute.d.ts.map +0 -0
- package/dist-extensions/src/filters/FilterBackend.d.ts +0 -0
- package/dist-extensions/src/filters/FilterBackend.d.ts.map +0 -0
- package/dist-extensions/src/filters/GLProbes/GLProbe.d.ts +0 -0
- package/dist-extensions/src/filters/GLProbes/GLProbe.d.ts.map +0 -0
- package/dist-extensions/src/filters/GLProbes/WebGLProbe.d.ts +0 -0
- package/dist-extensions/src/filters/GLProbes/WebGLProbe.d.ts.map +0 -0
- package/dist-extensions/src/filters/Gamma.d.ts +0 -0
- package/dist-extensions/src/filters/Gamma.d.ts.map +0 -0
- package/dist-extensions/src/filters/Grayscale.d.ts +0 -0
- package/dist-extensions/src/filters/Grayscale.d.ts.map +0 -0
- package/dist-extensions/src/filters/HueRotation.d.ts +0 -0
- package/dist-extensions/src/filters/HueRotation.d.ts.map +0 -0
- package/dist-extensions/src/filters/Invert.d.ts +0 -0
- package/dist-extensions/src/filters/Invert.d.ts.map +0 -0
- package/dist-extensions/src/filters/Noise.d.ts +0 -0
- package/dist-extensions/src/filters/Noise.d.ts.map +0 -0
- package/dist-extensions/src/filters/Pixelate.d.ts +0 -0
- package/dist-extensions/src/filters/Pixelate.d.ts.map +0 -0
- package/dist-extensions/src/filters/RemoveColor.d.ts +0 -0
- package/dist-extensions/src/filters/RemoveColor.d.ts.map +0 -0
- package/dist-extensions/src/filters/Resize.d.ts +0 -0
- package/dist-extensions/src/filters/Resize.d.ts.map +0 -0
- package/dist-extensions/src/filters/Saturation.d.ts +0 -0
- package/dist-extensions/src/filters/Saturation.d.ts.map +0 -0
- package/dist-extensions/src/filters/Vibrance.d.ts +0 -0
- package/dist-extensions/src/filters/Vibrance.d.ts.map +0 -0
- package/dist-extensions/src/filters/WebGLFilterBackend.d.ts +0 -0
- package/dist-extensions/src/filters/WebGLFilterBackend.d.ts.map +0 -0
- package/dist-extensions/src/filters/filters.d.ts +0 -0
- package/dist-extensions/src/filters/filters.d.ts.map +0 -0
- package/dist-extensions/src/filters/index.d.ts +0 -0
- package/dist-extensions/src/filters/index.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/baseFilter.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/baseFilter.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/blendColor.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/blendColor.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/blendImage.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/blendImage.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/blur.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/blur.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/brightness.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/brightness.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/colorMatrix.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/colorMatrix.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/constrast.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/constrast.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/convolute.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/convolute.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/gamma.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/gamma.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/grayscale.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/grayscale.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/invert.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/invert.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/noise.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/noise.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/pixelate.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/pixelate.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/removeColor.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/removeColor.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/saturation.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/saturation.d.ts.map +0 -0
- package/dist-extensions/src/filters/shaders/vibrance.d.ts +0 -0
- package/dist-extensions/src/filters/shaders/vibrance.d.ts.map +0 -0
- package/dist-extensions/src/filters/typedefs.d.ts +0 -0
- package/dist-extensions/src/filters/typedefs.d.ts.map +0 -0
- package/dist-extensions/src/filters/utils.d.ts +0 -0
- package/dist-extensions/src/filters/utils.d.ts.map +0 -0
- package/dist-extensions/src/gradient/Gradient.d.ts +0 -0
- package/dist-extensions/src/gradient/Gradient.d.ts.map +0 -0
- package/dist-extensions/src/gradient/constants.d.ts +0 -0
- package/dist-extensions/src/gradient/constants.d.ts.map +0 -0
- package/dist-extensions/src/gradient/index.d.ts +0 -0
- package/dist-extensions/src/gradient/index.d.ts.map +0 -0
- package/dist-extensions/src/gradient/parser/misc.d.ts +0 -0
- package/dist-extensions/src/gradient/parser/misc.d.ts.map +0 -0
- package/dist-extensions/src/gradient/parser/parseColorStops.d.ts +0 -0
- package/dist-extensions/src/gradient/parser/parseColorStops.d.ts.map +0 -0
- package/dist-extensions/src/gradient/parser/parseCoords.d.ts +0 -0
- package/dist-extensions/src/gradient/parser/parseCoords.d.ts.map +0 -0
- package/dist-extensions/src/gradient/typedefs.d.ts +0 -0
- package/dist-extensions/src/gradient/typedefs.d.ts.map +0 -0
- package/dist-extensions/src/parser/applyViewboxTransform.d.ts +0 -0
- package/dist-extensions/src/parser/applyViewboxTransform.d.ts.map +0 -0
- package/dist-extensions/src/parser/attributes.d.ts +0 -0
- package/dist-extensions/src/parser/attributes.d.ts.map +0 -0
- package/dist-extensions/src/parser/constants.d.ts +0 -0
- package/dist-extensions/src/parser/constants.d.ts.map +0 -0
- package/dist-extensions/src/parser/doesSomeParentMatch.d.ts +0 -0
- package/dist-extensions/src/parser/doesSomeParentMatch.d.ts.map +0 -0
- package/dist-extensions/src/parser/elementMatchesRule.d.ts +0 -0
- package/dist-extensions/src/parser/elementMatchesRule.d.ts.map +0 -0
- package/dist-extensions/src/parser/elements_parser.d.ts +0 -0
- package/dist-extensions/src/parser/elements_parser.d.ts.map +0 -0
- package/dist-extensions/src/parser/getCSSRules.d.ts +0 -0
- package/dist-extensions/src/parser/getCSSRules.d.ts.map +0 -0
- package/dist-extensions/src/parser/getGlobalStylesForElement.d.ts +0 -0
- package/dist-extensions/src/parser/getGlobalStylesForElement.d.ts.map +0 -0
- package/dist-extensions/src/parser/getGradientDefs.d.ts +0 -0
- package/dist-extensions/src/parser/getGradientDefs.d.ts.map +0 -0
- package/dist-extensions/src/parser/getMultipleNodes.d.ts +0 -0
- package/dist-extensions/src/parser/getMultipleNodes.d.ts.map +0 -0
- package/dist-extensions/src/parser/getSvgRegex.d.ts +0 -0
- package/dist-extensions/src/parser/getSvgRegex.d.ts.map +0 -0
- package/dist-extensions/src/parser/getTagName.d.ts +0 -0
- package/dist-extensions/src/parser/getTagName.d.ts.map +0 -0
- package/dist-extensions/src/parser/hasInvalidAncestor.d.ts +0 -0
- package/dist-extensions/src/parser/hasInvalidAncestor.d.ts.map +0 -0
- package/dist-extensions/src/parser/loadSVGFromString.d.ts +0 -0
- package/dist-extensions/src/parser/loadSVGFromString.d.ts.map +0 -0
- package/dist-extensions/src/parser/loadSVGFromURL.d.ts +0 -0
- package/dist-extensions/src/parser/loadSVGFromURL.d.ts.map +0 -0
- package/dist-extensions/src/parser/normalizeAttr.d.ts +0 -0
- package/dist-extensions/src/parser/normalizeAttr.d.ts.map +0 -0
- package/dist-extensions/src/parser/normalizeValue.d.ts +0 -0
- package/dist-extensions/src/parser/normalizeValue.d.ts.map +0 -0
- package/dist-extensions/src/parser/parseAttributes.d.ts +0 -0
- package/dist-extensions/src/parser/parseAttributes.d.ts.map +0 -0
- package/dist-extensions/src/parser/parseFontDeclaration.d.ts +0 -0
- package/dist-extensions/src/parser/parseFontDeclaration.d.ts.map +0 -0
- package/dist-extensions/src/parser/parsePointsAttribute.d.ts +0 -0
- package/dist-extensions/src/parser/parsePointsAttribute.d.ts.map +0 -0
- package/dist-extensions/src/parser/parseSVGDocument.d.ts +0 -0
- package/dist-extensions/src/parser/parseSVGDocument.d.ts.map +0 -0
- package/dist-extensions/src/parser/parseStyleAttribute.d.ts +0 -0
- package/dist-extensions/src/parser/parseStyleAttribute.d.ts.map +0 -0
- package/dist-extensions/src/parser/parseStyleObject.d.ts +0 -0
- package/dist-extensions/src/parser/parseStyleObject.d.ts.map +0 -0
- package/dist-extensions/src/parser/parseStyleString.d.ts +0 -0
- package/dist-extensions/src/parser/parseStyleString.d.ts.map +0 -0
- package/dist-extensions/src/parser/parseTransformAttribute.d.ts +0 -0
- package/dist-extensions/src/parser/parseTransformAttribute.d.ts.map +0 -0
- package/dist-extensions/src/parser/parseUseDirectives.d.ts +0 -0
- package/dist-extensions/src/parser/parseUseDirectives.d.ts.map +0 -0
- package/dist-extensions/src/parser/percent.d.ts +0 -0
- package/dist-extensions/src/parser/percent.d.ts.map +0 -0
- package/dist-extensions/src/parser/recursivelyParseGradientsXlink.d.ts +0 -0
- package/dist-extensions/src/parser/recursivelyParseGradientsXlink.d.ts.map +0 -0
- package/dist-extensions/src/parser/selectorMatches.d.ts +0 -0
- package/dist-extensions/src/parser/selectorMatches.d.ts.map +0 -0
- package/dist-extensions/src/parser/setStrokeFillOpacity.d.ts +0 -0
- package/dist-extensions/src/parser/setStrokeFillOpacity.d.ts.map +0 -0
- package/dist-extensions/src/parser/typedefs.d.ts +0 -0
- package/dist-extensions/src/parser/typedefs.d.ts.map +0 -0
- package/dist-extensions/src/shapes/ActiveSelection.d.ts +0 -0
- package/dist-extensions/src/shapes/ActiveSelection.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Circle.d.ts +0 -0
- package/dist-extensions/src/shapes/Circle.d.ts.map +0 -0
- package/dist-extensions/src/shapes/CustomLine.d.ts +10 -0
- package/dist-extensions/src/shapes/CustomLine.d.ts.map +1 -0
- package/dist-extensions/src/shapes/Ellipse.d.ts +0 -0
- package/dist-extensions/src/shapes/Ellipse.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Group.d.ts +0 -0
- package/dist-extensions/src/shapes/Group.d.ts.map +0 -0
- package/dist-extensions/src/shapes/IText/DraggableTextDelegate.d.ts +0 -0
- package/dist-extensions/src/shapes/IText/DraggableTextDelegate.d.ts.map +0 -0
- package/dist-extensions/src/shapes/IText/IText.d.ts +0 -0
- package/dist-extensions/src/shapes/IText/IText.d.ts.map +0 -0
- package/dist-extensions/src/shapes/IText/ITextBehavior.d.ts +0 -0
- package/dist-extensions/src/shapes/IText/ITextBehavior.d.ts.map +0 -0
- package/dist-extensions/src/shapes/IText/ITextClickBehavior.d.ts +0 -0
- package/dist-extensions/src/shapes/IText/ITextClickBehavior.d.ts.map +0 -0
- package/dist-extensions/src/shapes/IText/ITextKeyBehavior.d.ts +0 -0
- package/dist-extensions/src/shapes/IText/ITextKeyBehavior.d.ts.map +0 -0
- package/dist-extensions/src/shapes/IText/constants.d.ts +0 -0
- package/dist-extensions/src/shapes/IText/constants.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Image.d.ts +0 -0
- package/dist-extensions/src/shapes/Image.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Line.d.ts +0 -0
- package/dist-extensions/src/shapes/Line.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/FabricObject.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/FabricObject.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/FabricObjectSVGExportMixin.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/FabricObjectSVGExportMixin.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/InteractiveObject.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/InteractiveObject.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/Object.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/Object.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/ObjectGeometry.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/ObjectGeometry.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/defaultValues.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/defaultValues.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/BaseProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/BaseProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/BorderProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/BorderProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/ControlProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/ControlProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/FabricObjectProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/FabricObjectProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/FillStrokeProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/FillStrokeProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/LockInteractionProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/LockInteractionProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/ObjectProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/ObjectProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/ObjectTransformProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/ObjectTransformProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/SerializedObjectProps.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/SerializedObjectProps.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Object/types/index.d.ts +0 -0
- package/dist-extensions/src/shapes/Object/types/index.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Path.d.ts +0 -0
- package/dist-extensions/src/shapes/Path.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Polygon.d.ts +0 -0
- package/dist-extensions/src/shapes/Polygon.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Polyline.d.ts +0 -0
- package/dist-extensions/src/shapes/Polyline.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Rect.d.ts +0 -0
- package/dist-extensions/src/shapes/Rect.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Text/StyledText.d.ts +0 -0
- package/dist-extensions/src/shapes/Text/StyledText.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Text/Text.d.ts +0 -0
- package/dist-extensions/src/shapes/Text/Text.d.ts.map +1 -1
- package/dist-extensions/src/shapes/Text/TextSVGExportMixin.d.ts +0 -0
- package/dist-extensions/src/shapes/Text/TextSVGExportMixin.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Text/constants.d.ts +1 -1
- package/dist-extensions/src/shapes/Text/constants.d.ts.map +1 -1
- package/dist-extensions/src/shapes/Textbox.d.ts +0 -0
- package/dist-extensions/src/shapes/Textbox.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Triangle.d.ts +0 -0
- package/dist-extensions/src/shapes/Triangle.d.ts.map +0 -0
- package/dist-extensions/src/text/browserLines.d.ts +0 -0
- package/dist-extensions/src/text/browserLines.d.ts.map +0 -0
- package/dist-extensions/src/text/ellipsis.d.ts +0 -0
- package/dist-extensions/src/text/ellipsis.d.ts.map +0 -0
- package/dist-extensions/src/text/hitTest.d.ts +0 -0
- package/dist-extensions/src/text/hitTest.d.ts.map +0 -0
- package/dist-extensions/src/text/layout.d.ts +0 -0
- package/dist-extensions/src/text/layout.d.ts.map +0 -0
- package/dist-extensions/src/text/measure.d.ts +0 -0
- package/dist-extensions/src/text/measure.d.ts.map +0 -0
- package/dist-extensions/src/text/overlayEditor.d.ts +0 -0
- package/dist-extensions/src/text/overlayEditor.d.ts.map +0 -0
- package/dist-extensions/src/text/scriptUtils.d.ts +142 -0
- package/dist-extensions/src/text/scriptUtils.d.ts.map +1 -0
- package/dist-extensions/src/text/unicode.d.ts +0 -0
- package/dist-extensions/src/text/unicode.d.ts.map +0 -0
- package/dist-extensions/src/typedefs.d.ts +0 -0
- package/dist-extensions/src/typedefs.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/AnimationBase.d.ts +0 -0
- package/dist-extensions/src/util/animation/AnimationBase.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/AnimationFrameProvider.d.ts +0 -0
- package/dist-extensions/src/util/animation/AnimationFrameProvider.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/AnimationRegistry.d.ts +0 -0
- package/dist-extensions/src/util/animation/AnimationRegistry.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/ArrayAnimation.d.ts +0 -0
- package/dist-extensions/src/util/animation/ArrayAnimation.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/ColorAnimation.d.ts +0 -0
- package/dist-extensions/src/util/animation/ColorAnimation.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/ValueAnimation.d.ts +0 -0
- package/dist-extensions/src/util/animation/ValueAnimation.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/animate.d.ts +0 -0
- package/dist-extensions/src/util/animation/animate.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/easing.d.ts +0 -0
- package/dist-extensions/src/util/animation/easing.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/index.d.ts +0 -0
- package/dist-extensions/src/util/animation/index.d.ts.map +0 -0
- package/dist-extensions/src/util/animation/types.d.ts +0 -0
- package/dist-extensions/src/util/animation/types.d.ts.map +0 -0
- package/dist-extensions/src/util/applyMixins.d.ts +0 -0
- package/dist-extensions/src/util/applyMixins.d.ts.map +0 -0
- package/dist-extensions/src/util/dom_event.d.ts +0 -0
- package/dist-extensions/src/util/dom_event.d.ts.map +0 -0
- package/dist-extensions/src/util/dom_misc.d.ts +0 -0
- package/dist-extensions/src/util/dom_misc.d.ts.map +0 -0
- package/dist-extensions/src/util/index.d.ts +0 -0
- package/dist-extensions/src/util/index.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/applyCanvasTransform.d.ts +0 -0
- package/dist-extensions/src/util/internals/applyCanvasTransform.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/cleanupSvgAttribute.d.ts +0 -0
- package/dist-extensions/src/util/internals/cleanupSvgAttribute.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/cloneStyles.d.ts +0 -0
- package/dist-extensions/src/util/internals/cloneStyles.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/console.d.ts +0 -0
- package/dist-extensions/src/util/internals/console.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/dom_style.d.ts +0 -0
- package/dist-extensions/src/util/internals/dom_style.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/findRight.d.ts +0 -0
- package/dist-extensions/src/util/internals/findRight.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/getRandomInt.d.ts +0 -0
- package/dist-extensions/src/util/internals/getRandomInt.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/ifNaN.d.ts +0 -0
- package/dist-extensions/src/util/internals/ifNaN.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/removeFromArray.d.ts +0 -0
- package/dist-extensions/src/util/internals/removeFromArray.d.ts.map +0 -0
- package/dist-extensions/src/util/internals/uid.d.ts +0 -0
- package/dist-extensions/src/util/internals/uid.d.ts.map +0 -0
- package/dist-extensions/src/util/lang_string.d.ts +0 -0
- package/dist-extensions/src/util/lang_string.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/boundingBoxFromPoints.d.ts +0 -0
- package/dist-extensions/src/util/misc/boundingBoxFromPoints.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/capValue.d.ts +0 -0
- package/dist-extensions/src/util/misc/capValue.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/cornerRadius.d.ts +0 -0
- package/dist-extensions/src/util/misc/cornerRadius.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/cos.d.ts +0 -0
- package/dist-extensions/src/util/misc/cos.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/dom.d.ts +0 -0
- package/dist-extensions/src/util/misc/dom.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/findScaleTo.d.ts +0 -0
- package/dist-extensions/src/util/misc/findScaleTo.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/groupSVGElements.d.ts +0 -0
- package/dist-extensions/src/util/misc/groupSVGElements.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/isTransparent.d.ts +0 -0
- package/dist-extensions/src/util/misc/isTransparent.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/matrix.d.ts +0 -0
- package/dist-extensions/src/util/misc/matrix.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/mergeClipPaths.d.ts +0 -0
- package/dist-extensions/src/util/misc/mergeClipPaths.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/objectEnlive.d.ts +0 -0
- package/dist-extensions/src/util/misc/objectEnlive.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/objectTransforms.d.ts +0 -0
- package/dist-extensions/src/util/misc/objectTransforms.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/pick.d.ts +0 -0
- package/dist-extensions/src/util/misc/pick.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/planeChange.d.ts +0 -0
- package/dist-extensions/src/util/misc/planeChange.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/projectStroke/StrokeLineCapProjections.d.ts +0 -0
- package/dist-extensions/src/util/misc/projectStroke/StrokeLineCapProjections.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/projectStroke/StrokeLineJoinProjections.d.ts +0 -0
- package/dist-extensions/src/util/misc/projectStroke/StrokeLineJoinProjections.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/projectStroke/StrokeProjectionsBase.d.ts +0 -0
- package/dist-extensions/src/util/misc/projectStroke/StrokeProjectionsBase.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/projectStroke/index.d.ts +0 -0
- package/dist-extensions/src/util/misc/projectStroke/index.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/projectStroke/types.d.ts +0 -0
- package/dist-extensions/src/util/misc/projectStroke/types.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/radiansDegreesConversion.d.ts +0 -0
- package/dist-extensions/src/util/misc/radiansDegreesConversion.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/resolveOrigin.d.ts +0 -0
- package/dist-extensions/src/util/misc/resolveOrigin.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/sin.d.ts +0 -0
- package/dist-extensions/src/util/misc/sin.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/svgExport.d.ts +0 -0
- package/dist-extensions/src/util/misc/svgExport.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/svgParsing.d.ts +0 -0
- package/dist-extensions/src/util/misc/svgParsing.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/textStyles.d.ts +0 -0
- package/dist-extensions/src/util/misc/textStyles.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/toFixed.d.ts +0 -0
- package/dist-extensions/src/util/misc/toFixed.d.ts.map +0 -0
- package/dist-extensions/src/util/misc/vectors.d.ts +0 -0
- package/dist-extensions/src/util/misc/vectors.d.ts.map +0 -0
- package/dist-extensions/src/util/path/index.d.ts +0 -0
- package/dist-extensions/src/util/path/index.d.ts.map +0 -0
- package/dist-extensions/src/util/path/regex.d.ts +0 -0
- package/dist-extensions/src/util/path/regex.d.ts.map +0 -0
- package/dist-extensions/src/util/path/typedefs.d.ts +0 -0
- package/dist-extensions/src/util/path/typedefs.d.ts.map +0 -0
- package/dist-extensions/src/util/transform_matrix_removal.d.ts +0 -0
- package/dist-extensions/src/util/transform_matrix_removal.d.ts.map +0 -0
- package/dist-extensions/src/util/typeAssertions.d.ts +0 -0
- package/dist-extensions/src/util/typeAssertions.d.ts.map +0 -0
- package/docs/fabric-konva-gap-analysis.md +0 -0
- package/docs/konva-text-behavior-spec.md +0 -0
- package/docs/text-engine-design.md +0 -0
- package/eslint.config.mjs +0 -0
- package/examples/overlay-edit.html +416 -416
- package/extensions/README.MD +0 -0
- package/extensions/aligning_guidelines/README.MD +0 -0
- package/extensions/aligning_guidelines/constant.ts +0 -0
- package/extensions/aligning_guidelines/index.ts +0 -0
- package/extensions/aligning_guidelines/typedefs.ts +0 -0
- package/extensions/aligning_guidelines/util/basic.spec.ts +0 -0
- package/extensions/aligning_guidelines/util/basic.ts +0 -0
- package/extensions/aligning_guidelines/util/collect-line.ts +0 -0
- package/extensions/aligning_guidelines/util/collect-point.ts +0 -0
- package/extensions/aligning_guidelines/util/draw.ts +0 -0
- package/extensions/aligning_guidelines/util/get-objects-by-target.ts +0 -0
- package/extensions/data_updaters/README.md +0 -0
- package/extensions/data_updaters/gradient/__snapshots__/index.spec.ts.snap +0 -0
- package/extensions/data_updaters/gradient/index.spec.ts +0 -0
- package/extensions/data_updaters/gradient/index.ts +0 -0
- package/extensions/data_updaters/origins/README.md +0 -0
- package/extensions/data_updaters/origins/index.spec.ts +0 -0
- package/extensions/data_updaters/origins/index.ts +0 -0
- package/extensions/index.ts +0 -0
- package/fabric-test-editor.html +3552 -0
- package/fabric-test2.html +647 -0
- package/fabric.ts +182 -182
- package/fonts/STV Bold.ttf +0 -0
- package/fonts/STV Light.ttf +0 -0
- package/fonts/STV Regular.ttf +0 -0
- package/index.node.ts +0 -0
- package/index.ts +0 -0
- package/lib/aligning_guidelines.js +0 -0
- package/lib/centering_guidelines.js +0 -0
- package/lib/event.js +0 -0
- package/package.json +164 -164
- package/playwright.config.ts +0 -0
- package/playwright.setup.ts +0 -0
- package/publish-next.js +0 -0
- package/publish.js +0 -0
- package/rollup.config.mjs +0 -0
- package/rtl-debug.html +745 -0
- package/scripts/bench-text.js +591 -591
- package/scripts/build.mjs +0 -0
- package/scripts/buildLock.mjs +0 -0
- package/scripts/buildReporter.mjs +0 -0
- package/scripts/buildStats.mjs +0 -0
- package/scripts/dirname.mjs +0 -0
- package/scripts/git.mjs +0 -0
- package/scripts/index.mjs +0 -0
- package/scripts/sandbox.mjs +0 -0
- package/src/ClassRegistry.spec.ts +0 -0
- package/src/ClassRegistry.ts +0 -0
- package/src/Collection.spec.ts +0 -0
- package/src/Collection.ts +0 -0
- package/src/CommonMethods.ts +0 -0
- package/src/EventTypeDefs.ts +0 -0
- package/src/Intersection.spec.ts +0 -0
- package/src/Intersection.ts +0 -0
- package/src/LayoutManager/ActiveSelectionLayoutManager.spec.ts +0 -0
- package/src/LayoutManager/ActiveSelectionLayoutManager.ts +0 -0
- package/src/LayoutManager/LayoutManager.spec.ts +0 -0
- package/src/LayoutManager/LayoutManager.ts +0 -0
- package/src/LayoutManager/LayoutStrategies/ClipPathLayout.ts +0 -0
- package/src/LayoutManager/LayoutStrategies/FitContentLayout.ts +0 -0
- package/src/LayoutManager/LayoutStrategies/FixedLayout.ts +0 -0
- package/src/LayoutManager/LayoutStrategies/LayoutStrategy.ts +0 -0
- package/src/LayoutManager/LayoutStrategies/utils.ts +0 -0
- package/src/LayoutManager/README.md +0 -0
- package/src/LayoutManager/__snapshots__/LayoutManager.spec.ts.snap +0 -0
- package/src/LayoutManager/constants.ts +0 -0
- package/src/LayoutManager/index.ts +0 -0
- package/src/LayoutManager/types.ts +0 -0
- package/src/Observable.spec.ts +0 -0
- package/src/Observable.ts +0 -0
- package/src/Pattern/Pattern.spec.ts +0 -0
- package/src/Pattern/Pattern.ts +0 -0
- package/src/Pattern/index.ts +0 -0
- package/src/Pattern/types.ts +0 -0
- package/src/Point.spec.ts +0 -0
- package/src/Point.ts +0 -0
- package/src/Shadow.spec.ts +0 -0
- package/src/Shadow.ts +0 -0
- package/src/__snapshots__/Shadow.spec.ts.snap +0 -0
- package/src/brushes/BaseBrush.spec.ts +0 -0
- package/src/brushes/BaseBrush.ts +0 -0
- package/src/brushes/CircleBrush.test.ts +0 -0
- package/src/brushes/CircleBrush.ts +0 -0
- package/src/brushes/PatternBrush.ts +0 -0
- package/src/brushes/PencilBrush.spec.ts +0 -0
- package/src/brushes/PencilBrush.ts +0 -0
- package/src/brushes/SprayBrush.ts +0 -0
- package/src/brushes/__snapshots__/PencilBrush.spec.ts.snap +0 -0
- package/src/brushes/typedefs.ts +0 -0
- package/src/cache.spec.ts +0 -0
- package/src/cache.ts +0 -0
- package/src/canvas/Canvas-dispose.spec.ts +0 -0
- package/src/canvas/Canvas-events.spec.ts +0 -0
- package/src/canvas/Canvas.spec.ts +0 -0
- package/src/canvas/Canvas.ts +0 -0
- package/src/canvas/CanvasOptions.ts +0 -0
- package/src/canvas/DOMManagers/CanvasDOMManager.ts +0 -0
- package/src/canvas/DOMManagers/StaticCanvasDOMManager.ts +0 -0
- package/src/canvas/DOMManagers/util.spec.ts +0 -0
- package/src/canvas/DOMManagers/util.ts +0 -0
- package/src/canvas/SelectableCanvas.spec.ts +0 -0
- package/src/canvas/SelectableCanvas.ts +0 -0
- package/src/canvas/StaticCanvas.spec.ts +0 -0
- package/src/canvas/StaticCanvas.ts +0 -0
- package/src/canvas/StaticCanvasOptions.ts +0 -0
- package/src/canvas/TextEditingManager.ts +0 -0
- package/src/canvas/__tests__/SelectableCanvas.spec.ts +0 -0
- package/src/canvas/__tests__/__snapshots__/eventData.test.ts.snap +0 -0
- package/src/canvas/__tests__/eventData.test.ts +0 -0
- package/src/canvas/canvas_gestures.mixin.ts +0 -0
- package/src/color/Color.ts +0 -0
- package/src/color/color.test.ts +0 -0
- package/src/color/color_map.ts +0 -0
- package/src/color/constants.ts +0 -0
- package/src/color/typedefs.ts +0 -0
- package/src/color/util.ts +0 -0
- package/src/config.ts +0 -0
- package/src/constants.ts +0 -0
- package/src/controls/Control-cursor.spec.ts +0 -0
- package/src/controls/Control-handlers.spec.ts +0 -0
- package/src/controls/Control.spec.ts +0 -0
- package/src/controls/Control.ts +0 -0
- package/src/controls/changeHeight.ts +0 -0
- package/src/controls/changeWidth.test.ts +0 -0
- package/src/controls/changeWidth.ts +0 -0
- package/src/controls/commonControls.ts +0 -0
- package/src/controls/controlRendering.ts +0 -0
- package/src/controls/drag.ts +0 -0
- package/src/controls/fireEvent.ts +0 -0
- package/src/controls/index.ts +0 -0
- package/src/controls/pathControl.spec.ts +0 -0
- package/src/controls/pathControl.ts +0 -0
- package/src/controls/polyControl.spec.ts +0 -0
- package/src/controls/polyControl.ts +0 -0
- package/src/controls/rotate.ts +0 -0
- package/src/controls/scale.test.ts +0 -0
- package/src/controls/scale.ts +0 -0
- package/src/controls/scaleSkew.ts +0 -0
- package/src/controls/skew.ts +0 -0
- package/src/controls/util.ts +0 -0
- package/src/controls/wrapWithFireEvent.ts +0 -0
- package/src/controls/wrapWithFixedAnchor.spec.ts +0 -0
- package/src/controls/wrapWithFixedAnchor.ts +0 -0
- package/src/env/browser.ts +0 -0
- package/src/env/env.spec.ts +0 -0
- package/src/env/index.ts +0 -0
- package/src/env/node.ts +0 -0
- package/src/env/types.ts +0 -0
- package/src/filters/BaseFilter.spec.ts +0 -0
- package/src/filters/BaseFilter.ts +0 -0
- package/src/filters/BlendColor.ts +0 -0
- package/src/filters/BlendImage.ts +0 -0
- package/src/filters/Blur.ts +0 -0
- package/src/filters/Boilerplate.ts +0 -0
- package/src/filters/Brightness.ts +0 -0
- package/src/filters/Canvas2dFilterBackend.ts +0 -0
- package/src/filters/ColorMatrix.spec.ts +0 -0
- package/src/filters/ColorMatrix.ts +0 -0
- package/src/filters/ColorMatrixFilters.ts +0 -0
- package/src/filters/Composed.ts +0 -0
- package/src/filters/Contrast.ts +0 -0
- package/src/filters/Convolute.ts +0 -0
- package/src/filters/FilterBackend.ts +0 -0
- package/src/filters/GLProbes/GLProbe.ts +0 -0
- package/src/filters/GLProbes/NodeGLProbe.ts +0 -0
- package/src/filters/GLProbes/WebGLProbe.ts +0 -0
- package/src/filters/Gamma.ts +0 -0
- package/src/filters/Grayscale.ts +0 -0
- package/src/filters/HueRotation.ts +0 -0
- package/src/filters/Invert.ts +0 -0
- package/src/filters/Noise.ts +0 -0
- package/src/filters/Pixelate.ts +0 -0
- package/src/filters/RemoveColor.ts +0 -0
- package/src/filters/Resize.ts +0 -0
- package/src/filters/Saturation.ts +0 -0
- package/src/filters/Vibrance.ts +0 -0
- package/src/filters/WebGLFilterBackend.spec.ts +0 -0
- package/src/filters/WebGLFilterBackend.ts +0 -0
- package/src/filters/filters.ts +0 -0
- package/src/filters/index.ts +0 -0
- package/src/filters/shaders/baseFilter.ts +0 -0
- package/src/filters/shaders/blendColor.ts +0 -0
- package/src/filters/shaders/blendImage.ts +0 -0
- package/src/filters/shaders/blur.ts +0 -0
- package/src/filters/shaders/brightness.ts +0 -0
- package/src/filters/shaders/colorMatrix.ts +0 -0
- package/src/filters/shaders/constrast.ts +0 -0
- package/src/filters/shaders/convolute.ts +0 -0
- package/src/filters/shaders/gamma.ts +0 -0
- package/src/filters/shaders/grayscale.ts +0 -0
- package/src/filters/shaders/invert.ts +0 -0
- package/src/filters/shaders/noise.ts +0 -0
- package/src/filters/shaders/pixelate.ts +0 -0
- package/src/filters/shaders/removeColor.ts +0 -0
- package/src/filters/shaders/saturation.ts +0 -0
- package/src/filters/shaders/vibrance.ts +0 -0
- package/src/filters/typedefs.ts +0 -0
- package/src/filters/utils.ts +0 -0
- package/src/gradient/Gradient.spec.ts +0 -0
- package/src/gradient/Gradient.ts +0 -0
- package/src/gradient/constants.ts +0 -0
- package/src/gradient/index.ts +0 -0
- package/src/gradient/parser/misc.ts +0 -0
- package/src/gradient/parser/parseColorStops.ts +0 -0
- package/src/gradient/parser/parseCoords.ts +0 -0
- package/src/gradient/typedefs.ts +0 -0
- package/src/mixins/eraser_brush.mixin.ts +0 -0
- package/src/parkinglot/canvas_animation.mixin.ts +0 -0
- package/src/parkinglot/straighten.ts +0 -0
- package/src/parser/applyViewboxTransform.spec.ts +0 -0
- package/src/parser/applyViewboxTransform.ts +0 -0
- package/src/parser/attributes.ts +0 -0
- package/src/parser/constants.spec.ts +0 -0
- package/src/parser/constants.ts +0 -0
- package/src/parser/doesSomeParentMatch.ts +0 -0
- package/src/parser/elementMatchesRule.ts +0 -0
- package/src/parser/elements_parser.ts +0 -0
- package/src/parser/getCSSRules.spec.ts +0 -0
- package/src/parser/getCSSRules.ts +0 -0
- package/src/parser/getGlobalStylesForElement.ts +0 -0
- package/src/parser/getGradientDefs.ts +0 -0
- package/src/parser/getMultipleNodes.ts +0 -0
- package/src/parser/getSvgRegex.ts +0 -0
- package/src/parser/getTagName.ts +0 -0
- package/src/parser/hasInvalidAncestor.ts +0 -0
- package/src/parser/loadSVGFromString.test.ts +0 -0
- package/src/parser/loadSVGFromString.ts +0 -0
- package/src/parser/loadSVGFromURL.ts +0 -0
- package/src/parser/normalizeAttr.ts +0 -0
- package/src/parser/normalizeValue.ts +0 -0
- package/src/parser/parseAttributes.ts +0 -0
- package/src/parser/parseFontDeclaration.ts +0 -0
- package/src/parser/parsePointsAttribute.ts +0 -0
- package/src/parser/parseSVGDocument.ts +0 -0
- package/src/parser/parseStyleAttribute.ts +0 -0
- package/src/parser/parseStyleObject.ts +0 -0
- package/src/parser/parseStyleString.ts +0 -0
- package/src/parser/parseTransformAttribute.ts +0 -0
- package/src/parser/parseUseDirectives.test.ts +0 -0
- package/src/parser/parseUseDirectives.ts +0 -0
- package/src/parser/parser.spec.ts +0 -0
- package/src/parser/percent.ts +0 -0
- package/src/parser/recursivelyParseGradientsXlink.ts +0 -0
- package/src/parser/selectorMatches.ts +0 -0
- package/src/parser/setStrokeFillOpacity.ts +0 -0
- package/src/parser/typedefs.ts +0 -0
- package/src/shapes/ActiveSelection.spec.ts +0 -0
- package/src/shapes/ActiveSelection.ts +0 -0
- package/src/shapes/Circle.spec.ts +0 -0
- package/src/shapes/Circle.ts +0 -0
- package/src/shapes/Ellipse.spec.ts +0 -0
- package/src/shapes/Ellipse.ts +0 -0
- package/src/shapes/Group.spec.ts +0 -0
- package/src/shapes/Group.ts +0 -0
- package/src/shapes/IText/DraggableTextDelegate.ts +0 -0
- package/src/shapes/IText/IText-click-behavior.spec.ts +0 -0
- package/src/shapes/IText/IText.test.ts +0 -0
- package/src/shapes/IText/IText.ts +846 -846
- package/src/shapes/IText/ITextBehavior.test.ts +0 -0
- package/src/shapes/IText/ITextBehavior.ts +1187 -1187
- package/src/shapes/IText/ITextClickBehavior.ts +254 -254
- package/src/shapes/IText/ITextKeyBehavior.test.ts +0 -0
- package/src/shapes/IText/ITextKeyBehavior.ts +732 -732
- package/src/shapes/IText/__snapshots__/IText.test.ts.snap +0 -0
- package/src/shapes/IText/__snapshots__/ITextBehavior.test.ts.snap +0 -0
- package/src/shapes/IText/constants.ts +0 -0
- package/src/shapes/Image-filters.spec.ts +0 -0
- package/src/shapes/Image.spec.ts +0 -0
- package/src/shapes/Image.ts +0 -0
- package/src/shapes/Line.spec.ts +0 -0
- package/src/shapes/Line.ts +0 -0
- package/src/shapes/Object/FabricObject.spec.ts +0 -0
- package/src/shapes/Object/FabricObject.ts +0 -0
- package/src/shapes/Object/FabricObjectSVGExportMixin.ts +0 -0
- package/src/shapes/Object/InteractiveObject.spec.ts +0 -0
- package/src/shapes/Object/InteractiveObject.ts +0 -0
- package/src/shapes/Object/Object-clip-path.spec.ts +0 -0
- package/src/shapes/Object/Object-interactivity.spec.ts +0 -0
- package/src/shapes/Object/Object.spec.ts +0 -0
- package/src/shapes/Object/Object.ts +0 -0
- package/src/shapes/Object/ObjectGeometry.spec.ts +0 -0
- package/src/shapes/Object/ObjectGeometry.ts +0 -0
- package/src/shapes/Object/ObjectOrigin.spec.ts +0 -0
- package/src/shapes/Object/ObjectSerialization.spec.ts +0 -0
- package/src/shapes/Object/StackedObject.spec.ts +0 -0
- package/src/shapes/Object/__snapshots__/InteractiveObject.spec.ts.snap +0 -0
- package/src/shapes/Object/defaultValues.ts +0 -0
- package/src/shapes/Object/types/BaseProps.ts +0 -0
- package/src/shapes/Object/types/BorderProps.ts +0 -0
- package/src/shapes/Object/types/ControlProps.ts +0 -0
- package/src/shapes/Object/types/FabricObjectProps.ts +0 -0
- package/src/shapes/Object/types/FillStrokeProps.ts +0 -0
- package/src/shapes/Object/types/LockInteractionProps.ts +0 -0
- package/src/shapes/Object/types/ObjectProps.ts +0 -0
- package/src/shapes/Object/types/ObjectTransformProps.ts +0 -0
- package/src/shapes/Object/types/SerializedObjectProps.ts +0 -0
- package/src/shapes/Object/types/index.ts +0 -0
- package/src/shapes/Path.spec.ts +0 -0
- package/src/shapes/Path.ts +0 -0
- package/src/shapes/Polygon.spec.ts +0 -0
- package/src/shapes/Polygon.ts +0 -0
- package/src/shapes/Polyline.spec.ts +0 -0
- package/src/shapes/Polyline.ts +0 -0
- package/src/shapes/Rect.spec.ts +0 -0
- package/src/shapes/Rect.ts +0 -0
- package/src/shapes/Text/StyledText.spec.ts +0 -0
- package/src/shapes/Text/StyledText.ts +0 -0
- package/src/shapes/Text/Text.spec.ts +0 -0
- package/src/shapes/Text/Text.ts +2463 -2459
- package/src/shapes/Text/TextSVGExportMixin.spec.ts +0 -0
- package/src/shapes/Text/TextSVGExportMixin.ts +0 -0
- package/src/shapes/Text/__snapshots__/Text.spec.ts.snap +0 -0
- package/src/shapes/Text/__snapshots__/TextSVGExportMixin.spec.ts.snap +0 -0
- package/src/shapes/Text/constants.ts +135 -134
- package/src/shapes/Textbox.spec.ts +0 -0
- package/src/shapes/Textbox.ts +1320 -1320
- package/src/shapes/Triangle.spec.ts +0 -0
- package/src/shapes/Triangle.ts +0 -0
- package/src/shapes/__snapshots__/Image.spec.ts.snap +0 -0
- package/src/shapes/__snapshots__/Textbox.spec.ts.snap +0 -0
- package/src/text/browserLines.ts +233 -233
- package/src/text/ellipsis.ts +516 -516
- package/src/text/hitTest.ts +623 -623
- package/src/text/layout.ts +586 -586
- package/src/text/measure.ts +626 -626
- package/src/text/overlayEditor.ts +1047 -1047
- package/src/text/unicode.ts +454 -454
- package/src/typedefs.ts +0 -0
- package/src/util/__snapshots__/index.spec.ts.snap +0 -0
- package/src/util/animation/AnimationBase.ts +0 -0
- package/src/util/animation/AnimationFrameProvider.ts +0 -0
- package/src/util/animation/AnimationRegistry.ts +0 -0
- package/src/util/animation/ArrayAnimation.ts +0 -0
- package/src/util/animation/ColorAnimation.ts +0 -0
- package/src/util/animation/ValueAnimation.ts +0 -0
- package/src/util/animation/__snapshots__/animations.spec.ts.snap +0 -0
- package/src/util/animation/animate.ts +0 -0
- package/src/util/animation/animations.spec.ts +0 -0
- package/src/util/animation/easing.ts +0 -0
- package/src/util/animation/index.ts +0 -0
- package/src/util/animation/types.ts +0 -0
- package/src/util/applyMixins.ts +0 -0
- package/src/util/dom_event.spec.ts +0 -0
- package/src/util/dom_event.ts +0 -0
- package/src/util/dom_misc.ts +0 -0
- package/src/util/index.spec.ts +0 -0
- package/src/util/index.ts +0 -0
- package/src/util/internals/applyCanvasTransform.ts +0 -0
- package/src/util/internals/cleanupSvgAttribute.test.ts +0 -0
- package/src/util/internals/cleanupSvgAttribute.ts +0 -0
- package/src/util/internals/cloneStyles.spec.ts +0 -0
- package/src/util/internals/cloneStyles.ts +0 -0
- package/src/util/internals/console.ts +0 -0
- package/src/util/internals/dom_style.spec.ts +0 -0
- package/src/util/internals/dom_style.ts +0 -0
- package/src/util/internals/findRight.ts +0 -0
- package/src/util/internals/getRandomInt.test.ts +0 -0
- package/src/util/internals/getRandomInt.ts +0 -0
- package/src/util/internals/ifNaN.ts +0 -0
- package/src/util/internals/removeFromArray.spec.ts +0 -0
- package/src/util/internals/removeFromArray.ts +0 -0
- package/src/util/internals/uid.ts +0 -0
- package/src/util/lang_string.spec.ts +0 -0
- package/src/util/lang_string.ts +0 -0
- package/src/util/misc/boundingBoxFromPoints.spec.ts +0 -0
- package/src/util/misc/boundingBoxFromPoints.ts +0 -0
- package/src/util/misc/capValue.spec.ts +0 -0
- package/src/util/misc/capValue.ts +0 -0
- package/src/util/misc/cornerRadius.spec.ts +0 -0
- package/src/util/misc/cornerRadius.ts +0 -0
- package/src/util/misc/cos.spec.ts +0 -0
- package/src/util/misc/cos.ts +0 -0
- package/src/util/misc/dom.spec.ts +0 -0
- package/src/util/misc/dom.ts +0 -0
- package/src/util/misc/findScaleTo.spec.ts +0 -0
- package/src/util/misc/findScaleTo.ts +0 -0
- package/src/util/misc/groupSVGElements.spec.ts +0 -0
- package/src/util/misc/groupSVGElements.ts +0 -0
- package/src/util/misc/isTransparent.ts +0 -0
- package/src/util/misc/matrix.spec.ts +0 -0
- package/src/util/misc/matrix.ts +0 -0
- package/src/util/misc/mergeClipPaths.spec.ts +0 -0
- package/src/util/misc/mergeClipPaths.ts +0 -0
- package/src/util/misc/objectEnlive.spec.ts +0 -0
- package/src/util/misc/objectEnlive.ts +0 -0
- package/src/util/misc/objectTransforms.spec.ts +0 -0
- package/src/util/misc/objectTransforms.ts +0 -0
- package/src/util/misc/pick.spec.ts +0 -0
- package/src/util/misc/pick.ts +0 -0
- package/src/util/misc/planeChange.spec.ts +0 -0
- package/src/util/misc/planeChange.ts +0 -0
- package/src/util/misc/projectStroke/StrokeLineCapProjections.ts +0 -0
- package/src/util/misc/projectStroke/StrokeLineJoinProjections.ts +0 -0
- package/src/util/misc/projectStroke/StrokeProjectionsBase.ts +0 -0
- package/src/util/misc/projectStroke/index.ts +0 -0
- package/src/util/misc/projectStroke/types.ts +0 -0
- package/src/util/misc/radiansDegreesConversion.spec.ts +0 -0
- package/src/util/misc/radiansDegreesConversion.ts +0 -0
- package/src/util/misc/resolveOrigin.ts +0 -0
- package/src/util/misc/sin.ts +0 -0
- package/src/util/misc/svgExport.ts +0 -0
- package/src/util/misc/svgParsing.spec.ts +0 -0
- package/src/util/misc/svgParsing.ts +0 -0
- package/src/util/misc/textStyles.ts +0 -0
- package/src/util/misc/toFixed.spec.ts +0 -0
- package/src/util/misc/toFixed.ts +0 -0
- package/src/util/misc/vectors.spec.ts +0 -0
- package/src/util/misc/vectors.ts +0 -0
- package/src/util/path/__snapshots__/index.spec.ts.snap +0 -0
- package/src/util/path/index.spec.ts +0 -0
- package/src/util/path/index.ts +0 -0
- package/src/util/path/regex.ts +0 -0
- package/src/util/path/typechecks.ts +0 -0
- package/src/util/path/typedefs.ts +0 -0
- package/src/util/transform_matrix_removal.ts +0 -0
- package/src/util/typeAssertions.spec.ts +0 -0
- package/src/util/typeAssertions.ts +0 -0
- package/tsconfig-extensions.json +0 -0
- package/tsconfig.json +0 -0
- package/tsconfig.spec.json +0 -0
- package/typedoc.config.json +0 -0
- package/vitest.config.ts +0 -0
- package/vitest.d.ts +0 -0
- package/vitest.env.d.ts +0 -0
- package/vitest.extend.ts +0 -0
- package/vitest.setup.ts +0 -0
- package/dist/src/controls/changeHeight.min.mjs +0 -2
- package/dist/src/controls/changeHeight.min.mjs.map +0 -1
- package/dist/src/controls/changeHeight.mjs +0 -36
- package/dist/src/controls/changeHeight.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -360,7 +360,7 @@
|
|
|
360
360
|
}
|
|
361
361
|
const cache = new Cache();
|
|
362
362
|
|
|
363
|
-
var version = "7.0.1-
|
|
363
|
+
var version = "7.0.1-beta11";
|
|
364
364
|
|
|
365
365
|
// use this syntax so babel plugin see this import here
|
|
366
366
|
const VERSION = version;
|
|
@@ -4807,7 +4807,7 @@
|
|
|
4807
4807
|
const fontProperties = ['fontSize', 'fontWeight', 'fontFamily', 'fontStyle'];
|
|
4808
4808
|
const textDecorationProperties = ['underline', 'overline', 'linethrough'];
|
|
4809
4809
|
const textLayoutProperties = [...fontProperties, 'lineHeight', 'text', 'charSpacing', 'textAlign', 'styles', 'path', 'pathStartOffset', 'pathSide', 'pathAlign', 'wrap', 'ellipsis', 'letterSpacing', 'enableAdvancedLayout', 'verticalAlign'];
|
|
4810
|
-
const additionalProps = [...textLayoutProperties, ...textDecorationProperties, 'textBackgroundColor', 'direction', TEXT_DECORATION_THICKNESS];
|
|
4810
|
+
const additionalProps = [...textLayoutProperties, ...textDecorationProperties, 'textBackgroundColor', 'direction', TEXT_DECORATION_THICKNESS, 'useOverlayEditing'];
|
|
4811
4811
|
const styleProperties = [...fontProperties, ...textDecorationProperties, STROKE, 'strokeWidth', FILL, 'deltaY', 'textBackgroundColor', TEXT_DECORATION_THICKNESS];
|
|
4812
4812
|
|
|
4813
4813
|
// @TODO: Many things here are configuration related and shouldn't be on the class nor prototype
|
|
@@ -19189,8 +19189,8 @@
|
|
|
19189
19189
|
// Global measurement context - reused for performance
|
|
19190
19190
|
let measurementContext = null;
|
|
19191
19191
|
|
|
19192
|
-
/**
|
|
19193
|
-
* Get or create the shared measurement context
|
|
19192
|
+
/**
|
|
19193
|
+
* Get or create the shared measurement context
|
|
19194
19194
|
*/
|
|
19195
19195
|
function getMeasurementContext() {
|
|
19196
19196
|
if (!measurementContext) {
|
|
@@ -19203,8 +19203,8 @@
|
|
|
19203
19203
|
return measurementContext;
|
|
19204
19204
|
}
|
|
19205
19205
|
|
|
19206
|
-
/**
|
|
19207
|
-
* Measure a single grapheme
|
|
19206
|
+
/**
|
|
19207
|
+
* Measure a single grapheme
|
|
19208
19208
|
*/
|
|
19209
19209
|
function measureGrapheme(grapheme, options, ctx) {
|
|
19210
19210
|
// Check cache first
|
|
@@ -19237,8 +19237,8 @@
|
|
|
19237
19237
|
return measurement;
|
|
19238
19238
|
}
|
|
19239
19239
|
|
|
19240
|
-
/**
|
|
19241
|
-
* Measure a grapheme with kerning relative to previous character
|
|
19240
|
+
/**
|
|
19241
|
+
* Measure a grapheme with kerning relative to previous character
|
|
19242
19242
|
*/
|
|
19243
19243
|
function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
|
|
19244
19244
|
// Get individual measurement
|
|
@@ -19279,9 +19279,9 @@
|
|
|
19279
19279
|
};
|
|
19280
19280
|
}
|
|
19281
19281
|
|
|
19282
|
-
/**
|
|
19283
|
-
* Get a representative character for font metrics measurement
|
|
19284
|
-
* Uses canvas to test which scripts the font actually supports
|
|
19282
|
+
/**
|
|
19283
|
+
* Get a representative character for font metrics measurement
|
|
19284
|
+
* Uses canvas to test which scripts the font actually supports
|
|
19285
19285
|
*/
|
|
19286
19286
|
function getRepresentativeCharacter(fontFamily) {
|
|
19287
19287
|
const context = getMeasurementContext();
|
|
@@ -19370,8 +19370,8 @@
|
|
|
19370
19370
|
return 'M';
|
|
19371
19371
|
}
|
|
19372
19372
|
|
|
19373
|
-
/**
|
|
19374
|
-
* Get font metrics for layout calculations
|
|
19373
|
+
/**
|
|
19374
|
+
* Get font metrics for layout calculations
|
|
19375
19375
|
*/
|
|
19376
19376
|
function getFontMetrics(options) {
|
|
19377
19377
|
var _metrics$fontBounding, _metrics$fontBounding2, _metrics$actualBoundi, _metrics$actualBoundi2;
|
|
@@ -19407,8 +19407,8 @@
|
|
|
19407
19407
|
return result;
|
|
19408
19408
|
}
|
|
19409
19409
|
|
|
19410
|
-
/**
|
|
19411
|
-
* Apply font styling to canvas context
|
|
19410
|
+
/**
|
|
19411
|
+
* Apply font styling to canvas context
|
|
19412
19412
|
*/
|
|
19413
19413
|
function applyFontStyle(ctx, options) {
|
|
19414
19414
|
const fontDeclaration = getFontDeclaration(options);
|
|
@@ -19425,8 +19425,8 @@
|
|
|
19425
19425
|
ctx.textBaseline = 'alphabetic';
|
|
19426
19426
|
}
|
|
19427
19427
|
|
|
19428
|
-
/**
|
|
19429
|
-
* Generate font declaration string
|
|
19428
|
+
/**
|
|
19429
|
+
* Generate font declaration string
|
|
19430
19430
|
*/
|
|
19431
19431
|
function getFontDeclaration(options) {
|
|
19432
19432
|
const {
|
|
@@ -19445,8 +19445,8 @@
|
|
|
19445
19445
|
return `${fontStyle} ${fontWeight} ${fontSize}px ${normalizedFamily}`;
|
|
19446
19446
|
}
|
|
19447
19447
|
|
|
19448
|
-
/**
|
|
19449
|
-
* LRU Cache implementation for measurements
|
|
19448
|
+
/**
|
|
19449
|
+
* LRU Cache implementation for measurements
|
|
19450
19450
|
*/
|
|
19451
19451
|
class LRUCache {
|
|
19452
19452
|
constructor() {
|
|
@@ -19508,8 +19508,8 @@
|
|
|
19508
19508
|
}
|
|
19509
19509
|
}
|
|
19510
19510
|
|
|
19511
|
-
/**
|
|
19512
|
-
* Advanced measurement cache with font-aware keys
|
|
19511
|
+
/**
|
|
19512
|
+
* Advanced measurement cache with font-aware keys
|
|
19513
19513
|
*/
|
|
19514
19514
|
class MeasurementCache {
|
|
19515
19515
|
constructor() {
|
|
@@ -19536,8 +19536,8 @@
|
|
|
19536
19536
|
}
|
|
19537
19537
|
}
|
|
19538
19538
|
|
|
19539
|
-
/**
|
|
19540
|
-
* Kerning cache for character pairs
|
|
19539
|
+
/**
|
|
19540
|
+
* Kerning cache for character pairs
|
|
19541
19541
|
*/
|
|
19542
19542
|
class KerningCache {
|
|
19543
19543
|
constructor() {
|
|
@@ -19565,8 +19565,8 @@
|
|
|
19565
19565
|
}
|
|
19566
19566
|
}
|
|
19567
19567
|
|
|
19568
|
-
/**
|
|
19569
|
-
* Font metrics cache
|
|
19568
|
+
/**
|
|
19569
|
+
* Font metrics cache
|
|
19570
19570
|
*/
|
|
19571
19571
|
class FontMetricsCache {
|
|
19572
19572
|
constructor() {
|
|
@@ -19601,8 +19601,8 @@
|
|
|
19601
19601
|
});
|
|
19602
19602
|
}
|
|
19603
19603
|
|
|
19604
|
-
/**
|
|
19605
|
-
* Clear all measurement caches
|
|
19604
|
+
/**
|
|
19605
|
+
* Clear all measurement caches
|
|
19606
19606
|
*/
|
|
19607
19607
|
function clearAllCaches() {
|
|
19608
19608
|
measurementCache.clear();
|
|
@@ -19610,9 +19610,9 @@
|
|
|
19610
19610
|
fontMetricsCache.clear();
|
|
19611
19611
|
}
|
|
19612
19612
|
|
|
19613
|
-
/**
|
|
19614
|
-
* Detect if a font lacks English glyph support
|
|
19615
|
-
* These fonts should use browser-native measurement instead of Fabric's character-by-character measurement
|
|
19613
|
+
/**
|
|
19614
|
+
* Detect if a font lacks English glyph support
|
|
19615
|
+
* These fonts should use browser-native measurement instead of Fabric's character-by-character measurement
|
|
19616
19616
|
*/
|
|
19617
19617
|
function fontLacksEnglishGlyphs(fontFamily) {
|
|
19618
19618
|
if (typeof document === 'undefined') return false;
|
|
@@ -19656,8 +19656,8 @@
|
|
|
19656
19656
|
// Cache for font glyph detection results
|
|
19657
19657
|
const fontGlyphCache = new Map();
|
|
19658
19658
|
|
|
19659
|
-
/**
|
|
19660
|
-
* Cached version of font glyph detection
|
|
19659
|
+
/**
|
|
19660
|
+
* Cached version of font glyph detection
|
|
19661
19661
|
*/
|
|
19662
19662
|
function fontLacksEnglishGlyphsCached(fontFamily) {
|
|
19663
19663
|
if (fontGlyphCache.has(fontFamily)) {
|
|
@@ -19668,17 +19668,17 @@
|
|
|
19668
19668
|
return result;
|
|
19669
19669
|
}
|
|
19670
19670
|
|
|
19671
|
-
/**
|
|
19672
|
-
* Unicode and Internationalization Support
|
|
19673
|
-
*
|
|
19674
|
-
* Enhanced Unicode handling for complex scripts, RTL/LTR text,
|
|
19675
|
-
* and grapheme cluster boundary detection.
|
|
19671
|
+
/**
|
|
19672
|
+
* Unicode and Internationalization Support
|
|
19673
|
+
*
|
|
19674
|
+
* Enhanced Unicode handling for complex scripts, RTL/LTR text,
|
|
19675
|
+
* and grapheme cluster boundary detection.
|
|
19676
19676
|
*/
|
|
19677
19677
|
|
|
19678
19678
|
|
|
19679
|
-
/**
|
|
19680
|
-
* Enhanced grapheme segmentation using Intl.Segmenter when available
|
|
19681
|
-
* with fallback to existing graphemeSplit implementation
|
|
19679
|
+
/**
|
|
19680
|
+
* Enhanced grapheme segmentation using Intl.Segmenter when available
|
|
19681
|
+
* with fallback to existing graphemeSplit implementation
|
|
19682
19682
|
*/
|
|
19683
19683
|
function segmentGraphemes(text) {
|
|
19684
19684
|
// Use native Intl.Segmenter if available
|
|
@@ -19698,15 +19698,15 @@
|
|
|
19698
19698
|
return graphemeSplit(text);
|
|
19699
19699
|
}
|
|
19700
19700
|
|
|
19701
|
-
/**
|
|
19702
|
-
* Ellipsis Text Truncation System
|
|
19703
|
-
*
|
|
19704
|
-
* Implements text truncation with ellipsis when content exceeds bounds,
|
|
19705
|
-
* using binary search for optimal truncation points.
|
|
19701
|
+
/**
|
|
19702
|
+
* Ellipsis Text Truncation System
|
|
19703
|
+
*
|
|
19704
|
+
* Implements text truncation with ellipsis when content exceeds bounds,
|
|
19705
|
+
* using binary search for optimal truncation points.
|
|
19706
19706
|
*/
|
|
19707
19707
|
|
|
19708
|
-
/**
|
|
19709
|
-
* Apply ellipsis truncation to text based on width/height constraints
|
|
19708
|
+
/**
|
|
19709
|
+
* Apply ellipsis truncation to text based on width/height constraints
|
|
19710
19710
|
*/
|
|
19711
19711
|
function applyEllipsis(text, options) {
|
|
19712
19712
|
const {
|
|
@@ -19776,8 +19776,8 @@
|
|
|
19776
19776
|
};
|
|
19777
19777
|
}
|
|
19778
19778
|
|
|
19779
|
-
/**
|
|
19780
|
-
* Truncate text based on width constraint using binary search
|
|
19779
|
+
/**
|
|
19780
|
+
* Truncate text based on width constraint using binary search
|
|
19781
19781
|
*/
|
|
19782
19782
|
function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn) {
|
|
19783
19783
|
const graphemes = segmentGraphemes(text);
|
|
@@ -19827,8 +19827,8 @@
|
|
|
19827
19827
|
};
|
|
19828
19828
|
}
|
|
19829
19829
|
|
|
19830
|
-
/**
|
|
19831
|
-
* Truncate text based on height constraint
|
|
19830
|
+
/**
|
|
19831
|
+
* Truncate text based on height constraint
|
|
19832
19832
|
*/
|
|
19833
19833
|
function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
|
|
19834
19834
|
var _measureFn;
|
|
@@ -19876,19 +19876,19 @@
|
|
|
19876
19876
|
return truncateByWidth(lines[0], firstLineWidth, ellipsisChar, 0, measureFn);
|
|
19877
19877
|
}
|
|
19878
19878
|
|
|
19879
|
-
/**
|
|
19880
|
-
* Core Text Layout Engine
|
|
19881
|
-
*
|
|
19882
|
-
* Implements Konva-compatible text layout with support for:
|
|
19883
|
-
* - Multiple wrap modes (word/char/none)
|
|
19884
|
-
* - Ellipsis truncation
|
|
19885
|
-
* - Justify alignment with proper space distribution
|
|
19886
|
-
* - RTL/LTR text direction
|
|
19887
|
-
* - Advanced grapheme handling
|
|
19879
|
+
/**
|
|
19880
|
+
* Core Text Layout Engine
|
|
19881
|
+
*
|
|
19882
|
+
* Implements Konva-compatible text layout with support for:
|
|
19883
|
+
* - Multiple wrap modes (word/char/none)
|
|
19884
|
+
* - Ellipsis truncation
|
|
19885
|
+
* - Justify alignment with proper space distribution
|
|
19886
|
+
* - RTL/LTR text direction
|
|
19887
|
+
* - Advanced grapheme handling
|
|
19888
19888
|
*/
|
|
19889
19889
|
|
|
19890
|
-
/**
|
|
19891
|
-
* Main text layout function - converts text and options into positioned layout
|
|
19890
|
+
/**
|
|
19891
|
+
* Main text layout function - converts text and options into positioned layout
|
|
19892
19892
|
*/
|
|
19893
19893
|
function layoutText(options) {
|
|
19894
19894
|
var _ellipsisResult;
|
|
@@ -20007,8 +20007,8 @@
|
|
|
20007
20007
|
};
|
|
20008
20008
|
}
|
|
20009
20009
|
|
|
20010
|
-
/**
|
|
20011
|
-
* Layout a single paragraph with wrapping
|
|
20010
|
+
/**
|
|
20011
|
+
* Layout a single paragraph with wrapping
|
|
20012
20012
|
*/
|
|
20013
20013
|
function layoutParagraph(text, options) {
|
|
20014
20014
|
const {
|
|
@@ -20043,8 +20043,8 @@
|
|
|
20043
20043
|
return layoutLines;
|
|
20044
20044
|
}
|
|
20045
20045
|
|
|
20046
|
-
/**
|
|
20047
|
-
* Layout a single line of text (no wrapping)
|
|
20046
|
+
/**
|
|
20047
|
+
* Layout a single line of text (no wrapping)
|
|
20048
20048
|
*/
|
|
20049
20049
|
function layoutSingleLine(text, options) {
|
|
20050
20050
|
let textOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -20114,8 +20114,8 @@
|
|
|
20114
20114
|
};
|
|
20115
20115
|
}
|
|
20116
20116
|
|
|
20117
|
-
/**
|
|
20118
|
-
* Word-based wrapping algorithm
|
|
20117
|
+
/**
|
|
20118
|
+
* Word-based wrapping algorithm
|
|
20119
20119
|
*/
|
|
20120
20120
|
function wrapByWords(text, maxWidth, options) {
|
|
20121
20121
|
const lines = [];
|
|
@@ -20148,8 +20148,8 @@
|
|
|
20148
20148
|
return lines.length > 0 ? lines : [''];
|
|
20149
20149
|
}
|
|
20150
20150
|
|
|
20151
|
-
/**
|
|
20152
|
-
* Character-based wrapping algorithm
|
|
20151
|
+
/**
|
|
20152
|
+
* Character-based wrapping algorithm
|
|
20153
20153
|
*/
|
|
20154
20154
|
function wrapByCharacters(text, maxWidth, options) {
|
|
20155
20155
|
const lines = [];
|
|
@@ -20171,8 +20171,8 @@
|
|
|
20171
20171
|
return lines.length > 0 ? lines : [''];
|
|
20172
20172
|
}
|
|
20173
20173
|
|
|
20174
|
-
/**
|
|
20175
|
-
* Apply text alignment to lines
|
|
20174
|
+
/**
|
|
20175
|
+
* Apply text alignment to lines
|
|
20176
20176
|
*/
|
|
20177
20177
|
function applyAlignment(lines, align, containerWidth, options) {
|
|
20178
20178
|
return lines.map(line => {
|
|
@@ -20206,8 +20206,8 @@
|
|
|
20206
20206
|
});
|
|
20207
20207
|
}
|
|
20208
20208
|
|
|
20209
|
-
/**
|
|
20210
|
-
* Apply justify alignment by expanding spaces
|
|
20209
|
+
/**
|
|
20210
|
+
* Apply justify alignment by expanding spaces
|
|
20211
20211
|
*/
|
|
20212
20212
|
function applyJustification(line, containerWidth, options) {
|
|
20213
20213
|
const spaces = line.graphemes.filter(g => /\s/.test(g)).length;
|
|
@@ -20230,8 +20230,8 @@
|
|
|
20230
20230
|
return line;
|
|
20231
20231
|
}
|
|
20232
20232
|
|
|
20233
|
-
/**
|
|
20234
|
-
* Calculate vertical alignment offset
|
|
20233
|
+
/**
|
|
20234
|
+
* Calculate vertical alignment offset
|
|
20235
20235
|
*/
|
|
20236
20236
|
function calculateVerticalOffset(contentHeight, containerHeight, align) {
|
|
20237
20237
|
switch (align) {
|
|
@@ -20245,8 +20245,8 @@
|
|
|
20245
20245
|
}
|
|
20246
20246
|
}
|
|
20247
20247
|
|
|
20248
|
-
/**
|
|
20249
|
-
* Handle height overflow with ellipsis
|
|
20248
|
+
/**
|
|
20249
|
+
* Handle height overflow with ellipsis
|
|
20250
20250
|
*/
|
|
20251
20251
|
function handleHeightOverflow(existingLines, overflowLine, remainingHeight, options) {
|
|
20252
20252
|
// If ellipsis is enabled, try to fit part of the overflow line
|
|
@@ -20275,8 +20275,8 @@
|
|
|
20275
20275
|
};
|
|
20276
20276
|
}
|
|
20277
20277
|
|
|
20278
|
-
/**
|
|
20279
|
-
* Create empty line for empty paragraphs
|
|
20278
|
+
/**
|
|
20279
|
+
* Create empty line for empty paragraphs
|
|
20280
20280
|
*/
|
|
20281
20281
|
function createEmptyLine(options) {
|
|
20282
20282
|
const height = options.fontSize * options.lineHeight;
|
|
@@ -20292,8 +20292,8 @@
|
|
|
20292
20292
|
};
|
|
20293
20293
|
}
|
|
20294
20294
|
|
|
20295
|
-
/**
|
|
20296
|
-
* Measure width of a line of text
|
|
20295
|
+
/**
|
|
20296
|
+
* Measure width of a line of text
|
|
20297
20297
|
*/
|
|
20298
20298
|
function measureLineWidth(text, options) {
|
|
20299
20299
|
const graphemes = segmentGraphemes(text);
|
|
@@ -20310,8 +20310,8 @@
|
|
|
20310
20310
|
return width;
|
|
20311
20311
|
}
|
|
20312
20312
|
|
|
20313
|
-
/**
|
|
20314
|
-
* Convert layout options to measurement options
|
|
20313
|
+
/**
|
|
20314
|
+
* Convert layout options to measurement options
|
|
20315
20315
|
*/
|
|
20316
20316
|
function createMeasurementOptions(options) {
|
|
20317
20317
|
return {
|
|
@@ -20554,15 +20554,15 @@
|
|
|
20554
20554
|
}
|
|
20555
20555
|
}
|
|
20556
20556
|
|
|
20557
|
-
/**
|
|
20558
|
-
* Browser Line Break Extraction
|
|
20559
|
-
*
|
|
20560
|
-
* Captures exact line breaks as rendered by the browser to ensure
|
|
20561
|
-
* pixel-perfect consistency between DOM editing and canvas rendering.
|
|
20557
|
+
/**
|
|
20558
|
+
* Browser Line Break Extraction
|
|
20559
|
+
*
|
|
20560
|
+
* Captures exact line breaks as rendered by the browser to ensure
|
|
20561
|
+
* pixel-perfect consistency between DOM editing and canvas rendering.
|
|
20562
20562
|
*/
|
|
20563
20563
|
|
|
20564
|
-
/**
|
|
20565
|
-
* Segment text into graphemes safely using Intl.Segmenter or fallback
|
|
20564
|
+
/**
|
|
20565
|
+
* Segment text into graphemes safely using Intl.Segmenter or fallback
|
|
20566
20566
|
*/
|
|
20567
20567
|
function segmentIntoGraphemes(text) {
|
|
20568
20568
|
if (typeof Intl !== 'undefined' && Intl.Segmenter) {
|
|
@@ -20576,9 +20576,9 @@
|
|
|
20576
20576
|
return Array.from(text);
|
|
20577
20577
|
}
|
|
20578
20578
|
|
|
20579
|
-
/**
|
|
20580
|
-
* Extract line break information from a textarea by creating a mirror element
|
|
20581
|
-
* with identical computed styles and measuring grapheme positions.
|
|
20579
|
+
/**
|
|
20580
|
+
* Extract line break information from a textarea by creating a mirror element
|
|
20581
|
+
* with identical computed styles and measuring grapheme positions.
|
|
20582
20582
|
*/
|
|
20583
20583
|
function extractLinesFromDOM(textarea) {
|
|
20584
20584
|
const text = textarea.value;
|
|
@@ -20673,16 +20673,16 @@
|
|
|
20673
20673
|
}
|
|
20674
20674
|
}
|
|
20675
20675
|
|
|
20676
|
-
/**
|
|
20677
|
-
* Create a hash of layout-affecting properties to detect when browser lines are still valid
|
|
20676
|
+
/**
|
|
20677
|
+
* Create a hash of layout-affecting properties to detect when browser lines are still valid
|
|
20678
20678
|
*/
|
|
20679
20679
|
function createLayoutHash(target) {
|
|
20680
20680
|
const properties = [target.text, target.width, target.height, target.fontFamily, target.fontSize, target.fontWeight, target.fontStyle, target.lineHeight, target.charSpacing, target.textAlign, target.direction];
|
|
20681
20681
|
return properties.map(p => String(p)).join('|');
|
|
20682
20682
|
}
|
|
20683
20683
|
|
|
20684
|
-
/**
|
|
20685
|
-
* Check if stored browser lines are still valid for the current target state
|
|
20684
|
+
/**
|
|
20685
|
+
* Check if stored browser lines are still valid for the current target state
|
|
20686
20686
|
*/
|
|
20687
20687
|
function areBrowserLinesValid(target, storedHash) {
|
|
20688
20688
|
if (!storedHash || !target.__lastBrowserLines) {
|
|
@@ -20692,24 +20692,24 @@
|
|
|
20692
20692
|
return currentHash === storedHash;
|
|
20693
20693
|
}
|
|
20694
20694
|
|
|
20695
|
-
/**
|
|
20696
|
-
* Store browser lines on a target object with validity hash
|
|
20695
|
+
/**
|
|
20696
|
+
* Store browser lines on a target object with validity hash
|
|
20697
20697
|
*/
|
|
20698
20698
|
function storeBrowserLines(target, lines, layoutHash) {
|
|
20699
20699
|
target.__lastBrowserLines = lines;
|
|
20700
20700
|
target.__lastBrowserLinesHash = createLayoutHash(target);
|
|
20701
20701
|
}
|
|
20702
20702
|
|
|
20703
|
-
/**
|
|
20704
|
-
* Clear stored browser lines from a target object
|
|
20703
|
+
/**
|
|
20704
|
+
* Clear stored browser lines from a target object
|
|
20705
20705
|
*/
|
|
20706
20706
|
function clearBrowserLines(target) {
|
|
20707
20707
|
delete target.__lastBrowserLines;
|
|
20708
20708
|
delete target.__lastBrowserLinesHash;
|
|
20709
20709
|
}
|
|
20710
20710
|
|
|
20711
|
-
/**
|
|
20712
|
-
* Get stored browser lines if they're still valid
|
|
20711
|
+
/**
|
|
20712
|
+
* Get stored browser lines if they're still valid
|
|
20713
20713
|
*/
|
|
20714
20714
|
function getBrowserLines(target) {
|
|
20715
20715
|
const lines = target.__lastBrowserLines;
|
|
@@ -20722,9 +20722,9 @@
|
|
|
20722
20722
|
|
|
20723
20723
|
let measuringContext;
|
|
20724
20724
|
|
|
20725
|
-
/**
|
|
20726
|
-
* Return a context for measurement of text string.
|
|
20727
|
-
* if created it gets stored for reuse
|
|
20725
|
+
/**
|
|
20726
|
+
* Return a context for measurement of text string.
|
|
20727
|
+
* if created it gets stored for reuse
|
|
20728
20728
|
*/
|
|
20729
20729
|
function getMeasuringContext() {
|
|
20730
20730
|
if (!measuringContext) {
|
|
@@ -20737,17 +20737,17 @@
|
|
|
20737
20737
|
return measuringContext;
|
|
20738
20738
|
}
|
|
20739
20739
|
|
|
20740
|
-
/**
|
|
20741
|
-
* Measure and return the info of a single grapheme.
|
|
20742
|
-
* needs the the info of previous graphemes already filled
|
|
20743
|
-
* Override to customize measuring
|
|
20740
|
+
/**
|
|
20741
|
+
* Measure and return the info of a single grapheme.
|
|
20742
|
+
* needs the the info of previous graphemes already filled
|
|
20743
|
+
* Override to customize measuring
|
|
20744
20744
|
*/
|
|
20745
20745
|
|
|
20746
20746
|
// @TODO this is not complete
|
|
20747
20747
|
|
|
20748
|
-
/**
|
|
20749
|
-
* Text class
|
|
20750
|
-
* @see {@link http://fabricjs.com/fabric-intro-part-2#text}
|
|
20748
|
+
/**
|
|
20749
|
+
* Text class
|
|
20750
|
+
* @see {@link http://fabricjs.com/fabric-intro-part-2#text}
|
|
20751
20751
|
*/
|
|
20752
20752
|
class FabricText extends StyledText {
|
|
20753
20753
|
static getDefaults() {
|
|
@@ -20758,11 +20758,11 @@
|
|
|
20758
20758
|
}
|
|
20759
20759
|
constructor(text, options) {
|
|
20760
20760
|
super();
|
|
20761
|
-
/**
|
|
20762
|
-
* contains characters bounding boxes
|
|
20763
|
-
* This variable is considered to be protected.
|
|
20764
|
-
* But for how mixins are implemented right now, we can't leave it private
|
|
20765
|
-
* @protected
|
|
20761
|
+
/**
|
|
20762
|
+
* contains characters bounding boxes
|
|
20763
|
+
* This variable is considered to be protected.
|
|
20764
|
+
* But for how mixins are implemented right now, we can't leave it private
|
|
20765
|
+
* @protected
|
|
20766
20766
|
*/
|
|
20767
20767
|
_defineProperty(this, "__charBounds", []);
|
|
20768
20768
|
Object.assign(this, FabricText.ownDefaults);
|
|
@@ -20779,9 +20779,9 @@
|
|
|
20779
20779
|
this.setCoords();
|
|
20780
20780
|
}
|
|
20781
20781
|
|
|
20782
|
-
/**
|
|
20783
|
-
* If text has a path, it will add the extra information needed
|
|
20784
|
-
* for path and text calculations
|
|
20782
|
+
/**
|
|
20783
|
+
* If text has a path, it will add the extra information needed
|
|
20784
|
+
* for path and text calculations
|
|
20785
20785
|
*/
|
|
20786
20786
|
setPathInfo() {
|
|
20787
20787
|
const path = this.path;
|
|
@@ -20790,10 +20790,10 @@
|
|
|
20790
20790
|
}
|
|
20791
20791
|
}
|
|
20792
20792
|
|
|
20793
|
-
/**
|
|
20794
|
-
* @private
|
|
20795
|
-
* Divides text into lines of text and lines of graphemes.
|
|
20796
|
-
* Uses browser lines when available for pixel-perfect consistency.
|
|
20793
|
+
/**
|
|
20794
|
+
* @private
|
|
20795
|
+
* Divides text into lines of text and lines of graphemes.
|
|
20796
|
+
* Uses browser lines when available for pixel-perfect consistency.
|
|
20797
20797
|
*/
|
|
20798
20798
|
_splitText() {
|
|
20799
20799
|
// Check if we have valid browser lines and should use them
|
|
@@ -20809,9 +20809,9 @@
|
|
|
20809
20809
|
return newLines;
|
|
20810
20810
|
}
|
|
20811
20811
|
|
|
20812
|
-
/**
|
|
20813
|
-
* Create TextLinesInfo from browser-extracted lines
|
|
20814
|
-
* @private
|
|
20812
|
+
/**
|
|
20813
|
+
* Create TextLinesInfo from browser-extracted lines
|
|
20814
|
+
* @private
|
|
20815
20815
|
*/
|
|
20816
20816
|
_splitTextFromBrowserLines(browserLines) {
|
|
20817
20817
|
const lines = [];
|
|
@@ -20845,10 +20845,10 @@
|
|
|
20845
20845
|
return result;
|
|
20846
20846
|
}
|
|
20847
20847
|
|
|
20848
|
-
/**
|
|
20849
|
-
* Initialize or update text dimensions.
|
|
20850
|
-
* Updates this.width and this.height with the proper values.
|
|
20851
|
-
* Does not return dimensions.
|
|
20848
|
+
/**
|
|
20849
|
+
* Initialize or update text dimensions.
|
|
20850
|
+
* Updates this.width and this.height with the proper values.
|
|
20851
|
+
* Does not return dimensions.
|
|
20852
20852
|
*/
|
|
20853
20853
|
initDimensions() {
|
|
20854
20854
|
// Check if font is ready for accurate measurements
|
|
@@ -20894,8 +20894,8 @@
|
|
|
20894
20894
|
}
|
|
20895
20895
|
}
|
|
20896
20896
|
|
|
20897
|
-
/**
|
|
20898
|
-
* Enlarge space boxes and shift the others
|
|
20897
|
+
/**
|
|
20898
|
+
* Enlarge space boxes and shift the others
|
|
20899
20899
|
*/
|
|
20900
20900
|
enlargeSpaces() {
|
|
20901
20901
|
let diffSpace, currentLineWidth, numberOfSpaces, accumulatedSpace, line, charBound, spaces;
|
|
@@ -20957,18 +20957,18 @@
|
|
|
20957
20957
|
}
|
|
20958
20958
|
}
|
|
20959
20959
|
|
|
20960
|
-
/**
|
|
20961
|
-
* Advanced layout using new text engine (Konva-compatible)
|
|
20962
|
-
* @private
|
|
20960
|
+
/**
|
|
20961
|
+
* Advanced layout using new text engine (Konva-compatible)
|
|
20962
|
+
* @private
|
|
20963
20963
|
*/
|
|
20964
20964
|
_layoutTextAdvanced() {
|
|
20965
20965
|
const options = this._getAdvancedLayoutOptions();
|
|
20966
20966
|
return layoutText(options);
|
|
20967
20967
|
}
|
|
20968
20968
|
|
|
20969
|
-
/**
|
|
20970
|
-
* Get advanced layout options from current text properties
|
|
20971
|
-
* @private
|
|
20969
|
+
/**
|
|
20970
|
+
* Get advanced layout options from current text properties
|
|
20971
|
+
* @private
|
|
20972
20972
|
*/
|
|
20973
20973
|
_getAdvancedLayoutOptions() {
|
|
20974
20974
|
return {
|
|
@@ -20990,9 +20990,9 @@
|
|
|
20990
20990
|
};
|
|
20991
20991
|
}
|
|
20992
20992
|
|
|
20993
|
-
/**
|
|
20994
|
-
* Map Fabric textAlign to Konva align format
|
|
20995
|
-
* @private
|
|
20993
|
+
/**
|
|
20994
|
+
* Map Fabric textAlign to Konva align format
|
|
20995
|
+
* @private
|
|
20996
20996
|
*/
|
|
20997
20997
|
_mapTextAlignToAlign(textAlign) {
|
|
20998
20998
|
switch (textAlign) {
|
|
@@ -21013,8 +21013,8 @@
|
|
|
21013
21013
|
}
|
|
21014
21014
|
}
|
|
21015
21015
|
|
|
21016
|
-
/**
|
|
21017
|
-
* Enhanced initDimensions that uses advanced layout when enabled
|
|
21016
|
+
/**
|
|
21017
|
+
* Enhanced initDimensions that uses advanced layout when enabled
|
|
21018
21018
|
*/
|
|
21019
21019
|
initDimensionsAdvanced() {
|
|
21020
21020
|
if (!this.enableAdvancedLayout) {
|
|
@@ -21043,9 +21043,9 @@
|
|
|
21043
21043
|
this.dirty = true;
|
|
21044
21044
|
}
|
|
21045
21045
|
|
|
21046
|
-
/**
|
|
21047
|
-
* Convert new layout format to legacy _textLines and __charBounds format
|
|
21048
|
-
* @private
|
|
21046
|
+
/**
|
|
21047
|
+
* Convert new layout format to legacy _textLines and __charBounds format
|
|
21048
|
+
* @private
|
|
21049
21049
|
*/
|
|
21050
21050
|
_convertLayoutToLegacyFormat(layout) {
|
|
21051
21051
|
this._textLines = layout.lines.map(line => line.graphemes);
|
|
@@ -21067,30 +21067,30 @@
|
|
|
21067
21067
|
}
|
|
21068
21068
|
}
|
|
21069
21069
|
|
|
21070
|
-
/**
|
|
21071
|
-
* Detect if the text line is ended with an hard break
|
|
21072
|
-
* text and itext do not have wrapping, return false
|
|
21073
|
-
* @return {Boolean}
|
|
21070
|
+
/**
|
|
21071
|
+
* Detect if the text line is ended with an hard break
|
|
21072
|
+
* text and itext do not have wrapping, return false
|
|
21073
|
+
* @return {Boolean}
|
|
21074
21074
|
*/
|
|
21075
21075
|
isEndOfWrapping(lineIndex) {
|
|
21076
21076
|
return lineIndex === this._textLines.length - 1;
|
|
21077
21077
|
}
|
|
21078
21078
|
|
|
21079
|
-
/**
|
|
21080
|
-
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
21081
|
-
* and counting style.
|
|
21082
|
-
* It return always 1 for text and Itext. Textbox has its own implementation
|
|
21083
|
-
* @return Number
|
|
21079
|
+
/**
|
|
21080
|
+
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
21081
|
+
* and counting style.
|
|
21082
|
+
* It return always 1 for text and Itext. Textbox has its own implementation
|
|
21083
|
+
* @return Number
|
|
21084
21084
|
*/
|
|
21085
21085
|
|
|
21086
21086
|
missingNewlineOffset(_lineIndex) {
|
|
21087
21087
|
return 1;
|
|
21088
21088
|
}
|
|
21089
21089
|
|
|
21090
|
-
/**
|
|
21091
|
-
* Returns 2d representation (lineIndex and charIndex) of cursor
|
|
21092
|
-
* @param {Number} selectionStart
|
|
21093
|
-
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
21090
|
+
/**
|
|
21091
|
+
* Returns 2d representation (lineIndex and charIndex) of cursor
|
|
21092
|
+
* @param {Number} selectionStart
|
|
21093
|
+
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
21094
21094
|
*/
|
|
21095
21095
|
get2DCursorLocation(selectionStart, skipWrapping) {
|
|
21096
21096
|
const lines = skipWrapping ? this._unwrappedTextLines : this._textLines;
|
|
@@ -21110,24 +21110,24 @@
|
|
|
21110
21110
|
};
|
|
21111
21111
|
}
|
|
21112
21112
|
|
|
21113
|
-
/**
|
|
21114
|
-
* Returns string representation of an instance
|
|
21115
|
-
* @return {String} String representation of text object
|
|
21113
|
+
/**
|
|
21114
|
+
* Returns string representation of an instance
|
|
21115
|
+
* @return {String} String representation of text object
|
|
21116
21116
|
*/
|
|
21117
21117
|
toString() {
|
|
21118
21118
|
return `#<Text (${this.complexity()}): { "text": "${this.text}", "fontFamily": "${this.fontFamily}" }>`;
|
|
21119
21119
|
}
|
|
21120
21120
|
|
|
21121
|
-
/**
|
|
21122
|
-
* Return the dimension and the zoom level needed to create a cache canvas
|
|
21123
|
-
* big enough to host the object to be cached.
|
|
21124
|
-
* @private
|
|
21125
|
-
* @param {Object} dim.x width of object to be cached
|
|
21126
|
-
* @param {Object} dim.y height of object to be cached
|
|
21127
|
-
* @return {Object}.width width of canvas
|
|
21128
|
-
* @return {Object}.height height of canvas
|
|
21129
|
-
* @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
|
|
21130
|
-
* @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
|
|
21121
|
+
/**
|
|
21122
|
+
* Return the dimension and the zoom level needed to create a cache canvas
|
|
21123
|
+
* big enough to host the object to be cached.
|
|
21124
|
+
* @private
|
|
21125
|
+
* @param {Object} dim.x width of object to be cached
|
|
21126
|
+
* @param {Object} dim.y height of object to be cached
|
|
21127
|
+
* @return {Object}.width width of canvas
|
|
21128
|
+
* @return {Object}.height height of canvas
|
|
21129
|
+
* @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
|
|
21130
|
+
* @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
|
|
21131
21131
|
*/
|
|
21132
21132
|
_getCacheCanvasDimensions() {
|
|
21133
21133
|
const dims = super._getCacheCanvasDimensions();
|
|
@@ -21137,9 +21137,9 @@
|
|
|
21137
21137
|
return dims;
|
|
21138
21138
|
}
|
|
21139
21139
|
|
|
21140
|
-
/**
|
|
21141
|
-
* @private
|
|
21142
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21140
|
+
/**
|
|
21141
|
+
* @private
|
|
21142
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21143
21143
|
*/
|
|
21144
21144
|
_render(ctx) {
|
|
21145
21145
|
const path = this.path;
|
|
@@ -21152,9 +21152,9 @@
|
|
|
21152
21152
|
this._renderTextDecoration(ctx, 'linethrough');
|
|
21153
21153
|
}
|
|
21154
21154
|
|
|
21155
|
-
/**
|
|
21156
|
-
* @private
|
|
21157
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21155
|
+
/**
|
|
21156
|
+
* @private
|
|
21157
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21158
21158
|
*/
|
|
21159
21159
|
_renderText(ctx) {
|
|
21160
21160
|
// Skip text rendering if in overlay editing mode
|
|
@@ -21170,15 +21170,15 @@
|
|
|
21170
21170
|
}
|
|
21171
21171
|
}
|
|
21172
21172
|
|
|
21173
|
-
/**
|
|
21174
|
-
* Set the font parameter of the context with the object properties or with charStyle
|
|
21175
|
-
* @private
|
|
21176
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21177
|
-
* @param {Object} [charStyle] object with font style properties
|
|
21178
|
-
* @param {String} [charStyle.fontFamily] Font Family
|
|
21179
|
-
* @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
|
|
21180
|
-
* @param {String} [charStyle.fontWeight] Font weight
|
|
21181
|
-
* @param {String} [charStyle.fontStyle] Font style (italic|normal)
|
|
21173
|
+
/**
|
|
21174
|
+
* Set the font parameter of the context with the object properties or with charStyle
|
|
21175
|
+
* @private
|
|
21176
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21177
|
+
* @param {Object} [charStyle] object with font style properties
|
|
21178
|
+
* @param {String} [charStyle.fontFamily] Font Family
|
|
21179
|
+
* @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
|
|
21180
|
+
* @param {String} [charStyle.fontWeight] Font weight
|
|
21181
|
+
* @param {String} [charStyle.fontStyle] Font style (italic|normal)
|
|
21182
21182
|
*/
|
|
21183
21183
|
_setTextStyles(ctx, charStyle, forMeasuring) {
|
|
21184
21184
|
ctx.textBaseline = 'alphabetic';
|
|
@@ -21198,11 +21198,11 @@
|
|
|
21198
21198
|
ctx.font = this._getFontDeclaration(charStyle, forMeasuring);
|
|
21199
21199
|
}
|
|
21200
21200
|
|
|
21201
|
-
/**
|
|
21202
|
-
* calculate and return the text Width measuring each line.
|
|
21203
|
-
* @private
|
|
21204
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21205
|
-
* @return {Number} Maximum width of Text object
|
|
21201
|
+
/**
|
|
21202
|
+
* calculate and return the text Width measuring each line.
|
|
21203
|
+
* @private
|
|
21204
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21205
|
+
* @return {Number} Maximum width of Text object
|
|
21206
21206
|
*/
|
|
21207
21207
|
calcTextWidth() {
|
|
21208
21208
|
let maxWidth = this.getLineWidth(0);
|
|
@@ -21215,23 +21215,23 @@
|
|
|
21215
21215
|
return maxWidth;
|
|
21216
21216
|
}
|
|
21217
21217
|
|
|
21218
|
-
/**
|
|
21219
|
-
* @private
|
|
21220
|
-
* @param {String} method Method name ("fillText" or "strokeText")
|
|
21221
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21222
|
-
* @param {String} line Text to render
|
|
21223
|
-
* @param {Number} left Left position of text
|
|
21224
|
-
* @param {Number} top Top position of text
|
|
21225
|
-
* @param {Number} lineIndex Index of a line in a text
|
|
21218
|
+
/**
|
|
21219
|
+
* @private
|
|
21220
|
+
* @param {String} method Method name ("fillText" or "strokeText")
|
|
21221
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21222
|
+
* @param {String} line Text to render
|
|
21223
|
+
* @param {Number} left Left position of text
|
|
21224
|
+
* @param {Number} top Top position of text
|
|
21225
|
+
* @param {Number} lineIndex Index of a line in a text
|
|
21226
21226
|
*/
|
|
21227
21227
|
_renderTextLine(method, ctx, line, left, top, lineIndex) {
|
|
21228
21228
|
this._renderChars(method, ctx, line, left, top, lineIndex);
|
|
21229
21229
|
}
|
|
21230
21230
|
|
|
21231
|
-
/**
|
|
21232
|
-
* Renders the text background for lines, taking care of style
|
|
21233
|
-
* @private
|
|
21234
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21231
|
+
/**
|
|
21232
|
+
* Renders the text background for lines, taking care of style
|
|
21233
|
+
* @private
|
|
21234
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21235
21235
|
*/
|
|
21236
21236
|
_renderTextLinesBackground(ctx) {
|
|
21237
21237
|
if (!this.textBackgroundColor && !this.styleHas('textBackgroundColor')) {
|
|
@@ -21294,15 +21294,15 @@
|
|
|
21294
21294
|
this._removeShadow(ctx);
|
|
21295
21295
|
}
|
|
21296
21296
|
|
|
21297
|
-
/**
|
|
21298
|
-
* measure and return the width of a single character.
|
|
21299
|
-
* possibly overridden to accommodate different measure logic or
|
|
21300
|
-
* to hook some external lib for character measurement
|
|
21301
|
-
* @private
|
|
21302
|
-
* @param {String} _char, char to be measured
|
|
21303
|
-
* @param {Object} charStyle style of char to be measured
|
|
21304
|
-
* @param {String} [previousChar] previous char
|
|
21305
|
-
* @param {Object} [prevCharStyle] style of previous char
|
|
21297
|
+
/**
|
|
21298
|
+
* measure and return the width of a single character.
|
|
21299
|
+
* possibly overridden to accommodate different measure logic or
|
|
21300
|
+
* to hook some external lib for character measurement
|
|
21301
|
+
* @private
|
|
21302
|
+
* @param {String} _char, char to be measured
|
|
21303
|
+
* @param {Object} charStyle style of char to be measured
|
|
21304
|
+
* @param {String} [previousChar] previous char
|
|
21305
|
+
* @param {Object} [prevCharStyle] style of previous char
|
|
21306
21306
|
*/
|
|
21307
21307
|
_measureChar(_char, charStyle, previousChar, prevCharStyle) {
|
|
21308
21308
|
const fontCache = cache.getFontCache(charStyle),
|
|
@@ -21347,19 +21347,19 @@
|
|
|
21347
21347
|
};
|
|
21348
21348
|
}
|
|
21349
21349
|
|
|
21350
|
-
/**
|
|
21351
|
-
* Computes height of character at given position
|
|
21352
|
-
* @param {Number} line the line index number
|
|
21353
|
-
* @param {Number} _char the character index number
|
|
21354
|
-
* @return {Number} fontSize of the character
|
|
21350
|
+
/**
|
|
21351
|
+
* Computes height of character at given position
|
|
21352
|
+
* @param {Number} line the line index number
|
|
21353
|
+
* @param {Number} _char the character index number
|
|
21354
|
+
* @return {Number} fontSize of the character
|
|
21355
21355
|
*/
|
|
21356
21356
|
getHeightOfChar(line, _char) {
|
|
21357
21357
|
return this.getValueOfPropertyAt(line, _char, 'fontSize');
|
|
21358
21358
|
}
|
|
21359
21359
|
|
|
21360
|
-
/**
|
|
21361
|
-
* measure a text line measuring all characters.
|
|
21362
|
-
* @param {Number} lineIndex line number
|
|
21360
|
+
/**
|
|
21361
|
+
* measure a text line measuring all characters.
|
|
21362
|
+
* @param {Number} lineIndex line number
|
|
21363
21363
|
*/
|
|
21364
21364
|
measureLine(lineIndex) {
|
|
21365
21365
|
const lineInfo = this._measureLine(lineIndex);
|
|
@@ -21372,11 +21372,11 @@
|
|
|
21372
21372
|
return lineInfo;
|
|
21373
21373
|
}
|
|
21374
21374
|
|
|
21375
|
-
/**
|
|
21376
|
-
* measure every grapheme of a line, populating __charBounds
|
|
21377
|
-
* @param {Number} lineIndex
|
|
21378
|
-
* @return {Object} object.width total width of characters
|
|
21379
|
-
* @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
|
|
21375
|
+
/**
|
|
21376
|
+
* measure every grapheme of a line, populating __charBounds
|
|
21377
|
+
* @param {Number} lineIndex
|
|
21378
|
+
* @return {Object} object.width total width of characters
|
|
21379
|
+
* @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
|
|
21380
21380
|
*/
|
|
21381
21381
|
_measureLine(lineIndex) {
|
|
21382
21382
|
let width = 0,
|
|
@@ -21439,13 +21439,13 @@
|
|
|
21439
21439
|
};
|
|
21440
21440
|
}
|
|
21441
21441
|
|
|
21442
|
-
/**
|
|
21443
|
-
* Calculate the angle and the left,top position of the char that follow a path.
|
|
21444
|
-
* It appends it to graphemeInfo to be reused later at rendering
|
|
21445
|
-
* @private
|
|
21446
|
-
* @param {Number} positionInPath to be measured
|
|
21447
|
-
* @param {GraphemeBBox} graphemeInfo current grapheme box information
|
|
21448
|
-
* @param {Object} startingPoint position of the point
|
|
21442
|
+
/**
|
|
21443
|
+
* Calculate the angle and the left,top position of the char that follow a path.
|
|
21444
|
+
* It appends it to graphemeInfo to be reused later at rendering
|
|
21445
|
+
* @private
|
|
21446
|
+
* @param {Number} positionInPath to be measured
|
|
21447
|
+
* @param {GraphemeBBox} graphemeInfo current grapheme box information
|
|
21448
|
+
* @param {Object} startingPoint position of the point
|
|
21449
21449
|
*/
|
|
21450
21450
|
_setGraphemeOnPath(positionInPath, graphemeInfo) {
|
|
21451
21451
|
const centerPosition = positionInPath + graphemeInfo.kernedWidth / 2,
|
|
@@ -21458,13 +21458,13 @@
|
|
|
21458
21458
|
graphemeInfo.angle = info.angle + (this.pathSide === RIGHT ? Math.PI : 0);
|
|
21459
21459
|
}
|
|
21460
21460
|
|
|
21461
|
-
/**
|
|
21462
|
-
*
|
|
21463
|
-
* @param {String} grapheme to be measured
|
|
21464
|
-
* @param {Number} lineIndex index of the line where the char is
|
|
21465
|
-
* @param {Number} charIndex position in the line
|
|
21466
|
-
* @param {String} [prevGrapheme] character preceding the one to be measured
|
|
21467
|
-
* @returns {GraphemeBBox} grapheme bbox
|
|
21461
|
+
/**
|
|
21462
|
+
*
|
|
21463
|
+
* @param {String} grapheme to be measured
|
|
21464
|
+
* @param {Number} lineIndex index of the line where the char is
|
|
21465
|
+
* @param {Number} charIndex position in the line
|
|
21466
|
+
* @param {String} [prevGrapheme] character preceding the one to be measured
|
|
21467
|
+
* @returns {GraphemeBBox} grapheme bbox
|
|
21468
21468
|
*/
|
|
21469
21469
|
_getGraphemeBox(grapheme, lineIndex, charIndex, prevGrapheme, skipLeft) {
|
|
21470
21470
|
const style = this.getCompleteStyleDeclaration(lineIndex, charIndex),
|
|
@@ -21492,10 +21492,10 @@
|
|
|
21492
21492
|
return box;
|
|
21493
21493
|
}
|
|
21494
21494
|
|
|
21495
|
-
/**
|
|
21496
|
-
* Calculate height of line at 'lineIndex'
|
|
21497
|
-
* @param {Number} lineIndex index of line to calculate
|
|
21498
|
-
* @return {Number}
|
|
21495
|
+
/**
|
|
21496
|
+
* Calculate height of line at 'lineIndex'
|
|
21497
|
+
* @param {Number} lineIndex index of line to calculate
|
|
21498
|
+
* @return {Number}
|
|
21499
21499
|
*/
|
|
21500
21500
|
getHeightOfLine(lineIndex) {
|
|
21501
21501
|
if (this.__lineHeights[lineIndex]) {
|
|
@@ -21511,8 +21511,8 @@
|
|
|
21511
21511
|
return this.__lineHeights[lineIndex] = maxHeight * this.lineHeight * this._fontSizeMult;
|
|
21512
21512
|
}
|
|
21513
21513
|
|
|
21514
|
-
/**
|
|
21515
|
-
* Calculate text box height
|
|
21514
|
+
/**
|
|
21515
|
+
* Calculate text box height
|
|
21516
21516
|
*/
|
|
21517
21517
|
calcTextHeight() {
|
|
21518
21518
|
let lineHeight,
|
|
@@ -21524,26 +21524,26 @@
|
|
|
21524
21524
|
return height;
|
|
21525
21525
|
}
|
|
21526
21526
|
|
|
21527
|
-
/**
|
|
21528
|
-
* @private
|
|
21529
|
-
* @return {Number} Left offset
|
|
21527
|
+
/**
|
|
21528
|
+
* @private
|
|
21529
|
+
* @return {Number} Left offset
|
|
21530
21530
|
*/
|
|
21531
21531
|
_getLeftOffset() {
|
|
21532
21532
|
return this.direction === 'ltr' ? -this.width / 2 : this.width / 2;
|
|
21533
21533
|
}
|
|
21534
21534
|
|
|
21535
|
-
/**
|
|
21536
|
-
* @private
|
|
21537
|
-
* @return {Number} Top offset
|
|
21535
|
+
/**
|
|
21536
|
+
* @private
|
|
21537
|
+
* @return {Number} Top offset
|
|
21538
21538
|
*/
|
|
21539
21539
|
_getTopOffset() {
|
|
21540
21540
|
return -this.height / 2;
|
|
21541
21541
|
}
|
|
21542
21542
|
|
|
21543
|
-
/**
|
|
21544
|
-
* @private
|
|
21545
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21546
|
-
* @param {String} method Method name ("fillText" or "strokeText")
|
|
21543
|
+
/**
|
|
21544
|
+
* @private
|
|
21545
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21546
|
+
* @param {String} method Method name ("fillText" or "strokeText")
|
|
21547
21547
|
*/
|
|
21548
21548
|
_renderTextCommon(ctx, method) {
|
|
21549
21549
|
ctx.save();
|
|
@@ -21560,9 +21560,9 @@
|
|
|
21560
21560
|
ctx.restore();
|
|
21561
21561
|
}
|
|
21562
21562
|
|
|
21563
|
-
/**
|
|
21564
|
-
* @private
|
|
21565
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21563
|
+
/**
|
|
21564
|
+
* @private
|
|
21565
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21566
21566
|
*/
|
|
21567
21567
|
_renderTextFill(ctx) {
|
|
21568
21568
|
if (!this.fill && !this.styleHas(FILL)) {
|
|
@@ -21571,9 +21571,9 @@
|
|
|
21571
21571
|
this._renderTextCommon(ctx, 'fillText');
|
|
21572
21572
|
}
|
|
21573
21573
|
|
|
21574
|
-
/**
|
|
21575
|
-
* @private
|
|
21576
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21574
|
+
/**
|
|
21575
|
+
* @private
|
|
21576
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21577
21577
|
*/
|
|
21578
21578
|
_renderTextStroke(ctx) {
|
|
21579
21579
|
if ((!this.stroke || this.strokeWidth === 0) && this.isEmptyStyles()) {
|
|
@@ -21590,14 +21590,14 @@
|
|
|
21590
21590
|
ctx.restore();
|
|
21591
21591
|
}
|
|
21592
21592
|
|
|
21593
|
-
/**
|
|
21594
|
-
* @private
|
|
21595
|
-
* @param {String} method fillText or strokeText.
|
|
21596
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21597
|
-
* @param {Array} line Content of the line, splitted in an array by grapheme
|
|
21598
|
-
* @param {Number} left
|
|
21599
|
-
* @param {Number} top
|
|
21600
|
-
* @param {Number} lineIndex
|
|
21593
|
+
/**
|
|
21594
|
+
* @private
|
|
21595
|
+
* @param {String} method fillText or strokeText.
|
|
21596
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21597
|
+
* @param {Array} line Content of the line, splitted in an array by grapheme
|
|
21598
|
+
* @param {Number} left
|
|
21599
|
+
* @param {Number} top
|
|
21600
|
+
* @param {Number} lineIndex
|
|
21601
21601
|
*/
|
|
21602
21602
|
_renderChars(method, ctx, line, left, top, lineIndex) {
|
|
21603
21603
|
const lineHeight = this.getHeightOfLine(lineIndex),
|
|
@@ -21679,16 +21679,16 @@
|
|
|
21679
21679
|
ctx.restore();
|
|
21680
21680
|
}
|
|
21681
21681
|
|
|
21682
|
-
/**
|
|
21683
|
-
* This function try to patch the missing gradientTransform on canvas gradients.
|
|
21684
|
-
* transforming a context to transform the gradient, is going to transform the stroke too.
|
|
21685
|
-
* we want to transform the gradient but not the stroke operation, so we create
|
|
21686
|
-
* a transformed gradient on a pattern and then we use the pattern instead of the gradient.
|
|
21687
|
-
* this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
|
|
21688
|
-
* is limited.
|
|
21689
|
-
* @private
|
|
21690
|
-
* @param {TFiller} filler a fabric gradient instance
|
|
21691
|
-
* @return {CanvasPattern} a pattern to use as fill/stroke style
|
|
21682
|
+
/**
|
|
21683
|
+
* This function try to patch the missing gradientTransform on canvas gradients.
|
|
21684
|
+
* transforming a context to transform the gradient, is going to transform the stroke too.
|
|
21685
|
+
* we want to transform the gradient but not the stroke operation, so we create
|
|
21686
|
+
* a transformed gradient on a pattern and then we use the pattern instead of the gradient.
|
|
21687
|
+
* this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
|
|
21688
|
+
* is limited.
|
|
21689
|
+
* @private
|
|
21690
|
+
* @param {TFiller} filler a fabric gradient instance
|
|
21691
|
+
* @return {CanvasPattern} a pattern to use as fill/stroke style
|
|
21692
21692
|
*/
|
|
21693
21693
|
_applyPatternGradientTransformText(filler) {
|
|
21694
21694
|
// TODO: verify compatibility with strokeUniform
|
|
@@ -21744,12 +21744,12 @@
|
|
|
21744
21744
|
};
|
|
21745
21745
|
}
|
|
21746
21746
|
|
|
21747
|
-
/**
|
|
21748
|
-
* This function prepare the canvas for a stroke style, and stroke and strokeWidth
|
|
21749
|
-
* need to be sent in as defined
|
|
21750
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
21751
|
-
* @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
|
|
21752
|
-
* @returns
|
|
21747
|
+
/**
|
|
21748
|
+
* This function prepare the canvas for a stroke style, and stroke and strokeWidth
|
|
21749
|
+
* need to be sent in as defined
|
|
21750
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
21751
|
+
* @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
|
|
21752
|
+
* @returns
|
|
21753
21753
|
*/
|
|
21754
21754
|
_setStrokeStyles(ctx, _ref) {
|
|
21755
21755
|
let {
|
|
@@ -21764,12 +21764,12 @@
|
|
|
21764
21764
|
return this.handleFiller(ctx, 'strokeStyle', stroke);
|
|
21765
21765
|
}
|
|
21766
21766
|
|
|
21767
|
-
/**
|
|
21768
|
-
* This function prepare the canvas for a ill style, and fill
|
|
21769
|
-
* need to be sent in as defined
|
|
21770
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
21771
|
-
* @param {CompleteTextStyleDeclaration} style with ill defined
|
|
21772
|
-
* @returns
|
|
21767
|
+
/**
|
|
21768
|
+
* This function prepare the canvas for a ill style, and fill
|
|
21769
|
+
* need to be sent in as defined
|
|
21770
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
21771
|
+
* @param {CompleteTextStyleDeclaration} style with ill defined
|
|
21772
|
+
* @returns
|
|
21773
21773
|
*/
|
|
21774
21774
|
_setFillStyles(ctx, _ref2) {
|
|
21775
21775
|
let {
|
|
@@ -21778,16 +21778,16 @@
|
|
|
21778
21778
|
return this.handleFiller(ctx, 'fillStyle', fill);
|
|
21779
21779
|
}
|
|
21780
21780
|
|
|
21781
|
-
/**
|
|
21782
|
-
* @private
|
|
21783
|
-
* @param {String} method
|
|
21784
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21785
|
-
* @param {Number} lineIndex
|
|
21786
|
-
* @param {Number} charIndex
|
|
21787
|
-
* @param {String} _char
|
|
21788
|
-
* @param {Number} left Left coordinate
|
|
21789
|
-
* @param {Number} top Top coordinate
|
|
21790
|
-
* @param {Number} lineHeight Height of the line
|
|
21781
|
+
/**
|
|
21782
|
+
* @private
|
|
21783
|
+
* @param {String} method
|
|
21784
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21785
|
+
* @param {Number} lineIndex
|
|
21786
|
+
* @param {Number} charIndex
|
|
21787
|
+
* @param {String} _char
|
|
21788
|
+
* @param {Number} left Left coordinate
|
|
21789
|
+
* @param {Number} top Top coordinate
|
|
21790
|
+
* @param {Number} lineHeight Height of the line
|
|
21791
21791
|
*/
|
|
21792
21792
|
_renderChar(method, ctx, lineIndex, charIndex, _char, left, top) {
|
|
21793
21793
|
const decl = this._getStyleDeclaration(lineIndex, charIndex),
|
|
@@ -21816,30 +21816,30 @@
|
|
|
21816
21816
|
ctx.restore();
|
|
21817
21817
|
}
|
|
21818
21818
|
|
|
21819
|
-
/**
|
|
21820
|
-
* Turns the character into a 'superior figure' (i.e. 'superscript')
|
|
21821
|
-
* @param {Number} start selection start
|
|
21822
|
-
* @param {Number} end selection end
|
|
21819
|
+
/**
|
|
21820
|
+
* Turns the character into a 'superior figure' (i.e. 'superscript')
|
|
21821
|
+
* @param {Number} start selection start
|
|
21822
|
+
* @param {Number} end selection end
|
|
21823
21823
|
*/
|
|
21824
21824
|
setSuperscript(start, end) {
|
|
21825
21825
|
this._setScript(start, end, this.superscript);
|
|
21826
21826
|
}
|
|
21827
21827
|
|
|
21828
|
-
/**
|
|
21829
|
-
* Turns the character into an 'inferior figure' (i.e. 'subscript')
|
|
21830
|
-
* @param {Number} start selection start
|
|
21831
|
-
* @param {Number} end selection end
|
|
21828
|
+
/**
|
|
21829
|
+
* Turns the character into an 'inferior figure' (i.e. 'subscript')
|
|
21830
|
+
* @param {Number} start selection start
|
|
21831
|
+
* @param {Number} end selection end
|
|
21832
21832
|
*/
|
|
21833
21833
|
setSubscript(start, end) {
|
|
21834
21834
|
this._setScript(start, end, this.subscript);
|
|
21835
21835
|
}
|
|
21836
21836
|
|
|
21837
|
-
/**
|
|
21838
|
-
* Applies 'schema' at given position
|
|
21839
|
-
* @private
|
|
21840
|
-
* @param {Number} start selection start
|
|
21841
|
-
* @param {Number} end selection end
|
|
21842
|
-
* @param {Number} schema
|
|
21837
|
+
/**
|
|
21838
|
+
* Applies 'schema' at given position
|
|
21839
|
+
* @private
|
|
21840
|
+
* @param {Number} start selection start
|
|
21841
|
+
* @param {Number} end selection end
|
|
21842
|
+
* @param {Number} schema
|
|
21843
21843
|
*/
|
|
21844
21844
|
_setScript(start, end, schema) {
|
|
21845
21845
|
const loc = this.get2DCursorLocation(start, true),
|
|
@@ -21852,10 +21852,10 @@
|
|
|
21852
21852
|
this.setSelectionStyles(style, start, end);
|
|
21853
21853
|
}
|
|
21854
21854
|
|
|
21855
|
-
/**
|
|
21856
|
-
* @private
|
|
21857
|
-
* @param {Number} lineIndex index text line
|
|
21858
|
-
* @return {Number} Line left offset
|
|
21855
|
+
/**
|
|
21856
|
+
* @private
|
|
21857
|
+
* @param {Number} lineIndex index text line
|
|
21858
|
+
* @return {Number} Line left offset
|
|
21859
21859
|
*/
|
|
21860
21860
|
_getLineLeftOffset(lineIndex) {
|
|
21861
21861
|
const lineWidth = this.getLineWidth(lineIndex),
|
|
@@ -21905,8 +21905,8 @@
|
|
|
21905
21905
|
return leftOffset;
|
|
21906
21906
|
}
|
|
21907
21907
|
|
|
21908
|
-
/**
|
|
21909
|
-
* @private
|
|
21908
|
+
/**
|
|
21909
|
+
* @private
|
|
21910
21910
|
*/
|
|
21911
21911
|
_clearCache() {
|
|
21912
21912
|
this._forceClearCache = false;
|
|
@@ -21915,12 +21915,12 @@
|
|
|
21915
21915
|
this.__charBounds = [];
|
|
21916
21916
|
}
|
|
21917
21917
|
|
|
21918
|
-
/**
|
|
21919
|
-
* Measure a single line given its index. Used to calculate the initial
|
|
21920
|
-
* text bounding box. The values are calculated and stored in __lineWidths cache.
|
|
21921
|
-
* @private
|
|
21922
|
-
* @param {Number} lineIndex line number
|
|
21923
|
-
* @return {Number} Line width
|
|
21918
|
+
/**
|
|
21919
|
+
* Measure a single line given its index. Used to calculate the initial
|
|
21920
|
+
* text bounding box. The values are calculated and stored in __lineWidths cache.
|
|
21921
|
+
* @private
|
|
21922
|
+
* @param {Number} lineIndex line number
|
|
21923
|
+
* @return {Number} Line width
|
|
21924
21924
|
*/
|
|
21925
21925
|
getLineWidth(lineIndex) {
|
|
21926
21926
|
if (this.__lineWidths[lineIndex] !== undefined) {
|
|
@@ -21939,12 +21939,12 @@
|
|
|
21939
21939
|
return 0;
|
|
21940
21940
|
}
|
|
21941
21941
|
|
|
21942
|
-
/**
|
|
21943
|
-
* Retrieves the value of property at given character position
|
|
21944
|
-
* @param {Number} lineIndex the line number
|
|
21945
|
-
* @param {Number} charIndex the character number
|
|
21946
|
-
* @param {String} property the property name
|
|
21947
|
-
* @returns the value of 'property'
|
|
21942
|
+
/**
|
|
21943
|
+
* Retrieves the value of property at given character position
|
|
21944
|
+
* @param {Number} lineIndex the line number
|
|
21945
|
+
* @param {Number} charIndex the character number
|
|
21946
|
+
* @param {String} property the property name
|
|
21947
|
+
* @returns the value of 'property'
|
|
21948
21948
|
*/
|
|
21949
21949
|
getValueOfPropertyAt(lineIndex, charIndex, property) {
|
|
21950
21950
|
var _charStyle$property;
|
|
@@ -21952,9 +21952,9 @@
|
|
|
21952
21952
|
return (_charStyle$property = charStyle[property]) !== null && _charStyle$property !== void 0 ? _charStyle$property : this[property];
|
|
21953
21953
|
}
|
|
21954
21954
|
|
|
21955
|
-
/**
|
|
21956
|
-
* @private
|
|
21957
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21955
|
+
/**
|
|
21956
|
+
* @private
|
|
21957
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21958
21958
|
*/
|
|
21959
21959
|
_renderTextDecoration(ctx, type) {
|
|
21960
21960
|
if (!this[type] && !this.styleHas(type)) {
|
|
@@ -22038,10 +22038,10 @@
|
|
|
22038
22038
|
this._removeShadow(ctx);
|
|
22039
22039
|
}
|
|
22040
22040
|
|
|
22041
|
-
/**
|
|
22042
|
-
* return font declaration string for canvas context
|
|
22043
|
-
* @param {Object} [styleObject] object
|
|
22044
|
-
* @returns {String} font declaration formatted for canvas context.
|
|
22041
|
+
/**
|
|
22042
|
+
* return font declaration string for canvas context
|
|
22043
|
+
* @param {Object} [styleObject] object
|
|
22044
|
+
* @returns {String} font declaration formatted for canvas context.
|
|
22045
22045
|
*/
|
|
22046
22046
|
_getFontDeclaration() {
|
|
22047
22047
|
let {
|
|
@@ -22067,9 +22067,9 @@
|
|
|
22067
22067
|
return [fontStyle, fontWeight, `${forMeasuring ? this.CACHE_FONT_SIZE : fontSize}px`, parsedFontFamily].join(' ');
|
|
22068
22068
|
}
|
|
22069
22069
|
|
|
22070
|
-
/**
|
|
22071
|
-
* Renders text instance on a specified context
|
|
22072
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
22070
|
+
/**
|
|
22071
|
+
* Renders text instance on a specified context
|
|
22072
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
22073
22073
|
*/
|
|
22074
22074
|
render(ctx) {
|
|
22075
22075
|
if (!this.visible) {
|
|
@@ -22084,22 +22084,22 @@
|
|
|
22084
22084
|
super.render(ctx);
|
|
22085
22085
|
}
|
|
22086
22086
|
|
|
22087
|
-
/**
|
|
22088
|
-
* Override this method to customize grapheme splitting
|
|
22089
|
-
* @todo the util `graphemeSplit` needs to be injectable in some way.
|
|
22090
|
-
* is more comfortable to inject the correct util rather than having to override text
|
|
22091
|
-
* in the middle of the prototype chain
|
|
22092
|
-
* @param {string} value
|
|
22093
|
-
* @returns {string[]} array of graphemes
|
|
22087
|
+
/**
|
|
22088
|
+
* Override this method to customize grapheme splitting
|
|
22089
|
+
* @todo the util `graphemeSplit` needs to be injectable in some way.
|
|
22090
|
+
* is more comfortable to inject the correct util rather than having to override text
|
|
22091
|
+
* in the middle of the prototype chain
|
|
22092
|
+
* @param {string} value
|
|
22093
|
+
* @returns {string[]} array of graphemes
|
|
22094
22094
|
*/
|
|
22095
22095
|
graphemeSplit(value) {
|
|
22096
22096
|
return graphemeSplit(value);
|
|
22097
22097
|
}
|
|
22098
22098
|
|
|
22099
|
-
/**
|
|
22100
|
-
* Returns the text as an array of lines.
|
|
22101
|
-
* @param {String} text text to split
|
|
22102
|
-
* @returns Lines in the text
|
|
22099
|
+
/**
|
|
22100
|
+
* Returns the text as an array of lines.
|
|
22101
|
+
* @param {String} text text to split
|
|
22102
|
+
* @returns Lines in the text
|
|
22103
22103
|
*/
|
|
22104
22104
|
_splitTextIntoLines(text) {
|
|
22105
22105
|
const lines = text.split(this._reNewline),
|
|
@@ -22125,18 +22125,18 @@
|
|
|
22125
22125
|
};
|
|
22126
22126
|
}
|
|
22127
22127
|
|
|
22128
|
-
/**
|
|
22129
|
-
* Check if text contains Arabic characters
|
|
22130
|
-
* @private
|
|
22128
|
+
/**
|
|
22129
|
+
* Check if text contains Arabic characters
|
|
22130
|
+
* @private
|
|
22131
22131
|
*/
|
|
22132
22132
|
_containsArabicText(text) {
|
|
22133
22133
|
return /[\u0600-\u06FF\u0750-\u077F\uFB50-\uFDFF\uFE70-\uFEFF]/.test(text);
|
|
22134
22134
|
}
|
|
22135
22135
|
|
|
22136
|
-
/**
|
|
22137
|
-
* Returns object representation of an instance
|
|
22138
|
-
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
22139
|
-
* @return {Object} Object representation of an instance
|
|
22136
|
+
/**
|
|
22137
|
+
* Returns object representation of an instance
|
|
22138
|
+
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
22139
|
+
* @return {Object} Object representation of an instance
|
|
22140
22140
|
*/
|
|
22141
22141
|
toObject() {
|
|
22142
22142
|
let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -22179,23 +22179,23 @@
|
|
|
22179
22179
|
return this;
|
|
22180
22180
|
}
|
|
22181
22181
|
|
|
22182
|
-
/**
|
|
22183
|
-
* Returns complexity of an instance
|
|
22184
|
-
* @return {Number} complexity
|
|
22182
|
+
/**
|
|
22183
|
+
* Returns complexity of an instance
|
|
22184
|
+
* @return {Number} complexity
|
|
22185
22185
|
*/
|
|
22186
22186
|
complexity() {
|
|
22187
22187
|
return 1;
|
|
22188
22188
|
}
|
|
22189
22189
|
|
|
22190
|
-
/**
|
|
22191
|
-
* List of generic font families
|
|
22192
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
|
|
22190
|
+
/**
|
|
22191
|
+
* List of generic font families
|
|
22192
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
|
|
22193
22193
|
*/
|
|
22194
22194
|
|
|
22195
|
-
/**
|
|
22196
|
-
* Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
|
|
22197
|
-
* @param {HTMLElement} element Element to parse
|
|
22198
|
-
* @param {Object} [options] Options object
|
|
22195
|
+
/**
|
|
22196
|
+
* Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
|
|
22197
|
+
* @param {HTMLElement} element Element to parse
|
|
22198
|
+
* @param {Object} [options] Options object
|
|
22199
22199
|
*/
|
|
22200
22200
|
static async fromElement(element, options, cssRules) {
|
|
22201
22201
|
const parsedAttributes = parseAttributes(element, FabricText.ATTRIBUTE_NAMES, cssRules);
|
|
@@ -22234,10 +22234,10 @@
|
|
|
22234
22234
|
scaledDiff = lineHeightDiff * textHeightScaleFactor,
|
|
22235
22235
|
textHeight = text.getScaledHeight() + scaledDiff;
|
|
22236
22236
|
let offX = 0;
|
|
22237
|
-
/*
|
|
22238
|
-
Adjust positioning:
|
|
22239
|
-
x/y attributes in SVG correspond to the bottom-left corner of text bounding box
|
|
22240
|
-
fabric output by default at top, left.
|
|
22237
|
+
/*
|
|
22238
|
+
Adjust positioning:
|
|
22239
|
+
x/y attributes in SVG correspond to the bottom-left corner of text bounding box
|
|
22240
|
+
fabric output by default at top, left.
|
|
22241
22241
|
*/
|
|
22242
22242
|
if (textAnchor === CENTER) {
|
|
22243
22243
|
offX = text.getScaledWidth() / 2;
|
|
@@ -22255,9 +22255,9 @@
|
|
|
22255
22255
|
|
|
22256
22256
|
/* _FROM_SVG_END_ */
|
|
22257
22257
|
|
|
22258
|
-
/**
|
|
22259
|
-
* Check if the font is ready for accurate measurements
|
|
22260
|
-
* @private
|
|
22258
|
+
/**
|
|
22259
|
+
* Check if the font is ready for accurate measurements
|
|
22260
|
+
* @private
|
|
22261
22261
|
*/
|
|
22262
22262
|
_isFontReady() {
|
|
22263
22263
|
if (typeof document === 'undefined' || !('fonts' in document)) {
|
|
@@ -22270,9 +22270,9 @@
|
|
|
22270
22270
|
}
|
|
22271
22271
|
}
|
|
22272
22272
|
|
|
22273
|
-
/**
|
|
22274
|
-
* Schedule re-initialization after font loads
|
|
22275
|
-
* @private
|
|
22273
|
+
/**
|
|
22274
|
+
* Schedule re-initialization after font loads
|
|
22275
|
+
* @private
|
|
22276
22276
|
*/
|
|
22277
22277
|
_scheduleInitAfterFontLoad() {
|
|
22278
22278
|
if (typeof document === 'undefined' || !('fonts' in document)) {
|
|
@@ -22308,8 +22308,8 @@
|
|
|
22308
22308
|
});
|
|
22309
22309
|
}
|
|
22310
22310
|
|
|
22311
|
-
/**
|
|
22312
|
-
* Force complete text re-initialization (useful after JSON loading)
|
|
22311
|
+
/**
|
|
22312
|
+
* Force complete text re-initialization (useful after JSON loading)
|
|
22313
22313
|
*/
|
|
22314
22314
|
forceTextReinitialization() {
|
|
22315
22315
|
console.log('🔄 Force reinitializing text object');
|
|
@@ -22337,10 +22337,10 @@
|
|
|
22337
22337
|
}
|
|
22338
22338
|
}
|
|
22339
22339
|
|
|
22340
|
-
/**
|
|
22341
|
-
* Returns FabricText instance from an object representation
|
|
22342
|
-
* @param {Object} object plain js Object to create an instance from
|
|
22343
|
-
* @returns {Promise<FabricText>}
|
|
22340
|
+
/**
|
|
22341
|
+
* Returns FabricText instance from an object representation
|
|
22342
|
+
* @param {Object} object plain js Object to create an instance from
|
|
22343
|
+
* @returns {Promise<FabricText>}
|
|
22344
22344
|
*/
|
|
22345
22345
|
static fromObject(object) {
|
|
22346
22346
|
return this._fromObject({
|
|
@@ -22385,6 +22385,10 @@
|
|
|
22385
22385
|
textObject._usingBrowserWrapping = true;
|
|
22386
22386
|
console.log(`🔤 STV font: Forcing browser wrapping flag during JSON load`);
|
|
22387
22387
|
|
|
22388
|
+
// Enable overlay editing for STV fonts to use native browser text handling
|
|
22389
|
+
textObject.useOverlayEditing = true;
|
|
22390
|
+
console.log(`🔤 STV font: Enabling overlay editing during JSON load`);
|
|
22391
|
+
|
|
22388
22392
|
// Multiple initialization attempts for STV fonts
|
|
22389
22393
|
const reinitWithDelay = attempt => {
|
|
22390
22394
|
if (textObject.forceTextReinitialization) {
|
|
@@ -22438,10 +22442,10 @@
|
|
|
22438
22442
|
});
|
|
22439
22443
|
}
|
|
22440
22444
|
}
|
|
22441
|
-
/**
|
|
22442
|
-
* Properties that requires a text layout recalculation when changed
|
|
22443
|
-
* @type string[]
|
|
22444
|
-
* @protected
|
|
22445
|
+
/**
|
|
22446
|
+
* Properties that requires a text layout recalculation when changed
|
|
22447
|
+
* @type string[]
|
|
22448
|
+
* @protected
|
|
22445
22449
|
*/
|
|
22446
22450
|
_defineProperty(FabricText, "textLayoutProperties", textLayoutProperties);
|
|
22447
22451
|
_defineProperty(FabricText, "cacheProperties", [...cacheProperties, ...additionalProps]);
|
|
@@ -22449,9 +22453,9 @@
|
|
|
22449
22453
|
_defineProperty(FabricText, "type", 'Text');
|
|
22450
22454
|
_defineProperty(FabricText, "genericFonts", ['serif', 'sans-serif', 'monospace', 'cursive', 'fantasy', 'system-ui', 'ui-serif', 'ui-sans-serif', 'ui-monospace', 'ui-rounded', 'math', 'emoji', 'fangsong']);
|
|
22451
22455
|
/* _FROM_SVG_START_ */
|
|
22452
|
-
/**
|
|
22453
|
-
* List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
|
|
22454
|
-
* @see: http://www.w3.org/TR/SVG/text.html#TextElement
|
|
22456
|
+
/**
|
|
22457
|
+
* List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
|
|
22458
|
+
* @see: http://www.w3.org/TR/SVG/text.html#TextElement
|
|
22455
22459
|
*/
|
|
22456
22460
|
_defineProperty(FabricText, "ATTRIBUTE_NAMES", SHARED_ATTRIBUTES.concat('x', 'y', 'dx', 'dy', 'font-family', 'font-style', 'font-weight', 'font-size', 'letter-spacing', 'text-decoration', 'text-anchor'));
|
|
22457
22461
|
applyMixins(FabricText, [TextSVGExportMixin]);
|
|
@@ -22838,8 +22842,8 @@
|
|
|
22838
22842
|
// We don't need to save/restore them here as it would conflict with IText's restoration
|
|
22839
22843
|
}
|
|
22840
22844
|
|
|
22841
|
-
/**
|
|
22842
|
-
* Get the container element for the overlay (parent of upperCanvasEl)
|
|
22845
|
+
/**
|
|
22846
|
+
* Get the container element for the overlay (parent of upperCanvasEl)
|
|
22843
22847
|
*/
|
|
22844
22848
|
getCanvasContainer() {
|
|
22845
22849
|
const upperCanvas = this.canvas.upperCanvasEl;
|
|
@@ -22853,8 +22857,8 @@
|
|
|
22853
22857
|
return container;
|
|
22854
22858
|
}
|
|
22855
22859
|
|
|
22856
|
-
/**
|
|
22857
|
-
* Create the overlay DOM structure
|
|
22860
|
+
/**
|
|
22861
|
+
* Create the overlay DOM structure
|
|
22858
22862
|
*/
|
|
22859
22863
|
createOverlayDOM() {
|
|
22860
22864
|
// Host div for positioning and overflow control
|
|
@@ -22909,8 +22913,8 @@
|
|
|
22909
22913
|
document.body.appendChild(this.hostDiv);
|
|
22910
22914
|
}
|
|
22911
22915
|
|
|
22912
|
-
/**
|
|
22913
|
-
* Attach all event listeners
|
|
22916
|
+
/**
|
|
22917
|
+
* Attach all event listeners
|
|
22914
22918
|
*/
|
|
22915
22919
|
attachEventListeners() {
|
|
22916
22920
|
// Textarea events
|
|
@@ -22930,8 +22934,8 @@
|
|
|
22930
22934
|
this.setupViewportChangeDetection();
|
|
22931
22935
|
}
|
|
22932
22936
|
|
|
22933
|
-
/**
|
|
22934
|
-
* Remove all event listeners
|
|
22937
|
+
/**
|
|
22938
|
+
* Remove all event listeners
|
|
22935
22939
|
*/
|
|
22936
22940
|
removeEventListeners() {
|
|
22937
22941
|
this.textarea.removeEventListener('input', this.boundHandlers.onInput);
|
|
@@ -22948,16 +22952,16 @@
|
|
|
22948
22952
|
this.restoreViewportChangeDetection();
|
|
22949
22953
|
}
|
|
22950
22954
|
|
|
22951
|
-
/**
|
|
22952
|
-
* Simple method to refresh positioning when canvas changes
|
|
22955
|
+
/**
|
|
22956
|
+
* Simple method to refresh positioning when canvas changes
|
|
22953
22957
|
*/
|
|
22954
22958
|
updatePosition() {
|
|
22955
22959
|
this.applyOverlayStyle();
|
|
22956
22960
|
}
|
|
22957
22961
|
|
|
22958
|
-
/**
|
|
22959
|
-
* Update the Fabric object bounds to match current textarea size
|
|
22960
|
-
* This ensures Fabric.js selection controls follow the growing textbox
|
|
22962
|
+
/**
|
|
22963
|
+
* Update the Fabric object bounds to match current textarea size
|
|
22964
|
+
* This ensures Fabric.js selection controls follow the growing textbox
|
|
22961
22965
|
*/
|
|
22962
22966
|
updateObjectBounds() {
|
|
22963
22967
|
if (this.isDestroyed) return;
|
|
@@ -22991,15 +22995,15 @@
|
|
|
22991
22995
|
}
|
|
22992
22996
|
}
|
|
22993
22997
|
|
|
22994
|
-
/**
|
|
22995
|
-
* Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
|
|
22998
|
+
/**
|
|
22999
|
+
* Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
|
|
22996
23000
|
*/
|
|
22997
23001
|
letterSpacingPx(charSpacing, fontSize) {
|
|
22998
23002
|
return charSpacing / 1000 * fontSize;
|
|
22999
23003
|
}
|
|
23000
23004
|
|
|
23001
|
-
/**
|
|
23002
|
-
* Detect text direction using first strong directional character
|
|
23005
|
+
/**
|
|
23006
|
+
* Detect text direction using first strong directional character
|
|
23003
23007
|
*/
|
|
23004
23008
|
firstStrongDir(text) {
|
|
23005
23009
|
// Hebrew: \u0590-\u05FF, Arabic: \u0600-\u06FF, \u0750-\u077F, \uFB50-\uFDFF, \uFE70-\uFEFF
|
|
@@ -23236,8 +23240,8 @@
|
|
|
23236
23240
|
// Initial bounds are set correctly by Fabric.js - don't force update here
|
|
23237
23241
|
}
|
|
23238
23242
|
|
|
23239
|
-
/**
|
|
23240
|
-
* Debug method to compare textarea and canvas object bounding boxes
|
|
23243
|
+
/**
|
|
23244
|
+
* Debug method to compare textarea and canvas object bounding boxes
|
|
23241
23245
|
*/
|
|
23242
23246
|
debugBoundingBoxComparison() {
|
|
23243
23247
|
const target = this.target;
|
|
@@ -23307,8 +23311,8 @@
|
|
|
23307
23311
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
23308
23312
|
}
|
|
23309
23313
|
|
|
23310
|
-
/**
|
|
23311
|
-
* Debug method to compare text wrapping between textarea and Fabric text object
|
|
23314
|
+
/**
|
|
23315
|
+
* Debug method to compare text wrapping between textarea and Fabric text object
|
|
23312
23316
|
*/
|
|
23313
23317
|
debugTextWrapping() {
|
|
23314
23318
|
const target = this.target;
|
|
@@ -23393,8 +23397,8 @@
|
|
|
23393
23397
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
23394
23398
|
}
|
|
23395
23399
|
|
|
23396
|
-
/**
|
|
23397
|
-
* Focus the textarea and position cursor at end
|
|
23400
|
+
/**
|
|
23401
|
+
* Focus the textarea and position cursor at end
|
|
23398
23402
|
*/
|
|
23399
23403
|
focusTextarea() {
|
|
23400
23404
|
// For overlay editing, we want to keep the object in "selection mode" not "editing mode"
|
|
@@ -23434,8 +23438,8 @@
|
|
|
23434
23438
|
this.canvas.requestRenderAll();
|
|
23435
23439
|
}
|
|
23436
23440
|
|
|
23437
|
-
/**
|
|
23438
|
-
* Refresh overlay positioning and styling
|
|
23441
|
+
/**
|
|
23442
|
+
* Refresh overlay positioning and styling
|
|
23439
23443
|
*/
|
|
23440
23444
|
refresh() {
|
|
23441
23445
|
if (this.isDestroyed) return;
|
|
@@ -23443,8 +23447,8 @@
|
|
|
23443
23447
|
// Don't update object bounds on every refresh - only when textarea actually resizes
|
|
23444
23448
|
}
|
|
23445
23449
|
|
|
23446
|
-
/**
|
|
23447
|
-
* Destroy the overlay editor
|
|
23450
|
+
/**
|
|
23451
|
+
* Destroy the overlay editor
|
|
23448
23452
|
*/
|
|
23449
23453
|
destroy() {
|
|
23450
23454
|
let commit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
@@ -23612,8 +23616,8 @@
|
|
|
23612
23616
|
}
|
|
23613
23617
|
}
|
|
23614
23618
|
|
|
23615
|
-
/**
|
|
23616
|
-
* Setup detection for viewport changes (zoom/pan)
|
|
23619
|
+
/**
|
|
23620
|
+
* Setup detection for viewport changes (zoom/pan)
|
|
23617
23621
|
*/
|
|
23618
23622
|
setupViewportChangeDetection() {
|
|
23619
23623
|
// Store original methods
|
|
@@ -23642,8 +23646,8 @@
|
|
|
23642
23646
|
};
|
|
23643
23647
|
}
|
|
23644
23648
|
|
|
23645
|
-
/**
|
|
23646
|
-
* Restore original viewport methods
|
|
23649
|
+
/**
|
|
23650
|
+
* Restore original viewport methods
|
|
23647
23651
|
*/
|
|
23648
23652
|
restoreViewportChangeDetection() {
|
|
23649
23653
|
if (this.canvas.__originalSetZoom) {
|
|
@@ -23658,8 +23662,8 @@
|
|
|
23658
23662
|
}
|
|
23659
23663
|
}
|
|
23660
23664
|
|
|
23661
|
-
/**
|
|
23662
|
-
* Enter overlay text editing mode for a text object
|
|
23665
|
+
/**
|
|
23666
|
+
* Enter overlay text editing mode for a text object
|
|
23663
23667
|
*/
|
|
23664
23668
|
function enterTextOverlayEdit(canvas, target, options) {
|
|
23665
23669
|
// If already in overlay editing, destroy existing editor first
|
|
@@ -23683,35 +23687,35 @@
|
|
|
23683
23687
|
return editor;
|
|
23684
23688
|
}
|
|
23685
23689
|
|
|
23686
|
-
/**
|
|
23687
|
-
* extend this regex to support non english languages
|
|
23688
|
-
*
|
|
23689
|
-
* - ` ` Matches a SPACE character (char code 32).
|
|
23690
|
-
* - `\n` Matches a LINE FEED character (char code 10).
|
|
23691
|
-
* - `.` Matches a "." character (char code 46).
|
|
23692
|
-
* - `,` Matches a "," character (char code 44).
|
|
23693
|
-
* - `;` Matches a ";" character (char code 59).
|
|
23694
|
-
* - `!` Matches a "!" character (char code 33).
|
|
23695
|
-
* - `\?` Matches a "?" character (char code 63).
|
|
23696
|
-
* - `\-` Matches a "-" character (char code 45).
|
|
23690
|
+
/**
|
|
23691
|
+
* extend this regex to support non english languages
|
|
23692
|
+
*
|
|
23693
|
+
* - ` ` Matches a SPACE character (char code 32).
|
|
23694
|
+
* - `\n` Matches a LINE FEED character (char code 10).
|
|
23695
|
+
* - `.` Matches a "." character (char code 46).
|
|
23696
|
+
* - `,` Matches a "," character (char code 44).
|
|
23697
|
+
* - `;` Matches a ";" character (char code 59).
|
|
23698
|
+
* - `!` Matches a "!" character (char code 33).
|
|
23699
|
+
* - `\?` Matches a "?" character (char code 63).
|
|
23700
|
+
* - `\-` Matches a "-" character (char code 45).
|
|
23697
23701
|
*/
|
|
23698
23702
|
// eslint-disable-next-line no-useless-escape
|
|
23699
23703
|
const reNonWord = /[ \n\.,;!\?\-]/;
|
|
23700
23704
|
class ITextBehavior extends FabricText {
|
|
23701
23705
|
constructor() {
|
|
23702
23706
|
super(...arguments);
|
|
23703
|
-
/**
|
|
23704
|
-
* Helps determining when the text is in composition, so that the cursor
|
|
23705
|
-
* rendering is altered.
|
|
23707
|
+
/**
|
|
23708
|
+
* Helps determining when the text is in composition, so that the cursor
|
|
23709
|
+
* rendering is altered.
|
|
23706
23710
|
*/
|
|
23707
23711
|
_defineProperty(this, "_currentCursorOpacity", 1);
|
|
23708
23712
|
}
|
|
23709
|
-
/**
|
|
23710
|
-
* Keeps track if the IText object was selected before the actual click.
|
|
23711
|
-
* This because we want to delay enter editing by a click.
|
|
23713
|
+
/**
|
|
23714
|
+
* Keeps track if the IText object was selected before the actual click.
|
|
23715
|
+
* This because we want to delay enter editing by a click.
|
|
23712
23716
|
*/
|
|
23713
|
-
/**
|
|
23714
|
-
* Initializes all the interactive behavior of IText
|
|
23717
|
+
/**
|
|
23718
|
+
* Initializes all the interactive behavior of IText
|
|
23715
23719
|
*/
|
|
23716
23720
|
initBehavior() {
|
|
23717
23721
|
this._tick = this._tick.bind(this);
|
|
@@ -23724,8 +23728,8 @@
|
|
|
23724
23728
|
return super.onDeselect(options);
|
|
23725
23729
|
}
|
|
23726
23730
|
|
|
23727
|
-
/**
|
|
23728
|
-
* @private
|
|
23731
|
+
/**
|
|
23732
|
+
* @private
|
|
23729
23733
|
*/
|
|
23730
23734
|
_animateCursor(_ref) {
|
|
23731
23735
|
let {
|
|
@@ -23750,8 +23754,8 @@
|
|
|
23750
23754
|
});
|
|
23751
23755
|
}
|
|
23752
23756
|
|
|
23753
|
-
/**
|
|
23754
|
-
* changes the cursor from visible to invisible
|
|
23757
|
+
/**
|
|
23758
|
+
* changes the cursor from visible to invisible
|
|
23755
23759
|
*/
|
|
23756
23760
|
_tick(delay) {
|
|
23757
23761
|
this._currentTickState = this._animateCursor({
|
|
@@ -23762,8 +23766,8 @@
|
|
|
23762
23766
|
});
|
|
23763
23767
|
}
|
|
23764
23768
|
|
|
23765
|
-
/**
|
|
23766
|
-
* Changes the cursor from invisible to visible
|
|
23769
|
+
/**
|
|
23770
|
+
* Changes the cursor from invisible to visible
|
|
23767
23771
|
*/
|
|
23768
23772
|
_onTickComplete() {
|
|
23769
23773
|
var _this$_currentTickCom;
|
|
@@ -23775,16 +23779,16 @@
|
|
|
23775
23779
|
});
|
|
23776
23780
|
}
|
|
23777
23781
|
|
|
23778
|
-
/**
|
|
23779
|
-
* Initializes delayed cursor
|
|
23782
|
+
/**
|
|
23783
|
+
* Initializes delayed cursor
|
|
23780
23784
|
*/
|
|
23781
23785
|
initDelayedCursor(restart) {
|
|
23782
23786
|
this.abortCursorAnimation();
|
|
23783
23787
|
this._tick(restart ? 0 : this.cursorDelay);
|
|
23784
23788
|
}
|
|
23785
23789
|
|
|
23786
|
-
/**
|
|
23787
|
-
* Aborts cursor animation, clears all timeouts and clear textarea context if necessary
|
|
23790
|
+
/**
|
|
23791
|
+
* Aborts cursor animation, clears all timeouts and clear textarea context if necessary
|
|
23788
23792
|
*/
|
|
23789
23793
|
abortCursorAnimation() {
|
|
23790
23794
|
let shouldClear = false;
|
|
@@ -23802,9 +23806,9 @@
|
|
|
23802
23806
|
}
|
|
23803
23807
|
}
|
|
23804
23808
|
|
|
23805
|
-
/**
|
|
23806
|
-
* Restart tue cursor animation if either is in complete state ( between animations )
|
|
23807
|
-
* or if it never started before
|
|
23809
|
+
/**
|
|
23810
|
+
* Restart tue cursor animation if either is in complete state ( between animations )
|
|
23811
|
+
* or if it never started before
|
|
23808
23812
|
*/
|
|
23809
23813
|
restartCursorIfNeeded() {
|
|
23810
23814
|
if ([this._currentTickState, this._currentTickCompleteState].some(cursorAnimation => !cursorAnimation || cursorAnimation.isDone())) {
|
|
@@ -23812,8 +23816,8 @@
|
|
|
23812
23816
|
}
|
|
23813
23817
|
}
|
|
23814
23818
|
|
|
23815
|
-
/**
|
|
23816
|
-
* Selects entire text
|
|
23819
|
+
/**
|
|
23820
|
+
* Selects entire text
|
|
23817
23821
|
*/
|
|
23818
23822
|
selectAll() {
|
|
23819
23823
|
this.selectionStart = 0;
|
|
@@ -23823,26 +23827,26 @@
|
|
|
23823
23827
|
return this;
|
|
23824
23828
|
}
|
|
23825
23829
|
|
|
23826
|
-
/**
|
|
23827
|
-
* Selects entire text and updates the visual state
|
|
23830
|
+
/**
|
|
23831
|
+
* Selects entire text and updates the visual state
|
|
23828
23832
|
*/
|
|
23829
23833
|
cmdAll() {
|
|
23830
23834
|
this.selectAll();
|
|
23831
23835
|
this.renderCursorOrSelection();
|
|
23832
23836
|
}
|
|
23833
23837
|
|
|
23834
|
-
/**
|
|
23835
|
-
* Returns selected text
|
|
23836
|
-
* @return {String}
|
|
23838
|
+
/**
|
|
23839
|
+
* Returns selected text
|
|
23840
|
+
* @return {String}
|
|
23837
23841
|
*/
|
|
23838
23842
|
getSelectedText() {
|
|
23839
23843
|
return this._text.slice(this.selectionStart, this.selectionEnd).join('');
|
|
23840
23844
|
}
|
|
23841
23845
|
|
|
23842
|
-
/**
|
|
23843
|
-
* Find new selection index representing start of current word according to current selection index
|
|
23844
|
-
* @param {Number} startFrom Current selection index
|
|
23845
|
-
* @return {Number} New selection index
|
|
23846
|
+
/**
|
|
23847
|
+
* Find new selection index representing start of current word according to current selection index
|
|
23848
|
+
* @param {Number} startFrom Current selection index
|
|
23849
|
+
* @return {Number} New selection index
|
|
23846
23850
|
*/
|
|
23847
23851
|
findWordBoundaryLeft(startFrom) {
|
|
23848
23852
|
let offset = 0,
|
|
@@ -23862,10 +23866,10 @@
|
|
|
23862
23866
|
return startFrom - offset;
|
|
23863
23867
|
}
|
|
23864
23868
|
|
|
23865
|
-
/**
|
|
23866
|
-
* Find new selection index representing end of current word according to current selection index
|
|
23867
|
-
* @param {Number} startFrom Current selection index
|
|
23868
|
-
* @return {Number} New selection index
|
|
23869
|
+
/**
|
|
23870
|
+
* Find new selection index representing end of current word according to current selection index
|
|
23871
|
+
* @param {Number} startFrom Current selection index
|
|
23872
|
+
* @return {Number} New selection index
|
|
23869
23873
|
*/
|
|
23870
23874
|
findWordBoundaryRight(startFrom) {
|
|
23871
23875
|
let offset = 0,
|
|
@@ -23885,10 +23889,10 @@
|
|
|
23885
23889
|
return startFrom + offset;
|
|
23886
23890
|
}
|
|
23887
23891
|
|
|
23888
|
-
/**
|
|
23889
|
-
* Find new selection index representing start of current line according to current selection index
|
|
23890
|
-
* @param {Number} startFrom Current selection index
|
|
23891
|
-
* @return {Number} New selection index
|
|
23892
|
+
/**
|
|
23893
|
+
* Find new selection index representing start of current line according to current selection index
|
|
23894
|
+
* @param {Number} startFrom Current selection index
|
|
23895
|
+
* @return {Number} New selection index
|
|
23892
23896
|
*/
|
|
23893
23897
|
findLineBoundaryLeft(startFrom) {
|
|
23894
23898
|
let offset = 0,
|
|
@@ -23900,10 +23904,10 @@
|
|
|
23900
23904
|
return startFrom - offset;
|
|
23901
23905
|
}
|
|
23902
23906
|
|
|
23903
|
-
/**
|
|
23904
|
-
* Find new selection index representing end of current line according to current selection index
|
|
23905
|
-
* @param {Number} startFrom Current selection index
|
|
23906
|
-
* @return {Number} New selection index
|
|
23907
|
+
/**
|
|
23908
|
+
* Find new selection index representing end of current line according to current selection index
|
|
23909
|
+
* @param {Number} startFrom Current selection index
|
|
23910
|
+
* @return {Number} New selection index
|
|
23907
23911
|
*/
|
|
23908
23912
|
findLineBoundaryRight(startFrom) {
|
|
23909
23913
|
let offset = 0,
|
|
@@ -23915,11 +23919,11 @@
|
|
|
23915
23919
|
return startFrom + offset;
|
|
23916
23920
|
}
|
|
23917
23921
|
|
|
23918
|
-
/**
|
|
23919
|
-
* Finds index corresponding to beginning or end of a word
|
|
23920
|
-
* @param {Number} selectionStart Index of a character
|
|
23921
|
-
* @param {Number} direction 1 or -1
|
|
23922
|
-
* @return {Number} Index of the beginning or end of a word
|
|
23922
|
+
/**
|
|
23923
|
+
* Finds index corresponding to beginning or end of a word
|
|
23924
|
+
* @param {Number} selectionStart Index of a character
|
|
23925
|
+
* @param {Number} direction 1 or -1
|
|
23926
|
+
* @return {Number} Index of the beginning or end of a word
|
|
23923
23927
|
*/
|
|
23924
23928
|
searchWordBoundary(selectionStart, direction) {
|
|
23925
23929
|
const text = this._text;
|
|
@@ -23937,9 +23941,9 @@
|
|
|
23937
23941
|
return index;
|
|
23938
23942
|
}
|
|
23939
23943
|
|
|
23940
|
-
/**
|
|
23941
|
-
* Selects the word that contains the char at index selectionStart
|
|
23942
|
-
* @param {Number} selectionStart Index of a character
|
|
23944
|
+
/**
|
|
23945
|
+
* Selects the word that contains the char at index selectionStart
|
|
23946
|
+
* @param {Number} selectionStart Index of a character
|
|
23943
23947
|
*/
|
|
23944
23948
|
selectWord(selectionStart) {
|
|
23945
23949
|
selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
|
|
@@ -23955,9 +23959,9 @@
|
|
|
23955
23959
|
this.renderCursorOrSelection();
|
|
23956
23960
|
}
|
|
23957
23961
|
|
|
23958
|
-
/**
|
|
23959
|
-
* Selects the line that contains selectionStart
|
|
23960
|
-
* @param {Number} selectionStart Index of a character
|
|
23962
|
+
/**
|
|
23963
|
+
* Selects the line that contains selectionStart
|
|
23964
|
+
* @param {Number} selectionStart Index of a character
|
|
23961
23965
|
*/
|
|
23962
23966
|
selectLine(selectionStart) {
|
|
23963
23967
|
selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
|
|
@@ -23969,8 +23973,8 @@
|
|
|
23969
23973
|
this._updateTextarea();
|
|
23970
23974
|
}
|
|
23971
23975
|
|
|
23972
|
-
/**
|
|
23973
|
-
* Enters editing state
|
|
23976
|
+
/**
|
|
23977
|
+
* Enters editing state
|
|
23974
23978
|
*/
|
|
23975
23979
|
enterEditing(e) {
|
|
23976
23980
|
if (this.isEditing || !this.editable) {
|
|
@@ -23990,8 +23994,8 @@
|
|
|
23990
23994
|
}
|
|
23991
23995
|
}
|
|
23992
23996
|
|
|
23993
|
-
/**
|
|
23994
|
-
* runs the actual logic that enter from editing state, see {@link enterEditing}
|
|
23997
|
+
/**
|
|
23998
|
+
* runs the actual logic that enter from editing state, see {@link enterEditing}
|
|
23995
23999
|
*/
|
|
23996
24000
|
enterEditingImpl() {
|
|
23997
24001
|
if (this.canvas) {
|
|
@@ -24015,8 +24019,8 @@
|
|
|
24015
24019
|
}
|
|
24016
24020
|
}
|
|
24017
24021
|
|
|
24018
|
-
/**
|
|
24019
|
-
* Enter overlay editing mode using DOM textarea overlay
|
|
24022
|
+
/**
|
|
24023
|
+
* Enter overlay editing mode using DOM textarea overlay
|
|
24020
24024
|
*/
|
|
24021
24025
|
enterOverlayEditing() {
|
|
24022
24026
|
this._saveEditingProps();
|
|
@@ -24037,8 +24041,8 @@
|
|
|
24037
24041
|
});
|
|
24038
24042
|
}
|
|
24039
24043
|
|
|
24040
|
-
/**
|
|
24041
|
-
* Commit overlay editing changes
|
|
24044
|
+
/**
|
|
24045
|
+
* Commit overlay editing changes
|
|
24042
24046
|
*/
|
|
24043
24047
|
commitOverlayEdit(text) {
|
|
24044
24048
|
const overlayEditor = this.__overlayEditor;
|
|
@@ -24062,8 +24066,8 @@
|
|
|
24062
24066
|
this.canvas && this.canvas.requestRenderAll();
|
|
24063
24067
|
}
|
|
24064
24068
|
|
|
24065
|
-
/**
|
|
24066
|
-
* Cancel overlay editing without changes
|
|
24069
|
+
/**
|
|
24070
|
+
* Cancel overlay editing without changes
|
|
24067
24071
|
*/
|
|
24068
24072
|
cancelOverlayEdit() {
|
|
24069
24073
|
// Restore original text
|
|
@@ -24071,8 +24075,8 @@
|
|
|
24071
24075
|
this.exitEditing();
|
|
24072
24076
|
}
|
|
24073
24077
|
|
|
24074
|
-
/**
|
|
24075
|
-
* called by {@link Canvas#textEditingManager}
|
|
24078
|
+
/**
|
|
24079
|
+
* called by {@link Canvas#textEditingManager}
|
|
24076
24080
|
*/
|
|
24077
24081
|
updateSelectionOnMouseMove(e) {
|
|
24078
24082
|
if (this.getActiveControl()) {
|
|
@@ -24100,8 +24104,8 @@
|
|
|
24100
24104
|
}
|
|
24101
24105
|
}
|
|
24102
24106
|
|
|
24103
|
-
/**
|
|
24104
|
-
* @private
|
|
24107
|
+
/**
|
|
24108
|
+
* @private
|
|
24105
24109
|
*/
|
|
24106
24110
|
_setEditingProps() {
|
|
24107
24111
|
this.hoverCursor = 'text';
|
|
@@ -24113,8 +24117,8 @@
|
|
|
24113
24117
|
this.lockMovementX = this.lockMovementY = true;
|
|
24114
24118
|
}
|
|
24115
24119
|
|
|
24116
|
-
/**
|
|
24117
|
-
* convert from textarea to grapheme indexes
|
|
24120
|
+
/**
|
|
24121
|
+
* convert from textarea to grapheme indexes
|
|
24118
24122
|
*/
|
|
24119
24123
|
fromStringToGraphemeSelection(start, end, text) {
|
|
24120
24124
|
const smallerTextStart = text.slice(0, start),
|
|
@@ -24133,8 +24137,8 @@
|
|
|
24133
24137
|
};
|
|
24134
24138
|
}
|
|
24135
24139
|
|
|
24136
|
-
/**
|
|
24137
|
-
* convert from fabric to textarea values
|
|
24140
|
+
/**
|
|
24141
|
+
* convert from fabric to textarea values
|
|
24138
24142
|
*/
|
|
24139
24143
|
fromGraphemeToStringSelection(start, end, graphemes) {
|
|
24140
24144
|
const smallerTextStart = graphemes.slice(0, start),
|
|
@@ -24153,8 +24157,8 @@
|
|
|
24153
24157
|
};
|
|
24154
24158
|
}
|
|
24155
24159
|
|
|
24156
|
-
/**
|
|
24157
|
-
* @private
|
|
24160
|
+
/**
|
|
24161
|
+
* @private
|
|
24158
24162
|
*/
|
|
24159
24163
|
_updateTextarea() {
|
|
24160
24164
|
console.log('🔤 _updateTextarea called with fabric text:', this.text);
|
|
@@ -24179,8 +24183,8 @@
|
|
|
24179
24183
|
this.updateTextareaPosition();
|
|
24180
24184
|
}
|
|
24181
24185
|
|
|
24182
|
-
/**
|
|
24183
|
-
* @private
|
|
24186
|
+
/**
|
|
24187
|
+
* @private
|
|
24184
24188
|
*/
|
|
24185
24189
|
updateFromTextArea() {
|
|
24186
24190
|
if (!this.hiddenTextarea) {
|
|
@@ -24200,8 +24204,8 @@
|
|
|
24200
24204
|
this.updateTextareaPosition();
|
|
24201
24205
|
}
|
|
24202
24206
|
|
|
24203
|
-
/**
|
|
24204
|
-
* @private
|
|
24207
|
+
/**
|
|
24208
|
+
* @private
|
|
24205
24209
|
*/
|
|
24206
24210
|
updateTextareaPosition() {
|
|
24207
24211
|
if (this.selectionStart === this.selectionEnd) {
|
|
@@ -24211,9 +24215,9 @@
|
|
|
24211
24215
|
}
|
|
24212
24216
|
}
|
|
24213
24217
|
|
|
24214
|
-
/**
|
|
24215
|
-
* @private
|
|
24216
|
-
* @return {Object} style contains style for hiddenTextarea
|
|
24218
|
+
/**
|
|
24219
|
+
* @private
|
|
24220
|
+
* @return {Object} style contains style for hiddenTextarea
|
|
24217
24221
|
*/
|
|
24218
24222
|
_calcTextareaPosition() {
|
|
24219
24223
|
if (!this.canvas) {
|
|
@@ -24260,8 +24264,8 @@
|
|
|
24260
24264
|
};
|
|
24261
24265
|
}
|
|
24262
24266
|
|
|
24263
|
-
/**
|
|
24264
|
-
* @private
|
|
24267
|
+
/**
|
|
24268
|
+
* @private
|
|
24265
24269
|
*/
|
|
24266
24270
|
_saveEditingProps() {
|
|
24267
24271
|
this._savedProps = {
|
|
@@ -24278,8 +24282,8 @@
|
|
|
24278
24282
|
};
|
|
24279
24283
|
}
|
|
24280
24284
|
|
|
24281
|
-
/**
|
|
24282
|
-
* @private
|
|
24285
|
+
/**
|
|
24286
|
+
* @private
|
|
24283
24287
|
*/
|
|
24284
24288
|
_restoreEditingProps() {
|
|
24285
24289
|
if (!this._savedProps) {
|
|
@@ -24299,9 +24303,9 @@
|
|
|
24299
24303
|
delete this._savedProps;
|
|
24300
24304
|
}
|
|
24301
24305
|
|
|
24302
|
-
/**
|
|
24303
|
-
* runs the actual logic that exits from editing state, see {@link exitEditing}
|
|
24304
|
-
* But it does not fire events
|
|
24306
|
+
/**
|
|
24307
|
+
* runs the actual logic that exits from editing state, see {@link exitEditing}
|
|
24308
|
+
* But it does not fire events
|
|
24305
24309
|
*/
|
|
24306
24310
|
exitEditingImpl() {
|
|
24307
24311
|
const hiddenTextarea = this.hiddenTextarea;
|
|
@@ -24322,8 +24326,8 @@
|
|
|
24322
24326
|
}
|
|
24323
24327
|
}
|
|
24324
24328
|
|
|
24325
|
-
/**
|
|
24326
|
-
* Exits from editing state and fires relevant events
|
|
24329
|
+
/**
|
|
24330
|
+
* Exits from editing state and fires relevant events
|
|
24327
24331
|
*/
|
|
24328
24332
|
exitEditing() {
|
|
24329
24333
|
const isTextChanged = this._textBeforeEdit !== this.text;
|
|
@@ -24342,8 +24346,8 @@
|
|
|
24342
24346
|
return this;
|
|
24343
24347
|
}
|
|
24344
24348
|
|
|
24345
|
-
/**
|
|
24346
|
-
* @private
|
|
24349
|
+
/**
|
|
24350
|
+
* @private
|
|
24347
24351
|
*/
|
|
24348
24352
|
_removeExtraneousStyles() {
|
|
24349
24353
|
for (const prop in this.styles) {
|
|
@@ -24353,10 +24357,10 @@
|
|
|
24353
24357
|
}
|
|
24354
24358
|
}
|
|
24355
24359
|
|
|
24356
|
-
/**
|
|
24357
|
-
* remove and reflow a style block from start to end.
|
|
24358
|
-
* @param {Number} start linear start position for removal (included in removal)
|
|
24359
|
-
* @param {Number} end linear end position for removal ( excluded from removal )
|
|
24360
|
+
/**
|
|
24361
|
+
* remove and reflow a style block from start to end.
|
|
24362
|
+
* @param {Number} start linear start position for removal (included in removal)
|
|
24363
|
+
* @param {Number} end linear end position for removal ( excluded from removal )
|
|
24360
24364
|
*/
|
|
24361
24365
|
removeStyleFromTo(start, end) {
|
|
24362
24366
|
const {
|
|
@@ -24409,10 +24413,10 @@
|
|
|
24409
24413
|
}
|
|
24410
24414
|
}
|
|
24411
24415
|
|
|
24412
|
-
/**
|
|
24413
|
-
* Shifts line styles up or down
|
|
24414
|
-
* @param {Number} lineIndex Index of a line
|
|
24415
|
-
* @param {Number} offset Can any number?
|
|
24416
|
+
/**
|
|
24417
|
+
* Shifts line styles up or down
|
|
24418
|
+
* @param {Number} lineIndex Index of a line
|
|
24419
|
+
* @param {Number} offset Can any number?
|
|
24416
24420
|
*/
|
|
24417
24421
|
shiftLineStyles(lineIndex, offset) {
|
|
24418
24422
|
const clonedStyles = Object.assign({}, this.styles);
|
|
@@ -24427,15 +24431,15 @@
|
|
|
24427
24431
|
}
|
|
24428
24432
|
}
|
|
24429
24433
|
|
|
24430
|
-
/**
|
|
24431
|
-
* Handle insertion of more consecutive style lines for when one or more
|
|
24432
|
-
* newlines gets added to the text. Since current style needs to be shifted
|
|
24433
|
-
* first we shift the current style of the number lines needed, then we add
|
|
24434
|
-
* new lines from the last to the first.
|
|
24435
|
-
* @param {Number} lineIndex Index of a line
|
|
24436
|
-
* @param {Number} charIndex Index of a char
|
|
24437
|
-
* @param {Number} qty number of lines to add
|
|
24438
|
-
* @param {Array} copiedStyle Array of objects styles
|
|
24434
|
+
/**
|
|
24435
|
+
* Handle insertion of more consecutive style lines for when one or more
|
|
24436
|
+
* newlines gets added to the text. Since current style needs to be shifted
|
|
24437
|
+
* first we shift the current style of the number lines needed, then we add
|
|
24438
|
+
* new lines from the last to the first.
|
|
24439
|
+
* @param {Number} lineIndex Index of a line
|
|
24440
|
+
* @param {Number} charIndex Index of a char
|
|
24441
|
+
* @param {Number} qty number of lines to add
|
|
24442
|
+
* @param {Array} copiedStyle Array of objects styles
|
|
24439
24443
|
*/
|
|
24440
24444
|
insertNewlineStyleObject(lineIndex, charIndex, qty, copiedStyle) {
|
|
24441
24445
|
const newLineStyles = {};
|
|
@@ -24495,12 +24499,12 @@
|
|
|
24495
24499
|
this._forceClearCache = true;
|
|
24496
24500
|
}
|
|
24497
24501
|
|
|
24498
|
-
/**
|
|
24499
|
-
* Inserts style object for a given line/char index
|
|
24500
|
-
* @param {Number} lineIndex Index of a line
|
|
24501
|
-
* @param {Number} charIndex Index of a char
|
|
24502
|
-
* @param {Number} quantity number Style object to insert, if given
|
|
24503
|
-
* @param {Array} copiedStyle array of style objects
|
|
24502
|
+
/**
|
|
24503
|
+
* Inserts style object for a given line/char index
|
|
24504
|
+
* @param {Number} lineIndex Index of a line
|
|
24505
|
+
* @param {Number} charIndex Index of a char
|
|
24506
|
+
* @param {Number} quantity number Style object to insert, if given
|
|
24507
|
+
* @param {Array} copiedStyle array of style objects
|
|
24504
24508
|
*/
|
|
24505
24509
|
insertCharStyleObject(lineIndex, charIndex, quantity, copiedStyle) {
|
|
24506
24510
|
if (!this.styles) {
|
|
@@ -24549,11 +24553,11 @@
|
|
|
24549
24553
|
}
|
|
24550
24554
|
}
|
|
24551
24555
|
|
|
24552
|
-
/**
|
|
24553
|
-
* Inserts style object(s)
|
|
24554
|
-
* @param {Array} insertedText Characters at the location where style is inserted
|
|
24555
|
-
* @param {Number} start cursor index for inserting style
|
|
24556
|
-
* @param {Array} [copiedStyle] array of style objects to insert.
|
|
24556
|
+
/**
|
|
24557
|
+
* Inserts style object(s)
|
|
24558
|
+
* @param {Array} insertedText Characters at the location where style is inserted
|
|
24559
|
+
* @param {Number} start cursor index for inserting style
|
|
24560
|
+
* @param {Array} [copiedStyle] array of style objects to insert.
|
|
24557
24561
|
*/
|
|
24558
24562
|
insertNewStyleBlock(insertedText, start, copiedStyle) {
|
|
24559
24563
|
const cursorLoc = this.get2DCursorLocation(start, true),
|
|
@@ -24594,12 +24598,12 @@
|
|
|
24594
24598
|
}
|
|
24595
24599
|
}
|
|
24596
24600
|
|
|
24597
|
-
/**
|
|
24598
|
-
* Removes characters from start/end
|
|
24599
|
-
* start/end ar per grapheme position in _text array.
|
|
24600
|
-
*
|
|
24601
|
-
* @param {Number} start
|
|
24602
|
-
* @param {Number} end default to start + 1
|
|
24601
|
+
/**
|
|
24602
|
+
* Removes characters from start/end
|
|
24603
|
+
* start/end ar per grapheme position in _text array.
|
|
24604
|
+
*
|
|
24605
|
+
* @param {Number} start
|
|
24606
|
+
* @param {Number} end default to start + 1
|
|
24603
24607
|
*/
|
|
24604
24608
|
removeChars(start) {
|
|
24605
24609
|
let end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : start + 1;
|
|
@@ -24612,17 +24616,17 @@
|
|
|
24612
24616
|
this._removeExtraneousStyles();
|
|
24613
24617
|
}
|
|
24614
24618
|
|
|
24615
|
-
/**
|
|
24616
|
-
* insert characters at start position, before start position.
|
|
24617
|
-
* start equal 1 it means the text get inserted between actual grapheme 0 and 1
|
|
24618
|
-
* if style array is provided, it must be as the same length of text in graphemes
|
|
24619
|
-
* if end is provided and is bigger than start, old text is replaced.
|
|
24620
|
-
* start/end ar per grapheme position in _text array.
|
|
24621
|
-
*
|
|
24622
|
-
* @param {String} text text to insert
|
|
24623
|
-
* @param {Array} style array of style objects
|
|
24624
|
-
* @param {Number} start
|
|
24625
|
-
* @param {Number} end default to start + 1
|
|
24619
|
+
/**
|
|
24620
|
+
* insert characters at start position, before start position.
|
|
24621
|
+
* start equal 1 it means the text get inserted between actual grapheme 0 and 1
|
|
24622
|
+
* if style array is provided, it must be as the same length of text in graphemes
|
|
24623
|
+
* if end is provided and is bigger than start, old text is replaced.
|
|
24624
|
+
* start/end ar per grapheme position in _text array.
|
|
24625
|
+
*
|
|
24626
|
+
* @param {String} text text to insert
|
|
24627
|
+
* @param {Array} style array of style objects
|
|
24628
|
+
* @param {Number} start
|
|
24629
|
+
* @param {Number} end default to start + 1
|
|
24626
24630
|
*/
|
|
24627
24631
|
insertChars(text, style, start) {
|
|
24628
24632
|
let end = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : start;
|
|
@@ -24639,9 +24643,9 @@
|
|
|
24639
24643
|
this._removeExtraneousStyles();
|
|
24640
24644
|
}
|
|
24641
24645
|
|
|
24642
|
-
/**
|
|
24643
|
-
* Set the selectionStart and selectionEnd according to the new position of cursor
|
|
24644
|
-
* mimic the key - mouse navigation when shift is pressed.
|
|
24646
|
+
/**
|
|
24647
|
+
* Set the selectionStart and selectionEnd according to the new position of cursor
|
|
24648
|
+
* mimic the key - mouse navigation when shift is pressed.
|
|
24645
24649
|
*/
|
|
24646
24650
|
setSelectionStartEndWithShift(start, end, newSelection) {
|
|
24647
24651
|
if (newSelection <= start) {
|
|
@@ -24672,36 +24676,36 @@
|
|
|
24672
24676
|
}
|
|
24673
24677
|
|
|
24674
24678
|
class ITextKeyBehavior extends ITextBehavior {
|
|
24675
|
-
/**
|
|
24676
|
-
* For functionalities on keyDown
|
|
24677
|
-
* Map a special key to a function of the instance/prototype
|
|
24678
|
-
* If you need different behavior for ESC or TAB or arrows, you have to change
|
|
24679
|
-
* this map setting the name of a function that you build on the IText or
|
|
24680
|
-
* your prototype.
|
|
24681
|
-
* the map change will affect all Instances unless you need for only some text Instances
|
|
24682
|
-
* in that case you have to clone this object and assign your Instance.
|
|
24683
|
-
* this.keysMap = Object.assign({}, this.keysMap);
|
|
24684
|
-
* The function must be in IText.prototype.myFunction And will receive event as args[0]
|
|
24679
|
+
/**
|
|
24680
|
+
* For functionalities on keyDown
|
|
24681
|
+
* Map a special key to a function of the instance/prototype
|
|
24682
|
+
* If you need different behavior for ESC or TAB or arrows, you have to change
|
|
24683
|
+
* this map setting the name of a function that you build on the IText or
|
|
24684
|
+
* your prototype.
|
|
24685
|
+
* the map change will affect all Instances unless you need for only some text Instances
|
|
24686
|
+
* in that case you have to clone this object and assign your Instance.
|
|
24687
|
+
* this.keysMap = Object.assign({}, this.keysMap);
|
|
24688
|
+
* The function must be in IText.prototype.myFunction And will receive event as args[0]
|
|
24685
24689
|
*/
|
|
24686
24690
|
|
|
24687
|
-
/**
|
|
24688
|
-
* For functionalities on keyUp + ctrl || cmd
|
|
24691
|
+
/**
|
|
24692
|
+
* For functionalities on keyUp + ctrl || cmd
|
|
24689
24693
|
*/
|
|
24690
24694
|
|
|
24691
|
-
/**
|
|
24692
|
-
* For functionalities on keyDown + ctrl || cmd
|
|
24695
|
+
/**
|
|
24696
|
+
* For functionalities on keyDown + ctrl || cmd
|
|
24693
24697
|
*/
|
|
24694
24698
|
|
|
24695
|
-
/**
|
|
24696
|
-
* DOM container to append the hiddenTextarea.
|
|
24697
|
-
* An alternative to attaching to the document.body.
|
|
24698
|
-
* Useful to reduce laggish redraw of the full document.body tree and
|
|
24699
|
-
* also with modals event capturing that won't let the textarea take focus.
|
|
24700
|
-
* @type HTMLElement
|
|
24699
|
+
/**
|
|
24700
|
+
* DOM container to append the hiddenTextarea.
|
|
24701
|
+
* An alternative to attaching to the document.body.
|
|
24702
|
+
* Useful to reduce laggish redraw of the full document.body tree and
|
|
24703
|
+
* also with modals event capturing that won't let the textarea take focus.
|
|
24704
|
+
* @type HTMLElement
|
|
24701
24705
|
*/
|
|
24702
24706
|
|
|
24703
|
-
/**
|
|
24704
|
-
* Initializes hidden textarea (needed to bring up keyboard in iOS)
|
|
24707
|
+
/**
|
|
24708
|
+
* Initializes hidden textarea (needed to bring up keyboard in iOS)
|
|
24705
24709
|
*/
|
|
24706
24710
|
initHiddenTextarea() {
|
|
24707
24711
|
const doc = this.canvas && getDocumentFromElement(this.canvas.getElement()) || getFabricDocument();
|
|
@@ -24744,17 +24748,17 @@
|
|
|
24744
24748
|
this.hiddenTextarea = textarea;
|
|
24745
24749
|
}
|
|
24746
24750
|
|
|
24747
|
-
/**
|
|
24748
|
-
* Override this method to customize cursor behavior on textbox blur
|
|
24751
|
+
/**
|
|
24752
|
+
* Override this method to customize cursor behavior on textbox blur
|
|
24749
24753
|
*/
|
|
24750
24754
|
blur() {
|
|
24751
24755
|
this.abortCursorAnimation();
|
|
24752
24756
|
}
|
|
24753
24757
|
|
|
24754
|
-
/**
|
|
24755
|
-
* Handles keydown event
|
|
24756
|
-
* only used for arrows and combination of modifier keys.
|
|
24757
|
-
* @param {KeyboardEvent} e Event object
|
|
24758
|
+
/**
|
|
24759
|
+
* Handles keydown event
|
|
24760
|
+
* only used for arrows and combination of modifier keys.
|
|
24761
|
+
* @param {KeyboardEvent} e Event object
|
|
24758
24762
|
*/
|
|
24759
24763
|
onKeyDown(e) {
|
|
24760
24764
|
if (!this.isEditing) {
|
|
@@ -24780,11 +24784,11 @@
|
|
|
24780
24784
|
}
|
|
24781
24785
|
}
|
|
24782
24786
|
|
|
24783
|
-
/**
|
|
24784
|
-
* Handles keyup event
|
|
24785
|
-
* We handle KeyUp because ie11 and edge have difficulties copy/pasting
|
|
24786
|
-
* if a copy/cut event fired, keyup is dismissed
|
|
24787
|
-
* @param {KeyboardEvent} e Event object
|
|
24787
|
+
/**
|
|
24788
|
+
* Handles keyup event
|
|
24789
|
+
* We handle KeyUp because ie11 and edge have difficulties copy/pasting
|
|
24790
|
+
* if a copy/cut event fired, keyup is dismissed
|
|
24791
|
+
* @param {KeyboardEvent} e Event object
|
|
24788
24792
|
*/
|
|
24789
24793
|
onKeyUp(e) {
|
|
24790
24794
|
if (!this.isEditing || this._copyDone || this.inCompositionMode) {
|
|
@@ -24801,9 +24805,9 @@
|
|
|
24801
24805
|
this.canvas && this.canvas.requestRenderAll();
|
|
24802
24806
|
}
|
|
24803
24807
|
|
|
24804
|
-
/**
|
|
24805
|
-
* Handles onInput event
|
|
24806
|
-
* @param {Event} e Event object
|
|
24808
|
+
/**
|
|
24809
|
+
* Handles onInput event
|
|
24810
|
+
* @param {Event} e Event object
|
|
24807
24811
|
*/
|
|
24808
24812
|
onInput(e) {
|
|
24809
24813
|
const fromPaste = this.fromPaste;
|
|
@@ -24940,15 +24944,15 @@
|
|
|
24940
24944
|
updateAndFire();
|
|
24941
24945
|
}
|
|
24942
24946
|
|
|
24943
|
-
/**
|
|
24944
|
-
* Composition start
|
|
24947
|
+
/**
|
|
24948
|
+
* Composition start
|
|
24945
24949
|
*/
|
|
24946
24950
|
onCompositionStart() {
|
|
24947
24951
|
this.inCompositionMode = true;
|
|
24948
24952
|
}
|
|
24949
24953
|
|
|
24950
|
-
/**
|
|
24951
|
-
* Composition end
|
|
24954
|
+
/**
|
|
24955
|
+
* Composition end
|
|
24952
24956
|
*/
|
|
24953
24957
|
onCompositionEnd() {
|
|
24954
24958
|
this.inCompositionMode = false;
|
|
@@ -24966,8 +24970,8 @@
|
|
|
24966
24970
|
this.updateTextareaPosition();
|
|
24967
24971
|
}
|
|
24968
24972
|
|
|
24969
|
-
/**
|
|
24970
|
-
* Copies selected text
|
|
24973
|
+
/**
|
|
24974
|
+
* Copies selected text
|
|
24971
24975
|
*/
|
|
24972
24976
|
copy() {
|
|
24973
24977
|
if (this.selectionStart === this.selectionEnd) {
|
|
@@ -24986,19 +24990,19 @@
|
|
|
24986
24990
|
this._copyDone = true;
|
|
24987
24991
|
}
|
|
24988
24992
|
|
|
24989
|
-
/**
|
|
24990
|
-
* Pastes text
|
|
24993
|
+
/**
|
|
24994
|
+
* Pastes text
|
|
24991
24995
|
*/
|
|
24992
24996
|
paste() {
|
|
24993
24997
|
this.fromPaste = true;
|
|
24994
24998
|
}
|
|
24995
24999
|
|
|
24996
|
-
/**
|
|
24997
|
-
* Finds the width in pixels before the cursor on the same line
|
|
24998
|
-
* @private
|
|
24999
|
-
* @param {Number} lineIndex
|
|
25000
|
-
* @param {Number} charIndex
|
|
25001
|
-
* @return {Number} widthBeforeCursor width before cursor
|
|
25000
|
+
/**
|
|
25001
|
+
* Finds the width in pixels before the cursor on the same line
|
|
25002
|
+
* @private
|
|
25003
|
+
* @param {Number} lineIndex
|
|
25004
|
+
* @param {Number} charIndex
|
|
25005
|
+
* @return {Number} widthBeforeCursor width before cursor
|
|
25002
25006
|
*/
|
|
25003
25007
|
_getWidthBeforeCursor(lineIndex, charIndex) {
|
|
25004
25008
|
let widthBeforeCursor = this._getLineLeftOffset(lineIndex),
|
|
@@ -25010,11 +25014,11 @@
|
|
|
25010
25014
|
return widthBeforeCursor;
|
|
25011
25015
|
}
|
|
25012
25016
|
|
|
25013
|
-
/**
|
|
25014
|
-
* Gets start offset of a selection
|
|
25015
|
-
* @param {KeyboardEvent} e Event object
|
|
25016
|
-
* @param {Boolean} isRight
|
|
25017
|
-
* @return {Number}
|
|
25017
|
+
/**
|
|
25018
|
+
* Gets start offset of a selection
|
|
25019
|
+
* @param {KeyboardEvent} e Event object
|
|
25020
|
+
* @param {Boolean} isRight
|
|
25021
|
+
* @return {Number}
|
|
25018
25022
|
*/
|
|
25019
25023
|
getDownCursorOffset(e, isRight) {
|
|
25020
25024
|
const selectionProp = this._getSelectionForOffset(e, isRight),
|
|
@@ -25032,12 +25036,12 @@
|
|
|
25032
25036
|
return textAfterCursor.length + indexOnOtherLine + 1 + this.missingNewlineOffset(lineIndex);
|
|
25033
25037
|
}
|
|
25034
25038
|
|
|
25035
|
-
/**
|
|
25036
|
-
* private
|
|
25037
|
-
* Helps finding if the offset should be counted from Start or End
|
|
25038
|
-
* @param {KeyboardEvent} e Event object
|
|
25039
|
-
* @param {Boolean} isRight
|
|
25040
|
-
* @return {Number}
|
|
25039
|
+
/**
|
|
25040
|
+
* private
|
|
25041
|
+
* Helps finding if the offset should be counted from Start or End
|
|
25042
|
+
* @param {KeyboardEvent} e Event object
|
|
25043
|
+
* @param {Boolean} isRight
|
|
25044
|
+
* @return {Number}
|
|
25041
25045
|
*/
|
|
25042
25046
|
_getSelectionForOffset(e, isRight) {
|
|
25043
25047
|
if (e.shiftKey && this.selectionStart !== this.selectionEnd && isRight) {
|
|
@@ -25047,10 +25051,10 @@
|
|
|
25047
25051
|
}
|
|
25048
25052
|
}
|
|
25049
25053
|
|
|
25050
|
-
/**
|
|
25051
|
-
* @param {KeyboardEvent} e Event object
|
|
25052
|
-
* @param {Boolean} isRight
|
|
25053
|
-
* @return {Number}
|
|
25054
|
+
/**
|
|
25055
|
+
* @param {KeyboardEvent} e Event object
|
|
25056
|
+
* @param {Boolean} isRight
|
|
25057
|
+
* @return {Number}
|
|
25054
25058
|
*/
|
|
25055
25059
|
getUpCursorOffset(e, isRight) {
|
|
25056
25060
|
const selectionProp = this._getSelectionForOffset(e, isRight),
|
|
@@ -25069,9 +25073,9 @@
|
|
|
25069
25073
|
return -this._textLines[lineIndex - 1].length + indexOnOtherLine - textBeforeCursor.length + (1 - missingNewlineOffset);
|
|
25070
25074
|
}
|
|
25071
25075
|
|
|
25072
|
-
/**
|
|
25073
|
-
* for a given width it founds the matching character.
|
|
25074
|
-
* @private
|
|
25076
|
+
/**
|
|
25077
|
+
* for a given width it founds the matching character.
|
|
25078
|
+
* @private
|
|
25075
25079
|
*/
|
|
25076
25080
|
_getIndexOnLine(lineIndex, width) {
|
|
25077
25081
|
const line = this._textLines[lineIndex],
|
|
@@ -25101,9 +25105,9 @@
|
|
|
25101
25105
|
return indexOnLine;
|
|
25102
25106
|
}
|
|
25103
25107
|
|
|
25104
|
-
/**
|
|
25105
|
-
* Moves cursor down
|
|
25106
|
-
* @param {KeyboardEvent} e Event object
|
|
25108
|
+
/**
|
|
25109
|
+
* Moves cursor down
|
|
25110
|
+
* @param {KeyboardEvent} e Event object
|
|
25107
25111
|
*/
|
|
25108
25112
|
moveCursorDown(e) {
|
|
25109
25113
|
if (this.selectionStart >= this._text.length && this.selectionEnd >= this._text.length) {
|
|
@@ -25112,9 +25116,9 @@
|
|
|
25112
25116
|
this._moveCursorUpOrDown('Down', e);
|
|
25113
25117
|
}
|
|
25114
25118
|
|
|
25115
|
-
/**
|
|
25116
|
-
* Moves cursor up
|
|
25117
|
-
* @param {KeyboardEvent} e Event object
|
|
25119
|
+
/**
|
|
25120
|
+
* Moves cursor up
|
|
25121
|
+
* @param {KeyboardEvent} e Event object
|
|
25118
25122
|
*/
|
|
25119
25123
|
moveCursorUp(e) {
|
|
25120
25124
|
if (this.selectionStart === 0 && this.selectionEnd === 0) {
|
|
@@ -25123,10 +25127,10 @@
|
|
|
25123
25127
|
this._moveCursorUpOrDown('Up', e);
|
|
25124
25128
|
}
|
|
25125
25129
|
|
|
25126
|
-
/**
|
|
25127
|
-
* Moves cursor up or down, fires the events
|
|
25128
|
-
* @param {String} direction 'Up' or 'Down'
|
|
25129
|
-
* @param {KeyboardEvent} e Event object
|
|
25130
|
+
/**
|
|
25131
|
+
* Moves cursor up or down, fires the events
|
|
25132
|
+
* @param {String} direction 'Up' or 'Down'
|
|
25133
|
+
* @param {KeyboardEvent} e Event object
|
|
25130
25134
|
*/
|
|
25131
25135
|
_moveCursorUpOrDown(direction, e) {
|
|
25132
25136
|
const offset = this[`get${direction}CursorOffset`](e, this._selectionDirection === RIGHT);
|
|
@@ -25148,9 +25152,9 @@
|
|
|
25148
25152
|
}
|
|
25149
25153
|
}
|
|
25150
25154
|
|
|
25151
|
-
/**
|
|
25152
|
-
* Moves cursor with shift
|
|
25153
|
-
* @param {Number} offset
|
|
25155
|
+
/**
|
|
25156
|
+
* Moves cursor with shift
|
|
25157
|
+
* @param {Number} offset
|
|
25154
25158
|
*/
|
|
25155
25159
|
moveCursorWithShift(offset) {
|
|
25156
25160
|
const newSelection = this._selectionDirection === LEFT ? this.selectionStart + offset : this.selectionEnd + offset;
|
|
@@ -25158,9 +25162,9 @@
|
|
|
25158
25162
|
return offset !== 0;
|
|
25159
25163
|
}
|
|
25160
25164
|
|
|
25161
|
-
/**
|
|
25162
|
-
* Moves cursor up without shift
|
|
25163
|
-
* @param {Number} offset
|
|
25165
|
+
/**
|
|
25166
|
+
* Moves cursor up without shift
|
|
25167
|
+
* @param {Number} offset
|
|
25164
25168
|
*/
|
|
25165
25169
|
moveCursorWithoutShift(offset) {
|
|
25166
25170
|
if (offset < 0) {
|
|
@@ -25173,9 +25177,9 @@
|
|
|
25173
25177
|
return offset !== 0;
|
|
25174
25178
|
}
|
|
25175
25179
|
|
|
25176
|
-
/**
|
|
25177
|
-
* Moves cursor left
|
|
25178
|
-
* @param {KeyboardEvent} e Event object
|
|
25180
|
+
/**
|
|
25181
|
+
* Moves cursor left
|
|
25182
|
+
* @param {KeyboardEvent} e Event object
|
|
25179
25183
|
*/
|
|
25180
25184
|
moveCursorLeft(e) {
|
|
25181
25185
|
if (this.selectionStart === 0 && this.selectionEnd === 0) {
|
|
@@ -25184,11 +25188,11 @@
|
|
|
25184
25188
|
this._moveCursorLeftOrRight('Left', e);
|
|
25185
25189
|
}
|
|
25186
25190
|
|
|
25187
|
-
/**
|
|
25188
|
-
* @private
|
|
25189
|
-
* @return {Boolean} true if a change happened
|
|
25190
|
-
*
|
|
25191
|
-
* @todo refactor not to use method name composition
|
|
25191
|
+
/**
|
|
25192
|
+
* @private
|
|
25193
|
+
* @return {Boolean} true if a change happened
|
|
25194
|
+
*
|
|
25195
|
+
* @todo refactor not to use method name composition
|
|
25192
25196
|
*/
|
|
25193
25197
|
_move(e, prop, direction) {
|
|
25194
25198
|
let newValue;
|
|
@@ -25207,23 +25211,23 @@
|
|
|
25207
25211
|
return false;
|
|
25208
25212
|
}
|
|
25209
25213
|
|
|
25210
|
-
/**
|
|
25211
|
-
* @private
|
|
25214
|
+
/**
|
|
25215
|
+
* @private
|
|
25212
25216
|
*/
|
|
25213
25217
|
_moveLeft(e, prop) {
|
|
25214
25218
|
return this._move(e, prop, 'Left');
|
|
25215
25219
|
}
|
|
25216
25220
|
|
|
25217
|
-
/**
|
|
25218
|
-
* @private
|
|
25221
|
+
/**
|
|
25222
|
+
* @private
|
|
25219
25223
|
*/
|
|
25220
25224
|
_moveRight(e, prop) {
|
|
25221
25225
|
return this._move(e, prop, 'Right');
|
|
25222
25226
|
}
|
|
25223
25227
|
|
|
25224
|
-
/**
|
|
25225
|
-
* Moves cursor left without keeping selection
|
|
25226
|
-
* @param {KeyboardEvent} e
|
|
25228
|
+
/**
|
|
25229
|
+
* Moves cursor left without keeping selection
|
|
25230
|
+
* @param {KeyboardEvent} e
|
|
25227
25231
|
*/
|
|
25228
25232
|
moveCursorLeftWithoutShift(e) {
|
|
25229
25233
|
let change = true;
|
|
@@ -25238,9 +25242,9 @@
|
|
|
25238
25242
|
return change;
|
|
25239
25243
|
}
|
|
25240
25244
|
|
|
25241
|
-
/**
|
|
25242
|
-
* Moves cursor left while keeping selection
|
|
25243
|
-
* @param {KeyboardEvent} e
|
|
25245
|
+
/**
|
|
25246
|
+
* Moves cursor left while keeping selection
|
|
25247
|
+
* @param {KeyboardEvent} e
|
|
25244
25248
|
*/
|
|
25245
25249
|
moveCursorLeftWithShift(e) {
|
|
25246
25250
|
if (this._selectionDirection === RIGHT && this.selectionStart !== this.selectionEnd) {
|
|
@@ -25251,9 +25255,9 @@
|
|
|
25251
25255
|
}
|
|
25252
25256
|
}
|
|
25253
25257
|
|
|
25254
|
-
/**
|
|
25255
|
-
* Moves cursor right
|
|
25256
|
-
* @param {KeyboardEvent} e Event object
|
|
25258
|
+
/**
|
|
25259
|
+
* Moves cursor right
|
|
25260
|
+
* @param {KeyboardEvent} e Event object
|
|
25257
25261
|
*/
|
|
25258
25262
|
moveCursorRight(e) {
|
|
25259
25263
|
if (this.selectionStart >= this._text.length && this.selectionEnd >= this._text.length) {
|
|
@@ -25262,10 +25266,10 @@
|
|
|
25262
25266
|
this._moveCursorLeftOrRight('Right', e);
|
|
25263
25267
|
}
|
|
25264
25268
|
|
|
25265
|
-
/**
|
|
25266
|
-
* Moves cursor right or Left, fires event
|
|
25267
|
-
* @param {String} direction 'Left', 'Right'
|
|
25268
|
-
* @param {KeyboardEvent} e Event object
|
|
25269
|
+
/**
|
|
25270
|
+
* Moves cursor right or Left, fires event
|
|
25271
|
+
* @param {String} direction 'Left', 'Right'
|
|
25272
|
+
* @param {KeyboardEvent} e Event object
|
|
25269
25273
|
*/
|
|
25270
25274
|
_moveCursorLeftOrRight(direction, e) {
|
|
25271
25275
|
const actionName = `moveCursor${direction}${e.shiftKey ? 'WithShift' : 'WithoutShift'}`;
|
|
@@ -25280,9 +25284,9 @@
|
|
|
25280
25284
|
}
|
|
25281
25285
|
}
|
|
25282
25286
|
|
|
25283
|
-
/**
|
|
25284
|
-
* Moves cursor right while keeping selection
|
|
25285
|
-
* @param {KeyboardEvent} e
|
|
25287
|
+
/**
|
|
25288
|
+
* Moves cursor right while keeping selection
|
|
25289
|
+
* @param {KeyboardEvent} e
|
|
25286
25290
|
*/
|
|
25287
25291
|
moveCursorRightWithShift(e) {
|
|
25288
25292
|
if (this._selectionDirection === LEFT && this.selectionStart !== this.selectionEnd) {
|
|
@@ -25293,9 +25297,9 @@
|
|
|
25293
25297
|
}
|
|
25294
25298
|
}
|
|
25295
25299
|
|
|
25296
|
-
/**
|
|
25297
|
-
* Moves cursor right without keeping selection
|
|
25298
|
-
* @param {KeyboardEvent} e Event object
|
|
25300
|
+
/**
|
|
25301
|
+
* Moves cursor right without keeping selection
|
|
25302
|
+
* @param {KeyboardEvent} e Event object
|
|
25299
25303
|
*/
|
|
25300
25304
|
moveCursorRightWithoutShift(e) {
|
|
25301
25305
|
let changed = true;
|
|
@@ -25310,8 +25314,8 @@
|
|
|
25310
25314
|
}
|
|
25311
25315
|
}
|
|
25312
25316
|
|
|
25313
|
-
/**
|
|
25314
|
-
* `LEFT_CLICK === 0`
|
|
25317
|
+
/**
|
|
25318
|
+
* `LEFT_CLICK === 0`
|
|
25315
25319
|
*/
|
|
25316
25320
|
const notALeftClick = e => !!e.button;
|
|
25317
25321
|
class ITextClickBehavior extends ITextKeyBehavior {
|
|
@@ -25329,36 +25333,36 @@
|
|
|
25329
25333
|
super.initBehavior();
|
|
25330
25334
|
}
|
|
25331
25335
|
|
|
25332
|
-
/**
|
|
25333
|
-
* If this method returns true a mouse move operation over a text selection
|
|
25334
|
-
* will not prevent the native mouse event allowing the browser to start a drag operation.
|
|
25335
|
-
* shouldStartDragging can be read 'do not prevent default for mouse move event'
|
|
25336
|
-
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
25337
|
-
* @returns
|
|
25336
|
+
/**
|
|
25337
|
+
* If this method returns true a mouse move operation over a text selection
|
|
25338
|
+
* will not prevent the native mouse event allowing the browser to start a drag operation.
|
|
25339
|
+
* shouldStartDragging can be read 'do not prevent default for mouse move event'
|
|
25340
|
+
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
25341
|
+
* @returns
|
|
25338
25342
|
*/
|
|
25339
25343
|
shouldStartDragging() {
|
|
25340
25344
|
return this.draggableTextDelegate.isActive();
|
|
25341
25345
|
}
|
|
25342
25346
|
|
|
25343
|
-
/**
|
|
25344
|
-
* @public override this method to control whether instance should/shouldn't become a drag source,
|
|
25345
|
-
* @see also {@link DraggableTextDelegate#isActive}
|
|
25346
|
-
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
25347
|
-
* @returns {boolean} should handle event
|
|
25347
|
+
/**
|
|
25348
|
+
* @public override this method to control whether instance should/shouldn't become a drag source,
|
|
25349
|
+
* @see also {@link DraggableTextDelegate#isActive}
|
|
25350
|
+
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
25351
|
+
* @returns {boolean} should handle event
|
|
25348
25352
|
*/
|
|
25349
25353
|
onDragStart(e) {
|
|
25350
25354
|
return this.draggableTextDelegate.onDragStart(e);
|
|
25351
25355
|
}
|
|
25352
25356
|
|
|
25353
|
-
/**
|
|
25354
|
-
* @public override this method to control whether instance should/shouldn't become a drop target
|
|
25357
|
+
/**
|
|
25358
|
+
* @public override this method to control whether instance should/shouldn't become a drop target
|
|
25355
25359
|
*/
|
|
25356
25360
|
canDrop(e) {
|
|
25357
25361
|
return this.draggableTextDelegate.canDrop(e);
|
|
25358
25362
|
}
|
|
25359
25363
|
|
|
25360
|
-
/**
|
|
25361
|
-
* Default handler for double click, select a word or enter overlay editing
|
|
25364
|
+
/**
|
|
25365
|
+
* Default handler for double click, select a word or enter overlay editing
|
|
25362
25366
|
*/
|
|
25363
25367
|
doubleClickHandler(options) {
|
|
25364
25368
|
// Check if we should enter overlay editing mode
|
|
@@ -25375,8 +25379,8 @@
|
|
|
25375
25379
|
this.renderCursorOrSelection();
|
|
25376
25380
|
}
|
|
25377
25381
|
|
|
25378
|
-
/**
|
|
25379
|
-
* Default handler for triple click, select a line
|
|
25382
|
+
/**
|
|
25383
|
+
* Default handler for triple click, select a line
|
|
25380
25384
|
*/
|
|
25381
25385
|
tripleClickHandler(options) {
|
|
25382
25386
|
if (!this.isEditing) {
|
|
@@ -25386,13 +25390,13 @@
|
|
|
25386
25390
|
this.renderCursorOrSelection();
|
|
25387
25391
|
}
|
|
25388
25392
|
|
|
25389
|
-
/**
|
|
25390
|
-
* Default event handler for the basic functionalities needed on _mouseDown
|
|
25391
|
-
* can be overridden to do something different.
|
|
25392
|
-
* Scope of this implementation is: find the click position, set selectionStart
|
|
25393
|
-
* find selectionEnd, initialize the drawing of either cursor or selection area
|
|
25394
|
-
* initializing a mousedDown on a text area will cancel fabricjs knowledge of
|
|
25395
|
-
* current compositionMode. It will be set to false.
|
|
25393
|
+
/**
|
|
25394
|
+
* Default event handler for the basic functionalities needed on _mouseDown
|
|
25395
|
+
* can be overridden to do something different.
|
|
25396
|
+
* Scope of this implementation is: find the click position, set selectionStart
|
|
25397
|
+
* find selectionEnd, initialize the drawing of either cursor or selection area
|
|
25398
|
+
* initializing a mousedDown on a text area will cancel fabricjs knowledge of
|
|
25399
|
+
* current compositionMode. It will be set to false.
|
|
25396
25400
|
*/
|
|
25397
25401
|
_mouseDownHandler(_ref) {
|
|
25398
25402
|
let {
|
|
@@ -25420,9 +25424,9 @@
|
|
|
25420
25424
|
this.selected || (this.selected = alreadySelected || this.isEditing);
|
|
25421
25425
|
}
|
|
25422
25426
|
|
|
25423
|
-
/**
|
|
25424
|
-
* standard handler for mouse up, overridable
|
|
25425
|
-
* @private
|
|
25427
|
+
/**
|
|
25428
|
+
* standard handler for mouse up, overridable
|
|
25429
|
+
* @private
|
|
25426
25430
|
*/
|
|
25427
25431
|
mouseUpHandler(_ref2) {
|
|
25428
25432
|
let {
|
|
@@ -25453,9 +25457,9 @@
|
|
|
25453
25457
|
}
|
|
25454
25458
|
}
|
|
25455
25459
|
|
|
25456
|
-
/**
|
|
25457
|
-
* Changes cursor location in a text depending on passed pointer (x/y) object
|
|
25458
|
-
* @param {TPointerEvent} e Event object
|
|
25460
|
+
/**
|
|
25461
|
+
* Changes cursor location in a text depending on passed pointer (x/y) object
|
|
25462
|
+
* @param {TPointerEvent} e Event object
|
|
25459
25463
|
*/
|
|
25460
25464
|
setCursorByClick(e) {
|
|
25461
25465
|
const newSelection = this.getSelectionStartFromPointer(e),
|
|
@@ -25473,10 +25477,10 @@
|
|
|
25473
25477
|
}
|
|
25474
25478
|
}
|
|
25475
25479
|
|
|
25476
|
-
/**
|
|
25477
|
-
* Returns index of a character corresponding to where an object was clicked
|
|
25478
|
-
* @param {TPointerEvent} e Event object
|
|
25479
|
-
* @return {Number} Index of a character
|
|
25480
|
+
/**
|
|
25481
|
+
* Returns index of a character corresponding to where an object was clicked
|
|
25482
|
+
* @param {TPointerEvent} e Event object
|
|
25483
|
+
* @return {Number} Index of a character
|
|
25480
25484
|
*/
|
|
25481
25485
|
getSelectionStartFromPointer(e) {
|
|
25482
25486
|
const mouseOffset = this.canvas.getScenePoint(e).transform(invertTransform(this.calcTransformMatrix())).add(new Point(-this._getLeftOffset(), -this._getTopOffset()));
|
|
@@ -25522,15 +25526,15 @@
|
|
|
25522
25526
|
}
|
|
25523
25527
|
}
|
|
25524
25528
|
|
|
25525
|
-
/**
|
|
25526
|
-
* Hit Testing and Cursor Positioning System
|
|
25527
|
-
*
|
|
25528
|
-
* Maps pointer coordinates to text positions and provides cursor rectangles
|
|
25529
|
-
* for interactive text editing with grapheme-aware boundaries.
|
|
25529
|
+
/**
|
|
25530
|
+
* Hit Testing and Cursor Positioning System
|
|
25531
|
+
*
|
|
25532
|
+
* Maps pointer coordinates to text positions and provides cursor rectangles
|
|
25533
|
+
* for interactive text editing with grapheme-aware boundaries.
|
|
25530
25534
|
*/
|
|
25531
25535
|
|
|
25532
|
-
/**
|
|
25533
|
-
* Hit test a point against laid out text to find insertion position
|
|
25536
|
+
/**
|
|
25537
|
+
* Hit test a point against laid out text to find insertion position
|
|
25534
25538
|
*/
|
|
25535
25539
|
function hitTest(x, y, layout, options) {
|
|
25536
25540
|
if (layout.lines.length === 0) {
|
|
@@ -25574,8 +25578,8 @@
|
|
|
25574
25578
|
};
|
|
25575
25579
|
}
|
|
25576
25580
|
|
|
25577
|
-
/**
|
|
25578
|
-
* Get cursor rectangle for a given insertion index
|
|
25581
|
+
/**
|
|
25582
|
+
* Get cursor rectangle for a given insertion index
|
|
25579
25583
|
*/
|
|
25580
25584
|
function getCursorRect(insertionIndex, layout, options) {
|
|
25581
25585
|
if (layout.lines.length === 0) {
|
|
@@ -25622,8 +25626,8 @@
|
|
|
25622
25626
|
|
|
25623
25627
|
// Private helper functions
|
|
25624
25628
|
|
|
25625
|
-
/**
|
|
25626
|
-
* Find which line contains the given Y coordinate
|
|
25629
|
+
/**
|
|
25630
|
+
* Find which line contains the given Y coordinate
|
|
25627
25631
|
*/
|
|
25628
25632
|
function findLineAtY(y, lines) {
|
|
25629
25633
|
var _lines;
|
|
@@ -25646,8 +25650,8 @@
|
|
|
25646
25650
|
};
|
|
25647
25651
|
}
|
|
25648
25652
|
|
|
25649
|
-
/**
|
|
25650
|
-
* Find character position within a line at given X coordinate
|
|
25653
|
+
/**
|
|
25654
|
+
* Find character position within a line at given X coordinate
|
|
25651
25655
|
*/
|
|
25652
25656
|
function findCharAtX(x, line, options) {
|
|
25653
25657
|
if (line.bounds.length === 0) {
|
|
@@ -25753,8 +25757,8 @@
|
|
|
25753
25757
|
};
|
|
25754
25758
|
}
|
|
25755
25759
|
|
|
25756
|
-
/**
|
|
25757
|
-
* Calculate total insertion index from line and character indices
|
|
25760
|
+
/**
|
|
25761
|
+
* Calculate total insertion index from line and character indices
|
|
25758
25762
|
*/
|
|
25759
25763
|
function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
|
|
25760
25764
|
let insertionIndex = 0;
|
|
@@ -25773,8 +25777,8 @@
|
|
|
25773
25777
|
return insertionIndex;
|
|
25774
25778
|
}
|
|
25775
25779
|
|
|
25776
|
-
/**
|
|
25777
|
-
* Find line and grapheme position from insertion index
|
|
25780
|
+
/**
|
|
25781
|
+
* Find line and grapheme position from insertion index
|
|
25778
25782
|
*/
|
|
25779
25783
|
function findPositionFromIndex(insertionIndex, layout) {
|
|
25780
25784
|
let currentIndex = 0;
|
|
@@ -25816,8 +25820,8 @@
|
|
|
25816
25820
|
};
|
|
25817
25821
|
}
|
|
25818
25822
|
|
|
25819
|
-
/**
|
|
25820
|
-
* Calculate Y position of a line
|
|
25823
|
+
/**
|
|
25824
|
+
* Calculate Y position of a line
|
|
25821
25825
|
*/
|
|
25822
25826
|
function calculateLineY(lineIndex, layout, options) {
|
|
25823
25827
|
let y = 0;
|
|
@@ -25920,48 +25924,48 @@
|
|
|
25920
25924
|
|
|
25921
25925
|
// @TODO this is not complete
|
|
25922
25926
|
|
|
25923
|
-
/**
|
|
25924
|
-
* @fires changed
|
|
25925
|
-
* @fires selection:changed
|
|
25926
|
-
* @fires editing:entered
|
|
25927
|
-
* @fires editing:exited
|
|
25928
|
-
* @fires dragstart
|
|
25929
|
-
* @fires drag drag event firing on the drag source
|
|
25930
|
-
* @fires dragend
|
|
25931
|
-
* @fires copy
|
|
25932
|
-
* @fires cut
|
|
25933
|
-
* @fires paste
|
|
25934
|
-
*
|
|
25935
|
-
* #### Supported key combinations
|
|
25936
|
-
* ```
|
|
25937
|
-
* Move cursor: left, right, up, down
|
|
25938
|
-
* Select character: shift + left, shift + right
|
|
25939
|
-
* Select text vertically: shift + up, shift + down
|
|
25940
|
-
* Move cursor by word: alt + left, alt + right
|
|
25941
|
-
* Select words: shift + alt + left, shift + alt + right
|
|
25942
|
-
* Move cursor to line start/end: cmd + left, cmd + right or home, end
|
|
25943
|
-
* Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
|
|
25944
|
-
* Jump to start/end of text: cmd + up, cmd + down
|
|
25945
|
-
* Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
|
|
25946
|
-
* Delete character: backspace
|
|
25947
|
-
* Delete word: alt + backspace
|
|
25948
|
-
* Delete line: cmd + backspace
|
|
25949
|
-
* Forward delete: delete
|
|
25950
|
-
* Copy text: ctrl/cmd + c
|
|
25951
|
-
* Paste text: ctrl/cmd + v
|
|
25952
|
-
* Cut text: ctrl/cmd + x
|
|
25953
|
-
* Select entire text: ctrl/cmd + a
|
|
25954
|
-
* Quit editing tab or esc
|
|
25955
|
-
* ```
|
|
25956
|
-
*
|
|
25957
|
-
* #### Supported mouse/touch combination
|
|
25958
|
-
* ```
|
|
25959
|
-
* Position cursor: click/touch
|
|
25960
|
-
* Create selection: click/touch & drag
|
|
25961
|
-
* Create selection: click & shift + click
|
|
25962
|
-
* Select word: double click
|
|
25963
|
-
* Select line: triple click
|
|
25964
|
-
* ```
|
|
25927
|
+
/**
|
|
25928
|
+
* @fires changed
|
|
25929
|
+
* @fires selection:changed
|
|
25930
|
+
* @fires editing:entered
|
|
25931
|
+
* @fires editing:exited
|
|
25932
|
+
* @fires dragstart
|
|
25933
|
+
* @fires drag drag event firing on the drag source
|
|
25934
|
+
* @fires dragend
|
|
25935
|
+
* @fires copy
|
|
25936
|
+
* @fires cut
|
|
25937
|
+
* @fires paste
|
|
25938
|
+
*
|
|
25939
|
+
* #### Supported key combinations
|
|
25940
|
+
* ```
|
|
25941
|
+
* Move cursor: left, right, up, down
|
|
25942
|
+
* Select character: shift + left, shift + right
|
|
25943
|
+
* Select text vertically: shift + up, shift + down
|
|
25944
|
+
* Move cursor by word: alt + left, alt + right
|
|
25945
|
+
* Select words: shift + alt + left, shift + alt + right
|
|
25946
|
+
* Move cursor to line start/end: cmd + left, cmd + right or home, end
|
|
25947
|
+
* Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
|
|
25948
|
+
* Jump to start/end of text: cmd + up, cmd + down
|
|
25949
|
+
* Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
|
|
25950
|
+
* Delete character: backspace
|
|
25951
|
+
* Delete word: alt + backspace
|
|
25952
|
+
* Delete line: cmd + backspace
|
|
25953
|
+
* Forward delete: delete
|
|
25954
|
+
* Copy text: ctrl/cmd + c
|
|
25955
|
+
* Paste text: ctrl/cmd + v
|
|
25956
|
+
* Cut text: ctrl/cmd + x
|
|
25957
|
+
* Select entire text: ctrl/cmd + a
|
|
25958
|
+
* Quit editing tab or esc
|
|
25959
|
+
* ```
|
|
25960
|
+
*
|
|
25961
|
+
* #### Supported mouse/touch combination
|
|
25962
|
+
* ```
|
|
25963
|
+
* Position cursor: click/touch
|
|
25964
|
+
* Create selection: click/touch & drag
|
|
25965
|
+
* Create selection: click & shift + click
|
|
25966
|
+
* Select word: double click
|
|
25967
|
+
* Select line: triple click
|
|
25968
|
+
* ```
|
|
25965
25969
|
*/
|
|
25966
25970
|
class IText extends ITextClickBehavior {
|
|
25967
25971
|
static getDefaults() {
|
|
@@ -25976,10 +25980,10 @@
|
|
|
25976
25980
|
return type === 'itext' ? 'i-text' : type;
|
|
25977
25981
|
}
|
|
25978
25982
|
|
|
25979
|
-
/**
|
|
25980
|
-
* Constructor
|
|
25981
|
-
* @param {String} text Text string
|
|
25982
|
-
* @param {Object} [options] Options object
|
|
25983
|
+
/**
|
|
25984
|
+
* Constructor
|
|
25985
|
+
* @param {String} text Text string
|
|
25986
|
+
* @param {Object} [options] Options object
|
|
25983
25987
|
*/
|
|
25984
25988
|
constructor(text, options) {
|
|
25985
25989
|
super(text, {
|
|
@@ -25989,11 +25993,11 @@
|
|
|
25989
25993
|
this.initBehavior();
|
|
25990
25994
|
}
|
|
25991
25995
|
|
|
25992
|
-
/**
|
|
25993
|
-
* While editing handle differently
|
|
25994
|
-
* @private
|
|
25995
|
-
* @param {string} key
|
|
25996
|
-
* @param {*} value
|
|
25996
|
+
/**
|
|
25997
|
+
* While editing handle differently
|
|
25998
|
+
* @private
|
|
25999
|
+
* @param {string} key
|
|
26000
|
+
* @param {*} value
|
|
25997
26001
|
*/
|
|
25998
26002
|
_set(key, value) {
|
|
25999
26003
|
if (this.isEditing && this._savedProps && key in this._savedProps) {
|
|
@@ -26008,28 +26012,28 @@
|
|
|
26008
26012
|
return super._set(key, value);
|
|
26009
26013
|
}
|
|
26010
26014
|
|
|
26011
|
-
/**
|
|
26012
|
-
* Sets selection start (left boundary of a selection)
|
|
26013
|
-
* @param {Number} index Index to set selection start to
|
|
26015
|
+
/**
|
|
26016
|
+
* Sets selection start (left boundary of a selection)
|
|
26017
|
+
* @param {Number} index Index to set selection start to
|
|
26014
26018
|
*/
|
|
26015
26019
|
setSelectionStart(index) {
|
|
26016
26020
|
index = Math.max(index, 0);
|
|
26017
26021
|
this._updateAndFire('selectionStart', index);
|
|
26018
26022
|
}
|
|
26019
26023
|
|
|
26020
|
-
/**
|
|
26021
|
-
* Sets selection end (right boundary of a selection)
|
|
26022
|
-
* @param {Number} index Index to set selection end to
|
|
26024
|
+
/**
|
|
26025
|
+
* Sets selection end (right boundary of a selection)
|
|
26026
|
+
* @param {Number} index Index to set selection end to
|
|
26023
26027
|
*/
|
|
26024
26028
|
setSelectionEnd(index) {
|
|
26025
26029
|
index = Math.min(index, this.text.length);
|
|
26026
26030
|
this._updateAndFire('selectionEnd', index);
|
|
26027
26031
|
}
|
|
26028
26032
|
|
|
26029
|
-
/**
|
|
26030
|
-
* @private
|
|
26031
|
-
* @param {String} property 'selectionStart' or 'selectionEnd'
|
|
26032
|
-
* @param {Number} index new position of property
|
|
26033
|
+
/**
|
|
26034
|
+
* @private
|
|
26035
|
+
* @param {String} property 'selectionStart' or 'selectionEnd'
|
|
26036
|
+
* @param {Number} index new position of property
|
|
26033
26037
|
*/
|
|
26034
26038
|
_updateAndFire(property, index) {
|
|
26035
26039
|
if (this[property] !== index) {
|
|
@@ -26039,9 +26043,9 @@
|
|
|
26039
26043
|
this._updateTextarea();
|
|
26040
26044
|
}
|
|
26041
26045
|
|
|
26042
|
-
/**
|
|
26043
|
-
* Fires the even of selection changed
|
|
26044
|
-
* @private
|
|
26046
|
+
/**
|
|
26047
|
+
* Fires the even of selection changed
|
|
26048
|
+
* @private
|
|
26045
26049
|
*/
|
|
26046
26050
|
_fireSelectionChanged() {
|
|
26047
26051
|
this.fire('selection:changed');
|
|
@@ -26050,25 +26054,25 @@
|
|
|
26050
26054
|
});
|
|
26051
26055
|
}
|
|
26052
26056
|
|
|
26053
|
-
/**
|
|
26054
|
-
* Initialize text dimensions. Render all text on given context
|
|
26055
|
-
* or on a offscreen canvas to get the text width with measureText.
|
|
26056
|
-
* Updates this.width and this.height with the proper values.
|
|
26057
|
-
* Does not return dimensions.
|
|
26058
|
-
* @private
|
|
26057
|
+
/**
|
|
26058
|
+
* Initialize text dimensions. Render all text on given context
|
|
26059
|
+
* or on a offscreen canvas to get the text width with measureText.
|
|
26060
|
+
* Updates this.width and this.height with the proper values.
|
|
26061
|
+
* Does not return dimensions.
|
|
26062
|
+
* @private
|
|
26059
26063
|
*/
|
|
26060
26064
|
initDimensions() {
|
|
26061
26065
|
this.isEditing && this.initDelayedCursor();
|
|
26062
26066
|
super.initDimensions();
|
|
26063
26067
|
}
|
|
26064
26068
|
|
|
26065
|
-
/**
|
|
26066
|
-
* Gets style of a current selection/cursor (at the start position)
|
|
26067
|
-
* if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
|
|
26068
|
-
* @param {Number} startIndex Start index to get styles at
|
|
26069
|
-
* @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
26070
|
-
* @param {Boolean} [complete] get full style or not
|
|
26071
|
-
* @return {Array} styles an array with one, zero or more Style objects
|
|
26069
|
+
/**
|
|
26070
|
+
* Gets style of a current selection/cursor (at the start position)
|
|
26071
|
+
* if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
|
|
26072
|
+
* @param {Number} startIndex Start index to get styles at
|
|
26073
|
+
* @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
26074
|
+
* @param {Boolean} [complete] get full style or not
|
|
26075
|
+
* @return {Array} styles an array with one, zero or more Style objects
|
|
26072
26076
|
*/
|
|
26073
26077
|
getSelectionStyles() {
|
|
26074
26078
|
let startIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart || 0;
|
|
@@ -26077,11 +26081,11 @@
|
|
|
26077
26081
|
return super.getSelectionStyles(startIndex, endIndex, complete);
|
|
26078
26082
|
}
|
|
26079
26083
|
|
|
26080
|
-
/**
|
|
26081
|
-
* Sets style of a current selection, if no selection exist, do not set anything.
|
|
26082
|
-
* @param {Object} [styles] Styles object
|
|
26083
|
-
* @param {Number} [startIndex] Start index to get styles at
|
|
26084
|
-
* @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
26084
|
+
/**
|
|
26085
|
+
* Sets style of a current selection, if no selection exist, do not set anything.
|
|
26086
|
+
* @param {Object} [styles] Styles object
|
|
26087
|
+
* @param {Number} [startIndex] Start index to get styles at
|
|
26088
|
+
* @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
26085
26089
|
*/
|
|
26086
26090
|
setSelectionStyles(styles) {
|
|
26087
26091
|
let startIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selectionStart || 0;
|
|
@@ -26089,10 +26093,10 @@
|
|
|
26089
26093
|
return super.setSelectionStyles(styles, startIndex, endIndex);
|
|
26090
26094
|
}
|
|
26091
26095
|
|
|
26092
|
-
/**
|
|
26093
|
-
* Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
|
|
26094
|
-
* @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
|
|
26095
|
-
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
26096
|
+
/**
|
|
26097
|
+
* Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
|
|
26098
|
+
* @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
|
|
26099
|
+
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
26096
26100
|
*/
|
|
26097
26101
|
get2DCursorLocation() {
|
|
26098
26102
|
let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -26100,9 +26104,9 @@
|
|
|
26100
26104
|
return super.get2DCursorLocation(selectionStart, skipWrapping);
|
|
26101
26105
|
}
|
|
26102
26106
|
|
|
26103
|
-
/**
|
|
26104
|
-
* @private
|
|
26105
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
26107
|
+
/**
|
|
26108
|
+
* @private
|
|
26109
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
26106
26110
|
*/
|
|
26107
26111
|
render(ctx) {
|
|
26108
26112
|
super.render(ctx);
|
|
@@ -26112,9 +26116,9 @@
|
|
|
26112
26116
|
this.renderCursorOrSelection();
|
|
26113
26117
|
}
|
|
26114
26118
|
|
|
26115
|
-
/**
|
|
26116
|
-
* @override block cursor/selection logic while rendering the exported canvas
|
|
26117
|
-
* @todo this workaround should be replaced with a more robust solution
|
|
26119
|
+
/**
|
|
26120
|
+
* @override block cursor/selection logic while rendering the exported canvas
|
|
26121
|
+
* @todo this workaround should be replaced with a more robust solution
|
|
26118
26122
|
*/
|
|
26119
26123
|
toCanvasElement(options) {
|
|
26120
26124
|
const isEditing = this.isEditing;
|
|
@@ -26124,9 +26128,9 @@
|
|
|
26124
26128
|
return canvas;
|
|
26125
26129
|
}
|
|
26126
26130
|
|
|
26127
|
-
/**
|
|
26128
|
-
* Renders cursor or selection (depending on what exists)
|
|
26129
|
-
* it does on the contextTop. If contextTop is not available, do nothing.
|
|
26131
|
+
/**
|
|
26132
|
+
* Renders cursor or selection (depending on what exists)
|
|
26133
|
+
* it does on the contextTop. If contextTop is not available, do nothing.
|
|
26130
26134
|
*/
|
|
26131
26135
|
renderCursorOrSelection() {
|
|
26132
26136
|
if (!this.isEditing || !this.canvas) {
|
|
@@ -26182,12 +26186,12 @@
|
|
|
26182
26186
|
ctx.restore();
|
|
26183
26187
|
}
|
|
26184
26188
|
|
|
26185
|
-
/**
|
|
26186
|
-
* Finds and returns an array of clip paths that are applied to the parent
|
|
26187
|
-
* group(s) of the current FabricObject instance. The object's hierarchy is
|
|
26188
|
-
* traversed upwards (from the current object towards the root of the canvas),
|
|
26189
|
-
* checking each parent object for the presence of a `clipPath` that is not
|
|
26190
|
-
* absolutely positioned.
|
|
26189
|
+
/**
|
|
26190
|
+
* Finds and returns an array of clip paths that are applied to the parent
|
|
26191
|
+
* group(s) of the current FabricObject instance. The object's hierarchy is
|
|
26192
|
+
* traversed upwards (from the current object towards the root of the canvas),
|
|
26193
|
+
* checking each parent object for the presence of a `clipPath` that is not
|
|
26194
|
+
* absolutely positioned.
|
|
26191
26195
|
*/
|
|
26192
26196
|
findAncestorsWithClipPath() {
|
|
26193
26197
|
const clipPathAncestors = [];
|
|
@@ -26202,13 +26206,13 @@
|
|
|
26202
26206
|
return clipPathAncestors;
|
|
26203
26207
|
}
|
|
26204
26208
|
|
|
26205
|
-
/**
|
|
26206
|
-
* Returns cursor boundaries (left, top, leftOffset, topOffset)
|
|
26207
|
-
* left/top are left/top of entire text box
|
|
26208
|
-
* leftOffset/topOffset are offset from that left/top point of a text box
|
|
26209
|
-
* @private
|
|
26210
|
-
* @param {number} [index] index from start
|
|
26211
|
-
* @param {boolean} [skipCaching]
|
|
26209
|
+
/**
|
|
26210
|
+
* Returns cursor boundaries (left, top, leftOffset, topOffset)
|
|
26211
|
+
* left/top are left/top of entire text box
|
|
26212
|
+
* leftOffset/topOffset are offset from that left/top point of a text box
|
|
26213
|
+
* @private
|
|
26214
|
+
* @param {number} [index] index from start
|
|
26215
|
+
* @param {boolean} [skipCaching]
|
|
26212
26216
|
*/
|
|
26213
26217
|
_getCursorBoundaries() {
|
|
26214
26218
|
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -26222,11 +26226,11 @@
|
|
|
26222
26226
|
return this._getCursorBoundariesOriginal(index, skipCaching);
|
|
26223
26227
|
}
|
|
26224
26228
|
|
|
26225
|
-
/**
|
|
26226
|
-
* Caches and returns cursor left/top offset relative to instance's center point
|
|
26227
|
-
* @private
|
|
26228
|
-
* @param {number} index index from start
|
|
26229
|
-
* @param {boolean} [skipCaching]
|
|
26229
|
+
/**
|
|
26230
|
+
* Caches and returns cursor left/top offset relative to instance's center point
|
|
26231
|
+
* @private
|
|
26232
|
+
* @param {number} index index from start
|
|
26233
|
+
* @param {boolean} [skipCaching]
|
|
26230
26234
|
*/
|
|
26231
26235
|
_getCursorBoundariesOffsets(index, skipCaching) {
|
|
26232
26236
|
if (skipCaching) {
|
|
@@ -26238,9 +26242,9 @@
|
|
|
26238
26242
|
return this.cursorOffsetCache = this.__getCursorBoundariesOffsets(index);
|
|
26239
26243
|
}
|
|
26240
26244
|
|
|
26241
|
-
/**
|
|
26242
|
-
* Enhanced cursor boundaries using advanced hit testing when available
|
|
26243
|
-
* @private
|
|
26245
|
+
/**
|
|
26246
|
+
* Enhanced cursor boundaries using advanced hit testing when available
|
|
26247
|
+
* @private
|
|
26244
26248
|
*/
|
|
26245
26249
|
_getCursorBoundariesAdvanced(index) {
|
|
26246
26250
|
if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
|
|
@@ -26256,9 +26260,9 @@
|
|
|
26256
26260
|
};
|
|
26257
26261
|
}
|
|
26258
26262
|
|
|
26259
|
-
/**
|
|
26260
|
-
* Enhanced selection start from pointer using BiDi-aware hit testing
|
|
26261
|
-
* @override
|
|
26263
|
+
/**
|
|
26264
|
+
* Enhanced selection start from pointer using BiDi-aware hit testing
|
|
26265
|
+
* @override
|
|
26262
26266
|
*/
|
|
26263
26267
|
getSelectionStartFromPointer(e) {
|
|
26264
26268
|
if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
|
|
@@ -26272,9 +26276,9 @@
|
|
|
26272
26276
|
return Math.min(hitResult.charIndex, this._text.length);
|
|
26273
26277
|
}
|
|
26274
26278
|
|
|
26275
|
-
/**
|
|
26276
|
-
* Original cursor boundaries implementation
|
|
26277
|
-
* @private
|
|
26279
|
+
/**
|
|
26280
|
+
* Original cursor boundaries implementation
|
|
26281
|
+
* @private
|
|
26278
26282
|
*/
|
|
26279
26283
|
_getCursorBoundariesOriginal(index, skipCaching) {
|
|
26280
26284
|
const left = this._getLeftOffset(),
|
|
@@ -26288,10 +26292,10 @@
|
|
|
26288
26292
|
};
|
|
26289
26293
|
}
|
|
26290
26294
|
|
|
26291
|
-
/**
|
|
26292
|
-
* Calculates cursor left/top offset relative to instance's center point
|
|
26293
|
-
* @private
|
|
26294
|
-
* @param {number} index index from start
|
|
26295
|
+
/**
|
|
26296
|
+
* Calculates cursor left/top offset relative to instance's center point
|
|
26297
|
+
* @private
|
|
26298
|
+
* @param {number} index index from start
|
|
26295
26299
|
*/
|
|
26296
26300
|
__getCursorBoundariesOffsets(index) {
|
|
26297
26301
|
let topOffset = 0,
|
|
@@ -26325,29 +26329,29 @@
|
|
|
26325
26329
|
return boundaries;
|
|
26326
26330
|
}
|
|
26327
26331
|
|
|
26328
|
-
/**
|
|
26329
|
-
* Renders cursor on context Top, outside the animation cycle, on request
|
|
26330
|
-
* Used for the drag/drop effect.
|
|
26331
|
-
* If contextTop is not available, do nothing.
|
|
26332
|
+
/**
|
|
26333
|
+
* Renders cursor on context Top, outside the animation cycle, on request
|
|
26334
|
+
* Used for the drag/drop effect.
|
|
26335
|
+
* If contextTop is not available, do nothing.
|
|
26332
26336
|
*/
|
|
26333
26337
|
renderCursorAt(selectionStart) {
|
|
26334
26338
|
this._renderCursor(this.canvas.contextTop, this._getCursorBoundaries(selectionStart, true), selectionStart);
|
|
26335
26339
|
}
|
|
26336
26340
|
|
|
26337
|
-
/**
|
|
26338
|
-
* Renders cursor
|
|
26339
|
-
* @param {Object} boundaries
|
|
26340
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
26341
|
+
/**
|
|
26342
|
+
* Renders cursor
|
|
26343
|
+
* @param {Object} boundaries
|
|
26344
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
26341
26345
|
*/
|
|
26342
26346
|
renderCursor(ctx, boundaries) {
|
|
26343
26347
|
this._renderCursor(ctx, boundaries, this.selectionStart);
|
|
26344
26348
|
}
|
|
26345
26349
|
|
|
26346
|
-
/**
|
|
26347
|
-
* Return the data needed to render the cursor for given selection start
|
|
26348
|
-
* The left,top are relative to the object, while width and height are prescaled
|
|
26349
|
-
* to look think with canvas zoom and object scaling,
|
|
26350
|
-
* so they depend on canvas and object scaling
|
|
26350
|
+
/**
|
|
26351
|
+
* Return the data needed to render the cursor for given selection start
|
|
26352
|
+
* The left,top are relative to the object, while width and height are prescaled
|
|
26353
|
+
* to look think with canvas zoom and object scaling,
|
|
26354
|
+
* so they depend on canvas and object scaling
|
|
26351
26355
|
*/
|
|
26352
26356
|
getCursorRenderingData() {
|
|
26353
26357
|
let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -26370,9 +26374,9 @@
|
|
|
26370
26374
|
};
|
|
26371
26375
|
}
|
|
26372
26376
|
|
|
26373
|
-
/**
|
|
26374
|
-
* Render the cursor at the given selectionStart.
|
|
26375
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
26377
|
+
/**
|
|
26378
|
+
* Render the cursor at the given selectionStart.
|
|
26379
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
26376
26380
|
*/
|
|
26377
26381
|
_renderCursor(ctx, boundaries, selectionStart) {
|
|
26378
26382
|
const {
|
|
@@ -26388,10 +26392,10 @@
|
|
|
26388
26392
|
ctx.fillRect(left, top, width, height);
|
|
26389
26393
|
}
|
|
26390
26394
|
|
|
26391
|
-
/**
|
|
26392
|
-
* Renders text selection
|
|
26393
|
-
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
26394
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
26395
|
+
/**
|
|
26396
|
+
* Renders text selection
|
|
26397
|
+
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
26398
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
26395
26399
|
*/
|
|
26396
26400
|
renderSelection(ctx, boundaries) {
|
|
26397
26401
|
const selection = {
|
|
@@ -26401,8 +26405,8 @@
|
|
|
26401
26405
|
this._renderSelection(ctx, selection, boundaries);
|
|
26402
26406
|
}
|
|
26403
26407
|
|
|
26404
|
-
/**
|
|
26405
|
-
* Renders drag start text selection
|
|
26408
|
+
/**
|
|
26409
|
+
* Renders drag start text selection
|
|
26406
26410
|
*/
|
|
26407
26411
|
renderDragSourceEffect() {
|
|
26408
26412
|
const dragStartSelection = this.draggableTextDelegate.getDragStartSelection();
|
|
@@ -26413,12 +26417,12 @@
|
|
|
26413
26417
|
this.renderCursorAt(dragSelection);
|
|
26414
26418
|
}
|
|
26415
26419
|
|
|
26416
|
-
/**
|
|
26417
|
-
* Renders text selection
|
|
26418
|
-
* @private
|
|
26419
|
-
* @param {{ selectionStart: number, selectionEnd: number }} selection
|
|
26420
|
-
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
26421
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
26420
|
+
/**
|
|
26421
|
+
* Renders text selection
|
|
26422
|
+
* @private
|
|
26423
|
+
* @param {{ selectionStart: number, selectionEnd: number }} selection
|
|
26424
|
+
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
26425
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
26422
26426
|
*/
|
|
26423
26427
|
_renderSelection(ctx, selection, boundaries) {
|
|
26424
26428
|
const selectionStart = selection.selectionStart,
|
|
@@ -26480,34 +26484,34 @@
|
|
|
26480
26484
|
}
|
|
26481
26485
|
}
|
|
26482
26486
|
|
|
26483
|
-
/**
|
|
26484
|
-
* High level function to know the height of the cursor.
|
|
26485
|
-
* the currentChar is the one that precedes the cursor
|
|
26486
|
-
* Returns fontSize of char at the current cursor
|
|
26487
|
-
* Unused from the library, is for the end user
|
|
26488
|
-
* @return {Number} Character font size
|
|
26487
|
+
/**
|
|
26488
|
+
* High level function to know the height of the cursor.
|
|
26489
|
+
* the currentChar is the one that precedes the cursor
|
|
26490
|
+
* Returns fontSize of char at the current cursor
|
|
26491
|
+
* Unused from the library, is for the end user
|
|
26492
|
+
* @return {Number} Character font size
|
|
26489
26493
|
*/
|
|
26490
26494
|
getCurrentCharFontSize() {
|
|
26491
26495
|
const cp = this._getCurrentCharIndex();
|
|
26492
26496
|
return this.getValueOfPropertyAt(cp.l, cp.c, 'fontSize');
|
|
26493
26497
|
}
|
|
26494
26498
|
|
|
26495
|
-
/**
|
|
26496
|
-
* High level function to know the color of the cursor.
|
|
26497
|
-
* the currentChar is the one that precedes the cursor
|
|
26498
|
-
* Returns color (fill) of char at the current cursor
|
|
26499
|
-
* if the text object has a pattern or gradient for filler, it will return that.
|
|
26500
|
-
* Unused by the library, is for the end user
|
|
26501
|
-
* @return {String | TFiller} Character color (fill)
|
|
26499
|
+
/**
|
|
26500
|
+
* High level function to know the color of the cursor.
|
|
26501
|
+
* the currentChar is the one that precedes the cursor
|
|
26502
|
+
* Returns color (fill) of char at the current cursor
|
|
26503
|
+
* if the text object has a pattern or gradient for filler, it will return that.
|
|
26504
|
+
* Unused by the library, is for the end user
|
|
26505
|
+
* @return {String | TFiller} Character color (fill)
|
|
26502
26506
|
*/
|
|
26503
26507
|
getCurrentCharColor() {
|
|
26504
26508
|
const cp = this._getCurrentCharIndex();
|
|
26505
26509
|
return this.getValueOfPropertyAt(cp.l, cp.c, FILL);
|
|
26506
26510
|
}
|
|
26507
26511
|
|
|
26508
|
-
/**
|
|
26509
|
-
* Returns the cursor position for the getCurrent.. functions
|
|
26510
|
-
* @private
|
|
26512
|
+
/**
|
|
26513
|
+
* Returns the cursor position for the getCurrent.. functions
|
|
26514
|
+
* @private
|
|
26511
26515
|
*/
|
|
26512
26516
|
_getCurrentCharIndex() {
|
|
26513
26517
|
const cursorPosition = this.get2DCursorLocation(this.selectionStart, true),
|
|
@@ -26523,52 +26527,52 @@
|
|
|
26523
26527
|
super.dispose();
|
|
26524
26528
|
}
|
|
26525
26529
|
}
|
|
26526
|
-
/**
|
|
26527
|
-
* Index where text selection starts (or where cursor is when there is no selection)
|
|
26528
|
-
* @type Number
|
|
26530
|
+
/**
|
|
26531
|
+
* Index where text selection starts (or where cursor is when there is no selection)
|
|
26532
|
+
* @type Number
|
|
26529
26533
|
*/
|
|
26530
|
-
/**
|
|
26531
|
-
* Index where text selection ends
|
|
26532
|
-
* @type Number
|
|
26534
|
+
/**
|
|
26535
|
+
* Index where text selection ends
|
|
26536
|
+
* @type Number
|
|
26533
26537
|
*/
|
|
26534
|
-
/**
|
|
26535
|
-
* Color of text selection
|
|
26536
|
-
* @type String
|
|
26538
|
+
/**
|
|
26539
|
+
* Color of text selection
|
|
26540
|
+
* @type String
|
|
26537
26541
|
*/
|
|
26538
|
-
/**
|
|
26539
|
-
* Indicates whether text is in editing mode
|
|
26540
|
-
* @type Boolean
|
|
26542
|
+
/**
|
|
26543
|
+
* Indicates whether text is in editing mode
|
|
26544
|
+
* @type Boolean
|
|
26541
26545
|
*/
|
|
26542
|
-
/**
|
|
26543
|
-
* Indicates whether a text can be edited
|
|
26544
|
-
* @type Boolean
|
|
26546
|
+
/**
|
|
26547
|
+
* Indicates whether a text can be edited
|
|
26548
|
+
* @type Boolean
|
|
26545
26549
|
*/
|
|
26546
|
-
/**
|
|
26547
|
-
* Border color of text object while it's in editing mode
|
|
26548
|
-
* @type String
|
|
26550
|
+
/**
|
|
26551
|
+
* Border color of text object while it's in editing mode
|
|
26552
|
+
* @type String
|
|
26549
26553
|
*/
|
|
26550
|
-
/**
|
|
26551
|
-
* Width of cursor (in px)
|
|
26552
|
-
* @type Number
|
|
26554
|
+
/**
|
|
26555
|
+
* Width of cursor (in px)
|
|
26556
|
+
* @type Number
|
|
26553
26557
|
*/
|
|
26554
|
-
/**
|
|
26555
|
-
* Color of text cursor color in editing mode.
|
|
26556
|
-
* if not set (default) will take color from the text.
|
|
26557
|
-
* if set to a color value that fabric can understand, it will
|
|
26558
|
-
* be used instead of the color of the text at the current position.
|
|
26559
|
-
* @type String
|
|
26558
|
+
/**
|
|
26559
|
+
* Color of text cursor color in editing mode.
|
|
26560
|
+
* if not set (default) will take color from the text.
|
|
26561
|
+
* if set to a color value that fabric can understand, it will
|
|
26562
|
+
* be used instead of the color of the text at the current position.
|
|
26563
|
+
* @type String
|
|
26560
26564
|
*/
|
|
26561
|
-
/**
|
|
26562
|
-
* Delay between cursor blink (in ms)
|
|
26563
|
-
* @type Number
|
|
26565
|
+
/**
|
|
26566
|
+
* Delay between cursor blink (in ms)
|
|
26567
|
+
* @type Number
|
|
26564
26568
|
*/
|
|
26565
|
-
/**
|
|
26566
|
-
* Duration of cursor fade in (in ms)
|
|
26567
|
-
* @type Number
|
|
26569
|
+
/**
|
|
26570
|
+
* Duration of cursor fade in (in ms)
|
|
26571
|
+
* @type Number
|
|
26568
26572
|
*/
|
|
26569
|
-
/**
|
|
26570
|
-
* Indicates whether internal text char widths can be cached
|
|
26571
|
-
* @type Boolean
|
|
26573
|
+
/**
|
|
26574
|
+
* Indicates whether internal text char widths can be cached
|
|
26575
|
+
* @type Boolean
|
|
26572
26576
|
*/
|
|
26573
26577
|
_defineProperty(IText, "ownDefaults", iTextDefaultValues);
|
|
26574
26578
|
_defineProperty(IText, "type", 'IText');
|
|
@@ -26590,11 +26594,11 @@
|
|
|
26590
26594
|
|
|
26591
26595
|
// @TODO this is not complete
|
|
26592
26596
|
|
|
26593
|
-
/**
|
|
26594
|
-
* Textbox class, based on IText, allows the user to resize the text rectangle
|
|
26595
|
-
* and wraps lines automatically. Textboxes have their Y scaling locked, the
|
|
26596
|
-
* user can only change width. Height is adjusted automatically based on the
|
|
26597
|
-
* wrapping of lines.
|
|
26597
|
+
/**
|
|
26598
|
+
* Textbox class, based on IText, allows the user to resize the text rectangle
|
|
26599
|
+
* and wraps lines automatically. Textboxes have their Y scaling locked, the
|
|
26600
|
+
* user can only change width. Height is adjusted automatically based on the
|
|
26601
|
+
* wrapping of lines.
|
|
26598
26602
|
*/
|
|
26599
26603
|
class Textbox extends IText {
|
|
26600
26604
|
static getDefaults() {
|
|
@@ -26604,10 +26608,10 @@
|
|
|
26604
26608
|
};
|
|
26605
26609
|
}
|
|
26606
26610
|
|
|
26607
|
-
/**
|
|
26608
|
-
* Constructor
|
|
26609
|
-
* @param {String} text Text string
|
|
26610
|
-
* @param {Object} [options] Options object
|
|
26611
|
+
/**
|
|
26612
|
+
* Constructor
|
|
26613
|
+
* @param {String} text Text string
|
|
26614
|
+
* @param {Object} [options] Options object
|
|
26611
26615
|
*/
|
|
26612
26616
|
constructor(text, options) {
|
|
26613
26617
|
super(text, {
|
|
@@ -26617,10 +26621,10 @@
|
|
|
26617
26621
|
this.initializeEventListeners();
|
|
26618
26622
|
}
|
|
26619
26623
|
|
|
26620
|
-
/**
|
|
26621
|
-
* Creates the default control object.
|
|
26622
|
-
* If you prefer to have on instance of controls shared among all objects
|
|
26623
|
-
* make this function return an empty object and add controls to the ownDefaults object
|
|
26624
|
+
/**
|
|
26625
|
+
* Creates the default control object.
|
|
26626
|
+
* If you prefer to have on instance of controls shared among all objects
|
|
26627
|
+
* make this function return an empty object and add controls to the ownDefaults object
|
|
26624
26628
|
*/
|
|
26625
26629
|
static createControls() {
|
|
26626
26630
|
return {
|
|
@@ -26628,11 +26632,11 @@
|
|
|
26628
26632
|
};
|
|
26629
26633
|
}
|
|
26630
26634
|
|
|
26631
|
-
/**
|
|
26632
|
-
* Unlike superclass's version of this function, Textbox does not update
|
|
26633
|
-
* its width.
|
|
26634
|
-
* @private
|
|
26635
|
-
* @override
|
|
26635
|
+
/**
|
|
26636
|
+
* Unlike superclass's version of this function, Textbox does not update
|
|
26637
|
+
* its width.
|
|
26638
|
+
* @private
|
|
26639
|
+
* @override
|
|
26636
26640
|
*/
|
|
26637
26641
|
initDimensions() {
|
|
26638
26642
|
if (!this.initialized) {
|
|
@@ -26776,9 +26780,9 @@
|
|
|
26776
26780
|
}
|
|
26777
26781
|
}
|
|
26778
26782
|
|
|
26779
|
-
/**
|
|
26780
|
-
* Schedule justify calculation after font loads (Textbox-specific)
|
|
26781
|
-
* @private
|
|
26783
|
+
/**
|
|
26784
|
+
* Schedule justify calculation after font loads (Textbox-specific)
|
|
26785
|
+
* @private
|
|
26782
26786
|
*/
|
|
26783
26787
|
_scheduleJustifyAfterFontLoad() {
|
|
26784
26788
|
if (typeof document === 'undefined' || !('fonts' in document)) {
|
|
@@ -26805,9 +26809,9 @@
|
|
|
26805
26809
|
});
|
|
26806
26810
|
}
|
|
26807
26811
|
|
|
26808
|
-
/**
|
|
26809
|
-
* Advanced dimensions calculation using new layout engine
|
|
26810
|
-
* @private
|
|
26812
|
+
/**
|
|
26813
|
+
* Advanced dimensions calculation using new layout engine
|
|
26814
|
+
* @private
|
|
26811
26815
|
*/
|
|
26812
26816
|
initDimensionsAdvanced() {
|
|
26813
26817
|
if (!this.initialized) {
|
|
@@ -26862,9 +26866,9 @@
|
|
|
26862
26866
|
this.dirty = true;
|
|
26863
26867
|
}
|
|
26864
26868
|
|
|
26865
|
-
/**
|
|
26866
|
-
* Generate style map from new layout format
|
|
26867
|
-
* @private
|
|
26869
|
+
/**
|
|
26870
|
+
* Generate style map from new layout format
|
|
26871
|
+
* @private
|
|
26868
26872
|
*/
|
|
26869
26873
|
_generateStyleMapFromLayout(layout) {
|
|
26870
26874
|
const map = {};
|
|
@@ -26886,12 +26890,12 @@
|
|
|
26886
26890
|
return map;
|
|
26887
26891
|
}
|
|
26888
26892
|
|
|
26889
|
-
/**
|
|
26890
|
-
* Generate an object that translates the style object so that it is
|
|
26891
|
-
* broken up by visual lines (new lines and automatic wrapping).
|
|
26892
|
-
* The original text styles object is broken up by actual lines (new lines only),
|
|
26893
|
-
* which is only sufficient for Text / IText
|
|
26894
|
-
* @private
|
|
26893
|
+
/**
|
|
26894
|
+
* Generate an object that translates the style object so that it is
|
|
26895
|
+
* broken up by visual lines (new lines and automatic wrapping).
|
|
26896
|
+
* The original text styles object is broken up by actual lines (new lines only),
|
|
26897
|
+
* which is only sufficient for Text / IText
|
|
26898
|
+
* @private
|
|
26895
26899
|
*/
|
|
26896
26900
|
_generateStyleMap(textInfo) {
|
|
26897
26901
|
let realLineCount = 0,
|
|
@@ -26918,10 +26922,10 @@
|
|
|
26918
26922
|
return map;
|
|
26919
26923
|
}
|
|
26920
26924
|
|
|
26921
|
-
/**
|
|
26922
|
-
* Returns true if object has a style property or has it on a specified line
|
|
26923
|
-
* @param {Number} lineIndex
|
|
26924
|
-
* @return {Boolean}
|
|
26925
|
+
/**
|
|
26926
|
+
* Returns true if object has a style property or has it on a specified line
|
|
26927
|
+
* @param {Number} lineIndex
|
|
26928
|
+
* @return {Boolean}
|
|
26925
26929
|
*/
|
|
26926
26930
|
styleHas(property, lineIndex) {
|
|
26927
26931
|
if (this._styleMap && !this.isWrapping) {
|
|
@@ -26933,10 +26937,10 @@
|
|
|
26933
26937
|
return super.styleHas(property, lineIndex);
|
|
26934
26938
|
}
|
|
26935
26939
|
|
|
26936
|
-
/**
|
|
26937
|
-
* Returns true if object has no styling or no styling in a line
|
|
26938
|
-
* @param {Number} lineIndex , lineIndex is on wrapped lines.
|
|
26939
|
-
* @return {Boolean}
|
|
26940
|
+
/**
|
|
26941
|
+
* Returns true if object has no styling or no styling in a line
|
|
26942
|
+
* @param {Number} lineIndex , lineIndex is on wrapped lines.
|
|
26943
|
+
* @return {Boolean}
|
|
26940
26944
|
*/
|
|
26941
26945
|
isEmptyStyles(lineIndex) {
|
|
26942
26946
|
if (!this.styles) {
|
|
@@ -26973,11 +26977,11 @@
|
|
|
26973
26977
|
return true;
|
|
26974
26978
|
}
|
|
26975
26979
|
|
|
26976
|
-
/**
|
|
26977
|
-
* @protected
|
|
26978
|
-
* @param {Number} lineIndex
|
|
26979
|
-
* @param {Number} charIndex
|
|
26980
|
-
* @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
|
|
26980
|
+
/**
|
|
26981
|
+
* @protected
|
|
26982
|
+
* @param {Number} lineIndex
|
|
26983
|
+
* @param {Number} charIndex
|
|
26984
|
+
* @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
|
|
26981
26985
|
*/
|
|
26982
26986
|
_getStyleDeclaration(lineIndex, charIndex) {
|
|
26983
26987
|
if (this._styleMap && !this.isWrapping) {
|
|
@@ -26991,59 +26995,59 @@
|
|
|
26991
26995
|
return super._getStyleDeclaration(lineIndex, charIndex);
|
|
26992
26996
|
}
|
|
26993
26997
|
|
|
26994
|
-
/**
|
|
26995
|
-
* @param {Number} lineIndex
|
|
26996
|
-
* @param {Number} charIndex
|
|
26997
|
-
* @param {Object} style
|
|
26998
|
-
* @private
|
|
26998
|
+
/**
|
|
26999
|
+
* @param {Number} lineIndex
|
|
27000
|
+
* @param {Number} charIndex
|
|
27001
|
+
* @param {Object} style
|
|
27002
|
+
* @private
|
|
26999
27003
|
*/
|
|
27000
27004
|
_setStyleDeclaration(lineIndex, charIndex, style) {
|
|
27001
27005
|
const map = this._styleMap[lineIndex];
|
|
27002
27006
|
super._setStyleDeclaration(map.line, map.offset + charIndex, style);
|
|
27003
27007
|
}
|
|
27004
27008
|
|
|
27005
|
-
/**
|
|
27006
|
-
* @param {Number} lineIndex
|
|
27007
|
-
* @param {Number} charIndex
|
|
27008
|
-
* @private
|
|
27009
|
+
/**
|
|
27010
|
+
* @param {Number} lineIndex
|
|
27011
|
+
* @param {Number} charIndex
|
|
27012
|
+
* @private
|
|
27009
27013
|
*/
|
|
27010
27014
|
_deleteStyleDeclaration(lineIndex, charIndex) {
|
|
27011
27015
|
const map = this._styleMap[lineIndex];
|
|
27012
27016
|
super._deleteStyleDeclaration(map.line, map.offset + charIndex);
|
|
27013
27017
|
}
|
|
27014
27018
|
|
|
27015
|
-
/**
|
|
27016
|
-
* probably broken need a fix
|
|
27017
|
-
* Returns the real style line that correspond to the wrapped lineIndex line
|
|
27018
|
-
* Used just to verify if the line does exist or not.
|
|
27019
|
-
* @param {Number} lineIndex
|
|
27020
|
-
* @returns {Boolean} if the line exists or not
|
|
27021
|
-
* @private
|
|
27019
|
+
/**
|
|
27020
|
+
* probably broken need a fix
|
|
27021
|
+
* Returns the real style line that correspond to the wrapped lineIndex line
|
|
27022
|
+
* Used just to verify if the line does exist or not.
|
|
27023
|
+
* @param {Number} lineIndex
|
|
27024
|
+
* @returns {Boolean} if the line exists or not
|
|
27025
|
+
* @private
|
|
27022
27026
|
*/
|
|
27023
27027
|
_getLineStyle(lineIndex) {
|
|
27024
27028
|
const map = this._styleMap[lineIndex];
|
|
27025
27029
|
return !!this.styles[map.line];
|
|
27026
27030
|
}
|
|
27027
27031
|
|
|
27028
|
-
/**
|
|
27029
|
-
* Set the line style to an empty object so that is initialized
|
|
27030
|
-
* @param {Number} lineIndex
|
|
27031
|
-
* @param {Object} style
|
|
27032
|
-
* @private
|
|
27032
|
+
/**
|
|
27033
|
+
* Set the line style to an empty object so that is initialized
|
|
27034
|
+
* @param {Number} lineIndex
|
|
27035
|
+
* @param {Object} style
|
|
27036
|
+
* @private
|
|
27033
27037
|
*/
|
|
27034
27038
|
_setLineStyle(lineIndex) {
|
|
27035
27039
|
const map = this._styleMap[lineIndex];
|
|
27036
27040
|
super._setLineStyle(map.line);
|
|
27037
27041
|
}
|
|
27038
27042
|
|
|
27039
|
-
/**
|
|
27040
|
-
* Wraps text using the 'width' property of Textbox. First this function
|
|
27041
|
-
* splits text on newlines, so we preserve newlines entered by the user.
|
|
27042
|
-
* Then it wraps each line using the width of the Textbox by calling
|
|
27043
|
-
* _wrapLine().
|
|
27044
|
-
* @param {Array} lines The string array of text that is split into lines
|
|
27045
|
-
* @param {Number} desiredWidth width you want to wrap to
|
|
27046
|
-
* @returns {Array} Array of lines
|
|
27043
|
+
/**
|
|
27044
|
+
* Wraps text using the 'width' property of Textbox. First this function
|
|
27045
|
+
* splits text on newlines, so we preserve newlines entered by the user.
|
|
27046
|
+
* Then it wraps each line using the width of the Textbox by calling
|
|
27047
|
+
* _wrapLine().
|
|
27048
|
+
* @param {Array} lines The string array of text that is split into lines
|
|
27049
|
+
* @param {Number} desiredWidth width you want to wrap to
|
|
27050
|
+
* @returns {Array} Array of lines
|
|
27047
27051
|
*/
|
|
27048
27052
|
_wrapText(lines, desiredWidth) {
|
|
27049
27053
|
this.isWrapping = true;
|
|
@@ -27057,12 +27061,12 @@
|
|
|
27057
27061
|
return wrapped;
|
|
27058
27062
|
}
|
|
27059
27063
|
|
|
27060
|
-
/**
|
|
27061
|
-
* For each line of text terminated by an hard line stop,
|
|
27062
|
-
* measure each word width and extract the largest word from all.
|
|
27063
|
-
* The returned words here are the one that at the end will be rendered.
|
|
27064
|
-
* @param {string[]} lines the lines we need to measure
|
|
27065
|
-
*
|
|
27064
|
+
/**
|
|
27065
|
+
* For each line of text terminated by an hard line stop,
|
|
27066
|
+
* measure each word width and extract the largest word from all.
|
|
27067
|
+
* The returned words here are the one that at the end will be rendered.
|
|
27068
|
+
* @param {string[]} lines the lines we need to measure
|
|
27069
|
+
*
|
|
27066
27070
|
*/
|
|
27067
27071
|
getGraphemeDataForRender(lines) {
|
|
27068
27072
|
const splitByGrapheme = this.splitByGrapheme,
|
|
@@ -27095,17 +27099,17 @@
|
|
|
27095
27099
|
};
|
|
27096
27100
|
}
|
|
27097
27101
|
|
|
27098
|
-
/**
|
|
27099
|
-
* Helper function to measure a string of text, given its lineIndex and charIndex offset
|
|
27100
|
-
* It gets called when charBounds are not available yet.
|
|
27101
|
-
* Override if necessary
|
|
27102
|
-
* Use with {@link Textbox#wordSplit}
|
|
27103
|
-
*
|
|
27104
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
27105
|
-
* @param {String} text
|
|
27106
|
-
* @param {number} lineIndex
|
|
27107
|
-
* @param {number} charOffset
|
|
27108
|
-
* @returns {number}
|
|
27102
|
+
/**
|
|
27103
|
+
* Helper function to measure a string of text, given its lineIndex and charIndex offset
|
|
27104
|
+
* It gets called when charBounds are not available yet.
|
|
27105
|
+
* Override if necessary
|
|
27106
|
+
* Use with {@link Textbox#wordSplit}
|
|
27107
|
+
*
|
|
27108
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
27109
|
+
* @param {String} text
|
|
27110
|
+
* @param {number} lineIndex
|
|
27111
|
+
* @param {number} charOffset
|
|
27112
|
+
* @returns {number}
|
|
27109
27113
|
*/
|
|
27110
27114
|
_measureWord(word, lineIndex) {
|
|
27111
27115
|
let charOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -27120,26 +27124,26 @@
|
|
|
27120
27124
|
return width;
|
|
27121
27125
|
}
|
|
27122
27126
|
|
|
27123
|
-
/**
|
|
27124
|
-
* Override this method to customize word splitting
|
|
27125
|
-
* Use with {@link Textbox#_measureWord}
|
|
27126
|
-
* @param {string} value
|
|
27127
|
-
* @returns {string[]} array of words
|
|
27127
|
+
/**
|
|
27128
|
+
* Override this method to customize word splitting
|
|
27129
|
+
* Use with {@link Textbox#_measureWord}
|
|
27130
|
+
* @param {string} value
|
|
27131
|
+
* @returns {string[]} array of words
|
|
27128
27132
|
*/
|
|
27129
27133
|
wordSplit(value) {
|
|
27130
27134
|
return value.split(this._wordJoiners);
|
|
27131
27135
|
}
|
|
27132
27136
|
|
|
27133
|
-
/**
|
|
27134
|
-
* Wraps a line of text using the width of the Textbox as desiredWidth
|
|
27135
|
-
* and leveraging the known width o words from GraphemeData
|
|
27136
|
-
* @private
|
|
27137
|
-
* @param {Number} lineIndex
|
|
27138
|
-
* @param {Number} desiredWidth width you want to wrap the line to
|
|
27139
|
-
* @param {GraphemeData} graphemeData an object containing all the lines' words width.
|
|
27140
|
-
* @param {Number} reservedSpace space to remove from wrapping for custom functionalities
|
|
27141
|
-
* @returns {Array} Array of line(s) into which the given text is wrapped
|
|
27142
|
-
* to.
|
|
27137
|
+
/**
|
|
27138
|
+
* Wraps a line of text using the width of the Textbox as desiredWidth
|
|
27139
|
+
* and leveraging the known width o words from GraphemeData
|
|
27140
|
+
* @private
|
|
27141
|
+
* @param {Number} lineIndex
|
|
27142
|
+
* @param {Number} desiredWidth width you want to wrap the line to
|
|
27143
|
+
* @param {GraphemeData} graphemeData an object containing all the lines' words width.
|
|
27144
|
+
* @param {Number} reservedSpace space to remove from wrapping for custom functionalities
|
|
27145
|
+
* @returns {Array} Array of line(s) into which the given text is wrapped
|
|
27146
|
+
* to.
|
|
27143
27147
|
*/
|
|
27144
27148
|
_wrapLine(lineIndex, desiredWidth, _ref) {
|
|
27145
27149
|
let {
|
|
@@ -27221,11 +27225,11 @@
|
|
|
27221
27225
|
return graphemeLines;
|
|
27222
27226
|
}
|
|
27223
27227
|
|
|
27224
|
-
/**
|
|
27225
|
-
* Detect if the text line is ended with an hard break
|
|
27226
|
-
* text and itext do not have wrapping, return false
|
|
27227
|
-
* @param {Number} lineIndex text to split
|
|
27228
|
-
* @return {Boolean}
|
|
27228
|
+
/**
|
|
27229
|
+
* Detect if the text line is ended with an hard break
|
|
27230
|
+
* text and itext do not have wrapping, return false
|
|
27231
|
+
* @param {Number} lineIndex text to split
|
|
27232
|
+
* @return {Boolean}
|
|
27229
27233
|
*/
|
|
27230
27234
|
isEndOfWrapping(lineIndex) {
|
|
27231
27235
|
if (!this._styleMap[lineIndex + 1]) {
|
|
@@ -27239,12 +27243,12 @@
|
|
|
27239
27243
|
return false;
|
|
27240
27244
|
}
|
|
27241
27245
|
|
|
27242
|
-
/**
|
|
27243
|
-
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
27244
|
-
* and counting style.
|
|
27245
|
-
* This is important only for splitByGrapheme at the end of wrapping.
|
|
27246
|
-
* If we are not wrapping the offset is always 1
|
|
27247
|
-
* @return Number
|
|
27246
|
+
/**
|
|
27247
|
+
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
27248
|
+
* and counting style.
|
|
27249
|
+
* This is important only for splitByGrapheme at the end of wrapping.
|
|
27250
|
+
* If we are not wrapping the offset is always 1
|
|
27251
|
+
* @return Number
|
|
27248
27252
|
*/
|
|
27249
27253
|
missingNewlineOffset(lineIndex, skipWrapping) {
|
|
27250
27254
|
if (this.splitByGrapheme && !skipWrapping) {
|
|
@@ -27253,12 +27257,12 @@
|
|
|
27253
27257
|
return 1;
|
|
27254
27258
|
}
|
|
27255
27259
|
|
|
27256
|
-
/**
|
|
27257
|
-
* Gets lines of text to render in the Textbox. This function calculates
|
|
27258
|
-
* text wrapping on the fly every time it is called.
|
|
27259
|
-
* @param {String} text text to split
|
|
27260
|
-
* @returns {Array} Array of lines in the Textbox.
|
|
27261
|
-
* @override
|
|
27260
|
+
/**
|
|
27261
|
+
* Gets lines of text to render in the Textbox. This function calculates
|
|
27262
|
+
* text wrapping on the fly every time it is called.
|
|
27263
|
+
* @param {String} text text to split
|
|
27264
|
+
* @returns {Array} Array of lines in the Textbox.
|
|
27265
|
+
* @override
|
|
27262
27266
|
*/
|
|
27263
27267
|
_splitTextIntoLines(text) {
|
|
27264
27268
|
// Check if we need browser wrapping using smart font detection
|
|
@@ -27305,9 +27309,9 @@
|
|
|
27305
27309
|
return newText;
|
|
27306
27310
|
}
|
|
27307
27311
|
|
|
27308
|
-
/**
|
|
27309
|
-
* Use browser's native text wrapping for accurate handling of fonts without English glyphs
|
|
27310
|
-
* @private
|
|
27312
|
+
/**
|
|
27313
|
+
* Use browser's native text wrapping for accurate handling of fonts without English glyphs
|
|
27314
|
+
* @private
|
|
27311
27315
|
*/
|
|
27312
27316
|
_splitTextIntoLinesWithBrowser(text) {
|
|
27313
27317
|
if (typeof document === 'undefined') {
|
|
@@ -27433,9 +27437,9 @@
|
|
|
27433
27437
|
};
|
|
27434
27438
|
}
|
|
27435
27439
|
|
|
27436
|
-
/**
|
|
27437
|
-
* Extract justify space measurements from browser
|
|
27438
|
-
* @private
|
|
27440
|
+
/**
|
|
27441
|
+
* Extract justify space measurements from browser
|
|
27442
|
+
* @private
|
|
27439
27443
|
*/
|
|
27440
27444
|
_extractJustifySpaceMeasurements(element, lines) {
|
|
27441
27445
|
console.log(`🔤 Extracting browser justify space measurements for ${lines.length} lines`);
|
|
@@ -27471,9 +27475,9 @@
|
|
|
27471
27475
|
return spaceWidths;
|
|
27472
27476
|
}
|
|
27473
27477
|
|
|
27474
|
-
/**
|
|
27475
|
-
* Apply browser-calculated justify space measurements
|
|
27476
|
-
* @private
|
|
27478
|
+
/**
|
|
27479
|
+
* Apply browser-calculated justify space measurements
|
|
27480
|
+
* @private
|
|
27477
27481
|
*/
|
|
27478
27482
|
_applyBrowserJustifySpaces() {
|
|
27479
27483
|
if (!this._textLines || !this.__charBounds) {
|
|
@@ -27510,9 +27514,9 @@
|
|
|
27510
27514
|
});
|
|
27511
27515
|
}
|
|
27512
27516
|
|
|
27513
|
-
/**
|
|
27514
|
-
* Fallback to default Fabric wrapping
|
|
27515
|
-
* @private
|
|
27517
|
+
/**
|
|
27518
|
+
* Fallback to default Fabric wrapping
|
|
27519
|
+
* @private
|
|
27516
27520
|
*/
|
|
27517
27521
|
_splitTextIntoLinesDefault(text) {
|
|
27518
27522
|
const newText = super._splitTextIntoLines(text),
|
|
@@ -27544,9 +27548,9 @@
|
|
|
27544
27548
|
}
|
|
27545
27549
|
}
|
|
27546
27550
|
|
|
27547
|
-
/**
|
|
27548
|
-
* Initialize event listeners for safety snap functionality
|
|
27549
|
-
* @private
|
|
27551
|
+
/**
|
|
27552
|
+
* Initialize event listeners for safety snap functionality
|
|
27553
|
+
* @private
|
|
27550
27554
|
*/
|
|
27551
27555
|
initializeEventListeners() {
|
|
27552
27556
|
var _this$canvas4;
|
|
@@ -27589,12 +27593,12 @@
|
|
|
27589
27593
|
});
|
|
27590
27594
|
}
|
|
27591
27595
|
|
|
27592
|
-
/**
|
|
27593
|
-
* Safety snap to prevent glyph clipping after manual resize.
|
|
27594
|
-
* Similar to Polotno - checks if any glyphs are too close to edges
|
|
27595
|
-
* and automatically expands width if needed.
|
|
27596
|
-
* @private
|
|
27597
|
-
* @param resizeOrigin - Which side was used for resizing ('left' or 'right')
|
|
27596
|
+
/**
|
|
27597
|
+
* Safety snap to prevent glyph clipping after manual resize.
|
|
27598
|
+
* Similar to Polotno - checks if any glyphs are too close to edges
|
|
27599
|
+
* and automatically expands width if needed.
|
|
27600
|
+
* @private
|
|
27601
|
+
* @param resizeOrigin - Which side was used for resizing ('left' or 'right')
|
|
27598
27602
|
*/
|
|
27599
27603
|
safetySnapWidth(resizeOrigin) {
|
|
27600
27604
|
// For Textbox objects, we always want to check for clipping regardless of isWrapping flag
|
|
@@ -27661,9 +27665,9 @@
|
|
|
27661
27665
|
}
|
|
27662
27666
|
}
|
|
27663
27667
|
|
|
27664
|
-
/**
|
|
27665
|
-
* Fix character selection mismatch after JSON loading for browser-wrapped fonts
|
|
27666
|
-
* @private
|
|
27668
|
+
/**
|
|
27669
|
+
* Fix character selection mismatch after JSON loading for browser-wrapped fonts
|
|
27670
|
+
* @private
|
|
27667
27671
|
*/
|
|
27668
27672
|
_fixCharacterMappingAfterJsonLoad() {
|
|
27669
27673
|
if (this._usingBrowserWrapping) {
|
|
@@ -27683,9 +27687,9 @@
|
|
|
27683
27687
|
}
|
|
27684
27688
|
}
|
|
27685
27689
|
|
|
27686
|
-
/**
|
|
27687
|
-
* Force complete textbox re-initialization (useful after JSON loading)
|
|
27688
|
-
* Overrides Text version with Textbox-specific logic
|
|
27690
|
+
/**
|
|
27691
|
+
* Force complete textbox re-initialization (useful after JSON loading)
|
|
27692
|
+
* Overrides Text version with Textbox-specific logic
|
|
27689
27693
|
*/
|
|
27690
27694
|
forceTextReinitialization() {
|
|
27691
27695
|
console.log('🔄 Force reinitializing Textbox object');
|
|
@@ -27742,31 +27746,31 @@
|
|
|
27742
27746
|
}
|
|
27743
27747
|
}
|
|
27744
27748
|
|
|
27745
|
-
/**
|
|
27746
|
-
* Returns object representation of an instance
|
|
27747
|
-
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
27748
|
-
* @return {Object} object representation of an instance
|
|
27749
|
+
/**
|
|
27750
|
+
* Returns object representation of an instance
|
|
27751
|
+
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
27752
|
+
* @return {Object} object representation of an instance
|
|
27749
27753
|
*/
|
|
27750
27754
|
toObject() {
|
|
27751
27755
|
let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
27752
27756
|
return super.toObject(['minWidth', 'splitByGrapheme', ...propertiesToInclude]);
|
|
27753
27757
|
}
|
|
27754
27758
|
}
|
|
27755
|
-
/**
|
|
27756
|
-
* Minimum width of textbox, in pixels.
|
|
27757
|
-
* @type Number
|
|
27758
|
-
*/
|
|
27759
|
-
/**
|
|
27760
|
-
* Minimum calculated width of a textbox, in pixels.
|
|
27761
|
-
* fixed to 2 so that an empty textbox cannot go to 0
|
|
27762
|
-
* and is still selectable without text.
|
|
27763
|
-
* @type Number
|
|
27764
|
-
*/
|
|
27765
|
-
/**
|
|
27766
|
-
* Use this boolean property in order to split strings that have no white space concept.
|
|
27767
|
-
* this is a cheap way to help with chinese/japanese
|
|
27768
|
-
* @type Boolean
|
|
27769
|
-
* @since 2.6.0
|
|
27759
|
+
/**
|
|
27760
|
+
* Minimum width of textbox, in pixels.
|
|
27761
|
+
* @type Number
|
|
27762
|
+
*/
|
|
27763
|
+
/**
|
|
27764
|
+
* Minimum calculated width of a textbox, in pixels.
|
|
27765
|
+
* fixed to 2 so that an empty textbox cannot go to 0
|
|
27766
|
+
* and is still selectable without text.
|
|
27767
|
+
* @type Number
|
|
27768
|
+
*/
|
|
27769
|
+
/**
|
|
27770
|
+
* Use this boolean property in order to split strings that have no white space concept.
|
|
27771
|
+
* this is a cheap way to help with chinese/japanese
|
|
27772
|
+
* @type Boolean
|
|
27773
|
+
* @since 2.6.0
|
|
27770
27774
|
*/
|
|
27771
27775
|
_defineProperty(Textbox, "type", 'Textbox');
|
|
27772
27776
|
_defineProperty(Textbox, "textLayoutProperties", [...IText.textLayoutProperties, 'width']);
|