@oicl/openbridge-webcomponents-full-bundle 2.2.0-next.22 → 2.2.0-next.23

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 (338) hide show
  1. package/custom-elements-manifest.config.mjs +2 -1
  2. package/custom-elements.json +312 -17
  3. package/llms/components/obc-accordion-card.md +141 -0
  4. package/llms/components/obc-accordion-item.md +90 -0
  5. package/llms/components/obc-advice-button.md +87 -0
  6. package/llms/components/obc-advice-floating-item.md +113 -0
  7. package/llms/components/obc-advice-menu-item.md +87 -0
  8. package/llms/components/obc-advice-message-item.md +138 -0
  9. package/llms/components/obc-alert-button-item.md +117 -0
  10. package/llms/components/obc-alert-button.md +134 -0
  11. package/llms/components/obc-alert-counter-item.md +74 -0
  12. package/llms/components/obc-alert-detail-page.md +45 -0
  13. package/llms/components/obc-alert-floating-item.md +53 -0
  14. package/llms/components/obc-alert-frame.md +142 -0
  15. package/llms/components/obc-alert-icon.md +79 -0
  16. package/llms/components/obc-alert-list-details-experimental.md +89 -0
  17. package/llms/components/obc-alert-list-details.md +38 -0
  18. package/llms/components/obc-alert-list-page-small.md +39 -0
  19. package/llms/components/obc-alert-list.md +37 -0
  20. package/llms/components/obc-alert-menu-item.md +128 -0
  21. package/llms/components/obc-alert-menu.md +115 -0
  22. package/llms/components/obc-alert-subsystem-button.md +88 -0
  23. package/llms/components/obc-alert-subsystem-counter.md +110 -0
  24. package/llms/components/obc-analog-threeway-valve.md +106 -0
  25. package/llms/components/obc-analog-valve.md +74 -0
  26. package/llms/components/obc-app-button.md +83 -0
  27. package/llms/components/obc-app-menu.md +69 -0
  28. package/llms/components/obc-area-graph.md +333 -0
  29. package/llms/components/obc-attachment-list-item.md +49 -0
  30. package/llms/components/obc-audio-output.md +59 -0
  31. package/llms/components/obc-audio-recording-item.md +91 -0
  32. package/llms/components/obc-automation-badge.md +66 -0
  33. package/llms/components/obc-automation-button-readout-stack.md +71 -0
  34. package/llms/components/obc-automation-button.md +86 -0
  35. package/llms/components/obc-automation-input-modal.md +48 -0
  36. package/llms/components/obc-automation-readout.md +32 -0
  37. package/llms/components/obc-automation-tank.md +156 -0
  38. package/llms/components/obc-azimuth-thruster-labeled.md +56 -0
  39. package/llms/components/obc-azimuth-thruster.md +80 -0
  40. package/llms/components/obc-badge-command.md +26 -0
  41. package/llms/components/obc-badge.md +151 -0
  42. package/llms/components/obc-bar-horizontal.md +123 -0
  43. package/llms/components/obc-bar-vertical.md +125 -0
  44. package/llms/components/obc-battery-icon.md +38 -0
  45. package/llms/components/obc-bearing-indicator.md +27 -0
  46. package/llms/components/obc-bipolar-transistor.md +64 -0
  47. package/llms/components/obc-breadcrumb.md +58 -0
  48. package/llms/components/obc-brilliance-menu.md +115 -0
  49. package/llms/components/obc-bus.md +64 -0
  50. package/llms/components/obc-button.md +110 -0
  51. package/llms/components/obc-calendar.md +91 -0
  52. package/llms/components/obc-capacitor.md +64 -0
  53. package/llms/components/obc-card.md +103 -0
  54. package/llms/components/obc-chart-object-vessel-button.md +103 -0
  55. package/llms/components/obc-chat-message.md +35 -0
  56. package/llms/components/obc-check-button.md +104 -0
  57. package/llms/components/obc-checkbox-item.md +95 -0
  58. package/llms/components/obc-checkbox-list.md +73 -0
  59. package/llms/components/obc-checkbox.md +97 -0
  60. package/llms/components/obc-circular-progress.md +36 -0
  61. package/llms/components/obc-clock.md +86 -0
  62. package/llms/components/obc-command-button.md +56 -0
  63. package/llms/components/obc-command-menu.md +135 -0
  64. package/llms/components/obc-communication-table.md +31 -0
  65. package/llms/components/obc-compass-flat.md +79 -0
  66. package/llms/components/obc-compass-indicator.md +61 -0
  67. package/llms/components/obc-compass-sector.md +110 -0
  68. package/llms/components/obc-compass.md +157 -0
  69. package/llms/components/obc-context-menu-input.md +191 -0
  70. package/llms/components/obc-converter.md +64 -0
  71. package/llms/components/obc-corner-line.md +29 -0
  72. package/llms/components/obc-current.md +79 -0
  73. package/llms/components/obc-damper.md +62 -0
  74. package/llms/components/obc-date-item.md +66 -0
  75. package/llms/components/obc-depth-actual.md +69 -0
  76. package/llms/components/obc-depth-indicator.md +31 -0
  77. package/llms/components/obc-depth-top-band.md +43 -0
  78. package/llms/components/obc-depth.md +94 -0
  79. package/llms/components/obc-diagnostic-button.md +71 -0
  80. package/llms/components/obc-diagnostic-menu.md +88 -0
  81. package/llms/components/obc-digital-threeway-valve.md +112 -0
  82. package/llms/components/obc-digital-valve.md +78 -0
  83. package/llms/components/obc-diodes.md +64 -0
  84. package/llms/components/obc-direction-line.md +28 -0
  85. package/llms/components/obc-divider.md +44 -0
  86. package/llms/components/obc-donut-chart.md +116 -0
  87. package/llms/components/obc-draft-trim.md +67 -0
  88. package/llms/components/obc-dropdown-button.md +99 -0
  89. package/llms/components/obc-electricity-battery.md +83 -0
  90. package/llms/components/obc-elevated-card-radio-group.md +103 -0
  91. package/llms/components/obc-elevated-card-radio.md +104 -0
  92. package/llms/components/obc-elevated-card.md +146 -0
  93. package/llms/components/obc-end-point-line.md +29 -0
  94. package/llms/components/obc-event-item.md +47 -0
  95. package/llms/components/obc-event-list.md +37 -0
  96. package/llms/components/obc-fan.md +68 -0
  97. package/llms/components/obc-filter-chip.md +91 -0
  98. package/llms/components/obc-filter.md +64 -0
  99. package/llms/components/obc-floating-item.md +125 -0
  100. package/llms/components/obc-form-container.md +45 -0
  101. package/llms/components/obc-form-footer-container.md +34 -0
  102. package/llms/components/obc-form-group.md +80 -0
  103. package/llms/components/obc-form-item.md +95 -0
  104. package/llms/components/obc-gauge-bar-indicator.md +46 -0
  105. package/llms/components/obc-gauge-generator.md +102 -0
  106. package/llms/components/obc-gauge-horizontal.md +169 -0
  107. package/llms/components/obc-gauge-motors-and-pumps.md +110 -0
  108. package/llms/components/obc-gauge-proportional.md +134 -0
  109. package/llms/components/obc-gauge-radial-indicator.md +76 -0
  110. package/llms/components/obc-gauge-radial.md +163 -0
  111. package/llms/components/obc-gauge-trend-indicator.md +53 -0
  112. package/llms/components/obc-gauge-trend.md +271 -0
  113. package/llms/components/obc-gauge-valve.md +114 -0
  114. package/llms/components/obc-gauge-vertical.md +169 -0
  115. package/llms/components/obc-gnss-skyplot.md +80 -0
  116. package/llms/components/obc-graph-mini.md +28 -0
  117. package/llms/components/obc-ground.md +64 -0
  118. package/llms/components/obc-heading-indicator.md +42 -0
  119. package/llms/components/obc-heading.md +106 -0
  120. package/llms/components/obc-heat-exchanger.md +80 -0
  121. package/llms/components/obc-heat-pump.md +79 -0
  122. package/llms/components/obc-heave-indicator.md +38 -0
  123. package/llms/components/obc-heave.md +60 -0
  124. package/llms/components/obc-horizontal-line.md +29 -0
  125. package/llms/components/obc-hydraulic-check-valve.md +36 -0
  126. package/llms/components/obc-hydraulic-separator.md +80 -0
  127. package/llms/components/obc-hydraulic-valve-4-3.md +71 -0
  128. package/llms/components/obc-hydraulic-valve-x-2.md +68 -0
  129. package/llms/components/obc-icon-button.md +117 -0
  130. package/llms/components/obc-icon-check-button.md +85 -0
  131. package/llms/components/obc-indicator-battery.md +69 -0
  132. package/llms/components/obc-indicator-engine.md +39 -0
  133. package/llms/components/obc-indicator-generator.md +59 -0
  134. package/llms/components/obc-indicator-graph.md +33 -0
  135. package/llms/components/obc-indicator-tank-atmospheric.md +69 -0
  136. package/llms/components/obc-input-chip.md +96 -0
  137. package/llms/components/obc-instrument-field.md +172 -0
  138. package/llms/components/obc-instrument-radial.md +77 -0
  139. package/llms/components/obc-integration-app-bar.md +41 -0
  140. package/llms/components/obc-integration-bar-dropdown.md +71 -0
  141. package/llms/components/obc-integration-bar.md +72 -0
  142. package/llms/components/obc-integration-button.md +62 -0
  143. package/llms/components/obc-integration-dropdown-button.md +75 -0
  144. package/llms/components/obc-integration-fleet-button.md +41 -0
  145. package/llms/components/obc-integration-tabs.md +28 -0
  146. package/llms/components/obc-integration-vessel-menu.md +58 -0
  147. package/llms/components/obc-integration-vessel-selector.md +32 -0
  148. package/llms/components/obc-keyboard-full.md +175 -0
  149. package/llms/components/obc-keyboard-numeric.md +77 -0
  150. package/llms/components/obc-line-cross.md +28 -0
  151. package/llms/components/obc-line-graph.md +164 -0
  152. package/llms/components/obc-line-overlap.md +28 -0
  153. package/llms/components/obc-logic.md +64 -0
  154. package/llms/components/obc-main-engine-indicator.md +55 -0
  155. package/llms/components/obc-main-engine.md +54 -0
  156. package/llms/components/obc-menu-button.md +158 -0
  157. package/llms/components/obc-message-menu-item.md +165 -0
  158. package/llms/components/obc-modal-window.md +139 -0
  159. package/llms/components/obc-mosfet.md +64 -0
  160. package/llms/components/obc-motor.md +73 -0
  161. package/llms/components/obc-navigation-item-group.md +82 -0
  162. package/llms/components/obc-navigation-item.md +138 -0
  163. package/llms/components/obc-navigation-menu.md +135 -0
  164. package/llms/components/obc-non-return-valve.md +79 -0
  165. package/llms/components/obc-notification-badge-button.md +87 -0
  166. package/llms/components/obc-notification-button.md +92 -0
  167. package/llms/components/obc-notification-floating-item.md +121 -0
  168. package/llms/components/obc-notification-menu-item.md +87 -0
  169. package/llms/components/obc-notification-message-item.md +127 -0
  170. package/llms/components/obc-number-input-field.md +97 -0
  171. package/llms/components/obc-pagination.md +95 -0
  172. package/llms/components/obc-pie-chart.md +120 -0
  173. package/llms/components/obc-pitch-indicator.md +39 -0
  174. package/llms/components/obc-pitch-roll-heave.md +86 -0
  175. package/llms/components/obc-pitch-roll-yaw.md +72 -0
  176. package/llms/components/obc-pitch-roll.md +63 -0
  177. package/llms/components/obc-pitch.md +81 -0
  178. package/llms/components/obc-pivot-item-group.md +79 -0
  179. package/llms/components/obc-pivot-item.md +75 -0
  180. package/llms/components/obc-poi-aton.md +68 -0
  181. package/llms/components/obc-poi-button-aton.md +54 -0
  182. package/llms/components/obc-poi-button-data.md +53 -0
  183. package/llms/components/obc-poi-button-vessel.md +55 -0
  184. package/llms/components/obc-poi-button.md +94 -0
  185. package/llms/components/obc-poi-card-header.md +90 -0
  186. package/llms/components/obc-poi-card.md +110 -0
  187. package/llms/components/obc-poi-controller.md +151 -0
  188. package/llms/components/obc-poi-data.md +72 -0
  189. package/llms/components/obc-poi-graphic-line.md +70 -0
  190. package/llms/components/obc-poi-group.md +85 -0
  191. package/llms/components/obc-poi-header.md +71 -0
  192. package/llms/components/obc-poi-layer-stack.md +85 -0
  193. package/llms/components/obc-poi-layer.md +110 -0
  194. package/llms/components/obc-poi-line.md +70 -0
  195. package/llms/components/obc-poi-object-aton.md +45 -0
  196. package/llms/components/obc-poi-object-data.md +48 -0
  197. package/llms/components/obc-poi-object-vessel.md +95 -0
  198. package/llms/components/obc-poi-object.md +82 -0
  199. package/llms/components/obc-poi-pointer.md +70 -0
  200. package/llms/components/obc-poi-selection-frame.md +66 -0
  201. package/llms/components/obc-poi-vessel.md +70 -0
  202. package/llms/components/obc-poi.md +140 -0
  203. package/llms/components/obc-polar-chart.md +126 -0
  204. package/llms/components/obc-position-deviation.md +84 -0
  205. package/llms/components/obc-pressure-reduction-valve.md +88 -0
  206. package/llms/components/obc-pressure-sustain-valve.md +85 -0
  207. package/llms/components/obc-progress-bar.md +102 -0
  208. package/llms/components/obc-progress-button.md +111 -0
  209. package/llms/components/obc-progress-indicator-dots.md +57 -0
  210. package/llms/components/obc-propulsion-azimuth-indicator.md +48 -0
  211. package/llms/components/obc-pump.md +76 -0
  212. package/llms/components/obc-radial-bar-chart.md +103 -0
  213. package/llms/components/obc-radio.md +82 -0
  214. package/llms/components/obc-rate-of-turn.md +95 -0
  215. package/llms/components/obc-readout-block.md +137 -0
  216. package/llms/components/obc-readout-list-item.md +142 -0
  217. package/llms/components/obc-readout-list.md +85 -0
  218. package/llms/components/obc-readout.md +169 -0
  219. package/llms/components/obc-resistor.md +64 -0
  220. package/llms/components/obc-rich-button.md +92 -0
  221. package/llms/components/obc-roll-indicator.md +38 -0
  222. package/llms/components/obc-roll.md +56 -0
  223. package/llms/components/obc-rot-indicator.md +32 -0
  224. package/llms/components/obc-rot-linear.md +68 -0
  225. package/llms/components/obc-rot-sector.md +125 -0
  226. package/llms/components/obc-router.md +64 -0
  227. package/llms/components/obc-rudder-indicator.md +54 -0
  228. package/llms/components/obc-rudder.md +112 -0
  229. package/llms/components/obc-ruler-pointer.md +57 -0
  230. package/llms/components/obc-scrollbar.md +57 -0
  231. package/llms/components/obc-sequence-card.md +119 -0
  232. package/llms/components/obc-sequence-connector.md +70 -0
  233. package/llms/components/obc-sequence-item.md +64 -0
  234. package/llms/components/obc-sequence-loading-spinner.md +70 -0
  235. package/llms/components/obc-sequence-modal.md +89 -0
  236. package/llms/components/obc-sequence-step.md +48 -0
  237. package/llms/components/obc-sequence-toolbar.md +108 -0
  238. package/llms/components/obc-slide-button.md +111 -0
  239. package/llms/components/obc-slider-double.md +137 -0
  240. package/llms/components/obc-slider.md +143 -0
  241. package/llms/components/obc-source.md +64 -0
  242. package/llms/components/obc-speed-arrows.md +39 -0
  243. package/llms/components/obc-speed-directions.md +66 -0
  244. package/llms/components/obc-speed-gauge.md +124 -0
  245. package/llms/components/obc-speed-indicator.md +37 -0
  246. package/llms/components/obc-split-button.md +144 -0
  247. package/llms/components/obc-start-stop-switch.md +126 -0
  248. package/llms/components/obc-status-indicator.md +30 -0
  249. package/llms/components/obc-stepper-box.md +90 -0
  250. package/llms/components/obc-surge-sway-yaw.md +95 -0
  251. package/llms/components/obc-switch.md +69 -0
  252. package/llms/components/obc-system-button.md +112 -0
  253. package/llms/components/obc-system-menu.md +67 -0
  254. package/llms/components/obc-tab-item.md +161 -0
  255. package/llms/components/obc-tab-row.md +151 -0
  256. package/llms/components/obc-tabbed-card.md +148 -0
  257. package/llms/components/obc-table-header-item.md +42 -0
  258. package/llms/components/obc-table.md +124 -0
  259. package/llms/components/obc-tag.md +41 -0
  260. package/llms/components/obc-text-input-field.md +94 -0
  261. package/llms/components/obc-textarea-field.md +186 -0
  262. package/llms/components/obc-textbox.md +80 -0
  263. package/llms/components/obc-three-way-line.md +29 -0
  264. package/llms/components/obc-thruster.md +64 -0
  265. package/llms/components/obc-title-container.md +81 -0
  266. package/llms/components/obc-toggle-button-group.md +184 -0
  267. package/llms/components/obc-toggle-button-option.md +126 -0
  268. package/llms/components/obc-toggle-button-three-state.md +38 -0
  269. package/llms/components/obc-toggle-button-vertical-group.md +142 -0
  270. package/llms/components/obc-toggle-button-vertical-option.md +110 -0
  271. package/llms/components/obc-toggle-switch.md +126 -0
  272. package/llms/components/obc-toggletip.md +135 -0
  273. package/llms/components/obc-tooltip.md +106 -0
  274. package/llms/components/obc-top-bar.md +194 -0
  275. package/llms/components/obc-top-view-propulsion.md +84 -0
  276. package/llms/components/obc-topbar-message-item.md +150 -0
  277. package/llms/components/obc-transformer.md +64 -0
  278. package/llms/components/obc-transmitter-button.md +101 -0
  279. package/llms/components/obc-transmitter-stack.md +79 -0
  280. package/llms/components/obc-transmitter.md +114 -0
  281. package/llms/components/obc-tree-navigation-group.md +69 -0
  282. package/llms/components/obc-tree-navigation-item.md +110 -0
  283. package/llms/components/obc-tree-navigation.md +73 -0
  284. package/llms/components/obc-tunnel-thruster.md +59 -0
  285. package/llms/components/obc-user-button.md +107 -0
  286. package/llms/components/obc-user-menu.md +154 -0
  287. package/llms/components/obc-valve-analog-three-way-icon.md +69 -0
  288. package/llms/components/obc-valve-analog-two-way-icon.md +39 -0
  289. package/llms/components/obc-velocity-projection-plot.md +34 -0
  290. package/llms/components/obc-vendor-button.md +63 -0
  291. package/llms/components/obc-vertical-line.md +33 -0
  292. package/llms/components/obc-watch-flat.md +54 -0
  293. package/llms/components/obc-watch.md +206 -0
  294. package/llms/components/obc-wind-indicator.md +52 -0
  295. package/llms/components/obc-wind-propulsion.md +92 -0
  296. package/llms/components/obc-wind.md +46 -0
  297. package/llms/docs/ar-poi-projection.md +36 -0
  298. package/llms/docs/automation-sequence-step-diagram-playground.md +13 -0
  299. package/llms/docs/building-blocks-advice.md +31 -0
  300. package/llms/docs/building-blocks-external-scale.md +138 -0
  301. package/llms/docs/building-blocks-setpoint.md +119 -0
  302. package/llms/docs/introduction-advice-system.md +161 -0
  303. package/llms/docs/introduction-getting-started.md +94 -0
  304. package/llms/docs/introduction-introduction.md +27 -0
  305. package/llms/docs/introduction-join-the-project.md +11 -0
  306. package/llms/docs/introduction-migration-guide-2-0-to-2-1.md +126 -0
  307. package/llms/docs/introduction-migration-guide-2-1-to-2-2.md +106 -0
  308. package/llms/docs/introduction-migration-guide.md +1063 -0
  309. package/llms/docs/palettes-categorical-colour.md +9 -0
  310. package/llms/llms-full.txt +28380 -0
  311. package/llms/llms.txt +368 -0
  312. package/package.json +12 -2
  313. package/script/cem-plugins/lifecycle.d.mts +6 -0
  314. package/script/cem-plugins/lifecycle.mjs +48 -0
  315. package/script/cem-plugins.test.ts +52 -1
  316. package/script/generate-llms-txt.ts +34 -0
  317. package/script/llms/channel.test.ts +69 -0
  318. package/script/llms/channel.ts +63 -0
  319. package/script/llms/generate.test.ts +143 -0
  320. package/script/llms/generate.ts +229 -0
  321. package/script/llms/manifest.test.ts +160 -0
  322. package/script/llms/manifest.ts +109 -0
  323. package/script/llms/markdown.test.ts +22 -0
  324. package/script/llms/markdown.ts +37 -0
  325. package/script/llms/mdx.test.ts +172 -0
  326. package/script/llms/mdx.ts +171 -0
  327. package/script/llms/render-component.test.ts +290 -0
  328. package/script/llms/render-component.ts +208 -0
  329. package/script/llms/render-guides.test.ts +105 -0
  330. package/script/llms/render-guides.ts +51 -0
  331. package/script/llms/render-llms-txt.test.ts +222 -0
  332. package/script/llms/render-llms-txt.ts +185 -0
  333. package/script/llms/sources.test.ts +118 -0
  334. package/script/llms/sources.ts +89 -0
  335. package/script/llms/stories.test.ts +193 -0
  336. package/script/llms/stories.ts +256 -0
  337. package/script/llms/types.ts +95 -0
  338. package/script/prepare-full-bundle.ts +1 -0
