@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
@@ -0,0 +1,55 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the bacteria labs. No prop states the conclusion a lab leads to,
5
+ * so none holds answer state.
6
+ */
7
+ export declare function bacteriaVisuals<E>(rich: RichSlot<E>): {
8
+ BinaryFissionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly labels: Schema.Struct<{
12
+ readonly cells: RichSlot<E>;
13
+ readonly generations: RichSlot<E>;
14
+ readonly minutes: Schema.Trimmed;
15
+ readonly viewLabel: Schema.Trimmed;
16
+ }>;
17
+ }>, "figure">;
18
+ ChemotaxisLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
19
+ readonly description: RichSlot<E>;
20
+ readonly title: RichSlot<E>;
21
+ readonly labels: Schema.Struct<{
22
+ readonly elapsed: RichSlot<E>;
23
+ readonly mutant: RichSlot<E>;
24
+ readonly sensing: RichSlot<E>;
25
+ readonly viewLabel: Schema.Trimmed;
26
+ }>;
27
+ }>, "figure">;
28
+ GramStainLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
29
+ readonly description: RichSlot<E>;
30
+ readonly title: RichSlot<E>;
31
+ readonly labels: Schema.Struct<{
32
+ readonly chooseStep: Schema.Trimmed;
33
+ readonly hues: Schema.$Record<Schema.Literals<readonly ["clear", "purple", "pink"]>, RichSlot<E>>;
34
+ readonly negative: RichSlot<E>;
35
+ readonly positive: RichSlot<E>;
36
+ readonly steps: Schema.$Record<Schema.Literals<readonly ["smear", "violet", "iodine", "alcohol", "safranin"]>, Schema.Trimmed>;
37
+ readonly viewLabel: Schema.Trimmed;
38
+ }>;
39
+ }>, "figure">;
40
+ YogurtLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
41
+ readonly description: RichSlot<E>;
42
+ readonly title: RichSlot<E>;
43
+ readonly labels: Schema.Struct<{
44
+ readonly hours: Schema.Trimmed;
45
+ readonly ph: RichSlot<E>;
46
+ readonly state: RichSlot<E>;
47
+ readonly states: Schema.Struct<{
48
+ readonly liquid: RichSlot<E>;
49
+ readonly set: RichSlot<E>;
50
+ }>;
51
+ readonly tilt: Schema.Trimmed;
52
+ readonly viewLabel: Schema.Trimmed;
53
+ }>;
54
+ }>, "figure">;
55
+ };
@@ -0,0 +1,79 @@
1
+ import { Schema } from "effect";
2
+ import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /**
5
+ * Props of `BinaryFissionLab`: one cell of Escherichia coli on agar becomes a
6
+ * colony by binary fission.
7
+ */
8
+ function binaryFissionLab(rich) {
9
+ return figure(Schema.Struct({
10
+ ...cardFields(rich),
11
+ labels: Schema.Struct({
12
+ cells: rich,
13
+ generations: rich,
14
+ minutes: TextSchema,
15
+ viewLabel: TextSchema,
16
+ }),
17
+ }));
18
+ }
19
+ /**
20
+ * Props of `ChemotaxisLab`: two Escherichia coli cells swim in a dish whose
21
+ * sugar comes from a crystal on the right.
22
+ */
23
+ function chemotaxisLab(rich) {
24
+ return figure(Schema.Struct({
25
+ ...cardFields(rich),
26
+ labels: Schema.Struct({
27
+ elapsed: rich,
28
+ mutant: rich,
29
+ sensing: rich,
30
+ viewLabel: TextSchema,
31
+ }),
32
+ }));
33
+ }
34
+ /**
35
+ * Props of `GramStainLab`: a Gram stain under the microscope, step by step, on
36
+ * a slide that carries three shapes of bacteria at 1000×.
37
+ */
38
+ function gramStainLab(rich) {
39
+ return figure(Schema.Struct({
40
+ ...cardFields(rich),
41
+ labels: Schema.Struct({
42
+ chooseStep: TextSchema,
43
+ hues: byIds(["clear", "purple", "pink"], rich),
44
+ negative: rich,
45
+ positive: rich,
46
+ steps: byIds(["smear", "violet", "iodine", "alcohol", "safranin"], TextSchema),
47
+ viewLabel: TextSchema,
48
+ }),
49
+ }));
50
+ }
51
+ /**
52
+ * Props of `YogurtLab`: milk with a spoonful of yoghurt culture sits in a
53
+ * yoghurt maker at 43 °C.
54
+ */
55
+ function yogurtLab(rich) {
56
+ return figure(Schema.Struct({
57
+ ...cardFields(rich),
58
+ labels: Schema.Struct({
59
+ hours: TextSchema,
60
+ ph: rich,
61
+ state: rich,
62
+ states: Schema.Struct({ liquid: rich, set: rich }),
63
+ tilt: TextSchema,
64
+ viewLabel: TextSchema,
65
+ }),
66
+ }));
67
+ }
68
+ /**
69
+ * The props of the bacteria labs. No prop states the conclusion a lab leads to,
70
+ * so none holds answer state.
71
+ */
72
+ export function bacteriaVisuals(rich) {
73
+ return {
74
+ BinaryFissionLab: binaryFissionLab(rich),
75
+ ChemotaxisLab: chemotaxisLab(rich),
76
+ GramStainLab: gramStainLab(rich),
77
+ YogurtLab: yogurtLab(rich),
78
+ };
79
+ }
@@ -0,0 +1,89 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the cell and DNA labs. No prop states the conclusion a lab leads
5
+ * to, so none holds answer state.
6
+ */
7
+ export declare function cellVisuals<E>(rich: RichSlot<E>): {
8
+ CellCutawayLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly cells: Schema.$Array<Schema.Literals<readonly ["animal", "plant", "yeast", "bacterium"]>>;
12
+ readonly labels: Schema.Struct<{
13
+ readonly cells: Schema.Struct<{
14
+ readonly animal: Schema.optionalKey<RichSlot<E>>;
15
+ readonly plant: Schema.optionalKey<RichSlot<E>>;
16
+ readonly yeast: Schema.optionalKey<RichSlot<E>>;
17
+ readonly bacterium: Schema.optionalKey<RichSlot<E>>;
18
+ }>;
19
+ readonly choose: Schema.Trimmed;
20
+ readonly facts: Schema.Struct<{
21
+ readonly animal: Schema.optionalKey<Schema.Struct<{
22
+ readonly nucleus: RichSlot<E>;
23
+ readonly power: RichSlot<E>;
24
+ readonly wall: RichSlot<E>;
25
+ }>>;
26
+ readonly bacterium: Schema.optionalKey<Schema.Struct<{
27
+ readonly nucleus: RichSlot<E>;
28
+ readonly power: RichSlot<E>;
29
+ readonly wall: RichSlot<E>;
30
+ }>>;
31
+ readonly plant: Schema.optionalKey<Schema.Struct<{
32
+ readonly nucleus: RichSlot<E>;
33
+ readonly power: RichSlot<E>;
34
+ readonly wall: RichSlot<E>;
35
+ }>>;
36
+ readonly yeast: Schema.optionalKey<Schema.Struct<{
37
+ readonly nucleus: RichSlot<E>;
38
+ readonly power: RichSlot<E>;
39
+ readonly wall: RichSlot<E>;
40
+ }>>;
41
+ }>;
42
+ readonly minutes: Schema.optionalKey<Schema.Trimmed>;
43
+ readonly nucleus: RichSlot<E>;
44
+ readonly power: RichSlot<E>;
45
+ readonly size: RichSlot<E>;
46
+ readonly viewLabel: Schema.Trimmed;
47
+ readonly wall: RichSlot<E>;
48
+ }>;
49
+ }>, "figure">;
50
+ CellScaleLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
51
+ readonly description: RichSlot<E>;
52
+ readonly title: RichSlot<E>;
53
+ readonly labels: Schema.Struct<{
54
+ readonly bacterium: RichSlot<E>;
55
+ readonly cell: RichSlot<E>;
56
+ readonly view: RichSlot<E>;
57
+ readonly viewLabel: Schema.Trimmed;
58
+ readonly virion: RichSlot<E>;
59
+ readonly zoom: Schema.Trimmed;
60
+ }>;
61
+ }>, "figure">;
62
+ DnaHelixLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
63
+ readonly description: RichSlot<E>;
64
+ readonly title: RichSlot<E>;
65
+ readonly copy: Schema.optionalKey<Schema.Boolean>;
66
+ readonly genome: Schema.optionalKey<Schema.Finite>;
67
+ readonly labels: Schema.Struct<{
68
+ readonly choose: Schema.optionalKey<Schema.Trimmed>;
69
+ readonly copied: Schema.optionalKey<RichSlot<E>>;
70
+ readonly copy: Schema.optionalKey<Schema.Trimmed>;
71
+ readonly differences: Schema.optionalKey<RichSlot<E>>;
72
+ readonly gc: Schema.optionalKey<RichSlot<E>>;
73
+ readonly identity: Schema.optionalKey<RichSlot<E>>;
74
+ readonly length: RichSlot<E>;
75
+ readonly share: Schema.optionalKey<RichSlot<E>>;
76
+ readonly span: RichSlot<E>;
77
+ readonly strands: Schema.optionalKey<Schema.Struct<{
78
+ readonly first: RichSlot<E>;
79
+ readonly second: RichSlot<E>;
80
+ }>>;
81
+ readonly turns: Schema.optionalKey<RichSlot<E>>;
82
+ readonly viewLabel: Schema.Trimmed;
83
+ readonly whole: Schema.optionalKey<RichSlot<E>>;
84
+ }>;
85
+ readonly nucleic: Schema.optionalKey<Schema.Literals<readonly ["dna", "rna"]>>;
86
+ readonly sequence: Schema.Trimmed;
87
+ readonly variant: Schema.optionalKey<Schema.Trimmed>;
88
+ }>, "figure">;
89
+ };
@@ -0,0 +1,95 @@
1
+ import { Schema } from "effect";
2
+ import { cardFields, TextSchema } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /** The facts the cell cutaway lab gives for one kind of cell. */
5
+ function cellFacts(rich) {
6
+ return Schema.Struct({ nucleus: rich, power: rich, wall: rich });
7
+ }
8
+ /**
9
+ * Props of `CellCutawayLab`: a cell cut in half, so the reader looks into it as
10
+ * into a bowl.
11
+ */
12
+ function cellCutawayLab(rich) {
13
+ return figure(Schema.Struct({
14
+ ...cardFields(rich),
15
+ cells: Schema.Array(Schema.Literals(["animal", "plant", "yeast", "bacterium"])),
16
+ labels: Schema.Struct({
17
+ cells: Schema.Struct({
18
+ animal: Schema.optionalKey(rich),
19
+ plant: Schema.optionalKey(rich),
20
+ yeast: Schema.optionalKey(rich),
21
+ bacterium: Schema.optionalKey(rich),
22
+ }),
23
+ choose: TextSchema,
24
+ facts: Schema.Struct({
25
+ animal: Schema.optionalKey(cellFacts(rich)),
26
+ bacterium: Schema.optionalKey(cellFacts(rich)),
27
+ plant: Schema.optionalKey(cellFacts(rich)),
28
+ yeast: Schema.optionalKey(cellFacts(rich)),
29
+ }),
30
+ minutes: Schema.optionalKey(TextSchema),
31
+ nucleus: rich,
32
+ power: rich,
33
+ size: rich,
34
+ viewLabel: TextSchema,
35
+ wall: rich,
36
+ }),
37
+ }));
38
+ }
39
+ /**
40
+ * Props of `CellScaleLab`: an animal cell, an Escherichia coli rod and a
41
+ * SARS-CoV-2 virion side by side at their real sizes.
42
+ */
43
+ function cellScaleLab(rich) {
44
+ return figure(Schema.Struct({
45
+ ...cardFields(rich),
46
+ labels: Schema.Struct({
47
+ bacterium: rich,
48
+ cell: rich,
49
+ view: rich,
50
+ viewLabel: TextSchema,
51
+ virion: rich,
52
+ zoom: TextSchema,
53
+ }),
54
+ }));
55
+ }
56
+ /**
57
+ * Props of `DnaHelixLab`: a stretch of DNA or RNA built base by base at B-DNA's
58
+ * real geometry.
59
+ */
60
+ function dnaHelixLab(rich) {
61
+ return figure(Schema.Struct({
62
+ ...cardFields(rich),
63
+ copy: Schema.optionalKey(Schema.Boolean),
64
+ genome: Schema.optionalKey(Schema.Finite),
65
+ labels: Schema.Struct({
66
+ choose: Schema.optionalKey(TextSchema),
67
+ copied: Schema.optionalKey(rich),
68
+ copy: Schema.optionalKey(TextSchema),
69
+ differences: Schema.optionalKey(rich),
70
+ gc: Schema.optionalKey(rich),
71
+ identity: Schema.optionalKey(rich),
72
+ length: rich,
73
+ share: Schema.optionalKey(rich),
74
+ span: rich,
75
+ strands: Schema.optionalKey(Schema.Struct({ first: rich, second: rich })),
76
+ turns: Schema.optionalKey(rich),
77
+ viewLabel: TextSchema,
78
+ whole: Schema.optionalKey(rich),
79
+ }),
80
+ nucleic: Schema.optionalKey(Schema.Literals(["dna", "rna"])),
81
+ sequence: TextSchema,
82
+ variant: Schema.optionalKey(TextSchema),
83
+ }));
84
+ }
85
+ /**
86
+ * The props of the cell and DNA labs. No prop states the conclusion a lab leads
87
+ * to, so none holds answer state.
88
+ */
89
+ export function cellVisuals(rich) {
90
+ return {
91
+ CellCutawayLab: cellCutawayLab(rich),
92
+ CellScaleLab: cellScaleLab(rich),
93
+ DnaHelixLab: dnaHelixLab(rich),
94
+ };
95
+ }
@@ -0,0 +1,75 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the climate labs. No prop states the conclusion a lab leads to,
5
+ * so none holds answer state.
6
+ */
7
+ export declare function climateVisuals<E>(rich: RichSlot<E>): {
8
+ CarbonBudgetLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly labels: Schema.Struct<{
12
+ readonly above: Schema.optionalKey<RichSlot<E>>;
13
+ readonly chooseRegions: Schema.optionalKey<Schema.Trimmed>;
14
+ readonly cut: Schema.optionalKey<Schema.Trimmed>;
15
+ readonly emissions: Schema.optionalKey<RichSlot<E>>;
16
+ readonly forest: Schema.optionalKey<Schema.Trimmed>;
17
+ readonly level: RichSlot<E>;
18
+ readonly peak: Schema.optionalKey<RichSlot<E>>;
19
+ readonly perYear: Schema.optionalKey<Schema.Trimmed>;
20
+ readonly rate: Schema.optionalKey<RichSlot<E>>;
21
+ readonly regions: Schema.optionalKey<Schema.$Record<Schema.Literals<readonly ["china", "usa", "india", "europe", "rest"]>, RichSlot<E>>>;
22
+ readonly rise: Schema.optionalKey<RichSlot<E>>;
23
+ readonly viewLabel: Schema.Trimmed;
24
+ readonly warming: Schema.optionalKey<RichSlot<E>>;
25
+ readonly year: Schema.optionalKey<Schema.Trimmed>;
26
+ }>;
27
+ readonly mode: Schema.Literals<readonly ["cooperate", "mitigate", "record"]>;
28
+ }>, "figure">;
29
+ CoralBleachLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
30
+ readonly description: RichSlot<E>;
31
+ readonly title: RichSlot<E>;
32
+ readonly labels: Schema.Struct<{
33
+ readonly alert: RichSlot<E>;
34
+ readonly alerts: Schema.$Record<Schema.Literals<readonly ["calm", "watch", "warning", "bleaching", "dying"]>, RichSlot<E>>;
35
+ readonly dhw: RichSlot<E>;
36
+ readonly hotspot: RichSlot<E>;
37
+ readonly temperature: Schema.Trimmed;
38
+ readonly viewLabel: Schema.Trimmed;
39
+ readonly weeks: Schema.Trimmed;
40
+ }>;
41
+ }>, "figure">;
42
+ SeaLevelRiseLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
43
+ readonly description: RichSlot<E>;
44
+ readonly title: RichSlot<E>;
45
+ readonly labels: Schema.Struct<{
46
+ readonly choose: Schema.optionalKey<Schema.Trimmed>;
47
+ readonly defences: Schema.optionalKey<Schema.Struct<{
48
+ readonly wall: Schema.optionalKey<RichSlot<E>>;
49
+ readonly mangrove: Schema.optionalKey<RichSlot<E>>;
50
+ readonly storm: Schema.optionalKey<RichSlot<E>>;
51
+ }>>;
52
+ readonly flooded: Schema.optionalKey<RichSlot<E>>;
53
+ readonly level: RichSlot<E>;
54
+ readonly perYear: Schema.optionalKey<Schema.Trimmed>;
55
+ readonly range: Schema.optionalKey<RichSlot<E>>;
56
+ readonly rate: Schema.optionalKey<RichSlot<E>>;
57
+ readonly retreat: RichSlot<E>;
58
+ readonly rise: Schema.optionalKey<Schema.Trimmed>;
59
+ readonly scenarios: Schema.optionalKey<Schema.Struct<{
60
+ readonly ssp119: Schema.optionalKey<RichSlot<E>>;
61
+ readonly ssp126: Schema.optionalKey<RichSlot<E>>;
62
+ readonly ssp245: Schema.optionalKey<RichSlot<E>>;
63
+ readonly ssp370: Schema.optionalKey<RichSlot<E>>;
64
+ readonly ssp585: Schema.optionalKey<RichSlot<E>>;
65
+ }>>;
66
+ readonly span: Schema.optionalKey<RichSlot<E>>;
67
+ readonly viewLabel: Schema.Trimmed;
68
+ readonly warming: Schema.optionalKey<RichSlot<E>>;
69
+ readonly wave: Schema.optionalKey<RichSlot<E>>;
70
+ readonly year: Schema.optionalKey<Schema.Trimmed>;
71
+ }>;
72
+ readonly mode: Schema.Literals<readonly ["adapt", "flood", "record", "scenario"]>;
73
+ readonly scenarios: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["ssp119", "ssp126", "ssp245", "ssp370", "ssp585"]>>>;
74
+ }>, "figure">;
75
+ };
@@ -0,0 +1,94 @@
1
+ import { Schema } from "effect";
2
+ import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /** Props of `CarbonBudgetLab`: the air as a bathtub. */
5
+ function carbonBudgetLab(rich) {
6
+ return figure(Schema.Struct({
7
+ ...cardFields(rich),
8
+ labels: Schema.Struct({
9
+ above: Schema.optionalKey(rich),
10
+ chooseRegions: Schema.optionalKey(TextSchema),
11
+ cut: Schema.optionalKey(TextSchema),
12
+ emissions: Schema.optionalKey(rich),
13
+ forest: Schema.optionalKey(TextSchema),
14
+ level: rich,
15
+ peak: Schema.optionalKey(rich),
16
+ perYear: Schema.optionalKey(TextSchema),
17
+ rate: Schema.optionalKey(rich),
18
+ regions: Schema.optionalKey(byIds(["china", "usa", "india", "europe", "rest"], rich)),
19
+ rise: Schema.optionalKey(rich),
20
+ viewLabel: TextSchema,
21
+ warming: Schema.optionalKey(rich),
22
+ year: Schema.optionalKey(TextSchema),
23
+ }),
24
+ mode: Schema.Literals(["cooperate", "mitigate", "record"]),
25
+ }));
26
+ }
27
+ /**
28
+ * Props of `CoralBleachLab`: a reef tank on a lab bench with corals from a reef
29
+ * whose warmest month averages 29 °C.
30
+ */
31
+ function coralBleachLab(rich) {
32
+ return figure(Schema.Struct({
33
+ ...cardFields(rich),
34
+ labels: Schema.Struct({
35
+ alert: rich,
36
+ alerts: byIds(["calm", "watch", "warning", "bleaching", "dying"], rich),
37
+ dhw: rich,
38
+ hotspot: rich,
39
+ temperature: TextSchema,
40
+ viewLabel: TextSchema,
41
+ weeks: TextSchema,
42
+ }),
43
+ }));
44
+ }
45
+ /**
46
+ * Props of `SeaLevelRiseLab`: a coastal village on a beach that climbs 1 m
47
+ * every 20 m inland, at real scale, with a tide gauge at today's high-tide
48
+ * line.
49
+ */
50
+ function seaLevelRiseLab(rich) {
51
+ return figure(Schema.Struct({
52
+ ...cardFields(rich),
53
+ labels: Schema.Struct({
54
+ choose: Schema.optionalKey(TextSchema),
55
+ defences: Schema.optionalKey(Schema.Struct({
56
+ wall: Schema.optionalKey(rich),
57
+ mangrove: Schema.optionalKey(rich),
58
+ storm: Schema.optionalKey(rich),
59
+ })),
60
+ flooded: Schema.optionalKey(rich),
61
+ level: rich,
62
+ perYear: Schema.optionalKey(TextSchema),
63
+ range: Schema.optionalKey(rich),
64
+ rate: Schema.optionalKey(rich),
65
+ retreat: rich,
66
+ rise: Schema.optionalKey(TextSchema),
67
+ scenarios: Schema.optionalKey(Schema.Struct({
68
+ ssp119: Schema.optionalKey(rich),
69
+ ssp126: Schema.optionalKey(rich),
70
+ ssp245: Schema.optionalKey(rich),
71
+ ssp370: Schema.optionalKey(rich),
72
+ ssp585: Schema.optionalKey(rich),
73
+ })),
74
+ span: Schema.optionalKey(rich),
75
+ viewLabel: TextSchema,
76
+ warming: Schema.optionalKey(rich),
77
+ wave: Schema.optionalKey(rich),
78
+ year: Schema.optionalKey(TextSchema),
79
+ }),
80
+ mode: Schema.Literals(["adapt", "flood", "record", "scenario"]),
81
+ scenarios: Schema.optionalKey(Schema.Array(Schema.Literals(["ssp119", "ssp126", "ssp245", "ssp370", "ssp585"]))),
82
+ }));
83
+ }
84
+ /**
85
+ * The props of the climate labs. No prop states the conclusion a lab leads to,
86
+ * so none holds answer state.
87
+ */
88
+ export function climateVisuals(rich) {
89
+ return {
90
+ CarbonBudgetLab: carbonBudgetLab(rich),
91
+ CoralBleachLab: coralBleachLab(rich),
92
+ SeaLevelRiseLab: seaLevelRiseLab(rich),
93
+ };
94
+ }
@@ -0,0 +1,75 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the ecology and disease labs. No prop states the conclusion a
5
+ * lab leads to, so none holds answer state.
6
+ */
7
+ export declare function ecologyVisuals<E>(rich: RichSlot<E>): {
8
+ PredatorPreyLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly capacity: Schema.optionalKey<Schema.Finite>;
12
+ readonly labels: Schema.Struct<{
13
+ readonly peak: RichSlot<E>;
14
+ readonly predators: RichSlot<E>;
15
+ readonly prey: RichSlot<E>;
16
+ readonly start: Schema.Trimmed;
17
+ readonly viewLabel: Schema.Trimmed;
18
+ readonly year: RichSlot<E>;
19
+ }>;
20
+ }>, "figure">;
21
+ EpidemicSpreadLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
22
+ readonly description: RichSlot<E>;
23
+ readonly title: RichSlot<E>;
24
+ readonly labels: Schema.Struct<{
25
+ readonly chooseRoute: Schema.optionalKey<Schema.Trimmed>;
26
+ readonly distancing: Schema.optionalKey<Schema.Trimmed>;
27
+ readonly immune: RichSlot<E>;
28
+ readonly infected: RichSlot<E>;
29
+ readonly masks: Schema.optionalKey<Schema.Trimmed>;
30
+ readonly peak: RichSlot<E>;
31
+ readonly recovered: RichSlot<E>;
32
+ readonly reproduction: RichSlot<E>;
33
+ readonly routes: Schema.optionalKey<Schema.Struct<{
34
+ readonly air: RichSlot<E>;
35
+ readonly touch: RichSlot<E>;
36
+ }>>;
37
+ readonly susceptible: RichSlot<E>;
38
+ readonly vaccinated: Schema.optionalKey<Schema.Trimmed>;
39
+ readonly viewLabel: Schema.Trimmed;
40
+ readonly washing: Schema.optionalKey<Schema.Trimmed>;
41
+ }>;
42
+ readonly measures: Schema.$Array<Schema.Literals<readonly ["masks", "washing", "vaccinated", "distancing"]>>;
43
+ readonly routes: Schema.optionalKey<Schema.$Array<Schema.Literals<readonly ["air", "touch"]>>>;
44
+ }>, "figure">;
45
+ HyphaeDecayLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
46
+ readonly description: RichSlot<E>;
47
+ readonly title: RichSlot<E>;
48
+ readonly labels: Schema.Struct<{
49
+ readonly cover: RichSlot<E>;
50
+ readonly hours: Schema.Trimmed;
51
+ readonly length: RichSlot<E>;
52
+ readonly time: RichSlot<E>;
53
+ readonly tips: RichSlot<E>;
54
+ readonly viewLabel: Schema.Trimmed;
55
+ }>;
56
+ }>, "figure">;
57
+ AntibodyNeutralizeLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
58
+ readonly description: RichSlot<E>;
59
+ readonly title: RichSlot<E>;
60
+ readonly labels: Schema.Struct<{
61
+ readonly blocked: RichSlot<E>;
62
+ readonly chance: RichSlot<E>;
63
+ readonly choose: Schema.optionalKey<Schema.Trimmed>;
64
+ readonly covered: RichSlot<E>;
65
+ readonly day: Schema.optionalKey<Schema.Trimmed>;
66
+ readonly level: RichSlot<E>;
67
+ readonly people: Schema.optionalKey<Schema.Struct<{
68
+ readonly unvaccinated: RichSlot<E>;
69
+ readonly vaccinated: RichSlot<E>;
70
+ }>>;
71
+ readonly viewLabel: Schema.Trimmed;
72
+ }>;
73
+ readonly mode: Schema.Literals<readonly ["days", "vaccine"]>;
74
+ }>, "figure">;
75
+ };
@@ -0,0 +1,94 @@
1
+ import { Schema } from "effect";
2
+ import { cardFields, TextSchema } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /**
5
+ * Props of `PredatorPreyLab`: a rice field seen from above, with the rats that
6
+ * eat its grain and the barn owls that hunt them, as the Lotka-Volterra model
7
+ * runs them over 20 years.
8
+ */
9
+ function predatorPreyLab(rich) {
10
+ return figure(Schema.Struct({
11
+ ...cardFields(rich),
12
+ capacity: Schema.optionalKey(Schema.Finite),
13
+ labels: Schema.Struct({
14
+ peak: rich,
15
+ predators: rich,
16
+ prey: rich,
17
+ start: TextSchema,
18
+ viewLabel: TextSchema,
19
+ year: rich,
20
+ }),
21
+ }));
22
+ }
23
+ /**
24
+ * Props of `EpidemicSpreadLab`: a town square of 60 m by 40 m where people
25
+ * stroll past a fountain while a virus spreads.
26
+ */
27
+ function epidemicSpreadLab(rich) {
28
+ return figure(Schema.Struct({
29
+ ...cardFields(rich),
30
+ labels: Schema.Struct({
31
+ chooseRoute: Schema.optionalKey(TextSchema),
32
+ distancing: Schema.optionalKey(TextSchema),
33
+ immune: rich,
34
+ infected: rich,
35
+ masks: Schema.optionalKey(TextSchema),
36
+ peak: rich,
37
+ recovered: rich,
38
+ reproduction: rich,
39
+ routes: Schema.optionalKey(Schema.Struct({ air: rich, touch: rich })),
40
+ susceptible: rich,
41
+ vaccinated: Schema.optionalKey(TextSchema),
42
+ viewLabel: TextSchema,
43
+ washing: Schema.optionalKey(TextSchema),
44
+ }),
45
+ measures: Schema.Array(Schema.Literals(["masks", "washing", "vaccinated", "distancing"])),
46
+ routes: Schema.optionalKey(Schema.Array(Schema.Literals(["air", "touch"]))),
47
+ }));
48
+ }
49
+ /** Props of `HyphaeDecayLab`: tempeh in the making, seen from above. */
50
+ function hyphaeDecayLab(rich) {
51
+ return figure(Schema.Struct({
52
+ ...cardFields(rich),
53
+ labels: Schema.Struct({
54
+ cover: rich,
55
+ hours: TextSchema,
56
+ length: rich,
57
+ time: rich,
58
+ tips: rich,
59
+ viewLabel: TextSchema,
60
+ }),
61
+ }));
62
+ }
63
+ /**
64
+ * Props of `AntibodyNeutralizeLab`: SARS-CoV-2 virions about 100 nm across
65
+ * drift down to a cell whose surface carries ACE2 receptors.
66
+ */
67
+ function antibodyNeutralizeLab(rich) {
68
+ return figure(Schema.Struct({
69
+ ...cardFields(rich),
70
+ labels: Schema.Struct({
71
+ blocked: rich,
72
+ chance: rich,
73
+ choose: Schema.optionalKey(TextSchema),
74
+ covered: rich,
75
+ day: Schema.optionalKey(TextSchema),
76
+ level: rich,
77
+ people: Schema.optionalKey(Schema.Struct({ unvaccinated: rich, vaccinated: rich })),
78
+ viewLabel: TextSchema,
79
+ }),
80
+ mode: Schema.Literals(["days", "vaccine"]),
81
+ }));
82
+ }
83
+ /**
84
+ * The props of the ecology and disease labs. No prop states the conclusion a
85
+ * lab leads to, so none holds answer state.
86
+ */
87
+ export function ecologyVisuals(rich) {
88
+ return {
89
+ PredatorPreyLab: predatorPreyLab(rich),
90
+ EpidemicSpreadLab: epidemicSpreadLab(rich),
91
+ HyphaeDecayLab: hyphaeDecayLab(rich),
92
+ AntibodyNeutralizeLab: antibodyNeutralizeLab(rich),
93
+ };
94
+ }