@onerjs/gui 8.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. package/2D/FrameGraph/guiTask.d.ts +34 -0
  2. package/2D/FrameGraph/guiTask.js +62 -0
  3. package/2D/FrameGraph/guiTask.js.map +1 -0
  4. package/2D/FrameGraph/renderGraphGUIBlock.d.ts +43 -0
  5. package/2D/FrameGraph/renderGraphGUIBlock.js +66 -0
  6. package/2D/FrameGraph/renderGraphGUIBlock.js.map +1 -0
  7. package/2D/adtInstrumentation.d.ts +52 -0
  8. package/2D/adtInstrumentation.js +107 -0
  9. package/2D/adtInstrumentation.js.map +1 -0
  10. package/2D/advancedDynamicTexture.d.ts +548 -0
  11. package/2D/advancedDynamicTexture.js +1522 -0
  12. package/2D/advancedDynamicTexture.js.map +1 -0
  13. package/2D/controls/button.d.ts +109 -0
  14. package/2D/controls/button.js +246 -0
  15. package/2D/controls/button.js.map +1 -0
  16. package/2D/controls/checkbox.d.ts +53 -0
  17. package/2D/controls/checkbox.js +164 -0
  18. package/2D/controls/checkbox.js.map +1 -0
  19. package/2D/controls/colorpicker.d.ts +101 -0
  20. package/2D/controls/colorpicker.js +1396 -0
  21. package/2D/controls/colorpicker.js.map +1 -0
  22. package/2D/controls/container.d.ts +179 -0
  23. package/2D/controls/container.js +616 -0
  24. package/2D/controls/container.js.map +1 -0
  25. package/2D/controls/control.d.ts +943 -0
  26. package/2D/controls/control.js +2460 -0
  27. package/2D/controls/control.js.map +1 -0
  28. package/2D/controls/displayGrid.d.ts +53 -0
  29. package/2D/controls/displayGrid.js +202 -0
  30. package/2D/controls/displayGrid.js.map +1 -0
  31. package/2D/controls/ellipse.d.ts +25 -0
  32. package/2D/controls/ellipse.js +93 -0
  33. package/2D/controls/ellipse.js.map +1 -0
  34. package/2D/controls/focusableButton.d.ts +17 -0
  35. package/2D/controls/focusableButton.js +25 -0
  36. package/2D/controls/focusableButton.js.map +1 -0
  37. package/2D/controls/focusableControl.d.ts +43 -0
  38. package/2D/controls/focusableControl.js +2 -0
  39. package/2D/controls/focusableControl.js.map +1 -0
  40. package/2D/controls/gradient/BaseGradient.d.ts +69 -0
  41. package/2D/controls/gradient/BaseGradient.js +84 -0
  42. package/2D/controls/gradient/BaseGradient.js.map +1 -0
  43. package/2D/controls/gradient/LinearGradient.d.ts +45 -0
  44. package/2D/controls/gradient/LinearGradient.js +73 -0
  45. package/2D/controls/gradient/LinearGradient.js.map +1 -0
  46. package/2D/controls/gradient/RadialGradient.d.ts +53 -0
  47. package/2D/controls/gradient/RadialGradient.js +89 -0
  48. package/2D/controls/gradient/RadialGradient.js.map +1 -0
  49. package/2D/controls/grid.d.ts +151 -0
  50. package/2D/controls/grid.js +528 -0
  51. package/2D/controls/grid.js.map +1 -0
  52. package/2D/controls/image.d.ts +228 -0
  53. package/2D/controls/image.js +915 -0
  54. package/2D/controls/image.js.map +1 -0
  55. package/2D/controls/index.d.ts +34 -0
  56. package/2D/controls/index.js +35 -0
  57. package/2D/controls/index.js.map +1 -0
  58. package/2D/controls/inputPassword.d.ts +9 -0
  59. package/2D/controls/inputPassword.js +22 -0
  60. package/2D/controls/inputPassword.js.map +1 -0
  61. package/2D/controls/inputText.d.ts +197 -0
  62. package/2D/controls/inputText.js +1035 -0
  63. package/2D/controls/inputText.js.map +1 -0
  64. package/2D/controls/inputTextArea.d.ts +142 -0
  65. package/2D/controls/inputTextArea.js +1025 -0
  66. package/2D/controls/inputTextArea.js.map +1 -0
  67. package/2D/controls/line.d.ts +73 -0
  68. package/2D/controls/line.js +227 -0
  69. package/2D/controls/line.js.map +1 -0
  70. package/2D/controls/multiLine.d.ts +75 -0
  71. package/2D/controls/multiLine.js +237 -0
  72. package/2D/controls/multiLine.js.map +1 -0
  73. package/2D/controls/radioButton.d.ts +49 -0
  74. package/2D/controls/radioButton.js +185 -0
  75. package/2D/controls/radioButton.js.map +1 -0
  76. package/2D/controls/rectangle.d.ts +43 -0
  77. package/2D/controls/rectangle.js +204 -0
  78. package/2D/controls/rectangle.js.map +1 -0
  79. package/2D/controls/scrollViewers/scrollViewer.d.ts +178 -0
  80. package/2D/controls/scrollViewers/scrollViewer.js +587 -0
  81. package/2D/controls/scrollViewers/scrollViewer.js.map +1 -0
  82. package/2D/controls/scrollViewers/scrollViewerWindow.d.ts +51 -0
  83. package/2D/controls/scrollViewers/scrollViewerWindow.js +254 -0
  84. package/2D/controls/scrollViewers/scrollViewerWindow.js.map +1 -0
  85. package/2D/controls/selector.d.ts +237 -0
  86. package/2D/controls/selector.js +579 -0
  87. package/2D/controls/selector.js.map +1 -0
  88. package/2D/controls/sliders/baseSlider.d.ts +80 -0
  89. package/2D/controls/sliders/baseSlider.js +299 -0
  90. package/2D/controls/sliders/baseSlider.js.map +1 -0
  91. package/2D/controls/sliders/imageBasedSlider.d.ts +47 -0
  92. package/2D/controls/sliders/imageBasedSlider.js +168 -0
  93. package/2D/controls/sliders/imageBasedSlider.js.map +1 -0
  94. package/2D/controls/sliders/imageScrollBar.d.ts +67 -0
  95. package/2D/controls/sliders/imageScrollBar.js +248 -0
  96. package/2D/controls/sliders/imageScrollBar.js.map +1 -0
  97. package/2D/controls/sliders/scrollBar.d.ts +50 -0
  98. package/2D/controls/sliders/scrollBar.js +175 -0
  99. package/2D/controls/sliders/scrollBar.js.map +1 -0
  100. package/2D/controls/sliders/slider.d.ts +46 -0
  101. package/2D/controls/sliders/slider.js +281 -0
  102. package/2D/controls/sliders/slider.js.map +1 -0
  103. package/2D/controls/stackPanel.d.ts +64 -0
  104. package/2D/controls/stackPanel.js +244 -0
  105. package/2D/controls/stackPanel.js.map +1 -0
  106. package/2D/controls/statics.d.ts +6 -0
  107. package/2D/controls/statics.js +50 -0
  108. package/2D/controls/statics.js.map +1 -0
  109. package/2D/controls/textBlock.d.ts +219 -0
  110. package/2D/controls/textBlock.js +670 -0
  111. package/2D/controls/textBlock.js.map +1 -0
  112. package/2D/controls/textWrapper.d.ts +13 -0
  113. package/2D/controls/textWrapper.js +88 -0
  114. package/2D/controls/textWrapper.js.map +1 -0
  115. package/2D/controls/toggleButton.d.ts +93 -0
  116. package/2D/controls/toggleButton.js +229 -0
  117. package/2D/controls/toggleButton.js.map +1 -0
  118. package/2D/controls/virtualKeyboard.d.ts +102 -0
  119. package/2D/controls/virtualKeyboard.js +275 -0
  120. package/2D/controls/virtualKeyboard.js.map +1 -0
  121. package/2D/index.d.ts +11 -0
  122. package/2D/index.js +13 -0
  123. package/2D/index.js.map +1 -0
  124. package/2D/math2D.d.ts +136 -0
  125. package/2D/math2D.js +235 -0
  126. package/2D/math2D.js.map +1 -0
  127. package/2D/measure.d.ts +77 -0
  128. package/2D/measure.js +138 -0
  129. package/2D/measure.js.map +1 -0
  130. package/2D/multiLinePoint.d.ts +47 -0
  131. package/2D/multiLinePoint.js +110 -0
  132. package/2D/multiLinePoint.js.map +1 -0
  133. package/2D/style.d.ts +46 -0
  134. package/2D/style.js +80 -0
  135. package/2D/style.js.map +1 -0
  136. package/2D/valueAndUnit.d.ts +89 -0
  137. package/2D/valueAndUnit.js +194 -0
  138. package/2D/valueAndUnit.js.map +1 -0
  139. package/2D/xmlLoader.d.ts +60 -0
  140. package/2D/xmlLoader.js +348 -0
  141. package/2D/xmlLoader.js.map +1 -0
  142. package/3D/behaviors/defaultBehavior.d.ts +73 -0
  143. package/3D/behaviors/defaultBehavior.js +103 -0
  144. package/3D/behaviors/defaultBehavior.js.map +1 -0
  145. package/3D/controls/MRTK3/touchHolographicButton.d.ts +220 -0
  146. package/3D/controls/MRTK3/touchHolographicButton.js +868 -0
  147. package/3D/controls/MRTK3/touchHolographicButton.js.map +1 -0
  148. package/3D/controls/abstractButton3D.d.ts +15 -0
  149. package/3D/controls/abstractButton3D.js +22 -0
  150. package/3D/controls/abstractButton3D.js.map +1 -0
  151. package/3D/controls/button3D.d.ts +51 -0
  152. package/3D/controls/button3D.js +98 -0
  153. package/3D/controls/button3D.js.map +1 -0
  154. package/3D/controls/container3D.d.ts +72 -0
  155. package/3D/controls/container3D.js +126 -0
  156. package/3D/controls/container3D.js.map +1 -0
  157. package/3D/controls/contentDisplay3D.d.ts +42 -0
  158. package/3D/controls/contentDisplay3D.js +81 -0
  159. package/3D/controls/contentDisplay3D.js.map +1 -0
  160. package/3D/controls/control3D.d.ts +183 -0
  161. package/3D/controls/control3D.js +401 -0
  162. package/3D/controls/control3D.js.map +1 -0
  163. package/3D/controls/cylinderPanel.d.ts +17 -0
  164. package/3D/controls/cylinderPanel.js +57 -0
  165. package/3D/controls/cylinderPanel.js.map +1 -0
  166. package/3D/controls/handMenu.d.ts +28 -0
  167. package/3D/controls/handMenu.js +39 -0
  168. package/3D/controls/handMenu.js.map +1 -0
  169. package/3D/controls/holographicBackplate.d.ts +49 -0
  170. package/3D/controls/holographicBackplate.js +104 -0
  171. package/3D/controls/holographicBackplate.js.map +1 -0
  172. package/3D/controls/holographicButton.d.ts +84 -0
  173. package/3D/controls/holographicButton.js +300 -0
  174. package/3D/controls/holographicButton.js.map +1 -0
  175. package/3D/controls/holographicSlate.d.ts +134 -0
  176. package/3D/controls/holographicSlate.js +413 -0
  177. package/3D/controls/holographicSlate.js.map +1 -0
  178. package/3D/controls/index.d.ts +22 -0
  179. package/3D/controls/index.js +24 -0
  180. package/3D/controls/index.js.map +1 -0
  181. package/3D/controls/meshButton3D.d.ts +21 -0
  182. package/3D/controls/meshButton3D.js +58 -0
  183. package/3D/controls/meshButton3D.js.map +1 -0
  184. package/3D/controls/nearMenu.d.ts +44 -0
  185. package/3D/controls/nearMenu.js +103 -0
  186. package/3D/controls/nearMenu.js.map +1 -0
  187. package/3D/controls/planePanel.d.ts +9 -0
  188. package/3D/controls/planePanel.js +30 -0
  189. package/3D/controls/planePanel.js.map +1 -0
  190. package/3D/controls/scatterPanel.d.ts +18 -0
  191. package/3D/controls/scatterPanel.js +98 -0
  192. package/3D/controls/scatterPanel.js.map +1 -0
  193. package/3D/controls/slider3D.d.ts +95 -0
  194. package/3D/controls/slider3D.js +256 -0
  195. package/3D/controls/slider3D.js.map +1 -0
  196. package/3D/controls/spherePanel.d.ts +17 -0
  197. package/3D/controls/spherePanel.js +58 -0
  198. package/3D/controls/spherePanel.js.map +1 -0
  199. package/3D/controls/stackPanel3D.d.ts +22 -0
  200. package/3D/controls/stackPanel3D.js +95 -0
  201. package/3D/controls/stackPanel3D.js.map +1 -0
  202. package/3D/controls/touchButton3D.d.ts +77 -0
  203. package/3D/controls/touchButton3D.js +205 -0
  204. package/3D/controls/touchButton3D.js.map +1 -0
  205. package/3D/controls/touchHolographicButton.d.ts +110 -0
  206. package/3D/controls/touchHolographicButton.js +400 -0
  207. package/3D/controls/touchHolographicButton.js.map +1 -0
  208. package/3D/controls/touchHolographicMenu.d.ts +61 -0
  209. package/3D/controls/touchHolographicMenu.js +139 -0
  210. package/3D/controls/touchHolographicMenu.js.map +1 -0
  211. package/3D/controls/touchMeshButton3D.d.ts +21 -0
  212. package/3D/controls/touchMeshButton3D.js +58 -0
  213. package/3D/controls/touchMeshButton3D.js.map +1 -0
  214. package/3D/controls/volumeBasedPanel.d.ts +53 -0
  215. package/3D/controls/volumeBasedPanel.js +158 -0
  216. package/3D/controls/volumeBasedPanel.js.map +1 -0
  217. package/3D/gizmos/gizmoHandle.d.ts +108 -0
  218. package/3D/gizmos/gizmoHandle.js +175 -0
  219. package/3D/gizmos/gizmoHandle.js.map +1 -0
  220. package/3D/gizmos/index.d.ts +2 -0
  221. package/3D/gizmos/index.js +3 -0
  222. package/3D/gizmos/index.js.map +1 -0
  223. package/3D/gizmos/slateGizmo.d.ts +57 -0
  224. package/3D/gizmos/slateGizmo.js +353 -0
  225. package/3D/gizmos/slateGizmo.js.map +1 -0
  226. package/3D/gui3DManager.d.ts +94 -0
  227. package/3D/gui3DManager.js +233 -0
  228. package/3D/gui3DManager.js.map +1 -0
  229. package/3D/index.d.ts +5 -0
  230. package/3D/index.js +7 -0
  231. package/3D/index.js.map +1 -0
  232. package/3D/materials/fluent/fluentMaterial.d.ts +91 -0
  233. package/3D/materials/fluent/fluentMaterial.js +286 -0
  234. package/3D/materials/fluent/fluentMaterial.js.map +1 -0
  235. package/3D/materials/fluent/index.d.ts +1 -0
  236. package/3D/materials/fluent/index.js +2 -0
  237. package/3D/materials/fluent/index.js.map +1 -0
  238. package/3D/materials/fluent/shaders/fluent.fragment.d.ts +5 -0
  239. package/3D/materials/fluent/shaders/fluent.fragment.js +41 -0
  240. package/3D/materials/fluent/shaders/fluent.fragment.js.map +1 -0
  241. package/3D/materials/fluent/shaders/fluent.vertex.d.ts +5 -0
  242. package/3D/materials/fluent/shaders/fluent.vertex.js +40 -0
  243. package/3D/materials/fluent/shaders/fluent.vertex.js.map +1 -0
  244. package/3D/materials/fluentBackplate/fluentBackplateMaterial.d.ts +155 -0
  245. package/3D/materials/fluentBackplate/fluentBackplateMaterial.js +466 -0
  246. package/3D/materials/fluentBackplate/fluentBackplateMaterial.js.map +1 -0
  247. package/3D/materials/fluentBackplate/index.d.ts +1 -0
  248. package/3D/materials/fluentBackplate/index.js +2 -0
  249. package/3D/materials/fluentBackplate/index.js.map +1 -0
  250. package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.d.ts +5 -0
  251. package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.js +60 -0
  252. package/3D/materials/fluentBackplate/shaders/fluentBackplate.fragment.js.map +1 -0
  253. package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.d.ts +5 -0
  254. package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js +127 -0
  255. package/3D/materials/fluentBackplate/shaders/fluentBackplate.vertex.js.map +1 -0
  256. package/3D/materials/fluentButton/fluentButtonMaterial.d.ts +190 -0
  257. package/3D/materials/fluentButton/fluentButtonMaterial.js +536 -0
  258. package/3D/materials/fluentButton/fluentButtonMaterial.js.map +1 -0
  259. package/3D/materials/fluentButton/index.d.ts +1 -0
  260. package/3D/materials/fluentButton/index.js +2 -0
  261. package/3D/materials/fluentButton/index.js.map +1 -0
  262. package/3D/materials/fluentButton/shaders/fluentButton.fragment.d.ts +5 -0
  263. package/3D/materials/fluentButton/shaders/fluentButton.fragment.js +57 -0
  264. package/3D/materials/fluentButton/shaders/fluentButton.fragment.js.map +1 -0
  265. package/3D/materials/fluentButton/shaders/fluentButton.vertex.d.ts +5 -0
  266. package/3D/materials/fluentButton/shaders/fluentButton.vertex.js +162 -0
  267. package/3D/materials/fluentButton/shaders/fluentButton.vertex.js.map +1 -0
  268. package/3D/materials/fluentMaterial.d.ts +4 -0
  269. package/3D/materials/fluentMaterial.js +5 -0
  270. package/3D/materials/fluentMaterial.js.map +1 -0
  271. package/3D/materials/handle/handleMaterial.d.ts +68 -0
  272. package/3D/materials/handle/handleMaterial.js +114 -0
  273. package/3D/materials/handle/handleMaterial.js.map +1 -0
  274. package/3D/materials/handle/index.d.ts +1 -0
  275. package/3D/materials/handle/index.js +2 -0
  276. package/3D/materials/handle/index.js.map +1 -0
  277. package/3D/materials/handle/shaders/handle.fragment.d.ts +5 -0
  278. package/3D/materials/handle/shaders/handle.fragment.js +11 -0
  279. package/3D/materials/handle/shaders/handle.fragment.js.map +1 -0
  280. package/3D/materials/handle/shaders/handle.vertex.d.ts +5 -0
  281. package/3D/materials/handle/shaders/handle.vertex.js +11 -0
  282. package/3D/materials/handle/shaders/handle.vertex.js.map +1 -0
  283. package/3D/materials/index.d.ts +5 -0
  284. package/3D/materials/index.js +7 -0
  285. package/3D/materials/index.js.map +1 -0
  286. package/3D/materials/mrdl/index.d.ts +3 -0
  287. package/3D/materials/mrdl/index.js +4 -0
  288. package/3D/materials/mrdl/index.js.map +1 -0
  289. package/3D/materials/mrdl/mrdlBackglowMaterial.d.ts +87 -0
  290. package/3D/materials/mrdl/mrdlBackglowMaterial.js +302 -0
  291. package/3D/materials/mrdl/mrdlBackglowMaterial.js.map +1 -0
  292. package/3D/materials/mrdl/mrdlBackplateMaterial.d.ts +148 -0
  293. package/3D/materials/mrdl/mrdlBackplateMaterial.js +433 -0
  294. package/3D/materials/mrdl/mrdlBackplateMaterial.js.map +1 -0
  295. package/3D/materials/mrdl/mrdlFrontplateMaterial.d.ts +186 -0
  296. package/3D/materials/mrdl/mrdlFrontplateMaterial.js +532 -0
  297. package/3D/materials/mrdl/mrdlFrontplateMaterial.js.map +1 -0
  298. package/3D/materials/mrdl/mrdlInnerquadMaterial.d.ts +56 -0
  299. package/3D/materials/mrdl/mrdlInnerquadMaterial.js +230 -0
  300. package/3D/materials/mrdl/mrdlInnerquadMaterial.js.map +1 -0
  301. package/3D/materials/mrdl/mrdlSliderBarMaterial.d.ts +337 -0
  302. package/3D/materials/mrdl/mrdlSliderBarMaterial.js +855 -0
  303. package/3D/materials/mrdl/mrdlSliderBarMaterial.js.map +1 -0
  304. package/3D/materials/mrdl/mrdlSliderThumbMaterial.d.ts +337 -0
  305. package/3D/materials/mrdl/mrdlSliderThumbMaterial.js +855 -0
  306. package/3D/materials/mrdl/mrdlSliderThumbMaterial.js.map +1 -0
  307. package/3D/materials/mrdl/shaders/mrdlBackglow.fragment.d.ts +5 -0
  308. package/3D/materials/mrdl/shaders/mrdlBackglow.fragment.js +25 -0
  309. package/3D/materials/mrdl/shaders/mrdlBackglow.fragment.js.map +1 -0
  310. package/3D/materials/mrdl/shaders/mrdlBackglow.vertex.d.ts +5 -0
  311. package/3D/materials/mrdl/shaders/mrdlBackglow.vertex.js +12 -0
  312. package/3D/materials/mrdl/shaders/mrdlBackglow.vertex.js.map +1 -0
  313. package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.d.ts +5 -0
  314. package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.js +88 -0
  315. package/3D/materials/mrdl/shaders/mrdlBackplate.fragment.js.map +1 -0
  316. package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.d.ts +5 -0
  317. package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.js +96 -0
  318. package/3D/materials/mrdl/shaders/mrdlBackplate.vertex.js.map +1 -0
  319. package/3D/materials/mrdl/shaders/mrdlFrontplate.fragment.d.ts +5 -0
  320. package/3D/materials/mrdl/shaders/mrdlFrontplate.fragment.js +48 -0
  321. package/3D/materials/mrdl/shaders/mrdlFrontplate.fragment.js.map +1 -0
  322. package/3D/materials/mrdl/shaders/mrdlFrontplate.vertex.d.ts +5 -0
  323. package/3D/materials/mrdl/shaders/mrdlFrontplate.vertex.js +158 -0
  324. package/3D/materials/mrdl/shaders/mrdlFrontplate.vertex.js.map +1 -0
  325. package/3D/materials/mrdl/shaders/mrdlInnerquad.fragment.d.ts +5 -0
  326. package/3D/materials/mrdl/shaders/mrdlInnerquad.fragment.js +27 -0
  327. package/3D/materials/mrdl/shaders/mrdlInnerquad.fragment.js.map +1 -0
  328. package/3D/materials/mrdl/shaders/mrdlInnerquad.vertex.d.ts +5 -0
  329. package/3D/materials/mrdl/shaders/mrdlInnerquad.vertex.js +13 -0
  330. package/3D/materials/mrdl/shaders/mrdlInnerquad.vertex.js.map +1 -0
  331. package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.d.ts +5 -0
  332. package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.js +236 -0
  333. package/3D/materials/mrdl/shaders/mrdlSliderBar.fragment.js.map +1 -0
  334. package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.d.ts +5 -0
  335. package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.js +137 -0
  336. package/3D/materials/mrdl/shaders/mrdlSliderBar.vertex.js.map +1 -0
  337. package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.d.ts +5 -0
  338. package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.js +236 -0
  339. package/3D/materials/mrdl/shaders/mrdlSliderThumb.fragment.js.map +1 -0
  340. package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.d.ts +5 -0
  341. package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js +137 -0
  342. package/3D/materials/mrdl/shaders/mrdlSliderThumb.vertex.js.map +1 -0
  343. package/3D/vector3WithInfo.d.ts +16 -0
  344. package/3D/vector3WithInfo.js +18 -0
  345. package/3D/vector3WithInfo.js.map +1 -0
  346. package/index.d.ts +2 -0
  347. package/index.js +4 -0
  348. package/index.js.map +1 -0
  349. package/legacy/legacy.d.ts +1 -0
  350. package/legacy/legacy.js +17 -0
  351. package/legacy/legacy.js.map +1 -0
  352. package/license.md +71 -0
  353. package/package.json +47 -0
  354. package/readme.md +31 -0
