@digitalculture/ochre-sdk 0.5.15 → 0.5.17

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
@@ -570,6 +570,7 @@ var componentSchema = import_zod3.z.enum(
570
570
  "button",
571
571
  "collection",
572
572
  "empty-space",
573
+ "filter-categories",
573
574
  "iframe",
574
575
  "iiif-viewer",
575
576
  "image",
@@ -1572,6 +1573,16 @@ async function parseWebElementProperties(componentProperty, elementResource) {
1572
1573
  properties.width = width;
1573
1574
  break;
1574
1575
  }
1576
+ case "filter-categories": {
1577
+ const filterLink = links.find((link) => link.category === "set");
1578
+ if (!filterLink) {
1579
+ throw new Error(
1580
+ `Filter link not found for the following component: \u201C${componentName}\u201D`
1581
+ );
1582
+ }
1583
+ properties.filterId = filterLink.uuid;
1584
+ break;
1585
+ }
1575
1586
  case "iframe": {
1576
1587
  const href = links.find((link) => link.type === "webpage")?.href;
1577
1588
  if (!href) {
package/dist/index.d.cts CHANGED
@@ -527,6 +527,9 @@ type WebElementComponent = {
527
527
  component: "empty-space";
528
528
  height: string | null;
529
529
  width: string | null;
530
+ } | {
531
+ component: "filter-categories";
532
+ filterId: string;
530
533
  } | {
531
534
  component: "iframe";
532
535
  href: string;
@@ -545,7 +548,7 @@ type WebElementComponent = {
545
548
  isFullHeight: boolean;
546
549
  imageQuality: "high" | "low";
547
550
  captionSource: "name" | "abbreviation" | "description";
548
- captionLayout: "top" | "bottom" | "suppress";
551
+ captionLayout: "top" | "bottom" | "inset" | "suppress";
549
552
  altTextSource: "name" | "abbreviation" | "description";
550
553
  isTransparentBackground: boolean;
551
554
  isCover: boolean;
package/dist/index.d.ts CHANGED
@@ -527,6 +527,9 @@ type WebElementComponent = {
527
527
  component: "empty-space";
528
528
  height: string | null;
529
529
  width: string | null;
530
+ } | {
531
+ component: "filter-categories";
532
+ filterId: string;
530
533
  } | {
531
534
  component: "iframe";
532
535
  href: string;
@@ -545,7 +548,7 @@ type WebElementComponent = {
545
548
  isFullHeight: boolean;
546
549
  imageQuality: "high" | "low";
547
550
  captionSource: "name" | "abbreviation" | "description";
548
- captionLayout: "top" | "bottom" | "suppress";
551
+ captionLayout: "top" | "bottom" | "inset" | "suppress";
549
552
  altTextSource: "name" | "abbreviation" | "description";
550
553
  isTransparentBackground: boolean;
551
554
  isCover: boolean;
package/dist/index.js CHANGED
@@ -490,6 +490,7 @@ var componentSchema = z3.enum(
490
490
  "button",
491
491
  "collection",
492
492
  "empty-space",
493
+ "filter-categories",
493
494
  "iframe",
494
495
  "iiif-viewer",
495
496
  "image",
@@ -1492,6 +1493,16 @@ async function parseWebElementProperties(componentProperty, elementResource) {
1492
1493
  properties.width = width;
1493
1494
  break;
1494
1495
  }
1496
+ case "filter-categories": {
1497
+ const filterLink = links.find((link) => link.category === "set");
1498
+ if (!filterLink) {
1499
+ throw new Error(
1500
+ `Filter link not found for the following component: \u201C${componentName}\u201D`
1501
+ );
1502
+ }
1503
+ properties.filterId = filterLink.uuid;
1504
+ break;
1505
+ }
1495
1506
  case "iframe": {
1496
1507
  const href = links.find((link) => link.type === "webpage")?.href;
1497
1508
  if (!href) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalculture/ochre-sdk",
3
- "version": "0.5.15",
3
+ "version": "0.5.17",
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",
@@ -46,7 +46,7 @@
46
46
  "devDependencies": {
47
47
  "@antfu/eslint-config": "^4.12.0",
48
48
  "@arethetypeswrong/cli": "^0.17.4",
49
- "@changesets/cli": "^2.29.0",
49
+ "@changesets/cli": "^2.29.1",
50
50
  "@total-typescript/ts-reset": "^0.6.1",
51
51
  "@types/node": "^22.14.1",
52
52
  "eslint": "^9.24.0",