@collabdt/core 0.4.8 → 0.5.3

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 (418) hide show
  1. package/dist/core/components/AppSidebarContent.d.ts +2 -3
  2. package/dist/core/components/AppSidebarContent.d.ts.map +1 -1
  3. package/dist/core/components/AppSidebarContent.js +12 -3
  4. package/dist/core/components/AppSidebarContent.js.map +1 -1
  5. package/dist/core/components/Toolbar.d.ts +2 -3
  6. package/dist/core/components/Toolbar.d.ts.map +1 -1
  7. package/dist/core/components/Toolbar.js.map +1 -1
  8. package/dist/core/components/ui/AppSidebar.d.ts +2 -2
  9. package/dist/core/components/ui/AppSidebar.d.ts.map +1 -1
  10. package/dist/core/components/ui/AppSidebar.js.map +1 -1
  11. package/dist/core/components/ui/Comments/CommentsSection.d.ts.map +1 -1
  12. package/dist/core/components/ui/Comments/CommentsSection.js +10 -9
  13. package/dist/core/components/ui/Comments/CommentsSection.js.map +1 -1
  14. package/dist/core/components/ui/Sensors/SensorsSection.d.ts.map +1 -1
  15. package/dist/core/components/ui/Sensors/SensorsSection.js +24 -23
  16. package/dist/core/components/ui/Sensors/SensorsSection.js.map +1 -1
  17. package/dist/core/components/ui/ViewerSidebar/Shell.js +1 -1
  18. package/dist/core/components/ui/ViewerSidebar/Shell.js.map +1 -1
  19. package/dist/core/components/ui/ViewerSidebar/TabStrip.d.ts +6 -5
  20. package/dist/core/components/ui/ViewerSidebar/TabStrip.d.ts.map +1 -1
  21. package/dist/core/components/ui/ViewerSidebar/TabStrip.js +6 -4
  22. package/dist/core/components/ui/ViewerSidebar/TabStrip.js.map +1 -1
  23. package/dist/core/components/ui/ViewerSidebar/sidebarTabs.d.ts +16 -9
  24. package/dist/core/components/ui/ViewerSidebar/sidebarTabs.d.ts.map +1 -1
  25. package/dist/core/components/ui/ViewerSidebar/sidebarTabs.js.map +1 -1
  26. package/dist/core/components/viewers/Data/DataMenu.js +1 -1
  27. package/dist/core/components/viewers/Data/DataMenu.js.map +1 -1
  28. package/dist/core/components/viewers/Data/utils/viewerConfig.js +1 -1
  29. package/dist/core/components/viewers/Data/utils/viewerConfig.js.map +1 -1
  30. package/dist/core/components/viewers/Viewer.d.ts.map +1 -1
  31. package/dist/core/components/viewers/Viewer.js +21 -7
  32. package/dist/core/components/viewers/Viewer.js.map +1 -1
  33. package/dist/core/components/viewers/bim/BimViewer.d.ts.map +1 -1
  34. package/dist/core/components/viewers/bim/BimViewer.js +10 -1
  35. package/dist/core/components/viewers/bim/BimViewer.js.map +1 -1
  36. package/dist/core/components/viewers/bim/src/BimSidebar/src/index.d.ts.map +1 -1
  37. package/dist/core/components/viewers/bim/src/BimSidebar/src/index.js +5 -1
  38. package/dist/core/components/viewers/bim/src/BimSidebar/src/index.js.map +1 -1
  39. package/dist/core/components/viewers/bim/src/ElementAppearance.d.ts +10 -1
  40. package/dist/core/components/viewers/bim/src/ElementAppearance.d.ts.map +1 -1
  41. package/dist/core/components/viewers/bim/src/ElementAppearance.js +36 -1
  42. package/dist/core/components/viewers/bim/src/ElementAppearance.js.map +1 -1
  43. package/dist/core/components/viewers/bim/src/ModelsSync.d.ts +17 -0
  44. package/dist/core/components/viewers/bim/src/ModelsSync.d.ts.map +1 -0
  45. package/dist/core/components/viewers/bim/src/ModelsSync.js +36 -0
  46. package/dist/core/components/viewers/bim/src/ModelsSync.js.map +1 -0
  47. package/dist/core/components/viewers/bim/src/SelectionSync.d.ts +15 -0
  48. package/dist/core/components/viewers/bim/src/SelectionSync.d.ts.map +1 -0
  49. package/dist/core/components/viewers/bim/src/SelectionSync.js +24 -0
  50. package/dist/core/components/viewers/bim/src/SelectionSync.js.map +1 -0
  51. package/dist/core/components/viewers/bim/src/lib/appearanceOverrides.d.ts +12 -1
  52. package/dist/core/components/viewers/bim/src/lib/appearanceOverrides.d.ts.map +1 -1
  53. package/dist/core/components/viewers/bim/src/lib/appearanceOverrides.js +18 -2
  54. package/dist/core/components/viewers/bim/src/lib/appearanceOverrides.js.map +1 -1
  55. package/dist/core/components/viewers/bim/src/lib/bimCamera.d.ts +17 -0
  56. package/dist/core/components/viewers/bim/src/lib/bimCamera.d.ts.map +1 -0
  57. package/dist/core/components/viewers/bim/src/lib/bimCamera.js +16 -0
  58. package/dist/core/components/viewers/bim/src/lib/bimCamera.js.map +1 -0
  59. package/dist/core/components/viewers/bim/src/lib/bimItemActions.d.ts +13 -0
  60. package/dist/core/components/viewers/bim/src/lib/bimItemActions.d.ts.map +1 -1
  61. package/dist/core/components/viewers/bim/src/lib/bimItemActions.js +13 -0
  62. package/dist/core/components/viewers/bim/src/lib/bimItemActions.js.map +1 -1
  63. package/dist/core/components/viewers/bim/src/lib/bimQueries.d.ts +26 -0
  64. package/dist/core/components/viewers/bim/src/lib/bimQueries.d.ts.map +1 -0
  65. package/dist/core/components/viewers/bim/src/lib/bimQueries.js +72 -0
  66. package/dist/core/components/viewers/bim/src/lib/bimQueries.js.map +1 -0
  67. package/dist/core/components/viewers/bim/src/tools/AddToBim/src/useFilePlacement.d.ts +1 -1
  68. package/dist/core/components/viewers/bim/src/tools/bimToolbar.d.ts.map +1 -1
  69. package/dist/core/components/viewers/bim/src/tools/bimToolbar.js +7 -1
  70. package/dist/core/components/viewers/bim/src/tools/bimToolbar.js.map +1 -1
  71. package/dist/core/components/viewers/map/MapViewer.d.ts.map +1 -1
  72. package/dist/core/components/viewers/map/MapViewer.js +6 -3
  73. package/dist/core/components/viewers/map/MapViewer.js.map +1 -1
  74. package/dist/core/components/viewers/map/datasets/RowActions.d.ts.map +1 -1
  75. package/dist/core/components/viewers/map/datasets/RowActions.js +90 -20
  76. package/dist/core/components/viewers/map/datasets/RowActions.js.map +1 -1
  77. package/dist/core/components/viewers/map/datasets/index.d.ts +1 -2
  78. package/dist/core/components/viewers/map/datasets/index.d.ts.map +1 -1
  79. package/dist/core/components/viewers/map/datasets/index.js +13 -104
  80. package/dist/core/components/viewers/map/datasets/index.js.map +1 -1
  81. package/dist/core/components/viewers/map/datasets/src/minioDatasets.d.ts +1 -1
  82. package/dist/core/components/viewers/map/datasets/src/minioDatasets.d.ts.map +1 -1
  83. package/dist/core/components/viewers/map/datasets/src/minioDatasets.js +5 -8
  84. package/dist/core/components/viewers/map/datasets/src/minioDatasets.js.map +1 -1
  85. package/dist/core/components/viewers/map/datasets/src/orgVisibility.d.ts +16 -0
  86. package/dist/core/components/viewers/map/datasets/src/orgVisibility.d.ts.map +1 -0
  87. package/dist/core/components/viewers/map/datasets/src/orgVisibility.js +21 -0
  88. package/dist/core/components/viewers/map/datasets/src/orgVisibility.js.map +1 -0
  89. package/dist/core/components/viewers/map/datasets/src/useOrganizationalDatasets.d.ts +28 -0
  90. package/dist/core/components/viewers/map/datasets/src/useOrganizationalDatasets.d.ts.map +1 -0
  91. package/dist/core/components/viewers/map/datasets/src/useOrganizationalDatasets.js +80 -0
  92. package/dist/core/components/viewers/map/datasets/src/useOrganizationalDatasets.js.map +1 -0
  93. package/dist/core/components/viewers/map/src/MapLayers/src/OpenDataLayer/src/geometryGroups.d.ts +27 -0
  94. package/dist/core/components/viewers/map/src/MapLayers/src/OpenDataLayer/src/geometryGroups.d.ts.map +1 -0
  95. package/dist/core/components/viewers/map/src/MapLayers/src/OpenDataLayer/src/geometryGroups.js +53 -0
  96. package/dist/core/components/viewers/map/src/MapLayers/src/OpenDataLayer/src/geometryGroups.js.map +1 -0
  97. package/dist/core/components/viewers/map/src/MapLayers/src/OpenDataLayer/src/index.d.ts.map +1 -1
  98. package/dist/core/components/viewers/map/src/MapLayers/src/OpenDataLayer/src/index.js +102 -100
  99. package/dist/core/components/viewers/map/src/MapLayers/src/OpenDataLayer/src/index.js.map +1 -1
  100. package/dist/core/components/viewers/map/src/MapSidebar/index.d.ts.map +1 -1
  101. package/dist/core/components/viewers/map/src/MapSidebar/index.js +5 -1
  102. package/dist/core/components/viewers/map/src/MapSidebar/index.js.map +1 -1
  103. package/dist/core/components/viewers/map/src/MapSidebar/src/LayersTab/index.d.ts.map +1 -1
  104. package/dist/core/components/viewers/map/src/MapSidebar/src/LayersTab/index.js +2 -34
  105. package/dist/core/components/viewers/map/src/MapSidebar/src/LayersTab/index.js.map +1 -1
  106. package/dist/core/components/viewers/map/src/tools/AddTools/AddDataset/DatasetAdder.d.ts +3 -11
  107. package/dist/core/components/viewers/map/src/tools/AddTools/AddDataset/DatasetAdder.d.ts.map +1 -1
  108. package/dist/core/components/viewers/map/src/tools/AddTools/AddDataset/DatasetAdder.js +28 -13
  109. package/dist/core/components/viewers/map/src/tools/AddTools/AddDataset/DatasetAdder.js.map +1 -1
  110. package/dist/core/components/viewers/map/src/tools/AddTools/AddToMap.d.ts +1 -2
  111. package/dist/core/components/viewers/map/src/tools/AddTools/AddToMap.d.ts.map +1 -1
  112. package/dist/core/components/viewers/map/src/tools/AddTools/AddToMap.js +1 -2
  113. package/dist/core/components/viewers/map/src/tools/AddTools/AddToMap.js.map +1 -1
  114. package/dist/core/components/viewers/map/src/tools/DatasetMapTool.d.ts +1 -2
  115. package/dist/core/components/viewers/map/src/tools/DatasetMapTool.d.ts.map +1 -1
  116. package/dist/core/components/viewers/map/src/tools/DatasetMapTool.js +1 -2
  117. package/dist/core/components/viewers/map/src/tools/DatasetMapTool.js.map +1 -1
  118. package/dist/core/components/viewers/map/src/tools/mapTools.d.ts.map +1 -1
  119. package/dist/core/components/viewers/map/src/tools/mapTools.js +28 -1
  120. package/dist/core/components/viewers/map/src/tools/mapTools.js.map +1 -1
  121. package/dist/core/components/viewers/map/utils/stringToColour.d.ts +3 -0
  122. package/dist/core/components/viewers/map/utils/stringToColour.d.ts.map +1 -1
  123. package/dist/core/components/viewers/map/utils/stringToColour.js +72 -70
  124. package/dist/core/components/viewers/map/utils/stringToColour.js.map +1 -1
  125. package/dist/core/components/viewers/plugins/PluginsManager.d.ts +20 -0
  126. package/dist/core/components/viewers/plugins/PluginsManager.d.ts.map +1 -0
  127. package/dist/core/components/viewers/plugins/PluginsManager.js +245 -0
  128. package/dist/core/components/viewers/plugins/PluginsManager.js.map +1 -0
  129. package/dist/core/components/viewers/plugins/src/PluginCard.d.ts +14 -0
  130. package/dist/core/components/viewers/plugins/src/PluginCard.d.ts.map +1 -0
  131. package/dist/core/components/viewers/plugins/src/PluginCard.js +239 -0
  132. package/dist/core/components/viewers/plugins/src/PluginCard.js.map +1 -0
  133. package/dist/core/components/viewers/plugins/src/pluginStatus.d.ts +9 -0
  134. package/dist/core/components/viewers/plugins/src/pluginStatus.d.ts.map +1 -0
  135. package/dist/core/components/viewers/plugins/src/pluginStatus.js +10 -0
  136. package/dist/core/components/viewers/plugins/src/pluginStatus.js.map +1 -0
  137. package/dist/core/components/viewers/plugins/src/useMountedPlugins.d.ts +14 -0
  138. package/dist/core/components/viewers/plugins/src/useMountedPlugins.d.ts.map +1 -0
  139. package/dist/core/components/viewers/plugins/src/useMountedPlugins.js +24 -0
  140. package/dist/core/components/viewers/plugins/src/useMountedPlugins.js.map +1 -0
  141. package/dist/core/components/viewers/plugins/src/usePluginEnablement.d.ts +16 -0
  142. package/dist/core/components/viewers/plugins/src/usePluginEnablement.d.ts.map +1 -0
  143. package/dist/core/components/viewers/plugins/src/usePluginEnablement.js +18 -0
  144. package/dist/core/components/viewers/plugins/src/usePluginEnablement.js.map +1 -0
  145. package/dist/core/components/viewers/plugins/src/usePluginsData.d.ts +22 -0
  146. package/dist/core/components/viewers/plugins/src/usePluginsData.d.ts.map +1 -0
  147. package/dist/core/components/viewers/plugins/src/usePluginsData.js +81 -0
  148. package/dist/core/components/viewers/plugins/src/usePluginsData.js.map +1 -0
  149. package/dist/core/components/viewers/plugins/types.d.ts +66 -0
  150. package/dist/core/components/viewers/plugins/types.d.ts.map +1 -0
  151. package/dist/core/components/viewers/plugins/types.js +1 -0
  152. package/dist/core/components/viewers/plugins/types.js.map +1 -0
  153. package/dist/core/components/viewers/pointcloud/PointCloudToolbar.js +2 -2
  154. package/dist/core/components/viewers/pointcloud/PointCloudToolbar.js.map +1 -1
  155. package/dist/core/components/viewers/pointcloud/src/PointCloudSidebar/index.d.ts.map +1 -1
  156. package/dist/core/components/viewers/pointcloud/src/PointCloudSidebar/index.js +5 -1
  157. package/dist/core/components/viewers/pointcloud/src/PointCloudSidebar/index.js.map +1 -1
  158. package/dist/core/components/viewers/pointcloud/src/tools/index.d.ts +1 -1
  159. package/dist/core/components/viewers/pointcloud/src/tools/index.d.ts.map +1 -1
  160. package/dist/core/components/viewers/pointcloud/src/tools/index.js +3 -2
  161. package/dist/core/components/viewers/pointcloud/src/tools/index.js.map +1 -1
  162. package/dist/core/components/viewers/pointcloud/src/tools/pointcloudToolbarTools.d.ts +10 -1
  163. package/dist/core/components/viewers/pointcloud/src/tools/pointcloudToolbarTools.d.ts.map +1 -1
  164. package/dist/core/components/viewers/pointcloud/src/tools/pointcloudToolbarTools.js +11 -3
  165. package/dist/core/components/viewers/pointcloud/src/tools/pointcloudToolbarTools.js.map +1 -1
  166. package/dist/core/components/viewers/shared/legends/ViewerLegendHost.d.ts +10 -0
  167. package/dist/core/components/viewers/shared/legends/ViewerLegendHost.d.ts.map +1 -0
  168. package/dist/core/components/viewers/{map/legends/MapLegendHost.js → shared/legends/ViewerLegendHost.js} +48 -10
  169. package/dist/core/components/viewers/shared/legends/ViewerLegendHost.js.map +1 -0
  170. package/dist/core/components/viewers/viewerAccess.d.ts +7 -0
  171. package/dist/core/components/viewers/viewerAccess.d.ts.map +1 -0
  172. package/dist/core/components/viewers/viewerAccess.js +9 -0
  173. package/dist/core/components/viewers/viewerAccess.js.map +1 -0
  174. package/dist/core/hooks/plugins/createPluginHooks.d.ts +40 -0
  175. package/dist/core/hooks/plugins/createPluginHooks.d.ts.map +1 -0
  176. package/dist/core/hooks/plugins/createPluginHooks.js +71 -0
  177. package/dist/core/hooks/plugins/createPluginHooks.js.map +1 -0
  178. package/dist/core/hooks/plugins/plugins.d.ts +18 -0
  179. package/dist/core/hooks/plugins/plugins.d.ts.map +1 -0
  180. package/dist/core/hooks/plugins/plugins.js +10 -0
  181. package/dist/core/hooks/plugins/plugins.js.map +1 -0
  182. package/dist/core/hooks/ports/apiAdapter.d.ts +9 -0
  183. package/dist/core/hooks/ports/apiAdapter.d.ts.map +1 -1
  184. package/dist/core/hooks/provider.d.ts +2 -0
  185. package/dist/core/hooks/provider.d.ts.map +1 -1
  186. package/dist/core/hooks/provider.js +3 -1
  187. package/dist/core/hooks/provider.js.map +1 -1
  188. package/dist/core/i18n/index.d.ts +6 -0
  189. package/dist/core/i18n/index.d.ts.map +1 -1
  190. package/dist/core/i18n/index.js +29 -1
  191. package/dist/core/i18n/index.js.map +1 -1
  192. package/dist/core/i18n/messages/en.json +86 -4
  193. package/dist/core/i18n/messages/es.json +87 -5
  194. package/dist/core/i18n/messages/fr.json +86 -4
  195. package/dist/core/plugins/enablement.d.ts +50 -0
  196. package/dist/core/plugins/enablement.d.ts.map +1 -0
  197. package/dist/core/plugins/enablement.js +37 -0
  198. package/dist/core/plugins/enablement.js.map +1 -0
  199. package/dist/core/plugins/hello-bim/components/SpaceDialog.d.ts +13 -0
  200. package/dist/core/plugins/hello-bim/components/SpaceDialog.d.ts.map +1 -0
  201. package/dist/core/plugins/hello-bim/components/SpaceDialog.js +80 -0
  202. package/dist/core/plugins/hello-bim/components/SpaceDialog.js.map +1 -0
  203. package/dist/core/plugins/hello-bim/components/SpacesLegend.d.ts +11 -0
  204. package/dist/core/plugins/hello-bim/components/SpacesLegend.d.ts.map +1 -0
  205. package/dist/core/plugins/hello-bim/components/SpacesLegend.js +16 -0
  206. package/dist/core/plugins/hello-bim/components/SpacesLegend.js.map +1 -0
  207. package/dist/core/plugins/hello-bim/components/SpacesTab.d.ts +4 -0
  208. package/dist/core/plugins/hello-bim/components/SpacesTab.d.ts.map +1 -0
  209. package/dist/core/plugins/hello-bim/components/SpacesTab.js +211 -0
  210. package/dist/core/plugins/hello-bim/components/SpacesTab.js.map +1 -0
  211. package/dist/core/plugins/hello-bim/components/SpacesTool.d.ts +8 -0
  212. package/dist/core/plugins/hello-bim/components/SpacesTool.d.ts.map +1 -0
  213. package/dist/core/plugins/hello-bim/components/SpacesTool.js +68 -0
  214. package/dist/core/plugins/hello-bim/components/SpacesTool.js.map +1 -0
  215. package/dist/core/plugins/hello-bim/components/icons.d.ts +13 -0
  216. package/dist/core/plugins/hello-bim/components/icons.d.ts.map +1 -0
  217. package/dist/core/plugins/hello-bim/components/icons.js +52 -0
  218. package/dist/core/plugins/hello-bim/components/icons.js.map +1 -0
  219. package/dist/core/plugins/hello-bim/index.d.ts +7 -0
  220. package/dist/core/plugins/hello-bim/index.d.ts.map +1 -0
  221. package/dist/core/plugins/hello-bim/index.js +38 -0
  222. package/dist/core/plugins/hello-bim/index.js.map +1 -0
  223. package/dist/core/plugins/hello-bim/manifest.json +127 -0
  224. package/dist/core/plugins/hello-bim/spaces.d.ts +57 -0
  225. package/dist/core/plugins/hello-bim/spaces.d.ts.map +1 -0
  226. package/dist/core/plugins/hello-bim/spaces.js +207 -0
  227. package/dist/core/plugins/hello-bim/spaces.js.map +1 -0
  228. package/dist/core/plugins/hello-map/components/MapTool.d.ts +9 -0
  229. package/dist/core/plugins/hello-map/components/MapTool.d.ts.map +1 -0
  230. package/dist/core/plugins/hello-map/components/MapTool.js +78 -0
  231. package/dist/core/plugins/hello-map/components/MapTool.js.map +1 -0
  232. package/dist/core/plugins/hello-map/components/MarkerDialog.d.ts +9 -0
  233. package/dist/core/plugins/hello-map/components/MarkerDialog.d.ts.map +1 -0
  234. package/dist/core/plugins/hello-map/components/MarkerDialog.js +47 -0
  235. package/dist/core/plugins/hello-map/components/MarkerDialog.js.map +1 -0
  236. package/dist/core/plugins/hello-map/components/MarkersLayer.d.ts +8 -0
  237. package/dist/core/plugins/hello-map/components/MarkersLayer.d.ts.map +1 -0
  238. package/dist/core/plugins/hello-map/components/MarkersLayer.js +133 -0
  239. package/dist/core/plugins/hello-map/components/MarkersLayer.js.map +1 -0
  240. package/dist/core/plugins/hello-map/components/MarkersLegend.d.ts +11 -0
  241. package/dist/core/plugins/hello-map/components/MarkersLegend.d.ts.map +1 -0
  242. package/dist/core/plugins/hello-map/components/MarkersLegend.js +20 -0
  243. package/dist/core/plugins/hello-map/components/MarkersLegend.js.map +1 -0
  244. package/dist/core/plugins/hello-map/components/MarkersPage.d.ts +6 -0
  245. package/dist/core/plugins/hello-map/components/MarkersPage.d.ts.map +1 -0
  246. package/dist/core/plugins/hello-map/components/MarkersPage.js +40 -0
  247. package/dist/core/plugins/hello-map/components/MarkersPage.js.map +1 -0
  248. package/dist/core/plugins/hello-map/components/MarkersTab.d.ts +4 -0
  249. package/dist/core/plugins/hello-map/components/MarkersTab.d.ts.map +1 -0
  250. package/dist/core/plugins/hello-map/components/MarkersTab.js +275 -0
  251. package/dist/core/plugins/hello-map/components/MarkersTab.js.map +1 -0
  252. package/dist/core/plugins/hello-map/index.d.ts +7 -0
  253. package/dist/core/plugins/hello-map/index.d.ts.map +1 -0
  254. package/dist/core/plugins/hello-map/index.js +54 -0
  255. package/dist/core/plugins/hello-map/index.js.map +1 -0
  256. package/dist/core/plugins/hello-map/manifest.json +129 -0
  257. package/dist/core/plugins/hello-map/markers.d.ts +32 -0
  258. package/dist/core/plugins/hello-map/markers.d.ts.map +1 -0
  259. package/dist/core/plugins/hello-map/markers.js +143 -0
  260. package/dist/core/plugins/hello-map/markers.js.map +1 -0
  261. package/dist/core/plugins/host/PluginDataPageHost.d.ts +10 -0
  262. package/dist/core/plugins/host/PluginDataPageHost.d.ts.map +1 -0
  263. package/dist/core/plugins/host/PluginDataPageHost.js +142 -0
  264. package/dist/core/plugins/host/PluginDataPageHost.js.map +1 -0
  265. package/dist/core/plugins/host/PluginDialogHost.d.ts +7 -0
  266. package/dist/core/plugins/host/PluginDialogHost.d.ts.map +1 -0
  267. package/dist/core/plugins/host/PluginDialogHost.js +80 -0
  268. package/dist/core/plugins/host/PluginDialogHost.js.map +1 -0
  269. package/dist/core/plugins/host/PluginMapLayerHost.d.ts +6 -0
  270. package/dist/core/plugins/host/PluginMapLayerHost.d.ts.map +1 -0
  271. package/dist/core/plugins/host/PluginMapLayerHost.js +26 -0
  272. package/dist/core/plugins/host/PluginMapLayerHost.js.map +1 -0
  273. package/dist/core/plugins/host/context.d.ts.map +1 -1
  274. package/dist/core/plugins/host/context.js.map +1 -1
  275. package/dist/core/plugins/host/dialogs.d.ts +25 -0
  276. package/dist/core/plugins/host/dialogs.d.ts.map +1 -0
  277. package/dist/core/plugins/host/dialogs.js +50 -0
  278. package/dist/core/plugins/host/dialogs.js.map +1 -0
  279. package/dist/core/plugins/host/errors.d.ts +11 -0
  280. package/dist/core/plugins/host/errors.d.ts.map +1 -1
  281. package/dist/core/plugins/host/errors.js +22 -1
  282. package/dist/core/plugins/host/errors.js.map +1 -1
  283. package/dist/core/plugins/host/host.d.ts +7 -0
  284. package/dist/core/plugins/host/host.d.ts.map +1 -1
  285. package/dist/core/plugins/host/host.js +64 -8
  286. package/dist/core/plugins/host/host.js.map +1 -1
  287. package/dist/core/plugins/host/pluginKit.tsconfig.json +45 -0
  288. package/dist/core/plugins/host/pluginState.d.ts +28 -0
  289. package/dist/core/plugins/host/pluginState.d.ts.map +1 -0
  290. package/dist/core/plugins/host/pluginState.js +49 -0
  291. package/dist/core/plugins/host/pluginState.js.map +1 -0
  292. package/dist/core/plugins/host/pluginViewerKey.d.ts +13 -0
  293. package/dist/core/plugins/host/pluginViewerKey.d.ts.map +1 -0
  294. package/dist/core/plugins/host/pluginViewerKey.js +18 -0
  295. package/dist/core/plugins/host/pluginViewerKey.js.map +1 -0
  296. package/dist/core/plugins/host/provider.d.ts +37 -2
  297. package/dist/core/plugins/host/provider.d.ts.map +1 -1
  298. package/dist/core/plugins/host/provider.js +97 -10
  299. package/dist/core/plugins/host/provider.js.map +1 -1
  300. package/dist/core/plugins/host/registry.d.ts +14 -0
  301. package/dist/core/plugins/host/registry.d.ts.map +1 -1
  302. package/dist/core/plugins/host/registry.js +37 -4
  303. package/dist/core/plugins/host/registry.js.map +1 -1
  304. package/dist/core/plugins/host/runtimeShims.d.ts +15 -0
  305. package/dist/core/plugins/host/runtimeShims.d.ts.map +1 -0
  306. package/dist/core/plugins/host/runtimeShims.js +132 -0
  307. package/dist/core/plugins/host/runtimeShims.js.map +1 -0
  308. package/dist/core/plugins/host/scope.d.ts +21 -0
  309. package/dist/core/plugins/host/scope.d.ts.map +1 -0
  310. package/dist/core/plugins/host/scope.js +36 -0
  311. package/dist/core/plugins/host/scope.js.map +1 -0
  312. package/dist/core/plugins/host/usePluginDataPages.d.ts +15 -0
  313. package/dist/core/plugins/host/usePluginDataPages.d.ts.map +1 -0
  314. package/dist/core/plugins/host/usePluginDataPages.js +22 -0
  315. package/dist/core/plugins/host/usePluginDataPages.js.map +1 -0
  316. package/dist/core/plugins/host/usePluginToolbarTools.d.ts +18 -0
  317. package/dist/core/plugins/host/usePluginToolbarTools.d.ts.map +1 -0
  318. package/dist/core/plugins/host/usePluginToolbarTools.js +93 -0
  319. package/dist/core/plugins/host/usePluginToolbarTools.js.map +1 -0
  320. package/dist/core/plugins/host/usePluginViewerTabs.d.ts +11 -0
  321. package/dist/core/plugins/host/usePluginViewerTabs.d.ts.map +1 -0
  322. package/dist/core/plugins/host/usePluginViewerTabs.js +41 -0
  323. package/dist/core/plugins/host/usePluginViewerTabs.js.map +1 -0
  324. package/dist/core/plugins/installed.d.ts +14 -11
  325. package/dist/core/plugins/installed.d.ts.map +1 -1
  326. package/dist/core/plugins/installed.js +10 -1
  327. package/dist/core/plugins/installed.js.map +1 -1
  328. package/dist/core/plugins/manifests.d.ts +11 -0
  329. package/dist/core/plugins/manifests.d.ts.map +1 -0
  330. package/dist/core/plugins/manifests.js +10 -0
  331. package/dist/core/plugins/manifests.js.map +1 -0
  332. package/dist/core/plugins/messages.d.ts +15 -0
  333. package/dist/core/plugins/messages.d.ts.map +1 -0
  334. package/dist/core/plugins/messages.js +20 -0
  335. package/dist/core/plugins/messages.js.map +1 -0
  336. package/dist/core/plugins/sdk/bimViewer.d.ts +64 -0
  337. package/dist/core/plugins/sdk/bimViewer.d.ts.map +1 -0
  338. package/dist/core/plugins/sdk/bimViewer.js +66 -0
  339. package/dist/core/plugins/sdk/bimViewer.js.map +1 -0
  340. package/dist/core/plugins/sdk/config.d.ts +10 -0
  341. package/dist/core/plugins/sdk/config.d.ts.map +1 -0
  342. package/dist/core/plugins/sdk/config.js +7 -0
  343. package/dist/core/plugins/sdk/config.js.map +1 -0
  344. package/dist/core/plugins/sdk/data.d.ts +22 -0
  345. package/dist/core/plugins/sdk/data.d.ts.map +1 -0
  346. package/dist/core/plugins/sdk/data.js +68 -0
  347. package/dist/core/plugins/sdk/data.js.map +1 -0
  348. package/dist/core/plugins/sdk/index.d.ts +4 -0
  349. package/dist/core/plugins/sdk/index.d.ts.map +1 -1
  350. package/dist/core/plugins/sdk/index.js +9 -0
  351. package/dist/core/plugins/sdk/index.js.map +1 -1
  352. package/dist/core/plugins/sdk/mapViewer.d.ts +14 -0
  353. package/dist/core/plugins/sdk/mapViewer.d.ts.map +1 -0
  354. package/dist/core/plugins/sdk/mapViewer.js +13 -0
  355. package/dist/core/plugins/sdk/mapViewer.js.map +1 -0
  356. package/dist/core/plugins/sdk/messages.d.ts +33 -0
  357. package/dist/core/plugins/sdk/messages.d.ts.map +1 -0
  358. package/dist/core/plugins/sdk/messages.js +58 -0
  359. package/dist/core/plugins/sdk/messages.js.map +1 -0
  360. package/dist/core/plugins/sdk/permissions.d.ts +14 -0
  361. package/dist/core/plugins/sdk/permissions.d.ts.map +1 -0
  362. package/dist/core/plugins/sdk/permissions.js +10 -0
  363. package/dist/core/plugins/sdk/permissions.js.map +1 -0
  364. package/dist/core/plugins/sdk/pointCloudViewer.d.ts +14 -0
  365. package/dist/core/plugins/sdk/pointCloudViewer.d.ts.map +1 -0
  366. package/dist/core/plugins/sdk/pointCloudViewer.js +15 -0
  367. package/dist/core/plugins/sdk/pointCloudViewer.js.map +1 -0
  368. package/dist/core/plugins/sdk/state.d.ts +6 -0
  369. package/dist/core/plugins/sdk/state.d.ts.map +1 -0
  370. package/dist/core/plugins/sdk/state.js +30 -0
  371. package/dist/core/plugins/sdk/state.js.map +1 -0
  372. package/dist/core/plugins/sdk/store.d.ts +35 -0
  373. package/dist/core/plugins/sdk/store.d.ts.map +1 -0
  374. package/dist/core/plugins/sdk/store.js +37 -0
  375. package/dist/core/plugins/sdk/store.js.map +1 -0
  376. package/dist/core/plugins/sdk/types.d.ts +91 -51
  377. package/dist/core/plugins/sdk/types.d.ts.map +1 -1
  378. package/dist/core/plugins/sdk/types.js +17 -9
  379. package/dist/core/plugins/sdk/types.js.map +1 -1
  380. package/dist/core/plugins/sdk/ui.d.ts +12 -0
  381. package/dist/core/plugins/sdk/ui.d.ts.map +1 -0
  382. package/dist/core/plugins/sdk/ui.js +16 -0
  383. package/dist/core/plugins/sdk/ui.js.map +1 -0
  384. package/dist/core/plugins/sdk/version.d.ts +10 -0
  385. package/dist/core/plugins/sdk/version.d.ts.map +1 -0
  386. package/dist/core/plugins/sdk/version.js +5 -0
  387. package/dist/core/plugins/sdk/version.js.map +1 -0
  388. package/dist/core/plugins/sdk/viewer.d.ts +16 -0
  389. package/dist/core/plugins/sdk/viewer.d.ts.map +1 -0
  390. package/dist/core/plugins/sdk/viewer.js +5 -0
  391. package/dist/core/plugins/sdk/viewer.js.map +1 -0
  392. package/dist/core/store/BIM/context.d.ts.map +1 -1
  393. package/dist/core/store/BIM/context.js +1 -0
  394. package/dist/core/store/BIM/context.js.map +1 -1
  395. package/dist/core/store/BIM/reducer.d.ts +22 -0
  396. package/dist/core/store/BIM/reducer.d.ts.map +1 -1
  397. package/dist/core/store/BIM/reducer.js +11 -1
  398. package/dist/core/store/BIM/reducer.js.map +1 -1
  399. package/dist/core/store/CombineProviders.d.ts +5 -2
  400. package/dist/core/store/CombineProviders.d.ts.map +1 -1
  401. package/dist/core/store/CombineProviders.js +14 -5
  402. package/dist/core/store/CombineProviders.js.map +1 -1
  403. package/dist/core/store/Menus/reducer.d.ts +5 -3
  404. package/dist/core/store/Menus/reducer.d.ts.map +1 -1
  405. package/dist/core/store/Menus/reducer.js.map +1 -1
  406. package/dist/core/types/dbTypes.d.ts +6 -0
  407. package/dist/core/types/dbTypes.d.ts.map +1 -1
  408. package/dist/core/types/dbTypes.js.map +1 -1
  409. package/dist/core/types/plugins.d.ts +56 -0
  410. package/dist/core/types/plugins.d.ts.map +1 -0
  411. package/dist/core/types/plugins.js +1 -0
  412. package/dist/core/types/plugins.js.map +1 -0
  413. package/dist/core/types/tools.d.ts +9 -1
  414. package/dist/core/types/tools.d.ts.map +1 -1
  415. package/package.json +11 -1
  416. package/dist/core/components/viewers/map/legends/MapLegendHost.d.ts +0 -10
  417. package/dist/core/components/viewers/map/legends/MapLegendHost.d.ts.map +0 -1
  418. package/dist/core/components/viewers/map/legends/MapLegendHost.js.map +0 -1
