@unhead/schema-org 1.4.1 → 1.5.0

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
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- const SchemaOrgUnheadPlugin = require('./shared/schema-org.96234618.cjs');
3
+ const plugin = require('./shared/schema-org.723727e4.cjs');
4
4
  const unhead = require('unhead');
5
- require('ufo');
6
5
  require('@unhead/shared');
6
+ require('ufo');
7
7
 
8
8
  function provideResolver(input, resolver) {
9
9
  if (!input)
@@ -125,60 +125,61 @@ function useSchemaOrg(input) {
125
125
  });
126
126
  }
127
127
 
128
- exports.HowToId = SchemaOrgUnheadPlugin.HowToId;
129
- exports.PrimaryArticleId = SchemaOrgUnheadPlugin.PrimaryArticleId;
130
- exports.PrimaryBookId = SchemaOrgUnheadPlugin.PrimaryBookId;
131
- exports.PrimaryBreadcrumbId = SchemaOrgUnheadPlugin.PrimaryBreadcrumbId;
132
- exports.PrimaryEventId = SchemaOrgUnheadPlugin.PrimaryEventId;
133
- exports.PrimaryWebPageId = SchemaOrgUnheadPlugin.PrimaryWebPageId;
134
- exports.PrimaryWebSiteId = SchemaOrgUnheadPlugin.PrimaryWebSiteId;
135
- exports.ProductId = SchemaOrgUnheadPlugin.ProductId;
136
- exports.RecipeId = SchemaOrgUnheadPlugin.RecipeId;
137
- exports.SchemaOrgUnheadPlugin = SchemaOrgUnheadPlugin.SchemaOrgUnheadPlugin;
138
- exports.addressResolver = SchemaOrgUnheadPlugin.addressResolver;
139
- exports.aggregateOfferResolver = SchemaOrgUnheadPlugin.aggregateOfferResolver;
140
- exports.aggregateRatingResolver = SchemaOrgUnheadPlugin.aggregateRatingResolver;
141
- exports.articleResolver = SchemaOrgUnheadPlugin.articleResolver;
142
- exports.bookEditionResolver = SchemaOrgUnheadPlugin.bookEditionResolver;
143
- exports.bookResolver = SchemaOrgUnheadPlugin.bookResolver;
144
- exports.breadcrumbResolver = SchemaOrgUnheadPlugin.breadcrumbResolver;
145
- exports.commentResolver = SchemaOrgUnheadPlugin.commentResolver;
146
- exports.courseResolver = SchemaOrgUnheadPlugin.courseResolver;
147
- exports.createSchemaOrgGraph = SchemaOrgUnheadPlugin.createSchemaOrgGraph;
148
- exports.dedupeNodes = SchemaOrgUnheadPlugin.dedupeNodes;
149
- exports.defineSchemaOrgResolver = SchemaOrgUnheadPlugin.defineSchemaOrgResolver;
150
- exports.eventResolver = SchemaOrgUnheadPlugin.eventResolver;
151
- exports.howToResolver = SchemaOrgUnheadPlugin.howToResolver;
152
- exports.howToStepDirectionResolver = SchemaOrgUnheadPlugin.howToStepDirectionResolver;
153
- exports.howToStepResolver = SchemaOrgUnheadPlugin.howToStepResolver;
154
- exports.imageResolver = SchemaOrgUnheadPlugin.imageResolver;
155
- exports.itemListResolver = SchemaOrgUnheadPlugin.itemListResolver;
156
- exports.jobPostingResolver = SchemaOrgUnheadPlugin.jobPostingResolver;
157
- exports.listItemResolver = SchemaOrgUnheadPlugin.listItemResolver;
158
- exports.localBusinessResolver = SchemaOrgUnheadPlugin.localBusinessResolver;
159
- exports.movieResolver = SchemaOrgUnheadPlugin.movieResolver;
160
- exports.normaliseNodes = SchemaOrgUnheadPlugin.normaliseNodes;
161
- exports.offerResolver = SchemaOrgUnheadPlugin.offerResolver;
162
- exports.openingHoursResolver = SchemaOrgUnheadPlugin.openingHoursResolver;
163
- exports.organizationResolver = SchemaOrgUnheadPlugin.organizationResolver;
164
- exports.personResolver = SchemaOrgUnheadPlugin.personResolver;
165
- exports.placeResolver = SchemaOrgUnheadPlugin.placeResolver;
166
- exports.productResolver = SchemaOrgUnheadPlugin.productResolver;
167
- exports.questionResolver = SchemaOrgUnheadPlugin.questionResolver;
168
- exports.ratingResolver = SchemaOrgUnheadPlugin.ratingResolver;
169
- exports.readActionResolver = SchemaOrgUnheadPlugin.readActionResolver;
170
- exports.recipeResolver = SchemaOrgUnheadPlugin.recipeResolver;
171
- exports.resolveMeta = SchemaOrgUnheadPlugin.resolveMeta;
172
- exports.resolveNode = SchemaOrgUnheadPlugin.resolveNode;
173
- exports.resolveNodeId = SchemaOrgUnheadPlugin.resolveNodeId;
174
- exports.resolveRelation = SchemaOrgUnheadPlugin.resolveRelation;
175
- exports.reviewResolver = SchemaOrgUnheadPlugin.reviewResolver;
176
- exports.searchActionResolver = SchemaOrgUnheadPlugin.searchActionResolver;
177
- exports.softwareAppResolver = SchemaOrgUnheadPlugin.softwareAppResolver;
178
- exports.videoResolver = SchemaOrgUnheadPlugin.videoResolver;
179
- exports.virtualLocationResolver = SchemaOrgUnheadPlugin.virtualLocationResolver;
180
- exports.webPageResolver = SchemaOrgUnheadPlugin.webPageResolver;
181
- exports.webSiteResolver = SchemaOrgUnheadPlugin.webSiteResolver;
128
+ exports.HowToId = plugin.HowToId;
129
+ exports.PluginSchemaOrg = plugin.PluginSchemaOrg;
130
+ exports.PrimaryArticleId = plugin.PrimaryArticleId;
131
+ exports.PrimaryBookId = plugin.PrimaryBookId;
132
+ exports.PrimaryBreadcrumbId = plugin.PrimaryBreadcrumbId;
133
+ exports.PrimaryEventId = plugin.PrimaryEventId;
134
+ exports.PrimaryWebPageId = plugin.PrimaryWebPageId;
135
+ exports.PrimaryWebSiteId = plugin.PrimaryWebSiteId;
136
+ exports.ProductId = plugin.ProductId;
137
+ exports.RecipeId = plugin.RecipeId;
138
+ exports.SchemaOrgUnheadPlugin = plugin.SchemaOrgUnheadPlugin;
139
+ exports.addressResolver = plugin.addressResolver;
140
+ exports.aggregateOfferResolver = plugin.aggregateOfferResolver;
141
+ exports.aggregateRatingResolver = plugin.aggregateRatingResolver;
142
+ exports.articleResolver = plugin.articleResolver;
143
+ exports.bookEditionResolver = plugin.bookEditionResolver;
144
+ exports.bookResolver = plugin.bookResolver;
145
+ exports.breadcrumbResolver = plugin.breadcrumbResolver;
146
+ exports.commentResolver = plugin.commentResolver;
147
+ exports.courseResolver = plugin.courseResolver;
148
+ exports.createSchemaOrgGraph = plugin.createSchemaOrgGraph;
149
+ exports.dedupeNodes = plugin.dedupeNodes;
150
+ exports.defineSchemaOrgResolver = plugin.defineSchemaOrgResolver;
151
+ exports.eventResolver = plugin.eventResolver;
152
+ exports.howToResolver = plugin.howToResolver;
153
+ exports.howToStepDirectionResolver = plugin.howToStepDirectionResolver;
154
+ exports.howToStepResolver = plugin.howToStepResolver;
155
+ exports.imageResolver = plugin.imageResolver;
156
+ exports.itemListResolver = plugin.itemListResolver;
157
+ exports.jobPostingResolver = plugin.jobPostingResolver;
158
+ exports.listItemResolver = plugin.listItemResolver;
159
+ exports.localBusinessResolver = plugin.localBusinessResolver;
160
+ exports.movieResolver = plugin.movieResolver;
161
+ exports.normaliseNodes = plugin.normaliseNodes;
162
+ exports.offerResolver = plugin.offerResolver;
163
+ exports.openingHoursResolver = plugin.openingHoursResolver;
164
+ exports.organizationResolver = plugin.organizationResolver;
165
+ exports.personResolver = plugin.personResolver;
166
+ exports.placeResolver = plugin.placeResolver;
167
+ exports.productResolver = plugin.productResolver;
168
+ exports.questionResolver = plugin.questionResolver;
169
+ exports.ratingResolver = plugin.ratingResolver;
170
+ exports.readActionResolver = plugin.readActionResolver;
171
+ exports.recipeResolver = plugin.recipeResolver;
172
+ exports.resolveMeta = plugin.resolveMeta;
173
+ exports.resolveNode = plugin.resolveNode;
174
+ exports.resolveNodeId = plugin.resolveNodeId;
175
+ exports.resolveRelation = plugin.resolveRelation;
176
+ exports.reviewResolver = plugin.reviewResolver;
177
+ exports.searchActionResolver = plugin.searchActionResolver;
178
+ exports.softwareAppResolver = plugin.softwareAppResolver;
179
+ exports.videoResolver = plugin.videoResolver;
180
+ exports.virtualLocationResolver = plugin.virtualLocationResolver;
181
+ exports.webPageResolver = plugin.webPageResolver;
182
+ exports.webSiteResolver = plugin.webSiteResolver;
182
183
  exports.defineAddress = defineAddress;
183
184
  exports.defineAggregateOffer = defineAggregateOffer;
184
185
  exports.defineAggregateRating = defineAggregateRating;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,6 @@
