@digitalculture/ochre-sdk 0.4.0 → 0.4.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 +16 -2
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +16 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -589,6 +589,7 @@ var componentSchema = import_zod3.z.enum(
|
|
|
589
589
|
"blog",
|
|
590
590
|
"button",
|
|
591
591
|
"collection",
|
|
592
|
+
"empty-space",
|
|
592
593
|
"iiif-viewer",
|
|
593
594
|
"image",
|
|
594
595
|
"image-gallery",
|
|
@@ -1510,6 +1511,19 @@ async function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
1510
1511
|
properties.collectionId = collectionLink.uuid;
|
|
1511
1512
|
break;
|
|
1512
1513
|
}
|
|
1514
|
+
case "empty-space": {
|
|
1515
|
+
const height = getPropertyValueByLabel(
|
|
1516
|
+
componentProperty.properties,
|
|
1517
|
+
"height"
|
|
1518
|
+
);
|
|
1519
|
+
const width = getPropertyValueByLabel(
|
|
1520
|
+
componentProperty.properties,
|
|
1521
|
+
"width"
|
|
1522
|
+
);
|
|
1523
|
+
properties.height = height;
|
|
1524
|
+
properties.width = width;
|
|
1525
|
+
break;
|
|
1526
|
+
}
|
|
1513
1527
|
case "iiif-viewer": {
|
|
1514
1528
|
const manifestLink = links.find((link) => link.type === "IIIF");
|
|
1515
1529
|
if (!manifestLink) {
|
|
@@ -1911,7 +1925,7 @@ async function parseWebpage(webpageResource) {
|
|
|
1911
1925
|
blocks: [],
|
|
1912
1926
|
elements: [],
|
|
1913
1927
|
properties: {
|
|
1914
|
-
spacing: "
|
|
1928
|
+
spacing: "auto",
|
|
1915
1929
|
gap: "none",
|
|
1916
1930
|
alignItems: "stretch",
|
|
1917
1931
|
justifyContent: "stretch"
|
|
@@ -2009,7 +2023,7 @@ async function parseBlock(blockResource) {
|
|
|
2009
2023
|
blocks: [],
|
|
2010
2024
|
elements: [],
|
|
2011
2025
|
properties: {
|
|
2012
|
-
spacing: "
|
|
2026
|
+
spacing: "auto",
|
|
2013
2027
|
gap: "none",
|
|
2014
2028
|
alignItems: "stretch",
|
|
2015
2029
|
justifyContent: "stretch"
|
package/dist/index.d.cts
CHANGED
|
@@ -499,6 +499,10 @@ type WebElementComponent = {
|
|
|
499
499
|
variant: "full" | "highlights";
|
|
500
500
|
layout: "image-top" | "image-bottom" | "image-start" | "image-end";
|
|
501
501
|
isSearchable: boolean;
|
|
502
|
+
} | {
|
|
503
|
+
component: "empty-space";
|
|
504
|
+
height: string | null;
|
|
505
|
+
width: string | null;
|
|
502
506
|
} | {
|
|
503
507
|
component: "iiif-viewer";
|
|
504
508
|
IIIFId: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -499,6 +499,10 @@ type WebElementComponent = {
|
|
|
499
499
|
variant: "full" | "highlights";
|
|
500
500
|
layout: "image-top" | "image-bottom" | "image-start" | "image-end";
|
|
501
501
|
isSearchable: boolean;
|
|
502
|
+
} | {
|
|
503
|
+
component: "empty-space";
|
|
504
|
+
height: string | null;
|
|
505
|
+
width: string | null;
|
|
502
506
|
} | {
|
|
503
507
|
component: "iiif-viewer";
|
|
504
508
|
IIIFId: string;
|
package/dist/index.js
CHANGED
|
@@ -511,6 +511,7 @@ var componentSchema = z3.enum(
|
|
|
511
511
|
"blog",
|
|
512
512
|
"button",
|
|
513
513
|
"collection",
|
|
514
|
+
"empty-space",
|
|
514
515
|
"iiif-viewer",
|
|
515
516
|
"image",
|
|
516
517
|
"image-gallery",
|
|
@@ -1432,6 +1433,19 @@ async function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
1432
1433
|
properties.collectionId = collectionLink.uuid;
|
|
1433
1434
|
break;
|
|
1434
1435
|
}
|
|
1436
|
+
case "empty-space": {
|
|
1437
|
+
const height = getPropertyValueByLabel(
|
|
1438
|
+
componentProperty.properties,
|
|
1439
|
+
"height"
|
|
1440
|
+
);
|
|
1441
|
+
const width = getPropertyValueByLabel(
|
|
1442
|
+
componentProperty.properties,
|
|
1443
|
+
"width"
|
|
1444
|
+
);
|
|
1445
|
+
properties.height = height;
|
|
1446
|
+
properties.width = width;
|
|
1447
|
+
break;
|
|
1448
|
+
}
|
|
1435
1449
|
case "iiif-viewer": {
|
|
1436
1450
|
const manifestLink = links.find((link) => link.type === "IIIF");
|
|
1437
1451
|
if (!manifestLink) {
|
|
@@ -1833,7 +1847,7 @@ async function parseWebpage(webpageResource) {
|
|
|
1833
1847
|
blocks: [],
|
|
1834
1848
|
elements: [],
|
|
1835
1849
|
properties: {
|
|
1836
|
-
spacing: "
|
|
1850
|
+
spacing: "auto",
|
|
1837
1851
|
gap: "none",
|
|
1838
1852
|
alignItems: "stretch",
|
|
1839
1853
|
justifyContent: "stretch"
|
|
@@ -1931,7 +1945,7 @@ async function parseBlock(blockResource) {
|
|
|
1931
1945
|
blocks: [],
|
|
1932
1946
|
elements: [],
|
|
1933
1947
|
properties: {
|
|
1934
|
-
spacing: "
|
|
1948
|
+
spacing: "auto",
|
|
1935
1949
|
gap: "none",
|
|
1936
1950
|
alignItems: "stretch",
|
|
1937
1951
|
justifyContent: "stretch"
|
package/package.json
CHANGED