@wcardinal/wcardinal-ui 0.404.0 → 0.406.0

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 (316) hide show
  1. package/dist/types/wcardinal/ui/d-base-background-snippet.d.ts +2 -1
  2. package/dist/types/wcardinal/ui/d-base-border-snippet.d.ts +2 -1
  3. package/dist/types/wcardinal/ui/d-base-outline-snippet.d.ts +2 -1
  4. package/dist/types/wcardinal/ui/d-button-color.d.ts +0 -1
  5. package/dist/types/wcardinal/ui/d-dialog.d.ts +1 -1
  6. package/dist/types/wcardinal/ui/d-dynamic-text-style.d.ts +17 -11
  7. package/dist/types/wcardinal/ui/d-dynamic-text.d.ts +3 -2
  8. package/dist/types/wcardinal/ui/d-image-base.d.ts +1 -4
  9. package/dist/types/wcardinal/ui/d-image-piece-align.d.ts +4 -4
  10. package/dist/types/wcardinal/ui/d-image-piece-container-impl.d.ts +14 -1
  11. package/dist/types/wcardinal/ui/d-image-piece-container.d.ts +11 -0
  12. package/dist/types/wcardinal/ui/d-image-piece-layouter-part-container.d.ts +2 -2
  13. package/dist/types/wcardinal/ui/d-image-piece-layouter.d.ts +2 -2
  14. package/dist/types/wcardinal/ui/d-input.d.ts +2 -1
  15. package/dist/types/wcardinal/ui/d-menu-item-text.d.ts +3 -2
  16. package/dist/types/wcardinal/ui/d-scroll-bar.d.ts +2 -1
  17. package/dist/types/wcardinal/ui/d-text-base.d.ts +15 -74
  18. package/dist/types/wcardinal/ui/d-text-piece-align-impl.d.ts +20 -0
  19. package/dist/types/wcardinal/ui/d-text-piece-align.d.ts +7 -0
  20. package/dist/types/wcardinal/ui/d-text-piece-impl.d.ts +63 -0
  21. package/dist/types/wcardinal/ui/d-text-piece-style-impl.d.ts +29 -0
  22. package/dist/types/wcardinal/ui/d-text-piece-style.d.ts +16 -0
  23. package/dist/types/wcardinal/ui/d-text-piece.d.ts +61 -0
  24. package/dist/types/wcardinal/ui/shape/e-shape-buffer.d.ts +0 -3
  25. package/dist/types/wcardinal/ui/shape/e-shape-image-like.d.ts +6 -0
  26. package/dist/types/wcardinal/ui/shape/e-shape-points-formatted.d.ts +2 -0
  27. package/dist/types/wcardinal/ui/shape/e-shape-points.d.ts +2 -0
  28. package/dist/types/wcardinal/ui/shape/e-shape-text.d.ts +3 -0
  29. package/dist/types/wcardinal/ui/shape/e-shape-uploaded.d.ts +5 -5
  30. package/dist/types/wcardinal/ui/shape/e-shape.d.ts +2 -2
  31. package/dist/types/wcardinal/ui/shape/index.d.ts +1 -0
  32. package/dist/types/wcardinal/ui/shape/variant/build-line.d.ts +1 -1
  33. package/dist/types/wcardinal/ui/shape/variant/builder-bar.d.ts +3 -3
  34. package/dist/types/wcardinal/ui/shape/variant/builder-base.d.ts +9 -7
  35. package/dist/types/wcardinal/ui/shape/variant/builder-circle.d.ts +3 -3
  36. package/dist/types/wcardinal/ui/shape/variant/builder-image-sdf.d.ts +3 -3
  37. package/dist/types/wcardinal/ui/shape/variant/builder-label.d.ts +10 -9
  38. package/dist/types/wcardinal/ui/shape/variant/builder-line-of-any.d.ts +4 -1
  39. package/dist/types/wcardinal/ui/shape/variant/builder-line-of-circles.d.ts +2 -2
  40. package/dist/types/wcardinal/ui/shape/variant/builder-line-of-rectangle-roundeds.d.ts +3 -3
  41. package/dist/types/wcardinal/ui/shape/variant/builder-line-of-rectangles.d.ts +2 -2
  42. package/dist/types/wcardinal/ui/shape/variant/builder-line-of-triangle-roundeds.d.ts +3 -3
  43. package/dist/types/wcardinal/ui/shape/variant/builder-line-of-triangles.d.ts +2 -2
  44. package/dist/types/wcardinal/ui/shape/variant/builder-line.d.ts +4 -3
  45. package/dist/types/wcardinal/ui/shape/variant/builder-marker-circle.d.ts +3 -3
  46. package/dist/types/wcardinal/ui/shape/variant/builder-marker-rectangle.d.ts +3 -3
  47. package/dist/types/wcardinal/ui/shape/variant/builder-marker-triangle.d.ts +3 -3
  48. package/dist/types/wcardinal/ui/shape/variant/builder-null.d.ts +10 -9
  49. package/dist/types/wcardinal/ui/shape/variant/builder-rectangle-pivoted.d.ts +3 -2
  50. package/dist/types/wcardinal/ui/shape/variant/builder-rectangle-rounded.d.ts +3 -3
  51. package/dist/types/wcardinal/ui/shape/variant/builder-rectangle.d.ts +3 -2
  52. package/dist/types/wcardinal/ui/shape/variant/builder-semicircle.d.ts +3 -3
  53. package/dist/types/wcardinal/ui/shape/variant/builder-text.d.ts +9 -7
  54. package/dist/types/wcardinal/ui/shape/variant/builder-triangle-rounded.d.ts +3 -3
  55. package/dist/types/wcardinal/ui/shape/variant/builder-triangle.d.ts +3 -2
  56. package/dist/types/wcardinal/ui/shape/variant/builder.d.ts +5 -2
  57. package/dist/types/wcardinal/ui/shape/variant/create-line-of-any-uploaded.d.ts +2 -2
  58. package/dist/types/wcardinal/ui/shape/variant/e-shape-bar-points.d.ts +1 -0
  59. package/dist/types/wcardinal/ui/shape/variant/e-shape-base.d.ts +4 -6
  60. package/dist/types/wcardinal/ui/shape/variant/e-shape-group-points.d.ts +1 -0
  61. package/dist/types/wcardinal/ui/shape/variant/e-shape-group-viewer.d.ts +6 -2
  62. package/dist/types/wcardinal/ui/shape/variant/e-shape-group.d.ts +6 -2
  63. package/dist/types/wcardinal/ui/shape/variant/e-shape-image-sdf.d.ts +2 -1
  64. package/dist/types/wcardinal/ui/shape/variant/e-shape-image.d.ts +2 -1
  65. package/dist/types/wcardinal/ui/shape/variant/e-shape-line-of-any-points-impl.d.ts +3 -0
  66. package/dist/types/wcardinal/ui/shape/variant/e-shape-line-points.d.ts +3 -0
  67. package/dist/types/wcardinal/ui/shape/variant/e-shape-primitive.d.ts +7 -3
  68. package/dist/types/wcardinal/ui/shape/variant/e-shape-text-impl.d.ts +5 -0
  69. package/dist/types/wcardinal/ui/shape/variant/to-image-element.d.ts +2 -1
  70. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-input.d.ts +1 -0
  71. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-last.d.ts +5 -4
  72. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-next.d.ts +5 -4
  73. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-previous.d.ts +5 -4
  74. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-top.d.ts +5 -4
  75. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-pagination-dots.d.ts +5 -4
  76. package/dist/types/wcardinal/ui/theme/white/d-theme-white-input.d.ts +1 -0
  77. package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-last.d.ts +5 -4
  78. package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-next.d.ts +5 -4
  79. package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-previous.d.ts +5 -4
  80. package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-button-top.d.ts +5 -4
  81. package/dist/types/wcardinal/ui/theme/white/d-theme-white-pagination-dots.d.ts +5 -4
  82. package/dist/types/wcardinal/ui/util/dynamic-atlas-item-image.d.ts +2 -2
  83. package/dist/types/wcardinal/ui/util/dynamic-sdf-font-generator.d.ts +1 -1
  84. package/dist/wcardinal/ui/d-base-background-snippet.js.map +1 -1
  85. package/dist/wcardinal/ui/d-base-border-snippet.js.map +1 -1
  86. package/dist/wcardinal/ui/d-base-outline-snippet.js.map +1 -1
  87. package/dist/wcardinal/ui/d-button-color-gradient.js +10 -13
  88. package/dist/wcardinal/ui/d-button-color-gradient.js.map +1 -1
  89. package/dist/wcardinal/ui/d-button-color.js +20 -23
  90. package/dist/wcardinal/ui/d-button-color.js.map +1 -1
  91. package/dist/wcardinal/ui/d-button-date.js +4 -4
  92. package/dist/wcardinal/ui/d-button-date.js.map +1 -1
  93. package/dist/wcardinal/ui/d-button-datetime.js +4 -4
  94. package/dist/wcardinal/ui/d-button-datetime.js.map +1 -1
  95. package/dist/wcardinal/ui/d-button-select.js +2 -2
  96. package/dist/wcardinal/ui/d-button-select.js.map +1 -1
  97. package/dist/wcardinal/ui/d-button-time.js +4 -4
  98. package/dist/wcardinal/ui/d-button-time.js.map +1 -1
  99. package/dist/wcardinal/ui/d-dialog-processing.js +1 -1
  100. package/dist/wcardinal/ui/d-dialog-processing.js.map +1 -1
  101. package/dist/wcardinal/ui/d-dialog.js.map +1 -1
  102. package/dist/wcardinal/ui/d-dynamic-text-style.js +39 -65
  103. package/dist/wcardinal/ui/d-dynamic-text-style.js.map +1 -1
  104. package/dist/wcardinal/ui/d-dynamic-text.js +11 -8
  105. package/dist/wcardinal/ui/d-dynamic-text.js.map +1 -1
  106. package/dist/wcardinal/ui/d-image-base.js +6 -18
  107. package/dist/wcardinal/ui/d-image-base.js.map +1 -1
  108. package/dist/wcardinal/ui/d-image-piece-align.js.map +1 -1
  109. package/dist/wcardinal/ui/d-image-piece-container-impl.js +49 -1
  110. package/dist/wcardinal/ui/d-image-piece-container-impl.js.map +1 -1
  111. package/dist/wcardinal/ui/d-image-piece-container.js.map +1 -1
  112. package/dist/wcardinal/ui/d-image-piece-layouter-part-container.js.map +1 -1
  113. package/dist/wcardinal/ui/d-image-piece-layouter.js.map +1 -1
  114. package/dist/wcardinal/ui/d-indicator-processing.js +1 -1
  115. package/dist/wcardinal/ui/d-indicator-processing.js.map +1 -1
  116. package/dist/wcardinal/ui/d-input.js +11 -7
  117. package/dist/wcardinal/ui/d-input.js.map +1 -1
  118. package/dist/wcardinal/ui/d-menu-item-text.js +12 -6
  119. package/dist/wcardinal/ui/d-menu-item-text.js.map +1 -1
  120. package/dist/wcardinal/ui/d-scroll-bar.js.map +1 -1
  121. package/dist/wcardinal/ui/d-table-body-cell-date.js +7 -10
  122. package/dist/wcardinal/ui/d-table-body-cell-date.js.map +1 -1
  123. package/dist/wcardinal/ui/d-table-body-cell-datetime.js +7 -10
  124. package/dist/wcardinal/ui/d-table-body-cell-datetime.js.map +1 -1
  125. package/dist/wcardinal/ui/d-table-body-cell-select-dialog.js +4 -10
  126. package/dist/wcardinal/ui/d-table-body-cell-select-dialog.js.map +1 -1
  127. package/dist/wcardinal/ui/d-table-body-cell-select-promise.js +4 -10
  128. package/dist/wcardinal/ui/d-table-body-cell-select-promise.js.map +1 -1
  129. package/dist/wcardinal/ui/d-table-body-cell-time.js +7 -10
  130. package/dist/wcardinal/ui/d-table-body-cell-time.js.map +1 -1
  131. package/dist/wcardinal/ui/d-text-base.js +55 -247
  132. package/dist/wcardinal/ui/d-text-base.js.map +1 -1
  133. package/dist/wcardinal/ui/d-text-piece-align-impl.js +69 -0
  134. package/dist/wcardinal/ui/d-text-piece-align-impl.js.map +1 -0
  135. package/dist/wcardinal/ui/d-text-piece-align.js +2 -0
  136. package/dist/wcardinal/ui/d-text-piece-align.js.map +1 -0
  137. package/dist/wcardinal/ui/d-text-piece-impl.js +299 -0
  138. package/dist/wcardinal/ui/d-text-piece-impl.js.map +1 -0
  139. package/dist/wcardinal/ui/d-text-piece-style-impl.js +146 -0
  140. package/dist/wcardinal/ui/d-text-piece-style-impl.js.map +1 -0
  141. package/dist/wcardinal/ui/d-text-piece-style.js +2 -0
  142. package/dist/wcardinal/ui/d-text-piece-style.js.map +1 -0
  143. package/dist/wcardinal/ui/d-text-piece.js +2 -0
  144. package/dist/wcardinal/ui/d-text-piece.js.map +1 -0
  145. package/dist/wcardinal/ui/shape/e-shape-buffer.js +11 -27
  146. package/dist/wcardinal/ui/shape/e-shape-buffer.js.map +1 -1
  147. package/dist/wcardinal/ui/shape/e-shape-container.js +1 -1
  148. package/dist/wcardinal/ui/shape/e-shape-container.js.map +1 -1
  149. package/dist/wcardinal/ui/shape/e-shape-image-like.js +2 -0
  150. package/dist/wcardinal/ui/shape/e-shape-image-like.js.map +1 -0
  151. package/dist/wcardinal/ui/shape/e-shape-points-formatted.js.map +1 -1
  152. package/dist/wcardinal/ui/shape/e-shape-points.js.map +1 -1
  153. package/dist/wcardinal/ui/shape/e-shape-renderer.js +7 -13
  154. package/dist/wcardinal/ui/shape/e-shape-renderer.js.map +1 -1
  155. package/dist/wcardinal/ui/shape/e-shape-text.js.map +1 -1
  156. package/dist/wcardinal/ui/shape/e-shape-uploaded.js +22 -8
  157. package/dist/wcardinal/ui/shape/e-shape-uploaded.js.map +1 -1
  158. package/dist/wcardinal/ui/shape/e-shape.js.map +1 -1
  159. package/dist/wcardinal/ui/shape/index.js +1 -0
  160. package/dist/wcardinal/ui/shape/index.js.map +1 -1
  161. package/dist/wcardinal/ui/shape/variant/build-line-of-any.js +1 -1
  162. package/dist/wcardinal/ui/shape/variant/build-line-of-any.js.map +1 -1
  163. package/dist/wcardinal/ui/shape/variant/build-line.js +6 -5
  164. package/dist/wcardinal/ui/shape/variant/build-line.js.map +1 -1
  165. package/dist/wcardinal/ui/shape/variant/build-text.js +1 -1
  166. package/dist/wcardinal/ui/shape/variant/build-text.js.map +1 -1
  167. package/dist/wcardinal/ui/shape/variant/builder-bar.js +6 -4
  168. package/dist/wcardinal/ui/shape/variant/builder-bar.js.map +1 -1
  169. package/dist/wcardinal/ui/shape/variant/builder-base.js +22 -1
  170. package/dist/wcardinal/ui/shape/variant/builder-base.js.map +1 -1
  171. package/dist/wcardinal/ui/shape/variant/builder-circle.js +6 -4
  172. package/dist/wcardinal/ui/shape/variant/builder-circle.js.map +1 -1
  173. package/dist/wcardinal/ui/shape/variant/builder-image-sdf.js +6 -4
  174. package/dist/wcardinal/ui/shape/variant/builder-image-sdf.js.map +1 -1
  175. package/dist/wcardinal/ui/shape/variant/builder-label.js +13 -6
  176. package/dist/wcardinal/ui/shape/variant/builder-label.js.map +1 -1
  177. package/dist/wcardinal/ui/shape/variant/builder-line-of-any.js +36 -5
  178. package/dist/wcardinal/ui/shape/variant/builder-line-of-any.js.map +1 -1
  179. package/dist/wcardinal/ui/shape/variant/builder-line-of-circles.js +4 -2
  180. package/dist/wcardinal/ui/shape/variant/builder-line-of-circles.js.map +1 -1
  181. package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangle-roundeds.js +6 -4
  182. package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangle-roundeds.js.map +1 -1
  183. package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangles.js +4 -2
  184. package/dist/wcardinal/ui/shape/variant/builder-line-of-rectangles.js.map +1 -1
  185. package/dist/wcardinal/ui/shape/variant/builder-line-of-triangle-roundeds.js +6 -4
  186. package/dist/wcardinal/ui/shape/variant/builder-line-of-triangle-roundeds.js.map +1 -1
  187. package/dist/wcardinal/ui/shape/variant/builder-line-of-triangles.js +4 -2
  188. package/dist/wcardinal/ui/shape/variant/builder-line-of-triangles.js.map +1 -1
  189. package/dist/wcardinal/ui/shape/variant/builder-line.js +34 -5
  190. package/dist/wcardinal/ui/shape/variant/builder-line.js.map +1 -1
  191. package/dist/wcardinal/ui/shape/variant/builder-marker-circle.js +6 -4
  192. package/dist/wcardinal/ui/shape/variant/builder-marker-circle.js.map +1 -1
  193. package/dist/wcardinal/ui/shape/variant/builder-marker-rectangle.js +6 -4
  194. package/dist/wcardinal/ui/shape/variant/builder-marker-rectangle.js.map +1 -1
  195. package/dist/wcardinal/ui/shape/variant/builder-marker-triangle.js +6 -4
  196. package/dist/wcardinal/ui/shape/variant/builder-marker-triangle.js.map +1 -1
  197. package/dist/wcardinal/ui/shape/variant/builder-null.js +11 -4
  198. package/dist/wcardinal/ui/shape/variant/builder-null.js.map +1 -1
  199. package/dist/wcardinal/ui/shape/variant/builder-rectangle-pivoted.js +7 -5
  200. package/dist/wcardinal/ui/shape/variant/builder-rectangle-pivoted.js.map +1 -1
  201. package/dist/wcardinal/ui/shape/variant/builder-rectangle-rounded.js +7 -5
  202. package/dist/wcardinal/ui/shape/variant/builder-rectangle-rounded.js.map +1 -1
  203. package/dist/wcardinal/ui/shape/variant/builder-rectangle.js +7 -5
  204. package/dist/wcardinal/ui/shape/variant/builder-rectangle.js.map +1 -1
  205. package/dist/wcardinal/ui/shape/variant/builder-semicircle.js +6 -4
  206. package/dist/wcardinal/ui/shape/variant/builder-semicircle.js.map +1 -1
  207. package/dist/wcardinal/ui/shape/variant/builder-text.js +36 -4
  208. package/dist/wcardinal/ui/shape/variant/builder-text.js.map +1 -1
  209. package/dist/wcardinal/ui/shape/variant/builder-triangle-rounded.js +7 -5
  210. package/dist/wcardinal/ui/shape/variant/builder-triangle-rounded.js.map +1 -1
  211. package/dist/wcardinal/ui/shape/variant/builder-triangle.js +7 -5
  212. package/dist/wcardinal/ui/shape/variant/builder-triangle.js.map +1 -1
  213. package/dist/wcardinal/ui/shape/variant/builder.js.map +1 -1
  214. package/dist/wcardinal/ui/shape/variant/create-bar-uploaded.js +2 -2
  215. package/dist/wcardinal/ui/shape/variant/create-bar-uploaded.js.map +1 -1
  216. package/dist/wcardinal/ui/shape/variant/create-circle-uploaded.js +2 -2
  217. package/dist/wcardinal/ui/shape/variant/create-circle-uploaded.js.map +1 -1
  218. package/dist/wcardinal/ui/shape/variant/create-group-uploaded.js +1 -1
  219. package/dist/wcardinal/ui/shape/variant/create-group-uploaded.js.map +1 -1
  220. package/dist/wcardinal/ui/shape/variant/create-image-sdf-uploaded.js +2 -2
  221. package/dist/wcardinal/ui/shape/variant/create-image-sdf-uploaded.js.map +1 -1
  222. package/dist/wcardinal/ui/shape/variant/create-image-sdf.js +4 -4
  223. package/dist/wcardinal/ui/shape/variant/create-image-sdf.js.map +1 -1
  224. package/dist/wcardinal/ui/shape/variant/create-image.js +2 -2
  225. package/dist/wcardinal/ui/shape/variant/create-image.js.map +1 -1
  226. package/dist/wcardinal/ui/shape/variant/create-label-uploaded.js +2 -2
  227. package/dist/wcardinal/ui/shape/variant/create-label-uploaded.js.map +1 -1
  228. package/dist/wcardinal/ui/shape/variant/create-line-of-any-uploaded.js +4 -4
  229. package/dist/wcardinal/ui/shape/variant/create-line-of-any-uploaded.js.map +1 -1
  230. package/dist/wcardinal/ui/shape/variant/create-line-uploaded.js +16 -16
  231. package/dist/wcardinal/ui/shape/variant/create-line-uploaded.js.map +1 -1
  232. package/dist/wcardinal/ui/shape/variant/create-null-uploaded.js +1 -1
  233. package/dist/wcardinal/ui/shape/variant/create-null-uploaded.js.map +1 -1
  234. package/dist/wcardinal/ui/shape/variant/create-rectangle-pivoted-uploaded.js +2 -2
  235. package/dist/wcardinal/ui/shape/variant/create-rectangle-pivoted-uploaded.js.map +1 -1
  236. package/dist/wcardinal/ui/shape/variant/create-rectangle-rounded-uploaded.js +2 -2
  237. package/dist/wcardinal/ui/shape/variant/create-rectangle-rounded-uploaded.js.map +1 -1
  238. package/dist/wcardinal/ui/shape/variant/create-rectangle-uploaded.js +2 -2
  239. package/dist/wcardinal/ui/shape/variant/create-rectangle-uploaded.js.map +1 -1
  240. package/dist/wcardinal/ui/shape/variant/create-semicircle-uploaded.js +2 -2
  241. package/dist/wcardinal/ui/shape/variant/create-semicircle-uploaded.js.map +1 -1
  242. package/dist/wcardinal/ui/shape/variant/create-triangle-rounded-uploaded.js +2 -2
  243. package/dist/wcardinal/ui/shape/variant/create-triangle-rounded-uploaded.js.map +1 -1
  244. package/dist/wcardinal/ui/shape/variant/create-triangle-uploaded.js +2 -2
  245. package/dist/wcardinal/ui/shape/variant/create-triangle-uploaded.js.map +1 -1
  246. package/dist/wcardinal/ui/shape/variant/e-shape-bar-points.js +7 -0
  247. package/dist/wcardinal/ui/shape/variant/e-shape-bar-points.js.map +1 -1
  248. package/dist/wcardinal/ui/shape/variant/e-shape-base.js +0 -25
  249. package/dist/wcardinal/ui/shape/variant/e-shape-base.js.map +1 -1
  250. package/dist/wcardinal/ui/shape/variant/e-shape-group-points.js +14 -0
  251. package/dist/wcardinal/ui/shape/variant/e-shape-group-points.js.map +1 -1
  252. package/dist/wcardinal/ui/shape/variant/e-shape-group-viewer.js +6 -0
  253. package/dist/wcardinal/ui/shape/variant/e-shape-group-viewer.js.map +1 -1
  254. package/dist/wcardinal/ui/shape/variant/e-shape-group.js +6 -0
  255. package/dist/wcardinal/ui/shape/variant/e-shape-group.js.map +1 -1
  256. package/dist/wcardinal/ui/shape/variant/e-shape-image-sdf.js.map +1 -1
  257. package/dist/wcardinal/ui/shape/variant/e-shape-image.js.map +1 -1
  258. package/dist/wcardinal/ui/shape/variant/e-shape-line-of-any-points-impl.js +15 -2
  259. package/dist/wcardinal/ui/shape/variant/e-shape-line-of-any-points-impl.js.map +1 -1
  260. package/dist/wcardinal/ui/shape/variant/e-shape-line-points.js +19 -3
  261. package/dist/wcardinal/ui/shape/variant/e-shape-line-points.js.map +1 -1
  262. package/dist/wcardinal/ui/shape/variant/e-shape-primitive.js +15 -2
  263. package/dist/wcardinal/ui/shape/variant/e-shape-primitive.js.map +1 -1
  264. package/dist/wcardinal/ui/shape/variant/e-shape-text-impl.js +57 -24
  265. package/dist/wcardinal/ui/shape/variant/e-shape-text-impl.js.map +1 -1
  266. package/dist/wcardinal/ui/shape/variant/to-image-element.js +9 -3
  267. package/dist/wcardinal/ui/shape/variant/to-image-element.js.map +1 -1
  268. package/dist/wcardinal/ui/theme/dark/d-theme-dark-input.js +6 -0
  269. package/dist/wcardinal/ui/theme/dark/d-theme-dark-input.js.map +1 -1
  270. package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-last.js.map +1 -1
  271. package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-next.js.map +1 -1
  272. package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-previous.js.map +1 -1
  273. package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-button-top.js.map +1 -1
  274. package/dist/wcardinal/ui/theme/dark/d-theme-dark-pagination-dots.js.map +1 -1
  275. package/dist/wcardinal/ui/theme/dark/d-theme-dark-select-multiple.js +9 -9
  276. package/dist/wcardinal/ui/theme/dark/d-theme-dark-select-multiple.js.map +1 -1
  277. package/dist/wcardinal/ui/theme/dark/d-theme-dark-select.js +7 -7
  278. package/dist/wcardinal/ui/theme/dark/d-theme-dark-select.js.map +1 -1
  279. package/dist/wcardinal/ui/theme/white/d-theme-white-input.js +6 -0
  280. package/dist/wcardinal/ui/theme/white/d-theme-white-input.js.map +1 -1
  281. package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-last.js.map +1 -1
  282. package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-next.js.map +1 -1
  283. package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-previous.js.map +1 -1
  284. package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-button-top.js.map +1 -1
  285. package/dist/wcardinal/ui/theme/white/d-theme-white-pagination-dots.js.map +1 -1
  286. package/dist/wcardinal/ui/theme/white/d-theme-white-select-multiple.js +9 -9
  287. package/dist/wcardinal/ui/theme/white/d-theme-white-select-multiple.js.map +1 -1
  288. package/dist/wcardinal/ui/theme/white/d-theme-white-select.js +7 -7
  289. package/dist/wcardinal/ui/theme/white/d-theme-white-select.js.map +1 -1
  290. package/dist/wcardinal/ui/util/dynamic-atlas-item-image.js +18 -9
  291. package/dist/wcardinal/ui/util/dynamic-atlas-item-image.js.map +1 -1
  292. package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas.js +1 -1
  293. package/dist/wcardinal/ui/util/dynamic-sdf-font-atlas.js.map +1 -1
  294. package/dist/wcardinal/ui/util/dynamic-sdf-font-generator.js +1 -3
  295. package/dist/wcardinal/ui/util/dynamic-sdf-font-generator.js.map +1 -1
  296. package/dist/wcardinal-ui-theme-dark-en-us.js +23 -17
  297. package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
  298. package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
  299. package/dist/wcardinal-ui-theme-dark-ja-jp.js +23 -17
  300. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
  301. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
  302. package/dist/wcardinal-ui-theme-dark.js +23 -17
  303. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  304. package/dist/wcardinal-ui-theme-white-en-us.js +23 -17
  305. package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
  306. package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
  307. package/dist/wcardinal-ui-theme-white-ja-jp.js +23 -17
  308. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
  309. package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
  310. package/dist/wcardinal-ui-theme-white.js +23 -17
  311. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  312. package/dist/wcardinal-ui.cjs.js +1550 -984
  313. package/dist/wcardinal-ui.js +1505 -951
  314. package/dist/wcardinal-ui.min.js +2 -2
  315. package/dist/wcardinal-ui.min.js.map +1 -1
  316. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.404.0
