@honua/app-platform 0.1.1-beta.0 → 0.1.4-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/collaboration/client.d.ts.map +1 -1
  2. package/connect-url-safety.d.ts +53 -0
  3. package/connect-url-safety.js +189 -0
  4. package/contract/discovery.d.ts +34 -0
  5. package/contract/discovery.d.ts.map +1 -1
  6. package/contract/index.d.ts +7 -5
  7. package/contract/index.d.ts.map +1 -1
  8. package/contract/index.js +3 -2
  9. package/contract/pmtiles.d.ts +10 -1
  10. package/contract/pmtiles.d.ts.map +1 -1
  11. package/contract/pmtiles.js +10 -2
  12. package/contract/protocol-module.d.ts +84 -9
  13. package/contract/protocol-module.d.ts.map +1 -1
  14. package/contract/query-filter-fes.d.ts +18 -0
  15. package/contract/query-filter-fes.d.ts.map +1 -0
  16. package/contract/query-filter-fes.js +122 -0
  17. package/contract/query-filter.d.ts +300 -0
  18. package/contract/query-filter.d.ts.map +1 -0
  19. package/contract/query-filter.js +883 -0
  20. package/contract/schema.d.ts +12 -0
  21. package/contract/schema.d.ts.map +1 -1
  22. package/contract/schema.js +34 -0
  23. package/contract/source-capability-support.d.ts.map +1 -1
  24. package/contract/source-capability-support.js +15 -3
  25. package/contract/source.d.ts +45 -25
  26. package/contract/source.d.ts.map +1 -1
  27. package/contract/source.js +719 -479
  28. package/contract/types.d.ts +87 -18
  29. package/contract/types.d.ts.map +1 -1
  30. package/contract/widget-source.d.ts.map +1 -1
  31. package/controls/basemap-switcher.d.ts +19 -11
  32. package/controls/basemap-switcher.d.ts.map +1 -1
  33. package/controls/basemap-switcher.js +58 -25
  34. package/controls/catalog.d.ts +105 -0
  35. package/controls/catalog.d.ts.map +1 -0
  36. package/controls/catalog.js +341 -0
  37. package/controls/element-utils.d.ts +9 -0
  38. package/controls/element-utils.d.ts.map +1 -1
  39. package/controls/element-utils.js +17 -0
  40. package/controls/index.d.ts +29 -8
  41. package/controls/index.d.ts.map +1 -1
  42. package/controls/index.js +26 -8
  43. package/controls/layer-list.d.ts +13 -5
  44. package/controls/layer-list.d.ts.map +1 -1
  45. package/controls/layer-list.js +72 -15
  46. package/controls/legend.d.ts +32 -5
  47. package/controls/legend.d.ts.map +1 -1
  48. package/controls/legend.js +95 -25
  49. package/controls/qualification.d.ts +152 -0
  50. package/controls/qualification.d.ts.map +1 -0
  51. package/controls/qualification.js +1265 -0
  52. package/controls/registry.d.ts +104 -0
  53. package/controls/registry.d.ts.map +1 -0
  54. package/controls/registry.js +150 -0
  55. package/controls/swipe-control.d.ts +6 -1
  56. package/controls/swipe-control.d.ts.map +1 -1
  57. package/controls/swipe-control.js +82 -20
  58. package/core/client.d.ts +45 -21
  59. package/core/client.d.ts.map +1 -1
  60. package/core/client.js +224 -46
  61. package/core/error-classifications.d.ts +6 -0
  62. package/core/error-classifications.d.ts.map +1 -1
  63. package/core/error-classifications.js +6 -0
  64. package/core/error-code-registry.d.ts +6 -0
  65. package/core/error-code-registry.d.ts.map +1 -1
  66. package/core/error-code-registry.js +6 -0
  67. package/core/error-envelope.js +2 -0
  68. package/core/errors.d.ts +1 -1
  69. package/core/errors.js +1 -1
  70. package/core/geoparquet-sql.d.ts +68 -4
  71. package/core/geoparquet-sql.d.ts.map +1 -1
  72. package/core/geoparquet-sql.js +325 -8
  73. package/core/odata-write-codec.d.ts.map +1 -1
  74. package/core/odata-write-codec.js +0 -1
  75. package/core/odata.d.ts +6 -0
  76. package/core/odata.d.ts.map +1 -1
  77. package/core/odata.js +6 -1
  78. package/core/ogc-processes.d.ts +182 -25
  79. package/core/ogc-processes.d.ts.map +1 -1
  80. package/core/ogc-processes.js +602 -30
  81. package/core/process-runner.d.ts +8 -1
  82. package/core/process-runner.d.ts.map +1 -1
  83. package/core/process-runner.js +1 -0
  84. package/core/protocol-transport.d.ts +2 -0
  85. package/core/protocol-transport.d.ts.map +1 -1
  86. package/core/stac.d.ts +31 -0
  87. package/core/stac.d.ts.map +1 -1
  88. package/core/stac.js +136 -19
  89. package/core/surfaces.d.ts.map +1 -1
  90. package/core/surfaces.js +273 -68
  91. package/core/types.d.ts +123 -9
  92. package/core/types.d.ts.map +1 -1
  93. package/core/wfs-axis-order.d.ts +18 -0
  94. package/core/wfs-axis-order.d.ts.map +1 -0
  95. package/core/wfs-axis-order.js +108 -0
  96. package/core/wfs-capabilities.d.ts +65 -24
  97. package/core/wfs-capabilities.d.ts.map +1 -1
  98. package/core/wfs-capabilities.js +237 -27
  99. package/core/wfs-filter.d.ts +26 -3
  100. package/core/wfs-filter.d.ts.map +1 -1
  101. package/core/wfs-filter.js +48 -53
  102. package/core/wfs-protocol-error.d.ts +12 -0
  103. package/core/wfs-protocol-error.d.ts.map +1 -0
  104. package/core/wfs-protocol-error.js +13 -0
  105. package/core/wfs.d.ts +53 -1
  106. package/core/wfs.d.ts.map +1 -1
  107. package/core/wfs.js +251 -29
  108. package/core/wms-feature-info.d.ts +92 -0
  109. package/core/wms-feature-info.d.ts.map +1 -0
  110. package/core/wms-feature-info.js +285 -0
  111. package/core/wms.d.ts +9 -0
  112. package/core/wms.d.ts.map +1 -1
  113. package/core/wms.js +17 -5
  114. package/esri-compat/event-bus.d.ts +20 -0
  115. package/esri-compat/event-bus.d.ts.map +1 -1
  116. package/esri-compat/feature-filter.d.ts +46 -1
  117. package/esri-compat/feature-filter.d.ts.map +1 -1
  118. package/esri-compat/feature-filter.js +49 -0
  119. package/esri-compat/geojson-layer.d.ts +4 -2
  120. package/esri-compat/geojson-layer.d.ts.map +1 -1
  121. package/esri-compat/geojson-layer.js +4 -2
  122. package/esri-compat/identity-manager.js +2 -2
  123. package/esri-compat/imagery-layer.d.ts +2 -1
  124. package/esri-compat/imagery-layer.d.ts.map +1 -1
  125. package/esri-compat/imagery-layer.js +2 -1
  126. package/esri-compat/layer-list.d.ts +8 -1
  127. package/esri-compat/layer-list.d.ts.map +1 -1
  128. package/esri-compat/layer-list.js +11 -4
  129. package/esri-compat/legend.d.ts.map +1 -1
  130. package/esri-compat/legend.js +1 -1
  131. package/esri-compat/locator.d.ts +297 -0
  132. package/esri-compat/locator.d.ts.map +1 -0
  133. package/esri-compat/locator.js +579 -0
  134. package/esri-compat/map-image-layer.d.ts.map +1 -1
  135. package/esri-compat/map-view.d.ts.map +1 -1
  136. package/esri-compat/map-view.js +1 -1
  137. package/esri-compat/scene-view.d.ts.map +1 -1
  138. package/esri-compat/time-slider.d.ts +29 -0
  139. package/esri-compat/time-slider.d.ts.map +1 -1
  140. package/esri-compat/time-slider.js +117 -0
  141. package/esri-compat/wfs-layer.d.ts +2 -1
  142. package/esri-compat/wfs-layer.d.ts.map +1 -1
  143. package/esri-compat/wfs-layer.js +2 -1
  144. package/esri-compat/widget-host.d.ts +42 -6
  145. package/esri-compat/widget-host.d.ts.map +1 -1
  146. package/esri-compat/widget-host.js +99 -10
  147. package/generated-app/projection.d.ts.map +1 -1
  148. package/generated-app/runtime.d.ts.map +1 -1
  149. package/map/data-to-map-bridge.d.ts +1 -1
  150. package/map/data-to-map-bridge.d.ts.map +1 -1
  151. package/map/data-to-map-bridge.js +1 -2
  152. package/map/honua-map.d.ts.map +1 -1
  153. package/map/honua-map.js +1 -1
  154. package/map/index.d.ts +2 -0
  155. package/map/index.d.ts.map +1 -1
  156. package/map/index.js +2 -0
  157. package/map/realtime-reconciliation-adapter.d.ts +98 -0
  158. package/map/realtime-reconciliation-adapter.d.ts.map +1 -0
  159. package/map/realtime-reconciliation-adapter.js +84 -0
  160. package/map/temporal-playback.d.ts +25 -0
  161. package/map/temporal-playback.d.ts.map +1 -1
  162. package/map/temporal-playback.js +29 -1
  163. package/operator/workspace/workspace.d.ts.map +1 -1
  164. package/operator/workspace/workspace.js +0 -2
  165. package/package.json +4 -3
  166. package/query-planner/canonical-filter.d.ts +30 -0
  167. package/query-planner/canonical-filter.d.ts.map +1 -0
  168. package/query-planner/canonical-filter.js +30 -0
  169. package/query-planner/columnar-plan.d.ts +63 -0
  170. package/query-planner/columnar-plan.d.ts.map +1 -0
  171. package/query-planner/columnar-plan.js +94 -0
  172. package/query-planner/diagnostics.d.ts +3 -3
  173. package/query-planner/diagnostics.d.ts.map +1 -1
  174. package/query-planner/diagnostics.js +17 -4
  175. package/query-planner/duckdb.d.ts.map +1 -1
  176. package/query-planner/duckdb.js +16 -2
  177. package/query-planner/execution-context.d.ts.map +1 -1
  178. package/query-planner/execution-context.js +3 -1
  179. package/query-planner/executor.d.ts.map +1 -1
  180. package/query-planner/executor.js +7 -1
  181. package/query-planner/geoservices.d.ts.map +1 -1
  182. package/query-planner/geoservices.js +24 -5
  183. package/query-planner/grpc.d.ts.map +1 -1
  184. package/query-planner/grpc.js +29 -5
  185. package/query-planner/index.d.ts +20 -5
  186. package/query-planner/index.d.ts.map +1 -1
  187. package/query-planner/index.js +16 -3
  188. package/query-planner/ir.d.ts +6 -1
  189. package/query-planner/ir.d.ts.map +1 -1
  190. package/query-planner/ir.js +63 -1
  191. package/query-planner/odata-protocol-module.d.ts +54 -0
  192. package/query-planner/odata-protocol-module.d.ts.map +1 -0
  193. package/query-planner/odata-protocol-module.js +199 -0
  194. package/query-planner/odata-v1.d.ts +23 -0
  195. package/query-planner/odata-v1.d.ts.map +1 -0
  196. package/query-planner/odata-v1.js +202 -0
  197. package/query-planner/odata.d.ts +0 -3
  198. package/query-planner/odata.d.ts.map +1 -1
  199. package/query-planner/odata.js +0 -143
  200. package/query-planner/ogc-features.d.ts.map +1 -1
  201. package/query-planner/ogc-features.js +23 -1
  202. package/query-planner/planner.d.ts +2 -2
  203. package/query-planner/planner.d.ts.map +1 -1
  204. package/query-planner/planner.js +146 -27
  205. package/query-planner/representation.d.ts +59 -0
  206. package/query-planner/representation.d.ts.map +1 -0
  207. package/query-planner/representation.js +140 -0
  208. package/query-planner/types.d.ts +153 -3
  209. package/query-planner/types.d.ts.map +1 -1
  210. package/query-planner/wfs-protocol-module.d.ts +57 -0
  211. package/query-planner/wfs-protocol-module.d.ts.map +1 -0
  212. package/query-planner/wfs-protocol-module.js +731 -0
  213. package/query-planner/wfs-v1.d.ts +41 -0
  214. package/query-planner/wfs-v1.d.ts.map +1 -0
  215. package/query-planner/wfs-v1.js +366 -0
  216. package/query-planner/wfs.d.ts +1 -3
  217. package/query-planner/wfs.d.ts.map +1 -1
  218. package/query-planner/wfs.js +1 -70
  219. package/realtime/checkpoint-store.d.ts +206 -0
  220. package/realtime/checkpoint-store.d.ts.map +1 -0
  221. package/realtime/checkpoint-store.js +504 -0
  222. package/realtime/honua-server.d.ts +8 -0
  223. package/realtime/honua-server.d.ts.map +1 -1
  224. package/realtime/honua-server.js +123 -14
  225. package/realtime/index.d.ts +4 -0
  226. package/realtime/index.d.ts.map +1 -1
  227. package/realtime/index.js +2 -0
  228. package/realtime/reconciliation.d.ts +245 -0
  229. package/realtime/reconciliation.d.ts.map +1 -0
  230. package/realtime/reconciliation.js +377 -0
  231. package/realtime/resumable-transport.d.ts.map +1 -1
  232. package/realtime/sse.d.ts.map +1 -1
  233. package/realtime/websocket.d.ts.map +1 -1
  234. package/realtime/wire.d.ts +2 -1
  235. package/realtime/wire.d.ts.map +1 -1
  236. package/realtime/wire.js +24 -8
  237. package/replica-sync/errors.d.ts +19 -1
  238. package/replica-sync/errors.d.ts.map +1 -1
  239. package/replica-sync/errors.js +16 -0
  240. package/replica-sync/geoservices.d.ts +260 -0
  241. package/replica-sync/geoservices.d.ts.map +1 -0
  242. package/replica-sync/geoservices.js +1093 -0
  243. package/replica-sync/index.d.ts +5 -1
  244. package/replica-sync/index.d.ts.map +1 -1
  245. package/replica-sync/index.js +3 -1
  246. package/replica-sync/transport-conformance.d.ts +58 -0
  247. package/replica-sync/transport-conformance.d.ts.map +1 -0
  248. package/replica-sync/transport-conformance.js +265 -0
  249. package/replica-sync/types.d.ts +22 -0
  250. package/replica-sync/types.d.ts.map +1 -1
  251. package/runtime/index.d.ts +6 -2
  252. package/runtime/index.d.ts.map +1 -1
  253. package/runtime/index.js +3 -1
  254. package/runtime/load-package.d.ts +24 -0
  255. package/runtime/load-package.d.ts.map +1 -1
  256. package/runtime/load-package.js +45 -1
  257. package/runtime/maplibre-renderer.d.ts +11 -0
  258. package/runtime/maplibre-renderer.d.ts.map +1 -1
  259. package/runtime/maplibre-renderer.js +32 -7
  260. package/runtime/offline-region-protocol.d.ts +73 -0
  261. package/runtime/offline-region-protocol.d.ts.map +1 -0
  262. package/runtime/offline-region-protocol.js +63 -0
  263. package/runtime/offline-region-style.d.ts +78 -0
  264. package/runtime/offline-region-style.d.ts.map +1 -0
  265. package/runtime/offline-region-style.js +147 -0
  266. package/runtime/pmtiles-protocol.d.ts +7 -8
  267. package/runtime/pmtiles-protocol.d.ts.map +1 -1
  268. package/runtime/pmtiles-protocol.js +19 -66
  269. package/runtime/protocol-registry.d.ts +55 -0
  270. package/runtime/protocol-registry.d.ts.map +1 -0
  271. package/runtime/protocol-registry.js +103 -0
  272. package/runtime/runtime.d.ts +2 -0
  273. package/runtime/runtime.d.ts.map +1 -1
  274. package/runtime/runtime.js +6 -1
  275. package/scene-workspace/analysis-widgets.d.ts +4 -2
  276. package/scene-workspace/analysis-widgets.d.ts.map +1 -1
  277. package/scene-workspace/analysis-widgets.js +4 -2
  278. package/scene-workspace/camera-correspondence.d.ts +151 -0
  279. package/scene-workspace/camera-correspondence.d.ts.map +1 -0
  280. package/scene-workspace/camera-correspondence.js +220 -0
  281. package/scene-workspace/cesium-adapter.d.ts +230 -29
  282. package/scene-workspace/cesium-adapter.d.ts.map +1 -1
  283. package/scene-workspace/cesium-adapter.js +741 -56
  284. package/scene-workspace/cesium-mount.d.ts +205 -0
  285. package/scene-workspace/cesium-mount.d.ts.map +1 -0
  286. package/scene-workspace/cesium-mount.js +392 -0
  287. package/scene-workspace/cesium-scene-owner.d.ts +160 -0
  288. package/scene-workspace/cesium-scene-owner.d.ts.map +1 -0
  289. package/scene-workspace/cesium-scene-owner.js +205 -0
  290. package/scene-workspace/cesium-state-sync.d.ts +101 -0
  291. package/scene-workspace/cesium-state-sync.d.ts.map +1 -0
  292. package/scene-workspace/cesium-state-sync.js +432 -0
  293. package/scene-workspace/cesium-time.d.ts +346 -0
  294. package/scene-workspace/cesium-time.d.ts.map +1 -0
  295. package/scene-workspace/cesium-time.js +403 -0
  296. package/scene-workspace/index.d.ts +42 -10
  297. package/scene-workspace/index.d.ts.map +1 -1
  298. package/scene-workspace/index.js +32 -7
  299. package/scene-workspace/maplibre-state-sync.d.ts +112 -0
  300. package/scene-workspace/maplibre-state-sync.d.ts.map +1 -0
  301. package/scene-workspace/maplibre-state-sync.js +400 -0
  302. package/scene-workspace/primitives.d.ts +237 -3
  303. package/scene-workspace/primitives.d.ts.map +1 -1
  304. package/scene-workspace/primitives.js +1087 -17
  305. package/scene-workspace/scene-discovery.d.ts +5 -2
  306. package/scene-workspace/scene-discovery.d.ts.map +1 -1
  307. package/scene-workspace/scene-discovery.js +5 -2
  308. package/scene-workspace/scene-view.d.ts +5 -2
  309. package/scene-workspace/scene-view.d.ts.map +1 -1
  310. package/scene-workspace/scene-view.js +5 -2
  311. package/scene-workspace/source-to-cesium.d.ts +141 -8
  312. package/scene-workspace/source-to-cesium.d.ts.map +1 -1
  313. package/scene-workspace/source-to-cesium.js +497 -72
  314. package/scene-workspace/state-sync-port-kit.d.ts +156 -0
  315. package/scene-workspace/state-sync-port-kit.d.ts.map +1 -0
  316. package/scene-workspace/state-sync-port-kit.js +319 -0
  317. package/scene-workspace/state-sync.d.ts +34 -1
  318. package/scene-workspace/state-sync.d.ts.map +1 -1
  319. package/scene-workspace/state-sync.js +48 -0
  320. package/scene-workspace/types.d.ts +8 -0
  321. package/scene-workspace/types.d.ts.map +1 -1
  322. package/scene-workspace/types.js +2 -0
  323. package/scene-workspace/workspace.d.ts +12 -1
  324. package/scene-workspace/workspace.d.ts.map +1 -1
  325. package/scene-workspace/workspace.js +13 -0
  326. package/studio/index.d.ts +24 -7
  327. package/studio/index.d.ts.map +1 -1
  328. package/studio/index.js +21 -7
  329. package/studio/lifecycle-client.d.ts +164 -0
  330. package/studio/lifecycle-client.d.ts.map +1 -0
  331. package/studio/lifecycle-client.js +299 -0
  332. package/studio/lifecycle-errors.d.ts +91 -0
  333. package/studio/lifecycle-errors.d.ts.map +1 -0
  334. package/studio/lifecycle-errors.js +77 -0
  335. package/studio/lifecycle-types.d.ts +321 -0
  336. package/studio/lifecycle-types.d.ts.map +1 -0
  337. package/studio/lifecycle-types.js +22 -0
  338. package/web-components/controller.d.ts.map +1 -1
  339. package/web-components/csp-styles.d.ts +6 -0
  340. package/web-components/csp-styles.d.ts.map +1 -0
  341. package/web-components/csp-styles.js +53 -0
  342. package/web-components/elements.d.ts +158 -2
  343. package/web-components/elements.d.ts.map +1 -1
  344. package/web-components/elements.js +1302 -215
  345. package/web-components/export-redaction.d.ts +252 -0
  346. package/web-components/export-redaction.d.ts.map +1 -0
  347. package/web-components/export-redaction.js +588 -0
  348. package/web-components/export.d.ts +417 -0
  349. package/web-components/export.d.ts.map +1 -0
  350. package/web-components/export.js +719 -0
  351. package/web-components/feature-editor-model.d.ts +265 -0
  352. package/web-components/feature-editor-model.d.ts.map +1 -0
  353. package/web-components/feature-editor-model.js +438 -0
  354. package/web-components/feature-editor-sketch.d.ts +125 -0
  355. package/web-components/feature-editor-sketch.d.ts.map +1 -0
  356. package/web-components/feature-editor-sketch.js +194 -0
  357. package/web-components/feature-editor-workflow.d.ts +286 -0
  358. package/web-components/feature-editor-workflow.d.ts.map +1 -0
  359. package/web-components/feature-editor-workflow.js +889 -0
  360. package/web-components/feature-editor.d.ts +83 -0
  361. package/web-components/feature-editor.d.ts.map +1 -0
  362. package/web-components/feature-editor.js +829 -0
  363. package/web-components/feature-table-engine.d.ts +465 -0
  364. package/web-components/feature-table-engine.d.ts.map +1 -0
  365. package/web-components/feature-table-engine.js +1360 -0
  366. package/web-components/feature-table-view.d.ts +95 -0
  367. package/web-components/feature-table-view.d.ts.map +1 -0
  368. package/web-components/feature-table-view.js +343 -0
  369. package/web-components/index.d.ts +34 -3
  370. package/web-components/index.d.ts.map +1 -1
  371. package/web-components/index.js +35 -2
  372. package/web-components/maplibre-renderer.d.ts.map +1 -1
  373. package/web-components/maplibre-renderer.js +13 -4
  374. package/web-components/measurement.d.ts +3 -1
  375. package/web-components/measurement.d.ts.map +1 -1
  376. package/web-components/measurement.js +62 -18
  377. package/web-components/time-slider.d.ts +122 -0
  378. package/web-components/time-slider.d.ts.map +1 -0
  379. package/web-components/time-slider.js +740 -0
  380. package/web-components/types.d.ts +310 -0
  381. package/web-components/types.d.ts.map +1 -1
  382. package/webmap/convert-label.js +0 -1
  383. package/webmap/convert-symbol.d.ts.map +1 -1
