react-bkoi-gl 2.1.0 → 2.2.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/README.md +90 -7
- package/dist/index.cjs +8218 -387
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -2
- package/dist/index.d.ts +38 -2
- package/dist/index.js +8217 -388
- package/dist/index.js.map +1 -1
- package/dist/styles/index.d.ts +1 -1
- package/dist/styles/react-bkoi-gl.css +49 -2
- package/package.json +36 -42
package/dist/index.d.cts
CHANGED
|
@@ -190,6 +190,9 @@ type MaplibreProps = Partial<ViewState> & MapCallbacks & {
|
|
|
190
190
|
interactiveLayerIds?: string[];
|
|
191
191
|
/** CSS cursor */
|
|
192
192
|
cursor?: string;
|
|
193
|
+
/** Called with non-fatal warnings (e.g. transient errors before the style
|
|
194
|
+
* has finished loading). When omitted, warnings fall back to `console.warn`. */
|
|
195
|
+
onWarning?: (e: ErrorEvent) => void;
|
|
193
196
|
};
|
|
194
197
|
|
|
195
198
|
/** These methods may break the react binding if called directly */
|
|
@@ -221,6 +224,9 @@ type GlobalSettings = {
|
|
|
221
224
|
type MapContextValue = {
|
|
222
225
|
mapLib: MapLib;
|
|
223
226
|
map: MapRef;
|
|
227
|
+
/** Consumer-supplied warning handler, propagated to child components so they
|
|
228
|
+
* can surface non-fatal warnings without touching console directly. */
|
|
229
|
+
onWarning?: (e: ErrorEvent) => void;
|
|
224
230
|
};
|
|
225
231
|
type MapInitOptions = Omit<MapOptions, 'style' | 'container' | 'bounds' | 'fitBoundsOptions' | 'center'>;
|
|
226
232
|
type MapProps = MapInitOptions & MaplibreProps & GlobalSettings & {
|
|
@@ -231,7 +237,23 @@ type MapProps = MapInitOptions & MaplibreProps & GlobalSettings & {
|
|
|
231
237
|
/** Map container CSS style */
|
|
232
238
|
style?: CSSProperties;
|
|
233
239
|
children?: React$1.ReactNode;
|
|
240
|
+
/** Whether to render the Barikoi logo control.
|
|
241
|
+
* @default true */
|
|
242
|
+
showBarikoiLogo?: boolean;
|
|
243
|
+
/** Whether to render the map attribution control.
|
|
244
|
+
* @default true
|
|
245
|
+
* @remarks Attribution is required by the OpenStreetMap and MapLibre
|
|
246
|
+
* license terms; keep this enabled unless you provide attribution elsewhere. */
|
|
247
|
+
showAttribution?: boolean;
|
|
234
248
|
} & React$1.RefAttributes<MapRef>;
|
|
249
|
+
/**
|
|
250
|
+
* Interactive Map component using MapLibre GL.
|
|
251
|
+
*
|
|
252
|
+
* @remarks
|
|
253
|
+
* For keyboard navigation and accessibility, the `keyboard` prop must be set to `true` (which is default).
|
|
254
|
+
* If explicitly disabled (e.g. `keyboard={false}`), keyboard access (such as panning/zooming via arrow keys)
|
|
255
|
+
* will be unavailable to screen reader and keyboard-only users.
|
|
256
|
+
*/
|
|
235
257
|
declare const Map: React$1.FC<MapProps>;
|
|
236
258
|
|
|
237
259
|
type MarkerProps = MarkerOptions & {
|
|
@@ -373,7 +395,7 @@ type SourceProps = SourceSpecification & {
|
|
|
373
395
|
/** Child Layer components that will use this source. */
|
|
374
396
|
children?: any;
|
|
375
397
|
};
|
|
376
|
-
declare const Source: React$1.
|
|
398
|
+
declare const Source: React$1.NamedExoticComponent<SourceProps & React$1.RefAttributes<Source$1>>;
|
|
377
399
|
|
|
378
400
|
/**
|
|
379
401
|
* @fileoverview CanvasSource component for adding canvas-based data sources to a MapLibre GL map.
|
|
@@ -849,6 +871,10 @@ declare class Minimap implements IControl {
|
|
|
849
871
|
private toggleButtonCleanup?;
|
|
850
872
|
private isMinimized;
|
|
851
873
|
private resizeHandler?;
|
|
874
|
+
private resizeTimeout?;
|
|
875
|
+
private transitionTimeout?;
|
|
876
|
+
private toggleButtonStyleEl?;
|
|
877
|
+
private liveRegion?;
|
|
852
878
|
constructor(options?: MinimapControlOptions);
|
|
853
879
|
onAdd(parentMap: MapLibreMap): HTMLElement;
|
|
854
880
|
onRemove(): void;
|
|
@@ -867,4 +893,14 @@ declare class Minimap implements IControl {
|
|
|
867
893
|
declare function _MinimapControl(props: MinimapControlProps): any;
|
|
868
894
|
declare const MinimapControl: React$1.MemoExoticComponent<typeof _MinimapControl>;
|
|
869
895
|
|
|
870
|
-
|
|
896
|
+
interface Logger {
|
|
897
|
+
warn: (message: any, ...args: any[]) => void;
|
|
898
|
+
error: (message: any, ...args: any[]) => void;
|
|
899
|
+
}
|
|
900
|
+
declare const logger: {
|
|
901
|
+
warn(message: any, ...args: any[]): void;
|
|
902
|
+
error(message: any, ...args: any[]): void;
|
|
903
|
+
};
|
|
904
|
+
declare function setLogger(customLogger: Partial<Logger>): void;
|
|
905
|
+
|
|
906
|
+
export { AttributionControl, type AttributionControlProps, type CanvasCoordinates, CanvasSource, type CanvasSourceProps, DrawControl, type DrawControlOptions, type DrawControlProps, type ErrorEvent, FullscreenControl, type FullscreenControlProps, GeolocateControl, type GeolocateControlProps, type GeolocateErrorEvent, type GeolocateEvent, type GeolocateResultEvent, GlobeControl, type GlobeControlOptions, type GlobeControlProps, type ImmutableLike, Layer, type LayerProps, type Logger, LogoControl, type LogoControlProps, Map, type MapCallbacks, type MapControl, type MapInteractions, type MapLib, type MapMouseEvent, type MapProps, MapProvider, type MapRef, Marker, type MarkerDragEvent, type MarkerEvent, type MarkerProps, Minimap, MinimapControl, type MinimapControlOptions, type MinimapControlProps, type MinimapInteractions, NavigationControl, type NavigationControlProps, type ParentRectConfig, Popup, type PopupEvent, type PopupProps, ScaleControl, type ScaleControlProps, Source, type SourceProps, TerrainControl, type TerrainControlProps, type ToggleButtonConfig, type ViewState, type ViewStateChangeEvent, Map as default, logger, setLogger, useControl, useMap };
|
package/dist/index.d.ts
CHANGED
|
@@ -190,6 +190,9 @@ type MaplibreProps = Partial<ViewState> & MapCallbacks & {
|
|
|
190
190
|
interactiveLayerIds?: string[];
|
|
191
191
|
/** CSS cursor */
|
|
192
192
|
cursor?: string;
|
|
193
|
+
/** Called with non-fatal warnings (e.g. transient errors before the style
|
|
194
|
+
* has finished loading). When omitted, warnings fall back to `console.warn`. */
|
|
195
|
+
onWarning?: (e: ErrorEvent) => void;
|
|
193
196
|
};
|
|
194
197
|
|
|
195
198
|
/** These methods may break the react binding if called directly */
|
|
@@ -221,6 +224,9 @@ type GlobalSettings = {
|
|
|
221
224
|
type MapContextValue = {
|
|
222
225
|
mapLib: MapLib;
|
|
223
226
|
map: MapRef;
|
|
227
|
+
/** Consumer-supplied warning handler, propagated to child components so they
|
|
228
|
+
* can surface non-fatal warnings without touching console directly. */
|
|
229
|
+
onWarning?: (e: ErrorEvent) => void;
|
|
224
230
|
};
|
|
225
231
|
type MapInitOptions = Omit<MapOptions, 'style' | 'container' | 'bounds' | 'fitBoundsOptions' | 'center'>;
|
|
226
232
|
type MapProps = MapInitOptions & MaplibreProps & GlobalSettings & {
|
|
@@ -231,7 +237,23 @@ type MapProps = MapInitOptions & MaplibreProps & GlobalSettings & {
|
|
|
231
237
|
/** Map container CSS style */
|
|
232
238
|
style?: CSSProperties;
|
|
233
239
|
children?: React$1.ReactNode;
|
|
240
|
+
/** Whether to render the Barikoi logo control.
|
|
241
|
+
* @default true */
|
|
242
|
+
showBarikoiLogo?: boolean;
|
|
243
|
+
/** Whether to render the map attribution control.
|
|
244
|
+
* @default true
|
|
245
|
+
* @remarks Attribution is required by the OpenStreetMap and MapLibre
|
|
246
|
+
* license terms; keep this enabled unless you provide attribution elsewhere. */
|
|
247
|
+
showAttribution?: boolean;
|
|
234
248
|
} & React$1.RefAttributes<MapRef>;
|
|
249
|
+
/**
|
|
250
|
+
* Interactive Map component using MapLibre GL.
|
|
251
|
+
*
|
|
252
|
+
* @remarks
|
|
253
|
+
* For keyboard navigation and accessibility, the `keyboard` prop must be set to `true` (which is default).
|
|
254
|
+
* If explicitly disabled (e.g. `keyboard={false}`), keyboard access (such as panning/zooming via arrow keys)
|
|
255
|
+
* will be unavailable to screen reader and keyboard-only users.
|
|
256
|
+
*/
|
|
235
257
|
declare const Map: React$1.FC<MapProps>;
|
|
236
258
|
|
|
237
259
|
type MarkerProps = MarkerOptions & {
|
|
@@ -373,7 +395,7 @@ type SourceProps = SourceSpecification & {
|
|
|
373
395
|
/** Child Layer components that will use this source. */
|
|
374
396
|
children?: any;
|
|
375
397
|
};
|
|
376
|
-
declare const Source: React$1.
|
|
398
|
+
declare const Source: React$1.NamedExoticComponent<SourceProps & React$1.RefAttributes<Source$1>>;
|
|
377
399
|
|
|
378
400
|
/**
|
|
379
401
|
* @fileoverview CanvasSource component for adding canvas-based data sources to a MapLibre GL map.
|
|
@@ -849,6 +871,10 @@ declare class Minimap implements IControl {
|
|
|
849
871
|
private toggleButtonCleanup?;
|
|
850
872
|
private isMinimized;
|
|
851
873
|
private resizeHandler?;
|
|
874
|
+
private resizeTimeout?;
|
|
875
|
+
private transitionTimeout?;
|
|
876
|
+
private toggleButtonStyleEl?;
|
|
877
|
+
private liveRegion?;
|
|
852
878
|
constructor(options?: MinimapControlOptions);
|
|
853
879
|
onAdd(parentMap: MapLibreMap): HTMLElement;
|
|
854
880
|
onRemove(): void;
|
|
@@ -867,4 +893,14 @@ declare class Minimap implements IControl {
|
|
|
867
893
|
declare function _MinimapControl(props: MinimapControlProps): any;
|
|
868
894
|
declare const MinimapControl: React$1.MemoExoticComponent<typeof _MinimapControl>;
|
|
869
895
|
|
|
870
|
-
|
|
896
|
+
interface Logger {
|
|
897
|
+
warn: (message: any, ...args: any[]) => void;
|
|
898
|
+
error: (message: any, ...args: any[]) => void;
|
|
899
|
+
}
|
|
900
|
+
declare const logger: {
|
|
901
|
+
warn(message: any, ...args: any[]): void;
|
|
902
|
+
error(message: any, ...args: any[]): void;
|
|
903
|
+
};
|
|
904
|
+
declare function setLogger(customLogger: Partial<Logger>): void;
|
|
905
|
+
|
|
906
|
+
export { AttributionControl, type AttributionControlProps, type CanvasCoordinates, CanvasSource, type CanvasSourceProps, DrawControl, type DrawControlOptions, type DrawControlProps, type ErrorEvent, FullscreenControl, type FullscreenControlProps, GeolocateControl, type GeolocateControlProps, type GeolocateErrorEvent, type GeolocateEvent, type GeolocateResultEvent, GlobeControl, type GlobeControlOptions, type GlobeControlProps, type ImmutableLike, Layer, type LayerProps, type Logger, LogoControl, type LogoControlProps, Map, type MapCallbacks, type MapControl, type MapInteractions, type MapLib, type MapMouseEvent, type MapProps, MapProvider, type MapRef, Marker, type MarkerDragEvent, type MarkerEvent, type MarkerProps, Minimap, MinimapControl, type MinimapControlOptions, type MinimapControlProps, type MinimapInteractions, NavigationControl, type NavigationControlProps, type ParentRectConfig, Popup, type PopupEvent, type PopupProps, ScaleControl, type ScaleControlProps, Source, type SourceProps, TerrainControl, type TerrainControlProps, type ToggleButtonConfig, type ViewState, type ViewStateChangeEvent, Map as default, logger, setLogger, useControl, useMap };
|