@nasser-sw/fabric 7.0.1-beta1 → 7.0.1-beta2
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/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/CHANGELOG.md +0 -0
- package/debug/konva/LICENSE +0 -0
- package/debug/konva/README.md +0 -0
- package/debug/konva/gulpfile.mjs +0 -0
- package/debug/konva/package.json +0 -0
- package/debug/konva/release.sh +0 -0
- package/debug/konva/resources/doc-includes/ContainerParams.txt +0 -0
- package/debug/konva/resources/doc-includes/NodeParams.txt +0 -0
- package/debug/konva/resources/doc-includes/ShapeParams.txt +0 -0
- package/debug/konva/resources/jsdoc.conf.json +0 -0
- package/debug/konva/rollup.config.mjs +0 -0
- package/debug/konva/src/Animation.ts +0 -0
- package/debug/konva/src/BezierFunctions.ts +0 -0
- package/debug/konva/src/Canvas.ts +0 -0
- package/debug/konva/src/Container.ts +0 -0
- package/debug/konva/src/Context.ts +0 -0
- package/debug/konva/src/Core.ts +0 -0
- package/debug/konva/src/DragAndDrop.ts +0 -0
- package/debug/konva/src/Factory.ts +0 -0
- package/debug/konva/src/FastLayer.ts +0 -0
- package/debug/konva/src/Global.ts +0 -0
- package/debug/konva/src/Group.ts +0 -0
- package/debug/konva/src/Layer.ts +0 -0
- package/debug/konva/src/Node.ts +0 -0
- package/debug/konva/src/PointerEvents.ts +0 -0
- package/debug/konva/src/Shape.ts +0 -0
- package/debug/konva/src/Stage.ts +0 -0
- package/debug/konva/src/Tween.ts +0 -0
- package/debug/konva/src/Util.ts +0 -0
- package/debug/konva/src/Validators.ts +0 -0
- package/debug/konva/src/_CoreInternals.ts +0 -0
- package/debug/konva/src/_FullInternals.ts +0 -0
- package/debug/konva/src/canvas-backend.ts +0 -0
- package/debug/konva/src/filters/Blur.ts +0 -0
- package/debug/konva/src/filters/Brighten.ts +0 -0
- package/debug/konva/src/filters/Brightness.ts +0 -0
- package/debug/konva/src/filters/Contrast.ts +0 -0
- package/debug/konva/src/filters/Emboss.ts +0 -0
- package/debug/konva/src/filters/Enhance.ts +0 -0
- package/debug/konva/src/filters/Grayscale.ts +0 -0
- package/debug/konva/src/filters/HSL.ts +0 -0
- package/debug/konva/src/filters/HSV.ts +0 -0
- package/debug/konva/src/filters/Invert.ts +0 -0
- package/debug/konva/src/filters/Kaleidoscope.ts +0 -0
- package/debug/konva/src/filters/Mask.ts +0 -0
- package/debug/konva/src/filters/Noise.ts +0 -0
- package/debug/konva/src/filters/Pixelate.ts +0 -0
- package/debug/konva/src/filters/Posterize.ts +0 -0
- package/debug/konva/src/filters/RGB.ts +0 -0
- package/debug/konva/src/filters/RGBA.ts +0 -0
- package/debug/konva/src/filters/Sepia.ts +0 -0
- package/debug/konva/src/filters/Solarize.ts +0 -0
- package/debug/konva/src/filters/Threshold.ts +0 -0
- package/debug/konva/src/index.ts +0 -0
- package/debug/konva/src/shapes/Arc.ts +0 -0
- package/debug/konva/src/shapes/Arrow.ts +0 -0
- package/debug/konva/src/shapes/Circle.ts +0 -0
- package/debug/konva/src/shapes/Ellipse.ts +0 -0
- package/debug/konva/src/shapes/Image.ts +0 -0
- package/debug/konva/src/shapes/Label.ts +0 -0
- package/debug/konva/src/shapes/Line.ts +0 -0
- package/debug/konva/src/shapes/Path.ts +0 -0
- package/debug/konva/src/shapes/Rect.ts +0 -0
- package/debug/konva/src/shapes/RegularPolygon.ts +0 -0
- package/debug/konva/src/shapes/Ring.ts +0 -0
- package/debug/konva/src/shapes/Sprite.ts +0 -0
- package/debug/konva/src/shapes/Star.ts +0 -0
- package/debug/konva/src/shapes/Text.ts +0 -0
- package/debug/konva/src/shapes/TextPath.ts +0 -0
- package/debug/konva/src/shapes/Transformer.ts +0 -0
- package/debug/konva/src/shapes/Wedge.ts +0 -0
- package/debug/konva/src/skia-backend.ts +0 -0
- package/debug/konva/src/types.ts +0 -0
- package/debug/konva/tsconfig.json +0 -0
- package/debug/konva/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 +1180 -1044
- 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 +1180 -1044
- package/dist/index.mjs.map +1 -1
- package/dist/index.node.cjs +1180 -1044
- 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 +1180 -1044
- 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/changeHeight.min.mjs +2 -0
- package/dist/src/controls/changeHeight.min.mjs.map +1 -0
- package/dist/src/controls/changeHeight.mjs +36 -0
- package/dist/src/controls/changeHeight.mjs.map +1 -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 +0 -0
- package/dist/src/shapes/IText/ITextKeyBehavior.mjs +0 -0
- package/dist/src/shapes/IText/ITextKeyBehavior.mjs.map +0 -0
- 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 +347 -295
- 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 +0 -0
- package/dist/src/shapes/Text/constants.d.ts.map +0 -0
- package/dist/src/shapes/Text/constants.min.mjs +0 -0
- package/dist/src/shapes/Text/constants.min.mjs.map +1 -1
- package/dist/src/shapes/Text/constants.mjs +0 -0
- 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 +1 -1
- package/dist/src/shapes/Textbox.min.mjs +1 -1
- package/dist/src/shapes/Textbox.min.mjs.map +1 -1
- package/dist/src/shapes/Textbox.mjs +149 -199
- 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/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 +20 -20
- 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 +1 -1
- package/dist/src/text/overlayEditor.min.mjs +1 -1
- package/dist/src/text/overlayEditor.min.mjs.map +1 -1
- package/dist/src/text/overlayEditor.mjs +176 -42
- package/dist/src/text/overlayEditor.mjs.map +1 -1
- 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/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/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 +0 -0
- package/dist-extensions/src/shapes/Text/constants.d.ts.map +0 -0
- package/dist-extensions/src/shapes/Textbox.d.ts +0 -0
- package/dist-extensions/src/shapes/Textbox.d.ts.map +1 -1
- 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 +1 -1
- 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/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/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 +591 -0
- package/fabric.ts +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 +1 -1
- 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/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 +1176 -1176
- package/src/shapes/IText/ITextClickBehavior.ts +254 -254
- package/src/shapes/IText/ITextKeyBehavior.test.ts +0 -0
- package/src/shapes/IText/ITextKeyBehavior.ts +0 -0
- 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 +2226 -2161
- 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 +134 -134
- package/src/shapes/Textbox.spec.ts +0 -0
- package/src/shapes/Textbox.ts +788 -788
- 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 +475 -475
- package/src/text/overlayEditor.ts +1035 -895
- 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/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/docs/fabric-konva-gap-analysis.md +0 -274
- package/docs/konva-text-behavior-spec.md +0 -265
- package/docs/text-engine-design.md +0 -698
package/dist/index.node.cjs
CHANGED
|
@@ -412,7 +412,7 @@ class Cache {
|
|
|
412
412
|
}
|
|
413
413
|
const cache = new Cache();
|
|
414
414
|
|
|
415
|
-
var version = "7.0.
|
|
415
|
+
var version = "7.0.1-beta1";
|
|
416
416
|
|
|
417
417
|
// use this syntax so babel plugin see this import here
|
|
418
418
|
const VERSION = version;
|
|
@@ -18731,8 +18731,8 @@ _defineProperty(StyledText, "_styleProperties", styleProperties);
|
|
|
18731
18731
|
// Global measurement context - reused for performance
|
|
18732
18732
|
let measurementContext = null;
|
|
18733
18733
|
|
|
18734
|
-
/**
|
|
18735
|
-
* Get or create the shared measurement context
|
|
18734
|
+
/**
|
|
18735
|
+
* Get or create the shared measurement context
|
|
18736
18736
|
*/
|
|
18737
18737
|
function getMeasurementContext() {
|
|
18738
18738
|
if (!measurementContext) {
|
|
@@ -18745,8 +18745,8 @@ function getMeasurementContext() {
|
|
|
18745
18745
|
return measurementContext;
|
|
18746
18746
|
}
|
|
18747
18747
|
|
|
18748
|
-
/**
|
|
18749
|
-
* Measure a single grapheme
|
|
18748
|
+
/**
|
|
18749
|
+
* Measure a single grapheme
|
|
18750
18750
|
*/
|
|
18751
18751
|
function measureGrapheme(grapheme, options, ctx) {
|
|
18752
18752
|
// Check cache first
|
|
@@ -18779,8 +18779,8 @@ function measureGrapheme(grapheme, options, ctx) {
|
|
|
18779
18779
|
return measurement;
|
|
18780
18780
|
}
|
|
18781
18781
|
|
|
18782
|
-
/**
|
|
18783
|
-
* Measure a grapheme with kerning relative to previous character
|
|
18782
|
+
/**
|
|
18783
|
+
* Measure a grapheme with kerning relative to previous character
|
|
18784
18784
|
*/
|
|
18785
18785
|
function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
|
|
18786
18786
|
// Get individual measurement
|
|
@@ -18821,8 +18821,8 @@ function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
|
|
|
18821
18821
|
};
|
|
18822
18822
|
}
|
|
18823
18823
|
|
|
18824
|
-
/**
|
|
18825
|
-
* Get font metrics for layout calculations
|
|
18824
|
+
/**
|
|
18825
|
+
* Get font metrics for layout calculations
|
|
18826
18826
|
*/
|
|
18827
18827
|
function getFontMetrics(options) {
|
|
18828
18828
|
var _metrics$fontBounding, _metrics$fontBounding2, _metrics$actualBoundi, _metrics$actualBoundi2;
|
|
@@ -18857,8 +18857,8 @@ function getFontMetrics(options) {
|
|
|
18857
18857
|
return result;
|
|
18858
18858
|
}
|
|
18859
18859
|
|
|
18860
|
-
/**
|
|
18861
|
-
* Apply font styling to canvas context
|
|
18860
|
+
/**
|
|
18861
|
+
* Apply font styling to canvas context
|
|
18862
18862
|
*/
|
|
18863
18863
|
function applyFontStyle(ctx, options) {
|
|
18864
18864
|
const fontDeclaration = getFontDeclaration(options);
|
|
@@ -18875,8 +18875,8 @@ function applyFontStyle(ctx, options) {
|
|
|
18875
18875
|
ctx.textBaseline = 'alphabetic';
|
|
18876
18876
|
}
|
|
18877
18877
|
|
|
18878
|
-
/**
|
|
18879
|
-
* Generate font declaration string
|
|
18878
|
+
/**
|
|
18879
|
+
* Generate font declaration string
|
|
18880
18880
|
*/
|
|
18881
18881
|
function getFontDeclaration(options) {
|
|
18882
18882
|
const {
|
|
@@ -18891,8 +18891,8 @@ function getFontDeclaration(options) {
|
|
|
18891
18891
|
return `${fontStyle} ${fontWeight} ${fontSize}px ${normalizedFamily}`;
|
|
18892
18892
|
}
|
|
18893
18893
|
|
|
18894
|
-
/**
|
|
18895
|
-
* LRU Cache implementation for measurements
|
|
18894
|
+
/**
|
|
18895
|
+
* LRU Cache implementation for measurements
|
|
18896
18896
|
*/
|
|
18897
18897
|
class LRUCache {
|
|
18898
18898
|
constructor() {
|
|
@@ -18954,8 +18954,8 @@ class LRUCache {
|
|
|
18954
18954
|
}
|
|
18955
18955
|
}
|
|
18956
18956
|
|
|
18957
|
-
/**
|
|
18958
|
-
* Advanced measurement cache with font-aware keys
|
|
18957
|
+
/**
|
|
18958
|
+
* Advanced measurement cache with font-aware keys
|
|
18959
18959
|
*/
|
|
18960
18960
|
class MeasurementCache {
|
|
18961
18961
|
constructor() {
|
|
@@ -18982,8 +18982,8 @@ class MeasurementCache {
|
|
|
18982
18982
|
}
|
|
18983
18983
|
}
|
|
18984
18984
|
|
|
18985
|
-
/**
|
|
18986
|
-
* Kerning cache for character pairs
|
|
18985
|
+
/**
|
|
18986
|
+
* Kerning cache for character pairs
|
|
18987
18987
|
*/
|
|
18988
18988
|
class KerningCache {
|
|
18989
18989
|
constructor() {
|
|
@@ -19011,8 +19011,8 @@ class KerningCache {
|
|
|
19011
19011
|
}
|
|
19012
19012
|
}
|
|
19013
19013
|
|
|
19014
|
-
/**
|
|
19015
|
-
* Font metrics cache
|
|
19014
|
+
/**
|
|
19015
|
+
* Font metrics cache
|
|
19016
19016
|
*/
|
|
19017
19017
|
class FontMetricsCache {
|
|
19018
19018
|
constructor() {
|
|
@@ -19039,17 +19039,17 @@ const measurementCache = new MeasurementCache();
|
|
|
19039
19039
|
const kerningCache = new KerningCache();
|
|
19040
19040
|
const fontMetricsCache = new FontMetricsCache();
|
|
19041
19041
|
|
|
19042
|
-
/**
|
|
19043
|
-
* Unicode and Internationalization Support
|
|
19044
|
-
*
|
|
19045
|
-
* Enhanced Unicode handling for complex scripts, RTL/LTR text,
|
|
19046
|
-
* and grapheme cluster boundary detection.
|
|
19042
|
+
/**
|
|
19043
|
+
* Unicode and Internationalization Support
|
|
19044
|
+
*
|
|
19045
|
+
* Enhanced Unicode handling for complex scripts, RTL/LTR text,
|
|
19046
|
+
* and grapheme cluster boundary detection.
|
|
19047
19047
|
*/
|
|
19048
19048
|
|
|
19049
19049
|
|
|
19050
|
-
/**
|
|
19051
|
-
* Enhanced grapheme segmentation using Intl.Segmenter when available
|
|
19052
|
-
* with fallback to existing graphemeSplit implementation
|
|
19050
|
+
/**
|
|
19051
|
+
* Enhanced grapheme segmentation using Intl.Segmenter when available
|
|
19052
|
+
* with fallback to existing graphemeSplit implementation
|
|
19053
19053
|
*/
|
|
19054
19054
|
function segmentGraphemes(text) {
|
|
19055
19055
|
// Use native Intl.Segmenter if available
|
|
@@ -19069,15 +19069,15 @@ function segmentGraphemes(text) {
|
|
|
19069
19069
|
return graphemeSplit(text);
|
|
19070
19070
|
}
|
|
19071
19071
|
|
|
19072
|
-
/**
|
|
19073
|
-
* Ellipsis Text Truncation System
|
|
19074
|
-
*
|
|
19075
|
-
* Implements text truncation with ellipsis when content exceeds bounds,
|
|
19076
|
-
* using binary search for optimal truncation points.
|
|
19072
|
+
/**
|
|
19073
|
+
* Ellipsis Text Truncation System
|
|
19074
|
+
*
|
|
19075
|
+
* Implements text truncation with ellipsis when content exceeds bounds,
|
|
19076
|
+
* using binary search for optimal truncation points.
|
|
19077
19077
|
*/
|
|
19078
19078
|
|
|
19079
|
-
/**
|
|
19080
|
-
* Apply ellipsis truncation to text based on width/height constraints
|
|
19079
|
+
/**
|
|
19080
|
+
* Apply ellipsis truncation to text based on width/height constraints
|
|
19081
19081
|
*/
|
|
19082
19082
|
function applyEllipsis(text, options) {
|
|
19083
19083
|
const {
|
|
@@ -19147,8 +19147,8 @@ function applyEllipsis(text, options) {
|
|
|
19147
19147
|
};
|
|
19148
19148
|
}
|
|
19149
19149
|
|
|
19150
|
-
/**
|
|
19151
|
-
* Truncate text based on width constraint using binary search
|
|
19150
|
+
/**
|
|
19151
|
+
* Truncate text based on width constraint using binary search
|
|
19152
19152
|
*/
|
|
19153
19153
|
function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn) {
|
|
19154
19154
|
const graphemes = segmentGraphemes(text);
|
|
@@ -19198,8 +19198,8 @@ function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn)
|
|
|
19198
19198
|
};
|
|
19199
19199
|
}
|
|
19200
19200
|
|
|
19201
|
-
/**
|
|
19202
|
-
* Truncate text based on height constraint
|
|
19201
|
+
/**
|
|
19202
|
+
* Truncate text based on height constraint
|
|
19203
19203
|
*/
|
|
19204
19204
|
function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
|
|
19205
19205
|
var _measureFn;
|
|
@@ -19247,19 +19247,19 @@ function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
|
|
|
19247
19247
|
return truncateByWidth(lines[0], firstLineWidth, ellipsisChar, 0, measureFn);
|
|
19248
19248
|
}
|
|
19249
19249
|
|
|
19250
|
-
/**
|
|
19251
|
-
* Core Text Layout Engine
|
|
19252
|
-
*
|
|
19253
|
-
* Implements Konva-compatible text layout with support for:
|
|
19254
|
-
* - Multiple wrap modes (word/char/none)
|
|
19255
|
-
* - Ellipsis truncation
|
|
19256
|
-
* - Justify alignment with proper space distribution
|
|
19257
|
-
* - RTL/LTR text direction
|
|
19258
|
-
* - Advanced grapheme handling
|
|
19250
|
+
/**
|
|
19251
|
+
* Core Text Layout Engine
|
|
19252
|
+
*
|
|
19253
|
+
* Implements Konva-compatible text layout with support for:
|
|
19254
|
+
* - Multiple wrap modes (word/char/none)
|
|
19255
|
+
* - Ellipsis truncation
|
|
19256
|
+
* - Justify alignment with proper space distribution
|
|
19257
|
+
* - RTL/LTR text direction
|
|
19258
|
+
* - Advanced grapheme handling
|
|
19259
19259
|
*/
|
|
19260
19260
|
|
|
19261
|
-
/**
|
|
19262
|
-
* Main text layout function - converts text and options into positioned layout
|
|
19261
|
+
/**
|
|
19262
|
+
* Main text layout function - converts text and options into positioned layout
|
|
19263
19263
|
*/
|
|
19264
19264
|
function layoutText(options) {
|
|
19265
19265
|
var _ellipsisResult;
|
|
@@ -19378,8 +19378,8 @@ function layoutText(options) {
|
|
|
19378
19378
|
};
|
|
19379
19379
|
}
|
|
19380
19380
|
|
|
19381
|
-
/**
|
|
19382
|
-
* Layout a single paragraph with wrapping
|
|
19381
|
+
/**
|
|
19382
|
+
* Layout a single paragraph with wrapping
|
|
19383
19383
|
*/
|
|
19384
19384
|
function layoutParagraph(text, options) {
|
|
19385
19385
|
const {
|
|
@@ -19414,8 +19414,8 @@ function layoutParagraph(text, options) {
|
|
|
19414
19414
|
return layoutLines;
|
|
19415
19415
|
}
|
|
19416
19416
|
|
|
19417
|
-
/**
|
|
19418
|
-
* Layout a single line of text (no wrapping)
|
|
19417
|
+
/**
|
|
19418
|
+
* Layout a single line of text (no wrapping)
|
|
19419
19419
|
*/
|
|
19420
19420
|
function layoutSingleLine(text, options) {
|
|
19421
19421
|
let textOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -19485,8 +19485,8 @@ function layoutSingleLine(text, options) {
|
|
|
19485
19485
|
};
|
|
19486
19486
|
}
|
|
19487
19487
|
|
|
19488
|
-
/**
|
|
19489
|
-
* Word-based wrapping algorithm
|
|
19488
|
+
/**
|
|
19489
|
+
* Word-based wrapping algorithm
|
|
19490
19490
|
*/
|
|
19491
19491
|
function wrapByWords(text, maxWidth, options) {
|
|
19492
19492
|
const lines = [];
|
|
@@ -19519,8 +19519,8 @@ function wrapByWords(text, maxWidth, options) {
|
|
|
19519
19519
|
return lines.length > 0 ? lines : [''];
|
|
19520
19520
|
}
|
|
19521
19521
|
|
|
19522
|
-
/**
|
|
19523
|
-
* Character-based wrapping algorithm
|
|
19522
|
+
/**
|
|
19523
|
+
* Character-based wrapping algorithm
|
|
19524
19524
|
*/
|
|
19525
19525
|
function wrapByCharacters(text, maxWidth, options) {
|
|
19526
19526
|
const lines = [];
|
|
@@ -19542,8 +19542,8 @@ function wrapByCharacters(text, maxWidth, options) {
|
|
|
19542
19542
|
return lines.length > 0 ? lines : [''];
|
|
19543
19543
|
}
|
|
19544
19544
|
|
|
19545
|
-
/**
|
|
19546
|
-
* Apply text alignment to lines
|
|
19545
|
+
/**
|
|
19546
|
+
* Apply text alignment to lines
|
|
19547
19547
|
*/
|
|
19548
19548
|
function applyAlignment(lines, align, containerWidth, options) {
|
|
19549
19549
|
return lines.map(line => {
|
|
@@ -19577,8 +19577,8 @@ function applyAlignment(lines, align, containerWidth, options) {
|
|
|
19577
19577
|
});
|
|
19578
19578
|
}
|
|
19579
19579
|
|
|
19580
|
-
/**
|
|
19581
|
-
* Apply justify alignment by expanding spaces
|
|
19580
|
+
/**
|
|
19581
|
+
* Apply justify alignment by expanding spaces
|
|
19582
19582
|
*/
|
|
19583
19583
|
function applyJustification(line, containerWidth, options) {
|
|
19584
19584
|
const spaces = line.graphemes.filter(g => /\s/.test(g)).length;
|
|
@@ -19601,8 +19601,8 @@ function applyJustification(line, containerWidth, options) {
|
|
|
19601
19601
|
return line;
|
|
19602
19602
|
}
|
|
19603
19603
|
|
|
19604
|
-
/**
|
|
19605
|
-
* Calculate vertical alignment offset
|
|
19604
|
+
/**
|
|
19605
|
+
* Calculate vertical alignment offset
|
|
19606
19606
|
*/
|
|
19607
19607
|
function calculateVerticalOffset(contentHeight, containerHeight, align) {
|
|
19608
19608
|
switch (align) {
|
|
@@ -19616,8 +19616,8 @@ function calculateVerticalOffset(contentHeight, containerHeight, align) {
|
|
|
19616
19616
|
}
|
|
19617
19617
|
}
|
|
19618
19618
|
|
|
19619
|
-
/**
|
|
19620
|
-
* Handle height overflow with ellipsis
|
|
19619
|
+
/**
|
|
19620
|
+
* Handle height overflow with ellipsis
|
|
19621
19621
|
*/
|
|
19622
19622
|
function handleHeightOverflow(existingLines, overflowLine, remainingHeight, options) {
|
|
19623
19623
|
// If ellipsis is enabled, try to fit part of the overflow line
|
|
@@ -19646,8 +19646,8 @@ function handleHeightOverflow(existingLines, overflowLine, remainingHeight, opti
|
|
|
19646
19646
|
};
|
|
19647
19647
|
}
|
|
19648
19648
|
|
|
19649
|
-
/**
|
|
19650
|
-
* Create empty line for empty paragraphs
|
|
19649
|
+
/**
|
|
19650
|
+
* Create empty line for empty paragraphs
|
|
19651
19651
|
*/
|
|
19652
19652
|
function createEmptyLine(options) {
|
|
19653
19653
|
const height = options.fontSize * options.lineHeight;
|
|
@@ -19663,8 +19663,8 @@ function createEmptyLine(options) {
|
|
|
19663
19663
|
};
|
|
19664
19664
|
}
|
|
19665
19665
|
|
|
19666
|
-
/**
|
|
19667
|
-
* Measure width of a line of text
|
|
19666
|
+
/**
|
|
19667
|
+
* Measure width of a line of text
|
|
19668
19668
|
*/
|
|
19669
19669
|
function measureLineWidth(text, options) {
|
|
19670
19670
|
const graphemes = segmentGraphemes(text);
|
|
@@ -19681,8 +19681,8 @@ function measureLineWidth(text, options) {
|
|
|
19681
19681
|
return width;
|
|
19682
19682
|
}
|
|
19683
19683
|
|
|
19684
|
-
/**
|
|
19685
|
-
* Convert layout options to measurement options
|
|
19684
|
+
/**
|
|
19685
|
+
* Convert layout options to measurement options
|
|
19686
19686
|
*/
|
|
19687
19687
|
function createMeasurementOptions(options) {
|
|
19688
19688
|
return {
|
|
@@ -19925,15 +19925,15 @@ class TextSVGExportMixin extends FabricObjectSVGExportMixin {
|
|
|
19925
19925
|
}
|
|
19926
19926
|
}
|
|
19927
19927
|
|
|
19928
|
-
/**
|
|
19929
|
-
* Browser Line Break Extraction
|
|
19930
|
-
*
|
|
19931
|
-
* Captures exact line breaks as rendered by the browser to ensure
|
|
19932
|
-
* pixel-perfect consistency between DOM editing and canvas rendering.
|
|
19928
|
+
/**
|
|
19929
|
+
* Browser Line Break Extraction
|
|
19930
|
+
*
|
|
19931
|
+
* Captures exact line breaks as rendered by the browser to ensure
|
|
19932
|
+
* pixel-perfect consistency between DOM editing and canvas rendering.
|
|
19933
19933
|
*/
|
|
19934
19934
|
|
|
19935
|
-
/**
|
|
19936
|
-
* Segment text into graphemes safely using Intl.Segmenter or fallback
|
|
19935
|
+
/**
|
|
19936
|
+
* Segment text into graphemes safely using Intl.Segmenter or fallback
|
|
19937
19937
|
*/
|
|
19938
19938
|
function segmentIntoGraphemes(text) {
|
|
19939
19939
|
if (typeof Intl !== 'undefined' && Intl.Segmenter) {
|
|
@@ -19947,9 +19947,9 @@ function segmentIntoGraphemes(text) {
|
|
|
19947
19947
|
return Array.from(text);
|
|
19948
19948
|
}
|
|
19949
19949
|
|
|
19950
|
-
/**
|
|
19951
|
-
* Extract line break information from a textarea by creating a mirror element
|
|
19952
|
-
* with identical computed styles and measuring grapheme positions.
|
|
19950
|
+
/**
|
|
19951
|
+
* Extract line break information from a textarea by creating a mirror element
|
|
19952
|
+
* with identical computed styles and measuring grapheme positions.
|
|
19953
19953
|
*/
|
|
19954
19954
|
function extractLinesFromDOM(textarea) {
|
|
19955
19955
|
const text = textarea.value;
|
|
@@ -20044,16 +20044,16 @@ function extractLinesFromDOM(textarea) {
|
|
|
20044
20044
|
}
|
|
20045
20045
|
}
|
|
20046
20046
|
|
|
20047
|
-
/**
|
|
20048
|
-
* Create a hash of layout-affecting properties to detect when browser lines are still valid
|
|
20047
|
+
/**
|
|
20048
|
+
* Create a hash of layout-affecting properties to detect when browser lines are still valid
|
|
20049
20049
|
*/
|
|
20050
20050
|
function createLayoutHash(target) {
|
|
20051
20051
|
const properties = [target.text, target.width, target.height, target.fontFamily, target.fontSize, target.fontWeight, target.fontStyle, target.lineHeight, target.charSpacing, target.textAlign, target.direction];
|
|
20052
20052
|
return properties.map(p => String(p)).join('|');
|
|
20053
20053
|
}
|
|
20054
20054
|
|
|
20055
|
-
/**
|
|
20056
|
-
* Check if stored browser lines are still valid for the current target state
|
|
20055
|
+
/**
|
|
20056
|
+
* Check if stored browser lines are still valid for the current target state
|
|
20057
20057
|
*/
|
|
20058
20058
|
function areBrowserLinesValid(target, storedHash) {
|
|
20059
20059
|
if (!storedHash || !target.__lastBrowserLines) {
|
|
@@ -20063,24 +20063,24 @@ function areBrowserLinesValid(target, storedHash) {
|
|
|
20063
20063
|
return currentHash === storedHash;
|
|
20064
20064
|
}
|
|
20065
20065
|
|
|
20066
|
-
/**
|
|
20067
|
-
* Store browser lines on a target object with validity hash
|
|
20066
|
+
/**
|
|
20067
|
+
* Store browser lines on a target object with validity hash
|
|
20068
20068
|
*/
|
|
20069
20069
|
function storeBrowserLines(target, lines, layoutHash) {
|
|
20070
20070
|
target.__lastBrowserLines = lines;
|
|
20071
20071
|
target.__lastBrowserLinesHash = createLayoutHash(target);
|
|
20072
20072
|
}
|
|
20073
20073
|
|
|
20074
|
-
/**
|
|
20075
|
-
* Clear stored browser lines from a target object
|
|
20074
|
+
/**
|
|
20075
|
+
* Clear stored browser lines from a target object
|
|
20076
20076
|
*/
|
|
20077
20077
|
function clearBrowserLines(target) {
|
|
20078
20078
|
delete target.__lastBrowserLines;
|
|
20079
20079
|
delete target.__lastBrowserLinesHash;
|
|
20080
20080
|
}
|
|
20081
20081
|
|
|
20082
|
-
/**
|
|
20083
|
-
* Get stored browser lines if they're still valid
|
|
20082
|
+
/**
|
|
20083
|
+
* Get stored browser lines if they're still valid
|
|
20084
20084
|
*/
|
|
20085
20085
|
function getBrowserLines(target) {
|
|
20086
20086
|
const lines = target.__lastBrowserLines;
|
|
@@ -20093,9 +20093,9 @@ function getBrowserLines(target) {
|
|
|
20093
20093
|
|
|
20094
20094
|
let measuringContext;
|
|
20095
20095
|
|
|
20096
|
-
/**
|
|
20097
|
-
* Return a context for measurement of text string.
|
|
20098
|
-
* if created it gets stored for reuse
|
|
20096
|
+
/**
|
|
20097
|
+
* Return a context for measurement of text string.
|
|
20098
|
+
* if created it gets stored for reuse
|
|
20099
20099
|
*/
|
|
20100
20100
|
function getMeasuringContext() {
|
|
20101
20101
|
if (!measuringContext) {
|
|
@@ -20108,17 +20108,17 @@ function getMeasuringContext() {
|
|
|
20108
20108
|
return measuringContext;
|
|
20109
20109
|
}
|
|
20110
20110
|
|
|
20111
|
-
/**
|
|
20112
|
-
* Measure and return the info of a single grapheme.
|
|
20113
|
-
* needs the the info of previous graphemes already filled
|
|
20114
|
-
* Override to customize measuring
|
|
20111
|
+
/**
|
|
20112
|
+
* Measure and return the info of a single grapheme.
|
|
20113
|
+
* needs the the info of previous graphemes already filled
|
|
20114
|
+
* Override to customize measuring
|
|
20115
20115
|
*/
|
|
20116
20116
|
|
|
20117
20117
|
// @TODO this is not complete
|
|
20118
20118
|
|
|
20119
|
-
/**
|
|
20120
|
-
* Text class
|
|
20121
|
-
* @see {@link http://fabricjs.com/fabric-intro-part-2#text}
|
|
20119
|
+
/**
|
|
20120
|
+
* Text class
|
|
20121
|
+
* @see {@link http://fabricjs.com/fabric-intro-part-2#text}
|
|
20122
20122
|
*/
|
|
20123
20123
|
class FabricText extends StyledText {
|
|
20124
20124
|
static getDefaults() {
|
|
@@ -20129,11 +20129,11 @@ class FabricText extends StyledText {
|
|
|
20129
20129
|
}
|
|
20130
20130
|
constructor(text, options) {
|
|
20131
20131
|
super();
|
|
20132
|
-
/**
|
|
20133
|
-
* contains characters bounding boxes
|
|
20134
|
-
* This variable is considered to be protected.
|
|
20135
|
-
* But for how mixins are implemented right now, we can't leave it private
|
|
20136
|
-
* @protected
|
|
20132
|
+
/**
|
|
20133
|
+
* contains characters bounding boxes
|
|
20134
|
+
* This variable is considered to be protected.
|
|
20135
|
+
* But for how mixins are implemented right now, we can't leave it private
|
|
20136
|
+
* @protected
|
|
20137
20137
|
*/
|
|
20138
20138
|
_defineProperty(this, "__charBounds", []);
|
|
20139
20139
|
Object.assign(this, FabricText.ownDefaults);
|
|
@@ -20150,9 +20150,9 @@ class FabricText extends StyledText {
|
|
|
20150
20150
|
this.setCoords();
|
|
20151
20151
|
}
|
|
20152
20152
|
|
|
20153
|
-
/**
|
|
20154
|
-
* If text has a path, it will add the extra information needed
|
|
20155
|
-
* for path and text calculations
|
|
20153
|
+
/**
|
|
20154
|
+
* If text has a path, it will add the extra information needed
|
|
20155
|
+
* for path and text calculations
|
|
20156
20156
|
*/
|
|
20157
20157
|
setPathInfo() {
|
|
20158
20158
|
const path = this.path;
|
|
@@ -20161,10 +20161,10 @@ class FabricText extends StyledText {
|
|
|
20161
20161
|
}
|
|
20162
20162
|
}
|
|
20163
20163
|
|
|
20164
|
-
/**
|
|
20165
|
-
* @private
|
|
20166
|
-
* Divides text into lines of text and lines of graphemes.
|
|
20167
|
-
* Uses browser lines when available for pixel-perfect consistency.
|
|
20164
|
+
/**
|
|
20165
|
+
* @private
|
|
20166
|
+
* Divides text into lines of text and lines of graphemes.
|
|
20167
|
+
* Uses browser lines when available for pixel-perfect consistency.
|
|
20168
20168
|
*/
|
|
20169
20169
|
_splitText() {
|
|
20170
20170
|
// Check if we have valid browser lines and should use them
|
|
@@ -20180,9 +20180,9 @@ class FabricText extends StyledText {
|
|
|
20180
20180
|
return newLines;
|
|
20181
20181
|
}
|
|
20182
20182
|
|
|
20183
|
-
/**
|
|
20184
|
-
* Create TextLinesInfo from browser-extracted lines
|
|
20185
|
-
* @private
|
|
20183
|
+
/**
|
|
20184
|
+
* Create TextLinesInfo from browser-extracted lines
|
|
20185
|
+
* @private
|
|
20186
20186
|
*/
|
|
20187
20187
|
_splitTextFromBrowserLines(browserLines) {
|
|
20188
20188
|
const lines = [];
|
|
@@ -20216,10 +20216,10 @@ class FabricText extends StyledText {
|
|
|
20216
20216
|
return result;
|
|
20217
20217
|
}
|
|
20218
20218
|
|
|
20219
|
-
/**
|
|
20220
|
-
* Initialize or update text dimensions.
|
|
20221
|
-
* Updates this.width and this.height with the proper values.
|
|
20222
|
-
* Does not return dimensions.
|
|
20219
|
+
/**
|
|
20220
|
+
* Initialize or update text dimensions.
|
|
20221
|
+
* Updates this.width and this.height with the proper values.
|
|
20222
|
+
* Does not return dimensions.
|
|
20223
20223
|
*/
|
|
20224
20224
|
initDimensions() {
|
|
20225
20225
|
// Use advanced layout if enabled
|
|
@@ -20242,11 +20242,12 @@ class FabricText extends StyledText {
|
|
|
20242
20242
|
}
|
|
20243
20243
|
}
|
|
20244
20244
|
|
|
20245
|
-
/**
|
|
20246
|
-
* Enlarge space boxes and shift the others
|
|
20245
|
+
/**
|
|
20246
|
+
* Enlarge space boxes and shift the others
|
|
20247
20247
|
*/
|
|
20248
20248
|
enlargeSpaces() {
|
|
20249
20249
|
let diffSpace, currentLineWidth, numberOfSpaces, accumulatedSpace, line, charBound, spaces;
|
|
20250
|
+
const isRtl = this.direction === 'rtl';
|
|
20250
20251
|
for (let i = 0, len = this._textLines.length; i < len; i++) {
|
|
20251
20252
|
if (this.textAlign !== JUSTIFY && (i === len - 1 || this.isEndOfWrapping(i))) {
|
|
20252
20253
|
continue;
|
|
@@ -20257,33 +20258,62 @@ class FabricText extends StyledText {
|
|
|
20257
20258
|
if (currentLineWidth < this.width && (spaces = this.textLines[i].match(this._reSpacesAndTabs))) {
|
|
20258
20259
|
numberOfSpaces = spaces.length;
|
|
20259
20260
|
diffSpace = (this.width - currentLineWidth) / numberOfSpaces;
|
|
20260
|
-
|
|
20261
|
-
|
|
20262
|
-
|
|
20263
|
-
|
|
20264
|
-
|
|
20265
|
-
|
|
20266
|
-
|
|
20267
|
-
|
|
20268
|
-
|
|
20261
|
+
if (isRtl) {
|
|
20262
|
+
for (let j = 0; j < line.length; j++) {
|
|
20263
|
+
if (this._reSpaceAndTab.test(line[j])) ;
|
|
20264
|
+
}
|
|
20265
|
+
|
|
20266
|
+
// For RTL, we need to work backwards through the visual positions
|
|
20267
|
+
// but still update logical positions correctly
|
|
20268
|
+
let spaceCount = 0;
|
|
20269
|
+
for (let j = 0; j <= line.length; j++) {
|
|
20270
|
+
charBound = this.__charBounds[i][j];
|
|
20271
|
+
if (charBound) {
|
|
20272
|
+
if (this._reSpaceAndTab.test(line[j])) {
|
|
20273
|
+
charBound.width += diffSpace;
|
|
20274
|
+
charBound.kernedWidth += diffSpace;
|
|
20275
|
+
spaceCount++;
|
|
20276
|
+
}
|
|
20277
|
+
|
|
20278
|
+
// For RTL, shift all characters to the right by the total expansion
|
|
20279
|
+
// minus the expansion that comes after this character
|
|
20280
|
+
const remainingSpaces = numberOfSpaces - spaceCount;
|
|
20281
|
+
const shiftAmount = remainingSpaces * diffSpace;
|
|
20282
|
+
charBound.left += shiftAmount;
|
|
20283
|
+
}
|
|
20284
|
+
}
|
|
20285
|
+
} else {
|
|
20286
|
+
// LTR processing (original logic)
|
|
20287
|
+
for (let j = 0; j <= line.length; j++) {
|
|
20288
|
+
charBound = this.__charBounds[i][j];
|
|
20289
|
+
if (charBound) {
|
|
20290
|
+
if (this._reSpaceAndTab.test(line[j])) {
|
|
20291
|
+
charBound.width += diffSpace;
|
|
20292
|
+
charBound.kernedWidth += diffSpace;
|
|
20293
|
+
charBound.left += accumulatedSpace;
|
|
20294
|
+
accumulatedSpace += diffSpace;
|
|
20295
|
+
} else {
|
|
20296
|
+
charBound.left += accumulatedSpace;
|
|
20297
|
+
}
|
|
20298
|
+
}
|
|
20269
20299
|
}
|
|
20270
20300
|
}
|
|
20271
20301
|
}
|
|
20272
20302
|
}
|
|
20273
20303
|
}
|
|
20274
20304
|
|
|
20275
|
-
/**
|
|
20276
|
-
* Advanced layout using new text engine (Konva-compatible)
|
|
20277
|
-
* @private
|
|
20305
|
+
/**
|
|
20306
|
+
* Advanced layout using new text engine (Konva-compatible)
|
|
20307
|
+
* @private
|
|
20278
20308
|
*/
|
|
20279
20309
|
_layoutTextAdvanced() {
|
|
20280
20310
|
const options = this._getAdvancedLayoutOptions();
|
|
20281
20311
|
return layoutText(options);
|
|
20282
20312
|
}
|
|
20283
20313
|
|
|
20284
|
-
/**
|
|
20285
|
-
* Get advanced layout options from current text properties
|
|
20286
|
-
* @private
|
|
20314
|
+
/**
|
|
20315
|
+
* Get advanced layout options from current text properties
|
|
20316
|
+
* @private
|
|
20287
20317
|
*/
|
|
20288
20318
|
_getAdvancedLayoutOptions() {
|
|
20289
20319
|
return {
|
|
@@ -20305,9 +20335,9 @@ class FabricText extends StyledText {
|
|
|
20305
20335
|
};
|
|
20306
20336
|
}
|
|
20307
20337
|
|
|
20308
|
-
/**
|
|
20309
|
-
* Map Fabric textAlign to Konva align format
|
|
20310
|
-
* @private
|
|
20338
|
+
/**
|
|
20339
|
+
* Map Fabric textAlign to Konva align format
|
|
20340
|
+
* @private
|
|
20311
20341
|
*/
|
|
20312
20342
|
_mapTextAlignToAlign(textAlign) {
|
|
20313
20343
|
switch (textAlign) {
|
|
@@ -20328,8 +20358,8 @@ class FabricText extends StyledText {
|
|
|
20328
20358
|
}
|
|
20329
20359
|
}
|
|
20330
20360
|
|
|
20331
|
-
/**
|
|
20332
|
-
* Enhanced initDimensions that uses advanced layout when enabled
|
|
20361
|
+
/**
|
|
20362
|
+
* Enhanced initDimensions that uses advanced layout when enabled
|
|
20333
20363
|
*/
|
|
20334
20364
|
initDimensionsAdvanced() {
|
|
20335
20365
|
if (!this.enableAdvancedLayout) {
|
|
@@ -20346,9 +20376,9 @@ class FabricText extends StyledText {
|
|
|
20346
20376
|
this.dirty = true;
|
|
20347
20377
|
}
|
|
20348
20378
|
|
|
20349
|
-
/**
|
|
20350
|
-
* Convert new layout format to legacy _textLines and __charBounds format
|
|
20351
|
-
* @private
|
|
20379
|
+
/**
|
|
20380
|
+
* Convert new layout format to legacy _textLines and __charBounds format
|
|
20381
|
+
* @private
|
|
20352
20382
|
*/
|
|
20353
20383
|
_convertLayoutToLegacyFormat(layout) {
|
|
20354
20384
|
this._textLines = layout.lines.map(line => line.graphemes);
|
|
@@ -20370,30 +20400,30 @@ class FabricText extends StyledText {
|
|
|
20370
20400
|
}
|
|
20371
20401
|
}
|
|
20372
20402
|
|
|
20373
|
-
/**
|
|
20374
|
-
* Detect if the text line is ended with an hard break
|
|
20375
|
-
* text and itext do not have wrapping, return false
|
|
20376
|
-
* @return {Boolean}
|
|
20403
|
+
/**
|
|
20404
|
+
* Detect if the text line is ended with an hard break
|
|
20405
|
+
* text and itext do not have wrapping, return false
|
|
20406
|
+
* @return {Boolean}
|
|
20377
20407
|
*/
|
|
20378
20408
|
isEndOfWrapping(lineIndex) {
|
|
20379
20409
|
return lineIndex === this._textLines.length - 1;
|
|
20380
20410
|
}
|
|
20381
20411
|
|
|
20382
|
-
/**
|
|
20383
|
-
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
20384
|
-
* and counting style.
|
|
20385
|
-
* It return always 1 for text and Itext. Textbox has its own implementation
|
|
20386
|
-
* @return Number
|
|
20412
|
+
/**
|
|
20413
|
+
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
20414
|
+
* and counting style.
|
|
20415
|
+
* It return always 1 for text and Itext. Textbox has its own implementation
|
|
20416
|
+
* @return Number
|
|
20387
20417
|
*/
|
|
20388
20418
|
|
|
20389
20419
|
missingNewlineOffset(_lineIndex) {
|
|
20390
20420
|
return 1;
|
|
20391
20421
|
}
|
|
20392
20422
|
|
|
20393
|
-
/**
|
|
20394
|
-
* Returns 2d representation (lineIndex and charIndex) of cursor
|
|
20395
|
-
* @param {Number} selectionStart
|
|
20396
|
-
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
20423
|
+
/**
|
|
20424
|
+
* Returns 2d representation (lineIndex and charIndex) of cursor
|
|
20425
|
+
* @param {Number} selectionStart
|
|
20426
|
+
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
20397
20427
|
*/
|
|
20398
20428
|
get2DCursorLocation(selectionStart, skipWrapping) {
|
|
20399
20429
|
const lines = skipWrapping ? this._unwrappedTextLines : this._textLines;
|
|
@@ -20413,24 +20443,24 @@ class FabricText extends StyledText {
|
|
|
20413
20443
|
};
|
|
20414
20444
|
}
|
|
20415
20445
|
|
|
20416
|
-
/**
|
|
20417
|
-
* Returns string representation of an instance
|
|
20418
|
-
* @return {String} String representation of text object
|
|
20446
|
+
/**
|
|
20447
|
+
* Returns string representation of an instance
|
|
20448
|
+
* @return {String} String representation of text object
|
|
20419
20449
|
*/
|
|
20420
20450
|
toString() {
|
|
20421
20451
|
return `#<Text (${this.complexity()}): { "text": "${this.text}", "fontFamily": "${this.fontFamily}" }>`;
|
|
20422
20452
|
}
|
|
20423
20453
|
|
|
20424
|
-
/**
|
|
20425
|
-
* Return the dimension and the zoom level needed to create a cache canvas
|
|
20426
|
-
* big enough to host the object to be cached.
|
|
20427
|
-
* @private
|
|
20428
|
-
* @param {Object} dim.x width of object to be cached
|
|
20429
|
-
* @param {Object} dim.y height of object to be cached
|
|
20430
|
-
* @return {Object}.width width of canvas
|
|
20431
|
-
* @return {Object}.height height of canvas
|
|
20432
|
-
* @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
|
|
20433
|
-
* @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
|
|
20454
|
+
/**
|
|
20455
|
+
* Return the dimension and the zoom level needed to create a cache canvas
|
|
20456
|
+
* big enough to host the object to be cached.
|
|
20457
|
+
* @private
|
|
20458
|
+
* @param {Object} dim.x width of object to be cached
|
|
20459
|
+
* @param {Object} dim.y height of object to be cached
|
|
20460
|
+
* @return {Object}.width width of canvas
|
|
20461
|
+
* @return {Object}.height height of canvas
|
|
20462
|
+
* @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
|
|
20463
|
+
* @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
|
|
20434
20464
|
*/
|
|
20435
20465
|
_getCacheCanvasDimensions() {
|
|
20436
20466
|
const dims = super._getCacheCanvasDimensions();
|
|
@@ -20440,9 +20470,9 @@ class FabricText extends StyledText {
|
|
|
20440
20470
|
return dims;
|
|
20441
20471
|
}
|
|
20442
20472
|
|
|
20443
|
-
/**
|
|
20444
|
-
* @private
|
|
20445
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20473
|
+
/**
|
|
20474
|
+
* @private
|
|
20475
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20446
20476
|
*/
|
|
20447
20477
|
_render(ctx) {
|
|
20448
20478
|
const path = this.path;
|
|
@@ -20455,9 +20485,9 @@ class FabricText extends StyledText {
|
|
|
20455
20485
|
this._renderTextDecoration(ctx, 'linethrough');
|
|
20456
20486
|
}
|
|
20457
20487
|
|
|
20458
|
-
/**
|
|
20459
|
-
* @private
|
|
20460
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20488
|
+
/**
|
|
20489
|
+
* @private
|
|
20490
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20461
20491
|
*/
|
|
20462
20492
|
_renderText(ctx) {
|
|
20463
20493
|
// Skip text rendering if in overlay editing mode
|
|
@@ -20473,15 +20503,15 @@ class FabricText extends StyledText {
|
|
|
20473
20503
|
}
|
|
20474
20504
|
}
|
|
20475
20505
|
|
|
20476
|
-
/**
|
|
20477
|
-
* Set the font parameter of the context with the object properties or with charStyle
|
|
20478
|
-
* @private
|
|
20479
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20480
|
-
* @param {Object} [charStyle] object with font style properties
|
|
20481
|
-
* @param {String} [charStyle.fontFamily] Font Family
|
|
20482
|
-
* @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
|
|
20483
|
-
* @param {String} [charStyle.fontWeight] Font weight
|
|
20484
|
-
* @param {String} [charStyle.fontStyle] Font style (italic|normal)
|
|
20506
|
+
/**
|
|
20507
|
+
* Set the font parameter of the context with the object properties or with charStyle
|
|
20508
|
+
* @private
|
|
20509
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20510
|
+
* @param {Object} [charStyle] object with font style properties
|
|
20511
|
+
* @param {String} [charStyle.fontFamily] Font Family
|
|
20512
|
+
* @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
|
|
20513
|
+
* @param {String} [charStyle.fontWeight] Font weight
|
|
20514
|
+
* @param {String} [charStyle.fontStyle] Font style (italic|normal)
|
|
20485
20515
|
*/
|
|
20486
20516
|
_setTextStyles(ctx, charStyle, forMeasuring) {
|
|
20487
20517
|
ctx.textBaseline = 'alphabetic';
|
|
@@ -20501,11 +20531,11 @@ class FabricText extends StyledText {
|
|
|
20501
20531
|
ctx.font = this._getFontDeclaration(charStyle, forMeasuring);
|
|
20502
20532
|
}
|
|
20503
20533
|
|
|
20504
|
-
/**
|
|
20505
|
-
* calculate and return the text Width measuring each line.
|
|
20506
|
-
* @private
|
|
20507
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20508
|
-
* @return {Number} Maximum width of Text object
|
|
20534
|
+
/**
|
|
20535
|
+
* calculate and return the text Width measuring each line.
|
|
20536
|
+
* @private
|
|
20537
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20538
|
+
* @return {Number} Maximum width of Text object
|
|
20509
20539
|
*/
|
|
20510
20540
|
calcTextWidth() {
|
|
20511
20541
|
let maxWidth = this.getLineWidth(0);
|
|
@@ -20518,23 +20548,23 @@ class FabricText extends StyledText {
|
|
|
20518
20548
|
return maxWidth;
|
|
20519
20549
|
}
|
|
20520
20550
|
|
|
20521
|
-
/**
|
|
20522
|
-
* @private
|
|
20523
|
-
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20524
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20525
|
-
* @param {String} line Text to render
|
|
20526
|
-
* @param {Number} left Left position of text
|
|
20527
|
-
* @param {Number} top Top position of text
|
|
20528
|
-
* @param {Number} lineIndex Index of a line in a text
|
|
20551
|
+
/**
|
|
20552
|
+
* @private
|
|
20553
|
+
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20554
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20555
|
+
* @param {String} line Text to render
|
|
20556
|
+
* @param {Number} left Left position of text
|
|
20557
|
+
* @param {Number} top Top position of text
|
|
20558
|
+
* @param {Number} lineIndex Index of a line in a text
|
|
20529
20559
|
*/
|
|
20530
20560
|
_renderTextLine(method, ctx, line, left, top, lineIndex) {
|
|
20531
20561
|
this._renderChars(method, ctx, line, left, top, lineIndex);
|
|
20532
20562
|
}
|
|
20533
20563
|
|
|
20534
|
-
/**
|
|
20535
|
-
* Renders the text background for lines, taking care of style
|
|
20536
|
-
* @private
|
|
20537
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20564
|
+
/**
|
|
20565
|
+
* Renders the text background for lines, taking care of style
|
|
20566
|
+
* @private
|
|
20567
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20538
20568
|
*/
|
|
20539
20569
|
_renderTextLinesBackground(ctx) {
|
|
20540
20570
|
if (!this.textBackgroundColor && !this.styleHas('textBackgroundColor')) {
|
|
@@ -20597,15 +20627,15 @@ class FabricText extends StyledText {
|
|
|
20597
20627
|
this._removeShadow(ctx);
|
|
20598
20628
|
}
|
|
20599
20629
|
|
|
20600
|
-
/**
|
|
20601
|
-
* measure and return the width of a single character.
|
|
20602
|
-
* possibly overridden to accommodate different measure logic or
|
|
20603
|
-
* to hook some external lib for character measurement
|
|
20604
|
-
* @private
|
|
20605
|
-
* @param {String} _char, char to be measured
|
|
20606
|
-
* @param {Object} charStyle style of char to be measured
|
|
20607
|
-
* @param {String} [previousChar] previous char
|
|
20608
|
-
* @param {Object} [prevCharStyle] style of previous char
|
|
20630
|
+
/**
|
|
20631
|
+
* measure and return the width of a single character.
|
|
20632
|
+
* possibly overridden to accommodate different measure logic or
|
|
20633
|
+
* to hook some external lib for character measurement
|
|
20634
|
+
* @private
|
|
20635
|
+
* @param {String} _char, char to be measured
|
|
20636
|
+
* @param {Object} charStyle style of char to be measured
|
|
20637
|
+
* @param {String} [previousChar] previous char
|
|
20638
|
+
* @param {Object} [prevCharStyle] style of previous char
|
|
20609
20639
|
*/
|
|
20610
20640
|
_measureChar(_char, charStyle, previousChar, prevCharStyle) {
|
|
20611
20641
|
const fontCache = cache.getFontCache(charStyle),
|
|
@@ -20650,19 +20680,19 @@ class FabricText extends StyledText {
|
|
|
20650
20680
|
};
|
|
20651
20681
|
}
|
|
20652
20682
|
|
|
20653
|
-
/**
|
|
20654
|
-
* Computes height of character at given position
|
|
20655
|
-
* @param {Number} line the line index number
|
|
20656
|
-
* @param {Number} _char the character index number
|
|
20657
|
-
* @return {Number} fontSize of the character
|
|
20683
|
+
/**
|
|
20684
|
+
* Computes height of character at given position
|
|
20685
|
+
* @param {Number} line the line index number
|
|
20686
|
+
* @param {Number} _char the character index number
|
|
20687
|
+
* @return {Number} fontSize of the character
|
|
20658
20688
|
*/
|
|
20659
20689
|
getHeightOfChar(line, _char) {
|
|
20660
20690
|
return this.getValueOfPropertyAt(line, _char, 'fontSize');
|
|
20661
20691
|
}
|
|
20662
20692
|
|
|
20663
|
-
/**
|
|
20664
|
-
* measure a text line measuring all characters.
|
|
20665
|
-
* @param {Number} lineIndex line number
|
|
20693
|
+
/**
|
|
20694
|
+
* measure a text line measuring all characters.
|
|
20695
|
+
* @param {Number} lineIndex line number
|
|
20666
20696
|
*/
|
|
20667
20697
|
measureLine(lineIndex) {
|
|
20668
20698
|
const lineInfo = this._measureLine(lineIndex);
|
|
@@ -20675,11 +20705,11 @@ class FabricText extends StyledText {
|
|
|
20675
20705
|
return lineInfo;
|
|
20676
20706
|
}
|
|
20677
20707
|
|
|
20678
|
-
/**
|
|
20679
|
-
* measure every grapheme of a line, populating __charBounds
|
|
20680
|
-
* @param {Number} lineIndex
|
|
20681
|
-
* @return {Object} object.width total width of characters
|
|
20682
|
-
* @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
|
|
20708
|
+
/**
|
|
20709
|
+
* measure every grapheme of a line, populating __charBounds
|
|
20710
|
+
* @param {Number} lineIndex
|
|
20711
|
+
* @return {Object} object.width total width of characters
|
|
20712
|
+
* @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
|
|
20683
20713
|
*/
|
|
20684
20714
|
_measureLine(lineIndex) {
|
|
20685
20715
|
let width = 0,
|
|
@@ -20742,13 +20772,13 @@ class FabricText extends StyledText {
|
|
|
20742
20772
|
};
|
|
20743
20773
|
}
|
|
20744
20774
|
|
|
20745
|
-
/**
|
|
20746
|
-
* Calculate the angle and the left,top position of the char that follow a path.
|
|
20747
|
-
* It appends it to graphemeInfo to be reused later at rendering
|
|
20748
|
-
* @private
|
|
20749
|
-
* @param {Number} positionInPath to be measured
|
|
20750
|
-
* @param {GraphemeBBox} graphemeInfo current grapheme box information
|
|
20751
|
-
* @param {Object} startingPoint position of the point
|
|
20775
|
+
/**
|
|
20776
|
+
* Calculate the angle and the left,top position of the char that follow a path.
|
|
20777
|
+
* It appends it to graphemeInfo to be reused later at rendering
|
|
20778
|
+
* @private
|
|
20779
|
+
* @param {Number} positionInPath to be measured
|
|
20780
|
+
* @param {GraphemeBBox} graphemeInfo current grapheme box information
|
|
20781
|
+
* @param {Object} startingPoint position of the point
|
|
20752
20782
|
*/
|
|
20753
20783
|
_setGraphemeOnPath(positionInPath, graphemeInfo) {
|
|
20754
20784
|
const centerPosition = positionInPath + graphemeInfo.kernedWidth / 2,
|
|
@@ -20761,13 +20791,13 @@ class FabricText extends StyledText {
|
|
|
20761
20791
|
graphemeInfo.angle = info.angle + (this.pathSide === RIGHT ? Math.PI : 0);
|
|
20762
20792
|
}
|
|
20763
20793
|
|
|
20764
|
-
/**
|
|
20765
|
-
*
|
|
20766
|
-
* @param {String} grapheme to be measured
|
|
20767
|
-
* @param {Number} lineIndex index of the line where the char is
|
|
20768
|
-
* @param {Number} charIndex position in the line
|
|
20769
|
-
* @param {String} [prevGrapheme] character preceding the one to be measured
|
|
20770
|
-
* @returns {GraphemeBBox} grapheme bbox
|
|
20794
|
+
/**
|
|
20795
|
+
*
|
|
20796
|
+
* @param {String} grapheme to be measured
|
|
20797
|
+
* @param {Number} lineIndex index of the line where the char is
|
|
20798
|
+
* @param {Number} charIndex position in the line
|
|
20799
|
+
* @param {String} [prevGrapheme] character preceding the one to be measured
|
|
20800
|
+
* @returns {GraphemeBBox} grapheme bbox
|
|
20771
20801
|
*/
|
|
20772
20802
|
_getGraphemeBox(grapheme, lineIndex, charIndex, prevGrapheme, skipLeft) {
|
|
20773
20803
|
const style = this.getCompleteStyleDeclaration(lineIndex, charIndex),
|
|
@@ -20795,10 +20825,10 @@ class FabricText extends StyledText {
|
|
|
20795
20825
|
return box;
|
|
20796
20826
|
}
|
|
20797
20827
|
|
|
20798
|
-
/**
|
|
20799
|
-
* Calculate height of line at 'lineIndex'
|
|
20800
|
-
* @param {Number} lineIndex index of line to calculate
|
|
20801
|
-
* @return {Number}
|
|
20828
|
+
/**
|
|
20829
|
+
* Calculate height of line at 'lineIndex'
|
|
20830
|
+
* @param {Number} lineIndex index of line to calculate
|
|
20831
|
+
* @return {Number}
|
|
20802
20832
|
*/
|
|
20803
20833
|
getHeightOfLine(lineIndex) {
|
|
20804
20834
|
if (this.__lineHeights[lineIndex]) {
|
|
@@ -20814,8 +20844,8 @@ class FabricText extends StyledText {
|
|
|
20814
20844
|
return this.__lineHeights[lineIndex] = maxHeight * this.lineHeight * this._fontSizeMult;
|
|
20815
20845
|
}
|
|
20816
20846
|
|
|
20817
|
-
/**
|
|
20818
|
-
* Calculate text box height
|
|
20847
|
+
/**
|
|
20848
|
+
* Calculate text box height
|
|
20819
20849
|
*/
|
|
20820
20850
|
calcTextHeight() {
|
|
20821
20851
|
let lineHeight,
|
|
@@ -20827,26 +20857,26 @@ class FabricText extends StyledText {
|
|
|
20827
20857
|
return height;
|
|
20828
20858
|
}
|
|
20829
20859
|
|
|
20830
|
-
/**
|
|
20831
|
-
* @private
|
|
20832
|
-
* @return {Number} Left offset
|
|
20860
|
+
/**
|
|
20861
|
+
* @private
|
|
20862
|
+
* @return {Number} Left offset
|
|
20833
20863
|
*/
|
|
20834
20864
|
_getLeftOffset() {
|
|
20835
20865
|
return this.direction === 'ltr' ? -this.width / 2 : this.width / 2;
|
|
20836
20866
|
}
|
|
20837
20867
|
|
|
20838
|
-
/**
|
|
20839
|
-
* @private
|
|
20840
|
-
* @return {Number} Top offset
|
|
20868
|
+
/**
|
|
20869
|
+
* @private
|
|
20870
|
+
* @return {Number} Top offset
|
|
20841
20871
|
*/
|
|
20842
20872
|
_getTopOffset() {
|
|
20843
20873
|
return -this.height / 2;
|
|
20844
20874
|
}
|
|
20845
20875
|
|
|
20846
|
-
/**
|
|
20847
|
-
* @private
|
|
20848
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20849
|
-
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20876
|
+
/**
|
|
20877
|
+
* @private
|
|
20878
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20879
|
+
* @param {String} method Method name ("fillText" or "strokeText")
|
|
20850
20880
|
*/
|
|
20851
20881
|
_renderTextCommon(ctx, method) {
|
|
20852
20882
|
ctx.save();
|
|
@@ -20863,9 +20893,9 @@ class FabricText extends StyledText {
|
|
|
20863
20893
|
ctx.restore();
|
|
20864
20894
|
}
|
|
20865
20895
|
|
|
20866
|
-
/**
|
|
20867
|
-
* @private
|
|
20868
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20896
|
+
/**
|
|
20897
|
+
* @private
|
|
20898
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20869
20899
|
*/
|
|
20870
20900
|
_renderTextFill(ctx) {
|
|
20871
20901
|
if (!this.fill && !this.styleHas(FILL)) {
|
|
@@ -20874,9 +20904,9 @@ class FabricText extends StyledText {
|
|
|
20874
20904
|
this._renderTextCommon(ctx, 'fillText');
|
|
20875
20905
|
}
|
|
20876
20906
|
|
|
20877
|
-
/**
|
|
20878
|
-
* @private
|
|
20879
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20907
|
+
/**
|
|
20908
|
+
* @private
|
|
20909
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20880
20910
|
*/
|
|
20881
20911
|
_renderTextStroke(ctx) {
|
|
20882
20912
|
if ((!this.stroke || this.strokeWidth === 0) && this.isEmptyStyles()) {
|
|
@@ -20893,14 +20923,14 @@ class FabricText extends StyledText {
|
|
|
20893
20923
|
ctx.restore();
|
|
20894
20924
|
}
|
|
20895
20925
|
|
|
20896
|
-
/**
|
|
20897
|
-
* @private
|
|
20898
|
-
* @param {String} method fillText or strokeText.
|
|
20899
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20900
|
-
* @param {Array} line Content of the line, splitted in an array by grapheme
|
|
20901
|
-
* @param {Number} left
|
|
20902
|
-
* @param {Number} top
|
|
20903
|
-
* @param {Number} lineIndex
|
|
20926
|
+
/**
|
|
20927
|
+
* @private
|
|
20928
|
+
* @param {String} method fillText or strokeText.
|
|
20929
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
20930
|
+
* @param {Array} line Content of the line, splitted in an array by grapheme
|
|
20931
|
+
* @param {Number} left
|
|
20932
|
+
* @param {Number} top
|
|
20933
|
+
* @param {Number} lineIndex
|
|
20904
20934
|
*/
|
|
20905
20935
|
_renderChars(method, ctx, line, left, top, lineIndex) {
|
|
20906
20936
|
const lineHeight = this.getHeightOfLine(lineIndex),
|
|
@@ -20923,7 +20953,15 @@ class FabricText extends StyledText {
|
|
|
20923
20953
|
if (currentDirection !== this.direction) {
|
|
20924
20954
|
ctx.canvas.setAttribute('dir', isLtr ? 'ltr' : 'rtl');
|
|
20925
20955
|
ctx.direction = isLtr ? 'ltr' : 'rtl';
|
|
20926
|
-
|
|
20956
|
+
|
|
20957
|
+
// For justify alignments, we need to set the correct canvas text alignment
|
|
20958
|
+
// This is crucial for RTL text to render in the correct order
|
|
20959
|
+
if (isJustify) {
|
|
20960
|
+
// Justify uses LEFT alignment as a base, letting the character positioning handle justification
|
|
20961
|
+
ctx.textAlign = LEFT;
|
|
20962
|
+
} else {
|
|
20963
|
+
ctx.textAlign = isLtr ? LEFT : RIGHT;
|
|
20964
|
+
}
|
|
20927
20965
|
}
|
|
20928
20966
|
top -= lineHeight * this._fontSizeFraction / this.lineHeight;
|
|
20929
20967
|
if (shortCut) {
|
|
@@ -20974,16 +21012,16 @@ class FabricText extends StyledText {
|
|
|
20974
21012
|
ctx.restore();
|
|
20975
21013
|
}
|
|
20976
21014
|
|
|
20977
|
-
/**
|
|
20978
|
-
* This function try to patch the missing gradientTransform on canvas gradients.
|
|
20979
|
-
* transforming a context to transform the gradient, is going to transform the stroke too.
|
|
20980
|
-
* we want to transform the gradient but not the stroke operation, so we create
|
|
20981
|
-
* a transformed gradient on a pattern and then we use the pattern instead of the gradient.
|
|
20982
|
-
* this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
|
|
20983
|
-
* is limited.
|
|
20984
|
-
* @private
|
|
20985
|
-
* @param {TFiller} filler a fabric gradient instance
|
|
20986
|
-
* @return {CanvasPattern} a pattern to use as fill/stroke style
|
|
21015
|
+
/**
|
|
21016
|
+
* This function try to patch the missing gradientTransform on canvas gradients.
|
|
21017
|
+
* transforming a context to transform the gradient, is going to transform the stroke too.
|
|
21018
|
+
* we want to transform the gradient but not the stroke operation, so we create
|
|
21019
|
+
* a transformed gradient on a pattern and then we use the pattern instead of the gradient.
|
|
21020
|
+
* this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
|
|
21021
|
+
* is limited.
|
|
21022
|
+
* @private
|
|
21023
|
+
* @param {TFiller} filler a fabric gradient instance
|
|
21024
|
+
* @return {CanvasPattern} a pattern to use as fill/stroke style
|
|
20987
21025
|
*/
|
|
20988
21026
|
_applyPatternGradientTransformText(filler) {
|
|
20989
21027
|
// TODO: verify compatibility with strokeUniform
|
|
@@ -21039,12 +21077,12 @@ class FabricText extends StyledText {
|
|
|
21039
21077
|
};
|
|
21040
21078
|
}
|
|
21041
21079
|
|
|
21042
|
-
/**
|
|
21043
|
-
* This function prepare the canvas for a stroke style, and stroke and strokeWidth
|
|
21044
|
-
* need to be sent in as defined
|
|
21045
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
21046
|
-
* @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
|
|
21047
|
-
* @returns
|
|
21080
|
+
/**
|
|
21081
|
+
* This function prepare the canvas for a stroke style, and stroke and strokeWidth
|
|
21082
|
+
* need to be sent in as defined
|
|
21083
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
21084
|
+
* @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
|
|
21085
|
+
* @returns
|
|
21048
21086
|
*/
|
|
21049
21087
|
_setStrokeStyles(ctx, _ref) {
|
|
21050
21088
|
let {
|
|
@@ -21059,12 +21097,12 @@ class FabricText extends StyledText {
|
|
|
21059
21097
|
return this.handleFiller(ctx, 'strokeStyle', stroke);
|
|
21060
21098
|
}
|
|
21061
21099
|
|
|
21062
|
-
/**
|
|
21063
|
-
* This function prepare the canvas for a ill style, and fill
|
|
21064
|
-
* need to be sent in as defined
|
|
21065
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
21066
|
-
* @param {CompleteTextStyleDeclaration} style with ill defined
|
|
21067
|
-
* @returns
|
|
21100
|
+
/**
|
|
21101
|
+
* This function prepare the canvas for a ill style, and fill
|
|
21102
|
+
* need to be sent in as defined
|
|
21103
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
21104
|
+
* @param {CompleteTextStyleDeclaration} style with ill defined
|
|
21105
|
+
* @returns
|
|
21068
21106
|
*/
|
|
21069
21107
|
_setFillStyles(ctx, _ref2) {
|
|
21070
21108
|
let {
|
|
@@ -21073,16 +21111,16 @@ class FabricText extends StyledText {
|
|
|
21073
21111
|
return this.handleFiller(ctx, 'fillStyle', fill);
|
|
21074
21112
|
}
|
|
21075
21113
|
|
|
21076
|
-
/**
|
|
21077
|
-
* @private
|
|
21078
|
-
* @param {String} method
|
|
21079
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21080
|
-
* @param {Number} lineIndex
|
|
21081
|
-
* @param {Number} charIndex
|
|
21082
|
-
* @param {String} _char
|
|
21083
|
-
* @param {Number} left Left coordinate
|
|
21084
|
-
* @param {Number} top Top coordinate
|
|
21085
|
-
* @param {Number} lineHeight Height of the line
|
|
21114
|
+
/**
|
|
21115
|
+
* @private
|
|
21116
|
+
* @param {String} method
|
|
21117
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21118
|
+
* @param {Number} lineIndex
|
|
21119
|
+
* @param {Number} charIndex
|
|
21120
|
+
* @param {String} _char
|
|
21121
|
+
* @param {Number} left Left coordinate
|
|
21122
|
+
* @param {Number} top Top coordinate
|
|
21123
|
+
* @param {Number} lineHeight Height of the line
|
|
21086
21124
|
*/
|
|
21087
21125
|
_renderChar(method, ctx, lineIndex, charIndex, _char, left, top) {
|
|
21088
21126
|
const decl = this._getStyleDeclaration(lineIndex, charIndex),
|
|
@@ -21111,30 +21149,30 @@ class FabricText extends StyledText {
|
|
|
21111
21149
|
ctx.restore();
|
|
21112
21150
|
}
|
|
21113
21151
|
|
|
21114
|
-
/**
|
|
21115
|
-
* Turns the character into a 'superior figure' (i.e. 'superscript')
|
|
21116
|
-
* @param {Number} start selection start
|
|
21117
|
-
* @param {Number} end selection end
|
|
21152
|
+
/**
|
|
21153
|
+
* Turns the character into a 'superior figure' (i.e. 'superscript')
|
|
21154
|
+
* @param {Number} start selection start
|
|
21155
|
+
* @param {Number} end selection end
|
|
21118
21156
|
*/
|
|
21119
21157
|
setSuperscript(start, end) {
|
|
21120
21158
|
this._setScript(start, end, this.superscript);
|
|
21121
21159
|
}
|
|
21122
21160
|
|
|
21123
|
-
/**
|
|
21124
|
-
* Turns the character into an 'inferior figure' (i.e. 'subscript')
|
|
21125
|
-
* @param {Number} start selection start
|
|
21126
|
-
* @param {Number} end selection end
|
|
21161
|
+
/**
|
|
21162
|
+
* Turns the character into an 'inferior figure' (i.e. 'subscript')
|
|
21163
|
+
* @param {Number} start selection start
|
|
21164
|
+
* @param {Number} end selection end
|
|
21127
21165
|
*/
|
|
21128
21166
|
setSubscript(start, end) {
|
|
21129
21167
|
this._setScript(start, end, this.subscript);
|
|
21130
21168
|
}
|
|
21131
21169
|
|
|
21132
|
-
/**
|
|
21133
|
-
* Applies 'schema' at given position
|
|
21134
|
-
* @private
|
|
21135
|
-
* @param {Number} start selection start
|
|
21136
|
-
* @param {Number} end selection end
|
|
21137
|
-
* @param {Number} schema
|
|
21170
|
+
/**
|
|
21171
|
+
* Applies 'schema' at given position
|
|
21172
|
+
* @private
|
|
21173
|
+
* @param {Number} start selection start
|
|
21174
|
+
* @param {Number} end selection end
|
|
21175
|
+
* @param {Number} schema
|
|
21138
21176
|
*/
|
|
21139
21177
|
_setScript(start, end, schema) {
|
|
21140
21178
|
const loc = this.get2DCursorLocation(start, true),
|
|
@@ -21147,10 +21185,10 @@ class FabricText extends StyledText {
|
|
|
21147
21185
|
this.setSelectionStyles(style, start, end);
|
|
21148
21186
|
}
|
|
21149
21187
|
|
|
21150
|
-
/**
|
|
21151
|
-
* @private
|
|
21152
|
-
* @param {Number} lineIndex index text line
|
|
21153
|
-
* @return {Number} Line left offset
|
|
21188
|
+
/**
|
|
21189
|
+
* @private
|
|
21190
|
+
* @param {Number} lineIndex index text line
|
|
21191
|
+
* @return {Number} Line left offset
|
|
21154
21192
|
*/
|
|
21155
21193
|
_getLineLeftOffset(lineIndex) {
|
|
21156
21194
|
const lineWidth = this.getLineWidth(lineIndex),
|
|
@@ -21159,9 +21197,21 @@ class FabricText extends StyledText {
|
|
|
21159
21197
|
direction = this.direction,
|
|
21160
21198
|
isEndOfWrapping = this.isEndOfWrapping(lineIndex);
|
|
21161
21199
|
let leftOffset = 0;
|
|
21162
|
-
|
|
21163
|
-
|
|
21200
|
+
|
|
21201
|
+
// Handle justify alignments (excluding last lines and wrapped line ends)
|
|
21202
|
+
const isJustifyLine = textAlign === JUSTIFY || textAlign === JUSTIFY_CENTER && !isEndOfWrapping || textAlign === JUSTIFY_RIGHT && !isEndOfWrapping || textAlign === JUSTIFY_LEFT && !isEndOfWrapping;
|
|
21203
|
+
if (isJustifyLine) {
|
|
21204
|
+
// Justify lines should start at the left edge for LTR and right edge for RTL
|
|
21205
|
+
// The space distribution is handled by enlargeSpaces()
|
|
21206
|
+
if (direction === 'rtl') {
|
|
21207
|
+
// For RTL justify, we need to account for the line being right-aligned
|
|
21208
|
+
return 0;
|
|
21209
|
+
} else {
|
|
21210
|
+
return 0;
|
|
21211
|
+
}
|
|
21164
21212
|
}
|
|
21213
|
+
|
|
21214
|
+
// Handle non-justify alignments
|
|
21165
21215
|
if (textAlign === CENTER) {
|
|
21166
21216
|
leftOffset = lineDiff / 2;
|
|
21167
21217
|
}
|
|
@@ -21174,6 +21224,8 @@ class FabricText extends StyledText {
|
|
|
21174
21224
|
if (textAlign === JUSTIFY_RIGHT) {
|
|
21175
21225
|
leftOffset = lineDiff;
|
|
21176
21226
|
}
|
|
21227
|
+
|
|
21228
|
+
// Apply RTL adjustments for non-justify alignments
|
|
21177
21229
|
if (direction === 'rtl') {
|
|
21178
21230
|
if (textAlign === RIGHT || textAlign === JUSTIFY || textAlign === JUSTIFY_RIGHT) {
|
|
21179
21231
|
leftOffset = 0;
|
|
@@ -21186,8 +21238,8 @@ class FabricText extends StyledText {
|
|
|
21186
21238
|
return leftOffset;
|
|
21187
21239
|
}
|
|
21188
21240
|
|
|
21189
|
-
/**
|
|
21190
|
-
* @private
|
|
21241
|
+
/**
|
|
21242
|
+
* @private
|
|
21191
21243
|
*/
|
|
21192
21244
|
_clearCache() {
|
|
21193
21245
|
this._forceClearCache = false;
|
|
@@ -21196,12 +21248,12 @@ class FabricText extends StyledText {
|
|
|
21196
21248
|
this.__charBounds = [];
|
|
21197
21249
|
}
|
|
21198
21250
|
|
|
21199
|
-
/**
|
|
21200
|
-
* Measure a single line given its index. Used to calculate the initial
|
|
21201
|
-
* text bounding box. The values are calculated and stored in __lineWidths cache.
|
|
21202
|
-
* @private
|
|
21203
|
-
* @param {Number} lineIndex line number
|
|
21204
|
-
* @return {Number} Line width
|
|
21251
|
+
/**
|
|
21252
|
+
* Measure a single line given its index. Used to calculate the initial
|
|
21253
|
+
* text bounding box. The values are calculated and stored in __lineWidths cache.
|
|
21254
|
+
* @private
|
|
21255
|
+
* @param {Number} lineIndex line number
|
|
21256
|
+
* @return {Number} Line width
|
|
21205
21257
|
*/
|
|
21206
21258
|
getLineWidth(lineIndex) {
|
|
21207
21259
|
if (this.__lineWidths[lineIndex] !== undefined) {
|
|
@@ -21220,12 +21272,12 @@ class FabricText extends StyledText {
|
|
|
21220
21272
|
return 0;
|
|
21221
21273
|
}
|
|
21222
21274
|
|
|
21223
|
-
/**
|
|
21224
|
-
* Retrieves the value of property at given character position
|
|
21225
|
-
* @param {Number} lineIndex the line number
|
|
21226
|
-
* @param {Number} charIndex the character number
|
|
21227
|
-
* @param {String} property the property name
|
|
21228
|
-
* @returns the value of 'property'
|
|
21275
|
+
/**
|
|
21276
|
+
* Retrieves the value of property at given character position
|
|
21277
|
+
* @param {Number} lineIndex the line number
|
|
21278
|
+
* @param {Number} charIndex the character number
|
|
21279
|
+
* @param {String} property the property name
|
|
21280
|
+
* @returns the value of 'property'
|
|
21229
21281
|
*/
|
|
21230
21282
|
getValueOfPropertyAt(lineIndex, charIndex, property) {
|
|
21231
21283
|
var _charStyle$property;
|
|
@@ -21233,9 +21285,9 @@ class FabricText extends StyledText {
|
|
|
21233
21285
|
return (_charStyle$property = charStyle[property]) !== null && _charStyle$property !== void 0 ? _charStyle$property : this[property];
|
|
21234
21286
|
}
|
|
21235
21287
|
|
|
21236
|
-
/**
|
|
21237
|
-
* @private
|
|
21238
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21288
|
+
/**
|
|
21289
|
+
* @private
|
|
21290
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21239
21291
|
*/
|
|
21240
21292
|
_renderTextDecoration(ctx, type) {
|
|
21241
21293
|
if (!this[type] && !this.styleHas(type)) {
|
|
@@ -21319,10 +21371,10 @@ class FabricText extends StyledText {
|
|
|
21319
21371
|
this._removeShadow(ctx);
|
|
21320
21372
|
}
|
|
21321
21373
|
|
|
21322
|
-
/**
|
|
21323
|
-
* return font declaration string for canvas context
|
|
21324
|
-
* @param {Object} [styleObject] object
|
|
21325
|
-
* @returns {String} font declaration formatted for canvas context.
|
|
21374
|
+
/**
|
|
21375
|
+
* return font declaration string for canvas context
|
|
21376
|
+
* @param {Object} [styleObject] object
|
|
21377
|
+
* @returns {String} font declaration formatted for canvas context.
|
|
21326
21378
|
*/
|
|
21327
21379
|
_getFontDeclaration() {
|
|
21328
21380
|
let {
|
|
@@ -21336,9 +21388,9 @@ class FabricText extends StyledText {
|
|
|
21336
21388
|
return [fontStyle, fontWeight, `${forMeasuring ? this.CACHE_FONT_SIZE : fontSize}px`, parsedFontFamily].join(' ');
|
|
21337
21389
|
}
|
|
21338
21390
|
|
|
21339
|
-
/**
|
|
21340
|
-
* Renders text instance on a specified context
|
|
21341
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21391
|
+
/**
|
|
21392
|
+
* Renders text instance on a specified context
|
|
21393
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
21342
21394
|
*/
|
|
21343
21395
|
render(ctx) {
|
|
21344
21396
|
if (!this.visible) {
|
|
@@ -21353,22 +21405,22 @@ class FabricText extends StyledText {
|
|
|
21353
21405
|
super.render(ctx);
|
|
21354
21406
|
}
|
|
21355
21407
|
|
|
21356
|
-
/**
|
|
21357
|
-
* Override this method to customize grapheme splitting
|
|
21358
|
-
* @todo the util `graphemeSplit` needs to be injectable in some way.
|
|
21359
|
-
* is more comfortable to inject the correct util rather than having to override text
|
|
21360
|
-
* in the middle of the prototype chain
|
|
21361
|
-
* @param {string} value
|
|
21362
|
-
* @returns {string[]} array of graphemes
|
|
21408
|
+
/**
|
|
21409
|
+
* Override this method to customize grapheme splitting
|
|
21410
|
+
* @todo the util `graphemeSplit` needs to be injectable in some way.
|
|
21411
|
+
* is more comfortable to inject the correct util rather than having to override text
|
|
21412
|
+
* in the middle of the prototype chain
|
|
21413
|
+
* @param {string} value
|
|
21414
|
+
* @returns {string[]} array of graphemes
|
|
21363
21415
|
*/
|
|
21364
21416
|
graphemeSplit(value) {
|
|
21365
21417
|
return graphemeSplit(value);
|
|
21366
21418
|
}
|
|
21367
21419
|
|
|
21368
|
-
/**
|
|
21369
|
-
* Returns the text as an array of lines.
|
|
21370
|
-
* @param {String} text text to split
|
|
21371
|
-
* @returns Lines in the text
|
|
21420
|
+
/**
|
|
21421
|
+
* Returns the text as an array of lines.
|
|
21422
|
+
* @param {String} text text to split
|
|
21423
|
+
* @returns Lines in the text
|
|
21372
21424
|
*/
|
|
21373
21425
|
_splitTextIntoLines(text) {
|
|
21374
21426
|
const lines = text.split(this._reNewline),
|
|
@@ -21388,10 +21440,10 @@ class FabricText extends StyledText {
|
|
|
21388
21440
|
};
|
|
21389
21441
|
}
|
|
21390
21442
|
|
|
21391
|
-
/**
|
|
21392
|
-
* Returns object representation of an instance
|
|
21393
|
-
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
21394
|
-
* @return {Object} Object representation of an instance
|
|
21443
|
+
/**
|
|
21444
|
+
* Returns object representation of an instance
|
|
21445
|
+
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
21446
|
+
* @return {Object} Object representation of an instance
|
|
21395
21447
|
*/
|
|
21396
21448
|
toObject() {
|
|
21397
21449
|
let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
@@ -21434,23 +21486,23 @@ class FabricText extends StyledText {
|
|
|
21434
21486
|
return this;
|
|
21435
21487
|
}
|
|
21436
21488
|
|
|
21437
|
-
/**
|
|
21438
|
-
* Returns complexity of an instance
|
|
21439
|
-
* @return {Number} complexity
|
|
21489
|
+
/**
|
|
21490
|
+
* Returns complexity of an instance
|
|
21491
|
+
* @return {Number} complexity
|
|
21440
21492
|
*/
|
|
21441
21493
|
complexity() {
|
|
21442
21494
|
return 1;
|
|
21443
21495
|
}
|
|
21444
21496
|
|
|
21445
|
-
/**
|
|
21446
|
-
* List of generic font families
|
|
21447
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
|
|
21497
|
+
/**
|
|
21498
|
+
* List of generic font families
|
|
21499
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
|
|
21448
21500
|
*/
|
|
21449
21501
|
|
|
21450
|
-
/**
|
|
21451
|
-
* Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
|
|
21452
|
-
* @param {HTMLElement} element Element to parse
|
|
21453
|
-
* @param {Object} [options] Options object
|
|
21502
|
+
/**
|
|
21503
|
+
* Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
|
|
21504
|
+
* @param {HTMLElement} element Element to parse
|
|
21505
|
+
* @param {Object} [options] Options object
|
|
21454
21506
|
*/
|
|
21455
21507
|
static async fromElement(element, options, cssRules) {
|
|
21456
21508
|
const parsedAttributes = parseAttributes(element, FabricText.ATTRIBUTE_NAMES, cssRules);
|
|
@@ -21489,10 +21541,10 @@ class FabricText extends StyledText {
|
|
|
21489
21541
|
scaledDiff = lineHeightDiff * textHeightScaleFactor,
|
|
21490
21542
|
textHeight = text.getScaledHeight() + scaledDiff;
|
|
21491
21543
|
let offX = 0;
|
|
21492
|
-
/*
|
|
21493
|
-
Adjust positioning:
|
|
21494
|
-
x/y attributes in SVG correspond to the bottom-left corner of text bounding box
|
|
21495
|
-
fabric output by default at top, left.
|
|
21544
|
+
/*
|
|
21545
|
+
Adjust positioning:
|
|
21546
|
+
x/y attributes in SVG correspond to the bottom-left corner of text bounding box
|
|
21547
|
+
fabric output by default at top, left.
|
|
21496
21548
|
*/
|
|
21497
21549
|
if (textAnchor === CENTER) {
|
|
21498
21550
|
offX = text.getScaledWidth() / 2;
|
|
@@ -21510,10 +21562,10 @@ class FabricText extends StyledText {
|
|
|
21510
21562
|
|
|
21511
21563
|
/* _FROM_SVG_END_ */
|
|
21512
21564
|
|
|
21513
|
-
/**
|
|
21514
|
-
* Returns FabricText instance from an object representation
|
|
21515
|
-
* @param {Object} object plain js Object to create an instance from
|
|
21516
|
-
* @returns {Promise<FabricText>}
|
|
21565
|
+
/**
|
|
21566
|
+
* Returns FabricText instance from an object representation
|
|
21567
|
+
* @param {Object} object plain js Object to create an instance from
|
|
21568
|
+
* @returns {Promise<FabricText>}
|
|
21517
21569
|
*/
|
|
21518
21570
|
static fromObject(object) {
|
|
21519
21571
|
return this._fromObject({
|
|
@@ -21524,10 +21576,10 @@ class FabricText extends StyledText {
|
|
|
21524
21576
|
});
|
|
21525
21577
|
}
|
|
21526
21578
|
}
|
|
21527
|
-
/**
|
|
21528
|
-
* Properties that requires a text layout recalculation when changed
|
|
21529
|
-
* @type string[]
|
|
21530
|
-
* @protected
|
|
21579
|
+
/**
|
|
21580
|
+
* Properties that requires a text layout recalculation when changed
|
|
21581
|
+
* @type string[]
|
|
21582
|
+
* @protected
|
|
21531
21583
|
*/
|
|
21532
21584
|
_defineProperty(FabricText, "textLayoutProperties", textLayoutProperties);
|
|
21533
21585
|
_defineProperty(FabricText, "cacheProperties", [...cacheProperties, ...additionalProps]);
|
|
@@ -21535,9 +21587,9 @@ _defineProperty(FabricText, "ownDefaults", textDefaultValues);
|
|
|
21535
21587
|
_defineProperty(FabricText, "type", 'Text');
|
|
21536
21588
|
_defineProperty(FabricText, "genericFonts", ['serif', 'sans-serif', 'monospace', 'cursive', 'fantasy', 'system-ui', 'ui-serif', 'ui-sans-serif', 'ui-monospace', 'ui-rounded', 'math', 'emoji', 'fangsong']);
|
|
21537
21589
|
/* _FROM_SVG_START_ */
|
|
21538
|
-
/**
|
|
21539
|
-
* List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
|
|
21540
|
-
* @see: http://www.w3.org/TR/SVG/text.html#TextElement
|
|
21590
|
+
/**
|
|
21591
|
+
* List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
|
|
21592
|
+
* @see: http://www.w3.org/TR/SVG/text.html#TextElement
|
|
21541
21593
|
*/
|
|
21542
21594
|
_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'));
|
|
21543
21595
|
applyMixins(FabricText, [TextSVGExportMixin]);
|
|
@@ -21924,8 +21976,8 @@ class OverlayEditor {
|
|
|
21924
21976
|
// We don't need to save/restore them here as it would conflict with IText's restoration
|
|
21925
21977
|
}
|
|
21926
21978
|
|
|
21927
|
-
/**
|
|
21928
|
-
* Get the container element for the overlay (parent of upperCanvasEl)
|
|
21979
|
+
/**
|
|
21980
|
+
* Get the container element for the overlay (parent of upperCanvasEl)
|
|
21929
21981
|
*/
|
|
21930
21982
|
getCanvasContainer() {
|
|
21931
21983
|
const upperCanvas = this.canvas.upperCanvasEl;
|
|
@@ -21939,8 +21991,8 @@ class OverlayEditor {
|
|
|
21939
21991
|
return container;
|
|
21940
21992
|
}
|
|
21941
21993
|
|
|
21942
|
-
/**
|
|
21943
|
-
* Create the overlay DOM structure
|
|
21994
|
+
/**
|
|
21995
|
+
* Create the overlay DOM structure
|
|
21944
21996
|
*/
|
|
21945
21997
|
createOverlayDOM() {
|
|
21946
21998
|
// Host div for positioning and overflow control
|
|
@@ -21995,8 +22047,8 @@ class OverlayEditor {
|
|
|
21995
22047
|
document.body.appendChild(this.hostDiv);
|
|
21996
22048
|
}
|
|
21997
22049
|
|
|
21998
|
-
/**
|
|
21999
|
-
* Attach all event listeners
|
|
22050
|
+
/**
|
|
22051
|
+
* Attach all event listeners
|
|
22000
22052
|
*/
|
|
22001
22053
|
attachEventListeners() {
|
|
22002
22054
|
// Textarea events
|
|
@@ -22016,8 +22068,8 @@ class OverlayEditor {
|
|
|
22016
22068
|
this.setupViewportChangeDetection();
|
|
22017
22069
|
}
|
|
22018
22070
|
|
|
22019
|
-
/**
|
|
22020
|
-
* Remove all event listeners
|
|
22071
|
+
/**
|
|
22072
|
+
* Remove all event listeners
|
|
22021
22073
|
*/
|
|
22022
22074
|
removeEventListeners() {
|
|
22023
22075
|
this.textarea.removeEventListener('input', this.boundHandlers.onInput);
|
|
@@ -22034,16 +22086,16 @@ class OverlayEditor {
|
|
|
22034
22086
|
this.restoreViewportChangeDetection();
|
|
22035
22087
|
}
|
|
22036
22088
|
|
|
22037
|
-
/**
|
|
22038
|
-
* Simple method to refresh positioning when canvas changes
|
|
22089
|
+
/**
|
|
22090
|
+
* Simple method to refresh positioning when canvas changes
|
|
22039
22091
|
*/
|
|
22040
22092
|
updatePosition() {
|
|
22041
22093
|
this.applyOverlayStyle();
|
|
22042
22094
|
}
|
|
22043
22095
|
|
|
22044
|
-
/**
|
|
22045
|
-
* Update the Fabric object bounds to match current textarea size
|
|
22046
|
-
* This ensures Fabric.js selection controls follow the growing textbox
|
|
22096
|
+
/**
|
|
22097
|
+
* Update the Fabric object bounds to match current textarea size
|
|
22098
|
+
* This ensures Fabric.js selection controls follow the growing textbox
|
|
22047
22099
|
*/
|
|
22048
22100
|
updateObjectBounds() {
|
|
22049
22101
|
if (this.isDestroyed) return;
|
|
@@ -22077,15 +22129,15 @@ class OverlayEditor {
|
|
|
22077
22129
|
}
|
|
22078
22130
|
}
|
|
22079
22131
|
|
|
22080
|
-
/**
|
|
22081
|
-
* Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
|
|
22132
|
+
/**
|
|
22133
|
+
* Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
|
|
22082
22134
|
*/
|
|
22083
22135
|
letterSpacingPx(charSpacing, fontSize) {
|
|
22084
22136
|
return charSpacing / 1000 * fontSize;
|
|
22085
22137
|
}
|
|
22086
22138
|
|
|
22087
|
-
/**
|
|
22088
|
-
* Detect text direction using first strong directional character
|
|
22139
|
+
/**
|
|
22140
|
+
* Detect text direction using first strong directional character
|
|
22089
22141
|
*/
|
|
22090
22142
|
firstStrongDir(text) {
|
|
22091
22143
|
// Hebrew: \u0590-\u05FF, Arabic: \u0600-\u06FF, \u0750-\u077F, \uFB50-\uFDFF, \uFE70-\uFEFF
|
|
@@ -22169,13 +22221,86 @@ class OverlayEditor {
|
|
|
22169
22221
|
this.textarea.style.fontFamily = target.fontFamily || 'Arial';
|
|
22170
22222
|
this.textarea.style.fontWeight = String(target.fontWeight || 'normal');
|
|
22171
22223
|
this.textarea.style.fontStyle = target.fontStyle || 'normal';
|
|
22172
|
-
|
|
22224
|
+
// Handle text alignment and justification
|
|
22225
|
+
const textAlign = target.textAlign || 'left';
|
|
22226
|
+
let cssTextAlign = textAlign;
|
|
22227
|
+
|
|
22228
|
+
// Detect text direction from content for proper justify handling
|
|
22229
|
+
const autoDetectedDirection = this.firstStrongDir(this.textarea.value || '');
|
|
22230
|
+
|
|
22231
|
+
// DEBUG: Log alignment details
|
|
22232
|
+
console.log('🔍 ALIGNMENT DEBUG:');
|
|
22233
|
+
console.log(' Fabric textAlign:', textAlign);
|
|
22234
|
+
console.log(' Fabric direction:', target.direction);
|
|
22235
|
+
console.log(' Text content:', JSON.stringify(target.text));
|
|
22236
|
+
console.log(' Detected direction:', autoDetectedDirection);
|
|
22237
|
+
|
|
22238
|
+
// Map fabric.js justify to CSS
|
|
22239
|
+
if (textAlign.includes('justify')) {
|
|
22240
|
+
// Try to match fabric.js justify behavior more precisely
|
|
22241
|
+
try {
|
|
22242
|
+
// For justify, we need to replicate fabric.js space expansion
|
|
22243
|
+
// Use CSS justify but with specific settings to match fabric.js better
|
|
22244
|
+
cssTextAlign = 'justify';
|
|
22245
|
+
|
|
22246
|
+
// Set text-align-last based on justify type and detected direction
|
|
22247
|
+
// Smart justify: respect detected direction even when fabric alignment doesn't match
|
|
22248
|
+
if (textAlign === 'justify') {
|
|
22249
|
+
this.textarea.style.textAlignLast = autoDetectedDirection === 'rtl' ? 'right' : 'left';
|
|
22250
|
+
} else if (textAlign === 'justify-left') {
|
|
22251
|
+
// If text is RTL but fabric says justify-left, override to justify-right for better UX
|
|
22252
|
+
if (autoDetectedDirection === 'rtl') {
|
|
22253
|
+
this.textarea.style.textAlignLast = 'right';
|
|
22254
|
+
console.log(' → Overrode justify-left to justify-right for RTL text');
|
|
22255
|
+
} else {
|
|
22256
|
+
this.textarea.style.textAlignLast = 'left';
|
|
22257
|
+
}
|
|
22258
|
+
} else if (textAlign === 'justify-right') {
|
|
22259
|
+
// If text is LTR but fabric says justify-right, override to justify-left for better UX
|
|
22260
|
+
if (autoDetectedDirection === 'ltr') {
|
|
22261
|
+
this.textarea.style.textAlignLast = 'left';
|
|
22262
|
+
console.log(' → Overrode justify-right to justify-left for LTR text');
|
|
22263
|
+
} else {
|
|
22264
|
+
this.textarea.style.textAlignLast = 'right';
|
|
22265
|
+
}
|
|
22266
|
+
} else if (textAlign === 'justify-center') {
|
|
22267
|
+
this.textarea.style.textAlignLast = 'center';
|
|
22268
|
+
}
|
|
22269
|
+
|
|
22270
|
+
// Enhanced justify settings for better fabric.js matching
|
|
22271
|
+
this.textarea.style.textJustify = 'inter-word';
|
|
22272
|
+
this.textarea.style.wordSpacing = 'normal';
|
|
22273
|
+
|
|
22274
|
+
// Additional CSS properties for better justify matching
|
|
22275
|
+
this.textarea.style.textAlign = 'justify';
|
|
22276
|
+
this.textarea.style.textAlignLast = this.textarea.style.textAlignLast;
|
|
22277
|
+
|
|
22278
|
+
// Try to force better justify behavior
|
|
22279
|
+
this.textarea.style.textJustifyTrim = 'none';
|
|
22280
|
+
this.textarea.style.textAutospace = 'none';
|
|
22281
|
+
console.log(' → Applied justify alignment:', textAlign, 'with last-line:', this.textarea.style.textAlignLast);
|
|
22282
|
+
} catch (error) {
|
|
22283
|
+
console.warn(' → Justify setup failed, falling back to standard alignment:', error);
|
|
22284
|
+
cssTextAlign = textAlign.replace('justify-', '').replace('justify', 'left');
|
|
22285
|
+
}
|
|
22286
|
+
} else {
|
|
22287
|
+
this.textarea.style.textAlignLast = 'auto';
|
|
22288
|
+
this.textarea.style.textJustify = 'auto';
|
|
22289
|
+
this.textarea.style.wordSpacing = 'normal';
|
|
22290
|
+
console.log(' → Applied standard alignment:', cssTextAlign);
|
|
22291
|
+
}
|
|
22292
|
+
this.textarea.style.textAlign = cssTextAlign;
|
|
22173
22293
|
this.textarea.style.color = ((_target$fill = target.fill) === null || _target$fill === void 0 ? void 0 : _target$fill.toString()) || '#000';
|
|
22174
22294
|
this.textarea.style.letterSpacing = `${letterSpacingPx}px`;
|
|
22175
|
-
|
|
22295
|
+
|
|
22296
|
+
// Use the already detected direction from above
|
|
22297
|
+
const fabricDirection = target.direction;
|
|
22298
|
+
|
|
22299
|
+
// Use auto-detected direction for better BiDi support, but respect fabric direction if it makes sense
|
|
22300
|
+
this.textarea.style.direction = autoDetectedDirection || fabricDirection || 'ltr';
|
|
22176
22301
|
this.textarea.style.fontVariant = 'normal';
|
|
22177
22302
|
this.textarea.style.fontStretch = 'normal';
|
|
22178
|
-
this.textarea.style.textRendering = 'optimizeLegibility'
|
|
22303
|
+
this.textarea.style.textRendering = 'auto'; // Changed from 'optimizeLegibility' to match canvas
|
|
22179
22304
|
this.textarea.style.fontKerning = 'normal';
|
|
22180
22305
|
this.textarea.style.fontFeatureSettings = 'normal';
|
|
22181
22306
|
this.textarea.style.fontVariationSettings = 'normal';
|
|
@@ -22186,20 +22311,64 @@ class OverlayEditor {
|
|
|
22186
22311
|
this.textarea.style.overflowWrap = 'break-word';
|
|
22187
22312
|
this.textarea.style.whiteSpace = 'pre-wrap';
|
|
22188
22313
|
this.textarea.style.hyphens = 'none';
|
|
22189
|
-
this.textarea.style.webkitFontSmoothing = 'antialiased';
|
|
22190
|
-
this.textarea.style.mozOsxFontSmoothing = 'grayscale';
|
|
22191
22314
|
|
|
22192
|
-
//
|
|
22193
|
-
|
|
22315
|
+
// DEBUG: Log final CSS properties
|
|
22316
|
+
console.log('🎨 FINAL TEXTAREA CSS:');
|
|
22317
|
+
console.log(' textAlign:', this.textarea.style.textAlign);
|
|
22318
|
+
console.log(' textAlignLast:', this.textarea.style.textAlignLast);
|
|
22319
|
+
console.log(' direction:', this.textarea.style.direction);
|
|
22320
|
+
console.log(' unicodeBidi:', this.textarea.style.unicodeBidi);
|
|
22321
|
+
console.log(' width:', this.textarea.style.width);
|
|
22322
|
+
console.log(' textJustify:', this.textarea.style.textJustify);
|
|
22323
|
+
console.log(' wordSpacing:', this.textarea.style.wordSpacing);
|
|
22324
|
+
console.log(' whiteSpace:', this.textarea.style.whiteSpace);
|
|
22325
|
+
|
|
22326
|
+
// If justify, log Fabric object dimensions for comparison
|
|
22327
|
+
if (textAlign.includes('justify')) {
|
|
22328
|
+
var _calcTextWidth, _ref;
|
|
22329
|
+
console.log('🔧 FABRIC OBJECT JUSTIFY INFO:');
|
|
22330
|
+
console.log(' Fabric width:', target.width);
|
|
22331
|
+
console.log(' Fabric calcTextWidth:', (_calcTextWidth = (_ref = target).calcTextWidth) === null || _calcTextWidth === void 0 ? void 0 : _calcTextWidth.call(_ref));
|
|
22332
|
+
console.log(' Fabric textAlign:', target.textAlign);
|
|
22333
|
+
console.log(' Text lines:', target.textLines);
|
|
22334
|
+
}
|
|
22335
|
+
|
|
22336
|
+
// Debug font properties matching
|
|
22337
|
+
console.log('🔤 FONT PROPERTIES COMPARISON:');
|
|
22338
|
+
console.log(' Fabric fontFamily:', target.fontFamily);
|
|
22339
|
+
console.log(' Fabric fontWeight:', target.fontWeight);
|
|
22340
|
+
console.log(' Fabric fontStyle:', target.fontStyle);
|
|
22341
|
+
console.log(' Fabric fontSize:', target.fontSize);
|
|
22342
|
+
console.log(' → Textarea fontFamily:', this.textarea.style.fontFamily);
|
|
22343
|
+
console.log(' → Textarea fontWeight:', this.textarea.style.fontWeight);
|
|
22344
|
+
console.log(' → Textarea fontStyle:', this.textarea.style.fontStyle);
|
|
22345
|
+
console.log(' → Textarea fontSize:', this.textarea.style.fontSize);
|
|
22346
|
+
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
22194
22347
|
|
|
22195
|
-
//
|
|
22196
|
-
|
|
22348
|
+
// Enhanced font rendering to better match fabric.js canvas rendering
|
|
22349
|
+
// Default to auto for more natural rendering
|
|
22350
|
+
this.textarea.style.webkitFontSmoothing = 'auto';
|
|
22351
|
+
this.textarea.style.mozOsxFontSmoothing = 'auto';
|
|
22352
|
+
this.textarea.style.fontSmooth = 'auto';
|
|
22353
|
+
this.textarea.style.textSizeAdjust = 'none';
|
|
22354
|
+
|
|
22355
|
+
// For bold fonts, use subpixel rendering to match canvas thickness better
|
|
22356
|
+
const fontWeight = String(target.fontWeight || 'normal');
|
|
22357
|
+
const isBold = fontWeight === 'bold' || fontWeight === '700' || parseInt(fontWeight) >= 600;
|
|
22358
|
+
if (isBold) {
|
|
22359
|
+
this.textarea.style.webkitFontSmoothing = 'subpixel-antialiased';
|
|
22360
|
+
this.textarea.style.mozOsxFontSmoothing = 'unset';
|
|
22361
|
+
console.log('🔤 Applied enhanced bold rendering for better thickness matching');
|
|
22362
|
+
}
|
|
22363
|
+
console.log('🎨 FONT SMOOTHING APPLIED:');
|
|
22364
|
+
console.log(' webkitFontSmoothing:', this.textarea.style.webkitFontSmoothing);
|
|
22365
|
+
console.log(' mozOsxFontSmoothing:', this.textarea.style.mozOsxFontSmoothing);
|
|
22197
22366
|
|
|
22198
22367
|
// Initial bounds are set correctly by Fabric.js - don't force update here
|
|
22199
22368
|
}
|
|
22200
22369
|
|
|
22201
|
-
/**
|
|
22202
|
-
* Debug method to compare textarea and canvas object bounding boxes
|
|
22370
|
+
/**
|
|
22371
|
+
* Debug method to compare textarea and canvas object bounding boxes
|
|
22203
22372
|
*/
|
|
22204
22373
|
debugBoundingBoxComparison() {
|
|
22205
22374
|
const target = this.target;
|
|
@@ -22269,8 +22438,8 @@ class OverlayEditor {
|
|
|
22269
22438
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
22270
22439
|
}
|
|
22271
22440
|
|
|
22272
|
-
/**
|
|
22273
|
-
* Debug method to compare text wrapping between textarea and Fabric text object
|
|
22441
|
+
/**
|
|
22442
|
+
* Debug method to compare text wrapping between textarea and Fabric text object
|
|
22274
22443
|
*/
|
|
22275
22444
|
debugTextWrapping() {
|
|
22276
22445
|
const target = this.target;
|
|
@@ -22355,8 +22524,8 @@ class OverlayEditor {
|
|
|
22355
22524
|
console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
|
|
22356
22525
|
}
|
|
22357
22526
|
|
|
22358
|
-
/**
|
|
22359
|
-
* Focus the textarea and position cursor at end
|
|
22527
|
+
/**
|
|
22528
|
+
* Focus the textarea and position cursor at end
|
|
22360
22529
|
*/
|
|
22361
22530
|
focusTextarea() {
|
|
22362
22531
|
// For overlay editing, we want to keep the object in "selection mode" not "editing mode"
|
|
@@ -22391,8 +22560,8 @@ class OverlayEditor {
|
|
|
22391
22560
|
this.canvas.requestRenderAll();
|
|
22392
22561
|
}
|
|
22393
22562
|
|
|
22394
|
-
/**
|
|
22395
|
-
* Refresh overlay positioning and styling
|
|
22563
|
+
/**
|
|
22564
|
+
* Refresh overlay positioning and styling
|
|
22396
22565
|
*/
|
|
22397
22566
|
refresh() {
|
|
22398
22567
|
if (this.isDestroyed) return;
|
|
@@ -22400,8 +22569,8 @@ class OverlayEditor {
|
|
|
22400
22569
|
// Don't update object bounds on every refresh - only when textarea actually resizes
|
|
22401
22570
|
}
|
|
22402
22571
|
|
|
22403
|
-
/**
|
|
22404
|
-
* Destroy the overlay editor
|
|
22572
|
+
/**
|
|
22573
|
+
* Destroy the overlay editor
|
|
22405
22574
|
*/
|
|
22406
22575
|
destroy() {
|
|
22407
22576
|
let commit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
@@ -22428,6 +22597,23 @@ class OverlayEditor {
|
|
|
22428
22597
|
// Handle commit/cancel after restoring visibility
|
|
22429
22598
|
if (commit && !this.isComposing) {
|
|
22430
22599
|
const finalText = this.textarea.value;
|
|
22600
|
+
|
|
22601
|
+
// Auto-detect text direction and update fabric object if needed
|
|
22602
|
+
const detectedDirection = this.firstStrongDir(finalText);
|
|
22603
|
+
const currentDirection = this.target.direction || 'ltr';
|
|
22604
|
+
if (detectedDirection && detectedDirection !== currentDirection) {
|
|
22605
|
+
console.log(`🔄 Overlay Exit: Auto-detected direction change from "${currentDirection}" to "${detectedDirection}"`);
|
|
22606
|
+
console.log(` Text content: "${finalText.substring(0, 50)}..."`);
|
|
22607
|
+
|
|
22608
|
+
// Update the fabric object's direction
|
|
22609
|
+
this.target.set('direction', detectedDirection);
|
|
22610
|
+
|
|
22611
|
+
// Force a re-render to apply the direction change
|
|
22612
|
+
this.canvas.requestRenderAll();
|
|
22613
|
+
console.log(`✅ Fabric object direction updated to: ${detectedDirection}`);
|
|
22614
|
+
} else {
|
|
22615
|
+
console.log(`📝 Overlay Exit: Direction unchanged (${currentDirection}), text: "${finalText.substring(0, 30)}..."`);
|
|
22616
|
+
}
|
|
22431
22617
|
if (this.onCommit) {
|
|
22432
22618
|
this.onCommit(finalText);
|
|
22433
22619
|
}
|
|
@@ -22552,8 +22738,8 @@ class OverlayEditor {
|
|
|
22552
22738
|
}
|
|
22553
22739
|
}
|
|
22554
22740
|
|
|
22555
|
-
/**
|
|
22556
|
-
* Setup detection for viewport changes (zoom/pan)
|
|
22741
|
+
/**
|
|
22742
|
+
* Setup detection for viewport changes (zoom/pan)
|
|
22557
22743
|
*/
|
|
22558
22744
|
setupViewportChangeDetection() {
|
|
22559
22745
|
// Store original methods
|
|
@@ -22582,8 +22768,8 @@ class OverlayEditor {
|
|
|
22582
22768
|
};
|
|
22583
22769
|
}
|
|
22584
22770
|
|
|
22585
|
-
/**
|
|
22586
|
-
* Restore original viewport methods
|
|
22771
|
+
/**
|
|
22772
|
+
* Restore original viewport methods
|
|
22587
22773
|
*/
|
|
22588
22774
|
restoreViewportChangeDetection() {
|
|
22589
22775
|
if (this.canvas.__originalSetZoom) {
|
|
@@ -22598,8 +22784,8 @@ class OverlayEditor {
|
|
|
22598
22784
|
}
|
|
22599
22785
|
}
|
|
22600
22786
|
|
|
22601
|
-
/**
|
|
22602
|
-
* Enter overlay text editing mode for a text object
|
|
22787
|
+
/**
|
|
22788
|
+
* Enter overlay text editing mode for a text object
|
|
22603
22789
|
*/
|
|
22604
22790
|
function enterTextOverlayEdit(canvas, target, options) {
|
|
22605
22791
|
// If already in overlay editing, destroy existing editor first
|
|
@@ -22623,35 +22809,35 @@ function enterTextOverlayEdit(canvas, target, options) {
|
|
|
22623
22809
|
return editor;
|
|
22624
22810
|
}
|
|
22625
22811
|
|
|
22626
|
-
/**
|
|
22627
|
-
* extend this regex to support non english languages
|
|
22628
|
-
*
|
|
22629
|
-
* - ` ` Matches a SPACE character (char code 32).
|
|
22630
|
-
* - `\n` Matches a LINE FEED character (char code 10).
|
|
22631
|
-
* - `.` Matches a "." character (char code 46).
|
|
22632
|
-
* - `,` Matches a "," character (char code 44).
|
|
22633
|
-
* - `;` Matches a ";" character (char code 59).
|
|
22634
|
-
* - `!` Matches a "!" character (char code 33).
|
|
22635
|
-
* - `\?` Matches a "?" character (char code 63).
|
|
22636
|
-
* - `\-` Matches a "-" character (char code 45).
|
|
22812
|
+
/**
|
|
22813
|
+
* extend this regex to support non english languages
|
|
22814
|
+
*
|
|
22815
|
+
* - ` ` Matches a SPACE character (char code 32).
|
|
22816
|
+
* - `\n` Matches a LINE FEED character (char code 10).
|
|
22817
|
+
* - `.` Matches a "." character (char code 46).
|
|
22818
|
+
* - `,` Matches a "," character (char code 44).
|
|
22819
|
+
* - `;` Matches a ";" character (char code 59).
|
|
22820
|
+
* - `!` Matches a "!" character (char code 33).
|
|
22821
|
+
* - `\?` Matches a "?" character (char code 63).
|
|
22822
|
+
* - `\-` Matches a "-" character (char code 45).
|
|
22637
22823
|
*/
|
|
22638
22824
|
// eslint-disable-next-line no-useless-escape
|
|
22639
22825
|
const reNonWord = /[ \n\.,;!\?\-]/;
|
|
22640
22826
|
class ITextBehavior extends FabricText {
|
|
22641
22827
|
constructor() {
|
|
22642
22828
|
super(...arguments);
|
|
22643
|
-
/**
|
|
22644
|
-
* Helps determining when the text is in composition, so that the cursor
|
|
22645
|
-
* rendering is altered.
|
|
22829
|
+
/**
|
|
22830
|
+
* Helps determining when the text is in composition, so that the cursor
|
|
22831
|
+
* rendering is altered.
|
|
22646
22832
|
*/
|
|
22647
22833
|
_defineProperty(this, "_currentCursorOpacity", 1);
|
|
22648
22834
|
}
|
|
22649
|
-
/**
|
|
22650
|
-
* Keeps track if the IText object was selected before the actual click.
|
|
22651
|
-
* This because we want to delay enter editing by a click.
|
|
22835
|
+
/**
|
|
22836
|
+
* Keeps track if the IText object was selected before the actual click.
|
|
22837
|
+
* This because we want to delay enter editing by a click.
|
|
22652
22838
|
*/
|
|
22653
|
-
/**
|
|
22654
|
-
* Initializes all the interactive behavior of IText
|
|
22839
|
+
/**
|
|
22840
|
+
* Initializes all the interactive behavior of IText
|
|
22655
22841
|
*/
|
|
22656
22842
|
initBehavior() {
|
|
22657
22843
|
this._tick = this._tick.bind(this);
|
|
@@ -22664,8 +22850,8 @@ class ITextBehavior extends FabricText {
|
|
|
22664
22850
|
return super.onDeselect(options);
|
|
22665
22851
|
}
|
|
22666
22852
|
|
|
22667
|
-
/**
|
|
22668
|
-
* @private
|
|
22853
|
+
/**
|
|
22854
|
+
* @private
|
|
22669
22855
|
*/
|
|
22670
22856
|
_animateCursor(_ref) {
|
|
22671
22857
|
let {
|
|
@@ -22690,8 +22876,8 @@ class ITextBehavior extends FabricText {
|
|
|
22690
22876
|
});
|
|
22691
22877
|
}
|
|
22692
22878
|
|
|
22693
|
-
/**
|
|
22694
|
-
* changes the cursor from visible to invisible
|
|
22879
|
+
/**
|
|
22880
|
+
* changes the cursor from visible to invisible
|
|
22695
22881
|
*/
|
|
22696
22882
|
_tick(delay) {
|
|
22697
22883
|
this._currentTickState = this._animateCursor({
|
|
@@ -22702,8 +22888,8 @@ class ITextBehavior extends FabricText {
|
|
|
22702
22888
|
});
|
|
22703
22889
|
}
|
|
22704
22890
|
|
|
22705
|
-
/**
|
|
22706
|
-
* Changes the cursor from invisible to visible
|
|
22891
|
+
/**
|
|
22892
|
+
* Changes the cursor from invisible to visible
|
|
22707
22893
|
*/
|
|
22708
22894
|
_onTickComplete() {
|
|
22709
22895
|
var _this$_currentTickCom;
|
|
@@ -22715,16 +22901,16 @@ class ITextBehavior extends FabricText {
|
|
|
22715
22901
|
});
|
|
22716
22902
|
}
|
|
22717
22903
|
|
|
22718
|
-
/**
|
|
22719
|
-
* Initializes delayed cursor
|
|
22904
|
+
/**
|
|
22905
|
+
* Initializes delayed cursor
|
|
22720
22906
|
*/
|
|
22721
22907
|
initDelayedCursor(restart) {
|
|
22722
22908
|
this.abortCursorAnimation();
|
|
22723
22909
|
this._tick(restart ? 0 : this.cursorDelay);
|
|
22724
22910
|
}
|
|
22725
22911
|
|
|
22726
|
-
/**
|
|
22727
|
-
* Aborts cursor animation, clears all timeouts and clear textarea context if necessary
|
|
22912
|
+
/**
|
|
22913
|
+
* Aborts cursor animation, clears all timeouts and clear textarea context if necessary
|
|
22728
22914
|
*/
|
|
22729
22915
|
abortCursorAnimation() {
|
|
22730
22916
|
let shouldClear = false;
|
|
@@ -22742,9 +22928,9 @@ class ITextBehavior extends FabricText {
|
|
|
22742
22928
|
}
|
|
22743
22929
|
}
|
|
22744
22930
|
|
|
22745
|
-
/**
|
|
22746
|
-
* Restart tue cursor animation if either is in complete state ( between animations )
|
|
22747
|
-
* or if it never started before
|
|
22931
|
+
/**
|
|
22932
|
+
* Restart tue cursor animation if either is in complete state ( between animations )
|
|
22933
|
+
* or if it never started before
|
|
22748
22934
|
*/
|
|
22749
22935
|
restartCursorIfNeeded() {
|
|
22750
22936
|
if ([this._currentTickState, this._currentTickCompleteState].some(cursorAnimation => !cursorAnimation || cursorAnimation.isDone())) {
|
|
@@ -22752,8 +22938,8 @@ class ITextBehavior extends FabricText {
|
|
|
22752
22938
|
}
|
|
22753
22939
|
}
|
|
22754
22940
|
|
|
22755
|
-
/**
|
|
22756
|
-
* Selects entire text
|
|
22941
|
+
/**
|
|
22942
|
+
* Selects entire text
|
|
22757
22943
|
*/
|
|
22758
22944
|
selectAll() {
|
|
22759
22945
|
this.selectionStart = 0;
|
|
@@ -22763,26 +22949,26 @@ class ITextBehavior extends FabricText {
|
|
|
22763
22949
|
return this;
|
|
22764
22950
|
}
|
|
22765
22951
|
|
|
22766
|
-
/**
|
|
22767
|
-
* Selects entire text and updates the visual state
|
|
22952
|
+
/**
|
|
22953
|
+
* Selects entire text and updates the visual state
|
|
22768
22954
|
*/
|
|
22769
22955
|
cmdAll() {
|
|
22770
22956
|
this.selectAll();
|
|
22771
22957
|
this.renderCursorOrSelection();
|
|
22772
22958
|
}
|
|
22773
22959
|
|
|
22774
|
-
/**
|
|
22775
|
-
* Returns selected text
|
|
22776
|
-
* @return {String}
|
|
22960
|
+
/**
|
|
22961
|
+
* Returns selected text
|
|
22962
|
+
* @return {String}
|
|
22777
22963
|
*/
|
|
22778
22964
|
getSelectedText() {
|
|
22779
22965
|
return this._text.slice(this.selectionStart, this.selectionEnd).join('');
|
|
22780
22966
|
}
|
|
22781
22967
|
|
|
22782
|
-
/**
|
|
22783
|
-
* Find new selection index representing start of current word according to current selection index
|
|
22784
|
-
* @param {Number} startFrom Current selection index
|
|
22785
|
-
* @return {Number} New selection index
|
|
22968
|
+
/**
|
|
22969
|
+
* Find new selection index representing start of current word according to current selection index
|
|
22970
|
+
* @param {Number} startFrom Current selection index
|
|
22971
|
+
* @return {Number} New selection index
|
|
22786
22972
|
*/
|
|
22787
22973
|
findWordBoundaryLeft(startFrom) {
|
|
22788
22974
|
let offset = 0,
|
|
@@ -22802,10 +22988,10 @@ class ITextBehavior extends FabricText {
|
|
|
22802
22988
|
return startFrom - offset;
|
|
22803
22989
|
}
|
|
22804
22990
|
|
|
22805
|
-
/**
|
|
22806
|
-
* Find new selection index representing end of current word according to current selection index
|
|
22807
|
-
* @param {Number} startFrom Current selection index
|
|
22808
|
-
* @return {Number} New selection index
|
|
22991
|
+
/**
|
|
22992
|
+
* Find new selection index representing end of current word according to current selection index
|
|
22993
|
+
* @param {Number} startFrom Current selection index
|
|
22994
|
+
* @return {Number} New selection index
|
|
22809
22995
|
*/
|
|
22810
22996
|
findWordBoundaryRight(startFrom) {
|
|
22811
22997
|
let offset = 0,
|
|
@@ -22825,10 +23011,10 @@ class ITextBehavior extends FabricText {
|
|
|
22825
23011
|
return startFrom + offset;
|
|
22826
23012
|
}
|
|
22827
23013
|
|
|
22828
|
-
/**
|
|
22829
|
-
* Find new selection index representing start of current line according to current selection index
|
|
22830
|
-
* @param {Number} startFrom Current selection index
|
|
22831
|
-
* @return {Number} New selection index
|
|
23014
|
+
/**
|
|
23015
|
+
* Find new selection index representing start of current line according to current selection index
|
|
23016
|
+
* @param {Number} startFrom Current selection index
|
|
23017
|
+
* @return {Number} New selection index
|
|
22832
23018
|
*/
|
|
22833
23019
|
findLineBoundaryLeft(startFrom) {
|
|
22834
23020
|
let offset = 0,
|
|
@@ -22840,10 +23026,10 @@ class ITextBehavior extends FabricText {
|
|
|
22840
23026
|
return startFrom - offset;
|
|
22841
23027
|
}
|
|
22842
23028
|
|
|
22843
|
-
/**
|
|
22844
|
-
* Find new selection index representing end of current line according to current selection index
|
|
22845
|
-
* @param {Number} startFrom Current selection index
|
|
22846
|
-
* @return {Number} New selection index
|
|
23029
|
+
/**
|
|
23030
|
+
* Find new selection index representing end of current line according to current selection index
|
|
23031
|
+
* @param {Number} startFrom Current selection index
|
|
23032
|
+
* @return {Number} New selection index
|
|
22847
23033
|
*/
|
|
22848
23034
|
findLineBoundaryRight(startFrom) {
|
|
22849
23035
|
let offset = 0,
|
|
@@ -22855,11 +23041,11 @@ class ITextBehavior extends FabricText {
|
|
|
22855
23041
|
return startFrom + offset;
|
|
22856
23042
|
}
|
|
22857
23043
|
|
|
22858
|
-
/**
|
|
22859
|
-
* Finds index corresponding to beginning or end of a word
|
|
22860
|
-
* @param {Number} selectionStart Index of a character
|
|
22861
|
-
* @param {Number} direction 1 or -1
|
|
22862
|
-
* @return {Number} Index of the beginning or end of a word
|
|
23044
|
+
/**
|
|
23045
|
+
* Finds index corresponding to beginning or end of a word
|
|
23046
|
+
* @param {Number} selectionStart Index of a character
|
|
23047
|
+
* @param {Number} direction 1 or -1
|
|
23048
|
+
* @return {Number} Index of the beginning or end of a word
|
|
22863
23049
|
*/
|
|
22864
23050
|
searchWordBoundary(selectionStart, direction) {
|
|
22865
23051
|
const text = this._text;
|
|
@@ -22877,9 +23063,9 @@ class ITextBehavior extends FabricText {
|
|
|
22877
23063
|
return index;
|
|
22878
23064
|
}
|
|
22879
23065
|
|
|
22880
|
-
/**
|
|
22881
|
-
* Selects the word that contains the char at index selectionStart
|
|
22882
|
-
* @param {Number} selectionStart Index of a character
|
|
23066
|
+
/**
|
|
23067
|
+
* Selects the word that contains the char at index selectionStart
|
|
23068
|
+
* @param {Number} selectionStart Index of a character
|
|
22883
23069
|
*/
|
|
22884
23070
|
selectWord(selectionStart) {
|
|
22885
23071
|
selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
|
|
@@ -22895,9 +23081,9 @@ class ITextBehavior extends FabricText {
|
|
|
22895
23081
|
this.renderCursorOrSelection();
|
|
22896
23082
|
}
|
|
22897
23083
|
|
|
22898
|
-
/**
|
|
22899
|
-
* Selects the line that contains selectionStart
|
|
22900
|
-
* @param {Number} selectionStart Index of a character
|
|
23084
|
+
/**
|
|
23085
|
+
* Selects the line that contains selectionStart
|
|
23086
|
+
* @param {Number} selectionStart Index of a character
|
|
22901
23087
|
*/
|
|
22902
23088
|
selectLine(selectionStart) {
|
|
22903
23089
|
selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
|
|
@@ -22909,8 +23095,8 @@ class ITextBehavior extends FabricText {
|
|
|
22909
23095
|
this._updateTextarea();
|
|
22910
23096
|
}
|
|
22911
23097
|
|
|
22912
|
-
/**
|
|
22913
|
-
* Enters editing state
|
|
23098
|
+
/**
|
|
23099
|
+
* Enters editing state
|
|
22914
23100
|
*/
|
|
22915
23101
|
enterEditing(e) {
|
|
22916
23102
|
if (this.isEditing || !this.editable) {
|
|
@@ -22930,8 +23116,8 @@ class ITextBehavior extends FabricText {
|
|
|
22930
23116
|
}
|
|
22931
23117
|
}
|
|
22932
23118
|
|
|
22933
|
-
/**
|
|
22934
|
-
* runs the actual logic that enter from editing state, see {@link enterEditing}
|
|
23119
|
+
/**
|
|
23120
|
+
* runs the actual logic that enter from editing state, see {@link enterEditing}
|
|
22935
23121
|
*/
|
|
22936
23122
|
enterEditingImpl() {
|
|
22937
23123
|
if (this.canvas) {
|
|
@@ -22955,8 +23141,8 @@ class ITextBehavior extends FabricText {
|
|
|
22955
23141
|
}
|
|
22956
23142
|
}
|
|
22957
23143
|
|
|
22958
|
-
/**
|
|
22959
|
-
* Enter overlay editing mode using DOM textarea overlay
|
|
23144
|
+
/**
|
|
23145
|
+
* Enter overlay editing mode using DOM textarea overlay
|
|
22960
23146
|
*/
|
|
22961
23147
|
enterOverlayEditing() {
|
|
22962
23148
|
this._saveEditingProps();
|
|
@@ -22977,8 +23163,8 @@ class ITextBehavior extends FabricText {
|
|
|
22977
23163
|
});
|
|
22978
23164
|
}
|
|
22979
23165
|
|
|
22980
|
-
/**
|
|
22981
|
-
* Commit overlay editing changes
|
|
23166
|
+
/**
|
|
23167
|
+
* Commit overlay editing changes
|
|
22982
23168
|
*/
|
|
22983
23169
|
commitOverlayEdit(text) {
|
|
22984
23170
|
const overlayEditor = this.__overlayEditor;
|
|
@@ -23002,8 +23188,8 @@ class ITextBehavior extends FabricText {
|
|
|
23002
23188
|
this.canvas && this.canvas.requestRenderAll();
|
|
23003
23189
|
}
|
|
23004
23190
|
|
|
23005
|
-
/**
|
|
23006
|
-
* Cancel overlay editing without changes
|
|
23191
|
+
/**
|
|
23192
|
+
* Cancel overlay editing without changes
|
|
23007
23193
|
*/
|
|
23008
23194
|
cancelOverlayEdit() {
|
|
23009
23195
|
// Restore original text
|
|
@@ -23011,8 +23197,8 @@ class ITextBehavior extends FabricText {
|
|
|
23011
23197
|
this.exitEditing();
|
|
23012
23198
|
}
|
|
23013
23199
|
|
|
23014
|
-
/**
|
|
23015
|
-
* called by {@link Canvas#textEditingManager}
|
|
23200
|
+
/**
|
|
23201
|
+
* called by {@link Canvas#textEditingManager}
|
|
23016
23202
|
*/
|
|
23017
23203
|
updateSelectionOnMouseMove(e) {
|
|
23018
23204
|
if (this.getActiveControl()) {
|
|
@@ -23040,8 +23226,8 @@ class ITextBehavior extends FabricText {
|
|
|
23040
23226
|
}
|
|
23041
23227
|
}
|
|
23042
23228
|
|
|
23043
|
-
/**
|
|
23044
|
-
* @private
|
|
23229
|
+
/**
|
|
23230
|
+
* @private
|
|
23045
23231
|
*/
|
|
23046
23232
|
_setEditingProps() {
|
|
23047
23233
|
this.hoverCursor = 'text';
|
|
@@ -23053,8 +23239,8 @@ class ITextBehavior extends FabricText {
|
|
|
23053
23239
|
this.lockMovementX = this.lockMovementY = true;
|
|
23054
23240
|
}
|
|
23055
23241
|
|
|
23056
|
-
/**
|
|
23057
|
-
* convert from textarea to grapheme indexes
|
|
23242
|
+
/**
|
|
23243
|
+
* convert from textarea to grapheme indexes
|
|
23058
23244
|
*/
|
|
23059
23245
|
fromStringToGraphemeSelection(start, end, text) {
|
|
23060
23246
|
const smallerTextStart = text.slice(0, start),
|
|
@@ -23073,8 +23259,8 @@ class ITextBehavior extends FabricText {
|
|
|
23073
23259
|
};
|
|
23074
23260
|
}
|
|
23075
23261
|
|
|
23076
|
-
/**
|
|
23077
|
-
* convert from fabric to textarea values
|
|
23262
|
+
/**
|
|
23263
|
+
* convert from fabric to textarea values
|
|
23078
23264
|
*/
|
|
23079
23265
|
fromGraphemeToStringSelection(start, end, graphemes) {
|
|
23080
23266
|
const smallerTextStart = graphemes.slice(0, start),
|
|
@@ -23093,8 +23279,8 @@ class ITextBehavior extends FabricText {
|
|
|
23093
23279
|
};
|
|
23094
23280
|
}
|
|
23095
23281
|
|
|
23096
|
-
/**
|
|
23097
|
-
* @private
|
|
23282
|
+
/**
|
|
23283
|
+
* @private
|
|
23098
23284
|
*/
|
|
23099
23285
|
_updateTextarea() {
|
|
23100
23286
|
this.cursorOffsetCache = {};
|
|
@@ -23109,8 +23295,8 @@ class ITextBehavior extends FabricText {
|
|
|
23109
23295
|
this.updateTextareaPosition();
|
|
23110
23296
|
}
|
|
23111
23297
|
|
|
23112
|
-
/**
|
|
23113
|
-
* @private
|
|
23298
|
+
/**
|
|
23299
|
+
* @private
|
|
23114
23300
|
*/
|
|
23115
23301
|
updateFromTextArea() {
|
|
23116
23302
|
if (!this.hiddenTextarea) {
|
|
@@ -23130,8 +23316,8 @@ class ITextBehavior extends FabricText {
|
|
|
23130
23316
|
this.updateTextareaPosition();
|
|
23131
23317
|
}
|
|
23132
23318
|
|
|
23133
|
-
/**
|
|
23134
|
-
* @private
|
|
23319
|
+
/**
|
|
23320
|
+
* @private
|
|
23135
23321
|
*/
|
|
23136
23322
|
updateTextareaPosition() {
|
|
23137
23323
|
if (this.selectionStart === this.selectionEnd) {
|
|
@@ -23141,9 +23327,9 @@ class ITextBehavior extends FabricText {
|
|
|
23141
23327
|
}
|
|
23142
23328
|
}
|
|
23143
23329
|
|
|
23144
|
-
/**
|
|
23145
|
-
* @private
|
|
23146
|
-
* @return {Object} style contains style for hiddenTextarea
|
|
23330
|
+
/**
|
|
23331
|
+
* @private
|
|
23332
|
+
* @return {Object} style contains style for hiddenTextarea
|
|
23147
23333
|
*/
|
|
23148
23334
|
_calcTextareaPosition() {
|
|
23149
23335
|
if (!this.canvas) {
|
|
@@ -23190,8 +23376,8 @@ class ITextBehavior extends FabricText {
|
|
|
23190
23376
|
};
|
|
23191
23377
|
}
|
|
23192
23378
|
|
|
23193
|
-
/**
|
|
23194
|
-
* @private
|
|
23379
|
+
/**
|
|
23380
|
+
* @private
|
|
23195
23381
|
*/
|
|
23196
23382
|
_saveEditingProps() {
|
|
23197
23383
|
this._savedProps = {
|
|
@@ -23208,8 +23394,8 @@ class ITextBehavior extends FabricText {
|
|
|
23208
23394
|
};
|
|
23209
23395
|
}
|
|
23210
23396
|
|
|
23211
|
-
/**
|
|
23212
|
-
* @private
|
|
23397
|
+
/**
|
|
23398
|
+
* @private
|
|
23213
23399
|
*/
|
|
23214
23400
|
_restoreEditingProps() {
|
|
23215
23401
|
if (!this._savedProps) {
|
|
@@ -23229,9 +23415,9 @@ class ITextBehavior extends FabricText {
|
|
|
23229
23415
|
delete this._savedProps;
|
|
23230
23416
|
}
|
|
23231
23417
|
|
|
23232
|
-
/**
|
|
23233
|
-
* runs the actual logic that exits from editing state, see {@link exitEditing}
|
|
23234
|
-
* But it does not fire events
|
|
23418
|
+
/**
|
|
23419
|
+
* runs the actual logic that exits from editing state, see {@link exitEditing}
|
|
23420
|
+
* But it does not fire events
|
|
23235
23421
|
*/
|
|
23236
23422
|
exitEditingImpl() {
|
|
23237
23423
|
const hiddenTextarea = this.hiddenTextarea;
|
|
@@ -23252,8 +23438,8 @@ class ITextBehavior extends FabricText {
|
|
|
23252
23438
|
}
|
|
23253
23439
|
}
|
|
23254
23440
|
|
|
23255
|
-
/**
|
|
23256
|
-
* Exits from editing state and fires relevant events
|
|
23441
|
+
/**
|
|
23442
|
+
* Exits from editing state and fires relevant events
|
|
23257
23443
|
*/
|
|
23258
23444
|
exitEditing() {
|
|
23259
23445
|
const isTextChanged = this._textBeforeEdit !== this.text;
|
|
@@ -23272,8 +23458,8 @@ class ITextBehavior extends FabricText {
|
|
|
23272
23458
|
return this;
|
|
23273
23459
|
}
|
|
23274
23460
|
|
|
23275
|
-
/**
|
|
23276
|
-
* @private
|
|
23461
|
+
/**
|
|
23462
|
+
* @private
|
|
23277
23463
|
*/
|
|
23278
23464
|
_removeExtraneousStyles() {
|
|
23279
23465
|
for (const prop in this.styles) {
|
|
@@ -23283,10 +23469,10 @@ class ITextBehavior extends FabricText {
|
|
|
23283
23469
|
}
|
|
23284
23470
|
}
|
|
23285
23471
|
|
|
23286
|
-
/**
|
|
23287
|
-
* remove and reflow a style block from start to end.
|
|
23288
|
-
* @param {Number} start linear start position for removal (included in removal)
|
|
23289
|
-
* @param {Number} end linear end position for removal ( excluded from removal )
|
|
23472
|
+
/**
|
|
23473
|
+
* remove and reflow a style block from start to end.
|
|
23474
|
+
* @param {Number} start linear start position for removal (included in removal)
|
|
23475
|
+
* @param {Number} end linear end position for removal ( excluded from removal )
|
|
23290
23476
|
*/
|
|
23291
23477
|
removeStyleFromTo(start, end) {
|
|
23292
23478
|
const {
|
|
@@ -23339,10 +23525,10 @@ class ITextBehavior extends FabricText {
|
|
|
23339
23525
|
}
|
|
23340
23526
|
}
|
|
23341
23527
|
|
|
23342
|
-
/**
|
|
23343
|
-
* Shifts line styles up or down
|
|
23344
|
-
* @param {Number} lineIndex Index of a line
|
|
23345
|
-
* @param {Number} offset Can any number?
|
|
23528
|
+
/**
|
|
23529
|
+
* Shifts line styles up or down
|
|
23530
|
+
* @param {Number} lineIndex Index of a line
|
|
23531
|
+
* @param {Number} offset Can any number?
|
|
23346
23532
|
*/
|
|
23347
23533
|
shiftLineStyles(lineIndex, offset) {
|
|
23348
23534
|
const clonedStyles = Object.assign({}, this.styles);
|
|
@@ -23357,15 +23543,15 @@ class ITextBehavior extends FabricText {
|
|
|
23357
23543
|
}
|
|
23358
23544
|
}
|
|
23359
23545
|
|
|
23360
|
-
/**
|
|
23361
|
-
* Handle insertion of more consecutive style lines for when one or more
|
|
23362
|
-
* newlines gets added to the text. Since current style needs to be shifted
|
|
23363
|
-
* first we shift the current style of the number lines needed, then we add
|
|
23364
|
-
* new lines from the last to the first.
|
|
23365
|
-
* @param {Number} lineIndex Index of a line
|
|
23366
|
-
* @param {Number} charIndex Index of a char
|
|
23367
|
-
* @param {Number} qty number of lines to add
|
|
23368
|
-
* @param {Array} copiedStyle Array of objects styles
|
|
23546
|
+
/**
|
|
23547
|
+
* Handle insertion of more consecutive style lines for when one or more
|
|
23548
|
+
* newlines gets added to the text. Since current style needs to be shifted
|
|
23549
|
+
* first we shift the current style of the number lines needed, then we add
|
|
23550
|
+
* new lines from the last to the first.
|
|
23551
|
+
* @param {Number} lineIndex Index of a line
|
|
23552
|
+
* @param {Number} charIndex Index of a char
|
|
23553
|
+
* @param {Number} qty number of lines to add
|
|
23554
|
+
* @param {Array} copiedStyle Array of objects styles
|
|
23369
23555
|
*/
|
|
23370
23556
|
insertNewlineStyleObject(lineIndex, charIndex, qty, copiedStyle) {
|
|
23371
23557
|
const newLineStyles = {};
|
|
@@ -23425,12 +23611,12 @@ class ITextBehavior extends FabricText {
|
|
|
23425
23611
|
this._forceClearCache = true;
|
|
23426
23612
|
}
|
|
23427
23613
|
|
|
23428
|
-
/**
|
|
23429
|
-
* Inserts style object for a given line/char index
|
|
23430
|
-
* @param {Number} lineIndex Index of a line
|
|
23431
|
-
* @param {Number} charIndex Index of a char
|
|
23432
|
-
* @param {Number} quantity number Style object to insert, if given
|
|
23433
|
-
* @param {Array} copiedStyle array of style objects
|
|
23614
|
+
/**
|
|
23615
|
+
* Inserts style object for a given line/char index
|
|
23616
|
+
* @param {Number} lineIndex Index of a line
|
|
23617
|
+
* @param {Number} charIndex Index of a char
|
|
23618
|
+
* @param {Number} quantity number Style object to insert, if given
|
|
23619
|
+
* @param {Array} copiedStyle array of style objects
|
|
23434
23620
|
*/
|
|
23435
23621
|
insertCharStyleObject(lineIndex, charIndex, quantity, copiedStyle) {
|
|
23436
23622
|
if (!this.styles) {
|
|
@@ -23479,11 +23665,11 @@ class ITextBehavior extends FabricText {
|
|
|
23479
23665
|
}
|
|
23480
23666
|
}
|
|
23481
23667
|
|
|
23482
|
-
/**
|
|
23483
|
-
* Inserts style object(s)
|
|
23484
|
-
* @param {Array} insertedText Characters at the location where style is inserted
|
|
23485
|
-
* @param {Number} start cursor index for inserting style
|
|
23486
|
-
* @param {Array} [copiedStyle] array of style objects to insert.
|
|
23668
|
+
/**
|
|
23669
|
+
* Inserts style object(s)
|
|
23670
|
+
* @param {Array} insertedText Characters at the location where style is inserted
|
|
23671
|
+
* @param {Number} start cursor index for inserting style
|
|
23672
|
+
* @param {Array} [copiedStyle] array of style objects to insert.
|
|
23487
23673
|
*/
|
|
23488
23674
|
insertNewStyleBlock(insertedText, start, copiedStyle) {
|
|
23489
23675
|
const cursorLoc = this.get2DCursorLocation(start, true),
|
|
@@ -23524,12 +23710,12 @@ class ITextBehavior extends FabricText {
|
|
|
23524
23710
|
}
|
|
23525
23711
|
}
|
|
23526
23712
|
|
|
23527
|
-
/**
|
|
23528
|
-
* Removes characters from start/end
|
|
23529
|
-
* start/end ar per grapheme position in _text array.
|
|
23530
|
-
*
|
|
23531
|
-
* @param {Number} start
|
|
23532
|
-
* @param {Number} end default to start + 1
|
|
23713
|
+
/**
|
|
23714
|
+
* Removes characters from start/end
|
|
23715
|
+
* start/end ar per grapheme position in _text array.
|
|
23716
|
+
*
|
|
23717
|
+
* @param {Number} start
|
|
23718
|
+
* @param {Number} end default to start + 1
|
|
23533
23719
|
*/
|
|
23534
23720
|
removeChars(start) {
|
|
23535
23721
|
let end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : start + 1;
|
|
@@ -23542,17 +23728,17 @@ class ITextBehavior extends FabricText {
|
|
|
23542
23728
|
this._removeExtraneousStyles();
|
|
23543
23729
|
}
|
|
23544
23730
|
|
|
23545
|
-
/**
|
|
23546
|
-
* insert characters at start position, before start position.
|
|
23547
|
-
* start equal 1 it means the text get inserted between actual grapheme 0 and 1
|
|
23548
|
-
* if style array is provided, it must be as the same length of text in graphemes
|
|
23549
|
-
* if end is provided and is bigger than start, old text is replaced.
|
|
23550
|
-
* start/end ar per grapheme position in _text array.
|
|
23551
|
-
*
|
|
23552
|
-
* @param {String} text text to insert
|
|
23553
|
-
* @param {Array} style array of style objects
|
|
23554
|
-
* @param {Number} start
|
|
23555
|
-
* @param {Number} end default to start + 1
|
|
23731
|
+
/**
|
|
23732
|
+
* insert characters at start position, before start position.
|
|
23733
|
+
* start equal 1 it means the text get inserted between actual grapheme 0 and 1
|
|
23734
|
+
* if style array is provided, it must be as the same length of text in graphemes
|
|
23735
|
+
* if end is provided and is bigger than start, old text is replaced.
|
|
23736
|
+
* start/end ar per grapheme position in _text array.
|
|
23737
|
+
*
|
|
23738
|
+
* @param {String} text text to insert
|
|
23739
|
+
* @param {Array} style array of style objects
|
|
23740
|
+
* @param {Number} start
|
|
23741
|
+
* @param {Number} end default to start + 1
|
|
23556
23742
|
*/
|
|
23557
23743
|
insertChars(text, style, start) {
|
|
23558
23744
|
let end = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : start;
|
|
@@ -23569,9 +23755,9 @@ class ITextBehavior extends FabricText {
|
|
|
23569
23755
|
this._removeExtraneousStyles();
|
|
23570
23756
|
}
|
|
23571
23757
|
|
|
23572
|
-
/**
|
|
23573
|
-
* Set the selectionStart and selectionEnd according to the new position of cursor
|
|
23574
|
-
* mimic the key - mouse navigation when shift is pressed.
|
|
23758
|
+
/**
|
|
23759
|
+
* Set the selectionStart and selectionEnd according to the new position of cursor
|
|
23760
|
+
* mimic the key - mouse navigation when shift is pressed.
|
|
23575
23761
|
*/
|
|
23576
23762
|
setSelectionStartEndWithShift(start, end, newSelection) {
|
|
23577
23763
|
if (newSelection <= start) {
|
|
@@ -24194,8 +24380,8 @@ class ITextKeyBehavior extends ITextBehavior {
|
|
|
24194
24380
|
}
|
|
24195
24381
|
}
|
|
24196
24382
|
|
|
24197
|
-
/**
|
|
24198
|
-
* `LEFT_CLICK === 0`
|
|
24383
|
+
/**
|
|
24384
|
+
* `LEFT_CLICK === 0`
|
|
24199
24385
|
*/
|
|
24200
24386
|
const notALeftClick = e => !!e.button;
|
|
24201
24387
|
class ITextClickBehavior extends ITextKeyBehavior {
|
|
@@ -24213,36 +24399,36 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24213
24399
|
super.initBehavior();
|
|
24214
24400
|
}
|
|
24215
24401
|
|
|
24216
|
-
/**
|
|
24217
|
-
* If this method returns true a mouse move operation over a text selection
|
|
24218
|
-
* will not prevent the native mouse event allowing the browser to start a drag operation.
|
|
24219
|
-
* shouldStartDragging can be read 'do not prevent default for mouse move event'
|
|
24220
|
-
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24221
|
-
* @returns
|
|
24402
|
+
/**
|
|
24403
|
+
* If this method returns true a mouse move operation over a text selection
|
|
24404
|
+
* will not prevent the native mouse event allowing the browser to start a drag operation.
|
|
24405
|
+
* shouldStartDragging can be read 'do not prevent default for mouse move event'
|
|
24406
|
+
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24407
|
+
* @returns
|
|
24222
24408
|
*/
|
|
24223
24409
|
shouldStartDragging() {
|
|
24224
24410
|
return this.draggableTextDelegate.isActive();
|
|
24225
24411
|
}
|
|
24226
24412
|
|
|
24227
|
-
/**
|
|
24228
|
-
* @public override this method to control whether instance should/shouldn't become a drag source,
|
|
24229
|
-
* @see also {@link DraggableTextDelegate#isActive}
|
|
24230
|
-
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24231
|
-
* @returns {boolean} should handle event
|
|
24413
|
+
/**
|
|
24414
|
+
* @public override this method to control whether instance should/shouldn't become a drag source,
|
|
24415
|
+
* @see also {@link DraggableTextDelegate#isActive}
|
|
24416
|
+
* To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
|
|
24417
|
+
* @returns {boolean} should handle event
|
|
24232
24418
|
*/
|
|
24233
24419
|
onDragStart(e) {
|
|
24234
24420
|
return this.draggableTextDelegate.onDragStart(e);
|
|
24235
24421
|
}
|
|
24236
24422
|
|
|
24237
|
-
/**
|
|
24238
|
-
* @public override this method to control whether instance should/shouldn't become a drop target
|
|
24423
|
+
/**
|
|
24424
|
+
* @public override this method to control whether instance should/shouldn't become a drop target
|
|
24239
24425
|
*/
|
|
24240
24426
|
canDrop(e) {
|
|
24241
24427
|
return this.draggableTextDelegate.canDrop(e);
|
|
24242
24428
|
}
|
|
24243
24429
|
|
|
24244
|
-
/**
|
|
24245
|
-
* Default handler for double click, select a word or enter overlay editing
|
|
24430
|
+
/**
|
|
24431
|
+
* Default handler for double click, select a word or enter overlay editing
|
|
24246
24432
|
*/
|
|
24247
24433
|
doubleClickHandler(options) {
|
|
24248
24434
|
// Check if we should enter overlay editing mode
|
|
@@ -24259,8 +24445,8 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24259
24445
|
this.renderCursorOrSelection();
|
|
24260
24446
|
}
|
|
24261
24447
|
|
|
24262
|
-
/**
|
|
24263
|
-
* Default handler for triple click, select a line
|
|
24448
|
+
/**
|
|
24449
|
+
* Default handler for triple click, select a line
|
|
24264
24450
|
*/
|
|
24265
24451
|
tripleClickHandler(options) {
|
|
24266
24452
|
if (!this.isEditing) {
|
|
@@ -24270,13 +24456,13 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24270
24456
|
this.renderCursorOrSelection();
|
|
24271
24457
|
}
|
|
24272
24458
|
|
|
24273
|
-
/**
|
|
24274
|
-
* Default event handler for the basic functionalities needed on _mouseDown
|
|
24275
|
-
* can be overridden to do something different.
|
|
24276
|
-
* Scope of this implementation is: find the click position, set selectionStart
|
|
24277
|
-
* find selectionEnd, initialize the drawing of either cursor or selection area
|
|
24278
|
-
* initializing a mousedDown on a text area will cancel fabricjs knowledge of
|
|
24279
|
-
* current compositionMode. It will be set to false.
|
|
24459
|
+
/**
|
|
24460
|
+
* Default event handler for the basic functionalities needed on _mouseDown
|
|
24461
|
+
* can be overridden to do something different.
|
|
24462
|
+
* Scope of this implementation is: find the click position, set selectionStart
|
|
24463
|
+
* find selectionEnd, initialize the drawing of either cursor or selection area
|
|
24464
|
+
* initializing a mousedDown on a text area will cancel fabricjs knowledge of
|
|
24465
|
+
* current compositionMode. It will be set to false.
|
|
24280
24466
|
*/
|
|
24281
24467
|
_mouseDownHandler(_ref) {
|
|
24282
24468
|
let {
|
|
@@ -24304,9 +24490,9 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24304
24490
|
this.selected || (this.selected = alreadySelected || this.isEditing);
|
|
24305
24491
|
}
|
|
24306
24492
|
|
|
24307
|
-
/**
|
|
24308
|
-
* standard handler for mouse up, overridable
|
|
24309
|
-
* @private
|
|
24493
|
+
/**
|
|
24494
|
+
* standard handler for mouse up, overridable
|
|
24495
|
+
* @private
|
|
24310
24496
|
*/
|
|
24311
24497
|
mouseUpHandler(_ref2) {
|
|
24312
24498
|
let {
|
|
@@ -24337,9 +24523,9 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24337
24523
|
}
|
|
24338
24524
|
}
|
|
24339
24525
|
|
|
24340
|
-
/**
|
|
24341
|
-
* Changes cursor location in a text depending on passed pointer (x/y) object
|
|
24342
|
-
* @param {TPointerEvent} e Event object
|
|
24526
|
+
/**
|
|
24527
|
+
* Changes cursor location in a text depending on passed pointer (x/y) object
|
|
24528
|
+
* @param {TPointerEvent} e Event object
|
|
24343
24529
|
*/
|
|
24344
24530
|
setCursorByClick(e) {
|
|
24345
24531
|
const newSelection = this.getSelectionStartFromPointer(e),
|
|
@@ -24357,10 +24543,10 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24357
24543
|
}
|
|
24358
24544
|
}
|
|
24359
24545
|
|
|
24360
|
-
/**
|
|
24361
|
-
* Returns index of a character corresponding to where an object was clicked
|
|
24362
|
-
* @param {TPointerEvent} e Event object
|
|
24363
|
-
* @return {Number} Index of a character
|
|
24546
|
+
/**
|
|
24547
|
+
* Returns index of a character corresponding to where an object was clicked
|
|
24548
|
+
* @param {TPointerEvent} e Event object
|
|
24549
|
+
* @return {Number} Index of a character
|
|
24364
24550
|
*/
|
|
24365
24551
|
getSelectionStartFromPointer(e) {
|
|
24366
24552
|
const mouseOffset = this.canvas.getScenePoint(e).transform(invertTransform(this.calcTransformMatrix())).add(new Point(-this._getLeftOffset(), -this._getTopOffset()));
|
|
@@ -24406,15 +24592,15 @@ class ITextClickBehavior extends ITextKeyBehavior {
|
|
|
24406
24592
|
}
|
|
24407
24593
|
}
|
|
24408
24594
|
|
|
24409
|
-
/**
|
|
24410
|
-
* Hit Testing and Cursor Positioning System
|
|
24411
|
-
*
|
|
24412
|
-
* Maps pointer coordinates to text positions and provides cursor rectangles
|
|
24413
|
-
* for interactive text editing with grapheme-aware boundaries.
|
|
24595
|
+
/**
|
|
24596
|
+
* Hit Testing and Cursor Positioning System
|
|
24597
|
+
*
|
|
24598
|
+
* Maps pointer coordinates to text positions and provides cursor rectangles
|
|
24599
|
+
* for interactive text editing with grapheme-aware boundaries.
|
|
24414
24600
|
*/
|
|
24415
24601
|
|
|
24416
|
-
/**
|
|
24417
|
-
* Hit test a point against laid out text to find insertion position
|
|
24602
|
+
/**
|
|
24603
|
+
* Hit test a point against laid out text to find insertion position
|
|
24418
24604
|
*/
|
|
24419
24605
|
function hitTest(x, y, layout, options) {
|
|
24420
24606
|
if (layout.lines.length === 0) {
|
|
@@ -24458,8 +24644,8 @@ function hitTest(x, y, layout, options) {
|
|
|
24458
24644
|
};
|
|
24459
24645
|
}
|
|
24460
24646
|
|
|
24461
|
-
/**
|
|
24462
|
-
* Get cursor rectangle for a given insertion index
|
|
24647
|
+
/**
|
|
24648
|
+
* Get cursor rectangle for a given insertion index
|
|
24463
24649
|
*/
|
|
24464
24650
|
function getCursorRect(insertionIndex, layout, options) {
|
|
24465
24651
|
if (layout.lines.length === 0) {
|
|
@@ -24506,8 +24692,8 @@ function getCursorRect(insertionIndex, layout, options) {
|
|
|
24506
24692
|
|
|
24507
24693
|
// Private helper functions
|
|
24508
24694
|
|
|
24509
|
-
/**
|
|
24510
|
-
* Find which line contains the given Y coordinate
|
|
24695
|
+
/**
|
|
24696
|
+
* Find which line contains the given Y coordinate
|
|
24511
24697
|
*/
|
|
24512
24698
|
function findLineAtY(y, lines) {
|
|
24513
24699
|
var _lines;
|
|
@@ -24530,8 +24716,8 @@ function findLineAtY(y, lines) {
|
|
|
24530
24716
|
};
|
|
24531
24717
|
}
|
|
24532
24718
|
|
|
24533
|
-
/**
|
|
24534
|
-
* Find character position within a line at given X coordinate
|
|
24719
|
+
/**
|
|
24720
|
+
* Find character position within a line at given X coordinate
|
|
24535
24721
|
*/
|
|
24536
24722
|
function findCharAtX(x, line, options) {
|
|
24537
24723
|
if (line.bounds.length === 0) {
|
|
@@ -24637,8 +24823,8 @@ function findCharAtX(x, line, options) {
|
|
|
24637
24823
|
};
|
|
24638
24824
|
}
|
|
24639
24825
|
|
|
24640
|
-
/**
|
|
24641
|
-
* Calculate total insertion index from line and character indices
|
|
24826
|
+
/**
|
|
24827
|
+
* Calculate total insertion index from line and character indices
|
|
24642
24828
|
*/
|
|
24643
24829
|
function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
|
|
24644
24830
|
let insertionIndex = 0;
|
|
@@ -24657,8 +24843,8 @@ function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
|
|
|
24657
24843
|
return insertionIndex;
|
|
24658
24844
|
}
|
|
24659
24845
|
|
|
24660
|
-
/**
|
|
24661
|
-
* Find line and grapheme position from insertion index
|
|
24846
|
+
/**
|
|
24847
|
+
* Find line and grapheme position from insertion index
|
|
24662
24848
|
*/
|
|
24663
24849
|
function findPositionFromIndex(insertionIndex, layout) {
|
|
24664
24850
|
let currentIndex = 0;
|
|
@@ -24700,8 +24886,8 @@ function findPositionFromIndex(insertionIndex, layout) {
|
|
|
24700
24886
|
};
|
|
24701
24887
|
}
|
|
24702
24888
|
|
|
24703
|
-
/**
|
|
24704
|
-
* Calculate Y position of a line
|
|
24889
|
+
/**
|
|
24890
|
+
* Calculate Y position of a line
|
|
24705
24891
|
*/
|
|
24706
24892
|
function calculateLineY(lineIndex, layout, options) {
|
|
24707
24893
|
let y = 0;
|
|
@@ -24804,48 +24990,48 @@ const iTextDefaultValues = {
|
|
|
24804
24990
|
|
|
24805
24991
|
// @TODO this is not complete
|
|
24806
24992
|
|
|
24807
|
-
/**
|
|
24808
|
-
* @fires changed
|
|
24809
|
-
* @fires selection:changed
|
|
24810
|
-
* @fires editing:entered
|
|
24811
|
-
* @fires editing:exited
|
|
24812
|
-
* @fires dragstart
|
|
24813
|
-
* @fires drag drag event firing on the drag source
|
|
24814
|
-
* @fires dragend
|
|
24815
|
-
* @fires copy
|
|
24816
|
-
* @fires cut
|
|
24817
|
-
* @fires paste
|
|
24818
|
-
*
|
|
24819
|
-
* #### Supported key combinations
|
|
24820
|
-
* ```
|
|
24821
|
-
* Move cursor: left, right, up, down
|
|
24822
|
-
* Select character: shift + left, shift + right
|
|
24823
|
-
* Select text vertically: shift + up, shift + down
|
|
24824
|
-
* Move cursor by word: alt + left, alt + right
|
|
24825
|
-
* Select words: shift + alt + left, shift + alt + right
|
|
24826
|
-
* Move cursor to line start/end: cmd + left, cmd + right or home, end
|
|
24827
|
-
* Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
|
|
24828
|
-
* Jump to start/end of text: cmd + up, cmd + down
|
|
24829
|
-
* Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
|
|
24830
|
-
* Delete character: backspace
|
|
24831
|
-
* Delete word: alt + backspace
|
|
24832
|
-
* Delete line: cmd + backspace
|
|
24833
|
-
* Forward delete: delete
|
|
24834
|
-
* Copy text: ctrl/cmd + c
|
|
24835
|
-
* Paste text: ctrl/cmd + v
|
|
24836
|
-
* Cut text: ctrl/cmd + x
|
|
24837
|
-
* Select entire text: ctrl/cmd + a
|
|
24838
|
-
* Quit editing tab or esc
|
|
24839
|
-
* ```
|
|
24840
|
-
*
|
|
24841
|
-
* #### Supported mouse/touch combination
|
|
24842
|
-
* ```
|
|
24843
|
-
* Position cursor: click/touch
|
|
24844
|
-
* Create selection: click/touch & drag
|
|
24845
|
-
* Create selection: click & shift + click
|
|
24846
|
-
* Select word: double click
|
|
24847
|
-
* Select line: triple click
|
|
24848
|
-
* ```
|
|
24993
|
+
/**
|
|
24994
|
+
* @fires changed
|
|
24995
|
+
* @fires selection:changed
|
|
24996
|
+
* @fires editing:entered
|
|
24997
|
+
* @fires editing:exited
|
|
24998
|
+
* @fires dragstart
|
|
24999
|
+
* @fires drag drag event firing on the drag source
|
|
25000
|
+
* @fires dragend
|
|
25001
|
+
* @fires copy
|
|
25002
|
+
* @fires cut
|
|
25003
|
+
* @fires paste
|
|
25004
|
+
*
|
|
25005
|
+
* #### Supported key combinations
|
|
25006
|
+
* ```
|
|
25007
|
+
* Move cursor: left, right, up, down
|
|
25008
|
+
* Select character: shift + left, shift + right
|
|
25009
|
+
* Select text vertically: shift + up, shift + down
|
|
25010
|
+
* Move cursor by word: alt + left, alt + right
|
|
25011
|
+
* Select words: shift + alt + left, shift + alt + right
|
|
25012
|
+
* Move cursor to line start/end: cmd + left, cmd + right or home, end
|
|
25013
|
+
* Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
|
|
25014
|
+
* Jump to start/end of text: cmd + up, cmd + down
|
|
25015
|
+
* Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
|
|
25016
|
+
* Delete character: backspace
|
|
25017
|
+
* Delete word: alt + backspace
|
|
25018
|
+
* Delete line: cmd + backspace
|
|
25019
|
+
* Forward delete: delete
|
|
25020
|
+
* Copy text: ctrl/cmd + c
|
|
25021
|
+
* Paste text: ctrl/cmd + v
|
|
25022
|
+
* Cut text: ctrl/cmd + x
|
|
25023
|
+
* Select entire text: ctrl/cmd + a
|
|
25024
|
+
* Quit editing tab or esc
|
|
25025
|
+
* ```
|
|
25026
|
+
*
|
|
25027
|
+
* #### Supported mouse/touch combination
|
|
25028
|
+
* ```
|
|
25029
|
+
* Position cursor: click/touch
|
|
25030
|
+
* Create selection: click/touch & drag
|
|
25031
|
+
* Create selection: click & shift + click
|
|
25032
|
+
* Select word: double click
|
|
25033
|
+
* Select line: triple click
|
|
25034
|
+
* ```
|
|
24849
25035
|
*/
|
|
24850
25036
|
class IText extends ITextClickBehavior {
|
|
24851
25037
|
static getDefaults() {
|
|
@@ -24860,10 +25046,10 @@ class IText extends ITextClickBehavior {
|
|
|
24860
25046
|
return type === 'itext' ? 'i-text' : type;
|
|
24861
25047
|
}
|
|
24862
25048
|
|
|
24863
|
-
/**
|
|
24864
|
-
* Constructor
|
|
24865
|
-
* @param {String} text Text string
|
|
24866
|
-
* @param {Object} [options] Options object
|
|
25049
|
+
/**
|
|
25050
|
+
* Constructor
|
|
25051
|
+
* @param {String} text Text string
|
|
25052
|
+
* @param {Object} [options] Options object
|
|
24867
25053
|
*/
|
|
24868
25054
|
constructor(text, options) {
|
|
24869
25055
|
super(text, {
|
|
@@ -24873,11 +25059,11 @@ class IText extends ITextClickBehavior {
|
|
|
24873
25059
|
this.initBehavior();
|
|
24874
25060
|
}
|
|
24875
25061
|
|
|
24876
|
-
/**
|
|
24877
|
-
* While editing handle differently
|
|
24878
|
-
* @private
|
|
24879
|
-
* @param {string} key
|
|
24880
|
-
* @param {*} value
|
|
25062
|
+
/**
|
|
25063
|
+
* While editing handle differently
|
|
25064
|
+
* @private
|
|
25065
|
+
* @param {string} key
|
|
25066
|
+
* @param {*} value
|
|
24881
25067
|
*/
|
|
24882
25068
|
_set(key, value) {
|
|
24883
25069
|
if (this.isEditing && this._savedProps && key in this._savedProps) {
|
|
@@ -24892,28 +25078,28 @@ class IText extends ITextClickBehavior {
|
|
|
24892
25078
|
return super._set(key, value);
|
|
24893
25079
|
}
|
|
24894
25080
|
|
|
24895
|
-
/**
|
|
24896
|
-
* Sets selection start (left boundary of a selection)
|
|
24897
|
-
* @param {Number} index Index to set selection start to
|
|
25081
|
+
/**
|
|
25082
|
+
* Sets selection start (left boundary of a selection)
|
|
25083
|
+
* @param {Number} index Index to set selection start to
|
|
24898
25084
|
*/
|
|
24899
25085
|
setSelectionStart(index) {
|
|
24900
25086
|
index = Math.max(index, 0);
|
|
24901
25087
|
this._updateAndFire('selectionStart', index);
|
|
24902
25088
|
}
|
|
24903
25089
|
|
|
24904
|
-
/**
|
|
24905
|
-
* Sets selection end (right boundary of a selection)
|
|
24906
|
-
* @param {Number} index Index to set selection end to
|
|
25090
|
+
/**
|
|
25091
|
+
* Sets selection end (right boundary of a selection)
|
|
25092
|
+
* @param {Number} index Index to set selection end to
|
|
24907
25093
|
*/
|
|
24908
25094
|
setSelectionEnd(index) {
|
|
24909
25095
|
index = Math.min(index, this.text.length);
|
|
24910
25096
|
this._updateAndFire('selectionEnd', index);
|
|
24911
25097
|
}
|
|
24912
25098
|
|
|
24913
|
-
/**
|
|
24914
|
-
* @private
|
|
24915
|
-
* @param {String} property 'selectionStart' or 'selectionEnd'
|
|
24916
|
-
* @param {Number} index new position of property
|
|
25099
|
+
/**
|
|
25100
|
+
* @private
|
|
25101
|
+
* @param {String} property 'selectionStart' or 'selectionEnd'
|
|
25102
|
+
* @param {Number} index new position of property
|
|
24917
25103
|
*/
|
|
24918
25104
|
_updateAndFire(property, index) {
|
|
24919
25105
|
if (this[property] !== index) {
|
|
@@ -24923,9 +25109,9 @@ class IText extends ITextClickBehavior {
|
|
|
24923
25109
|
this._updateTextarea();
|
|
24924
25110
|
}
|
|
24925
25111
|
|
|
24926
|
-
/**
|
|
24927
|
-
* Fires the even of selection changed
|
|
24928
|
-
* @private
|
|
25112
|
+
/**
|
|
25113
|
+
* Fires the even of selection changed
|
|
25114
|
+
* @private
|
|
24929
25115
|
*/
|
|
24930
25116
|
_fireSelectionChanged() {
|
|
24931
25117
|
this.fire('selection:changed');
|
|
@@ -24934,25 +25120,25 @@ class IText extends ITextClickBehavior {
|
|
|
24934
25120
|
});
|
|
24935
25121
|
}
|
|
24936
25122
|
|
|
24937
|
-
/**
|
|
24938
|
-
* Initialize text dimensions. Render all text on given context
|
|
24939
|
-
* or on a offscreen canvas to get the text width with measureText.
|
|
24940
|
-
* Updates this.width and this.height with the proper values.
|
|
24941
|
-
* Does not return dimensions.
|
|
24942
|
-
* @private
|
|
25123
|
+
/**
|
|
25124
|
+
* Initialize text dimensions. Render all text on given context
|
|
25125
|
+
* or on a offscreen canvas to get the text width with measureText.
|
|
25126
|
+
* Updates this.width and this.height with the proper values.
|
|
25127
|
+
* Does not return dimensions.
|
|
25128
|
+
* @private
|
|
24943
25129
|
*/
|
|
24944
25130
|
initDimensions() {
|
|
24945
25131
|
this.isEditing && this.initDelayedCursor();
|
|
24946
25132
|
super.initDimensions();
|
|
24947
25133
|
}
|
|
24948
25134
|
|
|
24949
|
-
/**
|
|
24950
|
-
* Gets style of a current selection/cursor (at the start position)
|
|
24951
|
-
* if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
|
|
24952
|
-
* @param {Number} startIndex Start index to get styles at
|
|
24953
|
-
* @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
24954
|
-
* @param {Boolean} [complete] get full style or not
|
|
24955
|
-
* @return {Array} styles an array with one, zero or more Style objects
|
|
25135
|
+
/**
|
|
25136
|
+
* Gets style of a current selection/cursor (at the start position)
|
|
25137
|
+
* if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
|
|
25138
|
+
* @param {Number} startIndex Start index to get styles at
|
|
25139
|
+
* @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
25140
|
+
* @param {Boolean} [complete] get full style or not
|
|
25141
|
+
* @return {Array} styles an array with one, zero or more Style objects
|
|
24956
25142
|
*/
|
|
24957
25143
|
getSelectionStyles() {
|
|
24958
25144
|
let startIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart || 0;
|
|
@@ -24961,11 +25147,11 @@ class IText extends ITextClickBehavior {
|
|
|
24961
25147
|
return super.getSelectionStyles(startIndex, endIndex, complete);
|
|
24962
25148
|
}
|
|
24963
25149
|
|
|
24964
|
-
/**
|
|
24965
|
-
* Sets style of a current selection, if no selection exist, do not set anything.
|
|
24966
|
-
* @param {Object} [styles] Styles object
|
|
24967
|
-
* @param {Number} [startIndex] Start index to get styles at
|
|
24968
|
-
* @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
25150
|
+
/**
|
|
25151
|
+
* Sets style of a current selection, if no selection exist, do not set anything.
|
|
25152
|
+
* @param {Object} [styles] Styles object
|
|
25153
|
+
* @param {Number} [startIndex] Start index to get styles at
|
|
25154
|
+
* @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
|
|
24969
25155
|
*/
|
|
24970
25156
|
setSelectionStyles(styles) {
|
|
24971
25157
|
let startIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selectionStart || 0;
|
|
@@ -24973,10 +25159,10 @@ class IText extends ITextClickBehavior {
|
|
|
24973
25159
|
return super.setSelectionStyles(styles, startIndex, endIndex);
|
|
24974
25160
|
}
|
|
24975
25161
|
|
|
24976
|
-
/**
|
|
24977
|
-
* Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
|
|
24978
|
-
* @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
|
|
24979
|
-
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
25162
|
+
/**
|
|
25163
|
+
* Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
|
|
25164
|
+
* @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
|
|
25165
|
+
* @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
|
|
24980
25166
|
*/
|
|
24981
25167
|
get2DCursorLocation() {
|
|
24982
25168
|
let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -24984,9 +25170,9 @@ class IText extends ITextClickBehavior {
|
|
|
24984
25170
|
return super.get2DCursorLocation(selectionStart, skipWrapping);
|
|
24985
25171
|
}
|
|
24986
25172
|
|
|
24987
|
-
/**
|
|
24988
|
-
* @private
|
|
24989
|
-
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
25173
|
+
/**
|
|
25174
|
+
* @private
|
|
25175
|
+
* @param {CanvasRenderingContext2D} ctx Context to render on
|
|
24990
25176
|
*/
|
|
24991
25177
|
render(ctx) {
|
|
24992
25178
|
super.render(ctx);
|
|
@@ -24996,9 +25182,9 @@ class IText extends ITextClickBehavior {
|
|
|
24996
25182
|
this.renderCursorOrSelection();
|
|
24997
25183
|
}
|
|
24998
25184
|
|
|
24999
|
-
/**
|
|
25000
|
-
* @override block cursor/selection logic while rendering the exported canvas
|
|
25001
|
-
* @todo this workaround should be replaced with a more robust solution
|
|
25185
|
+
/**
|
|
25186
|
+
* @override block cursor/selection logic while rendering the exported canvas
|
|
25187
|
+
* @todo this workaround should be replaced with a more robust solution
|
|
25002
25188
|
*/
|
|
25003
25189
|
toCanvasElement(options) {
|
|
25004
25190
|
const isEditing = this.isEditing;
|
|
@@ -25008,9 +25194,9 @@ class IText extends ITextClickBehavior {
|
|
|
25008
25194
|
return canvas;
|
|
25009
25195
|
}
|
|
25010
25196
|
|
|
25011
|
-
/**
|
|
25012
|
-
* Renders cursor or selection (depending on what exists)
|
|
25013
|
-
* it does on the contextTop. If contextTop is not available, do nothing.
|
|
25197
|
+
/**
|
|
25198
|
+
* Renders cursor or selection (depending on what exists)
|
|
25199
|
+
* it does on the contextTop. If contextTop is not available, do nothing.
|
|
25014
25200
|
*/
|
|
25015
25201
|
renderCursorOrSelection() {
|
|
25016
25202
|
if (!this.isEditing || !this.canvas) {
|
|
@@ -25066,12 +25252,12 @@ class IText extends ITextClickBehavior {
|
|
|
25066
25252
|
ctx.restore();
|
|
25067
25253
|
}
|
|
25068
25254
|
|
|
25069
|
-
/**
|
|
25070
|
-
* Finds and returns an array of clip paths that are applied to the parent
|
|
25071
|
-
* group(s) of the current FabricObject instance. The object's hierarchy is
|
|
25072
|
-
* traversed upwards (from the current object towards the root of the canvas),
|
|
25073
|
-
* checking each parent object for the presence of a `clipPath` that is not
|
|
25074
|
-
* absolutely positioned.
|
|
25255
|
+
/**
|
|
25256
|
+
* Finds and returns an array of clip paths that are applied to the parent
|
|
25257
|
+
* group(s) of the current FabricObject instance. The object's hierarchy is
|
|
25258
|
+
* traversed upwards (from the current object towards the root of the canvas),
|
|
25259
|
+
* checking each parent object for the presence of a `clipPath` that is not
|
|
25260
|
+
* absolutely positioned.
|
|
25075
25261
|
*/
|
|
25076
25262
|
findAncestorsWithClipPath() {
|
|
25077
25263
|
const clipPathAncestors = [];
|
|
@@ -25086,13 +25272,13 @@ class IText extends ITextClickBehavior {
|
|
|
25086
25272
|
return clipPathAncestors;
|
|
25087
25273
|
}
|
|
25088
25274
|
|
|
25089
|
-
/**
|
|
25090
|
-
* Returns cursor boundaries (left, top, leftOffset, topOffset)
|
|
25091
|
-
* left/top are left/top of entire text box
|
|
25092
|
-
* leftOffset/topOffset are offset from that left/top point of a text box
|
|
25093
|
-
* @private
|
|
25094
|
-
* @param {number} [index] index from start
|
|
25095
|
-
* @param {boolean} [skipCaching]
|
|
25275
|
+
/**
|
|
25276
|
+
* Returns cursor boundaries (left, top, leftOffset, topOffset)
|
|
25277
|
+
* left/top are left/top of entire text box
|
|
25278
|
+
* leftOffset/topOffset are offset from that left/top point of a text box
|
|
25279
|
+
* @private
|
|
25280
|
+
* @param {number} [index] index from start
|
|
25281
|
+
* @param {boolean} [skipCaching]
|
|
25096
25282
|
*/
|
|
25097
25283
|
_getCursorBoundaries() {
|
|
25098
25284
|
let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -25106,11 +25292,11 @@ class IText extends ITextClickBehavior {
|
|
|
25106
25292
|
return this._getCursorBoundariesOriginal(index, skipCaching);
|
|
25107
25293
|
}
|
|
25108
25294
|
|
|
25109
|
-
/**
|
|
25110
|
-
* Caches and returns cursor left/top offset relative to instance's center point
|
|
25111
|
-
* @private
|
|
25112
|
-
* @param {number} index index from start
|
|
25113
|
-
* @param {boolean} [skipCaching]
|
|
25295
|
+
/**
|
|
25296
|
+
* Caches and returns cursor left/top offset relative to instance's center point
|
|
25297
|
+
* @private
|
|
25298
|
+
* @param {number} index index from start
|
|
25299
|
+
* @param {boolean} [skipCaching]
|
|
25114
25300
|
*/
|
|
25115
25301
|
_getCursorBoundariesOffsets(index, skipCaching) {
|
|
25116
25302
|
if (skipCaching) {
|
|
@@ -25122,9 +25308,9 @@ class IText extends ITextClickBehavior {
|
|
|
25122
25308
|
return this.cursorOffsetCache = this.__getCursorBoundariesOffsets(index);
|
|
25123
25309
|
}
|
|
25124
25310
|
|
|
25125
|
-
/**
|
|
25126
|
-
* Enhanced cursor boundaries using advanced hit testing when available
|
|
25127
|
-
* @private
|
|
25311
|
+
/**
|
|
25312
|
+
* Enhanced cursor boundaries using advanced hit testing when available
|
|
25313
|
+
* @private
|
|
25128
25314
|
*/
|
|
25129
25315
|
_getCursorBoundariesAdvanced(index) {
|
|
25130
25316
|
if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
|
|
@@ -25140,9 +25326,9 @@ class IText extends ITextClickBehavior {
|
|
|
25140
25326
|
};
|
|
25141
25327
|
}
|
|
25142
25328
|
|
|
25143
|
-
/**
|
|
25144
|
-
* Enhanced selection start from pointer using BiDi-aware hit testing
|
|
25145
|
-
* @override
|
|
25329
|
+
/**
|
|
25330
|
+
* Enhanced selection start from pointer using BiDi-aware hit testing
|
|
25331
|
+
* @override
|
|
25146
25332
|
*/
|
|
25147
25333
|
getSelectionStartFromPointer(e) {
|
|
25148
25334
|
if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
|
|
@@ -25156,9 +25342,9 @@ class IText extends ITextClickBehavior {
|
|
|
25156
25342
|
return Math.min(hitResult.charIndex, this._text.length);
|
|
25157
25343
|
}
|
|
25158
25344
|
|
|
25159
|
-
/**
|
|
25160
|
-
* Original cursor boundaries implementation
|
|
25161
|
-
* @private
|
|
25345
|
+
/**
|
|
25346
|
+
* Original cursor boundaries implementation
|
|
25347
|
+
* @private
|
|
25162
25348
|
*/
|
|
25163
25349
|
_getCursorBoundariesOriginal(index, skipCaching) {
|
|
25164
25350
|
const left = this._getLeftOffset(),
|
|
@@ -25172,10 +25358,10 @@ class IText extends ITextClickBehavior {
|
|
|
25172
25358
|
};
|
|
25173
25359
|
}
|
|
25174
25360
|
|
|
25175
|
-
/**
|
|
25176
|
-
* Calculates cursor left/top offset relative to instance's center point
|
|
25177
|
-
* @private
|
|
25178
|
-
* @param {number} index index from start
|
|
25361
|
+
/**
|
|
25362
|
+
* Calculates cursor left/top offset relative to instance's center point
|
|
25363
|
+
* @private
|
|
25364
|
+
* @param {number} index index from start
|
|
25179
25365
|
*/
|
|
25180
25366
|
__getCursorBoundariesOffsets(index) {
|
|
25181
25367
|
let topOffset = 0,
|
|
@@ -25209,29 +25395,29 @@ class IText extends ITextClickBehavior {
|
|
|
25209
25395
|
return boundaries;
|
|
25210
25396
|
}
|
|
25211
25397
|
|
|
25212
|
-
/**
|
|
25213
|
-
* Renders cursor on context Top, outside the animation cycle, on request
|
|
25214
|
-
* Used for the drag/drop effect.
|
|
25215
|
-
* If contextTop is not available, do nothing.
|
|
25398
|
+
/**
|
|
25399
|
+
* Renders cursor on context Top, outside the animation cycle, on request
|
|
25400
|
+
* Used for the drag/drop effect.
|
|
25401
|
+
* If contextTop is not available, do nothing.
|
|
25216
25402
|
*/
|
|
25217
25403
|
renderCursorAt(selectionStart) {
|
|
25218
25404
|
this._renderCursor(this.canvas.contextTop, this._getCursorBoundaries(selectionStart, true), selectionStart);
|
|
25219
25405
|
}
|
|
25220
25406
|
|
|
25221
|
-
/**
|
|
25222
|
-
* Renders cursor
|
|
25223
|
-
* @param {Object} boundaries
|
|
25224
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25407
|
+
/**
|
|
25408
|
+
* Renders cursor
|
|
25409
|
+
* @param {Object} boundaries
|
|
25410
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25225
25411
|
*/
|
|
25226
25412
|
renderCursor(ctx, boundaries) {
|
|
25227
25413
|
this._renderCursor(ctx, boundaries, this.selectionStart);
|
|
25228
25414
|
}
|
|
25229
25415
|
|
|
25230
|
-
/**
|
|
25231
|
-
* Return the data needed to render the cursor for given selection start
|
|
25232
|
-
* The left,top are relative to the object, while width and height are prescaled
|
|
25233
|
-
* to look think with canvas zoom and object scaling,
|
|
25234
|
-
* so they depend on canvas and object scaling
|
|
25416
|
+
/**
|
|
25417
|
+
* Return the data needed to render the cursor for given selection start
|
|
25418
|
+
* The left,top are relative to the object, while width and height are prescaled
|
|
25419
|
+
* to look think with canvas zoom and object scaling,
|
|
25420
|
+
* so they depend on canvas and object scaling
|
|
25235
25421
|
*/
|
|
25236
25422
|
getCursorRenderingData() {
|
|
25237
25423
|
let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
|
|
@@ -25254,9 +25440,9 @@ class IText extends ITextClickBehavior {
|
|
|
25254
25440
|
};
|
|
25255
25441
|
}
|
|
25256
25442
|
|
|
25257
|
-
/**
|
|
25258
|
-
* Render the cursor at the given selectionStart.
|
|
25259
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25443
|
+
/**
|
|
25444
|
+
* Render the cursor at the given selectionStart.
|
|
25445
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25260
25446
|
*/
|
|
25261
25447
|
_renderCursor(ctx, boundaries, selectionStart) {
|
|
25262
25448
|
const {
|
|
@@ -25272,10 +25458,10 @@ class IText extends ITextClickBehavior {
|
|
|
25272
25458
|
ctx.fillRect(left, top, width, height);
|
|
25273
25459
|
}
|
|
25274
25460
|
|
|
25275
|
-
/**
|
|
25276
|
-
* Renders text selection
|
|
25277
|
-
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25278
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25461
|
+
/**
|
|
25462
|
+
* Renders text selection
|
|
25463
|
+
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25464
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25279
25465
|
*/
|
|
25280
25466
|
renderSelection(ctx, boundaries) {
|
|
25281
25467
|
const selection = {
|
|
@@ -25285,8 +25471,8 @@ class IText extends ITextClickBehavior {
|
|
|
25285
25471
|
this._renderSelection(ctx, selection, boundaries);
|
|
25286
25472
|
}
|
|
25287
25473
|
|
|
25288
|
-
/**
|
|
25289
|
-
* Renders drag start text selection
|
|
25474
|
+
/**
|
|
25475
|
+
* Renders drag start text selection
|
|
25290
25476
|
*/
|
|
25291
25477
|
renderDragSourceEffect() {
|
|
25292
25478
|
const dragStartSelection = this.draggableTextDelegate.getDragStartSelection();
|
|
@@ -25297,12 +25483,12 @@ class IText extends ITextClickBehavior {
|
|
|
25297
25483
|
this.renderCursorAt(dragSelection);
|
|
25298
25484
|
}
|
|
25299
25485
|
|
|
25300
|
-
/**
|
|
25301
|
-
* Renders text selection
|
|
25302
|
-
* @private
|
|
25303
|
-
* @param {{ selectionStart: number, selectionEnd: number }} selection
|
|
25304
|
-
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25305
|
-
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25486
|
+
/**
|
|
25487
|
+
* Renders text selection
|
|
25488
|
+
* @private
|
|
25489
|
+
* @param {{ selectionStart: number, selectionEnd: number }} selection
|
|
25490
|
+
* @param {Object} boundaries Object with left/top/leftOffset/topOffset
|
|
25491
|
+
* @param {CanvasRenderingContext2D} ctx transformed context to draw on
|
|
25306
25492
|
*/
|
|
25307
25493
|
_renderSelection(ctx, selection, boundaries) {
|
|
25308
25494
|
const selectionStart = selection.selectionStart,
|
|
@@ -25364,34 +25550,34 @@ class IText extends ITextClickBehavior {
|
|
|
25364
25550
|
}
|
|
25365
25551
|
}
|
|
25366
25552
|
|
|
25367
|
-
/**
|
|
25368
|
-
* High level function to know the height of the cursor.
|
|
25369
|
-
* the currentChar is the one that precedes the cursor
|
|
25370
|
-
* Returns fontSize of char at the current cursor
|
|
25371
|
-
* Unused from the library, is for the end user
|
|
25372
|
-
* @return {Number} Character font size
|
|
25553
|
+
/**
|
|
25554
|
+
* High level function to know the height of the cursor.
|
|
25555
|
+
* the currentChar is the one that precedes the cursor
|
|
25556
|
+
* Returns fontSize of char at the current cursor
|
|
25557
|
+
* Unused from the library, is for the end user
|
|
25558
|
+
* @return {Number} Character font size
|
|
25373
25559
|
*/
|
|
25374
25560
|
getCurrentCharFontSize() {
|
|
25375
25561
|
const cp = this._getCurrentCharIndex();
|
|
25376
25562
|
return this.getValueOfPropertyAt(cp.l, cp.c, 'fontSize');
|
|
25377
25563
|
}
|
|
25378
25564
|
|
|
25379
|
-
/**
|
|
25380
|
-
* High level function to know the color of the cursor.
|
|
25381
|
-
* the currentChar is the one that precedes the cursor
|
|
25382
|
-
* Returns color (fill) of char at the current cursor
|
|
25383
|
-
* if the text object has a pattern or gradient for filler, it will return that.
|
|
25384
|
-
* Unused by the library, is for the end user
|
|
25385
|
-
* @return {String | TFiller} Character color (fill)
|
|
25565
|
+
/**
|
|
25566
|
+
* High level function to know the color of the cursor.
|
|
25567
|
+
* the currentChar is the one that precedes the cursor
|
|
25568
|
+
* Returns color (fill) of char at the current cursor
|
|
25569
|
+
* if the text object has a pattern or gradient for filler, it will return that.
|
|
25570
|
+
* Unused by the library, is for the end user
|
|
25571
|
+
* @return {String | TFiller} Character color (fill)
|
|
25386
25572
|
*/
|
|
25387
25573
|
getCurrentCharColor() {
|
|
25388
25574
|
const cp = this._getCurrentCharIndex();
|
|
25389
25575
|
return this.getValueOfPropertyAt(cp.l, cp.c, FILL);
|
|
25390
25576
|
}
|
|
25391
25577
|
|
|
25392
|
-
/**
|
|
25393
|
-
* Returns the cursor position for the getCurrent.. functions
|
|
25394
|
-
* @private
|
|
25578
|
+
/**
|
|
25579
|
+
* Returns the cursor position for the getCurrent.. functions
|
|
25580
|
+
* @private
|
|
25395
25581
|
*/
|
|
25396
25582
|
_getCurrentCharIndex() {
|
|
25397
25583
|
const cursorPosition = this.get2DCursorLocation(this.selectionStart, true),
|
|
@@ -25407,52 +25593,52 @@ class IText extends ITextClickBehavior {
|
|
|
25407
25593
|
super.dispose();
|
|
25408
25594
|
}
|
|
25409
25595
|
}
|
|
25410
|
-
/**
|
|
25411
|
-
* Index where text selection starts (or where cursor is when there is no selection)
|
|
25412
|
-
* @type Number
|
|
25596
|
+
/**
|
|
25597
|
+
* Index where text selection starts (or where cursor is when there is no selection)
|
|
25598
|
+
* @type Number
|
|
25413
25599
|
*/
|
|
25414
|
-
/**
|
|
25415
|
-
* Index where text selection ends
|
|
25416
|
-
* @type Number
|
|
25600
|
+
/**
|
|
25601
|
+
* Index where text selection ends
|
|
25602
|
+
* @type Number
|
|
25417
25603
|
*/
|
|
25418
|
-
/**
|
|
25419
|
-
* Color of text selection
|
|
25420
|
-
* @type String
|
|
25604
|
+
/**
|
|
25605
|
+
* Color of text selection
|
|
25606
|
+
* @type String
|
|
25421
25607
|
*/
|
|
25422
|
-
/**
|
|
25423
|
-
* Indicates whether text is in editing mode
|
|
25424
|
-
* @type Boolean
|
|
25608
|
+
/**
|
|
25609
|
+
* Indicates whether text is in editing mode
|
|
25610
|
+
* @type Boolean
|
|
25425
25611
|
*/
|
|
25426
|
-
/**
|
|
25427
|
-
* Indicates whether a text can be edited
|
|
25428
|
-
* @type Boolean
|
|
25612
|
+
/**
|
|
25613
|
+
* Indicates whether a text can be edited
|
|
25614
|
+
* @type Boolean
|
|
25429
25615
|
*/
|
|
25430
|
-
/**
|
|
25431
|
-
* Border color of text object while it's in editing mode
|
|
25432
|
-
* @type String
|
|
25616
|
+
/**
|
|
25617
|
+
* Border color of text object while it's in editing mode
|
|
25618
|
+
* @type String
|
|
25433
25619
|
*/
|
|
25434
|
-
/**
|
|
25435
|
-
* Width of cursor (in px)
|
|
25436
|
-
* @type Number
|
|
25620
|
+
/**
|
|
25621
|
+
* Width of cursor (in px)
|
|
25622
|
+
* @type Number
|
|
25437
25623
|
*/
|
|
25438
|
-
/**
|
|
25439
|
-
* Color of text cursor color in editing mode.
|
|
25440
|
-
* if not set (default) will take color from the text.
|
|
25441
|
-
* if set to a color value that fabric can understand, it will
|
|
25442
|
-
* be used instead of the color of the text at the current position.
|
|
25443
|
-
* @type String
|
|
25624
|
+
/**
|
|
25625
|
+
* Color of text cursor color in editing mode.
|
|
25626
|
+
* if not set (default) will take color from the text.
|
|
25627
|
+
* if set to a color value that fabric can understand, it will
|
|
25628
|
+
* be used instead of the color of the text at the current position.
|
|
25629
|
+
* @type String
|
|
25444
25630
|
*/
|
|
25445
|
-
/**
|
|
25446
|
-
* Delay between cursor blink (in ms)
|
|
25447
|
-
* @type Number
|
|
25631
|
+
/**
|
|
25632
|
+
* Delay between cursor blink (in ms)
|
|
25633
|
+
* @type Number
|
|
25448
25634
|
*/
|
|
25449
|
-
/**
|
|
25450
|
-
* Duration of cursor fade in (in ms)
|
|
25451
|
-
* @type Number
|
|
25635
|
+
/**
|
|
25636
|
+
* Duration of cursor fade in (in ms)
|
|
25637
|
+
* @type Number
|
|
25452
25638
|
*/
|
|
25453
|
-
/**
|
|
25454
|
-
* Indicates whether internal text char widths can be cached
|
|
25455
|
-
* @type Boolean
|
|
25639
|
+
/**
|
|
25640
|
+
* Indicates whether internal text char widths can be cached
|
|
25641
|
+
* @type Boolean
|
|
25456
25642
|
*/
|
|
25457
25643
|
_defineProperty(IText, "ownDefaults", iTextDefaultValues);
|
|
25458
25644
|
_defineProperty(IText, "type", 'IText');
|
|
@@ -25474,11 +25660,11 @@ const textboxDefaultValues = {
|
|
|
25474
25660
|
|
|
25475
25661
|
// @TODO this is not complete
|
|
25476
25662
|
|
|
25477
|
-
/**
|
|
25478
|
-
* Textbox class, based on IText, allows the user to resize the text rectangle
|
|
25479
|
-
* and wraps lines automatically. Textboxes have their Y scaling locked, the
|
|
25480
|
-
* user can only change width. Height is adjusted automatically based on the
|
|
25481
|
-
* wrapping of lines.
|
|
25663
|
+
/**
|
|
25664
|
+
* Textbox class, based on IText, allows the user to resize the text rectangle
|
|
25665
|
+
* and wraps lines automatically. Textboxes have their Y scaling locked, the
|
|
25666
|
+
* user can only change width. Height is adjusted automatically based on the
|
|
25667
|
+
* wrapping of lines.
|
|
25482
25668
|
*/
|
|
25483
25669
|
class Textbox extends IText {
|
|
25484
25670
|
static getDefaults() {
|
|
@@ -25488,10 +25674,10 @@ class Textbox extends IText {
|
|
|
25488
25674
|
};
|
|
25489
25675
|
}
|
|
25490
25676
|
|
|
25491
|
-
/**
|
|
25492
|
-
* Constructor
|
|
25493
|
-
* @param {String} text Text string
|
|
25494
|
-
* @param {Object} [options] Options object
|
|
25677
|
+
/**
|
|
25678
|
+
* Constructor
|
|
25679
|
+
* @param {String} text Text string
|
|
25680
|
+
* @param {Object} [options] Options object
|
|
25495
25681
|
*/
|
|
25496
25682
|
constructor(text, options) {
|
|
25497
25683
|
super(text, {
|
|
@@ -25501,10 +25687,10 @@ class Textbox extends IText {
|
|
|
25501
25687
|
this.initializeEventListeners();
|
|
25502
25688
|
}
|
|
25503
25689
|
|
|
25504
|
-
/**
|
|
25505
|
-
* Creates the default control object.
|
|
25506
|
-
* If you prefer to have on instance of controls shared among all objects
|
|
25507
|
-
* make this function return an empty object and add controls to the ownDefaults object
|
|
25690
|
+
/**
|
|
25691
|
+
* Creates the default control object.
|
|
25692
|
+
* If you prefer to have on instance of controls shared among all objects
|
|
25693
|
+
* make this function return an empty object and add controls to the ownDefaults object
|
|
25508
25694
|
*/
|
|
25509
25695
|
static createControls() {
|
|
25510
25696
|
return {
|
|
@@ -25512,11 +25698,11 @@ class Textbox extends IText {
|
|
|
25512
25698
|
};
|
|
25513
25699
|
}
|
|
25514
25700
|
|
|
25515
|
-
/**
|
|
25516
|
-
* Unlike superclass's version of this function, Textbox does not update
|
|
25517
|
-
* its width.
|
|
25518
|
-
* @private
|
|
25519
|
-
* @override
|
|
25701
|
+
/**
|
|
25702
|
+
* Unlike superclass's version of this function, Textbox does not update
|
|
25703
|
+
* its width.
|
|
25704
|
+
* @private
|
|
25705
|
+
* @override
|
|
25520
25706
|
*/
|
|
25521
25707
|
initDimensions() {
|
|
25522
25708
|
if (!this.initialized) {
|
|
@@ -25545,9 +25731,9 @@ class Textbox extends IText {
|
|
|
25545
25731
|
this.height = this.calcTextHeight();
|
|
25546
25732
|
}
|
|
25547
25733
|
|
|
25548
|
-
/**
|
|
25549
|
-
* Advanced dimensions calculation using new layout engine
|
|
25550
|
-
* @private
|
|
25734
|
+
/**
|
|
25735
|
+
* Advanced dimensions calculation using new layout engine
|
|
25736
|
+
* @private
|
|
25551
25737
|
*/
|
|
25552
25738
|
initDimensionsAdvanced() {
|
|
25553
25739
|
if (!this.initialized) {
|
|
@@ -25602,9 +25788,9 @@ class Textbox extends IText {
|
|
|
25602
25788
|
this.dirty = true;
|
|
25603
25789
|
}
|
|
25604
25790
|
|
|
25605
|
-
/**
|
|
25606
|
-
* Generate style map from new layout format
|
|
25607
|
-
* @private
|
|
25791
|
+
/**
|
|
25792
|
+
* Generate style map from new layout format
|
|
25793
|
+
* @private
|
|
25608
25794
|
*/
|
|
25609
25795
|
_generateStyleMapFromLayout(layout) {
|
|
25610
25796
|
const map = {};
|
|
@@ -25626,12 +25812,12 @@ class Textbox extends IText {
|
|
|
25626
25812
|
return map;
|
|
25627
25813
|
}
|
|
25628
25814
|
|
|
25629
|
-
/**
|
|
25630
|
-
* Generate an object that translates the style object so that it is
|
|
25631
|
-
* broken up by visual lines (new lines and automatic wrapping).
|
|
25632
|
-
* The original text styles object is broken up by actual lines (new lines only),
|
|
25633
|
-
* which is only sufficient for Text / IText
|
|
25634
|
-
* @private
|
|
25815
|
+
/**
|
|
25816
|
+
* Generate an object that translates the style object so that it is
|
|
25817
|
+
* broken up by visual lines (new lines and automatic wrapping).
|
|
25818
|
+
* The original text styles object is broken up by actual lines (new lines only),
|
|
25819
|
+
* which is only sufficient for Text / IText
|
|
25820
|
+
* @private
|
|
25635
25821
|
*/
|
|
25636
25822
|
_generateStyleMap(textInfo) {
|
|
25637
25823
|
let realLineCount = 0,
|
|
@@ -25658,10 +25844,10 @@ class Textbox extends IText {
|
|
|
25658
25844
|
return map;
|
|
25659
25845
|
}
|
|
25660
25846
|
|
|
25661
|
-
/**
|
|
25662
|
-
* Returns true if object has a style property or has it on a specified line
|
|
25663
|
-
* @param {Number} lineIndex
|
|
25664
|
-
* @return {Boolean}
|
|
25847
|
+
/**
|
|
25848
|
+
* Returns true if object has a style property or has it on a specified line
|
|
25849
|
+
* @param {Number} lineIndex
|
|
25850
|
+
* @return {Boolean}
|
|
25665
25851
|
*/
|
|
25666
25852
|
styleHas(property, lineIndex) {
|
|
25667
25853
|
if (this._styleMap && !this.isWrapping) {
|
|
@@ -25673,10 +25859,10 @@ class Textbox extends IText {
|
|
|
25673
25859
|
return super.styleHas(property, lineIndex);
|
|
25674
25860
|
}
|
|
25675
25861
|
|
|
25676
|
-
/**
|
|
25677
|
-
* Returns true if object has no styling or no styling in a line
|
|
25678
|
-
* @param {Number} lineIndex , lineIndex is on wrapped lines.
|
|
25679
|
-
* @return {Boolean}
|
|
25862
|
+
/**
|
|
25863
|
+
* Returns true if object has no styling or no styling in a line
|
|
25864
|
+
* @param {Number} lineIndex , lineIndex is on wrapped lines.
|
|
25865
|
+
* @return {Boolean}
|
|
25680
25866
|
*/
|
|
25681
25867
|
isEmptyStyles(lineIndex) {
|
|
25682
25868
|
if (!this.styles) {
|
|
@@ -25713,11 +25899,11 @@ class Textbox extends IText {
|
|
|
25713
25899
|
return true;
|
|
25714
25900
|
}
|
|
25715
25901
|
|
|
25716
|
-
/**
|
|
25717
|
-
* @protected
|
|
25718
|
-
* @param {Number} lineIndex
|
|
25719
|
-
* @param {Number} charIndex
|
|
25720
|
-
* @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
|
|
25902
|
+
/**
|
|
25903
|
+
* @protected
|
|
25904
|
+
* @param {Number} lineIndex
|
|
25905
|
+
* @param {Number} charIndex
|
|
25906
|
+
* @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
|
|
25721
25907
|
*/
|
|
25722
25908
|
_getStyleDeclaration(lineIndex, charIndex) {
|
|
25723
25909
|
if (this._styleMap && !this.isWrapping) {
|
|
@@ -25731,59 +25917,59 @@ class Textbox extends IText {
|
|
|
25731
25917
|
return super._getStyleDeclaration(lineIndex, charIndex);
|
|
25732
25918
|
}
|
|
25733
25919
|
|
|
25734
|
-
/**
|
|
25735
|
-
* @param {Number} lineIndex
|
|
25736
|
-
* @param {Number} charIndex
|
|
25737
|
-
* @param {Object} style
|
|
25738
|
-
* @private
|
|
25920
|
+
/**
|
|
25921
|
+
* @param {Number} lineIndex
|
|
25922
|
+
* @param {Number} charIndex
|
|
25923
|
+
* @param {Object} style
|
|
25924
|
+
* @private
|
|
25739
25925
|
*/
|
|
25740
25926
|
_setStyleDeclaration(lineIndex, charIndex, style) {
|
|
25741
25927
|
const map = this._styleMap[lineIndex];
|
|
25742
25928
|
super._setStyleDeclaration(map.line, map.offset + charIndex, style);
|
|
25743
25929
|
}
|
|
25744
25930
|
|
|
25745
|
-
/**
|
|
25746
|
-
* @param {Number} lineIndex
|
|
25747
|
-
* @param {Number} charIndex
|
|
25748
|
-
* @private
|
|
25931
|
+
/**
|
|
25932
|
+
* @param {Number} lineIndex
|
|
25933
|
+
* @param {Number} charIndex
|
|
25934
|
+
* @private
|
|
25749
25935
|
*/
|
|
25750
25936
|
_deleteStyleDeclaration(lineIndex, charIndex) {
|
|
25751
25937
|
const map = this._styleMap[lineIndex];
|
|
25752
25938
|
super._deleteStyleDeclaration(map.line, map.offset + charIndex);
|
|
25753
25939
|
}
|
|
25754
25940
|
|
|
25755
|
-
/**
|
|
25756
|
-
* probably broken need a fix
|
|
25757
|
-
* Returns the real style line that correspond to the wrapped lineIndex line
|
|
25758
|
-
* Used just to verify if the line does exist or not.
|
|
25759
|
-
* @param {Number} lineIndex
|
|
25760
|
-
* @returns {Boolean} if the line exists or not
|
|
25761
|
-
* @private
|
|
25941
|
+
/**
|
|
25942
|
+
* probably broken need a fix
|
|
25943
|
+
* Returns the real style line that correspond to the wrapped lineIndex line
|
|
25944
|
+
* Used just to verify if the line does exist or not.
|
|
25945
|
+
* @param {Number} lineIndex
|
|
25946
|
+
* @returns {Boolean} if the line exists or not
|
|
25947
|
+
* @private
|
|
25762
25948
|
*/
|
|
25763
25949
|
_getLineStyle(lineIndex) {
|
|
25764
25950
|
const map = this._styleMap[lineIndex];
|
|
25765
25951
|
return !!this.styles[map.line];
|
|
25766
25952
|
}
|
|
25767
25953
|
|
|
25768
|
-
/**
|
|
25769
|
-
* Set the line style to an empty object so that is initialized
|
|
25770
|
-
* @param {Number} lineIndex
|
|
25771
|
-
* @param {Object} style
|
|
25772
|
-
* @private
|
|
25954
|
+
/**
|
|
25955
|
+
* Set the line style to an empty object so that is initialized
|
|
25956
|
+
* @param {Number} lineIndex
|
|
25957
|
+
* @param {Object} style
|
|
25958
|
+
* @private
|
|
25773
25959
|
*/
|
|
25774
25960
|
_setLineStyle(lineIndex) {
|
|
25775
25961
|
const map = this._styleMap[lineIndex];
|
|
25776
25962
|
super._setLineStyle(map.line);
|
|
25777
25963
|
}
|
|
25778
25964
|
|
|
25779
|
-
/**
|
|
25780
|
-
* Wraps text using the 'width' property of Textbox. First this function
|
|
25781
|
-
* splits text on newlines, so we preserve newlines entered by the user.
|
|
25782
|
-
* Then it wraps each line using the width of the Textbox by calling
|
|
25783
|
-
* _wrapLine().
|
|
25784
|
-
* @param {Array} lines The string array of text that is split into lines
|
|
25785
|
-
* @param {Number} desiredWidth width you want to wrap to
|
|
25786
|
-
* @returns {Array} Array of lines
|
|
25965
|
+
/**
|
|
25966
|
+
* Wraps text using the 'width' property of Textbox. First this function
|
|
25967
|
+
* splits text on newlines, so we preserve newlines entered by the user.
|
|
25968
|
+
* Then it wraps each line using the width of the Textbox by calling
|
|
25969
|
+
* _wrapLine().
|
|
25970
|
+
* @param {Array} lines The string array of text that is split into lines
|
|
25971
|
+
* @param {Number} desiredWidth width you want to wrap to
|
|
25972
|
+
* @returns {Array} Array of lines
|
|
25787
25973
|
*/
|
|
25788
25974
|
_wrapText(lines, desiredWidth) {
|
|
25789
25975
|
this.isWrapping = true;
|
|
@@ -25797,12 +25983,12 @@ class Textbox extends IText {
|
|
|
25797
25983
|
return wrapped;
|
|
25798
25984
|
}
|
|
25799
25985
|
|
|
25800
|
-
/**
|
|
25801
|
-
* For each line of text terminated by an hard line stop,
|
|
25802
|
-
* measure each word width and extract the largest word from all.
|
|
25803
|
-
* The returned words here are the one that at the end will be rendered.
|
|
25804
|
-
* @param {string[]} lines the lines we need to measure
|
|
25805
|
-
*
|
|
25986
|
+
/**
|
|
25987
|
+
* For each line of text terminated by an hard line stop,
|
|
25988
|
+
* measure each word width and extract the largest word from all.
|
|
25989
|
+
* The returned words here are the one that at the end will be rendered.
|
|
25990
|
+
* @param {string[]} lines the lines we need to measure
|
|
25991
|
+
*
|
|
25806
25992
|
*/
|
|
25807
25993
|
getGraphemeDataForRender(lines) {
|
|
25808
25994
|
const splitByGrapheme = this.splitByGrapheme,
|
|
@@ -25835,17 +26021,17 @@ class Textbox extends IText {
|
|
|
25835
26021
|
};
|
|
25836
26022
|
}
|
|
25837
26023
|
|
|
25838
|
-
/**
|
|
25839
|
-
* Helper function to measure a string of text, given its lineIndex and charIndex offset
|
|
25840
|
-
* It gets called when charBounds are not available yet.
|
|
25841
|
-
* Override if necessary
|
|
25842
|
-
* Use with {@link Textbox#wordSplit}
|
|
25843
|
-
*
|
|
25844
|
-
* @param {CanvasRenderingContext2D} ctx
|
|
25845
|
-
* @param {String} text
|
|
25846
|
-
* @param {number} lineIndex
|
|
25847
|
-
* @param {number} charOffset
|
|
25848
|
-
* @returns {number}
|
|
26024
|
+
/**
|
|
26025
|
+
* Helper function to measure a string of text, given its lineIndex and charIndex offset
|
|
26026
|
+
* It gets called when charBounds are not available yet.
|
|
26027
|
+
* Override if necessary
|
|
26028
|
+
* Use with {@link Textbox#wordSplit}
|
|
26029
|
+
*
|
|
26030
|
+
* @param {CanvasRenderingContext2D} ctx
|
|
26031
|
+
* @param {String} text
|
|
26032
|
+
* @param {number} lineIndex
|
|
26033
|
+
* @param {number} charOffset
|
|
26034
|
+
* @returns {number}
|
|
25849
26035
|
*/
|
|
25850
26036
|
_measureWord(word, lineIndex) {
|
|
25851
26037
|
let charOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
@@ -25860,26 +26046,26 @@ class Textbox extends IText {
|
|
|
25860
26046
|
return width;
|
|
25861
26047
|
}
|
|
25862
26048
|
|
|
25863
|
-
/**
|
|
25864
|
-
* Override this method to customize word splitting
|
|
25865
|
-
* Use with {@link Textbox#_measureWord}
|
|
25866
|
-
* @param {string} value
|
|
25867
|
-
* @returns {string[]} array of words
|
|
26049
|
+
/**
|
|
26050
|
+
* Override this method to customize word splitting
|
|
26051
|
+
* Use with {@link Textbox#_measureWord}
|
|
26052
|
+
* @param {string} value
|
|
26053
|
+
* @returns {string[]} array of words
|
|
25868
26054
|
*/
|
|
25869
26055
|
wordSplit(value) {
|
|
25870
26056
|
return value.split(this._wordJoiners);
|
|
25871
26057
|
}
|
|
25872
26058
|
|
|
25873
|
-
/**
|
|
25874
|
-
* Wraps a line of text using the width of the Textbox as desiredWidth
|
|
25875
|
-
* and leveraging the known width o words from GraphemeData
|
|
25876
|
-
* @private
|
|
25877
|
-
* @param {Number} lineIndex
|
|
25878
|
-
* @param {Number} desiredWidth width you want to wrap the line to
|
|
25879
|
-
* @param {GraphemeData} graphemeData an object containing all the lines' words width.
|
|
25880
|
-
* @param {Number} reservedSpace space to remove from wrapping for custom functionalities
|
|
25881
|
-
* @returns {Array} Array of line(s) into which the given text is wrapped
|
|
25882
|
-
* to.
|
|
26059
|
+
/**
|
|
26060
|
+
* Wraps a line of text using the width of the Textbox as desiredWidth
|
|
26061
|
+
* and leveraging the known width o words from GraphemeData
|
|
26062
|
+
* @private
|
|
26063
|
+
* @param {Number} lineIndex
|
|
26064
|
+
* @param {Number} desiredWidth width you want to wrap the line to
|
|
26065
|
+
* @param {GraphemeData} graphemeData an object containing all the lines' words width.
|
|
26066
|
+
* @param {Number} reservedSpace space to remove from wrapping for custom functionalities
|
|
26067
|
+
* @returns {Array} Array of line(s) into which the given text is wrapped
|
|
26068
|
+
* to.
|
|
25883
26069
|
*/
|
|
25884
26070
|
_wrapLine(lineIndex, desiredWidth, _ref) {
|
|
25885
26071
|
let {
|
|
@@ -25937,11 +26123,11 @@ class Textbox extends IText {
|
|
|
25937
26123
|
return graphemeLines;
|
|
25938
26124
|
}
|
|
25939
26125
|
|
|
25940
|
-
/**
|
|
25941
|
-
* Detect if the text line is ended with an hard break
|
|
25942
|
-
* text and itext do not have wrapping, return false
|
|
25943
|
-
* @param {Number} lineIndex text to split
|
|
25944
|
-
* @return {Boolean}
|
|
26126
|
+
/**
|
|
26127
|
+
* Detect if the text line is ended with an hard break
|
|
26128
|
+
* text and itext do not have wrapping, return false
|
|
26129
|
+
* @param {Number} lineIndex text to split
|
|
26130
|
+
* @return {Boolean}
|
|
25945
26131
|
*/
|
|
25946
26132
|
isEndOfWrapping(lineIndex) {
|
|
25947
26133
|
if (!this._styleMap[lineIndex + 1]) {
|
|
@@ -25955,12 +26141,12 @@ class Textbox extends IText {
|
|
|
25955
26141
|
return false;
|
|
25956
26142
|
}
|
|
25957
26143
|
|
|
25958
|
-
/**
|
|
25959
|
-
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
25960
|
-
* and counting style.
|
|
25961
|
-
* This is important only for splitByGrapheme at the end of wrapping.
|
|
25962
|
-
* If we are not wrapping the offset is always 1
|
|
25963
|
-
* @return Number
|
|
26144
|
+
/**
|
|
26145
|
+
* Detect if a line has a linebreak and so we need to account for it when moving
|
|
26146
|
+
* and counting style.
|
|
26147
|
+
* This is important only for splitByGrapheme at the end of wrapping.
|
|
26148
|
+
* If we are not wrapping the offset is always 1
|
|
26149
|
+
* @return Number
|
|
25964
26150
|
*/
|
|
25965
26151
|
missingNewlineOffset(lineIndex, skipWrapping) {
|
|
25966
26152
|
if (this.splitByGrapheme && !skipWrapping) {
|
|
@@ -25969,12 +26155,12 @@ class Textbox extends IText {
|
|
|
25969
26155
|
return 1;
|
|
25970
26156
|
}
|
|
25971
26157
|
|
|
25972
|
-
/**
|
|
25973
|
-
* Gets lines of text to render in the Textbox. This function calculates
|
|
25974
|
-
* text wrapping on the fly every time it is called.
|
|
25975
|
-
* @param {String} text text to split
|
|
25976
|
-
* @returns {Array} Array of lines in the Textbox.
|
|
25977
|
-
* @override
|
|
26158
|
+
/**
|
|
26159
|
+
* Gets lines of text to render in the Textbox. This function calculates
|
|
26160
|
+
* text wrapping on the fly every time it is called.
|
|
26161
|
+
* @param {String} text text to split
|
|
26162
|
+
* @returns {Array} Array of lines in the Textbox.
|
|
26163
|
+
* @override
|
|
25978
26164
|
*/
|
|
25979
26165
|
_splitTextIntoLines(text) {
|
|
25980
26166
|
const newText = super._splitTextIntoLines(text),
|
|
@@ -26006,9 +26192,9 @@ class Textbox extends IText {
|
|
|
26006
26192
|
}
|
|
26007
26193
|
}
|
|
26008
26194
|
|
|
26009
|
-
/**
|
|
26010
|
-
* Initialize event listeners for safety snap functionality
|
|
26011
|
-
* @private
|
|
26195
|
+
/**
|
|
26196
|
+
* Initialize event listeners for safety snap functionality
|
|
26197
|
+
* @private
|
|
26012
26198
|
*/
|
|
26013
26199
|
initializeEventListeners() {
|
|
26014
26200
|
var _this$canvas;
|
|
@@ -26018,30 +26204,17 @@ class Textbox extends IText {
|
|
|
26018
26204
|
// Detect resize origin during resizing
|
|
26019
26205
|
this.on('resizing', e => {
|
|
26020
26206
|
// Check transform origin to determine which side is being resized
|
|
26021
|
-
console.log('🔍 Resize event data:', e);
|
|
26022
26207
|
if (e.transform) {
|
|
26023
26208
|
const {
|
|
26024
|
-
originX
|
|
26025
|
-
originY
|
|
26209
|
+
originX
|
|
26026
26210
|
} = e.transform;
|
|
26027
|
-
console.log('🔍 Transform origins:', {
|
|
26028
|
-
originX,
|
|
26029
|
-
originY
|
|
26030
|
-
});
|
|
26031
26211
|
// originX tells us which side is the anchor - opposite side is being dragged
|
|
26032
26212
|
resizeOrigin = originX === 'right' ? 'left' : originX === 'left' ? 'right' : null;
|
|
26033
|
-
console.log('🎯 Setting resizeOrigin to:', resizeOrigin);
|
|
26034
26213
|
} else if (e.originX) {
|
|
26035
26214
|
const {
|
|
26036
|
-
originX
|
|
26037
|
-
originY
|
|
26215
|
+
originX
|
|
26038
26216
|
} = e;
|
|
26039
|
-
console.log('🔍 Event origins:', {
|
|
26040
|
-
originX,
|
|
26041
|
-
originY
|
|
26042
|
-
});
|
|
26043
26217
|
resizeOrigin = originX === 'right' ? 'left' : originX === 'left' ? 'right' : null;
|
|
26044
|
-
console.log('🎯 Setting resizeOrigin to:', resizeOrigin);
|
|
26045
26218
|
}
|
|
26046
26219
|
});
|
|
26047
26220
|
|
|
@@ -26049,9 +26222,6 @@ class Textbox extends IText {
|
|
|
26049
26222
|
// Use 'modified' event which fires after user releases the mouse
|
|
26050
26223
|
this.on('modified', () => {
|
|
26051
26224
|
const currentResizeOrigin = resizeOrigin; // Capture the value before reset
|
|
26052
|
-
console.log('✅ Modified event fired - resize complete, triggering safety snap', {
|
|
26053
|
-
resizeOrigin: currentResizeOrigin
|
|
26054
|
-
});
|
|
26055
26225
|
// Small delay to ensure text layout is updated
|
|
26056
26226
|
setTimeout(() => this.safetySnapWidth(currentResizeOrigin), 10);
|
|
26057
26227
|
resizeOrigin = null; // Reset after capturing
|
|
@@ -26061,53 +26231,31 @@ class Textbox extends IText {
|
|
|
26061
26231
|
(_this$canvas = this.canvas) === null || _this$canvas === void 0 || _this$canvas.on('object:modified', e => {
|
|
26062
26232
|
if (e.target === this) {
|
|
26063
26233
|
const currentResizeOrigin = resizeOrigin; // Capture the value before reset
|
|
26064
|
-
console.log('✅ Canvas object:modified fired for this textbox');
|
|
26065
26234
|
setTimeout(() => this.safetySnapWidth(currentResizeOrigin), 10);
|
|
26066
26235
|
resizeOrigin = null; // Reset after capturing
|
|
26067
26236
|
}
|
|
26068
26237
|
});
|
|
26069
26238
|
}
|
|
26070
26239
|
|
|
26071
|
-
/**
|
|
26072
|
-
* Safety snap to prevent glyph clipping after manual resize.
|
|
26073
|
-
* Similar to Polotno - checks if any glyphs are too close to edges
|
|
26074
|
-
* and automatically expands width if needed.
|
|
26075
|
-
* @private
|
|
26076
|
-
* @param resizeOrigin - Which side was used for resizing ('left' or 'right')
|
|
26240
|
+
/**
|
|
26241
|
+
* Safety snap to prevent glyph clipping after manual resize.
|
|
26242
|
+
* Similar to Polotno - checks if any glyphs are too close to edges
|
|
26243
|
+
* and automatically expands width if needed.
|
|
26244
|
+
* @private
|
|
26245
|
+
* @param resizeOrigin - Which side was used for resizing ('left' or 'right')
|
|
26077
26246
|
*/
|
|
26078
26247
|
safetySnapWidth(resizeOrigin) {
|
|
26079
|
-
var _this$_textLines;
|
|
26080
|
-
console.log('🔍 safetySnapWidth called', {
|
|
26081
|
-
isWrapping: this.isWrapping,
|
|
26082
|
-
hasTextLines: !!this._textLines,
|
|
26083
|
-
lineCount: ((_this$_textLines = this._textLines) === null || _this$_textLines === void 0 ? void 0 : _this$_textLines.length) || 0,
|
|
26084
|
-
currentWidth: this.width,
|
|
26085
|
-
type: this.type,
|
|
26086
|
-
text: this.text
|
|
26087
|
-
});
|
|
26088
|
-
|
|
26089
26248
|
// For Textbox objects, we always want to check for clipping regardless of isWrapping flag
|
|
26090
26249
|
if (!this._textLines || this.type.toLowerCase() !== 'textbox' || this._textLines.length === 0) {
|
|
26091
|
-
var _this$_textLines2;
|
|
26092
|
-
console.log('❌ Early return - missing requirements', {
|
|
26093
|
-
hasTextLines: !!this._textLines,
|
|
26094
|
-
typeMatch: this.type.toLowerCase() === 'textbox',
|
|
26095
|
-
actualType: this.type,
|
|
26096
|
-
hasLines: ((_this$_textLines2 = this._textLines) === null || _this$_textLines2 === void 0 ? void 0 : _this$_textLines2.length) > 0
|
|
26097
|
-
});
|
|
26098
26250
|
return;
|
|
26099
26251
|
}
|
|
26100
26252
|
const lineCount = this._textLines.length;
|
|
26101
26253
|
if (lineCount === 0) return;
|
|
26102
|
-
|
|
26103
|
-
// Check all lines, not just the last one
|
|
26104
|
-
let maxActualLineWidth = 0; // Actual measured width without buffers
|
|
26105
26254
|
let maxRequiredWidth = 0; // Width including RTL buffer
|
|
26106
26255
|
|
|
26107
26256
|
for (let i = 0; i < lineCount; i++) {
|
|
26108
26257
|
const lineText = this._textLines[i].join(''); // Convert grapheme array to string
|
|
26109
26258
|
const lineWidth = this.getLineWidth(i);
|
|
26110
|
-
maxActualLineWidth = Math.max(maxActualLineWidth, lineWidth);
|
|
26111
26259
|
|
|
26112
26260
|
// RTL detection - regex for Arabic, Hebrew, and other RTL characters
|
|
26113
26261
|
const rtlRegex = /[\u0590-\u05FF\u0600-\u06FF\u0750-\u077F\uFB50-\uFDFF\uFE70-\uFEFF]/;
|
|
@@ -26127,11 +26275,6 @@ class Textbox extends IText {
|
|
|
26127
26275
|
var _this$canvas2;
|
|
26128
26276
|
// Set width to exactly what's needed + minimal safety margin
|
|
26129
26277
|
const newWidth = maxRequiredWidth + 1; // Add just 1px safety margin
|
|
26130
|
-
console.log(`Safety snap: ${this.width.toFixed(0)}px -> ${newWidth.toFixed(0)}px`, {
|
|
26131
|
-
maxActualLineWidth: maxActualLineWidth.toFixed(1),
|
|
26132
|
-
maxRequiredWidth: maxRequiredWidth.toFixed(1),
|
|
26133
|
-
difference: (newWidth - this.width).toFixed(1)
|
|
26134
|
-
});
|
|
26135
26278
|
|
|
26136
26279
|
// Store original position before width change
|
|
26137
26280
|
const originalLeft = this.left;
|
|
@@ -26147,19 +26290,12 @@ class Textbox extends IText {
|
|
|
26147
26290
|
// Only compensate position when resizing from left handle
|
|
26148
26291
|
// Right handle resize doesn't shift the text position
|
|
26149
26292
|
if (resizeOrigin === 'left') {
|
|
26150
|
-
console.log('🔧 Compensating for left-side resize', {
|
|
26151
|
-
originalLeft,
|
|
26152
|
-
widthIncrease,
|
|
26153
|
-
newLeft: originalLeft - widthIncrease
|
|
26154
|
-
});
|
|
26155
26293
|
// When resizing from left, the expansion pushes text right
|
|
26156
26294
|
// Compensate by moving the textbox left by the width increase
|
|
26157
26295
|
this.set({
|
|
26158
26296
|
'left': originalLeft - widthIncrease,
|
|
26159
26297
|
'top': originalTop
|
|
26160
26298
|
});
|
|
26161
|
-
} else {
|
|
26162
|
-
console.log('✅ Right-side resize, no compensation needed');
|
|
26163
26299
|
}
|
|
26164
26300
|
this.setCoords();
|
|
26165
26301
|
|
|
@@ -26173,31 +26309,31 @@ class Textbox extends IText {
|
|
|
26173
26309
|
}
|
|
26174
26310
|
}
|
|
26175
26311
|
|
|
26176
|
-
/**
|
|
26177
|
-
* Returns object representation of an instance
|
|
26178
|
-
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
26179
|
-
* @return {Object} object representation of an instance
|
|
26312
|
+
/**
|
|
26313
|
+
* Returns object representation of an instance
|
|
26314
|
+
* @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
|
|
26315
|
+
* @return {Object} object representation of an instance
|
|
26180
26316
|
*/
|
|
26181
26317
|
toObject() {
|
|
26182
26318
|
let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
26183
26319
|
return super.toObject(['minWidth', 'splitByGrapheme', ...propertiesToInclude]);
|
|
26184
26320
|
}
|
|
26185
26321
|
}
|
|
26186
|
-
/**
|
|
26187
|
-
* Minimum width of textbox, in pixels.
|
|
26188
|
-
* @type Number
|
|
26189
|
-
*/
|
|
26190
|
-
/**
|
|
26191
|
-
* Minimum calculated width of a textbox, in pixels.
|
|
26192
|
-
* fixed to 2 so that an empty textbox cannot go to 0
|
|
26193
|
-
* and is still selectable without text.
|
|
26194
|
-
* @type Number
|
|
26195
|
-
*/
|
|
26196
|
-
/**
|
|
26197
|
-
* Use this boolean property in order to split strings that have no white space concept.
|
|
26198
|
-
* this is a cheap way to help with chinese/japanese
|
|
26199
|
-
* @type Boolean
|
|
26200
|
-
* @since 2.6.0
|
|
26322
|
+
/**
|
|
26323
|
+
* Minimum width of textbox, in pixels.
|
|
26324
|
+
* @type Number
|
|
26325
|
+
*/
|
|
26326
|
+
/**
|
|
26327
|
+
* Minimum calculated width of a textbox, in pixels.
|
|
26328
|
+
* fixed to 2 so that an empty textbox cannot go to 0
|
|
26329
|
+
* and is still selectable without text.
|
|
26330
|
+
* @type Number
|
|
26331
|
+
*/
|
|
26332
|
+
/**
|
|
26333
|
+
* Use this boolean property in order to split strings that have no white space concept.
|
|
26334
|
+
* this is a cheap way to help with chinese/japanese
|
|
26335
|
+
* @type Boolean
|
|
26336
|
+
* @since 2.6.0
|
|
26201
26337
|
*/
|
|
26202
26338
|
_defineProperty(Textbox, "type", 'Textbox');
|
|
26203
26339
|
_defineProperty(Textbox, "textLayoutProperties", [...IText.textLayoutProperties, 'width']);
|