@@ -31,7 +31,10 @@
31
31
  * - `overlays` — JSON array of {@link HonuaLayerListOverlay} (the `overlays`
32
32
  * property is preferred for non-trivial configs).
33
33
  * - `for` — id of the map-providing element, see Wiring.
34
- * - `label` — accessible name of the list (default "Layers").
34
+ * - `label` — accessible name of the list (default "Layers"); reflects the
35
+ * `label` property.
36
+ * - `not-seeded-label` — fallback text for the disabled-row badge (default
37
+ * "Not seeded"); reflects `notSeededLabel`.
35
38
  * - `auto-refresh` — boolean; see Reactivity.
36
39
  *
37
40
  * ## CSS parts
@@ -43,7 +46,7 @@
43
46
  * Rows are real `<label>` + `<input type="checkbox">` pairs; an overlay whose
44
47
  * style layers are all missing renders disabled with a `badge` part/slot.
45
48
  */
46
- import { HTMLElementBase, escapeAttribute, escapeHtml, globalDom, listenForHonuaMapReady, resolveHonuaMapFromContext, } from "./element-utils.js";
49
+ import { HTMLElementBase, escapeAttribute, escapeHtml, globalDom, listenForHonuaMapReady, renderShadowRoot, resolveHonuaMapFromContext, } from "./element-utils.js";
47
50
  /**
48
51
  * Custom element implementing the overlay layer list. Registered as
49
52
  * `honua-layer-list` by `defineHonuaControls` (which runs automatically on
@@ -51,7 +54,7 @@ import { HTMLElementBase, escapeAttribute, escapeHtml, globalDom, listenForHonua
51
54
  */