1
- import { T as Thing, S as SchemaOrgNodeDefinition, a as SchemaOrgNode, M as MetaInput, R as ResolvedMeta, b as SchemaOrgGraph, A as Arrayable, P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, V as VirtualLocation, f as Place, H as HowTo, g as HowToStep, I as ImageObject, J as JobPosting, L as LocalBusiness, O as Offer, h as OpeningHoursSpecification, i as Organization, j as Person, k as Product, Q as Question, l as Recipe, m as Review, n as VideoObject, W as WebPage, o as WebSite, p as Book, q as Course, r as ItemList, s as ListItem, t as Movie, u as SearchAction, v as ReadAction, w as SoftwareApp, x as BookEdition } from './shared/schema-org.a5249ce4.cjs';
2
- export { z as AggregateOfferSimple, F as AggregateRatingSimple, K as ArticleSimple, Y as BookEditionSimple, X as BookSimple, a0 as BreadcrumbSimple, a3 as CommentSimple, a5 as CourseSimple, a7 as EventSimple, aj as HowToDirection, af as HowToId, ae as HowToSimple, ah as HowToStepSimple, bg as Id, bf as IdReference, ba as Identity, an as ImageSimple, al as ItemListSimple, ap as JobPostingSimple, ar as ListItemSimple, at as LocalBusinessSimple, av as MovieSimple, b8 as NodeRelation, b9 as NodeRelations, aQ as NutritionInformation, ax as OfferSimple, az as OpeningHoursSimple, bc as OptionalSchemaOrgPrefix, aB as OrganizationSimple, aD as PersonSimple, ac as PlaceSimple, aF as PostalAddressSimple, N as PrimaryArticleId, _ as PrimaryBookId, a1 as PrimaryBreadcrumbId, a8 as PrimaryEventId, a_ as PrimaryWebPageId, b3 as PrimaryWebSiteId, aI as ProductId, aH as ProductSimple, aK as QuestionSimple, aN as Rating, aM as RatingSimple, b0 as ReadActionInput, aR as RecipeId, aP as RecipeSimple, bb as ResolvableDate, aV as ReviewSimple, b7 as SchemaOrgUnheadPlugin, b5 as SearchActionInput, aT as SoftwareAppSimple, bd as UserConfig, aX as VideoSimple, aa as VirtualLocationSimple, aZ as WebPageSimple, b2 as WebSiteSimple, be as WithResolver, aG as addressResolver, D as aggregateOfferResolver, G as aggregateRatingResolver, U as articleResolver, Z as bookEditionResolver, $ as bookResolver, a2 as breadcrumbResolver, a4 as commentResolver, a6 as courseResolver, y as createSchemaOrgGraph, a9 as eventResolver, ag as howToResolver, ak as howToStepDirectionResolver, ai as howToStepResolver, ao as imageResolver, am as itemListResolver, aq as jobPostingResolver, as as listItemResolver, au as localBusinessResolver, aw as movieResolver, ay as offerResolver, aA as openingHoursResolver, aC as organizationResolver, aE as personResolver, ad as placeResolver, aJ as productResolver, aL as questionResolver, aO as ratingResolver, b1 as readActionResolver, aS as recipeResolver, aW as reviewResolver, b6 as searchActionResolver, aU as softwareAppResolver, aY as videoResolver, ab as virtualLocationResolver, a$ as webPageResolver, b4 as webSiteResolver } from './shared/schema-org.a5249ce4.cjs';
1
+ import { T as Thing, S as SchemaOrgNodeDefinition, a as SchemaOrgNode, M as MetaInput, R as ResolvedMeta, b as SchemaOrgGraph, A as Arrayable, P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, V as VirtualLocation, f as Place, H as HowTo, g as HowToStep, I as ImageObject, J as JobPosting, L as LocalBusiness, O as Offer, h as OpeningHoursSpecification, i as Organization, j as Person, k as Product, Q as Question, l as Recipe, m as Review, n as VideoObject, W as WebPage, o as WebSite, p as Book, q as Course, r as ItemList, s as ListItem, t as Movie, u as SearchAction, v as ReadAction, w as SoftwareApp, x as BookEdition } from './shared/schema-org.1f290788.cjs';
2
+ export { z as AggregateOfferSimple, F as AggregateRatingSimple, K as ArticleSimple, Y as BookEditionSimple, X as BookSimple, a0 as BreadcrumbSimple, a3 as CommentSimple, a5 as CourseSimple, a7 as EventSimple, aj as HowToDirection, af as HowToId, ae as HowToSimple, ah as HowToStepSimple, bi as Id, bh as IdReference, bc as Identity, an as ImageSimple, al as ItemListSimple, ap as JobPostingSimple, ar as ListItemSimple, at as LocalBusinessSimple, av as MovieSimple, ba as NodeRelation, bb as NodeRelations, aQ as NutritionInformation, ax as OfferSimple, az as OpeningHoursSimple, be as OptionalSchemaOrgPrefix, aB as OrganizationSimple, aD as PersonSimple, ac as PlaceSimple, b8 as PluginSchemaOrg, b7 as PluginSchemaOrgOptions, aF as PostalAddressSimple, N as PrimaryArticleId, _ as PrimaryBookId, a1 as PrimaryBreadcrumbId, a8 as PrimaryEventId, a_ as PrimaryWebPageId, b3 as PrimaryWebSiteId, aI as ProductId, aH as ProductSimple, aK as QuestionSimple, aN as Rating, aM as RatingSimple, b0 as ReadActionInput, aR as RecipeId, aP as RecipeSimple, bd as ResolvableDate, aV as ReviewSimple, b9 as SchemaOrgUnheadPlugin, b5 as SearchActionInput, aT as SoftwareAppSimple, bf as UserConfig, aX as VideoSimple, aa as VirtualLocationSimple, aZ as WebPageSimple, b2 as WebSiteSimple, bg as WithResolver, aG as addressResolver, D as aggregateOfferResolver, G as aggregateRatingResolver, U as articleResolver, Z as bookEditionResolver, $ as bookResolver, a2 as breadcrumbResolver, a4 as commentResolver, a6 as courseResolver, y as createSchemaOrgGraph, a9 as eventResolver, ag as howToResolver, ak as howToStepDirectionResolver, ai as howToStepResolver, ao as imageResolver, am as itemListResolver, aq as jobPostingResolver, as as listItemResolver, au as localBusinessResolver, aw as movieResolver, ay as offerResolver, aA as openingHoursResolver, aC as organizationResolver, aE as personResolver, ad as placeResolver, aJ as productResolver, aL as questionResolver, aO as ratingResolver, b1 as readActionResolver, aS as recipeResolver, aW as reviewResolver, b6 as searchActionResolver, aU as softwareAppResolver, aY as videoResolver, ab as virtualLocationResolver, a$ as webPageResolver, b4 as webSiteResolver } from './shared/schema-org.1f290788.cjs';
3
+ import '@unhead/schema';
3
4
 
4
5
  declare function defineSchemaOrgResolver<T extends Thing>(schema: SchemaOrgNodeDefinition<T>): SchemaOrgNodeDefinition<T>;
5
6
 
package/dist/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
- import { T as Thing, S as SchemaOrgNodeDefinition, a as SchemaOrgNode, M as MetaInput, R as ResolvedMeta, b as SchemaOrgGraph, A as Arrayable, P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, V as VirtualLocation, f as Place, H as HowTo, g as HowToStep, I as ImageObject, J as JobPosting, L as LocalBusiness, O as Offer, h as OpeningHoursSpecification, i as Organization, j as Person, k as Product, Q as Question, l as Recipe, m as Review, n as VideoObject, W as WebPage, o as WebSite, p as Book, q as Course, r as ItemList, s as ListItem, t as Movie, u as SearchAction, v as ReadAction, w as SoftwareApp, x as BookEdition } from './shared/schema-org.a5249ce4.mjs';
2
- export { z as AggregateOfferSimple, F as AggregateRatingSimple, K as ArticleSimple, Y as BookEditionSimple, X as BookSimple, a0 as BreadcrumbSimple, a3 as CommentSimple, a5 as CourseSimple, a7 as EventSimple, aj as HowToDirection, af as HowToId, ae as HowToSimple, ah as HowToStepSimple, bg as Id, bf as IdReference, ba as Identity, an as ImageSimple, al as ItemListSimple, ap as JobPostingSimple, ar as ListItemSimple, at as LocalBusinessSimple, av as MovieSimple, b8 as NodeRelation, b9 as NodeRelations, aQ as NutritionInformation, ax as OfferSimple, az as OpeningHoursSimple, bc as OptionalSchemaOrgPrefix, aB as OrganizationSimple, aD as PersonSimple, ac as PlaceSimple, aF as PostalAddressSimple, N as PrimaryArticleId, _ as PrimaryBookId, a1 as PrimaryBreadcrumbId, a8 as PrimaryEventId, a_ as PrimaryWebPageId, b3 as PrimaryWebSiteId, aI as ProductId, aH as ProductSimple, aK as QuestionSimple, aN as Rating, aM as RatingSimple, b0 as ReadActionInput, aR as RecipeId, aP as RecipeSimple, bb as ResolvableDate, aV as ReviewSimple, b7 as SchemaOrgUnheadPlugin, b5 as SearchActionInput, aT as SoftwareAppSimple, bd as UserConfig, aX as VideoSimple, aa as VirtualLocationSimple, aZ as WebPageSimple, b2 as WebSiteSimple, be as WithResolver, aG as addressResolver, D as aggregateOfferResolver, G as aggregateRatingResolver, U as articleResolver, Z as bookEditionResolver, $ as bookResolver, a2 as breadcrumbResolver, a4 as commentResolver, a6 as courseResolver, y as createSchemaOrgGraph, a9 as eventResolver, ag as howToResolver, ak as howToStepDirectionResolver, ai as howToStepResolver, ao as imageResolver, am as itemListResolver, aq as jobPostingResolver, as as listItemResolver, au as localBusinessResolver, aw as movieResolver, ay as offerResolver, aA as openingHoursResolver, aC as organizationResolver, aE as personResolver, ad as placeResolver, aJ as productResolver, aL as questionResolver, aO as ratingResolver, b1 as readActionResolver, aS as recipeResolver, aW as reviewResolver, b6 as searchActionResolver, aU as softwareAppResolver, aY as videoResolver, ab as virtualLocationResolver, a$ as webPageResolver, b4 as webSiteResolver } from './shared/schema-org.a5249ce4.mjs';
1
+ import { T as Thing, S as SchemaOrgNodeDefinition, a as SchemaOrgNode, M as MetaInput, R as ResolvedMeta, b as SchemaOrgGraph, A as Arrayable, P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, V as VirtualLocation, f as Place, H as HowTo, g as HowToStep, I as ImageObject, J as JobPosting, L as LocalBusiness, O as Offer, h as OpeningHoursSpecification, i as Organization, j as Person, k as Product, Q as Question, l as Recipe, m as Review, n as VideoObject, W as WebPage, o as WebSite, p as Book, q as Course, r as ItemList, s as ListItem, t as Movie, u as SearchAction, v as ReadAction, w as SoftwareApp, x as BookEdition } from './shared/schema-org.1f290788.mjs';
2
+ export { z as AggregateOfferSimple, F as AggregateRatingSimple, K as ArticleSimple, Y as BookEditionSimple, X as BookSimple, a0 as BreadcrumbSimple, a3 as CommentSimple, a5 as CourseSimple, a7 as EventSimple, aj as HowToDirection, af as HowToId, ae as HowToSimple, ah as HowToStepSimple, bi as Id, bh as IdReference, bc as Identity, an as ImageSimple, al as ItemListSimple, ap as JobPostingSimple, ar as ListItemSimple, at as LocalBusinessSimple, av as MovieSimple, ba as NodeRelation, bb as NodeRelations, aQ as NutritionInformation, ax as OfferSimple, az as OpeningHoursSimple, be as OptionalSchemaOrgPrefix, aB as OrganizationSimple, aD as PersonSimple, ac as PlaceSimple, b8 as PluginSchemaOrg, b7 as PluginSchemaOrgOptions, aF as PostalAddressSimple, N as PrimaryArticleId, _ as PrimaryBookId, a1 as PrimaryBreadcrumbId, a8 as PrimaryEventId, a_ as PrimaryWebPageId, b3 as PrimaryWebSiteId, aI as ProductId, aH as ProductSimple, aK as QuestionSimple, aN as Rating, aM as RatingSimple, b0 as ReadActionInput, aR as RecipeId, aP as RecipeSimple, bd as ResolvableDate, aV as ReviewSimple, b9 as SchemaOrgUnheadPlugin, b5 as SearchActionInput, aT as SoftwareAppSimple, bf as UserConfig, aX as VideoSimple, aa as VirtualLocationSimple, aZ as WebPageSimple, b2 as WebSiteSimple, bg as WithResolver, aG as addressResolver, D as aggregateOfferResolver, G as aggregateRatingResolver, U as articleResolver, Z as bookEditionResolver, $ as bookResolver, a2 as breadcrumbResolver, a4 as commentResolver, a6 as courseResolver, y as createSchemaOrgGraph, a9 as eventResolver, ag as howToResolver, ak as howToStepDirectionResolver, ai as howToStepResolver, ao as imageResolver, am as itemListResolver, aq as jobPostingResolver, as as listItemResolver, au as localBusinessResolver, aw as movieResolver, ay as offerResolver, aA as openingHoursResolver, aC as organizationResolver, aE as personResolver, ad as placeResolver, aJ as productResolver, aL as questionResolver, aO as ratingResolver, b1 as readActionResolver, aS as recipeResolver, aW as reviewResolver, b6 as searchActionResolver, aU as softwareAppResolver, aY as videoResolver, ab as virtualLocationResolver, a$ as webPageResolver, b4 as webSiteResolver } from './shared/schema-org.1f290788.mjs';
3
+ import '@unhead/schema';
3
4
 
