---
id: "packages/active-geo/api/exports"
title: "Exports"
description: "GeoLegendOutlet, GeoMapScope, GeoTableOutlet, GeoMapScopeProps and 31 more: generated from the source of active-geo."
url: "/packages/active-geo/api/exports"
locale: "en"
revision: "g0mvjxwj5c-88bdbe1c:exports"
---

# Exports

Exported by `@workspace/active-geo`. Generated from the package source; part of [the index of every export](/packages/active-geo/api).

## `GeoLegendOutlet`

| Prop | Type | Required | Description |
| --- | --- | --- | --- |
| `className` | `string` | no | A class for the host's own layout of the outlet. |

## `GeoMapScope`

| Prop | Type | Required | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` | yes |  |

## `GeoTableOutlet`

| Prop | Type | Required | Description |
| --- | --- | --- | --- |
| `className` | `string` | no | A class for the host's own layout of the outlet. |

## Types

**GeoMapScopeProps**

```ts
interface GeoMapScopeProps {
  readonly children: ReactNode;
}
```

**GeoOutletProps**

```ts
interface GeoOutletProps {
  readonly className?: string;
}
```

**GeoAreaGeometry**

```ts
type GeoAreaGeometry = GeoPolygon | GeoMultiPolygon;
```

The geometry of an area: a polygon or a multipolygon.

**GeoButtonSlotProps**

```ts
interface GeoButtonSlotProps {
  readonly ref?: Ref<HTMLButtonElement>;
  readonly children: ReactNode;
  readonly appearance: 'outline' | 'quiet';
  readonly size: 'default' | 'icon';
  readonly disabled: boolean;
  readonly onClick: (event: MouseEvent<HTMLButtonElement>) => void;
  readonly onFocus?: FocusEventHandler<HTMLButtonElement>;
  readonly tabIndex?: number;
  readonly id?: string;
  readonly className?: string;
  readonly 'aria-label'?: string;
  readonly 'aria-describedby'?: string;
  readonly 'aria-controls'?: string;
  readonly 'aria-expanded'?: boolean;
  readonly 'aria-haspopup'?: 'menu';
  readonly [dataAttribute: `data-${string}`]: string | undefined;
}
```

What the map hands a host BUTTON. The map owns the action, its meaning,
its words and its state; the host component owns how the control looks.
Spread the DOM props onto one interactive element and send `ref` to it.

**GeoComponents**

```ts
interface GeoComponents {
  readonly Button?: ComponentType<GeoButtonSlotProps>;
  readonly Toggle?: ComponentType<GeoToggleSlotProps>;
  readonly Input?: ComponentType<GeoInputSlotProps>;
}
```

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.

**GeoContextGeometry**

```ts
type GeoContextGeometry =
  GeoAreaGeometry | GeoLineString | GeoMultiLineString;
```

The geometry a context layer draws: areas and lines, nothing else.

**GeoContextLayer**

```ts
interface GeoContextLayer extends GeoLayerBase {
  readonly type: 'context';
  readonly title?: string;
  readonly geometries: readonly GeoContextGeometry[];
  readonly convention?: GeoRingConvention;
  readonly surface?: 'land' | 'water';
  readonly fit?: boolean;
}
```

Geographic context: drawn, never interactive, never in the legend.

**GeoDatasetIdentity**

```ts
interface GeoDatasetIdentity {
  readonly id: string;
  readonly version: string;
}
```

The identity of the data a map shows, declared by the host. A state of
another dataset is never applied silently.

**GeoDivergingScale**

```ts
interface GeoDivergingScale {
  readonly type: 'diverging';
  readonly reference: number;
  readonly thresholds: readonly number[];
  readonly neutral?: {readonly from: number; readonly to: number};
}
```

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.from` up to and including `neutral.to`, 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.

**GeoExportFormat**

```ts
type GeoExportFormat = 'png' | 'svg' | 'csv';
```

The formats a map exports.

**GeoExportLimits**

```ts
interface GeoExportLimits {
  readonly svgMaxBytes?: number;
  readonly pngMaxPixels?: number;
}
```

The limits of the map's exports. The Export action and the
handle enforce the same limits. Sizes are of the UNCOMPRESSED output.

**GeoExportTheme**

```ts
type GeoExportTheme = 'light' | 'dark' | 'current';
```

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.