@@ -0,0 +1,93 @@
1
+ "use client";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __spreadValues = (a, b) => {
8
+ for (var prop in b || (b = {}))
9
+ if (__hasOwnProp.call(b, prop))
10
+ __defNormalProp(a, prop, b[prop]);
11
+ if (__getOwnPropSymbols)
12
+ for (var prop of __getOwnPropSymbols(b)) {
13
+ if (__propIsEnum.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ }
16
+ return a;
17
+ };
18
+ var __objRest = (source, exclude) => {
19
+ var target = {};
20
+ for (var prop in source)
21
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
22
+ target[prop] = source[prop];
23
+ if (source != null && __getOwnPropSymbols)
24
+ for (var prop of __getOwnPropSymbols(source)) {
25
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
26
+ target[prop] = source[prop];
27
+ }
28
+ return target;
29
+ };
30
+ import { jsx } from "react/jsx-runtime";
31
+ import * as LR from "lucide-react";
32
+ import * as React from "react";
33
+ import { ToolbarSubmenu } from "../../components/ToolbarSubmenu";
34
+ import { usePluginConfigs, usePluginContributions } from "./provider";
35
+ import { PluginScopeProvider } from "./scope";
36
+ const FALLBACK_ICON = LR.Puzzle;
37
+ function resolvePluginIcon(icon) {
38
+ if (typeof icon !== "string") return icon;
39
+ const candidate = LR[icon];
40
+ return isComponent(candidate) ? candidate : FALLBACK_ICON;
41
+ }
42
+ function isComponent(value) {
43
+ if (typeof value === "function") return true;
44
+ return typeof value === "object" && value !== null && "$$typeof" in value;
45
+ }
46
+ function usePluginToolbarTools(capability, extraProps) {
47
+ const contributions = usePluginContributions(capability);
48
+ const configs = usePluginConfigs();
49
+ const wrapped = React.useRef(/* @__PURE__ */ new Map());
50
+ return React.useMemo(() => {
51
+ const live = /* @__PURE__ */ new Set();
52
+ const tools = contributions.map((contribution) => {
53
+ const id = pluginToolId(contribution);
54
+ live.add(id);
55
+ let Component = wrapped.current.get(id);
56
+ if (!Component) {
57
+ Component = wrapPluginComponent(contribution, () => configs[contribution.pluginId]);
58
+ wrapped.current.set(id, Component);
59
+ }
60
+ return {
61
+ id,
62
+ title: contribution.label,
63
+ icon: resolvePluginIcon(contribution.icon),
64
+ // An invented cursor is a CSS no-op, not a crash, so it goes unvalidated.
65
+ cursor: contribution.cursor,
66
+ stayActive: contribution.stayActive,
67
+ component: Component,
68
+ extraProps
69
+ };
70
+ });
71
+ for (const id of wrapped.current.keys()) {
72
+ if (!live.has(id)) wrapped.current.delete(id);
73
+ }
74
+ return tools;
75
+ }, [contributions, extraProps]);
76
+ }
77
+ function pluginToolId(contribution) {
78
+ return `plugin:${contribution.pluginId}:${contribution.id}`;
79
+ }
80
+ function wrapPluginComponent(contribution, readConfig) {
81
+ const Component = contribution.component;
82
+ function PluginToolboxItem(_a) {
83
+ var _b = _a, { tool } = _b, rest = __objRest(_b, ["tool"]);
84
+ return /* @__PURE__ */ jsx(ToolbarSubmenu, { tool, children: /* @__PURE__ */ jsx(PluginScopeProvider, { pluginId: contribution.pluginId, config: readConfig(), children: /* @__PURE__ */ jsx(Component, __spreadValues({ tool }, rest)) }) });
85
+ }
86
+ PluginToolboxItem.displayName = `PluginTool(${contribution.pluginId}/${contribution.id})`;
87
+ return PluginToolboxItem;
88
+ }
89
+ export {
90
+ resolvePluginIcon,
91
+ usePluginToolbarTools
92
+ };
93
+ //# sourceMappingURL=usePluginToolbarTools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/core/plugins/host/usePluginToolbarTools.tsx"],"sourcesContent":["'use client'\r\n\r\n// SPDX-License-Identifier: AGPL-3.0-or-later\r\n// Copyright (C) 2025 Collab Digital Twins\r\n\r\nimport * as LR from 'lucide-react'\r\nimport * as React from 'react'\r\n\r\nimport { ToolbarSubmenu } from '../../components/ToolbarSubmenu'\r\n\r\nimport { usePluginConfigs, usePluginContributions, type PluginContribution } from './provider'\r\nimport { PluginScopeProvider } from './scope'\r\n\r\nimport type { CursorType } from '../../types/global'\r\nimport type { Tool } from '../../types/tools'\r\nimport type { ToolbarRegistration } from '../sdk/types'\r\nimport type { LucideProps } from 'lucide-react'\r\n\r\n/** The three toolbar capabilities. All share `ToolbarRegistration`. */\r\nexport type ToolbarCapability = 'map.tools' | 'bim.tools' | 'pointcloud.tools'\r\n\r\n/** What `ToolbarButton` renders for a tool that supplies its own component. */\r\ntype ToolComponent = NonNullable<Tool['component']>\r\n\r\n/** Shown when a plugin names an icon that does not exist, so the button still appears. */\r\nconst FALLBACK_ICON = LR.Puzzle\r\n\r\n/** A plugin may pass a lucide component, or its name as a string — JSON manifests only carry the string. */\r\nexport function resolvePluginIcon(\r\n icon: ToolbarRegistration['icon'],\r\n): React.ComponentType<LucideProps> {\r\n if (typeof icon !== 'string') return icon\r\n\r\n const candidate = (LR as unknown as Record<string, unknown>)[icon]\r\n return isComponent(candidate) ? candidate : FALLBACK_ICON\r\n}\r\n\r\n// Lucide icons are `forwardRef` objects, so a bare `typeof === 'function'` check\r\n// rejects every real icon. Anything renderable is callable or carries `$$typeof`.\r\nfunction isComponent(value: unknown): value is React.ComponentType<LucideProps> {\r\n if (typeof value === 'function') return true\r\n return typeof value === 'object' && value !== null && '$$typeof' in value\r\n}\r\n\r\n/**\r\n * Plugin contributions for one toolbar, as `Tool` objects the toolbars already\r\n * render: `[...coreTools, ...usePluginToolbarTools('bim.tools', viewerProps)]`.\r\n *\r\n * `extraProps` is spread onto the plugin's component by `ToolbarButton` — how a BIM\r\n * tool gets its viewer handles. Each viewer passes its own, keeping this module free\r\n * of viewer-engine imports that would pull three into the map bundle.\r\n */\r\nexport function usePluginToolbarTools(\r\n capability: ToolbarCapability,\r\n extraProps?: Record<string, unknown>,\r\n): Tool[] {\r\n const contributions = usePluginContributions(capability)\r\n const configs = usePluginConfigs()\r\n\r\n // Cached by tool id to keep component identity stable. `extraProps` changes on\r\n // most renders (it carries live viewer handles), and rebuilding on each would\r\n // remount the plugin's panel and lose its state on every camera move.\r\n const wrapped = React.useRef(new Map<string, ToolComponent>())\r\n\r\n return React.useMemo(() => {\r\n const live = new Set<string>()\r\n\r\n const tools = contributions.map(contribution => {\r\n const id = pluginToolId(contribution)\r\n live.add(id)\r\n\r\n let Component = wrapped.current.get(id)\r\n if (!Component) {\r\n Component = wrapPluginComponent(contribution, () => configs[contribution.pluginId])\r\n wrapped.current.set(id, Component)\r\n }\r\n\r\n return {\r\n id,\r\n title: contribution.label,\r\n icon: resolvePluginIcon(contribution.icon),\r\n // An invented cursor is a CSS no-op, not a crash, so it goes unvalidated.\r\n cursor: contribution.cursor as CursorType | undefined,\r\n stayActive: contribution.stayActive,\r\n component: Component,\r\n extraProps,\r\n } satisfies Tool\r\n })\r\n\r\n // Drop cache entries for plugins that have since been disabled.\r\n for (const id of wrapped.current.keys()) {\r\n if (!live.has(id)) wrapped.current.delete(id)\r\n }\r\n\r\n return tools\r\n }, [contributions, extraProps])\r\n}\r\n\r\nfunction pluginToolId(contribution: PluginContribution<ToolbarCapability>) {\r\n return `plugin:${contribution.pluginId}:${contribution.id}` as const\r\n}\r\n\r\n/**\r\n * Wrap a plugin's component into a real toolbar entry.\r\n *\r\n * `ToolbarButton` renders `tool.component` *instead of* a button, so a plugin\r\n * returning a panel would render it inline and blow the strip out of the viewport.\r\n * `ToolbarSubmenu` gives it the same ghost button and dropdown every core tool has,\r\n * built from the `label` and `icon` it already declared. The wrapper also supplies\r\n * the plugin scope the scoped SDK hooks read.\r\n */\r\nfunction wrapPluginComponent(\r\n contribution: PluginContribution<ToolbarCapability>,\r\n // Lazily, because the component identity is cached: capturing the config by value\r\n // would freeze it at whatever it was on first render.\r\n readConfig: () => Record<string, unknown> | undefined,\r\n): ToolComponent {\r\n // Props are typed per capability at `ctx.register`. This wrapper forwards whatever\r\n // the hosting toolbar passed, so the shape is erased here on purpose.\r\n const Component = contribution.component as unknown as React.ComponentType<Record<string, unknown>>\r\n\r\n function PluginToolboxItem({ tool, ...rest }: React.ComponentProps<ToolComponent>) {\r\n return (\r\n <ToolbarSubmenu tool={tool}>\r\n <PluginScopeProvider pluginId={contribution.pluginId} config={readConfig()}>\r\n <Component tool={tool} {...rest} />\r\n </PluginScopeProvider>\r\n </ToolbarSubmenu>\r\n )\r\n }\r\n\r\n PluginToolboxItem.displayName = `PluginTool(${contribution.pluginId}/${contribution.id})`\r\n return PluginToolboxItem\r\n}\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6HU;AAxHV,YAAY,QAAQ;AACpB,YAAY,WAAW;AAEvB,SAAS,sBAAsB;AAE/B,SAAS,kBAAkB,8BAAuD;AAClF,SAAS,2BAA2B;AAcpC,MAAM,gBAAgB,GAAG;AAGlB,SAAS,kBACd,MACkC;AAClC,MAAI,OAAO,SAAS,SAAU,QAAO;AAErC,QAAM,YAAa,GAA0C,IAAI;AACjE,SAAO,YAAY,SAAS,IAAI,YAAY;AAC9C;AAIA,SAAS,YAAY,OAA2D;AAC9E,MAAI,OAAO,UAAU,WAAY,QAAO;AACxC,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,cAAc;AACtE;AAUO,SAAS,sBACd,YACA,YACQ;AACR,QAAM,gBAAgB,uBAAuB,UAAU;AACvD,QAAM,UAAU,iBAAiB;AAKjC,QAAM,UAAU,MAAM,OAAO,oBAAI,IAA2B,CAAC;AAE7D,SAAO,MAAM,QAAQ,MAAM;AACzB,UAAM,OAAO,oBAAI,IAAY;AAE7B,UAAM,QAAQ,cAAc,IAAI,kBAAgB;AAC9C,YAAM,KAAK,aAAa,YAAY;AACpC,WAAK,IAAI,EAAE;AAEX,UAAI,YAAY,QAAQ,QAAQ,IAAI,EAAE;AACtC,UAAI,CAAC,WAAW;AACd,oBAAY,oBAAoB,cAAc,MAAM,QAAQ,aAAa,QAAQ,CAAC;AAClF,gBAAQ,QAAQ,IAAI,IAAI,SAAS;AAAA,MACnC;AAEA,aAAO;AAAA,QACL;AAAA,QACA,OAAO,aAAa;AAAA,QACpB,MAAM,kBAAkB,aAAa,IAAI;AAAA;AAAA,QAEzC,QAAQ,aAAa;AAAA,QACrB,YAAY,aAAa;AAAA,QACzB,WAAW;AAAA,QACX;AAAA,MACF;AAAA,IACF,CAAC;AAGD,eAAW,MAAM,QAAQ,QAAQ,KAAK,GAAG;AACvC,UAAI,CAAC,KAAK,IAAI,EAAE,EAAG,SAAQ,QAAQ,OAAO,EAAE;AAAA,IAC9C;AAEA,WAAO;AAAA,EACT,GAAG,CAAC,eAAe,UAAU,CAAC;AAChC;AAEA,SAAS,aAAa,cAAqD;AACzE,SAAO,UAAU,aAAa,QAAQ,IAAI,aAAa,EAAE;AAC3D;AAWA,SAAS,oBACP,cAGA,YACe;AAGf,QAAM,YAAY,aAAa;AAE/B,WAAS,kBAAkB,IAAwD;AAAxD,iBAAE,OAzH/B,IAyH6B,IAAW,iBAAX,IAAW,CAAT;AAC3B,WACE,oBAAC,kBAAe,MACd,8BAAC,uBAAoB,UAAU,aAAa,UAAU,QAAQ,WAAW,GACvE,8BAAC,4BAAU,QAAgB,KAAM,GACnC,GACF;AAAA,EAEJ;AAEA,oBAAkB,cAAc,cAAc,aAAa,QAAQ,IAAI,aAAa,EAAE;AACtF,SAAO;AACT;","names":[]}
@@ -0,0 +1,11 @@
1
+ import type { ViewerSidebarTab } from '../../components/ui/ViewerSidebar/sidebarTabs';
2
+ import type { SidebarTabKey } from '../../store/Menus/reducer';
3
+ import type { ViewerNames } from '../../types/dbTypes';
4
+ /** Namespaced so a plugin tab can never collide with a built-in one, or with another plugin's. */
5
+ export declare function pluginTabId(pluginId: string, tabId: string): SidebarTabKey;
6
+ /**
7
+ * The `viewer.tabs` contributions for this viewer; no `viewers` means every viewer. The panel
8
+ * is wrapped in the plugin scope, which is what lets the component inside reach the SDK hooks.
9
+ */
10
+ export declare function usePluginViewerTabs(viewer: ViewerNames): ViewerSidebarTab[];
11
+ //# sourceMappingURL=usePluginViewerTabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePluginViewerTabs.d.ts","sourceRoot":"","sources":["../../../../src/core/plugins/host/usePluginViewerTabs.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAA;AACrF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAEtD,kGAAkG;AAClG,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,aAAa,CAE1E;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,gBAAgB,EAAE,CA6B3E"}
@@ -0,0 +1,41 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import * as React from "react";
4
+ import { usePluginMessageLookup } from "../sdk/messages";
5
+ import { usePluginConfigs, usePluginContributions } from "./provider";
6
+ import { PluginScopeProvider } from "./scope";
7
+ import { resolvePluginIcon } from "./usePluginToolbarTools";
8
+ function pluginTabId(pluginId, tabId) {
9
+ return `plugin:${pluginId}:${tabId}`;
10
+ }
11
+ function usePluginViewerTabs(viewer) {
12
+ const registrations = usePluginContributions("viewer.tabs");
13
+ const configs = usePluginConfigs();
14
+ const message = usePluginMessageLookup();
15
+ return React.useMemo(
16
+ () => registrations.filter((registration) => !registration.viewers || registration.viewers.includes(viewer)).map((registration) => {
17
+ const Panel = registration.component;
18
+ return {
19
+ id: pluginTabId(registration.pluginId, registration.id),
20
+ meta: {
21
+ icon: resolvePluginIcon(registration.icon),
22
+ label: message(registration.pluginId, registration.labelKey, registration.labelKey)
23
+ },
24
+ content: /* @__PURE__ */ jsx(
25
+ PluginScopeProvider,
26
+ {
27
+ pluginId: registration.pluginId,
28
+ config: configs[registration.pluginId],
29
+ children: /* @__PURE__ */ jsx(Panel, {})
30
+ }
31
+ )
32
+ };
33
+ }),
34
+ [registrations, viewer, configs, message]
35
+ );
36
+ }
37
+ export {
38
+ pluginTabId,
39
+ usePluginViewerTabs
40
+ };
41
+ //# sourceMappingURL=usePluginViewerTabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/core/plugins/host/usePluginViewerTabs.tsx"],"sourcesContent":["'use client'\r\n\r\n// SPDX-License-Identifier: AGPL-3.0-or-later\r\n// Copyright (C) 2025 Collab Digital Twins\r\n\r\nimport * as React from 'react'\r\n\r\nimport { usePluginMessageLookup } from '../sdk/messages'\r\n\r\nimport { usePluginConfigs, usePluginContributions } from './provider'\r\nimport { PluginScopeProvider } from './scope'\r\nimport { resolvePluginIcon } from './usePluginToolbarTools'\r\n\r\nimport type { ViewerSidebarTab } from '../../components/ui/ViewerSidebar/sidebarTabs'\r\nimport type { SidebarTabKey } from '../../store/Menus/reducer'\r\nimport type { ViewerNames } from '../../types/dbTypes'\r\n\r\n/** Namespaced so a plugin tab can never collide with a built-in one, or with another plugin's. */\r\nexport function pluginTabId(pluginId: string, tabId: string): SidebarTabKey {\r\n return `plugin:${pluginId}:${tabId}`\r\n}\r\n\r\n/**\r\n * The `viewer.tabs` contributions for this viewer; no `viewers` means every viewer. The panel\r\n * is wrapped in the plugin scope, which is what lets the component inside reach the SDK hooks.\r\n */\r\nexport function usePluginViewerTabs(viewer: ViewerNames): ViewerSidebarTab[] {\r\n const registrations = usePluginContributions('viewer.tabs')\r\n const configs = usePluginConfigs()\r\n const message = usePluginMessageLookup()\r\n\r\n return React.useMemo(\r\n () => registrations\r\n .filter(registration => !registration.viewers || registration.viewers.includes(viewer))\r\n .map((registration) => {\r\n const Panel = registration.component\r\n\r\n return {\r\n id: pluginTabId(registration.pluginId, registration.id),\r\n meta: {\r\n icon: resolvePluginIcon(registration.icon),\r\n label: message(registration.pluginId, registration.labelKey, registration.labelKey),\r\n },\r\n content: (\r\n <PluginScopeProvider\r\n pluginId={registration.pluginId}\r\n config={configs[registration.pluginId]}\r\n >\r\n <Panel />\r\n </PluginScopeProvider>\r\n ),\r\n }\r\n }),\r\n [registrations, viewer, configs, message],\r\n )\r\n}\r\n"],"mappings":";AAgDc;AA3Cd,YAAY,WAAW;AAEvB,SAAS,8BAA8B;AAEvC,SAAS,kBAAkB,8BAA8B;AACzD,SAAS,2BAA2B;AACpC,SAAS,yBAAyB;AAO3B,SAAS,YAAY,UAAkB,OAA8B;AAC1E,SAAO,UAAU,QAAQ,IAAI,KAAK;AACpC;AAMO,SAAS,oBAAoB,QAAyC;AAC3E,QAAM,gBAAgB,uBAAuB,aAAa;AAC1D,QAAM,UAAU,iBAAiB;AACjC,QAAM,UAAU,uBAAuB;AAEvC,SAAO,MAAM;AAAA,IACX,MAAM,cACH,OAAO,kBAAgB,CAAC,aAAa,WAAW,aAAa,QAAQ,SAAS,MAAM,CAAC,EACrF,IAAI,CAAC,iBAAiB;AACrB,YAAM,QAAQ,aAAa;AAE3B,aAAO;AAAA,QACL,IAAI,YAAY,aAAa,UAAU,aAAa,EAAE;AAAA,QACtD,MAAM;AAAA,UACJ,MAAM,kBAAkB,aAAa,IAAI;AAAA,UACzC,OAAO,QAAQ,aAAa,UAAU,aAAa,UAAU,aAAa,QAAQ;AAAA,QACpF;AAAA,QACA,SACE;AAAA,UAAC;AAAA;AAAA,YACC,UAAU,aAAa;AAAA,YACvB,QAAQ,QAAQ,aAAa,QAAQ;AAAA,YAErC,8BAAC,SAAM;AAAA;AAAA,QACT;AAAA,MAEJ;AAAA,IACF,CAAC;AAAA,IACH,CAAC,eAAe,QAAQ,SAAS,OAAO;AAAA,EAC1C;AACF;","names":[]}
@@ -1,16 +1,19 @@
1
- import type { PluginEntry, PluginManifest } from './sdk/types';
1
+ import type { PluginSource } from './sdk/types';
2
2
  /**
3
- * The plugins this app runs, in load order.
3
+ * The plugins compiled into this build of core, in load order. To add one: put its
4
+ * manifest in `manifests.ts`, then pair that slug with a dynamic import here.
4
5
  *
5
- * To add a plugin: import its manifest and entry, then push a new entry onto this array.
6
- * import * as myPlugin from './my-plugin'
7
- * import myManifest from './my-plugin/manifest.json'
8
- * INSTALLED_PLUGINS.push({ manifest: myManifest as PluginManifest, entry: myPlugin })
6
+ * Entries must stay dynamic imports. `installed.ts` is reachable from
7
+ * `PluginHostProvider`, which sits in every route's provider tree, so a static
8
+ * import would put every plugin's components — `@thatopen` and three among them —
9
+ * in the eager bundle. Resolved at activation time instead, one chunk each.
9
10
  *
10
- * To disable a plugin: comment out or remove its entry.
11
+ * A default only: a consumer can pass its own list via
12
+ * `<PluginHostProvider plugins={...}>` and gate it with `enabledSlugs`.
13
+ *
14
+ * The `hello-*` pair are the documentation's worked examples and the boundary's
15
+ * regression test — they import nothing outside `sdk/`, so an insufficient plugin
16
+ * surface stops them compiling.
11
17
  */
12
- export declare const INSTALLED_PLUGINS: Array<{
13
- manifest: PluginManifest;
14
- entry: PluginEntry;
15
- }>;
18
+ export declare const INSTALLED_PLUGINS: PluginSource[];
16
19
  //# sourceMappingURL=installed.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"installed.d.ts","sourceRoot":"","sources":["../../../src/core/plugins/installed.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE9D;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC;IACpC,QAAQ,EAAE,cAAc,CAAA;IACxB,KAAK,EAAE,WAAW,CAAA;CACnB,CAAM,CAAA"}
1
+ {"version":3,"file":"installed.d.ts","sourceRoot":"","sources":["../../../src/core/plugins/installed.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,aAAa,CAAA;AAS/D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,iBAAiB,EAAE,YAAY,EAG3C,CAAA"}
@@ -1,4 +1,13 @@
1
- const INSTALLED_PLUGINS = [];
1
+ import { PLUGIN_MANIFESTS } from "./manifests";
2
+ function manifestFor(slug) {
3
+ const manifest = PLUGIN_MANIFESTS.find((candidate) => candidate.slug === slug);
4
+ if (!manifest) throw new Error(`No manifest registered in manifests.ts for plugin "${slug}"`);
5
+ return manifest;
6
+ }
7
+ const INSTALLED_PLUGINS = [
8
+ { manifest: manifestFor("hello-map"), entry: () => import("./hello-map") },
9
+ { manifest: manifestFor("hello-bim"), entry: () => import("./hello-bim") }
10
+ ];
2
11
  export {
3
12
  INSTALLED_PLUGINS
4
13
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/core/plugins/installed.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\r\n// Copyright (C) 2025 Collab Digital Twins\r\n\r\nimport type { PluginEntry, PluginManifest } from './sdk/types'\r\n\r\n/**\r\n * The plugins this app runs, in load order.\r\n *\r\n * To add a plugin: import its manifest and entry, then push a new entry onto this array.\r\n * import * as myPlugin from './my-plugin'\r\n * import myManifest from './my-plugin/manifest.json'\r\n * INSTALLED_PLUGINS.push({ manifest: myManifest as PluginManifest, entry: myPlugin })\r\n *\r\n * To disable a plugin: comment out or remove its entry.\r\n */\r\nexport const INSTALLED_PLUGINS: Array<{\r\n manifest: PluginManifest\r\n entry: PluginEntry\r\n}> = []\r\n"],"mappings":"AAeO,MAAM,oBAGR,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../../src/core/plugins/installed.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\r\n// Copyright (C) 2025 Collab Digital Twins\r\n\r\nimport { PLUGIN_MANIFESTS } from './manifests'\r\n\r\nimport type { PluginManifest, PluginSource } from './sdk/types'\r\n\r\n/** Looked up by slug, not by position: reordering `manifests.ts` must not mispair. */\r\nfunction manifestFor(slug: string): PluginManifest {\r\n const manifest = PLUGIN_MANIFESTS.find(candidate => candidate.slug === slug)\r\n if (!manifest) throw new Error(`No manifest registered in manifests.ts for plugin \"${slug}\"`)\r\n return manifest\r\n}\r\n\r\n/**\r\n * The plugins compiled into this build of core, in load order. To add one: put its\r\n * manifest in `manifests.ts`, then pair that slug with a dynamic import here.\r\n *\r\n * Entries must stay dynamic imports. `installed.ts` is reachable from\r\n * `PluginHostProvider`, which sits in every route's provider tree, so a static\r\n * import would put every plugin's components — `@thatopen` and three among them —\r\n * in the eager bundle. Resolved at activation time instead, one chunk each.\r\n *\r\n * A default only: a consumer can pass its own list via\r\n * `<PluginHostProvider plugins={...}>` and gate it with `enabledSlugs`.\r\n *\r\n * The `hello-*` pair are the documentation's worked examples and the boundary's\r\n * regression test — they import nothing outside `sdk/`, so an insufficient plugin\r\n * surface stops them compiling.\r\n */\r\nexport const INSTALLED_PLUGINS: PluginSource[] = [\r\n { manifest: manifestFor('hello-map'), entry: () => import('./hello-map') },\r\n { manifest: manifestFor('hello-bim'), entry: () => import('./hello-bim') },\r\n]\r\n"],"mappings":"AAGA,SAAS,wBAAwB;AAKjC,SAAS,YAAY,MAA8B;AACjD,QAAM,WAAW,iBAAiB,KAAK,eAAa,UAAU,SAAS,IAAI;AAC3E,MAAI,CAAC,SAAU,OAAM,IAAI,MAAM,sDAAsD,IAAI,GAAG;AAC5F,SAAO;AACT;AAkBO,MAAM,oBAAoC;AAAA,EAC/C,EAAE,UAAU,YAAY,WAAW,GAAG,OAAO,MAAM,OAAO,aAAa,EAAE;AAAA,EACzE,EAAE,UAAU,YAAY,WAAW,GAAG,OAAO,MAAM,OAAO,aAAa,EAAE;AAC3E;","names":[]}
@@ -0,0 +1,11 @@
1
+ import type { PluginManifest } from './sdk/types';
2
+ /**
3
+ * The manifests of the plugins compiled into this build, separate from
4
+ * `installed.ts` so they can be read without their entry modules.
5
+ *
6
+ * `i18n/index.ts` collects plugin strings and is reachable from the server graph
7
+ * through the `./messages` export, so it must read manifests without dragging in a
8
+ * plugin's components and, with them, a viewer engine. Plain JSON, no runtime deps.
9
+ */
10
+ export declare const PLUGIN_MANIFESTS: PluginManifest[];
11
+ //# sourceMappingURL=manifests.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifests.d.ts","sourceRoot":"","sources":["../../../src/core/plugins/manifests.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAG5C,CAAA"}
@@ -0,0 +1,10 @@
1
+ import helloBimManifest from "./hello-bim/manifest.json";
2
+ import helloMapManifest from "./hello-map/manifest.json";
3
+ const PLUGIN_MANIFESTS = [
4
+ helloMapManifest,
5
+ helloBimManifest
6
+ ];
7
+ export {
8
+ PLUGIN_MANIFESTS
9
+ };
10
+ //# sourceMappingURL=manifests.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/core/plugins/manifests.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\r\n// Copyright (C) 2025 Collab Digital Twins\r\n\r\nimport helloBimManifest from './hello-bim/manifest.json'\r\nimport helloMapManifest from './hello-map/manifest.json'\r\n\r\nimport type { PluginManifest } from './sdk/types'\r\n\r\n/**\r\n * The manifests of the plugins compiled into this build, separate from\r\n * `installed.ts` so they can be read without their entry modules.\r\n *\r\n * `i18n/index.ts` collects plugin strings and is reachable from the server graph\r\n * through the `./messages` export, so it must read manifests without dragging in a\r\n * plugin's components and, with them, a viewer engine. Plain JSON, no runtime deps.\r\n */\r\nexport const PLUGIN_MANIFESTS: PluginManifest[] = [\r\n helloMapManifest as PluginManifest,\r\n helloBimManifest as PluginManifest,\r\n]\r\n"],"mappings":"AAGA,OAAO,sBAAsB;AAC7B,OAAO,sBAAsB;AAYtB,MAAM,mBAAqC;AAAA,EAChD;AAAA,EACA;AACF;","names":[]}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Plugin-owned strings, re-keyed from `manifest.messages[locale][key]` into
3
+ * `locale → slug → key`, the shape `coreMessages` needs. Keeping them in the
4
+ * manifest makes a plugin one file to write and one to hand a translator, and lets
5
+ * mounted plugins resolve identically at `plugins.<slug>.<key>`.
6
+ *
7
+ * A plugin with no `messages` contributes nothing and falls back to the inline
8
+ * English its components pass to `usePluginTranslations`.
9
+ */
10
+ export declare const pluginMessages: Record<string, Record<string, unknown>>;
11
+ export declare function collectPluginMessages(manifests: Array<{
12
+ slug: string;
13
+ messages?: Record<string, Record<string, unknown>>;
14
+ }>): Record<string, Record<string, unknown>>;
15
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/core/plugins/messages.ts"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAA2C,CAAA;AAE9G,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;CAAE,CAAC,GACrF,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAczC"}
@@ -0,0 +1,20 @@
1
+ import { PLUGIN_MANIFESTS } from "./manifests";
2
+ const pluginMessages = collectPluginMessages(PLUGIN_MANIFESTS);
3
+ function collectPluginMessages(manifests) {
4
+ var _a;
5
+ const byLocale = {};
6
+ for (const { slug, messages } of manifests) {
7
+ if (!messages) continue;
8
+ for (const [locale, strings] of Object.entries(messages)) {
9
+ if (!strings || typeof strings !== "object") continue;
10
+ (_a = byLocale[locale]) != null ? _a : byLocale[locale] = {};
11
+ byLocale[locale][slug] = strings;
12
+ }
13
+ }
14
+ return byLocale;
15
+ }
16
+ export {
17
+ collectPluginMessages,
18
+ pluginMessages
19
+ };
20
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/core/plugins/messages.ts"],"sourcesContent":["// SPDX-License-Identifier: AGPL-3.0-or-later\r\n// Copyright (C) 2025 Collab Digital Twins\r\n\r\nimport { PLUGIN_MANIFESTS } from './manifests'\r\n\r\n/**\r\n * Plugin-owned strings, re-keyed from `manifest.messages[locale][key]` into\r\n * `locale → slug → key`, the shape `coreMessages` needs. Keeping them in the\r\n * manifest makes a plugin one file to write and one to hand a translator, and lets\r\n * mounted plugins resolve identically at `plugins.<slug>.<key>`.\r\n *\r\n * A plugin with no `messages` contributes nothing and falls back to the inline\r\n * English its components pass to `usePluginTranslations`.\r\n */\r\nexport const pluginMessages: Record<string, Record<string, unknown>> = collectPluginMessages(PLUGIN_MANIFESTS)\r\n\r\nexport function collectPluginMessages(\r\n manifests: Array<{ slug: string; messages?: Record<string, Record<string, unknown>> }>,\r\n): Record<string, Record<string, unknown>> {\r\n const byLocale: Record<string, Record<string, unknown>> = {}\r\n\r\n for (const { slug, messages } of manifests) {\r\n if (!messages) continue\r\n\r\n for (const [locale, strings] of Object.entries(messages)) {\r\n if (!strings || typeof strings !== 'object') continue\r\n byLocale[locale] ??= {}\r\n byLocale[locale][slug] = strings\r\n }\r\n }\r\n\r\n return byLocale\r\n}\r\n"],"mappings":"AAGA,SAAS,wBAAwB;AAW1B,MAAM,iBAA0D,sBAAsB,gBAAgB;AAEtG,SAAS,sBACd,WACyC;AAlB3C;AAmBE,QAAM,WAAoD,CAAC;AAE3D,aAAW,EAAE,MAAM,SAAS,KAAK,WAAW;AAC1C,QAAI,CAAC,SAAU;AAEf,eAAW,CAAC,QAAQ,OAAO,KAAK,OAAO,QAAQ,QAAQ,GAAG;AACxD,UAAI,CAAC,WAAW,OAAO,YAAY,SAAU;AAC7C,gEAAqB,CAAC;AACtB,eAAS,MAAM,EAAE,IAAI,IAAI;AAAA,IAC3B;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
@@ -0,0 +1,64 @@
1
+ import type { BimItemProperties } from '../../components/viewers/bim/src/lib/bimQueries';
2
+ import type { ModelIdMap } from '../../components/viewers/bim/src/lib/bimTree';
3
+ import type * as OBC from '@thatopen/components';
4
+ /**
5
+ * The BIM viewer, as a plugin sees it. Kept out of the `plugins-sdk` barrel: it depends on
6
+ * `@thatopen/components` and three at runtime.
7
+ */
8
+ export interface BimToolProps {
9
+ components: OBC.Components | null;
10
+ world: OBC.World | null;
11
+ fragments: OBC.FragmentsManager | null;
12
+ /** Ids of every loaded model, in load order. */
13
+ modelIds: string[];
14
+ /** The live selection, keyed by model id. Updates as the user clicks in the viewport. */
15
+ selection: ModelIdMap;
16
+ select: (items: ModelIdMap) => Promise<void>;
17
+ clearSelection: () => void;
18
+ /** Frame the camera on whatever is currently selected. */
19
+ fitToSelection: () => Promise<void>;
20
+ /** Hides everything except `items`, across every loaded model. */
21
+ isolate: (items: ModelIdMap) => Promise<void>;
22
+ setItemsVisible: (items: ModelIdMap, visible: boolean) => Promise<void>;
23
+ /** The escape hatch from `isolate`: makes everything visible again. */
24
+ showAll: () => Promise<void>;
25
+ /**
26
+ * Every element of one IFC class, e.g. `getItemsOfCategory('IFCSPACE')`. Spaces
27
+ * start hidden, being volumetric, so showing them needs `setItemsVisible` too.
28
+ */
29
+ getItemsOfCategory: (category: string) => Promise<ModelIdMap>;
30
+ /** Attributes for the given elements. Omit `attributes` for the default set. */
31
+ getProperties: (items: ModelIdMap, attributes?: string[]) => Promise<BimItemProperties[]>;
32
+ }
33
+ /**
34
+ * Thin façade over the `lib/bim*` helpers core itself uses. Colour lives in
35
+ * {@link usePluginBimAppearance}, which knows the calling plugin; this cannot.
36
+ */
37
+ export declare function useBimViewer(): BimToolProps;
38
+ export interface BimAppearance {
39
+ /** `0xRRGGBB`. Omit to keep each element's own colour. */
40
+ color?: number;
41
+ /** `0`–`1`. Omit to leave elements opaque. */
42
+ opacity?: number;
43
+ }
44
+ /** One appearance and the elements wearing it. */
45
+ export interface BimAppearanceGroup {
46
+ items: ModelIdMap;
47
+ appearance: BimAppearance;
48
+ }
49
+ export interface PluginBimAppearance {
50
+ /**
51
+ * Every group in one call, replacing this plugin's previous paint. Calling it per group
52
+ * would replace that same entry each time and leave only the last. An empty list clears.
53
+ */
54
+ setAppearance: (groups: readonly BimAppearanceGroup[]) => void;
55
+ /** Gives this plugin's elements back their own colours. */
56
+ clearAppearance: () => void;
57
+ }
58
+ /**
59
+ * Colour and opacity, bucketed into one `highlight()` per appearance — per element would
60
+ * exhaust the model's ~65 500 material slots. Scoped to this plugin, outside the sidebar's undo.
61
+ */
62
+ export declare function usePluginBimAppearance(): PluginBimAppearance;
63
+ export type { ModelIdMap, BimItemProperties };
64
+ //# sourceMappingURL=bimViewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bimViewer.d.ts","sourceRoot":"","sources":["../../../../src/core/plugins/sdk/bimViewer.ts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iDAAiD,CAAA;AACxF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAA;AAC9E,OAAO,KAAK,KAAK,GAAG,MAAM,sBAAsB,CAAA;AAEhD;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,GAAG,CAAC,UAAU,GAAG,IAAI,CAAA;IACjC,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,IAAI,CAAA;IACvB,SAAS,EAAE,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAAA;IACtC,gDAAgD;IAChD,QAAQ,EAAE,MAAM,EAAE,CAAA;IAElB,yFAAyF;IACzF,SAAS,EAAE,UAAU,CAAA;IAGrB,MAAM,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5C,cAAc,EAAE,MAAM,IAAI,CAAA;IAC1B,0DAA0D;IAC1D,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAEnC,kEAAkE;IAClE,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7C,eAAe,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACvE,uEAAuE;IACvE,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAE5B;;;OAGG;IACH,kBAAkB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAA;IAC7D,gFAAgF;IAChF,aAAa,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAA;CAC1F;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,YAAY,CAoC3C;AAED,MAAM,WAAW,aAAa;IAC5B,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,kDAAkD;AAClD,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,UAAU,CAAA;IACjB,UAAU,EAAE,aAAa,CAAA;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,aAAa,EAAE,CAAC,MAAM,EAAE,SAAS,kBAAkB,EAAE,KAAK,IAAI,CAAA;IAC9D,2DAA2D;IAC3D,eAAe,EAAE,MAAM,IAAI,CAAA;CAC5B;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,mBAAmB,CAa5D;AAED,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAA"}
@@ -0,0 +1,66 @@
1
+ "use client";
2
+ import * as React from "react";
3
+ import { ElementAppearance } from "../../components/viewers/bim/src/ElementAppearance";
4
+ import { fitToSelection } from "../../components/viewers/bim/src/lib/bimCamera";
5
+ import {
6
+ clearSelection,
7
+ isolateItems,
8
+ selectItems,
9
+ setItemsVisible,
10
+ showAllItems
11
+ } from "../../components/viewers/bim/src/lib/bimItemActions";
12
+ import {
13
+ getItemProperties,
14
+ getItemsOfCategory
15
+ } from "../../components/viewers/bim/src/lib/bimQueries";
16
+ import { BimContext } from "../../store/BIM/context";
17
+ import { usePluginId } from "../host/scope";
18
+ function useBimViewer() {
19
+ const { state } = React.useContext(BimContext);
20
+ const { bimComponents, world, fragments, modelIds, selection } = state.bim;
21
+ return React.useMemo(() => ({
22
+ components: bimComponents,
23
+ world,
24
+ fragments,
25
+ modelIds,
26
+ selection,
27
+ select: async (items) => {
28
+ if (bimComponents) await selectItems(bimComponents, items);
29
+ },
30
+ clearSelection: () => {
31
+ if (bimComponents) clearSelection(bimComponents);
32
+ },
33
+ fitToSelection: async () => {
34
+ if (bimComponents) await fitToSelection(bimComponents);
35
+ },
36
+ isolate: async (items) => {
37
+ if (bimComponents) await isolateItems(bimComponents, items);
38
+ },
39
+ setItemsVisible: async (items, visible) => {
40
+ if (bimComponents) await setItemsVisible(bimComponents, items, visible);
41
+ },
42
+ showAll: async () => {
43
+ if (bimComponents) await showAllItems(bimComponents);
44
+ },
45
+ getItemsOfCategory: async (category) => bimComponents ? getItemsOfCategory(bimComponents, category) : {},
46
+ getProperties: async (items, attributes) => bimComponents ? getItemProperties(bimComponents, items, attributes) : []
47
+ }), [bimComponents, world, fragments, modelIds, selection]);
48
+ }
49
+ function usePluginBimAppearance() {
50
+ const pluginId = usePluginId();
51
+ const { state } = React.useContext(BimContext);
52
+ const { bimComponents } = state.bim;
53
+ return React.useMemo(() => ({
54
+ setAppearance: (groups) => {
55
+ bimComponents == null ? void 0 : bimComponents.get(ElementAppearance).setElementAppearance(pluginId, groups);
56
+ },
57
+ clearAppearance: () => {
58
+ bimComponents == null ? void 0 : bimComponents.get(ElementAppearance).clearElementAppearance(pluginId);
59
+ }
60
+ }), [bimComponents, pluginId]);
61
+ }
62
+ export {
63
+ useBimViewer,
64
+ usePluginBimAppearance
65
+ };
66
+ //# sourceMappingURL=bimViewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/core/plugins/sdk/bimViewer.ts"],"sourcesContent":["'use client'\r\n\r\n// SPDX-License-Identifier: AGPL-3.0-or-later\r\n// Copyright (C) 2025 Collab Digital Twins\r\n\r\nimport * as React from 'react'\r\n\r\nimport { ElementAppearance } from '../../components/viewers/bim/src/ElementAppearance'\r\nimport { fitToSelection } from '../../components/viewers/bim/src/lib/bimCamera'\r\nimport {\r\n clearSelection,\r\n isolateItems,\r\n selectItems,\r\n setItemsVisible,\r\n showAllItems,\r\n} from '../../components/viewers/bim/src/lib/bimItemActions'\r\nimport {\r\n getItemProperties,\r\n getItemsOfCategory,\r\n} from '../../components/viewers/bim/src/lib/bimQueries'\r\nimport { BimContext } from '../../store/BIM/context'\r\nimport { usePluginId } from '../host/scope'\r\n\r\nimport type { BimItemProperties } from '../../components/viewers/bim/src/lib/bimQueries'\r\nimport type { ModelIdMap } from '../../components/viewers/bim/src/lib/bimTree'\r\nimport type * as OBC from '@thatopen/components'\r\n\r\n/**\r\n * The BIM viewer, as a plugin sees it. Kept out of the `plugins-sdk` barrel: it depends on\r\n * `@thatopen/components` and three at runtime.\r\n */\r\nexport interface BimToolProps {\r\n components: OBC.Components | null\r\n world: OBC.World | null\r\n fragments: OBC.FragmentsManager | null\r\n /** Ids of every loaded model, in load order. */\r\n modelIds: string[]\r\n\r\n /** The live selection, keyed by model id. Updates as the user clicks in the viewport. */\r\n selection: ModelIdMap\r\n\r\n // Properties, not methods, so a plugin can destructure them safely.\r\n select: (items: ModelIdMap) => Promise<void>\r\n clearSelection: () => void\r\n /** Frame the camera on whatever is currently selected. */\r\n fitToSelection: () => Promise<void>\r\n\r\n /** Hides everything except `items`, across every loaded model. */\r\n isolate: (items: ModelIdMap) => Promise<void>\r\n setItemsVisible: (items: ModelIdMap, visible: boolean) => Promise<void>\r\n /** The escape hatch from `isolate`: makes everything visible again. */\r\n showAll: () => Promise<void>\r\n\r\n /**\r\n * Every element of one IFC class, e.g. `getItemsOfCategory('IFCSPACE')`. Spaces\r\n * start hidden, being volumetric, so showing them needs `setItemsVisible` too.\r\n */\r\n getItemsOfCategory: (category: string) => Promise<ModelIdMap>\r\n /** Attributes for the given elements. Omit `attributes` for the default set. */\r\n getProperties: (items: ModelIdMap, attributes?: string[]) => Promise<BimItemProperties[]>\r\n}\r\n\r\n/**\r\n * Thin façade over the `lib/bim*` helpers core itself uses. Colour lives in\r\n * {@link usePluginBimAppearance}, which knows the calling plugin; this cannot.\r\n */\r\nexport function useBimViewer(): BimToolProps {\r\n const { state } = React.useContext(BimContext)\r\n const { bimComponents, world, fragments, modelIds, selection } = state.bim\r\n\r\n return React.useMemo<BimToolProps>(() => ({\r\n components: bimComponents,\r\n world,\r\n fragments,\r\n modelIds,\r\n selection,\r\n\r\n select: async (items: ModelIdMap) => {\r\n if (bimComponents) await selectItems(bimComponents, items)\r\n },\r\n clearSelection: () => {\r\n if (bimComponents) clearSelection(bimComponents)\r\n },\r\n fitToSelection: async () => {\r\n if (bimComponents) await fitToSelection(bimComponents)\r\n },\r\n\r\n isolate: async (items: ModelIdMap) => {\r\n if (bimComponents) await isolateItems(bimComponents, items)\r\n },\r\n setItemsVisible: async (items: ModelIdMap, visible: boolean) => {\r\n if (bimComponents) await setItemsVisible(bimComponents, items, visible)\r\n },\r\n showAll: async () => {\r\n if (bimComponents) await showAllItems(bimComponents)\r\n },\r\n\r\n getItemsOfCategory: async (category: string) =>\r\n bimComponents ? getItemsOfCategory(bimComponents, category) : {},\r\n getProperties: async (items: ModelIdMap, attributes?: string[]) =>\r\n bimComponents ? getItemProperties(bimComponents, items, attributes) : [],\r\n }), [bimComponents, world, fragments, modelIds, selection])\r\n}\r\n\r\nexport interface BimAppearance {\r\n /** `0xRRGGBB`. Omit to keep each element's own colour. */\r\n color?: number\r\n /** `0`–`1`. Omit to leave elements opaque. */\r\n opacity?: number\r\n}\r\n\r\n/** One appearance and the elements wearing it. */\r\nexport interface BimAppearanceGroup {\r\n items: ModelIdMap\r\n appearance: BimAppearance\r\n}\r\n\r\nexport interface PluginBimAppearance {\r\n /**\r\n * Every group in one call, replacing this plugin's previous paint. Calling it per group\r\n * would replace that same entry each time and leave only the last. An empty list clears.\r\n */\r\n setAppearance: (groups: readonly BimAppearanceGroup[]) => void\r\n /** Gives this plugin's elements back their own colours. */\r\n clearAppearance: () => void\r\n}\r\n\r\n/**\r\n * Colour and opacity, bucketed into one `highlight()` per appearance — per element would\r\n * exhaust the model's ~65 500 material slots. Scoped to this plugin, outside the sidebar's undo.\r\n */\r\nexport function usePluginBimAppearance(): PluginBimAppearance {\r\n const pluginId = usePluginId()\r\n const { state } = React.useContext(BimContext)\r\n const { bimComponents } = state.bim\r\n\r\n return React.useMemo<PluginBimAppearance>(() => ({\r\n setAppearance: (groups: readonly BimAppearanceGroup[]) => {\r\n bimComponents?.get(ElementAppearance).setElementAppearance(pluginId, groups)\r\n },\r\n clearAppearance: () => {\r\n bimComponents?.get(ElementAppearance).clearElementAppearance(pluginId)\r\n },\r\n }), [bimComponents, pluginId])\r\n}\r\n\r\nexport type { ModelIdMap, BimItemProperties }\r\n"],"mappings":";AAKA,YAAY,WAAW;AAEvB,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,kBAAkB;AAC3B,SAAS,mBAAmB;AA6CrB,SAAS,eAA6B;AAC3C,QAAM,EAAE,MAAM,IAAI,MAAM,WAAW,UAAU;AAC7C,QAAM,EAAE,eAAe,OAAO,WAAW,UAAU,UAAU,IAAI,MAAM;AAEvE,SAAO,MAAM,QAAsB,OAAO;AAAA,IACxC,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEA,QAAQ,OAAO,UAAsB;AACnC,UAAI,cAAe,OAAM,YAAY,eAAe,KAAK;AAAA,IAC3D;AAAA,IACA,gBAAgB,MAAM;AACpB,UAAI,cAAe,gBAAe,aAAa;AAAA,IACjD;AAAA,IACA,gBAAgB,YAAY;AAC1B,UAAI,cAAe,OAAM,eAAe,aAAa;AAAA,IACvD;AAAA,IAEA,SAAS,OAAO,UAAsB;AACpC,UAAI,cAAe,OAAM,aAAa,eAAe,KAAK;AAAA,IAC5D;AAAA,IACA,iBAAiB,OAAO,OAAmB,YAAqB;AAC9D,UAAI,cAAe,OAAM,gBAAgB,eAAe,OAAO,OAAO;AAAA,IACxE;AAAA,IACA,SAAS,YAAY;AACnB,UAAI,cAAe,OAAM,aAAa,aAAa;AAAA,IACrD;AAAA,IAEA,oBAAoB,OAAO,aACzB,gBAAgB,mBAAmB,eAAe,QAAQ,IAAI,CAAC;AAAA,IACjE,eAAe,OAAO,OAAmB,eACvC,gBAAgB,kBAAkB,eAAe,OAAO,UAAU,IAAI,CAAC;AAAA,EAC3E,IAAI,CAAC,eAAe,OAAO,WAAW,UAAU,SAAS,CAAC;AAC5D;AA6BO,SAAS,yBAA8C;AAC5D,QAAM,WAAW,YAAY;AAC7B,QAAM,EAAE,MAAM,IAAI,MAAM,WAAW,UAAU;AAC7C,QAAM,EAAE,cAAc,IAAI,MAAM;AAEhC,SAAO,MAAM,QAA6B,OAAO;AAAA,IAC/C,eAAe,CAAC,WAA0C;AACxD,qDAAe,IAAI,mBAAmB,qBAAqB,UAAU;AAAA,IACvE;AAAA,IACA,iBAAiB,MAAM;AACrB,qDAAe,IAAI,mBAAmB,uBAAuB;AAAA,IAC/D;AAAA,EACF,IAAI,CAAC,eAAe,QAAQ,CAAC;AAC/B;","names":[]}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * A plugin's own configuration and identity.
3
+ *
4
+ * Re-exported from the scope module rather than from the plugin host on purpose.
5
+ * `installed.ts` imports plugin components, so anything a plugin component
6
+ * imports must not reach back to the host — that cycle leaves the bindings
7
+ * undefined by the time the plugin renders.
8
+ */
9
+ export { usePluginConfig, usePluginId } from '../host/scope';
10
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../src/core/plugins/sdk/config.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA"}
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import { usePluginConfig, usePluginId } from "../host/scope";
3
+ export {
4
+ usePluginConfig,
5
+ usePluginId
6
+ };
7
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/core/plugins/sdk/config.ts"],"sourcesContent":["'use client'\r\n\r\n// SPDX-License-Identifier: AGPL-3.0-or-later\r\n// Copyright (C) 2025 Collab Digital Twins\r\n\r\n/**\r\n * A plugin's own configuration and identity.\r\n *\r\n * Re-exported from the scope module rather than from the plugin host on purpose.\r\n * `installed.ts` imports plugin components, so anything a plugin component\r\n * imports must not reach back to the host — that cycle leaves the bindings\r\n * undefined by the time the plugin renders.\r\n */\r\nexport { usePluginConfig, usePluginId } from '../host/scope'\r\n"],"mappings":";AAaA,SAAS,iBAAiB,mBAAmB;","names":[]}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Data access for plugins: core's own bound hooks, re-exported. A plugin goes
3
+ * through the same `ApiAdapter` as everything else and inherits its auth, org
4
+ * scoping and SWR cache — no second data path, and no way past the tenant boundary.
5
+ *
6
+ * Read-only where the write belongs to core: buildings and sites are canonical asset
7
+ * records, so changing them is a core change. Sensors and comments are read-write,
8
+ * being the domains plugins are expected to author. A plugin's own data goes in
9
+ * `plugins-sdk/store`.
10
+ */
11
+ export { useBuildings, useBuilding, useBuildingsByOsm, useBuildingOsmIds, } from '../../hooks/buildings/buildings';
12
+ export { useSites, useSite } from '../../hooks/sites/sites';
13
+ export { useInfrastructures, useInfrastructure } from '../../hooks/infrastructures/infrastructures';
14
+ export { useOrganization, useOrganizationByName } from '../../hooks/organizations/organizations';
15
+ export { useFiles, useFile, useFilesByBuildingId, useFilesBySiteId, useDownloadFile, } from '../../hooks/files/files';
16
+ export { useSensors, useSensor, useSensorsByBuilding, useSensorsByAuthor, useCreateSensor, } from '../../hooks/sensors/sensors';
17
+ export { useSensorTypes, useSensorType } from '../../hooks/sensorTypes/sensorTypes';
18
+ export { useComments, useComment, useCommentsByBuilding, useCommentsByAuthor, useCreateComment, useDeleteComments, } from '../../hooks/comments/comments';
19
+ /** The plugin's config for this organization, shaped by the manifest's `configSchema`. */
20
+ export { usePluginConfig } from './config';
21
+ export { usePluginPermissions } from './permissions';
22
+ //# sourceMappingURL=data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/core/plugins/sdk/data.ts"],"names":[],"mappings":"AAKA;;;;;;;;;GASG;AAGH,OAAO,EACL,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAA;AAGnG,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAA;AAChG,OAAO,EACL,QAAQ,EACR,OAAO,EACP,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,GAChB,MAAM,yBAAyB,CAAA;AAGhC,OAAO,EACL,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,GAChB,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AAGnF,OAAO,EACL,WAAW,EACX,UAAU,EACV,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,+BAA+B,CAAA;AAItC,0FAA0F;AAC1F,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA"}
@@ -0,0 +1,68 @@
1
+ "use client";
2
+ import {
3
+ useBuildings,
4
+ useBuilding,
5
+ useBuildingsByOsm,
6
+ useBuildingOsmIds
7
+ } from "../../hooks/buildings/buildings";
8
+ import { useSites, useSite } from "../../hooks/sites/sites";
9
+ import { useInfrastructures, useInfrastructure } from "../../hooks/infrastructures/infrastructures";
10
+ import { useOrganization, useOrganizationByName } from "../../hooks/organizations/organizations";
11
+ import {
12
+ useFiles,
13
+ useFile,
14
+ useFilesByBuildingId,
15
+ useFilesBySiteId,
16
+ useDownloadFile
17
+ } from "../../hooks/files/files";
18
+ import {
19
+ useSensors,
20
+ useSensor,
21
+ useSensorsByBuilding,
22
+ useSensorsByAuthor,
23
+ useCreateSensor
24
+ } from "../../hooks/sensors/sensors";
25
+ import { useSensorTypes, useSensorType } from "../../hooks/sensorTypes/sensorTypes";
26
+ import {
27
+ useComments,
28
+ useComment,
29
+ useCommentsByBuilding,
30
+ useCommentsByAuthor,
31
+ useCreateComment,
32
+ useDeleteComments
33
+ } from "../../hooks/comments/comments";
34
+ import { usePluginConfig } from "./config";
35
+ import { usePluginPermissions } from "./permissions";
36
+ export {
37
+ useBuilding,
38
+ useBuildingOsmIds,
39
+ useBuildings,
40
+ useBuildingsByOsm,
41
+ useComment,
42
+ useComments,
43
+ useCommentsByAuthor,
44
+ useCommentsByBuilding,
45
+ useCreateComment,
46
+ useCreateSensor,
47
+ useDeleteComments,
48
+ useDownloadFile,
49
+ useFile,
50
+ useFiles,
51
+ useFilesByBuildingId,
52
+ useFilesBySiteId,
53
+ useInfrastructure,
54
+ useInfrastructures,
55
+ useOrganization,
56
+ useOrganizationByName,
57
+ usePluginConfig,
58
+ usePluginPermissions,
59
+ useSensor,
60
+ useSensorType,
61
+ useSensorTypes,
62
+ useSensors,
63
+ useSensorsByAuthor,
64
+ useSensorsByBuilding,
65
+ useSite,
66
+ useSites
67
+ };
68
+ //# sourceMappingURL=data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/core/plugins/sdk/data.ts"],"sourcesContent":["'use client'\r\n\r\n// SPDX-License-Identifier: AGPL-3.0-or-later\r\n// Copyright (C) 2025 Collab Digital Twins\r\n\r\n/**\r\n * Data access for plugins: core's own bound hooks, re-exported. A plugin goes\r\n * through the same `ApiAdapter` as everything else and inherits its auth, org\r\n * scoping and SWR cache — no second data path, and no way past the tenant boundary.\r\n *\r\n * Read-only where the write belongs to core: buildings and sites are canonical asset\r\n * records, so changing them is a core change. Sensors and comments are read-write,\r\n * being the domains plugins are expected to author. A plugin's own data goes in\r\n * `plugins-sdk/store`.\r\n */\r\n\r\n// --- Read: assets -----------------------------------------------------------\r\nexport {\r\n useBuildings,\r\n useBuilding,\r\n useBuildingsByOsm,\r\n useBuildingOsmIds,\r\n} from '../../hooks/buildings/buildings'\r\nexport { useSites, useSite } from '../../hooks/sites/sites'\r\nexport { useInfrastructures, useInfrastructure } from '../../hooks/infrastructures/infrastructures'\r\n\r\n// --- Read: organization and files ------------------------------------------\r\nexport { useOrganization, useOrganizationByName } from '../../hooks/organizations/organizations'\r\nexport {\r\n useFiles,\r\n useFile,\r\n useFilesByBuildingId,\r\n useFilesBySiteId,\r\n useDownloadFile,\r\n} from '../../hooks/files/files'\r\n\r\n// --- Read/write: sensors ----------------------------------------------------\r\nexport {\r\n useSensors,\r\n useSensor,\r\n useSensorsByBuilding,\r\n useSensorsByAuthor,\r\n useCreateSensor,\r\n} from '../../hooks/sensors/sensors'\r\nexport { useSensorTypes, useSensorType } from '../../hooks/sensorTypes/sensorTypes'\r\n\r\n// --- Read/write: comments ---------------------------------------------------\r\nexport {\r\n useComments,\r\n useComment,\r\n useCommentsByBuilding,\r\n useCommentsByAuthor,\r\n useCreateComment,\r\n useDeleteComments,\r\n} from '../../hooks/comments/comments'\r\n\r\n// --- Plugin context ---------------------------------------------------------\r\n\r\n/** The plugin's config for this organization, shaped by the manifest's `configSchema`. */\r\nexport { usePluginConfig } from './config'\r\n\r\nexport { usePluginPermissions } from './permissions'\r\n"],"mappings":";AAiBA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,UAAU,eAAe;AAClC,SAAS,oBAAoB,yBAAyB;AAGtD,SAAS,iBAAiB,6BAA6B;AACvD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,gBAAgB,qBAAqB;AAG9C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAKP,SAAS,uBAAuB;AAEhC,SAAS,4BAA4B;","names":[]}
@@ -1,3 +1,7 @@
1
1
  export * from './types';
2
+ export * from './version';
2
3
  export * from './components';
4
+ export { MAP_COLOUR_PALETTE, stringToColour } from '../../components/viewers/map/utils/stringToColour';
5
+ export { PLUGIN_RUNTIME_SHIMS, PLUGIN_EXTERNALS } from '../host/runtimeShims';
6
+ export type { RuntimeShim } from '../host/runtimeShims';
3
7
  //# sourceMappingURL=index.d.ts.map