@unhead/schema-org 1.8.0-beta.2 → 1.8.0-beta.6
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 +6 -1
- package/dist/index.d.cts +11 -5
- package/dist/index.d.mts +11 -5
- package/dist/index.d.ts +11 -5
- package/dist/index.mjs +8 -3
- package/dist/shared/{schema-org.723727e4.cjs → schema-org.508fa88d.cjs} +22 -5
- package/dist/shared/{schema-org.90e1acdc.mjs → schema-org.662e1dca.mjs} +22 -6
- package/dist/shared/{schema-org.1f290788.d.cts → schema-org.96c8f113.d.cts} +9 -4
- package/dist/shared/{schema-org.1f290788.d.mts → schema-org.96c8f113.d.mts} +9 -4
- package/dist/shared/{schema-org.1f290788.d.ts → schema-org.96c8f113.d.ts} +9 -4
- package/dist/vue.cjs +3 -2
- package/dist/vue.d.cts +10 -5
- package/dist/vue.d.mts +10 -5
- package/dist/vue.d.ts +10 -5
- package/dist/vue.mjs +5 -3
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const plugin = require('./shared/schema-org.
|
|
3
|
+
const plugin = require('./shared/schema-org.508fa88d.cjs');
|
|
4
4
|
const unhead = require('unhead');
|
|
5
5
|
require('@unhead/shared');
|
|
6
6
|
require('ufo');
|
|
@@ -114,6 +114,10 @@ function defineBookEdition(input) {
|
|
|
114
114
|
return provideResolver(input, "bookEdition");
|
|
115
115
|
}
|
|
116
116
|
function useSchemaOrg(input) {
|
|
117
|
+
const head = unhead.getActiveHead();
|
|
118
|
+
if (!head)
|
|
119
|
+
return;
|
|
120
|
+
head.use(plugin.UnheadSchemaOrg());
|
|
117
121
|
return unhead.useHead({
|
|
118
122
|
script: [
|
|
119
123
|
{
|
|
@@ -136,6 +140,7 @@ exports.PrimaryWebSiteId = plugin.PrimaryWebSiteId;
|
|
|
136
140
|
exports.ProductId = plugin.ProductId;
|
|
137
141
|
exports.RecipeId = plugin.RecipeId;
|
|
138
142
|
exports.SchemaOrgUnheadPlugin = plugin.SchemaOrgUnheadPlugin;
|
|
143
|
+
exports.UnheadSchemaOrg = plugin.UnheadSchemaOrg;
|
|
139
144
|
exports.addressResolver = plugin.addressResolver;
|
|
140
145
|
exports.aggregateOfferResolver = plugin.aggregateOfferResolver;
|
|
141
146
|
exports.aggregateRatingResolver = plugin.aggregateRatingResolver;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
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.
|
|
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,
|
|
3
|
-
import '@unhead/schema';
|
|
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.96c8f113.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, bj as Id, bi as IdReference, bd as Identity, an as ImageSimple, al as ItemListSimple, ap as JobPostingSimple, ar as ListItemSimple, at as LocalBusinessSimple, av as MovieSimple, bb as NodeRelation, bc as NodeRelations, aQ as NutritionInformation, ax as OfferSimple, az as OpeningHoursSimple, bf as OptionalSchemaOrgPrefix, aB as OrganizationSimple, aD as PersonSimple, ac as PlaceSimple, b9 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, be as ResolvableDate, aV as ReviewSimple, ba as SchemaOrgUnheadPlugin, b5 as SearchActionInput, aT as SoftwareAppSimple, b8 as UnheadSchemaOrg, bg as UserConfig, aX as VideoSimple, aa as VirtualLocationSimple, aZ as WebPageSimple, b2 as WebSiteSimple, bh 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.96c8f113.cjs';
|
|
3
|
+
import * as _unhead_schema from '@unhead/schema';
|
|
4
|
+
import * as unhead from 'unhead';
|
|
4
5
|
|
|
5
6
|
declare function defineSchemaOrgResolver<T extends Thing>(schema: SchemaOrgNodeDefinition<T>): SchemaOrgNodeDefinition<T>;
|
|
6
7
|
|
|
@@ -66,6 +67,11 @@ declare function defineSearchAction<T extends Record<string, any>>(input?: Searc
|
|
|
66
67
|
declare function defineReadAction<T extends Record<string, any>>(input?: ReadAction & T): ReadAction & T;
|
|
67
68
|
declare function defineSoftwareApp<T extends Record<string, any>>(input?: SoftwareApp & T): SoftwareApp & T;
|
|
68
69
|
declare function defineBookEdition<T extends Record<string, any>>(input?: BookEdition & T): BookEdition & T;
|
|
69
|
-
|
|
70
|
+
type UseSchemaOrgInput = Arrayable<Thing | Record<string, any>>;
|
|
71
|
+
declare function useSchemaOrg(input: UseSchemaOrgInput): void | _unhead_schema.ActiveHeadEntry<unhead.UseHeadInput<{
|
|
72
|
+
script: {
|
|
73
|
+
nodes: UseSchemaOrgInput;
|
|
74
|
+
};
|
|
75
|
+
}>>;
|
|
70
76
|
|
|
71
|
-
export { AggregateOffer, AggregateRating, Arrayable, Article, Book, BookEdition, BreadcrumbList, Comment, Course, Event, HowTo, HowToStep, ImageObject, ItemList, JobPosting, ListItem, LocalBusiness, MetaInput, Movie, Offer, OpeningHoursSpecification, Organization, Person, Place, PostalAddress, Product, Question, ReadAction, Recipe, ResolvedMeta, Review, SchemaOrgGraph, SchemaOrgNode, SchemaOrgNodeDefinition, SearchAction, SoftwareApp, Thing, VideoObject, VirtualLocation, WebPage, WebSite, dedupeNodes, defineAddress, defineAggregateOffer, defineAggregateRating, defineArticle, defineBook, defineBookEdition, defineBreadcrumb, defineComment, defineCourse, defineEvent, defineHowTo, defineHowToStep, defineImage, defineItemList, defineJobPosting, defineListItem, defineLocalBusiness, defineMovie, defineOffer, defineOpeningHours, defineOrganization, definePerson, definePlace, defineProduct, defineQuestion, defineReadAction, defineRecipe, defineReview, defineSchemaOrgResolver, defineSearchAction, defineSoftwareApp, defineVideo, defineVirtualLocation, defineWebPage, defineWebSite, normaliseNodes, resolveMeta, resolveNode, resolveNodeId, resolveRelation, useSchemaOrg };
|
|
77
|
+
export { AggregateOffer, AggregateRating, Arrayable, Article, Book, BookEdition, BreadcrumbList, Comment, Course, Event, HowTo, HowToStep, ImageObject, ItemList, JobPosting, ListItem, LocalBusiness, MetaInput, Movie, Offer, OpeningHoursSpecification, Organization, Person, Place, PostalAddress, Product, Question, ReadAction, Recipe, ResolvedMeta, Review, SchemaOrgGraph, SchemaOrgNode, SchemaOrgNodeDefinition, SearchAction, SoftwareApp, Thing, type UseSchemaOrgInput, VideoObject, VirtualLocation, WebPage, WebSite, dedupeNodes, defineAddress, defineAggregateOffer, defineAggregateRating, defineArticle, defineBook, defineBookEdition, defineBreadcrumb, defineComment, defineCourse, defineEvent, defineHowTo, defineHowToStep, defineImage, defineItemList, defineJobPosting, defineListItem, defineLocalBusiness, defineMovie, defineOffer, defineOpeningHours, defineOrganization, definePerson, definePlace, defineProduct, defineQuestion, defineReadAction, defineRecipe, defineReview, defineSchemaOrgResolver, defineSearchAction, defineSoftwareApp, defineVideo, defineVirtualLocation, defineWebPage, defineWebSite, normaliseNodes, resolveMeta, resolveNode, resolveNodeId, resolveRelation, useSchemaOrg };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
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.
|
|
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,
|
|
3
|
-
import '@unhead/schema';
|
|
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.96c8f113.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, bj as Id, bi as IdReference, bd as Identity, an as ImageSimple, al as ItemListSimple, ap as JobPostingSimple, ar as ListItemSimple, at as LocalBusinessSimple, av as MovieSimple, bb as NodeRelation, bc as NodeRelations, aQ as NutritionInformation, ax as OfferSimple, az as OpeningHoursSimple, bf as OptionalSchemaOrgPrefix, aB as OrganizationSimple, aD as PersonSimple, ac as PlaceSimple, b9 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, be as ResolvableDate, aV as ReviewSimple, ba as SchemaOrgUnheadPlugin, b5 as SearchActionInput, aT as SoftwareAppSimple, b8 as UnheadSchemaOrg, bg as UserConfig, aX as VideoSimple, aa as VirtualLocationSimple, aZ as WebPageSimple, b2 as WebSiteSimple, bh 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.96c8f113.mjs';
|
|
3
|
+
import * as _unhead_schema from '@unhead/schema';
|
|
4
|
+
import * as unhead from 'unhead';
|
|
4
5
|
|
|
5
6
|
declare function defineSchemaOrgResolver<T extends Thing>(schema: SchemaOrgNodeDefinition<T>): SchemaOrgNodeDefinition<T>;
|
|
6
7
|
|
|
@@ -66,6 +67,11 @@ declare function defineSearchAction<T extends Record<string, any>>(input?: Searc
|
|
|
66
67
|
declare function defineReadAction<T extends Record<string, any>>(input?: ReadAction & T): ReadAction & T;
|
|
67
68
|
declare function defineSoftwareApp<T extends Record<string, any>>(input?: SoftwareApp & T): SoftwareApp & T;
|
|
68
69
|
declare function defineBookEdition<T extends Record<string, any>>(input?: BookEdition & T): BookEdition & T;
|
|
69
|
-
|
|
70
|
+
type UseSchemaOrgInput = Arrayable<Thing | Record<string, any>>;
|
|
71
|
+
declare function useSchemaOrg(input: UseSchemaOrgInput): void | _unhead_schema.ActiveHeadEntry<unhead.UseHeadInput<{
|
|
72
|
+
script: {
|
|
73
|
+
nodes: UseSchemaOrgInput;
|
|
74
|
+
};
|
|
75
|
+
}>>;
|
|
70
76
|
|
|
71
|
-
export { AggregateOffer, AggregateRating, Arrayable, Article, Book, BookEdition, BreadcrumbList, Comment, Course, Event, HowTo, HowToStep, ImageObject, ItemList, JobPosting, ListItem, LocalBusiness, MetaInput, Movie, Offer, OpeningHoursSpecification, Organization, Person, Place, PostalAddress, Product, Question, ReadAction, Recipe, ResolvedMeta, Review, SchemaOrgGraph, SchemaOrgNode, SchemaOrgNodeDefinition, SearchAction, SoftwareApp, Thing, VideoObject, VirtualLocation, WebPage, WebSite, dedupeNodes, defineAddress, defineAggregateOffer, defineAggregateRating, defineArticle, defineBook, defineBookEdition, defineBreadcrumb, defineComment, defineCourse, defineEvent, defineHowTo, defineHowToStep, defineImage, defineItemList, defineJobPosting, defineListItem, defineLocalBusiness, defineMovie, defineOffer, defineOpeningHours, defineOrganization, definePerson, definePlace, defineProduct, defineQuestion, defineReadAction, defineRecipe, defineReview, defineSchemaOrgResolver, defineSearchAction, defineSoftwareApp, defineVideo, defineVirtualLocation, defineWebPage, defineWebSite, normaliseNodes, resolveMeta, resolveNode, resolveNodeId, resolveRelation, useSchemaOrg };
|
|
77
|
+
export { AggregateOffer, AggregateRating, Arrayable, Article, Book, BookEdition, BreadcrumbList, Comment, Course, Event, HowTo, HowToStep, ImageObject, ItemList, JobPosting, ListItem, LocalBusiness, MetaInput, Movie, Offer, OpeningHoursSpecification, Organization, Person, Place, PostalAddress, Product, Question, ReadAction, Recipe, ResolvedMeta, Review, SchemaOrgGraph, SchemaOrgNode, SchemaOrgNodeDefinition, SearchAction, SoftwareApp, Thing, type UseSchemaOrgInput, VideoObject, VirtualLocation, WebPage, WebSite, dedupeNodes, defineAddress, defineAggregateOffer, defineAggregateRating, defineArticle, defineBook, defineBookEdition, defineBreadcrumb, defineComment, defineCourse, defineEvent, defineHowTo, defineHowToStep, defineImage, defineItemList, defineJobPosting, defineListItem, defineLocalBusiness, defineMovie, defineOffer, defineOpeningHours, defineOrganization, definePerson, definePlace, defineProduct, defineQuestion, defineReadAction, defineRecipe, defineReview, defineSchemaOrgResolver, defineSearchAction, defineSoftwareApp, defineVideo, defineVirtualLocation, defineWebPage, defineWebSite, normaliseNodes, resolveMeta, resolveNode, resolveNodeId, resolveRelation, useSchemaOrg };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
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.
|
|
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,
|
|
3
|
-
import '@unhead/schema';
|
|
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.96c8f113.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, bj as Id, bi as IdReference, bd as Identity, an as ImageSimple, al as ItemListSimple, ap as JobPostingSimple, ar as ListItemSimple, at as LocalBusinessSimple, av as MovieSimple, bb as NodeRelation, bc as NodeRelations, aQ as NutritionInformation, ax as OfferSimple, az as OpeningHoursSimple, bf as OptionalSchemaOrgPrefix, aB as OrganizationSimple, aD as PersonSimple, ac as PlaceSimple, b9 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, be as ResolvableDate, aV as ReviewSimple, ba as SchemaOrgUnheadPlugin, b5 as SearchActionInput, aT as SoftwareAppSimple, b8 as UnheadSchemaOrg, bg as UserConfig, aX as VideoSimple, aa as VirtualLocationSimple, aZ as WebPageSimple, b2 as WebSiteSimple, bh 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.96c8f113.js';
|
|
3
|
+
import * as _unhead_schema from '@unhead/schema';
|
|
4
|
+
import * as unhead from 'unhead';
|
|
4
5
|
|
|
5
6
|
declare function defineSchemaOrgResolver<T extends Thing>(schema: SchemaOrgNodeDefinition<T>): SchemaOrgNodeDefinition<T>;
|
|
6
7
|
|
|
@@ -66,6 +67,11 @@ declare function defineSearchAction<T extends Record<string, any>>(input?: Searc
|
|
|
66
67
|
declare function defineReadAction<T extends Record<string, any>>(input?: ReadAction & T): ReadAction & T;
|
|
67
68
|
declare function defineSoftwareApp<T extends Record<string, any>>(input?: SoftwareApp & T): SoftwareApp & T;
|
|
68
69
|
declare function defineBookEdition<T extends Record<string, any>>(input?: BookEdition & T): BookEdition & T;
|
|
69
|
-
|
|
70
|
+
type UseSchemaOrgInput = Arrayable<Thing | Record<string, any>>;
|
|
71
|
+
declare function useSchemaOrg(input: UseSchemaOrgInput): void | _unhead_schema.ActiveHeadEntry<unhead.UseHeadInput<{
|
|
72
|
+
script: {
|
|
73
|
+
nodes: UseSchemaOrgInput;
|
|
74
|
+
};
|
|
75
|
+
}>>;
|
|
70
76
|
|
|
71
|
-
export { AggregateOffer, AggregateRating, Arrayable, Article, Book, BookEdition, BreadcrumbList, Comment, Course, Event, HowTo, HowToStep, ImageObject, ItemList, JobPosting, ListItem, LocalBusiness, MetaInput, Movie, Offer, OpeningHoursSpecification, Organization, Person, Place, PostalAddress, Product, Question, ReadAction, Recipe, ResolvedMeta, Review, SchemaOrgGraph, SchemaOrgNode, SchemaOrgNodeDefinition, SearchAction, SoftwareApp, Thing, VideoObject, VirtualLocation, WebPage, WebSite, dedupeNodes, defineAddress, defineAggregateOffer, defineAggregateRating, defineArticle, defineBook, defineBookEdition, defineBreadcrumb, defineComment, defineCourse, defineEvent, defineHowTo, defineHowToStep, defineImage, defineItemList, defineJobPosting, defineListItem, defineLocalBusiness, defineMovie, defineOffer, defineOpeningHours, defineOrganization, definePerson, definePlace, defineProduct, defineQuestion, defineReadAction, defineRecipe, defineReview, defineSchemaOrgResolver, defineSearchAction, defineSoftwareApp, defineVideo, defineVirtualLocation, defineWebPage, defineWebSite, normaliseNodes, resolveMeta, resolveNode, resolveNodeId, resolveRelation, useSchemaOrg };
|
|
77
|
+
export { AggregateOffer, AggregateRating, Arrayable, Article, Book, BookEdition, BreadcrumbList, Comment, Course, Event, HowTo, HowToStep, ImageObject, ItemList, JobPosting, ListItem, LocalBusiness, MetaInput, Movie, Offer, OpeningHoursSpecification, Organization, Person, Place, PostalAddress, Product, Question, ReadAction, Recipe, ResolvedMeta, Review, SchemaOrgGraph, SchemaOrgNode, SchemaOrgNodeDefinition, SearchAction, SoftwareApp, Thing, type UseSchemaOrgInput, VideoObject, VirtualLocation, WebPage, WebSite, dedupeNodes, defineAddress, defineAggregateOffer, defineAggregateRating, defineArticle, defineBook, defineBookEdition, defineBreadcrumb, defineComment, defineCourse, defineEvent, defineHowTo, defineHowToStep, defineImage, defineItemList, defineJobPosting, defineListItem, defineLocalBusiness, defineMovie, defineOffer, defineOpeningHours, defineOrganization, definePerson, definePlace, defineProduct, defineQuestion, defineReadAction, defineRecipe, defineReview, defineSchemaOrgResolver, defineSearchAction, defineSoftwareApp, defineVideo, defineVirtualLocation, defineWebPage, defineWebSite, normaliseNodes, resolveMeta, resolveNode, resolveNodeId, resolveRelation, useSchemaOrg };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { U as UnheadSchemaOrg } from './shared/schema-org.662e1dca.mjs';
|
|
2
|
+
export { H as HowToId, a0 as PluginSchemaOrg, P as PrimaryArticleId, k as PrimaryBookId, m as PrimaryBreadcrumbId, s as PrimaryEventId, W as PrimaryWebPageId, Z as PrimaryWebSiteId, L as ProductId, R as RecipeId, a1 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, Y 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, V as videoResolver, v as virtualLocationResolver, X as webPageResolver, _ as webSiteResolver } from './shared/schema-org.662e1dca.mjs';
|
|
3
|
+
import { getActiveHead, useHead } from 'unhead';
|
|
3
4
|
import '@unhead/shared';
|
|
4
5
|
import 'ufo';
|
|
5
6
|
|
|
@@ -112,6 +113,10 @@ function defineBookEdition(input) {
|
|
|
112
113
|
return provideResolver(input, "bookEdition");
|
|
113
114
|
}
|
|
114
115
|
function useSchemaOrg(input) {
|
|
116
|
+
const head = getActiveHead();
|
|
117
|
+
if (!head)
|
|
118
|
+
return;
|
|
119
|
+
head.use(UnheadSchemaOrg());
|
|
115
120
|
return useHead({
|
|
116
121
|
script: [
|
|
117
122
|
{
|
|
@@ -123,4 +128,4 @@ function useSchemaOrg(input) {
|
|
|
123
128
|
});
|
|
124
129
|
}
|
|
125
130
|
|
|
126
|
-
export { defineAddress, defineAggregateOffer, defineAggregateRating, defineArticle, defineBook, defineBookEdition, defineBreadcrumb, defineComment, defineCourse, defineEvent, defineHowTo, defineHowToStep, defineImage, defineItemList, defineJobPosting, defineListItem, defineLocalBusiness, defineMovie, defineOffer, defineOpeningHours, defineOrganization, definePerson, definePlace, defineProduct, defineQuestion, defineReadAction, defineRecipe, defineReview, defineSearchAction, defineSoftwareApp, defineVideo, defineVirtualLocation, defineWebPage, defineWebSite, useSchemaOrg };
|
|
131
|
+
export { UnheadSchemaOrg, defineAddress, defineAggregateOffer, defineAggregateRating, defineArticle, defineBook, defineBookEdition, defineBreadcrumb, defineComment, defineCourse, defineEvent, defineHowTo, defineHowToStep, defineImage, defineItemList, defineJobPosting, defineListItem, defineLocalBusiness, defineMovie, defineOffer, defineOpeningHours, defineOrganization, definePerson, definePlace, defineProduct, defineQuestion, defineReadAction, defineRecipe, defineReview, defineSearchAction, defineSoftwareApp, defineVideo, defineVirtualLocation, defineWebPage, defineWebSite, useSchemaOrg };
|
|
@@ -1944,6 +1944,9 @@ function createSchemaOrgGraph() {
|
|
|
1944
1944
|
return ctx;
|
|
1945
1945
|
}
|
|
1946
1946
|
|
|
1947
|
+
function UnheadSchemaOrg(options) {
|
|
1948
|
+
return SchemaOrgUnheadPlugin({}, () => ({}), options);
|
|
1949
|
+
}
|
|
1947
1950
|
function PluginSchemaOrg(options) {
|
|
1948
1951
|
const fallback = () => ({});
|
|
1949
1952
|
return SchemaOrgUnheadPlugin({}, options?.resolveMeta || fallback, options);
|
|
@@ -1951,8 +1954,9 @@ function PluginSchemaOrg(options) {
|
|
|
1951
1954
|
function SchemaOrgUnheadPlugin(config, meta, options) {
|
|
1952
1955
|
config = resolveMeta({ ...config });
|
|
1953
1956
|
let graph;
|
|
1954
|
-
|
|
1957
|
+
let resolvedMeta = {};
|
|
1955
1958
|
return shared.defineHeadPlugin({
|
|
1959
|
+
key: "schema-org",
|
|
1956
1960
|
hooks: {
|
|
1957
1961
|
"entries:resolve": function() {
|
|
1958
1962
|
graph = createSchemaOrgGraph();
|
|
@@ -1970,14 +1974,26 @@ function SchemaOrgUnheadPlugin(config, meta, options) {
|
|
|
1970
1974
|
}
|
|
1971
1975
|
tag.tagPosition = config.tagPosition === "head" ? "head" : "bodyClose";
|
|
1972
1976
|
}
|
|
1973
|
-
if (tag.tag === "
|
|
1977
|
+
if (tag.tag === "htmlAttrs" && tag.props.lang) {
|
|
1978
|
+
resolvedMeta.inLanguage = tag.props.lang;
|
|
1979
|
+
} else if (tag.tag === "title") {
|
|
1974
1980
|
resolvedMeta.title = tag.textContent;
|
|
1975
|
-
else if (tag.tag === "meta" && tag.props.name === "description")
|
|
1981
|
+
} else if (tag.tag === "meta" && tag.props.name === "description") {
|
|
1976
1982
|
resolvedMeta.description = tag.props.content;
|
|
1977
|
-
else if (tag.tag === "link" && tag.props.rel === "canonical")
|
|
1983
|
+
} else if (tag.tag === "link" && tag.props.rel === "canonical") {
|
|
1978
1984
|
resolvedMeta.url = tag.props.href;
|
|
1979
|
-
|
|
1985
|
+
if (resolvedMeta.url && !resolvedMeta.host)
|
|
1986
|
+
resolvedMeta.host = new URL(resolvedMeta.url).origin;
|
|
1987
|
+
} else if (tag.tag === "meta" && tag.props.property === "og:image") {
|
|
1980
1988
|
resolvedMeta.image = tag.props.content;
|
|
1989
|
+
} else if (tag.tag === "templateParams" && tag.props.schemaOrg) {
|
|
1990
|
+
resolvedMeta = {
|
|
1991
|
+
// @ts-expect-error untyped
|
|
1992
|
+
...tag.props.schemaOrg,
|
|
1993
|
+
...resolvedMeta
|
|
1994
|
+
};
|
|
1995
|
+
delete tag.props.schemaOrg;
|
|
1996
|
+
}
|
|
1981
1997
|
},
|
|
1982
1998
|
"tags:resolve": async function(ctx) {
|
|
1983
1999
|
for (const tag of ctx.tags) {
|
|
@@ -2006,6 +2022,7 @@ exports.PrimaryWebSiteId = PrimaryWebSiteId;
|
|
|
2006
2022
|
exports.ProductId = ProductId;
|
|
2007
2023
|
exports.RecipeId = RecipeId;
|
|
2008
2024
|
exports.SchemaOrgUnheadPlugin = SchemaOrgUnheadPlugin;
|
|
2025
|
+
exports.UnheadSchemaOrg = UnheadSchemaOrg;
|
|
2009
2026
|
exports.addressResolver = addressResolver;
|
|
2010
2027
|
exports.aggregateOfferResolver = aggregateOfferResolver;
|
|
2011
2028
|
exports.aggregateRatingResolver = aggregateRatingResolver;
|
|
@@ -1942,6 +1942,9 @@ function createSchemaOrgGraph() {
|
|
|
1942
1942
|
return ctx;
|
|
1943
1943
|
}
|
|
1944
1944
|
|
|
1945
|
+
function UnheadSchemaOrg(options) {
|
|
1946
|
+
return SchemaOrgUnheadPlugin({}, () => ({}), options);
|
|
1947
|
+
}
|
|
1945
1948
|
function PluginSchemaOrg(options) {
|
|
1946
1949
|
const fallback = () => ({});
|
|
1947
1950
|
return SchemaOrgUnheadPlugin({}, options?.resolveMeta || fallback, options);
|
|
@@ -1949,8 +1952,9 @@ function PluginSchemaOrg(options) {
|
|
|
1949
1952
|
function SchemaOrgUnheadPlugin(config, meta, options) {
|
|
1950
1953
|
config = resolveMeta({ ...config });
|
|
1951
1954
|
let graph;
|
|
1952
|
-
|
|
1955
|
+
let resolvedMeta = {};
|
|
1953
1956
|
return defineHeadPlugin({
|
|
1957
|
+
key: "schema-org",
|
|
1954
1958
|
hooks: {
|
|
1955
1959
|
"entries:resolve": function() {
|
|
1956
1960
|
graph = createSchemaOrgGraph();
|
|
@@ -1968,14 +1972,26 @@ function SchemaOrgUnheadPlugin(config, meta, options) {
|
|
|
1968
1972
|
}
|
|
1969
1973
|
tag.tagPosition = config.tagPosition === "head" ? "head" : "bodyClose";
|
|
1970
1974
|
}
|
|
1971
|
-
if (tag.tag === "
|
|
1975
|
+
if (tag.tag === "htmlAttrs" && tag.props.lang) {
|
|
1976
|
+
resolvedMeta.inLanguage = tag.props.lang;
|
|
1977
|
+
} else if (tag.tag === "title") {
|
|
1972
1978
|
resolvedMeta.title = tag.textContent;
|
|
1973
|
-
else if (tag.tag === "meta" && tag.props.name === "description")
|
|
1979
|
+
} else if (tag.tag === "meta" && tag.props.name === "description") {
|
|
1974
1980
|
resolvedMeta.description = tag.props.content;
|
|
1975
|
-
else if (tag.tag === "link" && tag.props.rel === "canonical")
|
|
1981
|
+
} else if (tag.tag === "link" && tag.props.rel === "canonical") {
|
|
1976
1982
|
resolvedMeta.url = tag.props.href;
|
|
1977
|
-
|
|
1983
|
+
if (resolvedMeta.url && !resolvedMeta.host)
|
|
1984
|
+
resolvedMeta.host = new URL(resolvedMeta.url).origin;
|
|
1985
|
+
} else if (tag.tag === "meta" && tag.props.property === "og:image") {
|
|
1978
1986
|
resolvedMeta.image = tag.props.content;
|
|
1987
|
+
} else if (tag.tag === "templateParams" && tag.props.schemaOrg) {
|
|
1988
|
+
resolvedMeta = {
|
|
1989
|
+
// @ts-expect-error untyped
|
|
1990
|
+
...tag.props.schemaOrg,
|
|
1991
|
+
...resolvedMeta
|
|
1992
|
+
};
|
|
1993
|
+
delete tag.props.schemaOrg;
|
|
1994
|
+
}
|
|
1979
1995
|
},
|
|
1980
1996
|
"tags:resolve": async function(ctx) {
|
|
1981
1997
|
for (const tag of ctx.tags) {
|
|
@@ -1993,4 +2009,4 @@ function SchemaOrgUnheadPlugin(config, meta, options) {
|
|
|
1993
2009
|
});
|
|
1994
2010
|
}
|
|
1995
2011
|
|
|
1996
|
-
export {
|
|
2012
|
+
export { searchActionResolver 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, UnheadSchemaOrg as U, videoResolver as V, PrimaryWebPageId as W, webPageResolver as X, readActionResolver as Y, PrimaryWebSiteId as Z, webSiteResolver as _, dedupeNodes as a, PluginSchemaOrg as a0, SchemaOrgUnheadPlugin as a1, 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 };
|
|
@@ -1524,13 +1524,18 @@ declare function createSchemaOrgGraph(): SchemaOrgGraph;
|
|
|
1524
1524
|
|
|
1525
1525
|
interface PluginSchemaOrgOptions {
|
|
1526
1526
|
minify?: boolean;
|
|
1527
|
+
trailingSlash?: boolean;
|
|
1527
1528
|
}
|
|
1529
|
+
declare function UnheadSchemaOrg(options?: PluginSchemaOrgOptions): _unhead_schema.HeadPluginInput;
|
|
1530
|
+
/**
|
|
1531
|
+
* @deprecated Providing a plugin is no longer required. You can remove this code.
|
|
1532
|
+
*/
|
|
1528
1533
|
declare function PluginSchemaOrg(options?: PluginSchemaOrgOptions & {
|
|
1529
1534
|
resolveMeta?: () => Record<string, any>;
|
|
1530
|
-
}): _unhead_schema.
|
|
1535
|
+
}): _unhead_schema.HeadPluginInput;
|
|
1531
1536
|
/**
|
|
1532
|
-
* @deprecated
|
|
1537
|
+
* @deprecated Providing a plugin is no longer required. You can remove this code.
|
|
1533
1538
|
*/
|
|
1534
|
-
declare function SchemaOrgUnheadPlugin(config: MetaInput, meta: () => Record<string, any>, options?: PluginSchemaOrgOptions): _unhead_schema.
|
|
1539
|
+
declare function SchemaOrgUnheadPlugin(config: MetaInput, meta: () => Record<string, any>, options?: PluginSchemaOrgOptions): _unhead_schema.HeadPluginInput;
|
|
1535
1540
|
|
|
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,
|
|
1541
|
+
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, UnheadSchemaOrg as b8, PluginSchemaOrg as b9, SchemaOrgUnheadPlugin as ba, type NodeRelation as bb, type NodeRelations as bc, type Identity as bd, type ResolvableDate as be, type OptionalSchemaOrgPrefix as bf, type UserConfig as bg, type WithResolver as bh, type IdReference as bi, type Id as bj, 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 };
|
|
@@ -1524,13 +1524,18 @@ declare function createSchemaOrgGraph(): SchemaOrgGraph;
|
|
|
1524
1524
|
|
|
1525
1525
|
interface PluginSchemaOrgOptions {
|
|
1526
1526
|
minify?: boolean;
|
|
1527
|
+
trailingSlash?: boolean;
|
|
1527
1528
|
}
|
|
1529
|
+
declare function UnheadSchemaOrg(options?: PluginSchemaOrgOptions): _unhead_schema.HeadPluginInput;
|
|
1530
|
+
/**
|
|
1531
|
+
* @deprecated Providing a plugin is no longer required. You can remove this code.
|
|
1532
|
+
*/
|
|
1528
1533
|
declare function PluginSchemaOrg(options?: PluginSchemaOrgOptions & {
|
|
1529
1534
|
resolveMeta?: () => Record<string, any>;
|
|
1530
|
-
}): _unhead_schema.
|
|
1535
|
+
}): _unhead_schema.HeadPluginInput;
|
|
1531
1536
|
/**
|
|
1532
|
-
* @deprecated
|
|
1537
|
+
* @deprecated Providing a plugin is no longer required. You can remove this code.
|
|
1533
1538
|
*/
|
|
1534
|
-
declare function SchemaOrgUnheadPlugin(config: MetaInput, meta: () => Record<string, any>, options?: PluginSchemaOrgOptions): _unhead_schema.
|
|
1539
|
+
declare function SchemaOrgUnheadPlugin(config: MetaInput, meta: () => Record<string, any>, options?: PluginSchemaOrgOptions): _unhead_schema.HeadPluginInput;
|
|
1535
1540
|
|
|
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,
|
|
1541
|
+
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, UnheadSchemaOrg as b8, PluginSchemaOrg as b9, SchemaOrgUnheadPlugin as ba, type NodeRelation as bb, type NodeRelations as bc, type Identity as bd, type ResolvableDate as be, type OptionalSchemaOrgPrefix as bf, type UserConfig as bg, type WithResolver as bh, type IdReference as bi, type Id as bj, 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 };
|
|
@@ -1524,13 +1524,18 @@ declare function createSchemaOrgGraph(): SchemaOrgGraph;
|
|
|
1524
1524
|
|
|
1525
1525
|
interface PluginSchemaOrgOptions {
|
|
1526
1526
|
minify?: boolean;
|
|
1527
|
+
trailingSlash?: boolean;
|
|
1527
1528
|
}
|
|
1529
|
+
declare function UnheadSchemaOrg(options?: PluginSchemaOrgOptions): _unhead_schema.HeadPluginInput;
|
|
1530
|
+
/**
|
|
1531
|
+
* @deprecated Providing a plugin is no longer required. You can remove this code.
|
|
1532
|
+
*/
|
|
1528
1533
|
declare function PluginSchemaOrg(options?: PluginSchemaOrgOptions & {
|
|
1529
1534
|
resolveMeta?: () => Record<string, any>;
|
|
1530
|
-
}): _unhead_schema.
|
|
1535
|
+
}): _unhead_schema.HeadPluginInput;
|
|
1531
1536
|
/**
|
|
1532
|
-
* @deprecated
|
|
1537
|
+
* @deprecated Providing a plugin is no longer required. You can remove this code.
|
|
1533
1538
|
*/
|
|
1534
|
-
declare function SchemaOrgUnheadPlugin(config: MetaInput, meta: () => Record<string, any>, options?: PluginSchemaOrgOptions): _unhead_schema.
|
|
1539
|
+
declare function SchemaOrgUnheadPlugin(config: MetaInput, meta: () => Record<string, any>, options?: PluginSchemaOrgOptions): _unhead_schema.HeadPluginInput;
|
|
1535
1540
|
|
|
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,
|
|
1541
|
+
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, UnheadSchemaOrg as b8, PluginSchemaOrg as b9, SchemaOrgUnheadPlugin as ba, type NodeRelation as bb, type NodeRelations as bc, type Identity as bd, type ResolvableDate as be, type OptionalSchemaOrgPrefix as bf, type UserConfig as bg, type WithResolver as bh, type IdReference as bi, type Id as bj, 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 };
|
package/dist/vue.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const plugin = require('./shared/schema-org.
|
|
3
|
+
const plugin = require('./shared/schema-org.508fa88d.cjs');
|
|
4
4
|
const vue = require('@unhead/vue');
|
|
5
5
|
const vue$1 = require('vue');
|
|
6
6
|
require('@unhead/shared');
|
|
@@ -201,13 +201,14 @@ function defineBookEdition(input) {
|
|
|
201
201
|
return provideResolver(input, "bookEdition");
|
|
202
202
|
}
|
|
203
203
|
function useSchemaOrg(input) {
|
|
204
|
+
const head = vue.injectHead();
|
|
205
|
+
head.use(plugin.UnheadSchemaOrg());
|
|
204
206
|
return vue.useHead({
|
|
205
207
|
script: [
|
|
206
208
|
{
|
|
207
209
|
type: "application/ld+json",
|
|
208
210
|
id: "schema-org-graph",
|
|
209
211
|
key: "schema-org-graph",
|
|
210
|
-
// @ts-expect-error runtime type
|
|
211
212
|
nodes: input
|
|
212
213
|
}
|
|
213
214
|
]
|
package/dist/vue.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ComponentResolver } from 'unplugin-vue-components';
|
|
2
|
+
import * as _unhead_vue from '@unhead/vue';
|
|
2
3
|
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.
|
|
4
|
-
export { M as MetaInput,
|
|
4
|
+
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, A as Arrayable, T as Thing } from './shared/schema-org.96c8f113.cjs';
|
|
5
|
+
export { M as MetaInput, b9 as PluginSchemaOrg, ba as SchemaOrgUnheadPlugin, bg as UserConfig } from './shared/schema-org.96c8f113.cjs';
|
|
5
6
|
import { defineComponent } from 'vue';
|
|
6
7
|
import '@unhead/schema';
|
|
7
8
|
|
|
@@ -58,8 +59,12 @@ declare function defineSearchAction<T extends Record<string, any>>(input?: DeepM
|
|
|
58
59
|
declare function defineReadAction<T extends Record<string, any>>(input?: DeepMaybeRef<ReadAction & T>): DeepMaybeRef<ReadAction & T>;
|
|
59
60
|
declare function defineSoftwareApp<T extends Record<string, any>>(input?: DeepMaybeRef<SoftwareApp & T>): DeepMaybeRef<SoftwareApp & T>;
|
|
60
61
|
declare function defineBookEdition<T extends Record<string, any>>(input?: DeepMaybeRef<BookEdition & T>): DeepMaybeRef<BookEdition & T>;
|
|
61
|
-
type
|
|
62
|
-
declare function useSchemaOrg(input
|
|
62
|
+
type UseSchemaOrgInput = Arrayable<DeepMaybeRef<Thing | Record<string, any>>>;
|
|
63
|
+
declare function useSchemaOrg(input: UseSchemaOrgInput): void | _unhead_vue.ActiveHeadEntry<_unhead_vue.UseHeadInput<{
|
|
64
|
+
script: {
|
|
65
|
+
nodes: UseSchemaOrgInput;
|
|
66
|
+
};
|
|
67
|
+
}>>;
|
|
63
68
|
|
|
64
69
|
declare function defineSchemaOrgComponent(name: string, defineFn: (input: any) => any): ReturnType<typeof defineComponent>;
|
|
65
70
|
declare const SchemaOrgArticle: any;
|
|
@@ -85,4 +90,4 @@ declare const SchemaOrgItemList: any;
|
|
|
85
90
|
declare const SchemaOrgBook: any;
|
|
86
91
|
declare const SchemaOrgSoftwareApp: any;
|
|
87
92
|
|
|
88
|
-
export { type DeepMaybeRef, SchemaOrgArticle, SchemaOrgBook, SchemaOrgBreadcrumb, SchemaOrgComment, SchemaOrgCourse, SchemaOrgEvent, SchemaOrgHowTo, SchemaOrgImage, SchemaOrgItemList, SchemaOrgJobPosting, SchemaOrgLocalBusiness, SchemaOrgMovie, SchemaOrgOrganization, SchemaOrgPerson, SchemaOrgProduct, SchemaOrgQuestion, SchemaOrgRecipe, SchemaOrgResolver, type SchemaOrgResolverOptions, SchemaOrgReview, SchemaOrgSoftwareApp, SchemaOrgVideo, SchemaOrgWebPage, SchemaOrgWebSite, defineAddress, defineAggregateOffer, defineAggregateRating, defineArticle, defineBook, defineBookEdition, defineBreadcrumb, defineComment, defineCourse, defineEvent, defineHowTo, defineHowToStep, defineImage, defineItemList, defineJobPosting, defineListItem, defineLocalBusiness, defineMovie, defineOffer, defineOpeningHours, defineOrganization, definePerson, definePlace, defineProduct, defineQuestion, defineReadAction, defineRecipe, defineReview, defineSchemaOrgComponent, defineSearchAction, defineSoftwareApp, defineVideo, defineVirtualLocation, defineWebPage, defineWebSite, schemaAutoImports, schemaOrgAutoImports, schemaOrgComponents, useSchemaOrg };
|
|
93
|
+
export { type DeepMaybeRef, SchemaOrgArticle, SchemaOrgBook, SchemaOrgBreadcrumb, SchemaOrgComment, SchemaOrgCourse, SchemaOrgEvent, SchemaOrgHowTo, SchemaOrgImage, SchemaOrgItemList, SchemaOrgJobPosting, SchemaOrgLocalBusiness, SchemaOrgMovie, SchemaOrgOrganization, SchemaOrgPerson, SchemaOrgProduct, SchemaOrgQuestion, SchemaOrgRecipe, SchemaOrgResolver, type SchemaOrgResolverOptions, SchemaOrgReview, SchemaOrgSoftwareApp, SchemaOrgVideo, SchemaOrgWebPage, SchemaOrgWebSite, type UseSchemaOrgInput, defineAddress, defineAggregateOffer, defineAggregateRating, defineArticle, defineBook, defineBookEdition, defineBreadcrumb, defineComment, defineCourse, defineEvent, defineHowTo, defineHowToStep, defineImage, defineItemList, defineJobPosting, defineListItem, defineLocalBusiness, defineMovie, defineOffer, defineOpeningHours, defineOrganization, definePerson, definePlace, defineProduct, defineQuestion, defineReadAction, defineRecipe, defineReview, defineSchemaOrgComponent, defineSearchAction, defineSoftwareApp, defineVideo, defineVirtualLocation, defineWebPage, defineWebSite, schemaAutoImports, schemaOrgAutoImports, schemaOrgComponents, useSchemaOrg };
|
package/dist/vue.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ComponentResolver } from 'unplugin-vue-components';
|
|
2
|
+
import * as _unhead_vue from '@unhead/vue';
|
|
2
3
|
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.
|
|
4
|
-
export { M as MetaInput,
|
|
4
|
+
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, A as Arrayable, T as Thing } from './shared/schema-org.96c8f113.mjs';
|
|
5
|
+
export { M as MetaInput, b9 as PluginSchemaOrg, ba as SchemaOrgUnheadPlugin, bg as UserConfig } from './shared/schema-org.96c8f113.mjs';
|
|
5
6
|
import { defineComponent } from 'vue';
|
|
6
7
|
import '@unhead/schema';
|
|
7
8
|
|
|
@@ -58,8 +59,12 @@ declare function defineSearchAction<T extends Record<string, any>>(input?: DeepM
|
|
|
58
59
|
declare function defineReadAction<T extends Record<string, any>>(input?: DeepMaybeRef<ReadAction & T>): DeepMaybeRef<ReadAction & T>;
|
|
59
60
|
declare function defineSoftwareApp<T extends Record<string, any>>(input?: DeepMaybeRef<SoftwareApp & T>): DeepMaybeRef<SoftwareApp & T>;
|
|
60
61
|
declare function defineBookEdition<T extends Record<string, any>>(input?: DeepMaybeRef<BookEdition & T>): DeepMaybeRef<BookEdition & T>;
|
|
61
|
-
type
|
|
62
|
-
declare function useSchemaOrg(input
|
|
62
|
+
type UseSchemaOrgInput = Arrayable<DeepMaybeRef<Thing | Record<string, any>>>;
|
|
63
|
+
declare function useSchemaOrg(input: UseSchemaOrgInput): void | _unhead_vue.ActiveHeadEntry<_unhead_vue.UseHeadInput<{
|
|
64
|
+
script: {
|
|
65
|
+
nodes: UseSchemaOrgInput;
|
|
66
|
+
};
|
|
67
|
+
}>>;
|
|
63
68
|
|
|
64
69
|
declare function defineSchemaOrgComponent(name: string, defineFn: (input: any) => any): ReturnType<typeof defineComponent>;
|
|
65
70
|
declare const SchemaOrgArticle: any;
|
|
@@ -85,4 +90,4 @@ declare const SchemaOrgItemList: any;
|
|
|
85
90
|
declare const SchemaOrgBook: any;
|
|
86
91
|
declare const SchemaOrgSoftwareApp: any;
|
|
87
92
|
|
|
88
|
-
export { type DeepMaybeRef, SchemaOrgArticle, SchemaOrgBook, SchemaOrgBreadcrumb, SchemaOrgComment, SchemaOrgCourse, SchemaOrgEvent, SchemaOrgHowTo, SchemaOrgImage, SchemaOrgItemList, SchemaOrgJobPosting, SchemaOrgLocalBusiness, SchemaOrgMovie, SchemaOrgOrganization, SchemaOrgPerson, SchemaOrgProduct, SchemaOrgQuestion, SchemaOrgRecipe, SchemaOrgResolver, type SchemaOrgResolverOptions, SchemaOrgReview, SchemaOrgSoftwareApp, SchemaOrgVideo, SchemaOrgWebPage, SchemaOrgWebSite, defineAddress, defineAggregateOffer, defineAggregateRating, defineArticle, defineBook, defineBookEdition, defineBreadcrumb, defineComment, defineCourse, defineEvent, defineHowTo, defineHowToStep, defineImage, defineItemList, defineJobPosting, defineListItem, defineLocalBusiness, defineMovie, defineOffer, defineOpeningHours, defineOrganization, definePerson, definePlace, defineProduct, defineQuestion, defineReadAction, defineRecipe, defineReview, defineSchemaOrgComponent, defineSearchAction, defineSoftwareApp, defineVideo, defineVirtualLocation, defineWebPage, defineWebSite, schemaAutoImports, schemaOrgAutoImports, schemaOrgComponents, useSchemaOrg };
|
|
93
|
+
export { type DeepMaybeRef, SchemaOrgArticle, SchemaOrgBook, SchemaOrgBreadcrumb, SchemaOrgComment, SchemaOrgCourse, SchemaOrgEvent, SchemaOrgHowTo, SchemaOrgImage, SchemaOrgItemList, SchemaOrgJobPosting, SchemaOrgLocalBusiness, SchemaOrgMovie, SchemaOrgOrganization, SchemaOrgPerson, SchemaOrgProduct, SchemaOrgQuestion, SchemaOrgRecipe, SchemaOrgResolver, type SchemaOrgResolverOptions, SchemaOrgReview, SchemaOrgSoftwareApp, SchemaOrgVideo, SchemaOrgWebPage, SchemaOrgWebSite, type UseSchemaOrgInput, defineAddress, defineAggregateOffer, defineAggregateRating, defineArticle, defineBook, defineBookEdition, defineBreadcrumb, defineComment, defineCourse, defineEvent, defineHowTo, defineHowToStep, defineImage, defineItemList, defineJobPosting, defineListItem, defineLocalBusiness, defineMovie, defineOffer, defineOpeningHours, defineOrganization, definePerson, definePlace, defineProduct, defineQuestion, defineReadAction, defineRecipe, defineReview, defineSchemaOrgComponent, defineSearchAction, defineSoftwareApp, defineVideo, defineVirtualLocation, defineWebPage, defineWebSite, schemaAutoImports, schemaOrgAutoImports, schemaOrgComponents, useSchemaOrg };
|
package/dist/vue.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ComponentResolver } from 'unplugin-vue-components';
|
|
2
|
+
import * as _unhead_vue from '@unhead/vue';
|
|
2
3
|
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.
|
|
4
|
-
export { M as MetaInput,
|
|
4
|
+
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, A as Arrayable, T as Thing } from './shared/schema-org.96c8f113.js';
|
|
5
|
+
export { M as MetaInput, b9 as PluginSchemaOrg, ba as SchemaOrgUnheadPlugin, bg as UserConfig } from './shared/schema-org.96c8f113.js';
|
|
5
6
|
import { defineComponent } from 'vue';
|
|
6
7
|
import '@unhead/schema';
|
|
7
8
|
|
|
@@ -58,8 +59,12 @@ declare function defineSearchAction<T extends Record<string, any>>(input?: DeepM
|
|
|
58
59
|
declare function defineReadAction<T extends Record<string, any>>(input?: DeepMaybeRef<ReadAction & T>): DeepMaybeRef<ReadAction & T>;
|
|
59
60
|
declare function defineSoftwareApp<T extends Record<string, any>>(input?: DeepMaybeRef<SoftwareApp & T>): DeepMaybeRef<SoftwareApp & T>;
|
|
60
61
|
declare function defineBookEdition<T extends Record<string, any>>(input?: DeepMaybeRef<BookEdition & T>): DeepMaybeRef<BookEdition & T>;
|
|
61
|
-
type
|
|
62
|
-
declare function useSchemaOrg(input
|
|
62
|
+
type UseSchemaOrgInput = Arrayable<DeepMaybeRef<Thing | Record<string, any>>>;
|
|
63
|
+
declare function useSchemaOrg(input: UseSchemaOrgInput): void | _unhead_vue.ActiveHeadEntry<_unhead_vue.UseHeadInput<{
|
|
64
|
+
script: {
|
|
65
|
+
nodes: UseSchemaOrgInput;
|
|
66
|
+
};
|
|
67
|
+
}>>;
|
|
63
68
|
|
|
64
69
|
declare function defineSchemaOrgComponent(name: string, defineFn: (input: any) => any): ReturnType<typeof defineComponent>;
|
|
65
70
|
declare const SchemaOrgArticle: any;
|
|
@@ -85,4 +90,4 @@ declare const SchemaOrgItemList: any;
|
|
|
85
90
|
declare const SchemaOrgBook: any;
|
|
86
91
|
declare const SchemaOrgSoftwareApp: any;
|
|
87
92
|
|
|
88
|
-
export { type DeepMaybeRef, SchemaOrgArticle, SchemaOrgBook, SchemaOrgBreadcrumb, SchemaOrgComment, SchemaOrgCourse, SchemaOrgEvent, SchemaOrgHowTo, SchemaOrgImage, SchemaOrgItemList, SchemaOrgJobPosting, SchemaOrgLocalBusiness, SchemaOrgMovie, SchemaOrgOrganization, SchemaOrgPerson, SchemaOrgProduct, SchemaOrgQuestion, SchemaOrgRecipe, SchemaOrgResolver, type SchemaOrgResolverOptions, SchemaOrgReview, SchemaOrgSoftwareApp, SchemaOrgVideo, SchemaOrgWebPage, SchemaOrgWebSite, defineAddress, defineAggregateOffer, defineAggregateRating, defineArticle, defineBook, defineBookEdition, defineBreadcrumb, defineComment, defineCourse, defineEvent, defineHowTo, defineHowToStep, defineImage, defineItemList, defineJobPosting, defineListItem, defineLocalBusiness, defineMovie, defineOffer, defineOpeningHours, defineOrganization, definePerson, definePlace, defineProduct, defineQuestion, defineReadAction, defineRecipe, defineReview, defineSchemaOrgComponent, defineSearchAction, defineSoftwareApp, defineVideo, defineVirtualLocation, defineWebPage, defineWebSite, schemaAutoImports, schemaOrgAutoImports, schemaOrgComponents, useSchemaOrg };
|
|
93
|
+
export { type DeepMaybeRef, SchemaOrgArticle, SchemaOrgBook, SchemaOrgBreadcrumb, SchemaOrgComment, SchemaOrgCourse, SchemaOrgEvent, SchemaOrgHowTo, SchemaOrgImage, SchemaOrgItemList, SchemaOrgJobPosting, SchemaOrgLocalBusiness, SchemaOrgMovie, SchemaOrgOrganization, SchemaOrgPerson, SchemaOrgProduct, SchemaOrgQuestion, SchemaOrgRecipe, SchemaOrgResolver, type SchemaOrgResolverOptions, SchemaOrgReview, SchemaOrgSoftwareApp, SchemaOrgVideo, SchemaOrgWebPage, SchemaOrgWebSite, type UseSchemaOrgInput, defineAddress, defineAggregateOffer, defineAggregateRating, defineArticle, defineBook, defineBookEdition, defineBreadcrumb, defineComment, defineCourse, defineEvent, defineHowTo, defineHowToStep, defineImage, defineItemList, defineJobPosting, defineListItem, defineLocalBusiness, defineMovie, defineOffer, defineOpeningHours, defineOrganization, definePerson, definePlace, defineProduct, defineQuestion, defineReadAction, defineRecipe, defineReview, defineSchemaOrgComponent, defineSearchAction, defineSoftwareApp, defineVideo, defineVirtualLocation, defineWebPage, defineWebSite, schemaAutoImports, schemaOrgAutoImports, schemaOrgComponents, useSchemaOrg };
|
package/dist/vue.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { U as UnheadSchemaOrg } from './shared/schema-org.662e1dca.mjs';
|
|
2
|
+
export { a0 as PluginSchemaOrg, a1 as SchemaOrgUnheadPlugin } from './shared/schema-org.662e1dca.mjs';
|
|
3
|
+
import { injectHead, useHead } from '@unhead/vue';
|
|
3
4
|
import { defineComponent, ref, computed, unref, h } from 'vue';
|
|
4
5
|
import '@unhead/shared';
|
|
5
6
|
import 'ufo';
|
|
@@ -199,13 +200,14 @@ function defineBookEdition(input) {
|
|
|
199
200
|
return provideResolver(input, "bookEdition");
|
|
200
201
|
}
|
|
201
202
|
function useSchemaOrg(input) {
|
|
203
|
+
const head = injectHead();
|
|
204
|
+
head.use(UnheadSchemaOrg());
|
|
202
205
|
return useHead({
|
|
203
206
|
script: [
|
|
204
207
|
{
|
|
205
208
|
type: "application/ld+json",
|
|
206
209
|
id: "schema-org-graph",
|
|
207
210
|
key: "schema-org-graph",
|
|
208
|
-
// @ts-expect-error runtime type
|
|
209
211
|
nodes: input
|
|
210
212
|
}
|
|
211
213
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unhead/schema-org",
|
|
3
|
-
"version": "1.8.0-beta.
|
|
3
|
+
"version": "1.8.0-beta.6",
|
|
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",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
],
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"unhead": ">=1.7.4",
|
|
43
|
-
"@unhead/shared": "1.8.0-beta.
|
|
43
|
+
"@unhead/shared": "1.8.0-beta.6"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"ufo": "^1.3.1"
|
|
@@ -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.8.0-beta.
|
|
52
|
-
"@unhead/shared": "1.8.0-beta.
|
|
53
|
-
"@unhead/vue": "1.8.0-beta.
|
|
54
|
-
"unhead": "1.8.0-beta.
|
|
51
|
+
"@unhead/schema": "1.8.0-beta.6",
|
|
52
|
+
"@unhead/shared": "1.8.0-beta.6",
|
|
53
|
+
"@unhead/vue": "1.8.0-beta.6",
|
|
54
|
+
"unhead": "1.8.0-beta.6"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "unbuild .",
|