UNPKG

@stencila/types

Version:

JavaScript classes and TypeScript types for the Stencila Schema

1 lines 277 kB
{"version":3,"sources":["../src/index.ts","../src/types/Entity.ts","../src/types/Admonition.ts","../src/types/ArrayHint.ts","../src/types/ArrayValidator.ts","../src/types/Thing.ts","../src/types/CreativeWork.ts","../src/types/Article.ts","../src/types/MediaObject.ts","../src/types/AudioObject.ts","../src/hydrate.ts","../src/types/Author.ts","../src/types/Role.ts","../src/types/AuthorRole.ts","../src/types/Block.ts","../src/types/BooleanValidator.ts","../src/types/Brand.ts","../src/types/Executable.ts","../src/types/CodeExecutable.ts","../src/types/Button.ts","../src/types/Parameter.ts","../src/types/CallArgument.ts","../src/types/IncludeBlock.ts","../src/types/CallBlock.ts","../src/types/Cite.ts","../src/types/CiteGroup.ts","../src/types/CiteOrText.ts","../src/types/Claim.ts","../src/types/CodeStatic.ts","../src/types/CodeBlock.ts","../src/types/CodeChunk.ts","../src/types/CodeExpression.ts","../src/types/CodeInline.ts","../src/types/CodeLocation.ts","../src/types/Collection.ts","../src/types/Comment.ts","../src/types/CompilationDigest.ts","../src/types/CompilationMessage.ts","../src/types/ConstantValidator.ts","../src/types/ContactPoint.ts","../src/types/CreativeWorkType.ts","../src/types/Datatable.ts","../src/types/DatatableColumn.ts","../src/types/DatatableColumnHint.ts","../src/types/DatatableHint.ts","../src/types/Date.ts","../src/types/DateTime.ts","../src/types/DateTimeValidator.ts","../src/types/DateValidator.ts","../src/types/DefinedTerm.ts","../src/types/Suggestion.ts","../src/types/SuggestionBlock.ts","../src/types/DeleteBlock.ts","../src/types/SuggestionInline.ts","../src/types/DeleteInline.ts","../src/types/Directory.ts","../src/types/Duration.ts","../src/types/DurationValidator.ts","../src/types/Mark.ts","../src/types/Emphasis.ts","../src/types/EnumValidator.ts","../src/types/Enumeration.ts","../src/types/ExecutionDependant.ts","../src/types/ExecutionDependantNode.ts","../src/types/ExecutionDependency.ts","../src/types/ExecutionDependencyNode.ts","../src/types/ExecutionMessage.ts","../src/types/ExecutionTag.ts","../src/types/Figure.ts","../src/types/File.ts","../src/types/FileOrDirectory.ts","../src/types/ForBlock.ts","../src/types/Form.ts","../src/types/Function.ts","../src/types/Grant.ts","../src/types/GrantOrMonetaryGrant.ts","../src/types/Heading.ts","../src/types/Hint.ts","../src/types/IfBlock.ts","../src/types/IfBlockClause.ts","../src/types/ImageObject.ts","../src/types/Inline.ts","../src/types/InsertBlock.ts","../src/types/InsertInline.ts","../src/types/Instruction.ts","../src/types/InstructionBlock.ts","../src/types/InstructionInline.ts","../src/types/InstructionMessage.ts","../src/types/NumberValidator.ts","../src/types/IntegerValidator.ts","../src/types/Link.ts","../src/types/List.ts","../src/types/ListItem.ts","../src/types/Math.ts","../src/types/MathBlock.ts","../src/types/MathInline.ts","../src/types/MessagePart.ts","../src/types/ModifyBlock.ts","../src/types/ModifyInline.ts","../src/types/ModifyOperation.ts","../src/types/MonetaryGrant.ts","../src/types/Node.ts","../src/types/Note.ts","../src/types/ObjectHint.ts","../src/types/Organization.ts","../src/types/Paragraph.ts","../src/types/Periodical.ts","../src/types/Person.ts","../src/types/PersonOrOrganization.ts","../src/types/PersonOrOrganizationOrSoftwareApplication.ts","../src/types/PostalAddress.ts","../src/types/PostalAddressOrString.ts","../src/types/Product.ts","../src/types/PropertyValue.ts","../src/types/PropertyValueOrString.ts","../src/types/PublicationIssue.ts","../src/types/PublicationVolume.ts","../src/types/QuoteBlock.ts","../src/types/QuoteInline.ts","../src/types/ReplaceBlock.ts","../src/types/ReplaceInline.ts","../src/types/Review.ts","../src/types/Section.ts","../src/types/SoftwareApplication.ts","../src/types/SoftwareSourceCode.ts","../src/types/SoftwareSourceCodeOrSoftwareApplicationOrString.ts","../src/types/Strikeout.ts","../src/types/StringHint.ts","../src/types/StringOperation.ts","../src/types/StringPatch.ts","../src/types/StringPatchOrPrimitive.ts","../src/types/StringValidator.ts","../src/types/Strong.ts","../src/types/Styled.ts","../src/types/StyledBlock.ts","../src/types/StyledInline.ts","../src/types/Subscript.ts","../src/types/SuggestionBlockType.ts","../src/types/SuggestionInlineType.ts","../src/types/Superscript.ts","../src/types/Table.ts","../src/types/TableCell.ts","../src/types/TableRow.ts","../src/types/Text.ts","../src/types/ThematicBreak.ts","../src/types/Time.ts","../src/types/TimeValidator.ts","../src/types/Timestamp.ts","../src/types/TimestampValidator.ts","../src/types/TupleValidator.ts","../src/types/Underline.ts","../src/types/Unknown.ts","../src/types/Validator.ts","../src/types/Variable.ts","../src/types/VideoObject.ts","../src/blockType.ts","../src/executableType.ts","../src/inlineType.ts","../src/nodeType.ts"],"sourcesContent":["export * from \"./types/index.js\";\n\nexport { BlockType, BlockTypeList } from \"./blockType.js\";\nexport { ExecutableType, ExecutableTypeList } from \"./executableType.js\";\nexport { InlineType, InlineTypeList } from \"./inlineType.js\";\nexport { NodeType, NodeTypeList } from \"./nodeType.js\";\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\n/**\n * Abstract base type for compound (ie. non-atomic) nodes.\n */\nexport class Entity {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"Entity\";\n\n /**\n * The identifier for this item.\n */\n id?: string;\n\n constructor(options?: Partial<Entity>) {\n if (options) Object.assign(this, options);\n \n }\n}\n\n/**\n* Create a new `Entity`\n*/\nexport function entity(options?: Partial<Entity>): Entity {\n return new Entity(options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { AdmonitionType } from \"./AdmonitionType.js\";\nimport { Author } from \"./Author.js\";\nimport { Block } from \"./Block.js\";\nimport { Entity } from \"./Entity.js\";\nimport { Inline } from \"./Inline.js\";\n\n/**\n * A admonition within a document.\n */\nexport class Admonition extends Entity {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"Admonition\";\n\n /**\n * The type of admonition.\n */\n admonitionType: AdmonitionType;\n\n /**\n * The title of the admonition.\n */\n title?: Inline[];\n\n /**\n * Whether the admonition is folded.\n */\n isFolded?: boolean;\n\n /**\n * The content within the section.\n */\n content: Block[];\n\n /**\n * The authors of the admonition.\n */\n authors?: Author[];\n\n constructor(admonitionType: AdmonitionType, content: Block[], options?: Partial<Admonition>) {\n super();\n this.type = \"Admonition\";\n if (options) Object.assign(this, options);\n this.admonitionType = admonitionType;\n this.content = content;\n }\n}\n\n/**\n* Create a new `Admonition`\n*/\nexport function admonition(admonitionType: AdmonitionType, content: Block[], options?: Partial<Admonition>): Admonition {\n return new Admonition(admonitionType, content, options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { Entity } from \"./Entity.js\";\nimport { Integer } from \"./Integer.js\";\nimport { Primitive } from \"./Primitive.js\";\n\n/**\n * A hint to the content of an `Array`.\n */\nexport class ArrayHint extends Entity {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"ArrayHint\";\n\n /**\n * The length (number of items) of the array.\n */\n length: Integer;\n\n /**\n * The distinct types of the array items.\n */\n itemTypes?: string[];\n\n /**\n * The minimum value in the array.\n */\n minimum?: Primitive;\n\n /**\n * The maximum value in the array.\n */\n maximum?: Primitive;\n\n /**\n * The number of `Null` values in the array.\n */\n nulls?: Integer;\n\n constructor(length: Integer, options?: Partial<ArrayHint>) {\n super();\n this.type = \"ArrayHint\";\n if (options) Object.assign(this, options);\n this.length = length;\n }\n}\n\n/**\n* Create a new `ArrayHint`\n*/\nexport function arrayHint(length: Integer, options?: Partial<ArrayHint>): ArrayHint {\n return new ArrayHint(length, options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { Entity } from \"./Entity.js\";\nimport { Integer } from \"./Integer.js\";\nimport { Validator } from \"./Validator.js\";\n\n/**\n * A validator specifying constraints on an array node.\n */\nexport class ArrayValidator extends Entity {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"ArrayValidator\";\n\n /**\n * Whether items can have the value `Node::Null`\n */\n itemsNullable?: boolean;\n\n /**\n * Another validator node specifying the constraints on all items in the array.\n */\n itemsValidator?: Validator;\n\n /**\n * An array node is valid if at least one of its items is valid against the `contains` schema.\n */\n contains?: Validator;\n\n /**\n * An array node is valid if its size is greater than, or equal to, this value.\n */\n minItems?: Integer;\n\n /**\n * An array node is valid if its size is less than, or equal to, this value.\n */\n maxItems?: Integer;\n\n /**\n * A flag to indicate that each value in the array should be unique.\n */\n uniqueItems?: boolean;\n\n constructor(options?: Partial<ArrayValidator>) {\n super();\n this.type = \"ArrayValidator\";\n if (options) Object.assign(this, options);\n \n }\n}\n\n/**\n* Create a new `ArrayValidator`\n*/\nexport function arrayValidator(options?: Partial<ArrayValidator>): ArrayValidator {\n return new ArrayValidator(options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { Entity } from \"./Entity.js\";\nimport { ImageObject } from \"./ImageObject.js\";\nimport { PropertyValueOrString } from \"./PropertyValueOrString.js\";\nimport { Text } from \"./Text.js\";\n\n/**\n * The most generic type of item.\n */\nexport class Thing extends Entity {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"Thing\";\n\n /**\n * Alternate names (aliases) for the item.\n */\n alternateNames?: string[];\n\n /**\n * A description of the item.\n */\n description?: Text;\n\n /**\n * Any kind of identifier for any kind of Thing.\n */\n identifiers?: PropertyValueOrString[];\n\n /**\n * Images of the item.\n */\n images?: ImageObject[];\n\n /**\n * The name of the item.\n */\n name?: string;\n\n /**\n * The URL of the item.\n */\n url?: string;\n\n constructor(options?: Partial<Thing>) {\n super();\n this.type = \"Thing\";\n if (options) Object.assign(this, options);\n \n }\n}\n\n/**\n* Create a new `Thing`\n*/\nexport function thing(options?: Partial<Thing>): Thing {\n return new Thing(options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { Author } from \"./Author.js\";\nimport { Block } from \"./Block.js\";\nimport { Comment } from \"./Comment.js\";\nimport { CreativeWorkType } from \"./CreativeWorkType.js\";\nimport { CreativeWorkTypeOrText } from \"./CreativeWorkTypeOrText.js\";\nimport { Date } from \"./Date.js\";\nimport { GrantOrMonetaryGrant } from \"./GrantOrMonetaryGrant.js\";\nimport { Inline } from \"./Inline.js\";\nimport { Person } from \"./Person.js\";\nimport { PersonOrOrganization } from \"./PersonOrOrganization.js\";\nimport { StringOrNumber } from \"./StringOrNumber.js\";\nimport { Text } from \"./Text.js\";\nimport { Thing } from \"./Thing.js\";\nimport { ThingType } from \"./ThingType.js\";\n\n/**\n * A creative work, including books, movies, photographs, software programs, etc.\n */\nexport class CreativeWork extends Thing {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"CreativeWork\";\n\n /**\n * The subject matter of the content.\n */\n about?: ThingType[];\n\n /**\n * A a short description that summarizes a `CreativeWork`.\n */\n abstract?: Block[];\n\n /**\n * The authors of the `CreativeWork`.\n */\n authors?: Author[];\n\n /**\n * A secondary contributor to the `CreativeWork`.\n */\n contributors?: Author[];\n\n /**\n * People who edited the `CreativeWork`.\n */\n editors?: Person[];\n\n /**\n * The maintainers of the `CreativeWork`.\n */\n maintainers?: PersonOrOrganization[];\n\n /**\n * Comments about this creative work.\n */\n comments?: Comment[];\n\n /**\n * Date/time of creation.\n */\n dateCreated?: Date;\n\n /**\n * Date/time that work was received.\n */\n dateReceived?: Date;\n\n /**\n * Date/time of acceptance.\n */\n dateAccepted?: Date;\n\n /**\n * Date/time of most recent modification.\n */\n dateModified?: Date;\n\n /**\n * Date of first publication.\n */\n datePublished?: Date;\n\n /**\n * People or organizations that funded the `CreativeWork`.\n */\n funders?: PersonOrOrganization[];\n\n /**\n * Grants that funded the `CreativeWork`; reverse of `fundedItems`.\n */\n fundedBy?: GrantOrMonetaryGrant[];\n\n /**\n * Genre of the creative work, broadcast channel or group.\n */\n genre?: string[];\n\n /**\n * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas.\n */\n keywords?: string[];\n\n /**\n * An item or other CreativeWork that this CreativeWork is a part of.\n */\n isPartOf?: CreativeWorkType;\n\n /**\n * License documents that applies to this content, typically indicated by URL.\n */\n licenses?: CreativeWorkTypeOrText[];\n\n /**\n * Elements of the collection which can be a variety of different elements, such as Articles, Datatables, Tables and more.\n */\n parts?: CreativeWorkType[];\n\n /**\n * A publisher of the CreativeWork.\n */\n publisher?: PersonOrOrganization;\n\n /**\n * References to other creative works, such as another publication, web page, scholarly article, etc.\n */\n references?: CreativeWorkTypeOrText[];\n\n /**\n * The textual content of this creative work.\n */\n text?: Text;\n\n /**\n * The title of the creative work.\n */\n title?: Inline[];\n\n /**\n * The version of the creative work.\n */\n version?: StringOrNumber;\n\n constructor(options?: Partial<CreativeWork>) {\n super();\n this.type = \"CreativeWork\";\n if (options) Object.assign(this, options);\n \n }\n}\n\n/**\n* Create a new `CreativeWork`\n*/\nexport function creativeWork(options?: Partial<CreativeWork>): CreativeWork {\n return new CreativeWork(options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { Block } from \"./Block.js\";\nimport { CreativeWork } from \"./CreativeWork.js\";\nimport { IntegerOrString } from \"./IntegerOrString.js\";\n\n/**\n * An article, including news and scholarly articles.\n */\nexport class Article extends CreativeWork {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"Article\";\n\n /**\n * The content of the article.\n */\n content: Block[];\n\n /**\n * The page on which the article starts; for example \"135\" or \"xiii\".\n */\n pageStart?: IntegerOrString;\n\n /**\n * The page on which the article ends; for example \"138\" or \"xvi\".\n */\n pageEnd?: IntegerOrString;\n\n /**\n * Any description of pages that is not separated into pageStart and pageEnd; for example, \"1-6, 9, 55\".\n */\n pagination?: string;\n\n constructor(content: Block[], options?: Partial<Article>) {\n super();\n this.type = \"Article\";\n if (options) Object.assign(this, options);\n this.content = content;\n }\n}\n\n/**\n* Create a new `Article`\n*/\nexport function article(content: Block[], options?: Partial<Article>): Article {\n return new Article(content, options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { CreativeWork } from \"./CreativeWork.js\";\n\n/**\n * A media object, such as an image, video, or audio object embedded in a web page or a downloadable dataset.\n */\nexport class MediaObject extends CreativeWork {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"MediaObject\";\n\n /**\n * Bitrate in megabits per second (Mbit/s, Mb/s, Mbps).\n */\n bitrate?: number;\n\n /**\n * File size in megabits (Mbit, Mb).\n */\n contentSize?: number;\n\n /**\n * URL for the actual bytes of the media object, for example the image file or video file.\n */\n contentUrl: string;\n\n /**\n * URL that can be used to embed the media on a web page via a specific media player.\n */\n embedUrl?: string;\n\n /**\n * IANA media type (MIME type).\n */\n mediaType?: string;\n\n constructor(contentUrl: string, options?: Partial<MediaObject>) {\n super();\n this.type = \"MediaObject\";\n if (options) Object.assign(this, options);\n this.contentUrl = contentUrl;\n }\n}\n\n/**\n* Create a new `MediaObject`\n*/\nexport function mediaObject(contentUrl: string, options?: Partial<MediaObject>): MediaObject {\n return new MediaObject(contentUrl, options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { Inline } from \"./Inline.js\";\nimport { MediaObject } from \"./MediaObject.js\";\n\n/**\n * An audio file.\n */\nexport class AudioObject extends MediaObject {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"AudioObject\";\n\n /**\n * The caption for this audio recording.\n */\n caption?: Inline[];\n\n /**\n * The transcript of this audio recording.\n */\n transcript?: string;\n\n constructor(contentUrl: string, options?: Partial<AudioObject>) {\n super(contentUrl);\n this.type = \"AudioObject\";\n if (options) Object.assign(this, options);\n this.contentUrl = contentUrl;\n }\n}\n\n/**\n* Create a new `AudioObject`\n*/\nexport function audioObject(contentUrl: string, options?: Partial<AudioObject>): AudioObject {\n return new AudioObject(contentUrl, options);\n}\n","import * as types from \"./types/index.js\";\n\n/**\n * Hydrate a value to a class instance if appropriate\n *\n * @param value The value to hydrate into a class\n * @returns The value, hydrated into a class instance if appropriate\n */\nexport function hydrate(value: types.Node): types.Node {\n if (\n value == null ||\n typeof value !== \"object\" ||\n value instanceof types.Entity\n ) {\n return value as types.Node;\n }\n\n if (Array.isArray(value)) {\n for (let index = 0; index < value.length; index++) {\n // @ts-expect-error because hydrate returns any node type\n value[index] = hydrate(value[index] as types.Node);\n }\n return value;\n }\n\n if (typeof value.type === \"undefined\") {\n return value;\n }\n\n for (const prop in value) {\n // @ts-expect-error because hydrate returns any node type\n value[prop] = hydrate(value[prop]);\n }\n\n switch (value.type) {\n // Generated code, do not exit\n // TYPE-CASES:START\n case \"Admonition\":\n return Object.setPrototypeOf(value, types.Admonition.prototype);\n case \"ArrayHint\":\n return Object.setPrototypeOf(value, types.ArrayHint.prototype);\n case \"ArrayValidator\":\n return Object.setPrototypeOf(value, types.ArrayValidator.prototype);\n case \"Article\":\n return Object.setPrototypeOf(value, types.Article.prototype);\n case \"AudioObject\":\n return Object.setPrototypeOf(value, types.AudioObject.prototype);\n case \"AuthorRole\":\n return Object.setPrototypeOf(value, types.AuthorRole.prototype);\n case \"BooleanValidator\":\n return Object.setPrototypeOf(value, types.BooleanValidator.prototype);\n case \"Brand\":\n return Object.setPrototypeOf(value, types.Brand.prototype);\n case \"Button\":\n return Object.setPrototypeOf(value, types.Button.prototype);\n case \"CallArgument\":\n return Object.setPrototypeOf(value, types.CallArgument.prototype);\n case \"CallBlock\":\n return Object.setPrototypeOf(value, types.CallBlock.prototype);\n case \"Cite\":\n return Object.setPrototypeOf(value, types.Cite.prototype);\n case \"CiteGroup\":\n return Object.setPrototypeOf(value, types.CiteGroup.prototype);\n case \"Claim\":\n return Object.setPrototypeOf(value, types.Claim.prototype);\n case \"CodeBlock\":\n return Object.setPrototypeOf(value, types.CodeBlock.prototype);\n case \"CodeChunk\":\n return Object.setPrototypeOf(value, types.CodeChunk.prototype);\n case \"CodeExecutable\":\n return Object.setPrototypeOf(value, types.CodeExecutable.prototype);\n case \"CodeExpression\":\n return Object.setPrototypeOf(value, types.CodeExpression.prototype);\n case \"CodeInline\":\n return Object.setPrototypeOf(value, types.CodeInline.prototype);\n case \"CodeLocation\":\n return Object.setPrototypeOf(value, types.CodeLocation.prototype);\n case \"CodeStatic\":\n return Object.setPrototypeOf(value, types.CodeStatic.prototype);\n case \"Collection\":\n return Object.setPrototypeOf(value, types.Collection.prototype);\n case \"Comment\":\n return Object.setPrototypeOf(value, types.Comment.prototype);\n case \"CompilationDigest\":\n return Object.setPrototypeOf(value, types.CompilationDigest.prototype);\n case \"CompilationMessage\":\n return Object.setPrototypeOf(value, types.CompilationMessage.prototype);\n case \"ConstantValidator\":\n return Object.setPrototypeOf(value, types.ConstantValidator.prototype);\n case \"ContactPoint\":\n return Object.setPrototypeOf(value, types.ContactPoint.prototype);\n case \"CreativeWork\":\n return Object.setPrototypeOf(value, types.CreativeWork.prototype);\n case \"Datatable\":\n return Object.setPrototypeOf(value, types.Datatable.prototype);\n case \"DatatableColumn\":\n return Object.setPrototypeOf(value, types.DatatableColumn.prototype);\n case \"DatatableColumnHint\":\n return Object.setPrototypeOf(value, types.DatatableColumnHint.prototype);\n case \"DatatableHint\":\n return Object.setPrototypeOf(value, types.DatatableHint.prototype);\n case \"Date\":\n return Object.setPrototypeOf(value, types.Date.prototype);\n case \"DateTime\":\n return Object.setPrototypeOf(value, types.DateTime.prototype);\n case \"DateTimeValidator\":\n return Object.setPrototypeOf(value, types.DateTimeValidator.prototype);\n case \"DateValidator\":\n return Object.setPrototypeOf(value, types.DateValidator.prototype);\n case \"DefinedTerm\":\n return Object.setPrototypeOf(value, types.DefinedTerm.prototype);\n case \"DeleteBlock\":\n return Object.setPrototypeOf(value, types.DeleteBlock.prototype);\n case \"DeleteInline\":\n return Object.setPrototypeOf(value, types.DeleteInline.prototype);\n case \"Directory\":\n return Object.setPrototypeOf(value, types.Directory.prototype);\n case \"Duration\":\n return Object.setPrototypeOf(value, types.Duration.prototype);\n case \"DurationValidator\":\n return Object.setPrototypeOf(value, types.DurationValidator.prototype);\n case \"Emphasis\":\n return Object.setPrototypeOf(value, types.Emphasis.prototype);\n case \"Entity\":\n return Object.setPrototypeOf(value, types.Entity.prototype);\n case \"EnumValidator\":\n return Object.setPrototypeOf(value, types.EnumValidator.prototype);\n case \"Enumeration\":\n return Object.setPrototypeOf(value, types.Enumeration.prototype);\n case \"Executable\":\n return Object.setPrototypeOf(value, types.Executable.prototype);\n case \"ExecutionDependant\":\n return Object.setPrototypeOf(value, types.ExecutionDependant.prototype);\n case \"ExecutionDependency\":\n return Object.setPrototypeOf(value, types.ExecutionDependency.prototype);\n case \"ExecutionMessage\":\n return Object.setPrototypeOf(value, types.ExecutionMessage.prototype);\n case \"ExecutionTag\":\n return Object.setPrototypeOf(value, types.ExecutionTag.prototype);\n case \"Figure\":\n return Object.setPrototypeOf(value, types.Figure.prototype);\n case \"File\":\n return Object.setPrototypeOf(value, types.File.prototype);\n case \"ForBlock\":\n return Object.setPrototypeOf(value, types.ForBlock.prototype);\n case \"Form\":\n return Object.setPrototypeOf(value, types.Form.prototype);\n case \"Function\":\n return Object.setPrototypeOf(value, types.Function.prototype);\n case \"Grant\":\n return Object.setPrototypeOf(value, types.Grant.prototype);\n case \"Heading\":\n return Object.setPrototypeOf(value, types.Heading.prototype);\n case \"IfBlock\":\n return Object.setPrototypeOf(value, types.IfBlock.prototype);\n case \"IfBlockClause\":\n return Object.setPrototypeOf(value, types.IfBlockClause.prototype);\n case \"ImageObject\":\n return Object.setPrototypeOf(value, types.ImageObject.prototype);\n case \"IncludeBlock\":\n return Object.setPrototypeOf(value, types.IncludeBlock.prototype);\n case \"InsertBlock\":\n return Object.setPrototypeOf(value, types.InsertBlock.prototype);\n case \"InsertInline\":\n return Object.setPrototypeOf(value, types.InsertInline.prototype);\n case \"Instruction\":\n return Object.setPrototypeOf(value, types.Instruction.prototype);\n case \"InstructionBlock\":\n return Object.setPrototypeOf(value, types.InstructionBlock.prototype);\n case \"InstructionInline\":\n return Object.setPrototypeOf(value, types.InstructionInline.prototype);\n case \"InstructionMessage\":\n return Object.setPrototypeOf(value, types.InstructionMessage.prototype);\n case \"IntegerValidator\":\n return Object.setPrototypeOf(value, types.IntegerValidator.prototype);\n case \"Link\":\n return Object.setPrototypeOf(value, types.Link.prototype);\n case \"List\":\n return Object.setPrototypeOf(value, types.List.prototype);\n case \"ListItem\":\n return Object.setPrototypeOf(value, types.ListItem.prototype);\n case \"Mark\":\n return Object.setPrototypeOf(value, types.Mark.prototype);\n case \"Math\":\n return Object.setPrototypeOf(value, types.Math.prototype);\n case \"MathBlock\":\n return Object.setPrototypeOf(value, types.MathBlock.prototype);\n case \"MathInline\":\n return Object.setPrototypeOf(value, types.MathInline.prototype);\n case \"MediaObject\":\n return Object.setPrototypeOf(value, types.MediaObject.prototype);\n case \"ModifyBlock\":\n return Object.setPrototypeOf(value, types.ModifyBlock.prototype);\n case \"ModifyInline\":\n return Object.setPrototypeOf(value, types.ModifyInline.prototype);\n case \"ModifyOperation\":\n return Object.setPrototypeOf(value, types.ModifyOperation.prototype);\n case \"MonetaryGrant\":\n return Object.setPrototypeOf(value, types.MonetaryGrant.prototype);\n case \"Note\":\n return Object.setPrototypeOf(value, types.Note.prototype);\n case \"NumberValidator\":\n return Object.setPrototypeOf(value, types.NumberValidator.prototype);\n case \"ObjectHint\":\n return Object.setPrototypeOf(value, types.ObjectHint.prototype);\n case \"Organization\":\n return Object.setPrototypeOf(value, types.Organization.prototype);\n case \"Paragraph\":\n return Object.setPrototypeOf(value, types.Paragraph.prototype);\n case \"Parameter\":\n return Object.setPrototypeOf(value, types.Parameter.prototype);\n case \"Periodical\":\n return Object.setPrototypeOf(value, types.Periodical.prototype);\n case \"Person\":\n return Object.setPrototypeOf(value, types.Person.prototype);\n case \"PostalAddress\":\n return Object.setPrototypeOf(value, types.PostalAddress.prototype);\n case \"Product\":\n return Object.setPrototypeOf(value, types.Product.prototype);\n case \"PropertyValue\":\n return Object.setPrototypeOf(value, types.PropertyValue.prototype);\n case \"PublicationIssue\":\n return Object.setPrototypeOf(value, types.PublicationIssue.prototype);\n case \"PublicationVolume\":\n return Object.setPrototypeOf(value, types.PublicationVolume.prototype);\n case \"QuoteBlock\":\n return Object.setPrototypeOf(value, types.QuoteBlock.prototype);\n case \"QuoteInline\":\n return Object.setPrototypeOf(value, types.QuoteInline.prototype);\n case \"ReplaceBlock\":\n return Object.setPrototypeOf(value, types.ReplaceBlock.prototype);\n case \"ReplaceInline\":\n return Object.setPrototypeOf(value, types.ReplaceInline.prototype);\n case \"Review\":\n return Object.setPrototypeOf(value, types.Review.prototype);\n case \"Role\":\n return Object.setPrototypeOf(value, types.Role.prototype);\n case \"Section\":\n return Object.setPrototypeOf(value, types.Section.prototype);\n case \"SoftwareApplication\":\n return Object.setPrototypeOf(value, types.SoftwareApplication.prototype);\n case \"SoftwareSourceCode\":\n return Object.setPrototypeOf(value, types.SoftwareSourceCode.prototype);\n case \"Strikeout\":\n return Object.setPrototypeOf(value, types.Strikeout.prototype);\n case \"StringHint\":\n return Object.setPrototypeOf(value, types.StringHint.prototype);\n case \"StringOperation\":\n return Object.setPrototypeOf(value, types.StringOperation.prototype);\n case \"StringPatch\":\n return Object.setPrototypeOf(value, types.StringPatch.prototype);\n case \"StringValidator\":\n return Object.setPrototypeOf(value, types.StringValidator.prototype);\n case \"Strong\":\n return Object.setPrototypeOf(value, types.Strong.prototype);\n case \"Styled\":\n return Object.setPrototypeOf(value, types.Styled.prototype);\n case \"StyledBlock\":\n return Object.setPrototypeOf(value, types.StyledBlock.prototype);\n case \"StyledInline\":\n return Object.setPrototypeOf(value, types.StyledInline.prototype);\n case \"Subscript\":\n return Object.setPrototypeOf(value, types.Subscript.prototype);\n case \"Suggestion\":\n return Object.setPrototypeOf(value, types.Suggestion.prototype);\n case \"SuggestionBlock\":\n return Object.setPrototypeOf(value, types.SuggestionBlock.prototype);\n case \"SuggestionInline\":\n return Object.setPrototypeOf(value, types.SuggestionInline.prototype);\n case \"Superscript\":\n return Object.setPrototypeOf(value, types.Superscript.prototype);\n case \"Table\":\n return Object.setPrototypeOf(value, types.Table.prototype);\n case \"TableCell\":\n return Object.setPrototypeOf(value, types.TableCell.prototype);\n case \"TableRow\":\n return Object.setPrototypeOf(value, types.TableRow.prototype);\n case \"Text\":\n return Object.setPrototypeOf(value, types.Text.prototype);\n case \"ThematicBreak\":\n return Object.setPrototypeOf(value, types.ThematicBreak.prototype);\n case \"Thing\":\n return Object.setPrototypeOf(value, types.Thing.prototype);\n case \"Time\":\n return Object.setPrototypeOf(value, types.Time.prototype);\n case \"TimeValidator\":\n return Object.setPrototypeOf(value, types.TimeValidator.prototype);\n case \"Timestamp\":\n return Object.setPrototypeOf(value, types.Timestamp.prototype);\n case \"TimestampValidator\":\n return Object.setPrototypeOf(value, types.TimestampValidator.prototype);\n case \"TupleValidator\":\n return Object.setPrototypeOf(value, types.TupleValidator.prototype);\n case \"Underline\":\n return Object.setPrototypeOf(value, types.Underline.prototype);\n case \"Unknown\":\n return Object.setPrototypeOf(value, types.Unknown.prototype);\n case \"Variable\":\n return Object.setPrototypeOf(value, types.Variable.prototype);\n case \"VideoObject\":\n return Object.setPrototypeOf(value, types.VideoObject.prototype);\n // TYPE-CASES:STOP\n default:\n return value;\n }\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { hydrate } from \"../hydrate.js\";\n\nimport { type AuthorRole } from \"./AuthorRole.js\";\nimport { type Organization } from \"./Organization.js\";\nimport { type Person } from \"./Person.js\";\nimport { type SoftwareApplication } from \"./SoftwareApplication.js\";\n\n/**\n * Union type for things that can be an author of a `CreativeWork` or other type.\n */\nexport type Author =\n Person |\n Organization |\n SoftwareApplication |\n AuthorRole;\n\n/**\n * Create a `Author` from an object\n */\nexport function author(other: Author): Author {\n switch(other.type) {\n case \"Person\":\n case \"Organization\":\n case \"SoftwareApplication\":\n case \"AuthorRole\":\n return hydrate(other) as Author\n default:\n // @ts-expect-error that this can never happen because this function may be used in weakly-typed JavaScript\n throw new Error(`Unexpected type for Author: ${other.type}`);\n }\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { Entity } from \"./Entity.js\";\n\n/**\n * Represents additional information about a relationship or property.\n */\nexport class Role extends Entity {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"Role\";\n\n constructor(options?: Partial<Role>) {\n super();\n this.type = \"Role\";\n if (options) Object.assign(this, options);\n \n }\n}\n\n/**\n* Create a new `Role`\n*/\nexport function role(options?: Partial<Role>): Role {\n return new Role(options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { AuthorRoleName } from \"./AuthorRoleName.js\";\nimport { PersonOrOrganizationOrSoftwareApplication } from \"./PersonOrOrganizationOrSoftwareApplication.js\";\nimport { Role } from \"./Role.js\";\n\n/**\n * An author and their role.\n */\nexport class AuthorRole extends Role {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"AuthorRole\";\n\n /**\n * The author.\n */\n author: PersonOrOrganizationOrSoftwareApplication;\n\n /**\n * A role played by the author.\n */\n roleName: AuthorRoleName;\n\n constructor(author: PersonOrOrganizationOrSoftwareApplication, roleName: AuthorRoleName, options?: Partial<AuthorRole>) {\n super();\n this.type = \"AuthorRole\";\n if (options) Object.assign(this, options);\n this.author = author;\n this.roleName = roleName;\n }\n}\n\n/**\n* Create a new `AuthorRole`\n*/\nexport function authorRole(author: PersonOrOrganizationOrSoftwareApplication, roleName: AuthorRoleName, options?: Partial<AuthorRole>): AuthorRole {\n return new AuthorRole(author, roleName, options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { hydrate } from \"../hydrate.js\";\n\nimport { type Admonition } from \"./Admonition.js\";\nimport { type CallBlock } from \"./CallBlock.js\";\nimport { type Claim } from \"./Claim.js\";\nimport { type CodeBlock } from \"./CodeBlock.js\";\nimport { type CodeChunk } from \"./CodeChunk.js\";\nimport { type DeleteBlock } from \"./DeleteBlock.js\";\nimport { type Figure } from \"./Figure.js\";\nimport { type ForBlock } from \"./ForBlock.js\";\nimport { type Form } from \"./Form.js\";\nimport { type Heading } from \"./Heading.js\";\nimport { type IfBlock } from \"./IfBlock.js\";\nimport { type IncludeBlock } from \"./IncludeBlock.js\";\nimport { type InsertBlock } from \"./InsertBlock.js\";\nimport { type InstructionBlock } from \"./InstructionBlock.js\";\nimport { type List } from \"./List.js\";\nimport { type MathBlock } from \"./MathBlock.js\";\nimport { type ModifyBlock } from \"./ModifyBlock.js\";\nimport { type Paragraph } from \"./Paragraph.js\";\nimport { type QuoteBlock } from \"./QuoteBlock.js\";\nimport { type ReplaceBlock } from \"./ReplaceBlock.js\";\nimport { type Section } from \"./Section.js\";\nimport { type StyledBlock } from \"./StyledBlock.js\";\nimport { type Table } from \"./Table.js\";\nimport { type ThematicBreak } from \"./ThematicBreak.js\";\n\n/**\n * Union type in block content node types.\n */\nexport type Block =\n Admonition |\n CallBlock |\n Claim |\n CodeBlock |\n CodeChunk |\n DeleteBlock |\n Figure |\n ForBlock |\n Form |\n Heading |\n IfBlock |\n IncludeBlock |\n InsertBlock |\n InstructionBlock |\n List |\n MathBlock |\n ModifyBlock |\n Paragraph |\n QuoteBlock |\n ReplaceBlock |\n Section |\n StyledBlock |\n Table |\n ThematicBreak;\n\n/**\n * Create a `Block` from an object\n */\nexport function block(other: Block): Block {\n switch(other.type) {\n case \"Admonition\":\n case \"CallBlock\":\n case \"Claim\":\n case \"CodeBlock\":\n case \"CodeChunk\":\n case \"DeleteBlock\":\n case \"Figure\":\n case \"ForBlock\":\n case \"Form\":\n case \"Heading\":\n case \"IfBlock\":\n case \"IncludeBlock\":\n case \"InsertBlock\":\n case \"InstructionBlock\":\n case \"List\":\n case \"MathBlock\":\n case \"ModifyBlock\":\n case \"Paragraph\":\n case \"QuoteBlock\":\n case \"ReplaceBlock\":\n case \"Section\":\n case \"StyledBlock\":\n case \"Table\":\n case \"ThematicBreak\":\n return hydrate(other) as Block\n default:\n // @ts-expect-error that this can never happen because this function may be used in weakly-typed JavaScript\n throw new Error(`Unexpected type for Block: ${other.type}`);\n }\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { Entity } from \"./Entity.js\";\n\n/**\n * A schema specifying that a node must be a boolean value.\n */\nexport class BooleanValidator extends Entity {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"BooleanValidator\";\n\n constructor(options?: Partial<BooleanValidator>) {\n super();\n this.type = \"BooleanValidator\";\n if (options) Object.assign(this, options);\n \n }\n}\n\n/**\n* Create a new `BooleanValidator`\n*/\nexport function booleanValidator(options?: Partial<BooleanValidator>): BooleanValidator {\n return new BooleanValidator(options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { ImageObject } from \"./ImageObject.js\";\nimport { Thing } from \"./Thing.js\";\n\n/**\n * A brand used by an organization or person for labeling a product, product group, or similar.\n */\nexport class Brand extends Thing {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"Brand\";\n\n /**\n * The name of the item.\n */\n name: string;\n\n /**\n * A logo associated with the brand.\n */\n logo?: ImageObject;\n\n /**\n * Reviews of the brand.\n */\n reviews?: string[];\n\n constructor(name: string, options?: Partial<Brand>) {\n super();\n this.type = \"Brand\";\n if (options) Object.assign(this, options);\n this.name = name;\n }\n}\n\n/**\n* Create a new `Brand`\n*/\nexport function brand(name: string, options?: Partial<Brand>): Brand {\n return new Brand(name, options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { AutomaticExecution } from \"./AutomaticExecution.js\";\nimport { CompilationDigest } from \"./CompilationDigest.js\";\nimport { CompilationMessage } from \"./CompilationMessage.js\";\nimport { Duration } from \"./Duration.js\";\nimport { Entity } from \"./Entity.js\";\nimport { ExecutionDependant } from \"./ExecutionDependant.js\";\nimport { ExecutionDependency } from \"./ExecutionDependency.js\";\nimport { ExecutionMessage } from \"./ExecutionMessage.js\";\nimport { ExecutionRequired } from \"./ExecutionRequired.js\";\nimport { ExecutionStatus } from \"./ExecutionStatus.js\";\nimport { ExecutionTag } from \"./ExecutionTag.js\";\nimport { Integer } from \"./Integer.js\";\nimport { Timestamp } from \"./Timestamp.js\";\n\n/**\n * Abstract base type for executable nodes (e.g. `CodeChunk`, `CodeExpression`, `Call`).\n */\nexport class Executable extends Entity {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"Executable\";\n\n /**\n * Under which circumstances the code should be automatically executed.\n */\n autoExec?: AutomaticExecution;\n\n /**\n * A digest of the content, semantics and dependencies of the node.\n */\n compilationDigest?: CompilationDigest;\n\n /**\n * Messages generated while compiling the code.\n */\n compilationMessages?: CompilationMessage[];\n\n /**\n * The `compilationDigest` of the node when it was last executed.\n */\n executionDigest?: CompilationDigest;\n\n /**\n * The upstream dependencies of this node.\n */\n executionDependencies?: ExecutionDependency[];\n\n /**\n * The downstream dependants of this node.\n */\n executionDependants?: ExecutionDependant[];\n\n /**\n * Tags in the code which affect its execution.\n */\n executionTags?: ExecutionTag[];\n\n /**\n * A count of the number of times that the node has been executed.\n */\n executionCount?: Integer;\n\n /**\n * Whether, and why, the code requires execution or re-execution.\n */\n executionRequired?: ExecutionRequired;\n\n /**\n * Status of the most recent, including any current, execution.\n */\n executionStatus?: ExecutionStatus;\n\n /**\n * The id of the actor that the node was last executed by.\n */\n executionActor?: string;\n\n /**\n * The timestamp when the last execution ended.\n */\n executionEnded?: Timestamp;\n\n /**\n * Duration of the last execution.\n */\n executionDuration?: Duration;\n\n /**\n * Messages emitted while executing the node.\n */\n executionMessages?: ExecutionMessage[];\n\n constructor(options?: Partial<Executable>) {\n super();\n this.type = \"Executable\";\n if (options) Object.assign(this, options);\n \n }\n}\n\n/**\n* Create a new `Executable`\n*/\nexport function executable(options?: Partial<Executable>): Executable {\n return new Executable(options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { Author } from \"./Author.js\";\nimport { Cord } from \"./Cord.js\";\nimport { Executable } from \"./Executable.js\";\n\n/**\n * Abstract base type for executable code nodes (e.g. `CodeChunk`).\n */\nexport class CodeExecutable extends Executable {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"CodeExecutable\";\n\n /**\n * The code.\n */\n code: Cord;\n\n /**\n * The programming language of the code.\n */\n programmingLanguage?: string;\n\n /**\n * The authors of the executable code.\n */\n authors?: Author[];\n\n constructor(code: Cord, options?: Partial<CodeExecutable>) {\n super();\n this.type = \"CodeExecutable\";\n if (options) Object.assign(this, options);\n this.code = code;\n }\n}\n\n/**\n* Create a new `CodeExecutable`\n*/\nexport function codeExecutable(code: Cord, options?: Partial<CodeExecutable>): CodeExecutable {\n return new CodeExecutable(code, options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { CodeExecutable } from \"./CodeExecutable.js\";\nimport { Cord } from \"./Cord.js\";\n\n/**\n * A button.\n */\nexport class Button extends CodeExecutable {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"Button\";\n\n /**\n * The name of the variable associated with the button.\n */\n name: string;\n\n /**\n * A label for the button\n */\n label?: string;\n\n /**\n * Whether the button is currently disabled\n */\n isDisabled?: boolean;\n\n constructor(code: Cord, name: string, options?: Partial<Button>) {\n super(code);\n this.type = \"Button\";\n if (options) Object.assign(this, options);\n this.code = code;\n this.name = name;\n }\n}\n\n/**\n* Create a new `Button`\n*/\nexport function button(code: Cord, name: string, options?: Partial<Button>): Button {\n return new Button(code, name, options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { Executable } from \"./Executable.js\";\nimport { Node } from \"./Node.js\";\nimport { Validator } from \"./Validator.js\";\n\n/**\n * A parameter of a document.\n */\nexport class Parameter extends Executable {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"Parameter\";\n\n /**\n * The name of the parameter.\n */\n name: string;\n\n /**\n * A short label for the parameter.\n */\n label?: string;\n\n /**\n * The current value of the parameter.\n */\n value?: Node;\n\n /**\n * The default value of the parameter.\n */\n default?: Node;\n\n /**\n * The validator that the value is validated against.\n */\n validator?: Validator;\n\n /**\n * The dotted path to the object (e.g. a database table column) that the parameter should be derived from\n */\n derivedFrom?: string;\n\n constructor(name: string, options?: Partial<Parameter>) {\n super();\n this.type = \"Parameter\";\n if (options) Object.assign(this, options);\n this.name = name;\n }\n}\n\n/**\n* Create a new `Parameter`\n*/\nexport function parameter(name: string, options?: Partial<Parameter>): Parameter {\n return new Parameter(name, options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { Cord } from \"./Cord.js\";\nimport { Parameter } from \"./Parameter.js\";\n\n/**\n * The value of a `Parameter` to call a document with.\n */\nexport class CallArgument extends Parameter {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"CallArgument\";\n\n /**\n * The code to be evaluated for the parameter.\n */\n code: Cord;\n\n /**\n * The programming language of the code.\n */\n programmingLanguage?: string;\n\n constructor(name: string, code: Cord, options?: Partial<CallArgument>) {\n super(name);\n this.type = \"CallArgument\";\n if (options) Object.assign(this, options);\n this.name = name;\n this.code = code;\n }\n}\n\n/**\n* Create a new `CallArgument`\n*/\nexport function callArgument(name: string, code: Cord, options?: Partial<CallArgument>): CallArgument {\n return new CallArgument(name, code, options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { Block } from \"./Block.js\";\nimport { Executable } from \"./Executable.js\";\n\n/**\n * Include block content from an external source (e.g. file, URL).\n */\nexport class IncludeBlock extends Executable {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"IncludeBlock\";\n\n /**\n * The external source of the content, a file path or URL.\n */\n source: string;\n\n /**\n * Media type of the source content.\n */\n mediaType?: string;\n\n /**\n * A query to select a subset of content from the source\n */\n select?: string;\n\n /**\n * The structured content decoded from the source.\n */\n content?: Block[];\n\n constructor(source: string, options?: Partial<IncludeBlock>) {\n super();\n this.type = \"IncludeBlock\";\n if (options) Object.assign(this, options);\n this.source = source;\n }\n}\n\n/**\n* Create a new `IncludeBlock`\n*/\nexport function includeBlock(source: string, options?: Partial<IncludeBlock>): IncludeBlock {\n return new IncludeBlock(source, options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { CallArgument } from \"./CallArgument.js\";\nimport { IncludeBlock } from \"./IncludeBlock.js\";\n\n/**\n * Call another document, optionally with arguments, and include its executed content.\n */\nexport class CallBlock extends IncludeBlock {\n // @ts-expect-error 'not assignable to the same property in base type'\n type: \"CallBlock\";\n\n /**\n * The value of the source document's parameters to call it with\n */\n arguments: CallArgument[];\n\n constructor(source: string, args: CallArgument[], options?: Partial<CallBlock>) {\n super(source);\n this.type = \"CallBlock\";\n if (options) Object.assign(this, options);\n this.source = source;\n this.arguments = args;\n }\n}\n\n/**\n* Create a new `CallBlock`\n*/\nexport function callBlock(source: string, args: CallArgument[], options?: Partial<CallBlock>): CallBlock {\n return new CallBlock(source, args, options);\n}\n","// Generated file; do not edit. See https://github.com/stencila/stencila/tree/main/rust/schema-gen\n\nimport { CitationIntent } from \"./CitationIntent.js\";\nimport { CitationMode } from \"./CitationMode.js\";\nimport { Entity } from \"./Entity.js\";\nimport { Inline } from \"./Inline.js\";\nimport { IntegerOrString } from \"./IntegerOrString.js\";\n\n/**\n * A reference to a `CreativeWork` that is cited in another `CreativeWork`.\n */\nexport class Cite ex