@digitalculture/ochre-sdk 0.13.0 → 0.13.2

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.d.mts +2 -2
  2. package/package.json +3 -3
package/dist/index.d.mts CHANGED
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Represents the core data structure containing item information and metadata
4
4
  */
5
- type Data<T extends DataCategory, U extends DataCategory> = {
5
+ type Data<T extends DataCategory = DataCategory, U extends DataCategory = (T extends "tree" | "set" ? DataCategory : never)> = {
6
6
  uuid: string;
7
7
  belongsTo: {
8
8
  uuid: string;
@@ -18,7 +18,7 @@ type DataCategory = "tree" | "set" | "resource" | "spatialUnit" | "concept" | "p
18
18
  /**
19
19
  * Represents the item of the data
20
20
  */
21
- type Item<T extends DataCategory, U extends DataCategory> = Tree<T, U> | Set<T> | Resource | SpatialUnit | Concept | Period | Bibliography | Person | PropertyValue;
21
+ type Item<T extends DataCategory = DataCategory, U extends DataCategory = (T extends "tree" | "set" ? DataCategory : never)> = Tree<T, U> | Set<U> | Resource | SpatialUnit | Concept | Period | Bibliography | Person | PropertyValue;
22
22
  /**
23
23
  * Basic identification information used across multiple types
24
24
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalculture/ochre-sdk",
3
- "version": "0.13.0",
3
+ "version": "0.13.2",
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,11 +43,11 @@
43
43
  "zod": "^4.1.13"
44
44
  },
45
45
  "devDependencies": {
46
- "@antfu/eslint-config": "^6.2.0",
46
+ "@antfu/eslint-config": "^6.3.0",
47
47
  "@types/node": "^24.10.1",
48
48
  "bumpp": "^10.3.2",
49
49
  "eslint": "^9.39.1",
50
- "prettier": "^3.7.3",
50
+ "prettier": "^3.7.4",
51
51
  "terser": "^5.44.1",
52
52
  "tsdown": "^0.16.8",
53
53
  "typescript": "^5.9.3",