@babylonjs/shared-ui-components 9.0.0 → 9.2.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 (353) hide show
  1. package/colorPicker/colorComponentEntry.d.ts +1 -1
  2. package/colorPicker/colorComponentEntry.js.map +1 -1
  3. package/colorPicker/colorPicker.d.ts +1 -1
  4. package/colorPicker/colorPicker.js.map +1 -1
  5. package/colorPicker/hexColor.d.ts +1 -1
  6. package/colorPicker/hexColor.js.map +1 -1
  7. package/components/Button.d.ts +1 -1
  8. package/components/Button.js.map +1 -1
  9. package/components/Label.d.ts +1 -1
  10. package/components/Label.js.map +1 -1
  11. package/components/bars/CommandBarComponent.d.ts +1 -1
  12. package/components/bars/CommandBarComponent.js.map +1 -1
  13. package/components/bars/CommandButton.module.scss +2 -0
  14. package/components/colorPicker/ColorComponentEntry.d.ts +1 -1
  15. package/components/colorPicker/ColorComponentEntry.js.map +1 -1
  16. package/components/colorPicker/ColorPicker.d.ts +1 -1
  17. package/components/colorPicker/ColorPicker.js.map +1 -1
  18. package/components/colorPicker/HexColor.d.ts +1 -1
  19. package/components/colorPicker/HexColor.js.map +1 -1
  20. package/components/layout/DraggableIcon.d.ts +2 -2
  21. package/components/layout/DraggableIcon.js.map +1 -1
  22. package/components/layout/FlexibleColumn.d.ts +1 -1
  23. package/components/layout/FlexibleColumn.js.map +1 -1
  24. package/components/layout/FlexibleDragHandler.d.ts +1 -1
  25. package/components/layout/FlexibleDragHandler.js.map +1 -1
  26. package/components/layout/FlexibleDropZone.d.ts +1 -1
  27. package/components/layout/FlexibleDropZone.js.map +1 -1
  28. package/components/layout/FlexibleGridContainer.d.ts +1 -1
  29. package/components/layout/FlexibleGridContainer.js.map +1 -1
  30. package/components/layout/FlexibleGridLayout.d.ts +2 -2
  31. package/components/layout/FlexibleGridLayout.js.map +1 -1
  32. package/components/layout/FlexibleResizeBar.d.ts +1 -1
  33. package/components/layout/FlexibleResizeBar.js.map +1 -1
  34. package/components/layout/FlexibleTab.d.ts +2 -2
  35. package/components/layout/FlexibleTab.js.map +1 -1
  36. package/components/layout/FlexibleTabsContainer.d.ts +2 -2
  37. package/components/layout/FlexibleTabsContainer.js.map +1 -1
  38. package/components/layout/LayoutContext.d.ts +1 -1
  39. package/components/layout/LayoutContext.js.map +1 -1
  40. package/components/layout/types.d.ts +1 -1
  41. package/components/layout/types.js.map +1 -1
  42. package/components/layout/utils.d.ts +1 -1
  43. package/components/layout/utils.js.map +1 -1
  44. package/components/lines/ColorPickerLineComponent.d.ts +2 -2
  45. package/components/lines/ColorPickerLineComponent.js.map +1 -1
  46. package/components/lines/NumericInputComponent.d.ts +1 -1
  47. package/components/lines/NumericInputComponent.js.map +1 -1
  48. package/components/lines/OptionsLineComponent.js.map +1 -1
  49. package/components/propertyTabComponentBase.d.ts +1 -1
  50. package/components/propertyTabComponentBase.js.map +1 -1
  51. package/components/reactGraphSystem/GraphConnectorHandle.d.ts +1 -1
  52. package/components/reactGraphSystem/GraphConnectorHandle.js.map +1 -1
  53. package/components/reactGraphSystem/GraphContainer.d.ts +1 -1
  54. package/components/reactGraphSystem/GraphContainer.js.map +1 -1
  55. package/components/reactGraphSystem/GraphLine.d.ts +1 -1
  56. package/components/reactGraphSystem/GraphLine.js.map +1 -1
  57. package/components/reactGraphSystem/GraphLinesContainer.d.ts +1 -1
  58. package/components/reactGraphSystem/GraphLinesContainer.js.map +1 -1
  59. package/components/reactGraphSystem/GraphNode.d.ts +1 -1
  60. package/components/reactGraphSystem/GraphNode.js.map +1 -1
  61. package/components/reactGraphSystem/GraphNodesContainer.d.ts +1 -1
  62. package/components/reactGraphSystem/GraphNodesContainer.js.map +1 -1
  63. package/components/reactGraphSystem/NodeRenderer.d.ts +2 -2
  64. package/components/reactGraphSystem/NodeRenderer.js.map +1 -1
  65. package/constToOptionsMaps.js.map +1 -1
  66. package/copyCommandToClipboard.js.map +1 -1
  67. package/fluent/hoc/buttonLine.d.ts +2 -2
  68. package/fluent/hoc/buttonLine.js.map +1 -1
  69. package/fluent/hoc/childWindow.d.ts +1 -1
  70. package/fluent/hoc/childWindow.js +1 -3
  71. package/fluent/hoc/childWindow.js.map +1 -1
  72. package/fluent/hoc/fileUploadLine.d.ts +2 -2
  73. package/fluent/hoc/fileUploadLine.js.map +1 -1
  74. package/fluent/hoc/fluentToolWrapper.d.ts +2 -2
  75. package/fluent/hoc/fluentToolWrapper.js.map +1 -1
  76. package/fluent/hoc/gradientList.d.ts +2 -2
  77. package/fluent/hoc/gradientList.js.map +1 -1
  78. package/fluent/hoc/pane.d.ts +2 -2
  79. package/fluent/hoc/pane.js.map +1 -1
  80. package/fluent/hoc/propertyLines/booleanBadgePropertyLine.d.ts +3 -3
  81. package/fluent/hoc/propertyLines/booleanBadgePropertyLine.js.map +1 -1
  82. package/fluent/hoc/propertyLines/checkboxPropertyLine.d.ts +3 -3
  83. package/fluent/hoc/propertyLines/checkboxPropertyLine.js.map +1 -1
  84. package/fluent/hoc/propertyLines/colorPropertyLine.d.ts +4 -5
  85. package/fluent/hoc/propertyLines/colorPropertyLine.js.map +1 -1
  86. package/fluent/hoc/propertyLines/comboBoxPropertyLine.d.ts +3 -3
  87. package/fluent/hoc/propertyLines/comboBoxPropertyLine.js.map +1 -1
  88. package/fluent/hoc/propertyLines/dropdownPropertyLine.d.ts +3 -3
  89. package/fluent/hoc/propertyLines/dropdownPropertyLine.js.map +1 -1
  90. package/fluent/hoc/propertyLines/entitySelectorPropertyLine.d.ts +12 -12
  91. package/fluent/hoc/propertyLines/entitySelectorPropertyLine.js.map +1 -1
  92. package/fluent/hoc/propertyLines/hexPropertyLine.d.ts +2 -2
  93. package/fluent/hoc/propertyLines/hexPropertyLine.js.map +1 -1
  94. package/fluent/hoc/propertyLines/inputPropertyLine.d.ts +4 -4
  95. package/fluent/hoc/propertyLines/inputPropertyLine.js.map +1 -1
  96. package/fluent/hoc/propertyLines/linkPropertyLine.d.ts +3 -3
  97. package/fluent/hoc/propertyLines/linkPropertyLine.js.map +1 -1
  98. package/fluent/hoc/propertyLines/propertyLine.d.ts +3 -3
  99. package/fluent/hoc/propertyLines/propertyLine.js +2 -4
  100. package/fluent/hoc/propertyLines/propertyLine.js.map +1 -1
  101. package/fluent/hoc/propertyLines/spinButtonPropertyLine.d.ts +3 -3
  102. package/fluent/hoc/propertyLines/spinButtonPropertyLine.js.map +1 -1
  103. package/fluent/hoc/propertyLines/stringifiedPropertyLine.d.ts +3 -3
  104. package/fluent/hoc/propertyLines/stringifiedPropertyLine.js.map +1 -1
  105. package/fluent/hoc/propertyLines/switchPropertyLine.d.ts +3 -3
  106. package/fluent/hoc/propertyLines/switchPropertyLine.js.map +1 -1
  107. package/fluent/hoc/propertyLines/syncedSliderPropertyLine.d.ts +2 -2
  108. package/fluent/hoc/propertyLines/syncedSliderPropertyLine.js.map +1 -1
  109. package/fluent/hoc/propertyLines/textAreaPropertyLine.d.ts +3 -3
  110. package/fluent/hoc/propertyLines/textAreaPropertyLine.js.map +1 -1
  111. package/fluent/hoc/propertyLines/textPropertyLine.d.ts +3 -3
  112. package/fluent/hoc/propertyLines/textPropertyLine.js.map +1 -1
  113. package/fluent/hoc/propertyLines/vectorPropertyLine.d.ts +4 -5
  114. package/fluent/hoc/propertyLines/vectorPropertyLine.js +2 -2
  115. package/fluent/hoc/propertyLines/vectorPropertyLine.js.map +1 -1
  116. package/fluent/hoc/textureUpload.d.ts +3 -3
  117. package/fluent/hoc/textureUpload.js.map +1 -1
  118. package/fluent/hooks/keyboardHooks.d.ts +1 -1
  119. package/fluent/hooks/keyboardHooks.js +1 -1
  120. package/fluent/hooks/keyboardHooks.js.map +1 -1
  121. package/fluent/primitives/accordion.contexts.d.ts +2 -2
  122. package/fluent/primitives/accordion.contexts.js.map +1 -1
  123. package/fluent/primitives/accordion.d.ts +1 -1
  124. package/fluent/primitives/accordion.js +1 -1
  125. package/fluent/primitives/accordion.js.map +1 -1
  126. package/fluent/primitives/button.d.ts +3 -3
  127. package/fluent/primitives/button.js.map +1 -1
  128. package/fluent/primitives/checkbox.d.ts +2 -2
  129. package/fluent/primitives/checkbox.js.map +1 -1
  130. package/fluent/primitives/clusteredLightContainerSelector.d.ts +5 -5
  131. package/fluent/primitives/clusteredLightContainerSelector.js.map +1 -1
  132. package/fluent/primitives/collapse.d.ts +1 -1
  133. package/fluent/primitives/collapse.js.map +1 -1
  134. package/fluent/primitives/colorPicker.d.ts +2 -2
  135. package/fluent/primitives/colorPicker.js +1 -1
  136. package/fluent/primitives/colorPicker.js.map +1 -1
  137. package/fluent/primitives/comboBox.d.ts +1 -1
  138. package/fluent/primitives/comboBox.js.map +1 -1
  139. package/fluent/primitives/contextMenu.d.ts +4 -4
  140. package/fluent/primitives/contextMenu.js +2 -2
  141. package/fluent/primitives/contextMenu.js.map +1 -1
  142. package/fluent/primitives/dropdown.d.ts +2 -2
  143. package/fluent/primitives/dropdown.js.map +1 -1
  144. package/fluent/primitives/entitySelector.d.ts +2 -2
  145. package/fluent/primitives/entitySelector.js +2 -6
  146. package/fluent/primitives/entitySelector.js.map +1 -1
  147. package/fluent/primitives/gradient.d.ts +2 -2
  148. package/fluent/primitives/gradient.js.map +1 -1
  149. package/fluent/primitives/infoLabel.d.ts +1 -1
  150. package/fluent/primitives/infoLabel.js.map +1 -1
  151. package/fluent/primitives/lazyComponent.d.ts +2 -2
  152. package/fluent/primitives/lazyComponent.js.map +1 -1
  153. package/fluent/primitives/link.d.ts +1 -1
  154. package/fluent/primitives/link.js.map +1 -1
  155. package/fluent/primitives/list.d.ts +1 -1
  156. package/fluent/primitives/list.js +1 -1
  157. package/fluent/primitives/list.js.map +1 -1
  158. package/fluent/primitives/materialSelector.d.ts +6 -6
  159. package/fluent/primitives/materialSelector.js.map +1 -1
  160. package/fluent/primitives/messageBar.d.ts +1 -1
  161. package/fluent/primitives/messageBar.js.map +1 -1
  162. package/fluent/primitives/nodeSelector.d.ts +6 -6
  163. package/fluent/primitives/nodeSelector.js.map +1 -1
  164. package/fluent/primitives/popover.d.ts +3 -3
  165. package/fluent/primitives/popover.js +1 -1
  166. package/fluent/primitives/popover.js.map +1 -1
  167. package/fluent/primitives/positionedPopover.d.ts +1 -1
  168. package/fluent/primitives/positionedPopover.js.map +1 -1
  169. package/fluent/primitives/primitive.d.ts +1 -1
  170. package/fluent/primitives/primitive.js.map +1 -1
  171. package/fluent/primitives/searchBar.js.map +1 -1
  172. package/fluent/primitives/searchBox.d.ts +1 -1
  173. package/fluent/primitives/searchBox.js.map +1 -1
  174. package/fluent/primitives/skeletonSelector.d.ts +6 -6
  175. package/fluent/primitives/skeletonSelector.js.map +1 -1
  176. package/fluent/primitives/slider.d.ts +2 -2
  177. package/fluent/primitives/slider.js.map +1 -1
  178. package/fluent/primitives/spinButton.d.ts +1 -1
  179. package/fluent/primitives/spinButton.js +5 -2
  180. package/fluent/primitives/spinButton.js.map +1 -1
  181. package/fluent/primitives/switch.d.ts +2 -2
  182. package/fluent/primitives/switch.js.map +1 -1
  183. package/fluent/primitives/syncedSlider.d.ts +2 -2
  184. package/fluent/primitives/syncedSlider.js +1 -1
  185. package/fluent/primitives/syncedSlider.js.map +1 -1
  186. package/fluent/primitives/textInput.d.ts +2 -2
  187. package/fluent/primitives/textInput.js.map +1 -1
  188. package/fluent/primitives/textarea.d.ts +2 -2
  189. package/fluent/primitives/textarea.js.map +1 -1
  190. package/fluent/primitives/textureSelector.d.ts +6 -6
  191. package/fluent/primitives/textureSelector.js +2 -2
  192. package/fluent/primitives/textureSelector.js.map +1 -1
  193. package/fluent/primitives/toast.d.ts +34 -3
  194. package/fluent/primitives/toast.js +9 -4
  195. package/fluent/primitives/toast.js.map +1 -1
  196. package/fluent/primitives/toggleButton.d.ts +3 -3
  197. package/fluent/primitives/toggleButton.js.map +1 -1
  198. package/fluent/primitives/tooltip.d.ts +2 -2
  199. package/fluent/primitives/tooltip.js.map +1 -1
  200. package/fluent/primitives/uploadButton.d.ts +2 -2
  201. package/fluent/primitives/uploadButton.js.map +1 -1
  202. package/fluent/primitives/utils.d.ts +2 -2
  203. package/fluent/primitives/utils.js.map +1 -1
  204. package/historyStack.d.ts +9 -1
  205. package/historyStack.js +15 -0
  206. package/historyStack.js.map +1 -1
  207. package/lines/booleanLineComponent.js +2 -2
  208. package/lines/checkBoxLineComponent.d.ts +3 -3
  209. package/lines/checkBoxLineComponent.js.map +1 -1
  210. package/lines/color3LineComponent.d.ts +3 -3
  211. package/lines/color3LineComponent.js.map +1 -1
  212. package/lines/color4LineComponent.d.ts +3 -3
  213. package/lines/color4LineComponent.js.map +1 -1
  214. package/lines/colorLineComponent.d.ts +3 -3
  215. package/lines/colorLineComponent.js.map +1 -1
  216. package/lines/colorPickerComponent.d.ts +2 -2
  217. package/lines/colorPickerComponent.js.map +1 -1
  218. package/lines/draggableLineComponent.d.ts +1 -1
  219. package/lines/draggableLineComponent.js.map +1 -1
  220. package/lines/fileButtonLineComponent.js +1 -1
  221. package/lines/floatLineComponent.d.ts +3 -3
  222. package/lines/floatLineComponent.js.map +1 -1
  223. package/lines/hexLineComponent.d.ts +3 -3
  224. package/lines/hexLineComponent.js.map +1 -1
  225. package/lines/lineContainerComponent.d.ts +1 -1
  226. package/lines/lineContainerComponent.js.map +1 -1
  227. package/lines/lineWithFileButtonComponent.js +1 -1
  228. package/lines/lineWithFileButtonComponent.js.map +1 -1
  229. package/lines/linkButtonComponent.d.ts +1 -1
  230. package/lines/linkButtonComponent.js.map +1 -1
  231. package/lines/matrixLineComponent.d.ts +4 -5
  232. package/lines/matrixLineComponent.js.map +1 -1
  233. package/lines/messageLineComponent.d.ts +1 -1
  234. package/lines/messageLineComponent.js.map +1 -1
  235. package/lines/numericInputComponent.d.ts +1 -1
  236. package/lines/numericInputComponent.js.map +1 -1
  237. package/lines/optionsLineComponent.d.ts +3 -3
  238. package/lines/optionsLineComponent.js.map +1 -1
  239. package/lines/radioLineComponent.d.ts +1 -1
  240. package/lines/radioLineComponent.js.map +1 -1
  241. package/lines/sliderLineComponent.d.ts +3 -3
  242. package/lines/sliderLineComponent.js.map +1 -1
  243. package/lines/targetsProxy.d.ts +2 -2
  244. package/lines/targetsProxy.js.map +1 -1
  245. package/lines/textInputLineComponent.d.ts +4 -5
  246. package/lines/textInputLineComponent.js.map +1 -1
  247. package/lines/textureButtonLineComponent.d.ts +2 -2
  248. package/lines/textureButtonLineComponent.js.map +1 -1
  249. package/lines/vector2LineComponent.d.ts +3 -3
  250. package/lines/vector2LineComponent.js.map +1 -1
  251. package/lines/vector3LineComponent.d.ts +3 -3
  252. package/lines/vector3LineComponent.js.map +1 -1
  253. package/lines/vector4LineComponent.d.ts +3 -3
  254. package/lines/vector4LineComponent.js.map +1 -1
  255. package/nodeGraphSystem/automaticProperties.d.ts +2 -2
  256. package/nodeGraphSystem/automaticProperties.js.map +1 -1
  257. package/nodeGraphSystem/common.module.scss +3 -0
  258. package/nodeGraphSystem/frameNodePort.d.ts +6 -6
  259. package/nodeGraphSystem/frameNodePort.js.map +1 -1
  260. package/nodeGraphSystem/graphCanvas.d.ts +43 -6
  261. package/nodeGraphSystem/graphCanvas.js +139 -6
  262. package/nodeGraphSystem/graphCanvas.js.map +1 -1
  263. package/nodeGraphSystem/graphFrame.d.ts +4 -4
  264. package/nodeGraphSystem/graphFrame.js.map +1 -1
  265. package/nodeGraphSystem/graphMinimap.d.ts +79 -0
  266. package/nodeGraphSystem/graphMinimap.js +319 -0
  267. package/nodeGraphSystem/graphMinimap.js.map +1 -0
  268. package/nodeGraphSystem/graphMinimap.module.scss +30 -0
  269. package/nodeGraphSystem/graphNode.d.ts +24 -8
  270. package/nodeGraphSystem/graphNode.js +76 -1
  271. package/nodeGraphSystem/graphNode.js.map +1 -1
  272. package/nodeGraphSystem/graphNode.module.scss +61 -0
  273. package/nodeGraphSystem/graphSearch.d.ts +54 -0
  274. package/nodeGraphSystem/graphSearch.js +181 -0
  275. package/nodeGraphSystem/graphSearch.js.map +1 -0
  276. package/nodeGraphSystem/graphSearch.module.scss +86 -0
  277. package/nodeGraphSystem/graphStickyNote.d.ts +94 -0
  278. package/nodeGraphSystem/graphStickyNote.js +310 -0
  279. package/nodeGraphSystem/graphStickyNote.js.map +1 -0
  280. package/nodeGraphSystem/graphStickyNote.module.scss +87 -0
  281. package/nodeGraphSystem/interfaces/displayManager.d.ts +4 -4
  282. package/nodeGraphSystem/interfaces/displayManager.js.map +1 -1
  283. package/nodeGraphSystem/interfaces/nodeContainer.d.ts +2 -2
  284. package/nodeGraphSystem/interfaces/nodeContainer.js.map +1 -1
  285. package/nodeGraphSystem/interfaces/nodeData.d.ts +4 -2
  286. package/nodeGraphSystem/interfaces/nodeData.js.map +1 -1
  287. package/nodeGraphSystem/interfaces/nodeLocationInfo.d.ts +10 -0
  288. package/nodeGraphSystem/interfaces/nodeLocationInfo.js.map +1 -1
  289. package/nodeGraphSystem/interfaces/portData.d.ts +4 -3
  290. package/nodeGraphSystem/interfaces/portData.js +1 -0
  291. package/nodeGraphSystem/interfaces/portData.js.map +1 -1
  292. package/nodeGraphSystem/interfaces/propertyComponentProps.d.ts +2 -2
  293. package/nodeGraphSystem/interfaces/propertyComponentProps.js.map +1 -1
  294. package/nodeGraphSystem/interfaces/selectionChangedOptions.d.ts +8 -7
  295. package/nodeGraphSystem/interfaces/selectionChangedOptions.js.map +1 -1
  296. package/nodeGraphSystem/nodeLink.d.ts +16 -4
  297. package/nodeGraphSystem/nodeLink.js +77 -0
  298. package/nodeGraphSystem/nodeLink.js.map +1 -1
  299. package/nodeGraphSystem/nodePort.d.ts +8 -8
  300. package/nodeGraphSystem/nodePort.js +26 -1
  301. package/nodeGraphSystem/nodePort.js.map +1 -1
  302. package/nodeGraphSystem/nodePort.module.scss +37 -0
  303. package/nodeGraphSystem/propertyLedger.d.ts +2 -2
  304. package/nodeGraphSystem/propertyLedger.js.map +1 -1
  305. package/nodeGraphSystem/searchBox.d.ts +1 -1
  306. package/nodeGraphSystem/searchBox.js.map +1 -1
  307. package/nodeGraphSystem/stateManager.d.ts +18 -12
  308. package/nodeGraphSystem/stateManager.js +6 -0
  309. package/nodeGraphSystem/stateManager.js.map +1 -1
  310. package/nodeGraphSystem/tools.d.ts +4 -4
  311. package/nodeGraphSystem/tools.js.map +1 -1
  312. package/nodeGraphSystem/typeLedger.d.ts +4 -4
  313. package/nodeGraphSystem/typeLedger.js.map +1 -1
  314. package/nodeGraphSystem/types/framePortData.d.ts +2 -2
  315. package/nodeGraphSystem/types/framePortData.js.map +1 -1
  316. package/package.json +3 -4
  317. package/split/splitContainer.d.ts +1 -1
  318. package/split/splitContainer.js +3 -2
  319. package/split/splitContainer.js.map +1 -1
  320. package/split/splitter.d.ts +1 -1
  321. package/split/splitter.js.map +1 -1
  322. package/tabs/propertyGrids/gui/checkboxPropertyGridComponent.d.ts +4 -4
  323. package/tabs/propertyGrids/gui/checkboxPropertyGridComponent.js.map +1 -1
  324. package/tabs/propertyGrids/gui/colorPickerPropertyGridComponent.d.ts +4 -4
  325. package/tabs/propertyGrids/gui/colorPickerPropertyGridComponent.js.map +1 -1
  326. package/tabs/propertyGrids/gui/commonControlPropertyGridComponent.d.ts +3 -3
  327. package/tabs/propertyGrids/gui/commonControlPropertyGridComponent.js.map +1 -1
  328. package/tabs/propertyGrids/gui/controlPropertyGridComponent.d.ts +4 -4
  329. package/tabs/propertyGrids/gui/controlPropertyGridComponent.js.map +1 -1
  330. package/tabs/propertyGrids/gui/ellipsePropertyGridComponent.d.ts +4 -4
  331. package/tabs/propertyGrids/gui/ellipsePropertyGridComponent.js.map +1 -1
  332. package/tabs/propertyGrids/gui/gridPropertyGridComponent.d.ts +4 -4
  333. package/tabs/propertyGrids/gui/gridPropertyGridComponent.js.map +1 -1
  334. package/tabs/propertyGrids/gui/imageBasedSliderPropertyGridComponent.d.ts +4 -4
  335. package/tabs/propertyGrids/gui/imageBasedSliderPropertyGridComponent.js.map +1 -1
  336. package/tabs/propertyGrids/gui/imagePropertyGridComponent.d.ts +3 -3
  337. package/tabs/propertyGrids/gui/imagePropertyGridComponent.js.map +1 -1
  338. package/tabs/propertyGrids/gui/inputTextPropertyGridComponent.d.ts +4 -4
  339. package/tabs/propertyGrids/gui/inputTextPropertyGridComponent.js.map +1 -1
  340. package/tabs/propertyGrids/gui/linePropertyGridComponent.d.ts +4 -4
  341. package/tabs/propertyGrids/gui/linePropertyGridComponent.js.map +1 -1
  342. package/tabs/propertyGrids/gui/radioButtonPropertyGridComponent.d.ts +4 -4
  343. package/tabs/propertyGrids/gui/radioButtonPropertyGridComponent.js.map +1 -1
  344. package/tabs/propertyGrids/gui/rectanglePropertyGridComponent.d.ts +4 -4
  345. package/tabs/propertyGrids/gui/rectanglePropertyGridComponent.js.map +1 -1
  346. package/tabs/propertyGrids/gui/scrollViewerPropertyGridComponent.d.ts +4 -4
  347. package/tabs/propertyGrids/gui/scrollViewerPropertyGridComponent.js.map +1 -1
  348. package/tabs/propertyGrids/gui/sliderPropertyGridComponent.d.ts +4 -4
  349. package/tabs/propertyGrids/gui/sliderPropertyGridComponent.js.map +1 -1
  350. package/tabs/propertyGrids/gui/stackPanelPropertyGridComponent.d.ts +4 -4
  351. package/tabs/propertyGrids/gui/stackPanelPropertyGridComponent.js.map +1 -1
  352. package/tabs/propertyGrids/gui/textBlockPropertyGridComponent.d.ts +4 -4
  353. package/tabs/propertyGrids/gui/textBlockPropertyGridComponent.js.map +1 -1
