@digitalculture/ochre-sdk 0.13.6 → 0.13.7

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.
Files changed (2) hide show
  1. package/dist/index.mjs +4 -0
  2. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -589,6 +589,10 @@ function parseStringDocumentItem(item) {
589
589
  case "webpage": return `<ExternalLink href="${linkResource.href}" ${linkContent !== null ? `content="${linkContent}"` : ""}>${itemString}</ExternalLink>`;
590
590
  default: return "";
591
591
  }
592
+ } else if ("spatialUnit" in link) {
593
+ const linkSpatialUnit = Array.isArray(link.spatialUnit) ? link.spatialUnit[0] : link.spatialUnit;
594
+ if (linkSpatialUnit.publicationDateTime != null) return `<InternalLink uuid="${linkSpatialUnit.uuid}">${itemString}</InternalLink>`;
595
+ else return `<TooltipSpan>${itemString}</TooltipSpan>`;
592
596
  } else if ("concept" in link) {
593
597
  const linkConcept = Array.isArray(link.concept) ? link.concept[0] : link.concept;
594
598
  if (linkConcept.publicationDateTime != null) return `<InternalLink uuid="${linkConcept.uuid}">${itemString}</InternalLink>`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalculture/ochre-sdk",
3
- "version": "0.13.6",
3
+ "version": "0.13.7",
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",
@@ -43,13 +43,13 @@
43
43
  "zod": "^4.1.13"
44
44
  },
45
45
  "devDependencies": {
46
- "@antfu/eslint-config": "^6.4.1",
47
- "@types/node": "^24.10.1",
46
+ "@antfu/eslint-config": "^6.5.1",
47
+ "@types/node": "^24.10.2",
48
48
  "bumpp": "^10.3.2",
49
49
  "eslint": "^9.39.1",
50
50
  "prettier": "^3.7.4",
51
51
  "terser": "^5.44.1",
52
- "tsdown": "^0.17.0",
52
+ "tsdown": "^0.17.2",
53
53
  "typescript": "^5.9.3",
54
54
  "vitest": "^4.0.15"
55
55
  },