UNPKG

61.1 kBJavaScriptView Raw
1import fs from 'fs';
2import path from 'path';
3
4function _extends() {
5 _extends = Object.assign || function (target) {
6 for (var i = 1; i < arguments.length; i++) {
7 var source = arguments[i];
8
9 for (var key in source) {
10 if (Object.prototype.hasOwnProperty.call(source, key)) {
11 target[key] = source[key];
12 }
13 }
14 }
15
16 return target;
17 };
18
19 return _extends.apply(this, arguments);
20}
21
22/* eslint-disable */
23// Remove properties from an Object if their value is undefined
24const compact = o => Object.entries(o).reduce((compactedO, [k, v]) => v === undefined ? compactedO : _extends({}, compactedO, {
25 [k]: v
26}), {});
27/**
28 * Create a `Entity` node
29 * @param props Object containing Entity schema properties as key/value pairs
30 * @returns {Entity} Entity schema node
31 */
32
33
34const entity = (props = {}) => _extends({}, compact(props), {
35 type: 'Entity'
36});
37/**
38 * Create a `Cite` node
39 * @param props Object containing Cite schema properties as key/value pairs
40 * @returns {Cite} Cite schema node
41 */
42
43const cite = props => _extends({}, compact(props), {
44 type: 'Cite'
45});
46/**
47 * Create a `CiteGroup` node
48 * @param props Object containing CiteGroup schema properties as key/value pairs
49 * @returns {CiteGroup} CiteGroup schema node
50 */
51
52const citeGroup = props => _extends({}, compact(props), {
53 type: 'CiteGroup'
54});
55/**
56 * Create a `Code` node
57 * @param props Object containing Code schema properties as key/value pairs
58 * @returns {Code} Code schema node
59 */
60
61const code = props => _extends({}, compact(props), {
62 type: 'Code'
63});
64/**
65 * Create a `CodeBlock` node
66 * @param props Object containing CodeBlock schema properties as key/value pairs
67 * @returns {CodeBlock} CodeBlock schema node
68 */
69
70const codeBlock = props => _extends({}, compact(props), {
71 type: 'CodeBlock'
72});
73/**
74 * Create a `CodeExecutable` node
75 * @param props Object containing CodeExecutable schema properties as key/value pairs
76 * @returns {CodeExecutable} CodeExecutable schema node
77 */
78
79const codeExecutable = props => _extends({}, compact(props), {
80 type: 'CodeExecutable'
81});
82/**
83 * Create a `CodeChunk` node
84 * @param props Object containing CodeChunk schema properties as key/value pairs
85 * @returns {CodeChunk} CodeChunk schema node
86 */
87
88const codeChunk = props => _extends({}, compact(props), {
89 type: 'CodeChunk'
90});
91/**
92 * Create a `CodeExpression` node
93 * @param props Object containing CodeExpression schema properties as key/value pairs
94 * @returns {CodeExpression} CodeExpression schema node
95 */
96
97const codeExpression = props => _extends({}, compact(props), {
98 type: 'CodeExpression'
99});
100/**
101 * Create a `CodeFragment` node
102 * @param props Object containing CodeFragment schema properties as key/value pairs
103 * @returns {CodeFragment} CodeFragment schema node
104 */
105
106const codeFragment = props => _extends({}, compact(props), {
107 type: 'CodeFragment'
108});
109/**
110 * Create a `CodeError` node
111 * @param props Object containing CodeError schema properties as key/value pairs
112 * @returns {CodeError} CodeError schema node
113 */
114
115const codeError = props => _extends({}, compact(props), {
116 type: 'CodeError'
117});
118/**
119 * Create a `Date` node
120 * @param props Object containing Date schema properties as key/value pairs
121 * @returns {Date} Date schema node
122 */
123
124const date = props => _extends({}, compact(props), {
125 type: 'Date'
126});
127/**
128 * Create a `Mark` node
129 * @param props Object containing Mark schema properties as key/value pairs
130 * @returns {Mark} Mark schema node
131 */
132
133const mark = props => _extends({}, compact(props), {
134 type: 'Mark'
135});
136/**
137 * Create a `Delete` node
138 * @param props Object containing Delete schema properties as key/value pairs
139 * @returns {Delete} Delete schema node
140 */
141
142const del = props => _extends({}, compact(props), {
143 type: 'Delete'
144});
145/**
146 * Create a `Emphasis` node
147 * @param props Object containing Emphasis schema properties as key/value pairs
148 * @returns {Emphasis} Emphasis schema node
149 */
150
151const emphasis = props => _extends({}, compact(props), {
152 type: 'Emphasis'
153});
154/**
155 * Create a `Thing` node
156 * @param props Object containing Thing schema properties as key/value pairs
157 * @returns {Thing} Thing schema node
158 */
159
160const thing = (props = {}) => _extends({}, compact(props), {
161 type: 'Thing'
162});
163/**
164 * Create a `Brand` node
165 * @param props Object containing Brand schema properties as key/value pairs
166 * @returns {Brand} Brand schema node
167 */
168
169const brand = props => _extends({}, compact(props), {
170 type: 'Brand'
171});
172/**
173 * Create a `ContactPoint` node
174 * @param props Object containing ContactPoint schema properties as key/value pairs
175 * @returns {ContactPoint} ContactPoint schema node
176 */
177
178const contactPoint = (props = {}) => _extends({}, compact(props), {
179 type: 'ContactPoint'
180});
181/**
182 * Create a `CreativeWork` node
183 * @param props Object containing CreativeWork schema properties as key/value pairs
184 * @returns {CreativeWork} CreativeWork schema node
185 */
186
187const creativeWork = (props = {}) => _extends({}, compact(props), {
188 type: 'CreativeWork'
189});
190/**
191 * Create a `Article` node
192 * @param props Object containing Article schema properties as key/value pairs
193 * @returns {Article} Article schema node
194 */
195
196const article = (props = {}) => _extends({}, compact(props), {
197 type: 'Article'
198});
199/**
200 * Create a `Claim` node
201 * @param props Object containing Claim schema properties as key/value pairs
202 * @returns {Claim} Claim schema node
203 */
204
205const claim = props => _extends({}, compact(props), {
206 type: 'Claim'
207});
208/**
209 * Create a `Collection` node
210 * @param props Object containing Collection schema properties as key/value pairs
211 * @returns {Collection} Collection schema node
212 */
213
214const collection = props => _extends({}, compact(props), {
215 type: 'Collection'
216});
217/**
218 * Create a `Comment` node
219 * @param props Object containing Comment schema properties as key/value pairs
220 * @returns {Comment} Comment schema node
221 */
222
223const comment = (props = {}) => _extends({}, compact(props), {
224 type: 'Comment'
225});
226/**
227 * Create a `Datatable` node
228 * @param props Object containing Datatable schema properties as key/value pairs
229 * @returns {Datatable} Datatable schema node
230 */
231
232const datatable = props => _extends({}, compact(props), {
233 type: 'Datatable'
234});
235/**
236 * Create a `MediaObject` node
237 * @param props Object containing MediaObject schema properties as key/value pairs
238 * @returns {MediaObject} MediaObject schema node
239 */
240
241const mediaObject = props => _extends({}, compact(props), {
242 type: 'MediaObject'
243});
244/**
245 * Create a `AudioObject` node
246 * @param props Object containing AudioObject schema properties as key/value pairs
247 * @returns {AudioObject} AudioObject schema node
248 */
249
250const audioObject = props => _extends({}, compact(props), {
251 type: 'AudioObject'
252});
253/**
254 * Create a `DatatableColumn` node
255 * @param props Object containing DatatableColumn schema properties as key/value pairs
256 * @returns {DatatableColumn} DatatableColumn schema node
257 */
258
259const datatableColumn = props => _extends({}, compact(props), {
260 type: 'DatatableColumn'
261});
262/**
263 * Create a `DefinedTerm` node
264 * @param props Object containing DefinedTerm schema properties as key/value pairs
265 * @returns {DefinedTerm} DefinedTerm schema node
266 */
267
268const definedTerm = props => _extends({}, compact(props), {
269 type: 'DefinedTerm'
270});
271/**
272 * Create a `Validator` node
273 * @param props Object containing Validator schema properties as key/value pairs
274 * @returns {Validator} Validator schema node
275 */
276
277const validator = (props = {}) => _extends({}, compact(props), {
278 type: 'Validator'
279});
280/**
281 * Create a `ArrayValidator` node
282 * @param props Object containing ArrayValidator schema properties as key/value pairs
283 * @returns {ArrayValidator} ArrayValidator schema node
284 */
285
286const arrayValidator = (props = {}) => _extends({}, compact(props), {
287 type: 'ArrayValidator'
288});
289/**
290 * Create a `BooleanValidator` node
291 * @param props Object containing BooleanValidator schema properties as key/value pairs
292 * @returns {BooleanValidator} BooleanValidator schema node
293 */
294
295const booleanValidator = (props = {}) => _extends({}, compact(props), {
296 type: 'BooleanValidator'
297});
298/**
299 * Create a `ConstantValidator` node
300 * @param props Object containing ConstantValidator schema properties as key/value pairs
301 * @returns {ConstantValidator} ConstantValidator schema node
302 */
303
304const constantValidator = (props = {}) => _extends({}, compact(props), {
305 type: 'ConstantValidator'
306});
307/**
308 * Create a `EnumValidator` node
309 * @param props Object containing EnumValidator schema properties as key/value pairs
310 * @returns {EnumValidator} EnumValidator schema node
311 */
312
313const enumValidator = (props = {}) => _extends({}, compact(props), {
314 type: 'EnumValidator'
315});
316/**
317 * Create a `Enumeration` node
318 * @param props Object containing Enumeration schema properties as key/value pairs
319 * @returns {Enumeration} Enumeration schema node
320 */
321
322const enumeration = (props = {}) => _extends({}, compact(props), {
323 type: 'Enumeration'
324});
325/**
326 * Create a `Figure` node
327 * @param props Object containing Figure schema properties as key/value pairs
328 * @returns {Figure} Figure schema node
329 */
330
331const figure = (props = {}) => _extends({}, compact(props), {
332 type: 'Figure'
333});
334/**
335 * Create a `Function` node
336 * @param props Object containing Function schema properties as key/value pairs
337 * @returns {Function} Function schema node
338 */
339
340const function_ = (props = {}) => _extends({}, compact(props), {
341 type: 'Function'
342});
343/**
344 * Create a `Grant` node
345 * @param props Object containing Grant schema properties as key/value pairs
346 * @returns {Grant} Grant schema node
347 */
348
349const grant = (props = {}) => _extends({}, compact(props), {
350 type: 'Grant'
351});
352/**
353 * Create a `Heading` node
354 * @param props Object containing Heading schema properties as key/value pairs
355 * @returns {Heading} Heading schema node
356 */
357
358const heading = props => _extends({}, compact(props), {
359 type: 'Heading'
360});
361/**
362 * Create a `ImageObject` node
363 * @param props Object containing ImageObject schema properties as key/value pairs
364 * @returns {ImageObject} ImageObject schema node
365 */
366
367const imageObject = props => _extends({}, compact(props), {
368 type: 'ImageObject'
369});
370/**
371 * Create a `Include` node
372 * @param props Object containing Include schema properties as key/value pairs
373 * @returns {Include} Include schema node
374 */
375
376const include = props => _extends({}, compact(props), {
377 type: 'Include'
378});
379/**
380 * Create a `IntegerValidator` node
381 * @param props Object containing IntegerValidator schema properties as key/value pairs
382 * @returns {IntegerValidator} IntegerValidator schema node
383 */
384
385const integerValidator = (props = {}) => _extends({}, compact(props), {
386 type: 'IntegerValidator'
387});
388/**
389 * Create a `Link` node
390 * @param props Object containing Link schema properties as key/value pairs
391 * @returns {Link} Link schema node
392 */
393
394const link = props => _extends({}, compact(props), {
395 type: 'Link'
396});
397/**
398 * Create a `List` node
399 * @param props Object containing List schema properties as key/value pairs
400 * @returns {List} List schema node
401 */
402
403const list = props => _extends({}, compact(props), {
404 type: 'List'
405});
406/**
407 * Create a `ListItem` node
408 * @param props Object containing ListItem schema properties as key/value pairs
409 * @returns {ListItem} ListItem schema node
410 */
411
412const listItem = (props = {}) => _extends({}, compact(props), {
413 type: 'ListItem'
414});
415/**
416 * Create a `Math` node
417 * @param props Object containing Math schema properties as key/value pairs
418 * @returns {Math} Math schema node
419 */
420
421const math = props => _extends({}, compact(props), {
422 type: 'Math'
423});
424/**
425 * Create a `MathBlock` node
426 * @param props Object containing MathBlock schema properties as key/value pairs
427 * @returns {MathBlock} MathBlock schema node
428 */
429
430const mathBlock = props => _extends({}, compact(props), {
431 type: 'MathBlock'
432});
433/**
434 * Create a `MathFragment` node
435 * @param props Object containing MathFragment schema properties as key/value pairs
436 * @returns {MathFragment} MathFragment schema node
437 */
438
439const mathFragment = props => _extends({}, compact(props), {
440 type: 'MathFragment'
441});
442/**
443 * Create a `MonetaryGrant` node
444 * @param props Object containing MonetaryGrant schema properties as key/value pairs
445 * @returns {MonetaryGrant} MonetaryGrant schema node
446 */
447
448const monetaryGrant = (props = {}) => _extends({}, compact(props), {
449 type: 'MonetaryGrant'
450});
451/**
452 * Create a `NontextualAnnotation` node
453 * @param props Object containing NontextualAnnotation schema properties as key/value pairs
454 * @returns {NontextualAnnotation} NontextualAnnotation schema node
455 */
456
457const nontextualAnnotation = props => _extends({}, compact(props), {
458 type: 'NontextualAnnotation'
459});
460/**
461 * Create a `Note` node
462 * @param props Object containing Note schema properties as key/value pairs
463 * @returns {Note} Note schema node
464 */
465
466const note = props => _extends({}, compact(props), {
467 type: 'Note'
468});
469/**
470 * Create a `NumberValidator` node
471 * @param props Object containing NumberValidator schema properties as key/value pairs
472 * @returns {NumberValidator} NumberValidator schema node
473 */
474
475const numberValidator = (props = {}) => _extends({}, compact(props), {
476 type: 'NumberValidator'
477});
478/**
479 * Create a `Organization` node
480 * @param props Object containing Organization schema properties as key/value pairs
481 * @returns {Organization} Organization schema node
482 */
483
484const organization = (props = {}) => _extends({}, compact(props), {
485 type: 'Organization'
486});
487/**
488 * Create a `Paragraph` node
489 * @param props Object containing Paragraph schema properties as key/value pairs
490 * @returns {Paragraph} Paragraph schema node
491 */
492
493const paragraph = props => _extends({}, compact(props), {
494 type: 'Paragraph'
495});
496/**
497 * Create a `Parameter` node
498 * @param props Object containing Parameter schema properties as key/value pairs
499 * @returns {Parameter} Parameter schema node
500 */
501
502const parameter = props => _extends({}, compact(props), {
503 type: 'Parameter'
504});
505/**
506 * Create a `Periodical` node
507 * @param props Object containing Periodical schema properties as key/value pairs
508 * @returns {Periodical} Periodical schema node
509 */
510
511const periodical = (props = {}) => _extends({}, compact(props), {
512 type: 'Periodical'
513});
514/**
515 * Create a `Person` node
516 * @param props Object containing Person schema properties as key/value pairs
517 * @returns {Person} Person schema node
518 */
519
520const person = (props = {}) => _extends({}, compact(props), {
521 type: 'Person'
522});
523/**
524 * Create a `PostalAddress` node
525 * @param props Object containing PostalAddress schema properties as key/value pairs
526 * @returns {PostalAddress} PostalAddress schema node
527 */
528
529const postalAddress = (props = {}) => _extends({}, compact(props), {
530 type: 'PostalAddress'
531});
532/**
533 * Create a `Product` node
534 * @param props Object containing Product schema properties as key/value pairs
535 * @returns {Product} Product schema node
536 */
537
538const product = (props = {}) => _extends({}, compact(props), {
539 type: 'Product'
540});
541/**
542 * Create a `PropertyValue` node
543 * @param props Object containing PropertyValue schema properties as key/value pairs
544 * @returns {PropertyValue} PropertyValue schema node
545 */
546
547const propertyValue = props => _extends({}, compact(props), {
548 type: 'PropertyValue'
549});
550/**
551 * Create a `PublicationIssue` node
552 * @param props Object containing PublicationIssue schema properties as key/value pairs
553 * @returns {PublicationIssue} PublicationIssue schema node
554 */
555
556const publicationIssue = (props = {}) => _extends({}, compact(props), {
557 type: 'PublicationIssue'
558});
559/**
560 * Create a `PublicationVolume` node
561 * @param props Object containing PublicationVolume schema properties as key/value pairs
562 * @returns {PublicationVolume} PublicationVolume schema node
563 */
564
565const publicationVolume = (props = {}) => _extends({}, compact(props), {
566 type: 'PublicationVolume'
567});
568/**
569 * Create a `Quote` node
570 * @param props Object containing Quote schema properties as key/value pairs
571 * @returns {Quote} Quote schema node
572 */
573
574const quote = props => _extends({}, compact(props), {
575 type: 'Quote'
576});
577/**
578 * Create a `QuoteBlock` node
579 * @param props Object containing QuoteBlock schema properties as key/value pairs
580 * @returns {QuoteBlock} QuoteBlock schema node
581 */
582
583const quoteBlock = props => _extends({}, compact(props), {
584 type: 'QuoteBlock'
585});
586/**
587 * Create a `Review` node
588 * @param props Object containing Review schema properties as key/value pairs
589 * @returns {Review} Review schema node
590 */
591
592const review = (props = {}) => _extends({}, compact(props), {
593 type: 'Review'
594});
595/**
596 * Create a `SoftwareApplication` node
597 * @param props Object containing SoftwareApplication schema properties as key/value pairs
598 * @returns {SoftwareApplication} SoftwareApplication schema node
599 */
600
601const softwareApplication = (props = {}) => _extends({}, compact(props), {
602 type: 'SoftwareApplication'
603});
604/**
605 * Create a `SoftwareEnvironment` node
606 * @param props Object containing SoftwareEnvironment schema properties as key/value pairs
607 * @returns {SoftwareEnvironment} SoftwareEnvironment schema node
608 */
609
610const softwareEnvironment = props => _extends({}, compact(props), {
611 type: 'SoftwareEnvironment'
612});
613/**
614 * Create a `SoftwareSession` node
615 * @param props Object containing SoftwareSession schema properties as key/value pairs
616 * @returns {SoftwareSession} SoftwareSession schema node
617 */
618
619const softwareSession = (props = {}) => _extends({}, compact(props), {
620 type: 'SoftwareSession'
621});
622/**
623 * Create a `SoftwareSourceCode` node
624 * @param props Object containing SoftwareSourceCode schema properties as key/value pairs
625 * @returns {SoftwareSourceCode} SoftwareSourceCode schema node
626 */
627
628const softwareSourceCode = (props = {}) => _extends({}, compact(props), {
629 type: 'SoftwareSourceCode'
630});
631/**
632 * Create a `StringValidator` node
633 * @param props Object containing StringValidator schema properties as key/value pairs
634 * @returns {StringValidator} StringValidator schema node
635 */
636
637const stringValidator = (props = {}) => _extends({}, compact(props), {
638 type: 'StringValidator'
639});
640/**
641 * Create a `Strong` node
642 * @param props Object containing Strong schema properties as key/value pairs
643 * @returns {Strong} Strong schema node
644 */
645
646const strong = props => _extends({}, compact(props), {
647 type: 'Strong'
648});
649/**
650 * Create a `Subscript` node
651 * @param props Object containing Subscript schema properties as key/value pairs
652 * @returns {Subscript} Subscript schema node
653 */
654
655const subscript = props => _extends({}, compact(props), {
656 type: 'Subscript'
657});
658/**
659 * Create a `Superscript` node
660 * @param props Object containing Superscript schema properties as key/value pairs
661 * @returns {Superscript} Superscript schema node
662 */
663
664const superscript = props => _extends({}, compact(props), {
665 type: 'Superscript'
666});
667/**
668 * Create a `Table` node
669 * @param props Object containing Table schema properties as key/value pairs
670 * @returns {Table} Table schema node
671 */
672
673const table = props => _extends({}, compact(props), {
674 type: 'Table'
675});
676/**
677 * Create a `TableCell` node
678 * @param props Object containing TableCell schema properties as key/value pairs
679 * @returns {TableCell} TableCell schema node
680 */
681
682const tableCell = (props = {}) => _extends({}, compact(props), {
683 type: 'TableCell'
684});
685/**
686 * Create a `TableRow` node
687 * @param props Object containing TableRow schema properties as key/value pairs
688 * @returns {TableRow} TableRow schema node
689 */
690
691const tableRow = props => _extends({}, compact(props), {
692 type: 'TableRow'
693});
694/**
695 * Create a `ThematicBreak` node
696 * @param props Object containing ThematicBreak schema properties as key/value pairs
697 * @returns {ThematicBreak} ThematicBreak schema node
698 */
699
700const thematicBreak = (props = {}) => _extends({}, compact(props), {
701 type: 'ThematicBreak'
702});
703/**
704 * Create a `TupleValidator` node
705 * @param props Object containing TupleValidator schema properties as key/value pairs
706 * @returns {TupleValidator} TupleValidator schema node
707 */
708
709const tupleValidator = (props = {}) => _extends({}, compact(props), {
710 type: 'TupleValidator'
711});
712/**
713 * Create a `Variable` node
714 * @param props Object containing Variable schema properties as key/value pairs
715 * @returns {Variable} Variable schema node
716 */
717
718const variable = props => _extends({}, compact(props), {
719 type: 'Variable'
720});
721/**
722 * Create a `VideoObject` node
723 * @param props Object containing VideoObject schema properties as key/value pairs
724 * @returns {VideoObject} VideoObject schema node
725 */
726
727const videoObject = props => _extends({}, compact(props), {
728 type: 'VideoObject'
729});
730/**
731 * Create a `VolumeMount` node
732 * @param props Object containing VolumeMount schema properties as key/value pairs
733 * @returns {VolumeMount} VolumeMount schema node
734 */
735
736const volumeMount = props => _extends({}, compact(props), {
737 type: 'VolumeMount'
738});
739/**
740 * The type or nature of a citation, both factually and rhetorically.
741 */
742
743var CitationIntentEnumeration;
744
745(function (CitationIntentEnumeration) {
746 /**
747 * The citing entity agrees with statements, ideas or conclusions presented in the cited entity
748 */
749 CitationIntentEnumeration["AgreesWith"] = "AgreesWith";
750 /**
751 * The citing entity cites the cited entity as one that provides an authoritative description or definition of the subject under discussion
752 */
753
754 CitationIntentEnumeration["CitesAsAuthority"] = "CitesAsAuthority";
755 /**
756 * The citing entity cites the cited entity as source of data
757 */
758
759 CitationIntentEnumeration["CitesAsDataSource"] = "CitesAsDataSource";
760 /**
761 * The citing entity cites the cited entity as source of factual evidence for statements it contains
762 */
763
764 CitationIntentEnumeration["CitesAsEvidence"] = "CitesAsEvidence";
765 /**
766 * The citing entity cites the cited entity as being the container of metadata describing the citing entity
767 */
768
769 CitationIntentEnumeration["CitesAsMetadataDocument"] = "CitesAsMetadataDocument";
770 /**
771 * The citing entity cites the cited entity as providing or containing a possible solution to the issues being discussed
772 */
773
774 CitationIntentEnumeration["CitesAsPotentialSolution"] = "CitesAsPotentialSolution";
775 /**
776 * The citing entity cites the cited entity as an item of recommended reading
777 */
778
779 CitationIntentEnumeration["CitesAsRecommendedReading"] = "CitesAsRecommendedReading";
780 /**
781 * The citing entity cites the cited entity as one that is related
782 */
783
784 CitationIntentEnumeration["CitesAsRelated"] = "CitesAsRelated";
785 /**
786 * 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
787 */
788
789 CitationIntentEnumeration["CitesAsSourceDocument"] = "CitesAsSourceDocument";
790 /**
791 * The citing entity cites the cited entity as a source of information on the subject under discussion
792 */
793
794 CitationIntentEnumeration["CitesForInformation"] = "CitesForInformation";
795 /**
796 * The citing entity is used to create or compile the cited entity
797 */
798
799 CitationIntentEnumeration["Compiles"] = "Compiles";
800 /**
801 * The citing entity confirms facts, ideas or statements presented in the cited entity
802 */
803
804 CitationIntentEnumeration["Confirms"] = "Confirms";
805 /**
806 * 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
807 */
808
809 CitationIntentEnumeration["ContainsAssertionFrom"] = "ContainsAssertionFrom";
810 /**
811 * The citing entity corrects statements, ideas or conclusions presented in the cited entity
812 */
813
814 CitationIntentEnumeration["Corrects"] = "Corrects";
815 /**
816 * The citing entity acknowledges contributions made by the cited entity
817 */
818
819 CitationIntentEnumeration["Credits"] = "Credits";
820 /**
821 * The citing entity critiques statements, ideas or conclusions presented in the cited entity
822 */
823
824 CitationIntentEnumeration["Critiques"] = "Critiques";
825 /**
826 * The citing entity express derision for the cited entity, or for ideas or conclusions contained within it
827 */
828
829 CitationIntentEnumeration["Derides"] = "Derides";
830 /**
831 * The citing entity describes the cited entity
832 */
833
834 CitationIntentEnumeration["Describes"] = "Describes";
835 /**
836 * The citing entity disagrees with statements, ideas or conclusions presented in the cited entity
837 */
838
839 CitationIntentEnumeration["DisagreesWith"] = "DisagreesWith";
840 /**
841 * The citing entity discusses statements, ideas or conclusions presented in the cited entity
842 */
843
844 CitationIntentEnumeration["Discusses"] = "Discusses";
845 /**
846 * The citing entity disputes statements, ideas or conclusions presented in the cited entity
847 */
848
849 CitationIntentEnumeration["Disputes"] = "Disputes";
850 /**
851 * The citing entity documents information about the cited entity
852 */
853
854 CitationIntentEnumeration["Documents"] = "Documents";
855 /**
856 * The citing entity extends facts, ideas or understandings presented in the cited entity
857 */
858
859 CitationIntentEnumeration["Extends"] = "Extends";
860 /**
861 * The cited entity provides background information for the citing entity
862 */
863
864 CitationIntentEnumeration["GivesBackgroundTo"] = "GivesBackgroundTo";
865 /**
866 * The cited entity provides intellectual or factual support for the citing entity
867 */
868
869 CitationIntentEnumeration["GivesSupportTo"] = "GivesSupportTo";
870 /**
871 * The cited entity evokes a reply from the citing entity
872 */
873
874 CitationIntentEnumeration["HasReplyFrom"] = "HasReplyFrom";
875 /**
876 * The citing entity includes one or more excerpts from the cited entity
877 */
878
879 CitationIntentEnumeration["IncludesExcerptFrom"] = "IncludesExcerptFrom";
880 /**
881 * The citing entity includes one or more quotations from the cited entity
882 */
883
884 CitationIntentEnumeration["IncludesQuotationFrom"] = "IncludesQuotationFrom";
885 /**
886 * The cited entity contains statements, ideas or conclusions with which the citing entity agrees
887 */
888
889 CitationIntentEnumeration["IsAgreedWithBy"] = "IsAgreedWithBy";
890 /**
891 * The cited entity is cited as providing an authoritative description or definition of the subject under discussion in the citing entity
892 */
893
894 CitationIntentEnumeration["IsCitedAsAuthorityBy"] = "IsCitedAsAuthorityBy";
895 /**
896 * The cited entity is cited as a data source by the citing entity
897 */
898
899 CitationIntentEnumeration["IsCitedAsDataSourceBy"] = "IsCitedAsDataSourceBy";
900 /**
901 * The cited entity is cited for providing factual evidence to the citing entity
902 */
903
904 CitationIntentEnumeration["IsCitedAsEvidenceBy"] = "IsCitedAsEvidenceBy";
905 /**
906 * The cited entity is cited as being the container of metadata relating to the citing entity
907 */
908
909 CitationIntentEnumeration["IsCitedAsMetadataDocumentBy"] = "IsCitedAsMetadataDocumentBy";
910 /**
911 * The cited entity is cited as providing or containing a possible solution to the issues being discussed in the citing entity
912 */
913
914 CitationIntentEnumeration["IsCitedAsPontentialSolutionBy"] = "IsCitedAsPontentialSolutionBy";
915 /**
916 * The cited entity is cited by the citing entity as an item of recommended reading
917 */
918
919 CitationIntentEnumeration["IsCitedAsRecommendedReadingBy"] = "IsCitedAsRecommendedReadingBy";
920 /**
921 * The cited entity is cited as being related to the citing entity
922 */
923
924 CitationIntentEnumeration["IsCitedAsRelatedBy"] = "IsCitedAsRelatedBy";
925 /**
926 * The cited entity is cited as being the entity from which the citing entity is derived, or about which the citing entity contains metadata
927 */
928
929 CitationIntentEnumeration["IsCitedAsSourceDocumentBy"] = "IsCitedAsSourceDocumentBy";
930 /**
931 * The cited entity (the subject of the RDF triple) is cited by the citing entity (the object of the triple)
932 */
933
934 CitationIntentEnumeration["IsCitedBy"] = "IsCitedBy";
935 /**
936 * The cited entity is cited as a source of information on the subject under discussion in the citing entity
937 */
938
939 CitationIntentEnumeration["IsCitedForInformationBy"] = "IsCitedForInformationBy";
940 /**
941 * The cited entity is the result of a compile or creation event using the citing entity
942 */
943
944 CitationIntentEnumeration["IsCompiledBy"] = "IsCompiledBy";
945 /**
946 * The cited entity presents facts, ideas or statements that are confirmed by the citing entity
947 */
948
949 CitationIntentEnumeration["IsConfirmedBy"] = "IsConfirmedBy";
950 /**
951 * The cited entity presents statements, ideas or conclusions that are corrected by the citing entity
952 */
953
954 CitationIntentEnumeration["IsCorrectedBy"] = "IsCorrectedBy";
955 /**
956 * The cited entity makes contributions that are acknowledged by the citing entity
957 */
958
959 CitationIntentEnumeration["IsCreditedBy"] = "IsCreditedBy";
960 /**
961 * The cited entity presents statements, ideas or conclusions that are critiqued by the citing entity
962 */
963
964 CitationIntentEnumeration["IsCritiquedBy"] = "IsCritiquedBy";
965 /**
966 * The cited entity contains ideas or conclusions for which the citing entity express derision
967 */
968
969 CitationIntentEnumeration["IsDeridedBy"] = "IsDeridedBy";
970 /**
971 * The cited entity is described by the citing entity
972 */
973
974 CitationIntentEnumeration["IsDescribedBy"] = "IsDescribedBy";
975 /**
976 * The cited entity presents statements, ideas or conclusions that are disagreed with by the citing entity
977 */
978
979 CitationIntentEnumeration["IsDisagreedWithBy"] = "IsDisagreedWithBy";
980 /**
981 * The cited entity presents statements, ideas or conclusions that are discussed by the citing entity
982 */
983
984 CitationIntentEnumeration["IsDiscussedBy"] = "IsDiscussedBy";
985 /**
986 * The cited entity presents statements, ideas or conclusions that are disputed by the citing entity
987 */
988
989 CitationIntentEnumeration["IsDisputedBy"] = "IsDisputedBy";
990 /**
991 * Information about the cited entity is documented by the citing entity
992 */
993
994 CitationIntentEnumeration["IsDocumentedBy"] = "IsDocumentedBy";
995 /**
996 * The cited entity presents facts, ideas or understandings that are extended by the citing entity
997 */
998
999 CitationIntentEnumeration["IsExtendedBy"] = "IsExtendedBy";
1000 /**
1001 * The cited entity is the target for an HTTP Uniform Resource Locator (URL) link within the citing entity
1002 */
1003
1004 CitationIntentEnumeration["IsLinkedToBy"] = "IsLinkedToBy";
1005 /**
1006 * The characteristic style or content of the cited entity is imitated by the citing entity for comic effect, usually without explicit citation
1007 */
1008
1009 CitationIntentEnumeration["IsParodiedBy"] = "IsParodiedBy";
1010 /**
1011 * 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
1012 */
1013
1014 CitationIntentEnumeration["IsPlagiarizedBy"] = "IsPlagiarizedBy";
1015 /**
1016 * The cited entity presents statements, ideas or conclusions that are qualified or have conditions placed upon them by the citing entity
1017 */
1018
1019 CitationIntentEnumeration["IsQualifiedBy"] = "IsQualifiedBy";
1020 /**
1021 * The cited entity presents statements, ideas or conclusions that are refuted by the citing entity
1022 */
1023
1024 CitationIntentEnumeration["IsRefutedBy"] = "IsRefutedBy";
1025 /**
1026 * The cited entity is formally retracted by the citing entity
1027 */
1028
1029 CitationIntentEnumeration["IsRetractedBy"] = "IsRetractedBy";
1030 /**
1031 * The cited entity presents statements, ideas or conclusions that are reviewed by the citing entity
1032 */
1033
1034 CitationIntentEnumeration["IsReviewedBy"] = "IsReviewedBy";
1035 /**
1036 * The cited entity or aspects of its contents are ridiculed by the citing entity
1037 */
1038
1039 CitationIntentEnumeration["IsRidiculedBy"] = "IsRidiculedBy";
1040 /**
1041 * The cited entity is cited because the citing article contains speculations on its content or ideas
1042 */
1043
1044 CitationIntentEnumeration["IsSpeculatedOnBy"] = "IsSpeculatedOnBy";
1045 /**
1046 * The cited entity receives intellectual or factual support from the citing entity
1047 */
1048
1049 CitationIntentEnumeration["IsSupportedBy"] = "IsSupportedBy";
1050 /**
1051 * The cited entity presents statements, ideas, hypotheses or understanding that are updated by the cited entity
1052 */
1053
1054 CitationIntentEnumeration["IsUpdatedBy"] = "IsUpdatedBy";
1055 /**
1056 * 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
1057 */
1058
1059 CitationIntentEnumeration["Likes"] = "Likes";
1060 /**
1061 * The citing entity provides a link, in the form of an HTTP Uniform Resource Locator (URL), to the cited entity
1062 */
1063
1064 CitationIntentEnumeration["LinksTo"] = "LinksTo";
1065 /**
1066 * The citing entity obtains background information from the cited entity
1067 */
1068
1069 CitationIntentEnumeration["ObtainsBackgroundFrom"] = "ObtainsBackgroundFrom";
1070 /**
1071 * The citing entity obtains intellectual or factual support from the cited entity
1072 */
1073
1074 CitationIntentEnumeration["ObtainsSupportFrom"] = "ObtainsSupportFrom";
1075 /**
1076 * The citing entity imitates the characteristic style or content of the cited entity for comic effect, usually without explicit citation
1077 */
1078
1079 CitationIntentEnumeration["Parodies"] = "Parodies";
1080 /**
1081 * 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
1082 */
1083
1084 CitationIntentEnumeration["Plagiarizes"] = "Plagiarizes";
1085 /**
1086 * 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
1087 */
1088
1089 CitationIntentEnumeration["ProvidesAssertionFor"] = "ProvidesAssertionFor";
1090 /**
1091 * The cited entity presents conclusions that are used in work described in the citing entity
1092 */
1093
1094 CitationIntentEnumeration["ProvidesConclusionsFor"] = "ProvidesConclusionsFor";
1095 /**
1096 * The cited entity presents data that are used in work described in the citing entity
1097 */
1098
1099 CitationIntentEnumeration["ProvidesDataFor"] = "ProvidesDataFor";
1100 /**
1101 * The cited entity contains information, usually of a textual nature, that is excerpted by (used as an excerpt within) the citing entity
1102 */
1103
1104 CitationIntentEnumeration["ProvidesExcerptFor"] = "ProvidesExcerptFor";
1105 /**
1106 * The cited entity details a method that is used in work described by the citing entity
1107 */
1108
1109 CitationIntentEnumeration["ProvidesMethodFor"] = "ProvidesMethodFor";
1110 /**
1111 * The cited entity contains information, usually of a textual nature, that is quoted by (used as a quotation within) the citing entity
1112 */
1113
1114 CitationIntentEnumeration["ProvidesQuotationFor"] = "ProvidesQuotationFor";
1115 /**
1116 * The citing entity qualifies or places conditions or restrictions upon statements, ideas or conclusions presented in the cited entity
1117 */
1118
1119 CitationIntentEnumeration["Qualifies"] = "Qualifies";
1120 /**
1121 * The citing entity refutes statements, ideas or conclusions presented in the cited entity
1122 */
1123
1124 CitationIntentEnumeration["Refutes"] = "Refutes";
1125 /**
1126 * The citing entity replies to statements, ideas or criticisms presented in the cited entity
1127 */
1128
1129 CitationIntentEnumeration["RepliesTo"] = "RepliesTo";
1130 /**
1131 * The citing entity constitutes a formal retraction of the cited entity
1132 */
1133
1134 CitationIntentEnumeration["Retracts"] = "Retracts";
1135 /**
1136 * The citing entity reviews statements, ideas or conclusions presented in the cited entity
1137 */
1138
1139 CitationIntentEnumeration["Reviews"] = "Reviews";
1140 /**
1141 * The citing entity ridicules the cited entity or aspects of its contents
1142 */
1143
1144 CitationIntentEnumeration["Ridicules"] = "Ridicules";
1145 /**
1146 * Each entity has at least one author that shares a common institutional affiliation with an author of the other entity
1147 */
1148
1149 CitationIntentEnumeration["SharesAuthorInstitutionWith"] = "SharesAuthorInstitutionWith";
1150 /**
1151 * Each entity has at least one author in common with the other entity
1152 */
1153
1154 CitationIntentEnumeration["SharesAuthorWith"] = "SharesAuthorWith";
1155 /**
1156 * The two entities result from activities that have been funded by the same funding agency
1157 */
1158
1159 CitationIntentEnumeration["SharesFundingAgencyWith"] = "SharesFundingAgencyWith";
1160 /**
1161 * The citing and cited bibliographic resources are published in the same journal
1162 */
1163
1164 CitationIntentEnumeration["SharesJournalWith"] = "SharesJournalWith";
1165 /**
1166 * The citing and cited bibliographic resources are published in same publication venue
1167 */
1168
1169 CitationIntentEnumeration["SharesPublicationVenueWith"] = "SharesPublicationVenueWith";
1170 /**
1171 * The citing entity speculates on something within or related to the cited entity, without firm evidence
1172 */
1173
1174 CitationIntentEnumeration["SpeculatesOn"] = "SpeculatesOn";
1175 /**
1176 * The citing entity provides intellectual or factual support for statements, ideas or conclusions presented in the cited entity
1177 */
1178
1179 CitationIntentEnumeration["Supports"] = "Supports";
1180 /**
1181 * The citing entity updates statements, ideas, hypotheses or understanding presented in the cited entity
1182 */
1183
1184 CitationIntentEnumeration["Updates"] = "Updates";
1185 /**
1186 * The citing entity describes work that uses conclusions presented in the cited entity
1187 */
1188
1189 CitationIntentEnumeration["UsesConclusionsFrom"] = "UsesConclusionsFrom";
1190 /**
1191 * The citing entity describes work that uses data presented in the cited entity
1192 */
1193
1194 CitationIntentEnumeration["UsesDataFrom"] = "UsesDataFrom";
1195 /**
1196 * The citing entity describes work that uses a method detailed in the cited entity
1197 */
1198
1199 CitationIntentEnumeration["UsesMethodIn"] = "UsesMethodIn";
1200})(CitationIntentEnumeration || (CitationIntentEnumeration = {}));
1201
1202const codeExecutableTypes = {
1203 CodeExecutable: 'CodeExecutable',
1204 CodeChunk: 'CodeChunk',
1205 CodeExpression: 'CodeExpression'
1206};
1207const codeTypes = {
1208 Code: 'Code',
1209 CodeBlock: 'CodeBlock',
1210 CodeChunk: 'CodeChunk',
1211 CodeExecutable: 'CodeExecutable',
1212 CodeExpression: 'CodeExpression',
1213 CodeFragment: 'CodeFragment'
1214};
1215const contactPointTypes = {
1216 ContactPoint: 'ContactPoint',
1217 PostalAddress: 'PostalAddress'
1218};
1219const creativeWorkTypes = {
1220 CreativeWork: 'CreativeWork',
1221 Article: 'Article',
1222 AudioObject: 'AudioObject',
1223 Claim: 'Claim',
1224 Collection: 'Collection',
1225 Comment: 'Comment',
1226 Datatable: 'Datatable',
1227 Figure: 'Figure',
1228 ImageObject: 'ImageObject',
1229 MediaObject: 'MediaObject',
1230 Periodical: 'Periodical',
1231 PublicationIssue: 'PublicationIssue',
1232 PublicationVolume: 'PublicationVolume',
1233 Review: 'Review',
1234 SoftwareApplication: 'SoftwareApplication',
1235 SoftwareSourceCode: 'SoftwareSourceCode',
1236 Table: 'Table',
1237 VideoObject: 'VideoObject'
1238};
1239const entityTypes = {
1240 Entity: 'Entity',
1241 ArrayValidator: 'ArrayValidator',
1242 Article: 'Article',
1243 AudioObject: 'AudioObject',
1244 BooleanValidator: 'BooleanValidator',
1245 Brand: 'Brand',
1246 CitationIntentEnumeration: 'CitationIntentEnumeration',
1247 Cite: 'Cite',
1248 CiteGroup: 'CiteGroup',
1249 Claim: 'Claim',
1250 Code: 'Code',
1251 CodeBlock: 'CodeBlock',
1252 CodeChunk: 'CodeChunk',
1253 CodeError: 'CodeError',
1254 CodeExecutable: 'CodeExecutable',
1255 CodeExpression: 'CodeExpression',
1256 CodeFragment: 'CodeFragment',
1257 Collection: 'Collection',
1258 Comment: 'Comment',
1259 ConstantValidator: 'ConstantValidator',
1260 ContactPoint: 'ContactPoint',
1261 CreativeWork: 'CreativeWork',
1262 Datatable: 'Datatable',
1263 DatatableColumn: 'DatatableColumn',
1264 Date: 'Date',
1265 DefinedTerm: 'DefinedTerm',
1266 Delete: 'Delete',
1267 Emphasis: 'Emphasis',
1268 EnumValidator: 'EnumValidator',
1269 Enumeration: 'Enumeration',
1270 Figure: 'Figure',
1271 Function: 'Function',
1272 Grant: 'Grant',
1273 Heading: 'Heading',
1274 ImageObject: 'ImageObject',
1275 Include: 'Include',
1276 IntegerValidator: 'IntegerValidator',
1277 Link: 'Link',
1278 List: 'List',
1279 ListItem: 'ListItem',
1280 Mark: 'Mark',
1281 Math: 'Math',
1282 MathBlock: 'MathBlock',
1283 MathFragment: 'MathFragment',
1284 MediaObject: 'MediaObject',
1285 MonetaryGrant: 'MonetaryGrant',
1286 NontextualAnnotation: 'NontextualAnnotation',
1287 Note: 'Note',
1288 NumberValidator: 'NumberValidator',
1289 Organization: 'Organization',
1290 Paragraph: 'Paragraph',
1291 Parameter: 'Parameter',
1292 Periodical: 'Periodical',
1293 Person: 'Person',
1294 PostalAddress: 'PostalAddress',
1295 Product: 'Product',
1296 PropertyValue: 'PropertyValue',
1297 PublicationIssue: 'PublicationIssue',
1298 PublicationVolume: 'PublicationVolume',
1299 Quote: 'Quote',
1300 QuoteBlock: 'QuoteBlock',
1301 Review: 'Review',
1302 SoftwareApplication: 'SoftwareApplication',
1303 SoftwareEnvironment: 'SoftwareEnvironment',
1304 SoftwareSession: 'SoftwareSession',
1305 SoftwareSourceCode: 'SoftwareSourceCode',
1306 StringValidator: 'StringValidator',
1307 Strong: 'Strong',
1308 Subscript: 'Subscript',
1309 Superscript: 'Superscript',
1310 Table: 'Table',
1311 TableCell: 'TableCell',
1312 TableRow: 'TableRow',
1313 ThematicBreak: 'ThematicBreak',
1314 Thing: 'Thing',
1315 TupleValidator: 'TupleValidator',
1316 Validator: 'Validator',
1317 Variable: 'Variable',
1318 VideoObject: 'VideoObject',
1319 VolumeMount: 'VolumeMount'
1320};
1321const enumerationTypes = {
1322 Enumeration: 'Enumeration',
1323 CitationIntentEnumeration: 'CitationIntentEnumeration'
1324};
1325const grantTypes = {
1326 Grant: 'Grant',
1327 MonetaryGrant: 'MonetaryGrant'
1328};
1329const markTypes = {
1330 Mark: 'Mark',
1331 Delete: 'Delete',
1332 Emphasis: 'Emphasis',
1333 NontextualAnnotation: 'NontextualAnnotation',
1334 Quote: 'Quote',
1335 Strong: 'Strong',
1336 Subscript: 'Subscript',
1337 Superscript: 'Superscript'
1338};
1339const mathTypes = {
1340 Math: 'Math',
1341 MathBlock: 'MathBlock',
1342 MathFragment: 'MathFragment'
1343};
1344const mediaObjectTypes = {
1345 MediaObject: 'MediaObject',
1346 AudioObject: 'AudioObject',
1347 ImageObject: 'ImageObject',
1348 VideoObject: 'VideoObject'
1349};
1350const thingTypes = {
1351 Thing: 'Thing',
1352 Article: 'Article',
1353 AudioObject: 'AudioObject',
1354 Brand: 'Brand',
1355 CitationIntentEnumeration: 'CitationIntentEnumeration',
1356 Claim: 'Claim',
1357 Collection: 'Collection',
1358 Comment: 'Comment',
1359 ContactPoint: 'ContactPoint',
1360 CreativeWork: 'CreativeWork',
1361 Datatable: 'Datatable',
1362 DatatableColumn: 'DatatableColumn',
1363 DefinedTerm: 'DefinedTerm',
1364 Enumeration: 'Enumeration',
1365 Figure: 'Figure',
1366 Grant: 'Grant',
1367 ImageObject: 'ImageObject',
1368 ListItem: 'ListItem',
1369 MediaObject: 'MediaObject',
1370 MonetaryGrant: 'MonetaryGrant',
1371 Organization: 'Organization',
1372 Periodical: 'Periodical',
1373 Person: 'Person',
1374 PostalAddress: 'PostalAddress',
1375 Product: 'Product',
1376 PropertyValue: 'PropertyValue',
1377 PublicationIssue: 'PublicationIssue',
1378 PublicationVolume: 'PublicationVolume',
1379 Review: 'Review',
1380 SoftwareApplication: 'SoftwareApplication',
1381 SoftwareEnvironment: 'SoftwareEnvironment',
1382 SoftwareSession: 'SoftwareSession',
1383 SoftwareSourceCode: 'SoftwareSourceCode',
1384 Table: 'Table',
1385 VideoObject: 'VideoObject',
1386 VolumeMount: 'VolumeMount'
1387};
1388const validatorTypes = {
1389 Validator: 'Validator',
1390 ArrayValidator: 'ArrayValidator',
1391 BooleanValidator: 'BooleanValidator',
1392 ConstantValidator: 'ConstantValidator',
1393 EnumValidator: 'EnumValidator',
1394 IntegerValidator: 'IntegerValidator',
1395 NumberValidator: 'NumberValidator',
1396 StringValidator: 'StringValidator',
1397 TupleValidator: 'TupleValidator'
1398};
1399const blockContentTypes = {
1400 Claim: 'Claim',
1401 CodeBlock: 'CodeBlock',
1402 CodeChunk: 'CodeChunk',
1403 Collection: 'Collection',
1404 Figure: 'Figure',
1405 Heading: 'Heading',
1406 Include: 'Include',
1407 List: 'List',
1408 MathBlock: 'MathBlock',
1409 Paragraph: 'Paragraph',
1410 QuoteBlock: 'QuoteBlock',
1411 Table: 'Table',
1412 ThematicBreak: 'ThematicBreak'
1413};
1414const inlineContentTypes = {
1415 AudioObject: 'AudioObject',
1416 Cite: 'Cite',
1417 CiteGroup: 'CiteGroup',
1418 CodeExpression: 'CodeExpression',
1419 CodeFragment: 'CodeFragment',
1420 Delete: 'Delete',
1421 Emphasis: 'Emphasis',
1422 ImageObject: 'ImageObject',
1423 Link: 'Link',
1424 MathFragment: 'MathFragment',
1425 NontextualAnnotation: 'NontextualAnnotation',
1426 Note: 'Note',
1427 Parameter: 'Parameter',
1428 Quote: 'Quote',
1429 Strong: 'Strong',
1430 Subscript: 'Subscript',
1431 Superscript: 'Superscript',
1432 VideoObject: 'VideoObject'
1433};
1434const unions = {
1435 CodeExecutableTypes: codeExecutableTypes,
1436 CodeTypes: codeTypes,
1437 ContactPointTypes: contactPointTypes,
1438 CreativeWorkTypes: creativeWorkTypes,
1439 EntityTypes: entityTypes,
1440 EnumerationTypes: enumerationTypes,
1441 GrantTypes: grantTypes,
1442 MarkTypes: markTypes,
1443 MathTypes: mathTypes,
1444 MediaObjectTypes: mediaObjectTypes,
1445 ThingTypes: thingTypes,
1446 ValidatorTypes: validatorTypes,
1447 BlockContent: blockContentTypes,
1448 InlineContent: inlineContentTypes
1449};
1450
1451/**
1452 * Type guard to determine whether a node belongs to a type map
1453 *
1454 * @template {TypeMap} T
1455 * @param {T} typeMap
1456 * @param {Node} node A Stencila schema node object
1457 */
1458
1459const isInTypeMap = typeMap => node => isEntity(node) ? Object.keys(typeMap).includes(node.type) : false;
1460/**
1461 * Type guard to determine whether a node is a primitive type
1462 * (i.e. not an `Entity`).
1463 */
1464
1465const isPrimitive = node => {
1466 const type = typeof node;
1467 if (node === null) return true;
1468 if (type === 'boolean') return true;
1469 if (type === 'number') return true;
1470 if (type === 'string') return true;
1471 if (Array.isArray(node)) return true;
1472 if (type === 'object' && !Object.prototype.hasOwnProperty.call(node, 'type')) return true;
1473 return false;
1474};
1475/**
1476 * Type guard to determine whether a node is an `Entity`
1477 */
1478
1479const isEntity = node => {
1480 if (node === null || node === undefined) return false;
1481 return Object.prototype.hasOwnProperty.call(node, 'type');
1482};
1483/**
1484 * A type guard to determine whether a node is of a specific type.
1485 *
1486 * e.g. `isA('Paragraph', node)`
1487 */
1488
1489const isA = (type, node) => isEntity(node) && node.type === type;
1490/**
1491 * Returns a type guard to determine whether a node is of a specific type.
1492 *
1493 * e.g. `isType('Article')(node)`
1494 * e.g. `article.content.filter(isType('Paragraph'))`
1495 */
1496
1497const isType = type => node => isA(type, node);
1498/**
1499 * A type guard to determine whether a node is a member of a union type.
1500 *
1501 * e.g. `isIn('MediaObjectTypes', node)`
1502 */
1503
1504const isIn = (union, node) => isEntity(node) && node.type in unions[union];
1505/**
1506 * Returns a type guard to determine whether a node is a member of a union type.
1507 *
1508 * e.g. `isMember('CreativeWorkTypes')(node)`
1509 */
1510
1511const isMember = type => node => isIn(type, node);
1512/**
1513 * Type guard to determine whether a node is `InlineContent`.
1514 *
1515 * e.g. `nodes.filter(isInlineContent)`
1516 */
1517
1518const isInlineContent = node => isPrimitive(node) || isIn('InlineContent', node);
1519/**
1520 * Type guard to determine whether a node is `BlockContent`.
1521 *
1522 * e.g. `nodes.filter(isBlockContent)`
1523 */
1524
1525const isBlockContent = node => isIn('BlockContent', node);
1526
1527var version$1 = "1.17.0";
1528
1529/**
1530 * Get the version string (e.g "1.2.3") for this package
1531 */
1532
1533const version = version$1;
1534/**
1535 * Get the major version string (e.g "1") for this package
1536 */
1537
1538const versionMajor = version.split('.')[0];
1539/**
1540 * Get the minor version string (e.g "1.2") for this package
1541 */
1542
1543const versionMinor = version.split('.').slice(0, 2).join('.');
1544
1545// between Stencila Schema type and property names
1546// and URLs
1547
1548let CONTEXT; // Maps between vocabulary terms (Stencila Schema types and
1549// property names) and their compact IRIs ('@id's) and vice-versa.
1550
1551const termToId = {};
1552const idToTerm = {}; // Initialize maps. Called once, lazily.
1553
1554function initMaps() {
1555 const context = jsonLdContext();
1556
1557 for (const [term, value] of Object.entries(context)) {
1558 if (typeof value === 'string' && !term.startsWith('@')) {
1559 termToId[term] = value;
1560 idToTerm[value] = term;
1561 } else if (typeof value === 'object') {
1562 const id = value['@id'];
1563 termToId[term] = id;
1564 idToTerm[id] = term;
1565 }
1566 }
1567}
1568/**
1569 * Get the URL of Stencila Schema's JSON-LD `@context` or
1570 * for a specific `stencila:` term e.g. `CodeChunk`, `outputs`.
1571 *
1572 * The `@context`'s URL needs to have a trailing slash because
1573 * it gets prefixed to all keys during JSON-LD expansion.
1574 * e.g. the term `CodeChunk` gets expanded to `https://schema.stenci.la/v0/jsonld/CodeChunk`
1575 * (which in gets redirected to `https://unpkg.com/@stencila/schema@0.32.1/dist/CodeChunk.jsonld`)
1576 *
1577 * @param term The Stencila term (type or property) to generate the
1578 * URL for. Defaults to empty string i.e. the context.
1579 */
1580
1581
1582function jsonLdUrl(term = '') {
1583 return `https://schema.stenci.la/v${versionMajor}/jsonld/${term}`;
1584}
1585/**
1586 * Get Stencila Schema's JSON-LD `@context` as an object.
1587 */
1588
1589function jsonLdContext() {
1590 if (CONTEXT === undefined) {
1591 const json = fs.readFileSync(path.join(__dirname, ...(__filename.endsWith('.ts') ? ['..', '..', 'public'] : []), 'stencila.jsonld'), 'utf8'); // eslint-disable-next-line
1592
1593 CONTEXT = JSON.parse(json)['@context'];
1594 }
1595
1596 return CONTEXT;
1597}
1598/**
1599 * Get the URL for a term in the Stencila Schema's JSON-LD `@context`
1600 * from it's name.
1601 *
1602 * This uses the JSON-LD `@context` in `stencila.jsonld` (which
1603 * provides a mapping between vocabularies) to translate
1604 * type names used in the Stencila Schema
1605 * to those used in other schemas (e.g. Schema.org, Bioschemas).
1606 * The [compact IRIs](https://www.w3.org/TR/json-ld11/#compact-iris)
1607 * in the `@context` e.g. `schema:Person` are expanded to a URL
1608 * e.g. `https://schema.org/Person` suitable for the `itemtype` attribute.
1609 *
1610 * @param term A term in the JSON-LD `@context`. May, or may not be in
1611 * the `stencila` namespace
1612 */
1613
1614function jsonLdTermUrl(term) {
1615 if (Object.keys(termToId).length === 0) initMaps();
1616 const id = termToId[term];
1617 if (id === undefined) return undefined;
1618 const [prefix, name] = id.split(':');
1619 const context = jsonLdContext();
1620 const base = context[prefix];
1621 if (base === undefined) return undefined;
1622 return `${base.toString()}${name}`;
1623}
1624/**
1625 * Get the name of a term in the Stencila Schema's JSON-LD `@context`
1626 * from a URL.
1627 *
1628 * This is the inverse of `jsonLdTermUrl`.
1629 *
1630 * @param url A url to resolve into a term
1631 */
1632
1633function jsonLdTermName(url) {
1634 if (Object.keys(idToTerm).length === 0) initMaps(); // Parse the url into a base URL / term pair
1635
1636 const {
1637 hash,
1638 pathname
1639 } = new URL(url);
1640 const term = hash !== '' ? hash.slice(1) : pathname.split('/').pop();
1641 const baseUrl = url.replace(new RegExp(`${term != null ? term : ''}$`), ''); // Resolve the URL into a prefix
1642
1643 const prefix = idToTerm[baseUrl];
1644 if (prefix === undefined) return undefined; // Resolve the `@id` to the term name
1645
1646 return idToTerm[`${prefix}:${term != null ? term : 'undefined'}`];
1647}
1648
1649let SCHEMAS = {}; // Lazily populated set properties across all schemas
1650
1651let PROPERTIES = {};
1652/**
1653 * Get all Stencila Schema's JSON Schemas.
1654 */
1655
1656async function jsonSchemas() {
1657 if (Object.keys(SCHEMAS).length === 0) {
1658 const dir = path.join(__dirname, ...(__filename.endsWith('.ts') ? ['..', '..', 'public'] : []));
1659 const files = await new Promise((resolve, reject) => fs.readdir(dir, 'utf8', (error, files) => error !== null ? reject(error) : resolve(files)));
1660 const schemaFiles = files.filter(filename => filename.endsWith('.schema.json'));
1661 const promises = schemaFiles.map(async file => {
1662 const json = await new Promise((resolve, reject) => fs.readFile(path.join(dir, file), 'utf8', (error, content) => error !== null ? reject(error) : resolve(content)));
1663 return JSON.parse(json);
1664 });
1665 const schemas = await Promise.all(promises);
1666 SCHEMAS = schemas.reduce((prev, schema) => {
1667 const {
1668 title
1669 } = schema;
1670 return title === undefined ? prev : _extends({}, prev, {
1671 [title]: schema
1672 });
1673 }, {});
1674 }
1675
1676 return SCHEMAS;
1677}
1678/**
1679 * Get all the names of all types in the Stencila Schema.
1680 */
1681
1682async function jsonSchemaTypes() {
1683 const schemas = await jsonSchemas();
1684 return Object.keys(schemas);
1685}
1686/**
1687 * Get all the properties in all types in the Stencila Schema.
1688 *
1689 * Returns a alphabetically sorted `Record` with information on
1690 * each property, including the types that it occurs on,
1691 * and whether or not it is an array property.
1692 */
1693
1694async function jsonSchemaProperties() {
1695 if (Object.keys(PROPERTIES).length === 0) {
1696 const schemas = await jsonSchemas(); // Accumulate properties across types
1697
1698 const props = Object.values(schemas).reduce((prev, type) => {
1699 const {
1700 title = '',
1701 properties = {}
1702 } = type;
1703 Object.entries(properties).forEach(([name, prop]) => {
1704 const {
1705 '@id': id = '',
1706 isArray = false,
1707 isPlural = false
1708 } = prop;
1709 const existing = prev[name];
1710
1711 if (existing === undefined) {
1712 prev[name] = {
1713 name,
1714 id,
1715 domainIncludes: [title],
1716 isArray,
1717 isPlural
1718 };
1719 } else {
1720 // Check that there is consistency in the property
1721 // Most of these checks are done in `../schema.ts` when the
1722 // JSON Schema files are generated. These checks may be moved
1723 // to elsewhere.
1724 const message = `${title}.${name} differs to that on ${existing.domainIncludes.join(', ')}`;
1725 if (id !== existing.id) throw new Error(`${message}: @id ${id}`);
1726 if (isPlural !== existing.isPlural) throw new Error(`${message}: isPlural ${isPlural.toString()}`); // Add the type...
1727
1728 existing.domainIncludes.push(title);
1729 }
1730 });
1731 return prev;
1732 }, {}); // Sort by key
1733
1734 PROPERTIES = Object.keys(props).sort().reduce((prev, key) => _extends({}, prev, {
1735 [key]: props[key]
1736 }), {});
1737 }
1738
1739 return PROPERTIES;
1740}
1741
1742/**
1743 * Get the type of a node
1744 *
1745 * @param {Node} node The schema node to get the type for
1746 */
1747
1748const nodeType = node => {
1749 if (node === null) return 'Null';
1750 if (typeof node === 'boolean') return 'Boolean';
1751 if (typeof node === 'number') return 'Number';
1752 if (typeof node === 'string') return 'String';
1753 if (Array.isArray(node)) return 'Array';
1754 if (isEntity(node)) return node.type;
1755 return 'Object';
1756};
1757
1758/**
1759 * Get the URL used in Microdata attributes.
1760 *
1761 * This is used to normalize the versioned URL from the
1762 * JSON-LD context.
1763 */
1764
1765function microdataUrl(type = '') {
1766 return `https://schema.stenci.la/${type}`;
1767}
1768/**
1769 * Create `MicrodataItem` attributes for a node.
1770 *
1771 * Does not create the `itemscope` and `itemtype` attributes for nodes that
1772 * are primitive (and therefore which do not represent a "scope" having
1773 * `itemprop`s nested within it). Instead, for primitive nodes, other than `Text`
1774 * add the `itemtype` attribute, do they can be styled if so desired.
1775 *
1776 * @param node The node to create Microdata attributes for
1777 * @param id Id of the Microdata item. Used to link to this node using the `itemref` property.
1778 */
1779
1780function microdataItem(node, id) {
1781 const itemtype = microdataItemtype(nodeType(node));
1782 const itemidAttr = id !== undefined ? {
1783 itemid: `#${id}`
1784 } : {};
1785 if (itemtype !== undefined && !isPrimitive(node)) return _extends({
1786 itemscope: '',
1787 itemtype
1788 }, itemidAttr);else if (typeof node !== 'string') return _extends({
1789 'itemtype': itemtype
1790 }, itemidAttr);else return itemidAttr;
1791}
1792/**
1793 * Get the HTML Microdata `itemtype` for a Stencila Schema type
1794 *
1795 * @see {@link https://www.w3.org/TR/microdata/#dfn-itemtype}
1796 */
1797
1798function microdataItemtype(type) {
1799 var _jsonLdTermUrl;
1800
1801 return (_jsonLdTermUrl = jsonLdTermUrl(type)) == null ? void 0 : _jsonLdTermUrl.replace(jsonLdUrl(), microdataUrl());
1802}
1803/**
1804 * Get the Stencila Schema type from a HTML Microdata `itemtype`.
1805 *
1806 * This is the inverse of `microdataItemtype`.
1807 */
1808
1809function microdataType(itemtype) {
1810 return jsonLdTermName(itemtype.replace(microdataUrl(), jsonLdUrl()));
1811}
1812/**
1813 * Create `MicrodataProperty` attributes for a node property.
1814 *
1815 * @param property The name of the property
1816 * @param isItem Is the node for which attributes are being generated
1817 * an item within an array property? e.g. a `Person` in `authors`.
1818 * @param id Id of another Microdata item to link to using the `itemref` property.
1819 */
1820
1821function microdataProperty(property, role, id) {
1822 const [prefix, name = ''] = microdataItemprop(property, role);
1823 const key = prefix === 'schema' ? 'itemprop' : 'data-prop';
1824 const itemrefAttr = id !== undefined ? {
1825 itemref: id
1826 } : {};
1827 return _extends({
1828 [key]: name
1829 }, itemrefAttr);
1830}
1831/**
1832 * Get the HTML Microdata `itemprop` for a Stencila Schema property.
1833 *
1834 * The `itemprop` attribute is normally just the name of the property
1835 * i.e. it is not prefixed by a base URL. This function returns the
1836 * `[prefix, name]` pair e.g. `["schema", "author"]`,
1837 * `["codemeta", "maintainer"]` because you may only want to encode
1838 * `itemprop`s for well known schemas e.g. schema.org
1839 *
1840 * @see {@link https://www.w3.org/TR/microdata/#dfn-attr-itemprop}
1841 *
1842 * @param property The name of the property
1843 * @param role Is the node for which attributes are being generated
1844 * an item within an array property? e.g. a `Person` in `authors`.
1845 */
1846
1847function microdataItemprop(property, role) {
1848 if (role === 'array') return ['stencila', property];
1849 const context = jsonLdContext();
1850 const mapping = context[property];
1851 if (mapping === undefined) return [undefined, undefined];
1852 if (typeof mapping === 'string') return [undefined, mapping];
1853 const id = mapping['@id'];
1854 let [prefix, name] = id.split(':'); // If this is an item in an array property and the
1855 // name is a plural, then return a singular name.
1856 // For external vocabs the `@id` is usually a singular already e.g.
1857 // schema:author
1858 // codemeta:maintainer
1859
1860 if (role === 'item' && prefix === 'stencila' && name.endsWith('s')) name = name.slice(0, -1);
1861 return [prefix, name];
1862}
1863/**
1864 * Create all Microdata attributes for a Stencila `Node`.
1865 *
1866 * @param node The node e.g. a `Person` node
1867 * @param property The name of the property that this node is part of e.g `authors`
1868 * @param role Is this an item within an array property e.g a `Person` within `authors`
1869 * @param id The id used to link to / from this Microdata item
1870 */
1871
1872function microdata(node, property, role, id) {
1873 return _extends({}, role !== 'array' ? microdataItem(node, property === undefined ? id : undefined) : {}, property !== undefined ? microdataProperty(property, role, id) : {});
1874}
1875/**
1876 * Get the HTML attribute for the root element.
1877 *
1878 * This attribute name / value pair is used to scope CSS variables to
1879 * the root Stencila node in an HTML document. It is used by Encoda when
1880 * encoding to HTML, it is in Thema to scope CSS variable thereby
1881 * avoiding variable name clashes from using the CSS `:root` pseudo-class.
1882 *
1883 * Although not directly related to Microdata, given it is used in potentially
1884 * more than one project, this appears to be the best place for it.
1885 */
1886
1887function microdataRoot() {
1888 return {
1889 'data-root': ''
1890 };
1891}
1892
1893export { CitationIntentEnumeration, arrayValidator, article, audioObject, blockContentTypes, booleanValidator, brand, cite, citeGroup, claim, code, codeBlock, codeChunk, codeError, codeExecutable, codeExecutableTypes, codeExpression, codeFragment, codeTypes, collection, comment, constantValidator, contactPoint, contactPointTypes, creativeWork, creativeWorkTypes, datatable, datatableColumn, date, definedTerm, del, emphasis, entity, entityTypes, enumValidator, enumeration, enumerationTypes, figure, function_, grant, grantTypes, heading, imageObject, include, inlineContentTypes, integerValidator, isA, isBlockContent, isEntity, isIn, isInTypeMap, isInlineContent, isMember, isPrimitive, isType, jsonLdContext, jsonLdTermName, jsonLdTermUrl, jsonLdUrl, jsonSchemaProperties, jsonSchemaTypes, jsonSchemas, link, list, listItem, mark, markTypes, math, mathBlock, mathFragment, mathTypes, mediaObject, mediaObjectTypes, microdata, microdataItem, microdataItemprop, microdataItemtype, microdataProperty, microdataRoot, microdataType, microdataUrl, monetaryGrant, nodeType, 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, thing, thingTypes, tupleValidator, unions, validator, validatorTypes, variable, version, versionMajor, versionMinor, videoObject, volumeMount };
1894//# sourceMappingURL=index.mjs.map