UNPKG

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