@geolibre/core 3.3.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as BLANK_BASEMAP, $n as QuickFilterKind, $t as LayerPopupConfig, A as PlanetaryBasemap, An as OPENFREEMAP_BASEMAPS, Ar as isDefaultPrintLayout, At as FieldVisibility, B as getEllipsoid, Bn as ProcessingModelGraph, Br as Point, Bt as LabelDedupe, C as ELLIPSOIDS, Cn as ModelGraphNode, Cr as styleValue, Ct as DashboardWidget, D as PLANETARY_BASEMAP_GROUPS, Dn as ModelToolProvider, Dr as PrintLayoutLegendEntry, Dt as DiagramSizeMode, E as PLANETARY_BASEMAPS, En as ModelPortKind, Er as PrintLayoutCorner, Et as DiagramField, F as earthLengthToBody, Fn as PopupDateFormat, Fr as Feature, Ft as GeometryGeneratorType, G as AddTileLayerOptions, Gn as ProcessingRunStatus, Gr as availableCesiumBasemap, Gt as LayerDescriptiveMetadata, H as getPlanetaryBasemapByStyleUrl, Hn as ProcessingRerunRequest, Hr as CESIUM_BASEMAPS, Ht as LabelTransform, I as getActiveBodyRadiusRatio, In as PopupFieldConfig, Ir as FeatureCollection, It as IndicatorAggregation, J as AppRole, Jn as ProjectPluginControlPosition, Jr as sameCesiumImagery, Jt as LayerJoinStats, K as AppCapabilities, Kn as ProjectComment, Kr as basemapToCesiumImagery, Kt as LayerGroup, L as getActiveEllipsoid, Ln as PopupFieldFormat, Lr as Geometry, Lt as LARGE_VECTOR_FEATURE_THRESHOLD, M as PlanetaryBasemapSectionId, Mn as PROTOMAPS_BASEMAPS, Mr as printLayoutConfigsEqual, Mt as GeoLibreLayer, N as bodyLengthToEarth, Nn as ParticipantIdentity, Nr as scrubPrintLayoutForLayers, Nt as GeoLibreProject, O as PLANETARY_BASEMAP_SENTINEL_PREFIX, On as NETCDF_IMAGE_SOURCE_KIND, Or as PrintLayoutPageFilter, Ot as DiagramType, P as earthAreaToBody, Pn as PointRenderer, Pr as scrubPrintLayoutForRemovedLayers, Pt as GeocodingPreferences, Q as AttributeFormWidget, Qn as QuickFilterDateKind, Qt as LayerMetadataTemporalExtent, R as getActiveMeanRadiusMeters, Rn as PopupFieldKind, Rr as LineString, Rt as LAYER_TYPES, S as EARTH_MEAN_RADIUS_METERS, Sn as ModelGraphEdge, Sr as shouldUseTiledRendering, St as DUCKDB_VECTOR_ROUTE_BYTES, T as EllipsoidId, Tn as ModelGraphPort, Tr as PrintLayoutConfig, Tt as DashboardWidgetType, U as meanRadiusMeters, Un as ProcessingRun, Ur as CesiumBasemapId, Ut as LayerCapabilities, V as getPlanetaryBasemapById, Vn as ProcessingModelStep, Vr as Polygon, Vt as LabelStyle, W as setActiveEllipsoidId, Wn as ProcessingRunKind, Wr as CesiumBasemapImagery, Wt as LayerConnection, X as AttributeFormFieldConfig, Xn as ProjectPreferences, Xt as LayerMetadataContact, Y as AttributeFormConfig, Yn as ProjectPluginState, Yt as LayerLibraryEntry, Z as AttributeFormValueMapEntry, Zn as ProjectTemplateEntry, Zt as LayerMetadataLink, _ as unescapePolyline, _n as MapProjection, _r as VectorRule, _t as DEFAULT_MAP_GRID_LAYOUT, a as collectTransitiveJoinSourceIds, an as LegendCustomEntry, ar as StoryActiveSlideMode, at as CollaborationParticipant, b as transformGeojsonElevation, bn as MapViewState, br as detectNonGeographicCoordinates, bt as DEFAULT_STORY_MAP, c as stripJoinFields, cn as LegendItemOverride, cr as StoryChapterAnimation, ct as CollaborationState, d as batchDecodePolylines, dn as MAX_DASHBOARD_COLUMNS, dr as StoryLayerOpacityChange, dt as CommentReply, en as LayerQuickFilter, er as QuickFilterTextOperator, et as BLEND_MODES, f as decodePolyline, fn as MAX_MAP_GRID_DIM, fr as StoryMap, ft as DEFAULT_BASEMAP, g as polylineStrToGeoJSON, gn as MapPreferences, gr as StyleLibraryEntryKind, gt as DEFAULT_LEGEND_CONFIG, h as geoJSONToPolylineStr, hn as MapGridLayout, hr as StyleLibraryEntry, ht as DEFAULT_LAYER_STYLE, i as cascadeLayerJoinRefresh, in as LegendConfig, ir as SecondaryMapView, it as CollaborationMode, j as PlanetaryBasemapGroup, jn as PROJECT_VERSION, jr as normalizePrintLayoutConfig, jt as FillPattern, k as PLANET_SWITCHER_OPTIONS, kn as NonGeographicCoordinates, kr as createDefaultPrintLayout, kt as EditorTrackingConfig, l as PolylineBatchOptions, ln as LegendPanelPosition, lr as StoryChapterLocation, lt as CommentAnchor, m as encodePolyline, mn as MIN_DASHBOARD_COLUMNS, mr as StrokeWidthUnit, mt as DEFAULT_DASHBOARD_COLUMNS, n as applyJoinsToLayer, nn as LayerType, nr as RuntimeEnvironmentVariable, nt as CollabInvite, o as layerJoinKey, on as LegendCustomItem, or as StoryChapter, ot as CollaborationPresence, p as decodePolylineDetailed, pn as MAX_PROCESSING_HISTORY, pr as StorySlideMode, pt as DEFAULT_BLEND_MODE, q as AppPrivilege, qn as ProjectInteraction, qr as normalizeCesiumBasemap, qt as LayerJoin, r as applyLayerJoins, rn as LayerVirtualField, rr as SQL_QUERY_SOURCE_KIND, rt as CollaborationChatMessage, s as reapplyLayerJoins, sn as LegendCustomShape, sr as StoryChapterAlignment, st as CollaborationRole, t as ApplyLayerJoinsResult, tn as LayerStyle, tr as RecentProjectEntry, tt as BlendMode, u as PolylineDecodeResult, un as LineDecoration, ur as StoryInsetPosition, ut as CommentAuthor, v as geojsonHasZCoordinates, vn as MapRendererKind, vr as VectorStyleMode, vt as DEFAULT_PRIMARY_RENDERER, w as Ellipsoid, wn as ModelGraphNodeKind, wr as DEFAULT_PRINT_LAYOUT, wt as DashboardWidgetAggregation, x as DEFAULT_ELLIPSOID_ID, xn as MarkerShape, xr as isDuckDBQueryLayer, xt as DUCKDB_VECTOR_FEATURE_WARN_COUNT, y as horizontalBbox, yn as MapScaleUnit, yr as VectorStyleStop, yt as DEFAULT_PROJECT_PREFERENCES, z as getActiveSemiMajorAxisMeters, zn as ProcessingModel, zr as MultiPolygon, zt as LabelAnchor } from "./joins-CRZZcLqX.mjs";
1
+ import { $ as collectTransitiveJoinSourceIds, $n as LegendConfig, $r as RuntimeEnvironmentVariable, $t as CollaborationParticipant, A as normalizeMapViewState, Ai as scrubPrintLayoutForLayers, An as GeometryGeneratorType, Ar as PopupDateFormat, At as getActiveBodyRadiusRatio, B as normalizeWidgets, Bi as Geometry, Bn as LayerDescriptiveMetadata, Br as ProcessingRunStatus, Bt as AppCapabilities, C as isSessionOnlyLayer, Ci as PrintLayoutCorner, Cn as EditorTrackingConfig, Cr as NETCDF_IMAGE_SOURCE_KIND, Ct as PLANET_SWITCHER_OPTIONS, D as normalizeDashboardColumns, Di as isDefaultPrintLayout, Dn as GeoLibreProject, Dr as PROTOMAPS_BASEMAPS, Dt as bodyLengthToEarth, E as normalizeBookmarks, Ei as createDefaultPrintLayout, En as GeoLibreLayer, Er as PROJECT_VERSION, Et as PlanetaryBasemapSectionId, F as normalizeProcessingHistory, Fi as featureCollectionToGeoArrow, Fn as LabelDedupe, Fr as ProcessingModelGraph, Ft as getPlanetaryBasemapById, G as serializeProject, Gi as CESIUM_BASEMAPS, Gn as LayerMetadataContact, Gr as ProjectPluginControlPosition, Gt as AttributeFormValueMapEntry, H as portableWmsTileUrl, Hi as MultiPolygon, Hn as LayerJoin, Hr as ProjectBookmarkGroup, Ht as AppRole, I as normalizeProjectComments, Ii as geoArrowToFeatureCollection, In as LabelStyle, Ir as ProcessingModelStep, It as getPlanetaryBasemapByStyleUrl, J as storyMapHasContent, Ji as availableCesiumBasemap, Jn as LayerPopupConfig, Jr as ProjectTemplateEntry, Jt as BLEND_MODES, K as serializeProjectWithLayerCache, Ki as CesiumBasemapId, Kn as LayerMetadataLink, Kr as ProjectPluginState, Kt as AttributeFormWidget, L as normalizeProjectInteraction, Li as isGeoArrowBatch, Ln as LabelTransform, Lr as ProcessingRerunRequest, Lt as meanRadiusMeters, M as normalizeModels, Mi as GeoArrowBatch, Mn as LARGE_VECTOR_FEATURE_THRESHOLD, Mr as PopupFieldFormat, Mt as getActiveMeanRadiusMeters, N as normalizeObiaWorkbench, Ni as GeoArrowGeometryType, Nn as LAYER_TYPES, Nr as PopupFieldKind, Nt as getActiveSemiMajorAxisMeters, O as normalizeLegendConfig, Oi as normalizePrintLayoutConfig, On as GeocodingLocator, Or as ParticipantIdentity, Ot as earthAreaToBody, P as normalizePrimaryRenderer, Pi as computeGeoArrowBBox, Pn as LabelAnchor, Pr as ProcessingModel, Pt as getEllipsoid, Q as cascadeLayerJoinRefresh, Qn as LayerVirtualField, Qr as RecentProjectEntry, Qt as CollaborationMode, R as normalizeSecondaryMapViews, Ri as Feature, Rn as LayerCapabilities, Rr as ProcessingRun, Rt as setActiveEllipsoidId, S as isAllowedPluginManifestUrl, Si as PrintLayoutConfig, Sn as DiagramType, Sr as ModelToolProvider, St as PLANETARY_BASEMAP_SENTINEL_PREFIX, T as normalizeBookmarkGroups, Ti as PrintLayoutPageFilter, Tn as FillPattern, Tr as OPENFREEMAP_BASEMAPS, Tt as PlanetaryBasemapGroup, U as projectFromStore, Ui as Point, Un as LayerJoinStats, Ur as ProjectComment, Ut as AttributeFormConfig, V as parseProject, Vi as LineString, Vn as LayerGroup, Vr as ProjectBookmark, Vt as AppPrivilege, W as resolveMapGrid, Wi as Polygon, Wn as LayerLibraryEntry, Wr as ProjectInteraction, Wt as AttributeFormFieldConfig, X as applyJoinsToLayer, Xi as normalizeCesiumBasemap, Xn as LayerStyle, Xr as QuickFilterKind, Xt as CollabInvite, Y as ApplyLayerJoinsResult, Yi as basemapToCesiumImagery, Yn as LayerQuickFilter, Yr as QuickFilterDateKind, Yt as BlendMode, Z as applyLayerJoins, Zi as sameCesiumImagery, Zn as LayerType, Zr as QuickFilterTextOperator, Zt as CollaborationChatMessage, _ as createEmptyProject, _i as detectNonGeographicCoordinates, _n as DashboardWidget, _r as ModelGraphEdge, _t as ELLIPSOIDS, a as ProjectDiffOptions, ai as StoryChapterAnimation, an as CommentReply, ar as LineDecoration, at as batchDecodePolylines, b as detachProjectCopy, bi as styleValue, bn as DiagramField, br as ModelGraphPort, bt as PLANETARY_BASEMAPS, c as diffProjects, ci as StoryLayerOpacityChange, cn as DEFAULT_DASHBOARD_COLUMNS, cr as MAX_PROCESSING_HISTORY, ct as encodePolyline, d as CreateProjectOptions, di as StrokeWidthUnit, dn as DEFAULT_MAP_GRID_LAYOUT, dr as MapPreferences, dt as unescapePolyline, ei as SQL_QUERY_SOURCE_KIND, en as CollaborationPresence, er as LegendCustomEntry, et as layerJoinKey, f as DEFAULT_PROJECT_NAME, fi as StyleLibraryEntry, fn as DEFAULT_PRIMARY_RENDERER, fr as MapProjection, ft as geojsonHasZCoordinates, g as createDefaultMapView, gi as VectorStyleStop, gn as DUCKDB_VECTOR_ROUTE_BYTES, gr as MarkerShape, gt as EARTH_MEAN_RADIUS_METERS, h as applyProjectToStore, hi as VectorStyleMode, hn as DUCKDB_VECTOR_FEATURE_WARN_COUNT, hr as MapViewState, ht as DEFAULT_ELLIPSOID_ID, i as ProjectDiff, ii as StoryChapterAlignment, in as CommentAuthor, ir as LegendPanelPosition, it as PolylineDecodeResult, j as normalizeModelGraph, ji as scrubPrintLayoutForRemovedLayers, jn as IndicatorAggregation, jr as PopupFieldConfig, jt as getActiveEllipsoid, k as normalizeMapLayout, ki as printLayoutConfigsEqual, kn as GeocodingPreferences, kr as PointRenderer, kt as earthLengthToBody, l as jsonValuesEqual, li as StoryMap, ln as DEFAULT_LAYER_STYLE, lr as MIN_DASHBOARD_COLUMNS, lt as geoJSONToPolylineStr, m as ProjectLayerSerializationCache, mi as VectorRule, mn as DEFAULT_STORY_MAP, mr as MapScaleUnit, mt as transformGeojsonElevation, n as LayerDiff, ni as StoryActiveSlideMode, nn as CollaborationState, nr as LegendCustomShape, nt as stripJoinFields, o as ProjectValueChange, oi as StoryChapterLocation, on as DEFAULT_BASEMAP, or as MAX_DASHBOARD_COLUMNS, ot as decodePolyline, p as MAX_PROJECT_BOOKMARKS, pi as StyleLibraryEntryKind, pn as DEFAULT_PROJECT_PREFERENCES, pr as MapRendererKind, pt as horizontalBbox, q as serializeProjectWithLayerCacheAsync, qi as CesiumBasemapImagery, qn as LayerMetadataTemporalExtent, qr as ProjectPreferences, qt as BLANK_BASEMAP, r as PluginDiff, ri as StoryChapter, rn as CommentAnchor, rr as LegendItemOverride, rt as PolylineBatchOptions, s as diffFeatureCollections, si as StoryInsetPosition, sn as DEFAULT_BLEND_MODE, sr as MAX_MAP_GRID_DIM, st as decodePolylineDetailed, t as FeatureChangeSummary, ti as SecondaryMapView, tn as CollaborationRole, tr as LegendCustomItem, tt as reapplyLayerJoins, u as previewValue, ui as StorySlideMode, un as DEFAULT_LEGEND_CONFIG, ur as MapGridLayout, ut as polylineStrToGeoJSON, v as createProjectLayerSerializationCache, vi as isDuckDBQueryLayer, vn as DashboardWidgetAggregation, vr as ModelGraphNode, vt as Ellipsoid, w as normalizeBlankBackgroundColor, wi as PrintLayoutLegendEntry, wn as FieldVisibility, wr as NonGeographicCoordinates, wt as PlanetaryBasemap, x as hydrateProjectLayer, xi as DEFAULT_PRINT_LAYOUT, xn as DiagramSizeMode, xr as ModelPortKind, xt as PLANETARY_BASEMAP_GROUPS, y as createProjectTemplate, yi as shouldUseTiledRendering, yn as DashboardWidgetType, yr as ModelGraphNodeKind, yt as EllipsoidId, z as normalizeStoryMap, zi as FeatureCollection, zn as LayerConnection, zr as ProcessingRunKind, zt as AddTileLayerOptions } from "./project-diff-CyR4d8Sl.mjs";
2
2
  import "zustand";