52
55
  export class HonuaLayerListElement extends HTMLElementBase {
53
56
  static get observedAttributes() {
54
- return ["overlays", "for", "label", "auto-refresh"];
57
+ return ["overlays", "for", "label", "not-seeded-label", "auto-refresh"];
55
58
  }
56
59
  #map;
57
60
  #overlays = [];
@@ -74,6 +77,30 @@ export class HonuaLayerListElement extends HTMLElementBase {
74
77
  connect(map) {
75
78
  this.map = map;
76
79
  }
80
+ /** Accessible name of the list. Reflects the `label` attribute. */
81
+ get label() {
82
+ return this.#attr("label") ?? "Layers";
83
+ }
84
+ set label(value) {
85
+ if (typeof this.setAttribute !== "function")
86
+ return;
87
+ if (value === undefined)
88
+ this.removeAttribute?.("label");
89
+ else
90
+ this.setAttribute("label", value);
91
+ }
92
+ /** Fallback text for an overlay whose style layers are not seeded. */
93
+ get notSeededLabel() {
94
+ return this.#attr("not-seeded-label") ?? "Not seeded";
95
+ }
96
+ set notSeededLabel(value) {
97
+ if (typeof this.setAttribute !== "function")
98
+ return;
99
+ if (value === undefined)
100
+ this.removeAttribute?.("not-seeded-label");
101
+ else
102
+ this.setAttribute("not-seeded-label", value);
103
+ }
77
104
  /** The registered overlay definitions. */
78
105
  get overlays() {
79
106
  return this.#overlays;
@@ -141,7 +168,7 @@ export class HonuaLayerListElement extends HTMLElementBase {
141
168
  this.#subscribeStyledata();
142
169
  return;
143
170
  }
144
- // "label" only changes the rendering.
171
+ // "label" / "not-seeded-label" only change the rendering.
145
172
  this.render();
146
173
  }
147
174
  connectedCallback() {
@@ -231,14 +258,19 @@ export class HonuaLayerListElement extends HTMLElementBase {
231
258
  const root = this.shadowRoot;
232
259
  if (!root)
233
260
  return;
234
- const label = this.#attr("label") ?? "Layers";
235
- root.innerHTML = `
236
- <style>${structuralStyles()}</style>
261
+ const focusedOverlayId = root.activeElement?.getAttribute("data-overlay-id");
262
+ const label = this.label;
263
+ renderShadowRoot(root, structuralStyles(), `
237
264
  <div part="root" class="root" role="group" aria-label="${escapeAttribute(label)}">
238
265
  ${this.#overlays.map((overlay) => this.#renderRow(overlay)).join("")}
239
266
  </div>
240
- `;
267
+ `);
241
268
  this.#bindRows(root);
269
+ if (focusedOverlayId) {
270
+ [...root.querySelectorAll("input[data-overlay-id]")]
271
+ .find((input) => input.getAttribute("data-overlay-id") === focusedOverlayId)
272
+ ?.focus({ preventScroll: true });
273
+ }
242
274
  }
243
275
  #renderRow(overlay) {
244
276
  const seeded = this.#isSeeded(overlay);
@@ -246,7 +278,9 @@ export class HonuaLayerListElement extends HTMLElementBase {
246
278
  const attribution = overlay.attribution
247
279
  ? `<span part="attribution" class="attribution">${escapeHtml(overlay.attribution)}</span>`
248
280
  : "";
249
- const badge = seeded ? "" : `<span part="badge" class="badge"><slot name="not-seeded">Not seeded</slot></span>`;
281
+ const badge = seeded
282
+ ? ""
283
+ : `<span part="badge" class="badge"><slot name="not-seeded">${escapeHtml(this.notSeededLabel)}</slot></span>`;
250
284
  return `
251
285
  <label part="row" class="row" data-overlay-id="${escapeAttribute(overlay.id)}"${seeded ? "" : " data-not-seeded"}>
252
286
  <input
@@ -306,10 +340,9 @@ export class HonuaLayerListElement extends HTMLElementBase {
306
340
  * Unlike the other controls-kit elements, this is **opt-in** and is NOT run by
307
341
  * the blanket `defineHonuaControls()` / module-load auto-registration. The
308
342
  * `web-components` entry ships its own (controller-driven) `honua-layer-list`
309
- * under the same tag, and that kit auto-registers on import. Auto-registering
310
- * the controls variant too would let it silently win the tag in apps that load
311
- * both kits (the order is import-dependent), so callers who want the native,
312
- * overlay-definition-driven layer list register it explicitly:
343
+ * under the same tag and is that tag's canonical/default registrant (see
344
+ * `./catalog.js`), so callers who want the native, overlay-definition-driven
345
+ * layer list register it explicitly:
313
346
  *
314
347
  * ```ts
315
348
  * import { defineHonuaLayerList } from "@honua/sdk-js/controls";
@@ -365,11 +398,35 @@ function cssEscape(value) {
365
398
  /** Structural-only styles; theme via `::part(root)`, `::part(row)`, `::part(checkbox)`, ... */
366
399
  function structuralStyles() {
367
400
  return `
368
- :host { display: block; }
401
+ :host {
402
+ display: block;
403
+ box-sizing: border-box;
404
+ min-width: 0;
405
+ max-width: 100%;
406
+ }
369
407
  .root { display: flex; flex-direction: column; }
370
- .row { display: flex; align-items: center; gap: 0.5em; }
408
+ .root, .row {
409
+ box-sizing: border-box;
410
+ min-width: 0;
411
+ max-width: 100%;
412
+ }
413
+ .row {
414
+ display: flex;
415
+ align-items: center;
416
+ gap: 0.5em;
417
+ overflow-wrap: anywhere;
418
+ }
371
419
  .checkbox { flex: none; }
420
+ .label, .attribution, .badge {
421
+ min-width: 0;
422
+ max-width: 100%;
423
+ overflow-wrap: anywhere;
424
+ }
372
425
  .badge { font-size: 0.75em; }
373
426
  [data-not-seeded] { cursor: not-allowed; }
427
+ @media (forced-colors: active), (prefers-contrast: more) {
428
+ .row:has(.checkbox:checked) { outline: 2px solid CanvasText; outline-offset: 2px; }
429
+ .row[data-not-seeded] { color: GrayText; }
430
+ }
374
431
  `;
375
432
  }
@@ -33,6 +33,8 @@
33
33
  * - `for` — id of the map-providing element.
34
34
  * - `layer` — style layer id to derive entries from.
35
35
  * - `layer-title` — optional title rendered above the derived section.
36
+ * - `fallback-label` — label for a derived expression's fallback branch
37
+ * (default "Other"); reflects `fallbackLabel`.
36
38
  * - `heading` — optional heading rendered above the whole legend.
37
39
  * - `follow-layer-visibility` — boolean; hide a section while its source
38
40
  * layer's `visibility` layout property is `"none"` (sections carry the
@@ -48,16 +50,21 @@
48
50
  * presentation, with the text labels carrying the meaning.
49
51
  *
50
52
  * Note: the `web-components` entry also registers a (controller-driven)
51
- * `honua-legend` element. Both registrations are guarded with an if-missing
52
- * check, so whichever entry is imported first owns the tag; import
53
- * `@honua/sdk-js/controls` first to use this element.
53
+ * `honua-legend` element, and is that tag's canonical/default registrant
54
+ * (see `./catalog.js`) — importing `@honua/sdk-js/controls` alone or
55
+ * alongside `@honua/sdk-js/web-components`, in either order, never registers
56
+ * this implementation automatically. Call {@link defineHonuaLegend} (or
57
+ * `registerComponent("controls.legend")` from `./registry.js`) explicitly,
58
+ * before anything else claims the tag, to use this map-style-derived element
59
+ * instead.
54
60
  */
55
61
  import { HTMLElementBase } from "./element-utils.js";
56
62
  import type { HonuaLegendEntry, HonuaLegendMap, HonuaLegendSection } from "./types.js";
57
63
  /**
58
64
  * Custom element implementing the legend. Registered as `honua-legend` by
59
- * `defineHonuaControls` (which runs automatically on import of the controls
60
- * entry when a `customElements` registry exists).
65
+ * {@link defineHonuaLegend} (opt-in; not part of the blanket
66
+ * {@link defineHonuaControls} auto-registration — see that function's doc for
67
+ * why).
61
68
  */
62
69
  export declare class HonuaLegendElement extends HTMLElementBase {
63
70
  #private;
@@ -67,6 +74,9 @@ export declare class HonuaLegendElement extends HTMLElementBase {
67
74
  set map(map: HonuaLegendMap | undefined);
68
75
  /** Wires the legend to a MapLibre map. Equivalent to setting `.map`. */
69
76
  connect(map: HonuaLegendMap): void;
77
+ /** Label for a derived expression's fallback branch. Reflects `fallback-label`. */
78
+ get fallbackLabel(): string;
79
+ set fallbackLabel(value: string | undefined);
70
80
  /**
71
81
  * Explicit legend content. Accepts a flat {@link HonuaLegendEntry} array
72
82
  * (one untitled section), {@link HonuaLegendSection} groups, or a mix;
@@ -101,4 +111,21 @@ export declare class HonuaLegendElement extends HTMLElementBase {
101
111
  disconnectedCallback(): void;
102
112
  protected render(): void;
103
113
  }
114
+ /**
115
+ * Registers the legend custom element (`honua-legend`) with the
116
+ * map-style-derived, framework-free implementation. Skips the registration
117
+ * when the tag is already defined.
118
+ *
119
+ * Like {@link defineHonuaLayerList}, this is **opt-in** and is NOT run by the
120
+ * blanket `defineHonuaControls()` / module-load auto-registration — the
121
+ * `web-components` entry ships its own (controller-driven) `honua-legend`
122
+ * and is that tag's canonical/default registrant, so a caller who wants this
123
+ * implementation instead claims the tag explicitly:
124
+ *
125
+ * ```ts
126
+ * import { defineHonuaLegend } from "@honua/sdk-js/controls";
127
+ * defineHonuaLegend();
128
+ * ```
129
+ */
130
+ export declare function defineHonuaLegend(registry?: CustomElementRegistry): void;
104
131
  //# sourceMappingURL=legend.d.ts.map
@@ -1 +1 @@
1
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AAW,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAE9C;IAED,qFAAqF;IACrF,IAAW,WAAW,IAAI,OAAO,CAEhC;IAED,IAAW,WAAW,CAAC,KAAK,EAAE,OAAO,EAEpC;IAED;;;;OAIG;IACH,IAAW,WAAW,IAAI,MAAM,GAAG,SAAS,CAE3C;IAED;;;OAGG;IACH,IAAW,QAAQ,IAAI,SAAS,kBAAkB,EAAE,CAQnD;IAED,4EAA4E;IACrE,OAAO,IAAI,IAAI;IAKf,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAkB/F,iBAAiB,IAAI,IAAI;IASzB,oBAAoB,IAAI,IAAI;IA2EnC,SAAS,CAAC,MAAM,IAAI,IAAI;CAmDzB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,wBAA2B,GAAG,IAAI,CAK3E"}
@@ -33,6 +33,8 @@
33
33
  * - `for` — id of the map-providing element.
34
34
  * - `layer` — style layer id to derive entries from.
35
35
  * - `layer-title` — optional title rendered above the derived section.
36
+ * - `fallback-label` — label for a derived expression's fallback branch
37
+ * (default "Other"); reflects `fallbackLabel`.
36
38
  * - `heading` — optional heading rendered above the whole legend.
37
39
  * - `follow-layer-visibility` — boolean; hide a section while its source
38
40
  * layer's `visibility` layout property is `"none"` (sections carry the
@@ -48,20 +50,25 @@
48
50
  * presentation, with the text labels carrying the meaning.
49
51
  *
50
52
  * Note: the `web-components` entry also registers a (controller-driven)
51
- * `honua-legend` element. Both registrations are guarded with an if-missing
52
- * check, so whichever entry is imported first owns the tag; import
53
- * `@honua/sdk-js/controls` first to use this element.
53
+ * `honua-legend` element, and is that tag's canonical/default registrant
54
+ * (see `./catalog.js`) — importing `@honua/sdk-js/controls` alone or
55
+ * alongside `@honua/sdk-js/web-components`, in either order, never registers
56
+ * this implementation automatically. Call {@link defineHonuaLegend} (or
57
+ * `registerComponent("controls.legend")` from `./registry.js`) explicitly,
58
+ * before anything else claims the tag, to use this map-style-derived element
59
+ * instead.
54
60
  */
55
- import { HTMLElementBase, escapeAttribute, escapeHtml, listenForHonuaMapReady, resolveHonuaMapFromContext, } from "./element-utils.js";
56
- import { HonuaLegendDeriveError, deriveLegendEntries } from "./legend-derive.js";
61
+ import { HTMLElementBase, escapeAttribute, escapeHtml, globalDom, listenForHonuaMapReady, renderShadowRoot, resolveHonuaMapFromContext, } from "./element-utils.js";
62
+ import { HONUA_LEGEND_FALLBACK_LABEL, HonuaLegendDeriveError, deriveLegendEntries } from "./legend-derive.js";
57
63
  /**
58
64
  * Custom element implementing the legend. Registered as `honua-legend` by
59
- * `defineHonuaControls` (which runs automatically on import of the controls
60
- * entry when a `customElements` registry exists).
65
+ * {@link defineHonuaLegend} (opt-in; not part of the blanket
66
+ * {@link defineHonuaControls} auto-registration — see that function's doc for
67
+ * why).
61
68
  */
62
69
  export class HonuaLegendElement extends HTMLElementBase {
63
70
  static get observedAttributes() {
64
- return ["for", "layer", "layer-title", "heading", "follow-layer-visibility", "auto-refresh"];
71
+ return ["for", "layer", "layer-title", "fallback-label", "heading", "follow-layer-visibility", "auto-refresh"];
65
72
  }
66
73
  #map;
67
74
  #explicitSections = [];
@@ -86,6 +93,18 @@ export class HonuaLegendElement extends HTMLElementBase {
86
93
  connect(map) {
87
94
  this.map = map;
88
95
  }
96
+ /** Label for a derived expression's fallback branch. Reflects `fallback-label`. */
97
+ get fallbackLabel() {
98
+ return this.#attr("fallback-label") ?? HONUA_LEGEND_FALLBACK_LABEL;
99
+ }
100
+ set fallbackLabel(value) {
101
+ if (typeof this.setAttribute !== "function")
102
+ return;
103
+ if (value === undefined)
104
+ this.removeAttribute?.("fallback-label");
105
+ else
106
+ this.setAttribute("fallback-label", value);
107
+ }
89
108
  /**
90
109
  * Explicit legend content. Accepts a flat {@link HonuaLegendEntry} array
91
110
  * (one untitled section), {@link HonuaLegendSection} groups, or a mix;
@@ -156,7 +175,7 @@ export class HonuaLegendElement extends HTMLElementBase {
156
175
  this.#resolveMapFromContext();
157
176
  return;
158
177
  }
159
- if (name === "layer" || name === "layer-title") {
178
+ if (name === "layer" || name === "layer-title" || name === "fallback-label") {
160
179
  this.refresh();
161
180
  return;
162
181
  }
@@ -194,7 +213,7 @@ export class HonuaLegendElement extends HTMLElementBase {
194
213
  return;
195
214
  }
196
215
  try {
197
- this.#derivedEntries = deriveLegendEntries(map, layerId);
216
+ this.#derivedEntries = deriveLegendEntries(map, layerId).map((entry) => entry.label === HONUA_LEGEND_FALLBACK_LABEL ? { ...entry, label: this.fallbackLabel } : entry);
198
217
  this.#deriveError = undefined;
199
218
  }
200
219
  catch (error) {
@@ -254,13 +273,12 @@ export class HonuaLegendElement extends HTMLElementBase {
254
273
  if (!root)
255
274
  return;
256
275
  const heading = this.#attr("heading");
257
- root.innerHTML = `
258
- <style>${structuralStyles()}</style>
276
+ renderShadowRoot(root, structuralStyles(), `
259
277
  <div part="root" class="root">
260
278
  ${heading ? `<p part="heading" class="heading">${escapeHtml(heading)}</p>` : ""}
261
279
  ${this.sections.map((section) => this.#renderSection(section)).join("")}
262
280
  </div>
263
- `;
281
+ `);
264
282
  }
265
283
  #renderSection(section) {
266
284
  const hidden = this.#sectionHidden(section);
@@ -296,6 +314,29 @@ export class HonuaLegendElement extends HTMLElementBase {
296
314
  this.removeAttribute?.(name);
297
315
  }
298
316
  }
317
+ /**
318
+ * Registers the legend custom element (`honua-legend`) with the
319
+ * map-style-derived, framework-free implementation. Skips the registration
320
+ * when the tag is already defined.
321
+ *
322
+ * Like {@link defineHonuaLayerList}, this is **opt-in** and is NOT run by the
323
+ * blanket `defineHonuaControls()` / module-load auto-registration — the
324
+ * `web-components` entry ships its own (controller-driven) `honua-legend`
325
+ * and is that tag's canonical/default registrant, so a caller who wants this
326
+ * implementation instead claims the tag explicitly:
327
+ *
328
+ * ```ts
329
+ * import { defineHonuaLegend } from "@honua/sdk-js/controls";
330
+ * defineHonuaLegend();
331
+ * ```
332
+ */
333
+ export function defineHonuaLegend(registry = globalDom.customElements) {
334
+ if (!registry)
335
+ return;
336
+ if (!registry.get("honua-legend")) {
337
+ registry.define("honua-legend", HonuaLegendElement);
338
+ }
339
+ }
299
340
  function normalizeSections(value) {
300
341
  const sections = [];
301
342
  let loose = [];
@@ -348,13 +389,16 @@ function renderRow(entry) {
348
389
  const fill = typeof entry.color === "string" ? entry.color : entry.color.fill;
349
390
  const outline = typeof entry.color === "object" && entry.color !== null ? entry.color.outline : undefined;
350
391
  const shape = entry.shape ?? "fill";
351
- const swatchStyle = [
352
- ...(fill !== undefined ? [`--legend-fill:${fill}`] : []),
353
- ...(outline !== undefined ? [`--legend-outline:${outline}`] : []),
354
- ].join(";");
392
+ const fillAttribute = escapeAttribute(fill ?? "transparent");
393
+ const outlineAttribute = escapeAttribute(outline ?? "none");
394
+ const mark = shape === "line"
395
+ ? `<line x1="1" y1="8" x2="15" y2="8" stroke="${fillAttribute}" stroke-width="3" />`
396
+ : shape === "circle"
397
+ ? `<circle cx="8" cy="8" r="7" fill="${fillAttribute}" stroke="${outlineAttribute}" />`
398
+ : `<rect x="1" y="1" width="14" height="14" fill="${fillAttribute}" stroke="${outlineAttribute}" />`;
355
399
  return `
356
400
  <li part="row" class="row">
357
- <span part="swatch" class="swatch swatch-${shape}" aria-hidden="true"${swatchStyle ? ` style="${escapeAttribute(swatchStyle)}"` : ""}></span>
401
+ <svg part="swatch" class="swatch swatch-${shape}" aria-hidden="true" viewBox="0 0 16 16">${mark}</svg>
358
402
  <span part="label" class="label">${escapeHtml(entry.label)}</span>
359
403
  </li>
360
404
  `;
@@ -362,20 +406,46 @@ function renderRow(entry) {
362
406
  /** Structural-only styles; theme via `::part(root)`, `::part(row)`, `::part(swatch)`, ... */
363
407
  function structuralStyles() {
364
408
  return `
365
- :host { display: block; }
409
+ :host {
410
+ display: block;
411
+ box-sizing: border-box;
412
+ min-width: 0;
413
+ max-width: 100%;
414
+ }
415
+ .root, .section, .rows {
416
+ box-sizing: border-box;
417
+ min-width: 0;
418
+ max-width: 100%;
419
+ }
366
420
  .heading, .section-title { margin: 0; }
367
421
  .section { margin: 0; }
368
422
  .rows { list-style: none; margin: 0; padding: 0; }
369
- .row { display: flex; align-items: center; gap: 0.5em; }
423
+ .row {
424
+ display: flex;
425
+ flex-direction: row;
426
+ direction: inherit;
427
+ align-items: center;
428
+ gap: 0.5em;
429
+ min-width: 0;
430
+ max-width: 100%;
431
+ overflow-wrap: anywhere;
432
+ }
433
+ .heading, .section-title, .label {
434
+ min-width: 0;
435
+ max-width: 100%;
436
+ overflow-wrap: anywhere;
437
+ }
438
+ .label { text-align: start; }
370
439
  .swatch {
371
440
  flex: none;
372
441
  inline-size: 1em;
373
442
  block-size: 1em;
374
- box-sizing: border-box;
375
- background: var(--legend-fill, transparent);
376
- border: 1px solid var(--legend-outline, transparent);
443
+ overflow: visible;
444
+ }
445
+ @media (forced-colors: active), (prefers-contrast: more) {
446
+ .row { color: CanvasText; }
447
+ .swatch { color: CanvasText; forced-color-adjust: none; }
448
+ .swatch > * { forced-color-adjust: none; }
377
449
  }
378
- .swatch-line { block-size: 3px; border: none; }
379
- .swatch-circle { border-radius: 50%; }
380
450
  `;
381
451
  }
@@ -0,0 +1,152 @@
1
+ /**
2
+ * The **production qualification matrix** for the Honua custom-element kit
3
+ * (issue #683, parent epic #678; REQ-004 / REQ-005 / NFR-001).
4
+ *
5
+ * Epic #678's premise is that "production support" for a component library is
6
+ * not a claim anybody gets to make in prose. It is a matrix: every shipped
7
+ * component × every gate that matters, each cell carrying a status and, when
8
+ * the status is a claim of success, the automated evidence that backs it. This
9
+ * module is that matrix, and it extends the existing component catalog
10
+ * ({@link "./catalog.js"}) rather than introducing a second inventory —
11
+ * `HONUA_COMPONENT_CATALOG` remains the single list of shipped tags, and every
12
+ * catalog id must appear here exactly once (enforced by
13
+ * `scripts/component-qualification.mjs`).
14
+ *
15
+ * ## The honesty rules
16
+ *
17
+ * The matrix is seeded from what the test suite *actually* asserts today, not
18
+ * from what the components ought to do. Concretely:
19
+ *
20
+ * - `"passing"` requires at least one existing test file as evidence, and the
21
+ * CI verifier fails if any referenced file is missing. Deleting the test that
22
+ * backs a gate therefore breaks the build rather than quietly downgrading the
23
+ * claim.
24
+ * - `"failing"` is used where the requirement is *known* not to be met —
25
+ * including from code inspection, before an automated gate exists. It always
26
+ * carries a note naming the mechanism. This is deliberately more informative
27
+ * than `"pending"`: "we know the components hard-code English strings" is a
28
+ * different engineering state from "nobody has looked".
29
+ * - `"pending"` means no automated gate and no established verdict. It is the
30
+ * default, and most of this matrix is honestly in it.
31
+ * - `"not-applicable"` requires a note justifying why the gate cannot apply to
32
+ * that component — it is the only status that can silently remove work, so it
33
+ * is the one that most needs an argument attached.
34
+ *
35
+ * Nothing here is aspirational, and this matrix is a *different axis* from the
36
+ * catalog's `supportTier`. The tier records the functional maturity whichever
37
+ * feature issue (#680-#683) delivered on a component; this records the
38
+ * cross-cutting gates, which no component has cleared yet. The verifier enforces
39
+ * only the direction that is implied — clearing every gate requires the
40
+ * production tier, since gate completion is the harder bar — and surfaces every
41
+ * production-tier component's still-open gates rather than pretending the tier
42
+ * settles them. See {@link isComponentProductionQualified} and
43
+ * {@link listOpenQualificationGates}.
44
+ *
45
+ * ## Shape
46
+ *
47
+ * The declarations below are stored **inverted** — per gate, the groups of
48
+ * components that share a status and evidence — because that is how the
49
+ * evidence actually clusters (one test file typically proves one gate for
50
+ * several components) and because it keeps the reviewable diff small. The
51
+ * public API ({@link getComponentQualification},
52
+ * {@link listComponentQualifications}) expands it back into the dense
53
+ * per-component × per-gate matrix that consumers and the generated
54
+ * `config/component-qualification.v1.json` manifest want.
55
+ *
56
+ * Like `./catalog.js` this module is pure metadata: no DOM, no element classes,
57
+ * no registration, no `src/core` or `src/runtime` import. Importing it costs a
58
+ * consumer bundle nothing that NFR-001 forbids.
59
+ *
60
+ * @module
61
+ */
62
+ import { type HonuaComponentCatalogEntry } from "./catalog.js";
63
+ /**
64
+ * Bumped whenever a gate is added/removed or a status vocabulary changes, so
65
+ * the generated manifest and any external consumer can detect a shape change
66
+ * distinctly from a routine status update.
67
+ */
68
+ export declare const HONUA_COMPONENT_QUALIFICATION_DATA_VERSION = "1.1.0";
69
+ /** Which issue requirement a gate discharges. */
70
+ export type HonuaComponentQualificationRequirement = "REQ-004" | "REQ-005" | "NFR-001";
71
+ /** Closed status vocabulary. See the module doc for the honesty rules. */
72
+ export type HonuaComponentQualificationStatus = "passing" | "failing" | "pending" | "not-applicable";
73
+ /** Every status, in escalating-confidence order. */
74
+ export declare const HONUA_COMPONENT_QUALIFICATION_STATUSES: readonly HonuaComponentQualificationStatus[];
75
+ /** Stable gate ids. Never reused; adding one bumps the data version. */
76
+ export type HonuaComponentQualificationGateId = "keyboard-behavior" | "screen-reader-semantics" | "focus-restoration" | "reduced-motion" | "high-contrast" | "responsive-layout" | "localization" | "pseudo-locale" | "rtl" | "visual-regression" | "strict-csp" | "zero-console-error" | "deterministic-disposal" | "duplicate-listener" | "memory-leak" | "ssr-import" | "secure-export" | "bundle-budget";
77
+ /** One gate's definition: what it means and what would satisfy it. */
78
+ export interface HonuaComponentQualificationGate {
79
+ readonly id: HonuaComponentQualificationGateId;
80
+ readonly requirement: HonuaComponentQualificationRequirement;
81
+ readonly title: string;
82
+ /** What a `passing` cell asserts for this gate. */
83
+ readonly criterion: string;
84
+ }
85
+ /** The full gate list, in a stable order. */
86
+ export declare const HONUA_COMPONENT_QUALIFICATION_GATES: readonly HonuaComponentQualificationGate[];
87
+ /** One cell of the matrix. */
88
+ export interface HonuaComponentQualificationCell {
89
+ readonly gate: HonuaComponentQualificationGateId;
90
+ readonly requirement: HonuaComponentQualificationRequirement;
91
+ readonly status: HonuaComponentQualificationStatus;
92
+ /** Repo-relative files that prove a `passing` status. Empty otherwise. */
93
+ readonly evidence: readonly string[];
94
+ /** Required for `failing` and `not-applicable`; optional context otherwise. */
95
+ readonly note?: string;
96
+ }
97
+ /** One component's full row. */
98
+ export interface HonuaComponentQualification {
99
+ readonly id: string;
100
+ readonly tag: string;
101
+ readonly source: HonuaComponentCatalogEntry["source"];
102
+ readonly gates: readonly HonuaComponentQualificationCell[];
103
+ }
104
+ /** Aggregate counts for a row or for the whole matrix. */
105
+ export interface HonuaComponentQualificationSummary {
106
+ readonly passing: number;
107
+ readonly failing: number;
108
+ readonly pending: number;
109
+ readonly notApplicable: number;
110
+ /** Gates that must still reach `passing` before production tier. */
111
+ readonly blocking: readonly HonuaComponentQualificationGateId[];
112
+ }
113
+ /** The full matrix row for one catalog id, or `undefined` for an unknown id. */
114
+ export declare function getComponentQualification(id: string): HonuaComponentQualification | undefined;
115
+ /** The full matrix, in catalog order. */
116
+ export declare function listComponentQualifications(): readonly HonuaComponentQualification[];
117
+ /** One gate's definition. */
118
+ export declare function describeComponentQualificationGate(gate: HonuaComponentQualificationGateId): HonuaComponentQualificationGate | undefined;
119
+ /** Counts and remaining blockers for one row, or for the whole matrix when `id` is omitted. */
120
+ export declare function summarizeComponentQualification(id?: string): HonuaComponentQualificationSummary;
121
+ /**
122
+ * Whether a component has cleared **every** gate in this matrix.
123
+ *
124
+ * `not-applicable` cells count as cleared (that is what the status means, and
125
+ * why it requires a justifying note); `pending` and `failing` do not.
126
+ *
127
+ * This is deliberately *not* the same claim as the catalog's
128
+ * `supportTier: "production-tier"`, and conflating the two would misreport both.
129
+ * The catalog tier is a **functional maturity** claim owned by whichever feature
130
+ * issue raised the component (#680-#683): `<honua-feature-editor>` is
131
+ * production-tier because #680 delivered capability-aware editing, conflict
132
+ * handling, snapping, and attachment staging on it. This function is the
133
+ * **cross-cutting gate** axis, which no component has cleared yet.
134
+ *
135
+ * `scripts/component-qualification.mjs` therefore enforces only the direction
136
+ * that is actually implied: a component that has cleared every gate must be
137
+ * declared production-tier, because gate completion is strictly the harder bar.
138
+ * The reverse does not hold, so a production-tier component simply carries its
139
+ * still-open gates in the manifest's `openGates` — visible, counted, and
140
+ * impossible to mistake for done. See {@link listOpenQualificationGates}.
141
+ */
142
+ export declare function isComponentProductionQualified(id: string): boolean;
143
+ /**
144
+ * The gates a component has not yet cleared (`pending` or `failing`), in gate
145
+ * order. Empty exactly when {@link isComponentProductionQualified} is true.
146
+ *
147
+ * This is what keeps a `production-tier` catalog claim honest: the tier says the
148
+ * component's *feature* work landed, and this says precisely what remains on the
149
+ * accessibility, localization, visual, CSP, lifecycle, and bundle axes.
150
+ */
151
+ export declare function listOpenQualificationGates(id: string): readonly HonuaComponentQualificationGateId[];
152
+ //# sourceMappingURL=qualification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qualification.d.ts","sourceRoot":"","sources":["../../../src/controls/qualification.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AAEH,OAAO,EAA2B,KAAK,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAExF;;;;GAIG;AACH,eAAO,MAAM,0CAA0C,UAAU,CAAC;AAElE,iDAAiD;AACjD,MAAM,MAAM,sCAAsC,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAEvF,0EAA0E;AAC1E,MAAM,MAAM,iCAAiC,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,gBAAgB,CAAC;AAErG,oDAAoD;AACpD,eAAO,MAAM,sCAAsC,EAAE,SAAS,iCAAiC,EAKpF,CAAC;AAEZ,wEAAwE;AACxE,MAAM,MAAM,iCAAiC,GAEzC,mBAAmB,GACnB,yBAAyB,GACzB,mBAAmB,GACnB,gBAAgB,GAChB,eAAe,GACf,mBAAmB,GACnB,cAAc,GACd,eAAe,GACf,KAAK,GAEL,mBAAmB,GACnB,YAAY,GACZ,oBAAoB,GACpB,wBAAwB,GACxB,oBAAoB,GACpB,aAAa,GACb,YAAY,GACZ,eAAe,GACf,eAAe,CAAC;AAEpB,sEAAsE;AACtE,MAAM,WAAW,+BAA+B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