@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.js CHANGED
@@ -360,7 +360,7 @@
360
360
  }
361
361
  const cache = new Cache();
362
362
 
363
- var version = "7.0.1-beta1";
363
+ var version = "7.0.1-beta3";
364
364
 
365
365
  // use this syntax so babel plugin see this import here
366
366
  const VERSION = version;
@@ -17577,33 +17577,29 @@
17577
17577
  }
17578
17578
  }
17579
17579
 
17580
- // @TODO this code is terrible and Line should be a special case of polyline.
17581
-
17582
17580
  const coordProps = ['x1', 'x2', 'y1', 'y2'];
17583
- /**
17584
- * A Class to draw a line
17585
- * A bunch of methods will be added to Polyline to handle the line case
17586
- * The line class is very strange to work with, is all special, it hardly aligns
17587
- * to what a developer want everytime there is an angle
17588
- * @deprecated
17589
- */
17590
17581
  class Line extends FabricObject {
17591
- /**
17592
- * Constructor
17593
- * @param {Array} [points] Array of points
17594
- * @param {Object} [options] Options object
17595
- * @return {Line} thisArg
17596
- */
17597
17582
  constructor() {
17598
- let [x1, y1, x2, y2] = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [0, 0, 0, 0];
17583
+ let [x1, y1, x2, y2] = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [0, 0, 100, 0];
17599
17584
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17600
17585
  super();
17601
- Object.assign(this, Line.ownDefaults);
17586
+ _defineProperty(this, "hitStrokeWidth", 'auto');
17587
+ _defineProperty(this, "_updatingEndpoints", false);
17588
+ _defineProperty(this, "_useEndpointCoords", true);
17602
17589
  this.setOptions(options);
17603
17590
  this.x1 = x1;
17604
17591
  this.x2 = x2;
17605
17592
  this.y1 = y1;
17606
17593
  this.y2 = y2;
17594
+ if (options.hitStrokeWidth !== undefined) {
17595
+ this.hitStrokeWidth = options.hitStrokeWidth;
17596
+ }
17597
+ this.hasBorders = false;
17598
+ this.hasControls = true;
17599
+ this.selectable = true;
17600
+ this.hoverCursor = 'move';
17601
+ this.perPixelTargetFind = false;
17602
+ this.strokeLineCap = 'butt';
17607
17603
  this._setWidthHeight();
17608
17604
  const {
17609
17605
  left,
@@ -17611,96 +17607,323 @@
17611
17607
  } = options;
17612
17608
  typeof left === 'number' && this.set(LEFT, left);
17613
17609
  typeof top === 'number' && this.set(TOP, top);
17610
+ this._setupLineControls();
17611
+ }
17612
+ _setupLineControls() {
17613
+ this.controls = {
17614
+ p1: new Control({
17615
+ x: 0,
17616
+ y: 0,
17617
+ cursorStyle: 'move',
17618
+ actionHandler: this._endpointActionHandler.bind(this),
17619
+ positionHandler: this._p1PositionHandler.bind(this),
17620
+ render: this._renderEndpointControl.bind(this),
17621
+ sizeX: 12,
17622
+ sizeY: 12
17623
+ }),
17624
+ p2: new Control({
17625
+ x: 0,
17626
+ y: 0,
17627
+ cursorStyle: 'move',
17628
+ actionHandler: this._endpointActionHandler.bind(this),
17629
+ positionHandler: this._p2PositionHandler.bind(this),
17630
+ render: this._renderEndpointControl.bind(this),
17631
+ sizeX: 12,
17632
+ sizeY: 12
17633
+ })
17634
+ };
17635
+ }
17636
+ _p1PositionHandler() {
17637
+ var _this$canvas;
17638
+ const vpt = ((_this$canvas = this.canvas) === null || _this$canvas === void 0 ? void 0 : _this$canvas.viewportTransform) || [1, 0, 0, 1, 0, 0];
17639
+ return new Point(this.x1, this.y1).transform(vpt);
17640
+ }
17641
+ _p2PositionHandler() {
17642
+ var _this$canvas2;
17643
+ const vpt = ((_this$canvas2 = this.canvas) === null || _this$canvas2 === void 0 ? void 0 : _this$canvas2.viewportTransform) || [1, 0, 0, 1, 0, 0];
17644
+ return new Point(this.x2, this.y2).transform(vpt);
17645
+ }
17646
+ _renderEndpointControl(ctx, left, top) {
17647
+ const size = 12;
17648
+ ctx.save();
17649
+ ctx.fillStyle = '#007bff';
17650
+ ctx.strokeStyle = '#ffffff';
17651
+ ctx.lineWidth = 2;
17652
+ ctx.beginPath();
17653
+ ctx.arc(left, top, size / 2, 0, 2 * Math.PI);
17654
+ ctx.fill();
17655
+ ctx.stroke();
17656
+ ctx.restore();
17657
+ }
17658
+ drawBorders(ctx) {
17659
+ let styleOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17660
+ if (this._useEndpointCoords) {
17661
+ this._drawLineBorders(ctx, styleOverride);
17662
+ return this;
17663
+ }
17664
+ return super.drawBorders(ctx, styleOverride, {});
17665
+ }
17666
+ _drawLineBorders(ctx) {
17667
+ var _this$canvas3;
17668
+ let styleOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17669
+ const vpt = ((_this$canvas3 = this.canvas) === null || _this$canvas3 === void 0 ? void 0 : _this$canvas3.viewportTransform) || [1, 0, 0, 1, 0, 0];
17670
+ ctx.save();
17671
+ ctx.setTransform(vpt[0], vpt[1], vpt[2], vpt[3], vpt[4], vpt[5]);
17672
+ ctx.strokeStyle = styleOverride.borderColor || this.borderColor || 'rgba(100, 200, 200, 0.5)';
17673
+ ctx.lineWidth = (this.strokeWidth || 1) + 5;
17674
+ ctx.lineCap = this.strokeLineCap || 'butt';
17675
+ ctx.globalAlpha = this.isMoving ? this.borderOpacityWhenMoving : 1;
17676
+ ctx.beginPath();
17677
+ ctx.moveTo(this.x1, this.y1);
17678
+ ctx.lineTo(this.x2, this.y2);
17679
+ ctx.stroke();
17680
+ ctx.restore();
17681
+ }
17682
+ _renderControls(ctx) {
17683
+ let styleOverride = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17684
+ ctx.save();
17685
+ ctx.globalAlpha = this.isMoving ? this.borderOpacityWhenMoving : 1;
17686
+ this.drawControls(ctx, styleOverride);
17687
+ ctx.restore();
17688
+ }
17689
+ getBoundingRect() {
17690
+ if (this._useEndpointCoords) {
17691
+ const {
17692
+ x1,
17693
+ y1,
17694
+ x2,
17695
+ y2
17696
+ } = this;
17697
+ const effectiveStrokeWidth = this.hitStrokeWidth === 'auto' ? this.strokeWidth : this.hitStrokeWidth;
17698
+ const padding = Math.max(effectiveStrokeWidth / 2 + 5, 10);
17699
+ return {
17700
+ left: Math.min(x1, x2) - padding,
17701
+ top: Math.min(y1, y2) - padding,
17702
+ width: Math.abs(x2 - x1) + padding * 2 || padding * 2,
17703
+ height: Math.abs(y2 - y1) + padding * 2 || padding * 2
17704
+ };
17705
+ }
17706
+ return super.getBoundingRect();
17707
+ }
17708
+ setCoords() {
17709
+ if (this._useEndpointCoords) {
17710
+ const minX = Math.min(this.x1, this.x2);
17711
+ const maxX = Math.max(this.x1, this.x2);
17712
+ const minY = Math.min(this.y1, this.y2);
17713
+ const maxY = Math.max(this.y1, this.y2);
17714
+ const effectiveStrokeWidth = this.hitStrokeWidth === 'auto' ? this.strokeWidth : this.hitStrokeWidth;
17715
+ const hitPadding = Math.max(effectiveStrokeWidth / 2 + 5, 10);
17716
+ this.left = minX - hitPadding + (maxX - minX + hitPadding * 2) / 2;
17717
+ this.top = minY - hitPadding + (maxY - minY + hitPadding * 2) / 2;
17718
+ this.width = Math.abs(this.x2 - this.x1) + hitPadding * 2;
17719
+ this.height = Math.abs(this.y2 - this.y1) + hitPadding * 2;
17720
+ }
17721
+ super.setCoords();
17722
+ }
17723
+ getCoords() {
17724
+ if (this._useEndpointCoords) {
17725
+ const deltaX = this.x2 - this.x1;
17726
+ const deltaY = this.y2 - this.y1;
17727
+ const length = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
17728
+ if (length === 0) {
17729
+ return super.getCoords();
17730
+ }
17731
+ const effectiveStrokeWidth = this.hitStrokeWidth === 'auto' ? this.strokeWidth : this.hitStrokeWidth;
17732
+ const halfWidth = Math.max(effectiveStrokeWidth / 2 + 2, 5);
17733
+
17734
+ // Unit vector perpendicular to line
17735
+ const perpX = -deltaY / length;
17736
+ const perpY = deltaX / length;
17737
+
17738
+ // Four corners of oriented rectangle
17739
+ 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)];
17740
+ }
17741
+ return super.getCoords();
17614
17742
  }
17743
+ containsPoint(point) {
17744
+ if (this._useEndpointCoords) {
17745
+ var _this$canvas4;
17746
+ if (((_this$canvas4 = this.canvas) === null || _this$canvas4 === void 0 ? void 0 : _this$canvas4.getActiveObject()) === this) {
17747
+ return super.containsPoint(point);
17748
+ }
17749
+ const distance = this._distanceToLineSegment(point.x, point.y);
17750
+ const effectiveStrokeWidth = this.hitStrokeWidth === 'auto' ? this.strokeWidth : this.hitStrokeWidth || 1;
17751
+ const tolerance = Math.max(effectiveStrokeWidth / 2 + 2, 5);
17752
+ return distance <= tolerance;
17753
+ }
17754
+ return super.containsPoint(point);
17755
+ }
17756
+ _distanceToLineSegment(px, py) {
17757
+ const x1 = this.x1,
17758
+ y1 = this.y1,
17759
+ x2 = this.x2,
17760
+ y2 = this.y2;
17761
+ const pd2 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
17762
+ if (pd2 === 0) {
17763
+ return Math.sqrt((px - x1) * (px - x1) + (py - y1) * (py - y1));
17764
+ }
17765
+ const u = ((px - x1) * (x2 - x1) + (py - y1) * (y2 - y1)) / pd2;
17766
+ let closestX, closestY;
17767
+ if (u < 0) {
17768
+ closestX = x1;
17769
+ closestY = y1;
17770
+ } else if (u > 1) {
17771
+ closestX = x2;
17772
+ closestY = y2;
17773
+ } else {
17774
+ closestX = x1 + u * (x2 - x1);
17775
+ closestY = y1 + u * (y2 - y1);
17776
+ }
17777
+ return Math.sqrt((px - closestX) * (px - closestX) + (py - closestY) * (py - closestY));
17778
+ }
17779
+ _endpointActionHandler(eventData, transformData, x, y) {
17780
+ var _this$canvas6;
17781
+ const controlKey = transformData.corner;
17782
+ const pointer = new Point(x, y);
17783
+ let newX = pointer.x;
17784
+ let newY = pointer.y;
17785
+ if (eventData.shiftKey) {
17786
+ const otherControl = controlKey === 'p1' ? 'p2' : 'p1';
17787
+ const otherX = this[otherControl === 'p1' ? 'x1' : 'x2'];
17788
+ const otherY = this[otherControl === 'p1' ? 'y1' : 'y2'];
17789
+ const snapped = this._snapToAngle(otherX, otherY, newX, newY);
17790
+ newX = snapped.x;
17791
+ newY = snapped.y;
17792
+ }
17793
+ if (this._useEndpointCoords) {
17794
+ var _this$canvas5;
17795
+ if (controlKey === 'p1') {
17796
+ this.x1 = newX;
17797
+ this.y1 = newY;
17798
+ } else if (controlKey === 'p2') {
17799
+ this.x2 = newX;
17800
+ this.y2 = newY;
17801
+ }
17802
+ this.dirty = true;
17803
+ this.setCoords();
17804
+ (_this$canvas5 = this.canvas) === null || _this$canvas5 === void 0 || _this$canvas5.requestRenderAll();
17805
+ return true;
17806
+ }
17615
17807
 
17616
- /**
17617
- * @private
17618
- * @param {Object} [options] Options
17619
- */
17808
+ // Fallback for old system
17809
+ this._updatingEndpoints = true;
17810
+ if (controlKey === 'p1') {
17811
+ this.x1 = newX;
17812
+ this.y1 = newY;
17813
+ } else if (controlKey === 'p2') {
17814
+ this.x2 = newX;
17815
+ this.y2 = newY;
17816
+ }
17817
+ this._setWidthHeight();
17818
+ this.dirty = true;
17819
+ this._updatingEndpoints = false;
17820
+ (_this$canvas6 = this.canvas) === null || _this$canvas6 === void 0 || _this$canvas6.requestRenderAll();
17821
+ this.fire('modified', {
17822
+ transform: transformData,
17823
+ target: this,
17824
+ e: eventData
17825
+ });
17826
+ return true;
17827
+ }
17828
+ _snapToAngle(fromX, fromY, toX, toY) {
17829
+ const deltaX = toX - fromX;
17830
+ const deltaY = toY - fromY;
17831
+ const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
17832
+ if (distance === 0) return {
17833
+ x: toX,
17834
+ y: toY
17835
+ };
17836
+ let angle = Math.atan2(deltaY, deltaX) * (180 / Math.PI);
17837
+ const snapIncrement = 15;
17838
+ const snappedAngle = Math.round(angle / snapIncrement) * snapIncrement;
17839
+ const snappedRadians = snappedAngle * (Math.PI / 180);
17840
+ return {
17841
+ x: fromX + Math.cos(snappedRadians) * distance,
17842
+ y: fromY + Math.sin(snappedRadians) * distance
17843
+ };
17844
+ }
17620
17845
  _setWidthHeight() {
17621
- const {
17622
- x1,
17623
- y1,
17624
- x2,
17625
- y2
17626
- } = this;
17627
- this.width = Math.abs(x2 - x1);
17628
- this.height = Math.abs(y2 - y1);
17629
- const {
17630
- left,
17631
- top,
17632
- width,
17633
- height
17634
- } = makeBoundingBoxFromPoints([{
17635
- x: x1,
17636
- y: y1
17637
- }, {
17638
- x: x2,
17639
- y: y2
17640
- }]);
17641
- const position = new Point(left + width / 2, top + height / 2);
17642
- this.setPositionByOrigin(position, CENTER, CENTER);
17846
+ let skipReposition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
17847
+ this.width = Math.abs(this.x2 - this.x1) || 1;
17848
+ this.height = Math.abs(this.y2 - this.y1) || 1;
17849
+ if (!skipReposition && !this._updatingEndpoints) {
17850
+ const {
17851
+ left,
17852
+ top,
17853
+ width,
17854
+ height
17855
+ } = makeBoundingBoxFromPoints([{
17856
+ x: this.x1,
17857
+ y: this.y1
17858
+ }, {
17859
+ x: this.x2,
17860
+ y: this.y2
17861
+ }]);
17862
+ this.setPositionByOrigin(new Point(left + width / 2, top + height / 2), CENTER, CENTER);
17863
+ }
17643
17864
  }
17644
-
17645
- /**
17646
- * @private
17647
- * @param {String} key
17648
- * @param {*} value
17649
- */
17650
17865
  _set(key, value) {
17866
+ const oldLeft = this.left;
17867
+ const oldTop = this.top;
17651
17868
  super._set(key, value);
17652
17869
  if (coordProps.includes(key)) {
17653
- // this doesn't make sense very much, since setting x1 when top or left
17654
- // are already set, is just going to show a strange result since the
17655
- // line will move way more than the developer expect.
17656
- // in fabric5 it worked only when the line didn't have extra transformations,
17657
- // in fabric6 too. With extra transform they behave bad in different ways.
17658
- // This needs probably a good rework or a tutorial if you have to create a dynamic line
17659
17870
  this._setWidthHeight();
17871
+ this.dirty = true;
17872
+ }
17873
+ if ((key === 'left' || key === 'top') && this.canvas && !this._updatingEndpoints) {
17874
+ const deltaX = this.left - oldLeft;
17875
+ const deltaY = this.top - oldTop;
17876
+ if (deltaX !== 0 || deltaY !== 0) {
17877
+ this._updatingEndpoints = true;
17878
+ this.x1 += deltaX;
17879
+ this.y1 += deltaY;
17880
+ this.x2 += deltaX;
17881
+ this.y2 += deltaY;
17882
+ this._updatingEndpoints = false;
17883
+ }
17660
17884
  }
17661
17885
  return this;
17662
17886
  }
17663
-
17664
- /**
17665
- * @private
17666
- * @param {CanvasRenderingContext2D} ctx Context to render on
17667
- */
17887
+ render(ctx) {
17888
+ if (this._useEndpointCoords) {
17889
+ this._renderDirectly(ctx);
17890
+ return;
17891
+ }
17892
+ super.render(ctx);
17893
+ }
17894
+ _renderDirectly(ctx) {
17895
+ var _this$canvas7, _this$stroke;
17896
+ if (!this.visible) return;
17897
+ ctx.save();
17898
+ const vpt = ((_this$canvas7 = this.canvas) === null || _this$canvas7 === void 0 ? void 0 : _this$canvas7.viewportTransform) || [1, 0, 0, 1, 0, 0];
17899
+ ctx.transform(vpt[0], vpt[1], vpt[2], vpt[3], vpt[4], vpt[5]);
17900
+ ctx.globalAlpha = this.opacity;
17901
+ ctx.strokeStyle = ((_this$stroke = this.stroke) === null || _this$stroke === void 0 ? void 0 : _this$stroke.toString()) || '#000';
17902
+ ctx.lineWidth = this.strokeWidth;
17903
+ ctx.lineCap = this.strokeLineCap || 'butt';
17904
+ ctx.beginPath();
17905
+ ctx.moveTo(this.x1, this.y1);
17906
+ ctx.lineTo(this.x2, this.y2);
17907
+ ctx.stroke();
17908
+ ctx.restore();
17909
+ }
17668
17910
  _render(ctx) {
17911
+ if (this._useEndpointCoords) return;
17669
17912
  ctx.beginPath();
17670
17913
  const p = this.calcLinePoints();
17671
17914
  ctx.moveTo(p.x1, p.y1);
17672
17915
  ctx.lineTo(p.x2, p.y2);
17673
17916
  ctx.lineWidth = this.strokeWidth;
17674
-
17675
- // TODO: test this
17676
- // make sure setting "fill" changes color of a line
17677
- // (by copying fillStyle to strokeStyle, since line is stroked, not filled)
17678
17917
  const origStrokeStyle = ctx.strokeStyle;
17679
17918
  if (isFiller(this.stroke)) {
17680
17919
  ctx.strokeStyle = this.stroke.toLive(ctx);
17681
- } else {
17682
- var _this$stroke;
17683
- ctx.strokeStyle = (_this$stroke = this.stroke) !== null && _this$stroke !== void 0 ? _this$stroke : ctx.fillStyle;
17684
17920
  }
17685
17921
  this.stroke && this._renderStroke(ctx);
17686
17922
  ctx.strokeStyle = origStrokeStyle;
17687
17923
  }
17688
-
17689
- /**
17690
- * This function is an helper for svg import. it returns the center of the object in the svg
17691
- * untransformed coordinates
17692
- * @private
17693
- * @return {Point} center point from element coordinates
17694
- */
17695
17924
  _findCenterFromElement() {
17696
17925
  return new Point((this.x1 + this.x2) / 2, (this.y1 + this.y2) / 2);
17697
17926
  }
17698
-
17699
- /**
17700
- * Returns object representation of an instance
17701
- * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
17702
- * @return {Object} object representation of an instance
17703
- */
17704
17927
  toObject() {
17705
17928
  let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
17706
17929
  return {
@@ -17708,32 +17931,25 @@
17708
17931
  ...this.calcLinePoints()
17709
17932
  };
17710
17933
  }
17711
-
17712
- /*
17713
- * Calculate object dimensions from its properties
17714
- * @private
17715
- */
17716
17934
  _getNonTransformedDimensions() {
17717
17935
  const dim = super._getNonTransformedDimensions();
17718
- if (this.strokeLineCap === 'butt') {
17719
- if (this.width === 0) {
17720
- dim.y -= this.strokeWidth;
17721
- }
17722
- if (this.height === 0) {
17723
- dim.x -= this.strokeWidth;
17724
- }
17936
+ if (this.strokeLineCap === 'round') {
17937
+ dim.x += this.strokeWidth;
17938
+ dim.y += this.strokeWidth;
17725
17939
  }
17726
17940
  return dim;
17727
17941
  }
17728
-
17729
- /**
17730
- * Recalculates line points given width and height
17731
- * Those points are simply placed around the center,
17732
- * This is not useful outside internal render functions and svg output
17733
- * Is not meant to be for the developer.
17734
- * @private
17735
- */
17736
17942
  calcLinePoints() {
17943
+ if (this._updatingEndpoints) {
17944
+ const centerX = (this.x1 + this.x2) / 2;
17945
+ const centerY = (this.y1 + this.y2) / 2;
17946
+ return {
17947
+ x1: this.x1 - centerX,
17948
+ y1: this.y1 - centerY,
17949
+ x2: this.x2 - centerX,
17950
+ y2: this.y2 - centerY
17951
+ };
17952
+ }
17737
17953
  const {
17738
17954
  x1: _x1,
17739
17955
  x2: _x2,
@@ -17742,27 +17958,15 @@
17742
17958
  width,
17743
17959
  height
17744
17960
  } = this;
17745
- const xMult = _x1 <= _x2 ? -1 : 1,
17746
- yMult = _y1 <= _y2 ? -1 : 1,
17747
- x1 = xMult * width / 2,
17748
- y1 = yMult * height / 2,
17749
- x2 = xMult * -width / 2,
17750
- y2 = yMult * -height / 2;
17961
+ const xMult = _x1 <= _x2 ? -1 : 1;
17962
+ const yMult = _y1 <= _y2 ? -1 : 1;
17751
17963
  return {
17752
- x1,
17753
- x2,
17754
- y1,
17755
- y2
17964
+ x1: xMult * width / 2,
17965
+ y1: yMult * height / 2,
17966
+ x2: xMult * -width / 2,
17967
+ y2: yMult * -height / 2
17756
17968
  };
17757
17969
  }
17758
-
17759
- /* _FROM_SVG_START_ */
17760
-
17761
- /**
17762
- * Returns svg representation of an instance
17763
- * @return {Array} an array of strings with the specific svg representation
17764
- * of the instance
17765
- */
17766
17970
  _toSVG() {
17767
17971
  const {
17768
17972
  x1,
@@ -17772,18 +17976,6 @@
17772
17976
  } = this.calcLinePoints();
17773
17977
  return ['<line ', 'COMMON_PARTS', `x1="${x1}" y1="${y1}" x2="${x2}" y2="${y2}" />\n`];
17774
17978
  }
17775
-
17776
- /**
17777
- * List of attribute names to account for when parsing SVG element (used by {@link Line.fromElement})
17778
- * @see http://www.w3.org/TR/SVG/shapes.html#LineElement
17779
- */
17780
-
17781
- /**
17782
- * Returns Line instance from an SVG element
17783
- * @param {HTMLElement} element Element to parse
17784
- * @param {Object} [options] Options object
17785
- * @param {Function} [callback] callback function invoked after parsing
17786
- */
17787
17979
  static async fromElement(element, options, cssRules) {
17788
17980
  const {
17789
17981
  x1 = 0,
@@ -17794,14 +17986,6 @@
17794
17986
  } = parseAttributes(element, this.ATTRIBUTE_NAMES, cssRules);
17795
17987
  return new this([x1, y1, x2, y2], parsedAttributes);
17796
17988
  }
17797
-
17798
- /* _FROM_SVG_END_ */
17799
-
17800
- /**
17801
- * Returns Line instance from an object representation
17802
- * @param {Object} object Object to create an instance from
17803
- * @returns {Promise<Line>}
17804
- */
17805
17989
  static fromObject(_ref) {
17806
17990
  let {
17807
17991
  x1,
@@ -17818,32 +18002,195 @@
17818
18002
  });
17819
18003
  }
