@nakafa/aksara-contracts 6.5.0 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/dist/assessment/catalog.d.ts +18 -5
  2. package/dist/assessment/catalog.js +18 -8
  3. package/dist/assessment/choice.d.ts +10 -0
  4. package/dist/assessment/closure.d.ts +2 -1
  5. package/dist/assessment/closure.js +43 -62
  6. package/dist/assessment/document.d.ts +18 -0
  7. package/dist/assessment/document.js +10 -0
  8. package/dist/assessment/figure.d.ts +25 -2676
  9. package/dist/assessment/figure.js +17 -216
  10. package/dist/assessment/hash.d.ts +274 -4
  11. package/dist/assessment/inline.d.ts +25 -0
  12. package/dist/assessment/inline.js +22 -3
  13. package/dist/assessment/interaction.d.ts +10 -0
  14. package/dist/assessment/item.d.ts +864 -0
  15. package/dist/assessment/item.js +10 -2
  16. package/dist/assessment/locales.d.ts +10 -0
  17. package/dist/assessment/locales.js +58 -0
  18. package/dist/assessment/paper.d.ts +1349 -12
  19. package/dist/assessment/paper.js +93 -9
  20. package/dist/assessment/part.d.ts +5 -0
  21. package/dist/assessment/profile.d.ts +4 -4
  22. package/dist/assessment/rows.d.ts +1409 -0
  23. package/dist/assessment/rows.js +44 -0
  24. package/dist/assessment/scalar.d.ts +1 -1
  25. package/dist/assessment/scoring.d.ts +1 -1
  26. package/dist/assessment/snapshot.d.ts +372 -20
  27. package/dist/assessment/structure.d.ts +6 -0
  28. package/dist/assessment/structure.js +22 -2
  29. package/dist/locale.d.ts +9 -9
  30. package/dist/locale.js +4 -3
  31. package/dist/program/snapshot/hash.d.ts +2 -2
  32. package/dist/program/snapshot/spec.d.ts +2 -2
  33. package/dist/projection/material.d.ts +10 -0
  34. package/dist/projection/material.js +1 -1
  35. package/dist/quran/attribution.d.ts +2 -2
  36. package/dist/quran/identity.d.ts +31 -10
  37. package/dist/quran/identity.js +15 -3
  38. package/dist/quran/provenance.d.ts +16 -16
  39. package/dist/quran/provenance.js +4 -1
  40. package/dist/quran/snapshot/hash.d.ts +2 -2
  41. package/dist/quran/snapshot/row/hash.d.ts +48 -15
  42. package/dist/quran/snapshot/row.d.ts +18 -8
  43. package/dist/quran/snapshot/spec.d.ts +2 -2
  44. package/dist/quran/source.d.ts +17 -7
  45. package/dist/quran/source.js +13 -1
  46. package/dist/quran/spec.d.ts +4 -4
  47. package/dist/quran/spec.js +2 -1
  48. package/dist/release/current/evidence.d.ts +9 -9
  49. package/dist/release/current/state.d.ts +11 -11
  50. package/dist/release/hash.d.ts +2 -2
  51. package/dist/release/identity.d.ts +1 -1
  52. package/dist/release/lifecycle.d.ts +7 -7
  53. package/dist/release/policy.d.ts +1 -1
  54. package/dist/release/snapshot/data.d.ts +36 -11
  55. package/dist/release/snapshot/evidence/assessment.d.ts +1 -1
  56. package/dist/release/snapshot/evidence/program.d.ts +1 -1
  57. package/dist/release/snapshot/evidence/quran.d.ts +1 -1
  58. package/dist/release/snapshot/evidence.d.ts +3 -3
  59. package/dist/release/snapshot/verify.d.ts +179 -12
  60. package/dist/release/spec.d.ts +13 -13
  61. package/dist/release/verify.d.ts +2 -2
  62. package/dist/runtime/spec.d.ts +6 -6
  63. package/dist/runtime/verify.d.ts +4 -4
  64. package/dist/transport/group.d.ts +108 -33
  65. package/dist/transport/request.d.ts +1166 -114
  66. package/dist/transport/response.d.ts +64 -64
  67. package/dist/transport/snapshot.d.ts +72 -22
  68. package/dist/visual/base/layout.d.ts +27 -0
  69. package/dist/visual/base/layout.js +35 -0
  70. package/dist/visual/base/math.d.ts +523 -0
  71. package/dist/visual/base/math.js +72 -0
  72. package/dist/visual/base/media.d.ts +13 -0
  73. package/dist/visual/base/media.js +25 -0
  74. package/dist/visual/biology/bacteria.d.ts +55 -0
  75. package/dist/visual/biology/bacteria.js +79 -0
  76. package/dist/visual/biology/cell.d.ts +89 -0
  77. package/dist/visual/biology/cell.js +95 -0
  78. package/dist/visual/biology/climate.d.ts +75 -0
  79. package/dist/visual/biology/climate.js +94 -0
  80. package/dist/visual/biology/ecology.d.ts +75 -0
  81. package/dist/visual/biology/ecology.js +94 -0
  82. package/dist/visual/biology.d.ts +203 -0
  83. package/dist/visual/biology.js +108 -0
  84. package/dist/visual/card.d.ts +32 -0
  85. package/dist/visual/card.js +30 -0
  86. package/dist/visual/catalog.d.ts +3372 -0
  87. package/dist/visual/catalog.js +119 -0
  88. package/dist/visual/chemistry/atom.d.ts +79 -0
  89. package/dist/visual/chemistry/atom.js +109 -0
  90. package/dist/visual/chemistry/balance.d.ts +79 -0
  91. package/dist/visual/chemistry/balance.js +128 -0
  92. package/dist/visual/chemistry/bonding.d.ts +80 -0
  93. package/dist/visual/chemistry/bonding.js +147 -0
  94. package/dist/visual/chemistry/discovery.d.ts +96 -0
  95. package/dist/visual/chemistry/discovery.js +137 -0
  96. package/dist/visual/chemistry/electron.d.ts +41 -0
  97. package/dist/visual/chemistry/electron.js +69 -0
  98. package/dist/visual/chemistry/laws.d.ts +86 -0
  99. package/dist/visual/chemistry/laws.js +117 -0
  100. package/dist/visual/chemistry/particles.d.ts +114 -0
  101. package/dist/visual/chemistry/particles.js +149 -0
  102. package/dist/visual/chemistry/periodic.d.ts +52 -0
  103. package/dist/visual/chemistry/periodic.js +85 -0
  104. package/dist/visual/chemistry/reaction.d.ts +60 -0
  105. package/dist/visual/chemistry/reaction.js +76 -0
  106. package/dist/visual/entry.d.ts +42 -0
  107. package/dist/visual/entry.js +48 -0
  108. package/dist/visual/mathematics/chart.d.ts +30 -0
  109. package/dist/{assessment → visual/mathematics}/chart.js +26 -18
  110. package/dist/visual/mathematics/charts.d.ts +118 -0
  111. package/dist/visual/mathematics/charts.js +100 -0
  112. package/dist/visual/mathematics/function.d.ts +82 -0
  113. package/dist/visual/mathematics/function.js +102 -0
  114. package/dist/visual/mathematics/geometry.d.ts +222 -0
  115. package/dist/visual/mathematics/geometry.js +81 -0
  116. package/dist/visual/mathematics/line.d.ts +179 -0
  117. package/dist/visual/mathematics/line.js +156 -0
  118. package/dist/visual/mathematics/number.d.ts +21 -0
  119. package/dist/visual/mathematics/number.js +53 -0
  120. package/dist/visual/physics/braking.d.ts +62 -0
  121. package/dist/visual/physics/braking.js +83 -0
  122. package/dist/visual/physics/circular.d.ts +36 -0
  123. package/dist/visual/physics/circular.js +51 -0
  124. package/dist/visual/physics/efficiency.d.ts +93 -0
  125. package/dist/visual/physics/efficiency.js +129 -0
  126. package/dist/visual/physics/falling.d.ts +56 -0
  127. package/dist/visual/physics/falling.js +77 -0
  128. package/dist/visual/physics/force.d.ts +88 -0
  129. package/dist/visual/physics/force.js +115 -0
  130. package/dist/visual/physics/instrument.d.ts +93 -0
  131. package/dist/visual/physics/instrument.js +135 -0
  132. package/dist/visual/physics/measurement.d.ts +66 -0
  133. package/dist/visual/physics/measurement.js +85 -0
  134. package/dist/visual/physics/motion.d.ts +85 -0
  135. package/dist/visual/physics/motion.js +110 -0
  136. package/dist/visual/physics/parabolic.d.ts +42 -0
  137. package/dist/visual/physics/parabolic.js +56 -0
  138. package/dist/visual/physics/position.d.ts +87 -0
  139. package/dist/visual/physics/position.js +123 -0
  140. package/dist/visual/physics/power.d.ts +121 -0
  141. package/dist/visual/physics/power.js +162 -0
  142. package/dist/visual/physics/precision.d.ts +96 -0
  143. package/dist/visual/physics/precision.js +137 -0
  144. package/dist/visual/physics/product.d.ts +73 -0
  145. package/dist/visual/physics/product.js +96 -0
  146. package/dist/visual/physics/record.d.ts +34 -0
  147. package/dist/visual/physics/record.js +46 -0
  148. package/dist/visual/physics/relative.d.ts +55 -0
  149. package/dist/visual/physics/relative.js +76 -0
  150. package/dist/visual/physics/solar.d.ts +91 -0
  151. package/dist/visual/physics/solar.js +126 -0
  152. package/dist/visual/physics/vector.d.ts +103 -0
  153. package/dist/visual/physics/vector.js +123 -0
  154. package/dist/visual/physics/velocity.d.ts +112 -0
  155. package/dist/visual/physics/velocity.js +144 -0
  156. package/dist/visual/politics.d.ts +92 -0
  157. package/dist/visual/politics.js +76 -0
  158. package/package.json +13 -5
  159. package/dist/assessment/chart.d.ts +0 -62
