@visactor/vrender-core 0.21.0-alpha.3 → 0.21.0-vstory.1

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 (430) hide show
  1. package/cjs/animate/Ticker/default-ticker.d.ts +4 -1
  2. package/cjs/animate/Ticker/default-ticker.js +9 -3
  3. package/cjs/animate/Ticker/default-ticker.js.map +1 -1
  4. package/cjs/animate/animate.js +1 -1
  5. package/cjs/animate/animate.js.map +1 -1
  6. package/cjs/animate/easing-func.d.ts +1 -0
  7. package/cjs/animate/easing-func.js +16 -0
  8. package/cjs/animate/easing-func.js.map +1 -0
  9. package/cjs/animate/easing.d.ts +3 -0
  10. package/cjs/animate/easing.js +9 -1
  11. package/cjs/animate/easing.js.map +1 -1
  12. package/cjs/color-string/store.js +1 -2
  13. package/cjs/common/bezier-utils.d.ts +3 -0
  14. package/cjs/common/bezier-utils.js +17 -2
  15. package/cjs/common/bezier-utils.js.map +1 -1
  16. package/cjs/common/bounds-context.js +2 -1
  17. package/cjs/common/custom-path2d.d.ts +4 -0
  18. package/cjs/common/custom-path2d.js +43 -11
  19. package/cjs/common/custom-path2d.js.map +1 -1
  20. package/cjs/common/morphing-utils.js +1 -1
  21. package/cjs/common/path-svg.js +1 -1
  22. package/cjs/common/polygon.js +2 -2
  23. package/cjs/common/rect-utils.js +1 -1
  24. package/cjs/common/render-area.js +1 -2
  25. package/cjs/common/render-command-list.js +1 -1
  26. package/cjs/common/render-curve.js +1 -1
  27. package/cjs/common/render-utils.js +1 -1
  28. package/cjs/common/seg-context.js +1 -1
  29. package/cjs/common/segment/curve/arc.d.ts +4 -1
  30. package/cjs/common/segment/curve/arc.js +10 -1
  31. package/cjs/common/segment/curve/arc.js.map +1 -1
  32. package/cjs/common/segment/curve/base.d.ts +4 -1
  33. package/cjs/common/segment/curve/base.js.map +1 -1
  34. package/cjs/common/segment/curve/cubic-bezier.d.ts +5 -1
  35. package/cjs/common/segment/curve/cubic-bezier.js +24 -3
  36. package/cjs/common/segment/curve/cubic-bezier.js.map +1 -1
  37. package/cjs/common/segment/curve/curve-context.js +5 -4
  38. package/cjs/common/segment/curve/curve-context.js.map +1 -1
  39. package/cjs/common/segment/curve/ellipse.d.ts +4 -1
  40. package/cjs/common/segment/curve/ellipse.js +9 -0
  41. package/cjs/common/segment/curve/ellipse.js.map +1 -1
  42. package/cjs/common/segment/curve/line.d.ts +4 -1
  43. package/cjs/common/segment/curve/line.js +18 -0
  44. package/cjs/common/segment/curve/line.js.map +1 -1
  45. package/cjs/common/segment/curve/move.d.ts +4 -1
  46. package/cjs/common/segment/curve/move.js +9 -0
  47. package/cjs/common/segment/curve/move.js.map +1 -1
  48. package/cjs/common/segment/curve/path.d.ts +2 -1
  49. package/cjs/common/segment/curve/path.js +5 -2
  50. package/cjs/common/segment/curve/path.js.map +1 -1
  51. package/cjs/common/segment/curve/quadratic-bezier.d.ts +6 -2
  52. package/cjs/common/segment/curve/quadratic-bezier.js +23 -5
  53. package/cjs/common/segment/curve/quadratic-bezier.js.map +1 -1
  54. package/cjs/common/simplify.js +1 -1
  55. package/cjs/common/sort.js +1 -1
  56. package/cjs/common/split-path.js +1 -1
  57. package/cjs/common/text.js.map +1 -1
  58. package/cjs/core/application.js +2 -1
  59. package/cjs/core/camera.js +1 -1
  60. package/cjs/core/constants.js +1 -1
  61. package/cjs/core/contributions/textMeasure/AtextMeasure.d.ts +4 -55
  62. package/cjs/core/contributions/textMeasure/AtextMeasure.js +18 -105
  63. package/cjs/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
  64. package/cjs/core/contributions/textMeasure/layout.d.ts +1 -0
  65. package/cjs/core/contributions/textMeasure/layout.js +30 -20
  66. package/cjs/core/contributions/textMeasure/layout.js.map +1 -1
  67. package/cjs/core/core-modules.js +1 -1
  68. package/cjs/core/global-module.js +2 -0
  69. package/cjs/core/global.js +1 -1
  70. package/cjs/core/graphic-utils.js +1 -1
  71. package/cjs/core/index.js +1 -1
  72. package/cjs/core/layer-service.js +1 -1
  73. package/cjs/core/layer.js +1 -1
  74. package/cjs/core/light.js +1 -1
  75. package/cjs/core/stage.d.ts +0 -3
  76. package/cjs/core/stage.js +3 -12
  77. package/cjs/core/stage.js.map +1 -1
  78. package/cjs/core/window.js +1 -1
  79. package/cjs/event/event-manager.d.ts +0 -1
  80. package/cjs/event/event-manager.js +1 -1
  81. package/cjs/event/event-manager.js.map +1 -1
  82. package/cjs/event/event-system.js +1 -2
  83. package/cjs/event/event-system.js.map +1 -1
  84. package/cjs/graphic/builtin-symbol/arrow.js +2 -2
  85. package/cjs/graphic/builtin-symbol/arrow.js.map +1 -1
  86. package/cjs/graphic/builtin-symbol/arrow2-down.js +2 -2
  87. package/cjs/graphic/builtin-symbol/arrow2-down.js.map +1 -1
  88. package/cjs/graphic/builtin-symbol/arrow2-left.js +2 -2
  89. package/cjs/graphic/builtin-symbol/arrow2-left.js.map +1 -1
  90. package/cjs/graphic/builtin-symbol/arrow2-right.js +2 -2
  91. package/cjs/graphic/builtin-symbol/arrow2-right.js.map +1 -1
  92. package/cjs/graphic/builtin-symbol/arrow2-up.js +2 -2
  93. package/cjs/graphic/builtin-symbol/arrow2-up.js.map +1 -1
  94. package/cjs/graphic/builtin-symbol/base.d.ts +1 -0
  95. package/cjs/graphic/builtin-symbol/base.js +3 -0
  96. package/cjs/graphic/builtin-symbol/base.js.map +1 -1
  97. package/cjs/graphic/builtin-symbol/circle.js +3 -3
  98. package/cjs/graphic/builtin-symbol/circle.js.map +1 -1
  99. package/cjs/graphic/builtin-symbol/close.js +3 -3
  100. package/cjs/graphic/builtin-symbol/close.js.map +1 -1
  101. package/cjs/graphic/builtin-symbol/cross.js +2 -2
  102. package/cjs/graphic/builtin-symbol/cross.js.map +1 -1
  103. package/cjs/graphic/builtin-symbol/diamond.js +3 -3
  104. package/cjs/graphic/builtin-symbol/diamond.js.map +1 -1
  105. package/cjs/graphic/builtin-symbol/line-h.js +3 -3
  106. package/cjs/graphic/builtin-symbol/line-h.js.map +1 -1
  107. package/cjs/graphic/builtin-symbol/line-v.js +3 -3
  108. package/cjs/graphic/builtin-symbol/line-v.js.map +1 -1
  109. package/cjs/graphic/builtin-symbol/rect.d.ts +2 -1
  110. package/cjs/graphic/builtin-symbol/rect.js +28 -0
  111. package/cjs/graphic/builtin-symbol/rect.js.map +1 -1
  112. package/cjs/graphic/builtin-symbol/square.js +2 -2
  113. package/cjs/graphic/builtin-symbol/square.js.map +1 -1
  114. package/cjs/graphic/builtin-symbol/star.js +2 -2
  115. package/cjs/graphic/builtin-symbol/star.js.map +1 -1
  116. package/cjs/graphic/builtin-symbol/stroke.js +2 -2
  117. package/cjs/graphic/builtin-symbol/stroke.js.map +1 -1
  118. package/cjs/graphic/builtin-symbol/thin-triangle.js +2 -2
  119. package/cjs/graphic/builtin-symbol/thin-triangle.js.map +1 -1
  120. package/cjs/graphic/builtin-symbol/triangle-down.js +2 -2
  121. package/cjs/graphic/builtin-symbol/triangle-down.js.map +1 -1
  122. package/cjs/graphic/builtin-symbol/triangle-left.js +2 -2
  123. package/cjs/graphic/builtin-symbol/triangle-left.js.map +1 -1
  124. package/cjs/graphic/builtin-symbol/triangle-right.js +2 -2
  125. package/cjs/graphic/builtin-symbol/triangle-right.js.map +1 -1
  126. package/cjs/graphic/builtin-symbol/triangle-up.js +2 -2
  127. package/cjs/graphic/builtin-symbol/triangle-up.js.map +1 -1
  128. package/cjs/graphic/builtin-symbol/utils.d.ts +3 -1
  129. package/cjs/graphic/builtin-symbol/utils.js +11 -3
  130. package/cjs/graphic/builtin-symbol/utils.js.map +1 -1
  131. package/cjs/graphic/builtin-symbol/wedge.js +2 -2
  132. package/cjs/graphic/builtin-symbol/wedge.js.map +1 -1
  133. package/cjs/graphic/builtin-symbol/wye.js +2 -2
  134. package/cjs/graphic/builtin-symbol/wye.js.map +1 -1
  135. package/cjs/graphic/config.js +6 -2
  136. package/cjs/graphic/config.js.map +1 -1
  137. package/cjs/graphic/graphic.js +2 -1
  138. package/cjs/graphic/graphic.js.map +1 -1
  139. package/cjs/graphic/richtext/wrapper.d.ts +1 -0
  140. package/cjs/graphic/richtext/wrapper.js +1 -1
  141. package/cjs/graphic/richtext/wrapper.js.map +1 -1
  142. package/cjs/graphic/richtext.js +2 -1
  143. package/cjs/graphic/richtext.js.map +1 -1
  144. package/cjs/graphic/text.d.ts +11 -10
  145. package/cjs/graphic/text.js +174 -91
  146. package/cjs/graphic/text.js.map +1 -1
  147. package/cjs/graphic/wrap-text.js +4 -12
  148. package/cjs/graphic/wrap-text.js.map +1 -1
  149. package/cjs/index.d.ts +1 -0
  150. package/cjs/index.js +1 -1
  151. package/cjs/index.js.map +1 -1
  152. package/cjs/interface/animate.d.ts +7 -2
  153. package/cjs/interface/animate.js.map +1 -1
  154. package/cjs/interface/graphic/path.d.ts +1 -0
  155. package/cjs/interface/graphic/path.js.map +1 -1
  156. package/cjs/interface/graphic/symbol.d.ts +2 -0
  157. package/cjs/interface/graphic/symbol.js.map +1 -1
  158. package/cjs/interface/graphic/text.d.ts +3 -3
  159. package/cjs/interface/graphic/text.js.map +1 -1
  160. package/cjs/interface/graphic.d.ts +6 -2
  161. package/cjs/interface/graphic.js.map +1 -1
  162. package/cjs/interface/path.d.ts +5 -0
  163. package/cjs/interface/path.js.map +1 -1
  164. package/cjs/interface/picker.d.ts +13 -0
  165. package/cjs/interface/picker.js.map +1 -1
  166. package/cjs/interface/stage.d.ts +0 -1
  167. package/cjs/interface/stage.js.map +1 -1
  168. package/cjs/interface/text.d.ts +1 -6
  169. package/cjs/interface/text.js.map +1 -1
  170. package/cjs/picker/constants.d.ts +2 -0
  171. package/cjs/picker/constants.js +3 -2
  172. package/cjs/picker/constants.js.map +1 -1
  173. package/cjs/picker/pick-interceptor.d.ts +7 -2
  174. package/cjs/picker/pick-interceptor.js +19 -2
  175. package/cjs/picker/pick-interceptor.js.map +1 -1
  176. package/cjs/picker/pick-modules.js +7 -4
  177. package/cjs/picker/pick-modules.js.map +1 -1
  178. package/cjs/picker/picker-service.d.ts +4 -2
  179. package/cjs/picker/picker-service.js +13 -12
  180. package/cjs/picker/picker-service.js.map +1 -1
  181. package/cjs/plugins/builtin-plugin/edit-module.d.ts +6 -5
  182. package/cjs/plugins/builtin-plugin/edit-module.js +84 -28
  183. package/cjs/plugins/builtin-plugin/edit-module.js.map +1 -1
  184. package/cjs/plugins/builtin-plugin/richtext-edit-plugin-old.d.ts +1 -0
  185. package/cjs/plugins/builtin-plugin/richtext-edit-plugin-old.js +3 -0
  186. package/cjs/plugins/builtin-plugin/richtext-edit-plugin-old.js.map +1 -0
  187. package/cjs/plugins/builtin-plugin/richtext-edit-plugin.d.ts +49 -30
  188. package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js +280 -217
  189. package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
  190. package/cjs/render/contributions/render/arc3d-render.js.map +1 -1
  191. package/cjs/render/contributions/render/base-render.d.ts +1 -0
  192. package/cjs/render/contributions/render/base-render.js +20 -2
  193. package/cjs/render/contributions/render/base-render.js.map +1 -1
  194. package/cjs/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
  195. package/cjs/render/contributions/render/contributions/base-texture-contribution-render.js +29 -2
  196. package/cjs/render/contributions/render/contributions/base-texture-contribution-render.js.map +1 -1
  197. package/cjs/render/contributions/render/contributions/symbol-contribution-render.d.ts +8 -1
  198. package/cjs/render/contributions/render/contributions/symbol-contribution-render.js +30 -2
  199. package/cjs/render/contributions/render/contributions/symbol-contribution-render.js.map +1 -1
  200. package/cjs/render/contributions/render/path-render.js.map +1 -1
  201. package/cjs/render/contributions/render/polygon-render.js.map +1 -1
  202. package/cjs/render/contributions/render/symbol-render.js +15 -12
  203. package/cjs/render/contributions/render/symbol-render.js.map +1 -1
  204. package/cjs/render/contributions/render/text-render.js +23 -1
  205. package/cjs/render/contributions/render/text-render.js.map +1 -1
  206. package/cjs/render/contributions/render/utils.d.ts +1 -2
  207. package/cjs/render/contributions/render/utils.js +4 -20
  208. package/cjs/render/contributions/render/utils.js.map +1 -1
  209. package/dist/index.es.js +8796 -8187
  210. package/es/animate/Ticker/default-ticker.d.ts +4 -1
  211. package/es/animate/Ticker/default-ticker.js +10 -4
  212. package/es/animate/Ticker/default-ticker.js.map +1 -1
  213. package/es/animate/animate.js +1 -1
  214. package/es/animate/animate.js.map +1 -1
  215. package/es/animate/easing-func.d.ts +1 -0
  216. package/es/animate/easing-func.js +10 -0
  217. package/es/animate/easing-func.js.map +1 -0
  218. package/es/animate/easing.d.ts +3 -0
  219. package/es/animate/easing.js +9 -1
  220. package/es/animate/easing.js.map +1 -1
  221. package/es/color-string/store.js +1 -2
  222. package/es/common/bezier-utils.d.ts +3 -0
  223. package/es/common/bezier-utils.js +14 -0
  224. package/es/common/bezier-utils.js.map +1 -1
  225. package/es/common/bounds-context.js +2 -1
  226. package/es/common/custom-path2d.d.ts +4 -0
  227. package/es/common/custom-path2d.js +44 -12
  228. package/es/common/custom-path2d.js.map +1 -1
  229. package/es/common/morphing-utils.js +1 -1
  230. package/es/common/path-svg.js +1 -1
  231. package/es/common/polygon.js +1 -1
  232. package/es/common/rect-utils.js +1 -1
  233. package/es/common/render-area.js +1 -2
  234. package/es/common/render-command-list.js +1 -1
  235. package/es/common/render-curve.js +1 -1
  236. package/es/common/render-utils.js +1 -1
  237. package/es/common/seg-context.js +1 -1
  238. package/es/common/segment/curve/arc.d.ts +4 -1
  239. package/es/common/segment/curve/arc.js +10 -1
  240. package/es/common/segment/curve/arc.js.map +1 -1
  241. package/es/common/segment/curve/base.d.ts +4 -1
  242. package/es/common/segment/curve/base.js.map +1 -1
  243. package/es/common/segment/curve/cubic-bezier.d.ts +5 -1
  244. package/es/common/segment/curve/cubic-bezier.js +22 -1
  245. package/es/common/segment/curve/cubic-bezier.js.map +1 -1
  246. package/es/common/segment/curve/curve-context.js +6 -3
  247. package/es/common/segment/curve/curve-context.js.map +1 -1
  248. package/es/common/segment/curve/ellipse.d.ts +4 -1
  249. package/es/common/segment/curve/ellipse.js +9 -0
  250. package/es/common/segment/curve/ellipse.js.map +1 -1
  251. package/es/common/segment/curve/line.d.ts +4 -1
  252. package/es/common/segment/curve/line.js +18 -0
  253. package/es/common/segment/curve/line.js.map +1 -1
  254. package/es/common/segment/curve/move.d.ts +4 -1
  255. package/es/common/segment/curve/move.js +9 -0
  256. package/es/common/segment/curve/move.js.map +1 -1
  257. package/es/common/segment/curve/path.d.ts +2 -1
  258. package/es/common/segment/curve/path.js +5 -2
  259. package/es/common/segment/curve/path.js.map +1 -1
  260. package/es/common/segment/curve/quadratic-bezier.d.ts +6 -2
  261. package/es/common/segment/curve/quadratic-bezier.js +28 -5
  262. package/es/common/segment/curve/quadratic-bezier.js.map +1 -1
  263. package/es/common/simplify.js +1 -1
  264. package/es/common/sort.js +1 -1
  265. package/es/common/split-path.js +1 -1
  266. package/es/common/text.js.map +1 -1
  267. package/es/core/application.js +2 -1
  268. package/es/core/camera.js +1 -1
  269. package/es/core/constants.js +1 -1
  270. package/es/core/contributions/textMeasure/AtextMeasure.d.ts +4 -55
  271. package/es/core/contributions/textMeasure/AtextMeasure.js +17 -106
  272. package/es/core/contributions/textMeasure/AtextMeasure.js.map +1 -1
  273. package/es/core/contributions/textMeasure/layout.d.ts +1 -0
  274. package/es/core/contributions/textMeasure/layout.js +30 -20
  275. package/es/core/contributions/textMeasure/layout.js.map +1 -1
  276. package/es/core/core-modules.js +1 -1
  277. package/es/core/global-module.js +2 -0
  278. package/es/core/global.js +1 -1
  279. package/es/core/graphic-utils.js +1 -1
  280. package/es/core/index.js +1 -1
  281. package/es/core/layer-service.js +1 -1
  282. package/es/core/layer.js +1 -1
  283. package/es/core/light.js +1 -1
  284. package/es/core/stage.d.ts +0 -3
  285. package/es/core/stage.js +2 -13
  286. package/es/core/stage.js.map +1 -1
  287. package/es/core/window.js +1 -1
  288. package/es/event/event-manager.d.ts +0 -1
  289. package/es/event/event-manager.js +1 -1
  290. package/es/event/event-manager.js.map +1 -1
  291. package/es/event/event-system.js +1 -2
  292. package/es/event/event-system.js.map +1 -1
  293. package/es/graphic/builtin-symbol/arrow.js +2 -2
  294. package/es/graphic/builtin-symbol/arrow.js.map +1 -1
  295. package/es/graphic/builtin-symbol/arrow2-down.js +2 -2
  296. package/es/graphic/builtin-symbol/arrow2-down.js.map +1 -1
  297. package/es/graphic/builtin-symbol/arrow2-left.js +2 -2
  298. package/es/graphic/builtin-symbol/arrow2-left.js.map +1 -1
  299. package/es/graphic/builtin-symbol/arrow2-right.js +2 -2
  300. package/es/graphic/builtin-symbol/arrow2-right.js.map +1 -1
  301. package/es/graphic/builtin-symbol/arrow2-up.js +2 -2
  302. package/es/graphic/builtin-symbol/arrow2-up.js.map +1 -1
  303. package/es/graphic/builtin-symbol/base.d.ts +1 -0
  304. package/es/graphic/builtin-symbol/base.js +3 -0
  305. package/es/graphic/builtin-symbol/base.js.map +1 -1
  306. package/es/graphic/builtin-symbol/circle.js +3 -3
  307. package/es/graphic/builtin-symbol/circle.js.map +1 -1
  308. package/es/graphic/builtin-symbol/close.js +3 -3
  309. package/es/graphic/builtin-symbol/close.js.map +1 -1
  310. package/es/graphic/builtin-symbol/cross.js +2 -2
  311. package/es/graphic/builtin-symbol/cross.js.map +1 -1
  312. package/es/graphic/builtin-symbol/diamond.js +3 -3
  313. package/es/graphic/builtin-symbol/diamond.js.map +1 -1
  314. package/es/graphic/builtin-symbol/line-h.js +3 -3
  315. package/es/graphic/builtin-symbol/line-h.js.map +1 -1
  316. package/es/graphic/builtin-symbol/line-v.js +3 -3
  317. package/es/graphic/builtin-symbol/line-v.js.map +1 -1
  318. package/es/graphic/builtin-symbol/rect.d.ts +2 -1
  319. package/es/graphic/builtin-symbol/rect.js +28 -0
  320. package/es/graphic/builtin-symbol/rect.js.map +1 -1
  321. package/es/graphic/builtin-symbol/square.js +2 -2
  322. package/es/graphic/builtin-symbol/square.js.map +1 -1
  323. package/es/graphic/builtin-symbol/star.js +2 -2
  324. package/es/graphic/builtin-symbol/star.js.map +1 -1
  325. package/es/graphic/builtin-symbol/stroke.js +2 -2
  326. package/es/graphic/builtin-symbol/stroke.js.map +1 -1
  327. package/es/graphic/builtin-symbol/thin-triangle.js +2 -2
  328. package/es/graphic/builtin-symbol/thin-triangle.js.map +1 -1
  329. package/es/graphic/builtin-symbol/triangle-down.js +2 -2
  330. package/es/graphic/builtin-symbol/triangle-down.js.map +1 -1
  331. package/es/graphic/builtin-symbol/triangle-left.js +2 -2
  332. package/es/graphic/builtin-symbol/triangle-left.js.map +1 -1
  333. package/es/graphic/builtin-symbol/triangle-right.js +2 -2
  334. package/es/graphic/builtin-symbol/triangle-right.js.map +1 -1
  335. package/es/graphic/builtin-symbol/triangle-up.js +2 -2
  336. package/es/graphic/builtin-symbol/triangle-up.js.map +1 -1
  337. package/es/graphic/builtin-symbol/utils.d.ts +3 -1
  338. package/es/graphic/builtin-symbol/utils.js +12 -4
  339. package/es/graphic/builtin-symbol/utils.js.map +1 -1
  340. package/es/graphic/builtin-symbol/wedge.js +2 -2
  341. package/es/graphic/builtin-symbol/wedge.js.map +1 -1
  342. package/es/graphic/builtin-symbol/wye.js +2 -2
  343. package/es/graphic/builtin-symbol/wye.js.map +1 -1
  344. package/es/graphic/config.js +6 -2
  345. package/es/graphic/config.js.map +1 -1
  346. package/es/graphic/graphic.js +2 -1
  347. package/es/graphic/graphic.js.map +1 -1
  348. package/es/graphic/richtext/wrapper.d.ts +1 -0
  349. package/es/graphic/richtext/wrapper.js +1 -1
  350. package/es/graphic/richtext/wrapper.js.map +1 -1
  351. package/es/graphic/richtext.js +2 -1
  352. package/es/graphic/richtext.js.map +1 -1
  353. package/es/graphic/text.d.ts +11 -10
  354. package/es/graphic/text.js +169 -90
  355. package/es/graphic/text.js.map +1 -1
  356. package/es/graphic/wrap-text.js +4 -12
  357. package/es/graphic/wrap-text.js.map +1 -1
  358. package/es/index.d.ts +1 -0
  359. package/es/index.js +2 -0
  360. package/es/index.js.map +1 -1
  361. package/es/interface/animate.d.ts +7 -2
  362. package/es/interface/animate.js.map +1 -1
  363. package/es/interface/graphic/path.d.ts +1 -0
  364. package/es/interface/graphic/path.js.map +1 -1
  365. package/es/interface/graphic/symbol.d.ts +2 -0
  366. package/es/interface/graphic/symbol.js.map +1 -1
  367. package/es/interface/graphic/text.d.ts +3 -3
  368. package/es/interface/graphic/text.js.map +1 -1
  369. package/es/interface/graphic.d.ts +6 -2
  370. package/es/interface/graphic.js.map +1 -1
  371. package/es/interface/path.d.ts +5 -0
  372. package/es/interface/path.js.map +1 -1
  373. package/es/interface/picker.d.ts +13 -0
  374. package/es/interface/picker.js.map +1 -1
  375. package/es/interface/stage.d.ts +0 -1
  376. package/es/interface/stage.js.map +1 -1
  377. package/es/interface/text.d.ts +1 -6
  378. package/es/interface/text.js.map +1 -1
  379. package/es/picker/constants.d.ts +2 -0
  380. package/es/picker/constants.js +4 -0
  381. package/es/picker/constants.js.map +1 -1
  382. package/es/picker/pick-interceptor.d.ts +7 -2
  383. package/es/picker/pick-interceptor.js +19 -1
  384. package/es/picker/pick-interceptor.js.map +1 -1
  385. package/es/picker/pick-modules.js +5 -3
  386. package/es/picker/pick-modules.js.map +1 -1
  387. package/es/picker/picker-service.d.ts +4 -2
  388. package/es/picker/picker-service.js +13 -13
  389. package/es/picker/picker-service.js.map +1 -1
  390. package/es/plugins/builtin-plugin/edit-module.d.ts +6 -5
  391. package/es/plugins/builtin-plugin/edit-module.js +79 -25
  392. package/es/plugins/builtin-plugin/edit-module.js.map +1 -1
  393. package/es/plugins/builtin-plugin/richtext-edit-plugin-old.d.ts +1 -0
  394. package/es/plugins/builtin-plugin/richtext-edit-plugin-old.js +3 -0
  395. package/es/plugins/builtin-plugin/richtext-edit-plugin-old.js.map +1 -0
  396. package/es/plugins/builtin-plugin/richtext-edit-plugin.d.ts +49 -30
  397. package/es/plugins/builtin-plugin/richtext-edit-plugin.js +283 -214
  398. package/es/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -1
  399. package/es/render/contributions/render/arc3d-render.js.map +1 -1
  400. package/es/render/contributions/render/base-render.d.ts +1 -0
  401. package/es/render/contributions/render/base-render.js +21 -2
  402. package/es/render/contributions/render/base-render.js.map +1 -1
  403. package/es/render/contributions/render/contributions/base-contribution-render.js.map +1 -1
  404. package/es/render/contributions/render/contributions/base-texture-contribution-render.js +29 -2
  405. package/es/render/contributions/render/contributions/base-texture-contribution-render.js.map +1 -1
  406. package/es/render/contributions/render/contributions/symbol-contribution-render.d.ts +8 -1
  407. package/es/render/contributions/render/contributions/symbol-contribution-render.js +26 -0
  408. package/es/render/contributions/render/contributions/symbol-contribution-render.js.map +1 -1
  409. package/es/render/contributions/render/path-render.js.map +1 -1
  410. package/es/render/contributions/render/polygon-render.js.map +1 -1
  411. package/es/render/contributions/render/symbol-render.js +16 -13
  412. package/es/render/contributions/render/symbol-render.js.map +1 -1
  413. package/es/render/contributions/render/text-render.js +23 -1
  414. package/es/render/contributions/render/text-render.js.map +1 -1
  415. package/es/render/contributions/render/utils.d.ts +1 -2
  416. package/es/render/contributions/render/utils.js +0 -18
  417. package/es/render/contributions/render/utils.js.map +1 -1
  418. package/package.json +3 -3
  419. package/cjs/graphic/text2.d.ts +0 -81
  420. package/cjs/graphic/text2.js +0 -288
  421. package/cjs/graphic/text2.js.map +0 -1
  422. package/cjs/plugins/builtin-plugin/auto-refresh-plugin.d.ts +0 -16
  423. package/cjs/plugins/builtin-plugin/auto-refresh-plugin.js +0 -48
  424. package/cjs/plugins/builtin-plugin/auto-refresh-plugin.js.map +0 -1
  425. package/es/graphic/text2.d.ts +0 -81
  426. package/es/graphic/text2.js +0 -293
  427. package/es/graphic/text2.js.map +0 -1
  428. package/es/plugins/builtin-plugin/auto-refresh-plugin.d.ts +0 -16
  429. package/es/plugins/builtin-plugin/auto-refresh-plugin.js +0 -41
  430. package/es/plugins/builtin-plugin/auto-refresh-plugin.js.map +0 -1
