@unhead/schema-org 1.11.14 → 1.11.16
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 +3 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +4 -2
- package/dist/shared/{schema-org.bad51ab7.cjs → schema-org.B_EoSq_p.cjs} +17 -124
- package/dist/shared/{schema-org.5caec424.mjs → schema-org.CwD-TP0q.mjs} +12 -119
- package/dist/vue.cjs +3 -1
- package/dist/vue.d.cts +2 -2
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.mjs +4 -2
- package/package.json +12 -11
- package/vue.d.ts +1 -1
- /package/dist/shared/{schema-org.cc40ee34.d.cts → schema-org.D_ha4uKf.d.cts} +0 -0
- /package/dist/shared/{schema-org.cc40ee34.d.mts → schema-org.D_ha4uKf.d.mts} +0 -0
- /package/dist/shared/{schema-org.cc40ee34.d.ts → schema-org.D_ha4uKf.d.ts} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const plugin = require('./shared/schema-org.
|
|
3
|
+
const plugin = require('./shared/schema-org.B_EoSq_p.cjs');
|
|
4
4
|
const unhead = require('unhead');
|
|
5
|
+
require('@unhead/shared');
|
|
6
|
+
require('defu');
|
|
5
7
|
require('ufo');
|
|
6
8
|
require('ohash');
|
|
7
9
|
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Thing, S as SchemaOrgNodeDefinition, M as MetaInput, R as ResolvedMeta, a as SchemaOrgGraph, A as Arrayable, b as SchemaOrgNode, P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, F as FoodEstablishment, 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.
|
|
2
|
-
export { z as AggregateOfferSimple, G as AggregateRatingSimple, N as ArticleSimple, Z as BookEditionSimple, Y as BookSimple, a1 as BreadcrumbSimple, a4 as CommentSimple, a6 as CourseSimple, a8 as EventSimple, af as FoodEstablishmentSimple, am as HowToDirection, ai as HowToId, ah as HowToSimple, ak as HowToStepSimple, bm as Id, bl as IdReference, bg as Identity, ao as ImageSimple, aq as ItemListSimple, as as JobPostingSimple, au as ListItemSimple, aw as LocalBusinessSimple, ay as MovieSimple, be as NodeRelation, bf as NodeRelations, aT as NutritionInformation, aA as OfferSimple, aC as OpeningHoursSimple, bi as OptionalSchemaOrgPrefix, aE as OrganizationSimple, aG as PersonSimple, ab as PlaceSimple, bc as PluginSchemaOrg, ba as PluginSchemaOrgOptions, aI as PostalAddressSimple, U as PrimaryArticleId, $ as PrimaryBookId, a2 as PrimaryBreadcrumbId, a9 as PrimaryEventId, b1 as PrimaryWebPageId, b6 as PrimaryWebSiteId, aL as ProductId, aK as ProductSimple, aN as QuestionSimple, aQ as Rating, aP as RatingSimple, b3 as ReadActionInput, aU as RecipeId, aS as RecipeSimple, bh as ResolvableDate, aW as ReviewSimple, bd as SchemaOrgUnheadPlugin, b8 as SearchActionInput, aY as SoftwareAppSimple, bb as UnheadSchemaOrg, bj as UserConfig, a_ as VideoSimple, ad as VirtualLocationSimple, b0 as WebPageSimple, b5 as WebSiteSimple, bk as WithResolver, aJ as addressResolver, D as aggregateOfferResolver, K as aggregateRatingResolver, X as articleResolver, _ as bookEditionResolver, a0 as bookResolver, a3 as breadcrumbResolver, a5 as commentResolver, a7 as courseResolver, y as createSchemaOrgGraph, aa as eventResolver, ag as foodEstablishmentResolver, aj as howToResolver, an as howToStepDirectionResolver, al as howToStepResolver, ap as imageResolver, ar as itemListResolver, at as jobPostingResolver, av as listItemResolver, ax as localBusinessResolver, az as movieResolver, aB as offerResolver, aD as openingHoursResolver, aF as organizationResolver, aH as personResolver, ac as placeResolver, aM as productResolver, aO as questionResolver, aR as ratingResolver, b4 as readActionResolver, aV as recipeResolver, aX as reviewResolver, b9 as searchActionResolver, aZ as softwareAppResolver, a$ as videoResolver, ae as virtualLocationResolver, b2 as webPageResolver, b7 as webSiteResolver } from './shared/schema-org.
|
|
1
|
+
import { T as Thing, S as SchemaOrgNodeDefinition, M as MetaInput, R as ResolvedMeta, a as SchemaOrgGraph, A as Arrayable, b as SchemaOrgNode, P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, F as FoodEstablishment, 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.D_ha4uKf.cjs';
|
|
2
|
+
export { z as AggregateOfferSimple, G as AggregateRatingSimple, N as ArticleSimple, Z as BookEditionSimple, Y as BookSimple, a1 as BreadcrumbSimple, a4 as CommentSimple, a6 as CourseSimple, a8 as EventSimple, af as FoodEstablishmentSimple, am as HowToDirection, ai as HowToId, ah as HowToSimple, ak as HowToStepSimple, bm as Id, bl as IdReference, bg as Identity, ao as ImageSimple, aq as ItemListSimple, as as JobPostingSimple, au as ListItemSimple, aw as LocalBusinessSimple, ay as MovieSimple, be as NodeRelation, bf as NodeRelations, aT as NutritionInformation, aA as OfferSimple, aC as OpeningHoursSimple, bi as OptionalSchemaOrgPrefix, aE as OrganizationSimple, aG as PersonSimple, ab as PlaceSimple, bc as PluginSchemaOrg, ba as PluginSchemaOrgOptions, aI as PostalAddressSimple, U as PrimaryArticleId, $ as PrimaryBookId, a2 as PrimaryBreadcrumbId, a9 as PrimaryEventId, b1 as PrimaryWebPageId, b6 as PrimaryWebSiteId, aL as ProductId, aK as ProductSimple, aN as QuestionSimple, aQ as Rating, aP as RatingSimple, b3 as ReadActionInput, aU as RecipeId, aS as RecipeSimple, bh as ResolvableDate, aW as ReviewSimple, bd as SchemaOrgUnheadPlugin, b8 as SearchActionInput, aY as SoftwareAppSimple, bb as UnheadSchemaOrg, bj as UserConfig, a_ as VideoSimple, ad as VirtualLocationSimple, b0 as WebPageSimple, b5 as WebSiteSimple, bk as WithResolver, aJ as addressResolver, D as aggregateOfferResolver, K as aggregateRatingResolver, X as articleResolver, _ as bookEditionResolver, a0 as bookResolver, a3 as breadcrumbResolver, a5 as commentResolver, a7 as courseResolver, y as createSchemaOrgGraph, aa as eventResolver, ag as foodEstablishmentResolver, aj as howToResolver, an as howToStepDirectionResolver, al as howToStepResolver, ap as imageResolver, ar as itemListResolver, at as jobPostingResolver, av as listItemResolver, ax as localBusinessResolver, az as movieResolver, aB as offerResolver, aD as openingHoursResolver, aF as organizationResolver, aH as personResolver, ac as placeResolver, aM as productResolver, aO as questionResolver, aR as ratingResolver, b4 as readActionResolver, aV as recipeResolver, aX as reviewResolver, b9 as searchActionResolver, aZ as softwareAppResolver, a$ as videoResolver, ae as virtualLocationResolver, b2 as webPageResolver, b7 as webSiteResolver } from './shared/schema-org.D_ha4uKf.cjs';
|
|
3
3
|
import * as _unhead_schema from '@unhead/schema';
|
|
4
4
|
import { HeadEntryOptions } from '@unhead/schema';
|
|
5
5
|
import * as unhead from 'unhead';
|
|
@@ -23,7 +23,7 @@ interface ResolverOptions {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
declare function resolveMeta(meta: Partial<MetaInput>): ResolvedMeta;
|
|
26
|
-
declare function resolveNode<T extends Thing>(node: T, ctx: SchemaOrgGraph, resolver
|
|
26
|
+
declare function resolveNode<T extends Thing>(node: T, ctx: SchemaOrgGraph, resolver?: SchemaOrgNodeDefinition<T>): T;
|
|
27
27
|
declare function resolveNodeId<T extends Thing>(node: T, ctx: SchemaOrgGraph, resolver?: SchemaOrgNodeDefinition<T>, resolveAsRoot?: boolean): T;
|
|
28
28
|
declare function resolveRelation(input: Arrayable<any>, ctx: SchemaOrgGraph, fallbackResolver?: SchemaOrgNodeDefinition<any>, options?: ResolverOptions): any;
|
|
29
29
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Thing, S as SchemaOrgNodeDefinition, M as MetaInput, R as ResolvedMeta, a as SchemaOrgGraph, A as Arrayable, b as SchemaOrgNode, P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, F as FoodEstablishment, 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.
|
|
2
|
-
export { z as AggregateOfferSimple, G as AggregateRatingSimple, N as ArticleSimple, Z as BookEditionSimple, Y as BookSimple, a1 as BreadcrumbSimple, a4 as CommentSimple, a6 as CourseSimple, a8 as EventSimple, af as FoodEstablishmentSimple, am as HowToDirection, ai as HowToId, ah as HowToSimple, ak as HowToStepSimple, bm as Id, bl as IdReference, bg as Identity, ao as ImageSimple, aq as ItemListSimple, as as JobPostingSimple, au as ListItemSimple, aw as LocalBusinessSimple, ay as MovieSimple, be as NodeRelation, bf as NodeRelations, aT as NutritionInformation, aA as OfferSimple, aC as OpeningHoursSimple, bi as OptionalSchemaOrgPrefix, aE as OrganizationSimple, aG as PersonSimple, ab as PlaceSimple, bc as PluginSchemaOrg, ba as PluginSchemaOrgOptions, aI as PostalAddressSimple, U as PrimaryArticleId, $ as PrimaryBookId, a2 as PrimaryBreadcrumbId, a9 as PrimaryEventId, b1 as PrimaryWebPageId, b6 as PrimaryWebSiteId, aL as ProductId, aK as ProductSimple, aN as QuestionSimple, aQ as Rating, aP as RatingSimple, b3 as ReadActionInput, aU as RecipeId, aS as RecipeSimple, bh as ResolvableDate, aW as ReviewSimple, bd as SchemaOrgUnheadPlugin, b8 as SearchActionInput, aY as SoftwareAppSimple, bb as UnheadSchemaOrg, bj as UserConfig, a_ as VideoSimple, ad as VirtualLocationSimple, b0 as WebPageSimple, b5 as WebSiteSimple, bk as WithResolver, aJ as addressResolver, D as aggregateOfferResolver, K as aggregateRatingResolver, X as articleResolver, _ as bookEditionResolver, a0 as bookResolver, a3 as breadcrumbResolver, a5 as commentResolver, a7 as courseResolver, y as createSchemaOrgGraph, aa as eventResolver, ag as foodEstablishmentResolver, aj as howToResolver, an as howToStepDirectionResolver, al as howToStepResolver, ap as imageResolver, ar as itemListResolver, at as jobPostingResolver, av as listItemResolver, ax as localBusinessResolver, az as movieResolver, aB as offerResolver, aD as openingHoursResolver, aF as organizationResolver, aH as personResolver, ac as placeResolver, aM as productResolver, aO as questionResolver, aR as ratingResolver, b4 as readActionResolver, aV as recipeResolver, aX as reviewResolver, b9 as searchActionResolver, aZ as softwareAppResolver, a$ as videoResolver, ae as virtualLocationResolver, b2 as webPageResolver, b7 as webSiteResolver } from './shared/schema-org.
|
|
1
|
+
import { T as Thing, S as SchemaOrgNodeDefinition, M as MetaInput, R as ResolvedMeta, a as SchemaOrgGraph, A as Arrayable, b as SchemaOrgNode, P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, F as FoodEstablishment, 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.D_ha4uKf.mjs';
|
|
2
|
+
export { z as AggregateOfferSimple, G as AggregateRatingSimple, N as ArticleSimple, Z as BookEditionSimple, Y as BookSimple, a1 as BreadcrumbSimple, a4 as CommentSimple, a6 as CourseSimple, a8 as EventSimple, af as FoodEstablishmentSimple, am as HowToDirection, ai as HowToId, ah as HowToSimple, ak as HowToStepSimple, bm as Id, bl as IdReference, bg as Identity, ao as ImageSimple, aq as ItemListSimple, as as JobPostingSimple, au as ListItemSimple, aw as LocalBusinessSimple, ay as MovieSimple, be as NodeRelation, bf as NodeRelations, aT as NutritionInformation, aA as OfferSimple, aC as OpeningHoursSimple, bi as OptionalSchemaOrgPrefix, aE as OrganizationSimple, aG as PersonSimple, ab as PlaceSimple, bc as PluginSchemaOrg, ba as PluginSchemaOrgOptions, aI as PostalAddressSimple, U as PrimaryArticleId, $ as PrimaryBookId, a2 as PrimaryBreadcrumbId, a9 as PrimaryEventId, b1 as PrimaryWebPageId, b6 as PrimaryWebSiteId, aL as ProductId, aK as ProductSimple, aN as QuestionSimple, aQ as Rating, aP as RatingSimple, b3 as ReadActionInput, aU as RecipeId, aS as RecipeSimple, bh as ResolvableDate, aW as ReviewSimple, bd as SchemaOrgUnheadPlugin, b8 as SearchActionInput, aY as SoftwareAppSimple, bb as UnheadSchemaOrg, bj as UserConfig, a_ as VideoSimple, ad as VirtualLocationSimple, b0 as WebPageSimple, b5 as WebSiteSimple, bk as WithResolver, aJ as addressResolver, D as aggregateOfferResolver, K as aggregateRatingResolver, X as articleResolver, _ as bookEditionResolver, a0 as bookResolver, a3 as breadcrumbResolver, a5 as commentResolver, a7 as courseResolver, y as createSchemaOrgGraph, aa as eventResolver, ag as foodEstablishmentResolver, aj as howToResolver, an as howToStepDirectionResolver, al as howToStepResolver, ap as imageResolver, ar as itemListResolver, at as jobPostingResolver, av as listItemResolver, ax as localBusinessResolver, az as movieResolver, aB as offerResolver, aD as openingHoursResolver, aF as organizationResolver, aH as personResolver, ac as placeResolver, aM as productResolver, aO as questionResolver, aR as ratingResolver, b4 as readActionResolver, aV as recipeResolver, aX as reviewResolver, b9 as searchActionResolver, aZ as softwareAppResolver, a$ as videoResolver, ae as virtualLocationResolver, b2 as webPageResolver, b7 as webSiteResolver } from './shared/schema-org.D_ha4uKf.mjs';
|
|
3
3
|
import * as _unhead_schema from '@unhead/schema';
|
|
4
4
|
import { HeadEntryOptions } from '@unhead/schema';
|
|
5
5
|
import * as unhead from 'unhead';
|
|
@@ -23,7 +23,7 @@ interface ResolverOptions {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
declare function resolveMeta(meta: Partial<MetaInput>): ResolvedMeta;
|
|
26
|
-
declare function resolveNode<T extends Thing>(node: T, ctx: SchemaOrgGraph, resolver
|
|
26
|
+
declare function resolveNode<T extends Thing>(node: T, ctx: SchemaOrgGraph, resolver?: SchemaOrgNodeDefinition<T>): T;
|
|
27
27
|
declare function resolveNodeId<T extends Thing>(node: T, ctx: SchemaOrgGraph, resolver?: SchemaOrgNodeDefinition<T>, resolveAsRoot?: boolean): T;
|
|
28
28
|
declare function resolveRelation(input: Arrayable<any>, ctx: SchemaOrgGraph, fallbackResolver?: SchemaOrgNodeDefinition<any>, options?: ResolverOptions): any;
|
|
29
29
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Thing, S as SchemaOrgNodeDefinition, M as MetaInput, R as ResolvedMeta, a as SchemaOrgGraph, A as Arrayable, b as SchemaOrgNode, P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, F as FoodEstablishment, 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.
|
|
2
|
-
export { z as AggregateOfferSimple, G as AggregateRatingSimple, N as ArticleSimple, Z as BookEditionSimple, Y as BookSimple, a1 as BreadcrumbSimple, a4 as CommentSimple, a6 as CourseSimple, a8 as EventSimple, af as FoodEstablishmentSimple, am as HowToDirection, ai as HowToId, ah as HowToSimple, ak as HowToStepSimple, bm as Id, bl as IdReference, bg as Identity, ao as ImageSimple, aq as ItemListSimple, as as JobPostingSimple, au as ListItemSimple, aw as LocalBusinessSimple, ay as MovieSimple, be as NodeRelation, bf as NodeRelations, aT as NutritionInformation, aA as OfferSimple, aC as OpeningHoursSimple, bi as OptionalSchemaOrgPrefix, aE as OrganizationSimple, aG as PersonSimple, ab as PlaceSimple, bc as PluginSchemaOrg, ba as PluginSchemaOrgOptions, aI as PostalAddressSimple, U as PrimaryArticleId, $ as PrimaryBookId, a2 as PrimaryBreadcrumbId, a9 as PrimaryEventId, b1 as PrimaryWebPageId, b6 as PrimaryWebSiteId, aL as ProductId, aK as ProductSimple, aN as QuestionSimple, aQ as Rating, aP as RatingSimple, b3 as ReadActionInput, aU as RecipeId, aS as RecipeSimple, bh as ResolvableDate, aW as ReviewSimple, bd as SchemaOrgUnheadPlugin, b8 as SearchActionInput, aY as SoftwareAppSimple, bb as UnheadSchemaOrg, bj as UserConfig, a_ as VideoSimple, ad as VirtualLocationSimple, b0 as WebPageSimple, b5 as WebSiteSimple, bk as WithResolver, aJ as addressResolver, D as aggregateOfferResolver, K as aggregateRatingResolver, X as articleResolver, _ as bookEditionResolver, a0 as bookResolver, a3 as breadcrumbResolver, a5 as commentResolver, a7 as courseResolver, y as createSchemaOrgGraph, aa as eventResolver, ag as foodEstablishmentResolver, aj as howToResolver, an as howToStepDirectionResolver, al as howToStepResolver, ap as imageResolver, ar as itemListResolver, at as jobPostingResolver, av as listItemResolver, ax as localBusinessResolver, az as movieResolver, aB as offerResolver, aD as openingHoursResolver, aF as organizationResolver, aH as personResolver, ac as placeResolver, aM as productResolver, aO as questionResolver, aR as ratingResolver, b4 as readActionResolver, aV as recipeResolver, aX as reviewResolver, b9 as searchActionResolver, aZ as softwareAppResolver, a$ as videoResolver, ae as virtualLocationResolver, b2 as webPageResolver, b7 as webSiteResolver } from './shared/schema-org.
|
|
1
|
+
import { T as Thing, S as SchemaOrgNodeDefinition, M as MetaInput, R as ResolvedMeta, a as SchemaOrgGraph, A as Arrayable, b as SchemaOrgNode, P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, F as FoodEstablishment, 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.D_ha4uKf.js';
|
|
2
|
+
export { z as AggregateOfferSimple, G as AggregateRatingSimple, N as ArticleSimple, Z as BookEditionSimple, Y as BookSimple, a1 as BreadcrumbSimple, a4 as CommentSimple, a6 as CourseSimple, a8 as EventSimple, af as FoodEstablishmentSimple, am as HowToDirection, ai as HowToId, ah as HowToSimple, ak as HowToStepSimple, bm as Id, bl as IdReference, bg as Identity, ao as ImageSimple, aq as ItemListSimple, as as JobPostingSimple, au as ListItemSimple, aw as LocalBusinessSimple, ay as MovieSimple, be as NodeRelation, bf as NodeRelations, aT as NutritionInformation, aA as OfferSimple, aC as OpeningHoursSimple, bi as OptionalSchemaOrgPrefix, aE as OrganizationSimple, aG as PersonSimple, ab as PlaceSimple, bc as PluginSchemaOrg, ba as PluginSchemaOrgOptions, aI as PostalAddressSimple, U as PrimaryArticleId, $ as PrimaryBookId, a2 as PrimaryBreadcrumbId, a9 as PrimaryEventId, b1 as PrimaryWebPageId, b6 as PrimaryWebSiteId, aL as ProductId, aK as ProductSimple, aN as QuestionSimple, aQ as Rating, aP as RatingSimple, b3 as ReadActionInput, aU as RecipeId, aS as RecipeSimple, bh as ResolvableDate, aW as ReviewSimple, bd as SchemaOrgUnheadPlugin, b8 as SearchActionInput, aY as SoftwareAppSimple, bb as UnheadSchemaOrg, bj as UserConfig, a_ as VideoSimple, ad as VirtualLocationSimple, b0 as WebPageSimple, b5 as WebSiteSimple, bk as WithResolver, aJ as addressResolver, D as aggregateOfferResolver, K as aggregateRatingResolver, X as articleResolver, _ as bookEditionResolver, a0 as bookResolver, a3 as breadcrumbResolver, a5 as commentResolver, a7 as courseResolver, y as createSchemaOrgGraph, aa as eventResolver, ag as foodEstablishmentResolver, aj as howToResolver, an as howToStepDirectionResolver, al as howToStepResolver, ap as imageResolver, ar as itemListResolver, at as jobPostingResolver, av as listItemResolver, ax as localBusinessResolver, az as movieResolver, aB as offerResolver, aD as openingHoursResolver, aF as organizationResolver, aH as personResolver, ac as placeResolver, aM as productResolver, aO as questionResolver, aR as ratingResolver, b4 as readActionResolver, aV as recipeResolver, aX as reviewResolver, b9 as searchActionResolver, aZ as softwareAppResolver, a$ as videoResolver, ae as virtualLocationResolver, b2 as webPageResolver, b7 as webSiteResolver } from './shared/schema-org.D_ha4uKf.js';
|
|
3
3
|
import * as _unhead_schema from '@unhead/schema';
|
|
4
4
|
import { HeadEntryOptions } from '@unhead/schema';
|
|
5
5
|
import * as unhead from 'unhead';
|
|
@@ -23,7 +23,7 @@ interface ResolverOptions {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
declare function resolveMeta(meta: Partial<MetaInput>): ResolvedMeta;
|
|
26
|
-
declare function resolveNode<T extends Thing>(node: T, ctx: SchemaOrgGraph, resolver
|
|
26
|
+
declare function resolveNode<T extends Thing>(node: T, ctx: SchemaOrgGraph, resolver?: SchemaOrgNodeDefinition<T>): T;
|
|
27
27
|
declare function resolveNodeId<T extends Thing>(node: T, ctx: SchemaOrgGraph, resolver?: SchemaOrgNodeDefinition<T>, resolveAsRoot?: boolean): T;
|
|
28
28
|
declare function resolveRelation(input: Arrayable<any>, ctx: SchemaOrgGraph, fallbackResolver?: SchemaOrgNodeDefinition<any>, options?: ResolverOptions): any;
|
|
29
29
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { U as UnheadSchemaOrg } from './shared/schema-org.
|
|
2
|
-
export { H as HowToId, a1 as PluginSchemaOrg, P as PrimaryArticleId, k as PrimaryBookId, m as PrimaryBreadcrumbId, s as PrimaryEventId, X as PrimaryWebPageId, _ as PrimaryWebSiteId, M as ProductId, R as RecipeId, a2 as SchemaOrgUnheadPlugin, L 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, f as dedupeNodes, d as defineSchemaOrgResolver, t as eventResolver, w as foodEstablishmentResolver, x as howToResolver, z as howToStepDirectionResolver, y as howToStepResolver, A as imageResolver, B as itemListResolver, C as jobPostingResolver, D as listItemResolver, E as localBusinessResolver, F as movieResolver, n as normaliseNodes, G as offerResolver, I as openingHoursResolver, J as organizationResolver, K as personResolver, u as placeResolver, N as productResolver, O as questionResolver, Q as ratingResolver, Z as readActionResolver, S as recipeResolver, r as resolveMeta, a as resolveNode, b as resolveNodeId, e as resolveRelation, T as reviewResolver, a0 as searchActionResolver, V as softwareAppResolver, W as videoResolver, v as virtualLocationResolver, Y as webPageResolver, $ as webSiteResolver } from './shared/schema-org.
|
|
1
|
+
import { U as UnheadSchemaOrg } from './shared/schema-org.CwD-TP0q.mjs';
|
|
2
|
+
export { H as HowToId, a1 as PluginSchemaOrg, P as PrimaryArticleId, k as PrimaryBookId, m as PrimaryBreadcrumbId, s as PrimaryEventId, X as PrimaryWebPageId, _ as PrimaryWebSiteId, M as ProductId, R as RecipeId, a2 as SchemaOrgUnheadPlugin, L 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, f as dedupeNodes, d as defineSchemaOrgResolver, t as eventResolver, w as foodEstablishmentResolver, x as howToResolver, z as howToStepDirectionResolver, y as howToStepResolver, A as imageResolver, B as itemListResolver, C as jobPostingResolver, D as listItemResolver, E as localBusinessResolver, F as movieResolver, n as normaliseNodes, G as offerResolver, I as openingHoursResolver, J as organizationResolver, K as personResolver, u as placeResolver, N as productResolver, O as questionResolver, Q as ratingResolver, Z as readActionResolver, S as recipeResolver, r as resolveMeta, a as resolveNode, b as resolveNodeId, e as resolveRelation, T as reviewResolver, a0 as searchActionResolver, V as softwareAppResolver, W as videoResolver, v as virtualLocationResolver, Y as webPageResolver, $ as webSiteResolver } from './shared/schema-org.CwD-TP0q.mjs';
|
|
3
3
|
import { getActiveHead, useHead } from 'unhead';
|
|
4
|
+
import '@unhead/shared';
|
|
5
|
+
import 'defu';
|
|
4
6
|
import 'ufo';
|
|
5
7
|
import 'ohash';
|
|
6
8
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const shared = require('@unhead/shared');
|
|
4
|
+
const defu = require('defu');
|
|
3
5
|
const ufo = require('ufo');
|
|
4
6
|
const ohash = require('ohash');
|
|
5
7
|
|
|
@@ -1107,64 +1109,6 @@ const softwareAppResolver = defineSchemaOrgResolver({
|
|
|
1107
1109
|
}
|
|
1108
1110
|
});
|
|
1109
1111
|
|
|
1110
|
-
function defineHeadPlugin(plugin) {
|
|
1111
|
-
return plugin;
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
function hashCode(s) {
|
|
1115
|
-
let h = 9;
|
|
1116
|
-
for (let i = 0; i < s.length; )
|
|
1117
|
-
h = Math.imul(h ^ s.charCodeAt(i++), 9 ** 9);
|
|
1118
|
-
return ((h ^ h >>> 9) + 65536).toString(16).substring(1, 8).toLowerCase();
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
const sepSub = "%separator";
|
|
1122
|
-
function sub(p, token, isJson = false) {
|
|
1123
|
-
let val;
|
|
1124
|
-
if (token === "s" || token === "pageTitle") {
|
|
1125
|
-
val = p.pageTitle;
|
|
1126
|
-
} else if (token.includes(".")) {
|
|
1127
|
-
const dotIndex = token.indexOf(".");
|
|
1128
|
-
val = p[token.substring(0, dotIndex)]?.[token.substring(dotIndex + 1)];
|
|
1129
|
-
} else {
|
|
1130
|
-
val = p[token];
|
|
1131
|
-
}
|
|
1132
|
-
if (val !== void 0) {
|
|
1133
|
-
return isJson ? (val || "").replace(/"/g, '\\"') : val || "";
|
|
1134
|
-
}
|
|
1135
|
-
return void 0;
|
|
1136
|
-
}
|
|
1137
|
-
const sepSubRe = new RegExp(`${sepSub}(?:\\s*${sepSub})*`, "g");
|
|
1138
|
-
function processTemplateParams(s, p, sep, isJson = false) {
|
|
1139
|
-
if (typeof s !== "string" || !s.includes("%"))
|
|
1140
|
-
return s;
|
|
1141
|
-
let decoded = s;
|
|
1142
|
-
try {
|
|
1143
|
-
decoded = decodeURI(s);
|
|
1144
|
-
} catch {
|
|
1145
|
-
}
|
|
1146
|
-
const tokens = decoded.match(/%\w+(?:\.\w+)?/g);
|
|
1147
|
-
if (!tokens) {
|
|
1148
|
-
return s;
|
|
1149
|
-
}
|
|
1150
|
-
const hasSepSub = s.includes(sepSub);
|
|
1151
|
-
s = s.replace(/%\w+(?:\.\w+)?/g, (token) => {
|
|
1152
|
-
if (token === sepSub || !tokens.includes(token)) {
|
|
1153
|
-
return token;
|
|
1154
|
-
}
|
|
1155
|
-
const re = sub(p, token.slice(1), isJson);
|
|
1156
|
-
return re !== void 0 ? re : token;
|
|
1157
|
-
}).trim();
|
|
1158
|
-
if (hasSepSub) {
|
|
1159
|
-
if (s.endsWith(sepSub))
|
|
1160
|
-
s = s.slice(0, -sepSub.length);
|
|
1161
|
-
if (s.startsWith(sepSub))
|
|
1162
|
-
s = s.slice(sepSub.length);
|
|
1163
|
-
s = s.replace(sepSubRe, sep).trim();
|
|
1164
|
-
}
|
|
1165
|
-
return s;
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
1112
|
function loadResolver(resolver) {
|
|
1169
1113
|
switch (resolver) {
|
|
1170
1114
|
case "address":
|
|
@@ -1293,7 +1237,7 @@ function resolveNode(node, ctx, resolver) {
|
|
|
1293
1237
|
...node
|
|
1294
1238
|
};
|
|
1295
1239
|
}
|
|
1296
|
-
resolver
|
|
1240
|
+
resolver?.inheritMeta?.forEach((entry) => {
|
|
1297
1241
|
if (typeof entry === "string")
|
|
1298
1242
|
setIfEmpty(node, entry, ctx.meta[entry]);
|
|
1299
1243
|
else
|
|
@@ -1303,6 +1247,13 @@ function resolveNode(node, ctx, resolver) {
|
|
|
1303
1247
|
node = resolver.resolve(node, ctx);
|
|
1304
1248
|
for (const k in node) {
|
|
1305
1249
|
const v = node[k];
|
|
1250
|
+
if (Array.isArray(v)) {
|
|
1251
|
+
v.forEach((v2, k2) => {
|
|
1252
|
+
if (typeof v2 === "object" && v2?._resolver) {
|
|
1253
|
+
node[k][k2] = resolveRelation(v2, ctx, v2._resolver);
|
|
1254
|
+
}
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1306
1257
|
if (typeof v === "object" && v?._resolver)
|
|
1307
1258
|
node[k] = resolveRelation(v, ctx, v._resolver);
|
|
1308
1259
|
}
|
|
@@ -1337,7 +1288,7 @@ function resolveNodeId(node, ctx, resolver, resolveAsRoot = false) {
|
|
|
1337
1288
|
}
|
|
1338
1289
|
hashNodeData[key] = node[key];
|
|
1339
1290
|
}
|
|
1340
|
-
node["@id"] = prefixId(ctx.meta[prefix], `#/schema/${alias}/${node["@id"] || hashCode(JSON.stringify(hashNodeData))}`);
|
|
1291
|
+
node["@id"] = prefixId(ctx.meta[prefix], `#/schema/${alias}/${node["@id"] || shared.hashCode(JSON.stringify(hashNodeData))}`);
|
|
1341
1292
|
return node;
|
|
1342
1293
|
}
|
|
1343
1294
|
function resolveRelation(input, ctx, fallbackResolver, options = {}) {
|
|
@@ -1378,62 +1329,6 @@ function resolveRelation(input, ctx, fallbackResolver, options = {}) {
|
|
|
1378
1329
|
return ids;
|
|
1379
1330
|
}
|
|
1380
1331
|
|
|
1381
|
-
function isPlainObject(value) {
|
|
1382
|
-
if (value === null || typeof value !== "object") {
|
|
1383
|
-
return false;
|
|
1384
|
-
}
|
|
1385
|
-
const prototype = Object.getPrototypeOf(value);
|
|
1386
|
-
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
|
|
1387
|
-
return false;
|
|
1388
|
-
}
|
|
1389
|
-
if (Symbol.iterator in value) {
|
|
1390
|
-
return false;
|
|
1391
|
-
}
|
|
1392
|
-
if (Symbol.toStringTag in value) {
|
|
1393
|
-
return Object.prototype.toString.call(value) === "[object Module]";
|
|
1394
|
-
}
|
|
1395
|
-
return true;
|
|
1396
|
-
}
|
|
1397
|
-
|
|
1398
|
-
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
1399
|
-
if (!isPlainObject(defaults)) {
|
|
1400
|
-
return _defu(baseObject, {}, namespace, merger);
|
|
1401
|
-
}
|
|
1402
|
-
const object = Object.assign({}, defaults);
|
|
1403
|
-
for (const key in baseObject) {
|
|
1404
|
-
if (key === "__proto__" || key === "constructor") {
|
|
1405
|
-
continue;
|
|
1406
|
-
}
|
|
1407
|
-
const value = baseObject[key];
|
|
1408
|
-
if (value === null || value === void 0) {
|
|
1409
|
-
continue;
|
|
1410
|
-
}
|
|
1411
|
-
if (merger && merger(object, key, value, namespace)) {
|
|
1412
|
-
continue;
|
|
1413
|
-
}
|
|
1414
|
-
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
1415
|
-
object[key] = [...value, ...object[key]];
|
|
1416
|
-
} else if (isPlainObject(value) && isPlainObject(object[key])) {
|
|
1417
|
-
object[key] = _defu(
|
|
1418
|
-
value,
|
|
1419
|
-
object[key],
|
|
1420
|
-
(namespace ? `${namespace}.` : "") + key.toString(),
|
|
1421
|
-
merger
|
|
1422
|
-
);
|
|
1423
|
-
} else {
|
|
1424
|
-
object[key] = value;
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1427
|
-
return object;
|
|
1428
|
-
}
|
|
1429
|
-
function createDefu(merger) {
|
|
1430
|
-
return (...arguments_) => (
|
|
1431
|
-
// eslint-disable-next-line unicorn/no-array-reduce
|
|
1432
|
-
arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
|
|
1433
|
-
);
|
|
1434
|
-
}
|
|
1435
|
-
const defu = createDefu();
|
|
1436
|
-
|
|
1437
1332
|
function groupBy(array, predicate) {
|
|
1438
1333
|
return array.reduce((acc, value, index, array2) => {
|
|
1439
1334
|
const key = predicate(value, index, array2);
|
|
@@ -1446,7 +1341,7 @@ function groupBy(array, predicate) {
|
|
|
1446
1341
|
function uniqueBy(array, predicate) {
|
|
1447
1342
|
return Object.values(groupBy(array, predicate)).map((a) => a[a.length - 1]);
|
|
1448
1343
|
}
|
|
1449
|
-
const merge = createDefu((object, key, value) => {
|
|
1344
|
+
const merge = defu.createDefu((object, key, value) => {
|
|
1450
1345
|
if (Array.isArray(object[key])) {
|
|
1451
1346
|
if (Array.isArray(value)) {
|
|
1452
1347
|
const map = {};
|
|
@@ -1528,10 +1423,8 @@ function createSchemaOrgGraph() {
|
|
|
1528
1423
|
ctx.meta = resolveMeta({ ...meta });
|
|
1529
1424
|
ctx.nodes.forEach((node, key) => {
|
|
1530
1425
|
const resolver = node._resolver;
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
node = resolveNodeId(node, ctx, resolver, true);
|
|
1534
|
-
}
|
|
1426
|
+
node = resolveNode(node, ctx, resolver);
|
|
1427
|
+
node = resolveNodeId(node, ctx, resolver, true);
|
|
1535
1428
|
ctx.nodes[key] = node;
|
|
1536
1429
|
});
|
|
1537
1430
|
ctx.nodes = dedupeNodes(ctx.nodes);
|
|
@@ -1567,7 +1460,7 @@ function SchemaOrgUnheadPlugin(config, meta, options) {
|
|
|
1567
1460
|
config = resolveMeta({ ...config });
|
|
1568
1461
|
let graph;
|
|
1569
1462
|
let resolvedMeta = {};
|
|
1570
|
-
return defineHeadPlugin((head) => ({
|
|
1463
|
+
return shared.defineHeadPlugin((head) => ({
|
|
1571
1464
|
key: "schema-org",
|
|
1572
1465
|
hooks: {
|
|
1573
1466
|
"entries:resolve": () => {
|
|
@@ -1631,7 +1524,7 @@ function SchemaOrgUnheadPlugin(config, meta, options) {
|
|
|
1631
1524
|
"@graph": resolvedGraph
|
|
1632
1525
|
}, (_, value) => {
|
|
1633
1526
|
if (typeof value !== "object")
|
|
1634
|
-
return processTemplateParams(value, head._templateParams, head._separator);
|
|
1527
|
+
return shared.processTemplateParams(value, head._templateParams, head._separator);
|
|
1635
1528
|
return value;
|
|
1636
1529
|
}, minify ? 0 : 2);
|
|
1637
1530
|
return;
|
|
@@ -1648,7 +1541,7 @@ function SchemaOrgUnheadPlugin(config, meta, options) {
|
|
|
1648
1541
|
firstNodeKey = k;
|
|
1649
1542
|
continue;
|
|
1650
1543
|
}
|
|
1651
|
-
ctx.tags[firstNodeKey].props = defu(ctx.tags[firstNodeKey].props, tag.props);
|
|
1544
|
+
ctx.tags[firstNodeKey].props = defu.defu(ctx.tags[firstNodeKey].props, tag.props);
|
|
1652
1545
|
delete ctx.tags[firstNodeKey].props.nodes;
|
|
1653
1546
|
ctx.tags[k] = false;
|
|
1654
1547
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { hashCode, defineHeadPlugin, processTemplateParams } from '@unhead/shared';
|
|
2
|
+
import { createDefu, defu } from 'defu';
|
|
1
3
|
import { hasProtocol, withBase, withoutTrailingSlash, hasTrailingSlash, withTrailingSlash, joinURL } from 'ufo';
|
|
2
4
|
import { hash } from 'ohash';
|
|
3
5
|
|
|
@@ -1105,64 +1107,6 @@ const softwareAppResolver = defineSchemaOrgResolver({
|
|
|
1105
1107
|
}
|
|
1106
1108
|
});
|
|
1107
1109
|
|
|
1108
|
-
function defineHeadPlugin(plugin) {
|
|
1109
|
-
return plugin;
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
function hashCode(s) {
|
|
1113
|
-
let h = 9;
|
|
1114
|
-
for (let i = 0; i < s.length; )
|
|
1115
|
-
h = Math.imul(h ^ s.charCodeAt(i++), 9 ** 9);
|
|
1116
|
-
return ((h ^ h >>> 9) + 65536).toString(16).substring(1, 8).toLowerCase();
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
const sepSub = "%separator";
|
|
1120
|
-
function sub(p, token, isJson = false) {
|
|
1121
|
-
let val;
|
|
1122
|
-
if (token === "s" || token === "pageTitle") {
|
|
1123
|
-
val = p.pageTitle;
|
|
1124
|
-
} else if (token.includes(".")) {
|
|
1125
|
-
const dotIndex = token.indexOf(".");
|
|
1126
|
-
val = p[token.substring(0, dotIndex)]?.[token.substring(dotIndex + 1)];
|
|
1127
|
-
} else {
|
|
1128
|
-
val = p[token];
|
|
1129
|
-
}
|
|
1130
|
-
if (val !== void 0) {
|
|
1131
|
-
return isJson ? (val || "").replace(/"/g, '\\"') : val || "";
|
|
1132
|
-
}
|
|
1133
|
-
return void 0;
|
|
1134
|
-
}
|
|
1135
|
-
const sepSubRe = new RegExp(`${sepSub}(?:\\s*${sepSub})*`, "g");
|
|
1136
|
-
function processTemplateParams(s, p, sep, isJson = false) {
|
|
1137
|
-
if (typeof s !== "string" || !s.includes("%"))
|
|
1138
|
-
return s;
|
|
1139
|
-
let decoded = s;
|
|
1140
|
-
try {
|
|
1141
|
-
decoded = decodeURI(s);
|
|
1142
|
-
} catch {
|
|
1143
|
-
}
|
|
1144
|
-
const tokens = decoded.match(/%\w+(?:\.\w+)?/g);
|
|
1145
|
-
if (!tokens) {
|
|
1146
|
-
return s;
|
|
1147
|
-
}
|
|
1148
|
-
const hasSepSub = s.includes(sepSub);
|
|
1149
|
-
s = s.replace(/%\w+(?:\.\w+)?/g, (token) => {
|
|
1150
|
-
if (token === sepSub || !tokens.includes(token)) {
|
|
1151
|
-
return token;
|
|
1152
|
-
}
|
|
1153
|
-
const re = sub(p, token.slice(1), isJson);
|
|
1154
|
-
return re !== void 0 ? re : token;
|
|
1155
|
-
}).trim();
|
|
1156
|
-
if (hasSepSub) {
|
|
1157
|
-
if (s.endsWith(sepSub))
|
|
1158
|
-
s = s.slice(0, -sepSub.length);
|
|
1159
|
-
if (s.startsWith(sepSub))
|
|
1160
|
-
s = s.slice(sepSub.length);
|
|
1161
|
-
s = s.replace(sepSubRe, sep).trim();
|
|
1162
|
-
}
|
|
1163
|
-
return s;
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
1110
|
function loadResolver(resolver) {
|
|
1167
1111
|
switch (resolver) {
|
|
1168
1112
|
case "address":
|
|
@@ -1291,7 +1235,7 @@ function resolveNode(node, ctx, resolver) {
|
|
|
1291
1235
|
...node
|
|
1292
1236
|
};
|
|
1293
1237
|
}
|
|
1294
|
-
resolver
|
|
1238
|
+
resolver?.inheritMeta?.forEach((entry) => {
|
|
1295
1239
|
if (typeof entry === "string")
|
|
1296
1240
|
setIfEmpty(node, entry, ctx.meta[entry]);
|
|
1297
1241
|
else
|
|
@@ -1301,6 +1245,13 @@ function resolveNode(node, ctx, resolver) {
|
|
|
1301
1245
|
node = resolver.resolve(node, ctx);
|
|
1302
1246
|
for (const k in node) {
|
|
1303
1247
|
const v = node[k];
|
|
1248
|
+
if (Array.isArray(v)) {
|
|
1249
|
+
v.forEach((v2, k2) => {
|
|
1250
|
+
if (typeof v2 === "object" && v2?._resolver) {
|
|
1251
|
+
node[k][k2] = resolveRelation(v2, ctx, v2._resolver);
|
|
1252
|
+
}
|
|
1253
|
+
});
|
|
1254
|
+
}
|
|
1304
1255
|
if (typeof v === "object" && v?._resolver)
|
|
1305
1256
|
node[k] = resolveRelation(v, ctx, v._resolver);
|
|
1306
1257
|
}
|
|
@@ -1376,62 +1327,6 @@ function resolveRelation(input, ctx, fallbackResolver, options = {}) {
|
|
|
1376
1327
|
return ids;
|
|
1377
1328
|
}
|
|
1378
1329
|
|
|
1379
|
-
function isPlainObject(value) {
|
|
1380
|
-
if (value === null || typeof value !== "object") {
|
|
1381
|
-
return false;
|
|
1382
|
-
}
|
|
1383
|
-
const prototype = Object.getPrototypeOf(value);
|
|
1384
|
-
if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) {
|
|
1385
|
-
return false;
|
|
1386
|
-
}
|
|
1387
|
-
if (Symbol.iterator in value) {
|
|
1388
|
-
return false;
|
|
1389
|
-
}
|
|
1390
|
-
if (Symbol.toStringTag in value) {
|
|
1391
|
-
return Object.prototype.toString.call(value) === "[object Module]";
|
|
1392
|
-
}
|
|
1393
|
-
return true;
|
|
1394
|
-
}
|
|
1395
|
-
|
|
1396
|
-
function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
1397
|
-
if (!isPlainObject(defaults)) {
|
|
1398
|
-
return _defu(baseObject, {}, namespace, merger);
|
|
1399
|
-
}
|
|
1400
|
-
const object = Object.assign({}, defaults);
|
|
1401
|
-
for (const key in baseObject) {
|
|
1402
|
-
if (key === "__proto__" || key === "constructor") {
|
|
1403
|
-
continue;
|
|
1404
|
-
}
|
|
1405
|
-
const value = baseObject[key];
|
|
1406
|
-
if (value === null || value === void 0) {
|
|
1407
|
-
continue;
|
|
1408
|
-
}
|
|
1409
|
-
if (merger && merger(object, key, value, namespace)) {
|
|
1410
|
-
continue;
|
|
1411
|
-
}
|
|
1412
|
-
if (Array.isArray(value) && Array.isArray(object[key])) {
|
|
1413
|
-
object[key] = [...value, ...object[key]];
|
|
1414
|
-
} else if (isPlainObject(value) && isPlainObject(object[key])) {
|
|
1415
|
-
object[key] = _defu(
|
|
1416
|
-
value,
|
|
1417
|
-
object[key],
|
|
1418
|
-
(namespace ? `${namespace}.` : "") + key.toString(),
|
|
1419
|
-
merger
|
|
1420
|
-
);
|
|
1421
|
-
} else {
|
|
1422
|
-
object[key] = value;
|
|
1423
|
-
}
|
|
1424
|
-
}
|
|
1425
|
-
return object;
|
|
1426
|
-
}
|
|
1427
|
-
function createDefu(merger) {
|
|
1428
|
-
return (...arguments_) => (
|
|
1429
|
-
// eslint-disable-next-line unicorn/no-array-reduce
|
|
1430
|
-
arguments_.reduce((p, c) => _defu(p, c, "", merger), {})
|
|
1431
|
-
);
|
|
1432
|
-
}
|
|
1433
|
-
const defu = createDefu();
|
|
1434
|
-
|
|
1435
1330
|
function groupBy(array, predicate) {
|
|
1436
1331
|
return array.reduce((acc, value, index, array2) => {
|
|
1437
1332
|
const key = predicate(value, index, array2);
|
|
@@ -1526,10 +1421,8 @@ function createSchemaOrgGraph() {
|
|
|
1526
1421
|
ctx.meta = resolveMeta({ ...meta });
|
|
1527
1422
|
ctx.nodes.forEach((node, key) => {
|
|
1528
1423
|
const resolver = node._resolver;
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
node = resolveNodeId(node, ctx, resolver, true);
|
|
1532
|
-
}
|
|
1424
|
+
node = resolveNode(node, ctx, resolver);
|
|
1425
|
+
node = resolveNodeId(node, ctx, resolver, true);
|
|
1533
1426
|
ctx.nodes[key] = node;
|
|
1534
1427
|
});
|
|
1535
1428
|
ctx.nodes = dedupeNodes(ctx.nodes);
|
package/dist/vue.cjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const plugin = require('./shared/schema-org.
|
|
3
|
+
const plugin = require('./shared/schema-org.B_EoSq_p.cjs');
|
|
4
4
|
const vue = require('vue');
|
|
5
5
|
const vue$1 = require('@unhead/vue');
|
|
6
|
+
require('@unhead/shared');
|
|
7
|
+
require('defu');
|
|
6
8
|
require('ufo');
|
|
7
9
|
require('ohash');
|
|
8
10
|
|
package/dist/vue.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, F as FoodEstablishment, 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, A as Arrayable, T as Thing } from './shared/schema-org.
|
|
2
|
-
export { M as MetaInput, bc as PluginSchemaOrg, bd as SchemaOrgUnheadPlugin, bj as UserConfig } from './shared/schema-org.
|
|
1
|
+
import { P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, F as FoodEstablishment, 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, A as Arrayable, T as Thing } from './shared/schema-org.D_ha4uKf.cjs';
|
|
2
|
+
export { M as MetaInput, bc as PluginSchemaOrg, bd as SchemaOrgUnheadPlugin, bj as UserConfig } from './shared/schema-org.D_ha4uKf.cjs';
|
|
3
3
|
import { ComponentResolver } from 'unplugin-vue-components';
|
|
4
4
|
import { defineComponent } from 'vue';
|
|
5
5
|
import * as _unhead_vue from '@unhead/vue';
|
package/dist/vue.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, F as FoodEstablishment, 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, A as Arrayable, T as Thing } from './shared/schema-org.
|
|
2
|
-
export { M as MetaInput, bc as PluginSchemaOrg, bd as SchemaOrgUnheadPlugin, bj as UserConfig } from './shared/schema-org.
|
|
1
|
+
import { P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, F as FoodEstablishment, 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, A as Arrayable, T as Thing } from './shared/schema-org.D_ha4uKf.mjs';
|
|
2
|
+
export { M as MetaInput, bc as PluginSchemaOrg, bd as SchemaOrgUnheadPlugin, bj as UserConfig } from './shared/schema-org.D_ha4uKf.mjs';
|
|
3
3
|
import { ComponentResolver } from 'unplugin-vue-components';
|
|
4
4
|
import { defineComponent } from 'vue';
|
|
5
5
|
import * as _unhead_vue from '@unhead/vue';
|
package/dist/vue.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, F as FoodEstablishment, 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, A as Arrayable, T as Thing } from './shared/schema-org.
|
|
2
|
-
export { M as MetaInput, bc as PluginSchemaOrg, bd as SchemaOrgUnheadPlugin, bj as UserConfig } from './shared/schema-org.
|
|
1
|
+
import { P as PostalAddress, c as AggregateOffer, d as AggregateRating, e as Article, B as BreadcrumbList, C as Comment, E as Event, F as FoodEstablishment, 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, A as Arrayable, T as Thing } from './shared/schema-org.D_ha4uKf.js';
|
|
2
|
+
export { M as MetaInput, bc as PluginSchemaOrg, bd as SchemaOrgUnheadPlugin, bj as UserConfig } from './shared/schema-org.D_ha4uKf.js';
|
|
3
3
|
import { ComponentResolver } from 'unplugin-vue-components';
|
|
4
4
|
import { defineComponent } from 'vue';
|
|
5
5
|
import * as _unhead_vue from '@unhead/vue';
|
package/dist/vue.mjs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { U as UnheadSchemaOrg } from './shared/schema-org.
|
|
2
|
-
export { a1 as PluginSchemaOrg, a2 as SchemaOrgUnheadPlugin } from './shared/schema-org.
|
|
1
|
+
import { U as UnheadSchemaOrg } from './shared/schema-org.CwD-TP0q.mjs';
|
|
2
|
+
export { a1 as PluginSchemaOrg, a2 as SchemaOrgUnheadPlugin } from './shared/schema-org.CwD-TP0q.mjs';
|
|
3
3
|
import { defineComponent, ref, computed, unref, h } from 'vue';
|
|
4
4
|
import { injectHead, useHead } from '@unhead/vue';
|
|
5
|
+
import '@unhead/shared';
|
|
6
|
+
import 'defu';
|
|
5
7
|
import 'ufo';
|
|
6
8
|
import 'ohash';
|
|
7
9
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unhead/schema-org",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.11.
|
|
4
|
+
"version": "1.11.16",
|
|
5
5
|
"description": "Unhead Schema.org for Simple and Automated Google Rich Results",
|
|
6
6
|
"author": "Harlan Wilton <harlan@harlanzw.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"vue.d.ts"
|
|
49
49
|
],
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@unhead/vue": "^1.11.
|
|
52
|
-
"unhead": "^1.11.
|
|
51
|
+
"@unhead/vue": "^1.11.14",
|
|
52
|
+
"unhead": "^1.11.14"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@unhead/vue": {
|
|
@@ -57,21 +57,22 @@
|
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
+
"defu": "^6.1.4",
|
|
60
61
|
"ohash": "^1.1.4",
|
|
61
|
-
"ufo": "^1.5.4"
|
|
62
|
+
"ufo": "^1.5.4",
|
|
63
|
+
"@unhead/schema": "1.11.16",
|
|
64
|
+
"@unhead/vue": "1.11.16",
|
|
65
|
+
"unhead": "1.11.16",
|
|
66
|
+
"@unhead/shared": "1.11.16"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"unplugin-vue-components": "^0.28.0"
|
|
62
70
|
},
|
|
63
71
|
"build": {
|
|
64
72
|
"external": [
|
|
65
73
|
"vue"
|
|
66
74
|
]
|
|
67
75
|
},
|
|
68
|
-
"devDependencies": {
|
|
69
|
-
"unplugin-vue-components": "^0.27.5",
|
|
70
|
-
"@unhead/shared": "1.11.14",
|
|
71
|
-
"@unhead/vue": "1.11.14",
|
|
72
|
-
"@unhead/schema": "1.11.14",
|
|
73
|
-
"unhead": "1.11.14"
|
|
74
|
-
},
|
|
75
76
|
"scripts": {
|
|
76
77
|
"build": "unbuild .",
|
|
77
78
|
"stub": "unbuild . --stub",
|
package/vue.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './dist/vue'
|
|
1
|
+
export * from './dist/vue'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|