@ikaros-arch/react-3dhop-iiif 0.2.0 → 0.3.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.
package/dist/index.mjs CHANGED
@@ -1362,11 +1362,16 @@ function parseCollection(collection, options = {}) {
1362
1362
  onDiagnostic?.({ level: "warning", message: "Collection item has no id; skipping." });
1363
1363
  return;
1364
1364
  }
1365
+ const fields = (item.metadata ?? []).map((entry) => ({
1366
+ label: resolve(entry.label),
1367
+ value: resolve(entry.value)
1368
+ }));
1365
1369
  items.push({
1366
1370
  id: item.id,
1367
1371
  label: resolve(item.label) || item.id,
1368
1372
  summary: resolve(item.summary) || void 0,
1369
- thumbnail: firstThumbnail(item)
1373
+ thumbnail: firstThumbnail(item),
1374
+ fields
1370
1375
  });
1371
1376
  });
1372
1377
  return {