@honua/react 0.1.4-beta.0 → 0.1.9-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 (157) hide show
  1. package/contract/types.d.ts +1 -1
  2. package/contract/types.d.ts.map +1 -1
  3. package/contract/types.js +4 -0
  4. package/control-plane/admin-client.d.ts +87 -0
  5. package/control-plane/admin-client.d.ts.map +1 -0
  6. package/control-plane/admin-client.js +169 -0
  7. package/control-plane/client.d.ts.map +1 -1
  8. package/control-plane/client.js +21 -3
  9. package/control-plane/commands/catalog.d.ts +133 -0
  10. package/control-plane/commands/catalog.d.ts.map +1 -0
  11. package/control-plane/commands/catalog.js +353 -0
  12. package/control-plane/commands/errors.d.ts +96 -0
  13. package/control-plane/commands/errors.d.ts.map +1 -0
  14. package/control-plane/commands/errors.js +130 -0
  15. package/control-plane/commands/identity.d.ts +71 -0
  16. package/control-plane/commands/identity.d.ts.map +1 -0
  17. package/control-plane/commands/identity.js +0 -0
  18. package/control-plane/commands/index.d.ts +39 -0
  19. package/control-plane/commands/index.d.ts.map +1 -0
  20. package/control-plane/commands/index.js +34 -0
  21. package/control-plane/commands/runtime.d.ts +146 -0
  22. package/control-plane/commands/runtime.d.ts.map +1 -0
  23. package/control-plane/commands/runtime.js +318 -0
  24. package/control-plane/commands/types.d.ts +226 -0
  25. package/control-plane/commands/types.d.ts.map +1 -0
  26. package/control-plane/commands/types.js +30 -0
  27. package/control-plane/commands/validate.d.ts +27 -0
  28. package/control-plane/commands/validate.d.ts.map +1 -0
  29. package/control-plane/commands/validate.js +132 -0
  30. package/control-plane/generated/admin-api.d.ts +30263 -0
  31. package/control-plane/generated/admin-api.d.ts.map +1 -0
  32. package/control-plane/generated/admin-api.js +5 -0
  33. package/control-plane/generated/admin-operations.d.ts +4053 -0
  34. package/control-plane/generated/admin-operations.d.ts.map +1 -0
  35. package/control-plane/generated/admin-operations.js +820 -0
  36. package/control-plane/index.d.ts +11 -0
  37. package/control-plane/index.d.ts.map +1 -1
  38. package/control-plane/index.js +8 -0
  39. package/control-plane/types.d.ts +14 -0
  40. package/control-plane/types.d.ts.map +1 -1
  41. package/core/client.d.ts +6 -0
  42. package/core/client.d.ts.map +1 -1
  43. package/core/client.js +12 -10
  44. package/core/credential-redaction.d.ts +163 -0
  45. package/core/credential-redaction.d.ts.map +1 -0
  46. package/core/credential-redaction.js +389 -0
  47. package/core/error-classifications.d.ts +32 -0
  48. package/core/error-classifications.d.ts.map +1 -1
  49. package/core/error-classifications.js +32 -0
  50. package/core/error-code-registry.d.ts +33 -1
  51. package/core/error-code-registry.d.ts.map +1 -1
  52. package/core/error-code-registry.js +32 -0
  53. package/core/errors.d.ts +1 -1
  54. package/core/errors.d.ts.map +1 -1
  55. package/core/geoparquet-sql.d.ts +1 -1
  56. package/core/geoparquet-sql.js +2 -2
  57. package/core/grpc-adapter.d.ts +2 -2
  58. package/core/grpc-adapter.d.ts.map +1 -1
  59. package/core/grpc-adapter.js +30 -6
  60. package/core/job-run-errors.d.ts +10 -0
  61. package/core/job-run-errors.d.ts.map +1 -0
  62. package/core/job-run-errors.js +14 -0
  63. package/core/job-run-lifecycle.d.ts +34 -0
  64. package/core/job-run-lifecycle.d.ts.map +1 -0
  65. package/core/job-run-lifecycle.js +193 -0
  66. package/core/ogc-processes.d.ts +38 -31
  67. package/core/ogc-processes.d.ts.map +1 -1
  68. package/core/ogc-processes.js +123 -173
  69. package/core/process-runner.js +15 -100
  70. package/core/stac.d.ts +2 -1
  71. package/core/stac.d.ts.map +1 -1
  72. package/core/stac.js +29 -11
  73. package/core/surfaces.d.ts +2 -8
  74. package/core/surfaces.d.ts.map +1 -1
  75. package/core/surfaces.js +21 -112
  76. package/core/types.d.ts +22 -8
  77. package/core/types.d.ts.map +1 -1
  78. package/gen/geospatial/v1/common_pb.d.ts +514 -0
  79. package/gen/geospatial/v1/common_pb.d.ts.map +1 -0
  80. package/gen/geospatial/v1/common_pb.js +335 -0
  81. package/gen/geospatial/v1/execution_types_pb.d.ts +1186 -0
  82. package/gen/geospatial/v1/execution_types_pb.d.ts.map +1 -0
  83. package/gen/geospatial/v1/execution_types_pb.js +396 -0
  84. package/gen/geospatial/v1/feature_service_pb.d.ts +403 -0
  85. package/gen/geospatial/v1/feature_service_pb.d.ts.map +1 -0
  86. package/gen/geospatial/v1/feature_service_pb.js +47 -0
  87. package/gen/geospatial/v1/index.d.ts +5 -0
  88. package/gen/geospatial/v1/index.d.ts.map +1 -0
  89. package/gen/geospatial/v1/index.js +9 -0
  90. package/gen/geospatial/v1/spatial_types_pb.d.ts +285 -0
  91. package/gen/geospatial/v1/spatial_types_pb.d.ts.map +1 -0
  92. package/gen/geospatial/v1/spatial_types_pb.js +58 -0
  93. package/gen/geospatial/v1/workspace_artifact_types_pb.d.ts +379 -0
  94. package/gen/geospatial/v1/workspace_artifact_types_pb.d.ts.map +1 -0
  95. package/gen/geospatial/v1/workspace_artifact_types_pb.js +151 -0
  96. package/generated-app/projection.d.ts.map +1 -1
  97. package/generated-app/projection.js +10 -1
  98. package/interactions/declarative-contract.d.ts +149 -0
  99. package/interactions/declarative-contract.d.ts.map +1 -0
  100. package/interactions/declarative-contract.js +293 -0
  101. package/interactions/declarative.d.ts +198 -0
  102. package/interactions/declarative.d.ts.map +1 -0
  103. package/interactions/declarative.js +470 -0
  104. package/interactions/feature-state.d.ts +7 -0
  105. package/interactions/feature-state.d.ts.map +1 -1
  106. package/interactions/feature-state.js +10 -2
  107. package/map/maplibre-target.js +1 -1
  108. package/package.json +2 -2
  109. package/query-planner/grpc.d.ts +4 -4
  110. package/query-planner/grpc.d.ts.map +1 -1
  111. package/query-planner/grpc.js +11 -11
  112. package/query-planner/types.d.ts +4 -4
  113. package/query-planner/types.d.ts.map +1 -1
  114. package/realtime/sse.d.ts.map +1 -1
  115. package/realtime/sse.js +7 -1
  116. package/runtime/errors.d.ts +1 -1
  117. package/runtime/errors.d.ts.map +1 -1
  118. package/runtime/errors.js +2 -0
  119. package/runtime/generated/map-package-schema-meta.d.ts +11 -0
  120. package/runtime/generated/map-package-schema-meta.d.ts.map +1 -0
  121. package/runtime/generated/map-package-schema-meta.js +12 -0
  122. package/runtime/generated/map-package-schema-validator.d.ts +16 -0
  123. package/runtime/generated/map-package-schema-validator.d.ts.map +1 -0
  124. package/runtime/generated/map-package-schema-validator.js +1422 -0
  125. package/runtime/index.d.ts +5 -1
  126. package/runtime/index.d.ts.map +1 -1
  127. package/runtime/index.js +6 -0
  128. package/runtime/map-package-export.d.ts +151 -0
  129. package/runtime/map-package-export.d.ts.map +1 -0
  130. package/runtime/map-package-export.js +636 -0
  131. package/runtime/map-package-validation.d.ts +21 -1
  132. package/runtime/map-package-validation.d.ts.map +1 -1
  133. package/runtime/map-package-validation.js +132 -95
  134. package/runtime/map-package.d.ts +80 -0
  135. package/runtime/map-package.d.ts.map +1 -1
  136. package/runtime/style-compose.d.ts.map +1 -1
  137. package/runtime/style-compose.js +78 -9
  138. package/studio/chart-spec.d.ts +6 -6
  139. package/studio/chart-spec.d.ts.map +1 -1
  140. package/studio/chart-spec.js +6 -6
  141. package/studio/index.d.ts +17 -7
  142. package/studio/index.d.ts.map +1 -1
  143. package/studio/index.js +15 -5
  144. package/studio/lifecycle-client.d.ts +262 -22
  145. package/studio/lifecycle-client.d.ts.map +1 -1
  146. package/studio/lifecycle-client.js +524 -24
  147. package/studio/lifecycle-errors.d.ts +8 -2
  148. package/studio/lifecycle-errors.d.ts.map +1 -1
  149. package/studio/lifecycle-errors.js +6 -1
  150. package/studio/lifecycle-types.d.ts +228 -8
  151. package/studio/lifecycle-types.d.ts.map +1 -1
  152. package/studio/publication-status.d.ts +55 -0
  153. package/studio/publication-status.d.ts.map +1 -0
  154. package/studio/publication-status.js +103 -0
  155. package/gen/honua/v1/feature_service_pb.d.ts +0 -918
  156. package/gen/honua/v1/feature_service_pb.d.ts.map +0 -1
  157. package/gen/honua/v1/feature_service_pb.js +0 -375