17820
18004
  }
18005
+ _defineProperty(Line, "type", 'Line');
18006
+ _defineProperty(Line, "cacheProperties", [...cacheProperties, ...coordProps]);
18007
+ _defineProperty(Line, "ATTRIBUTE_NAMES", SHARED_ATTRIBUTES.concat(coordProps));
18008
+ classRegistry.setClass(Line);
18009
+ classRegistry.setSVGClass(Line);
18010
+
17821
18011
  /**
17822
- * x value or first line edge
17823
- * @type number
18012
+ * Calculate the distance between two points
17824
18013
  */
18014
+ function pointDistance(p1, p2) {
18015
+ return Math.sqrt(Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2));
18016
+ }
18017
+
17825
18018
  /**
17826
- * y value or first line edge
17827
- * @type number
18019
+ * Normalize a vector
17828
18020
  */
18021
+ function normalizeVector(vector) {
18022
+ const length = Math.sqrt(vector.x * vector.x + vector.y * vector.y);
18023
+ if (length === 0) return {
18024
+ x: 0,
18025
+ y: 0
18026
+ };
18027
+ return {
18028
+ x: vector.x / length,
18029
+ y: vector.y / length
18030
+ };
18031
+ }
18032
+
17829
18033
  /**
17830
- * x value or second line edge
17831
- * @type number
18034
+ * Get the maximum allowed radius for a corner based on adjacent edge lengths
17832
18035
  */
18036
+ function getMaxRadius(prevPoint, currentPoint, nextPoint) {
18037
+ const dist1 = pointDistance(prevPoint, currentPoint);
18038
+ const dist2 = pointDistance(currentPoint, nextPoint);
18039
+ return Math.min(dist1, dist2) / 2;
18040
+ }
18041
+
17833
18042
  /**
17834
- * y value or second line edge
17835
- * @type number
18043
+ * Calculate rounded corner data for a single corner
17836
18044
  */
17837
- _defineProperty(Line, "type", 'Line');
17838
- _defineProperty(Line, "cacheProperties", [...cacheProperties, ...coordProps]);
17839
- _defineProperty(Line, "ATTRIBUTE_NAMES", SHARED_ATTRIBUTES.concat(coordProps));
17840
- classRegistry.setClass(Line);
17841
- classRegistry.setSVGClass(Line);
18045
+ function calculateRoundedCorner(prevPoint, currentPoint, nextPoint, radius) {
18046
+ // Calculate edge vectors
18047
+ const edge1 = {
18048
+ x: currentPoint.x - prevPoint.x,
18049
+ y: currentPoint.y - prevPoint.y
18050
+ };
18051
+ const edge2 = {
18052
+ x: nextPoint.x - currentPoint.x,
18053
+ y: nextPoint.y - currentPoint.y
18054
+ };
18055
+
18056
+ // Normalize edge vectors
18057
+ const norm1 = normalizeVector(edge1);
18058
+ const norm2 = normalizeVector(edge2);
18059
+
18060
+ // Calculate the maximum allowed radius
18061
+ const maxRadius = getMaxRadius(prevPoint, currentPoint, nextPoint);
18062
+ const actualRadius = Math.min(radius, maxRadius);
18063
+
18064
+ // Calculate start and end points of the rounded corner
18065
+ const startPoint = {
18066
+ x: currentPoint.x - norm1.x * actualRadius,
18067
+ y: currentPoint.y - norm1.y * actualRadius
18068
+ };
18069
+ const endPoint = {
18070
+ x: currentPoint.x + norm2.x * actualRadius,
18071
+ y: currentPoint.y + norm2.y * actualRadius
18072
+ };
18073
+
18074
+ // Calculate control points for bezier curve
18075
+ // Using the magic number kRect for optimal circular approximation
18076
+ const controlOffset = actualRadius * kRect;
18077
+ const cp1 = {
18078
+ x: startPoint.x + norm1.x * controlOffset,
18079
+ y: startPoint.y + norm1.y * controlOffset
18080
+ };
18081
+ const cp2 = {
18082
+ x: endPoint.x - norm2.x * controlOffset,
18083
+ y: endPoint.y - norm2.y * controlOffset
18084
+ };
18085
+ return {
18086
+ corner: currentPoint,
18087
+ start: startPoint,
18088
+ end: endPoint,
18089
+ cp1,
18090
+ cp2,
18091
+ actualRadius
18092
+ };
18093
+ }
18094
+
18095
+ /**
18096
+ * Apply corner radius to a polygon defined by points
18097
+ */
18098
+ function applyCornerRadiusToPolygon(points, radius) {
18099
+ let radiusAsPercentage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
18100
+ if (points.length < 3) {
18101
+ throw new Error('Polygon must have at least 3 points');
18102
+ }
18103
+
18104
+ // Calculate bounding box if radius is percentage-based
18105
+ let actualRadius = radius;
18106
+ if (radiusAsPercentage) {
18107
+ const minX = Math.min(...points.map(p => p.x));
18108
+ const maxX = Math.max(...points.map(p => p.x));
18109
+ const minY = Math.min(...points.map(p => p.y));
18110
+ const maxY = Math.max(...points.map(p => p.y));
18111
+ const width = maxX - minX;
18112
+ const height = maxY - minY;
18113
+ const minDimension = Math.min(width, height);
18114
+ actualRadius = radius / 100 * minDimension;
18115
+ }
18116
+ const roundedCorners = [];
18117
+ for (let i = 0; i < points.length; i++) {
18118
+ const prevIndex = (i - 1 + points.length) % points.length;
18119
+ const nextIndex = (i + 1) % points.length;
18120
+ const prevPoint = points[prevIndex];
18121
+ const currentPoint = points[i];
18122
+ const nextPoint = points[nextIndex];
18123
+ const roundedCorner = calculateRoundedCorner(prevPoint, currentPoint, nextPoint, actualRadius);
18124
+ roundedCorners.push(roundedCorner);
18125
+ }
18126
+ return roundedCorners;
18127
+ }
18128
+
18129
+ /**
18130
+ * Render a rounded polygon to a canvas context
18131
+ */
18132
+ function renderRoundedPolygon(ctx, roundedCorners) {
18133
+ let closed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
18134
+ if (roundedCorners.length === 0) return;
18135
+ ctx.beginPath();
18136
+
18137
+ // Start at the first corner's start point
18138
+ const firstCorner = roundedCorners[0];
18139
+ ctx.moveTo(firstCorner.start.x, firstCorner.start.y);
18140
+ for (let i = 0; i < roundedCorners.length; i++) {
18141
+ const corner = roundedCorners[i];
18142
+ const nextIndex = (i + 1) % roundedCorners.length;
18143
+ const nextCorner = roundedCorners[nextIndex];
18144
+
18145
+ // Draw the rounded corner using bezier curve
18146
+ ctx.bezierCurveTo(corner.cp1.x, corner.cp1.y, corner.cp2.x, corner.cp2.y, corner.end.x, corner.end.y);
18147
+
18148
+ // Draw line to next corner's start point (if not the last segment in open path)
18149
+ if (i < roundedCorners.length - 1 || closed) {
18150
+ ctx.lineTo(nextCorner.start.x, nextCorner.start.y);
18151
+ }
18152
+ }
18153
+ if (closed) {
18154
+ ctx.closePath();
18155
+ }
18156
+ }
18157
+
18158
+ /**
18159
+ * Generate SVG path data for a rounded polygon
18160
+ */
18161
+ function generateRoundedPolygonPath(roundedCorners) {
18162
+ let closed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
18163
+ if (roundedCorners.length === 0) return '';
18164
+ const pathData = [];
18165
+ const firstCorner = roundedCorners[0];
18166
+
18167
+ // Move to first corner's start point
18168
+ pathData.push(`M ${firstCorner.start.x} ${firstCorner.start.y}`);
18169
+ for (let i = 0; i < roundedCorners.length; i++) {
18170
+ const corner = roundedCorners[i];
18171
+ const nextIndex = (i + 1) % roundedCorners.length;
18172
+ const nextCorner = roundedCorners[nextIndex];
18173
+
18174
+ // Add bezier curve for the rounded corner
18175
+ pathData.push(`C ${corner.cp1.x} ${corner.cp1.y} ${corner.cp2.x} ${corner.cp2.y} ${corner.end.x} ${corner.end.y}`);
18176
+
18177
+ // Add line to next corner's start point (if not the last segment in open path)
18178
+ if (i < roundedCorners.length - 1 || closed) {
18179
+ pathData.push(`L ${nextCorner.start.x} ${nextCorner.start.y}`);
18180
+ }
18181
+ }
18182
+ if (closed) {
18183
+ pathData.push('Z');
18184
+ }
18185
+ return pathData.join(' ');
18186
+ }
17842
18187
 
17843
18188
  const triangleDefaultValues = {
17844
18189
  width: 100,
17845
- height: 100
18190
+ height: 100,
18191
+ cornerRadius: 0
17846
18192
  };
18193
+ const TRIANGLE_PROPS = ['cornerRadius'];
17847
18194
  class Triangle extends FabricObject {
17848
18195
  static getDefaults() {
17849
18196
  return {
@@ -17862,34 +18209,90 @@
17862
18209
  this.setOptions(options);
17863
18210
  }
17864
18211
 
18212
+ /**
18213
+ * Get triangle points as an array of XY coordinates
18214
+ * @private
18215
+ */
18216
+ _getTrianglePoints() {
18217
+ const widthBy2 = this.width / 2;
18218
+ const heightBy2 = this.height / 2;
18219
+ return [{
18220
+ x: -widthBy2,
18221
+ y: heightBy2
18222
+ },
18223
+ // bottom left
18224
+ {
18225
+ x: 0,
18226
+ y: -heightBy2
18227
+ },
18228
+ // top center
18229
+ {
18230
+ x: widthBy2,
18231
+ y: heightBy2
18232
+ } // bottom right
18233
+ ];
18234
+ }
18235
+
17865
18236
  /**
17866
18237
  * @private
17867
18238
  * @param {CanvasRenderingContext2D} ctx Context to render on
17868
18239
  */
17869
18240
  _render(ctx) {
17870
- const widthBy2 = this.width / 2,
17871
- heightBy2 = this.height / 2;
17872
- ctx.beginPath();
17873
- ctx.moveTo(-widthBy2, heightBy2);
17874
- ctx.lineTo(0, -heightBy2);
17875
- ctx.lineTo(widthBy2, heightBy2);
17876
- ctx.closePath();
18241
+ if (this.cornerRadius > 0) {
18242
+ // Render rounded triangle
18243
+ const points = this._getTrianglePoints();
18244
+ const roundedCorners = applyCornerRadiusToPolygon(points, this.cornerRadius);
18245
+ renderRoundedPolygon(ctx, roundedCorners, true);
18246
+ } else {
18247
+ // Render sharp triangle (original implementation)
18248
+ const widthBy2 = this.width / 2;
18249
+ const heightBy2 = this.height / 2;
18250
+ ctx.beginPath();
18251
+ ctx.moveTo(-widthBy2, heightBy2);
18252
+ ctx.lineTo(0, -heightBy2);
18253
+ ctx.lineTo(widthBy2, heightBy2);
18254
+ ctx.closePath();
18255
+ }
17877
18256
  this._renderPaintInOrder(ctx);
17878
18257
  }
17879
18258
 
18259
+ /**
18260
+ * Returns object representation of an instance
18261
+ * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
18262
+ * @return {Object} object representation of an instance
18263
+ */
18264
+ toObject() {
18265
+ let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
18266
+ return super.toObject([...TRIANGLE_PROPS, ...propertiesToInclude]);
18267
+ }
18268
+
17880
18269
  /**
17881
18270
  * Returns svg representation of an instance
17882
18271
  * @return {Array} an array of strings with the specific svg representation
17883
18272
  * of the instance
17884
18273
  */
17885
18274
  _toSVG() {
17886
- const widthBy2 = this.width / 2,
17887
- heightBy2 = this.height / 2,
17888
- points = `${-widthBy2} ${heightBy2},0 ${-heightBy2},${widthBy2} ${heightBy2}`;
17889
- return ['<polygon ', 'COMMON_PARTS', 'points="', points, '" />'];
18275
+ if (this.cornerRadius > 0) {
18276
+ // Generate rounded triangle as path
18277
+ const points = this._getTrianglePoints();
18278
+ const roundedCorners = applyCornerRadiusToPolygon(points, this.cornerRadius);
18279
+ const pathData = generateRoundedPolygonPath(roundedCorners, true);
18280
+ return ['<path ', 'COMMON_PARTS', `d="${pathData}" />`];
18281
+ } else {
18282
+ // Original sharp triangle implementation
18283
+ const widthBy2 = this.width / 2;
18284
+ const heightBy2 = this.height / 2;
18285
+ const points = `${-widthBy2} ${heightBy2},0 ${-heightBy2},${widthBy2} ${heightBy2}`;
18286
+ return ['<polygon ', 'COMMON_PARTS', 'points="', points, '" />'];
18287
+ }
17890
18288
  }
17891
18289
  }
18290
+ /**
18291
+ * Corner radius for rounded triangle corners
18292
+ * @type Number
18293
+ */
17892
18294
  _defineProperty(Triangle, "type", 'Triangle');
18295
+ _defineProperty(Triangle, "cacheProperties", [...cacheProperties, ...TRIANGLE_PROPS]);
17893
18296
  _defineProperty(Triangle, "ownDefaults", triangleDefaultValues);
17894
18297
  classRegistry.setClass(Triangle);
17895
18298
  classRegistry.setSVGClass(Triangle);
@@ -18054,7 +18457,8 @@
18054
18457
  /**
18055
18458
  * @deprecated transient option soon to be removed in favor of a different design
18056
18459
  */
18057
- exactBoundingBox: false
18460
+ exactBoundingBox: false,
18461
+ cornerRadius: 0
18058
18462
  };