@@ -0,0 +1,1025 @@
1
+ import { __decorate } from "@babylonjs/core/tslib.es6.js";
2
+ import { Observable } from "@babylonjs/core/Misc/observable.js";
3
+ import { Control } from "./control.js";
4
+ import { ValueAndUnit } from "../valueAndUnit.js";
5
+ import { RegisterClass } from "@babylonjs/core/Misc/typeStore.js";
6
+ import { InputText } from "./inputText.js";
7
+ import { serialize } from "@babylonjs/core/Misc/decorators.js";
8
+ /**
9
+ * Class used to create input text control
10
+ */
11
+ export class InputTextArea extends InputText {
12
+ /** Gets or sets a boolean indicating if the control can auto stretch its height to adapt to the text */
13
+ get autoStretchHeight() {
14
+ return this._autoStretchHeight;
15
+ }
16
+ set autoStretchHeight(value) {
17
+ if (this._autoStretchHeight === value) {
18
+ return;
19
+ }
20
+ this._autoStretchHeight = value;
21
+ this._markAsDirty();
22
+ }
23
+ set height(value) {
24
+ this.fixedRatioMasterIsWidth = false;
25
+ if (this._height.toString(this._host) === value) {
26
+ return;
27
+ }
28
+ if (this._height.fromString(value)) {
29
+ this._markAsDirty();
30
+ }
31
+ this._autoStretchHeight = false;
32
+ }
33
+ get maxHeight() {
34
+ return this._maxHeight.toString(this._host);
35
+ }
36
+ /** Gets the maximum width allowed by the control in pixels */
37
+ get maxHeightInPixels() {
38
+ return this._maxHeight.getValueInPixel(this._host, this._cachedParentMeasure.height);
39
+ }
40
+ set maxHeight(value) {
41
+ if (this._maxHeight.toString(this._host) === value) {
42
+ return;
43
+ }
44
+ if (this._maxHeight.fromString(value)) {
45
+ this._markAsDirty();
46
+ }
47
+ }
48
+ /**
49
+ * Creates a new InputTextArea
50
+ * @param name defines the control name
51
+ * @param text defines the text of the control
52
+ */
53
+ constructor(name, text = "") {
54
+ super(name);
55
+ this.name = name;
56
+ this._textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;
57
+ this._textVerticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;
58
+ this._prevText = this.text;
59
+ this._lineSpacing = new ValueAndUnit(0);
60
+ this._maxHeight = new ValueAndUnit(1, ValueAndUnit.UNITMODE_PERCENTAGE, false);
61
+ /**
62
+ * An event triggered after the text was broken up into lines
63
+ */
64
+ this.onLinesReadyObservable = new Observable();
65
+ this.text = text;
66
+ this.isPointerBlocker = true;
67
+ this.onLinesReadyObservable.add(() => this._updateCursorPosition());
68
+ this._highlightCursorInfo = {
69
+ initialStartIndex: -1,
70
+ initialRelativeStartIndex: -1,
71
+ initialLineIndex: -1,
72
+ };
73
+ this._cursorInfo = {
74
+ globalStartIndex: 0,
75
+ globalEndIndex: 0,
76
+ relativeEndIndex: 0,
77
+ relativeStartIndex: 0,
78
+ currentLineIndex: 0,
79
+ };
80
+ }
81
+ _getTypeName() {
82
+ return "InputTextArea";
83
+ }
84
+ /**
85
+ * Handles the keyboard event
86
+ * @param evt Defines the KeyboardEvent
87
+ */
88
+ processKeyboard(evt) {
89
+ if (this.isReadOnly) {
90
+ return;
91
+ }
92
+ // process pressed key
93
+ this.alternativeProcessKey(evt.code, evt.key, evt);
94
+ this.onKeyboardEventProcessedObservable.notifyObservers(evt);
95
+ }
96
+ /**
97
+ * Process the last keyboard input
98
+ *
99
+ * @param code The ascii input number
100
+ * @param key The key string representation
101
+ * @param evt The keyboard event emits with input
102
+ * @internal
103
+ */
104
+ alternativeProcessKey(code, key, evt) {
105
+ //return if clipboard event keys (i.e -ctr/cmd + c,v,x)
106
+ if (evt && (evt.ctrlKey || evt.metaKey) && (key === "c" || key === "v" || key === "x")) {
107
+ return;
108
+ }
109
+ // Specific cases
110
+ switch (code) {
111
+ case "Period": //SLASH
112
+ if (evt && evt.shiftKey) {
113
+ evt.preventDefault();
114
+ }
115
+ break;
116
+ case "Backspace": // BACKSPACE
117
+ if (!this._isTextHighlightOn && this._cursorInfo.globalStartIndex > 0) {
118
+ this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;
119
+ this._cursorInfo.globalStartIndex--;
120
+ }
121
+ this._prevText = this._textWrapper.text;
122
+ this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex);
123
+ this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;
124
+ if (evt) {
125
+ evt.preventDefault();
126
+ }
127
+ this._blinkIsEven = false;
128
+ this._isTextHighlightOn = false;
129
+ this._textHasChanged();
130
+ break;
131
+ case "Delete": // DELETE
132
+ if (!this._isTextHighlightOn && this._cursorInfo.globalEndIndex < this.text.length) {
133
+ this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex + 1;
134
+ }
135
+ this._prevText = this._textWrapper.text;
136
+ this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex);
137
+ this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;
138
+ if (evt) {
139
+ evt.preventDefault();
140
+ }
141
+ this._blinkIsEven = false;
142
+ this._isTextHighlightOn = false;
143
+ this._textHasChanged();
144
+ break;
145
+ case "NumpadEnter": // NUMPAD ENTER
146
+ case "Enter": // RETURN
147
+ this._prevText = this._textWrapper.text;
148
+ this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex, "\n");
149
+ this._cursorInfo.globalStartIndex++;
150
+ this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;
151
+ this._blinkIsEven = false;
152
+ this._isTextHighlightOn = false;
153
+ this._textHasChanged();
154
+ return;
155
+ case "End": // END
156
+ this._cursorInfo.globalStartIndex = this.text.length;
157
+ this._blinkIsEven = false;
158
+ this._isTextHighlightOn = false;
159
+ this._markAsDirty();
160
+ return;
161
+ case "Home": // HOME
162
+ this._cursorInfo.globalStartIndex = 0;
163
+ this._blinkIsEven = false;
164
+ this._isTextHighlightOn = false;
165
+ this._markAsDirty();
166
+ return;
167
+ case "ArrowLeft": // LEFT
168
+ this._markAsDirty();
169
+ if (evt && evt.shiftKey) {
170
+ // shift + ctrl/cmd + <-
171
+ if (evt.ctrlKey || evt.metaKey) {
172
+ // Go to line's start by substract the relativeStartIndex to the globalStartIndex
173
+ this._cursorInfo.globalStartIndex -= this._cursorInfo.relativeStartIndex;
174
+ this._cursorInfo.globalEndIndex = this._highlightCursorInfo.initialStartIndex;
175
+ }
176
+ // store the starting point
177
+ if (!this._isTextHighlightOn) {
178
+ this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;
179
+ this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;
180
+ this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;
181
+ this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;
182
+ this._cursorInfo.globalStartIndex--;
183
+ this._isTextHighlightOn = true;
184
+ }
185
+ else {
186
+ if (this._cursorInfo.globalEndIndex > this._highlightCursorInfo.initialStartIndex) {
187
+ this._cursorInfo.globalEndIndex--;
188
+ }
189
+ else {
190
+ this._cursorInfo.globalStartIndex--;
191
+ }
192
+ }
193
+ this._blinkIsEven = true;
194
+ evt.preventDefault();
195
+ return;
196
+ }
197
+ if (this._isTextHighlightOn) {
198
+ this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;
199
+ }
200
+ else if (evt && (evt.ctrlKey || evt.metaKey)) {
201
+ // ctr + <-
202
+ this._cursorInfo.globalStartIndex -= this._cursorInfo.relativeStartIndex;
203
+ evt.preventDefault();
204
+ }
205
+ else if (this._cursorInfo.globalStartIndex > 0) {
206
+ this._cursorInfo.globalStartIndex--;
207
+ }
208
+ // update the cursor
209
+ this._blinkIsEven = false;
210
+ this._isTextHighlightOn = false;
211
+ return;
212
+ case "ArrowRight": // RIGHT
213
+ this._markAsDirty();
214
+ if (evt && evt.shiftKey) {
215
+ // shift + ctrl/cmd + ->
216
+ if (evt.ctrlKey || evt.metaKey) {
217
+ const rightDelta = this._lines[this._cursorInfo.currentLineIndex].text.length - this._cursorInfo.relativeEndIndex - 1;
218
+ this._cursorInfo.globalEndIndex += rightDelta;
219
+ this._cursorInfo.globalStartIndex = this._highlightCursorInfo.initialStartIndex;
220
+ }
221
+ // store the starting point
222
+ if (!this._isTextHighlightOn) {
223
+ this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;
224
+ this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;
225
+ this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;
226
+ this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;
227
+ this._cursorInfo.globalEndIndex++;
228
+ this._isTextHighlightOn = true;
229
+ }
230
+ else {
231
+ if (this._cursorInfo.globalStartIndex < this._highlightCursorInfo.initialStartIndex) {
232
+ this._cursorInfo.globalStartIndex++;
233
+ }
234
+ else {
235
+ this._cursorInfo.globalEndIndex++;
236
+ }
237
+ }
238
+ this._blinkIsEven = true;
239
+ evt.preventDefault();
240
+ return;
241
+ }
242
+ if (this._isTextHighlightOn) {
243
+ this._cursorInfo.globalStartIndex = this._cursorInfo.globalEndIndex;
244
+ }
245
+ else if (evt && (evt.ctrlKey || evt.metaKey)) {
246
+ //ctr + ->
247
+ const rightDelta = this._lines[this._cursorInfo.currentLineIndex].text.length - this._cursorInfo.relativeEndIndex;
248
+ this._cursorInfo.globalStartIndex += rightDelta;
249
+ }
250
+ else if (this._cursorInfo.globalStartIndex < this.text.length) {
251
+ this._cursorInfo.globalStartIndex++;
252
+ }
253
+ // update the cursor
254
+ this._blinkIsEven = false;
255
+ this._isTextHighlightOn = false;
256
+ return;
257
+ case "ArrowUp": // UP
258
+ // update the cursor
259
+ this._blinkIsEven = false;
260
+ if (evt) {
261
+ if (evt.shiftKey) {
262
+ if (!this._isTextHighlightOn) {
263
+ this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;
264
+ this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;
265
+ this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;
266
+ }
267
+ this._isTextHighlightOn = true;
268
+ this._blinkIsEven = true;
269
+ }
270
+ else {
271
+ this._isTextHighlightOn = false;
272
+ }
273
+ evt.preventDefault();
274
+ }
275
+ if (this._cursorInfo.currentLineIndex === 0) {
276
+ // First line
277
+ this._cursorInfo.globalStartIndex = 0;
278
+ }
279
+ else {
280
+ const currentLine = this._lines[this._cursorInfo.currentLineIndex];
281
+ const upperLine = this._lines[this._cursorInfo.currentLineIndex - 1];
282
+ let tmpIndex = 0;
283
+ let relativeIndex = 0;
284
+ if (!this._isTextHighlightOn || this._cursorInfo.currentLineIndex < this._highlightCursorInfo.initialLineIndex) {
285
+ tmpIndex = this._cursorInfo.globalStartIndex;
286
+ relativeIndex = this._cursorInfo.relativeStartIndex;
287
+ }
288
+ else {
289
+ tmpIndex = this._cursorInfo.globalEndIndex;
290
+ relativeIndex = this._cursorInfo.relativeEndIndex;
291
+ }
292
+ const currentText = currentLine.text.substring(0, relativeIndex);
293
+ const currentWidth = this._contextForBreakLines.measureText(currentText).width;
294
+ let upperWidth = 0;
295
+ let previousWidth = 0;
296
+ tmpIndex -= relativeIndex; // Start of current line
297
+ tmpIndex -= upperLine.text.length + upperLine.lineEnding.length; // Start of upper line
298
+ let upperLineRelativeIndex = 0;
299
+ while (upperWidth < currentWidth && upperLineRelativeIndex < upperLine.text.length) {
300
+ tmpIndex++;
301
+ upperLineRelativeIndex++;
302
+ previousWidth = Math.abs(currentWidth - upperWidth);
303
+ upperWidth = this._contextForBreakLines.measureText(upperLine.text.substring(0, upperLineRelativeIndex)).width;
304
+ }
305
+ // Find closest move
306
+ if (Math.abs(currentWidth - upperWidth) > previousWidth && upperLineRelativeIndex > 0) {
307
+ tmpIndex--;
308
+ }
309
+ if (!this._isTextHighlightOn) {
310
+ this._cursorInfo.globalStartIndex = tmpIndex;
311
+ }
312
+ else if (this._cursorInfo.currentLineIndex <= this._highlightCursorInfo.initialLineIndex) {
313
+ this._cursorInfo.globalStartIndex = tmpIndex;
314
+ this._cursorInfo.globalEndIndex = this._highlightCursorInfo.initialStartIndex;
315
+ this._cursorInfo.relativeEndIndex = this._highlightCursorInfo.initialRelativeStartIndex;
316
+ }
317
+ else {
318
+ this._cursorInfo.globalEndIndex = tmpIndex;
319
+ }
320
+ }
321
+ this._markAsDirty();
322
+ return;
323
+ case "ArrowDown": // DOWN
324
+ // update the cursor
325
+ this._blinkIsEven = false;
326
+ if (evt) {
327
+ if (evt.shiftKey) {
328
+ if (!this._isTextHighlightOn) {
329
+ this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;
330
+ this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;
331
+ this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;
332
+ }
333
+ this._isTextHighlightOn = true;
334
+ this._blinkIsEven = true;
335
+ }
336
+ else {
337
+ this._isTextHighlightOn = false;
338
+ }
339
+ evt.preventDefault();
340
+ }
341
+ if (this._cursorInfo.currentLineIndex === this._lines.length - 1) {
342
+ // Last line
343
+ this._cursorInfo.globalStartIndex = this.text.length;
344
+ }
345
+ else {
346
+ const currentLine = this._lines[this._cursorInfo.currentLineIndex];
347
+ const underLine = this._lines[this._cursorInfo.currentLineIndex + 1];
348
+ let tmpIndex = 0;
349
+ let relativeIndex = 0;
350
+ if (!this._isTextHighlightOn || this._cursorInfo.currentLineIndex < this._highlightCursorInfo.initialLineIndex) {
351
+ tmpIndex = this._cursorInfo.globalStartIndex;
352
+ relativeIndex = this._cursorInfo.relativeStartIndex;
353
+ }
354
+ else {
355
+ tmpIndex = this._cursorInfo.globalEndIndex;
356
+ relativeIndex = this._cursorInfo.relativeEndIndex;
357
+ }
358
+ const currentText = currentLine.text.substring(0, relativeIndex);
359
+ const currentWidth = this._contextForBreakLines.measureText(currentText).width;
360
+ let underWidth = 0;
361
+ let previousWidth = 0;
362
+ tmpIndex += currentLine.text.length - relativeIndex + currentLine.lineEnding.length; // Start of current line
363
+ let underLineRelativeIndex = 0;
364
+ while (underWidth < currentWidth && underLineRelativeIndex < underLine.text.length) {
365
+ tmpIndex++;
366
+ underLineRelativeIndex++;
367
+ previousWidth = Math.abs(currentWidth - underWidth);
368
+ underWidth = this._contextForBreakLines.measureText(underLine.text.substring(0, underLineRelativeIndex)).width;
369
+ }
370
+ // Find closest move
371
+ if (Math.abs(currentWidth - underWidth) > previousWidth && underLineRelativeIndex > 0) {
372
+ tmpIndex--;
373
+ }
374
+ if (!this._isTextHighlightOn) {
375
+ this._cursorInfo.globalStartIndex = tmpIndex;
376
+ }
377
+ else if (this._cursorInfo.currentLineIndex < this._highlightCursorInfo.initialLineIndex) {
378
+ this._cursorInfo.globalStartIndex = tmpIndex;
379
+ if (this._cursorInfo.globalStartIndex > this._cursorInfo.globalEndIndex) {
380
+ this._cursorInfo.globalEndIndex += this._cursorInfo.globalStartIndex;
381
+ this._cursorInfo.globalStartIndex = this._cursorInfo.globalEndIndex - this._cursorInfo.globalStartIndex;
382
+ this._cursorInfo.globalEndIndex -= this._cursorInfo.globalStartIndex;
383
+ }
384
+ }
385
+ else {
386
+ this._cursorInfo.globalEndIndex = tmpIndex;
387
+ this._cursorInfo.globalStartIndex = this._highlightCursorInfo.initialStartIndex;
388
+ }
389
+ }
390
+ this._markAsDirty();
391
+ return;
392
+ }
393
+ // special case - select all. Use key instead of code to support all keyboard layouts
394
+ if (key === "a" && evt && (evt.ctrlKey || evt.metaKey)) {
395
+ this.selectAllText();
396
+ evt.preventDefault();
397
+ return;
398
+ }
399
+ // Printable characters
400
+ if (key?.length === 1) {
401
+ evt?.preventDefault();
402
+ this._currentKey = key;
403
+ this.onBeforeKeyAddObservable.notifyObservers(this);
404
+ key = this._currentKey;
405
+ if (this._addKey) {
406
+ this._isTextHighlightOn = false;
407
+ this._blinkIsEven = false;
408
+ this._prevText = this._textWrapper.text;
409
+ this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex, key);
410
+ this._cursorInfo.globalStartIndex += key.length;
411
+ this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;
412
+ this._textHasChanged();
413
+ }
414
+ }
415
+ }
416
+ _parseLineWordWrap(line = "", width, context) {
417
+ const lines = [];
418
+ const words = line.split(" ");
419
+ let lineWidth = 0;
420
+ for (let n = 0; n < words.length; n++) {
421
+ const testLine = n > 0 ? line + " " + words[n] : words[0];
422
+ const metrics = context.measureText(testLine);
423
+ const testWidth = metrics.width;
424
+ if (testWidth > width) {
425
+ if (n > 0) {
426
+ // Avoid first word duplication if of too long
427
+ lineWidth = context.measureText(line).width;
428
+ lines.push({ text: line, width: lineWidth, lineEnding: " " });
429
+ }
430
+ line = words[n];
431
+ let flushedLine = "";
432
+ line.split("").map((char) => {
433
+ if (context.measureText(flushedLine + char).width > width) {
434
+ lines.push({ text: flushedLine, width: context.measureText(flushedLine).width, lineEnding: "" });
435
+ flushedLine = "";
436
+ }
437
+ flushedLine += char;
438
+ });
439
+ line = flushedLine;
440
+ // Measure remaining characters
441
+ lineWidth = context.measureText(line).width;
442
+ }
443
+ else {
444
+ lineWidth = testWidth;
445
+ line = testLine;
446
+ }
447
+ }
448
+ lines.push({ text: line, width: lineWidth, lineEnding: " " });
449
+ return lines;
450
+ }
451
+ _breakLines(refWidth, context) {
452
+ const lines = [];
453
+ const _lines = (this.text || this.placeholderText).split("\n");
454
+ if (this.clipContent) {
455
+ for (const _line of _lines) {
456
+ lines.push(...this._parseLineWordWrap(_line, refWidth, context));
457
+ }
458
+ }
459
+ else {
460
+ for (const _line of _lines) {
461
+ lines.push(this._parseLine(_line, context));
462
+ }
463
+ }
464
+ lines[lines.length - 1].lineEnding = "\n";
465
+ return lines;
466
+ }
467
+ _parseLine(line = "", context) {
468
+ return { text: line, width: context.measureText(line).width, lineEnding: " " };
469
+ }
470
+ /**
471
+ * Processing of child right before the parent measurement update
472
+ *
473
+ * @param parentMeasure The parent measure
474
+ * @param context The rendering canvas
475
+ * @internal
476
+ */
477
+ _preMeasure(parentMeasure, context) {
478
+ if (!this._fontOffset || this._wasDirty) {
479
+ this._fontOffset = Control._GetFontOffset(context.font, this._host.getScene()?.getEngine());
480
+ }
481
+ let text = this._beforeRenderText(this._textWrapper).text;
482
+ // placeholder conditions and color setting
483
+ if (!this.text && this._placeholderText) {
484
+ text = this._placeholderText;
485
+ }
486
+ // measures the textlength -> this.measure.width
487
+ this._textWidth = context.measureText(text).width;
488
+ // we double up the margin width
489
+ const marginWidth = this._margin.getValueInPixel(this._host, parentMeasure.width) * 2;
490
+ if (this._autoStretchWidth) {
491
+ const tmpLines = text.split("\n");
492
+ const longerString = tmpLines.reduce((acc, val) => {
493
+ const valueLength = context.measureText(val).width;
494
+ const accLength = context.measureText(acc).width;
495
+ return valueLength > accLength ? val : acc;
496
+ }, "");
497
+ const longerStringWidth = context.measureText(longerString).width;
498
+ this.width = Math.min(this._maxWidth.getValueInPixel(this._host, parentMeasure.width), longerStringWidth + marginWidth) + "px";
499
+ this.autoStretchWidth = true;
500
+ }
501
+ this._availableWidth = this._width.getValueInPixel(this._host, parentMeasure.width) - marginWidth;
502
+ // Prepare lines
503
+ this._lines = this._breakLines(this._availableWidth, context);
504
+ // can we find a cleaner implementation here?
505
+ this._contextForBreakLines = context;
506
+ if (this._autoStretchHeight) {
507
+ const textHeight = this._lines.length * this._fontOffset.height;
508
+ const totalHeight = textHeight + this._margin.getValueInPixel(this._host, parentMeasure.height) * 2;
509
+ this.height = Math.min(this._maxHeight.getValueInPixel(this._host, parentMeasure.height), totalHeight) + "px";
510
+ this._autoStretchHeight = true;
511
+ }
512
+ this._availableHeight = this._height.getValueInPixel(this._host, parentMeasure.height) - marginWidth;
513
+ if (this._isFocused) {
514
+ this._cursorInfo.currentLineIndex = 0;
515
+ let lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;
516
+ let tmpLength = 0;
517
+ while (tmpLength + lineLength <= this._cursorInfo.globalStartIndex) {
518
+ tmpLength += lineLength;
519
+ if (this._cursorInfo.currentLineIndex < this._lines.length - 1) {
520
+ this._cursorInfo.currentLineIndex++;
521
+ lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;
522
+ }
523
+ }
524
+ }
525
+ }
526
+ _textHasChanged() {
527
+ if (!this._prevText && this._textWrapper.text && this.placeholderText) {
528
+ this._cursorInfo.currentLineIndex = 0;
529
+ this._cursorInfo.globalStartIndex = 1;
530
+ this._cursorInfo.globalEndIndex = 1;
531
+ this._cursorInfo.relativeStartIndex = 1;
532
+ this._cursorInfo.relativeEndIndex = 1;
533
+ }
534
+ super._textHasChanged();
535
+ }
536
+ _computeScroll() {
537
+ this._clipTextLeft = this._currentMeasure.left + this._margin.getValueInPixel(this._host, this._cachedParentMeasure.width);
538
+ this._clipTextTop = this._currentMeasure.top + this._margin.getValueInPixel(this._host, this._cachedParentMeasure.height);
539
+ if (this._isFocused && this._lines[this._cursorInfo.currentLineIndex].width > this._availableWidth) {
540
+ const textLeft = this._clipTextLeft - this._lines[this._cursorInfo.currentLineIndex].width + this._availableWidth;
541
+ if (!this._scrollLeft) {
542
+ this._scrollLeft = textLeft;
543
+ }
544
+ }
545
+ else {
546
+ this._scrollLeft = this._clipTextLeft;
547
+ }
548
+ if (this._isFocused) {
549
+ const selectedHeight = (this._cursorInfo.currentLineIndex + 1) * this._fontOffset.height;
550
+ const textTop = this._clipTextTop - selectedHeight;
551
+ if (!this._scrollTop) {
552
+ this._scrollTop = textTop;
553
+ }
554
+ }
555
+ else {
556
+ this._scrollTop = this._clipTextTop;
557
+ }
558
+ }
559
+ /**
560
+ * Processing of child after the parent measurement update
561
+ *
562
+ * @internal
563
+ */
564
+ _additionalProcessing() {
565
+ // Flush the highlighted text each frame
566
+ this.highlightedText = "";
567
+ this.onLinesReadyObservable.notifyObservers(this);
568
+ }
569
+ _drawText(text, textWidth, y, context) {
570
+ const width = this._currentMeasure.width;
571
+ let x = this._scrollLeft;
572
+ switch (this._textHorizontalAlignment) {
573
+ case Control.HORIZONTAL_ALIGNMENT_LEFT:
574
+ x += 0;
575
+ break;
576
+ case Control.HORIZONTAL_ALIGNMENT_RIGHT:
577
+ x += width - textWidth;
578
+ break;
579
+ case Control.HORIZONTAL_ALIGNMENT_CENTER:
580
+ x += (width - textWidth) / 2;
581
+ break;
582
+ }
583
+ if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {
584
+ context.shadowColor = this.shadowColor;
585
+ context.shadowBlur = this.shadowBlur;
586
+ context.shadowOffsetX = this.shadowOffsetX;
587
+ context.shadowOffsetY = this.shadowOffsetY;
588
+ }
589
+ if (this.outlineWidth) {
590
+ context.strokeText(text, this._currentMeasure.left + x, y);
591
+ }
592
+ context.fillText(text, x, y);
593
+ }
594
+ /**
595
+ * Copy the text in the clipboard
596
+ *
597
+ * @param ev The clipboard event
598
+ * @internal
599
+ */
600
+ _onCopyText(ev) {
601
+ this._isTextHighlightOn = false;
602
+ //when write permission to clipbaord data is denied
603
+ try {
604
+ ev.clipboardData && ev.clipboardData.setData("text/plain", this._highlightedText);
605
+ }
606
+ catch { } //pass
607
+ this._host.clipboardData = this._highlightedText;
608
+ }
609
+ /**
610
+ * Cut the text and copy it in the clipboard
611
+ *
612
+ * @param ev The clipboard event
613
+ * @internal
614
+ */
615
+ _onCutText(ev) {
616
+ if (!this._highlightedText) {
617
+ return;
618
+ }
619
+ //when write permission to clipbaord data is denied
620
+ try {
621
+ ev.clipboardData && ev.clipboardData.setData("text/plain", this._highlightedText);
622
+ }
623
+ catch { } //pass
624
+ this._host.clipboardData = this._highlightedText;
625
+ this._prevText = this._textWrapper.text;
626
+ this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex);
627
+ this._textHasChanged();
628
+ }
629
+ /**
630
+ * Paste the copied text from the clipboard
631
+ *
632
+ * @param ev The clipboard event
633
+ * @internal
634
+ */
635
+ _onPasteText(ev) {
636
+ let data = "";
637
+ if (ev.clipboardData && ev.clipboardData.types.indexOf("text/plain") !== -1) {
638
+ data = ev.clipboardData.getData("text/plain");
639
+ }
640
+ else {
641
+ //get the cached data; returns blank string by default
642
+ data = this._host.clipboardData;
643
+ }
644
+ this._isTextHighlightOn = false;
645
+ this._prevText = this._textWrapper.text;
646
+ this._textWrapper.removePart(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex, data);
647
+ const deltaIndex = data.length - (this._cursorInfo.globalEndIndex - this._cursorInfo.globalStartIndex);
648
+ this._cursorInfo.globalStartIndex += deltaIndex;
649
+ this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;
650
+ this._clickedCoordinateX = null;
651
+ this._clickedCoordinateY = null;
652
+ super._textHasChanged();
653
+ }
654
+ _draw(context) {
655
+ this._computeScroll();
656
+ this._scrollLeft = this._scrollLeft ?? 0;
657
+ this._scrollTop = this._scrollTop ?? 0;
658
+ context.save();
659
+ this._applyStates(context);
660
+ if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {
661
+ context.shadowColor = this.shadowColor;
662
+ context.shadowBlur = this.shadowBlur;
663
+ context.shadowOffsetX = this.shadowOffsetX;
664
+ context.shadowOffsetY = this.shadowOffsetY;
665
+ }
666
+ // Background
667
+ if (this._isFocused) {
668
+ if (this._focusedBackground) {
669
+ context.fillStyle = this._isEnabled ? this._focusedBackground : this._disabledColor;
670
+ context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);
671
+ }
672
+ }
673
+ else if (this._background) {
674
+ context.fillStyle = this._isEnabled ? this._background : this._disabledColor;
675
+ context.fillRect(this._currentMeasure.left, this._currentMeasure.top, this._currentMeasure.width, this._currentMeasure.height);
676
+ }
677
+ if (this.shadowBlur || this.shadowOffsetX || this.shadowOffsetY) {
678
+ context.shadowBlur = 0;
679
+ context.shadowOffsetX = 0;
680
+ context.shadowOffsetY = 0;
681
+ }
682
+ // sets the color of the rectangle (border if background available)
683
+ if (this.color) {
684
+ context.fillStyle = this.color;
685
+ }
686
+ const height = this._currentMeasure.height;
687
+ const width = this._currentMeasure.width;
688
+ let rootY = 0;
689
+ switch (this._textVerticalAlignment) {
690
+ case Control.VERTICAL_ALIGNMENT_TOP:
691
+ rootY = this._fontOffset.ascent;
692
+ break;
693
+ case Control.VERTICAL_ALIGNMENT_BOTTOM:
694
+ rootY = height - this._fontOffset.height * (this._lines.length - 1) - this._fontOffset.descent;
695
+ break;
696
+ case Control.VERTICAL_ALIGNMENT_CENTER:
697
+ rootY = this._fontOffset.ascent + (height - this._fontOffset.height * this._lines.length) / 2;
698
+ break;
699
+ }
700
+ context.save();
701
+ context.beginPath();
702
+ context.fillStyle = this.fontStyle;
703
+ if (!this._textWrapper.text && this.placeholderText) {
704
+ context.fillStyle = this._placeholderColor;
705
+ }
706
+ // here we define the visible reactangle to clip it in next line
707
+ context.rect(this._clipTextLeft, this._clipTextTop, this._availableWidth + 2, this._availableHeight + 2);
708
+ context.clip();
709
+ // Text
710
+ rootY += this._scrollTop;
711
+ for (let i = 0; i < this._lines.length; i++) {
712
+ const line = this._lines[i];
713
+ if (i !== 0 && this._lineSpacing.internalValue !== 0) {
714
+ if (this._lineSpacing.isPixel) {
715
+ rootY += this._lineSpacing.getValue(this._host);
716
+ }
717
+ else {
718
+ rootY = rootY + this._lineSpacing.getValue(this._host) * this._height.getValueInPixel(this._host, this._cachedParentMeasure.height);
719
+ }
720
+ }
721
+ this._drawText(line.text, line.width, rootY, context);
722
+ rootY += this._fontOffset.height;
723
+ }
724
+ context.restore();
725
+ // Cursor
726
+ if (this._isFocused) {
727
+ // Render cursor
728
+ if (!this._blinkIsEven || this._isTextHighlightOn) {
729
+ let cursorLeft = this._scrollLeft + context.measureText(this._lines[this._cursorInfo.currentLineIndex].text.substring(0, this._cursorInfo.relativeStartIndex)).width;
730
+ if (cursorLeft < this._clipTextLeft) {
731
+ this._scrollLeft += this._clipTextLeft - cursorLeft;
732
+ cursorLeft = this._clipTextLeft;
733
+ this._markAsDirty();
734
+ }
735
+ else if (cursorLeft > this._clipTextLeft + this._availableWidth) {
736
+ this._scrollLeft += this._clipTextLeft + this._availableWidth - cursorLeft;
737
+ cursorLeft = this._clipTextLeft + this._availableWidth;
738
+ this._markAsDirty();
739
+ }
740
+ let cursorTop = this._scrollTop + this._cursorInfo.currentLineIndex * this._fontOffset.height; //cursorTop distance from top to cursor start
741
+ if (cursorTop < this._clipTextTop) {
742
+ this._scrollTop += this._clipTextTop - cursorTop;
743
+ cursorTop = this._clipTextTop;
744
+ this._markAsDirty();
745
+ }
746
+ else if (cursorTop + this._fontOffset.height > this._clipTextTop + this._availableHeight && this._availableHeight > this._fontOffset.height) {
747
+ this._scrollTop += this._clipTextTop + this._availableHeight - cursorTop - this._fontOffset.height;
748
+ cursorTop = this._clipTextTop + this._availableHeight - this._fontOffset.height;
749
+ this._markAsDirty();
750
+ }
751
+ if (!this._isTextHighlightOn) {
752
+ context.fillRect(cursorLeft, cursorTop, 2, this._fontOffset.height);
753
+ }
754
+ }
755
+ this._resetBlinking();
756
+ //show the highlighted text
757
+ if (this._isTextHighlightOn) {
758
+ clearTimeout(this._blinkTimeout);
759
+ this._highlightedText = this.text.substring(this._cursorInfo.globalStartIndex, this._cursorInfo.globalEndIndex);
760
+ context.globalAlpha = this._highligherOpacity;
761
+ context.fillStyle = this._textHighlightColor;
762
+ const startLineIndex = Math.min(this._cursorInfo.currentLineIndex, this._highlightCursorInfo.initialLineIndex);
763
+ const endLineIndex = Math.max(this._cursorInfo.currentLineIndex, this._highlightCursorInfo.initialLineIndex);
764
+ let highlightRootY = this._scrollTop + startLineIndex * this._fontOffset.height;
765
+ for (let i = startLineIndex; i <= endLineIndex; i++) {
766
+ const line = this._lines[i];
767
+ let highlightRootX = this._scrollLeft;
768
+ switch (this._textHorizontalAlignment) {
769
+ case Control.HORIZONTAL_ALIGNMENT_LEFT:
770
+ highlightRootX += 0;
771
+ break;
772
+ case Control.HORIZONTAL_ALIGNMENT_RIGHT:
773
+ highlightRootX += width - line.width;
774
+ break;
775
+ case Control.HORIZONTAL_ALIGNMENT_CENTER:
776
+ highlightRootX += (width - line.width) / 2;
777
+ break;
778
+ }
779
+ const begin = i === startLineIndex ? this._cursorInfo.relativeStartIndex : 0;
780
+ const end = i === endLineIndex ? this._cursorInfo.relativeEndIndex : line.text.length;
781
+ const leftOffsetWidth = context.measureText(line.text.substring(0, begin)).width;
782
+ const selectedText = line.text.substring(begin, end);
783
+ const hightlightWidth = context.measureText(selectedText).width;
784
+ context.fillRect(highlightRootX + leftOffsetWidth, highlightRootY, hightlightWidth, this._fontOffset.height);
785
+ highlightRootY += this._fontOffset.height;
786
+ }
787
+ if (this._cursorInfo.globalEndIndex === this._cursorInfo.globalStartIndex) {
788
+ this._resetBlinking();
789
+ }
790
+ }
791
+ }
792
+ context.restore();
793
+ // Border
794
+ if (this._thickness) {
795
+ if (this._isFocused) {
796
+ if (this.focusedColor) {
797
+ context.strokeStyle = this.focusedColor;
798
+ }
799
+ }
800
+ else {
801
+ if (this.color) {
802
+ context.strokeStyle = this.color;
803
+ }
804
+ }
805
+ context.lineWidth = this._thickness;
806
+ context.strokeRect(this._currentMeasure.left + this._thickness / 2, this._currentMeasure.top + this._thickness / 2, this._currentMeasure.width - this._thickness, this._currentMeasure.height - this._thickness);
807
+ }
808
+ }
809
+ _resetBlinking() {
810
+ clearTimeout(this._blinkTimeout);
811
+ this._blinkTimeout = setTimeout(() => {
812
+ this._blinkIsEven = !this._blinkIsEven;
813
+ this._markAsDirty();
814
+ }, 500);
815
+ }
816
+ _onPointerDown(target, coordinates, pointerId, buttonIndex, pi) {
817
+ if (!super._onPointerDown(target, coordinates, pointerId, buttonIndex, pi)) {
818
+ return false;
819
+ }
820
+ if (this.isReadOnly) {
821
+ return true;
822
+ }
823
+ this._clickedCoordinateX = coordinates.x;
824
+ this._clickedCoordinateY = coordinates.y;
825
+ this._isTextHighlightOn = false;
826
+ this._highlightedText = "";
827
+ this._isPointerDown = true;
828
+ this._host._capturingControl[pointerId] = this;
829
+ if (this._host.focusedControl === this) {
830
+ // Move cursor
831
+ clearTimeout(this._blinkTimeout);
832
+ this._markAsDirty();
833
+ return true;
834
+ }
835
+ if (!this._isEnabled) {
836
+ return false;
837
+ }
838
+ this._host.focusedControl = this;
839
+ return true;
840
+ }
841
+ // for textselection
842
+ _onPointerMove(target, coordinates, pointerId, pi) {
843
+ // Avoid Chromium-like beahavior when this event is fired right after onPointerDown
844
+ if (pi.event.movementX === 0 && pi.event.movementY === 0) {
845
+ return;
846
+ }
847
+ if (this._host.focusedControl === this && this._isPointerDown && !this.isReadOnly) {
848
+ this._clickedCoordinateX = coordinates.x;
849
+ this._clickedCoordinateY = coordinates.y;
850
+ if (!this._isTextHighlightOn) {
851
+ this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;
852
+ this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;
853
+ this._highlightCursorInfo.initialRelativeStartIndex = this._cursorInfo.relativeStartIndex;
854
+ this._isTextHighlightOn = true;
855
+ }
856
+ this._markAsDirty();
857
+ }
858
+ super._onPointerMove(target, coordinates, pointerId, pi);
859
+ }
860
+ /**
861
+ * Apply the correct position of cursor according to current modification
862
+ */
863
+ _updateCursorPosition() {
864
+ if (!this._isFocused) {
865
+ return;
866
+ }
867
+ if (!this._textWrapper.text && this.placeholderText) {
868
+ this._cursorInfo.currentLineIndex = 0;
869
+ this._cursorInfo.globalStartIndex = 0;
870
+ this._cursorInfo.globalEndIndex = 0;
871
+ this._cursorInfo.relativeStartIndex = 0;
872
+ this._cursorInfo.relativeEndIndex = 0;
873
+ }
874
+ else {
875
+ if (this._clickedCoordinateX && this._clickedCoordinateY) {
876
+ if (!this._isTextHighlightOn) {
877
+ this._cursorInfo = {
878
+ globalStartIndex: 0,
879
+ globalEndIndex: 0,
880
+ relativeStartIndex: 0,
881
+ relativeEndIndex: 0,
882
+ currentLineIndex: 0,
883
+ };
884
+ }
885
+ let globalIndex = 0;
886
+ let relativeIndex = 0;
887
+ const lastClickedCoordinateY = this._clickedCoordinateY - this._scrollTop;
888
+ const relativeCoordinateY = Math.floor(lastClickedCoordinateY / this._fontOffset.height);
889
+ this._cursorInfo.currentLineIndex = Math.min(Math.max(relativeCoordinateY, 0), this._lines.length - 1);
890
+ let currentSize = 0;
891
+ const relativeXPosition = this._clickedCoordinateX - (this._scrollLeft ?? 0);
892
+ let previousDist = 0;
893
+ for (let index = 0; index < this._cursorInfo.currentLineIndex; index++) {
894
+ const line = this._lines[index];
895
+ globalIndex += line.text.length + line.lineEnding.length;
896
+ }
897
+ while (currentSize < relativeXPosition && this._lines[this._cursorInfo.currentLineIndex].text.length > relativeIndex) {
898
+ relativeIndex++;
899
+ previousDist = Math.abs(relativeXPosition - currentSize);
900
+ currentSize = this._contextForBreakLines.measureText(this._lines[this._cursorInfo.currentLineIndex].text.substring(0, relativeIndex)).width;
901
+ }
902
+ // Find closest move
903
+ if (Math.abs(relativeXPosition - currentSize) > previousDist && relativeIndex > 0) {
904
+ relativeIndex--;
905
+ }
906
+ globalIndex += relativeIndex;
907
+ if (!this._isTextHighlightOn) {
908
+ this._cursorInfo.globalStartIndex = globalIndex;
909
+ this._cursorInfo.relativeStartIndex = relativeIndex;
910
+ this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;
911
+ this._cursorInfo.relativeEndIndex = this._cursorInfo.relativeStartIndex;
912
+ }
913
+ else {
914
+ if (globalIndex < this._highlightCursorInfo.initialStartIndex) {
915
+ this._cursorInfo.globalStartIndex = globalIndex;
916
+ this._cursorInfo.relativeStartIndex = relativeIndex;
917
+ this._cursorInfo.globalEndIndex = this._highlightCursorInfo.initialStartIndex;
918
+ this._cursorInfo.relativeEndIndex = this._highlightCursorInfo.initialRelativeStartIndex;
919
+ }
920
+ else {
921
+ this._cursorInfo.globalStartIndex = this._highlightCursorInfo.initialStartIndex;
922
+ this._cursorInfo.relativeStartIndex = this._highlightCursorInfo.initialRelativeStartIndex;
923
+ this._cursorInfo.globalEndIndex = globalIndex;
924
+ this._cursorInfo.relativeEndIndex = relativeIndex;
925
+ }
926
+ }
927
+ // Avoid the caret during highlighting
928
+ this._blinkIsEven = this._isTextHighlightOn;
929
+ this._clickedCoordinateX = null;
930
+ this._clickedCoordinateY = null;
931
+ }
932
+ else {
933
+ // Standard behavior same as Current line is at least above the initial highlight index
934
+ this._cursorInfo.relativeStartIndex = 0;
935
+ this._cursorInfo.currentLineIndex = 0;
936
+ let lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;
937
+ let tmpLength = 0;
938
+ while (tmpLength + lineLength <= this._cursorInfo.globalStartIndex) {
939
+ tmpLength += lineLength;
940
+ if (this._cursorInfo.currentLineIndex < this._lines.length - 1) {
941
+ this._cursorInfo.currentLineIndex++;
942
+ lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;
943
+ }
944
+ }
945
+ this._cursorInfo.relativeStartIndex = this._cursorInfo.globalStartIndex - tmpLength;
946
+ if (!this._isTextHighlightOn) {
947
+ this._cursorInfo.relativeEndIndex = this._cursorInfo.relativeStartIndex;
948
+ this._cursorInfo.globalEndIndex = this._cursorInfo.globalStartIndex;
949
+ }
950
+ else if (this._highlightCursorInfo.initialStartIndex !== -1 && this._cursorInfo.globalStartIndex >= this._highlightCursorInfo.initialStartIndex) {
951
+ // Current line is at least below the initial highlight index
952
+ while (tmpLength + lineLength <= this._cursorInfo.globalEndIndex) {
953
+ tmpLength += lineLength;
954
+ if (this._cursorInfo.currentLineIndex < this._lines.length - 1) {
955
+ this._cursorInfo.currentLineIndex++;
956
+ lineLength = this._lines[this._cursorInfo.currentLineIndex].text.length + this._lines[this._cursorInfo.currentLineIndex].lineEnding.length;
957
+ }
958
+ }
959
+ this._cursorInfo.relativeEndIndex = this._cursorInfo.globalEndIndex - tmpLength;
960
+ }
961
+ }
962
+ }
963
+ }
964
+ /**
965
+ * Update all values of cursor information based on cursorIndex value
966
+ *
967
+ * @param offset The index to take care of
968
+ * @internal
969
+ */
970
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
971
+ _updateValueFromCursorIndex(offset) {
972
+ // Override to avoid parent behavior during _onPointerMove
973
+ }
974
+ /**
975
+ * Select the word immediatly under the cursor on double click
976
+ *
977
+ * @param _evt Pointer informations of double click
978
+ * @internal
979
+ */
980
+ _processDblClick(_evt) {
981
+ //pre-find the start and end index of the word under cursor, speeds up the rendering
982
+ let moveLeft, moveRight;
983
+ do {
984
+ moveLeft = this._cursorInfo.globalStartIndex > 0 && this._textWrapper.isWord(this._cursorInfo.globalStartIndex - 1) ? --this._cursorInfo.globalStartIndex : 0;
985
+ moveRight =
986
+ this._cursorInfo.globalEndIndex < this._textWrapper.length && this._textWrapper.isWord(this._cursorInfo.globalEndIndex) ? ++this._cursorInfo.globalEndIndex : 0;
987
+ } while (moveLeft || moveRight);
988
+ this._highlightCursorInfo.initialLineIndex = this._cursorInfo.currentLineIndex;
989
+ this._highlightCursorInfo.initialStartIndex = this._cursorInfo.globalStartIndex;
990
+ this.onTextHighlightObservable.notifyObservers(this);
991
+ this._isTextHighlightOn = true;
992
+ this._blinkIsEven = true;
993
+ this._markAsDirty();
994
+ }
995
+ /** @internal */
996
+ selectAllText() {
997
+ this._isTextHighlightOn = true;
998
+ this._blinkIsEven = true;
999
+ this._highlightCursorInfo = {
1000
+ initialStartIndex: 0,
1001
+ initialRelativeStartIndex: 0,
1002
+ initialLineIndex: 0,
1003
+ };
1004
+ this._cursorInfo = {
1005
+ globalStartIndex: 0,
1006
+ globalEndIndex: this._textWrapper.length,
1007
+ relativeEndIndex: this._lines[this._lines.length - 1].text.length,
1008
+ relativeStartIndex: 0,
1009
+ currentLineIndex: this._lines.length - 1,
1010
+ };
1011
+ this._markAsDirty();
1012
+ }
1013
+ dispose() {
1014
+ super.dispose();
1015
+ this.onLinesReadyObservable.clear();
1016
+ }
1017
+ }
1018
+ __decorate([
1019
+ serialize()
1020
+ ], InputTextArea.prototype, "autoStretchHeight", null);
1021
+ __decorate([
1022
+ serialize()
1023
+ ], InputTextArea.prototype, "maxHeight", null);
1024
+ RegisterClass("BABYLON.GUI.InputTextArea", InputTextArea);
1025
+ //# sourceMappingURL=inputTextArea.js.map