2
+ Winter Cardinal UI v0.406.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -68,7 +68,6 @@
68
68
  */
69
69
  var EShapeUploadedImpl = /** @class */ (function () {
70
70
  function EShapeUploadedImpl(buffer, vertexOffset, indexOffset, vertexCount, indexCount, builders) {
71
- this.buffer = buffer;
72
71
  this._builders = builders;
73
72
  this._vertexOffset = vertexOffset;
74
73
  this._indexOffset = indexOffset;
@@ -77,20 +76,38 @@
77
76
  }
78
77
  EShapeUploadedImpl.prototype.init = function (shape) {
79
78
  shape.uploaded = this;
80
- var buffer = this.buffer;
81
79
  var builders = this._builders;
82
80
  for (var i = 0, imax = builders.length; i < imax; ++i) {
83
- builders[i].init(buffer);
81
+ builders[i].init();
84
82
  }
85
83
  this.update(shape);
86
84
  return this;
87
85
  };
86
+ EShapeUploadedImpl.prototype.reinit = function (buffer, shape, vertexOffset, indexOffset) {
87
+ var builders = this._builders;
88
+ var voffset = vertexOffset;
89
+ var ioffset = indexOffset;
90
+ for (var i = 0, imax = builders.length; i < imax; ++i) {
91
+ var builder = builders[i];
92
+ if (!builder.reinit(buffer, shape, voffset, ioffset)) {
93
+ return false;
94
+ }
95
+ var vertexCount = builder.vertexCount;
96
+ var indexCount = builder.indexCount;
97
+ voffset += vertexCount;
98
+ ioffset += indexCount;
99
+ }
100
+ this._vertexCount = voffset - vertexOffset;
101
+ this._indexCount = ioffset - indexOffset;
102
+ this.update(shape);
103
+ return true;
104
+ };
88
105
  EShapeUploadedImpl.prototype.update = function (shape) {
89
- var buffer = this.buffer;
90
106
  var builders = this._builders;
91
107
  for (var i = 0, imax = builders.length; i < imax; ++i) {
92
- builders[i].update(buffer, shape);
108
+ builders[i].update(shape);
93
109
  }
110
+ return this;
94
111
  };
95
112
  EShapeUploadedImpl.prototype.isCompatible = function (shape) {
96
113
  var builders = this._builders;
@@ -101,9 +118,6 @@
101
118
  }
102
119
  return true;
103
120
  };
104
- EShapeUploadedImpl.prototype.getBuffer = function () {
105
- return this.buffer;
106
- };
107
121
  EShapeUploadedImpl.prototype.getVertexOffset = function () {
108
122
  return this._vertexOffset;
109
123
  };
@@ -486,7 +500,7 @@
486
500
  var TEXT_FMIN = 0.00001;
487
501
  var TEXT_WORK_POINT = new pixi_js.Point();
488
502
  var toTextBufferCount = function (shape) {
489
- var l = shape.text.value.length;
503
+ var l = shape.text.plength;
490
504
  return ((l >> 3) + (0 < (l & 0x7) ? 1 : 0)) << 3;
491
505
  };
492
506
  var buildTextClipping = function (clippings, voffset, vcount) {
@@ -1483,7 +1497,8 @@
1483
1497
  * SPDX-License-Identifier: Apache-2.0
1484
1498
  */
1485
1499
  var BuilderBase = /** @class */ (function () {
1486
- function BuilderBase(vertexOffset, indexOffset, vertexCount, indexCount) {
1500
+ function BuilderBase(buffer, vertexOffset, indexOffset, vertexCount, indexCount) {
1501
+ this.buffer = buffer;
1487
1502
  this.vertexOffset = vertexOffset;
1488
1503
  this.indexOffset = indexOffset;
1489
1504
  this.vertexCount = vertexCount;
@@ -1503,6 +1518,26 @@
1503
1518
  this.texture = null;
1504
1519
  this.textureTransformId = -1;
1505
1520
  }
1521
+ BuilderBase.prototype.reinit = function (buffer, shape, vertexOffset, indexOffset) {
1522
+ if (this.buffer !== buffer ||
1523
+ this.vertexOffset !== vertexOffset ||
1524
+ this.indexOffset !== indexOffset) {
1525
+ if (buffer.check(vertexOffset, indexOffset, this.vertexCount, this.indexCount)) {
1526
+ this.inited = BuilderFlag.NONE;
1527
+ this.buffer = buffer;
1528
+ this.vertexOffset = vertexOffset;
1529
+ this.indexOffset = indexOffset;
1530
+ this.init();
1531
+ return true;
1532
+ }
1533
+ else {
1534
+ return false;
1535
+ }
1536
+ }
1537
+ else {
1538
+ return true;
1539
+ }
1540
+ };
1506
1541
  BuilderBase.prototype.isCompatible = function (shape) {
1507
1542
  return true;
1508
1543
  };
@@ -2105,6 +2140,13 @@
2105
2140
  enumerable: false,
2106
2141
  configurable: true
2107
2142
  });
2143
+ Object.defineProperty(EShapeBarPoints.prototype, "plength", {
2144
+ get: function () {
2145
+ return 2;
2146
+ },
2147
+ enumerable: false,
2148
+ configurable: true
2149
+ });
2108
2150
  Object.defineProperty(EShapeBarPoints.prototype, "id", {
2109
2151
  get: function () {
2110
2152
  this.update();
@@ -4507,21 +4549,6 @@
4507
4549
  return -ax <= x && x <= +ax && -ay <= y && y <= +ay;
4508
4550
  };
4509
4551
 
4510
- /*
4511
- * Copyright (C) 2019 Toshiba Corporation
4512
- * SPDX-License-Identifier: Apache-2.0
4513
- */
4514
- var toGradientSerialized = function (gradient) {
4515
- var points = gradient.points;
4516
- var result = "[".concat(gradient.direction);
4517
- for (var i = 0, imax = points.length, j = 1; i < imax; i += 1, j += 3) {
4518
- var point = points[i];
4519
- result += ",".concat(point.color, ",").concat(point.alpha, ",").concat(point.position);
4520
- }
4521
- result += "]";
4522
- return result;
4523
- };
4524
-
4525
4552
  /*
4526
4553
  * Copyright (C) 2019 Toshiba Corporation
4527
4554
  * SPDX-License-Identifier: Apache-2.0
@@ -4922,16 +4949,6 @@
4922
4949
  }
4923
4950
  }
4924
4951
  };
4925
- Object.defineProperty(EShapeBase.prototype, "image", {
4926
- get: function () {
4927
- return this._image;
4928
- },
4929
- set: function (image) {
4930
- this._image = image;
4931
- },
4932
- enumerable: false,
4933
- configurable: true
4934
- });
4935
4952
  Object.defineProperty(EShapeBase.prototype, "points", {
4936
4953
  get: function () {
4937
4954
  return this._points;
@@ -5080,20 +5097,6 @@
5080
5097
  }
5081
5098
  return childrenSerialized;
5082
5099
  };
5083
- EShapeBase.prototype.serializeImage = function (manager) {
5084
- var image = this._image;
5085
- return image != null ? manager.addResource(image.src) : -1;
5086
- };
5087
- EShapeBase.prototype.serializeGradient = function (manager) {
5088
- var gradient = this.gradient;
5089
- if (gradient != null) {
5090
- if (gradient.serialized == null) {
5091
- gradient.serialized = toGradientSerialized(gradient);
5092
- }
5093
- return manager.addResource(gradient.serialized);
5094
- }
5095
- return -1;
5096
- };
5097
5100
  EShapeBase.prototype.serializeState = function (manager) {
5098
5101
  var state = this.state;
5099
5102
  return (this.interactive ? 1 : 0) | (state.isFocusable ? 0 : 2) | (state.isActive ? 4 : 0);
@@ -7778,6 +7781,7 @@
7778
7781
  this._parent = parent;
7779
7782
  this._enable = true;
7780
7783
  this._value = value;
7784
+ this._plength = this._length = value.length;
7781
7785
  this._color = color;
7782
7786
  this._alpha = alpha;
7783
7787
  this._family = family;
@@ -7813,39 +7817,60 @@
7813
7817
  set: function (value) {
7814
7818
  if (this._value !== value) {
7815
7819
  this._value = value;
7816
- // Compatibility check
7817
- var parent_1 = this._parent;
7818
- var uploaded = parent_1.uploaded;
7819
- if (uploaded == null || !uploaded.isCompatible(parent_1)) {
7820
- this.atlas = undefined;
7821
- parent_1.toDirty();
7822
- return;
7820
+ var length_1 = value.length;
7821
+ this._length = length_1;
7822
+ if (this._plength < length_1) {
7823
+ this._plength = length_1;
7823
7824
  }
7824
- // Character code check
7825
- var atlas = this.atlas;
7826
- var characters = atlas && atlas.characters;
7827
- if (characters != null) {
7828
- for (var i = 0, imax = value.length; i < imax; ++i) {
7829
- var char = value[i];
7830
- if (!(char in characters)) {
7831
- this.atlas = undefined;
7832
- parent_1.toDirty();
7833
- return;
7834
- }
7835
- }
7825
+ if (this.isCompatible(value)) {
7826
+ this._parent.updateUploaded();
7836
7827
  }
7837
7828
  else {
7838
7829
  this.atlas = undefined;
7839
- parent_1.toDirty();
7840
- return;
7830
+ this._parent.toDirty();
7841
7831
  }
7842
- // Update uploaded
7843
- parent_1.updateUploaded();
7844
7832
  }
7845
7833
  },
7846
7834
  enumerable: false,
7847
7835
  configurable: true
7848
7836
  });
7837
+ EShapeTextImpl.prototype.isCompatible = function (value) {
7838
+ // Compatibility check
7839
+ var parent = this._parent;
7840
+ var uploaded = parent.uploaded;
7841
+ if (uploaded == null || !uploaded.isCompatible(parent)) {
7842
+ return false;
7843
+ }
7844
+ // Character code check
7845
+ var atlas = this.atlas;
7846
+ var characters = atlas && atlas.characters;
7847
+ if (characters != null) {
7848
+ for (var i = 0, imax = value.length; i < imax; ++i) {
7849
+ var char = value[i];
7850
+ if (!(char in characters)) {
7851
+ return false;
7852
+ }
7853
+ }
7854
+ }
7855
+ else {
7856
+ return false;
7857
+ }
7858
+ return true;
7859
+ };
7860
+ Object.defineProperty(EShapeTextImpl.prototype, "length", {
7861
+ get: function () {
7862
+ return this._length;
7863
+ },
7864
+ enumerable: false,
7865
+ configurable: true
7866
+ });
7867
+ Object.defineProperty(EShapeTextImpl.prototype, "plength", {
7868
+ get: function () {
7869
+ return this._plength;
7870
+ },
7871
+ enumerable: false,
7872
+ configurable: true
7873
+ });
7849
7874
  Object.defineProperty(EShapeTextImpl.prototype, "family", {
7850
7875
  get: function () {
7851
7876
  return this._family;
@@ -7979,7 +8004,18 @@
7979
8004
  var isChangedUploaded = false;
7980
8005
  if (value != null && this._value !== value) {
7981
8006
  this._value = value;
7982
- isChangedDirty = true;
8007
+ var length_2 = value.length;
8008
+ this._length = length_2;
8009
+ if (this._plength < length_2) {
8010
+ this._plength = length_2;
8011
+ }
8012
+ if (this.isCompatible(value)) {
8013
+ isChangedUploaded = true;
8014
+ }
8015
+ else {
8016
+ this.atlas = undefined;
8017
+ isChangedDirty = true;
8018
+ }
7983
8019
  }
7984
8020
  if (color != null && this._color !== color) {
7985
8021
  this._color = color;
@@ -8078,6 +8114,21 @@
8078
8114
  return EShapeTextImpl;
8079
8115
  }());
8080
8116
 
8117
+ /*
8118
+ * Copyright (C) 2019 Toshiba Corporation
8119
+ * SPDX-License-Identifier: Apache-2.0
8120
+ */
8121
+ var toGradientSerialized = function (gradient) {
8122
+ var points = gradient.points;
8123
+ var result = "[".concat(gradient.direction);
8124
+ for (var i = 0, imax = points.length, j = 1; i < imax; i += 1, j += 3) {
8125
+ var point = points[i];
8126
+ result += ",".concat(point.color, ",").concat(point.alpha, ",").concat(point.position);
8127
+ }
8128
+ result += "]";
8129
+ return result;
8130
+ };
8131
+
8081
8132
  /*
8082
8133
  * Copyright (C) 2019 Toshiba Corporation
8083
8134
  * SPDX-License-Identifier: Apache-2.0
@@ -8146,11 +8197,9 @@
8146
8197
  if (this._image !== image) {
8147
8198
  if (image != null) {
8148
8199
  this._image = image;
8149
- this.imageSrc = image.src;
8150
8200
  }
8151
8201
  else {
8152
8202
  this._image = undefined;
8153
- this.imageSrc = undefined;
8154
8203
  }
8155
8204
  var parent_1 = this.parent;
8156
8205
  if (parent_1 != null) {
@@ -8161,6 +8210,20 @@
8161
8210
  enumerable: false,
8162
8211
  configurable: true
8163
8212
  });
8213
+ EShapePrimitive.prototype.serializeImage = function (manager) {
8214
+ var image = this._image;
8215
+ return image != null ? manager.addResource(image.url) : -1;
8216
+ };
8217
+ EShapePrimitive.prototype.serializeGradient = function (manager) {
8218
+ var gradient = this.gradient;
8219
+ if (gradient != null) {
8220
+ if (gradient.serialized == null) {
8221
+ gradient.serialized = toGradientSerialized(gradient);
8222
+ }
8223
+ return manager.addResource(gradient.serialized);
8224
+ }
8225
+ return -1;
8226
+ };
8164
8227
  return EShapePrimitive;
8165
8228
  }(EShapeBase));
8166
8229
 
@@ -8517,22 +8580,24 @@
8517
8580
  */
8518
8581
  var BuilderBar = /** @class */ (function (_super) {
8519
8582
  __extends(BuilderBar, _super);
8520
- function BuilderBar(vertexOffset, indexOffset) {
8521
- var _this = _super.call(this, vertexOffset, indexOffset, BAR_VERTEX_COUNT, BAR_INDEX_COUNT) || this;
8583
+ function BuilderBar(buffer, vertexOffset, indexOffset) {
8584
+ var _this = _super.call(this, buffer, vertexOffset, indexOffset, BAR_VERTEX_COUNT, BAR_INDEX_COUNT) || this;
8522
8585
  _this.pointsId = -1;
8523
8586
  _this.pointsStyle = EShapePointsStyle.NONE;
8524
8587
  return _this;
8525
8588
  }
8526
- BuilderBar.prototype.init = function (buffer) {
8589
+ BuilderBar.prototype.init = function () {
8527
8590
  var voffset = this.vertexOffset;
8528
8591
  var ioffset = this.indexOffset;
8592
+ var buffer = this.buffer;
8529
8593
  buffer.updateClippings();
8530
8594
  buffer.updateIndices();
8531
8595
  buildBarClipping(buffer.clippings, voffset);
8532
8596
  buildBarIndex(buffer.indices, voffset, ioffset);
8533
8597
  this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
8534
8598
  };
8535
- BuilderBar.prototype.update = function (buffer, shape) {
8599
+ BuilderBar.prototype.update = function (shape) {
8600
+ var buffer = this.buffer;
8536
8601
  this.updateVertexStepAndColorFill(buffer, shape);
8537
8602
  this.updateColorStroke(buffer, shape);
8538
8603
  this.updateUv(buffer, shape);
@@ -8602,7 +8667,8 @@
8602
8667
  * SPDX-License-Identifier: Apache-2.0
8603
8668
  */
8604
8669
  var BuilderText = /** @class */ (function () {
8605
- function BuilderText(vertexOffset, indexOffset, vertexCount, indexCount) {
8670
+ function BuilderText(buffer, vertexOffset, indexOffset, vertexCount, indexCount) {
8671
+ this.buffer = buffer;
8606
8672
  this.vertexOffset = vertexOffset;
8607
8673
  this.indexOffset = indexOffset;
8608
8674
  this.vertexCount = vertexCount;
@@ -8637,10 +8703,11 @@
8637
8703
  this.clipping = false;
8638
8704
  this.fitting = false;
8639
8705
  }
8640
- BuilderText.prototype.init = function (buffer) {
8706
+ BuilderText.prototype.init = function () {
8641
8707
  var vcount = this.vertexCount;
8642
8708
  if (0 < vcount) {
8643
8709
  // Clippings
8710
+ var buffer = this.buffer;
8644
8711
  var voffset = this.vertexOffset;
8645
8712
  buffer.updateClippings();
8646
8713
  buildTextClipping(buffer.clippings, voffset, vcount);
@@ -8649,21 +8716,51 @@
8649
8716
  buildTextIndex(buffer.indices, voffset, this.indexOffset, this.indexCount);
8650
8717
  }
8651
8718
  this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
8719
+ return this;
8720
+ };
8721
+ BuilderText.prototype.reinit = function (buffer, shape, vertexOffset, indexOffset) {
8722
+ var tcount = toTextBufferCount(shape);
8723
+ var vertexCount = tcount << TEXT_VERTEX_COUNT_SHIFT;
8724
+ var indexCount = tcount << TEXT_INDEX_COUNT_SHIFT;
8725
+ if (this.buffer !== buffer ||
8726
+ this.vertexOffset !== vertexOffset ||
8727
+ this.indexOffset !== indexOffset ||
8728
+ this.vertexCount !== vertexCount ||
8729
+ this.indexCount !== indexCount) {
8730
+ if (buffer.check(vertexOffset, indexOffset, vertexCount, indexCount)) {
8731
+ this.inited = BuilderFlag.NONE;
8732
+ this.buffer = buffer;
8733
+ this.vertexOffset = vertexOffset;
8734
+ this.indexOffset = indexOffset;
8735
+ this.vertexCount = vertexCount;
8736
+ this.indexCount = indexCount;
8737
+ this.init();
8738
+ return true;
8739
+ }
8740
+ else {
8741
+ return false;
8742
+ }
8743
+ }
8744
+ else {
8745
+ return true;
8746
+ }
8652
8747
  };
8653
8748
  BuilderText.prototype.isCompatible = function (shape) {
8654
8749
  return toTextBufferCount(shape) << TEXT_VERTEX_COUNT_SHIFT === this.vertexCount;
8655
8750
  };
8656
- BuilderText.prototype.update = function (buffer, shape) {
8751
+ BuilderText.prototype.update = function (shape) {
8657
8752
  var vcount = this.vertexCount;
8658
8753
  if (0 < vcount) {
8659
8754
  var textAtlas = shape.text.atlas;
8660
8755
  if (textAtlas != null) {
8756
+ var buffer = this.buffer;
8661
8757
  this.updateVertex(buffer, shape, textAtlas);
8662
8758
  this.updateColorFill(buffer, shape);
8663
8759
  this.updateColorStroke(buffer, shape);
8664
8760
  this.updateStep(buffer, shape);
8665
8761
  }
8666
8762
  }
8763
+ return this;
8667
8764
  };
8668
8765
  BuilderText.prototype.updateVertex = function (buffer, shape, textAtlas) {
8669
8766
  var size = shape.size;
@@ -8832,8 +8929,8 @@
8832
8929
  var icount = BAR_INDEX_COUNT + ticount;
8833
8930
  if (buffer.check(voffset, ioffset, vcount, icount)) {
8834
8931
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
8835
- new BuilderBar(voffset, ioffset),
8836
- new BuilderText(voffset + BAR_VERTEX_COUNT, ioffset + BAR_INDEX_COUNT, tvcount, ticount)
8932
+ new BuilderBar(buffer, voffset, ioffset),
8933
+ new BuilderText(buffer, voffset + BAR_VERTEX_COUNT, ioffset + BAR_INDEX_COUNT, tvcount, ticount)
8837
8934
  ]).init(shape);
8838
8935
  }
8839
8936
  return null;
@@ -17838,6 +17935,9 @@
17838
17935
  enumerable: false,
17839
17936
  configurable: true
17840
17937
  });
17938
+ EShapeGroupViewer.prototype.serializeGradient = function (manager) {
17939
+ return -1;
17940
+ };
17841
17941
  Object.defineProperty(EShapeGroupViewer.prototype, "radius", {
17842
17942
  get: function () {
17843
17943
  return 0;
@@ -17858,6 +17958,9 @@
17858
17958
  enumerable: false,
17859
17959
  configurable: true
17860
17960
  });
17961
+ EShapeGroupViewer.prototype.serializeImage = function (manager) {
17962
+ return -1;
17963
+ };
17861
17964
  Object.defineProperty(EShapeGroupViewer.prototype, "points", {
17862
17965
  get: function () {
17863
17966
  return undefined;
@@ -19750,6 +19853,8 @@
19750
19853
  this._valuesBaseLength = 0;
19751
19854
  this._values = [];
19752
19855
  this._segments = [];
19856
+ this._length = 0;
19857
+ this._plength = 0;
19753
19858
  var parentSize = parent.size;
19754
19859
  var parentSizeX = parentSize.x;
19755
19860
  var parentSizeY = parentSize.y;
@@ -19761,7 +19866,14 @@
19761
19866
  }
19762
19867
  Object.defineProperty(EShapeLinePoints.prototype, "length", {
19763
19868
  get: function () {
19764
- return this._values.length >> 1;
19869
+ return this._length;
19870
+ },
19871
+ enumerable: false,
19872
+ configurable: true
19873
+ });
19874
+ Object.defineProperty(EShapeLinePoints.prototype, "plength", {
19875
+ get: function () {
19876
+ return this._plength;
19765
19877
  },
19766
19878
  enumerable: false,
19767
19879
  configurable: true
@@ -19818,7 +19930,6 @@
19818
19930
  if (this._formatter || this._style & EShapePointsStyle.FORMATTER_MASK) {
19819
19931
  var uploaded = parent.uploaded;
19820
19932
  if (uploaded && !uploaded.isCompatible(parent)) {
19821
- parent.uploaded = undefined;
19822
19933
  parent.toDirty();
19823
19934
  }
19824
19935
  }
@@ -19922,6 +20033,7 @@
19922
20033
  if (result == null) {
19923
20034
  result = {
19924
20035
  length: 0,
20036
+ plength: 0,
19925
20037
  values: [],
19926
20038
  segments: [],
19927
20039
  boundary: [0, 0, 0, 0],
@@ -19932,6 +20044,9 @@
19932
20044
  var segments = this._segments;
19933
20045
  var length_1 = values.length >> 1;
19934
20046
  formatter(length_1, values, segments, style, result);
20047
+ if (result.plength < result.length) {
20048
+ result.plength = result.length;
20049
+ }
19935
20050
  toPointsBoundary(result.values, result.boundary);
19936
20051
  }
19937
20052
  else {
@@ -20021,6 +20136,11 @@
20021
20136
  }
20022
20137
  }
20023
20138
  }
20139
+ var newLength = newValuesLength >> 1;
20140
+ this._length = newLength;
20141
+ if (this._plength < newLength) {
20142
+ this._plength = newLength;
20143
+ }
20024
20144
  }
20025
20145
  // Segments
20026
20146
  if (newSegments != null) {
@@ -20086,7 +20206,6 @@
20086
20206
  parent_1.updateUploaded();
20087
20207
  }
20088
20208
  else {
20089
- parent_1.uploaded = undefined;
20090
20209
  parent_1.toDirty();
20091
20210
  }
20092
20211
  }
@@ -21048,12 +21167,10 @@
21048
21167
  }
21049
21168
  }
21050
21169
  };
21051
- DynamicSDFFontGenerator.prototype.updateTexture = function (source) {
21170
+ DynamicSDFFontGenerator.prototype.updateTexture = function (width, height, source) {
21052
21171
  var gl = this._gl;
21053
21172
  var canvas = this._canvas;
21054
21173
  if (gl != null && gl.isContextLost() !== true && canvas != null) {
21055
- var width = source.width;
21056
- var height = source.height;
21057
21174
  if (canvas.width !== width || canvas.height !== height) {
21058
21175
  canvas.width = width;
21059
21176
  canvas.height = height;
@@ -21416,7 +21533,7 @@
21416
21533
  context.fillText(data.character, data.origin.x, data.origin.y);
21417
21534
  }
21418
21535
  // Convert to SDF font texture
21419
- generator.updateTexture(canvas);
21536
+ generator.updateTexture(width, height, canvas);
21420
21537
  generator.render();
21421
21538
  generator.read(canvas);
21422
21539
  return true;
@@ -21567,9 +21684,9 @@
21567
21684
  */
21568
21685
  var DynamicAtlasItemImage = /** @class */ (function (_super) {
21569
21686
  __extends(DynamicAtlasItemImage, _super);
21570
- function DynamicAtlasItemImage(image, baseTexture) {
21571
- var _this = _super.call(this, image.src, image.width / baseTexture.resolution, image.height / baseTexture.resolution, 0, baseTexture) || this;
21572
- _this.image = image;
21687
+ function DynamicAtlasItemImage(src, width, height, source, baseTexture) {
21688
+ var _this = _super.call(this, src, width / baseTexture.resolution, height / baseTexture.resolution, 0, baseTexture) || this;
21689
+ _this.source = source;
21573
21690
  return _this;
21574
21691
  }
21575
21692
  DynamicAtlasItemImage.prototype.render = function (context) {
@@ -21578,12 +21695,21 @@
21578
21695
  var y = frame.y;
21579
21696
  var w = frame.width;
21580
21697
  var h = frame.height;
21581
- var image = this.image;
21582
- context.drawImage(image, x, y, w, h);
21583
- context.drawImage(image, 0, 0, 1, h, x - 1, y - 1, 1, h + 2);
21584
- context.drawImage(image, 0, 0, w, 1, x, y - 1, w, 1);
21585
- context.drawImage(image, w - 1, 0, 1, h, x + w, y - 1, 1, h + 2);
21586
- context.drawImage(image, 0, h - 1, w, 1, x, y + h, w, 1);
21698
+ var source = this.source;
21699
+ if (source instanceof ImageData) {
21700
+ context.putImageData(source, x, y);
21701
+ context.putImageData(source, x - 1, y, 0, 0, 1, h);
21702
+ context.putImageData(source, x, y - 1, 0, 0, w, 1);
21703
+ context.putImageData(source, x + w, y, w - 1, 0, 1, h);
21704
+ context.putImageData(source, x, y + h, 0, h - 1, w, 1);
21705
+ }
21706
+ else {
21707
+ context.drawImage(source, x, y, w, h);
21708
+ context.drawImage(source, 0, 0, 1, h, x - 1, y - 1, 1, h + 2);
21709
+ context.drawImage(source, 0, 0, w, 1, x, y - 1, w, 1);
21710
+ context.drawImage(source, w - 1, 0, 1, h, x + w, y - 1, 1, h + 2);
21711
+ context.drawImage(source, 0, h - 1, w, 1, x, y + h, w, 1);
21712
+ }
21587
21713
  };
21588
21714
  return DynamicAtlasItemImage;
21589
21715
  }(DynamicAtlasItem));
@@ -21768,12 +21894,6 @@
21768
21894
  }
21769
21895
  }
21770
21896
  };
21771
- EShapeBuffer.prototype.isCompatible = function (shape, uploaded, vindex, iindex) {
21772
- return (uploaded.getBuffer() === this &&
21773
- uploaded.getVertexOffset() === vindex &&
21774
- uploaded.getIndexOffset() === iindex &&
21775
- uploaded.isCompatible(shape));
21776
- };
21777
21897
  EShapeBuffer.prototype.update = function (iterator, antialiasWeight, noMoreThanOne) {
21778
21898
  var builder = this._builder;
21779
21899
  builder.begin();
@@ -21782,28 +21902,18 @@
21782
21902
  var shape = iterator.get();
21783
21903
  for (; shape != null; shape = iterator.next()) {
21784
21904
  var uploaded = shape.uploaded;
21785
- if (uploaded == null || !this.isCompatible(shape, uploaded, vindex, iindex)) {
21786
- break;
21787
- }
21788
- uploaded.update(shape);
21789
- uploaded.buildUnit(builder);
21790
- vindex += uploaded.getVertexCount();
21791
- iindex += uploaded.getIndexCount();
21792
- if (noMoreThanOne) {
21793
- iterator.next();
21794
- builder.end();
21795
- this._vertexCount = vindex;
21796
- this._indexCount = iindex;
21797
- return 0 < builder.units.length;
21798
- }
21799
- }
21800
- for (; shape != null; shape = iterator.next()) {
21801
- var creater = EShapeUploadeds[shape.type] || EShapeUploadeds[EShapeType.GROUP];
21802
- if (creater == null) {
21803
- break;
21804
- }
21805
- var uploaded = creater(this, shape, vindex, iindex, antialiasWeight);
21806
21905
  if (uploaded == null) {
21906
+ var creator = EShapeUploadeds[shape.type] || EShapeUploadeds[EShapeType.GROUP];
21907
+ if (creator == null) {
21908
+ break;
21909
+ }
21910
+ var newUploaded = creator(this, shape, vindex, iindex, antialiasWeight);
21911
+ if (newUploaded == null) {
21912
+ break;
21913
+ }
21914
+ uploaded = newUploaded;
21915
+ }
21916
+ else if (!uploaded.reinit(this, shape, vindex, iindex)) {
21807
21917
  break;
21808
21918
  }
21809
21919
  uploaded.buildUnit(builder);
@@ -21952,24 +22062,18 @@
21952
22062
  };
21953
22063
  EShapeRenderer.prototype.updateAtlas = function (shape, atlas, fontAtlases, defaultTexture, baseTexture) {
21954
22064
  // Texture
21955
- // Do not access the shape.image.src here.
22065
+ // Do not access the shape.image.source here.
21956
22066
  // It slows down the rendering speed significantly.
21957
- var imageSrc = shape.imageSrc;
21958
- if (imageSrc != null) {
21959
- var textureItem = atlas.get(imageSrc);
22067
+ var image = shape.image;
22068
+ if (image != null) {
22069
+ var textureItem = atlas.get(image.url);
21960
22070
  if (textureItem != null) {
21961
22071
  shape.texture = textureItem.texture;
21962
22072
  }
21963
22073
  else {
21964
- var image = shape.image;
21965
- if (image != null) {
21966
- var newTextureItem = new DynamicAtlasItemImage(image, baseTexture);
21967
- shape.texture = newTextureItem.texture;
21968
- atlas.set(newTextureItem.id, newTextureItem);
21969
- }
21970
- else {
21971
- shape.texture = defaultTexture;
21972
- }
22074
+ var newTextureItem = new DynamicAtlasItemImage(image.url, image.width, image.height, image.source, baseTexture);
22075
+ shape.texture = newTextureItem.texture;
22076
+ atlas.set(newTextureItem.id, newTextureItem);
21973
22077
  }
21974
22078
  }
21975
22079
  else {
@@ -22137,7 +22241,7 @@
22137
22241
  _this._pixelScale = 1;
22138
22242
  _this._pixelScaleId = -2; // Since this._shapeScaleId starts from -1.
22139
22243
  _this._shapeScale = 1;
22140
- _this._shapeScaleId = -1; // Since PIXI.Transform._worldID starts from zero.
22244
+ _this._shapeScaleId = -1; // Since Transform._worldID starts from zero.
22141
22245
  _this._work = new pixi_js.Point();
22142
22246
  _this._buffers = [];
22143
22247
  return _this;
@@ -28854,345 +28958,6 @@
28854
28958
  return DDynamicTextGeometry;
28855
28959
  }(pixi_js.MeshGeometry));
28856
28960
 
28857
- /*
28858
- * Copyright (C) 2019 Toshiba Corporation
28859
- * SPDX-License-Identifier: Apache-2.0
28860
- */
28861
- var DDynamicTextStyle = /** @class */ (function () {
28862
- function DDynamicTextStyle(options, onChange) {
28863
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
28864
- this._id = 0;
28865
- this._idApproved = -1;
28866
- var defaultOptions = this.getDefaultOptions();
28867
- if (options) {
28868
- this._align = (_a = options.align) !== null && _a !== void 0 ? _a : defaultOptions.align;
28869
- this._fontFamily = (_b = options.fontFamily) !== null && _b !== void 0 ? _b : defaultOptions.fontFamily;
28870
- this._fontSize = (_c = options.fontSize) !== null && _c !== void 0 ? _c : defaultOptions.fontSize;
28871
- this._fontStyle = (_d = options.fontStyle) !== null && _d !== void 0 ? _d : defaultOptions.fontStyle;
28872
- this._fontVariant = (_e = options.fontVariant) !== null && _e !== void 0 ? _e : defaultOptions.fontVariant;
28873
- this._fontWeight = (_f = options.fontWeight) !== null && _f !== void 0 ? _f : defaultOptions.fontWeight;
28874
- this._fill = (_g = options.fill) !== null && _g !== void 0 ? _g : defaultOptions.fill;
28875
- this._clipping = (_h = options.clipping) !== null && _h !== void 0 ? _h : defaultOptions.clipping;
28876
- this._fitting = (_j = options.fitting) !== null && _j !== void 0 ? _j : defaultOptions.fitting;
28877
- this._wordWrap = toEnum((_k = options.wordWrap) !== null && _k !== void 0 ? _k : defaultOptions.wordWrap, DDynamicTextStyleWordWrap);
28878
- this._lineHeight = (_l = options.lineHeight) !== null && _l !== void 0 ? _l : defaultOptions.lineHeight;
28879
- }
28880
- else {
28881
- this._align = defaultOptions.align;
28882
- this._fontFamily = defaultOptions.fontFamily;
28883
- this._fontSize = defaultOptions.fontSize;
28884
- this._fontStyle = defaultOptions.fontStyle;
28885
- this._fontVariant = defaultOptions.fontVariant;
28886
- this._fontWeight = defaultOptions.fontWeight;
28887
- this._fill = defaultOptions.fill;
28888
- this._clipping = defaultOptions.clipping;
28889
- this._fitting = defaultOptions.fitting;
28890
- this._wordWrap = toEnum(defaultOptions.wordWrap, DDynamicTextStyleWordWrap);
28891
- this._lineHeight = defaultOptions.lineHeight;
28892
- }
28893
- this._fontSizeFitted = this._fontSize;
28894
- this._lineHeightFitted = this._lineHeight;
28895
- this._isFontFitted = false;
28896
- this._fontIdFontSize = this._fontSize;
28897
- this._fontIdId = -1;
28898
- this._fontId = "";
28899
- this._fontIdApproved = "";
28900
- this._fillApproved = 0x000000;
28901
- this._onChange = onChange;
28902
- }
28903
- DDynamicTextStyle.prototype.getDefaultOptions = function () {
28904
- var result = DDynamicTextStyle.DEFAULT_OPTIONS;
28905
- if (result == null) {
28906
- result = this.newDefaultOptions();
28907
- DDynamicTextStyle.DEFAULT_OPTIONS = result;
28908
- }
28909
- return result;
28910
- };
28911
- DDynamicTextStyle.prototype.newDefaultOptions = function () {
28912
- var theme = DThemes.getInstance().get("DBase");
28913
- return {
28914
- align: "left",
28915
- fontFamily: theme.getFontFamilly(),
28916
- fontSize: theme.getFontSize(),
28917
- fontStyle: "normal",
28918
- fontVariant: "normal",
28919
- fontWeight: "normal",
28920
- fill: theme.getColor(new DBaseStateSetImpl()),
28921
- clipping: true,
28922
- fitting: false,
28923
- wordWrap: DDynamicTextStyleWordWrap.NONE,
28924
- lineHeight: theme.getLineHeight()
28925
- };
28926
- };
28927
- Object.defineProperty(DDynamicTextStyle.prototype, "id", {
28928
- get: function () {
28929
- return this._id;
28930
- },
28931
- enumerable: false,
28932
- configurable: true
28933
- });
28934
- Object.defineProperty(DDynamicTextStyle.prototype, "idApproved", {
28935
- get: function () {
28936
- return this._idApproved;
28937
- },
28938
- enumerable: false,
28939
- configurable: true
28940
- });
28941
- Object.defineProperty(DDynamicTextStyle.prototype, "fontId", {
28942
- get: function () {
28943
- this.update();
28944
- return this._fontId;
28945
- },
28946
- enumerable: false,
28947
- configurable: true
28948
- });
28949
- Object.defineProperty(DDynamicTextStyle.prototype, "fontIdFontSize", {
28950
- get: function () {
28951
- this.update();
28952
- return this._fontSizeFitted;
28953
- },
28954
- enumerable: false,
28955
- configurable: true
28956
- });
28957
- Object.defineProperty(DDynamicTextStyle.prototype, "fontIdApproved", {
28958
- get: function () {
28959
- return this._fontIdApproved;
28960
- },
28961
- enumerable: false,
28962
- configurable: true
28963
- });
28964
- Object.defineProperty(DDynamicTextStyle.prototype, "fill", {
28965
- get: function () {
28966
- return this._fill;
28967
- },
28968
- set: function (fill) {
28969
- if (this._fill !== fill) {
28970
- this._fill = fill;
28971
- this.onChange();
28972
- }
28973
- },
28974
- enumerable: false,
28975
- configurable: true
28976
- });
28977
- DDynamicTextStyle.prototype.onChange = function () {
28978
- this._id += 1;
28979
- this._onChange();
28980
- };
28981
- Object.defineProperty(DDynamicTextStyle.prototype, "fillApproved", {
28982
- get: function () {
28983
- return this._fillApproved;
28984
- },
28985
- enumerable: false,
28986
- configurable: true
28987
- });
28988
- DDynamicTextStyle.prototype.approve = function () {
28989
- this.update();
28990
- this._idApproved = this._id;
28991
- this._fontIdApproved = this._fontId;
28992
- this._fillApproved = this._fill;
28993
- };
28994
- Object.defineProperty(DDynamicTextStyle.prototype, "fontFamily", {
28995
- get: function () {
28996
- return this._fontFamily;
28997
- },
28998
- set: function (fontFamily) {
28999
- if (this._fontFamily !== fontFamily) {
29000
- this._fontFamily = fontFamily;
29001
- this.onChange();
29002
- }
29003
- },
29004
- enumerable: false,
29005
- configurable: true
29006
- });
29007
- Object.defineProperty(DDynamicTextStyle.prototype, "fontSize", {
29008
- get: function () {
29009
- return this._fontSize;
29010
- },
29011
- set: function (fontSize) {
29012
- if (this._fontSize !== fontSize) {
29013
- this._fontSize = fontSize;
29014
- this._fontSizeFitted = fontSize;
29015
- this._lineHeightFitted = this._lineHeight;
29016
- this._isFontFitted = false;
29017
- this.onChange();
29018
- }
29019
- },
29020
- enumerable: false,
29021
- configurable: true
29022
- });
29023
- Object.defineProperty(DDynamicTextStyle.prototype, "fontSizeFitted", {
29024
- get: function () {
29025
- return this._fontSizeFitted;
29026
- },
29027
- enumerable: false,
29028
- configurable: true
29029
- });
29030
- Object.defineProperty(DDynamicTextStyle.prototype, "isFontFitted", {
29031
- get: function () {
29032
- return this._isFontFitted;
29033
- },
29034
- enumerable: false,
29035
- configurable: true
29036
- });
29037
- Object.defineProperty(DDynamicTextStyle.prototype, "fontStyle", {
29038
- get: function () {
29039
- return this._fontStyle;
29040
- },
29041
- set: function (fontStyle) {
29042
- if (this._fontStyle !== fontStyle) {
29043
- this._fontStyle = fontStyle;
29044
- this.onChange();
29045
- }
29046
- },
29047
- enumerable: false,
29048
- configurable: true
29049
- });
29050
- Object.defineProperty(DDynamicTextStyle.prototype, "fontVariant", {
29051
- get: function () {
29052
- return this._fontVariant;
29053
- },
29054
- set: function (fontVariant) {
29055
- if (this._fontVariant !== fontVariant) {
29056
- this._fontVariant = fontVariant;
29057
- this.onChange();
29058
- }
29059
- },
29060
- enumerable: false,
29061
- configurable: true
29062
- });
29063
- Object.defineProperty(DDynamicTextStyle.prototype, "fontWeight", {
29064
- get: function () {
29065
- return this._fontWeight;
29066
- },
29067
- set: function (fontWeight) {
29068
- if (this._fontWeight !== fontWeight) {
29069
- this._fontWeight = fontWeight;
29070
- this.onChange();
29071
- }
29072
- },
29073
- enumerable: false,
29074
- configurable: true
29075
- });
29076
- DDynamicTextStyle.prototype.update = function () {
29077
- if (this._fontIdId !== this._id) {
29078
- this._fontIdId = this._id;
29079
- var fontIdFontSize = this._fitting ? this._fontSizeFitted : this._fontSize;
29080
- this._fontIdFontSize = fontIdFontSize;
29081
- this._fontId = this.toFontId(fontIdFontSize);
29082
- }
29083
- };
29084
- DDynamicTextStyle.prototype.toFontId = function (fontSize) {
29085
- return "".concat(this._fontStyle, " ").concat(this._fontVariant, " ").concat(this._fontWeight, " ").concat(fontSize, "px ").concat(this._fontFamily);
29086
- };
29087
- Object.defineProperty(DDynamicTextStyle.prototype, "clipping", {
29088
- get: function () {
29089
- return this._clipping;
29090
- },
29091
- set: function (clipping) {
29092
- if (this._clipping !== clipping) {
29093
- this._clipping = clipping;
29094
- this.onChange();
29095
- }
29096
- },
29097
- enumerable: false,
29098
- configurable: true
29099
- });
29100
- Object.defineProperty(DDynamicTextStyle.prototype, "fitting", {
29101
- get: function () {
29102
- return this._fitting;
29103
- },
29104
- set: function (fitting) {
29105
- if (this._fitting !== fitting) {
29106
- this._fitting = fitting;
29107
- this.onChange();
29108
- }
29109
- },
29110
- enumerable: false,
29111
- configurable: true
29112
- });
29113
- Object.defineProperty(DDynamicTextStyle.prototype, "wordWrap", {
29114
- get: function () {
29115
- return this._wordWrap;
29116
- },
29117
- set: function (wordWrap) {
29118
- if (this._wordWrap !== wordWrap) {
29119
- this._wordWrap = wordWrap;
29120
- this.onChange();
29121
- }
29122
- },
29123
- enumerable: false,
29124
- configurable: true
29125
- });
29126
- Object.defineProperty(DDynamicTextStyle.prototype, "lineHeight", {
29127
- get: function () {
29128
- return this._lineHeight;
29129
- },
29130
- set: function (lineHeight) {
29131
- if (this._lineHeight !== lineHeight) {
29132
- this._lineHeight = lineHeight;
29133
- this._fontSizeFitted = this._fontSize;
29134
- this._lineHeightFitted = lineHeight;
29135
- this._isFontFitted = false;
29136
- this.onChange();
29137
- }
29138
- },
29139
- enumerable: false,
29140
- configurable: true
29141
- });
29142
- Object.defineProperty(DDynamicTextStyle.prototype, "lineHeightFitted", {
29143
- get: function () {
29144
- return this._lineHeightFitted;
29145
- },
29146
- set: function (lineHeightFitted) {
29147
- if (this._lineHeightFitted !== lineHeightFitted) {
29148
- this._lineHeightFitted = lineHeightFitted;
29149
- this.onChange();
29150
- }
29151
- },
29152
- enumerable: false,
29153
- configurable: true
29154
- });
29155
- DDynamicTextStyle.prototype.fit = function (fontSize, lineHeight) {
29156
- var isChanged = false;
29157
- if (fontSize < this._fontSizeFitted) {
29158
- this._fontSizeFitted = fontSize;
29159
- isChanged = true;
29160
- }
29161
- if (this._lineHeightFitted !== lineHeight) {
29162
- this._lineHeightFitted = lineHeight;
29163
- isChanged = true;
29164
- }
29165
- if (this._isFontFitted !== true) {
29166
- this._isFontFitted = true;
29167
- isChanged = true;
29168
- }
29169
- if (isChanged) {
29170
- this.onChange();
29171
- }
29172
- return isChanged;
29173
- };
29174
- DDynamicTextStyle.prototype.unfit = function () {
29175
- var isChanged = false;
29176
- if (this._isFontFitted !== false) {
29177
- this._isFontFitted = false;
29178
- isChanged = true;
29179
- }
29180
- if (this._fontSizeFitted !== this._fontSize) {
29181
- this._fontSizeFitted = this._fontSize;
29182
- isChanged = true;
29183
- }
29184
- if (this._lineHeightFitted !== this._lineHeight) {
29185
- this._lineHeightFitted = this._lineHeight;
29186
- isChanged = true;
29187
- }
29188
- if (isChanged) {
29189
- this.onChange();
29190
- }
29191
- return isChanged;
29192
- };
29193
- return DDynamicTextStyle;
29194
- }());
29195
-
29196
28961
  /*
29197
28962
  * Copyright (C) 2019 Toshiba Corporation
29198
28963
  * SPDX-License-Identifier: Apache-2.0
@@ -29270,13 +29035,11 @@
29270
29035
  */
29271
29036
  var DDynamicText = /** @class */ (function (_super) {
29272
29037
  __extends(DDynamicText, _super);
29273
- function DDynamicText(options) {
29038
+ function DDynamicText(style) {
29274
29039
  var _this = _super.call(this, new DDynamicTextGeometry(), new pixi_js.MeshMaterial(pixi_js.Texture.EMPTY)) || this;
29275
- _this._style = new DDynamicTextStyle(options, function () {
29276
- _this._isDirty = true;
29277
- _this._isGeometryDirty = true;
29278
- _this._atlas = null;
29279
- _this.update_();
29040
+ _this._style = style;
29041
+ style.on("change", function () {
29042
+ _this.onStyleChange();
29280
29043
  });
29281
29044
  _this._text = "";
29282
29045
  _this._textApproved = "";
@@ -29300,15 +29063,21 @@
29300
29063
  };
29301
29064
  return _this;
29302
29065
  }
29066
+ DDynamicText.prototype.onStyleChange = function () {
29067
+ this._isDirty = true;
29068
+ this._isGeometryDirty = true;
29069
+ this._atlas = null;
29070
+ this.update_();
29071
+ };
29303
29072
  DDynamicText.prototype.update_ = function () {
29304
29073
  var layer = DApplications.getLayer(this);
29305
29074
  if (layer) {
29306
- var style = this._style;
29307
29075
  if (this._isDirty) {
29308
29076
  this._isDirty = false;
29309
29077
  var text = this._text;
29310
29078
  var textApproved = this._textApproved;
29311
29079
  this._textApproved = text;
29080
+ var style = this._style;
29312
29081
  var fontId = style.fontId;
29313
29082
  var fontIdApproved = style.fontIdApproved;
29314
29083
  var fontIdFontSize = style.fontIdFontSize;
@@ -29501,203 +29270,737 @@
29501
29270
  * Copyright (C) 2019 Toshiba Corporation
29502
29271
  * SPDX-License-Identifier: Apache-2.0
29503
29272
  */
29504
- var toTextStyle = function (theme, options, state) {
29505
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
29506
- var style = (_a = options === null || options === void 0 ? void 0 : options.text) === null || _a === void 0 ? void 0 : _a.style;
29507
- if (style != null) {
29508
- var fill = (_b = style.fill) !== null && _b !== void 0 ? _b : theme.getColor(state);
29509
- var fontSize = (_c = style.fontSize) !== null && _c !== void 0 ? _c : theme.getFontSize();
29510
- var fontFamily = (_d = style.fontFamily) !== null && _d !== void 0 ? _d : theme.getFontFamilly();
29511
- var fontWeight = (_e = style.fontWeight) !== null && _e !== void 0 ? _e : theme.getFontWeight();
29512
- var fontStyle = (_f = style.fontStyle) !== null && _f !== void 0 ? _f : theme.getFontStyle();
29513
- var fontVariant = (_g = style.fontVariant) !== null && _g !== void 0 ? _g : theme.getFontVariant();
29514
- var clipping = (_h = style.clipping) !== null && _h !== void 0 ? _h : theme.getTextStyleClipping();
29515
- var fitting = (_j = style.fitting) !== null && _j !== void 0 ? _j : theme.getTextStyleFitting();
29516
- var wordWrap = (_k = style.wordWrap) !== null && _k !== void 0 ? _k : theme.getTextStyleWordWrap();
29517
- var lineHeight = (_l = style.lineHeight) !== null && _l !== void 0 ? _l : theme.getLineHeight();
29518
- return {
29519
- fill: fill,
29520
- fontSize: fontSize,
29521
- fontFamily: fontFamily,
29522
- fontWeight: fontWeight,
29523
- fontStyle: fontStyle,
29524
- fontVariant: fontVariant,
29525
- clipping: clipping,
29526
- fitting: fitting,
29527
- wordWrap: wordWrap,
29528
- lineHeight: lineHeight
29529
- };
29273
+ var DDynamicTextStyle = /** @class */ (function (_super) {
29274
+ __extends(DDynamicTextStyle, _super);
29275
+ function DDynamicTextStyle(parent, theme, options) {
29276
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
29277
+ var _this = _super.call(this) || this;
29278
+ _this._id = 0;
29279
+ _this._idApproved = -1;
29280
+ if (options) {
29281
+ _this._fontFamily = (_a = options.fontFamily) !== null && _a !== void 0 ? _a : theme.getFontFamilly();
29282
+ _this._fontSize = (_b = options.fontSize) !== null && _b !== void 0 ? _b : theme.getFontSize();
29283
+ _this._fontStyle = (_c = options.fontStyle) !== null && _c !== void 0 ? _c : theme.getFontStyle();
29284
+ _this._fontVariant = (_d = options.fontVariant) !== null && _d !== void 0 ? _d : theme.getFontVariant();
29285
+ _this._fontWeight = (_e = options.fontWeight) !== null && _e !== void 0 ? _e : theme.getFontWeight();
29286
+ _this._clipping = (_f = options.clipping) !== null && _f !== void 0 ? _f : theme.getTextStyleClipping();
29287
+ _this._fitting = (_g = options.fitting) !== null && _g !== void 0 ? _g : theme.getTextStyleFitting();
29288
+ _this._wordWrap = toEnum((_h = options.wordWrap) !== null && _h !== void 0 ? _h : theme.getTextStyleWordWrap(), DDynamicTextStyleWordWrap);
29289
+ _this._lineHeight = (_j = options.lineHeight) !== null && _j !== void 0 ? _j : theme.getLineHeight();
29290
+ }
29291
+ else {
29292
+ _this._fontFamily = theme.getFontFamilly();
29293
+ _this._fontSize = theme.getFontSize();
29294
+ _this._fontStyle = theme.getFontStyle();
29295
+ _this._fontVariant = theme.getFontVariant();
29296
+ _this._fontWeight = theme.getFontWeight();
29297
+ _this._clipping = theme.getTextStyleClipping();
29298
+ _this._fitting = theme.getTextStyleFitting();
29299
+ _this._wordWrap = theme.getTextStyleWordWrap();
29300
+ _this._lineHeight = theme.getLineHeight();
29301
+ }
29302
+ _this._fill = theme.getColor(parent.state);
29303
+ _this._fontSizeFitted = _this._fontSize;
29304
+ _this._lineHeightFitted = _this._lineHeight;
29305
+ _this._isFontFitted = false;
29306
+ _this._fontIdFontSize = _this._fontSize;
29307
+ _this._fontIdId = -1;
29308
+ _this._fontId = "";
29309
+ _this._fontIdApproved = "";
29310
+ _this._fillApproved = 0x000000;
29311
+ return _this;
29530
29312
  }
29531
- return {
29532
- fill: theme.getColor(state),
29533
- fontSize: theme.getFontSize(),
29534
- fontFamily: theme.getFontFamilly(),
29535
- fontWeight: theme.getFontWeight(),
29536
- fontStyle: theme.getFontStyle(),
29537
- fontVariant: theme.getFontVariant(),
29538
- clipping: theme.getTextStyleClipping(),
29539
- fitting: theme.getTextStyleFitting(),
29540
- wordWrap: theme.getTextStyleWordWrap(),
29541
- lineHeight: theme.getLineHeight()
29313
+ Object.defineProperty(DDynamicTextStyle.prototype, "id", {
29314
+ get: function () {
29315
+ return this._id;
29316
+ },
29317
+ enumerable: false,
29318
+ configurable: true
29319
+ });
29320
+ Object.defineProperty(DDynamicTextStyle.prototype, "idApproved", {
29321
+ get: function () {
29322
+ return this._idApproved;
29323
+ },
29324
+ enumerable: false,
29325
+ configurable: true
29326
+ });
29327
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontId", {
29328
+ get: function () {
29329
+ this.update();
29330
+ return this._fontId;
29331
+ },
29332
+ enumerable: false,
29333
+ configurable: true
29334
+ });
29335
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontIdFontSize", {
29336
+ get: function () {
29337
+ this.update();
29338
+ return this._fontSizeFitted;
29339
+ },
29340
+ enumerable: false,
29341
+ configurable: true
29342
+ });
29343
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontIdApproved", {
29344
+ get: function () {
29345
+ return this._fontIdApproved;
29346
+ },
29347
+ enumerable: false,
29348
+ configurable: true
29349
+ });
29350
+ Object.defineProperty(DDynamicTextStyle.prototype, "fill", {
29351
+ get: function () {
29352
+ return this._fill;
29353
+ },
29354
+ set: function (fill) {
29355
+ if (this._fill !== fill) {
29356
+ this._fill = fill;
29357
+ this.onChange();
29358
+ }
29359
+ },
29360
+ enumerable: false,
29361
+ configurable: true
29362
+ });
29363
+ DDynamicTextStyle.prototype.onChange = function () {
29364
+ this._id += 1;
29365
+ this.emit("change", this);
29542
29366
  };
29543
- };
29544
- var toTextAlign = function (theme, options) {
29545
- var _a, _b, _c;
29546
- var align = (_a = options === null || options === void 0 ? void 0 : options.text) === null || _a === void 0 ? void 0 : _a.align;
29547
- return {
29548
- vertical: toEnum((_b = align === null || align === void 0 ? void 0 : align.vertical) !== null && _b !== void 0 ? _b : theme.getTextAlignVertical(), DAlignVertical),
29549
- horizontal: toEnum((_c = align === null || align === void 0 ? void 0 : align.horizontal) !== null && _c !== void 0 ? _c : theme.getTextAlignHorizontal(), DAlignHorizontal)
29367
+ Object.defineProperty(DDynamicTextStyle.prototype, "fillApproved", {
29368
+ get: function () {
29369
+ return this._fillApproved;
29370
+ },
29371
+ enumerable: false,
29372
+ configurable: true
29373
+ });
29374
+ DDynamicTextStyle.prototype.approve = function () {
29375
+ this.update();
29376
+ this._idApproved = this._id;
29377
+ this._fontIdApproved = this._fontId;
29378
+ this._fillApproved = this._fill;
29550
29379
  };
29551
- };
29552
- /**
29553
- * A base class for UI classes with a text support.
29554
- * See {@link DTextBaseEvents} for event defaults.
29555
- */
29556
- var DTextBase = /** @class */ (function (_super) {
29557
- __extends(DTextBase, _super);
29558
- function DTextBase() {
29559
- return _super !== null && _super.apply(this, arguments) || this;
29560
- }
29561
- DTextBase.prototype.init = function (options) {
29562
- var _a, _b, _c, _d;
29563
- _super.prototype.init.call(this, options);
29564
- var theme = this.theme;
29565
- this._textValue = (_b = (_a = options === null || options === void 0 ? void 0 : options.text) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : theme.newTextValue();
29566
- this._textValueComputed = this.computeTextValue();
29567
- var text = options === null || options === void 0 ? void 0 : options.text;
29568
- this._textColor = text === null || text === void 0 ? void 0 : text.color;
29569
- this._textAlpha = text === null || text === void 0 ? void 0 : text.alpha;
29570
- this._textStyle = toTextStyle(theme, options, this.state);
29571
- this._textAlign = toTextAlign(theme, options);
29572
- this._textFormatter = (_c = text === null || text === void 0 ? void 0 : text.formatter) !== null && _c !== void 0 ? _c : theme.getTextFormatter();
29573
- this._isTextVisible = true;
29574
- this._isOverflowMaskEnabled = (_d = options === null || options === void 0 ? void 0 : options.mask) !== null && _d !== void 0 ? _d : theme.isOverflowMaskEnabled();
29575
- this.onTextChange();
29576
- this.createOrUpdateText();
29380
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontFamily", {
29381
+ get: function () {
29382
+ return this._fontFamily;
29383
+ },
29384
+ set: function (fontFamily) {
29385
+ if (this._fontFamily !== fontFamily) {
29386
+ this._fontFamily = fontFamily;
29387
+ this.onChange();
29388
+ }
29389
+ },
29390
+ enumerable: false,
29391
+ configurable: true
29392
+ });
29393
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontSize", {
29394
+ get: function () {
29395
+ return this._fontSize;
29396
+ },
29397
+ set: function (fontSize) {
29398
+ if (this._fontSize !== fontSize) {
29399
+ this._fontSize = fontSize;
29400
+ this._fontSizeFitted = fontSize;
29401
+ this._lineHeightFitted = this._lineHeight;
29402
+ this._isFontFitted = false;
29403
+ this.onChange();
29404
+ }
29405
+ },
29406
+ enumerable: false,
29407
+ configurable: true
29408
+ });
29409
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontSizeFitted", {
29410
+ get: function () {
29411
+ return this._fontSizeFitted;
29412
+ },
29413
+ enumerable: false,
29414
+ configurable: true
29415
+ });
29416
+ Object.defineProperty(DDynamicTextStyle.prototype, "isFontFitted", {
29417
+ get: function () {
29418
+ return this._isFontFitted;
29419
+ },
29420
+ enumerable: false,
29421
+ configurable: true
29422
+ });
29423
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontStyle", {
29424
+ get: function () {
29425
+ return this._fontStyle;
29426
+ },
29427
+ set: function (fontStyle) {
29428
+ if (this._fontStyle !== fontStyle) {
29429
+ this._fontStyle = fontStyle;
29430
+ this.onChange();
29431
+ }
29432
+ },
29433
+ enumerable: false,
29434
+ configurable: true
29435
+ });
29436
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontVariant", {
29437
+ get: function () {
29438
+ return this._fontVariant;
29439
+ },
29440
+ set: function (fontVariant) {
29441
+ if (this._fontVariant !== fontVariant) {
29442
+ this._fontVariant = fontVariant;
29443
+ this.onChange();
29444
+ }
29445
+ },
29446
+ enumerable: false,
29447
+ configurable: true
29448
+ });
29449
+ Object.defineProperty(DDynamicTextStyle.prototype, "fontWeight", {
29450
+ get: function () {
29451
+ return this._fontWeight;
29452
+ },
29453
+ set: function (fontWeight) {
29454
+ if (this._fontWeight !== fontWeight) {
29455
+ this._fontWeight = fontWeight;
29456
+ this.onChange();
29457
+ }
29458
+ },
29459
+ enumerable: false,
29460
+ configurable: true
29461
+ });
29462
+ DDynamicTextStyle.prototype.update = function () {
29463
+ if (this._fontIdId !== this._id) {
29464
+ this._fontIdId = this._id;
29465
+ var fontIdFontSize = this._fitting ? this._fontSizeFitted : this._fontSize;
29466
+ this._fontIdFontSize = fontIdFontSize;
29467
+ this._fontId = this.toFontId(fontIdFontSize);
29468
+ }
29577
29469
  };
29578
- Object.defineProperty(DTextBase.prototype, "text", {
29470
+ DDynamicTextStyle.prototype.toFontId = function (fontSize) {
29471
+ return "".concat(this._fontStyle, " ").concat(this._fontVariant, " ").concat(this._fontWeight, " ").concat(fontSize, "px ").concat(this._fontFamily);
29472
+ };
29473
+ Object.defineProperty(DDynamicTextStyle.prototype, "clipping", {
29579
29474
  get: function () {
29580
- return this._textValue;
29475
+ return this._clipping;
29581
29476
  },
29582
- set: function (text) {
29583
- if (this._textValue !== text) {
29584
- this._textValue = text;
29585
- this.updateTextValue();
29477
+ set: function (clipping) {
29478
+ if (this._clipping !== clipping) {
29479
+ this._clipping = clipping;
29480
+ this.onChange();
29586
29481
  }
29587
29482
  },
29588
29483
  enumerable: false,
29589
29484
  configurable: true
29590
29485
  });
29591
- DTextBase.prototype.onTextChange = function () {
29592
- // DO NOTHING
29486
+ Object.defineProperty(DDynamicTextStyle.prototype, "fitting", {
29487
+ get: function () {
29488
+ return this._fitting;
29489
+ },
29490
+ set: function (fitting) {
29491
+ if (this._fitting !== fitting) {
29492
+ this._fitting = fitting;
29493
+ this.onChange();
29494
+ }
29495
+ },
29496
+ enumerable: false,
29497
+ configurable: true
29498
+ });
29499
+ Object.defineProperty(DDynamicTextStyle.prototype, "wordWrap", {
29500
+ get: function () {
29501
+ return this._wordWrap;
29502
+ },
29503
+ set: function (wordWrap) {
29504
+ if (this._wordWrap !== wordWrap) {
29505
+ this._wordWrap = wordWrap;
29506
+ this.onChange();
29507
+ }
29508
+ },
29509
+ enumerable: false,
29510
+ configurable: true
29511
+ });
29512
+ Object.defineProperty(DDynamicTextStyle.prototype, "lineHeight", {
29513
+ get: function () {
29514
+ return this._lineHeight;
29515
+ },
29516
+ set: function (lineHeight) {
29517
+ if (this._lineHeight !== lineHeight) {
29518
+ this._lineHeight = lineHeight;
29519
+ this._fontSizeFitted = this._fontSize;
29520
+ this._lineHeightFitted = lineHeight;
29521
+ this._isFontFitted = false;
29522
+ this.onChange();
29523
+ }
29524
+ },
29525
+ enumerable: false,
29526
+ configurable: true
29527
+ });
29528
+ Object.defineProperty(DDynamicTextStyle.prototype, "lineHeightFitted", {
29529
+ get: function () {
29530
+ return this._lineHeightFitted;
29531
+ },
29532
+ set: function (lineHeightFitted) {
29533
+ if (this._lineHeightFitted !== lineHeightFitted) {
29534
+ this._lineHeightFitted = lineHeightFitted;
29535
+ this.onChange();
29536
+ }
29537
+ },
29538
+ enumerable: false,
29539
+ configurable: true
29540
+ });
29541
+ DDynamicTextStyle.prototype.fit = function (fontSize, lineHeight) {
29542
+ var isChanged = false;
29543
+ if (fontSize < this._fontSizeFitted) {
29544
+ this._fontSizeFitted = fontSize;
29545
+ isChanged = true;
29546
+ }
29547
+ if (this._lineHeightFitted !== lineHeight) {
29548
+ this._lineHeightFitted = lineHeight;
29549
+ isChanged = true;
29550
+ }
29551
+ if (this._isFontFitted !== true) {
29552
+ this._isFontFitted = true;
29553
+ isChanged = true;
29554
+ }
29555
+ if (isChanged) {
29556
+ this.onChange();
29557
+ }
29558
+ return isChanged;
29593
29559
  };
29594
- DTextBase.prototype.computeTextValue = function () {
29595
- var textValue = this._textValue;
29596
- if (textValue !== undefined) {
29597
- if (isFunction(textValue)) {
29598
- var result = textValue(this.state);
29599
- if (result !== undefined) {
29600
- return result;
29601
- }
29560
+ DDynamicTextStyle.prototype.unfit = function () {
29561
+ var isChanged = false;
29562
+ if (this._isFontFitted !== false) {
29563
+ this._isFontFitted = false;
29564
+ isChanged = true;
29565
+ }
29566
+ if (this._fontSizeFitted !== this._fontSize) {
29567
+ this._fontSizeFitted = this._fontSize;
29568
+ isChanged = true;
29569
+ }
29570
+ if (this._lineHeightFitted !== this._lineHeight) {
29571
+ this._lineHeightFitted = this._lineHeight;
29572
+ isChanged = true;
29573
+ }
29574
+ if (isChanged) {
29575
+ this.onChange();
29576
+ }
29577
+ return isChanged;
29578
+ };
29579
+ return DDynamicTextStyle;
29580
+ }(pixi_js.utils.EventEmitter));
29581
+
29582
+ var DTextPieceAlignImpl = /** @class */ (function () {
29583
+ function DTextPieceAlignImpl(parent, theme, options) {
29584
+ var _a, _b;
29585
+ this._parent = parent;
29586
+ this._vertical = toEnum((_a = options === null || options === void 0 ? void 0 : options.vertical) !== null && _a !== void 0 ? _a : theme.getTextAlignVertical(), DAlignVertical);
29587
+ this._horizontal = toEnum((_b = options === null || options === void 0 ? void 0 : options.horizontal) !== null && _b !== void 0 ? _b : theme.getTextAlignHorizontal(), DAlignHorizontal);
29588
+ }
29589
+ Object.defineProperty(DTextPieceAlignImpl.prototype, "vertical", {
29590
+ get: function () {
29591
+ return this._vertical;
29592
+ },
29593
+ set: function (vertical) {
29594
+ vertical = toEnum(vertical, DAlignVertical);
29595
+ if (this._vertical !== vertical) {
29596
+ this._vertical = vertical;
29597
+ this.onChange();
29602
29598
  }
29603
- else {
29604
- return textValue;
29599
+ },
29600
+ enumerable: false,
29601
+ configurable: true
29602
+ });
29603
+ Object.defineProperty(DTextPieceAlignImpl.prototype, "horizontal", {
29604
+ get: function () {
29605
+ return this._horizontal;
29606
+ },
29607
+ set: function (horizontal) {
29608
+ horizontal = toEnum(horizontal, DAlignHorizontal);
29609
+ if (this._horizontal !== horizontal) {
29610
+ this._horizontal = horizontal;
29611
+ this.onChange();
29612
+ }
29613
+ },
29614
+ enumerable: false,
29615
+ configurable: true
29616
+ });
29617
+ DTextPieceAlignImpl.prototype.set = function (vertical, horizontal) {
29618
+ var isChanged = false;
29619
+ if (vertical != null) {
29620
+ vertical = toEnum(vertical, DAlignVertical);
29621
+ if (this._vertical !== vertical) {
29622
+ this._vertical = vertical;
29623
+ isChanged = true;
29624
+ }
29625
+ }
29626
+ if (horizontal != null) {
29627
+ horizontal = toEnum(horizontal, DAlignHorizontal);
29628
+ if (this._horizontal !== horizontal) {
29629
+ this._horizontal = horizontal;
29630
+ isChanged = true;
29605
29631
  }
29606
29632
  }
29607
- return this.theme.getTextValue(this.state);
29633
+ if (isChanged) {
29634
+ this.onChange();
29635
+ }
29636
+ return this;
29608
29637
  };
29609
- DTextBase.prototype.createOrUpdateText = function () {
29610
- var textValueComputed = this._textValueComputed;
29611
- if (textValueComputed !== undefined) {
29612
- var formatted = this._textFormatter(textValueComputed, this);
29613
- var text = this._text;
29614
- if (text == null) {
29615
- if (0 < formatted.length) {
29616
- var newText = this.newText();
29617
- newText.visible = this._isTextVisible;
29618
- this._text = newText;
29619
- this.addChild(newText);
29620
- this.updateTextPosition(newText);
29621
- var overflowMask = this.getOverflowMask();
29622
- if (overflowMask) {
29623
- newText.mask = overflowMask;
29624
- }
29625
- newText.text = formatted;
29626
- this.toDirty();
29627
- DApplications.update(this);
29628
- }
29638
+ DTextPieceAlignImpl.prototype.onChange = function () {
29639
+ var parent = this._parent;
29640
+ parent.toDirty();
29641
+ DApplications.update(parent);
29642
+ };
29643
+ return DTextPieceAlignImpl;
29644
+ }());
29645
+
29646
+ /*
29647
+ * Copyright (C) 2019 Toshiba Corporation
29648
+ * SPDX-License-Identifier: Apache-2.0
29649
+ */
29650
+ var DTextPieceStyleImpl = /** @class */ (function () {
29651
+ function DTextPieceStyleImpl(parent, style) {
29652
+ this._parent = parent;
29653
+ this._style = style;
29654
+ }
29655
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "fontFamily", {
29656
+ get: function () {
29657
+ return this._style.fontFamily;
29658
+ },
29659
+ set: function (fontFamily) {
29660
+ var style = this._style;
29661
+ if (style.fontFamily !== fontFamily) {
29662
+ style.fontFamily = fontFamily;
29663
+ this.onChange();
29629
29664
  }
29630
- else if (text.text !== formatted) {
29631
- text.text = formatted;
29632
- this.toDirty();
29633
- DApplications.update(this);
29665
+ },
29666
+ enumerable: false,
29667
+ configurable: true
29668
+ });
29669
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "fontSize", {
29670
+ get: function () {
29671
+ return this._style.fontSize;
29672
+ },
29673
+ set: function (fontSize) {
29674
+ var style = this._style;
29675
+ if (style.fontSize !== fontSize) {
29676
+ style.fontSize = fontSize;
29677
+ this.onChange();
29678
+ }
29679
+ },
29680
+ enumerable: false,
29681
+ configurable: true
29682
+ });
29683
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "fontStyle", {
29684
+ get: function () {
29685
+ return this._style.fontStyle;
29686
+ },
29687
+ set: function (fontStyle) {
29688
+ var style = this._style;
29689
+ if (style.fontStyle !== fontStyle) {
29690
+ style.fontStyle = fontStyle;
29691
+ this.onChange();
29692
+ }
29693
+ },
29694
+ enumerable: false,
29695
+ configurable: true
29696
+ });
29697
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "fontVariant", {
29698
+ get: function () {
29699
+ return this._style.fontVariant;
29700
+ },
29701
+ set: function (fontVariant) {
29702
+ var style = this._style;
29703
+ if (style.fontVariant !== fontVariant) {
29704
+ style.fontVariant = fontVariant;
29705
+ this.onChange();
29706
+ }
29707
+ },
29708
+ enumerable: false,
29709
+ configurable: true
29710
+ });
29711
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "fontWeight", {
29712
+ get: function () {
29713
+ return this._style.fontWeight;
29714
+ },
29715
+ set: function (fontWeight) {
29716
+ var style = this._style;
29717
+ if (style.fontWeight !== fontWeight) {
29718
+ style.fontWeight = fontWeight;
29719
+ this.onChange();
29720
+ }
29721
+ },
29722
+ enumerable: false,
29723
+ configurable: true
29724
+ });
29725
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "clipping", {
29726
+ get: function () {
29727
+ return this._style.clipping;
29728
+ },
29729
+ set: function (clipping) {
29730
+ var style = this._style;
29731
+ if (style.clipping !== clipping) {
29732
+ style.clipping = clipping;
29733
+ this.onChange();
29734
+ }
29735
+ },
29736
+ enumerable: false,
29737
+ configurable: true
29738
+ });
29739
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "fitting", {
29740
+ get: function () {
29741
+ return this._style.fitting;
29742
+ },
29743
+ set: function (fitting) {
29744
+ var style = this._style;
29745
+ if (style.fitting !== fitting) {
29746
+ style.fitting = fitting;
29747
+ this.onChange();
29634
29748
  }
29749
+ },
29750
+ enumerable: false,
29751
+ configurable: true
29752
+ });
29753
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "wordWrap", {
29754
+ get: function () {
29755
+ return this._style.wordWrap;
29756
+ },
29757
+ set: function (wordWrap) {
29758
+ wordWrap = toEnum(wordWrap, DDynamicTextStyleWordWrap);
29759
+ var style = this._style;
29760
+ if (style.wordWrap !== wordWrap) {
29761
+ style.wordWrap = wordWrap;
29762
+ this.onChange();
29763
+ }
29764
+ },
29765
+ enumerable: false,
29766
+ configurable: true
29767
+ });
29768
+ Object.defineProperty(DTextPieceStyleImpl.prototype, "lineHeight", {
29769
+ get: function () {
29770
+ return this._style.lineHeight;
29771
+ },
29772
+ set: function (lineHeight) {
29773
+ var style = this._style;
29774
+ if (style.lineHeight !== lineHeight) {
29775
+ style.lineHeight = lineHeight;
29776
+ this.onChange();
29777
+ }
29778
+ },
29779
+ enumerable: false,
29780
+ configurable: true
29781
+ });
29782
+ DTextPieceStyleImpl.prototype.onChange = function () {
29783
+ DApplications.update(this._parent);
29784
+ };
29785
+ return DTextPieceStyleImpl;
29786
+ }());
29787
+
29788
+ var DTextPieceImpl = /** @class */ (function (_super) {
29789
+ __extends(DTextPieceImpl, _super);
29790
+ function DTextPieceImpl(parent, theme, options) {
29791
+ var _a, _b;
29792
+ var _this = _super.call(this) || this;
29793
+ _this._parent = parent;
29794
+ _this._theme = theme;
29795
+ _this._value = (_a = options === null || options === void 0 ? void 0 : options.value) !== null && _a !== void 0 ? _a : theme.newTextValue();
29796
+ _this._computed = _this.newComputed();
29797
+ _this._color = options === null || options === void 0 ? void 0 : options.color;
29798
+ _this._alpha = options === null || options === void 0 ? void 0 : options.alpha;
29799
+ var dstyle = new DDynamicTextStyle(parent, theme, options === null || options === void 0 ? void 0 : options.style);
29800
+ _this._dstyle = dstyle;
29801
+ _this._style = new DTextPieceStyleImpl(parent, dstyle);
29802
+ _this._align = new DTextPieceAlignImpl(parent, theme, options === null || options === void 0 ? void 0 : options.align);
29803
+ _this._formatter = (_b = options === null || options === void 0 ? void 0 : options.formatter) !== null && _b !== void 0 ? _b : theme.getTextFormatter();
29804
+ _this._isVisible = true;
29805
+ _this.onComputedChange();
29806
+ if (_this.updateObject()) {
29807
+ parent.toDirty();
29808
+ DApplications.update(parent);
29635
29809
  }
29636
- else {
29637
- var text = this._text;
29638
- if (text != null && text.text !== "") {
29639
- text.text = "";
29640
- this.toDirty();
29641
- DApplications.update(this);
29810
+ return _this;
29811
+ }
29812
+ Object.defineProperty(DTextPieceImpl.prototype, "value", {
29813
+ get: function () {
29814
+ return this._value;
29815
+ },
29816
+ set: function (value) {
29817
+ if (this._value !== value) {
29818
+ this._value = value;
29819
+ this.onValueChange();
29642
29820
  }
29821
+ },
29822
+ enumerable: false,
29823
+ configurable: true
29824
+ });
29825
+ DTextPieceImpl.prototype.getValue = function () {
29826
+ return this._value;
29827
+ };
29828
+ DTextPieceImpl.prototype.setValue = function (value, forcibly) {
29829
+ if (forcibly || this._value !== value) {
29830
+ this._value = value;
29831
+ this.onValueChange(forcibly);
29643
29832
  }
29644
29833
  };
29645
- DTextBase.prototype.newText = function () {
29646
- return new DDynamicText(this._textStyle);
29834
+ DTextPieceImpl.prototype.onValueChange = function (forcibly) {
29835
+ var newComputed = this.newComputed();
29836
+ if (forcibly || this._computed !== newComputed) {
29837
+ this._computed = newComputed;
29838
+ this.onComputedChange();
29839
+ if (this.updateObject()) {
29840
+ var parent_1 = this._parent;
29841
+ parent_1.toDirty();
29842
+ DApplications.update(parent_1);
29843
+ }
29844
+ }
29647
29845
  };
29648
- DTextBase.prototype.getOverflowMask = function () {
29649
- if (this._isOverflowMaskEnabled) {
29650
- if (this._overflowMask == null) {
29651
- this._overflowMask = new DBaseOverflowMaskSimple(this);
29652
- this._reflowable.add(this._overflowMask);
29653
- this.toDirty();
29846
+ DTextPieceImpl.prototype.compute = function (forcibly) {
29847
+ this.onValueChange(forcibly);
29848
+ };
29849
+ Object.defineProperty(DTextPieceImpl.prototype, "computed", {
29850
+ get: function () {
29851
+ return this._computed;
29852
+ },
29853
+ enumerable: false,
29854
+ configurable: true
29855
+ });
29856
+ Object.defineProperty(DTextPieceImpl.prototype, "formatter", {
29857
+ get: function () {
29858
+ return this._formatter;
29859
+ },
29860
+ set: function (formatter) {
29861
+ if (this._formatter !== formatter) {
29862
+ this._formatter = formatter;
29863
+ this.onValueChange(true);
29864
+ }
29865
+ },
29866
+ enumerable: false,
29867
+ configurable: true
29868
+ });
29869
+ Object.defineProperty(DTextPieceImpl.prototype, "color", {
29870
+ get: function () {
29871
+ return this._color;
29872
+ },
29873
+ set: function (color) {
29874
+ if (this._color !== color) {
29875
+ this._color = color;
29876
+ this.onColorChange();
29877
+ }
29878
+ },
29879
+ enumerable: false,
29880
+ configurable: true
29881
+ });
29882
+ Object.defineProperty(DTextPieceImpl.prototype, "alpha", {
29883
+ get: function () {
29884
+ return this._alpha;
29885
+ },
29886
+ set: function (alpha) {
29887
+ if (this._alpha !== alpha) {
29888
+ this._alpha = alpha;
29889
+ this.onColorChange();
29890
+ }
29891
+ },
29892
+ enumerable: false,
29893
+ configurable: true
29894
+ });
29895
+ DTextPieceImpl.prototype.onColorChange = function () {
29896
+ var object = this._object;
29897
+ if (object != null) {
29898
+ var parent_2 = this._parent;
29899
+ var state = parent_2.state;
29900
+ var color = this.newColor(state);
29901
+ var alpha = this.newAlpha(state);
29902
+ var style = object.style;
29903
+ if (style.fill !== color || object.alpha !== alpha) {
29904
+ style.fill = color;
29905
+ object.alpha = alpha;
29906
+ DApplications.update(parent_2);
29654
29907
  }
29655
- return this._overflowMask;
29656
29908
  }
29657
- return null;
29658
29909
  };
29659
- DTextBase.prototype.updateTextPosition = function (text) {
29660
- var align = this._textAlign;
29661
- var padding = this._padding;
29662
- var auto = this._auto;
29663
- var textX = 0;
29664
- var pleft = padding.getLeft();
29665
- var alignHorizontal = align.horizontal;
29666
- if (auto.width.isOn || alignHorizontal === DAlignHorizontal.LEFT) {
29667
- textX = pleft;
29910
+ Object.defineProperty(DTextPieceImpl.prototype, "align", {
29911
+ get: function () {
29912
+ return this._align;
29913
+ },
29914
+ enumerable: false,
29915
+ configurable: true
29916
+ });
29917
+ Object.defineProperty(DTextPieceImpl.prototype, "style", {
29918
+ get: function () {
29919
+ return this._style;
29920
+ },
29921
+ enumerable: false,
29922
+ configurable: true
29923
+ });
29924
+ Object.defineProperty(DTextPieceImpl.prototype, "object", {
29925
+ get: function () {
29926
+ return this._object;
29927
+ },
29928
+ enumerable: false,
29929
+ configurable: true
29930
+ });
29931
+ DTextPieceImpl.prototype.update = function (layouter) {
29932
+ // Compute a value
29933
+ var newComputed = this.newComputed();
29934
+ if (this._computed !== newComputed) {
29935
+ this._computed = newComputed;
29936
+ this.onComputedChange();
29937
+ this.updateObject();
29938
+ }
29939
+ var object = this._object;
29940
+ if (object != null) {
29941
+ // Update the color
29942
+ var state = this._parent.state;
29943
+ object.style.fill = this.newColor(state);
29944
+ object.alpha = this.newAlpha(state);
29945
+ // Layout
29946
+ layouter.set(object);
29668
29947
  }
29669
29948
  else {
29670
- var width = this.width;
29671
- var textWidth = text.width;
29672
- var pright = padding.getRight();
29673
- if (alignHorizontal === DAlignHorizontal.CENTER) {
29674
- textX = pleft + (width - pleft - pright - textWidth) * 0.5;
29949
+ // Layout
29950
+ layouter.set(null);
29951
+ }
29952
+ };
29953
+ DTextPieceImpl.prototype.updateObject = function () {
29954
+ var computed = this._computed;
29955
+ if (computed !== undefined) {
29956
+ var formatted = this._formatter(computed, this);
29957
+ var object = this._object;
29958
+ if (object == null) {
29959
+ if (0 < formatted.length) {
29960
+ var newObject = this.newObject();
29961
+ newObject.visible = this._isVisible;
29962
+ this._object = newObject;
29963
+ var parent_3 = this._parent;
29964
+ parent_3.addChild(newObject);
29965
+ var overflowMask = parent_3.getOverflowMask();
29966
+ if (overflowMask) {
29967
+ newObject.mask = overflowMask;
29968
+ }
29969
+ newObject.text = formatted;
29970
+ return true;
29971
+ }
29675
29972
  }
29676
- else {
29677
- textX = width - textWidth - pright;
29973
+ else if (object.text !== formatted) {
29974
+ object.text = formatted;
29975
+ return true;
29678
29976
  }
29679
29977
  }
29680
- var textY = 0;
29681
- var ptop = padding.getTop();
29682
- var alignVertical = align.vertical;
29683
- if (auto.height.isOn || alignVertical === DAlignVertical.TOP) {
29684
- textY = ptop;
29685
- }
29686
29978
  else {
29687
- var height = this.height;
29688
- var textHeight = text.height;
29689
- var pbottom = padding.getBottom();
29690
- if (alignVertical === DAlignVertical.MIDDLE) {
29691
- textY = ptop + (height - ptop - pbottom - textHeight) * 0.5;
29979
+ var object = this._object;
29980
+ if (object != null && object.text !== "") {
29981
+ object.text = "";
29982
+ return true;
29983
+ }
29984
+ }
29985
+ return false;
29986
+ };
29987
+ DTextPieceImpl.prototype.newComputed = function () {
29988
+ var value = this._value;
29989
+ if (value !== undefined) {
29990
+ if (isFunction(value)) {
29991
+ var result = value(this._parent.state);
29992
+ if (result !== undefined) {
29993
+ return result;
29994
+ }
29692
29995
  }
29693
29996
  else {
29694
- textY = height - textHeight - pbottom;
29997
+ return value;
29695
29998
  }
29696
29999
  }
29697
- text.position.set(textX, textY);
30000
+ return this._theme.getTextValue(this._parent.state);
29698
30001
  };
29699
- DTextBase.prototype.getTextColor = function (theme, state) {
29700
- var color = this._textColor;
30002
+ DTextPieceImpl.prototype.newColor = function (state) {
30003
+ var color = this._color;
29701
30004
  if (color !== undefined) {
29702
30005
  if (isFunction(color)) {
29703
30006
  var result = color(state);
@@ -29709,10 +30012,10 @@
29709
30012
  return color;
29710
30013
  }
29711
30014
  }
29712
- return theme.getColor(state);
30015
+ return this._theme.getColor(state);
29713
30016
  };
29714
- DTextBase.prototype.getTextAlpha = function (theme, state) {
29715
- var alpha = this._textAlpha;
30017
+ DTextPieceImpl.prototype.newAlpha = function (state) {
30018
+ var alpha = this._alpha;
29716
30019
  if (alpha !== undefined) {
29717
30020
  if (isFunction(alpha)) {
29718
30021
  var result = alpha(state);
@@ -29724,57 +30027,144 @@
29724
30027
  return alpha;
29725
30028
  }
29726
30029
  }
29727
- return theme.getAlpha(state);
30030
+ return this._theme.getAlpha(state);
29728
30031
  };
29729
- DTextBase.prototype.updateTextColor = function (text) {
29730
- var theme = this.theme;
29731
- var state = this.state;
29732
- text.style.fill = this.getTextColor(theme, state);
29733
- text.alpha = this.getTextAlpha(theme, state);
30032
+ DTextPieceImpl.prototype.newObject = function () {
30033
+ return new DDynamicText(this._dstyle);
29734
30034
  };
29735
- DTextBase.prototype.updateTextValue = function () {
29736
- var newTextValueComputed = this.computeTextValue();
29737
- if (this._textValueComputed !== newTextValueComputed) {
29738
- this._textValueComputed = newTextValueComputed;
29739
- this.onTextChange();
29740
- this.createOrUpdateText();
29741
- }
30035
+ Object.defineProperty(DTextPieceImpl.prototype, "visible", {
30036
+ get: function () {
30037
+ var object = this._object;
30038
+ if (object != null) {
30039
+ return object.visible;
30040
+ }
30041
+ return this._isVisible;
30042
+ },
30043
+ set: function (visible) {
30044
+ var object = this._object;
30045
+ if (object != null) {
30046
+ object.visible = visible;
30047
+ }
30048
+ this._isVisible = visible;
30049
+ },
30050
+ enumerable: false,
30051
+ configurable: true
30052
+ });
30053
+ DTextPieceImpl.prototype.show = function () {
30054
+ this.visible = true;
30055
+ return this;
29742
30056
  };
29743
- DTextBase.prototype.updateText = function () {
29744
- var text = this._text;
29745
- if (text) {
29746
- this.updateTextValue();
29747
- this.updateTextPosition(text);
29748
- this.updateTextColor(text);
30057
+ DTextPieceImpl.prototype.hide = function () {
30058
+ this.visible = false;
30059
+ return this;
30060
+ };
30061
+ DTextPieceImpl.prototype.isShown = function () {
30062
+ return this.visible;
30063
+ };
30064
+ DTextPieceImpl.prototype.onComputedChange = function () {
30065
+ this.emit("change", this);
30066
+ };
30067
+ DTextPieceImpl.prototype.destroy = function () {
30068
+ var object = this._object;
30069
+ if (object) {
30070
+ this._object = undefined;
30071
+ object.destroy();
29749
30072
  }
30073
+ return this;
29750
30074
  };
29751
- DTextBase.prototype.showText = function () {
29752
- var text = this._text;
29753
- if (text) {
29754
- text.visible = true;
30075
+ return DTextPieceImpl;
30076
+ }(pixi_js.utils.EventEmitter));
30077
+
30078
+ /*
30079
+ * Copyright (C) 2019 Toshiba Corporation
30080
+ * SPDX-License-Identifier: Apache-2.0
30081
+ */
30082
+ /**
30083
+ * A base class for UI classes with a text support.
30084
+ * See {@link DTextBaseEvents} for event defaults.
30085
+ */
30086
+ var DTextBase = /** @class */ (function (_super) {
30087
+ __extends(DTextBase, _super);
30088
+ function DTextBase() {
30089
+ return _super !== null && _super.apply(this, arguments) || this;
30090
+ }
30091
+ DTextBase.prototype.init = function (options) {
30092
+ _super.prototype.init.call(this, options);
30093
+ this.getText();
30094
+ };
30095
+ DTextBase.prototype.getOverflowMask = function () {
30096
+ var result = this._overflowMask;
30097
+ if (result === undefined) {
30098
+ result = this.newOverflowMask();
30099
+ this._overflowMask = result;
29755
30100
  }
29756
- this._isTextVisible = true;
30101
+ return null;
29757
30102
  };
29758
- DTextBase.prototype.hideText = function () {
29759
- var text = this._text;
29760
- if (text) {
29761
- text.visible = false;
30103
+ DTextBase.prototype.newOverflowMask = function () {
30104
+ var _a, _b;
30105
+ if ((_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.mask) !== null && _b !== void 0 ? _b : this.theme.isOverflowMaskEnabled()) {
30106
+ var result = new DBaseOverflowMaskSimple(this);
30107
+ this._reflowable.add(result);
30108
+ this.toDirty();
30109
+ return result;
29762
30110
  }
29763
- this._isTextVisible = false;
30111
+ else {
30112
+ return null;
30113
+ }
30114
+ };
30115
+ Object.defineProperty(DTextBase.prototype, "text", {
30116
+ get: function () {
30117
+ var _a;
30118
+ return ((_a = this._text) !== null && _a !== void 0 ? _a : (this._text = this.newText()));
30119
+ },
30120
+ set: function (text) {
30121
+ this.text.value = text;
30122
+ },
30123
+ enumerable: false,
30124
+ configurable: true
30125
+ });
30126
+ DTextBase.prototype.getText = function () {
30127
+ var _a;
30128
+ return ((_a = this._text) !== null && _a !== void 0 ? _a : (this._text = this.newText()));
30129
+ };
30130
+ DTextBase.prototype.newText = function () {
30131
+ var _a;
30132
+ return new DTextPieceImpl(this, this.theme, (_a = this._options) === null || _a === void 0 ? void 0 : _a.text);
29764
30133
  };
29765
30134
  DTextBase.prototype.onReflow = function () {
29766
30135
  _super.prototype.onReflow.call(this);
29767
- this.updateText();
30136
+ this.onReflowTextAndImage();
30137
+ };
30138
+ DTextBase.prototype.getLayouter = function () {
30139
+ var _a;
30140
+ return ((_a = DTextBase.LAYOUTER) !== null && _a !== void 0 ? _a : (DTextBase.LAYOUTER = new DImagePieceLayouter()));
30141
+ };
30142
+ DTextBase.prototype.onReflowTextAndImage = function () {
30143
+ var layouter = this.getLayouter();
30144
+ var text = this.getText();
30145
+ text.update(layouter);
30146
+ var auto = this._auto;
30147
+ layouter.execute(this._padding, text.align, auto.width.isOn ? null : this.width, auto.height.isOn ? null : this.height);
30148
+ layouter.clear();
29768
30149
  };
29769
30150
  DTextBase.prototype.isRefitable = function (target) {
29770
- return _super.prototype.isRefitable.call(this, target) || (target != null && target === this._text);
30151
+ if (_super.prototype.isRefitable.call(this, target)) {
30152
+ return true;
30153
+ }
30154
+ if (target != null) {
30155
+ var text = this._text;
30156
+ if (text != null && target === text.object) {
30157
+ return true;
30158
+ }
30159
+ }
30160
+ return false;
29771
30161
  };
29772
30162
  DTextBase.prototype.applyTitle = function () {
29773
- var text = this._text;
29774
- if (this._title.length <= 0 && text && "clipped" in text && text.clipped) {
30163
+ var object = this.text.object;
30164
+ if (this._title.length <= 0 && object != null && object.clipped) {
29775
30165
  var layer = DApplications.getLayer(this);
29776
30166
  if (layer) {
29777
- layer.view.title = text.text;
30167
+ layer.view.title = object.text;
29778
30168
  }
29779
30169
  }
29780
30170
  else {
@@ -29788,7 +30178,6 @@
29788
30178
  // Text
29789
30179
  var text = this._text;
29790
30180
  if (text) {
29791
- this._text = null;
29792
30181
  text.destroy();
29793
30182
  }
29794
30183
  // Overflow mask
@@ -30420,7 +30809,7 @@
30420
30809
  }
30421
30810
  return false;
30422
30811
  };
30423
- DImagePieceContainerImpl.prototype.updateTextAndImage = function (layouter) {
30812
+ DImagePieceContainerImpl.prototype.update = function (layouter) {
30424
30813
  var pieces = this._pieces;
30425
30814
  for (var i = 0, imax = pieces.length; i < imax; ++i) {
30426
30815
  var piece = pieces[i];
@@ -30430,6 +30819,54 @@
30430
30819
  layouter.add(piece);
30431
30820
  }
30432
30821
  };
30822
+ Object.defineProperty(DImagePieceContainerImpl.prototype, "object", {
30823
+ get: function () {
30824
+ return this._pieces[0].object;
30825
+ },
30826
+ enumerable: false,
30827
+ configurable: true
30828
+ });
30829
+ Object.defineProperty(DImagePieceContainerImpl.prototype, "align", {
30830
+ get: function () {
30831
+ return this._pieces[0].align;
30832
+ },
30833
+ enumerable: false,
30834
+ configurable: true
30835
+ });
30836
+ Object.defineProperty(DImagePieceContainerImpl.prototype, "margin", {
30837
+ get: function () {
30838
+ return this._pieces[0].margin;
30839
+ },
30840
+ enumerable: false,
30841
+ configurable: true
30842
+ });
30843
+ Object.defineProperty(DImagePieceContainerImpl.prototype, "tint", {
30844
+ get: function () {
30845
+ return this._pieces[0].tint;
30846
+ },
30847
+ enumerable: false,
30848
+ configurable: true
30849
+ });
30850
+ Object.defineProperty(DImagePieceContainerImpl.prototype, "source", {
30851
+ get: function () {
30852
+ return this._pieces[0].source;
30853
+ },
30854
+ set: function (source) {
30855
+ this._pieces[0].source = source;
30856
+ },
30857
+ enumerable: false,
30858
+ configurable: true
30859
+ });
30860
+ Object.defineProperty(DImagePieceContainerImpl.prototype, "rotation", {
30861
+ get: function () {
30862
+ return this._pieces[0].rotation;
30863
+ },
30864
+ set: function (rotation) {
30865
+ this._pieces[0].rotation = rotation;
30866
+ },
30867
+ enumerable: false,
30868
+ configurable: true
30869
+ });
30433
30870
  DImagePieceContainerImpl.prototype.add = function (options) {
30434
30871
  var result = this.newImage(this._theme, options);
30435
30872
  this._pieces.push(result);
@@ -30504,24 +30941,13 @@
30504
30941
  _super.prototype.onStateChange.call(this, newState, oldState);
30505
30942
  this.getImage().onStateChange(newState, oldState);
30506
30943
  };
30507
- DImageBase.prototype.updateText = function () {
30508
- this.updateTextValue();
30509
- this.updateTextAndImage();
30510
- };
30511
- DImageBase.prototype.updateTextAndImage = function () {
30512
- var _a;
30513
- var layouter = ((_a = DImageBase.LAYOUTER) !== null && _a !== void 0 ? _a : (DImageBase.LAYOUTER = new DImagePieceLayouter()));
30514
- this.getImage().updateTextAndImage(layouter);
30515
- var text = this._text;
30516
- if (text != null) {
30517
- this.updateTextColor(text);
30518
- layouter.set(text);
30519
- }
30520
- else {
30521
- layouter.set(null);
30522
- }
30944
+ DImageBase.prototype.onReflowTextAndImage = function () {
30945
+ var layouter = this.getLayouter();
30946
+ this.getImage().update(layouter);
30947
+ var text = this.getText();
30948
+ text.update(layouter);
30523
30949
  var auto = this._auto;
30524
- layouter.execute(this._padding, this._textAlign, auto.width.isOn ? null : this.width, auto.height.isOn ? null : this.height);
30950
+ layouter.execute(this._padding, text.align, auto.width.isOn ? null : this.width, auto.height.isOn ? null : this.height);
30525
30951
  layouter.clear();
30526
30952
  };
30527
30953
  DImageBase.prototype.isRefitable = function (target) {
@@ -31810,16 +32236,16 @@
31810
32236
  return _this.containsPoint(point);
31811
32237
  },
31812
32238
  onStart: function () {
31813
- _this.hideText();
32239
+ _this.text.hide();
31814
32240
  },
31815
32241
  onCancel: function () {
31816
- _this.showText();
32242
+ _this.text.show();
31817
32243
  },
31818
32244
  onEnd: function () {
31819
32245
  // DO NOTHING
31820
32246
  },
31821
32247
  getValue: function () {
31822
- return _this._textValueComputed;
32248
+ return _this.text.computed;
31823
32249
  },
31824
32250
  onValueInput: function (newValue) {
31825
32251
  _this.onValueInput(newValue);
@@ -31838,7 +32264,7 @@
31838
32264
  };
31839
32265
  Object.defineProperty(DInput.prototype, "value", {
31840
32266
  get: function () {
31841
- return this._textValueComputed;
32267
+ return this.text.computed;
31842
32268
  },
31843
32269
  set: function (value) {
31844
32270
  this.text = value;
@@ -31846,9 +32272,13 @@
31846
32272
  enumerable: false,
31847
32273
  configurable: true
31848
32274
  });
31849
- DInput.prototype.onTextChange = function () {
31850
- _super.prototype.onTextChange.call(this);
31851
- this.validate();
32275
+ DInput.prototype.newText = function () {
32276
+ var _this = this;
32277
+ var result = _super.prototype.newText.call(this);
32278
+ result.on("change", function () {
32279
+ _this.validate();
32280
+ });
32281
+ return result;
31852
32282
  };
31853
32283
  DInput.prototype.onValueChange = function (newValue, oldValue) {
31854
32284
  this.emit("change", newValue, oldValue, this);
@@ -35107,7 +35537,7 @@
35107
35537
  var toImageElement = function (dataUrl) {
35108
35538
  var cachedImageElement = imageElementCache[dataUrl];
35109
35539
  if (cachedImageElement != null) {
35110
- if (cachedImageElement instanceof HTMLImageElement) {
35540
+ if ("url" in cachedImageElement) {
35111
35541
  return Promise.resolve(cachedImageElement);
35112
35542
  }
35113
35543
  else {
@@ -35118,8 +35548,14 @@
35118
35548
  var result = new Promise(function (resolve, reject) {
35119
35549
  var imageElement = document.createElement("img");
35120
35550
  imageElement.onload = function () {
35121
- imageElementCache[dataUrl] = imageElement;
35122
- resolve(imageElement);
35551
+ var resolved = {
35552
+ url: dataUrl,
35553
+ width: imageElement.width,
35554
+ height: imageElement.height,
35555
+ source: imageElement
35556
+ };
35557
+ imageElementCache[dataUrl] = resolved;
35558
+ resolve(resolved);
35123
35559
  };
35124
35560
  imageElement.onabort = imageElement.onerror = function () {
35125
35561
  reject();
@@ -36234,18 +36670,20 @@
36234
36670
  */
36235
36671
  var BuilderRectangleRounded = /** @class */ (function (_super) {
36236
36672
  __extends(BuilderRectangleRounded, _super);
36237
- function BuilderRectangleRounded(vertexOffset, indexOffset, vertexCount, indexCount) {
36238
- var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount) || this;
36673
+ function BuilderRectangleRounded(buffer, vertexOffset, indexOffset) {
36674
+ var _this = _super.call(this, buffer, vertexOffset, indexOffset, RECTANGLE_ROUNDED_VERTEX_COUNT, RECTANGLE_ROUNDED_INDEX_COUNT) || this;
36239
36675
  _this.radius = 0;
36240
36676
  _this.corner = 0;
36241
36677
  return _this;
36242
36678
  }
36243
- BuilderRectangleRounded.prototype.init = function (buffer) {
36679
+ BuilderRectangleRounded.prototype.init = function () {
36680
+ var buffer = this.buffer;
36244
36681
  buffer.updateIndices();
36245
36682
  buildRectangleRoundedIndex(buffer.indices, this.vertexOffset, this.indexOffset);
36246
36683
  this.inited |= BuilderFlag.INDEX;
36247
36684
  };
36248
- BuilderRectangleRounded.prototype.update = function (buffer, shape) {
36685
+ BuilderRectangleRounded.prototype.update = function (shape) {
36686
+ var buffer = this.buffer;
36249
36687
  this.updateVertexClippingStepAndUv(buffer, shape);
36250
36688
  this.updateColorFill(buffer, shape);
36251
36689
  this.updateColorStroke(buffer, shape);
@@ -36327,8 +36765,8 @@
36327
36765
  var icount = RECTANGLE_ROUNDED_INDEX_COUNT + ticount;
36328
36766
  if (buffer.check(voffset, ioffset, vcount, icount)) {
36329
36767
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
36330
- new BuilderRectangleRounded(voffset, ioffset, vcount - tvcount, icount - ticount),
36331
- new BuilderText(voffset + RECTANGLE_ROUNDED_VERTEX_COUNT, ioffset + RECTANGLE_ROUNDED_INDEX_COUNT, tvcount, ticount)
36768
+ new BuilderRectangleRounded(buffer, voffset, ioffset),
36769
+ new BuilderText(buffer, voffset + RECTANGLE_ROUNDED_VERTEX_COUNT, ioffset + RECTANGLE_ROUNDED_INDEX_COUNT, tvcount, ticount)
36332
36770
  ]).init(shape);
36333
36771
  }
36334
36772
  return null;
@@ -37199,10 +37637,11 @@
37199
37637
  */
37200
37638
  var BuilderCircle = /** @class */ (function (_super) {
37201
37639
  __extends(BuilderCircle, _super);
37202
- function BuilderCircle(vertexOffset, indexOffset) {
37203
- return _super.call(this, vertexOffset, indexOffset, CIRCLE_VERTEX_COUNT, CIRCLE_INDEX_COUNT) || this;
37640
+ function BuilderCircle(buffer, vertexOffset, indexOffset) {
37641
+ return _super.call(this, buffer, vertexOffset, indexOffset, CIRCLE_VERTEX_COUNT, CIRCLE_INDEX_COUNT) || this;
37204
37642
  }
37205
- BuilderCircle.prototype.init = function (buffer) {
37643
+ BuilderCircle.prototype.init = function () {
37644
+ var buffer = this.buffer;
37206
37645
  buffer.updateClippings();
37207
37646
  buffer.updateIndices();
37208
37647
  var voffset = this.vertexOffset;
@@ -37210,7 +37649,8 @@
37210
37649
  buildCircleIndex(buffer.indices, voffset, this.indexOffset);
37211
37650
  this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
37212
37651
  };
37213
- BuilderCircle.prototype.update = function (buffer, shape) {
37652
+ BuilderCircle.prototype.update = function (shape) {
37653
+ var buffer = this.buffer;
37214
37654
  this.updateVertexAndStep(buffer, shape);
37215
37655
  this.updateColorFill(buffer, shape);
37216
37656
  this.updateColorStroke(buffer, shape);
@@ -37276,8 +37716,8 @@
37276
37716
  var icount = CIRCLE_INDEX_COUNT + ticount;
37277
37717
  if (buffer.check(voffset, ioffset, vcount, icount)) {
37278
37718
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
37279
- new BuilderCircle(voffset, ioffset),
37280
- new BuilderText(voffset + CIRCLE_VERTEX_COUNT, ioffset + CIRCLE_INDEX_COUNT, tvcount, ticount)
37719
+ new BuilderCircle(buffer, voffset, ioffset),
37720
+ new BuilderText(buffer, voffset + CIRCLE_VERTEX_COUNT, ioffset + CIRCLE_INDEX_COUNT, tvcount, ticount)
37281
37721
  ]).init(shape);
37282
37722
  }
37283
37723
  return null;
@@ -37302,21 +37742,22 @@
37302
37742
 
37303
37743
  var LINE_FMIN = 0.00001;
37304
37744
  var LINE_WORK_POINT = new pixi_js.Point();
37305
- var toPointsCount = function (points) {
37745
+ var toPointCount = function (points) {
37306
37746
  if (points) {
37307
- return points.formatted.length;
37747
+ return points.formatted.plength;
37308
37748
  }
37309
37749
  return 0;
37310
37750
  };
37311
37751
  var toLinePointCount = function (points) {
37312
- return Math.ceil(toPointsCount(points) / 12) * 12;
37752
+ var pointCount = toPointCount(points);
37753
+ return ((pointCount >> 4) + (0 < (pointCount & 0xf) ? 1 : 0)) << 4;
37313
37754
  };
37314
37755
  var toLineVertexCount = function (pointCount, isClosed) {
37315
37756
  if (isClosed) {
37316
- return pointCount * 4 + 2;
37757
+ return (pointCount << 2) + 2;
37317
37758
  }
37318
37759
  else {
37319
- return pointCount * 4;
37760
+ return pointCount << 2;
37320
37761
  }
37321
37762
  };
37322
37763
  var toLineIndexCount = function (pointCount, isClosed) {
@@ -37704,24 +38145,53 @@
37704
38145
  */
37705
38146
  var BuilderLine = /** @class */ (function (_super) {
37706
38147
  __extends(BuilderLine, _super);
37707
- function BuilderLine(vertexOffset, indexOffset, vertexCount, indexCount) {
37708
- var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount) || this;
38148
+ function BuilderLine(buffer, vertexOffset, indexOffset, vertexCount, indexCount) {
38149
+ var _this = _super.call(this, buffer, vertexOffset, indexOffset, vertexCount, indexCount) || this;
37709
38150
  _this.pointId = -1;
37710
38151
  _this.pointCount = 0;
37711
38152
  _this.pointsClosed = false;
37712
38153
  _this.length = 1;
37713
38154
  return _this;
37714
38155
  }
37715
- BuilderLine.prototype.init = function (buffer) {
38156
+ BuilderLine.prototype.init = function () {
38157
+ var buffer = this.buffer;
37716
38158
  buffer.updateIndices();
37717
38159
  buildLineIndex(buffer.indices, this.vertexOffset, this.indexOffset, this.indexCount);
37718
38160
  this.inited |= BuilderFlag.INDEX;
37719
38161
  };
38162
+ BuilderLine.prototype.reinit = function (buffer, shape, vertexOffset, indexOffset) {
38163
+ var pointCount = toLinePointCount(shape.points);
38164
+ var vertexCount = toLineVertexCount(pointCount, true);
38165
+ var indexCount = toLineIndexCount(pointCount, true);
38166
+ if (this.buffer !== buffer ||
38167
+ this.vertexOffset !== vertexOffset ||
38168
+ this.indexOffset !== indexOffset ||
38169
+ this.vertexCount !== vertexCount ||
38170
+ this.indexCount !== indexCount) {
38171
+ if (buffer.check(vertexOffset, indexOffset, vertexCount, indexCount)) {
38172
+ this.inited = BuilderFlag.NONE;
38173
+ this.buffer = buffer;
38174
+ this.vertexOffset = vertexOffset;
38175
+ this.indexOffset = indexOffset;
38176
+ this.vertexCount = vertexCount;
38177
+ this.indexCount = indexCount;
38178
+ this.init();
38179
+ return true;
38180
+ }
38181
+ else {
38182
+ return false;
38183
+ }
38184
+ }
38185
+ else {
38186
+ return true;
38187
+ }
38188
+ };
37720
38189
  BuilderLine.prototype.isCompatible = function (shape) {
37721
38190
  var vcount = toLineVertexCount(toLinePointCount(shape.points), true);
37722
38191
  return vcount === this.vertexCount;
37723
38192
  };
37724
- BuilderLine.prototype.update = function (buffer, shape) {
38193
+ BuilderLine.prototype.update = function (shape) {
38194
+ var buffer = this.buffer;
37725
38195
  this.updateLineClipping(buffer, shape);
37726
38196
  this.updateLineVertexStepAndColorFill(buffer, shape);
37727
38197
  this.updateColorStroke(buffer, shape);
@@ -37970,19 +38440,21 @@
37970
38440
  */
37971
38441
  var BuilderMarkerTriangle = /** @class */ (function (_super) {
37972
38442
  __extends(BuilderMarkerTriangle, _super);
37973
- function BuilderMarkerTriangle(vertexOffset, indexOffset) {
37974
- var _this = _super.call(this, vertexOffset, indexOffset, TRIANGLE_VERTEX_COUNT, TRIANGLE_INDEX_COUNT) || this;
38443
+ function BuilderMarkerTriangle(buffer, vertexOffset, indexOffset) {
38444
+ var _this = _super.call(this, buffer, vertexOffset, indexOffset, TRIANGLE_VERTEX_COUNT, TRIANGLE_INDEX_COUNT) || this;
37975
38445
  _this.pointId = -1;
37976
38446
  return _this;
37977
38447
  }
37978
- BuilderMarkerTriangle.prototype.init = function (buffer) {
38448
+ BuilderMarkerTriangle.prototype.init = function () {
38449
+ var buffer = this.buffer;
37979
38450
  buffer.updateClippings();
37980
38451
  buffer.updateIndices();
37981
38452
  buildTriangleClipping(buffer.clippings, this.vertexOffset);
37982
38453
  buildTriangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
37983
38454
  this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
37984
38455
  };
37985
- BuilderMarkerTriangle.prototype.update = function (buffer, shape) {
38456
+ BuilderMarkerTriangle.prototype.update = function (shape) {
38457
+ var buffer = this.buffer;
37986
38458
  this.updateVertexStepAndUv(buffer, shape);
37987
38459
  this.updateColorFill(buffer, shape);
37988
38460
  this.updateColorStroke(buffer, shape);
@@ -38087,12 +38559,13 @@
38087
38559
  */
38088
38560
  var BuilderMarkerCircle = /** @class */ (function (_super) {
38089
38561
  __extends(BuilderMarkerCircle, _super);
38090
- function BuilderMarkerCircle(vertexOffset, indexOffset) {
38091
- var _this = _super.call(this, vertexOffset, indexOffset, CIRCLE_VERTEX_COUNT, CIRCLE_INDEX_COUNT) || this;
38562
+ function BuilderMarkerCircle(buffer, vertexOffset, indexOffset) {
38563
+ var _this = _super.call(this, buffer, vertexOffset, indexOffset, CIRCLE_VERTEX_COUNT, CIRCLE_INDEX_COUNT) || this;
38092
38564
  _this.pointId = -1;
38093
38565
  return _this;
38094
38566
  }
38095
- BuilderMarkerCircle.prototype.init = function (buffer) {
38567
+ BuilderMarkerCircle.prototype.init = function () {
38568
+ var buffer = this.buffer;
38096
38569
  buffer.updateClippings();
38097
38570
  buffer.updateIndices();
38098
38571
  var vertexOffset = this.vertexOffset;
@@ -38100,7 +38573,8 @@
38100
38573
  buildCircleIndex(buffer.indices, vertexOffset, this.indexOffset);
38101
38574
  this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
38102
38575
  };
38103
- BuilderMarkerCircle.prototype.update = function (buffer, shape) {
38576
+ BuilderMarkerCircle.prototype.update = function (shape) {
38577
+ var buffer = this.buffer;
38104
38578
  this.updateVertexAndStep(buffer, shape);
38105
38579
  this.updateColorFill(buffer, shape);
38106
38580
  this.updateColorStroke(buffer, shape);
@@ -38208,20 +38682,27 @@
38208
38682
  * SPDX-License-Identifier: Apache-2.0
38209
38683
  */
38210
38684
  var BuilderNull = /** @class */ (function () {
38211
- function BuilderNull(vertexOffset, indexOffset) {
38685
+ function BuilderNull(buffer, vertexOffset, indexOffset) {
38686
+ this.buffer = buffer;
38212
38687
  this.vertexOffset = vertexOffset;
38213
38688
  this.indexOffset = indexOffset;
38214
38689
  this.vertexCount = 0;
38215
38690
  this.indexCount = 0;
38216
38691
  this.texture = null;
38217
38692
  }
38218
- BuilderNull.prototype.init = function (buffer) {
38219
- // DO NOTHING
38693
+ BuilderNull.prototype.init = function () {
38694
+ return this;
38695
+ };
38696
+ BuilderNull.prototype.reinit = function (buffer, shape, vertexOffset, indexOffset) {
38697
+ this.buffer = buffer;
38698
+ this.vertexOffset = vertexOffset;
38699
+ this.indexOffset = indexOffset;
38700
+ return true;
38220
38701
  };
38221
38702
  BuilderNull.prototype.isCompatible = function (shape) {
38222
38703
  return true;
38223
38704
  };
38224
- BuilderNull.prototype.update = function (buffer, shape) {
38705
+ BuilderNull.prototype.update = function (shape) {
38225
38706
  this.texture = toTexture(shape);
38226
38707
  };
38227
38708
  BuilderNull.prototype.buildUnit = function (builder) {
@@ -38651,17 +39132,19 @@
38651
39132
  */
38652
39133
  var BuilderMarkerRectangle = /** @class */ (function (_super) {
38653
39134
  __extends(BuilderMarkerRectangle, _super);
38654
- function BuilderMarkerRectangle(vertexOffset, indexOffset) {
38655
- var _this = _super.call(this, vertexOffset, indexOffset, RECTANGLE_VERTEX_COUNT, RECTANGLE_INDEX_COUNT) || this;
39135
+ function BuilderMarkerRectangle(buffer, vertexOffset, indexOffset) {
39136
+ var _this = _super.call(this, buffer, vertexOffset, indexOffset, RECTANGLE_VERTEX_COUNT, RECTANGLE_INDEX_COUNT) || this;
38656
39137
  _this.pointId = -1;
38657
39138
  return _this;
38658
39139
  }
38659
- BuilderMarkerRectangle.prototype.init = function (buffer) {
39140
+ BuilderMarkerRectangle.prototype.init = function () {
39141
+ var buffer = this.buffer;
38660
39142
  buffer.updateIndices();
38661
39143
  buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
38662
39144
  this.inited |= BuilderFlag.INDEX;
38663
39145
  };
38664
- BuilderMarkerRectangle.prototype.update = function (buffer, shape) {
39146
+ BuilderMarkerRectangle.prototype.update = function (shape) {
39147
+ var buffer = this.buffer;
38665
39148
  this.updateVertexClippingStepAndUv(buffer, shape);
38666
39149
  this.updateColorFill(buffer, shape);
38667
39150
  this.updateColorStroke(buffer, shape);
@@ -38800,31 +39283,31 @@
38800
39283
  }
38801
39284
  return 0;
38802
39285
  };
38803
- var toBuilderMarkerHead = function (type, vertexOffset, indexOffset) {
39286
+ var toBuilderMarkerHead = function (type, buffer, vertexOffset, indexOffset) {
38804
39287
  switch (type) {
38805
39288
  case EShapePointsMarkerType.NONE:
38806
- return new BuilderNull(vertexOffset, indexOffset);
39289
+ return new BuilderNull(buffer, vertexOffset, indexOffset);
38807
39290
  case EShapePointsMarkerType.CIRCLE:
38808
- return new BuilderMarkerCircleHead(vertexOffset, indexOffset);
39291
+ return new BuilderMarkerCircleHead(buffer, vertexOffset, indexOffset);
38809
39292
  case EShapePointsMarkerType.TRIANGLE:
38810
- return new BuilderMarkerTriangleHead(vertexOffset, indexOffset);
39293
+ return new BuilderMarkerTriangleHead(buffer, vertexOffset, indexOffset);
38811
39294
  case EShapePointsMarkerType.RECTANGLE:
38812
- return new BuilderMarkerRectangleHead(vertexOffset, indexOffset);
39295
+ return new BuilderMarkerRectangleHead(buffer, vertexOffset, indexOffset);
38813
39296
  }
38814
- return new BuilderNull(vertexOffset, indexOffset);
39297
+ return new BuilderNull(buffer, vertexOffset, indexOffset);
38815
39298
  };
38816
- var toBuilderMarkerTail = function (type, vertexOffset, indexOffset) {
39299
+ var toBuilderMarkerTail = function (type, buffer, vertexOffset, indexOffset) {
38817
39300
  switch (type) {
38818
39301
  case EShapePointsMarkerType.NONE:
38819
- return new BuilderNull(vertexOffset, indexOffset);
39302
+ return new BuilderNull(buffer, vertexOffset, indexOffset);
38820
39303
  case EShapePointsMarkerType.CIRCLE:
38821
- return new BuilderMarkerCircleTail(vertexOffset, indexOffset);
39304
+ return new BuilderMarkerCircleTail(buffer, vertexOffset, indexOffset);
38822
39305
  case EShapePointsMarkerType.TRIANGLE:
38823
- return new BuilderMarkerTriangleTail(vertexOffset, indexOffset);
39306
+ return new BuilderMarkerTriangleTail(buffer, vertexOffset, indexOffset);
38824
39307
  case EShapePointsMarkerType.RECTANGLE:
38825
- return new BuilderMarkerRectangleTail(vertexOffset, indexOffset);
39308
+ return new BuilderMarkerRectangleTail(buffer, vertexOffset, indexOffset);
38826
39309
  }
38827
- return new BuilderNull(vertexOffset, indexOffset);
39310
+ return new BuilderNull(buffer, vertexOffset, indexOffset);
38828
39311
  };
38829
39312
  var createLineUploaded = function (buffer, shape, voffset, ioffset, antialiasWeight) {
38830
39313
  // Line
@@ -38861,10 +39344,10 @@
38861
39344
  var icount = licount + mhicount + mticount + ticount;
38862
39345
  if (buffer.check(voffset, ioffset, vcount, icount)) {
38863
39346
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
38864
- new BuilderLine(voffset, ioffset, lvcount, licount),
38865
- toBuilderMarkerTail(mttype, mtvoffset, mtioffset),
38866
- toBuilderMarkerHead(mhtype, mhvoffset, mhioffset),
38867
- new BuilderText(tvoffset, tioffset, tvcount, ticount)
39347
+ new BuilderLine(buffer, voffset, ioffset, lvcount, licount),
39348
+ toBuilderMarkerTail(mttype, buffer, mtvoffset, mtioffset),
39349
+ toBuilderMarkerHead(mhtype, buffer, mhvoffset, mhioffset),
39350
+ new BuilderText(buffer, tvoffset, tioffset, tvcount, ticount)
38868
39351
  ]).init(shape);
38869
39352
  }
38870
39353
  return null;
@@ -39363,15 +39846,17 @@
39363
39846
  */
39364
39847
  var BuilderRectanglePivoted = /** @class */ (function (_super) {
39365
39848
  __extends(BuilderRectanglePivoted, _super);
39366
- function BuilderRectanglePivoted() {
39367
- return _super !== null && _super.apply(this, arguments) || this;
39849
+ function BuilderRectanglePivoted(buffer, vertexOffset, indexOffset) {
39850
+ return _super.call(this, buffer, vertexOffset, indexOffset, RECTANGLE_VERTEX_COUNT, RECTANGLE_INDEX_COUNT) || this;
39368
39851
  }
39369
- BuilderRectanglePivoted.prototype.init = function (buffer) {
39852
+ BuilderRectanglePivoted.prototype.init = function () {
39853
+ var buffer = this.buffer;
39370
39854
  buffer.updateIndices();
39371
39855
  buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
39372
39856
  this.inited |= BuilderFlag.INDEX;
39373
39857
  };
39374
- BuilderRectanglePivoted.prototype.update = function (buffer, shape) {
39858
+ BuilderRectanglePivoted.prototype.update = function (shape) {
39859
+ var buffer = this.buffer;
39375
39860
  this.updateVertexClippingStepAndUv(buffer, shape);
39376
39861
  this.updateColorFill(buffer, shape);
39377
39862
  this.updateColorStroke(buffer, shape);
@@ -39444,8 +39929,8 @@
39444
39929
  var icount = RECTANGLE_INDEX_COUNT + ticount;
39445
39930
  if (buffer.check(voffset, ioffset, vcount, icount)) {
39446
39931
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
39447
- new BuilderRectanglePivoted(voffset, ioffset, vcount - tvcount, icount - ticount),
39448
- new BuilderText(voffset + RECTANGLE_VERTEX_COUNT, ioffset + RECTANGLE_INDEX_COUNT, tvcount, ticount)
39932
+ new BuilderRectanglePivoted(buffer, voffset, ioffset),
39933
+ new BuilderText(buffer, voffset + RECTANGLE_VERTEX_COUNT, ioffset + RECTANGLE_INDEX_COUNT, tvcount, ticount)
39449
39934
  ]).init(shape);
39450
39935
  }
39451
39936
  return null;
@@ -39463,7 +39948,7 @@
39463
39948
  var icount = ticount;
39464
39949
  if (buffer.check(voffset, ioffset, vcount, icount)) {
39465
39950
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
39466
- new BuilderText(voffset, ioffset, tvcount, ticount)
39951
+ new BuilderText(buffer, voffset, ioffset, tvcount, ticount)
39467
39952
  ]).init(shape);
39468
39953
  }
39469
39954
  return null;
@@ -39750,6 +40235,20 @@
39750
40235
  enumerable: false,
39751
40236
  configurable: true
39752
40237
  });
40238
+ Object.defineProperty(EShapeGroupPoints.prototype, "plength", {
40239
+ get: function () {
40240
+ var children = this._parent.children;
40241
+ if (0 < children.length) {
40242
+ var points = children[children.length - 1].points;
40243
+ if (points != null) {
40244
+ return points.plength;
40245
+ }
40246
+ }
40247
+ return 0;
40248
+ },
40249
+ enumerable: false,
40250
+ configurable: true
40251
+ });
39753
40252
  Object.defineProperty(EShapeGroupPoints.prototype, "id", {
39754
40253
  get: function () {
39755
40254
  var children = this._parent.children;
@@ -40211,6 +40710,9 @@
40211
40710
  enumerable: false,
40212
40711
  configurable: true
40213
40712
  });
40713
+ EShapeGroup.prototype.serializeGradient = function (manager) {
40714
+ return -1;
40715
+ };
40214
40716
  Object.defineProperty(EShapeGroup.prototype, "radius", {
40215
40717
  get: function () {
40216
40718
  var children = this.children;
@@ -40248,6 +40750,9 @@
40248
40750
  enumerable: false,
40249
40751
  configurable: true
40250
40752
  });
40753
+ EShapeGroup.prototype.serializeImage = function (manager) {
40754
+ return -1;
40755
+ };
40251
40756
  Object.defineProperty(EShapeGroup.prototype, "points", {
40252
40757
  get: function () {
40253
40758
  var children = this.children;
@@ -40452,15 +40957,17 @@
40452
40957
  */
40453
40958
  var BuilderRectangle = /** @class */ (function (_super) {
40454
40959
  __extends(BuilderRectangle, _super);
40455
- function BuilderRectangle() {
40456
- return _super !== null && _super.apply(this, arguments) || this;
40960
+ function BuilderRectangle(buffer, vertexOffset, indexOffset) {
40961
+ return _super.call(this, buffer, vertexOffset, indexOffset, RECTANGLE_VERTEX_COUNT, RECTANGLE_INDEX_COUNT) || this;
40457
40962
  }
40458
- BuilderRectangle.prototype.init = function (buffer) {
40963
+ BuilderRectangle.prototype.init = function () {
40964
+ var buffer = this.buffer;
40459
40965
  buffer.updateIndices();
40460
40966
  buildRectangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
40461
40967
  this.inited |= BuilderFlag.INDEX;
40462
40968
  };
40463
- BuilderRectangle.prototype.update = function (buffer, shape) {
40969
+ BuilderRectangle.prototype.update = function (shape) {
40970
+ var buffer = this.buffer;
40464
40971
  this.updateVertexClippingStepAndUv(buffer, shape);
40465
40972
  this.updateColorFill(buffer, shape);
40466
40973
  this.updateColorStroke(buffer, shape);
@@ -40533,8 +41040,8 @@
40533
41040
  var icount = RECTANGLE_INDEX_COUNT + ticount;
40534
41041
  if (buffer.check(voffset, ioffset, vcount, icount)) {
40535
41042
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
40536
- new BuilderRectangle(voffset, ioffset, vcount - tvcount, icount - ticount),
40537
- new BuilderText(voffset + RECTANGLE_VERTEX_COUNT, ioffset + RECTANGLE_INDEX_COUNT, tvcount, ticount)
41043
+ new BuilderRectangle(buffer, voffset, ioffset),
41044
+ new BuilderText(buffer, voffset + RECTANGLE_VERTEX_COUNT, ioffset + RECTANGLE_INDEX_COUNT, tvcount, ticount)
40538
41045
  ]).init(shape);
40539
41046
  }
40540
41047
  return null;
@@ -40769,21 +41276,23 @@
40769
41276
  */
40770
41277
  var BuilderImageSdf = /** @class */ (function (_super) {
40771
41278
  __extends(BuilderImageSdf, _super);
40772
- function BuilderImageSdf(vertexOffset, indexOffset) {
40773
- var _this = _super.call(this, vertexOffset, indexOffset, IMAGE_SDF_VERTEX_COUNT, IMAGE_SDF_INDEX_COUNT) || this;
41279
+ function BuilderImageSdf(buffer, vertexOffset, indexOffset) {
41280
+ var _this = _super.call(this, buffer, vertexOffset, indexOffset, IMAGE_SDF_VERTEX_COUNT, IMAGE_SDF_INDEX_COUNT) || this;
40774
41281
  _this.textureWidth = -1;
40775
41282
  _this.textureHeight = -1;
40776
41283
  return _this;
40777
41284
  }
40778
- BuilderImageSdf.prototype.init = function (buffer) {
41285
+ BuilderImageSdf.prototype.init = function () {
40779
41286
  var voffset = this.vertexOffset;
41287
+ var buffer = this.buffer;
40780
41288
  buffer.updateClippings();
40781
41289
  buffer.updateIndices();
40782
41290
  buildImageSdfClipping(buffer.clippings, voffset);
40783
41291
  buildImageSdfIndex(buffer.indices, voffset, this.indexOffset);
40784
41292
  this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
40785
41293
  };
40786
- BuilderImageSdf.prototype.update = function (buffer, shape) {
41294
+ BuilderImageSdf.prototype.update = function (shape) {
41295
+ var buffer = this.buffer;
40787
41296
  this.updateVertexAndStep(buffer, shape);
40788
41297
  this.updateColorFill(buffer, shape);
40789
41298
  this.updateColorStroke(buffer, shape);
@@ -40859,8 +41368,8 @@
40859
41368
  var icount = IMAGE_SDF_INDEX_COUNT + ticount;
40860
41369
  if (buffer.check(voffset, ioffset, vcount, icount)) {
40861
41370
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
40862
- new BuilderImageSdf(voffset, ioffset),
40863
- new BuilderText(voffset + IMAGE_SDF_VERTEX_COUNT, ioffset + IMAGE_SDF_INDEX_COUNT, tvcount, ticount)
41371
+ new BuilderImageSdf(buffer, voffset, ioffset),
41372
+ new BuilderText(buffer, voffset + IMAGE_SDF_VERTEX_COUNT, ioffset + IMAGE_SDF_INDEX_COUNT, tvcount, ticount)
40864
41373
  ]).init(shape);
40865
41374
  }
40866
41375
  return null;
@@ -40904,20 +41413,27 @@
40904
41413
  * SPDX-License-Identifier: Apache-2.0
40905
41414
  */
40906
41415
  var BuilderLabel = /** @class */ (function () {
40907
- function BuilderLabel(vertexOffset, indexOffset, vertexCount, indexCount) {
41416
+ function BuilderLabel(buffer, vertexOffset, indexOffset) {
41417
+ this.buffer = buffer;
40908
41418
  this.vertexOffset = vertexOffset;
40909
41419
  this.indexOffset = indexOffset;
40910
- this.vertexCount = vertexCount;
40911
- this.indexCount = indexCount;
41420
+ this.vertexCount = 0;
41421
+ this.indexCount = 0;
40912
41422
  this.texture = null;
40913
41423
  }
40914
- BuilderLabel.prototype.init = function (buffer) {
40915
- // DO NOTHING
41424
+ BuilderLabel.prototype.init = function () {
41425
+ return this;
41426
+ };
41427
+ BuilderLabel.prototype.reinit = function (buffer, shape, vertexOffset, indexOffset) {
41428
+ this.buffer = buffer;
41429
+ this.vertexOffset = vertexOffset;
41430
+ this.indexOffset = indexOffset;
41431
+ return true;
40916
41432
  };
40917
41433
  BuilderLabel.prototype.isCompatible = function (shape) {
40918
41434
  return true;
40919
41435
  };
40920
- BuilderLabel.prototype.update = function (buffer, shape) {
41436
+ BuilderLabel.prototype.update = function (shape) {
40921
41437
  this.texture = toTexture(shape);
40922
41438
  };
40923
41439
  BuilderLabel.prototype.buildUnit = function (builder) {
@@ -40944,8 +41460,8 @@
40944
41460
  var icount = ticount;
40945
41461
  if (buffer.check(voffset, ioffset, vcount, icount)) {
40946
41462
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
40947
- new BuilderLabel(voffset, ioffset, vcount - tvcount, icount - ticount),
40948
- new BuilderText(voffset, ioffset, tvcount, ticount)
41463
+ new BuilderLabel(buffer, voffset, ioffset),
41464
+ new BuilderText(buffer, voffset, ioffset, tvcount, ticount)
40949
41465
  ]).init(shape);
40950
41466
  }
40951
41467
  return null;
@@ -41081,7 +41597,7 @@
41081
41597
  };
41082
41598
 
41083
41599
  var toLineOfAnyPointCount = function (pointCount) {
41084
- return Math.ceil(pointCount / 12) * 12;
41600
+ return ((pointCount >> 4) + (0 < (pointCount & 0xf) ? 1 : 0)) << 4;
41085
41601
  };
41086
41602
  var buildLineOfAnyColor = function (voffset, vcountPerPoint, point, pointCount, colors, isEnabled, colorDef, alphaDef) {
41087
41603
  if (isEnabled) {
@@ -41135,8 +41651,8 @@
41135
41651
  */
41136
41652
  var BuilderLineOfAny = /** @class */ (function (_super) {
41137
41653
  __extends(BuilderLineOfAny, _super);
41138
- function BuilderLineOfAny(vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) {
41139
- var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount) || this;
41654
+ function BuilderLineOfAny(buffer, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved, vcountPerPoint, icountPerPoint) {
41655
+ var _this = _super.call(this, buffer, vertexOffset, indexOffset, vertexCount, indexCount) || this;
41140
41656
  _this.pointId = -1;
41141
41657
  _this.pointCount = 0;
41142
41658
  _this.pointCountReserved = pointCountReserved;
@@ -41144,10 +41660,39 @@
41144
41660
  _this.pointOffsetId = -1;
41145
41661
  _this.pointFillId = -1;
41146
41662
  _this.pointStrokeId = -1;
41663
+ _this.vcountPerPoint = vcountPerPoint;
41664
+ _this.icountPerPoint = icountPerPoint;
41147
41665
  return _this;
41148
41666
  }
41667
+ BuilderLineOfAny.prototype.reinit = function (buffer, shape, vertexOffset, indexOffset) {
41668
+ var pointCount = toLineOfAnyPointCount(toPointCount(shape.points));
41669
+ if (this.buffer !== buffer ||
41670
+ this.vertexOffset !== vertexOffset ||
41671
+ this.indexOffset !== indexOffset ||
41672
+ this.pointCountReserved !== pointCount) {
41673
+ var vertexCount = pointCount * this.vcountPerPoint;
41674
+ var indexCount = pointCount * this.icountPerPoint;
41675
+ if (buffer.check(vertexOffset, indexOffset, vertexCount, indexCount)) {
41676
+ this.inited = BuilderFlag.NONE;
41677
+ this.buffer = buffer;
41678
+ this.vertexOffset = vertexOffset;
41679
+ this.indexOffset = indexOffset;
41680
+ this.vertexCount = vertexCount;
41681
+ this.indexCount = indexCount;
41682
+ this.pointCountReserved = pointCount;
41683
+ this.init();
41684
+ return true;
41685
+ }
41686
+ else {
41687
+ return false;
41688
+ }
41689
+ }
41690
+ else {
41691
+ return true;
41692
+ }
41693
+ };
41149
41694
  BuilderLineOfAny.prototype.isCompatible = function (shape) {
41150
- var pointCount = toLineOfAnyPointCount(toPointsCount(shape.points));
41695
+ var pointCount = toLineOfAnyPointCount(toPointCount(shape.points));
41151
41696
  return pointCount === this.pointCountReserved;
41152
41697
  };
41153
41698
  BuilderLineOfAny.prototype.updateLineOfAnyColorFill = function (buffer, shape, points, vcountPerPoint) {
@@ -41159,7 +41704,9 @@
41159
41704
  var colorFill = fill.color;
41160
41705
  var alphaFill = isFillEnabled ? fill.alpha : 0;
41161
41706
  var isFillChanged = colorFill !== this.colorFill || alphaFill !== this.alphaFill;
41162
- if (isPointFillChanged || isFillChanged) {
41707
+ var isNotInited = !(this.inited & BuilderFlag.COLOR_FILL);
41708
+ if (isNotInited || isPointFillChanged || isFillChanged) {
41709
+ this.inited |= BuilderFlag.COLOR_FILL;
41163
41710
  this.colorFill = colorFill;
41164
41711
  this.alphaFill = alphaFill;
41165
41712
  this.pointFillId = pointFillId;
@@ -41634,6 +42181,8 @@
41634
42181
  this._values = [];
41635
42182
  this._valuesLength = 0;
41636
42183
  this._segments = [];
42184
+ this._length = 0;
42185
+ this._plength = 0;
41637
42186
  this._size = new EShapeLineOfAnyPointsPointImpl(this, EShapeDefaults.SIZE_X, EShapeDefaults.SIZE_Y);
41638
42187
  this._offset = new EShapeLineOfAnyPointsPointImpl(this, 0, 0);
41639
42188
  this._fill = new EShapeLineOfAnyPointsFillImpl(parent);
@@ -41642,7 +42191,14 @@
41642
42191
  }
41643
42192
  Object.defineProperty(EShapeLineOfAnyPointsImpl.prototype, "length", {
41644
42193
  get: function () {
41645
- return this._values.length >> 1;
42194
+ return this._length;
42195
+ },
42196
+ enumerable: false,
42197
+ configurable: true
42198
+ });
42199
+ Object.defineProperty(EShapeLineOfAnyPointsImpl.prototype, "plength", {
42200
+ get: function () {
42201
+ return this._plength;
41646
42202
  },
41647
42203
  enumerable: false,
41648
42204
  configurable: true
@@ -41787,6 +42343,11 @@
41787
42343
  isUpdated = true;
41788
42344
  }
41789
42345
  }
42346
+ var newLength = newValuesLength >> 1;
42347
+ this._length = newLength;
42348
+ if (this._plength < newLength) {
42349
+ this._plength = newLength;
42350
+ }
41790
42351
  }
41791
42352
  //
41792
42353
  if (isDirty) {
@@ -41798,7 +42359,6 @@
41798
42359
  parent_1.updateUploaded();
41799
42360
  }
41800
42361
  else {
41801
- parent_1.uploaded = undefined;
41802
42362
  parent_1.toDirty();
41803
42363
  }
41804
42364
  }
@@ -41873,7 +42433,8 @@
41873
42433
  function BuilderLineOfCircles() {
41874
42434
  return _super !== null && _super.apply(this, arguments) || this;
41875
42435
  }
41876
- BuilderLineOfCircles.prototype.init = function (buffer) {
42436
+ BuilderLineOfCircles.prototype.init = function () {
42437
+ var buffer = this.buffer;
41877
42438
  buffer.updateClippings();
41878
42439
  buffer.updateIndices();
41879
42440
  var clippings = buffer.clippings;
@@ -41889,9 +42450,10 @@
41889
42450
  }
41890
42451
  this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
41891
42452
  };
41892
- BuilderLineOfCircles.prototype.update = function (buffer, shape) {
42453
+ BuilderLineOfCircles.prototype.update = function (shape) {
41893
42454
  var points = shape.points;
41894
42455
  if (points instanceof EShapeLineOfAnyPointsImpl) {
42456
+ var buffer = this.buffer;
41895
42457
  this.updateVertexAndStep(buffer, shape, points);
41896
42458
  this.updateLineOfAnyColorFill(buffer, shape, points, CIRCLE_VERTEX_COUNT);
41897
42459
  this.updateLineOfAnyColorStroke(buffer, shape, points, CIRCLE_VERTEX_COUNT);
@@ -42009,15 +42571,15 @@
42009
42571
  var tvcount = tcount << TEXT_VERTEX_COUNT_SHIFT;
42010
42572
  var ticount = tcount << TEXT_INDEX_COUNT_SHIFT;
42011
42573
  var points = shape.points;
42012
- var pointCount = toLineOfAnyPointCount(toPointsCount(points));
42574
+ var pointCount = toLineOfAnyPointCount(toPointCount(points));
42013
42575
  var pvcount = pointCount * vcountPerPoint;
42014
42576
  var picount = pointCount * icountPerPoint;
42015
42577
  var vcount = pvcount + tvcount;
42016
42578
  var icount = picount + ticount;
42017
42579
  if (buffer.check(voffset, ioffset, vcount, icount)) {
42018
42580
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
42019
- new constructor(voffset, ioffset, pvcount, picount, pointCount),
42020
- new BuilderText(voffset + pvcount, ioffset + picount, tvcount, ticount)
42581
+ new constructor(buffer, voffset, ioffset, pvcount, picount, pointCount, vcountPerPoint, icountPerPoint),
42582
+ new BuilderText(buffer, voffset + pvcount, ioffset + picount, tvcount, ticount)
42021
42583
  ]).init(shape);
42022
42584
  }
42023
42585
  return null;
@@ -42100,13 +42662,14 @@
42100
42662
  */
42101
42663
  var BuilderLineOfRectangleRoundeds = /** @class */ (function (_super) {
42102
42664
  __extends(BuilderLineOfRectangleRoundeds, _super);
42103
- function BuilderLineOfRectangleRoundeds(vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) {
42104
- var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) || this;
42665
+ function BuilderLineOfRectangleRoundeds(buffer, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved, vcountPerPoint, icountPerPoint) {
42666
+ var _this = _super.call(this, buffer, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved, vcountPerPoint, icountPerPoint) || this;
42105
42667
  _this.radius = 0;
42106
42668
  _this.corner = 0;
42107
42669
  return _this;
42108
42670
  }
42109
- BuilderLineOfRectangleRoundeds.prototype.init = function (buffer) {
42671
+ BuilderLineOfRectangleRoundeds.prototype.init = function () {
42672
+ var buffer = this.buffer;
42110
42673
  buffer.updateIndices();
42111
42674
  var indices = buffer.indices;
42112
42675
  var voffset = this.vertexOffset;
@@ -42118,9 +42681,10 @@
42118
42681
  }
42119
42682
  this.inited |= BuilderFlag.INDEX;
42120
42683
  };
42121
- BuilderLineOfRectangleRoundeds.prototype.update = function (buffer, shape) {
42684
+ BuilderLineOfRectangleRoundeds.prototype.update = function (shape) {
42122
42685
  var points = shape.points;
42123
42686
  if (points instanceof EShapeLineOfAnyPointsImpl) {
42687
+ var buffer = this.buffer;
42124
42688
  this.updateVertexClippingStepAndUv(buffer, shape, points);
42125
42689
  this.updateLineOfAnyColorFill(buffer, shape, points, RECTANGLE_ROUNDED_VERTEX_COUNT);
42126
42690
  this.updateLineOfAnyColorStroke(buffer, shape, points, RECTANGLE_ROUNDED_VERTEX_COUNT);
@@ -42339,7 +42903,8 @@
42339
42903
  function BuilderLineOfRectangles() {
42340
42904
  return _super !== null && _super.apply(this, arguments) || this;
42341
42905
  }
42342
- BuilderLineOfRectangles.prototype.init = function (buffer) {
42906
+ BuilderLineOfRectangles.prototype.init = function () {
42907
+ var buffer = this.buffer;
42343
42908
  buffer.updateIndices();
42344
42909
  var indices = buffer.indices;
42345
42910
  var voffset = this.vertexOffset;
@@ -42351,9 +42916,10 @@
42351
42916
  }
42352
42917
  this.inited |= BuilderFlag.INDEX;
42353
42918
  };
42354
- BuilderLineOfRectangles.prototype.update = function (buffer, shape) {
42919
+ BuilderLineOfRectangles.prototype.update = function (shape) {
42355
42920
  var points = shape.points;
42356
42921
  if (points instanceof EShapeLineOfAnyPointsImpl) {
42922
+ var buffer = this.buffer;
42357
42923
  this.updateVertexClippingStepAndUv(buffer, shape, points);
42358
42924
  this.updateLineOfAnyColorFill(buffer, shape, points, RECTANGLE_VERTEX_COUNT);
42359
42925
  this.updateLineOfAnyColorStroke(buffer, shape, points, RECTANGLE_VERTEX_COUNT);
@@ -42964,13 +43530,14 @@
42964
43530
  */
42965
43531
  var BuilderLineOfTriangleRoundeds = /** @class */ (function (_super) {
42966
43532
  __extends(BuilderLineOfTriangleRoundeds, _super);
42967
- function BuilderLineOfTriangleRoundeds(vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) {
42968
- var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved) || this;
43533
+ function BuilderLineOfTriangleRoundeds(buffer, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved, vcountPerPoint, icountPerPoint) {
43534
+ var _this = _super.call(this, buffer, vertexOffset, indexOffset, vertexCount, indexCount, pointCountReserved, vcountPerPoint, icountPerPoint) || this;
42969
43535
  _this.radius = 0;
42970
43536
  _this.corner = 0;
42971
43537
  return _this;
42972
43538
  }
42973
- BuilderLineOfTriangleRoundeds.prototype.init = function (buffer) {
43539
+ BuilderLineOfTriangleRoundeds.prototype.init = function () {
43540
+ var buffer = this.buffer;
42974
43541
  buffer.updateIndices();
42975
43542
  var voffset = this.vertexOffset;
42976
43543
  var ioffset = this.indexOffset;
@@ -42981,9 +43548,10 @@
42981
43548
  }
42982
43549
  this.inited |= BuilderFlag.INDEX;
42983
43550
  };
42984
- BuilderLineOfTriangleRoundeds.prototype.update = function (buffer, shape) {
43551
+ BuilderLineOfTriangleRoundeds.prototype.update = function (shape) {
42985
43552
  var points = shape.points;
42986
43553
  if (points instanceof EShapeLineOfAnyPointsImpl) {
43554
+ var buffer = this.buffer;
42987
43555
  this.updateVertexClippingStepAndUv(buffer, shape, points);
42988
43556
  this.updateLineOfAnyColorFill(buffer, shape, points, TRIANGLE_ROUNDED_VERTEX_COUNT);
42989
43557
  this.updateLineOfAnyColorStroke(buffer, shape, points, TRIANGLE_ROUNDED_VERTEX_COUNT);
@@ -43346,7 +43914,8 @@
43346
43914
  function BuilderLineOfTriangles() {
43347
43915
  return _super !== null && _super.apply(this, arguments) || this;
43348
43916
  }
43349
- BuilderLineOfTriangles.prototype.init = function (buffer) {
43917
+ BuilderLineOfTriangles.prototype.init = function () {
43918
+ var buffer = this.buffer;
43350
43919
  buffer.updateClippings();
43351
43920
  buffer.updateIndices();
43352
43921
  var clippings = buffer.clippings;
@@ -43362,9 +43931,10 @@
43362
43931
  }
43363
43932
  this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
43364
43933
  };
43365
- BuilderLineOfTriangles.prototype.update = function (buffer, shape) {
43934
+ BuilderLineOfTriangles.prototype.update = function (shape) {
43366
43935
  var points = shape.points;
43367
43936
  if (points instanceof EShapeLineOfAnyPointsImpl) {
43937
+ var buffer = this.buffer;
43368
43938
  this.updateVertexStepAndUvs(buffer, shape, points);
43369
43939
  this.updateLineOfAnyColorFill(buffer, shape, points, TRIANGLE_VERTEX_COUNT);
43370
43940
  this.updateLineOfAnyColorStroke(buffer, shape, points, TRIANGLE_VERTEX_COUNT);
@@ -43570,7 +44140,7 @@
43570
44140
  */
43571
44141
  var createNullUploaded = function (buffer, shape, voffset, ioffset) {
43572
44142
  return new EShapeUploadedImpl(buffer, voffset, ioffset, 0, 0, [
43573
- new BuilderNull(voffset, ioffset)
44143
+ new BuilderNull(buffer, voffset, ioffset)
43574
44144
  ]).init(shape);
43575
44145
  };
43576
44146
 
@@ -43790,10 +44360,11 @@
43790
44360
  */
43791
44361
  var BuilderSemicircle = /** @class */ (function (_super) {
43792
44362
  __extends(BuilderSemicircle, _super);
43793
- function BuilderSemicircle(vertexOffset, indexOffset) {
43794
- return _super.call(this, vertexOffset, indexOffset, SEMICIRCLE_VERTEX_COUNT, SEMICIRCLE_INDEX_COUNT) || this;
44363
+ function BuilderSemicircle(buffer, vertexOffset, indexOffset) {
44364
+ return _super.call(this, buffer, vertexOffset, indexOffset, SEMICIRCLE_VERTEX_COUNT, SEMICIRCLE_INDEX_COUNT) || this;
43795
44365
  }
43796
- BuilderSemicircle.prototype.init = function (buffer) {
44366
+ BuilderSemicircle.prototype.init = function () {
44367
+ var buffer = this.buffer;
43797
44368
  buffer.updateClippings();
43798
44369
  buffer.updateIndices();
43799
44370
  var voffset = this.vertexOffset;
@@ -43801,7 +44372,8 @@
43801
44372
  buildSemicircleIndex(buffer.indices, voffset, this.indexOffset);
43802
44373
  this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
43803
44374
  };
43804
- BuilderSemicircle.prototype.update = function (buffer, shape) {
44375
+ BuilderSemicircle.prototype.update = function (shape) {
44376
+ var buffer = this.buffer;
43805
44377
  this.updateVertexAndStep(buffer, shape);
43806
44378
  this.updateColorFill(buffer, shape);
43807
44379
  this.updateColorStroke(buffer, shape);
@@ -43867,8 +44439,8 @@
43867
44439
  var icount = SEMICIRCLE_INDEX_COUNT + ticount;
43868
44440
  if (buffer.check(voffset, ioffset, vcount, icount)) {
43869
44441
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
43870
- new BuilderSemicircle(voffset, ioffset),
43871
- new BuilderText(voffset + SEMICIRCLE_VERTEX_COUNT, ioffset + SEMICIRCLE_INDEX_COUNT, tvcount, ticount)
44442
+ new BuilderSemicircle(buffer, voffset, ioffset),
44443
+ new BuilderText(buffer, voffset + SEMICIRCLE_VERTEX_COUNT, ioffset + SEMICIRCLE_INDEX_COUNT, tvcount, ticount)
43872
44444
  ]).init(shape);
43873
44445
  }
43874
44446
  return null;
@@ -43937,17 +44509,19 @@
43937
44509
  */
43938
44510
  var BuilderTriangle = /** @class */ (function (_super) {
43939
44511
  __extends(BuilderTriangle, _super);
43940
- function BuilderTriangle() {
43941
- return _super !== null && _super.apply(this, arguments) || this;
44512
+ function BuilderTriangle(buffer, vertexOffset, indexOffset) {
44513
+ return _super.call(this, buffer, vertexOffset, indexOffset, TRIANGLE_VERTEX_COUNT, TRIANGLE_INDEX_COUNT) || this;
43942
44514
  }
43943
- BuilderTriangle.prototype.init = function (buffer) {
44515
+ BuilderTriangle.prototype.init = function () {
44516
+ var buffer = this.buffer;
43944
44517
  buffer.updateClippings();
43945
44518
  buffer.updateIndices();
43946
44519
  buildTriangleClipping(buffer.clippings, this.vertexOffset);
43947
44520
  buildTriangleIndex(buffer.indices, this.vertexOffset, this.indexOffset);
43948
44521
  this.inited |= BuilderFlag.CLIPPING_AND_INDEX;
43949
44522
  };
43950
- BuilderTriangle.prototype.update = function (buffer, shape) {
44523
+ BuilderTriangle.prototype.update = function (shape) {
44524
+ var buffer = this.buffer;
43951
44525
  this.updateVertexStepAndUv(buffer, shape);
43952
44526
  this.updateColorFill(buffer, shape);
43953
44527
  this.updateColorStroke(buffer, shape);
@@ -44009,8 +44583,8 @@
44009
44583
  var icount = TRIANGLE_INDEX_COUNT + ticount;
44010
44584
  if (buffer.check(voffset, ioffset, vcount, icount)) {
44011
44585
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
44012
- new BuilderTriangle(voffset, ioffset, vcount - tvcount, icount - ticount),
44013
- new BuilderText(voffset + TRIANGLE_VERTEX_COUNT, ioffset + TRIANGLE_INDEX_COUNT, tvcount, ticount)
44586
+ new BuilderTriangle(buffer, voffset, ioffset),
44587
+ new BuilderText(buffer, voffset + TRIANGLE_VERTEX_COUNT, ioffset + TRIANGLE_INDEX_COUNT, tvcount, ticount)
44014
44588
  ]).init(shape);
44015
44589
  }
44016
44590
  return null;
@@ -44039,18 +44613,20 @@
44039
44613
  */
44040
44614
  var BuilderTriangleRounded = /** @class */ (function (_super) {
44041
44615
  __extends(BuilderTriangleRounded, _super);
44042
- function BuilderTriangleRounded(vertexOffset, indexOffset, vertexCount, indexCount) {
44043
- var _this = _super.call(this, vertexOffset, indexOffset, vertexCount, indexCount) || this;
44616
+ function BuilderTriangleRounded(buffer, vertexOffset, indexOffset) {
44617
+ var _this = _super.call(this, buffer, vertexOffset, indexOffset, TRIANGLE_ROUNDED_VERTEX_COUNT, TRIANGLE_ROUNDED_INDEX_COUNT) || this;
44044
44618
  _this.radius = 0;
44045
44619
  _this.corner = 0;
44046
44620
  return _this;
44047
44621
  }
44048
- BuilderTriangleRounded.prototype.init = function (buffer) {
44622
+ BuilderTriangleRounded.prototype.init = function () {
44623
+ var buffer = this.buffer;
44049
44624
  buffer.updateIndices();
44050
44625
  buildTriangleRoundedIndex(buffer.indices, this.vertexOffset, this.indexOffset);
44051
44626
  this.inited |= BuilderFlag.INDEX;
44052
44627
  };
44053
- BuilderTriangleRounded.prototype.update = function (buffer, shape) {
44628
+ BuilderTriangleRounded.prototype.update = function (shape) {
44629
+ var buffer = this.buffer;
44054
44630
  this.updateVertexClippingStepAndUv(buffer, shape);
44055
44631
  this.updateColorFill(buffer, shape);
44056
44632
  this.updateColorStroke(buffer, shape);
@@ -44126,8 +44702,8 @@
44126
44702
  var icount = TRIANGLE_ROUNDED_INDEX_COUNT + ticount;
44127
44703
  if (buffer.check(voffset, ioffset, vcount, icount)) {
44128
44704
  return new EShapeUploadedImpl(buffer, voffset, ioffset, vcount, icount, [
44129
- new BuilderTriangleRounded(voffset, ioffset, vcount - tvcount, icount - ticount),
44130
- new BuilderText(voffset + TRIANGLE_ROUNDED_VERTEX_COUNT, ioffset + TRIANGLE_ROUNDED_INDEX_COUNT, tvcount, ticount)
44705
+ new BuilderTriangleRounded(buffer, voffset, ioffset),
44706
+ new BuilderText(buffer, voffset + TRIANGLE_ROUNDED_VERTEX_COUNT, ioffset + TRIANGLE_ROUNDED_INDEX_COUNT, tvcount, ticount)
44131
44707
  ]).init(shape);
44132
44708
  }
44133
44709
  return null;
@@ -44338,9 +44914,9 @@
44338
44914
  var shortcuts = this._shortcuts;
44339
44915
  if (shortcuts != null && 0 < shortcuts.length) {
44340
44916
  var shortcut = shortcuts[0];
44341
- var shortcutText = this.newText();
44917
+ var shortcutText = this.newShortcutText();
44342
44918
  this._shortcutText = shortcutText;
44343
- this.snippet.add(this._shortcutText, true);
44919
+ this.snippet.add(shortcutText, true);
44344
44920
  shortcutText.text = UtilKeyboardEvent.toString(shortcut);
44345
44921
  }
44346
44922
  else {
@@ -44348,6 +44924,10 @@
44348
44924
  }
44349
44925
  this._shortcutMargin = this.theme.getShortcutTextMargin();
44350
44926
  };
44927
+ DMenuItemText.prototype.newShortcutText = function () {
44928
+ var _a, _b;
44929
+ return new DDynamicText(new DDynamicTextStyle(this, this.theme, (_b = (_a = this._options) === null || _a === void 0 ? void 0 : _a.text) === null || _b === void 0 ? void 0 : _b.style));
44930
+ };
44351
44931
  DMenuItemText.prototype.updateShortcutText = function () {
44352
44932
  var text = this._shortcutText;
44353
44933
  var margin = this._shortcutMargin;
@@ -44372,8 +44952,7 @@
44372
44952
  text.position.set(textX, textY);
44373
44953
  }
44374
44954
  };
44375
- DMenuItemText.prototype.updateTextColor = function (text) {
44376
- _super.prototype.updateTextColor.call(this, text);
44955
+ DMenuItemText.prototype.updateShortcutColor = function () {
44377
44956
  var shortcutText = this._shortcutText;
44378
44957
  if (shortcutText != null) {
44379
44958
  var theme = this.theme;
@@ -44382,8 +44961,9 @@
44382
44961
  shortcutText.alpha = theme.getShortcutAlpha(state);
44383
44962
  }
44384
44963
  };
44385
- DMenuItemText.prototype.updateText = function () {
44386
- _super.prototype.updateText.call(this);
44964
+ DMenuItemText.prototype.onReflow = function () {
44965
+ _super.prototype.onReflow.call(this);
44966
+ this.updateShortcutColor();
44387
44967
  this.updateShortcutText();
44388
44968
  };
44389
44969
  DMenuItemText.prototype.getType = function () {
@@ -46083,9 +46663,9 @@
46083
46663
  */
46084
46664
  var createImageSdf = function (dataUrl, convertToSdf) {
46085
46665
  if (convertToSdf) {
46086
- return toImageElement(dataUrl).then(function (imageElement) {
46666
+ return toImageElement(dataUrl).then(function (image) {
46087
46667
  var generator = DynamicSDFFontGenerator.getInstance().init();
46088
- generator.updateTexture(imageElement);
46668
+ generator.updateTexture(image.width, image.height, image.source);
46089
46669
  generator.render();
46090
46670
  var canvas = document.createElement("canvas");
46091
46671
  generator.read(canvas);
@@ -46093,8 +46673,8 @@
46093
46673
  });
46094
46674
  }
46095
46675
  else {
46096
- return toImageElement(dataUrl).then(function (imageElement) {
46097
- return new EShapeImageSdf(imageElement);
46676
+ return toImageElement(dataUrl).then(function (image) {
46677
+ return new EShapeImageSdf(image);
46098
46678
  });
46099
46679
  }
46100
46680
  };
@@ -46104,8 +46684,8 @@
46104
46684
  * SPDX-License-Identifier: Apache-2.0
46105
46685
  */
46106
46686
  var createImage = function (dataUrl) {
46107
- return toImageElement(dataUrl).then(function (imageElement) {
46108
- return new EShapeImage(imageElement);
46687
+ return toImageElement(dataUrl).then(function (image) {
46688
+ return new EShapeImage(image);
46109
46689
  });
46110
46690
  };
46111
46691
 
@@ -52843,7 +53423,7 @@
52843
53423
  var view = DPickerColorGradientView.from(1, 10, checkers, texture);
52844
53424
  this._view = view;
52845
53425
  view.setRectangle(0, 0, 0, texture.width, texture.height);
52846
- view.setData(0, this._textValueComputed);
53426
+ view.setData(0, this.text.computed);
52847
53427
  view.update();
52848
53428
  this.image = view;
52849
53429
  }
@@ -52852,13 +53432,13 @@
52852
53432
  DButtonColorGradient.prototype.onActivate = function (e) {
52853
53433
  var _this = this;
52854
53434
  _super.prototype.onActivate.call(this, e);
52855
- var value = this._textValueComputed;
53435
+ var computed = this.text.computed;
52856
53436
  var dialog = this.dialog;
52857
- if (value != null) {
52858
- dialog.value.fromObject(value);
53437
+ if (computed != null) {
53438
+ dialog.value.fromObject(computed);
52859
53439
  }
52860
53440
  dialog.open(this).then(function (newValue) {
52861
- _this.onValueChange(newValue, _this.toClone(value));
53441
+ _this.onValueChange(newValue, _this.toClone(computed));
52862
53442
  });
52863
53443
  };
52864
53444
  DButtonColorGradient.prototype.toClone = function (value) {
@@ -52869,17 +53449,15 @@
52869
53449
  return result;
52870
53450
  };
52871
53451
  DButtonColorGradient.prototype.onValueChange = function (newValue, oldValue) {
52872
- var value = this._textValueComputed;
52873
- if (value != null) {
52874
- value.fromObject(newValue);
53452
+ var computed = this.text.computed;
53453
+ if (computed != null) {
53454
+ computed.fromObject(newValue);
52875
53455
  }
52876
53456
  var view = this._view;
52877
53457
  if (view != null) {
52878
53458
  view.update();
52879
53459
  }
52880
- this.onTextChange();
52881
- this.createOrUpdateText();
52882
- DApplications.update(this);
53460
+ this.text.compute(true);
52883
53461
  this.emit("change", newValue, oldValue, this);
52884
53462
  };
52885
53463
  Object.defineProperty(DButtonColorGradient.prototype, "dialog", {
@@ -52912,7 +53490,7 @@
52912
53490
  };
52913
53491
  Object.defineProperty(DButtonColorGradient.prototype, "value", {
52914
53492
  get: function () {
52915
- return this._textValueComputed;
53493
+ return this.text.computed;
52916
53494
  },
52917
53495
  enumerable: false,
52918
53496
  configurable: true
@@ -53001,14 +53579,14 @@
53001
53579
  var _this = this;
53002
53580
  _super.prototype.onActivate.call(this, e);
53003
53581
  var dialog = this.dialog;
53004
- var value = this._textValueComputed;
53005
- if (value != null) {
53582
+ var computed = this.text.computed;
53583
+ if (computed != null) {
53006
53584
  var dialogCurrent = dialog.current;
53007
- dialogCurrent.color = value.color;
53008
- dialogCurrent.alpha = value.alpha;
53585
+ dialogCurrent.color = computed.color;
53586
+ dialogCurrent.alpha = computed.alpha;
53009
53587
  var dialogNew = dialog.new;
53010
- dialogNew.color = value.color;
53011
- dialogNew.alpha = value.alpha;
53588
+ dialogNew.color = computed.color;
53589
+ dialogNew.alpha = computed.alpha;
53012
53590
  }
53013
53591
  dialog.open(this).then(function () {
53014
53592
  _this.onValueChange(_this.toClone(dialog.new), _this.toClone(dialog.current));
@@ -53021,10 +53599,10 @@
53021
53599
  };
53022
53600
  };
53023
53601
  DButtonColor.prototype.onValueChange = function (newValue, oldValue) {
53024
- var value = this._textValueComputed;
53025
- if (value != null) {
53026
- value.color = newValue.color;
53027
- value.alpha = newValue.alpha;
53602
+ var computed = this.text.computed;
53603
+ if (computed != null) {
53604
+ computed.color = newValue.color;
53605
+ computed.alpha = newValue.alpha;
53028
53606
  }
53029
53607
  this.onColorChange();
53030
53608
  this.emit("change", newValue, oldValue, this);
@@ -53032,16 +53610,12 @@
53032
53610
  DButtonColor.prototype.onColorChange = function () {
53033
53611
  var image = this.image.get(0);
53034
53612
  if (image != null) {
53035
- var value = this._textValueComputed;
53036
- if (value != null) {
53037
- image.tint.color = value.color;
53613
+ var computed = this.text.computed;
53614
+ if (computed != null) {
53615
+ image.tint.color = computed.color;
53038
53616
  }
53039
53617
  }
53040
- this.updateTextForcibly();
53041
- };
53042
- DButtonColor.prototype.updateTextForcibly = function () {
53043
- this.onTextChange();
53044
- this.createOrUpdateText();
53618
+ this.text.compute(true);
53045
53619
  };
53046
53620
  Object.defineProperty(DButtonColor.prototype, "dialog", {
53047
53621
  get: function () {
@@ -53085,13 +53659,14 @@
53085
53659
  });
53086
53660
  DButtonColor.prototype.newValue = function () {
53087
53661
  var _this = this;
53088
- var value = this._textValueComputed;
53089
- return new DPickerColorAndAlpha(value, function (color) {
53090
- value.color = color;
53662
+ var text = this.text;
53663
+ var computed = text.computed;
53664
+ return new DPickerColorAndAlpha(computed, function (color) {
53665
+ computed.color = color;
53091
53666
  _this.onColorChange();
53092
53667
  }, function (alpha) {
53093
- value.alpha = alpha;
53094
- _this.updateTextForcibly();
53668
+ computed.alpha = alpha;
53669
+ text.compute(true);
53095
53670
  });
53096
53671
  };
53097
53672
  DButtonColor.prototype.getType = function () {
@@ -53128,7 +53703,7 @@
53128
53703
  var _this = this;
53129
53704
  var _a, _b;
53130
53705
  _super.prototype.onActivate.call(this, e);
53131
- var value = (_b = (_a = this._textValueComputed) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : Date.now();
53706
+ var value = (_b = (_a = this.text.computed) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : Date.now();
53132
53707
  var dialog = this.dialog;
53133
53708
  dialog.current = new Date(value);
53134
53709
  dialog.new = new Date(value);
@@ -53172,11 +53747,11 @@
53172
53747
  Object.defineProperty(DButtonDate.prototype, "value", {
53173
53748
  get: function () {
53174
53749
  var _a;
53175
- return (_a = this._textValueComputed) !== null && _a !== void 0 ? _a : new Date();
53750
+ return (_a = this.text.computed) !== null && _a !== void 0 ? _a : new Date();
53176
53751
  },
53177
53752
  set: function (value) {
53178
- var textValueComputed = this._textValueComputed;
53179
- if (textValueComputed === undefined || textValueComputed.getTime() !== value.getTime()) {
53753
+ var computed = this.text.computed;
53754
+ if (computed === undefined || computed.getTime() !== value.getTime()) {
53180
53755
  this.text = value;
53181
53756
  }
53182
53757
  },
@@ -53272,7 +53847,7 @@
53272
53847
  var _this = this;
53273
53848
  var _a, _b;
53274
53849
  _super.prototype.onActivate.call(this, e);
53275
- var value = (_b = (_a = this._textValueComputed) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : Date.now();
53850
+ var value = (_b = (_a = this.text.computed) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : Date.now();
53276
53851
  var dialog = this.dialog;
53277
53852
  dialog.current = new Date(value);
53278
53853
  dialog.new = new Date(value);
@@ -53325,11 +53900,11 @@
53325
53900
  Object.defineProperty(DButtonDatetime.prototype, "value", {
53326
53901
  get: function () {
53327
53902
  var _a;
53328
- return (_a = this._textValueComputed) !== null && _a !== void 0 ? _a : new Date();
53903
+ return (_a = this.text.computed) !== null && _a !== void 0 ? _a : new Date();
53329
53904
  },
53330
53905
  set: function (value) {
53331
- var textValueComputed = this._textValueComputed;
53332
- if (textValueComputed === undefined || textValueComputed.getTime() !== value.getTime()) {
53906
+ var computed = this.text.computed;
53907
+ if (computed === undefined || computed.getTime() !== value.getTime()) {
53333
53908
  this.text = value;
53334
53909
  }
53335
53910
  },
@@ -56414,7 +56989,7 @@
56414
56989
  var _a;
56415
56990
  _super.prototype.onActivate.call(this, e);
56416
56991
  var dialog = this.dialog;
56417
- var oldValue = (_a = this._textValueComputed) !== null && _a !== void 0 ? _a : null;
56992
+ var oldValue = (_a = this.text.computed) !== null && _a !== void 0 ? _a : null;
56418
56993
  this._dialogSetter(dialog, oldValue);
56419
56994
  dialog.open(this).then(function () {
56420
56995
  var newValue = _this._dialogGetter(dialog);
@@ -56447,7 +57022,7 @@
56447
57022
  Object.defineProperty(DButtonSelect.prototype, "value", {
56448
57023
  get: function () {
56449
57024
  var _a;
56450
- return (_a = this._textValueComputed) !== null && _a !== void 0 ? _a : null;
57025
+ return (_a = this.text.computed) !== null && _a !== void 0 ? _a : null;
56451
57026
  },
56452
57027
  set: function (value) {
56453
57028
  this.text = value;
@@ -56474,7 +57049,7 @@
56474
57049
  var _this = this;
56475
57050
  var _a, _b;
56476
57051
  _super.prototype.onActivate.call(this, e);
56477
- var value = (_b = (_a = this._textValueComputed) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : Date.now();
57052
+ var value = (_b = (_a = this.text.computed) === null || _a === void 0 ? void 0 : _a.getTime()) !== null && _b !== void 0 ? _b : Date.now();
56478
57053
  var dialog = this.dialog;
56479
57054
  dialog.current = new Date(value);
56480
57055
  dialog.new = new Date(value);
@@ -56526,11 +57101,11 @@
56526
57101
  Object.defineProperty(DButtonTime.prototype, "value", {
56527
57102
  get: function () {
56528
57103
  var _a;
56529
- return (_a = this._textValueComputed) !== null && _a !== void 0 ? _a : new Date();
57104
+ return (_a = this.text.computed) !== null && _a !== void 0 ? _a : new Date();
56530
57105
  },
56531
57106
  set: function (value) {
56532
- var textValueComputed = this._textValueComputed;
56533
- if (textValueComputed === undefined || textValueComputed.getTime() !== value.getTime()) {
57107
+ var computed = this.text.computed;
57108
+ if (computed === undefined || computed.getTime() !== value.getTime()) {
56534
57109
  this.text = value;
56535
57110
  }
56536
57111
  },
@@ -65690,7 +66265,7 @@
65690
66265
  _this._delayDone = (_a = delay === null || delay === void 0 ? void 0 : delay.done) !== null && _a !== void 0 ? _a : theme.getDoneDelay();
65691
66266
  var delayClose = delay === null || delay === void 0 ? void 0 : delay.close;
65692
66267
  _this._delayClose = delayClose !== undefined ? delayClose : theme.getCloseDelay();
65693
- _this._messageText = _this.message.text;
66268
+ _this._messageText = _this.message.text.value;
65694
66269
  return _this;
65695
66270
  }
65696
66271
  DDialogProcessing.prototype.newMessage = function (options) {
@@ -66048,7 +66623,7 @@
66048
66623
  }
66049
66624
  state.unlock();
66050
66625
  if (this._isTextEnabled) {
66051
- this._textValueBackup = parent.text;
66626
+ this._textValueBackup = parent.text.value;
66052
66627
  var textValue = this._textValue;
66053
66628
  if (textValue !== undefined) {
66054
66629
  parent.text = textValue;
@@ -69190,7 +69765,7 @@
69190
69765
  var selecting = this._column.selecting;
69191
69766
  var dialog = selecting.dialog;
69192
69767
  if (dialog) {
69193
- var oldValue_1 = (_a = this._textValueComputed) !== null && _a !== void 0 ? _a : null;
69768
+ var oldValue_1 = (_a = this.text.computed) !== null && _a !== void 0 ? _a : null;
69194
69769
  selecting.setter(dialog, oldValue_1);
69195
69770
  dialog.open(this).then(function () {
69196
69771
  var newValue = selecting.getter(dialog);
@@ -69247,11 +69822,8 @@
69247
69822
  });
69248
69823
  Object.defineProperty(DTableBodyCellSelectDialog.prototype, "value", {
69249
69824
  get: function () {
69250
- var textValueComputed = this._textValueComputed;
69251
- if (textValueComputed !== undefined) {
69252
- return textValueComputed;
69253
- }
69254
- return null;
69825
+ var _a;
69826
+ return (_a = this.text.computed) !== null && _a !== void 0 ? _a : null;
69255
69827
  },
69256
69828
  set: function (value) {
69257
69829
  this.text = value;
@@ -69263,10 +69835,7 @@
69263
69835
  this._row = row;
69264
69836
  this._rowIndex = rowIndex;
69265
69837
  if (forcibly) {
69266
- this._textValue = value;
69267
- this._textValueComputed = value;
69268
- this.onTextChange();
69269
- this.createOrUpdateText();
69838
+ this.text.setValue(value, true);
69270
69839
  }
69271
69840
  else {
69272
69841
  this.text = value;
@@ -69395,7 +69964,7 @@
69395
69964
  promise().then(function (newValue) {
69396
69965
  var _a;
69397
69966
  if (_this._isSyncEnabled) {
69398
- var oldValue = (_a = _this._textValueComputed) !== null && _a !== void 0 ? _a : null;
69967
+ var oldValue = (_a = _this.text.computed) !== null && _a !== void 0 ? _a : null;
69399
69968
  if (newValue !== oldValue) {
69400
69969
  _this.text = newValue;
69401
69970
  _this.onValueChange(newValue, oldValue);
@@ -69448,11 +70017,8 @@
69448
70017
  });
69449
70018
  Object.defineProperty(DTableBodyCellSelectPromise.prototype, "value", {
69450
70019
  get: function () {
69451
- var textValueComputed = this._textValueComputed;
69452
- if (textValueComputed !== undefined) {
69453
- return textValueComputed;
69454
- }
69455
- return null;
70020
+ var _a;
70021
+ return (_a = this.text.computed) !== null && _a !== void 0 ? _a : null;
69456
70022
  },
69457
70023
  set: function (value) {
69458
70024
  this.text = value;
@@ -69464,10 +70030,7 @@
69464
70030
  this._row = row;
69465
70031
  this._rowIndex = rowIndex;
69466
70032
  if (forcibly) {
69467
- this._textValue = value;
69468
- this._textValueComputed = value;
69469
- this.onTextChange();
69470
- this.createOrUpdateText();
70033
+ this.text.setValue(value, true);
69471
70034
  }
69472
70035
  else {
69473
70036
  this.text = value;
@@ -69922,24 +70485,21 @@
69922
70485
  this._rowIndex = rowIndex;
69923
70486
  if (value instanceof Date) {
69924
70487
  if (forcibly) {
69925
- this._textValue = value;
69926
- this._textValueComputed = value;
69927
- this.onTextChange();
69928
- this.createOrUpdateText();
70488
+ this.text.setValue(value, true);
69929
70489
  }
69930
70490
  else {
69931
70491
  this.text = value;
69932
70492
  }
69933
70493
  }
69934
70494
  else if (isNumber(value)) {
69935
- var textValueComputed = this._textValueComputed;
69936
- if (textValueComputed === undefined) {
70495
+ var text = this.text;
70496
+ var computed = text.computed;
70497
+ if (computed === undefined) {
69937
70498
  this.text = new Date(value);
69938
70499
  }
69939
- else if (textValueComputed.getTime() !== value) {
69940
- textValueComputed.setTime(value);
69941
- this.onTextChange();
69942
- this.createOrUpdateText();
70500
+ else if (computed.getTime() !== value) {
70501
+ computed.setTime(value);
70502
+ text.compute(true);
69943
70503
  }
69944
70504
  }
69945
70505
  DTableBodyCells.set(this, row, columnIndex, this._column);
@@ -70015,24 +70575,21 @@
70015
70575
  this._rowIndex = rowIndex;
70016
70576
  if (value instanceof Date) {
70017
70577
  if (forcibly) {
70018
- this._textValue = value;
70019
- this._textValueComputed = value;
70020
- this.onTextChange();
70021
- this.createOrUpdateText();
70578
+ this.text.setValue(value, true);
70022
70579
  }
70023
70580
  else {
70024
70581
  this.text = value;
70025
70582
  }
70026
70583
  }
70027
70584
  else if (isNumber(value)) {
70028
- var textValueComputed = this._textValueComputed;
70029
- if (textValueComputed == null) {
70585
+ var text = this.text;
70586
+ var computed = text.computed;
70587
+ if (computed == null) {
70030
70588
  this.text = new Date(value);
70031
70589
  }
70032
- else if (textValueComputed.getTime() !== value) {
70033
- textValueComputed.setTime(value);
70034
- this.onTextChange();
70035
- this.createOrUpdateText();
70590
+ else if (computed.getTime() !== value) {
70591
+ computed.setTime(value);
70592
+ text.compute(true);
70036
70593
  }
70037
70594
  }
70038
70595
  DTableBodyCells.set(this, row, columnIndex, this._column);
@@ -70958,24 +71515,21 @@
70958
71515
  this._rowIndex = rowIndex;
70959
71516
  if (value instanceof Date) {
70960
71517
  if (forcibly) {
70961
- this._textValue = value;
70962
- this._textValueComputed = value;
70963
- this.onTextChange();
70964
- this.createOrUpdateText();
71518
+ this.text.setValue(value, true);
70965
71519
  }
70966
71520
  else {
70967
71521
  this.text = value;
70968
71522
  }
70969
71523
  }
70970
71524
  else if (isNumber(value)) {
70971
- var textValueComputed = this._textValueComputed;
70972
- if (textValueComputed == null) {
71525
+ var text = this.text;
71526
+ var computed = text.computed;
71527
+ if (computed == null) {
70973
71528
  this.text = new Date(value);
70974
71529
  }
70975
- else if (textValueComputed.getTime() !== value) {
70976
- textValueComputed.setTime(value);
70977
- this.onTextChange();
70978
- this.createOrUpdateText();
71530
+ else if (computed.getTime() !== value) {
71531
+ computed.setTime(value);
71532
+ text.compute(true);
70979
71533
  }
70980
71534
  }
70981
71535
  DTableBodyCells.set(this, row, columnIndex, this._column);
@@ -76766,7 +77320,7 @@
76766
77320
  buildImageSdfUv: buildImageSdfUv,
76767
77321
  toLineOfAnyPointCount: toLineOfAnyPointCount,
76768
77322
  buildLineOfAnyColor: buildLineOfAnyColor,
76769
- toPointsCount: toPointsCount,
77323
+ toPointCount: toPointCount,
76770
77324
  toLinePointCount: toLinePointCount,
76771
77325
  toLineVertexCount: toLineVertexCount,
76772
77326
  toLineIndexCount: toLineIndexCount,