@digitalculture/ochre-sdk 0.2.9 → 0.2.10

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 CHANGED
@@ -1548,7 +1548,7 @@ async function parseWebElementProperties(componentProperty, elementResource) {
1548
1548
  if (altTextSource === null) {
1549
1549
  altTextSource = "name";
1550
1550
  }
1551
- let secondsPerImage = images.length > 1 ? 5 : null;
1551
+ let secondsPerImage = 5;
1552
1552
  const secondsPerImageProperty = getPropertyValueByLabel(
1553
1553
  componentProperty.properties,
1554
1554
  "seconds-per-image"
@@ -1574,13 +1574,15 @@ async function parseWebElementProperties(componentProperty, elementResource) {
1574
1574
  }
1575
1575
  properties.images = images;
1576
1576
  properties.variant = variant;
1577
+ properties.carouselOptions = images.length > 1 ? {
1578
+ secondsPerImage,
1579
+ isFullWidth,
1580
+ isFullHeight
1581
+ } : null;
1577
1582
  properties.imageQuality = imageQuality;
1578
1583
  properties.captionLayout = captionLayout;
1579
1584
  properties.captionSource = captionSource;
1580
1585
  properties.altTextSource = altTextSource;
1581
- properties.secondsPerImage = secondsPerImage;
1582
- properties.isFullWidth = isFullWidth;
1583
- properties.isFullHeight = isFullHeight;
1584
1586
  break;
1585
1587
  }
1586
1588
  case "image-gallery": {
package/dist/index.d.cts CHANGED
@@ -496,15 +496,17 @@ type WebElementComponent = {
496
496
  IIIFId: string;
497
497
  } | {
498
498
  component: "image";
499
- variant: "default" | "carousel";
500
499
  images: Array<WebImage>;
500
+ variant: "default" | "carousel";
501
+ carouselOptions: {
502
+ secondsPerImage: number | null;
503
+ isFullWidth: boolean | null;
504
+ isFullHeight: boolean | null;
505
+ } | null;
501
506
  imageQuality: "high" | "low";
502
507
  captionSource: "name" | "abbreviation" | "description";
503
508
  captionLayout: "top" | "bottom" | "suppress";
504
509
  altTextSource: "name" | "abbreviation" | "description";
505
- secondsPerImage: number | null;
506
- isFullWidth: boolean | null;
507
- isFullHeight: boolean | null;
508
510
  } | {
509
511
  component: "image-gallery";
510
512
  galleryId: string;
package/dist/index.d.ts CHANGED
@@ -496,15 +496,17 @@ type WebElementComponent = {
496
496
  IIIFId: string;
497
497
  } | {
498
498
  component: "image";
499
- variant: "default" | "carousel";
500
499
  images: Array<WebImage>;
500
+ variant: "default" | "carousel";
501
+ carouselOptions: {
502
+ secondsPerImage: number | null;
503
+ isFullWidth: boolean | null;
504
+ isFullHeight: boolean | null;
505
+ } | null;
501
506
  imageQuality: "high" | "low";
502
507
  captionSource: "name" | "abbreviation" | "description";
503
508
  captionLayout: "top" | "bottom" | "suppress";
504
509
  altTextSource: "name" | "abbreviation" | "description";
505
- secondsPerImage: number | null;
506
- isFullWidth: boolean | null;
507
- isFullHeight: boolean | null;
508
510
  } | {
509
511
  component: "image-gallery";
510
512
  galleryId: string;
package/dist/index.js CHANGED
@@ -1470,7 +1470,7 @@ async function parseWebElementProperties(componentProperty, elementResource) {
1470
1470
  if (altTextSource === null) {
1471
1471
  altTextSource = "name";
1472
1472
  }
1473
- let secondsPerImage = images.length > 1 ? 5 : null;
1473
+ let secondsPerImage = 5;
1474
1474
  const secondsPerImageProperty = getPropertyValueByLabel(
1475
1475
  componentProperty.properties,
1476
1476
  "seconds-per-image"
@@ -1496,13 +1496,15 @@ async function parseWebElementProperties(componentProperty, elementResource) {
1496
1496
  }
1497
1497
  properties.images = images;
1498
1498
  properties.variant = variant;
1499
+ properties.carouselOptions = images.length > 1 ? {
1500
+ secondsPerImage,
1501
+ isFullWidth,
1502
+ isFullHeight
1503
+ } : null;
1499
1504
  properties.imageQuality = imageQuality;
1500
1505
  properties.captionLayout = captionLayout;
1501
1506
  properties.captionSource = captionSource;
1502
1507
  properties.altTextSource = altTextSource;
1503
- properties.secondsPerImage = secondsPerImage;
1504
- properties.isFullWidth = isFullWidth;
1505
- properties.isFullHeight = isFullHeight;
1506
1508
  break;
1507
1509
  }
1508
1510
  case "image-gallery": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalculture/ochre-sdk",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
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",