@honua/app-platform 0.1.0-beta.0 → 0.1.1-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 (381) hide show
  1. package/contract/discovery.d.ts +231 -0
  2. package/contract/discovery.d.ts.map +1 -0
  3. package/contract/discovery.js +554 -0
  4. package/contract/edit-sketch.d.ts +8 -0
  5. package/contract/edit-sketch.d.ts.map +1 -1
  6. package/contract/edit-sketch.js +15 -0
  7. package/contract/edit-snapping.d.ts +160 -0
  8. package/contract/edit-snapping.d.ts.map +1 -0
  9. package/contract/edit-snapping.js +675 -0
  10. package/contract/generated/projjson-v0.7-crs-validator.d.ts +35 -0
  11. package/contract/generated/projjson-v0.7-crs-validator.d.ts.map +1 -0
  12. package/contract/generated/projjson-v0.7-crs-validator.js +3941 -0
  13. package/contract/index.d.ts +11 -2
  14. package/contract/index.d.ts.map +1 -1
  15. package/contract/index.js +4 -1
  16. package/contract/pmtiles.d.ts +31 -0
  17. package/contract/pmtiles.d.ts.map +1 -1
  18. package/contract/pmtiles.js +60 -20
  19. package/contract/protocol-module.d.ts +70 -0
  20. package/contract/protocol-module.d.ts.map +1 -0
  21. package/contract/protocol-module.js +1 -0
  22. package/contract/schema-envelope.d.ts +26 -0
  23. package/contract/schema-envelope.d.ts.map +1 -0
  24. package/contract/schema-envelope.js +25 -0
  25. package/contract/schema.d.ts +582 -0
  26. package/contract/schema.d.ts.map +1 -0
  27. package/contract/schema.js +2483 -0
  28. package/contract/source-capability-support.d.ts +6 -0
  29. package/contract/source-capability-support.d.ts.map +1 -0
  30. package/contract/source-capability-support.js +154 -0
  31. package/contract/source.d.ts +35 -17
  32. package/contract/source.d.ts.map +1 -1
  33. package/contract/source.js +267 -71
  34. package/contract/types.d.ts +140 -4
  35. package/contract/types.d.ts.map +1 -1
  36. package/contract/types.js +6 -14
  37. package/core/bounded-json.d.ts +4 -0
  38. package/core/bounded-json.d.ts.map +1 -0
  39. package/core/bounded-json.js +38 -0
  40. package/core/cache-state.d.ts +9 -0
  41. package/core/cache-state.d.ts.map +1 -1
  42. package/core/cache-state.js +10 -0
  43. package/core/capabilities-xml.d.ts +33 -0
  44. package/core/capabilities-xml.d.ts.map +1 -0
  45. package/core/capabilities-xml.js +331 -0
  46. package/core/client.d.ts +4 -1
  47. package/core/client.d.ts.map +1 -1
  48. package/core/client.js +115 -29
  49. package/core/error-classifications.d.ts +153 -0
  50. package/core/error-classifications.d.ts.map +1 -0
  51. package/core/error-classifications.js +140 -0
  52. package/core/error-code-registry.d.ts +158 -0
  53. package/core/error-code-registry.d.ts.map +1 -0
  54. package/core/error-code-registry.js +143 -0
  55. package/core/error-envelope.d.ts +68 -0
  56. package/core/error-envelope.d.ts.map +1 -0
  57. package/core/error-envelope.js +357 -0
  58. package/core/errors.d.ts +45 -29
  59. package/core/errors.d.ts.map +1 -1
  60. package/core/errors.js +97 -50
  61. package/core/geoparquet-sql.d.ts +30 -2
  62. package/core/geoparquet-sql.d.ts.map +1 -1
  63. package/core/geoparquet-sql.js +38 -3
  64. package/core/odata-key-path.d.ts +12 -0
  65. package/core/odata-key-path.d.ts.map +1 -0
  66. package/core/odata-key-path.js +28 -0
  67. package/core/odata-write-codec.d.ts +66 -0
  68. package/core/odata-write-codec.d.ts.map +1 -0
  69. package/core/odata-write-codec.js +1083 -0
  70. package/core/odata.d.ts +59 -7
  71. package/core/odata.d.ts.map +1 -1
  72. package/core/odata.js +431 -99
  73. package/core/ogc-features.d.ts.map +1 -1
  74. package/core/ogc-features.js +3 -0
  75. package/core/ogc-maps.d.ts +7 -0
  76. package/core/ogc-maps.d.ts.map +1 -1
  77. package/core/ogc-maps.js +46 -7
  78. package/core/ogc-processes.d.ts +2 -1
  79. package/core/ogc-processes.d.ts.map +1 -1
  80. package/core/ogc-processes.js +33 -5
  81. package/core/ogc-records.d.ts +9 -0
  82. package/core/ogc-records.d.ts.map +1 -1
  83. package/core/ogc-records.js +78 -29
  84. package/core/ogc-tiles.d.ts +10 -1
  85. package/core/ogc-tiles.d.ts.map +1 -1
  86. package/core/ogc-tiles.js +56 -17
  87. package/core/path-utils.d.ts +9 -0
  88. package/core/path-utils.d.ts.map +1 -1
  89. package/core/path-utils.js +19 -0
  90. package/core/protocol-transport.d.ts +1 -0
  91. package/core/protocol-transport.d.ts.map +1 -1
  92. package/core/request-pipeline.d.ts.map +1 -1
  93. package/core/request-pipeline.js +1 -1
  94. package/core/spatial-filter.d.ts +8 -4
  95. package/core/spatial-filter.d.ts.map +1 -1
  96. package/core/spatial-filter.js +206 -16
  97. package/core/stac-static.d.ts +6 -2
  98. package/core/stac-static.d.ts.map +1 -1
  99. package/core/stac-static.js +260 -69
  100. package/core/surfaces.d.ts.map +1 -1
  101. package/core/surfaces.js +69 -5
  102. package/core/types.d.ts +125 -7
  103. package/core/types.d.ts.map +1 -1
  104. package/core/wfs-capabilities.d.ts +2 -0
  105. package/core/wfs-capabilities.d.ts.map +1 -1
  106. package/core/wfs-capabilities.js +8 -1
  107. package/core/wfs.d.ts.map +1 -1
  108. package/core/wfs.js +10 -0
  109. package/core/wms-capabilities.d.ts +56 -84
  110. package/core/wms-capabilities.d.ts.map +1 -1
  111. package/core/wms-capabilities.js +212 -509
  112. package/core/wmts-capabilities.d.ts +62 -62
  113. package/core/wmts-capabilities.d.ts.map +1 -1
  114. package/core/wmts-capabilities.js +224 -371
  115. package/esri-compat/editor.d.ts +8 -0
  116. package/esri-compat/editor.d.ts.map +1 -1
  117. package/esri-compat/editor.js +13 -0
  118. package/esri-compat/feature-layer.d.ts +2 -0
  119. package/esri-compat/feature-layer.d.ts.map +1 -1
  120. package/esri-compat/feature-layer.js +1 -0
  121. package/esri-compat/layer-list.d.ts +11 -0
  122. package/esri-compat/layer-list.d.ts.map +1 -1
  123. package/esri-compat/layer-list.js +49 -0
  124. package/esri-compat/legend.d.ts +10 -0
  125. package/esri-compat/legend.d.ts.map +1 -1
  126. package/esri-compat/legend.js +27 -0
  127. package/esri-compat/portal.d.ts +197 -0
  128. package/esri-compat/portal.d.ts.map +1 -0
  129. package/esri-compat/portal.js +251 -0
  130. package/esri-compat/renderer-objects.d.ts +40 -0
  131. package/esri-compat/renderer-objects.d.ts.map +1 -0
  132. package/esri-compat/renderer-objects.js +62 -0
  133. package/esri-compat/sketch.d.ts +43 -0
  134. package/esri-compat/sketch.d.ts.map +1 -1
  135. package/esri-compat/sketch.js +46 -0
  136. package/esri-compat/snapping.d.ts +43 -0
  137. package/esri-compat/snapping.d.ts.map +1 -0
  138. package/esri-compat/snapping.js +45 -0
  139. package/esri-compat/url.d.ts.map +1 -1
  140. package/esri-compat/url.js +1 -1
  141. package/esri-compat/widget-host.d.ts +84 -0
  142. package/esri-compat/widget-host.d.ts.map +1 -0
  143. package/esri-compat/widget-host.js +159 -0
  144. package/generated-app/errors.d.ts +18 -2
  145. package/generated-app/errors.d.ts.map +1 -1
  146. package/generated-app/errors.js +44 -11
  147. package/geocoding/index.d.ts +7 -0
  148. package/geocoding/index.d.ts.map +1 -1
  149. package/geocoding/index.js +5 -0
  150. package/geocoding/provider-http.d.ts +37 -0
  151. package/geocoding/provider-http.d.ts.map +1 -0
  152. package/geocoding/provider-http.js +91 -0
  153. package/geocoding/provider.d.ts +145 -0
  154. package/geocoding/provider.d.ts.map +1 -0
  155. package/geocoding/provider.js +41 -0
  156. package/geocoding/providers/honua.d.ts +28 -0
  157. package/geocoding/providers/honua.d.ts.map +1 -0
  158. package/geocoding/providers/honua.js +68 -0
  159. package/geocoding/providers/nominatim.d.ts +47 -0
  160. package/geocoding/providers/nominatim.d.ts.map +1 -0
  161. package/geocoding/providers/nominatim.js +105 -0
  162. package/geocoding/providers/pelias.d.ts +40 -0
  163. package/geocoding/providers/pelias.d.ts.map +1 -0
  164. package/geocoding/providers/pelias.js +115 -0
  165. package/geocoding/providers/photon.d.ts +39 -0
  166. package/geocoding/providers/photon.d.ts.map +1 -0
  167. package/geocoding/providers/photon.js +107 -0
  168. package/geometry/convert.d.ts +13 -0
  169. package/geometry/convert.d.ts.map +1 -0
  170. package/geometry/convert.js +12 -0
  171. package/geometry/index.d.ts +17 -0
  172. package/geometry/index.d.ts.map +1 -0
  173. package/geometry/index.js +15 -0
  174. package/geometry/internal.d.ts +25 -0
  175. package/geometry/internal.d.ts.map +1 -0
  176. package/geometry/internal.js +40 -0
  177. package/geometry/ops.d.ts +71 -0
  178. package/geometry/ops.d.ts.map +1 -0
  179. package/geometry/ops.js +147 -0
  180. package/geometry/project.d.ts +40 -0
  181. package/geometry/project.d.ts.map +1 -0
  182. package/geometry/project.js +88 -0
  183. package/geometry/types.d.ts +36 -0
  184. package/geometry/types.d.ts.map +1 -0
  185. package/geometry/types.js +12 -0
  186. package/map/automatic-mount-integration.d.ts +134 -0
  187. package/map/automatic-mount-integration.d.ts.map +1 -0
  188. package/map/automatic-mount-integration.js +305 -0
  189. package/map/automatic-source-strategy.d.ts +125 -0
  190. package/map/automatic-source-strategy.d.ts.map +1 -0
  191. package/map/automatic-source-strategy.js +494 -0
  192. package/map/data-to-map-bridge.d.ts +293 -0
  193. package/map/data-to-map-bridge.d.ts.map +1 -0
  194. package/map/data-to-map-bridge.js +817 -0
  195. package/map/geojson-projection.d.ts +33 -0
  196. package/map/geojson-projection.d.ts.map +1 -0
  197. package/map/geojson-projection.js +118 -0
  198. package/map/index.d.ts +14 -0
  199. package/map/index.d.ts.map +1 -1
  200. package/map/index.js +8 -0
  201. package/map/raster-source-spec.d.ts +30 -0
  202. package/map/raster-source-spec.d.ts.map +1 -0
  203. package/map/raster-source-spec.js +190 -0
  204. package/map/raster-source-strategy.d.ts +65 -0
  205. package/map/raster-source-strategy.d.ts.map +1 -0
  206. package/map/raster-source-strategy.js +232 -0
  207. package/map/source-to-maplibre.d.ts +91 -0
  208. package/map/source-to-maplibre.d.ts.map +1 -0
  209. package/map/source-to-maplibre.js +454 -0
  210. package/map/temporal-playback.d.ts +139 -0
  211. package/map/temporal-playback.d.ts.map +1 -0
  212. package/map/temporal-playback.js +247 -0
  213. package/package.json +28 -2
  214. package/query-planner/canonical.d.ts +7 -0
  215. package/query-planner/canonical.d.ts.map +1 -0
  216. package/query-planner/canonical.js +145 -0
  217. package/query-planner/cql2-json.d.ts +17 -0
  218. package/query-planner/cql2-json.d.ts.map +1 -0
  219. package/query-planner/cql2-json.js +646 -0
  220. package/query-planner/diagnostics.d.ts +35 -0
  221. package/query-planner/diagnostics.d.ts.map +1 -0
  222. package/query-planner/diagnostics.js +373 -0
  223. package/query-planner/duckdb.d.ts +79 -0
  224. package/query-planner/duckdb.d.ts.map +1 -0
  225. package/query-planner/duckdb.js +758 -0
  226. package/query-planner/execution-context.d.ts +5 -0
  227. package/query-planner/execution-context.d.ts.map +1 -0
  228. package/query-planner/execution-context.js +50 -0
  229. package/query-planner/executor.d.ts +5 -0
  230. package/query-planner/executor.d.ts.map +1 -0
  231. package/query-planner/executor.js +223 -0
  232. package/query-planner/geoservices.d.ts +91 -0
  233. package/query-planner/geoservices.d.ts.map +1 -0
  234. package/query-planner/geoservices.js +667 -0
  235. package/query-planner/grpc.d.ts +100 -0
  236. package/query-planner/grpc.d.ts.map +1 -0
  237. package/query-planner/grpc.js +736 -0
  238. package/query-planner/index.d.ts +44 -0
  239. package/query-planner/index.d.ts.map +1 -0
  240. package/query-planner/index.js +30 -0
  241. package/query-planner/ir.d.ts +20 -0
  242. package/query-planner/ir.d.ts.map +1 -0
  243. package/query-planner/ir.js +417 -0
  244. package/query-planner/local-aggregate.d.ts +5 -0
  245. package/query-planner/local-aggregate.d.ts.map +1 -0
  246. package/query-planner/local-aggregate.js +126 -0
  247. package/query-planner/odata.d.ts +48 -0
  248. package/query-planner/odata.d.ts.map +1 -0
  249. package/query-planner/odata.js +662 -0
  250. package/query-planner/ogc-compiler.d.ts +55 -0
  251. package/query-planner/ogc-compiler.d.ts.map +1 -0
  252. package/query-planner/ogc-compiler.js +480 -0
  253. package/query-planner/ogc-features.d.ts +53 -0
  254. package/query-planner/ogc-features.d.ts.map +1 -0
  255. package/query-planner/ogc-features.js +617 -0
  256. package/query-planner/planner.d.ts +17 -0
  257. package/query-planner/planner.d.ts.map +1 -0
  258. package/query-planner/planner.js +818 -0
  259. package/query-planner/resource.d.ts +94 -0
  260. package/query-planner/resource.d.ts.map +1 -0
  261. package/query-planner/resource.js +526 -0
  262. package/query-planner/semantic-canonical.d.ts +15 -0
  263. package/query-planner/semantic-canonical.d.ts.map +1 -0
  264. package/query-planner/semantic-canonical.js +62 -0
  265. package/query-planner/semantic-compat.d.ts +10 -0
  266. package/query-planner/semantic-compat.d.ts.map +1 -0
  267. package/query-planner/semantic-compat.js +35 -0
  268. package/query-planner/semantic-compiler.d.ts +64 -0
  269. package/query-planner/semantic-compiler.d.ts.map +1 -0
  270. package/query-planner/semantic-compiler.js +81 -0
  271. package/query-planner/semantic-literals.d.ts +30 -0
  272. package/query-planner/semantic-literals.d.ts.map +1 -0
  273. package/query-planner/semantic-literals.js +133 -0
  274. package/query-planner/semantic-types.d.ts +265 -0
  275. package/query-planner/semantic-types.d.ts.map +1 -0
  276. package/query-planner/semantic-types.js +1 -0
  277. package/query-planner/semantic.d.ts +54 -0
  278. package/query-planner/semantic.d.ts.map +1 -0
  279. package/query-planner/semantic.js +1421 -0
  280. package/query-planner/types.d.ts +560 -0
  281. package/query-planner/types.d.ts.map +1 -0
  282. package/query-planner/types.js +49 -0
  283. package/query-planner/wfs-semantic.d.ts +58 -0
  284. package/query-planner/wfs-semantic.d.ts.map +1 -0
  285. package/query-planner/wfs-semantic.js +547 -0
  286. package/query-planner/wfs.d.ts +6 -0
  287. package/query-planner/wfs.d.ts.map +1 -0
  288. package/query-planner/wfs.js +71 -0
  289. package/realtime/contract.d.ts +142 -0
  290. package/realtime/contract.d.ts.map +1 -0
  291. package/realtime/contract.js +154 -0
  292. package/realtime/honua-server.d.ts.map +1 -1
  293. package/realtime/honua-server.js +13 -8
  294. package/realtime/index.d.ts +19 -4
  295. package/realtime/index.d.ts.map +1 -1
  296. package/realtime/index.js +14 -4
  297. package/realtime/odata-delta.d.ts +114 -0
  298. package/realtime/odata-delta.d.ts.map +1 -0
  299. package/realtime/odata-delta.js +483 -0
  300. package/realtime/resumable-transport.d.ts +111 -0
  301. package/realtime/resumable-transport.d.ts.map +1 -0
  302. package/realtime/resumable-transport.js +406 -0
  303. package/realtime/resumable.d.ts +104 -0
  304. package/realtime/resumable.d.ts.map +1 -0
  305. package/realtime/resumable.js +632 -0
  306. package/realtime/sse.d.ts.map +1 -1
  307. package/realtime/sse.js +27 -23
  308. package/realtime/websocket.d.ts +60 -0
  309. package/realtime/websocket.d.ts.map +1 -0
  310. package/realtime/websocket.js +157 -0
  311. package/realtime/wire.d.ts +27 -0
  312. package/realtime/wire.d.ts.map +1 -0
  313. package/realtime/wire.js +57 -0
  314. package/replica-sync/errors.d.ts +2 -1
  315. package/replica-sync/errors.d.ts.map +1 -1
  316. package/replica-sync/errors.js +33 -2
  317. package/runtime/edit-snapping.d.ts +107 -0
  318. package/runtime/edit-snapping.d.ts.map +1 -0
  319. package/runtime/edit-snapping.js +190 -0
  320. package/runtime/errors.d.ts +3 -2
  321. package/runtime/errors.d.ts.map +1 -1
  322. package/runtime/errors.js +19 -2
  323. package/runtime/index.d.ts +6 -0
  324. package/runtime/index.d.ts.map +1 -1
  325. package/runtime/index.js +3 -0
  326. package/runtime/maplibre-renderer.d.ts +41 -0
  327. package/runtime/maplibre-renderer.d.ts.map +1 -0
  328. package/runtime/maplibre-renderer.js +322 -0
  329. package/runtime/query-tiles.d.ts +2 -1
  330. package/runtime/query-tiles.d.ts.map +1 -1
  331. package/runtime/query-tiles.js +6 -2
  332. package/runtime/source-bridge.d.ts +4 -4
  333. package/runtime/source-bridge.d.ts.map +1 -1
  334. package/runtime/source-bridge.js +9 -56
  335. package/runtime/style-interactions.d.ts +3 -2
  336. package/runtime/style-interactions.d.ts.map +1 -1
  337. package/runtime/style-interactions.js +11 -3
  338. package/runtime/terra-draw-sketch.d.ts +275 -0
  339. package/runtime/terra-draw-sketch.d.ts.map +1 -0
  340. package/runtime/terra-draw-sketch.js +404 -0
  341. package/scene-workspace/index.d.ts +4 -0
  342. package/scene-workspace/index.d.ts.map +1 -1
  343. package/scene-workspace/index.js +2 -0
  344. package/scene-workspace/source-to-cesium.d.ts +116 -0
  345. package/scene-workspace/source-to-cesium.d.ts.map +1 -0
  346. package/scene-workspace/source-to-cesium.js +791 -0
  347. package/scene-workspace/state-sync.d.ts +147 -0
  348. package/scene-workspace/state-sync.d.ts.map +1 -0
  349. package/scene-workspace/state-sync.js +1123 -0
  350. package/source-capability-registry.d.ts +1 -0
  351. package/source-capability-registry.js +1 -0
  352. package/source-capability-types.d.ts +186 -0
  353. package/source-capability-types.js +7 -0
  354. package/style/index.d.ts +2 -0
  355. package/style/index.d.ts.map +1 -1
  356. package/style/index.js +2 -0
  357. package/style/renderers.d.ts +326 -0
  358. package/style/renderers.d.ts.map +1 -0
  359. package/style/renderers.js +517 -0
  360. package/web-components/controller.d.ts +2 -0
  361. package/web-components/controller.d.ts.map +1 -1
  362. package/web-components/controller.js +49 -8
  363. package/web-components/elements.d.ts +95 -1
  364. package/web-components/elements.d.ts.map +1 -1
  365. package/web-components/elements.js +458 -19
  366. package/web-components/index.d.ts +8 -1
  367. package/web-components/index.d.ts.map +1 -1
  368. package/web-components/index.js +7 -0
  369. package/web-components/maplibre-renderer.d.ts.map +1 -1
  370. package/web-components/maplibre-renderer.js +87 -0
  371. package/web-components/measurement.d.ts +69 -0
  372. package/web-components/measurement.d.ts.map +1 -0
  373. package/web-components/measurement.js +523 -0
  374. package/web-components/types.d.ts +109 -0
  375. package/web-components/types.d.ts.map +1 -1
  376. package/webmap/convert-renderer.d.ts +24 -3
  377. package/webmap/convert-renderer.d.ts.map +1 -1
  378. package/webmap/convert-renderer.js +93 -112
  379. package/webmap/index.d.ts +1 -1
  380. package/webmap/index.d.ts.map +1 -1
  381. package/webmap/index.js +1 -1
