@digitalculture/ochre-sdk 0.7.0 → 0.7.2
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.cjs +8 -2765
- package/dist/index.d.cts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +8 -2690
- package/package.json +9 -8
package/dist/index.d.cts
CHANGED
|
@@ -477,6 +477,7 @@ type WebElement = {
|
|
|
477
477
|
isCreatorsDisplayed: boolean;
|
|
478
478
|
};
|
|
479
479
|
};
|
|
480
|
+
isDisplayedInBlockSectionSidebar: boolean;
|
|
480
481
|
cssStyles: Array<Style>;
|
|
481
482
|
cssStylesMobile: Array<Style>;
|
|
482
483
|
} & WebElementComponent;
|
|
@@ -615,11 +616,18 @@ type WebBlock = {
|
|
|
615
616
|
* `justify-content` CSS property value
|
|
616
617
|
*/
|
|
617
618
|
justifyContent: "stretch" | "start" | "center" | "end" | "space-between";
|
|
619
|
+
sectionSidebarItems: Array<WebSectionSidebarItem> | null;
|
|
618
620
|
};
|
|
619
621
|
propertiesMobile: Record<string, string> | null;
|
|
620
622
|
cssStyles: Array<Style>;
|
|
621
623
|
cssStylesMobile: Array<Style>;
|
|
622
624
|
};
|
|
625
|
+
type WebSectionSidebarItem = {
|
|
626
|
+
uuid: string;
|
|
627
|
+
type: "block" | "element";
|
|
628
|
+
name: string | null;
|
|
629
|
+
items: Array<WebSectionSidebarItem> | null;
|
|
630
|
+
};
|
|
623
631
|
|
|
624
632
|
/**
|
|
625
633
|
* Fetches and parses a gallery from the OCHRE API
|
|
@@ -928,6 +936,7 @@ type OchreSpatialUnit = {
|
|
|
928
936
|
identification: OchreIdentification;
|
|
929
937
|
image?: OchreImage;
|
|
930
938
|
description?: OchreStringContent | FakeString;
|
|
939
|
+
coordinate?: string; // "latitude, longitude"
|
|
931
940
|
coordinates?: OchreCoordinates;
|
|
932
941
|
events?: { event: OchreEvent | Array<OchreEvent> };
|
|
933
942
|
observations?: { observation: OchreObservation | Array<OchreObservation> };
|
|
@@ -1518,7 +1527,7 @@ declare function parseNotes(notes: Array<OchreNote>, language?: string): Array<N
|
|
|
1518
1527
|
* @param coordinates - Raw coordinates data in OCHRE format
|
|
1519
1528
|
* @returns Parsed Coordinates object
|
|
1520
1529
|
*/
|
|
1521
|
-
declare function parseCoordinates(coordinates: OchreCoordinates): Coordinates;
|
|
1530
|
+
declare function parseCoordinates(coordinates: OchreCoordinates | string): Coordinates;
|
|
1522
1531
|
/**
|
|
1523
1532
|
* Parses a raw observation into a standardized Observation structure
|
|
1524
1533
|
*
|
|
@@ -1714,4 +1723,4 @@ declare function parseStringDocumentItem(item: OchreStringRichTextItem, footnote
|
|
|
1714
1723
|
*/
|
|
1715
1724
|
declare function parseStringContent(content: OchreStringContent, language?: string): string;
|
|
1716
1725
|
|
|
1717
|
-
export { type Bibliography, type Concept, type Context, type ContextItem, type ContextNode, type Coordinates, type Data, type DataCategory, type Document, type Event, type Footnote, type Gallery, type Identification, type Image, type ImageMap, type ImageMapArea, type Interpretation, type License, type Link, type Metadata, type Note, type Observation, type Period, type Person, type Property, type PropertyValue, type PropertyValueContent, type PropertyValueContentType, type Resource, type Set, type SpatialUnit, type Style, type Tree, type WebBlock, type WebElement, type WebElementComponent, type WebImage, type Webpage, type WebpageProperties, type Website, type WebsiteProperties, fetchByUuid, fetchGallery, fetchItem, fetchWebsite, filterProperties, getAllPropertyLabels, getPropertyByLabel, getPropertyValueByLabel, getPropertyValuesByLabel, parseBibliographies, parseBibliography, parseConcept, parseConcepts, parseContext, parseCoordinates, parseDocument, parseEmail, parseEvents, parseFakeString, parseIdentification, parseImage, parseImageMap, parseInterpretations, parseLanguages, parseLicense, parseLink, parseLinks, parseMetadata, parseNotes, parseObservation, parseObservations, parsePeriod, parsePeriods, parsePerson, parsePersons, parseProperties, parseProperty, parsePropertyValue, parsePropertyValues, parseResource, parseResources, parseSet, parseSpatialUnit, parseSpatialUnits, parseStringContent, parseStringDocumentItem, parseStringItem, parseTree, parseWebsite };
|
|
1726
|
+
export { type Bibliography, type Concept, type Context, type ContextItem, type ContextNode, type Coordinates, type Data, type DataCategory, type Document, type Event, type Footnote, type Gallery, type Identification, type Image, type ImageMap, type ImageMapArea, type Interpretation, type License, type Link, type Metadata, type Note, type Observation, type Period, type Person, type Property, type PropertyValue, type PropertyValueContent, type PropertyValueContentType, type Resource, type Set, type SpatialUnit, type Style, type Tree, type WebBlock, type WebElement, type WebElementComponent, type WebImage, type WebSectionSidebarItem, type Webpage, type WebpageProperties, type Website, type WebsiteProperties, fetchByUuid, fetchGallery, fetchItem, fetchWebsite, filterProperties, getAllPropertyLabels, getPropertyByLabel, getPropertyValueByLabel, getPropertyValuesByLabel, parseBibliographies, parseBibliography, parseConcept, parseConcepts, parseContext, parseCoordinates, parseDocument, parseEmail, parseEvents, parseFakeString, parseIdentification, parseImage, parseImageMap, parseInterpretations, parseLanguages, parseLicense, parseLink, parseLinks, parseMetadata, parseNotes, parseObservation, parseObservations, parsePeriod, parsePeriods, parsePerson, parsePersons, parseProperties, parseProperty, parsePropertyValue, parsePropertyValues, parseResource, parseResources, parseSet, parseSpatialUnit, parseSpatialUnits, parseStringContent, parseStringDocumentItem, parseStringItem, parseTree, parseWebsite };
|
package/dist/index.d.ts
CHANGED
|
@@ -477,6 +477,7 @@ type WebElement = {
|
|
|
477
477
|
isCreatorsDisplayed: boolean;
|
|
478
478
|
};
|
|
479
479
|
};
|
|
480
|
+
isDisplayedInBlockSectionSidebar: boolean;
|
|
480
481
|
cssStyles: Array<Style>;
|
|
481
482
|
cssStylesMobile: Array<Style>;
|
|
482
483
|
} & WebElementComponent;
|
|
@@ -615,11 +616,18 @@ type WebBlock = {
|
|
|
615
616
|
* `justify-content` CSS property value
|
|
616
617
|
*/
|
|
617
618
|
justifyContent: "stretch" | "start" | "center" | "end" | "space-between";
|
|
619
|
+
sectionSidebarItems: Array<WebSectionSidebarItem> | null;
|
|
618
620
|
};
|
|
619
621
|
propertiesMobile: Record<string, string> | null;
|
|
620
622
|
cssStyles: Array<Style>;
|
|
621
623
|
cssStylesMobile: Array<Style>;
|
|
622
624
|
};
|
|
625
|
+
type WebSectionSidebarItem = {
|
|
626
|
+
uuid: string;
|
|
627
|
+
type: "block" | "element";
|
|
628
|
+
name: string | null;
|
|
629
|
+
items: Array<WebSectionSidebarItem> | null;
|
|
630
|
+
};
|
|
623
631
|
|
|
624
632
|
/**
|
|
625
633
|
* Fetches and parses a gallery from the OCHRE API
|
|
@@ -928,6 +936,7 @@ type OchreSpatialUnit = {
|
|
|
928
936
|
identification: OchreIdentification;
|
|
929
937
|
image?: OchreImage;
|
|
930
938
|
description?: OchreStringContent | FakeString;
|
|
939
|
+
coordinate?: string; // "latitude, longitude"
|
|
931
940
|
coordinates?: OchreCoordinates;
|
|
932
941
|
events?: { event: OchreEvent | Array<OchreEvent> };
|
|
933
942
|
observations?: { observation: OchreObservation | Array<OchreObservation> };
|
|
@@ -1518,7 +1527,7 @@ declare function parseNotes(notes: Array<OchreNote>, language?: string): Array<N
|
|
|
1518
1527
|
* @param coordinates - Raw coordinates data in OCHRE format
|
|
1519
1528
|
* @returns Parsed Coordinates object
|
|
1520
1529
|
*/
|
|
1521
|
-
declare function parseCoordinates(coordinates: OchreCoordinates): Coordinates;
|
|
1530
|
+
declare function parseCoordinates(coordinates: OchreCoordinates | string): Coordinates;
|
|
1522
1531
|
/**
|
|
1523
1532
|
* Parses a raw observation into a standardized Observation structure
|
|
1524
1533
|
*
|
|
@@ -1714,4 +1723,4 @@ declare function parseStringDocumentItem(item: OchreStringRichTextItem, footnote
|
|
|
1714
1723
|
*/
|
|
1715
1724
|
declare function parseStringContent(content: OchreStringContent, language?: string): string;
|
|
1716
1725
|
|
|
1717
|
-
export { type Bibliography, type Concept, type Context, type ContextItem, type ContextNode, type Coordinates, type Data, type DataCategory, type Document, type Event, type Footnote, type Gallery, type Identification, type Image, type ImageMap, type ImageMapArea, type Interpretation, type License, type Link, type Metadata, type Note, type Observation, type Period, type Person, type Property, type PropertyValue, type PropertyValueContent, type PropertyValueContentType, type Resource, type Set, type SpatialUnit, type Style, type Tree, type WebBlock, type WebElement, type WebElementComponent, type WebImage, type Webpage, type WebpageProperties, type Website, type WebsiteProperties, fetchByUuid, fetchGallery, fetchItem, fetchWebsite, filterProperties, getAllPropertyLabels, getPropertyByLabel, getPropertyValueByLabel, getPropertyValuesByLabel, parseBibliographies, parseBibliography, parseConcept, parseConcepts, parseContext, parseCoordinates, parseDocument, parseEmail, parseEvents, parseFakeString, parseIdentification, parseImage, parseImageMap, parseInterpretations, parseLanguages, parseLicense, parseLink, parseLinks, parseMetadata, parseNotes, parseObservation, parseObservations, parsePeriod, parsePeriods, parsePerson, parsePersons, parseProperties, parseProperty, parsePropertyValue, parsePropertyValues, parseResource, parseResources, parseSet, parseSpatialUnit, parseSpatialUnits, parseStringContent, parseStringDocumentItem, parseStringItem, parseTree, parseWebsite };
|
|
1726
|
+
export { type Bibliography, type Concept, type Context, type ContextItem, type ContextNode, type Coordinates, type Data, type DataCategory, type Document, type Event, type Footnote, type Gallery, type Identification, type Image, type ImageMap, type ImageMapArea, type Interpretation, type License, type Link, type Metadata, type Note, type Observation, type Period, type Person, type Property, type PropertyValue, type PropertyValueContent, type PropertyValueContentType, type Resource, type Set, type SpatialUnit, type Style, type Tree, type WebBlock, type WebElement, type WebElementComponent, type WebImage, type WebSectionSidebarItem, type Webpage, type WebpageProperties, type Website, type WebsiteProperties, fetchByUuid, fetchGallery, fetchItem, fetchWebsite, filterProperties, getAllPropertyLabels, getPropertyByLabel, getPropertyValueByLabel, getPropertyValuesByLabel, parseBibliographies, parseBibliography, parseConcept, parseConcepts, parseContext, parseCoordinates, parseDocument, parseEmail, parseEvents, parseFakeString, parseIdentification, parseImage, parseImageMap, parseInterpretations, parseLanguages, parseLicense, parseLink, parseLinks, parseMetadata, parseNotes, parseObservation, parseObservations, parsePeriod, parsePeriods, parsePerson, parsePersons, parseProperties, parseProperty, parsePropertyValue, parsePropertyValues, parseResource, parseResources, parseSet, parseSpatialUnit, parseSpatialUnits, parseStringContent, parseStringDocumentItem, parseStringItem, parseTree, parseWebsite };
|