@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
package/dist/index.mjs CHANGED
@@ -354,7 +354,7 @@ class Cache {
354
354
  }
355
355
  const cache = new Cache();
356
356
 
357
- var version = "7.0.1-beta1";
357
+ var version = "7.0.1-beta3";
358
358
 
359
359
  // use this syntax so babel plugin see this import here
360
360
  const VERSION = version;
@@ -17571,33 +17571,29 @@ class PatternBrush extends PencilBrush {
17571
17571
  }
17572
17572
  }
17573
17573
 
17574
- // @TODO this code is terrible and Line should be a special case of polyline.
17575
-
17576
17574
  const coordProps = ['x1', 'x2', 'y1', 'y2'];
17577
- /**
17578
- * A Class to draw a line
17579
- * A bunch of methods will be added to Polyline to handle the line case
17580
- * The line class is very strange to work with, is all special, it hardly aligns
17581
- * to what a developer want everytime there is an angle
17582
- * @deprecated
17583
- */
17584
17575
  class Line extends FabricObject {
17585
- /**
17586
- * Constructor
17587
- * @param {Array} [points] Array of points
17588
- * @param {Object} [options] Options object
17589
- * @return {Line} thisArg
17590
- */
17591
17576
  constructor() {
17592
- let [x1, y1, x2, y2] = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [0, 0, 0, 0];
17577
+ let [x1, y1, x2, y2] = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [0, 0, 100, 0];
17593
17578
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17594
17579
  super();
17595
- Object.assign(this, Line.ownDefaults);
17580
+ _defineProperty(this, "hitStrokeWidth", 'auto');
17581
+ _defineProperty(this, "_updatingEndpoints", false);
17582
+ _defineProperty(this, "_useEndpointCoords", true);
17596
17583
  this.setOptions(options);
17597
17584
  this.x1 = x1;
17598
17585
  this.x2 = x2;
17599
17586
  this.y1 = y1;
17600
17587
  this.y2 = y2;
17588
+ if (options.hitStrokeWidth !== undefined) {
17589
+ this.hitStrokeWidth = options.hitStrokeWidth;
17590
+ }
17591
+ this.hasBorders = false;
17592
+ this.hasControls = true;
17593
+ this.selectable = true;
17594
+ this.hoverCursor = 'move';
17595
+ this.perPixelTargetFind = false;
17596
+ this.strokeLineCap = 'butt';
17601
17597
  this._setWidthHeight();
17602
17598
  const {
17603
17599
  left,
@@ -17605,96 +17601,323 @@ class Line extends FabricObject {
17605
17601
  } = options;
17606
17602
  typeof left === 'number' && this.set(LEFT, left);
17607
17603
  typeof top === 'number' && this.set(TOP, top);
17604
+ this._setupLineControls();
17605
+ }
17606
+ _setupLineControls() {
17607
+ this.controls = {
17608
+ p1: new Control({
17609
+ x: 0,
17610
+ y: 0,
17611
+ cursorStyle: 'move',
17612
+ actionHandler: this._endpointActionHandler.bind(this),
17613
+ positionHandler: this._p1PositionHandler.bind(this),
17614
+ render: this._renderEndpointControl.bind(this),
17615
+ sizeX: 12,
17616
+ sizeY: 12
17617
+ }),
17618
+ p2: new Control({
17619
+ x: 0,
17620
+ y: 0,
17621
+ cursorStyle: 'move',
17622
+ actionHandler: this._endpointActionHandler.bind(this),
17623
+ positionHandler: this._p2PositionHandler.bind(this),
17624
+ render: this._renderEndpointControl.bind(this),
17625
+ sizeX: 12,
17626
+ sizeY: 12
17627
+ })
17628
+ };
17629
+ }
17630
+ _p1PositionHandler() {
17631
+ var _this$canvas;
17632
+ const vpt = ((_this$canvas = this.canvas) === null || _this$canvas === void 0 ? void 0 : _this$canvas.viewportTransform) || [1, 0, 0, 1, 0, 0];
17633
+ return new Point(this.x1, this.y1).transform(vpt);
17634
+ }
17635
+ _p2PositionHandler() {
17636
+ var _this$canvas2;
17637
+ const vpt = ((_this$canvas2 = this.canvas) === null || _this$canvas2 === void 0 ? void 0 : _this$canvas2.viewportTransform) || [1, 0, 0, 1, 0, 0];
17638
+ return new Point(this.x2, this.y2).transform(vpt);
17639
+ }
17640
+ _renderEndpointControl(ctx, left, top) {
17641
+ const size = 12;
17642
+ ctx.save();
17643
+ ctx.fillStyle = '#007bff';
17644
+ ctx.strokeStyle = '#ffffff';
17645
+ ctx.lineWidth = 2;
17646
+ ctx.beginPath();
17647
+ ctx.arc(left, top, size / 2, 0, 2 * Math.PI);
17648
+ ctx.fill();
17649
+ ctx.stroke();
17650
+ ctx.restore();
17651
+ }
17652
+ drawBorders(ctx) {
17653
+ let styleOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17654
+ if (this._useEndpointCoords) {
17655
+ this._drawLineBorders(ctx, styleOverride);
17656
+ return this;
17657
+ }
17658
+ return super.drawBorders(ctx, styleOverride, {});
17659
+ }
17660
+ _drawLineBorders(ctx) {
17661
+ var _this$canvas3;
17662
+ let styleOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17663
+ const vpt = ((_this$canvas3 = this.canvas) === null || _this$canvas3 === void 0 ? void 0 : _this$canvas3.viewportTransform) || [1, 0, 0, 1, 0, 0];
17664
+ ctx.save();
17665
+ ctx.setTransform(vpt[0], vpt[1], vpt[2], vpt[3], vpt[4], vpt[5]);
17666
+ ctx.strokeStyle = styleOverride.borderColor || this.borderColor || 'rgba(100, 200, 200, 0.5)';
17667
+ ctx.lineWidth = (this.strokeWidth || 1) + 5;
17668
+ ctx.lineCap = this.strokeLineCap || 'butt';
17669
+ ctx.globalAlpha = this.isMoving ? this.borderOpacityWhenMoving : 1;
17670
+ ctx.beginPath();
17671
+ ctx.moveTo(this.x1, this.y1);
17672
+ ctx.lineTo(this.x2, this.y2);
17673
+ ctx.stroke();
17674
+ ctx.restore();
17675
+ }
17676
+ _renderControls(ctx) {
17677
+ let styleOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17678
+ ctx.save();
17679
+ ctx.globalAlpha = this.isMoving ? this.borderOpacityWhenMoving : 1;
17680
+ this.drawControls(ctx, styleOverride);
17681
+ ctx.restore();
17682
+ }
17683
+ getBoundingRect() {
17684
+ if (this._useEndpointCoords) {
17685
+ const {
17686
+ x1,
17687
+ y1,
17688
+ x2,
17689
+ y2
17690
+ } = this;
17691
+ const effectiveStrokeWidth = this.hitStrokeWidth === 'auto' ? this.strokeWidth : this.hitStrokeWidth;
17692
+ const padding = Math.max(effectiveStrokeWidth / 2 + 5, 10);
17693
+ return {
17694
+ left: Math.min(x1, x2) - padding,
17695
+ top: Math.min(y1, y2) - padding,
17696
+ width: Math.abs(x2 - x1) + padding * 2 || padding * 2,
17697
+ height: Math.abs(y2 - y1) + padding * 2 || padding * 2
17698
+ };
17699
+ }
17700
+ return super.getBoundingRect();
17701
+ }
17702
+ setCoords() {
17703
+ if (this._useEndpointCoords) {
17704
+ const minX = Math.min(this.x1, this.x2);
17705
+ const maxX = Math.max(this.x1, this.x2);
17706
+ const minY = Math.min(this.y1, this.y2);
17707
+ const maxY = Math.max(this.y1, this.y2);
17708
+ const effectiveStrokeWidth = this.hitStrokeWidth === 'auto' ? this.strokeWidth : this.hitStrokeWidth;
17709
+ const hitPadding = Math.max(effectiveStrokeWidth / 2 + 5, 10);
17710
+ this.left = minX - hitPadding + (maxX - minX + hitPadding * 2) / 2;
17711
+ this.top = minY - hitPadding + (maxY - minY + hitPadding * 2) / 2;
17712
+ this.width = Math.abs(this.x2 - this.x1) + hitPadding * 2;
17713
+ this.height = Math.abs(this.y2 - this.y1) + hitPadding * 2;
17714
+ }
17715
+ super.setCoords();
17716
+ }
17717
+ getCoords() {
17718
+ if (this._useEndpointCoords) {
17719
+ const deltaX = this.x2 - this.x1;
17720
+ const deltaY = this.y2 - this.y1;
17721
+ const length = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
17722
+ if (length === 0) {
17723
+ return super.getCoords();
17724
+ }
17725
+ const effectiveStrokeWidth = this.hitStrokeWidth === 'auto' ? this.strokeWidth : this.hitStrokeWidth;
17726
+ const halfWidth = Math.max(effectiveStrokeWidth / 2 + 2, 5);
17727
+
17728
+ // Unit vector perpendicular to line
17729
+ const perpX = -deltaY / length;
17730
+ const perpY = deltaX / length;
17731
+
17732
+ // Four corners of oriented rectangle
17733
+ 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)];
17734
+ }
17735
+ return super.getCoords();
17608
17736
  }
17737
+ containsPoint(point) {
17738
+ if (this._useEndpointCoords) {
17739
+ var _this$canvas4;
17740
+ if (((_this$canvas4 = this.canvas) === null || _this$canvas4 === void 0 ? void 0 : _this$canvas4.getActiveObject()) === this) {
17741
+ return super.containsPoint(point);
17742
+ }
17743
+ const distance = this._distanceToLineSegment(point.x, point.y);
17744
+ const effectiveStrokeWidth = this.hitStrokeWidth === 'auto' ? this.strokeWidth : this.hitStrokeWidth || 1;
17745
+ const tolerance = Math.max(effectiveStrokeWidth / 2 + 2, 5);
17746
+ return distance <= tolerance;
17747
+ }
17748
+ return super.containsPoint(point);
17749
+ }
17750
+ _distanceToLineSegment(px, py) {
17751
+ const x1 = this.x1,
17752
+ y1 = this.y1,
17753
+ x2 = this.x2,
17754
+ y2 = this.y2;
17755
+ const pd2 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
17756
+ if (pd2 === 0) {
17757
+ return Math.sqrt((px - x1) * (px - x1) + (py - y1) * (py - y1));
17758
+ }
17759
+ const u = ((px - x1) * (x2 - x1) + (py - y1) * (y2 - y1)) / pd2;
17760
+ let closestX, closestY;
17761
+ if (u < 0) {
17762
+ closestX = x1;
17763
+ closestY = y1;
17764
+ } else if (u > 1) {
17765
+ closestX = x2;
17766
+ closestY = y2;
17767
+ } else {
17768
+ closestX = x1 + u * (x2 - x1);
17769
+ closestY = y1 + u * (y2 - y1);
17770
+ }
17771
+ return Math.sqrt((px - closestX) * (px - closestX) + (py - closestY) * (py - closestY));
17772
+ }
17773
+ _endpointActionHandler(eventData, transformData, x, y) {
17774
+ var _this$canvas6;
17775
+ const controlKey = transformData.corner;
17776
+ const pointer = new Point(x, y);
17777
+ let newX = pointer.x;
17778
+ let newY = pointer.y;
17779
+ if (eventData.shiftKey) {
17780
+ const otherControl = controlKey === 'p1' ? 'p2' : 'p1';
17781
+ const otherX = this[otherControl === 'p1' ? 'x1' : 'x2'];
17782
+ const otherY = this[otherControl === 'p1' ? 'y1' : 'y2'];
17783
+ const snapped = this._snapToAngle(otherX, otherY, newX, newY);
17784
+ newX = snapped.x;
17785
+ newY = snapped.y;
17786
+ }
17787
+ if (this._useEndpointCoords) {
17788
+ var _this$canvas5;
17789
+ if (controlKey === 'p1') {
17790
+ this.x1 = newX;
17791
+ this.y1 = newY;
17792
+ } else if (controlKey === 'p2') {
17793
+ this.x2 = newX;
17794
+ this.y2 = newY;
17795
+ }
17796
+ this.dirty = true;
17797
+ this.setCoords();
17798
+ (_this$canvas5 = this.canvas) === null || _this$canvas5 === void 0 || _this$canvas5.requestRenderAll();
17799
+ return true;
17800
+ }
17609
17801
 
17610
- /**
17611
- * @private
17612
- * @param {Object} [options] Options
17613
- */
17802
+ // Fallback for old system
17803
+ this._updatingEndpoints = true;
17804
+ if (controlKey === 'p1') {
17805
+ this.x1 = newX;
17806
+ this.y1 = newY;
17807
+ } else if (controlKey === 'p2') {
17808
+ this.x2 = newX;
17809
+ this.y2 = newY;
17810
+ }
17811
+ this._setWidthHeight();
17812
+ this.dirty = true;
17813
+ this._updatingEndpoints = false;
17814
+ (_this$canvas6 = this.canvas) === null || _this$canvas6 === void 0 || _this$canvas6.requestRenderAll();
17815
+ this.fire('modified', {
17816
+ transform: transformData,
17817
+ target: this,
17818
+ e: eventData
17819
+ });
17820
+ return true;
17821
+ }
17822
+ _snapToAngle(fromX, fromY, toX, toY) {
17823
+ const deltaX = toX - fromX;
17824
+ const deltaY = toY - fromY;
17825
+ const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
17826
+ if (distance === 0) return {
17827
+ x: toX,
17828
+ y: toY
17829
+ };
17830
+ let angle = Math.atan2(deltaY, deltaX) * (180 / Math.PI);
17831
+ const snapIncrement = 15;
17832
+ const snappedAngle = Math.round(angle / snapIncrement) * snapIncrement;
17833
+ const snappedRadians = snappedAngle * (Math.PI / 180);
17834
+ return {
17835
+ x: fromX + Math.cos(snappedRadians) * distance,
17836
+ y: fromY + Math.sin(snappedRadians) * distance
17837
+ };
17838
+ }
17614
17839
  _setWidthHeight() {
17615
- const {
17616
- x1,
17617
- y1,
17618
- x2,
17619
- y2
17620
- } = this;
17621
- this.width = Math.abs(x2 - x1);
17622
- this.height = Math.abs(y2 - y1);
17623
- const {
17624
- left,
17625
- top,
17626
- width,
17627
- height
17628
- } = makeBoundingBoxFromPoints([{
17629
- x: x1,
17630
- y: y1
17631
- }, {
17632
- x: x2,
17633
- y: y2
17634
- }]);
17635
- const position = new Point(left + width / 2, top + height / 2);
17636
- this.setPositionByOrigin(position, CENTER, CENTER);
17840
+ let skipReposition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
17841
+ this.width = Math.abs(this.x2 - this.x1) || 1;
17842
+ this.height = Math.abs(this.y2 - this.y1) || 1;
17843
+ if (!skipReposition && !this._updatingEndpoints) {
17844
+ const {
17845
+ left,
17846
+ top,
17847
+ width,
17848
+ height
17849
+ } = makeBoundingBoxFromPoints([{
17850
+ x: this.x1,
17851
+ y: this.y1
17852
+ }, {
17853
+ x: this.x2,
17854
+ y: this.y2
17855
+ }]);
17856
+ this.setPositionByOrigin(new Point(left + width / 2, top + height / 2), CENTER, CENTER);
17857
+ }
17637
17858
  }
17638
-
17639
- /**
17640
- * @private
17641
- * @param {String} key
17642
- * @param {*} value
17643
- */
17644
17859
  _set(key, value) {
17860
+ const oldLeft = this.left;
17861
+ const oldTop = this.top;
17645
17862
  super._set(key, value);
17646
17863
  if (coordProps.includes(key)) {
17647
- // this doesn't make sense very much, since setting x1 when top or left
17648
- // are already set, is just going to show a strange result since the
17649
- // line will move way more than the developer expect.
17650
- // in fabric5 it worked only when the line didn't have extra transformations,
17651
- // in fabric6 too. With extra transform they behave bad in different ways.
17652
- // This needs probably a good rework or a tutorial if you have to create a dynamic line
17653
17864
  this._setWidthHeight();
17865
+ this.dirty = true;
17866
+ }
17867
+ if ((key === 'left' || key === 'top') && this.canvas && !this._updatingEndpoints) {
17868
+ const deltaX = this.left - oldLeft;
17869
+ const deltaY = this.top - oldTop;
17870
+ if (deltaX !== 0 || deltaY !== 0) {
17871
+ this._updatingEndpoints = true;
17872
+ this.x1 += deltaX;
17873
+ this.y1 += deltaY;
17874
+ this.x2 += deltaX;
17875
+ this.y2 += deltaY;
17876
+ this._updatingEndpoints = false;
17877
+ }
17654
17878
  }
17655
17879
  return this;
17656
17880
  }
17657
-
17658
- /**
17659
- * @private
17660
- * @param {CanvasRenderingContext2D} ctx Context to render on
17661
- */
17881
+ render(ctx) {
17882
+ if (this._useEndpointCoords) {
17883
+ this._renderDirectly(ctx);
17884
+ return;
17885
+ }
17886
+ super.render(ctx);
17887
+ }
17888
+ _renderDirectly(ctx) {
17889
+ var _this$canvas7, _this$stroke;
17890
+ if (!this.visible) return;
17891
+ ctx.save();
17892
+ const vpt = ((_this$canvas7 = this.canvas) === null || _this$canvas7 === void 0 ? void 0 : _this$canvas7.viewportTransform) || [1, 0, 0, 1, 0, 0];
17893
+ ctx.transform(vpt[0], vpt[1], vpt[2], vpt[3], vpt[4], vpt[5]);
17894
+ ctx.globalAlpha = this.opacity;
17895
+ ctx.strokeStyle = ((_this$stroke = this.stroke) === null || _this$stroke === void 0 ? void 0 : _this$stroke.toString()) || '#000';
17896
+ ctx.lineWidth = this.strokeWidth;
17897
+ ctx.lineCap = this.strokeLineCap || 'butt';
17898
+ ctx.beginPath();
17899
+ ctx.moveTo(this.x1, this.y1);
17900
+ ctx.lineTo(this.x2, this.y2);
17901
+ ctx.stroke();
17902
+ ctx.restore();
17903
+ }
17662
17904
  _render(ctx) {
17905
+ if (this._useEndpointCoords) return;
17663
17906
  ctx.beginPath();
17664
17907
  const p = this.calcLinePoints();
17665
17908
  ctx.moveTo(p.x1, p.y1);
17666
17909
  ctx.lineTo(p.x2, p.y2);
17667
17910
  ctx.lineWidth = this.strokeWidth;
17668
-
17669
- // TODO: test this
17670
- // make sure setting "fill" changes color of a line
17671
- // (by copying fillStyle to strokeStyle, since line is stroked, not filled)
17672
17911
  const origStrokeStyle = ctx.strokeStyle;
17673
17912
  if (isFiller(this.stroke)) {
17674
17913
  ctx.strokeStyle = this.stroke.toLive(ctx);
17675
- } else {
17676
- var _this$stroke;
17677
- ctx.strokeStyle = (_this$stroke = this.stroke) !== null && _this$stroke !== void 0 ? _this$stroke : ctx.fillStyle;
17678
17914
  }
17679
17915
  this.stroke && this._renderStroke(ctx);
17680
17916
  ctx.strokeStyle = origStrokeStyle;
17681
17917
  }
17682
-
17683
- /**
17684
- * This function is an helper for svg import. it returns the center of the object in the svg
17685
- * untransformed coordinates
17686
- * @private
17687
- * @return {Point} center point from element coordinates
17688
- */
17689
17918
  _findCenterFromElement() {
17690
17919
  return new Point((this.x1 + this.x2) / 2, (this.y1 + this.y2) / 2);
17691
17920
  }
