@digitalculture/ochre-sdk 0.4.5 → 0.4.6

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
@@ -1573,6 +1573,22 @@ async function parseWebElementProperties(componentProperty, elementResource) {
1573
1573
  if (captionLayout === null) {
1574
1574
  captionLayout = "bottom";
1575
1575
  }
1576
+ let width = null;
1577
+ const widthProperty = getPropertyValueByLabel(
1578
+ componentProperty.properties,
1579
+ "width"
1580
+ );
1581
+ if (widthProperty !== null) {
1582
+ width = Number.parseFloat(widthProperty);
1583
+ }
1584
+ let height = null;
1585
+ const heightProperty = getPropertyValueByLabel(
1586
+ componentProperty.properties,
1587
+ "height"
1588
+ );
1589
+ if (heightProperty !== null) {
1590
+ height = Number.parseFloat(heightProperty);
1591
+ }
1576
1592
  let isFullWidth = true;
1577
1593
  const isFullWidthProperty = getPropertyValueByLabel(
1578
1594
  componentProperty.properties,
@@ -1632,13 +1648,15 @@ async function parseWebElementProperties(componentProperty, elementResource) {
1632
1648
  }
1633
1649
  properties.images = images;
1634
1650
  properties.variant = variant;
1635
- properties.carouselOptions = carouselOptions;
1651
+ properties.width = width;
1652
+ properties.height = height;
1636
1653
  properties.isFullWidth = isFullWidth;
1637
1654
  properties.isFullHeight = isFullHeight;
1638
1655
  properties.imageQuality = imageQuality;
1639
1656
  properties.captionLayout = captionLayout;
1640
1657
  properties.captionSource = captionSource;
1641
1658
  properties.altTextSource = altTextSource;
1659
+ properties.carouselOptions = carouselOptions;
1642
1660
  break;
1643
1661
  }
1644
1662
  case "image-gallery": {
package/dist/index.d.cts CHANGED
@@ -510,15 +510,17 @@ type WebElementComponent = {
510
510
  component: "image";
511
511
  images: Array<WebImage>;
512
512
  variant: "default" | "carousel";
513
- carouselOptions: {
514
- secondsPerImage: number;
515
- } | null;
513
+ width: number | null;
514
+ height: number | null;
516
515
  isFullWidth: boolean;
517
516
  isFullHeight: boolean;
518
517
  imageQuality: "high" | "low";
519
518
  captionSource: "name" | "abbreviation" | "description";
520
519
  captionLayout: "top" | "bottom" | "suppress";
521
520
  altTextSource: "name" | "abbreviation" | "description";
521
+ carouselOptions: {
522
+ secondsPerImage: number;
523
+ } | null;
522
524
  } | {
523
525
  component: "image-gallery";
524
526
  galleryId: string;
package/dist/index.d.ts CHANGED
@@ -510,15 +510,17 @@ type WebElementComponent = {
510
510
  component: "image";
511
511
  images: Array<WebImage>;
512
512
  variant: "default" | "carousel";
513
- carouselOptions: {
514
- secondsPerImage: number;
515
- } | null;
513
+ width: number | null;
514
+ height: number | null;
516
515
  isFullWidth: boolean;
517
516
  isFullHeight: boolean;
518
517
  imageQuality: "high" | "low";
519
518
  captionSource: "name" | "abbreviation" | "description";
520
519
  captionLayout: "top" | "bottom" | "suppress";
521
520
  altTextSource: "name" | "abbreviation" | "description";
521
+ carouselOptions: {
522
+ secondsPerImage: number;
523
+ } | null;
522
524
  } | {
523
525
  component: "image-gallery";
524
526
  galleryId: string;
package/dist/index.js CHANGED
@@ -1494,6 +1494,22 @@ async function parseWebElementProperties(componentProperty, elementResource) {
1494
1494
  if (captionLayout === null) {
1495
1495
  captionLayout = "bottom";
1496
1496
  }
1497
+ let width = null;
1498
+ const widthProperty = getPropertyValueByLabel(
1499
+ componentProperty.properties,
1500
+ "width"
1501
+ );
1502
+ if (widthProperty !== null) {
1503
+ width = Number.parseFloat(widthProperty);
1504
+ }
1505
+ let height = null;
1506
+ const heightProperty = getPropertyValueByLabel(
1507
+ componentProperty.properties,
1508
+ "height"
1509
+ );
1510
+ if (heightProperty !== null) {
1511
+ height = Number.parseFloat(heightProperty);
1512
+ }
1497
1513
  let isFullWidth = true;
1498
1514
  const isFullWidthProperty = getPropertyValueByLabel(
1499
1515
  componentProperty.properties,
@@ -1553,13 +1569,15 @@ async function parseWebElementProperties(componentProperty, elementResource) {
1553
1569
  }
1554
1570
  properties.images = images;
1555
1571
  properties.variant = variant;
1556
- properties.carouselOptions = carouselOptions;
1572
+ properties.width = width;
1573
+ properties.height = height;
1557
1574
  properties.isFullWidth = isFullWidth;
1558
1575
  properties.isFullHeight = isFullHeight;
1559
1576
  properties.imageQuality = imageQuality;
1560
1577
  properties.captionLayout = captionLayout;
1561
1578
  properties.captionSource = captionSource;
1562
1579
  properties.altTextSource = altTextSource;
1580
+ properties.carouselOptions = carouselOptions;
1563
1581
  break;
1564
1582
  }
1565
1583
  case "image-gallery": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalculture/ochre-sdk",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
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",