/* eslint-disable */ /* tslint:disable */ /** * This is an autogenerated file created by the Stencil compiler. * It contains typing information for all components that exist in this project. */ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime"; import { PreviewError } from "./lib/errors"; import { EaseToOptions, LngLatBoundsLike, MapGeoJSONFeature, MapLibreMap } from "maplibre-gl"; import { ResourceKind } from "./lib/resources/resource"; import { RequestTransform } from "./lib/request"; import { References } from "./lib/references"; import { FieldDefinitions } from "./lib/field-definitions"; import { LayerControl } from "./lib/layers"; import { ColorRampName } from "./lib/colormap"; import { LegendEntry } from "./lib/legend"; import { AnyPreviewer } from "./lib/previewers/factory"; export { PreviewError } from "./lib/errors"; export { EaseToOptions, LngLatBoundsLike, MapGeoJSONFeature, MapLibreMap } from "maplibre-gl"; export { ResourceKind } from "./lib/resources/resource"; export { RequestTransform } from "./lib/request"; export { References } from "./lib/references"; export { FieldDefinitions } from "./lib/field-definitions"; export { LayerControl } from "./lib/layers"; export { ColorRampName } from "./lib/colormap"; export { LegendEntry } from "./lib/legend"; export { AnyPreviewer } from "./lib/previewers/factory"; export namespace Components { interface OgmAlerts { "error"?: PreviewError; /** * @default initialTheme(this.el) */ "theme": 'light' | 'dark'; } interface OgmAttributes { /** * @default [] */ "features": MapGeoJSONFeature[]; "kind"?: ResourceKind; "references"?: References; "requestTransform"?: RequestTransform; } interface OgmFields { "definitions"?: FieldDefinitions; "theme": 'light' | 'dark'; } interface OgmImage { /** * @default 0 */ "padding": number; "previewer": ImagePreviewer; /** * @default initialTheme(this.el) */ "theme": 'light' | 'dark'; } interface OgmLayers { /** * @default [] */ "layers": LayerControl[]; "theme": 'light' | 'dark'; } interface OgmLegend { /** * @default [] */ "entries": LegendEntry[]; /** * @default [] */ "layers": LayerControl[]; "theme": 'light' | 'dark'; } interface OgmLocator { /** * Whether a wheel needs the command key, and a touch drag needs a second finger, before either reaches the map - see MapLibre's CooperativeGesturesHandler. On by default, since a small map embedded in a page must not eat the scroll a reader meant for the page around it. A page that gives the map the whole screen, or has its own way of keeping the two apart, can turn it off. * @default true */ "cooperativeGestures": boolean; "darkBasemap"?: string; "lightBasemap"?: string; "previewer"?: LocationPreviewer; "record"?: OgmRecord; "recordUrl"?: string; /** * @default initialTheme(this.el) */ "theme": 'light' | 'dark'; } interface OgmMap { /** * Whether a wheel needs the command key, and a touch drag needs a second finger, before either reaches the map - see MapLibre's CooperativeGesturesHandler. On by default, since a small map embedded in a page must not eat the scroll a reader meant for the page around it. A page that gives the map the whole screen, or has its own way of keeping the two apart, can turn it off. * @default true */ "cooperativeGestures": boolean; "darkBasemap"?: string; "easeMapTo": (options: EaseToOptions) => Promise; "lightBasemap"?: string; /** * @default 0 */ "padding": number; "previewer": MapPreviewer; "references"?: References; /** * @default initialTheme(this.el) */ "theme": 'light' | 'dark'; } interface OgmMenubar { /** * @default false */ "hideTitle": boolean; /** * @default false */ "loading": boolean; "record": OgmRecord; "theme": 'light' | 'dark'; } interface OgmMetadata { "fieldNames": string[]; "record": OgmRecord; "theme": 'light' | 'dark'; } /** * Where several records are: one numbered marker apiece, and optionally a way to search the map for * more of them. * Nothing of a record is drawn but its number. A page of boxes says less than a page of numbers a * reader can find again in the list beside the map, and the only two boxes worth drawing are the ones * that answer a question: which area is being searched, and where the one result something outside has * pointed at actually is. For a single record on a map of its own, see . */ interface OgmOverview { /** * Whether a wheel needs the command key, and a touch drag needs a second finger, before either reaches the map - see MapLibre's CooperativeGesturesHandler. On by default, since a small map embedded in a page must not eat the scroll a reader meant for the page around it. A page that gives the map the whole screen, or has its own way of keeping the two apart, can turn it off. * @default true */ "cooperativeGestures": boolean; "darkBasemap"?: string; /** * Whether a reader can search the map by holding shift and dragging a box over it. The area they drew is reported through `boundsChange`; nothing here answers it, because what a new area means is the embedding page's to say. The help text is a prop because GeoBlacklight runs the strings for the control this replaces through Rails I18n. * @default false */ "geosearch": boolean; /** * Which result to bring forward, as either its place in the list counted from one or the id of the record - or of the resource a previewer draws - that it came from. An attribute hands over a string for either, since an attribute is always one. The marker changes color and comes to the front, and the result's own extent is drawn around it. The camera doesn't move: something on the page has said which result matters, not where to look. A reader's pointer over a number does the same thing without being asked, so both can be true at once - of two different results, if a page names one while the pointer is over another. Each is a way of saying the same thing about a row, so each gets the same drawing; see draw. */ "highlighted"?: number | string; "lightBasemap"?: string; "previewers"?: (LocationPreviewer | undefined)[]; "records"?: OgmRecord[]; /** * The area a search is currently filtered to, drawn as a box and framed by the camera. Given as the west, south, east, north degrees `boundsChange` reports, as an ENVELOPE string in the form `dcat_bbox` holds one, or as anything else MapLibre reads as bounds. A string is read from an attribute, so a page rendered by a server can say what its map is filtered to without any JavaScript at all. It goes on holding: whenever what is drawn changes, the camera returns here rather than re-framing itself around the new set of results. Wins over `viewBounds` when both are given, an active filter being the stronger statement - though in practice a page states one or the other, never both. Leave it unset for a map that should look at whatever it has been given; see `viewBounds` for a default to open on instead of the whole world. */ "searchBounds"?: LngLatBoundsLike | string; /** * @default 'Shift + drag to search an area' */ "searchHelpText": string; /** * @default initialTheme(this.el) */ "theme": 'light' | 'dark'; /** * Where to point the camera when there is nothing else to look at - no active search, no results - in place of the whole world. Given in the same form as `searchBounds` and read the same way, but nothing about it is drawn: no box, no marker, nothing on the map says it is there. Framed exactly, with no padding and no ceiling on how far in the camera can zoom - unlike `searchBounds` and the extent of a set of results, which both keep the theme's gap because neither one is a promise about what should fill the frame. This one is: a page that sets it has already chosen the exact box the map should show, so nothing here second-guesses that choice. */ "viewBounds"?: LngLatBoundsLike | string; } interface OgmPreview { /** * @default true */ "cooperativeGestures": boolean; "darkBasemap"?: string; "lightBasemap"?: string; "previewer": AnyPreviewer; "references"?: References; "sidebarPadding": number; /** * @default initialTheme(this.el) */ "theme": 'light' | 'dark'; } interface OgmPreviews { "darkBasemap"?: string; "lightBasemap"?: string; "previewers"?: AnyPreviewer[]; "record"?: OgmRecord; "requestTransform"?: RequestTransform; "sidebarPadding": number; /** * @default initialTheme(this.el) */ "theme": 'light' | 'dark'; } interface OgmSidebar { /** * @default false */ "open": boolean; "record": OgmRecord; "requestTransform"?: RequestTransform; "theme": 'light' | 'dark'; } interface OgmViewer { "darkBasemap"?: string; /** * @default false */ "hideTitle": boolean; "lightBasemap"?: string; "loadRecord": (record: OgmRecord) => Promise; "recordUrl": string; "requestTransform"?: RequestTransform; /** * @default initialTheme(this.el) */ "theme": 'light' | 'dark'; } } export interface OgmAttributesCustomEvent extends CustomEvent { detail: T; target: HTMLOgmAttributesElement; } export interface OgmImageCustomEvent extends CustomEvent { detail: T; target: HTMLOgmImageElement; } export interface OgmLayersCustomEvent extends CustomEvent { detail: T; target: HTMLOgmLayersElement; } export interface OgmMapCustomEvent extends CustomEvent { detail: T; target: HTMLOgmMapElement; } export interface OgmMenubarCustomEvent extends CustomEvent { detail: T; target: HTMLOgmMenubarElement; } export interface OgmOverviewCustomEvent extends CustomEvent { detail: T; target: HTMLOgmOverviewElement; } export interface OgmPreviewsCustomEvent extends CustomEvent { detail: T; target: HTMLOgmPreviewsElement; } declare global { interface HTMLOgmAlertsElement extends Components.OgmAlerts, HTMLStencilElement { } var HTMLOgmAlertsElement: { prototype: HTMLOgmAlertsElement; new (): HTMLOgmAlertsElement; }; interface HTMLOgmAttributesElementEventMap { "featureSelected": MapGeoJSONFeature; } interface HTMLOgmAttributesElement extends Components.OgmAttributes, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLOgmAttributesElement, ev: OgmAttributesCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLOgmAttributesElement, ev: OgmAttributesCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLOgmAttributesElement: { prototype: HTMLOgmAttributesElement; new (): HTMLOgmAttributesElement; }; interface HTMLOgmFieldsElement extends Components.OgmFields, HTMLStencilElement { } var HTMLOgmFieldsElement: { prototype: HTMLOgmFieldsElement; new (): HTMLOgmFieldsElement; }; interface HTMLOgmImageElementEventMap { "imageLoaded": void; "imageLoading": void; "previewError": PreviewError; } interface HTMLOgmImageElement extends Components.OgmImage, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLOgmImageElement, ev: OgmImageCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLOgmImageElement, ev: OgmImageCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLOgmImageElement: { prototype: HTMLOgmImageElement; new (): HTMLOgmImageElement; }; interface HTMLOgmLayersElementEventMap { "layerVisibilityChange": { id: string; visible: boolean }; "layerOpacityChange": { id: string; opacity: number }; "layerColorRampChange": { id: string; colorRamp: ColorRampName }; "layerBackgroundRemovalChange": { id: string; removeBackground: boolean }; "allLayersVisibilityChange": boolean; } interface HTMLOgmLayersElement extends Components.OgmLayers, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLOgmLayersElement, ev: OgmLayersCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLOgmLayersElement, ev: OgmLayersCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLOgmLayersElement: { prototype: HTMLOgmLayersElement; new (): HTMLOgmLayersElement; }; interface HTMLOgmLegendElement extends Components.OgmLegend, HTMLStencilElement { } var HTMLOgmLegendElement: { prototype: HTMLOgmLegendElement; new (): HTMLOgmLegendElement; }; interface HTMLOgmLocatorElement extends Components.OgmLocator, HTMLStencilElement { } var HTMLOgmLocatorElement: { prototype: HTMLOgmLocatorElement; new (): HTMLOgmLocatorElement; }; interface HTMLOgmMapElementEventMap { "mapIdle": void; "mapLoading": void; "previewError": PreviewError; } interface HTMLOgmMapElement extends Components.OgmMap, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLOgmMapElement, ev: OgmMapCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLOgmMapElement, ev: OgmMapCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLOgmMapElement: { prototype: HTMLOgmMapElement; new (): HTMLOgmMapElement; }; interface HTMLOgmMenubarElementEventMap { "sidebarToggled": any; } interface HTMLOgmMenubarElement extends Components.OgmMenubar, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLOgmMenubarElement, ev: OgmMenubarCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLOgmMenubarElement, ev: OgmMenubarCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLOgmMenubarElement: { prototype: HTMLOgmMenubarElement; new (): HTMLOgmMenubarElement; }; interface HTMLOgmMetadataElement extends Components.OgmMetadata, HTMLStencilElement { } var HTMLOgmMetadataElement: { prototype: HTMLOgmMetadataElement; new (): HTMLOgmMetadataElement; }; interface HTMLOgmOverviewElementEventMap { "boundsChange": [number, number, number, number]; "highlightChange": { place: number; id: string } | null; } /** * Where several records are: one numbered marker apiece, and optionally a way to search the map for * more of them. * Nothing of a record is drawn but its number. A page of boxes says less than a page of numbers a * reader can find again in the list beside the map, and the only two boxes worth drawing are the ones * that answer a question: which area is being searched, and where the one result something outside has * pointed at actually is. For a single record on a map of its own, see . */ interface HTMLOgmOverviewElement extends Components.OgmOverview, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLOgmOverviewElement, ev: OgmOverviewCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLOgmOverviewElement, ev: OgmOverviewCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLOgmOverviewElement: { prototype: HTMLOgmOverviewElement; new (): HTMLOgmOverviewElement; }; interface HTMLOgmPreviewElement extends Components.OgmPreview, HTMLStencilElement { } var HTMLOgmPreviewElement: { prototype: HTMLOgmPreviewElement; new (): HTMLOgmPreviewElement; }; interface HTMLOgmPreviewsElementEventMap { "previewsLoading": void; "previewsLoaded": void; } interface HTMLOgmPreviewsElement extends Components.OgmPreviews, HTMLStencilElement { addEventListener(type: K, listener: (this: HTMLOgmPreviewsElement, ev: OgmPreviewsCustomEvent) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLOgmPreviewsElement, ev: OgmPreviewsCustomEvent) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } var HTMLOgmPreviewsElement: { prototype: HTMLOgmPreviewsElement; new (): HTMLOgmPreviewsElement; }; interface HTMLOgmSidebarElement extends Components.OgmSidebar, HTMLStencilElement { } var HTMLOgmSidebarElement: { prototype: HTMLOgmSidebarElement; new (): HTMLOgmSidebarElement; }; interface HTMLOgmViewerElement extends Components.OgmViewer, HTMLStencilElement { } var HTMLOgmViewerElement: { prototype: HTMLOgmViewerElement; new (): HTMLOgmViewerElement; }; interface HTMLElementTagNameMap { "ogm-alerts": HTMLOgmAlertsElement; "ogm-attributes": HTMLOgmAttributesElement; "ogm-fields": HTMLOgmFieldsElement; "ogm-image": HTMLOgmImageElement; "ogm-layers": HTMLOgmLayersElement; "ogm-legend": HTMLOgmLegendElement; "ogm-locator": HTMLOgmLocatorElement; "ogm-map": HTMLOgmMapElement; "ogm-menubar": HTMLOgmMenubarElement; "ogm-metadata": HTMLOgmMetadataElement; "ogm-overview": HTMLOgmOverviewElement; "ogm-preview": HTMLOgmPreviewElement; "ogm-previews": HTMLOgmPreviewsElement; "ogm-sidebar": HTMLOgmSidebarElement; "ogm-viewer": HTMLOgmViewerElement; } } declare namespace LocalJSX { interface OgmAlerts { "error"?: PreviewError; /** * @default initialTheme(this.el) */ "theme"?: 'light' | 'dark'; } interface OgmAttributes { /** * @default [] */ "features"?: MapGeoJSONFeature[]; "kind"?: ResourceKind; "onFeatureSelected"?: (event: OgmAttributesCustomEvent) => void; "references"?: References; "requestTransform"?: RequestTransform; } interface OgmFields { "definitions"?: FieldDefinitions; "theme"?: 'light' | 'dark'; } interface OgmImage { "onImageLoaded"?: (event: OgmImageCustomEvent) => void; "onImageLoading"?: (event: OgmImageCustomEvent) => void; "onPreviewError"?: (event: OgmImageCustomEvent) => void; /** * @default 0 */ "padding"?: number; "previewer"?: ImagePreviewer; /** * @default initialTheme(this.el) */ "theme"?: 'light' | 'dark'; } interface OgmLayers { /** * @default [] */ "layers"?: LayerControl[]; "onAllLayersVisibilityChange"?: (event: OgmLayersCustomEvent) => void; "onLayerBackgroundRemovalChange"?: (event: OgmLayersCustomEvent<{ id: string; removeBackground: boolean }>) => void; "onLayerColorRampChange"?: (event: OgmLayersCustomEvent<{ id: string; colorRamp: ColorRampName }>) => void; "onLayerOpacityChange"?: (event: OgmLayersCustomEvent<{ id: string; opacity: number }>) => void; "onLayerVisibilityChange"?: (event: OgmLayersCustomEvent<{ id: string; visible: boolean }>) => void; "theme"?: 'light' | 'dark'; } interface OgmLegend { /** * @default [] */ "entries"?: LegendEntry[]; /** * @default [] */ "layers"?: LayerControl[]; "theme"?: 'light' | 'dark'; } interface OgmLocator { /** * Whether a wheel needs the command key, and a touch drag needs a second finger, before either reaches the map - see MapLibre's CooperativeGesturesHandler. On by default, since a small map embedded in a page must not eat the scroll a reader meant for the page around it. A page that gives the map the whole screen, or has its own way of keeping the two apart, can turn it off. * @default true */ "cooperativeGestures"?: boolean; "darkBasemap"?: string; "lightBasemap"?: string; "previewer"?: LocationPreviewer; "record"?: OgmRecord; "recordUrl"?: string; /** * @default initialTheme(this.el) */ "theme"?: 'light' | 'dark'; } interface OgmMap { /** * Whether a wheel needs the command key, and a touch drag needs a second finger, before either reaches the map - see MapLibre's CooperativeGesturesHandler. On by default, since a small map embedded in a page must not eat the scroll a reader meant for the page around it. A page that gives the map the whole screen, or has its own way of keeping the two apart, can turn it off. * @default true */ "cooperativeGestures"?: boolean; "darkBasemap"?: string; "lightBasemap"?: string; "onMapIdle"?: (event: OgmMapCustomEvent) => void; "onMapLoading"?: (event: OgmMapCustomEvent) => void; "onPreviewError"?: (event: OgmMapCustomEvent) => void; /** * @default 0 */ "padding"?: number; "previewer"?: MapPreviewer; "references"?: References; /** * @default initialTheme(this.el) */ "theme"?: 'light' | 'dark'; } interface OgmMenubar { /** * @default false */ "hideTitle"?: boolean; /** * @default false */ "loading"?: boolean; "onSidebarToggled"?: (event: OgmMenubarCustomEvent) => void; "record"?: OgmRecord; "theme"?: 'light' | 'dark'; } interface OgmMetadata { "fieldNames"?: string[]; "record"?: OgmRecord; "theme"?: 'light' | 'dark'; } /** * Where several records are: one numbered marker apiece, and optionally a way to search the map for * more of them. * Nothing of a record is drawn but its number. A page of boxes says less than a page of numbers a * reader can find again in the list beside the map, and the only two boxes worth drawing are the ones * that answer a question: which area is being searched, and where the one result something outside has * pointed at actually is. For a single record on a map of its own, see . */ interface OgmOverview { /** * Whether a wheel needs the command key, and a touch drag needs a second finger, before either reaches the map - see MapLibre's CooperativeGesturesHandler. On by default, since a small map embedded in a page must not eat the scroll a reader meant for the page around it. A page that gives the map the whole screen, or has its own way of keeping the two apart, can turn it off. * @default true */ "cooperativeGestures"?: boolean; "darkBasemap"?: string; /** * Whether a reader can search the map by holding shift and dragging a box over it. The area they drew is reported through `boundsChange`; nothing here answers it, because what a new area means is the embedding page's to say. The help text is a prop because GeoBlacklight runs the strings for the control this replaces through Rails I18n. * @default false */ "geosearch"?: boolean; /** * Which result to bring forward, as either its place in the list counted from one or the id of the record - or of the resource a previewer draws - that it came from. An attribute hands over a string for either, since an attribute is always one. The marker changes color and comes to the front, and the result's own extent is drawn around it. The camera doesn't move: something on the page has said which result matters, not where to look. A reader's pointer over a number does the same thing without being asked, so both can be true at once - of two different results, if a page names one while the pointer is over another. Each is a way of saying the same thing about a row, so each gets the same drawing; see draw. */ "highlighted"?: number | string; "lightBasemap"?: string; "onBoundsChange"?: (event: OgmOverviewCustomEvent<[number, number, number, number]>) => void; /** * Which result the reader's pointer is over: its place in the list counted from one, and the id of the record - or of the resource a previewer draws - it came from. Null once the pointer has left every number. Both terms, because a page holds its results in one or the other, and either is enough to light up the row the reader is pointing at - which is the whole of what this is for: overview.addEventListener('highlightChange', event => mark(event.detail?.id)); The reader's own pointer only. Setting `highlighted` doesn't come back out: a page that has said which result matters already knows, and reporting it would be a loop waiting to be wired. */ "onHighlightChange"?: (event: OgmOverviewCustomEvent<{ place: number; id: string } | null>) => void; "previewers"?: (LocationPreviewer | undefined)[]; "records"?: OgmRecord[]; /** * The area a search is currently filtered to, drawn as a box and framed by the camera. Given as the west, south, east, north degrees `boundsChange` reports, as an ENVELOPE string in the form `dcat_bbox` holds one, or as anything else MapLibre reads as bounds. A string is read from an attribute, so a page rendered by a server can say what its map is filtered to without any JavaScript at all. It goes on holding: whenever what is drawn changes, the camera returns here rather than re-framing itself around the new set of results. Wins over `viewBounds` when both are given, an active filter being the stronger statement - though in practice a page states one or the other, never both. Leave it unset for a map that should look at whatever it has been given; see `viewBounds` for a default to open on instead of the whole world. */ "searchBounds"?: LngLatBoundsLike | string; /** * @default 'Shift + drag to search an area' */ "searchHelpText"?: string; /** * @default initialTheme(this.el) */ "theme"?: 'light' | 'dark'; /** * Where to point the camera when there is nothing else to look at - no active search, no results - in place of the whole world. Given in the same form as `searchBounds` and read the same way, but nothing about it is drawn: no box, no marker, nothing on the map says it is there. Framed exactly, with no padding and no ceiling on how far in the camera can zoom - unlike `searchBounds` and the extent of a set of results, which both keep the theme's gap because neither one is a promise about what should fill the frame. This one is: a page that sets it has already chosen the exact box the map should show, so nothing here second-guesses that choice. */ "viewBounds"?: LngLatBoundsLike | string; } interface OgmPreview { /** * @default true */ "cooperativeGestures"?: boolean; "darkBasemap"?: string; "lightBasemap"?: string; "previewer"?: AnyPreviewer; "references"?: References; "sidebarPadding"?: number; /** * @default initialTheme(this.el) */ "theme"?: 'light' | 'dark'; } interface OgmPreviews { "darkBasemap"?: string; "lightBasemap"?: string; "onPreviewsLoaded"?: (event: OgmPreviewsCustomEvent) => void; "onPreviewsLoading"?: (event: OgmPreviewsCustomEvent) => void; "previewers"?: AnyPreviewer[]; "record"?: OgmRecord; "requestTransform"?: RequestTransform; "sidebarPadding"?: number; /** * @default initialTheme(this.el) */ "theme"?: 'light' | 'dark'; } interface OgmSidebar { /** * @default false */ "open"?: boolean; "record"?: OgmRecord; "requestTransform"?: RequestTransform; "theme"?: 'light' | 'dark'; } interface OgmViewer { "darkBasemap"?: string; /** * @default false */ "hideTitle"?: boolean; "lightBasemap"?: string; "recordUrl"?: string; "requestTransform"?: RequestTransform; /** * @default initialTheme(this.el) */ "theme"?: 'light' | 'dark'; } interface OgmAlertsAttributes { "theme": 'light' | 'dark'; } interface OgmAttributesAttributes { "kind": ResourceKind; } interface OgmFieldsAttributes { "theme": 'light' | 'dark'; } interface OgmImageAttributes { "theme": 'light' | 'dark'; "padding": number; } interface OgmLayersAttributes { "theme": 'light' | 'dark'; } interface OgmLegendAttributes { "theme": 'light' | 'dark'; } interface OgmLocatorAttributes { "theme": 'light' | 'dark'; "darkBasemap": string; "lightBasemap": string; "recordUrl": string; "cooperativeGestures": boolean; } interface OgmMapAttributes { "theme": 'light' | 'dark'; "darkBasemap": string; "lightBasemap": string; "padding": number; "cooperativeGestures": boolean; } interface OgmMenubarAttributes { "theme": 'light' | 'dark'; "loading": boolean; "hideTitle": boolean; } interface OgmMetadataAttributes { "theme": 'light' | 'dark'; } interface OgmOverviewAttributes { "theme": 'light' | 'dark'; "darkBasemap": string; "lightBasemap": string; "highlighted": string; "geosearch": boolean; "searchHelpText": string; "searchBounds": LngLatBoundsLike | string; "viewBounds": LngLatBoundsLike | string; "cooperativeGestures": boolean; } interface OgmPreviewAttributes { "theme": 'light' | 'dark'; "darkBasemap": string; "lightBasemap": string; "sidebarPadding": number; "cooperativeGestures": boolean; } interface OgmPreviewsAttributes { "theme": 'light' | 'dark'; "darkBasemap": string; "lightBasemap": string; "sidebarPadding": number; } interface OgmSidebarAttributes { "theme": 'light' | 'dark'; "open": boolean; } interface OgmViewerAttributes { "recordUrl": string; "theme": 'light' | 'dark'; "darkBasemap": string; "lightBasemap": string; "hideTitle": boolean; } interface IntrinsicElements { "ogm-alerts": Omit & { [K in keyof OgmAlerts & keyof OgmAlertsAttributes]?: OgmAlerts[K] } & { [K in keyof OgmAlerts & keyof OgmAlertsAttributes as `attr:${K}`]?: OgmAlertsAttributes[K] } & { [K in keyof OgmAlerts & keyof OgmAlertsAttributes as `prop:${K}`]?: OgmAlerts[K] }; "ogm-attributes": Omit & { [K in keyof OgmAttributes & keyof OgmAttributesAttributes]?: OgmAttributes[K] } & { [K in keyof OgmAttributes & keyof OgmAttributesAttributes as `attr:${K}`]?: OgmAttributesAttributes[K] } & { [K in keyof OgmAttributes & keyof OgmAttributesAttributes as `prop:${K}`]?: OgmAttributes[K] }; "ogm-fields": Omit & { [K in keyof OgmFields & keyof OgmFieldsAttributes]?: OgmFields[K] } & { [K in keyof OgmFields & keyof OgmFieldsAttributes as `attr:${K}`]?: OgmFieldsAttributes[K] } & { [K in keyof OgmFields & keyof OgmFieldsAttributes as `prop:${K}`]?: OgmFields[K] }; "ogm-image": Omit & { [K in keyof OgmImage & keyof OgmImageAttributes]?: OgmImage[K] } & { [K in keyof OgmImage & keyof OgmImageAttributes as `attr:${K}`]?: OgmImageAttributes[K] } & { [K in keyof OgmImage & keyof OgmImageAttributes as `prop:${K}`]?: OgmImage[K] }; "ogm-layers": Omit & { [K in keyof OgmLayers & keyof OgmLayersAttributes]?: OgmLayers[K] } & { [K in keyof OgmLayers & keyof OgmLayersAttributes as `attr:${K}`]?: OgmLayersAttributes[K] } & { [K in keyof OgmLayers & keyof OgmLayersAttributes as `prop:${K}`]?: OgmLayers[K] }; "ogm-legend": Omit & { [K in keyof OgmLegend & keyof OgmLegendAttributes]?: OgmLegend[K] } & { [K in keyof OgmLegend & keyof OgmLegendAttributes as `attr:${K}`]?: OgmLegendAttributes[K] } & { [K in keyof OgmLegend & keyof OgmLegendAttributes as `prop:${K}`]?: OgmLegend[K] }; "ogm-locator": Omit & { [K in keyof OgmLocator & keyof OgmLocatorAttributes]?: OgmLocator[K] } & { [K in keyof OgmLocator & keyof OgmLocatorAttributes as `attr:${K}`]?: OgmLocatorAttributes[K] } & { [K in keyof OgmLocator & keyof OgmLocatorAttributes as `prop:${K}`]?: OgmLocator[K] }; "ogm-map": Omit & { [K in keyof OgmMap & keyof OgmMapAttributes]?: OgmMap[K] } & { [K in keyof OgmMap & keyof OgmMapAttributes as `attr:${K}`]?: OgmMapAttributes[K] } & { [K in keyof OgmMap & keyof OgmMapAttributes as `prop:${K}`]?: OgmMap[K] }; "ogm-menubar": Omit & { [K in keyof OgmMenubar & keyof OgmMenubarAttributes]?: OgmMenubar[K] } & { [K in keyof OgmMenubar & keyof OgmMenubarAttributes as `attr:${K}`]?: OgmMenubarAttributes[K] } & { [K in keyof OgmMenubar & keyof OgmMenubarAttributes as `prop:${K}`]?: OgmMenubar[K] }; "ogm-metadata": Omit & { [K in keyof OgmMetadata & keyof OgmMetadataAttributes]?: OgmMetadata[K] } & { [K in keyof OgmMetadata & keyof OgmMetadataAttributes as `attr:${K}`]?: OgmMetadataAttributes[K] } & { [K in keyof OgmMetadata & keyof OgmMetadataAttributes as `prop:${K}`]?: OgmMetadata[K] }; "ogm-overview": Omit & { [K in keyof OgmOverview & keyof OgmOverviewAttributes]?: OgmOverview[K] } & { [K in keyof OgmOverview & keyof OgmOverviewAttributes as `attr:${K}`]?: OgmOverviewAttributes[K] } & { [K in keyof OgmOverview & keyof OgmOverviewAttributes as `prop:${K}`]?: OgmOverview[K] }; "ogm-preview": Omit & { [K in keyof OgmPreview & keyof OgmPreviewAttributes]?: OgmPreview[K] } & { [K in keyof OgmPreview & keyof OgmPreviewAttributes as `attr:${K}`]?: OgmPreviewAttributes[K] } & { [K in keyof OgmPreview & keyof OgmPreviewAttributes as `prop:${K}`]?: OgmPreview[K] }; "ogm-previews": Omit & { [K in keyof OgmPreviews & keyof OgmPreviewsAttributes]?: OgmPreviews[K] } & { [K in keyof OgmPreviews & keyof OgmPreviewsAttributes as `attr:${K}`]?: OgmPreviewsAttributes[K] } & { [K in keyof OgmPreviews & keyof OgmPreviewsAttributes as `prop:${K}`]?: OgmPreviews[K] }; "ogm-sidebar": Omit & { [K in keyof OgmSidebar & keyof OgmSidebarAttributes]?: OgmSidebar[K] } & { [K in keyof OgmSidebar & keyof OgmSidebarAttributes as `attr:${K}`]?: OgmSidebarAttributes[K] } & { [K in keyof OgmSidebar & keyof OgmSidebarAttributes as `prop:${K}`]?: OgmSidebar[K] }; "ogm-viewer": Omit & { [K in keyof OgmViewer & keyof OgmViewerAttributes]?: OgmViewer[K] } & { [K in keyof OgmViewer & keyof OgmViewerAttributes as `attr:${K}`]?: OgmViewerAttributes[K] } & { [K in keyof OgmViewer & keyof OgmViewerAttributes as `prop:${K}`]?: OgmViewer[K] }; } } export { LocalJSX as JSX }; declare module "@stencil/core" { export namespace JSX { interface IntrinsicElements { "ogm-alerts": LocalJSX.IntrinsicElements["ogm-alerts"] & JSXBase.HTMLAttributes; "ogm-attributes": LocalJSX.IntrinsicElements["ogm-attributes"] & JSXBase.HTMLAttributes; "ogm-fields": LocalJSX.IntrinsicElements["ogm-fields"] & JSXBase.HTMLAttributes; "ogm-image": LocalJSX.IntrinsicElements["ogm-image"] & JSXBase.HTMLAttributes; "ogm-layers": LocalJSX.IntrinsicElements["ogm-layers"] & JSXBase.HTMLAttributes; "ogm-legend": LocalJSX.IntrinsicElements["ogm-legend"] & JSXBase.HTMLAttributes; "ogm-locator": LocalJSX.IntrinsicElements["ogm-locator"] & JSXBase.HTMLAttributes; "ogm-map": LocalJSX.IntrinsicElements["ogm-map"] & JSXBase.HTMLAttributes; "ogm-menubar": LocalJSX.IntrinsicElements["ogm-menubar"] & JSXBase.HTMLAttributes; "ogm-metadata": LocalJSX.IntrinsicElements["ogm-metadata"] & JSXBase.HTMLAttributes; /** * Where several records are: one numbered marker apiece, and optionally a way to search the map for * more of them. * Nothing of a record is drawn but its number. A page of boxes says less than a page of numbers a * reader can find again in the list beside the map, and the only two boxes worth drawing are the ones * that answer a question: which area is being searched, and where the one result something outside has * pointed at actually is. For a single record on a map of its own, see . */ "ogm-overview": LocalJSX.IntrinsicElements["ogm-overview"] & JSXBase.HTMLAttributes; "ogm-preview": LocalJSX.IntrinsicElements["ogm-preview"] & JSXBase.HTMLAttributes; "ogm-previews": LocalJSX.IntrinsicElements["ogm-previews"] & JSXBase.HTMLAttributes; "ogm-sidebar": LocalJSX.IntrinsicElements["ogm-sidebar"] & JSXBase.HTMLAttributes; "ogm-viewer": LocalJSX.IntrinsicElements["ogm-viewer"] & JSXBase.HTMLAttributes; } } }