17692
-
17693
- /**
17694
- * Returns object representation of an instance
17695
- * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
17696
- * @return {Object} object representation of an instance
17697
- */
17698
17921
  toObject() {
17699
17922
  let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
17700
17923
  return {
@@ -17702,32 +17925,25 @@ class Line extends FabricObject {
17702
17925
  ...this.calcLinePoints()
17703
17926
  };
17704
17927
  }
17705
-
17706
- /*
17707
- * Calculate object dimensions from its properties
17708
- * @private
17709
- */
17710
17928
  _getNonTransformedDimensions() {
17711
17929
  const dim = super._getNonTransformedDimensions();
17712
- if (this.strokeLineCap === 'butt') {
17713
- if (this.width === 0) {
17714
- dim.y -= this.strokeWidth;
17715
- }
17716
- if (this.height === 0) {
17717
- dim.x -= this.strokeWidth;
17718
- }
17930
+ if (this.strokeLineCap === 'round') {
17931
+ dim.x += this.strokeWidth;
17932
+ dim.y += this.strokeWidth;
17719
17933
  }
17720
17934
  return dim;
17721
17935
  }
17722
-
17723
- /**
17724
- * Recalculates line points given width and height
17725
- * Those points are simply placed around the center,
17726
- * This is not useful outside internal render functions and svg output
17727
- * Is not meant to be for the developer.
17728
- * @private
17729
- */
17730
17936
  calcLinePoints() {
17937
+ if (this._updatingEndpoints) {
17938
+ const centerX = (this.x1 + this.x2) / 2;
17939
+ const centerY = (this.y1 + this.y2) / 2;
17940
+ return {
17941
+ x1: this.x1 - centerX,
17942
+ y1: this.y1 - centerY,
17943
+ x2: this.x2 - centerX,
17944
+ y2: this.y2 - centerY
17945
+ };
17946
+ }
17731
17947
  const {
17732
17948
  x1: _x1,
17733
17949
  x2: _x2,
@@ -17736,27 +17952,15 @@ class Line extends FabricObject {
17736
17952
  width,
17737
17953
  height
17738
17954
  } = this;
17739
- const xMult = _x1 <= _x2 ? -1 : 1,
17740
- yMult = _y1 <= _y2 ? -1 : 1,
17741
- x1 = xMult * width / 2,
17742
- y1 = yMult * height / 2,
17743
- x2 = xMult * -width / 2,
17744
- y2 = yMult * -height / 2;
17955
+ const xMult = _x1 <= _x2 ? -1 : 1;
17956
+ const yMult = _y1 <= _y2 ? -1 : 1;
17745
17957
  return {
17746
- x1,
17747
- x2,
17748
- y1,
17749
- y2
17958
+ x1: xMult * width / 2,
17959
+ y1: yMult * height / 2,
17960
+ x2: xMult * -width / 2,
17961
+ y2: yMult * -height / 2
17750
17962
  };
17751
17963
  }
17752
-
17753
- /* _FROM_SVG_START_ */
17754
-
17755
- /**
17756
- * Returns svg representation of an instance
17757
- * @return {Array} an array of strings with the specific svg representation
17758
- * of the instance
17759
- */
17760
17964
  _toSVG() {
17761
17965
  const {
17762
17966
  x1,
@@ -17766,18 +17970,6 @@ class Line extends FabricObject {
17766
17970
  } = this.calcLinePoints();
17767
17971
  return ['<line ', 'COMMON_PARTS', `x1="${x1}" y1="${y1}" x2="${x2}" y2="${y2}" />\n`];
17768
17972
  }
17769
-
17770
- /**
17771
- * List of attribute names to account for when parsing SVG element (used by {@link Line.fromElement})
17772
- * @see http://www.w3.org/TR/SVG/shapes.html#LineElement
17773
- */
17774
-
17775
- /**
17776
- * Returns Line instance from an SVG element
17777
- * @param {HTMLElement} element Element to parse
17778
- * @param {Object} [options] Options object
17779
- * @param {Function} [callback] callback function invoked after parsing
17780
- */
17781
17973
  static async fromElement(element, options, cssRules) {
17782
17974
  const {
17783
17975
  x1 = 0,
@@ -17788,14 +17980,6 @@ class Line extends FabricObject {
17788
17980
  } = parseAttributes(element, this.ATTRIBUTE_NAMES, cssRules);
17789
17981
  return new this([x1, y1, x2, y2], parsedAttributes);
17790
17982
  }
17791
-
17792
- /* _FROM_SVG_END_ */
17793
-
17794
- /**
17795
- * Returns Line instance from an object representation
17796
- * @param {Object} object Object to create an instance from
17797
- * @returns {Promise<Line>}
17798
- */
17799
17983
  static fromObject(_ref) {
17800
17984
  let {
17801
17985
  x1,
@@ -17812,32 +17996,195 @@ class Line extends FabricObject {
17812
17996
  });
17813
17997
  }
17814
17998
  }
17999
+ _defineProperty(Line, "type", 'Line');
18000
+ _defineProperty(Line, "cacheProperties", [...cacheProperties, ...coordProps]);
18001
+ _defineProperty(Line, "ATTRIBUTE_NAMES", SHARED_ATTRIBUTES.concat(coordProps));
18002
+ classRegistry.setClass(Line);
18003
+ classRegistry.setSVGClass(Line);
18004
+
17815
18005
  /**
17816
- * x value or first line edge
17817
- * @type number
18006
+ * Calculate the distance between two points
17818
18007
  */
18008
+ function pointDistance(p1, p2) {
18009
+ return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));
18010
+ }
18011
+
17819
18012
  /**
17820
- * y value or first line edge
17821
- * @type number
18013
+ * Normalize a vector
17822
18014
  */
18015
+ function normalizeVector(vector) {
18016
+ const length = Math.sqrt(vector.x * vector.x + vector.y * vector.y);
18017
+ if (length === 0) return {
18018
+ x: 0,
18019
+ y: 0
18020
+ };
18021
+ return {
18022
+ x: vector.x / length,
18023
+ y: vector.y / length
18024
+ };
18025
+ }
18026
+
17823
18027
  /**
17824
- * x value or second line edge
17825
- * @type number
18028
+ * Get the maximum allowed radius for a corner based on adjacent edge lengths
17826
18029
  */
18030
+ function getMaxRadius(prevPoint, currentPoint, nextPoint) {
18031
+ const dist1 = pointDistance(prevPoint, currentPoint);
18032
+ const dist2 = pointDistance(currentPoint, nextPoint);
18033
+ return Math.min(dist1, dist2) / 2;
18034
+ }
18035
+
17827
18036
  /**
17828
- * y value or second line edge
17829
- * @type number
18037
+ * Calculate rounded corner data for a single corner
17830
18038
  */
17831
- _defineProperty(Line, "type", 'Line');
17832
- _defineProperty(Line, "cacheProperties", [...cacheProperties, ...coordProps]);
17833
- _defineProperty(Line, "ATTRIBUTE_NAMES", SHARED_ATTRIBUTES.concat(coordProps));
17834
- classRegistry.setClass(Line);
17835
- classRegistry.setSVGClass(Line);
18039
+ function calculateRoundedCorner(prevPoint, currentPoint, nextPoint, radius) {
18040
+ // Calculate edge vectors
18041
+ const edge1 = {
18042
+ x: currentPoint.x - prevPoint.x,
18043
+ y: currentPoint.y - prevPoint.y
18044
+ };
18045
+ const edge2 = {
18046
+ x: nextPoint.x - currentPoint.x,
18047
+ y: nextPoint.y - currentPoint.y
18048
+ };
18049
+
18050
+ // Normalize edge vectors
18051
+ const norm1 = normalizeVector(edge1);
18052
+ const norm2 = normalizeVector(edge2);
18053
+
18054
+ // Calculate the maximum allowed radius
18055
+ const maxRadius = getMaxRadius(prevPoint, currentPoint, nextPoint);
18056
+ const actualRadius = Math.min(radius, maxRadius);
18057
+
18058
+ // Calculate start and end points of the rounded corner
18059
+ const startPoint = {
18060
+ x: currentPoint.x - norm1.x * actualRadius,
18061
+ y: currentPoint.y - norm1.y * actualRadius
18062
+ };
18063
+ const endPoint = {
18064
+ x: currentPoint.x + norm2.x * actualRadius,
18065
+ y: currentPoint.y + norm2.y * actualRadius
18066
+ };
18067
+
18068
+ // Calculate control points for bezier curve
18069
+ // Using the magic number kRect for optimal circular approximation
18070
+ const controlOffset = actualRadius * kRect;
18071
+ const cp1 = {
18072
+ x: startPoint.x + norm1.x * controlOffset,
18073
+ y: startPoint.y + norm1.y * controlOffset
18074
+ };
18075
+ const cp2 = {
18076
+ x: endPoint.x - norm2.x * controlOffset,
18077
+ y: endPoint.y - norm2.y * controlOffset
18078
+ };
18079
+ return {
18080
+ corner: currentPoint,
18081
+ start: startPoint,
18082
+ end: endPoint,
18083
+ cp1,
18084
+ cp2,
18085
+ actualRadius
18086
+ };
18087
+ }
18088
+
18089
+ /**
18090
+ * Apply corner radius to a polygon defined by points
18091
+ */
18092
+ function applyCornerRadiusToPolygon(points, radius) {
18093
+ let radiusAsPercentage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
18094
+ if (points.length < 3) {
18095
+ throw new Error('Polygon must have at least 3 points');
18096
+ }
18097
+
18098
+ // Calculate bounding box if radius is percentage-based
18099
+ let actualRadius = radius;
18100
+ if (radiusAsPercentage) {
18101
+ const minX = Math.min(...points.map(p => p.x));
18102
+ const maxX = Math.max(...points.map(p => p.x));
18103
+ const minY = Math.min(...points.map(p => p.y));
18104
+ const maxY = Math.max(...points.map(p => p.y));
18105
+ const width = maxX - minX;
18106
+ const height = maxY - minY;
18107
+ const minDimension = Math.min(width, height);
18108
+ actualRadius = radius / 100 * minDimension;
18109
+ }
18110
+ const roundedCorners = [];
18111
+ for (let i = 0; i < points.length; i++) {
18112
+ const prevIndex = (i - 1 + points.length) % points.length;
18113
+ const nextIndex = (i + 1) % points.length;
18114
+ const prevPoint = points[prevIndex];
18115
+ const currentPoint = points[i];
18116
+ const nextPoint = points[nextIndex];
18117
+ const roundedCorner = calculateRoundedCorner(prevPoint, currentPoint, nextPoint, actualRadius);
18118
+ roundedCorners.push(roundedCorner);
18119
+ }
18120
+ return roundedCorners;
18121
+ }
18122
+
18123
+ /**
18124
+ * Render a rounded polygon to a canvas context
18125
+ */
18126
+ function renderRoundedPolygon(ctx, roundedCorners) {
18127
+ let closed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
18128
+ if (roundedCorners.length === 0) return;
18129
+ ctx.beginPath();
18130
+
18131
+ // Start at the first corner's start point
18132
+ const firstCorner = roundedCorners[0];
18133
+ ctx.moveTo(firstCorner.start.x, firstCorner.start.y);
18134
+ for (let i = 0; i < roundedCorners.length; i++) {
18135
+ const corner = roundedCorners[i];
18136
+ const nextIndex = (i + 1) % roundedCorners.length;
18137
+ const nextCorner = roundedCorners[nextIndex];
18138
+
18139
+ // Draw the rounded corner using bezier curve
18140
+ ctx.bezierCurveTo(corner.cp1.x, corner.cp1.y, corner.cp2.x, corner.cp2.y, corner.end.x, corner.end.y);
18141
+
18142
+ // Draw line to next corner's start point (if not the last segment in open path)
18143
+ if (i < roundedCorners.length - 1 || closed) {
18144
+ ctx.lineTo(nextCorner.start.x, nextCorner.start.y);
18145
+ }
18146
+ }
18147
+ if (closed) {
18148
+ ctx.closePath();
18149
+ }
18150
+ }
18151
+
18152
+ /**
18153
+ * Generate SVG path data for a rounded polygon
18154
+ */
18155
+ function generateRoundedPolygonPath(roundedCorners) {
18156
+ let closed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
18157
+ if (roundedCorners.length === 0) return '';
18158
+ const pathData = [];
18159
+ const firstCorner = roundedCorners[0];
18160
+
18161
+ // Move to first corner's start point
18162
+ pathData.push(`M ${firstCorner.start.x} ${firstCorner.start.y}`);
18163
+ for (let i = 0; i < roundedCorners.length; i++) {
18164
+ const corner = roundedCorners[i];
18165
+ const nextIndex = (i + 1) % roundedCorners.length;
18166
+ const nextCorner = roundedCorners[nextIndex];
18167
+
18168
+ // Add bezier curve for the rounded corner
18169
+ pathData.push(`C ${corner.cp1.x} ${corner.cp1.y} ${corner.cp2.x} ${corner.cp2.y} ${corner.end.x} ${corner.end.y}`);
18170
+
18171
+ // Add line to next corner's start point (if not the last segment in open path)
18172
+ if (i < roundedCorners.length - 1 || closed) {
18173
+ pathData.push(`L ${nextCorner.start.x} ${nextCorner.start.y}`);
18174
+ }
18175
+ }
18176
+ if (closed) {
18177
+ pathData.push('Z');
18178
+ }
18179
+ return pathData.join(' ');
18180
+ }
17836
18181
 
17837
18182
  const triangleDefaultValues = {
17838
18183
  width: 100,
17839
- height: 100
18184
+ height: 100,
18185
+ cornerRadius: 0
17840
18186
  };
18187
+ const TRIANGLE_PROPS = ['cornerRadius'];
17841
18188
  class Triangle extends FabricObject {
17842
18189
  static getDefaults() {
17843
18190
  return {
@@ -17856,34 +18203,90 @@ class Triangle extends FabricObject {
17856
18203
  this.setOptions(options);
17857
18204
  }
17858
18205
 
18206
+ /**
18207
+ * Get triangle points as an array of XY coordinates
18208
+ * @private
18209
+ */
18210
+ _getTrianglePoints() {
18211
+ const widthBy2 = this.width / 2;
18212
+ const heightBy2 = this.height / 2;
18213
+ return [{
18214
+ x: -widthBy2,
18215
+ y: heightBy2
18216
+ },
18217
+ // bottom left
18218
+ {
18219
+ x: 0,
18220
+ y: -heightBy2
18221
+ },
18222
+ // top center
18223
+ {
18224
+ x: widthBy2,
18225
+ y: heightBy2
18226
+ } // bottom right
18227
+ ];
18228
+ }
18229
+
17859
18230
  /**
17860
18231
  * @private
17861
18232
  * @param {CanvasRenderingContext2D} ctx Context to render on
17862
18233
  */
17863
18234
  _render(ctx) {
17864
- const widthBy2 = this.width / 2,
17865
- heightBy2 = this.height / 2;
17866
- ctx.beginPath();
17867
- ctx.moveTo(-widthBy2, heightBy2);
17868
- ctx.lineTo(0, -heightBy2);
17869
- ctx.lineTo(widthBy2, heightBy2);
17870
- ctx.closePath();
18235
+ if (this.cornerRadius > 0) {
18236
+ // Render rounded triangle
18237
+ const points = this._getTrianglePoints();
18238
+ const roundedCorners = applyCornerRadiusToPolygon(points, this.cornerRadius);
18239
+ renderRoundedPolygon(ctx, roundedCorners, true);
18240
+ } else {
18241
+ // Render sharp triangle (original implementation)
18242
+ const widthBy2 = this.width / 2;
18243
+ const heightBy2 = this.height / 2;
18244
+ ctx.beginPath();
18245
+ ctx.moveTo(-widthBy2, heightBy2);
18246
+ ctx.lineTo(0, -heightBy2);
18247
+ ctx.lineTo(widthBy2, heightBy2);
18248
+ ctx.closePath();
18249
+ }
17871
18250
  this._renderPaintInOrder(ctx);
17872
18251
  }
17873
18252
 
18253
+ /**
18254
+ * Returns object representation of an instance
18255
+ * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
18256
+ * @return {Object} object representation of an instance
18257
+ */
18258
+ toObject() {
18259
+ let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
18260
+ return super.toObject([...TRIANGLE_PROPS, ...propertiesToInclude]);
18261
+ }
18262
+
17874
18263
  /**
17875
18264
  * Returns svg representation of an instance
17876
18265
  * @return {Array} an array of strings with the specific svg representation
17877
18266
  * of the instance
17878
18267
  */
17879
18268
  _toSVG() {
17880
- const widthBy2 = this.width / 2,
17881
- heightBy2 = this.height / 2,
17882
- points = `${-widthBy2} ${heightBy2},0 ${-heightBy2},${widthBy2} ${heightBy2}`;
17883
- return ['<polygon ', 'COMMON_PARTS', 'points="', points, '" />'];
18269
+ if (this.cornerRadius > 0) {
18270
+ // Generate rounded triangle as path
18271
+ const points = this._getTrianglePoints();
18272
+ const roundedCorners = applyCornerRadiusToPolygon(points, this.cornerRadius);
18273
+ const pathData = generateRoundedPolygonPath(roundedCorners, true);
18274
+ return ['<path ', 'COMMON_PARTS', `d="${pathData}" />`];
18275
+ } else {
18276
+ // Original sharp triangle implementation
18277
+ const widthBy2 = this.width / 2;
18278
+ const heightBy2 = this.height / 2;
18279
+ const points = `${-widthBy2} ${heightBy2},0 ${-heightBy2},${widthBy2} ${heightBy2}`;
18280
+ return ['<polygon ', 'COMMON_PARTS', 'points="', points, '" />'];
18281
+ }
17884
18282
  }
17885
18283
  }
18284
+ /**
18285
+ * Corner radius for rounded triangle corners
18286
+ * @type Number
18287
+ */
17886
18288
  _defineProperty(Triangle, "type", 'Triangle');
18289
+ _defineProperty(Triangle, "cacheProperties", [...cacheProperties, ...TRIANGLE_PROPS]);
17887
18290
  _defineProperty(Triangle, "ownDefaults", triangleDefaultValues);
17888
18291
  classRegistry.setClass(Triangle);
17889
18292
  classRegistry.setSVGClass(Triangle);
@@ -18048,7 +18451,8 @@ const polylineDefaultValues = {
18048
18451
  /**
18049
18452
  * @deprecated transient option soon to be removed in favor of a different design
18050
18453
  */
18051
- exactBoundingBox: false
18454
+ exactBoundingBox: false,
18455
+ cornerRadius: 0
18052
18456
  };
18053
18457
  class Polyline extends FabricObject {
18054
18458
  static getDefaults() {
@@ -18262,7 +18666,7 @@ class Polyline extends FabricObject {
18262
18666
  toObject() {
18263
18667
  let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
18264
18668
  return {
18265
- ...super.toObject(propertiesToInclude),
18669
+ ...super.toObject(['cornerRadius', ...propertiesToInclude]),
18266
18670
  points: this.points.map(_ref => {
18267
18671
  let {
18268
18672
  x,
@@ -18282,14 +18686,28 @@ class Polyline extends FabricObject {
18282
18686
  * of the instance
18283
18687
  */
18284
18688
  _toSVG() {
18285
- const points = [],
18286
- diffX = this.pathOffset.x,
18287
- diffY = this.pathOffset.y,
18288
- NUM_FRACTION_DIGITS = config.NUM_FRACTION_DIGITS;
18289
- for (let i = 0, len = this.points.length; i < len; i++) {
18290
- points.push(toFixed(this.points[i].x - diffX, NUM_FRACTION_DIGITS), ',', toFixed(this.points[i].y - diffY, NUM_FRACTION_DIGITS), ' ');
18689
+ if (this.cornerRadius > 0 && this.points.length >= 3) {
18690
+ // Generate rounded polygon/polyline as path
18691
+ const diffX = this.pathOffset.x;
18692
+ const diffY = this.pathOffset.y;
18693
+ const adjustedPoints = this.points.map(point => ({
18694
+ x: point.x - diffX,
18695
+ y: point.y - diffY
18696
+ }));
18697
+ const roundedCorners = applyCornerRadiusToPolygon(adjustedPoints, this.cornerRadius);
18698
+ const pathData = generateRoundedPolygonPath(roundedCorners, !this.isOpen());
18699
+ return ['<path ', 'COMMON_PARTS', `d="${pathData}" />\n`];
18700
+ } else {
18701
+ // Original sharp corners implementation
18702
+ const points = [];
18703
+ const diffX = this.pathOffset.x;
18704
+ const diffY = this.pathOffset.y;
18705
+ const NUM_FRACTION_DIGITS = config.NUM_FRACTION_DIGITS;
18706
+ for (let i = 0, len = this.points.length; i < len; i++) {
18707
+ points.push(toFixed(this.points[i].x - diffX, NUM_FRACTION_DIGITS), ',', toFixed(this.points[i].y - diffY, NUM_FRACTION_DIGITS), ' ');
18708
+ }
18709
+ return [`<${this.constructor.type.toLowerCase()} `, 'COMMON_PARTS', `points="${points.join('')}" />\n`];
18291
18710
  }
18292
- return [`<${this.constructor.type.toLowerCase()} `, 'COMMON_PARTS', `points="${points.join('')}" />\n`];
18293
18711
  }
18294
18712
 
18295
18713
  /**
@@ -18305,13 +18723,24 @@ class Polyline extends FabricObject {
18305
18723
  // NaN comes from parseFloat of a empty string in parser
18306
18724
  return;
18307
18725
  }
18308
- ctx.beginPath();
18309
- ctx.moveTo(this.points[0].x - x, this.points[0].y - y);
18310
- for (let i = 0; i < len; i++) {
18311
- const point = this.points[i];
18312
- ctx.lineTo(point.x - x, point.y - y);
18726
+ if (this.cornerRadius > 0 && len >= 3) {
18727
+ // Render with rounded corners
18728
+ const adjustedPoints = this.points.map(point => ({
18729
+ x: point.x - x,
18730
+ y: point.y - y
18731
+ }));
18732
+ const roundedCorners = applyCornerRadiusToPolygon(adjustedPoints, this.cornerRadius);
18733
+ renderRoundedPolygon(ctx, roundedCorners, !this.isOpen());
18734
+ } else {
18735
+ // Original sharp corners implementation
18736
+ ctx.beginPath();
18737
+ ctx.moveTo(this.points[0].x - x, this.points[0].y - y);
18738
+ for (let i = 0; i < len; i++) {
18739
+ const point = this.points[i];
18740
+ ctx.lineTo(point.x - x, point.y - y);
18741
+ }
18742
+ !this.isOpen() && ctx.closePath();
18313
18743
  }
18314
- !this.isOpen() && ctx.closePath();
18315
18744
  this._renderPaintInOrder(ctx);
18316
18745
  }
18317
18746
 
@@ -18376,10 +18805,15 @@ class Polyline extends FabricObject {
18376
18805
  * @type Boolean
18377
18806
  * @default false
18378
18807
  */
18808
+ /**
18809
+ * Corner radius for rounded corners
18810
+ * @type Number
18811
+ * @default 0
18812
+ */
18379
18813
  _defineProperty(Polyline, "ownDefaults", polylineDefaultValues);
18380
18814
  _defineProperty(Polyline, "type", 'Polyline');
18381
18815
  _defineProperty(Polyline, "layoutProperties", [SKEW_X, SKEW_Y, 'strokeLineCap', 'strokeLineJoin', 'strokeMiterLimit', 'strokeWidth', 'strokeUniform', 'points']);
18382
- _defineProperty(Polyline, "cacheProperties", [...cacheProperties, 'points']);
18816
+ _defineProperty(Polyline, "cacheProperties", [...cacheProperties, 'points', 'cornerRadius']);
18383
18817
  _defineProperty(Polyline, "ATTRIBUTE_NAMES", [...SHARED_ATTRIBUTES]);
18384
18818
  classRegistry.setClass(Polyline);
18385
18819
  classRegistry.setSVGClass(Polyline);
@@ -18673,8 +19107,8 @@ _defineProperty(StyledText, "_styleProperties", styleProperties);
18673
19107
  // Global measurement context - reused for performance
18674
19108
  let measurementContext = null;
18675
19109
 
18676
- /**
18677
- * Get or create the shared measurement context
19110
+ /**
19111
+ * Get or create the shared measurement context
18678
19112
  */
18679
19113
  function getMeasurementContext() {
18680
19114
  if (!measurementContext) {
@@ -18687,8 +19121,8 @@ function getMeasurementContext() {
18687
19121
  return measurementContext;
18688
19122
  }
18689
19123
 
18690
- /**
18691
- * Measure a single grapheme
19124
+ /**
19125
+ * Measure a single grapheme
18692
19126
  */
18693
19127
  function measureGrapheme(grapheme, options, ctx) {
18694
19128
  // Check cache first
@@ -18721,8 +19155,8 @@ function measureGrapheme(grapheme, options, ctx) {
18721
19155
  return measurement;
18722
19156
  }
18723
19157
 
18724
- /**
18725
- * Measure a grapheme with kerning relative to previous character
19158
+ /**
19159
+ * Measure a grapheme with kerning relative to previous character
18726
19160
  */
18727
19161
  function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
18728
19162
  // Get individual measurement
@@ -18763,8 +19197,8 @@ function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
18763
19197
  };
18764
19198
  }
18765
19199
 
18766
- /**
18767
- * Get font metrics for layout calculations
19200
+ /**
19201
+ * Get font metrics for layout calculations
18768
19202
  */
18769
19203
  function getFontMetrics(options) {
18770
19204
  var _metrics$fontBounding, _metrics$fontBounding2, _metrics$actualBoundi, _metrics$actualBoundi2;
@@ -18799,8 +19233,8 @@ function getFontMetrics(options) {
18799
19233
  return result;
18800
19234
  }
18801
19235
 
18802
- /**
18803
- * Apply font styling to canvas context
19236
+ /**
19237
+ * Apply font styling to canvas context
18804
19238
  */
18805
19239
  function applyFontStyle(ctx, options) {
18806
19240
  const fontDeclaration = getFontDeclaration(options);
@@ -18817,8 +19251,8 @@ function applyFontStyle(ctx, options) {
18817
19251
  ctx.textBaseline = 'alphabetic';
18818
19252
  }
18819
19253
 
18820
- /**
18821
- * Generate font declaration string
19254
+ /**
19255
+ * Generate font declaration string
18822
19256
  */
18823
19257
  function getFontDeclaration(options) {
18824
19258
  const {
@@ -18833,8 +19267,8 @@ function getFontDeclaration(options) {
18833
19267
  return `${fontStyle} ${fontWeight} ${fontSize}px ${normalizedFamily}`;
18834
19268
  }
18835
19269
 
18836
- /**
18837
- * LRU Cache implementation for measurements
19270
+ /**
19271
+ * LRU Cache implementation for measurements
18838
19272
  */
18839
19273
  class LRUCache {
18840
19274
  constructor() {
@@ -18896,8 +19330,8 @@ class LRUCache {
18896
19330
  }
18897
19331
  }
18898
19332
 
18899
- /**
18900
- * Advanced measurement cache with font-aware keys
19333
+ /**
19334
+ * Advanced measurement cache with font-aware keys
18901
19335
  */
18902
19336
  class MeasurementCache {
18903
19337
  constructor() {
@@ -18924,8 +19358,8 @@ class MeasurementCache {
18924
19358
  }
18925
19359
  }
18926
19360
 
18927
- /**
18928
- * Kerning cache for character pairs
19361
+ /**
19362
+ * Kerning cache for character pairs
18929
19363
  */
18930
19364
  class KerningCache {
18931
19365
  constructor() {
@@ -18953,8 +19387,8 @@ class KerningCache {
18953
19387
  }
18954
19388
  }
18955
19389
 
18956
- /**
18957
- * Font metrics cache
19390
+ /**
19391
+ * Font metrics cache
18958
19392
  */
18959
19393
  class FontMetricsCache {
18960
19394
  constructor() {
@@ -18981,17 +19415,17 @@ const measurementCache = new MeasurementCache();
18981
19415
  const kerningCache = new KerningCache();
18982
19416
  const fontMetricsCache = new FontMetricsCache();
18983
19417
 
18984
- /**
18985
- * Unicode and Internationalization Support
18986
- *
18987
- * Enhanced Unicode handling for complex scripts, RTL/LTR text,
18988
- * and grapheme cluster boundary detection.
19418
+ /**
19419
+ * Unicode and Internationalization Support
19420
+ *
19421
+ * Enhanced Unicode handling for complex scripts, RTL/LTR text,
19422
+ * and grapheme cluster boundary detection.
18989
19423
  */
18990
19424
 
18991
19425
 
18992
- /**
18993
- * Enhanced grapheme segmentation using Intl.Segmenter when available
18994
- * with fallback to existing graphemeSplit implementation
19426
+ /**
19427
+ * Enhanced grapheme segmentation using Intl.Segmenter when available
19428
+ * with fallback to existing graphemeSplit implementation
18995
19429
  */
18996
19430
  function segmentGraphemes(text) {
18997
19431
  // Use native Intl.Segmenter if available
@@ -19011,15 +19445,15 @@ function segmentGraphemes(text) {
19011
19445
  return graphemeSplit(text);
19012
19446
  }
19013
19447
 
19014
- /**
19015
- * Ellipsis Text Truncation System
19016
- *
19017
- * Implements text truncation with ellipsis when content exceeds bounds,
19018
- * using binary search for optimal truncation points.
19448
+ /**
19449
+ * Ellipsis Text Truncation System
19450
+ *
19451
+ * Implements text truncation with ellipsis when content exceeds bounds,
19452
+ * using binary search for optimal truncation points.
19019
19453
  */
19020
19454
 
19021
- /**
19022
- * Apply ellipsis truncation to text based on width/height constraints
19455
+ /**
19456
+ * Apply ellipsis truncation to text based on width/height constraints
19023
19457
  */
19024
19458
  function applyEllipsis(text, options) {
19025
19459
  const {
@@ -19089,8 +19523,8 @@ function applyEllipsis(text, options) {
19089
19523
  };
19090
19524
  }
19091
19525
 
19092
- /**
19093
- * Truncate text based on width constraint using binary search
19526
+ /**
19527
+ * Truncate text based on width constraint using binary search
19094
19528
  */
19095
19529
  function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn) {
19096
19530
  const graphemes = segmentGraphemes(text);
@@ -19140,8 +19574,8 @@ function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn)
19140
19574
  };
19141
19575
  }
19142
19576
 
19143
- /**
19144
- * Truncate text based on height constraint
19577
+ /**
19578
+ * Truncate text based on height constraint
19145
19579
  */
19146
19580
  function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
19147
19581
  var _measureFn;
@@ -19189,19 +19623,19 @@ function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
19189
19623
  return truncateByWidth(lines[0], firstLineWidth, ellipsisChar, 0, measureFn);
19190
19624
  }
19191
19625
 
19192
- /**
19193
- * Core Text Layout Engine
19194
- *
19195
- * Implements Konva-compatible text layout with support for:
19196
- * - Multiple wrap modes (word/char/none)
19197
- * - Ellipsis truncation
19198
- * - Justify alignment with proper space distribution
19199
- * - RTL/LTR text direction
19200
- * - Advanced grapheme handling
19626
+ /**
19627
+ * Core Text Layout Engine
19628
+ *
19629
+ * Implements Konva-compatible text layout with support for:
19630
+ * - Multiple wrap modes (word/char/none)
19631
+ * - Ellipsis truncation
19632
+ * - Justify alignment with proper space distribution
19633
+ * - RTL/LTR text direction
19634
+ * - Advanced grapheme handling
19201
19635
  */
19202
19636
 
19203
- /**
19204
- * Main text layout function - converts text and options into positioned layout
19637
+ /**
19638
+ * Main text layout function - converts text and options into positioned layout
19205
19639
  */
19206
19640
  function layoutText(options) {
19207
19641
  var _ellipsisResult;
@@ -19320,8 +19754,8 @@ function layoutText(options) {
19320
19754
  };
19321
19755
  }
19322
19756
 
19323
- /**
19324
- * Layout a single paragraph with wrapping
19757
+ /**
19758
+ * Layout a single paragraph with wrapping
19325
19759
  */
19326
19760
  function layoutParagraph(text, options) {
19327
19761
  const {
@@ -19356,8 +19790,8 @@ function layoutParagraph(text, options) {
19356
19790
  return layoutLines;
19357
19791
  }
19358
19792
 
19359
- /**
19360
- * Layout a single line of text (no wrapping)
19793
+ /**
19794
+ * Layout a single line of text (no wrapping)
19361
19795
  */
19362
19796
  function layoutSingleLine(text, options) {
19363
19797
  let textOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
@@ -19427,8 +19861,8 @@ function layoutSingleLine(text, options) {
19427
19861
  };
19428
19862
  }
19429
19863
 
19430
- /**
19431
- * Word-based wrapping algorithm
19864
+ /**
19865
+ * Word-based wrapping algorithm
19432
19866
  */
19433
19867
  function wrapByWords(text, maxWidth, options) {
19434
19868
  const lines = [];
@@ -19461,8 +19895,8 @@ function wrapByWords(text, maxWidth, options) {
19461
19895
  return lines.length > 0 ? lines : [''];
19462
19896
  }
19463
19897
 
19464
- /**
19465
- * Character-based wrapping algorithm
19898
+ /**
19899
+ * Character-based wrapping algorithm
19466
19900
  */
19467
19901
  function wrapByCharacters(text, maxWidth, options) {
19468
19902
  const lines = [];
@@ -19484,8 +19918,8 @@ function wrapByCharacters(text, maxWidth, options) {
19484
19918
  return lines.length > 0 ? lines : [''];
19485
19919
  }
19486
19920
 
19487
- /**
19488
- * Apply text alignment to lines
19921
+ /**
19922
+ * Apply text alignment to lines
19489
19923
  */
19490
19924
  function applyAlignment(lines, align, containerWidth, options) {
19491
19925
  return lines.map(line => {
@@ -19519,8 +19953,8 @@ function applyAlignment(lines, align, containerWidth, options) {
19519
19953
  });
19520
19954
  }
19521
19955
 
19522
- /**
19523
- * Apply justify alignment by expanding spaces
19956
+ /**
19957
+ * Apply justify alignment by expanding spaces
19524
19958
  */
19525
19959
  function applyJustification(line, containerWidth, options) {
19526
19960
  const spaces = line.graphemes.filter(g => /\s/.test(g)).length;
@@ -19543,8 +19977,8 @@ function applyJustification(line, containerWidth, options) {
19543
19977
  return line;
19544
19978
  }
19545
19979
 
19546
- /**
19547
- * Calculate vertical alignment offset
19980
+ /**
19981
+ * Calculate vertical alignment offset
19548
19982
  */
19549
19983
  function calculateVerticalOffset(contentHeight, containerHeight, align) {
19550
19984
  switch (align) {
@@ -19558,8 +19992,8 @@ function calculateVerticalOffset(contentHeight, containerHeight, align) {
19558
19992
  }
19559
19993
  }
19560
19994
 
19561
- /**
19562
- * Handle height overflow with ellipsis
19995
+ /**
19996
+ * Handle height overflow with ellipsis
19563
19997
  */
19564
19998
  function handleHeightOverflow(existingLines, overflowLine, remainingHeight, options) {
19565
19999
  // If ellipsis is enabled, try to fit part of the overflow line
@@ -19588,8 +20022,8 @@ function handleHeightOverflow(existingLines, overflowLine, remainingHeight, opti
19588
20022
  };
19589
20023
  }
19590
20024
 
19591
- /**
19592
- * Create empty line for empty paragraphs
20025
+ /**
20026
+ * Create empty line for empty paragraphs
19593
20027
  */
19594
20028
  function createEmptyLine(options) {
19595
20029
  const height = options.fontSize * options.lineHeight;
@@ -19605,8 +20039,8 @@ function createEmptyLine(options) {
19605
20039
  };
19606
20040
  }
19607
20041
 
19608
- /**
19609
- * Measure width of a line of text
20042
+ /**
20043
+ * Measure width of a line of text
19610
20044
  */
19611
20045
  function measureLineWidth(text, options) {
19612
20046
  const graphemes = segmentGraphemes(text);
@@ -19623,8 +20057,8 @@ function measureLineWidth(text, options) {
19623
20057
  return width;
19624
20058
  }
19625
20059
 
19626
- /**
19627
- * Convert layout options to measurement options
20060
+ /**
20061
+ * Convert layout options to measurement options
19628
20062
  */
19629
20063
  function createMeasurementOptions(options) {
19630
20064
  return {
@@ -19867,15 +20301,15 @@ class TextSVGExportMixin extends FabricObjectSVGExportMixin {
19867
20301
  }
19868
20302
  }
19869
20303
 
19870
- /**
19871
- * Browser Line Break Extraction
19872
- *
19873
- * Captures exact line breaks as rendered by the browser to ensure
19874
- * pixel-perfect consistency between DOM editing and canvas rendering.
20304
+ /**
20305
+ * Browser Line Break Extraction
20306
+ *
20307
+ * Captures exact line breaks as rendered by the browser to ensure
20308
+ * pixel-perfect consistency between DOM editing and canvas rendering.
19875
20309
  */
19876
20310
 
19877
- /**
19878
- * Segment text into graphemes safely using Intl.Segmenter or fallback
20311
+ /**
20312
+ * Segment text into graphemes safely using Intl.Segmenter or fallback
19879
20313
  */
19880
20314
  function segmentIntoGraphemes(text) {
19881
20315
  if (typeof Intl !== 'undefined' && Intl.Segmenter) {
@@ -19889,9 +20323,9 @@ function segmentIntoGraphemes(text) {
19889
20323
  return Array.from(text);
19890
20324
  }
19891
20325
 
19892
- /**
19893
- * Extract line break information from a textarea by creating a mirror element
19894
- * with identical computed styles and measuring grapheme positions.
20326
+ /**
20327
+ * Extract line break information from a textarea by creating a mirror element
20328
+ * with identical computed styles and measuring grapheme positions.
19895
20329
  */
19896
20330
  function extractLinesFromDOM(textarea) {
19897
20331
  const text = textarea.value;
@@ -19986,16 +20420,16 @@ function extractLinesFromDOM(textarea) {
19986
20420
  }
19987
20421
  }
19988
20422
 
19989
- /**
19990
- * Create a hash of layout-affecting properties to detect when browser lines are still valid
20423
+ /**
20424
+ * Create a hash of layout-affecting properties to detect when browser lines are still valid
19991
20425
  */
19992
20426
  function createLayoutHash(target) {
19993
20427
  const properties = [target.text, target.width, target.height, target.fontFamily, target.fontSize, target.fontWeight, target.fontStyle, target.lineHeight, target.charSpacing, target.textAlign, target.direction];
19994
20428
  return properties.map(p => String(p)).join('|');
19995
20429
  }
19996
20430
 
19997
- /**
19998
- * Check if stored browser lines are still valid for the current target state
20431
+ /**
20432
+ * Check if stored browser lines are still valid for the current target state
19999
20433
  */
20000
20434
  function areBrowserLinesValid(target, storedHash) {
20001
20435
  if (!storedHash || !target.__lastBrowserLines) {
@@ -20005,24 +20439,24 @@ function areBrowserLinesValid(target, storedHash) {
20005
20439
  return currentHash === storedHash;
20006
20440
  }
20007
20441
 
20008
- /**
20009
- * Store browser lines on a target object with validity hash
20442
+ /**
20443
+ * Store browser lines on a target object with validity hash
20010
20444
  */
20011
20445
  function storeBrowserLines(target, lines, layoutHash) {
20012
20446
  target.__lastBrowserLines = lines;
20013
20447
  target.__lastBrowserLinesHash = createLayoutHash(target);
20014
20448
  }
20015
20449
 
20016
- /**
20017
- * Clear stored browser lines from a target object
20450
+ /**
20451
+ * Clear stored browser lines from a target object
20018
20452
  */
20019
20453
  function clearBrowserLines(target) {
20020
20454
  delete target.__lastBrowserLines;
20021
20455
  delete target.__lastBrowserLinesHash;
20022
20456
  }
20023
20457
 
20024
- /**
20025
- * Get stored browser lines if they're still valid
20458
+ /**
20459
+ * Get stored browser lines if they're still valid
20026
20460
  */
20027
20461
  function getBrowserLines(target) {
20028
20462
  const lines = target.__lastBrowserLines;
@@ -20035,9 +20469,9 @@ function getBrowserLines(target) {
20035
20469
 
20036
20470
  let measuringContext;
20037
20471
 
20038
- /**
20039
- * Return a context for measurement of text string.
20040
- * if created it gets stored for reuse
20472
+ /**
20473
+ * Return a context for measurement of text string.
20474
+ * if created it gets stored for reuse
20041
20475
  */
20042
20476
  function getMeasuringContext() {
20043
20477
  if (!measuringContext) {
@@ -20050,17 +20484,17 @@ function getMeasuringContext() {
20050
20484
  return measuringContext;
20051
20485
  }
20052
20486
 
20053
- /**
20054
- * Measure and return the info of a single grapheme.
20055
- * needs the the info of previous graphemes already filled
20056
- * Override to customize measuring
20487
+ /**
20488
+ * Measure and return the info of a single grapheme.
20489
+ * needs the the info of previous graphemes already filled
20490
+ * Override to customize measuring
20057
20491
  */
20058
20492
 
20059
20493
  // @TODO this is not complete
20060
20494
 
20061
- /**
20062
- * Text class
20063
- * @see {@link http://fabricjs.com/fabric-intro-part-2#text}
20495
+ /**
20496
+ * Text class
20497
+ * @see {@link http://fabricjs.com/fabric-intro-part-2#text}
20064
20498
  */
20065
20499
  class FabricText extends StyledText {
20066
20500
  static getDefaults() {
@@ -20071,11 +20505,11 @@ class FabricText extends StyledText {
20071
20505
  }
20072
20506
  constructor(text, options) {
20073
20507
  super();
20074
- /**
20075
- * contains characters bounding boxes
20076
- * This variable is considered to be protected.
20077
- * But for how mixins are implemented right now, we can't leave it private
20078
- * @protected
20508
+ /**
20509
+ * contains characters bounding boxes
20510
+ * This variable is considered to be protected.
20511
+ * But for how mixins are implemented right now, we can't leave it private
20512
+ * @protected
20079
20513
  */
20080
20514
  _defineProperty(this, "__charBounds", []);
20081
20515
  Object.assign(this, FabricText.ownDefaults);
@@ -20092,9 +20526,9 @@ class FabricText extends StyledText {
20092
20526
  this.setCoords();
20093
20527
  }
20094
20528
 
20095
- /**
20096
- * If text has a path, it will add the extra information needed
20097
- * for path and text calculations
20529
+ /**
20530
+ * If text has a path, it will add the extra information needed
20531
+ * for path and text calculations
20098
20532
  */
20099
20533
  setPathInfo() {
20100
20534
  const path = this.path;
@@ -20103,10 +20537,10 @@ class FabricText extends StyledText {
20103
20537
  }
20104
20538
  }
20105
20539
 
20106
- /**
20107
- * @private
20108
- * Divides text into lines of text and lines of graphemes.
20109
- * Uses browser lines when available for pixel-perfect consistency.
20540
+ /**
20541
+ * @private
20542
+ * Divides text into lines of text and lines of graphemes.
20543
+ * Uses browser lines when available for pixel-perfect consistency.
20110
20544
  */
20111
20545
  _splitText() {
20112
20546
  // Check if we have valid browser lines and should use them
@@ -20122,9 +20556,9 @@ class FabricText extends StyledText {
20122
20556
  return newLines;
20123
20557
  }
20124
20558
 
20125
- /**
20126
- * Create TextLinesInfo from browser-extracted lines
20127
- * @private
20559
+ /**
20560
+ * Create TextLinesInfo from browser-extracted lines
20561
+ * @private
20128
20562
  */
20129
20563
  _splitTextFromBrowserLines(browserLines) {
20130
20564
  const lines = [];
@@ -20158,10 +20592,10 @@ class FabricText extends StyledText {
20158
20592
  return result;
20159
20593
  }
20160
20594
 
20161
- /**
20162
- * Initialize or update text dimensions.
20163
- * Updates this.width and this.height with the proper values.
20164
- * Does not return dimensions.
20595
+ /**
20596
+ * Initialize or update text dimensions.
20597
+ * Updates this.width and this.height with the proper values.
20598
+ * Does not return dimensions.
20165
20599
  */
20166
20600
  initDimensions() {
20167
20601
  // Use advanced layout if enabled
@@ -20184,8 +20618,8 @@ class FabricText extends StyledText {
20184
20618
  }
20185
20619
  }
20186
20620
 
20187
- /**
20188
- * Enlarge space boxes and shift the others
20621
+ /**
20622
+ * Enlarge space boxes and shift the others
20189
20623
  */
20190
20624
  enlargeSpaces() {
20191
20625
  let diffSpace, currentLineWidth, numberOfSpaces, accumulatedSpace, line, charBound, spaces;
@@ -20244,18 +20678,18 @@ class FabricText extends StyledText {
20244
20678
  }
20245
20679
  }
20246
20680
 
20247
- /**
20248
- * Advanced layout using new text engine (Konva-compatible)
20249
- * @private
20681
+ /**
20682
+ * Advanced layout using new text engine (Konva-compatible)
20683
+ * @private
20250
20684
  */
20251
20685
  _layoutTextAdvanced() {
20252
20686
  const options = this._getAdvancedLayoutOptions();
20253
20687
  return layoutText(options);
20254
20688
  }
20255
20689
 
20256
- /**
20257
- * Get advanced layout options from current text properties
20258
- * @private
20690
+ /**
20691
+ * Get advanced layout options from current text properties
20692
+ * @private
20259
20693
  */
20260
20694
  _getAdvancedLayoutOptions() {
20261
20695
  return {
@@ -20277,9 +20711,9 @@ class FabricText extends StyledText {
20277
20711
  };
20278
20712
  }
20279
20713
 
20280
- /**
20281
- * Map Fabric textAlign to Konva align format
20282
- * @private
20714
+ /**
20715
+ * Map Fabric textAlign to Konva align format
20716
+ * @private
20283
20717
  */
20284
20718
  _mapTextAlignToAlign(textAlign) {
20285
20719
  switch (textAlign) {
@@ -20300,8 +20734,8 @@ class FabricText extends StyledText {
20300
20734
  }
20301
20735
  }
20302
20736
 
20303
- /**
20304
- * Enhanced initDimensions that uses advanced layout when enabled
20737
+ /**
20738
+ * Enhanced initDimensions that uses advanced layout when enabled
20305
20739
  */
20306
20740
  initDimensionsAdvanced() {
20307
20741
  if (!this.enableAdvancedLayout) {
@@ -20318,9 +20752,9 @@ class FabricText extends StyledText {
20318
20752
  this.dirty = true;
20319
20753
  }
20320
20754
 
20321
- /**
20322
- * Convert new layout format to legacy _textLines and __charBounds format
20323
- * @private
20755
+ /**
20756
+ * Convert new layout format to legacy _textLines and __charBounds format
20757
+ * @private
20324
20758
  */
20325
20759
  _convertLayoutToLegacyFormat(layout) {
20326
20760
  this._textLines = layout.lines.map(line => line.graphemes);
@@ -20342,30 +20776,30 @@ class FabricText extends StyledText {
20342
20776
  }
20343
20777
  }
20344
20778
 
20345
- /**
20346
- * Detect if the text line is ended with an hard break
20347
- * text and itext do not have wrapping, return false
20348
- * @return {Boolean}
20779
+ /**
20780
+ * Detect if the text line is ended with an hard break
20781
+ * text and itext do not have wrapping, return false
20782
+ * @return {Boolean}
20349
20783
  */
20350
20784
  isEndOfWrapping(lineIndex) {
20351
20785
  return lineIndex === this._textLines.length - 1;
20352
20786
  }
20353
20787
 
20354
- /**
20355
- * Detect if a line has a linebreak and so we need to account for it when moving
20356
- * and counting style.
20357
- * It return always 1 for text and Itext. Textbox has its own implementation
20358
- * @return Number
20788
+ /**
20789
+ * Detect if a line has a linebreak and so we need to account for it when moving
20790
+ * and counting style.
20791
+ * It return always 1 for text and Itext. Textbox has its own implementation
20792
+ * @return Number
20359
20793
  */
20360
20794
 
20361
20795
  missingNewlineOffset(_lineIndex) {
20362
20796
  return 1;
20363
20797
  }
20364
20798
 
20365
- /**
20366
- * Returns 2d representation (lineIndex and charIndex) of cursor
20367
- * @param {Number} selectionStart
20368
- * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
20799
+ /**
20800
+ * Returns 2d representation (lineIndex and charIndex) of cursor
20801
+ * @param {Number} selectionStart
20802
+ * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
20369
20803
  */
20370
20804
  get2DCursorLocation(selectionStart, skipWrapping) {
20371
20805
  const lines = skipWrapping ? this._unwrappedTextLines : this._textLines;
@@ -20385,24 +20819,24 @@ class FabricText extends StyledText {
20385
20819
  };
20386
20820
  }
20387
20821
 
20388
- /**
20389
- * Returns string representation of an instance
20390
- * @return {String} String representation of text object
20822
+ /**
20823
+ * Returns string representation of an instance
20824
+ * @return {String} String representation of text object
20391
20825
  */
20392
20826
  toString() {
20393
20827
  return `#<Text (${this.complexity()}): { "text": "${this.text}", "fontFamily": "${this.fontFamily}" }>`;
20394
20828
  }
20395
20829
 
20396
- /**
20397
- * Return the dimension and the zoom level needed to create a cache canvas
20398
- * big enough to host the object to be cached.
20399
- * @private
20400
- * @param {Object} dim.x width of object to be cached
20401
- * @param {Object} dim.y height of object to be cached
20402
- * @return {Object}.width width of canvas
20403
- * @return {Object}.height height of canvas
20404
- * @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
20405
- * @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
20830
+ /**
20831
+ * Return the dimension and the zoom level needed to create a cache canvas
20832
+ * big enough to host the object to be cached.
20833
+ * @private
20834
+ * @param {Object} dim.x width of object to be cached
20835
+ * @param {Object} dim.y height of object to be cached
20836
+ * @return {Object}.width width of canvas
20837
+ * @return {Object}.height height of canvas
20838
+ * @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
20839
+ * @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
20406
20840
  */
20407
20841
  _getCacheCanvasDimensions() {
20408
20842
  const dims = super._getCacheCanvasDimensions();
@@ -20412,9 +20846,9 @@ class FabricText extends StyledText {
20412
20846
  return dims;
20413
20847
  }
20414
20848
 
20415
- /**
20416
- * @private
20417
- * @param {CanvasRenderingContext2D} ctx Context to render on
20849
+ /**
20850
+ * @private
20851
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20418
20852
  */
20419
20853
  _render(ctx) {
20420
20854
  const path = this.path;
@@ -20427,9 +20861,9 @@ class FabricText extends StyledText {
20427
20861
  this._renderTextDecoration(ctx, 'linethrough');
20428
20862
  }
20429
20863
 
20430
- /**
20431
- * @private
20432
- * @param {CanvasRenderingContext2D} ctx Context to render on
20864
+ /**
20865
+ * @private
20866
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20433
20867
  */
20434
20868
  _renderText(ctx) {
20435
20869
  // Skip text rendering if in overlay editing mode
@@ -20445,15 +20879,15 @@ class FabricText extends StyledText {
20445
20879
  }
20446
20880
  }
20447
20881
 
20448
- /**
20449
- * Set the font parameter of the context with the object properties or with charStyle
20450
- * @private
20451
- * @param {CanvasRenderingContext2D} ctx Context to render on
20452
- * @param {Object} [charStyle] object with font style properties
20453
- * @param {String} [charStyle.fontFamily] Font Family
20454
- * @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
20455
- * @param {String} [charStyle.fontWeight] Font weight
20456
- * @param {String} [charStyle.fontStyle] Font style (italic|normal)
20882
+ /**
20883
+ * Set the font parameter of the context with the object properties or with charStyle
20884
+ * @private
20885
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20886
+ * @param {Object} [charStyle] object with font style properties
20887
+ * @param {String} [charStyle.fontFamily] Font Family
20888
+ * @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
20889
+ * @param {String} [charStyle.fontWeight] Font weight
20890
+ * @param {String} [charStyle.fontStyle] Font style (italic|normal)
20457
20891
  */
20458
20892
  _setTextStyles(ctx, charStyle, forMeasuring) {
20459
20893
  ctx.textBaseline = 'alphabetic';
@@ -20473,11 +20907,11 @@ class FabricText extends StyledText {
20473
20907
  ctx.font = this._getFontDeclaration(charStyle, forMeasuring);
20474
20908
  }
20475
20909
 
20476
- /**
20477
- * calculate and return the text Width measuring each line.
20478
- * @private
20479
- * @param {CanvasRenderingContext2D} ctx Context to render on
20480
- * @return {Number} Maximum width of Text object
20910
+ /**
20911
+ * calculate and return the text Width measuring each line.
20912
+ * @private
20913
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20914
+ * @return {Number} Maximum width of Text object
20481
20915
  */
20482
20916
  calcTextWidth() {
20483
20917
  let maxWidth = this.getLineWidth(0);
@@ -20490,23 +20924,23 @@ class FabricText extends StyledText {
20490
20924
  return maxWidth;
20491
20925
  }
20492
20926
 
20493
- /**
20494
- * @private
20495
- * @param {String} method Method name ("fillText" or "strokeText")
20496
- * @param {CanvasRenderingContext2D} ctx Context to render on
20497
- * @param {String} line Text to render
20498
- * @param {Number} left Left position of text
20499
- * @param {Number} top Top position of text
20500
- * @param {Number} lineIndex Index of a line in a text
20927
+ /**
20928
+ * @private
20929
+ * @param {String} method Method name ("fillText" or "strokeText")
20930
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20931
+ * @param {String} line Text to render
20932
+ * @param {Number} left Left position of text
20933
+ * @param {Number} top Top position of text
20934
+ * @param {Number} lineIndex Index of a line in a text
20501
20935
  */
20502
20936
  _renderTextLine(method, ctx, line, left, top, lineIndex) {
20503
20937
  this._renderChars(method, ctx, line, left, top, lineIndex);
20504
20938
  }
20505
20939
 
20506
- /**
20507
- * Renders the text background for lines, taking care of style
20508
- * @private
20509
- * @param {CanvasRenderingContext2D} ctx Context to render on
20940
+ /**
20941
+ * Renders the text background for lines, taking care of style
20942
+ * @private
20943
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20510
20944
  */
20511
20945
  _renderTextLinesBackground(ctx) {
20512
20946
  if (!this.textBackgroundColor && !this.styleHas('textBackgroundColor')) {
@@ -20569,15 +21003,15 @@ class FabricText extends StyledText {
20569
21003
  this._removeShadow(ctx);
20570
21004
  }
20571
21005
 
20572
- /**
20573
- * measure and return the width of a single character.
20574
- * possibly overridden to accommodate different measure logic or
20575
- * to hook some external lib for character measurement
20576
- * @private
20577
- * @param {String} _char, char to be measured
20578
- * @param {Object} charStyle style of char to be measured
20579
- * @param {String} [previousChar] previous char
20580
- * @param {Object} [prevCharStyle] style of previous char
21006
+ /**
21007
+ * measure and return the width of a single character.
21008
+ * possibly overridden to accommodate different measure logic or
21009
+ * to hook some external lib for character measurement
21010
+ * @private
21011
+ * @param {String} _char, char to be measured
21012
+ * @param {Object} charStyle style of char to be measured
21013
+ * @param {String} [previousChar] previous char
21014
+ * @param {Object} [prevCharStyle] style of previous char
20581
21015
  */
20582
21016
  _measureChar(_char, charStyle, previousChar, prevCharStyle) {
20583
21017
  const fontCache = cache.getFontCache(charStyle),
@@ -20622,19 +21056,19 @@ class FabricText extends StyledText {
20622
21056
  };
20623
21057
  }
20624
21058
 
20625
- /**
20626
- * Computes height of character at given position
20627
- * @param {Number} line the line index number
20628
- * @param {Number} _char the character index number
20629
- * @return {Number} fontSize of the character
21059
+ /**
21060
+ * Computes height of character at given position
21061
+ * @param {Number} line the line index number
21062
+ * @param {Number} _char the character index number
21063
+ * @return {Number} fontSize of the character
20630
21064
  */
20631
21065
  getHeightOfChar(line, _char) {
20632
21066
  return this.getValueOfPropertyAt(line, _char, 'fontSize');
20633
21067
  }
20634
21068
 
20635
- /**
20636
- * measure a text line measuring all characters.
20637
- * @param {Number} lineIndex line number
21069
+ /**
21070
+ * measure a text line measuring all characters.
21071
+ * @param {Number} lineIndex line number
20638
21072
  */
20639
21073
  measureLine(lineIndex) {
20640
21074
  const lineInfo = this._measureLine(lineIndex);
@@ -20647,11 +21081,11 @@ class FabricText extends StyledText {
20647
21081
  return lineInfo;
20648
21082
  }
20649
21083
 
20650
- /**
20651
- * measure every grapheme of a line, populating __charBounds
20652
- * @param {Number} lineIndex
20653
- * @return {Object} object.width total width of characters
20654
- * @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
21084
+ /**
21085
+ * measure every grapheme of a line, populating __charBounds
21086
+ * @param {Number} lineIndex
21087
+ * @return {Object} object.width total width of characters
21088
+ * @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
20655
21089
  */
20656
21090
  _measureLine(lineIndex) {
20657
21091
  let width = 0,
@@ -20714,13 +21148,13 @@ class FabricText extends StyledText {
20714
21148
  };
20715
21149
  }
20716
21150
 
20717
- /**
20718
- * Calculate the angle and the left,top position of the char that follow a path.
20719
- * It appends it to graphemeInfo to be reused later at rendering
20720
- * @private
20721
- * @param {Number} positionInPath to be measured
20722
- * @param {GraphemeBBox} graphemeInfo current grapheme box information
20723
- * @param {Object} startingPoint position of the point
21151
+ /**
21152
+ * Calculate the angle and the left,top position of the char that follow a path.
21153
+ * It appends it to graphemeInfo to be reused later at rendering
21154
+ * @private
21155
+ * @param {Number} positionInPath to be measured
21156
+ * @param {GraphemeBBox} graphemeInfo current grapheme box information
21157
+ * @param {Object} startingPoint position of the point
20724
21158
  */
20725
21159
  _setGraphemeOnPath(positionInPath, graphemeInfo) {
20726
21160
  const centerPosition = positionInPath + graphemeInfo.kernedWidth / 2,
@@ -20733,13 +21167,13 @@ class FabricText extends StyledText {
20733
21167
  graphemeInfo.angle = info.angle + (this.pathSide === RIGHT ? Math.PI : 0);
20734
21168
  }
20735
21169
 
20736
- /**
20737
- *
20738
- * @param {String} grapheme to be measured
20739
- * @param {Number} lineIndex index of the line where the char is
20740
- * @param {Number} charIndex position in the line
20741
- * @param {String} [prevGrapheme] character preceding the one to be measured
20742
- * @returns {GraphemeBBox} grapheme bbox
21170
+ /**
21171
+ *
21172
+ * @param {String} grapheme to be measured
21173
+ * @param {Number} lineIndex index of the line where the char is
21174
+ * @param {Number} charIndex position in the line
21175
+ * @param {String} [prevGrapheme] character preceding the one to be measured
21176
+ * @returns {GraphemeBBox} grapheme bbox
20743
21177
  */
20744
21178
  _getGraphemeBox(grapheme, lineIndex, charIndex, prevGrapheme, skipLeft) {
20745
21179
  const style = this.getCompleteStyleDeclaration(lineIndex, charIndex),
@@ -20767,10 +21201,10 @@ class FabricText extends StyledText {
20767
21201
  return box;
20768
21202
  }
20769
21203
 
20770
- /**
20771
- * Calculate height of line at 'lineIndex'
20772
- * @param {Number} lineIndex index of line to calculate
20773
- * @return {Number}
21204
+ /**
21205
+ * Calculate height of line at 'lineIndex'
21206
+ * @param {Number} lineIndex index of line to calculate
21207
+ * @return {Number}
20774
21208
  */
20775
21209
  getHeightOfLine(lineIndex) {
20776
21210
  if (this.__lineHeights[lineIndex]) {
@@ -20786,8 +21220,8 @@ class FabricText extends StyledText {
20786
21220
  return this.__lineHeights[lineIndex] = maxHeight * this.lineHeight * this._fontSizeMult;
20787
21221
  }
20788
21222
 
20789
- /**
20790
- * Calculate text box height
21223
+ /**
21224
+ * Calculate text box height
20791
21225
  */
20792
21226
  calcTextHeight() {
20793
21227
  let lineHeight,
@@ -20799,26 +21233,26 @@ class FabricText extends StyledText {
20799
21233
  return height;
20800
21234
  }
20801
21235
 
20802
- /**
20803
- * @private
20804
- * @return {Number} Left offset
21236
+ /**
21237
+ * @private
21238
+ * @return {Number} Left offset
20805
21239
  */
20806
21240
  _getLeftOffset() {
20807
21241
  return this.direction === 'ltr' ? -this.width / 2 : this.width / 2;
20808
21242
  }
20809
21243
 
20810
- /**
20811
- * @private
20812
- * @return {Number} Top offset
21244
+ /**
21245
+ * @private
21246
+ * @return {Number} Top offset
20813
21247
  */
20814
21248
  _getTopOffset() {
20815
21249
  return -this.height / 2;
20816
21250
  }
20817
21251
 
20818
- /**
20819
- * @private
20820
- * @param {CanvasRenderingContext2D} ctx Context to render on
20821
- * @param {String} method Method name ("fillText" or "strokeText")
21252
+ /**
21253
+ * @private
21254
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21255
+ * @param {String} method Method name ("fillText" or "strokeText")
20822
21256
  */
20823
21257
  _renderTextCommon(ctx, method) {
20824
21258
  ctx.save();
@@ -20835,9 +21269,9 @@ class FabricText extends StyledText {
20835
21269
  ctx.restore();
20836
21270
  }
20837
21271
 
20838
- /**
20839
- * @private
20840
- * @param {CanvasRenderingContext2D} ctx Context to render on
21272
+ /**
21273
+ * @private
21274
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20841
21275
  */
20842
21276
  _renderTextFill(ctx) {
20843
21277
  if (!this.fill && !this.styleHas(FILL)) {
@@ -20846,9 +21280,9 @@ class FabricText extends StyledText {
20846
21280
  this._renderTextCommon(ctx, 'fillText');
20847
21281
  }
20848
21282
 
20849
- /**
20850
- * @private
20851
- * @param {CanvasRenderingContext2D} ctx Context to render on
21283
+ /**
21284
+ * @private
21285
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20852
21286
  */
20853
21287
  _renderTextStroke(ctx) {
20854
21288
  if ((!this.stroke || this.strokeWidth === 0) && this.isEmptyStyles()) {
@@ -20865,14 +21299,14 @@ class FabricText extends StyledText {
20865
21299
  ctx.restore();
20866
21300
  }
20867
21301
 
20868
- /**
20869
- * @private
20870
- * @param {String} method fillText or strokeText.
20871
- * @param {CanvasRenderingContext2D} ctx Context to render on
20872
- * @param {Array} line Content of the line, splitted in an array by grapheme
20873
- * @param {Number} left
20874
- * @param {Number} top
20875
- * @param {Number} lineIndex
21302
+ /**
21303
+ * @private
21304
+ * @param {String} method fillText or strokeText.
21305
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21306
+ * @param {Array} line Content of the line, splitted in an array by grapheme
21307
+ * @param {Number} left
21308
+ * @param {Number} top
21309
+ * @param {Number} lineIndex
20876
21310
  */
20877
21311
  _renderChars(method, ctx, line, left, top, lineIndex) {
20878
21312
  const lineHeight = this.getHeightOfLine(lineIndex),
@@ -20954,16 +21388,16 @@ class FabricText extends StyledText {
20954
21388
  ctx.restore();
20955
21389
  }
20956
21390
 
20957
- /**
20958
- * This function try to patch the missing gradientTransform on canvas gradients.
20959
- * transforming a context to transform the gradient, is going to transform the stroke too.
20960
- * we want to transform the gradient but not the stroke operation, so we create
20961
- * a transformed gradient on a pattern and then we use the pattern instead of the gradient.
20962
- * this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
20963
- * is limited.
20964
- * @private
20965
- * @param {TFiller} filler a fabric gradient instance
20966
- * @return {CanvasPattern} a pattern to use as fill/stroke style
21391
+ /**
21392
+ * This function try to patch the missing gradientTransform on canvas gradients.
21393
+ * transforming a context to transform the gradient, is going to transform the stroke too.
21394
+ * we want to transform the gradient but not the stroke operation, so we create
21395
+ * a transformed gradient on a pattern and then we use the pattern instead of the gradient.
21396
+ * this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
21397
+ * is limited.
21398
+ * @private
21399
+ * @param {TFiller} filler a fabric gradient instance
21400
+ * @return {CanvasPattern} a pattern to use as fill/stroke style
20967
21401
  */
20968
21402
  _applyPatternGradientTransformText(filler) {
20969
21403
  // TODO: verify compatibility with strokeUniform
@@ -21019,12 +21453,12 @@ class FabricText extends StyledText {
21019
21453
  };
21020
21454
  }
21021
21455
 
21022
- /**
21023
- * This function prepare the canvas for a stroke style, and stroke and strokeWidth
21024
- * need to be sent in as defined
21025
- * @param {CanvasRenderingContext2D} ctx
21026
- * @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
21027
- * @returns
21456
+ /**
21457
+ * This function prepare the canvas for a stroke style, and stroke and strokeWidth
21458
+ * need to be sent in as defined
21459
+ * @param {CanvasRenderingContext2D} ctx
21460
+ * @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
21461
+ * @returns
21028
21462
  */
21029
21463
  _setStrokeStyles(ctx, _ref) {
21030
21464
  let {
@@ -21039,12 +21473,12 @@ class FabricText extends StyledText {
21039
21473
  return this.handleFiller(ctx, 'strokeStyle', stroke);
21040
21474
  }
21041
21475
 
21042
- /**
21043
- * This function prepare the canvas for a ill style, and fill
21044
- * need to be sent in as defined
21045
- * @param {CanvasRenderingContext2D} ctx
21046
- * @param {CompleteTextStyleDeclaration} style with ill defined
21047
- * @returns
21476
+ /**
21477
+ * This function prepare the canvas for a ill style, and fill
21478
+ * need to be sent in as defined
21479
+ * @param {CanvasRenderingContext2D} ctx
21480
+ * @param {CompleteTextStyleDeclaration} style with ill defined
21481
+ * @returns
21048
21482
  */
21049
21483
  _setFillStyles(ctx, _ref2) {
21050
21484
  let {
@@ -21053,16 +21487,16 @@ class FabricText extends StyledText {
21053
21487
  return this.handleFiller(ctx, 'fillStyle', fill);
21054
21488
  }
21055
21489
 
21056
- /**
21057
- * @private
21058
- * @param {String} method
21059
- * @param {CanvasRenderingContext2D} ctx Context to render on
21060
- * @param {Number} lineIndex
21061
- * @param {Number} charIndex
21062
- * @param {String} _char
21063
- * @param {Number} left Left coordinate
21064
- * @param {Number} top Top coordinate
21065
- * @param {Number} lineHeight Height of the line
21490
+ /**
21491
+ * @private
21492
+ * @param {String} method
21493
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21494
+ * @param {Number} lineIndex
21495
+ * @param {Number} charIndex
21496
+ * @param {String} _char
21497
+ * @param {Number} left Left coordinate
21498
+ * @param {Number} top Top coordinate
21499
+ * @param {Number} lineHeight Height of the line
21066
21500
  */
21067
21501
  _renderChar(method, ctx, lineIndex, charIndex, _char, left, top) {
21068
21502
  const decl = this._getStyleDeclaration(lineIndex, charIndex),
@@ -21091,30 +21525,30 @@ class FabricText extends StyledText {
21091
21525
  ctx.restore();
21092
21526
  }
21093
21527
 
21094
- /**
21095
- * Turns the character into a 'superior figure' (i.e. 'superscript')
21096
- * @param {Number} start selection start
21097
- * @param {Number} end selection end
21528
+ /**
21529
+ * Turns the character into a 'superior figure' (i.e. 'superscript')
21530
+ * @param {Number} start selection start
21531
+ * @param {Number} end selection end
21098
21532
  */
21099
21533
  setSuperscript(start, end) {
21100
21534
  this._setScript(start, end, this.superscript);
21101
21535
  }
21102
21536
 
21103
- /**
21104
- * Turns the character into an 'inferior figure' (i.e. 'subscript')
21105
- * @param {Number} start selection start
21106
- * @param {Number} end selection end
21537
+ /**
21538
+ * Turns the character into an 'inferior figure' (i.e. 'subscript')
21539
+ * @param {Number} start selection start
21540
+ * @param {Number} end selection end
21107
21541
  */
21108
21542
  setSubscript(start, end) {
21109
21543
  this._setScript(start, end, this.subscript);
21110
21544
  }
21111
21545
 
21112
- /**
21113
- * Applies 'schema' at given position
21114
- * @private
21115
- * @param {Number} start selection start
21116
- * @param {Number} end selection end
21117
- * @param {Number} schema
21546
+ /**
21547
+ * Applies 'schema' at given position
21548
+ * @private
21549
+ * @param {Number} start selection start
21550
+ * @param {Number} end selection end
21551
+ * @param {Number} schema
21118
21552
  */
21119
21553
  _setScript(start, end, schema) {
21120
21554
  const loc = this.get2DCursorLocation(start, true),
@@ -21127,10 +21561,10 @@ class FabricText extends StyledText {
21127
21561
  this.setSelectionStyles(style, start, end);
21128
21562
  }
21129
21563
 
21130
- /**
21131
- * @private
21132
- * @param {Number} lineIndex index text line
21133
- * @return {Number} Line left offset
21564
+ /**
21565
+ * @private
21566
+ * @param {Number} lineIndex index text line
21567
+ * @return {Number} Line left offset
21134
21568
  */
21135
21569
  _getLineLeftOffset(lineIndex) {
21136
21570
  const lineWidth = this.getLineWidth(lineIndex),
@@ -21180,8 +21614,8 @@ class FabricText extends StyledText {
21180
21614
  return leftOffset;
21181
21615
  }
21182
21616
 
21183
- /**
21184
- * @private
21617
+ /**
21618
+ * @private
21185
21619
  */
21186
21620
  _clearCache() {
21187
21621
  this._forceClearCache = false;
@@ -21190,12 +21624,12 @@ class FabricText extends StyledText {
21190
21624
  this.__charBounds = [];
21191
21625
  }
21192
21626
 
21193
- /**
21194
- * Measure a single line given its index. Used to calculate the initial
21195
- * text bounding box. The values are calculated and stored in __lineWidths cache.
21196
- * @private
21197
- * @param {Number} lineIndex line number
21198
- * @return {Number} Line width
21627
+ /**
21628
+ * Measure a single line given its index. Used to calculate the initial
21629
+ * text bounding box. The values are calculated and stored in __lineWidths cache.
21630
+ * @private
21631
+ * @param {Number} lineIndex line number
21632
+ * @return {Number} Line width
21199
21633
  */
21200
21634
  getLineWidth(lineIndex) {
21201
21635
  if (this.__lineWidths[lineIndex] !== undefined) {
@@ -21214,12 +21648,12 @@ class FabricText extends StyledText {
21214
21648
  return 0;
21215
21649
  }
21216
21650
 
21217
- /**
21218
- * Retrieves the value of property at given character position
21219
- * @param {Number} lineIndex the line number
21220
- * @param {Number} charIndex the character number
21221
- * @param {String} property the property name
21222
- * @returns the value of 'property'
21651
+ /**
21652
+ * Retrieves the value of property at given character position
21653
+ * @param {Number} lineIndex the line number
21654
+ * @param {Number} charIndex the character number
21655
+ * @param {String} property the property name
21656
+ * @returns the value of 'property'
21223
21657
  */
21224
21658
  getValueOfPropertyAt(lineIndex, charIndex, property) {
21225
21659
  var _charStyle$property;
@@ -21227,9 +21661,9 @@ class FabricText extends StyledText {
21227
21661
  return (_charStyle$property = charStyle[property]) !== null && _charStyle$property !== void 0 ? _charStyle$property : this[property];
21228
21662
  }
21229
21663
 
21230
- /**
21231
- * @private
21232
- * @param {CanvasRenderingContext2D} ctx Context to render on
21664
+ /**
21665
+ * @private
21666
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21233
21667
  */
21234
21668
  _renderTextDecoration(ctx, type) {
21235
21669
  if (!this[type] && !this.styleHas(type)) {
@@ -21313,10 +21747,10 @@ class FabricText extends StyledText {
21313
21747
  this._removeShadow(ctx);
21314
21748
  }
21315
21749
 
21316
- /**
21317
- * return font declaration string for canvas context
21318
- * @param {Object} [styleObject] object
21319
- * @returns {String} font declaration formatted for canvas context.
21750
+ /**
21751
+ * return font declaration string for canvas context
21752
+ * @param {Object} [styleObject] object
21753
+ * @returns {String} font declaration formatted for canvas context.
21320
21754
  */
21321
21755
  _getFontDeclaration() {
21322
21756
  let {
@@ -21330,9 +21764,9 @@ class FabricText extends StyledText {
21330
21764
  return [fontStyle, fontWeight, `${forMeasuring ? this.CACHE_FONT_SIZE : fontSize}px`, parsedFontFamily].join(' ');
21331
21765
  }
21332
21766
 
21333
- /**
21334
- * Renders text instance on a specified context
21335
- * @param {CanvasRenderingContext2D} ctx Context to render on
21767
+ /**
21768
+ * Renders text instance on a specified context
21769
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21336
21770
  */
21337
21771
  render(ctx) {
21338
21772
  if (!this.visible) {
@@ -21347,22 +21781,22 @@ class FabricText extends StyledText {
21347
21781
  super.render(ctx);
21348
21782
  }
21349
21783
 
21350
- /**
21351
- * Override this method to customize grapheme splitting
21352
- * @todo the util `graphemeSplit` needs to be injectable in some way.
21353
- * is more comfortable to inject the correct util rather than having to override text
21354
- * in the middle of the prototype chain
21355
- * @param {string} value
21356
- * @returns {string[]} array of graphemes
21784
+ /**
21785
+ * Override this method to customize grapheme splitting
21786
+ * @todo the util `graphemeSplit` needs to be injectable in some way.
21787
+ * is more comfortable to inject the correct util rather than having to override text
21788
+ * in the middle of the prototype chain
21789
+ * @param {string} value
21790
+ * @returns {string[]} array of graphemes
21357
21791
  */
21358
21792
  graphemeSplit(value) {
21359
21793
  return graphemeSplit(value);
21360
21794
  }
21361
21795
 
21362
- /**
21363
- * Returns the text as an array of lines.
21364
- * @param {String} text text to split
21365
- * @returns Lines in the text
21796
+ /**
21797
+ * Returns the text as an array of lines.
21798
+ * @param {String} text text to split
21799
+ * @returns Lines in the text
21366
21800
  */
21367
21801
  _splitTextIntoLines(text) {
21368
21802
  const lines = text.split(this._reNewline),
@@ -21382,10 +21816,10 @@ class FabricText extends StyledText {
21382
21816
  };
21383
21817
  }
21384
21818
 
21385
- /**
21386
- * Returns object representation of an instance
21387
- * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
21388
- * @return {Object} Object representation of an instance
21819
+ /**
21820
+ * Returns object representation of an instance
21821
+ * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
21822
+ * @return {Object} Object representation of an instance
21389
21823
  */
21390
21824
  toObject() {
21391
21825
  let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
@@ -21428,23 +21862,23 @@ class FabricText extends StyledText {
21428
21862
  return this;
21429
21863
  }
21430
21864
 
21431
- /**
21432
- * Returns complexity of an instance
21433
- * @return {Number} complexity
21865
+ /**
21866
+ * Returns complexity of an instance
21867
+ * @return {Number} complexity
21434
21868
  */
21435
21869
  complexity() {
21436
21870
  return 1;
21437
21871
  }
21438
21872
 
21439
- /**
21440
- * List of generic font families
21441
- * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
21873
+ /**
21874
+ * List of generic font families
21875
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
21442
21876
  */
21443
-
21444
- /**
21445
- * Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
21446
- * @param {HTMLElement} element Element to parse
21447
- * @param {Object} [options] Options object
21877
+
21878
+ /**
21879
+ * Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
21880
+ * @param {HTMLElement} element Element to parse
21881
+ * @param {Object} [options] Options object
21448
21882
  */
21449
21883
  static async fromElement(element, options, cssRules) {
21450
21884
  const parsedAttributes = parseAttributes(element, FabricText.ATTRIBUTE_NAMES, cssRules);
@@ -21483,10 +21917,10 @@ class FabricText extends StyledText {
21483
21917
  scaledDiff = lineHeightDiff * textHeightScaleFactor,
21484
21918
  textHeight = text.getScaledHeight() + scaledDiff;
21485
21919
  let offX = 0;
21486
- /*
21487
- Adjust positioning:
21488
- x/y attributes in SVG correspond to the bottom-left corner of text bounding box
21489
- fabric output by default at top, left.
21920
+ /*
21921
+ Adjust positioning:
21922
+ x/y attributes in SVG correspond to the bottom-left corner of text bounding box
21923
+ fabric output by default at top, left.
21490
21924
  */
21491
21925
  if (textAnchor === CENTER) {
21492
21926
  offX = text.getScaledWidth() / 2;
@@ -21504,10 +21938,10 @@ class FabricText extends StyledText {
21504
21938
 
21505
21939
  /* _FROM_SVG_END_ */
21506
21940
 
21507
- /**
21508
- * Returns FabricText instance from an object representation
21509
- * @param {Object} object plain js Object to create an instance from
21510
- * @returns {Promise<FabricText>}
21941
+ /**
21942
+ * Returns FabricText instance from an object representation
21943
+ * @param {Object} object plain js Object to create an instance from
21944
+ * @returns {Promise<FabricText>}
21511
21945
  */
21512
21946
  static fromObject(object) {
21513
21947
  return this._fromObject({
@@ -21518,10 +21952,10 @@ class FabricText extends StyledText {
21518
21952
  });
21519
21953
  }
21520
21954
  }
21521
- /**
21522
- * Properties that requires a text layout recalculation when changed
21523
- * @type string[]
21524
- * @protected
21955
+ /**
21956
+ * Properties that requires a text layout recalculation when changed
21957
+ * @type string[]
21958
+ * @protected
21525
21959
  */
21526
21960
  _defineProperty(FabricText, "textLayoutProperties", textLayoutProperties);
21527
21961
  _defineProperty(FabricText, "cacheProperties", [...cacheProperties, ...additionalProps]);
@@ -21529,9 +21963,9 @@ _defineProperty(FabricText, "ownDefaults", textDefaultValues);
21529
21963
  _defineProperty(FabricText, "type", 'Text');
21530
21964
  _defineProperty(FabricText, "genericFonts", ['serif', 'sans-serif', 'monospace', 'cursive', 'fantasy', 'system-ui', 'ui-serif', 'ui-sans-serif', 'ui-monospace', 'ui-rounded', 'math', 'emoji', 'fangsong']);
21531
21965
  /* _FROM_SVG_START_ */
21532
- /**
21533
- * List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
21534
- * @see: http://www.w3.org/TR/SVG/text.html#TextElement
21966
+ /**
21967
+ * List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
21968
+ * @see: http://www.w3.org/TR/SVG/text.html#TextElement
21535
21969
  */
21536
21970
  _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'));
21537
21971
  applyMixins(FabricText, [TextSVGExportMixin]);
@@ -21918,8 +22352,8 @@ class OverlayEditor {
21918
22352
  // We don't need to save/restore them here as it would conflict with IText's restoration
21919
22353
  }
21920
22354
 
21921
- /**
21922
- * Get the container element for the overlay (parent of upperCanvasEl)
22355
+ /**
22356
+ * Get the container element for the overlay (parent of upperCanvasEl)
21923
22357
  */
21924
22358
  getCanvasContainer() {
21925
22359
  const upperCanvas = this.canvas.upperCanvasEl;
@@ -21933,8 +22367,8 @@ class OverlayEditor {
21933
22367
  return container;
21934
22368
  }
21935
22369
 
21936
- /**
21937
- * Create the overlay DOM structure
22370
+ /**
22371
+ * Create the overlay DOM structure
21938
22372
  */
21939
22373
  createOverlayDOM() {
21940
22374
  // Host div for positioning and overflow control
@@ -21989,8 +22423,8 @@ class OverlayEditor {
21989
22423
  document.body.appendChild(this.hostDiv);
21990
22424
  }
21991
22425
 
21992
- /**
21993
- * Attach all event listeners
22426
+ /**
22427
+ * Attach all event listeners
21994
22428
  */
21995
22429
  attachEventListeners() {
21996
22430
  // Textarea events
@@ -22010,8 +22444,8 @@ class OverlayEditor {
22010
22444
  this.setupViewportChangeDetection();
22011
22445
  }
22012
22446
 
22013
- /**
22014
- * Remove all event listeners
22447
+ /**
22448
+ * Remove all event listeners
22015
22449
  */
22016
22450
  removeEventListeners() {
22017
22451
  this.textarea.removeEventListener('input', this.boundHandlers.onInput);
@@ -22028,16 +22462,16 @@ class OverlayEditor {
22028
22462
  this.restoreViewportChangeDetection();
22029
22463
  }
22030
22464
 
22031
- /**
22032
- * Simple method to refresh positioning when canvas changes
22465
+ /**
22466
+ * Simple method to refresh positioning when canvas changes
22033
22467
  */
22034
22468
  updatePosition() {
22035
22469
  this.applyOverlayStyle();
22036
22470
  }
22037
22471
 
22038
- /**
22039
- * Update the Fabric object bounds to match current textarea size
22040
- * This ensures Fabric.js selection controls follow the growing textbox
22472
+ /**
22473
+ * Update the Fabric object bounds to match current textarea size
22474
+ * This ensures Fabric.js selection controls follow the growing textbox
22041
22475
  */
22042
22476
  updateObjectBounds() {
22043
22477
  if (this.isDestroyed) return;
@@ -22071,15 +22505,15 @@ class OverlayEditor {
22071
22505
  }
22072
22506
  }
22073
22507
 
22074
- /**
22075
- * Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
22508
+ /**
22509
+ * Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
22076
22510
  */
22077
22511
  letterSpacingPx(charSpacing, fontSize) {
22078
22512
  return charSpacing / 1000 * fontSize;
22079
22513
  }
22080
22514
 
22081
- /**
22082
- * Detect text direction using first strong directional character
22515
+ /**
22516
+ * Detect text direction using first strong directional character
22083
22517
  */
22084
22518
  firstStrongDir(text) {
22085
22519
  // Hebrew: \u0590-\u05FF, Arabic: \u0600-\u06FF, \u0750-\u077F, \uFB50-\uFDFF, \uFE70-\uFEFF
@@ -22309,8 +22743,8 @@ class OverlayEditor {
22309
22743
  // Initial bounds are set correctly by Fabric.js - don't force update here
22310
22744
  }
22311
22745
 
22312
- /**
22313
- * Debug method to compare textarea and canvas object bounding boxes
22746
+ /**
22747
+ * Debug method to compare textarea and canvas object bounding boxes
22314
22748
  */
22315
22749
  debugBoundingBoxComparison() {
22316
22750
  const target = this.target;
@@ -22380,8 +22814,8 @@ class OverlayEditor {
22380
22814
  console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
22381
22815
  }
22382
22816
 
22383
- /**
22384
- * Debug method to compare text wrapping between textarea and Fabric text object
22817
+ /**
22818
+ * Debug method to compare text wrapping between textarea and Fabric text object
22385
22819
  */
22386
22820
  debugTextWrapping() {
22387
22821
  const target = this.target;
@@ -22466,8 +22900,8 @@ class OverlayEditor {
22466
22900
  console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
22467
22901
  }
22468
22902
 
22469
- /**
22470
- * Focus the textarea and position cursor at end
22903
+ /**
22904
+ * Focus the textarea and position cursor at end
22471
22905
  */
22472
22906
  focusTextarea() {
22473
22907
  // For overlay editing, we want to keep the object in "selection mode" not "editing mode"
@@ -22502,8 +22936,8 @@ class OverlayEditor {
22502
22936
  this.canvas.requestRenderAll();
22503
22937
  }
22504
22938
 
22505
- /**
22506
- * Refresh overlay positioning and styling
22939
+ /**
22940
+ * Refresh overlay positioning and styling
22507
22941
  */
22508
22942
  refresh() {
22509
22943
  if (this.isDestroyed) return;
@@ -22511,8 +22945,8 @@ class OverlayEditor {
22511
22945
  // Don't update object bounds on every refresh - only when textarea actually resizes
22512
22946
  }
22513
22947
 
22514
- /**
22515
- * Destroy the overlay editor
22948
+ /**
22949
+ * Destroy the overlay editor
22516
22950
  */
22517
22951
  destroy() {
22518
22952
  let commit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
@@ -22680,8 +23114,8 @@ class OverlayEditor {
22680
23114
  }
22681
23115
  }
22682
23116
 
22683
- /**
22684
- * Setup detection for viewport changes (zoom/pan)
23117
+ /**
23118
+ * Setup detection for viewport changes (zoom/pan)
22685
23119
  */
22686
23120
  setupViewportChangeDetection() {
22687
23121
  // Store original methods
@@ -22710,8 +23144,8 @@ class OverlayEditor {
22710
23144
  };
22711
23145
  }
22712
23146
 
22713
- /**
22714
- * Restore original viewport methods
23147
+ /**
23148
+ * Restore original viewport methods
22715
23149
  */
22716
23150
  restoreViewportChangeDetection() {
22717
23151
  if (this.canvas.__originalSetZoom) {
@@ -22726,8 +23160,8 @@ class OverlayEditor {
22726
23160
  }
22727
23161
  }
22728
23162
 
22729
- /**
22730
- * Enter overlay text editing mode for a text object
23163
+ /**
23164
+ * Enter overlay text editing mode for a text object
22731
23165
  */
22732
23166
  function enterTextOverlayEdit(canvas, target, options) {
22733
23167
  // If already in overlay editing, destroy existing editor first
@@ -22751,35 +23185,35 @@ function enterTextOverlayEdit(canvas, target, options) {
22751
23185
  return editor;
22752
23186
  }
22753
23187
 
22754
- /**
22755
- * extend this regex to support non english languages
22756
- *
22757
- * - ` ` Matches a SPACE character (char code 32).
22758
- * - `\n` Matches a LINE FEED character (char code 10).
22759
- * - `.` Matches a "." character (char code 46).
22760
- * - `,` Matches a "," character (char code 44).
22761
- * - `;` Matches a ";" character (char code 59).
22762
- * - `!` Matches a "!" character (char code 33).
22763
- * - `\?` Matches a "?" character (char code 63).
22764
- * - `\-` Matches a "-" character (char code 45).
23188
+ /**
23189
+ * extend this regex to support non english languages
23190
+ *
23191
+ * - ` ` Matches a SPACE character (char code 32).
23192
+ * - `\n` Matches a LINE FEED character (char code 10).
23193
+ * - `.` Matches a "." character (char code 46).
23194
+ * - `,` Matches a "," character (char code 44).
23195
+ * - `;` Matches a ";" character (char code 59).
23196
+ * - `!` Matches a "!" character (char code 33).
23197
+ * - `\?` Matches a "?" character (char code 63).
23198
+ * - `\-` Matches a "-" character (char code 45).
22765
23199
  */
22766
23200
  // eslint-disable-next-line no-useless-escape
22767
23201
  const reNonWord = /[ \n\.,;!\?\-]/;
22768
23202
  class ITextBehavior extends FabricText {
22769
23203
  constructor() {
22770
23204
  super(...arguments);
22771
- /**
22772
- * Helps determining when the text is in composition, so that the cursor
22773
- * rendering is altered.
23205
+ /**
23206
+ * Helps determining when the text is in composition, so that the cursor
23207
+ * rendering is altered.
22774
23208
  */
22775
23209
  _defineProperty(this, "_currentCursorOpacity", 1);
22776
23210
  }
22777
- /**
22778
- * Keeps track if the IText object was selected before the actual click.
22779
- * This because we want to delay enter editing by a click.
23211
+ /**
23212
+ * Keeps track if the IText object was selected before the actual click.
23213
+ * This because we want to delay enter editing by a click.
22780
23214
  */
22781
- /**
22782
- * Initializes all the interactive behavior of IText
23215
+ /**
23216
+ * Initializes all the interactive behavior of IText
22783
23217
  */
22784
23218
  initBehavior() {
22785
23219
  this._tick = this._tick.bind(this);
@@ -22792,8 +23226,8 @@ class ITextBehavior extends FabricText {
22792
23226
  return super.onDeselect(options);
22793
23227
  }
22794
23228
 
22795
- /**
22796
- * @private
23229
+ /**
23230
+ * @private
22797
23231
  */
22798
23232
  _animateCursor(_ref) {
22799
23233
  let {
@@ -22818,8 +23252,8 @@ class ITextBehavior extends FabricText {
22818
23252
  });
22819
23253
  }
22820
23254
 
22821
- /**
22822
- * changes the cursor from visible to invisible
23255
+ /**
23256
+ * changes the cursor from visible to invisible
22823
23257
  */
22824
23258
  _tick(delay) {
22825
23259
  this._currentTickState = this._animateCursor({
@@ -22830,8 +23264,8 @@ class ITextBehavior extends FabricText {
22830
23264
  });
22831
23265
  }
22832
23266
 
22833
- /**
22834
- * Changes the cursor from invisible to visible
23267
+ /**
23268
+ * Changes the cursor from invisible to visible
22835
23269
  */
22836
23270
  _onTickComplete() {
22837
23271
  var _this$_currentTickCom;
@@ -22843,16 +23277,16 @@ class ITextBehavior extends FabricText {
22843
23277
  });
22844
23278
  }
22845
23279
 
22846
- /**
22847
- * Initializes delayed cursor
23280
+ /**
23281
+ * Initializes delayed cursor
22848
23282
  */
22849
23283
  initDelayedCursor(restart) {
22850
23284
  this.abortCursorAnimation();
22851
23285
  this._tick(restart ? 0 : this.cursorDelay);
22852
23286
  }
22853
23287
 
22854
- /**
22855
- * Aborts cursor animation, clears all timeouts and clear textarea context if necessary
23288
+ /**
23289
+ * Aborts cursor animation, clears all timeouts and clear textarea context if necessary
22856
23290
  */
22857
23291
  abortCursorAnimation() {
22858
23292
  let shouldClear = false;
@@ -22870,9 +23304,9 @@ class ITextBehavior extends FabricText {
22870
23304
  }
22871
23305
  }
22872
23306
 
22873
- /**
22874
- * Restart tue cursor animation if either is in complete state ( between animations )
22875
- * or if it never started before
23307
+ /**
23308
+ * Restart tue cursor animation if either is in complete state ( between animations )
23309
+ * or if it never started before
22876
23310
  */
22877
23311
  restartCursorIfNeeded() {
22878
23312
  if ([this._currentTickState, this._currentTickCompleteState].some(cursorAnimation => !cursorAnimation || cursorAnimation.isDone())) {
@@ -22880,8 +23314,8 @@ class ITextBehavior extends FabricText {
22880
23314
  }
22881
23315
  }
22882
23316
 
22883
- /**
22884
- * Selects entire text
23317
+ /**
23318
+ * Selects entire text
22885
23319
  */
22886
23320
  selectAll() {
22887
23321
  this.selectionStart = 0;
@@ -22891,26 +23325,26 @@ class ITextBehavior extends FabricText {
22891
23325
  return this;
22892
23326
  }
22893
23327
 
22894
- /**
22895
- * Selects entire text and updates the visual state
23328
+ /**
23329
+ * Selects entire text and updates the visual state
22896
23330
  */
22897
23331
  cmdAll() {
22898
23332
  this.selectAll();
22899
23333
  this.renderCursorOrSelection();
22900
23334
  }
22901
23335
 
22902
- /**
22903
- * Returns selected text
22904
- * @return {String}
23336
+ /**
23337
+ * Returns selected text
23338
+ * @return {String}
22905
23339
  */
22906
23340
  getSelectedText() {
22907
23341
  return this._text.slice(this.selectionStart, this.selectionEnd).join('');
22908
23342
  }
22909
23343
 
22910
- /**
22911
- * Find new selection index representing start of current word according to current selection index
22912
- * @param {Number} startFrom Current selection index
22913
- * @return {Number} New selection index
23344
+ /**
23345
+ * Find new selection index representing start of current word according to current selection index
23346
+ * @param {Number} startFrom Current selection index
23347
+ * @return {Number} New selection index
22914
23348
  */
22915
23349
  findWordBoundaryLeft(startFrom) {
22916
23350
  let offset = 0,
@@ -22930,10 +23364,10 @@ class ITextBehavior extends FabricText {
22930
23364
  return startFrom - offset;
22931
23365
  }
22932
23366
 
22933
- /**
22934
- * Find new selection index representing end of current word according to current selection index
22935
- * @param {Number} startFrom Current selection index
22936
- * @return {Number} New selection index
23367
+ /**
23368
+ * Find new selection index representing end of current word according to current selection index
23369
+ * @param {Number} startFrom Current selection index
23370
+ * @return {Number} New selection index
22937
23371
  */
22938
23372
  findWordBoundaryRight(startFrom) {
22939
23373
  let offset = 0,
@@ -22953,10 +23387,10 @@ class ITextBehavior extends FabricText {
22953
23387
  return startFrom + offset;
22954
23388
  }
22955
23389
 
22956
- /**
22957
- * Find new selection index representing start of current line according to current selection index
22958
- * @param {Number} startFrom Current selection index
22959
- * @return {Number} New selection index
23390
+ /**
23391
+ * Find new selection index representing start of current line according to current selection index
23392
+ * @param {Number} startFrom Current selection index
23393
+ * @return {Number} New selection index
22960
23394
  */
22961
23395
  findLineBoundaryLeft(startFrom) {
22962
23396
  let offset = 0,
@@ -22968,10 +23402,10 @@ class ITextBehavior extends FabricText {
22968
23402
  return startFrom - offset;
22969
23403
  }
22970
23404
 
22971
- /**
22972
- * Find new selection index representing end of current line according to current selection index
22973
- * @param {Number} startFrom Current selection index
22974
- * @return {Number} New selection index
23405
+ /**
23406
+ * Find new selection index representing end of current line according to current selection index
23407
+ * @param {Number} startFrom Current selection index
23408
+ * @return {Number} New selection index
22975
23409
  */
22976
23410
  findLineBoundaryRight(startFrom) {
22977
23411
  let offset = 0,
@@ -22983,11 +23417,11 @@ class ITextBehavior extends FabricText {
22983
23417
  return startFrom + offset;
22984
23418
  }
22985
23419
 
22986
- /**
22987
- * Finds index corresponding to beginning or end of a word
22988
- * @param {Number} selectionStart Index of a character
22989
- * @param {Number} direction 1 or -1
22990
- * @return {Number} Index of the beginning or end of a word
23420
+ /**
23421
+ * Finds index corresponding to beginning or end of a word
23422
+ * @param {Number} selectionStart Index of a character
23423
+ * @param {Number} direction 1 or -1
23424
+ * @return {Number} Index of the beginning or end of a word
22991
23425
  */
22992
23426
  searchWordBoundary(selectionStart, direction) {
22993
23427
  const text = this._text;
@@ -23005,9 +23439,9 @@ class ITextBehavior extends FabricText {
23005
23439
  return index;
23006
23440
  }
23007
23441
 
23008
- /**
23009
- * Selects the word that contains the char at index selectionStart
23010
- * @param {Number} selectionStart Index of a character
23442
+ /**
23443
+ * Selects the word that contains the char at index selectionStart
23444
+ * @param {Number} selectionStart Index of a character
23011
23445
  */
23012
23446
  selectWord(selectionStart) {
23013
23447
  selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
@@ -23023,9 +23457,9 @@ class ITextBehavior extends FabricText {
23023
23457
  this.renderCursorOrSelection();
23024
23458
  }
23025
23459
 
23026
- /**
23027
- * Selects the line that contains selectionStart
23028
- * @param {Number} selectionStart Index of a character
23460
+ /**
23461
+ * Selects the line that contains selectionStart
23462
+ * @param {Number} selectionStart Index of a character
23029
23463
  */
23030
23464
  selectLine(selectionStart) {
23031
23465
  selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
@@ -23037,8 +23471,8 @@ class ITextBehavior extends FabricText {
23037
23471
  this._updateTextarea();
23038
23472
  }
23039
23473
 
23040
- /**
23041
- * Enters editing state
23474
+ /**
23475
+ * Enters editing state
23042
23476
  */
23043
23477
  enterEditing(e) {
23044
23478
  if (this.isEditing || !this.editable) {
@@ -23058,8 +23492,8 @@ class ITextBehavior extends FabricText {
23058
23492
  }
23059
23493
  }
23060
23494
 
23061
- /**
23062
- * runs the actual logic that enter from editing state, see {@link enterEditing}
23495
+ /**
23496
+ * runs the actual logic that enter from editing state, see {@link enterEditing}
23063
23497
  */
23064
23498
  enterEditingImpl() {
23065
23499
  if (this.canvas) {
@@ -23083,8 +23517,8 @@ class ITextBehavior extends FabricText {
23083
23517
  }
23084
23518
  }
23085
23519
 
23086
- /**
23087
- * Enter overlay editing mode using DOM textarea overlay
23520
+ /**
23521
+ * Enter overlay editing mode using DOM textarea overlay
23088
23522
  */
23089
23523
  enterOverlayEditing() {
23090
23524
  this._saveEditingProps();
@@ -23105,8 +23539,8 @@ class ITextBehavior extends FabricText {
23105
23539
  });
23106
23540
  }
23107
23541
 
23108
- /**
23109
- * Commit overlay editing changes
23542
+ /**
23543
+ * Commit overlay editing changes
23110
23544
  */
23111
23545
  commitOverlayEdit(text) {
23112
23546
  const overlayEditor = this.__overlayEditor;
@@ -23130,8 +23564,8 @@ class ITextBehavior extends FabricText {
23130
23564
  this.canvas && this.canvas.requestRenderAll();
23131
23565
  }
23132
23566
 
23133
- /**
23134
- * Cancel overlay editing without changes
23567
+ /**
23568
+ * Cancel overlay editing without changes
23135
23569
  */
23136
23570
  cancelOverlayEdit() {
23137
23571
  // Restore original text
@@ -23139,8 +23573,8 @@ class ITextBehavior extends FabricText {
23139
23573
  this.exitEditing();
23140
23574
  }
23141
23575
 
23142
- /**
23143
- * called by {@link Canvas#textEditingManager}
23576
+ /**
23577
+ * called by {@link Canvas#textEditingManager}
23144
23578
  */
23145
23579
  updateSelectionOnMouseMove(e) {
23146
23580
  if (this.getActiveControl()) {
@@ -23168,8 +23602,8 @@ class ITextBehavior extends FabricText {
23168
23602
  }
23169
23603
  }
23170
23604
 
23171
- /**
23172
- * @private
23605
+ /**
23606
+ * @private
23173
23607
  */
23174
23608
  _setEditingProps() {
23175
23609
  this.hoverCursor = 'text';
@@ -23181,8 +23615,8 @@ class ITextBehavior extends FabricText {
23181
23615
  this.lockMovementX = this.lockMovementY = true;
23182
23616
  }
23183
23617
 
23184
- /**
23185
- * convert from textarea to grapheme indexes
23618
+ /**
23619
+ * convert from textarea to grapheme indexes
23186
23620
  */
23187
23621
  fromStringToGraphemeSelection(start, end, text) {
23188
23622
  const smallerTextStart = text.slice(0, start),
@@ -23201,8 +23635,8 @@ class ITextBehavior extends FabricText {
23201
23635
  };
23202
23636
  }
23203
23637
 
23204
- /**
23205
- * convert from fabric to textarea values
23638
+ /**
23639
+ * convert from fabric to textarea values
23206
23640
  */
23207
23641
  fromGraphemeToStringSelection(start, end, graphemes) {
23208
23642
  const smallerTextStart = graphemes.slice(0, start),
@@ -23221,8 +23655,8 @@ class ITextBehavior extends FabricText {
23221
23655
  };
23222
23656
  }
23223
23657
 
23224
- /**
23225
- * @private
23658
+ /**
23659
+ * @private
23226
23660
  */
23227
23661
  _updateTextarea() {
23228
23662
  this.cursorOffsetCache = {};
@@ -23237,8 +23671,8 @@ class ITextBehavior extends FabricText {
23237
23671
  this.updateTextareaPosition();
23238
23672
  }
23239
23673
 
23240
- /**
23241
- * @private
23674
+ /**
23675
+ * @private
23242
23676
  */
23243
23677
  updateFromTextArea() {
23244
23678
  if (!this.hiddenTextarea) {
@@ -23258,8 +23692,8 @@ class ITextBehavior extends FabricText {
23258
23692
  this.updateTextareaPosition();
23259
23693
  }
23260
23694
 
23261
- /**
23262
- * @private
23695
+ /**
23696
+ * @private
23263
23697
  */
23264
23698
  updateTextareaPosition() {
23265
23699
  if (this.selectionStart === this.selectionEnd) {
@@ -23269,9 +23703,9 @@ class ITextBehavior extends FabricText {
23269
23703
  }
23270
23704
  }
23271
23705
 
23272
- /**
23273
- * @private
23274
- * @return {Object} style contains style for hiddenTextarea
23706
+ /**
23707
+ * @private
23708
+ * @return {Object} style contains style for hiddenTextarea
23275
23709
  */
23276
23710
  _calcTextareaPosition() {
23277
23711
  if (!this.canvas) {
@@ -23318,8 +23752,8 @@ class ITextBehavior extends FabricText {
23318
23752
  };
23319
23753
  }
23320
23754
 
23321
- /**
23322
- * @private
23755
+ /**
23756
+ * @private
23323
23757
  */
23324
23758
  _saveEditingProps() {
23325
23759
  this._savedProps = {
@@ -23336,8 +23770,8 @@ class ITextBehavior extends FabricText {
23336
23770
  };
23337
23771
  }
23338
23772
 
23339
- /**
23340
- * @private
23773
+ /**
23774
+ * @private
23341
23775
  */
23342
23776
  _restoreEditingProps() {
23343
23777
  if (!this._savedProps) {
@@ -23357,9 +23791,9 @@ class ITextBehavior extends FabricText {
23357
23791
  delete this._savedProps;
23358
23792
  }
23359
23793
 
23360
- /**
23361
- * runs the actual logic that exits from editing state, see {@link exitEditing}
23362
- * But it does not fire events
23794
+ /**
23795
+ * runs the actual logic that exits from editing state, see {@link exitEditing}
23796
+ * But it does not fire events
23363
23797
  */
23364
23798
  exitEditingImpl() {
23365
23799
  const hiddenTextarea = this.hiddenTextarea;
@@ -23380,8 +23814,8 @@ class ITextBehavior extends FabricText {
23380
23814
  }
23381
23815
  }
23382
23816
 
23383
- /**
23384
- * Exits from editing state and fires relevant events
23817
+ /**
23818
+ * Exits from editing state and fires relevant events
23385
23819
  */
23386
23820
  exitEditing() {
23387
23821
  const isTextChanged = this._textBeforeEdit !== this.text;
@@ -23400,8 +23834,8 @@ class ITextBehavior extends FabricText {
23400
23834
  return this;
23401
23835
  }
23402
23836
 
23403
- /**
23404
- * @private
23837
+ /**
23838
+ * @private
23405
23839
  */
23406
23840
  _removeExtraneousStyles() {
23407
23841
  for (const prop in this.styles) {
@@ -23411,10 +23845,10 @@ class ITextBehavior extends FabricText {
23411
23845
  }
23412
23846
  }
23413
23847
 
23414
- /**
23415
- * remove and reflow a style block from start to end.
23416
- * @param {Number} start linear start position for removal (included in removal)
23417
- * @param {Number} end linear end position for removal ( excluded from removal )
23848
+ /**
23849
+ * remove and reflow a style block from start to end.
23850
+ * @param {Number} start linear start position for removal (included in removal)
23851
+ * @param {Number} end linear end position for removal ( excluded from removal )
23418
23852
  */
23419
23853
  removeStyleFromTo(start, end) {
23420
23854
  const {
@@ -23467,10 +23901,10 @@ class ITextBehavior extends FabricText {
23467
23901
  }
23468
23902
  }
23469
23903
 
23470
- /**
23471
- * Shifts line styles up or down
23472
- * @param {Number} lineIndex Index of a line
23473
- * @param {Number} offset Can any number?
23904
+ /**
23905
+ * Shifts line styles up or down
23906
+ * @param {Number} lineIndex Index of a line
23907
+ * @param {Number} offset Can any number?
23474
23908
  */
23475
23909
  shiftLineStyles(lineIndex, offset) {
23476
23910
  const clonedStyles = Object.assign({}, this.styles);
@@ -23485,15 +23919,15 @@ class ITextBehavior extends FabricText {
23485
23919
  }
23486
23920
  }
23487
23921
 
23488
- /**
23489
- * Handle insertion of more consecutive style lines for when one or more
23490
- * newlines gets added to the text. Since current style needs to be shifted
23491
- * first we shift the current style of the number lines needed, then we add
23492
- * new lines from the last to the first.
23493
- * @param {Number} lineIndex Index of a line
23494
- * @param {Number} charIndex Index of a char
23495
- * @param {Number} qty number of lines to add
23496
- * @param {Array} copiedStyle Array of objects styles
23922
+ /**
23923
+ * Handle insertion of more consecutive style lines for when one or more
23924
+ * newlines gets added to the text. Since current style needs to be shifted
23925
+ * first we shift the current style of the number lines needed, then we add
23926
+ * new lines from the last to the first.
23927
+ * @param {Number} lineIndex Index of a line
23928
+ * @param {Number} charIndex Index of a char
23929
+ * @param {Number} qty number of lines to add
23930
+ * @param {Array} copiedStyle Array of objects styles
23497
23931
  */
23498
23932
  insertNewlineStyleObject(lineIndex, charIndex, qty, copiedStyle) {
23499
23933
  const newLineStyles = {};
@@ -23553,12 +23987,12 @@ class ITextBehavior extends FabricText {
23553
23987
  this._forceClearCache = true;
23554
23988
  }
23555
23989
 
23556
- /**
23557
- * Inserts style object for a given line/char index
23558
- * @param {Number} lineIndex Index of a line
23559
- * @param {Number} charIndex Index of a char
23560
- * @param {Number} quantity number Style object to insert, if given
23561
- * @param {Array} copiedStyle array of style objects
23990
+ /**
23991
+ * Inserts style object for a given line/char index
23992
+ * @param {Number} lineIndex Index of a line
23993
+ * @param {Number} charIndex Index of a char
23994
+ * @param {Number} quantity number Style object to insert, if given
23995
+ * @param {Array} copiedStyle array of style objects
23562
23996
  */
23563
23997
  insertCharStyleObject(lineIndex, charIndex, quantity, copiedStyle) {
23564
23998
  if (!this.styles) {
@@ -23607,11 +24041,11 @@ class ITextBehavior extends FabricText {
23607
24041
  }
23608
24042
  }
23609
24043
 
23610
- /**
23611
- * Inserts style object(s)
23612
- * @param {Array} insertedText Characters at the location where style is inserted
23613
- * @param {Number} start cursor index for inserting style
23614
- * @param {Array} [copiedStyle] array of style objects to insert.
24044
+ /**
24045
+ * Inserts style object(s)
24046
+ * @param {Array} insertedText Characters at the location where style is inserted
24047
+ * @param {Number} start cursor index for inserting style
24048
+ * @param {Array} [copiedStyle] array of style objects to insert.
23615
24049
  */
23616
24050
  insertNewStyleBlock(insertedText, start, copiedStyle) {
23617
24051
  const cursorLoc = this.get2DCursorLocation(start, true),
@@ -23652,12 +24086,12 @@ class ITextBehavior extends FabricText {
23652
24086
  }
23653
24087
  }
23654
24088
 
23655
- /**
23656
- * Removes characters from start/end
23657
- * start/end ar per grapheme position in _text array.
23658
- *
23659
- * @param {Number} start
23660
- * @param {Number} end default to start + 1
24089
+ /**
24090
+ * Removes characters from start/end
24091
+ * start/end ar per grapheme position in _text array.
24092
+ *
24093
+ * @param {Number} start
24094
+ * @param {Number} end default to start + 1
23661
24095
  */
23662
24096
  removeChars(start) {
23663
24097
  let end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : start + 1;
@@ -23670,17 +24104,17 @@ class ITextBehavior extends FabricText {
23670
24104
  this._removeExtraneousStyles();
23671
24105
  }
23672
24106
 
23673
- /**
23674
- * insert characters at start position, before start position.
23675
- * start equal 1 it means the text get inserted between actual grapheme 0 and 1
23676
- * if style array is provided, it must be as the same length of text in graphemes
23677
- * if end is provided and is bigger than start, old text is replaced.
23678
- * start/end ar per grapheme position in _text array.
23679
- *
23680
- * @param {String} text text to insert
23681
- * @param {Array} style array of style objects
23682
- * @param {Number} start
23683
- * @param {Number} end default to start + 1
24107
+ /**
24108
+ * insert characters at start position, before start position.
24109
+ * start equal 1 it means the text get inserted between actual grapheme 0 and 1
24110
+ * if style array is provided, it must be as the same length of text in graphemes
24111
+ * if end is provided and is bigger than start, old text is replaced.
24112
+ * start/end ar per grapheme position in _text array.
24113
+ *
24114
+ * @param {String} text text to insert
24115
+ * @param {Array} style array of style objects
24116
+ * @param {Number} start
24117
+ * @param {Number} end default to start + 1
23684
24118
  */
23685
24119
  insertChars(text, style, start) {
23686
24120
  let end = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : start;
@@ -23697,9 +24131,9 @@ class ITextBehavior extends FabricText {
23697
24131
  this._removeExtraneousStyles();
23698
24132
  }
23699
24133
 
23700
- /**
23701
- * Set the selectionStart and selectionEnd according to the new position of cursor
23702
- * mimic the key - mouse navigation when shift is pressed.
24134
+ /**
24135
+ * Set the selectionStart and selectionEnd according to the new position of cursor
24136
+ * mimic the key - mouse navigation when shift is pressed.
23703
24137
  */
23704
24138
  setSelectionStartEndWithShift(start, end, newSelection) {
23705
24139
  if (newSelection <= start) {
@@ -24322,8 +24756,8 @@ class ITextKeyBehavior extends ITextBehavior {
24322
24756
  }
24323
24757
  }
24324
24758
 
24325
- /**
24326
- * `LEFT_CLICK === 0`
24759
+ /**
24760
+ * `LEFT_CLICK === 0`
24327
24761
  */
24328
24762
  const notALeftClick = e => !!e.button;
24329
24763
  class ITextClickBehavior extends ITextKeyBehavior {
@@ -24341,36 +24775,36 @@ class ITextClickBehavior extends ITextKeyBehavior {
24341
24775
  super.initBehavior();
24342
24776
  }
24343
24777
 
24344
- /**
24345
- * If this method returns true a mouse move operation over a text selection
24346
- * will not prevent the native mouse event allowing the browser to start a drag operation.
24347
- * shouldStartDragging can be read 'do not prevent default for mouse move event'
24348
- * To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
24349
- * @returns
24778
+ /**
24779
+ * If this method returns true a mouse move operation over a text selection
24780
+ * will not prevent the native mouse event allowing the browser to start a drag operation.
24781
+ * shouldStartDragging can be read 'do not prevent default for mouse move event'
24782
+ * To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
24783
+ * @returns
24350
24784
  */
24351
24785
  shouldStartDragging() {
24352
24786
  return this.draggableTextDelegate.isActive();
24353
24787
  }
24354
24788
 
24355
- /**
24356
- * @public override this method to control whether instance should/shouldn't become a drag source,
24357
- * @see also {@link DraggableTextDelegate#isActive}
24358
- * To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
24359
- * @returns {boolean} should handle event
24789
+ /**
24790
+ * @public override this method to control whether instance should/shouldn't become a drag source,
24791
+ * @see also {@link DraggableTextDelegate#isActive}
24792
+ * To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
24793
+ * @returns {boolean} should handle event
24360
24794
  */
24361
24795
  onDragStart(e) {
24362
24796
  return this.draggableTextDelegate.onDragStart(e);
24363
24797
  }
24364
24798
 
24365
- /**
24366
- * @public override this method to control whether instance should/shouldn't become a drop target
24799
+ /**
24800
+ * @public override this method to control whether instance should/shouldn't become a drop target
24367
24801
  */
24368
24802
  canDrop(e) {
24369
24803
  return this.draggableTextDelegate.canDrop(e);
24370
24804
  }
24371
24805
 
24372
- /**
24373
- * Default handler for double click, select a word or enter overlay editing
24806
+ /**
24807
+ * Default handler for double click, select a word or enter overlay editing
24374
24808
  */
24375
24809
  doubleClickHandler(options) {
24376
24810
  // Check if we should enter overlay editing mode
@@ -24387,8 +24821,8 @@ class ITextClickBehavior extends ITextKeyBehavior {
24387
24821
  this.renderCursorOrSelection();
24388
24822
  }
24389
24823
 
24390
- /**
24391
- * Default handler for triple click, select a line
24824
+ /**
24825
+ * Default handler for triple click, select a line
24392
24826
  */
24393
24827
  tripleClickHandler(options) {
24394
24828
  if (!this.isEditing) {
@@ -24398,13 +24832,13 @@ class ITextClickBehavior extends ITextKeyBehavior {
24398
24832
  this.renderCursorOrSelection();
24399
24833
  }
24400
24834
 
24401
- /**
24402
- * Default event handler for the basic functionalities needed on _mouseDown
24403
- * can be overridden to do something different.
24404
- * Scope of this implementation is: find the click position, set selectionStart
24405
- * find selectionEnd, initialize the drawing of either cursor or selection area
24406
- * initializing a mousedDown on a text area will cancel fabricjs knowledge of
24407
- * current compositionMode. It will be set to false.
24835
+ /**
24836
+ * Default event handler for the basic functionalities needed on _mouseDown
24837
+ * can be overridden to do something different.
24838
+ * Scope of this implementation is: find the click position, set selectionStart
24839
+ * find selectionEnd, initialize the drawing of either cursor or selection area
24840
+ * initializing a mousedDown on a text area will cancel fabricjs knowledge of
24841
+ * current compositionMode. It will be set to false.
24408
24842
  */
24409
24843
  _mouseDownHandler(_ref) {
24410
24844
  let {
@@ -24432,9 +24866,9 @@ class ITextClickBehavior extends ITextKeyBehavior {
24432
24866
  this.selected || (this.selected = alreadySelected || this.isEditing);
24433
24867
  }
24434
24868
 
24435
- /**
24436
- * standard handler for mouse up, overridable
24437
- * @private
24869
+ /**
24870
+ * standard handler for mouse up, overridable
24871
+ * @private
24438
24872
  */
24439
24873
  mouseUpHandler(_ref2) {
24440
24874
  let {
@@ -24465,9 +24899,9 @@ class ITextClickBehavior extends ITextKeyBehavior {
24465
24899
  }
24466
24900
  }
24467
24901
 
24468
- /**
24469
- * Changes cursor location in a text depending on passed pointer (x/y) object
24470
- * @param {TPointerEvent} e Event object
24902
+ /**
24903
+ * Changes cursor location in a text depending on passed pointer (x/y) object
24904
+ * @param {TPointerEvent} e Event object
24471
24905
  */
24472
24906
  setCursorByClick(e) {
24473
24907
  const newSelection = this.getSelectionStartFromPointer(e),
@@ -24485,10 +24919,10 @@ class ITextClickBehavior extends ITextKeyBehavior {
24485
24919
  }
24486
24920
  }
24487
24921
 
24488
- /**
24489
- * Returns index of a character corresponding to where an object was clicked
24490
- * @param {TPointerEvent} e Event object
24491
- * @return {Number} Index of a character
24922
+ /**
24923
+ * Returns index of a character corresponding to where an object was clicked
24924
+ * @param {TPointerEvent} e Event object
24925
+ * @return {Number} Index of a character
24492
24926
  */
24493
24927
  getSelectionStartFromPointer(e) {
24494
24928
  const mouseOffset = this.canvas.getScenePoint(e).transform(invertTransform(this.calcTransformMatrix())).add(new Point(-this._getLeftOffset(), -this._getTopOffset()));
@@ -24534,15 +24968,15 @@ class ITextClickBehavior extends ITextKeyBehavior {
24534
24968
  }
24535
24969
  }
24536
24970
 
24537
- /**
24538
- * Hit Testing and Cursor Positioning System
24539
- *
24540
- * Maps pointer coordinates to text positions and provides cursor rectangles
24541
- * for interactive text editing with grapheme-aware boundaries.
24971
+ /**
24972
+ * Hit Testing and Cursor Positioning System
24973
+ *
24974
+ * Maps pointer coordinates to text positions and provides cursor rectangles
24975
+ * for interactive text editing with grapheme-aware boundaries.
24542
24976
  */
24543
24977
 
24544
- /**
24545
- * Hit test a point against laid out text to find insertion position
24978
+ /**
24979
+ * Hit test a point against laid out text to find insertion position
24546
24980
  */
24547
24981
  function hitTest(x, y, layout, options) {
24548
24982
  if (layout.lines.length === 0) {
@@ -24586,8 +25020,8 @@ function hitTest(x, y, layout, options) {
24586
25020
  };
24587
25021
  }
24588
25022
 
24589
- /**
24590
- * Get cursor rectangle for a given insertion index
25023
+ /**
25024
+ * Get cursor rectangle for a given insertion index
24591
25025
  */
24592
25026
  function getCursorRect(insertionIndex, layout, options) {
24593
25027
  if (layout.lines.length === 0) {
@@ -24634,8 +25068,8 @@ function getCursorRect(insertionIndex, layout, options) {
24634
25068
 
24635
25069
  // Private helper functions
24636
25070
 
24637
- /**
24638
- * Find which line contains the given Y coordinate
25071
+ /**
25072
+ * Find which line contains the given Y coordinate
24639
25073
  */
24640
25074
  function findLineAtY(y, lines) {
24641
25075
  var _lines;
@@ -24658,8 +25092,8 @@ function findLineAtY(y, lines) {
24658
25092
  };
24659
25093
  }
24660
25094
 
24661
- /**
24662
- * Find character position within a line at given X coordinate
25095
+ /**
25096
+ * Find character position within a line at given X coordinate
24663
25097
  */
24664
25098
  function findCharAtX(x, line, options) {
24665
25099
  if (line.bounds.length === 0) {
@@ -24765,8 +25199,8 @@ function findCharAtX(x, line, options) {
24765
25199
  };
24766
25200
  }
24767
25201
 
24768
- /**
24769
- * Calculate total insertion index from line and character indices
25202
+ /**
25203
+ * Calculate total insertion index from line and character indices
24770
25204
  */
24771
25205
  function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
24772
25206
  let insertionIndex = 0;
@@ -24785,8 +25219,8 @@ function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
24785
25219
  return insertionIndex;
24786
25220
  }
24787
25221
 
24788
- /**
24789
- * Find line and grapheme position from insertion index
25222
+ /**
25223
+ * Find line and grapheme position from insertion index
24790
25224
  */
24791
25225
  function findPositionFromIndex(insertionIndex, layout) {
24792
25226
  let currentIndex = 0;
@@ -24828,8 +25262,8 @@ function findPositionFromIndex(insertionIndex, layout) {
24828
25262
  };
24829
25263
  }
24830
25264
 
24831
- /**
24832
- * Calculate Y position of a line
25265
+ /**
25266
+ * Calculate Y position of a line
24833
25267
  */
24834
25268
  function calculateLineY(lineIndex, layout, options) {
24835
25269
  let y = 0;
@@ -24932,48 +25366,48 @@ const iTextDefaultValues = {
24932
25366
 
24933
25367
  // @TODO this is not complete
24934
25368
 
24935
- /**
24936
- * @fires changed
24937
- * @fires selection:changed
24938
- * @fires editing:entered
24939
- * @fires editing:exited
24940
- * @fires dragstart
24941
- * @fires drag drag event firing on the drag source
24942
- * @fires dragend
24943
- * @fires copy
24944
- * @fires cut
24945
- * @fires paste
24946
- *
24947
- * #### Supported key combinations
24948
- * ```
24949
- * Move cursor: left, right, up, down
24950
- * Select character: shift + left, shift + right
24951
- * Select text vertically: shift + up, shift + down
24952
- * Move cursor by word: alt + left, alt + right
24953
- * Select words: shift + alt + left, shift + alt + right
24954
- * Move cursor to line start/end: cmd + left, cmd + right or home, end
24955
- * Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
24956
- * Jump to start/end of text: cmd + up, cmd + down
24957
- * Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
24958
- * Delete character: backspace
24959
- * Delete word: alt + backspace
24960
- * Delete line: cmd + backspace
24961
- * Forward delete: delete
24962
- * Copy text: ctrl/cmd + c
24963
- * Paste text: ctrl/cmd + v
24964
- * Cut text: ctrl/cmd + x
24965
- * Select entire text: ctrl/cmd + a
24966
- * Quit editing tab or esc
24967
- * ```
24968
- *
24969
- * #### Supported mouse/touch combination
24970
- * ```
24971
- * Position cursor: click/touch
24972
- * Create selection: click/touch & drag
24973
- * Create selection: click & shift + click
24974
- * Select word: double click
24975
- * Select line: triple click
24976
- * ```
25369
+ /**
25370
+ * @fires changed
25371
+ * @fires selection:changed
25372
+ * @fires editing:entered
25373
+ * @fires editing:exited
25374
+ * @fires dragstart
25375
+ * @fires drag drag event firing on the drag source
25376
+ * @fires dragend
25377
+ * @fires copy
25378
+ * @fires cut
25379
+ * @fires paste
25380
+ *
25381
+ * #### Supported key combinations
25382
+ * ```
25383
+ * Move cursor: left, right, up, down
25384
+ * Select character: shift + left, shift + right
25385
+ * Select text vertically: shift + up, shift + down
25386
+ * Move cursor by word: alt + left, alt + right
25387
+ * Select words: shift + alt + left, shift + alt + right
25388
+ * Move cursor to line start/end: cmd + left, cmd + right or home, end
25389
+ * Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
25390
+ * Jump to start/end of text: cmd + up, cmd + down
25391
+ * Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
25392
+ * Delete character: backspace
25393
+ * Delete word: alt + backspace
25394
+ * Delete line: cmd + backspace
25395
+ * Forward delete: delete
25396
+ * Copy text: ctrl/cmd + c
25397
+ * Paste text: ctrl/cmd + v
25398
+ * Cut text: ctrl/cmd + x
25399
+ * Select entire text: ctrl/cmd + a
25400
+ * Quit editing tab or esc
25401
+ * ```
25402
+ *
25403
+ * #### Supported mouse/touch combination
25404
+ * ```
25405
+ * Position cursor: click/touch
25406
+ * Create selection: click/touch & drag
25407
+ * Create selection: click & shift + click
25408
+ * Select word: double click
25409
+ * Select line: triple click
25410
+ * ```
24977
25411
  */
24978
25412
  class IText extends ITextClickBehavior {
24979
25413
  static getDefaults() {
@@ -24988,10 +25422,10 @@ class IText extends ITextClickBehavior {
24988
25422
  return type === 'itext' ? 'i-text' : type;
24989
25423
  }
24990
25424
 
24991
- /**
24992
- * Constructor
24993
- * @param {String} text Text string
24994
- * @param {Object} [options] Options object
25425
+ /**
25426
+ * Constructor
25427
+ * @param {String} text Text string
25428
+ * @param {Object} [options] Options object
24995
25429
  */
24996
25430
  constructor(text, options) {
24997
25431
  super(text, {
@@ -25001,11 +25435,11 @@ class IText extends ITextClickBehavior {
25001
25435
  this.initBehavior();
25002
25436
  }
25003
25437
 
25004
- /**
25005
- * While editing handle differently
25006
- * @private
25007
- * @param {string} key
25008
- * @param {*} value
25438
+ /**
25439
+ * While editing handle differently
25440
+ * @private
25441
+ * @param {string} key
25442
+ * @param {*} value
25009
25443
  */
25010
25444
  _set(key, value) {
25011
25445
  if (this.isEditing && this._savedProps && key in this._savedProps) {
@@ -25020,28 +25454,28 @@ class IText extends ITextClickBehavior {
25020
25454
  return super._set(key, value);
25021
25455
  }
25022
25456
 
25023
- /**
25024
- * Sets selection start (left boundary of a selection)
25025
- * @param {Number} index Index to set selection start to
25457
+ /**
25458
+ * Sets selection start (left boundary of a selection)
25459
+ * @param {Number} index Index to set selection start to
25026
25460
  */
25027
25461
  setSelectionStart(index) {
25028
25462
  index = Math.max(index, 0);
25029
25463
  this._updateAndFire('selectionStart', index);
25030
25464
  }
25031
25465
 
25032
- /**
25033
- * Sets selection end (right boundary of a selection)
25034
- * @param {Number} index Index to set selection end to
25466
+ /**
25467
+ * Sets selection end (right boundary of a selection)
25468
+ * @param {Number} index Index to set selection end to
25035
25469
  */
25036
25470
  setSelectionEnd(index) {
25037
25471
  index = Math.min(index, this.text.length);
25038
25472
  this._updateAndFire('selectionEnd', index);
25039
25473
  }
25040
25474
 
25041
- /**
25042
- * @private
25043
- * @param {String} property 'selectionStart' or 'selectionEnd'
25044
- * @param {Number} index new position of property
25475
+ /**
25476
+ * @private
25477
+ * @param {String} property 'selectionStart' or 'selectionEnd'
25478
+ * @param {Number} index new position of property
25045
25479
  */
25046
25480
  _updateAndFire(property, index) {
25047
25481
  if (this[property] !== index) {
@@ -25051,9 +25485,9 @@ class IText extends ITextClickBehavior {
25051
25485
  this._updateTextarea();
25052
25486
  }
25053
25487
 
25054
- /**
25055
- * Fires the even of selection changed
25056
- * @private
25488
+ /**
25489
+ * Fires the even of selection changed
25490
+ * @private
25057
25491
  */
25058
25492
  _fireSelectionChanged() {
25059
25493
  this.fire('selection:changed');
@@ -25062,25 +25496,25 @@ class IText extends ITextClickBehavior {
25062
25496
  });
25063
25497
  }
25064
25498
 
25065
- /**
25066
- * Initialize text dimensions. Render all text on given context
25067
- * or on a offscreen canvas to get the text width with measureText.
25068
- * Updates this.width and this.height with the proper values.
25069
- * Does not return dimensions.
25070
- * @private
25499
+ /**
25500
+ * Initialize text dimensions. Render all text on given context
25501
+ * or on a offscreen canvas to get the text width with measureText.
25502
+ * Updates this.width and this.height with the proper values.
25503
+ * Does not return dimensions.
25504
+ * @private
25071
25505
  */
25072
25506
  initDimensions() {
25073
25507
  this.isEditing && this.initDelayedCursor();
25074
25508
  super.initDimensions();
25075
25509
  }
25076
25510
 
25077
- /**
25078
- * Gets style of a current selection/cursor (at the start position)
25079
- * if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
25080
- * @param {Number} startIndex Start index to get styles at
25081
- * @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
25082
- * @param {Boolean} [complete] get full style or not
25083
- * @return {Array} styles an array with one, zero or more Style objects
25511
+ /**
25512
+ * Gets style of a current selection/cursor (at the start position)
25513
+ * if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
25514
+ * @param {Number} startIndex Start index to get styles at
25515
+ * @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
25516
+ * @param {Boolean} [complete] get full style or not
25517
+ * @return {Array} styles an array with one, zero or more Style objects
25084
25518
  */
25085
25519
  getSelectionStyles() {
25086
25520
  let startIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart || 0;
@@ -25089,11 +25523,11 @@ class IText extends ITextClickBehavior {
25089
25523
  return super.getSelectionStyles(startIndex, endIndex, complete);
25090
25524
  }
25091
25525
 
25092
- /**
25093
- * Sets style of a current selection, if no selection exist, do not set anything.
25094
- * @param {Object} [styles] Styles object
25095
- * @param {Number} [startIndex] Start index to get styles at
25096
- * @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
25526
+ /**
25527
+ * Sets style of a current selection, if no selection exist, do not set anything.
25528
+ * @param {Object} [styles] Styles object
25529
+ * @param {Number} [startIndex] Start index to get styles at
25530
+ * @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
25097
25531
  */
25098
25532
  setSelectionStyles(styles) {
25099
25533
  let startIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selectionStart || 0;
@@ -25101,10 +25535,10 @@ class IText extends ITextClickBehavior {
25101
25535
  return super.setSelectionStyles(styles, startIndex, endIndex);
25102
25536
  }
25103
25537
 
25104
- /**
25105
- * Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
25106
- * @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
25107
- * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
25538
+ /**
25539
+ * Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
25540
+ * @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
25541
+ * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
25108
25542
  */
25109
25543
  get2DCursorLocation() {
25110
25544
  let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
@@ -25112,9 +25546,9 @@ class IText extends ITextClickBehavior {
25112
25546
  return super.get2DCursorLocation(selectionStart, skipWrapping);
25113
25547
  }
25114
25548
 
25115
- /**
25116
- * @private
25117
- * @param {CanvasRenderingContext2D} ctx Context to render on
25549
+ /**
25550
+ * @private
25551
+ * @param {CanvasRenderingContext2D} ctx Context to render on
25118
25552
  */
25119
25553
  render(ctx) {
25120
25554
  super.render(ctx);
@@ -25124,9 +25558,9 @@ class IText extends ITextClickBehavior {
25124
25558
  this.renderCursorOrSelection();
25125
25559
  }
25126
25560
 
25127
- /**
25128
- * @override block cursor/selection logic while rendering the exported canvas
25129
- * @todo this workaround should be replaced with a more robust solution
25561
+ /**
25562
+ * @override block cursor/selection logic while rendering the exported canvas
25563
+ * @todo this workaround should be replaced with a more robust solution
25130
25564
  */
25131
25565
  toCanvasElement(options) {
25132
25566
  const isEditing = this.isEditing;
@@ -25136,9 +25570,9 @@ class IText extends ITextClickBehavior {
25136
25570
  return canvas;
25137
25571
  }
25138
25572
 
25139
- /**
25140
- * Renders cursor or selection (depending on what exists)
25141
- * it does on the contextTop. If contextTop is not available, do nothing.
25573
+ /**
25574
+ * Renders cursor or selection (depending on what exists)
25575
+ * it does on the contextTop. If contextTop is not available, do nothing.
25142
25576
  */
25143
25577
  renderCursorOrSelection() {
25144
25578
  if (!this.isEditing || !this.canvas) {
@@ -25194,12 +25628,12 @@ class IText extends ITextClickBehavior {
25194
25628
  ctx.restore();
25195
25629
  }
25196
25630
 
25197
- /**
25198
- * Finds and returns an array of clip paths that are applied to the parent
25199
- * group(s) of the current FabricObject instance. The object's hierarchy is
25200
- * traversed upwards (from the current object towards the root of the canvas),
25201
- * checking each parent object for the presence of a `clipPath` that is not
25202
- * absolutely positioned.
25631
+ /**
25632
+ * Finds and returns an array of clip paths that are applied to the parent
25633
+ * group(s) of the current FabricObject instance. The object's hierarchy is
25634
+ * traversed upwards (from the current object towards the root of the canvas),
25635
+ * checking each parent object for the presence of a `clipPath` that is not
25636
+ * absolutely positioned.
25203
25637
  */
25204
25638
  findAncestorsWithClipPath() {
25205
25639
  const clipPathAncestors = [];
@@ -25214,13 +25648,13 @@ class IText extends ITextClickBehavior {
25214
25648
  return clipPathAncestors;
25215
25649
  }
25216
25650
 
25217
- /**
25218
- * Returns cursor boundaries (left, top, leftOffset, topOffset)
25219
- * left/top are left/top of entire text box
25220
- * leftOffset/topOffset are offset from that left/top point of a text box
25221
- * @private
25222
- * @param {number} [index] index from start
25223
- * @param {boolean} [skipCaching]
25651
+ /**
25652
+ * Returns cursor boundaries (left, top, leftOffset, topOffset)
25653
+ * left/top are left/top of entire text box
25654
+ * leftOffset/topOffset are offset from that left/top point of a text box
25655
+ * @private
25656
+ * @param {number} [index] index from start
25657
+ * @param {boolean} [skipCaching]
25224
25658
  */
25225
25659
  _getCursorBoundaries() {
25226
25660
  let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
@@ -25234,11 +25668,11 @@ class IText extends ITextClickBehavior {
25234
25668
  return this._getCursorBoundariesOriginal(index, skipCaching);
25235
25669
  }
25236
25670
 
25237
- /**
25238
- * Caches and returns cursor left/top offset relative to instance's center point
25239
- * @private
25240
- * @param {number} index index from start
25241
- * @param {boolean} [skipCaching]
25671
+ /**
25672
+ * Caches and returns cursor left/top offset relative to instance's center point
25673
+ * @private
25674
+ * @param {number} index index from start
25675
+ * @param {boolean} [skipCaching]
25242
25676
  */
25243
25677
  _getCursorBoundariesOffsets(index, skipCaching) {
25244
25678
  if (skipCaching) {
@@ -25250,9 +25684,9 @@ class IText extends ITextClickBehavior {
25250
25684
  return this.cursorOffsetCache = this.__getCursorBoundariesOffsets(index);
25251
25685
  }
25252
25686
 
25253
- /**
25254
- * Enhanced cursor boundaries using advanced hit testing when available
25255
- * @private
25687
+ /**
25688
+ * Enhanced cursor boundaries using advanced hit testing when available
25689
+ * @private
25256
25690
  */
25257
25691
  _getCursorBoundariesAdvanced(index) {
25258
25692
  if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
@@ -25268,9 +25702,9 @@ class IText extends ITextClickBehavior {
25268
25702
  };
25269
25703
  }
25270
25704
 
25271
- /**
25272
- * Enhanced selection start from pointer using BiDi-aware hit testing
25273
- * @override
25705
+ /**
25706
+ * Enhanced selection start from pointer using BiDi-aware hit testing
25707
+ * @override
25274
25708
  */
25275
25709
  getSelectionStartFromPointer(e) {
25276
25710
  if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
@@ -25284,9 +25718,9 @@ class IText extends ITextClickBehavior {
25284
25718
  return Math.min(hitResult.charIndex, this._text.length);
25285
25719
  }
25286
25720
 
25287
- /**
25288
- * Original cursor boundaries implementation
25289
- * @private
25721
+ /**
25722
+ * Original cursor boundaries implementation
25723
+ * @private
25290
25724
  */
25291
25725
  _getCursorBoundariesOriginal(index, skipCaching) {
25292
25726
  const left = this._getLeftOffset(),
@@ -25300,10 +25734,10 @@ class IText extends ITextClickBehavior {
25300
25734
  };
25301
25735
  }
25302
25736
 
25303
- /**
25304
- * Calculates cursor left/top offset relative to instance's center point
25305
- * @private
25306
- * @param {number} index index from start
25737
+ /**
25738
+ * Calculates cursor left/top offset relative to instance's center point
25739
+ * @private
25740
+ * @param {number} index index from start
25307
25741
  */
25308
25742
  __getCursorBoundariesOffsets(index) {
25309
25743
  let topOffset = 0,
@@ -25337,29 +25771,29 @@ class IText extends ITextClickBehavior {
25337
25771
  return boundaries;
25338
25772
  }
25339
25773
 
25340
- /**
25341
- * Renders cursor on context Top, outside the animation cycle, on request
25342
- * Used for the drag/drop effect.
25343
- * If contextTop is not available, do nothing.
25774
+ /**
25775
+ * Renders cursor on context Top, outside the animation cycle, on request
25776
+ * Used for the drag/drop effect.
25777
+ * If contextTop is not available, do nothing.
25344
25778
  */
25345
25779
  renderCursorAt(selectionStart) {
25346
25780
  this._renderCursor(this.canvas.contextTop, this._getCursorBoundaries(selectionStart, true), selectionStart);
25347
25781
  }
25348
25782
 
25349
- /**
25350
- * Renders cursor
25351
- * @param {Object} boundaries
25352
- * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25783
+ /**
25784
+ * Renders cursor
25785
+ * @param {Object} boundaries
25786
+ * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25353
25787
  */
25354
25788
  renderCursor(ctx, boundaries) {
25355
25789
  this._renderCursor(ctx, boundaries, this.selectionStart);
25356
25790
  }
25357
25791
 
25358
- /**
25359
- * Return the data needed to render the cursor for given selection start
25360
- * The left,top are relative to the object, while width and height are prescaled
25361
- * to look think with canvas zoom and object scaling,
25362
- * so they depend on canvas and object scaling
25792
+ /**
25793
+ * Return the data needed to render the cursor for given selection start
25794
+ * The left,top are relative to the object, while width and height are prescaled
25795
+ * to look think with canvas zoom and object scaling,
25796
+ * so they depend on canvas and object scaling
25363
25797
  */
25364
25798
  getCursorRenderingData() {
25365
25799
  let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
@@ -25382,9 +25816,9 @@ class IText extends ITextClickBehavior {
25382
25816
  };
25383
25817
  }
25384
25818
 
25385
- /**
25386
- * Render the cursor at the given selectionStart.
25387
- * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25819
+ /**
25820
+ * Render the cursor at the given selectionStart.
25821
+ * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25388
25822
  */
25389
25823
  _renderCursor(ctx, boundaries, selectionStart) {
25390
25824
  const {
@@ -25400,10 +25834,10 @@ class IText extends ITextClickBehavior {
25400
25834
  ctx.fillRect(left, top, width, height);
25401
25835
  }
25402
25836
 
25403
- /**
25404
- * Renders text selection
25405
- * @param {Object} boundaries Object with left/top/leftOffset/topOffset
25406
- * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25837
+ /**
25838
+ * Renders text selection
25839
+ * @param {Object} boundaries Object with left/top/leftOffset/topOffset
25840
+ * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25407
25841
  */
25408
25842
  renderSelection(ctx, boundaries) {
25409
25843
  const selection = {
@@ -25413,8 +25847,8 @@ class IText extends ITextClickBehavior {
25413
25847
  this._renderSelection(ctx, selection, boundaries);
25414
25848
  }
25415
25849
 
25416
- /**
25417
- * Renders drag start text selection
25850
+ /**
25851
+ * Renders drag start text selection
25418
25852
  */
25419
25853
  renderDragSourceEffect() {
25420
25854
  const dragStartSelection = this.draggableTextDelegate.getDragStartSelection();
@@ -25425,12 +25859,12 @@ class IText extends ITextClickBehavior {
25425
25859
  this.renderCursorAt(dragSelection);
25426
25860
  }
25427
25861
 
25428
- /**
25429
- * Renders text selection
25430
- * @private
25431
- * @param {{ selectionStart: number, selectionEnd: number }} selection
25432
- * @param {Object} boundaries Object with left/top/leftOffset/topOffset
25433
- * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25862
+ /**
25863
+ * Renders text selection
25864
+ * @private
25865
+ * @param {{ selectionStart: number, selectionEnd: number }} selection
25866
+ * @param {Object} boundaries Object with left/top/leftOffset/topOffset
25867
+ * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25434
25868
  */
25435
25869
  _renderSelection(ctx, selection, boundaries) {
25436
25870
  const selectionStart = selection.selectionStart,
@@ -25492,34 +25926,34 @@ class IText extends ITextClickBehavior {
25492
25926
  }
25493
25927
  }
25494
25928
 
25495
- /**
25496
- * High level function to know the height of the cursor.
25497
- * the currentChar is the one that precedes the cursor
25498
- * Returns fontSize of char at the current cursor
25499
- * Unused from the library, is for the end user
25500
- * @return {Number} Character font size
25929
+ /**
25930
+ * High level function to know the height of the cursor.
25931
+ * the currentChar is the one that precedes the cursor
25932
+ * Returns fontSize of char at the current cursor
25933
+ * Unused from the library, is for the end user
25934
+ * @return {Number} Character font size
25501
25935
  */
25502
25936
  getCurrentCharFontSize() {
25503
25937
  const cp = this._getCurrentCharIndex();
25504
25938
  return this.getValueOfPropertyAt(cp.l, cp.c, 'fontSize');
25505
25939
  }
25506
25940
 
25507
- /**
25508
- * High level function to know the color of the cursor.
25509
- * the currentChar is the one that precedes the cursor
25510
- * Returns color (fill) of char at the current cursor
25511
- * if the text object has a pattern or gradient for filler, it will return that.
25512
- * Unused by the library, is for the end user
25513
- * @return {String | TFiller} Character color (fill)
25941
+ /**
25942
+ * High level function to know the color of the cursor.
25943
+ * the currentChar is the one that precedes the cursor
25944
+ * Returns color (fill) of char at the current cursor
25945
+ * if the text object has a pattern or gradient for filler, it will return that.
25946
+ * Unused by the library, is for the end user
25947
+ * @return {String | TFiller} Character color (fill)
25514
25948
  */
25515
25949
  getCurrentCharColor() {
25516
25950
  const cp = this._getCurrentCharIndex();
25517
25951
  return this.getValueOfPropertyAt(cp.l, cp.c, FILL);
25518
25952
  }
25519
25953
 
25520
- /**
25521
- * Returns the cursor position for the getCurrent.. functions
25522
- * @private
25954
+ /**
25955
+ * Returns the cursor position for the getCurrent.. functions
25956
+ * @private
25523
25957
  */
25524
25958
  _getCurrentCharIndex() {
25525
25959
  const cursorPosition = this.get2DCursorLocation(this.selectionStart, true),
@@ -25535,52 +25969,52 @@ class IText extends ITextClickBehavior {
25535
25969
  super.dispose();
25536
25970
  }
25537
25971
  }
25538
- /**
25539
- * Index where text selection starts (or where cursor is when there is no selection)
25540
- * @type Number
25972
+ /**
25973
+ * Index where text selection starts (or where cursor is when there is no selection)
25974
+ * @type Number
25541
25975
  */
25542
- /**
25543
- * Index where text selection ends
25544
- * @type Number
25976
+ /**
25977
+ * Index where text selection ends
25978
+ * @type Number
25545
25979
  */
25546
- /**
25547
- * Color of text selection
25548
- * @type String
25980
+ /**
25981
+ * Color of text selection
25982
+ * @type String
25549
25983
  */
25550
- /**
25551
- * Indicates whether text is in editing mode
25552
- * @type Boolean
25984
+ /**
25985
+ * Indicates whether text is in editing mode
25986
+ * @type Boolean
25553
25987
  */
25554
- /**
25555
- * Indicates whether a text can be edited
25556
- * @type Boolean
25988
+ /**
25989
+ * Indicates whether a text can be edited
25990
+ * @type Boolean
25557
25991
  */
25558
- /**
25559
- * Border color of text object while it's in editing mode
25560
- * @type String
25992
+ /**
25993
+ * Border color of text object while it's in editing mode
25994
+ * @type String
25561
25995
  */
25562
- /**
25563
- * Width of cursor (in px)
25564
- * @type Number
25996
+ /**
25997
+ * Width of cursor (in px)
25998
+ * @type Number
25565
25999
  */
25566
- /**
25567
- * Color of text cursor color in editing mode.
25568
- * if not set (default) will take color from the text.
25569
- * if set to a color value that fabric can understand, it will
25570
- * be used instead of the color of the text at the current position.
25571
- * @type String
26000
+ /**
26001
+ * Color of text cursor color in editing mode.
26002
+ * if not set (default) will take color from the text.
26003
+ * if set to a color value that fabric can understand, it will
26004
+ * be used instead of the color of the text at the current position.
26005
+ * @type String
25572
26006
  */
25573
- /**
25574
- * Delay between cursor blink (in ms)
25575
- * @type Number
26007
+ /**
26008
+ * Delay between cursor blink (in ms)
26009
+ * @type Number
25576
26010
  */
25577
- /**
25578
- * Duration of cursor fade in (in ms)
25579
- * @type Number
26011
+ /**
26012
+ * Duration of cursor fade in (in ms)
26013
+ * @type Number
25580
26014
  */
25581
- /**
25582
- * Indicates whether internal text char widths can be cached
25583
- * @type Boolean
26015
+ /**
26016
+ * Indicates whether internal text char widths can be cached
26017
+ * @type Boolean
25584
26018
  */
25585
26019
  _defineProperty(IText, "ownDefaults", iTextDefaultValues);
25586
26020
  _defineProperty(IText, "type", 'IText');
@@ -25602,11 +26036,11 @@ const textboxDefaultValues = {
25602
26036
 
25603
26037
  // @TODO this is not complete
25604
26038
 
25605
- /**
25606
- * Textbox class, based on IText, allows the user to resize the text rectangle
25607
- * and wraps lines automatically. Textboxes have their Y scaling locked, the
25608
- * user can only change width. Height is adjusted automatically based on the
25609
- * wrapping of lines.
26039
+ /**
26040
+ * Textbox class, based on IText, allows the user to resize the text rectangle
26041
+ * and wraps lines automatically. Textboxes have their Y scaling locked, the
26042
+ * user can only change width. Height is adjusted automatically based on the
26043
+ * wrapping of lines.
25610
26044
  */
25611
26045
  class Textbox extends IText {
25612
26046
  static getDefaults() {
@@ -25616,10 +26050,10 @@ class Textbox extends IText {
25616
26050
  };
25617
26051
  }
25618
26052
 
25619
- /**
25620
- * Constructor
25621
- * @param {String} text Text string
25622
- * @param {Object} [options] Options object
26053
+ /**
26054
+ * Constructor
26055
+ * @param {String} text Text string
26056
+ * @param {Object} [options] Options object
25623
26057
  */
25624
26058
  constructor(text, options) {
25625
26059
  super(text, {
@@ -25629,10 +26063,10 @@ class Textbox extends IText {
25629
26063
  this.initializeEventListeners();
25630
26064
  }
25631
26065
 
25632
- /**
25633
- * Creates the default control object.
25634
- * If you prefer to have on instance of controls shared among all objects
25635
- * make this function return an empty object and add controls to the ownDefaults object
26066
+ /**
26067
+ * Creates the default control object.
26068
+ * If you prefer to have on instance of controls shared among all objects
26069
+ * make this function return an empty object and add controls to the ownDefaults object
25636
26070
  */
25637
26071
  static createControls() {
25638
26072
  return {
@@ -25640,11 +26074,11 @@ class Textbox extends IText {
25640
26074
  };
25641
26075
  }
25642
26076
 
25643
- /**
25644
- * Unlike superclass's version of this function, Textbox does not update
25645
- * its width.
25646
- * @private
25647
- * @override
26077
+ /**
26078
+ * Unlike superclass's version of this function, Textbox does not update
26079
+ * its width.
26080
+ * @private
26081
+ * @override
25648
26082
  */
25649
26083
  initDimensions() {
25650
26084
  if (!this.initialized) {
@@ -25673,9 +26107,9 @@ class Textbox extends IText {
25673
26107
  this.height = this.calcTextHeight();
25674
26108
  }
25675
26109
 
25676
- /**
25677
- * Advanced dimensions calculation using new layout engine
25678
- * @private
26110
+ /**
26111
+ * Advanced dimensions calculation using new layout engine
26112
+ * @private
25679
26113
  */
25680
26114
  initDimensionsAdvanced() {
25681
26115
  if (!this.initialized) {
@@ -25730,9 +26164,9 @@ class Textbox extends IText {
25730
26164
  this.dirty = true;
25731
26165
  }
25732
26166
 
25733
- /**
25734
- * Generate style map from new layout format
25735
- * @private
26167
+ /**
26168
+ * Generate style map from new layout format
26169
+ * @private
25736
26170
  */
25737
26171
  _generateStyleMapFromLayout(layout) {
25738
26172
  const map = {};
@@ -25754,12 +26188,12 @@ class Textbox extends IText {
25754
26188
  return map;
25755
26189
  }
25756
26190
 
25757
- /**
25758
- * Generate an object that translates the style object so that it is
25759
- * broken up by visual lines (new lines and automatic wrapping).
25760
- * The original text styles object is broken up by actual lines (new lines only),
25761
- * which is only sufficient for Text / IText
25762
- * @private
26191
+ /**
26192
+ * Generate an object that translates the style object so that it is
26193
+ * broken up by visual lines (new lines and automatic wrapping).
26194
+ * The original text styles object is broken up by actual lines (new lines only),
26195
+ * which is only sufficient for Text / IText
26196
+ * @private
25763
26197
  */
25764
26198
  _generateStyleMap(textInfo) {
25765
26199
  let realLineCount = 0,
@@ -25786,10 +26220,10 @@ class Textbox extends IText {
25786
26220
  return map;
25787
26221
  }
25788
26222
 
25789
- /**
25790
- * Returns true if object has a style property or has it on a specified line
25791
- * @param {Number} lineIndex
25792
- * @return {Boolean}
26223
+ /**
26224
+ * Returns true if object has a style property or has it on a specified line
26225
+ * @param {Number} lineIndex
26226
+ * @return {Boolean}
25793
26227
  */
25794
26228
  styleHas(property, lineIndex) {
25795
26229
  if (this._styleMap && !this.isWrapping) {
@@ -25801,10 +26235,10 @@ class Textbox extends IText {
25801
26235
  return super.styleHas(property, lineIndex);
25802
26236
  }
25803
26237
 
25804
- /**
25805
- * Returns true if object has no styling or no styling in a line
25806
- * @param {Number} lineIndex , lineIndex is on wrapped lines.
25807
- * @return {Boolean}
26238
+ /**
26239
+ * Returns true if object has no styling or no styling in a line
26240
+ * @param {Number} lineIndex , lineIndex is on wrapped lines.
26241
+ * @return {Boolean}
25808
26242
  */
25809
26243
  isEmptyStyles(lineIndex) {
25810
26244
  if (!this.styles) {
@@ -25841,11 +26275,11 @@ class Textbox extends IText {
25841
26275
  return true;
25842
26276
  }
25843
26277
 
25844
- /**
25845
- * @protected
25846
- * @param {Number} lineIndex
25847
- * @param {Number} charIndex
25848
- * @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
26278
+ /**
26279
+ * @protected
26280
+ * @param {Number} lineIndex
26281
+ * @param {Number} charIndex
26282
+ * @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
25849
26283
  */
25850
26284
  _getStyleDeclaration(lineIndex, charIndex) {
25851
26285
  if (this._styleMap && !this.isWrapping) {
@@ -25859,59 +26293,59 @@ class Textbox extends IText {
25859
26293
  return super._getStyleDeclaration(lineIndex, charIndex);
25860
26294
  }
25861
26295
 
25862
- /**
25863
- * @param {Number} lineIndex
25864
- * @param {Number} charIndex
25865
- * @param {Object} style
25866
- * @private
26296
+ /**
26297
+ * @param {Number} lineIndex
26298
+ * @param {Number} charIndex
26299
+ * @param {Object} style
26300
+ * @private
25867
26301
  */
25868
26302
  _setStyleDeclaration(lineIndex, charIndex, style) {
25869
26303
  const map = this._styleMap[lineIndex];
25870
26304
  super._setStyleDeclaration(map.line, map.offset + charIndex, style);
25871
26305
  }
25872
26306
 
25873
- /**
25874
- * @param {Number} lineIndex
25875
- * @param {Number} charIndex
25876
- * @private
26307
+ /**
26308
+ * @param {Number} lineIndex
26309
+ * @param {Number} charIndex
26310
+ * @private
25877
26311
  */
25878
26312
  _deleteStyleDeclaration(lineIndex, charIndex) {
25879
26313
  const map = this._styleMap[lineIndex];
25880
26314
  super._deleteStyleDeclaration(map.line, map.offset + charIndex);
25881
26315
  }
25882
26316
 
25883
- /**
25884
- * probably broken need a fix
25885
- * Returns the real style line that correspond to the wrapped lineIndex line
25886
- * Used just to verify if the line does exist or not.
25887
- * @param {Number} lineIndex
25888
- * @returns {Boolean} if the line exists or not
25889
- * @private
26317
+ /**
26318
+ * probably broken need a fix
26319
+ * Returns the real style line that correspond to the wrapped lineIndex line
26320
+ * Used just to verify if the line does exist or not.
26321
+ * @param {Number} lineIndex
26322
+ * @returns {Boolean} if the line exists or not
26323
+ * @private
25890
26324
  */
25891
26325
  _getLineStyle(lineIndex) {
25892
26326
  const map = this._styleMap[lineIndex];
25893
26327
  return !!this.styles[map.line];
25894
26328
  }
25895
26329
 
25896
- /**
25897
- * Set the line style to an empty object so that is initialized
25898
- * @param {Number} lineIndex
25899
- * @param {Object} style
25900
- * @private
26330
+ /**
26331
+ * Set the line style to an empty object so that is initialized
26332
+ * @param {Number} lineIndex
26333
+ * @param {Object} style
26334
+ * @private
25901
26335
  */
25902
26336
  _setLineStyle(lineIndex) {
25903
26337
  const map = this._styleMap[lineIndex];
25904
26338
  super._setLineStyle(map.line);
25905
26339
  }
25906
26340
 
25907
- /**
25908
- * Wraps text using the 'width' property of Textbox. First this function
25909
- * splits text on newlines, so we preserve newlines entered by the user.
25910
- * Then it wraps each line using the width of the Textbox by calling
25911
- * _wrapLine().
25912
- * @param {Array} lines The string array of text that is split into lines
25913
- * @param {Number} desiredWidth width you want to wrap to
25914
- * @returns {Array} Array of lines
26341
+ /**
26342
+ * Wraps text using the 'width' property of Textbox. First this function
26343
+ * splits text on newlines, so we preserve newlines entered by the user.
26344
+ * Then it wraps each line using the width of the Textbox by calling
26345
+ * _wrapLine().
26346
+ * @param {Array} lines The string array of text that is split into lines
26347
+ * @param {Number} desiredWidth width you want to wrap to
26348
+ * @returns {Array} Array of lines
25915
26349
  */
25916
26350
  _wrapText(lines, desiredWidth) {
25917
26351
  this.isWrapping = true;
@@ -25925,12 +26359,12 @@ class Textbox extends IText {
25925
26359
  return wrapped;
25926
26360
  }
25927
26361
 
25928
- /**
25929
- * For each line of text terminated by an hard line stop,
25930
- * measure each word width and extract the largest word from all.
25931
- * The returned words here are the one that at the end will be rendered.
25932
- * @param {string[]} lines the lines we need to measure
25933
- *
26362
+ /**
26363
+ * For each line of text terminated by an hard line stop,
26364
+ * measure each word width and extract the largest word from all.
26365
+ * The returned words here are the one that at the end will be rendered.
26366
+ * @param {string[]} lines the lines we need to measure
26367
+ *
25934
26368
  */
25935
26369
  getGraphemeDataForRender(lines) {
25936
26370
  const splitByGrapheme = this.splitByGrapheme,
@@ -25963,17 +26397,17 @@ class Textbox extends IText {
25963
26397
  };
25964
26398
  }
25965
26399
 
25966
- /**
25967
- * Helper function to measure a string of text, given its lineIndex and charIndex offset
25968
- * It gets called when charBounds are not available yet.
25969
- * Override if necessary
25970
- * Use with {@link Textbox#wordSplit}
25971
- *
25972
- * @param {CanvasRenderingContext2D} ctx
25973
- * @param {String} text
25974
- * @param {number} lineIndex
25975
- * @param {number} charOffset
25976
- * @returns {number}
26400
+ /**
26401
+ * Helper function to measure a string of text, given its lineIndex and charIndex offset
26402
+ * It gets called when charBounds are not available yet.
26403
+ * Override if necessary
26404
+ * Use with {@link Textbox#wordSplit}
26405
+ *
26406
+ * @param {CanvasRenderingContext2D} ctx
26407
+ * @param {String} text
26408
+ * @param {number} lineIndex
26409
+ * @param {number} charOffset
26410
+ * @returns {number}
25977
26411
  */
25978
26412
  _measureWord(word, lineIndex) {
25979
26413
  let charOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
@@ -25988,26 +26422,26 @@ class Textbox extends IText {
25988
26422
  return width;
25989
26423
  }
25990
26424
 
25991
- /**
25992
- * Override this method to customize word splitting
25993
- * Use with {@link Textbox#_measureWord}
25994
- * @param {string} value
25995
- * @returns {string[]} array of words
26425
+ /**
26426
+ * Override this method to customize word splitting
26427
+ * Use with {@link Textbox#_measureWord}
26428
+ * @param {string} value
26429
+ * @returns {string[]} array of words
25996
26430
  */
25997
26431
  wordSplit(value) {
25998
26432
  return value.split(this._wordJoiners);
25999
26433
  }
26000
26434
 
26001
- /**
26002
- * Wraps a line of text using the width of the Textbox as desiredWidth
26003
- * and leveraging the known width o words from GraphemeData
26004
- * @private
26005
- * @param {Number} lineIndex
26006
- * @param {Number} desiredWidth width you want to wrap the line to
26007
- * @param {GraphemeData} graphemeData an object containing all the lines' words width.
26008
- * @param {Number} reservedSpace space to remove from wrapping for custom functionalities
26009
- * @returns {Array} Array of line(s) into which the given text is wrapped
26010
- * to.
26435
+ /**
26436
+ * Wraps a line of text using the width of the Textbox as desiredWidth
26437
+ * and leveraging the known width o words from GraphemeData
26438
+ * @private
26439
+ * @param {Number} lineIndex
26440
+ * @param {Number} desiredWidth width you want to wrap the line to
26441
+ * @param {GraphemeData} graphemeData an object containing all the lines' words width.
26442
+ * @param {Number} reservedSpace space to remove from wrapping for custom functionalities
26443
+ * @returns {Array} Array of line(s) into which the given text is wrapped
26444
+ * to.
26011
26445
  */
26012
26446
  _wrapLine(lineIndex, desiredWidth, _ref) {
26013
26447
  let {
@@ -26065,11 +26499,11 @@ class Textbox extends IText {
26065
26499
  return graphemeLines;
26066
26500
  }
26067
26501
 
26068
- /**
26069
- * Detect if the text line is ended with an hard break
26070
- * text and itext do not have wrapping, return false
26071
- * @param {Number} lineIndex text to split
26072
- * @return {Boolean}
26502
+ /**
26503
+ * Detect if the text line is ended with an hard break
26504
+ * text and itext do not have wrapping, return false
26505
+ * @param {Number} lineIndex text to split
26506
+ * @return {Boolean}
26073
26507
  */
26074
26508
  isEndOfWrapping(lineIndex) {
26075
26509
  if (!this._styleMap[lineIndex + 1]) {
@@ -26083,12 +26517,12 @@ class Textbox extends IText {
26083
26517
  return false;
26084
26518
  }
26085
26519
 
26086
- /**
26087
- * Detect if a line has a linebreak and so we need to account for it when moving
26088
- * and counting style.
26089
- * This is important only for splitByGrapheme at the end of wrapping.
26090
- * If we are not wrapping the offset is always 1
26091
- * @return Number
26520
+ /**
26521
+ * Detect if a line has a linebreak and so we need to account for it when moving
26522
+ * and counting style.
26523
+ * This is important only for splitByGrapheme at the end of wrapping.
26524
+ * If we are not wrapping the offset is always 1
26525
+ * @return Number
26092
26526
  */
26093
26527
  missingNewlineOffset(lineIndex, skipWrapping) {
26094
26528
  if (this.splitByGrapheme && !skipWrapping) {
@@ -26097,12 +26531,12 @@ class Textbox extends IText {
26097
26531
  return 1;
26098
26532
  }
26099
26533
 
26100
- /**
26101
- * Gets lines of text to render in the Textbox. This function calculates
26102
- * text wrapping on the fly every time it is called.
26103
- * @param {String} text text to split
26104
- * @returns {Array} Array of lines in the Textbox.
26105
- * @override
26534
+ /**
26535
+ * Gets lines of text to render in the Textbox. This function calculates
26536
+ * text wrapping on the fly every time it is called.
26537
+ * @param {String} text text to split
26538
+ * @returns {Array} Array of lines in the Textbox.
26539
+ * @override
26106
26540
  */
26107
26541
  _splitTextIntoLines(text) {
26108
26542
  const newText = super._splitTextIntoLines(text),
@@ -26134,9 +26568,9 @@ class Textbox extends IText {
26134
26568
  }
26135
26569
  }
26136
26570
 
26137
- /**
26138
- * Initialize event listeners for safety snap functionality
26139
- * @private
26571
+ /**
26572
+ * Initialize event listeners for safety snap functionality
26573
+ * @private
26140
26574
  */
26141
26575
  initializeEventListeners() {
26142
26576
  var _this$canvas;
@@ -26179,12 +26613,12 @@ class Textbox extends IText {
26179
26613
  });
26180
26614
  }
26181
26615
 
26182
- /**
26183
- * Safety snap to prevent glyph clipping after manual resize.
26184
- * Similar to Polotno - checks if any glyphs are too close to edges
26185
- * and automatically expands width if needed.
26186
- * @private
26187
- * @param resizeOrigin - Which side was used for resizing ('left' or 'right')
26616
+ /**
26617
+ * Safety snap to prevent glyph clipping after manual resize.
26618
+ * Similar to Polotno - checks if any glyphs are too close to edges
26619
+ * and automatically expands width if needed.
26620
+ * @private
26621
+ * @param resizeOrigin - Which side was used for resizing ('left' or 'right')
26188
26622
  */
26189
26623
  safetySnapWidth(resizeOrigin) {
26190
26624
  // For Textbox objects, we always want to check for clipping regardless of isWrapping flag
@@ -26251,31 +26685,31 @@ class Textbox extends IText {
26251
26685
  }
26252
26686
  }
26253
26687
 
26254
- /**
26255
- * Returns object representation of an instance
26256
- * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
26257
- * @return {Object} object representation of an instance
26688
+ /**
26689
+ * Returns object representation of an instance
26690
+ * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
26691
+ * @return {Object} object representation of an instance
26258
26692
  */
26259
26693
  toObject() {
26260
26694
  let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
26261
26695
  return super.toObject(['minWidth', 'splitByGrapheme', ...propertiesToInclude]);
26262
26696
  }
26263
26697
  }
26264
- /**
26265
- * Minimum width of textbox, in pixels.
26266
- * @type Number
26267
- */
26268
- /**
26269
- * Minimum calculated width of a textbox, in pixels.
26270
- * fixed to 2 so that an empty textbox cannot go to 0
26271
- * and is still selectable without text.
26272
- * @type Number
26273
- */
26274
- /**
26275
- * Use this boolean property in order to split strings that have no white space concept.
26276
- * this is a cheap way to help with chinese/japanese
26277
- * @type Boolean
26278
- * @since 2.6.0
26698
+ /**
26699
+ * Minimum width of textbox, in pixels.
26700
+ * @type Number
26701
+ */
26702
+ /**
26703
+ * Minimum calculated width of a textbox, in pixels.
26704
+ * fixed to 2 so that an empty textbox cannot go to 0
26705
+ * and is still selectable without text.
26706
+ * @type Number
26707
+ */
26708
+ /**
26709
+ * Use this boolean property in order to split strings that have no white space concept.
26710
+ * this is a cheap way to help with chinese/japanese
26711
+ * @type Boolean
26712
+ * @since 2.6.0
26279
26713
  */
26280
26714
  _defineProperty(Textbox, "type", 'Textbox');
26281
26715
  _defineProperty(Textbox, "textLayoutProperties", [...IText.textLayoutProperties, 'width']);