18059
18463
  class Polyline extends FabricObject {
18060
18464
  static getDefaults() {
@@ -18268,7 +18672,7 @@
18268
18672
  toObject() {
18269
18673
  let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
18270
18674
  return {
18271
- ...super.toObject(propertiesToInclude),
18675
+ ...super.toObject(['cornerRadius', ...propertiesToInclude]),
18272
18676
  points: this.points.map(_ref => {
18273
18677
  let {
18274
18678
  x,
@@ -18288,14 +18692,28 @@
18288
18692
  * of the instance
18289
18693
  */
18290
18694
  _toSVG() {
18291
- const points = [],
18292
- diffX = this.pathOffset.x,
18293
- diffY = this.pathOffset.y,
18294
- NUM_FRACTION_DIGITS = config.NUM_FRACTION_DIGITS;
18295
- for (let i = 0, len = this.points.length; i < len; i++) {
18296
- points.push(toFixed(this.points[i].x - diffX, NUM_FRACTION_DIGITS), ',', toFixed(this.points[i].y - diffY, NUM_FRACTION_DIGITS), ' ');
18695
+ if (this.cornerRadius > 0 && this.points.length >= 3) {
18696
+ // Generate rounded polygon/polyline as path
18697
+ const diffX = this.pathOffset.x;
18698
+ const diffY = this.pathOffset.y;
18699
+ const adjustedPoints = this.points.map(point => ({
18700
+ x: point.x - diffX,
18701
+ y: point.y - diffY
18702
+ }));
18703
+ const roundedCorners = applyCornerRadiusToPolygon(adjustedPoints, this.cornerRadius);
18704
+ const pathData = generateRoundedPolygonPath(roundedCorners, !this.isOpen());
18705
+ return ['<path ', 'COMMON_PARTS', `d="${pathData}" />\n`];
18706
+ } else {
18707
+ // Original sharp corners implementation
18708
+ const points = [];
18709
+ const diffX = this.pathOffset.x;
18710
+ const diffY = this.pathOffset.y;
18711
+ const NUM_FRACTION_DIGITS = config.NUM_FRACTION_DIGITS;
18712
+ for (let i = 0, len = this.points.length; i < len; i++) {
18713
+ points.push(toFixed(this.points[i].x - diffX, NUM_FRACTION_DIGITS), ',', toFixed(this.points[i].y - diffY, NUM_FRACTION_DIGITS), ' ');
18714
+ }
18715
+ return [`<${this.constructor.type.toLowerCase()} `, 'COMMON_PARTS', `points="${points.join('')}" />\n`];
18297
18716
  }
18298
- return [`<${this.constructor.type.toLowerCase()} `, 'COMMON_PARTS', `points="${points.join('')}" />\n`];
18299
18717
  }
18300
18718
 
18301
18719
  /**
@@ -18311,13 +18729,24 @@
18311
18729
  // NaN comes from parseFloat of a empty string in parser
18312
18730
  return;
18313
18731
  }
18314
- ctx.beginPath();
18315
- ctx.moveTo(this.points[0].x - x, this.points[0].y - y);
18316
- for (let i = 0; i < len; i++) {
18317
- const point = this.points[i];
18318
- ctx.lineTo(point.x - x, point.y - y);
18732
+ if (this.cornerRadius > 0 && len >= 3) {
18733
+ // Render with rounded corners
18734
+ const adjustedPoints = this.points.map(point => ({
18735
+ x: point.x - x,
18736
+ y: point.y - y
18737
+ }));
18738
+ const roundedCorners = applyCornerRadiusToPolygon(adjustedPoints, this.cornerRadius);
18739
+ renderRoundedPolygon(ctx, roundedCorners, !this.isOpen());
18740
+ } else {
18741
+ // Original sharp corners implementation
18742
+ ctx.beginPath();
18743
+ ctx.moveTo(this.points[0].x - x, this.points[0].y - y);
18744
+ for (let i = 0; i < len; i++) {
18745
+ const point = this.points[i];
18746
+ ctx.lineTo(point.x - x, point.y - y);
18747
+ }
18748
+ !this.isOpen() && ctx.closePath();
18319
18749
  }
18320
- !this.isOpen() && ctx.closePath();
18321
18750
  this._renderPaintInOrder(ctx);
18322
18751
  }
18323
18752
 
@@ -18382,10 +18811,15 @@
18382
18811
  * @type Boolean
18383
18812
  * @default false
18384
18813
  */
18814
+ /**
18815
+ * Corner radius for rounded corners
18816
+ * @type Number
18817
+ * @default 0
18818
+ */
18385
18819
  _defineProperty(Polyline, "ownDefaults", polylineDefaultValues);
18386
18820
  _defineProperty(Polyline, "type", 'Polyline');
18387
18821
  _defineProperty(Polyline, "layoutProperties", [SKEW_X, SKEW_Y, 'strokeLineCap', 'strokeLineJoin', 'strokeMiterLimit', 'strokeWidth', 'strokeUniform', 'points']);
18388
- _defineProperty(Polyline, "cacheProperties", [...cacheProperties, 'points']);
18822
+ _defineProperty(Polyline, "cacheProperties", [...cacheProperties, 'points', 'cornerRadius']);
18389
18823
  _defineProperty(Polyline, "ATTRIBUTE_NAMES", [...SHARED_ATTRIBUTES]);
18390
18824
  classRegistry.setClass(Polyline);
18391
18825
  classRegistry.setSVGClass(Polyline);
@@ -18679,8 +19113,8 @@
18679
19113
  // Global measurement context - reused for performance
18680
19114
  let measurementContext = null;
18681
19115
 
18682
- /**
18683
- * Get or create the shared measurement context
19116
+ /**
19117
+ * Get or create the shared measurement context
18684
19118
  */
18685
19119
  function getMeasurementContext() {
18686
19120
  if (!measurementContext) {
@@ -18693,8 +19127,8 @@
18693
19127
  return measurementContext;
18694
19128
  }
18695
19129
 
18696
- /**
18697
- * Measure a single grapheme
19130
+ /**
19131
+ * Measure a single grapheme
18698
19132
  */
18699
19133
  function measureGrapheme(grapheme, options, ctx) {
18700
19134
  // Check cache first
@@ -18727,8 +19161,8 @@
18727
19161
  return measurement;
18728
19162
  }
18729
19163
 
18730
- /**
18731
- * Measure a grapheme with kerning relative to previous character
19164
+ /**
19165
+ * Measure a grapheme with kerning relative to previous character
18732
19166
  */
18733
19167
  function measureGraphemeWithKerning(grapheme, previousGrapheme, options, ctx) {
18734
19168
  // Get individual measurement
@@ -18769,8 +19203,8 @@
18769
19203
  };
18770
19204
  }
18771
19205
 
18772
- /**
18773
- * Get font metrics for layout calculations
19206
+ /**
19207
+ * Get font metrics for layout calculations
18774
19208
  */
18775
19209
  function getFontMetrics(options) {
18776
19210
  var _metrics$fontBounding, _metrics$fontBounding2, _metrics$actualBoundi, _metrics$actualBoundi2;
@@ -18805,8 +19239,8 @@
18805
19239
  return result;
18806
19240
  }
18807
19241
 
18808
- /**
18809
- * Apply font styling to canvas context
19242
+ /**
19243
+ * Apply font styling to canvas context
18810
19244
  */
18811
19245
  function applyFontStyle(ctx, options) {
18812
19246
  const fontDeclaration = getFontDeclaration(options);
@@ -18823,8 +19257,8 @@
18823
19257
  ctx.textBaseline = 'alphabetic';
18824
19258
  }
18825
19259
 
18826
- /**
18827
- * Generate font declaration string
19260
+ /**
19261
+ * Generate font declaration string
18828
19262
  */
18829
19263
  function getFontDeclaration(options) {
18830
19264
  const {
@@ -18839,8 +19273,8 @@
18839
19273
  return `${fontStyle} ${fontWeight} ${fontSize}px ${normalizedFamily}`;
18840
19274
  }
18841
19275
 
18842
- /**
18843
- * LRU Cache implementation for measurements
19276
+ /**
19277
+ * LRU Cache implementation for measurements
18844
19278
  */
18845
19279
  class LRUCache {
18846
19280
  constructor() {
@@ -18902,8 +19336,8 @@
18902
19336
  }
18903
19337
  }
18904
19338
 
18905
- /**
18906
- * Advanced measurement cache with font-aware keys
19339
+ /**
19340
+ * Advanced measurement cache with font-aware keys
18907
19341
  */
18908
19342
  class MeasurementCache {
18909
19343
  constructor() {
@@ -18930,8 +19364,8 @@
18930
19364
  }
18931
19365
  }
18932
19366
 
18933
- /**
18934
- * Kerning cache for character pairs
19367
+ /**
19368
+ * Kerning cache for character pairs
18935
19369
  */
18936
19370
  class KerningCache {
18937
19371
  constructor() {
@@ -18959,8 +19393,8 @@
18959
19393
  }
18960
19394
  }
18961
19395
 
18962
- /**
18963
- * Font metrics cache
19396
+ /**
19397
+ * Font metrics cache
18964
19398
  */
18965
19399
  class FontMetricsCache {
18966
19400
  constructor() {
@@ -18987,17 +19421,17 @@
18987
19421
  const kerningCache = new KerningCache();
18988
19422
  const fontMetricsCache = new FontMetricsCache();
18989
19423
 
18990
- /**
18991
- * Unicode and Internationalization Support
18992
- *
18993
- * Enhanced Unicode handling for complex scripts, RTL/LTR text,
18994
- * and grapheme cluster boundary detection.
19424
+ /**
19425
+ * Unicode and Internationalization Support
19426
+ *
19427
+ * Enhanced Unicode handling for complex scripts, RTL/LTR text,
19428
+ * and grapheme cluster boundary detection.
18995
19429
  */
18996
19430
 
18997
19431
 
18998
- /**
18999
- * Enhanced grapheme segmentation using Intl.Segmenter when available
19000
- * with fallback to existing graphemeSplit implementation
19432
+ /**
19433
+ * Enhanced grapheme segmentation using Intl.Segmenter when available
19434
+ * with fallback to existing graphemeSplit implementation
19001
19435
  */
19002
19436
  function segmentGraphemes(text) {
19003
19437
  // Use native Intl.Segmenter if available
@@ -19017,15 +19451,15 @@
19017
19451
  return graphemeSplit(text);
19018
19452
  }
19019
19453
 
19020
- /**
19021
- * Ellipsis Text Truncation System
19022
- *
19023
- * Implements text truncation with ellipsis when content exceeds bounds,
19024
- * using binary search for optimal truncation points.
19454
+ /**
19455
+ * Ellipsis Text Truncation System
19456
+ *
19457
+ * Implements text truncation with ellipsis when content exceeds bounds,
19458
+ * using binary search for optimal truncation points.
19025
19459
  */
19026
19460
 
19027
- /**
19028
- * Apply ellipsis truncation to text based on width/height constraints
19461
+ /**
19462
+ * Apply ellipsis truncation to text based on width/height constraints
19029
19463
  */
19030
19464
  function applyEllipsis(text, options) {
19031
19465
  const {
@@ -19095,8 +19529,8 @@
19095
19529
  };
19096
19530
  }
19097
19531
 
19098
- /**
19099
- * Truncate text based on width constraint using binary search
19532
+ /**
19533
+ * Truncate text based on width constraint using binary search
19100
19534
  */
19101
19535
  function truncateByWidth(text, maxWidth, ellipsisChar, ellipsisWidth, measureFn) {
19102
19536
  const graphemes = segmentGraphemes(text);
@@ -19146,8 +19580,8 @@
19146
19580
  };
19147
19581
  }
19148
19582
 
19149
- /**
19150
- * Truncate text based on height constraint
19583
+ /**
19584
+ * Truncate text based on height constraint
19151
19585
  */
19152
19586
  function truncateByHeight(text, maxHeight, ellipsisChar, measureFn) {
19153
19587
  var _measureFn;
@@ -19195,19 +19629,19 @@
19195
19629
  return truncateByWidth(lines[0], firstLineWidth, ellipsisChar, 0, measureFn);
19196
19630
  }
19197
19631
 
19198
- /**
19199
- * Core Text Layout Engine
19200
- *
19201
- * Implements Konva-compatible text layout with support for:
19202
- * - Multiple wrap modes (word/char/none)
19203
- * - Ellipsis truncation
19204
- * - Justify alignment with proper space distribution
19205
- * - RTL/LTR text direction
19206
- * - Advanced grapheme handling
19632
+ /**
19633
+ * Core Text Layout Engine
19634
+ *
19635
+ * Implements Konva-compatible text layout with support for:
19636
+ * - Multiple wrap modes (word/char/none)
19637
+ * - Ellipsis truncation
19638
+ * - Justify alignment with proper space distribution
19639
+ * - RTL/LTR text direction
19640
+ * - Advanced grapheme handling
19207
19641
  */
19208
19642
 
19209
- /**
19210
- * Main text layout function - converts text and options into positioned layout
19643
+ /**
19644
+ * Main text layout function - converts text and options into positioned layout
19211
19645
  */
19212
19646
  function layoutText(options) {
19213
19647
  var _ellipsisResult;
@@ -19326,8 +19760,8 @@
19326
19760
  };
19327
19761
  }
19328
19762
 
19329
- /**
19330
- * Layout a single paragraph with wrapping
19763
+ /**
19764
+ * Layout a single paragraph with wrapping
19331
19765
  */
19332
19766
  function layoutParagraph(text, options) {
19333
19767
  const {
@@ -19362,8 +19796,8 @@
19362
19796
  return layoutLines;
19363
19797
  }
19364
19798
 
19365
- /**
19366
- * Layout a single line of text (no wrapping)
19799
+ /**
19800
+ * Layout a single line of text (no wrapping)
19367
19801
  */
19368
19802
  function layoutSingleLine(text, options) {
19369
19803
  let textOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
@@ -19433,8 +19867,8 @@
19433
19867
  };
19434
19868
  }
19435
19869
 
19436
- /**
19437
- * Word-based wrapping algorithm
19870
+ /**
19871
+ * Word-based wrapping algorithm
19438
19872
  */
19439
19873
  function wrapByWords(text, maxWidth, options) {
19440
19874
  const lines = [];
@@ -19467,8 +19901,8 @@
19467
19901
  return lines.length > 0 ? lines : [''];
19468
19902
  }
19469
19903
 
19470
- /**
19471
- * Character-based wrapping algorithm
19904
+ /**
19905
+ * Character-based wrapping algorithm
19472
19906
  */
19473
19907
  function wrapByCharacters(text, maxWidth, options) {
19474
19908
  const lines = [];
@@ -19490,8 +19924,8 @@
19490
19924
  return lines.length > 0 ? lines : [''];
19491
19925
  }
19492
19926
 
19493
- /**
19494
- * Apply text alignment to lines
19927
+ /**
19928
+ * Apply text alignment to lines
19495
19929
  */
19496
19930
  function applyAlignment(lines, align, containerWidth, options) {
19497
19931
  return lines.map(line => {
@@ -19525,8 +19959,8 @@
19525
19959
  });
19526
19960
  }
19527
19961
 
19528
- /**
19529
- * Apply justify alignment by expanding spaces
19962
+ /**
19963
+ * Apply justify alignment by expanding spaces
19530
19964
  */
19531
19965
  function applyJustification(line, containerWidth, options) {
19532
19966
  const spaces = line.graphemes.filter(g => /\s/.test(g)).length;
@@ -19549,8 +19983,8 @@
19549
19983
  return line;
19550
19984
  }
19551
19985
 
19552
- /**
19553
- * Calculate vertical alignment offset
19986
+ /**
19987
+ * Calculate vertical alignment offset
19554
19988
  */
19555
19989
  function calculateVerticalOffset(contentHeight, containerHeight, align) {
19556
19990
  switch (align) {
@@ -19564,8 +19998,8 @@
19564
19998
  }
19565
19999
  }
19566
20000
 
19567
- /**
19568
- * Handle height overflow with ellipsis
20001
+ /**
20002
+ * Handle height overflow with ellipsis
19569
20003
  */
19570
20004
  function handleHeightOverflow(existingLines, overflowLine, remainingHeight, options) {
19571
20005
  // If ellipsis is enabled, try to fit part of the overflow line
@@ -19594,8 +20028,8 @@
19594
20028
  };
19595
20029
  }
19596
20030
 
19597
- /**
19598
- * Create empty line for empty paragraphs
20031
+ /**
20032
+ * Create empty line for empty paragraphs
19599
20033
  */
19600
20034
  function createEmptyLine(options) {
19601
20035
  const height = options.fontSize * options.lineHeight;
@@ -19611,8 +20045,8 @@
19611
20045
  };
19612
20046
  }
19613
20047
 
19614
- /**
19615
- * Measure width of a line of text
20048
+ /**
20049
+ * Measure width of a line of text
19616
20050
  */
19617
20051
  function measureLineWidth(text, options) {
19618
20052
  const graphemes = segmentGraphemes(text);
@@ -19629,8 +20063,8 @@
19629
20063
  return width;
19630
20064
  }
19631
20065
 
19632
- /**
19633
- * Convert layout options to measurement options
20066
+ /**
20067
+ * Convert layout options to measurement options
19634
20068
  */
19635
20069
  function createMeasurementOptions(options) {
19636
20070
  return {
@@ -19873,15 +20307,15 @@
19873
20307
  }
19874
20308
  }
19875
20309
 
19876
- /**
19877
- * Browser Line Break Extraction
19878
- *
19879
- * Captures exact line breaks as rendered by the browser to ensure
19880
- * pixel-perfect consistency between DOM editing and canvas rendering.
20310
+ /**
20311
+ * Browser Line Break Extraction
20312
+ *
20313
+ * Captures exact line breaks as rendered by the browser to ensure
20314
+ * pixel-perfect consistency between DOM editing and canvas rendering.
19881
20315
  */
19882
20316
 
19883
- /**
19884
- * Segment text into graphemes safely using Intl.Segmenter or fallback
20317
+ /**
20318
+ * Segment text into graphemes safely using Intl.Segmenter or fallback
19885
20319
  */
19886
20320
  function segmentIntoGraphemes(text) {
19887
20321
  if (typeof Intl !== 'undefined' && Intl.Segmenter) {
@@ -19895,9 +20329,9 @@
19895
20329
  return Array.from(text);
19896
20330
  }
19897
20331
 
19898
- /**
19899
- * Extract line break information from a textarea by creating a mirror element
19900
- * with identical computed styles and measuring grapheme positions.
20332
+ /**
20333
+ * Extract line break information from a textarea by creating a mirror element
20334
+ * with identical computed styles and measuring grapheme positions.
19901
20335
  */
19902
20336
  function extractLinesFromDOM(textarea) {
19903
20337
  const text = textarea.value;
@@ -19992,16 +20426,16 @@
19992
20426
  }
19993
20427
  }
19994
20428
 
19995
- /**
19996
- * Create a hash of layout-affecting properties to detect when browser lines are still valid
20429
+ /**
20430
+ * Create a hash of layout-affecting properties to detect when browser lines are still valid
19997
20431
  */
19998
20432
  function createLayoutHash(target) {
19999
20433
  const properties = [target.text, target.width, target.height, target.fontFamily, target.fontSize, target.fontWeight, target.fontStyle, target.lineHeight, target.charSpacing, target.textAlign, target.direction];
20000
20434
  return properties.map(p => String(p)).join('|');
20001
20435
  }
20002
20436
 
20003
- /**
20004
- * Check if stored browser lines are still valid for the current target state
20437
+ /**
20438
+ * Check if stored browser lines are still valid for the current target state
20005
20439
  */
20006
20440
  function areBrowserLinesValid(target, storedHash) {
20007
20441
  if (!storedHash || !target.__lastBrowserLines) {
@@ -20011,24 +20445,24 @@
20011
20445
  return currentHash === storedHash;
20012
20446
  }
20013
20447
 
20014
- /**
20015
- * Store browser lines on a target object with validity hash
20448
+ /**
20449
+ * Store browser lines on a target object with validity hash
20016
20450
  */
20017
20451
  function storeBrowserLines(target, lines, layoutHash) {
20018
20452
  target.__lastBrowserLines = lines;
20019
20453
  target.__lastBrowserLinesHash = createLayoutHash(target);
20020
20454
  }
20021
20455
 
20022
- /**
20023
- * Clear stored browser lines from a target object
20456
+ /**
20457
+ * Clear stored browser lines from a target object
20024
20458
  */
20025
20459
  function clearBrowserLines(target) {
20026
20460
  delete target.__lastBrowserLines;
20027
20461
  delete target.__lastBrowserLinesHash;
20028
20462
  }
20029
20463
 
20030
- /**
20031
- * Get stored browser lines if they're still valid
20464
+ /**
20465
+ * Get stored browser lines if they're still valid
20032
20466
  */
20033
20467
  function getBrowserLines(target) {
20034
20468
  const lines = target.__lastBrowserLines;
@@ -20041,9 +20475,9 @@
20041
20475
 
20042
20476
  let measuringContext;
20043
20477
 
20044
- /**
20045
- * Return a context for measurement of text string.
20046
- * if created it gets stored for reuse
20478
+ /**
20479
+ * Return a context for measurement of text string.
20480
+ * if created it gets stored for reuse
20047
20481
  */
20048
20482
  function getMeasuringContext() {
20049
20483
  if (!measuringContext) {
@@ -20056,17 +20490,17 @@
20056
20490
  return measuringContext;
20057
20491
  }
20058
20492
 
20059
- /**
20060
- * Measure and return the info of a single grapheme.
20061
- * needs the the info of previous graphemes already filled
20062
- * Override to customize measuring
20493
+ /**
20494
+ * Measure and return the info of a single grapheme.
20495
+ * needs the the info of previous graphemes already filled
20496
+ * Override to customize measuring
20063
20497
  */
20064
20498
 
20065
20499
  // @TODO this is not complete
20066
20500
 
20067
- /**
20068
- * Text class
20069
- * @see {@link http://fabricjs.com/fabric-intro-part-2#text}
20501
+ /**
20502
+ * Text class
20503
+ * @see {@link http://fabricjs.com/fabric-intro-part-2#text}
20070
20504
  */
20071
20505
  class FabricText extends StyledText {
20072
20506
  static getDefaults() {
@@ -20077,11 +20511,11 @@
20077
20511
  }
20078
20512
  constructor(text, options) {
20079
20513
  super();
20080
- /**
20081
- * contains characters bounding boxes
20082
- * This variable is considered to be protected.
20083
- * But for how mixins are implemented right now, we can't leave it private
20084
- * @protected
20514
+ /**
20515
+ * contains characters bounding boxes
20516
+ * This variable is considered to be protected.
20517
+ * But for how mixins are implemented right now, we can't leave it private
20518
+ * @protected
20085
20519
  */
20086
20520
  _defineProperty(this, "__charBounds", []);
20087
20521
  Object.assign(this, FabricText.ownDefaults);
@@ -20098,9 +20532,9 @@
20098
20532
  this.setCoords();
20099
20533
  }
20100
20534
 
20101
- /**
20102
- * If text has a path, it will add the extra information needed
20103
- * for path and text calculations
20535
+ /**
20536
+ * If text has a path, it will add the extra information needed
20537
+ * for path and text calculations
20104
20538
  */
20105
20539
  setPathInfo() {
20106
20540
  const path = this.path;
@@ -20109,10 +20543,10 @@
20109
20543
  }
20110
20544
  }
20111
20545
 
20112
- /**
20113
- * @private
20114
- * Divides text into lines of text and lines of graphemes.
20115
- * Uses browser lines when available for pixel-perfect consistency.
20546
+ /**
20547
+ * @private
20548
+ * Divides text into lines of text and lines of graphemes.
20549
+ * Uses browser lines when available for pixel-perfect consistency.
20116
20550
  */
20117
20551
  _splitText() {
20118
20552
  // Check if we have valid browser lines and should use them
@@ -20128,9 +20562,9 @@
20128
20562
  return newLines;
20129
20563
  }
20130
20564
 
20131
- /**
20132
- * Create TextLinesInfo from browser-extracted lines
20133
- * @private
20565
+ /**
20566
+ * Create TextLinesInfo from browser-extracted lines
20567
+ * @private
20134
20568
  */
20135
20569
  _splitTextFromBrowserLines(browserLines) {
20136
20570
  const lines = [];
@@ -20164,10 +20598,10 @@
20164
20598
  return result;
20165
20599
  }
20166
20600
 
20167
- /**
20168
- * Initialize or update text dimensions.
20169
- * Updates this.width and this.height with the proper values.
20170
- * Does not return dimensions.
20601
+ /**
20602
+ * Initialize or update text dimensions.
20603
+ * Updates this.width and this.height with the proper values.
20604
+ * Does not return dimensions.
20171
20605
  */
20172
20606
  initDimensions() {
20173
20607
  // Use advanced layout if enabled
@@ -20190,8 +20624,8 @@
20190
20624
  }
20191
20625
  }
20192
20626
 
20193
- /**
20194
- * Enlarge space boxes and shift the others
20627
+ /**
20628
+ * Enlarge space boxes and shift the others
20195
20629
  */
20196
20630
  enlargeSpaces() {
20197
20631
  let diffSpace, currentLineWidth, numberOfSpaces, accumulatedSpace, line, charBound, spaces;
@@ -20250,18 +20684,18 @@
20250
20684
  }
20251
20685
  }
20252
20686
 
20253
- /**
20254
- * Advanced layout using new text engine (Konva-compatible)
20255
- * @private
20687
+ /**
20688
+ * Advanced layout using new text engine (Konva-compatible)
20689
+ * @private
20256
20690
  */
20257
20691
  _layoutTextAdvanced() {
20258
20692
  const options = this._getAdvancedLayoutOptions();
20259
20693
  return layoutText(options);
20260
20694
  }
20261
20695
 
20262
- /**
20263
- * Get advanced layout options from current text properties
20264
- * @private
20696
+ /**
20697
+ * Get advanced layout options from current text properties
20698
+ * @private
20265
20699
  */
20266
20700
  _getAdvancedLayoutOptions() {
20267
20701
  return {
@@ -20283,9 +20717,9 @@
20283
20717
  };
20284
20718
  }
20285
20719
 
20286
- /**
20287
- * Map Fabric textAlign to Konva align format
20288
- * @private
20720
+ /**
20721
+ * Map Fabric textAlign to Konva align format
20722
+ * @private
20289
20723
  */
20290
20724
  _mapTextAlignToAlign(textAlign) {
20291
20725
  switch (textAlign) {
@@ -20306,8 +20740,8 @@
20306
20740
  }
20307
20741
  }
20308
20742
 
20309
- /**
20310
- * Enhanced initDimensions that uses advanced layout when enabled
20743
+ /**
20744
+ * Enhanced initDimensions that uses advanced layout when enabled
20311
20745
  */
20312
20746
  initDimensionsAdvanced() {
20313
20747
  if (!this.enableAdvancedLayout) {
@@ -20324,9 +20758,9 @@
20324
20758
  this.dirty = true;
20325
20759
  }
20326
20760
 
20327
- /**
20328
- * Convert new layout format to legacy _textLines and __charBounds format
20329
- * @private
20761
+ /**
20762
+ * Convert new layout format to legacy _textLines and __charBounds format
20763
+ * @private
20330
20764
  */
20331
20765
  _convertLayoutToLegacyFormat(layout) {
20332
20766
  this._textLines = layout.lines.map(line => line.graphemes);
@@ -20348,30 +20782,30 @@
20348
20782
  }
20349
20783
  }
20350
20784
 
20351
- /**
20352
- * Detect if the text line is ended with an hard break
20353
- * text and itext do not have wrapping, return false
20354
- * @return {Boolean}
20785
+ /**
20786
+ * Detect if the text line is ended with an hard break
20787
+ * text and itext do not have wrapping, return false
20788
+ * @return {Boolean}
20355
20789
  */
20356
20790
  isEndOfWrapping(lineIndex) {
20357
20791
  return lineIndex === this._textLines.length - 1;
20358
20792
  }
20359
20793
 
20360
- /**
20361
- * Detect if a line has a linebreak and so we need to account for it when moving
20362
- * and counting style.
20363
- * It return always 1 for text and Itext. Textbox has its own implementation
20364
- * @return Number
20794
+ /**
20795
+ * Detect if a line has a linebreak and so we need to account for it when moving
20796
+ * and counting style.
20797
+ * It return always 1 for text and Itext. Textbox has its own implementation
20798
+ * @return Number
20365
20799
  */
20366
20800
 
20367
20801
  missingNewlineOffset(_lineIndex) {
20368
20802
  return 1;
20369
20803
  }
20370
20804
 
20371
- /**
20372
- * Returns 2d representation (lineIndex and charIndex) of cursor
20373
- * @param {Number} selectionStart
20374
- * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
20805
+ /**
20806
+ * Returns 2d representation (lineIndex and charIndex) of cursor
20807
+ * @param {Number} selectionStart
20808
+ * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
20375
20809
  */
20376
20810
  get2DCursorLocation(selectionStart, skipWrapping) {
20377
20811
  const lines = skipWrapping ? this._unwrappedTextLines : this._textLines;
@@ -20391,24 +20825,24 @@
20391
20825
  };
20392
20826
  }
20393
20827
 
20394
- /**
20395
- * Returns string representation of an instance
20396
- * @return {String} String representation of text object
20828
+ /**
20829
+ * Returns string representation of an instance
20830
+ * @return {String} String representation of text object
20397
20831
  */
20398
20832
  toString() {
20399
20833
  return `#<Text (${this.complexity()}): { "text": "${this.text}", "fontFamily": "${this.fontFamily}" }>`;
20400
20834
  }
20401
20835
 
20402
- /**
20403
- * Return the dimension and the zoom level needed to create a cache canvas
20404
- * big enough to host the object to be cached.
20405
- * @private
20406
- * @param {Object} dim.x width of object to be cached
20407
- * @param {Object} dim.y height of object to be cached
20408
- * @return {Object}.width width of canvas
20409
- * @return {Object}.height height of canvas
20410
- * @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
20411
- * @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
20836
+ /**
20837
+ * Return the dimension and the zoom level needed to create a cache canvas
20838
+ * big enough to host the object to be cached.
20839
+ * @private
20840
+ * @param {Object} dim.x width of object to be cached
20841
+ * @param {Object} dim.y height of object to be cached
20842
+ * @return {Object}.width width of canvas
20843
+ * @return {Object}.height height of canvas
20844
+ * @return {Object}.zoomX zoomX zoom value to unscale the canvas before drawing cache
20845
+ * @return {Object}.zoomY zoomY zoom value to unscale the canvas before drawing cache
20412
20846
  */
20413
20847
  _getCacheCanvasDimensions() {
20414
20848
  const dims = super._getCacheCanvasDimensions();
@@ -20418,9 +20852,9 @@
20418
20852
  return dims;
20419
20853
  }
20420
20854
 
20421
- /**
20422
- * @private
20423
- * @param {CanvasRenderingContext2D} ctx Context to render on
20855
+ /**
20856
+ * @private
20857
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20424
20858
  */
20425
20859
  _render(ctx) {
20426
20860
  const path = this.path;
@@ -20433,9 +20867,9 @@
20433
20867
  this._renderTextDecoration(ctx, 'linethrough');
20434
20868
  }
20435
20869
 
20436
- /**
20437
- * @private
20438
- * @param {CanvasRenderingContext2D} ctx Context to render on
20870
+ /**
20871
+ * @private
20872
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20439
20873
  */
20440
20874
  _renderText(ctx) {
20441
20875
  // Skip text rendering if in overlay editing mode
@@ -20451,15 +20885,15 @@
20451
20885
  }
20452
20886
  }
20453
20887
 
20454
- /**
20455
- * Set the font parameter of the context with the object properties or with charStyle
20456
- * @private
20457
- * @param {CanvasRenderingContext2D} ctx Context to render on
20458
- * @param {Object} [charStyle] object with font style properties
20459
- * @param {String} [charStyle.fontFamily] Font Family
20460
- * @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
20461
- * @param {String} [charStyle.fontWeight] Font weight
20462
- * @param {String} [charStyle.fontStyle] Font style (italic|normal)
20888
+ /**
20889
+ * Set the font parameter of the context with the object properties or with charStyle
20890
+ * @private
20891
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20892
+ * @param {Object} [charStyle] object with font style properties
20893
+ * @param {String} [charStyle.fontFamily] Font Family
20894
+ * @param {Number} [charStyle.fontSize] Font size in pixels. ( without px suffix )
20895
+ * @param {String} [charStyle.fontWeight] Font weight
20896
+ * @param {String} [charStyle.fontStyle] Font style (italic|normal)
20463
20897
  */
20464
20898
  _setTextStyles(ctx, charStyle, forMeasuring) {
20465
20899
  ctx.textBaseline = 'alphabetic';
@@ -20479,11 +20913,11 @@
20479
20913
  ctx.font = this._getFontDeclaration(charStyle, forMeasuring);
20480
20914
  }
20481
20915
 
20482
- /**
20483
- * calculate and return the text Width measuring each line.
20484
- * @private
20485
- * @param {CanvasRenderingContext2D} ctx Context to render on
20486
- * @return {Number} Maximum width of Text object
20916
+ /**
20917
+ * calculate and return the text Width measuring each line.
20918
+ * @private
20919
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20920
+ * @return {Number} Maximum width of Text object
20487
20921
  */
20488
20922
  calcTextWidth() {
20489
20923
  let maxWidth = this.getLineWidth(0);
@@ -20496,23 +20930,23 @@
20496
20930
  return maxWidth;
20497
20931
  }
20498
20932
 
20499
- /**
20500
- * @private
20501
- * @param {String} method Method name ("fillText" or "strokeText")
20502
- * @param {CanvasRenderingContext2D} ctx Context to render on
20503
- * @param {String} line Text to render
20504
- * @param {Number} left Left position of text
20505
- * @param {Number} top Top position of text
20506
- * @param {Number} lineIndex Index of a line in a text
20933
+ /**
20934
+ * @private
20935
+ * @param {String} method Method name ("fillText" or "strokeText")
20936
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20937
+ * @param {String} line Text to render
20938
+ * @param {Number} left Left position of text
20939
+ * @param {Number} top Top position of text
20940
+ * @param {Number} lineIndex Index of a line in a text
20507
20941
  */
20508
20942
  _renderTextLine(method, ctx, line, left, top, lineIndex) {
20509
20943
  this._renderChars(method, ctx, line, left, top, lineIndex);
20510
20944
  }
20511
20945
 
20512
- /**
20513
- * Renders the text background for lines, taking care of style
20514
- * @private
20515
- * @param {CanvasRenderingContext2D} ctx Context to render on
20946
+ /**
20947
+ * Renders the text background for lines, taking care of style
20948
+ * @private
20949
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20516
20950
  */
20517
20951
  _renderTextLinesBackground(ctx) {
20518
20952
  if (!this.textBackgroundColor && !this.styleHas('textBackgroundColor')) {
@@ -20575,15 +21009,15 @@
20575
21009
  this._removeShadow(ctx);
20576
21010
  }
20577
21011
 
20578
- /**
20579
- * measure and return the width of a single character.
20580
- * possibly overridden to accommodate different measure logic or
20581
- * to hook some external lib for character measurement
20582
- * @private
20583
- * @param {String} _char, char to be measured
20584
- * @param {Object} charStyle style of char to be measured
20585
- * @param {String} [previousChar] previous char
20586
- * @param {Object} [prevCharStyle] style of previous char
21012
+ /**
21013
+ * measure and return the width of a single character.
21014
+ * possibly overridden to accommodate different measure logic or
21015
+ * to hook some external lib for character measurement
21016
+ * @private
21017
+ * @param {String} _char, char to be measured
21018
+ * @param {Object} charStyle style of char to be measured
21019
+ * @param {String} [previousChar] previous char
21020
+ * @param {Object} [prevCharStyle] style of previous char
20587
21021
  */
20588
21022
  _measureChar(_char, charStyle, previousChar, prevCharStyle) {
20589
21023
  const fontCache = cache.getFontCache(charStyle),
@@ -20628,19 +21062,19 @@
20628
21062
  };
20629
21063
  }
20630
21064
 
20631
- /**
20632
- * Computes height of character at given position
20633
- * @param {Number} line the line index number
20634
- * @param {Number} _char the character index number
20635
- * @return {Number} fontSize of the character
21065
+ /**
21066
+ * Computes height of character at given position
21067
+ * @param {Number} line the line index number
21068
+ * @param {Number} _char the character index number
21069
+ * @return {Number} fontSize of the character
20636
21070
  */
20637
21071
  getHeightOfChar(line, _char) {
20638
21072
  return this.getValueOfPropertyAt(line, _char, 'fontSize');
20639
21073
  }
20640
21074
 
20641
- /**
20642
- * measure a text line measuring all characters.
20643
- * @param {Number} lineIndex line number
21075
+ /**
21076
+ * measure a text line measuring all characters.
21077
+ * @param {Number} lineIndex line number
20644
21078
  */
20645
21079
  measureLine(lineIndex) {
20646
21080
  const lineInfo = this._measureLine(lineIndex);
@@ -20653,11 +21087,11 @@
20653
21087
  return lineInfo;
20654
21088
  }
20655
21089
 
20656
- /**
20657
- * measure every grapheme of a line, populating __charBounds
20658
- * @param {Number} lineIndex
20659
- * @return {Object} object.width total width of characters
20660
- * @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
21090
+ /**
21091
+ * measure every grapheme of a line, populating __charBounds
21092
+ * @param {Number} lineIndex
21093
+ * @return {Object} object.width total width of characters
21094
+ * @return {Object} object.numOfSpaces length of chars that match this._reSpacesAndTabs
20661
21095
  */
20662
21096
  _measureLine(lineIndex) {
20663
21097
  let width = 0,
@@ -20720,13 +21154,13 @@
20720
21154
  };
20721
21155
  }
20722
21156
 
20723
- /**
20724
- * Calculate the angle and the left,top position of the char that follow a path.
20725
- * It appends it to graphemeInfo to be reused later at rendering
20726
- * @private
20727
- * @param {Number} positionInPath to be measured
20728
- * @param {GraphemeBBox} graphemeInfo current grapheme box information
20729
- * @param {Object} startingPoint position of the point
21157
+ /**
21158
+ * Calculate the angle and the left,top position of the char that follow a path.
21159
+ * It appends it to graphemeInfo to be reused later at rendering
21160
+ * @private
21161
+ * @param {Number} positionInPath to be measured
21162
+ * @param {GraphemeBBox} graphemeInfo current grapheme box information
21163
+ * @param {Object} startingPoint position of the point
20730
21164
  */
20731
21165
  _setGraphemeOnPath(positionInPath, graphemeInfo) {
20732
21166
  const centerPosition = positionInPath + graphemeInfo.kernedWidth / 2,
@@ -20739,13 +21173,13 @@
20739
21173
  graphemeInfo.angle = info.angle + (this.pathSide === RIGHT ? Math.PI : 0);
20740
21174
  }
20741
21175
 
20742
- /**
20743
- *
20744
- * @param {String} grapheme to be measured
20745
- * @param {Number} lineIndex index of the line where the char is
20746
- * @param {Number} charIndex position in the line
20747
- * @param {String} [prevGrapheme] character preceding the one to be measured
20748
- * @returns {GraphemeBBox} grapheme bbox
21176
+ /**
21177
+ *
21178
+ * @param {String} grapheme to be measured
21179
+ * @param {Number} lineIndex index of the line where the char is
21180
+ * @param {Number} charIndex position in the line
21181
+ * @param {String} [prevGrapheme] character preceding the one to be measured
21182
+ * @returns {GraphemeBBox} grapheme bbox
20749
21183
  */
20750
21184
  _getGraphemeBox(grapheme, lineIndex, charIndex, prevGrapheme, skipLeft) {
20751
21185
  const style = this.getCompleteStyleDeclaration(lineIndex, charIndex),
@@ -20773,10 +21207,10 @@
20773
21207
  return box;
20774
21208
  }
20775
21209
 
20776
- /**
20777
- * Calculate height of line at 'lineIndex'
20778
- * @param {Number} lineIndex index of line to calculate
20779
- * @return {Number}
21210
+ /**
21211
+ * Calculate height of line at 'lineIndex'
21212
+ * @param {Number} lineIndex index of line to calculate
21213
+ * @return {Number}
20780
21214
  */
20781
21215
  getHeightOfLine(lineIndex) {
20782
21216
  if (this.__lineHeights[lineIndex]) {
@@ -20792,8 +21226,8 @@
20792
21226
  return this.__lineHeights[lineIndex] = maxHeight * this.lineHeight * this._fontSizeMult;
20793
21227
  }
20794
21228
 
20795
- /**
20796
- * Calculate text box height
21229
+ /**
21230
+ * Calculate text box height
20797
21231
  */
20798
21232
  calcTextHeight() {
20799
21233
  let lineHeight,
@@ -20805,26 +21239,26 @@
20805
21239
  return height;
20806
21240
  }
20807
21241
 
20808
- /**
20809
- * @private
20810
- * @return {Number} Left offset
21242
+ /**
21243
+ * @private
21244
+ * @return {Number} Left offset
20811
21245
  */
20812
21246
  _getLeftOffset() {
20813
21247
  return this.direction === 'ltr' ? -this.width / 2 : this.width / 2;
20814
21248
  }
20815
21249
 
20816
- /**
20817
- * @private
20818
- * @return {Number} Top offset
21250
+ /**
21251
+ * @private
21252
+ * @return {Number} Top offset
20819
21253
  */
20820
21254
  _getTopOffset() {
20821
21255
  return -this.height / 2;
20822
21256
  }
20823
21257
 
20824
- /**
20825
- * @private
20826
- * @param {CanvasRenderingContext2D} ctx Context to render on
20827
- * @param {String} method Method name ("fillText" or "strokeText")
21258
+ /**
21259
+ * @private
21260
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21261
+ * @param {String} method Method name ("fillText" or "strokeText")
20828
21262
  */
20829
21263
  _renderTextCommon(ctx, method) {
20830
21264
  ctx.save();
@@ -20841,9 +21275,9 @@
20841
21275
  ctx.restore();
20842
21276
  }
20843
21277
 
20844
- /**
20845
- * @private
20846
- * @param {CanvasRenderingContext2D} ctx Context to render on
21278
+ /**
21279
+ * @private
21280
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20847
21281
  */
20848
21282
  _renderTextFill(ctx) {
20849
21283
  if (!this.fill && !this.styleHas(FILL)) {
@@ -20852,9 +21286,9 @@
20852
21286
  this._renderTextCommon(ctx, 'fillText');
20853
21287
  }
20854
21288
 
20855
- /**
20856
- * @private
20857
- * @param {CanvasRenderingContext2D} ctx Context to render on
21289
+ /**
21290
+ * @private
21291
+ * @param {CanvasRenderingContext2D} ctx Context to render on
20858
21292
  */
20859
21293
  _renderTextStroke(ctx) {
20860
21294
  if ((!this.stroke || this.strokeWidth === 0) && this.isEmptyStyles()) {
@@ -20871,14 +21305,14 @@
20871
21305
  ctx.restore();
20872
21306
  }
20873
21307
 
20874
- /**
20875
- * @private
20876
- * @param {String} method fillText or strokeText.
20877
- * @param {CanvasRenderingContext2D} ctx Context to render on
20878
- * @param {Array} line Content of the line, splitted in an array by grapheme
20879
- * @param {Number} left
20880
- * @param {Number} top
20881
- * @param {Number} lineIndex
21308
+ /**
21309
+ * @private
21310
+ * @param {String} method fillText or strokeText.
21311
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21312
+ * @param {Array} line Content of the line, splitted in an array by grapheme
21313
+ * @param {Number} left
21314
+ * @param {Number} top
21315
+ * @param {Number} lineIndex
20882
21316
  */
20883
21317
  _renderChars(method, ctx, line, left, top, lineIndex) {
20884
21318
  const lineHeight = this.getHeightOfLine(lineIndex),
@@ -20960,16 +21394,16 @@
20960
21394
  ctx.restore();
20961
21395
  }
20962
21396
 
20963
- /**
20964
- * This function try to patch the missing gradientTransform on canvas gradients.
20965
- * transforming a context to transform the gradient, is going to transform the stroke too.
20966
- * we want to transform the gradient but not the stroke operation, so we create
20967
- * a transformed gradient on a pattern and then we use the pattern instead of the gradient.
20968
- * this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
20969
- * is limited.
20970
- * @private
20971
- * @param {TFiller} filler a fabric gradient instance
20972
- * @return {CanvasPattern} a pattern to use as fill/stroke style
21397
+ /**
21398
+ * This function try to patch the missing gradientTransform on canvas gradients.
21399
+ * transforming a context to transform the gradient, is going to transform the stroke too.
21400
+ * we want to transform the gradient but not the stroke operation, so we create
21401
+ * a transformed gradient on a pattern and then we use the pattern instead of the gradient.
21402
+ * this method has drawbacks: is slow, is in low resolution, needs a patch for when the size
21403
+ * is limited.
21404
+ * @private
21405
+ * @param {TFiller} filler a fabric gradient instance
21406
+ * @return {CanvasPattern} a pattern to use as fill/stroke style
20973
21407
  */
20974
21408
  _applyPatternGradientTransformText(filler) {
20975
21409
  // TODO: verify compatibility with strokeUniform
@@ -21025,12 +21459,12 @@
21025
21459
  };
21026
21460
  }
21027
21461
 
21028
- /**
21029
- * This function prepare the canvas for a stroke style, and stroke and strokeWidth
21030
- * need to be sent in as defined
21031
- * @param {CanvasRenderingContext2D} ctx
21032
- * @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
21033
- * @returns
21462
+ /**
21463
+ * This function prepare the canvas for a stroke style, and stroke and strokeWidth
21464
+ * need to be sent in as defined
21465
+ * @param {CanvasRenderingContext2D} ctx
21466
+ * @param {CompleteTextStyleDeclaration} style with stroke and strokeWidth defined
21467
+ * @returns
21034
21468
  */
21035
21469
  _setStrokeStyles(ctx, _ref) {
21036
21470
  let {
@@ -21045,12 +21479,12 @@
21045
21479
  return this.handleFiller(ctx, 'strokeStyle', stroke);
21046
21480
  }
21047
21481
 
21048
- /**
21049
- * This function prepare the canvas for a ill style, and fill
21050
- * need to be sent in as defined
21051
- * @param {CanvasRenderingContext2D} ctx
21052
- * @param {CompleteTextStyleDeclaration} style with ill defined
21053
- * @returns
21482
+ /**
21483
+ * This function prepare the canvas for a ill style, and fill
21484
+ * need to be sent in as defined
21485
+ * @param {CanvasRenderingContext2D} ctx
21486
+ * @param {CompleteTextStyleDeclaration} style with ill defined
21487
+ * @returns
21054
21488
  */
21055
21489
  _setFillStyles(ctx, _ref2) {
21056
21490
  let {
@@ -21059,16 +21493,16 @@
21059
21493
  return this.handleFiller(ctx, 'fillStyle', fill);
21060
21494
  }
21061
21495
 
21062
- /**
21063
- * @private
21064
- * @param {String} method
21065
- * @param {CanvasRenderingContext2D} ctx Context to render on
21066
- * @param {Number} lineIndex
21067
- * @param {Number} charIndex
21068
- * @param {String} _char
21069
- * @param {Number} left Left coordinate
21070
- * @param {Number} top Top coordinate
21071
- * @param {Number} lineHeight Height of the line
21496
+ /**
21497
+ * @private
21498
+ * @param {String} method
21499
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21500
+ * @param {Number} lineIndex
21501
+ * @param {Number} charIndex
21502
+ * @param {String} _char
21503
+ * @param {Number} left Left coordinate
21504
+ * @param {Number} top Top coordinate
21505
+ * @param {Number} lineHeight Height of the line
21072
21506
  */
21073
21507
  _renderChar(method, ctx, lineIndex, charIndex, _char, left, top) {
21074
21508
  const decl = this._getStyleDeclaration(lineIndex, charIndex),
@@ -21097,30 +21531,30 @@
21097
21531
  ctx.restore();
21098
21532
  }
21099
21533
 
21100
- /**
21101
- * Turns the character into a 'superior figure' (i.e. 'superscript')
21102
- * @param {Number} start selection start
21103
- * @param {Number} end selection end
21534
+ /**
21535
+ * Turns the character into a 'superior figure' (i.e. 'superscript')
21536
+ * @param {Number} start selection start
21537
+ * @param {Number} end selection end
21104
21538
  */
21105
21539
  setSuperscript(start, end) {
21106
21540
  this._setScript(start, end, this.superscript);
21107
21541
  }
21108
21542
 
21109
- /**
21110
- * Turns the character into an 'inferior figure' (i.e. 'subscript')
21111
- * @param {Number} start selection start
21112
- * @param {Number} end selection end
21543
+ /**
21544
+ * Turns the character into an 'inferior figure' (i.e. 'subscript')
21545
+ * @param {Number} start selection start
21546
+ * @param {Number} end selection end
21113
21547
  */
21114
21548
  setSubscript(start, end) {
21115
21549
  this._setScript(start, end, this.subscript);
21116
21550
  }
21117
21551
 
21118
- /**
21119
- * Applies 'schema' at given position
21120
- * @private
21121
- * @param {Number} start selection start
21122
- * @param {Number} end selection end
21123
- * @param {Number} schema
21552
+ /**
21553
+ * Applies 'schema' at given position
21554
+ * @private
21555
+ * @param {Number} start selection start
21556
+ * @param {Number} end selection end
21557
+ * @param {Number} schema
21124
21558
  */
21125
21559
  _setScript(start, end, schema) {
21126
21560
  const loc = this.get2DCursorLocation(start, true),
@@ -21133,10 +21567,10 @@
21133
21567
  this.setSelectionStyles(style, start, end);
21134
21568
  }
21135
21569
 
21136
- /**
21137
- * @private
21138
- * @param {Number} lineIndex index text line
21139
- * @return {Number} Line left offset
21570
+ /**
21571
+ * @private
21572
+ * @param {Number} lineIndex index text line
21573
+ * @return {Number} Line left offset
21140
21574
  */
21141
21575
  _getLineLeftOffset(lineIndex) {
21142
21576
  const lineWidth = this.getLineWidth(lineIndex),
@@ -21186,8 +21620,8 @@
21186
21620
  return leftOffset;
21187
21621
  }
21188
21622
 
21189
- /**
21190
- * @private
21623
+ /**
21624
+ * @private
21191
21625
  */
21192
21626
  _clearCache() {
21193
21627
  this._forceClearCache = false;
@@ -21196,12 +21630,12 @@
21196
21630
  this.__charBounds = [];
21197
21631
  }
21198
21632
 
21199
- /**
21200
- * Measure a single line given its index. Used to calculate the initial
21201
- * text bounding box. The values are calculated and stored in __lineWidths cache.
21202
- * @private
21203
- * @param {Number} lineIndex line number
21204
- * @return {Number} Line width
21633
+ /**
21634
+ * Measure a single line given its index. Used to calculate the initial
21635
+ * text bounding box. The values are calculated and stored in __lineWidths cache.
21636
+ * @private
21637
+ * @param {Number} lineIndex line number
21638
+ * @return {Number} Line width
21205
21639
  */
21206
21640
  getLineWidth(lineIndex) {
21207
21641
  if (this.__lineWidths[lineIndex] !== undefined) {
@@ -21220,12 +21654,12 @@
21220
21654
  return 0;
21221
21655
  }
21222
21656
 
21223
- /**
21224
- * Retrieves the value of property at given character position
21225
- * @param {Number} lineIndex the line number
21226
- * @param {Number} charIndex the character number
21227
- * @param {String} property the property name
21228
- * @returns the value of 'property'
21657
+ /**
21658
+ * Retrieves the value of property at given character position
21659
+ * @param {Number} lineIndex the line number
21660
+ * @param {Number} charIndex the character number
21661
+ * @param {String} property the property name
21662
+ * @returns the value of 'property'
21229
21663
  */
21230
21664
  getValueOfPropertyAt(lineIndex, charIndex, property) {
21231
21665
  var _charStyle$property;
@@ -21233,9 +21667,9 @@
21233
21667
  return (_charStyle$property = charStyle[property]) !== null && _charStyle$property !== void 0 ? _charStyle$property : this[property];
21234
21668
  }
21235
21669
 
21236
- /**
21237
- * @private
21238
- * @param {CanvasRenderingContext2D} ctx Context to render on
21670
+ /**
21671
+ * @private
21672
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21239
21673
  */
21240
21674
  _renderTextDecoration(ctx, type) {
21241
21675
  if (!this[type] && !this.styleHas(type)) {
@@ -21319,10 +21753,10 @@
21319
21753
  this._removeShadow(ctx);
21320
21754
  }
21321
21755
 
21322
- /**
21323
- * return font declaration string for canvas context
21324
- * @param {Object} [styleObject] object
21325
- * @returns {String} font declaration formatted for canvas context.
21756
+ /**
21757
+ * return font declaration string for canvas context
21758
+ * @param {Object} [styleObject] object
21759
+ * @returns {String} font declaration formatted for canvas context.
21326
21760
  */
21327
21761
  _getFontDeclaration() {
21328
21762
  let {
@@ -21336,9 +21770,9 @@
21336
21770
  return [fontStyle, fontWeight, `${forMeasuring ? this.CACHE_FONT_SIZE : fontSize}px`, parsedFontFamily].join(' ');
21337
21771
  }
21338
21772
 
21339
- /**
21340
- * Renders text instance on a specified context
21341
- * @param {CanvasRenderingContext2D} ctx Context to render on
21773
+ /**
21774
+ * Renders text instance on a specified context
21775
+ * @param {CanvasRenderingContext2D} ctx Context to render on
21342
21776
  */
21343
21777
  render(ctx) {
21344
21778
  if (!this.visible) {
@@ -21353,22 +21787,22 @@
21353
21787
  super.render(ctx);
21354
21788
  }
21355
21789
 
21356
- /**
21357
- * Override this method to customize grapheme splitting
21358
- * @todo the util `graphemeSplit` needs to be injectable in some way.
21359
- * is more comfortable to inject the correct util rather than having to override text
21360
- * in the middle of the prototype chain
21361
- * @param {string} value
21362
- * @returns {string[]} array of graphemes
21790
+ /**
21791
+ * Override this method to customize grapheme splitting
21792
+ * @todo the util `graphemeSplit` needs to be injectable in some way.
21793
+ * is more comfortable to inject the correct util rather than having to override text
21794
+ * in the middle of the prototype chain
21795
+ * @param {string} value
21796
+ * @returns {string[]} array of graphemes
21363
21797
  */
21364
21798
  graphemeSplit(value) {
21365
21799
  return graphemeSplit(value);
21366
21800
  }
21367
21801
 
21368
- /**
21369
- * Returns the text as an array of lines.
21370
- * @param {String} text text to split
21371
- * @returns Lines in the text
21802
+ /**
21803
+ * Returns the text as an array of lines.
21804
+ * @param {String} text text to split
21805
+ * @returns Lines in the text
21372
21806
  */
21373
21807
  _splitTextIntoLines(text) {
21374
21808
  const lines = text.split(this._reNewline),
@@ -21388,10 +21822,10 @@
21388
21822
  };
21389
21823
  }
21390
21824
 
21391
- /**
21392
- * Returns object representation of an instance
21393
- * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
21394
- * @return {Object} Object representation of an instance
21825
+ /**
21826
+ * Returns object representation of an instance
21827
+ * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
21828
+ * @return {Object} Object representation of an instance
21395
21829
  */
21396
21830
  toObject() {
21397
21831
  let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
@@ -21434,23 +21868,23 @@
21434
21868
  return this;
21435
21869
  }
21436
21870
 
21437
- /**
21438
- * Returns complexity of an instance
21439
- * @return {Number} complexity
21871
+ /**
21872
+ * Returns complexity of an instance
21873
+ * @return {Number} complexity
21440
21874
  */
21441
21875
  complexity() {
21442
21876
  return 1;
21443
21877
  }
21444
21878
 
21445
- /**
21446
- * List of generic font families
21447
- * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
21879
+ /**
21880
+ * List of generic font families
21881
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name
21448
21882
  */
21449
-
21450
- /**
21451
- * Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
21452
- * @param {HTMLElement} element Element to parse
21453
- * @param {Object} [options] Options object
21883
+
21884
+ /**
21885
+ * Returns FabricText instance from an SVG element (<b>not yet implemented</b>)
21886
+ * @param {HTMLElement} element Element to parse
21887
+ * @param {Object} [options] Options object
21454
21888
  */
21455
21889
  static async fromElement(element, options, cssRules) {
21456
21890
  const parsedAttributes = parseAttributes(element, FabricText.ATTRIBUTE_NAMES, cssRules);
@@ -21489,10 +21923,10 @@
21489
21923
  scaledDiff = lineHeightDiff * textHeightScaleFactor,
21490
21924
  textHeight = text.getScaledHeight() + scaledDiff;
21491
21925
  let offX = 0;
21492
- /*
21493
- Adjust positioning:
21494
- x/y attributes in SVG correspond to the bottom-left corner of text bounding box
21495
- fabric output by default at top, left.
21926
+ /*
21927
+ Adjust positioning:
21928
+ x/y attributes in SVG correspond to the bottom-left corner of text bounding box
21929
+ fabric output by default at top, left.
21496
21930
  */
21497
21931
  if (textAnchor === CENTER) {
21498
21932
  offX = text.getScaledWidth() / 2;
@@ -21510,10 +21944,10 @@
21510
21944
 
21511
21945
  /* _FROM_SVG_END_ */
21512
21946
 
21513
- /**
21514
- * Returns FabricText instance from an object representation
21515
- * @param {Object} object plain js Object to create an instance from
21516
- * @returns {Promise<FabricText>}
21947
+ /**
21948
+ * Returns FabricText instance from an object representation
21949
+ * @param {Object} object plain js Object to create an instance from
21950
+ * @returns {Promise<FabricText>}
21517
21951
  */
21518
21952
  static fromObject(object) {
21519
21953
  return this._fromObject({
@@ -21524,10 +21958,10 @@
21524
21958
  });
21525
21959
  }
21526
21960
  }
21527
- /**
21528
- * Properties that requires a text layout recalculation when changed
21529
- * @type string[]
21530
- * @protected
21961
+ /**
21962
+ * Properties that requires a text layout recalculation when changed
21963
+ * @type string[]
21964
+ * @protected
21531
21965
  */
21532
21966
  _defineProperty(FabricText, "textLayoutProperties", textLayoutProperties);
21533
21967
  _defineProperty(FabricText, "cacheProperties", [...cacheProperties, ...additionalProps]);
@@ -21535,9 +21969,9 @@
21535
21969
  _defineProperty(FabricText, "type", 'Text');
21536
21970
  _defineProperty(FabricText, "genericFonts", ['serif', 'sans-serif', 'monospace', 'cursive', 'fantasy', 'system-ui', 'ui-serif', 'ui-sans-serif', 'ui-monospace', 'ui-rounded', 'math', 'emoji', 'fangsong']);
21537
21971
  /* _FROM_SVG_START_ */
21538
- /**
21539
- * List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
21540
- * @see: http://www.w3.org/TR/SVG/text.html#TextElement
21972
+ /**
21973
+ * List of attribute names to account for when parsing SVG element (used by {@link FabricText.fromElement})
21974
+ * @see: http://www.w3.org/TR/SVG/text.html#TextElement
21541
21975
  */
21542
21976
  _defineProperty(FabricText, "ATTRIBUTE_NAMES", SHARED_ATTRIBUTES.concat('x', 'y', 'dx', 'dy', 'font-family', 'font-style', 'font-weight', 'font-size', 'letter-spacing', 'text-decoration', 'text-anchor'));
21543
21977
  applyMixins(FabricText, [TextSVGExportMixin]);
@@ -21924,8 +22358,8 @@
21924
22358
  // We don't need to save/restore them here as it would conflict with IText's restoration
21925
22359
  }
21926
22360
 
21927
- /**
21928
- * Get the container element for the overlay (parent of upperCanvasEl)
22361
+ /**
22362
+ * Get the container element for the overlay (parent of upperCanvasEl)
21929
22363
  */
21930
22364
  getCanvasContainer() {
21931
22365
  const upperCanvas = this.canvas.upperCanvasEl;
@@ -21939,8 +22373,8 @@
21939
22373
  return container;
21940
22374
  }
21941
22375
 
21942
- /**
21943
- * Create the overlay DOM structure
22376
+ /**
22377
+ * Create the overlay DOM structure
21944
22378
  */
21945
22379
  createOverlayDOM() {
21946
22380
  // Host div for positioning and overflow control
@@ -21995,8 +22429,8 @@
21995
22429
  document.body.appendChild(this.hostDiv);
21996
22430
  }
21997
22431
 
21998
- /**
21999
- * Attach all event listeners
22432
+ /**
22433
+ * Attach all event listeners
22000
22434
  */
22001
22435
  attachEventListeners() {
22002
22436
  // Textarea events
@@ -22016,8 +22450,8 @@
22016
22450
  this.setupViewportChangeDetection();
22017
22451
  }
22018
22452
 
22019
- /**
22020
- * Remove all event listeners
22453
+ /**
22454
+ * Remove all event listeners
22021
22455
  */
22022
22456
  removeEventListeners() {
22023
22457
  this.textarea.removeEventListener('input', this.boundHandlers.onInput);
@@ -22034,16 +22468,16 @@
22034
22468
  this.restoreViewportChangeDetection();
22035
22469
  }
22036
22470
 
22037
- /**
22038
- * Simple method to refresh positioning when canvas changes
22471
+ /**
22472
+ * Simple method to refresh positioning when canvas changes
22039
22473
  */
22040
22474
  updatePosition() {
22041
22475
  this.applyOverlayStyle();
22042
22476
  }
22043
22477
 
22044
- /**
22045
- * Update the Fabric object bounds to match current textarea size
22046
- * This ensures Fabric.js selection controls follow the growing textbox
22478
+ /**
22479
+ * Update the Fabric object bounds to match current textarea size
22480
+ * This ensures Fabric.js selection controls follow the growing textbox
22047
22481
  */
22048
22482
  updateObjectBounds() {
22049
22483
  if (this.isDestroyed) return;
@@ -22077,15 +22511,15 @@
22077
22511
  }
22078
22512
  }
22079
22513
 
22080
- /**
22081
- * Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
22514
+ /**
22515
+ * Convert Fabric charSpacing (1/1000 em) to CSS letter-spacing (px)
22082
22516
  */
22083
22517
  letterSpacingPx(charSpacing, fontSize) {
22084
22518
  return charSpacing / 1000 * fontSize;
22085
22519
  }
22086
22520
 
22087
- /**
22088
- * Detect text direction using first strong directional character
22521
+ /**
22522
+ * Detect text direction using first strong directional character
22089
22523
  */
22090
22524
  firstStrongDir(text) {
22091
22525
  // Hebrew: \u0590-\u05FF, Arabic: \u0600-\u06FF, \u0750-\u077F, \uFB50-\uFDFF, \uFE70-\uFEFF
@@ -22315,8 +22749,8 @@
22315
22749
  // Initial bounds are set correctly by Fabric.js - don't force update here
22316
22750
  }
22317
22751
 
22318
- /**
22319
- * Debug method to compare textarea and canvas object bounding boxes
22752
+ /**
22753
+ * Debug method to compare textarea and canvas object bounding boxes
22320
22754
  */
22321
22755
  debugBoundingBoxComparison() {
22322
22756
  const target = this.target;
@@ -22386,8 +22820,8 @@
22386
22820
  console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
22387
22821
  }
22388
22822
 
22389
- /**
22390
- * Debug method to compare text wrapping between textarea and Fabric text object
22823
+ /**
22824
+ * Debug method to compare text wrapping between textarea and Fabric text object
22391
22825
  */
22392
22826
  debugTextWrapping() {
22393
22827
  const target = this.target;
@@ -22472,8 +22906,8 @@
22472
22906
  console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
22473
22907
  }
22474
22908
 
22475
- /**
22476
- * Focus the textarea and position cursor at end
22909
+ /**
22910
+ * Focus the textarea and position cursor at end
22477
22911
  */
22478
22912
  focusTextarea() {
22479
22913
  // For overlay editing, we want to keep the object in "selection mode" not "editing mode"
@@ -22508,8 +22942,8 @@
22508
22942
  this.canvas.requestRenderAll();
22509
22943
  }
22510
22944
 
22511
- /**
22512
- * Refresh overlay positioning and styling
22945
+ /**
22946
+ * Refresh overlay positioning and styling
22513
22947
  */
22514
22948
  refresh() {
22515
22949
  if (this.isDestroyed) return;
@@ -22517,8 +22951,8 @@
22517
22951
  // Don't update object bounds on every refresh - only when textarea actually resizes
22518
22952
  }
22519
22953
 
22520
- /**
22521
- * Destroy the overlay editor
22954
+ /**
22955
+ * Destroy the overlay editor
22522
22956
  */
22523
22957
  destroy() {
22524
22958
  let commit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
@@ -22686,8 +23120,8 @@
22686
23120
  }
22687
23121
  }
22688
23122
 
22689
- /**
22690
- * Setup detection for viewport changes (zoom/pan)
23123
+ /**
23124
+ * Setup detection for viewport changes (zoom/pan)
22691
23125
  */
22692
23126
  setupViewportChangeDetection() {
22693
23127
  // Store original methods
@@ -22716,8 +23150,8 @@
22716
23150
  };
22717
23151
  }
22718
23152
 
22719
- /**
22720
- * Restore original viewport methods
23153
+ /**
23154
+ * Restore original viewport methods
22721
23155
  */
22722
23156
  restoreViewportChangeDetection() {
22723
23157
  if (this.canvas.__originalSetZoom) {
@@ -22732,8 +23166,8 @@
22732
23166
  }
22733
23167
  }
22734
23168
 
22735
- /**
22736
- * Enter overlay text editing mode for a text object
23169
+ /**
23170
+ * Enter overlay text editing mode for a text object
22737
23171
  */
22738
23172
  function enterTextOverlayEdit(canvas, target, options) {
22739
23173
  // If already in overlay editing, destroy existing editor first
@@ -22757,35 +23191,35 @@
22757
23191
  return editor;
22758
23192
  }
22759
23193
 
22760
- /**
22761
- * extend this regex to support non english languages
22762
- *
22763
- * - ` ` Matches a SPACE character (char code 32).
22764
- * - `\n` Matches a LINE FEED character (char code 10).
22765
- * - `.` Matches a "." character (char code 46).
22766
- * - `,` Matches a "," character (char code 44).
22767
- * - `;` Matches a ";" character (char code 59).
22768
- * - `!` Matches a "!" character (char code 33).
22769
- * - `\?` Matches a "?" character (char code 63).
22770
- * - `\-` Matches a "-" character (char code 45).
23194
+ /**
23195
+ * extend this regex to support non english languages
23196
+ *
23197
+ * - ` ` Matches a SPACE character (char code 32).
23198
+ * - `\n` Matches a LINE FEED character (char code 10).
23199
+ * - `.` Matches a "." character (char code 46).
23200
+ * - `,` Matches a "," character (char code 44).
23201
+ * - `;` Matches a ";" character (char code 59).
23202
+ * - `!` Matches a "!" character (char code 33).
23203
+ * - `\?` Matches a "?" character (char code 63).
23204
+ * - `\-` Matches a "-" character (char code 45).
22771
23205
  */
22772
23206
  // eslint-disable-next-line no-useless-escape
22773
23207
  const reNonWord = /[ \n\.,;!\?\-]/;
22774
23208
  class ITextBehavior extends FabricText {
22775
23209
  constructor() {
22776
23210
  super(...arguments);
22777
- /**
22778
- * Helps determining when the text is in composition, so that the cursor
22779
- * rendering is altered.
23211
+ /**
23212
+ * Helps determining when the text is in composition, so that the cursor
23213
+ * rendering is altered.
22780
23214
  */
22781
23215
  _defineProperty(this, "_currentCursorOpacity", 1);
22782
23216
  }
22783
- /**
22784
- * Keeps track if the IText object was selected before the actual click.
22785
- * This because we want to delay enter editing by a click.
23217
+ /**
23218
+ * Keeps track if the IText object was selected before the actual click.
23219
+ * This because we want to delay enter editing by a click.
22786
23220
  */
22787
- /**
22788
- * Initializes all the interactive behavior of IText
23221
+ /**
23222
+ * Initializes all the interactive behavior of IText
22789
23223
  */
22790
23224
  initBehavior() {
22791
23225
  this._tick = this._tick.bind(this);
@@ -22798,8 +23232,8 @@
22798
23232
  return super.onDeselect(options);
22799
23233
  }
22800
23234
 
22801
- /**
22802
- * @private
23235
+ /**
23236
+ * @private
22803
23237
  */
22804
23238
  _animateCursor(_ref) {
22805
23239
  let {
@@ -22824,8 +23258,8 @@
22824
23258
  });
22825
23259
  }
22826
23260
 
22827
- /**
22828
- * changes the cursor from visible to invisible
23261
+ /**
23262
+ * changes the cursor from visible to invisible
22829
23263
  */
22830
23264
  _tick(delay) {
22831
23265
  this._currentTickState = this._animateCursor({
@@ -22836,8 +23270,8 @@
22836
23270
  });
22837
23271
  }
22838
23272
 
22839
- /**
22840
- * Changes the cursor from invisible to visible
23273
+ /**
23274
+ * Changes the cursor from invisible to visible
22841
23275
  */
22842
23276
  _onTickComplete() {
22843
23277
  var _this$_currentTickCom;
@@ -22849,16 +23283,16 @@
22849
23283
  });
22850
23284
  }
22851
23285
 
22852
- /**
22853
- * Initializes delayed cursor
23286
+ /**
23287
+ * Initializes delayed cursor
22854
23288
  */
22855
23289
  initDelayedCursor(restart) {
22856
23290
  this.abortCursorAnimation();
22857
23291
  this._tick(restart ? 0 : this.cursorDelay);
22858
23292
  }
22859
23293
 
22860
- /**
22861
- * Aborts cursor animation, clears all timeouts and clear textarea context if necessary
23294
+ /**
23295
+ * Aborts cursor animation, clears all timeouts and clear textarea context if necessary
22862
23296
  */
22863
23297
  abortCursorAnimation() {
22864
23298
  let shouldClear = false;
@@ -22876,9 +23310,9 @@
22876
23310
  }
22877
23311
  }
22878
23312
 
22879
- /**
22880
- * Restart tue cursor animation if either is in complete state ( between animations )
22881
- * or if it never started before
23313
+ /**
23314
+ * Restart tue cursor animation if either is in complete state ( between animations )
23315
+ * or if it never started before
22882
23316
  */
22883
23317
  restartCursorIfNeeded() {
22884
23318
  if ([this._currentTickState, this._currentTickCompleteState].some(cursorAnimation => !cursorAnimation || cursorAnimation.isDone())) {
@@ -22886,8 +23320,8 @@
22886
23320
  }
22887
23321
  }
22888
23322
 
22889
- /**
22890
- * Selects entire text
23323
+ /**
23324
+ * Selects entire text
22891
23325
  */
22892
23326
  selectAll() {
22893
23327
  this.selectionStart = 0;
@@ -22897,26 +23331,26 @@
22897
23331
  return this;
22898
23332
  }
22899
23333
 
22900
- /**
22901
- * Selects entire text and updates the visual state
23334
+ /**
23335
+ * Selects entire text and updates the visual state
22902
23336
  */
22903
23337
  cmdAll() {
22904
23338
  this.selectAll();
22905
23339
  this.renderCursorOrSelection();
22906
23340
  }
22907
23341
 
22908
- /**
22909
- * Returns selected text
22910
- * @return {String}
23342
+ /**
23343
+ * Returns selected text
23344
+ * @return {String}
22911
23345
  */
22912
23346
  getSelectedText() {
22913
23347
  return this._text.slice(this.selectionStart, this.selectionEnd).join('');
22914
23348
  }
22915
23349
 
22916
- /**
22917
- * Find new selection index representing start of current word according to current selection index
22918
- * @param {Number} startFrom Current selection index
22919
- * @return {Number} New selection index
23350
+ /**
23351
+ * Find new selection index representing start of current word according to current selection index
23352
+ * @param {Number} startFrom Current selection index
23353
+ * @return {Number} New selection index
22920
23354
  */
22921
23355
  findWordBoundaryLeft(startFrom) {
22922
23356
  let offset = 0,
@@ -22936,10 +23370,10 @@
22936
23370
  return startFrom - offset;
22937
23371
  }
22938
23372
 
22939
- /**
22940
- * Find new selection index representing end of current word according to current selection index
22941
- * @param {Number} startFrom Current selection index
22942
- * @return {Number} New selection index
23373
+ /**
23374
+ * Find new selection index representing end of current word according to current selection index
23375
+ * @param {Number} startFrom Current selection index
23376
+ * @return {Number} New selection index
22943
23377
  */
22944
23378
  findWordBoundaryRight(startFrom) {
22945
23379
  let offset = 0,
@@ -22959,10 +23393,10 @@
22959
23393
  return startFrom + offset;
22960
23394
  }
22961
23395
 
22962
- /**
22963
- * Find new selection index representing start of current line according to current selection index
22964
- * @param {Number} startFrom Current selection index
22965
- * @return {Number} New selection index
23396
+ /**
23397
+ * Find new selection index representing start of current line according to current selection index
23398
+ * @param {Number} startFrom Current selection index
23399
+ * @return {Number} New selection index
22966
23400
  */
22967
23401
  findLineBoundaryLeft(startFrom) {
22968
23402
  let offset = 0,
@@ -22974,10 +23408,10 @@
22974
23408
  return startFrom - offset;
22975
23409
  }
22976
23410
 
22977
- /**
22978
- * Find new selection index representing end of current line according to current selection index
22979
- * @param {Number} startFrom Current selection index
22980
- * @return {Number} New selection index
23411
+ /**
23412
+ * Find new selection index representing end of current line according to current selection index
23413
+ * @param {Number} startFrom Current selection index
23414
+ * @return {Number} New selection index
22981
23415
  */
22982
23416
  findLineBoundaryRight(startFrom) {
22983
23417
  let offset = 0,
@@ -22989,11 +23423,11 @@
22989
23423
  return startFrom + offset;
22990
23424
  }
22991
23425
 
22992
- /**
22993
- * Finds index corresponding to beginning or end of a word
22994
- * @param {Number} selectionStart Index of a character
22995
- * @param {Number} direction 1 or -1
22996
- * @return {Number} Index of the beginning or end of a word
23426
+ /**
23427
+ * Finds index corresponding to beginning or end of a word
23428
+ * @param {Number} selectionStart Index of a character
23429
+ * @param {Number} direction 1 or -1
23430
+ * @return {Number} Index of the beginning or end of a word
22997
23431
  */
22998
23432
  searchWordBoundary(selectionStart, direction) {
22999
23433
  const text = this._text;
@@ -23011,9 +23445,9 @@
23011
23445
  return index;
23012
23446
  }
23013
23447
 
23014
- /**
23015
- * Selects the word that contains the char at index selectionStart
23016
- * @param {Number} selectionStart Index of a character
23448
+ /**
23449
+ * Selects the word that contains the char at index selectionStart
23450
+ * @param {Number} selectionStart Index of a character
23017
23451
  */
23018
23452
  selectWord(selectionStart) {
23019
23453
  selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
@@ -23029,9 +23463,9 @@
23029
23463
  this.renderCursorOrSelection();
23030
23464
  }
23031
23465
 
23032
- /**
23033
- * Selects the line that contains selectionStart
23034
- * @param {Number} selectionStart Index of a character
23466
+ /**
23467
+ * Selects the line that contains selectionStart
23468
+ * @param {Number} selectionStart Index of a character
23035
23469
  */
23036
23470
  selectLine(selectionStart) {
23037
23471
  selectionStart = selectionStart !== null && selectionStart !== void 0 ? selectionStart : this.selectionStart;
@@ -23043,8 +23477,8 @@
23043
23477
  this._updateTextarea();
23044
23478
  }
23045
23479
 
23046
- /**
23047
- * Enters editing state
23480
+ /**
23481
+ * Enters editing state
23048
23482
  */
23049
23483
  enterEditing(e) {
23050
23484
  if (this.isEditing || !this.editable) {
@@ -23064,8 +23498,8 @@
23064
23498
  }
23065
23499
  }
23066
23500
 
23067
- /**
23068
- * runs the actual logic that enter from editing state, see {@link enterEditing}
23501
+ /**
23502
+ * runs the actual logic that enter from editing state, see {@link enterEditing}
23069
23503
  */
23070
23504
  enterEditingImpl() {
23071
23505
  if (this.canvas) {
@@ -23089,8 +23523,8 @@
23089
23523
  }
23090
23524
  }
23091
23525
 
23092
- /**
23093
- * Enter overlay editing mode using DOM textarea overlay
23526
+ /**
23527
+ * Enter overlay editing mode using DOM textarea overlay
23094
23528
  */
23095
23529
  enterOverlayEditing() {
23096
23530
  this._saveEditingProps();
@@ -23111,8 +23545,8 @@
23111
23545
  });
23112
23546
  }
23113
23547
 
23114
- /**
23115
- * Commit overlay editing changes
23548
+ /**
23549
+ * Commit overlay editing changes
23116
23550
  */
23117
23551
  commitOverlayEdit(text) {
23118
23552
  const overlayEditor = this.__overlayEditor;
@@ -23136,8 +23570,8 @@
23136
23570
  this.canvas && this.canvas.requestRenderAll();
23137
23571
  }
23138
23572
 
23139
- /**
23140
- * Cancel overlay editing without changes
23573
+ /**
23574
+ * Cancel overlay editing without changes
23141
23575
  */
23142
23576
  cancelOverlayEdit() {
23143
23577
  // Restore original text
@@ -23145,8 +23579,8 @@
23145
23579
  this.exitEditing();
23146
23580
  }
23147
23581
 
23148
- /**
23149
- * called by {@link Canvas#textEditingManager}
23582
+ /**
23583
+ * called by {@link Canvas#textEditingManager}
23150
23584
  */
23151
23585
  updateSelectionOnMouseMove(e) {
23152
23586
  if (this.getActiveControl()) {
@@ -23174,8 +23608,8 @@
23174
23608
  }
23175
23609
  }
23176
23610
 
23177
- /**
23178
- * @private
23611
+ /**
23612
+ * @private
23179
23613
  */
23180
23614
  _setEditingProps() {
23181
23615
  this.hoverCursor = 'text';
@@ -23187,8 +23621,8 @@
23187
23621
  this.lockMovementX = this.lockMovementY = true;
23188
23622
  }
23189
23623
 
23190
- /**
23191
- * convert from textarea to grapheme indexes
23624
+ /**
23625
+ * convert from textarea to grapheme indexes
23192
23626
  */
23193
23627
  fromStringToGraphemeSelection(start, end, text) {
23194
23628
  const smallerTextStart = text.slice(0, start),
@@ -23207,8 +23641,8 @@
23207
23641
  };
23208
23642
  }
23209
23643
 
23210
- /**
23211
- * convert from fabric to textarea values
23644
+ /**
23645
+ * convert from fabric to textarea values
23212
23646
  */
23213
23647
  fromGraphemeToStringSelection(start, end, graphemes) {
23214
23648
  const smallerTextStart = graphemes.slice(0, start),
@@ -23227,8 +23661,8 @@
23227
23661
  };
23228
23662
  }
23229
23663
 
23230
- /**
23231
- * @private
23664
+ /**
23665
+ * @private
23232
23666
  */
23233
23667
  _updateTextarea() {
23234
23668
  this.cursorOffsetCache = {};
@@ -23243,8 +23677,8 @@
23243
23677
  this.updateTextareaPosition();
23244
23678
  }
23245
23679
 
23246
- /**
23247
- * @private
23680
+ /**
23681
+ * @private
23248
23682
  */
23249
23683
  updateFromTextArea() {
23250
23684
  if (!this.hiddenTextarea) {
@@ -23264,8 +23698,8 @@
23264
23698
  this.updateTextareaPosition();
23265
23699
  }
23266
23700
 
23267
- /**
23268
- * @private
23701
+ /**
23702
+ * @private
23269
23703
  */
23270
23704
  updateTextareaPosition() {
23271
23705
  if (this.selectionStart === this.selectionEnd) {
@@ -23275,9 +23709,9 @@
23275
23709
  }
23276
23710
  }
23277
23711
 
23278
- /**
23279
- * @private
23280
- * @return {Object} style contains style for hiddenTextarea
23712
+ /**
23713
+ * @private
23714
+ * @return {Object} style contains style for hiddenTextarea
23281
23715
  */
23282
23716
  _calcTextareaPosition() {
23283
23717
  if (!this.canvas) {
@@ -23324,8 +23758,8 @@
23324
23758
  };
23325
23759
  }
23326
23760
 
23327
- /**
23328
- * @private
23761
+ /**
23762
+ * @private
23329
23763
  */
23330
23764
  _saveEditingProps() {
23331
23765
  this._savedProps = {
@@ -23342,8 +23776,8 @@
23342
23776
  };
23343
23777
  }
23344
23778
 
23345
- /**
23346
- * @private
23779
+ /**
23780
+ * @private
23347
23781
  */
23348
23782
  _restoreEditingProps() {
23349
23783
  if (!this._savedProps) {
@@ -23363,9 +23797,9 @@
23363
23797
  delete this._savedProps;
23364
23798
  }
23365
23799
 
23366
- /**
23367
- * runs the actual logic that exits from editing state, see {@link exitEditing}
23368
- * But it does not fire events
23800
+ /**
23801
+ * runs the actual logic that exits from editing state, see {@link exitEditing}
23802
+ * But it does not fire events
23369
23803
  */
23370
23804
  exitEditingImpl() {
23371
23805
  const hiddenTextarea = this.hiddenTextarea;
@@ -23386,8 +23820,8 @@
23386
23820
  }
23387
23821
  }
23388
23822
 
23389
- /**
23390
- * Exits from editing state and fires relevant events
23823
+ /**
23824
+ * Exits from editing state and fires relevant events
23391
23825
  */
23392
23826
  exitEditing() {
23393
23827
  const isTextChanged = this._textBeforeEdit !== this.text;
@@ -23406,8 +23840,8 @@
23406
23840
  return this;
23407
23841
  }
23408
23842
 
23409
- /**
23410
- * @private
23843
+ /**
23844
+ * @private
23411
23845
  */
23412
23846
  _removeExtraneousStyles() {
23413
23847
  for (const prop in this.styles) {
@@ -23417,10 +23851,10 @@
23417
23851
  }
23418
23852
  }
23419
23853
 
23420
- /**
23421
- * remove and reflow a style block from start to end.
23422
- * @param {Number} start linear start position for removal (included in removal)
23423
- * @param {Number} end linear end position for removal ( excluded from removal )
23854
+ /**
23855
+ * remove and reflow a style block from start to end.
23856
+ * @param {Number} start linear start position for removal (included in removal)
23857
+ * @param {Number} end linear end position for removal ( excluded from removal )
23424
23858
  */
23425
23859
  removeStyleFromTo(start, end) {
23426
23860
  const {
@@ -23473,10 +23907,10 @@
23473
23907
  }
23474
23908
  }
23475
23909
 
23476
- /**
23477
- * Shifts line styles up or down
23478
- * @param {Number} lineIndex Index of a line
23479
- * @param {Number} offset Can any number?
23910
+ /**
23911
+ * Shifts line styles up or down
23912
+ * @param {Number} lineIndex Index of a line
23913
+ * @param {Number} offset Can any number?
23480
23914
  */
23481
23915
  shiftLineStyles(lineIndex, offset) {
23482
23916
  const clonedStyles = Object.assign({}, this.styles);
@@ -23491,15 +23925,15 @@
23491
23925
  }
23492
23926
  }
23493
23927
 
23494
- /**
23495
- * Handle insertion of more consecutive style lines for when one or more
23496
- * newlines gets added to the text. Since current style needs to be shifted
23497
- * first we shift the current style of the number lines needed, then we add
23498
- * new lines from the last to the first.
23499
- * @param {Number} lineIndex Index of a line
23500
- * @param {Number} charIndex Index of a char
23501
- * @param {Number} qty number of lines to add
23502
- * @param {Array} copiedStyle Array of objects styles
23928
+ /**
23929
+ * Handle insertion of more consecutive style lines for when one or more
23930
+ * newlines gets added to the text. Since current style needs to be shifted
23931
+ * first we shift the current style of the number lines needed, then we add
23932
+ * new lines from the last to the first.
23933
+ * @param {Number} lineIndex Index of a line
23934
+ * @param {Number} charIndex Index of a char
23935
+ * @param {Number} qty number of lines to add
23936
+ * @param {Array} copiedStyle Array of objects styles
23503
23937
  */
23504
23938
  insertNewlineStyleObject(lineIndex, charIndex, qty, copiedStyle) {
23505
23939
  const newLineStyles = {};
@@ -23559,12 +23993,12 @@
23559
23993
  this._forceClearCache = true;
23560
23994
  }
23561
23995
 
23562
- /**
23563
- * Inserts style object for a given line/char index
23564
- * @param {Number} lineIndex Index of a line
23565
- * @param {Number} charIndex Index of a char
23566
- * @param {Number} quantity number Style object to insert, if given
23567
- * @param {Array} copiedStyle array of style objects
23996
+ /**
23997
+ * Inserts style object for a given line/char index
23998
+ * @param {Number} lineIndex Index of a line
23999
+ * @param {Number} charIndex Index of a char
24000
+ * @param {Number} quantity number Style object to insert, if given
24001
+ * @param {Array} copiedStyle array of style objects
23568
24002
  */
23569
24003
  insertCharStyleObject(lineIndex, charIndex, quantity, copiedStyle) {
23570
24004
  if (!this.styles) {
@@ -23613,11 +24047,11 @@
23613
24047
  }
23614
24048
  }
23615
24049
 
23616
- /**
23617
- * Inserts style object(s)
23618
- * @param {Array} insertedText Characters at the location where style is inserted
23619
- * @param {Number} start cursor index for inserting style
23620
- * @param {Array} [copiedStyle] array of style objects to insert.
24050
+ /**
24051
+ * Inserts style object(s)
24052
+ * @param {Array} insertedText Characters at the location where style is inserted
24053
+ * @param {Number} start cursor index for inserting style
24054
+ * @param {Array} [copiedStyle] array of style objects to insert.
23621
24055
  */
23622
24056
  insertNewStyleBlock(insertedText, start, copiedStyle) {
23623
24057
  const cursorLoc = this.get2DCursorLocation(start, true),
@@ -23658,12 +24092,12 @@
23658
24092
  }
23659
24093
  }
23660
24094
 
23661
- /**
23662
- * Removes characters from start/end
23663
- * start/end ar per grapheme position in _text array.
23664
- *
23665
- * @param {Number} start
23666
- * @param {Number} end default to start + 1
24095
+ /**
24096
+ * Removes characters from start/end
24097
+ * start/end ar per grapheme position in _text array.
24098
+ *
24099
+ * @param {Number} start
24100
+ * @param {Number} end default to start + 1
23667
24101
  */
23668
24102
  removeChars(start) {
23669
24103
  let end = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : start + 1;
@@ -23676,17 +24110,17 @@
23676
24110
  this._removeExtraneousStyles();
23677
24111
  }
23678
24112
 
23679
- /**
23680
- * insert characters at start position, before start position.
23681
- * start equal 1 it means the text get inserted between actual grapheme 0 and 1
23682
- * if style array is provided, it must be as the same length of text in graphemes
23683
- * if end is provided and is bigger than start, old text is replaced.
23684
- * start/end ar per grapheme position in _text array.
23685
- *
23686
- * @param {String} text text to insert
23687
- * @param {Array} style array of style objects
23688
- * @param {Number} start
23689
- * @param {Number} end default to start + 1
24113
+ /**
24114
+ * insert characters at start position, before start position.
24115
+ * start equal 1 it means the text get inserted between actual grapheme 0 and 1
24116
+ * if style array is provided, it must be as the same length of text in graphemes
24117
+ * if end is provided and is bigger than start, old text is replaced.
24118
+ * start/end ar per grapheme position in _text array.
24119
+ *
24120
+ * @param {String} text text to insert
24121
+ * @param {Array} style array of style objects
24122
+ * @param {Number} start
24123
+ * @param {Number} end default to start + 1
23690
24124
  */
23691
24125
  insertChars(text, style, start) {
23692
24126
  let end = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : start;
@@ -23703,9 +24137,9 @@
23703
24137
  this._removeExtraneousStyles();
23704
24138
  }
23705
24139
 
23706
- /**
23707
- * Set the selectionStart and selectionEnd according to the new position of cursor
23708
- * mimic the key - mouse navigation when shift is pressed.
24140
+ /**
24141
+ * Set the selectionStart and selectionEnd according to the new position of cursor
24142
+ * mimic the key - mouse navigation when shift is pressed.
23709
24143
  */
23710
24144
  setSelectionStartEndWithShift(start, end, newSelection) {
23711
24145
  if (newSelection <= start) {
@@ -24328,8 +24762,8 @@
24328
24762
  }
24329
24763
  }
24330
24764
 
24331
- /**
24332
- * `LEFT_CLICK === 0`
24765
+ /**
24766
+ * `LEFT_CLICK === 0`
24333
24767
  */
24334
24768
  const notALeftClick = e => !!e.button;
24335
24769
  class ITextClickBehavior extends ITextKeyBehavior {
@@ -24347,36 +24781,36 @@
24347
24781
  super.initBehavior();
24348
24782
  }
24349
24783
 
24350
- /**
24351
- * If this method returns true a mouse move operation over a text selection
24352
- * will not prevent the native mouse event allowing the browser to start a drag operation.
24353
- * shouldStartDragging can be read 'do not prevent default for mouse move event'
24354
- * To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
24355
- * @returns
24784
+ /**
24785
+ * If this method returns true a mouse move operation over a text selection
24786
+ * will not prevent the native mouse event allowing the browser to start a drag operation.
24787
+ * shouldStartDragging can be read 'do not prevent default for mouse move event'
24788
+ * To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
24789
+ * @returns
24356
24790
  */
24357
24791
  shouldStartDragging() {
24358
24792
  return this.draggableTextDelegate.isActive();
24359
24793
  }
24360
24794
 
24361
- /**
24362
- * @public override this method to control whether instance should/shouldn't become a drag source,
24363
- * @see also {@link DraggableTextDelegate#isActive}
24364
- * To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
24365
- * @returns {boolean} should handle event
24795
+ /**
24796
+ * @public override this method to control whether instance should/shouldn't become a drag source,
24797
+ * @see also {@link DraggableTextDelegate#isActive}
24798
+ * To prevent drag and drop between objects both shouldStartDragging and onDragStart should return false
24799
+ * @returns {boolean} should handle event
24366
24800
  */
24367
24801
  onDragStart(e) {
24368
24802
  return this.draggableTextDelegate.onDragStart(e);
24369
24803
  }
24370
24804
 
24371
- /**
24372
- * @public override this method to control whether instance should/shouldn't become a drop target
24805
+ /**
24806
+ * @public override this method to control whether instance should/shouldn't become a drop target
24373
24807
  */
24374
24808
  canDrop(e) {
24375
24809
  return this.draggableTextDelegate.canDrop(e);
24376
24810
  }
24377
24811
 
24378
- /**
24379
- * Default handler for double click, select a word or enter overlay editing
24812
+ /**
24813
+ * Default handler for double click, select a word or enter overlay editing
24380
24814
  */
24381
24815
  doubleClickHandler(options) {
24382
24816
  // Check if we should enter overlay editing mode
@@ -24393,8 +24827,8 @@
24393
24827
  this.renderCursorOrSelection();
24394
24828
  }
24395
24829
 
24396
- /**
24397
- * Default handler for triple click, select a line
24830
+ /**
24831
+ * Default handler for triple click, select a line
24398
24832
  */
24399
24833
  tripleClickHandler(options) {
24400
24834
  if (!this.isEditing) {
@@ -24404,13 +24838,13 @@
24404
24838
  this.renderCursorOrSelection();
24405
24839
  }
24406
24840
 
24407
- /**
24408
- * Default event handler for the basic functionalities needed on _mouseDown
24409
- * can be overridden to do something different.
24410
- * Scope of this implementation is: find the click position, set selectionStart
24411
- * find selectionEnd, initialize the drawing of either cursor or selection area
24412
- * initializing a mousedDown on a text area will cancel fabricjs knowledge of
24413
- * current compositionMode. It will be set to false.
24841
+ /**
24842
+ * Default event handler for the basic functionalities needed on _mouseDown
24843
+ * can be overridden to do something different.
24844
+ * Scope of this implementation is: find the click position, set selectionStart
24845
+ * find selectionEnd, initialize the drawing of either cursor or selection area
24846
+ * initializing a mousedDown on a text area will cancel fabricjs knowledge of
24847
+ * current compositionMode. It will be set to false.
24414
24848
  */
24415
24849
  _mouseDownHandler(_ref) {
24416
24850
  let {
@@ -24438,9 +24872,9 @@
24438
24872
  this.selected || (this.selected = alreadySelected || this.isEditing);
24439
24873
  }
24440
24874
 
24441
- /**
24442
- * standard handler for mouse up, overridable
24443
- * @private
24875
+ /**
24876
+ * standard handler for mouse up, overridable
24877
+ * @private
24444
24878
  */
24445
24879
  mouseUpHandler(_ref2) {
24446
24880
  let {
@@ -24471,9 +24905,9 @@
24471
24905
  }
24472
24906
  }
24473
24907
 
24474
- /**
24475
- * Changes cursor location in a text depending on passed pointer (x/y) object
24476
- * @param {TPointerEvent} e Event object
24908
+ /**
24909
+ * Changes cursor location in a text depending on passed pointer (x/y) object
24910
+ * @param {TPointerEvent} e Event object
24477
24911
  */
24478
24912
  setCursorByClick(e) {
24479
24913
  const newSelection = this.getSelectionStartFromPointer(e),
@@ -24491,10 +24925,10 @@
24491
24925
  }
24492
24926
  }
24493
24927
 
24494
- /**
24495
- * Returns index of a character corresponding to where an object was clicked
24496
- * @param {TPointerEvent} e Event object
24497
- * @return {Number} Index of a character
24928
+ /**
24929
+ * Returns index of a character corresponding to where an object was clicked
24930
+ * @param {TPointerEvent} e Event object
24931
+ * @return {Number} Index of a character
24498
24932
  */
24499
24933
  getSelectionStartFromPointer(e) {
24500
24934
  const mouseOffset = this.canvas.getScenePoint(e).transform(invertTransform(this.calcTransformMatrix())).add(new Point(-this._getLeftOffset(), -this._getTopOffset()));
@@ -24540,15 +24974,15 @@
24540
24974
  }
24541
24975
  }
24542
24976
 
24543
- /**
24544
- * Hit Testing and Cursor Positioning System
24545
- *
24546
- * Maps pointer coordinates to text positions and provides cursor rectangles
24547
- * for interactive text editing with grapheme-aware boundaries.
24977
+ /**
24978
+ * Hit Testing and Cursor Positioning System
24979
+ *
24980
+ * Maps pointer coordinates to text positions and provides cursor rectangles
24981
+ * for interactive text editing with grapheme-aware boundaries.
24548
24982
  */
24549
24983
 
24550
- /**
24551
- * Hit test a point against laid out text to find insertion position
24984
+ /**
24985
+ * Hit test a point against laid out text to find insertion position
24552
24986
  */
24553
24987
  function hitTest(x, y, layout, options) {
24554
24988
  if (layout.lines.length === 0) {
@@ -24592,8 +25026,8 @@
24592
25026
  };
24593
25027
  }
24594
25028
 
24595
- /**
24596
- * Get cursor rectangle for a given insertion index
25029
+ /**
25030
+ * Get cursor rectangle for a given insertion index
24597
25031
  */
24598
25032
  function getCursorRect(insertionIndex, layout, options) {
24599
25033
  if (layout.lines.length === 0) {
@@ -24640,8 +25074,8 @@
24640
25074
 
24641
25075
  // Private helper functions
24642
25076
 
24643
- /**
24644
- * Find which line contains the given Y coordinate
25077
+ /**
25078
+ * Find which line contains the given Y coordinate
24645
25079
  */
24646
25080
  function findLineAtY(y, lines) {
24647
25081
  var _lines;
@@ -24664,8 +25098,8 @@
24664
25098
  };
24665
25099
  }
24666
25100
 
24667
- /**
24668
- * Find character position within a line at given X coordinate
25101
+ /**
25102
+ * Find character position within a line at given X coordinate
24669
25103
  */
24670
25104
  function findCharAtX(x, line, options) {
24671
25105
  if (line.bounds.length === 0) {
@@ -24771,8 +25205,8 @@
24771
25205
  };
24772
25206
  }
24773
25207
 
24774
- /**
24775
- * Calculate total insertion index from line and character indices
25208
+ /**
25209
+ * Calculate total insertion index from line and character indices
24776
25210
  */
24777
25211
  function calculateInsertionIndex(lineIndex, graphemeIndex, layout) {
24778
25212
  let insertionIndex = 0;
@@ -24791,8 +25225,8 @@
24791
25225
  return insertionIndex;
24792
25226
  }
24793
25227
 
24794
- /**
24795
- * Find line and grapheme position from insertion index
25228
+ /**
25229
+ * Find line and grapheme position from insertion index
24796
25230
  */
24797
25231
  function findPositionFromIndex(insertionIndex, layout) {
24798
25232
  let currentIndex = 0;
@@ -24834,8 +25268,8 @@
24834
25268
  };
24835
25269
  }
24836
25270
 
24837
- /**
24838
- * Calculate Y position of a line
25271
+ /**
25272
+ * Calculate Y position of a line
24839
25273
  */
24840
25274
  function calculateLineY(lineIndex, layout, options) {
24841
25275
  let y = 0;
@@ -24938,48 +25372,48 @@
24938
25372
 
24939
25373
  // @TODO this is not complete
24940
25374
 
24941
- /**
24942
- * @fires changed
24943
- * @fires selection:changed
24944
- * @fires editing:entered
24945
- * @fires editing:exited
24946
- * @fires dragstart
24947
- * @fires drag drag event firing on the drag source
24948
- * @fires dragend
24949
- * @fires copy
24950
- * @fires cut
24951
- * @fires paste
24952
- *
24953
- * #### Supported key combinations
24954
- * ```
24955
- * Move cursor: left, right, up, down
24956
- * Select character: shift + left, shift + right
24957
- * Select text vertically: shift + up, shift + down
24958
- * Move cursor by word: alt + left, alt + right
24959
- * Select words: shift + alt + left, shift + alt + right
24960
- * Move cursor to line start/end: cmd + left, cmd + right or home, end
24961
- * Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
24962
- * Jump to start/end of text: cmd + up, cmd + down
24963
- * Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
24964
- * Delete character: backspace
24965
- * Delete word: alt + backspace
24966
- * Delete line: cmd + backspace
24967
- * Forward delete: delete
24968
- * Copy text: ctrl/cmd + c
24969
- * Paste text: ctrl/cmd + v
24970
- * Cut text: ctrl/cmd + x
24971
- * Select entire text: ctrl/cmd + a
24972
- * Quit editing tab or esc
24973
- * ```
24974
- *
24975
- * #### Supported mouse/touch combination
24976
- * ```
24977
- * Position cursor: click/touch
24978
- * Create selection: click/touch & drag
24979
- * Create selection: click & shift + click
24980
- * Select word: double click
24981
- * Select line: triple click
24982
- * ```
25375
+ /**
25376
+ * @fires changed
25377
+ * @fires selection:changed
25378
+ * @fires editing:entered
25379
+ * @fires editing:exited
25380
+ * @fires dragstart
25381
+ * @fires drag drag event firing on the drag source
25382
+ * @fires dragend
25383
+ * @fires copy
25384
+ * @fires cut
25385
+ * @fires paste
25386
+ *
25387
+ * #### Supported key combinations
25388
+ * ```
25389
+ * Move cursor: left, right, up, down
25390
+ * Select character: shift + left, shift + right
25391
+ * Select text vertically: shift + up, shift + down
25392
+ * Move cursor by word: alt + left, alt + right
25393
+ * Select words: shift + alt + left, shift + alt + right
25394
+ * Move cursor to line start/end: cmd + left, cmd + right or home, end
25395
+ * Select till start/end of line: cmd + shift + left, cmd + shift + right or shift + home, shift + end
25396
+ * Jump to start/end of text: cmd + up, cmd + down
25397
+ * Select till start/end of text: cmd + shift + up, cmd + shift + down or shift + pgUp, shift + pgDown
25398
+ * Delete character: backspace
25399
+ * Delete word: alt + backspace
25400
+ * Delete line: cmd + backspace
25401
+ * Forward delete: delete
25402
+ * Copy text: ctrl/cmd + c
25403
+ * Paste text: ctrl/cmd + v
25404
+ * Cut text: ctrl/cmd + x
25405
+ * Select entire text: ctrl/cmd + a
25406
+ * Quit editing tab or esc
25407
+ * ```
25408
+ *
25409
+ * #### Supported mouse/touch combination
25410
+ * ```
25411
+ * Position cursor: click/touch
25412
+ * Create selection: click/touch & drag
25413
+ * Create selection: click & shift + click
25414
+ * Select word: double click
25415
+ * Select line: triple click
25416
+ * ```
24983
25417
  */
24984
25418
  class IText extends ITextClickBehavior {
24985
25419
  static getDefaults() {
@@ -24994,10 +25428,10 @@
24994
25428
  return type === 'itext' ? 'i-text' : type;
24995
25429
  }
24996
25430
 
24997
- /**
24998
- * Constructor
24999
- * @param {String} text Text string
25000
- * @param {Object} [options] Options object
25431
+ /**
25432
+ * Constructor
25433
+ * @param {String} text Text string
25434
+ * @param {Object} [options] Options object
25001
25435
  */
25002
25436
  constructor(text, options) {
25003
25437
  super(text, {
@@ -25007,11 +25441,11 @@
25007
25441
  this.initBehavior();
25008
25442
  }
25009
25443
 
25010
- /**
25011
- * While editing handle differently
25012
- * @private
25013
- * @param {string} key
25014
- * @param {*} value
25444
+ /**
25445
+ * While editing handle differently
25446
+ * @private
25447
+ * @param {string} key
25448
+ * @param {*} value
25015
25449
  */
25016
25450
  _set(key, value) {
25017
25451
  if (this.isEditing && this._savedProps && key in this._savedProps) {
@@ -25026,28 +25460,28 @@
25026
25460
  return super._set(key, value);
25027
25461
  }
25028
25462
 
25029
- /**
25030
- * Sets selection start (left boundary of a selection)
25031
- * @param {Number} index Index to set selection start to
25463
+ /**
25464
+ * Sets selection start (left boundary of a selection)
25465
+ * @param {Number} index Index to set selection start to
25032
25466
  */
25033
25467
  setSelectionStart(index) {
25034
25468
  index = Math.max(index, 0);
25035
25469
  this._updateAndFire('selectionStart', index);
25036
25470
  }
25037
25471
 
25038
- /**
25039
- * Sets selection end (right boundary of a selection)
25040
- * @param {Number} index Index to set selection end to
25472
+ /**
25473
+ * Sets selection end (right boundary of a selection)
25474
+ * @param {Number} index Index to set selection end to
25041
25475
  */
25042
25476
  setSelectionEnd(index) {
25043
25477
  index = Math.min(index, this.text.length);
25044
25478
  this._updateAndFire('selectionEnd', index);
25045
25479
  }
25046
25480
 
25047
- /**
25048
- * @private
25049
- * @param {String} property 'selectionStart' or 'selectionEnd'
25050
- * @param {Number} index new position of property
25481
+ /**
25482
+ * @private
25483
+ * @param {String} property 'selectionStart' or 'selectionEnd'
25484
+ * @param {Number} index new position of property
25051
25485
  */
25052
25486
  _updateAndFire(property, index) {
25053
25487
  if (this[property] !== index) {
@@ -25057,9 +25491,9 @@
25057
25491
  this._updateTextarea();
25058
25492
  }
25059
25493
 
25060
- /**
25061
- * Fires the even of selection changed
25062
- * @private
25494
+ /**
25495
+ * Fires the even of selection changed
25496
+ * @private
25063
25497
  */
25064
25498
  _fireSelectionChanged() {
25065
25499
  this.fire('selection:changed');
@@ -25068,25 +25502,25 @@
25068
25502
  });
25069
25503
  }
25070
25504
 
25071
- /**
25072
- * Initialize text dimensions. Render all text on given context
25073
- * or on a offscreen canvas to get the text width with measureText.
25074
- * Updates this.width and this.height with the proper values.
25075
- * Does not return dimensions.
25076
- * @private
25505
+ /**
25506
+ * Initialize text dimensions. Render all text on given context
25507
+ * or on a offscreen canvas to get the text width with measureText.
25508
+ * Updates this.width and this.height with the proper values.
25509
+ * Does not return dimensions.
25510
+ * @private
25077
25511
  */
25078
25512
  initDimensions() {
25079
25513
  this.isEditing && this.initDelayedCursor();
25080
25514
  super.initDimensions();
25081
25515
  }
25082
25516
 
25083
- /**
25084
- * Gets style of a current selection/cursor (at the start position)
25085
- * if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
25086
- * @param {Number} startIndex Start index to get styles at
25087
- * @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
25088
- * @param {Boolean} [complete] get full style or not
25089
- * @return {Array} styles an array with one, zero or more Style objects
25517
+ /**
25518
+ * Gets style of a current selection/cursor (at the start position)
25519
+ * if startIndex or endIndex are not provided, selectionStart or selectionEnd will be used.
25520
+ * @param {Number} startIndex Start index to get styles at
25521
+ * @param {Number} endIndex End index to get styles at, if not specified selectionEnd or startIndex + 1
25522
+ * @param {Boolean} [complete] get full style or not
25523
+ * @return {Array} styles an array with one, zero or more Style objects
25090
25524
  */
25091
25525
  getSelectionStyles() {
25092
25526
  let startIndex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart || 0;
@@ -25095,11 +25529,11 @@
25095
25529
  return super.getSelectionStyles(startIndex, endIndex, complete);
25096
25530
  }
25097
25531
 
25098
- /**
25099
- * Sets style of a current selection, if no selection exist, do not set anything.
25100
- * @param {Object} [styles] Styles object
25101
- * @param {Number} [startIndex] Start index to get styles at
25102
- * @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
25532
+ /**
25533
+ * Sets style of a current selection, if no selection exist, do not set anything.
25534
+ * @param {Object} [styles] Styles object
25535
+ * @param {Number} [startIndex] Start index to get styles at
25536
+ * @param {Number} [endIndex] End index to get styles at, if not specified selectionEnd or startIndex + 1
25103
25537
  */
25104
25538
  setSelectionStyles(styles) {
25105
25539
  let startIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.selectionStart || 0;
@@ -25107,10 +25541,10 @@
25107
25541
  return super.setSelectionStyles(styles, startIndex, endIndex);
25108
25542
  }
25109
25543
 
25110
- /**
25111
- * Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
25112
- * @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
25113
- * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
25544
+ /**
25545
+ * Returns 2d representation (lineIndex and charIndex) of cursor (or selection start)
25546
+ * @param {Number} [selectionStart] Optional index. When not given, current selectionStart is used.
25547
+ * @param {Boolean} [skipWrapping] consider the location for unwrapped lines. useful to manage styles.
25114
25548
  */
25115
25549
  get2DCursorLocation() {
25116
25550
  let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
@@ -25118,9 +25552,9 @@
25118
25552
  return super.get2DCursorLocation(selectionStart, skipWrapping);
25119
25553
  }
25120
25554
 
25121
- /**
25122
- * @private
25123
- * @param {CanvasRenderingContext2D} ctx Context to render on
25555
+ /**
25556
+ * @private
25557
+ * @param {CanvasRenderingContext2D} ctx Context to render on
25124
25558
  */
25125
25559
  render(ctx) {
25126
25560
  super.render(ctx);
@@ -25130,9 +25564,9 @@
25130
25564
  this.renderCursorOrSelection();
25131
25565
  }
25132
25566
 
25133
- /**
25134
- * @override block cursor/selection logic while rendering the exported canvas
25135
- * @todo this workaround should be replaced with a more robust solution
25567
+ /**
25568
+ * @override block cursor/selection logic while rendering the exported canvas
25569
+ * @todo this workaround should be replaced with a more robust solution
25136
25570
  */
25137
25571
  toCanvasElement(options) {
25138
25572
  const isEditing = this.isEditing;
@@ -25142,9 +25576,9 @@
25142
25576
  return canvas;
25143
25577
  }
25144
25578
 
25145
- /**
25146
- * Renders cursor or selection (depending on what exists)
25147
- * it does on the contextTop. If contextTop is not available, do nothing.
25579
+ /**
25580
+ * Renders cursor or selection (depending on what exists)
25581
+ * it does on the contextTop. If contextTop is not available, do nothing.
25148
25582
  */
25149
25583
  renderCursorOrSelection() {
25150
25584
  if (!this.isEditing || !this.canvas) {
@@ -25200,12 +25634,12 @@
25200
25634
  ctx.restore();
25201
25635
  }
25202
25636
 
25203
- /**
25204
- * Finds and returns an array of clip paths that are applied to the parent
25205
- * group(s) of the current FabricObject instance. The object's hierarchy is
25206
- * traversed upwards (from the current object towards the root of the canvas),
25207
- * checking each parent object for the presence of a `clipPath` that is not
25208
- * absolutely positioned.
25637
+ /**
25638
+ * Finds and returns an array of clip paths that are applied to the parent
25639
+ * group(s) of the current FabricObject instance. The object's hierarchy is
25640
+ * traversed upwards (from the current object towards the root of the canvas),
25641
+ * checking each parent object for the presence of a `clipPath` that is not
25642
+ * absolutely positioned.
25209
25643
  */
25210
25644
  findAncestorsWithClipPath() {
25211
25645
  const clipPathAncestors = [];
@@ -25220,13 +25654,13 @@
25220
25654
  return clipPathAncestors;
25221
25655
  }
25222
25656
 
25223
- /**
25224
- * Returns cursor boundaries (left, top, leftOffset, topOffset)
25225
- * left/top are left/top of entire text box
25226
- * leftOffset/topOffset are offset from that left/top point of a text box
25227
- * @private
25228
- * @param {number} [index] index from start
25229
- * @param {boolean} [skipCaching]
25657
+ /**
25658
+ * Returns cursor boundaries (left, top, leftOffset, topOffset)
25659
+ * left/top are left/top of entire text box
25660
+ * leftOffset/topOffset are offset from that left/top point of a text box
25661
+ * @private
25662
+ * @param {number} [index] index from start
25663
+ * @param {boolean} [skipCaching]
25230
25664
  */
25231
25665
  _getCursorBoundaries() {
25232
25666
  let index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
@@ -25240,11 +25674,11 @@
25240
25674
  return this._getCursorBoundariesOriginal(index, skipCaching);
25241
25675
  }
25242
25676
 
25243
- /**
25244
- * Caches and returns cursor left/top offset relative to instance's center point
25245
- * @private
25246
- * @param {number} index index from start
25247
- * @param {boolean} [skipCaching]
25677
+ /**
25678
+ * Caches and returns cursor left/top offset relative to instance's center point
25679
+ * @private
25680
+ * @param {number} index index from start
25681
+ * @param {boolean} [skipCaching]
25248
25682
  */
25249
25683
  _getCursorBoundariesOffsets(index, skipCaching) {
25250
25684
  if (skipCaching) {
@@ -25256,9 +25690,9 @@
25256
25690
  return this.cursorOffsetCache = this.__getCursorBoundariesOffsets(index);
25257
25691
  }
25258
25692
 
25259
- /**
25260
- * Enhanced cursor boundaries using advanced hit testing when available
25261
- * @private
25693
+ /**
25694
+ * Enhanced cursor boundaries using advanced hit testing when available
25695
+ * @private
25262
25696
  */
25263
25697
  _getCursorBoundariesAdvanced(index) {
25264
25698
  if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
@@ -25274,9 +25708,9 @@
25274
25708
  };
25275
25709
  }
25276
25710
 
25277
- /**
25278
- * Enhanced selection start from pointer using BiDi-aware hit testing
25279
- * @override
25711
+ /**
25712
+ * Enhanced selection start from pointer using BiDi-aware hit testing
25713
+ * @override
25280
25714
  */
25281
25715
  getSelectionStartFromPointer(e) {
25282
25716
  if (!this.enableAdvancedLayout || !this._layoutTextAdvanced) {
@@ -25290,9 +25724,9 @@
25290
25724
  return Math.min(hitResult.charIndex, this._text.length);
25291
25725
  }
25292
25726
 
25293
- /**
25294
- * Original cursor boundaries implementation
25295
- * @private
25727
+ /**
25728
+ * Original cursor boundaries implementation
25729
+ * @private
25296
25730
  */
25297
25731
  _getCursorBoundariesOriginal(index, skipCaching) {
25298
25732
  const left = this._getLeftOffset(),
@@ -25306,10 +25740,10 @@
25306
25740
  };
25307
25741
  }
25308
25742
 
25309
- /**
25310
- * Calculates cursor left/top offset relative to instance's center point
25311
- * @private
25312
- * @param {number} index index from start
25743
+ /**
25744
+ * Calculates cursor left/top offset relative to instance's center point
25745
+ * @private
25746
+ * @param {number} index index from start
25313
25747
  */
25314
25748
  __getCursorBoundariesOffsets(index) {
25315
25749
  let topOffset = 0,
@@ -25343,29 +25777,29 @@
25343
25777
  return boundaries;
25344
25778
  }
25345
25779
 
25346
- /**
25347
- * Renders cursor on context Top, outside the animation cycle, on request
25348
- * Used for the drag/drop effect.
25349
- * If contextTop is not available, do nothing.
25780
+ /**
25781
+ * Renders cursor on context Top, outside the animation cycle, on request
25782
+ * Used for the drag/drop effect.
25783
+ * If contextTop is not available, do nothing.
25350
25784
  */
25351
25785
  renderCursorAt(selectionStart) {
25352
25786
  this._renderCursor(this.canvas.contextTop, this._getCursorBoundaries(selectionStart, true), selectionStart);
25353
25787
  }
25354
25788
 
25355
- /**
25356
- * Renders cursor
25357
- * @param {Object} boundaries
25358
- * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25789
+ /**
25790
+ * Renders cursor
25791
+ * @param {Object} boundaries
25792
+ * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25359
25793
  */
25360
25794
  renderCursor(ctx, boundaries) {
25361
25795
  this._renderCursor(ctx, boundaries, this.selectionStart);
25362
25796
  }
25363
25797
 
25364
- /**
25365
- * Return the data needed to render the cursor for given selection start
25366
- * The left,top are relative to the object, while width and height are prescaled
25367
- * to look think with canvas zoom and object scaling,
25368
- * so they depend on canvas and object scaling
25798
+ /**
25799
+ * Return the data needed to render the cursor for given selection start
25800
+ * The left,top are relative to the object, while width and height are prescaled
25801
+ * to look think with canvas zoom and object scaling,
25802
+ * so they depend on canvas and object scaling
25369
25803
  */
25370
25804
  getCursorRenderingData() {
25371
25805
  let selectionStart = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.selectionStart;
@@ -25388,9 +25822,9 @@
25388
25822
  };
25389
25823
  }
25390
25824
 
25391
- /**
25392
- * Render the cursor at the given selectionStart.
25393
- * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25825
+ /**
25826
+ * Render the cursor at the given selectionStart.
25827
+ * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25394
25828
  */
25395
25829
  _renderCursor(ctx, boundaries, selectionStart) {
25396
25830
  const {
@@ -25406,10 +25840,10 @@
25406
25840
  ctx.fillRect(left, top, width, height);
25407
25841
  }
25408
25842
 
25409
- /**
25410
- * Renders text selection
25411
- * @param {Object} boundaries Object with left/top/leftOffset/topOffset
25412
- * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25843
+ /**
25844
+ * Renders text selection
25845
+ * @param {Object} boundaries Object with left/top/leftOffset/topOffset
25846
+ * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25413
25847
  */
25414
25848
  renderSelection(ctx, boundaries) {
25415
25849
  const selection = {
@@ -25419,8 +25853,8 @@
25419
25853
  this._renderSelection(ctx, selection, boundaries);
25420
25854
  }
25421
25855
 
25422
- /**
25423
- * Renders drag start text selection
25856
+ /**
25857
+ * Renders drag start text selection
25424
25858
  */
25425
25859
  renderDragSourceEffect() {
25426
25860
  const dragStartSelection = this.draggableTextDelegate.getDragStartSelection();
@@ -25431,12 +25865,12 @@
25431
25865
  this.renderCursorAt(dragSelection);
25432
25866
  }
25433
25867
 
25434
- /**
25435
- * Renders text selection
25436
- * @private
25437
- * @param {{ selectionStart: number, selectionEnd: number }} selection
25438
- * @param {Object} boundaries Object with left/top/leftOffset/topOffset
25439
- * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25868
+ /**
25869
+ * Renders text selection
25870
+ * @private
25871
+ * @param {{ selectionStart: number, selectionEnd: number }} selection
25872
+ * @param {Object} boundaries Object with left/top/leftOffset/topOffset
25873
+ * @param {CanvasRenderingContext2D} ctx transformed context to draw on
25440
25874
  */
25441
25875
  _renderSelection(ctx, selection, boundaries) {
25442
25876
  const selectionStart = selection.selectionStart,
@@ -25498,34 +25932,34 @@
25498
25932
  }
25499
25933
  }
25500
25934
 
25501
- /**
25502
- * High level function to know the height of the cursor.
25503
- * the currentChar is the one that precedes the cursor
25504
- * Returns fontSize of char at the current cursor
25505
- * Unused from the library, is for the end user
25506
- * @return {Number} Character font size
25935
+ /**
25936
+ * High level function to know the height of the cursor.
25937
+ * the currentChar is the one that precedes the cursor
25938
+ * Returns fontSize of char at the current cursor
25939
+ * Unused from the library, is for the end user
25940
+ * @return {Number} Character font size
25507
25941
  */
25508
25942
  getCurrentCharFontSize() {
25509
25943
  const cp = this._getCurrentCharIndex();
25510
25944
  return this.getValueOfPropertyAt(cp.l, cp.c, 'fontSize');
25511
25945
  }
25512
25946
 
25513
- /**
25514
- * High level function to know the color of the cursor.
25515
- * the currentChar is the one that precedes the cursor
25516
- * Returns color (fill) of char at the current cursor
25517
- * if the text object has a pattern or gradient for filler, it will return that.
25518
- * Unused by the library, is for the end user
25519
- * @return {String | TFiller} Character color (fill)
25947
+ /**
25948
+ * High level function to know the color of the cursor.
25949
+ * the currentChar is the one that precedes the cursor
25950
+ * Returns color (fill) of char at the current cursor
25951
+ * if the text object has a pattern or gradient for filler, it will return that.
25952
+ * Unused by the library, is for the end user
25953
+ * @return {String | TFiller} Character color (fill)
25520
25954
  */
25521
25955
  getCurrentCharColor() {
25522
25956
  const cp = this._getCurrentCharIndex();
25523
25957
  return this.getValueOfPropertyAt(cp.l, cp.c, FILL);
25524
25958
  }
25525
25959
 
25526
- /**
25527
- * Returns the cursor position for the getCurrent.. functions
25528
- * @private
25960
+ /**
25961
+ * Returns the cursor position for the getCurrent.. functions
25962
+ * @private
25529
25963
  */
25530
25964
  _getCurrentCharIndex() {
25531
25965
  const cursorPosition = this.get2DCursorLocation(this.selectionStart, true),
@@ -25541,52 +25975,52 @@
25541
25975
  super.dispose();
25542
25976
  }
25543
25977
  }
25544
- /**
25545
- * Index where text selection starts (or where cursor is when there is no selection)
25546
- * @type Number
25978
+ /**
25979
+ * Index where text selection starts (or where cursor is when there is no selection)
25980
+ * @type Number
25547
25981
  */
25548
- /**
25549
- * Index where text selection ends
25550
- * @type Number
25982
+ /**
25983
+ * Index where text selection ends
25984
+ * @type Number
25551
25985
  */
25552
- /**
25553
- * Color of text selection
25554
- * @type String
25986
+ /**
25987
+ * Color of text selection
25988
+ * @type String
25555
25989
  */
25556
- /**
25557
- * Indicates whether text is in editing mode
25558
- * @type Boolean
25990
+ /**
25991
+ * Indicates whether text is in editing mode
25992
+ * @type Boolean
25559
25993
  */
25560
- /**
25561
- * Indicates whether a text can be edited
25562
- * @type Boolean
25994
+ /**
25995
+ * Indicates whether a text can be edited
25996
+ * @type Boolean
25563
25997
  */
25564
- /**
25565
- * Border color of text object while it's in editing mode
25566
- * @type String
25998
+ /**
25999
+ * Border color of text object while it's in editing mode
26000
+ * @type String
25567
26001
  */
25568
- /**
25569
- * Width of cursor (in px)
25570
- * @type Number
26002
+ /**
26003
+ * Width of cursor (in px)
26004
+ * @type Number
25571
26005
  */
25572
- /**
25573
- * Color of text cursor color in editing mode.
25574
- * if not set (default) will take color from the text.
25575
- * if set to a color value that fabric can understand, it will
25576
- * be used instead of the color of the text at the current position.
25577
- * @type String
26006
+ /**
26007
+ * Color of text cursor color in editing mode.
26008
+ * if not set (default) will take color from the text.
26009
+ * if set to a color value that fabric can understand, it will
26010
+ * be used instead of the color of the text at the current position.
26011
+ * @type String
25578
26012
  */
25579
- /**
25580
- * Delay between cursor blink (in ms)
25581
- * @type Number
26013
+ /**
26014
+ * Delay between cursor blink (in ms)
26015
+ * @type Number
25582
26016
  */
25583
- /**
25584
- * Duration of cursor fade in (in ms)
25585
- * @type Number
26017
+ /**
26018
+ * Duration of cursor fade in (in ms)
26019
+ * @type Number
25586
26020
  */
25587
- /**
25588
- * Indicates whether internal text char widths can be cached
25589
- * @type Boolean
26021
+ /**
26022
+ * Indicates whether internal text char widths can be cached
26023
+ * @type Boolean
25590
26024
  */
25591
26025
  _defineProperty(IText, "ownDefaults", iTextDefaultValues);
25592
26026
  _defineProperty(IText, "type", 'IText');
@@ -25608,11 +26042,11 @@
25608
26042
 
25609
26043
  // @TODO this is not complete
25610
26044
 
25611
- /**
25612
- * Textbox class, based on IText, allows the user to resize the text rectangle
25613
- * and wraps lines automatically. Textboxes have their Y scaling locked, the
25614
- * user can only change width. Height is adjusted automatically based on the
25615
- * wrapping of lines.
26045
+ /**
26046
+ * Textbox class, based on IText, allows the user to resize the text rectangle
26047
+ * and wraps lines automatically. Textboxes have their Y scaling locked, the
26048
+ * user can only change width. Height is adjusted automatically based on the
26049
+ * wrapping of lines.
25616
26050
  */
25617
26051
  class Textbox extends IText {
25618
26052
  static getDefaults() {
@@ -25622,10 +26056,10 @@
25622
26056
  };
25623
26057
  }
25624
26058
 
25625
- /**
25626
- * Constructor
25627
- * @param {String} text Text string
25628
- * @param {Object} [options] Options object
26059
+ /**
26060
+ * Constructor
26061
+ * @param {String} text Text string
26062
+ * @param {Object} [options] Options object
25629
26063
  */
25630
26064
  constructor(text, options) {
25631
26065
  super(text, {
@@ -25635,10 +26069,10 @@
25635
26069
  this.initializeEventListeners();
25636
26070
  }
25637
26071
 
25638
- /**
25639
- * Creates the default control object.
25640
- * If you prefer to have on instance of controls shared among all objects
25641
- * make this function return an empty object and add controls to the ownDefaults object
26072
+ /**
26073
+ * Creates the default control object.
26074
+ * If you prefer to have on instance of controls shared among all objects
26075
+ * make this function return an empty object and add controls to the ownDefaults object
25642
26076
  */
25643
26077
  static createControls() {
25644
26078
  return {
@@ -25646,11 +26080,11 @@
25646
26080
  };
25647
26081
  }
25648
26082
 
25649
- /**
25650
- * Unlike superclass's version of this function, Textbox does not update
25651
- * its width.
25652
- * @private
25653
- * @override
26083
+ /**
26084
+ * Unlike superclass's version of this function, Textbox does not update
26085
+ * its width.
26086
+ * @private
26087
+ * @override
25654
26088
  */
25655
26089
  initDimensions() {
25656
26090
  if (!this.initialized) {
@@ -25679,9 +26113,9 @@
25679
26113
  this.height = this.calcTextHeight();
25680
26114
  }
25681
26115
 
25682
- /**
25683
- * Advanced dimensions calculation using new layout engine
25684
- * @private
26116
+ /**
26117
+ * Advanced dimensions calculation using new layout engine
26118
+ * @private
25685
26119
  */
25686
26120
  initDimensionsAdvanced() {
25687
26121
  if (!this.initialized) {
@@ -25736,9 +26170,9 @@
25736
26170
  this.dirty = true;
25737
26171
  }
25738
26172
 
25739
- /**
25740
- * Generate style map from new layout format
25741
- * @private
26173
+ /**
26174
+ * Generate style map from new layout format
26175
+ * @private
25742
26176
  */
25743
26177
  _generateStyleMapFromLayout(layout) {
25744
26178
  const map = {};
@@ -25760,12 +26194,12 @@
25760
26194
  return map;
25761
26195
  }
25762
26196
 
25763
- /**
25764
- * Generate an object that translates the style object so that it is
25765
- * broken up by visual lines (new lines and automatic wrapping).
25766
- * The original text styles object is broken up by actual lines (new lines only),
25767
- * which is only sufficient for Text / IText
25768
- * @private
26197
+ /**
26198
+ * Generate an object that translates the style object so that it is
26199
+ * broken up by visual lines (new lines and automatic wrapping).
26200
+ * The original text styles object is broken up by actual lines (new lines only),
26201
+ * which is only sufficient for Text / IText
26202
+ * @private
25769
26203
  */
25770
26204
  _generateStyleMap(textInfo) {
25771
26205
  let realLineCount = 0,
@@ -25792,10 +26226,10 @@
25792
26226
  return map;
25793
26227
  }
25794
26228
 
25795
- /**
25796
- * Returns true if object has a style property or has it on a specified line
25797
- * @param {Number} lineIndex
25798
- * @return {Boolean}
26229
+ /**
26230
+ * Returns true if object has a style property or has it on a specified line
26231
+ * @param {Number} lineIndex
26232
+ * @return {Boolean}
25799
26233
  */
25800
26234
  styleHas(property, lineIndex) {
25801
26235
  if (this._styleMap && !this.isWrapping) {
@@ -25807,10 +26241,10 @@
25807
26241
  return super.styleHas(property, lineIndex);
25808
26242
  }
25809
26243
 
25810
- /**
25811
- * Returns true if object has no styling or no styling in a line
25812
- * @param {Number} lineIndex , lineIndex is on wrapped lines.
25813
- * @return {Boolean}
26244
+ /**
26245
+ * Returns true if object has no styling or no styling in a line
26246
+ * @param {Number} lineIndex , lineIndex is on wrapped lines.
26247
+ * @return {Boolean}
25814
26248
  */
25815
26249
  isEmptyStyles(lineIndex) {
25816
26250
  if (!this.styles) {
@@ -25847,11 +26281,11 @@
25847
26281
  return true;
25848
26282
  }
25849
26283
 
25850
- /**
25851
- * @protected
25852
- * @param {Number} lineIndex
25853
- * @param {Number} charIndex
25854
- * @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
26284
+ /**
26285
+ * @protected
26286
+ * @param {Number} lineIndex
26287
+ * @param {Number} charIndex
26288
+ * @return {TextStyleDeclaration} a style object reference to the existing one or a new empty object when undefined
25855
26289
  */
25856
26290
  _getStyleDeclaration(lineIndex, charIndex) {
25857
26291
  if (this._styleMap && !this.isWrapping) {
@@ -25865,59 +26299,59 @@
25865
26299
  return super._getStyleDeclaration(lineIndex, charIndex);
25866
26300
  }
25867
26301
 
25868
- /**
25869
- * @param {Number} lineIndex
25870
- * @param {Number} charIndex
25871
- * @param {Object} style
25872
- * @private
26302
+ /**
26303
+ * @param {Number} lineIndex
26304
+ * @param {Number} charIndex
26305
+ * @param {Object} style
26306
+ * @private
25873
26307
  */
25874
26308
  _setStyleDeclaration(lineIndex, charIndex, style) {
25875
26309
  const map = this._styleMap[lineIndex];
25876
26310
  super._setStyleDeclaration(map.line, map.offset + charIndex, style);
25877
26311
  }
25878
26312
 
25879
- /**
25880
- * @param {Number} lineIndex
25881
- * @param {Number} charIndex
25882
- * @private
26313
+ /**
26314
+ * @param {Number} lineIndex
26315
+ * @param {Number} charIndex
26316
+ * @private
25883
26317
  */
25884
26318
  _deleteStyleDeclaration(lineIndex, charIndex) {
25885
26319
  const map = this._styleMap[lineIndex];
25886
26320
  super._deleteStyleDeclaration(map.line, map.offset + charIndex);
25887
26321
  }
25888
26322
 
25889
- /**
25890
- * probably broken need a fix
25891
- * Returns the real style line that correspond to the wrapped lineIndex line
25892
- * Used just to verify if the line does exist or not.
25893
- * @param {Number} lineIndex
25894
- * @returns {Boolean} if the line exists or not
25895
- * @private
26323
+ /**
26324
+ * probably broken need a fix
26325
+ * Returns the real style line that correspond to the wrapped lineIndex line
26326
+ * Used just to verify if the line does exist or not.
26327
+ * @param {Number} lineIndex
26328
+ * @returns {Boolean} if the line exists or not
26329
+ * @private
25896
26330
  */
25897
26331
  _getLineStyle(lineIndex) {
25898
26332
  const map = this._styleMap[lineIndex];
25899
26333
  return !!this.styles[map.line];
25900
26334
  }
25901
26335
 
25902
- /**
25903
- * Set the line style to an empty object so that is initialized
25904
- * @param {Number} lineIndex
25905
- * @param {Object} style
25906
- * @private
26336
+ /**
26337
+ * Set the line style to an empty object so that is initialized
26338
+ * @param {Number} lineIndex
26339
+ * @param {Object} style
26340
+ * @private
25907
26341
  */
25908
26342
  _setLineStyle(lineIndex) {
25909
26343
  const map = this._styleMap[lineIndex];
25910
26344
  super._setLineStyle(map.line);
25911
26345
  }
25912
26346
 
25913
- /**
25914
- * Wraps text using the 'width' property of Textbox. First this function
25915
- * splits text on newlines, so we preserve newlines entered by the user.
25916
- * Then it wraps each line using the width of the Textbox by calling
25917
- * _wrapLine().
25918
- * @param {Array} lines The string array of text that is split into lines
25919
- * @param {Number} desiredWidth width you want to wrap to
25920
- * @returns {Array} Array of lines
26347
+ /**
26348
+ * Wraps text using the 'width' property of Textbox. First this function
26349
+ * splits text on newlines, so we preserve newlines entered by the user.
26350
+ * Then it wraps each line using the width of the Textbox by calling
26351
+ * _wrapLine().
26352
+ * @param {Array} lines The string array of text that is split into lines
26353
+ * @param {Number} desiredWidth width you want to wrap to
26354
+ * @returns {Array} Array of lines
25921
26355
  */
25922
26356
  _wrapText(lines, desiredWidth) {
25923
26357
  this.isWrapping = true;
@@ -25931,12 +26365,12 @@
25931
26365
  return wrapped;
25932
26366
  }
25933
26367
 
25934
- /**
25935
- * For each line of text terminated by an hard line stop,
25936
- * measure each word width and extract the largest word from all.
25937
- * The returned words here are the one that at the end will be rendered.
25938
- * @param {string[]} lines the lines we need to measure
25939
- *
26368
+ /**
26369
+ * For each line of text terminated by an hard line stop,
26370
+ * measure each word width and extract the largest word from all.
26371
+ * The returned words here are the one that at the end will be rendered.
26372
+ * @param {string[]} lines the lines we need to measure
26373
+ *
25940
26374
  */
25941
26375
  getGraphemeDataForRender(lines) {
25942
26376
  const splitByGrapheme = this.splitByGrapheme,
@@ -25969,17 +26403,17 @@
25969
26403
  };
25970
26404
  }
25971
26405
 
25972
- /**
25973
- * Helper function to measure a string of text, given its lineIndex and charIndex offset
25974
- * It gets called when charBounds are not available yet.
25975
- * Override if necessary
25976
- * Use with {@link Textbox#wordSplit}
25977
- *
25978
- * @param {CanvasRenderingContext2D} ctx
25979
- * @param {String} text
25980
- * @param {number} lineIndex
25981
- * @param {number} charOffset
25982
- * @returns {number}
26406
+ /**
26407
+ * Helper function to measure a string of text, given its lineIndex and charIndex offset
26408
+ * It gets called when charBounds are not available yet.
26409
+ * Override if necessary
26410
+ * Use with {@link Textbox#wordSplit}
26411
+ *
26412
+ * @param {CanvasRenderingContext2D} ctx
26413
+ * @param {String} text
26414
+ * @param {number} lineIndex
26415
+ * @param {number} charOffset
26416
+ * @returns {number}
25983
26417
  */
25984
26418
  _measureWord(word, lineIndex) {
25985
26419
  let charOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
@@ -25994,26 +26428,26 @@
25994
26428
  return width;
25995
26429
  }
25996
26430
 
25997
- /**
25998
- * Override this method to customize word splitting
25999
- * Use with {@link Textbox#_measureWord}
26000
- * @param {string} value
26001
- * @returns {string[]} array of words
26431
+ /**
26432
+ * Override this method to customize word splitting
26433
+ * Use with {@link Textbox#_measureWord}
26434
+ * @param {string} value
26435
+ * @returns {string[]} array of words
26002
26436
  */
26003
26437
  wordSplit(value) {
26004
26438
  return value.split(this._wordJoiners);
26005
26439
  }
26006
26440
 
26007
- /**
26008
- * Wraps a line of text using the width of the Textbox as desiredWidth
26009
- * and leveraging the known width o words from GraphemeData
26010
- * @private
26011
- * @param {Number} lineIndex
26012
- * @param {Number} desiredWidth width you want to wrap the line to
26013
- * @param {GraphemeData} graphemeData an object containing all the lines' words width.
26014
- * @param {Number} reservedSpace space to remove from wrapping for custom functionalities
26015
- * @returns {Array} Array of line(s) into which the given text is wrapped
26016
- * to.
26441
+ /**
26442
+ * Wraps a line of text using the width of the Textbox as desiredWidth
26443
+ * and leveraging the known width o words from GraphemeData
26444
+ * @private
26445
+ * @param {Number} lineIndex
26446
+ * @param {Number} desiredWidth width you want to wrap the line to
26447
+ * @param {GraphemeData} graphemeData an object containing all the lines' words width.
26448
+ * @param {Number} reservedSpace space to remove from wrapping for custom functionalities
26449
+ * @returns {Array} Array of line(s) into which the given text is wrapped
26450
+ * to.
26017
26451
  */
26018
26452
  _wrapLine(lineIndex, desiredWidth, _ref) {
26019
26453
  let {
@@ -26071,11 +26505,11 @@
26071
26505
  return graphemeLines;
26072
26506
  }
26073
26507
 
26074
- /**
26075
- * Detect if the text line is ended with an hard break
26076
- * text and itext do not have wrapping, return false
26077
- * @param {Number} lineIndex text to split
26078
- * @return {Boolean}
26508
+ /**
26509
+ * Detect if the text line is ended with an hard break
26510
+ * text and itext do not have wrapping, return false
26511
+ * @param {Number} lineIndex text to split
26512
+ * @return {Boolean}
26079
26513
  */
26080
26514
  isEndOfWrapping(lineIndex) {
26081
26515
  if (!this._styleMap[lineIndex + 1]) {
@@ -26089,12 +26523,12 @@
26089
26523
  return false;
26090
26524
  }
26091
26525
 
26092
- /**
26093
- * Detect if a line has a linebreak and so we need to account for it when moving
26094
- * and counting style.
26095
- * This is important only for splitByGrapheme at the end of wrapping.
26096
- * If we are not wrapping the offset is always 1
26097
- * @return Number
26526
+ /**
26527
+ * Detect if a line has a linebreak and so we need to account for it when moving
26528
+ * and counting style.
26529
+ * This is important only for splitByGrapheme at the end of wrapping.
26530
+ * If we are not wrapping the offset is always 1
26531
+ * @return Number
26098
26532
  */
26099
26533
  missingNewlineOffset(lineIndex, skipWrapping) {
26100
26534
  if (this.splitByGrapheme && !skipWrapping) {
@@ -26103,12 +26537,12 @@
26103
26537
  return 1;
26104
26538
  }
26105
26539
 
26106
- /**
26107
- * Gets lines of text to render in the Textbox. This function calculates
26108
- * text wrapping on the fly every time it is called.
26109
- * @param {String} text text to split
26110
- * @returns {Array} Array of lines in the Textbox.
26111
- * @override
26540
+ /**
26541
+ * Gets lines of text to render in the Textbox. This function calculates
26542
+ * text wrapping on the fly every time it is called.
26543
+ * @param {String} text text to split
26544
+ * @returns {Array} Array of lines in the Textbox.
26545
+ * @override
26112
26546
  */
26113
26547
  _splitTextIntoLines(text) {
26114
26548
  const newText = super._splitTextIntoLines(text),
@@ -26140,9 +26574,9 @@
26140
26574
  }
26141
26575
  }
26142
26576
 
26143
- /**
26144
- * Initialize event listeners for safety snap functionality
26145
- * @private
26577
+ /**
26578
+ * Initialize event listeners for safety snap functionality
26579
+ * @private
26146
26580
  */
26147
26581
  initializeEventListeners() {
26148
26582
  var _this$canvas;
@@ -26185,12 +26619,12 @@
26185
26619
  });
26186
26620
  }
26187
26621
 
26188
- /**
26189
- * Safety snap to prevent glyph clipping after manual resize.
26190
- * Similar to Polotno - checks if any glyphs are too close to edges
26191
- * and automatically expands width if needed.
26192
- * @private
26193
- * @param resizeOrigin - Which side was used for resizing ('left' or 'right')
26622
+ /**
26623
+ * Safety snap to prevent glyph clipping after manual resize.
26624
+ * Similar to Polotno - checks if any glyphs are too close to edges
26625
+ * and automatically expands width if needed.
26626
+ * @private
26627
+ * @param resizeOrigin - Which side was used for resizing ('left' or 'right')
26194
26628
  */
26195
26629
  safetySnapWidth(resizeOrigin) {
26196
26630
  // For Textbox objects, we always want to check for clipping regardless of isWrapping flag
@@ -26257,31 +26691,31 @@
26257
26691
  }
26258
26692
  }
26259
26693
 
26260
- /**
26261
- * Returns object representation of an instance
26262
- * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
26263
- * @return {Object} object representation of an instance
26694
+ /**
26695
+ * Returns object representation of an instance
26696
+ * @param {Array} [propertiesToInclude] Any properties that you might want to additionally include in the output
26697
+ * @return {Object} object representation of an instance
26264
26698
  */
26265
26699
  toObject() {
26266
26700
  let propertiesToInclude = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
26267
26701
  return super.toObject(['minWidth', 'splitByGrapheme', ...propertiesToInclude]);
26268
26702
  }
26269
26703
  }
26270
- /**
26271
- * Minimum width of textbox, in pixels.
26272
- * @type Number
26273
- */
26274
- /**
26275
- * Minimum calculated width of a textbox, in pixels.
26276
- * fixed to 2 so that an empty textbox cannot go to 0
26277
- * and is still selectable without text.
26278
- * @type Number
26279
- */
26280
- /**
26281
- * Use this boolean property in order to split strings that have no white space concept.
26282
- * this is a cheap way to help with chinese/japanese
26283
- * @type Boolean
26284
- * @since 2.6.0
26704
+ /**
26705
+ * Minimum width of textbox, in pixels.
26706
+ * @type Number
26707
+ */
26708
+ /**
26709
+ * Minimum calculated width of a textbox, in pixels.
26710
+ * fixed to 2 so that an empty textbox cannot go to 0
26711
+ * and is still selectable without text.
26712
+ * @type Number
26713
+ */
26714
+ /**
26715
+ * Use this boolean property in order to split strings that have no white space concept.
26716
+ * this is a cheap way to help with chinese/japanese
26717
+ * @type Boolean
26718
+ * @since 2.6.0
26285
26719
  */
26286
26720
  _defineProperty(Textbox, "type", 'Textbox');
26287
26721
  _defineProperty(Textbox, "textLayoutProperties", [...IText.textLayoutProperties, 'width']);