4
5
  declare function defineSchemaOrgResolver<T extends Thing>(schema: SchemaOrgNodeDefinition<T>): SchemaOrgNodeDefinition<T>;
5
6
 
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { T as Thing, S as SchemaOrgNodeDefinition, a as SchemaOrgNode, M as MetaInput, R as ResolvedMeta, b as SchemaOrgGraph, A as Arrayable, P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, V as VirtualLocation, f as Place, H as HowTo, g as HowToStep, I as ImageObject, J as JobPosting, L as LocalBusiness, O as Offer, h as OpeningHoursSpecification, i as Organization, j as Person, k as Product, Q as Question, l as Recipe, m as Review, n as VideoObject, W as WebPage, o as WebSite, p as Book, q as Course, r as ItemList, s as ListItem, t as Movie, u as SearchAction, v as ReadAction, w as SoftwareApp, x as BookEdition } from './shared/schema-org.a5249ce4.js';
2
- export { z as AggregateOfferSimple, F as AggregateRatingSimple, K as ArticleSimple, Y as BookEditionSimple, X as BookSimple, a0 as BreadcrumbSimple, a3 as CommentSimple, a5 as CourseSimple, a7 as EventSimple, aj as HowToDirection, af as HowToId, ae as HowToSimple, ah as HowToStepSimple, bg as Id, bf as IdReference, ba as Identity, an as ImageSimple, al as ItemListSimple, ap as JobPostingSimple, ar as ListItemSimple, at as LocalBusinessSimple, av as MovieSimple, b8 as NodeRelation, b9 as NodeRelations, aQ as NutritionInformation, ax as OfferSimple, az as OpeningHoursSimple, bc as OptionalSchemaOrgPrefix, aB as OrganizationSimple, aD as PersonSimple, ac as PlaceSimple, aF as PostalAddressSimple, N as PrimaryArticleId, _ as PrimaryBookId, a1 as PrimaryBreadcrumbId, a8 as PrimaryEventId, a_ as PrimaryWebPageId, b3 as PrimaryWebSiteId, aI as ProductId, aH as ProductSimple, aK as QuestionSimple, aN as Rating, aM as RatingSimple, b0 as ReadActionInput, aR as RecipeId, aP as RecipeSimple, bb as ResolvableDate, aV as ReviewSimple, b7 as SchemaOrgUnheadPlugin, b5 as SearchActionInput, aT as SoftwareAppSimple, bd as UserConfig, aX as VideoSimple, aa as VirtualLocationSimple, aZ as WebPageSimple, b2 as WebSiteSimple, be as WithResolver, aG as addressResolver, D as aggregateOfferResolver, G as aggregateRatingResolver, U as articleResolver, Z as bookEditionResolver, $ as bookResolver, a2 as breadcrumbResolver, a4 as commentResolver, a6 as courseResolver, y as createSchemaOrgGraph, a9 as eventResolver, ag as howToResolver, ak as howToStepDirectionResolver, ai as howToStepResolver, ao as imageResolver, am as itemListResolver, aq as jobPostingResolver, as as listItemResolver, au as localBusinessResolver, aw as movieResolver, ay as offerResolver, aA as openingHoursResolver, aC as organizationResolver, aE as personResolver, ad as placeResolver, aJ as productResolver, aL as questionResolver, aO as ratingResolver, b1 as readActionResolver, aS as recipeResolver, aW as reviewResolver, b6 as searchActionResolver, aU as softwareAppResolver, aY as videoResolver, ab as virtualLocationResolver, a$ as webPageResolver, b4 as webSiteResolver } from './shared/schema-org.a5249ce4.js';
1
+ import { T as Thing, S as SchemaOrgNodeDefinition, a as SchemaOrgNode, M as MetaInput, R as ResolvedMeta, b as SchemaOrgGraph, A as Arrayable, P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, V as VirtualLocation, f as Place, H as HowTo, g as HowToStep, I as ImageObject, J as JobPosting, L as LocalBusiness, O as Offer, h as OpeningHoursSpecification, i as Organization, j as Person, k as Product, Q as Question, l as Recipe, m as Review, n as VideoObject, W as WebPage, o as WebSite, p as Book, q as Course, r as ItemList, s as ListItem, t as Movie, u as SearchAction, v as ReadAction, w as SoftwareApp, x as BookEdition } from './shared/schema-org.1f290788.js';
2
+ export { z as AggregateOfferSimple, F as AggregateRatingSimple, K as ArticleSimple, Y as BookEditionSimple, X as BookSimple, a0 as BreadcrumbSimple, a3 as CommentSimple, a5 as CourseSimple, a7 as EventSimple, aj as HowToDirection, af as HowToId, ae as HowToSimple, ah as HowToStepSimple, bi as Id, bh as IdReference, bc as Identity, an as ImageSimple, al as ItemListSimple, ap as JobPostingSimple, ar as ListItemSimple, at as LocalBusinessSimple, av as MovieSimple, ba as NodeRelation, bb as NodeRelations, aQ as NutritionInformation, ax as OfferSimple, az as OpeningHoursSimple, be as OptionalSchemaOrgPrefix, aB as OrganizationSimple, aD as PersonSimple, ac as PlaceSimple, b8 as PluginSchemaOrg, b7 as PluginSchemaOrgOptions, aF as PostalAddressSimple, N as PrimaryArticleId, _ as PrimaryBookId, a1 as PrimaryBreadcrumbId, a8 as PrimaryEventId, a_ as PrimaryWebPageId, b3 as PrimaryWebSiteId, aI as ProductId, aH as ProductSimple, aK as QuestionSimple, aN as Rating, aM as RatingSimple, b0 as ReadActionInput, aR as RecipeId, aP as RecipeSimple, bd as ResolvableDate, aV as ReviewSimple, b9 as SchemaOrgUnheadPlugin, b5 as SearchActionInput, aT as SoftwareAppSimple, bf as UserConfig, aX as VideoSimple, aa as VirtualLocationSimple, aZ as WebPageSimple, b2 as WebSiteSimple, bg as WithResolver, aG as addressResolver, D as aggregateOfferResolver, G as aggregateRatingResolver, U as articleResolver, Z as bookEditionResolver, $ as bookResolver, a2 as breadcrumbResolver, a4 as commentResolver, a6 as courseResolver, y as createSchemaOrgGraph, a9 as eventResolver, ag as howToResolver, ak as howToStepDirectionResolver, ai as howToStepResolver, ao as imageResolver, am as itemListResolver, aq as jobPostingResolver, as as listItemResolver, au as localBusinessResolver, aw as movieResolver, ay as offerResolver, aA as openingHoursResolver, aC as organizationResolver, aE as personResolver, ad as placeResolver, aJ as productResolver, aL as questionResolver, aO as ratingResolver, b1 as readActionResolver, aS as recipeResolver, aW as reviewResolver, b6 as searchActionResolver, aU as softwareAppResolver, aY as videoResolver, ab as virtualLocationResolver, a$ as webPageResolver, b4 as webSiteResolver } from './shared/schema-org.1f290788.js';
3
+ import '@unhead/schema';
3
4
 
4
5
  declare function defineSchemaOrgResolver<T extends Thing>(schema: SchemaOrgNodeDefinition<T>): SchemaOrgNodeDefinition<T>;
5
6
 
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
- export { H as HowToId, P as PrimaryArticleId, k as PrimaryBookId, m as PrimaryBreadcrumbId, s as PrimaryEventId, V as PrimaryWebPageId, Y as PrimaryWebSiteId, L as ProductId, R as RecipeId, $ as SchemaOrgUnheadPlugin, K as addressResolver, g as aggregateOfferResolver, h as aggregateRatingResolver, i as articleResolver, j as bookEditionResolver, l as bookResolver, o as breadcrumbResolver, p as commentResolver, q as courseResolver, c as createSchemaOrgGraph, a as dedupeNodes, d as defineSchemaOrgResolver, t as eventResolver, w as howToResolver, y as howToStepDirectionResolver, x as howToStepResolver, A as imageResolver, z as itemListResolver, B as jobPostingResolver, C as listItemResolver, D as localBusinessResolver, E as movieResolver, n as normaliseNodes, F as offerResolver, G as openingHoursResolver, I as organizationResolver, J as personResolver, u as placeResolver, M as productResolver, N as questionResolver, O as ratingResolver, X as readActionResolver, Q as recipeResolver, r as resolveMeta, b as resolveNode, e as resolveNodeId, f as resolveRelation, T as reviewResolver, _ as searchActionResolver, S as softwareAppResolver, U as videoResolver, v as virtualLocationResolver, W as webPageResolver, Z as webSiteResolver } from './shared/schema-org.02b3dc98.mjs';
1
+ export { H as HowToId, $ as PluginSchemaOrg, P as PrimaryArticleId, k as PrimaryBookId, m as PrimaryBreadcrumbId, s as PrimaryEventId, V as PrimaryWebPageId, Y as PrimaryWebSiteId, L as ProductId, R as RecipeId, a0 as SchemaOrgUnheadPlugin, K as addressResolver, g as aggregateOfferResolver, h as aggregateRatingResolver, i as articleResolver, j as bookEditionResolver, l as bookResolver, o as breadcrumbResolver, p as commentResolver, q as courseResolver, c as createSchemaOrgGraph, a as dedupeNodes, d as defineSchemaOrgResolver, t as eventResolver, w as howToResolver, y as howToStepDirectionResolver, x as howToStepResolver, A as imageResolver, z as itemListResolver, B as jobPostingResolver, C as listItemResolver, D as localBusinessResolver, E as movieResolver, n as normaliseNodes, F as offerResolver, G as openingHoursResolver, I as organizationResolver, J as personResolver, u as placeResolver, M as productResolver, N as questionResolver, O as ratingResolver, X as readActionResolver, Q as recipeResolver, r as resolveMeta, b as resolveNode, e as resolveNodeId, f as resolveRelation, T as reviewResolver, _ as searchActionResolver, S as softwareAppResolver, U as videoResolver, v as virtualLocationResolver, W as webPageResolver, Z as webSiteResolver } from './shared/schema-org.90e1acdc.mjs';
2
2
  import { useHead } from 'unhead';
