@unhead/schema-org 2.1.9 → 3.0.0-beta.10
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.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +2 -44
- package/dist/react.d.mts +3 -3
- package/dist/react.d.ts +3 -3
- package/dist/react.mjs +3 -3
- package/dist/shared/schema-org.BS2Q1uTx.d.mts +11 -0
- package/dist/shared/{schema-org.UT1u1UYq.d.mts → schema-org.C1OXVKVP.d.ts} +142 -48
- package/dist/shared/schema-org.C7IeLKiX.d.ts +11 -0
- package/dist/shared/{schema-org.CFcsqFfN.d.mts → schema-org.CX_95Tmq.d.mts} +2 -22
- package/dist/shared/{schema-org.CFcsqFfN.d.ts → schema-org.CX_95Tmq.d.ts} +2 -22
- package/dist/shared/{schema-org.CAKsqzbX.d.ts → schema-org.Cxijls86.d.mts} +142 -48
- package/dist/shared/schema-org.DvWGLdBv.mjs +1932 -0
- package/dist/solid-js.d.mts +3 -3
- package/dist/solid-js.d.ts +3 -3
- package/dist/solid-js.mjs +3 -3
- package/dist/svelte.d.mts +3 -3
- package/dist/svelte.d.ts +3 -3
- package/dist/svelte.mjs +3 -3
- package/dist/vue.d.mts +38 -38
- package/dist/vue.d.ts +38 -38
- package/dist/vue.mjs +47 -43
- package/package.json +11 -11
- package/dist/chunks/index.mjs +0 -23
- package/dist/chunks/index10.mjs +0 -63
- package/dist/chunks/index11.mjs +0 -35
- package/dist/chunks/index12.mjs +0 -48
- package/dist/chunks/index13.mjs +0 -36
- package/dist/chunks/index14.mjs +0 -25
- package/dist/chunks/index15.mjs +0 -37
- package/dist/chunks/index16.mjs +0 -27
- package/dist/chunks/index17.mjs +0 -34
- package/dist/chunks/index18.mjs +0 -32
- package/dist/chunks/index19.mjs +0 -31
- package/dist/chunks/index2.mjs +0 -12
- package/dist/chunks/index20.mjs +0 -31
- package/dist/chunks/index21.mjs +0 -30
- package/dist/chunks/index22.mjs +0 -30
- package/dist/chunks/index23.mjs +0 -82
- package/dist/chunks/index24.mjs +0 -14
- package/dist/chunks/index25.mjs +0 -33
- package/dist/chunks/index26.mjs +0 -31
- package/dist/chunks/index27.mjs +0 -29
- package/dist/chunks/index28.mjs +0 -12
- package/dist/chunks/index29.mjs +0 -46
- package/dist/chunks/index3.mjs +0 -317
- package/dist/chunks/index30.mjs +0 -53
- package/dist/chunks/index31.mjs +0 -41
- package/dist/chunks/index32.mjs +0 -26
- package/dist/chunks/index33.mjs +0 -47
- package/dist/chunks/index34.mjs +0 -29
- package/dist/chunks/index35.mjs +0 -34
- package/dist/chunks/index36.mjs +0 -33
- package/dist/chunks/index37.mjs +0 -34
- package/dist/chunks/index38.mjs +0 -51
- package/dist/chunks/index39.mjs +0 -17
- package/dist/chunks/index4.mjs +0 -54
- package/dist/chunks/index40.mjs +0 -29
- package/dist/chunks/index5.mjs +0 -31
- package/dist/chunks/index6.mjs +0 -29
- package/dist/chunks/index7.mjs +0 -35
- package/dist/chunks/index8.mjs +0 -18
- package/dist/chunks/index9.mjs +0 -20
- package/dist/shared/schema-org.B9Q-o8S0.mjs +0 -877
- package/dist/shared/schema-org.BR4WcSqZ.d.ts +0 -21
- package/dist/shared/schema-org.CrNDsWck.mjs +0 -19
- package/dist/shared/schema-org.oFHFm6my.d.mts +0 -21
- package/dist/shared/schema-org.zHUqdMMo.mjs +0 -27
package/dist/chunks/index37.mjs
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { d as defineSchemaOrgResolver, e as resolveRelation, a8 as resolvableDateToIso } from '../shared/schema-org.B9Q-o8S0.mjs';
|
|
2
|
-
import { aggregateRatingResolver } from './index2.mjs';
|
|
3
|
-
import { p as personResolver, o as organizationResolver } from './index3.mjs';
|
|
4
|
-
import { videoResolver } from './index38.mjs';
|
|
5
|
-
import 'unhead/plugins';
|
|
6
|
-
import 'unhead/utils';
|
|
7
|
-
import 'ufo';
|
|
8
|
-
import './index16.mjs';
|
|
9
|
-
import './index28.mjs';
|
|
10
|
-
import './index40.mjs';
|
|
11
|
-
import './index39.mjs';
|
|
12
|
-
|
|
13
|
-
const tvSeriesResolver = defineSchemaOrgResolver({
|
|
14
|
-
defaults: {
|
|
15
|
-
"@type": "TVSeries"
|
|
16
|
-
},
|
|
17
|
-
resolve(node, ctx) {
|
|
18
|
-
node.actor = resolveRelation(node.actor, ctx, personResolver);
|
|
19
|
-
node.director = resolveRelation(node.director, ctx, personResolver);
|
|
20
|
-
node.creator = resolveRelation(node.creator, ctx, personResolver);
|
|
21
|
-
node.productionCompany = resolveRelation(node.productionCompany, ctx, organizationResolver);
|
|
22
|
-
node.aggregateRating = resolveRelation(node.aggregateRating, ctx, aggregateRatingResolver);
|
|
23
|
-
node.trailer = resolveRelation(node.trailer, ctx, videoResolver);
|
|
24
|
-
if (node.datePublished)
|
|
25
|
-
node.datePublished = resolvableDateToIso(node.datePublished);
|
|
26
|
-
if (node.startDate)
|
|
27
|
-
node.startDate = resolvableDateToIso(node.startDate);
|
|
28
|
-
if (node.endDate)
|
|
29
|
-
node.endDate = resolvableDateToIso(node.endDate);
|
|
30
|
-
return node;
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
export { tvSeriesResolver };
|
package/dist/chunks/index38.mjs
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { d as defineSchemaOrgResolver, ac as asArray, a6 as setIfEmpty, a8 as resolvableDateToIso, ad as resolveWithBase, e as resolveRelation, a5 as imageResolver } from '../shared/schema-org.B9Q-o8S0.mjs';
|
|
2
|
-
import 'unhead/plugins';
|
|
3
|
-
import 'unhead/utils';
|
|
4
|
-
import 'ufo';
|
|
5
|
-
|
|
6
|
-
const videoResolver = defineSchemaOrgResolver({
|
|
7
|
-
cast(input) {
|
|
8
|
-
if (typeof input === "string") {
|
|
9
|
-
input = {
|
|
10
|
-
url: input
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
return input;
|
|
14
|
-
},
|
|
15
|
-
alias: "video",
|
|
16
|
-
defaults: {
|
|
17
|
-
"@type": "VideoObject"
|
|
18
|
-
},
|
|
19
|
-
inheritMeta: [
|
|
20
|
-
{ meta: "title", key: "name" },
|
|
21
|
-
"description",
|
|
22
|
-
"image",
|
|
23
|
-
"inLanguage",
|
|
24
|
-
{ meta: "datePublished", key: "uploadDate" }
|
|
25
|
-
],
|
|
26
|
-
idPrefix: "host",
|
|
27
|
-
resolve(video, ctx) {
|
|
28
|
-
if (video.uploadDate)
|
|
29
|
-
video.uploadDate = resolvableDateToIso(video.uploadDate);
|
|
30
|
-
video.url = resolveWithBase(ctx.meta.host, video.url);
|
|
31
|
-
if (video.caption && !video.description)
|
|
32
|
-
video.description = video.caption;
|
|
33
|
-
if (!video.description)
|
|
34
|
-
video.description = "No description";
|
|
35
|
-
if (video.thumbnailUrl && (typeof video.thumbnailUrl === "string" || Array.isArray(video.thumbnailUrl))) {
|
|
36
|
-
const images = asArray(video.thumbnailUrl).map((image) => resolveWithBase(ctx.meta.host, image));
|
|
37
|
-
video.thumbnailUrl = images.length > 1 ? images : images[0];
|
|
38
|
-
}
|
|
39
|
-
if (video.thumbnail)
|
|
40
|
-
video.thumbnail = resolveRelation(video.thumbnailUrl, ctx, imageResolver);
|
|
41
|
-
return video;
|
|
42
|
-
},
|
|
43
|
-
resolveRootNode(video, { find }) {
|
|
44
|
-
if (video.image && !video.thumbnail) {
|
|
45
|
-
const firstImage = asArray(video.image)[0];
|
|
46
|
-
setIfEmpty(video, "thumbnail", find(firstImage["@id"])?.url);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
export { videoResolver };
|
package/dist/chunks/index39.mjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { d as defineSchemaOrgResolver } from '../shared/schema-org.B9Q-o8S0.mjs';
|
|
2
|
-
import 'unhead/plugins';
|
|
3
|
-
import 'unhead/utils';
|
|
4
|
-
import 'ufo';
|
|
5
|
-
|
|
6
|
-
const readActionResolver = defineSchemaOrgResolver({
|
|
7
|
-
defaults: {
|
|
8
|
-
"@type": "ReadAction"
|
|
9
|
-
},
|
|
10
|
-
resolve(node, ctx) {
|
|
11
|
-
if (!node.target.includes(ctx.meta.url))
|
|
12
|
-
node.target.unshift(ctx.meta.url);
|
|
13
|
-
return node;
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export { readActionResolver };
|
package/dist/chunks/index4.mjs
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { withBase } from 'ufo';
|
|
2
|
-
import { d as defineSchemaOrgResolver, a9 as IdentityId, a6 as setIfEmpty, a7 as idReference, ab as resolvableDateToDate, e as resolveRelation } from '../shared/schema-org.B9Q-o8S0.mjs';
|
|
3
|
-
import 'unhead/plugins';
|
|
4
|
-
import 'unhead/utils';
|
|
5
|
-
|
|
6
|
-
const bookEditionResolver = defineSchemaOrgResolver({
|
|
7
|
-
defaults: {
|
|
8
|
-
"@type": "Book"
|
|
9
|
-
},
|
|
10
|
-
inheritMeta: [
|
|
11
|
-
"inLanguage"
|
|
12
|
-
],
|
|
13
|
-
resolve(node, ctx) {
|
|
14
|
-
if (node.bookFormat)
|
|
15
|
-
node.bookFormat = withBase(node.bookFormat, "https://schema.org/");
|
|
16
|
-
if (node.datePublished)
|
|
17
|
-
node.datePublished = resolvableDateToDate(node.datePublished);
|
|
18
|
-
node.author = resolveRelation(node.author, ctx);
|
|
19
|
-
return node;
|
|
20
|
-
},
|
|
21
|
-
resolveRootNode(node, { find }) {
|
|
22
|
-
const identity = find(IdentityId);
|
|
23
|
-
if (identity)
|
|
24
|
-
setIfEmpty(node, "provider", idReference(identity));
|
|
25
|
-
return node;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
const PrimaryBookId = "#book";
|
|
29
|
-
const bookResolver = defineSchemaOrgResolver({
|
|
30
|
-
defaults: {
|
|
31
|
-
"@type": "Book"
|
|
32
|
-
},
|
|
33
|
-
inheritMeta: [
|
|
34
|
-
"description",
|
|
35
|
-
"url",
|
|
36
|
-
{ meta: "title", key: "name" }
|
|
37
|
-
],
|
|
38
|
-
idPrefix: ["url", PrimaryBookId],
|
|
39
|
-
resolve(node, ctx) {
|
|
40
|
-
node.workExample = resolveRelation(node.workExample, ctx, bookEditionResolver);
|
|
41
|
-
node.author = resolveRelation(node.author, ctx);
|
|
42
|
-
if (node.url)
|
|
43
|
-
withBase(node.url, ctx.meta.host);
|
|
44
|
-
return node;
|
|
45
|
-
},
|
|
46
|
-
resolveRootNode(node, { find }) {
|
|
47
|
-
const identity = find(IdentityId);
|
|
48
|
-
if (identity)
|
|
49
|
-
setIfEmpty(node, "author", idReference(identity));
|
|
50
|
-
return node;
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
export { PrimaryBookId, bookEditionResolver, bookResolver };
|
package/dist/chunks/index40.mjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { d as defineSchemaOrgResolver, ad as resolveWithBase } from '../shared/schema-org.B9Q-o8S0.mjs';
|
|
2
|
-
import 'unhead/plugins';
|
|
3
|
-
import 'unhead/utils';
|
|
4
|
-
import 'ufo';
|
|
5
|
-
|
|
6
|
-
const searchActionResolver = defineSchemaOrgResolver({
|
|
7
|
-
defaults: {
|
|
8
|
-
"@type": "SearchAction",
|
|
9
|
-
"target": {
|
|
10
|
-
"@type": "EntryPoint"
|
|
11
|
-
},
|
|
12
|
-
"query-input": {
|
|
13
|
-
"@type": "PropertyValueSpecification",
|
|
14
|
-
"valueRequired": true,
|
|
15
|
-
"valueName": "search_term_string"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
resolve(node, ctx) {
|
|
19
|
-
if (typeof node.target === "string") {
|
|
20
|
-
node.target = {
|
|
21
|
-
"@type": "EntryPoint",
|
|
22
|
-
"urlTemplate": resolveWithBase(ctx.meta.host, node.target)
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
return node;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export { searchActionResolver };
|
package/dist/chunks/index5.mjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { d as defineSchemaOrgResolver, a6 as setIfEmpty, a7 as idReference, e as resolveRelation, a8 as resolvableDateToIso } from '../shared/schema-org.B9Q-o8S0.mjs';
|
|
2
|
-
import { P as PrimaryArticleId, p as personResolver } from './index3.mjs';
|
|
3
|
-
import 'unhead/plugins';
|
|
4
|
-
import 'unhead/utils';
|
|
5
|
-
import 'ufo';
|
|
6
|
-
import './index16.mjs';
|
|
7
|
-
import './index28.mjs';
|
|
8
|
-
import './index40.mjs';
|
|
9
|
-
import './index39.mjs';
|
|
10
|
-
|
|
11
|
-
const commentResolver = defineSchemaOrgResolver({
|
|
12
|
-
defaults: {
|
|
13
|
-
"@type": "Comment"
|
|
14
|
-
},
|
|
15
|
-
idPrefix: "url",
|
|
16
|
-
resolve(node, ctx) {
|
|
17
|
-
node.author = resolveRelation(node.author, ctx, personResolver, {
|
|
18
|
-
root: true
|
|
19
|
-
});
|
|
20
|
-
node.dateCreated = resolvableDateToIso(node.dateCreated);
|
|
21
|
-
node.dateModified = resolvableDateToIso(node.dateModified);
|
|
22
|
-
return node;
|
|
23
|
-
},
|
|
24
|
-
resolveRootNode(node, { find }) {
|
|
25
|
-
const article = find(PrimaryArticleId);
|
|
26
|
-
if (article)
|
|
27
|
-
setIfEmpty(node, "about", idReference(article));
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
export { commentResolver };
|
package/dist/chunks/index6.mjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { d as defineSchemaOrgResolver, a9 as IdentityId, a6 as setIfEmpty, a7 as idReference, e as resolveRelation } from '../shared/schema-org.B9Q-o8S0.mjs';
|
|
2
|
-
import { o as organizationResolver } from './index3.mjs';
|
|
3
|
-
import 'unhead/plugins';
|
|
4
|
-
import 'unhead/utils';
|
|
5
|
-
import 'ufo';
|
|
6
|
-
import './index16.mjs';
|
|
7
|
-
import './index28.mjs';
|
|
8
|
-
import './index40.mjs';
|
|
9
|
-
import './index39.mjs';
|
|
10
|
-
|
|
11
|
-
const courseResolver = defineSchemaOrgResolver({
|
|
12
|
-
defaults: {
|
|
13
|
-
"@type": "Course"
|
|
14
|
-
},
|
|
15
|
-
resolve(node, ctx) {
|
|
16
|
-
node.provider = resolveRelation(node.provider, ctx, organizationResolver, {
|
|
17
|
-
root: true
|
|
18
|
-
});
|
|
19
|
-
return node;
|
|
20
|
-
},
|
|
21
|
-
resolveRootNode(node, { find }) {
|
|
22
|
-
const identity = find(IdentityId);
|
|
23
|
-
if (identity)
|
|
24
|
-
setIfEmpty(node, "provider", idReference(identity));
|
|
25
|
-
return node;
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export { courseResolver };
|
package/dist/chunks/index7.mjs
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { d as defineSchemaOrgResolver, aa as resolveDefaultType, e as resolveRelation, a8 as resolvableDateToIso } from '../shared/schema-org.B9Q-o8S0.mjs';
|
|
2
|
-
import { p as personResolver } from './index3.mjs';
|
|
3
|
-
import 'unhead/plugins';
|
|
4
|
-
import 'unhead/utils';
|
|
5
|
-
import 'ufo';
|
|
6
|
-
import './index16.mjs';
|
|
7
|
-
import './index28.mjs';
|
|
8
|
-
import './index40.mjs';
|
|
9
|
-
import './index39.mjs';
|
|
10
|
-
|
|
11
|
-
const PrimaryDatasetId = "#dataset";
|
|
12
|
-
const datasetResolver = defineSchemaOrgResolver({
|
|
13
|
-
defaults: {
|
|
14
|
-
"@type": "Dataset"
|
|
15
|
-
},
|
|
16
|
-
inheritMeta: [
|
|
17
|
-
"description",
|
|
18
|
-
"url",
|
|
19
|
-
"dateModified",
|
|
20
|
-
"datePublished",
|
|
21
|
-
{ meta: "title", key: "name" }
|
|
22
|
-
],
|
|
23
|
-
idPrefix: ["url", PrimaryDatasetId],
|
|
24
|
-
resolve(node, ctx) {
|
|
25
|
-
resolveDefaultType(node, "Dataset");
|
|
26
|
-
node.creator = resolveRelation(node.creator, ctx, personResolver, {
|
|
27
|
-
root: true
|
|
28
|
-
});
|
|
29
|
-
node.dateModified = resolvableDateToIso(node.dateModified);
|
|
30
|
-
node.datePublished = resolvableDateToIso(node.datePublished);
|
|
31
|
-
return node;
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
export { PrimaryDatasetId, datasetResolver };
|
package/dist/chunks/index8.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { addressResolver } from './index28.mjs';
|
|
2
|
-
import { d as defineSchemaOrgResolver, e as resolveRelation } from '../shared/schema-org.B9Q-o8S0.mjs';
|
|
3
|
-
import 'unhead/plugins';
|
|
4
|
-
import 'unhead/utils';
|
|
5
|
-
import 'ufo';
|
|
6
|
-
|
|
7
|
-
const placeResolver = defineSchemaOrgResolver({
|
|
8
|
-
defaults: {
|
|
9
|
-
"@type": "Place"
|
|
10
|
-
},
|
|
11
|
-
resolve(node, ctx) {
|
|
12
|
-
if (typeof node.address !== "string")
|
|
13
|
-
node.address = resolveRelation(node.address, ctx, addressResolver);
|
|
14
|
-
return node;
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export { placeResolver };
|
package/dist/chunks/index9.mjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { d as defineSchemaOrgResolver } from '../shared/schema-org.B9Q-o8S0.mjs';
|
|
2
|
-
import 'unhead/plugins';
|
|
3
|
-
import 'unhead/utils';
|
|
4
|
-
import 'ufo';
|
|
5
|
-
|
|
6
|
-
const virtualLocationResolver = defineSchemaOrgResolver({
|
|
7
|
-
cast(node) {
|
|
8
|
-
if (typeof node === "string") {
|
|
9
|
-
return {
|
|
10
|
-
url: node
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
return node;
|
|
14
|
-
},
|
|
15
|
-
defaults: {
|
|
16
|
-
"@type": "VirtualLocation"
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
export { virtualLocationResolver };
|