3
3
  import "zundo";
4
4
  //#region src/diagram.d.ts
@@ -116,6 +116,28 @@ export declare function diagramPixelSize(datum: DiagramDatum, style: LayerStyle,
116
116
  * stroke is not clipped at the edge.
117
117
  */
118
118
  export declare function drawMarkerPath(ctx: CanvasRenderingContext2D, shape: MarkerShape, size: number): void;
119
+ /**
120
+ * Whether a custom marker source is a raster image (PNG, JPEG, GIF, ...) rather
121
+ * than SVG: a non-SVG `data:image/...` URL, or an `http(s)` URL whose path ends
122
+ * in a raster extension. Raster markers cannot be recolored, so the marker
123
+ * color and per-class colors only apply to SVG sources. A remote URL without a
124
+ * telling extension is not classified here; the map sniffs its content type.
125
+ *
126
+ * @param markup - The `markerSvg` value.
127
+ * @returns `true` for a recognizably raster source.
128
+ */
129
+ export declare function isRasterMarkerSource(markup: string): boolean;
130
+ /**
131
+ * Whether a remote marker response holds SVG text, judged by its
132
+ * `content-type` header: `image/svg+xml`, or a text/XML type (a raw GitHub
133
+ * file is served as `text/plain`), reads as SVG and any other `image/*` does
134
+ * not. A missing or generic header falls back to a `.svg` path.
135
+ *
136
+ * @param url - The requested URL.
137
+ * @param contentType - The response's `content-type` header, if any.
138
+ * @returns `true` when the body should be read as SVG markup.
139
+ */
140
+ export declare function isSvgMarkerResponse(url: string, contentType: string | null): boolean;
119
141
  /**
120
142
  * Resolve user-supplied SVG input to an `Image.src`: inline markup (starting
121
143
  * with `<`) is encoded as a data URL; otherwise only `data:` and `http(s):`
@@ -264,6 +286,186 @@ export declare function getRegionalBasemapById(id: string | undefined): Regional
264
286
  /** Whether a style URL is a regional-basemap sentinel, resolvable or not. */
265
287
  export declare function isRegionalBasemapSentinel(styleUrl: string | undefined): boolean;
266
288
  //#endregion
289
+ //#region src/arcgis-projection.d.ts
290
+ /**
291
+ * Projections the ArcGIS renderer can draw its flat map in (issue #2708).
292
+ *
293
+ * MapLibre and Mapbox only draw Web Mercator and a globe, but the ArcGIS Maps
294
+ * SDK reprojects vector layers on the client into any projected coordinate
295
+ * system it knows by WKID. `preferences.map.arcgisWkid` names that system;
296
+ * absent means the default Web Mercator map. The SDK cannot reproject tiled
297
+ * layers (XYZ, Esri basemaps), so in another projection those do not draw.
298
+ */
299
+ /** A projection offered in the settings picker. */
300
+ export interface ArcgisProjectionPreset {
301
+ /** The Esri or EPSG well-known ID the SDK resolves. */
302
+ wkid: number;
303
+ /** English name; the UI translates it by `id`. */
304
+ name: string;
305
+ /** Stable key for the translated name (`settings.map.arcgisProjections.<id>`). */
306
+ id: string;
307
+ }
308
+ /** Presets, verified to load and frame in the SDK pinned by `ARCGIS_SDK_VERSION`. */
309
+ export declare const ARCGIS_PROJECTION_PRESETS: readonly ArcgisProjectionPreset[];
310
+ /**
311
+ * Normalize a stored ArcGIS projection WKID.
312
+ *
313
+ * Args:
314
+ * value: The raw `preferences.map.arcgisWkid` value.
315
+ *
316
+ * Returns:
317
+ * A positive integer WKID other than Web Mercator, or `undefined` for the
318
+ * default Web Mercator map (absent, malformed or a Web Mercator code).
319
+ */
320
+ export declare function normalizeArcgisWkid(value: unknown): number | undefined;
321
+ //#endregion
322
+ //#region src/map-crs.d.ts
323
+ /**
324
+ * Map coordinate reference systems for the MapLibre renderer (issue #1128).
325
+ *
326
+ * MapLibre GL JS 6.15 can draw a flat map in any planar CRS registered with
327
+ * `maplibregl.addProjection`: tiles are placed on a square quad grid laid over
328
+ * the CRS plane and are not reprojected, so every tile has to be made in that
329
+ * CRS already. A WMS does that on request (the `{bbox}` tile token asks for each
330
+ * tile's box in CRS units), which is how the presets below get native polar and
331
+ * simple-cylindrical basemaps of Earth, the Moon, Mars and the outer bodies.
332
+ *
333
+ * `preferences.map.mapCrs` names the CRS: a preset id from
334
+ * {@link MAP_CRS_PRESETS}, or `"EPSG:<code>"` for any code the bundled EPSG
335
+ * tables resolve. Absent means the default Web Mercator / globe map.
336
+ *
337
+ * This module is pure data and string handling. Registering the projection and
338
+ * swapping the style live in `@geolibre/map` (`map-crs.ts`).
339
+ */
340
+ /** A square quad tile grid over a CRS plane, as MapLibre's `TileMatrixSet`. */
341
+ export interface MapCrsTileMatrixSet {
342
+ /** Top-left corner of tile 0/0/0, in CRS units. */
343
+ origin: [number, number];
344
+ /** Width (and height) of tile 0/0/0, in CRS units. */
345
+ extentAtZoom0: number;
346
+ }
347
+ /** A WMS basemap served natively in a preset's CRS. */
348
+ export interface MapCrsBasemap {
349
+ /** GetMap template whose `BBOX` is MapLibre's `{bbox}` token. */
350
+ tiles: string;
351
+ /** Attribution HTML. */
352
+ attribution: string;
353
+ /** Deepest zoom worth requesting; MapLibre overzooms past it. */
354
+ maxZoom: number;
355
+ }
356
+ /** Which group a preset is listed under in the settings picker. */
357
+ export type MapCrsBody = "earth" | "moon" | "mars" | "mercury" | "venus" | "io" | "europa" | "ganymede" | "callisto" | "titan" | "pluto" | "charon";
358
+ /** A CRS offered in the settings picker. */
359
+ export interface MapCrsPreset {
360
+ /** Stable id persisted in `preferences.map.mapCrs`; also the i18n key. */
361
+ id: string;
362
+ /** English name; the UI translates it by `id`. */
363
+ name: string;
364
+ /**
365
+ * The CRS's authority code, registered with MapLibre under this name and
366
+ * written into the `SRS`/`CRS` of WMS layers drawn on the map.
367
+ */
368
+ code: string;
369
+ /**
370
+ * The label WMS and ArcGIS export layers on the map ask for, when servers
371
+ * do not read `code`. MapServer's PROJ rejects the planetary IAU codes, so
372
+ * those presets use the labels USGS Astrogeology serves their grids under.
373
+ */
374
+ wmsSrs?: string;
375
+ /** PROJ string of the CRS, used by proj4 on the page and in the workers. */
376
+ definition: string;
377
+ /** Ellipsoid registry id the preset's coordinates describe. */
378
+ ellipsoidId: MapCrsBody;
379
+ tileMatrixSet: MapCrsTileMatrixSet;
380
+ /** Box the map opens on when the preset is chosen, `[west, south, east, north]`. */
381
+ bounds: [number, number, number, number];
382
+ basemap: MapCrsBasemap;
383
+ }
384
+ /**
385
+ * Presets verified to render against their WMS on 2026-10-19.
386
+ *
387
+ * The USGS polar map files serve their native polar stereographic grid under
388
+ * `EPSG:32661`/`EPSG:32761` (MapServer's PROJ rejects the IAU codes they also
389
+ * list), centred on the pole with no false origin, so those labels are used for
390
+ * the basemap requests while the map registers the body's IAU code.
391
+ */
392
+ export declare const MAP_CRS_PRESETS: readonly MapCrsPreset[];
393
+ /**
394
+ * Look a preset up by its id.
395
+ *
396
+ * Args:
397
+ * id: A `preferences.map.mapCrs` value.
398
+ *
399
+ * Returns:
400
+ * The preset, or `undefined` when `id` is not a preset id.
401
+ */
402
+ export declare function getMapCrsPreset(id: string | undefined): MapCrsPreset | undefined;
403
+ /**
404
+ * Read an `EPSG:<code>` map CRS value.
405
+ *
406
+ * Args:
407
+ * value: A `preferences.map.mapCrs` value.
408
+ *
409
+ * Returns:
410
+ * The numeric EPSG code, or `null` when the value is not an EPSG CRS.
411
+ */
412
+ export declare function parseMapCrsEpsgCode(value: string | undefined): number | null;
413
+ /**
414
+ * Normalize a stored map CRS.
415
+ *
416
+ * Args:
417
+ * value: The raw `preferences.map.mapCrs` value.
418
+ *
419
+ * Returns:
420
+ * A preset id, `"EPSG:<code>"`, or `undefined` for the default Web Mercator
421
+ * map (absent, malformed or a Web Mercator code).
422
+ */
423
+ export declare function normalizeMapCrs(value: unknown): string | undefined;
424
+ /**
425
+ * Point a Web Mercator WMS or ArcGIS export template at a map CRS.
426
+ *
427
+ * GeoLibre's WMS layers request `BBOX={bbox-epsg-3857}` in `EPSG:3857`. On a
428
+ * map in another CRS each tile is a box in that CRS instead, which MapLibre
429
+ * writes into the `{bbox}` token, so the template asks for `{bbox}` in `code`.
430
+ * WMS requests move to version 1.1.1, whose `SRS` BBOX is east, north for every
431
+ * CRS (1.3.0 swaps the axes of geographic ones), and an ArcGIS `export`
432
+ * template has its `bboxSR`/`imageSR` set to the EPSG number.
433
+ *
434
+ * Args:
435
+ * template: A raster tile template.
436
+ * code: The map CRS's authority code, e.g. `EPSG:3031` or `IAU_2015:49918`.
437
+ *
438
+ * Returns:
439
+ * The template for the CRS, the template unchanged when it already uses
440
+ * `{bbox}`, or `null` for a template with no bounding box (an XYZ or TMS
441
+ * template), which cannot be drawn in another CRS.
442
+ */
443
+ export declare function adaptBboxTemplateToCrs(template: string, code: string): string | null;
444
+ /**
445
+ * The smallest centered square grid over the part of a CRS worth mapping, for
446
+ * an EPSG code without a published tile grid.
447
+ *
448
+ * Samples a 2° lng/lat lattice and keeps the points `projection` takes forward
449
+ * and back to where they started (a transverse Mercator's far side does not)
450
+ * whose local scale is at most {@link MAX_RELATIVE_SCALE} times the CRS's
451
+ * smallest. A polar stereographic map round-trips almost to the other pole,
452
+ * but out there a kilometre spans thousands of CRS units, and a grid that wide
453
+ * leaves the CRS's own area a speck at every useful zoom. The extent of the
454
+ * kept points is padded by 4%. MapLibre finds the edge of a world projection
455
+ * by walking out from the grid's center, so the grid is centered on them.
456
+ *
457
+ * Args:
458
+ * projection: Lng/lat to CRS and back, the shape of a proj4 converter.
459
+ * geographic: Whether the CRS is in degrees, which gets the whole-world grid.
460
+ *
461
+ * Returns:
462
+ * The grid, or `null` when no sampled point survives the round trip.
463
+ */
464
+ export declare function deriveTileMatrixSet(projection: {
465
+ forward(position: number[]): number[];
466
+ inverse(position: number[]): number[] | null;
467
+ }, geographic: boolean): MapCrsTileMatrixSet | null;
468
+ //#endregion
267
469
  //#region src/color-ramp.d.ts
268
470
  /**
269
471
  * Color-ramp definitions and classification-break helpers shared by the
@@ -382,7 +584,7 @@ export declare function createEqualIntervalBreaks(min: number, max: number, coun
382
584
  */
383
585
  export declare function createQuantileBreaks(values: number[], count: number): number[];
384
586
  /** The classification schemes the graduated vector renderer offers. */
385
- export type GraduatedClassificationScheme = "equal-interval" | "quantile" | "natural-breaks";
587
+ export type GraduatedClassificationScheme = "equal-interval" | "quantile" | "natural-breaks" | "standard-deviation" | "geometric-interval";
386
588
  /**
387
589
  * Builds the class *lower bounds* for a graduated vector renderer.
388
590
  *
@@ -401,6 +603,12 @@ export type GraduatedClassificationScheme = "equal-interval" | "quantile" | "nat
401
603
  * MapLibre rejects a `step` expression whose inputs are not strictly ascending,
402
604
  * so this de-duplication is load-bearing, not cosmetic.
403
605
  *
606
+ * Standard deviation and geometric interval derive their breaks from the data,
607
+ * so `count` is a ceiling there: a standard-deviation break that falls outside
608
+ * the sample range is dropped rather than producing an empty class. See
609
+ * {@link standardDeviationClassBreaks} and {@link geometricIntervalClassBreaks}
610
+ * for how each treats its edge cases.
611
+ *
404
612
  * @param values - The finite numeric values of the classified property.
405
613
  * @param count - Number of classes requested.
406
614
  * @param scheme - The classification scheme.
@@ -661,6 +869,18 @@ export declare function requestMatrix(endpoint: string, body: MatrixRequestBody,
661
869
  * @returns The Valhalla `/route` response.
662
870
  */
663
871
  export declare function requestRoute(endpoint: string, body: RouteRequestBody, signal?: AbortSignal): Promise<unknown>;
872
+ /**
873
+ * Requests a turn-by-turn route from the Valhalla server. Unlike
874
+ * {@link requestRoute}, the body is passed through as is, so the caller can ask
875
+ * for Valhalla's OSRM-compatible output with voice and banner instructions,
876
+ * alternates, a start heading, and costing options (the navigation tool).
877
+ *
878
+ * @param endpoint - The Valhalla base URL.
879
+ * @param body - The `/route` request body.
880
+ * @param signal - Optional abort signal.
881
+ * @returns The Valhalla `/route` response.
882
+ */
883
+ export declare function requestNavigationRoute(endpoint: string, body: Record<string, unknown>, signal?: AbortSignal): Promise<unknown>;
664
884
  //#endregion
665
885
  //#region src/vector-color.d.ts
666
886
  /**
@@ -1484,6 +1704,13 @@ export declare function isAdoptedVectorAwaitingFeatures(layer: {
1484
1704
  export interface AttributeFormEvalOptions {
1485
1705
  /** Map zoom for `["zoom"]` in expressions; defaults to 0. */
1486
1706
  zoom?: number;
1707
+ /**
1708
+ * Constraints a data service enforces regardless of the form's
1709
+ * presentation (ArcGIS domains). A field the form hides is still checked
1710
+ * against its entry here, so a visibility rule cannot let an invalid value
1711
+ * reach the service.
1712
+ */
1713
+ serviceForm?: AttributeFormConfig;
1487
1714
  /**
1488
1715
  * Real feature backing the properties, when the caller has one — its
1489
1716
  * geometry feeds `["geometry-type"]` and geometry-aware operators. Its
@@ -1494,7 +1721,7 @@ export interface AttributeFormEvalOptions {
1494
1721
  }
1495
1722
  /** Why a field's value was rejected; codes map to localized messages. */
1496
1723
  export interface AttributeFormFieldError {
1497
- code: "required" | "number" | "range" | "valueMap" | "constraint";
1724
+ code: "required" | "number" | "integer" | "text" | "range" | "valueMap" | "constraint";
1498
1725
  /**
1499
1726
  * For `constraint`: the author's `constraintDescription`, or the
1500
1727
  * expression's own error text when it failed to evaluate.
@@ -1546,10 +1773,26 @@ export declare function isAttributeFormFieldVisible(config: AttributeFormFieldCo
1546
1773
  export declare function validateAttributeFormField(config: AttributeFormFieldConfig, properties: Record<string, unknown>, options?: AttributeFormEvalOptions): AttributeFormFieldError | null;
1547
1774
  /**
1548
1775
  * Validate a whole candidate properties record against a form config. Hidden
1549
- * fields (visibility expression currently false) are skipped entirely — a
1550
- * field the form does not show cannot block a save.
1776
+ * fields (visibility expression currently false) skip the form's own rules —
1777
+ * a field the form does not show cannot block a save — but are still checked
1778
+ * against `options.serviceForm`, whose constraints the data service enforces.
1551
1779
  */
1552
1780
  export declare function validateAttributeFormValues(form: AttributeFormConfig | undefined, properties: Record<string, unknown>, options?: AttributeFormEvalOptions): AttributeFormValidation;
1781
+ /**
1782
+ * Combine a layer's designer-authored form with the constraints its data
1783
+ * service publishes (for example ArcGIS coded-value and range domains) into
1784
+ * the form the editing surfaces use. The author's presentation choices
1785
+ * (alias, visibility, constraint expression, a narrower value map or bounds)
1786
+ * survive, but never widen what the service accepts: a service value map
1787
+ * forces the value-map widget and keeps only author entries the service also
1788
+ * lists (all service entries when none overlap), bounds take the tighter of
1789
+ * each side, and the service's declared value type always applies.
1790
+ *
1791
+ * @param form - The layer's designer-authored config, if any.
1792
+ * @param service - Service-derived configs, if the layer has any.
1793
+ * @returns The effective config, or `form` itself when there is no service form.
1794
+ */
1795
+ export declare function mergeAttributeFormConfigs(form: AttributeFormConfig | undefined, service: AttributeFormConfig | undefined): AttributeFormConfig | undefined;
1553
1796
  //#endregion
1554
1797
  //#region src/layer-descriptive-metadata.d.ts
1555
1798
  /** STAC specification version the Item export targets. */
@@ -2371,461 +2614,6 @@ export declare function scaleAltitudeToActiveBody(earthAltitudeMeters: number |
2371
2614
  */
2372
2615
  export declare function formatCameraAltitude(meters: number, unit: MapScaleUnit): string;
2373
2616
  //#endregion
2374
- //#region src/project.d.ts
2375
- /** Placeholder name a project carries before the user names it. */
2376
- export declare const DEFAULT_PROJECT_NAME = "Untitled Project";
2377
- export interface CreateProjectOptions {
2378
- basemapStyleUrl?: string;
2379
- mapView?: MapViewState;
2380
- /** Celestial body the project describes; defaults to Earth when omitted. */
2381
- ellipsoidId?: string;
2382
- }
2383
- export declare function normalizeBlankBackgroundColor(value: unknown): string | null;
2384
- export declare function createDefaultMapView(): MapViewState;
2385
- export declare function createEmptyProject(name?: string, options?: CreateProjectOptions): GeoLibreProject;
2386
- /**
2387
- * Serialize a project to `.geolibre.json` text: indented project structure with
2388
- * compact (unindented) embedded GeoJSON. See {@link serializeProjectValue} for
2389
- * why the two halves are formatted differently.
2390
- *
2391
- * @param project Project to serialize.
2392
- * @returns The file contents to write.
2393
- */
2394
- export declare function serializeProject(project: GeoLibreProject): string;
2395
- /**
2396
- * Per-layer serialized text kept across {@link serializeProjectWithLayerCache}
2397
- * calls, keyed by the layer record each entry was built from. A `WeakMap`, so a
2398
- * layer the store has replaced or removed drops its text with it.
2399
- */
2400
- export type ProjectLayerSerializationCache = WeakMap<object, {
2401
- index: number;
2402
- text: string;
2403
- }>;
2404
- /** Create an empty {@link ProjectLayerSerializationCache}. */
2405
- export declare function createProjectLayerSerializationCache(): ProjectLayerSerializationCache;
2406
- /**
2407
- * Serialize a project exactly as {@link serializeProject} does, reusing the
2408
- * text of every layer whose source record is unchanged since an earlier call.
2409
- *
2410
- * Feature data lives inside layer records, so re-stringifying every layer on
2411
- * each autosave costs megabytes of main-thread work for a project with large
2412
- * GeoJSON layers — even when only the camera moved (GeoLibre#2633). The store
2413
- * replaces a layer object whenever it changes, so object identity is a sound
2414
- * cache key: a camera move reuses every layer, and an edit to one layer
2415
- * re-serializes only that one.
2416
- *
2417
- * `layerSources[i]` must be the record `project.layers[i]` was derived from
2418
- * (e.g. the store's `layers`, before `projectFromStore` prepared them), and that
2419
- * derivation must depend on the record alone — as `buildProjectSnapshot`'s does
2420
- * — or a cached entry could outlive a change it should have reflected. When the
2421
- * two arrays differ in length the cache is bypassed rather than trusted.
2422
- *
2423
- * @param project Project to serialize, as built from `layerSources`.
2424
- * @param layerSources Immutable source record for each entry of
2425
- * `project.layers`, in the same order, used as the cache key.
2426
- * @param cache Cache shared between calls; see
2427
- * {@link createProjectLayerSerializationCache}.
2428
- * @returns The same text {@link serializeProject} returns for `project`.
2429
- */
2430
- export declare function serializeProjectWithLayerCache(project: GeoLibreProject, layerSources: readonly object[], cache: ProjectLayerSerializationCache): string;
2431
- /**
2432
- * {@link serializeProjectWithLayerCache} that hands the main thread back
2433
- * between layers, so autosave on a project with several large layers is many
2434
- * short tasks instead of one 300-400 ms freeze (GeoLibre#2869).
2435
- *
2436
- * The cache makes a camera move free, so the cost lands on the first autosave
2437
- * and on edits to a big layer: each layer that misses the cache is serialized
2438
- * in its own slice, and the thread is released once a slice has run longer than
2439
- * a few milliseconds. A single huge layer is still one slice. The result is
2440
- * identical to the synchronous call. `project` and `layerSources` must not be
2441
- * mutated while this runs; the store replaces records rather than editing them,
2442
- * so a snapshot taken from it stays valid.
2443
- *
2444
- * @param project Project to serialize, as built from `layerSources`.
2445
- * @param layerSources Immutable source record for each entry of
2446
- * `project.layers`, in the same order, used as the cache key.
2447
- * @param cache Cache shared between calls.
2448
- * @param yieldFn Hands the thread back; replaced in tests.
2449
- * @returns The same text {@link serializeProject} returns for `project`.
2450
- */
2451
- export declare function serializeProjectWithLayerCacheAsync(project: GeoLibreProject, layerSources: readonly object[], cache: ProjectLayerSerializationCache, yieldFn?: () => Promise<void>): Promise<string>;
2452
- export declare function parseProject(json: string): GeoLibreProject;
2453
- /**
2454
- * Validate and coerce a story map loaded from an untrusted project file.
2455
- *
2456
- * Returns null when the value carries no chapters so empty story maps stay out
2457
- * of the saved project, mirroring how plugins are only persisted when present.
2458
- *
2459
- * @param storymap Raw value read from the project JSON.
2460
- * @returns A normalized story map, or null when there is nothing to keep.
2461
- */
2462
- export declare function normalizeStoryMap(storymap: unknown): StoryMap | null;
2463
- /** Whether a story map carries chapters or any non-default setting. */
2464
- export declare function storyMapHasContent(story: StoryMap): boolean;
2465
- /**
2466
- * Coerce an untrusted (possibly hand-edited) `models` array into valid
2467
- * {@link ProcessingModel} records. Drops models and steps without a usable id or
2468
- * tool id, de-duplicates models by id, and keeps step `parameters` as a plain
2469
- * object (the runner validates parameter values per tool at run time). Returns
2470
- * `null` when there is nothing worth persisting, so a model-less project stays
2471
- * free of the key.
2472
- *
2473
- * @param value Raw `models` value from the project JSON.
2474
- * @returns Normalized models, or `null` when none survive.
2475
- */
2476
- export declare function normalizeModels(value: unknown): ProcessingModel[] | null;
2477
- /**
2478
- * Coerce an untrusted `graph` value into a {@link ProcessingModelGraph}. Drops
2479
- * nodes without a usable id or an unknown kind, de-duplicates node ids, and
2480
- * drops edges that do not connect two surviving nodes or that name an empty
2481
- * port. Self-edges are dropped too, since a node cannot feed itself.
2482
- *
2483
- * Structural validity beyond this (cycles, type mismatches, missing required
2484
- * inputs) is the runner's job — those depend on the tool registries, which the
2485
- * project layer deliberately does not import.
2486
- *
2487
- * @param value Raw `graph` value from the project JSON.
2488
- * @returns The normalized graph, or `null` when it has no usable nodes.
2489
- */
2490
- export declare function normalizeModelGraph(value: unknown): ProcessingModelGraph | null;
2491
- /**
2492
- * Coerce an untrusted (possibly hand-edited) `processingHistory` array into
2493
- * valid {@link ProcessingRun} records. Drops entries without a usable id, tool
2494
- * id, or known kind, de-duplicates by id, keeps `parameters` as a plain object,
2495
- * and caps the list at {@link MAX_PROCESSING_HISTORY} (keeping the newest,
2496
- * i.e. last, entries). Returns `null` when nothing survives, so a history-less
2497
- * project stays free of the key.
2498
- *
2499
- * @param value Raw `processingHistory` value from the project JSON.
2500
- * @returns Normalized runs, or `null` when none survive.
2501
- */
2502
- export declare function normalizeProcessingHistory(value: unknown): ProcessingRun[] | null;
2503
- /**
2504
- * Coerce an untrusted (possibly hand-edited) camera object into a valid
2505
- * {@link MapViewState}, falling back to the default view for missing parts.
2506
- */
2507
- export declare function normalizeMapViewState(value: unknown): MapViewState;
2508
- /**
2509
- * Coerce an untrusted `mapLayout` into a valid {@link MapGridLayout}. Returns
2510
- * null when absent or effectively single-pane so default projects stay
2511
- * byte-identical (the field is only written when the grid is larger than 1x1).
2512
- */
2513
- export declare function normalizeMapLayout(value: unknown): MapGridLayout | null;
2514
- /**
2515
- * Coerce an untrusted `primaryRenderer` into a known engine id (issue #2217).
2516
- *
2517
- * Returns null for the default 2D map — absent, unknown, or an explicit
2518
- * `"maplibre"` — because the field is only written when it is not the default,
2519
- * so a MapLibre project serializes byte-identically to before this existed.
2520
- * The return type is narrowed to `"cesium" | "mapbox" | "arcgis" | null` rather
2521
- * than the full {@link MapRendererKind} for that reason: `"maplibre"` is never a
2522
- * result.
2523
- */
2524
- export declare function normalizePrimaryRenderer(value: unknown): "cesium" | "mapbox" | "arcgis" | null;
2525
- /**
2526
- * Coerce an untrusted `secondaryMapViews` array into valid
2527
- * {@link SecondaryMapView} records, dropping entries without a usable id and
2528
- * de-duplicating by id. Returns null when none are valid.
2529
- */
2530
- export declare function normalizeSecondaryMapViews(value: unknown): SecondaryMapView[] | null;
2531
- /**
2532
- * Reconcile a parsed grid layout with its secondary panes so the store invariant
2533
- * holds: `secondaryMapViews.length === rows * cols - 1`. Surplus panes are
2534
- * dropped; missing panes are filled by cloning the primary map. A null/absent
2535
- * layout (or a 1x1 grid) collapses to the single-map default.
2536
- */
2537
- export declare function resolveMapGrid(layout: MapGridLayout | null, secondaryViews: SecondaryMapView[] | null, primary: {
2538
- mapView: MapViewState;
2539
- }): {
2540
- mapLayout: MapGridLayout;
2541
- secondaryMapViews: SecondaryMapView[];
2542
- };
2543
- /**
2544
- * Coerce an untrusted (possibly hand-edited) `widgets` array into valid
2545
- * {@link DashboardWidget} records. Drops widgets without a usable id, layer id,
2546
- * or recognized chart type, de-duplicates by id, and keeps only the optional
2547
- * keys that are present and well-typed (the Dashboard panel falls back to
2548
- * sensible defaults for anything missing). Returns `null` when there is nothing
2549
- * worth persisting, so a widget-less project stays free of the key.
2550
- *
2551
- * @param value Raw `widgets` value from the project JSON.
2552
- * @returns Normalized widgets, or `null` when none survive.
2553
- */
2554
- export declare function normalizeWidgets(value: unknown): DashboardWidget[] | null;
2555
- /**
2556
- * Clamp an untrusted dashboard column count into the supported range, falling
2557
- * back to the default for a missing or non-finite value.
2558
- *
2559
- * @param value Raw `dashboardColumns` value from the project JSON.
2560
- * @returns An integer column count within [MIN, MAX].
2561
- */
2562
- export declare function normalizeDashboardColumns(value: unknown): number;
2563
- /**
2564
- * Coerce an untrusted `interaction` block into a {@link ProjectInteraction}.
2565
- *
2566
- * Layer ids are kept even when no such layer exists: the block is replayed
2567
- * against whatever layers the project has when it opens, and the loader drops
2568
- * the ones it cannot find. Control names are kept as written for the same
2569
- * reason; the app ignores names it does not know.
2570
- *
2571
- * @param value - Raw `interaction` value from the project JSON or the store.
2572
- * @returns The normalized block, or null when it carries nothing to apply.
2573
- */
2574
- export declare function normalizeProjectInteraction(value: unknown): ProjectInteraction | null;
2575
- export declare function isAllowedPluginManifestUrl(url: string): boolean;
2576
- export declare function normalizeProjectComments(rawComments: unknown): ProjectComment[];
2577
- export declare function projectFromStore(state: {
2578
- projectName: string;
2579
- mapView: MapViewState;
2580
- basemapStyleUrl: string;
2581
- basemapVisible: boolean;
2582
- basemapOpacity: number;
2583
- blankBackgroundColor?: string | null;
2584
- layers: GeoLibreLayer[];
2585
- selectedLayerId?: string | null;
2586
- layerGroups?: LayerGroup[];
2587
- preferences: ProjectPreferences;
2588
- plugins?: ProjectPluginState | null;
2589
- legend?: LegendConfig | null;
2590
- printLayout?: PrintLayoutConfig | null;
2591
- storymap?: StoryMap | null;
2592
- models?: ProcessingModel[] | null;
2593
- processingHistory?: ProcessingRun[] | null;
2594
- widgets?: DashboardWidget[] | null;
2595
- dashboardColumns?: number;
2596
- mapLayout?: MapGridLayout;
2597
- secondaryMapViews?: SecondaryMapView[];
2598
- primaryMapLabel?: string;
2599
- primaryRenderer?: MapRendererKind;
2600
- /** Project-scoped Style Manager entries (the store's `projectStyleLibrary`). */
2601
- styleLibrary?: StyleLibraryEntry[] | null;
2602
- comments?: ProjectComment[] | null;
2603
- /** Startup interaction state loaded with the project, written back as-is. */
2604
- interaction?: ProjectInteraction | null;
2605
- metadata: Record<string, unknown>;
2606
- }): GeoLibreProject;
2607
- /**
2608
- * The plain HTTP(S) WMS template inside the desktop app's `geolibre-wms://`
2609
- * wrapper (its CORS-exempt native fetcher), or the tile unchanged when it is
2610
- * not wrapped or the wrapped URL is not HTTP(S). Shared by project export and
2611
- * the ArcGIS engine's story-export templates.
2612
- *
2613
- * @param tile - A tile template, wrapped or not.
2614
- * @returns The unwrapped template, or `tile` itself.
2615
- */
2616
- export declare function portableWmsTileUrl(tile: unknown): unknown;
2617
- /**
2618
- * The store form of one project layer: its style completed from
2619
- * {@link DEFAULT_LAYER_STYLE} and the project's top-level `styles` entry.
2620
- *
2621
- * Legacy and externally-authored projects can carry a partial top-level style
2622
- * alongside newer fields on the layer itself. Those layer fields are kept,
2623
- * while the top-level copy stays authoritative where it explicitly supplies a
2624
- * value.
2625
- *
2626
- * @param project - The project the layer belongs to (for its `styles` map).
2627
- * @param layer - One of `project.layers`.
2628
- * @returns A new layer record ready for the store.
2629
- */
2630
- export declare function hydrateProjectLayer(project: Pick<GeoLibreProject, "styles">, layer: GeoLibreLayer): GeoLibreLayer;
2631
- export declare function applyProjectToStore(project: GeoLibreProject): {
2632
- projectName: string;
2633
- mapView: MapViewState;
2634
- basemapStyleUrl: string;
2635
- basemapVisible: boolean;
2636
- basemapOpacity: number;
2637
- blankBackgroundColor: string | null;
2638
- layers: GeoLibreLayer[];
2639
- layerGroups: LayerGroup[];
2640
- preferences: ProjectPreferences;
2641
- projectPlugins: ProjectPluginState | null;
2642
- legend: LegendConfig;
2643
- printLayout: PrintLayoutConfig;
2644
- storymap: StoryMap | null;
2645
- models: ProcessingModel[];
2646
- processingHistory: ProcessingRun[];
2647
- widgets: DashboardWidget[];
2648
- dashboardColumns: number;
2649
- mapLayout: MapGridLayout;
2650
- secondaryMapViews: SecondaryMapView[];
2651
- primaryMapLabel: string;
2652
- primaryRenderer: MapRendererKind;
2653
- projectStyleLibrary: StyleLibraryEntry[];
2654
- comments: ProjectComment[];
2655
- projectInteraction: ProjectInteraction | null;
2656
- metadata: Record<string, unknown>;
2657
- };
2658
- /**
2659
- * Create an unlinked copy of a project, suffixed with "(copy)" by default and
2660
- * stripped of share-specific metadata (shareId, shareUrl, etc.).
2661
- */
2662
- export declare function detachProjectCopy(project: GeoLibreProject, options?: {
2663
- nameSuffix?: string;
2664
- }): GeoLibreProject;
2665
- /**
2666
- * Create a template snapshot of a project. Optionally strips data layers while
2667
- * keeping basemap, layer groups, styles, legend config, preferences, widgets, and
2668
- * print layout.
2669
- */
2670
- export declare function createProjectTemplate(project: GeoLibreProject, options?: {
2671
- name?: string;
2672
- stripDataLayers?: boolean;
2673
- }): GeoLibreProject;
2674
- //#endregion
2675
- //#region src/project-diff.d.ts
2676
- /** One changed value, with bounded human-readable previews of each side. */
2677
- export interface ProjectValueChange {
2678
- /** Dotted key path relative to the section, e.g. `fillColor` or `labels.field`. */
2679
- path: string;
2680
- /** Preview of the earlier value; `undefined` when the key was absent. */
2681
- before?: string;
2682
- /** Preview of the later value; `undefined` when the key is now absent. */
2683
- after?: string;
2684
- }
2685
- /** Counts of embedded GeoJSON feature changes in one layer. */
2686
- export interface FeatureChangeSummary {
2687
- added: number;
2688
- removed: number;
2689
- modified: number;
2690
- unchanged: number;
2691
- /**
2692
- * How features were matched: `"id"` when every feature carries a unique
2693
- * `id`, `"geometry"` when none does (matched by geometry hash), `"mixed"`
2694
- * otherwise.
2695
- */
2696
- matchedBy: "id" | "geometry" | "mixed";
2697
- }
2698
- /** Changes to one layer between the two projects. */
2699
- export interface LayerDiff {
2700
- id: string;
2701
- /** Layer name in the later project (or the earlier one when removed). */
2702
- name: string;
2703
- /** Layer type in the later project (or the earlier one when removed). */
2704
- type: string;
2705
- status: "added" | "removed" | "changed";
2706
- /** Set when the layer was renamed. */
2707
- renamed?: {
2708
- before: string;
2709
- after: string;
2710
- };
2711
- /**
2712
- * Set when the layer changed position relative to the layers present in
2713
- * both projects (bottom-to-top indexes in each project's `layers`).
2714
- */
2715
- moved?: {
2716
- before: number;
2717
- after: number;
2718
- };
2719
- visibility?: {
2720
- before: boolean;
2721
- after: boolean;
2722
- };
2723
- opacity?: {
2724
- before: number;
2725
- after: number;
2726
- };
2727
- /** Style keys other than labels. */
2728
- style: ProjectValueChange[];
2729
- /** Label style keys (`style.labels.*`), without the `labels.` prefix. */
2730
- labels: ProjectValueChange[];
2731
- /** `filterExpression` and `quickFilters`. */
2732
- filter: ProjectValueChange[];
2733
- /** `type`, `source.*` and `sourcePath`. */
2734
- source: ProjectValueChange[];
2735
- /** Any other persisted layer field (popup, joins, metadata.*, ...). */
2736
- other: ProjectValueChange[];
2737
- /** Embedded GeoJSON feature changes; absent when the data is unchanged. */
2738
- features?: FeatureChangeSummary;
2739
- /** Feature count for an added or removed layer with embedded GeoJSON. */
2740
- featureCount?: number;
2741
- }
2742
- /** Changes to one plugin's project state. */
2743
- export interface PluginDiff {
2744
- id: string;
2745
- /** `added`/`removed` mean the plugin was activated/deactivated. */
2746
- status: "added" | "removed" | "changed";
2747
- changes: ProjectValueChange[];
2748
- }
2749
- /** The full structured difference between two projects. */
2750
- export interface ProjectDiff {
2751
- layers: {
2752
- added: LayerDiff[];
2753
- removed: LayerDiff[];
2754
- changed: LayerDiff[];
2755
- /** True when any layer present in both projects changed position. */
2756
- reordered: boolean;
2757
- };
2758
- camera: ProjectValueChange[];
2759
- basemap: ProjectValueChange[];
2760
- /** Map projection (`preferences.map.projection`). */
2761
- projection: ProjectValueChange[];
2762
- /** Other project preferences (`preferences.*` minus the projection). */
2763
- preferences: ProjectValueChange[];
2764
- plugins: PluginDiff[];
2765
- /** Plugin manifest URLs added to or removed from the project. */
2766
- pluginManifests: {
2767
- added: string[];
2768
- removed: string[];
2769
- };
2770
- /** Project name (`name`), `metadata.description` and other metadata keys. */
2771
- metadata: ProjectValueChange[];
2772
- /** Other top-level sections that changed (`legend`, `storymap`, ...). */
2773
- sections: string[];
2774
- /** Total number of reported changes; 0 means the projects are equivalent. */
2775
- changeCount: number;
2776
- }
2777
- /** Options for {@link diffProjects}. */
2778
- export interface ProjectDiffOptions {
2779
- /** Maximum characters of a before/after preview (default 80). */
2780
- maxPreviewLength?: number;
2781
- }
2782
- /**
2783
- * Deep structural equality for JSON-like values. A key whose value is
2784
- * `undefined` is treated as absent, so an in-memory record compares equal to
2785
- * its JSON round trip.
2786
- *
2787
- * @param a - First value.
2788
- * @param b - Second value.
2789
- * @returns True when the two values are structurally equal.
2790
- */
2791
- export declare function jsonValuesEqual(a: unknown, b: unknown): boolean;
2792
- /**
2793
- * Render a bounded JSON-ish preview of a value without serializing more of it
2794
- * than the preview can show, so a large array or object costs no more than
2795
- * `maxLength` characters of work.
2796
- *
2797
- * @param value - The value to preview.
2798
- * @param maxLength - Maximum preview length; longer output ends with `…`.
2799
- * @returns The preview, or `undefined` for `undefined`.
2800
- */
2801
- export declare function previewValue(value: unknown, maxLength?: number): string | undefined;
2802
- /**
2803
- * Count the features added, removed and modified between two feature
2804
- * collections. Features are matched by `id` when they carry one; id-less
2805
- * features are matched by geometry hash, so a feature whose properties
2806
- * changed but whose geometry did not counts as modified, while a moved
2807
- * id-less feature counts as one removal plus one addition.
2808
- *
2809
- * @param before - Earlier collection (absent counts as empty).
2810
- * @param after - Later collection (absent counts as empty).
2811
- * @returns The change counts.
2812
- */
2813
- export declare function diffFeatureCollections(before: FeatureCollection | null | undefined, after: FeatureCollection | null | undefined): FeatureChangeSummary;
2814
- /**
2815
- * Compute a structured summary of what changed from `before` to `after`.
2816
- *
2817
- * Layers are matched by id. Embedded GeoJSON is compared per feature (by id,
2818
- * falling back to geometry hash) and each feature is hashed once per object,
2819
- * so diffing the same parsed project against several others reuses its
2820
- * hashes; callers keep and pass the same parsed project objects to benefit.
2821
- *
2822
- * @param before - The earlier project (e.g. an autosave snapshot).
2823
- * @param after - The later project (e.g. the current project).
2824
- * @param options - Preview length and other tuning.
2825
- * @returns The grouped change summary.
2826
- */
2827
- export declare function diffProjects(before: GeoLibreProject, after: GeoLibreProject, options?: ProjectDiffOptions): ProjectDiff;
2828
- //#endregion
2829
2617
  //#region src/style-library.d.ts
2830
2618
  /**
2831
2619
  * Layer types whose symbology is driven by the vector {@link LayerStyle}
@@ -2957,6 +2745,26 @@ export declare const MAX_LAYER_LIBRARY_ENTRIES = 500;
2957
2745
  * @returns True when the source alone is enough to recreate the layer's data.
2958
2746
  */
2959
2747
  export declare function hasRestorableLayerSource(layer: Pick<GeoLibreLayer, "source" | "metadata">): boolean;
2748
+ /**
2749
+ * The absolute local path a layer's data can be **re-read** from, or undefined.
2750
+ *
2751
+ * A non-empty `sourcePath` is not enough on its own: a file picked in the
2752
+ * browser has no path, and both the vector and raster controls still record the
2753
+ * bare file *name* there for display. Each control marks a genuinely re-readable
2754
+ * absolute path differently, so both conventions are honored:
2755
+ *
2756
+ * - Vector / plain local GeoJSON: `metadata.localFileReloadable` alongside an
2757
+ * absolute `sourcePath` (`prepareLayerForSave`, `needsLocalFileReload`,
2758
+ * `restoreVectorLayers`).
2759
+ * - Raster / COG: `metadata.localFilePath` holds the absolute path outright,
2760
+ * and it is what `restoreRasterLayers` re-reads on restore. Without this
2761
+ * branch a locally-opened COG could not be saved at all, even though its
2762
+ * restore pass is fully able to replay it.
2763
+ *
2764
+ * Every candidate is re-validated, because a hand-edited project or an imported
2765
+ * bundle can set these fields to anything.
2766
+ */
2767
+ export declare function layerLocalPath(layer: Pick<GeoLibreLayer, "sourcePath" | "metadata">): string | undefined;
2960
2768
  /**
2961
2769
  * Whether "Save to library" applies to a layer at all — the cheap predicate the
2962
2770
  * layer actions menu gates on. Two things have to hold:
@@ -3445,6 +3253,88 @@ export interface LayerStyleMatch {
3445
3253
  */
3446
3254
  export declare function matchLayerStyleEntry(layer: GeoLibreLayer, entries: readonly LayerStyleFileEntry[]): LayerStyleMatch | null;
3447
3255
  //#endregion
3256
+ //#region src/layers-file.d.ts
3257
+ /** `type` tag identifying a layers file. */
3258
+ export declare const LAYERS_FILE_TYPE = "geolibre-layers";
3259
+ /** Format version written by {@link serializeLayersFile}. */
3260
+ export declare const LAYERS_FILE_VERSION = 1;
3261
+ /**
3262
+ * Size ceiling for a layers file, in UTF-8 bytes. A file of references is a few
3263
+ * kilobytes per layer, and the Startup setting keeps a parsed copy in the
3264
+ * desktop settings (localStorage), so a file past this is refused rather than
3265
+ * crowding out the rest of the settings.
3266
+ */
3267
+ export declare const MAX_LAYERS_FILE_BYTES: number;
3268
+ /** The layers and the folders they sit in. */
3269
+ export interface LayersFileContent {
3270
+ /** Layer records in store (bottom-to-top) order. */
3271
+ layers: GeoLibreLayer[];
3272
+ /** The folders the layers belong to, with their ancestors. */
3273
+ layerGroups: LayerGroup[];
3274
+ }
3275
+ /** The on-disk layers document. */
3276
+ export interface LayersFile extends LayersFileContent {
3277
+ type: typeof LAYERS_FILE_TYPE;
3278
+ version: typeof LAYERS_FILE_VERSION;
3279
+ }
3280
+ /**
3281
+ * Whether a layer (in its saved form) points at its data rather than carrying
3282
+ * it: it has a re-fetchable source, an http(s) source path, or an absolute
3283
+ * local path the desktop app re-reads, and holds no inline features.
3284
+ *
3285
+ * @param layer - A layer as `projectFromStore` writes it.
3286
+ * @returns True when the layer can go in a layers file.
3287
+ */
3288
+ export declare function isReferencedLayer(layer: GeoLibreLayer): boolean;
3289
+ /**
3290
+ * Pick the layers of a saved project that can go in a layers file.
3291
+ *
3292
+ * @param project - A project as `projectFromStore` writes it. A host that can
3293
+ * re-fetch a layer's features (a GeoJSON layer loaded from a URL) strips its
3294
+ * `geojson` first, so the layer counts as a reference here.
3295
+ * @returns The file content, and the names of the layers left out because they
3296
+ * carry their data inline.
3297
+ */
3298
+ export declare function extractLayersFileContent(project: Pick<GeoLibreProject, "layers" | "layerGroups">): {
3299
+ content: LayersFileContent;
3300
+ skipped: string[];
3301
+ };
3302
+ /**
3303
+ * Serialize layers into the JSON written by Export Layers.
3304
+ *
3305
+ * @param content - The layers and their folders.
3306
+ * @returns Pretty-printed file content.
3307
+ */
3308
+ export declare function serializeLayersFile(content: LayersFileContent): string;
3309
+ /**
3310
+ * Coerce untrusted layers (a hand-edited file, or the copy kept in settings)
3311
+ * into clean ones. Each layer goes through the same normalization a project
3312
+ * file's layers do; one without an id, a name, a known type, or a reference to
3313
+ * its data is dropped, as is a repeated id.
3314
+ *
3315
+ * @param value - An object with `layers` and optional `layerGroups` arrays.
3316
+ * @returns The usable layers and the folders they sit in.
3317
+ */
3318
+ export declare function normalizeLayersFileContent(value: unknown): LayersFileContent;
3319
+ /**
3320
+ * Parse a file written by {@link serializeLayersFile}.
3321
+ *
3322
+ * @param json - The file content.
3323
+ * @returns The normalized layers and folders.
3324
+ * @throws Error when the content is too large, is not a layers file, comes
3325
+ * from a newer format version, or holds no usable layers.
3326
+ */
3327
+ export declare function parseLayersFile(json: string): LayersFileContent;
3328
+ /**
3329
+ * Add a layers file's layers on top of a project's own, keeping the project's
3330
+ * layers where an id repeats.
3331
+ *
3332
+ * @param project - The project to add to (usually a new, empty one).
3333
+ * @param content - The layers and folders to add.
3334
+ * @returns A new project with the layers added.
3335
+ */
3336
+ export declare function addLayersToProject(project: GeoLibreProject, content: LayersFileContent): GeoLibreProject;
3337
+ //#endregion
3448
3338
  //#region src/layer-groups.d.ts
3449
3339
  /** Opacity a freshly created {@link LayerGroup} starts at (fully opaque). */
3450
3340
  export declare const DEFAULT_LAYER_GROUP_OPACITY = 1;
@@ -3881,6 +3771,15 @@ export interface S3UrlSigner {
3881
3771
  status: number;
3882
3772
  body: string;
3883
3773
  }>;
3774
+ /**
3775
+ * Drops the cached credentials and signed URLs of the connection that
3776
+ * serves `target`, so the next `presign` resolves them afresh. Called when S3
3777
+ * refuses a request as expired.
3778
+ */
3779
+ invalidateCredentials?(target: {
3780
+ bucket?: string;
3781
+ connectionId?: string;
3782
+ }): void;
3884
3783
  /** The persisted location (`s3://bucket/prefix/`) the S3 browser opens at, or "". */
3885
3784
  defaultLocation?(): string;
3886
3785
  /** Persists the S3 browser's default location; "" clears it. */
@@ -3978,6 +3877,14 @@ export declare function explainS3ReadError(url: string, error: unknown, translat
3978
3877
  */
3979
3878
  export declare function createSampleStoryMap(): StoryMap;
3980
3879
  //#endregion
3880
+ //#region src/storymap-duration.d.ts
3881
+ /** Default chapter dwell time after the camera arrives, in seconds. */
3882
+ export declare const DEFAULT_STORY_CHAPTER_DURATION_SECONDS = 15;
3883
+ export declare const MIN_STORY_CHAPTER_DURATION_SECONDS = 1;
3884
+ export declare const MAX_STORY_CHAPTER_DURATION_SECONDS = 3600;
3885
+ /** Resolve old or hand-authored chapter timings to a safe autoplay duration. */
3886
+ export declare function normalizeStoryChapterDurationSeconds(value: unknown): number;
3887
+ //#endregion
3981
3888
  //#region src/storymap-playback.d.ts
3982
3889
  /**
3983
3890
  * The opacity a story presentation has applied to a layer.
@@ -4288,7 +4195,10 @@ interface LayersSlice {
4288
4195
  reorderLayer: (id: string, direction: "up" | "down") => void;
4289
4196
  moveLayer: (id: string, targetIndex: number) => void;
4290
4197
  moveLayersRelative: (layerIds: string[], targetLayerId: string, position: "above" | "below") => void;
4291
- addGeoJsonLayer: (name: string, geojson: FeatureCollection, sourcePath?: string, beforeLayerId?: string | null) => string;
4198
+ addGeoJsonLayer: (name: string, geojson: FeatureCollection, sourcePath?: string, beforeLayerId?: string | null, extra?: {
4199
+ geoarrow?: GeoArrowBatch;
4200
+ metadata?: Record<string, unknown>;
4201
+ }) => string;
4292
4202
  /**
4293
4203
  * Add a georeferenced image overlay (a MapLibre `image` source rendered as a
4294
4204
  * raster layer) from an image URL and its four corner coordinates, and return
@@ -4486,6 +4396,11 @@ interface ProcessingSlice {
4486
4396
  models: ProcessingModel[];
4487
4397
  /** Recorded processing tool runs, oldest first (Processing History; #1292). */
4488
4398
  processingHistory: ProcessingRun[];
4399
+ /**
4400
+ * Object-Based Analysis workbench state saved with the project (#3053), an
4401
+ * app-owned JSON object; null until the workbench is used.
4402
+ */
4403
+ obiaWorkbench: Record<string, unknown> | null;
4489
4404
  /** Insert a new model or replace an existing one matching by `id`. */
4490
4405
  saveModel: (model: ProcessingModel) => void;
4491
4406
  /** Remove a saved model by id. */
@@ -4496,6 +4411,11 @@ interface ProcessingSlice {
4496
4411
  updateProcessingRun: (id: string, patch: Partial<Omit<ProcessingRun, "id">>) => void;
4497
4412
  /** Drop all recorded processing runs. */
4498
4413
  clearProcessingHistory: () => void;
4414
+ /**
4415
+ * Replace the saved workbench state. `markDirty` is false when the app is
4416
+ * only mirroring state it just restored, so opening a project stays clean.
4417
+ */
4418
+ setObiaWorkbench: (value: Record<string, unknown> | null, markDirty?: boolean) => void;
4499
4419
  }
4500
4420
  //#endregion
4501
4421
  //#region src/store/project-content-slice.d.ts
@@ -4505,6 +4425,10 @@ interface ProjectContentSlice {
4505
4425
  widgets: DashboardWidget[];
4506
4426
  /** Number of columns in the Dashboard widget grid. */
4507
4427
  dashboardColumns: number;
4428
+ /** Saved map views from the Bookmarks panel, in panel order (#2869). */
4429
+ bookmarks: ProjectBookmark[];
4430
+ /** Folders the bookmarks are organized into. */
4431
+ bookmarkGroups: ProjectBookmarkGroup[];
4508
4432
  /** Anchored review comments on map points or features (issue #1518). */
4509
4433
  comments: ProjectComment[];
4510
4434
  /**
@@ -4540,6 +4464,11 @@ interface ProjectContentSlice {
4540
4464
  toggleResolveComment: (commentId: string, resolved?: boolean) => void;
4541
4465
  deleteComment: (commentId: string) => void;
4542
4466
  setComments: (comments: ProjectComment[]) => void;
4467
+ /**
4468
+ * Replace every bookmark and folder (the Bookmarks panel writes its whole
4469
+ * state back after each edit). Marks the project dirty.
4470
+ */
4471
+ setBookmarks: (bookmarks: ProjectBookmark[], bookmarkGroups: ProjectBookmarkGroup[]) => void;
4543
4472
  }
4544
4473
  //#endregion
4545
4474
  //#region src/store/project-slice.d.ts
@@ -4564,8 +4493,14 @@ interface ProjectSlice {
4564
4493
  */
4565
4494
  setPrintLayout: (printLayout: PrintLayoutConfig) => void;
4566
4495
  setProjectPlugins: (projectPlugins: ProjectPluginState | null, shouldMarkDirty?: boolean) => void;
4496
+ /**
4497
+ * Start a new, untitled project. `layers` and `layerGroups` seed it with
4498
+ * layers (the Startup setting's default layers).
4499
+ */
4567
4500
  newProject: (options?: CreateProjectOptions & {
4568
4501
  name?: string;
4502
+ layers?: GeoLibreLayer[];
4503
+ layerGroups?: LayerGroup[];
4569
4504
  }) => void;
4570
4505
  loadProject: (project: GeoLibreProject, path?: string | null, options?: {
4571
4506
  rememberRecent?: boolean;
@@ -4664,6 +4599,9 @@ interface SessionSlice {
4664
4599
  * plain meaning.
4665
4600
  */
4666
4601
  identifyLayerIds: string[] | null;
4602
+ /** Transient map-selection gesture activity, published by the primary renderer. */
4603
+ featureSelectionActive: boolean;
4604
+ setFeatureSelectionActive: (active: boolean) => void;
4667
4605
  pointerCoords: [number, number] | null;
4668
4606
  /**
4669
4607
  * Ground elevation in true metres under the pointer, for the status bar
@@ -4848,7 +4786,7 @@ interface AppState extends ProjectSlice, MapViewSlice, LayersSlice, LayerGroupsS
4848
4786
  //#endregion
4849
4787
  //#region src/store/undo-history.d.ts
4850
4788
  /** The fields undo/redo snapshots, restores and compares. */
4851
- type HistoryState = Pick<AppState, "layers" | "layerGroups" | "basemapStyleUrl" | "basemapVisible" | "basemapOpacity" | "blankBackgroundColor" | "storymap" | "comments">;
4789
+ type HistoryState = Pick<AppState, "layers" | "layerGroups" | "basemapStyleUrl" | "basemapVisible" | "basemapOpacity" | "blankBackgroundColor" | "storymap" | "comments" | "widgets" | "legend">;
4852
4790
  export declare function subscribeProjectRestoreHistory(listener: () => void): () => void;
4853
4791
  export declare function canUndoProjectRestore(): boolean;
4854
4792
  export declare function canRedoProjectRestore(): boolean;
@@ -4868,6 +4806,14 @@ export declare function registerProjectRestoreHistory(before: GeoLibreProject, b
4868
4806
  export declare function undo(): void;
4869
4807
  /** Step the history forward one entry and mark the project dirty. */
4870
4808
  export declare function redo(): void;
4809
+ /**
4810
+ * Apply a store change that is not the user's (data loading in behind a
4811
+ * project) without recording an undo step for it. The history stays as it
4812
+ * was, so undo neither takes the change back out nor loses earlier steps.
4813
+ *
4814
+ * @param change - The store updates to apply.
4815
+ */
4816
+ export declare function withoutHistory(change: () => void): void;
4871
4817
  /** Empty both the undo and redo stacks (e.g. on new/loaded project). */
4872
4818
  export declare function clearHistory(): void;
4873
4819
  //#endregion
@@ -5041,7 +4987,8 @@ export declare function trimHistoryBySize<T extends HistorySnapshot>(pastStates:
5041
4987
  *
5042
4988
  * Providers: geocoding is dispatched through a small {@link GeocodingProvider}
5043
4989
  * registry so alternatives to Nominatim (ArcGIS World Geocoder, CartoCiudad, Mapbox,
5044
- * Pelias, Google) can be selected per project. Each provider builds its own request
4990
+ * Pelias, Google, organization-hosted ArcGIS GeocodeServer locators) can be
4991
+ * selected per project. Each provider builds its own request
5045
4992
  * URLs and normalizes its response into a {@link GeocodeMatch} (forward) or a
5046
4993
  * {@link ReverseGeocodeDisplay} (reverse), so the dialog and plugin stay
5047
4994
  * provider-agnostic. Nominatim is the default.
@@ -5084,8 +5031,10 @@ export declare const GEOCODE_SCORE_KEY = "geocode_importance";
5084
5031
  export declare const GEOCODE_PROVIDER_KEY = "geocode_provider";
5085
5032
  /** Whether a row matched, when stamped. See {@link GeocodeStatus}. */
5086
5033
  export declare const GEOCODE_STATUS_KEY = "geocode_status";
5034
+ /** Prefix of a matched candidate's own attributes, when they are kept. */
5035
+ export declare const GEOCODE_ATTRIBUTE_PREFIX = "geocode_attr_";
5087
5036
  /** Identifier of a selectable geocoding backend. */
5088
- type GeocodingProviderId = "nominatim" | "pelias" | "arcgis" | "mapbox" | "google" | "cartociudad";
5037
+ type GeocodingProviderId = "nominatim" | "pelias" | "arcgis" | "arcgis-locator" | "mapbox" | "google" | "cartociudad";
5089
5038
  /** The provider used when none is configured. */
5090
5039
  export declare const DEFAULT_GEOCODING_PROVIDER_ID: GeocodingProviderId;
5091
5040
  interface GeocoderConfig {
@@ -5099,11 +5048,34 @@ interface GeocoderConfig {
5099
5048
  email?: string;
5100
5049
  /** API key / access token for providers that require one. */
5101
5050
  apiKey?: string;
5051
+ /** The selected locator, for the `arcgis-locator` provider. */
5052
+ locator?: GeocodingLocator;
5053
+ }
5054
+ /**
5055
+ * An error the geocoding service reported about the request itself, as opposed
5056
+ * to a network failure or a search with no matches. ArcGIS answers failures with
5057
+ * HTTP 200 and an `error` envelope, so `response.ok` alone would turn them into
5058
+ * an empty result. `code` is the service's own code (498/499 for a missing or
5059
+ * invalid token, 403 for insufficient permission).
5060
+ */
5061
+ export declare class GeocoderServiceError extends Error {
5062
+ readonly code: number | undefined;
5063
+ constructor(message: string, code?: number);
5064
+ /** Whether the service asked for a token or rejected the one it got. */
5065
+ get isAuthError(): boolean;
5066
+ }
5067
+ /** The configured geocoder does not support the requested operation. */
5068
+ export declare class GeocoderUnsupportedError extends Error {
5069
+ constructor(message: string);
5102
5070
  }
5103
5071
  /** Per-request options passed to a provider's forward URL builder. */
5104
5072
  interface ForwardRequestOptions {
5105
5073
  email?: string;
5106
5074
  limit?: number;
5075
+ /** A suggestion's key, so the locator resolves exactly that suggestion. */
5076
+ magicKey?: string;
5077
+ /** Ask for each candidate's own attributes (see {@link GeocodeMatch.attributes}). */
5078
+ attributes?: boolean;
5107
5079
  }
5108
5080
  /** Per-request options passed to a provider's reverse URL builder. */
5109
5081
  interface ReverseRequestOptions {
@@ -5122,6 +5094,19 @@ interface GeocodeMatch {
5122
5094
  lon: number;
5123
5095
  displayName: string;
5124
5096
  score: number | null;
5097
+ /**
5098
+ * The candidate's own attributes, when the service returns them (an
5099
+ * organization locator's parcel or asset identifiers, address type, ...).
5100
+ * Empty values are left out.
5101
+ */
5102
+ attributes?: Record<string, string | number | boolean>;
5103
+ }
5104
+ /** A partial-text suggestion from a locator's `suggest` operation. */
5105
+ interface GeocodeSuggestion {
5106
+ /** The suggested place, as the locator words it. */
5107
+ text: string;
5108
+ /** Opaque key that `findAddressCandidates` resolves to this suggestion. */
5109
+ magicKey: string;
5125
5110
  }
5126
5111
  /**
5127
5112
  * A geocoding backend. Builds provider-specific request URLs and normalizes the
@@ -5218,9 +5203,12 @@ export declare function buildReverseGeocodeUrl(endpoint: string, lon: number, la
5218
5203
  * `extra.providerId`, when passed, also stamps `geocode_provider` and
5219
5204
  * `geocode_status: "matched"` (dropped when omitted, so the existing
5220
5205
  * `GeocodeDialog` call site keeps its current output unchanged).
5206
+ * `extra.attributes` also adds the candidate's own attributes, each under
5207
+ * {@link GEOCODE_ATTRIBUTE_PREFIX} plus its name.
5221
5208
  */
5222
5209
  export declare function geocodeMatchToFeature(match: GeocodeMatch, originalRow?: Record<string, string>, extra?: {
5223
5210
  providerId?: GeocodingProviderId;
5211
+ attributes?: boolean;
5224
5212
  }): Feature<Point> | null;
5225
5213
  /**
5226
5214
  * Build a null-geometry Feature for a CSV row that could not be geocoded, so
@@ -5243,6 +5231,48 @@ export declare function nominatimResultToFeature(result: NominatimForwardResult,
5243
5231
  * null when the point could not be reverse-geocoded.
5244
5232
  */
5245
5233
  export declare function nominatimReverseResultToDisplay(result: NominatimReverseResult | null): ReverseGeocodeDisplay | null;
5234
+ /**
5235
+ * The GeocodeServer base URL of a pasted locator URL: an operation suffix
5236
+ * (`/findAddressCandidates`, ...), the query string and any credentials are
5237
+ * dropped, so a token in a pasted URL is never stored.
5238
+ *
5239
+ * @param input - The URL as typed.
5240
+ * @returns The base URL ending in `/GeocodeServer`, or null when it is not one.
5241
+ */
5242
+ export declare function normalizeArcGISLocatorUrl(input: string | undefined | null): string | null;
5243
+ /**
5244
+ * Coerce a stored locator to a {@link GeocodingLocator}, or null when it has no
5245
+ * usable id or GeocodeServer URL. Used for project files and runtime env, so
5246
+ * anything unexpected is dropped rather than trusted.
5247
+ *
5248
+ * @param value - The stored value.
5249
+ * @returns The locator, or null.
5250
+ */
5251
+ export declare function normalizeGeocodingLocator(value: unknown): GeocodingLocator | null;
5252
+ /** What a GeocodeServer's `?f=json` metadata says it supports. */
5253
+ type ArcGISLocatorCapabilities = Required<Pick<GeocodingLocator, "reverse" | "suggest">> & Pick<GeocodingLocator, "singleLineField" | "addressFields">;
5254
+ /**
5255
+ * Read a GeocodeServer's capabilities from its `?f=json` metadata. A service
5256
+ * that lists no `capabilities` (older ArcGIS Server) is taken to support
5257
+ * geocoding and reverse geocoding but not suggestions.
5258
+ *
5259
+ * @param data - The parsed metadata.
5260
+ * @returns The capabilities.
5261
+ * @throws GeocoderServiceError For an error envelope, or metadata that is not a
5262
+ * GeocodeServer's.
5263
+ * @throws GeocoderUnsupportedError When the service does not geocode.
5264
+ */
5265
+ export declare function parseArcGISLocatorInfo(data: unknown): ArcGISLocatorCapabilities;
5266
+ /**
5267
+ * The input field a single search string is sent in: the published field the
5268
+ * user chose for it, else the locator's single-line field, else its only
5269
+ * structured field (an asset ID locator often publishes just one), else
5270
+ * ArcGIS's conventional `SingleLine`.
5271
+ *
5272
+ * @param locator - The locator.
5273
+ * @returns The input field name.
5274
+ */
5275
+ export declare function arcgisLocatorInputField(locator: GeocodingLocator): string;
5246
5276
  /** All selectable geocoding providers, Nominatim first (the default). */
5247
5277
  export declare const GEOCODING_PROVIDERS: readonly GeocodingProvider[];
5248
5278
  /** Coerce an arbitrary string to a known provider id, defaulting to Nominatim. */
@@ -5253,10 +5283,19 @@ export declare function getGeocodingProvider(id: string | undefined | null): Geo
5253
5283
  * Resolve the geocoder configuration from runtime env, falling back to the
5254
5284
  * selected provider's default endpoints. `VITE_GEOCODER_PROVIDER` selects the
5255
5285
  * backend; `VITE_GEOCODER_ENDPOINT`/`VITE_GEOCODER_REVERSE_ENDPOINT` override
5256
- * the endpoints; `VITE_GEOCODER_EMAIL` supplies the contact email; and
5286
+ * the endpoints (except for `arcgis-locator`, whose endpoints always come from
5287
+ * `VITE_GEOCODER_LOCATOR`); `VITE_GEOCODER_EMAIL` supplies the contact email; and
5257
5288
  * `VITE_GEOCODER_API_KEY` supplies the API key for keyed providers.
5258
5289
  */
5259
5290
  export declare function getGeocoderConfig(): GeocoderConfig;
5291
+ /**
5292
+ * The locator the `arcgis-locator` provider uses: the one `locatorId` names,
5293
+ * else the first configured.
5294
+ *
5295
+ * @param input - The geocoding preference.
5296
+ * @returns The locator, or undefined when none is configured.
5297
+ */
5298
+ export declare function selectedGeocodingLocator(input: Pick<GeocodingPreferenceInput, "locators" | "locatorId">): GeocodingLocator | undefined;
5260
5299
  /** Inputs to {@link resolveGeocoderConfig}, mirroring the project preference. */
5261
5300
  interface GeocodingPreferenceInput {
5262
5301
  providerId?: string;
@@ -5267,6 +5306,10 @@ interface GeocodingPreferenceInput {
5267
5306
  /** Optional custom reverse endpoint (else the provider default). */
5268
5307
  reverseEndpoint?: string;
5269
5308
  email?: string;
5309
+ /** Configured ArcGIS GeocodeServer locators. */
5310
+ locators?: GeocodingLocator[];
5311
+ /** The locator the `arcgis-locator` provider uses. */
5312
+ locatorId?: string;
5270
5313
  }
5271
5314
  /**
5272
5315
  * Build a {@link GeocoderConfig} from structured project preferences. Used by
@@ -5346,6 +5389,75 @@ export declare function csvRowsToGeocodeRequests(rows: Record<string, string>[],
5346
5389
  * Safe to call multiple times; only the most recent implementation is used.
5347
5390
  */
5348
5391
  export declare function setGeocodingFetch(fetchImpl: typeof globalThis.fetch | null): void;
5392
+ /**
5393
+ * Resolves the access token for a secured locator, or undefined to send the
5394
+ * request without one. See {@link setGeocodingTokenProvider}.
5395
+ */
5396
+ type GeocodingTokenProvider = (locator: GeocodingLocator) => Promise<string | undefined>;
5397
+ /**
5398
+ * Register how a secured locator gets its token, or pass null to remove it.
5399
+ *
5400
+ * Core has no sign-in of its own: the app installs a provider that reuses its
5401
+ * ArcGIS portal sessions. It is only consulted for a locator that names a
5402
+ * `portalUrl`, and the provider decides whether that portal's token may be sent
5403
+ * to the locator's host, so a token is never forwarded to an unrelated server.
5404
+ *
5405
+ * @param provider - The token provider, or null.
5406
+ */
5407
+ export declare function setGeocodingTokenProvider(provider: GeocodingTokenProvider | null): void;
5408
+ /**
5409
+ * Whether `config` can reverse-geocode: a locator only when its metadata
5410
+ * advertises `reverseGeocode` (unchecked locators are assumed to).
5411
+ *
5412
+ * @param config - The geocoder configuration.
5413
+ * @returns Whether reverse geocoding is available.
5414
+ */
5415
+ export declare function geocoderSupportsReverse(config: GeocoderConfig): boolean;
5416
+ /**
5417
+ * Whether `config` offers suggestions while typing: a locator whose metadata
5418
+ * advertises `suggest`, searched through its single-line field (a suggestion
5419
+ * is a whole address, so it does not fit a structured field the user chose).
5420
+ *
5421
+ * @param config - The geocoder configuration.
5422
+ * @returns Whether {@link geocodeSuggest} can be used.
5423
+ */
5424
+ export declare function geocoderSupportsSuggest(config: GeocoderConfig): boolean;
5425
+ /**
5426
+ * Normalize an ArcGIS `suggest` response. Collection suggestions (a category
5427
+ * such as "Coffee shop") are dropped: they name many places, not one.
5428
+ *
5429
+ * @param data - The parsed response body.
5430
+ * @returns The suggestions.
5431
+ */
5432
+ export declare function parseArcGISSuggestions(data: unknown): GeocodeSuggestion[];
5433
+ /**
5434
+ * Ask the selected locator for suggestions that complete `text`. Resolve one
5435
+ * with {@link geocodeForward} and its `magicKey`.
5436
+ *
5437
+ * @param text - What the user has typed so far.
5438
+ * @param options - Abort signal, configuration and the most suggestions wanted.
5439
+ * @returns The suggestions.
5440
+ * @throws GeocoderUnsupportedError When the geocoder does not suggest.
5441
+ * @throws GeocoderServiceError For an HTTP or service error.
5442
+ */
5443
+ export declare function geocodeSuggest(text: string, options?: {
5444
+ signal?: AbortSignal;
5445
+ config?: GeocoderConfig;
5446
+ limit?: number;
5447
+ }): Promise<GeocodeSuggestion[]>;
5448
+ /**
5449
+ * Fetch and read a GeocodeServer's capabilities. A secured service is asked
5450
+ * with `token`.
5451
+ *
5452
+ * @param url - The locator's GeocodeServer URL (normalized first).
5453
+ * @param options - An abort signal and an optional token.
5454
+ * @returns The capabilities.
5455
+ * @throws GeocoderServiceError For an HTTP or service error.
5456
+ */
5457
+ export declare function fetchArcGISLocatorInfo(url: string, options?: {
5458
+ signal?: AbortSignal;
5459
+ token?: string;
5460
+ }): Promise<ArcGISLocatorCapabilities>;
5349
5461
  /**
5350
5462
  * Forward-geocode a single query through the configured provider, returning
5351
5463
  * normalized matches.
@@ -5354,6 +5466,10 @@ export declare function geocodeForward(query: string, options?: {
5354
5466
  signal?: AbortSignal;
5355
5467
  config?: GeocoderConfig;
5356
5468
  limit?: number;
5469
+ /** A {@link GeocodeSuggestion}'s key, to resolve that suggestion. */
5470
+ magicKey?: string;
5471
+ /** Ask for each candidate's own attributes, where the provider supports it. */
5472
+ attributes?: boolean;
5357
5473
  }): Promise<GeocodeMatch[]>;
5358
5474
  /**
5359
5475
  * Reverse-geocode a single point ([lon, lat]) through the configured provider,
@@ -6056,5 +6172,94 @@ export declare function localFileName(path: string): string;
6056
6172
  /** Keep imported layers distinguishable, including within a multi-file import. */
6057
6173
  export declare function uniqueImportedLayerName(name: string, names: Iterable<string>): string;
6058
6174
  //#endregion
6059
- export { AddTileLayerOptions, AppCapabilities, AppPrivilege, AppRole, type AppState, ApplyLayerJoinsResult, AttributeFormConfig, AttributeFormFieldConfig, AttributeFormValueMapEntry, AttributeFormWidget, BLANK_BASEMAP, BLEND_MODES, BlendMode, CESIUM_BASEMAPS, CesiumBasemapId, CesiumBasemapImagery, type CesiumIonAssetKind, type CesiumIonLayerOptions, type CesiumIonQuickPick, type CesiumIonQuickPickGroup, type CesiumKmlLayerOptions, CollabInvite, CollaborationChatMessage, CollaborationMode, CollaborationParticipant, CollaborationPresence, CollaborationRole, CollaborationState, CommentAnchor, CommentAuthor, CommentReply, type ConversionToolKind, type CredentialRedactionResult, type CzmlDocument, type CzmlLayerOptions, type CzmlPacket, type CzmlSource, DEFAULT_BASEMAP, DEFAULT_BLEND_MODE, DEFAULT_DASHBOARD_COLUMNS, DEFAULT_ELLIPSOID_ID, DEFAULT_LAYER_STYLE, DEFAULT_LEGEND_CONFIG, DEFAULT_MAP_GRID_LAYOUT, DEFAULT_PRIMARY_RENDERER, DEFAULT_PRINT_LAYOUT, DEFAULT_PROJECT_PREFERENCES, DEFAULT_STORY_MAP, DUCKDB_VECTOR_FEATURE_WARN_COUNT, DUCKDB_VECTOR_ROUTE_BYTES, DashboardWidget, DashboardWidgetAggregation, DashboardWidgetType, DiagramField, DiagramSizeMode, DiagramType, EARTH_MEAN_RADIUS_METERS, ELLIPSOIDS, EditorTrackingConfig, Ellipsoid, EllipsoidId, FieldVisibility, FillPattern, GeoLibreLayer, GeoLibreProject, type GeocodeMatch, type GeocodeRequest, type GeocodeStatus, type GeocoderConfig, type GeocodingPreferenceInput, GeocodingPreferences, type GeocodingProvider, type GeocodingProviderId, GeometryGeneratorType, type GpsStatusFix, type IdentifyState, IndicatorAggregation, LARGE_VECTOR_FEATURE_THRESHOLD, LAYER_TYPES, LabelAnchor, LabelDedupe, LabelStyle, LabelTransform, LayerCapabilities, LayerConnection, LayerDescriptiveMetadata, LayerGroup, LayerJoin, LayerJoinStats, LayerLibraryEntry, LayerMetadataContact, LayerMetadataLink, LayerMetadataTemporalExtent, LayerPopupConfig, LayerQuickFilter, LayerStyle, type LayerSummary, LayerType, LayerVirtualField, LegendConfig, LegendCustomEntry, LegendCustomItem, LegendCustomShape, LegendItemOverride, LegendPanelPosition, LineDecoration, MAX_DASHBOARD_COLUMNS, MAX_MAP_GRID_DIM, MAX_PROCESSING_HISTORY, MIN_DASHBOARD_COLUMNS, MapGridLayout, MapPreferences, MapProjection, MapRendererKind, MapScaleUnit, MapViewState, MarkerShape, ModelGraphEdge, ModelGraphNode, ModelGraphNodeKind, ModelGraphPort, ModelPortKind, ModelToolProvider, NETCDF_IMAGE_SOURCE_KIND, type NetworkToolKind, type NominatimForwardResult, type NominatimReverseResult, NonGeographicCoordinates, OPENFREEMAP_BASEMAPS, PLANETARY_BASEMAPS, PLANETARY_BASEMAP_GROUPS, PLANETARY_BASEMAP_SENTINEL_PREFIX, PLANET_SWITCHER_OPTIONS, PROJECT_VERSION, PROTOMAPS_BASEMAPS, ParticipantIdentity, PlanetaryBasemap, PlanetaryBasemapGroup, PlanetaryBasemapSectionId, PointRenderer, PolylineBatchOptions, PolylineDecodeResult, PopupDateFormat, PopupFieldConfig, PopupFieldFormat, PopupFieldKind, PrintLayoutConfig, PrintLayoutCorner, PrintLayoutLegendEntry, PrintLayoutPageFilter, ProcessingModel, ProcessingModelGraph, ProcessingModelStep, ProcessingRerunRequest, ProcessingRun, ProcessingRunKind, ProcessingRunStatus, ProjectComment, type ProjectCredentialLookup, ProjectInteraction, ProjectPluginControlPosition, ProjectPluginState, ProjectPreferences, ProjectTemplateEntry, QuickFilterDateKind, QuickFilterKind, QuickFilterTextOperator, type RasterToolKind, RecentProjectEntry, type ReverseGeocodeDisplay, RuntimeEnvironmentVariable, SQL_QUERY_SOURCE_KIND, SecondaryMapView, type StatisticsToolKind, StoryActiveSlideMode, StoryChapter, StoryChapterAlignment, StoryChapterAnimation, StoryChapterLocation, StoryInsetPosition, StoryLayerOpacityChange, StoryMap, StorySlideMode, StrokeWidthUnit, StyleLibraryEntry, StyleLibraryEntryKind, VectorRule, VectorStyleMode, VectorStyleStop, type VectorToolKind, applyJoinsToLayer, applyLayerJoins, availableCesiumBasemap, basemapToCesiumImagery, batchDecodePolylines, bodyLengthToEarth, cascadeLayerJoinRefresh, collectTransitiveJoinSourceIds, createDefaultPrintLayout, decodePolyline, decodePolylineDetailed, detectNonGeographicCoordinates, earthAreaToBody, earthLengthToBody, encodePolyline, geoJSONToPolylineStr, geojsonHasZCoordinates, getActiveBodyRadiusRatio, getActiveEllipsoid, getActiveMeanRadiusMeters, getActiveSemiMajorAxisMeters, getEllipsoid, getPlanetaryBasemapById, getPlanetaryBasemapByStyleUrl, horizontalBbox, isDefaultPrintLayout, isDuckDBQueryLayer, layerJoinKey, meanRadiusMeters, normalizeCesiumBasemap, normalizePrintLayoutConfig, polylineStrToGeoJSON, printLayoutConfigsEqual, reapplyLayerJoins, sameCesiumImagery, scrubPrintLayoutForLayers, scrubPrintLayoutForRemovedLayers, setActiveEllipsoidId, shouldUseTiledRendering, stripJoinFields, styleValue, transformGeojsonElevation, unescapePolyline };
6175
+ //#region src/datum-shift.d.ts
6176
+ /**
6177
+ * Datum shifts (proj4 `+towgs84` Helmert parameters) for coordinate systems
6178
+ * whose datum is not WGS84-compatible, by EPSG code.
6179
+ *
6180
+ * The offline EPSG tables GeoLibre resolves codes with
6181
+ * (`geotiff-geokeys-to-proj4`) leave the shift out for many national grids, and
6182
+ * epsg.io's PROJJSON for a projected CRS carries no transformation either, so
6183
+ * proj4 would treat those datums as WGS84 and place data tens to hundreds of
6184
+ * metres off (about 100 m for the British National Grid). The parameters are
6185
+ * EPSG's (the transformation epsg.io's proj4 strings use), within a few
6186
+ * metres of PROJ's best transformation for each (15 m for the NAD27 mean);
6187
+ * grid-based transformations (OSTN15, NTv2, NADCON) are finer but need grid
6188
+ * files proj4 does not ship. Datums the tables already shift (ED50, AGD66,
6189
+ * AGD84, Tokyo, NZGD49, TM75 and others) are not listed.
6190
+ */
6191
+ /**
6192
+ * The `+towgs84` parameters for an EPSG CRS or datum code, or null when the
6193
+ * code is not one whose shift GeoLibre adds.
6194
+ *
6195
+ * @param crs An EPSG geographic or projected CRS code.
6196
+ * @param datum An EPSG datum code, used when the CRS code is unknown.
6197
+ */
6198
+ export declare function datumShiftFor(crs: number | null | undefined, datum?: number | null): string | null;
6199
+ /**
6200
+ * Add the datum shift to a proj4 definition built for an EPSG CRS (or from a
6201
+ * GeoTIFF's geokeys), when the definition has none and the CRS is one whose
6202
+ * shift is known. A definition that already names a datum transformation
6203
+ * (`+towgs84`, `+datum=`, `+nadgrids=`) is returned unchanged.
6204
+ *
6205
+ * @param definition A proj4 definition string.
6206
+ * @param crs The EPSG CRS code it was built for.
6207
+ * @param datum The EPSG datum code, for a user-defined CRS.
6208
+ */
6209
+ export declare function withDatumShift(definition: string, crs: number | null | undefined, datum?: number | null): string;
6210
+ /**
6211
+ * Add the datum shift to a proj4 definition built from GeoTIFF geokeys, from
6212
+ * the projected or geographic CRS code, else the datum code.
6213
+ *
6214
+ * @param definition The proj4 definition built from `geoKeys`.
6215
+ * @param geoKeys The GeoTIFF's geokeys (geotiff.js names).
6216
+ */
6217
+ export declare function withGeoKeysDatumShift(definition: string, geoKeys: Record<string, unknown> | null | undefined): string;
6218
+ /** The part of `cog-tiler-wasm` the datum-shift hook needs (0.5 and later). */
6219
+ interface CogTilerCrsHook {
6220
+ setSourceCrsResolver?: (fn: ((def: string, geoKeys: Record<string, unknown>) => string | null | undefined) | null) => void;
6221
+ }
6222
+ /**
6223
+ * Have `cog-tiler-wasm` add the datum shift to each COG's source CRS, so a
6224
+ * raster it tiles lands where the rest of GeoLibre puts it. Idempotent; a
6225
+ * tiler without the hook is left as it is. WKT definitions are left alone.
6226
+ *
6227
+ * @param module The imported `cog-tiler-wasm` module.
6228
+ */
6229
+ export declare function installCogTilerDatumShift(module: CogTilerCrsHook): void;
6230
+ //#endregion
6231
+ //#region src/cog-jpeg-tables.d.ts
6232
+ type NumericArray = ArrayLike<number> | undefined;
6233
+ /** Convert separate TIFF Y/Cb/Cr planes to RGB using tags 529 and 532. */
6234
+ export declare function convertTiffYCbCrToRgb(yPlane: ArrayLike<number>, cbPlane: ArrayLike<number>, crPlane: ArrayLike<number>, coefficients?: NumericArray, referenceBlackWhite?: NumericArray): [Float64Array, Float64Array, Float64Array];
6235
+ /**
6236
+ * Whether a cog-tiler-wasm level's `compression` is baseline JPEG, the only
6237
+ * codec whose tiles may omit their tables (TIFF tag 347) and so need the
6238
+ * geotiff.js window read in {@link patchJpegCogSource}. The string is whitebox-wasm's
6239
+ * enum name, so match `Jpeg`/`OldJpeg` exactly: a looser `/jpeg/i` would also
6240
+ * catch `JpegXl`, which the wasm decoder handles and geotiff.js cannot decode
6241
+ * at all (#2339).
6242
+ */
6243
+ export declare function isAbbreviatedJpegCompression(compression: string | undefined): boolean;
6244
+ /**
6245
+ * Route an abbreviated-JPEG COG's tile windows through geotiff.js, which reads
6246
+ * the shared tables, converting Y/Cb/Cr to the RGB bands the renderers expect.
6247
+ * Any other source is returned unchanged.
6248
+ *
6249
+ * @param source - A cog-tiler-wasm source.
6250
+ * @returns The same source, patched in place when it needs it.
6251
+ */
6252
+ export declare function patchJpegCogSource(source: unknown): unknown;
6253
+ /**
6254
+ * A cog-tiler module whose `openCog` returns {@link patchJpegCogSource}-patched
6255
+ * sources; the rest of the module is passed through.
6256
+ *
6257
+ * @param module - The cog-tiler-wasm module (or a test double).
6258
+ * @returns The wrapped module.
6259
+ */
6260
+ export declare function withJpegTablesPatch<M extends {
6261
+ openCog: (input: never) => Promise<unknown>;
6262
+ }>(module: M): M;
6263
+ //#endregion
6264
+ export { AddTileLayerOptions, AppCapabilities, AppPrivilege, AppRole, type AppState, ApplyLayerJoinsResult, type ArcGISLocatorCapabilities, AttributeFormConfig, AttributeFormFieldConfig, AttributeFormValueMapEntry, AttributeFormWidget, BLANK_BASEMAP, BLEND_MODES, BlendMode, CESIUM_BASEMAPS, CesiumBasemapId, CesiumBasemapImagery, type CesiumIonAssetKind, type CesiumIonLayerOptions, type CesiumIonQuickPick, type CesiumIonQuickPickGroup, type CesiumKmlLayerOptions, CollabInvite, CollaborationChatMessage, CollaborationMode, CollaborationParticipant, CollaborationPresence, CollaborationRole, CollaborationState, CommentAnchor, CommentAuthor, CommentReply, type ConversionToolKind, CreateProjectOptions, type CredentialRedactionResult, type CzmlDocument, type CzmlLayerOptions, type CzmlPacket, type CzmlSource, DEFAULT_BASEMAP, DEFAULT_BLEND_MODE, DEFAULT_DASHBOARD_COLUMNS, DEFAULT_ELLIPSOID_ID, DEFAULT_LAYER_STYLE, DEFAULT_LEGEND_CONFIG, DEFAULT_MAP_GRID_LAYOUT, DEFAULT_PRIMARY_RENDERER, DEFAULT_PRINT_LAYOUT, DEFAULT_PROJECT_NAME, DEFAULT_PROJECT_PREFERENCES, DEFAULT_STORY_MAP, DUCKDB_VECTOR_FEATURE_WARN_COUNT, DUCKDB_VECTOR_ROUTE_BYTES, DashboardWidget, DashboardWidgetAggregation, DashboardWidgetType, DiagramField, DiagramSizeMode, DiagramType, EARTH_MEAN_RADIUS_METERS, ELLIPSOIDS, EditorTrackingConfig, Ellipsoid, EllipsoidId, FeatureChangeSummary, FieldVisibility, FillPattern, GeoArrowBatch, GeoArrowGeometryType, GeoLibreLayer, GeoLibreProject, type GeocodeMatch, type GeocodeRequest, type GeocodeStatus, type GeocodeSuggestion, type GeocoderConfig, GeocodingLocator, type GeocodingPreferenceInput, GeocodingPreferences, type GeocodingProvider, type GeocodingProviderId, type GeocodingTokenProvider, GeometryGeneratorType, type GpsStatusFix, type IdentifyState, IndicatorAggregation, LARGE_VECTOR_FEATURE_THRESHOLD, LAYER_TYPES, LabelAnchor, LabelDedupe, LabelStyle, LabelTransform, LayerCapabilities, LayerConnection, LayerDescriptiveMetadata, LayerDiff, LayerGroup, LayerJoin, LayerJoinStats, LayerLibraryEntry, LayerMetadataContact, LayerMetadataLink, LayerMetadataTemporalExtent, LayerPopupConfig, LayerQuickFilter, LayerStyle, type LayerSummary, LayerType, LayerVirtualField, LegendConfig, LegendCustomEntry, LegendCustomItem, LegendCustomShape, LegendItemOverride, LegendPanelPosition, LineDecoration, MAX_DASHBOARD_COLUMNS, MAX_MAP_GRID_DIM, MAX_PROCESSING_HISTORY, MAX_PROJECT_BOOKMARKS, MIN_DASHBOARD_COLUMNS, MapGridLayout, MapPreferences, MapProjection, MapRendererKind, MapScaleUnit, MapViewState, MarkerShape, ModelGraphEdge, ModelGraphNode, ModelGraphNodeKind, ModelGraphPort, ModelPortKind, ModelToolProvider, NETCDF_IMAGE_SOURCE_KIND, type NetworkToolKind, type NominatimForwardResult, type NominatimReverseResult, NonGeographicCoordinates, OPENFREEMAP_BASEMAPS, PLANETARY_BASEMAPS, PLANETARY_BASEMAP_GROUPS, PLANETARY_BASEMAP_SENTINEL_PREFIX, PLANET_SWITCHER_OPTIONS, PROJECT_VERSION, PROTOMAPS_BASEMAPS, ParticipantIdentity, PlanetaryBasemap, PlanetaryBasemapGroup, PlanetaryBasemapSectionId, PluginDiff, PointRenderer, PolylineBatchOptions, PolylineDecodeResult, PopupDateFormat, PopupFieldConfig, PopupFieldFormat, PopupFieldKind, PrintLayoutConfig, PrintLayoutCorner, PrintLayoutLegendEntry, PrintLayoutPageFilter, ProcessingModel, ProcessingModelGraph, ProcessingModelStep, ProcessingRerunRequest, ProcessingRun, ProcessingRunKind, ProcessingRunStatus, ProjectBookmark, ProjectBookmarkGroup, ProjectComment, type ProjectCredentialLookup, ProjectDiff, ProjectDiffOptions, ProjectInteraction, ProjectLayerSerializationCache, ProjectPluginControlPosition, ProjectPluginState, ProjectPreferences, ProjectTemplateEntry, ProjectValueChange, QuickFilterDateKind, QuickFilterKind, QuickFilterTextOperator, type RasterToolKind, RecentProjectEntry, type ReverseGeocodeDisplay, RuntimeEnvironmentVariable, SQL_QUERY_SOURCE_KIND, SecondaryMapView, type StatisticsToolKind, StoryActiveSlideMode, StoryChapter, StoryChapterAlignment, StoryChapterAnimation, StoryChapterLocation, StoryInsetPosition, StoryLayerOpacityChange, StoryMap, StorySlideMode, StrokeWidthUnit, StyleLibraryEntry, StyleLibraryEntryKind, VectorRule, VectorStyleMode, VectorStyleStop, type VectorToolKind, applyJoinsToLayer, applyLayerJoins, applyProjectToStore, availableCesiumBasemap, basemapToCesiumImagery, batchDecodePolylines, bodyLengthToEarth, cascadeLayerJoinRefresh, collectTransitiveJoinSourceIds, computeGeoArrowBBox, createDefaultMapView, createDefaultPrintLayout, createEmptyProject, createProjectLayerSerializationCache, createProjectTemplate, decodePolyline, decodePolylineDetailed, detachProjectCopy, detectNonGeographicCoordinates, diffFeatureCollections, diffProjects, earthAreaToBody, earthLengthToBody, encodePolyline, featureCollectionToGeoArrow, geoArrowToFeatureCollection, geoJSONToPolylineStr, geojsonHasZCoordinates, getActiveBodyRadiusRatio, getActiveEllipsoid, getActiveMeanRadiusMeters, getActiveSemiMajorAxisMeters, getEllipsoid, getPlanetaryBasemapById, getPlanetaryBasemapByStyleUrl, horizontalBbox, hydrateProjectLayer, isAllowedPluginManifestUrl, isDefaultPrintLayout, isDuckDBQueryLayer, isGeoArrowBatch, isSessionOnlyLayer, jsonValuesEqual, layerJoinKey, meanRadiusMeters, normalizeBlankBackgroundColor, normalizeBookmarkGroups, normalizeBookmarks, normalizeCesiumBasemap, normalizeDashboardColumns, normalizeLegendConfig, normalizeMapLayout, normalizeMapViewState, normalizeModelGraph, normalizeModels, normalizeObiaWorkbench, normalizePrimaryRenderer, normalizePrintLayoutConfig, normalizeProcessingHistory, normalizeProjectComments, normalizeProjectInteraction, normalizeSecondaryMapViews, normalizeStoryMap, normalizeWidgets, parseProject, polylineStrToGeoJSON, portableWmsTileUrl, previewValue, printLayoutConfigsEqual, projectFromStore, reapplyLayerJoins, resolveMapGrid, sameCesiumImagery, scrubPrintLayoutForLayers, scrubPrintLayoutForRemovedLayers, serializeProject, serializeProjectWithLayerCache, serializeProjectWithLayerCacheAsync, setActiveEllipsoidId, shouldUseTiledRendering, storyMapHasContent, stripJoinFields, styleValue, transformGeojsonElevation, unescapePolyline };
6060
6265
  //# sourceMappingURL=index.d.mts.map