the editable site (validation-lab)
This commit is contained in:
commit
3ac81d5a52
13454 files changed
+2227005
No files matched your search
+33
@@ -0,0 +1,33 @@
|
||||
import { FeatureId } from "../extend";
|
||||
import { GeoJSONStoreFeatures, TerraDraw } from "../terra-draw";
|
||||
import { Bench } from "tinybench";
|
||||
type BenchmarkResult = {
|
||||
name: string;
|
||||
opsPerSecond: number;
|
||||
averageTimeMs: number;
|
||||
};
|
||||
export declare const createPointFeatures: (n: number) => GeoJSONStoreFeatures[];
|
||||
export declare const createDraw: () => TerraDraw;
|
||||
type BenchmarkProps = {
|
||||
draw: TerraDraw;
|
||||
features: GeoJSONStoreFeatures[];
|
||||
featureIds: FeatureId[];
|
||||
randomFeatureId: FeatureId;
|
||||
};
|
||||
export type BenchmarkTask = {
|
||||
name: string;
|
||||
beforeEach: (benchmarkProps: BenchmarkProps) => void;
|
||||
task: (benchmarkProps: BenchmarkProps) => void;
|
||||
featureCount?: number;
|
||||
loopCount?: number;
|
||||
enabled?: boolean;
|
||||
};
|
||||
export declare const createBenchmark: (benmarkName: string, tasks: BenchmarkTask[]) => Bench;
|
||||
export declare const processBenchmarks: (bench: Bench, benchmarkTasks: BenchmarkTask[]) => BenchmarkResult[];
|
||||
export declare function writeBenchmarkSummary(results: BenchmarkResult[]): void;
|
||||
export declare const logBenchmarkResults: (results: {
|
||||
name: string;
|
||||
opsPerSecond: number;
|
||||
averageTimeMs: number;
|
||||
}[]) => void;
|
||||
export {};
|
||||
+217
@@ -0,0 +1,217 @@
|
||||
import { Feature, LineString, Polygon, Position } from "geojson";
|
||||
import { StoreChangeHandler, GeoJSONStore, GeoJSONStoreFeatures, FeatureId } from "./store/store";
|
||||
export type HexColor = `#${string}`;
|
||||
export type HexColorStyling = HexColor | ((feature: GeoJSONStoreFeatures) => HexColor | undefined);
|
||||
export type NumericStyling = number | ((feature: GeoJSONStoreFeatures) => number | undefined);
|
||||
export type DashArrayStyling = [number, number] | ((feature: GeoJSONStoreFeatures) => [number, number] | undefined);
|
||||
export type UrlStyling = string | ((feature: GeoJSONStoreFeatures) => string);
|
||||
type MarkerAnchor = "center" | "top" | "bottom" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
||||
export type MarkerAnchorStyling = MarkerAnchor | ((feature: GeoJSONStoreFeatures) => MarkerAnchor | undefined);
|
||||
export interface TerraDrawAdapterStyling {
|
||||
pointColor: HexColor;
|
||||
pointWidth: number;
|
||||
pointOpacity?: number;
|
||||
pointOutlineColor: HexColor;
|
||||
pointOutlineOpacity?: number;
|
||||
pointOutlineWidth: number;
|
||||
polygonFillColor: HexColor;
|
||||
polygonFillOpacity: number;
|
||||
polygonOutlineColor: HexColor;
|
||||
polygonOutlineOpacity?: number;
|
||||
polygonOutlineWidth: number;
|
||||
lineStringWidth: number;
|
||||
lineStringColor: HexColor;
|
||||
lineStringOpacity?: number;
|
||||
/** lineStringDash - Tuple representing the dash pattern for the line string, where the first number is the length of the dash and the second number is the length of the gap in pixels */
|
||||
lineStringDash?: DashArrayStyling;
|
||||
zIndex: number;
|
||||
markerUrl?: string;
|
||||
markerHeight?: number;
|
||||
markerWidth?: number;
|
||||
markerAnchor?: MarkerAnchor;
|
||||
}
|
||||
export type CartesianPoint = {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
export interface TerraDrawMouseEvent {
|
||||
lng: number;
|
||||
lat: number;
|
||||
containerX: number;
|
||||
containerY: number;
|
||||
button: "neither" | "left" | "middle" | "right";
|
||||
heldKeys: string[];
|
||||
isContextMenu: boolean;
|
||||
}
|
||||
export interface TerraDrawKeyboardEvent {
|
||||
key: string;
|
||||
heldKeys: string[];
|
||||
preventDefault: () => void;
|
||||
}
|
||||
export type Cursor = Parameters<SetCursor>[0];
|
||||
export type SetCursor = (cursor: "alias" | "all-scroll" | "auto" | "cell" | "col-resize" | "context-menu" | "copy" | "crosshair" | "default" | "e-resize" | "ew-resize" | "grab" | "grabbing" | "help" | "move" | "n-resize" | "ne-resize" | "nesw-resize" | "no-drop" | "none" | "not-allowed" | "ns-resize" | "nw-resize" | "nwse-resize" | "pointer" | "progress" | "row-resize" | "s-resize" | "se-resize" | "sw-resize" | "text" | "unset" | "vertical-text" | "w-resize" | "wait" | "zoom-in" | "zoom-out") => void;
|
||||
export type Project = (lng: number, lat: number) => CartesianPoint;
|
||||
export type Unproject = (x: number, y: number) => {
|
||||
lat: number;
|
||||
lng: number;
|
||||
};
|
||||
export type GetLngLatFromEvent = (event: PointerEvent | MouseEvent) => {
|
||||
lng: number;
|
||||
lat: number;
|
||||
} | null;
|
||||
export type Projection = "web-mercator" | "globe";
|
||||
export declare const FinishActions: {
|
||||
readonly Draw: "draw";
|
||||
readonly Edit: "edit";
|
||||
readonly DeleteCoordinate: "deleteCoordinate";
|
||||
readonly InsertMidpoint: "insertMidpoint";
|
||||
readonly DragCoordinate: "dragCoordinate";
|
||||
readonly DragFeature: "dragFeature";
|
||||
readonly DragCoordinateResize: "dragCoordinateResize";
|
||||
};
|
||||
export type DrawInteractions = "click-move" | "click-drag" | "click-move-or-drag";
|
||||
export type DrawType = "click" | "drag";
|
||||
export type Actions = (typeof FinishActions)[keyof typeof FinishActions];
|
||||
export type OnFinishContext = {
|
||||
mode: string;
|
||||
action: Actions;
|
||||
};
|
||||
export type TerraDrawOnChangeContext = {
|
||||
origin: "api";
|
||||
target?: "geometry" | "properties";
|
||||
} | {
|
||||
target?: "geometry" | "properties";
|
||||
};
|
||||
export type TerraDrawGeoJSONStore = GeoJSONStore<TerraDrawOnChangeContext | undefined, FeatureId>;
|
||||
export interface TerraDrawModeRegisterConfig {
|
||||
mode: string;
|
||||
store: TerraDrawGeoJSONStore;
|
||||
setDoubleClickToZoom: (enabled: boolean) => void;
|
||||
setCursor: SetCursor;
|
||||
onChange: StoreChangeHandler<TerraDrawOnChangeContext | undefined>;
|
||||
onSelect: (selectedId: string) => void;
|
||||
onDeselect: (deselectedId: string) => void;
|
||||
onFinish: (finishedId: string, context: OnFinishContext) => void;
|
||||
project: Project;
|
||||
unproject: Unproject;
|
||||
coordinatePrecision: number;
|
||||
undoRedoMaxStackSize?: number;
|
||||
}
|
||||
export declare enum UpdateTypes {
|
||||
Commit = "commit",
|
||||
Provisional = "provisional",
|
||||
Finish = "finish"
|
||||
}
|
||||
type ValidationContext = Pick<TerraDrawModeRegisterConfig, "project" | "unproject" | "coordinatePrecision"> & {
|
||||
updateType: UpdateTypes;
|
||||
};
|
||||
export type Validation = (feature: GeoJSONStoreFeatures, context: ValidationContext) => {
|
||||
valid: boolean;
|
||||
reason?: string;
|
||||
};
|
||||
export type Snappable = {
|
||||
coordinate: Position | undefined;
|
||||
featureId: FeatureId | undefined;
|
||||
featureCoordinateIndex: number | undefined;
|
||||
minDistance: number;
|
||||
};
|
||||
export type SnappableContext = {
|
||||
currentId?: FeatureId;
|
||||
currentCoordinate?: number;
|
||||
getCurrentGeometrySnapshot: () => (Polygon | LineString) | null;
|
||||
project: Project;
|
||||
unproject: Unproject;
|
||||
};
|
||||
export type SnapToCustom = (event: TerraDrawMouseEvent, context: SnappableContext) => Position | undefined;
|
||||
type SnapToFeature = {
|
||||
filter: (feature: Feature) => boolean;
|
||||
toLine?: boolean;
|
||||
toCoordinate?: boolean;
|
||||
};
|
||||
export type SnapToDegree = {
|
||||
/** The angle interval to snap to, in degrees. Defaults to 90. */
|
||||
degree?: number;
|
||||
/** Allow a new segment to snap back over the previous segment. */
|
||||
backTracking?: boolean;
|
||||
};
|
||||
export interface OneDimensionalSnapping {
|
||||
toCoordinate?: boolean;
|
||||
toFeature?: SnapToFeature;
|
||||
toCustom?: SnapToCustom;
|
||||
showSnappingPoint?: boolean;
|
||||
}
|
||||
export interface Snapping extends OneDimensionalSnapping {
|
||||
toLine?: boolean;
|
||||
toDegree?: SnapToDegree;
|
||||
}
|
||||
export type TerraDrawModeState = "unregistered" | "registered" | "started" | "drawing" | "selecting" | "stopped";
|
||||
export interface TerraDrawCallbacks {
|
||||
getState: () => TerraDrawModeState;
|
||||
onKeyUp: (event: TerraDrawKeyboardEvent) => void;
|
||||
onKeyDown: (event: TerraDrawKeyboardEvent) => void;
|
||||
onClick: (event: TerraDrawMouseEvent) => void;
|
||||
onMouseMove: (event: TerraDrawMouseEvent) => void;
|
||||
onDragStart: (event: TerraDrawMouseEvent, setMapDraggability: (enabled: boolean) => void) => void;
|
||||
onDrag: (event: TerraDrawMouseEvent, setMapDraggability: (enabled: boolean) => void) => void;
|
||||
onDragEnd: (event: TerraDrawMouseEvent, setMapDraggability: (enabled: boolean) => void) => void;
|
||||
onClear: () => void;
|
||||
onReady?(): void;
|
||||
}
|
||||
export interface TerraDrawChanges {
|
||||
created: GeoJSONStoreFeatures[];
|
||||
updated: GeoJSONStoreFeatures[];
|
||||
unchanged: GeoJSONStoreFeatures[];
|
||||
deletedIds: FeatureId[];
|
||||
}
|
||||
export type TerraDrawStylingFunction = {
|
||||
[mode: string]: (feature: GeoJSONStoreFeatures) => TerraDrawAdapterStyling;
|
||||
};
|
||||
export type TerraDrawHandledEvents = Extract<keyof HTMLElementEventMap, "pointerdown" | "pointerup" | "pointermove" | "contextmenu" | "keyup" | "keydown">;
|
||||
export interface TerraDrawAdapter {
|
||||
project: Project;
|
||||
unproject: Unproject;
|
||||
setCursor: SetCursor;
|
||||
getLngLatFromEvent: GetLngLatFromEvent;
|
||||
setDoubleClickToZoom: (enabled: boolean) => void;
|
||||
getMapEventElement: (eventType?: TerraDrawHandledEvents) => HTMLElement;
|
||||
register(callbacks: TerraDrawCallbacks): void;
|
||||
unregister(): void;
|
||||
render(changes: TerraDrawChanges, styling: TerraDrawStylingFunction): void;
|
||||
clear(): void;
|
||||
getCoordinatePrecision(): number;
|
||||
}
|
||||
export declare const MARKER_URL_DEFAULT = "https://raw.githubusercontent.com/JamesLMilner/terra-draw/refs/heads/main/assets/markers/marker-blue.png";
|
||||
export declare const SELECT_PROPERTIES: {
|
||||
readonly SELECTED: "selected";
|
||||
readonly MID_POINT: "midPoint";
|
||||
readonly SELECTION_POINT_FEATURE_ID: "selectionPointFeatureId";
|
||||
readonly SELECTION_POINT: "selectionPoint";
|
||||
};
|
||||
export declare const COMMON_PROPERTIES: {
|
||||
readonly MODE: "mode";
|
||||
readonly CURRENTLY_DRAWING: "currentlyDrawing";
|
||||
readonly EDITED: "edited";
|
||||
readonly CLOSING_POINT: "closingPoint";
|
||||
readonly SNAPPING_POINT: "snappingPoint";
|
||||
readonly COORDINATE_POINT: "coordinatePoint";
|
||||
readonly COORDINATE_POINT_FEATURE_ID: "coordinatePointFeatureId";
|
||||
readonly COORDINATE_POINT_IDS: "coordinatePointIds";
|
||||
readonly PROVISIONAL_COORDINATE_COUNT: "provisionalCoordinateCount";
|
||||
readonly COMMITTED_COORDINATE_COUNT: "committedCoordinateCount";
|
||||
readonly MARKER: "marker";
|
||||
};
|
||||
export declare const GUIDANCE_POINT_PROPERTY_KEYS: readonly ["edited", "selectionPoint", "midPoint", "closingPoint", "snappingPoint", "coordinatePoint"];
|
||||
export type GuidancePointProperties = (typeof GUIDANCE_POINT_PROPERTY_KEYS)[number];
|
||||
/**
|
||||
* Lower z-index represents layers that are lower in the stack
|
||||
* and higher z-index represents layers that are higher in the stack
|
||||
* i.e. a layer with z-index 10 will be rendered below a layer with z-index 20
|
||||
*/
|
||||
export declare const Z_INDEX: {
|
||||
readonly LAYER_ONE: 10;
|
||||
readonly LAYER_TWO: 20;
|
||||
readonly LAYER_THREE: 30;
|
||||
readonly LAYER_FOUR: 40;
|
||||
readonly LAYER_FIVE: 50;
|
||||
};
|
||||
export {};
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
export declare class AdapterListener<Callback extends (...args: any[]) => any> {
|
||||
name: string;
|
||||
callback: (...args: any[]) => any;
|
||||
registered: boolean;
|
||||
register: any;
|
||||
unregister: any;
|
||||
/**
|
||||
* Creates a new AdapterListener instance with the provided configuration.
|
||||
*
|
||||
* @param {Object} config - The configuration object for the listener.
|
||||
* @param {string} config.name - The name of the event listener.
|
||||
* @param {Function} config.callback - The callback function to be called when the event is triggered.
|
||||
* @param {Function} config.unregister - The function to unregister the event listeners.
|
||||
* @param {Function} config.register - The function to register the event listeners.
|
||||
*/
|
||||
constructor({ name, callback, unregister, register, }: {
|
||||
name: string;
|
||||
callback: Callback;
|
||||
unregister: (callbacks: Callback) => void;
|
||||
register: (callback: Callback) => void;
|
||||
});
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
import { Project, Unproject, TerraDrawCallbacks, TerraDrawChanges, TerraDrawMouseEvent, SetCursor, TerraDrawStylingFunction, GetLngLatFromEvent, TerraDrawAdapter, TerraDrawHandledEvents } from "../common";
|
||||
import { AdapterListener } from "./adapter-listener";
|
||||
type BasePointerListener = (event: PointerEvent) => void;
|
||||
type BaseKeyboardListener = (event: KeyboardEvent) => void;
|
||||
type BaseMouseListener = (event: MouseEvent) => void;
|
||||
export type BaseAdapterConfig = {
|
||||
ignoreMismatchedPointerEvents?: boolean;
|
||||
coordinatePrecision?: number;
|
||||
minPixelDragDistanceDrawing?: number;
|
||||
minPixelDragDistance?: number;
|
||||
minPixelDragDistanceSelecting?: number;
|
||||
};
|
||||
export declare abstract class TerraDrawBaseAdapter implements TerraDrawAdapter {
|
||||
constructor(config: BaseAdapterConfig);
|
||||
private _nextKeyUpIsContextMenu;
|
||||
private _lastPointerDownEventTarget;
|
||||
protected _ignoreMismatchedPointerEvents: boolean;
|
||||
protected _minPixelDragDistance: number;
|
||||
protected _minPixelDragDistanceDrawing: number;
|
||||
protected _minPixelDragDistanceSelecting: number;
|
||||
protected _lastDrawEvent: TerraDrawMouseEvent | undefined;
|
||||
protected _coordinatePrecision: number;
|
||||
protected _heldKeys: Set<string>;
|
||||
protected _listeners: AdapterListener<BasePointerListener | BaseKeyboardListener | BaseMouseListener>[];
|
||||
protected _dragState: "not-dragging" | "pre-dragging" | "dragging";
|
||||
protected _currentModeCallbacks: TerraDrawCallbacks | undefined;
|
||||
abstract getMapEventElement(eventType?: TerraDrawHandledEvents): HTMLElement;
|
||||
protected getButton(event: PointerEvent | MouseEvent): "left" | "right" | "neither" | "middle";
|
||||
protected getMapElementXYPosition(event: PointerEvent | MouseEvent): {
|
||||
containerX: number;
|
||||
containerY: number;
|
||||
};
|
||||
protected getDrawEventFromEvent(event: PointerEvent | MouseEvent, isContextMenu?: boolean): TerraDrawMouseEvent | null;
|
||||
/**
|
||||
* Registers the provided callbacks for the current drawing mode and attaches
|
||||
* the necessary event listeners.
|
||||
* @param {TerraDrawCallbacks} callbacks - An object containing callback functions
|
||||
* for handling various drawing events in the current mode.
|
||||
*/
|
||||
register(callbacks: TerraDrawCallbacks): void;
|
||||
/**
|
||||
* Gets the coordinate precision. The coordinate precision is the number of decimal places in geometry
|
||||
* coordinates stored in the store.
|
||||
* @returns {number} The coordinate precision.
|
||||
*/
|
||||
getCoordinatePrecision(): number;
|
||||
protected getAdapterListeners(): AdapterListener<BasePointerListener>[];
|
||||
/**
|
||||
* Unregisters the event listeners for the current drawing mode.
|
||||
* This is typically called when switching between drawing modes or
|
||||
* stopping the drawing process.
|
||||
*/
|
||||
unregister(): void;
|
||||
abstract clear(): void;
|
||||
abstract project(...args: Parameters<Project>): ReturnType<Project>;
|
||||
abstract unproject(...args: Parameters<Unproject>): ReturnType<Unproject>;
|
||||
abstract setCursor(...args: Parameters<SetCursor>): ReturnType<SetCursor>;
|
||||
abstract getLngLatFromEvent(...event: Parameters<GetLngLatFromEvent>): ReturnType<GetLngLatFromEvent>;
|
||||
abstract setDraggability(enabled: boolean): void;
|
||||
abstract setDoubleClickToZoom(enabled: boolean): void;
|
||||
abstract render(changes: TerraDrawChanges, styling: TerraDrawStylingFunction): void;
|
||||
}
|
||||
export {};
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
import type { DrawInteractions } from "../common";
|
||||
type Check<T> = (value: unknown) => value is T;
|
||||
/**
|
||||
* Checks whether a value is a finite, non-negative number.
|
||||
*
|
||||
* @param value - The value to validate.
|
||||
* @returns True when the value is a number >= 0 and finite.
|
||||
*/
|
||||
export declare const isFiniteNonNegativeNumber: Check<number>;
|
||||
/**
|
||||
* Checks whether a value is a boolean.
|
||||
*
|
||||
* @param value - The value to validate.
|
||||
* @returns True when the value is either true or false.
|
||||
*/
|
||||
export declare const isBoolean: Check<boolean>;
|
||||
/**
|
||||
* Checks whether a value is null.
|
||||
*
|
||||
* @param value - The value to validate.
|
||||
* @returns True when the value is null.
|
||||
*/
|
||||
export declare const isNull: Check<null>;
|
||||
/**
|
||||
* Checks whether a value is a non-null object.
|
||||
*
|
||||
* @param value - The value to validate.
|
||||
* @returns True when the value is an object and not null.
|
||||
*/
|
||||
export declare const isNonNullObject: Check<Record<string, unknown>>;
|
||||
/**
|
||||
* Checks whether a value is a function.
|
||||
*
|
||||
* @param value - The value to validate.
|
||||
* @returns True when the value is a callable function.
|
||||
*/
|
||||
export declare const isFunction: Check<Function>;
|
||||
/**
|
||||
* Checks whether a value is a string with at least one character.
|
||||
*
|
||||
* @param value - The value to validate.
|
||||
* @returns True when the value is a non-empty string.
|
||||
*/
|
||||
export declare const isNonEmptyString: Check<string>;
|
||||
/**
|
||||
* Checks whether a value is a supported draw interaction string.
|
||||
*
|
||||
* @param value - The value to validate.
|
||||
* @returns True when the value is one of the DrawInteractions literals.
|
||||
*/
|
||||
export declare const isDrawInteraction: Check<DrawInteractions>;
|
||||
export {};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
export declare const CursorValues: {
|
||||
readonly Crosshair: "crosshair";
|
||||
readonly Pointer: "pointer";
|
||||
readonly Grab: "grab";
|
||||
readonly Grabbing: "grabbing";
|
||||
readonly Move: "move";
|
||||
readonly Unset: "unset";
|
||||
};
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
declare const KeyboardEventKey: {
|
||||
readonly Enter: "Enter";
|
||||
readonly Escape: "Escape";
|
||||
readonly Backspace: "Backspace";
|
||||
readonly Delete: "Delete";
|
||||
};
|
||||
export { KeyboardEventKey };
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import { TerraDrawBaseAdapter, BaseAdapterConfig } from "./common/base.adapter";
|
||||
import { Cursor, HexColorStyling, NumericStyling, SELECT_PROPERTIES, TerraDrawCallbacks } from "./common";
|
||||
import { BaseModeOptions, CustomStyling, TerraDrawBaseDrawMode, TerraDrawBaseSelectMode } from "./modes/base.mode";
|
||||
import { FeatureId, GeoJSONStore } from "./store/store";
|
||||
import { getDefaultStyling } from "./util/styling";
|
||||
export { GeoJSONStore, TerraDrawBaseDrawMode, TerraDrawBaseSelectMode, TerraDrawBaseAdapter, getDefaultStyling, SELECT_PROPERTIES, type FeatureId, type Cursor, type BaseModeOptions, type CustomStyling, type NumericStyling, type HexColorStyling, type TerraDrawCallbacks, type BaseAdapterConfig, };
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
/** Preserve large arcs, reversing only when the sweep crosses back through zero. */
|
||||
export declare function getUpdatedArcDirection(direction: "clockwise" | "anticlockwise", startBearing: number, previousEndBearing: number, endBearing: number): "clockwise" | "anticlockwise";
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import { Position } from "geojson";
|
||||
export declare function validLatitude(lat: number): boolean;
|
||||
export declare function validLongitude(lng: number): boolean;
|
||||
export declare function coordinatePrecisionIsValid(coordinate: Position, coordinatePrecision: number): boolean;
|
||||
export declare function coordinateIsValid(coordinate: unknown[]): boolean;
|
||||
export declare function getDecimalPlaces(value: number): number;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { Position } from "geojson";
|
||||
export declare function pointInPolygon(point: Position, rings: Position[][]): boolean;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
import { Polygon } from "geojson";
|
||||
/**
|
||||
* Checks if a GeoJSON Polygon follows the right-hand rule.
|
||||
* @param polygon - The GeoJSON Polygon to check.
|
||||
* @returns {boolean} - True if the polygon follows the right-hand rule (counterclockwise outer ring), otherwise false.
|
||||
*/
|
||||
export declare function followsRightHandRule(polygon: Polygon): boolean;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { Feature, LineString, Polygon } from "geojson";
|
||||
export declare function selfIntersects(feature: Feature<Polygon> | Feature<LineString>): boolean;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { CartesianPoint } from "../common";
|
||||
/**
|
||||
* Calculate the relative angle between two lines
|
||||
* @param A The first point of the first line
|
||||
* @param B The second point of the first line and the first point of the second line
|
||||
* @param C The second point of the second line
|
||||
* @returns The relative angle between the two lines
|
||||
*/
|
||||
export declare function calculateRelativeAngle(A: CartesianPoint, B: CartesianPoint, C: CartesianPoint): number;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { Feature, LineString, Polygon, Position } from "geojson";
|
||||
export declare function centroid(geojson: Feature<Polygon | LineString>): Position;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { CartesianPoint } from "../common";
|
||||
export declare function isClockwiseWebMercator(center: CartesianPoint, secondCoord: CartesianPoint, thirdCoord: CartesianPoint): boolean;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { Position } from "geojson";
|
||||
export declare function coordinatesIdentical(coordinate: Position, coordinateTwo: Position): boolean;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { CartesianPoint } from "../common";
|
||||
export declare function determineHalfPlane(point: CartesianPoint, lineStart: CartesianPoint, lineEnd: CartesianPoint): string;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { Polygon } from "geojson";
|
||||
export declare function ensureRightHandRule(polygon: Polygon): undefined | Polygon;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
import { Position } from "geojson";
|
||||
export declare function isPolygonArray(coords: Position[] | Position[][]): coords is Position[][];
|
||||
export declare const getUnclosedCoordinates: (featureCoordinates: Position[] | Position[][]) => Position[];
|
||||
export declare const getClosedCoordinates: (featureCoordinates: Position[] | Position[][]) => Position[];
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { Position } from "geojson";
|
||||
import { Project, Projection, Unproject } from "../common";
|
||||
export declare function getMidPointCoordinates({ featureCoords, precision, unproject, project, projection, }: {
|
||||
featureCoords: Position[];
|
||||
precision: number;
|
||||
project: Project;
|
||||
unproject: Unproject;
|
||||
projection: Projection;
|
||||
}): Position[];
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
export declare const earthRadius = 6371008.8;
|
||||
export declare function degreesToRadians(degrees: number): number;
|
||||
export declare function lengthToRadians(distance: number): number;
|
||||
export declare function radiansToDegrees(radians: number): number;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export declare function limitPrecision(num: number, decimalLimit?: number): number;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { Polygon } from "geojson";
|
||||
export declare function polygonAreaSquareMeters(polygon: Polygon): number;
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
import { Position } from "geojson";
|
||||
import { CartesianPoint } from "../../common";
|
||||
export declare function bearing(start: Position, end: Position): number;
|
||||
export declare function webMercatorBearing({ x: x1, y: y1 }: CartesianPoint, { x: x2, y: y2 }: CartesianPoint): number;
|
||||
export declare function normalizeBearing(bearing: number): number;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
import { Position } from "geojson";
|
||||
import { CartesianPoint } from "../../common";
|
||||
export declare function destination(origin: Position, distance: number, bearing: number): Position;
|
||||
export declare function webMercatorDestination({ x, y }: CartesianPoint, distance: number, bearing: number): CartesianPoint;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { Position } from "geojson";
|
||||
export declare function haversineDistanceKilometers(pointOne: Position, pointTwo: Position): number;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { CartesianPoint } from "../../common";
|
||||
export declare const pixelDistanceToLine: (point: CartesianPoint, linePointOne: CartesianPoint, linePointTwo: CartesianPoint) => number;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { CartesianPoint } from "../../common";
|
||||
export declare const cartesianDistance: (pointOne: CartesianPoint, pointTwo: CartesianPoint) => number;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { Position } from "geojson";
|
||||
export declare function rhumbBearing(start: Position, end: Position): number;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { Position } from "geojson";
|
||||
export declare function rhumbDestination(origin: Position, distanceMeters: number, bearing: number): Position;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { Position } from "geojson";
|
||||
export declare function rhumbDistance(destination: Position, origin: Position): number;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { LineString, Position } from "geojson";
|
||||
export declare function lineSliceAlong(coords: LineString["coordinates"], startDist: number, stopDist: number): Position[];
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
import { Position } from "geojson";
|
||||
import { Project, Unproject } from "../common";
|
||||
export declare function midpointCoordinate(coordinates1: Position, coordinates2: Position, precision: number, project: Project, unproject: Unproject): number[];
|
||||
export declare function geodesicMidpointCoordinate(coordinates1: Position, coordinates2: Position, precision: number): number[];
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import { Position } from "geojson";
|
||||
export declare function nearestPointOnLine(inputCoordinate: Position, lines: [Position, Position][]): {
|
||||
coordinate: Position;
|
||||
distance: number;
|
||||
lineIndex: number;
|
||||
} | undefined;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import { CartesianPoint } from "../../common";
|
||||
/**
|
||||
* Convert longitude and latitude to web mercator x and y
|
||||
* @param lng
|
||||
* @param lat
|
||||
* @returns - web mercator x and y
|
||||
*/
|
||||
export declare const lngLatToWebMercatorXY: (lng: number, lat: number) => CartesianPoint;
|
||||
/**
|
||||
* Convert web mercator x and y to longitude and latitude
|
||||
* @param x - web mercator x
|
||||
* @param y - web mercator y
|
||||
* @returns - longitude and latitude
|
||||
*/
|
||||
export declare const webMercatorXYToLngLat: (x: number, y: number) => {
|
||||
lng: number;
|
||||
lat: number;
|
||||
};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import { Feature, Polygon } from "geojson";
|
||||
import { Unproject } from "../../common";
|
||||
export declare function createBBoxFromPoint({ unproject, point, pointerDistance, }: {
|
||||
point: {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
unproject: Unproject;
|
||||
pointerDistance: number;
|
||||
}): Feature<Polygon>;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
import { Feature, Polygon, Position } from "geojson";
|
||||
export declare function circle(options: {
|
||||
center: Position;
|
||||
radiusKilometers: number;
|
||||
coordinatePrecision: number;
|
||||
steps?: number;
|
||||
}): Feature<Polygon>;
|
||||
export declare function circleWebMercator(options: {
|
||||
center: Position;
|
||||
radiusKilometers: number;
|
||||
coordinatePrecision: number;
|
||||
steps?: number;
|
||||
}): GeoJSON.Feature<GeoJSON.Polygon>;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
import { Feature, Polygon, Position } from "geojson";
|
||||
export declare function ellipse(options: {
|
||||
center: Position;
|
||||
xRadiusKilometers: number;
|
||||
yRadiusKilometers: number;
|
||||
coordinatePrecision: number;
|
||||
steps?: number;
|
||||
}): Feature<Polygon>;
|
||||
export declare function ellipseWebMercator(options: {
|
||||
center: Position;
|
||||
xRadiusKilometers: number;
|
||||
yRadiusKilometers: number;
|
||||
coordinatePrecision: number;
|
||||
steps?: number;
|
||||
}): Feature<Polygon>;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { Position } from "geojson";
|
||||
export declare function generateGreatCircleCoordinates(start: Position, end: Position, numberOfPoints: number): Position[];
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import { Position } from "geojson";
|
||||
export declare function calculateWebMercatorDistortion(source: Position, target: Position): number;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { Feature, LineString, Polygon } from "geojson";
|
||||
export declare function transformRotate(feature: Feature<Polygon | LineString>, angle: number): Feature<Polygon | LineString, import("geojson").GeoJsonProperties>;
|
||||
/**
|
||||
* Rotate a GeoJSON Polygon geometry in web mercator
|
||||
* @param polygon - GeoJSON Polygon geometry
|
||||
* @param angle - rotation angle in degrees
|
||||
* @returns - rotated GeoJSON Polygon geometry
|
||||
*/
|
||||
export declare const transformRotateWebMercator: (feature: Feature<Polygon> | Feature<LineString>, angle: number) => Feature<Polygon, import("geojson").GeoJsonProperties> | Feature<LineString, import("geojson").GeoJsonProperties>;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
import { Position } from "geojson";
|
||||
export declare function transformScaleWebMercatorCoordinates({ coordinates, originX, originY, xScale, yScale, }: {
|
||||
coordinates: Position[];
|
||||
originX: number;
|
||||
originY: number;
|
||||
xScale: number;
|
||||
yScale: number;
|
||||
}): void;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
import { Feature, LineString, Polygon } from "geojson";
|
||||
import { CartesianPoint } from "../common";
|
||||
/**
|
||||
* Calculates the centroid of a GeoJSON Polygon or LineString in Web Mercator
|
||||
|
||||
* @param {Feature<Polygon | LineString>} feature - The GeoJSON Feature containing either a Polygon or LineString
|
||||
* @returns {{ x: number, y: number }} The centroid of the polygon or line string in Web Mercator coordinates.
|
||||
*/
|
||||
export declare function webMercatorCentroid(feature: Feature<Polygon | LineString>): CartesianPoint;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
import { Position } from "geojson";
|
||||
/**
|
||||
* Takes two points and finds the closest point on the line between them to a third point.
|
||||
* @param lines
|
||||
* @param inputCoordinate
|
||||
* @returns
|
||||
*/
|
||||
export declare function webMercatorNearestPointOnLine(inputCoordinate: Position, lines: [Position, Position][]): {
|
||||
coordinate: Position;
|
||||
lineIndex: number;
|
||||
distance: number;
|
||||
} | undefined;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
import { TerraDrawMouseEvent, TerraDrawAdapterStyling, TerraDrawKeyboardEvent, HexColorStyling, NumericStyling, Cursor } from "../../common";
|
||||
import { TerraDrawBaseDrawMode, BaseModeOptions, CustomStyling, ModeUpdateOptions } from "../base.mode";
|
||||
import { GeoJSONStoreFeatures, StoreValidation } from "../../store/store";
|
||||
import { BehaviorConfig } from "../base.behavior";
|
||||
type TerraDrawPolygonModeKeyEvents = {
|
||||
cancel?: KeyboardEvent["key"] | null;
|
||||
finish?: KeyboardEvent["key"] | null;
|
||||
};
|
||||
type PolygonStyling = {
|
||||
fillColor: HexColorStyling;
|
||||
fillOpacity: NumericStyling;
|
||||
outlineColor: HexColorStyling;
|
||||
outlineOpacity: NumericStyling;
|
||||
outlineWidth: NumericStyling;
|
||||
coordinatePointWidth: NumericStyling;
|
||||
coordinatePointColor: HexColorStyling;
|
||||
coordinatePointOpacity: NumericStyling;
|
||||
coordinatePointOutlineWidth: NumericStyling;
|
||||
coordinatePointOutlineColor: HexColorStyling;
|
||||
coordinatePointOutlineOpacity: NumericStyling;
|
||||
};
|
||||
interface Cursors {
|
||||
start?: Cursor;
|
||||
close?: Cursor;
|
||||
}
|
||||
interface TerraDrawAngledRectangleModeOptions<T extends CustomStyling> extends BaseModeOptions<T> {
|
||||
pointerDistance?: number;
|
||||
keyEvents?: TerraDrawPolygonModeKeyEvents | null;
|
||||
cursors?: Cursors;
|
||||
showCoordinatePoints?: boolean;
|
||||
}
|
||||
export declare class TerraDrawAngledRectangleMode extends TerraDrawBaseDrawMode<PolygonStyling> {
|
||||
mode: string;
|
||||
private currentCoordinate;
|
||||
private currentId;
|
||||
private keyEvents;
|
||||
private cursors;
|
||||
private mouseMove;
|
||||
private showCoordinatePoints;
|
||||
private mutateFeature;
|
||||
private readFeature;
|
||||
private coordinatePoints;
|
||||
constructor(options?: TerraDrawAngledRectangleModeOptions<PolygonStyling>);
|
||||
updateOptions(options?: ModeUpdateOptions<TerraDrawAngledRectangleModeOptions<PolygonStyling>>): void;
|
||||
private close;
|
||||
/** @internal */
|
||||
start(): void;
|
||||
/** @internal */
|
||||
stop(): void;
|
||||
/** @internal */
|
||||
onMouseMove(event: TerraDrawMouseEvent): void;
|
||||
private getUpdateForSecondCoordinate;
|
||||
private getNewSecondAndThirdCoordinates;
|
||||
/** @internal */
|
||||
onClick(event: TerraDrawMouseEvent): void;
|
||||
/** @internal */
|
||||
onKeyUp(event: TerraDrawKeyboardEvent): void;
|
||||
/** @internal */
|
||||
onKeyDown(): void;
|
||||
/** @internal */
|
||||
onDragStart(): void;
|
||||
/** @internal */
|
||||
onDrag(): void;
|
||||
/** @internal */
|
||||
onDragEnd(): void;
|
||||
/** @internal */
|
||||
cleanUp(): void;
|
||||
/** @internal */
|
||||
styleFeature(feature: GeoJSONStoreFeatures): TerraDrawAdapterStyling;
|
||||
validateFeature(feature: unknown): StoreValidation;
|
||||
afterFeatureUpdated(feature: GeoJSONStoreFeatures): void;
|
||||
afterFeatureAdded(feature: GeoJSONStoreFeatures): void;
|
||||
registerBehaviors(config: BehaviorConfig): void;
|
||||
}
|
||||
export {};
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
import { Project, Projection, TerraDrawGeoJSONStore, Unproject } from "../common";
|
||||
export type BehaviorConfig = {
|
||||
store: TerraDrawGeoJSONStore;
|
||||
mode: string;
|
||||
project: Project;
|
||||
unproject: Unproject;
|
||||
pointerDistance: number;
|
||||
coordinatePrecision: number;
|
||||
projection: Projection;
|
||||
undoRedoMaxStackSize?: number;
|
||||
};
|
||||
export declare class TerraDrawModeBehavior {
|
||||
protected store: TerraDrawGeoJSONStore;
|
||||
protected mode: string;
|
||||
protected project: Project;
|
||||
protected unproject: Unproject;
|
||||
protected pointerDistance: number;
|
||||
protected coordinatePrecision: number;
|
||||
protected projection: Projection;
|
||||
protected undoRedoMaxStackSize?: number;
|
||||
constructor({ store, mode, project, unproject, pointerDistance, coordinatePrecision, projection, undoRedoMaxStackSize, }: BehaviorConfig);
|
||||
}
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
import { BehaviorConfig, TerraDrawModeBehavior } from "./base.behavior";
|
||||
import { TerraDrawOnChangeContext, HexColor, OnFinishContext, Projection, TerraDrawAdapterStyling, TerraDrawGeoJSONStore, TerraDrawKeyboardEvent, TerraDrawModeRegisterConfig, TerraDrawModeState, TerraDrawMouseEvent, Validation, HexColorStyling, NumericStyling, UrlStyling, DashArrayStyling, MarkerAnchorStyling } from "../common";
|
||||
import { FeatureId, GeoJSONStoreFeatures, StoreChangeHandler } from "../store/store";
|
||||
export type CustomStyling = Record<string, string | number | HexColorStyling | NumericStyling | UrlStyling | DashArrayStyling | MarkerAnchorStyling>;
|
||||
export declare enum ModeTypes {
|
||||
Drawing = "drawing",
|
||||
Select = "select",
|
||||
Static = "static",
|
||||
Render = "render"
|
||||
}
|
||||
export declare const DefaultPointerEvents: {
|
||||
readonly rightClick: true;
|
||||
readonly contextMenu: false;
|
||||
readonly leftClick: true;
|
||||
readonly onDragStart: true;
|
||||
readonly onDrag: true;
|
||||
readonly onDragEnd: true;
|
||||
};
|
||||
type AllowPointerEvent = boolean | ((event: TerraDrawMouseEvent) => boolean);
|
||||
export type ModeUpdateOptions<Mode> = Omit<Mode, "modeName">;
|
||||
export interface PointerEvents {
|
||||
leftClick: AllowPointerEvent;
|
||||
rightClick: AllowPointerEvent;
|
||||
contextMenu: AllowPointerEvent;
|
||||
onDragStart: AllowPointerEvent;
|
||||
onDrag: AllowPointerEvent;
|
||||
onDragEnd: AllowPointerEvent;
|
||||
}
|
||||
export type BaseModeOptions<Styling extends CustomStyling> = {
|
||||
modeName?: string;
|
||||
styles?: Partial<Styling>;
|
||||
pointerDistance?: number;
|
||||
validation?: Validation;
|
||||
projection?: Projection;
|
||||
pointerEvents?: PointerEvents;
|
||||
};
|
||||
export declare abstract class TerraDrawBaseDrawMode<Styling extends CustomStyling> {
|
||||
protected _state: TerraDrawModeState;
|
||||
get state(): TerraDrawModeState;
|
||||
set state(_: TerraDrawModeState);
|
||||
protected _styles: Partial<Styling>;
|
||||
get styles(): Partial<Styling>;
|
||||
set styles(styling: Partial<Styling>);
|
||||
protected pointerEvents: PointerEvents;
|
||||
protected behaviors: TerraDrawModeBehavior[];
|
||||
protected validate: Validation | undefined;
|
||||
protected pointerDistance: number;
|
||||
protected coordinatePrecision: number;
|
||||
protected undoRedoMaxStackSize?: number;
|
||||
protected onStyleChange: StoreChangeHandler<TerraDrawOnChangeContext | undefined>;
|
||||
protected store: TerraDrawGeoJSONStore;
|
||||
protected projection: Projection;
|
||||
protected setDoubleClickToZoom: TerraDrawModeRegisterConfig["setDoubleClickToZoom"];
|
||||
protected unproject: TerraDrawModeRegisterConfig["unproject"];
|
||||
protected project: TerraDrawModeRegisterConfig["project"];
|
||||
protected setCursor: TerraDrawModeRegisterConfig["setCursor"];
|
||||
protected registerBehaviors(_behaviorConfig: BehaviorConfig): void;
|
||||
private isInitialUpdate;
|
||||
constructor(options?: BaseModeOptions<Styling>, willCallUpdateOptionsInParentClass?: boolean);
|
||||
updateOptions(options?: BaseModeOptions<Styling>): void;
|
||||
protected allowPointerEvent(pointerEvent: AllowPointerEvent, event: TerraDrawMouseEvent): boolean;
|
||||
type: ModeTypes;
|
||||
mode: string;
|
||||
protected setDrawing(): void;
|
||||
protected setStarted(): void;
|
||||
protected setStopped(): void;
|
||||
register(config: TerraDrawModeRegisterConfig): void;
|
||||
validateFeature(feature: unknown): ReturnType<Validation>;
|
||||
afterFeatureAdded(_feature: GeoJSONStoreFeatures): void;
|
||||
afterFeatureUpdated(_feature: GeoJSONStoreFeatures): void;
|
||||
private performFeatureValidation;
|
||||
protected validateModeFeature(feature: unknown, modeValidationFn: (feature: GeoJSONStoreFeatures) => ReturnType<Validation>): ReturnType<Validation>;
|
||||
abstract start(): void;
|
||||
abstract stop(): void;
|
||||
abstract cleanUp(): void;
|
||||
abstract styleFeature(feature: GeoJSONStoreFeatures): TerraDrawAdapterStyling;
|
||||
onFinish(_finishedId: FeatureId, _context: OnFinishContext): void;
|
||||
onDeselect(_deselectedId: FeatureId): void;
|
||||
onSelect(_selectedId: FeatureId): void;
|
||||
onKeyDown(_event: TerraDrawKeyboardEvent): void;
|
||||
onKeyUp(_event: TerraDrawKeyboardEvent): void;
|
||||
undo(): void;
|
||||
clearHistory(): void;
|
||||
undoSize(): number;
|
||||
redoSize(): number;
|
||||
redo(): void;
|
||||
onMouseMove(_event: TerraDrawMouseEvent): void;
|
||||
onClick(_event: TerraDrawMouseEvent): void;
|
||||
onDragStart(_event: TerraDrawMouseEvent, _setMapDraggability: (enabled: boolean) => void): void;
|
||||
onDrag(_event: TerraDrawMouseEvent, _setMapDraggability: (enabled: boolean) => void): void;
|
||||
onDragEnd(_event: TerraDrawMouseEvent, _setMapDraggability: (enabled: boolean) => void): void;
|
||||
protected getHexColorStylingValue(value: HexColor | ((feature: GeoJSONStoreFeatures) => HexColor | undefined) | undefined, defaultValue: HexColor, feature: GeoJSONStoreFeatures): HexColor;
|
||||
protected getNumericStylingValue(value: number | ((feature: GeoJSONStoreFeatures) => number | undefined) | undefined, defaultValue: number, feature: GeoJSONStoreFeatures): number;
|
||||
protected getUrlStylingValue(value: UrlStyling | undefined, defaultValue: string, feature: GeoJSONStoreFeatures): string;
|
||||
protected getMarkerAnchorStylingValue(value: MarkerAnchorStyling | undefined, defaultValue: NonNullable<TerraDrawAdapterStyling["markerAnchor"]>, feature: GeoJSONStoreFeatures): NonNullable<TerraDrawAdapterStyling["markerAnchor"]>;
|
||||
protected getDashArrayStylingValue(value: [number, number] | ((feature: GeoJSONStoreFeatures) => [number, number] | undefined) | undefined, defaultValue: [number, number] | undefined, feature: GeoJSONStoreFeatures): [number, number] | undefined;
|
||||
private getStylingValue;
|
||||
}
|
||||
export declare abstract class TerraDrawBaseSelectMode<Styling extends CustomStyling> extends TerraDrawBaseDrawMode<Styling> {
|
||||
type: ModeTypes;
|
||||
abstract selectFeature(featureId: FeatureId): void;
|
||||
abstract deselectFeature(featureId: FeatureId): void;
|
||||
}
|
||||
export {};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
import { TerraDrawMouseEvent, TerraDrawAdapterStyling, TerraDrawKeyboardEvent, HexColorStyling, NumericStyling, Cursor, Projection, DrawInteractions, OneDimensionalSnapping } from "../../common";
|
||||
import { GeoJSONStoreFeatures, StoreValidation } from "../../store/store";
|
||||
import { BaseModeOptions, CustomStyling, ModeUpdateOptions, TerraDrawBaseDrawMode } from "../base.mode";
|
||||
import { BehaviorConfig } from "../base.behavior";
|
||||
type TerraDrawCircleModeKeyEvents = {
|
||||
cancel: KeyboardEvent["key"] | null;
|
||||
finish: KeyboardEvent["key"] | null;
|
||||
};
|
||||
type CirclePolygonStyling = {
|
||||
fillColor: HexColorStyling;
|
||||
fillOpacity: NumericStyling;
|
||||
outlineColor: HexColorStyling;
|
||||
outlineWidth: NumericStyling;
|
||||
outlineOpacity: NumericStyling;
|
||||
coordinatePointWidth: NumericStyling;
|
||||
coordinatePointColor: HexColorStyling;
|
||||
coordinatePointOpacity: NumericStyling;
|
||||
coordinatePointOutlineWidth: NumericStyling;
|
||||
coordinatePointOutlineColor: HexColorStyling;
|
||||
coordinatePointOutlineOpacity: NumericStyling;
|
||||
snappingPointColor: HexColorStyling;
|
||||
snappingPointWidth: NumericStyling;
|
||||
snappingPointOpacity: NumericStyling;
|
||||
snappingPointOutlineColor: HexColorStyling;
|
||||
snappingPointOutlineWidth: NumericStyling;
|
||||
snappingPointOutlineOpacity: NumericStyling;
|
||||
};
|
||||
interface Cursors {
|
||||
start?: Cursor;
|
||||
}
|
||||
interface TerraDrawCircleModeOptions<T extends CustomStyling> extends BaseModeOptions<T> {
|
||||
keyEvents?: TerraDrawCircleModeKeyEvents | null;
|
||||
cursors?: Cursors;
|
||||
startingRadiusKilometers?: number;
|
||||
projection?: Projection;
|
||||
drawInteraction?: DrawInteractions;
|
||||
segments?: number;
|
||||
showCoordinatePoints?: boolean;
|
||||
snapping?: OneDimensionalSnapping;
|
||||
}
|
||||
export declare class TerraDrawCircleMode extends TerraDrawBaseDrawMode<CirclePolygonStyling> {
|
||||
mode: string;
|
||||
private center;
|
||||
private endPosition;
|
||||
private segments;
|
||||
private currentCircleId;
|
||||
private keyEvents;
|
||||
private cursors;
|
||||
private startingRadiusKilometers;
|
||||
private cursorMovedAfterInitialCursorDown;
|
||||
private drawInteraction;
|
||||
private drawType;
|
||||
private cancelled;
|
||||
private minimumSegments;
|
||||
private showCoordinatePoints;
|
||||
private snapping;
|
||||
private snappedPointId;
|
||||
private readFeature;
|
||||
private coordinatePoints;
|
||||
private mutateFeature;
|
||||
private pixelDistance;
|
||||
private clickBoundingBox;
|
||||
private coordinateSnapping;
|
||||
private lineSnapping;
|
||||
private featureSnapping;
|
||||
/**
|
||||
* Create a new circle mode instance
|
||||
* @param options - Options to customize the behavior of the circle mode
|
||||
* @param options.keyEvents - Key events to cancel or finish the mode
|
||||
* @param options.cursors - Cursors to use for the mode
|
||||
* @param options.styles - Custom styling for the circle
|
||||
* @param options.pointerDistance - Distance in pixels to consider a pointer close to a vertex
|
||||
* @param options.startingRadiusKilometers - The starting radius of the circle in kilometers
|
||||
* @param options.projection - The map projection being used
|
||||
* @param options.showCoordinatePoints - Render a point at each circle vertex
|
||||
* @param options.drawInteraction - The type of draw interaction to use
|
||||
* @param options.snapping - Snapping options applied to the circle center coordinate
|
||||
*
|
||||
*/
|
||||
constructor(options?: TerraDrawCircleModeOptions<CirclePolygonStyling>);
|
||||
updateOptions(options?: ModeUpdateOptions<TerraDrawCircleModeOptions<CirclePolygonStyling>>): void;
|
||||
private close;
|
||||
private beginDrawing;
|
||||
private dragDrawAllowed;
|
||||
private moveDrawAllowed;
|
||||
/** @internal */
|
||||
start(): void;
|
||||
/** @internal */
|
||||
stop(): void;
|
||||
/** @internal */
|
||||
onClick(event: TerraDrawMouseEvent): void;
|
||||
/** @internal */
|
||||
onMouseMove(event: TerraDrawMouseEvent): void;
|
||||
private updateSnappedCoordinate;
|
||||
private deleteSnappedPoint;
|
||||
private getSnappedCoordinate;
|
||||
/** @internal */
|
||||
onKeyDown(): void;
|
||||
/** @internal */
|
||||
onKeyUp(event: TerraDrawKeyboardEvent): void;
|
||||
/** @internal */
|
||||
onDragStart(event: TerraDrawMouseEvent, setMapDraggability: (enabled: boolean) => void): void;
|
||||
/** @internal */
|
||||
onDrag(event: TerraDrawMouseEvent, _setMapDraggability: (enabled: boolean) => void): void;
|
||||
/** @internal */
|
||||
onDragEnd(event: TerraDrawMouseEvent, setMapDraggability: (enabled: boolean) => void): void;
|
||||
/** @internal */
|
||||
cleanUp(): void;
|
||||
/** @internal */
|
||||
styleFeature(feature: GeoJSONStoreFeatures): TerraDrawAdapterStyling;
|
||||
validateFeature(feature: unknown): StoreValidation;
|
||||
private updateCircle;
|
||||
afterFeatureUpdated(feature: GeoJSONStoreFeatures): void;
|
||||
afterFeatureAdded(feature: GeoJSONStoreFeatures): void;
|
||||
registerBehaviors(config: BehaviorConfig): void;
|
||||
}
|
||||
export {};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
import { BehaviorConfig, TerraDrawModeBehavior } from "./base.behavior";
|
||||
import { TerraDrawMouseEvent } from "../common";
|
||||
export declare class ClickBoundingBoxBehavior extends TerraDrawModeBehavior {
|
||||
constructor(config: BehaviorConfig);
|
||||
create(event: TerraDrawMouseEvent): import("geojson").Feature<import("geojson").Polygon, import("geojson").GeoJsonProperties>;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
import { Position } from "geojson";
|
||||
import { BehaviorConfig, TerraDrawModeBehavior } from "./base.behavior";
|
||||
import { TerraDrawMouseEvent } from "../common";
|
||||
import { PixelDistanceBehavior } from "./pixel-distance.behavior";
|
||||
import { MutateFeatureBehavior } from "./mutate-feature.behavior";
|
||||
import { FeatureId } from "../extend";
|
||||
import { ReadFeatureBehavior } from "./read-feature.behavior";
|
||||
export declare class ClosingPointsBehavior extends TerraDrawModeBehavior {
|
||||
readonly config: BehaviorConfig;
|
||||
private readonly pixelDistance;
|
||||
private readonly mutateFeatureBehavior;
|
||||
private readonly readFeatureBehavior;
|
||||
constructor(config: BehaviorConfig, pixelDistance: PixelDistanceBehavior, mutateFeatureBehavior: MutateFeatureBehavior, readFeatureBehavior: ReadFeatureBehavior);
|
||||
private _startEndPoints;
|
||||
get ids(): FeatureId[];
|
||||
set ids(_: FeatureId[]);
|
||||
create(selectedCoords: Position[] | Position[][]): void;
|
||||
delete(): void;
|
||||
updateOne(index: number, updatedCoordinate: Position): void;
|
||||
update(updatedCoordinates: Position[] | Position[][]): void;
|
||||
isLineStringClosingPoint(event: TerraDrawMouseEvent): {
|
||||
isClosing: boolean;
|
||||
};
|
||||
isPolygonClosingPoints(event: TerraDrawMouseEvent): {
|
||||
isClosing: boolean;
|
||||
isPreviousClosing: boolean;
|
||||
};
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
import { BehaviorConfig, TerraDrawModeBehavior } from "./base.behavior";
|
||||
import { Snappable, TerraDrawMouseEvent } from "../common";
|
||||
import { Feature, Position } from "geojson";
|
||||
import { ClickBoundingBoxBehavior } from "./click-bounding-box.behavior";
|
||||
import { FeatureId } from "../store/store";
|
||||
import { PixelDistanceBehavior } from "./pixel-distance.behavior";
|
||||
export declare class CoordinateSnappingBehavior extends TerraDrawModeBehavior {
|
||||
readonly config: BehaviorConfig;
|
||||
private readonly pixelDistance;
|
||||
private readonly clickBoundingBox;
|
||||
constructor(config: BehaviorConfig, pixelDistance: PixelDistanceBehavior, clickBoundingBox: ClickBoundingBoxBehavior);
|
||||
/** Returns the nearest snappable coordinate - on first click there is no currentId so no need to provide */
|
||||
getSnappableCoordinateFirstClick(event: TerraDrawMouseEvent): Position | undefined;
|
||||
getSnappableCoordinate(event: TerraDrawMouseEvent, currentFeatureId: FeatureId): Position | undefined;
|
||||
getSnappable(event: TerraDrawMouseEvent, filter?: (feature: Feature) => boolean): Snappable;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
import { LineString, Polygon, Position } from "geojson";
|
||||
import { SnapToDegree, TerraDrawMouseEvent } from "../common";
|
||||
import { BehaviorConfig, TerraDrawModeBehavior } from "./base.behavior";
|
||||
export declare class DegreeSnappingBehavior extends TerraDrawModeBehavior {
|
||||
readonly config: BehaviorConfig;
|
||||
constructor(config: BehaviorConfig);
|
||||
private EPSILON;
|
||||
private DEFAULT_DEGREE;
|
||||
getSnappableCoordinate(event: TerraDrawMouseEvent, geometry: LineString | Polygon, currentCoordinate: number, options?: SnapToDegree): Position | undefined;
|
||||
private getDegree;
|
||||
private offsets;
|
||||
private snapOnWebMercator;
|
||||
private snapOnGlobe;
|
||||
private projectedCandidates;
|
||||
private getClosingCandidate;
|
||||
private closingDegrees;
|
||||
private hasAngle;
|
||||
private angle;
|
||||
private toLocalPoint;
|
||||
private fromLocalPoint;
|
||||
private closestPoint;
|
||||
private distance;
|
||||
private pixelDistance;
|
||||
private angleDifference;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+104
@@ -0,0 +1,104 @@
|
||||
import { Cursor, DrawInteractions, HexColorStyling, NumericStyling, OneDimensionalSnapping, Projection, TerraDrawAdapterStyling, TerraDrawKeyboardEvent, TerraDrawMouseEvent } from "../../common";
|
||||
import { GeoJSONStoreFeatures, StoreValidation } from "../../store/store";
|
||||
import { BehaviorConfig } from "../base.behavior";
|
||||
import { BaseModeOptions, CustomStyling, ModeUpdateOptions, TerraDrawBaseDrawMode } from "../base.mode";
|
||||
type TerraDrawEllipseModeKeyEvents = {
|
||||
cancel: KeyboardEvent["key"] | null;
|
||||
finish: KeyboardEvent["key"] | null;
|
||||
};
|
||||
type EllipsePolygonStyling = {
|
||||
fillColor: HexColorStyling;
|
||||
fillOpacity: NumericStyling;
|
||||
outlineColor: HexColorStyling;
|
||||
outlineWidth: NumericStyling;
|
||||
outlineOpacity: NumericStyling;
|
||||
coordinatePointWidth: NumericStyling;
|
||||
coordinatePointColor: HexColorStyling;
|
||||
coordinatePointOpacity: NumericStyling;
|
||||
coordinatePointOutlineWidth: NumericStyling;
|
||||
coordinatePointOutlineColor: HexColorStyling;
|
||||
coordinatePointOutlineOpacity: NumericStyling;
|
||||
snappingPointColor: HexColorStyling;
|
||||
snappingPointWidth: NumericStyling;
|
||||
snappingPointOpacity: NumericStyling;
|
||||
snappingPointOutlineColor: HexColorStyling;
|
||||
snappingPointOutlineWidth: NumericStyling;
|
||||
snappingPointOutlineOpacity: NumericStyling;
|
||||
};
|
||||
interface Cursors {
|
||||
start?: Cursor;
|
||||
}
|
||||
interface TerraDrawEllipseModeOptions<T extends CustomStyling> extends BaseModeOptions<T> {
|
||||
keyEvents?: TerraDrawEllipseModeKeyEvents | null;
|
||||
cursors?: Cursors;
|
||||
startingRadiusKilometers?: number;
|
||||
projection?: Projection;
|
||||
drawInteraction?: DrawInteractions;
|
||||
segments?: number;
|
||||
showCoordinatePoints?: boolean;
|
||||
/** Snapping options applied to the ellipse center coordinate. */
|
||||
snapping?: OneDimensionalSnapping;
|
||||
}
|
||||
export declare class TerraDrawEllipseMode extends TerraDrawBaseDrawMode<EllipsePolygonStyling> {
|
||||
mode: string;
|
||||
private center;
|
||||
private endPosition;
|
||||
private segments;
|
||||
private currentEllipseId;
|
||||
private keyEvents;
|
||||
private cursors;
|
||||
private startingRadiusKilometers;
|
||||
private cursorMovedAfterInitialCursorDown;
|
||||
private drawInteraction;
|
||||
private drawType;
|
||||
private minimumSegments;
|
||||
private showCoordinatePoints;
|
||||
private cancelled;
|
||||
private snapping;
|
||||
private snappedPointId;
|
||||
private readFeature;
|
||||
private coordinatePoints;
|
||||
private mutateFeature;
|
||||
private pixelDistance;
|
||||
private clickBoundingBox;
|
||||
private coordinateSnapping;
|
||||
private lineSnapping;
|
||||
private featureSnapping;
|
||||
constructor(options?: TerraDrawEllipseModeOptions<EllipsePolygonStyling>);
|
||||
updateOptions(options?: ModeUpdateOptions<TerraDrawEllipseModeOptions<EllipsePolygonStyling>>): void;
|
||||
private close;
|
||||
private beginDrawing;
|
||||
private dragDrawAllowed;
|
||||
private moveDrawAllowed;
|
||||
/** @internal */
|
||||
start(): void;
|
||||
/** @internal */
|
||||
stop(): void;
|
||||
/** @internal */
|
||||
onClick(event: TerraDrawMouseEvent): void;
|
||||
/** @internal */
|
||||
onMouseMove(event: TerraDrawMouseEvent): void;
|
||||
private updateSnappedCoordinate;
|
||||
private deleteSnappedPoint;
|
||||
private getSnappedCoordinate;
|
||||
/** @internal */
|
||||
onKeyDown(): void;
|
||||
/** @internal */
|
||||
onKeyUp(event: TerraDrawKeyboardEvent): void;
|
||||
/** @internal */
|
||||
onDragStart(event: TerraDrawMouseEvent, setMapDraggability: (enabled: boolean) => void): void;
|
||||
/** @internal */
|
||||
onDrag(event: TerraDrawMouseEvent, _setMapDraggability: (enabled: boolean) => void): void;
|
||||
/** @internal */
|
||||
onDragEnd(event: TerraDrawMouseEvent, setMapDraggability: (enabled: boolean) => void): void;
|
||||
/** @internal */
|
||||
cleanUp(): void;
|
||||
/** @internal */
|
||||
styleFeature(feature: GeoJSONStoreFeatures): TerraDrawAdapterStyling;
|
||||
validateFeature(feature: unknown): StoreValidation;
|
||||
private updateEllipse;
|
||||
afterFeatureUpdated(feature: GeoJSONStoreFeatures): void;
|
||||
afterFeatureAdded(feature: GeoJSONStoreFeatures): void;
|
||||
registerBehaviors(config: BehaviorConfig): void;
|
||||
}
|
||||
export {};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
import { Snappable, TerraDrawMouseEvent } from "../common";
|
||||
import { Feature } from "geojson";
|
||||
import { FeatureId } from "../store/store";
|
||||
import { CoordinateSnappingBehavior } from "./coordinate-snapping.behavior";
|
||||
import { LineSnappingBehavior } from "./line-snapping.behavior";
|
||||
export declare class FeatureSnappingBehavior {
|
||||
private readonly coordinateSnapping;
|
||||
private readonly lineSnapping;
|
||||
constructor(coordinateSnapping: CoordinateSnappingBehavior, lineSnapping: LineSnappingBehavior);
|
||||
getSnappable(event: TerraDrawMouseEvent, currentFeatureId?: FeatureId, filter?: (feature: Feature) => boolean, options?: {
|
||||
toLine?: boolean;
|
||||
toCoordinate?: boolean;
|
||||
}): Snappable;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
export {};
|
||||
Generated
Vendored
+88
@@ -0,0 +1,88 @@
|
||||
import { TerraDrawMouseEvent, TerraDrawAdapterStyling, TerraDrawKeyboardEvent, HexColorStyling, NumericStyling, Cursor, DashArrayStyling, DrawInteractions } from "../../common";
|
||||
import { BaseModeOptions, CustomStyling, ModeUpdateOptions, TerraDrawBaseDrawMode } from "../base.mode";
|
||||
import { GeoJSONStoreFeatures, StoreValidation } from "../../store/store";
|
||||
import { BehaviorConfig } from "../base.behavior";
|
||||
type TerraDrawFreehandLineStringModeKeyEvents = {
|
||||
cancel: KeyboardEvent["key"] | null;
|
||||
finish: KeyboardEvent["key"] | null;
|
||||
};
|
||||
type FreehandLineStringStyling = {
|
||||
lineStringWidth: NumericStyling;
|
||||
lineStringColor: HexColorStyling;
|
||||
lineStringOpacity: NumericStyling;
|
||||
lineStringDash: DashArrayStyling;
|
||||
coordinatePointWidth: NumericStyling;
|
||||
coordinatePointColor: HexColorStyling;
|
||||
coordinatePointOpacity: NumericStyling;
|
||||
coordinatePointOutlineWidth: NumericStyling;
|
||||
coordinatePointOutlineColor: HexColorStyling;
|
||||
coordinatePointOutlineOpacity: NumericStyling;
|
||||
closingPointColor: HexColorStyling;
|
||||
closingPointOpacity: NumericStyling;
|
||||
closingPointWidth: NumericStyling;
|
||||
closingPointOutlineColor: HexColorStyling;
|
||||
closingPointOutlineWidth: NumericStyling;
|
||||
closingPointOutlineOpacity: NumericStyling;
|
||||
};
|
||||
interface Cursors {
|
||||
start?: Cursor;
|
||||
close?: Cursor;
|
||||
}
|
||||
interface TerraDrawFreehandLineStringModeOptions<T extends CustomStyling> extends BaseModeOptions<T> {
|
||||
minDistance?: number;
|
||||
keyEvents?: TerraDrawFreehandLineStringModeKeyEvents | null;
|
||||
cursors?: Cursors;
|
||||
drawInteraction?: DrawInteractions;
|
||||
showCoordinatePoints?: boolean;
|
||||
}
|
||||
export declare class TerraDrawFreehandLineStringMode extends TerraDrawBaseDrawMode<FreehandLineStringStyling> {
|
||||
mode: string;
|
||||
private canClose;
|
||||
private showCoordinatePoints;
|
||||
private currentId;
|
||||
private minDistance;
|
||||
private keyEvents;
|
||||
private cursors;
|
||||
private preventNewFeature;
|
||||
private drawInteraction;
|
||||
private drawType;
|
||||
private coordinatePoints;
|
||||
private mutateFeature;
|
||||
private readFeature;
|
||||
private pixelDistance;
|
||||
private closingPoints;
|
||||
constructor(options?: TerraDrawFreehandLineStringModeOptions<FreehandLineStringStyling>);
|
||||
updateOptions(options?: ModeUpdateOptions<TerraDrawFreehandLineStringModeOptions<FreehandLineStringStyling>>): void;
|
||||
private moveDrawAllowed;
|
||||
private dragDrawAllowed;
|
||||
private close;
|
||||
/** @internal */
|
||||
start(): void;
|
||||
/** @internal */
|
||||
stop(): void;
|
||||
private addCoordinate;
|
||||
private beginDrawing;
|
||||
/** @internal */
|
||||
onMouseMove(event: TerraDrawMouseEvent): void;
|
||||
/** @internal */
|
||||
onClick(event: TerraDrawMouseEvent): void;
|
||||
/** @internal */
|
||||
onKeyDown(): void;
|
||||
/** @internal */
|
||||
onKeyUp(event: TerraDrawKeyboardEvent): void;
|
||||
/** @internal */
|
||||
onDragStart(event: TerraDrawMouseEvent, setMapDraggability: (enabled: boolean) => void): void;
|
||||
/** @internal */
|
||||
onDrag(event: TerraDrawMouseEvent, _setMapDraggability: (enabled: boolean) => void): void;
|
||||
/** @internal */
|
||||
onDragEnd(event: TerraDrawMouseEvent, setMapDraggability: (enabled: boolean) => void): void;
|
||||
/** @internal */
|
||||
cleanUp(): void;
|
||||
/** @internal */
|
||||
styleFeature(feature: GeoJSONStoreFeatures): TerraDrawAdapterStyling;
|
||||
validateFeature(feature: unknown): StoreValidation;
|
||||
afterFeatureUpdated(feature: GeoJSONStoreFeatures): void;
|
||||
afterFeatureAdded(feature: GeoJSONStoreFeatures): void;
|
||||
registerBehaviors(config: BehaviorConfig): void;
|
||||
}
|
||||
export {};
|
||||
Loaded 100 of 13454 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user