@@ -0,0 +1,181 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as styles from "./graphSearch.module.scss";
4
+ /**
5
+ * An overlay search bar for finding nodes and frames in the graph by name or type.
6
+ * Triggered via an observable; press Escape or the close button to dismiss.
7
+ */
8
+ export class GraphSearchComponent extends React.Component {
9
+ /** @internal */
10
+ constructor(props) {
11
+ super(props);
12
+ this._inputRef = React.createRef();
13
+ this._escHandler = null;
14
+ this._onKeyDown = (evt) => {
15
+ if (evt.key === "Enter") {
16
+ evt.preventDefault();
17
+ if (evt.shiftKey) {
18
+ this._goPrev();
19
+ }
20
+ else {
21
+ this._goNext();
22
+ }
23
+ }
24
+ else if (evt.key === "ArrowDown") {
25
+ evt.preventDefault();
26
+ this._goNext();
27
+ }
28
+ else if (evt.key === "ArrowUp") {
29
+ evt.preventDefault();
30
+ this._goPrev();
31
+ }
32
+ // Stop propagation so the canvas doesn't handle it
33
+ evt.stopPropagation();
34
+ };
35
+ this.state = { visible: false, query: "", currentIndex: 0, results: [] };
36
+ }
37
+ /** Show the search bar and focus the input. */
38
+ show() {
39
+ if (this._escHandler) {
40
+ this.props.canvas.stateManager.hostDocument.removeEventListener("keydown", this._escHandler);
41
+ this._escHandler = null;
42
+ }
43
+ this.setState({ visible: true, query: "", currentIndex: 0, results: [] }, () => {
44
+ this._inputRef.current?.focus();
45
+ });
46
+ this._escHandler = (evt) => {
47
+ if (evt.key === "Escape") {
48
+ this.hide();
49
+ }
50
+ };
51
+ this.props.canvas.stateManager.hostDocument.addEventListener("keydown", this._escHandler);
52
+ }
53
+ /** Hide the search bar and clear highlights. */
54
+ hide() {
55
+ this._clearHighlights(this.state.results);
56
+ this.setState({ visible: false, query: "", currentIndex: 0, results: [] });
57
+ if (this._escHandler) {
58
+ this.props.canvas.stateManager.hostDocument.removeEventListener("keydown", this._escHandler);
59
+ this._escHandler = null;
60
+ }
61
+ }
62
+ _search(query) {
63
+ if (!query.trim()) {
64
+ this._clearHighlights(this.state.results);
65
+ this.setState({ query, results: [], currentIndex: 0 });
66
+ return;
67
+ }
68
+ const lowerQuery = query.toLowerCase();
69
+ const results = [];
70
+ for (const node of this.props.canvas.nodes) {
71
+ const name = node.name || "";
72
+ const className = node.content.getClassName ? node.content.getClassName() : "";
73
+ if (name.toLowerCase().includes(lowerQuery) || className.toLowerCase().includes(lowerQuery)) {
74
+ results.push({ node, label: name || className });
75
+ }
76
+ }
77
+ for (const frame of this.props.canvas.frames) {
78
+ if (frame.name.toLowerCase().includes(lowerQuery)) {
79
+ results.push({ frame, label: frame.name });
80
+ }
81
+ }
82
+ // Clear old highlights, apply new
83
+ this._clearHighlights(this.state.results);
84
+ this._applyHighlights(results);
85
+ const newIndex = results.length > 0 ? 0 : 0;
86
+ this.setState({ query, results, currentIndex: newIndex }, () => {
87
+ if (results.length > 0) {
88
+ this._navigateTo(0);
89
+ }
90
+ });
91
+ }
92
+ _applyHighlights(results) {
93
+ for (const r of results) {
94
+ if (r.node) {
95
+ r.node.rootElement.classList.add(styles["search-match"]);
96
+ }
97
+ else if (r.frame) {
98
+ r.frame.element.classList.add(styles["search-match"]);
99
+ }
100
+ }
101
+ }
102
+ _clearHighlights(results) {
103
+ for (const r of results) {
104
+ if (r.node) {
105
+ r.node.rootElement.classList.remove(styles["search-match"]);
106
+ r.node.rootElement.classList.remove(styles["search-current"]);
107
+ }
108
+ else if (r.frame) {
109
+ r.frame.element.classList.remove(styles["search-match"]);
110
+ r.frame.element.classList.remove(styles["search-current"]);
111
+ }
112
+ }
113
+ }
114
+ _navigateTo(index) {
115
+ const { results } = this.state;
116
+ if (results.length === 0) {
117
+ return;
118
+ }
119
+ // Remove current highlight from previous
120
+ const prev = results[this.state.currentIndex];
121
+ if (prev) {
122
+ if (prev.node) {
123
+ prev.node.rootElement.classList.remove(styles["search-current"]);
124
+ }
125
+ else if (prev.frame) {
126
+ prev.frame.element.classList.remove(styles["search-current"]);
127
+ }
128
+ }
129
+ const result = results[index];
130
+ if (result.node) {
131
+ result.node.rootElement.classList.add(styles["search-current"]);
132
+ this.props.canvas.zoomToNode(result.node);
133
+ this.props.canvas.stateManager.onSelectionChangedObservable.notifyObservers({ selection: result.node });
134
+ }
135
+ else if (result.frame) {
136
+ result.frame.element.classList.add(styles["search-current"]);
137
+ // Center on frame
138
+ const canvas = this.props.canvas;
139
+ const hostWidth = canvas._rootContainer?.clientWidth || 800;
140
+ const hostHeight = canvas._rootContainer?.clientHeight || 600;
141
+ canvas.x = -result.frame.x + hostWidth / (2 * canvas.zoom) - (result.frame.width || 200) / 2;
142
+ canvas.y = -result.frame.y + hostHeight / (2 * canvas.zoom) - 20;
143
+ this.props.canvas.stateManager.onSelectionChangedObservable.notifyObservers({ selection: result.frame });
144
+ }
145
+ this.setState({ currentIndex: index });
146
+ }
147
+ _goNext() {
148
+ const { results, currentIndex } = this.state;
149
+ if (results.length === 0) {
150
+ return;
151
+ }
152
+ const next = (currentIndex + 1) % results.length;
153
+ this._navigateTo(next);
154
+ }
155
+ _goPrev() {
156
+ const { results, currentIndex } = this.state;
157
+ if (results.length === 0) {
158
+ return;
159
+ }
160
+ const prev = (currentIndex - 1 + results.length) % results.length;
161
+ this._navigateTo(prev);
162
+ }
163
+ /** @internal */
164
+ componentWillUnmount() {
165
+ this._clearHighlights(this.state.results);
166
+ if (this._escHandler) {
167
+ this.props.canvas.stateManager.hostDocument.removeEventListener("keydown", this._escHandler);
168
+ this._escHandler = null;
169
+ }
170
+ }
171
+ /** @internal */
172
+ render() {
173
+ if (!this.state.visible) {
174
+ return null;
175
+ }
176
+ const { results, currentIndex, query } = this.state;
177
+ const hasResults = results.length > 0;
178
+ return (_jsxs("div", { className: styles["search-overlay"], children: [_jsx("input", { ref: this._inputRef, className: styles["search-input"], type: "text", placeholder: "Find in graph...", value: query, onChange: (e) => this._search(e.target.value), onKeyDown: this._onKeyDown, autoFocus: true }), _jsx("span", { className: styles["result-count"], children: query ? (hasResults ? `${currentIndex + 1} of ${results.length}` : "No results") : "" }), _jsx("button", { className: styles["nav-btn"], disabled: !hasResults, onClick: () => this._goPrev(), title: "Previous match (Shift+Enter)", children: "\u25B2" }), _jsx("button", { className: styles["nav-btn"], disabled: !hasResults, onClick: () => this._goNext(), title: "Next match (Enter)", children: "\u25BC" }), _jsx("button", { className: styles["close-btn"], onClick: () => this.hide(), title: "Close (Escape)", children: "\u2715" })] }));
179
+ }
180
+ }
181
+ //# sourceMappingURL=graphSearch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphSearch.js","sourceRoot":"","sources":["../../../../dev/sharedUiComponents/src/nodeGraphSystem/graphSearch.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,K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CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC7C,SAAS,EAAE,IAAI,CAAC,UAAU,EAC1B,SAAS,SACX,EACF,eAAM,SAAS,EAAE,MAAM,CAAC,cAAc,CAAC,YAAG,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,YAAY,GAAG,CAAC,OAAO,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,GAAQ,EACvI,iBAAQ,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAC,8BAA8B,uBAEvH,EACT,iBAAQ,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAC,oBAAoB,uBAE7G,EACT,iBAAQ,SAAS,EAAE,MAAM,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAC,gBAAgB,uBAEjF,IACP,CACT,CAAC;IACN,CAAC;CACJ","sourcesContent":["import * as React from \"react\";\nimport * as styles from \"./graphSearch.module.scss\";\nimport { type GraphCanvasComponent } from \"./graphCanvas\";\nimport { type GraphNode } from \"./graphNode\";\nimport { type GraphFrame } from \"./graphFrame\";\n\n/** A search result pointing to either a node or a frame. */\ninterface ISearchResult {\n node?: GraphNode;\n frame?: GraphFrame;\n label: string;\n}\n\n/**\n * Props for the GraphSearchComponent.\n */\nexport interface IGraphSearchComponentProps {\n /** The graph canvas to search within */\n canvas: GraphCanvasComponent;\n}\n\n/** Internal state for GraphSearchComponent. */\ninterface IGraphSearchState {\n /** Whether the search overlay is visible */\n visible: boolean;\n /** The current search query */\n query: string;\n /** Index of the currently focused result */\n currentIndex: number;\n /** Matching search results */\n results: ISearchResult[];\n}\n\n/**\n * An overlay search bar for finding nodes and frames in the graph by name or type.\n * Triggered via an observable; press Escape or the close button to dismiss.\n */\nexport class GraphSearchComponent extends React.Component<IGraphSearchComponentProps, IGraphSearchState> {\n private _inputRef = React.createRef<HTMLInputElement>();\n private _escHandler: ((evt: KeyboardEvent) => void) | null = null;\n\n /** @internal */\n constructor(props: IGraphSearchComponentProps) {\n super(props);\n this.state = { visible: false, query: \"\", currentIndex: 0, results: [] };\n }\n\n /** Show the search bar and focus the input. */\n show() {\n if (this._escHandler) {\n this.props.canvas.stateManager.hostDocument.removeEventListener(\"keydown\", this._escHandler);\n this._escHandler = null;\n }\n this.setState({ visible: true, query: \"\", currentIndex: 0, results: [] }, () => {\n this._inputRef.current?.focus();\n });\n this._escHandler = (evt: KeyboardEvent) => {\n if (evt.key === \"Escape\") {\n this.hide();\n }\n };\n this.props.canvas.stateManager.hostDocument.addEventListener(\"keydown\", this._escHandler);\n }\n\n /** Hide the search bar and clear highlights. */\n hide() {\n this._clearHighlights(this.state.results);\n this.setState({ visible: false, query: \"\", currentIndex: 0, results: [] });\n if (this._escHandler) {\n this.props.canvas.stateManager.hostDocument.removeEventListener(\"keydown\", this._escHandler);\n this._escHandler = null;\n }\n }\n\n private _search(query: string) {\n if (!query.trim()) {\n this._clearHighlights(this.state.results);\n this.setState({ query, results: [], currentIndex: 0 });\n return;\n }\n\n const lowerQuery = query.toLowerCase();\n const results: ISearchResult[] = [];\n\n for (const node of this.props.canvas.nodes) {\n const name = node.name || \"\";\n const className = node.content.getClassName ? node.content.getClassName() : \"\";\n if (name.toLowerCase().includes(lowerQuery) || className.toLowerCase().includes(lowerQuery)) {\n results.push({ node, label: name || className });\n }\n }\n\n for (const frame of this.props.canvas.frames) {\n if (frame.name.toLowerCase().includes(lowerQuery)) {\n results.push({ frame, label: frame.name });\n }\n }\n\n // Clear old highlights, apply new\n this._clearHighlights(this.state.results);\n this._applyHighlights(results);\n\n const newIndex = results.length > 0 ? 0 : 0;\n this.setState({ query, results, currentIndex: newIndex }, () => {\n if (results.length > 0) {\n this._navigateTo(0);\n }\n });\n }\n\n private _applyHighlights(results: ISearchResult[]) {\n for (const r of results) {\n if (r.node) {\n r.node.rootElement.classList.add(styles[\"search-match\"]);\n } else if (r.frame) {\n r.frame.element.classList.add(styles[\"search-match\"]);\n }\n }\n }\n\n private _clearHighlights(results: ISearchResult[]) {\n for (const r of results) {\n if (r.node) {\n r.node.rootElement.classList.remove(styles[\"search-match\"]);\n r.node.rootElement.classList.remove(styles[\"search-current\"]);\n } else if (r.frame) {\n r.frame.element.classList.remove(styles[\"search-match\"]);\n r.frame.element.classList.remove(styles[\"search-current\"]);\n }\n }\n }\n\n private _navigateTo(index: number) {\n const { results } = this.state;\n if (results.length === 0) {\n return;\n }\n\n // Remove current highlight from previous\n const prev = results[this.state.currentIndex];\n if (prev) {\n if (prev.node) {\n prev.node.rootElement.classList.remove(styles[\"search-current\"]);\n } else if (prev.frame) {\n prev.frame.element.classList.remove(styles[\"search-current\"]);\n }\n }\n\n const result = results[index];\n if (result.node) {\n result.node.rootElement.classList.add(styles[\"search-current\"]);\n this.props.canvas.zoomToNode(result.node);\n this.props.canvas.stateManager.onSelectionChangedObservable.notifyObservers({ selection: result.node });\n } else if (result.frame) {\n result.frame.element.classList.add(styles[\"search-current\"]);\n // Center on frame\n const canvas = this.props.canvas;\n const hostWidth = (canvas as any)._rootContainer?.clientWidth || 800;\n const hostHeight = (canvas as any)._rootContainer?.clientHeight || 600;\n canvas.x = -result.frame.x + hostWidth / (2 * canvas.zoom) - (result.frame.width || 200) / 2;\n canvas.y = -result.frame.y + hostHeight / (2 * canvas.zoom) - 20;\n this.props.canvas.stateManager.onSelectionChangedObservable.notifyObservers({ selection: result.frame });\n }\n\n this.setState({ currentIndex: index });\n }\n\n private _goNext() {\n const { results, currentIndex } = this.state;\n if (results.length === 0) {\n return;\n }\n const next = (currentIndex + 1) % results.length;\n this._navigateTo(next);\n }\n\n private _goPrev() {\n const { results, currentIndex } = this.state;\n if (results.length === 0) {\n return;\n }\n const prev = (currentIndex - 1 + results.length) % results.length;\n this._navigateTo(prev);\n }\n\n private _onKeyDown = (evt: React.KeyboardEvent) => {\n if (evt.key === \"Enter\") {\n evt.preventDefault();\n if (evt.shiftKey) {\n this._goPrev();\n } else {\n this._goNext();\n }\n } else if (evt.key === \"ArrowDown\") {\n evt.preventDefault();\n this._goNext();\n } else if (evt.key === \"ArrowUp\") {\n evt.preventDefault();\n this._goPrev();\n }\n // Stop propagation so the canvas doesn't handle it\n evt.stopPropagation();\n };\n\n /** @internal */\n override componentWillUnmount() {\n this._clearHighlights(this.state.results);\n if (this._escHandler) {\n this.props.canvas.stateManager.hostDocument.removeEventListener(\"keydown\", this._escHandler);\n this._escHandler = null;\n }\n }\n\n /** @internal */\n override render() {\n if (!this.state.visible) {\n return null;\n }\n\n const { results, currentIndex, query } = this.state;\n const hasResults = results.length > 0;\n\n return (\n <div className={styles[\"search-overlay\"]}>\n <input\n ref={this._inputRef}\n className={styles[\"search-input\"]}\n type=\"text\"\n placeholder=\"Find in graph...\"\n value={query}\n onChange={(e) => this._search(e.target.value)}\n onKeyDown={this._onKeyDown}\n autoFocus\n />\n <span className={styles[\"result-count\"]}>{query ? (hasResults ? `${currentIndex + 1} of ${results.length}` : \"No results\") : \"\"}</span>\n <button className={styles[\"nav-btn\"]} disabled={!hasResults} onClick={() => this._goPrev()} title=\"Previous match (Shift+Enter)\">\n &#9650;\n </button>\n <button className={styles[\"nav-btn\"]} disabled={!hasResults} onClick={() => this._goNext()} title=\"Next match (Enter)\">\n &#9660;\n </button>\n <button className={styles[\"close-btn\"]} onClick={() => this.hide()} title=\"Close (Escape)\">\n &#10005;\n </button>\n </div>\n );\n }\n}\n"]}
@@ -0,0 +1,86 @@
1
+ .search-overlay {
2
+ position: absolute;
3
+ top: 12px;
4
+ right: 12px;
5
+ z-index: 100;
6
+ display: flex;
7
+ align-items: center;
8
+ gap: 4px;
9
+ background: #2b2b2b;
10
+ border: 1px solid #555;
11
+ border-radius: 6px;
12
+ padding: 4px 8px;
13
+ box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
14
+ font-family: "acumin-pro-condensed", sans-serif;
15
+ font-size: 13px;
16
+ color: #ccc;
17
+ }
18
+
19
+ .search-input {
20
+ background: #1e1e1e;
21
+ border: 1px solid #444;
22
+ border-radius: 4px;
23
+ color: #eee;
24
+ font-size: 13px;
25
+ padding: 4px 8px;
26
+ width: 200px;
27
+ outline: none;
28
+
29
+ &:focus {
30
+ border-color: #5da0e0;
31
+ }
32
+
33
+ &::placeholder {
34
+ color: #777;
35
+ }
36
+ }
37
+
38
+ .result-count {
39
+ color: #999;
40
+ font-size: 12px;
41
+ min-width: 56px;
42
+ text-align: center;
43
+ white-space: nowrap;
44
+ user-select: none;
45
+ }
46
+
47
+ .nav-btn {
48
+ background: transparent;
49
+ border: 1px solid #555;
50
+ border-radius: 3px;
51
+ color: #ccc;
52
+ cursor: pointer;
53
+ font-size: 13px;
54
+ width: 24px;
55
+ height: 24px;
56
+ display: flex;
57
+ align-items: center;
58
+ justify-content: center;
59
+ padding: 0;
60
+
61
+ &:hover {
62
+ background: #3a3a3a;
63
+ color: #fff;
64
+ }
65
+
66
+ &:disabled {
67
+ opacity: 0.3;
68
+ cursor: default;
69
+ }
70
+ }
71
+
72
+ .close-btn {
73
+ composes: nav-btn;
74
+ margin-left: 2px;
75
+ }
76
+
77
+ .search-match {
78
+ outline: 2px solid rgba(255, 200, 50, 0.8) !important;
79
+ outline-offset: 2px;
80
+ }
81
+
82
+ .search-current {
83
+ outline: 2px solid #5da0e0 !important;
84
+ outline-offset: 2px;
85
+ box-shadow: 0 0 12px rgba(93, 160, 224, 0.5);
86
+ }
@@ -0,0 +1,94 @@
1
+ import { type GraphCanvasComponent } from "./graphCanvas.js";
2
+ import { type IStickyNoteData } from "./interfaces/nodeLocationInfo.js";
3
+ /**
4
+ * A free-floating sticky note annotation on the graph canvas.
5
+ *
6
+ * Sticky notes are lightweight, text-only overlays that live in the frame container.
7
+ * They support dragging, resizing, and inline editing of both title and body text.
8
+ * Unlike frames, they do not group or contain nodes.
9
+ */
10
+ export declare class GraphStickyNote {
11
+ /** The root DOM element for this sticky note. */
12
+ element: HTMLDivElement;
13
+ private _ownerCanvas;
14
+ private _id;
15
+ private _x;
16
+ private _y;
17
+ private _width;
18
+ private _height;
19
+ private _name;
20
+ private _body;
21
+ private _color;
22
+ private _headerElement;
23
+ private _titleElement;
24
+ private _bodyElement;
25
+ private _resizeHandle;
26
+ private _mouseStartX;
27
+ private _mouseStartY;
28
+ private _isDragging;
29
+ private _isResizing;
30
+ private _resizeStartW;
31
+ private _resizeStartH;
32
+ /** Unique ID for this sticky note */
33
+ get id(): number;
34
+ /** X position in canvas space */
35
+ get x(): number;
36
+ /** X position in canvas space */
37
+ set x(value: number);
38
+ /** Y position in canvas space */
39
+ get y(): number;
40
+ /** Y position in canvas space */
41
+ set y(value: number);
42
+ /** Width in pixels */
43
+ get width(): number;
44
+ /** Width in pixels */
45
+ set width(value: number);
46
+ /** Height in pixels */
47
+ get height(): number;
48
+ /** Height in pixels */
49
+ set height(value: number);
50
+ /** Display name */
51
+ get name(): string;
52
+ /** Display name */
53
+ set name(value: string);
54
+ /** Body text content */
55
+ get body(): string;
56
+ /** Body text content */
57
+ set body(value: string);
58
+ /** Background color CSS value */
59
+ get color(): string;
60
+ /** Background color CSS value */
61
+ set color(value: string);
62
+ /**
63
+ * Create a new sticky note on the canvas.
64
+ * @param canvas - the owning graph canvas component
65
+ */
66
+ constructor(canvas: GraphCanvasComponent);
67
+ /**
68
+ * Mark this note as visually selected or deselected.
69
+ * @param selected - whether the note is selected
70
+ */
71
+ setIsSelected(selected: boolean): void;
72
+ /**
73
+ * Serialize this sticky note to a plain data object.
74
+ * @returns the serialized data
75
+ */
76
+ serialize(): IStickyNoteData;
77
+ /**
78
+ * Create a sticky note from serialized data.
79
+ * @param data - the serialized sticky note data
80
+ * @param canvas - the owning graph canvas
81
+ * @returns the new sticky note instance
82
+ */
83
+ static Parse(data: IStickyNoteData, canvas: GraphCanvasComponent): GraphStickyNote;
84
+ /**
85
+ * Remove this sticky note from the canvas and clean up.
86
+ */
87
+ dispose(): void;
88
+ private _onDragStart;
89
+ private _onDragMoveHandler;
90
+ private _onDragEndHandler;
91
+ private _onResizeStart;
92
+ private _onResizeMoveHandler;
93
+ private _onResizeEndHandler;
94
+ }