@nasser-sw/fabric 7.0.1-beta2 → 7.0.1-beta4

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 (2524) 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/dist/_virtual/_rollupPluginBabelHelpers.min.mjs +0 -0
  18. package/dist/_virtual/_rollupPluginBabelHelpers.min.mjs.map +0 -0
  19. package/dist/_virtual/_rollupPluginBabelHelpers.mjs +0 -0
  20. package/dist/_virtual/_rollupPluginBabelHelpers.mjs.map +0 -0
  21. package/dist/extensions/aligning_guidelines/constant.d.ts +0 -0
  22. package/dist/extensions/aligning_guidelines/constant.d.ts.map +0 -0
  23. package/dist/extensions/aligning_guidelines/index.d.ts +0 -0
  24. package/dist/extensions/aligning_guidelines/index.d.ts.map +0 -0
  25. package/dist/extensions/aligning_guidelines/typedefs.d.ts +0 -0
  26. package/dist/extensions/aligning_guidelines/typedefs.d.ts.map +0 -0
  27. package/dist/extensions/aligning_guidelines/util/basic.d.ts +0 -0
  28. package/dist/extensions/aligning_guidelines/util/basic.d.ts.map +0 -0
  29. package/dist/extensions/aligning_guidelines/util/collect-line.d.ts +0 -0
  30. package/dist/extensions/aligning_guidelines/util/collect-line.d.ts.map +0 -0
  31. package/dist/extensions/aligning_guidelines/util/collect-point.d.ts +0 -0
  32. package/dist/extensions/aligning_guidelines/util/collect-point.d.ts.map +0 -0
  33. package/dist/extensions/aligning_guidelines/util/draw.d.ts +0 -0
  34. package/dist/extensions/aligning_guidelines/util/draw.d.ts.map +0 -0
  35. package/dist/extensions/aligning_guidelines/util/get-objects-by-target.d.ts +0 -0
  36. package/dist/extensions/aligning_guidelines/util/get-objects-by-target.d.ts.map +0 -0
  37. package/dist/extensions/data_updaters/gradient/index.d.ts +0 -0
  38. package/dist/extensions/data_updaters/gradient/index.d.ts.map +0 -0
  39. package/dist/extensions/data_updaters/origins/index.d.ts +0 -0
  40. package/dist/extensions/data_updaters/origins/index.d.ts.map +0 -0
  41. package/dist/extensions/index.d.ts +0 -0
  42. package/dist/extensions/index.d.ts.map +0 -0
  43. package/dist/fabric.d.ts +0 -0
  44. package/dist/fabric.d.ts.map +0 -0
  45. package/dist/fabric.min.mjs +0 -0
  46. package/dist/fabric.min.mjs.map +0 -0
  47. package/dist/fabric.mjs +0 -0
  48. package/dist/fabric.mjs.map +0 -0
  49. package/dist/index.d.ts +0 -0
  50. package/dist/index.d.ts.map +0 -0
  51. package/dist/index.js +1585 -1151
  52. package/dist/index.js.map +1 -1
  53. package/dist/index.min.js +1 -1
  54. package/dist/index.min.js.map +1 -1
  55. package/dist/index.min.mjs +1 -1
  56. package/dist/index.min.mjs.map +1 -1
  57. package/dist/index.mjs +1585 -1151
  58. package/dist/index.mjs.map +1 -1
  59. package/dist/index.node.cjs +1585 -1151
  60. package/dist/index.node.cjs.map +1 -1
  61. package/dist/index.node.d.ts +0 -0
  62. package/dist/index.node.d.ts.map +0 -0
  63. package/dist/index.node.mjs +1585 -1151
  64. package/dist/index.node.mjs.map +1 -1
  65. package/dist/package.json.min.mjs +1 -1
  66. package/dist/package.json.min.mjs.map +0 -0
  67. package/dist/package.json.mjs +1 -1
  68. package/dist/package.json.mjs.map +0 -0
  69. package/dist/src/ClassRegistry.d.ts +0 -0
  70. package/dist/src/ClassRegistry.d.ts.map +0 -0
  71. package/dist/src/ClassRegistry.min.mjs +0 -0
  72. package/dist/src/ClassRegistry.min.mjs.map +0 -0
  73. package/dist/src/ClassRegistry.mjs +0 -0
  74. package/dist/src/ClassRegistry.mjs.map +0 -0
  75. package/dist/src/Collection.d.ts +0 -0
  76. package/dist/src/Collection.d.ts.map +0 -0
  77. package/dist/src/Collection.min.mjs +0 -0
  78. package/dist/src/Collection.min.mjs.map +0 -0
  79. package/dist/src/Collection.mjs +0 -0
  80. package/dist/src/Collection.mjs.map +0 -0
  81. package/dist/src/CommonMethods.d.ts +0 -0
  82. package/dist/src/CommonMethods.d.ts.map +0 -0
  83. package/dist/src/CommonMethods.min.mjs +0 -0
  84. package/dist/src/CommonMethods.min.mjs.map +0 -0
  85. package/dist/src/CommonMethods.mjs +0 -0
  86. package/dist/src/CommonMethods.mjs.map +0 -0
  87. package/dist/src/EventTypeDefs.d.ts +0 -0
  88. package/dist/src/EventTypeDefs.d.ts.map +0 -0
  89. package/dist/src/Intersection.d.ts +0 -0
  90. package/dist/src/Intersection.d.ts.map +0 -0
  91. package/dist/src/Intersection.min.mjs +0 -0
  92. package/dist/src/Intersection.min.mjs.map +0 -0
  93. package/dist/src/Intersection.mjs +0 -0
  94. package/dist/src/Intersection.mjs.map +0 -0
  95. package/dist/src/LayoutManager/ActiveSelectionLayoutManager.d.ts +0 -0
  96. package/dist/src/LayoutManager/ActiveSelectionLayoutManager.d.ts.map +0 -0
  97. package/dist/src/LayoutManager/ActiveSelectionLayoutManager.min.mjs +0 -0
  98. package/dist/src/LayoutManager/ActiveSelectionLayoutManager.min.mjs.map +0 -0
  99. package/dist/src/LayoutManager/ActiveSelectionLayoutManager.mjs +0 -0
  100. package/dist/src/LayoutManager/ActiveSelectionLayoutManager.mjs.map +0 -0
  101. package/dist/src/LayoutManager/LayoutManager.d.ts +0 -0
  102. package/dist/src/LayoutManager/LayoutManager.d.ts.map +0 -0
  103. package/dist/src/LayoutManager/LayoutManager.min.mjs +0 -0
  104. package/dist/src/LayoutManager/LayoutManager.min.mjs.map +0 -0
  105. package/dist/src/LayoutManager/LayoutManager.mjs +0 -0
  106. package/dist/src/LayoutManager/LayoutManager.mjs.map +0 -0
  107. package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.d.ts +0 -0
  108. package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.d.ts.map +0 -0
  109. package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.min.mjs +0 -0
  110. package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.min.mjs.map +0 -0
  111. package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.mjs +0 -0
  112. package/dist/src/LayoutManager/LayoutStrategies/ClipPathLayout.mjs.map +0 -0
  113. package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.d.ts +0 -0
  114. package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.d.ts.map +0 -0
  115. package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.min.mjs +0 -0
  116. package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.min.mjs.map +0 -0
  117. package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.mjs +0 -0
  118. package/dist/src/LayoutManager/LayoutStrategies/FitContentLayout.mjs.map +0 -0
  119. package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.d.ts +0 -0
  120. package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.d.ts.map +0 -0
  121. package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.min.mjs +0 -0
  122. package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.min.mjs.map +0 -0
  123. package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.mjs +0 -0
  124. package/dist/src/LayoutManager/LayoutStrategies/FixedLayout.mjs.map +0 -0
  125. package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.d.ts +0 -0
  126. package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.d.ts.map +0 -0
  127. package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.min.mjs +0 -0
  128. package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.min.mjs.map +0 -0
  129. package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.mjs +0 -0
  130. package/dist/src/LayoutManager/LayoutStrategies/LayoutStrategy.mjs.map +0 -0
  131. package/dist/src/LayoutManager/LayoutStrategies/utils.d.ts +0 -0
  132. package/dist/src/LayoutManager/LayoutStrategies/utils.d.ts.map +0 -0
  133. package/dist/src/LayoutManager/LayoutStrategies/utils.min.mjs +0 -0
  134. package/dist/src/LayoutManager/LayoutStrategies/utils.min.mjs.map +0 -0
  135. package/dist/src/LayoutManager/LayoutStrategies/utils.mjs +0 -0
  136. package/dist/src/LayoutManager/LayoutStrategies/utils.mjs.map +0 -0
  137. package/dist/src/LayoutManager/constants.d.ts +0 -0
  138. package/dist/src/LayoutManager/constants.d.ts.map +0 -0
  139. package/dist/src/LayoutManager/constants.min.mjs +0 -0
  140. package/dist/src/LayoutManager/constants.min.mjs.map +0 -0
  141. package/dist/src/LayoutManager/constants.mjs +0 -0
  142. package/dist/src/LayoutManager/constants.mjs.map +0 -0
  143. package/dist/src/LayoutManager/index.d.ts +0 -0
  144. package/dist/src/LayoutManager/index.d.ts.map +0 -0
  145. package/dist/src/LayoutManager/types.d.ts +0 -0
  146. package/dist/src/LayoutManager/types.d.ts.map +0 -0
  147. package/dist/src/Observable.d.ts +0 -0
  148. package/dist/src/Observable.d.ts.map +0 -0
  149. package/dist/src/Observable.min.mjs +0 -0
  150. package/dist/src/Observable.min.mjs.map +0 -0
  151. package/dist/src/Observable.mjs +0 -0
  152. package/dist/src/Observable.mjs.map +0 -0
  153. package/dist/src/Pattern/Pattern.d.ts +0 -0
  154. package/dist/src/Pattern/Pattern.d.ts.map +0 -0
  155. package/dist/src/Pattern/Pattern.min.mjs +0 -0
  156. package/dist/src/Pattern/Pattern.min.mjs.map +0 -0
  157. package/dist/src/Pattern/Pattern.mjs +0 -0
  158. package/dist/src/Pattern/Pattern.mjs.map +0 -0
  159. package/dist/src/Pattern/index.d.ts +0 -0
  160. package/dist/src/Pattern/index.d.ts.map +0 -0
  161. package/dist/src/Pattern/types.d.ts +0 -0
  162. package/dist/src/Pattern/types.d.ts.map +0 -0
  163. package/dist/src/Point.d.ts +0 -0
  164. package/dist/src/Point.d.ts.map +0 -0
  165. package/dist/src/Point.min.mjs +0 -0
  166. package/dist/src/Point.min.mjs.map +0 -0
  167. package/dist/src/Point.mjs +0 -0
  168. package/dist/src/Point.mjs.map +0 -0
  169. package/dist/src/Shadow.d.ts +0 -0
  170. package/dist/src/Shadow.d.ts.map +0 -0
  171. package/dist/src/Shadow.min.mjs +0 -0
  172. package/dist/src/Shadow.min.mjs.map +0 -0
  173. package/dist/src/Shadow.mjs +0 -0
  174. package/dist/src/Shadow.mjs.map +0 -0
  175. package/dist/src/brushes/BaseBrush.d.ts +0 -0
  176. package/dist/src/brushes/BaseBrush.d.ts.map +0 -0
  177. package/dist/src/brushes/BaseBrush.min.mjs +0 -0
  178. package/dist/src/brushes/BaseBrush.min.mjs.map +0 -0
  179. package/dist/src/brushes/BaseBrush.mjs +0 -0
  180. package/dist/src/brushes/BaseBrush.mjs.map +0 -0
  181. package/dist/src/brushes/CircleBrush.d.ts +0 -0
  182. package/dist/src/brushes/CircleBrush.d.ts.map +0 -0
  183. package/dist/src/brushes/CircleBrush.min.mjs +0 -0
  184. package/dist/src/brushes/CircleBrush.min.mjs.map +0 -0
  185. package/dist/src/brushes/CircleBrush.mjs +0 -0
  186. package/dist/src/brushes/CircleBrush.mjs.map +0 -0
  187. package/dist/src/brushes/PatternBrush.d.ts +0 -0
  188. package/dist/src/brushes/PatternBrush.d.ts.map +0 -0
  189. package/dist/src/brushes/PatternBrush.min.mjs +0 -0
  190. package/dist/src/brushes/PatternBrush.min.mjs.map +0 -0
  191. package/dist/src/brushes/PatternBrush.mjs +0 -0
  192. package/dist/src/brushes/PatternBrush.mjs.map +0 -0
  193. package/dist/src/brushes/PencilBrush.d.ts +0 -0
  194. package/dist/src/brushes/PencilBrush.d.ts.map +0 -0
  195. package/dist/src/brushes/PencilBrush.min.mjs +0 -0
  196. package/dist/src/brushes/PencilBrush.min.mjs.map +0 -0
  197. package/dist/src/brushes/PencilBrush.mjs +0 -0
  198. package/dist/src/brushes/PencilBrush.mjs.map +0 -0
  199. package/dist/src/brushes/SprayBrush.d.ts +0 -0
  200. package/dist/src/brushes/SprayBrush.d.ts.map +0 -0
  201. package/dist/src/brushes/SprayBrush.min.mjs +0 -0
  202. package/dist/src/brushes/SprayBrush.min.mjs.map +0 -0
  203. package/dist/src/brushes/SprayBrush.mjs +0 -0
  204. package/dist/src/brushes/SprayBrush.mjs.map +0 -0
  205. package/dist/src/brushes/typedefs.d.ts +0 -0
  206. package/dist/src/brushes/typedefs.d.ts.map +0 -0
  207. package/dist/src/cache.d.ts +0 -0
  208. package/dist/src/cache.d.ts.map +0 -0
  209. package/dist/src/cache.min.mjs +0 -0
  210. package/dist/src/cache.min.mjs.map +0 -0
  211. package/dist/src/cache.mjs +0 -0
  212. package/dist/src/cache.mjs.map +0 -0
  213. package/dist/src/canvas/Canvas.d.ts +0 -0
  214. package/dist/src/canvas/Canvas.d.ts.map +0 -0
  215. package/dist/src/canvas/Canvas.min.mjs +0 -0
  216. package/dist/src/canvas/Canvas.min.mjs.map +0 -0
  217. package/dist/src/canvas/Canvas.mjs +0 -0
  218. package/dist/src/canvas/Canvas.mjs.map +0 -0
  219. package/dist/src/canvas/CanvasOptions.d.ts +0 -0
  220. package/dist/src/canvas/CanvasOptions.d.ts.map +0 -0
  221. package/dist/src/canvas/CanvasOptions.min.mjs +0 -0
  222. package/dist/src/canvas/CanvasOptions.min.mjs.map +0 -0
  223. package/dist/src/canvas/CanvasOptions.mjs +0 -0
  224. package/dist/src/canvas/CanvasOptions.mjs.map +0 -0
  225. package/dist/src/canvas/DOMManagers/CanvasDOMManager.d.ts +0 -0
  226. package/dist/src/canvas/DOMManagers/CanvasDOMManager.d.ts.map +0 -0
  227. package/dist/src/canvas/DOMManagers/CanvasDOMManager.min.mjs +0 -0
  228. package/dist/src/canvas/DOMManagers/CanvasDOMManager.min.mjs.map +0 -0
  229. package/dist/src/canvas/DOMManagers/CanvasDOMManager.mjs +0 -0
  230. package/dist/src/canvas/DOMManagers/CanvasDOMManager.mjs.map +0 -0
  231. package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.d.ts +0 -0
  232. package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.d.ts.map +0 -0
  233. package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.min.mjs +0 -0
  234. package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.min.mjs.map +0 -0
  235. package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.mjs +0 -0
  236. package/dist/src/canvas/DOMManagers/StaticCanvasDOMManager.mjs.map +0 -0
  237. package/dist/src/canvas/DOMManagers/util.d.ts +0 -0
  238. package/dist/src/canvas/DOMManagers/util.d.ts.map +0 -0
  239. package/dist/src/canvas/DOMManagers/util.min.mjs +0 -0
  240. package/dist/src/canvas/DOMManagers/util.min.mjs.map +0 -0
  241. package/dist/src/canvas/DOMManagers/util.mjs +0 -0
  242. package/dist/src/canvas/DOMManagers/util.mjs.map +0 -0
  243. package/dist/src/canvas/SelectableCanvas.d.ts +0 -0
  244. package/dist/src/canvas/SelectableCanvas.d.ts.map +0 -0
  245. package/dist/src/canvas/SelectableCanvas.min.mjs +0 -0
  246. package/dist/src/canvas/SelectableCanvas.min.mjs.map +0 -0
  247. package/dist/src/canvas/SelectableCanvas.mjs +0 -0
  248. package/dist/src/canvas/SelectableCanvas.mjs.map +0 -0
  249. package/dist/src/canvas/StaticCanvas.d.ts +0 -0
  250. package/dist/src/canvas/StaticCanvas.d.ts.map +0 -0
  251. package/dist/src/canvas/StaticCanvas.min.mjs +0 -0
  252. package/dist/src/canvas/StaticCanvas.min.mjs.map +0 -0
  253. package/dist/src/canvas/StaticCanvas.mjs +0 -0
  254. package/dist/src/canvas/StaticCanvas.mjs.map +0 -0
  255. package/dist/src/canvas/StaticCanvasOptions.d.ts +0 -0
  256. package/dist/src/canvas/StaticCanvasOptions.d.ts.map +0 -0
  257. package/dist/src/canvas/StaticCanvasOptions.min.mjs +0 -0
  258. package/dist/src/canvas/StaticCanvasOptions.min.mjs.map +0 -0
  259. package/dist/src/canvas/StaticCanvasOptions.mjs +0 -0
  260. package/dist/src/canvas/StaticCanvasOptions.mjs.map +0 -0
  261. package/dist/src/canvas/TextEditingManager.d.ts +0 -0
  262. package/dist/src/canvas/TextEditingManager.d.ts.map +0 -0
  263. package/dist/src/canvas/TextEditingManager.min.mjs +0 -0
  264. package/dist/src/canvas/TextEditingManager.min.mjs.map +0 -0
  265. package/dist/src/canvas/TextEditingManager.mjs +0 -0
  266. package/dist/src/canvas/TextEditingManager.mjs.map +0 -0
  267. package/dist/src/canvas/canvas_gestures.mixin.d.ts +0 -0
  268. package/dist/src/canvas/canvas_gestures.mixin.d.ts.map +0 -0
  269. package/dist/src/color/Color.d.ts +0 -0
  270. package/dist/src/color/Color.d.ts.map +0 -0
  271. package/dist/src/color/Color.min.mjs +0 -0
  272. package/dist/src/color/Color.min.mjs.map +0 -0
  273. package/dist/src/color/Color.mjs +0 -0
  274. package/dist/src/color/Color.mjs.map +0 -0
  275. package/dist/src/color/color_map.d.ts +0 -0
  276. package/dist/src/color/color_map.d.ts.map +0 -0
  277. package/dist/src/color/color_map.min.mjs +0 -0
  278. package/dist/src/color/color_map.min.mjs.map +0 -0
  279. package/dist/src/color/color_map.mjs +0 -0
  280. package/dist/src/color/color_map.mjs.map +0 -0
  281. package/dist/src/color/constants.d.ts +0 -0
  282. package/dist/src/color/constants.d.ts.map +0 -0
  283. package/dist/src/color/constants.min.mjs +0 -0
  284. package/dist/src/color/constants.min.mjs.map +0 -0
  285. package/dist/src/color/constants.mjs +0 -0
  286. package/dist/src/color/constants.mjs.map +0 -0
  287. package/dist/src/color/typedefs.d.ts +0 -0
  288. package/dist/src/color/typedefs.d.ts.map +0 -0
  289. package/dist/src/color/util.d.ts +0 -0
  290. package/dist/src/color/util.d.ts.map +0 -0
  291. package/dist/src/color/util.min.mjs +0 -0
  292. package/dist/src/color/util.min.mjs.map +0 -0
  293. package/dist/src/color/util.mjs +0 -0
  294. package/dist/src/color/util.mjs.map +0 -0
  295. package/dist/src/config.d.ts +0 -0
  296. package/dist/src/config.d.ts.map +0 -0
  297. package/dist/src/config.min.mjs +0 -0
  298. package/dist/src/config.min.mjs.map +0 -0
  299. package/dist/src/config.mjs +0 -0
  300. package/dist/src/config.mjs.map +0 -0
  301. package/dist/src/constants.d.ts +0 -0
  302. package/dist/src/constants.d.ts.map +0 -0
  303. package/dist/src/constants.min.mjs +0 -0
  304. package/dist/src/constants.min.mjs.map +0 -0
  305. package/dist/src/constants.mjs +0 -0
  306. package/dist/src/constants.mjs.map +0 -0
  307. package/dist/src/controls/Control.d.ts +0 -0
  308. package/dist/src/controls/Control.d.ts.map +0 -0
  309. package/dist/src/controls/Control.min.mjs +0 -0
  310. package/dist/src/controls/Control.min.mjs.map +0 -0
  311. package/dist/src/controls/Control.mjs +0 -0
  312. package/dist/src/controls/Control.mjs.map +0 -0
  313. package/dist/src/controls/changeHeight.d.ts +0 -0
  314. package/dist/src/controls/changeHeight.d.ts.map +0 -0
  315. package/dist/src/controls/changeWidth.d.ts +0 -0
  316. package/dist/src/controls/changeWidth.d.ts.map +0 -0
  317. package/dist/src/controls/changeWidth.min.mjs +0 -0
  318. package/dist/src/controls/changeWidth.min.mjs.map +0 -0
  319. package/dist/src/controls/changeWidth.mjs +0 -0
  320. package/dist/src/controls/changeWidth.mjs.map +0 -0
  321. package/dist/src/controls/commonControls.d.ts +0 -0
  322. package/dist/src/controls/commonControls.d.ts.map +0 -0
  323. package/dist/src/controls/commonControls.min.mjs +0 -0
  324. package/dist/src/controls/commonControls.min.mjs.map +0 -0
  325. package/dist/src/controls/commonControls.mjs +0 -0
  326. package/dist/src/controls/commonControls.mjs.map +0 -0
  327. package/dist/src/controls/controlRendering.d.ts +0 -0
  328. package/dist/src/controls/controlRendering.d.ts.map +0 -0
  329. package/dist/src/controls/controlRendering.min.mjs +0 -0
  330. package/dist/src/controls/controlRendering.min.mjs.map +0 -0
  331. package/dist/src/controls/controlRendering.mjs +0 -0
  332. package/dist/src/controls/controlRendering.mjs.map +0 -0
  333. package/dist/src/controls/drag.d.ts +0 -0
  334. package/dist/src/controls/drag.d.ts.map +0 -0
  335. package/dist/src/controls/drag.min.mjs +0 -0
  336. package/dist/src/controls/drag.min.mjs.map +0 -0
  337. package/dist/src/controls/drag.mjs +0 -0
  338. package/dist/src/controls/drag.mjs.map +0 -0
  339. package/dist/src/controls/fireEvent.d.ts +0 -0
  340. package/dist/src/controls/fireEvent.d.ts.map +0 -0
  341. package/dist/src/controls/fireEvent.min.mjs +0 -0
  342. package/dist/src/controls/fireEvent.min.mjs.map +0 -0
  343. package/dist/src/controls/fireEvent.mjs +0 -0
  344. package/dist/src/controls/fireEvent.mjs.map +0 -0
  345. package/dist/src/controls/index.d.ts +0 -0
  346. package/dist/src/controls/index.d.ts.map +0 -0
  347. package/dist/src/controls/index.min.mjs +0 -0
  348. package/dist/src/controls/index.min.mjs.map +0 -0
  349. package/dist/src/controls/index.mjs +0 -0
  350. package/dist/src/controls/index.mjs.map +0 -0
  351. package/dist/src/controls/pathControl.d.ts +0 -0
  352. package/dist/src/controls/pathControl.d.ts.map +0 -0
  353. package/dist/src/controls/pathControl.min.mjs +0 -0
  354. package/dist/src/controls/pathControl.min.mjs.map +0 -0
  355. package/dist/src/controls/pathControl.mjs +0 -0
  356. package/dist/src/controls/pathControl.mjs.map +0 -0
  357. package/dist/src/controls/polyControl.d.ts +0 -0
  358. package/dist/src/controls/polyControl.d.ts.map +0 -0
  359. package/dist/src/controls/polyControl.min.mjs +0 -0
  360. package/dist/src/controls/polyControl.min.mjs.map +0 -0
  361. package/dist/src/controls/polyControl.mjs +0 -0
  362. package/dist/src/controls/polyControl.mjs.map +0 -0
  363. package/dist/src/controls/rotate.d.ts +0 -0
  364. package/dist/src/controls/rotate.d.ts.map +0 -0
  365. package/dist/src/controls/rotate.min.mjs +0 -0
  366. package/dist/src/controls/rotate.min.mjs.map +0 -0
  367. package/dist/src/controls/rotate.mjs +0 -0
  368. package/dist/src/controls/rotate.mjs.map +0 -0
  369. package/dist/src/controls/scale.d.ts +0 -0
  370. package/dist/src/controls/scale.d.ts.map +0 -0
  371. package/dist/src/controls/scale.min.mjs +0 -0
  372. package/dist/src/controls/scale.min.mjs.map +0 -0
  373. package/dist/src/controls/scale.mjs +0 -0
  374. package/dist/src/controls/scale.mjs.map +0 -0
  375. package/dist/src/controls/scaleSkew.d.ts +0 -0
  376. package/dist/src/controls/scaleSkew.d.ts.map +0 -0
  377. package/dist/src/controls/scaleSkew.min.mjs +0 -0
  378. package/dist/src/controls/scaleSkew.min.mjs.map +0 -0
  379. package/dist/src/controls/scaleSkew.mjs +0 -0
  380. package/dist/src/controls/scaleSkew.mjs.map +0 -0
  381. package/dist/src/controls/skew.d.ts +0 -0
  382. package/dist/src/controls/skew.d.ts.map +0 -0
  383. package/dist/src/controls/skew.min.mjs +0 -0
  384. package/dist/src/controls/skew.min.mjs.map +0 -0
  385. package/dist/src/controls/skew.mjs +0 -0
  386. package/dist/src/controls/skew.mjs.map +0 -0
  387. package/dist/src/controls/util.d.ts +0 -0
  388. package/dist/src/controls/util.d.ts.map +0 -0
  389. package/dist/src/controls/util.min.mjs +0 -0
  390. package/dist/src/controls/util.min.mjs.map +0 -0
  391. package/dist/src/controls/util.mjs +0 -0
  392. package/dist/src/controls/util.mjs.map +0 -0
  393. package/dist/src/controls/wrapWithFireEvent.d.ts +0 -0
  394. package/dist/src/controls/wrapWithFireEvent.d.ts.map +0 -0
  395. package/dist/src/controls/wrapWithFireEvent.min.mjs +0 -0
  396. package/dist/src/controls/wrapWithFireEvent.min.mjs.map +0 -0
  397. package/dist/src/controls/wrapWithFireEvent.mjs +0 -0
  398. package/dist/src/controls/wrapWithFireEvent.mjs.map +0 -0
  399. package/dist/src/controls/wrapWithFixedAnchor.d.ts +0 -0
  400. package/dist/src/controls/wrapWithFixedAnchor.d.ts.map +0 -0
  401. package/dist/src/controls/wrapWithFixedAnchor.min.mjs +0 -0
  402. package/dist/src/controls/wrapWithFixedAnchor.min.mjs.map +0 -0
  403. package/dist/src/controls/wrapWithFixedAnchor.mjs +0 -0
  404. package/dist/src/controls/wrapWithFixedAnchor.mjs.map +0 -0
  405. package/dist/src/env/browser.d.ts +0 -0
  406. package/dist/src/env/browser.d.ts.map +0 -0
  407. package/dist/src/env/browser.min.mjs +0 -0
  408. package/dist/src/env/browser.min.mjs.map +0 -0
  409. package/dist/src/env/browser.mjs +0 -0
  410. package/dist/src/env/browser.mjs.map +0 -0
  411. package/dist/src/env/index.d.ts +0 -0
  412. package/dist/src/env/index.d.ts.map +0 -0
  413. package/dist/src/env/index.min.mjs +0 -0
  414. package/dist/src/env/index.min.mjs.map +0 -0
  415. package/dist/src/env/index.mjs +0 -0
  416. package/dist/src/env/index.mjs.map +0 -0
  417. package/dist/src/env/node.d.ts +0 -0
  418. package/dist/src/env/node.d.ts.map +0 -0
  419. package/dist/src/env/types.d.ts +0 -0
  420. package/dist/src/env/types.d.ts.map +0 -0
  421. package/dist/src/filters/BaseFilter.d.ts +0 -0
  422. package/dist/src/filters/BaseFilter.d.ts.map +0 -0
  423. package/dist/src/filters/BaseFilter.min.mjs +0 -0
  424. package/dist/src/filters/BaseFilter.min.mjs.map +0 -0
  425. package/dist/src/filters/BaseFilter.mjs +0 -0
  426. package/dist/src/filters/BaseFilter.mjs.map +0 -0
  427. package/dist/src/filters/BlendColor.d.ts +0 -0
  428. package/dist/src/filters/BlendColor.d.ts.map +0 -0
  429. package/dist/src/filters/BlendColor.min.mjs +0 -0
  430. package/dist/src/filters/BlendColor.min.mjs.map +0 -0
  431. package/dist/src/filters/BlendColor.mjs +0 -0
  432. package/dist/src/filters/BlendColor.mjs.map +0 -0
  433. package/dist/src/filters/BlendImage.d.ts +0 -0
  434. package/dist/src/filters/BlendImage.d.ts.map +0 -0
  435. package/dist/src/filters/BlendImage.min.mjs +0 -0
  436. package/dist/src/filters/BlendImage.min.mjs.map +0 -0
  437. package/dist/src/filters/BlendImage.mjs +0 -0
  438. package/dist/src/filters/BlendImage.mjs.map +0 -0
  439. package/dist/src/filters/Blur.d.ts +0 -0
  440. package/dist/src/filters/Blur.d.ts.map +0 -0
  441. package/dist/src/filters/Blur.min.mjs +0 -0
  442. package/dist/src/filters/Blur.min.mjs.map +0 -0
  443. package/dist/src/filters/Blur.mjs +0 -0
  444. package/dist/src/filters/Blur.mjs.map +0 -0
  445. package/dist/src/filters/Boilerplate.d.ts +0 -0
  446. package/dist/src/filters/Boilerplate.d.ts.map +0 -0
  447. package/dist/src/filters/Brightness.d.ts +0 -0
  448. package/dist/src/filters/Brightness.d.ts.map +0 -0
  449. package/dist/src/filters/Brightness.min.mjs +0 -0
  450. package/dist/src/filters/Brightness.min.mjs.map +0 -0
  451. package/dist/src/filters/Brightness.mjs +0 -0
  452. package/dist/src/filters/Brightness.mjs.map +0 -0
  453. package/dist/src/filters/Canvas2dFilterBackend.d.ts +0 -0
  454. package/dist/src/filters/Canvas2dFilterBackend.d.ts.map +0 -0
  455. package/dist/src/filters/Canvas2dFilterBackend.min.mjs +0 -0
  456. package/dist/src/filters/Canvas2dFilterBackend.min.mjs.map +0 -0
  457. package/dist/src/filters/Canvas2dFilterBackend.mjs +0 -0
  458. package/dist/src/filters/Canvas2dFilterBackend.mjs.map +0 -0
  459. package/dist/src/filters/ColorMatrix.d.ts +0 -0
  460. package/dist/src/filters/ColorMatrix.d.ts.map +0 -0
  461. package/dist/src/filters/ColorMatrix.min.mjs +0 -0
  462. package/dist/src/filters/ColorMatrix.min.mjs.map +0 -0
  463. package/dist/src/filters/ColorMatrix.mjs +0 -0
  464. package/dist/src/filters/ColorMatrix.mjs.map +0 -0
  465. package/dist/src/filters/ColorMatrixFilters.d.ts +0 -0
  466. package/dist/src/filters/ColorMatrixFilters.d.ts.map +0 -0
  467. package/dist/src/filters/ColorMatrixFilters.min.mjs +0 -0
  468. package/dist/src/filters/ColorMatrixFilters.min.mjs.map +0 -0
  469. package/dist/src/filters/ColorMatrixFilters.mjs +0 -0
  470. package/dist/src/filters/ColorMatrixFilters.mjs.map +0 -0
  471. package/dist/src/filters/Composed.d.ts +0 -0
  472. package/dist/src/filters/Composed.d.ts.map +0 -0
  473. package/dist/src/filters/Composed.min.mjs +0 -0
  474. package/dist/src/filters/Composed.min.mjs.map +0 -0
  475. package/dist/src/filters/Composed.mjs +0 -0
  476. package/dist/src/filters/Composed.mjs.map +0 -0
  477. package/dist/src/filters/Contrast.d.ts +0 -0
  478. package/dist/src/filters/Contrast.d.ts.map +0 -0
  479. package/dist/src/filters/Contrast.min.mjs +0 -0
  480. package/dist/src/filters/Contrast.min.mjs.map +0 -0
  481. package/dist/src/filters/Contrast.mjs +0 -0
  482. package/dist/src/filters/Contrast.mjs.map +0 -0
  483. package/dist/src/filters/Convolute.d.ts +0 -0
  484. package/dist/src/filters/Convolute.d.ts.map +0 -0
  485. package/dist/src/filters/Convolute.min.mjs +0 -0
  486. package/dist/src/filters/Convolute.min.mjs.map +0 -0
  487. package/dist/src/filters/Convolute.mjs +0 -0
  488. package/dist/src/filters/Convolute.mjs.map +0 -0
  489. package/dist/src/filters/FilterBackend.d.ts +0 -0
  490. package/dist/src/filters/FilterBackend.d.ts.map +0 -0
  491. package/dist/src/filters/FilterBackend.min.mjs +0 -0
  492. package/dist/src/filters/FilterBackend.min.mjs.map +0 -0
  493. package/dist/src/filters/FilterBackend.mjs +0 -0
  494. package/dist/src/filters/FilterBackend.mjs.map +0 -0
  495. package/dist/src/filters/GLProbes/GLProbe.d.ts +0 -0
  496. package/dist/src/filters/GLProbes/GLProbe.d.ts.map +0 -0
  497. package/dist/src/filters/GLProbes/GLProbe.min.mjs +0 -0
  498. package/dist/src/filters/GLProbes/GLProbe.min.mjs.map +0 -0
  499. package/dist/src/filters/GLProbes/GLProbe.mjs +0 -0
  500. package/dist/src/filters/GLProbes/GLProbe.mjs.map +0 -0
  501. package/dist/src/filters/GLProbes/NodeGLProbe.d.ts +0 -0
  502. package/dist/src/filters/GLProbes/NodeGLProbe.d.ts.map +0 -0
  503. package/dist/src/filters/GLProbes/WebGLProbe.d.ts +0 -0
  504. package/dist/src/filters/GLProbes/WebGLProbe.d.ts.map +0 -0
  505. package/dist/src/filters/GLProbes/WebGLProbe.min.mjs +0 -0
  506. package/dist/src/filters/GLProbes/WebGLProbe.min.mjs.map +0 -0
  507. package/dist/src/filters/GLProbes/WebGLProbe.mjs +0 -0
  508. package/dist/src/filters/GLProbes/WebGLProbe.mjs.map +0 -0
  509. package/dist/src/filters/Gamma.d.ts +0 -0
  510. package/dist/src/filters/Gamma.d.ts.map +0 -0
  511. package/dist/src/filters/Gamma.min.mjs +0 -0
  512. package/dist/src/filters/Gamma.min.mjs.map +0 -0
  513. package/dist/src/filters/Gamma.mjs +0 -0
  514. package/dist/src/filters/Gamma.mjs.map +0 -0
  515. package/dist/src/filters/Grayscale.d.ts +0 -0
  516. package/dist/src/filters/Grayscale.d.ts.map +0 -0
  517. package/dist/src/filters/Grayscale.min.mjs +0 -0
  518. package/dist/src/filters/Grayscale.min.mjs.map +0 -0
  519. package/dist/src/filters/Grayscale.mjs +0 -0
  520. package/dist/src/filters/Grayscale.mjs.map +0 -0
  521. package/dist/src/filters/HueRotation.d.ts +0 -0
  522. package/dist/src/filters/HueRotation.d.ts.map +0 -0
  523. package/dist/src/filters/HueRotation.min.mjs +0 -0
  524. package/dist/src/filters/HueRotation.min.mjs.map +0 -0
  525. package/dist/src/filters/HueRotation.mjs +0 -0
  526. package/dist/src/filters/HueRotation.mjs.map +0 -0
  527. package/dist/src/filters/Invert.d.ts +0 -0
  528. package/dist/src/filters/Invert.d.ts.map +0 -0
  529. package/dist/src/filters/Invert.min.mjs +0 -0
  530. package/dist/src/filters/Invert.min.mjs.map +0 -0
  531. package/dist/src/filters/Invert.mjs +0 -0
  532. package/dist/src/filters/Invert.mjs.map +0 -0
  533. package/dist/src/filters/Noise.d.ts +0 -0
  534. package/dist/src/filters/Noise.d.ts.map +0 -0
  535. package/dist/src/filters/Noise.min.mjs +0 -0
  536. package/dist/src/filters/Noise.min.mjs.map +0 -0
  537. package/dist/src/filters/Noise.mjs +0 -0
  538. package/dist/src/filters/Noise.mjs.map +0 -0
  539. package/dist/src/filters/Pixelate.d.ts +0 -0
  540. package/dist/src/filters/Pixelate.d.ts.map +0 -0
  541. package/dist/src/filters/Pixelate.min.mjs +0 -0
  542. package/dist/src/filters/Pixelate.min.mjs.map +0 -0
  543. package/dist/src/filters/Pixelate.mjs +0 -0
  544. package/dist/src/filters/Pixelate.mjs.map +0 -0
  545. package/dist/src/filters/RemoveColor.d.ts +0 -0
  546. package/dist/src/filters/RemoveColor.d.ts.map +0 -0
  547. package/dist/src/filters/RemoveColor.min.mjs +0 -0
  548. package/dist/src/filters/RemoveColor.min.mjs.map +0 -0
  549. package/dist/src/filters/RemoveColor.mjs +0 -0
  550. package/dist/src/filters/RemoveColor.mjs.map +0 -0
  551. package/dist/src/filters/Resize.d.ts +0 -0
  552. package/dist/src/filters/Resize.d.ts.map +0 -0
  553. package/dist/src/filters/Resize.min.mjs +0 -0
  554. package/dist/src/filters/Resize.min.mjs.map +0 -0
  555. package/dist/src/filters/Resize.mjs +0 -0
  556. package/dist/src/filters/Resize.mjs.map +0 -0
  557. package/dist/src/filters/Saturation.d.ts +0 -0
  558. package/dist/src/filters/Saturation.d.ts.map +0 -0
  559. package/dist/src/filters/Saturation.min.mjs +0 -0
  560. package/dist/src/filters/Saturation.min.mjs.map +0 -0
  561. package/dist/src/filters/Saturation.mjs +0 -0
  562. package/dist/src/filters/Saturation.mjs.map +0 -0
  563. package/dist/src/filters/Vibrance.d.ts +0 -0
  564. package/dist/src/filters/Vibrance.d.ts.map +0 -0
  565. package/dist/src/filters/Vibrance.min.mjs +0 -0
  566. package/dist/src/filters/Vibrance.min.mjs.map +0 -0
  567. package/dist/src/filters/Vibrance.mjs +0 -0
  568. package/dist/src/filters/Vibrance.mjs.map +0 -0
  569. package/dist/src/filters/WebGLFilterBackend.d.ts +0 -0
  570. package/dist/src/filters/WebGLFilterBackend.d.ts.map +0 -0
  571. package/dist/src/filters/WebGLFilterBackend.min.mjs +0 -0
  572. package/dist/src/filters/WebGLFilterBackend.min.mjs.map +0 -0
  573. package/dist/src/filters/WebGLFilterBackend.mjs +0 -0
  574. package/dist/src/filters/WebGLFilterBackend.mjs.map +0 -0
  575. package/dist/src/filters/filters.d.ts +0 -0
  576. package/dist/src/filters/filters.d.ts.map +0 -0
  577. package/dist/src/filters/filters.min.mjs +0 -0
  578. package/dist/src/filters/filters.min.mjs.map +0 -0
  579. package/dist/src/filters/filters.mjs +0 -0
  580. package/dist/src/filters/filters.mjs.map +0 -0
  581. package/dist/src/filters/index.d.ts +0 -0
  582. package/dist/src/filters/index.d.ts.map +0 -0
  583. package/dist/src/filters/shaders/baseFilter.d.ts +0 -0
  584. package/dist/src/filters/shaders/baseFilter.d.ts.map +0 -0
  585. package/dist/src/filters/shaders/baseFilter.min.mjs +0 -0
  586. package/dist/src/filters/shaders/baseFilter.min.mjs.map +0 -0
  587. package/dist/src/filters/shaders/baseFilter.mjs +0 -0
  588. package/dist/src/filters/shaders/baseFilter.mjs.map +0 -0
  589. package/dist/src/filters/shaders/blendColor.d.ts +0 -0
  590. package/dist/src/filters/shaders/blendColor.d.ts.map +0 -0
  591. package/dist/src/filters/shaders/blendColor.min.mjs +0 -0
  592. package/dist/src/filters/shaders/blendColor.min.mjs.map +0 -0
  593. package/dist/src/filters/shaders/blendColor.mjs +0 -0
  594. package/dist/src/filters/shaders/blendColor.mjs.map +0 -0
  595. package/dist/src/filters/shaders/blendImage.d.ts +0 -0
  596. package/dist/src/filters/shaders/blendImage.d.ts.map +0 -0
  597. package/dist/src/filters/shaders/blendImage.min.mjs +0 -0
  598. package/dist/src/filters/shaders/blendImage.min.mjs.map +0 -0
  599. package/dist/src/filters/shaders/blendImage.mjs +0 -0
  600. package/dist/src/filters/shaders/blendImage.mjs.map +0 -0
  601. package/dist/src/filters/shaders/blur.d.ts +0 -0
  602. package/dist/src/filters/shaders/blur.d.ts.map +0 -0
  603. package/dist/src/filters/shaders/blur.min.mjs +0 -0
  604. package/dist/src/filters/shaders/blur.min.mjs.map +0 -0
  605. package/dist/src/filters/shaders/blur.mjs +0 -0
  606. package/dist/src/filters/shaders/blur.mjs.map +0 -0
  607. package/dist/src/filters/shaders/brightness.d.ts +0 -0
  608. package/dist/src/filters/shaders/brightness.d.ts.map +0 -0
  609. package/dist/src/filters/shaders/brightness.min.mjs +0 -0
  610. package/dist/src/filters/shaders/brightness.min.mjs.map +0 -0
  611. package/dist/src/filters/shaders/brightness.mjs +0 -0
  612. package/dist/src/filters/shaders/brightness.mjs.map +0 -0
  613. package/dist/src/filters/shaders/colorMatrix.d.ts +0 -0
  614. package/dist/src/filters/shaders/colorMatrix.d.ts.map +0 -0
  615. package/dist/src/filters/shaders/colorMatrix.min.mjs +0 -0
  616. package/dist/src/filters/shaders/colorMatrix.min.mjs.map +0 -0
  617. package/dist/src/filters/shaders/colorMatrix.mjs +0 -0
  618. package/dist/src/filters/shaders/colorMatrix.mjs.map +0 -0
  619. package/dist/src/filters/shaders/constrast.d.ts +0 -0
  620. package/dist/src/filters/shaders/constrast.d.ts.map +0 -0
  621. package/dist/src/filters/shaders/constrast.min.mjs +0 -0
  622. package/dist/src/filters/shaders/constrast.min.mjs.map +0 -0
  623. package/dist/src/filters/shaders/constrast.mjs +0 -0
  624. package/dist/src/filters/shaders/constrast.mjs.map +0 -0
  625. package/dist/src/filters/shaders/convolute.d.ts +0 -0
  626. package/dist/src/filters/shaders/convolute.d.ts.map +0 -0
  627. package/dist/src/filters/shaders/convolute.min.mjs +0 -0
  628. package/dist/src/filters/shaders/convolute.min.mjs.map +0 -0
  629. package/dist/src/filters/shaders/convolute.mjs +0 -0
  630. package/dist/src/filters/shaders/convolute.mjs.map +0 -0
  631. package/dist/src/filters/shaders/gamma.d.ts +0 -0
  632. package/dist/src/filters/shaders/gamma.d.ts.map +0 -0
  633. package/dist/src/filters/shaders/gamma.min.mjs +0 -0
  634. package/dist/src/filters/shaders/gamma.min.mjs.map +0 -0
  635. package/dist/src/filters/shaders/gamma.mjs +0 -0
  636. package/dist/src/filters/shaders/gamma.mjs.map +0 -0
  637. package/dist/src/filters/shaders/grayscale.d.ts +0 -0
  638. package/dist/src/filters/shaders/grayscale.d.ts.map +0 -0
  639. package/dist/src/filters/shaders/grayscale.min.mjs +0 -0
  640. package/dist/src/filters/shaders/grayscale.min.mjs.map +0 -0
  641. package/dist/src/filters/shaders/grayscale.mjs +0 -0
  642. package/dist/src/filters/shaders/grayscale.mjs.map +0 -0
  643. package/dist/src/filters/shaders/invert.d.ts +0 -0
  644. package/dist/src/filters/shaders/invert.d.ts.map +0 -0
  645. package/dist/src/filters/shaders/invert.min.mjs +0 -0
  646. package/dist/src/filters/shaders/invert.min.mjs.map +0 -0
  647. package/dist/src/filters/shaders/invert.mjs +0 -0
  648. package/dist/src/filters/shaders/invert.mjs.map +0 -0
  649. package/dist/src/filters/shaders/noise.d.ts +0 -0
  650. package/dist/src/filters/shaders/noise.d.ts.map +0 -0
  651. package/dist/src/filters/shaders/noise.min.mjs +0 -0
  652. package/dist/src/filters/shaders/noise.min.mjs.map +0 -0
  653. package/dist/src/filters/shaders/noise.mjs +0 -0
  654. package/dist/src/filters/shaders/noise.mjs.map +0 -0
  655. package/dist/src/filters/shaders/pixelate.d.ts +0 -0
  656. package/dist/src/filters/shaders/pixelate.d.ts.map +0 -0
  657. package/dist/src/filters/shaders/pixelate.min.mjs +0 -0
  658. package/dist/src/filters/shaders/pixelate.min.mjs.map +0 -0
  659. package/dist/src/filters/shaders/pixelate.mjs +0 -0
  660. package/dist/src/filters/shaders/pixelate.mjs.map +0 -0
  661. package/dist/src/filters/shaders/removeColor.d.ts +0 -0
  662. package/dist/src/filters/shaders/removeColor.d.ts.map +0 -0
  663. package/dist/src/filters/shaders/removeColor.min.mjs +0 -0
  664. package/dist/src/filters/shaders/removeColor.min.mjs.map +0 -0
  665. package/dist/src/filters/shaders/removeColor.mjs +0 -0
  666. package/dist/src/filters/shaders/removeColor.mjs.map +0 -0
  667. package/dist/src/filters/shaders/saturation.d.ts +0 -0
  668. package/dist/src/filters/shaders/saturation.d.ts.map +0 -0
  669. package/dist/src/filters/shaders/saturation.min.mjs +0 -0
  670. package/dist/src/filters/shaders/saturation.min.mjs.map +0 -0
  671. package/dist/src/filters/shaders/saturation.mjs +0 -0
  672. package/dist/src/filters/shaders/saturation.mjs.map +0 -0
  673. package/dist/src/filters/shaders/vibrance.d.ts +0 -0
  674. package/dist/src/filters/shaders/vibrance.d.ts.map +0 -0
  675. package/dist/src/filters/shaders/vibrance.min.mjs +0 -0
  676. package/dist/src/filters/shaders/vibrance.min.mjs.map +0 -0
  677. package/dist/src/filters/shaders/vibrance.mjs +0 -0
  678. package/dist/src/filters/shaders/vibrance.mjs.map +0 -0
  679. package/dist/src/filters/typedefs.d.ts +0 -0
  680. package/dist/src/filters/typedefs.d.ts.map +0 -0
  681. package/dist/src/filters/utils.d.ts +0 -0
  682. package/dist/src/filters/utils.d.ts.map +0 -0
  683. package/dist/src/filters/utils.min.mjs +0 -0
  684. package/dist/src/filters/utils.min.mjs.map +0 -0
  685. package/dist/src/filters/utils.mjs +0 -0
  686. package/dist/src/filters/utils.mjs.map +0 -0
  687. package/dist/src/gradient/Gradient.d.ts +0 -0
  688. package/dist/src/gradient/Gradient.d.ts.map +0 -0
  689. package/dist/src/gradient/Gradient.min.mjs +0 -0
  690. package/dist/src/gradient/Gradient.min.mjs.map +0 -0
  691. package/dist/src/gradient/Gradient.mjs +0 -0
  692. package/dist/src/gradient/Gradient.mjs.map +0 -0
  693. package/dist/src/gradient/constants.d.ts +0 -0
  694. package/dist/src/gradient/constants.d.ts.map +0 -0
  695. package/dist/src/gradient/constants.min.mjs +0 -0
  696. package/dist/src/gradient/constants.min.mjs.map +0 -0
  697. package/dist/src/gradient/constants.mjs +0 -0
  698. package/dist/src/gradient/constants.mjs.map +0 -0
  699. package/dist/src/gradient/index.d.ts +0 -0
  700. package/dist/src/gradient/index.d.ts.map +0 -0
  701. package/dist/src/gradient/parser/misc.d.ts +0 -0
  702. package/dist/src/gradient/parser/misc.d.ts.map +0 -0
  703. package/dist/src/gradient/parser/misc.min.mjs +0 -0
  704. package/dist/src/gradient/parser/misc.min.mjs.map +0 -0
  705. package/dist/src/gradient/parser/misc.mjs +0 -0
  706. package/dist/src/gradient/parser/misc.mjs.map +0 -0
  707. package/dist/src/gradient/parser/parseColorStops.d.ts +0 -0
  708. package/dist/src/gradient/parser/parseColorStops.d.ts.map +0 -0
  709. package/dist/src/gradient/parser/parseColorStops.min.mjs +0 -0
  710. package/dist/src/gradient/parser/parseColorStops.min.mjs.map +0 -0
  711. package/dist/src/gradient/parser/parseColorStops.mjs +0 -0
  712. package/dist/src/gradient/parser/parseColorStops.mjs.map +0 -0
  713. package/dist/src/gradient/parser/parseCoords.d.ts +0 -0
  714. package/dist/src/gradient/parser/parseCoords.d.ts.map +0 -0
  715. package/dist/src/gradient/parser/parseCoords.min.mjs +0 -0
  716. package/dist/src/gradient/parser/parseCoords.min.mjs.map +0 -0
  717. package/dist/src/gradient/parser/parseCoords.mjs +0 -0
  718. package/dist/src/gradient/parser/parseCoords.mjs.map +0 -0
  719. package/dist/src/gradient/typedefs.d.ts +0 -0
  720. package/dist/src/gradient/typedefs.d.ts.map +0 -0
  721. package/dist/src/mixins/eraser_brush.mixin.d.ts +0 -0
  722. package/dist/src/mixins/eraser_brush.mixin.d.ts.map +0 -0
  723. package/dist/src/parkinglot/canvas_animation.mixin.d.ts +0 -0
  724. package/dist/src/parkinglot/canvas_animation.mixin.d.ts.map +0 -0
  725. package/dist/src/parkinglot/straighten.d.ts +0 -0
  726. package/dist/src/parkinglot/straighten.d.ts.map +0 -0
  727. package/dist/src/parser/applyViewboxTransform.d.ts +0 -0
  728. package/dist/src/parser/applyViewboxTransform.d.ts.map +0 -0
  729. package/dist/src/parser/applyViewboxTransform.min.mjs +0 -0
  730. package/dist/src/parser/applyViewboxTransform.min.mjs.map +0 -0
  731. package/dist/src/parser/applyViewboxTransform.mjs +0 -0
  732. package/dist/src/parser/applyViewboxTransform.mjs.map +0 -0
  733. package/dist/src/parser/attributes.d.ts +0 -0
  734. package/dist/src/parser/attributes.d.ts.map +0 -0
  735. package/dist/src/parser/attributes.min.mjs +0 -0
  736. package/dist/src/parser/attributes.min.mjs.map +0 -0
  737. package/dist/src/parser/attributes.mjs +0 -0
  738. package/dist/src/parser/attributes.mjs.map +0 -0
  739. package/dist/src/parser/constants.d.ts +0 -0
  740. package/dist/src/parser/constants.d.ts.map +0 -0
  741. package/dist/src/parser/constants.min.mjs +0 -0
  742. package/dist/src/parser/constants.min.mjs.map +0 -0
  743. package/dist/src/parser/constants.mjs +0 -0
  744. package/dist/src/parser/constants.mjs.map +0 -0
  745. package/dist/src/parser/doesSomeParentMatch.d.ts +0 -0
  746. package/dist/src/parser/doesSomeParentMatch.d.ts.map +0 -0
  747. package/dist/src/parser/doesSomeParentMatch.min.mjs +0 -0
  748. package/dist/src/parser/doesSomeParentMatch.min.mjs.map +0 -0
  749. package/dist/src/parser/doesSomeParentMatch.mjs +0 -0
  750. package/dist/src/parser/doesSomeParentMatch.mjs.map +0 -0
  751. package/dist/src/parser/elementMatchesRule.d.ts +0 -0
  752. package/dist/src/parser/elementMatchesRule.d.ts.map +0 -0
  753. package/dist/src/parser/elementMatchesRule.min.mjs +0 -0
  754. package/dist/src/parser/elementMatchesRule.min.mjs.map +0 -0
  755. package/dist/src/parser/elementMatchesRule.mjs +0 -0
  756. package/dist/src/parser/elementMatchesRule.mjs.map +0 -0
  757. package/dist/src/parser/elements_parser.d.ts +0 -0
  758. package/dist/src/parser/elements_parser.d.ts.map +0 -0
  759. package/dist/src/parser/elements_parser.min.mjs +0 -0
  760. package/dist/src/parser/elements_parser.min.mjs.map +0 -0
  761. package/dist/src/parser/elements_parser.mjs +0 -0
  762. package/dist/src/parser/elements_parser.mjs.map +0 -0
  763. package/dist/src/parser/getCSSRules.d.ts +0 -0
  764. package/dist/src/parser/getCSSRules.d.ts.map +0 -0
  765. package/dist/src/parser/getCSSRules.min.mjs +0 -0
  766. package/dist/src/parser/getCSSRules.min.mjs.map +0 -0
  767. package/dist/src/parser/getCSSRules.mjs +0 -0
  768. package/dist/src/parser/getCSSRules.mjs.map +0 -0
  769. package/dist/src/parser/getGlobalStylesForElement.d.ts +0 -0
  770. package/dist/src/parser/getGlobalStylesForElement.d.ts.map +0 -0
  771. package/dist/src/parser/getGlobalStylesForElement.min.mjs +0 -0
  772. package/dist/src/parser/getGlobalStylesForElement.min.mjs.map +0 -0
  773. package/dist/src/parser/getGlobalStylesForElement.mjs +0 -0
  774. package/dist/src/parser/getGlobalStylesForElement.mjs.map +0 -0
  775. package/dist/src/parser/getGradientDefs.d.ts +0 -0
  776. package/dist/src/parser/getGradientDefs.d.ts.map +0 -0
  777. package/dist/src/parser/getGradientDefs.min.mjs +0 -0
  778. package/dist/src/parser/getGradientDefs.min.mjs.map +0 -0
  779. package/dist/src/parser/getGradientDefs.mjs +0 -0
  780. package/dist/src/parser/getGradientDefs.mjs.map +0 -0
  781. package/dist/src/parser/getMultipleNodes.d.ts +0 -0
  782. package/dist/src/parser/getMultipleNodes.d.ts.map +0 -0
  783. package/dist/src/parser/getMultipleNodes.min.mjs +0 -0
  784. package/dist/src/parser/getMultipleNodes.min.mjs.map +0 -0
  785. package/dist/src/parser/getMultipleNodes.mjs +0 -0
  786. package/dist/src/parser/getMultipleNodes.mjs.map +0 -0
  787. package/dist/src/parser/getSvgRegex.d.ts +0 -0
  788. package/dist/src/parser/getSvgRegex.d.ts.map +0 -0
  789. package/dist/src/parser/getSvgRegex.min.mjs +0 -0
  790. package/dist/src/parser/getSvgRegex.min.mjs.map +0 -0
  791. package/dist/src/parser/getSvgRegex.mjs +0 -0
  792. package/dist/src/parser/getSvgRegex.mjs.map +0 -0
  793. package/dist/src/parser/getTagName.d.ts +0 -0
  794. package/dist/src/parser/getTagName.d.ts.map +0 -0
  795. package/dist/src/parser/getTagName.min.mjs +0 -0
  796. package/dist/src/parser/getTagName.min.mjs.map +0 -0
  797. package/dist/src/parser/getTagName.mjs +0 -0
  798. package/dist/src/parser/getTagName.mjs.map +0 -0
  799. package/dist/src/parser/hasInvalidAncestor.d.ts +0 -0
  800. package/dist/src/parser/hasInvalidAncestor.d.ts.map +0 -0
  801. package/dist/src/parser/hasInvalidAncestor.min.mjs +0 -0
  802. package/dist/src/parser/hasInvalidAncestor.min.mjs.map +0 -0
  803. package/dist/src/parser/hasInvalidAncestor.mjs +0 -0
  804. package/dist/src/parser/hasInvalidAncestor.mjs.map +0 -0
  805. package/dist/src/parser/loadSVGFromString.d.ts +0 -0
  806. package/dist/src/parser/loadSVGFromString.d.ts.map +0 -0
  807. package/dist/src/parser/loadSVGFromString.min.mjs +0 -0
  808. package/dist/src/parser/loadSVGFromString.min.mjs.map +0 -0
  809. package/dist/src/parser/loadSVGFromString.mjs +0 -0
  810. package/dist/src/parser/loadSVGFromString.mjs.map +0 -0
  811. package/dist/src/parser/loadSVGFromURL.d.ts +0 -0
  812. package/dist/src/parser/loadSVGFromURL.d.ts.map +0 -0
  813. package/dist/src/parser/loadSVGFromURL.min.mjs +0 -0
  814. package/dist/src/parser/loadSVGFromURL.min.mjs.map +0 -0
  815. package/dist/src/parser/loadSVGFromURL.mjs +0 -0
  816. package/dist/src/parser/loadSVGFromURL.mjs.map +0 -0
  817. package/dist/src/parser/normalizeAttr.d.ts +0 -0
  818. package/dist/src/parser/normalizeAttr.d.ts.map +0 -0
  819. package/dist/src/parser/normalizeAttr.min.mjs +0 -0
  820. package/dist/src/parser/normalizeAttr.min.mjs.map +0 -0
  821. package/dist/src/parser/normalizeAttr.mjs +0 -0
  822. package/dist/src/parser/normalizeAttr.mjs.map +0 -0
  823. package/dist/src/parser/normalizeValue.d.ts +0 -0
  824. package/dist/src/parser/normalizeValue.d.ts.map +0 -0
  825. package/dist/src/parser/normalizeValue.min.mjs +0 -0
  826. package/dist/src/parser/normalizeValue.min.mjs.map +0 -0
  827. package/dist/src/parser/normalizeValue.mjs +0 -0
  828. package/dist/src/parser/normalizeValue.mjs.map +0 -0
  829. package/dist/src/parser/parseAttributes.d.ts +0 -0
  830. package/dist/src/parser/parseAttributes.d.ts.map +0 -0
  831. package/dist/src/parser/parseAttributes.min.mjs +0 -0
  832. package/dist/src/parser/parseAttributes.min.mjs.map +0 -0
  833. package/dist/src/parser/parseAttributes.mjs +0 -0
  834. package/dist/src/parser/parseAttributes.mjs.map +0 -0
  835. package/dist/src/parser/parseFontDeclaration.d.ts +0 -0
  836. package/dist/src/parser/parseFontDeclaration.d.ts.map +0 -0
  837. package/dist/src/parser/parseFontDeclaration.min.mjs +0 -0
  838. package/dist/src/parser/parseFontDeclaration.min.mjs.map +0 -0
  839. package/dist/src/parser/parseFontDeclaration.mjs +0 -0
  840. package/dist/src/parser/parseFontDeclaration.mjs.map +0 -0
  841. package/dist/src/parser/parsePointsAttribute.d.ts +0 -0
  842. package/dist/src/parser/parsePointsAttribute.d.ts.map +0 -0
  843. package/dist/src/parser/parsePointsAttribute.min.mjs +0 -0
  844. package/dist/src/parser/parsePointsAttribute.min.mjs.map +0 -0
  845. package/dist/src/parser/parsePointsAttribute.mjs +0 -0
  846. package/dist/src/parser/parsePointsAttribute.mjs.map +0 -0
  847. package/dist/src/parser/parseSVGDocument.d.ts +0 -0
  848. package/dist/src/parser/parseSVGDocument.d.ts.map +0 -0
  849. package/dist/src/parser/parseSVGDocument.min.mjs +0 -0
  850. package/dist/src/parser/parseSVGDocument.min.mjs.map +0 -0
  851. package/dist/src/parser/parseSVGDocument.mjs +0 -0
  852. package/dist/src/parser/parseSVGDocument.mjs.map +0 -0
  853. package/dist/src/parser/parseStyleAttribute.d.ts +0 -0
  854. package/dist/src/parser/parseStyleAttribute.d.ts.map +0 -0
  855. package/dist/src/parser/parseStyleAttribute.min.mjs +0 -0
  856. package/dist/src/parser/parseStyleAttribute.min.mjs.map +0 -0
  857. package/dist/src/parser/parseStyleAttribute.mjs +0 -0
  858. package/dist/src/parser/parseStyleAttribute.mjs.map +0 -0
  859. package/dist/src/parser/parseStyleObject.d.ts +0 -0
  860. package/dist/src/parser/parseStyleObject.d.ts.map +0 -0
  861. package/dist/src/parser/parseStyleObject.min.mjs +0 -0
  862. package/dist/src/parser/parseStyleObject.min.mjs.map +0 -0
  863. package/dist/src/parser/parseStyleObject.mjs +0 -0
  864. package/dist/src/parser/parseStyleObject.mjs.map +0 -0
  865. package/dist/src/parser/parseStyleString.d.ts +0 -0
  866. package/dist/src/parser/parseStyleString.d.ts.map +0 -0
  867. package/dist/src/parser/parseStyleString.min.mjs +0 -0
  868. package/dist/src/parser/parseStyleString.min.mjs.map +0 -0
  869. package/dist/src/parser/parseStyleString.mjs +0 -0
  870. package/dist/src/parser/parseStyleString.mjs.map +0 -0
  871. package/dist/src/parser/parseTransformAttribute.d.ts +0 -0
  872. package/dist/src/parser/parseTransformAttribute.d.ts.map +0 -0
  873. package/dist/src/parser/parseTransformAttribute.min.mjs +0 -0
  874. package/dist/src/parser/parseTransformAttribute.min.mjs.map +0 -0
  875. package/dist/src/parser/parseTransformAttribute.mjs +0 -0
  876. package/dist/src/parser/parseTransformAttribute.mjs.map +0 -0
  877. package/dist/src/parser/parseUseDirectives.d.ts +0 -0
  878. package/dist/src/parser/parseUseDirectives.d.ts.map +0 -0
  879. package/dist/src/parser/parseUseDirectives.min.mjs +0 -0
  880. package/dist/src/parser/parseUseDirectives.min.mjs.map +0 -0
  881. package/dist/src/parser/parseUseDirectives.mjs +0 -0
  882. package/dist/src/parser/parseUseDirectives.mjs.map +0 -0
  883. package/dist/src/parser/percent.d.ts +0 -0
  884. package/dist/src/parser/percent.d.ts.map +0 -0
  885. package/dist/src/parser/percent.min.mjs +0 -0
  886. package/dist/src/parser/percent.min.mjs.map +0 -0
  887. package/dist/src/parser/percent.mjs +0 -0
  888. package/dist/src/parser/percent.mjs.map +0 -0
  889. package/dist/src/parser/recursivelyParseGradientsXlink.d.ts +0 -0
  890. package/dist/src/parser/recursivelyParseGradientsXlink.d.ts.map +0 -0
  891. package/dist/src/parser/recursivelyParseGradientsXlink.min.mjs +0 -0
  892. package/dist/src/parser/recursivelyParseGradientsXlink.min.mjs.map +0 -0
  893. package/dist/src/parser/recursivelyParseGradientsXlink.mjs +0 -0
  894. package/dist/src/parser/recursivelyParseGradientsXlink.mjs.map +0 -0
  895. package/dist/src/parser/selectorMatches.d.ts +0 -0
  896. package/dist/src/parser/selectorMatches.d.ts.map +0 -0
  897. package/dist/src/parser/selectorMatches.min.mjs +0 -0
  898. package/dist/src/parser/selectorMatches.min.mjs.map +0 -0
  899. package/dist/src/parser/selectorMatches.mjs +0 -0
  900. package/dist/src/parser/selectorMatches.mjs.map +0 -0
  901. package/dist/src/parser/setStrokeFillOpacity.d.ts +0 -0
  902. package/dist/src/parser/setStrokeFillOpacity.d.ts.map +0 -0
  903. package/dist/src/parser/setStrokeFillOpacity.min.mjs +0 -0
  904. package/dist/src/parser/setStrokeFillOpacity.min.mjs.map +0 -0
  905. package/dist/src/parser/setStrokeFillOpacity.mjs +0 -0
  906. package/dist/src/parser/setStrokeFillOpacity.mjs.map +0 -0
  907. package/dist/src/parser/typedefs.d.ts +0 -0
  908. package/dist/src/parser/typedefs.d.ts.map +0 -0
  909. package/dist/src/shapes/ActiveSelection.d.ts +0 -0
  910. package/dist/src/shapes/ActiveSelection.d.ts.map +0 -0
  911. package/dist/src/shapes/ActiveSelection.min.mjs +0 -0
  912. package/dist/src/shapes/ActiveSelection.min.mjs.map +0 -0
  913. package/dist/src/shapes/ActiveSelection.mjs +0 -0
  914. package/dist/src/shapes/ActiveSelection.mjs.map +0 -0
  915. package/dist/src/shapes/Circle.d.ts +0 -0
  916. package/dist/src/shapes/Circle.d.ts.map +0 -0
  917. package/dist/src/shapes/Circle.min.mjs +0 -0
  918. package/dist/src/shapes/Circle.min.mjs.map +0 -0
  919. package/dist/src/shapes/Circle.mjs +0 -0
  920. package/dist/src/shapes/Circle.mjs.map +0 -0
  921. package/dist/src/shapes/Ellipse.d.ts +0 -0
  922. package/dist/src/shapes/Ellipse.d.ts.map +0 -0
  923. package/dist/src/shapes/Ellipse.min.mjs +0 -0
  924. package/dist/src/shapes/Ellipse.min.mjs.map +0 -0
  925. package/dist/src/shapes/Ellipse.mjs +0 -0
  926. package/dist/src/shapes/Ellipse.mjs.map +0 -0
  927. package/dist/src/shapes/Group.d.ts +0 -0
  928. package/dist/src/shapes/Group.d.ts.map +0 -0
  929. package/dist/src/shapes/Group.min.mjs +0 -0
  930. package/dist/src/shapes/Group.min.mjs.map +0 -0
  931. package/dist/src/shapes/Group.mjs +0 -0
  932. package/dist/src/shapes/Group.mjs.map +0 -0
  933. package/dist/src/shapes/IText/DraggableTextDelegate.d.ts +0 -0
  934. package/dist/src/shapes/IText/DraggableTextDelegate.d.ts.map +0 -0
  935. package/dist/src/shapes/IText/DraggableTextDelegate.min.mjs +0 -0
  936. package/dist/src/shapes/IText/DraggableTextDelegate.min.mjs.map +0 -0
  937. package/dist/src/shapes/IText/DraggableTextDelegate.mjs +0 -0
  938. package/dist/src/shapes/IText/DraggableTextDelegate.mjs.map +0 -0
  939. package/dist/src/shapes/IText/IText.d.ts +0 -0
  940. package/dist/src/shapes/IText/IText.d.ts.map +0 -0
  941. package/dist/src/shapes/IText/IText.min.mjs +0 -0
  942. package/dist/src/shapes/IText/IText.min.mjs.map +1 -1
  943. package/dist/src/shapes/IText/IText.mjs +206 -206
  944. package/dist/src/shapes/IText/IText.mjs.map +1 -1
  945. package/dist/src/shapes/IText/ITextBehavior.d.ts +0 -0
  946. package/dist/src/shapes/IText/ITextBehavior.d.ts.map +0 -0
  947. package/dist/src/shapes/IText/ITextBehavior.min.mjs +0 -0
  948. package/dist/src/shapes/IText/ITextBehavior.min.mjs.map +1 -1
  949. package/dist/src/shapes/IText/ITextBehavior.mjs +152 -152
  950. package/dist/src/shapes/IText/ITextBehavior.mjs.map +1 -1
  951. package/dist/src/shapes/IText/ITextClickBehavior.d.ts +0 -0
  952. package/dist/src/shapes/IText/ITextClickBehavior.d.ts.map +0 -0
  953. package/dist/src/shapes/IText/ITextClickBehavior.min.mjs +0 -0
  954. package/dist/src/shapes/IText/ITextClickBehavior.min.mjs.map +1 -1
  955. package/dist/src/shapes/IText/ITextClickBehavior.mjs +36 -36
  956. package/dist/src/shapes/IText/ITextClickBehavior.mjs.map +1 -1
  957. package/dist/src/shapes/IText/ITextKeyBehavior.d.ts +0 -0
  958. package/dist/src/shapes/IText/ITextKeyBehavior.d.ts.map +0 -0
  959. package/dist/src/shapes/IText/ITextKeyBehavior.min.mjs +0 -0
  960. package/dist/src/shapes/IText/ITextKeyBehavior.min.mjs.map +0 -0
  961. package/dist/src/shapes/IText/ITextKeyBehavior.mjs +0 -0
  962. package/dist/src/shapes/IText/ITextKeyBehavior.mjs.map +0 -0
  963. package/dist/src/shapes/IText/constants.d.ts +0 -0
  964. package/dist/src/shapes/IText/constants.d.ts.map +0 -0
  965. package/dist/src/shapes/IText/constants.min.mjs +0 -0
  966. package/dist/src/shapes/IText/constants.min.mjs.map +0 -0
  967. package/dist/src/shapes/IText/constants.mjs +0 -0
  968. package/dist/src/shapes/IText/constants.mjs.map +0 -0
  969. package/dist/src/shapes/Image.d.ts +0 -0
  970. package/dist/src/shapes/Image.d.ts.map +0 -0
  971. package/dist/src/shapes/Image.min.mjs +0 -0
  972. package/dist/src/shapes/Image.min.mjs.map +0 -0
  973. package/dist/src/shapes/Image.mjs +0 -0
  974. package/dist/src/shapes/Image.mjs.map +0 -0
  975. package/dist/src/shapes/Line.d.ts +31 -86
  976. package/dist/src/shapes/Line.d.ts.map +1 -1
  977. package/dist/src/shapes/Line.min.mjs +1 -1
  978. package/dist/src/shapes/Line.min.mjs.map +1 -1
  979. package/dist/src/shapes/Line.mjs +323 -154
  980. package/dist/src/shapes/Line.mjs.map +1 -1
  981. package/dist/src/shapes/Object/FabricObject.d.ts +0 -0
  982. package/dist/src/shapes/Object/FabricObject.d.ts.map +0 -0
  983. package/dist/src/shapes/Object/FabricObject.min.mjs +0 -0
  984. package/dist/src/shapes/Object/FabricObject.min.mjs.map +0 -0
  985. package/dist/src/shapes/Object/FabricObject.mjs +0 -0
  986. package/dist/src/shapes/Object/FabricObject.mjs.map +0 -0
  987. package/dist/src/shapes/Object/FabricObjectSVGExportMixin.d.ts +0 -0
  988. package/dist/src/shapes/Object/FabricObjectSVGExportMixin.d.ts.map +0 -0
  989. package/dist/src/shapes/Object/FabricObjectSVGExportMixin.min.mjs +0 -0
  990. package/dist/src/shapes/Object/FabricObjectSVGExportMixin.min.mjs.map +0 -0
  991. package/dist/src/shapes/Object/FabricObjectSVGExportMixin.mjs +0 -0
  992. package/dist/src/shapes/Object/FabricObjectSVGExportMixin.mjs.map +0 -0
  993. package/dist/src/shapes/Object/InteractiveObject.d.ts +0 -0
  994. package/dist/src/shapes/Object/InteractiveObject.d.ts.map +0 -0
  995. package/dist/src/shapes/Object/InteractiveObject.min.mjs +0 -0
  996. package/dist/src/shapes/Object/InteractiveObject.min.mjs.map +0 -0
  997. package/dist/src/shapes/Object/InteractiveObject.mjs +0 -0
  998. package/dist/src/shapes/Object/InteractiveObject.mjs.map +0 -0
  999. package/dist/src/shapes/Object/Object.d.ts +0 -0
  1000. package/dist/src/shapes/Object/Object.d.ts.map +0 -0
  1001. package/dist/src/shapes/Object/Object.min.mjs +0 -0
  1002. package/dist/src/shapes/Object/Object.min.mjs.map +0 -0
  1003. package/dist/src/shapes/Object/Object.mjs +0 -0
  1004. package/dist/src/shapes/Object/Object.mjs.map +0 -0
  1005. package/dist/src/shapes/Object/ObjectGeometry.d.ts +0 -0
  1006. package/dist/src/shapes/Object/ObjectGeometry.d.ts.map +0 -0
  1007. package/dist/src/shapes/Object/ObjectGeometry.min.mjs +0 -0
  1008. package/dist/src/shapes/Object/ObjectGeometry.min.mjs.map +0 -0
  1009. package/dist/src/shapes/Object/ObjectGeometry.mjs +0 -0
  1010. package/dist/src/shapes/Object/ObjectGeometry.mjs.map +0 -0
  1011. package/dist/src/shapes/Object/defaultValues.d.ts +0 -0
  1012. package/dist/src/shapes/Object/defaultValues.d.ts.map +0 -0
  1013. package/dist/src/shapes/Object/defaultValues.min.mjs +0 -0
  1014. package/dist/src/shapes/Object/defaultValues.min.mjs.map +0 -0
  1015. package/dist/src/shapes/Object/defaultValues.mjs +0 -0
  1016. package/dist/src/shapes/Object/defaultValues.mjs.map +0 -0
  1017. package/dist/src/shapes/Object/types/BaseProps.d.ts +0 -0
  1018. package/dist/src/shapes/Object/types/BaseProps.d.ts.map +0 -0
  1019. package/dist/src/shapes/Object/types/BorderProps.d.ts +0 -0
  1020. package/dist/src/shapes/Object/types/BorderProps.d.ts.map +0 -0
  1021. package/dist/src/shapes/Object/types/ControlProps.d.ts +0 -0
  1022. package/dist/src/shapes/Object/types/ControlProps.d.ts.map +0 -0
  1023. package/dist/src/shapes/Object/types/FabricObjectProps.d.ts +0 -0
  1024. package/dist/src/shapes/Object/types/FabricObjectProps.d.ts.map +0 -0
  1025. package/dist/src/shapes/Object/types/FillStrokeProps.d.ts +0 -0
  1026. package/dist/src/shapes/Object/types/FillStrokeProps.d.ts.map +0 -0
  1027. package/dist/src/shapes/Object/types/LockInteractionProps.d.ts +0 -0
  1028. package/dist/src/shapes/Object/types/LockInteractionProps.d.ts.map +0 -0
  1029. package/dist/src/shapes/Object/types/ObjectProps.d.ts +0 -0
  1030. package/dist/src/shapes/Object/types/ObjectProps.d.ts.map +0 -0
  1031. package/dist/src/shapes/Object/types/ObjectTransformProps.d.ts +0 -0
  1032. package/dist/src/shapes/Object/types/ObjectTransformProps.d.ts.map +0 -0
  1033. package/dist/src/shapes/Object/types/SerializedObjectProps.d.ts +0 -0
  1034. package/dist/src/shapes/Object/types/SerializedObjectProps.d.ts.map +0 -0
  1035. package/dist/src/shapes/Object/types/index.d.ts +0 -0
  1036. package/dist/src/shapes/Object/types/index.d.ts.map +0 -0
  1037. package/dist/src/shapes/Path.d.ts +0 -0
  1038. package/dist/src/shapes/Path.d.ts.map +0 -0
  1039. package/dist/src/shapes/Path.min.mjs +0 -0
  1040. package/dist/src/shapes/Path.min.mjs.map +0 -0
  1041. package/dist/src/shapes/Path.mjs +0 -0
  1042. package/dist/src/shapes/Path.mjs.map +0 -0
  1043. package/dist/src/shapes/Polygon.d.ts +0 -0
  1044. package/dist/src/shapes/Polygon.d.ts.map +0 -0
  1045. package/dist/src/shapes/Polygon.min.mjs +0 -0
  1046. package/dist/src/shapes/Polygon.min.mjs.map +0 -0
  1047. package/dist/src/shapes/Polygon.mjs +0 -0
  1048. package/dist/src/shapes/Polygon.mjs.map +0 -0
  1049. package/dist/src/shapes/Polyline.d.ts +7 -0
  1050. package/dist/src/shapes/Polyline.d.ts.map +1 -1
  1051. package/dist/src/shapes/Polyline.min.mjs +1 -1
  1052. package/dist/src/shapes/Polyline.min.mjs.map +1 -1
  1053. package/dist/src/shapes/Polyline.mjs +48 -16
  1054. package/dist/src/shapes/Polyline.mjs.map +1 -1
  1055. package/dist/src/shapes/Rect.d.ts +0 -0
  1056. package/dist/src/shapes/Rect.d.ts.map +0 -0
  1057. package/dist/src/shapes/Rect.min.mjs +0 -0
  1058. package/dist/src/shapes/Rect.min.mjs.map +0 -0
  1059. package/dist/src/shapes/Rect.mjs +0 -0
  1060. package/dist/src/shapes/Rect.mjs.map +0 -0
  1061. package/dist/src/shapes/Text/StyledText.d.ts +0 -0
  1062. package/dist/src/shapes/Text/StyledText.d.ts.map +0 -0
  1063. package/dist/src/shapes/Text/StyledText.min.mjs +0 -0
  1064. package/dist/src/shapes/Text/StyledText.min.mjs.map +0 -0
  1065. package/dist/src/shapes/Text/StyledText.mjs +0 -0
  1066. package/dist/src/shapes/Text/StyledText.mjs.map +0 -0
  1067. package/dist/src/shapes/Text/Text.d.ts +0 -0
  1068. package/dist/src/shapes/Text/Text.d.ts.map +0 -0
  1069. package/dist/src/shapes/Text/Text.min.mjs +0 -0
  1070. package/dist/src/shapes/Text/Text.min.mjs.map +1 -1
  1071. package/dist/src/shapes/Text/Text.mjs +283 -283
  1072. package/dist/src/shapes/Text/Text.mjs.map +1 -1
  1073. package/dist/src/shapes/Text/TextSVGExportMixin.d.ts +0 -0
  1074. package/dist/src/shapes/Text/TextSVGExportMixin.d.ts.map +0 -0
  1075. package/dist/src/shapes/Text/TextSVGExportMixin.min.mjs +0 -0
  1076. package/dist/src/shapes/Text/TextSVGExportMixin.min.mjs.map +0 -0
  1077. package/dist/src/shapes/Text/TextSVGExportMixin.mjs +0 -0
  1078. package/dist/src/shapes/Text/TextSVGExportMixin.mjs.map +0 -0
  1079. package/dist/src/shapes/Text/constants.d.ts +0 -0
  1080. package/dist/src/shapes/Text/constants.d.ts.map +0 -0
  1081. package/dist/src/shapes/Text/constants.min.mjs +0 -0
  1082. package/dist/src/shapes/Text/constants.min.mjs.map +1 -1
  1083. package/dist/src/shapes/Text/constants.mjs +0 -0
  1084. package/dist/src/shapes/Text/constants.mjs.map +1 -1
  1085. package/dist/src/shapes/Textbox.d.ts +0 -0
  1086. package/dist/src/shapes/Textbox.d.ts.map +0 -0
  1087. package/dist/src/shapes/Textbox.min.mjs +0 -0
  1088. package/dist/src/shapes/Textbox.min.mjs.map +1 -1
  1089. package/dist/src/shapes/Textbox.mjs +147 -147
  1090. package/dist/src/shapes/Textbox.mjs.map +1 -1
  1091. package/dist/src/shapes/Triangle.d.ts +27 -2
  1092. package/dist/src/shapes/Triangle.d.ts.map +1 -1
  1093. package/dist/src/shapes/Triangle.min.mjs +1 -1
  1094. package/dist/src/shapes/Triangle.min.mjs.map +1 -1
  1095. package/dist/src/shapes/Triangle.mjs +72 -12
  1096. package/dist/src/shapes/Triangle.mjs.map +1 -1
  1097. package/dist/src/text/browserLines.d.ts +0 -0
  1098. package/dist/src/text/browserLines.d.ts.map +0 -0
  1099. package/dist/src/text/browserLines.min.mjs +0 -0
  1100. package/dist/src/text/browserLines.min.mjs.map +1 -1
  1101. package/dist/src/text/browserLines.mjs +20 -20
  1102. package/dist/src/text/browserLines.mjs.map +1 -1
  1103. package/dist/src/text/ellipsis.d.ts +0 -0
  1104. package/dist/src/text/ellipsis.d.ts.map +0 -0
  1105. package/dist/src/text/ellipsis.min.mjs +0 -0
  1106. package/dist/src/text/ellipsis.min.mjs.map +1 -1
  1107. package/dist/src/text/ellipsis.mjs +11 -11
  1108. package/dist/src/text/ellipsis.mjs.map +1 -1
  1109. package/dist/src/text/hitTest.d.ts +0 -0
  1110. package/dist/src/text/hitTest.d.ts.map +0 -0
  1111. package/dist/src/text/hitTest.min.mjs +0 -0
  1112. package/dist/src/text/hitTest.min.mjs.map +1 -1
  1113. package/dist/src/text/hitTest.mjs +19 -19
  1114. package/dist/src/text/hitTest.mjs.map +1 -1
  1115. package/dist/src/text/layout.d.ts +0 -0
  1116. package/dist/src/text/layout.d.ts.map +0 -0
  1117. package/dist/src/text/layout.min.mjs +0 -0
  1118. package/dist/src/text/layout.min.mjs.map +1 -1
  1119. package/dist/src/text/layout.mjs +33 -33
  1120. package/dist/src/text/layout.mjs.map +1 -1
  1121. package/dist/src/text/measure.d.ts +0 -0
  1122. package/dist/src/text/measure.d.ts.map +0 -0
  1123. package/dist/src/text/measure.min.mjs +0 -0
  1124. package/dist/src/text/measure.min.mjs.map +1 -1
  1125. package/dist/src/text/measure.mjs +20 -20
  1126. package/dist/src/text/measure.mjs.map +1 -1
  1127. package/dist/src/text/overlayEditor.d.ts +0 -0
  1128. package/dist/src/text/overlayEditor.d.ts.map +0 -0
  1129. package/dist/src/text/overlayEditor.min.mjs +0 -0
  1130. package/dist/src/text/overlayEditor.min.mjs.map +1 -1
  1131. package/dist/src/text/overlayEditor.mjs +33 -33
  1132. package/dist/src/text/overlayEditor.mjs.map +1 -1
  1133. package/dist/src/text/unicode.d.ts +0 -0
  1134. package/dist/src/text/unicode.d.ts.map +0 -0
  1135. package/dist/src/text/unicode.min.mjs +0 -0
  1136. package/dist/src/text/unicode.min.mjs.map +1 -1
  1137. package/dist/src/text/unicode.mjs +8 -8
  1138. package/dist/src/text/unicode.mjs.map +1 -1
  1139. package/dist/src/typedefs.d.ts +0 -0
  1140. package/dist/src/typedefs.d.ts.map +0 -0
  1141. package/dist/src/util/animation/AnimationBase.d.ts +0 -0
  1142. package/dist/src/util/animation/AnimationBase.d.ts.map +0 -0
  1143. package/dist/src/util/animation/AnimationBase.min.mjs +0 -0
  1144. package/dist/src/util/animation/AnimationBase.min.mjs.map +0 -0
  1145. package/dist/src/util/animation/AnimationBase.mjs +0 -0
  1146. package/dist/src/util/animation/AnimationBase.mjs.map +0 -0
  1147. package/dist/src/util/animation/AnimationFrameProvider.d.ts +0 -0
  1148. package/dist/src/util/animation/AnimationFrameProvider.d.ts.map +0 -0
  1149. package/dist/src/util/animation/AnimationFrameProvider.min.mjs +0 -0
  1150. package/dist/src/util/animation/AnimationFrameProvider.min.mjs.map +0 -0
  1151. package/dist/src/util/animation/AnimationFrameProvider.mjs +0 -0
  1152. package/dist/src/util/animation/AnimationFrameProvider.mjs.map +0 -0
  1153. package/dist/src/util/animation/AnimationRegistry.d.ts +0 -0
  1154. package/dist/src/util/animation/AnimationRegistry.d.ts.map +0 -0
  1155. package/dist/src/util/animation/AnimationRegistry.min.mjs +0 -0
  1156. package/dist/src/util/animation/AnimationRegistry.min.mjs.map +0 -0
  1157. package/dist/src/util/animation/AnimationRegistry.mjs +0 -0
  1158. package/dist/src/util/animation/AnimationRegistry.mjs.map +0 -0
  1159. package/dist/src/util/animation/ArrayAnimation.d.ts +0 -0
  1160. package/dist/src/util/animation/ArrayAnimation.d.ts.map +0 -0
  1161. package/dist/src/util/animation/ArrayAnimation.min.mjs +0 -0
  1162. package/dist/src/util/animation/ArrayAnimation.min.mjs.map +0 -0
  1163. package/dist/src/util/animation/ArrayAnimation.mjs +0 -0
  1164. package/dist/src/util/animation/ArrayAnimation.mjs.map +0 -0
  1165. package/dist/src/util/animation/ColorAnimation.d.ts +0 -0
  1166. package/dist/src/util/animation/ColorAnimation.d.ts.map +0 -0
  1167. package/dist/src/util/animation/ColorAnimation.min.mjs +0 -0
  1168. package/dist/src/util/animation/ColorAnimation.min.mjs.map +0 -0
  1169. package/dist/src/util/animation/ColorAnimation.mjs +0 -0
  1170. package/dist/src/util/animation/ColorAnimation.mjs.map +0 -0
  1171. package/dist/src/util/animation/ValueAnimation.d.ts +0 -0
  1172. package/dist/src/util/animation/ValueAnimation.d.ts.map +0 -0
  1173. package/dist/src/util/animation/ValueAnimation.min.mjs +0 -0
  1174. package/dist/src/util/animation/ValueAnimation.min.mjs.map +0 -0
  1175. package/dist/src/util/animation/ValueAnimation.mjs +0 -0
  1176. package/dist/src/util/animation/ValueAnimation.mjs.map +0 -0
  1177. package/dist/src/util/animation/animate.d.ts +0 -0
  1178. package/dist/src/util/animation/animate.d.ts.map +0 -0
  1179. package/dist/src/util/animation/animate.min.mjs +0 -0
  1180. package/dist/src/util/animation/animate.min.mjs.map +0 -0
  1181. package/dist/src/util/animation/animate.mjs +0 -0
  1182. package/dist/src/util/animation/animate.mjs.map +0 -0
  1183. package/dist/src/util/animation/easing.d.ts +0 -0
  1184. package/dist/src/util/animation/easing.d.ts.map +0 -0
  1185. package/dist/src/util/animation/easing.min.mjs +0 -0
  1186. package/dist/src/util/animation/easing.min.mjs.map +0 -0
  1187. package/dist/src/util/animation/easing.mjs +0 -0
  1188. package/dist/src/util/animation/easing.mjs.map +0 -0
  1189. package/dist/src/util/animation/index.d.ts +0 -0
  1190. package/dist/src/util/animation/index.d.ts.map +0 -0
  1191. package/dist/src/util/animation/types.d.ts +0 -0
  1192. package/dist/src/util/animation/types.d.ts.map +0 -0
  1193. package/dist/src/util/applyMixins.d.ts +0 -0
  1194. package/dist/src/util/applyMixins.d.ts.map +0 -0
  1195. package/dist/src/util/applyMixins.min.mjs +0 -0
  1196. package/dist/src/util/applyMixins.min.mjs.map +0 -0
  1197. package/dist/src/util/applyMixins.mjs +0 -0
  1198. package/dist/src/util/applyMixins.mjs.map +0 -0
  1199. package/dist/src/util/dom_event.d.ts +0 -0
  1200. package/dist/src/util/dom_event.d.ts.map +0 -0
  1201. package/dist/src/util/dom_event.min.mjs +0 -0
  1202. package/dist/src/util/dom_event.min.mjs.map +0 -0
  1203. package/dist/src/util/dom_event.mjs +0 -0
  1204. package/dist/src/util/dom_event.mjs.map +0 -0
  1205. package/dist/src/util/dom_misc.d.ts +0 -0
  1206. package/dist/src/util/dom_misc.d.ts.map +0 -0
  1207. package/dist/src/util/dom_misc.min.mjs +0 -0
  1208. package/dist/src/util/dom_misc.min.mjs.map +0 -0
  1209. package/dist/src/util/dom_misc.mjs +0 -0
  1210. package/dist/src/util/dom_misc.mjs.map +0 -0
  1211. package/dist/src/util/index.d.ts +0 -0
  1212. package/dist/src/util/index.d.ts.map +0 -0
  1213. package/dist/src/util/index.min.mjs +0 -0
  1214. package/dist/src/util/index.min.mjs.map +0 -0
  1215. package/dist/src/util/index.mjs +0 -0
  1216. package/dist/src/util/index.mjs.map +0 -0
  1217. package/dist/src/util/internals/applyCanvasTransform.d.ts +0 -0
  1218. package/dist/src/util/internals/applyCanvasTransform.d.ts.map +0 -0
  1219. package/dist/src/util/internals/applyCanvasTransform.min.mjs +0 -0
  1220. package/dist/src/util/internals/applyCanvasTransform.min.mjs.map +0 -0
  1221. package/dist/src/util/internals/applyCanvasTransform.mjs +0 -0
  1222. package/dist/src/util/internals/applyCanvasTransform.mjs.map +0 -0
  1223. package/dist/src/util/internals/cleanupSvgAttribute.d.ts +0 -0
  1224. package/dist/src/util/internals/cleanupSvgAttribute.d.ts.map +0 -0
  1225. package/dist/src/util/internals/cleanupSvgAttribute.min.mjs +0 -0
  1226. package/dist/src/util/internals/cleanupSvgAttribute.min.mjs.map +0 -0
  1227. package/dist/src/util/internals/cleanupSvgAttribute.mjs +0 -0
  1228. package/dist/src/util/internals/cleanupSvgAttribute.mjs.map +0 -0
  1229. package/dist/src/util/internals/cloneStyles.d.ts +0 -0
  1230. package/dist/src/util/internals/cloneStyles.d.ts.map +0 -0
  1231. package/dist/src/util/internals/cloneStyles.min.mjs +0 -0
  1232. package/dist/src/util/internals/cloneStyles.min.mjs.map +0 -0
  1233. package/dist/src/util/internals/cloneStyles.mjs +0 -0
  1234. package/dist/src/util/internals/cloneStyles.mjs.map +0 -0
  1235. package/dist/src/util/internals/console.d.ts +0 -0
  1236. package/dist/src/util/internals/console.d.ts.map +0 -0
  1237. package/dist/src/util/internals/console.min.mjs +0 -0
  1238. package/dist/src/util/internals/console.min.mjs.map +0 -0
  1239. package/dist/src/util/internals/console.mjs +0 -0
  1240. package/dist/src/util/internals/console.mjs.map +0 -0
  1241. package/dist/src/util/internals/dom_style.d.ts +0 -0
  1242. package/dist/src/util/internals/dom_style.d.ts.map +0 -0
  1243. package/dist/src/util/internals/dom_style.min.mjs +0 -0
  1244. package/dist/src/util/internals/dom_style.min.mjs.map +0 -0
  1245. package/dist/src/util/internals/dom_style.mjs +0 -0
  1246. package/dist/src/util/internals/dom_style.mjs.map +0 -0
  1247. package/dist/src/util/internals/findRight.d.ts +0 -0
  1248. package/dist/src/util/internals/findRight.d.ts.map +0 -0
  1249. package/dist/src/util/internals/findRight.min.mjs +0 -0
  1250. package/dist/src/util/internals/findRight.min.mjs.map +0 -0
  1251. package/dist/src/util/internals/findRight.mjs +0 -0
  1252. package/dist/src/util/internals/findRight.mjs.map +0 -0
  1253. package/dist/src/util/internals/getRandomInt.d.ts +0 -0
  1254. package/dist/src/util/internals/getRandomInt.d.ts.map +0 -0
  1255. package/dist/src/util/internals/getRandomInt.min.mjs +0 -0
  1256. package/dist/src/util/internals/getRandomInt.min.mjs.map +0 -0
  1257. package/dist/src/util/internals/getRandomInt.mjs +0 -0
  1258. package/dist/src/util/internals/getRandomInt.mjs.map +0 -0
  1259. package/dist/src/util/internals/ifNaN.d.ts +0 -0
  1260. package/dist/src/util/internals/ifNaN.d.ts.map +0 -0
  1261. package/dist/src/util/internals/ifNaN.min.mjs +0 -0
  1262. package/dist/src/util/internals/ifNaN.min.mjs.map +0 -0
  1263. package/dist/src/util/internals/ifNaN.mjs +0 -0
  1264. package/dist/src/util/internals/ifNaN.mjs.map +0 -0
  1265. package/dist/src/util/internals/removeFromArray.d.ts +0 -0
  1266. package/dist/src/util/internals/removeFromArray.d.ts.map +0 -0
  1267. package/dist/src/util/internals/removeFromArray.min.mjs +0 -0
  1268. package/dist/src/util/internals/removeFromArray.min.mjs.map +0 -0
  1269. package/dist/src/util/internals/removeFromArray.mjs +0 -0
  1270. package/dist/src/util/internals/removeFromArray.mjs.map +0 -0
  1271. package/dist/src/util/internals/uid.d.ts +0 -0
  1272. package/dist/src/util/internals/uid.d.ts.map +0 -0
  1273. package/dist/src/util/internals/uid.min.mjs +0 -0
  1274. package/dist/src/util/internals/uid.min.mjs.map +0 -0
  1275. package/dist/src/util/internals/uid.mjs +0 -0
  1276. package/dist/src/util/internals/uid.mjs.map +0 -0
  1277. package/dist/src/util/lang_string.d.ts +0 -0
  1278. package/dist/src/util/lang_string.d.ts.map +0 -0
  1279. package/dist/src/util/lang_string.min.mjs +0 -0
  1280. package/dist/src/util/lang_string.min.mjs.map +0 -0
  1281. package/dist/src/util/lang_string.mjs +0 -0
  1282. package/dist/src/util/lang_string.mjs.map +0 -0
  1283. package/dist/src/util/misc/boundingBoxFromPoints.d.ts +0 -0
  1284. package/dist/src/util/misc/boundingBoxFromPoints.d.ts.map +0 -0
  1285. package/dist/src/util/misc/boundingBoxFromPoints.min.mjs +0 -0
  1286. package/dist/src/util/misc/boundingBoxFromPoints.min.mjs.map +0 -0
  1287. package/dist/src/util/misc/boundingBoxFromPoints.mjs +0 -0
  1288. package/dist/src/util/misc/boundingBoxFromPoints.mjs.map +0 -0
  1289. package/dist/src/util/misc/capValue.d.ts +0 -0
  1290. package/dist/src/util/misc/capValue.d.ts.map +0 -0
  1291. package/dist/src/util/misc/capValue.min.mjs +0 -0
  1292. package/dist/src/util/misc/capValue.min.mjs.map +0 -0
  1293. package/dist/src/util/misc/capValue.mjs +0 -0
  1294. package/dist/src/util/misc/capValue.mjs.map +0 -0
  1295. package/dist/src/util/misc/cornerRadius.d.ts +70 -0
  1296. package/dist/src/util/misc/cornerRadius.d.ts.map +1 -0
  1297. package/dist/src/util/misc/cornerRadius.min.mjs +2 -0
  1298. package/dist/src/util/misc/cornerRadius.min.mjs.map +1 -0
  1299. package/dist/src/util/misc/cornerRadius.mjs +181 -0
  1300. package/dist/src/util/misc/cornerRadius.mjs.map +1 -0
  1301. package/dist/src/util/misc/cos.d.ts +0 -0
  1302. package/dist/src/util/misc/cos.d.ts.map +0 -0
  1303. package/dist/src/util/misc/cos.min.mjs +0 -0
  1304. package/dist/src/util/misc/cos.min.mjs.map +0 -0
  1305. package/dist/src/util/misc/cos.mjs +0 -0
  1306. package/dist/src/util/misc/cos.mjs.map +0 -0
  1307. package/dist/src/util/misc/dom.d.ts +0 -0
  1308. package/dist/src/util/misc/dom.d.ts.map +0 -0
  1309. package/dist/src/util/misc/dom.min.mjs +0 -0
  1310. package/dist/src/util/misc/dom.min.mjs.map +0 -0
  1311. package/dist/src/util/misc/dom.mjs +0 -0
  1312. package/dist/src/util/misc/dom.mjs.map +0 -0
  1313. package/dist/src/util/misc/findScaleTo.d.ts +0 -0
  1314. package/dist/src/util/misc/findScaleTo.d.ts.map +0 -0
  1315. package/dist/src/util/misc/findScaleTo.min.mjs +0 -0
  1316. package/dist/src/util/misc/findScaleTo.min.mjs.map +0 -0
  1317. package/dist/src/util/misc/findScaleTo.mjs +0 -0
  1318. package/dist/src/util/misc/findScaleTo.mjs.map +0 -0
  1319. package/dist/src/util/misc/groupSVGElements.d.ts +0 -0
  1320. package/dist/src/util/misc/groupSVGElements.d.ts.map +0 -0
  1321. package/dist/src/util/misc/groupSVGElements.min.mjs +0 -0
  1322. package/dist/src/util/misc/groupSVGElements.min.mjs.map +0 -0
  1323. package/dist/src/util/misc/groupSVGElements.mjs +0 -0
  1324. package/dist/src/util/misc/groupSVGElements.mjs.map +0 -0
  1325. package/dist/src/util/misc/isTransparent.d.ts +0 -0
  1326. package/dist/src/util/misc/isTransparent.d.ts.map +0 -0
  1327. package/dist/src/util/misc/isTransparent.min.mjs +0 -0
  1328. package/dist/src/util/misc/isTransparent.min.mjs.map +0 -0
  1329. package/dist/src/util/misc/isTransparent.mjs +0 -0
  1330. package/dist/src/util/misc/isTransparent.mjs.map +0 -0
  1331. package/dist/src/util/misc/matrix.d.ts +0 -0
  1332. package/dist/src/util/misc/matrix.d.ts.map +0 -0
  1333. package/dist/src/util/misc/matrix.min.mjs +0 -0
  1334. package/dist/src/util/misc/matrix.min.mjs.map +0 -0
  1335. package/dist/src/util/misc/matrix.mjs +0 -0
  1336. package/dist/src/util/misc/matrix.mjs.map +0 -0
  1337. package/dist/src/util/misc/mergeClipPaths.d.ts +0 -0
  1338. package/dist/src/util/misc/mergeClipPaths.d.ts.map +0 -0
  1339. package/dist/src/util/misc/mergeClipPaths.min.mjs +0 -0
  1340. package/dist/src/util/misc/mergeClipPaths.min.mjs.map +0 -0
  1341. package/dist/src/util/misc/mergeClipPaths.mjs +0 -0
  1342. package/dist/src/util/misc/mergeClipPaths.mjs.map +0 -0
  1343. package/dist/src/util/misc/objectEnlive.d.ts +0 -0
  1344. package/dist/src/util/misc/objectEnlive.d.ts.map +0 -0
  1345. package/dist/src/util/misc/objectEnlive.min.mjs +0 -0
  1346. package/dist/src/util/misc/objectEnlive.min.mjs.map +0 -0
  1347. package/dist/src/util/misc/objectEnlive.mjs +0 -0
  1348. package/dist/src/util/misc/objectEnlive.mjs.map +0 -0
  1349. package/dist/src/util/misc/objectTransforms.d.ts +0 -0
  1350. package/dist/src/util/misc/objectTransforms.d.ts.map +0 -0
  1351. package/dist/src/util/misc/objectTransforms.min.mjs +0 -0
  1352. package/dist/src/util/misc/objectTransforms.min.mjs.map +0 -0
  1353. package/dist/src/util/misc/objectTransforms.mjs +0 -0
  1354. package/dist/src/util/misc/objectTransforms.mjs.map +0 -0
  1355. package/dist/src/util/misc/pick.d.ts +0 -0
  1356. package/dist/src/util/misc/pick.d.ts.map +0 -0
  1357. package/dist/src/util/misc/pick.min.mjs +0 -0
  1358. package/dist/src/util/misc/pick.min.mjs.map +0 -0
  1359. package/dist/src/util/misc/pick.mjs +0 -0
  1360. package/dist/src/util/misc/pick.mjs.map +0 -0
  1361. package/dist/src/util/misc/planeChange.d.ts +0 -0
  1362. package/dist/src/util/misc/planeChange.d.ts.map +0 -0
  1363. package/dist/src/util/misc/planeChange.min.mjs +0 -0
  1364. package/dist/src/util/misc/planeChange.min.mjs.map +0 -0
  1365. package/dist/src/util/misc/planeChange.mjs +0 -0
  1366. package/dist/src/util/misc/planeChange.mjs.map +0 -0
  1367. package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.d.ts +0 -0
  1368. package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.d.ts.map +0 -0
  1369. package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.min.mjs +0 -0
  1370. package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.min.mjs.map +0 -0
  1371. package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.mjs +0 -0
  1372. package/dist/src/util/misc/projectStroke/StrokeLineCapProjections.mjs.map +0 -0
  1373. package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.d.ts +0 -0
  1374. package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.d.ts.map +0 -0
  1375. package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.min.mjs +0 -0
  1376. package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.min.mjs.map +0 -0
  1377. package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.mjs +0 -0
  1378. package/dist/src/util/misc/projectStroke/StrokeLineJoinProjections.mjs.map +0 -0
  1379. package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.d.ts +0 -0
  1380. package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.d.ts.map +0 -0
  1381. package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.min.mjs +0 -0
  1382. package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.min.mjs.map +0 -0
  1383. package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.mjs +0 -0
  1384. package/dist/src/util/misc/projectStroke/StrokeProjectionsBase.mjs.map +0 -0
  1385. package/dist/src/util/misc/projectStroke/index.d.ts +0 -0
  1386. package/dist/src/util/misc/projectStroke/index.d.ts.map +0 -0
  1387. package/dist/src/util/misc/projectStroke/index.min.mjs +0 -0
  1388. package/dist/src/util/misc/projectStroke/index.min.mjs.map +0 -0
  1389. package/dist/src/util/misc/projectStroke/index.mjs +0 -0
  1390. package/dist/src/util/misc/projectStroke/index.mjs.map +0 -0
  1391. package/dist/src/util/misc/projectStroke/types.d.ts +0 -0
  1392. package/dist/src/util/misc/projectStroke/types.d.ts.map +0 -0
  1393. package/dist/src/util/misc/radiansDegreesConversion.d.ts +0 -0
  1394. package/dist/src/util/misc/radiansDegreesConversion.d.ts.map +0 -0
  1395. package/dist/src/util/misc/radiansDegreesConversion.min.mjs +0 -0
  1396. package/dist/src/util/misc/radiansDegreesConversion.min.mjs.map +0 -0
  1397. package/dist/src/util/misc/radiansDegreesConversion.mjs +0 -0
  1398. package/dist/src/util/misc/radiansDegreesConversion.mjs.map +0 -0
  1399. package/dist/src/util/misc/resolveOrigin.d.ts +0 -0
  1400. package/dist/src/util/misc/resolveOrigin.d.ts.map +0 -0
  1401. package/dist/src/util/misc/resolveOrigin.min.mjs +0 -0
  1402. package/dist/src/util/misc/resolveOrigin.min.mjs.map +0 -0
  1403. package/dist/src/util/misc/resolveOrigin.mjs +0 -0
  1404. package/dist/src/util/misc/resolveOrigin.mjs.map +0 -0
  1405. package/dist/src/util/misc/sin.d.ts +0 -0
  1406. package/dist/src/util/misc/sin.d.ts.map +0 -0
  1407. package/dist/src/util/misc/sin.min.mjs +0 -0
  1408. package/dist/src/util/misc/sin.min.mjs.map +0 -0
  1409. package/dist/src/util/misc/sin.mjs +0 -0
  1410. package/dist/src/util/misc/sin.mjs.map +0 -0
  1411. package/dist/src/util/misc/svgExport.d.ts +0 -0
  1412. package/dist/src/util/misc/svgExport.d.ts.map +0 -0
  1413. package/dist/src/util/misc/svgExport.min.mjs +0 -0
  1414. package/dist/src/util/misc/svgExport.min.mjs.map +0 -0
  1415. package/dist/src/util/misc/svgExport.mjs +0 -0
  1416. package/dist/src/util/misc/svgExport.mjs.map +0 -0
  1417. package/dist/src/util/misc/svgParsing.d.ts +0 -0
  1418. package/dist/src/util/misc/svgParsing.d.ts.map +0 -0
  1419. package/dist/src/util/misc/svgParsing.min.mjs +0 -0
  1420. package/dist/src/util/misc/svgParsing.min.mjs.map +0 -0
  1421. package/dist/src/util/misc/svgParsing.mjs +0 -0
  1422. package/dist/src/util/misc/svgParsing.mjs.map +0 -0
  1423. package/dist/src/util/misc/textStyles.d.ts +0 -0
  1424. package/dist/src/util/misc/textStyles.d.ts.map +0 -0
  1425. package/dist/src/util/misc/textStyles.min.mjs +0 -0
  1426. package/dist/src/util/misc/textStyles.min.mjs.map +0 -0
  1427. package/dist/src/util/misc/textStyles.mjs +0 -0
  1428. package/dist/src/util/misc/textStyles.mjs.map +0 -0
  1429. package/dist/src/util/misc/toFixed.d.ts +0 -0
  1430. package/dist/src/util/misc/toFixed.d.ts.map +0 -0
  1431. package/dist/src/util/misc/toFixed.min.mjs +0 -0
  1432. package/dist/src/util/misc/toFixed.min.mjs.map +0 -0
  1433. package/dist/src/util/misc/toFixed.mjs +0 -0
  1434. package/dist/src/util/misc/toFixed.mjs.map +0 -0
  1435. package/dist/src/util/misc/vectors.d.ts +0 -0
  1436. package/dist/src/util/misc/vectors.d.ts.map +0 -0
  1437. package/dist/src/util/misc/vectors.min.mjs +0 -0
  1438. package/dist/src/util/misc/vectors.min.mjs.map +0 -0
  1439. package/dist/src/util/misc/vectors.mjs +0 -0
  1440. package/dist/src/util/misc/vectors.mjs.map +0 -0
  1441. package/dist/src/util/path/index.d.ts +0 -0
  1442. package/dist/src/util/path/index.d.ts.map +0 -0
  1443. package/dist/src/util/path/index.min.mjs +0 -0
  1444. package/dist/src/util/path/index.min.mjs.map +0 -0
  1445. package/dist/src/util/path/index.mjs +0 -0
  1446. package/dist/src/util/path/index.mjs.map +0 -0
  1447. package/dist/src/util/path/regex.d.ts +0 -0
  1448. package/dist/src/util/path/regex.d.ts.map +0 -0
  1449. package/dist/src/util/path/regex.min.mjs +0 -0
  1450. package/dist/src/util/path/regex.min.mjs.map +0 -0
  1451. package/dist/src/util/path/regex.mjs +0 -0
  1452. package/dist/src/util/path/regex.mjs.map +0 -0
  1453. package/dist/src/util/path/typechecks.d.ts +0 -0
  1454. package/dist/src/util/path/typechecks.d.ts.map +0 -0
  1455. package/dist/src/util/path/typedefs.d.ts +0 -0
  1456. package/dist/src/util/path/typedefs.d.ts.map +0 -0
  1457. package/dist/src/util/transform_matrix_removal.d.ts +0 -0
  1458. package/dist/src/util/transform_matrix_removal.d.ts.map +0 -0
  1459. package/dist/src/util/transform_matrix_removal.min.mjs +0 -0
  1460. package/dist/src/util/transform_matrix_removal.min.mjs.map +0 -0
  1461. package/dist/src/util/transform_matrix_removal.mjs +0 -0
  1462. package/dist/src/util/transform_matrix_removal.mjs.map +0 -0
  1463. package/dist/src/util/typeAssertions.d.ts +0 -0
  1464. package/dist/src/util/typeAssertions.d.ts.map +0 -0
  1465. package/dist/src/util/typeAssertions.min.mjs +0 -0
  1466. package/dist/src/util/typeAssertions.min.mjs.map +0 -0
  1467. package/dist/src/util/typeAssertions.mjs +0 -0
  1468. package/dist/src/util/typeAssertions.mjs.map +0 -0
  1469. package/dist-extensions/aligning_guidelines/constant.mjs +0 -0
  1470. package/dist-extensions/aligning_guidelines/constant.mjs.map +0 -0
  1471. package/dist-extensions/aligning_guidelines/index.mjs +0 -0
  1472. package/dist-extensions/aligning_guidelines/index.mjs.map +0 -0
  1473. package/dist-extensions/aligning_guidelines/util/basic.mjs +0 -0
  1474. package/dist-extensions/aligning_guidelines/util/basic.mjs.map +0 -0
  1475. package/dist-extensions/aligning_guidelines/util/collect-line.mjs +0 -0
  1476. package/dist-extensions/aligning_guidelines/util/collect-line.mjs.map +0 -0
  1477. package/dist-extensions/aligning_guidelines/util/collect-point.mjs +0 -0
  1478. package/dist-extensions/aligning_guidelines/util/collect-point.mjs.map +0 -0
  1479. package/dist-extensions/aligning_guidelines/util/draw.mjs +0 -0
  1480. package/dist-extensions/aligning_guidelines/util/draw.mjs.map +0 -0
  1481. package/dist-extensions/aligning_guidelines/util/get-objects-by-target.mjs +0 -0
  1482. package/dist-extensions/aligning_guidelines/util/get-objects-by-target.mjs.map +0 -0
  1483. package/dist-extensions/data_updaters/gradient/index.mjs +0 -0
  1484. package/dist-extensions/data_updaters/gradient/index.mjs.map +0 -0
  1485. package/dist-extensions/data_updaters/origins/index.mjs +0 -0
  1486. package/dist-extensions/data_updaters/origins/index.mjs.map +0 -0
  1487. package/dist-extensions/extensions/aligning_guidelines/constant.d.ts +0 -0
  1488. package/dist-extensions/extensions/aligning_guidelines/constant.d.ts.map +0 -0
  1489. package/dist-extensions/extensions/aligning_guidelines/index.d.ts +0 -0
  1490. package/dist-extensions/extensions/aligning_guidelines/index.d.ts.map +0 -0
  1491. package/dist-extensions/extensions/aligning_guidelines/typedefs.d.ts +0 -0
  1492. package/dist-extensions/extensions/aligning_guidelines/typedefs.d.ts.map +0 -0
  1493. package/dist-extensions/extensions/aligning_guidelines/util/basic.d.ts +0 -0
  1494. package/dist-extensions/extensions/aligning_guidelines/util/basic.d.ts.map +0 -0
  1495. package/dist-extensions/extensions/aligning_guidelines/util/collect-line.d.ts +0 -0
  1496. package/dist-extensions/extensions/aligning_guidelines/util/collect-line.d.ts.map +0 -0
  1497. package/dist-extensions/extensions/aligning_guidelines/util/collect-point.d.ts +0 -0
  1498. package/dist-extensions/extensions/aligning_guidelines/util/collect-point.d.ts.map +0 -0
  1499. package/dist-extensions/extensions/aligning_guidelines/util/draw.d.ts +0 -0
  1500. package/dist-extensions/extensions/aligning_guidelines/util/draw.d.ts.map +0 -0
  1501. package/dist-extensions/extensions/aligning_guidelines/util/get-objects-by-target.d.ts +0 -0
  1502. package/dist-extensions/extensions/aligning_guidelines/util/get-objects-by-target.d.ts.map +0 -0
  1503. package/dist-extensions/extensions/data_updaters/gradient/index.d.ts +0 -0
  1504. package/dist-extensions/extensions/data_updaters/gradient/index.d.ts.map +0 -0
  1505. package/dist-extensions/extensions/data_updaters/origins/index.d.ts +0 -0
  1506. package/dist-extensions/extensions/data_updaters/origins/index.d.ts.map +0 -0
  1507. package/dist-extensions/extensions/index.d.ts +0 -0
  1508. package/dist-extensions/extensions/index.d.ts.map +0 -0
  1509. package/dist-extensions/fabric-extensions.min.js +0 -0
  1510. package/dist-extensions/fabric-extensions.min.js.map +0 -0
  1511. package/dist-extensions/fabric.d.ts +0 -0
  1512. package/dist-extensions/fabric.d.ts.map +0 -0
  1513. package/dist-extensions/index.d.ts +0 -0
  1514. package/dist-extensions/index.d.ts.map +0 -0
  1515. package/dist-extensions/index.mjs +0 -0
  1516. package/dist-extensions/index.mjs.map +0 -0
  1517. package/dist-extensions/src/ClassRegistry.d.ts +0 -0
  1518. package/dist-extensions/src/ClassRegistry.d.ts.map +0 -0
  1519. package/dist-extensions/src/Collection.d.ts +0 -0
  1520. package/dist-extensions/src/Collection.d.ts.map +0 -0
  1521. package/dist-extensions/src/CommonMethods.d.ts +0 -0
  1522. package/dist-extensions/src/CommonMethods.d.ts.map +0 -0
  1523. package/dist-extensions/src/EventTypeDefs.d.ts +0 -0
  1524. package/dist-extensions/src/EventTypeDefs.d.ts.map +0 -0
  1525. package/dist-extensions/src/Intersection.d.ts +0 -0
  1526. package/dist-extensions/src/Intersection.d.ts.map +0 -0
  1527. package/dist-extensions/src/LayoutManager/ActiveSelectionLayoutManager.d.ts +0 -0
  1528. package/dist-extensions/src/LayoutManager/ActiveSelectionLayoutManager.d.ts.map +0 -0
  1529. package/dist-extensions/src/LayoutManager/LayoutManager.d.ts +0 -0
  1530. package/dist-extensions/src/LayoutManager/LayoutManager.d.ts.map +0 -0
  1531. package/dist-extensions/src/LayoutManager/LayoutStrategies/ClipPathLayout.d.ts +0 -0
  1532. package/dist-extensions/src/LayoutManager/LayoutStrategies/ClipPathLayout.d.ts.map +0 -0
  1533. package/dist-extensions/src/LayoutManager/LayoutStrategies/FitContentLayout.d.ts +0 -0
  1534. package/dist-extensions/src/LayoutManager/LayoutStrategies/FitContentLayout.d.ts.map +0 -0
  1535. package/dist-extensions/src/LayoutManager/LayoutStrategies/FixedLayout.d.ts +0 -0
  1536. package/dist-extensions/src/LayoutManager/LayoutStrategies/FixedLayout.d.ts.map +0 -0
  1537. package/dist-extensions/src/LayoutManager/LayoutStrategies/LayoutStrategy.d.ts +0 -0
  1538. package/dist-extensions/src/LayoutManager/LayoutStrategies/LayoutStrategy.d.ts.map +0 -0
  1539. package/dist-extensions/src/LayoutManager/LayoutStrategies/utils.d.ts +0 -0
  1540. package/dist-extensions/src/LayoutManager/LayoutStrategies/utils.d.ts.map +0 -0
  1541. package/dist-extensions/src/LayoutManager/constants.d.ts +0 -0
  1542. package/dist-extensions/src/LayoutManager/constants.d.ts.map +0 -0
  1543. package/dist-extensions/src/LayoutManager/index.d.ts +0 -0
  1544. package/dist-extensions/src/LayoutManager/index.d.ts.map +0 -0
  1545. package/dist-extensions/src/LayoutManager/types.d.ts +0 -0
  1546. package/dist-extensions/src/LayoutManager/types.d.ts.map +0 -0
  1547. package/dist-extensions/src/Observable.d.ts +0 -0
  1548. package/dist-extensions/src/Observable.d.ts.map +0 -0
  1549. package/dist-extensions/src/Pattern/Pattern.d.ts +0 -0
  1550. package/dist-extensions/src/Pattern/Pattern.d.ts.map +0 -0
  1551. package/dist-extensions/src/Pattern/index.d.ts +0 -0
  1552. package/dist-extensions/src/Pattern/index.d.ts.map +0 -0
  1553. package/dist-extensions/src/Pattern/types.d.ts +0 -0
  1554. package/dist-extensions/src/Pattern/types.d.ts.map +0 -0
  1555. package/dist-extensions/src/Point.d.ts +0 -0
  1556. package/dist-extensions/src/Point.d.ts.map +0 -0
  1557. package/dist-extensions/src/Shadow.d.ts +0 -0
  1558. package/dist-extensions/src/Shadow.d.ts.map +0 -0
  1559. package/dist-extensions/src/brushes/BaseBrush.d.ts +0 -0
  1560. package/dist-extensions/src/brushes/BaseBrush.d.ts.map +0 -0
  1561. package/dist-extensions/src/brushes/CircleBrush.d.ts +0 -0
  1562. package/dist-extensions/src/brushes/CircleBrush.d.ts.map +0 -0
  1563. package/dist-extensions/src/brushes/PatternBrush.d.ts +0 -0
  1564. package/dist-extensions/src/brushes/PatternBrush.d.ts.map +0 -0
  1565. package/dist-extensions/src/brushes/PencilBrush.d.ts +0 -0
  1566. package/dist-extensions/src/brushes/PencilBrush.d.ts.map +0 -0
  1567. package/dist-extensions/src/brushes/SprayBrush.d.ts +0 -0
  1568. package/dist-extensions/src/brushes/SprayBrush.d.ts.map +0 -0
  1569. package/dist-extensions/src/brushes/typedefs.d.ts +0 -0
  1570. package/dist-extensions/src/brushes/typedefs.d.ts.map +0 -0
  1571. package/dist-extensions/src/cache.d.ts +0 -0
  1572. package/dist-extensions/src/cache.d.ts.map +0 -0
  1573. package/dist-extensions/src/canvas/Canvas.d.ts +0 -0
  1574. package/dist-extensions/src/canvas/Canvas.d.ts.map +0 -0
  1575. package/dist-extensions/src/canvas/CanvasOptions.d.ts +0 -0
  1576. package/dist-extensions/src/canvas/CanvasOptions.d.ts.map +0 -0
  1577. package/dist-extensions/src/canvas/DOMManagers/CanvasDOMManager.d.ts +0 -0
  1578. package/dist-extensions/src/canvas/DOMManagers/CanvasDOMManager.d.ts.map +0 -0
  1579. package/dist-extensions/src/canvas/DOMManagers/StaticCanvasDOMManager.d.ts +0 -0
  1580. package/dist-extensions/src/canvas/DOMManagers/StaticCanvasDOMManager.d.ts.map +0 -0
  1581. package/dist-extensions/src/canvas/DOMManagers/util.d.ts +0 -0
  1582. package/dist-extensions/src/canvas/DOMManagers/util.d.ts.map +0 -0
  1583. package/dist-extensions/src/canvas/SelectableCanvas.d.ts +0 -0
  1584. package/dist-extensions/src/canvas/SelectableCanvas.d.ts.map +0 -0
  1585. package/dist-extensions/src/canvas/StaticCanvas.d.ts +0 -0
  1586. package/dist-extensions/src/canvas/StaticCanvas.d.ts.map +0 -0
  1587. package/dist-extensions/src/canvas/StaticCanvasOptions.d.ts +0 -0
  1588. package/dist-extensions/src/canvas/StaticCanvasOptions.d.ts.map +0 -0
  1589. package/dist-extensions/src/canvas/TextEditingManager.d.ts +0 -0
  1590. package/dist-extensions/src/canvas/TextEditingManager.d.ts.map +0 -0
  1591. package/dist-extensions/src/color/Color.d.ts +0 -0
  1592. package/dist-extensions/src/color/Color.d.ts.map +0 -0
  1593. package/dist-extensions/src/color/color_map.d.ts +0 -0
  1594. package/dist-extensions/src/color/color_map.d.ts.map +0 -0
  1595. package/dist-extensions/src/color/constants.d.ts +0 -0
  1596. package/dist-extensions/src/color/constants.d.ts.map +0 -0
  1597. package/dist-extensions/src/color/typedefs.d.ts +0 -0
  1598. package/dist-extensions/src/color/typedefs.d.ts.map +0 -0
  1599. package/dist-extensions/src/color/util.d.ts +0 -0
  1600. package/dist-extensions/src/color/util.d.ts.map +0 -0
  1601. package/dist-extensions/src/config.d.ts +0 -0
  1602. package/dist-extensions/src/config.d.ts.map +0 -0
  1603. package/dist-extensions/src/constants.d.ts +0 -0
  1604. package/dist-extensions/src/constants.d.ts.map +0 -0
  1605. package/dist-extensions/src/controls/Control.d.ts +0 -0
  1606. package/dist-extensions/src/controls/Control.d.ts.map +0 -0
  1607. package/dist-extensions/src/controls/changeHeight.d.ts +0 -0
  1608. package/dist-extensions/src/controls/changeHeight.d.ts.map +0 -0
  1609. package/dist-extensions/src/controls/changeWidth.d.ts +0 -0
  1610. package/dist-extensions/src/controls/changeWidth.d.ts.map +0 -0
  1611. package/dist-extensions/src/controls/commonControls.d.ts +0 -0
  1612. package/dist-extensions/src/controls/commonControls.d.ts.map +0 -0
  1613. package/dist-extensions/src/controls/controlRendering.d.ts +0 -0
  1614. package/dist-extensions/src/controls/controlRendering.d.ts.map +0 -0
  1615. package/dist-extensions/src/controls/drag.d.ts +0 -0
  1616. package/dist-extensions/src/controls/drag.d.ts.map +0 -0
  1617. package/dist-extensions/src/controls/fireEvent.d.ts +0 -0
  1618. package/dist-extensions/src/controls/fireEvent.d.ts.map +0 -0
  1619. package/dist-extensions/src/controls/index.d.ts +0 -0
  1620. package/dist-extensions/src/controls/index.d.ts.map +0 -0
  1621. package/dist-extensions/src/controls/pathControl.d.ts +0 -0
  1622. package/dist-extensions/src/controls/pathControl.d.ts.map +0 -0
  1623. package/dist-extensions/src/controls/polyControl.d.ts +0 -0
  1624. package/dist-extensions/src/controls/polyControl.d.ts.map +0 -0
  1625. package/dist-extensions/src/controls/rotate.d.ts +0 -0
  1626. package/dist-extensions/src/controls/rotate.d.ts.map +0 -0
  1627. package/dist-extensions/src/controls/scale.d.ts +0 -0
  1628. package/dist-extensions/src/controls/scale.d.ts.map +0 -0
  1629. package/dist-extensions/src/controls/scaleSkew.d.ts +0 -0
  1630. package/dist-extensions/src/controls/scaleSkew.d.ts.map +0 -0
  1631. package/dist-extensions/src/controls/skew.d.ts +0 -0
  1632. package/dist-extensions/src/controls/skew.d.ts.map +0 -0
  1633. package/dist-extensions/src/controls/util.d.ts +0 -0
  1634. package/dist-extensions/src/controls/util.d.ts.map +0 -0
  1635. package/dist-extensions/src/controls/wrapWithFireEvent.d.ts +0 -0
  1636. package/dist-extensions/src/controls/wrapWithFireEvent.d.ts.map +0 -0
  1637. package/dist-extensions/src/controls/wrapWithFixedAnchor.d.ts +0 -0
  1638. package/dist-extensions/src/controls/wrapWithFixedAnchor.d.ts.map +0 -0
  1639. package/dist-extensions/src/env/browser.d.ts +0 -0
  1640. package/dist-extensions/src/env/browser.d.ts.map +0 -0
  1641. package/dist-extensions/src/env/index.d.ts +0 -0
  1642. package/dist-extensions/src/env/index.d.ts.map +0 -0
  1643. package/dist-extensions/src/env/types.d.ts +0 -0
  1644. package/dist-extensions/src/env/types.d.ts.map +0 -0
  1645. package/dist-extensions/src/filters/BaseFilter.d.ts +0 -0
  1646. package/dist-extensions/src/filters/BaseFilter.d.ts.map +0 -0
  1647. package/dist-extensions/src/filters/BlendColor.d.ts +0 -0
  1648. package/dist-extensions/src/filters/BlendColor.d.ts.map +0 -0
  1649. package/dist-extensions/src/filters/BlendImage.d.ts +0 -0
  1650. package/dist-extensions/src/filters/BlendImage.d.ts.map +0 -0
  1651. package/dist-extensions/src/filters/Blur.d.ts +0 -0
  1652. package/dist-extensions/src/filters/Blur.d.ts.map +0 -0
  1653. package/dist-extensions/src/filters/Brightness.d.ts +0 -0
  1654. package/dist-extensions/src/filters/Brightness.d.ts.map +0 -0
  1655. package/dist-extensions/src/filters/Canvas2dFilterBackend.d.ts +0 -0
  1656. package/dist-extensions/src/filters/Canvas2dFilterBackend.d.ts.map +0 -0
  1657. package/dist-extensions/src/filters/ColorMatrix.d.ts +0 -0
  1658. package/dist-extensions/src/filters/ColorMatrix.d.ts.map +0 -0
  1659. package/dist-extensions/src/filters/ColorMatrixFilters.d.ts +0 -0
  1660. package/dist-extensions/src/filters/ColorMatrixFilters.d.ts.map +0 -0
  1661. package/dist-extensions/src/filters/Composed.d.ts +0 -0
  1662. package/dist-extensions/src/filters/Composed.d.ts.map +0 -0
  1663. package/dist-extensions/src/filters/Contrast.d.ts +0 -0
  1664. package/dist-extensions/src/filters/Contrast.d.ts.map +0 -0
  1665. package/dist-extensions/src/filters/Convolute.d.ts +0 -0
  1666. package/dist-extensions/src/filters/Convolute.d.ts.map +0 -0
  1667. package/dist-extensions/src/filters/FilterBackend.d.ts +0 -0
  1668. package/dist-extensions/src/filters/FilterBackend.d.ts.map +0 -0
  1669. package/dist-extensions/src/filters/GLProbes/GLProbe.d.ts +0 -0
  1670. package/dist-extensions/src/filters/GLProbes/GLProbe.d.ts.map +0 -0
  1671. package/dist-extensions/src/filters/GLProbes/WebGLProbe.d.ts +0 -0
  1672. package/dist-extensions/src/filters/GLProbes/WebGLProbe.d.ts.map +0 -0
  1673. package/dist-extensions/src/filters/Gamma.d.ts +0 -0
  1674. package/dist-extensions/src/filters/Gamma.d.ts.map +0 -0
  1675. package/dist-extensions/src/filters/Grayscale.d.ts +0 -0
  1676. package/dist-extensions/src/filters/Grayscale.d.ts.map +0 -0
  1677. package/dist-extensions/src/filters/HueRotation.d.ts +0 -0
  1678. package/dist-extensions/src/filters/HueRotation.d.ts.map +0 -0
  1679. package/dist-extensions/src/filters/Invert.d.ts +0 -0
  1680. package/dist-extensions/src/filters/Invert.d.ts.map +0 -0
  1681. package/dist-extensions/src/filters/Noise.d.ts +0 -0
  1682. package/dist-extensions/src/filters/Noise.d.ts.map +0 -0
  1683. package/dist-extensions/src/filters/Pixelate.d.ts +0 -0
  1684. package/dist-extensions/src/filters/Pixelate.d.ts.map +0 -0
  1685. package/dist-extensions/src/filters/RemoveColor.d.ts +0 -0
  1686. package/dist-extensions/src/filters/RemoveColor.d.ts.map +0 -0
  1687. package/dist-extensions/src/filters/Resize.d.ts +0 -0
  1688. package/dist-extensions/src/filters/Resize.d.ts.map +0 -0
  1689. package/dist-extensions/src/filters/Saturation.d.ts +0 -0
  1690. package/dist-extensions/src/filters/Saturation.d.ts.map +0 -0
  1691. package/dist-extensions/src/filters/Vibrance.d.ts +0 -0
  1692. package/dist-extensions/src/filters/Vibrance.d.ts.map +0 -0
  1693. package/dist-extensions/src/filters/WebGLFilterBackend.d.ts +0 -0
  1694. package/dist-extensions/src/filters/WebGLFilterBackend.d.ts.map +0 -0
  1695. package/dist-extensions/src/filters/filters.d.ts +0 -0
  1696. package/dist-extensions/src/filters/filters.d.ts.map +0 -0
  1697. package/dist-extensions/src/filters/index.d.ts +0 -0
  1698. package/dist-extensions/src/filters/index.d.ts.map +0 -0
  1699. package/dist-extensions/src/filters/shaders/baseFilter.d.ts +0 -0
  1700. package/dist-extensions/src/filters/shaders/baseFilter.d.ts.map +0 -0
  1701. package/dist-extensions/src/filters/shaders/blendColor.d.ts +0 -0
  1702. package/dist-extensions/src/filters/shaders/blendColor.d.ts.map +0 -0
  1703. package/dist-extensions/src/filters/shaders/blendImage.d.ts +0 -0
  1704. package/dist-extensions/src/filters/shaders/blendImage.d.ts.map +0 -0
  1705. package/dist-extensions/src/filters/shaders/blur.d.ts +0 -0
  1706. package/dist-extensions/src/filters/shaders/blur.d.ts.map +0 -0
  1707. package/dist-extensions/src/filters/shaders/brightness.d.ts +0 -0
  1708. package/dist-extensions/src/filters/shaders/brightness.d.ts.map +0 -0
  1709. package/dist-extensions/src/filters/shaders/colorMatrix.d.ts +0 -0
  1710. package/dist-extensions/src/filters/shaders/colorMatrix.d.ts.map +0 -0
  1711. package/dist-extensions/src/filters/shaders/constrast.d.ts +0 -0
  1712. package/dist-extensions/src/filters/shaders/constrast.d.ts.map +0 -0
  1713. package/dist-extensions/src/filters/shaders/convolute.d.ts +0 -0
  1714. package/dist-extensions/src/filters/shaders/convolute.d.ts.map +0 -0
  1715. package/dist-extensions/src/filters/shaders/gamma.d.ts +0 -0
  1716. package/dist-extensions/src/filters/shaders/gamma.d.ts.map +0 -0
  1717. package/dist-extensions/src/filters/shaders/grayscale.d.ts +0 -0
  1718. package/dist-extensions/src/filters/shaders/grayscale.d.ts.map +0 -0
  1719. package/dist-extensions/src/filters/shaders/invert.d.ts +0 -0
  1720. package/dist-extensions/src/filters/shaders/invert.d.ts.map +0 -0
  1721. package/dist-extensions/src/filters/shaders/noise.d.ts +0 -0
  1722. package/dist-extensions/src/filters/shaders/noise.d.ts.map +0 -0
  1723. package/dist-extensions/src/filters/shaders/pixelate.d.ts +0 -0
  1724. package/dist-extensions/src/filters/shaders/pixelate.d.ts.map +0 -0
  1725. package/dist-extensions/src/filters/shaders/removeColor.d.ts +0 -0
  1726. package/dist-extensions/src/filters/shaders/removeColor.d.ts.map +0 -0
  1727. package/dist-extensions/src/filters/shaders/saturation.d.ts +0 -0
  1728. package/dist-extensions/src/filters/shaders/saturation.d.ts.map +0 -0
  1729. package/dist-extensions/src/filters/shaders/vibrance.d.ts +0 -0
  1730. package/dist-extensions/src/filters/shaders/vibrance.d.ts.map +0 -0
  1731. package/dist-extensions/src/filters/typedefs.d.ts +0 -0
  1732. package/dist-extensions/src/filters/typedefs.d.ts.map +0 -0
  1733. package/dist-extensions/src/filters/utils.d.ts +0 -0
  1734. package/dist-extensions/src/filters/utils.d.ts.map +0 -0
  1735. package/dist-extensions/src/gradient/Gradient.d.ts +0 -0
  1736. package/dist-extensions/src/gradient/Gradient.d.ts.map +0 -0
  1737. package/dist-extensions/src/gradient/constants.d.ts +0 -0
  1738. package/dist-extensions/src/gradient/constants.d.ts.map +0 -0
  1739. package/dist-extensions/src/gradient/index.d.ts +0 -0
  1740. package/dist-extensions/src/gradient/index.d.ts.map +0 -0
  1741. package/dist-extensions/src/gradient/parser/misc.d.ts +0 -0
  1742. package/dist-extensions/src/gradient/parser/misc.d.ts.map +0 -0
  1743. package/dist-extensions/src/gradient/parser/parseColorStops.d.ts +0 -0
  1744. package/dist-extensions/src/gradient/parser/parseColorStops.d.ts.map +0 -0
  1745. package/dist-extensions/src/gradient/parser/parseCoords.d.ts +0 -0
  1746. package/dist-extensions/src/gradient/parser/parseCoords.d.ts.map +0 -0
  1747. package/dist-extensions/src/gradient/typedefs.d.ts +0 -0
  1748. package/dist-extensions/src/gradient/typedefs.d.ts.map +0 -0
  1749. package/dist-extensions/src/parser/applyViewboxTransform.d.ts +0 -0
  1750. package/dist-extensions/src/parser/applyViewboxTransform.d.ts.map +0 -0
  1751. package/dist-extensions/src/parser/attributes.d.ts +0 -0
  1752. package/dist-extensions/src/parser/attributes.d.ts.map +0 -0
  1753. package/dist-extensions/src/parser/constants.d.ts +0 -0
  1754. package/dist-extensions/src/parser/constants.d.ts.map +0 -0
  1755. package/dist-extensions/src/parser/doesSomeParentMatch.d.ts +0 -0
  1756. package/dist-extensions/src/parser/doesSomeParentMatch.d.ts.map +0 -0
  1757. package/dist-extensions/src/parser/elementMatchesRule.d.ts +0 -0
  1758. package/dist-extensions/src/parser/elementMatchesRule.d.ts.map +0 -0
  1759. package/dist-extensions/src/parser/elements_parser.d.ts +0 -0
  1760. package/dist-extensions/src/parser/elements_parser.d.ts.map +0 -0
  1761. package/dist-extensions/src/parser/getCSSRules.d.ts +0 -0
  1762. package/dist-extensions/src/parser/getCSSRules.d.ts.map +0 -0
  1763. package/dist-extensions/src/parser/getGlobalStylesForElement.d.ts +0 -0
  1764. package/dist-extensions/src/parser/getGlobalStylesForElement.d.ts.map +0 -0
  1765. package/dist-extensions/src/parser/getGradientDefs.d.ts +0 -0
  1766. package/dist-extensions/src/parser/getGradientDefs.d.ts.map +0 -0
  1767. package/dist-extensions/src/parser/getMultipleNodes.d.ts +0 -0
  1768. package/dist-extensions/src/parser/getMultipleNodes.d.ts.map +0 -0
  1769. package/dist-extensions/src/parser/getSvgRegex.d.ts +0 -0
  1770. package/dist-extensions/src/parser/getSvgRegex.d.ts.map +0 -0
  1771. package/dist-extensions/src/parser/getTagName.d.ts +0 -0
  1772. package/dist-extensions/src/parser/getTagName.d.ts.map +0 -0
  1773. package/dist-extensions/src/parser/hasInvalidAncestor.d.ts +0 -0
  1774. package/dist-extensions/src/parser/hasInvalidAncestor.d.ts.map +0 -0
  1775. package/dist-extensions/src/parser/loadSVGFromString.d.ts +0 -0
  1776. package/dist-extensions/src/parser/loadSVGFromString.d.ts.map +0 -0
  1777. package/dist-extensions/src/parser/loadSVGFromURL.d.ts +0 -0
  1778. package/dist-extensions/src/parser/loadSVGFromURL.d.ts.map +0 -0
  1779. package/dist-extensions/src/parser/normalizeAttr.d.ts +0 -0
  1780. package/dist-extensions/src/parser/normalizeAttr.d.ts.map +0 -0
  1781. package/dist-extensions/src/parser/normalizeValue.d.ts +0 -0
  1782. package/dist-extensions/src/parser/normalizeValue.d.ts.map +0 -0
  1783. package/dist-extensions/src/parser/parseAttributes.d.ts +0 -0
  1784. package/dist-extensions/src/parser/parseAttributes.d.ts.map +0 -0
  1785. package/dist-extensions/src/parser/parseFontDeclaration.d.ts +0 -0
  1786. package/dist-extensions/src/parser/parseFontDeclaration.d.ts.map +0 -0
  1787. package/dist-extensions/src/parser/parsePointsAttribute.d.ts +0 -0
  1788. package/dist-extensions/src/parser/parsePointsAttribute.d.ts.map +0 -0
  1789. package/dist-extensions/src/parser/parseSVGDocument.d.ts +0 -0
  1790. package/dist-extensions/src/parser/parseSVGDocument.d.ts.map +0 -0
  1791. package/dist-extensions/src/parser/parseStyleAttribute.d.ts +0 -0
  1792. package/dist-extensions/src/parser/parseStyleAttribute.d.ts.map +0 -0
  1793. package/dist-extensions/src/parser/parseStyleObject.d.ts +0 -0
  1794. package/dist-extensions/src/parser/parseStyleObject.d.ts.map +0 -0
  1795. package/dist-extensions/src/parser/parseStyleString.d.ts +0 -0
  1796. package/dist-extensions/src/parser/parseStyleString.d.ts.map +0 -0
  1797. package/dist-extensions/src/parser/parseTransformAttribute.d.ts +0 -0
  1798. package/dist-extensions/src/parser/parseTransformAttribute.d.ts.map +0 -0
  1799. package/dist-extensions/src/parser/parseUseDirectives.d.ts +0 -0
  1800. package/dist-extensions/src/parser/parseUseDirectives.d.ts.map +0 -0
  1801. package/dist-extensions/src/parser/percent.d.ts +0 -0
  1802. package/dist-extensions/src/parser/percent.d.ts.map +0 -0
  1803. package/dist-extensions/src/parser/recursivelyParseGradientsXlink.d.ts +0 -0
  1804. package/dist-extensions/src/parser/recursivelyParseGradientsXlink.d.ts.map +0 -0
  1805. package/dist-extensions/src/parser/selectorMatches.d.ts +0 -0
  1806. package/dist-extensions/src/parser/selectorMatches.d.ts.map +0 -0
  1807. package/dist-extensions/src/parser/setStrokeFillOpacity.d.ts +0 -0
  1808. package/dist-extensions/src/parser/setStrokeFillOpacity.d.ts.map +0 -0
  1809. package/dist-extensions/src/parser/typedefs.d.ts +0 -0
  1810. package/dist-extensions/src/parser/typedefs.d.ts.map +0 -0
  1811. package/dist-extensions/src/shapes/ActiveSelection.d.ts +0 -0
  1812. package/dist-extensions/src/shapes/ActiveSelection.d.ts.map +0 -0
  1813. package/dist-extensions/src/shapes/Circle.d.ts +0 -0
  1814. package/dist-extensions/src/shapes/Circle.d.ts.map +0 -0
  1815. package/dist-extensions/src/shapes/CustomLine.d.ts +10 -0
  1816. package/dist-extensions/src/shapes/CustomLine.d.ts.map +1 -0
  1817. package/dist-extensions/src/shapes/Ellipse.d.ts +0 -0
  1818. package/dist-extensions/src/shapes/Ellipse.d.ts.map +0 -0
  1819. package/dist-extensions/src/shapes/Group.d.ts +0 -0
  1820. package/dist-extensions/src/shapes/Group.d.ts.map +0 -0
  1821. package/dist-extensions/src/shapes/IText/DraggableTextDelegate.d.ts +0 -0
  1822. package/dist-extensions/src/shapes/IText/DraggableTextDelegate.d.ts.map +0 -0
  1823. package/dist-extensions/src/shapes/IText/IText.d.ts +0 -0
  1824. package/dist-extensions/src/shapes/IText/IText.d.ts.map +0 -0
  1825. package/dist-extensions/src/shapes/IText/ITextBehavior.d.ts +0 -0
  1826. package/dist-extensions/src/shapes/IText/ITextBehavior.d.ts.map +0 -0
  1827. package/dist-extensions/src/shapes/IText/ITextClickBehavior.d.ts +0 -0
  1828. package/dist-extensions/src/shapes/IText/ITextClickBehavior.d.ts.map +0 -0
  1829. package/dist-extensions/src/shapes/IText/ITextKeyBehavior.d.ts +0 -0
  1830. package/dist-extensions/src/shapes/IText/ITextKeyBehavior.d.ts.map +0 -0
  1831. package/dist-extensions/src/shapes/IText/constants.d.ts +0 -0
  1832. package/dist-extensions/src/shapes/IText/constants.d.ts.map +0 -0
  1833. package/dist-extensions/src/shapes/Image.d.ts +0 -0
  1834. package/dist-extensions/src/shapes/Image.d.ts.map +0 -0
  1835. package/dist-extensions/src/shapes/Line.d.ts +31 -86
  1836. package/dist-extensions/src/shapes/Line.d.ts.map +1 -1
  1837. package/dist-extensions/src/shapes/Object/FabricObject.d.ts +0 -0
  1838. package/dist-extensions/src/shapes/Object/FabricObject.d.ts.map +0 -0
  1839. package/dist-extensions/src/shapes/Object/FabricObjectSVGExportMixin.d.ts +0 -0
  1840. package/dist-extensions/src/shapes/Object/FabricObjectSVGExportMixin.d.ts.map +0 -0
  1841. package/dist-extensions/src/shapes/Object/InteractiveObject.d.ts +0 -0
  1842. package/dist-extensions/src/shapes/Object/InteractiveObject.d.ts.map +0 -0
  1843. package/dist-extensions/src/shapes/Object/Object.d.ts +0 -0
  1844. package/dist-extensions/src/shapes/Object/Object.d.ts.map +0 -0
  1845. package/dist-extensions/src/shapes/Object/ObjectGeometry.d.ts +0 -0
  1846. package/dist-extensions/src/shapes/Object/ObjectGeometry.d.ts.map +0 -0
  1847. package/dist-extensions/src/shapes/Object/defaultValues.d.ts +0 -0
  1848. package/dist-extensions/src/shapes/Object/defaultValues.d.ts.map +0 -0
  1849. package/dist-extensions/src/shapes/Object/types/BaseProps.d.ts +0 -0
  1850. package/dist-extensions/src/shapes/Object/types/BaseProps.d.ts.map +0 -0
  1851. package/dist-extensions/src/shapes/Object/types/BorderProps.d.ts +0 -0
  1852. package/dist-extensions/src/shapes/Object/types/BorderProps.d.ts.map +0 -0
  1853. package/dist-extensions/src/shapes/Object/types/ControlProps.d.ts +0 -0
  1854. package/dist-extensions/src/shapes/Object/types/ControlProps.d.ts.map +0 -0
  1855. package/dist-extensions/src/shapes/Object/types/FabricObjectProps.d.ts +0 -0
  1856. package/dist-extensions/src/shapes/Object/types/FabricObjectProps.d.ts.map +0 -0
  1857. package/dist-extensions/src/shapes/Object/types/FillStrokeProps.d.ts +0 -0
  1858. package/dist-extensions/src/shapes/Object/types/FillStrokeProps.d.ts.map +0 -0
  1859. package/dist-extensions/src/shapes/Object/types/LockInteractionProps.d.ts +0 -0
  1860. package/dist-extensions/src/shapes/Object/types/LockInteractionProps.d.ts.map +0 -0
  1861. package/dist-extensions/src/shapes/Object/types/ObjectProps.d.ts +0 -0
  1862. package/dist-extensions/src/shapes/Object/types/ObjectProps.d.ts.map +0 -0
  1863. package/dist-extensions/src/shapes/Object/types/ObjectTransformProps.d.ts +0 -0
  1864. package/dist-extensions/src/shapes/Object/types/ObjectTransformProps.d.ts.map +0 -0
  1865. package/dist-extensions/src/shapes/Object/types/SerializedObjectProps.d.ts +0 -0
  1866. package/dist-extensions/src/shapes/Object/types/SerializedObjectProps.d.ts.map +0 -0
  1867. package/dist-extensions/src/shapes/Object/types/index.d.ts +0 -0
  1868. package/dist-extensions/src/shapes/Object/types/index.d.ts.map +0 -0
  1869. package/dist-extensions/src/shapes/Path.d.ts +0 -0
  1870. package/dist-extensions/src/shapes/Path.d.ts.map +0 -0
  1871. package/dist-extensions/src/shapes/Polygon.d.ts +0 -0
  1872. package/dist-extensions/src/shapes/Polygon.d.ts.map +0 -0
  1873. package/dist-extensions/src/shapes/Polyline.d.ts +7 -0
  1874. package/dist-extensions/src/shapes/Polyline.d.ts.map +1 -1
  1875. package/dist-extensions/src/shapes/Rect.d.ts +0 -0
  1876. package/dist-extensions/src/shapes/Rect.d.ts.map +0 -0
  1877. package/dist-extensions/src/shapes/Text/StyledText.d.ts +0 -0
  1878. package/dist-extensions/src/shapes/Text/StyledText.d.ts.map +0 -0
  1879. package/dist-extensions/src/shapes/Text/Text.d.ts +0 -0
  1880. package/dist-extensions/src/shapes/Text/Text.d.ts.map +0 -0
  1881. package/dist-extensions/src/shapes/Text/TextSVGExportMixin.d.ts +0 -0
  1882. package/dist-extensions/src/shapes/Text/TextSVGExportMixin.d.ts.map +0 -0
  1883. package/dist-extensions/src/shapes/Text/constants.d.ts +0 -0
  1884. package/dist-extensions/src/shapes/Text/constants.d.ts.map +0 -0
  1885. package/dist-extensions/src/shapes/Textbox.d.ts +0 -0
  1886. package/dist-extensions/src/shapes/Textbox.d.ts.map +0 -0
  1887. package/dist-extensions/src/shapes/Triangle.d.ts +27 -2
  1888. package/dist-extensions/src/shapes/Triangle.d.ts.map +1 -1
  1889. package/dist-extensions/src/text/browserLines.d.ts +0 -0
  1890. package/dist-extensions/src/text/browserLines.d.ts.map +0 -0
  1891. package/dist-extensions/src/text/ellipsis.d.ts +0 -0
  1892. package/dist-extensions/src/text/ellipsis.d.ts.map +0 -0
  1893. package/dist-extensions/src/text/hitTest.d.ts +0 -0
  1894. package/dist-extensions/src/text/hitTest.d.ts.map +0 -0
  1895. package/dist-extensions/src/text/layout.d.ts +0 -0
  1896. package/dist-extensions/src/text/layout.d.ts.map +0 -0
  1897. package/dist-extensions/src/text/measure.d.ts +0 -0
  1898. package/dist-extensions/src/text/measure.d.ts.map +0 -0
  1899. package/dist-extensions/src/text/overlayEditor.d.ts +0 -0
  1900. package/dist-extensions/src/text/overlayEditor.d.ts.map +0 -0
  1901. package/dist-extensions/src/text/unicode.d.ts +0 -0
  1902. package/dist-extensions/src/text/unicode.d.ts.map +0 -0
  1903. package/dist-extensions/src/typedefs.d.ts +0 -0
  1904. package/dist-extensions/src/typedefs.d.ts.map +0 -0
  1905. package/dist-extensions/src/util/animation/AnimationBase.d.ts +0 -0
  1906. package/dist-extensions/src/util/animation/AnimationBase.d.ts.map +0 -0
  1907. package/dist-extensions/src/util/animation/AnimationFrameProvider.d.ts +0 -0
  1908. package/dist-extensions/src/util/animation/AnimationFrameProvider.d.ts.map +0 -0
  1909. package/dist-extensions/src/util/animation/AnimationRegistry.d.ts +0 -0
  1910. package/dist-extensions/src/util/animation/AnimationRegistry.d.ts.map +0 -0
  1911. package/dist-extensions/src/util/animation/ArrayAnimation.d.ts +0 -0
  1912. package/dist-extensions/src/util/animation/ArrayAnimation.d.ts.map +0 -0
  1913. package/dist-extensions/src/util/animation/ColorAnimation.d.ts +0 -0
  1914. package/dist-extensions/src/util/animation/ColorAnimation.d.ts.map +0 -0
  1915. package/dist-extensions/src/util/animation/ValueAnimation.d.ts +0 -0
  1916. package/dist-extensions/src/util/animation/ValueAnimation.d.ts.map +0 -0
  1917. package/dist-extensions/src/util/animation/animate.d.ts +0 -0
  1918. package/dist-extensions/src/util/animation/animate.d.ts.map +0 -0
  1919. package/dist-extensions/src/util/animation/easing.d.ts +0 -0
  1920. package/dist-extensions/src/util/animation/easing.d.ts.map +0 -0
  1921. package/dist-extensions/src/util/animation/index.d.ts +0 -0
  1922. package/dist-extensions/src/util/animation/index.d.ts.map +0 -0
  1923. package/dist-extensions/src/util/animation/types.d.ts +0 -0
  1924. package/dist-extensions/src/util/animation/types.d.ts.map +0 -0
  1925. package/dist-extensions/src/util/applyMixins.d.ts +0 -0
  1926. package/dist-extensions/src/util/applyMixins.d.ts.map +0 -0
  1927. package/dist-extensions/src/util/dom_event.d.ts +0 -0
  1928. package/dist-extensions/src/util/dom_event.d.ts.map +0 -0
  1929. package/dist-extensions/src/util/dom_misc.d.ts +0 -0
  1930. package/dist-extensions/src/util/dom_misc.d.ts.map +0 -0
  1931. package/dist-extensions/src/util/index.d.ts +0 -0
  1932. package/dist-extensions/src/util/index.d.ts.map +0 -0
  1933. package/dist-extensions/src/util/internals/applyCanvasTransform.d.ts +0 -0
  1934. package/dist-extensions/src/util/internals/applyCanvasTransform.d.ts.map +0 -0
  1935. package/dist-extensions/src/util/internals/cleanupSvgAttribute.d.ts +0 -0
  1936. package/dist-extensions/src/util/internals/cleanupSvgAttribute.d.ts.map +0 -0
  1937. package/dist-extensions/src/util/internals/cloneStyles.d.ts +0 -0
  1938. package/dist-extensions/src/util/internals/cloneStyles.d.ts.map +0 -0
  1939. package/dist-extensions/src/util/internals/console.d.ts +0 -0
  1940. package/dist-extensions/src/util/internals/console.d.ts.map +0 -0
  1941. package/dist-extensions/src/util/internals/dom_style.d.ts +0 -0
  1942. package/dist-extensions/src/util/internals/dom_style.d.ts.map +0 -0
  1943. package/dist-extensions/src/util/internals/findRight.d.ts +0 -0
  1944. package/dist-extensions/src/util/internals/findRight.d.ts.map +0 -0
  1945. package/dist-extensions/src/util/internals/getRandomInt.d.ts +0 -0
  1946. package/dist-extensions/src/util/internals/getRandomInt.d.ts.map +0 -0
  1947. package/dist-extensions/src/util/internals/ifNaN.d.ts +0 -0
  1948. package/dist-extensions/src/util/internals/ifNaN.d.ts.map +0 -0
  1949. package/dist-extensions/src/util/internals/removeFromArray.d.ts +0 -0
  1950. package/dist-extensions/src/util/internals/removeFromArray.d.ts.map +0 -0
  1951. package/dist-extensions/src/util/internals/uid.d.ts +0 -0
  1952. package/dist-extensions/src/util/internals/uid.d.ts.map +0 -0
  1953. package/dist-extensions/src/util/lang_string.d.ts +0 -0
  1954. package/dist-extensions/src/util/lang_string.d.ts.map +0 -0
  1955. package/dist-extensions/src/util/misc/boundingBoxFromPoints.d.ts +0 -0
  1956. package/dist-extensions/src/util/misc/boundingBoxFromPoints.d.ts.map +0 -0
  1957. package/dist-extensions/src/util/misc/capValue.d.ts +0 -0
  1958. package/dist-extensions/src/util/misc/capValue.d.ts.map +0 -0
  1959. package/dist-extensions/src/util/misc/cornerRadius.d.ts +70 -0
  1960. package/dist-extensions/src/util/misc/cornerRadius.d.ts.map +1 -0
  1961. package/dist-extensions/src/util/misc/cos.d.ts +0 -0
  1962. package/dist-extensions/src/util/misc/cos.d.ts.map +0 -0
  1963. package/dist-extensions/src/util/misc/dom.d.ts +0 -0
  1964. package/dist-extensions/src/util/misc/dom.d.ts.map +0 -0
  1965. package/dist-extensions/src/util/misc/findScaleTo.d.ts +0 -0
  1966. package/dist-extensions/src/util/misc/findScaleTo.d.ts.map +0 -0
  1967. package/dist-extensions/src/util/misc/groupSVGElements.d.ts +0 -0
  1968. package/dist-extensions/src/util/misc/groupSVGElements.d.ts.map +0 -0
  1969. package/dist-extensions/src/util/misc/isTransparent.d.ts +0 -0
  1970. package/dist-extensions/src/util/misc/isTransparent.d.ts.map +0 -0
  1971. package/dist-extensions/src/util/misc/matrix.d.ts +0 -0
  1972. package/dist-extensions/src/util/misc/matrix.d.ts.map +0 -0
  1973. package/dist-extensions/src/util/misc/mergeClipPaths.d.ts +0 -0
  1974. package/dist-extensions/src/util/misc/mergeClipPaths.d.ts.map +0 -0
  1975. package/dist-extensions/src/util/misc/objectEnlive.d.ts +0 -0
  1976. package/dist-extensions/src/util/misc/objectEnlive.d.ts.map +0 -0
  1977. package/dist-extensions/src/util/misc/objectTransforms.d.ts +0 -0
  1978. package/dist-extensions/src/util/misc/objectTransforms.d.ts.map +0 -0
  1979. package/dist-extensions/src/util/misc/pick.d.ts +0 -0
  1980. package/dist-extensions/src/util/misc/pick.d.ts.map +0 -0
  1981. package/dist-extensions/src/util/misc/planeChange.d.ts +0 -0
  1982. package/dist-extensions/src/util/misc/planeChange.d.ts.map +0 -0
  1983. package/dist-extensions/src/util/misc/projectStroke/StrokeLineCapProjections.d.ts +0 -0
  1984. package/dist-extensions/src/util/misc/projectStroke/StrokeLineCapProjections.d.ts.map +0 -0
  1985. package/dist-extensions/src/util/misc/projectStroke/StrokeLineJoinProjections.d.ts +0 -0
  1986. package/dist-extensions/src/util/misc/projectStroke/StrokeLineJoinProjections.d.ts.map +0 -0
  1987. package/dist-extensions/src/util/misc/projectStroke/StrokeProjectionsBase.d.ts +0 -0
  1988. package/dist-extensions/src/util/misc/projectStroke/StrokeProjectionsBase.d.ts.map +0 -0
  1989. package/dist-extensions/src/util/misc/projectStroke/index.d.ts +0 -0
  1990. package/dist-extensions/src/util/misc/projectStroke/index.d.ts.map +0 -0
  1991. package/dist-extensions/src/util/misc/projectStroke/types.d.ts +0 -0
  1992. package/dist-extensions/src/util/misc/projectStroke/types.d.ts.map +0 -0
  1993. package/dist-extensions/src/util/misc/radiansDegreesConversion.d.ts +0 -0
  1994. package/dist-extensions/src/util/misc/radiansDegreesConversion.d.ts.map +0 -0
  1995. package/dist-extensions/src/util/misc/resolveOrigin.d.ts +0 -0
  1996. package/dist-extensions/src/util/misc/resolveOrigin.d.ts.map +0 -0
  1997. package/dist-extensions/src/util/misc/sin.d.ts +0 -0
  1998. package/dist-extensions/src/util/misc/sin.d.ts.map +0 -0
  1999. package/dist-extensions/src/util/misc/svgExport.d.ts +0 -0
  2000. package/dist-extensions/src/util/misc/svgExport.d.ts.map +0 -0
  2001. package/dist-extensions/src/util/misc/svgParsing.d.ts +0 -0
  2002. package/dist-extensions/src/util/misc/svgParsing.d.ts.map +0 -0
  2003. package/dist-extensions/src/util/misc/textStyles.d.ts +0 -0
  2004. package/dist-extensions/src/util/misc/textStyles.d.ts.map +0 -0
  2005. package/dist-extensions/src/util/misc/toFixed.d.ts +0 -0
  2006. package/dist-extensions/src/util/misc/toFixed.d.ts.map +0 -0
  2007. package/dist-extensions/src/util/misc/vectors.d.ts +0 -0
  2008. package/dist-extensions/src/util/misc/vectors.d.ts.map +0 -0
  2009. package/dist-extensions/src/util/path/index.d.ts +0 -0
  2010. package/dist-extensions/src/util/path/index.d.ts.map +0 -0
  2011. package/dist-extensions/src/util/path/regex.d.ts +0 -0
  2012. package/dist-extensions/src/util/path/regex.d.ts.map +0 -0
  2013. package/dist-extensions/src/util/path/typedefs.d.ts +0 -0
  2014. package/dist-extensions/src/util/path/typedefs.d.ts.map +0 -0
  2015. package/dist-extensions/src/util/transform_matrix_removal.d.ts +0 -0
  2016. package/dist-extensions/src/util/transform_matrix_removal.d.ts.map +0 -0
  2017. package/dist-extensions/src/util/typeAssertions.d.ts +0 -0
  2018. package/dist-extensions/src/util/typeAssertions.d.ts.map +0 -0
  2019. package/docs/fabric-konva-gap-analysis.md +274 -0
  2020. package/docs/konva-text-behavior-spec.md +265 -0
  2021. package/docs/text-engine-design.md +698 -0
  2022. package/eslint.config.mjs +0 -0
  2023. package/examples/overlay-edit.html +416 -416
  2024. package/extensions/README.MD +0 -0
  2025. package/extensions/aligning_guidelines/README.MD +0 -0
  2026. package/extensions/aligning_guidelines/constant.ts +0 -0
  2027. package/extensions/aligning_guidelines/index.ts +0 -0
  2028. package/extensions/aligning_guidelines/typedefs.ts +0 -0
  2029. package/extensions/aligning_guidelines/util/basic.spec.ts +0 -0
  2030. package/extensions/aligning_guidelines/util/basic.ts +0 -0
  2031. package/extensions/aligning_guidelines/util/collect-line.ts +0 -0
  2032. package/extensions/aligning_guidelines/util/collect-point.ts +0 -0
  2033. package/extensions/aligning_guidelines/util/draw.ts +0 -0
  2034. package/extensions/aligning_guidelines/util/get-objects-by-target.ts +0 -0
  2035. package/extensions/data_updaters/README.md +0 -0
  2036. package/extensions/data_updaters/gradient/__snapshots__/index.spec.ts.snap +0 -0
  2037. package/extensions/data_updaters/gradient/index.spec.ts +0 -0
  2038. package/extensions/data_updaters/gradient/index.ts +0 -0
  2039. package/extensions/data_updaters/origins/README.md +0 -0
  2040. package/extensions/data_updaters/origins/index.spec.ts +0 -0
  2041. package/extensions/data_updaters/origins/index.ts +0 -0
  2042. package/extensions/index.ts +0 -0
  2043. package/fabric-test-editor.html +1111 -505
  2044. package/fabric-test2.html +513 -0
  2045. package/fabric.ts +182 -182
  2046. package/index.node.ts +0 -0
  2047. package/index.ts +0 -0
  2048. package/lib/aligning_guidelines.js +0 -0
  2049. package/lib/centering_guidelines.js +0 -0
  2050. package/lib/event.js +0 -0
  2051. package/package.json +164 -164
  2052. package/playwright.config.ts +0 -0
  2053. package/playwright.setup.ts +0 -0
  2054. package/publish-next.js +0 -0
  2055. package/publish.js +0 -0
  2056. package/rollup.config.mjs +0 -0
  2057. package/scripts/bench-text.js +591 -591
  2058. package/scripts/build.mjs +0 -0
  2059. package/scripts/buildLock.mjs +0 -0
  2060. package/scripts/buildReporter.mjs +0 -0
  2061. package/scripts/buildStats.mjs +0 -0
  2062. package/scripts/dirname.mjs +0 -0
  2063. package/scripts/git.mjs +0 -0
  2064. package/scripts/index.mjs +0 -0
  2065. package/scripts/sandbox.mjs +0 -0
  2066. package/src/ClassRegistry.spec.ts +0 -0
  2067. package/src/ClassRegistry.ts +0 -0
  2068. package/src/Collection.spec.ts +0 -0
  2069. package/src/Collection.ts +0 -0
  2070. package/src/CommonMethods.ts +0 -0
  2071. package/src/EventTypeDefs.ts +0 -0
  2072. package/src/Intersection.spec.ts +0 -0
  2073. package/src/Intersection.ts +0 -0
  2074. package/src/LayoutManager/ActiveSelectionLayoutManager.spec.ts +0 -0
  2075. package/src/LayoutManager/ActiveSelectionLayoutManager.ts +0 -0
  2076. package/src/LayoutManager/LayoutManager.spec.ts +0 -0
  2077. package/src/LayoutManager/LayoutManager.ts +0 -0
  2078. package/src/LayoutManager/LayoutStrategies/ClipPathLayout.ts +0 -0
  2079. package/src/LayoutManager/LayoutStrategies/FitContentLayout.ts +0 -0
  2080. package/src/LayoutManager/LayoutStrategies/FixedLayout.ts +0 -0
  2081. package/src/LayoutManager/LayoutStrategies/LayoutStrategy.ts +0 -0
  2082. package/src/LayoutManager/LayoutStrategies/utils.ts +0 -0
  2083. package/src/LayoutManager/README.md +0 -0
  2084. package/src/LayoutManager/__snapshots__/LayoutManager.spec.ts.snap +0 -0
  2085. package/src/LayoutManager/constants.ts +0 -0
  2086. package/src/LayoutManager/index.ts +0 -0
  2087. package/src/LayoutManager/types.ts +0 -0
  2088. package/src/Observable.spec.ts +0 -0
  2089. package/src/Observable.ts +0 -0
  2090. package/src/Pattern/Pattern.spec.ts +0 -0
  2091. package/src/Pattern/Pattern.ts +0 -0
  2092. package/src/Pattern/index.ts +0 -0
  2093. package/src/Pattern/types.ts +0 -0
  2094. package/src/Point.spec.ts +0 -0
  2095. package/src/Point.ts +0 -0
  2096. package/src/Shadow.spec.ts +0 -0
  2097. package/src/Shadow.ts +0 -0
  2098. package/src/__snapshots__/Shadow.spec.ts.snap +0 -0
  2099. package/src/brushes/BaseBrush.spec.ts +0 -0
  2100. package/src/brushes/BaseBrush.ts +0 -0
  2101. package/src/brushes/CircleBrush.test.ts +0 -0
  2102. package/src/brushes/CircleBrush.ts +0 -0
  2103. package/src/brushes/PatternBrush.ts +0 -0
  2104. package/src/brushes/PencilBrush.spec.ts +0 -0
  2105. package/src/brushes/PencilBrush.ts +0 -0
  2106. package/src/brushes/SprayBrush.ts +0 -0
  2107. package/src/brushes/__snapshots__/PencilBrush.spec.ts.snap +0 -0
  2108. package/src/brushes/typedefs.ts +0 -0
  2109. package/src/cache.spec.ts +0 -0
  2110. package/src/cache.ts +0 -0
  2111. package/src/canvas/Canvas-dispose.spec.ts +0 -0
  2112. package/src/canvas/Canvas-events.spec.ts +0 -0
  2113. package/src/canvas/Canvas.spec.ts +0 -0
  2114. package/src/canvas/Canvas.ts +0 -0
  2115. package/src/canvas/CanvasOptions.ts +0 -0
  2116. package/src/canvas/DOMManagers/CanvasDOMManager.ts +0 -0
  2117. package/src/canvas/DOMManagers/StaticCanvasDOMManager.ts +0 -0
  2118. package/src/canvas/DOMManagers/util.spec.ts +0 -0
  2119. package/src/canvas/DOMManagers/util.ts +0 -0
  2120. package/src/canvas/SelectableCanvas.spec.ts +0 -0
  2121. package/src/canvas/SelectableCanvas.ts +0 -0
  2122. package/src/canvas/StaticCanvas.spec.ts +0 -0
  2123. package/src/canvas/StaticCanvas.ts +0 -0
  2124. package/src/canvas/StaticCanvasOptions.ts +0 -0
  2125. package/src/canvas/TextEditingManager.ts +0 -0
  2126. package/src/canvas/__tests__/SelectableCanvas.spec.ts +0 -0
  2127. package/src/canvas/__tests__/__snapshots__/eventData.test.ts.snap +0 -0
  2128. package/src/canvas/__tests__/eventData.test.ts +0 -0
  2129. package/src/canvas/canvas_gestures.mixin.ts +0 -0
  2130. package/src/color/Color.ts +0 -0
  2131. package/src/color/color.test.ts +0 -0
  2132. package/src/color/color_map.ts +0 -0
  2133. package/src/color/constants.ts +0 -0
  2134. package/src/color/typedefs.ts +0 -0
  2135. package/src/color/util.ts +0 -0
  2136. package/src/config.ts +0 -0
  2137. package/src/constants.ts +0 -0
  2138. package/src/controls/Control-cursor.spec.ts +0 -0
  2139. package/src/controls/Control-handlers.spec.ts +0 -0
  2140. package/src/controls/Control.spec.ts +0 -0
  2141. package/src/controls/Control.ts +0 -0
  2142. package/src/controls/changeHeight.ts +0 -0
  2143. package/src/controls/changeWidth.test.ts +0 -0
  2144. package/src/controls/changeWidth.ts +0 -0
  2145. package/src/controls/commonControls.ts +0 -0
  2146. package/src/controls/controlRendering.ts +0 -0
  2147. package/src/controls/drag.ts +0 -0
  2148. package/src/controls/fireEvent.ts +0 -0
  2149. package/src/controls/index.ts +0 -0
  2150. package/src/controls/pathControl.spec.ts +0 -0
  2151. package/src/controls/pathControl.ts +0 -0
  2152. package/src/controls/polyControl.spec.ts +0 -0
  2153. package/src/controls/polyControl.ts +0 -0
  2154. package/src/controls/rotate.ts +0 -0
  2155. package/src/controls/scale.test.ts +0 -0
  2156. package/src/controls/scale.ts +0 -0
  2157. package/src/controls/scaleSkew.ts +0 -0
  2158. package/src/controls/skew.ts +0 -0
  2159. package/src/controls/util.ts +0 -0
  2160. package/src/controls/wrapWithFireEvent.ts +0 -0
  2161. package/src/controls/wrapWithFixedAnchor.spec.ts +0 -0
  2162. package/src/controls/wrapWithFixedAnchor.ts +0 -0
  2163. package/src/env/browser.ts +0 -0
  2164. package/src/env/env.spec.ts +0 -0
  2165. package/src/env/index.ts +0 -0
  2166. package/src/env/node.ts +0 -0
  2167. package/src/env/types.ts +0 -0
  2168. package/src/filters/BaseFilter.spec.ts +0 -0
  2169. package/src/filters/BaseFilter.ts +0 -0
  2170. package/src/filters/BlendColor.ts +0 -0
  2171. package/src/filters/BlendImage.ts +0 -0
  2172. package/src/filters/Blur.ts +0 -0
  2173. package/src/filters/Boilerplate.ts +0 -0
  2174. package/src/filters/Brightness.ts +0 -0
  2175. package/src/filters/Canvas2dFilterBackend.ts +0 -0
  2176. package/src/filters/ColorMatrix.spec.ts +0 -0
  2177. package/src/filters/ColorMatrix.ts +0 -0
  2178. package/src/filters/ColorMatrixFilters.ts +0 -0
  2179. package/src/filters/Composed.ts +0 -0
  2180. package/src/filters/Contrast.ts +0 -0
  2181. package/src/filters/Convolute.ts +0 -0
  2182. package/src/filters/FilterBackend.ts +0 -0
  2183. package/src/filters/GLProbes/GLProbe.ts +0 -0
  2184. package/src/filters/GLProbes/NodeGLProbe.ts +0 -0
  2185. package/src/filters/GLProbes/WebGLProbe.ts +0 -0
  2186. package/src/filters/Gamma.ts +0 -0
  2187. package/src/filters/Grayscale.ts +0 -0
  2188. package/src/filters/HueRotation.ts +0 -0
  2189. package/src/filters/Invert.ts +0 -0
  2190. package/src/filters/Noise.ts +0 -0
  2191. package/src/filters/Pixelate.ts +0 -0
  2192. package/src/filters/RemoveColor.ts +0 -0
  2193. package/src/filters/Resize.ts +0 -0
  2194. package/src/filters/Saturation.ts +0 -0
  2195. package/src/filters/Vibrance.ts +0 -0
  2196. package/src/filters/WebGLFilterBackend.spec.ts +0 -0
  2197. package/src/filters/WebGLFilterBackend.ts +0 -0
  2198. package/src/filters/filters.ts +0 -0
  2199. package/src/filters/index.ts +0 -0
  2200. package/src/filters/shaders/baseFilter.ts +0 -0
  2201. package/src/filters/shaders/blendColor.ts +0 -0
  2202. package/src/filters/shaders/blendImage.ts +0 -0
  2203. package/src/filters/shaders/blur.ts +0 -0
  2204. package/src/filters/shaders/brightness.ts +0 -0
  2205. package/src/filters/shaders/colorMatrix.ts +0 -0
  2206. package/src/filters/shaders/constrast.ts +0 -0
  2207. package/src/filters/shaders/convolute.ts +0 -0
  2208. package/src/filters/shaders/gamma.ts +0 -0
  2209. package/src/filters/shaders/grayscale.ts +0 -0
  2210. package/src/filters/shaders/invert.ts +0 -0
  2211. package/src/filters/shaders/noise.ts +0 -0
  2212. package/src/filters/shaders/pixelate.ts +0 -0
  2213. package/src/filters/shaders/removeColor.ts +0 -0
  2214. package/src/filters/shaders/saturation.ts +0 -0
  2215. package/src/filters/shaders/vibrance.ts +0 -0
  2216. package/src/filters/typedefs.ts +0 -0
  2217. package/src/filters/utils.ts +0 -0
  2218. package/src/gradient/Gradient.spec.ts +0 -0
  2219. package/src/gradient/Gradient.ts +0 -0
  2220. package/src/gradient/constants.ts +0 -0
  2221. package/src/gradient/index.ts +0 -0
  2222. package/src/gradient/parser/misc.ts +0 -0
  2223. package/src/gradient/parser/parseColorStops.ts +0 -0
  2224. package/src/gradient/parser/parseCoords.ts +0 -0
  2225. package/src/gradient/typedefs.ts +0 -0
  2226. package/src/mixins/eraser_brush.mixin.ts +0 -0
  2227. package/src/parkinglot/canvas_animation.mixin.ts +0 -0
  2228. package/src/parkinglot/straighten.ts +0 -0
  2229. package/src/parser/applyViewboxTransform.spec.ts +0 -0
  2230. package/src/parser/applyViewboxTransform.ts +0 -0
  2231. package/src/parser/attributes.ts +0 -0
  2232. package/src/parser/constants.spec.ts +0 -0
  2233. package/src/parser/constants.ts +0 -0
  2234. package/src/parser/doesSomeParentMatch.ts +0 -0
  2235. package/src/parser/elementMatchesRule.ts +0 -0
  2236. package/src/parser/elements_parser.ts +0 -0
  2237. package/src/parser/getCSSRules.spec.ts +0 -0
  2238. package/src/parser/getCSSRules.ts +0 -0
  2239. package/src/parser/getGlobalStylesForElement.ts +0 -0
  2240. package/src/parser/getGradientDefs.ts +0 -0
  2241. package/src/parser/getMultipleNodes.ts +0 -0
  2242. package/src/parser/getSvgRegex.ts +0 -0
  2243. package/src/parser/getTagName.ts +0 -0
  2244. package/src/parser/hasInvalidAncestor.ts +0 -0
  2245. package/src/parser/loadSVGFromString.test.ts +0 -0
  2246. package/src/parser/loadSVGFromString.ts +0 -0
  2247. package/src/parser/loadSVGFromURL.ts +0 -0
  2248. package/src/parser/normalizeAttr.ts +0 -0
  2249. package/src/parser/normalizeValue.ts +0 -0
  2250. package/src/parser/parseAttributes.ts +0 -0
  2251. package/src/parser/parseFontDeclaration.ts +0 -0
  2252. package/src/parser/parsePointsAttribute.ts +0 -0
  2253. package/src/parser/parseSVGDocument.ts +0 -0
  2254. package/src/parser/parseStyleAttribute.ts +0 -0
  2255. package/src/parser/parseStyleObject.ts +0 -0
  2256. package/src/parser/parseStyleString.ts +0 -0
  2257. package/src/parser/parseTransformAttribute.ts +0 -0
  2258. package/src/parser/parseUseDirectives.test.ts +0 -0
  2259. package/src/parser/parseUseDirectives.ts +0 -0
  2260. package/src/parser/parser.spec.ts +0 -0
  2261. package/src/parser/percent.ts +0 -0
  2262. package/src/parser/recursivelyParseGradientsXlink.ts +0 -0
  2263. package/src/parser/selectorMatches.ts +0 -0
  2264. package/src/parser/setStrokeFillOpacity.ts +0 -0
  2265. package/src/parser/typedefs.ts +0 -0
  2266. package/src/shapes/ActiveSelection.spec.ts +0 -0
  2267. package/src/shapes/ActiveSelection.ts +0 -0
  2268. package/src/shapes/Circle.spec.ts +0 -0
  2269. package/src/shapes/Circle.ts +0 -0
  2270. package/src/shapes/Ellipse.spec.ts +0 -0
  2271. package/src/shapes/Ellipse.ts +0 -0
  2272. package/src/shapes/Group.spec.ts +0 -0
  2273. package/src/shapes/Group.ts +0 -0
  2274. package/src/shapes/IText/DraggableTextDelegate.ts +0 -0
  2275. package/src/shapes/IText/IText-click-behavior.spec.ts +0 -0
  2276. package/src/shapes/IText/IText.test.ts +0 -0
  2277. package/src/shapes/IText/IText.ts +846 -846
  2278. package/src/shapes/IText/ITextBehavior.test.ts +0 -0
  2279. package/src/shapes/IText/ITextBehavior.ts +1176 -1176
  2280. package/src/shapes/IText/ITextClickBehavior.ts +254 -254
  2281. package/src/shapes/IText/ITextKeyBehavior.test.ts +0 -0
  2282. package/src/shapes/IText/ITextKeyBehavior.ts +0 -0
  2283. package/src/shapes/IText/__snapshots__/IText.test.ts.snap +0 -0
  2284. package/src/shapes/IText/__snapshots__/ITextBehavior.test.ts.snap +0 -0
  2285. package/src/shapes/IText/constants.ts +0 -0
  2286. package/src/shapes/Image-filters.spec.ts +0 -0
  2287. package/src/shapes/Image.spec.ts +0 -0
  2288. package/src/shapes/Image.ts +0 -0
  2289. package/src/shapes/Line.spec.ts +0 -0
  2290. package/src/shapes/Line.ts +372 -158
  2291. package/src/shapes/Object/FabricObject.spec.ts +0 -0
  2292. package/src/shapes/Object/FabricObject.ts +0 -0
  2293. package/src/shapes/Object/FabricObjectSVGExportMixin.ts +0 -0
  2294. package/src/shapes/Object/InteractiveObject.spec.ts +0 -0
  2295. package/src/shapes/Object/InteractiveObject.ts +0 -0
  2296. package/src/shapes/Object/Object-clip-path.spec.ts +0 -0
  2297. package/src/shapes/Object/Object-interactivity.spec.ts +0 -0
  2298. package/src/shapes/Object/Object.spec.ts +0 -0
  2299. package/src/shapes/Object/Object.ts +0 -0
  2300. package/src/shapes/Object/ObjectGeometry.spec.ts +0 -0
  2301. package/src/shapes/Object/ObjectGeometry.ts +0 -0
  2302. package/src/shapes/Object/ObjectOrigin.spec.ts +0 -0
  2303. package/src/shapes/Object/ObjectSerialization.spec.ts +0 -0
  2304. package/src/shapes/Object/StackedObject.spec.ts +0 -0
  2305. package/src/shapes/Object/__snapshots__/InteractiveObject.spec.ts.snap +0 -0
  2306. package/src/shapes/Object/defaultValues.ts +0 -0
  2307. package/src/shapes/Object/types/BaseProps.ts +0 -0
  2308. package/src/shapes/Object/types/BorderProps.ts +0 -0
  2309. package/src/shapes/Object/types/ControlProps.ts +0 -0
  2310. package/src/shapes/Object/types/FabricObjectProps.ts +0 -0
  2311. package/src/shapes/Object/types/FillStrokeProps.ts +0 -0
  2312. package/src/shapes/Object/types/LockInteractionProps.ts +0 -0
  2313. package/src/shapes/Object/types/ObjectProps.ts +0 -0
  2314. package/src/shapes/Object/types/ObjectTransformProps.ts +0 -0
  2315. package/src/shapes/Object/types/SerializedObjectProps.ts +0 -0
  2316. package/src/shapes/Object/types/index.ts +0 -0
  2317. package/src/shapes/Path.spec.ts +0 -0
  2318. package/src/shapes/Path.ts +0 -0
  2319. package/src/shapes/Polygon.spec.ts +0 -0
  2320. package/src/shapes/Polygon.ts +0 -0
  2321. package/src/shapes/Polyline.spec.ts +0 -0
  2322. package/src/shapes/Polyline.ts +70 -29
  2323. package/src/shapes/Rect.spec.ts +0 -0
  2324. package/src/shapes/Rect.ts +0 -0
  2325. package/src/shapes/Text/StyledText.spec.ts +0 -0
  2326. package/src/shapes/Text/StyledText.ts +0 -0
  2327. package/src/shapes/Text/Text.spec.ts +0 -0
  2328. package/src/shapes/Text/Text.ts +2226 -2226
  2329. package/src/shapes/Text/TextSVGExportMixin.spec.ts +0 -0
  2330. package/src/shapes/Text/TextSVGExportMixin.ts +0 -0
  2331. package/src/shapes/Text/__snapshots__/Text.spec.ts.snap +0 -0
  2332. package/src/shapes/Text/__snapshots__/TextSVGExportMixin.spec.ts.snap +0 -0
  2333. package/src/shapes/Text/constants.ts +134 -134
  2334. package/src/shapes/Textbox.spec.ts +0 -0
  2335. package/src/shapes/Textbox.ts +788 -788
  2336. package/src/shapes/Triangle.spec.ts +76 -0
  2337. package/src/shapes/Triangle.ts +85 -15
  2338. package/src/shapes/__snapshots__/Image.spec.ts.snap +0 -0
  2339. package/src/shapes/__snapshots__/Textbox.spec.ts.snap +0 -0
  2340. package/src/text/browserLines.ts +233 -233
  2341. package/src/text/ellipsis.ts +516 -516
  2342. package/src/text/hitTest.ts +623 -623
  2343. package/src/text/layout.ts +586 -586
  2344. package/src/text/measure.ts +475 -475
  2345. package/src/text/overlayEditor.ts +1035 -1035
  2346. package/src/text/unicode.ts +454 -454
  2347. package/src/typedefs.ts +0 -0
  2348. package/src/util/__snapshots__/index.spec.ts.snap +0 -0
  2349. package/src/util/animation/AnimationBase.ts +0 -0
  2350. package/src/util/animation/AnimationFrameProvider.ts +0 -0
  2351. package/src/util/animation/AnimationRegistry.ts +0 -0
  2352. package/src/util/animation/ArrayAnimation.ts +0 -0
  2353. package/src/util/animation/ColorAnimation.ts +0 -0
  2354. package/src/util/animation/ValueAnimation.ts +0 -0
  2355. package/src/util/animation/__snapshots__/animations.spec.ts.snap +0 -0
  2356. package/src/util/animation/animate.ts +0 -0
  2357. package/src/util/animation/animations.spec.ts +0 -0
  2358. package/src/util/animation/easing.ts +0 -0
  2359. package/src/util/animation/index.ts +0 -0
  2360. package/src/util/animation/types.ts +0 -0
  2361. package/src/util/applyMixins.ts +0 -0
  2362. package/src/util/dom_event.spec.ts +0 -0
  2363. package/src/util/dom_event.ts +0 -0
  2364. package/src/util/dom_misc.ts +0 -0
  2365. package/src/util/index.spec.ts +0 -0
  2366. package/src/util/index.ts +0 -0
  2367. package/src/util/internals/applyCanvasTransform.ts +0 -0
  2368. package/src/util/internals/cleanupSvgAttribute.test.ts +0 -0
  2369. package/src/util/internals/cleanupSvgAttribute.ts +0 -0
  2370. package/src/util/internals/cloneStyles.spec.ts +0 -0
  2371. package/src/util/internals/cloneStyles.ts +0 -0
  2372. package/src/util/internals/console.ts +0 -0
  2373. package/src/util/internals/dom_style.spec.ts +0 -0
  2374. package/src/util/internals/dom_style.ts +0 -0
  2375. package/src/util/internals/findRight.ts +0 -0
  2376. package/src/util/internals/getRandomInt.test.ts +0 -0
  2377. package/src/util/internals/getRandomInt.ts +0 -0
  2378. package/src/util/internals/ifNaN.ts +0 -0
  2379. package/src/util/internals/removeFromArray.spec.ts +0 -0
  2380. package/src/util/internals/removeFromArray.ts +0 -0
  2381. package/src/util/internals/uid.ts +0 -0
  2382. package/src/util/lang_string.spec.ts +0 -0
  2383. package/src/util/lang_string.ts +0 -0
  2384. package/src/util/misc/boundingBoxFromPoints.spec.ts +0 -0
  2385. package/src/util/misc/boundingBoxFromPoints.ts +0 -0
  2386. package/src/util/misc/capValue.spec.ts +0 -0
  2387. package/src/util/misc/capValue.ts +0 -0
  2388. package/src/util/misc/cornerRadius.spec.ts +141 -0
  2389. package/src/util/misc/cornerRadius.ts +269 -0
  2390. package/src/util/misc/cos.spec.ts +0 -0
  2391. package/src/util/misc/cos.ts +0 -0
  2392. package/src/util/misc/dom.spec.ts +0 -0
  2393. package/src/util/misc/dom.ts +0 -0
  2394. package/src/util/misc/findScaleTo.spec.ts +0 -0
  2395. package/src/util/misc/findScaleTo.ts +0 -0
  2396. package/src/util/misc/groupSVGElements.spec.ts +0 -0
  2397. package/src/util/misc/groupSVGElements.ts +0 -0
  2398. package/src/util/misc/isTransparent.ts +0 -0
  2399. package/src/util/misc/matrix.spec.ts +0 -0
  2400. package/src/util/misc/matrix.ts +0 -0
  2401. package/src/util/misc/mergeClipPaths.spec.ts +0 -0
  2402. package/src/util/misc/mergeClipPaths.ts +0 -0
  2403. package/src/util/misc/objectEnlive.spec.ts +0 -0
  2404. package/src/util/misc/objectEnlive.ts +0 -0
  2405. package/src/util/misc/objectTransforms.spec.ts +0 -0
  2406. package/src/util/misc/objectTransforms.ts +0 -0
  2407. package/src/util/misc/pick.spec.ts +0 -0
  2408. package/src/util/misc/pick.ts +0 -0
  2409. package/src/util/misc/planeChange.spec.ts +0 -0
  2410. package/src/util/misc/planeChange.ts +0 -0
  2411. package/src/util/misc/projectStroke/StrokeLineCapProjections.ts +0 -0
  2412. package/src/util/misc/projectStroke/StrokeLineJoinProjections.ts +0 -0
  2413. package/src/util/misc/projectStroke/StrokeProjectionsBase.ts +0 -0
  2414. package/src/util/misc/projectStroke/index.ts +0 -0
  2415. package/src/util/misc/projectStroke/types.ts +0 -0
  2416. package/src/util/misc/radiansDegreesConversion.spec.ts +0 -0
  2417. package/src/util/misc/radiansDegreesConversion.ts +0 -0
  2418. package/src/util/misc/resolveOrigin.ts +0 -0
  2419. package/src/util/misc/sin.ts +0 -0
  2420. package/src/util/misc/svgExport.ts +0 -0
  2421. package/src/util/misc/svgParsing.spec.ts +0 -0
  2422. package/src/util/misc/svgParsing.ts +0 -0
  2423. package/src/util/misc/textStyles.ts +0 -0
  2424. package/src/util/misc/toFixed.spec.ts +0 -0
  2425. package/src/util/misc/toFixed.ts +0 -0
  2426. package/src/util/misc/vectors.spec.ts +0 -0
  2427. package/src/util/misc/vectors.ts +0 -0
  2428. package/src/util/path/__snapshots__/index.spec.ts.snap +0 -0
  2429. package/src/util/path/index.spec.ts +0 -0
  2430. package/src/util/path/index.ts +0 -0
  2431. package/src/util/path/regex.ts +0 -0
  2432. package/src/util/path/typechecks.ts +0 -0
  2433. package/src/util/path/typedefs.ts +0 -0
  2434. package/src/util/transform_matrix_removal.ts +0 -0
  2435. package/src/util/typeAssertions.spec.ts +0 -0
  2436. package/src/util/typeAssertions.ts +0 -0
  2437. package/tsconfig-extensions.json +0 -0
  2438. package/tsconfig.json +0 -0
  2439. package/tsconfig.spec.json +0 -0
  2440. package/typedoc.config.json +0 -0
  2441. package/vitest.config.ts +0 -0
  2442. package/vitest.d.ts +0 -0
  2443. package/vitest.env.d.ts +0 -0
  2444. package/vitest.extend.ts +0 -0
  2445. package/vitest.setup.ts +0 -0
  2446. package/debug/konva/CHANGELOG.md +0 -1474
  2447. package/debug/konva/LICENSE +0 -22
  2448. package/debug/konva/README.md +0 -205
  2449. package/debug/konva/gulpfile.mjs +0 -110
  2450. package/debug/konva/package.json +0 -139
  2451. package/debug/konva/release.sh +0 -65
  2452. package/debug/konva/resources/doc-includes/ContainerParams.txt +0 -6
  2453. package/debug/konva/resources/doc-includes/NodeParams.txt +0 -20
  2454. package/debug/konva/resources/doc-includes/ShapeParams.txt +0 -53
  2455. package/debug/konva/resources/jsdoc.conf.json +0 -28
  2456. package/debug/konva/rollup.config.mjs +0 -32
  2457. package/debug/konva/src/Animation.ts +0 -237
  2458. package/debug/konva/src/BezierFunctions.ts +0 -826
  2459. package/debug/konva/src/Canvas.ts +0 -193
  2460. package/debug/konva/src/Container.ts +0 -649
  2461. package/debug/konva/src/Context.ts +0 -1017
  2462. package/debug/konva/src/Core.ts +0 -5
  2463. package/debug/konva/src/DragAndDrop.ts +0 -173
  2464. package/debug/konva/src/Factory.ts +0 -246
  2465. package/debug/konva/src/FastLayer.ts +0 -29
  2466. package/debug/konva/src/Global.ts +0 -210
  2467. package/debug/konva/src/Group.ts +0 -31
  2468. package/debug/konva/src/Layer.ts +0 -546
  2469. package/debug/konva/src/Node.ts +0 -3477
  2470. package/debug/konva/src/PointerEvents.ts +0 -67
  2471. package/debug/konva/src/Shape.ts +0 -2081
  2472. package/debug/konva/src/Stage.ts +0 -1000
  2473. package/debug/konva/src/Tween.ts +0 -811
  2474. package/debug/konva/src/Util.ts +0 -1123
  2475. package/debug/konva/src/Validators.ts +0 -210
  2476. package/debug/konva/src/_CoreInternals.ts +0 -85
  2477. package/debug/konva/src/_FullInternals.ts +0 -171
  2478. package/debug/konva/src/canvas-backend.ts +0 -36
  2479. package/debug/konva/src/filters/Blur.ts +0 -388
  2480. package/debug/konva/src/filters/Brighten.ts +0 -48
  2481. package/debug/konva/src/filters/Brightness.ts +0 -30
  2482. package/debug/konva/src/filters/Contrast.ts +0 -75
  2483. package/debug/konva/src/filters/Emboss.ts +0 -207
  2484. package/debug/konva/src/filters/Enhance.ts +0 -154
  2485. package/debug/konva/src/filters/Grayscale.ts +0 -25
  2486. package/debug/konva/src/filters/HSL.ts +0 -108
  2487. package/debug/konva/src/filters/HSV.ts +0 -106
  2488. package/debug/konva/src/filters/Invert.ts +0 -23
  2489. package/debug/konva/src/filters/Kaleidoscope.ts +0 -274
  2490. package/debug/konva/src/filters/Mask.ts +0 -220
  2491. package/debug/konva/src/filters/Noise.ts +0 -44
  2492. package/debug/konva/src/filters/Pixelate.ts +0 -107
  2493. package/debug/konva/src/filters/Posterize.ts +0 -46
  2494. package/debug/konva/src/filters/RGB.ts +0 -82
  2495. package/debug/konva/src/filters/RGBA.ts +0 -103
  2496. package/debug/konva/src/filters/Sepia.ts +0 -27
  2497. package/debug/konva/src/filters/Solarize.ts +0 -29
  2498. package/debug/konva/src/filters/Threshold.ts +0 -44
  2499. package/debug/konva/src/index.ts +0 -3
  2500. package/debug/konva/src/shapes/Arc.ts +0 -176
  2501. package/debug/konva/src/shapes/Arrow.ts +0 -231
  2502. package/debug/konva/src/shapes/Circle.ts +0 -76
  2503. package/debug/konva/src/shapes/Ellipse.ts +0 -121
  2504. package/debug/konva/src/shapes/Image.ts +0 -319
  2505. package/debug/konva/src/shapes/Label.ts +0 -386
  2506. package/debug/konva/src/shapes/Line.ts +0 -364
  2507. package/debug/konva/src/shapes/Path.ts +0 -1013
  2508. package/debug/konva/src/shapes/Rect.ts +0 -79
  2509. package/debug/konva/src/shapes/RegularPolygon.ts +0 -167
  2510. package/debug/konva/src/shapes/Ring.ts +0 -94
  2511. package/debug/konva/src/shapes/Sprite.ts +0 -370
  2512. package/debug/konva/src/shapes/Star.ts +0 -125
  2513. package/debug/konva/src/shapes/Text.ts +0 -1065
  2514. package/debug/konva/src/shapes/TextPath.ts +0 -583
  2515. package/debug/konva/src/shapes/Transformer.ts +0 -1889
  2516. package/debug/konva/src/shapes/Wedge.ts +0 -129
  2517. package/debug/konva/src/skia-backend.ts +0 -35
  2518. package/debug/konva/src/types.ts +0 -84
  2519. package/debug/konva/tsconfig.json +0 -31
  2520. package/debug/konva/tsconfig.test.json +0 -7
  2521. package/dist/src/controls/changeHeight.min.mjs +0 -2
  2522. package/dist/src/controls/changeHeight.min.mjs.map +0 -1
  2523. package/dist/src/controls/changeHeight.mjs +0 -36
  2524. package/dist/src/controls/changeHeight.mjs.map +0 -1
@@ -412,7 +412,7 @@ class Cache {
412
412
  }
413
413
  const cache = new Cache();
414
414
 
415
- var version = "7.0.1-beta1";
415
+ var version = "7.0.1-beta3";
416
416
 
417
417
  // use this syntax so babel plugin see this import here
418
418
  const VERSION = version;
@@ -17629,33 +17629,29 @@ class PatternBrush extends PencilBrush {
17629
17629
  }
17630
17630
  }
17631
17631
 
17632
- // @TODO this code is terrible and Line should be a special case of polyline.
17633
-
17634
17632
  const coordProps = ['x1', 'x2', 'y1', 'y2'];
17635
- /**
17636
- * A Class to draw a line
17637
- * A bunch of methods will be added to Polyline to handle the line case
17638
- * The line class is very strange to work with, is all special, it hardly aligns
17639
- * to what a developer want everytime there is an angle
17640
- * @deprecated
17641
- */
17642
17633
  class Line extends FabricObject {
17643
- /**
17644
- * Constructor
17645
- * @param {Array} [points] Array of points
17646
- * @param {Object} [options] Options object
17647
- * @return {Line} thisArg
17648
- */
17649
17634
  constructor() {
17650
- let [x1, y1, x2, y2] = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [0, 0, 0, 0];
17635
+ let [x1, y1, x2, y2] = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [0, 0, 100, 0];
17651
17636
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17652
17637
  super();
17653
- Object.assign(this, Line.ownDefaults);
17638
+ _defineProperty(this, "hitStrokeWidth", 'auto');
17639
+ _defineProperty(this, "_updatingEndpoints", false);
17640
+ _defineProperty(this, "_useEndpointCoords", true);
17654
17641
  this.setOptions(options);
17655
17642
  this.x1 = x1;
17656
17643
  this.x2 = x2;
17657
17644
  this.y1 = y1;
17658
17645
  this.y2 = y2;
17646
+ if (options.hitStrokeWidth !== undefined) {
17647
+ this.hitStrokeWidth = options.hitStrokeWidth;
17648
+ }
17649
+ this.hasBorders = false;
17650
+ this.hasControls = true;
17651
+ this.selectable = true;
17652
+ this.hoverCursor = 'move';
17653
+ this.perPixelTargetFind = false;
17654
+ this.strokeLineCap = 'butt';
17659
17655
  this._setWidthHeight();
17660
17656
  const {
17661
17657
  left,
@@ -17663,96 +17659,323 @@ class Line extends FabricObject {
17663
17659
  } = options;
17664
17660
  typeof left === 'number' && this.set(LEFT, left);
17665
17661
  typeof top === 'number' && this.set(TOP, top);
17662
+ this._setupLineControls();
17663
+ }
17664
+ _setupLineControls() {
17665
+ this.controls = {
17666
+ p1: new Control({
17667
+ x: 0,
17668
+ y: 0,
17669
+ cursorStyle: 'move',
17670
+ actionHandler: this._endpointActionHandler.bind(this),
17671
+ positionHandler: this._p1PositionHandler.bind(this),
17672
+ render: this._renderEndpointControl.bind(this),
17673
+ sizeX: 12,
17674
+ sizeY: 12
17675
+ }),
17676
+ p2: new Control({
17677
+ x: 0,
17678
+ y: 0,
17679
+ cursorStyle: 'move',
17680
+ actionHandler: this._endpointActionHandler.bind(this),
17681
+ positionHandler: this._p2PositionHandler.bind(this),
17682
+ render: this._renderEndpointControl.bind(this),
17683
+ sizeX: 12,
17684
+ sizeY: 12
17685
+ })
17686
+ };
17687
+ }
17688
+ _p1PositionHandler() {
17689
+ var _this$canvas;
17690
+ const vpt = ((_this$canvas = this.canvas) === null || _this$canvas === void 0 ? void 0 : _this$canvas.viewportTransform) || [1, 0, 0, 1, 0, 0];
17691
+ return new Point(this.x1, this.y1).transform(vpt);
17692
+ }
17693
+ _p2PositionHandler() {
17694
+ var _this$canvas2;
17695
+ const vpt = ((_this$canvas2 = this.canvas) === null || _this$canvas2 === void 0 ? void 0 : _this$canvas2.viewportTransform) || [1, 0, 0, 1, 0, 0];
17696
+ return new Point(this.x2, this.y2).transform(vpt);
17697
+ }
17698
+ _renderEndpointControl(ctx, left, top) {
17699
+ const size = 12;
17700
+ ctx.save();
17701
+ ctx.fillStyle = '#007bff';
17702
+ ctx.strokeStyle = '#ffffff';
17703
+ ctx.lineWidth = 2;
17704
+ ctx.beginPath();
17705
+ ctx.arc(left, top, size / 2, 0, 2 * Math.PI);
17706
+ ctx.fill();
17707
+ ctx.stroke();
17708
+ ctx.restore();
17709
+ }
17710
+ drawBorders(ctx) {
17711
+ let styleOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17712
+ if (this._useEndpointCoords) {
17713
+ this._drawLineBorders(ctx, styleOverride);
17714
+ return this;
17715
+ }
17716
+ return super.drawBorders(ctx, styleOverride, {});
17717
+ }
17718
+ _drawLineBorders(ctx) {
17719
+ var _this$canvas3;
17720
+ let styleOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17721
+ const vpt = ((_this$canvas3 = this.canvas) === null || _this$canvas3 === void 0 ? void 0 : _this$canvas3.viewportTransform) || [1, 0, 0, 1, 0, 0];
17722
+ ctx.save();
17723
+ ctx.setTransform(vpt[0], vpt[1], vpt[2], vpt[3], vpt[4], vpt[5]);
17724
+ ctx.strokeStyle = styleOverride.borderColor || this.borderColor || 'rgba(100, 200, 200, 0.5)';
17725
+ ctx.lineWidth = (this.strokeWidth || 1) + 5;
17726
+ ctx.lineCap = this.strokeLineCap || 'butt';
17727
+ ctx.globalAlpha = this.isMoving ? this.borderOpacityWhenMoving : 1;
17728
+ ctx.beginPath();
17729
+ ctx.moveTo(this.x1, this.y1);
17730
+ ctx.lineTo(this.x2, this.y2);
17731
+ ctx.stroke();
17732
+ ctx.restore();
17733
+ }
17734
+ _renderControls(ctx) {
17735
+ let styleOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17736
+ ctx.save();
17737
+ ctx.globalAlpha = this.isMoving ? this.borderOpacityWhenMoving : 1;
17738
+ this.drawControls(ctx, styleOverride);
17739
+ ctx.restore();
17740
+ }
17741
+ getBoundingRect() {
17742
+ if (this._useEndpointCoords) {
17743
+ const {
17744
+ x1,
17745
+ y1,
17746
+ x2,
17747
+ y2
17748
+ } = this;
17749
+ const effectiveStrokeWidth = this.hitStrokeWidth === 'auto' ? this.strokeWidth : this.hitStrokeWidth;
17750
+ const padding = Math.max(effectiveStrokeWidth / 2 + 5, 10);
17751
+ return {
17752
+ left: Math.min(x1, x2) - padding,
17753
+ top: Math.min(y1, y2) - padding,
17754
+ width: Math.abs(x2 - x1) + padding * 2 || padding * 2,
17755
+ height: Math.abs(y2 - y1) + padding * 2 || padding * 2
17756
+ };
17757
+ }
17758
+ return super.getBoundingRect();
17759
+ }
17760
+ setCoords() {
17761
+ if (this._useEndpointCoords) {
17762
+ const minX = Math.min(this.x1, this.x2);
17763
+ const maxX = Math.max(this.x1, this.x2);
17764
+ const minY = Math.min(this.y1, this.y2);
17765
+ const maxY = Math.max(this.y1, this.y2);
17766
+ const effectiveStrokeWidth = this.hitStrokeWidth === 'auto' ? this.strokeWidth : this.hitStrokeWidth;
17767
+ const hitPadding = Math.max(effectiveStrokeWidth / 2 + 5, 10);
17768
+ this.left = minX - hitPadding + (maxX - minX + hitPadding * 2) / 2;
17769
+ this.top = minY - hitPadding + (maxY - minY + hitPadding * 2) / 2;
17770
+ this.width = Math.abs(this.x2 - this.x1) + hitPadding * 2;
17771
+ this.height = Math.abs(this.y2 - this.y1) + hitPadding * 2;
17772
+ }
17773
+ super.setCoords();
17774
+ }
17775
+ getCoords() {
17776
+ if (this._useEndpointCoords) {
17777
+ const deltaX = this.x2 - this.x1;
17778
+ const deltaY = this.y2 - this.y1;
17779
+ const length = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
17780
+ if (length === 0) {
17781
+ return super.getCoords();
17782
+ }
17783
+ const effectiveStrokeWidth = this.hitStrokeWidth === 'auto' ? this.strokeWidth : this.hitStrokeWidth;
17784
+ const halfWidth = Math.max(effectiveStrokeWidth / 2 + 2, 5);
17785
+
17786
+ // Unit vector perpendicular to line
17787
+ const perpX = -deltaY / length;
17788
+ const perpY = deltaX / length;
17789
+
17790
+ // Four corners of oriented rectangle
17791
+ return [new Point(this.x1 + perpX * halfWidth, this.y1 + perpY * halfWidth), new Point(this.x2 + perpX * halfWidth, this.y2 + perpY * halfWidth), new Point(this.x2 - perpX * halfWidth, this.y2 - perpY * halfWidth), new Point(this.x1 - perpX * halfWidth, this.y1 - perpY * halfWidth)];
17792
+ }
17793
+ return super.getCoords();
17666
17794
  }
17795
+ containsPoint(point) {
17796
+ if (this._useEndpointCoords) {
17797
+ var _this$canvas4;
17798
+ if (((_this$canvas4 = this.canvas) === null || _this$canvas4 === void 0 ? void 0 : _this$canvas4.getActiveObject()) === this) {
17799
+ return super.containsPoint(point);
17800
+ }
17801
+ const distance = this._distanceToLineSegment(point.x, point.y);
17802
+ const effectiveStrokeWidth = this.hitStrokeWidth === 'auto' ? this.strokeWidth : this.hitStrokeWidth || 1;
17803
+ const tolerance = Math.max(effectiveStrokeWidth / 2 + 2, 5);
17804
+ return distance <= tolerance;
17805
+ }
17806
+ return super.containsPoint(point);
17807
+ }
17808
+ _distanceToLineSegment(px, py) {
17809
+ const x1 = this.x1,
17810
+ y1 = this.y1,
17811
+ x2 = this.x2,
17812
+ y2 = this.y2;
17813
+ const pd2 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
17814
+ if (pd2 === 0) {
17815
+ return Math.sqrt((px - x1) * (px - x1) + (py - y1) * (py - y1));
17816
+ }
17817
+ const u = ((px - x1) * (x2 - x1) + (py - y1) * (y2 - y1)) / pd2;
17818
+ let closestX, closestY;
17819
+ if (u < 0) {
17820
+ closestX = x1;
17821
+ closestY = y1;
17822
+ } else if (u > 1) {
17823
+ closestX = x2;
17824
+ closestY = y2;
17825
+ } else {
17826
+ closestX = x1 + u * (x2 - x1);
17827
+ closestY = y1 + u * (y2 - y1);
17828
+ }
17829
+ return Math.sqrt((px - closestX) * (px - closestX) + (py - closestY) * (py - closestY));
17830
+ }
17831
+ _endpointActionHandler(eventData, transformData, x, y) {
17832
+ var _this$canvas6;
17833
+ const controlKey = transformData.corner;
17834
+ const pointer = new Point(x, y);
17835
+ let newX = pointer.x;
17836
+ let newY = pointer.y;
17837
+ if (eventData.shiftKey) {
17838
+ const otherControl = controlKey === 'p1' ? 'p2' : 'p1';
17839
+ const otherX = this[otherControl === 'p1' ? 'x1' : 'x2'];
17840
+ const otherY = this[otherControl === 'p1' ? 'y1' : 'y2'];
17841
+ const snapped = this._snapToAngle(otherX, otherY, newX, newY);
17842
+ newX = snapped.x;
17843
+ newY = snapped.y;
17844
+ }
17845
+ if (this._useEndpointCoords) {
17846
+ var _this$canvas5;
17847
+ if (controlKey === 'p1') {
17848
+ this.x1 = newX;
17849
+ this.y1 = newY;
17850
+ } else if (controlKey === 'p2') {
17851
+ this.x2 = newX;
17852
+ this.y2 = newY;
17853
+ }
17854
+ this.dirty = true;
17855
+ this.setCoords();
17856
+ (_this$canvas5 = this.canvas) === null || _this$canvas5 === void 0 || _this$canvas5.requestRenderAll();
17857
+ return true;
17858
+ }
17667
17859
 
17668
- /**
17669
- * @private
17670
- * @param {Object} [options] Options
17671
- */
17860
+ // Fallback for old system
17861
+ this._updatingEndpoints = true;
17862
+ if (controlKey === 'p1') {
17863
+ this.x1 = newX;
17864
+ this.y1 = newY;
17865
+ } else if (controlKey === 'p2') {
17866
+ this.x2 = newX;
17867
+ this.y2 = newY;
17868
+ }
17869
+ this._setWidthHeight();
17870
+ this.dirty = true;
17871
+ this._updatingEndpoints = false;
17872
+ (_this$canvas6 = this.canvas) === null || _this$canvas6 === void 0 || _this$canvas6.requestRenderAll();
17873
+ this.fire('modified', {
17874
+ transform: transformData,
17875
+ target: this,
17876
+ e: eventData
17877
+ });
17878
+ return true;
17879
+ }
17880
+ _snapToAngle(fromX, fromY, toX, toY) {
17881
+ const deltaX = toX - fromX;
17882
+ const deltaY = toY - fromY;
17883
+ const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
17884
+ if (distance === 0) return {
17885
+ x: toX,
17886
+ y: toY
17887
+ };
17888
+ let angle = Math.atan2(deltaY, deltaX) * (180 / Math.PI);
17889
+ const snapIncrement = 15;
17890
+ const snappedAngle = Math.round(angle / snapIncrement) * snapIncrement;
17891
+ const snappedRadians = snappedAngle * (Math.PI / 180);
17892
+ return {
17893
+ x: fromX + Math.cos(snappedRadians) * distance,
17894
+ y: fromY + Math.sin(snappedRadians) * distance
17895
+ };
17896
+ }
17672
17897
  _setWidthHeight() {
17673
- const {
17674
- x1,
17675
- y1,
17676
- x2,
17677
- y2
17678
- } = this;
17679
- this.width = Math.abs(x2 - x1);
17680
- this.height = Math.abs(y2 - y1);
17681
- const {
17682
- left,
17683
- top,
17684
- width,
17685
- height
17686
- } = makeBoundingBoxFromPoints([{
17687
- x: x1,
17688
- y: y1
17689
- }, {
17690
- x: x2,
17691
- y: y2
17692
- }]);
17693
- const position = new Point(left + width / 2, top + height / 2);
17694
- this.setPositionByOrigin(position, CENTER, CENTER);
17898
+ let skipReposition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
17899
+ this.width = Math.abs(this.x2 - this.x1) || 1;
17900
+ this.height = Math.abs(this.y2 - this.y1) || 1;
17901
+ if (!skipReposition && !this._updatingEndpoints) {
17902
+ const {
17903
+ left,
17904
+ top,
17905
+ width,
17906
+ height
17907
+ } = makeBoundingBoxFromPoints([{
17908
+ x: this.x1,
17909
+ y: this.y1
17910
+ }, {
17911
+ x: this.x2,
17912
+ y: this.y2
17913
+ }]);
17914
+ this.setPositionByOrigin(new Point(left + width / 2, top + height / 2), CENTER, CENTER);
17915
+ }
17695
17916
  }
17696
-
17697
- /**
17698
- * @private
17699
- * @param {String} key
17700
- * @param {*} value
17701
- */
17702
17917
  _set(key, value) {
17918
+ const oldLeft = this.left;
17919
+ const oldTop = this.top;
17703
17920
  super._set(key, value);
17704
17921
  if (coordProps.includes(key)) {
17705
- // this doesn't make sense very much, since setting x1 when top or left
17706
- // are already set, is just going to show a strange result since the
17707
- // line will move way more than the developer expect.
17708
- // in fabric5 it worked only when the line didn't have extra transformations,
17709
- // in fabric6 too. With extra transform they behave bad in different ways.
17710
- // This needs probably a good rework or a tutorial if you have to create a dynamic line
17711
17922
  this._setWidthHeight();
17923
+ this.dirty = true;
17924
+ }
17925
+ if ((key === 'left' || key === 'top') && this.canvas && !this._updatingEndpoints) {
17926
+ const deltaX = this.left - oldLeft;
17927
+ const deltaY = this.top - oldTop;
17928
+ if (deltaX !== 0 || deltaY !== 0) {
17929
+ this._updatingEndpoints = true;
17930
+ this.x1 += deltaX;
17931
+ this.y1 += deltaY;
17932
+ this.x2 += deltaX;
17933
+ this.y2 += deltaY;
17934
+ this._updatingEndpoints = false;
17935
+ }
17712
17936
  }
17713
17937
  return this;
17714
17938
  }
17715
-
17716
- /**
17717
- * @private
17718
- * @param {CanvasRenderingContext2D} ctx Context to render on
17719
- */
17939
+ render(ctx) {
17940
+ if (this._useEndpointCoords) {
17941
+ this._renderDirectly(ctx);
17942
+ return;
17943
+ }
17944
+ super.render(ctx);
17945
+ }
17946
+ _renderDirectly(ctx) {
17947
+ var _this$canvas7, _this$stroke;
17948
+ if (!this.visible) return;
17949
+ ctx.save();
17950
+ const vpt = ((_this$canvas7 = this.canvas) === null || _this$canvas7 === void 0 ? void 0 : _this$canvas7.viewportTransform) || [1, 0, 0, 1, 0, 0];
17951
+ ctx.transform(vpt[0], vpt[1], vpt[2], vpt[3], vpt[4], vpt[5]);
17952
+ ctx.globalAlpha = this.opacity;
17953
+ ctx.strokeStyle = ((_this$stroke = this.stroke) === null || _this$stroke === void 0 ? void 0 : _this$stroke.toString()) || '#000';
17954
+ ctx.lineWidth = this.strokeWidth;
17955
+ ctx.lineCap = this.strokeLineCap || 'butt';
17956
+ ctx.beginPath();
17957
+ ctx.moveTo(this.x1, this.y1);
17958
+ ctx.lineTo(this.x2, this.y2);
17959
+ ctx.stroke();
17960
+ ctx.restore();
17961
+ }
17720
17962
  _render(ctx) {
17963
+ if (this._useEndpointCoords) return;
17721
17964
  ctx.beginPath();
17722
17965
  const p = this.calcLinePoints();
17723
17966
  ctx.moveTo(p.x1, p.y1);
17724
17967
  ctx.lineTo(p.x2, p.y2);
17725
17968
  ctx.lineWidth = this.strokeWidth;
17726
-
17727
- // TODO: test this
17728
- // make sure setting "fill" changes color of a line
17729
- // (by copying fillStyle to strokeStyle, since line is stroked, not filled)
17730
17969
  const origStrokeStyle = ctx.strokeStyle;
17731
17970
  if (isFiller(this.stroke)) {
17732
17971
  ctx.strokeStyle = this.stroke.toLive(ctx);
17733
- } else {
17734
- var _this$stroke;
17735
- ctx.strokeStyle = (_this$stroke = this.stroke) !== null && _this$stroke !== void 0 ? _this$stroke : ctx.fillStyle;
17736
17972
  }
17737
17973
  this.stroke && this._renderStroke(ctx);
17738
17974
  ctx.strokeStyle = origStrokeStyle;
17739
17975
  }
17740
-
17741
- /**
17742
- * This function is an helper for svg import. it returns the center of the object in the svg
17743
- * untransformed coordinates
17744
- * @private
17745
- * @return {Point} center point from element coordinates
17746
- */
17747
17976
  _findCenterFromElement() {
17748
17977
  return new Point((this.x1 + this.x2) / 2, (this.y1 + this.y2) / 2);
17749
17978
  }
17750
-
17751
- /**
17752
- * Returns object representation of an instance
17753
- * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
17754
- * @return {Object} object representation of an instance
17755
- */
17756
17979
  toObject() {
17757
17980
  let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
17758
17981
  return {
@@ -17760,32 +17983,25 @@ class Line extends FabricObject {
17760
17983
  ...this.calcLinePoints()
17761
17984
  };
17762
17985
  }
17763
-
17764
- /*
17765
- * Calculate object dimensions from its properties
17766
- * @private
17767
- */
17768
17986
  _getNonTransformedDimensions() {
17769
17987
  const dim = super._getNonTransformedDimensions();
17770
- if (this.strokeLineCap === 'butt') {
17771
- if (this.width === 0) {
17772
- dim.y -= this.strokeWidth;
17773
- }
17774
- if (this.height === 0) {
17775
- dim.x -= this.strokeWidth;
17776
- }
17988
+ if (this.strokeLineCap === 'round') {
17989
+ dim.x += this.strokeWidth;
17990
+ dim.y += this.strokeWidth;
17777
17991
  }
17778
17992
  return dim;
17779
17993
  }
17780
-
17781
- /**
17782
- * Recalculates line points given width and height
17783
- * Those points are simply placed around the center,
17784
- * This is not useful outside internal render functions and svg output
17785
- * Is not meant to be for the developer.
17786
- * @private
17787
- */
17788
17994
  calcLinePoints() {
17995
+ if (this._updatingEndpoints) {
17996
+ const centerX = (this.x1 + this.x2) / 2;
17997
+ const centerY = (this.y1 + this.y2) / 2;
17998
+ return {
17999
+ x1: this.x1 - centerX,
18000
+ y1: this.y1 - centerY,
18001
+ x2: this.x2 - centerX,
18002
+ y2: this.y2 - centerY
18003
+ };
18004
+ }
17789
18005
  const {
17790
18006
  x1: _x1,
17791
18007
  x2: _x2,
@@ -17794,27 +18010,15 @@ class Line extends FabricObject {
17794
18010
  width,
17795
18011
  height
17796
18012
  } = this;
17797
- const xMult = _x1 <= _x2 ? -1 : 1,
17798
- yMult = _y1 <= _y2 ? -1 : 1,
17799
- x1 = xMult * width / 2,
17800
- y1 = yMult * height / 2,
17801
- x2 = xMult * -width / 2,
17802
- y2 = yMult * -height / 2;
18013
+ const xMult = _x1 <= _x2 ? -1 : 1;
18014
+ const yMult = _y1 <= _y2 ? -1 : 1;
17803
18015
  return {
17804
- x1,
17805
- x2,
17806
- y1,
17807
- y2
18016
+ x1: xMult * width / 2,
18017
+ y1: yMult * height / 2,
18018
+ x2: xMult * -width / 2,
18019
+ y2: yMult * -height / 2
17808
18020
  };
17809
18021
  }
17810
-
17811
- /* _FROM_SVG_START_ */
17812
-
17813
- /**
17814
- * Returns svg representation of an instance
17815
- * @return {Array} an array of strings with the specific svg representation
17816
- * of the instance
17817
- */
17818
18022
  _toSVG() {
17819
18023
  const {
17820
18024
  x1,
@@ -17824,18 +18028,6 @@ class Line extends FabricObject {
17824
18028
  } = this.calcLinePoints();
17825
18029
  return ['<line ', 'COMMON_PARTS', `x1="${x1}" y1="${y1}" x2="${x2}" y2="${y2}" />\n`];
17826
18030
  }
17827
-
17828
- /**
17829
- * List of attribute names to account for when parsing SVG element (used by {@link Line.fromElement})
17830
- * @see http://www.w3.org/TR/SVG/shapes.html#LineElement
17831
- */
17832
-
17833
- /**
17834
- * Returns Line instance from an SVG element
17835
- * @param {HTMLElement} element Element to parse
17836
- * @param {Object} [options] Options object
17837
- * @param {Function} [callback] callback function invoked after parsing
17838
- */
17839
18031
  static async fromElement(element, options, cssRules) {
17840
18032
  const {
17841
18033
  x1 = 0,
@@ -17846,14 +18038,6 @@ class Line extends FabricObject {
17846
18038
  } = parseAttributes(element, this.ATTRIBUTE_NAMES, cssRules);
17847
18039
  return new this([x1, y1, x2, y2], parsedAttributes);
17848
18040
  }
17849
-
17850
- /* _FROM_SVG_END_ */
17851
-
17852
- /**
17853
- * Returns Line instance from an object representation
17854
- * @param {Object} object Object to create an instance from
17855
- * @returns {Promise<Line>}
17856
- */
17857
18041
  static fromObject(_ref) {
17858
18042
  let {
17859
18043
  x1,
@@ -17870,32 +18054,195 @@ class Line extends FabricObject {
17870
18054
  });
17871
18055
  }
17872
18056
  }
18057
+ _defineProperty(Line, "type", 'Line');
18058
+ _defineProperty(Line, "cacheProperties", [...cacheProperties, ...coordProps]);
18059
+ _defineProperty(Line, "ATTRIBUTE_NAMES", SHARED_ATTRIBUTES.concat(coordProps));
18060
+ classRegistry.setClass(Line);
18061
+ classRegistry.setSVGClass(Line);
18062
+
17873
18063
  /**
17874
- * x value or first line edge
17875
- * @type number
18064
+ * Calculate the distance between two points
17876
18065
  */
18066
+ function pointDistance(p1, p2) {
18067
+ return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));
18068
+ }
18069
+
17877
18070
  /**
17878
- * y value or first line edge
17879
- * @type number
18071
+ * Normalize a vector
17880
18072
  */
18073
+ function normalizeVector(vector) {
18074
+ const length = Math.sqrt(vector.x * vector.x + vector.y * vector.y);
18075
+ if (length === 0) return {
18076
+ x: 0,
18077
+ y: 0
18078
+ };
18079
+ return {
18080
+ x: vector.x / length,
18081
+ y: vector.y / length
18082
+ };
18083
+ }
18084
+
17881
18085
  /**
17882
- * x value or second line edge
17883
- * @type number
18086
+ * Get the maximum allowed radius for a corner based on adjacent edge lengths
17884
18087
  */
18088
+ function getMaxRadius(prevPoint, currentPoint, nextPoint) {
18089
+ const dist1 = pointDistance(prevPoint, currentPoint);
18090
+ const dist2 = pointDistance(currentPoint, nextPoint);
18091
+ return Math.min(dist1, dist2) / 2;
18092
+ }
18093
+
17885
18094
  /**
17886
- * y value or second line edge
17887
- * @type number
18095
+ * Calculate rounded corner data for a single corner
17888
18096
  */
17889
- _defineProperty(Line, "type", 'Line');
17890
- _defineProperty(Line, "cacheProperties", [...cacheProperties, ...coordProps]);
17891
- _defineProperty(Line, "ATTRIBUTE_NAMES", SHARED_ATTRIBUTES.concat(coordProps));
17892
- classRegistry.setClass(Line);
17893
- classRegistry.setSVGClass(Line);
18097
+ function calculateRoundedCorner(prevPoint, currentPoint, nextPoint, radius) {
18098
+ // Calculate edge vectors
18099
+ const edge1 = {
18100
+ x: currentPoint.x - prevPoint.x,
18101
+ y: currentPoint.y - prevPoint.y
18102
+ };
18103
+ const edge2 = {
18104
+ x: nextPoint.x - currentPoint.x,
18105
+ y: nextPoint.y - currentPoint.y
18106
+ };
18107
+
18108
+ // Normalize edge vectors
18109
+ const norm1 = normalizeVector(edge1);
18110
+ const norm2 = normalizeVector(edge2);
18111
+
18112
+ // Calculate the maximum allowed radius
18113
+ const maxRadius = getMaxRadius(prevPoint, currentPoint, nextPoint);
18114
+ const actualRadius = Math.min(radius, maxRadius);
18115
+
18116
+ // Calculate start and end points of the rounded corner
18117
+ const startPoint = {
18118
+ x: currentPoint.x - norm1.x * actualRadius,
18119
+ y: currentPoint.y - norm1.y * actualRadius
18120
+ };
18121
+ const endPoint = {
18122
+ x: currentPoint.x + norm2.x * actualRadius,
18123
+ y: currentPoint.y + norm2.y * actualRadius
18124
+ };
18125
+
18126
+ // Calculate control points for bezier curve
18127
+ // Using the magic number kRect for optimal circular approximation
18128
+ const controlOffset = actualRadius * kRect;
18129
+ const cp1 = {
18130
+ x: startPoint.x + norm1.x * controlOffset,
18131
+ y: startPoint.y + norm1.y * controlOffset
18132
+ };
18133
+ const cp2 = {
18134
+ x: endPoint.x - norm2.x * controlOffset,
18135
+ y: endPoint.y - norm2.y * controlOffset
18136
+ };
18137
+ return {
18138
+ corner: currentPoint,
18139
+ start: startPoint,
18140
+ end: endPoint,
18141
+ cp1,
18142
+ cp2,
18143
+ actualRadius
18144
+ };
18145
+ }
18146
+
18147
+ /**
18148
+ * Apply corner radius to a polygon defined by points
18149
+ */
18150
+ function applyCornerRadiusToPolygon(points, radius) {
18151
+ let radiusAsPercentage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
18152
+ if (points.length < 3) {
18153
+ throw new Error('Polygon must have at least 3 points');
18154
+ }
18155
+
18156
+ // Calculate bounding box if radius is percentage-based
18157
+ let actualRadius = radius;
18158
+ if (radiusAsPercentage) {
18159
+ const minX = Math.min(...points.map(p => p.x));
18160
+ const maxX = Math.max(...points.map(p => p.x));
18161
+ const minY = Math.min(...points.map(p => p.y));
18162
+ const maxY = Math.max(...points.map(p => p.y));
18163
+ const width = maxX - minX;
18164
+ const height = maxY - minY;
18165
+ const minDimension = Math.min(width, height);
18166
+ actualRadius = radius / 100 * minDimension;
18167
+ }
18168
+ const roundedCorners = [];
18169
+ for (let i = 0; i < points.length; i++) {
18170
+ const prevIndex = (i - 1 + points.length) % points.length;
18171
+ const nextIndex = (i + 1) % points.length;
18172
+ const prevPoint = points[prevIndex];
18173
+ const currentPoint = points[i];
18174
+ const nextPoint = points[nextIndex];
18175
+ const roundedCorner = calculateRoundedCorner(prevPoint, currentPoint, nextPoint, actualRadius);
18176
+ roundedCorners.push(roundedCorner);
18177
+ }
18178
+ return roundedCorners;
18179
+ }
18180
+
18181
+ /**
18182
+ * Render a rounded polygon to a canvas context
18183
+ */
18184
+ function renderRoundedPolygon(ctx, roundedCorners) {
18185
+ let closed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
18186
+ if (roundedCorners.length === 0) return;
18187
+ ctx.beginPath();
18188
+
18189
+ // Start at the first corner's start point
18190
+ const firstCorner = roundedCorners[0];
18191
+ ctx.moveTo(firstCorner.start.x, firstCorner.start.y);
18192
+ for (let i = 0; i < roundedCorners.length; i++) {
18193
+ const corner = roundedCorners[i];
18194
+ const nextIndex = (i + 1) % roundedCorners.length;
18195
+ const nextCorner = roundedCorners[nextIndex];
18196
+
18197
+ // Draw the rounded corner using bezier curve
18198
+ ctx.bezierCurveTo(corner.cp1.x, corner.cp1.y, corner.cp2.x, corner.cp2.y, corner.end.x, corner.end.y);
18199
+
18200
+ // Draw line to next corner's start point (if not the last segment in open path)
18201
+ if (i < roundedCorners.length - 1 || closed) {
18202
+ ctx.lineTo(nextCorner.start.x, nextCorner.start.y);
18203
+ }
18204
+ }
18205
+ if (closed) {
18206
+ ctx.closePath();
18207
+ }
18208
+ }
18209
+
18210
+ /**
18211
+ * Generate SVG path data for a rounded polygon
18212
+ */
18213
+ function generateRoundedPolygonPath(roundedCorners) {
18214
+ let closed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
18215
+ if (roundedCorners.length === 0) return '';
18216
+ const pathData = [];
18217
+ const firstCorner = roundedCorners[0];
18218
+
18219
+ // Move to first corner's start point
18220
+ pathData.push(`M ${firstCorner.start.x} ${firstCorner.start.y}`);
18221
+ for (let i = 0; i < roundedCorners.length; i++) {
18222
+ const corner = roundedCorners[i];
18223
+ const nextIndex = (i + 1) % roundedCorners.length;
18224
+ const nextCorner = roundedCorners[nextIndex];
18225
+
18226
+ // Add bezier curve for the rounded corner
18227
+ pathData.push(`C ${corner.cp1.x} ${corner.cp1.y} ${corner.cp2.x} ${corner.cp2.y} ${corner.end.x} ${corner.end.y}`);
18228
+
18229
+ // Add line to next corner's start point (if not the last segment in open path)
18230
+ if (i < roundedCorners.length - 1 || closed) {
18231
+ pathData.push(`L ${nextCorner.start.x} ${nextCorner.start.y}`);
18232
+ }
18233
+ }
18234
+ if (closed) {
18235
+ pathData.push('Z');
18236
+ }
18237
+ return pathData.join(' ');
18238
+ }
17894
18239
 
17895
18240
  const triangleDefaultValues = {
17896
18241
  width: 100,
17897
- height: 100
18242
+ height: 100,
18243
+ cornerRadius: 0
17898
18244
  };
18245
+ const TRIANGLE_PROPS = ['cornerRadius'];
17899
18246
  class Triangle extends FabricObject {
17900
18247
  static getDefaults() {
17901
18248
  return {
@@ -17914,34 +18261,90 @@ class Triangle extends FabricObject {
17914
18261
  this.setOptions(options);
17915
18262
  }
17916
18263
 
18264
+ /**
18265
+ * Get triangle points as an array of XY coordinates
18266
+ * @private
18267
+ */
18268
+ _getTrianglePoints() {
18269
+ const widthBy2 = this.width / 2;
18270
+ const heightBy2 = this.height / 2;
18271
+ return [{
18272
+ x: -widthBy2,
18273
+ y: heightBy2
18274
+ },
18275
+ // bottom left
18276
+ {
18277
+ x: 0,
18278
+ y: -heightBy2
18279
+ },
18280
+ // top center
18281
+ {
18282
+ x: widthBy2,
18283
+ y: heightBy2
18284
+ } // bottom right
18285
+ ];
18286
+ }
18287
+
17917
18288
  /**
17918
18289
  * @private
17919
18290
  * @param {CanvasRenderingContext2D} ctx Context to render on
17920
18291
  */
17921
18292
  _render(ctx) {
17922
- const widthBy2 = this.width / 2,
17923
- heightBy2 = this.height / 2;
17924
- ctx.beginPath();
17925
- ctx.moveTo(-widthBy2, heightBy2);
17926
- ctx.lineTo(0, -heightBy2);
17927
- ctx.lineTo(widthBy2, heightBy2);
17928
- ctx.closePath();
18293
+ if (this.cornerRadius > 0) {
18294
+ // Render rounded triangle
18295
+ const points = this._getTrianglePoints();
18296
+ const roundedCorners = applyCornerRadiusToPolygon(points, this.cornerRadius);
18297
+ renderRoundedPolygon(ctx, roundedCorners, true);
18298
+ } else {
18299
+ // Render sharp triangle (original implementation)
18300
+ const widthBy2 = this.width / 2;
18301
+ const heightBy2 = this.height / 2;
18302
+ ctx.beginPath();
18303
+ ctx.moveTo(-widthBy2, heightBy2);
18304
+ ctx.lineTo(0, -heightBy2);
18305
+ ctx.lineTo(widthBy2, heightBy2);
18306
+ ctx.closePath();
18307
+ }
17929
18308
  this._renderPaintInOrder(ctx);
17930
18309
  }
17931
18310
 
18311
+ /**
18312
+ * Returns object representation of an instance
18313
+ * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
18314
+ * @return {Object} object representation of an instance
18315
+ */
18316
+ toObject() {
18317
+ let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
18318
+ return super.toObject([...TRIANGLE_PROPS, ...propertiesToInclude]);
18319
+ }
18320
+
17932
18321
  /**
17933
18322
  * Returns svg representation of an instance
17934
18323
  * @return {Array} an array of strings with the specific svg representation
17935
18324
  * of the instance
17936
18325
  */
17937
18326
  _toSVG() {
17938
- const widthBy2 = this.width / 2,
17939
- heightBy2 = this.height / 2,
17940
- points = `${-widthBy2} ${heightBy2},0 ${-heightBy2},${widthBy2} ${heightBy2}`;
17941
- return ['<polygon ', 'COMMON_PARTS', 'points="', points, '" />'];
18327
+ if (this.cornerRadius > 0) {
18328
+ // Generate rounded triangle as path
18329
+ const points = this._getTrianglePoints();
18330
+ const roundedCorners = applyCornerRadiusToPolygon(points, this.cornerRadius);
18331
+ const pathData = generateRoundedPolygonPath(roundedCorners, true);
18332
+ return ['<path ', 'COMMON_PARTS', `d="${pathData}" />`];
18333
+ } else {
18334
+ // Original sharp triangle implementation
18335
+ const widthBy2 = this.width / 2;
18336
+ const heightBy2 = this.height / 2;
18337
+ const points = `${-widthBy2} ${heightBy2},0 ${-heightBy2},${widthBy2} ${heightBy2}`;
18338
+ return ['<polygon ', 'COMMON_PARTS', 'points="', points, '" />'];
18339
+ }
17942
18340
  }
17943
18341
  }
18342
+ /**
18343
+ * Corner radius for rounded triangle corners
18344
+ * @type Number
18345
+ */
17944
18346
  _defineProperty(Triangle, "type", 'Triangle');
18347
+ _defineProperty(Triangle, "cacheProperties", [...cacheProperties, ...TRIANGLE_PROPS]);
17945
18348
  _defineProperty(Triangle, "ownDefaults", triangleDefaultValues);
17946
18349
  classRegistry.setClass(Triangle);
17947
18350
  classRegistry.setSVGClass(Triangle);
@@ -18106,7 +18509,8 @@ const polylineDefaultValues = {
18106
18509
  /**
18107
18510
  * @deprecated transient option soon to be removed in favor of a different design
18108
18511
  */
18109
- exactBoundingBox: false
18512
+ exactBoundingBox: false,
18513
+ cornerRadius: 0
18110
18514
  };
18111
18515
  class Polyline extends FabricObject {
18112
18516
  static getDefaults() {
@@ -18320,7 +18724,7 @@ class Polyline extends FabricObject {
18320
18724
  toObject() {
18321
18725
  let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
18322
18726
  return {
18323
- ...super.toObject(propertiesToInclude),
18727
+ ...super.toObject(['cornerRadius', ...propertiesToInclude]),
18324
18728
  points: this.points.map(_ref => {
18325
18729
  let {
18326
18730
  x,
@@ -18340,14 +18744,28 @@ class Polyline extends FabricObject {
18340
18744
  * of the instance
18341
18745
  */
18342
18746
  _toSVG() {
18343
- const points = [],
18344
- diffX = this.pathOffset.x,
18345
- diffY = this.pathOffset.y,
18346
- NUM_FRACTION_DIGITS = config.NUM_FRACTION_DIGITS;
18347
- for (let i = 0, len = this.points.length; i < len; i++) {
18348
- points.push(toFixed(this.points[i].x - diffX, NUM_FRACTION_DIGITS), ',', toFixed(this.points[i].y - diffY, NUM_FRACTION_DIGITS), ' ');
18747
+ if (this.cornerRadius > 0 && this.points.length >= 3) {
18748
+ // Generate rounded polygon/polyline as path
18749
+ const diffX = this.pathOffset.x;
18750
+ const diffY = this.pathOffset.y;
18751
+ const adjustedPoints = this.points.map(point => ({
18752
+ x: point.x - diffX,
18753
+ y: point.y - diffY
18754
+ }));
18755
+ const roundedCorners = applyCornerRadiusToPolygon(adjustedPoints, this.cornerRadius);
18756
+ const pathData = generateRoundedPolygonPath(roundedCorners, !this.isOpen());
18757
+ return ['<path ', 'COMMON_PARTS', `d="${pathData}" />\n`];
18758
+ } else {
18759
+ // Original sharp corners implementation
18760
+ const points = [];
18761
+ const diffX = this.pathOffset.x;
18762
+ const diffY = this.pathOffset.y;
18763
+ const NUM_FRACTION_DIGITS = config.NUM_FRACTION_DIGITS;
18764
+ for (let i = 0, len = this.points.length; i < len; i++) {
18765
+ points.push(toFixed(this.points[i].x - diffX, NUM_FRACTION_DIGITS), ',', toFixed(this.points[i].y - diffY, NUM_FRACTION_DIGITS), ' ');
18766
+ }
18767
+ return [`<${this.constructor.type.toLowerCase()} `, 'COMMON_PARTS', `points="${points.join('')}" />\n`];
18349
18768
  }
18350
- return [`<${this.constructor.type.toLowerCase()} `, 'COMMON_PARTS', `points="${points.join('')}" />\n`];
18351
18769
  }
18352
18770
 
18353
18771
  /**
@@ -18363,13 +18781,24 @@ class Polyline extends FabricObject {
18363
18781
  // NaN comes from parseFloat of a empty string in parser
18364
18782
  return;
18365
18783
  }
18366
- ctx.beginPath();
18367
- ctx.moveTo(this.points[0].x - x, this.points[0].y - y);
18368
- for (let i = 0; i < len; i++) {
18369
- const point = this.points[i];
18370
- ctx.lineTo(point.x - x, point.y - y);
18784
+ if (this.cornerRadius > 0 && len >= 3) {
18785
+ // Render with rounded corners
18786
+ const adjustedPoints = this.points.map(point => ({
18787
+ x: point.x - x,
18788
+ y: point.y - y
18789
+ }));
18790
+ const roundedCorners = applyCornerRadiusToPolygon(adjustedPoints, this.cornerRadius);
18791
+ renderRoundedPolygon(ctx, roundedCorners, !this.isOpen());
18792
+ } else {
18793
+ // Original sharp corners implementation
18794
+ ctx.beginPath();
18795
+ ctx.moveTo(this.points[0].x - x, this.points[0].y - y);
18796
+ for (let i = 0; i < len; i++) {
18797
+ const point = this.points[i];
18798
+ ctx.lineTo(point.x - x, point.y - y);
18799
+ }
18800
+ !this.isOpen() && ctx.closePath();
18371
18801
  }
18372
- !this.isOpen() && ctx.closePath();
18373
18802
  this._renderPaintInOrder(ctx);
18374
18803
  }
18375
18804
 
@@ -18434,10 +18863,15 @@ class Polyline extends FabricObject {
18434
18863
  * @type Boolean
18435
18864
  * @default false
18436
18865
  */
18866
+ /**
18867
+ * Corner radius for rounded corners
18868
+ * @type Number
18869
+ * @default 0
18870
+ */
18437
18871
  _defineProperty(Polyline, "ownDefaults", polylineDefaultValues);
18438
18872
  _defineProperty(Polyline, "type", 'Polyline');
18439
18873
  _defineProperty(Polyline, "layoutProperties", [SKEW_X, SKEW_Y, 'strokeLineCap', 'strokeLineJoin', 'strokeMiterLimit', 'strokeWidth', 'strokeUniform', 'points']);
18440
- _defineProperty(Polyline, "cacheProperties", [...cacheProperties, 'points']);
18874
+ _defineProperty(Polyline, "cacheProperties", [...cacheProperties, 'points', 'cornerRadius']);
18441
18875
  _defineProperty(Polyline, "ATTRIBUTE_NAMES", [...SHARED_ATTRIBUTES]);
18442
18876
  classRegistry.setClass(Polyline);
18443
18877
  classRegistry.setSVGClass(Polyline);
@@ -18731,8 +19165,8 @@ _defineProperty(StyledText, "_styleProperties", styleProperties);
18731
19165
  // Global measurement context - reused for performance
18732
19166
  let measurementContext = null;
18733
19167
 
18734
- /**
18735
- * Get or create the shared measurement context
19168
+ /**
19169
+ * Get or create the shared measurement context
18736
19170
  */
18737
19171
  function getMeasurementContext() {
18738
19172
  if (!measurementContext) {
@@ -18745,8 +19179,8 @@ function getMeasurementContext() {
18745
19179
  return measurementContext;
18746
19180
  }
18747
19181
 
18748
- /**
18749
- * Measure a single grapheme
19182
+ /**
19183
+ * Measure a single grapheme
18750
19184
  */
18751
19185
  function measureGrapheme(grapheme, options, ctx) {
18752
19186
  // Check cache first
@@ -18779,8 +19213,8 @@ function measureGrapheme(grapheme, options, ctx) {
18779
19213
  return measurement;
18780
19214
  }
18781
19215
 
18782
- /**
18783
- * Measure a grapheme with kerning relative to previous character
19216
+ /**
19217
+ * Measure a grapheme with kerning relative to previous character
18784
19218
  */
18785
19219
  function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
18786
19220
  // Get individual measurement
@@ -18821,8 +19255,8 @@ function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
18821
19255
  };
18822
19256
  }
18823
19257
 
18824
- /**
18825
- * Get font metrics for layout calculations
19258
+ /**
19259
+ * Get font metrics for layout calculations
18826
19260
  */
18827
19261
  function getFontMetrics(options) {
18828
19262
  var _metrics$fontBounding, _metrics$fontBounding2, _metrics$actualBoundi, _metrics$actualBoundi2;
@@ -18857,8 +19291,8 @@ function getFontMetrics(options) {
18857
19291
  return result;
18858
19292
  }
18859
19293
 
18860
- /**
18861
- * Apply font styling to canvas context
19294
+ /**
19295
+ * Apply font styling to canvas context
18862
19296
  */
18863
19297
  function applyFontStyle(ctx, options) {
18864
19298
  const fontDeclaration = getFontDeclaration(options);
@@ -18875,8 +19309,8 @@ function applyFontStyle(ctx, options) {
18875
19309
  ctx.textBaseline = 'alphabetic';
18876
19310
  }
18877
19311
 
18878
- /**
18879
- * Generate font declaration string
19312
+ /**
19313
+ * Generate font declaration string
18880
19314
  */
18881
19315
  function getFontDeclaration(options) {
18882
19316
  const {
@@ -18891,8 +19325,8 @@ function getFontDeclaration(options) {
18891
19325
  return `${fontStyle} ${fontWeight} ${fontSize}px ${normalizedFamily}`;
18892
19326
  }
18893
19327
 
18894
- /**
18895
- * LRU Cache implementation for measurements
19328
+ /**
19329
+ * LRU Cache implementation for measurements
18896
19330
  */
18897
19331
  class LRUCache {
18898
19332
  constructor() {
@@ -18954,8 +19388,8 @@ class LRUCache {
18954
19388
  }
18955
19389
  }
18956
19390
 
18957
- /**
18958
- * Advanced measurement cache with font-aware keys
19391
+ /**
19392
+ * Advanced measurement cache with font-aware keys
18959
19393
  */
18960
19394
  class MeasurementCache {
18961
19395
  constructor() {
@@ -18982,8 +19416,8 @@ class MeasurementCache {
18982
19416
  }
18983
19417
  }
18984
19418
 
18985
- /**
18986
- * Kerning cache for character pairs
19419
+ /**
19420
+ * Kerning cache for character pairs
18987
19421
  */
18988
19422
  class KerningCache {
18989
19423
  constructor() {
@@ -19011,8 +19445,8 @@ class KerningCache {
19011
19445
  }
19012
19446
  }
19013
19447
 
19014
- /**
19015
- * Font metrics cache
19448
+ /**
19449
+ * Font metrics cache
19016
19450
  */
19017
19451
  class FontMetricsCache {
19018
19452
  constructor() {
@@ -19039,17 +19473,17 @@ const measurementCache = new MeasurementCache();
19039
19473
  const kerningCache = new KerningCache();
19040
19474
  const fontMetricsCache = new FontMetricsCache();
19041
19475
 
19042
- /**
19043
- * Unicode and Internationalization Support
19044
- *
19045
- * Enhanced Unicode handling for complex scripts, RTL/LTR text,
19046
- * and grapheme cluster boundary detection.
19476
+ /**
19477
+ * Unicode and Internationalization Support
19478
+ *
19479
+ * Enhanced Unicode handling for complex scripts, RTL/LTR text,
19480
+ * and grapheme cluster boundary detection.
19047
19481
  */
19048
19482
 
19049
19483
 
19050
- /**
19051
- * Enhanced grapheme segmentation using Intl.Segmenter when available
19052
- * with fallback to existing graphemeSplit implementation
19484
+ /**
19485
+ * Enhanced grapheme segmentation using Intl.Segmenter when available
19486
+ * with fallback to existing graphemeSplit implementation
19053
19487
  */
19054
19488
  function segmentGraphemes(text) {
19055
19489
  // Use native Intl.Segmenter if available
@@ -19069,15 +19503,15 @@ function segmentGraphemes(text) {
19069
19503
  return graphemeSplit(text);
19070
19504
  }
19071
19505
 
19072
- /**
19073
- * Ellipsis Text Truncation System
19074
- *
19075
- * Implements text truncation with ellipsis when content exceeds bounds,
19076
- * using binary search for optimal truncation points.
19506
+ /**
19507
+ * Ellipsis Text Truncation System
19508
+ *
19509
+ * Implements text truncation with ellipsis when content exceeds bounds,
19510
+ * using binary search for optimal truncation points.
19077
19511
  */
19078
19512
 
19079
- /**
19080
- * Apply ellipsis truncation to text based on width/height constraints
19513
+ /**
19514
+ * Apply ellipsis truncation to text based on width/height constraints
19081
19515
  */
19082
19516
  function applyEllipsis(text, options) {
19083
19517
  const {
@@ -19147,8 +19581,8 @@ function applyEllipsis(text, options) {
19147
19581
  };
19148
19582
  }
19149
19583
 
19150
- /**
19151
- * Truncate text based on width constraint using binary search
19584
+ /**
19585
+ * Truncate text based on width constraint using binary search
19152
19586
  */
19153
19587
  function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn) {
19154
19588
  const graphemes = segmentGraphemes(text);
@@ -19198,8 +19632,8 @@ function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn)
19198
19632
  };
19199
19633
  }
19200
19634
 
19201
- /**
19202
- * Truncate text based on height constraint
19635
+ /**
19636
+ * Truncate text based on height constraint
19203
19637
  */
19204
19638
  function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
19205
19639
  var _measureFn;
@@ -19247,19 +19681,19 @@ function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
19247
19681
  return truncateByWidth(lines[0], firstLineWidth, ellipsisChar, 0, measureFn);
19248
19682
  }
19249
19683
 
19250
- /**
19251
- * Core Text Layout Engine
19252
- *
19253
- * Implements Konva-compatible text layout with support for:
19254
- * - Multiple wrap modes (word/char/none)
19255
- * - Ellipsis truncation
19256
- * - Justify alignment with proper space distribution
19257
- * - RTL/LTR text direction
19258
- * - Advanced grapheme handling
19684
+ /**
19685
+ * Core Text Layout Engine
19686
+ *
19687
+ * Implements Konva-compatible text layout with support for:
19688
+ * - Multiple wrap modes (word/char/none)
19689
+ * - Ellipsis truncation
19690
+ * - Justify alignment with proper space distribution
19691
+ * - RTL/LTR text direction
19692
+ * - Advanced grapheme handling
19259
19693
  */
19260
19694
 
19261
- /**
19262
- * Main text layout function - converts text and options into positioned layout
19695
+ /**
19696
+ * Main text layout function - converts text and options into positioned layout
19263
19697
  */
19264
19698
  function layoutText(options) {
19265
19699
  var _ellipsisResult;
@@ -19378,8 +19812,8 @@ function layoutText(options) {
19378
19812
  };
19379
19813
  }
19380
19814
 
19381
- /**
19382
- * Layout a single paragraph with wrapping
19815
+ /**
19816
+ * Layout a single paragraph with wrapping
19383
19817
  */
19384
19818
  function layoutParagraph(text, options) {
19385
19819
  const {
@@ -19414,8 +19848,8 @@ function layoutParagraph(text, options) {
19414
19848
  return layoutLines;
19415
19849
  }
19416
19850
 
19417
- /**
19418
- * Layout a single line of text (no wrapping)
19851
+ /**
19852
+ * Layout a single line of text (no wrapping)
19419
19853
  */
19420
19854
  function layoutSingleLine(text, options) {
19421
19855
  let textOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
@@ -19485,8 +19919,8 @@ function layoutSingleLine(text, options) {
19485
19919
  };
19486
19920
  }
19487
19921
 
19488
- /**
19489
- * Word-based wrapping algorithm
19922
+ /**
19923
+ * Word-based wrapping algorithm
19490
19924
  */
19491
19925
  function wrapByWords(text, maxWidth, options) {
19492
19926
  const lines = [];
@@ -19519,8 +19953,8 @@ function wrapByWords(text, maxWidth, options) {
19519
19953
  return lines.length > 0 ? lines : [''];
19520
19954
  }
19521
19955
 
19522
- /**
19523
- * Character-based wrapping algorithm
19956
+ /**
19957
+ * Character-based wrapping algorithm
19524
19958
  */
19525
19959
  function wrapByCharacters(text, maxWidth, options) {
19526
19960
  const lines = [];
@@ -19542,8 +19976,8 @@ function wrapByCharacters(text, maxWidth, options) {
19542
19976
  return lines.length > 0 ? lines : [''];
19543
19977
  }
19544
19978
 
19545
- /**
19546
- * Apply text alignment to lines
19979
+ /**
19980
+ * Apply text alignment to lines
19547
19981
  */
19548
19982
  function applyAlignment(lines, align, containerWidth, options) {
19549
19983
  return lines.map(line => {
@@ -19577,8 +20011,8 @@ function applyAlignment(lines, align, containerWidth, options) {
19577
20011
  });
19578
20012
  }
19579
20013
 
19580
- /**
19581
- * Apply justify alignment by expanding spaces
20014
+ /**
20015
+ * Apply justify alignment by expanding spaces
19582
20016
  */
19583
20017
  function applyJustification(line, containerWidth, options) {
19584
20018
  const spaces = line.graphemes.filter(g => /\s/.test(g)).length;
@@ -19601,8 +20035,8 @@ function applyJustification(line, containerWidth, options) {
19601
20035
  return line;
19602
20036
  }
19603
20037
 
19604
- /**
19605
- * Calculate vertical alignment offset
20038
+ /**
20039
+ * Calculate vertical alignment offset
19606
20040
  */
19607
20041
  function calculateVerticalOffset(contentHeight, containerHeight, align) {
19608
20042
  switch (align) {
@@ -19616,8 +20050,8 @@ function calculateVerticalOffset(contentHeight, containerHeight, align) {
19616
20050
  }
19617
20051
  }
19618
20052
 
19619
- /**
19620
- * Handle height overflow with ellipsis
20053
+ /**
20054
+ * Handle height overflow with ellipsis
19621
20055
  */
19622
20056
  function handleHeightOverflow(existingLines, overflowLine, remainingHeight, options) {
19623
20057
  // If ellipsis is enabled, try to fit part of the overflow line
@@ -19646,8 +20080,8 @@ function handleHeightOverflow(existingLines, overflowLine, remainingHeight, opti
19646
20080
  };
19647
20081
  }
19648
20082
 
19649
- /**
19650
- * Create empty line for empty paragraphs
20083
+ /**
20084
+ * Create empty line for empty paragraphs
19651
20085
  */
19652
20086
  function createEmptyLine(options) {
19653
20087
  const height = options.fontSize * options.lineHeight;
@@ -19663,8 +20097,8 @@ function createEmptyLine(options) {
19663
20097
  };
19664
20098
  }
19665
20099
 
19666
- /**
19667
- * Measure width of a line of text
20100
+ /**
20101
+ * Measure width of a line of text
19668
20102
  */
19669
20103
  function measureLineWidth(text, options) {
19670
20104
  const graphemes = segmentGraphemes(text);
@@ -19681,8 +20115,8 @@ function measureLineWidth(text, options) {
19681
20115
  return width;
19682
20116
  }
19683
20117
 
19684
- /**
19685
- * Convert layout options to measurement options
20118
+ /**
20119
+ * Convert layout options to measurement options
19686
20120
  */
19687
20121
  function createMeasurementOptions(options) {
19688
20122
  return {
@@ -19925,15 +20359,15 @@ class TextSVGExportMixin extends FabricObjectSVGExportMixin {
19925
20359
  }
19926
20360
  }
19927
20361
 
19928
- /**
19929
- * Browser Line Break Extraction
19930
- *
19931
- * Captures exact line breaks as rendered by the browser to ensure
19932
- * pixel-perfect consistency between DOM editing and canvas rendering.
20362
+ /**
20363
+ * Browser Line Break Extraction
20364
+ *
20365
+ * Captures exact line breaks as rendered by the browser to ensure
20366
+ * pixel-perfect consistency between DOM editing and canvas rendering.
19933
20367
  */
19934
20368
 
19935
- /**
19936
- * Segment text into graphemes safely using Intl.Segmenter or fallback
20369
+ /**
20370
+ * Segment text into graphemes safely using Intl.Segmenter or fallback
19937
20371
  */
19938
20372
  function segmentIntoGraphemes(text) {
19939
20373
  if (typeof Intl !== 'undefined' && Intl.Segmenter) {
@@ -19947,9 +20381,9 @@ function segmentIntoGraphemes(text) {
19947
20381
  return Array.from(text);
19948
20382
  }
19949
20383
 
19950
- /**
19951
- * Extract line break information from a textarea by creating a mirror element
19952
- * with identical computed styles and measuring grapheme positions.
20384
+ /**
20385
+ * Extract line break information from a textarea by creating a mirror element
20386
+ * with identical computed styles and measuring grapheme positions.
19953
20387
  */
19954
20388
  function extractLinesFromDOM(textarea) {
19955
20389
  const text = textarea.value;
@@ -20044,16 +20478,16 @@ function extractLinesFromDOM(textarea) {
20044
20478
  }
20045
20479
  }
20046
20480
 
20047
- /**
20048
- * Create a hash of layout-affecting properties to detect when browser lines are still valid
20481
+ /**
20482
+ * Create a hash of layout-affecting properties to detect when browser lines are still valid
20049
20483
  */
20050
20484
  function createLayoutHash(target) {
20051
20485
  const properties = [target.text, target.width, target.height, target.fontFamily, target.fontSize, target.fontWeight, target.fontStyle, target.lineHeight, target.charSpacing, target.textAlign, target.direction];
20052
20486
  return properties.map(p => String(p)).join('|');
20053
20487
  }
20054
20488
 
20055
- /**
20056
- * Check if stored browser lines are still valid for the current target state
20489
+ /**
20490
+ * Check if stored browser lines are still valid for the current target state
20057
20491
  */
20058
20492
  function areBrowserLinesValid(target, storedHash) {
20059
20493
  if (!storedHash || !target.__lastBrowserLines) {
@@ -20063,24 +20497,24 @@ function areBrowserLinesValid(target, storedHash) {
20063
20497
  return currentHash === storedHash;
20064
20498
  }
20065
20499
 
20066
- /**
20067
- * Store browser lines on a target object with validity hash
20500
+ /**
20501
+ * Store browser lines on a target object with validity hash
20068
20502
  */
20069
20503
  function storeBrowserLines(target, lines, layoutHash) {
20070
20504
  target.__lastBrowserLines = lines;
20071
20505
  target.__lastBrowserLinesHash = createLayoutHash(target);
20072
20506
  }
20073
20507
 
20074
- /**
20075
- * Clear stored browser lines from a target object
20508
+ /**
20509
+ * Clear stored browser lines from a target object
20076
20510
  */
20077
20511
  function clearBrowserLines(target) {
20078
20512
  delete target.__lastBrowserLines;
20079
20513
  delete target.__lastBrowserLinesHash;
20080
20514
  }
20081
20515
 
20082
- /**
20083
- * Get stored browser lines if they're still valid
20516
+ /**
20517
+ * Get stored browser lines if they're still valid
20084
20518
  */
20085
20519
  function getBrowserLines(target) {
20086
20520
  const lines = target.__lastBrowserLines;
@@ -20093,9 +20527,9 @@ function getBrowserLines(target) {
20093
20527
 
20094
20528
  let measuringContext;
20095
20529
 
20096
- /**
20097
- * Return a context for measurement of text string.
20098
- * if created it gets stored for reuse
20530
+ /**
20531
+ * Return a context for measurement of text string.
20532
+ * if created it gets stored for reuse
20099
20533
  */
20100
20534
  function getMeasuringContext() {
20101
20535
  if (!measuringContext) {
@@ -20108,17 +20542,17 @@ function getMeasuringContext() {
20108
20542
  return measuringContext;
20109
20543
  }
20110
20544
 
20111
- /**
20112
- * Measure and return the info of a single grapheme.
20113
- * needs the the info of previous graphemes already filled
20114
- * Override to customize measuring
20545
+ /**
20546
+ * Measure and return the info of a single grapheme.
20547
+ * needs the the info of previous graphemes already filled
20548
+ * Override to customize measuring
20115
20549
  */
20116
20550
 
20117
20551
  // @TODO this is not complete
20118
20552
 
20119
- /**
20120
- * Text class
20121
- * @see {@link http://fabricjs.com/fabric-intro-part-2#text}
20553
+ /**
20554
+ * Text class
20555
+ * @see {@link http://fabricjs.com/fabric-intro-part-2#text}
20122
20556
  */
20123
20557
  class FabricText extends StyledText {
20124
20558
  static getDefaults() {
@@ -20129,11 +20563,11 @@ class FabricText extends StyledText {
20129
20563
  }
20130
20564
  constructor(text, options) {
20131
20565
  super();
20132
- /**
20133
- * contains characters bounding boxes
20134
- * This variable is considered to be protected.
20135
- * But for how mixins are implemented right now, we can't leave it private
20136
- * @protected
20566
+ /**
20567
+ * contains characters bounding boxes
20568
+ * This variable is considered to be protected.
20569
+ * But for how mixins are implemented right now, we can't leave it private
20570
+ * @protected
20137
20571
  */
20138
20572
  _defineProperty(this, "__charBounds", []);
20139
20573
  Object.assign(this, FabricText.ownDefaults);
@@ -20150,9 +20584,9 @@ class FabricText extends StyledText {
20150
20584
  this.setCoords();
20151
20585
  }
20152
20586
 
20153
- /**
20154
- * If text has a path, it will add the extra information needed
20155
- * for path and text calculations
20587
+ /**
20588
+ * If text has a path, it will add the extra information needed
20589
+ * for path and text calculations
20156
20590
  */
20157
20591
  setPathInfo() {
20158
20592
  const path = this.path;
@@ -20161,10 +20595,10 @@ class FabricText extends StyledText {
20161
20595
  }
20162
20596
  }
20163
20597
 
20164
- /**
20165
- * @private
20166
- * Divides text into lines of text and lines of graphemes.
20167
- * Uses browser lines when available for pixel-perfect consistency.
20598
+ /**
20599
+ * @private
20600
+ * Divides text into lines of text and lines of graphemes.
20601
+ * Uses browser lines when available for pixel-perfect consistency.
20168
20602
  */
20169
20603
  _splitText() {
20170
20604
  // Check if we have valid browser lines and should use them
@@ -20180,9 +20614,9 @@ class FabricText extends StyledText {
20180
20614
  return newLines;
20181
20615
  }
20182
20616
 
20183
- /**
20184
- * Create TextLinesInfo from browser-extracted lines
20185
- * @private
20617
+ /**
20618
+ * Create TextLinesInfo from browser-extracted lines
20619
+ * @private
20186
20620
  */
20187
20621
  _splitTextFromBrowserLines(browserLines) {
20188
20622
  const lines = [];
@@ -20216,10 +20650,10 @@ class FabricText extends StyledText {
20216
20650
  return result;
20217
20651
  }
20218
20652
 
20219
- /**
20220
- * Initialize or update text dimensions.
20221
- * Updates this.width and this.height with the proper values.
20222
- * Does not return dimensions.
20653
+ /**
20654
+ * Initialize or update text dimensions.
20655
+ * Updates this.width and this.height with the proper values.
20656
+ * Does not return dimensions.
20223
20657
  */
20224
20658
  initDimensions() {
20225
20659
  // Use advanced layout if enabled
@@ -20242,8 +20676,8 @@ class FabricText extends StyledText {
20242
20676
  }
20243
20677
  }
20244
20678
 
20245
- /**
20246
- * Enlarge space boxes and shift the others
20679
+ /**
20680
+ * Enlarge space boxes and shift the others
20247
20681
  */
20248
20682
  enlargeSpaces() {
20249
20683
  let diffSpace, currentLineWidth, numberOfSpaces, accumulatedSpace, line, charBound, spaces;
@@ -20302,18 +20736,18 @@ class FabricText extends StyledText {
20302
20736
  }
20303
20737
  }
20304
20738
 
20305
- /**
20306
- * Advanced layout using new text engine (Konva-compatible)
20307
- * @private
20739
+ /**
20740
+ * Advanced layout using new text engine (Konva-compatible)
20741
+ * @private
20308
20742
  */
20309
20743
  _layoutTextAdvanced() {
20310
20744
  const options = this._getAdvancedLayoutOptions();
20311
20745
  return layoutText(options);
20312
20746
  }
20313
20747
 
20314
- /**
20315
- * Get advanced layout options from current text properties
20316
- * @private
20748
+ /**
20749
+ * Get advanced layout options from current text properties
20750
+ * @private
20317
20751
  */
20318
20752
  _getAdvancedLayoutOptions() {
20319
20753
  return {
@@ -20335,9 +20769,9 @@ class FabricText extends StyledText {
20335
20769
  };
20336
20770
  }
20337
20771
 
20338
- /**
20339
- * Map Fabric textAlign to Konva align format
20340
- * @private
20772
+ /**
20773
+ * Map Fabric textAlign to Konva align format
20774
+ * @private
20341
20775
  */
20342
20776
  _mapTextAlignToAlign(textAlign) {
20343
20777
  switch (textAlign) {
@@ -20358,8 +20792,8 @@ class FabricText extends StyledText {
20358
20792
  }
20359
20793
  }
20360
20794
 
20361
- /**
20362
- * Enhanced initDimensions that uses advanced layout when enabled
20795
+ /**
20796
+ * Enhanced initDimensions that uses advanced layout when enabled
20363
20797
  */
20364
20798
  initDimensionsAdvanced() {
20365
20799
  if (!this.enableAdvancedLayout) {
@@ -20376,9 +20810,9 @@ class FabricText extends StyledText {
20376
20810
  this.dirty = true;
20377
20811
  }
20378
20812
 
20379
- /**
20380
- * Convert new layout format to legacy _textLines and __charBounds format
20381
- * @private
20813
+ /**
20814
+ * Convert new layout format to legacy _textLines and __charBounds format
20815
+ * @private
20382
20816
  */
20383
20817
  _convertLayoutToLegacyFormat(layout) {
20384
20818
  this._textLines = layout.lines.map(line => line.graphemes);
@@ -20400,30 +20834,30 @@ class FabricText extends StyledText {
20400
20834
  }
20401
20835
  }
20402
20836
 
20403
- /**
20404
- * Detect if the text line is ended with an hard break
20405
- * text and itext do not have wrapping, return false
20406
- * @return {Boolean}
20837
+ /**
20838
+ * Detect if the text line is ended with an hard break
20839
+ * text and itext do not have wrapping, return false
20840
+ * @return {Boolean}
20407
20841
  */
20408
20842
  isEndOfWrapping(lineIndex) {
20409
20843
  return lineIndex === this._textLines.length - 1;
20410
20844
  }
20411
20845
 
20412
- /**
20413
- * Detect if a line has a linebreak and so we need to account for it when moving
20414
- * and counting style.
20415
- * It return always 1 for text and Itext. Textbox has its own implementation
20416
- * @return Number
20846
+ /**
20847
+ * Detect if a line has a linebreak and so we need to account for it when moving
20848
+ * and counting style.
20849
+ * It return always 1 for text and Itext. Textbox has its own implementation
20850
+ * @return Number
20417
20851
  */
20418
20852
 
20419
20853
  missingNewlineOffset(_lineIndex) {
20420
20854
  return 1;
20421
20855
  }
20422
20856
 
20423
- /**
20424
- * Returns 2d representation (lineIndex and charIndex) of cursor
20425
- * @param {Number} selectionStart
20426
- * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
20857
+ /**
20858
+ * Returns 2d representation (lineIndex and charIndex) of cursor
20859
+ * @param {Number} selectionStart
20860
+ * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
20427
20861
  */
20428
20862
  get2DCursorLocation(selectionStart, skipWrapping) {
20429
20863
  const lines = skipWrapping ? this._unwrappedTextLines : this._textLines;
@@ -20443,24 +20877,24 @@ class FabricText extends StyledText {
20443
20877
  };
20444
20878
  }
20445
20879
 
20446
- /**
20447
- * Returns string representation of an instance
20448
- * @return {String} String representation of text object
20880
+ /**
20881
+ * Returns string representation of an instance
20882
+ * @return {String} String representation of text object
20449
20883
  */
20450
20884
  toString() {
20451
20885
  return `#<Text (${this.complexity()}): { "text": "${this.text}", "fontFamily": "${this.fontFamily}" }>`;
20452
20886
  }
20453
20887
 
20454
- /**
20455
- * Return the dimension and the zoom level needed to create a cache canvas
20456
- * big enough to host the object to be cached.
20457
- * @private
20458
- * @param {Object} dim.x width of object to be cached
20459
- * @param {Object} dim.y height of object to be cached
20460
- * @return {Object}.width width of canvas
20461
- * @return {Object}.height height of canvas
20462
- * @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
20463
- * @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
20888
+ /**
20889
+ * Return the dimension and the zoom level needed to create a cache canvas
20890
+ * big enough to host the object to be cached.
20891
+ * @private
20892
+ * @param {Object} dim.x width of object to be cached
20893
+ * @param {Object} dim.y height of object to be cached
20894
+ * @return {Object}.width width of canvas
20895
+ * @return {Object}.height height of canvas
20896
+ * @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
20897
+ * @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
20464
20898
  */
20465
20899
  _getCacheCanvasDimensions() {
20466
20900
  const dims = super._getCacheCanvasDimensions();
@@ -20470,9 +20904,9 @@ class FabricText extends StyledText {
20470
20904
  return dims;
20471
20905
  }
20472
20906
 
20473
- /**
20474
- * @private
20475
- * @param {CanvasRenderingContext2D} ctx Context to render on
20907
+ /**
20908
+ * @private
20909
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20476
20910
  */
20477
20911
  _render(ctx) {
20478
20912
  const path = this.path;
@@ -20485,9 +20919,9 @@ class FabricText extends StyledText {
20485
20919
  this._renderTextDecoration(ctx, 'linethrough');
20486
20920
  }
20487
20921
 
20488
- /**
20489
- * @private
20490
- * @param {CanvasRenderingContext2D} ctx Context to render on
20922
+ /**
20923
+ * @private
20924
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20491
20925
  */
20492
20926
  _renderText(ctx) {
20493
20927
  // Skip text rendering if in overlay editing mode
@@ -20503,15 +20937,15 @@ class FabricText extends StyledText {
20503
20937
  }
20504
20938
  }
20505
20939
 
20506
- /**
20507
- * Set the font parameter of the context with the object properties or with charStyle
20508
- * @private
20509
- * @param {CanvasRenderingContext2D} ctx Context to render on
20510
- * @param {Object} [charStyle] object with font style properties
20511
- * @param {String} [charStyle.fontFamily] Font Family
20512
- * @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
20513
- * @param {String} [charStyle.fontWeight] Font weight
20514
- * @param {String} [charStyle.fontStyle] Font style (italic|normal)
20940
+ /**
20941
+ * Set the font parameter of the context with the object properties or with charStyle
20942
+ * @private
20943
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20944
+ * @param {Object} [charStyle] object with font style properties
20945
+ * @param {String} [charStyle.fontFamily] Font Family
20946
+ * @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
20947
+ * @param {String} [charStyle.fontWeight] Font weight
20948
+ * @param {String} [charStyle.fontStyle] Font style (italic|normal)
20515
20949
  */
20516
20950
  _setTextStyles(ctx, charStyle, forMeasuring) {
20517
20951
  ctx.textBaseline = 'alphabetic';
@@ -20531,11 +20965,11 @@ class FabricText extends StyledText {
20531
20965
  ctx.font = this._getFontDeclaration(charStyle, forMeasuring);
20532
20966
  }
20533
20967
 
20534
- /**
20535
- * calculate and return the text Width measuring each line.
20536
- * @private
20537
- * @param {CanvasRenderingContext2D} ctx Context to render on
20538
- * @return {Number} Maximum width of Text object
20968
+ /**
20969
+ * calculate and return the text Width measuring each line.
20970
+ * @private
20971
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20972
+ * @return {Number} Maximum width of Text object
20539
20973
  */
20540
20974
  calcTextWidth() {
20541
20975
  let maxWidth = this.getLineWidth(0);
@@ -20548,23 +20982,23 @@ class FabricText extends StyledText {
20548
20982
  return maxWidth;
20549
20983
  }
20550
20984
 
20551
- /**
20552
- * @private
20553
- * @param {String} method Method name ("fillText" or "strokeText")
20554
- * @param {CanvasRenderingContext2D} ctx Context to render on
20555
- * @param {String} line Text to render
20556
- * @param {Number} left Left position of text
20557
- * @param {Number} top Top position of text
20558
- * @param {Number} lineIndex Index of a line in a text
20985
+ /**
20986
+ * @private
20987
+ * @param {String} method Method name ("fillText" or "strokeText")
20988
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20989
+ * @param {String} line Text to render
20990
+ * @param {Number} left Left position of text
20991
+ * @param {Number} top Top position of text
20992
+ * @param {Number} lineIndex Index of a line in a text
20559
20993
  */
20560
20994
  _renderTextLine(method, ctx, line, left, top, lineIndex) {
20561
20995
  this._renderChars(method, ctx, line, left, top, lineIndex);
20562
20996
  }
20563
20997
 
20564
- /**
20565
- * Renders the text background for lines, taking care of style
20566
- * @private
20567
- * @param {CanvasRenderingContext2D} ctx Context to render on
20998
+ /**
20999
+ * Renders the text background for lines, taking care of style
21000
+ * @private
21001
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20568
21002
  */
20569
21003
  _renderTextLinesBackground(ctx) {
20570
21004
  if (!this.textBackgroundColor && !this.styleHas('textBackgroundColor')) {
@@ -20627,15 +21061,15 @@ class FabricText extends StyledText {
20627
21061
  this._removeShadow(ctx);
20628
21062
  }
20629
21063
 
20630
- /**
20631
- * measure and return the width of a single character.
20632
- * possibly overridden to accommodate different measure logic or
20633
- * to hook some external lib for character measurement
20634
- * @private
20635
- * @param {String} _char, char to be measured
20636
- * @param {Object} charStyle style of char to be measured
20637
- * @param {String} [previousChar] previous char
20638
- * @param {Object} [prevCharStyle] style of previous char
21064
+ /**
21065
+ * measure and return the width of a single character.
21066
+ * possibly overridden to accommodate different measure logic or
21067
+ * to hook some external lib for character measurement
21068
+ * @private
21069
+ * @param {String} _char, char to be measured
21070
+ * @param {Object} charStyle style of char to be measured
21071
+ * @param {String} [previousChar] previous char
21072
+ * @param {Object} [prevCharStyle] style of previous char
20639
21073
  */
20640
21074
  _measureChar(_char, charStyle, previousChar, prevCharStyle) {
20641
21075
  const fontCache = cache.getFontCache(charStyle),
@@ -20680,19 +21114,19 @@ class FabricText extends StyledText {
20680
21114
  };
20681
21115
  }
20682
21116
 
20683
- /**
20684
- * Computes height of character at given position
20685
- * @param {Number} line the line index number
20686
- * @param {Number} _char the character index number
20687
- * @return {Number} fontSize of the character
21117
+ /**
21118
+ * Computes height of character at given position
21119
+ * @param {Number} line the line index number
21120
+ * @param {Number} _char the character index number
21121
+ * @return {Number} fontSize of the character
20688
21122
  */
20689
21123
  getHeightOfChar(line, _char) {
20690
21124
  return this.getValueOfPropertyAt(line, _char, 'fontSize');
20691
21125
  }
20692
21126
 
20693
- /**
20694
- * measure a text line measuring all characters.
20695
- * @param {Number} lineIndex line number
21127
+ /**
21128
+ * measure a text line measuring all characters.
21129
+ * @param {Number} lineIndex line number
20696
21130
  */
20697
21131
  measureLine(lineIndex) {
20698
21132
  const lineInfo = this._measureLine(lineIndex);
@@ -20705,11 +21139,11 @@ class FabricText extends StyledText {
20705
21139
  return lineInfo;
20706
21140
  }
20707
21141
 
20708
- /**
20709
- * measure every grapheme of a line, populating __charBounds
20710
- * @param {Number} lineIndex
20711
- * @return {Object} object.width total width of characters
20712
- * @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
21142
+ /**
21143
+ * measure every grapheme of a line, populating __charBounds
21144
+ * @param {Number} lineIndex
21145
+ * @return {Object} object.width total width of characters
21146
+ * @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
20713
21147
  */
20714
21148
  _measureLine(lineIndex) {
20715
21149
  let width = 0,
@@ -20772,13 +21206,13 @@ class FabricText extends StyledText {
20772
21206
  };
20773
21207
  }
20774
21208
 
20775
- /**
20776
- * Calculate the angle and the left,top position of the char that follow a path.
20777
- * It appends it to graphemeInfo to be reused later at rendering
20778
- * @private
20779
- * @param {Number} positionInPath to be measured
20780
- * @param {GraphemeBBox} graphemeInfo current grapheme box information
20781
- * @param {Object} startingPoint position of the point
21209
+ /**
21210
+ * Calculate the angle and the left,top position of the char that follow a path.
21211
+ * It appends it to graphemeInfo to be reused later at rendering
21212
+ * @private
21213
+ * @param {Number} positionInPath to be measured
21214
+ * @param {GraphemeBBox} graphemeInfo current grapheme box information
21215
+ * @param {Object} startingPoint position of the point
20782
21216
  */
20783
21217
  _setGraphemeOnPath(positionInPath, graphemeInfo) {
20784
21218
  const centerPosition = positionInPath + graphemeInfo.kernedWidth / 2,
@@ -20791,13 +21225,13 @@ class FabricText extends StyledText {
20791
21225
  graphemeInfo.angle = info.angle + (this.pathSide === RIGHT ? Math.PI : 0);
20792
21226
  }
20793
21227
 
20794
- /**
20795
- *
20796
- * @param {String} grapheme to be measured
20797
- * @param {Number} lineIndex index of the line where the char is
20798
- * @param {Number} charIndex position in the line
20799
- * @param {String} [prevGrapheme] character preceding the one to be measured
20800
- * @returns {GraphemeBBox} grapheme bbox
21228
+ /**
21229
+ *
21230
+ * @param {String} grapheme to be measured
21231
+ * @param {Number} lineIndex index of the line where the char is
21232
+ * @param {Number} charIndex position in the line
21233
+ * @param {String} [prevGrapheme] character preceding the one to be measured
21234
+ * @returns {GraphemeBBox} grapheme bbox
20801
21235
  */
20802
21236
  _getGraphemeBox(grapheme, lineIndex, charIndex, prevGrapheme, skipLeft) {
20803
21237
  const style = this.getCompleteStyleDeclaration(lineIndex, charIndex),
@@ -20825,10 +21259,10 @@ class FabricText extends StyledText {
20825
21259
  return box;
20826
21260
  }
20827
21261
 
20828
- /**
20829
- * Calculate height of line at 'lineIndex'
20830
- * @param {Number} lineIndex index of line to calculate
20831
- * @return {Number}
21262
+ /**
21263
+ * Calculate height of line at 'lineIndex'
21264
+ * @param {Number} lineIndex index of line to calculate
21265
+ * @return {Number}
20832
21266
  */
20833
21267
  getHeightOfLine(lineIndex) {
20834
21268
  if (this.__lineHeights[lineIndex]) {
@@ -20844,8 +21278,8 @@ class FabricText extends StyledText {
20844
21278
  return this.__lineHeights[lineIndex] = maxHeight * this.lineHeight * this._fontSizeMult;
20845
21279
  }
20846
21280
 
20847
- /**
20848
- * Calculate text box height
21281
+ /**
21282
+ * Calculate text box height
20849
21283
  */
20850
21284
  calcTextHeight() {
20851
21285
  let lineHeight,
@@ -20857,26 +21291,26 @@ class FabricText extends StyledText {
20857
21291
  return height;
20858
21292
  }
20859
21293
 
20860
- /**
20861
- * @private
20862
- * @return {Number} Left offset
21294
+ /**
21295
+ * @private
21296
+ * @return {Number} Left offset
20863
21297
  */
20864
21298
  _getLeftOffset() {
20865
21299
  return this.direction === 'ltr' ? -this.width / 2 : this.width / 2;
20866
21300
  }
20867
21301
 
20868
- /**
20869
- * @private
20870
- * @return {Number} Top offset
21302
+ /**
21303
+ * @private
21304
+ * @return {Number} Top offset
20871
21305
  */
20872
21306
  _getTopOffset() {
20873
21307
  return -this.height / 2;
20874
21308
  }
20875
21309
 
20876
- /**
20877
- * @private
20878
- * @param {CanvasRenderingContext2D} ctx Context to render on
20879
- * @param {String} method Method name ("fillText" or "strokeText")
21310
+ /**
21311
+ * @private
21312
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21313
+ * @param {String} method Method name ("fillText" or "strokeText")
20880
21314
  */
20881
21315
  _renderTextCommon(ctx, method) {
20882
21316
  ctx.save();
@@ -20893,9 +21327,9 @@ class FabricText extends StyledText {
20893
21327
  ctx.restore();
20894
21328
  }
20895
21329
 
20896
- /**
20897
- * @private
20898
- * @param {CanvasRenderingContext2D} ctx Context to render on
21330
+ /**
21331
+ * @private
21332
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20899
21333
  */
20900
21334
  _renderTextFill(ctx) {
20901
21335
  if (!this.fill && !this.styleHas(FILL)) {
@@ -20904,9 +21338,9 @@ class FabricText extends StyledText {
20904
21338
  this._renderTextCommon(ctx, 'fillText');
20905
21339
  }
20906
21340
 
20907
- /**
20908
- * @private
20909
- * @param {CanvasRenderingContext2D} ctx Context to render on
21341
+ /**
21342
+ * @private
21343
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20910
21344
  */
20911
21345
  _renderTextStroke(ctx) {
20912
21346
  if ((!this.stroke || this.strokeWidth === 0) && this.isEmptyStyles()) {
@@ -20923,14 +21357,14 @@ class FabricText extends StyledText {
20923
21357
  ctx.restore();
20924
21358
  }
20925
21359
 
20926
- /**
20927
- * @private
20928
- * @param {String} method fillText or strokeText.
20929
- * @param {CanvasRenderingContext2D} ctx Context to render on
20930
- * @param {Array} line Content of the line, splitted in an array by grapheme
20931
- * @param {Number} left
20932
- * @param {Number} top
20933
- * @param {Number} lineIndex
21360
+ /**
21361
+ * @private
21362
+ * @param {String} method fillText or strokeText.
21363
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21364
+ * @param {Array} line Content of the line, splitted in an array by grapheme
21365
+ * @param {Number} left
21366
+ * @param {Number} top
21367
+ * @param {Number} lineIndex
20934
21368
  */
20935
21369
  _renderChars(method, ctx, line, left, top, lineIndex) {
20936
21370
  const lineHeight = this.getHeightOfLine(lineIndex),
@@ -21012,16 +21446,16 @@ class FabricText extends StyledText {
21012
21446
  ctx.restore();
21013
21447
  }
21014
21448
 
21015
- /**
21016
- * This function try to patch the missing gradientTransform on canvas gradients.
21017
- * transforming a context to transform the gradient, is going to transform the stroke too.
21018
- * we want to transform the gradient but not the stroke operation, so we create
21019
- * a transformed gradient on a pattern and then we use the pattern instead of the gradient.
21020
- * this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
21021
- * is limited.
21022
- * @private
21023
- * @param {TFiller} filler a fabric gradient instance
21024
- * @return {CanvasPattern} a pattern to use as fill/stroke style
21449
+ /**
21450
+ * This function try to patch the missing gradientTransform on canvas gradients.
21451
+ * transforming a context to transform the gradient, is going to transform the stroke too.
21452
+ * we want to transform the gradient but not the stroke operation, so we create
21453
+ * a transformed gradient on a pattern and then we use the pattern instead of the gradient.
21454
+ * this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
21455
+ * is limited.
21456
+ * @private
21457
+ * @param {TFiller} filler a fabric gradient instance
21458
+ * @return {CanvasPattern} a pattern to use as fill/stroke style
21025
21459
  */
21026
21460
  _applyPatternGradientTransformText(filler) {
21027
21461
  // TODO: verify compatibility with strokeUniform
@@ -21077,12 +21511,12 @@ class FabricText extends StyledText {
21077
21511
  };
21078
21512
  }
21079
21513
 
21080
- /**
21081
- * This function prepare the canvas for a stroke style, and stroke and strokeWidth
21082
- * need to be sent in as defined
21083
- * @param {CanvasRenderingContext2D} ctx
21084
- * @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
21085
- * @returns
21514
+ /**
21515
+ * This function prepare the canvas for a stroke style, and stroke and strokeWidth
21516
+ * need to be sent in as defined
21517
+ * @param {CanvasRenderingContext2D} ctx
21518
+ * @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
21519
+ * @returns
21086
21520
  */
21087
21521
  _setStrokeStyles(ctx, _ref) {
21088
21522
  let {
@@ -21097,12 +21531,12 @@ class FabricText extends StyledText {
21097
21531
  return this.handleFiller(ctx, 'strokeStyle', stroke);
21098
21532
  }
21099
21533
 
21100
- /**
21101
- * This function prepare the canvas for a ill style, and fill
21102
- * need to be sent in as defined
21103
- * @param {CanvasRenderingContext2D} ctx
21104
- * @param {CompleteTextStyleDeclaration} style with ill defined
21105
- * @returns
21534
+ /**
21535
+ * This function prepare the canvas for a ill style, and fill
21536
+ * need to be sent in as defined
21537
+ * @param {CanvasRenderingContext2D} ctx
21538
+ * @param {CompleteTextStyleDeclaration} style with ill defined
21539
+ * @returns
21106
21540
  */
21107
21541
  _setFillStyles(ctx, _ref2) {
21108
21542
  let {
@@ -21111,16 +21545,16 @@ class FabricText extends StyledText {
21111
21545
  return this.handleFiller(ctx, 'fillStyle', fill);
21112
21546
  }
21113
21547
 
21114
- /**
21115
- * @private
21116
- * @param {String} method
21117
- * @param {CanvasRenderingContext2D} ctx Context to render on
21118
- * @param {Number} lineIndex
21119
- * @param {Number} charIndex
21120
- * @param {String} _char
21121
- * @param {Number} left Left coordinate
21122
- * @param {Number} top Top coordinate
21123
- * @param {Number} lineHeight Height of the line
21548
+ /**
21549
+ * @private
21550
+ * @param {String} method
21551
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21552
+ * @param {Number} lineIndex
21553
+ * @param {Number} charIndex
21554
+ * @param {String} _char
21555
+ * @param {Number} left Left coordinate
21556
+ * @param {Number} top Top coordinate
21557
+ * @param {Number} lineHeight Height of the line
21124
21558
  */
21125
21559
  _renderChar(method, ctx, lineIndex, charIndex, _char, left, top) {
21126
21560
  const decl = this._getStyleDeclaration(lineIndex, charIndex),
@@ -21149,30 +21583,30 @@ class FabricText extends StyledText {
21149
21583
  ctx.restore();
21150
21584
  }
21151
21585
 
21152
- /**
21153
- * Turns the character into a 'superior figure' (i.e. 'superscript')
21154
- * @param {Number} start selection start
21155
- * @param {Number} end selection end
21586
+ /**
21587
+ * Turns the character into a 'superior figure' (i.e. 'superscript')
21588
+ * @param {Number} start selection start
21589
+ * @param {Number} end selection end
21156
21590
  */
21157
21591
  setSuperscript(start, end) {
21158
21592
  this._setScript(start, end, this.superscript);
21159
21593
  }
21160
21594
 
21161
- /**
21162
- * Turns the character into an 'inferior figure' (i.e. 'subscript')
21163
- * @param {Number} start selection start
21164
- * @param {Number} end selection end
21595
+ /**
21596
+ * Turns the character into an 'inferior figure' (i.e. 'subscript')
21597
+ * @param {Number} start selection start
21598
+ * @param {Number} end selection end
21165
21599
  */
21166
21600
  setSubscript(start, end) {
21167
21601
  this._setScript(start, end, this.subscript);
21168
21602
  }
21169
21603
 
21170
- /**
21171
- * Applies 'schema' at given position
21172
- * @private
21173
- * @param {Number} start selection start
21174
- * @param {Number} end selection end
21175
- * @param {Number} schema
21604
+ /**
21605
+ * Applies 'schema' at given position
21606
+ * @private
21607
+ * @param {Number} start selection start
21608
+ * @param {Number} end selection end
21609
+ * @param {Number} schema
21176
21610
  */
21177
21611
  _setScript(start, end, schema) {
21178
21612
  const loc = this.get2DCursorLocation(start, true),
@@ -21185,10 +21619,10 @@ class FabricText extends StyledText {
21185
21619
  this.setSelectionStyles(style, start, end);
21186
21620
  }
21187
21621
 
21188
- /**
21189
- * @private
21190
- * @param {Number} lineIndex index text line
21191
- * @return {Number} Line left offset
21622
+ /**
21623
+ * @private
21624
+ * @param {Number} lineIndex index text line
21625
+ * @return {Number} Line left offset
21192
21626
  */
21193
21627
  _getLineLeftOffset(lineIndex) {
21194
21628
  const lineWidth = this.getLineWidth(lineIndex),
@@ -21238,8 +21672,8 @@ class FabricText extends StyledText {
21238
21672
  return leftOffset;
21239
21673
  }
21240
21674
 
21241
- /**
21242
- * @private
21675
+ /**
21676
+ * @private
21243
21677
  */
21244
21678
  _clearCache() {
21245
21679
  this._forceClearCache = false;
@@ -21248,12 +21682,12 @@ class FabricText extends StyledText {
21248
21682
  this.__charBounds = [];
21249
21683
  }
21250
21684
 
21251
- /**
21252
- * Measure a single line given its index. Used to calculate the initial
21253
- * text bounding box. The values are calculated and stored in __lineWidths cache.
21254
- * @private
21255
- * @param {Number} lineIndex line number
21256
- * @return {Number} Line width
21685
+ /**
21686
+ * Measure a single line given its index. Used to calculate the initial
21687
+ * text bounding box. The values are calculated and stored in __lineWidths cache.
21688
+ * @private
21689
+ * @param {Number} lineIndex line number
21690
+ * @return {Number} Line width
21257
21691
  */
21258
21692
  getLineWidth(lineIndex) {
21259
21693
  if (this.__lineWidths[lineIndex] !== undefined) {
@@ -21272,12 +21706,12 @@ class FabricText extends StyledText {
21272
21706
  return 0;
21273
21707
  }
21274
21708
 
21275
- /**
21276
- * Retrieves the value of property at given character position
21277
- * @param {Number} lineIndex the line number
21278
- * @param {Number} charIndex the character number
21279
- * @param {String} property the property name
21280
- * @returns the value of 'property'
21709
+ /**
21710
+ * Retrieves the value of property at given character position
21711
+ * @param {Number} lineIndex the line number
21712
+ * @param {Number} charIndex the character number
21713
+ * @param {String} property the property name
21714
+ * @returns the value of 'property'
21281
21715
  */
21282
21716
  getValueOfPropertyAt(lineIndex, charIndex, property) {
21283
21717
  var _charStyle$property;
@@ -21285,9 +21719,9 @@ class FabricText extends StyledText {
21285
21719
  return (_charStyle$property = charStyle[property]) !== null && _charStyle$property !== void 0 ? _charStyle$property : this[property];
21286
21720
  }
21287
21721
 
21288
- /**
21289
- * @private
21290
- * @param {CanvasRenderingContext2D} ctx Context to render on
21722
+ /**
21723
+ * @private
21724
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21291
21725
  */
21292
21726
  _renderTextDecoration(ctx, type) {
21293
21727
  if (!this[type] && !this.styleHas(type)) {
@@ -21371,10 +21805,10 @@ class FabricText extends StyledText {
21371
21805
  this._removeShadow(ctx);
21372
21806
  }
21373
21807
 
21374
- /**
21375
- * return font declaration string for canvas context
21376
- * @param {Object} [styleObject] object
21377
- * @returns {String} font declaration formatted for canvas context.
21808
+ /**
21809
+ * return font declaration string for canvas context
21810
+ * @param {Object} [styleObject] object
21811
+ * @returns {String} font declaration formatted for canvas context.
21378
21812
  */
21379
21813
  _getFontDeclaration() {
21380
21814
  let {
@@ -21388,9 +21822,9 @@ class FabricText extends StyledText {
21388
21822
  return [fontStyle, fontWeight, `${forMeasuring ? this.CACHE_FONT_SIZE : fontSize}px`, parsedFontFamily].join(' ');
21389
21823
  }
21390
21824
 
21391
- /**
21392
- * Renders text instance on a specified context
21393
- * @param {CanvasRenderingContext2D} ctx Context to render on
21825
+ /**
21826
+ * Renders text instance on a specified context
21827
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21394
21828
  */
21395
21829
  render(ctx) {
21396
21830
  if (!this.visible) {
@@ -21405,22 +21839,22 @@ class FabricText extends StyledText {
21405
21839
  super.render(ctx);
21406
21840
  }
21407
21841
 
21408
- /**
21409
- * Override this method to customize grapheme splitting
21410
- * @todo the util `graphemeSplit` needs to be injectable in some way.
21411
- * is more comfortable to inject the correct util rather than having to override text
21412
- * in the middle of the prototype chain
21413
- * @param {string} value
21414
- * @returns {string[]} array of graphemes
21842
+ /**
21843
+ * Override this method to customize grapheme splitting
21844
+ * @todo the util `graphemeSplit` needs to be injectable in some way.
21845
+ * is more comfortable to inject the correct util rather than having to override text
21846
+ * in the middle of the prototype chain
21847
+ * @param {string} value
21848
+ * @returns {string[]} array of graphemes
21415
21849
  */
21416
21850
  graphemeSplit(value) {
21417
21851
  return graphemeSplit(value);
21418
21852
  }
21419
21853
 
21420
- /**
21421
- * Returns the text as an array of lines.
21422
- * @param {String} text text to split
21423
- * @returns Lines in the text
21854
+ /**
21855
+ * Returns the text as an array of lines.
21856
+ * @param {String} text text to split
21857
+ * @returns Lines in the text
21424
21858
  */
21425
21859
  _splitTextIntoLines(text) {
21426
21860
  const lines = text.split(this._reNewline),
@@ -21440,10 +21874,10 @@ class FabricText extends StyledText {
21440
21874
  };
21441
21875
  }
21442
21876
 
21443
- /**
21444
- * Returns object representation of an instance
21445
- * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
21446
- * @return {Object} Object representation of an instance
21877
+ /**
21878
+ * Returns object representation of an instance
21879
+ * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
21880
+ * @return {Object} Object representation of an instance
21447
21881
  */
21448
21882
  toObject() {
21449
21883
  let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
@@ -21486,23 +21920,23 @@ class FabricText extends StyledText {
21486
21920
  return this;
21487
21921
  }
21488
21922
 
21489
- /**
21490
- * Returns complexity of an instance
21491
- * @return {Number} complexity
21923
+ /**
21924
+ * Returns complexity of an instance
21925
+ * @return {Number} complexity
21492
21926
  */
21493
21927
  complexity() {
21494
21928
  return 1;
21495
21929
  }
21496
21930
 
21497
- /**
21498
- * List of generic font families
21499
- * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
21931
+ /**
21932
+ * List of generic font families
21933
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
21500
21934
  */
21501
-
21502
- /**
21503
- * Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
21504
- * @param {HTMLElement} element Element to parse
21505
- * @param {Object} [options] Options object
21935
+
21936
+ /**
21937
+ * Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
21938
+ * @param {HTMLElement} element Element to parse
21939
+ * @param {Object} [options] Options object
21506
21940
  */
21507
21941
  static async fromElement(element, options, cssRules) {
21508
21942
  const parsedAttributes = parseAttributes(element, FabricText.ATTRIBUTE_NAMES, cssRules);
@@ -21541,10 +21975,10 @@ class FabricText extends StyledText {
21541
21975
  scaledDiff = lineHeightDiff * textHeightScaleFactor,
21542
21976
  textHeight = text.getScaledHeight() + scaledDiff;
21543
21977
  let offX = 0;
21544
- /*
21545
- Adjust positioning:
21546
- x/y attributes in SVG correspond to the bottom-left corner of text bounding box
21547
- fabric output by default at top, left.
21978
+ /*
21979
+ Adjust positioning:
21980
+ x/y attributes in SVG correspond to the bottom-left corner of text bounding box
21981
+ fabric output by default at top, left.
21548
21982
  */
21549
21983
  if (textAnchor === CENTER) {
21550
21984
  offX = text.getScaledWidth() / 2;
@@ -21562,10 +21996,10 @@ class FabricText extends StyledText {
21562
21996
 
21563
21997
  /* _FROM_SVG_END_ */
21564
21998
 
21565
- /**
21566
- * Returns FabricText instance from an object representation
21567
- * @param {Object} object plain js Object to create an instance from
21568
- * @returns {Promise<FabricText>}
21999
+ /**
22000
+ * Returns FabricText instance from an object representation
22001
+ * @param {Object} object plain js Object to create an instance from
22002
+ * @returns {Promise<FabricText>}
21569
22003
  */
21570
22004
  static fromObject(object) {
21571
22005
  return this._fromObject({
@@ -21576,10 +22010,10 @@ class FabricText extends StyledText {
21576
22010
  });
21577
22011
  }
21578
22012
  }
21579
- /**
21580
- * Properties that requires a text layout recalculation when changed
21581
- * @type string[]
21582
- * @protected
22013
+ /**
22014
+ * Properties that requires a text layout recalculation when changed
22015
+ * @type string[]
22016
+ * @protected
21583
22017
  */
21584
22018
  _defineProperty(FabricText, "textLayoutProperties", textLayoutProperties);
21585
22019
  _defineProperty(FabricText, "cacheProperties", [...cacheProperties, ...additionalProps]);
@@ -21587,9 +22021,9 @@ _defineProperty(FabricText, "ownDefaults", textDefaultValues);
21587
22021
  _defineProperty(FabricText, "type", 'Text');
21588
22022
  _defineProperty(FabricText, "genericFonts", ['serif', 'sans-serif', 'monospace', 'cursive', 'fantasy', 'system-ui', 'ui-serif', 'ui-sans-serif', 'ui-monospace', 'ui-rounded', 'math', 'emoji', 'fangsong']);
21589
22023
  /* _FROM_SVG_START_ */
21590
- /**
21591
- * List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
21592
- * @see: http://www.w3.org/TR/SVG/text.html#TextElement
22024
+ /**
22025
+ * List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
22026
+ * @see: http://www.w3.org/TR/SVG/text.html#TextElement
21593
22027
  */
21594
22028
  _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'));
21595
22029
  applyMixins(FabricText, [TextSVGExportMixin]);
@@ -21976,8 +22410,8 @@ class OverlayEditor {
21976
22410
  // We don't need to save/restore them here as it would conflict with IText's restoration
21977
22411
  }
21978
22412
 
21979
- /**
21980
- * Get the container element for the overlay (parent of upperCanvasEl)
22413
+ /**
22414
+ * Get the container element for the overlay (parent of upperCanvasEl)
21981
22415
  */
21982
22416
  getCanvasContainer() {
21983
22417
  const upperCanvas = this.canvas.upperCanvasEl;
@@ -21991,8 +22425,8 @@ class OverlayEditor {
21991
22425
  return container;
21992
22426
  }
21993
22427
 
21994
- /**
21995
- * Create the overlay DOM structure
22428
+ /**
22429
+ * Create the overlay DOM structure
21996
22430
  */
21997
22431
  createOverlayDOM() {
21998
22432
  // Host div for positioning and overflow control
@@ -22047,8 +22481,8 @@ class OverlayEditor {
22047
22481
  document.body.appendChild(this.hostDiv);
22048
22482
  }
22049
22483
 
22050
- /**
22051
- * Attach all event listeners
22484
+ /**
22485
+ * Attach all event listeners
22052
22486
  */
22053
22487
  attachEventListeners() {
22054
22488
  // Textarea events
@@ -22068,8 +22502,8 @@ class OverlayEditor {
22068
22502
  this.setupViewportChangeDetection();
22069
22503
  }
22070
22504
 
22071
- /**
22072
- * Remove all event listeners
22505
+ /**
22506
+ * Remove all event listeners
22073
22507
  */
22074
22508
  removeEventListeners() {
22075
22509
  this.textarea.removeEventListener('input', this.boundHandlers.onInput);
@@ -22086,16 +22520,16 @@ class OverlayEditor {
22086
22520
  this.restoreViewportChangeDetection();
22087
22521
  }
22088
22522
 
22089
- /**
22090
- * Simple method to refresh positioning when canvas changes
22523
+ /**
22524
+ * Simple method to refresh positioning when canvas changes
22091
22525
  */
22092
22526
  updatePosition() {
22093
22527
  this.applyOverlayStyle();
22094
22528
  }
22095
22529
 
22096
- /**
22097
- * Update the Fabric object bounds to match current textarea size
22098
- * This ensures Fabric.js selection controls follow the growing textbox
22530
+ /**
22531
+ * Update the Fabric object bounds to match current textarea size
22532
+ * This ensures Fabric.js selection controls follow the growing textbox
22099
22533
  */
22100
22534
  updateObjectBounds() {
22101
22535
  if (this.isDestroyed) return;
@@ -22129,15 +22563,15 @@ class OverlayEditor {
22129
22563
  }
22130
22564
  }
22131
22565
 
22132
- /**
22133
- * Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
22566
+ /**
22567
+ * Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
22134
22568
  */
22135
22569
  letterSpacingPx(charSpacing, fontSize) {
22136
22570
  return charSpacing / 1000 * fontSize;
22137
22571
  }
22138
22572
 
22139
- /**
22140
- * Detect text direction using first strong directional character
22573
+ /**
22574
+ * Detect text direction using first strong directional character
22141
22575
  */
22142
22576
  firstStrongDir(text) {
22143
22577
  // Hebrew: \u0590-\u05FF, Arabic: \u0600-\u06FF, \u0750-\u077F, \uFB50-\uFDFF, \uFE70-\uFEFF
@@ -22367,8 +22801,8 @@ class OverlayEditor {
22367
22801
  // Initial bounds are set correctly by Fabric.js - don't force update here
22368
22802
  }
22369
22803
 
22370
- /**
22371
- * Debug method to compare textarea and canvas object bounding boxes
22804
+ /**
22805
+ * Debug method to compare textarea and canvas object bounding boxes
22372
22806
  */
22373
22807
  debugBoundingBoxComparison() {
22374
22808
  const target = this.target;
@@ -22438,8 +22872,8 @@ class OverlayEditor {
22438
22872
  console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
22439
22873
  }
22440
22874
 
22441
- /**
22442
- * Debug method to compare text wrapping between textarea and Fabric text object
22875
+ /**
22876
+ * Debug method to compare text wrapping between textarea and Fabric text object
22443
22877
  */
22444
22878
  debugTextWrapping() {
22445
22879
  const target = this.target;
@@ -22524,8 +22958,8 @@ class OverlayEditor {
22524
22958
  console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
22525
22959
  }
22526
22960
 
22527
- /**
22528
- * Focus the textarea and position cursor at end
22961
+ /**
22962
+ * Focus the textarea and position cursor at end
22529
22963
  */
22530
22964
  focusTextarea() {
22531
22965
  // For overlay editing, we want to keep the object in "selection mode" not "editing mode"
@@ -22560,8 +22994,8 @@ class OverlayEditor {
22560
22994
  this.canvas.requestRenderAll();
22561
22995
  }
22562
22996
 
22563
- /**
22564
- * Refresh overlay positioning and styling
22997
+ /**
22998
+ * Refresh overlay positioning and styling
22565
22999
  */
22566
23000
  refresh() {
22567
23001
  if (this.isDestroyed) return;
@@ -22569,8 +23003,8 @@ class OverlayEditor {
22569
23003
  // Don't update object bounds on every refresh - only when textarea actually resizes
22570
23004
  }
22571
23005
 
22572
- /**
22573
- * Destroy the overlay editor
23006
+ /**
23007
+ * Destroy the overlay editor
22574
23008
  */
22575
23009
  destroy() {
22576
23010
  let commit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
@@ -22738,8 +23172,8 @@ class OverlayEditor {
22738
23172
  }
22739
23173
  }
22740
23174
 
22741
- /**
22742
- * Setup detection for viewport changes (zoom/pan)
23175
+ /**
23176
+ * Setup detection for viewport changes (zoom/pan)
22743
23177
  */
22744
23178
  setupViewportChangeDetection() {
22745
23179
  // Store original methods
@@ -22768,8 +23202,8 @@ class OverlayEditor {
22768
23202
  };
22769
23203
  }
22770
23204
 
22771
- /**
22772
- * Restore original viewport methods
23205
+ /**
23206
+ * Restore original viewport methods
22773
23207
  */
22774
23208
  restoreViewportChangeDetection() {
22775
23209
  if (this.canvas.__originalSetZoom) {
@@ -22784,8 +23218,8 @@ class OverlayEditor {
22784
23218
  }
22785
23219
  }
22786
23220
 
22787
- /**
22788
- * Enter overlay text editing mode for a text object
23221
+ /**
23222
+ * Enter overlay text editing mode for a text object
22789
23223
  */
22790
23224
  function enterTextOverlayEdit(canvas, target, options) {
22791
23225
  // If already in overlay editing, destroy existing editor first
@@ -22809,35 +23243,35 @@ function enterTextOverlayEdit(canvas, target, options) {
22809
23243
  return editor;
22810
23244
  }
22811
23245
 
22812
- /**
22813
- * extend this regex to support non english languages
22814
- *
22815
- * - ` ` Matches a SPACE character (char code 32).
22816
- * - `\n` Matches a LINE FEED character (char code 10).
22817
- * - `.` Matches a "." character (char code 46).
22818
- * - `,` Matches a "," character (char code 44).
22819
- * - `;` Matches a ";" character (char code 59).
22820
- * - `!` Matches a "!" character (char code 33).
22821
- * - `\?` Matches a "?" character (char code 63).
22822
- * - `\-` Matches a "-" character (char code 45).
23246
+ /**
23247
+ * extend this regex to support non english languages
23248
+ *
23249
+ * - ` ` Matches a SPACE character (char code 32).
23250
+ * - `\n` Matches a LINE FEED character (char code 10).
23251
+ * - `.` Matches a "." character (char code 46).
23252
+ * - `,` Matches a "," character (char code 44).
23253
+ * - `;` Matches a ";" character (char code 59).
23254
+ * - `!` Matches a "!" character (char code 33).
23255
+ * - `\?` Matches a "?" character (char code 63).
23256
+ * - `\-` Matches a "-" character (char code 45).
22823
23257
  */
22824
23258
  // eslint-disable-next-line no-useless-escape
22825
23259
  const reNonWord = /[ \n\.,;!\?\-]/;
22826
23260
  class ITextBehavior extends FabricText {
22827
23261
  constructor() {
22828
23262
  super(...arguments);
22829
- /**
22830
- * Helps determining when the text is in composition, so that the cursor
22831
- * rendering is altered.
23263
+ /**
23264
+ * Helps determining when the text is in composition, so that the cursor
23265
+ * rendering is altered.
22832
23266
  */
22833
23267
  _defineProperty(this, "_currentCursorOpacity", 1);
22834
23268
  }
22835
- /**
22836
- * Keeps track if the IText object was selected before the actual click.
22837
- * This because we want to delay enter editing by a click.
23269
+ /**
23270
+ * Keeps track if the IText object was selected before the actual click.
23271
+ * This because we want to delay enter editing by a click.
22838
23272
  */
22839
- /**
22840
- * Initializes all the interactive behavior of IText
23273
+ /**
23274
+ * Initializes all the interactive behavior of IText
22841
23275
  */
22842
23276
  initBehavior() {
22843
23277
  this._tick = this._tick.bind(this);
@@ -22850,8 +23284,8 @@ class ITextBehavior extends FabricText {
22850
23284
  return super.onDeselect(options);
22851
23285
  }
22852
23286
 
22853
- /**
22854
- * @private
23287
+ /**
23288
+ * @private
22855
23289
  */
22856
23290
  _animateCursor(_ref) {
22857
23291
  let {
@@ -22876,8 +23310,8 @@ class ITextBehavior extends FabricText {
22876
23310
  });
22877
23311
  }
22878
23312
 
22879
- /**
22880
- * changes the cursor from visible to invisible
23313
+ /**
23314
+ * changes the cursor from visible to invisible
22881
23315
  */
22882
23316
  _tick(delay) {
22883
23317
  this._currentTickState = this._animateCursor({
@@ -22888,8 +23322,8 @@ class ITextBehavior extends FabricText {
22888
23322
  });
22889
23323
  }
22890
23324
 
22891
- /**
22892
- * Changes the cursor from invisible to visible
23325
+ /**
23326
+ * Changes the cursor from invisible to visible
22893
23327
  */
22894
23328
  _onTickComplete() {
22895
23329
  var _this$_currentTickCom;
@@ -22901,16 +23335,16 @@ class ITextBehavior extends FabricText {
22901
23335
  });
22902
23336
  }
22903
23337
 
22904
- /**
22905
- * Initializes delayed cursor
23338
+ /**
23339
+ * Initializes delayed cursor
22906
23340
  */
22907
23341
  initDelayedCursor(restart) {
22908
23342
  this.abortCursorAnimation();
22909
23343
  this._tick(restart ? 0 : this.cursorDelay);
22910
23344
  }
22911
23345
 
22912
- /**
22913
- * Aborts cursor animation, clears all timeouts and clear textarea context if necessary
23346
+ /**
23347
+ * Aborts cursor animation, clears all timeouts and clear textarea context if necessary
22914
23348
  */
22915
23349
  abortCursorAnimation() {
22916
23350
  let shouldClear = false;
@@ -22928,9 +23362,9 @@ class ITextBehavior extends FabricText {
22928
23362
  }
22929
23363
  }
22930
23364
 
22931
- /**
22932
- * Restart tue cursor animation if either is in complete state ( between animations )
22933
- * or if it never started before
23365
+ /**
23366
+ * Restart tue cursor animation if either is in complete state ( between animations )
23367
+ * or if it never started before
22934
23368
  */
22935
23369
  restartCursorIfNeeded() {
22936
23370
  if ([this._currentTickState, this._currentTickCompleteState].some(cursorAnimation => !cursorAnimation || cursorAnimation.isDone())) {
@@ -22938,8 +23372,8 @@ class ITextBehavior extends FabricText {
22938
23372
  }
22939
23373
  }
22940
23374
 
22941
- /**
22942
- * Selects entire text
23375
+ /**
23376
+ * Selects entire text
22943
23377
  */
22944
23378
  selectAll() {
22945
23379
  this.selectionStart = 0;
@@ -22949,26 +23383,26 @@ class ITextBehavior extends FabricText {
22949
23383
  return this;
22950
23384
  }
22951
23385
 
22952
- /**
22953
- * Selects entire text and updates the visual state
23386
+ /**
23387
+ * Selects entire text and updates the visual state
22954
23388
  */
22955
23389
  cmdAll() {
22956
23390
  this.selectAll();
22957
23391
  this.renderCursorOrSelection();
22958
23392
  }
22959
23393
 
22960
- /**
22961
- * Returns selected text
22962
- * @return {String}
23394
+ /**
23395
+ * Returns selected text
23396
+ * @return {String}
22963
23397
  */
22964
23398
  getSelectedText() {
22965
23399
  return this._text.slice(this.selectionStart, this.selectionEnd).join('');
22966
23400
  }
22967
23401
 
22968
- /**
22969
- * Find new selection index representing start of current word according to current selection index
22970
- * @param {Number} startFrom Current selection index
22971
- * @return {Number} New selection index
23402
+ /**
23403
+ * Find new selection index representing start of current word according to current selection index
23404
+ * @param {Number} startFrom Current selection index
23405
+ * @return {Number} New selection index
22972
23406
  */
22973
23407
  findWordBoundaryLeft(startFrom) {
22974
23408
  let offset = 0,
@@ -22988,10 +23422,10 @@ class ITextBehavior extends FabricText {
22988
23422
  return startFrom - offset;
22989
23423
  }
22990
23424
 
22991
- /**
22992
- * Find new selection index representing end of current word according to current selection index
22993
- * @param {Number} startFrom Current selection index
22994
- * @return {Number} New selection index
23425
+ /**
23426
+ * Find new selection index representing end of current word according to current selection index
23427
+ * @param {Number} startFrom Current selection index
23428
+ * @return {Number} New selection index
22995
23429
  */
22996
23430
  findWordBoundaryRight(startFrom) {
22997
23431
  let offset = 0,
@@ -23011,10 +23445,10 @@ class ITextBehavior extends FabricText {
23011
23445
  return startFrom + offset;
23012
23446
  }
23013
23447
 
23014
- /**
23015
- * Find new selection index representing start of current line according to current selection index
23016
- * @param {Number} startFrom Current selection index
23017
- * @return {Number} New selection index
23448
+ /**
23449
+ * Find new selection index representing start of current line according to current selection index
23450
+ * @param {Number} startFrom Current selection index
23451
+ * @return {Number} New selection index
23018
23452
  */
23019
23453
  findLineBoundaryLeft(startFrom) {
23020
23454
  let offset = 0,
@@ -23026,10 +23460,10 @@ class ITextBehavior extends FabricText {
23026
23460
  return startFrom - offset;
23027
23461
  }
23028
23462
 
23029
- /**
23030
- * Find new selection index representing end of current line according to current selection index
23031
- * @param {Number} startFrom Current selection index
23032
- * @return {Number} New selection index
23463
+ /**
23464
+ * Find new selection index representing end of current line according to current selection index
23465
+ * @param {Number} startFrom Current selection index
23466
+ * @return {Number} New selection index
23033
23467
  */
23034
23468
  findLineBoundaryRight(startFrom) {
23035
23469
  let offset = 0,
@@ -23041,11 +23475,11 @@ class ITextBehavior extends FabricText {
23041
23475
  return startFrom + offset;
23042
23476
  }
23043
23477
 
23044
- /**
23045
- * Finds index corresponding to beginning or end of a word
23046
- * @param {Number} selectionStart Index of a character
23047
- * @param {Number} direction 1 or -1
23048
- * @return {Number} Index of the beginning or end of a word
23478
+ /**
23479
+ * Finds index corresponding to beginning or end of a word
23480
+ * @param {Number} selectionStart Index of a character
23481
+ * @param {Number} direction 1 or -1
23482
+ * @return {Number} Index of the beginning or end of a word
23049
23483
  */
23050
23484
  searchWordBoundary(selectionStart, direction) {
23051
23485
  const text = this._text;
@@ -23063,9 +23497,9 @@ class ITextBehavior extends FabricText {
23063
23497
  return index;
23064
23498
  }
23065
23499
 
23066
- /**
23067
- * Selects the word that contains the char at index selectionStart
23068
- * @param {Number} selectionStart Index of a character
23500
+ /**
23501
+ * Selects the word that contains the char at index selectionStart
23502
+ * @param {Number} selectionStart Index of a character
23069
23503
  */
23070
23504
  selectWord(selectionStart) {
23071
23505
  selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
@@ -23081,9 +23515,9 @@ class ITextBehavior extends FabricText {
23081
23515
  this.renderCursorOrSelection();
23082
23516
  }
23083
23517
 
23084
- /**
23085
- * Selects the line that contains selectionStart
23086
- * @param {Number} selectionStart Index of a character
23518
+ /**
23519
+ * Selects the line that contains selectionStart
23520
+ * @param {Number} selectionStart Index of a character
23087
23521
  */
23088
23522
  selectLine(selectionStart) {
23089
23523
  selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
@@ -23095,8 +23529,8 @@ class ITextBehavior extends FabricText {
23095
23529
  this._updateTextarea();
23096
23530
  }
23097
23531
 
23098
- /**
23099
- * Enters editing state
23532
+ /**
23533
+ * Enters editing state
23100
23534
  */
23101
23535
  enterEditing(e) {
23102
23536
  if (this.isEditing || !this.editable) {
@@ -23116,8 +23550,8 @@ class ITextBehavior extends FabricText {
23116
23550
  }
23117
23551
  }
23118
23552
 
23119
- /**
23120
- * runs the actual logic that enter from editing state, see {@link enterEditing}
23553
+ /**
23554
+ * runs the actual logic that enter from editing state, see {@link enterEditing}
23121
23555
  */
23122
23556
  enterEditingImpl() {
23123
23557
  if (this.canvas) {
@@ -23141,8 +23575,8 @@ class ITextBehavior extends FabricText {
23141
23575
  }
23142
23576
  }
23143
23577
 
23144
- /**
23145
- * Enter overlay editing mode using DOM textarea overlay
23578
+ /**
23579
+ * Enter overlay editing mode using DOM textarea overlay
23146
23580
  */
23147
23581
  enterOverlayEditing() {
23148
23582
  this._saveEditingProps();
@@ -23163,8 +23597,8 @@ class ITextBehavior extends FabricText {
23163
23597
  });
23164
23598
  }
23165
23599
 
23166
- /**
23167
- * Commit overlay editing changes
23600
+ /**
23601
+ * Commit overlay editing changes
23168
23602
  */
23169
23603
  commitOverlayEdit(text) {
23170
23604
  const overlayEditor = this.__overlayEditor;
@@ -23188,8 +23622,8 @@ class ITextBehavior extends FabricText {
23188
23622
  this.canvas && this.canvas.requestRenderAll();
23189
23623
  }
23190
23624
 
23191
- /**
23192
- * Cancel overlay editing without changes
23625
+ /**
23626
+ * Cancel overlay editing without changes
23193
23627
  */
23194
23628
  cancelOverlayEdit() {
23195
23629
  // Restore original text
@@ -23197,8 +23631,8 @@ class ITextBehavior extends FabricText {
23197
23631
  this.exitEditing();
23198
23632
  }
23199
23633
 
23200
- /**
23201
- * called by {@link Canvas#textEditingManager}
23634
+ /**
23635
+ * called by {@link Canvas#textEditingManager}
23202
23636
  */
23203
23637
  updateSelectionOnMouseMove(e) {
23204
23638
  if (this.getActiveControl()) {
@@ -23226,8 +23660,8 @@ class ITextBehavior extends FabricText {
23226
23660
  }
23227
23661
  }
23228
23662
 
23229
- /**
23230
- * @private
23663
+ /**
23664
+ * @private
23231
23665
  */
23232
23666
  _setEditingProps() {
23233
23667
  this.hoverCursor = 'text';
@@ -23239,8 +23673,8 @@ class ITextBehavior extends FabricText {
23239
23673
  this.lockMovementX = this.lockMovementY = true;
23240
23674
  }
23241
23675
 
23242
- /**
23243
- * convert from textarea to grapheme indexes
23676
+ /**
23677
+ * convert from textarea to grapheme indexes
23244
23678
  */
23245
23679
  fromStringToGraphemeSelection(start, end, text) {
23246
23680
  const smallerTextStart = text.slice(0, start),
@@ -23259,8 +23693,8 @@ class ITextBehavior extends FabricText {
23259
23693
  };
23260
23694
  }
23261
23695
 
23262
- /**
23263
- * convert from fabric to textarea values
23696
+ /**
23697
+ * convert from fabric to textarea values
23264
23698
  */
23265
23699
  fromGraphemeToStringSelection(start, end, graphemes) {
23266
23700
  const smallerTextStart = graphemes.slice(0, start),
@@ -23279,8 +23713,8 @@ class ITextBehavior extends FabricText {
23279
23713
  };
23280
23714
  }
23281
23715
 
23282
- /**
23283
- * @private
23716
+ /**
23717
+ * @private
23284
23718
  */
23285
23719
  _updateTextarea() {
23286
23720
  this.cursorOffsetCache = {};
@@ -23295,8 +23729,8 @@ class ITextBehavior extends FabricText {
23295
23729
  this.updateTextareaPosition();
23296
23730
  }
23297
23731
 
23298
- /**
23299
- * @private
23732
+ /**
23733
+ * @private
23300
23734
  */
23301
23735
  updateFromTextArea() {
23302
23736
  if (!this.hiddenTextarea) {
@@ -23316,8 +23750,8 @@ class ITextBehavior extends FabricText {
23316
23750
  this.updateTextareaPosition();
23317
23751
  }
23318
23752
 
23319
- /**
23320
- * @private
23753
+ /**
23754
+ * @private
23321
23755
  */
23322
23756
  updateTextareaPosition() {
23323
23757
  if (this.selectionStart === this.selectionEnd) {
@@ -23327,9 +23761,9 @@ class ITextBehavior extends FabricText {
23327
23761
  }
23328
23762
  }
23329
23763
 
23330
- /**
23331
- * @private
23332
- * @return {Object} style contains style for hiddenTextarea
23764
+ /**
23765
+ * @private
23766
+ * @return {Object} style contains style for hiddenTextarea
23333
23767
  */
23334
23768
  _calcTextareaPosition() {
23335
23769
  if (!this.canvas) {
@@ -23376,8 +23810,8 @@ class ITextBehavior extends FabricText {
23376
23810
  };
23377
23811
  }
23378
23812
 
23379
- /**
23380
- * @private
23813
+ /**
23814
+ * @private
23381
23815
  */
23382
23816
  _saveEditingProps() {
23383
23817
  this._savedProps = {
@@ -23394,8 +23828,8 @@ class ITextBehavior extends FabricText {
23394
23828
  };
23395
23829
  }
23396
23830
 
23397
- /**
23398
- * @private
23831
+ /**
23832
+ * @private
23399
23833
  */
23400
23834
  _restoreEditingProps() {
23401
23835
  if (!this._savedProps) {
@@ -23415,9 +23849,9 @@ class ITextBehavior extends FabricText {
23415
23849
  delete this._savedProps;
23416
23850
  }
23417
23851
 
23418
- /**
23419
- * runs the actual logic that exits from editing state, see {@link exitEditing}
23420
- * But it does not fire events
23852
+ /**
23853
+ * runs the actual logic that exits from editing state, see {@link exitEditing}
23854
+ * But it does not fire events
23421
23855
  */
23422
23856
  exitEditingImpl() {
23423
23857
  const hiddenTextarea = this.hiddenTextarea;
@@ -23438,8 +23872,8 @@ class ITextBehavior extends FabricText {
23438
23872
  }
23439
23873
  }
23440
23874
 
23441
- /**
23442
- * Exits from editing state and fires relevant events
23875
+ /**
23876
+ * Exits from editing state and fires relevant events
23443
23877
  */
23444
23878
  exitEditing() {
23445
23879
  const isTextChanged = this._textBeforeEdit !== this.text;
@@ -23458,8 +23892,8 @@ class ITextBehavior extends FabricText {
23458
23892
  return this;
23459
23893
  }
23460
23894
 
23461
- /**
23462
- * @private
23895
+ /**
23896
+ * @private
23463
23897
  */
23464
23898
  _removeExtraneousStyles() {
23465
23899
  for (const prop in this.styles) {
@@ -23469,10 +23903,10 @@ class ITextBehavior extends FabricText {
23469
23903
  }
23470
23904
  }
23471
23905
 
23472
- /**
23473
- * remove and reflow a style block from start to end.
23474
- * @param {Number} start linear start position for removal (included in removal)
23475
- * @param {Number} end linear end position for removal ( excluded from removal )
23906
+ /**
23907
+ * remove and reflow a style block from start to end.
23908
+ * @param {Number} start linear start position for removal (included in removal)
23909
+ * @param {Number} end linear end position for removal ( excluded from removal )
23476
23910
  */
23477
23911
  removeStyleFromTo(start, end) {
23478
23912
  const {
@@ -23525,10 +23959,10 @@ class ITextBehavior extends FabricText {
23525
23959
  }
23526
23960
  }
23527
23961
 
23528
- /**
23529
- * Shifts line styles up or down
23530
- * @param {Number} lineIndex Index of a line
23531
- * @param {Number} offset Can any number?
23962
+ /**
23963
+ * Shifts line styles up or down
23964
+ * @param {Number} lineIndex Index of a line
23965
+ * @param {Number} offset Can any number?
23532
23966
  */
23533
23967
  shiftLineStyles(lineIndex, offset) {
23534
23968
  const clonedStyles = Object.assign({}, this.styles);
@@ -23543,15 +23977,15 @@ class ITextBehavior extends FabricText {
23543
23977
  }
23544
23978
  }
23545
23979
 
23546
- /**
23547
- * Handle insertion of more consecutive style lines for when one or more
23548
- * newlines gets added to the text. Since current style needs to be shifted
23549
- * first we shift the current style of the number lines needed, then we add
23550
- * new lines from the last to the first.
23551
- * @param {Number} lineIndex Index of a line
23552
- * @param {Number} charIndex Index of a char
23553
- * @param {Number} qty number of lines to add
23554
- * @param {Array} copiedStyle Array of objects styles
23980
+ /**
23981
+ * Handle insertion of more consecutive style lines for when one or more
23982
+ * newlines gets added to the text. Since current style needs to be shifted
23983
+ * first we shift the current style of the number lines needed, then we add
23984
+ * new lines from the last to the first.
23985
+ * @param {Number} lineIndex Index of a line
23986
+ * @param {Number} charIndex Index of a char
23987
+ * @param {Number} qty number of lines to add
23988
+ * @param {Array} copiedStyle Array of objects styles
23555
23989
  */
23556
23990
  insertNewlineStyleObject(lineIndex, charIndex, qty, copiedStyle) {
23557
23991
  const newLineStyles = {};
@@ -23611,12 +24045,12 @@ class ITextBehavior extends FabricText {
23611
24045
  this._forceClearCache = true;
23612
24046
  }
23613
24047
 
23614
- /**
23615
- * Inserts style object for a given line/char index
23616
- * @param {Number} lineIndex Index of a line
23617
- * @param {Number} charIndex Index of a char
23618
- * @param {Number} quantity number Style object to insert, if given
23619
- * @param {Array} copiedStyle array of style objects
24048
+ /**
24049
+ * Inserts style object for a given line/char index
24050
+ * @param {Number} lineIndex Index of a line
24051
+ * @param {Number} charIndex Index of a char
24052
+ * @param {Number} quantity number Style object to insert, if given
24053
+ * @param {Array} copiedStyle array of style objects
23620
24054
  */
23621
24055
  insertCharStyleObject(lineIndex, charIndex, quantity, copiedStyle) {
23622
24056
  if (!this.styles) {
@@ -23665,11 +24099,11 @@ class ITextBehavior extends FabricText {
23665
24099
  }
23666
24100
  }
23667
24101
 
23668
- /**
23669
- * Inserts style object(s)
23670
- * @param {Array} insertedText Characters at the location where style is inserted
23671
- * @param {Number} start cursor index for inserting style
23672
- * @param {Array} [copiedStyle] array of style objects to insert.
24102
+ /**
24103
+ * Inserts style object(s)
24104
+ * @param {Array} insertedText Characters at the location where style is inserted
24105
+ * @param {Number} start cursor index for inserting style
24106
+ * @param {Array} [copiedStyle] array of style objects to insert.
23673
24107
  */
23674
24108
  insertNewStyleBlock(insertedText, start, copiedStyle) {
23675
24109
  const cursorLoc = this.get2DCursorLocation(start, true),
@@ -23710,12 +24144,12 @@ class ITextBehavior extends FabricText {
23710
24144
  }
23711
24145
  }
23712
24146
 
23713
- /**
23714
- * Removes characters from start/end
23715
- * start/end ar per grapheme position in _text array.
23716
- *
23717
- * @param {Number} start
23718
- * @param {Number} end default to start + 1
24147
+ /**
24148
+ * Removes characters from start/end
24149
+ * start/end ar per grapheme position in _text array.
24150
+ *
24151
+ * @param {Number} start
24152
+ * @param {Number} end default to start + 1
23719
24153
  */
23720
24154
  removeChars(start) {
23721
24155
  let end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : start + 1;
@@ -23728,17 +24162,17 @@ class ITextBehavior extends FabricText {
23728
24162
  this._removeExtraneousStyles();
23729
24163
  }
23730
24164
 
23731
- /**
23732
- * insert characters at start position, before start position.
23733
- * start equal 1 it means the text get inserted between actual grapheme 0 and 1
23734
- * if style array is provided, it must be as the same length of text in graphemes
23735
- * if end is provided and is bigger than start, old text is replaced.
23736
- * start/end ar per grapheme position in _text array.
23737
- *
23738
- * @param {String} text text to insert
23739
- * @param {Array} style array of style objects
23740
- * @param {Number} start
23741
- * @param {Number} end default to start + 1
24165
+ /**
24166
+ * insert characters at start position, before start position.
24167
+ * start equal 1 it means the text get inserted between actual grapheme 0 and 1
24168
+ * if style array is provided, it must be as the same length of text in graphemes
24169
+ * if end is provided and is bigger than start, old text is replaced.
24170
+ * start/end ar per grapheme position in _text array.
24171
+ *
24172
+ * @param {String} text text to insert
24173
+ * @param {Array} style array of style objects
24174
+ * @param {Number} start
24175
+ * @param {Number} end default to start + 1
23742
24176
  */
23743
24177
  insertChars(text, style, start) {
23744
24178
  let end = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : start;
@@ -23755,9 +24189,9 @@ class ITextBehavior extends FabricText {
23755
24189
  this._removeExtraneousStyles();
23756
24190
  }
23757
24191
 
23758
- /**
23759
- * Set the selectionStart and selectionEnd according to the new position of cursor
23760
- * mimic the key - mouse navigation when shift is pressed.
24192
+ /**
24193
+ * Set the selectionStart and selectionEnd according to the new position of cursor
24194
+ * mimic the key - mouse navigation when shift is pressed.
23761
24195
  */
23762
24196
  setSelectionStartEndWithShift(start, end, newSelection) {
23763
24197
  if (newSelection <= start) {
@@ -24380,8 +24814,8 @@ class ITextKeyBehavior extends ITextBehavior {
24380
24814
  }
24381
24815
  }
24382
24816
 
24383
- /**
24384
- * `LEFT_CLICK === 0`
24817
+ /**
24818
+ * `LEFT_CLICK === 0`
24385
24819
  */
24386
24820
  const notALeftClick = e => !!e.button;
24387
24821
  class ITextClickBehavior extends ITextKeyBehavior {
@@ -24399,36 +24833,36 @@ class ITextClickBehavior extends ITextKeyBehavior {
24399
24833
  super.initBehavior();
24400
24834
  }
24401
24835
 
24402
- /**
24403
- * If this method returns true a mouse move operation over a text selection
24404
- * will not prevent the native mouse event allowing the browser to start a drag operation.
24405
- * shouldStartDragging can be read 'do not prevent default for mouse move event'
24406
- * To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
24407
- * @returns
24836
+ /**
24837
+ * If this method returns true a mouse move operation over a text selection
24838
+ * will not prevent the native mouse event allowing the browser to start a drag operation.
24839
+ * shouldStartDragging can be read 'do not prevent default for mouse move event'
24840
+ * To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
24841
+ * @returns
24408
24842
  */
24409
24843
  shouldStartDragging() {
24410
24844
  return this.draggableTextDelegate.isActive();
24411
24845
  }
24412
24846
 
24413
- /**
24414
- * @public override this method to control whether instance should/shouldn't become a drag source,
24415
- * @see also {@link DraggableTextDelegate#isActive}
24416
- * To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
24417
- * @returns {boolean} should handle event
24847
+ /**
24848
+ * @public override this method to control whether instance should/shouldn't become a drag source,
24849
+ * @see also {@link DraggableTextDelegate#isActive}
24850
+ * To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
24851
+ * @returns {boolean} should handle event
24418
24852
  */
24419
24853
  onDragStart(e) {
24420
24854
  return this.draggableTextDelegate.onDragStart(e);
24421
24855
  }
24422
24856
 
24423
- /**
24424
- * @public override this method to control whether instance should/shouldn't become a drop target
24857
+ /**
24858
+ * @public override this method to control whether instance should/shouldn't become a drop target
24425
24859
  */
24426
24860
  canDrop(e) {
24427
24861
  return this.draggableTextDelegate.canDrop(e);
24428
24862
  }
24429
24863
 
24430
- /**
24431
- * Default handler for double click, select a word or enter overlay editing
24864
+ /**
24865
+ * Default handler for double click, select a word or enter overlay editing
24432
24866
  */
24433
24867
  doubleClickHandler(options) {
24434
24868
  // Check if we should enter overlay editing mode
@@ -24445,8 +24879,8 @@ class ITextClickBehavior extends ITextKeyBehavior {
24445
24879
  this.renderCursorOrSelection();
24446
24880
  }
24447
24881
 
24448
- /**
24449
- * Default handler for triple click, select a line
24882
+ /**
24883
+ * Default handler for triple click, select a line
24450
24884
  */
24451
24885
  tripleClickHandler(options) {
24452
24886
  if (!this.isEditing) {
@@ -24456,13 +24890,13 @@ class ITextClickBehavior extends ITextKeyBehavior {
24456
24890
  this.renderCursorOrSelection();
24457
24891
  }
24458
24892
 
24459
- /**
24460
- * Default event handler for the basic functionalities needed on _mouseDown
24461
- * can be overridden to do something different.
24462
- * Scope of this implementation is: find the click position, set selectionStart
24463
- * find selectionEnd, initialize the drawing of either cursor or selection area
24464
- * initializing a mousedDown on a text area will cancel fabricjs knowledge of
24465
- * current compositionMode. It will be set to false.
24893
+ /**
24894
+ * Default event handler for the basic functionalities needed on _mouseDown
24895
+ * can be overridden to do something different.
24896
+ * Scope of this implementation is: find the click position, set selectionStart
24897
+ * find selectionEnd, initialize the drawing of either cursor or selection area
24898
+ * initializing a mousedDown on a text area will cancel fabricjs knowledge of
24899
+ * current compositionMode. It will be set to false.
24466
24900
  */
24467
24901
  _mouseDownHandler(_ref) {
24468
24902
  let {
@@ -24490,9 +24924,9 @@ class ITextClickBehavior extends ITextKeyBehavior {
24490
24924
  this.selected || (this.selected = alreadySelected || this.isEditing);
24491
24925
  }
24492
24926
 
24493
- /**
24494
- * standard handler for mouse up, overridable
24495
- * @private
24927
+ /**
24928
+ * standard handler for mouse up, overridable
24929
+ * @private
24496
24930
  */
24497
24931
  mouseUpHandler(_ref2) {
24498
24932
  let {
@@ -24523,9 +24957,9 @@ class ITextClickBehavior extends ITextKeyBehavior {
24523
24957
  }
24524
24958
  }
24525
24959
 
24526
- /**
24527
- * Changes cursor location in a text depending on passed pointer (x/y) object
24528
- * @param {TPointerEvent} e Event object
24960
+ /**
24961
+ * Changes cursor location in a text depending on passed pointer (x/y) object
24962
+ * @param {TPointerEvent} e Event object
24529
24963
  */
24530
24964
  setCursorByClick(e) {
24531
24965
  const newSelection = this.getSelectionStartFromPointer(e),
@@ -24543,10 +24977,10 @@ class ITextClickBehavior extends ITextKeyBehavior {
24543
24977
  }
24544
24978
  }
24545
24979
 
24546
- /**
24547
- * Returns index of a character corresponding to where an object was clicked
24548
- * @param {TPointerEvent} e Event object
24549
- * @return {Number} Index of a character
24980
+ /**
24981
+ * Returns index of a character corresponding to where an object was clicked
24982
+ * @param {TPointerEvent} e Event object
24983
+ * @return {Number} Index of a character
24550
24984
  */
24551
24985
  getSelectionStartFromPointer(e) {
24552
24986
  const mouseOffset = this.canvas.getScenePoint(e).transform(invertTransform(this.calcTransformMatrix())).add(new Point(-this._getLeftOffset(), -this._getTopOffset()));
@@ -24592,15 +25026,15 @@ class ITextClickBehavior extends ITextKeyBehavior {
24592
25026
  }
24593
25027
  }
24594
25028
 
24595
- /**
24596
- * Hit Testing and Cursor Positioning System
24597
- *
24598
- * Maps pointer coordinates to text positions and provides cursor rectangles
24599
- * for interactive text editing with grapheme-aware boundaries.
25029
+ /**
25030
+ * Hit Testing and Cursor Positioning System
25031
+ *
25032
+ * Maps pointer coordinates to text positions and provides cursor rectangles
25033
+ * for interactive text editing with grapheme-aware boundaries.
24600
25034
  */
24601
25035
 
24602
- /**
24603
- * Hit test a point against laid out text to find insertion position
25036
+ /**
25037
+ * Hit test a point against laid out text to find insertion position
24604
25038
  */
24605
25039
  function hitTest(x, y, layout, options) {
24606
25040
  if (layout.lines.length === 0) {
@@ -24644,8 +25078,8 @@ function hitTest(x, y, layout, options) {
24644
25078
  };
24645
25079
  }
24646
25080
 
24647
- /**
24648
- * Get cursor rectangle for a given insertion index
25081
+ /**
25082
+ * Get cursor rectangle for a given insertion index
24649
25083
  */
24650
25084
  function getCursorRect(insertionIndex, layout, options) {
24651
25085
  if (layout.lines.length === 0) {
@@ -24692,8 +25126,8 @@ function getCursorRect(insertionIndex, layout, options) {
24692
25126
 
24693
25127
  // Private helper functions
24694
25128
 
24695
- /**
24696
- * Find which line contains the given Y coordinate
25129
+ /**
25130
+ * Find which line contains the given Y coordinate
24697
25131
  */
24698
25132
  function findLineAtY(y, lines) {
24699
25133
  var _lines;
@@ -24716,8 +25150,8 @@ function findLineAtY(y, lines) {
24716
25150
  };
24717
25151
  }
24718
25152
 
24719
- /**
24720
- * Find character position within a line at given X coordinate
25153
+ /**
25154
+ * Find character position within a line at given X coordinate
24721
25155
  */
24722
25156
  function findCharAtX(x, line, options) {
24723
25157
  if (line.bounds.length === 0) {
@@ -24823,8 +25257,8 @@ function findCharAtX(x, line, options) {
24823
25257
  };
24824
25258
  }
24825
25259
 
24826
- /**
24827
- * Calculate total insertion index from line and character indices
25260
+ /**
25261
+ * Calculate total insertion index from line and character indices
24828
25262
  */
24829
25263
  function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
24830
25264
  let insertionIndex = 0;
@@ -24843,8 +25277,8 @@ function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
24843
25277
  return insertionIndex;
24844
25278
  }
24845
25279
 
24846
- /**
24847
- * Find line and grapheme position from insertion index
25280
+ /**
25281
+ * Find line and grapheme position from insertion index
24848
25282
  */
24849
25283
  function findPositionFromIndex(insertionIndex, layout) {
24850
25284
  let currentIndex = 0;
@@ -24886,8 +25320,8 @@ function findPositionFromIndex(insertionIndex, layout) {
24886
25320
  };
24887
25321
  }
24888
25322
 
24889
- /**
24890
- * Calculate Y position of a line
25323
+ /**
25324
+ * Calculate Y position of a line
24891
25325
  */
24892
25326
  function calculateLineY(lineIndex, layout, options) {
24893
25327
  let y = 0;
@@ -24990,48 +25424,48 @@ const iTextDefaultValues = {
24990
25424
 
24991
25425
  // @TODO this is not complete
24992
25426
 
24993
- /**
24994
- * @fires changed
24995
- * @fires selection:changed
24996
- * @fires editing:entered
24997
- * @fires editing:exited
24998
- * @fires dragstart
24999
- * @fires drag drag event firing on the drag source
25000
- * @fires dragend
25001
- * @fires copy
25002
- * @fires cut
25003
- * @fires paste
25004
- *
25005
- * #### Supported key combinations
25006
- * ```
25007
- * Move cursor: left, right, up, down
25008
- * Select character: shift + left, shift + right
25009
- * Select text vertically: shift + up, shift + down
25010
- * Move cursor by word: alt + left, alt + right
25011
- * Select words: shift + alt + left, shift + alt + right
25012
- * Move cursor to line start/end: cmd + left, cmd + right or home, end
25013
- * Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
25014
- * Jump to start/end of text: cmd + up, cmd + down
25015
- * Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
25016
- * Delete character: backspace
25017
- * Delete word: alt + backspace
25018
- * Delete line: cmd + backspace
25019
- * Forward delete: delete
25020
- * Copy text: ctrl/cmd + c
25021
- * Paste text: ctrl/cmd + v
25022
- * Cut text: ctrl/cmd + x
25023
- * Select entire text: ctrl/cmd + a
25024
- * Quit editing tab or esc
25025
- * ```
25026
- *
25027
- * #### Supported mouse/touch combination
25028
- * ```
25029
- * Position cursor: click/touch
25030
- * Create selection: click/touch & drag
25031
- * Create selection: click & shift + click
25032
- * Select word: double click
25033
- * Select line: triple click
25034
- * ```
25427
+ /**
25428
+ * @fires changed
25429
+ * @fires selection:changed
25430
+ * @fires editing:entered
25431
+ * @fires editing:exited
25432
+ * @fires dragstart
25433
+ * @fires drag drag event firing on the drag source
25434
+ * @fires dragend
25435
+ * @fires copy
25436
+ * @fires cut
25437
+ * @fires paste
25438
+ *
25439
+ * #### Supported key combinations
25440
+ * ```
25441
+ * Move cursor: left, right, up, down
25442
+ * Select character: shift + left, shift + right
25443
+ * Select text vertically: shift + up, shift + down
25444
+ * Move cursor by word: alt + left, alt + right
25445
+ * Select words: shift + alt + left, shift + alt + right
25446
+ * Move cursor to line start/end: cmd + left, cmd + right or home, end
25447
+ * Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
25448
+ * Jump to start/end of text: cmd + up, cmd + down
25449
+ * Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
25450
+ * Delete character: backspace
25451
+ * Delete word: alt + backspace
25452
+ * Delete line: cmd + backspace
25453
+ * Forward delete: delete
25454
+ * Copy text: ctrl/cmd + c
25455
+ * Paste text: ctrl/cmd + v
25456
+ * Cut text: ctrl/cmd + x
25457
+ * Select entire text: ctrl/cmd + a
25458
+ * Quit editing tab or esc
25459
+ * ```
25460
+ *
25461
+ * #### Supported mouse/touch combination
25462
+ * ```
25463
+ * Position cursor: click/touch
25464
+ * Create selection: click/touch & drag
25465
+ * Create selection: click & shift + click
25466
+ * Select word: double click
25467
+ * Select line: triple click
25468
+ * ```
25035
25469
  */
25036
25470
  class IText extends ITextClickBehavior {
25037
25471
  static getDefaults() {
@@ -25046,10 +25480,10 @@ class IText extends ITextClickBehavior {
25046
25480
  return type === 'itext' ? 'i-text' : type;
25047
25481
  }
25048
25482
 
25049
- /**
25050
- * Constructor
25051
- * @param {String} text Text string
25052
- * @param {Object} [options] Options object
25483
+ /**
25484
+ * Constructor
25485
+ * @param {String} text Text string
25486
+ * @param {Object} [options] Options object
25053
25487
  */
25054
25488
  constructor(text, options) {
25055
25489
  super(text, {
@@ -25059,11 +25493,11 @@ class IText extends ITextClickBehavior {
25059
25493
  this.initBehavior();
25060
25494
  }
25061
25495
 
25062
- /**
25063
- * While editing handle differently
25064
- * @private
25065
- * @param {string} key
25066
- * @param {*} value
25496
+ /**
25497
+ * While editing handle differently
25498
+ * @private
25499
+ * @param {string} key
25500
+ * @param {*} value
25067
25501
  */
25068
25502
  _set(key, value) {
25069
25503
  if (this.isEditing && this._savedProps && key in this._savedProps) {
@@ -25078,28 +25512,28 @@ class IText extends ITextClickBehavior {
25078
25512
  return super._set(key, value);
25079
25513
  }
25080
25514
 
25081
- /**
25082
- * Sets selection start (left boundary of a selection)
25083
- * @param {Number} index Index to set selection start to
25515
+ /**
25516
+ * Sets selection start (left boundary of a selection)
25517
+ * @param {Number} index Index to set selection start to
25084
25518
  */
25085
25519
  setSelectionStart(index) {
25086
25520
  index = Math.max(index, 0);
25087
25521
  this._updateAndFire('selectionStart', index);
25088
25522
  }
25089
25523
 
25090
- /**
25091
- * Sets selection end (right boundary of a selection)
25092
- * @param {Number} index Index to set selection end to
25524
+ /**
25525
+ * Sets selection end (right boundary of a selection)
25526
+ * @param {Number} index Index to set selection end to
25093
25527
  */
25094
25528
  setSelectionEnd(index) {
25095
25529
  index = Math.min(index, this.text.length);
25096
25530
  this._updateAndFire('selectionEnd', index);
25097
25531
  }
25098
25532
 
25099
- /**
25100
- * @private
25101
- * @param {String} property 'selectionStart' or 'selectionEnd'
25102
- * @param {Number} index new position of property
25533
+ /**
25534
+ * @private
25535
+ * @param {String} property 'selectionStart' or 'selectionEnd'
25536
+ * @param {Number} index new position of property
25103
25537
  */
25104
25538
  _updateAndFire(property, index) {
25105
25539
  if (this[property] !== index) {
@@ -25109,9 +25543,9 @@ class IText extends ITextClickBehavior {
25109
25543
  this._updateTextarea();
25110
25544
  }
25111
25545
 
25112
- /**
25113
- * Fires the even of selection changed
25114
- * @private
25546
+ /**
25547
+ * Fires the even of selection changed
25548
+ * @private
25115
25549
  */
25116
25550
  _fireSelectionChanged() {
25117
25551
  this.fire('selection:changed');
@@ -25120,25 +25554,25 @@ class IText extends ITextClickBehavior {
25120
25554
  });
25121
25555
  }
25122
25556
 
25123
- /**
25124
- * Initialize text dimensions. Render all text on given context
25125
- * or on a offscreen canvas to get the text width with measureText.
25126
- * Updates this.width and this.height with the proper values.
25127
- * Does not return dimensions.
25128
- * @private
25557
+ /**
25558
+ * Initialize text dimensions. Render all text on given context
25559
+ * or on a offscreen canvas to get the text width with measureText.
25560
+ * Updates this.width and this.height with the proper values.
25561
+ * Does not return dimensions.
25562
+ * @private
25129
25563
  */
25130
25564
  initDimensions() {
25131
25565
  this.isEditing && this.initDelayedCursor();
25132
25566
  super.initDimensions();
25133
25567
  }
25134
25568
 
25135
- /**
25136
- * Gets style of a current selection/cursor (at the start position)
25137
- * if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
25138
- * @param {Number} startIndex Start index to get styles at
25139
- * @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
25140
- * @param {Boolean} [complete] get full style or not
25141
- * @return {Array} styles an array with one, zero or more Style objects
25569
+ /**
25570
+ * Gets style of a current selection/cursor (at the start position)
25571
+ * if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
25572
+ * @param {Number} startIndex Start index to get styles at
25573
+ * @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
25574
+ * @param {Boolean} [complete] get full style or not
25575
+ * @return {Array} styles an array with one, zero or more Style objects
25142
25576
  */
25143
25577
  getSelectionStyles() {
25144
25578
  let startIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart || 0;
@@ -25147,11 +25581,11 @@ class IText extends ITextClickBehavior {
25147
25581
  return super.getSelectionStyles(startIndex, endIndex, complete);
25148
25582
  }
25149
25583
 
25150
- /**
25151
- * Sets style of a current selection, if no selection exist, do not set anything.
25152
- * @param {Object} [styles] Styles object
25153
- * @param {Number} [startIndex] Start index to get styles at
25154
- * @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
25584
+ /**
25585
+ * Sets style of a current selection, if no selection exist, do not set anything.
25586
+ * @param {Object} [styles] Styles object
25587
+ * @param {Number} [startIndex] Start index to get styles at
25588
+ * @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
25155
25589
  */
25156
25590
  setSelectionStyles(styles) {
25157
25591
  let startIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selectionStart || 0;
@@ -25159,10 +25593,10 @@ class IText extends ITextClickBehavior {
25159
25593
  return super.setSelectionStyles(styles, startIndex, endIndex);
25160
25594
  }
25161
25595
 
25162
- /**
25163
- * Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
25164
- * @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
25165
- * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
25596
+ /**
25597
+ * Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
25598
+ * @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
25599
+ * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
25166
25600
  */
25167
25601
  get2DCursorLocation() {
25168
25602
  let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
@@ -25170,9 +25604,9 @@ class IText extends ITextClickBehavior {
25170
25604
  return super.get2DCursorLocation(selectionStart, skipWrapping);
25171
25605
  }
25172
25606
 
25173
- /**
25174
- * @private
25175
- * @param {CanvasRenderingContext2D} ctx Context to render on
25607
+ /**
25608
+ * @private
25609
+ * @param {CanvasRenderingContext2D} ctx Context to render on
25176
25610
  */
25177
25611
  render(ctx) {
25178
25612
  super.render(ctx);
@@ -25182,9 +25616,9 @@ class IText extends ITextClickBehavior {
25182
25616
  this.renderCursorOrSelection();
25183
25617
  }
25184
25618
 
25185
- /**
25186
- * @override block cursor/selection logic while rendering the exported canvas
25187
- * @todo this workaround should be replaced with a more robust solution
25619
+ /**
25620
+ * @override block cursor/selection logic while rendering the exported canvas
25621
+ * @todo this workaround should be replaced with a more robust solution
25188
25622
  */
25189
25623
  toCanvasElement(options) {
25190
25624
  const isEditing = this.isEditing;
@@ -25194,9 +25628,9 @@ class IText extends ITextClickBehavior {
25194
25628
  return canvas;
25195
25629
  }
25196
25630
 
25197
- /**
25198
- * Renders cursor or selection (depending on what exists)
25199
- * it does on the contextTop. If contextTop is not available, do nothing.
25631
+ /**
25632
+ * Renders cursor or selection (depending on what exists)
25633
+ * it does on the contextTop. If contextTop is not available, do nothing.
25200
25634
  */
25201
25635
  renderCursorOrSelection() {
25202
25636
  if (!this.isEditing || !this.canvas) {
@@ -25252,12 +25686,12 @@ class IText extends ITextClickBehavior {
25252
25686
  ctx.restore();
25253
25687
  }
25254
25688
 
25255
- /**
25256
- * Finds and returns an array of clip paths that are applied to the parent
25257
- * group(s) of the current FabricObject instance. The object's hierarchy is
25258
- * traversed upwards (from the current object towards the root of the canvas),
25259
- * checking each parent object for the presence of a `clipPath` that is not
25260
- * absolutely positioned.
25689
+ /**
25690
+ * Finds and returns an array of clip paths that are applied to the parent
25691
+ * group(s) of the current FabricObject instance. The object's hierarchy is
25692
+ * traversed upwards (from the current object towards the root of the canvas),
25693
+ * checking each parent object for the presence of a `clipPath` that is not
25694
+ * absolutely positioned.
25261
25695
  */
25262
25696
  findAncestorsWithClipPath() {
25263
25697
  const clipPathAncestors = [];
@@ -25272,13 +25706,13 @@ class IText extends ITextClickBehavior {
25272
25706
  return clipPathAncestors;
25273
25707
  }
25274
25708
 
25275
- /**
25276
- * Returns cursor boundaries (left, top, leftOffset, topOffset)
25277
- * left/top are left/top of entire text box
25278
- * leftOffset/topOffset are offset from that left/top point of a text box
25279
- * @private
25280
- * @param {number} [index] index from start
25281
- * @param {boolean} [skipCaching]
25709
+ /**
25710
+ * Returns cursor boundaries (left, top, leftOffset, topOffset)
25711
+ * left/top are left/top of entire text box
25712
+ * leftOffset/topOffset are offset from that left/top point of a text box
25713
+ * @private
25714
+ * @param {number} [index] index from start
25715
+ * @param {boolean} [skipCaching]
25282
25716
  */
25283
25717
  _getCursorBoundaries() {
25284
25718
  let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
@@ -25292,11 +25726,11 @@ class IText extends ITextClickBehavior {
25292
25726
  return this._getCursorBoundariesOriginal(index, skipCaching);
25293
25727
  }
25294
25728
 
25295
- /**
25296
- * Caches and returns cursor left/top offset relative to instance's center point
25297
- * @private
25298
- * @param {number} index index from start
25299
- * @param {boolean} [skipCaching]
25729
+ /**
25730
+ * Caches and returns cursor left/top offset relative to instance's center point
25731
+ * @private
25732
+ * @param {number} index index from start
25733
+ * @param {boolean} [skipCaching]
25300
25734
  */
25301
25735
  _getCursorBoundariesOffsets(index, skipCaching) {
25302
25736
  if (skipCaching) {
@@ -25308,9 +25742,9 @@ class IText extends ITextClickBehavior {
25308
25742
  return this.cursorOffsetCache = this.__getCursorBoundariesOffsets(index);
25309
25743
  }
25310
25744
 
25311
- /**
25312
- * Enhanced cursor boundaries using advanced hit testing when available
25313
- * @private
25745
+ /**
25746
+ * Enhanced cursor boundaries using advanced hit testing when available
25747
+ * @private
25314
25748
  */
25315
25749
  _getCursorBoundariesAdvanced(index) {
25316
25750
  if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
@@ -25326,9 +25760,9 @@ class IText extends ITextClickBehavior {
25326
25760
  };
25327
25761
  }
25328
25762
 
25329
- /**
25330
- * Enhanced selection start from pointer using BiDi-aware hit testing
25331
- * @override
25763
+ /**
25764
+ * Enhanced selection start from pointer using BiDi-aware hit testing
25765
+ * @override
25332
25766
  */
25333
25767
  getSelectionStartFromPointer(e) {
25334
25768
  if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
@@ -25342,9 +25776,9 @@ class IText extends ITextClickBehavior {
25342
25776
  return Math.min(hitResult.charIndex, this._text.length);
25343
25777
  }
25344
25778
 
25345
- /**
25346
- * Original cursor boundaries implementation
25347
- * @private
25779
+ /**
25780
+ * Original cursor boundaries implementation
25781
+ * @private
25348
25782
  */
25349
25783
  _getCursorBoundariesOriginal(index, skipCaching) {
25350
25784
  const left = this._getLeftOffset(),
@@ -25358,10 +25792,10 @@ class IText extends ITextClickBehavior {
25358
25792
  };
25359
25793
  }
25360
25794
 
25361
- /**
25362
- * Calculates cursor left/top offset relative to instance's center point
25363
- * @private
25364
- * @param {number} index index from start
25795
+ /**
25796
+ * Calculates cursor left/top offset relative to instance's center point
25797
+ * @private
25798
+ * @param {number} index index from start
25365
25799
  */
25366
25800
  __getCursorBoundariesOffsets(index) {
25367
25801
  let topOffset = 0,
@@ -25395,29 +25829,29 @@ class IText extends ITextClickBehavior {
25395
25829
  return boundaries;
25396
25830
  }
25397
25831
 
25398
- /**
25399
- * Renders cursor on context Top, outside the animation cycle, on request
25400
- * Used for the drag/drop effect.
25401
- * If contextTop is not available, do nothing.
25832
+ /**
25833
+ * Renders cursor on context Top, outside the animation cycle, on request
25834
+ * Used for the drag/drop effect.
25835
+ * If contextTop is not available, do nothing.
25402
25836
  */
25403
25837
  renderCursorAt(selectionStart) {
25404
25838
  this._renderCursor(this.canvas.contextTop, this._getCursorBoundaries(selectionStart, true), selectionStart);
25405
25839
  }
25406
25840
 
25407
- /**
25408
- * Renders cursor
25409
- * @param {Object} boundaries
25410
- * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25841
+ /**
25842
+ * Renders cursor
25843
+ * @param {Object} boundaries
25844
+ * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25411
25845
  */
25412
25846
  renderCursor(ctx, boundaries) {
25413
25847
  this._renderCursor(ctx, boundaries, this.selectionStart);
25414
25848
  }
25415
25849
 
25416
- /**
25417
- * Return the data needed to render the cursor for given selection start
25418
- * The left,top are relative to the object, while width and height are prescaled
25419
- * to look think with canvas zoom and object scaling,
25420
- * so they depend on canvas and object scaling
25850
+ /**
25851
+ * Return the data needed to render the cursor for given selection start
25852
+ * The left,top are relative to the object, while width and height are prescaled
25853
+ * to look think with canvas zoom and object scaling,
25854
+ * so they depend on canvas and object scaling
25421
25855
  */
25422
25856
  getCursorRenderingData() {
25423
25857
  let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
@@ -25440,9 +25874,9 @@ class IText extends ITextClickBehavior {
25440
25874
  };
25441
25875
  }
25442
25876
 
25443
- /**
25444
- * Render the cursor at the given selectionStart.
25445
- * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25877
+ /**
25878
+ * Render the cursor at the given selectionStart.
25879
+ * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25446
25880
  */
25447
25881
  _renderCursor(ctx, boundaries, selectionStart) {
25448
25882
  const {
@@ -25458,10 +25892,10 @@ class IText extends ITextClickBehavior {
25458
25892
  ctx.fillRect(left, top, width, height);
25459
25893
  }
25460
25894
 
25461
- /**
25462
- * Renders text selection
25463
- * @param {Object} boundaries Object with left/top/leftOffset/topOffset
25464
- * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25895
+ /**
25896
+ * Renders text selection
25897
+ * @param {Object} boundaries Object with left/top/leftOffset/topOffset
25898
+ * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25465
25899
  */
25466
25900
  renderSelection(ctx, boundaries) {
25467
25901
  const selection = {
@@ -25471,8 +25905,8 @@ class IText extends ITextClickBehavior {
25471
25905
  this._renderSelection(ctx, selection, boundaries);
25472
25906
  }
25473
25907
 
25474
- /**
25475
- * Renders drag start text selection
25908
+ /**
25909
+ * Renders drag start text selection
25476
25910
  */
25477
25911
  renderDragSourceEffect() {
25478
25912
  const dragStartSelection = this.draggableTextDelegate.getDragStartSelection();
@@ -25483,12 +25917,12 @@ class IText extends ITextClickBehavior {
25483
25917
  this.renderCursorAt(dragSelection);
25484
25918
  }
25485
25919
 
25486
- /**
25487
- * Renders text selection
25488
- * @private
25489
- * @param {{ selectionStart: number, selectionEnd: number }} selection
25490
- * @param {Object} boundaries Object with left/top/leftOffset/topOffset
25491
- * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25920
+ /**
25921
+ * Renders text selection
25922
+ * @private
25923
+ * @param {{ selectionStart: number, selectionEnd: number }} selection
25924
+ * @param {Object} boundaries Object with left/top/leftOffset/topOffset
25925
+ * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25492
25926
  */
25493
25927
  _renderSelection(ctx, selection, boundaries) {
25494
25928
  const selectionStart = selection.selectionStart,
@@ -25550,34 +25984,34 @@ class IText extends ITextClickBehavior {
25550
25984
  }
25551
25985
  }
25552
25986
 
25553
- /**
25554
- * High level function to know the height of the cursor.
25555
- * the currentChar is the one that precedes the cursor
25556
- * Returns fontSize of char at the current cursor
25557
- * Unused from the library, is for the end user
25558
- * @return {Number} Character font size
25987
+ /**
25988
+ * High level function to know the height of the cursor.
25989
+ * the currentChar is the one that precedes the cursor
25990
+ * Returns fontSize of char at the current cursor
25991
+ * Unused from the library, is for the end user
25992
+ * @return {Number} Character font size
25559
25993
  */
25560
25994
  getCurrentCharFontSize() {
25561
25995
  const cp = this._getCurrentCharIndex();
25562
25996
  return this.getValueOfPropertyAt(cp.l, cp.c, 'fontSize');
25563
25997
  }
25564
25998
 
25565
- /**
25566
- * High level function to know the color of the cursor.
25567
- * the currentChar is the one that precedes the cursor
25568
- * Returns color (fill) of char at the current cursor
25569
- * if the text object has a pattern or gradient for filler, it will return that.
25570
- * Unused by the library, is for the end user
25571
- * @return {String | TFiller} Character color (fill)
25999
+ /**
26000
+ * High level function to know the color of the cursor.
26001
+ * the currentChar is the one that precedes the cursor
26002
+ * Returns color (fill) of char at the current cursor
26003
+ * if the text object has a pattern or gradient for filler, it will return that.
26004
+ * Unused by the library, is for the end user
26005
+ * @return {String | TFiller} Character color (fill)
25572
26006
  */
25573
26007
  getCurrentCharColor() {
25574
26008
  const cp = this._getCurrentCharIndex();
25575
26009
  return this.getValueOfPropertyAt(cp.l, cp.c, FILL);
25576
26010
  }
25577
26011
 
25578
- /**
25579
- * Returns the cursor position for the getCurrent.. functions
25580
- * @private
26012
+ /**
26013
+ * Returns the cursor position for the getCurrent.. functions
26014
+ * @private
25581
26015
  */
25582
26016
  _getCurrentCharIndex() {
25583
26017
  const cursorPosition = this.get2DCursorLocation(this.selectionStart, true),
@@ -25593,52 +26027,52 @@ class IText extends ITextClickBehavior {
25593
26027
  super.dispose();
25594
26028
  }
25595
26029
  }
25596
- /**
25597
- * Index where text selection starts (or where cursor is when there is no selection)
25598
- * @type Number
26030
+ /**
26031
+ * Index where text selection starts (or where cursor is when there is no selection)
26032
+ * @type Number
25599
26033
  */
25600
- /**
25601
- * Index where text selection ends
25602
- * @type Number
26034
+ /**
26035
+ * Index where text selection ends
26036
+ * @type Number
25603
26037
  */
25604
- /**
25605
- * Color of text selection
25606
- * @type String
26038
+ /**
26039
+ * Color of text selection
26040
+ * @type String
25607
26041
  */
25608
- /**
25609
- * Indicates whether text is in editing mode
25610
- * @type Boolean
26042
+ /**
26043
+ * Indicates whether text is in editing mode
26044
+ * @type Boolean
25611
26045
  */
25612
- /**
25613
- * Indicates whether a text can be edited
25614
- * @type Boolean
26046
+ /**
26047
+ * Indicates whether a text can be edited
26048
+ * @type Boolean
25615
26049
  */
25616
- /**
25617
- * Border color of text object while it's in editing mode
25618
- * @type String
26050
+ /**
26051
+ * Border color of text object while it's in editing mode
26052
+ * @type String
25619
26053
  */
25620
- /**
25621
- * Width of cursor (in px)
25622
- * @type Number
26054
+ /**
26055
+ * Width of cursor (in px)
26056
+ * @type Number
25623
26057
  */
25624
- /**
25625
- * Color of text cursor color in editing mode.
25626
- * if not set (default) will take color from the text.
25627
- * if set to a color value that fabric can understand, it will
25628
- * be used instead of the color of the text at the current position.
25629
- * @type String
26058
+ /**
26059
+ * Color of text cursor color in editing mode.
26060
+ * if not set (default) will take color from the text.
26061
+ * if set to a color value that fabric can understand, it will
26062
+ * be used instead of the color of the text at the current position.
26063
+ * @type String
25630
26064
  */
25631
- /**
25632
- * Delay between cursor blink (in ms)
25633
- * @type Number
26065
+ /**
26066
+ * Delay between cursor blink (in ms)
26067
+ * @type Number
25634
26068
  */
25635
- /**
25636
- * Duration of cursor fade in (in ms)
25637
- * @type Number
26069
+ /**
26070
+ * Duration of cursor fade in (in ms)
26071
+ * @type Number
25638
26072
  */
25639
- /**
25640
- * Indicates whether internal text char widths can be cached
25641
- * @type Boolean
26073
+ /**
26074
+ * Indicates whether internal text char widths can be cached
26075
+ * @type Boolean
25642
26076
  */
25643
26077
  _defineProperty(IText, "ownDefaults", iTextDefaultValues);
25644
26078
  _defineProperty(IText, "type", 'IText');
@@ -25660,11 +26094,11 @@ const textboxDefaultValues = {
25660
26094
 
25661
26095
  // @TODO this is not complete
25662
26096
 
25663
- /**
25664
- * Textbox class, based on IText, allows the user to resize the text rectangle
25665
- * and wraps lines automatically. Textboxes have their Y scaling locked, the
25666
- * user can only change width. Height is adjusted automatically based on the
25667
- * wrapping of lines.
26097
+ /**
26098
+ * Textbox class, based on IText, allows the user to resize the text rectangle
26099
+ * and wraps lines automatically. Textboxes have their Y scaling locked, the
26100
+ * user can only change width. Height is adjusted automatically based on the
26101
+ * wrapping of lines.
25668
26102
  */
25669
26103
  class Textbox extends IText {
25670
26104
  static getDefaults() {
@@ -25674,10 +26108,10 @@ class Textbox extends IText {
25674
26108
  };
25675
26109
  }
25676
26110
 
25677
- /**
25678
- * Constructor
25679
- * @param {String} text Text string
25680
- * @param {Object} [options] Options object
26111
+ /**
26112
+ * Constructor
26113
+ * @param {String} text Text string
26114
+ * @param {Object} [options] Options object
25681
26115
  */
25682
26116
  constructor(text, options) {
25683
26117
  super(text, {
@@ -25687,10 +26121,10 @@ class Textbox extends IText {
25687
26121
  this.initializeEventListeners();
25688
26122
  }
25689
26123
 
25690
- /**
25691
- * Creates the default control object.
25692
- * If you prefer to have on instance of controls shared among all objects
25693
- * make this function return an empty object and add controls to the ownDefaults object
26124
+ /**
26125
+ * Creates the default control object.
26126
+ * If you prefer to have on instance of controls shared among all objects
26127
+ * make this function return an empty object and add controls to the ownDefaults object
25694
26128
  */
25695
26129
  static createControls() {
25696
26130
  return {
@@ -25698,11 +26132,11 @@ class Textbox extends IText {
25698
26132
  };
25699
26133
  }
25700
26134
 
25701
- /**
25702
- * Unlike superclass's version of this function, Textbox does not update
25703
- * its width.
25704
- * @private
25705
- * @override
26135
+ /**
26136
+ * Unlike superclass's version of this function, Textbox does not update
26137
+ * its width.
26138
+ * @private
26139
+ * @override
25706
26140
  */
25707
26141
  initDimensions() {
25708
26142
  if (!this.initialized) {
@@ -25731,9 +26165,9 @@ class Textbox extends IText {
25731
26165
  this.height = this.calcTextHeight();
25732
26166
  }
25733
26167
 
25734
- /**
25735
- * Advanced dimensions calculation using new layout engine
25736
- * @private
26168
+ /**
26169
+ * Advanced dimensions calculation using new layout engine
26170
+ * @private
25737
26171
  */
25738
26172
  initDimensionsAdvanced() {
25739
26173
  if (!this.initialized) {
@@ -25788,9 +26222,9 @@ class Textbox extends IText {
25788
26222
  this.dirty = true;
25789
26223
  }
25790
26224
 
25791
- /**
25792
- * Generate style map from new layout format
25793
- * @private
26225
+ /**
26226
+ * Generate style map from new layout format
26227
+ * @private
25794
26228
  */
25795
26229
  _generateStyleMapFromLayout(layout) {
25796
26230
  const map = {};
@@ -25812,12 +26246,12 @@ class Textbox extends IText {
25812
26246
  return map;
25813
26247
  }
25814
26248
 
25815
- /**
25816
- * Generate an object that translates the style object so that it is
25817
- * broken up by visual lines (new lines and automatic wrapping).
25818
- * The original text styles object is broken up by actual lines (new lines only),
25819
- * which is only sufficient for Text / IText
25820
- * @private
26249
+ /**
26250
+ * Generate an object that translates the style object so that it is
26251
+ * broken up by visual lines (new lines and automatic wrapping).
26252
+ * The original text styles object is broken up by actual lines (new lines only),
26253
+ * which is only sufficient for Text / IText
26254
+ * @private
25821
26255
  */
25822
26256
  _generateStyleMap(textInfo) {
25823
26257
  let realLineCount = 0,
@@ -25844,10 +26278,10 @@ class Textbox extends IText {
25844
26278
  return map;
25845
26279
  }
25846
26280
 
25847
- /**
25848
- * Returns true if object has a style property or has it on a specified line
25849
- * @param {Number} lineIndex
25850
- * @return {Boolean}
26281
+ /**
26282
+ * Returns true if object has a style property or has it on a specified line
26283
+ * @param {Number} lineIndex
26284
+ * @return {Boolean}
25851
26285
  */
25852
26286
  styleHas(property, lineIndex) {
25853
26287
  if (this._styleMap && !this.isWrapping) {
@@ -25859,10 +26293,10 @@ class Textbox extends IText {
25859
26293
  return super.styleHas(property, lineIndex);
25860
26294
  }
25861
26295
 
25862
- /**
25863
- * Returns true if object has no styling or no styling in a line
25864
- * @param {Number} lineIndex , lineIndex is on wrapped lines.
25865
- * @return {Boolean}
26296
+ /**
26297
+ * Returns true if object has no styling or no styling in a line
26298
+ * @param {Number} lineIndex , lineIndex is on wrapped lines.
26299
+ * @return {Boolean}
25866
26300
  */
25867
26301
  isEmptyStyles(lineIndex) {
25868
26302
  if (!this.styles) {
@@ -25899,11 +26333,11 @@ class Textbox extends IText {
25899
26333
  return true;
25900
26334
  }
25901
26335
 
25902
- /**
25903
- * @protected
25904
- * @param {Number} lineIndex
25905
- * @param {Number} charIndex
25906
- * @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
26336
+ /**
26337
+ * @protected
26338
+ * @param {Number} lineIndex
26339
+ * @param {Number} charIndex
26340
+ * @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
25907
26341
  */
25908
26342
  _getStyleDeclaration(lineIndex, charIndex) {
25909
26343
  if (this._styleMap && !this.isWrapping) {
@@ -25917,59 +26351,59 @@ class Textbox extends IText {
25917
26351
  return super._getStyleDeclaration(lineIndex, charIndex);
25918
26352
  }
25919
26353
 
25920
- /**
25921
- * @param {Number} lineIndex
25922
- * @param {Number} charIndex
25923
- * @param {Object} style
25924
- * @private
26354
+ /**
26355
+ * @param {Number} lineIndex
26356
+ * @param {Number} charIndex
26357
+ * @param {Object} style
26358
+ * @private
25925
26359
  */
25926
26360
  _setStyleDeclaration(lineIndex, charIndex, style) {
25927
26361
  const map = this._styleMap[lineIndex];
25928
26362
  super._setStyleDeclaration(map.line, map.offset + charIndex, style);
25929
26363
  }
25930
26364
 
25931
- /**
25932
- * @param {Number} lineIndex
25933
- * @param {Number} charIndex
25934
- * @private
26365
+ /**
26366
+ * @param {Number} lineIndex
26367
+ * @param {Number} charIndex
26368
+ * @private
25935
26369
  */
25936
26370
  _deleteStyleDeclaration(lineIndex, charIndex) {
25937
26371
  const map = this._styleMap[lineIndex];
25938
26372
  super._deleteStyleDeclaration(map.line, map.offset + charIndex);
25939
26373
  }
25940
26374
 
25941
- /**
25942
- * probably broken need a fix
25943
- * Returns the real style line that correspond to the wrapped lineIndex line
25944
- * Used just to verify if the line does exist or not.
25945
- * @param {Number} lineIndex
25946
- * @returns {Boolean} if the line exists or not
25947
- * @private
26375
+ /**
26376
+ * probably broken need a fix
26377
+ * Returns the real style line that correspond to the wrapped lineIndex line
26378
+ * Used just to verify if the line does exist or not.
26379
+ * @param {Number} lineIndex
26380
+ * @returns {Boolean} if the line exists or not
26381
+ * @private
25948
26382
  */
25949
26383
  _getLineStyle(lineIndex) {
25950
26384
  const map = this._styleMap[lineIndex];
25951
26385
  return !!this.styles[map.line];
25952
26386
  }
25953
26387
 
25954
- /**
25955
- * Set the line style to an empty object so that is initialized
25956
- * @param {Number} lineIndex
25957
- * @param {Object} style
25958
- * @private
26388
+ /**
26389
+ * Set the line style to an empty object so that is initialized
26390
+ * @param {Number} lineIndex
26391
+ * @param {Object} style
26392
+ * @private
25959
26393
  */
25960
26394
  _setLineStyle(lineIndex) {
25961
26395
  const map = this._styleMap[lineIndex];
25962
26396
  super._setLineStyle(map.line);
25963
26397
  }
25964
26398
 
25965
- /**
25966
- * Wraps text using the 'width' property of Textbox. First this function
25967
- * splits text on newlines, so we preserve newlines entered by the user.
25968
- * Then it wraps each line using the width of the Textbox by calling
25969
- * _wrapLine().
25970
- * @param {Array} lines The string array of text that is split into lines
25971
- * @param {Number} desiredWidth width you want to wrap to
25972
- * @returns {Array} Array of lines
26399
+ /**
26400
+ * Wraps text using the 'width' property of Textbox. First this function
26401
+ * splits text on newlines, so we preserve newlines entered by the user.
26402
+ * Then it wraps each line using the width of the Textbox by calling
26403
+ * _wrapLine().
26404
+ * @param {Array} lines The string array of text that is split into lines
26405
+ * @param {Number} desiredWidth width you want to wrap to
26406
+ * @returns {Array} Array of lines
25973
26407
  */
25974
26408
  _wrapText(lines, desiredWidth) {
25975
26409
  this.isWrapping = true;
@@ -25983,12 +26417,12 @@ class Textbox extends IText {
25983
26417
  return wrapped;
25984
26418
  }
25985
26419
 
25986
- /**
25987
- * For each line of text terminated by an hard line stop,
25988
- * measure each word width and extract the largest word from all.
25989
- * The returned words here are the one that at the end will be rendered.
25990
- * @param {string[]} lines the lines we need to measure
25991
- *
26420
+ /**
26421
+ * For each line of text terminated by an hard line stop,
26422
+ * measure each word width and extract the largest word from all.
26423
+ * The returned words here are the one that at the end will be rendered.
26424
+ * @param {string[]} lines the lines we need to measure
26425
+ *
25992
26426
  */
25993
26427
  getGraphemeDataForRender(lines) {
25994
26428
  const splitByGrapheme = this.splitByGrapheme,
@@ -26021,17 +26455,17 @@ class Textbox extends IText {
26021
26455
  };
26022
26456
  }
26023
26457
 
26024
- /**
26025
- * Helper function to measure a string of text, given its lineIndex and charIndex offset
26026
- * It gets called when charBounds are not available yet.
26027
- * Override if necessary
26028
- * Use with {@link Textbox#wordSplit}
26029
- *
26030
- * @param {CanvasRenderingContext2D} ctx
26031
- * @param {String} text
26032
- * @param {number} lineIndex
26033
- * @param {number} charOffset
26034
- * @returns {number}
26458
+ /**
26459
+ * Helper function to measure a string of text, given its lineIndex and charIndex offset
26460
+ * It gets called when charBounds are not available yet.
26461
+ * Override if necessary
26462
+ * Use with {@link Textbox#wordSplit}
26463
+ *
26464
+ * @param {CanvasRenderingContext2D} ctx
26465
+ * @param {String} text
26466
+ * @param {number} lineIndex
26467
+ * @param {number} charOffset
26468
+ * @returns {number}
26035
26469
  */
26036
26470
  _measureWord(word, lineIndex) {
26037
26471
  let charOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
@@ -26046,26 +26480,26 @@ class Textbox extends IText {
26046
26480
  return width;
26047
26481
  }
26048
26482
 
26049
- /**
26050
- * Override this method to customize word splitting
26051
- * Use with {@link Textbox#_measureWord}
26052
- * @param {string} value
26053
- * @returns {string[]} array of words
26483
+ /**
26484
+ * Override this method to customize word splitting
26485
+ * Use with {@link Textbox#_measureWord}
26486
+ * @param {string} value
26487
+ * @returns {string[]} array of words
26054
26488
  */
26055
26489
  wordSplit(value) {
26056
26490
  return value.split(this._wordJoiners);
26057
26491
  }
26058
26492
 
26059
- /**
26060
- * Wraps a line of text using the width of the Textbox as desiredWidth
26061
- * and leveraging the known width o words from GraphemeData
26062
- * @private
26063
- * @param {Number} lineIndex
26064
- * @param {Number} desiredWidth width you want to wrap the line to
26065
- * @param {GraphemeData} graphemeData an object containing all the lines' words width.
26066
- * @param {Number} reservedSpace space to remove from wrapping for custom functionalities
26067
- * @returns {Array} Array of line(s) into which the given text is wrapped
26068
- * to.
26493
+ /**
26494
+ * Wraps a line of text using the width of the Textbox as desiredWidth
26495
+ * and leveraging the known width o words from GraphemeData
26496
+ * @private
26497
+ * @param {Number} lineIndex
26498
+ * @param {Number} desiredWidth width you want to wrap the line to
26499
+ * @param {GraphemeData} graphemeData an object containing all the lines' words width.
26500
+ * @param {Number} reservedSpace space to remove from wrapping for custom functionalities
26501
+ * @returns {Array} Array of line(s) into which the given text is wrapped
26502
+ * to.
26069
26503
  */
26070
26504
  _wrapLine(lineIndex, desiredWidth, _ref) {
26071
26505
  let {
@@ -26123,11 +26557,11 @@ class Textbox extends IText {
26123
26557
  return graphemeLines;
26124
26558
  }
26125
26559
 
26126
- /**
26127
- * Detect if the text line is ended with an hard break
26128
- * text and itext do not have wrapping, return false
26129
- * @param {Number} lineIndex text to split
26130
- * @return {Boolean}
26560
+ /**
26561
+ * Detect if the text line is ended with an hard break
26562
+ * text and itext do not have wrapping, return false
26563
+ * @param {Number} lineIndex text to split
26564
+ * @return {Boolean}
26131
26565
  */
26132
26566
  isEndOfWrapping(lineIndex) {
26133
26567
  if (!this._styleMap[lineIndex + 1]) {
@@ -26141,12 +26575,12 @@ class Textbox extends IText {
26141
26575
  return false;
26142
26576
  }
26143
26577
 
26144
- /**
26145
- * Detect if a line has a linebreak and so we need to account for it when moving
26146
- * and counting style.
26147
- * This is important only for splitByGrapheme at the end of wrapping.
26148
- * If we are not wrapping the offset is always 1
26149
- * @return Number
26578
+ /**
26579
+ * Detect if a line has a linebreak and so we need to account for it when moving
26580
+ * and counting style.
26581
+ * This is important only for splitByGrapheme at the end of wrapping.
26582
+ * If we are not wrapping the offset is always 1
26583
+ * @return Number
26150
26584
  */
26151
26585
  missingNewlineOffset(lineIndex, skipWrapping) {
26152
26586
  if (this.splitByGrapheme && !skipWrapping) {
@@ -26155,12 +26589,12 @@ class Textbox extends IText {
26155
26589
  return 1;
26156
26590
  }
26157
26591
 
26158
- /**
26159
- * Gets lines of text to render in the Textbox. This function calculates
26160
- * text wrapping on the fly every time it is called.
26161
- * @param {String} text text to split
26162
- * @returns {Array} Array of lines in the Textbox.
26163
- * @override
26592
+ /**
26593
+ * Gets lines of text to render in the Textbox. This function calculates
26594
+ * text wrapping on the fly every time it is called.
26595
+ * @param {String} text text to split
26596
+ * @returns {Array} Array of lines in the Textbox.
26597
+ * @override
26164
26598
  */
26165
26599
  _splitTextIntoLines(text) {
26166
26600
  const newText = super._splitTextIntoLines(text),
@@ -26192,9 +26626,9 @@ class Textbox extends IText {
26192
26626
  }
26193
26627
  }
26194
26628
 
26195
- /**
26196
- * Initialize event listeners for safety snap functionality
26197
- * @private
26629
+ /**
26630
+ * Initialize event listeners for safety snap functionality
26631
+ * @private
26198
26632
  */
26199
26633
  initializeEventListeners() {
26200
26634
  var _this$canvas;
@@ -26237,12 +26671,12 @@ class Textbox extends IText {
26237
26671
  });
26238
26672
  }
26239
26673
 
26240
- /**
26241
- * Safety snap to prevent glyph clipping after manual resize.
26242
- * Similar to Polotno - checks if any glyphs are too close to edges
26243
- * and automatically expands width if needed.
26244
- * @private
26245
- * @param resizeOrigin - Which side was used for resizing ('left' or 'right')
26674
+ /**
26675
+ * Safety snap to prevent glyph clipping after manual resize.
26676
+ * Similar to Polotno - checks if any glyphs are too close to edges
26677
+ * and automatically expands width if needed.
26678
+ * @private
26679
+ * @param resizeOrigin - Which side was used for resizing ('left' or 'right')
26246
26680
  */
26247
26681
  safetySnapWidth(resizeOrigin) {
26248
26682
  // For Textbox objects, we always want to check for clipping regardless of isWrapping flag
@@ -26309,31 +26743,31 @@ class Textbox extends IText {
26309
26743
  }
26310
26744
  }
26311
26745
 
26312
- /**
26313
- * Returns object representation of an instance
26314
- * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
26315
- * @return {Object} object representation of an instance
26746
+ /**
26747
+ * Returns object representation of an instance
26748
+ * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
26749
+ * @return {Object} object representation of an instance
26316
26750
  */
26317
26751
  toObject() {
26318
26752
  let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
26319
26753
  return super.toObject(['minWidth', 'splitByGrapheme', ...propertiesToInclude]);
26320
26754
  }
26321
26755
  }
26322
- /**
26323
- * Minimum width of textbox, in pixels.
26324
- * @type Number
26325
- */
26326
- /**
26327
- * Minimum calculated width of a textbox, in pixels.
26328
- * fixed to 2 so that an empty textbox cannot go to 0
26329
- * and is still selectable without text.
26330
- * @type Number
26331
- */
26332
- /**
26333
- * Use this boolean property in order to split strings that have no white space concept.
26334
- * this is a cheap way to help with chinese/japanese
26335
- * @type Boolean
26336
- * @since 2.6.0
26756
+ /**
26757
+ * Minimum width of textbox, in pixels.
26758
+ * @type Number
26759
+ */
26760
+ /**
26761
+ * Minimum calculated width of a textbox, in pixels.
26762
+ * fixed to 2 so that an empty textbox cannot go to 0
26763
+ * and is still selectable without text.
26764
+ * @type Number
26765
+ */
26766
+ /**
26767
+ * Use this boolean property in order to split strings that have no white space concept.
26768
+ * this is a cheap way to help with chinese/japanese
26769
+ * @type Boolean
26770
+ * @since 2.6.0
26337
26771
  */
26338
26772
  _defineProperty(Textbox, "type", 'Textbox');
26339
26773
  _defineProperty(Textbox, "textLayoutProperties", [...IText.textLayoutProperties, 'width']);