UNPKG

129 kBSource Map (JSON)View Raw
1{"version":3,"file":"index.js","sources":["../ts/types.ts","../ts/util/guards.ts","../ts/util/version.ts","../ts/util/jsonld.ts","../ts/util/jsonSchemas.ts","../ts/util/nodeType.ts","../ts/util/microdata.ts"],"sourcesContent":["/* eslint-disable */\n\n// This file was automatically generated by `typescript.ts`.\n// Do not modify it by hand. Instead, modify the source `.schema.yaml` files\n// in the `schema` directory and run `npm run build:ts` to regenerate it.\n\ntype Null = null\ntype Boolean = boolean\ntype Integer = number\ntype Number = number\ntype String = string\ntype Object = Record<string, unknown>\ntype Primitives =\n | undefined\n | null\n | boolean\n | number\n | string\n | Array<unknown>\n | Object\n\n// Remove properties from an Object if their value is undefined\nconst compact = <O extends object>(o: O): O =>\n Object.entries(o).reduce(\n (compactedO: O, [k, v]) =>\n v === undefined ? compactedO : { ...compactedO, [k]: v },\n {} as O\n )\n\nexport interface Types {\n Array: Array<unknown>\n ArrayValidator: ArrayValidator\n Article: Article\n AudioObject: AudioObject\n BlockContent: BlockContent\n Boolean: Boolean\n BooleanValidator: BooleanValidator\n Brand: Brand\n CitationIntentEnumeration: CitationIntentEnumeration\n Cite: Cite\n CiteGroup: CiteGroup\n Claim: Claim\n Code: Code\n CodeBlock: CodeBlock\n CodeChunk: CodeChunk\n CodeError: CodeError\n CodeExecutable: CodeExecutable\n CodeExecutableTypes: CodeExecutableTypes\n CodeExpression: CodeExpression\n CodeFragment: CodeFragment\n CodeTypes: CodeTypes\n Collection: Collection\n Comment: Comment\n ConstantValidator: ConstantValidator\n ContactPoint: ContactPoint\n ContactPointTypes: ContactPointTypes\n CreativeWork: CreativeWork\n CreativeWorkTypes: CreativeWorkTypes\n Datatable: Datatable\n DatatableColumn: DatatableColumn\n Date: Date\n DefinedTerm: DefinedTerm\n Delete: Delete\n Emphasis: Emphasis\n Entity: Entity\n EntityTypes: EntityTypes\n EnumValidator: EnumValidator\n Enumeration: Enumeration\n EnumerationTypes: EnumerationTypes\n Figure: Figure\n Function: Function\n Grant: Grant\n GrantTypes: GrantTypes\n Heading: Heading\n ImageObject: ImageObject\n Include: Include\n InlineContent: InlineContent\n Integer: Integer\n IntegerValidator: IntegerValidator\n Link: Link\n List: List\n ListItem: ListItem\n Mark: Mark\n MarkTypes: MarkTypes\n Math: Math\n MathBlock: MathBlock\n MathFragment: MathFragment\n MathTypes: MathTypes\n MediaObject: MediaObject\n MediaObjectTypes: MediaObjectTypes\n MonetaryGrant: MonetaryGrant\n Node: Node\n NontextualAnnotation: NontextualAnnotation\n Note: Note\n Null: Null\n Number: Number\n NumberValidator: NumberValidator\n Object: Object\n Organization: Organization\n Paragraph: Paragraph\n Parameter: Parameter\n Periodical: Periodical\n Person: Person\n PostalAddress: PostalAddress\n Product: Product\n PropertyValue: PropertyValue\n PublicationIssue: PublicationIssue\n PublicationVolume: PublicationVolume\n Quote: Quote\n QuoteBlock: QuoteBlock\n Review: Review\n SoftwareApplication: SoftwareApplication\n SoftwareEnvironment: SoftwareEnvironment\n SoftwareSession: SoftwareSession\n SoftwareSourceCode: SoftwareSourceCode\n String: String\n StringValidator: StringValidator\n Strong: Strong\n Subscript: Subscript\n Superscript: Superscript\n Table: Table\n TableCell: TableCell\n TableRow: TableRow\n ThematicBreak: ThematicBreak\n Thing: Thing\n ThingTypes: ThingTypes\n TupleValidator: TupleValidator\n Validator: Validator\n ValidatorTypes: ValidatorTypes\n Variable: Variable\n VideoObject: VideoObject\n VolumeMount: VolumeMount\n}\n\n/**\n * The most simple compound (ie. non-atomic like `number`, `string` etc) type.\n */\nexport interface Entity {\n type:\n | 'Entity'\n | 'ArrayValidator'\n | 'Article'\n | 'AudioObject'\n | 'BooleanValidator'\n | 'Brand'\n | 'CitationIntentEnumeration'\n | 'Cite'\n | 'CiteGroup'\n | 'Claim'\n | 'Code'\n | 'CodeBlock'\n | 'CodeChunk'\n | 'CodeError'\n | 'CodeExecutable'\n | 'CodeExpression'\n | 'CodeFragment'\n | 'Collection'\n | 'Comment'\n | 'ConstantValidator'\n | 'ContactPoint'\n | 'CreativeWork'\n | 'Datatable'\n | 'DatatableColumn'\n | 'Date'\n | 'DefinedTerm'\n | 'Delete'\n | 'Emphasis'\n | 'EnumValidator'\n | 'Enumeration'\n | 'Figure'\n | 'Function'\n | 'Grant'\n | 'Heading'\n | 'ImageObject'\n | 'Include'\n | 'IntegerValidator'\n | 'Link'\n | 'List'\n | 'ListItem'\n | 'Mark'\n | 'Math'\n | 'MathBlock'\n | 'MathFragment'\n | 'MediaObject'\n | 'MonetaryGrant'\n | 'NontextualAnnotation'\n | 'Note'\n | 'NumberValidator'\n | 'Organization'\n | 'Paragraph'\n | 'Parameter'\n | 'Periodical'\n | 'Person'\n | 'PostalAddress'\n | 'Product'\n | 'PropertyValue'\n | 'PublicationIssue'\n | 'PublicationVolume'\n | 'Quote'\n | 'QuoteBlock'\n | 'Review'\n | 'SoftwareApplication'\n | 'SoftwareEnvironment'\n | 'SoftwareSession'\n | 'SoftwareSourceCode'\n | 'StringValidator'\n | 'Strong'\n | 'Subscript'\n | 'Superscript'\n | 'Table'\n | 'TableCell'\n | 'TableRow'\n | 'ThematicBreak'\n | 'Thing'\n | 'TupleValidator'\n | 'Validator'\n | 'Variable'\n | 'VideoObject'\n | 'VolumeMount'\n id?: String\n meta?: Object\n}\n\n/**\n * Create a `Entity` node\n * @param props Object containing Entity schema properties as key/value pairs\n * @returns {Entity} Entity schema node\n */\nexport const entity = (props: Omit<Entity, 'type'> = {}): Entity => ({\n ...compact(props),\n type: 'Entity',\n})\n\n/**\n * A reference to a CreativeWork that is cited in another CreativeWork.\n */\nexport interface Cite extends Entity {\n type: 'Cite'\n target: String\n citationIntent?: Array<CitationIntentEnumeration>\n citationMode?:\n | 'Parenthetical'\n | 'Narrative'\n | 'NarrativeAuthor'\n | 'NarrativeYear'\n | 'normal'\n | 'suppressAuthor'\n citationPrefix?: String\n citationSuffix?: String\n content?: Array<InlineContent>\n pageEnd?: Integer | String\n pageStart?: Integer | String\n pagination?: String\n}\n\n/**\n * Create a `Cite` node\n * @param props Object containing Cite schema properties as key/value pairs\n * @returns {Cite} Cite schema node\n */\nexport const cite = (props: Omit<Cite, 'type'>): Cite => ({\n ...compact(props),\n type: 'Cite',\n})\n\n/**\n * A group of Cite nodes.\n */\nexport interface CiteGroup extends Entity {\n type: 'CiteGroup'\n items: Array<Cite>\n}\n\n/**\n * Create a `CiteGroup` node\n * @param props Object containing CiteGroup schema properties as key/value pairs\n * @returns {CiteGroup} CiteGroup schema node\n */\nexport const citeGroup = (props: Omit<CiteGroup, 'type'>): CiteGroup => ({\n ...compact(props),\n type: 'CiteGroup',\n})\n\n/**\n * Base type for non-executable (e.g. `CodeBlock`) and executable (e.g. `CodeExpression`) code nodes.\n */\nexport interface Code extends Entity {\n type:\n | 'Code'\n | 'CodeBlock'\n | 'CodeChunk'\n | 'CodeExecutable'\n | 'CodeExpression'\n | 'CodeFragment'\n text: String\n mediaType?: String\n programmingLanguage?: String\n}\n\n/**\n * Create a `Code` node\n * @param props Object containing Code schema properties as key/value pairs\n * @returns {Code} Code schema node\n */\nexport const code = (props: Omit<Code, 'type'>): Code => ({\n ...compact(props),\n type: 'Code',\n})\n\n/**\n * A code block.\n */\nexport interface CodeBlock extends Code {\n type: 'CodeBlock'\n}\n\n/**\n * Create a `CodeBlock` node\n * @param props Object containing CodeBlock schema properties as key/value pairs\n * @returns {CodeBlock} CodeBlock schema node\n */\nexport const codeBlock = (props: Omit<CodeBlock, 'type'>): CodeBlock => ({\n ...compact(props),\n type: 'CodeBlock',\n})\n\n/**\n * Base type for executable code nodes (i.e. `CodeChunk` and `CodeExpression`).\n */\nexport interface CodeExecutable extends Code {\n type: 'CodeExecutable' | 'CodeChunk' | 'CodeExpression'\n programmingLanguage: String\n compileDigest?: String\n duration?: Number\n errors?: Array<CodeError>\n executeDigest?: String\n}\n\n/**\n * Create a `CodeExecutable` node\n * @param props Object containing CodeExecutable schema properties as key/value pairs\n * @returns {CodeExecutable} CodeExecutable schema node\n */\nexport const codeExecutable = (\n props: Omit<CodeExecutable, 'type'>\n): CodeExecutable => ({\n ...compact(props),\n type: 'CodeExecutable',\n})\n\n/**\n * A executable chunk of code.\n */\nexport interface CodeChunk extends CodeExecutable {\n type: 'CodeChunk'\n programmingLanguage: String\n caption?: Array<BlockContent> | String\n label?: String\n outputs?: Array<Node>\n}\n\n/**\n * Create a `CodeChunk` node\n * @param props Object containing CodeChunk schema properties as key/value pairs\n * @returns {CodeChunk} CodeChunk schema node\n */\nexport const codeChunk = (props: Omit<CodeChunk, 'type'>): CodeChunk => ({\n ...compact(props),\n type: 'CodeChunk',\n})\n\n/**\n * An executable programming code expression.\n */\nexport interface CodeExpression extends CodeExecutable {\n type: 'CodeExpression'\n programmingLanguage: String\n output?: Node\n}\n\n/**\n * Create a `CodeExpression` node\n * @param props Object containing CodeExpression schema properties as key/value pairs\n * @returns {CodeExpression} CodeExpression schema node\n */\nexport const codeExpression = (\n props: Omit<CodeExpression, 'type'>\n): CodeExpression => ({\n ...compact(props),\n type: 'CodeExpression',\n})\n\n/**\n * Inline code.\n */\nexport interface CodeFragment extends Code {\n type: 'CodeFragment'\n}\n\n/**\n * Create a `CodeFragment` node\n * @param props Object containing CodeFragment schema properties as key/value pairs\n * @returns {CodeFragment} CodeFragment schema node\n */\nexport const codeFragment = (\n props: Omit<CodeFragment, 'type'>\n): CodeFragment => ({\n ...compact(props),\n type: 'CodeFragment',\n})\n\n/**\n * An error that occurred when parsing, compiling or executing a Code node.\n */\nexport interface CodeError extends Entity {\n type: 'CodeError'\n errorMessage: String\n errorType?: String\n stackTrace?: String\n}\n\n/**\n * Create a `CodeError` node\n * @param props Object containing CodeError schema properties as key/value pairs\n * @returns {CodeError} CodeError schema node\n */\nexport const codeError = (props: Omit<CodeError, 'type'>): CodeError => ({\n ...compact(props),\n type: 'CodeError',\n})\n\n/**\n * A date encoded as a ISO 8601 string.\n */\nexport interface Date extends Entity {\n type: 'Date'\n value: String\n}\n\n/**\n * Create a `Date` node\n * @param props Object containing Date schema properties as key/value pairs\n * @returns {Date} Date schema node\n */\nexport const date = (props: Omit<Date, 'type'>): Date => ({\n ...compact(props),\n type: 'Date',\n})\n\n/**\n * A base class for nodes that mark some other inline content\n * in some way (e.g. as being emphasised, or quoted).\n */\nexport interface Mark extends Entity {\n type:\n | 'Mark'\n | 'Delete'\n | 'Emphasis'\n | 'NontextualAnnotation'\n | 'Quote'\n | 'Strong'\n | 'Subscript'\n | 'Superscript'\n content: Array<InlineContent>\n}\n\n/**\n * Create a `Mark` node\n * @param props Object containing Mark schema properties as key/value pairs\n * @returns {Mark} Mark schema node\n */\nexport const mark = (props: Omit<Mark, 'type'>): Mark => ({\n ...compact(props),\n type: 'Mark',\n})\n\n/**\n * Content that is marked for deletion\n */\nexport interface Delete extends Mark {\n type: 'Delete'\n}\n\n/**\n * Create a `Delete` node\n * @param props Object containing Delete schema properties as key/value pairs\n * @returns {Delete} Delete schema node\n */\nexport const del = (props: Omit<Delete, 'type'>): Delete => ({\n ...compact(props),\n type: 'Delete',\n})\n\n/**\n * Emphasised content.\n */\nexport interface Emphasis extends Mark {\n type: 'Emphasis'\n}\n\n/**\n * Create a `Emphasis` node\n * @param props Object containing Emphasis schema properties as key/value pairs\n * @returns {Emphasis} Emphasis schema node\n */\nexport const emphasis = (props: Omit<Emphasis, 'type'>): Emphasis => ({\n ...compact(props),\n type: 'Emphasis',\n})\n\n/**\n * The most generic type of item.\n */\nexport interface Thing extends Entity {\n type:\n | 'Thing'\n | 'Article'\n | 'AudioObject'\n | 'Brand'\n | 'CitationIntentEnumeration'\n | 'Claim'\n | 'Collection'\n | 'Comment'\n | 'ContactPoint'\n | 'CreativeWork'\n | 'Datatable'\n | 'DatatableColumn'\n | 'DefinedTerm'\n | 'Enumeration'\n | 'Figure'\n | 'Grant'\n | 'ImageObject'\n | 'ListItem'\n | 'MediaObject'\n | 'MonetaryGrant'\n | 'Organization'\n | 'Periodical'\n | 'Person'\n | 'PostalAddress'\n | 'Product'\n | 'PropertyValue'\n | 'PublicationIssue'\n | 'PublicationVolume'\n | 'Review'\n | 'SoftwareApplication'\n | 'SoftwareEnvironment'\n | 'SoftwareSession'\n | 'SoftwareSourceCode'\n | 'Table'\n | 'VideoObject'\n | 'VolumeMount'\n alternateNames?: Array<String>\n description?: Array<BlockContent> | Array<InlineContent> | String\n identifiers?: Array<PropertyValue | String>\n images?: Array<ImageObject | String>\n name?: String\n url?: String\n}\n\n/**\n * Create a `Thing` node\n * @param props Object containing Thing schema properties as key/value pairs\n * @returns {Thing} Thing schema node\n */\nexport const thing = (props: Omit<Thing, 'type'> = {}): Thing => ({\n ...compact(props),\n type: 'Thing',\n})\n\n/**\n * A brand used by an organization or person for labeling a product,\n * product group, or similar.\n */\nexport interface Brand extends Thing {\n type: 'Brand'\n name: String\n logo?: ImageObject | String\n reviews?: Array<String>\n}\n\n/**\n * Create a `Brand` node\n * @param props Object containing Brand schema properties as key/value pairs\n * @returns {Brand} Brand schema node\n */\nexport const brand = (props: Omit<Brand, 'type'>): Brand => ({\n ...compact(props),\n type: 'Brand',\n})\n\n/**\n * A contact point, usually within an organization.\n */\nexport interface ContactPoint extends Thing {\n type: 'ContactPoint' | 'PostalAddress'\n availableLanguages?: Array<String>\n emails?: Array<String>\n telephoneNumbers?: Array<String>\n}\n\n/**\n * Create a `ContactPoint` node\n * @param props Object containing ContactPoint schema properties as key/value pairs\n * @returns {ContactPoint} ContactPoint schema node\n */\nexport const contactPoint = (\n props: Omit<ContactPoint, 'type'> = {}\n): ContactPoint => ({\n ...compact(props),\n type: 'ContactPoint',\n})\n\n/**\n * A creative work, including books, movies, photographs, software programs, etc.\n */\nexport interface CreativeWork extends Thing {\n type:\n | 'CreativeWork'\n | 'Article'\n | 'AudioObject'\n | 'Claim'\n | 'Collection'\n | 'Comment'\n | 'Datatable'\n | 'Figure'\n | 'ImageObject'\n | 'MediaObject'\n | 'Periodical'\n | 'PublicationIssue'\n | 'PublicationVolume'\n | 'Review'\n | 'SoftwareApplication'\n | 'SoftwareSourceCode'\n | 'Table'\n | 'VideoObject'\n about?: Array<ThingTypes>\n authors?: Array<Person | Organization>\n comments?: Array<Comment>\n content?: Array<Node> | String\n dateAccepted?: Date\n dateCreated?: Date\n dateModified?: Date\n datePublished?: Date\n dateReceived?: Date\n editors?: Array<Person>\n fundedBy?: Array<Grant | MonetaryGrant>\n funders?: Array<Person | Organization>\n genre?: Array<String>\n isPartOf?: CreativeWorkTypes\n keywords?: Array<String>\n licenses?: Array<CreativeWorkTypes | String>\n maintainers?: Array<Person | Organization>\n parts?: Array<CreativeWorkTypes>\n publisher?: Person | Organization\n references?: Array<CreativeWorkTypes | String>\n text?: String\n title?: Array<InlineContent> | String\n version?: String | Number\n}\n\n/**\n * Create a `CreativeWork` node\n * @param props Object containing CreativeWork schema properties as key/value pairs\n * @returns {CreativeWork} CreativeWork schema node\n */\nexport const creativeWork = (\n props: Omit<CreativeWork, 'type'> = {}\n): CreativeWork => ({\n ...compact(props),\n type: 'CreativeWork',\n})\n\n/**\n * An article, including news and scholarly articles.\n */\nexport interface Article extends CreativeWork {\n type: 'Article'\n content?: Array<BlockContent>\n pageEnd?: Integer | String\n pageStart?: Integer | String\n pagination?: String\n}\n\n/**\n * Create a `Article` node\n * @param props Object containing Article schema properties as key/value pairs\n * @returns {Article} Article schema node\n */\nexport const article = (props: Omit<Article, 'type'> = {}): Article => ({\n ...compact(props),\n type: 'Article',\n})\n\n/**\n * A claim represents specific reviewable facts or statements.\n */\nexport interface Claim extends CreativeWork {\n type: 'Claim'\n content: Array<BlockContent>\n claimType?:\n | 'Statement'\n | 'Theorem'\n | 'Lemma'\n | 'Proof'\n | 'Postulate'\n | 'Hypothesis'\n | 'Proposition'\n | 'Corollary'\n label?: String\n}\n\n/**\n * Create a `Claim` node\n * @param props Object containing Claim schema properties as key/value pairs\n * @returns {Claim} Claim schema node\n */\nexport const claim = (props: Omit<Claim, 'type'>): Claim => ({\n ...compact(props),\n type: 'Claim',\n})\n\n/**\n * A collection of CreativeWorks or other artifacts.\n */\nexport interface Collection extends CreativeWork {\n type: 'Collection'\n parts: Array<CreativeWorkTypes>\n}\n\n/**\n * Create a `Collection` node\n * @param props Object containing Collection schema properties as key/value pairs\n * @returns {Collection} Collection schema node\n */\nexport const collection = (props: Omit<Collection, 'type'>): Collection => ({\n ...compact(props),\n type: 'Collection',\n})\n\n/**\n * A comment on an item, e.g on a Article, or SoftwareSourceCode.\n */\nexport interface Comment extends CreativeWork {\n type: 'Comment'\n commentAspect?: String\n parentItem?: Comment\n}\n\n/**\n * Create a `Comment` node\n * @param props Object containing Comment schema properties as key/value pairs\n * @returns {Comment} Comment schema node\n */\nexport const comment = (props: Omit<Comment, 'type'> = {}): Comment => ({\n ...compact(props),\n type: 'Comment',\n})\n\n/**\n * A table of data.\n */\nexport interface Datatable extends CreativeWork {\n type: 'Datatable'\n columns: Array<DatatableColumn>\n}\n\n/**\n * Create a `Datatable` node\n * @param props Object containing Datatable schema properties as key/value pairs\n * @returns {Datatable} Datatable schema node\n */\nexport const datatable = (props: Omit<Datatable, 'type'>): Datatable => ({\n ...compact(props),\n type: 'Datatable',\n})\n\n/**\n * A media object, such as an image, video, or audio object embedded in a web page or a\n * downloadable dataset.\n */\nexport interface MediaObject extends CreativeWork {\n type: 'MediaObject' | 'AudioObject' | 'ImageObject' | 'VideoObject'\n contentUrl: String\n bitrate?: Number\n contentSize?: Number\n embedUrl?: String\n mediaType?: String\n}\n\n/**\n * Create a `MediaObject` node\n * @param props Object containing MediaObject schema properties as key/value pairs\n * @returns {MediaObject} MediaObject schema node\n */\nexport const mediaObject = (props: Omit<MediaObject, 'type'>): MediaObject => ({\n ...compact(props),\n type: 'MediaObject',\n})\n\n/**\n * An audio file\n */\nexport interface AudioObject extends MediaObject {\n type: 'AudioObject'\n caption?: String\n transcript?: String\n}\n\n/**\n * Create a `AudioObject` node\n * @param props Object containing AudioObject schema properties as key/value pairs\n * @returns {AudioObject} AudioObject schema node\n */\nexport const audioObject = (props: Omit<AudioObject, 'type'>): AudioObject => ({\n ...compact(props),\n type: 'AudioObject',\n})\n\n/**\n * A column of data within a Datatable.\n */\nexport interface DatatableColumn extends Thing {\n type: 'DatatableColumn'\n name: String\n values: Array<Node>\n validator?: ArrayValidator\n}\n\n/**\n * Create a `DatatableColumn` node\n * @param props Object containing DatatableColumn schema properties as key/value pairs\n * @returns {DatatableColumn} DatatableColumn schema node\n */\nexport const datatableColumn = (\n props: Omit<DatatableColumn, 'type'>\n): DatatableColumn => ({\n ...compact(props),\n type: 'DatatableColumn',\n})\n\n/**\n * A word, name, acronym, phrase, etc. with a formal definition.\n */\nexport interface DefinedTerm extends Thing {\n type: 'DefinedTerm'\n name: String\n termCode?: String\n}\n\n/**\n * Create a `DefinedTerm` node\n * @param props Object containing DefinedTerm schema properties as key/value pairs\n * @returns {DefinedTerm} DefinedTerm schema node\n */\nexport const definedTerm = (props: Omit<DefinedTerm, 'type'>): DefinedTerm => ({\n ...compact(props),\n type: 'DefinedTerm',\n})\n\n/**\n * A base for all validator types.\n */\nexport interface Validator extends Entity {\n type:\n | 'Validator'\n | 'ArrayValidator'\n | 'BooleanValidator'\n | 'ConstantValidator'\n | 'EnumValidator'\n | 'IntegerValidator'\n | 'NumberValidator'\n | 'StringValidator'\n | 'TupleValidator'\n}\n\n/**\n * Create a `Validator` node\n * @param props Object containing Validator schema properties as key/value pairs\n * @returns {Validator} Validator schema node\n */\nexport const validator = (props: Omit<Validator, 'type'> = {}): Validator => ({\n ...compact(props),\n type: 'Validator',\n})\n\n/**\n * A validator specifying constraints on an array node.\n */\nexport interface ArrayValidator extends Validator {\n type: 'ArrayValidator'\n contains?: ValidatorTypes\n itemsValidator?: ValidatorTypes\n maxItems?: Integer\n minItems?: Integer\n uniqueItems?: Boolean\n}\n\n/**\n * Create a `ArrayValidator` node\n * @param props Object containing ArrayValidator schema properties as key/value pairs\n * @returns {ArrayValidator} ArrayValidator schema node\n */\nexport const arrayValidator = (\n props: Omit<ArrayValidator, 'type'> = {}\n): ArrayValidator => ({\n ...compact(props),\n type: 'ArrayValidator',\n})\n\n/**\n * A schema specifying that a node must be a boolean value.\n */\nexport interface BooleanValidator extends Validator {\n type: 'BooleanValidator'\n}\n\n/**\n * Create a `BooleanValidator` node\n * @param props Object containing BooleanValidator schema properties as key/value pairs\n * @returns {BooleanValidator} BooleanValidator schema node\n */\nexport const booleanValidator = (\n props: Omit<BooleanValidator, 'type'> = {}\n): BooleanValidator => ({\n ...compact(props),\n type: 'BooleanValidator',\n})\n\n/**\n * A validator specifying a constant value that a node must have.\n */\nexport interface ConstantValidator extends Validator {\n type: 'ConstantValidator'\n value?: Node\n}\n\n/**\n * Create a `ConstantValidator` node\n * @param props Object containing ConstantValidator schema properties as key/value pairs\n * @returns {ConstantValidator} ConstantValidator schema node\n */\nexport const constantValidator = (\n props: Omit<ConstantValidator, 'type'> = {}\n): ConstantValidator => ({\n ...compact(props),\n type: 'ConstantValidator',\n})\n\n/**\n * A schema specifying that a node must be one of several values.\n */\nexport interface EnumValidator extends Validator {\n type: 'EnumValidator'\n values?: Array<Node>\n}\n\n/**\n * Create a `EnumValidator` node\n * @param props Object containing EnumValidator schema properties as key/value pairs\n * @returns {EnumValidator} EnumValidator schema node\n */\nexport const enumValidator = (\n props: Omit<EnumValidator, 'type'> = {}\n): EnumValidator => ({\n ...compact(props),\n type: 'EnumValidator',\n})\n\n/**\n * Lists or enumerations, for example, a list of cuisines or music genres, etc.\n */\nexport interface Enumeration extends Thing {\n type: 'Enumeration' | 'CitationIntentEnumeration'\n}\n\n/**\n * Create a `Enumeration` node\n * @param props Object containing Enumeration schema properties as key/value pairs\n * @returns {Enumeration} Enumeration schema node\n */\nexport const enumeration = (\n props: Omit<Enumeration, 'type'> = {}\n): Enumeration => ({\n ...compact(props),\n type: 'Enumeration',\n})\n\n/**\n * Encapsulates one or more images, videos, tables, etc, and provides captions and labels for them.\n */\nexport interface Figure extends CreativeWork {\n type: 'Figure'\n caption?: Array<BlockContent> | String\n label?: String\n}\n\n/**\n * Create a `Figure` node\n * @param props Object containing Figure schema properties as key/value pairs\n * @returns {Figure} Figure schema node\n */\nexport const figure = (props: Omit<Figure, 'type'> = {}): Figure => ({\n ...compact(props),\n type: 'Figure',\n})\n\n/**\n * A function with a name, which might take Parameters and return a value of a certain type.\n */\nexport interface Function extends Entity {\n type: 'Function'\n name?: String\n parameters?: Array<Parameter>\n returns?: ValidatorTypes\n}\n\n/**\n * Create a `Function` node\n * @param props Object containing Function schema properties as key/value pairs\n * @returns {Function} Function schema node\n */\nexport const function_ = (props: Omit<Function, 'type'> = {}): Function => ({\n ...compact(props),\n type: 'Function',\n})\n\n/**\n * A grant, typically financial or otherwise quantifiable, of resources.\n */\nexport interface Grant extends Thing {\n type: 'Grant' | 'MonetaryGrant'\n fundedItems?: Array<Thing>\n sponsors?: Array<Person | Organization>\n}\n\n/**\n * Create a `Grant` node\n * @param props Object containing Grant schema properties as key/value pairs\n * @returns {Grant} Grant schema node\n */\nexport const grant = (props: Omit<Grant, 'type'> = {}): Grant => ({\n ...compact(props),\n type: 'Grant',\n})\n\n/**\n * A heading.\n */\nexport interface Heading extends Entity {\n type: 'Heading'\n content: Array<InlineContent>\n depth?: Integer\n}\n\n/**\n * Create a `Heading` node\n * @param props Object containing Heading schema properties as key/value pairs\n * @returns {Heading} Heading schema node\n */\nexport const heading = (props: Omit<Heading, 'type'>): Heading => ({\n ...compact(props),\n type: 'Heading',\n})\n\n/**\n * An image file.\n */\nexport interface ImageObject extends MediaObject {\n type: 'ImageObject'\n caption?: String\n thumbnail?: ImageObject\n}\n\n/**\n * Create a `ImageObject` node\n * @param props Object containing ImageObject schema properties as key/value pairs\n * @returns {ImageObject} ImageObject schema node\n */\nexport const imageObject = (props: Omit<ImageObject, 'type'>): ImageObject => ({\n ...compact(props),\n type: 'ImageObject',\n})\n\n/**\n * Include content from an external source (e.g. file, URL).\n */\nexport interface Include extends Entity {\n type: 'Include'\n source: String\n buildDigest?: String\n content?: Array<BlockContent>\n mediaType?: String\n}\n\n/**\n * Create a `Include` node\n * @param props Object containing Include schema properties as key/value pairs\n * @returns {Include} Include schema node\n */\nexport const include = (props: Omit<Include, 'type'>): Include => ({\n ...compact(props),\n type: 'Include',\n})\n\n/**\n * A validator specifying the constraints on an integer node.\n */\nexport interface IntegerValidator extends Validator {\n type: 'IntegerValidator'\n}\n\n/**\n * Create a `IntegerValidator` node\n * @param props Object containing IntegerValidator schema properties as key/value pairs\n * @returns {IntegerValidator} IntegerValidator schema node\n */\nexport const integerValidator = (\n props: Omit<IntegerValidator, 'type'> = {}\n): IntegerValidator => ({\n ...compact(props),\n type: 'IntegerValidator',\n})\n\n/**\n * A hyperlink to other pages, sections within the same document, resources, or any URL.\n */\nexport interface Link extends Entity {\n type: 'Link'\n content: Array<InlineContent>\n target: String\n exportFrom?: String\n importTo?: String\n relation?: String\n title?: String\n}\n\n/**\n * Create a `Link` node\n * @param props Object containing Link schema properties as key/value pairs\n * @returns {Link} Link schema node\n */\nexport const link = (props: Omit<Link, 'type'>): Link => ({\n ...compact(props),\n type: 'Link',\n})\n\n/**\n * A list of items.\n */\nexport interface List extends Entity {\n type: 'List'\n items: Array<ListItem>\n order?: 'Ascending' | 'Descending' | 'Unordered'\n}\n\n/**\n * Create a `List` node\n * @param props Object containing List schema properties as key/value pairs\n * @returns {List} List schema node\n */\nexport const list = (props: Omit<List, 'type'>): List => ({\n ...compact(props),\n type: 'List',\n})\n\n/**\n * A single item in a list.\n */\nexport interface ListItem extends Thing {\n type: 'ListItem'\n content?: Array<BlockContent> | Array<InlineContent>\n isChecked?: Boolean\n item?: Node\n position?: Integer\n}\n\n/**\n * Create a `ListItem` node\n * @param props Object containing ListItem schema properties as key/value pairs\n * @returns {ListItem} ListItem schema node\n */\nexport const listItem = (props: Omit<ListItem, 'type'> = {}): ListItem => ({\n ...compact(props),\n type: 'ListItem',\n})\n\n/**\n * A mathematical variable or equation.\n */\nexport interface Math extends Entity {\n type: 'Math' | 'MathBlock' | 'MathFragment'\n text: String\n errors?: Array<String>\n mathLanguage?: String\n}\n\n/**\n * Create a `Math` node\n * @param props Object containing Math schema properties as key/value pairs\n * @returns {Math} Math schema node\n */\nexport const math = (props: Omit<Math, 'type'>): Math => ({\n ...compact(props),\n type: 'Math',\n})\n\n/**\n * A block of math, e.g an equation, to be treated as block content.\n */\nexport interface MathBlock extends Math {\n type: 'MathBlock'\n label?: String\n}\n\n/**\n * Create a `MathBlock` node\n * @param props Object containing MathBlock schema properties as key/value pairs\n * @returns {MathBlock} MathBlock schema node\n */\nexport const mathBlock = (props: Omit<MathBlock, 'type'>): MathBlock => ({\n ...compact(props),\n type: 'MathBlock',\n})\n\n/**\n * A fragment of math, e.g a variable name, to be treated as inline content.\n */\nexport interface MathFragment extends Math {\n type: 'MathFragment'\n}\n\n/**\n * Create a `MathFragment` node\n * @param props Object containing MathFragment schema properties as key/value pairs\n * @returns {MathFragment} MathFragment schema node\n */\nexport const mathFragment = (\n props: Omit<MathFragment, 'type'>\n): MathFragment => ({\n ...compact(props),\n type: 'MathFragment',\n})\n\n/**\n * A monetary grant.\n */\nexport interface MonetaryGrant extends Grant {\n type: 'MonetaryGrant'\n amounts?: Number\n funders?: Array<Person | Organization>\n}\n\n/**\n * Create a `MonetaryGrant` node\n * @param props Object containing MonetaryGrant schema properties as key/value pairs\n * @returns {MonetaryGrant} MonetaryGrant schema node\n */\nexport const monetaryGrant = (\n props: Omit<MonetaryGrant, 'type'> = {}\n): MonetaryGrant => ({\n ...compact(props),\n type: 'MonetaryGrant',\n})\n\n/**\n * Inline text that has a non-textual annotation.\n */\nexport interface NontextualAnnotation extends Mark {\n type: 'NontextualAnnotation'\n}\n\n/**\n * Create a `NontextualAnnotation` node\n * @param props Object containing NontextualAnnotation schema properties as key/value pairs\n * @returns {NontextualAnnotation} NontextualAnnotation schema node\n */\nexport const nontextualAnnotation = (\n props: Omit<NontextualAnnotation, 'type'>\n): NontextualAnnotation => ({\n ...compact(props),\n type: 'NontextualAnnotation',\n})\n\n/**\n * Additional content which is not part of the main content of a document.\n */\nexport interface Note extends Entity {\n type: 'Note'\n content: Array<BlockContent>\n noteType?: 'Footnote' | 'Endnote' | 'Sidenote'\n}\n\n/**\n * Create a `Note` node\n * @param props Object containing Note schema properties as key/value pairs\n * @returns {Note} Note schema node\n */\nexport const note = (props: Omit<Note, 'type'>): Note => ({\n ...compact(props),\n type: 'Note',\n})\n\n/**\n * A validator specifying the constraints on a numeric node.\n */\nexport interface NumberValidator extends Validator {\n type: 'NumberValidator'\n exclusiveMaximum?: Number\n exclusiveMinimum?: Number\n maximum?: Number\n minimum?: Number\n multipleOf?: Number\n}\n\n/**\n * Create a `NumberValidator` node\n * @param props Object containing NumberValidator schema properties as key/value pairs\n * @returns {NumberValidator} NumberValidator schema node\n */\nexport const numberValidator = (\n props: Omit<NumberValidator, 'type'> = {}\n): NumberValidator => ({\n ...compact(props),\n type: 'NumberValidator',\n})\n\n/**\n * An organization such as a school, NGO, corporation, club, etc.\n */\nexport interface Organization extends Thing {\n type: 'Organization'\n address?: PostalAddress | String\n brands?: Array<Brand>\n contactPoints?: Array<ContactPoint>\n departments?: Array<Organization>\n funders?: Array<Organization | Person>\n legalName?: String\n logo?: ImageObject | String\n members?: Array<Organization | Person>\n parentOrganization?: Organization\n}\n\n/**\n * Create a `Organization` node\n * @param props Object containing Organization schema properties as key/value pairs\n * @returns {Organization} Organization schema node\n */\nexport const organization = (\n props: Omit<Organization, 'type'> = {}\n): Organization => ({\n ...compact(props),\n type: 'Organization',\n})\n\n/**\n * Paragraph\n */\nexport interface Paragraph extends Entity {\n type: 'Paragraph'\n content: Array<InlineContent>\n}\n\n/**\n * Create a `Paragraph` node\n * @param props Object containing Paragraph schema properties as key/value pairs\n * @returns {Paragraph} Paragraph schema node\n */\nexport const paragraph = (props: Omit<Paragraph, 'type'>): Paragraph => ({\n ...compact(props),\n type: 'Paragraph',\n})\n\n/**\n * A parameter of a document or function.\n */\nexport interface Parameter extends Entity {\n type: 'Parameter'\n name: String\n default?: Node\n executeDigest?: String\n isExtensible?: Boolean\n isRequired?: Boolean\n isVariadic?: Boolean\n validator?: ValidatorTypes\n value?: Node\n}\n\n/**\n * Create a `Parameter` node\n * @param props Object containing Parameter schema properties as key/value pairs\n * @returns {Parameter} Parameter schema node\n */\nexport const parameter = (props: Omit<Parameter, 'type'>): Parameter => ({\n ...compact(props),\n type: 'Parameter',\n})\n\n/**\n * A periodical publication.\n */\nexport interface Periodical extends CreativeWork {\n type: 'Periodical'\n dateEnd?: Date\n dateStart?: Date\n issns?: Array<String>\n}\n\n/**\n * Create a `Periodical` node\n * @param props Object containing Periodical schema properties as key/value pairs\n * @returns {Periodical} Periodical schema node\n */\nexport const periodical = (\n props: Omit<Periodical, 'type'> = {}\n): Periodical => ({\n ...compact(props),\n type: 'Periodical',\n})\n\n/**\n * A person (alive, dead, undead, or fictional).\n */\nexport interface Person extends Thing {\n type: 'Person'\n address?: PostalAddress | String\n affiliations?: Array<Organization>\n emails?: Array<String>\n familyNames?: Array<String>\n funders?: Array<Organization | Person>\n givenNames?: Array<String>\n honorificPrefix?: String\n honorificSuffix?: String\n jobTitle?: String\n memberOf?: Array<Organization>\n telephoneNumbers?: Array<String>\n}\n\n/**\n * Create a `Person` node\n * @param props Object containing Person schema properties as key/value pairs\n * @returns {Person} Person schema node\n */\nexport const person = (props: Omit<Person, 'type'> = {}): Person => ({\n ...compact(props),\n type: 'Person',\n})\n\n/**\n * A physical mailing address.\n */\nexport interface PostalAddress extends ContactPoint {\n type: 'PostalAddress'\n addressCountry?: String\n addressLocality?: String\n addressRegion?: String\n postOfficeBoxNumber?: String\n postalCode?: String\n streetAddress?: String\n}\n\n/**\n * Create a `PostalAddress` node\n * @param props Object containing PostalAddress schema properties as key/value pairs\n * @returns {PostalAddress} PostalAddress schema node\n */\nexport const postalAddress = (\n props: Omit<PostalAddress, 'type'> = {}\n): PostalAddress => ({\n ...compact(props),\n type: 'PostalAddress',\n})\n\n/**\n * Any offered product or service. For example, a pair of shoes;\n * a haircut; or an episode of a TV show streamed online.\n */\nexport interface Product extends Thing {\n type: 'Product'\n brands?: Array<Brand>\n logo?: ImageObject | String\n productID?: String\n}\n\n/**\n * Create a `Product` node\n * @param props Object containing Product schema properties as key/value pairs\n * @returns {Product} Product schema node\n */\nexport const product = (props: Omit<Product, 'type'> = {}): Product => ({\n ...compact(props),\n type: 'Product',\n})\n\n/**\n * A property-value pair.\n */\nexport interface PropertyValue extends Thing {\n type: 'PropertyValue'\n value: Boolean | Integer | Number | String\n propertyID?: String\n}\n\n/**\n * Create a `PropertyValue` node\n * @param props Object containing PropertyValue schema properties as key/value pairs\n * @returns {PropertyValue} PropertyValue schema node\n */\nexport const propertyValue = (\n props: Omit<PropertyValue, 'type'>\n): PropertyValue => ({\n ...compact(props),\n type: 'PropertyValue',\n})\n\n/**\n * A part of a successively published publication such as a periodical or publication\n * volume, often numbered.\n */\nexport interface PublicationIssue extends CreativeWork {\n type: 'PublicationIssue'\n issueNumber?: Integer | String\n pageEnd?: Integer | String\n pageStart?: Integer | String\n pagination?: String\n}\n\n/**\n * Create a `PublicationIssue` node\n * @param props Object containing PublicationIssue schema properties as key/value pairs\n * @returns {PublicationIssue} PublicationIssue schema node\n */\nexport const publicationIssue = (\n props: Omit<PublicationIssue, 'type'> = {}\n): PublicationIssue => ({\n ...compact(props),\n type: 'PublicationIssue',\n})\n\n/**\n * A part of a successively published publication such as a periodical or multi-volume work.\n */\nexport interface PublicationVolume extends CreativeWork {\n type: 'PublicationVolume'\n pageEnd?: Integer | String\n pageStart?: Integer | String\n pagination?: String\n volumeNumber?: Integer | String\n}\n\n/**\n * Create a `PublicationVolume` node\n * @param props Object containing PublicationVolume schema properties as key/value pairs\n * @returns {PublicationVolume} PublicationVolume schema node\n */\nexport const publicationVolume = (\n props: Omit<PublicationVolume, 'type'> = {}\n): PublicationVolume => ({\n ...compact(props),\n type: 'PublicationVolume',\n})\n\n/**\n * Inline, quoted content.\n */\nexport interface Quote extends Mark {\n type: 'Quote'\n cite?: Cite | String\n}\n\n/**\n * Create a `Quote` node\n * @param props Object containing Quote schema properties as key/value pairs\n * @returns {Quote} Quote schema node\n */\nexport const quote = (props: Omit<Quote, 'type'>): Quote => ({\n ...compact(props),\n type: 'Quote',\n})\n\n/**\n * A section quoted from somewhere else.\n */\nexport interface QuoteBlock extends Entity {\n type: 'QuoteBlock'\n content: Array<BlockContent>\n cite?: Cite | String\n}\n\n/**\n * Create a `QuoteBlock` node\n * @param props Object containing QuoteBlock schema properties as key/value pairs\n * @returns {QuoteBlock} QuoteBlock schema node\n */\nexport const quoteBlock = (props: Omit<QuoteBlock, 'type'>): QuoteBlock => ({\n ...compact(props),\n type: 'QuoteBlock',\n})\n\n/**\n * A review of an item, e.g of an Article, or SoftwareSourceCode.\n */\nexport interface Review extends CreativeWork {\n type: 'Review'\n itemReviewed?: Thing\n reviewAspect?: String\n}\n\n/**\n * Create a `Review` node\n * @param props Object containing Review schema properties as key/value pairs\n * @returns {Review} Review schema node\n */\nexport const review = (props: Omit<Review, 'type'> = {}): Review => ({\n ...compact(props),\n type: 'Review',\n})\n\n/**\n * A software application.\n */\nexport interface SoftwareApplication extends CreativeWork {\n type: 'SoftwareApplication'\n softwareRequirements?: Array<SoftwareApplication>\n softwareVersion?: String\n}\n\n/**\n * Create a `SoftwareApplication` node\n * @param props Object containing SoftwareApplication schema properties as key/value pairs\n * @returns {SoftwareApplication} SoftwareApplication schema node\n */\nexport const softwareApplication = (\n props: Omit<SoftwareApplication, 'type'> = {}\n): SoftwareApplication => ({\n ...compact(props),\n type: 'SoftwareApplication',\n})\n\n/**\n * A computational environment.\n */\nexport interface SoftwareEnvironment extends Thing {\n type: 'SoftwareEnvironment'\n name: String\n adds?: Array<SoftwareSourceCode>\n extends?: Array<SoftwareEnvironment>\n removes?: Array<SoftwareSourceCode>\n}\n\n/**\n * Create a `SoftwareEnvironment` node\n * @param props Object containing SoftwareEnvironment schema properties as key/value pairs\n * @returns {SoftwareEnvironment} SoftwareEnvironment schema node\n */\nexport const softwareEnvironment = (\n props: Omit<SoftwareEnvironment, 'type'>\n): SoftwareEnvironment => ({\n ...compact(props),\n type: 'SoftwareEnvironment',\n})\n\n/**\n * Definition of a compute session, including its software and compute resource\n * requirements and status.\n */\nexport interface SoftwareSession extends Thing {\n type: 'SoftwareSession'\n clientsLimit?: Number\n clientsRequest?: Number\n cpuLimit?: Number\n cpuRequest?: Number\n dateEnd?: Date\n dateStart?: Date\n durationLimit?: Number\n durationRequest?: Number\n environment?: SoftwareEnvironment\n memoryLimit?: Number\n memoryRequest?: Number\n networkTransferLimit?: Number\n networkTransferRequest?: Number\n status?:\n | 'Unknown'\n | 'Starting'\n | 'Started'\n | 'Stopping'\n | 'Stopped'\n | 'Failed'\n timeoutLimit?: Number\n timeoutRequest?: Number\n volumeMounts?: Array<VolumeMount>\n}\n\n/**\n * Create a `SoftwareSession` node\n * @param props Object containing SoftwareSession schema properties as key/value pairs\n * @returns {SoftwareSession} SoftwareSession schema node\n */\nexport const softwareSession = (\n props: Omit<SoftwareSession, 'type'> = {}\n): SoftwareSession => ({\n ...compact(props),\n type: 'SoftwareSession',\n})\n\n/**\n * Computer programming source code. Example: Full (compile ready) solutions, code snippet samples, scripts, templates.\n */\nexport interface SoftwareSourceCode extends CreativeWork {\n type: 'SoftwareSourceCode'\n codeRepository?: String\n codeSampleType?: String\n programmingLanguage?: String\n runtimePlatform?: Array<String>\n softwareRequirements?: Array<\n SoftwareSourceCode | SoftwareApplication | String\n >\n targetProducts?: Array<SoftwareApplication>\n}\n\n/**\n * Create a `SoftwareSourceCode` node\n * @param props Object containing SoftwareSourceCode schema properties as key/value pairs\n * @returns {SoftwareSourceCode} SoftwareSourceCode schema node\n */\nexport const softwareSourceCode = (\n props: Omit<SoftwareSourceCode, 'type'> = {}\n): SoftwareSourceCode => ({\n ...compact(props),\n type: 'SoftwareSourceCode',\n})\n\n/**\n * A schema specifying constraints on a string node.\n */\nexport interface StringValidator extends Validator {\n type: 'StringValidator'\n maxLength?: Integer\n minLength?: Integer\n pattern?: String\n}\n\n/**\n * Create a `StringValidator` node\n * @param props Object containing StringValidator schema properties as key/value pairs\n * @returns {StringValidator} StringValidator schema node\n */\nexport const stringValidator = (\n props: Omit<StringValidator, 'type'> = {}\n): StringValidator => ({\n ...compact(props),\n type: 'StringValidator',\n})\n\n/**\n * Strongly emphasised content.\n */\nexport interface Strong extends Mark {\n type: 'Strong'\n}\n\n/**\n * Create a `Strong` node\n * @param props Object containing Strong schema properties as key/value pairs\n * @returns {Strong} Strong schema node\n */\nexport const strong = (props: Omit<Strong, 'type'>): Strong => ({\n ...compact(props),\n type: 'Strong',\n})\n\n/**\n * Subscripted content.\n */\nexport interface Subscript extends Mark {\n type: 'Subscript'\n}\n\n/**\n * Create a `Subscript` node\n * @param props Object containing Subscript schema properties as key/value pairs\n * @returns {Subscript} Subscript schema node\n */\nexport const subscript = (props: Omit<Subscript, 'type'>): Subscript => ({\n ...compact(props),\n type: 'Subscript',\n})\n\n/**\n * Superscripted content.\n */\nexport interface Superscript extends Mark {\n type: 'Superscript'\n}\n\n/**\n * Create a `Superscript` node\n * @param props Object containing Superscript schema properties as key/value pairs\n * @returns {Superscript} Superscript schema node\n */\nexport const superscript = (props: Omit<Superscript, 'type'>): Superscript => ({\n ...compact(props),\n type: 'Superscript',\n})\n\n/**\n * A table.\n */\nexport interface Table extends CreativeWork {\n type: 'Table'\n rows: Array<TableRow>\n caption?: Array<BlockContent> | String\n label?: String\n}\n\n/**\n * Create a `Table` node\n * @param props Object containing Table schema properties as key/value pairs\n * @returns {Table} Table schema node\n */\nexport const table = (props: Omit<Table, 'type'>): Table => ({\n ...compact(props),\n type: 'Table',\n})\n\n/**\n * A cell within a `Table`.\n */\nexport interface TableCell extends Entity {\n type: 'TableCell'\n cellType?: 'Data' | 'Header'\n colspan?: Integer\n content?: Array<BlockContent> | Array<InlineContent>\n name?: String\n rowspan?: Integer\n}\n\n/**\n * Create a `TableCell` node\n * @param props Object containing TableCell schema properties as key/value pairs\n * @returns {TableCell} TableCell schema node\n */\nexport const tableCell = (props: Omit<TableCell, 'type'> = {}): TableCell => ({\n ...compact(props),\n type: 'TableCell',\n})\n\n/**\n * A row within a Table.\n */\nexport interface TableRow extends Entity {\n type: 'TableRow'\n cells: Array<TableCell>\n rowType?: 'Header' | 'Footer'\n}\n\n/**\n * Create a `TableRow` node\n * @param props Object containing TableRow schema properties as key/value pairs\n * @returns {TableRow} TableRow schema node\n */\nexport const tableRow = (props: Omit<TableRow, 'type'>): TableRow => ({\n ...compact(props),\n type: 'TableRow',\n})\n\n/**\n * A thematic break, such as a scene change in a story, a transition to another topic, or a new document.\n */\nexport interface ThematicBreak extends Entity {\n type: 'ThematicBreak'\n}\n\n/**\n * Create a `ThematicBreak` node\n * @param props Object containing ThematicBreak schema properties as key/value pairs\n * @returns {ThematicBreak} ThematicBreak schema node\n */\nexport const thematicBreak = (\n props: Omit<ThematicBreak, 'type'> = {}\n): ThematicBreak => ({\n ...compact(props),\n type: 'ThematicBreak',\n})\n\n/**\n * A validator specifying constraints on an array of heterogeneous items.\n */\nexport interface TupleValidator extends Validator {\n type: 'TupleValidator'\n items?: Array<ValidatorTypes>\n}\n\n/**\n * Create a `TupleValidator` node\n * @param props Object containing TupleValidator schema properties as key/value pairs\n * @returns {TupleValidator} TupleValidator schema node\n */\nexport const tupleValidator = (\n props: Omit<TupleValidator, 'type'> = {}\n): TupleValidator => ({\n ...compact(props),\n type: 'TupleValidator',\n})\n\n/**\n * A variable representing a name / value pair.\n */\nexport interface Variable extends Entity {\n type: 'Variable'\n name: String\n isReadonly?: Boolean\n validator?: ValidatorTypes\n value?: Node\n}\n\n/**\n * Create a `Variable` node\n * @param props Object containing Variable schema properties as key/value pairs\n * @returns {Variable} Variable schema node\n */\nexport const variable = (props: Omit<Variable, 'type'>): Variable => ({\n ...compact(props),\n type: 'Variable',\n})\n\n/**\n * A video file.\n */\nexport interface VideoObject extends MediaObject {\n type: 'VideoObject'\n caption?: String\n thumbnail?: ImageObject\n transcript?: String\n}\n\n/**\n * Create a `VideoObject` node\n * @param props Object containing VideoObject schema properties as key/value pairs\n * @returns {VideoObject} VideoObject schema node\n */\nexport const videoObject = (props: Omit<VideoObject, 'type'>): VideoObject => ({\n ...compact(props),\n type: 'VideoObject',\n})\n\n/**\n * Describes a volume mount from a host to container.\n */\nexport interface VolumeMount extends Thing {\n type: 'VolumeMount'\n mountDestination: String\n mountOptions?: Array<String>\n mountSource?: String\n mountType?: String\n}\n\n/**\n * Create a `VolumeMount` node\n * @param props Object containing VolumeMount schema properties as key/value pairs\n * @returns {VolumeMount} VolumeMount schema node\n */\nexport const volumeMount = (props: Omit<VolumeMount, 'type'>): VolumeMount => ({\n ...compact(props),\n type: 'VolumeMount',\n})\n\n/**\n * Union type for valid block content.\n */\nexport type BlockContent =\n | Claim\n | CodeBlock\n | CodeChunk\n | Collection\n | Figure\n | Heading\n | Include\n | List\n | MathBlock\n | Paragraph\n | QuoteBlock\n | Table\n | ThematicBreak\n\n/**\n * All type schemas that are derived from CodeExecutable\n */\nexport type CodeExecutableTypes = CodeExecutable | CodeChunk | CodeExpression\n\n/**\n * All type schemas that are derived from Code\n */\nexport type CodeTypes =\n | Code\n | CodeBlock\n | CodeChunk\n | CodeExecutable\n | CodeExpression\n | CodeFragment\n\n/**\n * All type schemas that are derived from ContactPoint\n */\nexport type ContactPointTypes = ContactPoint | PostalAddress\n\n/**\n * All type schemas that are derived from CreativeWork\n */\nexport type CreativeWorkTypes =\n | CreativeWork\n | Article\n | AudioObject\n | Claim\n | Collection\n | Comment\n | Datatable\n | Figure\n | ImageObject\n | MediaObject\n | Periodical\n | PublicationIssue\n | PublicationVolume\n | Review\n | SoftwareApplication\n | SoftwareSourceCode\n | Table\n | VideoObject\n\n/**\n * All type schemas that are derived from Entity\n */\nexport type EntityTypes =\n | Entity\n | ArrayValidator\n | Article\n | AudioObject\n | BooleanValidator\n | Brand\n | CitationIntentEnumeration\n | Cite\n | CiteGroup\n | Claim\n | Code\n | CodeBlock\n | CodeChunk\n | CodeError\n | CodeExecutable\n | CodeExpression\n | CodeFragment\n | Collection\n | Comment\n | ConstantValidator\n | ContactPoint\n | CreativeWork\n | Datatable\n | DatatableColumn\n | Date\n | DefinedTerm\n | Delete\n | Emphasis\n | EnumValidator\n | Enumeration\n | Figure\n | Function\n | Grant\n | Heading\n | ImageObject\n | Include\n | IntegerValidator\n | Link\n | List\n | ListItem\n | Mark\n | Math\n | MathBlock\n | MathFragment\n | MediaObject\n | MonetaryGrant\n | NontextualAnnotation\n | Note\n | NumberValidator\n | Organization\n | Paragraph\n | Parameter\n | Periodical\n | Person\n | PostalAddress\n | Product\n | PropertyValue\n | PublicationIssue\n | PublicationVolume\n | Quote\n | QuoteBlock\n | Review\n | SoftwareApplication\n | SoftwareEnvironment\n | SoftwareSession\n | SoftwareSourceCode\n | StringValidator\n | Strong\n | Subscript\n | Superscript\n | Table\n | TableCell\n | TableRow\n | ThematicBreak\n | Thing\n | TupleValidator\n | Validator\n | Variable\n | VideoObject\n | VolumeMount\n\n/**\n * All type schemas that are derived from Enumeration\n */\nexport type EnumerationTypes = Enumeration | CitationIntentEnumeration\n\n/**\n * All type schemas that are derived from Grant\n */\nexport type GrantTypes = Grant | MonetaryGrant\n\n/**\n * Union type for valid inline content.\n */\nexport type InlineContent =\n | AudioObject\n | Cite\n | CiteGroup\n | CodeExpression\n | CodeFragment\n | Delete\n | Emphasis\n | ImageObject\n | Link\n | MathFragment\n | NontextualAnnotation\n | Note\n | Parameter\n | Quote\n | Strong\n | Subscript\n | Superscript\n | VideoObject\n | Null\n | Boolean\n | Integer\n | Number\n | String\n\n/**\n * All type schemas that are derived from Mark\n */\nexport type MarkTypes =\n | Mark\n | Delete\n | Emphasis\n | NontextualAnnotation\n | Quote\n | Strong\n | Subscript\n | Superscript\n\n/**\n * All type schemas that are derived from Math\n */\nexport type MathTypes = Math | MathBlock | MathFragment\n\n/**\n * All type schemas that are derived from MediaObject\n */\nexport type MediaObjectTypes =\n | MediaObject\n | AudioObject\n | ImageObject\n | VideoObject\n\n/**\n * Union type for all schema nodes, including primitives and entities\n */\nexport type Node =\n | Entity\n | ArrayValidator\n | Article\n | AudioObject\n | BooleanValidator\n | Brand\n | CitationIntentEnumeration\n | Cite\n | CiteGroup\n | Claim\n | Code\n | CodeBlock\n | CodeChunk\n | CodeError\n | CodeExecutable\n | CodeExpression\n | CodeFragment\n | Collection\n | Comment\n | ConstantValidator\n | ContactPoint\n | CreativeWork\n | Datatable\n | DatatableColumn\n | Date\n | DefinedTerm\n | Delete\n | Emphasis\n | EnumValidator\n | Enumeration\n | Figure\n | Function\n | Grant\n | Heading\n | ImageObject\n | Include\n | IntegerValidator\n | Link\n | List\n | ListItem\n | Mark\n | Math\n | MathBlock\n | MathFragment\n | MediaObject\n | MonetaryGrant\n | NontextualAnnotation\n | Note\n | NumberValidator\n | Organization\n | Paragraph\n | Parameter\n | Periodical\n | Person\n | PostalAddress\n | Product\n | PropertyValue\n | PublicationIssue\n | PublicationVolume\n | Quote\n | QuoteBlock\n | Review\n | SoftwareApplication\n | SoftwareEnvironment\n | SoftwareSession\n | SoftwareSourceCode\n | StringValidator\n | Strong\n | Subscript\n | Superscript\n | Table\n | TableCell\n | TableRow\n | ThematicBreak\n | Thing\n | TupleValidator\n | Validator\n | Variable\n | VideoObject\n | VolumeMount\n | Null\n | Boolean\n | Integer\n | Number\n | String\n | Object\n | Array<unknown>\n\n/**\n * All type schemas that are derived from Thing\n */\nexport type ThingTypes =\n | Thing\n | Article\n | AudioObject\n | Brand\n | CitationIntentEnumeration\n | Claim\n | Collection\n | Comment\n | ContactPoint\n | CreativeWork\n | Datatable\n | DatatableColumn\n | DefinedTerm\n | Enumeration\n | Figure\n | Grant\n | ImageObject\n | ListItem\n | MediaObject\n | MonetaryGrant\n | Organization\n | Periodical\n | Person\n | PostalAddress\n | Product\n | PropertyValue\n | PublicationIssue\n | PublicationVolume\n | Review\n | SoftwareApplication\n | SoftwareEnvironment\n | SoftwareSession\n | SoftwareSourceCode\n | Table\n | VideoObject\n | VolumeMount\n\n/**\n * All type schemas that are derived from Validator\n */\nexport type ValidatorTypes =\n | Validator\n | ArrayValidator\n | BooleanValidator\n | ConstantValidator\n | EnumValidator\n | IntegerValidator\n | NumberValidator\n | StringValidator\n | TupleValidator\n\n/**\n * The type or nature of a citation, both factually and rhetorically.\n */\nexport enum CitationIntentEnumeration {\n /**\n * The citing entity agrees with statements, ideas or conclusions presented in the cited entity\n */\n AgreesWith = 'AgreesWith',\n\n /**\n * The citing entity cites the cited entity as one that provides an authoritative description or definition of the subject under discussion\n */\n CitesAsAuthority = 'CitesAsAuthority',\n\n /**\n * The citing entity cites the cited entity as source of data\n */\n CitesAsDataSource = 'CitesAsDataSource',\n\n /**\n * The citing entity cites the cited entity as source of factual evidence for statements it contains\n */\n CitesAsEvidence = 'CitesAsEvidence',\n\n /**\n * The citing entity cites the cited entity as being the container of metadata describing the citing entity\n */\n CitesAsMetadataDocument = 'CitesAsMetadataDocument',\n\n /**\n * The citing entity cites the cited entity as providing or containing a possible solution to the issues being discussed\n */\n CitesAsPotentialSolution = 'CitesAsPotentialSolution',\n\n /**\n * The citing entity cites the cited entity as an item of recommended reading\n */\n CitesAsRecommendedReading = 'CitesAsRecommendedReading',\n\n /**\n * The citing entity cites the cited entity as one that is related\n */\n CitesAsRelated = 'CitesAsRelated',\n\n /**\n * The citing entity cites the cited entity as being the entity from which the citing entity is derived, or about which the citing entity contains metadata\n */\n CitesAsSourceDocument = 'CitesAsSourceDocument',\n\n /**\n * The citing entity cites the cited entity as a source of information on the subject under discussion\n */\n CitesForInformation = 'CitesForInformation',\n\n /**\n * The citing entity is used to create or compile the cited entity\n */\n Compiles = 'Compiles',\n\n /**\n * The citing entity confirms facts, ideas or statements presented in the cited entity\n */\n Confirms = 'Confirms',\n\n /**\n * The citing entity contains a statement of fact or a logical assertion (or a collection of such facts and/or assertions) originally present in the cited entity\n */\n ContainsAssertionFrom = 'ContainsAssertionFrom',\n\n /**\n * The citing entity corrects statements, ideas or conclusions presented in the cited entity\n */\n Corrects = 'Corrects',\n\n /**\n * The citing entity acknowledges contributions made by the cited entity\n */\n Credits = 'Credits',\n\n /**\n * The citing entity critiques statements, ideas or conclusions presented in the cited entity\n */\n Critiques = 'Critiques',\n\n /**\n * The citing entity express derision for the cited entity, or for ideas or conclusions contained within it\n */\n Derides = 'Derides',\n\n /**\n * The citing entity describes the cited entity\n */\n Describes = 'Describes',\n\n /**\n * The citing entity disagrees with statements, ideas or conclusions presented in the cited entity\n */\n DisagreesWith = 'DisagreesWith',\n\n /**\n * The citing entity discusses statements, ideas or conclusions presented in the cited entity\n */\n Discusses = 'Discusses',\n\n /**\n * The citing entity disputes statements, ideas or conclusions presented in the cited entity\n */\n Disputes = 'Disputes',\n\n /**\n * The citing entity documents information about the cited entity\n */\n Documents = 'Documents',\n\n /**\n * The citing entity extends facts, ideas or understandings presented in the cited entity\n */\n Extends = 'Extends',\n\n /**\n * The cited entity provides background information for the citing entity\n */\n GivesBackgroundTo = 'GivesBackgroundTo',\n\n /**\n * The cited entity provides intellectual or factual support for the citing entity\n */\n GivesSupportTo = 'GivesSupportTo',\n\n /**\n * The cited entity evokes a reply from the citing entity\n */\n HasReplyFrom = 'HasReplyFrom',\n\n /**\n * The citing entity includes one or more excerpts from the cited entity\n */\n IncludesExcerptFrom = 'IncludesExcerptFrom',\n\n /**\n * The citing entity includes one or more quotations from the cited entity\n */\n IncludesQuotationFrom = 'IncludesQuotationFrom',\n\n /**\n * The cited entity contains statements, ideas or conclusions with which the citing entity agrees\n */\n IsAgreedWithBy = 'IsAgreedWithBy',\n\n /**\n * The cited entity is cited as providing an authoritative description or definition of the subject under discussion in the citing entity\n */\n IsCitedAsAuthorityBy = 'IsCitedAsAuthorityBy',\n\n /**\n * The cited entity is cited as a data source by the citing entity\n */\n IsCitedAsDataSourceBy = 'IsCitedAsDataSourceBy',\n\n /**\n * The cited entity is cited for providing factual evidence to the citing entity\n */\n IsCitedAsEvidenceBy = 'IsCitedAsEvidenceBy',\n\n /**\n * The cited entity is cited as being the container of metadata relating to the citing entity\n */\n IsCitedAsMetadataDocumentBy = 'IsCitedAsMetadataDocumentBy',\n\n /**\n * The cited entity is cited as providing or containing a possible solution to the issues being discussed in the citing entity\n */\n IsCitedAsPontentialSolutionBy = 'IsCitedAsPontentialSolutionBy',\n\n /**\n * The cited entity is cited by the citing entity as an item of recommended reading\n */\n IsCitedAsRecommendedReadingBy = 'IsCitedAsRecommendedReadingBy',\n\n /**\n * The cited entity is cited as being related to the citing entity\n */\n IsCitedAsRelatedBy = 'IsCitedAsRelatedBy',\n\n /**\n * The cited entity is cited as being the entity from which the citing entity is derived, or about which the citing entity contains metadata\n */\n IsCitedAsSourceDocumentBy = 'IsCitedAsSourceDocumentBy',\n\n /**\n * The cited entity (the subject of the RDF triple) is cited by the citing entity (the object of the triple)\n */\n IsCitedBy = 'IsCitedBy',\n\n /**\n * The cited entity is cited as a source of information on the subject under discussion in the citing entity\n */\n IsCitedForInformationBy = 'IsCitedForInformationBy',\n\n /**\n * The cited entity is the result of a compile or creation event using the citing entity\n */\n IsCompiledBy = 'IsCompiledBy',\n\n /**\n * The cited entity presents facts, ideas or statements that are confirmed by the citing entity\n */\n IsConfirmedBy = 'IsConfirmedBy',\n\n /**\n * The cited entity presents statements, ideas or conclusions that are corrected by the citing entity\n */\n IsCorrectedBy = 'IsCorrectedBy',\n\n /**\n * The cited entity makes contributions that are acknowledged by the citing entity\n */\n IsCreditedBy = 'IsCreditedBy',\n\n /**\n * The cited entity presents statements, ideas or conclusions that are critiqued by the citing entity\n */\n IsCritiquedBy = 'IsCritiquedBy',\n\n /**\n * The cited entity contains ideas or conclusions for which the citing entity express derision\n */\n IsDeridedBy = 'IsDeridedBy',\n\n /**\n * The cited entity is described by the citing entity\n */\n IsDescribedBy = 'IsDescribedBy',\n\n /**\n * The cited entity presents statements, ideas or conclusions that are disagreed with by the citing entity\n */\n IsDisagreedWithBy = 'IsDisagreedWithBy',\n\n /**\n * The cited entity presents statements, ideas or conclusions that are discussed by the citing entity\n */\n IsDiscussedBy = 'IsDiscussedBy',\n\n /**\n * The cited entity presents statements, ideas or conclusions that are disputed by the citing entity\n */\n IsDisputedBy = 'IsDisputedBy',\n\n /**\n * Information about the cited entity is documented by the citing entity\n */\n IsDocumentedBy = 'IsDocumentedBy',\n\n /**\n * The cited entity presents facts, ideas or understandings that are extended by the citing entity\n */\n IsExtendedBy = 'IsExtendedBy',\n\n /**\n * The cited entity is the target for an HTTP Uniform Resource Locator (URL) link within the citing entity\n */\n IsLinkedToBy = 'IsLinkedToBy',\n\n /**\n * The characteristic style or content of the cited entity is imitated by the citing entity for comic effect, usually without explicit citation\n */\n IsParodiedBy = 'IsParodiedBy',\n\n /**\n * The cited entity is plagiarized by the author of the citing entity, who includes within the citing entity textual or other elements from the cited entity without formal acknowledgement of their source\n */\n IsPlagiarizedBy = 'IsPlagiarizedBy',\n\n /**\n * The cited entity presents statements, ideas or conclusions that are qualified or have conditions placed upon them by the citing entity\n */\n IsQualifiedBy = 'IsQualifiedBy',\n\n /**\n * The cited entity presents statements, ideas or conclusions that are refuted by the citing entity\n */\n IsRefutedBy = 'IsRefutedBy',\n\n /**\n * The cited entity is formally retracted by the citing entity\n */\n IsRetractedBy = 'IsRetractedBy',\n\n /**\n * The cited entity presents statements, ideas or conclusions that are reviewed by the citing entity\n */\n IsReviewedBy = 'IsReviewedBy',\n\n /**\n * The cited entity or aspects of its contents are ridiculed by the citing entity\n */\n IsRidiculedBy = 'IsRidiculedBy',\n\n /**\n * The cited entity is cited because the citing article contains speculations on its content or ideas\n */\n IsSpeculatedOnBy = 'IsSpeculatedOnBy',\n\n /**\n * The cited entity receives intellectual or factual support from the citing entity\n */\n IsSupportedBy = 'IsSupportedBy',\n\n /**\n * The cited entity presents statements, ideas, hypotheses or understanding that are updated by the cited entity\n */\n IsUpdatedBy = 'IsUpdatedBy',\n\n /**\n * A property that permits you to express appreciation of or interest in something that is the object of the RDF triple, or to express that it is worth thinking about even if you do not agree with its content, enabling social media 'likes' statements to be encoded in RDF\n */\n Likes = 'Likes',\n\n /**\n * The citing entity provides a link, in the form of an HTTP Uniform Resource Locator (URL), to the cited entity\n */\n LinksTo = 'LinksTo',\n\n /**\n * The citing entity obtains background information from the cited entity\n */\n ObtainsBackgroundFrom = 'ObtainsBackgroundFrom',\n\n /**\n * The citing entity obtains intellectual or factual support from the cited entity\n */\n ObtainsSupportFrom = 'ObtainsSupportFrom',\n\n /**\n * The citing entity imitates the characteristic style or content of the cited entity for comic effect, usually without explicit citation\n */\n Parodies = 'Parodies',\n\n /**\n * A property indicating that the author of the citing entity plagiarizes the cited entity, by including textual or other elements from the cited entity without formal acknowledgement of their source\n */\n Plagiarizes = 'Plagiarizes',\n\n /**\n * The cited entity contains and is the original source of a statement of fact or a logical assertion (or a collection of such facts and/or assertions) that is to be found in the citing entity\n */\n ProvidesAssertionFor = 'ProvidesAssertionFor',\n\n /**\n * The cited entity presents conclusions that are used in work described in the citing entity\n */\n ProvidesConclusionsFor = 'ProvidesConclusionsFor',\n\n /**\n * The cited entity presents data that are used in work described in the citing entity\n */\n ProvidesDataFor = 'ProvidesDataFor',\n\n /**\n * The cited entity contains information, usually of a textual nature, that is excerpted by (used as an excerpt within) the citing entity\n */\n ProvidesExcerptFor = 'ProvidesExcerptFor',\n\n /**\n * The cited entity details a method that is used in work described by the citing entity\n */\n ProvidesMethodFor = 'ProvidesMethodFor',\n\n /**\n * The cited entity contains information, usually of a textual nature, that is quoted by (used as a quotation within) the citing entity\n */\n ProvidesQuotationFor = 'ProvidesQuotationFor',\n\n /**\n * The citing entity qualifies or places conditions or restrictions upon statements, ideas or conclusions presented in the cited entity\n */\n Qualifies = 'Qualifies',\n\n /**\n * The citing entity refutes statements, ideas or conclusions presented in the cited entity\n */\n Refutes = 'Refutes',\n\n /**\n * The citing entity replies to statements, ideas or criticisms presented in the cited entity\n */\n RepliesTo = 'RepliesTo',\n\n /**\n * The citing entity constitutes a formal retraction of the cited entity\n */\n Retracts = 'Retracts',\n\n /**\n * The citing entity reviews statements, ideas or conclusions presented in the cited entity\n */\n Reviews = 'Reviews',\n\n /**\n * The citing entity ridicules the cited entity or aspects of its contents\n */\n Ridicules = 'Ridicules',\n\n /**\n * Each entity has at least one author that shares a common institutional affiliation with an author of the other entity\n */\n SharesAuthorInstitutionWith = 'SharesAuthorInstitutionWith',\n\n /**\n * Each entity has at least one author in common with the other entity\n */\n SharesAuthorWith = 'SharesAuthorWith',\n\n /**\n * The two entities result from activities that have been funded by the same funding agency\n */\n SharesFundingAgencyWith = 'SharesFundingAgencyWith',\n\n /**\n * The citing and cited bibliographic resources are published in the same journal\n */\n SharesJournalWith = 'SharesJournalWith',\n\n /**\n * The citing and cited bibliographic resources are published in same publication venue\n */\n SharesPublicationVenueWith = 'SharesPublicationVenueWith',\n\n /**\n * The citing entity speculates on something within or related to the cited entity, without firm evidence\n */\n SpeculatesOn = 'SpeculatesOn',\n\n /**\n * The citing entity provides intellectual or factual support for statements, ideas or conclusions presented in the cited entity\n */\n Supports = 'Supports',\n\n /**\n * The citing entity updates statements, ideas, hypotheses or understanding presented in the cited entity\n */\n Updates = 'Updates',\n\n /**\n * The citing entity describes work that uses conclusions presented in the cited entity\n */\n UsesConclusionsFrom = 'UsesConclusionsFrom',\n\n /**\n * The citing entity describes work that uses data presented in the cited entity\n */\n UsesDataFrom = 'UsesDataFrom',\n\n /**\n * The citing entity describes work that uses a method detailed in the cited entity\n */\n UsesMethodIn = 'UsesMethodIn',\n}\n\nexport type TypeMap<T extends Entity = Entity> = { [key in T['type']]: key }\n\nexport const codeExecutableTypes: TypeMap<\n Exclude<CodeExecutableTypes, Primitives>\n> = {\n CodeExecutable: 'CodeExecutable',\n CodeChunk: 'CodeChunk',\n CodeExpression: 'CodeExpression',\n}\nexport const codeTypes: TypeMap<Exclude<CodeTypes, Primitives>> = {\n Code: 'Code',\n CodeBlock: 'CodeBlock',\n CodeChunk: 'CodeChunk',\n CodeExecutable: 'CodeExecutable',\n CodeExpression: 'CodeExpression',\n CodeFragment: 'CodeFragment',\n}\nexport const contactPointTypes: TypeMap<\n Exclude<ContactPointTypes, Primitives>\n> = {\n ContactPoint: 'ContactPoint',\n PostalAddress: 'PostalAddress',\n}\nexport const creativeWorkTypes: TypeMap<\n Exclude<CreativeWorkTypes, Primitives>\n> = {\n CreativeWork: 'CreativeWork',\n Article: 'Article',\n AudioObject: 'AudioObject',\n Claim: 'Claim',\n Collection: 'Collection',\n Comment: 'Comment',\n Datatable: 'Datatable',\n Figure: 'Figure',\n ImageObject: 'ImageObject',\n MediaObject: 'MediaObject',\n Periodical: 'Periodical',\n PublicationIssue: 'PublicationIssue',\n PublicationVolume: 'PublicationVolume',\n Review: 'Review',\n SoftwareApplication: 'SoftwareApplication',\n SoftwareSourceCode: 'SoftwareSourceCode',\n Table: 'Table',\n VideoObject: 'VideoObject',\n}\nexport const entityTypes: TypeMap<Exclude<EntityTypes, Primitives>> = {\n Entity: 'Entity',\n ArrayValidator: 'ArrayValidator',\n Article: 'Article',\n AudioObject: 'AudioObject',\n BooleanValidator: 'BooleanValidator',\n Brand: 'Brand',\n CitationIntentEnumeration: 'CitationIntentEnumeration',\n Cite: 'Cite',\n CiteGroup: 'CiteGroup',\n Claim: 'Claim',\n Code: 'Code',\n CodeBlock: 'CodeBlock',\n CodeChunk: 'CodeChunk',\n CodeError: 'CodeError',\n CodeExecutable: 'CodeExecutable',\n CodeExpression: 'CodeExpression',\n CodeFragment: 'CodeFragment',\n Collection: 'Collection',\n Comment: 'Comment',\n ConstantValidator: 'ConstantValidator',\n ContactPoint: 'ContactPoint',\n CreativeWork: 'CreativeWork',\n Datatable: 'Datatable',\n DatatableColumn: 'DatatableColumn',\n Date: 'Date',\n DefinedTerm: 'DefinedTerm',\n Delete: 'Delete',\n Emphasis: 'Emphasis',\n EnumValidator: 'EnumValidator',\n Enumeration: 'Enumeration',\n Figure: 'Figure',\n Function: 'Function',\n Grant: 'Grant',\n Heading: 'Heading',\n ImageObject: 'ImageObject',\n Include: 'Include',\n IntegerValidator: 'IntegerValidator',\n Link: 'Link',\n List: 'List',\n ListItem: 'ListItem',\n Mark: 'Mark',\n Math: 'Math',\n MathBlock: 'MathBlock',\n MathFragment: 'MathFragment',\n MediaObject: 'MediaObject',\n MonetaryGrant: 'MonetaryGrant',\n NontextualAnnotation: 'NontextualAnnotation',\n Note: 'Note',\n NumberValidator: 'NumberValidator',\n Organization: 'Organization',\n Paragraph: 'Paragraph',\n Parameter: 'Parameter',\n Periodical: 'Periodical',\n Person: 'Person',\n PostalAddress: 'PostalAddress',\n Product: 'Product',\n PropertyValue: 'PropertyValue',\n PublicationIssue: 'PublicationIssue',\n PublicationVolume: 'PublicationVolume',\n Quote: 'Quote',\n QuoteBlock: 'QuoteBlock',\n Review: 'Review',\n SoftwareApplication: 'SoftwareApplication',\n SoftwareEnvironment: 'SoftwareEnvironment',\n SoftwareSession: 'SoftwareSession',\n SoftwareSourceCode: 'SoftwareSourceCode',\n StringValidator: 'StringValidator',\n Strong: 'Strong',\n Subscript: 'Subscript',\n Superscript: 'Superscript',\n Table: 'Table',\n TableCell: 'TableCell',\n TableRow: 'TableRow',\n ThematicBreak: 'ThematicBreak',\n Thing: 'Thing',\n TupleValidator: 'TupleValidator',\n Validator: 'Validator',\n Variable: 'Variable',\n VideoObject: 'VideoObject',\n VolumeMount: 'VolumeMount',\n}\nexport const enumerationTypes: TypeMap<Exclude<EnumerationTypes, Primitives>> =\n {\n Enumeration: 'Enumeration',\n CitationIntentEnumeration: 'CitationIntentEnumeration',\n }\nexport const grantTypes: TypeMap<Exclude<GrantTypes, Primitives>> = {\n Grant: 'Grant',\n MonetaryGrant: 'MonetaryGrant',\n}\nexport const markTypes: TypeMap<Exclude<MarkTypes, Primitives>> = {\n Mark: 'Mark',\n Delete: 'Delete',\n Emphasis: 'Emphasis',\n NontextualAnnotation: 'NontextualAnnotation',\n Quote: 'Quote',\n Strong: 'Strong',\n Subscript: 'Subscript',\n Superscript: 'Superscript',\n}\nexport const mathTypes: TypeMap<Exclude<MathTypes, Primitives>> = {\n Math: 'Math',\n MathBlock: 'MathBlock',\n MathFragment: 'MathFragment',\n}\nexport const mediaObjectTypes: TypeMap<Exclude<MediaObjectTypes, Primitives>> =\n {\n MediaObject: 'MediaObject',\n AudioObject: 'AudioObject',\n ImageObject: 'ImageObject',\n VideoObject: 'VideoObject',\n }\nexport const thingTypes: TypeMap<Exclude<ThingTypes, Primitives>> = {\n Thing: 'Thing',\n Article: 'Article',\n AudioObject: 'AudioObject',\n Brand: 'Brand',\n CitationIntentEnumeration: 'CitationIntentEnumeration',\n Claim: 'Claim',\n Collection: 'Collection',\n Comment: 'Comment',\n ContactPoint: 'ContactPoint',\n CreativeWork: 'CreativeWork',\n Datatable: 'Datatable',\n DatatableColumn: 'DatatableColumn',\n DefinedTerm: 'DefinedTerm',\n Enumeration: 'Enumeration',\n Figure: 'Figure',\n Grant: 'Grant',\n ImageObject: 'ImageObject',\n ListItem: 'ListItem',\n MediaObject: 'MediaObject',\n MonetaryGrant: 'MonetaryGrant',\n Organization: 'Organization',\n Periodical: 'Periodical',\n Person: 'Person',\n PostalAddress: 'PostalAddress',\n Product: 'Product',\n PropertyValue: 'PropertyValue',\n PublicationIssue: 'PublicationIssue',\n PublicationVolume: 'PublicationVolume',\n Review: 'Review',\n SoftwareApplication: 'SoftwareApplication',\n SoftwareEnvironment: 'SoftwareEnvironment',\n SoftwareSession: 'SoftwareSession',\n SoftwareSourceCode: 'SoftwareSourceCode',\n Table: 'Table',\n VideoObject: 'VideoObject',\n VolumeMount: 'VolumeMount',\n}\nexport const validatorTypes: TypeMap<Exclude<ValidatorTypes, Primitives>> = {\n Validator: 'Validator',\n ArrayValidator: 'ArrayValidator',\n BooleanValidator: 'BooleanValidator',\n ConstantValidator: 'ConstantValidator',\n EnumValidator: 'EnumValidator',\n IntegerValidator: 'IntegerValidator',\n NumberValidator: 'NumberValidator',\n StringValidator: 'StringValidator',\n TupleValidator: 'TupleValidator',\n}\nexport const blockContentTypes: TypeMap<Exclude<BlockContent, Primitives>> = {\n Claim: 'Claim',\n CodeBlock: 'CodeBlock',\n CodeChunk: 'CodeChunk',\n Collection: 'Collection',\n Figure: 'Figure',\n Heading: 'Heading',\n Include: 'Include',\n List: 'List',\n MathBlock: 'MathBlock',\n Paragraph: 'Paragraph',\n QuoteBlock: 'QuoteBlock',\n Table: 'Table',\n ThematicBreak: 'ThematicBreak',\n}\nexport const inlineContentTypes: TypeMap<Exclude<InlineContent, Primitives>> = {\n AudioObject: 'AudioObject',\n Cite: 'Cite',\n CiteGroup: 'CiteGroup',\n CodeExpression: 'CodeExpression',\n CodeFragment: 'CodeFragment',\n Delete: 'Delete',\n Emphasis: 'Emphasis',\n ImageObject: 'ImageObject',\n Link: 'Link',\n MathFragment: 'MathFragment',\n NontextualAnnotation: 'NontextualAnnotation',\n Note: 'Note',\n Parameter: 'Parameter',\n Quote: 'Quote',\n Strong: 'Strong',\n Subscript: 'Subscript',\n Superscript: 'Superscript',\n VideoObject: 'VideoObject',\n}\n\nexport interface Unions {\n CodeExecutableTypes: CodeExecutableTypes\n CodeTypes: CodeTypes\n ContactPointTypes: ContactPointTypes\n CreativeWorkTypes: CreativeWorkTypes\n EntityTypes: EntityTypes\n EnumerationTypes: EnumerationTypes\n GrantTypes: GrantTypes\n MarkTypes: MarkTypes\n MathTypes: MathTypes\n MediaObjectTypes: MediaObjectTypes\n ThingTypes: ThingTypes\n ValidatorTypes: ValidatorTypes\n BlockContent: BlockContent\n InlineContent: InlineContent\n}\n\nexport const unions = {\n CodeExecutableTypes: codeExecutableTypes,\n CodeTypes: codeTypes,\n ContactPointTypes: contactPointTypes,\n CreativeWorkTypes: creativeWorkTypes,\n EntityTypes: entityTypes,\n EnumerationTypes: enumerationTypes,\n GrantTypes: grantTypes,\n MarkTypes: markTypes,\n MathTypes: mathTypes,\n MediaObjectTypes: mediaObjectTypes,\n ThingTypes: thingTypes,\n ValidatorTypes: validatorTypes,\n BlockContent: blockContentTypes,\n InlineContent: inlineContentTypes,\n}\n","import {\n BlockContent,\n Entity,\n InlineContent,\n Node,\n TypeMap,\n Types,\n unions,\n Unions,\n} from '../types'\n\nexport type TypeMapGeneric<\n T extends { type: string } & Record<string, unknown> = { type: string }\n> = { [key in T['type']]: key }\n\ntype ExtractGeneric<Type> = Type extends TypeMap<infer X>\n ? X\n : Type extends TypeMapGeneric<infer Y>\n ? Y\n : never\n\n/**\n * Type guard to determine whether a node belongs to a type map\n *\n * @template {TypeMap} T\n * @param {T} typeMap\n * @param {Node} node A Stencila schema node object\n */\nexport const isInTypeMap =\n <T extends Partial<TypeMap | TypeMapGeneric>>(typeMap: T) =>\n (node?: Node): node is ExtractGeneric<T> =>\n isEntity(node) ? Object.keys(typeMap).includes(node.type) : false\n\n/**\n * Type guard to determine whether a node is a primitive type\n * (i.e. not an `Entity`).\n */\nexport const isPrimitive = (\n node?: Node\n): node is null | boolean | number | string => {\n const type = typeof node\n if (node === null) return true\n if (type === 'boolean') return true\n if (type === 'number') return true\n if (type === 'string') return true\n if (Array.isArray(node)) return true\n if (type === 'object' && !Object.prototype.hasOwnProperty.call(node, 'type'))\n return true\n return false\n}\n\n/**\n * Type guard to determine whether a node is an `Entity`\n */\nexport const isEntity = (node?: Node): node is Entity => {\n if (node === null || node === undefined) return false\n return Object.prototype.hasOwnProperty.call(node, 'type')\n}\n\n/**\n * A type guard to determine whether a node is of a specific type.\n *\n * e.g. `isA('Paragraph', node)`\n */\nexport const isA = <K extends keyof Types>(\n type: K,\n node: Node | undefined\n): node is Types[K] => isEntity(node) && node.type === type\n\n/**\n * Returns a type guard to determine whether a node is of a specific type.\n *\n * e.g. `isType('Article')(node)`\n * e.g. `article.content.filter(isType('Paragraph'))`\n */\nexport const isType =\n <K extends keyof Types>(type: K) =>\n (node?: Node): node is Types[K] =>\n isA(type, node)\n\n/**\n * A type guard to determine whether a node is a member of a union type.\n *\n * e.g. `isIn('MediaObjectTypes', node)`\n */\nexport const isIn = <K extends keyof Unions>(\n union: K,\n node: Node | undefined\n): node is Unions[K] => isEntity(node) && node.type in unions[union]\n\n/**\n * Returns a type guard to determine whether a node is a member of a union type.\n *\n * e.g. `isMember('CreativeWorkTypes')(node)`\n */\nexport const isMember =\n <K extends keyof Unions>(type: K) =>\n (node?: Node): node is Unions[K] =>\n isIn(type, node)\n\n/**\n * Type guard to determine whether a node is `InlineContent`.\n *\n * e.g. `nodes.filter(isInlineContent)`\n */\nexport const isInlineContent = (node?: Node): node is InlineContent =>\n isPrimitive(node) || isIn('InlineContent', node)\n\n/**\n * Type guard to determine whether a node is `BlockContent`.\n *\n * e.g. `nodes.filter(isBlockContent)`\n */\nexport const isBlockContent = (node?: Node): node is BlockContent =>\n isIn('BlockContent', node)\n","import { version as pkgVersion } from '../../package.json'\n\n/**\n * Get the version string (e.g \"1.2.3\") for this package\n */\nexport const version = pkgVersion\n\n/**\n * Get the major version string (e.g \"1\") for this package\n */\nexport const versionMajor: string = version.split('.')[0]\n\n/**\n * Get the minor version string (e.g \"1.2\") for this package\n */\nexport const versionMinor: string = version.split('.').slice(0, 2).join('.')\n","import fs from 'fs'\nimport path from 'path'\nimport { versionMajor } from './version'\n\n// Lazily loaded JSON-LD context used for mapping\n// between Stencila Schema type and property names\n// and URLs\nlet CONTEXT: Record<string, string | { '@id': string }>\n\n// Maps between vocabulary terms (Stencila Schema types and\n// property names) and their compact IRIs ('@id's) and vice-versa.\nconst termToId: Record<string, string> = {}\nconst idToTerm: Record<string, string> = {}\n\n// Initialize maps. Called once, lazily.\nfunction initMaps(): void {\n const context = jsonLdContext()\n for (const [term, value] of Object.entries(context)) {\n if (typeof value === 'string' && !term.startsWith('@')) {\n termToId[term] = value\n idToTerm[value] = term\n } else if (typeof value === 'object') {\n const id = value['@id']\n termToId[term] = id\n idToTerm[id] = term\n }\n }\n}\n\n/**\n * Get the URL of Stencila Schema's JSON-LD `@context` or\n * for a specific `stencila:` term e.g. `CodeChunk`, `outputs`.\n *\n * The `@context`'s URL needs to have a trailing slash because\n * it gets prefixed to all keys during JSON-LD expansion.\n * e.g. the term `CodeChunk` gets expanded to `http://schema.stenci.la/v0/jsonld/CodeChunk`\n * (which in gets redirected to `https://unpkg.com/@stencila/schema@0.32.1/dist/CodeChunk.jsonld`)\n *\n * @param term The Stencila term (type or property) to generate the\n * URL for. Defaults to empty string i.e. the context.\n */\nexport function jsonLdUrl(term = ''): string {\n return `http://schema.stenci.la/v${versionMajor}/jsonld/${term}`\n}\n\n/**\n * Get Stencila Schema's JSON-LD `@context` as an object.\n */\nexport function jsonLdContext(): typeof CONTEXT {\n if (CONTEXT === undefined) {\n const json = fs.readFileSync(\n path.join(\n __dirname,\n ...(__filename.endsWith('.ts') ? ['..', '..', 'public'] : []),\n 'stencila.jsonld'\n ),\n 'utf8'\n )\n // eslint-disable-next-line\n CONTEXT = JSON.parse(json)['@context']\n }\n return CONTEXT\n}\n\n/**\n * Get the URL for a term in the Stencila Schema's JSON-LD `@context`\n * from it's name.\n *\n * This uses the JSON-LD `@context` in `stencila.jsonld` (which\n * provides a mapping between vocabularies) to translate\n * type names used in the Stencila Schema\n * to those used in other schemas (e.g. Schema.org, Bioschemas).\n * The [compact IRIs](https://www.w3.org/TR/json-ld11/#compact-iris)\n * in the `@context` e.g. `schema:Person` are expanded to a URL\n * e.g. `http://schema.org/Person` suitable for the `itemtype` attribute.\n *\n * @param term A term in the JSON-LD `@context`. May, or may not be in\n * the `stencila` namespace\n */\nexport function jsonLdTermUrl(term: string): string | undefined {\n if (Object.keys(termToId).length === 0) initMaps()\n\n const id = termToId[term]\n if (id === undefined) return undefined\n\n const [prefix, name] = id.split(':')\n const context = jsonLdContext()\n const base = context[prefix]\n if (base === undefined) return undefined\n\n return `${base.toString()}${name}`\n}\n\n/**\n * Get the name of a term in the Stencila Schema's JSON-LD `@context`\n * from a URL.\n *\n * This is the inverse of `jsonLdTermUrl`.\n *\n * @param url A url to resolve into a term\n */\nexport function jsonLdTermName(url: string): string | undefined {\n if (Object.keys(idToTerm).length === 0) initMaps()\n\n // Parse the url into a base URL / term pair\n const { hash, pathname } = new URL(url)\n const term = hash !== '' ? hash.slice(1) : pathname.split('/').pop()\n const baseUrl = url.replace(new RegExp(`${term ?? ''}$`), '')\n\n // Resolve the URL into a prefix\n const prefix = idToTerm[baseUrl]\n if (prefix === undefined) return undefined\n\n // Resolve the `@id` to the term name\n return idToTerm[`${prefix}:${term ?? 'undefined'}`]\n}\n","/**\n * Utility functions for runtime inspection of JSON Schemas\n * in this repository.\n *\n * As with the other utility modules it\n * avoids using non-builtin modules so that this package has\n * no production dependencies.\n */\n\nimport fs from 'fs'\nimport path from 'path'\nimport { JsonSchema } from '../JsonSchema'\n\n// Lazily loaded set of JSON Schemas\nlet SCHEMAS: Record<string, JsonSchema> = {}\n\nexport interface Property {\n /**\n * Name of the property\n */\n name: string\n\n /**\n * Id of the property\n */\n id: string\n\n /**\n * Types that this property exists on.\n *\n * @see https://schema.org/domainIncludes\n */\n domainIncludes: string[]\n\n /**\n * Is the property an array?\n */\n isArray: boolean\n\n /**\n * Is the property name pluralized (ends in `s`).\n */\n isPlural: boolean\n}\n\n// Lazily populated set properties across all schemas\nlet PROPERTIES: Record<string, Property> = {}\n\n/**\n * Get all Stencila Schema's JSON Schemas.\n */\nexport async function jsonSchemas(): Promise<typeof SCHEMAS> {\n if (Object.keys(SCHEMAS).length === 0) {\n const dir = path.join(\n __dirname,\n ...(__filename.endsWith('.ts') ? ['..', '..', 'public'] : [])\n )\n const files = await new Promise<string[]>((resolve, reject) =>\n fs.readdir(dir, 'utf8', (error, files) =>\n error !== null ? reject(error) : resolve(files)\n )\n )\n const schemaFiles = files.filter((filename) =>\n filename.endsWith('.schema.json')\n )\n const promises = schemaFiles.map(async (file) => {\n const json = await new Promise<string>((resolve, reject) =>\n fs.readFile(path.join(dir, file), 'utf8', (error, content) =>\n error !== null ? reject(error) : resolve(content)\n )\n )\n return JSON.parse(json) as JsonSchema\n })\n const schemas = await Promise.all(promises)\n SCHEMAS = schemas.reduce((prev: typeof SCHEMAS, schema) => {\n const { title } = schema\n return title === undefined ? prev : { ...prev, [title]: schema }\n }, {})\n }\n return SCHEMAS\n}\n\n/**\n * Get all the names of all types in the Stencila Schema.\n */\nexport async function jsonSchemaTypes(): Promise<string[]> {\n const schemas = await jsonSchemas()\n return Object.keys(schemas)\n}\n\n/**\n * Get all the properties in all types in the Stencila Schema.\n *\n * Returns a alphabetically sorted `Record` with information on\n * each property, including the types that it occurs on,\n * and whether or not it is an array property.\n */\nexport async function jsonSchemaProperties(): Promise<\n Record<string, Property>\n> {\n if (Object.keys(PROPERTIES).length === 0) {\n const schemas = await jsonSchemas()\n // Accumulate properties across types\n const props = Object.values(schemas).reduce(\n (prev: typeof PROPERTIES, type) => {\n const { title = '', properties = {} } = type\n Object.entries(properties).forEach(([name, prop]) => {\n const { '@id': id = '', isArray = false, isPlural = false } = prop\n const existing = prev[name]\n if (existing === undefined) {\n prev[name] = {\n name,\n id,\n domainIncludes: [title],\n isArray,\n isPlural,\n }\n } else {\n // Check that there is consistency in the property\n // Most of these checks are done in `../schema.ts` when the\n // JSON Schema files are generated. These checks may be moved\n // to elsewhere.\n const message = `${title}.${name} differs to that on ${existing.domainIncludes.join(\n ', '\n )}`\n if (id !== existing.id) throw new Error(`${message}: @id ${id}`)\n if (isPlural !== existing.isPlural)\n throw new Error(`${message}: isPlural ${isPlural.toString()}`)\n // Add the type...\n existing.domainIncludes.push(title)\n }\n })\n return prev\n },\n {}\n )\n // Sort by key\n PROPERTIES = Object.keys(props)\n .sort()\n .reduce((prev, key) => ({ ...prev, [key]: props[key] }), {})\n }\n return PROPERTIES\n}\n","import { Types, Node } from '../types'\nimport { isEntity } from './guards'\n\n/**\n * Get the type of a node\n *\n * @param {Node} node The schema node to get the type for\n */\nexport const nodeType = (node: Node): keyof Types => {\n if (node === null) return 'Null'\n if (typeof node === 'boolean') return 'Boolean'\n if (typeof node === 'number') return 'Number'\n if (typeof node === 'string') return 'String'\n if (Array.isArray(node)) return 'Array'\n if (isEntity(node)) return node.type\n return 'Object'\n}\n","import { Node, Types } from '../types'\nimport {\n jsonLdContext,\n jsonLdTermName,\n jsonLdTermUrl,\n jsonLdUrl,\n} from './jsonld'\nimport { nodeType } from './nodeType'\nimport { isPrimitive } from './guards'\n\n/**\n * Get the URL used in Microdata attributes.\n *\n * This is used to normalize the versioned URL from the\n * JSON-LD context.\n */\nexport function microdataUrl(type = ''): string {\n return `http://schema.stenci.la/${type}`\n}\n\n/**\n * Attributes for Microdata [\"items\"](https://www.w3.org/TR/microdata/#items)\n *\n * \"The itemtype attribute must not be specified on elements that do not have\n * an itemscope attribute specified.\"\n */\nexport interface MicrodataItem {\n itemscope?: ''\n itemtype?: string\n 'data-itemtype'?: string\n itemid?: string\n}\n\n/**\n * Create `MicrodataItem` attributes for a node.\n *\n * Does not create the `itemscope` and `itemtype` attributes for nodes that\n * are primitive (and therefore which do not represent a \"scope\" having\n * `itemprop`s nested within it). Instead, for primitive nodes, other than `Text`\n * add the `data-itemtype` attribute, do they can be styled if so desired.\n *\n * @param node The node to create Microdata attributes for\n * @param id Id of the Microdata item. Used to link to this node using the `itemref` property.\n */\nexport function microdataItem(node: Node, id?: string): MicrodataItem {\n const itemtype = microdataItemtype(nodeType(node))\n const itemidAttr = id !== undefined ? { itemid: `#${id}` } : {}\n if (itemtype !== undefined && !isPrimitive(node))\n return {\n itemscope: '',\n itemtype,\n ...itemidAttr,\n }\n else if (typeof node !== 'string')\n return {\n 'data-itemtype': itemtype,\n ...itemidAttr,\n }\n else return itemidAttr\n}\n\n/**\n * Get the HTML Microdata `itemtype` for a Stencila Schema type\n *\n * @see {@link https://www.w3.org/TR/microdata/#dfn-itemtype}\n */\nexport function microdataItemtype(type: keyof Types): string | undefined {\n return jsonLdTermUrl(type)?.replace(jsonLdUrl(), microdataUrl())\n}\n\n/**\n * Get the Stencila Schema type from a HTML Microdata `itemtype`.\n *\n * This is the inverse of `microdataItemtype`.\n */\nexport function microdataType(itemtype: string): keyof Types | undefined {\n return jsonLdTermName(\n itemtype.replace(microdataUrl(), jsonLdUrl())\n ) as keyof Types\n}\n\n/**\n * Attributes for Microdata [\"properties\"](https://www.w3.org/TR/microdata/#names:-the-itemprop-attribute)\n *\n * The `data-itemprop` attribute is not part of the Microdata standard.\n * It is used for properties that are not defined in schema.org and which validators\n * like Google Structured Data Testing Tool throw errors about.\n */\nexport interface MicrodataProperty {\n itemprop?: string\n 'data-itemprop'?: string\n itemref?: string\n}\n\ntype Role = 'array' | 'item'\n\n/**\n * Create `MicrodataProperty` attributes for a node property.\n *\n * @param property The name of the property\n * @param isItem Is the node for which attributes are being generated\n * an item within an array property? e.g. a `Person` in `authors`.\n * @param id Id of another Microdata item to link to using the `itemref` property.\n */\nexport function microdataProperty(\n property: string,\n role?: Role,\n id?: string\n): MicrodataProperty {\n const [prefix, name = ''] = microdataItemprop(property, role)\n const key = prefix === 'schema' ? 'itemprop' : 'data-itemprop'\n const itemrefAttr = id !== undefined ? { itemref: id } : {}\n return { [key]: name, ...itemrefAttr }\n}\n\n/**\n * Get the HTML Microdata `itemprop` for a Stencila Schema property.\n *\n * The `itemprop` attribute is normally just the name of the property\n * i.e. it is not prefixed by a base URL. This function returns the\n * `[prefix, name]` pair e.g. `[\"schema\", \"author\"]`,\n * `[\"codemeta\", \"maintainer\"]` because you may only want to encode\n * `itemprop`s for well known schemas e.g. schema.org\n *\n * @see {@link https://www.w3.org/TR/microdata/#dfn-attr-itemprop}\n *\n * @param property The name of the property\n * @param role Is the node for which attributes are being generated\n * an item within an array property? e.g. a `Person` in `authors`.\n */\nexport function microdataItemprop(\n property: string,\n role?: Role\n): [string | undefined, string | undefined] {\n if (role === 'array') return ['stencila', property]\n\n const context = jsonLdContext()\n const mapping = context[property]\n if (mapping === undefined) return [undefined, undefined]\n if (typeof mapping === 'string') return [undefined, mapping]\n\n const id = mapping['@id']\n let [prefix, name] = id.split(':')\n\n // If this is an item in an array property and the\n // name is a plural, then return a singular name.\n // For external vocabs the `@id` is usually a singular already e.g.\n // schema:author\n // codemeta:maintainer\n if (role === 'item' && prefix === 'stencila' && name.endsWith('s'))\n name = name.slice(0, -1)\n\n return [prefix, name]\n}\n\nexport type Microdata = MicrodataItem & MicrodataProperty\n\n/**\n * Create all Microdata attributes for a Stencila `Node`.\n *\n * @param node The node e.g. a `Person` node\n * @param property The name of the property that this node is part of e.g `authors`\n * @param role Is this an item within an array property e.g a `Person` within `authors`\n * @param id The id used to link to / from this Microdata item\n */\nexport function microdata(\n node: Node,\n property?: string,\n role?: Role,\n id?: string\n): Microdata {\n return {\n ...(role !== 'array'\n ? microdataItem(node, property === undefined ? id : undefined)\n : {}),\n ...(property !== undefined ? microdataProperty(property, role, id) : {}),\n }\n}\n\n/**\n * Get the 'pseudo' HTML Microdata attribute for the root element.\n *\n * This attribute name / value pair is used to scope CSS variables to\n * the root Stencila node in an HML document. It is used by Encoda when\n * encoding to HTML, it is in Thema to scope CSS variable thereby\n * avoiding variable name clashes from using the CSS `:root` pseudo-class.\n *\n * Although not directly related to Microdata, given it is used in both\n * of those projects, this appears to be the best place for it.\n */\nexport function microdataRoot(): { 'data-itemscope': 'root' } {\n return { 'data-itemscope': 'root' }\n}\n"],"names":["compact","o","Object","entries","reduce","compactedO","k","v","undefined","entity","props","type","cite","citeGroup","code","codeBlock","codeExecutable","codeChunk","codeExpression","codeFragment","codeError","date","mark","del","emphasis","thing","brand","contactPoint","creativeWork","article","claim","collection","comment","datatable","mediaObject","audioObject","datatableColumn","definedTerm","validator","arrayValidator","booleanValidator","constantValidator","enumValidator","enumeration","figure","function_","grant","heading","imageObject","include","integerValidator","link","list","listItem","math","mathBlock","mathFragment","monetaryGrant","nontextualAnnotation","note","numberValidator","organization","paragraph","parameter","periodical","person","postalAddress","product","propertyValue","publicationIssue","publicationVolume","quote","quoteBlock","review","softwareApplication","softwareEnvironment","softwareSession","softwareSourceCode","stringValidator","strong","subscript","superscript","table","tableCell","tableRow","thematicBreak","tupleValidator","variable","videoObject","volumeMount","CitationIntentEnumeration","codeExecutableTypes","CodeExecutable","CodeChunk","CodeExpression","codeTypes","Code","CodeBlock","CodeFragment","contactPointTypes","ContactPoint","PostalAddress","creativeWorkTypes","CreativeWork","Article","AudioObject","Claim","Collection","Comment","Datatable","Figure","ImageObject","MediaObject","Periodical","PublicationIssue","PublicationVolume","Review","SoftwareApplication","SoftwareSourceCode","Table","VideoObject","entityTypes","Entity","ArrayValidator","BooleanValidator","Brand","Cite","CiteGroup","CodeError","ConstantValidator","DatatableColumn","Date","DefinedTerm","Delete","Emphasis","EnumValidator","Enumeration","Function","Grant","Heading","Include","IntegerValidator","Link","List","ListItem","Mark","Math","MathBlock","MathFragment","MonetaryGrant","NontextualAnnotation","Note","NumberValidator","Organization","Paragraph","Parameter","Person","Product","PropertyValue","Quote","QuoteBlock","SoftwareEnvironment","SoftwareSession","StringValidator","Strong","Subscript","Superscript","TableCell","TableRow","ThematicBreak","Thing","TupleValidator","Validator","Variable","VolumeMount","enumerationTypes","grantTypes","markTypes","mathTypes","mediaObjectTypes","thingTypes","validatorTypes","blockContentTypes","inlineContentTypes","unions","CodeExecutableTypes","CodeTypes","ContactPointTypes","CreativeWorkTypes","EntityTypes","EnumerationTypes","GrantTypes","MarkTypes","MathTypes","MediaObjectTypes","ThingTypes","ValidatorTypes","BlockContent","InlineContent","isInTypeMap","typeMap","node","isEntity","keys","includes","isPrimitive","Array","isArray","prototype","hasOwnProperty","call","isA","isType","isIn","union","isMember","isInlineContent","isBlockContent","version","pkgVersion","versionMajor","split","versionMinor","slice","join","CONTEXT","termToId","idToTerm","initMaps","context","jsonLdContext","term","value","startsWith","id","jsonLdUrl","json","fs","readFileSync","path","__dirname","__filename","endsWith","JSON","parse","jsonLdTermUrl","length","prefix","name","base","toString","jsonLdTermName","url","hash","pathname","URL","pop","baseUrl","replace","RegExp","SCHEMAS","PROPERTIES","jsonSchemas","dir","files","Promise","resolve","reject","readdir","error","schemaFiles","filter","filename","promises","map","file","readFile","content","schemas","all","prev","schema","title","jsonSchemaTypes","jsonSchemaProperties","values","properties","forEach","prop","isPlural","existing","domainIncludes","message","Error","push","sort","key","nodeType","microdataUrl","microdataItem","itemtype","microdataItemtype","itemidAttr","itemid","itemscope","microdataType","microdataProperty","property","role","microdataItemprop","itemrefAttr","itemref","mapping","microdata","microdataRoot"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAqBA;AACA,MAAMA,OAAO,GAAsBC,CAAnB,IACdC,MAAM,CAACC,OAAP,CAAeF,CAAf,EAAkBG,MAAlB,CACE,CAACC,UAAD,EAAgB,CAACC,CAAD,EAAIC,CAAJ,CAAhB,KACEA,CAAC,KAAKC,SAAN,GAAkBH,UAAlB,gBAAoCA,UAApC;AAAgD,GAACC,CAAD,GAAKC;AAArD,EAFJ,EAGE,EAHF,CADF;AAyMA;;;;;;;MAKaE,MAAM,GAAG,CAACC,QAA8B,EAA/B,kBACjBV,OAAO,CAACU,KAAD,CADU;AAEpBC,EAAAA,IAAI,EAAE;AAFc;AA2BtB;;;;;;MAKaC,IAAI,GAAIF,KAAD,iBACfV,OAAO,CAACU,KAAD,CADQ;AAElBC,EAAAA,IAAI,EAAE;AAFY;AAapB;;;;;;MAKaE,SAAS,GAAIH,KAAD,iBACpBV,OAAO,CAACU,KAAD,CADa;AAEvBC,EAAAA,IAAI,EAAE;AAFiB;AAqBzB;;;;;;MAKaG,IAAI,GAAIJ,KAAD,iBACfV,OAAO,CAACU,KAAD,CADQ;AAElBC,EAAAA,IAAI,EAAE;AAFY;AAYpB;;;;;;MAKaI,SAAS,GAAIL,KAAD,iBACpBV,OAAO,CAACU,KAAD,CADa;AAEvBC,EAAAA,IAAI,EAAE;AAFiB;AAiBzB;;;;;;MAKaK,cAAc,GACzBN,KAD4B,iBAGzBV,OAAO,CAACU,KAAD,CAHkB;AAI5BC,EAAAA,IAAI,EAAE;AAJsB;AAkB9B;;;;;;MAKaM,SAAS,GAAIP,KAAD,iBACpBV,OAAO,CAACU,KAAD,CADa;AAEvBC,EAAAA,IAAI,EAAE;AAFiB;AAczB;;;;;;MAKa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