Exports
GeoLegendOutlet, GeoMapScope, GeoTableOutlet, GeoMapScopeProps and 31 more: generated from the source of active-geo.
Exported by @workspace/. Generated from the package source; part of the index of every export.
Geo Legend Outlet#
Props
- Type
string
A class for the host's own layout of the outlet.
Takes only the props listed.
Geo Map Scope#
Props
- Type
ReactNode
Takes only the props listed.
Geo Table Outlet#
Props
- Type
string
A class for the host's own layout of the outlet.
Takes only the props listed.
Types#
The props of Geo, each described in its prop list on this page.
interface GeoMapScopeProps {
readonly children: ReactNode;
}interface GeoOutletProps {
readonly className?: string;
}The geometry of an area: a polygon or a multipolygon.
type GeoAreaGeometry = GeoPolygon | GeoMultiPolygon;Host components for the map's standard controls. Every field is optional: a missing one keeps the map's own control. Define the components once (module scope), never inside a render: a new component is a new control and loses its focus. A new object holding the same components changes nothing.
interface GeoComponents {
readonly Button?: ComponentType<GeoButtonSlotProps>;
readonly Toggle?: ComponentType<GeoToggleSlotProps>;
readonly Input?: ComponentType<GeoInputSlotProps>;
}The geometry a context layer draws: areas and lines, nothing else.
type GeoContextGeometry =
GeoAreaGeometry | GeoLineString | GeoMultiLineString;Geographic context: drawn, never interactive, never in the legend.
interface GeoContextLayer extends GeoLayerBase {
readonly type: 'context';
readonly title?: string;
readonly geometries: readonly GeoContextGeometry[];
readonly convention?: GeoRingConvention;
readonly surface?: 'land' | 'water';
readonly fit?: boolean;
}The identity of the data a map shows, declared by the host. A state of another dataset is never applied silently.
interface GeoDatasetIdentity {
readonly id: string;
readonly version: string;
}Classes on either side of a reference value the host names.
The neutral class is the reference itself, or the closed interval neutral when the host declares one: a value equal to the reference, or from neutral. up to and including neutral., is neutral. A value below it is on the lower side, a value above it on the upper side. The thresholds split the sides; as in threshold, a value on a break belongs to the class above the break. Membership reads the numbers as given: no rounding, no tolerance, no formatted text.
interface GeoDivergingScale {
readonly type: 'diverging';
readonly reference: number;
readonly thresholds: readonly number[];
readonly neutral?: {readonly from: number; readonly to: number};
}- Type
type GeoExport Format = 'png' | 'svg' | 'csv';
The formats a map exports.
The limits of the map's exports. The Export action and the handle enforce the same limits. Sizes are of the UNCOMPRESSED output.
interface GeoExportLimits {
readonly svgMaxBytes?: number;
readonly pngMaxPixels?: number;
}The colours of an exported image: light (default) and dark are explicit export themes, independent of what the screen shows; current is the theme the map shows now.
type GeoExportTheme = 'light' | 'dark' | 'current';How a host whose colour modes are an ATTRIBUTE (for example data- on the document root) expresses one mode, so an explicit light or dark export can reproduce it. value: null means the attribute is absent in that mode.
interface GeoExportThemeMarker {
readonly attribute: string;
readonly value: string | null;
}The host's attribute for each colour mode (export). Without it, an explicit export theme follows the package convention only: the . class on an ancestor.
interface GeoExportThemes {
readonly light: GeoExportThemeMarker;
readonly dark: GeoExportThemeMarker;
}What the map hands a host text INPUT (the table's search).
interface GeoInputSlotProps {
readonly ref?: Ref<HTMLInputElement>;
readonly value: string;
readonly onValueChange: (value: string) => void;
readonly type: 'search';
readonly id?: string;
readonly placeholder?: string;
readonly className?: string;
readonly 'aria-label'?: string;
readonly 'aria-controls'?: string;
readonly [dataAttribute: `data-${string}`]: string | undefined;
}A reference to one map object: its layer and its key in that layer.
interface GeoItemRef {
readonly layerId: string;
readonly key: GeoKey;
}- Type
type GeoKey = string | number;
The key of a map object: a non-empty string or a finite number. The type is part of the identity: 1 and "1" are two objects, 0 and -0 one.
One level of the host's geographic hierarchy, as the map names it.
interface GeoLevel {
readonly id: string;
readonly label: string;
}The map asks the host for a level: from the level path, or from the host's own action (request, for example an object action that drills into an area). The host decides whether the level exists, loads its data, aggregates its values and then supplies new layers and a new level.
A newer request ABORTS signal, and so does removing the map. Applying an answer is the host's: the map cannot refuse a level it is given, so a host that loads asynchronously checks the signal (or request) when it would apply an answer. The map itself lets only the newest request of a mounted map end the wait, report a failure or move focus.
interface GeoLevelRequest {
readonly level: GeoLevel;
readonly item?: GeoItemRef;
readonly source: 'path' | 'host';
readonly requestId: number;
readonly signal: AbortSignal;
}A GeoJSON Line of at least two positions.
interface GeoLineString {
readonly type: 'LineString';
readonly coordinates: readonly GeoPosition[];
}A GeoJSON Multi.
interface GeoMultiLineString {
readonly type: 'MultiLineString';
readonly coordinates: readonly (readonly GeoPosition[])[];
}A GeoJSON Multi: one or more polygons.
interface GeoMultiPolygon {
readonly type: 'MultiPolygon';
readonly coordinates: readonly (readonly GeoRing[])[];
}How a point layer is drawn. Both renderers show the same positions, sizes, statuses, selection, colours and order, and are hit the same way; the choice is about cost.
svg: one element per symbol.canvas: one canvas for the layer, at its place in the layer order.auto(default): SVG up to and includingmaxrenderable points (default 1,000), Canvas above. Renderable means drawable after validation and placeable in the projection. An initial operational default from the research measurements, not a performance guarantee.Svg Points
type GeoPointRenderer =
| 'auto'
| 'svg'
| 'canvas'
| {readonly type: 'auto'; readonly maxSvgPoints: number};A GeoJSON Polygon: an exterior ring followed by its holes.
interface GeoPolygon {
readonly type: 'Polygon';
readonly coordinates: readonly GeoRing[];
}A GeoJSON position: [longitude, latitude] in degrees.
type GeoPosition = readonly [longitude: number, latitude: number];- Type
type GeoPresentation = Value Presentation;
How values and coordinates are formatted: a BCP 47 locale tag or an explicit presentation context (@workspace/).
The projection of a map. There is no automatic choice: the host names one.
equal-: the world. Equal-area. Fits the whole sphere by default;earth fit: 'content'fits the drawn geometry instead.conic-: a region. Equal-area. Fitted to the drawn geometry; the standard parallels sit at one sixth and five sixths of the content's latitude span and the central meridian at its middle, unless given.equal- area mercator: only when the host asks for it (it inflates area away from the equator). Fitted to the drawn geometry.
type GeoProjection =
| 'equal-earth'
| 'conic-equal-area'
| 'mercator'
| {readonly type: 'equal-earth'; readonly fit?: 'sphere' | 'content'}
| {
readonly type: 'conic-equal-area';
readonly parallels?: readonly [number, number];
readonly centralMeridian?: number;
}
| {readonly type: 'mercator'};- Type
type GeoRing = readonly Geo Position[];
A closed ring: the first and last position are equal.
How the rings and edges of a layer are meant, declared by the host:
rfc7946(default): GeoJSON as RFC 7946 defines it. A ring's role follows its position (the first is the exterior), whatever its winding; an edge is the straight line in longitude and latitude. The map writes the winding and the edges in the form the spherical renderer needs, without changing what an area encloses.spherical: rings wound and edges drawn on the sphere, as TopoJSON built for d3 is. Nothing is rewritten.
type GeoRingConvention = 'rfc7946' | 'spherical';Selection behaviour of a map.
interface GeoSelectionOptions {
readonly enabled?: boolean;
readonly mode?: 'single' | 'multiple';
}What the map hands a host TOGGLE (a two-state button: a legend entry). pressed is controlled by the map; a toggle of the map is never unavailable.
interface GeoToggleSlotProps {
readonly ref?: Ref<HTMLButtonElement>;
readonly children: ReactNode;
readonly pressed: boolean;
readonly onPressedChange: (pressed: boolean) => void;
readonly id?: string;
readonly className?: string;
readonly 'aria-label'?: string;
readonly [dataAttribute: `data-${string}`]: string | undefined;
}What a numeric value means, declared once per layer. Exactly the shape of Chart in active-charts (product-family pattern, D-12): the same declaration and value give the same text in both products.
type GeoValueSemantics =
| {
readonly kind: 'number';
readonly format?: NumberFormat;
}
| {
readonly kind: 'count';
}
| {
readonly kind: 'money';
readonly currency: string;
readonly decimals?: number;
}
| {
readonly kind: 'price';
readonly currency: string;
readonly decimals: number;
}
| {
readonly kind: 'percent';
readonly source: 'fraction' | 'percentage-points';
readonly preset?: PercentFormat;
};