@@ -0,0 +1,151 @@
1
+ # `<obc-poi-controller>`
2
+
3
+ Maps detection data onto POI markers over a video or image.
4
+
5
+ Lifecycle: experimental. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ar-poi-controller--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/ar/poi-controller/poi-controller.ts)
6
+
7
+ `<obc-poi-controller>` — Maps detection data onto POI markers over a video or image.
8
+
9
+ Takes detection coordinates in media pixel space (e.g. x,y in a 1920x1080 frame),
10
+ projects them to screen space using the media's rendered size and fit mode, and
11
+ creates/updates POI targets inside a layer stack (`obc-poi-data` by default;
12
+ `obc-poi-vessel`/`obc-poi-aton` via each detection's `variant`, with optional
13
+ per-detection `icon`, `state`, and `data`).
14
+
15
+ ## Quick Start
16
+
17
+ The media slot accepts a `<video>` (live stream, HLS, file) or `<img>` element.
18
+
19
+ ```html
20
+ <obc-poi-controller fit="cover">
21
+ <video slot="media" src="stream.mp4" autoplay muted></video>
22
+ <obc-poi-layer-stack slot="stack" selection-mode="multi">
23
+ <obc-poi-layer is-selected></obc-poi-layer>
24
+ <obc-poi-layer data-controller-layer="background"></obc-poi-layer>
25
+ </obc-poi-layer-stack>
26
+ </obc-poi-controller>
27
+ ```
28
+
29
+ Then set detections from your data source (WebSocket, API, etc.):
30
+
31
+ ```js
32
+ const controller = document.querySelector('obc-poi-controller');
33
+ controller.detections = [
34
+ { id: 'track-1', x: 400, y: 800, box_width: 50, box_height: 40, heading: -15 },
35
+ { id: 'track-2', x: 900, y: 750, box_width: 35, box_height: 30, heading: 45 },
36
+ ];
37
+ ```
38
+
39
+ ## Framework Usage
40
+
41
+ **Lit:**
42
+ ```html
43
+ <obc-poi-controller .detections=${detections} fit="cover">
44
+ ```
45
+
46
+ **Vue:**
47
+ ```html
48
+ <obc-poi-controller :detections="detections" fit="cover">
49
+ ```
50
+
51
+ **Svelte:**
52
+ ```html
53
+ <obc-poi-controller detections={detections} fit="cover">
54
+ ```
55
+
56
+ **React 18** (needs ref for array props):
57
+ ```tsx
58
+ const ref = useRef(null);
59
+ useEffect(() => { ref.current.detections = detections; }, [detections]);
60
+ <obc-poi-controller ref={ref} fit="cover">
61
+ ```
62
+
63
+ **React 19+** (native custom element support):
64
+ ```tsx
65
+ <obc-poi-controller detections={detections} fit="cover">
66
+ ```
67
+
68
+ ## Framework Notes
69
+
70
+ Both paths are safe for declarative renderers (React, Vue, Lit): the
71
+ `detections` API creates and owns the resulting `obc-poi-data` elements,
72
+ and manually slotted POI children are never moved, re-parented, or
73
+ modified structurally by the library — selection is rendered by CSS
74
+ projection and auto-grouping happens inside the layer's shadow root via
75
+ slot assignment. Frameworks can manage POI children as ordinary
76
+ framework-owned elements.
77
+
78
+ ## Coordinate Model
79
+
80
+ Detection `x` and `y` are in **media pixel space** (e.g. 0-1920 for a 1920x1080 video).
81
+ The controller projects them to screen space using the `fit` mode (`contain` or `cover`)
82
+ and the media element's rendered dimensions.
83
+
84
+ The Y coordinate maps to the line length from the layer's top edge down to the
85
+ detection point. The button sits at the top of the layer; the line extends downward.
86
+
87
+ ## Detection Data
88
+
89
+ Each detection can include:
90
+ - `x`, `y` (required) — position in media pixel space
91
+ - `id` — stable identity key (prevents marker churn when array order changes)
92
+ - `box_width`, `box_height` — bounding box size; determines button type (regular vs enhanced)
93
+ - `heading` or `direction` — rotation angle for the icon arrow (degrees)
94
+ - `confidence` — filtered by `confidenceMin`
95
+ - `class` — filtered by `classFilter`
96
+
97
+ ## Layer Setup
98
+
99
+ The stack needs at least two layers:
100
+ 1. A **selected layer** (`is-selected`) — targets jump here when clicked
101
+ 2. A **background layer** (`data-controller-layer="background"`) — where the controller places targets
102
+
103
+ If no `data-controller-layer="background"` is set, the controller uses the first non-selected layer.
104
+
105
+ ## Selection
106
+
107
+ Clicking a target moves it to the selected layer with a FLIP animation.
108
+ The controller does not interfere with selected targets — it only manages
109
+ targets in the background layer. The layer-stack owns selection state.
110
+
111
+ ## CSS Custom Properties
112
+
113
+ - `--obc-poi-controller-stack-top` (default `15%`) — vertical position of the stack
114
+ - `--obc-poi-controller-stack-height` (default `50%`) — height of the stack
115
+ - `--obc-poi-controller-stack-gap` (default `8px`) — gap between layers
116
+
117
+ ## Properties
118
+
119
+ | Property | Attribute | Type | Default | Description |
120
+ | --- | --- | --- | --- | --- |
121
+ | fit | fit | `PoiFitMode` | | |
122
+ | frames | frames | `PoiFrame[] \| null` | `null` | |
123
+ | detections | detections | `PoiDetection[] \| null` | `null` | |
124
+ | frameIndex | frameIndex | `number \| null` | `null` | |
125
+ | confidenceMin | confidenceMin | `number \| null` | `null` | |
126
+ | classFilter | classFilter | `string[] \| null` | `null` | |
127
+ | keyFn | | `PoiKeyFn \| null` | `null` | |
128
+ | xFilterCutoffHz | x-filter-cutoff-hz | `number \| null` | `null` | Forwarded to every controller-owned target's `xFilterCutoffHz`; `null` leaves the targets on their default. |
129
+ | yFilterCutoffHz | y-filter-cutoff-hz | `number \| null` | `null` | Forwarded to every controller-owned target's `yFilterCutoffHz`; `null` leaves the targets on their default. |
130
+
131
+ ## Events
132
+
133
+ None.
134
+
135
+ ## Slots
136
+
137
+ | Slot | Description |
138
+ | --- | --- |
139
+ | media | Video or image element. Sets the projection source dimensions. |
140
+ | stack | `obc-poi-layer-stack` containing the layers for target placement. |
141
+
142
+ ## Stories
143
+
144
+ - [Primary](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-controller--primary)
145
+ - [Selection Multi Animated](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-controller--selection-multi-animated)
146
+ - [Bottom Layer With Values](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-controller--bottom-layer-with-values)
147
+ - [Detection Variants](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-controller--detection-variants)
148
+
149
+ ## See also
150
+
151
+ - [AR/POI Projection](https://openbridge-next-storybook.web.app/docs/ar-poi-projection.md)
@@ -0,0 +1,72 @@
1
+ # `<obc-poi-data>`
2
+
3
+ Data-oriented marker variant with layout positioning and layer integration.
4
+
5
+ Lifecycle: experimental. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ar-poi-poi-data--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/ar/poi/poi-data.ts)
6
+
7
+ `<obc-poi-data>` - Data-oriented marker variant with layout positioning and layer integration.
8
+
9
+ Extends `PoiBase` to provide the "data" variant of the POI system.
10
+ Renders `<obc-poi>` with a slotted `<obc-poi-button-data>`.
11
+ See the "Coordinate Model" section in `PoiBase` (poi-base.ts) for how `x`, `y`, and `buttonY` position the marker.
12
+
13
+ ## Properties
14
+
15
+ | Property | Attribute | Type | Default | Description |
16
+ | --- | --- | --- | --- | --- |
17
+ | dataStyle | data-style | `ObcPoiObjectStyle` | | |
18
+ | dataState | data-state | `ObcPoiObjectState \| null` | `null` | |
19
+ | dataInteractive | data-interactive | `boolean` | `false` | |
20
+ | type | type | `ObcPoiType` | | |
21
+ | value | value | `ObcPoiValue` | | |
22
+ | state | state | `ObcPoiState` | | |
23
+ | selected | selected | `boolean` | `false` | |
24
+ | buttonType | button-type | | | |
25
+ | overlapOpaque | overlap-opaque | `boolean` | `false` | |
26
+ | data | | `ObcPoiButtonDataItem[]` | `[]` | |
27
+ | hasHeader | has-header | `boolean` | `false` | |
28
+ | headerContent | header-content | `string` | `''` | |
29
+ | hasPointer | hasPointer | `boolean` | `false` | |
30
+ | pointerType | pointer-type | `ObcPoiPointerType \| null` | `null` | |
31
+ | pointerState | pointer-state | `ObcPoiPointerState \| null` | `null` | |
32
+ | relativeDirection | relativeDirection | `number` | `0` | |
33
+ | x | x | `number` | `0` | |
34
+ | y | y | | `DEFAULT_LINE_LENGTH_PX` | |
35
+ | buttonY | button-y | `number \| null` | `0` | |
36
+ | xFilterCutoffHz | x-filter-cutoff-hz | `number` | `16` | Cutoff frequency (Hz) of the built-in low-pass filter applied to `x`. Lower values smooth noisy input more aggressively; `0` or a negative value disables filtering so `x` is applied directly. |
37
+ | yFilterCutoffHz | y-filter-cutoff-hz | `number` | `16` | Cutoff frequency (Hz) of the built-in low-pass filter applied to `y`. Lower values smooth noisy input more aggressively; `0` or a negative value disables filtering so `y` is applied directly. |
38
+ | fixedTarget | fixed-target | `boolean` | `false` | |
39
+ | boxWidth | box-width | `number \| null` | `null` | |
40
+ | boxHeight | box-height | `number \| null` | `null` | |
41
+ | outsideAngle | outside-angle | `number` | `315` | |
42
+ | animatePosition | animate-position | `boolean` | `false` | |
43
+ | buttonOffsetX | button-offset-x | `number` | | |
44
+ | targetOffsetX | target-offset-x | `number` | | |
45
+
46
+ ## Events
47
+
48
+ | Event | Type | Description |
49
+ | --- | --- | --- |
50
+ | obc-poi-data-layout-change | `CustomEvent<void>` | Fired when layout-driving properties change. |
51
+
52
+ ## Slots
53
+
54
+ | Slot | Description |
55
+ | --- | --- |
56
+ | (default) | Icon content forwarded to the inner POI object. Defaults to a vessel icon. |
57
+ | header | Optional custom header content forwarded into `obc-poi`. |
58
+
59
+ ## Stories
60
+
61
+ - [Preview](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-poi-data--preview)
62
+ - [POI Variants](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-poi-data--poi-variants)
63
+ - [POI Values And Content](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-poi-data--poi-values-and-content)
64
+ - [Animated Offset Bottom](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-poi-data--animated-offset-bottom)
65
+ - [Animated Offset Top](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-poi-data--animated-offset-top)
66
+ - [Animated Height](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-poi-data--animated-height)
67
+ - [Animated Line Length](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-poi-data--animated-line-length)
68
+
69
+ ## See also
70
+
71
+ - [Migration Guide](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide.md)
72
+ - [AR/POI Projection](https://openbridge-next-storybook.web.app/docs/ar-poi-projection.md)
@@ -0,0 +1,70 @@
1
+ # `<obc-poi-graphic-line>`
2
+
3
+ SVG connector line primitive for marker stems and leader lines.
4
+
5
+ Lifecycle: experimental. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ar-building-blocks-poi-graphic-line--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/ar/building-blocks/poi-graphic-line/poi-graphic-line.ts)
6
+
7
+ `<obc-poi-graphic-line>` - SVG connector line primitive for marker stems and leader lines.
8
+
9
+ ## Overview
10
+ This component renders the line geometry only, including straight and offset paths with optional dashed styling.
11
+ Keywords: connector line, leader line, guide line, tether line, marker stem.
12
+
13
+ ## Features/Variants
14
+ - `lineHeight`: Controls the rendered connector length. Default: `96`.
15
+ - `lineStart`: Sets the Y-axis start position for line geometry. Default: `1`.
16
+ - `lineStyle`: Selects style theme (for example `regular`, `enhanced`, `alarm`). Default: `enhanced`.
17
+ - `lineType`: Chooses path treatment (`regular` or `dashed`). Default: `regular`.
18
+ - `offset`: Applies horizontal offset to create angled connector segments.
19
+
20
+ ## Usage Guidelines
21
+
22
+ - Use this for a visual-only connector; use `<obc-poi-line>` when you need
23
+ integrated pointer/label behavior.
24
+ - Use `lineType="regular"` for continuous POI lines and `lineType="dashed"` for
25
+ non-primary or guidance-style links.
26
+ - Keep `lineHeight` and `lineStart` consistent with surrounding marker layout so
27
+ connectors align with button/pointer elements.
28
+ - Use `offset` to route around dense UI and avoid visual overlap.
29
+
30
+ ## Slots/Content
31
+ This component has no slots.
32
+
33
+ ## Events
34
+ This component emits no custom events.
35
+
36
+ ## Best Practices
37
+ - Prefer semantic `lineStyle` values derived from UI state instead of hardcoding colors.
38
+ - Keep offsets minimal to preserve visual traceability between marker and target.
39
+ - Reuse shared `POIStyle` and `POILineType` tokens for consistent rendering across POI components.
40
+
41
+ ## Example
42
+
43
+ ```html
44
+ <obc-poi-graphic-line .lineStyle=${POIStyle.Enhanced} .lineType=${POILineType.Regular} .lineHeight=${96} .offset=${0}></obc-poi-graphic-line>
45
+ ```
46
+
47
+ ## Properties
48
+
49
+ | Property | Attribute | Type | Default | Description |
50
+ | --- | --- | --- | --- | --- |
51
+ | lineHeight | lineHeight | `number` | `96` | |
52
+ | lineStart | lineStart | `number` | `1` | |
53
+ | lineStyle | lineStyle | `POIStyle` | | |
54
+ | lineType | lineType | `POILineType` | | |
55
+ | offset | offset | `number` | `0` | |
56
+
57
+ ## Events
58
+
59
+ None.
60
+
61
+ ## Slots
62
+
63
+ None.
64
+
65
+ ## Stories
66
+
67
+ - [Normal](https://openbridge-next-storybook.web.app/?path=/story/ar-building-blocks-poi-graphic-line--normal)
68
+ - [Offset](https://openbridge-next-storybook.web.app/?path=/story/ar-building-blocks-poi-graphic-line--offset)
69
+ - [Enhanced](https://openbridge-next-storybook.web.app/?path=/story/ar-building-blocks-poi-graphic-line--enhanced)
70
+ - [All Styles](https://openbridge-next-storybook.web.app/?path=/story/ar-building-blocks-poi-graphic-line--all-styles)
@@ -0,0 +1,85 @@
1
+ # `<obc-poi-group>`
2
+
3
+ A POI cluster component that collapses overlapping targets into one trigger and expands them into a spread list.
4
+
5
+ Lifecycle: experimental. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ar-poi-group--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/ar/poi-group/poi-group.ts)
6
+
7
+ `<obc-poi-group>` - A POI cluster component that collapses overlapping targets into one trigger and expands them into a spread list.
8
+
9
+ This component wraps multiple `obc-poi-data` elements and manages their collapsed/expanded presentation as a single interactive unit.
10
+ Use it when nearby targets should be presented as one grouped control until the user expands the group.
11
+
12
+ ## Features
13
+ - Expand/collapse state: Controlled by `expand`; collapse animation state is exposed through `collapsing`.
14
+ - Automatic wrapper sizing: Computes collapsed wrapper width/height from slotted target button bounds.
15
+ - Front-target handling: Keeps one front target visually prioritized while collapsing other targets into overlap state.
16
+ - Backdrop interaction: Shows a backdrop while expanded and collapses on backdrop click.
17
+ - Dynamic ordering: `internalSwapping` enables reordering while expanded based on current horizontal positions.
18
+ - Vertical placement: `positionVertical` (attribute `position-vertical`) sets the wrapper/group top offset used for collapsed positioning.
19
+
20
+ ## Usage Guidelines
21
+ - Slot only `obc-poi-data` items that should behave as one grouped target set.
22
+ - Control expand/collapse via the `expand` property, or let the built-in wrapper button toggle expansion.
23
+ - Use the `expand` event detail to synchronize nearby standalone targets (for example, set outside targets to overlapped while this group is open).
24
+ - Treat `collapsing` as orchestration state: it is set by the group itself and by coordinating containers such as `obc-poi-layer-stack` during collapse animations. Do not set it directly.
25
+ - `internalSwapping` is usually set via `obc-poi-layer`'s `internal-swapping` attribute, which forwards it to auto-created groups; set it directly only on manually managed groups.
26
+
27
+ ## Slots
28
+ | Slot | Renders When... | Purpose |
29
+ | --- | --- | --- |
30
+ | default | Always | Contains grouped `obc-poi-data` targets managed by this component. |
31
+
32
+ ## Events
33
+ - `expand` - Fired when expand state changes. Detail: `{ expand: boolean }`.
34
+ - `collapse-finished` - Fired when the collapse animation has fully completed.
35
+ - `obc-poi-group-target-released` - Fired after `releaseTarget()` returns a target to the group's parent context: re-parented for consumer-managed groups, re-assigned to the layer's main slot for layer-created auto groups. Detail: `{ target: Poi }`.
36
+
37
+ ## Best Practices
38
+ - Keep grouped targets positioned consistently so wrapper bounds and front-target selection remain stable.
39
+ - Prefer one `obc-poi-group` per overlap cluster rather than nesting groups.
40
+ - Use `internalSwapping` only when live target crossing should reorder expanded items.
41
+
42
+ ## Example
43
+ ```html
44
+ <obc-poi-group position-vertical="240px">
45
+ <obc-poi-data x="300" button-y="240" y="240"></obc-poi-data>
46
+ <obc-poi-data x="320" button-y="240" y="240"></obc-poi-data>
47
+ <obc-poi-data x="340" button-y="240" y="240"></obc-poi-data>
48
+ </obc-poi-group>
49
+ ```
50
+
51
+ ## Properties
52
+
53
+ | Property | Attribute | Type | Default | Description |
54
+ | --- | --- | --- | --- | --- |
55
+ | expand | expand | `boolean` | `false` | |
56
+ | collapsing | collapsing | `boolean` | `false` | Collapse-animation state. Set by the group itself and by coordinating containers such as `obc-poi-layer-stack` during collapse orchestration; do not set it directly. |
57
+ | positionVertical | position-vertical | `string` | `'0px'` | |
58
+ | internalSwapping | internal-swapping | `boolean` | `false` | Reorders expanded targets when their horizontal positions cross. Usually set via `obc-poi-layer`'s `internal-swapping` attribute, which forwards it to auto-created groups; set it directly only on manually managed groups. |
59
+
60
+ ## Events
61
+
62
+ | Event | Type | Description |
63
+ | --- | --- | --- |
64
+ | expand | `CustomEvent<{expand:boolean}>` | Fired when the group expand state changes. |
65
+ | collapse-finished | `CustomEvent<void>` | Fired after collapse animation completes. |
66
+ | obc-poi-group-target-released | `CustomEvent<{target: Poi}>` | Fired after `releaseTarget()` returns a target to the group's parent context (re-parented for consumer-managed groups, re-assigned for auto groups) — immediately when the group is collapsed, or once the collapse animation completes. Bubbles and is composed. |
67
+
68
+ ## Slots
69
+
70
+ | Slot | Description |
71
+ | --- | --- |
72
+ | (default) | Default slot for grouped `obc-poi-data` targets. |
73
+
74
+ ## Stories
75
+
76
+ - [Grouped](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-group--grouped)
77
+ - [Grouped With Numbers](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-group--grouped-with-numbers)
78
+ - [Grouped With Values](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-group--grouped-with-values)
79
+ - [Grouped Mixed Types](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-group--grouped-mixed-types)
80
+ - [Expanded](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-group--expanded)
81
+ - [Internal Group Swapping](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-group--internal-group-swapping)
82
+
83
+ ## See also
84
+
85
+ - [Migration Guide](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide.md)
@@ -0,0 +1,71 @@
1
+ # `<obc-poi-header>`
2
+
3
+ Compact header chip for marker identifiers, labels, and optional indicator content.
4
+
5
+ Lifecycle: experimental. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ar-building-blocks-poi-header--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/ar/building-blocks/poi-header/poi-header.ts)
6
+
7
+ `<obc-poi-header>` - Compact header chip for marker identifiers, labels, and optional indicator content.
8
+
9
+ ## Overview
10
+ Use this component to display compact marker metadata above or near a marker button.
11
+ Keywords/synonyms: chip, pill, badge, header chip, identifier badge.
12
+
13
+ ## Features/Variants
14
+ - `type` (default `id`):
15
+ - `id`: shows identifier content only.
16
+ - `data`: shows identifier plus secondary label.
17
+ - `state` (default `enabled`): `enabled`, `selected`, `caution`, `warning`, `alarm`, `level-critical`, `level-high`, `level-medium`, `level-low`, `level-diagnostic`.
18
+ - `content` (default `"1"`): primary identifier text.
19
+ - `label` (default `"Data"`): secondary text used by `type="data"`.
20
+ - `hasIndicator` (default `false`): appends indicator area.
21
+ - `indicator` slot fallback: renders built-in bar indicator markup when slot content is empty.
22
+ - `size` (default `regular`): currently only `regular`.
23
+
24
+ ## Usage Guidelines
25
+ - Use `type="id"` for compact identifier-only labels.
26
+ - Use `type="data"` when both an ID and short label are required.
27
+ - Keep `content` and `label` brief to prevent overflow.
28
+
29
+ ## Slots/Content
30
+ - `indicator`: Optional indicator icon/content; built-in indicator is used as fallback.
31
+
32
+ ## Events
33
+ This component does not emit custom events.
34
+
35
+ ## Best Practices
36
+ - Keep indicator usage consistent across similar marker states.
37
+ - Prefer enum values for `type`, `state`, and `size`.
38
+
39
+ ## Example
40
+ ```html
41
+ <obc-poi-header type="data" state="selected" content="3" label="SOG" has-indicator>
42
+ <obi-placeholder slot="indicator"></obi-placeholder>
43
+ </obc-poi-header>
44
+ ```
45
+
46
+ ## Properties
47
+
48
+ | Property | Attribute | Type | Default | Description |
49
+ | --- | --- | --- | --- | --- |
50
+ | content | content | `string` | `'1'` | |
51
+ | label | label | `string` | `'Data'` | |
52
+ | size | size | `ObcPoiHeaderSize` | | |
53
+ | state | state | `ObcPoiHeaderState` | | |
54
+ | type | type | `ObcPoiHeaderType` | | |
55
+ | hasIndicator | has-indicator | `boolean` | `false` | |
56
+
57
+ ## Events
58
+
59
+ None.
60
+
61
+ ## Slots
62
+
63
+ | Slot | Description |
64
+ | --- | --- |
65
+ | indicator | Optional indicator icon/content. |
66
+
67
+ ## Stories
68
+
69
+ - [Interactive](https://openbridge-next-storybook.web.app/?path=/story/ar-building-blocks-poi-header--interactive)
70
+ - [Data States](https://openbridge-next-storybook.web.app/?path=/story/ar-building-blocks-poi-header--data-states)
71
+ - [Id States](https://openbridge-next-storybook.web.app/?path=/story/ar-building-blocks-poi-header--id-states)
@@ -0,0 +1,85 @@
1
+ # `<obc-poi-layer-stack>`
2
+
3
+ coordinates multiple POI layers and manages selection behavior across stacked layers.
4
+
5
+ Lifecycle: experimental. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ar-poi-layer-stack--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/ar/poi-layer-stack/poi-layer-stack.ts)
6
+
7
+ `<obc-poi-layer-stack>` coordinates multiple POI layers and manages
8
+ selection behavior across stacked layers.
9
+
10
+ Use `selection-mode` to control whether targets can be selected across the
11
+ stack (`none`, `single`, or `multi`).
12
+
13
+ ## Required Setup
14
+ 1. Place the stack in `obc-poi-controller`'s `slot="stack"`, or manage the
15
+ stack's height and media geometry yourself.
16
+ 2. Give exactly one child `obc-poi-layer` the `is-selected` attribute — the
17
+ stack projects selected targets' buttons into it and resets all
18
+ selection state if no selected layer exists.
19
+ 3. Mark the background/default layer with
20
+ `data-controller-layer="background"` when the stack is used inside
21
+ `obc-poi-controller`.
22
+ 4. Set `--obc-poi-layer-min-height` on layers that can start empty, so they
23
+ do not collapse to 0px height.
24
+
25
+ ## DOM Ownership
26
+ The stack never moves, creates, or removes consumer-owned DOM. Selection is
27
+ rendered by projecting the target's button into the selected layer via CSS
28
+ custom properties (`--obc-poi-button-projection-y` /
29
+ `--obc-poi-target-projection-y`); the target element stays where the
30
+ consumer put it. Declarative renderers (React, Vue, Lit) can manage POI
31
+ children as ordinary framework-owned elements.
32
+
33
+ ## Selection API
34
+ Selection state is fully reachable without DOM inspection:
35
+ - `selectedTargets` — the currently selected POI targets.
36
+ - `selectTarget(target, {selectionId?})` — select programmatically;
37
+ `selectionId` presets the stack-managed badge id.
38
+ - `deselectTarget(target)` / `clearSelection()` — deselect one/all.
39
+ - `selection-change` event — fired on every selection mutation
40
+ (user click, programmatic call, or bootstrap seeding) with
41
+ `{selected, added, removed}` in `detail`.
42
+
43
+ ## Slots
44
+ - Default slot for `obc-poi-layer` elements that participate in the stack.
45
+
46
+ ## Example
47
+ ```html
48
+ <obc-poi-layer-stack selection-mode="single">
49
+ <obc-poi-layer label="Radar" .isSelected=${true}></obc-poi-layer>
50
+ <obc-poi-layer label="AIS"></obc-poi-layer>
51
+ </obc-poi-layer-stack>
52
+ ```
53
+
54
+ ## Properties
55
+
56
+ | Property | Attribute | Type | Default | Description |
57
+ | --- | --- | --- | --- | --- |
58
+ | selectionMode | selection-mode | `PoiLayerSelectionMode` | | |
59
+ | selectedTargets | | `Poi[]` | | Currently selected POI targets. |
60
+
61
+ ## Events
62
+
63
+ | Event | Type | Description |
64
+ | --- | --- | --- |
65
+ | selection-change | `CustomEvent<{selected: Poi[]; added: Poi \| null; removed: Poi \| null}>` | Fired whenever the selection set changes (user click, programmatic call, or bootstrap seeding). Bubbles and is composed. |
66
+
67
+ ## Slots
68
+
69
+ | Slot | Description |
70
+ | --- | --- |
71
+ | (default) | Layers participating in the stack. |
72
+
73
+ ## Stories
74
+
75
+ - [Selection Single](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer-stack--selection-single)
76
+ - [Selection None](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer-stack--selection-none)
77
+ - [Selection Multi](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer-stack--selection-multi)
78
+ - [Selection Multi Animated](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer-stack--selection-multi-animated)
79
+ - [With Values](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer-stack--with-values)
80
+ - [Mixed Component Types](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer-stack--mixed-component-types)
81
+ - [Selection Handling](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer-stack--selection-handling)
82
+
83
+ ## See also
84
+
85
+ - [Migration Guide](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide.md)
@@ -0,0 +1,110 @@
1
+ # `<obc-poi-layer>`
2
+
3
+ A POI layout container that resolves overlapping targets by grouping or crossing strategies.
4
+
5
+ Lifecycle: experimental. [Storybook](https://openbridge-next-storybook.web.app/?path=/docs/ar-poi-layer--docs) · [Source](https://raw.githubusercontent.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents/develop/packages/openbridge-webcomponents/src/ar/poi-layer/poi-layer.ts)
6
+
7
+ `<obc-poi-layer>` - A POI layout container that resolves overlapping targets by grouping or crossing strategies.
8
+
9
+ This component watches slotted POI targets, applies overlap state/visual rules, and coordinates automatic `obc-poi-group` creation when needed.
10
+ Use it as the main layer container when you want centralized overlap behavior plus layer height updates for parent layout systems.
11
+
12
+ ## Features
13
+ - Overlap strategies: `overlapMode="grouping"` builds overlap clusters; `overlapMode="crossing"` continuously adjusts horizontal offsets to reduce crossings.
14
+ - Auto-group lifecycle: Creates/removes auto groups as shadow-internal chrome — the consumer's light DOM is never modified; members are placed via manual slot assignment. Reach the group elements through the `autoGroups` accessor.
15
+ - Manual group support: Respects existing `obc-poi-group` elements and can optionally join nearby targets while a group is expanded (`joinWhileExpanded`).
16
+ - Dynamic observation: Reacts to slot changes, target style/position mutations, and target size changes to recompute grouping and layer height.
17
+ - Layer diagnostics: `debug` shows a label overlay using `label`.
18
+ - Selection flag: `isSelected` reflects to attribute but has no direct runtime layout logic in this class.
19
+ - Group ordering option: `internalSwapping` is forwarded to groups to allow expanded ordering updates based on movement.
20
+
21
+ ## Usage Guidelines
22
+ - Place `obc-poi-data` targets (and optional `obc-poi-group`) in the default slot.
23
+ - Choose `overlapMode` based on behavior:
24
+ - `grouping`: best when overlaps should collapse into expandable clusters.
25
+ - `crossing`: best when targets stay independent but should separate horizontally.
26
+ - Handle `layer-resize` only when using the layer standalone; inside `obc-poi-layer-stack` / `obc-poi-controller` the container handles height syncing. Example: `layer.addEventListener('layer-resize', (e) => { host.style.height = e.detail.height + 'px'; })`.
27
+ - After imperatively adding, removing, or moving POI children outside the layer's own observers, call the public `requestGroupingUpdate()` method to force a recompute; it is the supported hook for imperative DOM mutations.
28
+ - Set `--obc-poi-layer-min-height` when the layer starts empty, otherwise the layer collapses to 0px height until targets exist.
29
+ - Enable `joinWhileExpanded` only when targets should be able to join an already expanded auto-group.
30
+ - **TODO(designer):** Confirm intended user-visible behavior for `isSelected`, since it has no runtime layout logic in this class — it only reflects the attribute and notifies containers via `layer-selection-changed` (consumed by `obc-poi-layer-stack` to pick the selected layer).
31
+
32
+ ## Slots
33
+ | Slot | Renders When... | Purpose |
34
+ | --- | --- | --- |
35
+ | default | Always | Hosts POI targets (`obc-poi-data*`) and optional manual `obc-poi-group` elements. |
36
+
37
+ ## Events
38
+ - `layer-resize` - Fired when computed layer height changes. Detail: `{ height: number, label: string }`.
39
+ - `grouping-change` - Fired when grouping membership or front/behind/pre-group state changes. Detail: `{ clusters: Poi[][], front: Poi[], behind: Poi[], pregrouped: Poi[] }`. Subscribe to this instead of observing the layer's internal `data-*` attributes.
40
+
41
+ ## CSS Custom Properties
42
+ | Property | Default | Purpose |
43
+ | --- | --- | --- |
44
+ | `--obc-poi-layer-overlap-enter` | `10px` | Max horizontal gap at which ungrouped targets start grouping. |
45
+ | `--obc-poi-layer-overlap-exit` | `18px` | Gap at which grouped targets leave their group. Clamped to at least the enter threshold; keep it larger than enter so jittery positions do not oscillate in and out of groups. |
46
+ | `--obc-poi-layer-overlap-pre` | `16px` | Gap at which targets get the pre-grouped visual state. |
47
+ | `--obc-poi-layer-overlap-behind` | `10px` | Gap at which the shortest target gets the behind visual state. |
48
+ | `--obc-poi-layer-exit-delay-ms` | `140` | Delay before exiting targets lose their exit visual state. |
49
+ | `--obc-poi-layer-group-removal-delay-ms` | `250` | Delay before a dissolved auto-group element is removed. |
50
+ | `--obc-poi-layer-exit-lock-duration-ms` | `500` | Duration a target is locked out of pre-group/behind states after leaving a group. |
51
+
52
+ ## Best Practices
53
+ - Keep POI targets as direct descendants when possible to reduce grouping ambiguity.
54
+ - Targets may update `x`/`y` every animation frame; grouping stays stable as long as the horizontal gap between targets does not oscillate across the enter/exit band faster than the group lifecycle delays (~0.5s). Smooth noisy input coordinates or widen the enter/exit band to compensate.
55
+ - Avoid adding non-POI interactive wrappers inside the layer unless needed, as layer observers track POI-related descendants.
56
+
57
+ ## Example
58
+ ```html
59
+ <obc-poi-layer label="Targets" overlapMode="grouping" debug>
60
+ <obc-poi-data x="180" y="110"></obc-poi-data>
61
+ <obc-poi-data x="205" y="90"></obc-poi-data>
62
+ <obc-poi-data x="230" y="100"></obc-poi-data>
63
+ </obc-poi-layer>
64
+ ```
65
+
66
+ ## Properties
67
+
68
+ | Property | Attribute | Type | Default | Description |
69
+ | --- | --- | --- | --- | --- |
70
+ | label | label | `string` | `''` | |
71
+ | debug | debug | `boolean` | `false` | |
72
+ | overlapMode | overlapMode | `OverlapMode` | | |
73
+ | isSelected | is-selected | `boolean` | `false` | |
74
+ | joinWhileExpanded | join-while-expanded | `boolean` | `false` | |
75
+ | internalSwapping | internal-swapping | `boolean` | `false` | |
76
+ | autoGroups | | `HTMLElement[]` | | The auto-created `obc-poi-group` elements currently managed by this layer. Auto groups are shadow-internal chrome (they never appear in the consumer's light DOM); use this accessor — typically after a `grouping-change` event — to reach them, e.g. to expand a group programmatically. |
77
+
78
+ ## Events
79
+
80
+ | Event | Type | Description |
81
+ | --- | --- | --- |
82
+ | layer-resize | `CustomEvent<{height:number,label:string}>` | Fired when the layer height changes. |
83
+ | grouping-change | `CustomEvent<{clusters:Poi[][],front:Poi[],behind:Poi[],pregrouped:Poi[]}>` | Fired when grouping membership or overlap state changes. Bubbles and is composed. |
84
+ | layer-selection-changed | `Event` | Fired when the layer's `isSelected` state changes. Bubbles. |
85
+
86
+ ## Slots
87
+
88
+ | Slot | Description |
89
+ | --- | --- |
90
+ | (default) | Default slot for POI targets and optional POI groups. |
91
+
92
+ ## Stories
93
+
94
+ - [Animated Layout](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer--animated-layout)
95
+ - [Animated Layout With Values](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer--animated-layout-with-values)
96
+ - [Primary](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer--primary)
97
+ - [With Values Targets](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer--with-values-targets)
98
+ - [Overlap](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer--overlap)
99
+ - [Overlap With Group](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer--overlap-with-group)
100
+ - [Overlap With Group Numbers](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer--overlap-with-group-numbers)
101
+ - [Enter Group From Two](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer--enter-group-from-two)
102
+ - [Exit Group](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer--exit-group)
103
+ - [Join Group](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer--join-group)
104
+ - [Join Expanded Group](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer--join-expanded-group)
105
+ - [Leave Expanded Group](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer--leave-expanded-group)
106
+ - [Crossing Mode](https://openbridge-next-storybook.web.app/?path=/story/ar-poi-layer--crossing-mode)
107
+
108
+ ## See also
109
+
110
+ - [Migration Guide](https://openbridge-next-storybook.web.app/docs/introduction-migration-guide.md)