@honua/app-platform 0.1.2-beta.0 → 0.1.7-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 (400) hide show
  1. package/app/index.d.ts.map +1 -1
  2. package/app/index.js +4 -0
  3. package/collaboration/client.d.ts.map +1 -1
  4. package/connect-url-safety.d.ts +53 -0
  5. package/connect-url-safety.js +189 -0
  6. package/contract/discovery.d.ts +34 -0
  7. package/contract/discovery.d.ts.map +1 -1
  8. package/contract/index.d.ts +7 -5
  9. package/contract/index.d.ts.map +1 -1
  10. package/contract/index.js +3 -2
  11. package/contract/pmtiles.d.ts +10 -1
  12. package/contract/pmtiles.d.ts.map +1 -1
  13. package/contract/pmtiles.js +10 -2
  14. package/contract/protocol-module.d.ts +84 -9
  15. package/contract/protocol-module.d.ts.map +1 -1
  16. package/contract/query-filter-fes.d.ts +18 -0
  17. package/contract/query-filter-fes.d.ts.map +1 -0
  18. package/contract/query-filter-fes.js +122 -0
  19. package/contract/query-filter.d.ts +300 -0
  20. package/contract/query-filter.d.ts.map +1 -0
  21. package/contract/query-filter.js +883 -0
  22. package/contract/schema.d.ts +12 -0
  23. package/contract/schema.d.ts.map +1 -1
  24. package/contract/schema.js +34 -0
  25. package/contract/source-capability-support.d.ts.map +1 -1
  26. package/contract/source-capability-support.js +15 -3
  27. package/contract/source.d.ts +45 -25
  28. package/contract/source.d.ts.map +1 -1
  29. package/contract/source.js +719 -479
  30. package/contract/types.d.ts +88 -19
  31. package/contract/types.d.ts.map +1 -1
  32. package/contract/types.js +4 -0
  33. package/contract/widget-source.d.ts.map +1 -1
  34. package/controls/basemap-switcher.d.ts +19 -11
  35. package/controls/basemap-switcher.d.ts.map +1 -1
  36. package/controls/basemap-switcher.js +58 -25
  37. package/controls/catalog.d.ts +105 -0
  38. package/controls/catalog.d.ts.map +1 -0
  39. package/controls/catalog.js +341 -0
  40. package/controls/element-utils.d.ts +9 -0
  41. package/controls/element-utils.d.ts.map +1 -1
  42. package/controls/element-utils.js +17 -0
  43. package/controls/index.d.ts +29 -8
  44. package/controls/index.d.ts.map +1 -1
  45. package/controls/index.js +26 -8
  46. package/controls/layer-list.d.ts +13 -5
  47. package/controls/layer-list.d.ts.map +1 -1
  48. package/controls/layer-list.js +72 -15
  49. package/controls/legend.d.ts +32 -5
  50. package/controls/legend.d.ts.map +1 -1
  51. package/controls/legend.js +95 -25
  52. package/controls/qualification.d.ts +152 -0
  53. package/controls/qualification.d.ts.map +1 -0
  54. package/controls/qualification.js +1265 -0
  55. package/controls/registry.d.ts +104 -0
  56. package/controls/registry.d.ts.map +1 -0
  57. package/controls/registry.js +150 -0
  58. package/controls/swipe-control.d.ts +6 -1
  59. package/controls/swipe-control.d.ts.map +1 -1
  60. package/controls/swipe-control.js +82 -20
  61. package/core/client.d.ts +51 -21
  62. package/core/client.d.ts.map +1 -1
  63. package/core/client.js +234 -54
  64. package/core/error-classifications.d.ts +23 -0
  65. package/core/error-classifications.d.ts.map +1 -1
  66. package/core/error-classifications.js +23 -0
  67. package/core/error-code-registry.d.ts +24 -1
  68. package/core/error-code-registry.d.ts.map +1 -1
  69. package/core/error-code-registry.js +23 -0
  70. package/core/error-envelope.js +2 -0
  71. package/core/errors.d.ts +2 -2
  72. package/core/errors.d.ts.map +1 -1
  73. package/core/errors.js +1 -1
  74. package/core/geoparquet-sql.d.ts +69 -5
  75. package/core/geoparquet-sql.d.ts.map +1 -1
  76. package/core/geoparquet-sql.js +327 -10
  77. package/core/odata-write-codec.d.ts.map +1 -1
  78. package/core/odata-write-codec.js +0 -1
  79. package/core/odata.d.ts +6 -0
  80. package/core/odata.d.ts.map +1 -1
  81. package/core/odata.js +6 -1
  82. package/core/ogc-processes.d.ts +182 -25
  83. package/core/ogc-processes.d.ts.map +1 -1
  84. package/core/ogc-processes.js +602 -30
  85. package/core/process-runner.d.ts +8 -1
  86. package/core/process-runner.d.ts.map +1 -1
  87. package/core/process-runner.js +1 -0
  88. package/core/protocol-transport.d.ts +2 -0
  89. package/core/protocol-transport.d.ts.map +1 -1
  90. package/core/stac.d.ts +32 -0
  91. package/core/stac.d.ts.map +1 -1
  92. package/core/stac.js +158 -23
  93. package/core/surfaces.d.ts.map +1 -1
  94. package/core/surfaces.js +273 -68
  95. package/core/types.d.ts +138 -11
  96. package/core/types.d.ts.map +1 -1
  97. package/core/wfs-axis-order.d.ts +18 -0
  98. package/core/wfs-axis-order.d.ts.map +1 -0
  99. package/core/wfs-axis-order.js +108 -0
  100. package/core/wfs-capabilities.d.ts +65 -24
  101. package/core/wfs-capabilities.d.ts.map +1 -1
  102. package/core/wfs-capabilities.js +237 -27
  103. package/core/wfs-filter.d.ts +26 -3
  104. package/core/wfs-filter.d.ts.map +1 -1
  105. package/core/wfs-filter.js +48 -53
  106. package/core/wfs-protocol-error.d.ts +12 -0
  107. package/core/wfs-protocol-error.d.ts.map +1 -0
  108. package/core/wfs-protocol-error.js +13 -0
  109. package/core/wfs.d.ts +53 -1
  110. package/core/wfs.d.ts.map +1 -1
  111. package/core/wfs.js +251 -29
  112. package/core/wms-feature-info.d.ts +92 -0
  113. package/core/wms-feature-info.d.ts.map +1 -0
  114. package/core/wms-feature-info.js +285 -0
  115. package/core/wms.d.ts +9 -0
  116. package/core/wms.d.ts.map +1 -1
  117. package/core/wms.js +17 -5
  118. package/esri-compat/event-bus.d.ts +20 -0
  119. package/esri-compat/event-bus.d.ts.map +1 -1
  120. package/esri-compat/feature-filter.d.ts +46 -1
  121. package/esri-compat/feature-filter.d.ts.map +1 -1
  122. package/esri-compat/feature-filter.js +49 -0
  123. package/esri-compat/geojson-layer.d.ts +4 -2
  124. package/esri-compat/geojson-layer.d.ts.map +1 -1
  125. package/esri-compat/geojson-layer.js +4 -2
  126. package/esri-compat/identity-manager.js +2 -2
  127. package/esri-compat/imagery-layer.d.ts +2 -1
  128. package/esri-compat/imagery-layer.d.ts.map +1 -1
  129. package/esri-compat/imagery-layer.js +2 -1
  130. package/esri-compat/layer-list.d.ts +8 -1
  131. package/esri-compat/layer-list.d.ts.map +1 -1
  132. package/esri-compat/layer-list.js +11 -4
  133. package/esri-compat/legend.d.ts.map +1 -1
  134. package/esri-compat/legend.js +1 -1
  135. package/esri-compat/locator.d.ts +297 -0
  136. package/esri-compat/locator.d.ts.map +1 -0
  137. package/esri-compat/locator.js +579 -0
  138. package/esri-compat/map-image-layer.d.ts.map +1 -1
  139. package/esri-compat/map-view.d.ts.map +1 -1
  140. package/esri-compat/map-view.js +1 -1
  141. package/esri-compat/scene-view.d.ts.map +1 -1
  142. package/esri-compat/time-slider.d.ts +29 -0
  143. package/esri-compat/time-slider.d.ts.map +1 -1
  144. package/esri-compat/time-slider.js +117 -0
  145. package/esri-compat/wfs-layer.d.ts +2 -1
  146. package/esri-compat/wfs-layer.d.ts.map +1 -1
  147. package/esri-compat/wfs-layer.js +2 -1
  148. package/esri-compat/widget-host.d.ts +42 -6
  149. package/esri-compat/widget-host.d.ts.map +1 -1
  150. package/esri-compat/widget-host.js +99 -10
  151. package/generated-app/projection.d.ts.map +1 -1
  152. package/generated-app/runtime.d.ts.map +1 -1
  153. package/interactions/declarative-contract.d.ts +149 -0
  154. package/interactions/declarative-contract.d.ts.map +1 -0
  155. package/interactions/declarative-contract.js +293 -0
  156. package/interactions/declarative.d.ts +198 -0
  157. package/interactions/declarative.d.ts.map +1 -0
  158. package/interactions/declarative.js +470 -0
  159. package/interactions/feature-state.d.ts +7 -0
  160. package/interactions/feature-state.d.ts.map +1 -1
  161. package/interactions/feature-state.js +10 -2
  162. package/map/data-to-map-bridge.d.ts +1 -1
  163. package/map/data-to-map-bridge.d.ts.map +1 -1
  164. package/map/data-to-map-bridge.js +1 -2
  165. package/map/honua-map.d.ts.map +1 -1
  166. package/map/honua-map.js +1 -1
  167. package/map/index.d.ts +2 -0
  168. package/map/index.d.ts.map +1 -1
  169. package/map/index.js +2 -0
  170. package/map/maplibre-target.js +1 -1
  171. package/map/realtime-reconciliation-adapter.d.ts +98 -0
  172. package/map/realtime-reconciliation-adapter.d.ts.map +1 -0
  173. package/map/realtime-reconciliation-adapter.js +84 -0
  174. package/map/temporal-playback.d.ts +25 -0
  175. package/map/temporal-playback.d.ts.map +1 -1
  176. package/map/temporal-playback.js +29 -1
  177. package/operator/workspace/workspace.d.ts.map +1 -1
  178. package/operator/workspace/workspace.js +0 -2
  179. package/package.json +4 -3
  180. package/query-planner/canonical-filter.d.ts +30 -0
  181. package/query-planner/canonical-filter.d.ts.map +1 -0
  182. package/query-planner/canonical-filter.js +30 -0
  183. package/query-planner/columnar-plan.d.ts +63 -0
  184. package/query-planner/columnar-plan.d.ts.map +1 -0
  185. package/query-planner/columnar-plan.js +94 -0
  186. package/query-planner/diagnostics.d.ts +3 -3
  187. package/query-planner/diagnostics.d.ts.map +1 -1
  188. package/query-planner/diagnostics.js +17 -4
  189. package/query-planner/duckdb.d.ts.map +1 -1
  190. package/query-planner/duckdb.js +16 -2
  191. package/query-planner/execution-context.d.ts.map +1 -1
  192. package/query-planner/execution-context.js +3 -1
  193. package/query-planner/executor.d.ts.map +1 -1
  194. package/query-planner/executor.js +7 -1
  195. package/query-planner/geoservices.d.ts.map +1 -1
  196. package/query-planner/geoservices.js +24 -5
  197. package/query-planner/grpc.d.ts.map +1 -1
  198. package/query-planner/grpc.js +29 -5
  199. package/query-planner/index.d.ts +20 -5
  200. package/query-planner/index.d.ts.map +1 -1
  201. package/query-planner/index.js +16 -3
  202. package/query-planner/ir.d.ts +6 -1
  203. package/query-planner/ir.d.ts.map +1 -1
  204. package/query-planner/ir.js +63 -1
  205. package/query-planner/odata-protocol-module.d.ts +54 -0
  206. package/query-planner/odata-protocol-module.d.ts.map +1 -0
  207. package/query-planner/odata-protocol-module.js +199 -0
  208. package/query-planner/odata-v1.d.ts +23 -0
  209. package/query-planner/odata-v1.d.ts.map +1 -0
  210. package/query-planner/odata-v1.js +202 -0
  211. package/query-planner/odata.d.ts +0 -3
  212. package/query-planner/odata.d.ts.map +1 -1
  213. package/query-planner/odata.js +0 -143
  214. package/query-planner/ogc-features.d.ts.map +1 -1
  215. package/query-planner/ogc-features.js +23 -1
  216. package/query-planner/planner.d.ts +2 -2
  217. package/query-planner/planner.d.ts.map +1 -1
  218. package/query-planner/planner.js +146 -27
  219. package/query-planner/representation.d.ts +59 -0
  220. package/query-planner/representation.d.ts.map +1 -0
  221. package/query-planner/representation.js +140 -0
  222. package/query-planner/types.d.ts +153 -3
  223. package/query-planner/types.d.ts.map +1 -1
  224. package/query-planner/wfs-protocol-module.d.ts +57 -0
  225. package/query-planner/wfs-protocol-module.d.ts.map +1 -0
  226. package/query-planner/wfs-protocol-module.js +731 -0
  227. package/query-planner/wfs-v1.d.ts +41 -0
  228. package/query-planner/wfs-v1.d.ts.map +1 -0
  229. package/query-planner/wfs-v1.js +366 -0
  230. package/query-planner/wfs.d.ts +1 -3
  231. package/query-planner/wfs.d.ts.map +1 -1
  232. package/query-planner/wfs.js +1 -70
  233. package/realtime/checkpoint-store.d.ts +206 -0
  234. package/realtime/checkpoint-store.d.ts.map +1 -0
  235. package/realtime/checkpoint-store.js +504 -0
  236. package/realtime/honua-server.d.ts +8 -0
  237. package/realtime/honua-server.d.ts.map +1 -1
  238. package/realtime/honua-server.js +123 -14
  239. package/realtime/index.d.ts +4 -0
  240. package/realtime/index.d.ts.map +1 -1
  241. package/realtime/index.js +2 -0
  242. package/realtime/reconciliation.d.ts +245 -0
  243. package/realtime/reconciliation.d.ts.map +1 -0
  244. package/realtime/reconciliation.js +377 -0
  245. package/realtime/resumable-transport.d.ts.map +1 -1
  246. package/realtime/sse.d.ts.map +1 -1
  247. package/realtime/sse.js +7 -1
  248. package/realtime/websocket.d.ts.map +1 -1
  249. package/realtime/wire.d.ts +2 -1
  250. package/realtime/wire.d.ts.map +1 -1
  251. package/realtime/wire.js +24 -8
  252. package/replica-sync/errors.d.ts +19 -1
  253. package/replica-sync/errors.d.ts.map +1 -1
  254. package/replica-sync/errors.js +16 -0
  255. package/replica-sync/geoservices.d.ts +260 -0
  256. package/replica-sync/geoservices.d.ts.map +1 -0
  257. package/replica-sync/geoservices.js +1093 -0
  258. package/replica-sync/index.d.ts +5 -1
  259. package/replica-sync/index.d.ts.map +1 -1
  260. package/replica-sync/index.js +3 -1
  261. package/replica-sync/transport-conformance.d.ts +58 -0
  262. package/replica-sync/transport-conformance.d.ts.map +1 -0
  263. package/replica-sync/transport-conformance.js +265 -0
  264. package/replica-sync/types.d.ts +22 -0
  265. package/replica-sync/types.d.ts.map +1 -1
  266. package/runtime/index.d.ts +6 -2
  267. package/runtime/index.d.ts.map +1 -1
  268. package/runtime/index.js +3 -1
  269. package/runtime/load-package.d.ts +24 -0
  270. package/runtime/load-package.d.ts.map +1 -1
  271. package/runtime/load-package.js +45 -1
  272. package/runtime/maplibre-renderer.d.ts +11 -0
  273. package/runtime/maplibre-renderer.d.ts.map +1 -1
  274. package/runtime/maplibre-renderer.js +32 -7
  275. package/runtime/offline-region-protocol.d.ts +73 -0
  276. package/runtime/offline-region-protocol.d.ts.map +1 -0
  277. package/runtime/offline-region-protocol.js +63 -0
  278. package/runtime/offline-region-style.d.ts +78 -0
  279. package/runtime/offline-region-style.d.ts.map +1 -0
  280. package/runtime/offline-region-style.js +147 -0
  281. package/runtime/pmtiles-protocol.d.ts +7 -8
  282. package/runtime/pmtiles-protocol.d.ts.map +1 -1
  283. package/runtime/pmtiles-protocol.js +19 -66
  284. package/runtime/protocol-registry.d.ts +55 -0
  285. package/runtime/protocol-registry.d.ts.map +1 -0
  286. package/runtime/protocol-registry.js +103 -0
  287. package/runtime/runtime.d.ts +2 -0
  288. package/runtime/runtime.d.ts.map +1 -1
  289. package/runtime/runtime.js +6 -1
  290. package/runtime/style-compose.d.ts.map +1 -1
  291. package/runtime/style-compose.js +78 -9
  292. package/scene-workspace/analysis-widgets.d.ts +4 -2
  293. package/scene-workspace/analysis-widgets.d.ts.map +1 -1
  294. package/scene-workspace/analysis-widgets.js +4 -2
  295. package/scene-workspace/camera-correspondence.d.ts +151 -0
  296. package/scene-workspace/camera-correspondence.d.ts.map +1 -0
  297. package/scene-workspace/camera-correspondence.js +220 -0
  298. package/scene-workspace/cesium-adapter.d.ts +230 -29
  299. package/scene-workspace/cesium-adapter.d.ts.map +1 -1
  300. package/scene-workspace/cesium-adapter.js +741 -56
  301. package/scene-workspace/cesium-mount.d.ts +205 -0
  302. package/scene-workspace/cesium-mount.d.ts.map +1 -0
  303. package/scene-workspace/cesium-mount.js +392 -0
  304. package/scene-workspace/cesium-scene-owner.d.ts +160 -0
  305. package/scene-workspace/cesium-scene-owner.d.ts.map +1 -0
  306. package/scene-workspace/cesium-scene-owner.js +205 -0
  307. package/scene-workspace/cesium-state-sync.d.ts +101 -0
  308. package/scene-workspace/cesium-state-sync.d.ts.map +1 -0
  309. package/scene-workspace/cesium-state-sync.js +432 -0
  310. package/scene-workspace/cesium-time.d.ts +346 -0
  311. package/scene-workspace/cesium-time.d.ts.map +1 -0
  312. package/scene-workspace/cesium-time.js +403 -0
  313. package/scene-workspace/index.d.ts +42 -10
  314. package/scene-workspace/index.d.ts.map +1 -1
  315. package/scene-workspace/index.js +32 -7
  316. package/scene-workspace/maplibre-state-sync.d.ts +112 -0
  317. package/scene-workspace/maplibre-state-sync.d.ts.map +1 -0
  318. package/scene-workspace/maplibre-state-sync.js +400 -0
  319. package/scene-workspace/primitives.d.ts +237 -3
  320. package/scene-workspace/primitives.d.ts.map +1 -1
  321. package/scene-workspace/primitives.js +1087 -17
  322. package/scene-workspace/scene-discovery.d.ts +5 -2
  323. package/scene-workspace/scene-discovery.d.ts.map +1 -1
  324. package/scene-workspace/scene-discovery.js +5 -2
  325. package/scene-workspace/scene-view.d.ts +5 -2
  326. package/scene-workspace/scene-view.d.ts.map +1 -1
  327. package/scene-workspace/scene-view.js +5 -2
  328. package/scene-workspace/source-to-cesium.d.ts +141 -8
  329. package/scene-workspace/source-to-cesium.d.ts.map +1 -1
  330. package/scene-workspace/source-to-cesium.js +497 -72
  331. package/scene-workspace/state-sync-port-kit.d.ts +156 -0
  332. package/scene-workspace/state-sync-port-kit.d.ts.map +1 -0
  333. package/scene-workspace/state-sync-port-kit.js +319 -0
  334. package/scene-workspace/state-sync.d.ts +34 -1
  335. package/scene-workspace/state-sync.d.ts.map +1 -1
  336. package/scene-workspace/state-sync.js +48 -0
  337. package/scene-workspace/types.d.ts +8 -0
  338. package/scene-workspace/types.d.ts.map +1 -1
  339. package/scene-workspace/types.js +2 -0
  340. package/scene-workspace/workspace.d.ts +12 -1
  341. package/scene-workspace/workspace.d.ts.map +1 -1
  342. package/scene-workspace/workspace.js +13 -0
  343. package/studio/index.d.ts +24 -7
  344. package/studio/index.d.ts.map +1 -1
  345. package/studio/index.js +21 -7
  346. package/studio/lifecycle-client.d.ts +164 -0
  347. package/studio/lifecycle-client.d.ts.map +1 -0
  348. package/studio/lifecycle-client.js +299 -0
  349. package/studio/lifecycle-errors.d.ts +91 -0
  350. package/studio/lifecycle-errors.d.ts.map +1 -0
  351. package/studio/lifecycle-errors.js +77 -0
  352. package/studio/lifecycle-types.d.ts +321 -0
  353. package/studio/lifecycle-types.d.ts.map +1 -0
  354. package/studio/lifecycle-types.js +22 -0
  355. package/web-components/controller.d.ts.map +1 -1
  356. package/web-components/csp-styles.d.ts +6 -0
  357. package/web-components/csp-styles.d.ts.map +1 -0
  358. package/web-components/csp-styles.js +53 -0
  359. package/web-components/elements.d.ts +158 -2
  360. package/web-components/elements.d.ts.map +1 -1
  361. package/web-components/elements.js +1302 -215
  362. package/web-components/export-redaction.d.ts +252 -0
  363. package/web-components/export-redaction.d.ts.map +1 -0
  364. package/web-components/export-redaction.js +588 -0
  365. package/web-components/export.d.ts +417 -0
  366. package/web-components/export.d.ts.map +1 -0
  367. package/web-components/export.js +719 -0
  368. package/web-components/feature-editor-model.d.ts +265 -0
  369. package/web-components/feature-editor-model.d.ts.map +1 -0
  370. package/web-components/feature-editor-model.js +438 -0
  371. package/web-components/feature-editor-sketch.d.ts +125 -0
  372. package/web-components/feature-editor-sketch.d.ts.map +1 -0
  373. package/web-components/feature-editor-sketch.js +194 -0
  374. package/web-components/feature-editor-workflow.d.ts +286 -0
  375. package/web-components/feature-editor-workflow.d.ts.map +1 -0
  376. package/web-components/feature-editor-workflow.js +889 -0
  377. package/web-components/feature-editor.d.ts +83 -0
  378. package/web-components/feature-editor.d.ts.map +1 -0
  379. package/web-components/feature-editor.js +829 -0
  380. package/web-components/feature-table-engine.d.ts +465 -0
  381. package/web-components/feature-table-engine.d.ts.map +1 -0
  382. package/web-components/feature-table-engine.js +1360 -0
  383. package/web-components/feature-table-view.d.ts +95 -0
  384. package/web-components/feature-table-view.d.ts.map +1 -0
  385. package/web-components/feature-table-view.js +343 -0
  386. package/web-components/index.d.ts +34 -3
  387. package/web-components/index.d.ts.map +1 -1
  388. package/web-components/index.js +35 -2
  389. package/web-components/maplibre-renderer.d.ts.map +1 -1
  390. package/web-components/maplibre-renderer.js +13 -4
  391. package/web-components/measurement.d.ts +3 -1
  392. package/web-components/measurement.d.ts.map +1 -1
  393. package/web-components/measurement.js +62 -18
  394. package/web-components/time-slider.d.ts +122 -0
  395. package/web-components/time-slider.d.ts.map +1 -0
  396. package/web-components/time-slider.js +740 -0
  397. package/web-components/types.d.ts +310 -0
  398. package/web-components/types.d.ts.map +1 -1
  399. package/webmap/convert-label.js +0 -1
  400. package/webmap/convert-symbol.d.ts.map +1 -1
