@babylonjs/shared-ui-components 5.28.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 (312) hide show
  1. package/colorPicker/colorComponentEntry.d.ts +18 -0
  2. package/colorPicker/colorComponentEntry.js +37 -0
  3. package/colorPicker/colorComponentEntry.js.map +1 -0
  4. package/colorPicker/colorPicker.d.ts +43 -0
  5. package/colorPicker/colorPicker.js +137 -0
  6. package/colorPicker/colorPicker.js.map +1 -0
  7. package/colorPicker/hexColor.d.ts +20 -0
  8. package/colorPicker/hexColor.js +43 -0
  9. package/colorPicker/hexColor.js.map +1 -0
  10. package/components/Button.d.ts +10 -0
  11. package/components/Button.js +7 -0
  12. package/components/Button.js.map +1 -0
  13. package/components/Icon.d.ts +6 -0
  14. package/components/Icon.js +7 -0
  15. package/components/Icon.js.map +1 -0
  16. package/components/Label.d.ts +7 -0
  17. package/components/Label.js +7 -0
  18. package/components/Label.js.map +1 -0
  19. package/components/MessageDialog.d.ts +7 -0
  20. package/components/MessageDialog.js +23 -0
  21. package/components/MessageDialog.js.map +1 -0
  22. package/components/Toggle.d.ts +8 -0
  23. package/components/Toggle.js +16 -0
  24. package/components/Toggle.js.map +1 -0
  25. package/components/bars/CommandBarComponent.d.ts +16 -0
  26. package/components/bars/CommandBarComponent.js +69 -0
  27. package/components/bars/CommandBarComponent.js.map +1 -0
  28. package/components/bars/CommandButtonComponent.d.ts +11 -0
  29. package/components/bars/CommandButtonComponent.js +7 -0
  30. package/components/bars/CommandButtonComponent.js.map +1 -0
  31. package/components/bars/CommandDropdownComponent.d.ts +26 -0
  32. package/components/bars/CommandDropdownComponent.js +49 -0
  33. package/components/bars/CommandDropdownComponent.js.map +1 -0
  34. package/components/classNames.d.ts +2 -0
  35. package/components/classNames.js +19 -0
  36. package/components/classNames.js.map +1 -0
  37. package/components/colorPicker/ColorComponentEntry.d.ts +18 -0
  38. package/components/colorPicker/ColorComponentEntry.js +38 -0
  39. package/components/colorPicker/ColorComponentEntry.js.map +1 -0
  40. package/components/colorPicker/ColorPicker.d.ts +43 -0
  41. package/components/colorPicker/ColorPicker.js +138 -0
  42. package/components/colorPicker/ColorPicker.js.map +1 -0
  43. package/components/colorPicker/HexColor.d.ts +20 -0
  44. package/components/colorPicker/HexColor.js +46 -0
  45. package/components/colorPicker/HexColor.js.map +1 -0
  46. package/components/lines/ColorLineComponent.d.ts +40 -0
  47. package/components/lines/ColorLineComponent.js +146 -0
  48. package/components/lines/ColorLineComponent.js.map +1 -0
  49. package/components/lines/ColorPickerLineComponent.d.ts +33 -0
  50. package/components/lines/ColorPickerLineComponent.js +62 -0
  51. package/components/lines/ColorPickerLineComponent.js.map +1 -0
  52. package/components/lines/FileButtonLineComponent.d.ts +16 -0
  53. package/components/lines/FileButtonLineComponent.js +22 -0
  54. package/components/lines/FileButtonLineComponent.js.map +1 -0
  55. package/components/lines/NumericInputComponent.d.ts +31 -0
  56. package/components/lines/NumericInputComponent.js +87 -0
  57. package/components/lines/NumericInputComponent.js.map +1 -0
  58. package/license.md +71 -0
  59. package/lines/booleanLineComponent.d.ts +11 -0
  60. package/lines/booleanLineComponent.js +15 -0
  61. package/lines/booleanLineComponent.js.map +1 -0
  62. package/lines/buttonLineComponent.d.ts +12 -0
  63. package/lines/buttonLineComponent.js +11 -0
  64. package/lines/buttonLineComponent.js.map +1 -0
  65. package/lines/checkBoxLineComponent.d.ts +36 -0
  66. package/lines/checkBoxLineComponent.js +89 -0
  67. package/lines/checkBoxLineComponent.js.map +1 -0
  68. package/lines/color3LineComponent.d.ts +18 -0
  69. package/lines/color3LineComponent.js +10 -0
  70. package/lines/color3LineComponent.js.map +1 -0
  71. package/lines/color4LineComponent.d.ts +18 -0
  72. package/lines/color4LineComponent.js +10 -0
  73. package/lines/color4LineComponent.js.map +1 -0
  74. package/lines/colorLineComponent.d.ts +40 -0
  75. package/lines/colorLineComponent.js +145 -0
  76. package/lines/colorLineComponent.js.map +1 -0
  77. package/lines/colorPickerComponent.d.ts +31 -0
  78. package/lines/colorPickerComponent.js +61 -0
  79. package/lines/colorPickerComponent.js.map +1 -0
  80. package/lines/draggableLineComponent.d.ts +9 -0
  81. package/lines/draggableLineComponent.js +13 -0
  82. package/lines/draggableLineComponent.js.map +1 -0
  83. package/lines/fileButtonLineComponent.d.ts +17 -0
  84. package/lines/fileButtonLineComponent.js +21 -0
  85. package/lines/fileButtonLineComponent.js.map +1 -0
  86. package/lines/fileMultipleButtonLineComponent.d.ts +17 -0
  87. package/lines/fileMultipleButtonLineComponent.js +21 -0
  88. package/lines/fileMultipleButtonLineComponent.js.map +1 -0
  89. package/lines/floatLineComponent.d.ts +50 -0
  90. package/lines/floatLineComponent.js +176 -0
  91. package/lines/floatLineComponent.js.map +1 -0
  92. package/lines/hexLineComponent.d.ts +40 -0
  93. package/lines/hexLineComponent.js +122 -0
  94. package/lines/hexLineComponent.js.map +1 -0
  95. package/lines/iSelectedLineContainer.d.ts +4 -0
  96. package/lines/iSelectedLineContainer.js +2 -0
  97. package/lines/iSelectedLineContainer.js.map +1 -0
  98. package/lines/iconButtonLineComponent.d.ts +11 -0
  99. package/lines/iconButtonLineComponent.js +11 -0
  100. package/lines/iconButtonLineComponent.js.map +1 -0
  101. package/lines/iconComponent.d.ts +9 -0
  102. package/lines/iconComponent.js +8 -0
  103. package/lines/iconComponent.js.map +1 -0
  104. package/lines/indentedTextLineComponent.d.ts +16 -0
  105. package/lines/indentedTextLineComponent.js +27 -0
  106. package/lines/indentedTextLineComponent.js.map +1 -0
  107. package/lines/inputArrowsComponent.d.ts +13 -0
  108. package/lines/inputArrowsComponent.js +38 -0
  109. package/lines/inputArrowsComponent.js.map +1 -0
  110. package/lines/lineContainerComponent.d.ts +19 -0
  111. package/lines/lineContainerComponent.js +50 -0
  112. package/lines/lineContainerComponent.js.map +1 -0
  113. package/lines/linkButtonComponent.d.ts +16 -0
  114. package/lines/linkButtonComponent.js +21 -0
  115. package/lines/linkButtonComponent.js.map +1 -0
  116. package/lines/matrixLineComponent.d.ts +36 -0
  117. package/lines/matrixLineComponent.js +103 -0
  118. package/lines/matrixLineComponent.js.map +1 -0
  119. package/lines/messageLineComponent.d.ts +12 -0
  120. package/lines/messageLineComponent.js +15 -0
  121. package/lines/messageLineComponent.js.map +1 -0
  122. package/lines/numericInputComponent.d.ts +31 -0
  123. package/lines/numericInputComponent.js +86 -0
  124. package/lines/numericInputComponent.js.map +1 -0
  125. package/lines/optionsLineComponent.d.ts +48 -0
  126. package/lines/optionsLineComponent.js +119 -0
  127. package/lines/optionsLineComponent.js.map +1 -0
  128. package/lines/popup.d.ts +4 -0
  129. package/lines/popup.js +68 -0
  130. package/lines/popup.js.map +1 -0
  131. package/lines/radioLineComponent.d.ts +21 -0
  132. package/lines/radioLineComponent.js +27 -0
  133. package/lines/radioLineComponent.js.map +1 -0
  134. package/lines/sliderLineComponent.d.ts +37 -0
  135. package/lines/sliderLineComponent.js +90 -0
  136. package/lines/sliderLineComponent.js.map +1 -0
  137. package/lines/targetsProxy.d.ts +11 -0
  138. package/lines/targetsProxy.js +43 -0
  139. package/lines/targetsProxy.js.map +1 -0
  140. package/lines/textInputLineComponent.d.ts +47 -0
  141. package/lines/textInputLineComponent.js +155 -0
  142. package/lines/textInputLineComponent.js.map +1 -0
  143. package/lines/textLineComponent.d.ts +21 -0
  144. package/lines/textLineComponent.js +31 -0
  145. package/lines/textLineComponent.js.map +1 -0
  146. package/lines/unitButton.d.ts +8 -0
  147. package/lines/unitButton.js +8 -0
  148. package/lines/unitButton.js.map +1 -0
  149. package/lines/valueLineComponent.d.ts +15 -0
  150. package/lines/valueLineComponent.js +13 -0
  151. package/lines/valueLineComponent.js.map +1 -0
  152. package/lines/vector2LineComponent.d.ts +36 -0
  153. package/lines/vector2LineComponent.js +64 -0
  154. package/lines/vector2LineComponent.js.map +1 -0
  155. package/lines/vector3LineComponent.d.ts +41 -0
  156. package/lines/vector3LineComponent.js +75 -0
  157. package/lines/vector3LineComponent.js.map +1 -0
  158. package/lines/vector4LineComponent.d.ts +42 -0
  159. package/lines/vector4LineComponent.js +82 -0
  160. package/lines/vector4LineComponent.js.map +1 -0
  161. package/nodeGraphSystem/displayLedger.d.ts +5 -0
  162. package/nodeGraphSystem/displayLedger.js +4 -0
  163. package/nodeGraphSystem/displayLedger.js.map +1 -0
  164. package/nodeGraphSystem/frameNodePort.d.ts +25 -0
  165. package/nodeGraphSystem/frameNodePort.js +60 -0
  166. package/nodeGraphSystem/frameNodePort.js.map +1 -0
  167. package/nodeGraphSystem/graphCanvas.d.ts +111 -0
  168. package/nodeGraphSystem/graphCanvas.js +1132 -0
  169. package/nodeGraphSystem/graphCanvas.js.map +1 -0
  170. package/nodeGraphSystem/graphFrame.d.ts +153 -0
  171. package/nodeGraphSystem/graphFrame.js +1329 -0
  172. package/nodeGraphSystem/graphFrame.js.map +1 -0
  173. package/nodeGraphSystem/graphNode.d.ts +79 -0
  174. package/nodeGraphSystem/graphNode.js +460 -0
  175. package/nodeGraphSystem/graphNode.js.map +1 -0
  176. package/nodeGraphSystem/interfaces/displayManager.d.ts +13 -0
  177. package/nodeGraphSystem/interfaces/displayManager.js +2 -0
  178. package/nodeGraphSystem/interfaces/displayManager.js.map +1 -0
  179. package/nodeGraphSystem/interfaces/nodeContainer.d.ts +6 -0
  180. package/nodeGraphSystem/interfaces/nodeContainer.js +2 -0
  181. package/nodeGraphSystem/interfaces/nodeContainer.js.map +1 -0
  182. package/nodeGraphSystem/interfaces/nodeData.d.ts +15 -0
  183. package/nodeGraphSystem/interfaces/nodeData.js +2 -0
  184. package/nodeGraphSystem/interfaces/nodeData.js.map +1 -0
  185. package/nodeGraphSystem/interfaces/nodeLocationInfo.d.ts +26 -0
  186. package/nodeGraphSystem/interfaces/nodeLocationInfo.js +2 -0
  187. package/nodeGraphSystem/interfaces/nodeLocationInfo.js.map +1 -0
  188. package/nodeGraphSystem/interfaces/portData.d.ts +28 -0
  189. package/nodeGraphSystem/interfaces/portData.js +8 -0
  190. package/nodeGraphSystem/interfaces/portData.js.map +1 -0
  191. package/nodeGraphSystem/interfaces/propertyComponentProps.d.ts +6 -0
  192. package/nodeGraphSystem/interfaces/propertyComponentProps.js +2 -0
  193. package/nodeGraphSystem/interfaces/propertyComponentProps.js.map +1 -0
  194. package/nodeGraphSystem/interfaces/selectionChangedOptions.d.ts +11 -0
  195. package/nodeGraphSystem/interfaces/selectionChangedOptions.js +2 -0
  196. package/nodeGraphSystem/interfaces/selectionChangedOptions.js.map +1 -0
  197. package/nodeGraphSystem/nodeLink.d.ts +31 -0
  198. package/nodeGraphSystem/nodeLink.js +183 -0
  199. package/nodeGraphSystem/nodeLink.js.map +1 -0
  200. package/nodeGraphSystem/nodePort.d.ts +35 -0
  201. package/nodeGraphSystem/nodePort.js +129 -0
  202. package/nodeGraphSystem/nodePort.js.map +1 -0
  203. package/nodeGraphSystem/propertyLedger.d.ts +8 -0
  204. package/nodeGraphSystem/propertyLedger.js +4 -0
  205. package/nodeGraphSystem/propertyLedger.js.map +1 -0
  206. package/nodeGraphSystem/stateManager.d.ts +45 -0
  207. package/nodeGraphSystem/stateManager.js +19 -0
  208. package/nodeGraphSystem/stateManager.js.map +1 -0
  209. package/nodeGraphSystem/tools.d.ts +5 -0
  210. package/nodeGraphSystem/tools.js +37 -0
  211. package/nodeGraphSystem/tools.js.map +1 -0
  212. package/nodeGraphSystem/typeLedger.d.ts +8 -0
  213. package/nodeGraphSystem/typeLedger.js +3 -0
  214. package/nodeGraphSystem/typeLedger.js.map +1 -0
  215. package/nodeGraphSystem/types/framePortData.d.ts +7 -0
  216. package/nodeGraphSystem/types/framePortData.js +2 -0
  217. package/nodeGraphSystem/types/framePortData.js.map +1 -0
  218. package/package.json +55 -0
  219. package/propertyChangedEvent.d.ts +7 -0
  220. package/propertyChangedEvent.js +3 -0
  221. package/propertyChangedEvent.js.map +1 -0
  222. package/readme.md +6 -0
  223. package/stories/Button.stories.d.ts +10 -0
  224. package/stories/Button.stories.js +20 -0
  225. package/stories/Button.stories.js.map +1 -0
  226. package/stories/Icon.stories.d.ts +9 -0
  227. package/stories/Icon.stories.js +17 -0
  228. package/stories/Icon.stories.js.map +1 -0
  229. package/stories/Label.stories.d.ts +8 -0
  230. package/stories/Label.stories.js +11 -0
  231. package/stories/Label.stories.js.map +1 -0
  232. package/stories/MessageDialog.stories.d.ts +9 -0
  233. package/stories/MessageDialog.stories.js +20 -0
  234. package/stories/MessageDialog.stories.js.map +1 -0
  235. package/stories/Toggle.stories.d.ts +9 -0
  236. package/stories/Toggle.stories.js +18 -0
  237. package/stories/Toggle.stories.js.map +1 -0
  238. package/stories/bars/CommandBarComponent.stories.d.ts +11 -0
  239. package/stories/bars/CommandBarComponent.stories.js +13 -0
  240. package/stories/bars/CommandBarComponent.stories.js.map +1 -0
  241. package/stories/bars/CommandButtonComponent.stories.d.ts +6 -0
  242. package/stories/bars/CommandButtonComponent.stories.js +7 -0
  243. package/stories/bars/CommandButtonComponent.stories.js.map +1 -0
  244. package/stories/colorPicker/ColorPicker.stories.d.ts +11 -0
  245. package/stories/colorPicker/ColorPicker.stories.js +5 -0
  246. package/stories/colorPicker/ColorPicker.stories.js.map +1 -0
  247. package/stories/lines/ColorLineComponent.stories.d.ts +21 -0
  248. package/stories/lines/ColorLineComponent.stories.js +10 -0
  249. package/stories/lines/ColorLineComponent.stories.js.map +1 -0
  250. package/stories/lines/ColorPickerLineComponent.stories.d.ts +14 -0
  251. package/stories/lines/ColorPickerLineComponent.stories.js +11 -0
  252. package/stories/lines/ColorPickerLineComponent.stories.js.map +1 -0
  253. package/stories/lines/FileButtonLineComponent.stories.d.ts +6 -0
  254. package/stories/lines/FileButtonLineComponent.stories.js +6 -0
  255. package/stories/lines/FileButtonLineComponent.stories.js.map +1 -0
  256. package/stories/lines/NumericInputComponent.stories.d.ts +11 -0
  257. package/stories/lines/NumericInputComponent.stories.js +6 -0
  258. package/stories/lines/NumericInputComponent.stories.js.map +1 -0
  259. package/stringTools.d.ts +11 -0
  260. package/stringTools.js +89 -0
  261. package/stringTools.js.map +1 -0
  262. package/tabs/propertyGrids/gui/checkboxPropertyGridComponent.d.ts +15 -0
  263. package/tabs/propertyGrids/gui/checkboxPropertyGridComponent.js +16 -0
  264. package/tabs/propertyGrids/gui/checkboxPropertyGridComponent.js.map +1 -0
  265. package/tabs/propertyGrids/gui/colorPickerPropertyGridComponent.d.ts +15 -0
  266. package/tabs/propertyGrids/gui/colorPickerPropertyGridComponent.js +15 -0
  267. package/tabs/propertyGrids/gui/colorPickerPropertyGridComponent.js.map +1 -0
  268. package/tabs/propertyGrids/gui/commonControlPropertyGridComponent.d.ts +17 -0
  269. package/tabs/propertyGrids/gui/commonControlPropertyGridComponent.js +56 -0
  270. package/tabs/propertyGrids/gui/commonControlPropertyGridComponent.js.map +1 -0
  271. package/tabs/propertyGrids/gui/controlPropertyGridComponent.d.ts +15 -0
  272. package/tabs/propertyGrids/gui/controlPropertyGridComponent.js +13 -0
  273. package/tabs/propertyGrids/gui/controlPropertyGridComponent.js.map +1 -0
  274. package/tabs/propertyGrids/gui/ellipsePropertyGridComponent.d.ts +15 -0
  275. package/tabs/propertyGrids/gui/ellipsePropertyGridComponent.js +16 -0
  276. package/tabs/propertyGrids/gui/ellipsePropertyGridComponent.js.map +1 -0
  277. package/tabs/propertyGrids/gui/gridPropertyGridComponent.d.ts +17 -0
  278. package/tabs/propertyGrids/gui/gridPropertyGridComponent.js +39 -0
  279. package/tabs/propertyGrids/gui/gridPropertyGridComponent.js.map +1 -0
  280. package/tabs/propertyGrids/gui/imageBasedSliderPropertyGridComponent.d.ts +15 -0
  281. package/tabs/propertyGrids/gui/imageBasedSliderPropertyGridComponent.js +17 -0
  282. package/tabs/propertyGrids/gui/imageBasedSliderPropertyGridComponent.js.map +1 -0
  283. package/tabs/propertyGrids/gui/imagePropertyGridComponent.d.ts +15 -0
  284. package/tabs/propertyGrids/gui/imagePropertyGridComponent.js +26 -0
  285. package/tabs/propertyGrids/gui/imagePropertyGridComponent.js.map +1 -0
  286. package/tabs/propertyGrids/gui/inputTextPropertyGridComponent.d.ts +15 -0
  287. package/tabs/propertyGrids/gui/inputTextPropertyGridComponent.js +18 -0
  288. package/tabs/propertyGrids/gui/inputTextPropertyGridComponent.js.map +1 -0
  289. package/tabs/propertyGrids/gui/linePropertyGridComponent.d.ts +16 -0
  290. package/tabs/propertyGrids/gui/linePropertyGridComponent.js +28 -0
  291. package/tabs/propertyGrids/gui/linePropertyGridComponent.js.map +1 -0
  292. package/tabs/propertyGrids/gui/radioButtonPropertyGridComponent.d.ts +15 -0
  293. package/tabs/propertyGrids/gui/radioButtonPropertyGridComponent.js +18 -0
  294. package/tabs/propertyGrids/gui/radioButtonPropertyGridComponent.js.map +1 -0
  295. package/tabs/propertyGrids/gui/rectanglePropertyGridComponent.d.ts +15 -0
  296. package/tabs/propertyGrids/gui/rectanglePropertyGridComponent.js +16 -0
  297. package/tabs/propertyGrids/gui/rectanglePropertyGridComponent.js.map +1 -0
  298. package/tabs/propertyGrids/gui/scrollViewerPropertyGridComponent.d.ts +15 -0
  299. package/tabs/propertyGrids/gui/scrollViewerPropertyGridComponent.js +16 -0
  300. package/tabs/propertyGrids/gui/scrollViewerPropertyGridComponent.js.map +1 -0
  301. package/tabs/propertyGrids/gui/sliderPropertyGridComponent.d.ts +15 -0
  302. package/tabs/propertyGrids/gui/sliderPropertyGridComponent.js +17 -0
  303. package/tabs/propertyGrids/gui/sliderPropertyGridComponent.js.map +1 -0
  304. package/tabs/propertyGrids/gui/stackPanelPropertyGridComponent.d.ts +15 -0
  305. package/tabs/propertyGrids/gui/stackPanelPropertyGridComponent.js +15 -0
  306. package/tabs/propertyGrids/gui/stackPanelPropertyGridComponent.js.map +1 -0
  307. package/tabs/propertyGrids/gui/textBlockPropertyGridComponent.d.ts +15 -0
  308. package/tabs/propertyGrids/gui/textBlockPropertyGridComponent.js +35 -0
  309. package/tabs/propertyGrids/gui/textBlockPropertyGridComponent.js.map +1 -0
  310. package/tabs/propertyGrids/lockObject.d.ts +9 -0
  311. package/tabs/propertyGrids/lockObject.js +12 -0
  312. package/tabs/propertyGrids/lockObject.js.map +1 -0
