@babylonjs/inspector 9.0.0 → 9.1.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 (278) hide show
  1. package/lib/components/curveEditor/bottomBar/rangeSelector.d.ts +6 -0
  2. package/lib/components/curveEditor/bottomBar.d.ts +6 -0
  3. package/lib/components/curveEditor/canvas/canvas.d.ts +6 -0
  4. package/lib/components/curveEditor/canvas/curve.d.ts +14 -0
  5. package/lib/components/curveEditor/canvas/curveData.d.ts +40 -0
  6. package/lib/components/curveEditor/canvas/frameBar.d.ts +12 -0
  7. package/lib/components/curveEditor/canvas/graph.d.ts +11 -0
  8. package/lib/components/curveEditor/canvas/keyPoint.d.ts +34 -0
  9. package/lib/components/curveEditor/canvas/playHead.d.ts +12 -0
  10. package/lib/components/curveEditor/canvas/rangeFrameBar.d.ts +10 -0
  11. package/lib/components/curveEditor/curveEditor.d.ts +29 -0
  12. package/lib/components/curveEditor/curveEditorButton.d.ts +31 -0
  13. package/lib/components/curveEditor/curveEditorColors.d.ts +56 -0
  14. package/lib/components/curveEditor/curveEditorContext.d.ts +267 -0
  15. package/lib/components/curveEditor/rangeSelector.d.ts +6 -0
  16. package/lib/components/curveEditor/sideBar/addAnimationPanel.d.ts +10 -0
  17. package/lib/components/curveEditor/sideBar/animationList.d.ts +6 -0
  18. package/lib/components/curveEditor/sideBar/editAnimationPanel.d.ts +12 -0
  19. package/lib/components/curveEditor/sideBar/loadAnimationPanel.d.ts +10 -0
  20. package/lib/components/curveEditor/sideBar/saveAnimationPanel.d.ts +10 -0
  21. package/lib/components/curveEditor/sideBar.d.ts +6 -0
  22. package/lib/components/curveEditor/topBar.d.ts +6 -0
  23. package/lib/components/debug/debugPane.d.ts +6 -0
  24. package/lib/components/errorBoundary.d.ts +31 -0
  25. package/lib/components/extensibleAccordion.d.ts +67 -0
  26. package/lib/components/gizmoToolbar.d.ts +7 -0
  27. package/lib/components/pane.d.ts +4 -0
  28. package/lib/components/performanceViewer/canvasGraph.d.ts +16 -0
  29. package/lib/components/performanceViewer/canvasGraphService.d.ts +238 -0
  30. package/lib/components/performanceViewer/graphSupportingTypes.d.ts +90 -0
  31. package/lib/components/performanceViewer/performanceSidebar.d.ts +10 -0
  32. package/lib/components/performanceViewer/performanceViewer.d.ts +15 -0
  33. package/lib/components/pickingToolbar.d.ts +11 -0
  34. package/lib/components/properties/animation/animationGroupProperties.d.ts +8 -0
  35. package/lib/components/properties/animation/animationsProperties.d.ts +21 -0
  36. package/lib/components/properties/animation/targetedAnimationProperties.d.ts +7 -0
  37. package/lib/components/properties/atmosphereProperties.d.ts +20 -0
  38. package/lib/components/properties/audio/soundProperties.d.ts +8 -0
  39. package/lib/components/properties/boundProperty.d.ts +80 -0
  40. package/lib/components/properties/cameras/arcRotateCameraProperties.d.ts +17 -0
  41. package/lib/components/properties/cameras/cameraProperties.d.ts +10 -0
  42. package/lib/components/properties/cameras/followCameraProperties.d.ts +8 -0
  43. package/lib/components/properties/cameras/freeCameraProperties.d.ts +11 -0
  44. package/lib/components/properties/cameras/geospatialCameraProperties.d.ts +11 -0
  45. package/lib/components/properties/cameras/targetCameraProperties.d.ts +8 -0
  46. package/lib/components/properties/commonGeneralProperties.d.ts +16 -0
  47. package/lib/components/properties/frameGraph/frameGraphProperties.d.ts +8 -0
  48. package/lib/components/properties/generateCopyString.d.ts +7 -0
  49. package/lib/components/properties/lights/areaLightProperties.d.ts +5 -0
  50. package/lib/components/properties/lights/clusteredLightContainerProperties.d.ts +10 -0
  51. package/lib/components/properties/lights/directionalLightProperties.d.ts +8 -0
  52. package/lib/components/properties/lights/hemisphericLightProperties.d.ts +5 -0
  53. package/lib/components/properties/lights/lightProperties.d.ts +7 -0
  54. package/lib/components/properties/lights/pointLightProperties.d.ts +5 -0
  55. package/lib/components/properties/lights/shadowGeneratorProperties.d.ts +6 -0
  56. package/lib/components/properties/lights/shadowLightProperties.d.ts +5 -0
  57. package/lib/components/properties/lights/spotLightProperties.d.ts +5 -0
  58. package/lib/components/properties/linkToEntityPropertyLine.d.ts +27 -0
  59. package/lib/components/properties/materials/materialProperties.d.ts +11 -0
  60. package/lib/components/properties/materials/multiMaterialProperties.d.ts +7 -0
  61. package/lib/components/properties/materials/nodeMaterialProperties.d.ts +8 -0
  62. package/lib/components/properties/materials/normalMapProperties.d.ts +19 -0
  63. package/lib/components/properties/materials/openpbrMaterialProperties.d.ts +61 -0
  64. package/lib/components/properties/materials/pbrBaseMaterialProperties.d.ts +285 -0
  65. package/lib/components/properties/materials/skyMaterialProperties.d.ts +5 -0
  66. package/lib/components/properties/materials/standardMaterialProperties.d.ts +29 -0
  67. package/lib/components/properties/metadataProperties.d.ts +12 -0
  68. package/lib/components/properties/nodes/abstractMeshProperties.d.ts +27 -0
  69. package/lib/components/properties/nodes/gaussianSplattingProperties.d.ts +5 -0
  70. package/lib/components/properties/nodes/meshProperties.d.ts +11 -0
  71. package/lib/components/properties/nodes/nodeProperties.d.ts +7 -0
  72. package/lib/components/properties/particles/attractor.d.ts +23 -0
  73. package/lib/components/properties/particles/attractorAdapter.d.ts +56 -0
  74. package/lib/components/properties/particles/attractorList.d.ts +15 -0
  75. package/lib/components/properties/particles/attractorProperties.d.ts +11 -0
  76. package/lib/components/properties/particles/colorProperties.d.ts +11 -0
  77. package/lib/components/properties/particles/commandsProperties.d.ts +13 -0
  78. package/lib/components/properties/particles/emissionProperties.d.ts +11 -0
  79. package/lib/components/properties/particles/emitterProperties.d.ts +13 -0
  80. package/lib/components/properties/particles/lifetimeProperties.d.ts +11 -0
  81. package/lib/components/properties/particles/nodeEditorProperties.d.ts +12 -0
  82. package/lib/components/properties/particles/rotationProperties.d.ts +11 -0
  83. package/lib/components/properties/particles/sizeProperties.d.ts +11 -0
  84. package/lib/components/properties/particles/spritesheetProperties.d.ts +11 -0
  85. package/lib/components/properties/particles/systemProperties.d.ts +13 -0
  86. package/lib/components/properties/physics/physicsProperties.d.ts +6 -0
  87. package/lib/components/properties/postProcesses/postProcessProperties.d.ts +10 -0
  88. package/lib/components/properties/propertiesPane.d.ts +2 -0
  89. package/lib/components/properties/renderingPipelines/defaultRenderingPipelineProperties.d.ts +23 -0
  90. package/lib/components/properties/renderingPipelines/iblShadowsRenderPipelineProperties.d.ts +11 -0
  91. package/lib/components/properties/renderingPipelines/lensRenderingPipelineProperties.d.ts +8 -0
  92. package/lib/components/properties/renderingPipelines/postProcessRenderPipelineProperties.d.ts +5 -0
  93. package/lib/components/properties/renderingPipelines/ssao2RenderingPipelineProperties.d.ts +8 -0
  94. package/lib/components/properties/renderingPipelines/ssaoRenderingPipelineProperties.d.ts +5 -0
  95. package/lib/components/properties/renderingPipelines/ssrRenderingPipelineProperties.d.ts +17 -0
  96. package/lib/components/properties/skeleton/boneProperties.d.ts +7 -0
  97. package/lib/components/properties/skeleton/skeletonProperties.d.ts +8 -0
  98. package/lib/components/properties/sprites/spriteManagerProperties.d.ts +25 -0
  99. package/lib/components/properties/sprites/spriteProperties.d.ts +19 -0
  100. package/lib/components/properties/textures/advancedDynamicTextureProperties.d.ts +11 -0
  101. package/lib/components/properties/textures/baseTextureProperties.d.ts +16 -0
  102. package/lib/components/properties/textures/cubeTextureProperties.d.ts +5 -0
  103. package/lib/components/properties/textures/multiRenderTargetProperties.d.ts +5 -0
  104. package/lib/components/properties/textures/renderTargetTextureProperties.d.ts +5 -0
  105. package/lib/components/properties/textures/textureFormatUtils.d.ts +48 -0
  106. package/lib/components/properties/textures/texturePreview.d.ts +17 -0
  107. package/lib/components/properties/textures/textureProperties.d.ts +11 -0
  108. package/lib/components/properties/textures/thinTextureProperties.d.ts +8 -0
  109. package/lib/components/properties/transformProperties.d.ts +11 -0
  110. package/lib/components/scene/sceneExplorer.d.ts +182 -0
  111. package/lib/components/scene/sceneExplorerDragDrop.d.ts +38 -0
  112. package/lib/components/scene/sceneProperties.d.ts +19 -0
  113. package/lib/components/stats/countStats.d.ts +5 -0
  114. package/lib/components/stats/frameStepStats.d.ts +8 -0
  115. package/lib/components/stats/performanceStats.d.ts +6 -0
  116. package/lib/components/stats/statsPane.d.ts +3 -0
  117. package/lib/components/stats/systemStats.d.ts +5 -0
  118. package/lib/components/teachingMoment.d.ts +20 -0
  119. package/lib/components/textureEditor/canvasManager.d.ts +113 -0
  120. package/lib/components/textureEditor/canvasShader.d.ts +10 -0
  121. package/lib/components/textureEditor/channels.d.ts +25 -0
  122. package/lib/components/textureEditor/properties.d.ts +23 -0
  123. package/lib/components/textureEditor/status.d.ts +13 -0
  124. package/lib/components/textureEditor/textureEditor.d.ts +113 -0
  125. package/lib/components/textureEditor/tools.d.ts +20 -0
  126. package/lib/components/theme.d.ts +10 -0
  127. package/lib/components/tools/capture/equirectangularCaptureTool.d.ts +5 -0
  128. package/lib/components/tools/capture/gifCaptureTool.d.ts +7 -0
  129. package/lib/components/tools/capture/sceneReplayTool.d.ts +5 -0
  130. package/lib/components/tools/capture/screenshotTool.d.ts +5 -0
  131. package/lib/components/tools/capture/videoCaptureTool.d.ts +5 -0
  132. package/lib/components/tools/exportTools.d.ts +11 -0
  133. package/lib/components/tools/import/gltfAnimationImportTool.d.ts +5 -0
  134. package/lib/components/tools/import/gltfLoaderOptionsTool.d.ts +8 -0
  135. package/lib/components/tools/import/gltfValidationTool.d.ts +5 -0
  136. package/lib/components/tools/reflectorTools.d.ts +5 -0
  137. package/lib/components/tools/toolsPane.d.ts +3 -0
  138. package/lib/components/uxContextProvider.d.ts +2 -0
  139. package/lib/contexts/extensionManagerContext.d.ts +6 -0
  140. package/lib/contexts/propertyContext.d.ts +30 -0
  141. package/lib/contexts/settingsContext.d.ts +3 -0
  142. package/lib/contexts/watcherContext.d.ts +3 -0
  143. package/lib/extensibility/builtInsExtensionFeed.d.ts +21 -0
  144. package/lib/extensibility/defaultInspectorExtensionFeed.d.ts +5 -0
  145. package/lib/extensibility/extensionFeed.d.ts +113 -0
  146. package/lib/extensibility/extensionManager.d.ts +111 -0
  147. package/lib/extensions/quickCreate/cameras.d.ts +14 -0
  148. package/lib/extensions/quickCreate/frameGraphs.d.ts +14 -0
  149. package/lib/extensions/quickCreate/lights.d.ts +14 -0
  150. package/lib/extensions/quickCreate/materials.d.ts +14 -0
  151. package/lib/extensions/quickCreate/meshes.d.ts +10 -0
  152. package/lib/extensions/quickCreate/particles.d.ts +15 -0
  153. package/lib/extensions/quickCreate/quickCreateLayout.d.ts +44 -0
  154. package/lib/extensions/quickCreate/quickCreateToolsService.d.ts +11 -0
  155. package/lib/extensions/quickCreate/renderingPipelines.d.ts +14 -0
  156. package/lib/extensions/quickCreate/settingsPopover.d.ts +14 -0
  157. package/lib/extensions/quickCreate/spriteManagers.d.ts +14 -0
  158. package/lib/{extensionsListService-zYdKn8uM.js → extensionsListService-BmiNjZiw.js} +7 -7
  159. package/lib/extensionsListService-BmiNjZiw.js.map +1 -0
  160. package/lib/hooks/compoundPropertyHooks.d.ts +24 -0
  161. package/lib/hooks/instrumentationHooks.d.ts +9 -0
  162. package/lib/hooks/observableHooks.d.ts +35 -0
  163. package/lib/hooks/pollingHooks.d.ts +7 -0
  164. package/lib/hooks/resourceHooks.d.ts +20 -0
  165. package/lib/hooks/settingsHooks.d.ts +13 -0
  166. package/lib/hooks/teachingMomentHooks.d.ts +34 -0
  167. package/lib/hooks/themeHooks.d.ts +17 -0
  168. package/lib/hooks/useObservableArray.d.ts +11 -0
  169. package/lib/hooks/useResizeHandle.d.ts +35 -0
  170. package/lib/{index-DuVF9zYN.js → index-BCbXjPTn.js} +791 -758
  171. package/lib/index-BCbXjPTn.js.map +1 -0
  172. package/lib/index.d.ts +108 -74767
  173. package/lib/index.js +5 -5
  174. package/lib/inspector.d.ts +41 -0
  175. package/lib/instrumentation/functionInstrumentation.d.ts +20 -0
  176. package/lib/instrumentation/propertyInstrumentation.d.ts +33 -0
  177. package/lib/legacy/debugLayer.d.ts +24 -0
  178. package/lib/legacy/inspectableCustomPropertiesService.d.ts +3 -0
  179. package/lib/legacy/inspector.d.ts +39 -0
  180. package/lib/legacy/legacy.d.ts +9 -0
  181. package/lib/legacy/propertiesSectionMapping.d.ts +99 -0
  182. package/lib/misc/arrayUtils.d.ts +4 -0
  183. package/lib/misc/assert.d.ts +5 -0
  184. package/lib/misc/graphUtils.d.ts +44 -0
  185. package/lib/misc/nodeGeometryEditor.d.ts +3 -0
  186. package/lib/misc/nodeMaterialEditor.d.ts +2 -0
  187. package/lib/misc/nodeParticleEditor.d.ts +2 -0
  188. package/lib/misc/nodeRenderGraphEditor.d.ts +2 -0
  189. package/lib/misc/observableCollection.d.ts +23 -0
  190. package/lib/misc/snippetUtils.d.ts +74 -0
  191. package/lib/misc/textureTools.d.ts +34 -0
  192. package/lib/modularTool.d.ts +37 -0
  193. package/lib/modularity/serviceContainer.d.ts +41 -0
  194. package/lib/modularity/serviceDefinition.d.ts +64 -0
  195. package/lib/{quickCreateToolsService-BtsSLeMY.js → quickCreateToolsService-BoqrJqoM.js} +6 -6
  196. package/lib/quickCreateToolsService-BoqrJqoM.js.map +1 -0
  197. package/lib/{reflectorService-Bzs-Ykos.js → reflectorService-CFTva2GG.js} +6 -6
  198. package/lib/reflectorService-CFTva2GG.js.map +1 -0
  199. package/lib/services/defaultToolbarMetadata.d.ts +5 -0
  200. package/lib/services/extensionsListService.d.ts +3 -0
  201. package/lib/services/gizmoService.d.ts +84 -0
  202. package/lib/services/gizmoToolbarService.d.ts +5 -0
  203. package/lib/services/globalSettings.d.ts +5 -0
  204. package/lib/services/highlightService.d.ts +8 -0
  205. package/lib/services/miniStatsService.d.ts +4 -0
  206. package/lib/services/panes/debugService.d.ts +25 -0
  207. package/lib/services/panes/properties/animationGroupPropertiesService.d.ts +4 -0
  208. package/lib/services/panes/properties/animationPropertiesService.d.ts +5 -0
  209. package/lib/services/panes/properties/atmospherePropertiesService.d.ts +5 -0
  210. package/lib/services/panes/properties/audioPropertiesService.d.ts +3 -0
  211. package/lib/services/panes/properties/cameraPropertiesService.d.ts +7 -0
  212. package/lib/services/panes/properties/commonPropertiesService.d.ts +3 -0
  213. package/lib/services/panes/properties/effectLayerPropertiesService.d.ts +3 -0
  214. package/lib/services/panes/properties/frameGraphPropertiesService.d.ts +3 -0
  215. package/lib/services/panes/properties/lightPropertiesServices.d.ts +4 -0
  216. package/lib/services/panes/properties/materialPropertiesService.d.ts +4 -0
  217. package/lib/services/panes/properties/metadataPropertiesService.d.ts +3 -0
  218. package/lib/services/panes/properties/nodePropertiesService.d.ts +4 -0
  219. package/lib/services/panes/properties/particleSystemPropertiesService.d.ts +4 -0
  220. package/lib/services/panes/properties/physicsPropertiesService.d.ts +3 -0
  221. package/lib/services/panes/properties/postProcessPropertiesService.d.ts +3 -0
  222. package/lib/services/panes/properties/propertiesService.d.ts +53 -0
  223. package/lib/services/panes/properties/renderingPipelinePropertiesService.d.ts +3 -0
  224. package/lib/services/panes/properties/scenePropertiesService.d.ts +4 -0
  225. package/lib/services/panes/properties/skeletonPropertiesService.d.ts +4 -0
  226. package/lib/services/panes/properties/spritePropertiesService.d.ts +4 -0
  227. package/lib/services/panes/properties/texturePropertiesService.d.ts +4 -0
  228. package/lib/services/panes/properties/transformPropertiesService.d.ts +3 -0
  229. package/lib/services/panes/scene/animationGroupExplorerService.d.ts +5 -0
  230. package/lib/services/panes/scene/atmosphereExplorerService.d.ts +5 -0
  231. package/lib/services/panes/scene/defaultSectionsMetadata.d.ts +33 -0
  232. package/lib/services/panes/scene/disposableCommandService.d.ts +4 -0
  233. package/lib/services/panes/scene/effectLayersExplorerService.d.ts +5 -0
  234. package/lib/services/panes/scene/frameGraphExplorerService.d.ts +5 -0
  235. package/lib/services/panes/scene/guiExplorerService.d.ts +5 -0
  236. package/lib/services/panes/scene/materialExplorerService.d.ts +5 -0
  237. package/lib/services/panes/scene/nodeExplorerService.d.ts +7 -0
  238. package/lib/services/panes/scene/particleSystemExplorerService.d.ts +5 -0
  239. package/lib/services/panes/scene/postProcessExplorerService.d.ts +5 -0
  240. package/lib/services/panes/scene/renderingPipelinesExplorerService.d.ts +5 -0
  241. package/lib/services/panes/scene/sceneExplorerService.d.ts +34 -0
  242. package/lib/services/panes/scene/skeletonExplorerService.d.ts +5 -0
  243. package/lib/services/panes/scene/soundExplorerService.d.ts +5 -0
  244. package/lib/services/panes/scene/spriteManagerExplorerService.d.ts +6 -0
  245. package/lib/services/panes/scene/texturesExplorerService.d.ts +5 -0
  246. package/lib/services/panes/settingsService.d.ts +25 -0
  247. package/lib/services/panes/statsService.d.ts +28 -0
  248. package/lib/services/panes/tools/captureService.d.ts +3 -0
  249. package/lib/services/panes/tools/exportService.d.ts +3 -0
  250. package/lib/services/panes/tools/import/gltfAnimationImportService.d.ts +3 -0
  251. package/lib/services/panes/tools/import/gltfLoaderOptionsDefaults.d.ts +46 -0
  252. package/lib/services/panes/tools/import/gltfLoaderOptionsService.d.ts +4 -0
  253. package/lib/services/panes/tools/import/gltfValidationService.d.ts +3 -0
  254. package/lib/services/panes/tools/reflectorService.d.ts +7 -0
  255. package/lib/services/panes/toolsService.d.ts +29 -0
  256. package/lib/services/pickingService.d.ts +7 -0
  257. package/lib/services/reactContextService.d.ts +18 -0
  258. package/lib/services/sceneContext.d.ts +19 -0
  259. package/lib/services/selectionService.d.ts +24 -0
  260. package/lib/services/settingsStore.d.ts +55 -0
  261. package/lib/services/shellService.d.ts +256 -0
  262. package/lib/services/shellSettingsService.d.ts +3 -0
  263. package/lib/services/textureEditor/textureEditorService.d.ts +21 -0
  264. package/lib/services/textureEditor/tools/contrast.d.ts +2 -0
  265. package/lib/services/textureEditor/tools/eyedropper.d.ts +5 -0
  266. package/lib/services/textureEditor/tools/floodfill.d.ts +5 -0
  267. package/lib/services/textureEditor/tools/paintbrush.d.ts +2 -0
  268. package/lib/services/textureEditor/tools/rectangularSelect.d.ts +5 -0
  269. package/lib/services/themeSelectorService.d.ts +3 -0
  270. package/lib/services/themeService.d.ts +60 -0
  271. package/lib/services/userFeedbackService.d.ts +3 -0
  272. package/lib/services/watcherService.d.ts +38 -0
  273. package/lib/themes/babylonTheme.d.ts +3 -0
  274. package/package.json +2 -2
  275. package/lib/extensionsListService-zYdKn8uM.js.map +0 -1
  276. package/lib/index-DuVF9zYN.js.map +0 -1
  277. package/lib/quickCreateToolsService-BtsSLeMY.js.map +0 -1
  278. package/lib/reflectorService-Bzs-Ykos.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extensionsListService-BmiNjZiw.js","sources":["../../../../../../../../dev/inspector-v2/src/services/extensionsListService.tsx"],"sourcesContent":["import {\r\n type SelectTabData,\r\n type SelectTabEvent,\r\n Accordion,\r\n AccordionHeader,\r\n AccordionItem,\r\n AccordionPanel,\r\n AvatarGroup,\r\n AvatarGroupItem,\r\n Body1,\r\n Body1Strong,\r\n Button,\r\n Caption1,\r\n Card,\r\n CardFooter,\r\n CardHeader,\r\n CardPreview,\r\n Dialog,\r\n DialogBody,\r\n DialogContent,\r\n DialogSurface,\r\n DialogTitle,\r\n DialogTrigger,\r\n makeStyles,\r\n Persona,\r\n Popover,\r\n PopoverSurface,\r\n PopoverTrigger,\r\n PresenceBadge,\r\n Spinner,\r\n Tab,\r\n TabList,\r\n tokens,\r\n Tooltip,\r\n} from \"@fluentui/react-components\";\r\nimport { type TriggerProps } from \"@fluentui/react-utilities\";\r\nimport { type FunctionComponent, memo, useCallback, useEffect, useMemo, useState } from \"react\";\r\nimport { type PersonMetadata } from \"../extensibility/extensionFeed\";\r\nimport { type IExtension } from \"../extensibility/extensionManager\";\r\nimport { type ServiceDefinition } from \"../modularity/serviceDefinition\";\r\nimport { type IShellService, ShellServiceIdentity } from \"./shellService\";\r\n\r\nimport {\r\n AppsAddInRegular,\r\n ArrowDownloadRegular,\r\n BranchForkRegular,\r\n BugRegular,\r\n DeleteRegular,\r\n DismissRegular,\r\n LinkRegular,\r\n MailRegular,\r\n PeopleCommunityRegular,\r\n} from \"@fluentui/react-icons\";\r\nimport { Fade } from \"@fluentui/react-motion-components-preview\";\r\n\r\nimport { Logger } from \"core/Misc/logger\";\r\n\r\nimport { Link } from \"shared-ui-components/fluent/primitives/link\";\r\nimport { useExtensionManager } from \"../contexts/extensionManagerContext\";\r\n\r\nconst useStyles = makeStyles({\r\n extensionButton: {},\r\n extensionsDialogSurface: {\r\n height: \"auto\",\r\n width: \"70vw\",\r\n maxWidth: \"600px\",\r\n maxHeight: \"70vh\",\r\n backgroundColor: tokens.colorNeutralBackground2,\r\n },\r\n extensionDialogBody: {\r\n maxWidth: \"100%\",\r\n maxHeight: \"100%\",\r\n },\r\n extensionDialogContent: {\r\n marginLeft: `calc(-1 * ${tokens.spacingHorizontalM})`,\r\n marginRight: `calc(-1 * ${tokens.spacingHorizontalS})`,\r\n },\r\n extensionHeader: {},\r\n extensionItem: {},\r\n extensionCardPreview: {\r\n padding: `${tokens.spacingVerticalM} ${tokens.spacingHorizontalM}`,\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n rowGap: tokens.spacingVerticalL,\r\n },\r\n extensionIntro: {\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n columnGap: tokens.spacingHorizontalM,\r\n },\r\n extensionDescription: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n columnGap: tokens.spacingHorizontalS,\r\n },\r\n extensionButtonContainer: {\r\n marginLeft: \"auto\",\r\n alignSelf: \"flex-start\",\r\n },\r\n spinner: {\r\n animationDuration: \"1s\",\r\n animationName: {\r\n from: { opacity: 0 },\r\n to: { opacity: 1 },\r\n },\r\n },\r\n webResourceDiv: {\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n },\r\n webResourceLink: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n columnGap: tokens.spacingHorizontalS,\r\n alignItems: \"center\",\r\n },\r\n personPopoverSurfaceDiv: {\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n rowGap: tokens.spacingVerticalS,\r\n },\r\n accordionHeaderDiv: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n columnGap: tokens.spacingHorizontalS,\r\n alignItems: \"center\",\r\n },\r\n resourceDetailsDiv: {\r\n display: \"flex\",\r\n flexDirection: \"column\",\r\n rowGap: tokens.spacingVerticalS,\r\n },\r\n peopleDetailsDiv: {\r\n display: \"flex\",\r\n flexDirection: \"row\",\r\n columnGap: tokens.spacingHorizontalXL,\r\n },\r\n avatarGroupItem: {\r\n cursor: \"pointer\",\r\n },\r\n});\r\n\r\nfunction AsPersonMetadata(person: string | PersonMetadata): PersonMetadata {\r\n if (typeof person === \"string\") {\r\n return { name: person } satisfies PersonMetadata;\r\n }\r\n return person;\r\n}\r\n\r\nfunction GetAvatarImage(person: PersonMetadata): { src: string } | undefined {\r\n return person.avatar ? { src: `data:image/png;base64,${person.avatar}` } : undefined;\r\n}\r\n\r\nfunction usePeopleMetadata(people?: readonly (string | PersonMetadata | undefined)[]): PersonMetadata[] {\r\n const definedPeople = useMemo(() => (people ? people.filter((person): person is string | PersonMetadata => !!person) : []), [people]);\r\n return useMemo(() => definedPeople.map(AsPersonMetadata), [definedPeople]);\r\n}\r\n\r\nconst WebResource: FunctionComponent<{ url: string; urlDisplay?: string; icon: JSX.Element; label: string }> = (props) => {\r\n const { url, urlDisplay, icon, label } = props;\r\n const classes = useStyles();\r\n\r\n return (\r\n <div className={classes.webResourceDiv}>\r\n <Tooltip content={label} relationship=\"label\" positioning=\"before\" withArrow>\r\n <div className={classes.webResourceLink}>\r\n {icon}\r\n <Link url={url} value={urlDisplay || url} />\r\n </div>\r\n </Tooltip>\r\n </div>\r\n );\r\n};\r\n\r\nconst PersonDetailsPopover: FunctionComponent<TriggerProps & { person: PersonMetadata; title: string; disabled?: boolean }> = (props) => {\r\n const { person, title, disabled, children } = props;\r\n const classes = useStyles();\r\n\r\n if (disabled) {\r\n return <>{children}</>;\r\n }\r\n\r\n return (\r\n <Popover withArrow>\r\n <PopoverTrigger disableButtonEnhancement>{children}</PopoverTrigger>\r\n <PopoverSurface>\r\n <div className={classes.personPopoverSurfaceDiv}>\r\n <Persona name={person.name} secondaryText={title} avatar={{ image: GetAvatarImage(person) }} />\r\n {person.email && <WebResource url={`mailto:${person.email}`} urlDisplay={person.email} icon={<MailRegular />} label=\"Email\" />}\r\n {person.url && <WebResource url={person.url} urlDisplay={person.url} icon={<LinkRegular />} label=\"Website\" />}\r\n {person.forumUserName && (\r\n <WebResource\r\n url={`https://forum.babylonjs.com/u/${person.forumUserName}`}\r\n urlDisplay={person.forumUserName}\r\n icon={<PeopleCommunityRegular />}\r\n label=\"Forum\"\r\n />\r\n )}\r\n </div>\r\n </PopoverSurface>\r\n </Popover>\r\n );\r\n};\r\n\r\nconst ExtensionDetails: FunctionComponent<{ extension: IExtension }> = memo((props) => {\r\n const { extension } = props;\r\n const { metadata } = extension;\r\n\r\n const classes = useStyles();\r\n\r\n const [canInstall, setCanInstall] = useState(false);\r\n const [canUninstall, setCanUninstall] = useState(false);\r\n const [isStateChanging, setIsStateChanging] = useState(false);\r\n\r\n useEffect(() => {\r\n const updateState = () => {\r\n setCanInstall(!extension.isInstalled && !extension.isStateChanging);\r\n setCanUninstall(extension.isInstalled && !extension.isStateChanging);\r\n setIsStateChanging(extension.isStateChanging);\r\n };\r\n\r\n const stateChangedHandlerRegistration = extension.addStateChangedHandler(updateState);\r\n updateState();\r\n\r\n return stateChangedHandlerRegistration.dispose;\r\n }, [extension]);\r\n\r\n const [author] = usePeopleMetadata(useMemo(() => [metadata.author], [metadata.author]));\r\n const contributors = usePeopleMetadata(metadata.contributors);\r\n\r\n const hasResourceDetails = metadata.homepage || metadata.repository || metadata.bugs;\r\n const hasPeopleDetails = author || contributors.length > 0;\r\n const hasPreviewDetails = hasResourceDetails || hasPeopleDetails;\r\n const hasAuthorDetails = author?.email || author?.url || author?.forumUserName;\r\n const subHeader = [metadata.version ? `${metadata.version}` : null, metadata.license ? `${metadata.license}` : null].filter(Boolean).join(\" | \");\r\n\r\n const install = useCallback(async () => {\r\n try {\r\n await extension.installAsync();\r\n } catch {\r\n // Ignore errors. Other parts of the infrastructure handle them and communicate them to the user.\r\n }\r\n }, [extension]);\r\n\r\n const uninstall = useCallback(async () => {\r\n try {\r\n await extension.uninstallAsync();\r\n } catch {\r\n // Ignore errors. Other parts of the infrastructure handle them and communicate them to the user.\r\n }\r\n }, [extension]);\r\n\r\n return (\r\n <AccordionItem className={classes.extensionItem} value={extension.metadata.name}>\r\n <AccordionHeader className={classes.extensionHeader} expandIconPosition=\"end\">\r\n <div className={classes.accordionHeaderDiv}>\r\n <Body1Strong>{extension.metadata.name}</Body1Strong>\r\n <Fade visible={extension.isInstalled}>\r\n <PresenceBadge size=\"small\" />\r\n </Fade>\r\n </div>\r\n </AccordionHeader>\r\n <AccordionPanel>\r\n <Card>\r\n <CardHeader header={<Body1>{metadata.description}</Body1>} description={<Caption1 italic>{subHeader}</Caption1>} />\r\n {hasPreviewDetails && (\r\n <CardPreview className={classes.extensionCardPreview}>\r\n {hasResourceDetails && (\r\n <div className={classes.resourceDetailsDiv} style={{ display: \"flex\" }}>\r\n {metadata.homepage && <WebResource url={metadata.homepage} icon={<LinkRegular />} label=\"Website\" />}\r\n {metadata.repository && <WebResource url={metadata.repository} icon={<BranchForkRegular />} label=\"Repository\" />}\r\n {metadata.bugs && <WebResource url={metadata.bugs} icon={<BugRegular />} label=\"Report Issues\" />}\r\n </div>\r\n )}\r\n {hasPeopleDetails && (\r\n <div className={classes.peopleDetailsDiv} style={{ display: \"flex\" }}>\r\n {author && (\r\n <PersonDetailsPopover person={author} title=\"Author\" disabled={!hasAuthorDetails}>\r\n <Persona\r\n name={author.name}\r\n secondaryText=\"Author\"\r\n avatar={{ image: GetAvatarImage(author) }}\r\n style={{ cursor: hasAuthorDetails ? \"pointer\" : \"default\" }}\r\n />\r\n </PersonDetailsPopover>\r\n )}\r\n {contributors.length > 0 && (\r\n <AvatarGroup layout=\"stack\">\r\n {contributors.map((contributor) => {\r\n return (\r\n <PersonDetailsPopover key={contributor.name} person={contributor} title=\"Contributor\">\r\n <AvatarGroupItem name={contributor.name} className={classes.avatarGroupItem} image={GetAvatarImage(contributor)} />\r\n </PersonDetailsPopover>\r\n );\r\n })}\r\n </AvatarGroup>\r\n )}\r\n </div>\r\n )}\r\n </CardPreview>\r\n )}\r\n <CardFooter>\r\n {canInstall && (\r\n <Button appearance=\"primary\" size=\"small\" icon={<ArrowDownloadRegular />} onClick={install}>\r\n Get\r\n </Button>\r\n )}\r\n {canUninstall && (\r\n <Button appearance=\"secondary\" size=\"small\" icon={<DeleteRegular />} onClick={uninstall}>\r\n Remove\r\n </Button>\r\n )}\r\n {isStateChanging && <Spinner className={classes.spinner} size=\"extra-small\" />}\r\n </CardFooter>\r\n </Card>\r\n </AccordionPanel>\r\n </AccordionItem>\r\n );\r\n});\r\n\r\ntype TabValue = \"available\" | \"installed\";\r\n\r\nexport const ExtensionListServiceDefinition: ServiceDefinition<[], [IShellService]> = {\r\n friendlyName: \"ExtensionList\",\r\n consumes: [ShellServiceIdentity],\r\n factory: (shellService) => {\r\n const registration = shellService.addToolbarItem({\r\n key: \"ExtensionList\",\r\n horizontalLocation: \"right\",\r\n verticalLocation: \"top\",\r\n teachingMoment: {\r\n title: \"Extensions\",\r\n description: \"Extensions provide new optional features that can be useful to your specific task or workflow. Click this button to manage extensions.\",\r\n },\r\n order: -200,\r\n component: () => {\r\n const classes = useStyles();\r\n\r\n const [selectedTab, setSelectedTab] = useState<TabValue>(\"available\");\r\n const extensionManager = useExtensionManager();\r\n const [extensions, setExtensions] = useState<IExtension[]>([]);\r\n\r\n useEffect(() => {\r\n if (extensionManager) {\r\n const populateExtensionsAsync = async () => {\r\n const query = await extensionManager.queryExtensionsAsync(undefined, undefined, selectedTab === \"installed\");\r\n const extensions = await query.getExtensionsAsync(0, query.totalCount);\r\n setExtensions(extensions);\r\n };\r\n\r\n // eslint-disable-next-line github/no-then\r\n populateExtensionsAsync().catch((error) => {\r\n Logger.Warn(`Failed to populate extensions: ${error}`);\r\n });\r\n }\r\n }, [extensionManager, selectedTab]);\r\n\r\n return (\r\n <Dialog>\r\n <DialogTrigger disableButtonEnhancement>\r\n <Tooltip content=\"Manage Extensions\" relationship=\"label\">\r\n <Button className={classes.extensionButton} appearance=\"subtle\" icon={<AppsAddInRegular />} />\r\n </Tooltip>\r\n </DialogTrigger>\r\n <DialogSurface className={classes.extensionsDialogSurface}>\r\n <DialogBody className={classes.extensionDialogBody}>\r\n <DialogTitle\r\n action={\r\n <DialogTrigger action=\"close\">\r\n <Button appearance=\"subtle\" aria-label=\"close\" icon={<DismissRegular />} />\r\n </DialogTrigger>\r\n }\r\n >\r\n <>\r\n Extensions\r\n <TabList\r\n className={classes.extensionDialogContent}\r\n selectedValue={selectedTab}\r\n onTabSelect={(event: SelectTabEvent, data: SelectTabData) => {\r\n setSelectedTab(data.value as TabValue);\r\n }}\r\n >\r\n <Tab value={\"available\" satisfies TabValue}>Available</Tab>\r\n <Tab value={\"installed\" satisfies TabValue}>Installed</Tab>\r\n </TabList>\r\n </>\r\n </DialogTitle>\r\n <DialogContent className={classes.extensionDialogContent}>\r\n <Accordion collapsible>\r\n {extensions.map((extension) => (\r\n <ExtensionDetails key={extension.metadata.name} extension={extension} />\r\n ))}\r\n </Accordion>\r\n </DialogContent>\r\n </DialogBody>\r\n </DialogSurface>\r\n </Dialog>\r\n );\r\n },\r\n });\r\n\r\n return {\r\n dispose: () => registration.dispose(),\r\n };\r\n },\r\n};\r\n"],"names":["_jsx","_jsxs","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4DA,MAAM,SAAS,GAAG,UAAU,CAAC;AACzB,IAAA,eAAe,EAAE,EAAE;AACnB,IAAA,uBAAuB,EAAE;AACrB,QAAA,MAAM,EAAE,MAAM;AACd,QAAA,KAAK,EAAE,MAAM;AACb,QAAA,QAAQ,EAAE,OAAO;AACjB,QAAA,SAAS,EAAE,MAAM;QACjB,eAAe,EAAE,M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C,QAAA,EAAA,EAAA,QAAA,EAAA,CAAA,YAAA,EAEID,KAAC,OAAO,EAAA,EACJ,SAAS,EAAE,OAAO,CAAC,sBAAsB,EACzC,aAAa,EAAE,WAAW,EAC1B,WAAW,EAAE,CAAC,KAAqB,EAAE,IAAmB,KAAI;AACxD,wDAAA,cAAc,CAAC,IAAI,CAAC,KAAiB,CAAC;AAC1C,oDAAA,CAAC,EAAA,QAAA,EAAA,CAEDD,GAAA,CAAC,GAAG,EAAA,EAAC,KAAK,EAAE,WAA8B,EAAA,QAAA,EAAA,WAAA,EAAA,CAAiB,EAC3DA,GAAA,CAAC,GAAG,EAAA,EAAC,KAAK,EAAE,WAA8B,EAAA,QAAA,EAAA,WAAA,EAAA,CAAiB,CAAA,EAAA,CACrD,CAAA,EAAA,CACX,EAAA,CACO,EACdA,GAAA,CAAC,aAAa,EAAA,EAAC,SAAS,EAAE,OAAO,CAAC,sBAAsB,EAAA,QAAA,EACpDA,IAAC,SAAS,EAAA,EAAC,WAAW,EAAA,IAAA,EAAA,QAAA,EACjB,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,MACtBA,GAAA,CAAC,gBAAgB,IAA+B,SAAS,EAAE,SAAS,EAAA,EAA7C,SAAS,CAAC,QAAQ,CAAC,IAAI,CAA0B,CAC3E,CAAC,EAAA,CACM,EAAA,CACA,CAAA,EAAA,CACP,EAAA,CACD,CAAA,EAAA,CACX;YAEjB,CAAC;AACJ,SAAA,CAAC;QAEF,OAAO;AACH,YAAA,OAAO,EAAE,MAAM,YAAY,CAAC,OAAO,EAAE;SACxC;IACL,CAAC;;;;;"}