@@ -0,0 +1,470 @@
1
+ /**
2
+ * `@honua/sdk-js/interactions/declarative` — compiles a standard
3
+ * `interactions[]` block (geospatial-mcp ADR-0030) onto this SDK's existing
4
+ * imperative binding primitives.
5
+ *
6
+ * The standard constrains the *document*, not the dispatcher: "client
7
+ * runtimes implement dispatch by compiling bindings onto whatever imperative
8
+ * primitives they already have". That is exactly what this module does — it
9
+ * owns no event plumbing of its own, only a compile table from the closed
10
+ * (`on.event`, `do.verb`) vocabulary onto `createSelectionHandler`,
11
+ * `createHoverHandler`, `bindTableSelectionToExploration`,
12
+ * `bindFilterControlsToExploration`, and `subscribeExplorationSelector`.
13
+ *
14
+ * Three properties are load-bearing and asserted by the suite:
15
+ *
16
+ * 1. **Validate before binding.** `compileHonuaInteractions` runs the whole
17
+ * block through {@link validateHonuaInteractions} plus reference
18
+ * resolution against the components it was handed. A block with issues
19
+ * binds *nothing* — the standard rejects over-cap and malformed documents
20
+ * rather than truncating them.
21
+ * 2. **Actions never emit events.** A verb-driven state change must not
22
+ * re-enter the dispatcher. Two mechanisms enforce it: every compiled
23
+ * handler is skipped while an action is in flight (`#dispatching`), and
24
+ * exploration-backed subscriptions run with the view controller's default
25
+ * `includeSelf: false`, so a change this compiler originated is never
26
+ * delivered back to this compiler. There is no cycle detection because
27
+ * there can be no cycle.
28
+ * 3. **Unsupported pairs are named, never dropped.** When a binding's
29
+ * (`on.event`, `do.verb`) pair — or the component behind a ref — has no
30
+ * primitive to compile onto, it lands in
31
+ * {@link HonuaCompiledInteractions.unsupported} with the pair spelled out,
32
+ * so a host can surface a real "this runtime cannot honor that binding"
33
+ * message instead of silently rendering an inert app.
34
+ *
35
+ * @experimental The compiler surface tracks geospatial-mcp ADR-0030 while
36
+ * that ADR is Proposed; the component-adapter shapes may gain fields.
37
+ *
38
+ * @module
39
+ */
40
+ import { sourceFeatureSelectionTarget } from "../exploration/selection.js";
41
+ import { subscribeExplorationSelector } from "../exploration/selectors.js";
42
+ import { bindFilterControlsToExploration, bindTableSelectionToExploration } from "./exploration-bindings.js";
43
+ import { createHoverHandler, createSelectionHandler } from "./feature-state.js";
44
+ import { parseHonuaInteractionRef, resolveHonuaInteractionArgs, validateHonuaInteractions, } from "./declarative-contract.js";
45
+ export * from "./declarative-contract.js";
46
+ // ── Compiler ──────────────────────────────────────────────────
47
+ const EMPTY_RESULT_BASE = { bindings: [], disabled: [] };
48
+ /**
49
+ * Compiles an `interactions[]` block onto live components. Returns disposers;
50
+ * never throws for a bad document — a malformed or over-cap block comes back
51
+ * as `{ ok: false, issues }` with nothing bound.
52
+ */
53
+ export function compileHonuaInteractions(interactions, options) {
54
+ const validation = validateHonuaInteractions(interactions, {
55
+ ...(options.fanOutCap !== undefined ? { fanOutCap: options.fanOutCap } : {}),
56
+ });
57
+ const components = options.components ?? {};
58
+ const declared = Array.isArray(interactions) ? interactions : [];
59
+ const refIssues = validation.ok ? resolveReferenceIssues(declared, components) : [];
60
+ const issues = [...validation.issues, ...refIssues];
61
+ if (issues.length > 0) {
62
+ return {
63
+ ok: false,
64
+ issues,
65
+ ...EMPTY_RESULT_BASE,
66
+ unsupported: [],
67
+ dispose: () => undefined,
68
+ };
69
+ }
70
+ const compiler = new InteractionCompiler(options, components);
71
+ for (const interaction of declared)
72
+ compiler.compile(interaction);
73
+ return compiler.result();
74
+ }
75
+ function resolveReferenceIssues(interactions, components) {
76
+ const issues = [];
77
+ interactions.forEach((interaction, index) => {
78
+ for (const side of ["on", "do"]) {
79
+ const ref = interaction[side].ref;
80
+ if (resolveComponent(ref, components) !== undefined)
81
+ continue;
82
+ issues.push({
83
+ code: "invalid-ref",
84
+ interactionId: interaction.id,
85
+ path: `interactions[${index}].${side}.ref`,
86
+ message: `\`${ref}\` does not resolve to a declared component.`,
87
+ });
88
+ }
89
+ });
90
+ return issues;
91
+ }
92
+ function resolveComponent(ref, components) {
93
+ const parsed = parseHonuaInteractionRef(ref);
94
+ if (!parsed)
95
+ return undefined;
96
+ if (parsed.kind === "map") {
97
+ return components.map ? { kind: "map", id: "map", component: components.map } : undefined;
98
+ }
99
+ const id = parsed.id;
100
+ const table = {
101
+ layer: components.layers,
102
+ widget: components.widgets,
103
+ control: components.controls,
104
+ };
105
+ const component = table[parsed.kind]?.[id];
106
+ if (!component)
107
+ return undefined;
108
+ return { kind: parsed.kind, id, component };
109
+ }
110
+ class InteractionCompiler {
111
+ #view;
112
+ #components;
113
+ #onDispatch;
114
+ #bindings = [];
115
+ #unsupported = [];
116
+ #disabled = [];
117
+ /** Re-entrancy guard: an event delivered while an action runs is dropped (actions never emit events). */
118
+ #dispatching = false;
119
+ #disposed = false;
120
+ constructor(options, components) {
121
+ this.#view = options.view;
122
+ this.#components = components;
123
+ this.#onDispatch = options.onDispatch;
124
+ }
125
+ compile(interaction) {
126
+ if (interaction.disabled === true) {
127
+ this.#disabled.push(interaction.id);
128
+ return;
129
+ }
130
+ const source = resolveComponent(interaction.on.ref, this.#components);
131
+ const target = resolveComponent(interaction.do.ref, this.#components);
132
+ const action = this.#compileAction(interaction, target);
133
+ if (typeof action === "string") {
134
+ this.#reject(interaction, action);
135
+ return;
136
+ }
137
+ const dispose = this.#compileEvent(interaction, source, action);
138
+ if (typeof dispose === "string") {
139
+ this.#reject(interaction, dispose);
140
+ return;
141
+ }
142
+ let released = false;
143
+ this.#bindings.push({
144
+ interactionId: interaction.id,
145
+ on: { ref: interaction.on.ref, event: interaction.on.event },
146
+ do: { ref: interaction.do.ref, verb: interaction.do.verb },
147
+ pair: pairLabel(interaction),
148
+ dispose: () => {
149
+ if (released)
150
+ return;
151
+ released = true;
152
+ dispose();
153
+ },
154
+ });
155
+ }
156
+ result() {
157
+ const bindings = [...this.#bindings];
158
+ return {
159
+ ok: this.#unsupported.length === 0,
160
+ issues: [],
161
+ bindings,
162
+ unsupported: [...this.#unsupported],
163
+ disabled: [...this.#disabled],
164
+ dispose: () => {
165
+ if (this.#disposed)
166
+ return;
167
+ this.#disposed = true;
168
+ for (const binding of bindings)
169
+ binding.dispose();
170
+ },
171
+ };
172
+ }
173
+ #reject(interaction, reason) {
174
+ this.#unsupported.push({
175
+ interactionId: interaction.id,
176
+ on: { ref: interaction.on.ref, event: interaction.on.event },
177
+ do: { ref: interaction.do.ref, verb: interaction.do.verb },
178
+ pair: pairLabel(interaction),
179
+ reason,
180
+ });
181
+ }
182
+ // ── Event side ──────────────────────────────────────────────
183
+ /** Returns a disposer, or a string reason the pair is unsupported. */
184
+ #compileEvent(interaction, source, action) {
185
+ const emit = (payload) => {
186
+ if (this.#disposed || this.#dispatching)
187
+ return;
188
+ this.#dispatching = true;
189
+ try {
190
+ action(payload);
191
+ }
192
+ finally {
193
+ this.#dispatching = false;
194
+ }
195
+ };
196
+ switch (interaction.on.event) {
197
+ case "featureSelect": {
198
+ if (source.kind !== "layer")
199
+ return `\`featureSelect\` is a layer event; \`${interaction.on.ref}\` is not a layer.`;
200
+ const map = source.component.map;
201
+ if (!map)
202
+ return `Layer "${source.id}" declares no \`map\`, so \`featureSelect\` has no primitive to bind to.`;
203
+ const sourceId = source.component.sourceId ?? source.id;
204
+ const handle = createSelectionHandler(map, {
205
+ source: sourceId,
206
+ layer: source.component.layerId ?? source.id,
207
+ ...(source.component.sourceLayer ? { sourceLayer: source.component.sourceLayer } : {}),
208
+ ...(source.component.multiSelect !== undefined ? { multiSelect: source.component.multiSelect } : {}),
209
+ onSelectionTargetsChange: (targets) => emit(featureSelectPayload(sourceId, targets)),
210
+ });
211
+ return () => handle.remove();
212
+ }
213
+ case "featureHover": {
214
+ if (source.kind !== "layer")
215
+ return `\`featureHover\` is a layer event; \`${interaction.on.ref}\` is not a layer.`;
216
+ const map = source.component.map;
217
+ if (!map)
218
+ return `Layer "${source.id}" declares no \`map\`, so \`featureHover\` has no primitive to bind to.`;
219
+ const sourceId = source.component.sourceId ?? source.id;
220
+ const handle = createHoverHandler(map, {
221
+ source: sourceId,
222
+ layer: source.component.layerId ?? source.id,
223
+ ...(source.component.sourceLayer ? { sourceLayer: source.component.sourceLayer } : {}),
224
+ onHoverTargetChange: (hovered) => emit(featureHoverPayload(sourceId, hovered)),
225
+ });
226
+ return () => handle.remove();
227
+ }
228
+ case "selection": {
229
+ if (source.kind !== "widget")
230
+ return `\`selection\` is a widget event; \`${interaction.on.ref}\` is not a widget.`;
231
+ // Compiled onto the table/grid selection primitive: a widget publishes
232
+ // and observes selection through the shared exploration slice.
233
+ const unsubscribe = bindTableSelectionToExploration(this.#view).subscribe((selection) => emit(selectionPayload(selection)));
234
+ return unsubscribe;
235
+ }
236
+ case "change": {
237
+ if (source.kind !== "control")
238
+ return `\`change\` is a control event; \`${interaction.on.ref}\` is not a control.`;
239
+ // Compiled onto the filter-control primitive, keyed by the control's
240
+ // own id — the same key `bindFilterControlsToExploration().setFilter`
241
+ // writes, so a filter bar built on that primitive needs no adapter.
242
+ const controlId = source.id;
243
+ let previous = this.#view.state.filters[controlId];
244
+ const unsubscribe = bindFilterControlsToExploration(this.#view).subscribe((filters) => {
245
+ const clause = filters[controlId];
246
+ if (clause === previous)
247
+ return;
248
+ previous = clause;
249
+ emit(changePayload(controlId, clause, filters));
250
+ });
251
+ return unsubscribe;
252
+ }
253
+ case "viewportChange": {
254
+ if (source.kind !== "map")
255
+ return "`viewportChange` is a map event; only `map` publishes it.";
256
+ // Compiled onto the shared extent slice — the slice
257
+ // `bindMapExtentToExploration` publishes into.
258
+ const unsubscribe = subscribeExplorationSelector(this.#view, "extent", (state) => state.extent, (extent) => emit(viewportPayload(extent)), { fireImmediately: false });
259
+ return unsubscribe;
260
+ }
261
+ }
262
+ }
263
+ // ── Action side ─────────────────────────────────────────────
264
+ /** Returns an action, or a string reason the pair is unsupported. */
265
+ #compileAction(interaction, target) {
266
+ const verb = interaction.do.verb;
267
+ const declaredArgs = interaction.do.args;
268
+ const observe = (args) => {
269
+ this.#onDispatch?.({
270
+ interactionId: interaction.id,
271
+ event: interaction.on.event,
272
+ verb,
273
+ ref: interaction.do.ref,
274
+ args,
275
+ });
276
+ };
277
+ switch (verb) {
278
+ case "setFilter": {
279
+ const setFilter = componentSetFilter(target);
280
+ const filterId = target.kind === "map" ? "map" : target.id;
281
+ return (payload) => {
282
+ const args = resolveHonuaInteractionArgs(declaredArgs, payload);
283
+ const clause = filterClauseFromArgs(args);
284
+ if (setFilter)
285
+ setFilter(clause);
286
+ else if (clause)
287
+ this.#view.setFilter(filterId, clause);
288
+ else
289
+ this.#view.clearFilter(filterId);
290
+ observe(args);
291
+ };
292
+ }
293
+ case "setViewport": {
294
+ if (target.kind !== "map")
295
+ return "`setViewport` targets `map`; no other component accepts it.";
296
+ const component = target.component;
297
+ return (payload) => {
298
+ const args = resolveHonuaInteractionArgs(declaredArgs, payload);
299
+ const viewport = viewportFromArgs(args);
300
+ if (component.setViewport)
301
+ component.setViewport(viewport);
302
+ else
303
+ this.#view.setExtent(extentFromBbox(viewport.bbox));
304
+ observe(args);
305
+ };
306
+ }
307
+ case "selectFeature": {
308
+ if (target.kind === "control")
309
+ return "`selectFeature` has no control-side primitive.";
310
+ const fallbackSourceId = target.kind === "layer" ? (target.component.sourceId ?? target.id) : target.id;
311
+ const selection = bindTableSelectionToExploration(this.#view);
312
+ return (payload) => {
313
+ const args = resolveHonuaInteractionArgs(declaredArgs, payload);
314
+ const featureId = args.featureId ?? args.id;
315
+ if (featureId === undefined || featureId === null) {
316
+ selection.clearSelection();
317
+ observe(args);
318
+ return;
319
+ }
320
+ const sourceId = typeof args.sourceId === "string" ? args.sourceId : fallbackSourceId;
321
+ const target_ = sourceFeatureSelectionTarget(sourceId, featureId);
322
+ selection.select([target_], { replace: args.replace !== false });
323
+ observe(args);
324
+ };
325
+ }
326
+ case "runWidgetQuery": {
327
+ if (target.kind !== "widget")
328
+ return "`runWidgetQuery` targets `widget:{id}`; no other component accepts it.";
329
+ const runQuery = target.component.runQuery;
330
+ if (!runQuery) {
331
+ return `Widget "${target.id}" declares no \`runQuery\`, and there is no exploration-level fallback for \`runWidgetQuery\`.`;
332
+ }
333
+ return (payload) => {
334
+ const args = resolveHonuaInteractionArgs(declaredArgs, payload);
335
+ runQuery(args);
336
+ observe(args);
337
+ };
338
+ }
339
+ case "setVisibility": {
340
+ if (target.kind === "map")
341
+ return "`setVisibility` targets a layer, widget, or control, never `map`.";
342
+ const setVisibility = target.component.setVisibility;
343
+ if (!setVisibility) {
344
+ return `${target.kind === "layer" ? "Layer" : target.kind === "widget" ? "Widget" : "Control"} "${target.id}" declares no \`setVisibility\`.`;
345
+ }
346
+ return (payload) => {
347
+ const args = resolveHonuaInteractionArgs(declaredArgs, payload);
348
+ setVisibility(args.visible !== false);
349
+ observe(args);
350
+ };
351
+ }
352
+ }
353
+ }
354
+ }
355
+ // ── Payload builders ──────────────────────────────────────────
356
+ function featureSelectPayload(sourceId, targets) {
357
+ const first = targets[0];
358
+ return {
359
+ sourceId: first?.sourceId ?? sourceId,
360
+ ...(first ? { featureId: first.id } : {}),
361
+ ...(first?.sourceLayer ? { sourceLayer: first.sourceLayer } : {}),
362
+ targets,
363
+ count: targets.length,
364
+ };
365
+ }
366
+ function featureHoverPayload(sourceId, hovered) {
367
+ return {
368
+ sourceId: hovered?.sourceId ?? sourceId,
369
+ ...(hovered ? { featureId: hovered.id } : {}),
370
+ ...(hovered?.sourceLayer ? { sourceLayer: hovered.sourceLayer } : {}),
371
+ ...(hovered ? { target: hovered } : {}),
372
+ hovering: hovered !== undefined,
373
+ };
374
+ }
375
+ function selectionPayload(selection) {
376
+ const first = selection[0];
377
+ const qualified = typeof first === "object" && first !== null ? first : undefined;
378
+ return {
379
+ targets: selection,
380
+ count: selection.length,
381
+ ...(qualified ? { sourceId: qualified.sourceId, featureId: qualified.id } : {}),
382
+ ...(qualified === undefined && first !== undefined ? { featureId: first } : {}),
383
+ };
384
+ }
385
+ function changePayload(id, clause, filters) {
386
+ return {
387
+ id,
388
+ ...(clause ? { field: clause.field, operator: clause.operator, value: clause.value, clause } : {}),
389
+ filters,
390
+ };
391
+ }
392
+ function viewportPayload(extent) {
393
+ return {
394
+ ...(extent ? { bbox: [extent.xmin, extent.ymin, extent.xmax, extent.ymax], extent } : {}),
395
+ };
396
+ }
397
+ // ── Argument projection ───────────────────────────────────────
398
+ function componentSetFilter(target) {
399
+ if (target.kind === "map")
400
+ return undefined;
401
+ const setFilter = target.component.setFilter;
402
+ return setFilter ? (clause) => setFilter(clause) : undefined;
403
+ }
404
+ const FILTER_OPERATORS = new Set([
405
+ "=",
406
+ "!=",
407
+ "<",
408
+ "<=",
409
+ ">",
410
+ ">=",
411
+ "in",
412
+ "not-in",
413
+ "between",
414
+ "like",
415
+ "is-null",
416
+ "is-not-null",
417
+ ]);
418
+ function filterClauseFromArgs(args) {
419
+ const declared = args.clause;
420
+ if (declared && typeof declared === "object" && !Array.isArray(declared)) {
421
+ const clause = declared;
422
+ if (typeof clause.field === "string") {
423
+ return {
424
+ field: clause.field,
425
+ operator: FILTER_OPERATORS.has(clause.operator) ? clause.operator : "=",
426
+ value: clause.value,
427
+ ...(Array.isArray(clause.appliesTo) ? { appliesTo: clause.appliesTo } : {}),
428
+ };
429
+ }
430
+ }
431
+ if (typeof args.field !== "string")
432
+ return undefined;
433
+ // A `$event.*` path that resolved to nothing clears the filter rather than
434
+ // installing an `= undefined` clause nothing can translate.
435
+ if (args.value === undefined && !isValuelessOperator(args.operator))
436
+ return undefined;
437
+ return {
438
+ field: args.field,
439
+ operator: FILTER_OPERATORS.has(args.operator) ? args.operator : "=",
440
+ value: args.value,
441
+ ...(Array.isArray(args.appliesTo) ? { appliesTo: args.appliesTo } : {}),
442
+ };
443
+ }
444
+ function isValuelessOperator(operator) {
445
+ return operator === "is-null" || operator === "is-not-null";
446
+ }
447
+ function viewportFromArgs(args) {
448
+ const bbox = numberTuple(args.bbox, 4);
449
+ const center = numberTuple(args.center, 2);
450
+ return {
451
+ ...(bbox ? { bbox } : {}),
452
+ ...(center ? { center } : {}),
453
+ ...(typeof args.zoom === "number" ? { zoom: args.zoom } : {}),
454
+ ...(typeof args.pitch === "number" ? { pitch: args.pitch } : {}),
455
+ ...(typeof args.bearing === "number" ? { bearing: args.bearing } : {}),
456
+ };
457
+ }
458
+ function numberTuple(value, length) {
459
+ if (!Array.isArray(value) || value.length !== length)
460
+ return undefined;
461
+ return value.every((entry) => typeof entry === "number" && Number.isFinite(entry))
462
+ ? value
463
+ : undefined;
464
+ }
465
+ function extentFromBbox(bbox) {
466
+ return bbox ? { xmin: bbox[0], ymin: bbox[1], xmax: bbox[2], ymax: bbox[3] } : undefined;
467
+ }
468
+ function pairLabel(interaction) {
469
+ return `${interaction.on.event} -> ${interaction.do.verb}`;
470
+ }
@@ -61,6 +61,13 @@ export interface HoverHandlerOptions {
61
61
  stateKey?: string;
62
62
  /** Source layer (required for vector-tile sources). */
63
63
  sourceLayer?: string;
64
+ /**
65
+ * Called whenever the hovered feature changes, with the source-qualified
66
+ * target or `undefined` when the pointer leaves the layer. Mirrors
67
+ * {@link SelectionHandlerOptions.onSelectionTargetsChange} so a hover, like
68
+ * a selection, can be published without re-reading `hoveredId` on a timer.
69
+ */
70
+ onHoverTargetChange?: (hovered: SourceQualifiedFeatureSelectionTarget | undefined) => void;
64
71
  }
