@digitalculture/ochre-sdk 0.13.4 → 0.13.5
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 +6 -10
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -100,7 +100,7 @@ type Person = {
|
|
|
100
100
|
state: string | null;
|
|
101
101
|
} | null;
|
|
102
102
|
description: string | null;
|
|
103
|
-
coordinates:
|
|
103
|
+
coordinates: Array<Coordinate>;
|
|
104
104
|
content: string | null;
|
|
105
105
|
notes: Array<Note>;
|
|
106
106
|
links: Array<Link>;
|
|
@@ -177,9 +177,9 @@ type ImageMap = {
|
|
|
177
177
|
height: number;
|
|
178
178
|
};
|
|
179
179
|
/**
|
|
180
|
-
* Geographic
|
|
180
|
+
* Geographic coordinate with optional type and label
|
|
181
181
|
*/
|
|
182
|
-
type
|
|
182
|
+
type Coordinate = {
|
|
183
183
|
type: "point";
|
|
184
184
|
latitude: number;
|
|
185
185
|
longitude: number;
|
|
@@ -231,10 +231,6 @@ type CoordinatesItem = {
|
|
|
231
231
|
label: string;
|
|
232
232
|
} | null;
|
|
233
233
|
};
|
|
234
|
-
/**
|
|
235
|
-
* Geographic coordinates with optional type and label
|
|
236
|
-
*/
|
|
237
|
-
type Coordinates = Array<CoordinatesItem>;
|
|
238
234
|
/**
|
|
239
235
|
* Represents an observation with notes, links and properties
|
|
240
236
|
*/
|
|
@@ -294,7 +290,7 @@ type Resource = {
|
|
|
294
290
|
creators: Array<Person>;
|
|
295
291
|
notes: Array<Note>;
|
|
296
292
|
description: string;
|
|
297
|
-
coordinates:
|
|
293
|
+
coordinates: Array<Coordinate>;
|
|
298
294
|
document: string | null;
|
|
299
295
|
href: string | null;
|
|
300
296
|
fileFormat: string | null;
|
|
@@ -321,7 +317,7 @@ type SpatialUnit = {
|
|
|
321
317
|
identification: Identification;
|
|
322
318
|
image: Image | null;
|
|
323
319
|
description: string | null;
|
|
324
|
-
coordinates:
|
|
320
|
+
coordinates: Array<Coordinate>;
|
|
325
321
|
mapData: {
|
|
326
322
|
geoJSON: {
|
|
327
323
|
multiPolygon: string;
|
|
@@ -1240,4 +1236,4 @@ declare function filterProperties(property: Property, filter: {
|
|
|
1240
1236
|
value: string | number | boolean | Date;
|
|
1241
1237
|
}, options?: PropertyOptions): boolean;
|
|
1242
1238
|
//#endregion
|
|
1243
|
-
export { Bibliography, Concept, Context, ContextItem, ContextNode,
|
|
1239
|
+
export { Bibliography, Concept, Context, ContextItem, ContextNode, Coordinate, Data, DataCategory, Event, Gallery, Identification, Image, ImageMap, ImageMapArea, Interpretation, Item, LevelContext, LevelContextItem, License, Link, Metadata, Note, Observation, Period, Person, Property, PropertyQueryItem, PropertyValue, PropertyValueContent, PropertyValueContentType, Resource, Set, SpatialUnit, Style, Tree, UuidMetadata, WebBlock, WebBlockLayout, WebElement, WebElementComponent, WebImage, WebTitle, Webpage, Website, fetchByUuidMetadata, fetchGallery, fetchItem, fetchPropertyQuery, fetchWebsite, filterProperties, getPropertyByLabel, getPropertyByUuid, getPropertyValueByLabel, getPropertyValueByUuid, getPropertyValuesByLabel, getPropertyValuesByUuid, getUniqueProperties, getUniquePropertyLabels };
|
package/dist/index.mjs
CHANGED
|
@@ -1022,10 +1022,10 @@ function parseNotes(notes, language = "eng") {
|
|
|
1022
1022
|
return returnNotes;
|
|
1023
1023
|
}
|
|
1024
1024
|
/**
|
|
1025
|
-
* Parses raw coordinates data into a standardized
|
|
1025
|
+
* Parses raw coordinates data into a standardized array of Coordinate structures
|
|
1026
1026
|
*
|
|
1027
1027
|
* @param coordinates - Raw coordinates data in OCHRE format
|
|
1028
|
-
* @returns Parsed
|
|
1028
|
+
* @returns Parsed array of Coordinate objects
|
|
1029
1029
|
*/
|
|
1030
1030
|
function parseCoordinates(coordinates) {
|
|
1031
1031
|
if (coordinates == null) return [];
|
package/package.json
CHANGED