@@ -1,288 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: !0
5
- }), exports.createText = exports.Text = void 0;
6
-
7
- const vutils_1 = require("@visactor/vutils"), text_1 = require("../common/text"), layout_1 = require("../core/contributions/textMeasure/layout"), application_1 = require("../application"), graphic_1 = require("./graphic"), theme_1 = require("./theme"), utils_1 = require("../common/utils"), constants_1 = require("./constants"), tools_1 = require("./tools"), TEXT_UPDATE_TAG_KEY = [ "text", "maxLineWidth", "maxWidth", "textAlign", "textBaseline", "heightLimit", "lineClamp", "fontSize", "fontFamily", "fontWeight", "ellipsis", "lineHeight", "direction", "wordBreak", "heightLimit", "lineClamp", ...graphic_1.GRAPHIC_UPDATE_TAG_KEY ];
8
-
9
- class Text extends graphic_1.Graphic {
10
- get font() {
11
- const textTheme = this.getGraphicTheme();
12
- return this._font || (this._font = (0, vutils_1.getContextFont)(this.attribute, textTheme)),
13
- this._font;
14
- }
15
- get clipedText() {
16
- var _a;
17
- const attribute = this.attribute, textTheme = this.getGraphicTheme();
18
- if (!this.isSinglelineAndHorizontal()) return;
19
- const maxWidth = this.getMaxWidth(textTheme);
20
- return Number.isFinite(maxWidth) ? (this.tryUpdateAABBBounds(), this.cache.clipedText) : (null !== (_a = attribute.text) && void 0 !== _a ? _a : textTheme.text).toString();
21
- }
22
- get clipedWidth() {
23
- if (this.isSinglelineAndHorizontal()) return this.tryUpdateAABBBounds(), this.cache.clipedWidth;
24
- }
25
- get cliped() {
26
- const textTheme = this.getGraphicTheme(), attribute = this.attribute;
27
- if (this.isMultiLine) return;
28
- const maxWidth = this.getMaxWidth(textTheme);
29
- return !!Number.isFinite(maxWidth) && (this.tryUpdateAABBBounds(), "vertical" === attribute.direction && this.cache.verticalList && this.cache.verticalList[0] ? this.cache.verticalList[0].map((item => item.text)).join("") !== attribute.text.toString() : null != this.clipedText && this.clipedText !== attribute.text.toString());
30
- }
31
- get multilineLayout() {
32
- return this.tryUpdateAABBBounds(), this.cache.layoutData;
33
- }
34
- get isMultiLine() {
35
- return Array.isArray(this.attribute.text) || "normal" === this.attribute.whiteSpace;
36
- }
37
- constructor(params = {
38
- text: "",
39
- fontSize: 16
40
- }) {
41
- super(params), this.type = "text", this.numberType = constants_1.TEXT_NUMBER_TYPE,
42
- this.cache = {};
43
- }
44
- isValid() {
45
- return super.isValid() && this._isValid();
46
- }
47
- _isValid() {
48
- const {text: text} = this.attribute;
49
- return (0, vutils_1.isArray)(text) ? !text.every((t => null == t || "" === t)) : null != text && "" !== text;
50
- }
51
- getGraphicTheme() {
52
- return (0, theme_1.getTheme)(this).text;
53
- }
54
- updateAABBBounds(attribute, textTheme, aabbBounds) {
55
- const {text: text = textTheme.text} = this.attribute;
56
- Array.isArray(text) ? this.updateMultilineAABBBounds(text) : this.updateSingallineAABBBounds(text);
57
- const {tb1: tb1} = application_1.application.graphicService.updateTempAABBBounds(aabbBounds), {scaleX: scaleX = textTheme.scaleX, scaleY: scaleY = textTheme.scaleY, shadowBlur: shadowBlur = textTheme.shadowBlur, strokeBoundsBuffer: strokeBoundsBuffer = textTheme.strokeBoundsBuffer} = attribute;
58
- if (shadowBlur) {
59
- const shadowBlurHalfWidth = shadowBlur / Math.abs(scaleX + scaleY);
60
- (0, tools_1.boundStroke)(tb1, shadowBlurHalfWidth, !0, strokeBoundsBuffer), aabbBounds.union(tb1);
61
- }
62
- return application_1.application.graphicService.combindShadowAABBBounds(aabbBounds, this),
63
- null == attribute.forceBoundsHeight && null == attribute.forceBoundsWidth || application_1.application.graphicService.updateHTMLTextAABBBounds(attribute, textTheme, aabbBounds),
64
- (0, vutils_1.transformBoundsWithMatrix)(aabbBounds, aabbBounds, this.transMatrix),
65
- aabbBounds;
66
- }
67
- updateSingallineAABBBounds(text) {
68
- return this.updateMultilineAABBBounds([ text ]);
69
- }
70
- updateMultilineAABBBounds(text) {
71
- const textTheme = this.getGraphicTheme(), {direction: direction = textTheme.direction, underlineOffset: underlineOffset = textTheme.underlineOffset} = this.attribute, b = "horizontal" === direction ? this.updateHorizontalMultilineAABBBounds(text) : this.updateVerticalMultilineAABBBounds(text);
72
- return "horizontal" === direction && underlineOffset && this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset),
73
- b;
74
- }
75
- updateHorizontalMultilineAABBBounds(text) {
76
- var _a;
77
- const textTheme = this.getGraphicTheme(), attribute = this.attribute, {fontFamily: fontFamily = textTheme.fontFamily, textAlign: textAlign = textTheme.textAlign, textBaseline: textBaseline = textTheme.textBaseline, fontSize: fontSize = textTheme.fontSize, fontWeight: fontWeight = textTheme.fontWeight, ellipsis: ellipsis = textTheme.ellipsis, maxLineWidth: maxLineWidth, stroke: stroke = textTheme.stroke, wrap: wrap = textTheme.wrap, lineWidth: lineWidth = textTheme.lineWidth, whiteSpace: whiteSpace = textTheme.whiteSpace, suffixPosition: suffixPosition = textTheme.suffixPosition} = attribute, lineHeight = this.getLineHeight(attribute, textTheme);
78
- if ("normal" === whiteSpace || wrap) return this.updateWrapAABBBounds(text);
79
- if (!this.shouldUpdateShape() && (null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData)) {
80
- const bbox = this.cache.layoutData.bbox;
81
- return this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height),
82
- stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
83
- }
84
- const textMeasure = application_1.application.graphicUtil.textMeasure, layoutData = new layout_1.CanvasTextLayout(fontFamily, {
85
- fontSize: fontSize,
86
- fontWeight: fontWeight,
87
- fontFamily: fontFamily
88
- }, textMeasure).GetLayoutByLines(text, textAlign, textBaseline, lineHeight, !0 === ellipsis ? textTheme.ellipsis : ellipsis || void 0, !1, maxLineWidth, suffixPosition), {bbox: bbox} = layoutData;
89
- return this.cache.layoutData = layoutData, this.clearUpdateShapeTag(), this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height),
90
- stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
91
- }
92
- updateWrapAABBBounds(text) {
93
- var _a, _b, _c;
94
- const textTheme = this.getGraphicTheme(), {fontFamily: fontFamily = textTheme.fontFamily, textAlign: textAlign = textTheme.textAlign, textBaseline: textBaseline = textTheme.textBaseline, fontSize: fontSize = textTheme.fontSize, ellipsis: ellipsis = textTheme.ellipsis, maxLineWidth: maxLineWidth, stroke: stroke = textTheme.stroke, lineWidth: lineWidth = textTheme.lineWidth, wordBreak: wordBreak = textTheme.wordBreak, fontWeight: fontWeight = textTheme.fontWeight, ignoreBuf: ignoreBuf = textTheme.ignoreBuf, suffixPosition: suffixPosition = textTheme.suffixPosition, heightLimit: heightLimit = 0, lineClamp: lineClamp} = this.attribute, lineHeight = this.getLineHeight(this.attribute, textTheme);
95
- if (!this.shouldUpdateShape() && (null === (_a = this.cache) || void 0 === _a ? void 0 : _a.layoutData)) {
96
- const bbox = this.cache.layoutData.bbox;
97
- return this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height),
98
- stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
99
- }
100
- const textMeasure = application_1.application.graphicUtil.textMeasure, textOptions = {
101
- fontSize: fontSize,
102
- fontWeight: fontWeight,
103
- fontFamily: fontFamily
104
- }, layoutObj = new layout_1.CanvasTextLayout(fontFamily, textOptions, textMeasure), lines = (0,
105
- vutils_1.isArray)(text) ? text.map((l => l.toString())) : [ text.toString() ], linesLayout = [], bboxWH = [ 0, 0 ];
106
- let lineCountLimit = 1 / 0;
107
- if (heightLimit > 0 && (lineCountLimit = Math.max(Math.floor(heightLimit / lineHeight), 1)),
108
- lineClamp && (lineCountLimit = Math.min(lineCountLimit, lineClamp)), "number" == typeof maxLineWidth && maxLineWidth !== 1 / 0) {
109
- if (maxLineWidth > 0) for (let i = 0; i < lines.length; i++) {
110
- const str = lines[i];
111
- let needCut = !0;
112
- if (i === lineCountLimit - 1) {
113
- const clip = textMeasure.clipTextWithSuffix(str, textOptions, maxLineWidth, ellipsis, !1, suffixPosition, i !== lines.length - 1), matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions);
114
- linesLayout.push({
115
- str: clip.str,
116
- width: clip.width,
117
- ascent: matrics.ascent,
118
- descent: matrics.descent
119
- });
120
- break;
121
- }
122
- const clip = textMeasure.clipText(str, textOptions, maxLineWidth, "break-word" === wordBreak);
123
- if ("" !== str && "" === clip.str) {
124
- if (ellipsis) {
125
- const clipEllipsis = textMeasure.clipTextWithSuffix(str, textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
126
- clip.str = null !== (_b = clipEllipsis.str) && void 0 !== _b ? _b : "", clip.width = null !== (_c = clipEllipsis.width) && void 0 !== _c ? _c : 0;
127
- } else clip.str = "", clip.width = 0;
128
- needCut = !1;
129
- }
130
- const matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions);
131
- if (linesLayout.push({
132
- str: clip.str,
133
- width: clip.width,
134
- ascent: matrics.ascent,
135
- descent: matrics.descent
136
- }), clip.str.length === str.length) ; else if (needCut) {
137
- const newStr = str.substring(clip.str.length);
138
- lines.splice(i + 1, 0, newStr);
139
- }
140
- }
141
- let maxWidth = 0;
142
- linesLayout.forEach((layout => {
143
- maxWidth = Math.max(maxWidth, layout.width);
144
- })), bboxWH[0] = maxWidth;
145
- } else {
146
- let width, text, lineWidth = 0;
147
- for (let i = 0, len = lines.length; i < len; i++) {
148
- if (i === lineCountLimit - 1) {
149
- const clip = textMeasure.clipTextWithSuffix(lines[i], textOptions, maxLineWidth, ellipsis, !1, suffixPosition), matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions);
150
- linesLayout.push({
151
- str: clip.str,
152
- width: clip.width,
153
- ascent: matrics.ascent,
154
- descent: matrics.descent
155
- }), lineWidth = Math.max(lineWidth, clip.width);
156
- break;
157
- }
158
- text = lines[i], width = textMeasure.measureTextWidth(text, textOptions), lineWidth = Math.max(lineWidth, width);
159
- const matrics = textMeasure.measureTextPixelADscentAndWidth(text, textOptions);
160
- linesLayout.push({
161
- str: text,
162
- width: width,
163
- ascent: matrics.ascent,
164
- descent: matrics.descent
165
- });
166
- }
167
- bboxWH[0] = lineWidth;
168
- }
169
- bboxWH[1] = linesLayout.length * lineHeight;
170
- const bbox = {
171
- xOffset: 0,
172
- yOffset: 0,
173
- width: bboxWH[0],
174
- height: bboxWH[1]
175
- };
176
- layoutObj.LayoutBBox(bbox, textAlign, textBaseline);
177
- const layoutData = layoutObj.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline, lineHeight);
178
- return this.cache.layoutData = layoutData, this.clearUpdateShapeTag(), this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height),
179
- stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
180
- }
181
- updateVerticalMultilineAABBBounds(text) {
182
- var _a, _b;
183
- const textTheme = this.getGraphicTheme(), textMeasure = application_1.application.graphicUtil.textMeasure;
184
- let width;
185
- const attribute = this.attribute, {maxLineWidth: maxLineWidth = textTheme.maxLineWidth, ellipsis: ellipsis = textTheme.ellipsis, fontFamily: fontFamily = textTheme.fontFamily, fontSize: fontSize = textTheme.fontSize, fontWeight: fontWeight = textTheme.fontWeight, stroke: stroke = textTheme.stroke, lineWidth: lineWidth = textTheme.lineWidth, verticalMode: verticalMode = textTheme.verticalMode, suffixPosition: suffixPosition = textTheme.suffixPosition} = attribute, lineHeight = this.getLineHeight(attribute, textTheme);
186
- let {textAlign: textAlign = textTheme.textAlign, textBaseline: textBaseline = textTheme.textBaseline} = attribute;
187
- if (!verticalMode) {
188
- const t = textAlign;
189
- textAlign = null !== (_a = Text.baselineMapAlign[textBaseline]) && void 0 !== _a ? _a : "left",
190
- textBaseline = null !== (_b = Text.alignMapBaseline[t]) && void 0 !== _b ? _b : "top";
191
- }
192
- if (width = 0, !this.shouldUpdateShape() && this.cache) {
193
- this.cache.verticalList.forEach((item => {
194
- const w = item.reduce(((a, b) => a + b.width), 0);
195
- width = (0, vutils_1.max)(w, width);
196
- }));
197
- const dx = (0, text_1.textDrawOffsetX)(textAlign, width), height = this.cache.verticalList.length * lineHeight, dy = (0,
198
- text_1.textLayoutOffsetY)(textBaseline, height, fontSize);
199
- return this._AABBBounds.set(dy, dx, dy + height, dx + width), stroke && this._AABBBounds.expand(lineWidth / 2),
200
- this._AABBBounds;
201
- }
202
- const verticalLists = text.map((str => (0, tools_1.verticalLayout)(str.toString())));
203
- verticalLists.forEach(((verticalData, i) => {
204
- if (Number.isFinite(maxLineWidth)) if (ellipsis) {
205
- const strEllipsis = !0 === ellipsis ? textTheme.ellipsis : ellipsis, data = textMeasure.clipTextWithSuffixVertical(verticalData, {
206
- fontSize: fontSize,
207
- fontWeight: fontWeight,
208
- fontFamily: fontFamily
209
- }, maxLineWidth, strEllipsis, !1, suffixPosition);
210
- verticalLists[i] = data.verticalList, width = data.width;
211
- } else {
212
- const data = textMeasure.clipTextVertical(verticalData, {
213
- fontSize: fontSize,
214
- fontWeight: fontWeight,
215
- fontFamily: fontFamily
216
- }, maxLineWidth, !1);
217
- verticalLists[i] = data.verticalList, width = data.width;
218
- } else width = 0, verticalData.forEach((t => {
219
- const w = t.direction === tools_1.TextDirection.HORIZONTAL ? fontSize : textMeasure.measureTextWidth(t.text, {
220
- fontSize: fontSize,
221
- fontWeight: fontWeight,
222
- fontFamily: fontFamily
223
- });
224
- width += w, t.width = w;
225
- }));
226
- })), this.cache.verticalList = verticalLists, this.clearUpdateShapeTag(), this.cache.verticalList.forEach((item => {
227
- const w = item.reduce(((a, b) => a + b.width), 0);
228
- width = (0, vutils_1.max)(w, width);
229
- }));
230
- const dx = (0, text_1.textDrawOffsetX)(textAlign, width), height = this.cache.verticalList.length * lineHeight, dy = (0,
231
- text_1.textLayoutOffsetY)(textBaseline, height, fontSize);
232
- return this._AABBBounds.set(dy, dx, dy + height, dx + width), stroke && this._AABBBounds.expand(lineWidth / 2),
233
- this._AABBBounds;
234
- }
235
- isSinglelineAndHorizontal() {
236
- return !this.isMultiLine && "vertical" !== this.attribute.direction;
237
- }
238
- getMaxWidth(theme) {
239
- var _a, _b;
240
- const attribute = this.attribute;
241
- return null !== (_b = null !== (_a = attribute.maxLineWidth) && void 0 !== _a ? _a : attribute.maxWidth) && void 0 !== _b ? _b : theme.maxWidth;
242
- }
243
- getLineHeight(attribute, textTheme) {
244
- var _a;
245
- return null !== (_a = (0, utils_1.calculateLineHeight)(attribute.lineHeight, attribute.fontSize || textTheme.fontSize)) && void 0 !== _a ? _a : attribute.fontSize || textTheme.fontSize;
246
- }
247
- needUpdateTags(keys, k = TEXT_UPDATE_TAG_KEY) {
248
- return super.needUpdateTags(keys, k);
249
- }
250
- needUpdateTag(key, k = TEXT_UPDATE_TAG_KEY) {
251
- return super.needUpdateTag(key, k);
252
- }
253
- clone() {
254
- return new Text(Object.assign({}, this.attribute));
255
- }
256
- getNoWorkAnimateAttr() {
257
- return Text.NOWORK_ANIMATE_ATTR;
258
- }
259
- getBaselineMapAlign() {
260
- return Text.baselineMapAlign;
261
- }
262
- getAlignMapBaseline() {
263
- return Text.alignMapBaseline;
264
- }
265
- }
266
-
267
- function createText(attributes) {
268
- return new Text(attributes);
269
- }
270
-
271
- exports.Text = Text, Text.NOWORK_ANIMATE_ATTR = Object.assign({
272
- ellipsis: 1,
273
- wordBreak: 1,
274
- direction: 1,
275
- textAlign: 1,
276
- textBaseline: 1,
277
- fontFamily: 1,
278
- fontWeight: 1
279
- }, graphic_1.NOWORK_ANIMATE_ATTR), Text.baselineMapAlign = {
280
- top: "left",
281
- bottom: "right",
282
- middle: "center"
283
- }, Text.alignMapBaseline = {
284
- left: "top",
285
- right: "bottom",
286
- center: "middle"
287
- }, exports.createText = createText;
288
- //# sourceMappingURL=text2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/graphic/text2.ts"],"names":[],"mappings":";;;AACA,6CAA2F;AAC3F,yCAAoE;AACpE,qEAA4E;AAC5E,gDAA6C;AAE7C,uCAAiF;AACjF,mCAAmC;AACnC,2CAAsD;AACtD,2CAA+C;AAC/C,mCAA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CAEC","file":"text2.js","sourcesContent":["import type { IAABBBounds } from '@visactor/vutils';\nimport { max, isArray, getContextFont, transformBoundsWithMatrix } from '@visactor/vutils';\nimport { textDrawOffsetX, textLayoutOffsetY } from '../common/text';\nimport { CanvasTextLayout } from '../core/contributions/textMeasure/layout';\nimport { application } from '../application';\nimport type { IText, ITextCache, ITextGraphicAttribute, LayoutItemType, LayoutType } from '../interface';\nimport { Graphic, GRAPHIC_UPDATE_TAG_KEY, NOWORK_ANIMATE_ATTR } from './graphic';\nimport { getTheme } from './theme';\nimport { calculateLineHeight } from '../common/utils';\nimport { TEXT_NUMBER_TYPE } from './constants';\nimport { boundStroke, TextDirection, verticalLayout } from './tools';\n\nconst TEXT_UPDATE_TAG_KEY = [\n 'text',\n 'maxLineWidth',\n 'maxWidth',\n // 多行文本要用到\n 'textAlign',\n 'textBaseline',\n 'heightLimit',\n 'lineClamp',\n 'fontSize',\n 'fontFamily',\n 'fontWeight',\n 'ellipsis',\n 'lineHeight',\n 'direction',\n 'wordBreak',\n 'heightLimit',\n 'lineClamp',\n ...GRAPHIC_UPDATE_TAG_KEY\n];\n\nexport class Text extends Graphic<ITextGraphicAttribute> implements IText {\n type: 'text' = 'text';\n\n static NOWORK_ANIMATE_ATTR = {\n ellipsis: 1,\n wordBreak: 1,\n direction: 1,\n textAlign: 1,\n textBaseline: 1,\n fontFamily: 1,\n fontWeight: 1,\n ...NOWORK_ANIMATE_ATTR\n };\n\n cache: ITextCache;\n _font: string;\n\n /**\n * 获取font字符串\n */\n get font(): string {\n const textTheme = this.getGraphicTheme();\n if (!this._font) {\n this._font = getContextFont(this.attribute, textTheme);\n }\n return this._font as string;\n }\n\n get clipedText(): string | undefined {\n const attribute = this.attribute;\n const textTheme = this.getGraphicTheme();\n if (!this.isSinglelineAndHorizontal()) {\n return void 0;\n }\n const maxWidth = this.getMaxWidth(textTheme);\n if (!Number.isFinite(maxWidth)) {\n return (attribute.text ?? textTheme.text).toString();\n }\n this.tryUpdateAABBBounds();\n return this.cache.clipedText;\n }\n\n get clipedWidth(): number | undefined {\n if (!this.isSinglelineAndHorizontal()) {\n return void 0;\n }\n this.tryUpdateAABBBounds();\n return this.cache.clipedWidth;\n }\n\n /**\n * 支持单行文本,横排纵排均支持\n * TODO 支持多行文本\n */\n get cliped(): boolean | undefined {\n const textTheme = this.getGraphicTheme();\n const attribute = this.attribute;\n if (this.isMultiLine) {\n return void 0;\n }\n const maxWidth = this.getMaxWidth(textTheme);\n if (!Number.isFinite(maxWidth)) {\n return false;\n }\n this.tryUpdateAABBBounds();\n if (attribute.direction === 'vertical' && this.cache.verticalList && this.cache.verticalList[0]) {\n return this.cache.verticalList[0].map(item => item.text).join('') !== attribute.text.toString();\n }\n if (this.clipedText == null) {\n return false;\n }\n return this.clipedText !== attribute.text.toString();\n }\n\n get multilineLayout(): LayoutType | undefined {\n this.tryUpdateAABBBounds();\n return this.cache.layoutData;\n }\n /**\n * @deprecated 请勿使用,后续不再支持判定是否是单行还是多行,二者逻辑已经统一\n * 是否是多行文本\n */\n get isMultiLine(): boolean {\n return Array.isArray(this.attribute.text) || this.attribute.whiteSpace === 'normal';\n }\n\n constructor(params: ITextGraphicAttribute = { text: '', fontSize: 16 }) {\n super(params);\n this.numberType = TEXT_NUMBER_TYPE;\n this.cache = {};\n }\n\n /**\n * 图元属性合法,且文字不为空或者null/undefined\n * @returns\n */\n isValid(): boolean {\n return super.isValid() && this._isValid();\n }\n\n protected _isValid(): boolean {\n const { text } = this.attribute;\n if (isArray(text)) {\n return !(text as any[]).every((t: any) => t == null || t === '');\n }\n return text != null && text !== '';\n }\n\n getGraphicTheme(): Required<ITextGraphicAttribute> {\n return getTheme(this).text;\n }\n\n protected updateAABBBounds(\n attribute: ITextGraphicAttribute,\n textTheme: Required<ITextGraphicAttribute>,\n aabbBounds: IAABBBounds\n ) {\n const { text = textTheme.text } = this.attribute;\n if (Array.isArray(text)) {\n this.updateMultilineAABBBounds(text as (number | string)[]);\n } else {\n this.updateSingallineAABBBounds(text as number | string);\n }\n\n const { tb1 } = application.graphicService.updateTempAABBBounds(aabbBounds);\n\n const {\n scaleX = textTheme.scaleX,\n scaleY = textTheme.scaleY,\n shadowBlur = textTheme.shadowBlur,\n strokeBoundsBuffer = textTheme.strokeBoundsBuffer\n } = attribute;\n if (shadowBlur) {\n const shadowBlurHalfWidth = shadowBlur / Math.abs(scaleX + scaleY);\n boundStroke(tb1, shadowBlurHalfWidth, true, strokeBoundsBuffer);\n aabbBounds.union(tb1);\n }\n // 合并shadowRoot的bounds\n application.graphicService.combindShadowAABBBounds(aabbBounds, this);\n\n if (attribute.forceBoundsHeight != null || attribute.forceBoundsWidth != null) {\n application.graphicService.updateHTMLTextAABBBounds(attribute, textTheme, aabbBounds);\n }\n\n transformBoundsWithMatrix(aabbBounds, aabbBounds, this.transMatrix);\n return aabbBounds;\n }\n\n /**\n * 计算单行文字的bounds,可以缓存长度以及截取的文字\n * @param text\n */\n updateSingallineAABBBounds(text: number | string): IAABBBounds {\n return this.updateMultilineAABBBounds([text]);\n }\n\n /**\n * 计算单行文字的bounds,可以缓存长度以及截取的文字\n * @param text\n */\n protected updateMultilineAABBBounds(text: (number | string)[]): IAABBBounds {\n const textTheme = this.getGraphicTheme();\n const { direction = textTheme.direction, underlineOffset = textTheme.underlineOffset } = this.attribute;\n\n const b =\n direction === 'horizontal'\n ? this.updateHorizontalMultilineAABBBounds(text)\n : this.updateVerticalMultilineAABBBounds(text);\n\n if (direction === 'horizontal') {\n if (underlineOffset) {\n this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset);\n }\n }\n return b;\n }\n\n /**\n * 计算多行文字的bounds,缓存每行文字的布局位置\n * @param text\n */\n updateHorizontalMultilineAABBBounds(text: (number | string)[]): IAABBBounds {\n const textTheme = this.getGraphicTheme();\n\n const attribute = this.attribute;\n const {\n fontFamily = textTheme.fontFamily,\n textAlign = textTheme.textAlign,\n textBaseline = textTheme.textBaseline,\n fontSize = textTheme.fontSize,\n fontWeight = textTheme.fontWeight,\n ellipsis = textTheme.ellipsis,\n maxLineWidth,\n stroke = textTheme.stroke,\n wrap = textTheme.wrap,\n // ignoreBuf = textTheme.ignoreBuf,\n lineWidth = textTheme.lineWidth,\n whiteSpace = textTheme.whiteSpace,\n suffixPosition = textTheme.suffixPosition\n } = attribute;\n\n const lineHeight = this.getLineHeight(attribute, textTheme);\n\n if (whiteSpace === 'normal' || wrap) {\n return this.updateWrapAABBBounds(text);\n }\n if (!this.shouldUpdateShape() && this.cache?.layoutData) {\n const bbox = this.cache.layoutData.bbox;\n this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);\n if (stroke) {\n this._AABBBounds.expand(lineWidth / 2);\n }\n return this._AABBBounds;\n }\n const textMeasure = application.graphicUtil.textMeasure;\n const layoutObj = new CanvasTextLayout(fontFamily, { fontSize, fontWeight, fontFamily }, textMeasure);\n const layoutData = layoutObj.GetLayoutByLines(\n text,\n textAlign,\n textBaseline as any,\n lineHeight,\n ellipsis === true ? (textTheme.ellipsis as string) : ellipsis || undefined,\n false,\n maxLineWidth,\n suffixPosition\n );\n const { bbox } = layoutData;\n this.cache.layoutData = layoutData;\n this.clearUpdateShapeTag();\n\n this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);\n\n if (stroke) {\n this._AABBBounds.expand(lineWidth / 2);\n }\n\n return this._AABBBounds;\n }\n\n /**\n * 计算多行文字的bounds,缓存每行文字的布局位置\n * 自动折行params.text是数组,因此只重新updateMultilineAABBBounds\n * @param text\n */\n updateWrapAABBBounds(text: (number | string) | (number | string)[]) {\n const textTheme = this.getGraphicTheme();\n const {\n fontFamily = textTheme.fontFamily,\n textAlign = textTheme.textAlign,\n textBaseline = textTheme.textBaseline,\n fontSize = textTheme.fontSize,\n ellipsis = textTheme.ellipsis,\n maxLineWidth,\n stroke = textTheme.stroke,\n lineWidth = textTheme.lineWidth,\n wordBreak = textTheme.wordBreak,\n fontWeight = textTheme.fontWeight,\n // widthLimit,\n ignoreBuf = textTheme.ignoreBuf,\n suffixPosition = textTheme.suffixPosition,\n heightLimit = 0,\n lineClamp\n } = this.attribute;\n\n const lineHeight = this.getLineHeight(this.attribute, textTheme);\n\n if (!this.shouldUpdateShape() && this.cache?.layoutData) {\n const bbox = this.cache.layoutData.bbox;\n this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);\n if (stroke) {\n this._AABBBounds.expand(lineWidth / 2);\n }\n return this._AABBBounds;\n }\n\n const textMeasure = application.graphicUtil.textMeasure;\n const textOptions = { fontSize, fontWeight, fontFamily };\n const layoutObj = new CanvasTextLayout(fontFamily, textOptions, textMeasure as any);\n\n // layoutObj内逻辑\n const lines = isArray(text) ? (text.map(l => l.toString()) as string[]) : [text.toString()];\n const linesLayout: LayoutItemType[] = [];\n const bboxWH: [number, number] = [0, 0];\n\n let lineCountLimit = Infinity;\n if (heightLimit > 0) {\n lineCountLimit = Math.max(Math.floor(heightLimit / lineHeight), 1);\n }\n if (lineClamp) {\n // 处理行数限制\n lineCountLimit = Math.min(lineCountLimit, lineClamp);\n }\n\n if (typeof maxLineWidth === 'number' && maxLineWidth !== Infinity) {\n // widthLimit > 0\n if (maxLineWidth > 0) {\n for (let i = 0; i < lines.length; i++) {\n const str = lines[i] as string;\n let needCut = true;\n\n // 判断是否超过高度限制\n if (i === lineCountLimit - 1) {\n // 当前行为最后一行,如果后面还有行,需要显示省略号\n const clip = textMeasure.clipTextWithSuffix(\n str,\n textOptions,\n maxLineWidth,\n ellipsis,\n false,\n suffixPosition,\n i !== lines.length - 1\n );\n const matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions);\n linesLayout.push({\n str: clip.str,\n width: clip.width,\n ascent: matrics.ascent,\n descent: matrics.descent\n });\n break; // 不处理后续行\n }\n\n // 测量截断位置\n const clip = textMeasure.clipText(str, textOptions, maxLineWidth, wordBreak === 'break-word');\n if (str !== '' && clip.str === '') {\n if (ellipsis) {\n const clipEllipsis = textMeasure.clipTextWithSuffix(\n str,\n textOptions,\n maxLineWidth,\n ellipsis,\n false,\n suffixPosition\n );\n clip.str = clipEllipsis.str ?? '';\n clip.width = clipEllipsis.width ?? 0;\n } else {\n // 宽度限制不足一个字符,不显示\n clip.str = '';\n clip.width = 0;\n }\n needCut = false;\n }\n const matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions);\n linesLayout.push({\n str: clip.str,\n width: clip.width,\n ascent: matrics.ascent,\n descent: matrics.descent\n });\n if (clip.str.length === str.length) {\n // 不需要截断\n } else if (needCut) {\n const newStr = str.substring(clip.str.length);\n lines.splice(i + 1, 0, newStr);\n }\n }\n }\n // bboxWH[0] = maxLineWidth;\n let maxWidth = 0;\n linesLayout.forEach(layout => {\n maxWidth = Math.max(maxWidth, layout.width);\n });\n bboxWH[0] = maxWidth;\n } else {\n // 使用所有行中最长的作为lineWidth\n let lineWidth = 0;\n let width: number;\n let text: string;\n for (let i = 0, len = lines.length; i < len; i++) {\n // 判断是否超过高度限制\n if (i === lineCountLimit - 1) {\n // 当前行为最后一行\n const clip = textMeasure.clipTextWithSuffix(\n lines[i],\n textOptions,\n maxLineWidth,\n ellipsis,\n false,\n suffixPosition\n );\n const matrics = textMeasure.measureTextPixelADscentAndWidth(clip.str, textOptions);\n linesLayout.push({\n str: clip.str,\n width: clip.width,\n ascent: matrics.ascent,\n descent: matrics.descent\n });\n lineWidth = Math.max(lineWidth, clip.width);\n break; // 不处理后续行\n }\n\n text = lines[i] as string;\n width = textMeasure.measureTextWidth(text, textOptions);\n lineWidth = Math.max(lineWidth, width);\n const matrics = textMeasure.measureTextPixelADscentAndWidth(text, textOptions);\n linesLayout.push({ str: text, width, ascent: matrics.ascent, descent: matrics.descent });\n }\n bboxWH[0] = lineWidth;\n }\n bboxWH[1] = linesLayout.length * lineHeight;\n\n const bbox = {\n xOffset: 0,\n yOffset: 0,\n width: bboxWH[0],\n height: bboxWH[1]\n };\n\n layoutObj.LayoutBBox(bbox, textAlign, textBaseline as any);\n\n const layoutData = layoutObj.layoutWithBBox(bbox, linesLayout, textAlign, textBaseline as any, lineHeight);\n\n this.cache.layoutData = layoutData;\n this.clearUpdateShapeTag();\n this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height);\n\n if (stroke) {\n this._AABBBounds.expand(lineWidth / 2);\n }\n\n return this._AABBBounds;\n }\n\n /**\n * 计算垂直布局的多行文字的bounds,可以缓存长度以及截取的文字\n * @param text\n */\n updateVerticalMultilineAABBBounds(text: (number | string)[]): IAABBBounds {\n const textTheme = this.getGraphicTheme();\n const textMeasure = application.graphicUtil.textMeasure;\n let width: number;\n const attribute = this.attribute;\n const {\n maxLineWidth = textTheme.maxLineWidth,\n ellipsis = textTheme.ellipsis,\n fontFamily = textTheme.fontFamily,\n fontSize = textTheme.fontSize,\n fontWeight = textTheme.fontWeight,\n stroke = textTheme.stroke,\n lineWidth = textTheme.lineWidth,\n // wordBreak = textTheme.wordBreak,\n verticalMode = textTheme.verticalMode,\n suffixPosition = textTheme.suffixPosition\n } = attribute;\n\n const lineHeight = this.getLineHeight(attribute, textTheme);\n\n let { textAlign = textTheme.textAlign, textBaseline = textTheme.textBaseline } = attribute;\n if (!verticalMode) {\n const t = textAlign;\n textAlign = (Text.baselineMapAlign as any)[textBaseline] ?? 'left';\n textBaseline = (Text.alignMapBaseline as any)[t] ?? 'top';\n }\n width = 0;\n if (!this.shouldUpdateShape() && this.cache) {\n this.cache.verticalList.forEach(item => {\n const w = item.reduce((a, b) => a + b.width, 0);\n width = max(w, width);\n });\n const dx = textDrawOffsetX(textAlign, width);\n const height = this.cache.verticalList.length * lineHeight;\n const dy = textLayoutOffsetY(textBaseline, height, fontSize);\n this._AABBBounds.set(dy, dx, dy + height, dx + width);\n if (stroke) {\n this._AABBBounds.expand(lineWidth / 2);\n }\n return this._AABBBounds;\n }\n\n const verticalLists: { text: string; width?: number; direction: TextDirection }[][] = text.map(str => {\n return verticalLayout(str.toString());\n });\n verticalLists.forEach((verticalData, i) => {\n if (Number.isFinite(maxLineWidth)) {\n if (ellipsis) {\n const strEllipsis = (ellipsis === true ? textTheme.ellipsis : ellipsis) as string;\n const data = textMeasure.clipTextWithSuffixVertical(\n verticalData,\n { fontSize, fontWeight, fontFamily },\n maxLineWidth,\n strEllipsis,\n false,\n suffixPosition\n );\n verticalLists[i] = data.verticalList;\n width = data.width;\n } else {\n const data = textMeasure.clipTextVertical(\n verticalData,\n { fontSize, fontWeight, fontFamily },\n maxLineWidth,\n false\n );\n verticalLists[i] = data.verticalList;\n width = data.width;\n }\n // this.cache.clipedWidth = width;\n // todo 计算原本的宽度\n } else {\n width = 0;\n verticalData.forEach(t => {\n const w =\n t.direction === TextDirection.HORIZONTAL\n ? fontSize\n : textMeasure.measureTextWidth(t.text, { fontSize, fontWeight, fontFamily });\n\n width += w;\n t.width = w;\n });\n }\n });\n this.cache.verticalList = verticalLists;\n this.clearUpdateShapeTag();\n\n this.cache.verticalList.forEach(item => {\n const w = item.reduce((a, b) => a + b.width, 0);\n width = max(w, width);\n });\n\n const dx = textDrawOffsetX(textAlign, width);\n const height = this.cache.verticalList.length * lineHeight;\n const dy = textLayoutOffsetY(textBaseline, height, fontSize);\n this._AABBBounds.set(dy, dx, dy + height, dx + width);\n\n if (stroke) {\n this._AABBBounds.expand(lineWidth / 2);\n }\n\n return this._AABBBounds;\n }\n\n /**\n * 是否是简单文字\n * 单行,横排\n * @returns\n */\n protected isSinglelineAndHorizontal(): boolean {\n return !this.isMultiLine && this.attribute.direction !== 'vertical';\n }\n\n protected getMaxWidth(theme: ITextGraphicAttribute): number {\n // 传入了maxLineWidth就优先使用,否则使用maxWidth\n const attribute = this.attribute;\n return attribute.maxLineWidth ?? attribute.maxWidth ?? theme.maxWidth;\n }\n\n protected getLineHeight(attribute: ITextGraphicAttribute, textTheme: ITextGraphicAttribute) {\n return (\n calculateLineHeight(attribute.lineHeight, attribute.fontSize || textTheme.fontSize) ??\n (attribute.fontSize || textTheme.fontSize)\n );\n }\n\n protected needUpdateTags(keys: string[], k = TEXT_UPDATE_TAG_KEY): boolean {\n return super.needUpdateTags(keys, k);\n }\n protected needUpdateTag(key: string, k = TEXT_UPDATE_TAG_KEY): boolean {\n return super.needUpdateTag(key, k);\n }\n\n clone(): Text {\n return new Text({ ...this.attribute });\n }\n\n getNoWorkAnimateAttr(): Record<string, number> {\n return Text.NOWORK_ANIMATE_ATTR;\n }\n\n /**\n * 用于垂直布局时align和baseline相互转换\n * @returns\n */\n getBaselineMapAlign(): Record<string, string> {\n return Text.baselineMapAlign;\n }\n\n /**\n * 用于垂直布局时align和baseline相互转换\n * @returns\n */\n getAlignMapBaseline(): Record<string, string> {\n return Text.alignMapBaseline;\n }\n\n static baselineMapAlign = {\n top: 'left',\n bottom: 'right',\n middle: 'center'\n };\n\n static alignMapBaseline = {\n left: 'top',\n right: 'bottom',\n center: 'middle'\n };\n}\n\nexport function createText(attributes: ITextGraphicAttribute): IText {\n return new Text(attributes);\n}\n\n// addAttributeToPrototype(DefaultLineStyle, Text, PURE_STYLE_KEY);\n"]}
@@ -1,16 +0,0 @@
1
- import type { IGraphic, IPlugin, IPluginService } from '../../interface';
2
- export declare class AutoRefreshPlugin implements IPlugin {
3
- name: 'AutoRefreshPlugin';
4
- activeEvent: 'onRegister';
5
- pluginService: IPluginService;
6
- _uid: number;
7
- key: string;
8
- dpr: number;
9
- rafId: number;
10
- handleChange: (graphic: IGraphic) => void;
11
- activate(context: IPluginService): void;
12
- refresh(): void;
13
- protected _refreshByRaf(): void;
14
- protected _refreshByMediaQuery(): boolean;
15
- deactivate(context: IPluginService): void;
16
- }
@@ -1,48 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: !0
5
- }), exports.AutoRefreshPlugin = void 0;
6
-
7
- const generator_1 = require("../../common/generator"), application_1 = require("../../application");
8
-
9
- class AutoRefreshPlugin {
10
- constructor() {
11
- this.name = "AutoRefreshPlugin", this.activeEvent = "onRegister", this._uid = generator_1.Generator.GenAutoIncrementId(),
12
- this.key = this.name + this._uid, this.handleChange = graphic => {
13
- graphic.glyphHost && (graphic = graphic.glyphHost), graphic.stage === this.pluginService.stage && null != graphic.stage && graphic.stage.renderNextFrame();
14
- };
15
- }
16
- activate(context) {
17
- this.pluginService = context, this.dpr = application_1.application.global.devicePixelRatio,
18
- this.refresh();
19
- }
20
- refresh() {
21
- this._refreshByMediaQuery() || this._refreshByRaf();
22
- }
23
- _refreshByRaf() {
24
- const raf = application_1.application.global.getRequestAnimationFrame();
25
- this.rafId = raf((() => {
26
- application_1.application.global.devicePixelRatio !== this.dpr && (this.dpr = application_1.application.global.devicePixelRatio,
27
- this.pluginService.stage.setDpr(this.dpr, !0)), this.refresh();
28
- }));
29
- }
30
- _refreshByMediaQuery() {
31
- try {
32
- const mqString = `(resolution: ${window.devicePixelRatio}dppx)`, updatePixelRatio = () => {
33
- window.devicePixelRatio !== this.dpr && (this.dpr = window.devicePixelRatio, this.pluginService.stage.setDpr(this.dpr, !0));
34
- };
35
- matchMedia(mqString).addEventListener("change", updatePixelRatio);
36
- } catch (err) {
37
- return !1;
38
- }
39
- return !0;
40
- }
41
- deactivate(context) {
42
- const craf = application_1.application.global.getCancelAnimationFrame();
43
- craf && this.rafId && craf(this.rafId);
44
- }
45
- }
46
-
47
- exports.AutoRefreshPlugin = AutoRefreshPlugin;
48
- //# sourceMappingURL=auto-refresh-plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/plugins/builtin-plugin/auto-refresh-plugin.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AACnD,mDAAgD;AAGhD,MAAa,iBAAiB;IAA9B;QACE,SAAI,GAAwB,mBAAmB,CAAC;QAChD,gBAAW,GAAiB,YAAY,CAAC;QAEzC,SAAI,GAAW,qBAAS,CAAC,kBAAkB,EAAE,CAAC;QAC9C,QAAG,GA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AEhE,MAAM,gBAAgB,GAAG,GAAG,EAAE;gBAC5B,IAAI,MAAM,CAAC,gBAAgB,KAAK,IAAI,CAAC,GAAG,EAAE;oBACxC,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,gBAAgB,CAAC;oBACnC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;iBACjD;YACH,CAAC,CAAC;YAEF,UAAU,CAAC,QAAQ,CAAC,CAAC,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;SACnE;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,KAAK,CAAC;SACd;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,UAAU,CAAC,OAAuB;QAChC,MAAM,IAAI,GAAG,yBAAW,CAAC,MAAM,CAAC,uBAAuB,EAAE,CAAC;QAC1D,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;CACF;AA5DD,8CA4DC","file":"auto-refresh-plugin.js","sourcesContent":["import { Generator } from '../../common/generator';\nimport { application } from '../../application';\nimport type { IGraphic, IPlugin, IPluginService } from '../../interface';\n\nexport class AutoRefreshPlugin implements IPlugin {\n name: 'AutoRefreshPlugin' = 'AutoRefreshPlugin';\n activeEvent: 'onRegister' = 'onRegister';\n pluginService: IPluginService;\n _uid: number = Generator.GenAutoIncrementId();\n key: string = this.name + this._uid;\n dpr: number;\n rafId: number;\n\n handleChange = (graphic: IGraphic) => {\n if (graphic.glyphHost) {\n graphic = graphic.glyphHost;\n }\n if (graphic.stage === this.pluginService.stage && graphic.stage != null) {\n graphic.stage.renderNextFrame();\n }\n };\n\n activate(context: IPluginService): void {\n this.pluginService = context;\n this.dpr = application.global.devicePixelRatio;\n this.refresh();\n }\n\n refresh() {\n if (!this._refreshByMediaQuery()) {\n this._refreshByRaf();\n }\n }\n protected _refreshByRaf() {\n const raf = application.global.getRequestAnimationFrame();\n this.rafId = raf(() => {\n if (application.global.devicePixelRatio !== this.dpr) {\n this.dpr = application.global.devicePixelRatio;\n this.pluginService.stage.setDpr(this.dpr, true);\n }\n this.refresh();\n });\n }\n protected _refreshByMediaQuery() {\n try {\n const mqString = `(resolution: ${window.devicePixelRatio}dppx)`;\n\n const updatePixelRatio = () => {\n if (window.devicePixelRatio !== this.dpr) {\n this.dpr = window.devicePixelRatio;\n this.pluginService.stage.setDpr(this.dpr, true);\n }\n };\n\n matchMedia(mqString).addEventListener('change', updatePixelRatio);\n } catch (err) {\n return false;\n }\n return true;\n }\n deactivate(context: IPluginService): void {\n const craf = application.global.getCancelAnimationFrame();\n craf && this.rafId && craf(this.rafId);\n }\n}\n"]}
@@ -1,81 +0,0 @@
1
- import type { IAABBBounds } from '@visactor/vutils';
2
- import type { IText, ITextCache, ITextGraphicAttribute, LayoutType } from '../interface';
3
- import { Graphic } from './graphic';
4
- export declare class Text extends Graphic<ITextGraphicAttribute> implements IText {
5
- type: 'text';
6
- static NOWORK_ANIMATE_ATTR: {
7
- strokeSeg: number;
8
- boundsPadding: number;
9
- pickMode: number;
10
- boundsMode: number;
11
- customPickShape: number;
12
- pickable: number;
13
- childrenPickable: number;
14
- visible: number;
15
- zIndex: number;
16
- layout: number;
17
- keepDirIn3d: number;
18
- globalZIndex: number;
19
- outerBorder: number;
20
- innerBorder: number;
21
- lineDash: number;
22
- lineCap: number;
23
- lineJoin: number;
24
- miterLimit: number;
25
- strokeBoundsBuffer: number;
26
- scaleCenter: number;
27
- anchor: number;
28
- anchor3d: number;
29
- postMatrix: number;
30
- backgroundMode: number;
31
- background: number;
32
- texture: number;
33
- cursor: number;
34
- html: number;
35
- ellipsis: number;
36
- wordBreak: number;
37
- direction: number;
38
- textAlign: number;
39
- textBaseline: number;
40
- fontFamily: number;
41
- fontWeight: number;
42
- };
43
- cache: ITextCache;
44
- _font: string;
45
- get font(): string;
46
- get clipedText(): string | undefined;
47
- get clipedWidth(): number | undefined;
48
- get cliped(): boolean | undefined;
49
- get multilineLayout(): LayoutType | undefined;
50
- get isMultiLine(): boolean;
51
- constructor(params?: ITextGraphicAttribute);
52
- isValid(): boolean;
53
- protected _isValid(): boolean;
54
- getGraphicTheme(): Required<ITextGraphicAttribute>;
55
- protected updateAABBBounds(attribute: ITextGraphicAttribute, textTheme: Required<ITextGraphicAttribute>, aabbBounds: IAABBBounds): import("@visactor/vutils").IBounds;
56
- updateSingallineAABBBounds(text: number | string): IAABBBounds;
57
- protected updateMultilineAABBBounds(text: (number | string)[]): IAABBBounds;
58
- updateHorizontalMultilineAABBBounds(text: (number | string)[]): IAABBBounds;
59
- updateWrapAABBBounds(text: (number | string) | (number | string)[]): import("@visactor/vutils").IBounds;
60
- updateVerticalMultilineAABBBounds(text: (number | string)[]): IAABBBounds;
61
- protected isSinglelineAndHorizontal(): boolean;
62
- protected getMaxWidth(theme: ITextGraphicAttribute): number;
63
- protected getLineHeight(attribute: ITextGraphicAttribute, textTheme: ITextGraphicAttribute): number;
64
- protected needUpdateTags(keys: string[], k?: string[]): boolean;
65
- protected needUpdateTag(key: string, k?: string[]): boolean;
66
- clone(): Text;
67
- getNoWorkAnimateAttr(): Record<string, number>;
68
- getBaselineMapAlign(): Record<string, string>;
69
- getAlignMapBaseline(): Record<string, string>;
70
- static baselineMapAlign: {
71
- top: string;
72
- bottom: string;
73
- middle: string;
74
- };
75
- static alignMapBaseline: {
76
- left: string;
77
- right: string;
78
- center: string;
79
- };
80
- }
81
- export declare function createText(attributes: ITextGraphicAttribute): IText;