@nasser-sw/fabric 7.0.1-beta12 → 7.0.1-beta14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2538) hide show
  1. package/.babelrc +0 -0
  2. package/.babelrcAlt +0 -0
  3. package/.browserslistrc +0 -0
  4. package/.editorconfig +0 -0
  5. package/.gitattributes +0 -0
  6. package/.gitpod.yml +0 -0
  7. package/.prettierignore +0 -0
  8. package/.prettierrc +0 -0
  9. package/0 +0 -0
  10. package/CHANGELOG.md +0 -0
  11. package/CODE_OF_CONDUCT.md +0 -0
  12. package/CONTRIBUTING.md +0 -0
  13. package/LICENSE +0 -0
  14. package/OVERLAY_EDITOR_MIGRATION.md +0 -0
  15. package/README.md +0 -0
  16. package/SECURITY.md +0 -0
  17. package/debug/{konva-master → konva}/CHANGELOG.md +1 -2
  18. package/debug/{konva-master → konva}/LICENSE +0 -0
  19. package/debug/{konva-master → konva}/README.md +3 -7
  20. package/debug/{konva-master → konva}/gulpfile.mjs +0 -0
  21. package/debug/{konva-master → konva}/package.json +1 -1
  22. package/debug/{konva-master → konva}/release.sh +4 -1
  23. package/debug/{konva-master → konva}/resources/doc-includes/ContainerParams.txt +0 -0
  24. package/debug/{konva-master → konva}/resources/doc-includes/NodeParams.txt +0 -0
  25. package/debug/{konva-master → konva}/resources/doc-includes/ShapeParams.txt +0 -0
  26. package/debug/{konva-master → konva}/resources/jsdoc.conf.json +0 -0
  27. package/debug/{konva-master → konva}/rollup.config.mjs +0 -0
  28. package/debug/{konva-master → konva}/src/Animation.ts +0 -0
  29. package/debug/{konva-master → konva}/src/BezierFunctions.ts +0 -0
  30. package/debug/{konva-master → konva}/src/Canvas.ts +0 -37
  31. package/debug/{konva-master → konva}/src/Container.ts +0 -0
  32. package/debug/{konva-master → konva}/src/Context.ts +0 -0
  33. package/debug/{konva-master → konva}/src/Core.ts +0 -0
  34. package/debug/{konva-master → konva}/src/DragAndDrop.ts +0 -0
  35. package/debug/{konva-master → konva}/src/Factory.ts +0 -0
  36. package/debug/{konva-master → konva}/src/FastLayer.ts +0 -0
  37. package/debug/{konva-master → konva}/src/Global.ts +0 -0
  38. package/debug/{konva-master → konva}/src/Group.ts +0 -0
  39. package/debug/{konva-master → konva}/src/Layer.ts +0 -0
  40. package/debug/{konva-master → konva}/src/Node.ts +0 -0
  41. package/debug/{konva-master → konva}/src/PointerEvents.ts +0 -0
  42. package/debug/{konva-master → konva}/src/Shape.ts +0 -0
  43. package/debug/{konva-master → konva}/src/Stage.ts +0 -0
  44. package/debug/{konva-master → konva}/src/Tween.ts +0 -0
  45. package/debug/{konva-master → konva}/src/Util.ts +0 -0
  46. package/debug/{konva-master → konva}/src/Validators.ts +0 -0
  47. package/debug/{konva-master → konva}/src/_CoreInternals.ts +0 -0
  48. package/debug/{konva-master → konva}/src/_FullInternals.ts +0 -0
  49. package/debug/{konva-master → konva}/src/canvas-backend.ts +0 -0
  50. package/debug/{konva-master → konva}/src/filters/Blur.ts +0 -0
  51. package/debug/{konva-master → konva}/src/filters/Brighten.ts +0 -0
  52. package/debug/{konva-master → konva}/src/filters/Brightness.ts +0 -0
  53. package/debug/{konva-master → konva}/src/filters/Contrast.ts +0 -0
  54. package/debug/{konva-master → konva}/src/filters/Emboss.ts +0 -0
  55. package/debug/{konva-master → konva}/src/filters/Enhance.ts +0 -0
  56. package/debug/{konva-master → konva}/src/filters/Grayscale.ts +0 -0
  57. package/debug/{konva-master → konva}/src/filters/HSL.ts +0 -0
  58. package/debug/{konva-master → konva}/src/filters/HSV.ts +0 -0
  59. package/debug/{konva-master → konva}/src/filters/Invert.ts +0 -0
  60. package/debug/{konva-master → konva}/src/filters/Kaleidoscope.ts +0 -0
  61. package/debug/{konva-master → konva}/src/filters/Mask.ts +0 -0
  62. package/debug/{konva-master → konva}/src/filters/Noise.ts +0 -0
  63. package/debug/{konva-master → konva}/src/filters/Pixelate.ts +0 -0
  64. package/debug/{konva-master → konva}/src/filters/Posterize.ts +0 -0
  65. package/debug/{konva-master → konva}/src/filters/RGB.ts +0 -0
  66. package/debug/{konva-master → konva}/src/filters/RGBA.ts +0 -0
  67. package/debug/{konva-master → konva}/src/filters/Sepia.ts +0 -0
  68. package/debug/{konva-master → konva}/src/filters/Solarize.ts +0 -0
  69. package/debug/{konva-master → konva}/src/filters/Threshold.ts +0 -0
  70. package/debug/{konva-master → konva}/src/index.ts +0 -0
  71. package/debug/{konva-master → konva}/src/shapes/Arc.ts +0 -0
  72. package/debug/{konva-master → konva}/src/shapes/Arrow.ts +0 -0
  73. package/debug/{konva-master → konva}/src/shapes/Circle.ts +0 -0
  74. package/debug/{konva-master → konva}/src/shapes/Ellipse.ts +0 -0
  75. package/debug/{konva-master → konva}/src/shapes/Image.ts +0 -0
  76. package/debug/{konva-master → konva}/src/shapes/Label.ts +0 -0
  77. package/debug/{konva-master → konva}/src/shapes/Line.ts +0 -0
  78. package/debug/{konva-master → konva}/src/shapes/Path.ts +0 -0
  79. package/debug/{konva-master → konva}/src/shapes/Rect.ts +0 -0
  80. package/debug/{konva-master → konva}/src/shapes/RegularPolygon.ts +0 -0
  81. package/debug/{konva-master → konva}/src/shapes/Ring.ts +0 -0
  82. package/debug/{konva-master → konva}/src/shapes/Sprite.ts +0 -0
  83. package/debug/{konva-master → konva}/src/shapes/Star.ts +0 -0
  84. package/debug/{konva-master → konva}/src/shapes/Text.ts +2 -2
  85. package/debug/{konva-master → konva}/src/shapes/TextPath.ts +0 -0
  86. package/debug/{konva-master → konva}/src/shapes/Transformer.ts +0 -0
  87. package/debug/{konva-master → konva}/src/shapes/Wedge.ts +0 -0
  88. package/debug/{konva-master → konva}/src/skia-backend.ts +0 -0
  89. package/debug/{konva-master → konva}/src/types.ts +0 -0
  90. package/debug/{konva-master → konva}/tsconfig.json +0 -0
  91. package/debug/{konva-master → konva}/tsconfig.test.json +0 -0
  92. package/dist/_virtual/_rollupPluginBabelHelpers.min.mjs +0 -0
  93. package/dist/_virtual/_rollupPluginBabelHelpers.min.mjs.map +0 -0
  94. package/dist/_virtual/_rollupPluginBabelHelpers.mjs +0 -0
  95. package/dist/_virtual/_rollupPluginBabelHelpers.mjs.map +0 -0
  96. package/dist/extensions/aligning_guidelines/constant.d.ts +0 -0
  97. package/dist/extensions/aligning_guidelines/constant.d.ts.map +0 -0
  98. package/dist/extensions/aligning_guidelines/index.d.ts +0 -0
  99. package/dist/extensions/aligning_guidelines/index.d.ts.map +0 -0
  100. package/dist/extensions/aligning_guidelines/typedefs.d.ts +0 -0
  101. package/dist/extensions/aligning_guidelines/typedefs.d.ts.map +0 -0
  102. package/dist/extensions/aligning_guidelines/util/basic.d.ts +0 -0
  103. package/dist/extensions/aligning_guidelines/util/basic.d.ts.map +0 -0
  104. package/dist/extensions/aligning_guidelines/util/collect-line.d.ts +0 -0
  105. package/dist/extensions/aligning_guidelines/util/collect-line.d.ts.map +0 -0
  106. package/dist/extensions/aligning_guidelines/util/collect-point.d.ts +0 -0
  107. package/dist/extensions/aligning_guidelines/util/collect-point.d.ts.map +0 -0
  108. package/dist/extensions/aligning_guidelines/util/draw.d.ts +0 -0
  109. package/dist/extensions/aligning_guidelines/util/draw.d.ts.map +0 -0
  110. package/dist/extensions/aligning_guidelines/util/get-objects-by-target.d.ts +0 -0
  111. package/dist/extensions/aligning_guidelines/util/get-objects-by-target.d.ts.map +0 -0
  112. package/dist/extensions/data_updaters/gradient/index.d.ts +0 -0
  113. package/dist/extensions/data_updaters/gradient/index.d.ts.map +0 -0
  114. package/dist/extensions/data_updaters/origins/index.d.ts +0 -0
  115. package/dist/extensions/data_updaters/origins/index.d.ts.map +0 -0
  116. package/dist/extensions/index.d.ts +0 -0
  117. package/dist/extensions/index.d.ts.map +0 -0
  118. package/dist/fabric.d.ts +0 -0
  119. package/dist/fabric.d.ts.map +0 -0
  120. package/dist/fabric.min.mjs +0 -0
  121. package/dist/fabric.min.mjs.map +0 -0
  122. package/dist/fabric.mjs +0 -0
  123. package/dist/fabric.mjs.map +0 -0
  124. package/dist/index.d.ts +0 -0
  125. package/dist/index.d.ts.map +0 -0
  126. package/dist/index.js +1588 -1199
  127. package/dist/index.js.map +1 -1
  128. package/dist/index.min.js +1 -1
  129. package/dist/index.min.js.map +1 -1
  130. package/dist/index.min.mjs +1 -1
  131. package/dist/index.min.mjs.map +1 -1
  132. package/dist/index.mjs +1588 -1199
  133. package/dist/index.mjs.map +1 -1
  134. package/dist/index.node.cjs +1588 -1199
  135. package/dist/index.node.cjs.map +1 -1
  136. package/dist/index.node.d.ts +0 -0
  137. package/dist/index.node.d.ts.map +0 -0
  138. package/dist/index.node.mjs +1588 -1199
  139. package/dist/index.node.mjs.map +1 -1
  140. package/dist/package.json.min.mjs +1 -1
  141. package/dist/package.json.min.mjs.map +0 -0
  142. package/dist/package.json.mjs +1 -1
  143. package/dist/package.json.mjs.map +0 -0
  144. package/dist/src/ClassRegistry.d.ts +0 -0
  145. package/dist/src/ClassRegistry.d.ts.map +0 -0
  146. package/dist/src/ClassRegistry.min.mjs +0 -0
  147. package/dist/src/ClassRegistry.min.mjs.map +0 -0
  148. package/dist/src/ClassRegistry.mjs +0 -0
  149. package/dist/src/ClassRegistry.mjs.map +0 -0
  150. package/dist/src/Collection.d.ts +0 -0
  151. package/dist/src/Collection.d.ts.map +0 -0
  152. package/dist/src/Collection.min.mjs +0 -0
  153. package/dist/src/Collection.min.mjs.map +0 -0
  154. package/dist/src/Collection.mjs +0 -0
  155. package/dist/src/Collection.mjs.map +0 -0
  156. package/dist/src/CommonMethods.d.ts +0 -0
  157. package/dist/src/CommonMethods.d.ts.map +0 -0
  158. package/dist/src/CommonMethods.min.mjs +0 -0
  159. package/dist/src/CommonMethods.min.mjs.map +0 -0
  160. package/dist/src/CommonMethods.mjs +0 -0
  161. package/dist/src/CommonMethods.mjs.map +0 -0
  162. package/dist/src/EventTypeDefs.d.ts +0 -0
  163. package/dist/src/EventTypeDefs.d.ts.map +0 -0
  164. package/dist/src/Intersection.d.ts +0 -0
  165. package/dist/src/Intersection.d.ts.map +0 -0
  166. package/dist/src/Intersection.min.mjs +0 -0
  167. package/dist/src/Intersection.min.mjs.map +0 -0
  168. package/dist/src/Intersection.mjs +0 -0
  169. package/dist/src/Intersection.mjs.map +0 -0
  170. package/dist/src/LayoutManager/ActiveSelectionLayoutManager.d.ts +0 -0
  171. package/dist/src/LayoutManager/ActiveSelectionLayoutManager.d.ts.map +0 -0
  172. package/dist/src/LayoutManager/ActiveSelectionLayoutManager.min.mjs +0 -0
  173. package/dist/src/LayoutManager/ActiveSelectionLayoutManager.min.mjs.map +0 -0
  174. package/dist/src/LayoutManager/ActiveSelectionLayoutManager.mjs +0 -0
  175. package/dist/src/LayoutManager/ActiveSelectionLayoutManager.mjs.map +0 -0
  176. package/dist/src/LayoutManager/LayoutManager.d.ts +0 -0
  177. package/dist/src/LayoutManager/LayoutManager.d.ts.map +0 -0
  178. package/dist/src/LayoutManager/LayoutManager.min.mjs +0 -0
  179. package/dist/src/LayoutManager/LayoutManager.min.mjs.map +0 -0
  180. package/dist/src/LayoutManager/LayoutManager.mjs +0 -0
  181. package/dist/src/LayoutManager/LayoutManager.mjs.map +0 -0
  182. package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.d.ts +0 -0
  183. package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.d.ts.map +0 -0
  184. package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.min.mjs +0 -0
  185. package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.min.mjs.map +0 -0
  186. package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.mjs +0 -0
  187. package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.mjs.map +0 -0
  188. package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.d.ts +0 -0
  189. package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.d.ts.map +0 -0
  190. package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.min.mjs +0 -0
  191. package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.min.mjs.map +0 -0
  192. package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.mjs +0 -0
  193. package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.mjs.map +0 -0
  194. package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.d.ts +0 -0
  195. package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.d.ts.map +0 -0
  196. package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.min.mjs +0 -0
  197. package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.min.mjs.map +0 -0
  198. package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.mjs +0 -0
  199. package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.mjs.map +0 -0
  200. package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.d.ts +0 -0
  201. package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.d.ts.map +0 -0
  202. package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.min.mjs +0 -0
  203. package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.min.mjs.map +0 -0
  204. package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.mjs +0 -0
  205. package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.mjs.map +0 -0
  206. package/dist/src/LayoutManager/LayoutStrategies/utils.d.ts +0 -0
  207. package/dist/src/LayoutManager/LayoutStrategies/utils.d.ts.map +0 -0
  208. package/dist/src/LayoutManager/LayoutStrategies/utils.min.mjs +0 -0
  209. package/dist/src/LayoutManager/LayoutStrategies/utils.min.mjs.map +0 -0
  210. package/dist/src/LayoutManager/LayoutStrategies/utils.mjs +0 -0
  211. package/dist/src/LayoutManager/LayoutStrategies/utils.mjs.map +0 -0
  212. package/dist/src/LayoutManager/constants.d.ts +0 -0
  213. package/dist/src/LayoutManager/constants.d.ts.map +0 -0
  214. package/dist/src/LayoutManager/constants.min.mjs +0 -0
  215. package/dist/src/LayoutManager/constants.min.mjs.map +0 -0
  216. package/dist/src/LayoutManager/constants.mjs +0 -0
  217. package/dist/src/LayoutManager/constants.mjs.map +0 -0
  218. package/dist/src/LayoutManager/index.d.ts +0 -0
  219. package/dist/src/LayoutManager/index.d.ts.map +0 -0
  220. package/dist/src/LayoutManager/types.d.ts +0 -0
  221. package/dist/src/LayoutManager/types.d.ts.map +0 -0
  222. package/dist/src/Observable.d.ts +0 -0
  223. package/dist/src/Observable.d.ts.map +0 -0
  224. package/dist/src/Observable.min.mjs +0 -0
  225. package/dist/src/Observable.min.mjs.map +0 -0
  226. package/dist/src/Observable.mjs +0 -0
  227. package/dist/src/Observable.mjs.map +0 -0
  228. package/dist/src/Pattern/Pattern.d.ts +0 -0
  229. package/dist/src/Pattern/Pattern.d.ts.map +0 -0
  230. package/dist/src/Pattern/Pattern.min.mjs +0 -0
  231. package/dist/src/Pattern/Pattern.min.mjs.map +0 -0
  232. package/dist/src/Pattern/Pattern.mjs +0 -0
  233. package/dist/src/Pattern/Pattern.mjs.map +0 -0
  234. package/dist/src/Pattern/index.d.ts +0 -0
  235. package/dist/src/Pattern/index.d.ts.map +0 -0
  236. package/dist/src/Pattern/types.d.ts +0 -0
  237. package/dist/src/Pattern/types.d.ts.map +0 -0
  238. package/dist/src/Point.d.ts +0 -0
  239. package/dist/src/Point.d.ts.map +0 -0
  240. package/dist/src/Point.min.mjs +0 -0
  241. package/dist/src/Point.min.mjs.map +0 -0
  242. package/dist/src/Point.mjs +0 -0
  243. package/dist/src/Point.mjs.map +0 -0
  244. package/dist/src/Shadow.d.ts +0 -0
  245. package/dist/src/Shadow.d.ts.map +0 -0
  246. package/dist/src/Shadow.min.mjs +0 -0
  247. package/dist/src/Shadow.min.mjs.map +0 -0
  248. package/dist/src/Shadow.mjs +0 -0
  249. package/dist/src/Shadow.mjs.map +0 -0
  250. package/dist/src/brushes/BaseBrush.d.ts +0 -0
  251. package/dist/src/brushes/BaseBrush.d.ts.map +0 -0
  252. package/dist/src/brushes/BaseBrush.min.mjs +0 -0
  253. package/dist/src/brushes/BaseBrush.min.mjs.map +0 -0
  254. package/dist/src/brushes/BaseBrush.mjs +0 -0
  255. package/dist/src/brushes/BaseBrush.mjs.map +0 -0
  256. package/dist/src/brushes/CircleBrush.d.ts +0 -0
  257. package/dist/src/brushes/CircleBrush.d.ts.map +0 -0
  258. package/dist/src/brushes/CircleBrush.min.mjs +0 -0
  259. package/dist/src/brushes/CircleBrush.min.mjs.map +0 -0
  260. package/dist/src/brushes/CircleBrush.mjs +0 -0
  261. package/dist/src/brushes/CircleBrush.mjs.map +0 -0
  262. package/dist/src/brushes/PatternBrush.d.ts +0 -0
  263. package/dist/src/brushes/PatternBrush.d.ts.map +0 -0
  264. package/dist/src/brushes/PatternBrush.min.mjs +0 -0
  265. package/dist/src/brushes/PatternBrush.min.mjs.map +0 -0
  266. package/dist/src/brushes/PatternBrush.mjs +0 -0
  267. package/dist/src/brushes/PatternBrush.mjs.map +0 -0
  268. package/dist/src/brushes/PencilBrush.d.ts +0 -0
  269. package/dist/src/brushes/PencilBrush.d.ts.map +0 -0
  270. package/dist/src/brushes/PencilBrush.min.mjs +0 -0
  271. package/dist/src/brushes/PencilBrush.min.mjs.map +0 -0
  272. package/dist/src/brushes/PencilBrush.mjs +0 -0
  273. package/dist/src/brushes/PencilBrush.mjs.map +0 -0
  274. package/dist/src/brushes/SprayBrush.d.ts +0 -0
  275. package/dist/src/brushes/SprayBrush.d.ts.map +0 -0
  276. package/dist/src/brushes/SprayBrush.min.mjs +0 -0
  277. package/dist/src/brushes/SprayBrush.min.mjs.map +0 -0
  278. package/dist/src/brushes/SprayBrush.mjs +0 -0
  279. package/dist/src/brushes/SprayBrush.mjs.map +0 -0
  280. package/dist/src/brushes/typedefs.d.ts +0 -0
  281. package/dist/src/brushes/typedefs.d.ts.map +0 -0
  282. package/dist/src/cache.d.ts +0 -0
  283. package/dist/src/cache.d.ts.map +0 -0
  284. package/dist/src/cache.min.mjs +0 -0
  285. package/dist/src/cache.min.mjs.map +0 -0
  286. package/dist/src/cache.mjs +0 -0
  287. package/dist/src/cache.mjs.map +0 -0
  288. package/dist/src/canvas/Canvas.d.ts +0 -0
  289. package/dist/src/canvas/Canvas.d.ts.map +0 -0
  290. package/dist/src/canvas/Canvas.min.mjs +0 -0
  291. package/dist/src/canvas/Canvas.min.mjs.map +0 -0
  292. package/dist/src/canvas/Canvas.mjs +0 -0
  293. package/dist/src/canvas/Canvas.mjs.map +0 -0
  294. package/dist/src/canvas/CanvasOptions.d.ts +0 -0
  295. package/dist/src/canvas/CanvasOptions.d.ts.map +0 -0
  296. package/dist/src/canvas/CanvasOptions.min.mjs +0 -0
  297. package/dist/src/canvas/CanvasOptions.min.mjs.map +0 -0
  298. package/dist/src/canvas/CanvasOptions.mjs +0 -0
  299. package/dist/src/canvas/CanvasOptions.mjs.map +0 -0
  300. package/dist/src/canvas/DOMManagers/CanvasDOMManager.d.ts +0 -0
  301. package/dist/src/canvas/DOMManagers/CanvasDOMManager.d.ts.map +0 -0
  302. package/dist/src/canvas/DOMManagers/CanvasDOMManager.min.mjs +0 -0
  303. package/dist/src/canvas/DOMManagers/CanvasDOMManager.min.mjs.map +0 -0
  304. package/dist/src/canvas/DOMManagers/CanvasDOMManager.mjs +0 -0
  305. package/dist/src/canvas/DOMManagers/CanvasDOMManager.mjs.map +0 -0
  306. package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.d.ts +0 -0
  307. package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.d.ts.map +0 -0
  308. package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.min.mjs +0 -0
  309. package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.min.mjs.map +0 -0
  310. package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.mjs +0 -0
  311. package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.mjs.map +0 -0
  312. package/dist/src/canvas/DOMManagers/util.d.ts +0 -0
  313. package/dist/src/canvas/DOMManagers/util.d.ts.map +0 -0
  314. package/dist/src/canvas/DOMManagers/util.min.mjs +0 -0
  315. package/dist/src/canvas/DOMManagers/util.min.mjs.map +0 -0
  316. package/dist/src/canvas/DOMManagers/util.mjs +0 -0
  317. package/dist/src/canvas/DOMManagers/util.mjs.map +0 -0
  318. package/dist/src/canvas/SelectableCanvas.d.ts +0 -0
  319. package/dist/src/canvas/SelectableCanvas.d.ts.map +0 -0
  320. package/dist/src/canvas/SelectableCanvas.min.mjs +0 -0
  321. package/dist/src/canvas/SelectableCanvas.min.mjs.map +0 -0
  322. package/dist/src/canvas/SelectableCanvas.mjs +0 -0
  323. package/dist/src/canvas/SelectableCanvas.mjs.map +0 -0
  324. package/dist/src/canvas/StaticCanvas.d.ts +0 -0
  325. package/dist/src/canvas/StaticCanvas.d.ts.map +0 -0
  326. package/dist/src/canvas/StaticCanvas.min.mjs +0 -0
  327. package/dist/src/canvas/StaticCanvas.min.mjs.map +0 -0
  328. package/dist/src/canvas/StaticCanvas.mjs +0 -0
  329. package/dist/src/canvas/StaticCanvas.mjs.map +0 -0
  330. package/dist/src/canvas/StaticCanvasOptions.d.ts +0 -0
  331. package/dist/src/canvas/StaticCanvasOptions.d.ts.map +0 -0
  332. package/dist/src/canvas/StaticCanvasOptions.min.mjs +0 -0
  333. package/dist/src/canvas/StaticCanvasOptions.min.mjs.map +0 -0
  334. package/dist/src/canvas/StaticCanvasOptions.mjs +0 -0
  335. package/dist/src/canvas/StaticCanvasOptions.mjs.map +0 -0
  336. package/dist/src/canvas/TextEditingManager.d.ts +0 -0
  337. package/dist/src/canvas/TextEditingManager.d.ts.map +0 -0
  338. package/dist/src/canvas/TextEditingManager.min.mjs +0 -0
  339. package/dist/src/canvas/TextEditingManager.min.mjs.map +0 -0
  340. package/dist/src/canvas/TextEditingManager.mjs +0 -0
  341. package/dist/src/canvas/TextEditingManager.mjs.map +0 -0
  342. package/dist/src/canvas/canvas_gestures.mixin.d.ts +0 -0
  343. package/dist/src/canvas/canvas_gestures.mixin.d.ts.map +0 -0
  344. package/dist/src/color/Color.d.ts +0 -0
  345. package/dist/src/color/Color.d.ts.map +0 -0
  346. package/dist/src/color/Color.min.mjs +0 -0
  347. package/dist/src/color/Color.min.mjs.map +0 -0
  348. package/dist/src/color/Color.mjs +0 -0
  349. package/dist/src/color/Color.mjs.map +0 -0
  350. package/dist/src/color/color_map.d.ts +0 -0
  351. package/dist/src/color/color_map.d.ts.map +0 -0
  352. package/dist/src/color/color_map.min.mjs +0 -0
  353. package/dist/src/color/color_map.min.mjs.map +0 -0
  354. package/dist/src/color/color_map.mjs +0 -0
  355. package/dist/src/color/color_map.mjs.map +0 -0
  356. package/dist/src/color/constants.d.ts +0 -0
  357. package/dist/src/color/constants.d.ts.map +0 -0
  358. package/dist/src/color/constants.min.mjs +0 -0
  359. package/dist/src/color/constants.min.mjs.map +0 -0
  360. package/dist/src/color/constants.mjs +0 -0
  361. package/dist/src/color/constants.mjs.map +0 -0
  362. package/dist/src/color/typedefs.d.ts +0 -0
  363. package/dist/src/color/typedefs.d.ts.map +0 -0
  364. package/dist/src/color/util.d.ts +0 -0
  365. package/dist/src/color/util.d.ts.map +0 -0
  366. package/dist/src/color/util.min.mjs +0 -0
  367. package/dist/src/color/util.min.mjs.map +0 -0
  368. package/dist/src/color/util.mjs +0 -0
  369. package/dist/src/color/util.mjs.map +0 -0
  370. package/dist/src/config.d.ts +0 -0
  371. package/dist/src/config.d.ts.map +0 -0
  372. package/dist/src/config.min.mjs +0 -0
  373. package/dist/src/config.min.mjs.map +0 -0
  374. package/dist/src/config.mjs +0 -0
  375. package/dist/src/config.mjs.map +0 -0
  376. package/dist/src/constants.d.ts +0 -0
  377. package/dist/src/constants.d.ts.map +0 -0
  378. package/dist/src/constants.min.mjs +0 -0
  379. package/dist/src/constants.min.mjs.map +0 -0
  380. package/dist/src/constants.mjs +0 -0
  381. package/dist/src/constants.mjs.map +0 -0
  382. package/dist/src/controls/Control.d.ts +0 -0
  383. package/dist/src/controls/Control.d.ts.map +0 -0
  384. package/dist/src/controls/Control.min.mjs +0 -0
  385. package/dist/src/controls/Control.min.mjs.map +0 -0
  386. package/dist/src/controls/Control.mjs +0 -0
  387. package/dist/src/controls/Control.mjs.map +0 -0
  388. package/dist/src/controls/changeHeight.d.ts +0 -0
  389. package/dist/src/controls/changeHeight.d.ts.map +0 -0
  390. package/dist/src/controls/changeHeight.min.mjs +2 -0
  391. package/dist/src/controls/changeHeight.min.mjs.map +1 -0
  392. package/dist/src/controls/changeHeight.mjs +36 -0
  393. package/dist/src/controls/changeHeight.mjs.map +1 -0
  394. package/dist/src/controls/changeWidth.d.ts +0 -0
  395. package/dist/src/controls/changeWidth.d.ts.map +0 -0
  396. package/dist/src/controls/changeWidth.min.mjs +0 -0
  397. package/dist/src/controls/changeWidth.min.mjs.map +0 -0
  398. package/dist/src/controls/changeWidth.mjs +0 -0
  399. package/dist/src/controls/changeWidth.mjs.map +0 -0
  400. package/dist/src/controls/commonControls.d.ts +0 -0
  401. package/dist/src/controls/commonControls.d.ts.map +0 -0
  402. package/dist/src/controls/commonControls.min.mjs +0 -0
  403. package/dist/src/controls/commonControls.min.mjs.map +0 -0
  404. package/dist/src/controls/commonControls.mjs +0 -0
  405. package/dist/src/controls/commonControls.mjs.map +0 -0
  406. package/dist/src/controls/controlRendering.d.ts +0 -0
  407. package/dist/src/controls/controlRendering.d.ts.map +0 -0
  408. package/dist/src/controls/controlRendering.min.mjs +0 -0
  409. package/dist/src/controls/controlRendering.min.mjs.map +0 -0
  410. package/dist/src/controls/controlRendering.mjs +0 -0
  411. package/dist/src/controls/controlRendering.mjs.map +0 -0
  412. package/dist/src/controls/drag.d.ts +0 -0
  413. package/dist/src/controls/drag.d.ts.map +0 -0
  414. package/dist/src/controls/drag.min.mjs +0 -0
  415. package/dist/src/controls/drag.min.mjs.map +0 -0
  416. package/dist/src/controls/drag.mjs +0 -0
  417. package/dist/src/controls/drag.mjs.map +0 -0
  418. package/dist/src/controls/fireEvent.d.ts +0 -0
  419. package/dist/src/controls/fireEvent.d.ts.map +0 -0
  420. package/dist/src/controls/fireEvent.min.mjs +0 -0
  421. package/dist/src/controls/fireEvent.min.mjs.map +0 -0
  422. package/dist/src/controls/fireEvent.mjs +0 -0
  423. package/dist/src/controls/fireEvent.mjs.map +0 -0
  424. package/dist/src/controls/index.d.ts +0 -0
  425. package/dist/src/controls/index.d.ts.map +0 -0
  426. package/dist/src/controls/index.min.mjs +0 -0
  427. package/dist/src/controls/index.min.mjs.map +0 -0
  428. package/dist/src/controls/index.mjs +0 -0
  429. package/dist/src/controls/index.mjs.map +0 -0
  430. package/dist/src/controls/pathControl.d.ts +0 -0
  431. package/dist/src/controls/pathControl.d.ts.map +0 -0
  432. package/dist/src/controls/pathControl.min.mjs +0 -0
  433. package/dist/src/controls/pathControl.min.mjs.map +0 -0
  434. package/dist/src/controls/pathControl.mjs +0 -0
  435. package/dist/src/controls/pathControl.mjs.map +0 -0
  436. package/dist/src/controls/polyControl.d.ts +0 -0
  437. package/dist/src/controls/polyControl.d.ts.map +0 -0
  438. package/dist/src/controls/polyControl.min.mjs +0 -0
  439. package/dist/src/controls/polyControl.min.mjs.map +0 -0
  440. package/dist/src/controls/polyControl.mjs +0 -0
  441. package/dist/src/controls/polyControl.mjs.map +0 -0
  442. package/dist/src/controls/rotate.d.ts +0 -0
  443. package/dist/src/controls/rotate.d.ts.map +0 -0
  444. package/dist/src/controls/rotate.min.mjs +0 -0
  445. package/dist/src/controls/rotate.min.mjs.map +0 -0
  446. package/dist/src/controls/rotate.mjs +0 -0
  447. package/dist/src/controls/rotate.mjs.map +0 -0
  448. package/dist/src/controls/scale.d.ts +0 -0
  449. package/dist/src/controls/scale.d.ts.map +0 -0
  450. package/dist/src/controls/scale.min.mjs +0 -0
  451. package/dist/src/controls/scale.min.mjs.map +0 -0
  452. package/dist/src/controls/scale.mjs +0 -0
  453. package/dist/src/controls/scale.mjs.map +0 -0
  454. package/dist/src/controls/scaleSkew.d.ts +0 -0
  455. package/dist/src/controls/scaleSkew.d.ts.map +0 -0
  456. package/dist/src/controls/scaleSkew.min.mjs +0 -0
  457. package/dist/src/controls/scaleSkew.min.mjs.map +0 -0
  458. package/dist/src/controls/scaleSkew.mjs +0 -0
  459. package/dist/src/controls/scaleSkew.mjs.map +0 -0
  460. package/dist/src/controls/skew.d.ts +0 -0
  461. package/dist/src/controls/skew.d.ts.map +0 -0
  462. package/dist/src/controls/skew.min.mjs +0 -0
  463. package/dist/src/controls/skew.min.mjs.map +0 -0
  464. package/dist/src/controls/skew.mjs +0 -0
  465. package/dist/src/controls/skew.mjs.map +0 -0
  466. package/dist/src/controls/util.d.ts +0 -0
  467. package/dist/src/controls/util.d.ts.map +0 -0
  468. package/dist/src/controls/util.min.mjs +0 -0
  469. package/dist/src/controls/util.min.mjs.map +0 -0
  470. package/dist/src/controls/util.mjs +0 -0
  471. package/dist/src/controls/util.mjs.map +0 -0
  472. package/dist/src/controls/wrapWithFireEvent.d.ts +0 -0
  473. package/dist/src/controls/wrapWithFireEvent.d.ts.map +0 -0
  474. package/dist/src/controls/wrapWithFireEvent.min.mjs +0 -0
  475. package/dist/src/controls/wrapWithFireEvent.min.mjs.map +0 -0
  476. package/dist/src/controls/wrapWithFireEvent.mjs +0 -0
  477. package/dist/src/controls/wrapWithFireEvent.mjs.map +0 -0
  478. package/dist/src/controls/wrapWithFixedAnchor.d.ts +0 -0
  479. package/dist/src/controls/wrapWithFixedAnchor.d.ts.map +0 -0
  480. package/dist/src/controls/wrapWithFixedAnchor.min.mjs +0 -0
  481. package/dist/src/controls/wrapWithFixedAnchor.min.mjs.map +0 -0
  482. package/dist/src/controls/wrapWithFixedAnchor.mjs +0 -0
  483. package/dist/src/controls/wrapWithFixedAnchor.mjs.map +0 -0
  484. package/dist/src/env/browser.d.ts +0 -0
  485. package/dist/src/env/browser.d.ts.map +0 -0
  486. package/dist/src/env/browser.min.mjs +0 -0
  487. package/dist/src/env/browser.min.mjs.map +0 -0
  488. package/dist/src/env/browser.mjs +0 -0
  489. package/dist/src/env/browser.mjs.map +0 -0
  490. package/dist/src/env/index.d.ts +0 -0
  491. package/dist/src/env/index.d.ts.map +0 -0
  492. package/dist/src/env/index.min.mjs +0 -0
  493. package/dist/src/env/index.min.mjs.map +0 -0
  494. package/dist/src/env/index.mjs +0 -0
  495. package/dist/src/env/index.mjs.map +0 -0
  496. package/dist/src/env/node.d.ts +0 -0
  497. package/dist/src/env/node.d.ts.map +0 -0
  498. package/dist/src/env/types.d.ts +0 -0
  499. package/dist/src/env/types.d.ts.map +0 -0
  500. package/dist/src/filters/BaseFilter.d.ts +0 -0
  501. package/dist/src/filters/BaseFilter.d.ts.map +0 -0
  502. package/dist/src/filters/BaseFilter.min.mjs +0 -0
  503. package/dist/src/filters/BaseFilter.min.mjs.map +0 -0
  504. package/dist/src/filters/BaseFilter.mjs +0 -0
  505. package/dist/src/filters/BaseFilter.mjs.map +0 -0
  506. package/dist/src/filters/BlendColor.d.ts +0 -0
  507. package/dist/src/filters/BlendColor.d.ts.map +0 -0
  508. package/dist/src/filters/BlendColor.min.mjs +0 -0
  509. package/dist/src/filters/BlendColor.min.mjs.map +0 -0
  510. package/dist/src/filters/BlendColor.mjs +0 -0
  511. package/dist/src/filters/BlendColor.mjs.map +0 -0
  512. package/dist/src/filters/BlendImage.d.ts +0 -0
  513. package/dist/src/filters/BlendImage.d.ts.map +0 -0
  514. package/dist/src/filters/BlendImage.min.mjs +0 -0
  515. package/dist/src/filters/BlendImage.min.mjs.map +0 -0
  516. package/dist/src/filters/BlendImage.mjs +0 -0
  517. package/dist/src/filters/BlendImage.mjs.map +0 -0
  518. package/dist/src/filters/Blur.d.ts +0 -0
  519. package/dist/src/filters/Blur.d.ts.map +0 -0
  520. package/dist/src/filters/Blur.min.mjs +0 -0
  521. package/dist/src/filters/Blur.min.mjs.map +0 -0
  522. package/dist/src/filters/Blur.mjs +0 -0
  523. package/dist/src/filters/Blur.mjs.map +0 -0
  524. package/dist/src/filters/Boilerplate.d.ts +0 -0
  525. package/dist/src/filters/Boilerplate.d.ts.map +0 -0
  526. package/dist/src/filters/Brightness.d.ts +0 -0
  527. package/dist/src/filters/Brightness.d.ts.map +0 -0
  528. package/dist/src/filters/Brightness.min.mjs +0 -0
  529. package/dist/src/filters/Brightness.min.mjs.map +0 -0
  530. package/dist/src/filters/Brightness.mjs +0 -0
  531. package/dist/src/filters/Brightness.mjs.map +0 -0
  532. package/dist/src/filters/Canvas2dFilterBackend.d.ts +0 -0
  533. package/dist/src/filters/Canvas2dFilterBackend.d.ts.map +0 -0
  534. package/dist/src/filters/Canvas2dFilterBackend.min.mjs +0 -0
  535. package/dist/src/filters/Canvas2dFilterBackend.min.mjs.map +0 -0
  536. package/dist/src/filters/Canvas2dFilterBackend.mjs +0 -0
  537. package/dist/src/filters/Canvas2dFilterBackend.mjs.map +0 -0
  538. package/dist/src/filters/ColorMatrix.d.ts +0 -0
  539. package/dist/src/filters/ColorMatrix.d.ts.map +0 -0
  540. package/dist/src/filters/ColorMatrix.min.mjs +0 -0
  541. package/dist/src/filters/ColorMatrix.min.mjs.map +0 -0
  542. package/dist/src/filters/ColorMatrix.mjs +0 -0
  543. package/dist/src/filters/ColorMatrix.mjs.map +0 -0
  544. package/dist/src/filters/ColorMatrixFilters.d.ts +0 -0
  545. package/dist/src/filters/ColorMatrixFilters.d.ts.map +0 -0
  546. package/dist/src/filters/ColorMatrixFilters.min.mjs +0 -0
  547. package/dist/src/filters/ColorMatrixFilters.min.mjs.map +0 -0
  548. package/dist/src/filters/ColorMatrixFilters.mjs +0 -0
  549. package/dist/src/filters/ColorMatrixFilters.mjs.map +0 -0
  550. package/dist/src/filters/Composed.d.ts +0 -0
  551. package/dist/src/filters/Composed.d.ts.map +0 -0
  552. package/dist/src/filters/Composed.min.mjs +0 -0
  553. package/dist/src/filters/Composed.min.mjs.map +0 -0
  554. package/dist/src/filters/Composed.mjs +0 -0
  555. package/dist/src/filters/Composed.mjs.map +0 -0
  556. package/dist/src/filters/Contrast.d.ts +0 -0
  557. package/dist/src/filters/Contrast.d.ts.map +0 -0
  558. package/dist/src/filters/Contrast.min.mjs +0 -0
  559. package/dist/src/filters/Contrast.min.mjs.map +0 -0
  560. package/dist/src/filters/Contrast.mjs +0 -0
  561. package/dist/src/filters/Contrast.mjs.map +0 -0
  562. package/dist/src/filters/Convolute.d.ts +0 -0
  563. package/dist/src/filters/Convolute.d.ts.map +0 -0
  564. package/dist/src/filters/Convolute.min.mjs +0 -0
  565. package/dist/src/filters/Convolute.min.mjs.map +0 -0
  566. package/dist/src/filters/Convolute.mjs +0 -0
  567. package/dist/src/filters/Convolute.mjs.map +0 -0
  568. package/dist/src/filters/FilterBackend.d.ts +0 -0
  569. package/dist/src/filters/FilterBackend.d.ts.map +0 -0
  570. package/dist/src/filters/FilterBackend.min.mjs +0 -0
  571. package/dist/src/filters/FilterBackend.min.mjs.map +0 -0
  572. package/dist/src/filters/FilterBackend.mjs +0 -0
  573. package/dist/src/filters/FilterBackend.mjs.map +0 -0
  574. package/dist/src/filters/GLProbes/GLProbe.d.ts +0 -0
  575. package/dist/src/filters/GLProbes/GLProbe.d.ts.map +0 -0
  576. package/dist/src/filters/GLProbes/GLProbe.min.mjs +0 -0
  577. package/dist/src/filters/GLProbes/GLProbe.min.mjs.map +0 -0
  578. package/dist/src/filters/GLProbes/GLProbe.mjs +0 -0
  579. package/dist/src/filters/GLProbes/GLProbe.mjs.map +0 -0
  580. package/dist/src/filters/GLProbes/NodeGLProbe.d.ts +0 -0
  581. package/dist/src/filters/GLProbes/NodeGLProbe.d.ts.map +0 -0
  582. package/dist/src/filters/GLProbes/WebGLProbe.d.ts +0 -0
  583. package/dist/src/filters/GLProbes/WebGLProbe.d.ts.map +0 -0
  584. package/dist/src/filters/GLProbes/WebGLProbe.min.mjs +0 -0
  585. package/dist/src/filters/GLProbes/WebGLProbe.min.mjs.map +0 -0
  586. package/dist/src/filters/GLProbes/WebGLProbe.mjs +0 -0
  587. package/dist/src/filters/GLProbes/WebGLProbe.mjs.map +0 -0
  588. package/dist/src/filters/Gamma.d.ts +0 -0
  589. package/dist/src/filters/Gamma.d.ts.map +0 -0
  590. package/dist/src/filters/Gamma.min.mjs +0 -0
  591. package/dist/src/filters/Gamma.min.mjs.map +0 -0
  592. package/dist/src/filters/Gamma.mjs +0 -0
  593. package/dist/src/filters/Gamma.mjs.map +0 -0
  594. package/dist/src/filters/Grayscale.d.ts +0 -0
  595. package/dist/src/filters/Grayscale.d.ts.map +0 -0
  596. package/dist/src/filters/Grayscale.min.mjs +0 -0
  597. package/dist/src/filters/Grayscale.min.mjs.map +0 -0
  598. package/dist/src/filters/Grayscale.mjs +0 -0
  599. package/dist/src/filters/Grayscale.mjs.map +0 -0
  600. package/dist/src/filters/HueRotation.d.ts +0 -0
  601. package/dist/src/filters/HueRotation.d.ts.map +0 -0
  602. package/dist/src/filters/HueRotation.min.mjs +0 -0
  603. package/dist/src/filters/HueRotation.min.mjs.map +0 -0
  604. package/dist/src/filters/HueRotation.mjs +0 -0
  605. package/dist/src/filters/HueRotation.mjs.map +0 -0
  606. package/dist/src/filters/Invert.d.ts +0 -0
  607. package/dist/src/filters/Invert.d.ts.map +0 -0
  608. package/dist/src/filters/Invert.min.mjs +0 -0
  609. package/dist/src/filters/Invert.min.mjs.map +0 -0
  610. package/dist/src/filters/Invert.mjs +0 -0
  611. package/dist/src/filters/Invert.mjs.map +0 -0
  612. package/dist/src/filters/Noise.d.ts +0 -0
  613. package/dist/src/filters/Noise.d.ts.map +0 -0
  614. package/dist/src/filters/Noise.min.mjs +0 -0
  615. package/dist/src/filters/Noise.min.mjs.map +0 -0
  616. package/dist/src/filters/Noise.mjs +0 -0
  617. package/dist/src/filters/Noise.mjs.map +0 -0
  618. package/dist/src/filters/Pixelate.d.ts +0 -0
  619. package/dist/src/filters/Pixelate.d.ts.map +0 -0
  620. package/dist/src/filters/Pixelate.min.mjs +0 -0
  621. package/dist/src/filters/Pixelate.min.mjs.map +0 -0
  622. package/dist/src/filters/Pixelate.mjs +0 -0
  623. package/dist/src/filters/Pixelate.mjs.map +0 -0
  624. package/dist/src/filters/RemoveColor.d.ts +0 -0
  625. package/dist/src/filters/RemoveColor.d.ts.map +0 -0
  626. package/dist/src/filters/RemoveColor.min.mjs +0 -0
  627. package/dist/src/filters/RemoveColor.min.mjs.map +0 -0
  628. package/dist/src/filters/RemoveColor.mjs +0 -0
  629. package/dist/src/filters/RemoveColor.mjs.map +0 -0
  630. package/dist/src/filters/Resize.d.ts +0 -0
  631. package/dist/src/filters/Resize.d.ts.map +0 -0
  632. package/dist/src/filters/Resize.min.mjs +0 -0
  633. package/dist/src/filters/Resize.min.mjs.map +0 -0
  634. package/dist/src/filters/Resize.mjs +0 -0
  635. package/dist/src/filters/Resize.mjs.map +0 -0
  636. package/dist/src/filters/Saturation.d.ts +0 -0
  637. package/dist/src/filters/Saturation.d.ts.map +0 -0
  638. package/dist/src/filters/Saturation.min.mjs +0 -0
  639. package/dist/src/filters/Saturation.min.mjs.map +0 -0
  640. package/dist/src/filters/Saturation.mjs +0 -0
  641. package/dist/src/filters/Saturation.mjs.map +0 -0
  642. package/dist/src/filters/Vibrance.d.ts +0 -0
  643. package/dist/src/filters/Vibrance.d.ts.map +0 -0
  644. package/dist/src/filters/Vibrance.min.mjs +0 -0
  645. package/dist/src/filters/Vibrance.min.mjs.map +0 -0
  646. package/dist/src/filters/Vibrance.mjs +0 -0
  647. package/dist/src/filters/Vibrance.mjs.map +0 -0
  648. package/dist/src/filters/WebGLFilterBackend.d.ts +0 -0
  649. package/dist/src/filters/WebGLFilterBackend.d.ts.map +0 -0
  650. package/dist/src/filters/WebGLFilterBackend.min.mjs +0 -0
  651. package/dist/src/filters/WebGLFilterBackend.min.mjs.map +0 -0
  652. package/dist/src/filters/WebGLFilterBackend.mjs +0 -0
  653. package/dist/src/filters/WebGLFilterBackend.mjs.map +0 -0
  654. package/dist/src/filters/filters.d.ts +0 -0
  655. package/dist/src/filters/filters.d.ts.map +0 -0
  656. package/dist/src/filters/filters.min.mjs +0 -0
  657. package/dist/src/filters/filters.min.mjs.map +0 -0
  658. package/dist/src/filters/filters.mjs +0 -0
  659. package/dist/src/filters/filters.mjs.map +0 -0
  660. package/dist/src/filters/index.d.ts +0 -0
  661. package/dist/src/filters/index.d.ts.map +0 -0
  662. package/dist/src/filters/shaders/baseFilter.d.ts +0 -0
  663. package/dist/src/filters/shaders/baseFilter.d.ts.map +0 -0
  664. package/dist/src/filters/shaders/baseFilter.min.mjs +0 -0
  665. package/dist/src/filters/shaders/baseFilter.min.mjs.map +0 -0
  666. package/dist/src/filters/shaders/baseFilter.mjs +0 -0
  667. package/dist/src/filters/shaders/baseFilter.mjs.map +0 -0
  668. package/dist/src/filters/shaders/blendColor.d.ts +0 -0
  669. package/dist/src/filters/shaders/blendColor.d.ts.map +0 -0
  670. package/dist/src/filters/shaders/blendColor.min.mjs +0 -0
  671. package/dist/src/filters/shaders/blendColor.min.mjs.map +0 -0
  672. package/dist/src/filters/shaders/blendColor.mjs +0 -0
  673. package/dist/src/filters/shaders/blendColor.mjs.map +0 -0
  674. package/dist/src/filters/shaders/blendImage.d.ts +0 -0
  675. package/dist/src/filters/shaders/blendImage.d.ts.map +0 -0
  676. package/dist/src/filters/shaders/blendImage.min.mjs +0 -0
  677. package/dist/src/filters/shaders/blendImage.min.mjs.map +0 -0
  678. package/dist/src/filters/shaders/blendImage.mjs +0 -0
  679. package/dist/src/filters/shaders/blendImage.mjs.map +0 -0
  680. package/dist/src/filters/shaders/blur.d.ts +0 -0
  681. package/dist/src/filters/shaders/blur.d.ts.map +0 -0
  682. package/dist/src/filters/shaders/blur.min.mjs +0 -0
  683. package/dist/src/filters/shaders/blur.min.mjs.map +0 -0
  684. package/dist/src/filters/shaders/blur.mjs +0 -0
  685. package/dist/src/filters/shaders/blur.mjs.map +0 -0
  686. package/dist/src/filters/shaders/brightness.d.ts +0 -0
  687. package/dist/src/filters/shaders/brightness.d.ts.map +0 -0
  688. package/dist/src/filters/shaders/brightness.min.mjs +0 -0
  689. package/dist/src/filters/shaders/brightness.min.mjs.map +0 -0
  690. package/dist/src/filters/shaders/brightness.mjs +0 -0
  691. package/dist/src/filters/shaders/brightness.mjs.map +0 -0
  692. package/dist/src/filters/shaders/colorMatrix.d.ts +0 -0
  693. package/dist/src/filters/shaders/colorMatrix.d.ts.map +0 -0
  694. package/dist/src/filters/shaders/colorMatrix.min.mjs +0 -0
  695. package/dist/src/filters/shaders/colorMatrix.min.mjs.map +0 -0
  696. package/dist/src/filters/shaders/colorMatrix.mjs +0 -0
  697. package/dist/src/filters/shaders/colorMatrix.mjs.map +0 -0
  698. package/dist/src/filters/shaders/constrast.d.ts +0 -0
  699. package/dist/src/filters/shaders/constrast.d.ts.map +0 -0
  700. package/dist/src/filters/shaders/constrast.min.mjs +0 -0
  701. package/dist/src/filters/shaders/constrast.min.mjs.map +0 -0
  702. package/dist/src/filters/shaders/constrast.mjs +0 -0
  703. package/dist/src/filters/shaders/constrast.mjs.map +0 -0
  704. package/dist/src/filters/shaders/convolute.d.ts +0 -0
  705. package/dist/src/filters/shaders/convolute.d.ts.map +0 -0
  706. package/dist/src/filters/shaders/convolute.min.mjs +0 -0
  707. package/dist/src/filters/shaders/convolute.min.mjs.map +0 -0
  708. package/dist/src/filters/shaders/convolute.mjs +0 -0
  709. package/dist/src/filters/shaders/convolute.mjs.map +0 -0
  710. package/dist/src/filters/shaders/gamma.d.ts +0 -0
  711. package/dist/src/filters/shaders/gamma.d.ts.map +0 -0
  712. package/dist/src/filters/shaders/gamma.min.mjs +0 -0
  713. package/dist/src/filters/shaders/gamma.min.mjs.map +0 -0
  714. package/dist/src/filters/shaders/gamma.mjs +0 -0
  715. package/dist/src/filters/shaders/gamma.mjs.map +0 -0
  716. package/dist/src/filters/shaders/grayscale.d.ts +0 -0
  717. package/dist/src/filters/shaders/grayscale.d.ts.map +0 -0
  718. package/dist/src/filters/shaders/grayscale.min.mjs +0 -0
  719. package/dist/src/filters/shaders/grayscale.min.mjs.map +0 -0
  720. package/dist/src/filters/shaders/grayscale.mjs +0 -0
  721. package/dist/src/filters/shaders/grayscale.mjs.map +0 -0
  722. package/dist/src/filters/shaders/invert.d.ts +0 -0
  723. package/dist/src/filters/shaders/invert.d.ts.map +0 -0
  724. package/dist/src/filters/shaders/invert.min.mjs +0 -0
  725. package/dist/src/filters/shaders/invert.min.mjs.map +0 -0
  726. package/dist/src/filters/shaders/invert.mjs +0 -0
  727. package/dist/src/filters/shaders/invert.mjs.map +0 -0
  728. package/dist/src/filters/shaders/noise.d.ts +0 -0
  729. package/dist/src/filters/shaders/noise.d.ts.map +0 -0
  730. package/dist/src/filters/shaders/noise.min.mjs +0 -0
  731. package/dist/src/filters/shaders/noise.min.mjs.map +0 -0
  732. package/dist/src/filters/shaders/noise.mjs +0 -0
  733. package/dist/src/filters/shaders/noise.mjs.map +0 -0
  734. package/dist/src/filters/shaders/pixelate.d.ts +0 -0
  735. package/dist/src/filters/shaders/pixelate.d.ts.map +0 -0
  736. package/dist/src/filters/shaders/pixelate.min.mjs +0 -0
  737. package/dist/src/filters/shaders/pixelate.min.mjs.map +0 -0
  738. package/dist/src/filters/shaders/pixelate.mjs +0 -0
  739. package/dist/src/filters/shaders/pixelate.mjs.map +0 -0
  740. package/dist/src/filters/shaders/removeColor.d.ts +0 -0
  741. package/dist/src/filters/shaders/removeColor.d.ts.map +0 -0
  742. package/dist/src/filters/shaders/removeColor.min.mjs +0 -0
  743. package/dist/src/filters/shaders/removeColor.min.mjs.map +0 -0
  744. package/dist/src/filters/shaders/removeColor.mjs +0 -0
  745. package/dist/src/filters/shaders/removeColor.mjs.map +0 -0
  746. package/dist/src/filters/shaders/saturation.d.ts +0 -0
  747. package/dist/src/filters/shaders/saturation.d.ts.map +0 -0
  748. package/dist/src/filters/shaders/saturation.min.mjs +0 -0
  749. package/dist/src/filters/shaders/saturation.min.mjs.map +0 -0
  750. package/dist/src/filters/shaders/saturation.mjs +0 -0
  751. package/dist/src/filters/shaders/saturation.mjs.map +0 -0
  752. package/dist/src/filters/shaders/vibrance.d.ts +0 -0
  753. package/dist/src/filters/shaders/vibrance.d.ts.map +0 -0
  754. package/dist/src/filters/shaders/vibrance.min.mjs +0 -0
  755. package/dist/src/filters/shaders/vibrance.min.mjs.map +0 -0
  756. package/dist/src/filters/shaders/vibrance.mjs +0 -0
  757. package/dist/src/filters/shaders/vibrance.mjs.map +0 -0
  758. package/dist/src/filters/typedefs.d.ts +0 -0
  759. package/dist/src/filters/typedefs.d.ts.map +0 -0
  760. package/dist/src/filters/utils.d.ts +0 -0
  761. package/dist/src/filters/utils.d.ts.map +0 -0
  762. package/dist/src/filters/utils.min.mjs +0 -0
  763. package/dist/src/filters/utils.min.mjs.map +0 -0
  764. package/dist/src/filters/utils.mjs +0 -0
  765. package/dist/src/filters/utils.mjs.map +0 -0
  766. package/dist/src/gradient/Gradient.d.ts +0 -0
  767. package/dist/src/gradient/Gradient.d.ts.map +0 -0
  768. package/dist/src/gradient/Gradient.min.mjs +0 -0
  769. package/dist/src/gradient/Gradient.min.mjs.map +0 -0
  770. package/dist/src/gradient/Gradient.mjs +0 -0
  771. package/dist/src/gradient/Gradient.mjs.map +0 -0
  772. package/dist/src/gradient/constants.d.ts +0 -0
  773. package/dist/src/gradient/constants.d.ts.map +0 -0
  774. package/dist/src/gradient/constants.min.mjs +0 -0
  775. package/dist/src/gradient/constants.min.mjs.map +0 -0
  776. package/dist/src/gradient/constants.mjs +0 -0
  777. package/dist/src/gradient/constants.mjs.map +0 -0
  778. package/dist/src/gradient/index.d.ts +0 -0
  779. package/dist/src/gradient/index.d.ts.map +0 -0
  780. package/dist/src/gradient/parser/misc.d.ts +0 -0
  781. package/dist/src/gradient/parser/misc.d.ts.map +0 -0
  782. package/dist/src/gradient/parser/misc.min.mjs +0 -0
  783. package/dist/src/gradient/parser/misc.min.mjs.map +0 -0
  784. package/dist/src/gradient/parser/misc.mjs +0 -0
  785. package/dist/src/gradient/parser/misc.mjs.map +0 -0
  786. package/dist/src/gradient/parser/parseColorStops.d.ts +0 -0
  787. package/dist/src/gradient/parser/parseColorStops.d.ts.map +0 -0
  788. package/dist/src/gradient/parser/parseColorStops.min.mjs +0 -0
  789. package/dist/src/gradient/parser/parseColorStops.min.mjs.map +0 -0
  790. package/dist/src/gradient/parser/parseColorStops.mjs +0 -0
  791. package/dist/src/gradient/parser/parseColorStops.mjs.map +0 -0
  792. package/dist/src/gradient/parser/parseCoords.d.ts +0 -0
  793. package/dist/src/gradient/parser/parseCoords.d.ts.map +0 -0
  794. package/dist/src/gradient/parser/parseCoords.min.mjs +0 -0
  795. package/dist/src/gradient/parser/parseCoords.min.mjs.map +0 -0
  796. package/dist/src/gradient/parser/parseCoords.mjs +0 -0
  797. package/dist/src/gradient/parser/parseCoords.mjs.map +0 -0
  798. package/dist/src/gradient/typedefs.d.ts +0 -0
  799. package/dist/src/gradient/typedefs.d.ts.map +0 -0
  800. package/dist/src/mixins/eraser_brush.mixin.d.ts +0 -0
  801. package/dist/src/mixins/eraser_brush.mixin.d.ts.map +0 -0
  802. package/dist/src/parkinglot/canvas_animation.mixin.d.ts +0 -0
  803. package/dist/src/parkinglot/canvas_animation.mixin.d.ts.map +0 -0
  804. package/dist/src/parkinglot/straighten.d.ts +0 -0
  805. package/dist/src/parkinglot/straighten.d.ts.map +0 -0
  806. package/dist/src/parser/applyViewboxTransform.d.ts +0 -0
  807. package/dist/src/parser/applyViewboxTransform.d.ts.map +0 -0
  808. package/dist/src/parser/applyViewboxTransform.min.mjs +0 -0
  809. package/dist/src/parser/applyViewboxTransform.min.mjs.map +0 -0
  810. package/dist/src/parser/applyViewboxTransform.mjs +0 -0
  811. package/dist/src/parser/applyViewboxTransform.mjs.map +0 -0
  812. package/dist/src/parser/attributes.d.ts +0 -0
  813. package/dist/src/parser/attributes.d.ts.map +0 -0
  814. package/dist/src/parser/attributes.min.mjs +0 -0
  815. package/dist/src/parser/attributes.min.mjs.map +0 -0
  816. package/dist/src/parser/attributes.mjs +0 -0
  817. package/dist/src/parser/attributes.mjs.map +0 -0
  818. package/dist/src/parser/constants.d.ts +0 -0
  819. package/dist/src/parser/constants.d.ts.map +0 -0
  820. package/dist/src/parser/constants.min.mjs +0 -0
  821. package/dist/src/parser/constants.min.mjs.map +0 -0
  822. package/dist/src/parser/constants.mjs +0 -0
  823. package/dist/src/parser/constants.mjs.map +0 -0
  824. package/dist/src/parser/doesSomeParentMatch.d.ts +0 -0
  825. package/dist/src/parser/doesSomeParentMatch.d.ts.map +0 -0
  826. package/dist/src/parser/doesSomeParentMatch.min.mjs +0 -0
  827. package/dist/src/parser/doesSomeParentMatch.min.mjs.map +0 -0
  828. package/dist/src/parser/doesSomeParentMatch.mjs +0 -0
  829. package/dist/src/parser/doesSomeParentMatch.mjs.map +0 -0
  830. package/dist/src/parser/elementMatchesRule.d.ts +0 -0
  831. package/dist/src/parser/elementMatchesRule.d.ts.map +0 -0
  832. package/dist/src/parser/elementMatchesRule.min.mjs +0 -0
  833. package/dist/src/parser/elementMatchesRule.min.mjs.map +0 -0
  834. package/dist/src/parser/elementMatchesRule.mjs +0 -0
  835. package/dist/src/parser/elementMatchesRule.mjs.map +0 -0
  836. package/dist/src/parser/elements_parser.d.ts +0 -0
  837. package/dist/src/parser/elements_parser.d.ts.map +0 -0
  838. package/dist/src/parser/elements_parser.min.mjs +0 -0
  839. package/dist/src/parser/elements_parser.min.mjs.map +0 -0
  840. package/dist/src/parser/elements_parser.mjs +0 -0
  841. package/dist/src/parser/elements_parser.mjs.map +0 -0
  842. package/dist/src/parser/getCSSRules.d.ts +0 -0
  843. package/dist/src/parser/getCSSRules.d.ts.map +0 -0
  844. package/dist/src/parser/getCSSRules.min.mjs +0 -0
  845. package/dist/src/parser/getCSSRules.min.mjs.map +0 -0
  846. package/dist/src/parser/getCSSRules.mjs +0 -0
  847. package/dist/src/parser/getCSSRules.mjs.map +0 -0
  848. package/dist/src/parser/getGlobalStylesForElement.d.ts +0 -0
  849. package/dist/src/parser/getGlobalStylesForElement.d.ts.map +0 -0
  850. package/dist/src/parser/getGlobalStylesForElement.min.mjs +0 -0
  851. package/dist/src/parser/getGlobalStylesForElement.min.mjs.map +0 -0
  852. package/dist/src/parser/getGlobalStylesForElement.mjs +0 -0
  853. package/dist/src/parser/getGlobalStylesForElement.mjs.map +0 -0
  854. package/dist/src/parser/getGradientDefs.d.ts +0 -0
  855. package/dist/src/parser/getGradientDefs.d.ts.map +0 -0
  856. package/dist/src/parser/getGradientDefs.min.mjs +0 -0
  857. package/dist/src/parser/getGradientDefs.min.mjs.map +0 -0
  858. package/dist/src/parser/getGradientDefs.mjs +0 -0
  859. package/dist/src/parser/getGradientDefs.mjs.map +0 -0
  860. package/dist/src/parser/getMultipleNodes.d.ts +0 -0
  861. package/dist/src/parser/getMultipleNodes.d.ts.map +0 -0
  862. package/dist/src/parser/getMultipleNodes.min.mjs +0 -0
  863. package/dist/src/parser/getMultipleNodes.min.mjs.map +0 -0
  864. package/dist/src/parser/getMultipleNodes.mjs +0 -0
  865. package/dist/src/parser/getMultipleNodes.mjs.map +0 -0
  866. package/dist/src/parser/getSvgRegex.d.ts +0 -0
  867. package/dist/src/parser/getSvgRegex.d.ts.map +0 -0
  868. package/dist/src/parser/getSvgRegex.min.mjs +0 -0
  869. package/dist/src/parser/getSvgRegex.min.mjs.map +0 -0
  870. package/dist/src/parser/getSvgRegex.mjs +0 -0
  871. package/dist/src/parser/getSvgRegex.mjs.map +0 -0
  872. package/dist/src/parser/getTagName.d.ts +0 -0
  873. package/dist/src/parser/getTagName.d.ts.map +0 -0
  874. package/dist/src/parser/getTagName.min.mjs +0 -0
  875. package/dist/src/parser/getTagName.min.mjs.map +0 -0
  876. package/dist/src/parser/getTagName.mjs +0 -0
  877. package/dist/src/parser/getTagName.mjs.map +0 -0
  878. package/dist/src/parser/hasInvalidAncestor.d.ts +0 -0
  879. package/dist/src/parser/hasInvalidAncestor.d.ts.map +0 -0
  880. package/dist/src/parser/hasInvalidAncestor.min.mjs +0 -0
  881. package/dist/src/parser/hasInvalidAncestor.min.mjs.map +0 -0
  882. package/dist/src/parser/hasInvalidAncestor.mjs +0 -0
  883. package/dist/src/parser/hasInvalidAncestor.mjs.map +0 -0
  884. package/dist/src/parser/loadSVGFromString.d.ts +0 -0
  885. package/dist/src/parser/loadSVGFromString.d.ts.map +0 -0
  886. package/dist/src/parser/loadSVGFromString.min.mjs +0 -0
  887. package/dist/src/parser/loadSVGFromString.min.mjs.map +0 -0
  888. package/dist/src/parser/loadSVGFromString.mjs +0 -0
  889. package/dist/src/parser/loadSVGFromString.mjs.map +0 -0
  890. package/dist/src/parser/loadSVGFromURL.d.ts +0 -0
  891. package/dist/src/parser/loadSVGFromURL.d.ts.map +0 -0
  892. package/dist/src/parser/loadSVGFromURL.min.mjs +0 -0
  893. package/dist/src/parser/loadSVGFromURL.min.mjs.map +0 -0
  894. package/dist/src/parser/loadSVGFromURL.mjs +0 -0
  895. package/dist/src/parser/loadSVGFromURL.mjs.map +0 -0
  896. package/dist/src/parser/normalizeAttr.d.ts +0 -0
  897. package/dist/src/parser/normalizeAttr.d.ts.map +0 -0
  898. package/dist/src/parser/normalizeAttr.min.mjs +0 -0
  899. package/dist/src/parser/normalizeAttr.min.mjs.map +0 -0
  900. package/dist/src/parser/normalizeAttr.mjs +0 -0
  901. package/dist/src/parser/normalizeAttr.mjs.map +0 -0
  902. package/dist/src/parser/normalizeValue.d.ts +0 -0
  903. package/dist/src/parser/normalizeValue.d.ts.map +0 -0
  904. package/dist/src/parser/normalizeValue.min.mjs +0 -0
  905. package/dist/src/parser/normalizeValue.min.mjs.map +0 -0
  906. package/dist/src/parser/normalizeValue.mjs +0 -0
  907. package/dist/src/parser/normalizeValue.mjs.map +0 -0
  908. package/dist/src/parser/parseAttributes.d.ts +0 -0
  909. package/dist/src/parser/parseAttributes.d.ts.map +0 -0
  910. package/dist/src/parser/parseAttributes.min.mjs +0 -0
  911. package/dist/src/parser/parseAttributes.min.mjs.map +0 -0
  912. package/dist/src/parser/parseAttributes.mjs +0 -0
  913. package/dist/src/parser/parseAttributes.mjs.map +0 -0
  914. package/dist/src/parser/parseFontDeclaration.d.ts +0 -0
  915. package/dist/src/parser/parseFontDeclaration.d.ts.map +0 -0
  916. package/dist/src/parser/parseFontDeclaration.min.mjs +0 -0
  917. package/dist/src/parser/parseFontDeclaration.min.mjs.map +0 -0
  918. package/dist/src/parser/parseFontDeclaration.mjs +0 -0
  919. package/dist/src/parser/parseFontDeclaration.mjs.map +0 -0
  920. package/dist/src/parser/parsePointsAttribute.d.ts +0 -0
  921. package/dist/src/parser/parsePointsAttribute.d.ts.map +0 -0
  922. package/dist/src/parser/parsePointsAttribute.min.mjs +0 -0
  923. package/dist/src/parser/parsePointsAttribute.min.mjs.map +0 -0
  924. package/dist/src/parser/parsePointsAttribute.mjs +0 -0
  925. package/dist/src/parser/parsePointsAttribute.mjs.map +0 -0
  926. package/dist/src/parser/parseSVGDocument.d.ts +0 -0
  927. package/dist/src/parser/parseSVGDocument.d.ts.map +0 -0
  928. package/dist/src/parser/parseSVGDocument.min.mjs +0 -0
  929. package/dist/src/parser/parseSVGDocument.min.mjs.map +0 -0
  930. package/dist/src/parser/parseSVGDocument.mjs +0 -0
  931. package/dist/src/parser/parseSVGDocument.mjs.map +0 -0
  932. package/dist/src/parser/parseStyleAttribute.d.ts +0 -0
  933. package/dist/src/parser/parseStyleAttribute.d.ts.map +0 -0
  934. package/dist/src/parser/parseStyleAttribute.min.mjs +0 -0
  935. package/dist/src/parser/parseStyleAttribute.min.mjs.map +0 -0
  936. package/dist/src/parser/parseStyleAttribute.mjs +0 -0
  937. package/dist/src/parser/parseStyleAttribute.mjs.map +0 -0
  938. package/dist/src/parser/parseStyleObject.d.ts +0 -0
  939. package/dist/src/parser/parseStyleObject.d.ts.map +0 -0
  940. package/dist/src/parser/parseStyleObject.min.mjs +0 -0
  941. package/dist/src/parser/parseStyleObject.min.mjs.map +0 -0
  942. package/dist/src/parser/parseStyleObject.mjs +0 -0
  943. package/dist/src/parser/parseStyleObject.mjs.map +0 -0
  944. package/dist/src/parser/parseStyleString.d.ts +0 -0
  945. package/dist/src/parser/parseStyleString.d.ts.map +0 -0
  946. package/dist/src/parser/parseStyleString.min.mjs +0 -0
  947. package/dist/src/parser/parseStyleString.min.mjs.map +0 -0
  948. package/dist/src/parser/parseStyleString.mjs +0 -0
  949. package/dist/src/parser/parseStyleString.mjs.map +0 -0
  950. package/dist/src/parser/parseTransformAttribute.d.ts +0 -0
  951. package/dist/src/parser/parseTransformAttribute.d.ts.map +0 -0
  952. package/dist/src/parser/parseTransformAttribute.min.mjs +0 -0
  953. package/dist/src/parser/parseTransformAttribute.min.mjs.map +0 -0
  954. package/dist/src/parser/parseTransformAttribute.mjs +0 -0
  955. package/dist/src/parser/parseTransformAttribute.mjs.map +0 -0
  956. package/dist/src/parser/parseUseDirectives.d.ts +0 -0
  957. package/dist/src/parser/parseUseDirectives.d.ts.map +0 -0
  958. package/dist/src/parser/parseUseDirectives.min.mjs +0 -0
  959. package/dist/src/parser/parseUseDirectives.min.mjs.map +0 -0
  960. package/dist/src/parser/parseUseDirectives.mjs +0 -0
  961. package/dist/src/parser/parseUseDirectives.mjs.map +0 -0
  962. package/dist/src/parser/percent.d.ts +0 -0
  963. package/dist/src/parser/percent.d.ts.map +0 -0
  964. package/dist/src/parser/percent.min.mjs +0 -0
  965. package/dist/src/parser/percent.min.mjs.map +0 -0
  966. package/dist/src/parser/percent.mjs +0 -0
  967. package/dist/src/parser/percent.mjs.map +0 -0
  968. package/dist/src/parser/recursivelyParseGradientsXlink.d.ts +0 -0
  969. package/dist/src/parser/recursivelyParseGradientsXlink.d.ts.map +0 -0
  970. package/dist/src/parser/recursivelyParseGradientsXlink.min.mjs +0 -0
  971. package/dist/src/parser/recursivelyParseGradientsXlink.min.mjs.map +0 -0
  972. package/dist/src/parser/recursivelyParseGradientsXlink.mjs +0 -0
  973. package/dist/src/parser/recursivelyParseGradientsXlink.mjs.map +0 -0
  974. package/dist/src/parser/selectorMatches.d.ts +0 -0
  975. package/dist/src/parser/selectorMatches.d.ts.map +0 -0
  976. package/dist/src/parser/selectorMatches.min.mjs +0 -0
  977. package/dist/src/parser/selectorMatches.min.mjs.map +0 -0
  978. package/dist/src/parser/selectorMatches.mjs +0 -0
  979. package/dist/src/parser/selectorMatches.mjs.map +0 -0
  980. package/dist/src/parser/setStrokeFillOpacity.d.ts +0 -0
  981. package/dist/src/parser/setStrokeFillOpacity.d.ts.map +0 -0
  982. package/dist/src/parser/setStrokeFillOpacity.min.mjs +0 -0
  983. package/dist/src/parser/setStrokeFillOpacity.min.mjs.map +0 -0
  984. package/dist/src/parser/setStrokeFillOpacity.mjs +0 -0
  985. package/dist/src/parser/setStrokeFillOpacity.mjs.map +0 -0
  986. package/dist/src/parser/typedefs.d.ts +0 -0
  987. package/dist/src/parser/typedefs.d.ts.map +0 -0
  988. package/dist/src/shapes/ActiveSelection.d.ts +0 -0
  989. package/dist/src/shapes/ActiveSelection.d.ts.map +0 -0
  990. package/dist/src/shapes/ActiveSelection.min.mjs +0 -0
  991. package/dist/src/shapes/ActiveSelection.min.mjs.map +0 -0
  992. package/dist/src/shapes/ActiveSelection.mjs +0 -0
  993. package/dist/src/shapes/ActiveSelection.mjs.map +0 -0
  994. package/dist/src/shapes/Circle.d.ts +0 -0
  995. package/dist/src/shapes/Circle.d.ts.map +0 -0
  996. package/dist/src/shapes/Circle.min.mjs +0 -0
  997. package/dist/src/shapes/Circle.min.mjs.map +0 -0
  998. package/dist/src/shapes/Circle.mjs +0 -0
  999. package/dist/src/shapes/Circle.mjs.map +0 -0
  1000. package/dist/src/shapes/Ellipse.d.ts +0 -0
  1001. package/dist/src/shapes/Ellipse.d.ts.map +0 -0
  1002. package/dist/src/shapes/Ellipse.min.mjs +0 -0
  1003. package/dist/src/shapes/Ellipse.min.mjs.map +0 -0
  1004. package/dist/src/shapes/Ellipse.mjs +0 -0
  1005. package/dist/src/shapes/Ellipse.mjs.map +0 -0
  1006. package/dist/src/shapes/Group.d.ts +0 -0
  1007. package/dist/src/shapes/Group.d.ts.map +0 -0
  1008. package/dist/src/shapes/Group.min.mjs +0 -0
  1009. package/dist/src/shapes/Group.min.mjs.map +0 -0
  1010. package/dist/src/shapes/Group.mjs +0 -0
  1011. package/dist/src/shapes/Group.mjs.map +0 -0
  1012. package/dist/src/shapes/IText/DraggableTextDelegate.d.ts +0 -0
  1013. package/dist/src/shapes/IText/DraggableTextDelegate.d.ts.map +0 -0
  1014. package/dist/src/shapes/IText/DraggableTextDelegate.min.mjs +0 -0
  1015. package/dist/src/shapes/IText/DraggableTextDelegate.min.mjs.map +0 -0
  1016. package/dist/src/shapes/IText/DraggableTextDelegate.mjs +0 -0
  1017. package/dist/src/shapes/IText/DraggableTextDelegate.mjs.map +0 -0
  1018. package/dist/src/shapes/IText/IText.d.ts +0 -0
  1019. package/dist/src/shapes/IText/IText.d.ts.map +0 -0
  1020. package/dist/src/shapes/IText/IText.min.mjs +0 -0
  1021. package/dist/src/shapes/IText/IText.min.mjs.map +1 -1
  1022. package/dist/src/shapes/IText/IText.mjs +206 -206
  1023. package/dist/src/shapes/IText/IText.mjs.map +1 -1
  1024. package/dist/src/shapes/IText/ITextBehavior.d.ts +0 -0
  1025. package/dist/src/shapes/IText/ITextBehavior.d.ts.map +1 -1
  1026. package/dist/src/shapes/IText/ITextBehavior.min.mjs +1 -1
  1027. package/dist/src/shapes/IText/ITextBehavior.min.mjs.map +1 -1
  1028. package/dist/src/shapes/IText/ITextBehavior.mjs +221 -157
  1029. package/dist/src/shapes/IText/ITextBehavior.mjs.map +1 -1
  1030. package/dist/src/shapes/IText/ITextClickBehavior.d.ts +0 -0
  1031. package/dist/src/shapes/IText/ITextClickBehavior.d.ts.map +0 -0
  1032. package/dist/src/shapes/IText/ITextClickBehavior.min.mjs +0 -0
  1033. package/dist/src/shapes/IText/ITextClickBehavior.min.mjs.map +1 -1
  1034. package/dist/src/shapes/IText/ITextClickBehavior.mjs +36 -36
  1035. package/dist/src/shapes/IText/ITextClickBehavior.mjs.map +1 -1
  1036. package/dist/src/shapes/IText/ITextKeyBehavior.d.ts +0 -0
  1037. package/dist/src/shapes/IText/ITextKeyBehavior.d.ts.map +0 -0
  1038. package/dist/src/shapes/IText/ITextKeyBehavior.min.mjs +0 -0
  1039. package/dist/src/shapes/IText/ITextKeyBehavior.min.mjs.map +1 -1
  1040. package/dist/src/shapes/IText/ITextKeyBehavior.mjs +115 -115
  1041. package/dist/src/shapes/IText/ITextKeyBehavior.mjs.map +1 -1
  1042. package/dist/src/shapes/IText/constants.d.ts +0 -0
  1043. package/dist/src/shapes/IText/constants.d.ts.map +0 -0
  1044. package/dist/src/shapes/IText/constants.min.mjs +0 -0
  1045. package/dist/src/shapes/IText/constants.min.mjs.map +0 -0
  1046. package/dist/src/shapes/IText/constants.mjs +0 -0
  1047. package/dist/src/shapes/IText/constants.mjs.map +0 -0
  1048. package/dist/src/shapes/Image.d.ts +0 -0
  1049. package/dist/src/shapes/Image.d.ts.map +0 -0
  1050. package/dist/src/shapes/Image.min.mjs +0 -0
  1051. package/dist/src/shapes/Image.min.mjs.map +0 -0
  1052. package/dist/src/shapes/Image.mjs +0 -0
  1053. package/dist/src/shapes/Image.mjs.map +0 -0
  1054. package/dist/src/shapes/Line.d.ts +0 -0
  1055. package/dist/src/shapes/Line.d.ts.map +0 -0
  1056. package/dist/src/shapes/Line.min.mjs +0 -0
  1057. package/dist/src/shapes/Line.min.mjs.map +0 -0
  1058. package/dist/src/shapes/Line.mjs +0 -0
  1059. package/dist/src/shapes/Line.mjs.map +0 -0
  1060. package/dist/src/shapes/Object/FabricObject.d.ts +0 -0
  1061. package/dist/src/shapes/Object/FabricObject.d.ts.map +0 -0
  1062. package/dist/src/shapes/Object/FabricObject.min.mjs +0 -0
  1063. package/dist/src/shapes/Object/FabricObject.min.mjs.map +0 -0
  1064. package/dist/src/shapes/Object/FabricObject.mjs +0 -0
  1065. package/dist/src/shapes/Object/FabricObject.mjs.map +0 -0
  1066. package/dist/src/shapes/Object/FabricObjectSVGExportMixin.d.ts +0 -0
  1067. package/dist/src/shapes/Object/FabricObjectSVGExportMixin.d.ts.map +0 -0
  1068. package/dist/src/shapes/Object/FabricObjectSVGExportMixin.min.mjs +0 -0
  1069. package/dist/src/shapes/Object/FabricObjectSVGExportMixin.min.mjs.map +0 -0
  1070. package/dist/src/shapes/Object/FabricObjectSVGExportMixin.mjs +0 -0
  1071. package/dist/src/shapes/Object/FabricObjectSVGExportMixin.mjs.map +0 -0
  1072. package/dist/src/shapes/Object/InteractiveObject.d.ts +0 -0
  1073. package/dist/src/shapes/Object/InteractiveObject.d.ts.map +0 -0
  1074. package/dist/src/shapes/Object/InteractiveObject.min.mjs +0 -0
  1075. package/dist/src/shapes/Object/InteractiveObject.min.mjs.map +0 -0
  1076. package/dist/src/shapes/Object/InteractiveObject.mjs +0 -0
  1077. package/dist/src/shapes/Object/InteractiveObject.mjs.map +0 -0
  1078. package/dist/src/shapes/Object/Object.d.ts +0 -0
  1079. package/dist/src/shapes/Object/Object.d.ts.map +0 -0
  1080. package/dist/src/shapes/Object/Object.min.mjs +0 -0
  1081. package/dist/src/shapes/Object/Object.min.mjs.map +0 -0
  1082. package/dist/src/shapes/Object/Object.mjs +0 -0
  1083. package/dist/src/shapes/Object/Object.mjs.map +0 -0
  1084. package/dist/src/shapes/Object/ObjectGeometry.d.ts +0 -0
  1085. package/dist/src/shapes/Object/ObjectGeometry.d.ts.map +0 -0
  1086. package/dist/src/shapes/Object/ObjectGeometry.min.mjs +0 -0
  1087. package/dist/src/shapes/Object/ObjectGeometry.min.mjs.map +0 -0
  1088. package/dist/src/shapes/Object/ObjectGeometry.mjs +0 -0
  1089. package/dist/src/shapes/Object/ObjectGeometry.mjs.map +0 -0
  1090. package/dist/src/shapes/Object/defaultValues.d.ts +0 -0
  1091. package/dist/src/shapes/Object/defaultValues.d.ts.map +0 -0
  1092. package/dist/src/shapes/Object/defaultValues.min.mjs +0 -0
  1093. package/dist/src/shapes/Object/defaultValues.min.mjs.map +0 -0
  1094. package/dist/src/shapes/Object/defaultValues.mjs +0 -0
  1095. package/dist/src/shapes/Object/defaultValues.mjs.map +0 -0
  1096. package/dist/src/shapes/Object/types/BaseProps.d.ts +0 -0
  1097. package/dist/src/shapes/Object/types/BaseProps.d.ts.map +0 -0
  1098. package/dist/src/shapes/Object/types/BorderProps.d.ts +0 -0
  1099. package/dist/src/shapes/Object/types/BorderProps.d.ts.map +0 -0
  1100. package/dist/src/shapes/Object/types/ControlProps.d.ts +0 -0
  1101. package/dist/src/shapes/Object/types/ControlProps.d.ts.map +0 -0
  1102. package/dist/src/shapes/Object/types/FabricObjectProps.d.ts +0 -0
  1103. package/dist/src/shapes/Object/types/FabricObjectProps.d.ts.map +0 -0
  1104. package/dist/src/shapes/Object/types/FillStrokeProps.d.ts +0 -0
  1105. package/dist/src/shapes/Object/types/FillStrokeProps.d.ts.map +0 -0
  1106. package/dist/src/shapes/Object/types/LockInteractionProps.d.ts +0 -0
  1107. package/dist/src/shapes/Object/types/LockInteractionProps.d.ts.map +0 -0
  1108. package/dist/src/shapes/Object/types/ObjectProps.d.ts +0 -0
  1109. package/dist/src/shapes/Object/types/ObjectProps.d.ts.map +0 -0
  1110. package/dist/src/shapes/Object/types/ObjectTransformProps.d.ts +0 -0
  1111. package/dist/src/shapes/Object/types/ObjectTransformProps.d.ts.map +0 -0
  1112. package/dist/src/shapes/Object/types/SerializedObjectProps.d.ts +0 -0
  1113. package/dist/src/shapes/Object/types/SerializedObjectProps.d.ts.map +0 -0
  1114. package/dist/src/shapes/Object/types/index.d.ts +0 -0
  1115. package/dist/src/shapes/Object/types/index.d.ts.map +0 -0
  1116. package/dist/src/shapes/Path.d.ts +0 -0
  1117. package/dist/src/shapes/Path.d.ts.map +0 -0
  1118. package/dist/src/shapes/Path.min.mjs +0 -0
  1119. package/dist/src/shapes/Path.min.mjs.map +0 -0
  1120. package/dist/src/shapes/Path.mjs +0 -0
  1121. package/dist/src/shapes/Path.mjs.map +0 -0
  1122. package/dist/src/shapes/Polygon.d.ts +0 -0
  1123. package/dist/src/shapes/Polygon.d.ts.map +0 -0
  1124. package/dist/src/shapes/Polygon.min.mjs +0 -0
  1125. package/dist/src/shapes/Polygon.min.mjs.map +0 -0
  1126. package/dist/src/shapes/Polygon.mjs +0 -0
  1127. package/dist/src/shapes/Polygon.mjs.map +0 -0
  1128. package/dist/src/shapes/Polyline.d.ts +0 -0
  1129. package/dist/src/shapes/Polyline.d.ts.map +0 -0
  1130. package/dist/src/shapes/Polyline.min.mjs +0 -0
  1131. package/dist/src/shapes/Polyline.min.mjs.map +0 -0
  1132. package/dist/src/shapes/Polyline.mjs +0 -0
  1133. package/dist/src/shapes/Polyline.mjs.map +0 -0
  1134. package/dist/src/shapes/Rect.d.ts +0 -0
  1135. package/dist/src/shapes/Rect.d.ts.map +0 -0
  1136. package/dist/src/shapes/Rect.min.mjs +0 -0
  1137. package/dist/src/shapes/Rect.min.mjs.map +0 -0
  1138. package/dist/src/shapes/Rect.mjs +0 -0
  1139. package/dist/src/shapes/Rect.mjs.map +0 -0
  1140. package/dist/src/shapes/Text/StyledText.d.ts +0 -0
  1141. package/dist/src/shapes/Text/StyledText.d.ts.map +0 -0
  1142. package/dist/src/shapes/Text/StyledText.min.mjs +0 -0
  1143. package/dist/src/shapes/Text/StyledText.min.mjs.map +0 -0
  1144. package/dist/src/shapes/Text/StyledText.mjs +0 -0
  1145. package/dist/src/shapes/Text/StyledText.mjs.map +0 -0
  1146. package/dist/src/shapes/Text/Text.d.ts +1 -0
  1147. package/dist/src/shapes/Text/Text.d.ts.map +1 -1
  1148. package/dist/src/shapes/Text/Text.min.mjs +1 -1
  1149. package/dist/src/shapes/Text/Text.min.mjs.map +1 -1
  1150. package/dist/src/shapes/Text/Text.mjs +315 -302
  1151. package/dist/src/shapes/Text/Text.mjs.map +1 -1
  1152. package/dist/src/shapes/Text/TextSVGExportMixin.d.ts +0 -0
  1153. package/dist/src/shapes/Text/TextSVGExportMixin.d.ts.map +0 -0
  1154. package/dist/src/shapes/Text/TextSVGExportMixin.min.mjs +0 -0
  1155. package/dist/src/shapes/Text/TextSVGExportMixin.min.mjs.map +0 -0
  1156. package/dist/src/shapes/Text/TextSVGExportMixin.mjs +0 -0
  1157. package/dist/src/shapes/Text/TextSVGExportMixin.mjs.map +0 -0
  1158. package/dist/src/shapes/Text/constants.d.ts +0 -0
  1159. package/dist/src/shapes/Text/constants.d.ts.map +0 -0
  1160. package/dist/src/shapes/Text/constants.min.mjs +0 -0
  1161. package/dist/src/shapes/Text/constants.min.mjs.map +1 -1
  1162. package/dist/src/shapes/Text/constants.mjs +0 -0
  1163. package/dist/src/shapes/Text/constants.mjs.map +1 -1
  1164. package/dist/src/shapes/Textbox.d.ts +20 -0
  1165. package/dist/src/shapes/Textbox.d.ts.map +1 -1
  1166. package/dist/src/shapes/Textbox.min.mjs +1 -1
  1167. package/dist/src/shapes/Textbox.min.mjs.map +1 -1
  1168. package/dist/src/shapes/Textbox.mjs +486 -202
  1169. package/dist/src/shapes/Textbox.mjs.map +1 -1
  1170. package/dist/src/shapes/Triangle.d.ts +0 -0
  1171. package/dist/src/shapes/Triangle.d.ts.map +0 -0
  1172. package/dist/src/shapes/Triangle.min.mjs +0 -0
  1173. package/dist/src/shapes/Triangle.min.mjs.map +0 -0
  1174. package/dist/src/shapes/Triangle.mjs +0 -0
  1175. package/dist/src/shapes/Triangle.mjs.map +0 -0
  1176. package/dist/src/text/browserLines.d.ts +7 -2
  1177. package/dist/src/text/browserLines.d.ts.map +1 -1
  1178. package/dist/src/text/browserLines.min.mjs +1 -1
  1179. package/dist/src/text/browserLines.min.mjs.map +1 -1
  1180. package/dist/src/text/browserLines.mjs +35 -25
  1181. package/dist/src/text/browserLines.mjs.map +1 -1
  1182. package/dist/src/text/ellipsis.d.ts +0 -0
  1183. package/dist/src/text/ellipsis.d.ts.map +0 -0
  1184. package/dist/src/text/ellipsis.min.mjs +0 -0
  1185. package/dist/src/text/ellipsis.min.mjs.map +1 -1
  1186. package/dist/src/text/ellipsis.mjs +11 -11
  1187. package/dist/src/text/ellipsis.mjs.map +1 -1
  1188. package/dist/src/text/hitTest.d.ts +0 -0
  1189. package/dist/src/text/hitTest.d.ts.map +0 -0
  1190. package/dist/src/text/hitTest.min.mjs +0 -0
  1191. package/dist/src/text/hitTest.min.mjs.map +1 -1
  1192. package/dist/src/text/hitTest.mjs +19 -19
  1193. package/dist/src/text/hitTest.mjs.map +1 -1
  1194. package/dist/src/text/layout.d.ts +0 -0
  1195. package/dist/src/text/layout.d.ts.map +0 -0
  1196. package/dist/src/text/layout.min.mjs +0 -0
  1197. package/dist/src/text/layout.min.mjs.map +1 -1
  1198. package/dist/src/text/layout.mjs +33 -33
  1199. package/dist/src/text/layout.mjs.map +1 -1
  1200. package/dist/src/text/measure.d.ts +0 -0
  1201. package/dist/src/text/measure.d.ts.map +0 -0
  1202. package/dist/src/text/measure.min.mjs +0 -0
  1203. package/dist/src/text/measure.min.mjs.map +1 -1
  1204. package/dist/src/text/measure.mjs +30 -30
  1205. package/dist/src/text/measure.mjs.map +1 -1
  1206. package/dist/src/text/overlayEditor.d.ts +1 -0
  1207. package/dist/src/text/overlayEditor.d.ts.map +1 -1
  1208. package/dist/src/text/overlayEditor.min.mjs +1 -1
  1209. package/dist/src/text/overlayEditor.min.mjs.map +1 -1
  1210. package/dist/src/text/overlayEditor.mjs +70 -51
  1211. package/dist/src/text/overlayEditor.mjs.map +1 -1
  1212. package/dist/src/text/unicode.d.ts +0 -0
  1213. package/dist/src/text/unicode.d.ts.map +0 -0
  1214. package/dist/src/text/unicode.min.mjs +0 -0
  1215. package/dist/src/text/unicode.min.mjs.map +1 -1
  1216. package/dist/src/text/unicode.mjs +8 -8
  1217. package/dist/src/text/unicode.mjs.map +1 -1
  1218. package/dist/src/typedefs.d.ts +0 -0
  1219. package/dist/src/typedefs.d.ts.map +0 -0
  1220. package/dist/src/util/animation/AnimationBase.d.ts +0 -0
  1221. package/dist/src/util/animation/AnimationBase.d.ts.map +0 -0
  1222. package/dist/src/util/animation/AnimationBase.min.mjs +0 -0
  1223. package/dist/src/util/animation/AnimationBase.min.mjs.map +0 -0
  1224. package/dist/src/util/animation/AnimationBase.mjs +0 -0
  1225. package/dist/src/util/animation/AnimationBase.mjs.map +0 -0
  1226. package/dist/src/util/animation/AnimationFrameProvider.d.ts +0 -0
  1227. package/dist/src/util/animation/AnimationFrameProvider.d.ts.map +0 -0
  1228. package/dist/src/util/animation/AnimationFrameProvider.min.mjs +0 -0
  1229. package/dist/src/util/animation/AnimationFrameProvider.min.mjs.map +0 -0
  1230. package/dist/src/util/animation/AnimationFrameProvider.mjs +0 -0
  1231. package/dist/src/util/animation/AnimationFrameProvider.mjs.map +0 -0
  1232. package/dist/src/util/animation/AnimationRegistry.d.ts +0 -0
  1233. package/dist/src/util/animation/AnimationRegistry.d.ts.map +0 -0
  1234. package/dist/src/util/animation/AnimationRegistry.min.mjs +0 -0
  1235. package/dist/src/util/animation/AnimationRegistry.min.mjs.map +0 -0
  1236. package/dist/src/util/animation/AnimationRegistry.mjs +0 -0
  1237. package/dist/src/util/animation/AnimationRegistry.mjs.map +0 -0
  1238. package/dist/src/util/animation/ArrayAnimation.d.ts +0 -0
  1239. package/dist/src/util/animation/ArrayAnimation.d.ts.map +0 -0
  1240. package/dist/src/util/animation/ArrayAnimation.min.mjs +0 -0
  1241. package/dist/src/util/animation/ArrayAnimation.min.mjs.map +0 -0
  1242. package/dist/src/util/animation/ArrayAnimation.mjs +0 -0
  1243. package/dist/src/util/animation/ArrayAnimation.mjs.map +0 -0
  1244. package/dist/src/util/animation/ColorAnimation.d.ts +0 -0
  1245. package/dist/src/util/animation/ColorAnimation.d.ts.map +0 -0
  1246. package/dist/src/util/animation/ColorAnimation.min.mjs +0 -0
  1247. package/dist/src/util/animation/ColorAnimation.min.mjs.map +0 -0
  1248. package/dist/src/util/animation/ColorAnimation.mjs +0 -0
  1249. package/dist/src/util/animation/ColorAnimation.mjs.map +0 -0
  1250. package/dist/src/util/animation/ValueAnimation.d.ts +0 -0
  1251. package/dist/src/util/animation/ValueAnimation.d.ts.map +0 -0
  1252. package/dist/src/util/animation/ValueAnimation.min.mjs +0 -0
  1253. package/dist/src/util/animation/ValueAnimation.min.mjs.map +0 -0
  1254. package/dist/src/util/animation/ValueAnimation.mjs +0 -0
  1255. package/dist/src/util/animation/ValueAnimation.mjs.map +0 -0
  1256. package/dist/src/util/animation/animate.d.ts +0 -0
  1257. package/dist/src/util/animation/animate.d.ts.map +0 -0
  1258. package/dist/src/util/animation/animate.min.mjs +0 -0
  1259. package/dist/src/util/animation/animate.min.mjs.map +0 -0
  1260. package/dist/src/util/animation/animate.mjs +0 -0
  1261. package/dist/src/util/animation/animate.mjs.map +0 -0
  1262. package/dist/src/util/animation/easing.d.ts +0 -0
  1263. package/dist/src/util/animation/easing.d.ts.map +0 -0
  1264. package/dist/src/util/animation/easing.min.mjs +0 -0
  1265. package/dist/src/util/animation/easing.min.mjs.map +0 -0
  1266. package/dist/src/util/animation/easing.mjs +0 -0
  1267. package/dist/src/util/animation/easing.mjs.map +0 -0
  1268. package/dist/src/util/animation/index.d.ts +0 -0
  1269. package/dist/src/util/animation/index.d.ts.map +0 -0
  1270. package/dist/src/util/animation/types.d.ts +0 -0
  1271. package/dist/src/util/animation/types.d.ts.map +0 -0
  1272. package/dist/src/util/applyMixins.d.ts +0 -0
  1273. package/dist/src/util/applyMixins.d.ts.map +0 -0
  1274. package/dist/src/util/applyMixins.min.mjs +0 -0
  1275. package/dist/src/util/applyMixins.min.mjs.map +0 -0
  1276. package/dist/src/util/applyMixins.mjs +0 -0
  1277. package/dist/src/util/applyMixins.mjs.map +0 -0
  1278. package/dist/src/util/dom_event.d.ts +0 -0
  1279. package/dist/src/util/dom_event.d.ts.map +0 -0
  1280. package/dist/src/util/dom_event.min.mjs +0 -0
  1281. package/dist/src/util/dom_event.min.mjs.map +0 -0
  1282. package/dist/src/util/dom_event.mjs +0 -0
  1283. package/dist/src/util/dom_event.mjs.map +0 -0
  1284. package/dist/src/util/dom_misc.d.ts +0 -0
  1285. package/dist/src/util/dom_misc.d.ts.map +0 -0
  1286. package/dist/src/util/dom_misc.min.mjs +0 -0
  1287. package/dist/src/util/dom_misc.min.mjs.map +0 -0
  1288. package/dist/src/util/dom_misc.mjs +0 -0
  1289. package/dist/src/util/dom_misc.mjs.map +0 -0
  1290. package/dist/src/util/index.d.ts +0 -0
  1291. package/dist/src/util/index.d.ts.map +0 -0
  1292. package/dist/src/util/index.min.mjs +0 -0
  1293. package/dist/src/util/index.min.mjs.map +0 -0
  1294. package/dist/src/util/index.mjs +0 -0
  1295. package/dist/src/util/index.mjs.map +0 -0
  1296. package/dist/src/util/internals/applyCanvasTransform.d.ts +0 -0
  1297. package/dist/src/util/internals/applyCanvasTransform.d.ts.map +0 -0
  1298. package/dist/src/util/internals/applyCanvasTransform.min.mjs +0 -0
  1299. package/dist/src/util/internals/applyCanvasTransform.min.mjs.map +0 -0
  1300. package/dist/src/util/internals/applyCanvasTransform.mjs +0 -0
  1301. package/dist/src/util/internals/applyCanvasTransform.mjs.map +0 -0
  1302. package/dist/src/util/internals/cleanupSvgAttribute.d.ts +0 -0
  1303. package/dist/src/util/internals/cleanupSvgAttribute.d.ts.map +0 -0
  1304. package/dist/src/util/internals/cleanupSvgAttribute.min.mjs +0 -0
  1305. package/dist/src/util/internals/cleanupSvgAttribute.min.mjs.map +0 -0
  1306. package/dist/src/util/internals/cleanupSvgAttribute.mjs +0 -0
  1307. package/dist/src/util/internals/cleanupSvgAttribute.mjs.map +0 -0
  1308. package/dist/src/util/internals/cloneStyles.d.ts +0 -0
  1309. package/dist/src/util/internals/cloneStyles.d.ts.map +0 -0
  1310. package/dist/src/util/internals/cloneStyles.min.mjs +0 -0
  1311. package/dist/src/util/internals/cloneStyles.min.mjs.map +0 -0
  1312. package/dist/src/util/internals/cloneStyles.mjs +0 -0
  1313. package/dist/src/util/internals/cloneStyles.mjs.map +0 -0
  1314. package/dist/src/util/internals/console.d.ts +0 -0
  1315. package/dist/src/util/internals/console.d.ts.map +0 -0
  1316. package/dist/src/util/internals/console.min.mjs +0 -0
  1317. package/dist/src/util/internals/console.min.mjs.map +0 -0
  1318. package/dist/src/util/internals/console.mjs +0 -0
  1319. package/dist/src/util/internals/console.mjs.map +0 -0
  1320. package/dist/src/util/internals/dom_style.d.ts +0 -0
  1321. package/dist/src/util/internals/dom_style.d.ts.map +0 -0
  1322. package/dist/src/util/internals/dom_style.min.mjs +0 -0
  1323. package/dist/src/util/internals/dom_style.min.mjs.map +0 -0
  1324. package/dist/src/util/internals/dom_style.mjs +0 -0
  1325. package/dist/src/util/internals/dom_style.mjs.map +0 -0
  1326. package/dist/src/util/internals/findRight.d.ts +0 -0
  1327. package/dist/src/util/internals/findRight.d.ts.map +0 -0
  1328. package/dist/src/util/internals/findRight.min.mjs +0 -0
  1329. package/dist/src/util/internals/findRight.min.mjs.map +0 -0
  1330. package/dist/src/util/internals/findRight.mjs +0 -0
  1331. package/dist/src/util/internals/findRight.mjs.map +0 -0
  1332. package/dist/src/util/internals/getRandomInt.d.ts +0 -0
  1333. package/dist/src/util/internals/getRandomInt.d.ts.map +0 -0
  1334. package/dist/src/util/internals/getRandomInt.min.mjs +0 -0
  1335. package/dist/src/util/internals/getRandomInt.min.mjs.map +0 -0
  1336. package/dist/src/util/internals/getRandomInt.mjs +0 -0
  1337. package/dist/src/util/internals/getRandomInt.mjs.map +0 -0
  1338. package/dist/src/util/internals/ifNaN.d.ts +0 -0
  1339. package/dist/src/util/internals/ifNaN.d.ts.map +0 -0
  1340. package/dist/src/util/internals/ifNaN.min.mjs +0 -0
  1341. package/dist/src/util/internals/ifNaN.min.mjs.map +0 -0
  1342. package/dist/src/util/internals/ifNaN.mjs +0 -0
  1343. package/dist/src/util/internals/ifNaN.mjs.map +0 -0
  1344. package/dist/src/util/internals/removeFromArray.d.ts +0 -0
  1345. package/dist/src/util/internals/removeFromArray.d.ts.map +0 -0
  1346. package/dist/src/util/internals/removeFromArray.min.mjs +0 -0
  1347. package/dist/src/util/internals/removeFromArray.min.mjs.map +0 -0
  1348. package/dist/src/util/internals/removeFromArray.mjs +0 -0
  1349. package/dist/src/util/internals/removeFromArray.mjs.map +0 -0
  1350. package/dist/src/util/internals/uid.d.ts +0 -0
  1351. package/dist/src/util/internals/uid.d.ts.map +0 -0
  1352. package/dist/src/util/internals/uid.min.mjs +0 -0
  1353. package/dist/src/util/internals/uid.min.mjs.map +0 -0
  1354. package/dist/src/util/internals/uid.mjs +0 -0
  1355. package/dist/src/util/internals/uid.mjs.map +0 -0
  1356. package/dist/src/util/lang_string.d.ts +0 -0
  1357. package/dist/src/util/lang_string.d.ts.map +0 -0
  1358. package/dist/src/util/lang_string.min.mjs +0 -0
  1359. package/dist/src/util/lang_string.min.mjs.map +0 -0
  1360. package/dist/src/util/lang_string.mjs +0 -0
  1361. package/dist/src/util/lang_string.mjs.map +0 -0
  1362. package/dist/src/util/misc/boundingBoxFromPoints.d.ts +0 -0
  1363. package/dist/src/util/misc/boundingBoxFromPoints.d.ts.map +0 -0
  1364. package/dist/src/util/misc/boundingBoxFromPoints.min.mjs +0 -0
  1365. package/dist/src/util/misc/boundingBoxFromPoints.min.mjs.map +0 -0
  1366. package/dist/src/util/misc/boundingBoxFromPoints.mjs +0 -0
  1367. package/dist/src/util/misc/boundingBoxFromPoints.mjs.map +0 -0
  1368. package/dist/src/util/misc/capValue.d.ts +0 -0
  1369. package/dist/src/util/misc/capValue.d.ts.map +0 -0
  1370. package/dist/src/util/misc/capValue.min.mjs +0 -0
  1371. package/dist/src/util/misc/capValue.min.mjs.map +0 -0
  1372. package/dist/src/util/misc/capValue.mjs +0 -0
  1373. package/dist/src/util/misc/capValue.mjs.map +0 -0
  1374. package/dist/src/util/misc/cornerRadius.d.ts +0 -0
  1375. package/dist/src/util/misc/cornerRadius.d.ts.map +0 -0
  1376. package/dist/src/util/misc/cornerRadius.min.mjs +0 -0
  1377. package/dist/src/util/misc/cornerRadius.min.mjs.map +0 -0
  1378. package/dist/src/util/misc/cornerRadius.mjs +0 -0
  1379. package/dist/src/util/misc/cornerRadius.mjs.map +0 -0
  1380. package/dist/src/util/misc/cos.d.ts +0 -0
  1381. package/dist/src/util/misc/cos.d.ts.map +0 -0
  1382. package/dist/src/util/misc/cos.min.mjs +0 -0
  1383. package/dist/src/util/misc/cos.min.mjs.map +0 -0
  1384. package/dist/src/util/misc/cos.mjs +0 -0
  1385. package/dist/src/util/misc/cos.mjs.map +0 -0
  1386. package/dist/src/util/misc/dom.d.ts +0 -0
  1387. package/dist/src/util/misc/dom.d.ts.map +0 -0
  1388. package/dist/src/util/misc/dom.min.mjs +0 -0
  1389. package/dist/src/util/misc/dom.min.mjs.map +0 -0
  1390. package/dist/src/util/misc/dom.mjs +0 -0
  1391. package/dist/src/util/misc/dom.mjs.map +0 -0
  1392. package/dist/src/util/misc/findScaleTo.d.ts +0 -0
  1393. package/dist/src/util/misc/findScaleTo.d.ts.map +0 -0
  1394. package/dist/src/util/misc/findScaleTo.min.mjs +0 -0
  1395. package/dist/src/util/misc/findScaleTo.min.mjs.map +0 -0
  1396. package/dist/src/util/misc/findScaleTo.mjs +0 -0
  1397. package/dist/src/util/misc/findScaleTo.mjs.map +0 -0
  1398. package/dist/src/util/misc/groupSVGElements.d.ts +0 -0
  1399. package/dist/src/util/misc/groupSVGElements.d.ts.map +0 -0
  1400. package/dist/src/util/misc/groupSVGElements.min.mjs +0 -0
  1401. package/dist/src/util/misc/groupSVGElements.min.mjs.map +0 -0
  1402. package/dist/src/util/misc/groupSVGElements.mjs +0 -0
  1403. package/dist/src/util/misc/groupSVGElements.mjs.map +0 -0
  1404. package/dist/src/util/misc/isTransparent.d.ts +0 -0
  1405. package/dist/src/util/misc/isTransparent.d.ts.map +0 -0
  1406. package/dist/src/util/misc/isTransparent.min.mjs +0 -0
  1407. package/dist/src/util/misc/isTransparent.min.mjs.map +0 -0
  1408. package/dist/src/util/misc/isTransparent.mjs +0 -0
  1409. package/dist/src/util/misc/isTransparent.mjs.map +0 -0
  1410. package/dist/src/util/misc/matrix.d.ts +0 -0
  1411. package/dist/src/util/misc/matrix.d.ts.map +0 -0
  1412. package/dist/src/util/misc/matrix.min.mjs +0 -0
  1413. package/dist/src/util/misc/matrix.min.mjs.map +0 -0
  1414. package/dist/src/util/misc/matrix.mjs +0 -0
  1415. package/dist/src/util/misc/matrix.mjs.map +0 -0
  1416. package/dist/src/util/misc/mergeClipPaths.d.ts +0 -0
  1417. package/dist/src/util/misc/mergeClipPaths.d.ts.map +0 -0
  1418. package/dist/src/util/misc/mergeClipPaths.min.mjs +0 -0
  1419. package/dist/src/util/misc/mergeClipPaths.min.mjs.map +0 -0
  1420. package/dist/src/util/misc/mergeClipPaths.mjs +0 -0
  1421. package/dist/src/util/misc/mergeClipPaths.mjs.map +0 -0
  1422. package/dist/src/util/misc/objectEnlive.d.ts +0 -0
  1423. package/dist/src/util/misc/objectEnlive.d.ts.map +0 -0
  1424. package/dist/src/util/misc/objectEnlive.min.mjs +0 -0
  1425. package/dist/src/util/misc/objectEnlive.min.mjs.map +0 -0
  1426. package/dist/src/util/misc/objectEnlive.mjs +0 -0
  1427. package/dist/src/util/misc/objectEnlive.mjs.map +0 -0
  1428. package/dist/src/util/misc/objectTransforms.d.ts +0 -0
  1429. package/dist/src/util/misc/objectTransforms.d.ts.map +0 -0
  1430. package/dist/src/util/misc/objectTransforms.min.mjs +0 -0
  1431. package/dist/src/util/misc/objectTransforms.min.mjs.map +0 -0
  1432. package/dist/src/util/misc/objectTransforms.mjs +0 -0
  1433. package/dist/src/util/misc/objectTransforms.mjs.map +0 -0
  1434. package/dist/src/util/misc/pick.d.ts +0 -0
  1435. package/dist/src/util/misc/pick.d.ts.map +0 -0
  1436. package/dist/src/util/misc/pick.min.mjs +0 -0
  1437. package/dist/src/util/misc/pick.min.mjs.map +0 -0
  1438. package/dist/src/util/misc/pick.mjs +0 -0
  1439. package/dist/src/util/misc/pick.mjs.map +0 -0
  1440. package/dist/src/util/misc/planeChange.d.ts +0 -0
  1441. package/dist/src/util/misc/planeChange.d.ts.map +0 -0
  1442. package/dist/src/util/misc/planeChange.min.mjs +0 -0
  1443. package/dist/src/util/misc/planeChange.min.mjs.map +0 -0
  1444. package/dist/src/util/misc/planeChange.mjs +0 -0
  1445. package/dist/src/util/misc/planeChange.mjs.map +0 -0
  1446. package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.d.ts +0 -0
  1447. package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.d.ts.map +0 -0
  1448. package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.min.mjs +0 -0
  1449. package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.min.mjs.map +0 -0
  1450. package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.mjs +0 -0
  1451. package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.mjs.map +0 -0
  1452. package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.d.ts +0 -0
  1453. package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.d.ts.map +0 -0
  1454. package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.min.mjs +0 -0
  1455. package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.min.mjs.map +0 -0
  1456. package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.mjs +0 -0
  1457. package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.mjs.map +0 -0
  1458. package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.d.ts +0 -0
  1459. package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.d.ts.map +0 -0
  1460. package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.min.mjs +0 -0
  1461. package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.min.mjs.map +0 -0
  1462. package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.mjs +0 -0
  1463. package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.mjs.map +0 -0
  1464. package/dist/src/util/misc/projectStroke/index.d.ts +0 -0
  1465. package/dist/src/util/misc/projectStroke/index.d.ts.map +0 -0
  1466. package/dist/src/util/misc/projectStroke/index.min.mjs +0 -0
  1467. package/dist/src/util/misc/projectStroke/index.min.mjs.map +0 -0
  1468. package/dist/src/util/misc/projectStroke/index.mjs +0 -0
  1469. package/dist/src/util/misc/projectStroke/index.mjs.map +0 -0
  1470. package/dist/src/util/misc/projectStroke/types.d.ts +0 -0
  1471. package/dist/src/util/misc/projectStroke/types.d.ts.map +0 -0
  1472. package/dist/src/util/misc/radiansDegreesConversion.d.ts +0 -0
  1473. package/dist/src/util/misc/radiansDegreesConversion.d.ts.map +0 -0
  1474. package/dist/src/util/misc/radiansDegreesConversion.min.mjs +0 -0
  1475. package/dist/src/util/misc/radiansDegreesConversion.min.mjs.map +0 -0
  1476. package/dist/src/util/misc/radiansDegreesConversion.mjs +0 -0
  1477. package/dist/src/util/misc/radiansDegreesConversion.mjs.map +0 -0
  1478. package/dist/src/util/misc/resolveOrigin.d.ts +0 -0
  1479. package/dist/src/util/misc/resolveOrigin.d.ts.map +0 -0
  1480. package/dist/src/util/misc/resolveOrigin.min.mjs +0 -0
  1481. package/dist/src/util/misc/resolveOrigin.min.mjs.map +0 -0
  1482. package/dist/src/util/misc/resolveOrigin.mjs +0 -0
  1483. package/dist/src/util/misc/resolveOrigin.mjs.map +0 -0
  1484. package/dist/src/util/misc/sin.d.ts +0 -0
  1485. package/dist/src/util/misc/sin.d.ts.map +0 -0
  1486. package/dist/src/util/misc/sin.min.mjs +0 -0
  1487. package/dist/src/util/misc/sin.min.mjs.map +0 -0
  1488. package/dist/src/util/misc/sin.mjs +0 -0
  1489. package/dist/src/util/misc/sin.mjs.map +0 -0
  1490. package/dist/src/util/misc/svgExport.d.ts +0 -0
  1491. package/dist/src/util/misc/svgExport.d.ts.map +0 -0
  1492. package/dist/src/util/misc/svgExport.min.mjs +0 -0
  1493. package/dist/src/util/misc/svgExport.min.mjs.map +0 -0
  1494. package/dist/src/util/misc/svgExport.mjs +0 -0
  1495. package/dist/src/util/misc/svgExport.mjs.map +0 -0
  1496. package/dist/src/util/misc/svgParsing.d.ts +0 -0
  1497. package/dist/src/util/misc/svgParsing.d.ts.map +0 -0
  1498. package/dist/src/util/misc/svgParsing.min.mjs +0 -0
  1499. package/dist/src/util/misc/svgParsing.min.mjs.map +0 -0
  1500. package/dist/src/util/misc/svgParsing.mjs +0 -0
  1501. package/dist/src/util/misc/svgParsing.mjs.map +0 -0
  1502. package/dist/src/util/misc/textStyles.d.ts +0 -0
  1503. package/dist/src/util/misc/textStyles.d.ts.map +0 -0
  1504. package/dist/src/util/misc/textStyles.min.mjs +0 -0
  1505. package/dist/src/util/misc/textStyles.min.mjs.map +0 -0
  1506. package/dist/src/util/misc/textStyles.mjs +0 -0
  1507. package/dist/src/util/misc/textStyles.mjs.map +0 -0
  1508. package/dist/src/util/misc/toFixed.d.ts +0 -0
  1509. package/dist/src/util/misc/toFixed.d.ts.map +0 -0
  1510. package/dist/src/util/misc/toFixed.min.mjs +0 -0
  1511. package/dist/src/util/misc/toFixed.min.mjs.map +0 -0
  1512. package/dist/src/util/misc/toFixed.mjs +0 -0
  1513. package/dist/src/util/misc/toFixed.mjs.map +0 -0
  1514. package/dist/src/util/misc/vectors.d.ts +0 -0
  1515. package/dist/src/util/misc/vectors.d.ts.map +0 -0
  1516. package/dist/src/util/misc/vectors.min.mjs +0 -0
  1517. package/dist/src/util/misc/vectors.min.mjs.map +0 -0
  1518. package/dist/src/util/misc/vectors.mjs +0 -0
  1519. package/dist/src/util/misc/vectors.mjs.map +0 -0
  1520. package/dist/src/util/path/index.d.ts +0 -0
  1521. package/dist/src/util/path/index.d.ts.map +0 -0
  1522. package/dist/src/util/path/index.min.mjs +0 -0
  1523. package/dist/src/util/path/index.min.mjs.map +0 -0
  1524. package/dist/src/util/path/index.mjs +0 -0
  1525. package/dist/src/util/path/index.mjs.map +0 -0
  1526. package/dist/src/util/path/regex.d.ts +0 -0
  1527. package/dist/src/util/path/regex.d.ts.map +0 -0
  1528. package/dist/src/util/path/regex.min.mjs +0 -0
  1529. package/dist/src/util/path/regex.min.mjs.map +0 -0
  1530. package/dist/src/util/path/regex.mjs +0 -0
  1531. package/dist/src/util/path/regex.mjs.map +0 -0
  1532. package/dist/src/util/path/typechecks.d.ts +0 -0
  1533. package/dist/src/util/path/typechecks.d.ts.map +0 -0
  1534. package/dist/src/util/path/typedefs.d.ts +0 -0
  1535. package/dist/src/util/path/typedefs.d.ts.map +0 -0
  1536. package/dist/src/util/transform_matrix_removal.d.ts +0 -0
  1537. package/dist/src/util/transform_matrix_removal.d.ts.map +0 -0
  1538. package/dist/src/util/transform_matrix_removal.min.mjs +0 -0
  1539. package/dist/src/util/transform_matrix_removal.min.mjs.map +0 -0
  1540. package/dist/src/util/transform_matrix_removal.mjs +0 -0
  1541. package/dist/src/util/transform_matrix_removal.mjs.map +0 -0
  1542. package/dist/src/util/typeAssertions.d.ts +0 -0
  1543. package/dist/src/util/typeAssertions.d.ts.map +0 -0
  1544. package/dist/src/util/typeAssertions.min.mjs +0 -0
  1545. package/dist/src/util/typeAssertions.min.mjs.map +0 -0
  1546. package/dist/src/util/typeAssertions.mjs +0 -0
  1547. package/dist/src/util/typeAssertions.mjs.map +0 -0
  1548. package/dist-extensions/aligning_guidelines/constant.mjs +0 -0
  1549. package/dist-extensions/aligning_guidelines/constant.mjs.map +0 -0
  1550. package/dist-extensions/aligning_guidelines/index.mjs +0 -0
  1551. package/dist-extensions/aligning_guidelines/index.mjs.map +0 -0
  1552. package/dist-extensions/aligning_guidelines/util/basic.mjs +0 -0
  1553. package/dist-extensions/aligning_guidelines/util/basic.mjs.map +0 -0
  1554. package/dist-extensions/aligning_guidelines/util/collect-line.mjs +0 -0
  1555. package/dist-extensions/aligning_guidelines/util/collect-line.mjs.map +0 -0
  1556. package/dist-extensions/aligning_guidelines/util/collect-point.mjs +0 -0
  1557. package/dist-extensions/aligning_guidelines/util/collect-point.mjs.map +0 -0
  1558. package/dist-extensions/aligning_guidelines/util/draw.mjs +0 -0
  1559. package/dist-extensions/aligning_guidelines/util/draw.mjs.map +0 -0
  1560. package/dist-extensions/aligning_guidelines/util/get-objects-by-target.mjs +0 -0
  1561. package/dist-extensions/aligning_guidelines/util/get-objects-by-target.mjs.map +0 -0
  1562. package/dist-extensions/data_updaters/gradient/index.mjs +0 -0
  1563. package/dist-extensions/data_updaters/gradient/index.mjs.map +0 -0
  1564. package/dist-extensions/data_updaters/origins/index.mjs +0 -0
  1565. package/dist-extensions/data_updaters/origins/index.mjs.map +0 -0
  1566. package/dist-extensions/extensions/aligning_guidelines/constant.d.ts +0 -0
  1567. package/dist-extensions/extensions/aligning_guidelines/constant.d.ts.map +0 -0
  1568. package/dist-extensions/extensions/aligning_guidelines/index.d.ts +0 -0
  1569. package/dist-extensions/extensions/aligning_guidelines/index.d.ts.map +0 -0
  1570. package/dist-extensions/extensions/aligning_guidelines/typedefs.d.ts +0 -0
  1571. package/dist-extensions/extensions/aligning_guidelines/typedefs.d.ts.map +0 -0
  1572. package/dist-extensions/extensions/aligning_guidelines/util/basic.d.ts +0 -0
  1573. package/dist-extensions/extensions/aligning_guidelines/util/basic.d.ts.map +0 -0
  1574. package/dist-extensions/extensions/aligning_guidelines/util/collect-line.d.ts +0 -0
  1575. package/dist-extensions/extensions/aligning_guidelines/util/collect-line.d.ts.map +0 -0
  1576. package/dist-extensions/extensions/aligning_guidelines/util/collect-point.d.ts +0 -0
  1577. package/dist-extensions/extensions/aligning_guidelines/util/collect-point.d.ts.map +0 -0
  1578. package/dist-extensions/extensions/aligning_guidelines/util/draw.d.ts +0 -0
  1579. package/dist-extensions/extensions/aligning_guidelines/util/draw.d.ts.map +0 -0
  1580. package/dist-extensions/extensions/aligning_guidelines/util/get-objects-by-target.d.ts +0 -0
  1581. package/dist-extensions/extensions/aligning_guidelines/util/get-objects-by-target.d.ts.map +0 -0
  1582. package/dist-extensions/extensions/data_updaters/gradient/index.d.ts +0 -0
  1583. package/dist-extensions/extensions/data_updaters/gradient/index.d.ts.map +0 -0
  1584. package/dist-extensions/extensions/data_updaters/origins/index.d.ts +0 -0
  1585. package/dist-extensions/extensions/data_updaters/origins/index.d.ts.map +0 -0
  1586. package/dist-extensions/extensions/index.d.ts +0 -0
  1587. package/dist-extensions/extensions/index.d.ts.map +0 -0
  1588. package/dist-extensions/fabric-extensions.min.js +0 -0
  1589. package/dist-extensions/fabric-extensions.min.js.map +0 -0
  1590. package/dist-extensions/fabric.d.ts +0 -0
  1591. package/dist-extensions/fabric.d.ts.map +0 -0
  1592. package/dist-extensions/index.d.ts +0 -0
  1593. package/dist-extensions/index.d.ts.map +0 -0
  1594. package/dist-extensions/index.mjs +0 -0
  1595. package/dist-extensions/index.mjs.map +0 -0
  1596. package/dist-extensions/src/ClassRegistry.d.ts +0 -0
  1597. package/dist-extensions/src/ClassRegistry.d.ts.map +0 -0
  1598. package/dist-extensions/src/Collection.d.ts +0 -0
  1599. package/dist-extensions/src/Collection.d.ts.map +0 -0
  1600. package/dist-extensions/src/CommonMethods.d.ts +0 -0
  1601. package/dist-extensions/src/CommonMethods.d.ts.map +0 -0
  1602. package/dist-extensions/src/EventTypeDefs.d.ts +0 -0
  1603. package/dist-extensions/src/EventTypeDefs.d.ts.map +0 -0
  1604. package/dist-extensions/src/Intersection.d.ts +0 -0
  1605. package/dist-extensions/src/Intersection.d.ts.map +0 -0
  1606. package/dist-extensions/src/LayoutManager/ActiveSelectionLayoutManager.d.ts +0 -0
  1607. package/dist-extensions/src/LayoutManager/ActiveSelectionLayoutManager.d.ts.map +0 -0
  1608. package/dist-extensions/src/LayoutManager/LayoutManager.d.ts +0 -0
  1609. package/dist-extensions/src/LayoutManager/LayoutManager.d.ts.map +0 -0
  1610. package/dist-extensions/src/LayoutManager/LayoutStrategies/ClipPathLayout.d.ts +0 -0
  1611. package/dist-extensions/src/LayoutManager/LayoutStrategies/ClipPathLayout.d.ts.map +0 -0
  1612. package/dist-extensions/src/LayoutManager/LayoutStrategies/FitContentLayout.d.ts +0 -0
  1613. package/dist-extensions/src/LayoutManager/LayoutStrategies/FitContentLayout.d.ts.map +0 -0
  1614. package/dist-extensions/src/LayoutManager/LayoutStrategies/FixedLayout.d.ts +0 -0
  1615. package/dist-extensions/src/LayoutManager/LayoutStrategies/FixedLayout.d.ts.map +0 -0
  1616. package/dist-extensions/src/LayoutManager/LayoutStrategies/LayoutStrategy.d.ts +0 -0
  1617. package/dist-extensions/src/LayoutManager/LayoutStrategies/LayoutStrategy.d.ts.map +0 -0
  1618. package/dist-extensions/src/LayoutManager/LayoutStrategies/utils.d.ts +0 -0
  1619. package/dist-extensions/src/LayoutManager/LayoutStrategies/utils.d.ts.map +0 -0
  1620. package/dist-extensions/src/LayoutManager/constants.d.ts +0 -0
  1621. package/dist-extensions/src/LayoutManager/constants.d.ts.map +0 -0
  1622. package/dist-extensions/src/LayoutManager/index.d.ts +0 -0
  1623. package/dist-extensions/src/LayoutManager/index.d.ts.map +0 -0
  1624. package/dist-extensions/src/LayoutManager/types.d.ts +0 -0
  1625. package/dist-extensions/src/LayoutManager/types.d.ts.map +0 -0
  1626. package/dist-extensions/src/Observable.d.ts +0 -0
  1627. package/dist-extensions/src/Observable.d.ts.map +0 -0
  1628. package/dist-extensions/src/Pattern/Pattern.d.ts +0 -0
  1629. package/dist-extensions/src/Pattern/Pattern.d.ts.map +0 -0
  1630. package/dist-extensions/src/Pattern/index.d.ts +0 -0
  1631. package/dist-extensions/src/Pattern/index.d.ts.map +0 -0
  1632. package/dist-extensions/src/Pattern/types.d.ts +0 -0
  1633. package/dist-extensions/src/Pattern/types.d.ts.map +0 -0
  1634. package/dist-extensions/src/Point.d.ts +0 -0
  1635. package/dist-extensions/src/Point.d.ts.map +0 -0
  1636. package/dist-extensions/src/Shadow.d.ts +0 -0
  1637. package/dist-extensions/src/Shadow.d.ts.map +0 -0
  1638. package/dist-extensions/src/brushes/BaseBrush.d.ts +0 -0
  1639. package/dist-extensions/src/brushes/BaseBrush.d.ts.map +0 -0
  1640. package/dist-extensions/src/brushes/CircleBrush.d.ts +0 -0
  1641. package/dist-extensions/src/brushes/CircleBrush.d.ts.map +0 -0
  1642. package/dist-extensions/src/brushes/PatternBrush.d.ts +0 -0
  1643. package/dist-extensions/src/brushes/PatternBrush.d.ts.map +0 -0
  1644. package/dist-extensions/src/brushes/PencilBrush.d.ts +0 -0
  1645. package/dist-extensions/src/brushes/PencilBrush.d.ts.map +0 -0
  1646. package/dist-extensions/src/brushes/SprayBrush.d.ts +0 -0
  1647. package/dist-extensions/src/brushes/SprayBrush.d.ts.map +0 -0
  1648. package/dist-extensions/src/brushes/typedefs.d.ts +0 -0
  1649. package/dist-extensions/src/brushes/typedefs.d.ts.map +0 -0
  1650. package/dist-extensions/src/cache.d.ts +0 -0
  1651. package/dist-extensions/src/cache.d.ts.map +0 -0
  1652. package/dist-extensions/src/canvas/Canvas.d.ts +0 -0
  1653. package/dist-extensions/src/canvas/Canvas.d.ts.map +0 -0
  1654. package/dist-extensions/src/canvas/CanvasOptions.d.ts +0 -0
  1655. package/dist-extensions/src/canvas/CanvasOptions.d.ts.map +0 -0
  1656. package/dist-extensions/src/canvas/DOMManagers/CanvasDOMManager.d.ts +0 -0
  1657. package/dist-extensions/src/canvas/DOMManagers/CanvasDOMManager.d.ts.map +0 -0
  1658. package/dist-extensions/src/canvas/DOMManagers/StaticCanvasDOMManager.d.ts +0 -0
  1659. package/dist-extensions/src/canvas/DOMManagers/StaticCanvasDOMManager.d.ts.map +0 -0
  1660. package/dist-extensions/src/canvas/DOMManagers/util.d.ts +0 -0
  1661. package/dist-extensions/src/canvas/DOMManagers/util.d.ts.map +0 -0
  1662. package/dist-extensions/src/canvas/SelectableCanvas.d.ts +0 -0
  1663. package/dist-extensions/src/canvas/SelectableCanvas.d.ts.map +0 -0
  1664. package/dist-extensions/src/canvas/StaticCanvas.d.ts +0 -0
  1665. package/dist-extensions/src/canvas/StaticCanvas.d.ts.map +0 -0
  1666. package/dist-extensions/src/canvas/StaticCanvasOptions.d.ts +0 -0
  1667. package/dist-extensions/src/canvas/StaticCanvasOptions.d.ts.map +0 -0
  1668. package/dist-extensions/src/canvas/TextEditingManager.d.ts +0 -0
  1669. package/dist-extensions/src/canvas/TextEditingManager.d.ts.map +0 -0
  1670. package/dist-extensions/src/color/Color.d.ts +0 -0
  1671. package/dist-extensions/src/color/Color.d.ts.map +0 -0
  1672. package/dist-extensions/src/color/color_map.d.ts +0 -0
  1673. package/dist-extensions/src/color/color_map.d.ts.map +0 -0
  1674. package/dist-extensions/src/color/constants.d.ts +0 -0
  1675. package/dist-extensions/src/color/constants.d.ts.map +0 -0
  1676. package/dist-extensions/src/color/typedefs.d.ts +0 -0
  1677. package/dist-extensions/src/color/typedefs.d.ts.map +0 -0
  1678. package/dist-extensions/src/color/util.d.ts +0 -0
  1679. package/dist-extensions/src/color/util.d.ts.map +0 -0
  1680. package/dist-extensions/src/config.d.ts +0 -0
  1681. package/dist-extensions/src/config.d.ts.map +0 -0
  1682. package/dist-extensions/src/constants.d.ts +0 -0
  1683. package/dist-extensions/src/constants.d.ts.map +0 -0
  1684. package/dist-extensions/src/controls/Control.d.ts +0 -0
  1685. package/dist-extensions/src/controls/Control.d.ts.map +0 -0
  1686. package/dist-extensions/src/controls/changeHeight.d.ts +0 -0
  1687. package/dist-extensions/src/controls/changeHeight.d.ts.map +0 -0
  1688. package/dist-extensions/src/controls/changeWidth.d.ts +0 -0
  1689. package/dist-extensions/src/controls/changeWidth.d.ts.map +0 -0
  1690. package/dist-extensions/src/controls/commonControls.d.ts +0 -0
  1691. package/dist-extensions/src/controls/commonControls.d.ts.map +0 -0
  1692. package/dist-extensions/src/controls/controlRendering.d.ts +0 -0
  1693. package/dist-extensions/src/controls/controlRendering.d.ts.map +0 -0
  1694. package/dist-extensions/src/controls/drag.d.ts +0 -0
  1695. package/dist-extensions/src/controls/drag.d.ts.map +0 -0
  1696. package/dist-extensions/src/controls/fireEvent.d.ts +0 -0
  1697. package/dist-extensions/src/controls/fireEvent.d.ts.map +0 -0
  1698. package/dist-extensions/src/controls/index.d.ts +0 -0
  1699. package/dist-extensions/src/controls/index.d.ts.map +0 -0
  1700. package/dist-extensions/src/controls/pathControl.d.ts +0 -0
  1701. package/dist-extensions/src/controls/pathControl.d.ts.map +0 -0
  1702. package/dist-extensions/src/controls/polyControl.d.ts +0 -0
  1703. package/dist-extensions/src/controls/polyControl.d.ts.map +0 -0
  1704. package/dist-extensions/src/controls/rotate.d.ts +0 -0
  1705. package/dist-extensions/src/controls/rotate.d.ts.map +0 -0
  1706. package/dist-extensions/src/controls/scale.d.ts +0 -0
  1707. package/dist-extensions/src/controls/scale.d.ts.map +0 -0
  1708. package/dist-extensions/src/controls/scaleSkew.d.ts +0 -0
  1709. package/dist-extensions/src/controls/scaleSkew.d.ts.map +0 -0
  1710. package/dist-extensions/src/controls/skew.d.ts +0 -0
  1711. package/dist-extensions/src/controls/skew.d.ts.map +0 -0
  1712. package/dist-extensions/src/controls/util.d.ts +0 -0
  1713. package/dist-extensions/src/controls/util.d.ts.map +0 -0
  1714. package/dist-extensions/src/controls/wrapWithFireEvent.d.ts +0 -0
  1715. package/dist-extensions/src/controls/wrapWithFireEvent.d.ts.map +0 -0
  1716. package/dist-extensions/src/controls/wrapWithFixedAnchor.d.ts +0 -0
  1717. package/dist-extensions/src/controls/wrapWithFixedAnchor.d.ts.map +0 -0
  1718. package/dist-extensions/src/env/browser.d.ts +0 -0
  1719. package/dist-extensions/src/env/browser.d.ts.map +0 -0
  1720. package/dist-extensions/src/env/index.d.ts +0 -0
  1721. package/dist-extensions/src/env/index.d.ts.map +0 -0
  1722. package/dist-extensions/src/env/types.d.ts +0 -0
  1723. package/dist-extensions/src/env/types.d.ts.map +0 -0
  1724. package/dist-extensions/src/filters/BaseFilter.d.ts +0 -0
  1725. package/dist-extensions/src/filters/BaseFilter.d.ts.map +0 -0
  1726. package/dist-extensions/src/filters/BlendColor.d.ts +0 -0
  1727. package/dist-extensions/src/filters/BlendColor.d.ts.map +0 -0
  1728. package/dist-extensions/src/filters/BlendImage.d.ts +0 -0
  1729. package/dist-extensions/src/filters/BlendImage.d.ts.map +0 -0
  1730. package/dist-extensions/src/filters/Blur.d.ts +0 -0
  1731. package/dist-extensions/src/filters/Blur.d.ts.map +0 -0
  1732. package/dist-extensions/src/filters/Brightness.d.ts +0 -0
  1733. package/dist-extensions/src/filters/Brightness.d.ts.map +0 -0
  1734. package/dist-extensions/src/filters/Canvas2dFilterBackend.d.ts +0 -0
  1735. package/dist-extensions/src/filters/Canvas2dFilterBackend.d.ts.map +0 -0
  1736. package/dist-extensions/src/filters/ColorMatrix.d.ts +0 -0
  1737. package/dist-extensions/src/filters/ColorMatrix.d.ts.map +0 -0
  1738. package/dist-extensions/src/filters/ColorMatrixFilters.d.ts +0 -0
  1739. package/dist-extensions/src/filters/ColorMatrixFilters.d.ts.map +0 -0
  1740. package/dist-extensions/src/filters/Composed.d.ts +0 -0
  1741. package/dist-extensions/src/filters/Composed.d.ts.map +0 -0
  1742. package/dist-extensions/src/filters/Contrast.d.ts +0 -0
  1743. package/dist-extensions/src/filters/Contrast.d.ts.map +0 -0
  1744. package/dist-extensions/src/filters/Convolute.d.ts +0 -0
  1745. package/dist-extensions/src/filters/Convolute.d.ts.map +0 -0
  1746. package/dist-extensions/src/filters/FilterBackend.d.ts +0 -0
  1747. package/dist-extensions/src/filters/FilterBackend.d.ts.map +0 -0
  1748. package/dist-extensions/src/filters/GLProbes/GLProbe.d.ts +0 -0
  1749. package/dist-extensions/src/filters/GLProbes/GLProbe.d.ts.map +0 -0
  1750. package/dist-extensions/src/filters/GLProbes/WebGLProbe.d.ts +0 -0
  1751. package/dist-extensions/src/filters/GLProbes/WebGLProbe.d.ts.map +0 -0
  1752. package/dist-extensions/src/filters/Gamma.d.ts +0 -0
  1753. package/dist-extensions/src/filters/Gamma.d.ts.map +0 -0
  1754. package/dist-extensions/src/filters/Grayscale.d.ts +0 -0
  1755. package/dist-extensions/src/filters/Grayscale.d.ts.map +0 -0
  1756. package/dist-extensions/src/filters/HueRotation.d.ts +0 -0
  1757. package/dist-extensions/src/filters/HueRotation.d.ts.map +0 -0
  1758. package/dist-extensions/src/filters/Invert.d.ts +0 -0
  1759. package/dist-extensions/src/filters/Invert.d.ts.map +0 -0
  1760. package/dist-extensions/src/filters/Noise.d.ts +0 -0
  1761. package/dist-extensions/src/filters/Noise.d.ts.map +0 -0
  1762. package/dist-extensions/src/filters/Pixelate.d.ts +0 -0
  1763. package/dist-extensions/src/filters/Pixelate.d.ts.map +0 -0
  1764. package/dist-extensions/src/filters/RemoveColor.d.ts +0 -0
  1765. package/dist-extensions/src/filters/RemoveColor.d.ts.map +0 -0
  1766. package/dist-extensions/src/filters/Resize.d.ts +0 -0
  1767. package/dist-extensions/src/filters/Resize.d.ts.map +0 -0
  1768. package/dist-extensions/src/filters/Saturation.d.ts +0 -0
  1769. package/dist-extensions/src/filters/Saturation.d.ts.map +0 -0
  1770. package/dist-extensions/src/filters/Vibrance.d.ts +0 -0
  1771. package/dist-extensions/src/filters/Vibrance.d.ts.map +0 -0
  1772. package/dist-extensions/src/filters/WebGLFilterBackend.d.ts +0 -0
  1773. package/dist-extensions/src/filters/WebGLFilterBackend.d.ts.map +0 -0
  1774. package/dist-extensions/src/filters/filters.d.ts +0 -0
  1775. package/dist-extensions/src/filters/filters.d.ts.map +0 -0
  1776. package/dist-extensions/src/filters/index.d.ts +0 -0
  1777. package/dist-extensions/src/filters/index.d.ts.map +0 -0
  1778. package/dist-extensions/src/filters/shaders/baseFilter.d.ts +0 -0
  1779. package/dist-extensions/src/filters/shaders/baseFilter.d.ts.map +0 -0
  1780. package/dist-extensions/src/filters/shaders/blendColor.d.ts +0 -0
  1781. package/dist-extensions/src/filters/shaders/blendColor.d.ts.map +0 -0
  1782. package/dist-extensions/src/filters/shaders/blendImage.d.ts +0 -0
  1783. package/dist-extensions/src/filters/shaders/blendImage.d.ts.map +0 -0
  1784. package/dist-extensions/src/filters/shaders/blur.d.ts +0 -0
  1785. package/dist-extensions/src/filters/shaders/blur.d.ts.map +0 -0
  1786. package/dist-extensions/src/filters/shaders/brightness.d.ts +0 -0
  1787. package/dist-extensions/src/filters/shaders/brightness.d.ts.map +0 -0
  1788. package/dist-extensions/src/filters/shaders/colorMatrix.d.ts +0 -0
  1789. package/dist-extensions/src/filters/shaders/colorMatrix.d.ts.map +0 -0
  1790. package/dist-extensions/src/filters/shaders/constrast.d.ts +0 -0
  1791. package/dist-extensions/src/filters/shaders/constrast.d.ts.map +0 -0
  1792. package/dist-extensions/src/filters/shaders/convolute.d.ts +0 -0
  1793. package/dist-extensions/src/filters/shaders/convolute.d.ts.map +0 -0
  1794. package/dist-extensions/src/filters/shaders/gamma.d.ts +0 -0
  1795. package/dist-extensions/src/filters/shaders/gamma.d.ts.map +0 -0
  1796. package/dist-extensions/src/filters/shaders/grayscale.d.ts +0 -0
  1797. package/dist-extensions/src/filters/shaders/grayscale.d.ts.map +0 -0
  1798. package/dist-extensions/src/filters/shaders/invert.d.ts +0 -0
  1799. package/dist-extensions/src/filters/shaders/invert.d.ts.map +0 -0
  1800. package/dist-extensions/src/filters/shaders/noise.d.ts +0 -0
  1801. package/dist-extensions/src/filters/shaders/noise.d.ts.map +0 -0
  1802. package/dist-extensions/src/filters/shaders/pixelate.d.ts +0 -0
  1803. package/dist-extensions/src/filters/shaders/pixelate.d.ts.map +0 -0
  1804. package/dist-extensions/src/filters/shaders/removeColor.d.ts +0 -0
  1805. package/dist-extensions/src/filters/shaders/removeColor.d.ts.map +0 -0
  1806. package/dist-extensions/src/filters/shaders/saturation.d.ts +0 -0
  1807. package/dist-extensions/src/filters/shaders/saturation.d.ts.map +0 -0
  1808. package/dist-extensions/src/filters/shaders/vibrance.d.ts +0 -0
  1809. package/dist-extensions/src/filters/shaders/vibrance.d.ts.map +0 -0
  1810. package/dist-extensions/src/filters/typedefs.d.ts +0 -0
  1811. package/dist-extensions/src/filters/typedefs.d.ts.map +0 -0
  1812. package/dist-extensions/src/filters/utils.d.ts +0 -0
  1813. package/dist-extensions/src/filters/utils.d.ts.map +0 -0
  1814. package/dist-extensions/src/gradient/Gradient.d.ts +0 -0
  1815. package/dist-extensions/src/gradient/Gradient.d.ts.map +0 -0
  1816. package/dist-extensions/src/gradient/constants.d.ts +0 -0
  1817. package/dist-extensions/src/gradient/constants.d.ts.map +0 -0
  1818. package/dist-extensions/src/gradient/index.d.ts +0 -0
  1819. package/dist-extensions/src/gradient/index.d.ts.map +0 -0
  1820. package/dist-extensions/src/gradient/parser/misc.d.ts +0 -0
  1821. package/dist-extensions/src/gradient/parser/misc.d.ts.map +0 -0
  1822. package/dist-extensions/src/gradient/parser/parseColorStops.d.ts +0 -0
  1823. package/dist-extensions/src/gradient/parser/parseColorStops.d.ts.map +0 -0
  1824. package/dist-extensions/src/gradient/parser/parseCoords.d.ts +0 -0
  1825. package/dist-extensions/src/gradient/parser/parseCoords.d.ts.map +0 -0
  1826. package/dist-extensions/src/gradient/typedefs.d.ts +0 -0
  1827. package/dist-extensions/src/gradient/typedefs.d.ts.map +0 -0
  1828. package/dist-extensions/src/parser/applyViewboxTransform.d.ts +0 -0
  1829. package/dist-extensions/src/parser/applyViewboxTransform.d.ts.map +0 -0
  1830. package/dist-extensions/src/parser/attributes.d.ts +0 -0
  1831. package/dist-extensions/src/parser/attributes.d.ts.map +0 -0
  1832. package/dist-extensions/src/parser/constants.d.ts +0 -0
  1833. package/dist-extensions/src/parser/constants.d.ts.map +0 -0
  1834. package/dist-extensions/src/parser/doesSomeParentMatch.d.ts +0 -0
  1835. package/dist-extensions/src/parser/doesSomeParentMatch.d.ts.map +0 -0
  1836. package/dist-extensions/src/parser/elementMatchesRule.d.ts +0 -0
  1837. package/dist-extensions/src/parser/elementMatchesRule.d.ts.map +0 -0
  1838. package/dist-extensions/src/parser/elements_parser.d.ts +0 -0
  1839. package/dist-extensions/src/parser/elements_parser.d.ts.map +0 -0
  1840. package/dist-extensions/src/parser/getCSSRules.d.ts +0 -0
  1841. package/dist-extensions/src/parser/getCSSRules.d.ts.map +0 -0
  1842. package/dist-extensions/src/parser/getGlobalStylesForElement.d.ts +0 -0
  1843. package/dist-extensions/src/parser/getGlobalStylesForElement.d.ts.map +0 -0
  1844. package/dist-extensions/src/parser/getGradientDefs.d.ts +0 -0
  1845. package/dist-extensions/src/parser/getGradientDefs.d.ts.map +0 -0
  1846. package/dist-extensions/src/parser/getMultipleNodes.d.ts +0 -0
  1847. package/dist-extensions/src/parser/getMultipleNodes.d.ts.map +0 -0
  1848. package/dist-extensions/src/parser/getSvgRegex.d.ts +0 -0
  1849. package/dist-extensions/src/parser/getSvgRegex.d.ts.map +0 -0
  1850. package/dist-extensions/src/parser/getTagName.d.ts +0 -0
  1851. package/dist-extensions/src/parser/getTagName.d.ts.map +0 -0
  1852. package/dist-extensions/src/parser/hasInvalidAncestor.d.ts +0 -0
  1853. package/dist-extensions/src/parser/hasInvalidAncestor.d.ts.map +0 -0
  1854. package/dist-extensions/src/parser/loadSVGFromString.d.ts +0 -0
  1855. package/dist-extensions/src/parser/loadSVGFromString.d.ts.map +0 -0
  1856. package/dist-extensions/src/parser/loadSVGFromURL.d.ts +0 -0
  1857. package/dist-extensions/src/parser/loadSVGFromURL.d.ts.map +0 -0
  1858. package/dist-extensions/src/parser/normalizeAttr.d.ts +0 -0
  1859. package/dist-extensions/src/parser/normalizeAttr.d.ts.map +0 -0
  1860. package/dist-extensions/src/parser/normalizeValue.d.ts +0 -0
  1861. package/dist-extensions/src/parser/normalizeValue.d.ts.map +0 -0
  1862. package/dist-extensions/src/parser/parseAttributes.d.ts +0 -0
  1863. package/dist-extensions/src/parser/parseAttributes.d.ts.map +0 -0
  1864. package/dist-extensions/src/parser/parseFontDeclaration.d.ts +0 -0
  1865. package/dist-extensions/src/parser/parseFontDeclaration.d.ts.map +0 -0
  1866. package/dist-extensions/src/parser/parsePointsAttribute.d.ts +0 -0
  1867. package/dist-extensions/src/parser/parsePointsAttribute.d.ts.map +0 -0
  1868. package/dist-extensions/src/parser/parseSVGDocument.d.ts +0 -0
  1869. package/dist-extensions/src/parser/parseSVGDocument.d.ts.map +0 -0
  1870. package/dist-extensions/src/parser/parseStyleAttribute.d.ts +0 -0
  1871. package/dist-extensions/src/parser/parseStyleAttribute.d.ts.map +0 -0
  1872. package/dist-extensions/src/parser/parseStyleObject.d.ts +0 -0
  1873. package/dist-extensions/src/parser/parseStyleObject.d.ts.map +0 -0
  1874. package/dist-extensions/src/parser/parseStyleString.d.ts +0 -0
  1875. package/dist-extensions/src/parser/parseStyleString.d.ts.map +0 -0
  1876. package/dist-extensions/src/parser/parseTransformAttribute.d.ts +0 -0
  1877. package/dist-extensions/src/parser/parseTransformAttribute.d.ts.map +0 -0
  1878. package/dist-extensions/src/parser/parseUseDirectives.d.ts +0 -0
  1879. package/dist-extensions/src/parser/parseUseDirectives.d.ts.map +0 -0
  1880. package/dist-extensions/src/parser/percent.d.ts +0 -0
  1881. package/dist-extensions/src/parser/percent.d.ts.map +0 -0
  1882. package/dist-extensions/src/parser/recursivelyParseGradientsXlink.d.ts +0 -0
  1883. package/dist-extensions/src/parser/recursivelyParseGradientsXlink.d.ts.map +0 -0
  1884. package/dist-extensions/src/parser/selectorMatches.d.ts +0 -0
  1885. package/dist-extensions/src/parser/selectorMatches.d.ts.map +0 -0
  1886. package/dist-extensions/src/parser/setStrokeFillOpacity.d.ts +0 -0
  1887. package/dist-extensions/src/parser/setStrokeFillOpacity.d.ts.map +0 -0
  1888. package/dist-extensions/src/parser/typedefs.d.ts +0 -0
  1889. package/dist-extensions/src/parser/typedefs.d.ts.map +0 -0
  1890. package/dist-extensions/src/shapes/ActiveSelection.d.ts +0 -0
  1891. package/dist-extensions/src/shapes/ActiveSelection.d.ts.map +0 -0
  1892. package/dist-extensions/src/shapes/Circle.d.ts +0 -0
  1893. package/dist-extensions/src/shapes/Circle.d.ts.map +0 -0
  1894. package/dist-extensions/src/shapes/Ellipse.d.ts +0 -0
  1895. package/dist-extensions/src/shapes/Ellipse.d.ts.map +0 -0
  1896. package/dist-extensions/src/shapes/Group.d.ts +0 -0
  1897. package/dist-extensions/src/shapes/Group.d.ts.map +0 -0
  1898. package/dist-extensions/src/shapes/IText/DraggableTextDelegate.d.ts +0 -0
  1899. package/dist-extensions/src/shapes/IText/DraggableTextDelegate.d.ts.map +0 -0
  1900. package/dist-extensions/src/shapes/IText/IText.d.ts +0 -0
  1901. package/dist-extensions/src/shapes/IText/IText.d.ts.map +0 -0
  1902. package/dist-extensions/src/shapes/IText/ITextBehavior.d.ts +0 -0
  1903. package/dist-extensions/src/shapes/IText/ITextBehavior.d.ts.map +1 -1
  1904. package/dist-extensions/src/shapes/IText/ITextClickBehavior.d.ts +0 -0
  1905. package/dist-extensions/src/shapes/IText/ITextClickBehavior.d.ts.map +0 -0
  1906. package/dist-extensions/src/shapes/IText/ITextKeyBehavior.d.ts +0 -0
  1907. package/dist-extensions/src/shapes/IText/ITextKeyBehavior.d.ts.map +0 -0
  1908. package/dist-extensions/src/shapes/IText/constants.d.ts +0 -0
  1909. package/dist-extensions/src/shapes/IText/constants.d.ts.map +0 -0
  1910. package/dist-extensions/src/shapes/Image.d.ts +0 -0
  1911. package/dist-extensions/src/shapes/Image.d.ts.map +0 -0
  1912. package/dist-extensions/src/shapes/Line.d.ts +0 -0
  1913. package/dist-extensions/src/shapes/Line.d.ts.map +0 -0
  1914. package/dist-extensions/src/shapes/Object/FabricObject.d.ts +0 -0
  1915. package/dist-extensions/src/shapes/Object/FabricObject.d.ts.map +0 -0
  1916. package/dist-extensions/src/shapes/Object/FabricObjectSVGExportMixin.d.ts +0 -0
  1917. package/dist-extensions/src/shapes/Object/FabricObjectSVGExportMixin.d.ts.map +0 -0
  1918. package/dist-extensions/src/shapes/Object/InteractiveObject.d.ts +0 -0
  1919. package/dist-extensions/src/shapes/Object/InteractiveObject.d.ts.map +0 -0
  1920. package/dist-extensions/src/shapes/Object/Object.d.ts +0 -0
  1921. package/dist-extensions/src/shapes/Object/Object.d.ts.map +0 -0
  1922. package/dist-extensions/src/shapes/Object/ObjectGeometry.d.ts +0 -0
  1923. package/dist-extensions/src/shapes/Object/ObjectGeometry.d.ts.map +0 -0
  1924. package/dist-extensions/src/shapes/Object/defaultValues.d.ts +0 -0
  1925. package/dist-extensions/src/shapes/Object/defaultValues.d.ts.map +0 -0
  1926. package/dist-extensions/src/shapes/Object/types/BaseProps.d.ts +0 -0
  1927. package/dist-extensions/src/shapes/Object/types/BaseProps.d.ts.map +0 -0
  1928. package/dist-extensions/src/shapes/Object/types/BorderProps.d.ts +0 -0
  1929. package/dist-extensions/src/shapes/Object/types/BorderProps.d.ts.map +0 -0
  1930. package/dist-extensions/src/shapes/Object/types/ControlProps.d.ts +0 -0
  1931. package/dist-extensions/src/shapes/Object/types/ControlProps.d.ts.map +0 -0
  1932. package/dist-extensions/src/shapes/Object/types/FabricObjectProps.d.ts +0 -0
  1933. package/dist-extensions/src/shapes/Object/types/FabricObjectProps.d.ts.map +0 -0
  1934. package/dist-extensions/src/shapes/Object/types/FillStrokeProps.d.ts +0 -0
  1935. package/dist-extensions/src/shapes/Object/types/FillStrokeProps.d.ts.map +0 -0
  1936. package/dist-extensions/src/shapes/Object/types/LockInteractionProps.d.ts +0 -0
  1937. package/dist-extensions/src/shapes/Object/types/LockInteractionProps.d.ts.map +0 -0
  1938. package/dist-extensions/src/shapes/Object/types/ObjectProps.d.ts +0 -0
  1939. package/dist-extensions/src/shapes/Object/types/ObjectProps.d.ts.map +0 -0
  1940. package/dist-extensions/src/shapes/Object/types/ObjectTransformProps.d.ts +0 -0
  1941. package/dist-extensions/src/shapes/Object/types/ObjectTransformProps.d.ts.map +0 -0
  1942. package/dist-extensions/src/shapes/Object/types/SerializedObjectProps.d.ts +0 -0
  1943. package/dist-extensions/src/shapes/Object/types/SerializedObjectProps.d.ts.map +0 -0
  1944. package/dist-extensions/src/shapes/Object/types/index.d.ts +0 -0
  1945. package/dist-extensions/src/shapes/Object/types/index.d.ts.map +0 -0
  1946. package/dist-extensions/src/shapes/Path.d.ts +0 -0
  1947. package/dist-extensions/src/shapes/Path.d.ts.map +0 -0
  1948. package/dist-extensions/src/shapes/Polygon.d.ts +0 -0
  1949. package/dist-extensions/src/shapes/Polygon.d.ts.map +0 -0
  1950. package/dist-extensions/src/shapes/Polyline.d.ts +0 -0
  1951. package/dist-extensions/src/shapes/Polyline.d.ts.map +0 -0
  1952. package/dist-extensions/src/shapes/Rect.d.ts +0 -0
  1953. package/dist-extensions/src/shapes/Rect.d.ts.map +0 -0
  1954. package/dist-extensions/src/shapes/Text/StyledText.d.ts +0 -0
  1955. package/dist-extensions/src/shapes/Text/StyledText.d.ts.map +0 -0
  1956. package/dist-extensions/src/shapes/Text/Text.d.ts +1 -0
  1957. package/dist-extensions/src/shapes/Text/Text.d.ts.map +1 -1
  1958. package/dist-extensions/src/shapes/Text/TextSVGExportMixin.d.ts +0 -0
  1959. package/dist-extensions/src/shapes/Text/TextSVGExportMixin.d.ts.map +0 -0
  1960. package/dist-extensions/src/shapes/Text/constants.d.ts +0 -0
  1961. package/dist-extensions/src/shapes/Text/constants.d.ts.map +0 -0
  1962. package/dist-extensions/src/shapes/Textbox.d.ts +20 -0
  1963. package/dist-extensions/src/shapes/Textbox.d.ts.map +1 -1
  1964. package/dist-extensions/src/shapes/Triangle.d.ts +0 -0
  1965. package/dist-extensions/src/shapes/Triangle.d.ts.map +0 -0
  1966. package/dist-extensions/src/text/browserLines.d.ts +7 -2
  1967. package/dist-extensions/src/text/browserLines.d.ts.map +1 -1
  1968. package/dist-extensions/src/text/ellipsis.d.ts +0 -0
  1969. package/dist-extensions/src/text/ellipsis.d.ts.map +0 -0
  1970. package/dist-extensions/src/text/hitTest.d.ts +0 -0
  1971. package/dist-extensions/src/text/hitTest.d.ts.map +0 -0
  1972. package/dist-extensions/src/text/layout.d.ts +0 -0
  1973. package/dist-extensions/src/text/layout.d.ts.map +0 -0
  1974. package/dist-extensions/src/text/measure.d.ts +0 -0
  1975. package/dist-extensions/src/text/measure.d.ts.map +0 -0
  1976. package/dist-extensions/src/text/overlayEditor.d.ts +1 -0
  1977. package/dist-extensions/src/text/overlayEditor.d.ts.map +1 -1
  1978. package/dist-extensions/src/text/unicode.d.ts +0 -0
  1979. package/dist-extensions/src/text/unicode.d.ts.map +0 -0
  1980. package/dist-extensions/src/typedefs.d.ts +0 -0
  1981. package/dist-extensions/src/typedefs.d.ts.map +0 -0
  1982. package/dist-extensions/src/util/animation/AnimationBase.d.ts +0 -0
  1983. package/dist-extensions/src/util/animation/AnimationBase.d.ts.map +0 -0
  1984. package/dist-extensions/src/util/animation/AnimationFrameProvider.d.ts +0 -0
  1985. package/dist-extensions/src/util/animation/AnimationFrameProvider.d.ts.map +0 -0
  1986. package/dist-extensions/src/util/animation/AnimationRegistry.d.ts +0 -0
  1987. package/dist-extensions/src/util/animation/AnimationRegistry.d.ts.map +0 -0
  1988. package/dist-extensions/src/util/animation/ArrayAnimation.d.ts +0 -0
  1989. package/dist-extensions/src/util/animation/ArrayAnimation.d.ts.map +0 -0
  1990. package/dist-extensions/src/util/animation/ColorAnimation.d.ts +0 -0
  1991. package/dist-extensions/src/util/animation/ColorAnimation.d.ts.map +0 -0
  1992. package/dist-extensions/src/util/animation/ValueAnimation.d.ts +0 -0
  1993. package/dist-extensions/src/util/animation/ValueAnimation.d.ts.map +0 -0
  1994. package/dist-extensions/src/util/animation/animate.d.ts +0 -0
  1995. package/dist-extensions/src/util/animation/animate.d.ts.map +0 -0
  1996. package/dist-extensions/src/util/animation/easing.d.ts +0 -0
  1997. package/dist-extensions/src/util/animation/easing.d.ts.map +0 -0
  1998. package/dist-extensions/src/util/animation/index.d.ts +0 -0
  1999. package/dist-extensions/src/util/animation/index.d.ts.map +0 -0
  2000. package/dist-extensions/src/util/animation/types.d.ts +0 -0
  2001. package/dist-extensions/src/util/animation/types.d.ts.map +0 -0
  2002. package/dist-extensions/src/util/applyMixins.d.ts +0 -0
  2003. package/dist-extensions/src/util/applyMixins.d.ts.map +0 -0
  2004. package/dist-extensions/src/util/dom_event.d.ts +0 -0
  2005. package/dist-extensions/src/util/dom_event.d.ts.map +0 -0
  2006. package/dist-extensions/src/util/dom_misc.d.ts +0 -0
  2007. package/dist-extensions/src/util/dom_misc.d.ts.map +0 -0
  2008. package/dist-extensions/src/util/index.d.ts +0 -0
  2009. package/dist-extensions/src/util/index.d.ts.map +0 -0
  2010. package/dist-extensions/src/util/internals/applyCanvasTransform.d.ts +0 -0
  2011. package/dist-extensions/src/util/internals/applyCanvasTransform.d.ts.map +0 -0
  2012. package/dist-extensions/src/util/internals/cleanupSvgAttribute.d.ts +0 -0
  2013. package/dist-extensions/src/util/internals/cleanupSvgAttribute.d.ts.map +0 -0
  2014. package/dist-extensions/src/util/internals/cloneStyles.d.ts +0 -0
  2015. package/dist-extensions/src/util/internals/cloneStyles.d.ts.map +0 -0
  2016. package/dist-extensions/src/util/internals/console.d.ts +0 -0
  2017. package/dist-extensions/src/util/internals/console.d.ts.map +0 -0
  2018. package/dist-extensions/src/util/internals/dom_style.d.ts +0 -0
  2019. package/dist-extensions/src/util/internals/dom_style.d.ts.map +0 -0
  2020. package/dist-extensions/src/util/internals/findRight.d.ts +0 -0
  2021. package/dist-extensions/src/util/internals/findRight.d.ts.map +0 -0
  2022. package/dist-extensions/src/util/internals/getRandomInt.d.ts +0 -0
  2023. package/dist-extensions/src/util/internals/getRandomInt.d.ts.map +0 -0
  2024. package/dist-extensions/src/util/internals/ifNaN.d.ts +0 -0
  2025. package/dist-extensions/src/util/internals/ifNaN.d.ts.map +0 -0
  2026. package/dist-extensions/src/util/internals/removeFromArray.d.ts +0 -0
  2027. package/dist-extensions/src/util/internals/removeFromArray.d.ts.map +0 -0
  2028. package/dist-extensions/src/util/internals/uid.d.ts +0 -0
  2029. package/dist-extensions/src/util/internals/uid.d.ts.map +0 -0
  2030. package/dist-extensions/src/util/lang_string.d.ts +0 -0
  2031. package/dist-extensions/src/util/lang_string.d.ts.map +0 -0
  2032. package/dist-extensions/src/util/misc/boundingBoxFromPoints.d.ts +0 -0
  2033. package/dist-extensions/src/util/misc/boundingBoxFromPoints.d.ts.map +0 -0
  2034. package/dist-extensions/src/util/misc/capValue.d.ts +0 -0
  2035. package/dist-extensions/src/util/misc/capValue.d.ts.map +0 -0
  2036. package/dist-extensions/src/util/misc/cornerRadius.d.ts +0 -0
  2037. package/dist-extensions/src/util/misc/cornerRadius.d.ts.map +0 -0
  2038. package/dist-extensions/src/util/misc/cos.d.ts +0 -0
  2039. package/dist-extensions/src/util/misc/cos.d.ts.map +0 -0
  2040. package/dist-extensions/src/util/misc/dom.d.ts +0 -0
  2041. package/dist-extensions/src/util/misc/dom.d.ts.map +0 -0
  2042. package/dist-extensions/src/util/misc/findScaleTo.d.ts +0 -0
  2043. package/dist-extensions/src/util/misc/findScaleTo.d.ts.map +0 -0
  2044. package/dist-extensions/src/util/misc/groupSVGElements.d.ts +0 -0
  2045. package/dist-extensions/src/util/misc/groupSVGElements.d.ts.map +0 -0
  2046. package/dist-extensions/src/util/misc/isTransparent.d.ts +0 -0
  2047. package/dist-extensions/src/util/misc/isTransparent.d.ts.map +0 -0
  2048. package/dist-extensions/src/util/misc/matrix.d.ts +0 -0
  2049. package/dist-extensions/src/util/misc/matrix.d.ts.map +0 -0
  2050. package/dist-extensions/src/util/misc/mergeClipPaths.d.ts +0 -0
  2051. package/dist-extensions/src/util/misc/mergeClipPaths.d.ts.map +0 -0
  2052. package/dist-extensions/src/util/misc/objectEnlive.d.ts +0 -0
  2053. package/dist-extensions/src/util/misc/objectEnlive.d.ts.map +0 -0
  2054. package/dist-extensions/src/util/misc/objectTransforms.d.ts +0 -0
  2055. package/dist-extensions/src/util/misc/objectTransforms.d.ts.map +0 -0
  2056. package/dist-extensions/src/util/misc/pick.d.ts +0 -0
  2057. package/dist-extensions/src/util/misc/pick.d.ts.map +0 -0
  2058. package/dist-extensions/src/util/misc/planeChange.d.ts +0 -0
  2059. package/dist-extensions/src/util/misc/planeChange.d.ts.map +0 -0
  2060. package/dist-extensions/src/util/misc/projectStroke/StrokeLineCapProjections.d.ts +0 -0
  2061. package/dist-extensions/src/util/misc/projectStroke/StrokeLineCapProjections.d.ts.map +0 -0
  2062. package/dist-extensions/src/util/misc/projectStroke/StrokeLineJoinProjections.d.ts +0 -0
  2063. package/dist-extensions/src/util/misc/projectStroke/StrokeLineJoinProjections.d.ts.map +0 -0
  2064. package/dist-extensions/src/util/misc/projectStroke/StrokeProjectionsBase.d.ts +0 -0
  2065. package/dist-extensions/src/util/misc/projectStroke/StrokeProjectionsBase.d.ts.map +0 -0
  2066. package/dist-extensions/src/util/misc/projectStroke/index.d.ts +0 -0
  2067. package/dist-extensions/src/util/misc/projectStroke/index.d.ts.map +0 -0
  2068. package/dist-extensions/src/util/misc/projectStroke/types.d.ts +0 -0
  2069. package/dist-extensions/src/util/misc/projectStroke/types.d.ts.map +0 -0
  2070. package/dist-extensions/src/util/misc/radiansDegreesConversion.d.ts +0 -0
  2071. package/dist-extensions/src/util/misc/radiansDegreesConversion.d.ts.map +0 -0
  2072. package/dist-extensions/src/util/misc/resolveOrigin.d.ts +0 -0
  2073. package/dist-extensions/src/util/misc/resolveOrigin.d.ts.map +0 -0
  2074. package/dist-extensions/src/util/misc/sin.d.ts +0 -0
  2075. package/dist-extensions/src/util/misc/sin.d.ts.map +0 -0
  2076. package/dist-extensions/src/util/misc/svgExport.d.ts +0 -0
  2077. package/dist-extensions/src/util/misc/svgExport.d.ts.map +0 -0
  2078. package/dist-extensions/src/util/misc/svgParsing.d.ts +0 -0
  2079. package/dist-extensions/src/util/misc/svgParsing.d.ts.map +0 -0
  2080. package/dist-extensions/src/util/misc/textStyles.d.ts +0 -0
  2081. package/dist-extensions/src/util/misc/textStyles.d.ts.map +0 -0
  2082. package/dist-extensions/src/util/misc/toFixed.d.ts +0 -0
  2083. package/dist-extensions/src/util/misc/toFixed.d.ts.map +0 -0
  2084. package/dist-extensions/src/util/misc/vectors.d.ts +0 -0
  2085. package/dist-extensions/src/util/misc/vectors.d.ts.map +0 -0
  2086. package/dist-extensions/src/util/path/index.d.ts +0 -0
  2087. package/dist-extensions/src/util/path/index.d.ts.map +0 -0
  2088. package/dist-extensions/src/util/path/regex.d.ts +0 -0
  2089. package/dist-extensions/src/util/path/regex.d.ts.map +0 -0
  2090. package/dist-extensions/src/util/path/typedefs.d.ts +0 -0
  2091. package/dist-extensions/src/util/path/typedefs.d.ts.map +0 -0
  2092. package/dist-extensions/src/util/transform_matrix_removal.d.ts +0 -0
  2093. package/dist-extensions/src/util/transform_matrix_removal.d.ts.map +0 -0
  2094. package/dist-extensions/src/util/typeAssertions.d.ts +0 -0
  2095. package/dist-extensions/src/util/typeAssertions.d.ts.map +0 -0
  2096. package/docs/fabric-konva-gap-analysis.md +0 -0
  2097. package/docs/konva-text-behavior-spec.md +0 -0
  2098. package/docs/text-engine-design.md +0 -0
  2099. package/eslint.config.mjs +0 -0
  2100. package/examples/overlay-edit.html +416 -416
  2101. package/extensions/README.MD +0 -0
  2102. package/extensions/aligning_guidelines/README.MD +0 -0
  2103. package/extensions/aligning_guidelines/constant.ts +0 -0
  2104. package/extensions/aligning_guidelines/index.ts +0 -0
  2105. package/extensions/aligning_guidelines/typedefs.ts +0 -0
  2106. package/extensions/aligning_guidelines/util/basic.spec.ts +0 -0
  2107. package/extensions/aligning_guidelines/util/basic.ts +0 -0
  2108. package/extensions/aligning_guidelines/util/collect-line.ts +0 -0
  2109. package/extensions/aligning_guidelines/util/collect-point.ts +0 -0
  2110. package/extensions/aligning_guidelines/util/draw.ts +0 -0
  2111. package/extensions/aligning_guidelines/util/get-objects-by-target.ts +0 -0
  2112. package/extensions/data_updaters/README.md +0 -0
  2113. package/extensions/data_updaters/gradient/__snapshots__/index.spec.ts.snap +0 -0
  2114. package/extensions/data_updaters/gradient/index.spec.ts +0 -0
  2115. package/extensions/data_updaters/gradient/index.ts +0 -0
  2116. package/extensions/data_updaters/origins/README.md +0 -0
  2117. package/extensions/data_updaters/origins/index.spec.ts +0 -0
  2118. package/extensions/data_updaters/origins/index.ts +0 -0
  2119. package/extensions/index.ts +0 -0
  2120. package/fabric.ts +182 -182
  2121. package/index.node.ts +0 -0
  2122. package/index.ts +0 -0
  2123. package/lib/aligning_guidelines.js +0 -0
  2124. package/lib/centering_guidelines.js +0 -0
  2125. package/lib/event.js +0 -0
  2126. package/package.json +164 -164
  2127. package/playwright.config.ts +0 -0
  2128. package/playwright.setup.ts +0 -0
  2129. package/{fonts → public/fonts}/STV Bold.ttf +0 -0
  2130. package/{fonts → public/fonts}/STV Light.ttf +0 -0
  2131. package/{fonts → public/fonts}/STV Regular.ttf +0 -0
  2132. package/publish-next.js +0 -0
  2133. package/publish.js +0 -0
  2134. package/rollup.config.mjs +0 -0
  2135. package/rtl-debug.html +744 -744
  2136. package/scripts/bench-text.js +591 -591
  2137. package/scripts/build.mjs +0 -0
  2138. package/scripts/buildLock.mjs +0 -0
  2139. package/scripts/buildReporter.mjs +0 -0
  2140. package/scripts/buildStats.mjs +0 -0
  2141. package/scripts/dirname.mjs +0 -0
  2142. package/scripts/git.mjs +0 -0
  2143. package/scripts/index.mjs +0 -0
  2144. package/scripts/sandbox.mjs +0 -0
  2145. package/src/ClassRegistry.spec.ts +0 -0
  2146. package/src/ClassRegistry.ts +0 -0
  2147. package/src/Collection.spec.ts +0 -0
  2148. package/src/Collection.ts +0 -0
  2149. package/src/CommonMethods.ts +0 -0
  2150. package/src/EventTypeDefs.ts +0 -0
  2151. package/src/Intersection.spec.ts +0 -0
  2152. package/src/Intersection.ts +0 -0
  2153. package/src/LayoutManager/ActiveSelectionLayoutManager.spec.ts +0 -0
  2154. package/src/LayoutManager/ActiveSelectionLayoutManager.ts +0 -0
  2155. package/src/LayoutManager/LayoutManager.spec.ts +0 -0
  2156. package/src/LayoutManager/LayoutManager.ts +0 -0
  2157. package/src/LayoutManager/LayoutStrategies/ClipPathLayout.ts +0 -0
  2158. package/src/LayoutManager/LayoutStrategies/FitContentLayout.ts +0 -0
  2159. package/src/LayoutManager/LayoutStrategies/FixedLayout.ts +0 -0
  2160. package/src/LayoutManager/LayoutStrategies/LayoutStrategy.ts +0 -0
  2161. package/src/LayoutManager/LayoutStrategies/utils.ts +0 -0
  2162. package/src/LayoutManager/README.md +0 -0
  2163. package/src/LayoutManager/__snapshots__/LayoutManager.spec.ts.snap +0 -0
  2164. package/src/LayoutManager/constants.ts +0 -0
  2165. package/src/LayoutManager/index.ts +0 -0
  2166. package/src/LayoutManager/types.ts +0 -0
  2167. package/src/Observable.spec.ts +0 -0
  2168. package/src/Observable.ts +0 -0
  2169. package/src/Pattern/Pattern.spec.ts +0 -0
  2170. package/src/Pattern/Pattern.ts +0 -0
  2171. package/src/Pattern/index.ts +0 -0
  2172. package/src/Pattern/types.ts +0 -0
  2173. package/src/Point.spec.ts +0 -0
  2174. package/src/Point.ts +0 -0
  2175. package/src/Shadow.spec.ts +0 -0
  2176. package/src/Shadow.ts +0 -0
  2177. package/src/__snapshots__/Shadow.spec.ts.snap +0 -0
  2178. package/src/brushes/BaseBrush.spec.ts +0 -0
  2179. package/src/brushes/BaseBrush.ts +0 -0
  2180. package/src/brushes/CircleBrush.test.ts +0 -0
  2181. package/src/brushes/CircleBrush.ts +0 -0
  2182. package/src/brushes/PatternBrush.ts +0 -0
  2183. package/src/brushes/PencilBrush.spec.ts +0 -0
  2184. package/src/brushes/PencilBrush.ts +0 -0
  2185. package/src/brushes/SprayBrush.ts +0 -0
  2186. package/src/brushes/__snapshots__/PencilBrush.spec.ts.snap +0 -0
  2187. package/src/brushes/typedefs.ts +0 -0
  2188. package/src/cache.spec.ts +0 -0
  2189. package/src/cache.ts +0 -0
  2190. package/src/canvas/Canvas-dispose.spec.ts +0 -0
  2191. package/src/canvas/Canvas-events.spec.ts +0 -0
  2192. package/src/canvas/Canvas.spec.ts +0 -0
  2193. package/src/canvas/Canvas.ts +0 -0
  2194. package/src/canvas/CanvasOptions.ts +0 -0
  2195. package/src/canvas/DOMManagers/CanvasDOMManager.ts +0 -0
  2196. package/src/canvas/DOMManagers/StaticCanvasDOMManager.ts +0 -0
  2197. package/src/canvas/DOMManagers/util.spec.ts +0 -0
  2198. package/src/canvas/DOMManagers/util.ts +0 -0
  2199. package/src/canvas/SelectableCanvas.spec.ts +0 -0
  2200. package/src/canvas/SelectableCanvas.ts +0 -0
  2201. package/src/canvas/StaticCanvas.spec.ts +0 -0
  2202. package/src/canvas/StaticCanvas.ts +0 -0
  2203. package/src/canvas/StaticCanvasOptions.ts +0 -0
  2204. package/src/canvas/TextEditingManager.ts +0 -0
  2205. package/src/canvas/__tests__/SelectableCanvas.spec.ts +0 -0
  2206. package/src/canvas/__tests__/__snapshots__/eventData.test.ts.snap +0 -0
  2207. package/src/canvas/__tests__/eventData.test.ts +0 -0
  2208. package/src/canvas/canvas_gestures.mixin.ts +0 -0
  2209. package/src/color/Color.ts +0 -0
  2210. package/src/color/color.test.ts +0 -0
  2211. package/src/color/color_map.ts +0 -0
  2212. package/src/color/constants.ts +0 -0
  2213. package/src/color/typedefs.ts +0 -0
  2214. package/src/color/util.ts +0 -0
  2215. package/src/config.ts +0 -0
  2216. package/src/constants.ts +0 -0
  2217. package/src/controls/Control-cursor.spec.ts +0 -0
  2218. package/src/controls/Control-handlers.spec.ts +0 -0
  2219. package/src/controls/Control.spec.ts +0 -0
  2220. package/src/controls/Control.ts +0 -0
  2221. package/src/controls/changeHeight.ts +0 -0
  2222. package/src/controls/changeWidth.test.ts +0 -0
  2223. package/src/controls/changeWidth.ts +0 -0
  2224. package/src/controls/commonControls.ts +0 -0
  2225. package/src/controls/controlRendering.ts +0 -0
  2226. package/src/controls/drag.ts +0 -0
  2227. package/src/controls/fireEvent.ts +0 -0
  2228. package/src/controls/index.ts +0 -0
  2229. package/src/controls/pathControl.spec.ts +0 -0
  2230. package/src/controls/pathControl.ts +0 -0
  2231. package/src/controls/polyControl.spec.ts +0 -0
  2232. package/src/controls/polyControl.ts +0 -0
  2233. package/src/controls/rotate.ts +0 -0
  2234. package/src/controls/scale.test.ts +0 -0
  2235. package/src/controls/scale.ts +0 -0
  2236. package/src/controls/scaleSkew.ts +0 -0
  2237. package/src/controls/skew.ts +0 -0
  2238. package/src/controls/util.ts +0 -0
  2239. package/src/controls/wrapWithFireEvent.ts +0 -0
  2240. package/src/controls/wrapWithFixedAnchor.spec.ts +0 -0
  2241. package/src/controls/wrapWithFixedAnchor.ts +0 -0
  2242. package/src/env/browser.ts +0 -0
  2243. package/src/env/env.spec.ts +0 -0
  2244. package/src/env/index.ts +0 -0
  2245. package/src/env/node.ts +0 -0
  2246. package/src/env/types.ts +0 -0
  2247. package/src/filters/BaseFilter.spec.ts +0 -0
  2248. package/src/filters/BaseFilter.ts +0 -0
  2249. package/src/filters/BlendColor.ts +0 -0
  2250. package/src/filters/BlendImage.ts +0 -0
  2251. package/src/filters/Blur.ts +0 -0
  2252. package/src/filters/Boilerplate.ts +0 -0
  2253. package/src/filters/Brightness.ts +0 -0
  2254. package/src/filters/Canvas2dFilterBackend.ts +0 -0
  2255. package/src/filters/ColorMatrix.spec.ts +0 -0
  2256. package/src/filters/ColorMatrix.ts +0 -0
  2257. package/src/filters/ColorMatrixFilters.ts +0 -0
  2258. package/src/filters/Composed.ts +0 -0
  2259. package/src/filters/Contrast.ts +0 -0
  2260. package/src/filters/Convolute.ts +0 -0
  2261. package/src/filters/FilterBackend.ts +0 -0
  2262. package/src/filters/GLProbes/GLProbe.ts +0 -0
  2263. package/src/filters/GLProbes/NodeGLProbe.ts +0 -0
  2264. package/src/filters/GLProbes/WebGLProbe.ts +0 -0
  2265. package/src/filters/Gamma.ts +0 -0
  2266. package/src/filters/Grayscale.ts +0 -0
  2267. package/src/filters/HueRotation.ts +0 -0
  2268. package/src/filters/Invert.ts +0 -0
  2269. package/src/filters/Noise.ts +0 -0
  2270. package/src/filters/Pixelate.ts +0 -0
  2271. package/src/filters/RemoveColor.ts +0 -0
  2272. package/src/filters/Resize.ts +0 -0
  2273. package/src/filters/Saturation.ts +0 -0
  2274. package/src/filters/Vibrance.ts +0 -0
  2275. package/src/filters/WebGLFilterBackend.spec.ts +0 -0
  2276. package/src/filters/WebGLFilterBackend.ts +0 -0
  2277. package/src/filters/filters.ts +0 -0
  2278. package/src/filters/index.ts +0 -0
  2279. package/src/filters/shaders/baseFilter.ts +0 -0
  2280. package/src/filters/shaders/blendColor.ts +0 -0
  2281. package/src/filters/shaders/blendImage.ts +0 -0
  2282. package/src/filters/shaders/blur.ts +0 -0
  2283. package/src/filters/shaders/brightness.ts +0 -0
  2284. package/src/filters/shaders/colorMatrix.ts +0 -0
  2285. package/src/filters/shaders/constrast.ts +0 -0
  2286. package/src/filters/shaders/convolute.ts +0 -0
  2287. package/src/filters/shaders/gamma.ts +0 -0
  2288. package/src/filters/shaders/grayscale.ts +0 -0
  2289. package/src/filters/shaders/invert.ts +0 -0
  2290. package/src/filters/shaders/noise.ts +0 -0
  2291. package/src/filters/shaders/pixelate.ts +0 -0
  2292. package/src/filters/shaders/removeColor.ts +0 -0
  2293. package/src/filters/shaders/saturation.ts +0 -0
  2294. package/src/filters/shaders/vibrance.ts +0 -0
  2295. package/src/filters/typedefs.ts +0 -0
  2296. package/src/filters/utils.ts +0 -0
  2297. package/src/gradient/Gradient.spec.ts +0 -0
  2298. package/src/gradient/Gradient.ts +0 -0
  2299. package/src/gradient/constants.ts +0 -0
  2300. package/src/gradient/index.ts +0 -0
  2301. package/src/gradient/parser/misc.ts +0 -0
  2302. package/src/gradient/parser/parseColorStops.ts +0 -0
  2303. package/src/gradient/parser/parseCoords.ts +0 -0
  2304. package/src/gradient/typedefs.ts +0 -0
  2305. package/src/mixins/eraser_brush.mixin.ts +0 -0
  2306. package/src/parkinglot/canvas_animation.mixin.ts +0 -0
  2307. package/src/parkinglot/straighten.ts +0 -0
  2308. package/src/parser/applyViewboxTransform.spec.ts +0 -0
  2309. package/src/parser/applyViewboxTransform.ts +0 -0
  2310. package/src/parser/attributes.ts +0 -0
  2311. package/src/parser/constants.spec.ts +0 -0
  2312. package/src/parser/constants.ts +0 -0
  2313. package/src/parser/doesSomeParentMatch.ts +0 -0
  2314. package/src/parser/elementMatchesRule.ts +0 -0
  2315. package/src/parser/elements_parser.ts +0 -0
  2316. package/src/parser/getCSSRules.spec.ts +0 -0
  2317. package/src/parser/getCSSRules.ts +0 -0
  2318. package/src/parser/getGlobalStylesForElement.ts +0 -0
  2319. package/src/parser/getGradientDefs.ts +0 -0
  2320. package/src/parser/getMultipleNodes.ts +0 -0
  2321. package/src/parser/getSvgRegex.ts +0 -0
  2322. package/src/parser/getTagName.ts +0 -0
  2323. package/src/parser/hasInvalidAncestor.ts +0 -0
  2324. package/src/parser/loadSVGFromString.test.ts +0 -0
  2325. package/src/parser/loadSVGFromString.ts +0 -0
  2326. package/src/parser/loadSVGFromURL.ts +0 -0
  2327. package/src/parser/normalizeAttr.ts +0 -0
  2328. package/src/parser/normalizeValue.ts +0 -0
  2329. package/src/parser/parseAttributes.ts +0 -0
  2330. package/src/parser/parseFontDeclaration.ts +0 -0
  2331. package/src/parser/parsePointsAttribute.ts +0 -0
  2332. package/src/parser/parseSVGDocument.ts +0 -0
  2333. package/src/parser/parseStyleAttribute.ts +0 -0
  2334. package/src/parser/parseStyleObject.ts +0 -0
  2335. package/src/parser/parseStyleString.ts +0 -0
  2336. package/src/parser/parseTransformAttribute.ts +0 -0
  2337. package/src/parser/parseUseDirectives.test.ts +0 -0
  2338. package/src/parser/parseUseDirectives.ts +0 -0
  2339. package/src/parser/parser.spec.ts +0 -0
  2340. package/src/parser/percent.ts +0 -0
  2341. package/src/parser/recursivelyParseGradientsXlink.ts +0 -0
  2342. package/src/parser/selectorMatches.ts +0 -0
  2343. package/src/parser/setStrokeFillOpacity.ts +0 -0
  2344. package/src/parser/typedefs.ts +0 -0
  2345. package/src/shapes/ActiveSelection.spec.ts +0 -0
  2346. package/src/shapes/ActiveSelection.ts +0 -0
  2347. package/src/shapes/Circle.spec.ts +0 -0
  2348. package/src/shapes/Circle.ts +0 -0
  2349. package/src/shapes/Ellipse.spec.ts +0 -0
  2350. package/src/shapes/Ellipse.ts +0 -0
  2351. package/src/shapes/Group.spec.ts +0 -0
  2352. package/src/shapes/Group.ts +0 -0
  2353. package/src/shapes/IText/DraggableTextDelegate.ts +0 -0
  2354. package/src/shapes/IText/IText-click-behavior.spec.ts +0 -0
  2355. package/src/shapes/IText/IText.test.ts +0 -0
  2356. package/src/shapes/IText/IText.ts +846 -846
  2357. package/src/shapes/IText/ITextBehavior.test.ts +0 -0
  2358. package/src/shapes/IText/ITextBehavior.ts +1263 -1188
  2359. package/src/shapes/IText/ITextClickBehavior.ts +254 -254
  2360. package/src/shapes/IText/ITextKeyBehavior.test.ts +0 -0
  2361. package/src/shapes/IText/ITextKeyBehavior.ts +732 -732
  2362. package/src/shapes/IText/__snapshots__/IText.test.ts.snap +0 -0
  2363. package/src/shapes/IText/__snapshots__/ITextBehavior.test.ts.snap +0 -0
  2364. package/src/shapes/IText/constants.ts +0 -0
  2365. package/src/shapes/Image-filters.spec.ts +0 -0
  2366. package/src/shapes/Image.spec.ts +0 -0
  2367. package/src/shapes/Image.ts +0 -0
  2368. package/src/shapes/Line.spec.ts +0 -0
  2369. package/src/shapes/Line.ts +0 -0
  2370. package/src/shapes/Object/FabricObject.spec.ts +0 -0
  2371. package/src/shapes/Object/FabricObject.ts +0 -0
  2372. package/src/shapes/Object/FabricObjectSVGExportMixin.ts +0 -0
  2373. package/src/shapes/Object/InteractiveObject.spec.ts +0 -0
  2374. package/src/shapes/Object/InteractiveObject.ts +0 -0
  2375. package/src/shapes/Object/Object-clip-path.spec.ts +0 -0
  2376. package/src/shapes/Object/Object-interactivity.spec.ts +0 -0
  2377. package/src/shapes/Object/Object.spec.ts +0 -0
  2378. package/src/shapes/Object/Object.ts +0 -0
  2379. package/src/shapes/Object/ObjectGeometry.spec.ts +0 -0
  2380. package/src/shapes/Object/ObjectGeometry.ts +0 -0
  2381. package/src/shapes/Object/ObjectOrigin.spec.ts +0 -0
  2382. package/src/shapes/Object/ObjectSerialization.spec.ts +0 -0
  2383. package/src/shapes/Object/StackedObject.spec.ts +0 -0
  2384. package/src/shapes/Object/__snapshots__/InteractiveObject.spec.ts.snap +0 -0
  2385. package/src/shapes/Object/defaultValues.ts +0 -0
  2386. package/src/shapes/Object/types/BaseProps.ts +0 -0
  2387. package/src/shapes/Object/types/BorderProps.ts +0 -0
  2388. package/src/shapes/Object/types/ControlProps.ts +0 -0
  2389. package/src/shapes/Object/types/FabricObjectProps.ts +0 -0
  2390. package/src/shapes/Object/types/FillStrokeProps.ts +0 -0
  2391. package/src/shapes/Object/types/LockInteractionProps.ts +0 -0
  2392. package/src/shapes/Object/types/ObjectProps.ts +0 -0
  2393. package/src/shapes/Object/types/ObjectTransformProps.ts +0 -0
  2394. package/src/shapes/Object/types/SerializedObjectProps.ts +0 -0
  2395. package/src/shapes/Object/types/index.ts +0 -0
  2396. package/src/shapes/Path.spec.ts +0 -0
  2397. package/src/shapes/Path.ts +0 -0
  2398. package/src/shapes/Polygon.spec.ts +0 -0
  2399. package/src/shapes/Polygon.ts +0 -0
  2400. package/src/shapes/Polyline.spec.ts +0 -0
  2401. package/src/shapes/Polyline.ts +0 -0
  2402. package/src/shapes/Rect.spec.ts +0 -0
  2403. package/src/shapes/Rect.ts +0 -0
  2404. package/src/shapes/Text/StyledText.spec.ts +0 -0
  2405. package/src/shapes/Text/StyledText.ts +0 -0
  2406. package/src/shapes/Text/Text.spec.ts +0 -0
  2407. package/src/shapes/Text/Text.ts +2530 -2463
  2408. package/src/shapes/Text/TextSVGExportMixin.spec.ts +0 -0
  2409. package/src/shapes/Text/TextSVGExportMixin.ts +0 -0
  2410. package/src/shapes/Text/__snapshots__/Text.spec.ts.snap +0 -0
  2411. package/src/shapes/Text/__snapshots__/TextSVGExportMixin.spec.ts.snap +0 -0
  2412. package/src/shapes/Text/constants.ts +135 -135
  2413. package/src/shapes/Textbox.spec.ts +0 -0
  2414. package/src/shapes/Textbox.ts +1788 -1320
  2415. package/src/shapes/Triangle.spec.ts +0 -0
  2416. package/src/shapes/Triangle.ts +0 -0
  2417. package/src/shapes/__snapshots__/Image.spec.ts.snap +0 -0
  2418. package/src/shapes/__snapshots__/Textbox.spec.ts.snap +0 -0
  2419. package/src/text/browserLines.ts +266 -234
  2420. package/src/text/ellipsis.ts +516 -516
  2421. package/src/text/hitTest.ts +623 -623
  2422. package/src/text/layout.ts +586 -586
  2423. package/src/text/measure.ts +626 -626
  2424. package/src/text/overlayEditor.ts +1108 -1047
  2425. package/src/text/unicode.ts +454 -454
  2426. package/src/typedefs.ts +0 -0
  2427. package/src/util/__snapshots__/index.spec.ts.snap +0 -0
  2428. package/src/util/animation/AnimationBase.ts +0 -0
  2429. package/src/util/animation/AnimationFrameProvider.ts +0 -0
  2430. package/src/util/animation/AnimationRegistry.ts +0 -0
  2431. package/src/util/animation/ArrayAnimation.ts +0 -0
  2432. package/src/util/animation/ColorAnimation.ts +0 -0
  2433. package/src/util/animation/ValueAnimation.ts +0 -0
  2434. package/src/util/animation/__snapshots__/animations.spec.ts.snap +0 -0
  2435. package/src/util/animation/animate.ts +0 -0
  2436. package/src/util/animation/animations.spec.ts +0 -0
  2437. package/src/util/animation/easing.ts +0 -0
  2438. package/src/util/animation/index.ts +0 -0
  2439. package/src/util/animation/types.ts +0 -0
  2440. package/src/util/applyMixins.ts +0 -0
  2441. package/src/util/dom_event.spec.ts +0 -0
  2442. package/src/util/dom_event.ts +0 -0
  2443. package/src/util/dom_misc.ts +0 -0
  2444. package/src/util/index.spec.ts +0 -0
  2445. package/src/util/index.ts +0 -0
  2446. package/src/util/internals/applyCanvasTransform.ts +0 -0
  2447. package/src/util/internals/cleanupSvgAttribute.test.ts +0 -0
  2448. package/src/util/internals/cleanupSvgAttribute.ts +0 -0
  2449. package/src/util/internals/cloneStyles.spec.ts +0 -0
  2450. package/src/util/internals/cloneStyles.ts +0 -0
  2451. package/src/util/internals/console.ts +0 -0
  2452. package/src/util/internals/dom_style.spec.ts +0 -0
  2453. package/src/util/internals/dom_style.ts +0 -0
  2454. package/src/util/internals/findRight.ts +0 -0
  2455. package/src/util/internals/getRandomInt.test.ts +0 -0
  2456. package/src/util/internals/getRandomInt.ts +0 -0
  2457. package/src/util/internals/ifNaN.ts +0 -0
  2458. package/src/util/internals/removeFromArray.spec.ts +0 -0
  2459. package/src/util/internals/removeFromArray.ts +0 -0
  2460. package/src/util/internals/uid.ts +0 -0
  2461. package/src/util/lang_string.spec.ts +0 -0
  2462. package/src/util/lang_string.ts +0 -0
  2463. package/src/util/misc/boundingBoxFromPoints.spec.ts +0 -0
  2464. package/src/util/misc/boundingBoxFromPoints.ts +0 -0
  2465. package/src/util/misc/capValue.spec.ts +0 -0
  2466. package/src/util/misc/capValue.ts +0 -0
  2467. package/src/util/misc/cornerRadius.spec.ts +0 -0
  2468. package/src/util/misc/cornerRadius.ts +0 -0
  2469. package/src/util/misc/cos.spec.ts +0 -0
  2470. package/src/util/misc/cos.ts +0 -0
  2471. package/src/util/misc/dom.spec.ts +0 -0
  2472. package/src/util/misc/dom.ts +0 -0
  2473. package/src/util/misc/findScaleTo.spec.ts +0 -0
  2474. package/src/util/misc/findScaleTo.ts +0 -0
  2475. package/src/util/misc/groupSVGElements.spec.ts +0 -0
  2476. package/src/util/misc/groupSVGElements.ts +0 -0
  2477. package/src/util/misc/isTransparent.ts +0 -0
  2478. package/src/util/misc/matrix.spec.ts +0 -0
  2479. package/src/util/misc/matrix.ts +0 -0
  2480. package/src/util/misc/mergeClipPaths.spec.ts +0 -0
  2481. package/src/util/misc/mergeClipPaths.ts +0 -0
  2482. package/src/util/misc/objectEnlive.spec.ts +0 -0
  2483. package/src/util/misc/objectEnlive.ts +0 -0
  2484. package/src/util/misc/objectTransforms.spec.ts +0 -0
  2485. package/src/util/misc/objectTransforms.ts +0 -0
  2486. package/src/util/misc/pick.spec.ts +0 -0
  2487. package/src/util/misc/pick.ts +0 -0
  2488. package/src/util/misc/planeChange.spec.ts +0 -0
  2489. package/src/util/misc/planeChange.ts +0 -0
  2490. package/src/util/misc/projectStroke/StrokeLineCapProjections.ts +0 -0
  2491. package/src/util/misc/projectStroke/StrokeLineJoinProjections.ts +0 -0
  2492. package/src/util/misc/projectStroke/StrokeProjectionsBase.ts +0 -0
  2493. package/src/util/misc/projectStroke/index.ts +0 -0
  2494. package/src/util/misc/projectStroke/types.ts +0 -0
  2495. package/src/util/misc/radiansDegreesConversion.spec.ts +0 -0
  2496. package/src/util/misc/radiansDegreesConversion.ts +0 -0
  2497. package/src/util/misc/resolveOrigin.ts +0 -0
  2498. package/src/util/misc/sin.ts +0 -0
  2499. package/src/util/misc/svgExport.ts +0 -0
  2500. package/src/util/misc/svgParsing.spec.ts +0 -0
  2501. package/src/util/misc/svgParsing.ts +0 -0
  2502. package/src/util/misc/textStyles.ts +0 -0
  2503. package/src/util/misc/toFixed.spec.ts +0 -0
  2504. package/src/util/misc/toFixed.ts +0 -0
  2505. package/src/util/misc/vectors.spec.ts +0 -0
  2506. package/src/util/misc/vectors.ts +0 -0
  2507. package/src/util/path/__snapshots__/index.spec.ts.snap +0 -0
  2508. package/src/util/path/index.spec.ts +0 -0
  2509. package/src/util/path/index.ts +0 -0
  2510. package/src/util/path/regex.ts +0 -0
  2511. package/src/util/path/typechecks.ts +0 -0
  2512. package/src/util/path/typedefs.ts +0 -0
  2513. package/src/util/transform_matrix_removal.ts +0 -0
  2514. package/src/util/typeAssertions.spec.ts +0 -0
  2515. package/src/util/typeAssertions.ts +0 -0
  2516. package/tsconfig-extensions.json +0 -0
  2517. package/tsconfig.json +0 -0
  2518. package/tsconfig.spec.json +0 -0
  2519. package/typedoc.config.json +0 -0
  2520. package/vitest.config.ts +0 -0
  2521. package/vitest.d.ts +0 -0
  2522. package/vitest.env.d.ts +0 -0
  2523. package/vitest.extend.ts +0 -0
  2524. package/vitest.setup.ts +0 -0
  2525. package/dist/src/text/examples/arabicTextExample.d.ts +0 -60
  2526. package/dist/src/text/examples/arabicTextExample.d.ts.map +0 -1
  2527. package/dist/src/text/scriptUtils.d.ts +0 -142
  2528. package/dist/src/text/scriptUtils.d.ts.map +0 -1
  2529. package/dist/src/text/scriptUtils.min.mjs +0 -2
  2530. package/dist/src/text/scriptUtils.min.mjs.map +0 -1
  2531. package/dist/src/text/scriptUtils.mjs +0 -212
  2532. package/dist/src/text/scriptUtils.mjs.map +0 -1
  2533. package/dist-extensions/src/shapes/CustomLine.d.ts +0 -10
  2534. package/dist-extensions/src/shapes/CustomLine.d.ts.map +0 -1
  2535. package/dist-extensions/src/text/scriptUtils.d.ts +0 -142
  2536. package/dist-extensions/src/text/scriptUtils.d.ts.map +0 -1
  2537. package/fabric-test-editor.html +0 -3552
  2538. package/fabric-test2.html +0 -647
@@ -410,7 +410,7 @@ class Cache {
410
410
  }
411
411
  const cache = new Cache();
412
412
 
413
- var version = "7.0.1-beta11";
413
+ var version = "7.0.1-beta14";
414
414
 
415
415
  // use this syntax so babel plugin see this import here
416
416
  const VERSION = version;
@@ -19239,8 +19239,8 @@ _defineProperty(StyledText, "_styleProperties", styleProperties);
19239
19239
  // Global measurement context - reused for performance
19240
19240
  let measurementContext = null;
19241
19241
 
19242
- /**
19243
- * Get or create the shared measurement context
19242
+ /**
19243
+ * Get or create the shared measurement context
19244
19244
  */
19245
19245
  function getMeasurementContext() {
19246
19246
  if (!measurementContext) {
@@ -19253,8 +19253,8 @@ function getMeasurementContext() {
19253
19253
  return measurementContext;
19254
19254
  }
19255
19255
 
19256
- /**
19257
- * Measure a single grapheme
19256
+ /**
19257
+ * Measure a single grapheme
19258
19258
  */
19259
19259
  function measureGrapheme(grapheme, options, ctx) {
19260
19260
  // Check cache first
@@ -19287,8 +19287,8 @@ function measureGrapheme(grapheme, options, ctx) {
19287
19287
  return measurement;
19288
19288
  }
19289
19289
 
19290
- /**
19291
- * Measure a grapheme with kerning relative to previous character
19290
+ /**
19291
+ * Measure a grapheme with kerning relative to previous character
19292
19292
  */
19293
19293
  function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
19294
19294
  // Get individual measurement
@@ -19329,9 +19329,9 @@ function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
19329
19329
  };
19330
19330
  }
19331
19331
 
19332
- /**
19333
- * Get a representative character for font metrics measurement
19334
- * Uses canvas to test which scripts the font actually supports
19332
+ /**
19333
+ * Get a representative character for font metrics measurement
19334
+ * Uses canvas to test which scripts the font actually supports
19335
19335
  */
19336
19336
  function getRepresentativeCharacter(fontFamily) {
19337
19337
  const context = getMeasurementContext();
@@ -19420,8 +19420,8 @@ function getRepresentativeCharacter(fontFamily) {
19420
19420
  return 'M';
19421
19421
  }
19422
19422
 
19423
- /**
19424
- * Get font metrics for layout calculations
19423
+ /**
19424
+ * Get font metrics for layout calculations
19425
19425
  */
19426
19426
  function getFontMetrics(options) {
19427
19427
  var _metrics$fontBounding, _metrics$fontBounding2, _metrics$actualBoundi, _metrics$actualBoundi2;
@@ -19457,8 +19457,8 @@ function getFontMetrics(options) {
19457
19457
  return result;
19458
19458
  }
19459
19459
 
19460
- /**
19461
- * Apply font styling to canvas context
19460
+ /**
19461
+ * Apply font styling to canvas context
19462
19462
  */
19463
19463
  function applyFontStyle(ctx, options) {
19464
19464
  const fontDeclaration = getFontDeclaration(options);
@@ -19475,8 +19475,8 @@ function applyFontStyle(ctx, options) {
19475
19475
  ctx.textBaseline = 'alphabetic';
19476
19476
  }
19477
19477
 
19478
- /**
19479
- * Generate font declaration string
19478
+ /**
19479
+ * Generate font declaration string
19480
19480
  */
19481
19481
  function getFontDeclaration(options) {
19482
19482
  const {
@@ -19495,8 +19495,8 @@ function getFontDeclaration(options) {
19495
19495
  return `${fontStyle} ${fontWeight} ${fontSize}px ${normalizedFamily}`;
19496
19496
  }
19497
19497
 
19498
- /**
19499
- * LRU Cache implementation for measurements
19498
+ /**
19499
+ * LRU Cache implementation for measurements
19500
19500
  */
19501
19501
  class LRUCache {
19502
19502
  constructor() {
@@ -19558,8 +19558,8 @@ class LRUCache {
19558
19558
  }
19559
19559
  }
19560
19560
 
19561
- /**
19562
- * Advanced measurement cache with font-aware keys
19561
+ /**
19562
+ * Advanced measurement cache with font-aware keys
19563
19563
  */
19564
19564
  class MeasurementCache {
19565
19565
  constructor() {
@@ -19586,8 +19586,8 @@ class MeasurementCache {
19586
19586
  }
19587
19587
  }
19588
19588
 
19589
- /**
19590
- * Kerning cache for character pairs
19589
+ /**
19590
+ * Kerning cache for character pairs
19591
19591
  */
19592
19592
  class KerningCache {
19593
19593
  constructor() {
@@ -19615,8 +19615,8 @@ class KerningCache {
19615
19615
  }
19616
19616
  }
19617
19617
 
19618
- /**
19619
- * Font metrics cache
19618
+ /**
19619
+ * Font metrics cache
19620
19620
  */
19621
19621
  class FontMetricsCache {
19622
19622
  constructor() {
@@ -19651,8 +19651,8 @@ if (typeof document !== 'undefined' && 'fonts' in document) {
19651
19651
  });
19652
19652
  }
19653
19653
 
19654
- /**
19655
- * Clear all measurement caches
19654
+ /**
19655
+ * Clear all measurement caches
19656
19656
  */
19657
19657
  function clearAllCaches() {
19658
19658
  measurementCache.clear();
@@ -19660,9 +19660,9 @@ function clearAllCaches() {
19660
19660
  fontMetricsCache.clear();
19661
19661
  }
19662
19662
 
19663
- /**
19664
- * Detect if a font lacks English glyph support
19665
- * These fonts should use browser-native measurement instead of Fabric's character-by-character measurement
19663
+ /**
19664
+ * Detect if a font lacks English glyph support
19665
+ * These fonts should use browser-native measurement instead of Fabric's character-by-character measurement
19666
19666
  */
19667
19667
  function fontLacksEnglishGlyphs(fontFamily) {
19668
19668
  if (typeof document === 'undefined') return false;
@@ -19706,8 +19706,8 @@ function fontLacksEnglishGlyphs(fontFamily) {
19706
19706
  // Cache for font glyph detection results
19707
19707
  const fontGlyphCache = new Map();
19708
19708
 
19709
- /**
19710
- * Cached version of font glyph detection
19709
+ /**
19710
+ * Cached version of font glyph detection
19711
19711
  */
19712
19712
  function fontLacksEnglishGlyphsCached(fontFamily) {
19713
19713
  if (fontGlyphCache.has(fontFamily)) {
@@ -19718,17 +19718,17 @@ function fontLacksEnglishGlyphsCached(fontFamily) {
19718
19718
  return result;
19719
19719
  }
19720
19720
 
19721
- /**
19722
- * Unicode and Internationalization Support
19723
- *
19724
- * Enhanced Unicode handling for complex scripts, RTL/LTR text,
19725
- * and grapheme cluster boundary detection.
19721
+ /**
19722
+ * Unicode and Internationalization Support
19723
+ *
19724
+ * Enhanced Unicode handling for complex scripts, RTL/LTR text,
19725
+ * and grapheme cluster boundary detection.
19726
19726
  */
19727
19727
 
19728
19728
 
19729
- /**
19730
- * Enhanced grapheme segmentation using Intl.Segmenter when available
19731
- * with fallback to existing graphemeSplit implementation
19729
+ /**
19730
+ * Enhanced grapheme segmentation using Intl.Segmenter when available
19731
+ * with fallback to existing graphemeSplit implementation
19732
19732
  */
19733
19733
  function segmentGraphemes(text) {
19734
19734
  // Use native Intl.Segmenter if available
@@ -19748,15 +19748,15 @@ function segmentGraphemes(text) {
19748
19748
  return graphemeSplit(text);
19749
19749
  }
19750
19750
 
19751
- /**
19752
- * Ellipsis Text Truncation System
19753
- *
19754
- * Implements text truncation with ellipsis when content exceeds bounds,
19755
- * using binary search for optimal truncation points.
19751
+ /**
19752
+ * Ellipsis Text Truncation System
19753
+ *
19754
+ * Implements text truncation with ellipsis when content exceeds bounds,
19755
+ * using binary search for optimal truncation points.
19756
19756
  */
19757
19757
 
19758
- /**
19759
- * Apply ellipsis truncation to text based on width/height constraints
19758
+ /**
19759
+ * Apply ellipsis truncation to text based on width/height constraints
19760
19760
  */
19761
19761
  function applyEllipsis(text, options) {
19762
19762
  const {
@@ -19826,8 +19826,8 @@ function applyEllipsis(text, options) {
19826
19826
  };
19827
19827
  }
19828
19828
 
19829
- /**
19830
- * Truncate text based on width constraint using binary search
19829
+ /**
19830
+ * Truncate text based on width constraint using binary search
19831
19831
  */
19832
19832
  function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn) {
19833
19833
  const graphemes = segmentGraphemes(text);
@@ -19877,8 +19877,8 @@ function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn)
19877
19877
  };
19878
19878
  }
19879
19879
 
19880
- /**
19881
- * Truncate text based on height constraint
19880
+ /**
19881
+ * Truncate text based on height constraint
19882
19882
  */
19883
19883
  function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
19884
19884
  var _measureFn;
@@ -19926,19 +19926,19 @@ function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
19926
19926
  return truncateByWidth(lines[0], firstLineWidth, ellipsisChar, 0, measureFn);
19927
19927
  }
19928
19928
 
19929
- /**
19930
- * Core Text Layout Engine
19931
- *
19932
- * Implements Konva-compatible text layout with support for:
19933
- * - Multiple wrap modes (word/char/none)
19934
- * - Ellipsis truncation
19935
- * - Justify alignment with proper space distribution
19936
- * - RTL/LTR text direction
19937
- * - Advanced grapheme handling
19929
+ /**
19930
+ * Core Text Layout Engine
19931
+ *
19932
+ * Implements Konva-compatible text layout with support for:
19933
+ * - Multiple wrap modes (word/char/none)
19934
+ * - Ellipsis truncation
19935
+ * - Justify alignment with proper space distribution
19936
+ * - RTL/LTR text direction
19937
+ * - Advanced grapheme handling
19938
19938
  */
19939
19939
 
19940
- /**
19941
- * Main text layout function - converts text and options into positioned layout
19940
+ /**
19941
+ * Main text layout function - converts text and options into positioned layout
19942
19942
  */
19943
19943
  function layoutText(options) {
19944
19944
  var _ellipsisResult;
@@ -20057,8 +20057,8 @@ function layoutText(options) {
20057
20057
  };
20058
20058
  }
20059
20059
 
20060
- /**
20061
- * Layout a single paragraph with wrapping
20060
+ /**
20061
+ * Layout a single paragraph with wrapping
20062
20062
  */
20063
20063
  function layoutParagraph(text, options) {
20064
20064
  const {
@@ -20093,8 +20093,8 @@ function layoutParagraph(text, options) {
20093
20093
  return layoutLines;
20094
20094
  }
20095
20095
 
20096
- /**
20097
- * Layout a single line of text (no wrapping)
20096
+ /**
20097
+ * Layout a single line of text (no wrapping)
20098
20098
  */
20099
20099
  function layoutSingleLine(text, options) {
20100
20100
  let textOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
@@ -20164,8 +20164,8 @@ function layoutSingleLine(text, options) {
20164
20164
  };
20165
20165
  }
20166
20166
 
20167
- /**
20168
- * Word-based wrapping algorithm
20167
+ /**
20168
+ * Word-based wrapping algorithm
20169
20169
  */
20170
20170
  function wrapByWords(text, maxWidth, options) {
20171
20171
  const lines = [];
@@ -20198,8 +20198,8 @@ function wrapByWords(text, maxWidth, options) {
20198
20198
  return lines.length > 0 ? lines : [''];
20199
20199
  }
20200
20200
 
20201
- /**
20202
- * Character-based wrapping algorithm
20201
+ /**
20202
+ * Character-based wrapping algorithm
20203
20203
  */
20204
20204
  function wrapByCharacters(text, maxWidth, options) {
20205
20205
  const lines = [];
@@ -20221,8 +20221,8 @@ function wrapByCharacters(text, maxWidth, options) {
20221
20221
  return lines.length > 0 ? lines : [''];
20222
20222
  }
20223
20223
 
20224
- /**
20225
- * Apply text alignment to lines
20224
+ /**
20225
+ * Apply text alignment to lines
20226
20226
  */
20227
20227
  function applyAlignment(lines, align, containerWidth, options) {
20228
20228
  return lines.map(line => {
@@ -20256,8 +20256,8 @@ function applyAlignment(lines, align, containerWidth, options) {
20256
20256
  });
20257
20257
  }
20258
20258
 
20259
- /**
20260
- * Apply justify alignment by expanding spaces
20259
+ /**
20260
+ * Apply justify alignment by expanding spaces
20261
20261
  */
20262
20262
  function applyJustification(line, containerWidth, options) {
20263
20263
  const spaces = line.graphemes.filter(g => /\s/.test(g)).length;
@@ -20280,8 +20280,8 @@ function applyJustification(line, containerWidth, options) {
20280
20280
  return line;
20281
20281
  }
20282
20282
 
20283
- /**
20284
- * Calculate vertical alignment offset
20283
+ /**
20284
+ * Calculate vertical alignment offset
20285
20285
  */
20286
20286
  function calculateVerticalOffset(contentHeight, containerHeight, align) {
20287
20287
  switch (align) {
@@ -20295,8 +20295,8 @@ function calculateVerticalOffset(contentHeight, containerHeight, align) {
20295
20295
  }
20296
20296
  }
20297
20297
 
20298
- /**
20299
- * Handle height overflow with ellipsis
20298
+ /**
20299
+ * Handle height overflow with ellipsis
20300
20300
  */
20301
20301
  function handleHeightOverflow(existingLines, overflowLine, remainingHeight, options) {
20302
20302
  // If ellipsis is enabled, try to fit part of the overflow line
@@ -20325,8 +20325,8 @@ function handleHeightOverflow(existingLines, overflowLine, remainingHeight, opti
20325
20325
  };
20326
20326
  }
20327
20327
 
20328
- /**
20329
- * Create empty line for empty paragraphs
20328
+ /**
20329
+ * Create empty line for empty paragraphs
20330
20330
  */
20331
20331
  function createEmptyLine(options) {
20332
20332
  const height = options.fontSize * options.lineHeight;
@@ -20342,8 +20342,8 @@ function createEmptyLine(options) {
20342
20342
  };
20343
20343
  }
20344
20344
 
20345
- /**
20346
- * Measure width of a line of text
20345
+ /**
20346
+ * Measure width of a line of text
20347
20347
  */
20348
20348
  function measureLineWidth(text, options) {
20349
20349
  const graphemes = segmentGraphemes(text);
@@ -20360,8 +20360,8 @@ function measureLineWidth(text, options) {
20360
20360
  return width;
20361
20361
  }
20362
20362
 
20363
- /**
20364
- * Convert layout options to measurement options
20363
+ /**
20364
+ * Convert layout options to measurement options
20365
20365
  */
20366
20366
  function createMeasurementOptions(options) {
20367
20367
  return {
@@ -20604,15 +20604,15 @@ class TextSVGExportMixin extends FabricObjectSVGExportMixin {
20604
20604
  }
20605
20605
  }
20606
20606
 
20607
- /**
20608
- * Browser Line Break Extraction
20609
- *
20610
- * Captures exact line breaks as rendered by the browser to ensure
20611
- * pixel-perfect consistency between DOM editing and canvas rendering.
20607
+ /**
20608
+ * Browser Line Break Extraction
20609
+ *
20610
+ * Captures exact line breaks as rendered by the browser to ensure
20611
+ * pixel-perfect consistency between DOM editing and canvas rendering.
20612
20612
  */
20613
20613
 
20614
- /**
20615
- * Segment text into graphemes safely using Intl.Segmenter or fallback
20614
+ /**
20615
+ * Segment text into graphemes safely using Intl.Segmenter or fallback
20616
20616
  */
20617
20617
  function segmentIntoGraphemes(text) {
20618
20618
  if (typeof Intl !== 'undefined' && Intl.Segmenter) {
@@ -20626,9 +20626,9 @@ function segmentIntoGraphemes(text) {
20626
20626
  return Array.from(text);
20627
20627
  }
20628
20628
 
20629
- /**
20630
- * Extract line break information from a textarea by creating a mirror element
20631
- * with identical computed styles and measuring grapheme positions.
20629
+ /**
20630
+ * Extract line break information from a textarea by creating a mirror element
20631
+ * with identical computed styles and measuring grapheme positions.
20632
20632
  */
20633
20633
  function extractLinesFromDOM(textarea) {
20634
20634
  const text = textarea.value;
@@ -20636,7 +20636,8 @@ function extractLinesFromDOM(textarea) {
20636
20636
  return {
20637
20637
  lines: [],
20638
20638
  totalWidth: 0,
20639
- totalHeight: 0
20639
+ totalHeight: 0,
20640
+ width: 0
20640
20641
  };
20641
20642
  }
20642
20643
 
@@ -20665,6 +20666,8 @@ function extractLinesFromDOM(textarea) {
20665
20666
  mirror.style.overflow = 'hidden';
20666
20667
  mirror.style.resize = 'none';
20667
20668
  container.appendChild(mirror);
20669
+ // capture the width the browser is using for layout
20670
+ const width = mirror.clientWidth;
20668
20671
  try {
20669
20672
  // Segment text into graphemes
20670
20673
  const graphemes = segmentIntoGraphemes(text);
@@ -20715,7 +20718,8 @@ function extractLinesFromDOM(textarea) {
20715
20718
  return {
20716
20719
  lines,
20717
20720
  totalWidth,
20718
- totalHeight
20721
+ totalHeight,
20722
+ width
20719
20723
  };
20720
20724
  } finally {
20721
20725
  // Clean up mirror element
@@ -20723,16 +20727,16 @@ function extractLinesFromDOM(textarea) {
20723
20727
  }
20724
20728
  }
20725
20729
 
20726
- /**
20727
- * Create a hash of layout-affecting properties to detect when browser lines are still valid
20730
+ /**
20731
+ * Create a hash of layout-affecting properties to detect when browser lines are still valid
20728
20732
  */
20729
20733
  function createLayoutHash(target) {
20730
20734
  const properties = [target.text, target.width, target.height, target.fontFamily, target.fontSize, target.fontWeight, target.fontStyle, target.lineHeight, target.charSpacing, target.textAlign, target.direction];
20731
20735
  return properties.map(p => String(p)).join('|');
20732
20736
  }
20733
20737
 
20734
- /**
20735
- * Check if stored browser lines are still valid for the current target state
20738
+ /**
20739
+ * Check if stored browser lines are still valid for the current target state
20736
20740
  */
20737
20741
  function areBrowserLinesValid(target, storedHash) {
20738
20742
  if (!storedHash || !target.__lastBrowserLines) {
@@ -20741,40 +20745,46 @@ function areBrowserLinesValid(target, storedHash) {
20741
20745
  const currentHash = createLayoutHash(target);
20742
20746
  return currentHash === storedHash;
20743
20747
  }
20744
-
20745
- /**
20746
- * Store browser lines on a target object with validity hash
20748
+ /**
20749
+ * Store browser lines on a target object with validity hash
20747
20750
  */
20748
- function storeBrowserLines(target, lines, layoutHash) {
20751
+ function storeBrowserLines(target, lines, width, layoutHash) {
20749
20752
  target.__lastBrowserLines = lines;
20753
+ target.__lastBrowserLinesWidth = width;
20750
20754
  target.__lastBrowserLinesHash = createLayoutHash(target);
20751
20755
  }
20752
20756
 
20753
- /**
20754
- * Clear stored browser lines from a target object
20757
+ /**
20758
+ * Clear stored browser lines from a target object
20755
20759
  */
20756
20760
  function clearBrowserLines(target) {
20757
20761
  delete target.__lastBrowserLines;
20758
20762
  delete target.__lastBrowserLinesHash;
20763
+ delete target.__lastBrowserLinesWidth;
20759
20764
  }
20760
20765
 
20761
- /**
20762
- * Get stored browser lines if they're still valid
20766
+ /**
20767
+ * Get stored browser lines if they're still valid
20763
20768
  */
20764
20769
  function getBrowserLines(target) {
20765
20770
  const lines = target.__lastBrowserLines;
20766
20771
  const hash = target.__lastBrowserLinesHash;
20767
20772
  if (lines && areBrowserLinesValid(target, hash)) {
20768
- return lines;
20773
+ return {
20774
+ lines,
20775
+ totalWidth: 0,
20776
+ totalHeight: 0,
20777
+ width: target.__lastBrowserLinesWidth
20778
+ };
20769
20779
  }
20770
20780
  return null;
20771
20781
  }
20772
20782
 
20773
20783
  let measuringContext;
20774
20784
 
20775
- /**
20776
- * Return a context for measurement of text string.
20777
- * if created it gets stored for reuse
20785
+ /**
20786
+ * Return a context for measurement of text string.
20787
+ * if created it gets stored for reuse
20778
20788
  */
20779
20789
  function getMeasuringContext() {
20780
20790
  if (!measuringContext) {
@@ -20787,17 +20797,17 @@ function getMeasuringContext() {
20787
20797
  return measuringContext;
20788
20798
  }
20789
20799
 
20790
- /**
20791
- * Measure and return the info of a single grapheme.
20792
- * needs the the info of previous graphemes already filled
20793
- * Override to customize measuring
20800
+ /**
20801
+ * Measure and return the info of a single grapheme.
20802
+ * needs the the info of previous graphemes already filled
20803
+ * Override to customize measuring
20794
20804
  */
20795
20805
 
20796
20806
  // @TODO this is not complete
20797
20807
 
20798
- /**
20799
- * Text class
20800
- * @see {@link http://fabricjs.com/fabric-intro-part-2#text}
20808
+ /**
20809
+ * Text class
20810
+ * @see {@link http://fabricjs.com/fabric-intro-part-2#text}
20801
20811
  */
20802
20812
  class FabricText extends StyledText {
20803
20813
  static getDefaults() {
@@ -20808,11 +20818,11 @@ class FabricText extends StyledText {
20808
20818
  }
20809
20819
  constructor(text, options) {
20810
20820
  super();
20811
- /**
20812
- * contains characters bounding boxes
20813
- * This variable is considered to be protected.
20814
- * But for how mixins are implemented right now, we can't leave it private
20815
- * @protected
20821
+ /**
20822
+ * contains characters bounding boxes
20823
+ * This variable is considered to be protected.
20824
+ * But for how mixins are implemented right now, we can't leave it private
20825
+ * @protected
20816
20826
  */
20817
20827
  _defineProperty(this, "__charBounds", []);
20818
20828
  Object.assign(this, FabricText.ownDefaults);
@@ -20829,9 +20839,9 @@ class FabricText extends StyledText {
20829
20839
  this.setCoords();
20830
20840
  }
20831
20841
 
20832
- /**
20833
- * If text has a path, it will add the extra information needed
20834
- * for path and text calculations
20842
+ /**
20843
+ * If text has a path, it will add the extra information needed
20844
+ * for path and text calculations
20835
20845
  */
20836
20846
  setPathInfo() {
20837
20847
  const path = this.path;
@@ -20840,16 +20850,24 @@ class FabricText extends StyledText {
20840
20850
  }
20841
20851
  }
20842
20852
 
20843
- /**
20844
- * @private
20845
- * Divides text into lines of text and lines of graphemes.
20846
- * Uses browser lines when available for pixel-perfect consistency.
20853
+ /**
20854
+ * @private
20855
+ * Divides text into lines of text and lines of graphemes.
20856
+ * Uses browser lines when available for pixel-perfect consistency.
20847
20857
  */
20848
20858
  _splitText() {
20849
- // Check if we have valid browser lines and should use them
20850
- const browserLines = getBrowserLines(this);
20851
- if (browserLines && this.useOverlayEditing) {
20852
- return this._splitTextFromBrowserLines(browserLines);
20859
+ // For justify text with overlay editing, always use normal fabric wrapping
20860
+ if (this.textAlign.includes('justify') && this.useOverlayEditing) {
20861
+ console.log('🧹 JUSTIFY OVERLAY: Using fabric wrapping');
20862
+ this.__lastBrowserLines = null;
20863
+ this.__lastBrowserLinesHash = null;
20864
+ } else {
20865
+ // Check if we have valid browser lines for non-justify text
20866
+ const browserLinesInfo = getBrowserLines(this);
20867
+ if (browserLinesInfo && this.useOverlayEditing) {
20868
+ this._browserWrappingWidth = browserLinesInfo.width;
20869
+ return this._splitTextFromBrowserLines(browserLinesInfo.lines);
20870
+ }
20853
20871
  }
20854
20872
  const newLines = this._splitTextIntoLines(this.text);
20855
20873
  this.textLines = newLines.lines;
@@ -20859,9 +20877,9 @@ class FabricText extends StyledText {
20859
20877
  return newLines;
20860
20878
  }
20861
20879
 
20862
- /**
20863
- * Create TextLinesInfo from browser-extracted lines
20864
- * @private
20880
+ /**
20881
+ * Create TextLinesInfo from browser-extracted lines
20882
+ * @private
20865
20883
  */
20866
20884
  _splitTextFromBrowserLines(browserLines) {
20867
20885
  const lines = [];
@@ -20895,10 +20913,10 @@ class FabricText extends StyledText {
20895
20913
  return result;
20896
20914
  }
20897
20915
 
20898
- /**
20899
- * Initialize or update text dimensions.
20900
- * Updates this.width and this.height with the proper values.
20901
- * Does not return dimensions.
20916
+ /**
20917
+ * Initialize or update text dimensions.
20918
+ * Updates this.width and this.height with the proper values.
20919
+ * Does not return dimensions.
20902
20920
  */
20903
20921
  initDimensions() {
20904
20922
  // Check if font is ready for accurate measurements
@@ -20944,24 +20962,29 @@ class FabricText extends StyledText {
20944
20962
  }
20945
20963
  }
20946
20964
 
20947
- /**
20948
- * Enlarge space boxes and shift the others
20965
+ /**
20966
+ * Enlarge space boxes and shift the others
20949
20967
  */
20950
20968
  enlargeSpaces() {
20951
20969
  let diffSpace, currentLineWidth, numberOfSpaces, accumulatedSpace, line, charBound, spaces;
20952
20970
  const isRtl = this.direction === 'rtl';
20971
+ // use browser wrapping width if available
20972
+ const justificationWidth = this._browserWrappingWidth || this.width;
20973
+ if (this._browserWrappingWidth) {
20974
+ this._browserWrappingWidth = undefined;
20975
+ }
20953
20976
  for (let i = 0, len = this._textLines.length; i < len; i++) {
20954
- if (!this.textAlign.includes('justify') && (i === len - 1 || this.isEndOfWrapping(i))) {
20977
+ if (!this.textAlign.includes('justify') || i === len - 1 || this.isEndOfWrapping(i)) {
20955
20978
  continue;
20956
20979
  }
20957
20980
  accumulatedSpace = 0;
20958
20981
  line = this._textLines[i];
20959
20982
  currentLineWidth = this.getLineWidth(i);
20960
- if (currentLineWidth < this.width && (spaces = this.textLines[i].match(this._reSpacesAndTabs))) {
20983
+ if (currentLineWidth < justificationWidth && (spaces = this.textLines[i].match(this._reSpacesAndTabs))) {
20961
20984
  numberOfSpaces = spaces.length;
20962
- diffSpace = (this.width - currentLineWidth) / numberOfSpaces;
20985
+ diffSpace = (justificationWidth - currentLineWidth) / numberOfSpaces;
20963
20986
  console.log(`🔧 EnlargeSpaces Line ${i}:`);
20964
- console.log(` Current width: ${currentLineWidth}, Target: ${this.width}`);
20987
+ console.log(` Current width: ${currentLineWidth}, Target: ${justificationWidth}`);
20965
20988
  console.log(` Spaces: ${numberOfSpaces}, diffSpace: ${diffSpace.toFixed(2)}`);
20966
20989
  if (isRtl) {
20967
20990
  for (let j = 0; j < line.length; j++) {
@@ -21007,18 +21030,18 @@ class FabricText extends StyledText {
21007
21030
  }
21008
21031
  }
21009
21032
 
21010
- /**
21011
- * Advanced layout using new text engine (Konva-compatible)
21012
- * @private
21033
+ /**
21034
+ * Advanced layout using new text engine (Konva-compatible)
21035
+ * @private
21013
21036
  */
21014
21037
  _layoutTextAdvanced() {
21015
21038
  const options = this._getAdvancedLayoutOptions();
21016
21039
  return layoutText(options);
21017
21040
  }
21018
21041
 
21019
- /**
21020
- * Get advanced layout options from current text properties
21021
- * @private
21042
+ /**
21043
+ * Get advanced layout options from current text properties
21044
+ * @private
21022
21045
  */
21023
21046
  _getAdvancedLayoutOptions() {
21024
21047
  return {
@@ -21040,9 +21063,9 @@ class FabricText extends StyledText {
21040
21063
  };
21041
21064
  }
21042
21065
 
21043
- /**
21044
- * Map Fabric textAlign to Konva align format
21045
- * @private
21066
+ /**
21067
+ * Map Fabric textAlign to Konva align format
21068
+ * @private
21046
21069
  */
21047
21070
  _mapTextAlignToAlign(textAlign) {
21048
21071
  switch (textAlign) {
@@ -21063,8 +21086,8 @@ class FabricText extends StyledText {
21063
21086
  }
21064
21087
  }
21065
21088
 
21066
- /**
21067
- * Enhanced initDimensions that uses advanced layout when enabled
21089
+ /**
21090
+ * Enhanced initDimensions that uses advanced layout when enabled
21068
21091
  */
21069
21092
  initDimensionsAdvanced() {
21070
21093
  if (!this.enableAdvancedLayout) {
@@ -21093,9 +21116,9 @@ class FabricText extends StyledText {
21093
21116
  this.dirty = true;
21094
21117
  }
21095
21118
 
21096
- /**
21097
- * Convert new layout format to legacy _textLines and __charBounds format
21098
- * @private
21119
+ /**
21120
+ * Convert new layout format to legacy _textLines and __charBounds format
21121
+ * @private
21099
21122
  */
21100
21123
  _convertLayoutToLegacyFormat(layout) {
21101
21124
  this._textLines = layout.lines.map(line => line.graphemes);
@@ -21117,30 +21140,30 @@ class FabricText extends StyledText {
21117
21140
  }
21118
21141
  }
21119
21142
 
21120
- /**
21121
- * Detect if the text line is ended with an hard break
21122
- * text and itext do not have wrapping, return false
21123
- * @return {Boolean}
21143
+ /**
21144
+ * Detect if the text line is ended with an hard break
21145
+ * text and itext do not have wrapping, return false
21146
+ * @return {Boolean}
21124
21147
  */
21125
21148
  isEndOfWrapping(lineIndex) {
21126
21149
  return lineIndex === this._textLines.length - 1;
21127
21150
  }
21128
21151
 
21129
- /**
21130
- * Detect if a line has a linebreak and so we need to account for it when moving
21131
- * and counting style.
21132
- * It return always 1 for text and Itext. Textbox has its own implementation
21133
- * @return Number
21152
+ /**
21153
+ * Detect if a line has a linebreak and so we need to account for it when moving
21154
+ * and counting style.
21155
+ * It return always 1 for text and Itext. Textbox has its own implementation
21156
+ * @return Number
21134
21157
  */
21135
21158
 
21136
21159
  missingNewlineOffset(_lineIndex) {
21137
21160
  return 1;
21138
21161
  }
21139
21162
 
21140
- /**
21141
- * Returns 2d representation (lineIndex and charIndex) of cursor
21142
- * @param {Number} selectionStart
21143
- * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
21163
+ /**
21164
+ * Returns 2d representation (lineIndex and charIndex) of cursor
21165
+ * @param {Number} selectionStart
21166
+ * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
21144
21167
  */
21145
21168
  get2DCursorLocation(selectionStart, skipWrapping) {
21146
21169
  const lines = skipWrapping ? this._unwrappedTextLines : this._textLines;
@@ -21160,24 +21183,24 @@ class FabricText extends StyledText {
21160
21183
  };
21161
21184
  }
21162
21185
 
21163
- /**
21164
- * Returns string representation of an instance
21165
- * @return {String} String representation of text object
21186
+ /**
21187
+ * Returns string representation of an instance
21188
+ * @return {String} String representation of text object
21166
21189
  */
21167
21190
  toString() {
21168
21191
  return `#<Text (${this.complexity()}): { "text": "${this.text}", "fontFamily": "${this.fontFamily}" }>`;
21169
21192
  }
21170
21193
 
21171
- /**
21172
- * Return the dimension and the zoom level needed to create a cache canvas
21173
- * big enough to host the object to be cached.
21174
- * @private
21175
- * @param {Object} dim.x width of object to be cached
21176
- * @param {Object} dim.y height of object to be cached
21177
- * @return {Object}.width width of canvas
21178
- * @return {Object}.height height of canvas
21179
- * @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
21180
- * @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
21194
+ /**
21195
+ * Return the dimension and the zoom level needed to create a cache canvas
21196
+ * big enough to host the object to be cached.
21197
+ * @private
21198
+ * @param {Object} dim.x width of object to be cached
21199
+ * @param {Object} dim.y height of object to be cached
21200
+ * @return {Object}.width width of canvas
21201
+ * @return {Object}.height height of canvas
21202
+ * @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
21203
+ * @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
21181
21204
  */
21182
21205
  _getCacheCanvasDimensions() {
21183
21206
  const dims = super._getCacheCanvasDimensions();
@@ -21187,9 +21210,9 @@ class FabricText extends StyledText {
21187
21210
  return dims;
21188
21211
  }
21189
21212
 
21190
- /**
21191
- * @private
21192
- * @param {CanvasRenderingContext2D} ctx Context to render on
21213
+ /**
21214
+ * @private
21215
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21193
21216
  */
21194
21217
  _render(ctx) {
21195
21218
  const path = this.path;
@@ -21202,9 +21225,9 @@ class FabricText extends StyledText {
21202
21225
  this._renderTextDecoration(ctx, 'linethrough');
21203
21226
  }
21204
21227
 
21205
- /**
21206
- * @private
21207
- * @param {CanvasRenderingContext2D} ctx Context to render on
21228
+ /**
21229
+ * @private
21230
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21208
21231
  */
21209
21232
  _renderText(ctx) {
21210
21233
  // Skip text rendering if in overlay editing mode
@@ -21220,15 +21243,15 @@ class FabricText extends StyledText {
21220
21243
  }
21221
21244
  }
21222
21245
 
21223
- /**
21224
- * Set the font parameter of the context with the object properties or with charStyle
21225
- * @private
21226
- * @param {CanvasRenderingContext2D} ctx Context to render on
21227
- * @param {Object} [charStyle] object with font style properties
21228
- * @param {String} [charStyle.fontFamily] Font Family
21229
- * @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
21230
- * @param {String} [charStyle.fontWeight] Font weight
21231
- * @param {String} [charStyle.fontStyle] Font style (italic|normal)
21246
+ /**
21247
+ * Set the font parameter of the context with the object properties or with charStyle
21248
+ * @private
21249
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21250
+ * @param {Object} [charStyle] object with font style properties
21251
+ * @param {String} [charStyle.fontFamily] Font Family
21252
+ * @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
21253
+ * @param {String} [charStyle.fontWeight] Font weight
21254
+ * @param {String} [charStyle.fontStyle] Font style (italic|normal)
21232
21255
  */
21233
21256
  _setTextStyles(ctx, charStyle, forMeasuring) {
21234
21257
  ctx.textBaseline = 'alphabetic';
@@ -21248,11 +21271,11 @@ class FabricText extends StyledText {
21248
21271
  ctx.font = this._getFontDeclaration(charStyle, forMeasuring);
21249
21272
  }
21250
21273
 
21251
- /**
21252
- * calculate and return the text Width measuring each line.
21253
- * @private
21254
- * @param {CanvasRenderingContext2D} ctx Context to render on
21255
- * @return {Number} Maximum width of Text object
21274
+ /**
21275
+ * calculate and return the text Width measuring each line.
21276
+ * @private
21277
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21278
+ * @return {Number} Maximum width of Text object
21256
21279
  */
21257
21280
  calcTextWidth() {
21258
21281
  let maxWidth = this.getLineWidth(0);
@@ -21265,23 +21288,23 @@ class FabricText extends StyledText {
21265
21288
  return maxWidth;
21266
21289
  }
21267
21290
 
21268
- /**
21269
- * @private
21270
- * @param {String} method Method name ("fillText" or "strokeText")
21271
- * @param {CanvasRenderingContext2D} ctx Context to render on
21272
- * @param {String} line Text to render
21273
- * @param {Number} left Left position of text
21274
- * @param {Number} top Top position of text
21275
- * @param {Number} lineIndex Index of a line in a text
21291
+ /**
21292
+ * @private
21293
+ * @param {String} method Method name ("fillText" or "strokeText")
21294
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21295
+ * @param {String} line Text to render
21296
+ * @param {Number} left Left position of text
21297
+ * @param {Number} top Top position of text
21298
+ * @param {Number} lineIndex Index of a line in a text
21276
21299
  */
21277
21300
  _renderTextLine(method, ctx, line, left, top, lineIndex) {
21278
21301
  this._renderChars(method, ctx, line, left, top, lineIndex);
21279
21302
  }
21280
21303
 
21281
- /**
21282
- * Renders the text background for lines, taking care of style
21283
- * @private
21284
- * @param {CanvasRenderingContext2D} ctx Context to render on
21304
+ /**
21305
+ * Renders the text background for lines, taking care of style
21306
+ * @private
21307
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21285
21308
  */
21286
21309
  _renderTextLinesBackground(ctx) {
21287
21310
  if (!this.textBackgroundColor && !this.styleHas('textBackgroundColor')) {
@@ -21344,15 +21367,15 @@ class FabricText extends StyledText {
21344
21367
  this._removeShadow(ctx);
21345
21368
  }
21346
21369
 
21347
- /**
21348
- * measure and return the width of a single character.
21349
- * possibly overridden to accommodate different measure logic or
21350
- * to hook some external lib for character measurement
21351
- * @private
21352
- * @param {String} _char, char to be measured
21353
- * @param {Object} charStyle style of char to be measured
21354
- * @param {String} [previousChar] previous char
21355
- * @param {Object} [prevCharStyle] style of previous char
21370
+ /**
21371
+ * measure and return the width of a single character.
21372
+ * possibly overridden to accommodate different measure logic or
21373
+ * to hook some external lib for character measurement
21374
+ * @private
21375
+ * @param {String} _char, char to be measured
21376
+ * @param {Object} charStyle style of char to be measured
21377
+ * @param {String} [previousChar] previous char
21378
+ * @param {Object} [prevCharStyle] style of previous char
21356
21379
  */
21357
21380
  _measureChar(_char, charStyle, previousChar, prevCharStyle) {
21358
21381
  const fontCache = cache.getFontCache(charStyle),
@@ -21397,19 +21420,19 @@ class FabricText extends StyledText {
21397
21420
  };
21398
21421
  }
21399
21422
 
21400
- /**
21401
- * Computes height of character at given position
21402
- * @param {Number} line the line index number
21403
- * @param {Number} _char the character index number
21404
- * @return {Number} fontSize of the character
21423
+ /**
21424
+ * Computes height of character at given position
21425
+ * @param {Number} line the line index number
21426
+ * @param {Number} _char the character index number
21427
+ * @return {Number} fontSize of the character
21405
21428
  */
21406
21429
  getHeightOfChar(line, _char) {
21407
21430
  return this.getValueOfPropertyAt(line, _char, 'fontSize');
21408
21431
  }
21409
21432
 
21410
- /**
21411
- * measure a text line measuring all characters.
21412
- * @param {Number} lineIndex line number
21433
+ /**
21434
+ * measure a text line measuring all characters.
21435
+ * @param {Number} lineIndex line number
21413
21436
  */
21414
21437
  measureLine(lineIndex) {
21415
21438
  const lineInfo = this._measureLine(lineIndex);
@@ -21422,11 +21445,11 @@ class FabricText extends StyledText {
21422
21445
  return lineInfo;
21423
21446
  }
21424
21447
 
21425
- /**
21426
- * measure every grapheme of a line, populating __charBounds
21427
- * @param {Number} lineIndex
21428
- * @return {Object} object.width total width of characters
21429
- * @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
21448
+ /**
21449
+ * measure every grapheme of a line, populating __charBounds
21450
+ * @param {Number} lineIndex
21451
+ * @return {Object} object.width total width of characters
21452
+ * @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
21430
21453
  */
21431
21454
  _measureLine(lineIndex) {
21432
21455
  let width = 0,
@@ -21489,13 +21512,13 @@ class FabricText extends StyledText {
21489
21512
  };
21490
21513
  }
21491
21514
 
21492
- /**
21493
- * Calculate the angle and the left,top position of the char that follow a path.
21494
- * It appends it to graphemeInfo to be reused later at rendering
21495
- * @private
21496
- * @param {Number} positionInPath to be measured
21497
- * @param {GraphemeBBox} graphemeInfo current grapheme box information
21498
- * @param {Object} startingPoint position of the point
21515
+ /**
21516
+ * Calculate the angle and the left,top position of the char that follow a path.
21517
+ * It appends it to graphemeInfo to be reused later at rendering
21518
+ * @private
21519
+ * @param {Number} positionInPath to be measured
21520
+ * @param {GraphemeBBox} graphemeInfo current grapheme box information
21521
+ * @param {Object} startingPoint position of the point
21499
21522
  */
21500
21523
  _setGraphemeOnPath(positionInPath, graphemeInfo) {
21501
21524
  const centerPosition = positionInPath + graphemeInfo.kernedWidth / 2,
@@ -21508,13 +21531,13 @@ class FabricText extends StyledText {
21508
21531
  graphemeInfo.angle = info.angle + (this.pathSide === RIGHT ? Math.PI : 0);
21509
21532
  }
21510
21533
 
21511
- /**
21512
- *
21513
- * @param {String} grapheme to be measured
21514
- * @param {Number} lineIndex index of the line where the char is
21515
- * @param {Number} charIndex position in the line
21516
- * @param {String} [prevGrapheme] character preceding the one to be measured
21517
- * @returns {GraphemeBBox} grapheme bbox
21534
+ /**
21535
+ *
21536
+ * @param {String} grapheme to be measured
21537
+ * @param {Number} lineIndex index of the line where the char is
21538
+ * @param {Number} charIndex position in the line
21539
+ * @param {String} [prevGrapheme] character preceding the one to be measured
21540
+ * @returns {GraphemeBBox} grapheme bbox
21518
21541
  */
21519
21542
  _getGraphemeBox(grapheme, lineIndex, charIndex, prevGrapheme, skipLeft) {
21520
21543
  const style = this.getCompleteStyleDeclaration(lineIndex, charIndex),
@@ -21542,10 +21565,10 @@ class FabricText extends StyledText {
21542
21565
  return box;
21543
21566
  }
21544
21567
 
21545
- /**
21546
- * Calculate height of line at 'lineIndex'
21547
- * @param {Number} lineIndex index of line to calculate
21548
- * @return {Number}
21568
+ /**
21569
+ * Calculate height of line at 'lineIndex'
21570
+ * @param {Number} lineIndex index of line to calculate
21571
+ * @return {Number}
21549
21572
  */
21550
21573
  getHeightOfLine(lineIndex) {
21551
21574
  if (this.__lineHeights[lineIndex]) {
@@ -21561,8 +21584,8 @@ class FabricText extends StyledText {
21561
21584
  return this.__lineHeights[lineIndex] = maxHeight * this.lineHeight * this._fontSizeMult;
21562
21585
  }
21563
21586
 
21564
- /**
21565
- * Calculate text box height
21587
+ /**
21588
+ * Calculate text box height
21566
21589
  */
21567
21590
  calcTextHeight() {
21568
21591
  let lineHeight,
@@ -21574,26 +21597,26 @@ class FabricText extends StyledText {
21574
21597
  return height;
21575
21598
  }
21576
21599
 
21577
- /**
21578
- * @private
21579
- * @return {Number} Left offset
21600
+ /**
21601
+ * @private
21602
+ * @return {Number} Left offset
21580
21603
  */
21581
21604
  _getLeftOffset() {
21582
21605
  return this.direction === 'ltr' ? -this.width / 2 : this.width / 2;
21583
21606
  }
21584
21607
 
21585
- /**
21586
- * @private
21587
- * @return {Number} Top offset
21608
+ /**
21609
+ * @private
21610
+ * @return {Number} Top offset
21588
21611
  */
21589
21612
  _getTopOffset() {
21590
21613
  return -this.height / 2;
21591
21614
  }
21592
21615
 
21593
- /**
21594
- * @private
21595
- * @param {CanvasRenderingContext2D} ctx Context to render on
21596
- * @param {String} method Method name ("fillText" or "strokeText")
21616
+ /**
21617
+ * @private
21618
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21619
+ * @param {String} method Method name ("fillText" or "strokeText")
21597
21620
  */
21598
21621
  _renderTextCommon(ctx, method) {
21599
21622
  ctx.save();
@@ -21610,9 +21633,9 @@ class FabricText extends StyledText {
21610
21633
  ctx.restore();
21611
21634
  }
21612
21635
 
21613
- /**
21614
- * @private
21615
- * @param {CanvasRenderingContext2D} ctx Context to render on
21636
+ /**
21637
+ * @private
21638
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21616
21639
  */
21617
21640
  _renderTextFill(ctx) {
21618
21641
  if (!this.fill && !this.styleHas(FILL)) {
@@ -21621,9 +21644,9 @@ class FabricText extends StyledText {
21621
21644
  this._renderTextCommon(ctx, 'fillText');
21622
21645
  }
21623
21646
 
21624
- /**
21625
- * @private
21626
- * @param {CanvasRenderingContext2D} ctx Context to render on
21647
+ /**
21648
+ * @private
21649
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21627
21650
  */
21628
21651
  _renderTextStroke(ctx) {
21629
21652
  if ((!this.stroke || this.strokeWidth === 0) && this.isEmptyStyles()) {
@@ -21640,14 +21663,14 @@ class FabricText extends StyledText {
21640
21663
  ctx.restore();
21641
21664
  }
21642
21665
 
21643
- /**
21644
- * @private
21645
- * @param {String} method fillText or strokeText.
21646
- * @param {CanvasRenderingContext2D} ctx Context to render on
21647
- * @param {Array} line Content of the line, splitted in an array by grapheme
21648
- * @param {Number} left
21649
- * @param {Number} top
21650
- * @param {Number} lineIndex
21666
+ /**
21667
+ * @private
21668
+ * @param {String} method fillText or strokeText.
21669
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21670
+ * @param {Array} line Content of the line, splitted in an array by grapheme
21671
+ * @param {Number} left
21672
+ * @param {Number} top
21673
+ * @param {Number} lineIndex
21651
21674
  */
21652
21675
  _renderChars(method, ctx, line, left, top, lineIndex) {
21653
21676
  const lineHeight = this.getHeightOfLine(lineIndex),
@@ -21729,16 +21752,16 @@ class FabricText extends StyledText {
21729
21752
  ctx.restore();
21730
21753
  }
21731
21754
 
21732
- /**
21733
- * This function try to patch the missing gradientTransform on canvas gradients.
21734
- * transforming a context to transform the gradient, is going to transform the stroke too.
21735
- * we want to transform the gradient but not the stroke operation, so we create
21736
- * a transformed gradient on a pattern and then we use the pattern instead of the gradient.
21737
- * this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
21738
- * is limited.
21739
- * @private
21740
- * @param {TFiller} filler a fabric gradient instance
21741
- * @return {CanvasPattern} a pattern to use as fill/stroke style
21755
+ /**
21756
+ * This function try to patch the missing gradientTransform on canvas gradients.
21757
+ * transforming a context to transform the gradient, is going to transform the stroke too.
21758
+ * we want to transform the gradient but not the stroke operation, so we create
21759
+ * a transformed gradient on a pattern and then we use the pattern instead of the gradient.
21760
+ * this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
21761
+ * is limited.
21762
+ * @private
21763
+ * @param {TFiller} filler a fabric gradient instance
21764
+ * @return {CanvasPattern} a pattern to use as fill/stroke style
21742
21765
  */
21743
21766
  _applyPatternGradientTransformText(filler) {
21744
21767
  // TODO: verify compatibility with strokeUniform
@@ -21794,12 +21817,12 @@ class FabricText extends StyledText {
21794
21817
  };
21795
21818
  }
21796
21819
 
21797
- /**
21798
- * This function prepare the canvas for a stroke style, and stroke and strokeWidth
21799
- * need to be sent in as defined
21800
- * @param {CanvasRenderingContext2D} ctx
21801
- * @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
21802
- * @returns
21820
+ /**
21821
+ * This function prepare the canvas for a stroke style, and stroke and strokeWidth
21822
+ * need to be sent in as defined
21823
+ * @param {CanvasRenderingContext2D} ctx
21824
+ * @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
21825
+ * @returns
21803
21826
  */
21804
21827
  _setStrokeStyles(ctx, _ref) {
21805
21828
  let {
@@ -21814,12 +21837,12 @@ class FabricText extends StyledText {
21814
21837
  return this.handleFiller(ctx, 'strokeStyle', stroke);
21815
21838
  }
21816
21839
 
21817
- /**
21818
- * This function prepare the canvas for a ill style, and fill
21819
- * need to be sent in as defined
21820
- * @param {CanvasRenderingContext2D} ctx
21821
- * @param {CompleteTextStyleDeclaration} style with ill defined
21822
- * @returns
21840
+ /**
21841
+ * This function prepare the canvas for a ill style, and fill
21842
+ * need to be sent in as defined
21843
+ * @param {CanvasRenderingContext2D} ctx
21844
+ * @param {CompleteTextStyleDeclaration} style with ill defined
21845
+ * @returns
21823
21846
  */
21824
21847
  _setFillStyles(ctx, _ref2) {
21825
21848
  let {
@@ -21828,16 +21851,16 @@ class FabricText extends StyledText {
21828
21851
  return this.handleFiller(ctx, 'fillStyle', fill);
21829
21852
  }
21830
21853
 
21831
- /**
21832
- * @private
21833
- * @param {String} method
21834
- * @param {CanvasRenderingContext2D} ctx Context to render on
21835
- * @param {Number} lineIndex
21836
- * @param {Number} charIndex
21837
- * @param {String} _char
21838
- * @param {Number} left Left coordinate
21839
- * @param {Number} top Top coordinate
21840
- * @param {Number} lineHeight Height of the line
21854
+ /**
21855
+ * @private
21856
+ * @param {String} method
21857
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21858
+ * @param {Number} lineIndex
21859
+ * @param {Number} charIndex
21860
+ * @param {String} _char
21861
+ * @param {Number} left Left coordinate
21862
+ * @param {Number} top Top coordinate
21863
+ * @param {Number} lineHeight Height of the line
21841
21864
  */
21842
21865
  _renderChar(method, ctx, lineIndex, charIndex, _char, left, top) {
21843
21866
  const decl = this._getStyleDeclaration(lineIndex, charIndex),
@@ -21866,30 +21889,30 @@ class FabricText extends StyledText {
21866
21889
  ctx.restore();
21867
21890
  }
21868
21891
 
21869
- /**
21870
- * Turns the character into a 'superior figure' (i.e. 'superscript')
21871
- * @param {Number} start selection start
21872
- * @param {Number} end selection end
21892
+ /**
21893
+ * Turns the character into a 'superior figure' (i.e. 'superscript')
21894
+ * @param {Number} start selection start
21895
+ * @param {Number} end selection end
21873
21896
  */
21874
21897
  setSuperscript(start, end) {
21875
21898
  this._setScript(start, end, this.superscript);
21876
21899
  }
21877
21900
 
21878
- /**
21879
- * Turns the character into an 'inferior figure' (i.e. 'subscript')
21880
- * @param {Number} start selection start
21881
- * @param {Number} end selection end
21901
+ /**
21902
+ * Turns the character into an 'inferior figure' (i.e. 'subscript')
21903
+ * @param {Number} start selection start
21904
+ * @param {Number} end selection end
21882
21905
  */
21883
21906
  setSubscript(start, end) {
21884
21907
  this._setScript(start, end, this.subscript);
21885
21908
  }
21886
21909
 
21887
- /**
21888
- * Applies 'schema' at given position
21889
- * @private
21890
- * @param {Number} start selection start
21891
- * @param {Number} end selection end
21892
- * @param {Number} schema
21910
+ /**
21911
+ * Applies 'schema' at given position
21912
+ * @private
21913
+ * @param {Number} start selection start
21914
+ * @param {Number} end selection end
21915
+ * @param {Number} schema
21893
21916
  */
21894
21917
  _setScript(start, end, schema) {
21895
21918
  const loc = this.get2DCursorLocation(start, true),
@@ -21902,10 +21925,10 @@ class FabricText extends StyledText {
21902
21925
  this.setSelectionStyles(style, start, end);
21903
21926
  }
21904
21927
 
21905
- /**
21906
- * @private
21907
- * @param {Number} lineIndex index text line
21908
- * @return {Number} Line left offset
21928
+ /**
21929
+ * @private
21930
+ * @param {Number} lineIndex index text line
21931
+ * @return {Number} Line left offset
21909
21932
  */
21910
21933
  _getLineLeftOffset(lineIndex) {
21911
21934
  const lineWidth = this.getLineWidth(lineIndex),
@@ -21955,8 +21978,8 @@ class FabricText extends StyledText {
21955
21978
  return leftOffset;
21956
21979
  }
21957
21980
 
21958
- /**
21959
- * @private
21981
+ /**
21982
+ * @private
21960
21983
  */
21961
21984
  _clearCache() {
21962
21985
  this._forceClearCache = false;
@@ -21965,12 +21988,12 @@ class FabricText extends StyledText {
21965
21988
  this.__charBounds = [];
21966
21989
  }
21967
21990
 
21968
- /**
21969
- * Measure a single line given its index. Used to calculate the initial
21970
- * text bounding box. The values are calculated and stored in __lineWidths cache.
21971
- * @private
21972
- * @param {Number} lineIndex line number
21973
- * @return {Number} Line width
21991
+ /**
21992
+ * Measure a single line given its index. Used to calculate the initial
21993
+ * text bounding box. The values are calculated and stored in __lineWidths cache.
21994
+ * @private
21995
+ * @param {Number} lineIndex line number
21996
+ * @return {Number} Line width
21974
21997
  */
21975
21998
  getLineWidth(lineIndex) {
21976
21999
  if (this.__lineWidths[lineIndex] !== undefined) {
@@ -21989,12 +22012,12 @@ class FabricText extends StyledText {
21989
22012
  return 0;
21990
22013
  }
21991
22014
 
21992
- /**
21993
- * Retrieves the value of property at given character position
21994
- * @param {Number} lineIndex the line number
21995
- * @param {Number} charIndex the character number
21996
- * @param {String} property the property name
21997
- * @returns the value of 'property'
22015
+ /**
22016
+ * Retrieves the value of property at given character position
22017
+ * @param {Number} lineIndex the line number
22018
+ * @param {Number} charIndex the character number
22019
+ * @param {String} property the property name
22020
+ * @returns the value of 'property'
21998
22021
  */
21999
22022
  getValueOfPropertyAt(lineIndex, charIndex, property) {
22000
22023
  var _charStyle$property;
@@ -22002,9 +22025,9 @@ class FabricText extends StyledText {
22002
22025
  return (_charStyle$property = charStyle[property]) !== null && _charStyle$property !== void 0 ? _charStyle$property : this[property];
22003
22026
  }
22004
22027
 
22005
- /**
22006
- * @private
22007
- * @param {CanvasRenderingContext2D} ctx Context to render on
22028
+ /**
22029
+ * @private
22030
+ * @param {CanvasRenderingContext2D} ctx Context to render on
22008
22031
  */
22009
22032
  _renderTextDecoration(ctx, type) {
22010
22033
  if (!this[type] && !this.styleHas(type)) {
@@ -22088,10 +22111,10 @@ class FabricText extends StyledText {
22088
22111
  this._removeShadow(ctx);
22089
22112
  }
22090
22113
 
22091
- /**
22092
- * return font declaration string for canvas context
22093
- * @param {Object} [styleObject] object
22094
- * @returns {String} font declaration formatted for canvas context.
22114
+ /**
22115
+ * return font declaration string for canvas context
22116
+ * @param {Object} [styleObject] object
22117
+ * @returns {String} font declaration formatted for canvas context.
22095
22118
  */
22096
22119
  _getFontDeclaration() {
22097
22120
  let {
@@ -22117,9 +22140,9 @@ class FabricText extends StyledText {
22117
22140
  return [fontStyle, fontWeight, `${forMeasuring ? this.CACHE_FONT_SIZE : fontSize}px`, parsedFontFamily].join(' ');
22118
22141
  }
22119
22142
 
22120
- /**
22121
- * Renders text instance on a specified context
22122
- * @param {CanvasRenderingContext2D} ctx Context to render on
22143
+ /**
22144
+ * Renders text instance on a specified context
22145
+ * @param {CanvasRenderingContext2D} ctx Context to render on
22123
22146
  */
22124
22147
  render(ctx) {
22125
22148
  if (!this.visible) {
@@ -22134,22 +22157,22 @@ class FabricText extends StyledText {
22134
22157
  super.render(ctx);
22135
22158
  }
22136
22159
 
22137
- /**
22138
- * Override this method to customize grapheme splitting
22139
- * @todo the util `graphemeSplit` needs to be injectable in some way.
22140
- * is more comfortable to inject the correct util rather than having to override text
22141
- * in the middle of the prototype chain
22142
- * @param {string} value
22143
- * @returns {string[]} array of graphemes
22160
+ /**
22161
+ * Override this method to customize grapheme splitting
22162
+ * @todo the util `graphemeSplit` needs to be injectable in some way.
22163
+ * is more comfortable to inject the correct util rather than having to override text
22164
+ * in the middle of the prototype chain
22165
+ * @param {string} value
22166
+ * @returns {string[]} array of graphemes
22144
22167
  */
22145
22168
  graphemeSplit(value) {
22146
22169
  return graphemeSplit(value);
22147
22170
  }
22148
22171
 
22149
- /**
22150
- * Returns the text as an array of lines.
22151
- * @param {String} text text to split
22152
- * @returns Lines in the text
22172
+ /**
22173
+ * Returns the text as an array of lines.
22174
+ * @param {String} text text to split
22175
+ * @returns Lines in the text
22153
22176
  */
22154
22177
  _splitTextIntoLines(text) {
22155
22178
  const lines = text.split(this._reNewline),
@@ -22175,18 +22198,18 @@ class FabricText extends StyledText {
22175
22198
  };
22176
22199
  }
22177
22200
 
22178
- /**
22179
- * Check if text contains Arabic characters
22180
- * @private
22201
+ /**
22202
+ * Check if text contains Arabic characters
22203
+ * @private
22181
22204
  */
22182
22205
  _containsArabicText(text) {
22183
22206
  return /[\u0600-\u06FF\u0750-\u077F\uFB50-\uFDFF\uFE70-\uFEFF]/.test(text);
22184
22207
  }
22185
22208
 
22186
- /**
22187
- * Returns object representation of an instance
22188
- * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
22189
- * @return {Object} Object representation of an instance
22209
+ /**
22210
+ * Returns object representation of an instance
22211
+ * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
22212
+ * @return {Object} Object representation of an instance
22190
22213
  */
22191
22214
  toObject() {
22192
22215
  let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
@@ -22229,23 +22252,23 @@ class FabricText extends StyledText {
22229
22252
  return this;
22230
22253
  }
22231
22254
 
22232
- /**
22233
- * Returns complexity of an instance
22234
- * @return {Number} complexity
22255
+ /**
22256
+ * Returns complexity of an instance
22257
+ * @return {Number} complexity
22235
22258
  */
22236
22259
  complexity() {
22237
22260
  return 1;
22238
22261
  }
22239
22262
 
22240
- /**
22241
- * List of generic font families
22242
- * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
22263
+ /**
22264
+ * List of generic font families
22265
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
22243
22266
  */
22244
22267
 
22245
- /**
22246
- * Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
22247
- * @param {HTMLElement} element Element to parse
22248
- * @param {Object} [options] Options object
22268
+ /**
22269
+ * Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
22270
+ * @param {HTMLElement} element Element to parse
22271
+ * @param {Object} [options] Options object
22249
22272
  */
22250
22273
  static async fromElement(element, options, cssRules) {
22251
22274
  const parsedAttributes = parseAttributes(element, FabricText.ATTRIBUTE_NAMES, cssRules);
@@ -22284,10 +22307,10 @@ class FabricText extends StyledText {
22284
22307
  scaledDiff = lineHeightDiff * textHeightScaleFactor,
22285
22308
  textHeight = text.getScaledHeight() + scaledDiff;
22286
22309
  let offX = 0;
22287
- /*
22288
- Adjust positioning:
22289
- x/y attributes in SVG correspond to the bottom-left corner of text bounding box
22290
- fabric output by default at top, left.
22310
+ /*
22311
+ Adjust positioning:
22312
+ x/y attributes in SVG correspond to the bottom-left corner of text bounding box
22313
+ fabric output by default at top, left.
22291
22314
  */
22292
22315
  if (textAnchor === CENTER) {
22293
22316
  offX = text.getScaledWidth() / 2;
@@ -22305,9 +22328,9 @@ class FabricText extends StyledText {
22305
22328
 
22306
22329
  /* _FROM_SVG_END_ */
22307
22330
 
22308
- /**
22309
- * Check if the font is ready for accurate measurements
22310
- * @private
22331
+ /**
22332
+ * Check if the font is ready for accurate measurements
22333
+ * @private
22311
22334
  */
22312
22335
  _isFontReady() {
22313
22336
  if (typeof document === 'undefined' || !('fonts' in document)) {
@@ -22320,9 +22343,9 @@ class FabricText extends StyledText {
22320
22343
  }
22321
22344
  }
22322
22345
 
22323
- /**
22324
- * Schedule re-initialization after font loads
22325
- * @private
22346
+ /**
22347
+ * Schedule re-initialization after font loads
22348
+ * @private
22326
22349
  */
22327
22350
  _scheduleInitAfterFontLoad() {
22328
22351
  if (typeof document === 'undefined' || !('fonts' in document)) {
@@ -22358,8 +22381,8 @@ class FabricText extends StyledText {
22358
22381
  });
22359
22382
  }
22360
22383
 
22361
- /**
22362
- * Force complete text re-initialization (useful after JSON loading)
22384
+ /**
22385
+ * Force complete text re-initialization (useful after JSON loading)
22363
22386
  */
22364
22387
  forceTextReinitialization() {
22365
22388
  console.log('🔄 Force reinitializing text object');
@@ -22387,10 +22410,10 @@ class FabricText extends StyledText {
22387
22410
  }
22388
22411
  }
22389
22412
 
22390
- /**
22391
- * Returns FabricText instance from an object representation
22392
- * @param {Object} object plain js Object to create an instance from
22393
- * @returns {Promise<FabricText>}
22413
+ /**
22414
+ * Returns FabricText instance from an object representation
22415
+ * @param {Object} object plain js Object to create an instance from
22416
+ * @returns {Promise<FabricText>}
22394
22417
  */
22395
22418
  static fromObject(object) {
22396
22419
  return this._fromObject({
@@ -22492,10 +22515,10 @@ class FabricText extends StyledText {
22492
22515
  });
22493
22516
  }
22494
22517
  }
22495
- /**
22496
- * Properties that requires a text layout recalculation when changed
22497
- * @type string[]
22498
- * @protected
22518
+ /**
22519
+ * Properties that requires a text layout recalculation when changed
22520
+ * @type string[]
22521
+ * @protected
22499
22522
  */
22500
22523
  _defineProperty(FabricText, "textLayoutProperties", textLayoutProperties);
22501
22524
  _defineProperty(FabricText, "cacheProperties", [...cacheProperties, ...additionalProps]);
@@ -22503,9 +22526,9 @@ _defineProperty(FabricText, "ownDefaults", textDefaultValues);
22503
22526
  _defineProperty(FabricText, "type", 'Text');
22504
22527
  _defineProperty(FabricText, "genericFonts", ['serif', 'sans-serif', 'monospace', 'cursive', 'fantasy', 'system-ui', 'ui-serif', 'ui-sans-serif', 'ui-monospace', 'ui-rounded', 'math', 'emoji', 'fangsong']);
22505
22528
  /* _FROM_SVG_START_ */
22506
- /**
22507
- * List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
22508
- * @see: http://www.w3.org/TR/SVG/text.html#TextElement
22529
+ /**
22530
+ * List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
22531
+ * @see: http://www.w3.org/TR/SVG/text.html#TextElement
22509
22532
  */
22510
22533
  _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'));
22511
22534
  applyMixins(FabricText, [TextSVGExportMixin]);
@@ -22892,8 +22915,8 @@ class OverlayEditor {
22892
22915
  // We don't need to save/restore them here as it would conflict with IText's restoration
22893
22916
  }
22894
22917
 
22895
- /**
22896
- * Get the container element for the overlay (parent of upperCanvasEl)
22918
+ /**
22919
+ * Get the container element for the overlay (parent of upperCanvasEl)
22897
22920
  */
22898
22921
  getCanvasContainer() {
22899
22922
  const upperCanvas = this.canvas.upperCanvasEl;
@@ -22907,8 +22930,8 @@ class OverlayEditor {
22907
22930
  return container;
22908
22931
  }
22909
22932
 
22910
- /**
22911
- * Create the overlay DOM structure
22933
+ /**
22934
+ * Create the overlay DOM structure
22912
22935
  */
22913
22936
  createOverlayDOM() {
22914
22937
  // Host div for positioning and overflow control
@@ -22963,8 +22986,8 @@ class OverlayEditor {
22963
22986
  document.body.appendChild(this.hostDiv);
22964
22987
  }
22965
22988
 
22966
- /**
22967
- * Attach all event listeners
22989
+ /**
22990
+ * Attach all event listeners
22968
22991
  */
22969
22992
  attachEventListeners() {
22970
22993
  // Textarea events
@@ -22984,8 +23007,8 @@ class OverlayEditor {
22984
23007
  this.setupViewportChangeDetection();
22985
23008
  }
22986
23009
 
22987
- /**
22988
- * Remove all event listeners
23010
+ /**
23011
+ * Remove all event listeners
22989
23012
  */
22990
23013
  removeEventListeners() {
22991
23014
  this.textarea.removeEventListener('input', this.boundHandlers.onInput);
@@ -23002,16 +23025,16 @@ class OverlayEditor {
23002
23025
  this.restoreViewportChangeDetection();
23003
23026
  }
23004
23027
 
23005
- /**
23006
- * Simple method to refresh positioning when canvas changes
23028
+ /**
23029
+ * Simple method to refresh positioning when canvas changes
23007
23030
  */
23008
23031
  updatePosition() {
23009
23032
  this.applyOverlayStyle();
23010
23033
  }
23011
23034
 
23012
- /**
23013
- * Update the Fabric object bounds to match current textarea size
23014
- * This ensures Fabric.js selection controls follow the growing textbox
23035
+ /**
23036
+ * Update the Fabric object bounds to match current textarea size
23037
+ * This ensures Fabric.js selection controls follow the growing textbox
23015
23038
  */
23016
23039
  updateObjectBounds() {
23017
23040
  if (this.isDestroyed) return;
@@ -23045,15 +23068,15 @@ class OverlayEditor {
23045
23068
  }
23046
23069
  }
23047
23070
 
23048
- /**
23049
- * Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
23071
+ /**
23072
+ * Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
23050
23073
  */
23051
23074
  letterSpacingPx(charSpacing, fontSize) {
23052
23075
  return charSpacing / 1000 * fontSize;
23053
23076
  }
23054
23077
 
23055
- /**
23056
- * Detect text direction using first strong directional character
23078
+ /**
23079
+ * Detect text direction using first strong directional character
23057
23080
  */
23058
23081
  firstStrongDir(text) {
23059
23082
  // Hebrew: \u0590-\u05FF, Arabic: \u0600-\u06FF, \u0750-\u077F, \uFB50-\uFDFF, \uFE70-\uFEFF
@@ -23092,10 +23115,10 @@ class OverlayEditor {
23092
23115
  const top = canvasRect.top + scrollY + screenPoint.y;
23093
23116
 
23094
23117
  // 4. Calculate the precise width and height for the container
23095
- // **THE FIX:** Use getBoundingRect() for BOTH width and height.
23096
- // This is the most reliable measure of the object's final rendered dimensions.
23118
+ // **THE FIX:** Use the same width calculation as measureLinesWithBrowser for consistency
23097
23119
  const objectBounds = target.getBoundingRect();
23098
- const width = Math.round(objectBounds.width * zoom);
23120
+ const scaleX = target.scaleX || 1;
23121
+ const width = Math.round((target.width * scaleX + padding * 2) * zoom);
23099
23122
  const height = Math.round(objectBounds.height * zoom);
23100
23123
 
23101
23124
  // 5. Apply styles to host DIV - absolute positioning like rtl-test.html
@@ -23117,7 +23140,6 @@ class OverlayEditor {
23117
23140
  // 6. Style the textarea - match Fabric's exact rendering with padding
23118
23141
  const baseFontSize = (_target$fontSize = target.fontSize) !== null && _target$fontSize !== void 0 ? _target$fontSize : 16;
23119
23142
  // Use scaleX for font scaling to match Fabric text scaling exactly
23120
- const scaleX = target.scaleX || 1;
23121
23143
  const finalFontSize = baseFontSize * scaleX * zoom;
23122
23144
  const fabricLineHeight = target.lineHeight || 1.16;
23123
23145
  // **THE FIX:** Use 'border-box' so the width property includes padding.
@@ -23179,7 +23201,7 @@ class OverlayEditor {
23179
23201
  this.textarea.style.textAlignLast = 'left';
23180
23202
  }
23181
23203
  } else if (textAlign === 'justify-right') {
23182
- // If text is LTR but fabric says justify-right, override to justify-left for better UX
23204
+ // If text is LTR but fabric says justify-right, override to justify-left for better UX
23183
23205
  if (autoDetectedDirection === 'ltr') {
23184
23206
  this.textarea.style.textAlignLast = 'left';
23185
23207
  console.log(' → Overrode justify-right to justify-left for LTR text');
@@ -23290,8 +23312,8 @@ class OverlayEditor {
23290
23312
  // Initial bounds are set correctly by Fabric.js - don't force update here
23291
23313
  }
23292
23314
 
23293
- /**
23294
- * Debug method to compare textarea and canvas object bounding boxes
23315
+ /**
23316
+ * Debug method to compare textarea and canvas object bounding boxes
23295
23317
  */
23296
23318
  debugBoundingBoxComparison() {
23297
23319
  const target = this.target;
@@ -23361,8 +23383,8 @@ class OverlayEditor {
23361
23383
  console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
23362
23384
  }
23363
23385
 
23364
- /**
23365
- * Debug method to compare text wrapping between textarea and Fabric text object
23386
+ /**
23387
+ * Debug method to compare text wrapping between textarea and Fabric text object
23366
23388
  */
23367
23389
  debugTextWrapping() {
23368
23390
  const target = this.target;
@@ -23447,8 +23469,8 @@ class OverlayEditor {
23447
23469
  console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
23448
23470
  }
23449
23471
 
23450
- /**
23451
- * Focus the textarea and position cursor at end
23472
+ /**
23473
+ * Focus the textarea and position cursor at end
23452
23474
  */
23453
23475
  focusTextarea() {
23454
23476
  // For overlay editing, we want to keep the object in "selection mode" not "editing mode"
@@ -23488,8 +23510,8 @@ class OverlayEditor {
23488
23510
  this.canvas.requestRenderAll();
23489
23511
  }
23490
23512
 
23491
- /**
23492
- * Refresh overlay positioning and styling
23513
+ /**
23514
+ * Refresh overlay positioning and styling
23493
23515
  */
23494
23516
  refresh() {
23495
23517
  if (this.isDestroyed) return;
@@ -23497,32 +23519,34 @@ class OverlayEditor {
23497
23519
  // Don't update object bounds on every refresh - only when textarea actually resizes
23498
23520
  }
23499
23521
 
23500
- /**
23501
- * Destroy the overlay editor
23522
+ /**
23523
+ * Destroy the overlay editor
23502
23524
  */
23503
23525
  destroy() {
23526
+ var _this$target$textAlig;
23504
23527
  let commit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
23505
23528
  if (this.isDestroyed) return;
23506
23529
  this.isDestroyed = true;
23507
23530
  this.removeEventListeners();
23508
23531
 
23509
- // Restore target visibility before handling commit/cancel
23510
- if (this.target.__overlayEditor === this) {
23511
- this.target.__overlayEditor = undefined;
23512
-
23513
- // Restore original opacity
23514
- if (this.target.__overlayOriginalOpacity !== undefined) {
23515
- this.target.opacity = this.target.__overlayOriginalOpacity;
23516
- delete this.target.__overlayOriginalOpacity;
23532
+ // EXTRACT DOM DATA BEFORE REMOVING DOM for justify text preservation
23533
+ let extractedOverlayData = null;
23534
+ if (commit && (_this$target$textAlig = this.target.textAlign) !== null && _this$target$textAlig !== void 0 && _this$target$textAlig.includes('justify')) {
23535
+ try {
23536
+ // Store the DOM structure before destruction
23537
+ const result = extractLinesFromDOM(this.textarea);
23538
+ extractedOverlayData = result.lines;
23539
+ console.log('🔧 DESTROY: Extracted overlay lines before DOM removal');
23540
+ } catch (error) {
23541
+ console.warn('Failed to extract overlay lines before destruction:', error);
23517
23542
  }
23518
23543
  }
23519
23544
 
23520
- // Remove DOM first
23521
- if (this.hostDiv.parentNode) {
23522
- this.hostDiv.parentNode.removeChild(this.hostDiv);
23545
+ // Restore original opacity but keep overlayEditor reference for commit
23546
+ if (this.target.__overlayOriginalOpacity !== undefined) {
23547
+ this.target.opacity = this.target.__overlayOriginalOpacity;
23548
+ delete this.target.__overlayOriginalOpacity;
23523
23549
  }
23524
-
23525
- // Handle commit/cancel after restoring visibility
23526
23550
  if (commit && !this.isComposing) {
23527
23551
  const finalText = this.textarea.value;
23528
23552
 
@@ -23543,12 +23567,26 @@ class OverlayEditor {
23543
23567
  console.log(`📝 Overlay Exit: Direction unchanged (${currentDirection}), text: "${finalText.substring(0, 30)}..."`);
23544
23568
  }
23545
23569
  if (this.onCommit) {
23570
+ // Store extracted overlay data on target for commitOverlayEdit to use
23571
+ if (extractedOverlayData) {
23572
+ this.target._extractedOverlayLines = extractedOverlayData;
23573
+ }
23546
23574
  this.onCommit(finalText);
23547
23575
  }
23548
23576
  } else if (!commit && this.onCancel) {
23549
23577
  this.onCancel();
23550
23578
  }
23551
23579
 
23580
+ // Clear overlay editor reference AFTER commit/cancel handlers
23581
+ if (this.target.__overlayEditor === this) {
23582
+ this.target.__overlayEditor = undefined;
23583
+ }
23584
+
23585
+ // Remove DOM after commit/cancel handlers
23586
+ if (this.hostDiv.parentNode) {
23587
+ this.hostDiv.parentNode.removeChild(this.hostDiv);
23588
+ }
23589
+
23552
23590
  // Note: Don't restore object cursors since IText manages all cursors in _restoreEditingProps
23553
23591
  // Let the IText editing system handle proper restoration of all cursor properties
23554
23592
 
@@ -23563,6 +23601,9 @@ class OverlayEditor {
23563
23601
  // Request canvas re-render
23564
23602
  this.canvas.requestRenderAll();
23565
23603
  }
23604
+ get textareaElement() {
23605
+ return this.textarea;
23606
+ }
23566
23607
 
23567
23608
  // Event handlers
23568
23609
  handleInput() {
@@ -23666,8 +23707,8 @@ class OverlayEditor {
23666
23707
  }
23667
23708
  }
23668
23709
 
23669
- /**
23670
- * Setup detection for viewport changes (zoom/pan)
23710
+ /**
23711
+ * Setup detection for viewport changes (zoom/pan)
23671
23712
  */
23672
23713
  setupViewportChangeDetection() {
23673
23714
  // Store original methods
@@ -23696,8 +23737,8 @@ class OverlayEditor {
23696
23737
  };
23697
23738
  }
23698
23739
 
23699
- /**
23700
- * Restore original viewport methods
23740
+ /**
23741
+ * Restore original viewport methods
23701
23742
  */
23702
23743
  restoreViewportChangeDetection() {
23703
23744
  if (this.canvas.__originalSetZoom) {
@@ -23712,8 +23753,8 @@ class OverlayEditor {
23712
23753
  }
23713
23754
  }
23714
23755
 
23715
- /**
23716
- * Enter overlay text editing mode for a text object
23756
+ /**
23757
+ * Enter overlay text editing mode for a text object
23717
23758
  */
23718
23759
  function enterTextOverlayEdit(canvas, target, options) {
23719
23760
  // If already in overlay editing, destroy existing editor first
@@ -23737,35 +23778,35 @@ function enterTextOverlayEdit(canvas, target, options) {
23737
23778
  return editor;
23738
23779
  }
23739
23780
 
23740
- /**
23741
- * extend this regex to support non english languages
23742
- *
23743
- * - ` ` Matches a SPACE character (char code 32).
23744
- * - `\n` Matches a LINE FEED character (char code 10).
23745
- * - `.` Matches a "." character (char code 46).
23746
- * - `,` Matches a "," character (char code 44).
23747
- * - `;` Matches a ";" character (char code 59).
23748
- * - `!` Matches a "!" character (char code 33).
23749
- * - `\?` Matches a "?" character (char code 63).
23750
- * - `\-` Matches a "-" character (char code 45).
23781
+ /**
23782
+ * extend this regex to support non english languages
23783
+ *
23784
+ * - ` ` Matches a SPACE character (char code 32).
23785
+ * - `\n` Matches a LINE FEED character (char code 10).
23786
+ * - `.` Matches a "." character (char code 46).
23787
+ * - `,` Matches a "," character (char code 44).
23788
+ * - `;` Matches a ";" character (char code 59).
23789
+ * - `!` Matches a "!" character (char code 33).
23790
+ * - `\?` Matches a "?" character (char code 63).
23791
+ * - `\-` Matches a "-" character (char code 45).
23751
23792
  */
23752
23793
  // eslint-disable-next-line no-useless-escape
23753
23794
  const reNonWord = /[ \n\.,;!\?\-]/;
23754
23795
  class ITextBehavior extends FabricText {
23755
23796
  constructor() {
23756
23797
  super(...arguments);
23757
- /**
23758
- * Helps determining when the text is in composition, so that the cursor
23759
- * rendering is altered.
23798
+ /**
23799
+ * Helps determining when the text is in composition, so that the cursor
23800
+ * rendering is altered.
23760
23801
  */
23761
23802
  _defineProperty(this, "_currentCursorOpacity", 1);
23762
23803
  }
23763
- /**
23764
- * Keeps track if the IText object was selected before the actual click.
23765
- * This because we want to delay enter editing by a click.
23804
+ /**
23805
+ * Keeps track if the IText object was selected before the actual click.
23806
+ * This because we want to delay enter editing by a click.
23766
23807
  */
23767
- /**
23768
- * Initializes all the interactive behavior of IText
23808
+ /**
23809
+ * Initializes all the interactive behavior of IText
23769
23810
  */
23770
23811
  initBehavior() {
23771
23812
  this._tick = this._tick.bind(this);
@@ -23778,8 +23819,8 @@ class ITextBehavior extends FabricText {
23778
23819
  return super.onDeselect(options);
23779
23820
  }
23780
23821
 
23781
- /**
23782
- * @private
23822
+ /**
23823
+ * @private
23783
23824
  */
23784
23825
  _animateCursor(_ref) {
23785
23826
  let {
@@ -23804,8 +23845,8 @@ class ITextBehavior extends FabricText {
23804
23845
  });
23805
23846
  }
23806
23847
 
23807
- /**
23808
- * changes the cursor from visible to invisible
23848
+ /**
23849
+ * changes the cursor from visible to invisible
23809
23850
  */
23810
23851
  _tick(delay) {
23811
23852
  this._currentTickState = this._animateCursor({
@@ -23816,8 +23857,8 @@ class ITextBehavior extends FabricText {
23816
23857
  });
23817
23858
  }
23818
23859
 
23819
- /**
23820
- * Changes the cursor from invisible to visible
23860
+ /**
23861
+ * Changes the cursor from invisible to visible
23821
23862
  */
23822
23863
  _onTickComplete() {
23823
23864
  var _this$_currentTickCom;
@@ -23829,16 +23870,16 @@ class ITextBehavior extends FabricText {
23829
23870
  });
23830
23871
  }
23831
23872
 
23832
- /**
23833
- * Initializes delayed cursor
23873
+ /**
23874
+ * Initializes delayed cursor
23834
23875
  */
23835
23876
  initDelayedCursor(restart) {
23836
23877
  this.abortCursorAnimation();
23837
23878
  this._tick(restart ? 0 : this.cursorDelay);
23838
23879
  }
23839
23880
 
23840
- /**
23841
- * Aborts cursor animation, clears all timeouts and clear textarea context if necessary
23881
+ /**
23882
+ * Aborts cursor animation, clears all timeouts and clear textarea context if necessary
23842
23883
  */
23843
23884
  abortCursorAnimation() {
23844
23885
  let shouldClear = false;
@@ -23856,9 +23897,9 @@ class ITextBehavior extends FabricText {
23856
23897
  }
23857
23898
  }
23858
23899
 
23859
- /**
23860
- * Restart tue cursor animation if either is in complete state ( between animations )
23861
- * or if it never started before
23900
+ /**
23901
+ * Restart tue cursor animation if either is in complete state ( between animations )
23902
+ * or if it never started before
23862
23903
  */
23863
23904
  restartCursorIfNeeded() {
23864
23905
  if ([this._currentTickState, this._currentTickCompleteState].some(cursorAnimation => !cursorAnimation || cursorAnimation.isDone())) {
@@ -23866,8 +23907,8 @@ class ITextBehavior extends FabricText {
23866
23907
  }
23867
23908
  }
23868
23909
 
23869
- /**
23870
- * Selects entire text
23910
+ /**
23911
+ * Selects entire text
23871
23912
  */
23872
23913
  selectAll() {
23873
23914
  this.selectionStart = 0;
@@ -23877,26 +23918,26 @@ class ITextBehavior extends FabricText {
23877
23918
  return this;
23878
23919
  }
23879
23920
 
23880
- /**
23881
- * Selects entire text and updates the visual state
23921
+ /**
23922
+ * Selects entire text and updates the visual state
23882
23923
  */
23883
23924
  cmdAll() {
23884
23925
  this.selectAll();
23885
23926
  this.renderCursorOrSelection();
23886
23927
  }
23887
23928
 
23888
- /**
23889
- * Returns selected text
23890
- * @return {String}
23929
+ /**
23930
+ * Returns selected text
23931
+ * @return {String}
23891
23932
  */
23892
23933
  getSelectedText() {
23893
23934
  return this._text.slice(this.selectionStart, this.selectionEnd).join('');
23894
23935
  }
23895
23936
 
23896
- /**
23897
- * Find new selection index representing start of current word according to current selection index
23898
- * @param {Number} startFrom Current selection index
23899
- * @return {Number} New selection index
23937
+ /**
23938
+ * Find new selection index representing start of current word according to current selection index
23939
+ * @param {Number} startFrom Current selection index
23940
+ * @return {Number} New selection index
23900
23941
  */
23901
23942
  findWordBoundaryLeft(startFrom) {
23902
23943
  let offset = 0,
@@ -23916,10 +23957,10 @@ class ITextBehavior extends FabricText {
23916
23957
  return startFrom - offset;
23917
23958
  }
23918
23959
 
23919
- /**
23920
- * Find new selection index representing end of current word according to current selection index
23921
- * @param {Number} startFrom Current selection index
23922
- * @return {Number} New selection index
23960
+ /**
23961
+ * Find new selection index representing end of current word according to current selection index
23962
+ * @param {Number} startFrom Current selection index
23963
+ * @return {Number} New selection index
23923
23964
  */
23924
23965
  findWordBoundaryRight(startFrom) {
23925
23966
  let offset = 0,
@@ -23939,10 +23980,10 @@ class ITextBehavior extends FabricText {
23939
23980
  return startFrom + offset;
23940
23981
  }
23941
23982
 
23942
- /**
23943
- * Find new selection index representing start of current line according to current selection index
23944
- * @param {Number} startFrom Current selection index
23945
- * @return {Number} New selection index
23983
+ /**
23984
+ * Find new selection index representing start of current line according to current selection index
23985
+ * @param {Number} startFrom Current selection index
23986
+ * @return {Number} New selection index
23946
23987
  */
23947
23988
  findLineBoundaryLeft(startFrom) {
23948
23989
  let offset = 0,
@@ -23954,10 +23995,10 @@ class ITextBehavior extends FabricText {
23954
23995
  return startFrom - offset;
23955
23996
  }
23956
23997
 
23957
- /**
23958
- * Find new selection index representing end of current line according to current selection index
23959
- * @param {Number} startFrom Current selection index
23960
- * @return {Number} New selection index
23998
+ /**
23999
+ * Find new selection index representing end of current line according to current selection index
24000
+ * @param {Number} startFrom Current selection index
24001
+ * @return {Number} New selection index
23961
24002
  */
23962
24003
  findLineBoundaryRight(startFrom) {
23963
24004
  let offset = 0,
@@ -23969,11 +24010,11 @@ class ITextBehavior extends FabricText {
23969
24010
  return startFrom + offset;
23970
24011
  }
23971
24012
 
23972
- /**
23973
- * Finds index corresponding to beginning or end of a word
23974
- * @param {Number} selectionStart Index of a character
23975
- * @param {Number} direction 1 or -1
23976
- * @return {Number} Index of the beginning or end of a word
24013
+ /**
24014
+ * Finds index corresponding to beginning or end of a word
24015
+ * @param {Number} selectionStart Index of a character
24016
+ * @param {Number} direction 1 or -1
24017
+ * @return {Number} Index of the beginning or end of a word
23977
24018
  */
23978
24019
  searchWordBoundary(selectionStart, direction) {
23979
24020
  const text = this._text;
@@ -23991,9 +24032,9 @@ class ITextBehavior extends FabricText {
23991
24032
  return index;
23992
24033
  }
23993
24034
 
23994
- /**
23995
- * Selects the word that contains the char at index selectionStart
23996
- * @param {Number} selectionStart Index of a character
24035
+ /**
24036
+ * Selects the word that contains the char at index selectionStart
24037
+ * @param {Number} selectionStart Index of a character
23997
24038
  */
23998
24039
  selectWord(selectionStart) {
23999
24040
  selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
@@ -24009,9 +24050,9 @@ class ITextBehavior extends FabricText {
24009
24050
  this.renderCursorOrSelection();
24010
24051
  }
24011
24052
 
24012
- /**
24013
- * Selects the line that contains selectionStart
24014
- * @param {Number} selectionStart Index of a character
24053
+ /**
24054
+ * Selects the line that contains selectionStart
24055
+ * @param {Number} selectionStart Index of a character
24015
24056
  */
24016
24057
  selectLine(selectionStart) {
24017
24058
  selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
@@ -24023,8 +24064,8 @@ class ITextBehavior extends FabricText {
24023
24064
  this._updateTextarea();
24024
24065
  }
24025
24066
 
24026
- /**
24027
- * Enters editing state
24067
+ /**
24068
+ * Enters editing state
24028
24069
  */
24029
24070
  enterEditing(e) {
24030
24071
  if (this.isEditing || !this.editable) {
@@ -24044,8 +24085,8 @@ class ITextBehavior extends FabricText {
24044
24085
  }
24045
24086
  }
24046
24087
 
24047
- /**
24048
- * runs the actual logic that enter from editing state, see {@link enterEditing}
24088
+ /**
24089
+ * runs the actual logic that enter from editing state, see {@link enterEditing}
24049
24090
  */
24050
24091
  enterEditingImpl() {
24051
24092
  if (this.canvas) {
@@ -24056,6 +24097,18 @@ class ITextBehavior extends FabricText {
24056
24097
 
24057
24098
  // Check if using overlay editing
24058
24099
  if (this.useOverlayEditing) {
24100
+ // For justify text, backup the current working state before overlay editing
24101
+ if (this.textAlign.includes('justify')) {
24102
+ console.log('💾 BACKUP: Saving pre-overlay justify state');
24103
+ this._originalText = this.text; // Store original text to detect changes
24104
+ this._preOverlayJustifyState = {
24105
+ __charBounds: JSON.parse(JSON.stringify(this.__charBounds || [])),
24106
+ __lineHeights: [...(this.__lineHeights || [])],
24107
+ __lineWidths: [...(this.__lineWidths || [])],
24108
+ textLines: [...(this.textLines || [])],
24109
+ _textLines: (this._textLines || []).map(line => [...line])
24110
+ };
24111
+ }
24059
24112
  this.enterOverlayEditing();
24060
24113
  } else {
24061
24114
  this.initHiddenTextarea();
@@ -24069,8 +24122,8 @@ class ITextBehavior extends FabricText {
24069
24122
  }
24070
24123
  }
24071
24124
 
24072
- /**
24073
- * Enter overlay editing mode using DOM textarea overlay
24125
+ /**
24126
+ * Enter overlay editing mode using DOM textarea overlay
24074
24127
  */
24075
24128
  enterOverlayEditing() {
24076
24129
  this._saveEditingProps();
@@ -24091,33 +24144,85 @@ class ITextBehavior extends FabricText {
24091
24144
  });
24092
24145
  }
24093
24146
 
24094
- /**
24095
- * Commit overlay editing changes
24147
+ /**
24148
+ * Commit overlay editing changes
24096
24149
  */
24097
24150
  commitOverlayEdit(text) {
24098
24151
  const overlayEditor = this.__overlayEditor;
24099
- if (overlayEditor) {
24100
- // Extract browser lines for pixel-perfect rendering
24101
- try {
24152
+
24153
+ // Update text first so browser line cache uses the new content
24154
+ this.text = text;
24155
+
24156
+ // For justify text, restore pre-overlay state only if text didn't change
24157
+ if (this.textAlign.includes('justify')) {
24158
+ const textChanged = this._originalText !== text;
24159
+ console.log('🔄 JUSTIFY CHECK: Text changed:', textChanged);
24160
+
24161
+ // Only restore backup state if text didn't change
24162
+ if (!textChanged) {
24163
+ const backupState = this._preOverlayJustifyState;
24164
+ if (backupState) {
24165
+ var _this$canvas;
24166
+ console.log('📦 RESTORE: Text unchanged, restoring pre-overlay state');
24167
+ // Restore the working character bounds and measurements (but keep current text)
24168
+ this.__charBounds = JSON.parse(JSON.stringify(backupState.__charBounds));
24169
+ this.__lineHeights = [...backupState.__lineHeights];
24170
+ this.__lineWidths = [...backupState.__lineWidths];
24171
+ this.textLines = [...backupState.textLines];
24172
+ this._textLines = backupState._textLines.map(line => [...line]);
24173
+
24174
+ // Clear the backup
24175
+ delete this._preOverlayJustifyState;
24176
+ delete this._originalText;
24177
+
24178
+ // Just request a render, don't rebuild
24179
+ (_this$canvas = this.canvas) === null || _this$canvas === void 0 || _this$canvas.requestRenderAll();
24180
+ return;
24181
+ }
24182
+ } else {
24183
+ console.log('🆕 REBUILD: Text changed, need to rebuild justify layout');
24184
+ // Clean up backup since we won't use it
24185
+ delete this._preOverlayJustifyState;
24186
+ delete this._originalText;
24187
+ }
24188
+ }
24189
+ if (overlayEditor && overlayEditor.textareaElement) {
24190
+ // For non-justify text, extract browser lines normally
24191
+ try {
24102
24192
  const result = extractLinesFromDOM(overlayEditor.textareaElement);
24103
- storeBrowserLines(this, result.lines);
24193
+ storeBrowserLines(this, result.lines, result.width);
24104
24194
  } catch (error) {
24105
24195
  console.warn('Failed to extract browser lines:', error);
24106
24196
  }
24107
24197
  }
24108
24198
 
24109
- // Update text content and trigger layout recalculation
24110
- this.text = text;
24199
+ // Trigger layout recalculation
24111
24200
  this.dirty = true;
24112
24201
  this.initDimensions();
24202
+
24203
+ // For justify text, force complete reconstruction after overlay editing
24204
+ if (this.textAlign.includes('justify') && 'enlargeSpaces' in this) {
24205
+ setTimeout(() => {
24206
+ var _this$canvas2;
24207
+ console.log('🔧 FORCE REBUILD: Rebuilding justify text after overlay editing');
24208
+ // Force complete reconstruction of character bounds
24209
+ this.__charBounds = [];
24210
+ this.__lineHeights = [];
24211
+ this.__lineWidths = [];
24212
+ // Re-run initDimensions to rebuild everything
24213
+ this.initDimensions();
24214
+ (_this$canvas2 = this.canvas) === null || _this$canvas2 === void 0 || _this$canvas2.requestRenderAll();
24215
+ }, 20);
24216
+ }
24113
24217
  this.setCoords();
24114
24218
  this.exitEditing();
24115
24219
  this.fire('changed');
24116
24220
  this.canvas && this.canvas.requestRenderAll();
24221
+ console.log('🔧 DEBUG: commitOverlayEdit complete');
24117
24222
  }
24118
24223
 
24119
- /**
24120
- * Cancel overlay editing without changes
24224
+ /**
24225
+ * Cancel overlay editing without changes
24121
24226
  */
24122
24227
  cancelOverlayEdit() {
24123
24228
  // Restore original text
@@ -24125,8 +24230,8 @@ class ITextBehavior extends FabricText {
24125
24230
  this.exitEditing();
24126
24231
  }
24127
24232
 
24128
- /**
24129
- * called by {@link Canvas#textEditingManager}
24233
+ /**
24234
+ * called by {@link Canvas#textEditingManager}
24130
24235
  */
24131
24236
  updateSelectionOnMouseMove(e) {
24132
24237
  if (this.getActiveControl()) {
@@ -24154,8 +24259,8 @@ class ITextBehavior extends FabricText {
24154
24259
  }
24155
24260
  }
24156
24261
 
24157
- /**
24158
- * @private
24262
+ /**
24263
+ * @private
24159
24264
  */
24160
24265
  _setEditingProps() {
24161
24266
  this.hoverCursor = 'text';
@@ -24167,8 +24272,8 @@ class ITextBehavior extends FabricText {
24167
24272
  this.lockMovementX = this.lockMovementY = true;
24168
24273
  }
24169
24274
 
24170
- /**
24171
- * convert from textarea to grapheme indexes
24275
+ /**
24276
+ * convert from textarea to grapheme indexes
24172
24277
  */
24173
24278
  fromStringToGraphemeSelection(start, end, text) {
24174
24279
  const smallerTextStart = text.slice(0, start),
@@ -24187,8 +24292,8 @@ class ITextBehavior extends FabricText {
24187
24292
  };
24188
24293
  }
24189
24294
 
24190
- /**
24191
- * convert from fabric to textarea values
24295
+ /**
24296
+ * convert from fabric to textarea values
24192
24297
  */
24193
24298
  fromGraphemeToStringSelection(start, end, graphemes) {
24194
24299
  const smallerTextStart = graphemes.slice(0, start),
@@ -24207,8 +24312,8 @@ class ITextBehavior extends FabricText {
24207
24312
  };
24208
24313
  }
24209
24314
 
24210
- /**
24211
- * @private
24315
+ /**
24316
+ * @private
24212
24317
  */
24213
24318
  _updateTextarea() {
24214
24319
  console.log('🔤 _updateTextarea called with fabric text:', this.text);
@@ -24233,8 +24338,8 @@ class ITextBehavior extends FabricText {
24233
24338
  this.updateTextareaPosition();
24234
24339
  }
24235
24340
 
24236
- /**
24237
- * @private
24341
+ /**
24342
+ * @private
24238
24343
  */
24239
24344
  updateFromTextArea() {
24240
24345
  if (!this.hiddenTextarea) {
@@ -24254,8 +24359,8 @@ class ITextBehavior extends FabricText {
24254
24359
  this.updateTextareaPosition();
24255
24360
  }
24256
24361
 
24257
- /**
24258
- * @private
24362
+ /**
24363
+ * @private
24259
24364
  */
24260
24365
  updateTextareaPosition() {
24261
24366
  if (this.selectionStart === this.selectionEnd) {
@@ -24265,9 +24370,9 @@ class ITextBehavior extends FabricText {
24265
24370
  }
24266
24371
  }
24267
24372
 
24268
- /**
24269
- * @private
24270
- * @return {Object} style contains style for hiddenTextarea
24373
+ /**
24374
+ * @private
24375
+ * @return {Object} style contains style for hiddenTextarea
24271
24376
  */
24272
24377
  _calcTextareaPosition() {
24273
24378
  if (!this.canvas) {
@@ -24314,8 +24419,8 @@ class ITextBehavior extends FabricText {
24314
24419
  };
24315
24420
  }
24316
24421
 
24317
- /**
24318
- * @private
24422
+ /**
24423
+ * @private
24319
24424
  */
24320
24425
  _saveEditingProps() {
24321
24426
  this._savedProps = {
@@ -24332,8 +24437,8 @@ class ITextBehavior extends FabricText {
24332
24437
  };
24333
24438
  }
24334
24439
 
24335
- /**
24336
- * @private
24440
+ /**
24441
+ * @private
24337
24442
  */
24338
24443
  _restoreEditingProps() {
24339
24444
  if (!this._savedProps) {
@@ -24353,9 +24458,9 @@ class ITextBehavior extends FabricText {
24353
24458
  delete this._savedProps;
24354
24459
  }
24355
24460
 
24356
- /**
24357
- * runs the actual logic that exits from editing state, see {@link exitEditing}
24358
- * But it does not fire events
24461
+ /**
24462
+ * runs the actual logic that exits from editing state, see {@link exitEditing}
24463
+ * But it does not fire events
24359
24464
  */
24360
24465
  exitEditingImpl() {
24361
24466
  const hiddenTextarea = this.hiddenTextarea;
@@ -24376,8 +24481,8 @@ class ITextBehavior extends FabricText {
24376
24481
  }
24377
24482
  }
24378
24483
 
24379
- /**
24380
- * Exits from editing state and fires relevant events
24484
+ /**
24485
+ * Exits from editing state and fires relevant events
24381
24486
  */
24382
24487
  exitEditing() {
24383
24488
  const isTextChanged = this._textBeforeEdit !== this.text;
@@ -24396,8 +24501,8 @@ class ITextBehavior extends FabricText {
24396
24501
  return this;
24397
24502
  }
24398
24503
 
24399
- /**
24400
- * @private
24504
+ /**
24505
+ * @private
24401
24506
  */
24402
24507
  _removeExtraneousStyles() {
24403
24508
  for (const prop in this.styles) {
@@ -24407,10 +24512,10 @@ class ITextBehavior extends FabricText {
24407
24512
  }
24408
24513
  }
24409
24514
 
24410
- /**
24411
- * remove and reflow a style block from start to end.
24412
- * @param {Number} start linear start position for removal (included in removal)
24413
- * @param {Number} end linear end position for removal ( excluded from removal )
24515
+ /**
24516
+ * remove and reflow a style block from start to end.
24517
+ * @param {Number} start linear start position for removal (included in removal)
24518
+ * @param {Number} end linear end position for removal ( excluded from removal )
24414
24519
  */
24415
24520
  removeStyleFromTo(start, end) {
24416
24521
  const {
@@ -24463,10 +24568,10 @@ class ITextBehavior extends FabricText {
24463
24568
  }
24464
24569
  }
24465
24570
 
24466
- /**
24467
- * Shifts line styles up or down
24468
- * @param {Number} lineIndex Index of a line
24469
- * @param {Number} offset Can any number?
24571
+ /**
24572
+ * Shifts line styles up or down
24573
+ * @param {Number} lineIndex Index of a line
24574
+ * @param {Number} offset Can any number?
24470
24575
  */
24471
24576
  shiftLineStyles(lineIndex, offset) {
24472
24577
  const clonedStyles = Object.assign({}, this.styles);
@@ -24481,15 +24586,15 @@ class ITextBehavior extends FabricText {
24481
24586
  }
24482
24587
  }
24483
24588
 
24484
- /**
24485
- * Handle insertion of more consecutive style lines for when one or more
24486
- * newlines gets added to the text. Since current style needs to be shifted
24487
- * first we shift the current style of the number lines needed, then we add
24488
- * new lines from the last to the first.
24489
- * @param {Number} lineIndex Index of a line
24490
- * @param {Number} charIndex Index of a char
24491
- * @param {Number} qty number of lines to add
24492
- * @param {Array} copiedStyle Array of objects styles
24589
+ /**
24590
+ * Handle insertion of more consecutive style lines for when one or more
24591
+ * newlines gets added to the text. Since current style needs to be shifted
24592
+ * first we shift the current style of the number lines needed, then we add
24593
+ * new lines from the last to the first.
24594
+ * @param {Number} lineIndex Index of a line
24595
+ * @param {Number} charIndex Index of a char
24596
+ * @param {Number} qty number of lines to add
24597
+ * @param {Array} copiedStyle Array of objects styles
24493
24598
  */
24494
24599
  insertNewlineStyleObject(lineIndex, charIndex, qty, copiedStyle) {
24495
24600
  const newLineStyles = {};
@@ -24549,12 +24654,12 @@ class ITextBehavior extends FabricText {
24549
24654
  this._forceClearCache = true;
24550
24655
  }
24551
24656
 
24552
- /**
24553
- * Inserts style object for a given line/char index
24554
- * @param {Number} lineIndex Index of a line
24555
- * @param {Number} charIndex Index of a char
24556
- * @param {Number} quantity number Style object to insert, if given
24557
- * @param {Array} copiedStyle array of style objects
24657
+ /**
24658
+ * Inserts style object for a given line/char index
24659
+ * @param {Number} lineIndex Index of a line
24660
+ * @param {Number} charIndex Index of a char
24661
+ * @param {Number} quantity number Style object to insert, if given
24662
+ * @param {Array} copiedStyle array of style objects
24558
24663
  */
24559
24664
  insertCharStyleObject(lineIndex, charIndex, quantity, copiedStyle) {
24560
24665
  if (!this.styles) {
@@ -24603,11 +24708,11 @@ class ITextBehavior extends FabricText {
24603
24708
  }
24604
24709
  }
24605
24710
 
24606
- /**
24607
- * Inserts style object(s)
24608
- * @param {Array} insertedText Characters at the location where style is inserted
24609
- * @param {Number} start cursor index for inserting style
24610
- * @param {Array} [copiedStyle] array of style objects to insert.
24711
+ /**
24712
+ * Inserts style object(s)
24713
+ * @param {Array} insertedText Characters at the location where style is inserted
24714
+ * @param {Number} start cursor index for inserting style
24715
+ * @param {Array} [copiedStyle] array of style objects to insert.
24611
24716
  */
24612
24717
  insertNewStyleBlock(insertedText, start, copiedStyle) {
24613
24718
  const cursorLoc = this.get2DCursorLocation(start, true),
@@ -24648,12 +24753,12 @@ class ITextBehavior extends FabricText {
24648
24753
  }
24649
24754
  }
24650
24755
 
24651
- /**
24652
- * Removes characters from start/end
24653
- * start/end ar per grapheme position in _text array.
24654
- *
24655
- * @param {Number} start
24656
- * @param {Number} end default to start + 1
24756
+ /**
24757
+ * Removes characters from start/end
24758
+ * start/end ar per grapheme position in _text array.
24759
+ *
24760
+ * @param {Number} start
24761
+ * @param {Number} end default to start + 1
24657
24762
  */
24658
24763
  removeChars(start) {
24659
24764
  let end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : start + 1;
@@ -24666,17 +24771,17 @@ class ITextBehavior extends FabricText {
24666
24771
  this._removeExtraneousStyles();
24667
24772
  }
24668
24773
 
24669
- /**
24670
- * insert characters at start position, before start position.
24671
- * start equal 1 it means the text get inserted between actual grapheme 0 and 1
24672
- * if style array is provided, it must be as the same length of text in graphemes
24673
- * if end is provided and is bigger than start, old text is replaced.
24674
- * start/end ar per grapheme position in _text array.
24675
- *
24676
- * @param {String} text text to insert
24677
- * @param {Array} style array of style objects
24678
- * @param {Number} start
24679
- * @param {Number} end default to start + 1
24774
+ /**
24775
+ * insert characters at start position, before start position.
24776
+ * start equal 1 it means the text get inserted between actual grapheme 0 and 1
24777
+ * if style array is provided, it must be as the same length of text in graphemes
24778
+ * if end is provided and is bigger than start, old text is replaced.
24779
+ * start/end ar per grapheme position in _text array.
24780
+ *
24781
+ * @param {String} text text to insert
24782
+ * @param {Array} style array of style objects
24783
+ * @param {Number} start
24784
+ * @param {Number} end default to start + 1
24680
24785
  */
24681
24786
  insertChars(text, style, start) {
24682
24787
  let end = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : start;
@@ -24693,9 +24798,9 @@ class ITextBehavior extends FabricText {
24693
24798
  this._removeExtraneousStyles();
24694
24799
  }
24695
24800
 
24696
- /**
24697
- * Set the selectionStart and selectionEnd according to the new position of cursor
24698
- * mimic the key - mouse navigation when shift is pressed.
24801
+ /**
24802
+ * Set the selectionStart and selectionEnd according to the new position of cursor
24803
+ * mimic the key - mouse navigation when shift is pressed.
24699
24804
  */
24700
24805
  setSelectionStartEndWithShift(start, end, newSelection) {
24701
24806
  if (newSelection <= start) {
@@ -24726,36 +24831,36 @@ class ITextBehavior extends FabricText {
24726
24831
  }
24727
24832
 
24728
24833
  class ITextKeyBehavior extends ITextBehavior {
24729
- /**
24730
- * For functionalities on keyDown
24731
- * Map a special key to a function of the instance/prototype
24732
- * If you need different behavior for ESC or TAB or arrows, you have to change
24733
- * this map setting the name of a function that you build on the IText or
24734
- * your prototype.
24735
- * the map change will affect all Instances unless you need for only some text Instances
24736
- * in that case you have to clone this object and assign your Instance.
24737
- * this.keysMap = Object.assign({}, this.keysMap);
24738
- * The function must be in IText.prototype.myFunction And will receive event as args[0]
24834
+ /**
24835
+ * For functionalities on keyDown
24836
+ * Map a special key to a function of the instance/prototype
24837
+ * If you need different behavior for ESC or TAB or arrows, you have to change
24838
+ * this map setting the name of a function that you build on the IText or
24839
+ * your prototype.
24840
+ * the map change will affect all Instances unless you need for only some text Instances
24841
+ * in that case you have to clone this object and assign your Instance.
24842
+ * this.keysMap = Object.assign({}, this.keysMap);
24843
+ * The function must be in IText.prototype.myFunction And will receive event as args[0]
24739
24844
  */
24740
24845
 
24741
- /**
24742
- * For functionalities on keyUp + ctrl || cmd
24846
+ /**
24847
+ * For functionalities on keyUp + ctrl || cmd
24743
24848
  */
24744
24849
 
24745
- /**
24746
- * For functionalities on keyDown + ctrl || cmd
24850
+ /**
24851
+ * For functionalities on keyDown + ctrl || cmd
24747
24852
  */
24748
24853
 
24749
- /**
24750
- * DOM container to append the hiddenTextarea.
24751
- * An alternative to attaching to the document.body.
24752
- * Useful to reduce laggish redraw of the full document.body tree and
24753
- * also with modals event capturing that won't let the textarea take focus.
24754
- * @type HTMLElement
24854
+ /**
24855
+ * DOM container to append the hiddenTextarea.
24856
+ * An alternative to attaching to the document.body.
24857
+ * Useful to reduce laggish redraw of the full document.body tree and
24858
+ * also with modals event capturing that won't let the textarea take focus.
24859
+ * @type HTMLElement
24755
24860
  */
24756
24861
 
24757
- /**
24758
- * Initializes hidden textarea (needed to bring up keyboard in iOS)
24862
+ /**
24863
+ * Initializes hidden textarea (needed to bring up keyboard in iOS)
24759
24864
  */
24760
24865
  initHiddenTextarea() {
24761
24866
  const doc = this.canvas && getDocumentFromElement(this.canvas.getElement()) || getFabricDocument();
@@ -24798,17 +24903,17 @@ class ITextKeyBehavior extends ITextBehavior {
24798
24903
  this.hiddenTextarea = textarea;
24799
24904
  }
24800
24905
 
24801
- /**
24802
- * Override this method to customize cursor behavior on textbox blur
24906
+ /**
24907
+ * Override this method to customize cursor behavior on textbox blur
24803
24908
  */
24804
24909
  blur() {
24805
24910
  this.abortCursorAnimation();
24806
24911
  }
24807
24912
 
24808
- /**
24809
- * Handles keydown event
24810
- * only used for arrows and combination of modifier keys.
24811
- * @param {KeyboardEvent} e Event object
24913
+ /**
24914
+ * Handles keydown event
24915
+ * only used for arrows and combination of modifier keys.
24916
+ * @param {KeyboardEvent} e Event object
24812
24917
  */
24813
24918
  onKeyDown(e) {
24814
24919
  if (!this.isEditing) {
@@ -24834,11 +24939,11 @@ class ITextKeyBehavior extends ITextBehavior {
24834
24939
  }
24835
24940
  }
24836
24941
 
24837
- /**
24838
- * Handles keyup event
24839
- * We handle KeyUp because ie11 and edge have difficulties copy/pasting
24840
- * if a copy/cut event fired, keyup is dismissed
24841
- * @param {KeyboardEvent} e Event object
24942
+ /**
24943
+ * Handles keyup event
24944
+ * We handle KeyUp because ie11 and edge have difficulties copy/pasting
24945
+ * if a copy/cut event fired, keyup is dismissed
24946
+ * @param {KeyboardEvent} e Event object
24842
24947
  */
24843
24948
  onKeyUp(e) {
24844
24949
  if (!this.isEditing || this._copyDone || this.inCompositionMode) {
@@ -24855,9 +24960,9 @@ class ITextKeyBehavior extends ITextBehavior {
24855
24960
  this.canvas && this.canvas.requestRenderAll();
24856
24961
  }
24857
24962
 
24858
- /**
24859
- * Handles onInput event
24860
- * @param {Event} e Event object
24963
+ /**
24964
+ * Handles onInput event
24965
+ * @param {Event} e Event object
24861
24966
  */
24862
24967
  onInput(e) {
24863
24968
  const fromPaste = this.fromPaste;
@@ -24994,15 +25099,15 @@ class ITextKeyBehavior extends ITextBehavior {
24994
25099
  updateAndFire();
24995
25100
  }
24996
25101
 
24997
- /**
24998
- * Composition start
25102
+ /**
25103
+ * Composition start
24999
25104
  */
25000
25105
  onCompositionStart() {
25001
25106
  this.inCompositionMode = true;
25002
25107
  }
25003
25108
 
25004
- /**
25005
- * Composition end
25109
+ /**
25110
+ * Composition end
25006
25111
  */
25007
25112
  onCompositionEnd() {
25008
25113
  this.inCompositionMode = false;
@@ -25020,8 +25125,8 @@ class ITextKeyBehavior extends ITextBehavior {
25020
25125
  this.updateTextareaPosition();
25021
25126
  }
25022
25127
 
25023
- /**
25024
- * Copies selected text
25128
+ /**
25129
+ * Copies selected text
25025
25130
  */
25026
25131
  copy() {
25027
25132
  if (this.selectionStart === this.selectionEnd) {
@@ -25040,19 +25145,19 @@ class ITextKeyBehavior extends ITextBehavior {
25040
25145
  this._copyDone = true;
25041
25146
  }
25042
25147
 
25043
- /**
25044
- * Pastes text
25148
+ /**
25149
+ * Pastes text
25045
25150
  */
25046
25151
  paste() {
25047
25152
  this.fromPaste = true;
25048
25153
  }
25049
25154
 
25050
- /**
25051
- * Finds the width in pixels before the cursor on the same line
25052
- * @private
25053
- * @param {Number} lineIndex
25054
- * @param {Number} charIndex
25055
- * @return {Number} widthBeforeCursor width before cursor
25155
+ /**
25156
+ * Finds the width in pixels before the cursor on the same line
25157
+ * @private
25158
+ * @param {Number} lineIndex
25159
+ * @param {Number} charIndex
25160
+ * @return {Number} widthBeforeCursor width before cursor
25056
25161
  */
25057
25162
  _getWidthBeforeCursor(lineIndex, charIndex) {
25058
25163
  let widthBeforeCursor = this._getLineLeftOffset(lineIndex),
@@ -25064,11 +25169,11 @@ class ITextKeyBehavior extends ITextBehavior {
25064
25169
  return widthBeforeCursor;
25065
25170
  }
25066
25171
 
25067
- /**
25068
- * Gets start offset of a selection
25069
- * @param {KeyboardEvent} e Event object
25070
- * @param {Boolean} isRight
25071
- * @return {Number}
25172
+ /**
25173
+ * Gets start offset of a selection
25174
+ * @param {KeyboardEvent} e Event object
25175
+ * @param {Boolean} isRight
25176
+ * @return {Number}
25072
25177
  */
25073
25178
  getDownCursorOffset(e, isRight) {
25074
25179
  const selectionProp = this._getSelectionForOffset(e, isRight),
@@ -25086,12 +25191,12 @@ class ITextKeyBehavior extends ITextBehavior {
25086
25191
  return textAfterCursor.length + indexOnOtherLine + 1 + this.missingNewlineOffset(lineIndex);
25087
25192
  }
25088
25193
 
25089
- /**
25090
- * private
25091
- * Helps finding if the offset should be counted from Start or End
25092
- * @param {KeyboardEvent} e Event object
25093
- * @param {Boolean} isRight
25094
- * @return {Number}
25194
+ /**
25195
+ * private
25196
+ * Helps finding if the offset should be counted from Start or End
25197
+ * @param {KeyboardEvent} e Event object
25198
+ * @param {Boolean} isRight
25199
+ * @return {Number}
25095
25200
  */
25096
25201
  _getSelectionForOffset(e, isRight) {
25097
25202
  if (e.shiftKey && this.selectionStart !== this.selectionEnd && isRight) {
@@ -25101,10 +25206,10 @@ class ITextKeyBehavior extends ITextBehavior {
25101
25206
  }
25102
25207
  }
25103
25208
 
25104
- /**
25105
- * @param {KeyboardEvent} e Event object
25106
- * @param {Boolean} isRight
25107
- * @return {Number}
25209
+ /**
25210
+ * @param {KeyboardEvent} e Event object
25211
+ * @param {Boolean} isRight
25212
+ * @return {Number}
25108
25213
  */
25109
25214
  getUpCursorOffset(e, isRight) {
25110
25215
  const selectionProp = this._getSelectionForOffset(e, isRight),
@@ -25123,9 +25228,9 @@ class ITextKeyBehavior extends ITextBehavior {
25123
25228
  return -this._textLines[lineIndex - 1].length + indexOnOtherLine - textBeforeCursor.length + (1 - missingNewlineOffset);
25124
25229
  }
25125
25230
 
25126
- /**
25127
- * for a given width it founds the matching character.
25128
- * @private
25231
+ /**
25232
+ * for a given width it founds the matching character.
25233
+ * @private
25129
25234
  */
25130
25235
  _getIndexOnLine(lineIndex, width) {
25131
25236
  const line = this._textLines[lineIndex],
@@ -25155,9 +25260,9 @@ class ITextKeyBehavior extends ITextBehavior {
25155
25260
  return indexOnLine;
25156
25261
  }
25157
25262
 
25158
- /**
25159
- * Moves cursor down
25160
- * @param {KeyboardEvent} e Event object
25263
+ /**
25264
+ * Moves cursor down
25265
+ * @param {KeyboardEvent} e Event object
25161
25266
  */
25162
25267
  moveCursorDown(e) {
25163
25268
  if (this.selectionStart >= this._text.length && this.selectionEnd >= this._text.length) {
@@ -25166,9 +25271,9 @@ class ITextKeyBehavior extends ITextBehavior {
25166
25271
  this._moveCursorUpOrDown('Down', e);
25167
25272
  }
25168
25273
 
25169
- /**
25170
- * Moves cursor up
25171
- * @param {KeyboardEvent} e Event object
25274
+ /**
25275
+ * Moves cursor up
25276
+ * @param {KeyboardEvent} e Event object
25172
25277
  */
25173
25278
  moveCursorUp(e) {
25174
25279
  if (this.selectionStart === 0 && this.selectionEnd === 0) {
@@ -25177,10 +25282,10 @@ class ITextKeyBehavior extends ITextBehavior {
25177
25282
  this._moveCursorUpOrDown('Up', e);
25178
25283
  }
25179
25284
 
25180
- /**
25181
- * Moves cursor up or down, fires the events
25182
- * @param {String} direction 'Up' or 'Down'
25183
- * @param {KeyboardEvent} e Event object
25285
+ /**
25286
+ * Moves cursor up or down, fires the events
25287
+ * @param {String} direction 'Up' or 'Down'
25288
+ * @param {KeyboardEvent} e Event object
25184
25289
  */
25185
25290
  _moveCursorUpOrDown(direction, e) {
25186
25291
  const offset = this[`get${direction}CursorOffset`](e, this._selectionDirection === RIGHT);
@@ -25202,9 +25307,9 @@ class ITextKeyBehavior extends ITextBehavior {
25202
25307
  }
25203
25308
  }
25204
25309
 
25205
- /**
25206
- * Moves cursor with shift
25207
- * @param {Number} offset
25310
+ /**
25311
+ * Moves cursor with shift
25312
+ * @param {Number} offset
25208
25313
  */
25209
25314
  moveCursorWithShift(offset) {
25210
25315
  const newSelection = this._selectionDirection === LEFT ? this.selectionStart + offset : this.selectionEnd + offset;
@@ -25212,9 +25317,9 @@ class ITextKeyBehavior extends ITextBehavior {
25212
25317
  return offset !== 0;
25213
25318
  }
25214
25319
 
25215
- /**
25216
- * Moves cursor up without shift
25217
- * @param {Number} offset
25320
+ /**
25321
+ * Moves cursor up without shift
25322
+ * @param {Number} offset
25218
25323
  */
25219
25324
  moveCursorWithoutShift(offset) {
25220
25325
  if (offset < 0) {
@@ -25227,9 +25332,9 @@ class ITextKeyBehavior extends ITextBehavior {
25227
25332
  return offset !== 0;
25228
25333
  }
25229
25334
 
25230
- /**
25231
- * Moves cursor left
25232
- * @param {KeyboardEvent} e Event object
25335
+ /**
25336
+ * Moves cursor left
25337
+ * @param {KeyboardEvent} e Event object
25233
25338
  */
25234
25339
  moveCursorLeft(e) {
25235
25340
  if (this.selectionStart === 0 && this.selectionEnd === 0) {
@@ -25238,11 +25343,11 @@ class ITextKeyBehavior extends ITextBehavior {
25238
25343
  this._moveCursorLeftOrRight('Left', e);
25239
25344
  }
25240
25345
 
25241
- /**
25242
- * @private
25243
- * @return {Boolean} true if a change happened
25244
- *
25245
- * @todo refactor not to use method name composition
25346
+ /**
25347
+ * @private
25348
+ * @return {Boolean} true if a change happened
25349
+ *
25350
+ * @todo refactor not to use method name composition
25246
25351
  */
25247
25352
  _move(e, prop, direction) {
25248
25353
  let newValue;
@@ -25261,23 +25366,23 @@ class ITextKeyBehavior extends ITextBehavior {
25261
25366
  return false;
25262
25367
  }
25263
25368
 
25264
- /**
25265
- * @private
25369
+ /**
25370
+ * @private
25266
25371
  */
25267
25372
  _moveLeft(e, prop) {
25268
25373
  return this._move(e, prop, 'Left');
25269
25374
  }
25270
25375
 
25271
- /**
25272
- * @private
25376
+ /**
25377
+ * @private
25273
25378
  */
25274
25379
  _moveRight(e, prop) {
25275
25380
  return this._move(e, prop, 'Right');
25276
25381
  }
25277
25382
 
25278
- /**
25279
- * Moves cursor left without keeping selection
25280
- * @param {KeyboardEvent} e
25383
+ /**
25384
+ * Moves cursor left without keeping selection
25385
+ * @param {KeyboardEvent} e
25281
25386
  */
25282
25387
  moveCursorLeftWithoutShift(e) {
25283
25388
  let change = true;
@@ -25292,9 +25397,9 @@ class ITextKeyBehavior extends ITextBehavior {
25292
25397
  return change;
25293
25398
  }
25294
25399
 
25295
- /**
25296
- * Moves cursor left while keeping selection
25297
- * @param {KeyboardEvent} e
25400
+ /**
25401
+ * Moves cursor left while keeping selection
25402
+ * @param {KeyboardEvent} e
25298
25403
  */
25299
25404
  moveCursorLeftWithShift(e) {
25300
25405
  if (this._selectionDirection === RIGHT && this.selectionStart !== this.selectionEnd) {
@@ -25305,9 +25410,9 @@ class ITextKeyBehavior extends ITextBehavior {
25305
25410
  }
25306
25411
  }
25307
25412
 
25308
- /**
25309
- * Moves cursor right
25310
- * @param {KeyboardEvent} e Event object
25413
+ /**
25414
+ * Moves cursor right
25415
+ * @param {KeyboardEvent} e Event object
25311
25416
  */
25312
25417
  moveCursorRight(e) {
25313
25418
  if (this.selectionStart >= this._text.length && this.selectionEnd >= this._text.length) {
@@ -25316,10 +25421,10 @@ class ITextKeyBehavior extends ITextBehavior {
25316
25421
  this._moveCursorLeftOrRight('Right', e);
25317
25422
  }
25318
25423
 
25319
- /**
25320
- * Moves cursor right or Left, fires event
25321
- * @param {String} direction 'Left', 'Right'
25322
- * @param {KeyboardEvent} e Event object
25424
+ /**
25425
+ * Moves cursor right or Left, fires event
25426
+ * @param {String} direction 'Left', 'Right'
25427
+ * @param {KeyboardEvent} e Event object
25323
25428
  */
25324
25429
  _moveCursorLeftOrRight(direction, e) {
25325
25430
  const actionName = `moveCursor${direction}${e.shiftKey ? 'WithShift' : 'WithoutShift'}`;
@@ -25334,9 +25439,9 @@ class ITextKeyBehavior extends ITextBehavior {
25334
25439
  }
25335
25440
  }
25336
25441
 
25337
- /**
25338
- * Moves cursor right while keeping selection
25339
- * @param {KeyboardEvent} e
25442
+ /**
25443
+ * Moves cursor right while keeping selection
25444
+ * @param {KeyboardEvent} e
25340
25445
  */
25341
25446
  moveCursorRightWithShift(e) {
25342
25447
  if (this._selectionDirection === LEFT && this.selectionStart !== this.selectionEnd) {
@@ -25347,9 +25452,9 @@ class ITextKeyBehavior extends ITextBehavior {
25347
25452
  }
25348
25453
  }
25349
25454
 
25350
- /**
25351
- * Moves cursor right without keeping selection
25352
- * @param {KeyboardEvent} e Event object
25455
+ /**
25456
+ * Moves cursor right without keeping selection
25457
+ * @param {KeyboardEvent} e Event object
25353
25458
  */
25354
25459
  moveCursorRightWithoutShift(e) {
25355
25460
  let changed = true;
@@ -25364,8 +25469,8 @@ class ITextKeyBehavior extends ITextBehavior {
25364
25469
  }
25365
25470
  }
25366
25471
 
25367
- /**
25368
- * `LEFT_CLICK === 0`
25472
+ /**
25473
+ * `LEFT_CLICK === 0`
25369
25474
  */
25370
25475
  const notALeftClick = e => !!e.button;
25371
25476
  class ITextClickBehavior extends ITextKeyBehavior {
@@ -25383,36 +25488,36 @@ class ITextClickBehavior extends ITextKeyBehavior {
25383
25488
  super.initBehavior();
25384
25489
  }
25385
25490
 
25386
- /**
25387
- * If this method returns true a mouse move operation over a text selection
25388
- * will not prevent the native mouse event allowing the browser to start a drag operation.
25389
- * shouldStartDragging can be read 'do not prevent default for mouse move event'
25390
- * To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
25391
- * @returns
25491
+ /**
25492
+ * If this method returns true a mouse move operation over a text selection
25493
+ * will not prevent the native mouse event allowing the browser to start a drag operation.
25494
+ * shouldStartDragging can be read 'do not prevent default for mouse move event'
25495
+ * To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
25496
+ * @returns
25392
25497
  */
25393
25498
  shouldStartDragging() {
25394
25499
  return this.draggableTextDelegate.isActive();
25395
25500
  }
25396
25501
 
25397
- /**
25398
- * @public override this method to control whether instance should/shouldn't become a drag source,
25399
- * @see also {@link DraggableTextDelegate#isActive}
25400
- * To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
25401
- * @returns {boolean} should handle event
25502
+ /**
25503
+ * @public override this method to control whether instance should/shouldn't become a drag source,
25504
+ * @see also {@link DraggableTextDelegate#isActive}
25505
+ * To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
25506
+ * @returns {boolean} should handle event
25402
25507
  */
25403
25508
  onDragStart(e) {
25404
25509
  return this.draggableTextDelegate.onDragStart(e);
25405
25510
  }
25406
25511
 
25407
- /**
25408
- * @public override this method to control whether instance should/shouldn't become a drop target
25512
+ /**
25513
+ * @public override this method to control whether instance should/shouldn't become a drop target
25409
25514
  */
25410
25515
  canDrop(e) {
25411
25516
  return this.draggableTextDelegate.canDrop(e);
25412
25517
  }
25413
25518
 
25414
- /**
25415
- * Default handler for double click, select a word or enter overlay editing
25519
+ /**
25520
+ * Default handler for double click, select a word or enter overlay editing
25416
25521
  */
25417
25522
  doubleClickHandler(options) {
25418
25523
  // Check if we should enter overlay editing mode
@@ -25429,8 +25534,8 @@ class ITextClickBehavior extends ITextKeyBehavior {
25429
25534
  this.renderCursorOrSelection();
25430
25535
  }
25431
25536
 
25432
- /**
25433
- * Default handler for triple click, select a line
25537
+ /**
25538
+ * Default handler for triple click, select a line
25434
25539
  */
25435
25540
  tripleClickHandler(options) {
25436
25541
  if (!this.isEditing) {
@@ -25440,13 +25545,13 @@ class ITextClickBehavior extends ITextKeyBehavior {
25440
25545
  this.renderCursorOrSelection();
25441
25546
  }
25442
25547
 
25443
- /**
25444
- * Default event handler for the basic functionalities needed on _mouseDown
25445
- * can be overridden to do something different.
25446
- * Scope of this implementation is: find the click position, set selectionStart
25447
- * find selectionEnd, initialize the drawing of either cursor or selection area
25448
- * initializing a mousedDown on a text area will cancel fabricjs knowledge of
25449
- * current compositionMode. It will be set to false.
25548
+ /**
25549
+ * Default event handler for the basic functionalities needed on _mouseDown
25550
+ * can be overridden to do something different.
25551
+ * Scope of this implementation is: find the click position, set selectionStart
25552
+ * find selectionEnd, initialize the drawing of either cursor or selection area
25553
+ * initializing a mousedDown on a text area will cancel fabricjs knowledge of
25554
+ * current compositionMode. It will be set to false.
25450
25555
  */
25451
25556
  _mouseDownHandler(_ref) {
25452
25557
  let {
@@ -25474,9 +25579,9 @@ class ITextClickBehavior extends ITextKeyBehavior {
25474
25579
  this.selected || (this.selected = alreadySelected || this.isEditing);
25475
25580
  }
25476
25581
 
25477
- /**
25478
- * standard handler for mouse up, overridable
25479
- * @private
25582
+ /**
25583
+ * standard handler for mouse up, overridable
25584
+ * @private
25480
25585
  */
25481
25586
  mouseUpHandler(_ref2) {
25482
25587
  let {
@@ -25507,9 +25612,9 @@ class ITextClickBehavior extends ITextKeyBehavior {
25507
25612
  }
25508
25613
  }
25509
25614
 
25510
- /**
25511
- * Changes cursor location in a text depending on passed pointer (x/y) object
25512
- * @param {TPointerEvent} e Event object
25615
+ /**
25616
+ * Changes cursor location in a text depending on passed pointer (x/y) object
25617
+ * @param {TPointerEvent} e Event object
25513
25618
  */
25514
25619
  setCursorByClick(e) {
25515
25620
  const newSelection = this.getSelectionStartFromPointer(e),
@@ -25527,10 +25632,10 @@ class ITextClickBehavior extends ITextKeyBehavior {
25527
25632
  }
25528
25633
  }
25529
25634
 
25530
- /**
25531
- * Returns index of a character corresponding to where an object was clicked
25532
- * @param {TPointerEvent} e Event object
25533
- * @return {Number} Index of a character
25635
+ /**
25636
+ * Returns index of a character corresponding to where an object was clicked
25637
+ * @param {TPointerEvent} e Event object
25638
+ * @return {Number} Index of a character
25534
25639
  */
25535
25640
  getSelectionStartFromPointer(e) {
25536
25641
  const mouseOffset = this.canvas.getScenePoint(e).transform(invertTransform(this.calcTransformMatrix())).add(new Point(-this._getLeftOffset(), -this._getTopOffset()));
@@ -25576,15 +25681,15 @@ class ITextClickBehavior extends ITextKeyBehavior {
25576
25681
  }
25577
25682
  }
25578
25683
 
25579
- /**
25580
- * Hit Testing and Cursor Positioning System
25581
- *
25582
- * Maps pointer coordinates to text positions and provides cursor rectangles
25583
- * for interactive text editing with grapheme-aware boundaries.
25684
+ /**
25685
+ * Hit Testing and Cursor Positioning System
25686
+ *
25687
+ * Maps pointer coordinates to text positions and provides cursor rectangles
25688
+ * for interactive text editing with grapheme-aware boundaries.
25584
25689
  */
25585
25690
 
25586
- /**
25587
- * Hit test a point against laid out text to find insertion position
25691
+ /**
25692
+ * Hit test a point against laid out text to find insertion position
25588
25693
  */
25589
25694
  function hitTest(x, y, layout, options) {
25590
25695
  if (layout.lines.length === 0) {
@@ -25628,8 +25733,8 @@ function hitTest(x, y, layout, options) {
25628
25733
  };
25629
25734
  }
25630
25735
 
25631
- /**
25632
- * Get cursor rectangle for a given insertion index
25736
+ /**
25737
+ * Get cursor rectangle for a given insertion index
25633
25738
  */
25634
25739
  function getCursorRect(insertionIndex, layout, options) {
25635
25740
  if (layout.lines.length === 0) {
@@ -25676,8 +25781,8 @@ function getCursorRect(insertionIndex, layout, options) {
25676
25781
 
25677
25782
  // Private helper functions
25678
25783
 
25679
- /**
25680
- * Find which line contains the given Y coordinate
25784
+ /**
25785
+ * Find which line contains the given Y coordinate
25681
25786
  */
25682
25787
  function findLineAtY(y, lines) {
25683
25788
  var _lines;
@@ -25700,8 +25805,8 @@ function findLineAtY(y, lines) {
25700
25805
  };
25701
25806
  }
25702
25807
 
25703
- /**
25704
- * Find character position within a line at given X coordinate
25808
+ /**
25809
+ * Find character position within a line at given X coordinate
25705
25810
  */
25706
25811
  function findCharAtX(x, line, options) {
25707
25812
  if (line.bounds.length === 0) {
@@ -25807,8 +25912,8 @@ function findCharAtX(x, line, options) {
25807
25912
  };
25808
25913
  }
25809
25914
 
25810
- /**
25811
- * Calculate total insertion index from line and character indices
25915
+ /**
25916
+ * Calculate total insertion index from line and character indices
25812
25917
  */
25813
25918
  function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
25814
25919
  let insertionIndex = 0;
@@ -25827,8 +25932,8 @@ function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
25827
25932
  return insertionIndex;
25828
25933
  }
25829
25934
 
25830
- /**
25831
- * Find line and grapheme position from insertion index
25935
+ /**
25936
+ * Find line and grapheme position from insertion index
25832
25937
  */
25833
25938
  function findPositionFromIndex(insertionIndex, layout) {
25834
25939
  let currentIndex = 0;
@@ -25870,8 +25975,8 @@ function findPositionFromIndex(insertionIndex, layout) {
25870
25975
  };
25871
25976
  }
25872
25977
 
25873
- /**
25874
- * Calculate Y position of a line
25978
+ /**
25979
+ * Calculate Y position of a line
25875
25980
  */
25876
25981
  function calculateLineY(lineIndex, layout, options) {
25877
25982
  let y = 0;
@@ -25974,48 +26079,48 @@ const iTextDefaultValues = {
25974
26079
 
25975
26080
  // @TODO this is not complete
25976
26081
 
25977
- /**
25978
- * @fires changed
25979
- * @fires selection:changed
25980
- * @fires editing:entered
25981
- * @fires editing:exited
25982
- * @fires dragstart
25983
- * @fires drag drag event firing on the drag source
25984
- * @fires dragend
25985
- * @fires copy
25986
- * @fires cut
25987
- * @fires paste
25988
- *
25989
- * #### Supported key combinations
25990
- * ```
25991
- * Move cursor: left, right, up, down
25992
- * Select character: shift + left, shift + right
25993
- * Select text vertically: shift + up, shift + down
25994
- * Move cursor by word: alt + left, alt + right
25995
- * Select words: shift + alt + left, shift + alt + right
25996
- * Move cursor to line start/end: cmd + left, cmd + right or home, end
25997
- * Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
25998
- * Jump to start/end of text: cmd + up, cmd + down
25999
- * Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
26000
- * Delete character: backspace
26001
- * Delete word: alt + backspace
26002
- * Delete line: cmd + backspace
26003
- * Forward delete: delete
26004
- * Copy text: ctrl/cmd + c
26005
- * Paste text: ctrl/cmd + v
26006
- * Cut text: ctrl/cmd + x
26007
- * Select entire text: ctrl/cmd + a
26008
- * Quit editing tab or esc
26009
- * ```
26010
- *
26011
- * #### Supported mouse/touch combination
26012
- * ```
26013
- * Position cursor: click/touch
26014
- * Create selection: click/touch & drag
26015
- * Create selection: click & shift + click
26016
- * Select word: double click
26017
- * Select line: triple click
26018
- * ```
26082
+ /**
26083
+ * @fires changed
26084
+ * @fires selection:changed
26085
+ * @fires editing:entered
26086
+ * @fires editing:exited
26087
+ * @fires dragstart
26088
+ * @fires drag drag event firing on the drag source
26089
+ * @fires dragend
26090
+ * @fires copy
26091
+ * @fires cut
26092
+ * @fires paste
26093
+ *
26094
+ * #### Supported key combinations
26095
+ * ```
26096
+ * Move cursor: left, right, up, down
26097
+ * Select character: shift + left, shift + right
26098
+ * Select text vertically: shift + up, shift + down
26099
+ * Move cursor by word: alt + left, alt + right
26100
+ * Select words: shift + alt + left, shift + alt + right
26101
+ * Move cursor to line start/end: cmd + left, cmd + right or home, end
26102
+ * Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
26103
+ * Jump to start/end of text: cmd + up, cmd + down
26104
+ * Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
26105
+ * Delete character: backspace
26106
+ * Delete word: alt + backspace
26107
+ * Delete line: cmd + backspace
26108
+ * Forward delete: delete
26109
+ * Copy text: ctrl/cmd + c
26110
+ * Paste text: ctrl/cmd + v
26111
+ * Cut text: ctrl/cmd + x
26112
+ * Select entire text: ctrl/cmd + a
26113
+ * Quit editing tab or esc
26114
+ * ```
26115
+ *
26116
+ * #### Supported mouse/touch combination
26117
+ * ```
26118
+ * Position cursor: click/touch
26119
+ * Create selection: click/touch & drag
26120
+ * Create selection: click & shift + click
26121
+ * Select word: double click
26122
+ * Select line: triple click
26123
+ * ```
26019
26124
  */
26020
26125
  class IText extends ITextClickBehavior {
26021
26126
  static getDefaults() {
@@ -26030,10 +26135,10 @@ class IText extends ITextClickBehavior {
26030
26135
  return type === 'itext' ? 'i-text' : type;
26031
26136
  }
26032
26137
 
26033
- /**
26034
- * Constructor
26035
- * @param {String} text Text string
26036
- * @param {Object} [options] Options object
26138
+ /**
26139
+ * Constructor
26140
+ * @param {String} text Text string
26141
+ * @param {Object} [options] Options object
26037
26142
  */
26038
26143
  constructor(text, options) {
26039
26144
  super(text, {
@@ -26043,11 +26148,11 @@ class IText extends ITextClickBehavior {
26043
26148
  this.initBehavior();
26044
26149
  }
26045
26150
 
26046
- /**
26047
- * While editing handle differently
26048
- * @private
26049
- * @param {string} key
26050
- * @param {*} value
26151
+ /**
26152
+ * While editing handle differently
26153
+ * @private
26154
+ * @param {string} key
26155
+ * @param {*} value
26051
26156
  */
26052
26157
  _set(key, value) {
26053
26158
  if (this.isEditing && this._savedProps && key in this._savedProps) {
@@ -26062,28 +26167,28 @@ class IText extends ITextClickBehavior {
26062
26167
  return super._set(key, value);
26063
26168
  }
26064
26169
 
26065
- /**
26066
- * Sets selection start (left boundary of a selection)
26067
- * @param {Number} index Index to set selection start to
26170
+ /**
26171
+ * Sets selection start (left boundary of a selection)
26172
+ * @param {Number} index Index to set selection start to
26068
26173
  */
26069
26174
  setSelectionStart(index) {
26070
26175
  index = Math.max(index, 0);
26071
26176
  this._updateAndFire('selectionStart', index);
26072
26177
  }
26073
26178
 
26074
- /**
26075
- * Sets selection end (right boundary of a selection)
26076
- * @param {Number} index Index to set selection end to
26179
+ /**
26180
+ * Sets selection end (right boundary of a selection)
26181
+ * @param {Number} index Index to set selection end to
26077
26182
  */
26078
26183
  setSelectionEnd(index) {
26079
26184
  index = Math.min(index, this.text.length);
26080
26185
  this._updateAndFire('selectionEnd', index);
26081
26186
  }
26082
26187
 
26083
- /**
26084
- * @private
26085
- * @param {String} property 'selectionStart' or 'selectionEnd'
26086
- * @param {Number} index new position of property
26188
+ /**
26189
+ * @private
26190
+ * @param {String} property 'selectionStart' or 'selectionEnd'
26191
+ * @param {Number} index new position of property
26087
26192
  */
26088
26193
  _updateAndFire(property, index) {
26089
26194
  if (this[property] !== index) {
@@ -26093,9 +26198,9 @@ class IText extends ITextClickBehavior {
26093
26198
  this._updateTextarea();
26094
26199
  }
26095
26200
 
26096
- /**
26097
- * Fires the even of selection changed
26098
- * @private
26201
+ /**
26202
+ * Fires the even of selection changed
26203
+ * @private
26099
26204
  */
26100
26205
  _fireSelectionChanged() {
26101
26206
  this.fire('selection:changed');
@@ -26104,25 +26209,25 @@ class IText extends ITextClickBehavior {
26104
26209
  });
26105
26210
  }
26106
26211
 
26107
- /**
26108
- * Initialize text dimensions. Render all text on given context
26109
- * or on a offscreen canvas to get the text width with measureText.
26110
- * Updates this.width and this.height with the proper values.
26111
- * Does not return dimensions.
26112
- * @private
26212
+ /**
26213
+ * Initialize text dimensions. Render all text on given context
26214
+ * or on a offscreen canvas to get the text width with measureText.
26215
+ * Updates this.width and this.height with the proper values.
26216
+ * Does not return dimensions.
26217
+ * @private
26113
26218
  */
26114
26219
  initDimensions() {
26115
26220
  this.isEditing && this.initDelayedCursor();
26116
26221
  super.initDimensions();
26117
26222
  }
26118
26223
 
26119
- /**
26120
- * Gets style of a current selection/cursor (at the start position)
26121
- * if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
26122
- * @param {Number} startIndex Start index to get styles at
26123
- * @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
26124
- * @param {Boolean} [complete] get full style or not
26125
- * @return {Array} styles an array with one, zero or more Style objects
26224
+ /**
26225
+ * Gets style of a current selection/cursor (at the start position)
26226
+ * if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
26227
+ * @param {Number} startIndex Start index to get styles at
26228
+ * @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
26229
+ * @param {Boolean} [complete] get full style or not
26230
+ * @return {Array} styles an array with one, zero or more Style objects
26126
26231
  */
26127
26232
  getSelectionStyles() {
26128
26233
  let startIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart || 0;
@@ -26131,11 +26236,11 @@ class IText extends ITextClickBehavior {
26131
26236
  return super.getSelectionStyles(startIndex, endIndex, complete);
26132
26237
  }
26133
26238
 
26134
- /**
26135
- * Sets style of a current selection, if no selection exist, do not set anything.
26136
- * @param {Object} [styles] Styles object
26137
- * @param {Number} [startIndex] Start index to get styles at
26138
- * @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
26239
+ /**
26240
+ * Sets style of a current selection, if no selection exist, do not set anything.
26241
+ * @param {Object} [styles] Styles object
26242
+ * @param {Number} [startIndex] Start index to get styles at
26243
+ * @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
26139
26244
  */
26140
26245
  setSelectionStyles(styles) {
26141
26246
  let startIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selectionStart || 0;
@@ -26143,10 +26248,10 @@ class IText extends ITextClickBehavior {
26143
26248
  return super.setSelectionStyles(styles, startIndex, endIndex);
26144
26249
  }
26145
26250
 
26146
- /**
26147
- * Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
26148
- * @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
26149
- * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
26251
+ /**
26252
+ * Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
26253
+ * @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
26254
+ * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
26150
26255
  */
26151
26256
  get2DCursorLocation() {
26152
26257
  let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
@@ -26154,9 +26259,9 @@ class IText extends ITextClickBehavior {
26154
26259
  return super.get2DCursorLocation(selectionStart, skipWrapping);
26155
26260
  }
26156
26261
 
26157
- /**
26158
- * @private
26159
- * @param {CanvasRenderingContext2D} ctx Context to render on
26262
+ /**
26263
+ * @private
26264
+ * @param {CanvasRenderingContext2D} ctx Context to render on
26160
26265
  */
26161
26266
  render(ctx) {
26162
26267
  super.render(ctx);
@@ -26166,9 +26271,9 @@ class IText extends ITextClickBehavior {
26166
26271
  this.renderCursorOrSelection();
26167
26272
  }
26168
26273
 
26169
- /**
26170
- * @override block cursor/selection logic while rendering the exported canvas
26171
- * @todo this workaround should be replaced with a more robust solution
26274
+ /**
26275
+ * @override block cursor/selection logic while rendering the exported canvas
26276
+ * @todo this workaround should be replaced with a more robust solution
26172
26277
  */
26173
26278
  toCanvasElement(options) {
26174
26279
  const isEditing = this.isEditing;
@@ -26178,9 +26283,9 @@ class IText extends ITextClickBehavior {
26178
26283
  return canvas;
26179
26284
  }
26180
26285
 
26181
- /**
26182
- * Renders cursor or selection (depending on what exists)
26183
- * it does on the contextTop. If contextTop is not available, do nothing.
26286
+ /**
26287
+ * Renders cursor or selection (depending on what exists)
26288
+ * it does on the contextTop. If contextTop is not available, do nothing.
26184
26289
  */
26185
26290
  renderCursorOrSelection() {
26186
26291
  if (!this.isEditing || !this.canvas) {
@@ -26236,12 +26341,12 @@ class IText extends ITextClickBehavior {
26236
26341
  ctx.restore();
26237
26342
  }
26238
26343
 
26239
- /**
26240
- * Finds and returns an array of clip paths that are applied to the parent
26241
- * group(s) of the current FabricObject instance. The object's hierarchy is
26242
- * traversed upwards (from the current object towards the root of the canvas),
26243
- * checking each parent object for the presence of a `clipPath` that is not
26244
- * absolutely positioned.
26344
+ /**
26345
+ * Finds and returns an array of clip paths that are applied to the parent
26346
+ * group(s) of the current FabricObject instance. The object's hierarchy is
26347
+ * traversed upwards (from the current object towards the root of the canvas),
26348
+ * checking each parent object for the presence of a `clipPath` that is not
26349
+ * absolutely positioned.
26245
26350
  */
26246
26351
  findAncestorsWithClipPath() {
26247
26352
  const clipPathAncestors = [];
@@ -26256,13 +26361,13 @@ class IText extends ITextClickBehavior {
26256
26361
  return clipPathAncestors;
26257
26362
  }
26258
26363
 
26259
- /**
26260
- * Returns cursor boundaries (left, top, leftOffset, topOffset)
26261
- * left/top are left/top of entire text box
26262
- * leftOffset/topOffset are offset from that left/top point of a text box
26263
- * @private
26264
- * @param {number} [index] index from start
26265
- * @param {boolean} [skipCaching]
26364
+ /**
26365
+ * Returns cursor boundaries (left, top, leftOffset, topOffset)
26366
+ * left/top are left/top of entire text box
26367
+ * leftOffset/topOffset are offset from that left/top point of a text box
26368
+ * @private
26369
+ * @param {number} [index] index from start
26370
+ * @param {boolean} [skipCaching]
26266
26371
  */
26267
26372
  _getCursorBoundaries() {
26268
26373
  let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
@@ -26276,11 +26381,11 @@ class IText extends ITextClickBehavior {
26276
26381
  return this._getCursorBoundariesOriginal(index, skipCaching);
26277
26382
  }
26278
26383
 
26279
- /**
26280
- * Caches and returns cursor left/top offset relative to instance's center point
26281
- * @private
26282
- * @param {number} index index from start
26283
- * @param {boolean} [skipCaching]
26384
+ /**
26385
+ * Caches and returns cursor left/top offset relative to instance's center point
26386
+ * @private
26387
+ * @param {number} index index from start
26388
+ * @param {boolean} [skipCaching]
26284
26389
  */
26285
26390
  _getCursorBoundariesOffsets(index, skipCaching) {
26286
26391
  if (skipCaching) {
@@ -26292,9 +26397,9 @@ class IText extends ITextClickBehavior {
26292
26397
  return this.cursorOffsetCache = this.__getCursorBoundariesOffsets(index);
26293
26398
  }
26294
26399
 
26295
- /**
26296
- * Enhanced cursor boundaries using advanced hit testing when available
26297
- * @private
26400
+ /**
26401
+ * Enhanced cursor boundaries using advanced hit testing when available
26402
+ * @private
26298
26403
  */
26299
26404
  _getCursorBoundariesAdvanced(index) {
26300
26405
  if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
@@ -26310,9 +26415,9 @@ class IText extends ITextClickBehavior {
26310
26415
  };
26311
26416
  }
26312
26417
 
26313
- /**
26314
- * Enhanced selection start from pointer using BiDi-aware hit testing
26315
- * @override
26418
+ /**
26419
+ * Enhanced selection start from pointer using BiDi-aware hit testing
26420
+ * @override
26316
26421
  */
26317
26422
  getSelectionStartFromPointer(e) {
26318
26423
  if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
@@ -26326,9 +26431,9 @@ class IText extends ITextClickBehavior {
26326
26431
  return Math.min(hitResult.charIndex, this._text.length);
26327
26432
  }
26328
26433
 
26329
- /**
26330
- * Original cursor boundaries implementation
26331
- * @private
26434
+ /**
26435
+ * Original cursor boundaries implementation
26436
+ * @private
26332
26437
  */
26333
26438
  _getCursorBoundariesOriginal(index, skipCaching) {
26334
26439
  const left = this._getLeftOffset(),
@@ -26342,10 +26447,10 @@ class IText extends ITextClickBehavior {
26342
26447
  };
26343
26448
  }
26344
26449
 
26345
- /**
26346
- * Calculates cursor left/top offset relative to instance's center point
26347
- * @private
26348
- * @param {number} index index from start
26450
+ /**
26451
+ * Calculates cursor left/top offset relative to instance's center point
26452
+ * @private
26453
+ * @param {number} index index from start
26349
26454
  */
26350
26455
  __getCursorBoundariesOffsets(index) {
26351
26456
  let topOffset = 0,
@@ -26379,29 +26484,29 @@ class IText extends ITextClickBehavior {
26379
26484
  return boundaries;
26380
26485
  }
26381
26486
 
26382
- /**
26383
- * Renders cursor on context Top, outside the animation cycle, on request
26384
- * Used for the drag/drop effect.
26385
- * If contextTop is not available, do nothing.
26487
+ /**
26488
+ * Renders cursor on context Top, outside the animation cycle, on request
26489
+ * Used for the drag/drop effect.
26490
+ * If contextTop is not available, do nothing.
26386
26491
  */
26387
26492
  renderCursorAt(selectionStart) {
26388
26493
  this._renderCursor(this.canvas.contextTop, this._getCursorBoundaries(selectionStart, true), selectionStart);
26389
26494
  }
26390
26495
 
26391
- /**
26392
- * Renders cursor
26393
- * @param {Object} boundaries
26394
- * @param {CanvasRenderingContext2D} ctx transformed context to draw on
26496
+ /**
26497
+ * Renders cursor
26498
+ * @param {Object} boundaries
26499
+ * @param {CanvasRenderingContext2D} ctx transformed context to draw on
26395
26500
  */
26396
26501
  renderCursor(ctx, boundaries) {
26397
26502
  this._renderCursor(ctx, boundaries, this.selectionStart);
26398
26503
  }
26399
26504
 
26400
- /**
26401
- * Return the data needed to render the cursor for given selection start
26402
- * The left,top are relative to the object, while width and height are prescaled
26403
- * to look think with canvas zoom and object scaling,
26404
- * so they depend on canvas and object scaling
26505
+ /**
26506
+ * Return the data needed to render the cursor for given selection start
26507
+ * The left,top are relative to the object, while width and height are prescaled
26508
+ * to look think with canvas zoom and object scaling,
26509
+ * so they depend on canvas and object scaling
26405
26510
  */
26406
26511
  getCursorRenderingData() {
26407
26512
  let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
@@ -26424,9 +26529,9 @@ class IText extends ITextClickBehavior {
26424
26529
  };
26425
26530
  }
26426
26531
 
26427
- /**
26428
- * Render the cursor at the given selectionStart.
26429
- * @param {CanvasRenderingContext2D} ctx transformed context to draw on
26532
+ /**
26533
+ * Render the cursor at the given selectionStart.
26534
+ * @param {CanvasRenderingContext2D} ctx transformed context to draw on
26430
26535
  */
26431
26536
  _renderCursor(ctx, boundaries, selectionStart) {
26432
26537
  const {
@@ -26442,10 +26547,10 @@ class IText extends ITextClickBehavior {
26442
26547
  ctx.fillRect(left, top, width, height);
26443
26548
  }
26444
26549
 
26445
- /**
26446
- * Renders text selection
26447
- * @param {Object} boundaries Object with left/top/leftOffset/topOffset
26448
- * @param {CanvasRenderingContext2D} ctx transformed context to draw on
26550
+ /**
26551
+ * Renders text selection
26552
+ * @param {Object} boundaries Object with left/top/leftOffset/topOffset
26553
+ * @param {CanvasRenderingContext2D} ctx transformed context to draw on
26449
26554
  */
26450
26555
  renderSelection(ctx, boundaries) {
26451
26556
  const selection = {
@@ -26455,8 +26560,8 @@ class IText extends ITextClickBehavior {
26455
26560
  this._renderSelection(ctx, selection, boundaries);
26456
26561
  }
26457
26562
 
26458
- /**
26459
- * Renders drag start text selection
26563
+ /**
26564
+ * Renders drag start text selection
26460
26565
  */
26461
26566
  renderDragSourceEffect() {
26462
26567
  const dragStartSelection = this.draggableTextDelegate.getDragStartSelection();
@@ -26467,12 +26572,12 @@ class IText extends ITextClickBehavior {
26467
26572
  this.renderCursorAt(dragSelection);
26468
26573
  }
26469
26574
 
26470
- /**
26471
- * Renders text selection
26472
- * @private
26473
- * @param {{ selectionStart: number, selectionEnd: number }} selection
26474
- * @param {Object} boundaries Object with left/top/leftOffset/topOffset
26475
- * @param {CanvasRenderingContext2D} ctx transformed context to draw on
26575
+ /**
26576
+ * Renders text selection
26577
+ * @private
26578
+ * @param {{ selectionStart: number, selectionEnd: number }} selection
26579
+ * @param {Object} boundaries Object with left/top/leftOffset/topOffset
26580
+ * @param {CanvasRenderingContext2D} ctx transformed context to draw on
26476
26581
  */
26477
26582
  _renderSelection(ctx, selection, boundaries) {
26478
26583
  const selectionStart = selection.selectionStart,
@@ -26534,34 +26639,34 @@ class IText extends ITextClickBehavior {
26534
26639
  }
26535
26640
  }
26536
26641
 
26537
- /**
26538
- * High level function to know the height of the cursor.
26539
- * the currentChar is the one that precedes the cursor
26540
- * Returns fontSize of char at the current cursor
26541
- * Unused from the library, is for the end user
26542
- * @return {Number} Character font size
26642
+ /**
26643
+ * High level function to know the height of the cursor.
26644
+ * the currentChar is the one that precedes the cursor
26645
+ * Returns fontSize of char at the current cursor
26646
+ * Unused from the library, is for the end user
26647
+ * @return {Number} Character font size
26543
26648
  */
26544
26649
  getCurrentCharFontSize() {
26545
26650
  const cp = this._getCurrentCharIndex();
26546
26651
  return this.getValueOfPropertyAt(cp.l, cp.c, 'fontSize');
26547
26652
  }
26548
26653
 
26549
- /**
26550
- * High level function to know the color of the cursor.
26551
- * the currentChar is the one that precedes the cursor
26552
- * Returns color (fill) of char at the current cursor
26553
- * if the text object has a pattern or gradient for filler, it will return that.
26554
- * Unused by the library, is for the end user
26555
- * @return {String | TFiller} Character color (fill)
26654
+ /**
26655
+ * High level function to know the color of the cursor.
26656
+ * the currentChar is the one that precedes the cursor
26657
+ * Returns color (fill) of char at the current cursor
26658
+ * if the text object has a pattern or gradient for filler, it will return that.
26659
+ * Unused by the library, is for the end user
26660
+ * @return {String | TFiller} Character color (fill)
26556
26661
  */
26557
26662
  getCurrentCharColor() {
26558
26663
  const cp = this._getCurrentCharIndex();
26559
26664
  return this.getValueOfPropertyAt(cp.l, cp.c, FILL);
26560
26665
  }
26561
26666
 
26562
- /**
26563
- * Returns the cursor position for the getCurrent.. functions
26564
- * @private
26667
+ /**
26668
+ * Returns the cursor position for the getCurrent.. functions
26669
+ * @private
26565
26670
  */
26566
26671
  _getCurrentCharIndex() {
26567
26672
  const cursorPosition = this.get2DCursorLocation(this.selectionStart, true),
@@ -26577,52 +26682,52 @@ class IText extends ITextClickBehavior {
26577
26682
  super.dispose();
26578
26683
  }
26579
26684
  }
26580
- /**
26581
- * Index where text selection starts (or where cursor is when there is no selection)
26582
- * @type Number
26685
+ /**
26686
+ * Index where text selection starts (or where cursor is when there is no selection)
26687
+ * @type Number
26583
26688
  */
26584
- /**
26585
- * Index where text selection ends
26586
- * @type Number
26689
+ /**
26690
+ * Index where text selection ends
26691
+ * @type Number
26587
26692
  */
26588
- /**
26589
- * Color of text selection
26590
- * @type String
26693
+ /**
26694
+ * Color of text selection
26695
+ * @type String
26591
26696
  */
26592
- /**
26593
- * Indicates whether text is in editing mode
26594
- * @type Boolean
26697
+ /**
26698
+ * Indicates whether text is in editing mode
26699
+ * @type Boolean
26595
26700
  */
26596
- /**
26597
- * Indicates whether a text can be edited
26598
- * @type Boolean
26701
+ /**
26702
+ * Indicates whether a text can be edited
26703
+ * @type Boolean
26599
26704
  */
26600
- /**
26601
- * Border color of text object while it's in editing mode
26602
- * @type String
26705
+ /**
26706
+ * Border color of text object while it's in editing mode
26707
+ * @type String
26603
26708
  */
26604
- /**
26605
- * Width of cursor (in px)
26606
- * @type Number
26709
+ /**
26710
+ * Width of cursor (in px)
26711
+ * @type Number
26607
26712
  */
26608
- /**
26609
- * Color of text cursor color in editing mode.
26610
- * if not set (default) will take color from the text.
26611
- * if set to a color value that fabric can understand, it will
26612
- * be used instead of the color of the text at the current position.
26613
- * @type String
26713
+ /**
26714
+ * Color of text cursor color in editing mode.
26715
+ * if not set (default) will take color from the text.
26716
+ * if set to a color value that fabric can understand, it will
26717
+ * be used instead of the color of the text at the current position.
26718
+ * @type String
26614
26719
  */
26615
- /**
26616
- * Delay between cursor blink (in ms)
26617
- * @type Number
26720
+ /**
26721
+ * Delay between cursor blink (in ms)
26722
+ * @type Number
26618
26723
  */
26619
- /**
26620
- * Duration of cursor fade in (in ms)
26621
- * @type Number
26724
+ /**
26725
+ * Duration of cursor fade in (in ms)
26726
+ * @type Number
26622
26727
  */
26623
- /**
26624
- * Indicates whether internal text char widths can be cached
26625
- * @type Boolean
26728
+ /**
26729
+ * Indicates whether internal text char widths can be cached
26730
+ * @type Boolean
26626
26731
  */
26627
26732
  _defineProperty(IText, "ownDefaults", iTextDefaultValues);
26628
26733
  _defineProperty(IText, "type", 'IText');
@@ -26644,11 +26749,11 @@ const textboxDefaultValues = {
26644
26749
 
26645
26750
  // @TODO this is not complete
26646
26751
 
26647
- /**
26648
- * Textbox class, based on IText, allows the user to resize the text rectangle
26649
- * and wraps lines automatically. Textboxes have their Y scaling locked, the
26650
- * user can only change width. Height is adjusted automatically based on the
26651
- * wrapping of lines.
26752
+ /**
26753
+ * Textbox class, based on IText, allows the user to resize the text rectangle
26754
+ * and wraps lines automatically. Textboxes have their Y scaling locked, the
26755
+ * user can only change width. Height is adjusted automatically based on the
26756
+ * wrapping of lines.
26652
26757
  */
26653
26758
  class Textbox extends IText {
26654
26759
  static getDefaults() {
@@ -26658,10 +26763,10 @@ class Textbox extends IText {
26658
26763
  };
26659
26764
  }
26660
26765
 
26661
- /**
26662
- * Constructor
26663
- * @param {String} text Text string
26664
- * @param {Object} [options] Options object
26766
+ /**
26767
+ * Constructor
26768
+ * @param {String} text Text string
26769
+ * @param {Object} [options] Options object
26665
26770
  */
26666
26771
  constructor(text, options) {
26667
26772
  super(text, {
@@ -26671,10 +26776,10 @@ class Textbox extends IText {
26671
26776
  this.initializeEventListeners();
26672
26777
  }
26673
26778
 
26674
- /**
26675
- * Creates the default control object.
26676
- * If you prefer to have on instance of controls shared among all objects
26677
- * make this function return an empty object and add controls to the ownDefaults object
26779
+ /**
26780
+ * Creates the default control object.
26781
+ * If you prefer to have on instance of controls shared among all objects
26782
+ * make this function return an empty object and add controls to the ownDefaults object
26678
26783
  */
26679
26784
  static createControls() {
26680
26785
  return {
@@ -26682,11 +26787,11 @@ class Textbox extends IText {
26682
26787
  };
26683
26788
  }
26684
26789
 
26685
- /**
26686
- * Unlike superclass's version of this function, Textbox does not update
26687
- * its width.
26688
- * @private
26689
- * @override
26790
+ /**
26791
+ * Unlike superclass's version of this function, Textbox does not update
26792
+ * its width.
26793
+ * @private
26794
+ * @override
26690
26795
  */
26691
26796
  initDimensions() {
26692
26797
  if (!this.initialized) {
@@ -26754,6 +26859,7 @@ class Textbox extends IText {
26754
26859
  if (this._usingBrowserWrapping) {
26755
26860
  this._browserWrapInitialized = true;
26756
26861
  }
26862
+ this.calcTextWidth();
26757
26863
  if (this.textAlign.includes(JUSTIFY)) {
26758
26864
  // For browser wrapping fonts, apply browser-calculated justify spaces
26759
26865
  if (this._usingBrowserWrapping) {
@@ -26762,15 +26868,8 @@ class Textbox extends IText {
26762
26868
  return;
26763
26869
  }
26764
26870
 
26765
- // Don't apply justify alignment during drag operations to prevent snapping
26766
- const now = Date.now();
26767
- const lastDragTime = this._lastInitDimensionsTime || 0;
26768
- const isDuringDrag = now - lastDragTime < 200; // 200ms window for drag detection
26769
-
26770
- if (isDuringDrag) {
26771
- console.log('🔤 Skipping justify during drag operation to prevent snapping');
26772
- return;
26773
- }
26871
+ // Note: Removed drag detection logic that was causing issues
26872
+ // Justify alignment will now apply immediately when needed
26774
26873
 
26775
26874
  // For non-browser-wrapping fonts, use Fabric's justify system
26776
26875
  // once text is measured we need to make space fatter to make justified text.
@@ -26828,11 +26927,40 @@ class Textbox extends IText {
26828
26927
  } else {
26829
26928
  this.height = this.calcTextHeight();
26830
26929
  }
26930
+
26931
+ // Double-check that justify was applied by checking space widths
26932
+ // Skip validation during rapid width changes to prevent interference
26933
+ console.log('🔍 JUSTIFY CHECK:', this.textAlign.includes('justify'), !!this.__charBounds, !this._skipJustifyValidation);
26934
+ if (this.textAlign.includes('justify') && this.__charBounds && !this._skipJustifyValidation) {
26935
+ setTimeout(() => {
26936
+ // Verify justify was applied by checking if space widths vary
26937
+ let hasVariableSpaces = false;
26938
+ this.__charBounds.forEach((lineBounds, i) => {
26939
+ if (lineBounds && this._textLines && this._textLines[i]) {
26940
+ const spaces = lineBounds.filter((bound, j) => /\s/.test(this._textLines[i][j]));
26941
+ if (spaces.length > 1) {
26942
+ const firstSpaceWidth = spaces[0].width;
26943
+ hasVariableSpaces = spaces.some(space => Math.abs(space.width - firstSpaceWidth) > 0.1);
26944
+ }
26945
+ }
26946
+ });
26947
+ if (!hasVariableSpaces && this.__charBounds.length > 0) {
26948
+ console.warn(' ⚠️ Justify spaces still uniform - forcing enlargeSpaces again');
26949
+ if (this.enlargeSpaces) {
26950
+ var _this$canvas3;
26951
+ this.enlargeSpaces();
26952
+ (_this$canvas3 = this.canvas) === null || _this$canvas3 === void 0 || _this$canvas3.requestRenderAll();
26953
+ }
26954
+ } else {
26955
+ console.log(' ✅ Justify spaces properly expanded');
26956
+ }
26957
+ }, 10);
26958
+ }
26831
26959
  }
26832
26960
 
26833
- /**
26834
- * Schedule justify calculation after font loads (Textbox-specific)
26835
- * @private
26961
+ /**
26962
+ * Schedule justify calculation after font loads (Textbox-specific)
26963
+ * @private
26836
26964
  */
26837
26965
  _scheduleJustifyAfterFontLoad() {
26838
26966
  if (typeof document === 'undefined' || !('fonts' in document)) {
@@ -26846,22 +26974,22 @@ class Textbox extends IText {
26846
26974
  this._fontJustifyScheduled = true;
26847
26975
  const fontSpec = `${this.fontSize}px ${this.fontFamily}`;
26848
26976
  document.fonts.load(fontSpec).then(() => {
26849
- var _this$canvas3;
26977
+ var _this$canvas4;
26850
26978
  this._fontJustifyScheduled = false;
26851
26979
  console.log('🔧 Textbox: Font loaded, applying justify alignment');
26852
26980
 
26853
26981
  // Re-run initDimensions to ensure proper justify calculation
26854
26982
  this.initDimensions();
26855
- (_this$canvas3 = this.canvas) === null || _this$canvas3 === void 0 || _this$canvas3.requestRenderAll();
26983
+ (_this$canvas4 = this.canvas) === null || _this$canvas4 === void 0 || _this$canvas4.requestRenderAll();
26856
26984
  }).catch(() => {
26857
26985
  this._fontJustifyScheduled = false;
26858
26986
  console.warn('⚠️ Textbox: Font loading failed, justify may be incorrect');
26859
26987
  });
26860
26988
  }
26861
26989
 
26862
- /**
26863
- * Advanced dimensions calculation using new layout engine
26864
- * @private
26990
+ /**
26991
+ * Advanced dimensions calculation using new layout engine
26992
+ * @private
26865
26993
  */
26866
26994
  initDimensionsAdvanced() {
26867
26995
  if (!this.initialized) {
@@ -26916,9 +27044,9 @@ class Textbox extends IText {
26916
27044
  this.dirty = true;
26917
27045
  }
26918
27046
 
26919
- /**
26920
- * Generate style map from new layout format
26921
- * @private
27047
+ /**
27048
+ * Generate style map from new layout format
27049
+ * @private
26922
27050
  */
26923
27051
  _generateStyleMapFromLayout(layout) {
26924
27052
  const map = {};
@@ -26940,12 +27068,12 @@ class Textbox extends IText {
26940
27068
  return map;
26941
27069
  }
26942
27070
 
26943
- /**
26944
- * Generate an object that translates the style object so that it is
26945
- * broken up by visual lines (new lines and automatic wrapping).
26946
- * The original text styles object is broken up by actual lines (new lines only),
26947
- * which is only sufficient for Text / IText
26948
- * @private
27071
+ /**
27072
+ * Generate an object that translates the style object so that it is
27073
+ * broken up by visual lines (new lines and automatic wrapping).
27074
+ * The original text styles object is broken up by actual lines (new lines only),
27075
+ * which is only sufficient for Text / IText
27076
+ * @private
26949
27077
  */
26950
27078
  _generateStyleMap(textInfo) {
26951
27079
  let realLineCount = 0,
@@ -26972,10 +27100,10 @@ class Textbox extends IText {
26972
27100
  return map;
26973
27101
  }
26974
27102
 
26975
- /**
26976
- * Returns true if object has a style property or has it on a specified line
26977
- * @param {Number} lineIndex
26978
- * @return {Boolean}
27103
+ /**
27104
+ * Returns true if object has a style property or has it on a specified line
27105
+ * @param {Number} lineIndex
27106
+ * @return {Boolean}
26979
27107
  */
26980
27108
  styleHas(property, lineIndex) {
26981
27109
  if (this._styleMap && !this.isWrapping) {
@@ -26987,10 +27115,10 @@ class Textbox extends IText {
26987
27115
  return super.styleHas(property, lineIndex);
26988
27116
  }
26989
27117
 
26990
- /**
26991
- * Returns true if object has no styling or no styling in a line
26992
- * @param {Number} lineIndex , lineIndex is on wrapped lines.
26993
- * @return {Boolean}
27118
+ /**
27119
+ * Returns true if object has no styling or no styling in a line
27120
+ * @param {Number} lineIndex , lineIndex is on wrapped lines.
27121
+ * @return {Boolean}
26994
27122
  */
26995
27123
  isEmptyStyles(lineIndex) {
26996
27124
  if (!this.styles) {
@@ -27027,11 +27155,11 @@ class Textbox extends IText {
27027
27155
  return true;
27028
27156
  }
27029
27157
 
27030
- /**
27031
- * @protected
27032
- * @param {Number} lineIndex
27033
- * @param {Number} charIndex
27034
- * @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
27158
+ /**
27159
+ * @protected
27160
+ * @param {Number} lineIndex
27161
+ * @param {Number} charIndex
27162
+ * @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
27035
27163
  */
27036
27164
  _getStyleDeclaration(lineIndex, charIndex) {
27037
27165
  if (this._styleMap && !this.isWrapping) {
@@ -27045,59 +27173,59 @@ class Textbox extends IText {
27045
27173
  return super._getStyleDeclaration(lineIndex, charIndex);
27046
27174
  }
27047
27175
 
27048
- /**
27049
- * @param {Number} lineIndex
27050
- * @param {Number} charIndex
27051
- * @param {Object} style
27052
- * @private
27176
+ /**
27177
+ * @param {Number} lineIndex
27178
+ * @param {Number} charIndex
27179
+ * @param {Object} style
27180
+ * @private
27053
27181
  */
27054
27182
  _setStyleDeclaration(lineIndex, charIndex, style) {
27055
27183
  const map = this._styleMap[lineIndex];
27056
27184
  super._setStyleDeclaration(map.line, map.offset + charIndex, style);
27057
27185
  }
27058
27186
 
27059
- /**
27060
- * @param {Number} lineIndex
27061
- * @param {Number} charIndex
27062
- * @private
27187
+ /**
27188
+ * @param {Number} lineIndex
27189
+ * @param {Number} charIndex
27190
+ * @private
27063
27191
  */
27064
27192
  _deleteStyleDeclaration(lineIndex, charIndex) {
27065
27193
  const map = this._styleMap[lineIndex];
27066
27194
  super._deleteStyleDeclaration(map.line, map.offset + charIndex);
27067
27195
  }
27068
27196
 
27069
- /**
27070
- * probably broken need a fix
27071
- * Returns the real style line that correspond to the wrapped lineIndex line
27072
- * Used just to verify if the line does exist or not.
27073
- * @param {Number} lineIndex
27074
- * @returns {Boolean} if the line exists or not
27075
- * @private
27197
+ /**
27198
+ * probably broken need a fix
27199
+ * Returns the real style line that correspond to the wrapped lineIndex line
27200
+ * Used just to verify if the line does exist or not.
27201
+ * @param {Number} lineIndex
27202
+ * @returns {Boolean} if the line exists or not
27203
+ * @private
27076
27204
  */
27077
27205
  _getLineStyle(lineIndex) {
27078
27206
  const map = this._styleMap[lineIndex];
27079
27207
  return !!this.styles[map.line];
27080
27208
  }
27081
27209
 
27082
- /**
27083
- * Set the line style to an empty object so that is initialized
27084
- * @param {Number} lineIndex
27085
- * @param {Object} style
27086
- * @private
27210
+ /**
27211
+ * Set the line style to an empty object so that is initialized
27212
+ * @param {Number} lineIndex
27213
+ * @param {Object} style
27214
+ * @private
27087
27215
  */
27088
27216
  _setLineStyle(lineIndex) {
27089
27217
  const map = this._styleMap[lineIndex];
27090
27218
  super._setLineStyle(map.line);
27091
27219
  }
27092
27220
 
27093
- /**
27094
- * Wraps text using the 'width' property of Textbox. First this function
27095
- * splits text on newlines, so we preserve newlines entered by the user.
27096
- * Then it wraps each line using the width of the Textbox by calling
27097
- * _wrapLine().
27098
- * @param {Array} lines The string array of text that is split into lines
27099
- * @param {Number} desiredWidth width you want to wrap to
27100
- * @returns {Array} Array of lines
27221
+ /**
27222
+ * Wraps text using the 'width' property of Textbox. First this function
27223
+ * splits text on newlines, so we preserve newlines entered by the user.
27224
+ * Then it wraps each line using the width of the Textbox by calling
27225
+ * _wrapLine().
27226
+ * @param {Array} lines The string array of text that is split into lines
27227
+ * @param {Number} desiredWidth width you want to wrap to
27228
+ * @returns {Array} Array of lines
27101
27229
  */
27102
27230
  _wrapText(lines, desiredWidth) {
27103
27231
  this.isWrapping = true;
@@ -27111,12 +27239,12 @@ class Textbox extends IText {
27111
27239
  return wrapped;
27112
27240
  }
27113
27241
 
27114
- /**
27115
- * For each line of text terminated by an hard line stop,
27116
- * measure each word width and extract the largest word from all.
27117
- * The returned words here are the one that at the end will be rendered.
27118
- * @param {string[]} lines the lines we need to measure
27119
- *
27242
+ /**
27243
+ * For each line of text terminated by an hard line stop,
27244
+ * measure each word width and extract the largest word from all.
27245
+ * The returned words here are the one that at the end will be rendered.
27246
+ * @param {string[]} lines the lines we need to measure
27247
+ *
27120
27248
  */
27121
27249
  getGraphemeDataForRender(lines) {
27122
27250
  const splitByGrapheme = this.splitByGrapheme,
@@ -27149,17 +27277,17 @@ class Textbox extends IText {
27149
27277
  };
27150
27278
  }
27151
27279
 
27152
- /**
27153
- * Helper function to measure a string of text, given its lineIndex and charIndex offset
27154
- * It gets called when charBounds are not available yet.
27155
- * Override if necessary
27156
- * Use with {@link Textbox#wordSplit}
27157
- *
27158
- * @param {CanvasRenderingContext2D} ctx
27159
- * @param {String} text
27160
- * @param {number} lineIndex
27161
- * @param {number} charOffset
27162
- * @returns {number}
27280
+ /**
27281
+ * Helper function to measure a string of text, given its lineIndex and charIndex offset
27282
+ * It gets called when charBounds are not available yet.
27283
+ * Override if necessary
27284
+ * Use with {@link Textbox#wordSplit}
27285
+ *
27286
+ * @param {CanvasRenderingContext2D} ctx
27287
+ * @param {String} text
27288
+ * @param {number} lineIndex
27289
+ * @param {number} charOffset
27290
+ * @returns {number}
27163
27291
  */
27164
27292
  _measureWord(word, lineIndex) {
27165
27293
  let charOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
@@ -27174,26 +27302,26 @@ class Textbox extends IText {
27174
27302
  return width;
27175
27303
  }
27176
27304
 
27177
- /**
27178
- * Override this method to customize word splitting
27179
- * Use with {@link Textbox#_measureWord}
27180
- * @param {string} value
27181
- * @returns {string[]} array of words
27305
+ /**
27306
+ * Override this method to customize word splitting
27307
+ * Use with {@link Textbox#_measureWord}
27308
+ * @param {string} value
27309
+ * @returns {string[]} array of words
27182
27310
  */
27183
27311
  wordSplit(value) {
27184
27312
  return value.split(this._wordJoiners);
27185
27313
  }
27186
27314
 
27187
- /**
27188
- * Wraps a line of text using the width of the Textbox as desiredWidth
27189
- * and leveraging the known width o words from GraphemeData
27190
- * @private
27191
- * @param {Number} lineIndex
27192
- * @param {Number} desiredWidth width you want to wrap the line to
27193
- * @param {GraphemeData} graphemeData an object containing all the lines' words width.
27194
- * @param {Number} reservedSpace space to remove from wrapping for custom functionalities
27195
- * @returns {Array} Array of line(s) into which the given text is wrapped
27196
- * to.
27315
+ /**
27316
+ * Wraps a line of text using the width of the Textbox as desiredWidth
27317
+ * and leveraging the known width o words from GraphemeData
27318
+ * @private
27319
+ * @param {Number} lineIndex
27320
+ * @param {Number} desiredWidth width you want to wrap the line to
27321
+ * @param {GraphemeData} graphemeData an object containing all the lines' words width.
27322
+ * @param {Number} reservedSpace space to remove from wrapping for custom functionalities
27323
+ * @returns {Array} Array of line(s) into which the given text is wrapped
27324
+ * to.
27197
27325
  */
27198
27326
  _wrapLine(lineIndex, desiredWidth, _ref) {
27199
27327
  let {
@@ -27275,11 +27403,11 @@ class Textbox extends IText {
27275
27403
  return graphemeLines;
27276
27404
  }
27277
27405
 
27278
- /**
27279
- * Detect if the text line is ended with an hard break
27280
- * text and itext do not have wrapping, return false
27281
- * @param {Number} lineIndex text to split
27282
- * @return {Boolean}
27406
+ /**
27407
+ * Detect if the text line is ended with an hard break
27408
+ * text and itext do not have wrapping, return false
27409
+ * @param {Number} lineIndex text to split
27410
+ * @return {Boolean}
27283
27411
  */
27284
27412
  isEndOfWrapping(lineIndex) {
27285
27413
  if (!this._styleMap[lineIndex + 1]) {
@@ -27293,12 +27421,12 @@ class Textbox extends IText {
27293
27421
  return false;
27294
27422
  }
27295
27423
 
27296
- /**
27297
- * Detect if a line has a linebreak and so we need to account for it when moving
27298
- * and counting style.
27299
- * This is important only for splitByGrapheme at the end of wrapping.
27300
- * If we are not wrapping the offset is always 1
27301
- * @return Number
27424
+ /**
27425
+ * Detect if a line has a linebreak and so we need to account for it when moving
27426
+ * and counting style.
27427
+ * This is important only for splitByGrapheme at the end of wrapping.
27428
+ * If we are not wrapping the offset is always 1
27429
+ * @return Number
27302
27430
  */
27303
27431
  missingNewlineOffset(lineIndex, skipWrapping) {
27304
27432
  if (this.splitByGrapheme && !skipWrapping) {
@@ -27307,16 +27435,17 @@ class Textbox extends IText {
27307
27435
  return 1;
27308
27436
  }
27309
27437
 
27310
- /**
27311
- * Gets lines of text to render in the Textbox. This function calculates
27312
- * text wrapping on the fly every time it is called.
27313
- * @param {String} text text to split
27314
- * @returns {Array} Array of lines in the Textbox.
27315
- * @override
27438
+ /**
27439
+ * Gets lines of text to render in the Textbox. This function calculates
27440
+ * text wrapping on the fly every time it is called.
27441
+ * @param {String} text text to split
27442
+ * @returns {Array} Array of lines in the Textbox.
27443
+ * @override
27316
27444
  */
27317
27445
  _splitTextIntoLines(text) {
27318
27446
  // Check if we need browser wrapping using smart font detection
27319
- const needsBrowserWrapping = this.fontFamily && fontLacksEnglishGlyphsCached(this.fontFamily);
27447
+ // Skip browser wrapping for justify text when using overlay editing to prevent measurement conflicts
27448
+ const needsBrowserWrapping = this.fontFamily && fontLacksEnglishGlyphsCached(this.fontFamily) && !(this.textAlign.includes('justify') && this.useOverlayEditing);
27320
27449
  if (needsBrowserWrapping) {
27321
27450
  // Cache key based on text content, width, font properties, AND text alignment
27322
27451
  const textHash = text.length + text.slice(0, 50); // Include text content in cache key
@@ -27341,6 +27470,11 @@ class Textbox extends IText {
27341
27470
 
27342
27471
  // Mark that we used browser wrapping to prevent dynamicMinWidth modifications
27343
27472
  this._usingBrowserWrapping = true;
27473
+
27474
+ // pass the width to enlargeSpaces
27475
+ if (result.width) {
27476
+ this._browserWrappingWidth = result.width;
27477
+ }
27344
27478
  return result;
27345
27479
  }
27346
27480
 
@@ -27359,9 +27493,9 @@ class Textbox extends IText {
27359
27493
  return newText;
27360
27494
  }
27361
27495
 
27362
- /**
27363
- * Use browser's native text wrapping for accurate handling of fonts without English glyphs
27364
- * @private
27496
+ /**
27497
+ * Use browser's native text wrapping for accurate handling of fonts without English glyphs
27498
+ * @private
27365
27499
  */
27366
27500
  _splitTextIntoLinesWithBrowser(text) {
27367
27501
  if (typeof document === 'undefined') {
@@ -27369,26 +27503,47 @@ class Textbox extends IText {
27369
27503
  return this._splitTextIntoLinesDefault(text);
27370
27504
  }
27371
27505
 
27506
+ // Skip measurement if we just extracted lines from overlay for justify text
27507
+ if (this._skipJustifyMeasurement && this.textAlign.includes('justify')) {
27508
+ console.log('🚫 SKIP: Skipping browser measurement, using stored overlay lines');
27509
+ this._skipJustifyMeasurement = false; // Reset flag
27510
+ return this._splitTextIntoLinesDefault(text);
27511
+ }
27512
+
27372
27513
  // Create a hidden element that mimics the overlay editor
27373
27514
  const testElement = document.createElement('div');
27374
27515
  testElement.style.position = 'absolute';
27375
27516
  testElement.style.left = '-9999px';
27376
27517
  testElement.style.visibility = 'hidden';
27377
- testElement.style.fontSize = `${this.fontSize}px`;
27518
+ const scaleX = this.scaleX || 1;
27519
+ const fontSize = this.fontSize * scaleX;
27520
+ const padding = this.padding || 0;
27521
+ testElement.style.fontSize = `${fontSize}px`;
27378
27522
  testElement.style.fontFamily = `"${this.fontFamily}"`;
27379
27523
  testElement.style.fontWeight = String(this.fontWeight || 'normal');
27380
27524
  testElement.style.fontStyle = String(this.fontStyle || 'normal');
27381
27525
  testElement.style.lineHeight = String(this.lineHeight || 1.16);
27382
- testElement.style.width = `${this.width}px`;
27526
+ testElement.style.letterSpacing = `${(this.charSpacing || 0) / 1000 * fontSize}px`;
27383
27527
  testElement.style.direction = this.direction || 'ltr';
27384
27528
  testElement.style.whiteSpace = 'pre-wrap';
27385
27529
  testElement.style.wordBreak = 'normal';
27386
27530
  testElement.style.overflowWrap = 'break-word';
27387
-
27388
- // Set browser-native text alignment (including justify)
27531
+ testElement.style.padding = `${padding}px`;
27532
+ testElement.style.boxSizing = 'border-box';
27533
+ testElement.style.width = `${this.width * scaleX + padding * 2}px`;
27389
27534
  if (this.textAlign.includes('justify')) {
27390
27535
  testElement.style.textAlign = 'justify';
27391
- testElement.style.textAlignLast = 'auto'; // Let browser decide last line alignment
27536
+ if (this.direction === 'rtl') {
27537
+ testElement.style.textAlignLast = 'right';
27538
+ } else {
27539
+ testElement.style.textAlignLast = 'left';
27540
+ }
27541
+ testElement.style.textJustify = 'inter-word';
27542
+ testElement.style.unicodeBidi = 'plaintext';
27543
+ testElement.style.wordSpacing = 'normal';
27544
+ // Match font smoothing from overlay editor
27545
+ testElement.style.webkitFontSmoothing = 'auto';
27546
+ testElement.style.mozOsxFontSmoothing = 'auto';
27392
27547
  } else {
27393
27548
  testElement.style.textAlign = this.textAlign;
27394
27549
  }
@@ -27413,7 +27568,7 @@ class Textbox extends IText {
27413
27568
  if (i > currentLineStart && (rect.bottom > previousBottom + 5 || i === textLength)) {
27414
27569
  // New line detected or end of text
27415
27570
  const lineEnd = i === textLength ? i : i - 1;
27416
- const lineText = text.substring(currentLineStart, lineEnd).trim();
27571
+ const lineText = text.substring(currentLineStart, lineEnd);
27417
27572
  if (lineText) {
27418
27573
  lines.push(lineText);
27419
27574
  // Convert to graphemes for compatibility
@@ -27436,6 +27591,7 @@ class Textbox extends IText {
27436
27591
  const offsetHeight = testElement.offsetHeight;
27437
27592
  const clientHeight = testElement.clientHeight;
27438
27593
  const boundingRect = testElement.getBoundingClientRect();
27594
+ const clientWidth = testElement.clientWidth;
27439
27595
  console.log(`🔤 Browser element measurements:`);
27440
27596
  console.log(` scrollHeight: ${actualBrowserHeight}px (content + padding + hidden overflow)`);
27441
27597
  console.log(` offsetHeight: ${offsetHeight}px (content + padding + border)`);
@@ -27483,13 +27639,14 @@ class Textbox extends IText {
27483
27639
  graphemeText: text.split(''),
27484
27640
  graphemeLines: graphemeLines,
27485
27641
  justifySpaceMeasurements: justifySpaceMeasurements,
27486
- actualBrowserHeight: adjustedHeight
27642
+ actualBrowserHeight: adjustedHeight,
27643
+ width: clientWidth
27487
27644
  };
27488
27645
  }
27489
27646
 
27490
- /**
27491
- * Extract justify space measurements from browser
27492
- * @private
27647
+ /**
27648
+ * Extract justify space measurements from browser
27649
+ * @private
27493
27650
  */
27494
27651
  _extractJustifySpaceMeasurements(element, lines) {
27495
27652
  console.log(`🔤 Extracting browser justify space measurements for ${lines.length} lines`);
@@ -27525,9 +27682,9 @@ class Textbox extends IText {
27525
27682
  return spaceWidths;
27526
27683
  }
27527
27684
 
27528
- /**
27529
- * Apply browser-calculated justify space measurements
27530
- * @private
27685
+ /**
27686
+ * Apply browser-calculated justify space measurements
27687
+ * @private
27531
27688
  */
27532
27689
  _applyBrowserJustifySpaces() {
27533
27690
  if (!this._textLines || !this.__charBounds) {
@@ -27535,6 +27692,14 @@ class Textbox extends IText {
27535
27692
  return;
27536
27693
  }
27537
27694
 
27695
+ // Check for overlay justify measurements first
27696
+ const overlayMeasurements = this._overlayJustifyMeasurements;
27697
+ if (overlayMeasurements) {
27698
+ console.log('🎯 OVERLAY JUSTIFY: Using stored overlay measurements');
27699
+ this._applyOverlayJustifySpaces(overlayMeasurements);
27700
+ return;
27701
+ }
27702
+
27538
27703
  // Get space measurements from browser wrapping result
27539
27704
  const styleMap = this._styleMap;
27540
27705
  if (!styleMap || !styleMap.justifySpaceMeasurements) {
@@ -27550,23 +27715,164 @@ class Textbox extends IText {
27550
27715
  const lineBounds = this.__charBounds[lineIndex];
27551
27716
  const lineSpaceWidths = spaceWidths[lineIndex];
27552
27717
  let spaceIndex = 0;
27718
+ let accumulatedSpace = 0;
27719
+ const isRtl = this.direction === 'rtl';
27720
+ const spaceDiffs = [];
27721
+
27722
+ // First, calculate the difference for each space
27553
27723
  for (let charIndex = 0; charIndex < line.length; charIndex++) {
27554
27724
  if (/\s/.test(line[charIndex]) && spaceIndex < lineSpaceWidths.length) {
27555
- const expandedWidth = lineSpaceWidths[spaceIndex];
27556
- if (lineBounds[charIndex]) {
27557
- const oldWidth = lineBounds[charIndex].width;
27558
- lineBounds[charIndex].width = expandedWidth;
27559
- console.log(`🔤 Line ${lineIndex} space ${spaceIndex}: ${oldWidth.toFixed(1)}px -> ${expandedWidth.toFixed(1)}px`);
27725
+ const charBound = lineBounds[charIndex];
27726
+ if (charBound) {
27727
+ spaceDiffs.push(lineSpaceWidths[spaceIndex] - charBound.width);
27560
27728
  }
27561
27729
  spaceIndex++;
27562
27730
  }
27563
27731
  }
27732
+ spaceIndex = 0;
27733
+ let remainingDiff = spaceDiffs.reduce((a, b) => a + b, 0);
27734
+ for (let charIndex = 0; charIndex < line.length; charIndex++) {
27735
+ const charBound = lineBounds[charIndex];
27736
+ if (!charBound) continue;
27737
+ if (isRtl) {
27738
+ charBound.left += remainingDiff;
27739
+ } else {
27740
+ charBound.left += accumulatedSpace;
27741
+ }
27742
+ if (/\s/.test(line[charIndex]) && spaceIndex < spaceDiffs.length) {
27743
+ const diff = spaceDiffs[spaceIndex];
27744
+ const oldWidth = charBound.width;
27745
+ charBound.width += diff;
27746
+ charBound.kernedWidth += diff;
27747
+ console.log(`🔤 Line ${lineIndex} space ${spaceIndex}: ${oldWidth.toFixed(1)}px -> ${charBound.width.toFixed(1)}px`);
27748
+ if (isRtl) {
27749
+ remainingDiff -= diff;
27750
+ } else {
27751
+ accumulatedSpace += diff;
27752
+ }
27753
+ spaceIndex++;
27754
+ }
27755
+ }
27756
+ // also need to update the last charBound
27757
+ const lastBound = lineBounds[line.length];
27758
+ if (lastBound) {
27759
+ if (isRtl) {
27760
+ lastBound.left += remainingDiff;
27761
+ } else {
27762
+ lastBound.left += accumulatedSpace;
27763
+ }
27764
+ }
27765
+ });
27766
+ }
27767
+
27768
+ /**
27769
+ * Apply overlay justify measurements to character bounds
27770
+ * @private
27771
+ */
27772
+ _applyOverlayJustifySpaces(overlayMeasurements) {
27773
+ this._textLines.forEach((line, lineIndex) => {
27774
+ if (!this.__charBounds || !this.__charBounds[lineIndex]) return;
27775
+ const lineMeasurement = overlayMeasurements[lineIndex];
27776
+ if (!lineMeasurement) return;
27777
+ const {
27778
+ justifiedSpaceWidth
27779
+ } = lineMeasurement;
27780
+ let spaceIndex = 0;
27781
+ line.forEach((char, charIndex) => {
27782
+ if (char === ' ' && this.__charBounds[lineIndex][charIndex]) {
27783
+ const oldWidth = this.__charBounds[lineIndex][charIndex].width;
27784
+ this.__charBounds[lineIndex][charIndex].width = justifiedSpaceWidth;
27785
+ console.log(`🎯 OVERLAY Line ${lineIndex} space ${spaceIndex}: ${oldWidth.toFixed(1)}px -> ${justifiedSpaceWidth.toFixed(1)}px`);
27786
+ spaceIndex++;
27787
+ }
27788
+ });
27564
27789
  });
27565
27790
  }
27566
27791
 
27567
- /**
27568
- * Fallback to default Fabric wrapping
27569
- * @private
27792
+ /**
27793
+ * Extract justify measurements from overlay textarea and store them
27794
+ */
27795
+ extractJustifyMeasurementsFromOverlay(textarea) {
27796
+ const text = textarea.value;
27797
+ if (!text || !this.textAlign.includes('justify')) {
27798
+ return;
27799
+ }
27800
+
27801
+ // Use the same measurement technique as measureLinesWithBrowser
27802
+ const testElement = document.createElement('div');
27803
+ testElement.style.position = 'absolute';
27804
+ testElement.style.left = '-9999px';
27805
+ testElement.style.visibility = 'hidden';
27806
+
27807
+ // Copy all styles from the textarea to ensure identical rendering
27808
+ const computedStyle = window.getComputedStyle(textarea);
27809
+ const stylesToCopy = ['fontSize', 'fontFamily', 'fontWeight', 'fontStyle', 'lineHeight', 'letterSpacing', 'direction', 'textAlign', 'textAlignLast', 'textJustify', 'width', 'padding', 'boxSizing', 'whiteSpace', 'wordBreak', 'overflowWrap'];
27810
+ stylesToCopy.forEach(prop => {
27811
+ testElement.style[prop] = computedStyle[prop];
27812
+ });
27813
+ testElement.textContent = text;
27814
+ document.body.appendChild(testElement);
27815
+ try {
27816
+ // Extract justify space measurements using the same logic
27817
+ const lines = text.split('\n');
27818
+ const justifyMeasurements = {};
27819
+ lines.forEach((line, lineIndex) => {
27820
+ if (line.trim()) {
27821
+ const spaces = (line.match(/\s/g) || []).length;
27822
+ if (spaces > 0) {
27823
+ // Measure natural space width
27824
+ const singleSpaceDiv = document.createElement('div');
27825
+ stylesToCopy.forEach(prop => {
27826
+ singleSpaceDiv.style[prop] = computedStyle[prop];
27827
+ });
27828
+ singleSpaceDiv.textContent = ' ';
27829
+ document.body.appendChild(singleSpaceDiv);
27830
+ const naturalSpaceWidth = singleSpaceDiv.getBoundingClientRect().width;
27831
+ document.body.removeChild(singleSpaceDiv);
27832
+
27833
+ // Measure justified line width
27834
+ const lineDiv = document.createElement('div');
27835
+ stylesToCopy.forEach(prop => {
27836
+ lineDiv.style[prop] = computedStyle[prop];
27837
+ });
27838
+ lineDiv.textContent = line;
27839
+ document.body.appendChild(lineDiv);
27840
+ const lineWidth = lineDiv.getBoundingClientRect().width;
27841
+ const containerWidth = parseFloat(computedStyle.width);
27842
+
27843
+ // Calculate justified space width
27844
+ const nonSpaceText = line.replace(/\s/g, '');
27845
+ const nonSpaceDiv = document.createElement('div');
27846
+ stylesToCopy.forEach(prop => {
27847
+ nonSpaceDiv.style[prop] = computedStyle[prop];
27848
+ });
27849
+ nonSpaceDiv.textContent = nonSpaceText;
27850
+ document.body.appendChild(nonSpaceDiv);
27851
+ const nonSpaceWidth = nonSpaceDiv.getBoundingClientRect().width;
27852
+ const justifiedSpaceWidth = (containerWidth - nonSpaceWidth) / spaces;
27853
+ console.log(`🎯 OVERLAY Line ${lineIndex}: ${spaces} spaces, natural: ${naturalSpaceWidth.toFixed(1)}px -> justified: ${justifiedSpaceWidth.toFixed(1)}px`);
27854
+ justifyMeasurements[lineIndex] = {
27855
+ naturalSpaceWidth,
27856
+ justifiedSpaceWidth,
27857
+ spaceCount: spaces
27858
+ };
27859
+ document.body.removeChild(lineDiv);
27860
+ document.body.removeChild(nonSpaceDiv);
27861
+ }
27862
+ }
27863
+ });
27864
+
27865
+ // Store the measurements
27866
+ this._overlayJustifyMeasurements = justifyMeasurements;
27867
+ console.log('💾 STORED: Overlay justify measurements', justifyMeasurements);
27868
+ } finally {
27869
+ document.body.removeChild(testElement);
27870
+ }
27871
+ }
27872
+
27873
+ /**
27874
+ * Fallback to default Fabric wrapping
27875
+ * @private
27570
27876
  */
27571
27877
  _splitTextIntoLinesDefault(text) {
27572
27878
  const newText = super._splitTextIntoLines(text),
@@ -27598,12 +27904,12 @@ class Textbox extends IText {
27598
27904
  }
27599
27905
  }
27600
27906
 
27601
- /**
27602
- * Initialize event listeners for safety snap functionality
27603
- * @private
27907
+ /**
27908
+ * Initialize event listeners for safety snap functionality
27909
+ * @private
27604
27910
  */
27605
27911
  initializeEventListeners() {
27606
- var _this$canvas4;
27912
+ var _this$canvas5;
27607
27913
  // Track which side is being used for resize to handle position compensation
27608
27914
  let resizeOrigin = null;
27609
27915
 
@@ -27628,13 +27934,14 @@ class Textbox extends IText {
27628
27934
  // Use 'modified' event which fires after user releases the mouse
27629
27935
  this.on('modified', () => {
27630
27936
  const currentResizeOrigin = resizeOrigin; // Capture the value before reset
27937
+ this.initDimensions();
27631
27938
  // Small delay to ensure text layout is updated
27632
27939
  setTimeout(() => this.safetySnapWidth(currentResizeOrigin), 10);
27633
27940
  resizeOrigin = null; // Reset after capturing
27634
27941
  });
27635
27942
 
27636
27943
  // Also listen to canvas-level modified event as backup
27637
- (_this$canvas4 = this.canvas) === null || _this$canvas4 === void 0 || _this$canvas4.on('object:modified', e => {
27944
+ (_this$canvas5 = this.canvas) === null || _this$canvas5 === void 0 || _this$canvas5.on('object:modified', e => {
27638
27945
  if (e.target === this) {
27639
27946
  const currentResizeOrigin = resizeOrigin; // Capture the value before reset
27640
27947
  setTimeout(() => this.safetySnapWidth(currentResizeOrigin), 10);
@@ -27643,12 +27950,12 @@ class Textbox extends IText {
27643
27950
  });
27644
27951
  }
27645
27952
 
27646
- /**
27647
- * Safety snap to prevent glyph clipping after manual resize.
27648
- * Similar to Polotno - checks if any glyphs are too close to edges
27649
- * and automatically expands width if needed.
27650
- * @private
27651
- * @param resizeOrigin - Which side was used for resizing ('left' or 'right')
27953
+ /**
27954
+ * Safety snap to prevent glyph clipping after manual resize.
27955
+ * Similar to Polotno - checks if any glyphs are too close to edges
27956
+ * and automatically expands width if needed.
27957
+ * @private
27958
+ * @param resizeOrigin - Which side was used for resizing ('left' or 'right')
27652
27959
  */
27653
27960
  safetySnapWidth(resizeOrigin) {
27654
27961
  // For Textbox objects, we always want to check for clipping regardless of isWrapping flag
@@ -27678,7 +27985,7 @@ class Textbox extends IText {
27678
27985
  const safetyThreshold = 2; // px - very subtle trigger
27679
27986
 
27680
27987
  if (maxRequiredWidth > this.width - safetyThreshold) {
27681
- var _this$canvas5;
27988
+ var _this$canvas6;
27682
27989
  // Set width to exactly what's needed + minimal safety margin
27683
27990
  const newWidth = maxRequiredWidth + 1; // Add just 1px safety margin
27684
27991
 
@@ -27687,7 +27994,7 @@ class Textbox extends IText {
27687
27994
  const originalTop = this.top;
27688
27995
  const widthIncrease = newWidth - this.width;
27689
27996
 
27690
- // Change width
27997
+ // Change width
27691
27998
  this.set('width', newWidth);
27692
27999
 
27693
28000
  // Force text layout recalculation
@@ -27699,8 +28006,8 @@ class Textbox extends IText {
27699
28006
  // When resizing from left, the expansion pushes text right
27700
28007
  // Compensate by moving the textbox left by the width increase
27701
28008
  this.set({
27702
- 'left': originalLeft - widthIncrease,
27703
- 'top': originalTop
28009
+ left: originalLeft - widthIncrease,
28010
+ top: originalTop
27704
28011
  });
27705
28012
  }
27706
28013
  this.setCoords();
@@ -27711,13 +28018,13 @@ class Textbox extends IText {
27711
28018
  this.__overlayEditor.refresh();
27712
28019
  }, 0);
27713
28020
  }
27714
- (_this$canvas5 = this.canvas) === null || _this$canvas5 === void 0 || _this$canvas5.requestRenderAll();
28021
+ (_this$canvas6 = this.canvas) === null || _this$canvas6 === void 0 || _this$canvas6.requestRenderAll();
27715
28022
  }
27716
28023
  }
27717
28024
 
27718
- /**
27719
- * Fix character selection mismatch after JSON loading for browser-wrapped fonts
27720
- * @private
28025
+ /**
28026
+ * Fix character selection mismatch after JSON loading for browser-wrapped fonts
28027
+ * @private
27721
28028
  */
27722
28029
  _fixCharacterMappingAfterJsonLoad() {
27723
28030
  if (this._usingBrowserWrapping) {
@@ -27737,9 +28044,9 @@ class Textbox extends IText {
27737
28044
  }
27738
28045
  }
27739
28046
 
27740
- /**
27741
- * Force complete textbox re-initialization (useful after JSON loading)
27742
- * Overrides Text version with Textbox-specific logic
28047
+ /**
28048
+ * Force complete textbox re-initialization (useful after JSON loading)
28049
+ * Overrides Text version with Textbox-specific logic
27743
28050
  */
27744
28051
  forceTextReinitialization() {
27745
28052
  console.log('🔄 Force reinitializing Textbox object');
@@ -27762,7 +28069,7 @@ class Textbox extends IText {
27762
28069
  // Double-check that justify was applied by checking space widths
27763
28070
  if (this.textAlign.includes('justify') && this.__charBounds) {
27764
28071
  setTimeout(() => {
27765
- var _this$canvas6;
28072
+ var _this$canvas7;
27766
28073
  // Verify justify was applied by checking if space widths vary
27767
28074
  let hasVariableSpaces = false;
27768
28075
  this.__charBounds.forEach((lineBounds, i) => {
@@ -27791,36 +28098,118 @@ class Textbox extends IText {
27791
28098
  this.height = this.calcTextHeight();
27792
28099
  console.log(`🔧 JUSTIFY: Used calcTextHeight: ${this.height}px`);
27793
28100
  }
27794
- (_this$canvas6 = this.canvas) === null || _this$canvas6 === void 0 || _this$canvas6.requestRenderAll();
28101
+ (_this$canvas7 = this.canvas) === null || _this$canvas7 === void 0 || _this$canvas7.requestRenderAll();
27795
28102
  }, 10);
27796
28103
  }
27797
28104
  }
27798
28105
 
27799
- /**
27800
- * Returns object representation of an instance
27801
- * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
27802
- * @return {Object} object representation of an instance
28106
+ /**
28107
+ * Fix justify text after JSON loading - call this after fromObject
28108
+ * @public
28109
+ */
28110
+ fixJustifyAfterJSONLoad() {
28111
+ if (this.textAlign.includes('justify') && this.useOverlayEditing) {
28112
+ console.log('🔧 JSON FIX: Fixing justify text after JSON load');
28113
+ // The issue is that enlargeSpaces() isn't properly updating after JSON load
28114
+ // Workaround: temporarily change width to trigger proper rebuild, then restore
28115
+ setTimeout(() => {
28116
+ const originalWidth = this.width;
28117
+ console.log('🔄 JSON TRICK: Temporarily changing width to force justify rebuild');
28118
+
28119
+ // Temporarily change width by 1px to trigger proper justify recalculation
28120
+ this.width = originalWidth + 1;
28121
+ this.initDimensions();
28122
+
28123
+ // Restore original width - this will trigger the proper justify calculation
28124
+ setTimeout(() => {
28125
+ var _this$canvas8;
28126
+ this.width = originalWidth;
28127
+ this.initDimensions();
28128
+ (_this$canvas8 = this.canvas) === null || _this$canvas8 === void 0 || _this$canvas8.requestRenderAll();
28129
+ console.log('✅ JSON FIX: Restored original width, justify should be fixed');
28130
+ }, 50);
28131
+ }, 100);
28132
+ }
28133
+ }
28134
+
28135
+ /**
28136
+ * Returns object representation of an instance
28137
+ * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
28138
+ * @return {Object} object representation of an instance
27803
28139
  */
27804
28140
  toObject() {
27805
28141
  let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
27806
- return super.toObject(['minWidth', 'splitByGrapheme', ...propertiesToInclude]);
28142
+ const obj = super.toObject(['minWidth', 'splitByGrapheme', ...propertiesToInclude]);
28143
+
28144
+ // For justify text with overlay editing, ensure measurements are available
28145
+ if (this.textAlign.includes('justify') && this.useOverlayEditing) {
28146
+ var _charBounds, _charBounds2;
28147
+ // If character bounds don't exist yet, initialize dimensions to calculate them
28148
+ if (!((_charBounds = this.__charBounds) !== null && _charBounds !== void 0 && _charBounds.length)) {
28149
+ console.log('🔧 SERIALIZE: Character bounds missing, initializing dimensions for justify text');
28150
+ this.initDimensions();
28151
+ }
28152
+
28153
+ // Now save the measurements if they exist
28154
+ if ((_charBounds2 = this.__charBounds) !== null && _charBounds2 !== void 0 && _charBounds2.length) {
28155
+ console.log('💾 SERIALIZE: Saving justify measurements to JSON');
28156
+ obj._justifyMeasurements = {
28157
+ __charBounds: this.__charBounds,
28158
+ __lineHeights: this.__lineHeights,
28159
+ __lineWidths: this.__lineWidths,
28160
+ _hasJustifyData: true
28161
+ };
28162
+ } else {
28163
+ console.warn('⚠️ SERIALIZE: Could not generate character bounds for justify text');
28164
+ }
28165
+ }
28166
+ return obj;
28167
+ }
28168
+
28169
+ /**
28170
+ * Override _set to handle justify measurements during JSON loading
28171
+ * @private
28172
+ */
28173
+ _set(key, value) {
28174
+ const result = super._set(key, value);
28175
+
28176
+ // Restore justify measurements if they exist in the JSON data
28177
+ if (key === '_justifyMeasurements' && value && value._hasJustifyData) {
28178
+ console.log('🔄 DESERIALIZE: Restoring justify measurements from JSON');
28179
+ this.__charBounds = value.__charBounds;
28180
+ this.__lineHeights = value.__lineHeights;
28181
+ this.__lineWidths = value.__lineWidths;
28182
+
28183
+ // Mark that we have restored data so we don't interfere with it
28184
+ this._hasRestoredJustifyData = true;
28185
+
28186
+ // Automatically trigger the fix after JSON loading
28187
+ if (this.textAlign.includes('justify') && this.useOverlayEditing) {
28188
+ console.log('🔄 AUTO-FIX: Calling fixJustifyAfterJSONLoad after restoring justify measurements');
28189
+ // Use setTimeout to ensure this runs after all object initialization is complete
28190
+ setTimeout(() => {
28191
+ this.fixJustifyAfterJSONLoad();
28192
+ }, 10);
28193
+ }
28194
+ }
28195
+ return result;
27807
28196
  }
27808
28197
  }
27809
- /**
27810
- * Minimum width of textbox, in pixels.
27811
- * @type Number
27812
- */
27813
- /**
27814
- * Minimum calculated width of a textbox, in pixels.
27815
- * fixed to 2 so that an empty textbox cannot go to 0
27816
- * and is still selectable without text.
27817
- * @type Number
27818
- */
27819
- /**
27820
- * Use this boolean property in order to split strings that have no white space concept.
27821
- * this is a cheap way to help with chinese/japanese
27822
- * @type Boolean
27823
- * @since 2.6.0
28198
+ /**
28199
+ * Minimum width of textbox, in pixels.
28200
+ * @type Number
28201
+ */
28202
+ /**
28203
+ * Minimum calculated width of a textbox, in pixels.
28204
+ * fixed to 2 so that an empty textbox cannot go to 0
28205
+ * and is still selectable without text.
28206
+ * @type Number
28207
+ */
28208
+ /**
28209
+ * Use this boolean property in order to split strings that have no white space concept.
28210
+ * this is a cheap way to help with chinese/japanese
28211
+ * @type Boolean
28212
+ * @since 2.6.0
27824
28213
  */
27825
28214
  _defineProperty(Textbox, "type", 'Textbox');
27826
28215
  _defineProperty(Textbox, "textLayoutProperties", [...IText.textLayoutProperties, 'width']);