@@ -0,0 +1,104 @@
1
+ /**
2
+ * Catalog-driven registration APIs spanning both the `controls` and
3
+ * `web-components` custom-element kits (issue #679; see `./catalog.js` for
4
+ * the metadata these operate over).
5
+ *
6
+ * `controls`-sourced catalog entries are registered synchronously against
7
+ * this module's local sibling files (`./basemap-switcher.js`, `./legend.js`,
8
+ * `./layer-list.js`, `./swipe-control.js`) — none of them import `src/core`
9
+ * or `src/runtime`, so statically importing them here costs nothing beyond
10
+ * what `@honua/sdk-js/controls` already bundles.
11
+ *
12
+ * `web-components`-sourced entries are registered through a **dynamic**
13
+ * `import("../web-components/elements.js")`, so merely importing this module
14
+ * (or `@honua/sdk-js/controls`, which re-exports it) never pulls the
15
+ * `web-components` kit's `src/core` / `src/runtime` dependency into a
16
+ * `controls`-only bundle. That dependency is only paid the first time a
17
+ * caller actually registers a `web-components`-sourced tag.
18
+ *
19
+ * Critically, `web-components/elements.js` is itself side-effect-free on
20
+ * import — it defines the element classes, the tag→constructor lookup, and
21
+ * `defineHonuaWebComponent(tag)` / `defineHonuaWebComponents()`, but does not
22
+ * call either. (The blanket auto-registration existing
23
+ * `@honua/sdk-js/web-components` consumers rely on lives in
24
+ * `web-components/index.js`, which calls `defineHonuaWebComponents()`
25
+ * explicitly.) Without that separation, this module's dynamic import would
26
+ * evaluate `elements.js` and its auto-run would claim every tag the kit
27
+ * owns — including contested tags — as a side effect of registering just
28
+ * one, which a Rollup/Vite production build can also reorder *earlier* than
29
+ * intended when the dynamic import target is merged into the same chunk as a
30
+ * sibling static import of `@honua/sdk-js/web-components` (issue #679 PR
31
+ * review; this combination was the root cause of a real ordering bug in the
32
+ * `web-components-basic` sample before this module existed).
33
+ *
34
+ * Because both the synchronous and dynamic paths funnel through the exact
35
+ * same catalog + `defineIfMissing`-style guards the two kits already use,
36
+ * calling these functions is deterministic and idempotent regardless of how
37
+ * many times, in what order, or from which subpath a caller invokes them —
38
+ * the fix for the import-order-dependent tag ownership issue #679 tracks.
39
+ *
40
+ * @module
41
+ */
42
+ import { type HonuaComponentCatalogEntry } from "./catalog.js";
43
+ /** The catalog id union; kept as `string` at the type level (see `./catalog.js`) but documented here for discoverability. */
44
+ export type HonuaComponentCatalogId = HonuaComponentCatalogEntry["id"];
45
+ /**
46
+ * The minimal `CustomElementRegistry` surface every registration function in
47
+ * this module (and both kits' existing `define*` functions) needs. A real
48
+ * `CustomElementRegistry`, the object `createComponentRegistry()` returns, or
49
+ * a hand-rolled `{ get, define }` test double all satisfy this.
50
+ */
51
+ export type HonuaComponentRegistry = Pick<CustomElementRegistry, "get" | "define">;
52
+ export interface HonuaComponentRegistrationOptions {
53
+ /** Registry to define tags on. Defaults to the global `customElements`. */
54
+ readonly registry?: HonuaComponentRegistry;
55
+ }
56
+ /** Thrown by `registerComponent(s)` for an id that is not in `HONUA_COMPONENT_CATALOG`. */
57
+ export declare class HonuaComponentCatalogError extends Error {
58
+ constructor(id: string);
59
+ }
60
+ /**
61
+ * Registers a single catalog entry by id, e.g. `"web-components.map"` or
62
+ * `"controls.basemap-switcher"`. Always returns a `Promise` — `controls`
63
+ * entries resolve synchronously in practice, but a uniform async contract
64
+ * keeps this one typed shape usable for both kits (including the lazy
65
+ * `web-components` path) without callers branching on the id's source.
66
+ *
67
+ * Throws {@link HonuaComponentCatalogError} for an id not in the catalog.
68
+ * No-ops (resolves immediately) when no registry is available (Node/SSR
69
+ * without an explicit `registry` option) — matches every existing `define*`
70
+ * function's DOM-optional contract (NFR-001).
71
+ */
72
+ export declare function registerComponent(id: HonuaComponentCatalogId, options?: HonuaComponentRegistrationOptions): Promise<void>;
73
+ /** Registers a named subset of catalog entries. See {@link registerComponent}. */
74
+ export declare function registerComponents(ids: readonly HonuaComponentCatalogId[], options?: HonuaComponentRegistrationOptions): Promise<void>;
75
+ /**
76
+ * Registers every canonical catalog entry — i.e. everything
77
+ * `@honua/sdk-js/controls` + `@honua/sdk-js/web-components` would
78
+ * auto-register between them, from one call. Equivalent to importing both
79
+ * kits, without needing to import either as a side effect (useful for
80
+ * lazy-loading the whole component set, or for scoped-registry setups where
81
+ * side-effect module import cannot target a specific registry).
82
+ *
83
+ * Non-canonical entries (the `controls` implementations of `honua-legend` /
84
+ * `honua-layer-list`) are intentionally excluded — use
85
+ * {@link registerComponent} / {@link registerComponents} to opt into them
86
+ * explicitly.
87
+ */
88
+ export declare function registerAllComponents(options?: HonuaComponentRegistrationOptions): Promise<void>;
89
+ /**
90
+ * Creates a fresh, isolated component registry: a real `CustomElementRegistry`
91
+ * where the runtime supports constructing one (the Scoped Custom Element
92
+ * Registries proposal — not yet universal), otherwise an in-memory
93
+ * `{ get, define }` object with the same define-once-per-tag idempotency as
94
+ * every `define*` function in this kit.
95
+ *
96
+ * The fallback object satisfies {@link HonuaComponentRegistry} and every
97
+ * kit's `define*(registry)` parameter, so it is usable anywhere a caller
98
+ * wants an isolated registration target (tests, multiple independent
99
+ * catalogs in one process) — but, unlike a real `CustomElementRegistry`, it
100
+ * cannot be passed to `shadowRoot`-scoped APIs like `attachShadow` on
101
+ * runtimes that lack native scoped-registry support.
102
+ */
103
+ export declare function createComponentRegistry(): HonuaComponentRegistry;
104
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/controls/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAGH,OAAO,EAA2B,KAAK,0BAA0B,EAA4B,MAAM,cAAc,CAAC;AAMlH,6HAA6H;AAC7H,MAAM,MAAM,uBAAuB,GAAG,0BAA0B,CAAC,IAAI,CAAC,CAAC;AAEvE;;;;;GAKG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,qBAAqB,EAAE,KAAK,GAAG,QAAQ,CAAC,CAAC;AAEnF,MAAM,WAAW,iCAAiC;IAChD,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,CAAC,EAAE,sBAAsB,CAAC;CAC5C;AAED,2FAA2F;AAC3F,qBAAa,0BAA2B,SAAQ,KAAK;gBAChC,EAAE,EAAE,MAAM;CAI9B;AAqBD;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CACrC,EAAE,EAAE,uBAAuB,EAC3B,OAAO,GAAE,iCAAsC,GAC9C,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,kFAAkF;AAClF,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,SAAS,uBAAuB,EAAE,EACvC,OAAO,GAAE,iCAAsC,GAC9C,OAAO,CAAC,IAAI,CAAC,CAIf;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,GAAE,iCAAsC,GAAG,OAAO,CAAC,IAAI,CAAC,CAG1G;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,IAAI,sBAAsB,CAmBhE"}
@@ -0,0 +1,150 @@
1
+ /**
2
+ * Catalog-driven registration APIs spanning both the `controls` and
3
+ * `web-components` custom-element kits (issue #679; see `./catalog.js` for
4
+ * the metadata these operate over).
5
+ *
6
+ * `controls`-sourced catalog entries are registered synchronously against
7
+ * this module's local sibling files (`./basemap-switcher.js`, `./legend.js`,
8
+ * `./layer-list.js`, `./swipe-control.js`) — none of them import `src/core`
9
+ * or `src/runtime`, so statically importing them here costs nothing beyond
10
+ * what `@honua/sdk-js/controls` already bundles.
11
+ *
12
+ * `web-components`-sourced entries are registered through a **dynamic**
13
+ * `import("../web-components/elements.js")`, so merely importing this module
14
+ * (or `@honua/sdk-js/controls`, which re-exports it) never pulls the
15
+ * `web-components` kit's `src/core` / `src/runtime` dependency into a
16
+ * `controls`-only bundle. That dependency is only paid the first time a
17
+ * caller actually registers a `web-components`-sourced tag.
18
+ *
19
+ * Critically, `web-components/elements.js` is itself side-effect-free on
20
+ * import — it defines the element classes, the tag→constructor lookup, and
21
+ * `defineHonuaWebComponent(tag)` / `defineHonuaWebComponents()`, but does not
22
+ * call either. (The blanket auto-registration existing
23
+ * `@honua/sdk-js/web-components` consumers rely on lives in
24
+ * `web-components/index.js`, which calls `defineHonuaWebComponents()`
25
+ * explicitly.) Without that separation, this module's dynamic import would
26
+ * evaluate `elements.js` and its auto-run would claim every tag the kit
27
+ * owns — including contested tags — as a side effect of registering just
28
+ * one, which a Rollup/Vite production build can also reorder *earlier* than
29
+ * intended when the dynamic import target is merged into the same chunk as a
30
+ * sibling static import of `@honua/sdk-js/web-components` (issue #679 PR
31
+ * review; this combination was the root cause of a real ordering bug in the
32
+ * `web-components-basic` sample before this module existed).
33
+ *
34
+ * Because both the synchronous and dynamic paths funnel through the exact
35
+ * same catalog + `defineIfMissing`-style guards the two kits already use,
36
+ * calling these functions is deterministic and idempotent regardless of how
37
+ * many times, in what order, or from which subpath a caller invokes them —
38
+ * the fix for the import-order-dependent tag ownership issue #679 tracks.
39
+ *
40
+ * @module
41
+ */
42
+ import { defineHonuaBasemapSwitcher } from "./basemap-switcher.js";
43
+ import { HONUA_COMPONENT_CATALOG, getComponentCatalogEntry } from "./catalog.js";
44
+ import { globalDom } from "./element-utils.js";
45
+ import { defineHonuaLayerList } from "./layer-list.js";
46
+ import { defineHonuaLegend } from "./legend.js";
47
+ import { defineHonuaSwipeControl } from "./swipe-control.js";
48
+ /** Thrown by `registerComponent(s)` for an id that is not in `HONUA_COMPONENT_CATALOG`. */
49
+ export class HonuaComponentCatalogError extends Error {
50
+ constructor(id) {
51
+ super(`Unknown Honua component catalog id "${id}".`);
52
+ this.name = "HonuaComponentCatalogError";
53
+ }
54
+ }
55
+ const CONTROLS_REGISTRARS = {
56
+ "controls.basemap-switcher": defineHonuaBasemapSwitcher,
57
+ "controls.swipe-control": defineHonuaSwipeControl,
58
+ "controls.legend": defineHonuaLegend,
59
+ "controls.layer-list": defineHonuaLayerList,
60
+ };
61
+ async function registerWebComponentsEntry(entry, registry) {
62
+ // `elements.js` is side-effect-free (see the module doc above); this only
63
+ // ever defines `entry.tag`, never the other 15 tags the kit owns.
64
+ const webComponents = await import("../web-components/elements.js");
65
+ webComponents.defineHonuaWebComponent(entry.tag, registry);
66
+ }
67
+ /**
68
+ * Registers a single catalog entry by id, e.g. `"web-components.map"` or
69
+ * `"controls.basemap-switcher"`. Always returns a `Promise` — `controls`
70
+ * entries resolve synchronously in practice, but a uniform async contract
71
+ * keeps this one typed shape usable for both kits (including the lazy
72
+ * `web-components` path) without callers branching on the id's source.
73
+ *
74
+ * Throws {@link HonuaComponentCatalogError} for an id not in the catalog.
75
+ * No-ops (resolves immediately) when no registry is available (Node/SSR
76
+ * without an explicit `registry` option) — matches every existing `define*`
77
+ * function's DOM-optional contract (NFR-001).
78
+ */
79
+ export async function registerComponent(id, options = {}) {
80
+ const entry = getComponentCatalogEntry(id);
81
+ if (!entry)
82
+ throw new HonuaComponentCatalogError(id);
83
+ const registry = options.registry ?? globalDom.customElements;
84
+ if (!registry)
85
+ return;
86
+ if (entry.source === "controls") {
87
+ CONTROLS_REGISTRARS[entry.id]?.(registry);
88
+ return;
89
+ }
90
+ await registerWebComponentsEntry(entry, registry);
91
+ }
92
+ /** Registers a named subset of catalog entries. See {@link registerComponent}. */
93
+ export async function registerComponents(ids, options = {}) {
94
+ for (const id of ids) {
95
+ await registerComponent(id, options);
96
+ }
97
+ }
98
+ /**
99
+ * Registers every canonical catalog entry — i.e. everything
100
+ * `@honua/sdk-js/controls` + `@honua/sdk-js/web-components` would
101
+ * auto-register between them, from one call. Equivalent to importing both
102
+ * kits, without needing to import either as a side effect (useful for
103
+ * lazy-loading the whole component set, or for scoped-registry setups where
104
+ * side-effect module import cannot target a specific registry).
105
+ *
106
+ * Non-canonical entries (the `controls` implementations of `honua-legend` /
107
+ * `honua-layer-list`) are intentionally excluded — use
108
+ * {@link registerComponent} / {@link registerComponents} to opt into them
109
+ * explicitly.
110
+ */
111
+ export async function registerAllComponents(options = {}) {
112
+ const canonicalIds = HONUA_COMPONENT_CATALOG.filter((entry) => entry.canonical).map((entry) => entry.id);
113
+ await registerComponents(canonicalIds, options);
114
+ }
115
+ /**
116
+ * Creates a fresh, isolated component registry: a real `CustomElementRegistry`
117
+ * where the runtime supports constructing one (the Scoped Custom Element
118
+ * Registries proposal — not yet universal), otherwise an in-memory
119
+ * `{ get, define }` object with the same define-once-per-tag idempotency as
120
+ * every `define*` function in this kit.
121
+ *
122
+ * The fallback object satisfies {@link HonuaComponentRegistry} and every
123
+ * kit's `define*(registry)` parameter, so it is usable anywhere a caller
124
+ * wants an isolated registration target (tests, multiple independent
125
+ * catalogs in one process) — but, unlike a real `CustomElementRegistry`, it
126
+ * cannot be passed to `shadowRoot`-scoped APIs like `attachShadow` on
127
+ * runtimes that lack native scoped-registry support.
128
+ */
129
+ export function createComponentRegistry() {
130
+ const registryCtor = globalThis
131
+ .CustomElementRegistry;
132
+ if (typeof registryCtor === "function") {
133
+ try {
134
+ return new registryCtor();
135
+ }
136
+ catch {
137
+ // Some runtimes expose the constructor without allowing construction
138
+ // (e.g. spec-gated behind a flag); fall through to the in-memory registry.
139
+ }
140
+ }
141
+ const defined = new Map();
142
+ return {
143
+ get: (tagName) => defined.get(tagName),
144
+ define: (tagName, ctor) => {
145
+ if (defined.has(tagName))
146
+ return;
147
+ defined.set(tagName, ctor);
148
+ },
149
+ };
150
+ }
@@ -23,7 +23,9 @@
23
23
  * ## Attributes
