@digitalculture/ochre-sdk 0.5.14 → 0.5.15
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 +14 -4
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +14 -4
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -1573,13 +1573,23 @@ async function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
1573
1573
|
break;
|
|
1574
1574
|
}
|
|
1575
1575
|
case "iframe": {
|
|
1576
|
-
const
|
|
1577
|
-
if (!
|
|
1576
|
+
const href = links.find((link) => link.type === "webpage")?.href;
|
|
1577
|
+
if (!href) {
|
|
1578
1578
|
throw new Error(
|
|
1579
1579
|
`URL not found for the following component: \u201C${componentName}\u201D`
|
|
1580
1580
|
);
|
|
1581
1581
|
}
|
|
1582
|
-
|
|
1582
|
+
const height = getPropertyValueByLabel(
|
|
1583
|
+
componentProperty.properties,
|
|
1584
|
+
"height"
|
|
1585
|
+
);
|
|
1586
|
+
const width = getPropertyValueByLabel(
|
|
1587
|
+
componentProperty.properties,
|
|
1588
|
+
"width"
|
|
1589
|
+
);
|
|
1590
|
+
properties.href = href;
|
|
1591
|
+
properties.height = height;
|
|
1592
|
+
properties.width = width;
|
|
1583
1593
|
break;
|
|
1584
1594
|
}
|
|
1585
1595
|
case "iiif-viewer": {
|
|
@@ -2312,7 +2322,7 @@ async function parseWebsite(websiteTree, projectName, website) {
|
|
|
2312
2322
|
Array.isArray(resource.properties.property) ? resource.properties.property : [resource.properties.property]
|
|
2313
2323
|
) : [];
|
|
2314
2324
|
return resourceProperties.some(
|
|
2315
|
-
(property) => property.label === "presentation" && property.values[0]?.content === "element" && property.properties[0]?.label === "component" && property.properties[0]
|
|
2325
|
+
(property) => property.label === "presentation" && property.values[0]?.content === "element" && property.properties[0]?.label === "component" && property.properties[0].values[0]?.content === "sidebar"
|
|
2316
2326
|
);
|
|
2317
2327
|
});
|
|
2318
2328
|
if (sidebarResource) {
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1493,13 +1493,23 @@ async function parseWebElementProperties(componentProperty, elementResource) {
|
|
|
1493
1493
|
break;
|
|
1494
1494
|
}
|
|
1495
1495
|
case "iframe": {
|
|
1496
|
-
const
|
|
1497
|
-
if (!
|
|
1496
|
+
const href = links.find((link) => link.type === "webpage")?.href;
|
|
1497
|
+
if (!href) {
|
|
1498
1498
|
throw new Error(
|
|
1499
1499
|
`URL not found for the following component: \u201C${componentName}\u201D`
|
|
1500
1500
|
);
|
|
1501
1501
|
}
|
|
1502
|
-
|
|
1502
|
+
const height = getPropertyValueByLabel(
|
|
1503
|
+
componentProperty.properties,
|
|
1504
|
+
"height"
|
|
1505
|
+
);
|
|
1506
|
+
const width = getPropertyValueByLabel(
|
|
1507
|
+
componentProperty.properties,
|
|
1508
|
+
"width"
|
|
1509
|
+
);
|
|
1510
|
+
properties.href = href;
|
|
1511
|
+
properties.height = height;
|
|
1512
|
+
properties.width = width;
|
|
1503
1513
|
break;
|
|
1504
1514
|
}
|
|
1505
1515
|
case "iiif-viewer": {
|
|
@@ -2232,7 +2242,7 @@ async function parseWebsite(websiteTree, projectName, website) {
|
|
|
2232
2242
|
Array.isArray(resource.properties.property) ? resource.properties.property : [resource.properties.property]
|
|
2233
2243
|
) : [];
|
|
2234
2244
|
return resourceProperties.some(
|
|
2235
|
-
(property) => property.label === "presentation" && property.values[0]?.content === "element" && property.properties[0]?.label === "component" && property.properties[0]
|
|
2245
|
+
(property) => property.label === "presentation" && property.values[0]?.content === "element" && property.properties[0]?.label === "component" && property.properties[0].values[0]?.content === "sidebar"
|
|
2236
2246
|
);
|
|
2237
2247
|
});
|
|
2238
2248
|
if (sidebarResource) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitalculture/ochre-sdk",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Node.js library for working with OCHRE (Online Cultural and Historical Research Environment) data",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"zod": "^3.24.2"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@antfu/eslint-config": "^4.
|
|
47
|
+
"@antfu/eslint-config": "^4.12.0",
|
|
48
48
|
"@arethetypeswrong/cli": "^0.17.4",
|
|
49
|
-
"@changesets/cli": "^2.
|
|
49
|
+
"@changesets/cli": "^2.29.0",
|
|
50
50
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
51
|
-
"@types/node": "^22.14.
|
|
51
|
+
"@types/node": "^22.14.1",
|
|
52
52
|
"eslint": "^9.24.0",
|
|
53
53
|
"eslint-plugin-unused-imports": "^4.1.4",
|
|
54
54
|
"prettier": "^3.5.3",
|