Types
FeatureOption, GeoApplyStateOptions, GeoApplyStateResult, GeoAreaFeature and 114 more: generated from the source of active-geo.
Exported by @workspace/. Generated from the package source; part of the index of every export.
Types#
- Type
type FeatureOption<T> = T | boolean;
true on (the farther object kept), false off, an object refines.
interface GeoApplyStateOptions {
readonly isCompatible?: (
saved: GeoDatasetIdentity | null,
current: GeoDatasetIdentity | null,
) => boolean;
readonly fields?: readonly GeoStateField[];
}interface GeoApplyStateResult {
readonly status: 'applied' | 'partial' | 'rejected';
readonly reason?: GeoStateReason;
readonly version: 1 | 2 | null;
readonly fields: readonly GeoStateFieldResult[];
readonly entries: readonly GeoStateEntryResult[];
readonly requested: {
readonly level?: string;
readonly layers?: Readonly<Record<string, boolean>>;
};
}interface GeoAreaFeature<TMeta = unknown> {
readonly key: GeoKey;
readonly name?: string;
readonly geometry: GeoAreaGeometry | null;
readonly values?: GeoValues;
readonly details?: readonly GeoDetail[];
readonly meta?: TMeta;
}interface GeoAreaLayer<TMeta = unknown> extends GeoDataLayerBase<TMeta> {
readonly type: 'area';
readonly features: readonly GeoAreaFeature<TMeta>[];
readonly data?: readonly GeoDataRecord[];
readonly convention?: GeoRingConvention;
readonly fill?: GeoFill;
readonly stroke?: {readonly color?: GeoColor; readonly width?: number};
}type GeoAttribution =
| string
| {readonly text: string; readonly position?: GeoCorner | 'below' | 'none'};interface GeoCategoryDefinition {
readonly id: GeoId;
readonly label?: string;
}interface GeoCategoryMeasure extends GeoMeasureBase {
readonly kind: 'category';
readonly categories: readonly GeoCategoryDefinition[];
readonly semantics?: never;
}Every channel. OUTPUT: shape, rotation, color, width dormant in P1.
type GeoChannel =
'fill' | 'size' | 'shape' | 'rotation' | 'color' | 'width';Classed colour scales; class by class index. End classes are open.
type GeoClassScale =
| {
readonly type: 'threshold';
readonly thresholds: readonly number[];
readonly classLabels?: readonly (string | undefined)[];
}
| {
readonly type: 'quantize';
readonly classes: number;
readonly domain?: readonly [min: number, max: number];
readonly classLabels?: readonly (string | undefined)[];
}
| {readonly type: 'category'}
| (GeoDivergingScale & {
readonly classLabels?: readonly (string | undefined)[];
});OUTPUT, dormant before P4: a cluster as a menu target and in events.
interface GeoClusterSnapshot {
readonly kind: 'cluster';
readonly layerId: string;
readonly clusterId: string;
readonly viewRevision: number;
readonly members: readonly GeoItemRef[];
readonly position: GeoPosition;
readonly count: number;
readonly selectedCount: number;
readonly aggregates: Readonly<
Record<
GeoId,
| {
readonly status: 'value';
readonly value: number;
readonly text: string;
readonly included: number;
}
| {readonly status: 'suppressed' | 'missing'}
>
>;
}- Type
type GeoColor = string;
P1 colour: an own classed scale (no continuous, no shared reference).
interface GeoColorMapping {
readonly measure: GeoId;
readonly scale: GeoClassScale;
readonly palette?: GeoPalette;
readonly legend?: FeatureOption<GeoExplanationOptions>;
}The configuration a source (package, provider, props) can carry.
interface GeoConfigSource {
readonly locale?: GeoPresentation;
readonly t?: GeoTranslateFn;
readonly diagnostics?: GeoDiagnosticSink;
readonly components?: Resettable<GeoComponents>;
readonly header?: FeatureOption<GeoHeaderOptions>;
readonly legend?: FeatureOption<GeoLegendOptions>;
readonly tooltip?: FeatureOption<GeoTooltipOptions>;
readonly zoom?: FeatureOption<GeoZoomOptions>;
readonly contextMenu?: FeatureOption<GeoContextMenuOptions>;
readonly table?: FeatureOption<GeoTableOptions>;
readonly export?: GeoExportOptions;
readonly attribution?: GeoAttribution;
readonly selection?: FeatureOption<GeoSelectionOptions>;
}type GeoCorner = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';interface GeoCsvExportOptions {
readonly layerId: string;
readonly scope?: 'all' | 'selected';
readonly details?: Resettable<boolean>;
readonly text?: Resettable<boolean>;
readonly filename?: string;
readonly download?: boolean;
}P1 custom key: a swatch or a circle.
interface GeoCustomLegendEntry {
readonly label: string;
readonly description?: string;
readonly symbol?:
| {
readonly swatch: GeoColor;
readonly shape?: never;
readonly line?: never;
}
| {
readonly shape: 'circle';
readonly fill?: GeoColor;
readonly line?: never;
readonly swatch?: never;
};
}type GeoDataLayerType = 'area' | 'point' | 'line';A value record joined by key; never together with inline values.
interface GeoDataRecord {
readonly key: GeoKey;
readonly values?: GeoValues;
readonly details?: readonly GeoDetail[];
}type GeoDescribe<TMeta = unknown> = (
context: GeoObjectTextContext<TMeta>,
) => {readonly name?: string; readonly description?: string};interface GeoDetail {
readonly id: GeoId;
readonly label: string;
readonly value: string | number | null;
readonly semantics?: GeoValueSemantics;
}What get reports.
interface GeoEffectivePresentation {
readonly header: boolean;
readonly legend: {
readonly requested: GeoLegendPosition;
readonly position: GeoLegendPosition;
readonly arrangement: 'row' | 'stack';
readonly explanations: readonly GeoExplanationRef[];
} | null;
readonly zoom: {
readonly controls: 'always' | 'on-demand' | 'none';
readonly actions: readonly GeoNavigationAction[];
} | null;
readonly contextMenu:
{readonly [K in keyof GeoMenuFeatures]-?: boolean} | null;
readonly table: {
readonly position: 'below' | 'outlet';
readonly open: boolean;
readonly fellBack: boolean;
} | null;
readonly attribution: GeoCorner | 'below' | 'none' | null;
}type GeoEncodingReading =
| {
readonly status: 'encoded';
readonly channel: GeoChannel;
readonly entry?: GeoScaleEntry;
readonly visual: GeoVisualValue;
}
| {
readonly status: GeoSpecialStatus;
readonly channel: GeoChannel;
readonly visual: GeoVisualValue;
}
| {
readonly status: 'unrepresentable';
readonly channel: GeoChannel;
readonly reason: GeoUnrepresentableReason;
readonly visual: GeoVisualValue;
}
| {
readonly status: 'constant';
readonly channel: GeoChannel;
readonly visual: GeoVisualValue;
};interface GeoEncodingSnapshot {
readonly ref: {readonly layerId: string; readonly channel: GeoChannel};
readonly measure: GeoId | null;
readonly explanation: GeoExplanationRef | null;
readonly fingerprint: string | null;
readonly domain: readonly [number, number] | null;
}type GeoEncodingStatus =
'encoded' | GeoSpecialStatus | 'unrepresentable' | 'constant';interface GeoExplanationOptions {
readonly title?: Resettable<string | false>;
readonly parts?: Resettable<readonly GeoExplanationPart[]>;
readonly statuses?: 'present' | 'listed';
readonly statusLayout?: 'inline' | 'separate';
readonly counts?: {
readonly classes?: Resettable<boolean>;
readonly statuses?: Resettable<boolean>;
};
readonly countScope?: 'drawn' | 'supplied';
readonly display?: 'compact' | 'list';
readonly direction?: 'ascending' | 'descending';
readonly samples?: readonly number[];
}type GeoExplanationPart = 'scale' | GeoSpecialStatus | 'unrepresentable';type GeoExplanationRef =
| {
readonly kind: 'encoding';
readonly layerId: string;
readonly channel: GeoChannel;
}
| {readonly kind: 'scale'; readonly scaleId: GeoId}
| {readonly kind: 'layer'; readonly layerId: string}
| {readonly kind: 'custom'; readonly entryId: GeoId};The explanation references a P1 host can write.
type GeoExplanationRefInput =
| {
readonly kind: 'encoding';
readonly layerId: string;
readonly channel: GeoInputChannel;
}
| {readonly kind: 'layer'; readonly layerId: string}
| {readonly kind: 'custom'; readonly entryId: GeoId};interface GeoExportLegendLayout {
readonly content: 'presentation' | 'all';
readonly position?: 'bottom' | 'end';
readonly arrangement?: 'row' | 'stack';
readonly sections?: Resettable<readonly GeoLegendSection[]>;
}interface GeoExportOptions {
readonly formats?: Resettable<readonly GeoExportFormat[]>;
readonly image?: GeoImageExportDefaults;
readonly csv?: {
readonly details?: Resettable<boolean>;
readonly text?: Resettable<boolean>;
};
readonly limits?: GeoExportLimits;
readonly themes?: GeoExportThemes;
}interface GeoExportResult {
readonly format: GeoExportFormat;
readonly filename: string;
readonly blob: Blob;
readonly downloadStarted: boolean;
readonly frame?: {
readonly x: number;
readonly y: number;
readonly width: number;
readonly height: number;
};
readonly revision: number;
readonly presentationRevision: number;
readonly warnings: readonly GeoExportWarning[];
}interface GeoExportWarning {
readonly code: GeoExportWarningCode;
readonly layerId?: string;
}type GeoExportWarningCode =
| 'image-symbol-fallback'
| 'stylesheet-unreadable'
| 'font-fallback'
| 'gradient-approximation-limit';interface GeoFeatureQuery {
readonly layers?: readonly string[];
readonly rows?: 'all' | 'objects';
readonly items?: readonly GeoItemRef[];
}interface GeoFeatureSnapshot {
readonly revision: number;
readonly presentationRevision: number;
readonly dataset: GeoDatasetIdentity | null;
readonly level: string | null;
readonly layers: readonly GeoLayerSnapshot[];
}- Type
type GeoFill = Geo Color | Geo Color Mapping;
interface GeoFocusReturn {
readonly item: GeoItemRef | null;
readonly origin: 'map' | 'legend' | 'table' | 'host';
}type GeoGeometryStatus =
'drawn' | 'partial' | 'not-projectable' | 'excluded';interface GeoHeaderOptions {
readonly subtitle?: Resettable<boolean>;
}A non-empty set of targets; fingerprints binds them to their meaning. The same type flows in (highlight) and out (on, get, use), so a controlled host needs no cast.
interface GeoHighlight {
readonly targets: readonly GeoHighlightTarget[];
readonly fingerprints?: Readonly<Record<string, string>>;
}interface GeoHighlightChange {
readonly cause: 'legend' | 'chip' | 'api' | 'restore' | 'reconcile';
readonly requested: boolean;
}One highlight target a P1 host can write: an entry of an own explanation (encoding, layer, custom). A shared-scale target is a later phase (v0.5 § 13); it never reaches a highlight in P1.
interface GeoHighlightTarget {
readonly explanation: GeoExplanationRefInput;
readonly entry: GeoScaleEntry;
}Where home() goes; fit() is always the frame.
type GeoHome =
| 'frame'
| {readonly center: GeoPosition; readonly zoom: number}
| {readonly fit: 'layers'; readonly layers: readonly string[]};- Type
type GeoId = string;
A host-chosen identifier (measures, categories, details, sections, custom entries, status blocks): /.
interface GeoImageExportDefaults {
readonly theme?: Resettable<GeoExportTheme>;
readonly extent?: Resettable<'current' | 'fitted'>;
readonly legend?: Resettable<
'presentation' | 'all' | false | GeoExportLegendLayout
>;
readonly title?: Resettable<string | false>;
readonly description?: Resettable<string | false>;
readonly attribution?: Resettable<boolean>;
readonly background?: Resettable<'theme' | 'transparent'>;
readonly labels?: Resettable<boolean>;
readonly scale?: Resettable<number>;
}One image export of the handle or the menu (P1 projection of § 15).
interface GeoImageExportOptions extends GeoImageExportDefaults {
readonly filename?: Resettable<string>;
readonly download?: boolean;
}- Type
type GeoInput Channel = 'fill' | 'size';
The channels a P1 host can encode.
type GeoInvalidReason =
'not-finite' | 'wrong-type' | 'unknown-category' | 'malformed';A map object as reported. OUTPUT: line is dormant in P1.
interface GeoItem extends GeoItemRef {
readonly layerType: GeoDataLayerType;
readonly name: string;
}A key with its machine identity (v1: + JSON).
interface GeoKeyReading {
readonly key: GeoKey | null;
readonly status: 'valid' | 'missing' | 'invalid';
readonly encoded: string | null;
}interface GeoLabelOptions {
readonly fields?: readonly GeoTextField[];
readonly max?: number;
readonly placement?: readonly ('end' | 'start' | 'above' | 'below')[];
}type GeoLayer =
| GeoAreaLayer<any>
| GeoPointLayer<any>
| GeoContextLayer;interface GeoLayerSnapshot {
readonly layerType: GeoDataLayerType;
readonly layerId: string;
readonly visible: boolean;
readonly measures: readonly GeoMeasure[];
readonly detailOrder: readonly GeoId[];
readonly encodings: readonly GeoEncodingSnapshot[];
readonly rows: readonly GeoRowSnapshot[];
}interface GeoLayerTooltipOptions {
readonly title?: Resettable<'name' | false>;
readonly fields?: readonly Exclude<GeoTextField, 'name'>[];
}Activation of one resolved legend entry, cancellable.
interface GeoLegendActivation {
readonly entryId: string;
readonly targets: readonly GeoLegendEntryRef[];
readonly source: 'pointer' | 'keyboard' | 'touch' | 'host-legend';
readonly defaultAction:
'highlight' | 'clear-highlight' | 'filter-out' | 'filter-in' | 'none';
preventDefault(): void;
readonly defaultPrevented: boolean;
}interface GeoLegendEntryRef {
readonly explanation: GeoExplanationRef;
readonly entry: GeoScaleEntry;
}Inside a Geo: the legend model and its action, for a host legend.
interface GeoLegendHook {
readonly model: GeoLegendModel | null;
readonly activate: (entryId: string) => boolean;
}OUTPUT: line and gradient keys dormant in P1.
type GeoLegendKey =
| {
readonly kind: 'swatch';
readonly color: GeoColor;
readonly pattern?: GeoSpecialStatus | 'unrepresentable';
}
| {
readonly kind: 'symbol';
readonly shape: 'circle';
readonly resolved: GeoResolvedVectorSymbol;
readonly color: GeoColor;
readonly radius: number;
readonly hollow: boolean;
}
| {
readonly kind: 'line';
readonly color: GeoColor;
readonly width: number;
readonly dash: 'solid' | 'dashed' | 'dotted';
}
| {
readonly kind: 'gradient';
readonly domain: readonly [min: number, max: number];
readonly stops: readonly {
readonly value: number;
readonly color: GeoColor;
}[];
readonly interpolation: 'oklab' | 'srgb';
readonly srgbStops: readonly {
readonly value: number;
readonly color: GeoColor;
}[];
readonly outOfDomain: 'clamp' | 'unrepresentable';
readonly ticks: readonly {
readonly value: number;
readonly label: string;
}[];
};interface GeoLegendModel {
readonly revision: number;
readonly sections: readonly {
readonly id: string;
readonly title: string | null;
readonly entries: readonly GeoLegendModelEntry[];
}[];
readonly highlight: {
readonly value: GeoHighlight;
readonly status: 'active' | 'dormant';
} | null;
}interface GeoLegendModelEntry {
readonly id: string;
readonly role:
| 'class'
| 'category'
| 'status'
| 'unrepresentable'
| 'layer'
| 'custom'
| 'cluster'
| 'sample'
| 'gradient';
readonly targets: readonly GeoLegendEntryRef[];
readonly label: string;
readonly description: string;
readonly key: GeoLegendKey | null;
readonly sampleValue?: number;
readonly count: number | null;
readonly interactive: boolean;
readonly highlighted: boolean;
readonly filteredOut: boolean;
}interface GeoLegendOptions {
readonly position?: GeoLegendPosition;
readonly offset?: readonly [inline: number, block: number];
readonly align?: 'start' | 'center' | 'end';
readonly arrangement?: 'row' | 'stack';
readonly sections?: Resettable<readonly GeoLegendSection[]>;
readonly unplaced?: 'append' | 'omit';
readonly order?: Resettable<readonly GeoExplanationRefInput[]>;
readonly explanations?: GeoExplanationOptions;
readonly customEntries?: Readonly<Record<GeoId, GeoCustomLegendEntry>>;
readonly interaction?: 'highlight' | 'none' | 'host';
readonly highlightChip?: 'auto' | 'always' | 'never';
}type GeoLegendPosition =
'bottom' | 'top' | 'start' | 'end' | GeoCorner | 'outlet';interface GeoLegendSection {
readonly id: GeoId;
readonly title?: string;
readonly items: readonly GeoLegendSectionItem[];
}type GeoLegendSectionItem =
| {
readonly explanation: GeoExplanationRefInput;
readonly parts?: Resettable<readonly GeoExplanationPart[]>;
}
| {
readonly statuses: {
readonly id: GeoId;
readonly of: readonly GeoExplanationRefInput[];
readonly parts?: readonly (GeoSpecialStatus | 'unrepresentable')[];
};
}
| {readonly custom: GeoId};type GeoLinkStatus = 'inline' | 'linked' | 'no-record' | 'ambiguous';The map's handle (P1 projection: no project/invert). The navigation methods of a controlled view are REQUESTS (§ 10.6); every method runs the same route as the package's own control for it.
interface GeoMapHandle {
zoomIn(): void;
zoomOut(): void;
fit(options?: {readonly layers?: readonly string[]}): void;
home(): void;
pan(direction: 'up' | 'down' | 'left' | 'right'): void;
zoomTo(items: GeoItemRef | readonly GeoItemRef[]): boolean;
focusItem(item: GeoItemRef): boolean;
revealInTable(
item: GeoItemRef,
options?: {readonly focus?: boolean},
): Promise<GeoTableRevealResult>;
exportAsPng(options?: GeoImageExportOptions): Promise<GeoExportResult>;
exportAsSvg(options?: GeoImageExportOptions): Promise<GeoExportResult>;
exportAsCsv(options: GeoCsvExportOptions): Promise<GeoExportResult>;
getFeatures(query?: GeoFeatureQuery): GeoFeatureSnapshot;
getLegendModel(): GeoLegendModel;
activateLegendEntry(entryId: string): boolean;
getEffectivePresentation(): GeoEffectivePresentation;
getState(): GeoMapState;
applyState(
state: unknown,
options?: GeoApplyStateOptions,
): GeoApplyStateResult;
requestLevel(level: GeoLevel, options?: {readonly item?: GeoItemRef}): void;
}interface GeoMapState {
readonly version: 2;
readonly dataset: GeoDatasetIdentity | null;
readonly level: string | null;
readonly view:
| (GeoView & {readonly extent: readonly [GeoPosition, GeoPosition] | null})
| null;
readonly selection: readonly GeoItemRef[];
readonly layers: Readonly<Record<string, {readonly visible: boolean}>>;
readonly encodings: Readonly<
Record<string, Readonly<Partial<Record<GeoChannel, string>>>>
>;
readonly scales: Readonly<Record<GeoId, string>>;
readonly highlight: GeoHighlight | null;
readonly filter: readonly GeoLegendEntryRef[];
}P1 marker: circles only.
interface GeoMarker {
readonly size?: number | GeoSizeMapping;
readonly fill?: GeoFill;
readonly stroke?: {readonly color?: GeoColor; readonly width?: number};
readonly opacity?: number;
}type GeoMeasure = GeoNumberMeasure | GeoCategoryMeasure;type GeoMeasurementReading =
| {
readonly status: 'value';
readonly kind: 'number';
readonly value: number;
readonly text: string;
}
| {
readonly status: 'value';
readonly kind: 'category';
readonly categoryId: GeoId;
readonly text: string;
}
| {readonly status: 'missing'}
| {readonly status: 'invalid'; readonly reason: GeoInvalidReason}
| {readonly status: 'suppressed'};type GeoMeasurementStatus = 'value' | GeoSpecialStatus;interface GeoNumberMeasure extends GeoMeasureBase {
readonly kind?: 'number';
readonly semantics?: GeoValueSemantics;
}interface GeoObjectSnapshot {
readonly kind: 'object';
readonly rowId: string;
readonly ref: GeoItemRef;
readonly keyReading: GeoKeyReading;
readonly name: string;
readonly geometry: GeoGeometryStatus;
readonly geometryReason: string | null;
readonly link: GeoLinkStatus;
readonly linkReason: string | null;
readonly issues: readonly GeoRowIssue[];
readonly position?: GeoPosition;
readonly endpoints?: readonly [GeoPosition, GeoPosition] | null;
readonly frames?: readonly string[];
readonly measurements: Readonly<Record<GeoId, GeoMeasurementReading>>;
readonly encodings: Readonly<Partial<Record<GeoChannel, GeoEncodingReading>>>;
readonly details: readonly GeoDetail[];
readonly selected: boolean;
readonly highlighted: boolean;
readonly filteredOut: boolean;
}What a text callback sees. Never a withheld value.
interface GeoObjectTextContext<TMeta = unknown> {
readonly item: GeoItem;
readonly meta: TMeta | undefined;
readonly measurements: Readonly<Record<GeoId, GeoMeasurementReading>>;
readonly encodings: Readonly<Partial<Record<GeoChannel, GeoEncodingReading>>>;
readonly details: readonly GeoDetail[];
}type GeoPalette =
readonly GeoColor[] | Readonly<Record<GeoId, GeoColor>>;interface GeoPointDatum<TMeta = unknown> {
readonly key: GeoKey;
readonly latitude: number;
readonly longitude: number;
readonly name?: string;
readonly values?: GeoValues;
readonly details?: readonly GeoDetail[];
readonly meta?: TMeta;
}interface GeoPointLayer<
TMeta = unknown,
> extends GeoDataLayerBase<TMeta> {
readonly type: 'point';
readonly points: readonly GeoPointDatum<TMeta>[];
readonly marker?: GeoMarker;
readonly renderer?: GeoPointRenderer;
}type GeoRecordLink =
| 'no-object'
| 'object-excluded'
| 'ambiguous'
| 'invalid-key'
| 'duplicate-key';interface GeoRecordSnapshot {
readonly kind: 'record';
readonly rowId: string;
readonly layerId: string;
readonly source: 'object-input' | 'value-record';
readonly keyReading: GeoKeyReading;
readonly link: GeoRecordLink;
readonly linkReason: string;
readonly issues: readonly GeoRowIssue[];
readonly measurements: Readonly<Record<GeoId, GeoMeasurementReading>>;
readonly details: readonly GeoDetail[];
}OUTPUT: the vector form of a symbol, fully resolved.
interface GeoResolvedVectorSymbol {
readonly kind: 'vector';
readonly label: string;
readonly viewBox: readonly [number, number];
readonly parts: readonly {
readonly path: string;
readonly fill: GeoColor;
readonly fillRule: 'nonzero' | 'evenodd';
}[];
readonly anchor: readonly [number, number];
readonly sizeBasis: 'fill-area' | 'box';
readonly transform: readonly [number, number, number, number, number, number];
readonly stroke: GeoColor;
readonly strokeWidth: number;
readonly opacity: number;
}type GeoRowIssue = 'duplicate-detail-id' | 'key-type-differs';type GeoRowSnapshot = GeoObjectSnapshot | GeoRecordSnapshot;type GeoScaleEntry =
| {readonly kind: 'class'; readonly index: number}
| {readonly kind: 'category'; readonly categoryId: GeoId}
| {readonly kind: 'status'; readonly status: GeoSpecialStatus}
| {readonly kind: 'unrepresentable'}
| {readonly kind: 'symbol'};OUTPUT: cluster is dormant in P1.
type GeoSelectionChange =
| {
readonly source: 'pointer' | 'keyboard';
readonly item: GeoItem;
readonly selected: boolean;
}
| {readonly source: 'update'; readonly removed: readonly GeoItemRef[]}
| {readonly source: 'restore'}
| {readonly source: 'api'}
| {readonly source: 'cluster'; readonly members: readonly GeoItemRef[]};Area ∝ value; the radius of the equal-area circle.
interface GeoSizeMapping {
readonly measure: GeoId;
readonly domainMax?: number;
readonly maxRadius?: number;
readonly legend?: FeatureOption<GeoExplanationOptions>;
}type GeoSpecialStatus = 'missing' | 'invalid' | 'suppressed';type GeoStateDisposition =
'applied' | 'adjusted' | 'delegated' | 'dropped' | 'unchanged';type GeoStateEntryResult =
| {
readonly field: 'selection';
readonly item: GeoItemRef;
readonly reason: 'objects-missing' | 'malformed';
}
| {
readonly field: 'layers';
readonly layerId: string;
readonly reason: 'unknown-layer';
}
| {
readonly field: 'highlight' | 'filter';
readonly entry: GeoLegendEntryRef;
readonly reason:
| 'scale-changed'
| 'target-dormant'
| 'unknown-entry'
| 'capability-unavailable';
};type GeoStateField =
'view' | 'selection' | 'layers' | 'highlight' | 'filter' | 'level';interface GeoStateFieldResult {
readonly field: GeoStateField;
readonly disposition: GeoStateDisposition;
readonly reason?: GeoStateReason;
}type GeoStateReason =
| 'malformed'
| 'unsupported-version'
| 'migrated-v1'
| 'dataset-mismatch'
| 'dataset-version-changed'
| 'level-mismatch'
| 'host-owned'
| 'controlled'
| 'invalid-view'
| 'zoom-clamped'
| 'view-clamped'
| 'unknown-layer'
| 'objects-missing'
| 'scale-changed'
| 'target-dormant'
| 'unknown-entry'
| 'not-requested'
| 'capability-unavailable';interface GeoSuppressed {
readonly suppressed: true;
}interface GeoTableOptions {
readonly position?: 'below' | 'outlet';
readonly open?: boolean;
readonly defaultOpen?: boolean;
readonly onOpenChange?: (
open: boolean,
cause: 'menu' | 'api' | 'reveal' | 'escape',
) => void;
readonly layers?: readonly string[];
}interface GeoTableRequest {
readonly item: GeoItemRef;
readonly focus: boolean;
readonly source: 'menu' | 'keyboard' | 'api';
readonly requestId: number;
readonly revision: number;
readonly dataset: GeoDatasetIdentity | null;
readonly signal: AbortSignal;
readonly returnFocus: GeoFocusReturn;
}type GeoTableRequestOutcome =
| {readonly status: 'shown'; readonly focus: 'host' | 'none' | 'package'}
| {readonly status: 'unavailable'; readonly reason?: string};type GeoTableRevealFailure =
| 'no-table'
| 'item-unknown'
| 'host-refused'
| 'host-failed'
| 'not-opened'
| 'outlet-hidden'
| 'not-focusable'
| 'superseded'
| 'unmounted'
| 'stale-data';Every reveal settles exactly once with one of these.
type GeoTableRevealResult =
| {
readonly status: 'revealed';
readonly by: 'host' | 'package';
readonly focused: boolean;
}
| {
readonly status: 'unavailable';
readonly reason: GeoTableRevealFailure;
readonly hostReason?: string;
};P1 text fields: encoding fields on P1 channels only.
type GeoTextField =
| 'name'
| {readonly measure: GeoId; readonly show?: never; readonly encoding?: never}
| {
readonly encoding: GeoInputChannel;
readonly show?: 'class' | 'value-and-class';
readonly measure?: never;
}
| {readonly detail: GeoId}
| 'details';interface GeoTooltipOptions {
readonly anchor?: Resettable<'object' | 'pointer'>;
readonly delay?: Resettable<number>;
readonly pinOnTap?: Resettable<boolean>;
}OUTPUT: negative- and not- dormant in P1.
type GeoUnrepresentableReason =
'negative-size' | 'negative-width' | 'out-of-domain' | 'not-rotatable';A number, a category id, null/absent (missing) or {suppressed: true}.
type GeoValueInput = number | string | null | GeoSuppressed;Resolves to Readonly<Record<string, Geo.
type GeoValues = Readonly<Record<GeoId, GeoValueInput | undefined>>;One value for coordinates AND mode, controlled or uncontrolled.
type GeoView =
| {readonly mode: 'frame'}
| {
readonly mode: 'free';
readonly center: GeoPosition;
readonly zoom: number;
};type GeoViewCause =
| 'pointer'
| 'wheel'
| 'pinch'
| 'keyboard'
| 'control'
| 'menu'
| 'api'
| 'focus-follow'
| 'restore'
| 'level'
| 'cluster'
| 'reconcile';interface GeoViewChange {
readonly cause: GeoViewCause;
readonly requested: boolean;
}- Type
type GeoView Mode = Geo View['mode'];
Resolves to "frame" | "free".
OUTPUT: width, shape, rotation dormant in P1.
type GeoVisualValue =
| {
readonly kind: 'color';
readonly color: GeoColor;
readonly pattern?: GeoSpecialStatus | 'unrepresentable';
}
| {readonly kind: 'radius'; readonly radius: number; readonly hollow: boolean}
| {readonly kind: 'width'; readonly width: number}
| {readonly kind: 'shape'; readonly shape: string | {readonly symbol: GeoId}}
| {readonly kind: 'rotation'; readonly degrees: number};type GeoZoomControls =
| {
readonly visibility: 'always';
readonly position?: GeoCorner;
readonly orientation?: 'horizontal' | 'vertical';
readonly actions?: Resettable<readonly GeoNavigationAction[]>;
}
| {
readonly visibility: 'on-demand';
readonly keepWhileZoomed?: boolean;
readonly position?: GeoCorner;
readonly orientation?: 'horizontal' | 'vertical';
readonly actions?: Resettable<readonly GeoNavigationAction[]>;
};interface GeoZoomOptions {
readonly controls?: Resettable<false | GeoZoomControls>;
readonly gestures?: {
readonly wheel?: Resettable<'modifier' | 'free' | false>;
readonly drag?: Resettable<boolean>;
readonly pinch?: Resettable<boolean>;
readonly doubleClick?: Resettable<'zoom-in' | false>;
};
readonly keyboardShortcuts?: Resettable<boolean>;
readonly minZoom?: Resettable<number>;
readonly maxZoom?: Resettable<number>;
}- Type
type Resettable<T> = T | null;
null on a declared path resets it to the package or instance default.