@@ -0,0 +1 @@
1
+ export { isRegisteredCapabilityProfile, matchesRegisteredCapabilityProfileSource } from "@honua/sdk/internal/source-capability-profile-verifier";
@@ -0,0 +1 @@
1
+ export { isRegisteredCapabilityProfile, matchesRegisteredCapabilityProfileSource } from "@honua/sdk/internal/source-capability-profile-verifier";
@@ -0,0 +1,186 @@
1
+ import type { JsonValue, ResolvedCrsDefinition, SourceProtocol } from "./contract/schema.js";
2
+ import type { Capability as BuiltInCapabilityId } from "./contract/types.js";
3
+ export declare const CAPABILITY_EVIDENCE_PROFILE_KIND: "honua.capability-evidence";
4
+ export declare const CAPABILITY_EVIDENCE_PROFILE_VERSION: "1.0";
5
+ export declare const CAPABILITY_EVIDENCE_FINGERPRINT_DOMAIN: "honua:capability-evidence:1.0";
6
+ export declare const CAPABILITY_SOURCE_ENDPOINT_FINGERPRINT_DOMAIN: "honua:capability-source-endpoint:1.0";
7
+ export declare const CAPABILITY_PROFILE_KIND: "honua.capabilities";
8
+ export declare const CAPABILITY_PROFILE_VERSION: "1.0";
9
+ export declare const CAPABILITY_PROFILE_FINGERPRINT_DOMAIN: "honua:capabilities:1.0";
10
+ export type ExtensionIdentifier = `${string}.${string}`;
11
+ export type Sha256 = `sha256:${string}`;
12
+ export type IsoInstant = string;
13
+ export type CapabilityId = BuiltInCapabilityId | ExtensionIdentifier;
14
+ export type CapabilityTruth = "supported" | "unsupported" | "unknown";
15
+ export type ObservedCapabilityTruth = CapabilityTruth | "not-observed";
16
+ export type CapabilityClaimEvidenceKind = "protocol-default" | "declaration";
17
+ export type CapabilityObservationEvidenceKind = "metadata" | "conformance" | "probe";
18
+ export type CapabilityEvidenceKind = CapabilityClaimEvidenceKind | CapabilityObservationEvidenceKind;
19
+ interface CapabilityEvidenceBase {
20
+ readonly truth: CapabilityTruth;
21
+ /**
22
+ * Stable evidence identity. Common credential-shaped forms are rejected, but
23
+ * callers must still treat accepted values as potentially sensitive and must
24
+ * not supply credentials, signed URLs, or secrets.
25
+ */
26
+ readonly reference: string;
27
+ /** Evidence identity only; when present it must match the enclosing source profile. */
28
+ readonly sourceFingerprint?: Sha256;
29
+ }
30
+ export interface CapabilityClaimEvidence extends CapabilityEvidenceBase {
31
+ readonly kind: CapabilityClaimEvidenceKind;
32
+ readonly observedAt?: never;
33
+ readonly expiresAt?: never;
34
+ }
35
+ export interface CapabilityObservationEvidence extends CapabilityEvidenceBase {
36
+ readonly kind: CapabilityObservationEvidenceKind;
37
+ readonly observedAt: IsoInstant;
38
+ /** Exclusive freshness boundary. */
39
+ readonly expiresAt: IsoInstant;
40
+ }
41
+ export type CapabilityEvidence = CapabilityClaimEvidence | CapabilityObservationEvidence;
42
+ export type TopologicalSpatialPredicate = "equals" | "intersects" | "within" | "contains" | "disjoint" | "touches" | "overlaps" | "crosses";
43
+ export type DistanceSpatialPredicate = "within-distance" | "beyond-distance";
44
+ export type SpatialPredicate = TopologicalSpatialPredicate | "bbox-intersects" | DistanceSpatialPredicate;
45
+ export type TemporalPredicate = "before" | "after" | "during" | "time-intersects";
46
+ export type BuiltInFilterOperator = "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "between" | "is-null" | "is-not-null" | "like" | "and" | "or" | "not" | SpatialPredicate | TemporalPredicate;
47
+ export type FilterOperatorId = BuiltInFilterOperator | ExtensionIdentifier;
48
+ export type PaginationMode = "offset" | "cursor" | "next-link";
49
+ export type ExtensionMap = Readonly<Record<ExtensionIdentifier, JsonValue>>;
50
+ export interface CapabilityConstraints {
51
+ readonly inputFormats?: readonly string[];
52
+ readonly outputFormats?: readonly string[];
53
+ readonly filterOperators?: readonly FilterOperatorId[];
54
+ readonly spatialPredicates?: readonly SpatialPredicate[];
55
+ readonly temporalPredicates?: readonly TemporalPredicate[];
56
+ readonly supportedCrs?: readonly ResolvedCrsDefinition[];
57
+ readonly pagination?: {
58
+ readonly modes: readonly PaginationMode[];
59
+ readonly maxPageSize?: number;
60
+ };
61
+ readonly limits?: {
62
+ readonly maxRecords?: number;
63
+ readonly maxRequestBytes?: number;
64
+ readonly maxResponseBytes?: number;
65
+ };
66
+ /** Caller metadata. Sensitive keys/forms are rejected; credentials remain prohibited. */
67
+ readonly extensions?: ExtensionMap;
68
+ }
69
+ export type CapabilityRuntimeEnvironment = "browser" | "worker" | "node" | "edge" | ExtensionIdentifier;
70
+ /**
71
+ * Credential-free source endpoint coordinates used only to derive a digest.
72
+ * Query strings, fragments, URL user-info, and credential-shaped source ids
73
+ * are rejected before hashing and the raw coordinates are never transported.
74
+ */
75
+ export interface CapabilitySourceEndpointIdentity {
76
+ readonly endpoint: string;
77
+ readonly protocol: SourceProtocol;
78
+ readonly sourceId?: string;
79
+ }
80
+ /** Static execution requirements retained in evidence and evaluated decisions. */
81
+ export interface CapabilityRequirements {
82
+ readonly environments?: readonly CapabilityRuntimeEnvironment[];
83
+ /** Structural package/runtime identifiers; credential values are prohibited. */
84
+ readonly peers?: readonly string[];
85
+ }
86
+ /** One normalized, cacheable claimed/observed entry. */
87
+ export interface CapabilityEvidenceEntry {
88
+ readonly id: CapabilityId;
89
+ readonly claimed: CapabilityTruth;
90
+ readonly observed: ObservedCapabilityTruth;
91
+ readonly evidence: readonly CapabilityEvidence[];
92
+ /** Structural scope identifiers only. Tokens and credentials are prohibited. */
93
+ readonly authorizationScopes?: readonly string[];
94
+ readonly constraints?: CapabilityConstraints;
95
+ readonly requirements?: CapabilityRequirements;
96
+ }
97
+ /** @deprecated Use {@link CapabilityEvidenceEntry}. */
98
+ export type CapabilityEvaluationEntry = CapabilityEvidenceEntry;
99
+ export interface CapabilityEvidenceProfileOptions {
100
+ /** SourceSchemaV2 SHA-256 identity. May be derived only from consistent evidence. */
101
+ readonly sourceFingerprint?: Sha256;
102
+ /** Required credential-free endpoint coordinates; only their derived digest is retained. */
103
+ readonly sourceEndpoint: CapabilitySourceEndpointIdentity;
104
+ }
105
+ export interface CapabilitySourceVerificationOptions {
106
+ /** Current SourceSchemaV2 SHA-256 identity. Must be paired with expectedSourceEndpoint. */
107
+ readonly expectedSourceFingerprint?: Sha256;
108
+ /** Current credential-free endpoint coordinates. Must be paired with expectedSourceFingerprint. */
109
+ readonly expectedSourceEndpoint?: CapabilitySourceEndpointIdentity;
110
+ }
111
+ /** Heavy, one-time validated transport/cache envelope for one source. */
112
+ export interface CapabilityEvidenceProfile {
113
+ readonly kind: typeof CAPABILITY_EVIDENCE_PROFILE_KIND;
114
+ readonly version: typeof CAPABILITY_EVIDENCE_PROFILE_VERSION;
115
+ readonly fingerprint: Sha256;
116
+ /** Required SourceSchemaV2 identity for cache invalidation and source binding. */
117
+ readonly sourceFingerprint: Sha256;
118
+ /** Required digest of normalized protocol/endpoint/source coordinates. */
119
+ readonly sourceEndpointFingerprint: Sha256;
120
+ readonly entries: readonly CapabilityEvidenceEntry[];
121
+ }
122
+ /** Dynamic policy for the canonical claimed/observed/effective evaluator. */
123
+ export interface CapabilityEvaluationPolicy {
124
+ /** Optional allow-list. An omitted list allows every evidence-supported entry. */
125
+ readonly allow?: readonly CapabilityId[];
126
+ /** Explicit deny-list. Denial wins when an id appears in both lists. */
127
+ readonly deny?: readonly CapabilityId[];
128
+ }
129
+ export interface CapabilityAuthorizationContext {
130
+ /** Structural scope identifiers; credential/token values are prohibited. */
131
+ readonly grantedScopes?: readonly string[];
132
+ /** Scopes the current principal is known not to be allowed to acquire. */
133
+ readonly deniedScopes?: readonly string[];
134
+ }
135
+ /** Dynamic inputs refreshed for each lightweight evaluation. */
136
+ export interface CapabilityEvaluationContext {
137
+ /** Explicit deterministic clock input. Omission makes observation freshness unknown. */
138
+ readonly evaluatedAt?: IsoInstant;
139
+ readonly policy?: CapabilityEvaluationPolicy;
140
+ readonly environment?: CapabilityRuntimeEnvironment;
141
+ /** Structural package/runtime identifiers; credential values are prohibited. */
142
+ readonly availablePeers?: readonly string[];
143
+ readonly authorization?: CapabilityAuthorizationContext;
144
+ }
145
+ /**
146
+ * Normalized caller-controlled context retained so transported decisions can
147
+ * be reverified. It is not a sanitizer; profiles remain potentially sensitive.
148
+ */
149
+ export interface CapabilityEvaluationContextSnapshot {
150
+ readonly policy?: {
151
+ readonly allow?: readonly CapabilityId[];
152
+ readonly deny: readonly CapabilityId[];
153
+ };
154
+ readonly environment?: CapabilityRuntimeEnvironment;
155
+ readonly availablePeers: readonly string[];
156
+ readonly authorization: {
157
+ readonly grantedScopes: readonly string[];
158
+ readonly deniedScopes: readonly string[];
159
+ };
160
+ }
161
+ export type EffectiveCapabilityState = "supported" | "unsupported" | "unknown" | "policy-disabled" | "peer-unavailable" | "authorization-required" | "authorization-denied";
162
+ /** Stable codes; suffixed forms name the missing environment, peer, or scope. */
163
+ export type CapabilityDecisionReason = "supported-by-claim-and-observation" | "unsupported-by-claim" | "unsupported-by-observation" | "claim-unknown" | "observation-unknown" | "observation-not-observed" | "freshness-not-evaluated" | "evidence-not-yet-current" | "evidence-stale" | "policy-disabled" | `environment-unavailable:${string}` | `peer-unavailable:${string}` | `authorization-required:${string}` | `authorization-denied:${string}`;
164
+ export interface CapabilityDecision extends CapabilityEvidenceEntry {
165
+ readonly effective: EffectiveCapabilityState;
166
+ readonly reasons: readonly CapabilityDecisionReason[];
167
+ }
168
+ /**
169
+ * Auditable evaluated truth derived from one evidence envelope and one dynamic
170
+ * context. Caller-controlled values make serialized profiles potentially sensitive.
171
+ */
172
+ export interface CapabilityProfile {
173
+ readonly kind: typeof CAPABILITY_PROFILE_KIND;
174
+ readonly version: typeof CAPABILITY_PROFILE_VERSION;
175
+ readonly fingerprint: Sha256;
176
+ readonly evidenceFingerprint: Sha256;
177
+ readonly sourceFingerprint: Sha256;
178
+ readonly sourceEndpointFingerprint: Sha256;
179
+ readonly evaluatedAt: IsoInstant | null;
180
+ /** Exclusive conservative boundary; null means no freshness window was established. */
181
+ readonly validUntil: IsoInstant | null;
182
+ readonly context: CapabilityEvaluationContextSnapshot;
183
+ readonly entries: readonly CapabilityDecision[];
184
+ }
185
+ export {};
186
+ //# sourceMappingURL=source-capability-types.d.ts.map
@@ -0,0 +1,7 @@
1
+ export const CAPABILITY_EVIDENCE_PROFILE_KIND = "honua.capability-evidence";
2
+ export const CAPABILITY_EVIDENCE_PROFILE_VERSION = "1.0";
3
+ export const CAPABILITY_EVIDENCE_FINGERPRINT_DOMAIN = "honua:capability-evidence:1.0";
4
+ export const CAPABILITY_SOURCE_ENDPOINT_FINGERPRINT_DOMAIN = "honua:capability-source-endpoint:1.0";
5
+ export const CAPABILITY_PROFILE_KIND = "honua.capabilities";
6
+ export const CAPABILITY_PROFILE_VERSION = "1.0";
7
+ export const CAPABILITY_PROFILE_FINGERPRINT_DOMAIN = "honua:capabilities:1.0";
package/style/index.d.ts CHANGED
@@ -22,4 +22,6 @@ export { isHonuaSource, isFeatureServiceSource, isMapServiceSource, isOgcFeature
22
22
  export type { HonuaSourceBase, HonuaFeatureServiceSourceSpecification, HonuaMapServiceSourceSpecification, HonuaOgcFeaturesSourceSpecification, HonuaWmsSourceSpecification, HonuaWmtsSourceSpecification, HonuaSourceSpecification, HonuaLayerSpecification, HonuaStyleSpecification, ParsedOgcFeaturesUrl, StyleValidationError, } from "./specification.js";
23
23
  export { createSources } from "./factory.js";
24
24
  export type { ResolvedSource } from "./factory.js";
25
+ export { classBreaksRenderer, clusterRenderer, heatmapRenderer, isRenderer, rendererFromJSON, uniqueValueRenderer, } from "./renderers.js";
26
+ export type { ClassBreakEntry, ClassBreaksRenderer, ClassBreaksRendererDescriptor, ClassBreaksRendererOptions, ClusterRenderer, ClusterRendererDescriptor, ClusterRendererOptions, ClusterStep, HeatmapColorStop, HeatmapRenderer, HeatmapRendererDescriptor, HeatmapRendererOptions, Renderer, RendererDescriptor, RendererGeometryType, RendererLayerFragment, RendererLegendItem, RendererStyle, UniqueValueEntry, UniqueValueRenderer, UniqueValueRendererDescriptor, UniqueValueRendererOptions, } from "./renderers.js";
25
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/style/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,eAAe,EACf,sCAAsC,EACtC,kCAAkC,EAClC,mCAAmC,EACnC,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/style/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,eAAe,EACf,sCAAsC,EACtC,kCAAkC,EAClC,mCAAmC,EACnC,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,6BAA6B,EAC7B,0BAA0B,EAC1B,eAAe,EACf,yBAAyB,EACzB,sBAAsB,EACtB,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,sBAAsB,EACtB,QAAQ,EACR,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,6BAA6B,EAC7B,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC"}
package/style/index.js CHANGED
@@ -20,5 +20,7 @@
20
20
  */
21
21
  export { isHonuaSource, isFeatureServiceSource, isMapServiceSource, isOgcFeaturesSource, isWmsSource, isWmtsSource, parseOgcFeaturesUrl, validateHonuaStyle, } from "./specification.js";
22
22
  export { createSources } from "./factory.js";
23
+ // First-class renderer objects (issue #497). All @experimental.
24
+ export { classBreaksRenderer, clusterRenderer, heatmapRenderer, isRenderer, rendererFromJSON, uniqueValueRenderer, } from "./renderers.js";
23
25
  // Feature Service and Map Service URL parsers are exported from
24
26
  // esri-compat/url.ts via the main index.ts barrel — no re-export needed here.
@@ -0,0 +1,326 @@
1
+ /**
2
+ * First-class renderer objects (issue #497): serializable, renderer-neutral
3
+ * descriptions of smart-mapping styles (class breaks, unique values, heatmap,
4
+ * clustering) that compile deterministically to MapLibre style fragments
5
+ * through the `/expr` builder.
6
+ *
7
+ * A renderer object is a pure value: construct it from options (or revive it
8
+ * from JSON with {@link rendererFromJSON}), read legend metadata with
9
+ * `legendItems()`, and compile MapLibre layer fragments with
10
+ * `toMapLibre(geometryType)`. Compilation is a pure function of the
11
+ * descriptor — no caching, no map access — so the same descriptor always
12
+ * produces byte-identical style JSON.
13
+ *
14
+ * The WebMap JSON converter (`src/webmap/convert-renderer.ts`) and the
15
+ * esri-compat renderer shims emit these objects instead of private
16
+ * transforms, so there is exactly one class-breaks/unique-value compiler in
17
+ * the SDK.
18
+ *
19
+ * @module
20
+ */
21
+ import { type Expr } from "../expr/expression.js";
22
+ /** Coarse geometry classification a renderer compiles against. @experimental */
23
+ export type RendererGeometryType = "point" | "line" | "polygon";
24
+ /**
25
+ * Advanced multi-property style override for one renderer class. When
26
+ * present it replaces the single `color` shorthand and may carry any
27
+ * MapLibre paint/layout properties (this is how WebMap symbols round-trip
28
+ * through renderer objects without loss).
29
+ *
30
+ * @experimental
31
+ */
32
+ export interface RendererStyle {
33
+ readonly paint?: Readonly<Record<string, unknown>>;
34
+ readonly layout?: Readonly<Record<string, unknown>>;
35
+ }
36
+ /**
37
+ * One MapLibre layer fragment compiled from a renderer. `paint`/`layout`
38
+ * values are plain MapLibre style JSON (expressions included) that
39
+ * `map.addLayer` accepts verbatim; the caller owns layer ids and source
40
+ * wiring.
41
+ *
42
+ * @experimental
43
+ */
44
+ export interface RendererLayerFragment {
45
+ /**
46
+ * Which part of the renderer this fragment draws. Single-layer renderers
47
+ * emit one `"symbolizer"` fragment; the cluster renderer emits
48
+ * `"clusters"`, `"cluster-count"`, and `"unclustered"` fragments.
49
+ */
50
+ readonly role: "symbolizer" | "clusters" | "cluster-count" | "unclustered";
51
+ /** MapLibre layer type (`circle`, `line`, `fill`, `heatmap`, `symbol`). */
52
+ readonly type: string;
53
+ readonly paint: Record<string, unknown>;
54
+ readonly layout: Record<string, unknown>;
55
+ /** Optional MapLibre filter expression the fragment requires. */
56
+ readonly filter?: unknown;
57
+ }
58
+ /**
59
+ * One legend entry derived from a renderer descriptor. This is a stable
60
+ * contract (issue #497 REQ-005): `label` and `color` are always present;
61
+ * `value` is set for unique-value entries, `minValue`/`maxValue` for ranged
62
+ * entries (class breaks, cluster steps), and heatmap stops carry the ramp
63
+ * position in `value`.
64
+ *
65
+ * @experimental
66
+ */
67
+ export interface RendererLegendItem {
68
+ readonly kind: "class-break" | "unique-value" | "heatmap-stop" | "cluster-step" | "default";
69
+ readonly label: string;
70
+ /** CSS color for the legend swatch. */
71
+ readonly color: string;
72
+ readonly value?: string | number | boolean | null;
73
+ readonly minValue?: number;
74
+ readonly maxValue?: number;
75
+ }
76
+ /** Union of the serializable renderer descriptors. @experimental */
77
+ export type RendererDescriptor = ClassBreaksRendererDescriptor | UniqueValueRendererDescriptor | HeatmapRendererDescriptor | ClusterRendererDescriptor;
78
+ /** Union of the four renderer object kinds. @experimental */
79
+ export type Renderer = ClassBreaksRenderer | UniqueValueRenderer | HeatmapRenderer | ClusterRenderer;
80
+ interface RendererBase<D extends RendererDescriptor> {
81
+ readonly kind: D["kind"];
82
+ /** Serializable descriptor — `rendererFromJSON(renderer.toJSON())` revives it. */
83
+ toJSON(): D;
84
+ /** Legend metadata derived from the descriptor (stable contract, REQ-005). */
85
+ legendItems(): readonly RendererLegendItem[];
86
+ /** Compile MapLibre layer fragments for one geometry kind. Pure and deterministic. */
87
+ toMapLibre(geometry: RendererGeometryType): readonly RendererLayerFragment[];
88
+ }
89
+ /** One graduated class. @experimental */
90
+ export interface ClassBreakEntry {
91
+ /** Inclusive lower bound; used as the MapLibre `step` threshold (`min ?? max`). */
92
+ readonly min?: number;
93
+ readonly max?: number;
94
+ /** Swatch color shorthand; positional `colors` apply when omitted. */
95
+ readonly color?: string;
96
+ readonly label?: string;
97
+ /** Advanced multi-property override; replaces the color shorthand. */
98
+ readonly style?: RendererStyle;
99
+ }
100
+ /** Options for {@link classBreaksRenderer}. @experimental */
101
+ export interface ClassBreaksRendererOptions {
102
+ /** Numeric feature property driving the classification. */
103
+ readonly field: string;
104
+ /** Ordered class breaks (ascending thresholds). */
105
+ readonly breaks: readonly ClassBreakEntry[];
106
+ /** Positional palette applied to breaks without an explicit `color`. */
107
+ readonly colors?: readonly string[];
108
+ /** Color for values below the first threshold (and legend default swatch). */
109
+ readonly defaultColor?: string;
110
+ readonly defaultLabel?: string;
111
+ /** Advanced default override; replaces `defaultColor`. */
112
+ readonly defaultStyle?: RendererStyle;
113
+ /** Force a MapLibre layer type instead of deriving it from geometry. */
114
+ readonly layerType?: string;
115
+ }
116
+ /** Serializable class-breaks descriptor. @experimental */
117
+ export interface ClassBreaksRendererDescriptor extends ClassBreaksRendererOptions {
118
+ readonly kind: "class-breaks";
119
+ }
120
+ /** Class-breaks renderer object. @experimental */
121
+ export interface ClassBreaksRenderer extends RendererBase<ClassBreaksRendererDescriptor> {
122
+ }
123
+ /**
124
+ * Create a graduated (class-breaks) renderer: a `step` expression over a
125
+ * numeric field.
126
+ *
127
+ * @example
128
+ * ```ts
129
+ * const renderer = classBreaksRenderer({
130
+ * field: "magnitude",
131
+ * breaks: [
132
+ * { min: 0, max: 3, label: "Minor" },
133
+ * { min: 3, max: 5, label: "Moderate" },
134
+ * { min: 5, label: "Strong" },
135
+ * ],
136
+ * colors: ["#fed976", "#fd8d3c", "#b10026"],
137
+ * defaultColor: "#cccccc",
138
+ * });
139
+ * const [fragment] = renderer.toMapLibre("point");
140
+ * // fragment.paint["circle-color"] → ["step", ["get", "magnitude"], "#cccccc", 0, "#fed976", …]
141
+ * ```
142
+ *
143
+ * @experimental
144
+ */
145
+ export declare function classBreaksRenderer(options: ClassBreaksRendererOptions): ClassBreaksRenderer;
146
+ /** One categorical class. @experimental */
147
+ export interface UniqueValueEntry {
148
+ readonly value: string | number | boolean;
149
+ readonly color?: string;
150
+ readonly label?: string;
151
+ /** Advanced multi-property override; replaces the color shorthand. */
152
+ readonly style?: RendererStyle;
153
+ }
154
+ /** Options for {@link uniqueValueRenderer}. @experimental */
155
+ export interface UniqueValueRendererOptions {
156
+ /** Feature property driving the categories. */
157
+ readonly field: string;
158
+ /** Optional second/third fields concatenated with `fieldDelimiter`. */
159
+ readonly field2?: string;
160
+ readonly field3?: string;
161
+ /** Delimiter for multi-field matching. @default "," */
162
+ readonly fieldDelimiter?: string;
163
+ readonly values: readonly UniqueValueEntry[];
164
+ /** Fallback color for unmatched values (and legend default swatch). */
165
+ readonly defaultColor?: string;
166
+ readonly defaultLabel?: string;
167
+ /** Advanced default override; replaces `defaultColor`. */
168
+ readonly defaultStyle?: RendererStyle;
169
+ /** Force a MapLibre layer type instead of deriving it from geometry. */
170
+ readonly layerType?: string;
171
+ }
172
+ /** Serializable unique-value descriptor. @experimental */
173
+ export interface UniqueValueRendererDescriptor extends UniqueValueRendererOptions {
174
+ readonly kind: "unique-value";
175
+ }
176
+ /** Unique-value renderer object. @experimental */
177
+ export interface UniqueValueRenderer extends RendererBase<UniqueValueRendererDescriptor> {
178
+ }
179
+ /**
180
+ * Create a categorical (unique-value) renderer: a `match` expression over a
181
+ * feature property (or a delimited concatenation of up to three).
182
+ *
183
+ * @example
184
+ * ```ts
185
+ * const renderer = uniqueValueRenderer({
186
+ * field: "priority",
187
+ * values: [
188
+ * { value: "high", color: "#b91c1c", label: "High priority" },
189
+ * { value: "low", color: "#0f766e", label: "Low priority" },
190
+ * ],
191
+ * defaultColor: "#334155",
192
+ * });
193
+ * renderer.legendItems(); // [{ kind: "unique-value", label: "High priority", … }, …]
194
+ * ```
195
+ *
196
+ * @experimental
197
+ */
198
+ export declare function uniqueValueRenderer(options: UniqueValueRendererOptions): UniqueValueRenderer;
199
+ /** One kernel-density ramp stop (density is 0..1). @experimental */
200
+ export interface HeatmapColorStop {
201
+ readonly stop: number;
202
+ readonly color: string;
203
+ }
204
+ /** Options for {@link heatmapRenderer}. @experimental */
205
+ export interface HeatmapRendererOptions {
206
+ /** Numeric property weighting each point (defaults to weight 1). */
207
+ readonly weightField?: string;
208
+ /** Kernel radius in pixels. @default 30 */
209
+ readonly radius?: number;
210
+ /** Global intensity multiplier. @default 1 */
211
+ readonly intensity?: number;
212
+ /** Layer opacity (0..1). */
213
+ readonly opacity?: number;
214
+ /**
215
+ * Density → color ramp. Either explicit stops or a color list spread
216
+ * evenly across 0..1 (the first color should usually be transparent).
217
+ */
218
+ readonly colorRamp?: readonly HeatmapColorStop[] | readonly string[];
219
+ }
220
+ /** Serializable heatmap descriptor. @experimental */
221
+ export interface HeatmapRendererDescriptor extends HeatmapRendererOptions {
222
+ readonly kind: "heatmap";
223
+ }
224
+ /** Heatmap renderer object. @experimental */
225
+ export interface HeatmapRenderer extends RendererBase<HeatmapRendererDescriptor> {
226
+ }
227
+ /**
228
+ * Create a MapLibre-native heatmap renderer. Compiles to a single `heatmap`
229
+ * layer fragment regardless of the requested geometry (heatmaps render
230
+ * point data).
231
+ *
232
+ * @experimental
233
+ */
234
+ export declare function heatmapRenderer(options?: HeatmapRendererOptions): HeatmapRenderer;
235
+ /** One cluster size class (thresholds are feature counts). @experimental */
236
+ export interface ClusterStep {
237
+ /** Inclusive minimum count for this class; the first step is the base class. */
238
+ readonly threshold: number;
239
+ readonly color: string;
240
+ /** Cluster circle radius in pixels. Defaults to `14 + 6 * index`. */
241
+ readonly radius?: number;
242
+ readonly label?: string;
243
+ }
244
+ /** Options for {@link clusterRenderer}. @experimental */
245
+ export interface ClusterRendererOptions {
246
+ /** Cluster radius in pixels (GeoJSON source `clusterRadius`). @default 50 */
247
+ readonly radius?: number;
248
+ /** Max zoom to cluster at (GeoJSON source `clusterMaxZoom`). @default 14 */
249
+ readonly maxZoom?: number;
250
+ /**
251
+ * Numeric property summed per cluster instead of the raw point count.
252
+ * Adds a `<countField>_sum` cluster property and drives the step/count
253
+ * expressions from it.
254
+ */
255
+ readonly countField?: string;
256
+ /** Ascending count classes driving cluster color/size. */
257
+ readonly steps: readonly ClusterStep[];
258
+ /** Style for unclustered points. @default "#16735b" */
259
+ readonly unclusteredColor?: string;
260
+ /** @default 5 */
261
+ readonly unclusteredRadius?: number;
262
+ }
263
+ /** Serializable cluster descriptor. @experimental */
264
+ export interface ClusterRendererDescriptor extends ClusterRendererOptions {
265
+ readonly kind: "cluster";
266
+ }
267
+ /** Cluster renderer object. @experimental */
268
+ export interface ClusterRenderer extends RendererBase<ClusterRendererDescriptor> {
269
+ /**
270
+ * GeoJSON source options enabling MapLibre-native clustering
271
+ * (`cluster`, `clusterRadius`, `clusterMaxZoom`, `clusterProperties`).
272
+ * Merge these into the GeoJSON source spec that feeds the layers.
273
+ */
274
+ toMapLibreSource(): Record<string, unknown>;
275
+ }
276
+ /**
277
+ * Create a MapLibre-native cluster renderer. Compiles to three fragments —
278
+ * cluster circles, cluster count labels, and unclustered points — plus
279
+ * GeoJSON source cluster options via {@link ClusterRenderer.toMapLibreSource}.
280
+ *
281
+ * @experimental
282
+ */
283
+ export declare function clusterRenderer(options: ClusterRendererOptions): ClusterRenderer;
284
+ /**
285
+ * Revive a renderer object from its serializable descriptor
286
+ * (`renderer.toJSON()` output).
287
+ *
288
+ * @experimental
289
+ */
290
+ export declare function rendererFromJSON(descriptor: RendererDescriptor): Renderer;
291
+ /** True when a value looks like a renderer object from this module. @experimental */
292
+ export declare function isRenderer(value: unknown): value is Renderer;
293
+ /**
294
+ * MapLibre properties that live in `layout` rather than `paint`. Shared with
295
+ * the WebMap converter so both route properties identically.
296
+ *
297
+ * @internal
298
+ */
299
+ export declare const RENDERER_LAYOUT_PROPERTIES: ReadonlySet<string>;
300
+ /** Resolved per-class style used by the shared compiler. @internal */
301
+ export interface ResolvedRendererStyle {
302
+ readonly paint: Record<string, unknown>;
303
+ readonly layout: Record<string, unknown>;
304
+ }
305
+ /** One class entry for the shared compiler. @internal */
306
+ export interface DataDrivenStyleEntry {
307
+ /** Match value (unique value) or step threshold (class breaks). */
308
+ readonly key: unknown;
309
+ readonly style: ResolvedRendererStyle;
310
+ }
311
+ /**
312
+ * The single class-breaks/unique-value property compiler (issue #497
313
+ * REQ-002). For every paint/layout property present on any class it builds
314
+ * one `match` (categorical) or `step` (graduated) expression through the
315
+ * `/expr` builder. When `defaultStyle` is omitted the first entry's style
316
+ * provides per-property defaults; missing values fall back to
317
+ * `"transparent"`.
318
+ *
319
+ * @internal
320
+ */
321
+ export declare function compileDataDrivenStyle(mode: "match" | "step", input: Expr<unknown>, entries: readonly DataDrivenStyleEntry[], defaultStyle: ResolvedRendererStyle | undefined): {
322
+ paint: Record<string, unknown>;
323
+ layout: Record<string, unknown>;
324
+ };
325
+ export {};
326
+ //# sourceMappingURL=renderers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderers.d.ts","sourceRoot":"","sources":["../../../src/style/renderers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,KAAK,IAAI,EASV,MAAM,uBAAuB,CA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