UNPKG

@stencila/schema

Version:

Extensions to schema.org to support semantic, composable, parameterize-able and executable documents

3 lines (2 loc) 16.5 kB
function e(){return(e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e}).apply(this,arguments)}var t,o=function(t){return Object.entries(t).reduce(function(t,o){var n,r=o[1];return void 0===r?t:e({},t,((n={})[o[0]]=r,n))},{})},n=function(t){return void 0===t&&(t={}),e({},o(t),{type:"Entity"})},r=function(t){return e({},o(t),{type:"Cite"})},i=function(t){return e({},o(t),{type:"CiteGroup"})},a=function(t){return e({},o(t),{type:"Code"})},u=function(t){return e({},o(t),{type:"CodeBlock"})},s=function(t){return e({},o(t),{type:"CodeChunk"})},d=function(t){return e({},o(t),{type:"CodeFragment"})},c=function(t){return e({},o(t),{type:"CodeExpression"})},l=function(t){return e({},o(t),{type:"CodeError"})},p=function(t){return e({},o(t),{type:"Date"})},y=function(t){return e({},o(t),{type:"Mark"})},C=function(t){return e({},o(t),{type:"Delete"})},m=function(t){return e({},o(t),{type:"Emphasis"})},f=function(t){return void 0===t&&(t={}),e({},o(t),{type:"Thing"})},b=function(t){return e({},o(t),{type:"Brand"})},I=function(t){return void 0===t&&(t={}),e({},o(t),{type:"ContactPoint"})},B=function(t){return void 0===t&&(t={}),e({},o(t),{type:"CreativeWork"})},g=function(t){return void 0===t&&(t={}),e({},o(t),{type:"Article"})},A=function(t){return e({},o(t),{type:"Claim"})},S=function(t){return e({},o(t),{type:"Collection"})},h=function(t){return void 0===t&&(t={}),e({},o(t),{type:"Comment"})},P=function(t){return e({},o(t),{type:"Datatable"})},v=function(t){return e({},o(t),{type:"MediaObject"})},V=function(t){return e({},o(t),{type:"AudioObject"})},D=function(t){return e({},o(t),{type:"DatatableColumn"})},O=function(t){return e({},o(t),{type:"DefinedTerm"})},k=function(t){return void 0===t&&(t={}),e({},o(t),{type:"Validator"})},F=function(t){return void 0===t&&(t={}),e({},o(t),{type:"ArrayValidator"})},E=function(t){return void 0===t&&(t={}),e({},o(t),{type:"BooleanValidator"})},M=function(t){return void 0===t&&(t={}),e({},o(t),{type:"ConstantValidator"})},j=function(t){return void 0===t&&(t={}),e({},o(t),{type:"EnumValidator"})},T=function(t){return void 0===t&&(t={}),e({},o(t),{type:"Enumeration"})},R=function(t){return void 0===t&&(t={}),e({},o(t),{type:"Figure"})},w=function(t){return void 0===t&&(t={}),e({},o(t),{type:"Function"})},x=function(t){return void 0===t&&(t={}),e({},o(t),{type:"Grant"})},W=function(t){return e({},o(t),{type:"Heading"})},L=function(t){return e({},o(t),{type:"ImageObject"})},G=function(t){return e({},o(t),{type:"Include"})},Q=function(t){return void 0===t&&(t={}),e({},o(t),{type:"IntegerValidator"})},N=function(t){return e({},o(t),{type:"Link"})},U=function(t){return e({},o(t),{type:"List"})},z=function(t){return void 0===t&&(t={}),e({},o(t),{type:"ListItem"})},H=function(t){return e({},o(t),{type:"Math"})},q=function(t){return e({},o(t),{type:"MathBlock"})},J=function(t){return e({},o(t),{type:"MathFragment"})},K=function(t){return void 0===t&&(t={}),e({},o(t),{type:"MonetaryGrant"})},X=function(t){return e({},o(t),{type:"NontextualAnnotation"})},Y=function(t){return e({},o(t),{type:"Note"})},Z=function(t){return void 0===t&&(t={}),e({},o(t),{type:"NumberValidator"})},$=function(t){return void 0===t&&(t={}),e({},o(t),{type:"Organization"})},_=function(t){return e({},o(t),{type:"Paragraph"})},ee=function(t){return e({},o(t),{type:"Variable"})},te=function(t){return e({},o(t),{type:"Parameter"})},oe=function(t){return void 0===t&&(t={}),e({},o(t),{type:"Periodical"})},ne=function(t){return void 0===t&&(t={}),e({},o(t),{type:"Person"})},re=function(t){return void 0===t&&(t={}),e({},o(t),{type:"PostalAddress"})},ie=function(t){return void 0===t&&(t={}),e({},o(t),{type:"Product"})},ae=function(t){return e({},o(t),{type:"PropertyValue"})},ue=function(t){return void 0===t&&(t={}),e({},o(t),{type:"PublicationIssue"})},se=function(t){return void 0===t&&(t={}),e({},o(t),{type:"PublicationVolume"})},de=function(t){return e({},o(t),{type:"Quote"})},ce=function(t){return e({},o(t),{type:"QuoteBlock"})},le=function(t){return void 0===t&&(t={}),e({},o(t),{type:"Review"})},pe=function(t){return void 0===t&&(t={}),e({},o(t),{type:"SoftwareApplication"})},ye=function(t){return e({},o(t),{type:"SoftwareEnvironment"})},Ce=function(t){return void 0===t&&(t={}),e({},o(t),{type:"SoftwareSession"})},me=function(t){return void 0===t&&(t={}),e({},o(t),{type:"SoftwareSourceCode"})},fe=function(t){return void 0===t&&(t={}),e({},o(t),{type:"StringValidator"})},be=function(t){return e({},o(t),{type:"Strong"})},Ie=function(t){return e({},o(t),{type:"Subscript"})},Be=function(t){return e({},o(t),{type:"Superscript"})},ge=function(t){return e({},o(t),{type:"Table"})},Ae=function(t){return e({},o(t),{type:"TableCell"})},Se=function(t){return e({},o(t),{type:"TableRow"})},he=function(t){return void 0===t&&(t={}),e({},o(t),{type:"ThematicBreak"})},Pe=function(t){return void 0===t&&(t={}),e({},o(t),{type:"TupleValidator"})},ve=function(t){return e({},o(t),{type:"VideoObject"})},Ve=function(t){return e({},o(t),{type:"VolumeMount"})};!function(e){e.AgreesWith="AgreesWith",e.CitesAsAuthority="CitesAsAuthority",e.CitesAsDataSource="CitesAsDataSource",e.CitesAsEvidence="CitesAsEvidence",e.CitesAsMetadataDocument="CitesAsMetadataDocument",e.CitesAsPotentialSolution="CitesAsPotentialSolution",e.CitesAsRecommendedReading="CitesAsRecommendedReading",e.CitesAsRelated="CitesAsRelated",e.CitesAsSourceDocument="CitesAsSourceDocument",e.CitesForInformation="CitesForInformation",e.Compiles="Compiles",e.Confirms="Confirms",e.ContainsAssertionFrom="ContainsAssertionFrom",e.Corrects="Corrects",e.Credits="Credits",e.Critiques="Critiques",e.Derides="Derides",e.Describes="Describes",e.DisagreesWith="DisagreesWith",e.Discusses="Discusses",e.Disputes="Disputes",e.Documents="Documents",e.Extends="Extends",e.GivesBackgroundTo="GivesBackgroundTo",e.GivesSupportTo="GivesSupportTo",e.HasReplyFrom="HasReplyFrom",e.IncludesExcerptFrom="IncludesExcerptFrom",e.IncludesQuotationFrom="IncludesQuotationFrom",e.IsAgreedWithBy="IsAgreedWithBy",e.IsCitedAsAuthorityBy="IsCitedAsAuthorityBy",e.IsCitedAsDataSourceBy="IsCitedAsDataSourceBy",e.IsCitedAsEvidenceBy="IsCitedAsEvidenceBy",e.IsCitedAsMetadataDocumentBy="IsCitedAsMetadataDocumentBy",e.IsCitedAsPontentialSolutionBy="IsCitedAsPontentialSolutionBy",e.IsCitedAsRecommendedReadingBy="IsCitedAsRecommendedReadingBy",e.IsCitedAsRelatedBy="IsCitedAsRelatedBy",e.IsCitedAsSourceDocumentBy="IsCitedAsSourceDocumentBy",e.IsCitedBy="IsCitedBy",e.IsCitedForInformationBy="IsCitedForInformationBy",e.IsCompiledBy="IsCompiledBy",e.IsConfirmedBy="IsConfirmedBy",e.IsCorrectedBy="IsCorrectedBy",e.IsCreditedBy="IsCreditedBy",e.IsCritiquedBy="IsCritiquedBy",e.IsDeridedBy="IsDeridedBy",e.IsDescribedBy="IsDescribedBy",e.IsDisagreedWithBy="IsDisagreedWithBy",e.IsDiscussedBy="IsDiscussedBy",e.IsDisputedBy="IsDisputedBy",e.IsDocumentedBy="IsDocumentedBy",e.IsExtendedBy="IsExtendedBy",e.IsLinkedToBy="IsLinkedToBy",e.IsParodiedBy="IsParodiedBy",e.IsPlagiarizedBy="IsPlagiarizedBy",e.IsQualifiedBy="IsQualifiedBy",e.IsRefutedBy="IsRefutedBy",e.IsRetractedBy="IsRetractedBy",e.IsReviewedBy="IsReviewedBy",e.IsRidiculedBy="IsRidiculedBy",e.IsSpeculatedOnBy="IsSpeculatedOnBy",e.IsSupportedBy="IsSupportedBy",e.IsUpdatedBy="IsUpdatedBy",e.Likes="Likes",e.LinksTo="LinksTo",e.ObtainsBackgroundFrom="ObtainsBackgroundFrom",e.ObtainsSupportFrom="ObtainsSupportFrom",e.Parodies="Parodies",e.Plagiarizes="Plagiarizes",e.ProvidesAssertionFor="ProvidesAssertionFor",e.ProvidesConclusionsFor="ProvidesConclusionsFor",e.ProvidesDataFor="ProvidesDataFor",e.ProvidesExcerptFor="ProvidesExcerptFor",e.ProvidesMethodFor="ProvidesMethodFor",e.ProvidesQuotationFor="ProvidesQuotationFor",e.Qualifies="Qualifies",e.Refutes="Refutes",e.RepliesTo="RepliesTo",e.Retracts="Retracts",e.Reviews="Reviews",e.Ridicules="Ridicules",e.SharesAuthorInstitutionWith="SharesAuthorInstitutionWith",e.SharesAuthorWith="SharesAuthorWith",e.SharesFundingAgencyWith="SharesFundingAgencyWith",e.SharesJournalWith="SharesJournalWith",e.SharesPublicationVenueWith="SharesPublicationVenueWith",e.SpeculatesOn="SpeculatesOn",e.Supports="Supports",e.Updates="Updates",e.UsesConclusionsFrom="UsesConclusionsFrom",e.UsesDataFrom="UsesDataFrom",e.UsesMethodIn="UsesMethodIn"}(t||(t={}));var De={CodeBlock:"CodeBlock",CodeChunk:"CodeChunk"},Oe={CodeFragment:"CodeFragment",CodeExpression:"CodeExpression"},ke={Code:"Code",CodeBlock:"CodeBlock",CodeChunk:"CodeChunk",CodeExpression:"CodeExpression",CodeFragment:"CodeFragment"},Fe={ContactPoint:"ContactPoint",PostalAddress:"PostalAddress"},Ee={CreativeWork:"CreativeWork",Article:"Article",AudioObject:"AudioObject",Claim:"Claim",Collection:"Collection",Comment:"Comment",Datatable:"Datatable",Figure:"Figure",ImageObject:"ImageObject",MediaObject:"MediaObject",Periodical:"Periodical",PublicationIssue:"PublicationIssue",PublicationVolume:"PublicationVolume",Review:"Review",SoftwareApplication:"SoftwareApplication",SoftwareSourceCode:"SoftwareSourceCode",Table:"Table",VideoObject:"VideoObject"},Me={Entity:"Entity",ArrayValidator:"ArrayValidator",Article:"Article",AudioObject:"AudioObject",BooleanValidator:"BooleanValidator",Brand:"Brand",CitationIntentEnumeration:"CitationIntentEnumeration",Cite:"Cite",CiteGroup:"CiteGroup",Claim:"Claim",Code:"Code",CodeBlock:"CodeBlock",CodeChunk:"CodeChunk",CodeError:"CodeError",CodeExpression:"CodeExpression",CodeFragment:"CodeFragment",Collection:"Collection",Comment:"Comment",ConstantValidator:"ConstantValidator",ContactPoint:"ContactPoint",CreativeWork:"CreativeWork",Datatable:"Datatable",DatatableColumn:"DatatableColumn",Date:"Date",DefinedTerm:"DefinedTerm",Delete:"Delete",Emphasis:"Emphasis",EnumValidator:"EnumValidator",Enumeration:"Enumeration",Figure:"Figure",Function:"Function",Grant:"Grant",Heading:"Heading",ImageObject:"ImageObject",Include:"Include",IntegerValidator:"IntegerValidator",Link:"Link",List:"List",ListItem:"ListItem",Mark:"Mark",Math:"Math",MathBlock:"MathBlock",MathFragment:"MathFragment",MediaObject:"MediaObject",MonetaryGrant:"MonetaryGrant",NontextualAnnotation:"NontextualAnnotation",Note:"Note",NumberValidator:"NumberValidator",Organization:"Organization",Paragraph:"Paragraph",Parameter:"Parameter",Periodical:"Periodical",Person:"Person",PostalAddress:"PostalAddress",Product:"Product",PropertyValue:"PropertyValue",PublicationIssue:"PublicationIssue",PublicationVolume:"PublicationVolume",Quote:"Quote",QuoteBlock:"QuoteBlock",Review:"Review",SoftwareApplication:"SoftwareApplication",SoftwareEnvironment:"SoftwareEnvironment",SoftwareSession:"SoftwareSession",SoftwareSourceCode:"SoftwareSourceCode",StringValidator:"StringValidator",Strong:"Strong",Subscript:"Subscript",Superscript:"Superscript",Table:"Table",TableCell:"TableCell",TableRow:"TableRow",ThematicBreak:"ThematicBreak",Thing:"Thing",TupleValidator:"TupleValidator",Validator:"Validator",Variable:"Variable",VideoObject:"VideoObject",VolumeMount:"VolumeMount"},je={Enumeration:"Enumeration",CitationIntentEnumeration:"CitationIntentEnumeration"},Te={Grant:"Grant",MonetaryGrant:"MonetaryGrant"},Re={Mark:"Mark",Delete:"Delete",Emphasis:"Emphasis",NontextualAnnotation:"NontextualAnnotation",Quote:"Quote",Strong:"Strong",Subscript:"Subscript",Superscript:"Superscript"},we={Math:"Math",MathBlock:"MathBlock",MathFragment:"MathFragment"},xe={MediaObject:"MediaObject",AudioObject:"AudioObject",ImageObject:"ImageObject",VideoObject:"VideoObject"},We={Thing:"Thing",Article:"Article",AudioObject:"AudioObject",Brand:"Brand",CitationIntentEnumeration:"CitationIntentEnumeration",Claim:"Claim",Collection:"Collection",Comment:"Comment",ContactPoint:"ContactPoint",CreativeWork:"CreativeWork",Datatable:"Datatable",DatatableColumn:"DatatableColumn",DefinedTerm:"DefinedTerm",Enumeration:"Enumeration",Figure:"Figure",Grant:"Grant",ImageObject:"ImageObject",ListItem:"ListItem",MediaObject:"MediaObject",MonetaryGrant:"MonetaryGrant",Organization:"Organization",Periodical:"Periodical",Person:"Person",PostalAddress:"PostalAddress",Product:"Product",PropertyValue:"PropertyValue",PublicationIssue:"PublicationIssue",PublicationVolume:"PublicationVolume",Review:"Review",SoftwareApplication:"SoftwareApplication",SoftwareEnvironment:"SoftwareEnvironment",SoftwareSession:"SoftwareSession",SoftwareSourceCode:"SoftwareSourceCode",Table:"Table",VideoObject:"VideoObject",VolumeMount:"VolumeMount"},Le={Validator:"Validator",ArrayValidator:"ArrayValidator",BooleanValidator:"BooleanValidator",ConstantValidator:"ConstantValidator",EnumValidator:"EnumValidator",IntegerValidator:"IntegerValidator",NumberValidator:"NumberValidator",StringValidator:"StringValidator",TupleValidator:"TupleValidator"},Ge={Variable:"Variable",Parameter:"Parameter"},Qe={Claim:"Claim",CodeBlock:"CodeBlock",CodeChunk:"CodeChunk",Collection:"Collection",Figure:"Figure",Heading:"Heading",List:"List",ListItem:"ListItem",MathBlock:"MathBlock",Paragraph:"Paragraph",QuoteBlock:"QuoteBlock",Table:"Table",ThematicBreak:"ThematicBreak"},Ne={AudioObject:"AudioObject",Cite:"Cite",CiteGroup:"CiteGroup",CodeExpression:"CodeExpression",CodeFragment:"CodeFragment",Delete:"Delete",Emphasis:"Emphasis",ImageObject:"ImageObject",Link:"Link",MathFragment:"MathFragment",MediaObject:"MediaObject",NontextualAnnotation:"NontextualAnnotation",Note:"Note",Quote:"Quote",Strong:"Strong",Subscript:"Subscript",Superscript:"Superscript",VideoObject:"VideoObject"},Ue=function(e){return function(t){return Object.keys(e).includes(t)}},ze=function(e){return function(t){return!!Ye(t)&&Ue(e)(t.type)}},He=function(e){var t,o=((t={})[e]=e,t);return ze(o)},qe=function(e,t){return Ye(t)&&t.type===e},Je=function(e,t){return Ye(t)&&Object.keys(e).includes(t.type)},Ke=function(e){return function(t){return void 0!==t&&qe(e,t)}},Xe=function(e){var t=typeof e;return null===e||"boolean"===t||"number"===t||"string"===t},Ye=function(e){return null!=e&&Object.prototype.hasOwnProperty.call(e,"type")},Ze=function(e){return!("object"!=typeof e||!Ye(e))&&Ue(Ne)(e.type)},$e=function(e){return Xe(e)||Ze(e)},_e=ze(Qe),et=ze(Ee),tt=ze(ke),ot=He("Article"),nt=He("Paragraph"),rt=He("ListItem"),it=function(e){return null===e?"Null":"boolean"==typeof e?"Boolean":"number"==typeof e?"Number":"string"==typeof e?"String":Array.isArray(e)?"Array":Ye(e)?e.type:"Object"},at="1.7.0",ut="1.7.0".split(".")[0],st="1.7.0".split(".").slice(0,2).join(".");export{t as CitationIntentEnumeration,F as arrayValidator,g as article,V as audioObject,Qe as blockContentTypes,E as booleanValidator,b as brand,r as cite,i as citeGroup,A as claim,a as code,u as codeBlock,De as codeBlockTypes,s as codeChunk,l as codeError,c as codeExpression,d as codeFragment,Oe as codeFragmentTypes,ke as codeTypes,S as collection,h as comment,M as constantValidator,I as contactPoint,Fe as contactPointTypes,B as creativeWork,Ee as creativeWorkTypes,P as datatable,D as datatableColumn,p as date,O as definedTerm,C as del,m as emphasis,n as entity,Me as entityTypes,j as enumValidator,T as enumeration,je as enumerationTypes,R as figure,w as function_,x as grant,Te as grantTypes,W as heading,L as imageObject,G as include,Ne as inlineContentTypes,Q as integerValidator,He as is,qe as isA,ot as isArticle,_e as isBlockContent,tt as isCode,et as isCreativeWork,Ye as isEntity,$e as isInlineContent,Ze as isInlineEntity,Je as isInstanceOf,rt as isListItem,nt as isParagraph,Xe as isPrimitive,Ke as isType,N as link,U as list,z as listItem,y as mark,Re as markTypes,H as math,q as mathBlock,J as mathFragment,we as mathTypes,v as mediaObject,xe as mediaObjectTypes,K as monetaryGrant,ze as nodeIs,it as nodeType,X as nontextualAnnotation,Y as note,Z as numberValidator,$ as organization,_ as paragraph,te as parameter,oe as periodical,ne as person,re as postalAddress,ie as product,ae as propertyValue,ue as publicationIssue,se as publicationVolume,de as quote,ce as quoteBlock,le as review,pe as softwareApplication,ye as softwareEnvironment,Ce as softwareSession,me as softwareSourceCode,fe as stringValidator,be as strong,Ie as subscript,Be as superscript,ge as table,Ae as tableCell,Se as tableRow,he as thematicBreak,f as thing,We as thingTypes,Pe as tupleValidator,Ue as typeIs,k as validator,Le as validatorTypes,ee as variable,Ge as variableTypes,at as version,ut as versionMajor,st as versionMinor,ve as videoObject,Ve as volumeMount}; //# sourceMappingURL=schema.mjs.map