3
- import 'ufo';
4
3
  import '@unhead/shared';
4
+ import 'ufo';
5
5
 
6
6
  function provideResolver(input, resolver) {
7
7
  if (!input)
@@ -1,3 +1,5 @@
1
+ import * as _unhead_schema from '@unhead/schema';
2
+
1
3
  type ItemAvailability = 'BackOrder' | 'Discontinued' | 'InStock' | 'InStoreOnly' | 'LimitedAvailability' | 'OnlineOnly' | 'OutOfStock' | 'PreOrder' | 'PreSale' | 'SoldOut';
2
4
  interface OfferSimple extends Thing {
3
5
  '@type'?: 'Offer';
@@ -1520,6 +1522,15 @@ interface SchemaOrgGraph {
1520
1522
  }
1521
1523
  declare function createSchemaOrgGraph(): SchemaOrgGraph;
1522
1524
 
1523
- declare function SchemaOrgUnheadPlugin(config: MetaInput, meta: () => Record<string, any>): any;
1525
+ interface PluginSchemaOrgOptions {
1526
+ minify?: boolean;
1527
+ }
1528
+ declare function PluginSchemaOrg(options?: PluginSchemaOrgOptions & {
1529
+ resolveMeta?: () => Record<string, any>;
1530
+ }): _unhead_schema.HeadPlugin;
1531
+ /**
1532
+ * @deprecated Use `PluginSchemaOrg` instead.
1533
+ */
1534
+ declare function SchemaOrgUnheadPlugin(config: MetaInput, meta: () => Record<string, any>, options?: PluginSchemaOrgOptions): _unhead_schema.HeadPlugin;
1524
1535
 
1525
- export { bookResolver as $, type Arrayable as A, type BreadcrumbList as B, type Comment$1 as C, aggregateOfferResolver as D, type Event as E, type AggregateRatingSimple as F, aggregateRatingResolver as G, type HowTo as H, type ImageObject as I, type JobPosting as J, type ArticleSimple as K, type LocalBusiness as L, type MetaInput as M, PrimaryArticleId as N, type Offer as O, type PostalAddress as P, type Question as Q, type ResolvedMeta as R, type SchemaOrgNodeDefinition as S, type Thing as T, articleResolver as U, type VirtualLocation as V, type WebPage as W, type BookSimple as X, type BookEditionSimple as Y, bookEditionResolver as Z, PrimaryBookId as _, type SchemaOrgNode as a, webPageResolver as a$, type BreadcrumbSimple as a0, PrimaryBreadcrumbId as a1, breadcrumbResolver as a2, type CommentSimple as a3, commentResolver as a4, type CourseSimple as a5, courseResolver as a6, type EventSimple as a7, PrimaryEventId as a8, eventResolver as a9, openingHoursResolver as aA, type OrganizationSimple as aB, organizationResolver as aC, type PersonSimple as aD, personResolver as aE, type PostalAddressSimple as aF, addressResolver as aG, type ProductSimple as aH, ProductId as aI, productResolver as aJ, type QuestionSimple as aK, questionResolver as aL, type RatingSimple as aM, type Rating as aN, ratingResolver as aO, type RecipeSimple as aP, type NutritionInformation as aQ, RecipeId as aR, recipeResolver as aS, type SoftwareAppSimple as aT, softwareAppResolver as aU, type ReviewSimple as aV, reviewResolver as aW, type VideoSimple as aX, videoResolver as aY, type WebPageSimple as aZ, PrimaryWebPageId as a_, type VirtualLocationSimple as aa, virtualLocationResolver as ab, type PlaceSimple as ac, placeResolver as ad, type HowToSimple as ae, HowToId as af, howToResolver as ag, type HowToStepSimple as ah, howToStepResolver as ai, type HowToDirection as aj, howToStepDirectionResolver as ak, type ItemListSimple as al, itemListResolver as am, type ImageSimple as an, imageResolver as ao, type JobPostingSimple as ap, jobPostingResolver as aq, type ListItemSimple as ar, listItemResolver as as, type LocalBusinessSimple as at, localBusinessResolver as au, type MovieSimple as av, movieResolver as aw, type OfferSimple as ax, offerResolver as ay, type OpeningHoursSimple as az, type SchemaOrgGraph as b, type ReadActionInput as b0, readActionResolver as b1, type WebSiteSimple as b2, PrimaryWebSiteId as b3, webSiteResolver as b4, type SearchActionInput as b5, searchActionResolver as b6, SchemaOrgUnheadPlugin as b7, type NodeRelation as b8, type NodeRelations as b9, type Identity as ba, type ResolvableDate as bb, type OptionalSchemaOrgPrefix as bc, type UserConfig as bd, type WithResolver as be, type IdReference as bf, type Id as bg, type AggregateOffer as c, type AggregateRating as d, type Article as e, type Place as f, type HowToStep as g, type OpeningHoursSpecification as h, type Organization as i, type Person as j, type Product as k, type Recipe as l, type Review as m, type VideoObject as n, type WebSite as o, type Book as p, type Course as q, type ItemList as r, type ListItem as s, type Movie as t, type SearchAction as u, type ReadAction as v, type SoftwareApp as w, type BookEdition as x, createSchemaOrgGraph as y, type AggregateOfferSimple as z };
1536
+ export { bookResolver as $, type Arrayable as A, type BreadcrumbList as B, type Comment$1 as C, aggregateOfferResolver as D, type Event as E, type AggregateRatingSimple as F, aggregateRatingResolver as G, type HowTo as H, type ImageObject as I, type JobPosting as J, type ArticleSimple as K, type LocalBusiness as L, type MetaInput as M, PrimaryArticleId as N, type Offer as O, type PostalAddress as P, type Question as Q, type ResolvedMeta as R, type SchemaOrgNodeDefinition as S, type Thing as T, articleResolver as U, type VirtualLocation as V, type WebPage as W, type BookSimple as X, type BookEditionSimple as Y, bookEditionResolver as Z, PrimaryBookId as _, type SchemaOrgNode as a, webPageResolver as a$, type BreadcrumbSimple as a0, PrimaryBreadcrumbId as a1, breadcrumbResolver as a2, type CommentSimple as a3, commentResolver as a4, type CourseSimple as a5, courseResolver as a6, type EventSimple as a7, PrimaryEventId as a8, eventResolver as a9, openingHoursResolver as aA, type OrganizationSimple as aB, organizationResolver as aC, type PersonSimple as aD, personResolver as aE, type PostalAddressSimple as aF, addressResolver as aG, type ProductSimple as aH, ProductId as aI, productResolver as aJ, type QuestionSimple as aK, questionResolver as aL, type RatingSimple as aM, type Rating as aN, ratingResolver as aO, type RecipeSimple as aP, type NutritionInformation as aQ, RecipeId as aR, recipeResolver as aS, type SoftwareAppSimple as aT, softwareAppResolver as aU, type ReviewSimple as aV, reviewResolver as aW, type VideoSimple as aX, videoResolver as aY, type WebPageSimple as aZ, PrimaryWebPageId as a_, type VirtualLocationSimple as aa, virtualLocationResolver as ab, type PlaceSimple as ac, placeResolver as ad, type HowToSimple as ae, HowToId as af, howToResolver as ag, type HowToStepSimple as ah, howToStepResolver as ai, type HowToDirection as aj, howToStepDirectionResolver as ak, type ItemListSimple as al, itemListResolver as am, type ImageSimple as an, imageResolver as ao, type JobPostingSimple as ap, jobPostingResolver as aq, type ListItemSimple as ar, listItemResolver as as, type LocalBusinessSimple as at, localBusinessResolver as au, type MovieSimple as av, movieResolver as aw, type OfferSimple as ax, offerResolver as ay, type OpeningHoursSimple as az, type SchemaOrgGraph as b, type ReadActionInput as b0, readActionResolver as b1, type WebSiteSimple as b2, PrimaryWebSiteId as b3, webSiteResolver as b4, type SearchActionInput as b5, searchActionResolver as b6, type PluginSchemaOrgOptions as b7, PluginSchemaOrg as b8, SchemaOrgUnheadPlugin as b9, type NodeRelation as ba, type NodeRelations as bb, type Identity as bc, type ResolvableDate as bd, type OptionalSchemaOrgPrefix as be, type UserConfig as bf, type WithResolver as bg, type IdReference as bh, type Id as bi, type AggregateOffer as c, type AggregateRating as d, type Article as e, type Place as f, type HowToStep as g, type OpeningHoursSpecification as h, type Organization as i, type Person as j, type Product as k, type Recipe as l, type Review as m, type VideoObject as n, type WebSite as o, type Book as p, type Course as q, type ItemList as r, type ListItem as s, type Movie as t, type SearchAction as u, type ReadAction as v, type SoftwareApp as w, type BookEdition as x, createSchemaOrgGraph as y, type AggregateOfferSimple as z };
@@ -1,3 +1,5 @@
1
+ import * as _unhead_schema from '@unhead/schema';
2
+
1
3
  type ItemAvailability = 'BackOrder' | 'Discontinued' | 'InStock' | 'InStoreOnly' | 'LimitedAvailability' | 'OnlineOnly' | 'OutOfStock' | 'PreOrder' | 'PreSale' | 'SoldOut';
2
4
  interface OfferSimple extends Thing {
3
5
  '@type'?: 'Offer';
@@ -1520,6 +1522,15 @@ interface SchemaOrgGraph {
1520
1522
  }
1521
1523
  declare function createSchemaOrgGraph(): SchemaOrgGraph;
1522
1524
 
1523
- declare function SchemaOrgUnheadPlugin(config: MetaInput, meta: () => Record<string, any>): any;
1525
+ interface PluginSchemaOrgOptions {
1526
+ minify?: boolean;
1527
+ }
1528
+ declare function PluginSchemaOrg(options?: PluginSchemaOrgOptions & {
1529
+ resolveMeta?: () => Record<string, any>;
1530
+ }): _unhead_schema.HeadPlugin;
1531
+ /**
1532
+ * @deprecated Use `PluginSchemaOrg` instead.
1533
+ */
1534
+ declare function SchemaOrgUnheadPlugin(config: MetaInput, meta: () => Record<string, any>, options?: PluginSchemaOrgOptions): _unhead_schema.HeadPlugin;
1524
1535
 
1525
- export { bookResolver as $, type Arrayable as A, type BreadcrumbList as B, type Comment$1 as C, aggregateOfferResolver as D, type Event as E, type AggregateRatingSimple as F, aggregateRatingResolver as G, type HowTo as H, type ImageObject as I, type JobPosting as J, type ArticleSimple as K, type LocalBusiness as L, type MetaInput as M, PrimaryArticleId as N, type Offer as O, type PostalAddress as P, type Question as Q, type ResolvedMeta as R, type SchemaOrgNodeDefinition as S, type Thing as T, articleResolver as U, type VirtualLocation as V, type WebPage as W, type BookSimple as X, type BookEditionSimple as Y, bookEditionResolver as Z, PrimaryBookId as _, type SchemaOrgNode as a, webPageResolver as a$, type BreadcrumbSimple as a0, PrimaryBreadcrumbId as a1, breadcrumbResolver as a2, type CommentSimple as a3, commentResolver as a4, type CourseSimple as a5, courseResolver as a6, type EventSimple as a7, PrimaryEventId as a8, eventResolver as a9, openingHoursResolver as aA, type OrganizationSimple as aB, organizationResolver as aC, type PersonSimple as aD, personResolver as aE, type PostalAddressSimple as aF, addressResolver as aG, type ProductSimple as aH, ProductId as aI, productResolver as aJ, type QuestionSimple as aK, questionResolver as aL, type RatingSimple as aM, type Rating as aN, ratingResolver as aO, type RecipeSimple as aP, type NutritionInformation as aQ, RecipeId as aR, recipeResolver as aS, type SoftwareAppSimple as aT, softwareAppResolver as aU, type ReviewSimple as aV, reviewResolver as aW, type VideoSimple as aX, videoResolver as aY, type WebPageSimple as aZ, PrimaryWebPageId as a_, type VirtualLocationSimple as aa, virtualLocationResolver as ab, type PlaceSimple as ac, placeResolver as ad, type HowToSimple as ae, HowToId as af, howToResolver as ag, type HowToStepSimple as ah, howToStepResolver as ai, type HowToDirection as aj, howToStepDirectionResolver as ak, type ItemListSimple as al, itemListResolver as am, type ImageSimple as an, imageResolver as ao, type JobPostingSimple as ap, jobPostingResolver as aq, type ListItemSimple as ar, listItemResolver as as, type LocalBusinessSimple as at, localBusinessResolver as au, type MovieSimple as av, movieResolver as aw, type OfferSimple as ax, offerResolver as ay, type OpeningHoursSimple as az, type SchemaOrgGraph as b, type ReadActionInput as b0, readActionResolver as b1, type WebSiteSimple as b2, PrimaryWebSiteId as b3, webSiteResolver as b4, type SearchActionInput as b5, searchActionResolver as b6, SchemaOrgUnheadPlugin as b7, type NodeRelation as b8, type NodeRelations as b9, type Identity as ba, type ResolvableDate as bb, type OptionalSchemaOrgPrefix as bc, type UserConfig as bd, type WithResolver as be, type IdReference as bf, type Id as bg, type AggregateOffer as c, type AggregateRating as d, type Article as e, type Place as f, type HowToStep as g, type OpeningHoursSpecification as h, type Organization as i, type Person as j, type Product as k, type Recipe as l, type Review as m, type VideoObject as n, type WebSite as o, type Book as p, type Course as q, type ItemList as r, type ListItem as s, type Movie as t, type SearchAction as u, type ReadAction as v, type SoftwareApp as w, type BookEdition as x, createSchemaOrgGraph as y, type AggregateOfferSimple as z };
1536
+ export { bookResolver as $, type Arrayable as A, type BreadcrumbList as B, type Comment$1 as C, aggregateOfferResolver as D, type Event as E, type AggregateRatingSimple as F, aggregateRatingResolver as G, type HowTo as H, type ImageObject as I, type JobPosting as J, type ArticleSimple as K, type LocalBusiness as L, type MetaInput as M, PrimaryArticleId as N, type Offer as O, type PostalAddress as P, type Question as Q, type ResolvedMeta as R, type SchemaOrgNodeDefinition as S, type Thing as T, articleResolver as U, type VirtualLocation as V, type WebPage as W, type BookSimple as X, type BookEditionSimple as Y, bookEditionResolver as Z, PrimaryBookId as _, type SchemaOrgNode as a, webPageResolver as a$, type BreadcrumbSimple as a0, PrimaryBreadcrumbId as a1, breadcrumbResolver as a2, type CommentSimple as a3, commentResolver as a4, type CourseSimple as a5, courseResolver as a6, type EventSimple as a7, PrimaryEventId as a8, eventResolver as a9, openingHoursResolver as aA, type OrganizationSimple as aB, organizationResolver as aC, type PersonSimple as aD, personResolver as aE, type PostalAddressSimple as aF, addressResolver as aG, type ProductSimple as aH, ProductId as aI, productResolver as aJ, type QuestionSimple as aK, questionResolver as aL, type RatingSimple as aM, type Rating as aN, ratingResolver as aO, type RecipeSimple as aP, type NutritionInformation as aQ, RecipeId as aR, recipeResolver as aS, type SoftwareAppSimple as aT, softwareAppResolver as aU, type ReviewSimple as aV, reviewResolver as aW, type VideoSimple as aX, videoResolver as aY, type WebPageSimple as aZ, PrimaryWebPageId as a_, type VirtualLocationSimple as aa, virtualLocationResolver as ab, type PlaceSimple as ac, placeResolver as ad, type HowToSimple as ae, HowToId as af, howToResolver as ag, type HowToStepSimple as ah, howToStepResolver as ai, type HowToDirection as aj, howToStepDirectionResolver as ak, type ItemListSimple as al, itemListResolver as am, type ImageSimple as an, imageResolver as ao, type JobPostingSimple as ap, jobPostingResolver as aq, type ListItemSimple as ar, listItemResolver as as, type LocalBusinessSimple as at, localBusinessResolver as au, type MovieSimple as av, movieResolver as aw, type OfferSimple as ax, offerResolver as ay, type OpeningHoursSimple as az, type SchemaOrgGraph as b, type ReadActionInput as b0, readActionResolver as b1, type WebSiteSimple as b2, PrimaryWebSiteId as b3, webSiteResolver as b4, type SearchActionInput as b5, searchActionResolver as b6, type PluginSchemaOrgOptions as b7, PluginSchemaOrg as b8, SchemaOrgUnheadPlugin as b9, type NodeRelation as ba, type NodeRelations as bb, type Identity as bc, type ResolvableDate as bd, type OptionalSchemaOrgPrefix as be, type UserConfig as bf, type WithResolver as bg, type IdReference as bh, type Id as bi, type AggregateOffer as c, type AggregateRating as d, type Article as e, type Place as f, type HowToStep as g, type OpeningHoursSpecification as h, type Organization as i, type Person as j, type Product as k, type Recipe as l, type Review as m, type VideoObject as n, type WebSite as o, type Book as p, type Course as q, type ItemList as r, type ListItem as s, type Movie as t, type SearchAction as u, type ReadAction as v, type SoftwareApp as w, type BookEdition as x, createSchemaOrgGraph as y, type AggregateOfferSimple as z };
@@ -1,3 +1,5 @@
1
+ import * as _unhead_schema from '@unhead/schema';
2
+
1
3
  type ItemAvailability = 'BackOrder' | 'Discontinued' | 'InStock' | 'InStoreOnly' | 'LimitedAvailability' | 'OnlineOnly' | 'OutOfStock' | 'PreOrder' | 'PreSale' | 'SoldOut';
2
4
  interface OfferSimple extends Thing {
3
5
  '@type'?: 'Offer';
@@ -1520,6 +1522,15 @@ interface SchemaOrgGraph {
1520
1522
  }
1521
1523
  declare function createSchemaOrgGraph(): SchemaOrgGraph;
1522
1524
 
1523
- declare function SchemaOrgUnheadPlugin(config: MetaInput, meta: () => Record<string, any>): any;
1525
+ interface PluginSchemaOrgOptions {
1526
+ minify?: boolean;
1527
+ }
1528
+ declare function PluginSchemaOrg(options?: PluginSchemaOrgOptions & {
1529
+ resolveMeta?: () => Record<string, any>;
1530
+ }): _unhead_schema.HeadPlugin;
1531
+ /**
1532
+ * @deprecated Use `PluginSchemaOrg` instead.
1533
+ */
1534
+ declare function SchemaOrgUnheadPlugin(config: MetaInput, meta: () => Record<string, any>, options?: PluginSchemaOrgOptions): _unhead_schema.HeadPlugin;
1524
1535
 
1525
- export { bookResolver as $, type Arrayable as A, type BreadcrumbList as B, type Comment$1 as C, aggregateOfferResolver as D, type Event as E, type AggregateRatingSimple as F, aggregateRatingResolver as G, type HowTo as H, type ImageObject as I, type JobPosting as J, type ArticleSimple as K, type LocalBusiness as L, type MetaInput as M, PrimaryArticleId as N, type Offer as O, type PostalAddress as P, type Question as Q, type ResolvedMeta as R, type SchemaOrgNodeDefinition as S, type Thing as T, articleResolver as U, type VirtualLocation as V, type WebPage as W, type BookSimple as X, type BookEditionSimple as Y, bookEditionResolver as Z, PrimaryBookId as _, type SchemaOrgNode as a, webPageResolver as a$, type BreadcrumbSimple as a0, PrimaryBreadcrumbId as a1, breadcrumbResolver as a2, type CommentSimple as a3, commentResolver as a4, type CourseSimple as a5, courseResolver as a6, type EventSimple as a7, PrimaryEventId as a8, eventResolver as a9, openingHoursResolver as aA, type OrganizationSimple as aB, organizationResolver as aC, type PersonSimple as aD, personResolver as aE, type PostalAddressSimple as aF, addressResolver as aG, type ProductSimple as aH, ProductId as aI, productResolver as aJ, type QuestionSimple as aK, questionResolver as aL, type RatingSimple as aM, type Rating as aN, ratingResolver as aO, type RecipeSimple as aP, type NutritionInformation as aQ, RecipeId as aR, recipeResolver as aS, type SoftwareAppSimple as aT, softwareAppResolver as aU, type ReviewSimple as aV, reviewResolver as aW, type VideoSimple as aX, videoResolver as aY, type WebPageSimple as aZ, PrimaryWebPageId as a_, type VirtualLocationSimple as aa, virtualLocationResolver as ab, type PlaceSimple as ac, placeResolver as ad, type HowToSimple as ae, HowToId as af, howToResolver as ag, type HowToStepSimple as ah, howToStepResolver as ai, type HowToDirection as aj, howToStepDirectionResolver as ak, type ItemListSimple as al, itemListResolver as am, type ImageSimple as an, imageResolver as ao, type JobPostingSimple as ap, jobPostingResolver as aq, type ListItemSimple as ar, listItemResolver as as, type LocalBusinessSimple as at, localBusinessResolver as au, type MovieSimple as av, movieResolver as aw, type OfferSimple as ax, offerResolver as ay, type OpeningHoursSimple as az, type SchemaOrgGraph as b, type ReadActionInput as b0, readActionResolver as b1, type WebSiteSimple as b2, PrimaryWebSiteId as b3, webSiteResolver as b4, type SearchActionInput as b5, searchActionResolver as b6, SchemaOrgUnheadPlugin as b7, type NodeRelation as b8, type NodeRelations as b9, type Identity as ba, type ResolvableDate as bb, type OptionalSchemaOrgPrefix as bc, type UserConfig as bd, type WithResolver as be, type IdReference as bf, type Id as bg, type AggregateOffer as c, type AggregateRating as d, type Article as e, type Place as f, type HowToStep as g, type OpeningHoursSpecification as h, type Organization as i, type Person as j, type Product as k, type Recipe as l, type Review as m, type VideoObject as n, type WebSite as o, type Book as p, type Course as q, type ItemList as r, type ListItem as s, type Movie as t, type SearchAction as u, type ReadAction as v, type SoftwareApp as w, type BookEdition as x, createSchemaOrgGraph as y, type AggregateOfferSimple as z };
1536
+ export { bookResolver as $, type Arrayable as A, type BreadcrumbList as B, type Comment$1 as C, aggregateOfferResolver as D, type Event as E, type AggregateRatingSimple as F, aggregateRatingResolver as G, type HowTo as H, type ImageObject as I, type JobPosting as J, type ArticleSimple as K, type LocalBusiness as L, type MetaInput as M, PrimaryArticleId as N, type Offer as O, type PostalAddress as P, type Question as Q, type ResolvedMeta as R, type SchemaOrgNodeDefinition as S, type Thing as T, articleResolver as U, type VirtualLocation as V, type WebPage as W, type BookSimple as X, type BookEditionSimple as Y, bookEditionResolver as Z, PrimaryBookId as _, type SchemaOrgNode as a, webPageResolver as a$, type BreadcrumbSimple as a0, PrimaryBreadcrumbId as a1, breadcrumbResolver as a2, type CommentSimple as a3, commentResolver as a4, type CourseSimple as a5, courseResolver as a6, type EventSimple as a7, PrimaryEventId as a8, eventResolver as a9, openingHoursResolver as aA, type OrganizationSimple as aB, organizationResolver as aC, type PersonSimple as aD, personResolver as aE, type PostalAddressSimple as aF, addressResolver as aG, type ProductSimple as aH, ProductId as aI, productResolver as aJ, type QuestionSimple as aK, questionResolver as aL, type RatingSimple as aM, type Rating as aN, ratingResolver as aO, type RecipeSimple as aP, type NutritionInformation as aQ, RecipeId as aR, recipeResolver as aS, type SoftwareAppSimple as aT, softwareAppResolver as aU, type ReviewSimple as aV, reviewResolver as aW, type VideoSimple as aX, videoResolver as aY, type WebPageSimple as aZ, PrimaryWebPageId as a_, type VirtualLocationSimple as aa, virtualLocationResolver as ab, type PlaceSimple as ac, placeResolver as ad, type HowToSimple as ae, HowToId as af, howToResolver as ag, type HowToStepSimple as ah, howToStepResolver as ai, type HowToDirection as aj, howToStepDirectionResolver as ak, type ItemListSimple as al, itemListResolver as am, type ImageSimple as an, imageResolver as ao, type JobPostingSimple as ap, jobPostingResolver as aq, type ListItemSimple as ar, listItemResolver as as, type LocalBusinessSimple as at, localBusinessResolver as au, type MovieSimple as av, movieResolver as aw, type OfferSimple as ax, offerResolver as ay, type OpeningHoursSimple as az, type SchemaOrgGraph as b, type ReadActionInput as b0, readActionResolver as b1, type WebSiteSimple as b2, PrimaryWebSiteId as b3, webSiteResolver as b4, type SearchActionInput as b5, searchActionResolver as b6, type PluginSchemaOrgOptions as b7, PluginSchemaOrg as b8, SchemaOrgUnheadPlugin as b9, type NodeRelation as ba, type NodeRelations as bb, type Identity as bc, type ResolvableDate as bd, type OptionalSchemaOrgPrefix as be, type UserConfig as bf, type WithResolver as bg, type IdReference as bh, type Id as bi, type AggregateOffer as c, type AggregateRating as d, type Article as e, type Place as f, type HowToStep as g, type OpeningHoursSpecification as h, type Organization as i, type Person as j, type Product as k, type Recipe as l, type Review as m, type VideoObject as n, type WebSite as o, type Book as p, type Course as q, type ItemList as r, type ListItem as s, type Movie as t, type SearchAction as u, type ReadAction as v, type SoftwareApp as w, type BookEdition as x, createSchemaOrgGraph as y, type AggregateOfferSimple as z };
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- const ufo = require('ufo');
4
3
  const shared = require('@unhead/shared');
4
+ const ufo = require('ufo');
5
5
 
6
6
  function defineSchemaOrgResolver(schema) {
7
7
  return schema;
@@ -296,7 +296,7 @@ const organizationResolver = defineSchemaOrgResolver({
296
296
  const isIdentity = resolveAsGraphKey(node["@id"]) === IdentityId;
297
297
  const webPage = ctx.find(PrimaryWebPageId);
298
298
  if (node.logo) {
299
- node.logo = resolveRelation(node.logo, ctx, imageResolver, {
299
+ const logoNode = resolveRelation(node.logo, ctx, imageResolver, {
300
300
  root: true,
301
301
  afterResolve(logo) {
302
302
  if (isIdentity)
@@ -304,8 +304,9 @@ const organizationResolver = defineSchemaOrgResolver({
304
304
  setIfEmpty(logo, "caption", node.name);
305
305
  }
306
306
  });
307
- if (webPage)
308
- setIfEmpty(webPage, "primaryImageOfPage", idReference(node.logo));
307
+ node.logo = resolveRelation(node.logo, ctx, imageResolver, { root: false }).url;
308
+ if (webPage && logoNode)
309
+ setIfEmpty(webPage, "primaryImageOfPage", idReference(logoNode));
309
310
  }
310
311
  if (isIdentity && webPage)
311
312
  setIfEmpty(webPage, "about", idReference(node));
@@ -407,7 +408,7 @@ const webPageResolver = defineSchemaOrgResolver({
407
408
  node.author = resolveRelation(node.author, ctx, personResolver);
408
409
  node.primaryImageOfPage = resolveRelation(node.primaryImageOfPage, ctx, imageResolver);
409
410
  node.potentialAction = resolveRelation(node.potentialAction, ctx, readActionResolver);
410
- if (node["@type"] === "WebPage") {
411
+ if (node["@type"] === "WebPage" && ctx.meta.url) {
411
412
  setIfEmpty(node, "potentialAction", [
412
413
  {
413
414
  "@type": "ReadAction",
@@ -1533,10 +1534,14 @@ const questionResolver = defineSchemaOrgResolver({
1533
1534
  ],
1534
1535
  idPrefix: "url",
1535
1536
  resolve(question, ctx) {
1536
- if (question.question)
1537
+ if (question.question) {
1537
1538
  question.name = question.question;
1538
- if (question.answer)
1539
+ delete question.question;
1540
+ }
1541
+ if (question.answer) {
1539
1542
  question.acceptedAnswer = question.answer;
1543
+ delete question.answer;
1544
+ }
1540
1545
  question.acceptedAnswer = resolveRelation(question.acceptedAnswer, ctx, answerResolver);
1541
1546
  return question;
1542
1547
  },
@@ -1762,8 +1767,13 @@ function resolveRelation(input, ctx, fallbackResolver, options = {}) {
1762
1767
  if (!input)
1763
1768
  return input;
1764
1769
  const ids = asArray(input).map((a) => {
1765
- if (Object.keys(a).length === 1 && a["@id"])
1766
- return a;
1770
+ const keys = Object.keys(a).length;
1771
+ if (keys === 1 && a["@id"] || keys === 2 && a["@id"] && a["@type"]) {
1772
+ return {
1773
+ // we drop @type
1774
+ "@id": ctx.find(a["@id"])?.["@id"] || a["@id"]
1775
+ };
1776
+ }
1767
1777
  let resolver = fallbackResolver;
1768
1778
  if (a._resolver) {
1769
1779
  resolver = a._resolver;
@@ -1831,7 +1841,6 @@ function createDefu(merger) {
1831
1841
  arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
1832
1842
  );
1833
1843
  }
1834
- const defu = createDefu();
1835
1844
 
1836
1845
  function groupBy(array, predicate) {
1837
1846
  return array.reduce((acc, value, index, array2) => {
@@ -1842,13 +1851,25 @@ function groupBy(array, predicate) {
1842
1851
  return acc;
1843
1852
  }, {});
1844
1853
  }
1854
+ function uniqueBy(array, predicate) {
1855
+ return Object.values(groupBy(array, predicate)).map((a) => a[a.length - 1]);
1856
+ }
1857
+ const merge = createDefu((object, key, value) => {
1858
+ if (Array.isArray(object[key])) {
1859
+ object[key] = [.../* @__PURE__ */ new Set([...object[key], ...value])];
1860
+ if (key === "itemListElement") {
1861
+ object[key] = [...uniqueBy(object[key], (item) => item.position)];
1862
+ }
1863
+ return true;
1864
+ }
1865
+ });
1845
1866
  function dedupeNodes(nodes) {
1846
1867
  const dedupedNodes = {};
1847
1868
  for (const key of nodes.keys()) {
1848
1869
  const n = nodes[key];
1849
1870
  const nodeKey = resolveAsGraphKey(n["@id"] || hash(n));
1850
1871
  if (dedupedNodes[nodeKey])
1851
- dedupedNodes[nodeKey] = defu(nodes[key], dedupedNodes[nodeKey]);
1872
+ dedupedNodes[nodeKey] = merge(nodes[key], dedupedNodes[nodeKey]);
1852
1873
  else
1853
1874
  dedupedNodes[nodeKey] = nodes[key];
1854
1875
  }
@@ -1876,7 +1897,7 @@ function normaliseNodes(nodes) {
1876
1897
  for (const key2 of keys)
1877
1898
  newNode[key2] = n[key2];
1878
1899
  if (dedupedNodes[nodeKey])
1879
- newNode = defu(newNode, dedupedNodes[nodeKey]);
1900
+ newNode = merge(newNode, dedupedNodes[nodeKey]);
1880
1901
  dedupedNodes[nodeKey] = newNode;
1881
1902
  }
1882
1903
  return Object.values(dedupedNodes);
@@ -1923,11 +1944,15 @@ function createSchemaOrgGraph() {
1923
1944
  return ctx;
1924
1945
  }
1925
1946
 
1926
- function SchemaOrgUnheadPlugin(config, meta) {
1947
+ function PluginSchemaOrg(options) {
1948
+ const fallback = () => ({});
1949
+ return SchemaOrgUnheadPlugin({}, options?.resolveMeta || fallback, options);
1950
+ }
1951
+ function SchemaOrgUnheadPlugin(config, meta, options) {
1927
1952
  config = resolveMeta({ ...config });
1928
1953
  let graph;
1929
1954
  const resolvedMeta = {};
1930
- return {
1955
+ return shared.defineHeadPlugin({
1931
1956
  hooks: {
1932
1957
  "entries:resolve": function() {
1933
1958
  graph = createSchemaOrgGraph();
@@ -1957,19 +1982,21 @@ function SchemaOrgUnheadPlugin(config, meta) {
1957
1982
  "tags:resolve": async function(ctx) {
1958
1983
  for (const tag of ctx.tags) {
1959
1984
  if (tag.tag === "script" && tag.key === "schema-org-graph") {
1985
+ const minify = options?.minify || process.env.NODE_ENV === "production";
1960
1986
  tag.innerHTML = JSON.stringify({
1961
1987
  "@context": "https://schema.org",
1962
- "@graph": graph.resolveGraph({ ...config, ...resolvedMeta, ...await meta() })
1963
- }, null, 2);
1988
+ "@graph": graph.resolveGraph({ ...config, ...resolvedMeta, ...await meta?.() || {} })
1989
+ }, null, minify ? 0 : 2);
1964
1990
  delete tag.props.nodes;
1965
1991
  }
1966
1992
  }
1967
1993
  }
1968
1994
  }
1969
- };
1995
+ });
1970
1996
  }
1971
1997
 
1972
1998
  exports.HowToId = HowToId;
1999
+ exports.PluginSchemaOrg = PluginSchemaOrg;
1973
2000
  exports.PrimaryArticleId = PrimaryArticleId;
1974
2001
  exports.PrimaryBookId = PrimaryBookId;
1975
2002
  exports.PrimaryBreadcrumbId = PrimaryBreadcrumbId;
@@ -1,5 +1,5 @@
1
+ import { hashCode, defineHeadPlugin } from '@unhead/shared';
1
2
  import { hasProtocol, joinURL, withBase, withoutTrailingSlash, hasTrailingSlash, withTrailingSlash } from 'ufo';
2
- import { hashCode } from '@unhead/shared';
3
3
 
4
4
  function defineSchemaOrgResolver(schema) {
5
5
  return schema;
@@ -294,7 +294,7 @@ const organizationResolver = defineSchemaOrgResolver({
294
294
  const isIdentity = resolveAsGraphKey(node["@id"]) === IdentityId;
295
295
  const webPage = ctx.find(PrimaryWebPageId);
296
296
  if (node.logo) {
297
- node.logo = resolveRelation(node.logo, ctx, imageResolver, {
297
+ const logoNode = resolveRelation(node.logo, ctx, imageResolver, {
298
298
  root: true,
299
299
  afterResolve(logo) {
300
300
  if (isIdentity)
@@ -302,8 +302,9 @@ const organizationResolver = defineSchemaOrgResolver({
302
302
  setIfEmpty(logo, "caption", node.name);
303
303
  }
304
304
  });
305
- if (webPage)
306
- setIfEmpty(webPage, "primaryImageOfPage", idReference(node.logo));
305
+ node.logo = resolveRelation(node.logo, ctx, imageResolver, { root: false }).url;
306
+ if (webPage && logoNode)
307
+ setIfEmpty(webPage, "primaryImageOfPage", idReference(logoNode));
307
308
  }
308
309
  if (isIdentity && webPage)
309
310
  setIfEmpty(webPage, "about", idReference(node));
@@ -405,7 +406,7 @@ const webPageResolver = defineSchemaOrgResolver({
405
406
  node.author = resolveRelation(node.author, ctx, personResolver);
406
407
  node.primaryImageOfPage = resolveRelation(node.primaryImageOfPage, ctx, imageResolver);
407
408
  node.potentialAction = resolveRelation(node.potentialAction, ctx, readActionResolver);
408
- if (node["@type"] === "WebPage") {
409
+ if (node["@type"] === "WebPage" && ctx.meta.url) {
409
410
  setIfEmpty(node, "potentialAction", [
410
411
  {
411
412
  "@type": "ReadAction",
@@ -1531,10 +1532,14 @@ const questionResolver = defineSchemaOrgResolver({
1531
1532
  ],
1532
1533
  idPrefix: "url",
1533
1534
  resolve(question, ctx) {
1534
- if (question.question)
1535
+ if (question.question) {
1535
1536
  question.name = question.question;
1536
- if (question.answer)
1537
+ delete question.question;
1538
+ }
1539
+ if (question.answer) {
1537
1540
  question.acceptedAnswer = question.answer;
1541
+ delete question.answer;
1542
+ }
1538
1543
  question.acceptedAnswer = resolveRelation(question.acceptedAnswer, ctx, answerResolver);
1539
1544
  return question;
1540
1545
  },
@@ -1760,8 +1765,13 @@ function resolveRelation(input, ctx, fallbackResolver, options = {}) {
1760
1765
  if (!input)
1761
1766
  return input;
1762
1767
  const ids = asArray(input).map((a) => {
1763
- if (Object.keys(a).length === 1 && a["@id"])
1764
- return a;
1768
+ const keys = Object.keys(a).length;
1769
+ if (keys === 1 && a["@id"] || keys === 2 && a["@id"] && a["@type"]) {
1770
+ return {
1771
+ // we drop @type
1772
+ "@id": ctx.find(a["@id"])?.["@id"] || a["@id"]
1773
+ };
1774
+ }
1765
1775
  let resolver = fallbackResolver;
1766
1776
  if (a._resolver) {
1767
1777
  resolver = a._resolver;
@@ -1829,7 +1839,6 @@ function createDefu(merger) {
1829
1839
  arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
1830
1840
  );
1831
1841
  }
1832
- const defu = createDefu();
1833
1842
 
1834
1843
  function groupBy(array, predicate) {
1835
1844
  return array.reduce((acc, value, index, array2) => {
@@ -1840,13 +1849,25 @@ function groupBy(array, predicate) {
1840
1849
  return acc;
1841
1850
  }, {});
1842
1851
  }
1852
+ function uniqueBy(array, predicate) {
1853
+ return Object.values(groupBy(array, predicate)).map((a) => a[a.length - 1]);
1854
+ }
1855
+ const merge = createDefu((object, key, value) => {
1856
+ if (Array.isArray(object[key])) {
1857
+ object[key] = [.../* @__PURE__ */ new Set([...object[key], ...value])];
1858
+ if (key === "itemListElement") {
1859
+ object[key] = [...uniqueBy(object[key], (item) => item.position)];
1860
+ }
1861
+ return true;
1862
+ }
1863
+ });
1843
1864
  function dedupeNodes(nodes) {
1844
1865
  const dedupedNodes = {};
1845
1866
  for (const key of nodes.keys()) {
1846
1867
  const n = nodes[key];
1847
1868
  const nodeKey = resolveAsGraphKey(n["@id"] || hash(n));
1848
1869
  if (dedupedNodes[nodeKey])
1849
- dedupedNodes[nodeKey] = defu(nodes[key], dedupedNodes[nodeKey]);
1870
+ dedupedNodes[nodeKey] = merge(nodes[key], dedupedNodes[nodeKey]);
1850
1871
  else
1851
1872
  dedupedNodes[nodeKey] = nodes[key];
1852
1873
  }
@@ -1874,7 +1895,7 @@ function normaliseNodes(nodes) {
1874
1895
  for (const key2 of keys)
1875
1896
  newNode[key2] = n[key2];
1876
1897
  if (dedupedNodes[nodeKey])
1877
- newNode = defu(newNode, dedupedNodes[nodeKey]);
1898
+ newNode = merge(newNode, dedupedNodes[nodeKey]);
1878
1899
  dedupedNodes[nodeKey] = newNode;
1879
1900
  }
1880
1901
  return Object.values(dedupedNodes);
@@ -1921,11 +1942,15 @@ function createSchemaOrgGraph() {
1921
1942
  return ctx;
1922
1943
  }
1923
1944
 
1924
- function SchemaOrgUnheadPlugin(config, meta) {
1945
+ function PluginSchemaOrg(options) {
1946
+ const fallback = () => ({});
1947
+ return SchemaOrgUnheadPlugin({}, options?.resolveMeta || fallback, options);
1948
+ }
1949
+ function SchemaOrgUnheadPlugin(config, meta, options) {
1925
1950
  config = resolveMeta({ ...config });
1926
1951
  let graph;
1927
1952
  const resolvedMeta = {};
1928
- return {
1953
+ return defineHeadPlugin({
1929
1954
  hooks: {
1930
1955
  "entries:resolve": function() {
1931
1956
  graph = createSchemaOrgGraph();
@@ -1955,16 +1980,17 @@ function SchemaOrgUnheadPlugin(config, meta) {
1955
1980
  "tags:resolve": async function(ctx) {
1956
1981
  for (const tag of ctx.tags) {
1957
1982
  if (tag.tag === "script" && tag.key === "schema-org-graph") {
1983
+ const minify = options?.minify || process.env.NODE_ENV === "production";
1958
1984
  tag.innerHTML = JSON.stringify({
1959
1985
  "@context": "https://schema.org",
1960
- "@graph": graph.resolveGraph({ ...config, ...resolvedMeta, ...await meta() })
1961
- }, null, 2);
1986
+ "@graph": graph.resolveGraph({ ...config, ...resolvedMeta, ...await meta?.() || {} })
1987
+ }, null, minify ? 0 : 2);
1962
1988
  delete tag.props.nodes;
1963
1989
  }
1964
1990
  }
1965
1991
  }
1966
1992
  }
1967
- };
1993
+ });
1968
1994
  }
1969
1995
 
1970
- export { SchemaOrgUnheadPlugin as $, imageResolver as A, jobPostingResolver as B, listItemResolver as C, localBusinessResolver as D, movieResolver as E, offerResolver as F, openingHoursResolver as G, HowToId as H, organizationResolver as I, personResolver as J, addressResolver as K, ProductId as L, productResolver as M, questionResolver as N, ratingResolver as O, PrimaryArticleId as P, recipeResolver as Q, RecipeId as R, softwareAppResolver as S, reviewResolver as T, videoResolver as U, PrimaryWebPageId as V, webPageResolver as W, readActionResolver as X, PrimaryWebSiteId as Y, webSiteResolver as Z, searchActionResolver as _, dedupeNodes as a, resolveNode as b, createSchemaOrgGraph as c, defineSchemaOrgResolver as d, resolveNodeId as e, resolveRelation as f, aggregateOfferResolver as g, aggregateRatingResolver as h, articleResolver as i, bookEditionResolver as j, PrimaryBookId as k, bookResolver as l, PrimaryBreadcrumbId as m, normaliseNodes as n, breadcrumbResolver as o, commentResolver as p, courseResolver as q, resolveMeta as r, PrimaryEventId as s, eventResolver as t, placeResolver as u, virtualLocationResolver as v, howToResolver as w, howToStepResolver as x, howToStepDirectionResolver as y, itemListResolver as z };
1996
+ export { PluginSchemaOrg as $, imageResolver as A, jobPostingResolver as B, listItemResolver as C, localBusinessResolver as D, movieResolver as E, offerResolver as F, openingHoursResolver as G, HowToId as H, organizationResolver as I, personResolver as J, addressResolver as K, ProductId as L, productResolver as M, questionResolver as N, ratingResolver as O, PrimaryArticleId as P, recipeResolver as Q, RecipeId as R, softwareAppResolver as S, reviewResolver as T, videoResolver as U, PrimaryWebPageId as V, webPageResolver as W, readActionResolver as X, PrimaryWebSiteId as Y, webSiteResolver as Z, searchActionResolver as _, dedupeNodes as a, SchemaOrgUnheadPlugin as a0, resolveNode as b, createSchemaOrgGraph as c, defineSchemaOrgResolver as d, resolveNodeId as e, resolveRelation as f, aggregateOfferResolver as g, aggregateRatingResolver as h, articleResolver as i, bookEditionResolver as j, PrimaryBookId as k, bookResolver as l, PrimaryBreadcrumbId as m, normaliseNodes as n, breadcrumbResolver as o, commentResolver as p, courseResolver as q, resolveMeta as r, PrimaryEventId as s, eventResolver as t, placeResolver as u, virtualLocationResolver as v, howToResolver as w, howToStepResolver as x, howToStepDirectionResolver as y, itemListResolver as z };
package/dist/vue.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- const SchemaOrgUnheadPlugin = require('./shared/schema-org.96234618.cjs');
3
+ const plugin = require('./shared/schema-org.723727e4.cjs');
4
4
  const vue = require('@unhead/vue');
5
5
  const vue$1 = require('vue');
6
- require('ufo');
7
6
  require('@unhead/shared');
7
+ require('ufo');
8
8
 
9
9
  const schemaAutoImports = [
10
10
  "defineAddress",
@@ -200,14 +200,7 @@ function defineSoftwareApp(input) {
200
200
  function defineBookEdition(input) {
201
201
  return provideResolver(input, "bookEdition");
202
202
  }
203
- let isSPA = null;
204
203
  function useSchemaOrg(input) {
205
- if (process.env.NODE_ENV !== "development" && typeof window !== "undefined") {
206
- if (isSPA === null && !window.document.querySelector("#schema-org-graph"))
207
- isSPA = true;
208
- if (!isSPA)
209
- return;
210
- }
211
204
  return vue.useHead({
212
205
  script: [
213
206
  {
@@ -218,7 +211,7 @@ function useSchemaOrg(input) {
218
211
  nodes: input
219
212
  }
220
213
  ]
221
- }, { mode: isSPA ? void 0 : "server" });
214
+ });
222
215
  }
223
216
 
224
217
  function shallowVNodesToText(nodes) {
@@ -302,7 +295,8 @@ const SchemaOrgItemList = /* @__PURE__ */ defineSchemaOrgComponent("SchemaOrgIte
302
295
  const SchemaOrgBook = /* @__PURE__ */ defineSchemaOrgComponent("SchemaOrgBook", defineBook);
303
296
  const SchemaOrgSoftwareApp = /* @__PURE__ */ defineSchemaOrgComponent("SchemaOrgSoftwareApp", defineSoftwareApp);
304
297
 
305
- exports.SchemaOrgUnheadPlugin = SchemaOrgUnheadPlugin.SchemaOrgUnheadPlugin;
298
+ exports.PluginSchemaOrg = plugin.PluginSchemaOrg;
299
+ exports.SchemaOrgUnheadPlugin = plugin.SchemaOrgUnheadPlugin;
306
300
  exports.SchemaOrgArticle = SchemaOrgArticle;
307
301
  exports.SchemaOrgBook = SchemaOrgBook;
308
302
  exports.SchemaOrgBreadcrumb = SchemaOrgBreadcrumb;
package/dist/vue.d.cts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { ComponentResolver } from 'unplugin-vue-components';
2
2
  import { MaybeComputedRefOrPromise } from '@unhead/vue';
3
- import { P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, V as VirtualLocation, f as Place, H as HowTo, g as HowToStep, I as ImageObject, J as JobPosting, L as LocalBusiness, O as Offer, h as OpeningHoursSpecification, i as Organization, j as Person, k as Product, Q as Question, l as Recipe, m as Review, n as VideoObject, W as WebPage, o as WebSite, p as Book, q as Course, r as ItemList, s as ListItem, t as Movie, u as SearchAction, v as ReadAction, w as SoftwareApp, x as BookEdition } from './shared/schema-org.a5249ce4.cjs';
4
- export { M as MetaInput, b7 as SchemaOrgUnheadPlugin, bd as UserConfig } from './shared/schema-org.a5249ce4.cjs';
3
+ import { P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, V as VirtualLocation, f as Place, H as HowTo, g as HowToStep, I as ImageObject, J as JobPosting, L as LocalBusiness, O as Offer, h as OpeningHoursSpecification, i as Organization, j as Person, k as Product, Q as Question, l as Recipe, m as Review, n as VideoObject, W as WebPage, o as WebSite, p as Book, q as Course, r as ItemList, s as ListItem, t as Movie, u as SearchAction, v as ReadAction, w as SoftwareApp, x as BookEdition } from './shared/schema-org.1f290788.cjs';
4
+ export { M as MetaInput, b8 as PluginSchemaOrg, b9 as SchemaOrgUnheadPlugin, bf as UserConfig } from './shared/schema-org.1f290788.cjs';
5
5
  import { defineComponent } from 'vue';
6
+ import '@unhead/schema';
6
7
 
7
8
  interface SchemaOrgResolverOptions {
8
9
  /**
package/dist/vue.d.mts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { ComponentResolver } from 'unplugin-vue-components';
2
2
  import { MaybeComputedRefOrPromise } from '@unhead/vue';
3
- import { P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, V as VirtualLocation, f as Place, H as HowTo, g as HowToStep, I as ImageObject, J as JobPosting, L as LocalBusiness, O as Offer, h as OpeningHoursSpecification, i as Organization, j as Person, k as Product, Q as Question, l as Recipe, m as Review, n as VideoObject, W as WebPage, o as WebSite, p as Book, q as Course, r as ItemList, s as ListItem, t as Movie, u as SearchAction, v as ReadAction, w as SoftwareApp, x as BookEdition } from './shared/schema-org.a5249ce4.mjs';
4
- export { M as MetaInput, b7 as SchemaOrgUnheadPlugin, bd as UserConfig } from './shared/schema-org.a5249ce4.mjs';
3
+ import { P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, V as VirtualLocation, f as Place, H as HowTo, g as HowToStep, I as ImageObject, J as JobPosting, L as LocalBusiness, O as Offer, h as OpeningHoursSpecification, i as Organization, j as Person, k as Product, Q as Question, l as Recipe, m as Review, n as VideoObject, W as WebPage, o as WebSite, p as Book, q as Course, r as ItemList, s as ListItem, t as Movie, u as SearchAction, v as ReadAction, w as SoftwareApp, x as BookEdition } from './shared/schema-org.1f290788.mjs';
4
+ export { M as MetaInput, b8 as PluginSchemaOrg, b9 as SchemaOrgUnheadPlugin, bf as UserConfig } from './shared/schema-org.1f290788.mjs';
5
5
  import { defineComponent } from 'vue';
6
+ import '@unhead/schema';
6
7
 
7
8
  interface SchemaOrgResolverOptions {
8
9
  /**
package/dist/vue.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { ComponentResolver } from 'unplugin-vue-components';
2
2
  import { MaybeComputedRefOrPromise } from '@unhead/vue';
3
- import { P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, V as VirtualLocation, f as Place, H as HowTo, g as HowToStep, I as ImageObject, J as JobPosting, L as LocalBusiness, O as Offer, h as OpeningHoursSpecification, i as Organization, j as Person, k as Product, Q as Question, l as Recipe, m as Review, n as VideoObject, W as WebPage, o as WebSite, p as Book, q as Course, r as ItemList, s as ListItem, t as Movie, u as SearchAction, v as ReadAction, w as SoftwareApp, x as BookEdition } from './shared/schema-org.a5249ce4.js';
4
- export { M as MetaInput, b7 as SchemaOrgUnheadPlugin, bd as UserConfig } from './shared/schema-org.a5249ce4.js';
3
+ import { P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, V as VirtualLocation, f as Place, H as HowTo, g as HowToStep, I as ImageObject, J as JobPosting, L as LocalBusiness, O as Offer, h as OpeningHoursSpecification, i as Organization, j as Person, k as Product, Q as Question, l as Recipe, m as Review, n as VideoObject, W as WebPage, o as WebSite, p as Book, q as Course, r as ItemList, s as ListItem, t as Movie, u as SearchAction, v as ReadAction, w as SoftwareApp, x as BookEdition } from './shared/schema-org.1f290788.js';
4
+ export { M as MetaInput, b8 as PluginSchemaOrg, b9 as SchemaOrgUnheadPlugin, bf as UserConfig } from './shared/schema-org.1f290788.js';
5
5
  import { defineComponent } from 'vue';
6
+ import '@unhead/schema';
6
7
 
7
8
  interface SchemaOrgResolverOptions {
8
9
  /**
package/dist/vue.mjs CHANGED
@@ -1,8 +1,8 @@
1
- export { $ as SchemaOrgUnheadPlugin } from './shared/schema-org.02b3dc98.mjs';
1
+ export { $ as PluginSchemaOrg, a0 as SchemaOrgUnheadPlugin } from './shared/schema-org.90e1acdc.mjs';
2
2
  import { useHead } from '@unhead/vue';
3
3
  import { defineComponent, ref, computed, unref, h } from 'vue';
4
- import 'ufo';
5
4
  import '@unhead/shared';
5
+ import 'ufo';
6
6
 
7
7
  const schemaAutoImports = [
8
8
  "defineAddress",
@@ -198,14 +198,7 @@ function defineSoftwareApp(input) {
198
198
  function defineBookEdition(input) {
199
199
  return provideResolver(input, "bookEdition");
200
200
  }
201
- let isSPA = null;
202
201
  function useSchemaOrg(input) {
203
- if (process.env.NODE_ENV !== "development" && typeof window !== "undefined") {
204
- if (isSPA === null && !window.document.querySelector("#schema-org-graph"))
205
- isSPA = true;
206
- if (!isSPA)
207
- return;
208
- }
209
202
  return useHead({
210
203
  script: [
211
204
  {
@@ -216,7 +209,7 @@ function useSchemaOrg(input) {
216
209
  nodes: input
217
210
  }
218
211
  ]
219
- }, { mode: isSPA ? void 0 : "server" });
212
+ });
220
213
  }
221
214
 
222
215
  function shallowVNodesToText(nodes) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unhead/schema-org",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
4
4
  "description": "Unhead Schema.org for Simple and Automated Google Rich Results",
5
5
  "author": "Harlan Wilton <harlan@harlanzw.com>",
6
6
  "license": "MIT",
@@ -39,8 +39,8 @@
39
39
  "dist"
40
40
  ],
41
41
  "peerDependencies": {
42
- "unhead": ">=1.3.5",
43
- "@unhead/shared": "1.4.1"
42
+ "unhead": ">=1.4.1",
43
+ "@unhead/shared": "1.5.0"
44
44
  },
45
45
  "dependencies": {
46
46
  "ufo": "^1.3.0"
@@ -48,10 +48,10 @@
48
48
  "devDependencies": {
49
49
  "unplugin-vue-components": "^0.25.2",
50
50
  "vue": "^3.3.4",
51
- "@unhead/schema": "1.4.1",
52
- "@unhead/shared": "1.4.1",
53
- "@unhead/vue": "1.4.1",
54
- "unhead": "1.4.1"
51
+ "@unhead/schema": "1.5.0",
52
+ "@unhead/shared": "1.5.0",
53
+ "@unhead/vue": "1.5.0",
54
+ "unhead": "1.5.0"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "unbuild .",