@@ -0,0 +1,24 @@
1
+ import { Color3, Color4 } from "@babylonjs/core/Maths/math.color.js";
2
+ import { Quaternion, Vector3 } from "@babylonjs/core/Maths/math.vector.js";
3
+ type PropertyKeys<TargetT, PropertyT> = {
4
+ [PropertyKeyT in keyof TargetT]: TargetT[PropertyKeyT] extends PropertyT | null | undefined ? PropertyKeyT : never;
5
+ }[keyof TargetT];
6
+ export declare function useProperty<TargetT extends object, PropertyKeyT extends keyof TargetT>(target: TargetT, propertyKey: PropertyKeyT): TargetT[PropertyKeyT];
7
+ export declare function useProperty<TargetT extends object, PropertyKeyT extends keyof TargetT>(target: TargetT | null | undefined, propertyKey: PropertyKeyT): TargetT[PropertyKeyT] | undefined;
8
+ export declare function useVector3Property<TargetT extends object, PropertyKeyT extends PropertyKeys<TargetT, Vector3>>(target: TargetT, propertyKey: PropertyKeyT): TargetT[PropertyKeyT];
9
+ export declare function useVector3Property<TargetT extends object, PropertyKeyT extends PropertyKeys<TargetT, Vector3>>(target: TargetT | null | undefined, propertyKey: PropertyKeyT): TargetT[PropertyKeyT] | undefined;
10
+ export declare function useColor3Property<TargetT extends object, PropertyKeyT extends PropertyKeys<TargetT, Color3>>(target: TargetT, propertyKey: PropertyKeyT): TargetT[PropertyKeyT];
11
+ export declare function useColor3Property<TargetT extends object, PropertyKeyT extends PropertyKeys<TargetT, Color3>>(target: TargetT | null | undefined, propertyKey: PropertyKeyT): TargetT[PropertyKeyT] | undefined;
12
+ export declare function useColor4Property<TargetT extends object, PropertyKeyT extends PropertyKeys<TargetT, Color4>>(target: TargetT, propertyKey: PropertyKeyT): TargetT[PropertyKeyT];
13
+ export declare function useColor4Property<TargetT extends object, PropertyKeyT extends PropertyKeys<TargetT, Color4>>(target: TargetT | null | undefined, propertyKey: PropertyKeyT): TargetT[PropertyKeyT] | null;
14
+ export declare function useQuaternionProperty<TargetT extends object, PropertyKeyT extends PropertyKeys<TargetT, Quaternion>>(target: TargetT, propertyKey: PropertyKeyT): TargetT[PropertyKeyT];
15
+ export declare function useQuaternionProperty<TargetT extends object, PropertyKeyT extends PropertyKeys<TargetT, Quaternion>>(target: TargetT | null | undefined, propertyKey: PropertyKeyT): TargetT[PropertyKeyT] | undefined;
16
+ /**
17
+ * Creates a hook for a concrete value. For example, if the value is a Vector3,
18
+ * it will return a hook that can intercept a change to the Vector3 property or
19
+ * any of its components (x, y, z).
20
+ * @param value The current value of a property that will be hooked.
21
+ * @returns A hook function that can be used to observe changes to the property.
22
+ */
23
+ export declare function MakePropertyHook(value: unknown): typeof useProperty;
24
+ export {};
@@ -0,0 +1,9 @@
1
+ import { type IReadonlyObservable } from "@babylonjs/core/index.js";
2
+ /**
3
+ * Provides an observable that fires when a specified function/property is called/set.
4
+ * @param type The type of the interceptor, either "function" or "property".
5
+ * @param target The object containing the function/property to intercept.
6
+ * @param propertyKey The key of the function/property to intercept.
7
+ * @returns An observable that fires when the function/property is called/set.
8
+ */
9
+ export declare function useInterceptObservable<T extends object>(type: "function" | "property", target: T | null | undefined, propertyKey: keyof T): IReadonlyObservable<void>;
@@ -0,0 +1,35 @@
1
+ import { type IReadonlyObservable } from "@babylonjs/core/index.js";
2
+ import { type ObservableCollection } from "../misc/observableCollection";
3
+ /**
4
+ * Returns the current value of the accessor and updates it when the specified event is fired on the specified element.
5
+ * @param accessor A function that returns the current value.
6
+ * @param element The element to listen for the event on.
7
+ * @param eventNames The names of the events to listen for.
8
+ * @returns The current value of the accessor.
9
+ * * @remarks If the accessor function is not idempotent (e.g. it returns a different array or object instance each time it is called),
10
+ * then there is a good chance it should be wrapped in a `useCallback` to prevent unnecessary re-renders or re-render infinite loops.
11
+ */
12
+ export declare function useEventfulState<T>(accessor: () => T, element: HTMLElement | null | undefined, ...eventNames: string[]): T;
13
+ /**
14
+ * Returns the current value of the accessor and updates it when any of the specified observables change.
15
+ * @param accessor A function that returns the current value.
16
+ * @param observables The observables to listen for changes on.
17
+ * @returns The current value of the accessor.
18
+ * @remarks If the accessor function is not idempotent (e.g. it returns a different array or object instance each time it is called),
19
+ * then there is a good chance it should be wrapped in a `useCallback` to prevent unnecessary re-renders or re-render infinite loops.
20
+ */
21
+ export declare function useObservableState<T>(accessor: () => T, ...observables: Array<IReadonlyObservable | null | undefined>): T;
22
+ /**
23
+ * Returns a copy of the items in the collection and updates it when the collection changes.
24
+ * @param collection The collection to observe.
25
+ * @returns A copy of the items in the collection.
26
+ */
27
+ export declare function useObservableCollection<T>(collection: ObservableCollection<T>): T[];
28
+ /**
29
+ * Returns a copy of the items in the collection sorted by the order property and updates it when the collection changes.
30
+ * @param collection The collection to observe.
31
+ * @returns A copy of the items in the collection sorted by the order property.
32
+ */
33
+ export declare function useOrderedObservableCollection<T extends Readonly<{
34
+ order?: number;
35
+ }>>(collection: ObservableCollection<T>): T[];
@@ -0,0 +1,7 @@
1
+ import { type IReadonlyObservable } from "@babylonjs/core/index.js";
2
+ /**
3
+ * Creates a polling observable that notifies its observers at a specified interval.
4
+ * @param delay The polling interval in milliseconds.
5
+ * @returns A readonly observable that can be used to subscribe to polling notifications.
6
+ */
7
+ export declare function usePollingObservable(delay: number): IReadonlyObservable<void>;
@@ -0,0 +1,20 @@
1
+ import { type DependencyList } from "react";
2
+ import { type IDisposable } from "@babylonjs/core/index.js";
3
+ /**
4
+ * Custom hook to manage a resource with automatic disposal. The resource is created once initially, and recreated
5
+ * if the factory function or any dependency changes. Whenever the resource is recreated, the previous instance is
6
+ * disposed. The final instance is disposed when the component using this hook unmounts.
7
+ * @param factory A function that creates the resource.
8
+ * @param deps An optional dependency list. When any dependency changes, the resource is disposed and recreated.
9
+ * @returns The created resource.
10
+ */
11
+ export declare function useResource<T extends IDisposable | null | undefined>(factory: () => T, deps?: DependencyList): T;
12
+ /**
13
+ * Custom hook to manage an asynchronous resource with automatic disposal. The resource is created once initially, and recreated
14
+ * if the factory function or any dependency changes. Whenever the resource is recreated, the previous instance is
15
+ * disposed. The final instance is disposed when the component using this hook unmounts.
16
+ * @param factory A function that creates the resource.
17
+ * @param deps An optional dependency list. When any dependency changes, the resource is disposed and recreated.
18
+ * @returns The created resource.
19
+ */
20
+ export declare function useAsyncResource<T extends IDisposable | null | undefined>(factory: (abortSignal: AbortSignal) => Promise<T>, deps?: DependencyList): T | undefined;
@@ -0,0 +1,13 @@
1
+ import { type Dispatch, type SetStateAction } from "react";
2
+ import { type SettingDescriptor } from "../services/settingsStore";
3
+ /**
4
+ * Hook that reads and writes a setting from the settings store.
5
+ * @param descriptor The setting descriptor that identifies the setting and its default value.
6
+ * @returns A tuple of [currentValue, setValue, resetValue] similar to React's useState.
7
+ */
8
+ export declare function useSetting<T>(descriptor: SettingDescriptor<T>): [T, Dispatch<SetStateAction<T>>, () => void];
9
+ /**
10
+ * Gets functions used to convert to/from display values for angles based on the current settings.
11
+ * @returns A tuple containing the functions to convert to and from display values.
12
+ */
13
+ export declare function useAngleConverters(): readonly [(angle: number, wrap?: boolean) => number, (angle: number, wrap?: boolean) => number, boolean];
@@ -0,0 +1,34 @@
1
+ import { type Nullable } from "@babylonjs/core/index.js";
2
+ import { type OnOpenChangeData, type PositioningImperativeRef } from "@fluentui/react-components";
3
+ /**
4
+ * Creates a hook for managing teaching moment state.
5
+ * @param name The unique name of the teaching moment.
6
+ * @returns A hook that returns the teaching moment state.
7
+ */
8
+ export declare function MakeTeachingMoment(name: string): (suppress?: boolean) => {
9
+ readonly shouldDisplay: boolean;
10
+ readonly onDismissed: () => void;
11
+ readonly reset: () => void;
12
+ };
13
+ /**
14
+ * Creates a hook for managing teaching moment state for a dialog.
15
+ * @param name The unique name of the teaching moment.
16
+ * @returns A hook that returns the teaching moment state for a dialog.
17
+ */
18
+ export declare function MakeDialogTeachingMoment(name: string): (suppress?: boolean) => {
19
+ readonly shouldDisplay: boolean;
20
+ readonly onOpenChange: (e: unknown, data: OnOpenChangeData) => void;
21
+ readonly reset: () => void;
22
+ };
23
+ /**
24
+ * Creates a hook for managing teaching moment state for a popover.
25
+ * @param name The unique name of the teaching moment.
26
+ * @returns A hook that returns the teaching moment state for a popover.
27
+ */
28
+ export declare function MakePopoverTeachingMoment(name: string): (suppress?: boolean) => {
29
+ readonly shouldDisplay: boolean;
30
+ readonly positioningRef: import("react").Dispatch<import("react").SetStateAction<Nullable<PositioningImperativeRef>>>;
31
+ readonly targetRef: import("react").Dispatch<import("react").SetStateAction<Nullable<HTMLElement>>>;
32
+ readonly onOpenChange: (e: unknown, data: OnOpenChangeData) => void;
33
+ readonly reset: () => void;
34
+ };
@@ -0,0 +1,17 @@
1
+ import { type ThemeMode } from "../services/themeService";
2
+ /**
3
+ * Hook that provides the current theme mode state and controls for changing it.
4
+ * @returns An object with the current dark mode state, theme mode, and functions to set or toggle the theme.
5
+ */
6
+ export declare function useThemeMode(): {
7
+ readonly isDarkMode: boolean;
8
+ readonly themeMode: ThemeMode;
9
+ readonly setThemeMode: (mode: ThemeMode) => void;
10
+ readonly toggleThemeMode: () => void | undefined;
11
+ };
12
+ /**
13
+ * Hook that returns the current Fluent UI theme based on the active theme mode.
14
+ * @param invert If true, inverts the theme (returns light theme in dark mode and vice versa). Defaults to false.
15
+ * @returns The current Fluent UI theme object.
16
+ */
17
+ export declare function useTheme(invert?: boolean): import("@fluentui/tokens").Theme;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Return a copied array and re-render when array mutators run.
3
+ * Intercept add/remove/change functions because the underlying APIs update internal arrays in-place.
4
+ * @param target The target object containing the observable array, or null if the array is not applicable.
5
+ * @param getItems A function to get the current items in the array.
6
+ * @param addFn The name of the function to add an item to the array.
7
+ * @param removeFn The name of the function to remove an item from the array.
8
+ * @param changeFn The name of the function to change an item in the array.
9
+ * @returns A copied array that re-renders when array mutators run.
10
+ */
11
+ export declare function useObservableArray<TargetT extends object, ItemT>(target: TargetT | null, getItems: () => ReadonlyArray<ItemT> | null | undefined, addFn: keyof TargetT, removeFn: keyof TargetT, changeFn?: keyof TargetT): ItemT[];
@@ -0,0 +1,35 @@
1
+ export type GrowDirection = "end" | "start" | "up" | "down";
2
+ export type UseResizeHandleParams = {
3
+ /**
4
+ * The direction in which the element is considered growing in size ('end', 'start', 'up', or 'down').
5
+ */
6
+ growDirection: GrowDirection;
7
+ /**
8
+ * The name of the CSS variable that will be set on the wrapper element to reflect the current size of the element.
9
+ */
10
+ variableName: string;
11
+ /**
12
+ * A callback that will be called when the element is resized.
13
+ *
14
+ * @remarks The passed function should be memoized for better performance.
15
+ */
16
+ onChange?: (value: number) => void;
17
+ /**
18
+ * The minimum change allowed (e.g. the smallest negative number allowed).
19
+ */
20
+ minValue?: number;
21
+ /**
22
+ * The maximum change allowed (e.g. the largest positive number allowed).
23
+ */
24
+ maxValue?: number;
25
+ };
26
+ /**
27
+ * A custom hook that helps with element resizing.
28
+ * @param params The parameters for the resize handle.
29
+ * @returns An object containing refs and a function to set the value.
30
+ */
31
+ export declare function useResizeHandle(params: UseResizeHandleParams): {
32
+ elementRef: import("react").Dispatch<import("react").SetStateAction<HTMLElement | null>>;
33
+ handleRef: import("react").Dispatch<import("react").SetStateAction<HTMLElement | null>>;
34
+ setValue: (value: number) => void;
35
+ };