**GeoExportThemeMarker**

```ts
interface GeoExportThemeMarker {
  readonly attribute: string;
  readonly value: string | null;
}
```

How a host whose colour modes are an ATTRIBUTE (for example
`data-theme="dark"` 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.

**GeoExportThemes**

```ts
interface GeoExportThemes {
  readonly light: GeoExportThemeMarker;
  readonly dark: GeoExportThemeMarker;
}
```

The host's attribute for each colour mode (`exportThemes`). Without it, an
explicit export theme follows the package convention only: the `.dark`
class on an ancestor.

**GeoInputSlotProps**

```ts
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;
}
```

What the map hands a host text INPUT (the table's search).

**GeoItemRef**

```ts
interface GeoItemRef {
  readonly layerId: string;
  readonly key: GeoKey;
}
```

A reference to one map object: its layer and its key in that layer.

**GeoKey**

```ts
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.

**GeoLevel**

```ts
interface GeoLevel {
  readonly id: string;
  readonly label: string;
}
```

One level of the host's geographic hierarchy, as the map names it.

**GeoLevelRequest**

```ts
interface GeoLevelRequest {
  readonly level: GeoLevel;
  readonly item?: GeoItemRef;
  readonly source: 'path' | 'host';
  readonly requestId: number;
  readonly signal: AbortSignal;
}
```

The map asks the host for a level: from the level path, or from
the host's own action (`requestLevel`, 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
`levelPath`.

A newer request ABORTS `signal`, and so does removing the map. Applying
an answer is the host's: the map cannot refuse a `levelPath` it is given,
so a host that loads asynchronously checks the signal (or `requestId`)
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.

**GeoLineString**

```ts
interface GeoLineString {
  readonly type: 'LineString';
  readonly coordinates: readonly GeoPosition[];
}
```

A GeoJSON `LineString` of at least two positions.

**GeoMultiLineString**

```ts
interface GeoMultiLineString {
  readonly type: 'MultiLineString';
  readonly coordinates: readonly (readonly GeoPosition[])[];
}
```

A GeoJSON `MultiLineString`.

**GeoMultiPolygon**

```ts
interface GeoMultiPolygon {
  readonly type: 'MultiPolygon';
  readonly coordinates: readonly (readonly GeoRing[])[];
}
```

A GeoJSON `MultiPolygon`: one or more polygons.

**GeoPointRenderer**

```ts
type GeoPointRenderer =
  | 'auto'
  | 'svg'
  | 'canvas'
  | {readonly type: 'auto'; readonly maxSvgPoints: number};
```

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 including `maxSvgPoints` renderable
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.

**GeoPolygon**

```ts
interface GeoPolygon {
  readonly type: 'Polygon';
  readonly coordinates: readonly GeoRing[];
}
```

A GeoJSON `Polygon`: an exterior ring followed by its holes.

**GeoPosition**

```ts
type GeoPosition = readonly [longitude: number, latitude: number];
```

A GeoJSON position: `[longitude, latitude]` in degrees.

**GeoPresentation**

```ts
type GeoPresentation = ValuePresentation;
```

How values and coordinates are formatted: a BCP 47 locale tag or an
explicit presentation context (`@workspace/active-format`).

**GeoProjection**

```ts
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'};
```

The projection of a map. There is no automatic choice: the host
names one.

- `equal-earth`: the world. Equal-area. Fits the whole sphere by default;
`fit: 'content'` fits the drawn geometry instead.
- `conic-equal-area`: 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.
- `mercator`: only when the host asks for it (it inflates area away from
the equator). Fitted to the drawn geometry.

**GeoRing**

```ts
type GeoRing = readonly GeoPosition[];
```

A closed ring: the first and last position are equal.

**GeoRingConvention**

```ts
type GeoRingConvention = 'rfc7946' | 'spherical';
```

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.

**GeoSelectionOptions**

```ts
interface GeoSelectionOptions {
  readonly enabled?: boolean;
  readonly mode?: 'single' | 'multiple';
}
```

Selection behaviour of a map.

**GeoToggleSlotProps**

```ts
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 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.

**GeoValueSemantics**

```ts
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;
    };
```

What a numeric value means, declared once per layer. Exactly the shape of
`ChartValueSemantics` in active-charts (product-family pattern, D-12):
the same declaration and value give the same text in both products.
