UNPKG

129 kBSource Map (JSON)View Raw
1{"version":3,"file":"index.js","sources":["../src/types.ts","../src/util/guards.ts","../src/util/version.ts","../src/util/jsonld.ts","../src/util/jsonSchemas.ts","../src/util/nodeType.ts","../src/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 Integer = number\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<Primitive>\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: { [property: string]: Primitive }\n Organization: Organization\n Paragraph: Paragraph\n Parameter: Parameter\n Periodical: Periodical\n Person: Person\n PostalAddress: PostalAddress\n Primitive: Primitive\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 type 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?: { [property: string]: Primitive }\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 type Cite = 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 type CiteGroup = 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 type Code = 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 type CodeBlock = 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 type CodeExecutable = Code & {\n type: 'CodeExecutable' | 'CodeChunk' | 'CodeExpression'\n programmingLanguage: string\n codeDependencies?: Array<CodeChunk | Parameter>\n codeDependents?: Array<CodeChunk | CodeExpression>\n compileDigest?: string\n errors?: Array<CodeError>\n executeCount?: Integer\n executeDigest?: string\n executeDuration?: number\n executeEnded?: Date\n executeRequired?:\n | 'No'\n | 'NeverExecuted'\n | 'SemanticsChanged'\n | 'DependenciesChanged'\n | 'DependenciesFailed'\n executeStatus?:\n | 'Scheduled'\n | 'ScheduledPreviouslyFailed'\n | 'Running'\n | 'RunningPreviouslyFailed'\n | 'Succeeded'\n | 'Failed'\n | 'Cancelled'\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 type CodeChunk = CodeExecutable & {\n type: 'CodeChunk'\n programmingLanguage: string\n caption?: Array<BlockContent> | string\n executeAuto?: 'Never' | 'Needed' | 'Always'\n executePure?: boolean\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 type CodeExpression = 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 type CodeFragment = 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 type CodeError = 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 type Date = 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 type Mark = 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 type Delete = 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 type Emphasis = 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 type Thing = 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 type Brand = 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 type ContactPoint = 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 type CreativeWork = 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 type Article = 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 type Claim = 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 type Collection = 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 type Comment = 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 type Datatable = 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 type MediaObject = 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 type AudioObject = 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 type DatatableColumn = 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 type DefinedTerm = 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 type Validator = 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 type ArrayValidator = 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 type BooleanValidator = 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 type ConstantValidator = 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 type EnumValidator = 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 type Enumeration = 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 type Figure = 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 type Function = 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 type Grant = 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 type Heading = 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 type ImageObject = 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 type Include = 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 type IntegerValidator = 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 type Link = 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 type List = 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 type ListItem = 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 type Math = 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 type MathBlock = 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 type MathFragment = 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 type MonetaryGrant = 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 type NontextualAnnotation = 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 type Note = 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 type NumberValidator = 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 type Organization = 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 type Paragraph = 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 type Parameter = 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 type Periodical = 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 type Person = 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 type PostalAddress = 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 type Product = 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 type PropertyValue = 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 type PublicationIssue = 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 type PublicationVolume = 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 type Quote = 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 type QuoteBlock = 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 type Review = 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 type SoftwareApplication = 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 type SoftwareEnvironment = 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 type SoftwareSession = 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 type SoftwareSourceCode = 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 type StringValidator = 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 type Strong = 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 type Subscript = 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 type Superscript = 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 type Table = 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 type TableCell = 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 type TableRow = 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 type ThematicBreak = 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 type TupleValidator = 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 type Variable = 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 type VideoObject = 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 type VolumeMount = 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 types of nodes in this schema, 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 | { [property: string]: Primitive }\n | Array<Primitive>\n\n/**\n * Union type for all primitives values\n */\nexport type Primitive =\n | null\n | boolean\n | Integer\n | number\n | string\n | { [property: string]: Primitive }\n | Array<Primitive>\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, Primitive>\n> = {\n CodeExecutable: 'CodeExecutable',\n CodeChunk: 'CodeChunk',\n CodeExpression: 'CodeExpression',\n}\nexport const codeTypes: TypeMap<Exclude<CodeTypes, Primitive>> = {\n Code: 'Code',\n CodeBlock: 'CodeBlock',\n CodeChunk: 'CodeChunk',\n CodeExecutable: 'CodeExecutable',\n CodeExpression: 'CodeExpression',\n CodeFragment: 'CodeFragment',\n}\nexport const contactPointTypes: TypeMap<Exclude<ContactPointTypes, Primitive>> =\n {\n ContactPoint: 'ContactPoint',\n PostalAddress: 'PostalAddress',\n }\nexport const creativeWorkTypes: TypeMap<Exclude<CreativeWorkTypes, Primitive>> =\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, Primitive>> = {\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, Primitive>> = {\n Enumeration: 'Enumeration',\n CitationIntentEnumeration: 'CitationIntentEnumeration',\n}\nexport const grantTypes: TypeMap<Exclude<GrantTypes, Primitive>> = {\n Grant: 'Grant',\n MonetaryGrant: 'MonetaryGrant',\n}\nexport const markTypes: TypeMap<Exclude<MarkTypes, Primitive>> = {\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, Primitive>> = {\n Math: 'Math',\n MathBlock: 'MathBlock',\n MathFragment: 'MathFragment',\n}\nexport const mediaObjectTypes: TypeMap<Exclude<MediaObjectTypes, Primitive>> = {\n MediaObject: 'MediaObject',\n AudioObject: 'AudioObject',\n ImageObject: 'ImageObject',\n VideoObject: 'VideoObject',\n}\nexport const thingTypes: TypeMap<Exclude<ThingTypes, Primitive>> = {\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, Primitive>> = {\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, Primitive>> = {\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, Primitive>> = {\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: Entity['type'] } & Record<string, Node> = {\n type: Entity['type']\n }\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?: unknown): 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?: unknown\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?: unknown): 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: unknown\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?: unknown): 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: unknown\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?: unknown): 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?: unknown): 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?: unknown): 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 `https://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 `https://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. `https://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 `https://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 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 `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 '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-prop` 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-prop'?: 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-prop'\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 HTML 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 HTML 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 potentially\n * more than one project, this appears to be the best place for it.\n */\nexport function microdataRoot(): { 'data-root': '' } {\n return { 'data-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;AAQA;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;AA0MA;;;;;;;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;AAmCzB;;;;;;MAKaK,cAAc,GACzBN,KAD4B,iBAGzBV,OAA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