@@ -0,0 +1,37 @@
1
+ export const IsFramePortData = (variableToCheck) => {
2
+ if (variableToCheck) {
3
+ return variableToCheck.port !== undefined;
4
+ }
5
+ else {
6
+ return false;
7
+ }
8
+ };
9
+ export const RefreshNode = (node, visitedNodes, visitedLinks) => {
10
+ node.refresh();
11
+ const links = node.links;
12
+ if (visitedNodes) {
13
+ // refresh first the nodes so that the right types are assigned to the auto-detect ports
14
+ links.forEach((link) => {
15
+ const nodeA = link.nodeA, nodeB = link.nodeB;
16
+ if (!visitedNodes.has(nodeA)) {
17
+ visitedNodes.add(nodeA);
18
+ RefreshNode(nodeA, visitedNodes, visitedLinks);
19
+ }
20
+ if (nodeB && !visitedNodes.has(nodeB)) {
21
+ visitedNodes.add(nodeB);
22
+ RefreshNode(nodeB, visitedNodes, visitedLinks);
23
+ }
24
+ });
25
+ }
26
+ if (!visitedLinks) {
27
+ return;
28
+ }
29
+ // then refresh the links to display the right color between ports
30
+ links.forEach((link) => {
31
+ if (!visitedLinks.has(link)) {
32
+ visitedLinks.add(link);
33
+ link.update();
34
+ }
35
+ });
36
+ };
37
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../../../dev/sharedUiComponents/src/nodeGraphSystem/tools.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,eAAoB,EAAoC,EAAE;IACtF,IAAI,eAAe,EAAE;QACjB,OAAQ,eAAiC,CAAC,IAAI,KAAK,SAAS,CAAC;KAChE;SAAM;QACH,OAAO,KAAK,CAAC;KAChB;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAe,EAAE,YAA6B,EAAE,YAA4B,EAAE,EAAE;IACxG,IAAI,CAAC,OAAO,EAAE,CAAC;IAEf,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IAEzB,IAAI,YAAY,EAAE;QACd,wFAAwF;QACxF,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACnB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EACpB,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;YAEvB,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;gBAC1B,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBACxB,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;aAClD;YAED,IAAI,KAAK,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;gBACnC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBACxB,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;aAClD;QACL,CAAC,CAAC,CAAC;KACN;IAED,IAAI,CAAC,YAAY,EAAE;QACf,OAAO;KACV;IAED,kEAAkE;IAClE,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACnB,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACzB,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACvB,IAAI,CAAC,MAAM,EAAE,CAAC;SACjB;IACL,CAAC,CAAC,CAAC;AACP,CAAC,CAAC","sourcesContent":["import type { GraphNode } from \"./graphNode\";\r\nimport type { NodeLink } from \"./nodeLink\";\r\nimport type { FramePortData } from \"./types/framePortData\";\r\n\r\nexport const IsFramePortData = (variableToCheck: any): variableToCheck is FramePortData => {\r\n if (variableToCheck) {\r\n return (variableToCheck as FramePortData).port !== undefined;\r\n } else {\r\n return false;\r\n }\r\n};\r\n\r\nexport const RefreshNode = (node: GraphNode, visitedNodes?: Set<GraphNode>, visitedLinks?: Set<NodeLink>) => {\r\n node.refresh();\r\n\r\n const links = node.links;\r\n\r\n if (visitedNodes) {\r\n // refresh first the nodes so that the right types are assigned to the auto-detect ports\r\n links.forEach((link) => {\r\n const nodeA = link.nodeA,\r\n nodeB = link.nodeB;\r\n\r\n if (!visitedNodes.has(nodeA)) {\r\n visitedNodes.add(nodeA);\r\n RefreshNode(nodeA, visitedNodes, visitedLinks);\r\n }\r\n\r\n if (nodeB && !visitedNodes.has(nodeB)) {\r\n visitedNodes.add(nodeB);\r\n RefreshNode(nodeB, visitedNodes, visitedLinks);\r\n }\r\n });\r\n }\r\n\r\n if (!visitedLinks) {\r\n return;\r\n }\r\n\r\n // then refresh the links to display the right color between ports\r\n links.forEach((link) => {\r\n if (!visitedLinks.has(link)) {\r\n visitedLinks.add(link);\r\n link.update();\r\n }\r\n });\r\n};\r\n"]}
@@ -0,0 +1,8 @@
1
+ import type { INodeContainer } from "./interfaces/nodeContainer";
2
+ import type { INodeData } from "./interfaces/nodeData";
3
+ import type { IPortData } from "./interfaces/portData";
4
+ import type { NodePort } from "./nodePort";
5
+ export declare class TypeLedger {
6
+ static PortDataBuilder: (port: NodePort, nodeContainer: INodeContainer) => IPortData;
7
+ static NodeDataBuilder: (data: any, nodeContainer: INodeContainer) => INodeData;
8
+ }
@@ -0,0 +1,3 @@
1
+ export class TypeLedger {
2
+ }
3
+ //# sourceMappingURL=typeLedger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typeLedger.js","sourceRoot":"","sources":["../../../../../dev/sharedUiComponents/src/nodeGraphSystem/typeLedger.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,UAAU;CAGtB","sourcesContent":["import type { INodeContainer } from \"./interfaces/nodeContainer\";\r\nimport type { INodeData } from \"./interfaces/nodeData\";\r\nimport type { IPortData } from \"./interfaces/portData\";\r\nimport type { NodePort } from \"./nodePort\";\r\n\r\nexport class TypeLedger {\r\n public static PortDataBuilder: (port: NodePort, nodeContainer: INodeContainer) => IPortData;\r\n public static NodeDataBuilder: (data: any, nodeContainer: INodeContainer) => INodeData;\r\n}\r\n"]}
@@ -0,0 +1,7 @@
1
+ import type { GraphFrame } from "../graphFrame";
2
+ declare type FrameNodePort = import("../frameNodePort").FrameNodePort;
3
+ export declare type FramePortData = {
4
+ frame: GraphFrame;
5
+ port: FrameNodePort;
6
+ };
7
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=framePortData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"framePortData.js","sourceRoot":"","sources":["../../../../../../dev/sharedUiComponents/src/nodeGraphSystem/types/framePortData.ts"],"names":[],"mappings":"","sourcesContent":["import type { GraphFrame } from \"../graphFrame\";\r\n\r\ndeclare type FrameNodePort = import(\"../frameNodePort\").FrameNodePort;\r\n\r\nexport type FramePortData = {\r\n frame: GraphFrame;\r\n port: FrameNodePort;\r\n};\r\n"]}
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@babylonjs/shared-ui-components",
3
+ "version": "5.28.0",
4
+ "main": "index.js",
5
+ "module": "index.js",
6
+ "types": "index.d.ts",
7
+ "files": [
8
+ "**/*.js",
9
+ "**/*.d.ts",
10
+ "**/*.map",
11
+ "readme.md",
12
+ "license.md"
13
+ ],
14
+ "scripts": {
15
+ "build": "npm run clean && npm run compile",
16
+ "clean": "rimraf dist && rimraf *.tsbuildinfo && rimraf \"./**/*.!(md|json|build.json)\"",
17
+ "compile": "tsc -b tsconfig.build.json --verbose",
18
+ "precompile": "build-tools -c process-assets --path-prefix ../../../dev/sharedUiComponents/",
19
+ "postcompile": "build-tools -c add-js-to-es6",
20
+ "prepublishOnly": "build-tools -c prepare-es6-build"
21
+ },
22
+ "devDependencies": {
23
+ "@dev/build-tools": "^1.0.0",
24
+ "@lts/gui": "1.0.0",
25
+ "@lts/core": "1.0.0",
26
+ "rimraf": "^3.0.2",
27
+ "typescript": "^4.4.4"
28
+ },
29
+ "peerDependencies": {
30
+ "@babylonjs/core": "^5.22.0",
31
+ "@babylonjs/gui": "^5.22.0",
32
+ "react": "^17.0.2",
33
+ "react-dom": "^17.0.2"
34
+ },
35
+ "keywords": [
36
+ "3D",
37
+ "javascript",
38
+ "html5",
39
+ "webgl",
40
+ "babylon.js"
41
+ ],
42
+ "license": "Apache-2.0",
43
+ "esnext": "index.js",
44
+ "type": "module",
45
+ "sideEffects": true,
46
+ "homepage": "https://www.babylonjs.com",
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "https://github.com/BabylonJS/Babylon.js.git"
50
+ },
51
+ "bugs": {
52
+ "url": "https://github.com/BabylonJS/Babylon.js/issues"
53
+ }
54
+ }
55
+
@@ -0,0 +1,7 @@
1
+ export declare class PropertyChangedEvent {
2
+ object: any;
3
+ property: string;
4
+ value: any;
5
+ initialValue: any;
6
+ allowNullValue?: boolean;
7
+ }
@@ -0,0 +1,3 @@
1
+ export class PropertyChangedEvent {
2
+ }
3
+ //# sourceMappingURL=propertyChangedEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"propertyChangedEvent.js","sourceRoot":"","sources":["../../../../dev/sharedUiComponents/src/propertyChangedEvent.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,oBAAoB;CAMhC","sourcesContent":["export class PropertyChangedEvent {\r\n public object: any;\r\n public property: string;\r\n public value: any;\r\n public initialValue: any;\r\n public allowNullValue?: boolean;\r\n}\r\n"]}
package/readme.md ADDED
@@ -0,0 +1,6 @@
1
+ Babylon.js shared ui components
2
+ =====================
3
+
4
+ This is a collection of UI components mainly used in the babylon.js toolset.
5
+
6
+ For further information please visit https://github.com/BabylonJS/Babylon.js
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import type { ButtonProps } from "../components/Button";
3
+ declare const _default: {
4
+ title: string;
5
+ component: import("react").FC<ButtonProps>;
6
+ };
7
+ export default _default;
8
+ export declare const Default: any;
9
+ export declare const Wide: any;
10
+ export declare const Small: any;
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { Button } from "../components/Button.js";
3
+ import { Icon } from "../components/Icon.js";
4
+ import resizeToFitIcon from "../imgs/resizeToFitIcon.svg";
5
+ export default {
6
+ title: "Inputs/Button",
7
+ component: Button,
8
+ };
9
+ const Template = (args) => (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("h1", { children: "Icons" }), _jsx(Button, { ...args, color: "light", title: "Foo", children: _jsx(Icon, { icon: resizeToFitIcon, color: "dark" }) }), _jsx(Button, { ...args, color: "dark", title: "Bar", children: _jsx(Icon, { icon: resizeToFitIcon, color: "light" }) })] }), _jsxs("div", { children: [_jsx("h1", { children: "Text" }), _jsx(Button, { ...args, color: "light", title: "Foo", children: "HELLO" }), _jsx(Button, { ...args, color: "dark", title: "Bar", children: "WORLD" })] })] }));
10
+ export const Default = Template.bind({});
11
+ Default.args = {};
12
+ export const Wide = Template.bind({});
13
+ Wide.args = {
14
+ size: "wide",
15
+ };
16
+ export const Small = Template.bind({});
17
+ Small.args = {
18
+ size: "small",
19
+ };
20
+ //# sourceMappingURL=Button.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Button.stories.js","sourceRoot":"","sources":["../../../../../dev/sharedUiComponents/src/stories/Button.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAE1D,eAAe;IACX,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,MAAM;CACpB,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAAiB,EAAE,EAAE,CAAC,CACpC,8BACI,0BACI,iCAAc,EACd,KAAC,MAAM,OAAK,IAAI,EAAE,KAAK,EAAC,OAAO,EAAC,KAAK,EAAC,KAAK,YACvC,KAAC,IAAI,IAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAC,MAAM,GAAG,GACvC,EACT,KAAC,MAAM,OAAK,IAAI,EAAE,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,KAAK,YACtC,KAAC,IAAI,IAAC,IAAI,EAAE,eAAe,EAAE,KAAK,EAAC,OAAO,GAAG,GACxC,IACP,EACN,0BACI,gCAAa,EACb,KAAC,MAAM,OAAK,IAAI,EAAE,KAAK,EAAC,OAAO,EAAC,KAAK,EAAC,KAAK,sBAElC,EACT,KAAC,MAAM,OAAK,IAAI,EAAE,KAAK,EAAC,MAAM,EAAC,KAAK,EAAC,KAAK,sBAEjC,IACP,IACP,CACN,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAC;AAClB,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtC,IAAI,CAAC,IAAI,GAAG;IACR,IAAI,EAAE,MAAM;CACf,CAAC;AACF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACT,IAAI,EAAE,OAAO;CAChB,CAAC","sourcesContent":["import type { ButtonProps } from \"../components/Button\";\r\nimport { Button } from \"../components/Button\";\r\n\r\nimport { Icon } from \"../components/Icon\";\r\nimport resizeToFitIcon from \"../imgs/resizeToFitIcon.svg\";\r\n\r\nexport default {\r\n title: \"Inputs/Button\",\r\n component: Button,\r\n};\r\n\r\nconst Template = (args: ButtonProps) => (\r\n <>\r\n <div>\r\n <h1>Icons</h1>\r\n <Button {...args} color=\"light\" title=\"Foo\">\r\n <Icon icon={resizeToFitIcon} color=\"dark\" />\r\n </Button>\r\n <Button {...args} color=\"dark\" title=\"Bar\">\r\n <Icon icon={resizeToFitIcon} color=\"light\" />\r\n </Button>\r\n </div>\r\n <div>\r\n <h1>Text</h1>\r\n <Button {...args} color=\"light\" title=\"Foo\">\r\n HELLO\r\n </Button>\r\n <Button {...args} color=\"dark\" title=\"Bar\">\r\n WORLD\r\n </Button>\r\n </div>\r\n </>\r\n);\r\n\r\nexport const Default = Template.bind({});\r\nDefault.args = {};\r\nexport const Wide = Template.bind({});\r\nWide.args = {\r\n size: \"wide\",\r\n};\r\nexport const Small = Template.bind({});\r\nSmall.args = {\r\n size: \"small\",\r\n};\r\n"]}
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { IconProps } from "../components/Icon";
3
+ declare const _default: {
4
+ title: string;
5
+ component: import("react").FC<IconProps>;
6
+ };
7
+ export default _default;
8
+ export declare const Light: any;
9
+ export declare const Dark: any;
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Icon } from "../components/Icon.js";
3
+ import resizeToFitIcon from "../imgs/resizeToFitIcon.svg";
4
+ export default {
5
+ title: "Layout/Icon",
6
+ component: Icon,
7
+ };
8
+ const Template = (args) => _jsx(Icon, { ...args, icon: resizeToFitIcon });
9
+ export const Light = Template.bind({});
10
+ Light.args = {
11
+ color: "light",
12
+ };
13
+ export const Dark = Template.bind({});
14
+ Dark.args = {
15
+ color: "dark",
16
+ };
17
+ //# sourceMappingURL=Icon.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icon.stories.js","sourceRoot":"","sources":["../../../../../dev/sharedUiComponents/src/stories/Icon.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE1C,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAE1D,eAAe;IACX,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,IAAI;CAClB,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAAe,EAAE,EAAE,CAAC,KAAC,IAAI,OAAK,IAAI,EAAE,IAAI,EAAE,eAAe,GAAI,CAAC;AAEhF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACT,KAAK,EAAE,OAAO;CACjB,CAAC;AACF,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtC,IAAI,CAAC,IAAI,GAAG;IACR,KAAK,EAAE,MAAM;CAChB,CAAC","sourcesContent":["import type { IconProps } from \"../components/Icon\";\r\nimport { Icon } from \"../components/Icon\";\r\n\r\nimport resizeToFitIcon from \"../imgs/resizeToFitIcon.svg\";\r\n\r\nexport default {\r\n title: \"Layout/Icon\",\r\n component: Icon,\r\n};\r\n\r\nconst Template = (args: IconProps) => <Icon {...args} icon={resizeToFitIcon} />;\r\n\r\nexport const Light = Template.bind({});\r\nLight.args = {\r\n color: \"light\",\r\n};\r\nexport const Dark = Template.bind({});\r\nDark.args = {\r\n color: \"dark\",\r\n};\r\n"]}
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import type { LabelProps } from "../components/Label";
3
+ declare const _default: {
4
+ title: string;
5
+ component: import("react").FC<LabelProps>;
6
+ };
7
+ export default _default;
8
+ export declare const Default: any;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Label } from "../components/Label.js";
3
+ import { Toggle } from "../components/Toggle.js";
4
+ export default {
5
+ title: "Layout/Label",
6
+ component: Label,
7
+ };
8
+ const Template = (args) => (_jsx(Label, { ...args, text: "Responsive:", children: _jsx(Toggle, { toggled: "off", color: args.color }) }));
9
+ export const Default = Template.bind({});
10
+ Default.args = {};
11
+ //# sourceMappingURL=Label.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.stories.js","sourceRoot":"","sources":["../../../../../dev/sharedUiComponents/src/stories/Label.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,eAAe;IACX,KAAK,EAAE,cAAc;IACrB,SAAS,EAAE,KAAK;CACnB,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAAgB,EAAE,EAAE,CAAC,CACnC,KAAC,KAAK,OAAK,IAAI,EAAE,IAAI,EAAC,aAAa,YAC/B,KAAC,MAAM,IAAC,OAAO,EAAC,KAAK,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAI,GACvC,CACX,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG,EAAE,CAAC","sourcesContent":["import type { LabelProps } from \"../components/Label\";\r\nimport { Label } from \"../components/Label\";\r\nimport { Toggle } from \"../components/Toggle\";\r\n\r\nexport default {\r\n title: \"Layout/Label\",\r\n component: Label,\r\n};\r\n\r\nconst Template = (args: LabelProps) => (\r\n <Label {...args} text=\"Responsive:\">\r\n <Toggle toggled=\"off\" color={args.color} />\r\n </Label>\r\n);\r\n\r\nexport const Default = Template.bind({});\r\nDefault.args = {};\r\n"]}
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { MessageDialogProps } from "../components/MessageDialog";
3
+ declare const _default: {
4
+ title: string;
5
+ component: import("react").FC<MessageDialogProps>;
6
+ };
7
+ export default _default;
8
+ export declare const NoError: any;
9
+ export declare const Error: any;
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { MessageDialog } from "../components/MessageDialog.js";
3
+ export default {
4
+ title: "Layout/MessageDialog",
5
+ component: MessageDialog,
6
+ };
7
+ const Template = (args) => {
8
+ return _jsx(MessageDialog, { ...args });
9
+ };
10
+ export const NoError = Template.bind({});
11
+ NoError.args = {
12
+ message: "No error",
13
+ isError: false,
14
+ };
15
+ export const Error = Template.bind({});
16
+ Error.args = {
17
+ message: "Error",
18
+ isError: true,
19
+ };
20
+ //# sourceMappingURL=MessageDialog.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageDialog.stories.js","sourceRoot":"","sources":["../../../../../dev/sharedUiComponents/src/stories/MessageDialog.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAE5D,eAAe;IACX,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,aAAa;CAC3B,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAAwB,EAAE,EAAE;IAC1C,OAAO,KAAC,aAAa,OAAK,IAAI,GAAI,CAAC;AACvC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG;IACX,OAAO,EAAE,UAAU;IACnB,OAAO,EAAE,KAAK;CACjB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACT,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,IAAI;CAChB,CAAC","sourcesContent":["import type { MessageDialogProps } from \"../components/MessageDialog\";\r\nimport { MessageDialog } from \"../components/MessageDialog\";\r\n\r\nexport default {\r\n title: \"Layout/MessageDialog\",\r\n component: MessageDialog,\r\n};\r\n\r\nconst Template = (args: MessageDialogProps) => {\r\n return <MessageDialog {...args} />;\r\n};\r\n\r\nexport const NoError = Template.bind({});\r\nNoError.args = {\r\n message: \"No error\",\r\n isError: false,\r\n};\r\n\r\nexport const Error = Template.bind({});\r\nError.args = {\r\n message: \"Error\",\r\n isError: true,\r\n};\r\n"]}
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { ToggleProps } from "../components/Toggle";
3
+ declare const _default: {
4
+ title: string;
5
+ component: import("react").FC<ToggleProps>;
6
+ };
7
+ export default _default;
8
+ export declare const Default: any;
9
+ export declare const Padded: any;
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Toggle } from "../components/Toggle.js";
3
+ export default {
4
+ title: "Inputs/Toggle",
5
+ component: Toggle,
6
+ };
7
+ const Template = (args) => _jsx(Toggle, { ...args, onToggle: () => { } });
8
+ export const Default = Template.bind({});
9
+ Default.args = {
10
+ toggled: "off",
11
+ padded: false,
12
+ };
13
+ export const Padded = Template.bind({});
14
+ Padded.args = {
15
+ toggled: "off",
16
+ padded: true,
17
+ };
18
+ //# sourceMappingURL=Toggle.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toggle.stories.js","sourceRoot":"","sources":["../../../../../dev/sharedUiComponents/src/stories/Toggle.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,eAAe;IACX,KAAK,EAAE,eAAe;IACtB,SAAS,EAAE,MAAM;CACpB,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAAiB,EAAE,EAAE,CAAC,KAAC,MAAM,OAAK,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC,GAAI,CAAC;AAEjF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG;IACX,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,KAAK;CAChB,CAAC;AACF,MAAM,CAAC,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxC,MAAM,CAAC,IAAI,GAAG;IACV,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,IAAI;CACf,CAAC","sourcesContent":["import type { ToggleProps } from \"../components/Toggle\";\r\nimport { Toggle } from \"../components/Toggle\";\r\n\r\nexport default {\r\n title: \"Inputs/Toggle\",\r\n component: Toggle,\r\n};\r\n\r\nconst Template = (args: ToggleProps) => <Toggle {...args} onToggle={() => {}} />;\r\n\r\nexport const Default = Template.bind({});\r\nDefault.args = {\r\n toggled: \"off\",\r\n padded: false,\r\n};\r\nexport const Padded = Template.bind({});\r\nPadded.args = {\r\n toggled: \"off\",\r\n padded: true,\r\n};\r\n"]}
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ component: import("react").FC<import("../../components/bars/CommandBarComponent").ICommandBarComponentProps>;
4
+ };
5
+ export default _default;
6
+ export declare const Default: {};
7
+ export declare const WithArtboardColor: {
8
+ parameters: {
9
+ onArtboardColorChanged: (color: string) => void;
10
+ };
11
+ };
@@ -0,0 +1,13 @@
1
+ import { CommandBarComponent } from "../../components/bars/CommandBarComponent.js";
2
+ export default { component: CommandBarComponent };
3
+ // Default rendering function.
4
+ export const Default = {};
5
+ const artBoardColorChange = (color) => {
6
+ console.log("new color", color);
7
+ };
8
+ // With Artboard color
9
+ export const WithArtboardColor = {
10
+ ...Default,
11
+ parameters: { onArtboardColorChanged: artBoardColorChange },
12
+ };
13
+ //# sourceMappingURL=CommandBarComponent.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandBarComponent.stories.js","sourceRoot":"","sources":["../../../../../../dev/sharedUiComponents/src/stories/bars/CommandBarComponent.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,eAAe,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;AAElD,8BAA8B;AAC9B,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC;AAE1B,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAE,EAAE;IAC1C,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF,sBAAsB;AACtB,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC7B,GAAG,OAAO;IACV,UAAU,EAAE,EAAE,sBAAsB,EAAE,mBAAmB,EAAE;CAC9D,CAAC","sourcesContent":["import { CommandBarComponent } from \"../../components/bars/CommandBarComponent\";\r\n\r\nexport default { component: CommandBarComponent };\r\n\r\n// Default rendering function.\r\nexport const Default = {};\r\n\r\nconst artBoardColorChange = (color: string) => {\r\n console.log(\"new color\", color);\r\n};\r\n\r\n// With Artboard color\r\nexport const WithArtboardColor = {\r\n ...Default,\r\n parameters: { onArtboardColorChanged: artBoardColorChange },\r\n};\r\n"]}
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ component: import("react").FC<import("../../components/bars/CommandButtonComponent").ICommandButtonComponentProps>;
4
+ };
5
+ export default _default;
6
+ export declare const Default: {};
@@ -0,0 +1,7 @@
1
+ import { CommandButtonComponent } from "../../components/bars/CommandButtonComponent.js";
2
+ export default {
3
+ component: CommandButtonComponent,
4
+ };
5
+ // Default rendering function
6
+ export const Default = {};
7
+ //# sourceMappingURL=CommandButtonComponent.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandButtonComponent.stories.js","sourceRoot":"","sources":["../../../../../../dev/sharedUiComponents/src/stories/bars/CommandButtonComponent.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAEtF,eAAe;IACX,SAAS,EAAE,sBAAsB;CACpC,CAAC;AAEF,6BAA6B;AAC7B,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC","sourcesContent":["import { CommandButtonComponent } from \"../../components/bars/CommandButtonComponent\";\r\n\r\nexport default {\r\n component: CommandButtonComponent,\r\n};\r\n\r\n// Default rendering function\r\nexport const Default = {};\r\n"]}
@@ -0,0 +1,11 @@
1
+ import { Color3 } from "@babylonjs/core/Maths/math.color.js";
2
+ import { ColorPicker } from "../../components/colorPicker/ColorPicker";
3
+ declare const _default: {
4
+ component: typeof ColorPicker;
5
+ };
6
+ export default _default;
7
+ export declare const Default: {
8
+ args: {
9
+ color: Color3;
10
+ };
11
+ };
@@ -0,0 +1,5 @@
1
+ import { Color3 } from "@babylonjs/core/Maths/math.color.js";
2
+ import { ColorPicker } from "../../components/colorPicker/ColorPicker.js";
3
+ export default { component: ColorPicker };
4
+ export const Default = { args: { color: new Color3(1, 0, 0) } };
5
+ //# sourceMappingURL=ColorPicker.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorPicker.stories.js","sourceRoot":"","sources":["../../../../../../dev/sharedUiComponents/src/stories/colorPicker/ColorPicker.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,4CAA8B;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAEvE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;AAE1C,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC","sourcesContent":["import { Color3 } from \"core/Maths/math.color\";\r\nimport { ColorPicker } from \"../../components/colorPicker/ColorPicker\";\r\n\r\nexport default { component: ColorPicker };\r\n\r\nexport const Default = { args: { color: new Color3(1, 0, 0) } };\r\n"]}
@@ -0,0 +1,21 @@
1
+ /// <reference types="react" />
2
+ import { Observable } from "@babylonjs/core/Misc/observable.js";
3
+ import type { PropertyChangedEvent } from "../../propertyChangedEvent";
4
+ import type { IColorLineComponentProps } from "../../components/lines/ColorLineComponent";
5
+ import { ColorLineComponent } from "../../components/lines/ColorLineComponent";
6
+ declare const _default: {
7
+ component: typeof ColorLineComponent;
8
+ };
9
+ export default _default;
10
+ export declare const Default: {
11
+ render: (args: IColorLineComponentProps) => JSX.Element;
12
+ args: {
13
+ target: {};
14
+ label: string;
15
+ propertyName: string;
16
+ lockObject: {
17
+ lock: boolean;
18
+ };
19
+ onPropertyChangedObservable: Observable<PropertyChangedEvent>;
20
+ };
21
+ };
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Observable } from "@babylonjs/core/Misc/observable.js";
3
+ import { ColorLineComponent } from "../../components/lines/ColorLineComponent.js";
4
+ export default { component: ColorLineComponent };
5
+ const propertyChangedObservable = new Observable();
6
+ export const Default = {
7
+ render: (args) => (_jsx("div", { style: { width: "100%", display: "flex", justifyContent: "center" }, children: _jsx(ColorLineComponent, { ...args }) })),
8
+ args: { target: {}, label: "test", propertyName: "test", lockObject: { lock: false }, onPropertyChangedObservable: propertyChangedObservable },
9
+ };
10
+ //# sourceMappingURL=ColorLineComponent.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorLineComponent.stories.js","sourceRoot":"","sources":["../../../../../../dev/sharedUiComponents/src/stories/lines/ColorLineComponent.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,2CAA6B;AAGlD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAE/E,eAAe,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;AAEjD,MAAM,yBAAyB,GAAG,IAAI,UAAU,EAAwB,CAAC;AAEzE,MAAM,CAAC,MAAM,OAAO,GAAG;IACnB,MAAM,EAAE,CAAC,IAA8B,EAAE,EAAE,CAAC,CACxC,cAAK,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,YACpE,KAAC,kBAAkB,OAAK,IAAI,GAAI,GAC9B,CACT;IACD,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,2BAA2B,EAAE,yBAAyB,EAAE;CACjJ,CAAC","sourcesContent":["import { Observable } from \"core/Misc/observable\";\r\nimport type { PropertyChangedEvent } from \"../../propertyChangedEvent\";\r\nimport type { IColorLineComponentProps } from \"../../components/lines/ColorLineComponent\";\r\nimport { ColorLineComponent } from \"../../components/lines/ColorLineComponent\";\r\n\r\nexport default { component: ColorLineComponent };\r\n\r\nconst propertyChangedObservable = new Observable<PropertyChangedEvent>();\r\n\r\nexport const Default = {\r\n render: (args: IColorLineComponentProps) => (\r\n <div style={{ width: \"100%\", display: \"flex\", justifyContent: \"center\" }}>\r\n <ColorLineComponent {...args} />\r\n </div>\r\n ),\r\n args: { target: {}, label: \"test\", propertyName: \"test\", lockObject: { lock: false }, onPropertyChangedObservable: propertyChangedObservable },\r\n};\r\n"]}
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import { Color3 } from "@babylonjs/core/Maths/math.color.js";
3
+ import type { IColorPickerComponentProps } from "../../components/lines/ColorPickerLineComponent";
4
+ import { ColorPickerLineComponent } from "../../components/lines/ColorPickerLineComponent";
5
+ declare const _default: {
6
+ component: typeof ColorPickerLineComponent;
7
+ };
8
+ export default _default;
9
+ export declare const Default: {
10
+ render: (args: IColorPickerComponentProps) => JSX.Element;
11
+ args: {
12
+ value: Color3;
13
+ };
14
+ };
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Color3 } from "@babylonjs/core/Maths/math.color.js";
3
+ import { ColorPickerLineComponent } from "../../components/lines/ColorPickerLineComponent.js";
4
+ export default {
5
+ component: ColorPickerLineComponent,
6
+ };
7
+ export const Default = {
8
+ render: (args) => (_jsx("div", { style: { width: "100%", display: "flex", justifyContent: "center" }, children: _jsx(ColorPickerLineComponent, { ...args }) })),
9
+ args: { value: new Color3(1, 0, 0) },
10
+ };
11
+ //# sourceMappingURL=ColorPickerLineComponent.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorPickerLineComponent.stories.js","sourceRoot":"","sources":["../../../../../../dev/sharedUiComponents/src/stories/lines/ColorPickerLineComponent.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,4CAA8B;AAE/C,OAAO,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAE3F,eAAe;IACX,SAAS,EAAE,wBAAwB;CACtC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG;IACnB,MAAM,EAAE,CAAC,IAAgC,EAAE,EAAE,CAAC,CAC1C,cAAK,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,YACpE,KAAC,wBAAwB,OAAK,IAAI,GAAI,GACpC,CACT;IACD,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE;CACvC,CAAC","sourcesContent":["import { Color3 } from \"core/Maths/math.color\";\r\nimport type { IColorPickerComponentProps } from \"../../components/lines/ColorPickerLineComponent\";\r\nimport { ColorPickerLineComponent } from \"../../components/lines/ColorPickerLineComponent\";\r\n\r\nexport default {\r\n component: ColorPickerLineComponent,\r\n};\r\n\r\nexport const Default = {\r\n render: (args: IColorPickerComponentProps) => (\r\n <div style={{ width: \"100%\", display: \"flex\", justifyContent: \"center\" }}>\r\n <ColorPickerLineComponent {...args} />\r\n </div>\r\n ),\r\n args: { value: new Color3(1, 0, 0) },\r\n};\r\n"]}
@@ -0,0 +1,6 @@
1
+ import { FileButtonLineComponent } from "../../components/lines/FileButtonLineComponent";
2
+ declare const _default: {
3
+ component: typeof FileButtonLineComponent;
4
+ };
5
+ export default _default;
6
+ export declare const Default: {};
@@ -0,0 +1,6 @@
1
+ import { FileButtonLineComponent } from "../../components/lines/FileButtonLineComponent.js";
2
+ export default {
3
+ component: FileButtonLineComponent,
4
+ };
5
+ export const Default = {};
6
+ //# sourceMappingURL=FileButtonLineComponent.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileButtonLineComponent.stories.js","sourceRoot":"","sources":["../../../../../../dev/sharedUiComponents/src/stories/lines/FileButtonLineComponent.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AAEzF,eAAe;IACX,SAAS,EAAE,uBAAuB;CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC","sourcesContent":["import { FileButtonLineComponent } from \"../../components/lines/FileButtonLineComponent\";\r\n\r\nexport default {\r\n component: FileButtonLineComponent,\r\n};\r\n\r\nexport const Default = {};\r\n"]}
@@ -0,0 +1,11 @@
1
+ import { NumericInputComponent } from "../../components/lines/NumericInputComponent";
2
+ declare const _default: {
3
+ component: typeof NumericInputComponent;
4
+ };
5
+ export default _default;
6
+ export declare const Default: {
7
+ args: {
8
+ label: string;
9
+ value: number;
10
+ };
11
+ };
@@ -0,0 +1,6 @@
1
+ import { NumericInputComponent } from "../../components/lines/NumericInputComponent.js";
2
+ export default { component: NumericInputComponent };
3
+ export const Default = {
4
+ args: { label: "test", value: 1 },
5
+ };
6
+ //# sourceMappingURL=NumericInputComponent.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NumericInputComponent.stories.js","sourceRoot":"","sources":["../../../../../../dev/sharedUiComponents/src/stories/lines/NumericInputComponent.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAErF,eAAe,EAAE,SAAS,EAAE,qBAAqB,EAAE,CAAC;AAEpD,MAAM,CAAC,MAAM,OAAO,GAAG;IACnB,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE;CACpC,CAAC","sourcesContent":["import { NumericInputComponent } from \"../../components/lines/NumericInputComponent\";\r\n\r\nexport default { component: NumericInputComponent };\r\n\r\nexport const Default = {\r\n args: { label: \"test\", value: 1 },\r\n};\r\n"]}
@@ -0,0 +1,11 @@
1
+ export declare class StringTools {
2
+ private static _SaveAs;
3
+ private static _Click;
4
+ /**
5
+ * Download a string into a file that will be saved locally by the browser
6
+ * @param document
7
+ * @param content defines the string to download locally as a file
8
+ * @param filename
9
+ */
10
+ static DownloadAsFile(document: HTMLDocument, content: string, filename: string): void;
11
+ }