@piveau/dpi 0.2.0-alpha.22 → 0.2.0-alpha.23

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.
@@ -1,10 +1,10 @@
1
1
  import { pipe as A } from "effect";
2
2
  import * as d from "effect/Option";
3
- import * as F from "jsonld";
3
+ import * as H from "jsonld";
4
4
  import { schemaProject as q } from "../../schema/projectLdSchema.js";
5
5
  import { getFirstItem as G, extractStringValue as t, extractLocalizedString as N } from "../useDpiSimpleLoader.js";
6
6
  import { isNonNullable as m } from "./encodeProject.js";
7
- import { PREFIXES as H, nonEmpty as k } from "./shared.js";
7
+ import { PREFIXES as F, nonEmpty as k } from "./shared.js";
8
8
  function z(r) {
9
9
  const a = (r || "").trim();
10
10
  if (!a)
@@ -18,12 +18,12 @@ function z(r) {
18
18
  }
19
19
  async function C(r) {
20
20
  const a = {
21
- "@context": H,
21
+ "@context": F,
22
22
  "@type": "schema:Project"
23
- }, s = await F.frame(r, a, {
23
+ }, s = await H.frame(r, a, {
24
24
  embed: "@always",
25
25
  omitGraph: !0
26
- }), n = await F.compact(s, H, {
26
+ }), n = await H.compact(s, F, {
27
27
  compactArrays: !1,
28
28
  graph: !1
29
29
  }), l = q.safeParse(G(n == null ? void 0 : n["@graph"]));
@@ -216,7 +216,7 @@ function L(r) {
216
216
  selected: P
217
217
  });
218
218
  const p = f.filter((e) => t(e["@type"]) === "ssn:System").map((e) => {
219
- const u = e["ssn:deployedSystem"], g = z(t(e["dct:identifier"]) || ""), y = u && typeof u == "object" ? z(t(u["@id"]) || u["@id"]) : "", W = g || y, x = N(e["dct:description"], "de") || void 0, M = (e["ssn:forProperty"] || []).map((o) => t(o)).filter(m), E = (e["sosa:hasLocation"] || []).map((o) => ({ lat: t(o["geo:lat"]) || "", lng: t(o["geo:long"]) || "" })).filter((o) => o.lat.length > 0 && o.lng.length > 0), T = (e["foaf:depiction"] || []).map((o) => U(o)).filter(m), B = (e["dct:references"] || []).filter((o) => t(o["dct:type"]) === "documentation").map((o) => ({
219
+ const u = e["ssn:deployedSystem"], g = z(t(e["dct:identifier"]) || ""), y = u && typeof u == "object" ? z(t(u["@id"]) || u["@id"]) : "", W = g || y, x = N(e["dct:description"], "de") || void 0, M = (e["ssn:forProperty"] || []).map((o) => t(o)).filter(m), E = (e["sosa:hasLocation"] || []).map((o) => ({ lat: t(o["geo:lat"]) || "", lng: t(o["geo:long"]) || "" })).filter((o) => o.lat.length > 0 && o.lng.length > 0), B = (e["foaf:depiction"] || []).map((o) => U(o)).filter(m), T = (e["dct:references"] || []).filter((o) => t(o["dct:type"]) === "documentation").map((o) => ({
220
220
  name: t(o["dct:title"]) || "",
221
221
  url: t(o["schema:url"]) || "",
222
222
  description: t(o["dct:description"]) || void 0
@@ -226,10 +226,10 @@ function L(r) {
226
226
  ...x ? { description: x } : {},
227
227
  ...M.length > 0 ? { forProperty: M } : {},
228
228
  ...E.length > 0 ? { locations: E } : {},
229
- ...T.length > 0 ? { depictions: T } : {},
230
- ...B.length > 0 ? { references: B } : {},
229
+ ...B.length > 0 ? { depictions: B } : {},
230
+ ...T.length > 0 ? { references: T } : {},
231
231
  ...O.length > 0 ? { functionalities: O } : {},
232
- isHostedBy: [],
232
+ isHostedBy: e["sosa:isHostedBy"] || [],
233
233
  hosts: []
234
234
  };
235
235
  }).filter((e) => (e.id ?? "").length > 0);
@@ -1,10 +1,10 @@
1
1
  import { pipe as s } from "effect";
2
2
  import * as n from "effect/Option";
3
- import { PREFIXES as F } from "./shared.js";
4
- function Q(e) {
3
+ import { PREFIXES as X } from "./shared.js";
4
+ function F(e) {
5
5
  return e.replace(/[^a-z0-9\s]/gi, "").replace(/\s+/g, "-").toLowerCase();
6
6
  }
7
- function H(e, r) {
7
+ function Q(e, r) {
8
8
  if (e)
9
9
  return {
10
10
  "@value": e,
@@ -12,17 +12,17 @@ function H(e, r) {
12
12
  };
13
13
  }
14
14
  function P(e, r, t) {
15
- const i = (e ?? "https://twin.bydata.de/api/hub/repo").trim(), o = i.endsWith("/") ? i : `${i}/`, c = r.trim().replace(/^\/+/, ""), a = t ? `${t}/${c}` : c;
15
+ const a = (e ?? "https://twin.bydata.de/api/hub/repo").trim(), o = a.endsWith("/") ? a : `${a}/`, c = r.trim().replace(/^\/+/, ""), i = t ? `${t}/${c}` : c;
16
16
  try {
17
- return new URL(a, o).toString();
17
+ return new URL(i, o).toString();
18
18
  } catch {
19
- return `${o}${a}`;
19
+ return `${o}${i}`;
20
20
  }
21
21
  }
22
22
  function Z(e) {
23
23
  return (e ?? []).map((t) => {
24
- var i, o;
25
- return { name: (i = t.name) == null ? void 0 : i.trim(), url: (o = t.url) == null ? void 0 : o.trim() };
24
+ var a, o;
25
+ return { name: (a = t.name) == null ? void 0 : a.trim(), url: (o = t.url) == null ? void 0 : o.trim() };
26
26
  }).filter((t) => !!t.name && t.name.length > 0).map((t) => ({
27
27
  "foaf:name": t.name,
28
28
  ...t.url && t.url.length > 0 ? { "foaf:homepage": t.url } : {}
@@ -48,21 +48,21 @@ function ee(e, r = "http://www.w3.org/2001/XMLSchema#string") {
48
48
  n.fromNullable(e),
49
49
  n.map((t) => t.trim()),
50
50
  n.filter((t) => t.length > 0),
51
- n.flatMap((t) => n.fromNullable(H(t, r)))
51
+ n.flatMap((t) => n.fromNullable(Q(t, r)))
52
52
  );
53
53
  }
54
- const q = (e) => (e ?? "").trim(), X = (e) => e.length > 0;
55
- function m(e) {
54
+ const q = (e) => (e ?? "").trim(), H = (e) => e.length > 0;
55
+ function f(e) {
56
56
  return s(
57
57
  n.fromNullable(e ?? void 0),
58
58
  n.map(q),
59
- n.filter(X)
59
+ n.filter(H)
60
60
  );
61
61
  }
62
62
  function ne(e) {
63
63
  return s(
64
64
  n.fromNullable(e),
65
- n.map((r) => r.map(q).filter(X)),
65
+ n.map((r) => r.map(q).filter(H)),
66
66
  n.filter((r) => r.length > 0),
67
67
  n.map((r) => [...r])
68
68
  );
@@ -77,7 +77,7 @@ function te(e) {
77
77
  }
78
78
  function $(e, r) {
79
79
  return s(
80
- m(e),
80
+ f(e),
81
81
  n.flatMap((t) => n.fromNullable(r(t)))
82
82
  );
83
83
  }
@@ -87,23 +87,23 @@ function re(e) {
87
87
  function C(e, r, t) {
88
88
  return s(
89
89
  n.fromNullable(e),
90
- n.map((i) => i.map(r).filter(N)),
91
- n.filter((i) => i.length > 0),
92
- n.map((i) => T(i, t)),
93
- n.filter((i) => i.length > 0),
94
- n.map((i) => [...i])
90
+ n.map((a) => a.map(r).filter(N)),
91
+ n.filter((a) => a.length > 0),
92
+ n.map((a) => T(a, t)),
93
+ n.filter((a) => a.length > 0),
94
+ n.map((a) => [...a])
95
95
  );
96
96
  }
97
97
  function A(e) {
98
98
  if (e == null || typeof e != "object")
99
99
  return e;
100
100
  if (Array.isArray(e))
101
- return e.map((i) => A(i)).filter((i) => i != null);
101
+ return e.map((a) => A(a)).filter((a) => a != null);
102
102
  const r = {};
103
- for (const [t, i] of Object.entries(e)) {
104
- if (i == null)
103
+ for (const [t, a] of Object.entries(e)) {
104
+ if (a == null)
105
105
  continue;
106
- const o = A(i);
106
+ const o = A(a);
107
107
  o != null && (r[t] = o);
108
108
  }
109
109
  return r;
@@ -111,31 +111,31 @@ function A(e) {
111
111
  function z(e) {
112
112
  return e.map(n.getOrUndefined).filter(N);
113
113
  }
114
- function f(e) {
114
+ function u(e) {
115
115
  const r = e ? [...e] : [];
116
116
  return r.length > 0 ? r : void 0;
117
117
  }
118
118
  function ie(e, r) {
119
- const t = e ?? {}, i = [];
119
+ const t = e ?? {}, a = [];
120
120
  let o = 1;
121
- for (const [c, a] of Object.entries(r)) {
121
+ for (const [c, i] of Object.entries(r)) {
122
122
  const p = s(
123
123
  n.fromNullable(t[c]),
124
- n.map((u) => u.trim()),
125
- n.filter((u) => u.length > 0),
126
- n.map((u) => ({
124
+ n.map((m) => m.trim()),
125
+ n.filter((m) => m.length > 0),
126
+ n.map((m) => ({
127
127
  "@type": "schema:Question",
128
- "schema:text": a,
129
- "schema:acceptedAnswer": u,
128
+ "schema:text": i,
129
+ "schema:acceptedAnswer": m,
130
130
  "schema:position": { "@value": String(o++), "@type": "http://www.w3.org/2001/XMLSchema#integer" }
131
131
  })),
132
132
  n.getOrUndefined
133
133
  );
134
- p && i.push(p);
134
+ p && a.push(p);
135
135
  }
136
- return i;
136
+ return a;
137
137
  }
138
- function D(e, r, t, i) {
138
+ function D(e, r, t, a) {
139
139
  const o = ie(e, t);
140
140
  return o.length === 0 ? n.none() : n.some({
141
141
  "@type": "schema:QAPage",
@@ -143,13 +143,13 @@ function D(e, r, t, i) {
143
143
  "dct:type": r,
144
144
  "schema:question": o,
145
145
  "p-plan:isPrecededBy": null,
146
- "schema:position": { "@value": String(i), "@type": "http://www.w3.org/2001/XMLSchema#integer" }
146
+ "schema:position": { "@value": String(a), "@type": "http://www.w3.org/2001/XMLSchema#integer" }
147
147
  });
148
148
  }
149
149
  function ae(e) {
150
150
  return (e ?? []).map((t) => {
151
- var i, o;
152
- return { name: (i = t.name) == null ? void 0 : i.trim(), description: (o = t.description) == null ? void 0 : o.trim() };
151
+ var a, o;
152
+ return { name: (a = t.name) == null ? void 0 : a.trim(), description: (o = t.description) == null ? void 0 : o.trim() };
153
153
  }).filter((t) => !!t.name && t.name.length > 0 && !!t.description && t.description.length > 0).map((t) => ({
154
154
  "@type": "prov:used",
155
155
  "dct:title": t.name,
@@ -157,18 +157,18 @@ function ae(e) {
157
157
  }));
158
158
  }
159
159
  function T(e, r) {
160
- return (e ?? []).map((i) => ({
160
+ return (e ?? []).map((a) => ({
161
161
  "@type": "rdfs:Resource",
162
162
  "dct:type": r,
163
- "schema:url": i.url,
163
+ "schema:url": a.url,
164
164
  "dct:title": s(
165
- n.fromNullable(i.name),
165
+ n.fromNullable(a.name),
166
166
  n.map((o) => o.trim()),
167
167
  n.filter((o) => o.length > 0),
168
168
  n.getOrElse(() => r)
169
169
  ),
170
170
  "dct:description": s(
171
- n.fromNullable(i.description),
171
+ n.fromNullable(a.description),
172
172
  n.map((o) => o.trim()),
173
173
  n.filter((o) => o.length > 0),
174
174
  n.getOrUndefined
@@ -176,16 +176,16 @@ function T(e, r) {
176
176
  }));
177
177
  }
178
178
  function oe(e, r) {
179
- return (e ?? []).map((i) => ({
179
+ return (e ?? []).map((a) => ({
180
180
  "@type": "schema:SoftwareApplication",
181
- "dct:identifier": P(r.baseRepoUrl, i.id, "resources/software"),
182
- "schema:featureList": f((i.functionalities ?? []).map((o) => o == null ? void 0 : o.trim()).filter((o) => !!o && o.length > 0))
181
+ "dct:identifier": P(r.baseRepoUrl, a.id, "resources/software"),
182
+ "schema:featureList": u((a.functionalities ?? []).map((o) => o == null ? void 0 : o.trim()).filter((o) => !!o && o.length > 0))
183
183
  }));
184
184
  }
185
185
  function se(e, r) {
186
- return (e ?? []).map((i) => ({
186
+ return (e ?? []).map((a) => ({
187
187
  "@type": "dcat:Dataset",
188
- "dct:identifier": P(r.baseRepoUrl, i.id, "datasets")
188
+ "dct:identifier": P(r.baseRepoUrl, a.id, "datasets")
189
189
  }));
190
190
  }
191
191
  function le(e, r, t) {
@@ -196,38 +196,39 @@ function le(e, r, t) {
196
196
  "dct:identifier": P(t.baseRepoUrl, o.id, "resources/hardware"),
197
197
  "dct:description": s(
198
198
  n.fromNullable(o.description),
199
- n.map((a) => a.trim()),
200
- n.filter((a) => a.length > 0),
201
- n.flatMap((a) => n.fromNullable(r(a))),
199
+ n.map((i) => i.trim()),
200
+ n.filter((i) => i.length > 0),
201
+ n.flatMap((i) => n.fromNullable(r(i))),
202
202
  n.getOrUndefined
203
203
  ),
204
204
  "ssn:deployedSystem": M(P(t.baseRepoUrl, o.id, "resources/hardware")),
205
- "ssn:forProperty": f((o.forProperty ?? []).map((a) => a == null ? void 0 : a.trim()).filter((a) => !!a && a.length > 0)),
206
- "sosa:hasLocation": f((o.locations ?? []).map((a) => ({
205
+ "ssn:forProperty": u((o.forProperty ?? []).map((i) => i == null ? void 0 : i.trim()).filter((i) => !!i && i.length > 0)),
206
+ "sosa:hasLocation": u((o.locations ?? []).map((i) => ({
207
207
  "@type": "dct:Location",
208
- "geo:lat": a.lat,
209
- "geo:long": a.lng
208
+ "geo:lat": i.lat,
209
+ "geo:long": i.lng
210
210
  }))),
211
- "foaf:depiction": f((o.depictions ?? []).map((a) => M(a)).filter(N)),
211
+ "foaf:depiction": u((o.depictions ?? []).map((i) => M(i)).filter(N)),
212
+ "sosa:isHostedBy": u((o.isHostedBy ?? []).map((i) => i == null ? void 0 : i.trim()).filter((i) => !!i && i.length > 0)),
212
213
  // Corresponds to functionalities of hardware;
213
214
  // not to be confused with functionalities of software (schema:featureList)
214
- "ssn-system:hasSystemCapability": f((o.functionalities ?? []).map((a) => a == null ? void 0 : a.trim()).filter((a) => !!a && a.length > 0)),
215
- "dct:references": f(T((c = o.references) == null ? void 0 : c.map((a) => ({
216
- name: a.name ?? "",
217
- url: a.url ?? "",
218
- description: a.description
219
- })).filter((a) => a.url.length > 0 && ((a == null ? void 0 : a.name) || "").length > 0), "documentation"))
215
+ "ssn-system:hasSystemCapability": u((o.functionalities ?? []).map((i) => i == null ? void 0 : i.trim()).filter((i) => !!i && i.length > 0)),
216
+ "dct:references": u(T((c = o.references) == null ? void 0 : c.map((i) => ({
217
+ name: i.name ?? "",
218
+ url: i.url ?? "",
219
+ description: i.description
220
+ })).filter((i) => i.url.length > 0 && ((i == null ? void 0 : i.name) || "").length > 0), "documentation"))
220
221
  };
221
222
  });
222
223
  }
223
224
  function U(e) {
224
225
  var w, y, O;
225
- const { prefixKey: r, activityLabel: t, input: i, toLanged: o, context: c } = e, a = `${r}/Grundlegende Informationen`, p = `${r}/Software`, u = `${r}/Datensätze`, x = `${r}/Hardware`, d = i[a], j = d == null ? void 0 : d.description, I = s(
226
+ const { prefixKey: r, activityLabel: t, input: a, toLanged: o, context: c } = e, i = `${r}/Grundlegende Informationen`, p = `${r}/Software`, m = `${r}/Datensätze`, x = `${r}/Hardware`, d = a[i], j = d == null ? void 0 : d.description, I = s(
226
227
  n.fromNullable(j),
227
228
  n.map((h) => h.trim()),
228
229
  n.filter((h) => h.length > 0),
229
230
  n.getOrUndefined
230
- ), L = d == null ? void 0 : d.methods, W = d == null ? void 0 : d.links, R = (w = i[p]) == null ? void 0 : w.selected, v = (y = i[u]) == null ? void 0 : y.selected, S = (O = i[x]) == null ? void 0 : O.selected, b = [
231
+ ), L = d == null ? void 0 : d.methods, W = d == null ? void 0 : d.links, R = (w = a[p]) == null ? void 0 : w.selected, v = (y = a[m]) == null ? void 0 : y.selected, S = (O = a[x]) == null ? void 0 : O.selected, b = [
231
232
  ...oe(R, c),
232
233
  ...se(v, c),
233
234
  ...le(S, o, c)
@@ -237,19 +238,19 @@ function U(e) {
237
238
  "p-plan:Activity": t,
238
239
  "dct:description": o(I ?? "__EMPTY__"),
239
240
  "p-plan:isPrecededBy": null,
240
- "prov:used": f(ae(L)),
241
- "dct:references": f(T(W, "documentation")),
241
+ "prov:used": u(ae(L)),
242
+ "dct:references": u(T(W, "documentation")),
242
243
  "p-plan:hasInputVar": b.length > 0 ? b : void 0
243
244
  };
244
245
  return n.some(k);
245
246
  }
246
247
  function ue(e, r = {}) {
247
- var v, S, b, k, w, y, O, h, _, E, K, B, G, V;
248
+ var v, S, b, k, w, y, O, h, _, E, B, K, G, V;
248
249
  const t = {
249
250
  "@type": ["schema:Project", "https://piveau.eu/ns/voc#CustomResource"]
250
- }, i = (r == null ? void 0 : r.language) ?? "de", o = s(
251
- m((v = e["Grundlegende Informationen/Name"]) == null ? void 0 : v.projectName),
252
- n.map((l) => Q(l)),
251
+ }, a = (r == null ? void 0 : r.language) ?? "de", o = s(
252
+ f((v = e["Grundlegende Informationen/Name"]) == null ? void 0 : v.projectName),
253
+ n.map((l) => F(l)),
253
254
  n.filter((l) => l.length > 0),
254
255
  n.getOrUndefined
255
256
  ), c = s(
@@ -257,8 +258,8 @@ function ue(e, r = {}) {
257
258
  n.map((l) => l.trim()),
258
259
  n.filter((l) => l.length > 0),
259
260
  n.getOrElse(() => o ?? "__TODO__")
260
- ), a = J(i);
261
- t["dct:title"] = s($((S = e["Grundlegende Informationen/Name"]) == null ? void 0 : S.projectName, a), n.getOrThrow), t["dct:description"] = s($((b = e["Grundlegende Informationen/Beschreibung"]) == null ? void 0 : b.projectDescription, a), n.getOrThrow), t["dct:identifier"] = [c], t["dcat:theme"] = s(te((k = e["Auffindbarkeit/Kategorien"]) == null ? void 0 : k.categories), n.getOrThrow), t["schema:application"] = (w = e["Auffindbarkeit/Anwendungsbereiche"]) == null ? void 0 : w.applications, t["schema:status"] = s(m((y = e["Grundlegende Informationen/Projektstatus"]) == null ? void 0 : y.projectName), n.getOrThrow), t["schema:amount"] = s(
261
+ ), i = J(a);
262
+ t["dct:title"] = s($((S = e["Grundlegende Informationen/Name"]) == null ? void 0 : S.projectName, i), n.getOrThrow), t["dct:description"] = s($((b = e["Grundlegende Informationen/Beschreibung"]) == null ? void 0 : b.projectDescription, i), n.getOrThrow), t["dct:identifier"] = [c], t["dcat:theme"] = s(te((k = e["Auffindbarkeit/Kategorien"]) == null ? void 0 : k.categories), n.getOrThrow), t["schema:application"] = (w = e["Auffindbarkeit/Anwendungsbereiche"]) == null ? void 0 : w.applications, t["schema:status"] = s(f((y = e["Grundlegende Informationen/Projektstatus"]) == null ? void 0 : y.projectName), n.getOrThrow), t["schema:amount"] = s(
262
263
  ee((O = e["Optionale Daten"]) == null ? void 0 : O.budget, "http://www.w3.org/2001/XMLSchema#integer"),
263
264
  n.map((l) => {
264
265
  var g;
@@ -266,29 +267,29 @@ function ue(e, r = {}) {
266
267
  "@type": "schema:MonetaryAmount",
267
268
  "schema:currency": "EUR",
268
269
  "schema:value": l,
269
- "schema:description": s(m((g = e["Optionale Daten"]) == null ? void 0 : g.budgetDescription), n.getOrUndefined)
270
+ "schema:description": s(f((g = e["Optionale Daten"]) == null ? void 0 : g.budgetDescription), n.getOrUndefined)
270
271
  };
271
272
  }),
272
273
  n.getOrUndefined
273
- ), t["schema:skills"] = s(ne((h = e["Optionale Daten"]) == null ? void 0 : h.requiredExpertise), n.getOrUndefined), t["schema:startDate"] = s(m((_ = e["Optionale Daten"]) == null ? void 0 : _.startDate), n.getOrUndefined), t["schema:endDate"] = s(m((E = e["Optionale Daten"]) == null ? void 0 : E.endDate), n.getOrUndefined);
274
+ ), t["schema:skills"] = s(ne((h = e["Optionale Daten"]) == null ? void 0 : h.requiredExpertise), n.getOrUndefined), t["schema:startDate"] = s(f((_ = e["Optionale Daten"]) == null ? void 0 : _.startDate), n.getOrUndefined), t["schema:endDate"] = s(f((E = e["Optionale Daten"]) == null ? void 0 : E.endDate), n.getOrUndefined);
274
275
  const p = [
275
276
  C(
276
- (K = e["Optionale Daten"]) == null ? void 0 : K.links,
277
+ (B = e["Optionale Daten"]) == null ? void 0 : B.links,
277
278
  (l) => {
278
- const g = s(m(l.url), n.getOrUndefined);
279
+ const g = s(f(l.url), n.getOrUndefined);
279
280
  if (g)
280
281
  return {
281
282
  url: g,
282
- name: s(m(l.name), n.getOrUndefined),
283
- description: s(m(l.description), n.getOrUndefined)
283
+ name: s(f(l.name), n.getOrUndefined),
284
+ description: s(f(l.description), n.getOrUndefined)
284
285
  };
285
286
  },
286
287
  "documentation"
287
288
  ),
288
289
  C(
289
- (B = e["Optionale Daten"]) == null ? void 0 : B.references,
290
+ (K = e["Optionale Daten"]) == null ? void 0 : K.references,
290
291
  (l) => {
291
- const g = s(m(l.homepage), n.getOrUndefined);
292
+ const g = s(f(l.homepage), n.getOrUndefined);
292
293
  if (g)
293
294
  return {
294
295
  url: g,
@@ -298,8 +299,8 @@ function ue(e, r = {}) {
298
299
  },
299
300
  "image"
300
301
  )
301
- ], u = re(p);
302
- t["dct:references"] = u.length > 0 ? u : void 0, t["dcat:contactPoint"] = s(
302
+ ], m = re(p);
303
+ t["dct:references"] = m.length > 0 ? m : void 0, t["dcat:contactPoint"] = s(
303
304
  n.fromNullable((G = e["Grundlegende Informationen/Organisation"]) == null ? void 0 : G.contact),
304
305
  n.map((l) => ({
305
306
  "@type": "vcard:Kind",
@@ -341,16 +342,16 @@ function ue(e, r = {}) {
341
342
  D(e["Projektphasen (optional)/Umsetzen"], "Umsetzen", j, 3),
342
343
  D(e["Projektphasen (optional)/Weiterdenken"], "Weiterdenken", I, 4)
343
344
  ]);
344
- t["schema:hasPart"] = f(L);
345
+ t["schema:hasPart"] = u(L);
345
346
  const W = z([
346
- U({ prefixKey: "1. Datenerfassung", activityLabel: "Datenerfassung", input: e, toLanged: a, context: r }),
347
- U({ prefixKey: "2. Datenverarbeitung", activityLabel: "Datenverarbeitung", input: e, toLanged: a, context: r }),
348
- U({ prefixKey: "3. Datensimulation", activityLabel: "Datensimulation", input: e, toLanged: a, context: r }),
349
- U({ prefixKey: "4. Datenvisualisierung", activityLabel: "Datenvisualisierung", input: e, toLanged: a, context: r })
347
+ U({ prefixKey: "1. Datenerfassung", activityLabel: "Datenerfassung", input: e, toLanged: i, context: r }),
348
+ U({ prefixKey: "2. Datenverarbeitung", activityLabel: "Datenverarbeitung", input: e, toLanged: i, context: r }),
349
+ U({ prefixKey: "3. Datensimulation", activityLabel: "Datensimulation", input: e, toLanged: i, context: r }),
350
+ U({ prefixKey: "4. Datenvisualisierung", activityLabel: "Datenvisualisierung", input: e, toLanged: i, context: r })
350
351
  ]);
351
- return t["p-plan:hasStep"] = f(W), {
352
+ return t["p-plan:hasStep"] = u(W), {
352
353
  "@context": {
353
- ...F
354
+ ...X
354
355
  },
355
356
  "@graph": A(t)
356
357
  };
@@ -358,8 +359,8 @@ function ue(e, r = {}) {
358
359
  export {
359
360
  ue as encodeProject,
360
361
  N as isNonNullable,
361
- Q as slugify,
362
+ F as slugify,
362
363
  Y as toLangedValue,
363
364
  M as toNodeReference,
364
- H as toTypedValue
365
+ Q as toTypedValue
365
366
  };
@@ -1,7 +1,7 @@
1
1
  import { schemaDateField as n, takeFirst as t, schemaFoafAgent as p, schemaContactPoint as l, schemaIriString as i, schemaLanguageContainer as a, schemaTypedLiteral as s } from "@piveau/jsonld";
2
- import { asArray as d } from "@piveau/sdk-vue";
2
+ import { asArray as y } from "@piveau/sdk-vue";
3
3
  import * as e from "zod/v4";
4
- function y(r) {
4
+ function d(r) {
5
5
  return typeof r == "string" ? r : typeof r == "object" && r !== null && "@id" in r ? t(r["@id"]) : r;
6
6
  }
7
7
  const o = e.object({
@@ -15,11 +15,11 @@ const o = e.object({
15
15
  "dct:title": e.preprocess(t, e.string())
16
16
  }), c = e.object({
17
17
  "@type": e.preprocess(t, e.string().optional())
18
- }), h = c.extend({
18
+ }), g = c.extend({
19
19
  "@type": e.literal("schema:SoftwareApplication"),
20
20
  "dct:identifier": e.preprocess(t, e.string().optional()),
21
21
  "schema:featureList": e.array(e.string()).optional()
22
- }), g = c.extend({
22
+ }), h = c.extend({
23
23
  "@type": e.literal("dcat:Dataset"),
24
24
  "dct:identifier": e.preprocess(t, e.string().optional())
25
25
  }), f = e.object({
@@ -35,6 +35,7 @@ const o = e.object({
35
35
  */
36
36
  "ssn:forProperty": e.array(e.string()).optional(),
37
37
  "sosa:hasLocation": e.array(f).optional(),
38
+ "sosa:isHostedBy": e.array(e.string()).optional(),
38
39
  "foaf:depiction": e.array(i).optional(),
39
40
  "dct:references": e.array(o).optional(),
40
41
  /**
@@ -43,8 +44,8 @@ const o = e.object({
43
44
  */
44
45
  "ssn-system:hasSystemCapability": e.array(e.string()).optional()
45
46
  }), u = e.discriminatedUnion("@type", [
46
- h,
47
47
  g,
48
+ h,
48
49
  j
49
50
  ]), P = e.object({
50
51
  "@type": e.string(),
@@ -85,7 +86,7 @@ const o = e.object({
85
86
  // Themes/categories as simple IRI nodes
86
87
  "dcat:theme": e.array(i),
87
88
  // Applications and status as literals
88
- "schema:application": e.preprocess((r) => d(r).map(y), e.array(e.string())),
89
+ "schema:application": e.preprocess((r) => y(r).map(d), e.array(e.string())),
89
90
  "schema:status": e.preprocess(t, e.string()),
90
91
  // Optional dates (date/dateTime)
91
92
  "schema:startDate": n,
@@ -105,7 +106,7 @@ const o = e.object({
105
106
  "prov:generatedAtTime": n
106
107
  });
107
108
  export {
108
- g as schemaDatasetLink,
109
+ h as schemaDatasetLink,
109
110
  j as schemaHardwareInstance,
110
111
  f as schemaHardwareLocation,
111
112
  w as schemaProject,
@@ -117,5 +118,5 @@ export {
117
118
  P as schemaProjectQuestionAnswer,
118
119
  o as schemaProjectResource,
119
120
  A as schemaProjectTechnicalStep,
120
- h as schemaSoftwareLink
121
+ g as schemaSoftwareLink
121
122
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@piveau/dpi",
3
3
  "type": "module",
4
- "version": "0.2.0-alpha.22",
4
+ "version": "0.2.0-alpha.23",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "*.css",