24
24
  * - `position` — divider position as a percentage 0–100 (default 50).
25
25
  * - `orientation` — `"vertical"` (default) or `"horizontal"`.
26
- * - `label` — accessible name of the divider (default "Compare maps").
26
+ * - `label` — optional accessible name of the divider. Supply this from the
27
+ * host application's message source when the divider needs an accessible
28
+ * name; the control does not provide a locale-specific fallback.
27
29
  *
28
30
  * ## Events
29
31
  * - `change` — `CustomEvent<HonuaSwipeChangeDetail>` (bubbles, composed)
@@ -65,6 +67,9 @@ export declare class HonuaSwipeControlElement extends HTMLElementBase {
65
67
  /** Divider orientation. Reflects the `orientation` attribute. */
66
68
  get orientation(): HonuaSwipeOrientation;
67
69
  set orientation(value: HonuaSwipeOrientation);
70
+ /** Accessible name of the divider. Reflects the `label` attribute. */
71
+ get label(): string | null;
72
+ set label(value: string | null);
68
73
  attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
69
74
  connectedCallback(): void;
70
75
  disconnectedCallback(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"swipe-control.d.ts","sourceRoot":"","sources":["../../../src/controls/swipe-control.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,eAAe,EAA8B,MAAM,oBAAoB,CAAC;AACjF,OAAO,KAAK,EAA0B,aAAa,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAM/F;;;;GAIG;AACH,qBAAa,wBAAyB,SAAQ,eAAe;;IAC3D,WAAkB,kBAAkB,IAAI,MAAM,EAAE,CAE/C;IASD,mEAAmE;IACnE,IAAW,MAAM,IAAI,aAAa,GAAG,SAAS,CAE7C;IAED,IAAW,MAAM,CAAC,GAAG,EAAE,aAAa,GAAG,SAAS,EAI/C;IAED,+CAA+C;IAC/C,IAAW,SAAS,IAAI,aAAa,GAAG,SAAS,CAEhD;IAED,IAAW,SAAS,CAAC,GAAG,EAAE,aAAa,GAAG,SAAS,EAElD;IAED,4EAA4E;IACrE,OAAO,CAAC,MAAM,EAAE,aAAa,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,IAAI;IAKtE,iFAAiF;IACjF,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,IAAW,QAAQ,CAAC,KAAK,EAAE,MAAM,EAEhC;IAED,iEAAiE;IACjE,IAAW,WAAW,IAAI,qBAAqB,CAE9C;IAED,IAAW,WAAW,CAAC,KAAK,EAAE,qBAAqB,EAGlD;IAEM,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAgB/F,iBAAiB,IAAI,IAAI;IAMzB,oBAAoB,IAAI,IAAI;IA4CnC,SAAS,CAAC,MAAM,IAAI,IAAI;CAoJzB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,wBAA2B,GAAG,IAAI,CAKjF"}
1
+ {"version":3,"file":"swipe-control.d.ts","sourceRoot":"","sources":["../../../src/controls/swipe-control.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,EAAE,eAAe,EAAgD,MAAM,oBAAoB,CAAC;AACnG,OAAO,KAAK,EAA0B,aAAa,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAM/F;;;;GAIG;AACH,qBAAa,wBAAyB,SAAQ,eAAe;;IAC3D,WAAkB,kBAAkB,IAAI,MAAM,EAAE,CAE/C;IASD,mEAAmE;IACnE,IAAW,MAAM,IAAI,aAAa,GAAG,SAAS,CAE7C;IAED,IAAW,MAAM,CAAC,GAAG,EAAE,aAAa,GAAG,SAAS,EAI/C;IAED,+CAA+C;IAC/C,IAAW,SAAS,IAAI,aAAa,GAAG,SAAS,CAEhD;IAED,IAAW,SAAS,CAAC,GAAG,EAAE,aAAa,GAAG,SAAS,EAElD;IAED,4EAA4E;IACrE,OAAO,CAAC,MAAM,EAAE,aAAa,EAAE,SAAS,CAAC,EAAE,aAAa,GAAG,IAAI;IAKtE,iFAAiF;IACjF,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,IAAW,QAAQ,CAAC,KAAK,EAAE,MAAM,EAEhC;IAED,iEAAiE;IACjE,IAAW,WAAW,IAAI,qBAAqB,CAE9C;IAED,IAAW,WAAW,CAAC,KAAK,EAAE,qBAAqB,EAGlD;IAED,sEAAsE;IACtE,IAAW,KAAK,IAAI,MAAM,GAAG,IAAI,CAEhC;IAED,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,EAOpC;IAEM,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAgB/F,iBAAiB,IAAI,IAAI;IAMzB,oBAAoB,IAAI,IAAI;IA8CnC,SAAS,CAAC,MAAM,IAAI,IAAI;CA0KzB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,wBAA2B,GAAG,IAAI,CAKjF"}
@@ -23,7 +23,9 @@
23
23
  * ## Attributes
24
24
  * - `position` — divider position as a percentage 0–100 (default 50).
25
25
  * - `orientation` — `"vertical"` (default) or `"horizontal"`.
26
- * - `label` — accessible name of the divider (default "Compare maps").
26
+ * - `label` — optional accessible name of the divider. Supply this from the
27
+ * host application's message source when the divider needs an accessible
28
+ * name; the control does not provide a locale-specific fallback.
27
29
  *
28
30
  * ## Events
29
31
  * - `change` — `CustomEvent<HonuaSwipeChangeDetail>` (bubbles, composed)
@@ -41,7 +43,7 @@
41
43
  *
42
44
  * @module
43
45
  */
44
- import { HTMLElementBase, escapeAttribute, globalDom } from "./element-utils.js";
46
+ import { HTMLElementBase, escapeAttribute, globalDom, renderShadowRoot } from "./element-utils.js";
45
47
  const DEFAULT_POSITION = 50;
46
48
  const STEP = 1;
47
49
  const STEP_LARGE = 10;
@@ -98,6 +100,20 @@ export class HonuaSwipeControlElement extends HTMLElementBase {
98
100
  return;
99
101
  this.setAttribute("orientation", value === "horizontal" ? "horizontal" : "vertical");
100
102
  }
103
+ /** Accessible name of the divider. Reflects the `label` attribute. */
104
+ get label() {
105
+ return this.#label();
106
+ }
107
+ set label(value) {
108
+ if (typeof this.setAttribute !== "function")
109
+ return;
110
+ if (value === null) {
111
+ this.removeAttribute?.("label");
112
+ }
113
+ else {
114
+ this.setAttribute("label", value);
115
+ }
116
+ }
101
117
  attributeChangedCallback(name, _oldValue, newValue) {
102
118
  if (name === "position") {
103
119
  const parsed = newValue === null ? DEFAULT_POSITION : Number(newValue);
@@ -146,7 +162,9 @@ export class HonuaSwipeControlElement extends HTMLElementBase {
146
162
  container.style.clipPath =
147
163
  this.orientation === "horizontal"
148
164
  ? `inset(${pct} 0 0 0)` // hide the top portion above the divider
149
- : `inset(0 0 0 ${pct})`; // hide the left portion before the divider
165
+ : this.#isRtl()
166
+ ? `inset(0 ${pct} 0 0)` // hide the right portion before the divider
167
+ : `inset(0 0 0 ${pct})`; // hide the left portion before the divider
150
168
  }
151
169
  #clearClip(map) {
152
170
  const container = map?.getContainer?.();
@@ -167,8 +185,9 @@ export class HonuaSwipeControlElement extends HTMLElementBase {
167
185
  this.#updateDividerDom();
168
186
  return;
169
187
  }
170
- root.innerHTML = `
171
- <style>${structuralStyles()}</style>
188
+ const label = this.#label();
189
+ const ariaLabel = label === null ? "" : ` aria-label="${escapeAttribute(label)}"`;
190
+ renderShadowRoot(root, structuralStyles(), `
172
191
  <div
173
192
  part="divider"
174
193
  class="divider"
@@ -177,12 +196,12 @@ export class HonuaSwipeControlElement extends HTMLElementBase {
177
196
  aria-valuemin="0"
178
197
  aria-valuemax="100"
179
198
  aria-valuenow="${this.#position}"
180
- aria-orientation="${this.orientation}"
181
- aria-label="${escapeAttribute(this.#label())}"
199
+ aria-orientation="${this.#ariaOrientation()}"
200
+ ${ariaLabel}
182
201
  >
183
202
  <span part="handle" class="handle" aria-hidden="true"></span>
184
203
  </div>
185
- `;
204
+ `);
186
205
  this.#rendered = true;
187
206
  this.#bindDivider(root);
188
207
  this.#updateDividerDom();
@@ -199,17 +218,21 @@ export class HonuaSwipeControlElement extends HTMLElementBase {
199
218
  return;
200
219
  const pct = `${this.#position}%`;
201
220
  if (this.orientation === "horizontal") {
202
- divider.style.left = "0";
203
- divider.style.top = pct;
221
+ divider.style.insetInlineStart = "0";
222
+ divider.style.insetBlockStart = pct;
204
223
  }
205
224
  else {
206
- divider.style.top = "0";
207
- divider.style.left = pct;
225
+ divider.style.insetBlockStart = "0";
226
+ divider.style.insetInlineStart = pct;
208
227
  }
209
228
  divider.classList?.toggle("divider-horizontal", this.orientation === "horizontal");
210
229
  divider.setAttribute?.("aria-valuenow", String(this.#position));
211
- divider.setAttribute?.("aria-orientation", this.orientation);
212
- divider.setAttribute?.("aria-label", this.#label());
230
+ divider.setAttribute?.("aria-orientation", this.#ariaOrientation());
231
+ const label = this.#label();
232
+ if (label === null)
233
+ divider.removeAttribute?.("aria-label");
234
+ else
235
+ divider.setAttribute?.("aria-label", label);
213
236
  }
214
237
  // ── interaction ────────────────────────────────────────────
215
238
  #bindDivider(root) {
@@ -257,21 +280,24 @@ export class HonuaSwipeControlElement extends HTMLElementBase {
257
280
  : (event.clientY - rect.top) / rect.height
258
281
  : rect.width === 0
259
282
  ? 0
260
- : (event.clientX - rect.left) / rect.width;
283
+ : this.#isRtl()
284
+ ? 1 - (event.clientX - rect.left) / rect.width
285
+ : (event.clientX - rect.left) / rect.width;
261
286
  this.#setPosition(ratio * 100, true);
262
287
  }
263
288
  #onKeyDown(event) {
264
289
  const horizontal = this.orientation === "horizontal";
290
+ const reverseInlineDirection = !horizontal && this.#isRtl();
265
291
  const step = event.shiftKey ? STEP_LARGE : STEP;
266
292
  let next;
267
293
  switch (event.key) {
268
294
  case "ArrowRight":
269
295
  case "ArrowDown":
270
- next = this.#position + step;
296
+ next = this.#position + (reverseInlineDirection && event.key === "ArrowRight" ? -step : step);
271
297
  break;
272
298
  case "ArrowLeft":
273
299
  case "ArrowUp":
274
- next = this.#position - step;
300
+ next = this.#position - (reverseInlineDirection && event.key === "ArrowLeft" ? -step : step);
275
301
  break;
276
302
  case "Home":
277
303
  next = horizontal ? 100 : 0;
@@ -287,11 +313,23 @@ export class HonuaSwipeControlElement extends HTMLElementBase {
287
313
  }
288
314
  // ── helpers ────────────────────────────────────────────────
289
315
  #label() {
290
- return this.#attr("label") ?? "Compare maps";
316
+ return this.#attr("label");
291
317
  }
292
318
  #attr(name) {
293
319
  return typeof this.getAttribute === "function" ? this.getAttribute(name) : null;
294
320
  }
321
+ #isRtl() {
322
+ const explicitDirection = this.#attr("dir")?.toLowerCase();
323
+ if (explicitDirection === "rtl")
324
+ return true;
325
+ if (explicitDirection === "ltr")
326
+ return false;
327
+ return globalDom.getComputedStyle?.(this).direction === "rtl";
328
+ }
329
+ /** ARIA describes the axis of the slider value, not the divider's visual axis. */
330
+ #ariaOrientation() {
331
+ return this.orientation === "vertical" ? "horizontal" : "vertical";
332
+ }
295
333
  #reflectPosition(value) {
296
334
  if (typeof this.setAttribute !== "function" || typeof this.getAttribute !== "function")
297
335
  return;
@@ -330,12 +368,25 @@ function clampPercent(value) {
330
368
  /** Structural-only styles; theme via `::part(divider)` / `::part(handle)`. */
331
369
  function structuralStyles() {
332
370
  return `
333
- :host { position: absolute; inset: 0; pointer-events: none; display: block; }
371
+ :host {
372
+ position: absolute;
373
+ inset: 0;
374
+ display: block;
375
+ box-sizing: border-box;
376
+ min-width: 0;
377
+ max-width: 100%;
378
+ min-height: 0;
379
+ max-height: 100%;
380
+ pointer-events: none;
381
+ }
334
382
  .divider {
335
383
  position: absolute;
336
- top: 0;
384
+ inset-block-start: 0;
337
385
  block-size: 100%;
338
386
  inline-size: 0;
387
+ box-sizing: border-box;
388
+ max-width: 100%;
389
+ max-height: 100%;
339
390
  border-inline-start: 2px solid currentColor;
340
391
  transform: translateX(-1px);
341
392
  cursor: ew-resize;
@@ -364,5 +415,16 @@ function structuralStyles() {
364
415
  inset-block-start: 0;
365
416
  inset-inline-start: 50%;
366
417
  }
418
+ @media (forced-colors: active), (prefers-contrast: more) {
419
+ .divider {
420
+ forced-color-adjust: none;
421
+ border-color: ButtonText;
422
+ }
423
+ .handle {
424
+ background: ButtonText;
425
+ outline: 2px solid Canvas;
426
+ outline-offset: 1px;
427
+ }
428
+ }
367
429
  `;
368
430
  }
package/core/client.d.ts CHANGED
@@ -2,6 +2,7 @@ import { type HonuaMetadataRequestOptions } from "./cache-state.js";
2
2
  import { HonuaOdataEntitySet } from "./odata.js";
3
3
  import { type OgcApiLayoutMode } from "./ogc-endpoint-layout.js";
4
4
  import { HonuaOgcMaps } from "./ogc-maps.js";
5
+ import type { HonuaOgcProcessesOptions } from "./ogc-processes.js";
5
6
  import { HonuaOgcProcesses } from "./ogc-processes.js";
6
7
  import { HonuaOgcRecords } from "./ogc-records.js";
7
8
  import { HonuaOgcTiles } from "./ogc-tiles.js";
@@ -9,7 +10,7 @@ import { type HonuaProcessRunner } from "./process-runner.js";
9
10
  import type { GeospatialGrpcProcessClient, HonuaProcessAdapter } from "./process-runner.js";
10
11
  import { HonuaStacSearch } from "./stac.js";
11
12
  import { HonuaFeatureLayer, HonuaGeometryService, HonuaGeoprocessingService, HonuaImageService, HonuaMapLayer, HonuaMapService, HonuaOgcFeatures, HonuaService } from "./surfaces.js";
12
- import type { ApplyEditsRequest, ExportMapRequest, HonuaApplyEditsResponse, HonuaAuthCredentials, HonuaAuthRefreshReason, HonuaAuthRevocationContext, HonuaClientOptions, HonuaCompatibilityRequest, HonuaExportMapResponse, HonuaFeature, HonuaFindResponse, HonuaIdentifyResponse, HonuaLayerMetadata, HonuaLegendResponse, HonuaOgcCollectionMetadata, HonuaOgcCollectionsResponse, HonuaOgcConformanceResponse, HonuaOgcFeatureCollectionResponse, HonuaOgcFeatureResponse, HonuaOgcLandingResponse, HonuaOgcMapImageResponse, HonuaOgcProcessDescription, HonuaOgcProcessJobAccepted, HonuaOgcProcessJobResults, HonuaOgcProcessJobStatus, HonuaOgcProcessesResponse, HonuaOgcQueryablesResponse, HonuaOgcRecordResponse, HonuaOgcRecordsResponse, HonuaOgcTileMatrixSet, HonuaOgcTileMatrixSetsResponse, HonuaOgcTileResponse, HonuaOgcTilesetMetadata, HonuaOgcTilesetsResponse, HonuaQueryResponse, HonuaRawRequest, HonuaRelatedRecordsResponse, HonuaServerCompatibility, HonuaServerCompatibilityFeature, HonuaServerCompatibilityStatus, HonuaServiceMetadata, HonuaServicesResponse, HonuaStacItemCollectionResponse, HonuaStacItemResponse, HonuaStacLandingResponse, MapFindRequest, MapIdentifyRequest, MapLayerQueryRequest, MapLegendRequest, MapRelatedRecordsRequest, MigrationInventoryScanRequest, MigrationSourceInventoryArtifact, OgcCollectionRequest, OgcCreateItemRequest, OgcDeleteItemRequest, OgcEndpointLayout, OgcItemRequest, OgcItemsRequest, OgcMapImageRequest, OgcMetadataRequest, OgcPatchItemRequest, OgcProcessExecuteRequest, OgcRecordItemRequest, OgcRecordRawItemRequest, OgcRecordsRawSearchRequest, OgcRecordsSearchRequest, OgcReplaceItemRequest, OgcTileRequest, OgcTilesetRequest, OgcTilesetsRequest, QueryFeaturesRequest, QueryMethod, QueryRelatedRecordsRequest, StacSearchRequest } from "./types.js";
13
+ import type { ApplyEditsRequest, ExportMapRequest, HonuaApplyEditsResponse, HonuaAuthCredentials, HonuaAuthRefreshReason, HonuaAuthRevocationContext, HonuaClientOptions, HonuaCompatibilityRequest, HonuaExportMapResponse, HonuaFeature, HonuaFindResponse, HonuaIdentifyResponse, HonuaLayerMetadata, HonuaLegendResponse, HonuaOgcCollectionMetadata, HonuaOgcCollectionsResponse, HonuaOgcConformanceResponse, HonuaOgcFeatureCollectionResponse, HonuaOgcFeatureResponse, HonuaOgcLandingResponse, HonuaOgcMapImageResponse, HonuaOgcProcessDescription, HonuaOgcProcessJobAccepted, HonuaOgcProcessJobResults, HonuaOgcProcessJobStatus, HonuaOgcProcessesResponse, HonuaOgcQueryablesResponse, HonuaOgcRecordResponse, HonuaOgcRecordsResponse, HonuaOgcTileMatrixSet, HonuaOgcTileMatrixSetsResponse, HonuaOgcTileResponse, HonuaOgcTilesetMetadata, HonuaOgcTilesetsResponse, HonuaQueryResponse, HonuaRawRequest, HonuaRelatedRecordsResponse, HonuaRequestContext, HonuaServerCompatibility, HonuaServerCompatibilityFeature, HonuaServerCompatibilityStatus, HonuaServiceMetadata, HonuaServicesResponse, HonuaStacItemCollectionResponse, HonuaStacItemResponse, HonuaStacLandingResponse, MapFindRequest, MapIdentifyRequest, MapLayerQueryRequest, MapLegendRequest, MapRelatedRecordsRequest, MigrationInventoryScanRequest, MigrationSourceInventoryArtifact, OgcCollectionRequest, OgcCreateItemRequest, OgcDeleteItemRequest, OgcEndpointLayout, OgcItemRequest, OgcItemsRequest, OgcMapImageRequest, OgcMetadataRequest, OgcPatchItemRequest, OgcProcessExecuteRequest, OgcProcessJobRequest, OgcRecordItemRequest, OgcRecordRawItemRequest, OgcRecordsRawSearchRequest, OgcRecordsSearchRequest, OgcReplaceItemRequest, OgcTileRequest, OgcTilesetRequest, OgcTilesetsRequest, QueryFeaturesRequest, QueryMethod, QueryRelatedRecordsRequest, StacSearchRequest } from "./types.js";
13
14
  import { HonuaWfs } from "./wfs.js";
14
15
  import type { WmsCapabilities } from "./wms-capabilities.js";
15
16
  import type { HonuaWmsFeatureInfoResponse, HonuaWmsImageResponse, HonuaWmtsFeatureInfoResponse, HonuaWmtsTileResponse, WmsFeatureInfoRequest, WmsLegendRequest, WmsMapRequest, WmtsFeatureInfoRequest, WmtsTileRequest } from "./wms-types.js";
@@ -252,13 +253,23 @@ export declare class HonuaClient {
252
253
  ogcRecords(): HonuaOgcRecords;
253
254
  wms(serviceId: string): HonuaWms;
254
255
  wmts(serviceId: string): HonuaWmts;
255
- ogcProcesses(): HonuaOgcProcesses;
256
+ /**
257
+ * Construct the OGC API Processes client wrapper.
258
+ *
259
+ * `basePath` pins every describe / execute / job route to a raw third-party
260
+ * service root (as discovered by `discoverOgcProcesses()`); omitting it uses
261
+ * the Honua facade prefix `/ogc/processes`. Pass the discovery result (or a
262
+ * `/conformance` response) as `conformance` — and optionally
263
+ * `capabilityPolicy: "strict"` — to gate execution and dismissal against what
264
+ * the server actually declares.
265
+ */
266
+ ogcProcesses(options?: Omit<HonuaOgcProcessesOptions, "client">): HonuaOgcProcesses;
256
267
  stac(): HonuaStacSearch;
257
268
  imageService(serviceId: string): HonuaImageService;
258
269
  geometryService(): HonuaGeometryService;
259
270
  geoprocessing(serviceId: string, taskName?: string): HonuaGeoprocessingService;
260
271
  processRunner(adapter: HonuaProcessAdapter): HonuaProcessRunner;
261
- ogcProcessRunner(): HonuaProcessRunner;
272
+ ogcProcessRunner(options?: Omit<HonuaOgcProcessesOptions, "client">): HonuaProcessRunner;
262
273
  geoprocessingRunner(serviceId: string, taskName?: string): HonuaProcessRunner;
263
274
  geospatialGrpcProcessRunner(processClient: GeospatialGrpcProcessClient): HonuaProcessRunner;
264
275
  wfs(endpointUrl?: string, options?: {
@@ -363,6 +374,32 @@ export declare class HonuaClient {
363
374
  okStatuses?: readonly number[];
364
375
  redirect?: "safe-follow" | "error" | "manual";
365
376
  discardErrorBody?: boolean;
377
+ /**
378
+ * Builds the body retained by `HonuaHttpError` for unsuccessful
379
+ * responses. Bounded protocol clients use this hook to consume failure
380
+ * bodies under the same byte ceiling as successful responses.
381
+ */
382
+ errorBody?: (response: Response, deadlineSignal: AbortSignal | undefined) => Promise<unknown>;
383
+ /**
384
+ * Invoked immediately before every physical fetch attempt, including
385
+ * retry and replay-safe authentication attempts. Bounded callers use
386
+ * this guard to reserve request and byte budgets before network I/O.
387
+ */
388
+ beforeAttempt?: (request: Readonly<HonuaRequestContext>, attempt: number) => void | Promise<void>;
389
+ /**
390
+ * Invoked before credential refresh or retry backoff can lead to another
391
+ * physical request. Single-attempt binary lanes throw here so a response
392
+ * that cannot be replayed never waits on work whose only purpose is replay.
393
+ */
394
+ beforeReplay?: (request: Readonly<HonuaRequestContext>, statusCode: number | undefined, reason: "authentication" | "retry") => void | Promise<void>;
395
+ /**
396
+ * Validate and replace a successful response before `after`
397
+ * interceptors run. The callback remains inside the request timeout and
398
+ * receives its combined caller/deadline signal. Bounded binary lanes use
399
+ * this to consume the network stream under a hard ceiling, then return
400
+ * an in-memory response that interceptors may inspect safely.
401
+ */
402
+ prepareResponse?: (response: Response, deadlineSignal: AbortSignal | undefined) => Promise<Response>;
366
403
  }): Promise<Response>;
367
404
  private requestCachedMetadataJson;
368
405
  private staleMetadataFallback;
@@ -475,24 +512,9 @@ export declare class HonuaClient {
475
512
  processId: string;
476
513
  } & OgcMetadataRequest): Promise<HonuaOgcProcessDescription>;
477
514
  executeOgcProcess(request: OgcProcessExecuteRequest): Promise<HonuaOgcProcessJobAccepted>;
478
- getOgcProcessJob(request: {
479
- jobId: string;
480
- signal?: AbortSignal;
481
- responseFormat?: string;
482
- extraParams?: Record<string, string | number | boolean>;
483
- }): Promise<HonuaOgcProcessJobStatus>;
484
- getOgcProcessJobResults(request: {
485
- jobId: string;
486
- signal?: AbortSignal;
487
- responseFormat?: string;
488
- extraParams?: Record<string, string | number | boolean>;
489
- }): Promise<HonuaOgcProcessJobResults>;
490
- cancelOgcProcessJob(request: {
491
- jobId: string;
492
- signal?: AbortSignal;
493
- responseFormat?: string;
494
- extraParams?: Record<string, string | number | boolean>;
495
- }): Promise<HonuaOgcProcessJobStatus>;
515
+ getOgcProcessJob(request: OgcProcessJobRequest): Promise<HonuaOgcProcessJobStatus>;
516
+ getOgcProcessJobResults(request: OgcProcessJobRequest): Promise<HonuaOgcProcessJobResults>;
517
+ cancelOgcProcessJob(request: OgcProcessJobRequest): Promise<HonuaOgcProcessJobStatus>;
496
518
  getStacLanding(request?: OgcMetadataRequest): Promise<HonuaStacLandingResponse>;
497
519
  listStacCollections(request?: OgcMetadataRequest): Promise<HonuaOgcCollectionsResponse>;
498
520
  getStacCollection(request: OgcCollectionRequest): Promise<HonuaOgcCollectionMetadata>;
@@ -563,6 +585,8 @@ export declare class HonuaClient {
563
585
  contentType?: string;
564
586
  body?: BodyInit;
565
587
  signal?: AbortSignal;
588
+ /** Maximum response-body bytes accepted before text decoding/parsing. */
589
+ maxResponseBytes?: number;
566
590
  }): Promise<{
567
591
  text: string;
568
592
  contentType: string;
@@ -604,6 +628,12 @@ export declare class HonuaClient {
604
628
  /** Whether any registered interceptor inspects responses (`after` hook). */
605
629
  private hasAfterInterceptors;
606
630
  private applyErrorInterceptors;
631
+ /**
632
+ * Start every terminal error hook independently so one nonsettling hook
633
+ * cannot prevent later hooks from observing the same failure. Each hook is
634
+ * contained so a detached deadline notification can never reject unhandled.
635
+ */
636
+ private applyErrorInterceptorsConcurrently;
607
637
  private refreshReplaySafeRequestAuth;
608
638
  private sleepBeforeRetry;
609
639
  }