terra-draw 1.0.0 → 1.1.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.
@@ -57,23 +57,17 @@ declare class TerraDraw {
57
57
  * @param mode - The mode you wish to set a style for
58
58
  * @param styles - The styles you wish to set for the mode - this is
59
59
  * the same as the initialisation style schema
60
- *
61
- * @beta
62
60
  */
63
61
  setModeStyles<Styling extends Record<string, number | HexColor>>(mode: string, styles: Styling): void;
64
62
  /**
65
63
  * Allows the user to get a snapshot (copy) of all given features
66
64
  *
67
65
  * @returns An array of all given Feature Geometries in the instances store
68
- *
69
- * @beta
70
66
  */
71
67
  getSnapshot(): GeoJSONStoreFeatures[];
72
68
  /**
73
69
  * Removes all data from the current store and removes any rendered layers
74
70
  * via the registering the adapter.
75
- *
76
- * @beta
77
71
  */
78
72
  clear(): void;
79
73
  /**
@@ -83,37 +77,27 @@ declare class TerraDraw {
83
77
  *
84
78
  * @return true or false depending on if the instance is stopped or started
85
79
  * @readonly
86
- * @beta
87
80
  */
88
81
  get enabled(): boolean;
89
82
  /**
90
83
  * enabled is a read only property and will throw and error if you try and set it.
91
- *
92
- * @beta
93
84
  */
94
85
  set enabled(_: boolean);
95
86
  /**
96
87
  * A method for getting the current mode name
97
- *
98
88
  * @return the current mode name
99
- *
100
- * @beta
101
89
  */
102
90
  getMode(): string;
103
91
  /**
104
92
  * A method for setting the current mode by name. Under the hood this will stop
105
93
  * the previous mode and start the new one.
106
94
  * @param mode - The mode name you wish to start
107
- *
108
- * @beta
109
95
  */
110
96
  setMode(mode: string): void;
111
97
  /**
112
98
  * A method for removing features to the store
113
99
  * @param ids
114
100
  * @returns
115
- *
116
- * @beta
117
101
  */
118
102
  removeFeatures(ids: FeatureId[]): void;
119
103
  /**
@@ -121,7 +105,6 @@ declare class TerraDraw {
121
105
  * If not select mode is provided in the instance, an error will be thrown. If the instance is not currently
122
106
  * in the select mode, it will switch to it.
123
107
  * @param id - the id of the feature to select
124
- * @beta
125
108
  */
126
109
  selectFeature(id: FeatureId): void;
127
110
  /**
@@ -129,7 +112,6 @@ declare class TerraDraw {
129
112
  * If not select mode is provided in the instance, an error will be thrown. If the instance is not currently
130
113
  * in the select mode, it will switch to it.
131
114
  * @param id - the id of the feature to deselect
132
- * @beta
133
115
  */
134
116
  deselectFeature(id: FeatureId): void;
135
117
  /**
@@ -138,14 +120,11 @@ declare class TerraDraw {
138
120
  * outside of the Terra Draw instance but want to add them in to the store.
139
121
  * @returns a id, either number of string based on whatever the configured idStrategy is
140
122
  *
141
- * @beta
142
123
  */
143
124
  getFeatureId(): FeatureId;
144
125
  /**
145
126
  * Returns true or false depending on if the Terra Draw instance has a feature with a given id
146
127
  * @returns a boolean determining if the instance has a feature with the given id
147
- *
148
- * @beta
149
128
  */
150
129
  hasFeature(id: FeatureId): boolean;
151
130
  /**
@@ -154,23 +133,17 @@ declare class TerraDraw {
154
133
  * in the instance.
155
134
  * @param features - an array of GeoJSON features
156
135
  * @returns an array of validation results
157
- *
158
- * @beta
159
136
  */
160
137
  addFeatures(features: GeoJSONStoreFeatures[]): StoreValidation[];
161
138
  /**
162
139
  * A method starting Terra Draw. It put the instance into a started state, and
163
140
  * in registers the passed adapter giving it all the callbacks required to operate.
164
- *
165
- * @beta
166
141
  */
167
142
  start(): void;
168
143
  /**
169
144
  * Gets the features at a given longitude and latitude.
170
145
  * Will return point and linestrings that are a given pixel distance
171
146
  * away from the lng/lat and any polygons which contain it.
172
- *
173
- * @beta
174
147
  */
175
148
  getFeaturesAtLngLat(lngLat: {
176
149
  lng: number;
@@ -180,21 +153,16 @@ declare class TerraDraw {
180
153
  ignoreSelectFeatures: boolean;
181
154
  }): GeoJSONStoreFeatures[];
182
155
  /**
183
- * Takes a given pointer event and
184
- * Will return point and linestrings that are a given pixel distance
185
- * away from the lng/lat and any polygons which contain it.
186
- *
187
- * @beta
156
+ * Takes a given pointer event and will return point and linestrings that are
157
+ * a given pixel distance away from the longitude/latitude, and any polygons which contain it.
188
158
  */
189
159
  getFeaturesAtPointerEvent(event: PointerEvent | MouseEvent, options?: {
190
- pointerDistance: number;
191
- ignoreSelectFeatures: boolean;
160
+ pointerDistance?: number;
161
+ ignoreSelectFeatures?: boolean;
192
162
  }): GeoJSONStoreFeatures[];
193
163
  /**
194
164
  * A method for stopping Terra Draw. Will clear the store, deregister the adapter and
195
165
  * remove any rendered layers in the process.
196
- *
197
- * @beta
198
166
  */
199
167
  stop(): void;
200
168
  /**
@@ -203,7 +171,6 @@ declare class TerraDraw {
203
171
  * @param event - The name of the event you wish to listen for
204
172
  * @param callback - The callback with you wish to be called when this event occurs
205
173
  *
206
- * @beta
207
174
  */
208
175
  on<T extends TerraDrawEvents>(event: T, callback: TerraDrawEventListeners[T]): void;
209
176
  /**
@@ -212,9 +179,7 @@ declare class TerraDraw {
212
179
  * @param event - The name of the event you wish to unregister
213
180
  * @param callback - The callback you originally provided to the 'on' method
214
181
  *
215
- * @beta
216
182
  */
217
183
  off<T extends TerraDrawEvents>(event: TerraDrawEvents, callback: TerraDrawEventListeners[T]): void;
218
184
  }
219
- declare const HELLO = "HELLO";
220
- export { TerraDraw, HELLO, TerraDrawSelectMode, TerraDrawPointMode, TerraDrawLineStringMode, TerraDrawPolygonMode, TerraDrawCircleMode, TerraDrawFreehandMode, TerraDrawRenderMode, TerraDrawRectangleMode, TerraDrawAngledRectangleMode, TerraDrawSectorMode, TerraDrawSensorMode, TerraDrawExtend, BehaviorConfig, GeoJSONStoreFeatures, GeoJSONStoreGeometries, HexColor, TerraDrawMouseEvent, TerraDrawAdapterStyling, TerraDrawKeyboardEvent, TerraDrawChanges, TerraDrawStylingFunction, Project, Unproject, SetCursor, GetLngLatFromEvent, ValidateMinAreaSquareMeters, ValidateMaxAreaSquareMeters, ValidateNotSelfIntersecting, ValidationReasons, };
185
+ export { TerraDraw, TerraDrawSelectMode, TerraDrawPointMode, TerraDrawLineStringMode, TerraDrawPolygonMode, TerraDrawCircleMode, TerraDrawFreehandMode, TerraDrawRenderMode, TerraDrawRectangleMode, TerraDrawAngledRectangleMode, TerraDrawSectorMode, TerraDrawSensorMode, TerraDrawExtend, BehaviorConfig, GeoJSONStoreFeatures, GeoJSONStoreGeometries, HexColor, TerraDrawMouseEvent, TerraDrawAdapterStyling, TerraDrawKeyboardEvent, TerraDrawChanges, TerraDrawStylingFunction, Project, Unproject, SetCursor, GetLngLatFromEvent, ValidateMinAreaSquareMeters, ValidateMaxAreaSquareMeters, ValidateNotSelfIntersecting, ValidationReasons, };