Honua Web Components
Native application path: gRPC for live data and edits; PMTiles, GeoParquet and COG through the CDN. Start there for browser gRPC-Web setup, signed private URLs and regeneration after changes. OGC API and GeoServices REST examples below are compatibility workflows.
@honua/app-platform/web-components registers framework-neutral custom elements for
plain TypeScript applications:
honua-maphonua-layer-listhonua-legendhonua-feature-tablehonua-searchhonua-editorhonua-feature-editor(production tier — see below)honua-charthonua-basemap-controlhonua-bookmarkshonua-locate-controlhonua-measure-controlhonua-sketch-controlhonua-print-exporthonua-map-statushonua-action-panelhonua-time-slider(binds to acreateTemporalPlaybackcontroller)
Import the subpath once in a browser module. The module auto-registers the
elements when customElements is available and also exports
defineHonuaWebComponents() for scoped registries.
import {
createHonuaWebComponentController,
defineHonuaWebComponents,
} from "@honua/app-platform/web-components";
defineHonuaWebComponents();
const controller = createHonuaWebComponentController({
mapPackage,
featuresBySource: {
incidents: incidentFeatures,
},
});
document.querySelector("honua-map")!.controller = controller;
Supported application shell
The canonical @honua/app-platform/web-components package exposes one
supported, versioned application context for the whole component suite.
import { createHonuaApplicationContext, mountHonuaApplication } from "@honua/app-platform/web-components";
const context = createHonuaApplicationContext({
binding: { source: incidents, sourceIdentity: "incidents", plan: acceptedPlan },
authorization: { status: "authorized", principalId: "operator-17", scopes: ["incidents:read"] },
locale: { locale: "ar", direction: "rtl" },
theme: { accent: "#005ea8", colorScheme: "light dark" },
});
const application = await mountHonuaApplication({
host: document.querySelector("main")!,
context,
});
// Source or authorization replacement synchronously clears principal-bound
// selection/edit state and aborts work owned by the previous identity.
context.replaceBinding({ source: parcels, sourceIdentity: "parcels" });
// Release the observer, component bindings, listeners, and owned resources.
application.dispose();
mountHonuaApplication() registers the canonical suite once, binds existing
and later honua-* descendants through their applicationContext property,
and disconnects removed descendants. Components can implement the optional
honuaApplicationContextConnected, honuaApplicationContextChanged, and
honuaApplicationContextDisconnected lifecycle callbacks. The shell owns no
result cache. runSharedRequest() only deduplicates in-flight work, and source,
plan, or authorization invalidation aborts that work before the new identity is
published.
The supported status vocabulary is idle, loading, ready, empty,
stale, degraded, unauthorized, unsupported, offline, and failed.
statusPresentation() gives every component the same localized label,
role, aria-live, busy, and recovery semantics. Changes use the supported
honua-application-context-change, honua-application-status-change, and
honua-application-diagnostic events. Component-specific properties and
events remain at the production or survival tier recorded in the catalog;
experimental adapters remain explicitly opt-in.
Locale packs are scoped to a context and cover status messages plus
Intl.NumberFormat / Intl.DateTimeFormat / unit defaults. The mount projects
lang and dir (including RTL) on its host. Theme tokens map to the existing
--honua-ui-* properties, while mount-local tokens override context tokens.
Neither locale nor theme uses global mutable state, and disposal restores the
host's original attributes and token values.
honua-map owns a MapLibre GL JS map for package and controller bindings.
Import MapLibre's CSS in browser demos, then pass either an inline HonuaMapDocument,
a hosted package URL, or a controller whose state contains a package. MapLibre
6 bundler hosts must configure the ESM worker before the element creates its
map; for Vite:
import { setWorkerUrl } from "maplibre-gl";
import maplibreWorkerUrl from "maplibre-gl/dist/maplibre-gl-worker.mjs?worker&url";
setWorkerUrl(maplibreWorkerUrl);
<honua-map id="map" package-url="/fixtures/response-map-package.json"></honua-map>
const map = document.querySelector("honua-map")!;
map.mapPackage = mapPackage;
map.controller = createHonuaWebComponentController({ mapPackage });
If an application already created a HonuaMapRuntime, adapt it through
the existing controller bridge and bind that controller to the element:
import { createHonuaWebComponentControllerFromRuntime } from "@honua/app-platform/web-components";
document.querySelector("honua-map")!.controller = createHonuaWebComponentControllerFromRuntime(runtime);
Sibling controls bind to the same controller with for="<map-id>".
<honua-map id="map"></honua-map>
<honua-layer-list for="map"></honua-layer-list>
<honua-legend for="map"></honua-legend>
<honua-feature-table for="map" source="incidents"></honua-feature-table>
<honua-search for="map" source="incidents"></honua-search>
<honua-basemap-control for="map"></honua-basemap-control>
<honua-bookmarks
for="map"
bookmarks='[{"id":"north","label":"North district","viewport":{"center":[-157.86,21.3],"zoom":12}}]'
></honua-bookmarks>
<honua-locate-control for="map"></honua-locate-control>
The controller contract is intentionally small so this package can integrate
with the runtime today and a richer HonuaController later. Use
createHonuaWebComponentControllerFromRuntime(runtime) when a
HonuaMapRuntime already owns the map document and layer operations.
Components dispatch typed custom events:
honua-controller-readyhonua-map-readyhonua-map-errorhonua-map-clickhonua-map-hoverhonua-layer-visibility-changehonua-selection-changehonua-viewport-changehonua-filter-changehonua-searchhonua-edit-changehonua-feature-edit-changehonua-feature-edit-commithonua-basemap-changehonua-bookmark-changehonua-locate-changehonua-measure-changehonua-sketch-changehonua-time-changehonua-time-playback-changehonua-exporthonua-fullscreen-changehonua-action
Styling is scoped to each component's shadow root and can be themed with CSS
custom properties such as --honua-ui-bg, --honua-ui-fg,
--honua-ui-border, and --honua-ui-accent.
Controller state drives the renderer after initialization. Layer
visibility updates call the runtime layer API, viewport updates call
setViewState, selection updates set the selected feature-state key,
and controller.setFeatureState() / removeFeatureState() apply
source-qualified feature-state patches to the MapLibre map.
Expanded Map Controls
The expanded controls are framework-neutral siblings of honua-map. They bind
with the same for="<map-id>" convention and dispatch typed custom events so
applications can connect richer adapters later without replacing markup.
<honua-map id="map"></honua-map>
<honua-basemap-control for="map"></honua-basemap-control>
<honua-bookmarks for="map"></honua-bookmarks>
<honua-locate-control for="map"></honua-locate-control>
<honua-measure-control for="map"></honua-measure-control>
<honua-sketch-control for="map"></honua-sketch-control>
<honua-print-export for="map" title="Operations map"></honua-print-export>
<honua-map-status for="map" attribution="Honua"></honua-map-status>
<honua-action-panel
for="map"
actions='[{"id":"refresh","label":"Refresh sources"}]'
></honua-action-panel>
honua-basemap-control lists background layers and layers with
metadata.basemap === true. Selecting a basemap toggles those layer
visibilities through the shared controller and emits honua-basemap-change.
honua-bookmarks always includes the package initialView as Home when it
is available. Additional bookmarks can be supplied as a JSON array through the
bookmarks attribute. Activating a bookmark calls controller.setViewport()
and emits both honua-bookmark-change and honua-viewport-change.
honua-locate-control uses a configured latitude / longitude pair when
present, otherwise it requests browser geolocation. If neither path is
available it renders an explicit unsupported state and emits
honua-locate-change with status: "unsupported".
<honua-locate-control for="map" track show-position></honua-locate-control>
trackwatches the position instead of taking one fix. The first fix centers the map; later fixes move only the marker. The button becomes a pressed "Stop tracking" toggle while the watch runs (stopTracking()ends it from code).show-positiondraws a position marker and, when the fix reports one, an accuracy ring (a circle of the reported accuracy in metres) on the bound MapLibre map: themapproperty, or thehonua-map-readymap of thefortarget.- Every fix fires
honua-locate-positionwith{ position: { longitude, latitude, accuracy?, timestamp? }, tracking };honua-locate-changecarries the samepositiononready. element.sortByDistance(features)(or the standalonesortFeaturesByDistance(features, position)) returns{ feature, distanceMeters }entries nearest first. Points measure exactly, lines and polygons to their nearest vertex, GeoJSON and GeoServices geometries alike; features without geometry sort last.- Denied, unavailable and timed-out requests render a visible status, mark
the panel
data-locate-reason="denied" | "unavailable" | "timeout", and report the samereasononhonua-locate-change. Localize them with thedenied,positionUnavailableandtimeoutmessages.
honua-measure-control and honua-sketch-control expose accessible mode
buttons and typed events (honua-measure-change, honua-sketch-change). Until
a geometry editing or measurement adapter is attached to the shared controller,
they render visible unsupported messaging instead of disappearing.
honua-sketch-control snapping uses the same engine as the feature editor.
Set snappingOptions to a partial SnappingConfig (enabled, tolerance in
pixels, or its alias distance, kinds, sources); snapping stays off unless
enabled is true. The control snaps the vertices it places with
addVertex() to the vertices and edges already in the sketch, and hands the
resolved config to the controller's sketch provider through
HonuaSketchProvider.setSnapping, so a terra-draw provider can pass it to
createTerraDrawSnapping({ index, config }) for vertex, edge, and feature
snapping on the map.
honua-print-export emits honua-export for print, snapshot, and JSON export
actions. Browser print calls window.print() when available. Snapshot and state
export fail closed until an application supplies an export adapter — see
Secure export below.
honua-map-status displays an approximate scale, attribution text, and a
fullscreen action. Fullscreen emits honua-fullscreen-change and renders an
unsupported event when the browser does not expose requestFullscreen().
honua-action-panel renders application-defined action buttons from an
actions JSON array and emits honua-action. Empty panels render a visible
unsupported state so apps do not appear to lose configured controls.
Indicator
honua-indicator shows one figure from an aggregate statistic watched with
watchAnalyticsStatistic() (@honua/sdk-js/analytics), so it reads the same
linked state as the charts. Set statistic to the watch and, optionally,
comparison to a second watch (for example the whole-layer figure beside an
in-view one) to show the share.
<honua-indicator id="parcels" label="Parcels in view" unit="parcels"></honua-indicator>
const indicator = document.querySelector("honua-indicator")!;
indicator.statistic = inView;
indicator.comparison = total;
Attributes: label (defaults to the artifact title or measure label), unit
and locale (number formatting). The rendered section carries
data-state="unbound|loading|empty|error|ready" and aria-busy while loading;
the figure is a polite live region and failures render as an alert. messages
(HonuaIndicatorMessages) replaces every visible string, including the
comparison line. Style it through the indicator, label, value,
comparison and status parts. The element subscribes while connected and
never disposes the watches it was given.
Nearby
honua-nearby answers "what is near this place". It takes its origin from
honua-search (honua-geocode-select) and honua-locate-control
(honua-locate-change) by default; add click to origin-events to follow
honua-map-click too, or set the origin property (WGS84
[longitude, latitude]) directly.
<honua-nearby label="Near this property" origin-events="search locate click" isochrone-minutes="5,10"></honua-nearby>
<honua-directions></honua-directions>
const nearby = document.querySelector("honua-nearby")!;
nearby.layers = [
{ id: "schools", title: "Schools", source: schools, titleField: "name", limit: 3, searchRadiusMeters: 3000 },
{ id: "parks", title: "Parks", source: parks, titleField: "park_name" },
];
nearby.routing = valhallaRoutingProvider({ baseUrl }); // optional
nearby.directions = document.querySelector("honua-directions")!;
nearby.map = mapElement.map;
nearby.addEventListener("honua-nearby-select", (event) => console.log(event.detail.result));
Each layer is queried once (twice where it crosses the antimeridian) with a bounded envelope around the origin
(searchRadiusMeters, default 2000; maxCandidates, default 200) and the
closest limit (default 3) features are listed with straight-line distance.
Points are measured exactly; lines and polygons to their nearest vertex, and a
polygon containing the origin is at zero. With a routing provider each result
also carries its route and travel time, and rank-by="travel-time" orders by
it. Without one the control says the distances are straight-line. A layer that
fails reports its own error while the others still list results.
Selecting a result emits honua-nearby-select ({ origin, result }), gives the
route to directions and draws it on map. isochrone-minutes requests
travel-time areas through requestIsochrone() when the provider supports them;
they are drawn on map and reported on honua-nearby-change
({ status, origin, layers, isochrones?, isochroneError?, error? }).
findNearbyFeatures(origin, layers, { routing, rankBy, signal }) is the same
search without the element. messages (HonuaNearbyMessages) replaces every
visible string and the distance and travel-time formats; locale sets number
formatting.
Add data
honua-add-data lets an app user drop or choose a file, or paste a URL, and see
it on the map and in honua-layer-list for this session only. Files are read in
the browser and URLs are only downloaded; nothing is uploaded, and nothing is
kept after the page closes.
<honua-map id="map"></honua-map>
<honua-layer-list for="map"></honua-layer-list>
<honua-add-data for="map"></honua-add-data>
import { createGeoparquetSessionReader } from "@honua/sdk-js/geoparquet";
const addData = document.querySelector("honua-add-data")!;
addData.geoparquet = createGeoparquetSessionReader(); // only needed for GeoParquet
addData.pmtiles = PMTiles; // `import { PMTiles } from "pmtiles"`; bundled apps need it for PMTiles
addData.limits = { maxBytes: 20 * 1024 * 1024, maxFeatures: 20_000 };
addData.addEventListener("honua-add-data-change", (event) => console.log(event.detail));
| Input | File | URL |
|---|---|---|
GeoJSON (.geojson, .json) |
read locally | downloaded with GET, credentials omitted |
CSV with lat/latitude/y and lon/lng/longitude/x columns (.csv) |
read locally | downloaded |
GeoParquet (.parquet, .geoparquet) |
read in DuckDB-WASM through geoparquet |
read in DuckDB-WASM by URL |
PMTiles (.pmtiles) |
drawn from an object URL | drawn by URL (pmtiles://) |
for resolves the map and controller from a honua-map when data is added, so
the panel can connect before the map is ready; map and controller can also
be set directly. A layer is removed from the map it was drawn on, and an add
still reading when the panel is removed draws nothing. Each layer is one GeoJSON source with
fill, line and circle layers (or one vector layer set per PMTiles source layer,
or a raster layer), added to the controller with metadata.session: true.
Visibility and opacity changes from the layer list apply to all of its style
layers; session layers draw above the map package and are not reordered.
Limits default to 50 MiB and 50,000 features (DEFAULT_SESSION_DATA_LIMITS).
The byte limit applies to data read into memory: GeoJSON, CSV and local
GeoParquet files are refused before they are read, and GeoJSON and CSV downloads
stop at the limit. PMTiles archives (files and URLs) and GeoParquet URLs are read
by range requests as the map or DuckDB needs them, so only the feature limit
applies to GeoParquet. GeoJSON must use WGS84 longitude/latitude, with lines of at
least two positions and closed polygon rings; CSV rows without valid coordinates
are skipped and counted, and a stray quote in a field is refused. Every failure is reported as a
HonuaSessionDataError with a code (unsupported-format, too-large,
too-many-features, invalid-content, invalid-url, unreachable,
reader-missing, map-unavailable) on honua-add-data-change
({ status, layer?, error? }) and in the status line; nothing throws to the
page. addFile(), addUrl() and removeLayer() drive it from code, and
readSessionDataFile() / readSessionDataUrl() read data without the element.
messages (HonuaAddDataMessages) replaces every visible string.
Measurement
honua-measurement measures distance and area directly on a MapLibre map, with
no drawing provider. Click (or tap) adds a vertex; double-click or Finish
completes the sketch; Escape or Cancel discards it.
<honua-map id="map"></honua-map>
<honua-measurement
for="map"
unit="miles"
area-unit="acres"
precision="2"
fidelity="planar"
planar-crs="EPSG:3857"
></honua-measurement>
| Attribute / property | Values | Default |
|---|---|---|
unit / unit |
auto, meters, kilometers, feet, yards, miles, nauticalmiles |
auto (m / km by magnitude) |
area-unit / areaUnit |
auto, square-meters, hectares, square-kilometers, square-feet, acres, square-miles |
auto (m² / ha / km²) |
precision / precision |
integer 0–20 |
per-unit default |
fidelity / fidelity |
geodesic, planar |
geodesic |
planar-crs / planarCrs |
local (flat-earth meters around the sketch), EPSG:3857 (Web Mercator meters, not scale-corrected) |
local |
Unknown values fall back to the default. Changing a unit or precision only reformats the canonical result; changing fidelity or the planar CRS recomputes it from the drawn vertices.
The honua-measure-change event carries plain data with no renderer types:
result.coordinates are WGS84 [lng, lat] (the element's crs), distance is
in meters and area in square meters, and result.crs names the frame they
were measured in (EPSG:4326 for geodesic results). A line that crosses the
antimeridian is measured the short way in every frame. Vertices that are not
finite, or whose latitude is outside ±90°, are rejected. An area outline that
crosses itself sets result.invalid to "self-intersecting-ring" and reports
no area.
While a mode is active the element claims the map pointer: clicks that land on
a feature still dispatch honua-map-click, but they do not change the shared
selection that tables, inspectors, and editors are bound to. Removing the
element releases every map listener, the sketch overlay, and the double-click
zoom suspension. Double-click zoom is only turned back on if it was on before
measuring started.
Custom Elements Manifest. @honua/app-platform publishes
custom-elements.json, advertised through its customElements package key.
React. React 19 binds custom elements natively, so no wrapper is needed.
Props that are element properties (map, unit, precision, planarCrs, …)
are assigned as properties, and onhonua-measure-change becomes an event
listener. For typed JSX, declare the tag once in your app:
import type { HonuaMeasureChangeDetail, HonuaMeasurementElement } from "@honua/app-platform/web-components";
declare module "react" {
namespace JSX {
interface IntrinsicElements {
"honua-measurement": Partial<
Pick<HonuaMeasurementElement, "map" | "unit" | "areaUnit" | "precision" | "fidelity" | "planarCrs">
> & {
ref?: React.Ref<HonuaMeasurementElement>;
"onhonua-measure-change"?: (event: CustomEvent<HonuaMeasureChangeDetail>) => void;
};
}
}
}
Time slider
honua-time-slider is a view over the headless temporal playback controller
(createTemporalPlayback from @honua/sdk-js/map). It owns no
window state and no timer of its own: every gesture becomes one controller
call, and every rendered value comes back from the controller's own tick /
play / pause / end events. Layered over a realtime source the controller
keeps its snapshot-plus-delta semantics unchanged, because the element adds
nothing between the controller and its filter sinks.
It binds through a property rather than for="<map-id>", because the thing it
drives is the controller, not the map:
<honua-map id="map"></honua-map>
<honua-time-slider id="time" label="Incident time"></honua-time-slider>
import { createTemporalPlayback } from "@honua/sdk-js/map";
import "@honua/app-platform/web-components";
const playback = createTemporalPlayback({
handle: mountedSource, // or `layer: { map, layerIds }`
timeField: "event_time",
extent: ["2026-06-01T00:00:00Z", "2026-07-01T00:00:00Z"],
windowMs: 24 * 60 * 60 * 1000,
stepMs: 24 * 60 * 60 * 1000,
});
document.querySelector("honua-time-slider")!.playback = playback;
Attributes: label, speeds (comma-separated rate multipliers, default
0.5,1,2,4), window-presets, histogram-buckets, autoplay, and
unavailable-reason. Set unavailable-reason when the
mounted source has no usable temporal metadata: the panel still renders, names
the reason, and disables every transport control rather than offering a
scrubber that cannot move anything. The speed control is hidden entirely when
the bound controller exposes no setSpeed.
Window presets: window-presets lists the window lengths a preset control
offers, each a number with an optional unit (ms, s, m, h, d, w; a
bare number is milliseconds), plus all for one window over the whole extent:
<honua-time-slider label="Incident time" window-presets="1d,7d,all"></honua-time-slider>
Presets go through the controller's setWindow, so they render only when the
bound controller has one (createTemporalPlayback does). Choosing all
pauses playback and disables step, play and the scrubber until a fixed preset
is chosen again. windowPreset reads the preset matching the current window,
selectWindowPreset(preset) applies one, and honua-time-change reports
source: "preset" plus the matching preset.
Histogram: assign histogram (an array of { start, end, count } bins in
epoch milliseconds) or histogramCounter (a callback that receives
histogram-buckets equal buckets over the extent, default 24, and an
AbortSignal, and returns one count per bucket). Bars are drawn above the
scrubber, the bars the window overlaps are highlighted, and the scrubber's
accessible description reads "N of M features in the periods this window
overlaps" (whole bins, so N can exceed the window's exact count;
messages.histogramSummary overrides it). A newer request aborts an older
one. When the callback fails or returns the wrong number of counts, no bars are
drawn and honua-time-histogram-change carries the error.
const slider = document.querySelector("honua-time-slider")!;
slider.histogramCounter = async (buckets, signal) =>
Promise.all(buckets.map((bucket) => countIncidents(bucket.start, bucket.end, signal)));
Playback events: honua-time-playback-change fires on play, pause, end
(ended: true), rate changes, binding, a controller apply failure (error)
and a declined autoplay (autoplaySuppressed: true). The autoplay
attribute starts playback once a controller is bound, except when the user
prefers reduced motion, where playback waits for an explicit Play. The element
itself declares no transitions or animations.
createTemporalPlayback remains @experimental.
The scrubber follows the WAI-ARIA slider pattern — role="slider" with
aria-valuemin / aria-valuemax / aria-valuenow in epoch milliseconds, a
readable aria-valuetext naming the window, and a single tab stop. Keyboard:
Arrow keys step one window (the inline axis mirrors under dir="rtl"), Page
Up / Page Down move ten steps, Home / End jump to the first / last window.
TimeSliderCompat from @honua/sdk-client-compat mounts this element into its
ArcGIS-style container once the application has called
registerHonuaWidgetKit(); without a registered kit the shim stays
state-model-only, exactly as before.
Secure export
Print, snapshot, and sanitized-state export all run through one explicit
adapter contract. There is deliberately no ambient fallback for
snapshot or state export: reading renderer pixels needs a canvas the application
created with preserveDrawingBuffer: true and is authorized to read, and
serializing "the current state" would otherwise carry the signed tile URLs,
Authorization headers, SAS query strings, and OAuth scope detail that made the
map work. With no adapter, both fail closed — no bytes at all, and a
HonuaCapabilityNotSupportedError on the result — rather than degrading into a
blank image or a partially credentialed JSON file. Browser print keeps working
without an adapter because window.print() reads no pixels and serializes no
state.
import {
createHonuaExportAdapter,
runHonuaExport,
} from "@honua/app-platform/web-components";
const adapter = createHonuaExportAdapter({
id: "operations-console",
snapshot: { getCanvas: () => map.getCanvas() },
state: true,
});
// Wire it to the element...
document.querySelector("honua-print-export")!.exportAdapter = adapter;
// ...or drive an export directly.
const result = await runHonuaExport({ kind: "snapshot", adapter, state });
if (result.status === "ready") {
download(result.bytes!, result.filename!);
}
await result.release(); // always safe to call once; `bytes` stay valid
Every export is redacted by default in two independent layers: the state
document is an allowlist projection (a field nobody allowlisted has no path
into the output, so upstream state growth cannot silently widen an export), and
everything that survives is then scrubbed and re-scanned. A credential reaching
the final scan is a hard failure, not a silent scrub. The same treatment applies
to download filenames, to the adapter-supplied media type (validated against a
strict type/subtype grammar with an allowlisted parameter set, so
text/plain; token=… cannot ride out on the result), and to every message
placed on a honua-export event or a log line — a token disclosed through a
filename is exactly as disclosed as one in the payload. Binary artifacts are
scanned too: "binary" is not a security boundary, so printable runs are
extracted from every byte payload and swept, catching a token inside a PNG
tEXt chunk, a JPEG comment, or PDF/XMP metadata.
Attribution, licence notices, scale, export timestamp, data freshness, and
fidelity warnings travel with every artifact. Whether the artifact's bytes
carry the attribution is tracked separately as provenanceEmbedded, because
conflating the two is how an unattributed image ships: reading a WebGL canvas
captures the map's pixels and nothing else, since MapLibre renders attribution
as DOM outside the canvas. An adapter that does not composite attribution must
not claim it did, so the result reports provenanceEmbedded: false and carries
an explicit fidelity warning naming what the caller has to present alongside the
artifact. Pass requireEmbeddedProvenance: true to turn that into a hard
failure when the artifact will travel on its own with no surrounding surface to
carry the notice.
Production Feature Table (bounded query + linked state)
honua-feature-table has two lanes and renders the same accessible WAI-ARIA
grid in both.
The controller lane is the original behavior: with no engine attached the element asks the shared controller for one bounded page and renders it. Nothing about that markup or its events changed.
The bounded lane is for operational applications. Assign the element's
table property a bounded engine created with createHonuaFeatureTable. The
engine owns remote paging, multi-column sort, typed filters, column semantics,
budgets, virtualization, bounded export, and realtime reconciliation; the
element only renders its snapshot and forwards input.
import {
createHonuaFeatureTable,
linkFeatureTableToExploration,
} from "@honua/app-platform/web-components";
import { explainQuery } from "@honua/sdk-js/query-planner";
const source = dataset.source<Incident>("incidents")!;
const table = createHonuaFeatureTable({
source,
sourceId: "incidents",
columns: [
{ field: "OBJECTID", label: "ID", type: "integer" },
{ field: "NAME", label: "Incident", type: "string" },
{ field: "SEVERITY", label: "Severity", type: "number", format: (v) => `P${v}` },
{ field: "INTERNAL_NOTE", visible: false },
],
budgets: { pageSize: 200, maxCachedRows: 2_000, maxRequests: 64 },
planner: (query) => explainQuery({ descriptor: source.descriptor, query }),
});
document.querySelector("honua-feature-table")!.table = table;
await table.refresh();
Bounded by construction
Every fetch is bounded by HonuaFeatureTableBudgets — pageSize,
maxCachedRows, maxCachedBytes, maxRequests, maxExportRows, and
windowOverscan. The engine loads only the pages the visible window needs,
evicts least-recently-used pages to hold the row and byte ceilings, and stops
issuing requests once maxRequests is reached. snapshot.ledger reports exact
consumption and names the ceiling that was hit in ledger.exhausted. A window
row whose page is not resident is undefined in snapshot.rows, and the grid
paints a placeholder rather than inventing values.
The row and byte ceilings are hard. If a single page cannot fit under
maxCachedBytes, that page is evicted too rather than left resident above the
ceiling; ledger.exhausted reports bytes and snapshot.message explains it.
A pageSize larger than maxCachedRows can never fit, so it is rejected up
front as unsupported instead of failing per page.
maxRequests bounds one filter/sort/projection identity, so
ledger.requests resets when that identity changes and an exhausted table can
still load a new question. ledger.lifetimeRequests, ledger.rows,
ledger.bytes, and ledger.evictedRows are lifetime totals and never reset.
table.export({ format: "csv", maxRows }) reuses the same paged query path.
maxRows can only lower the ceiling — a request above budgets.maxExportRows
is clamped and the result reports truncated: true with the limit that
applied.
CSV serialization treats leading =, +, -, @, tab, and carriage return
as spreadsheet control syntax and prefixes those cells with an apostrophe.
This prevents source-returned text from becoming an executable formula when a
bounded CSV is opened in a spreadsheet application.
budgets.maxFields bounds the projected and rendered column window, while
budgets.maxExportBytes bounds the final UTF-8 artifact independently of the
row ceiling. The column disclosure above the grid provides native checkbox
controls for every declared field; hidden fields stay in the declarative model
but leave the projection and DOM.
Columns are horizontally virtualized independently of rows. The engine's
setColumnScroll(...) computes a bounded window capped by
budgets.maxRenderedColumns; the grid materializes only that slice plus
inert leading/trailing spacers. aria-colcount continues to name every
admitted visible field and each rendered header/cell carries its absolute
aria-colindex, so assistive technology retains the full grid coordinates.
<honua-feature-table column-width="160"> controls the fixed width used for
the horizontal window calculation.
For downloadable artifacts, use table.secureExport(...). Its required host
adapter re-authorizes the current query, receives no credentials, and records a
provenance envelope after the engine re-executes the accepted bounded query.
The envelope names the host decision, adapter, authorization scope, accepted
plan, row count, truncation, and timestamp. Aborting before authorization,
during paging, or before audit recording prevents a successful result.
Result truth, never a manufactured count
snapshot.state is one of idle, loading, ready, partial, stale,
cancelled, unsupported, or error, and snapshot.count names the evidence
behind any number:
count.kind |
count.evidence |
Meaning |
|---|---|---|
known |
result-total-count / exhausted-pages |
The source reported it, or paging drained |
estimated |
plan-estimate |
The accepted plan estimated it |
partial |
loaded-rows |
Only count.loaded is known |
unknown |
none |
No evidence exists |
count.value is absent for partial and unknown, the grid renders
aria-rowcount="-1", and the live region says "at least N rows loaded; total
unknown".
Stable row identity is required, not best-effort. A table with no
identityField (or descriptor.schema.primaryKey) reports unsupported, and so
does a table whose declared identity attribute is absent, null, or not a
string/number on any returned row. Substituting a row's position in its page
would key it by an offset that changes with every sort, filter, and page
boundary, corrupting selection — so the engine refuses instead.
Paging modes
pagingMode: "offset" (default) issues random-access Query.pagination
requests. pagingMode: "cursor" drives the source's stream() generator — the
protocol-neutral cursor seam — and is therefore forward-only: a jump past the
drained frontier reports unsupported instead of serving the wrong page. A
source without stream reports unsupported for cursor paging.
Query evidence
snapshot.evidence carries the accepted plan's planId, planFingerprint,
pushdown, and fidelity, plus a work list that attributes each unit of work
to the server, worker, or client tier. Remote plan steps are server work,
non-remote residual steps are attributed to residualExecution ("client" by
default, "worker" when a worker executes them), filter degradation is recorded
as a residual, and virtualization plus column formatting are always recorded as
client presentation work. featureTableWorkByTier(evidence, tier) selects one
tier.
The grid projects that same evidence into a compact, accessible Query execution badge list. A Server, Worker, or Client badge is rendered only when the accepted evidence records work at that tier; its tooltip names every concern and detail, so the UI never infers pushdown from a protocol name.
Page-cache identity (featureTablePageCacheKey) includes the source id and
version, schema identity, accepted-plan fingerprint, filter, sort, projection,
authorization scope, and freshness — so a stale page can never answer a
different question.
The table consumes only canonical Source.query(), so protocol translation of
its filter, sort, projection, pagination, spatial, and aggregate requests is the
adapters' job; there is no table-specific protocol branch.
Linked exploration state
linkFeatureTableToExploration(table, view) binds the table to an
ExplorationViewController in both directions. Table selection, sort, filters,
and the virtualization window (as the shared page slice) publish outward; peer
changes to selection, sort, visible fields, and filters apply inward. Row keys
and exploration selection targets round-trip deterministically through
table.keysForTargets() and table.selectionTargets(), so map-to-table and
table-to-map selection agree on identity.
Extent linkage is explicit. A table starts in "independent" viewport mode;
setViewportMode("linked") applies setViewportExtent(...) as a bounded
spatial query. linkFeatureTableToExploration(table, view, { extent: true })
tracks the shared map extent, while omitting the option keeps map navigation
from changing the table question.
table.aggregate({ groupBy, metrics }) executes a single bounded aggregate
request through the same planner, filter, extent, cancellation, and evidence
seams as row navigation. Aggregate rows never enter the page cache.
Selection is independent of cache residency: keysForTargets() resolves any
target for the table's own source — computed from the target's id, not looked up
in the page cache — so a map selecting a feature far outside the loaded window
still selects the right row, and selecting it does not clear the shared
selection. Targets for other sources resolve to nothing, and publishing the
table's selection outward replaces only its own source's entries, leaving a
multi-source workspace's peer selections intact.
const grid = context.connectView({ id: "grid", role: "grid" });
const unlink = linkFeatureTableToExploration(table, grid);
// ... later, on teardown:
unlink();
Realtime deltas preserve interaction state
table.applyRealtimeDiff(diff) accepts a reconciliation diff from
@honua/sdk-js/realtime directly. Updates patch rows in place — a delta never
reorders a materialized page behind the user — so the focused cell, selected
rows, sort, and window survive. When state cannot be preserved the outcome
announces a documented conflict instead of failing silently:
| Conflict code | Cause |
|---|---|
sort-key-changed |
An update changed a sorted column's value |
selection-invalidated |
Selected rows were deleted upstream |
focused-row-deleted |
The focused row was deleted upstream |
filter-membership-unknown |
An update may have moved a row into or out of the filtered result |
snapshot-reset |
A replacement snapshot arrived |
schema-changed |
The source schema changed |
Conflicts appear in snapshot.conflicts, are read out by the grid's polite live
region, and are dispatched as honua-table-conflict.
Keyboard and screen-reader contract
The grid follows the WAI-ARIA grid pattern for the WCAG 2.2 AA workflow:
role="grid" with aria-rowcount / aria-colcount / aria-busy,
role="row" and role="gridcell" carrying 1-based
aria-rowindex / aria-colindex so a virtualized window still announces
absolute positions, aria-sort per column header, aria-selected per row, and
a role="status" aria-live="polite" region for result truth and conflicts.
Exactly one cell is tabbable (roving tabindex).
| Keys | Action |
|---|---|
| Arrow keys | Move the focused cell |
Home / End |
First / last cell in the row |
Ctrl/Cmd + Home/End |
First / last cell in the grid |
PageUp / PageDown |
Move one window, loading the page focus lands on |
Enter / Space |
Select the focused row |
Clicking a column header toggles its sort (Shift-click adds a secondary sort
key). The row-height attribute sizes the virtualization spacers; keep it in
step with any custom row CSS.
Production-Tier Feature Editing (honua-feature-editor)
honua-feature-editor is the production-tier editing surface. It
composes the public contract edit primitives — createEditSketchWorkflow,
createEditSession, snapping, attachment staging, undo/redo, optimistic hooks
— rather than reimplementing any protocol behavior, and it imports no
protocol-specific adapter. The survival-tier honua-editor remains available
as the simpler controller-bound widget.
Wire it to a Source through createFeatureEditorWorkflow:
import {
createFeatureEditorWorkflow,
defineHonuaWebComponents,
} from "@honua/app-platform/web-components";
defineHonuaWebComponents();
const workflow = createFeatureEditorWorkflow({
source: dataset.source("permits")!,
// Optional. Subtypes are a presentation contract: one field carries the
// subtype code, and each subtype narrows the valid choices per field.
subtypes: {
field: "permit_kind",
defaultCode: 1,
subtypes: [
{ code: 1, name: "Residential" },
{
code: 2,
name: "Commercial",
fieldOverrides: {
status: { domain: { type: "coded-value", codedValues: [{ name: "Under review", code: "review" }] } },
inspector: { required: true },
},
},
],
},
// Deny-only. An override can never grant an operation the source lacks.
operations: { delete: { available: false, reason: "Permits are archived, never deleted." } },
});
const editor = document.querySelector("honua-feature-editor")!;
editor.workflow = workflow;
editor.selectedFeature = selectedPermit; // drives update / delete availability
workflow.begin("update");
const review = workflow.preflight();
// No adapter call occurs. The review contains source/feature identity, changed
// field names, geometry/attachment counts, and validation — never values,
// coordinates, attachment payloads, locators, or credentials.
if (!review.ready) console.warn(review.blockers, review.validation.errors);
editor.fieldPresentation can select the displayed attribute controls, set their
order, and override their labels without altering the workflow's source metadata:
import type { HonuaFeatureEditorElement } from "@honua/app-platform/web-components";
const editor = document.querySelector<HonuaFeatureEditorElement>("honua-feature-editor")!;
editor.fieldPresentation = [
{ name: "status", label: "Permit status" },
{ name: "permit_no", label: "Permit number" },
];
Names match fields exactly; a name absent from the current form renders no
control. Set the property to undefined to restore the complete schema form.
The element copies the configuration and escapes labels. Omitted fields keep
their original required, nullable, default, domain and read-only constraints;
their validation errors remain visible in the alert summary, and a missing
required value still blocks submission without transport. This property does
not interpret WebMap formInfo or Arcade, change permissions, or change which
attributes the workflow validates and commits. Hosts must review and translate
any external presentation definition separately.
What the element derives, and what it refuses:
- Form from metadata. Controls, labels, coded-value choices, numeric range
bounds, max lengths, required and read-only state all come from the source's
public schema (with domains projected across by
editorFieldsFromSchema) plus the active subtype's overrides. No service field name is hard-coded. - Truthful per-operation state.
create/update/deleteare gated independently. An evaluatedcapabilityProfilewins over the coarseapplyEditscapability, soauthorization-required,authorization-denied, andpolicy-disabledare surfaced with their reason codes instead of a disabled button with no explanation. A read-only or partially editable service renders each blocked operation's reason. - Rejection is never success. A draft that fails validation (including a
subtype-narrowed domain) is never transported — the commit reports
transported: false. Every non-succeededapplyEditsoutcome maps torejected,conflict,unsupported, orcancelled, and a partial apply is reported as such. - Explicit conflict resolution. A version / precondition failure, or a
divergent external change to the drafted feature, parks the draft in
conflict; submitting again is refused untilresolveConflict("keep-mine" | "discard-mine" | "reload")records a decision. - Realtime safety.
workflow.applyExternalChange(feature)ignores changes to other features entirely (no re-render, so selection, unsaved values, focus, and caret survive), adopts server values only for fields the user has not touched, and escalates a divergent token to a conflict. - Redacted attachments. Staged attachment payloads — including string URLs that may carry credentials — never enter component state or an emitted event; only name, content type, size, and status do.
- One mutation receipt. An accepted or attachment-partial commit carries a
credential-free
mutationReceipt. Feed it tocreateHonuaFeatureMutationReconciler(...)to update the configured map, table, details, counts, selection, tile, query, and offline owners once. The receipt'smutationIdalso deduplicates the matching realtime echo. - Review before transport.
workflow.preflight()is a dry-run contract for approval UI and audit logs. It validates the current draft and returns only a credential-free operation/source/identity summary plus changed field names, geometry state, attachment counts, and blockers. It never calls an adapter. ItsmutationIdis allocated when the draft opens and remains stable through validation fixes, transport retry, realtime reconciliation, and the accepted mutation receipt. The currentSource.applyEditscontract does not accept an idempotency key, so this identity deduplicates application reconciliation; it does not yet make protocol transport idempotent. - Explicit offline recovery.
queueHonuaFeatureEditorDraft(...)persists a validated JSON-compatible draft through the canonical offline edit queue and moves the editor toqueued. Later queue records are projected withreconcileHonuaFeatureEditorOfflineEdit(...)into retryable, conflict, cancelled, or committed states. Staged attachments fail closed because the queue cannot persist their payloads; they are never silently omitted. Resolve the element'shonua-feature-edit-offline-conflictrequest withresolveHonuaFeatureEditorOfflineConflict(...); the durable queue transition happens before the component leaves its conflict state. - Keyboard and screen-reader complete. The whole workflow, geometry
included, is usable without the map canvas: labelled native controls with
aria-required/aria-invalid/aria-describedby,role="alert"problem regions, arole="status"live message, a GeoJSON geometry textarea with Apply geometry / Clear geometry,Escapeto cancel, andCtrl/Cmd+Z(withShift) for undo / redo.
Geometry can additionally be drawn on the map. createTerraDrawEditorSketch is
the app-platform default: it constructs terra-draw (an optional peer) for a
MapLibre map, wires SDK snapping, reports terra-draw's real tool support so
rectangle / circle become enabled, and re-binds itself to each new draft.
import { createTerraDrawEditorSketch } from "@honua/app-platform/web-components";
const sketch = await createTerraDrawEditorSketch(map, { workflow, snapping: { index } });
sketch.setTool("polygon"); // arms terra-draw and the workflow together
await sketch.ready(); // resolves once bound to the current draft
Apps that construct terra-draw themselves use bindEditorSketch(draw, { workflow })
and, for snapping, editorSnappingOptions(workflow, { index }). Route snapping
through that helper rather than passing a model directly: terra-draw resolves its
snapping hook once per mode, and the editor builds a new contract sketch model
for every draft, so a directly-passed model would pin snapping to the first
draft and make setSnapping(...) on later drafts a silent no-op.
Two lifecycle details worth knowing:
- Superseded submits. An
AbortSignalis advisory, so a transport may settle a submit the editor has already moved on from. A completion that no longer owns the workflow never writes to it: the commit comes back withsuperseded: trueandstatus: "cancelled", itssnapshotdescribes the current draft, and the workflow makes no claim about the superseded edit's server outcome (failurescarries whatever the service reported). - Detach and reattach. The element holds its workflow subscription only while connected, and re-takes it — re-reading state it missed — on reconnect, so moving the editor in the DOM does not leave it frozen.
Events: honua-feature-edit-change (redacted snapshot on every state change)
and honua-feature-edit-commit (the submit outcome, including transported).
Swipe compare
honua-swipe-control (from @honua/app-platform/controls) clips the top of
two stacked MapLibre maps along a draggable divider. The host positions both
maps; the control only clips and draws the divider.
<div class="compare">
<div id="before-map"></div>
<div id="after-map"></div>
<honua-swipe-control sync-cameras bottom-label="2020" top-label="2025" label="Compare years"></honua-swipe-control>
</div>
document.querySelector("honua-swipe-control")!.connect(afterMap, beforeMap);
sync-cameraskeeps center, zoom, bearing and pitch in step: moving either map moves the other, and the copy never echoes back. The bottom map takes the top map's camera when sync starts. Maps without camera methods are left unsynchronised.bottom-label/top-labeldraw side labels against the handle: the bottom map's label on the side it shows through, the top map's on the other. They also set the divider'saria-valuetext, e.g. "2020 30%, 2025 70%".- The control stacks above map overlays; override the stacking order with the
--honua-swipe-z-indexcustom property (default 10). - The divider is an ARIA slider: arrows step 1 (Shift steps 10), Page Up / Page Down step 10, Home / End jump to the ends.
Production qualification matrix
Production support for the component kit is tracked as a matrix rather than a
claim in prose: every shipped tag against every gate that matters for
accessibility, localization, visual behaviour, CSP, lifecycle cleanup and bundle
cost. pass means an automated check backs the claim, pending means there is
no verdict yet, and n/a carries an argument. The Tier column records the
functional maturity a component has reached, which is a different axis from
clearing every gate.
702 cells across 39 components x 18 gates: 447 passing, 49 failing, 124 pending, 82 not applicable.
2 of 39 components have cleared every gate. That is a different axis from the catalog's supportTier, which records the functional maturity a feature issue delivered: 2 component(s) are production-tier and still carry open gates, listed per component as openGates in the manifest.
| Component | Tier | keyboard-behavior | screen-reader-semantics | focus-restoration | reduced-motion | high-contrast | responsive-layout | localization | pseudo-locale | rtl | visual-regression | strict-csp | zero-console-error | deterministic-disposal | duplicate-listener | memory-leak | ssr-import | secure-export | bundle-budget |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
honua-catalog-picker (controls) |
survival | pending | pending | pending | n/a | pass | pass | pass | pass | pass | pending | pass | pending | pending | pending | pass | pass | n/a | pass |
honua-filter-builder (controls) |
survival | pending | pending | pending | n/a | pass | pass | pass | pass | pass | pending | pass | pending | pending | pending | pass | pass | n/a | pass |
honua-data-export (controls) |
survival | pending | pending | pending | n/a | FAIL | FAIL | FAIL | pass | FAIL | pending | pass | pending | pending | pending | pass | pass | pending | pass |
honua-basemap-switcher (controls) |
survival | pass | pass | pass | n/a | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-swipe-control (controls) |
survival | pass | pass | pass | n/a | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-legend (controls) |
survival | n/a | pass | n/a | n/a | pass | pass | pass | pass | pass | pending | pass | pass | pass | n/a | pass | pass | n/a | pass |
honua-layer-list (controls) |
survival | pass | pass | pass | n/a | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-map (web-components) |
survival | pass | pass | pass | pass | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-layer-list (web-components) |
survival | pass | pass | pass | n/a | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-legend (web-components) |
survival | n/a | pass | n/a | n/a | pass | pass | pass | pass | pass | pending | pass | pass | pass | n/a | pass | pass | n/a | pass |
honua-feature-table (web-components) |
survival | pass | pass | pass | n/a | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-feature-inspection (web-components) |
production | pass | pass | pass | n/a | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-search (web-components) |
survival | pass | pass | pass | pass | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-editor (web-components) |
survival | pass | pass | pass | n/a | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-feature-editor (web-components) |
production | pass | pass | pass | n/a | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-chart (web-components) |
survival | n/a | pass | n/a | n/a | pass | pass | pass | pass | pass | pending | pass | pass | pass | n/a | pass | pass | n/a | pass |
honua-basemap-control (web-components) |
survival | pass | pass | pass | n/a | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-bookmarks (web-components) |
survival | pass | pass | pass | pass | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-locate-control (web-components) |
survival | pass | pass | pass | pass | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-measure-control (web-components) |
survival | pass | pass | pass | n/a | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-measurement (web-components) |
survival | pass | pass | pass | n/a | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-time-slider (web-components) |
survival | pass | pass | pass | pass | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-sketch-control (web-components) |
survival | pass | pass | pass | n/a | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-print-export (web-components) |
survival | pass | pass | pass | n/a | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | pass | pass |
honua-map-status (web-components) |
survival | pass | pass | pass | n/a | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-action-panel (web-components) |
survival | pass | pass | pass | n/a | pass | pass | pass | pass | pass | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-zoom (web-components) |
survival | pending | pending | pending | n/a | FAIL | FAIL | FAIL | pass | FAIL | pending | pass | pending | pending | pending | pass | pass | n/a | pass |
honua-home (web-components) |
survival | pending | pending | pending | n/a | FAIL | FAIL | FAIL | pass | FAIL | pending | pass | pending | pending | pending | pass | pass | n/a | pass |
honua-scale-bar (web-components) |
survival | pending | pending | pending | n/a | FAIL | FAIL | FAIL | pass | FAIL | pending | pass | pending | pending | pending | pass | pass | n/a | pass |
honua-compass (web-components) |
survival | pending | pending | pending | n/a | FAIL | FAIL | FAIL | pass | FAIL | pending | pass | pending | pending | pending | pass | pass | n/a | pass |
honua-fullscreen (web-components) |
survival | pending | pending | pending | n/a | FAIL | FAIL | FAIL | pass | FAIL | pending | pass | pending | pending | pending | pass | pass | n/a | pass |
honua-attribution (web-components) |
survival | pending | pending | pending | n/a | FAIL | FAIL | FAIL | pass | FAIL | pending | pass | pending | pending | pending | pass | pass | n/a | pass |
honua-feature-pager (web-components) |
survival | pending | pending | pending | n/a | FAIL | FAIL | FAIL | pass | FAIL | pending | pass | pending | pending | pending | pass | pass | n/a | pass |
honua-attachments (web-components) |
survival | pending | pending | pending | n/a | FAIL | FAIL | FAIL | pass | FAIL | pending | pass | pending | pending | pending | pass | pass | n/a | pass |
honua-scale-range (web-components) |
survival | pending | pending | pending | n/a | FAIL | FAIL | FAIL | pass | FAIL | pending | pass | pending | pending | pending | pass | pass | n/a | pass |
honua-directions (web-components) |
survival | pending | pending | pending | n/a | FAIL | FAIL | FAIL | pass | FAIL | pending | pass | pending | pending | pending | pass | pass | n/a | pass |
honua-indicator (web-components) |
survival | n/a | pass | n/a | n/a | pending | FAIL | pass | pass | pending | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-nearby (web-components) |
survival | pending | pass | FAIL | n/a | pending | FAIL | pass | pass | pending | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
honua-add-data (web-components) |
survival | pending | pass | FAIL | n/a | pending | FAIL | pass | pass | pending | pending | pass | pass | pass | pass | pass | pass | n/a | pass |
Gate definitions and per-cell evidence and notes live in
config/component-qualification.v1.json.
New feature default values
Opening a create draft preserves explicitly supplied feature/template attributes,
including null, 0, false, and empty strings. For absent values, the workflow
chooses the configured subtype defaultCode first, otherwise the subtype field's
schema default. It then materializes writable field defaults from that resolved
subtype, with subtype overrides taking precedence over schema defaults. Those
values are part of the draft: displayed values, preflight and the mutation agree.
Invalid defaults still fail normal validation before transport. Server-managed
read-only fields receive no client-side default writes.
begin("create", feature) accepts an explicit template's prototype attributes;
the workflow does not parse WebMap template definitions itself. Initialization
applies only to a new create draft. It does not fill missing values in updates or
deletes, and changing a subtype after opening a draft does not overwrite edits
with another template's values.
Visual filter builder
@honua/app-platform/controls exports the opt-in <honua-filter-builder>
control, compileFilterBuilder, and applyFilterBuilder. Register the element
explicitly with defineHonuaFilterBuilder() or through the component registry.
import {
defineHonuaFilterBuilder,
HonuaFilterBuilderElement,
} from "@honua/app-platform/controls";
import { createFilterRegistry } from "@honua/sdk-js/filter-registry";
defineHonuaFilterBuilder();
const builder = new HonuaFilterBuilderElement();
builder.registry = createFilterRegistry();
builder.draft = {
sourceId: "towns",
ownerId: "town-filters",
fields: [
{ name: "name", type: "string" },
{ name: "population", type: "number" },
{ name: "observed", type: "datetime" },
],
rows: [{ field: "population", operator: "gte", value: "1000" }],
extent: [-158, 20, -157, 22],
time: {
field: "observed",
start: "2026-01-01T00:00:00Z",
end: "2026-02-01T00:00:00Z",
},
};
builder.addEventListener("honua-filter-change", (event) => {
const { query, cql2 } = (event as CustomEvent).detail;
// Pass query to the selected Source and show cql2 in the host query panel.
console.log(query, cql2);
});
document.body.append(builder);
All rows, the optional WGS84 extent, and the time range are combined with AND through the canonical query compiler. The editor supports at most 32 rows, schema field names that are identifiers, typed numeric and boolean values, string patterns, null checks, and timestamps with an explicit timezone. Invalid input preserves the previously applied registry state and CQL2. Extents must be ordered west/south/east/north. An extent crossing the antimeridian requires a host-provided spatial editor that supports multiple extents.
Set countRows to an async (query, signal) => number callback to display a
matching count. The callback and honua-filter-change detail contain this
builder's query only. Hosts that also use chart or table filters should compose
the shared registry query in their adapter before counting or reading rows.
Honor the abort signal to cancel superseded requests. A failed count keeps the
valid filter applied and displays a fixed unavailable status.
Each draft needs a unique ownerId within its registry. Applying replaces only
that owner's clauses; changing registry/source/owner or detaching removes them.
Other owners' clauses remain. Drafts are copied on assignment and retrieval.
The element performs no network requests and carries no credentials; the host
owns Source selection, request authorization, and map/table refresh.
Operators, picklists, live apply and compact layout
Each field offers only the operators CQL2 can express for its type:
filterBuilderOperatorsFor(field) returns them, and a field's own operators
list narrows (never widens) that set. Numbers add between (row values: [lower, upper]) and in; text adds in and like; booleans offer equality
and null checks; dates offer comparisons and null checks, with ranges through
the time range. An in row takes up to 64 values in values.
builder.draft = {
sourceId: "parcels",
ownerId: "zoning-filters",
fields: [
{ name: "acres", type: "number" },
{ name: "zone", type: "string", domain: [{ value: "R1", label: "Residential" }] },
{ name: "plan_area", type: "string", operators: ["eq", "in"] },
],
rows: [
{ field: "acres", operator: "between", values: ["2", "40"] },
{ field: "plan_area", operator: "in", values: ["Downtown", "Harbor"] },
],
};
builder.distinctValues = async (field, signal) => fetchDistinctValues(field.name, signal);
builder.setAttribute("live-apply", "");
builder.setAttribute("layout", "compact");
A field's domain becomes a value picklist, and an in row becomes a
multiple select. For fields without a domain, set distinctValues to an async
(field, signal) => string[] callback; it is called once per field in use, its
first 200 distinct text values become the picklist, and its signal aborts when
the source changes or the element disconnects. Without a picklist, in takes
one value per line.
live-apply applies the draft after edits pause (live-apply-delay, default
300 ms, at most 5000 ms) instead of waiting for the Apply button; invalid edits
show the not-applied status and keep the previous filter. Every
honua-filter-change detail carries cql2 (text) and cql2Json, the same
filter as CQL2 JSON: timestamps in their tagged UTC form, the time range as
t_intersects with an interval and the extent as an s_intersects bbox.
layout="compact" puts each row on one line and hides the row labels visually
while keeping them as accessible names; below a 320 px container every layout
stacks. Assign messages with any subset of FILTER_BUILDER_MESSAGES to
translate every label, status and operator name.