65
72
  /** Handle returned by {@link createHoverHandler} for cleanup. */
66
73
  export interface HoverHandle {
@@ -1 +1 @@
1
- {"version":3,"file":"feature-state.d.ts","sourceRoot":"","sources":["../../../src/interactions/feature-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,yBAAyB,CAAC;AAIrF,8EAA8E;AAC9E,MAAM,WAAW,eAAe;IAC9B,eAAe,CACb,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,EACrE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,IAAI,CAAC;IACR,eAAe,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC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,MAAM,CAAC;IAClB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uDAAuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,IAAI,CAAC;IAC/D,8DAA8D;IAC9D,wBAAwB,CAAC,EAAE,CAAC,eAAe,EAAE,aAAa,CAAC,qCAAqC,CAAC,KAAK,IAAI,CAAC;CAC5G;AAED,qEAAqE;AACrE,MAAM,WAAW,eAAe;IAC9B,4DAA4D;IAC5D,MAAM,IAAI,IAAI,CAAC;IACf,iDAAiD;IACjD,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IACnD,sDAAsD;IACtD,QAAQ,CAAC,eAAe,EAAE,aAAa,CAAC,qCAAqC,CAAC,CAAC;IAC/E,4CAA4C;IAC5C,cAAc,IAAI,IAAI,CAAC;IACvB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAClC,iDAAiD;IACjD,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CACrC;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,cAAc,EAAE,OAAO,EAAE,uBAAuB,GAAG,eAAe,CAkF7G"}
@@ -50,23 +50,31 @@ export function removeFeatureState(map, source, id, key, sourceLayer) {
50
50
  * ```
51
51
  */
52
52
  export function createHoverHandler(map, options) {
53
- const { source, layer, stateKey = "hover", sourceLayer } = options;
53
+ const { source, layer, stateKey = "hover", sourceLayer, onHoverTargetChange } = options;
54
54
  let hoveredId;
55
55
  function onMouseMove(...args) {
56
56
  const e = args[0];
57
57
  const featureId = e?.features?.[0]?.id;
58
58
  if (featureId === undefined || featureId === null)
59
59
  return;
60
- if (hoveredId !== undefined && hoveredId !== featureId) {
60
+ const changed = hoveredId !== featureId;
61
+ if (hoveredId !== undefined && changed) {
61
62
  map.setFeatureState({ source, id: hoveredId, sourceLayer }, { [stateKey]: false });
62
63
  }
63
64
  hoveredId = featureId;
64
65
  map.setFeatureState({ source, id: hoveredId, sourceLayer }, { [stateKey]: true });
66
+ // Feature-state is re-set idempotently on every mousemove (unchanged
67
+ // behavior); the callback fires only on an actual hover *change* so a
68
+ // declarative binding sees one event per hovered feature, not one per
69
+ // pointer sample.
70
+ if (changed)
71
+ onHoverTargetChange?.(sourceFeatureSelectionTarget(source, featureId, { sourceLayer }));
65
72
  }
66
73
  function onMouseLeave() {
67
74
  if (hoveredId !== undefined) {
68
75
  map.setFeatureState({ source, id: hoveredId, sourceLayer }, { [stateKey]: false });
69
76
  hoveredId = undefined;
77
+ onHoverTargetChange?.(undefined);
70
78
  }
71
79
  }
72
80
  map.on("mousemove", layer, onMouseMove);
@@ -89,7 +89,7 @@ export function createHonuaMapLibreStyle(options = {}) {
89
89
  ...(options.name ? { name: options.name } : {}),
90
90
  ...(options.center ? { center: options.center } : {}),
91
91
  ...(options.zoom !== undefined ? { zoom: options.zoom } : {}),
92
- metadata: options.basemap ? { "honua:arcgis-basemap": options.basemap } : undefined,
92
+ ...(options.basemap ? { metadata: { "honua:arcgis-basemap": options.basemap } } : {}),
93
93
  sources,
94
94
  layers,
95
95
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@honua/react",
3
- "version": "0.1.4-beta.0",
3
+ "version": "0.1.9-beta.0",
4
4
  "description": "React bindings for the Honua SDK: provider, hooks, and map components",
5
5
  "keywords": [
6
6
  "gis",
@@ -34,7 +34,7 @@
34
34
  "@maplibre/maplibre-gl-style-spec": "^24.7.0"
35
35
  },
36
36
  "peerDependencies": {
37
- "@honua/sdk": "0.1.4-beta.0",
37
+ "@honua/sdk": "0.1.9-beta.0",
38
38
  "react": "^18.2.0 || ^19.0.0",
39
39
  "react-dom": "^18.2.0 || ^19.0.0",
40
40
  "maplibre-gl": "^5.0.0 || ^6.0.0"
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Compile canonical query IR to a deterministic, inspectable description of the
3
- * `honua.v1.FeatureService/QueryFeatures` unary gRPC request — without pulling
3
+ * `geospatial.v1.FeatureService/QueryFeatures` unary gRPC request — without pulling
4
4
  * the `@bufbuild/protobuf` runtime into the planner graph.
5
5
  *
6
6
  * The compiled object mirrors the generated `QueryFeaturesRequest` message
@@ -67,7 +67,7 @@ export interface SemanticGrpcCompiledQueryV1 {
67
67
  readonly dialect: "honua-grpc";
68
68
  readonly schemaFingerprint: SourceSchemaV2["fingerprint"];
69
69
  readonly queryFingerprint: `sha256:${string}`;
70
- readonly service: "honua.v1.FeatureService";
70
+ readonly service: "geospatial.v1.FeatureService";
71
71
  readonly method: "QueryFeatures";
72
72
  readonly serviceId: string;
73
73
  readonly layerId: number;
@@ -76,8 +76,8 @@ export interface SemanticGrpcCompiledQueryV1 {
76
76
  readonly returnGeometry: boolean;
77
77
  readonly outSr?: SemanticGrpcSpatialReference;
78
78
  readonly orderBy?: string;
79
- readonly resultOffset?: number;
80
- readonly resultRecordCount?: number;
79
+ readonly resultOffsetLong?: string;
80
+ readonly resultRecordCountLong?: string;
81
81
  readonly spatialFilter?: {
82
82
  readonly geometry: SemanticGrpcGeometry;
83
83
  readonly spatialRelationship: SemanticGrpcSpatialRelationship;
@@ -1 +1 @@
1
- {"version":3,"file":"grpc.d.ts","sourceRoot":"","sources":["../../../src/query-planner/grpc.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EAGV,oBAAoB,EAKpB,cAAc,EACf,MAAM,uBAAuB,CAAC;AAK/B,OAAO,EAEL,KAAK,yBAAyB,EAM/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAe,aAAa,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,KAAK,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