@@ -120,6 +120,11 @@ export declare const ItemVersionBodySchema: Schema.Struct<{
120
120
  readonly label: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
121
121
  readonly marks: Schema.optionalKey<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
122
122
  readonly type: Schema.Literals<readonly ["bold", "italic", "underline", "code", "subscript", "superscript"]>;
123
+ }>, Schema.Struct<{
124
+ readonly attrs: Schema.Struct<{
125
+ readonly variant: Schema.NullOr<Schema.Literals<readonly ["success", "warning"]>>;
126
+ }>;
127
+ readonly type: Schema.Literal<"highlight">;
123
128
  }>, Schema.Struct<{
124
129
  readonly attrs: Schema.Struct<{
125
130
  readonly href: Schema.String;
@@ -196,6 +201,11 @@ export declare const ItemVersionBodySchema: Schema.Struct<{
196
201
  readonly label: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
197
202
  readonly marks: Schema.optionalKey<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
198
203
  readonly type: Schema.Literals<readonly ["bold", "italic", "underline", "code", "subscript", "superscript"]>;
204
+ }>, Schema.Struct<{
205
+ readonly attrs: Schema.Struct<{
206
+ readonly variant: Schema.NullOr<Schema.Literals<readonly ["success", "warning"]>>;
207
+ }>;
208
+ readonly type: Schema.Literal<"highlight">;
199
209
  }>, Schema.Struct<{
200
210
  readonly attrs: Schema.Struct<{
201
211
  readonly href: Schema.String;
@@ -370,6 +380,11 @@ export declare const ItemVersionSchema: Schema.Struct<{
370
380
  readonly label: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
371
381
  readonly marks: Schema.optionalKey<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
372
382
  readonly type: Schema.Literals<readonly ["bold", "italic", "underline", "code", "subscript", "superscript"]>;
383
+ }>, Schema.Struct<{
384
+ readonly attrs: Schema.Struct<{
385
+ readonly variant: Schema.NullOr<Schema.Literals<readonly ["success", "warning"]>>;
386
+ }>;
387
+ readonly type: Schema.Literal<"highlight">;
373
388
  }>, Schema.Struct<{
374
389
  readonly attrs: Schema.Struct<{
375
390
  readonly href: Schema.String;
@@ -446,6 +461,11 @@ export declare const ItemVersionSchema: Schema.Struct<{
446
461
  readonly label: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
447
462
  readonly marks: Schema.optionalKey<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
448
463
  readonly type: Schema.Literals<readonly ["bold", "italic", "underline", "code", "subscript", "superscript"]>;
464
+ }>, Schema.Struct<{
465
+ readonly attrs: Schema.Struct<{
466
+ readonly variant: Schema.NullOr<Schema.Literals<readonly ["success", "warning"]>>;
467
+ }>;
468
+ readonly type: Schema.Literal<"highlight">;
449
469
  }>, Schema.Struct<{
450
470
  readonly attrs: Schema.Struct<{
451
471
  readonly href: Schema.String;
@@ -536,6 +556,840 @@ export declare const ItemVersionSchema: Schema.Struct<{
536
556
  readonly hash: Schema.brand<Schema.String, "@NakafaAI/AksaraSha256Hash">;
537
557
  }>;
538
558
  export type ItemVersion = typeof ItemVersionSchema.Type;
559
+ /**
560
+ * The parts of a version that every language of its item shares once its words
561
+ * are dropped: the interactions, the joint rule with its levels as sets, and
562
+ * the scoring rules.
563
+ */
564
+ export declare function versionStructure({ interactions, joint, scoring, }: Pick<typeof ItemVersionBodySchema.Type, "interactions" | "joint" | "scoring">): {
565
+ interactions: readonly [{
566
+ readonly id: string;
567
+ readonly label: string;
568
+ readonly kind: "choice";
569
+ readonly maxChoices: number;
570
+ readonly minChoices: number;
571
+ readonly options: readonly {
572
+ readonly id: string;
573
+ readonly label: {
574
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
575
+ readonly type: "doc";
576
+ };
577
+ }[];
578
+ readonly shuffle: boolean;
579
+ } | {
580
+ readonly id: string;
581
+ readonly label: string;
582
+ readonly columns: readonly {
583
+ readonly id: string;
584
+ readonly label: {
585
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
586
+ readonly type: "doc";
587
+ };
588
+ }[];
589
+ readonly kind: "matrix";
590
+ readonly shuffle: boolean;
591
+ readonly statements: readonly [{
592
+ readonly id: string;
593
+ readonly label: {
594
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
595
+ readonly type: "doc";
596
+ };
597
+ }, ...{
598
+ readonly id: string;
599
+ readonly label: {
600
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
601
+ readonly type: "doc";
602
+ };
603
+ }[]];
604
+ } | {
605
+ readonly id: string;
606
+ readonly label: string;
607
+ readonly kind: "match";
608
+ readonly shuffle: boolean;
609
+ readonly sources: readonly [{
610
+ readonly id: string;
611
+ readonly label: {
612
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
613
+ readonly type: "doc";
614
+ };
615
+ readonly maxMatches: number;
616
+ }, ...{
617
+ readonly id: string;
618
+ readonly label: {
619
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
620
+ readonly type: "doc";
621
+ };
622
+ readonly maxMatches: number;
623
+ }[]];
624
+ readonly targets: readonly [{
625
+ readonly id: string;
626
+ readonly label: {
627
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
628
+ readonly type: "doc";
629
+ };
630
+ readonly maxMatches: number;
631
+ }, ...{
632
+ readonly id: string;
633
+ readonly label: {
634
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
635
+ readonly type: "doc";
636
+ };
637
+ readonly maxMatches: number;
638
+ }[]];
639
+ } | {
640
+ readonly id: string;
641
+ readonly label: string;
642
+ readonly items: readonly {
643
+ readonly id: string;
644
+ readonly label: {
645
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
646
+ readonly type: "doc";
647
+ };
648
+ }[];
649
+ readonly kind: "order";
650
+ readonly maxChoices: number;
651
+ readonly minChoices: number;
652
+ readonly shuffle: boolean;
653
+ } | {
654
+ readonly id: string;
655
+ readonly label: string;
656
+ readonly kind: "inlineChoice";
657
+ readonly options: readonly {
658
+ readonly id: string;
659
+ readonly label: readonly [{
660
+ readonly attrs: {
661
+ readonly latex: string;
662
+ };
663
+ readonly type: "mathInline";
664
+ } | {
665
+ readonly marks?: readonly [{
666
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
667
+ } | {
668
+ readonly attrs: {
669
+ readonly href: string;
670
+ };
671
+ readonly type: "link";
672
+ } | {
673
+ readonly attrs: {
674
+ readonly variant: "success" | "warning" | null;
675
+ };
676
+ readonly type: "highlight";
677
+ }, ...({
678
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
679
+ } | {
680
+ readonly attrs: {
681
+ readonly href: string;
682
+ };
683
+ readonly type: "link";
684
+ } | {
685
+ readonly attrs: {
686
+ readonly variant: "success" | "warning" | null;
687
+ };
688
+ readonly type: "highlight";
689
+ })[]];
690
+ readonly text: string;
691
+ readonly type: "text";
692
+ }, ...({
693
+ readonly attrs: {
694
+ readonly latex: string;
695
+ };
696
+ readonly type: "mathInline";
697
+ } | {
698
+ readonly marks?: readonly [{
699
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
700
+ } | {
701
+ readonly attrs: {
702
+ readonly href: string;
703
+ };
704
+ readonly type: "link";
705
+ } | {
706
+ readonly attrs: {
707
+ readonly variant: "success" | "warning" | null;
708
+ };
709
+ readonly type: "highlight";
710
+ }, ...({
711
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
712
+ } | {
713
+ readonly attrs: {
714
+ readonly href: string;
715
+ };
716
+ readonly type: "link";
717
+ } | {
718
+ readonly attrs: {
719
+ readonly variant: "success" | "warning" | null;
720
+ };
721
+ readonly type: "highlight";
722
+ })[]];
723
+ readonly text: string;
724
+ readonly type: "text";
725
+ })[]];
726
+ }[];
727
+ readonly shuffle: boolean;
728
+ } | {
729
+ readonly id: string;
730
+ readonly label: string;
731
+ readonly choices: readonly [{
732
+ readonly id: string;
733
+ readonly label: readonly [{
734
+ readonly attrs: {
735
+ readonly latex: string;
736
+ };
737
+ readonly type: "mathInline";
738
+ } | {
739
+ readonly marks?: readonly [{
740
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
741
+ } | {
742
+ readonly attrs: {
743
+ readonly href: string;
744
+ };
745
+ readonly type: "link";
746
+ } | {
747
+ readonly attrs: {
748
+ readonly variant: "success" | "warning" | null;
749
+ };
750
+ readonly type: "highlight";
751
+ }, ...({
752
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
753
+ } | {
754
+ readonly attrs: {
755
+ readonly href: string;
756
+ };
757
+ readonly type: "link";
758
+ } | {
759
+ readonly attrs: {
760
+ readonly variant: "success" | "warning" | null;
761
+ };
762
+ readonly type: "highlight";
763
+ })[]];
764
+ readonly text: string;
765
+ readonly type: "text";
766
+ }, ...({
767
+ readonly attrs: {
768
+ readonly latex: string;
769
+ };
770
+ readonly type: "mathInline";
771
+ } | {
772
+ readonly marks?: readonly [{
773
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
774
+ } | {
775
+ readonly attrs: {
776
+ readonly href: string;
777
+ };
778
+ readonly type: "link";
779
+ } | {
780
+ readonly attrs: {
781
+ readonly variant: "success" | "warning" | null;
782
+ };
783
+ readonly type: "highlight";
784
+ }, ...({
785
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
786
+ } | {
787
+ readonly attrs: {
788
+ readonly href: string;
789
+ };
790
+ readonly type: "link";
791
+ } | {
792
+ readonly attrs: {
793
+ readonly variant: "success" | "warning" | null;
794
+ };
795
+ readonly type: "highlight";
796
+ })[]];
797
+ readonly text: string;
798
+ readonly type: "text";
799
+ })[]];
800
+ readonly maxMatches: number;
801
+ }, ...{
802
+ readonly id: string;
803
+ readonly label: readonly [{
804
+ readonly attrs: {
805
+ readonly latex: string;
806
+ };
807
+ readonly type: "mathInline";
808
+ } | {
809
+ readonly marks?: readonly [{
810
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
811
+ } | {
812
+ readonly attrs: {
813
+ readonly href: string;
814
+ };
815
+ readonly type: "link";
816
+ } | {
817
+ readonly attrs: {
818
+ readonly variant: "success" | "warning" | null;
819
+ };
820
+ readonly type: "highlight";
821
+ }, ...({
822
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
823
+ } | {
824
+ readonly attrs: {
825
+ readonly href: string;
826
+ };
827
+ readonly type: "link";
828
+ } | {
829
+ readonly attrs: {
830
+ readonly variant: "success" | "warning" | null;
831
+ };
832
+ readonly type: "highlight";
833
+ })[]];
834
+ readonly text: string;
835
+ readonly type: "text";
836
+ }, ...({
837
+ readonly attrs: {
838
+ readonly latex: string;
839
+ };
840
+ readonly type: "mathInline";
841
+ } | {
842
+ readonly marks?: readonly [{
843
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
844
+ } | {
845
+ readonly attrs: {
846
+ readonly href: string;
847
+ };
848
+ readonly type: "link";
849
+ } | {
850
+ readonly attrs: {
851
+ readonly variant: "success" | "warning" | null;
852
+ };
853
+ readonly type: "highlight";
854
+ }, ...({
855
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
856
+ } | {
857
+ readonly attrs: {
858
+ readonly href: string;
859
+ };
860
+ readonly type: "link";
861
+ } | {
862
+ readonly attrs: {
863
+ readonly variant: "success" | "warning" | null;
864
+ };
865
+ readonly type: "highlight";
866
+ })[]];
867
+ readonly text: string;
868
+ readonly type: "text";
869
+ })[]];
870
+ readonly maxMatches: number;
871
+ }[]];
872
+ readonly gaps: readonly [{
873
+ readonly id: string;
874
+ }, ...{
875
+ readonly id: string;
876
+ }[]];
877
+ readonly kind: "gapMatch";
878
+ readonly shuffle: boolean;
879
+ } | {
880
+ readonly id: string;
881
+ readonly label: string;
882
+ readonly kind: "mathEntry";
883
+ } | {
884
+ readonly id: string;
885
+ readonly label: string;
886
+ readonly areas: readonly ({
887
+ readonly id: string;
888
+ readonly label: string;
889
+ readonly coords: readonly [number, number, number, number];
890
+ readonly shape: "rect";
891
+ } | {
892
+ readonly id: string;
893
+ readonly label: string;
894
+ readonly coords: readonly [number, number, number];
895
+ readonly shape: "circle";
896
+ } | {
897
+ readonly id: string;
898
+ readonly label: string;
899
+ readonly coords: readonly [number, number, number, number];
900
+ readonly shape: "ellipse";
901
+ } | {
902
+ readonly id: string;
903
+ readonly label: string;
904
+ readonly coords: readonly [number, number, number, number, number, number, ...number[]];
905
+ readonly shape: "poly";
906
+ } | {
907
+ readonly id: string;
908
+ readonly label: string;
909
+ readonly shape: "default";
910
+ })[];
911
+ readonly image: {
912
+ readonly alt: string;
913
+ readonly asset: string;
914
+ readonly height: number;
915
+ readonly width: number;
916
+ };
917
+ readonly kind: "hotspot";
918
+ readonly maxChoices: number;
919
+ readonly minChoices: number;
920
+ } | {
921
+ readonly id: string;
922
+ readonly label: string;
923
+ readonly expectedLength?: number;
924
+ readonly kind: "textEntry";
925
+ } | {
926
+ readonly id: string;
927
+ readonly label: string;
928
+ readonly acceptsFractions: boolean;
929
+ readonly kind: "numericEntry";
930
+ readonly unit?: string;
931
+ } | {
932
+ readonly id: string;
933
+ readonly label: string;
934
+ readonly expectedLines?: number;
935
+ readonly kind: "extendedText";
936
+ } | {
937
+ readonly id: string;
938
+ readonly label: string;
939
+ readonly count: number;
940
+ readonly frame: {
941
+ readonly kind: "cartesian";
942
+ readonly x: {
943
+ readonly max: number;
944
+ readonly min: number;
945
+ };
946
+ readonly y: {
947
+ readonly max: number;
948
+ readonly min: number;
949
+ };
950
+ };
951
+ readonly kind: "graphPoint";
952
+ readonly placing: "lines" | "points";
953
+ readonly snap?: number;
954
+ }, ...({
955
+ readonly id: string;
956
+ readonly label: string;
957
+ readonly kind: "choice";
958
+ readonly maxChoices: number;
959
+ readonly minChoices: number;
960
+ readonly options: readonly {
961
+ readonly id: string;
962
+ readonly label: {
963
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
964
+ readonly type: "doc";
965
+ };
966
+ }[];
967
+ readonly shuffle: boolean;
968
+ } | {
969
+ readonly id: string;
970
+ readonly label: string;
971
+ readonly columns: readonly {
972
+ readonly id: string;
973
+ readonly label: {
974
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
975
+ readonly type: "doc";
976
+ };
977
+ }[];
978
+ readonly kind: "matrix";
979
+ readonly shuffle: boolean;
980
+ readonly statements: readonly [{
981
+ readonly id: string;
982
+ readonly label: {
983
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
984
+ readonly type: "doc";
985
+ };
986
+ }, ...{
987
+ readonly id: string;
988
+ readonly label: {
989
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
990
+ readonly type: "doc";
991
+ };
992
+ }[]];
993
+ } | {
994
+ readonly id: string;
995
+ readonly label: string;
996
+ readonly kind: "match";
997
+ readonly shuffle: boolean;
998
+ readonly sources: readonly [{
999
+ readonly id: string;
1000
+ readonly label: {
1001
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
1002
+ readonly type: "doc";
1003
+ };
1004
+ readonly maxMatches: number;
1005
+ }, ...{
1006
+ readonly id: string;
1007
+ readonly label: {
1008
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
1009
+ readonly type: "doc";
1010
+ };
1011
+ readonly maxMatches: number;
1012
+ }[]];
1013
+ readonly targets: readonly [{
1014
+ readonly id: string;
1015
+ readonly label: {
1016
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
1017
+ readonly type: "doc";
1018
+ };
1019
+ readonly maxMatches: number;
1020
+ }, ...{
1021
+ readonly id: string;
1022
+ readonly label: {
1023
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
1024
+ readonly type: "doc";
1025
+ };
1026
+ readonly maxMatches: number;
1027
+ }[]];
1028
+ } | {
1029
+ readonly id: string;
1030
+ readonly label: string;
1031
+ readonly items: readonly {
1032
+ readonly id: string;
1033
+ readonly label: {
1034
+ readonly content: readonly [import("#contracts/assessment/document").BlockNode, ...import("#contracts/assessment/document").BlockNode[]];
1035
+ readonly type: "doc";
1036
+ };
1037
+ }[];
1038
+ readonly kind: "order";
1039
+ readonly maxChoices: number;
1040
+ readonly minChoices: number;
1041
+ readonly shuffle: boolean;
1042
+ } | {
1043
+ readonly id: string;
1044
+ readonly label: string;
1045
+ readonly kind: "inlineChoice";
1046
+ readonly options: readonly {
1047
+ readonly id: string;
1048
+ readonly label: readonly [{
1049
+ readonly attrs: {
1050
+ readonly latex: string;
1051
+ };
1052
+ readonly type: "mathInline";
1053
+ } | {
1054
+ readonly marks?: readonly [{
1055
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
1056
+ } | {
1057
+ readonly attrs: {
1058
+ readonly href: string;
1059
+ };
1060
+ readonly type: "link";
1061
+ } | {
1062
+ readonly attrs: {
1063
+ readonly variant: "success" | "warning" | null;
1064
+ };
1065
+ readonly type: "highlight";
1066
+ }, ...({
1067
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
1068
+ } | {
1069
+ readonly attrs: {
1070
+ readonly href: string;
1071
+ };
1072
+ readonly type: "link";
1073
+ } | {
1074
+ readonly attrs: {
1075
+ readonly variant: "success" | "warning" | null;
1076
+ };
1077
+ readonly type: "highlight";
1078
+ })[]];
1079
+ readonly text: string;
1080
+ readonly type: "text";
1081
+ }, ...({
1082
+ readonly attrs: {
1083
+ readonly latex: string;
1084
+ };
1085
+ readonly type: "mathInline";
1086
+ } | {
1087
+ readonly marks?: readonly [{
1088
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
1089
+ } | {
1090
+ readonly attrs: {
1091
+ readonly href: string;
1092
+ };
1093
+ readonly type: "link";
1094
+ } | {
1095
+ readonly attrs: {
1096
+ readonly variant: "success" | "warning" | null;
1097
+ };
1098
+ readonly type: "highlight";
1099
+ }, ...({
1100
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
1101
+ } | {
1102
+ readonly attrs: {
1103
+ readonly href: string;
1104
+ };
1105
+ readonly type: "link";
1106
+ } | {
1107
+ readonly attrs: {
1108
+ readonly variant: "success" | "warning" | null;
1109
+ };
1110
+ readonly type: "highlight";
1111
+ })[]];
1112
+ readonly text: string;
1113
+ readonly type: "text";
1114
+ })[]];
1115
+ }[];
1116
+ readonly shuffle: boolean;
1117
+ } | {
1118
+ readonly id: string;
1119
+ readonly label: string;
1120
+ readonly choices: readonly [{
1121
+ readonly id: string;
1122
+ readonly label: readonly [{
1123
+ readonly attrs: {
1124
+ readonly latex: string;
1125
+ };
1126
+ readonly type: "mathInline";
1127
+ } | {
1128
+ readonly marks?: readonly [{
1129
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
1130
+ } | {
1131
+ readonly attrs: {
1132
+ readonly href: string;
1133
+ };
1134
+ readonly type: "link";
1135
+ } | {
1136
+ readonly attrs: {
1137
+ readonly variant: "success" | "warning" | null;
1138
+ };
1139
+ readonly type: "highlight";
1140
+ }, ...({
1141
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
1142
+ } | {
1143
+ readonly attrs: {
1144
+ readonly href: string;
1145
+ };
1146
+ readonly type: "link";
1147
+ } | {
1148
+ readonly attrs: {
1149
+ readonly variant: "success" | "warning" | null;
1150
+ };
1151
+ readonly type: "highlight";
1152
+ })[]];
1153
+ readonly text: string;
1154
+ readonly type: "text";
1155
+ }, ...({
1156
+ readonly attrs: {
1157
+ readonly latex: string;
1158
+ };
1159
+ readonly type: "mathInline";
1160
+ } | {
1161
+ readonly marks?: readonly [{
1162
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
1163
+ } | {
1164
+ readonly attrs: {
1165
+ readonly href: string;
1166
+ };
1167
+ readonly type: "link";
1168
+ } | {
1169
+ readonly attrs: {
1170
+ readonly variant: "success" | "warning" | null;
1171
+ };
1172
+ readonly type: "highlight";
1173
+ }, ...({
1174
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
1175
+ } | {
1176
+ readonly attrs: {
1177
+ readonly href: string;
1178
+ };
1179
+ readonly type: "link";
1180
+ } | {
1181
+ readonly attrs: {
1182
+ readonly variant: "success" | "warning" | null;
1183
+ };
1184
+ readonly type: "highlight";
1185
+ })[]];
1186
+ readonly text: string;
1187
+ readonly type: "text";
1188
+ })[]];
1189
+ readonly maxMatches: number;
1190
+ }, ...{
1191
+ readonly id: string;
1192
+ readonly label: readonly [{
1193
+ readonly attrs: {
1194
+ readonly latex: string;
1195
+ };
1196
+ readonly type: "mathInline";
1197
+ } | {
1198
+ readonly marks?: readonly [{
1199
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
1200
+ } | {
1201
+ readonly attrs: {
1202
+ readonly href: string;
1203
+ };
1204
+ readonly type: "link";
1205
+ } | {
1206
+ readonly attrs: {
1207
+ readonly variant: "success" | "warning" | null;
1208
+ };
1209
+ readonly type: "highlight";
1210
+ }, ...({
1211
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
1212
+ } | {
1213
+ readonly attrs: {
1214
+ readonly href: string;
1215
+ };
1216
+ readonly type: "link";
1217
+ } | {
1218
+ readonly attrs: {
1219
+ readonly variant: "success" | "warning" | null;
1220
+ };
1221
+ readonly type: "highlight";
1222
+ })[]];
1223
+ readonly text: string;
1224
+ readonly type: "text";
1225
+ }, ...({
1226
+ readonly attrs: {
1227
+ readonly latex: string;
1228
+ };
1229
+ readonly type: "mathInline";
1230
+ } | {
1231
+ readonly marks?: readonly [{
1232
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
1233
+ } | {
1234
+ readonly attrs: {
1235
+ readonly href: string;
1236
+ };
1237
+ readonly type: "link";
1238
+ } | {
1239
+ readonly attrs: {
1240
+ readonly variant: "success" | "warning" | null;
1241
+ };
1242
+ readonly type: "highlight";
1243
+ }, ...({
1244
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
1245
+ } | {
1246
+ readonly attrs: {
1247
+ readonly href: string;
1248
+ };
1249
+ readonly type: "link";
1250
+ } | {
1251
+ readonly attrs: {
1252
+ readonly variant: "success" | "warning" | null;
1253
+ };
1254
+ readonly type: "highlight";
1255
+ })[]];
1256
+ readonly text: string;
1257
+ readonly type: "text";
1258
+ })[]];
1259
+ readonly maxMatches: number;
1260
+ }[]];
1261
+ readonly gaps: readonly [{
1262
+ readonly id: string;
1263
+ }, ...{
1264
+ readonly id: string;
1265
+ }[]];
1266
+ readonly kind: "gapMatch";
1267
+ readonly shuffle: boolean;
1268
+ } | {
1269
+ readonly id: string;
1270
+ readonly label: string;
1271
+ readonly kind: "mathEntry";
1272
+ } | {
1273
+ readonly id: string;
1274
+ readonly label: string;
1275
+ readonly areas: readonly ({
1276
+ readonly id: string;
1277
+ readonly label: string;
1278
+ readonly coords: readonly [number, number, number, number];
1279
+ readonly shape: "rect";
1280
+ } | {
1281
+ readonly id: string;
1282
+ readonly label: string;
1283
+ readonly coords: readonly [number, number, number];
1284
+ readonly shape: "circle";
1285
+ } | {
1286
+ readonly id: string;
1287
+ readonly label: string;
1288
+ readonly coords: readonly [number, number, number, number];
1289
+ readonly shape: "ellipse";
1290
+ } | {
1291
+ readonly id: string;
1292
+ readonly label: string;
1293
+ readonly coords: readonly [number, number, number, number, number, number, ...number[]];
1294
+ readonly shape: "poly";
1295
+ } | {
1296
+ readonly id: string;
1297
+ readonly label: string;
1298
+ readonly shape: "default";
1299
+ })[];
1300
+ readonly image: {
1301
+ readonly alt: string;
1302
+ readonly asset: string;
1303
+ readonly height: number;
1304
+ readonly width: number;
1305
+ };
1306
+ readonly kind: "hotspot";
1307
+ readonly maxChoices: number;
1308
+ readonly minChoices: number;
1309
+ } | {
1310
+ readonly id: string;
1311
+ readonly label: string;
1312
+ readonly expectedLength?: number;
1313
+ readonly kind: "textEntry";
1314
+ } | {
1315
+ readonly id: string;
1316
+ readonly label: string;
1317
+ readonly acceptsFractions: boolean;
1318
+ readonly kind: "numericEntry";
1319
+ readonly unit?: string;
1320
+ } | {
1321
+ readonly id: string;
1322
+ readonly label: string;
1323
+ readonly expectedLines?: number;
1324
+ readonly kind: "extendedText";
1325
+ } | {
1326
+ readonly id: string;
1327
+ readonly label: string;
1328
+ readonly count: number;
1329
+ readonly frame: {
1330
+ readonly kind: "cartesian";
1331
+ readonly x: {
1332
+ readonly max: number;
1333
+ readonly min: number;
1334
+ };
1335
+ readonly y: {
1336
+ readonly max: number;
1337
+ readonly min: number;
1338
+ };
1339
+ };
1340
+ readonly kind: "graphPoint";
1341
+ readonly placing: "lines" | "points";
1342
+ readonly snap?: number;
1343
+ })[]];
1344
+ joint: {
1345
+ levels: [{
1346
+ correct: [string, ...string[]];
1347
+ points: number;
1348
+ }, ...{
1349
+ correct: [string, ...string[]];
1350
+ points: number;
1351
+ }[]];
1352
+ } | undefined;
1353
+ scoring: readonly {
1354
+ readonly interaction: string;
1355
+ readonly rule: {
1356
+ readonly kind: "allOrNothing";
1357
+ } | {
1358
+ readonly bands: readonly [{
1359
+ readonly points: number;
1360
+ readonly wrong: number;
1361
+ }, ...{
1362
+ readonly points: number;
1363
+ readonly wrong: number;
1364
+ }[]];
1365
+ readonly kind: "wrongParts";
1366
+ } | {
1367
+ readonly criteria: readonly [{
1368
+ readonly id: string;
1369
+ readonly label: string;
1370
+ readonly levels: readonly {
1371
+ readonly id: string;
1372
+ readonly label: string;
1373
+ readonly points: number;
1374
+ }[];
1375
+ }, ...{
1376
+ readonly id: string;
1377
+ readonly label: string;
1378
+ readonly levels: readonly {
1379
+ readonly id: string;
1380
+ readonly label: string;
1381
+ readonly points: number;
1382
+ }[];
1383
+ }[]];
1384
+ readonly kind: "rubric";
1385
+ } | {
1386
+ readonly floor: number;
1387
+ readonly kind: "perPart";
1388
+ readonly penaltyPerWrongPart?: number;
1389
+ readonly pointsPerPart: number;
1390
+ };
1391
+ }[];
1392
+ };
539
1393
  /**
540
1394
  * One item with its versions, one for each delivery language. Every version
541
1395
  * names the family and the shared reading of the family, is written in its own
@@ -631,6 +1485,11 @@ export declare const ItemSchema: Schema.Struct<{
631
1485
  readonly label: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
632
1486
  readonly marks: Schema.optionalKey<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
633
1487
  readonly type: Schema.Literals<readonly ["bold", "italic", "underline", "code", "subscript", "superscript"]>;
1488
+ }>, Schema.Struct<{
1489
+ readonly attrs: Schema.Struct<{
1490
+ readonly variant: Schema.NullOr<Schema.Literals<readonly ["success", "warning"]>>;
1491
+ }>;
1492
+ readonly type: Schema.Literal<"highlight">;
634
1493
  }>, Schema.Struct<{
635
1494
  readonly attrs: Schema.Struct<{
636
1495
  readonly href: Schema.String;
@@ -707,6 +1566,11 @@ export declare const ItemSchema: Schema.Struct<{
707
1566
  readonly label: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
708
1567
  readonly marks: Schema.optionalKey<Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
709
1568
  readonly type: Schema.Literals<readonly ["bold", "italic", "underline", "code", "subscript", "superscript"]>;
1569
+ }>, Schema.Struct<{
1570
+ readonly attrs: Schema.Struct<{
1571
+ readonly variant: Schema.NullOr<Schema.Literals<readonly ["success", "warning"]>>;
1572
+ }>;
1573
+ readonly type: Schema.Literal<"highlight">;
710
1574
  }>, Schema.Struct<{
711
1575
  readonly attrs: Schema.Struct<{
712
1576
  readonly href: Schema.String;