@nakafa/aksara-contracts 7.0.0 → 8.0.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 (74) hide show
  1. package/dist/assessment/figure.d.ts +24 -48725
  2. package/dist/assessment/figure.js +10 -6
  3. package/dist/visual/base/layout.d.ts +6 -6
  4. package/dist/visual/base/math.d.ts +4 -4
  5. package/dist/visual/base/media.d.ts +2 -2
  6. package/dist/visual/biology/bacteria.d.ts +55 -0
  7. package/dist/visual/biology/bacteria.js +79 -0
  8. package/dist/visual/biology/cell.d.ts +89 -0
  9. package/dist/visual/biology/cell.js +95 -0
  10. package/dist/visual/biology/climate.d.ts +75 -0
  11. package/dist/visual/biology/climate.js +94 -0
  12. package/dist/visual/biology/ecology.d.ts +75 -0
  13. package/dist/visual/biology/ecology.js +94 -0
  14. package/dist/visual/biology.d.ts +9 -9
  15. package/dist/visual/card.d.ts +0 -2
  16. package/dist/visual/card.js +0 -6
  17. package/dist/visual/catalog.d.ts +1610 -27079
  18. package/dist/visual/catalog.js +47 -1
  19. package/dist/visual/chemistry/atom.d.ts +4 -4
  20. package/dist/visual/chemistry/balance.d.ts +79 -0
  21. package/dist/visual/chemistry/balance.js +128 -0
  22. package/dist/visual/chemistry/bonding.d.ts +80 -0
  23. package/dist/visual/chemistry/bonding.js +147 -0
  24. package/dist/visual/chemistry/discovery.d.ts +96 -0
  25. package/dist/visual/chemistry/discovery.js +137 -0
  26. package/dist/visual/chemistry/electron.d.ts +2 -2
  27. package/dist/visual/chemistry/laws.d.ts +4 -4
  28. package/dist/visual/chemistry/particles.d.ts +5 -5
  29. package/dist/visual/chemistry/periodic.d.ts +2 -2
  30. package/dist/visual/chemistry/reaction.d.ts +3 -3
  31. package/dist/visual/entry.d.ts +4 -4
  32. package/dist/visual/mathematics/chart.d.ts +1 -1
  33. package/dist/visual/mathematics/charts.d.ts +5 -5
  34. package/dist/visual/mathematics/function.d.ts +7 -7
  35. package/dist/visual/mathematics/geometry.d.ts +4 -213
  36. package/dist/visual/mathematics/geometry.js +3 -65
  37. package/dist/visual/physics/braking.d.ts +62 -0
  38. package/dist/visual/physics/braking.js +83 -0
  39. package/dist/visual/physics/circular.d.ts +36 -0
  40. package/dist/visual/physics/circular.js +51 -0
  41. package/dist/visual/physics/efficiency.d.ts +93 -0
  42. package/dist/visual/physics/efficiency.js +129 -0
  43. package/dist/visual/physics/falling.d.ts +56 -0
  44. package/dist/visual/physics/falling.js +77 -0
  45. package/dist/visual/physics/force.d.ts +88 -0
  46. package/dist/visual/physics/force.js +115 -0
  47. package/dist/visual/physics/instrument.d.ts +93 -0
  48. package/dist/visual/physics/instrument.js +135 -0
  49. package/dist/visual/physics/measurement.d.ts +4 -4
  50. package/dist/visual/physics/motion.d.ts +6 -6
  51. package/dist/visual/physics/parabolic.d.ts +2 -2
  52. package/dist/visual/physics/position.d.ts +87 -0
  53. package/dist/visual/physics/position.js +123 -0
  54. package/dist/visual/physics/power.d.ts +121 -0
  55. package/dist/visual/physics/power.js +162 -0
  56. package/dist/visual/physics/precision.d.ts +96 -0
  57. package/dist/visual/physics/precision.js +137 -0
  58. package/dist/visual/physics/product.d.ts +73 -0
  59. package/dist/visual/physics/product.js +96 -0
  60. package/dist/visual/physics/record.d.ts +34 -0
  61. package/dist/visual/physics/record.js +46 -0
  62. package/dist/visual/physics/relative.d.ts +55 -0
  63. package/dist/visual/physics/relative.js +76 -0
  64. package/dist/visual/physics/solar.d.ts +91 -0
  65. package/dist/visual/physics/solar.js +126 -0
  66. package/dist/visual/physics/vector.d.ts +103 -0
  67. package/dist/visual/physics/vector.js +123 -0
  68. package/dist/visual/physics/velocity.d.ts +7 -7
  69. package/dist/visual/politics.d.ts +8 -8
  70. package/package.json +1 -1
  71. package/dist/visual/mathematics/line.d.ts +0 -179
  72. package/dist/visual/mathematics/line.js +0 -156
  73. package/dist/visual/mathematics/number.d.ts +0 -21
  74. package/dist/visual/mathematics/number.js +0 -53
@@ -4,7 +4,14 @@ import { layoutVisuals } from "#contracts/visual/base/layout";
4
4
  import { mathVisuals } from "#contracts/visual/base/math";
5
5
  import { mediaVisuals } from "#contracts/visual/base/media";
6
6
  import { biologyVisuals } from "#contracts/visual/biology";
7
+ import { bacteriaVisuals } from "#contracts/visual/biology/bacteria";
8
+ import { cellVisuals } from "#contracts/visual/biology/cell";
9
+ import { climateVisuals } from "#contracts/visual/biology/climate";
10
+ import { ecologyVisuals } from "#contracts/visual/biology/ecology";
7
11
  import { atomVisuals } from "#contracts/visual/chemistry/atom";
12
+ import { balanceVisuals } from "#contracts/visual/chemistry/balance";
13
+ import { bondingVisuals } from "#contracts/visual/chemistry/bonding";
14
+ import { discoveryVisuals } from "#contracts/visual/chemistry/discovery";
8
15
  import { electronVisuals } from "#contracts/visual/chemistry/electron";
9
16
  import { lawVisuals } from "#contracts/visual/chemistry/laws";
10
17
  import { particleVisuals } from "#contracts/visual/chemistry/particles";
@@ -13,9 +20,23 @@ import { reactionVisuals } from "#contracts/visual/chemistry/reaction";
13
20
  import { chartVisuals } from "#contracts/visual/mathematics/charts";
14
21
  import { functionVisuals } from "#contracts/visual/mathematics/function";
15
22
  import { geometryVisuals } from "#contracts/visual/mathematics/geometry";
23
+ import { brakingVisuals } from "#contracts/visual/physics/braking";
24
+ import { circularVisuals } from "#contracts/visual/physics/circular";
25
+ import { efficiencyVisuals } from "#contracts/visual/physics/efficiency";
26
+ import { fallingVisuals } from "#contracts/visual/physics/falling";
27
+ import { forceVisuals } from "#contracts/visual/physics/force";
28
+ import { instrumentVisuals } from "#contracts/visual/physics/instrument";
16
29
  import { measurementVisuals } from "#contracts/visual/physics/measurement";
17
30
  import { motionVisuals } from "#contracts/visual/physics/motion";
18
31
  import { parabolicVisuals } from "#contracts/visual/physics/parabolic";
32
+ import { positionVisuals } from "#contracts/visual/physics/position";
33
+ import { powerVisuals } from "#contracts/visual/physics/power";
34
+ import { precisionVisuals } from "#contracts/visual/physics/precision";
35
+ import { productVisuals } from "#contracts/visual/physics/product";
36
+ import { recordVisuals } from "#contracts/visual/physics/record";
37
+ import { relativeVisuals } from "#contracts/visual/physics/relative";
38
+ import { solarVisuals } from "#contracts/visual/physics/solar";
39
+ import { vectorVisuals } from "#contracts/visual/physics/vector";
19
40
  import { velocityVisuals } from "#contracts/visual/physics/velocity";
20
41
  import { politicsVisuals } from "#contracts/visual/politics";
21
42
  /**
@@ -46,6 +67,27 @@ export function visualCatalog(rich) {
46
67
  ...motionVisuals(rich),
47
68
  ...parabolicVisuals(rich),
48
69
  ...velocityVisuals(rich),
70
+ ...bacteriaVisuals(rich),
71
+ ...cellVisuals(rich),
72
+ ...climateVisuals(rich),
73
+ ...ecologyVisuals(rich),
74
+ ...balanceVisuals(rich),
75
+ ...bondingVisuals(rich),
76
+ ...discoveryVisuals(rich),
77
+ ...brakingVisuals(rich),
78
+ ...circularVisuals(rich),
79
+ ...efficiencyVisuals(rich),
80
+ ...fallingVisuals(rich),
81
+ ...forceVisuals(rich),
82
+ ...instrumentVisuals(rich),
83
+ ...positionVisuals(rich),
84
+ ...powerVisuals(rich),
85
+ ...precisionVisuals(rich),
86
+ ...productVisuals(rich),
87
+ ...recordVisuals(rich),
88
+ ...relativeVisuals(rich),
89
+ ...solarVisuals(rich),
90
+ ...vectorVisuals(rich),
49
91
  ...politicsVisuals(rich),
50
92
  };
51
93
  }
@@ -58,8 +100,12 @@ export const assessmentVisuals = visualCatalog(RichTextSchema);
58
100
  const plainCatalog = assessmentVisuals;
59
101
  /** Every catalog name, in code-unit order. */
60
102
  export const VISUAL_NAMES = Arr.sort(Rec.keys(plainCatalog), Order.String);
103
+ /** Whether a document draws one catalog component as a figure, as its entry's kind says. */
104
+ function isFigure(name) {
105
+ return plainCatalog[name].kind === "figure";
106
+ }
61
107
  /** The catalog components a document draws as a figure, in code-unit order. */
62
- export const FIGURE_NAMES = Arr.filter(VISUAL_NAMES, (name) => plainCatalog[name].kind === "figure");
108
+ export const FIGURE_NAMES = Arr.filter(VISUAL_NAMES, isFigure);
63
109
  /** The name of one catalog component. */
64
110
  export const VisualNameSchema = Schema.Literals(VISUAL_NAMES);
65
111
  /** The name of one catalog component that a document draws as a figure. */
@@ -21,7 +21,7 @@ export declare function atomVisuals<E>(rich: RichSlot<E>): {
21
21
  readonly tab: Schema.Trimmed;
22
22
  }>>;
23
23
  }>;
24
- }>>;
24
+ }>, "figure">;
25
25
  AtomShellLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
26
26
  readonly defaultSampleId: Schema.optionalKey<Schema.Literals<readonly ["neon", "magnesium", "chlorine", "argon", "potassium", "calcium"]>>;
27
27
  readonly description: Schema.optionalKey<RichSlot<E>>;
@@ -39,7 +39,7 @@ export declare function atomVisuals<E>(rich: RichSlot<E>): {
39
39
  }>>;
40
40
  }>;
41
41
  readonly title: Schema.optionalKey<RichSlot<E>>;
42
- }>>;
42
+ }>, "figure">;
43
43
  AtomSymbolLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
44
44
  readonly description: RichSlot<E>;
45
45
  readonly title: RichSlot<E>;
@@ -58,7 +58,7 @@ export declare function atomVisuals<E>(rich: RichSlot<E>): {
58
58
  readonly tab: RichSlot<E>;
59
59
  }>>;
60
60
  }>;
61
- }>>;
61
+ }>, "figure">;
62
62
  DaltonEvidenceLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
63
63
  readonly description: RichSlot<E>;
64
64
  readonly title: RichSlot<E>;
@@ -75,5 +75,5 @@ export declare function atomVisuals<E>(rich: RichSlot<E>): {
75
75
  readonly tab: Schema.Trimmed;
76
76
  }>>;
77
77
  }>;
78
- }>>;
78
+ }>, "figure">;
79
79
  };
@@ -0,0 +1,79 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the mass conservation and equation balancing labs. No prop
5
+ * states the conclusion a lab leads to, so none holds answer state.
6
+ */
7
+ export declare function balanceVisuals<E>(rich: RichSlot<E>): {
8
+ FizzBalanceLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly labels: Schema.Struct<{
12
+ readonly chooseSeal: Schema.Trimmed;
13
+ readonly gasEscaped: RichSlot<E>;
14
+ readonly gasFormed: RichSlot<E>;
15
+ readonly readingAfter: RichSlot<E>;
16
+ readonly readingBefore: RichSlot<E>;
17
+ readonly seals: Schema.$Record<Schema.Literals<readonly ["open", "closed"]>, Schema.Trimmed>;
18
+ readonly viewLabel: Schema.Trimmed;
19
+ }>;
20
+ }>, "figure">;
21
+ LavoisierCalxLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
22
+ readonly description: RichSlot<E>;
23
+ readonly title: RichSlot<E>;
24
+ readonly labels: Schema.Struct<{
25
+ readonly air: RichSlot<E>;
26
+ readonly airUnit: Schema.Trimmed;
27
+ readonly calx: RichSlot<E>;
28
+ readonly calxUnit: Schema.Trimmed;
29
+ readonly day: Schema.Trimmed;
30
+ readonly reverse: RichSlot<E>;
31
+ readonly reverseLabel: RichSlot<E>;
32
+ readonly viewLabel: Schema.Trimmed;
33
+ }>;
34
+ }>, "figure">;
35
+ PrecipitateLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
36
+ readonly description: RichSlot<E>;
37
+ readonly title: RichSlot<E>;
38
+ readonly labels: Schema.Struct<{
39
+ readonly precipitate: RichSlot<E>;
40
+ readonly readingAfter: RichSlot<E>;
41
+ readonly readingBefore: RichSlot<E>;
42
+ readonly viewLabel: Schema.Trimmed;
43
+ }>;
44
+ }>, "figure">;
45
+ SteelWoolLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
46
+ readonly description: RichSlot<E>;
47
+ readonly title: RichSlot<E>;
48
+ readonly labels: Schema.Struct<{
49
+ readonly chooseSeal: Schema.Trimmed;
50
+ readonly oxygenJoined: RichSlot<E>;
51
+ readonly readingAfter: RichSlot<E>;
52
+ readonly readingBefore: RichSlot<E>;
53
+ readonly seals: Schema.$Record<Schema.Literals<readonly ["open", "closed"]>, Schema.Trimmed>;
54
+ readonly viewLabel: Schema.Trimmed;
55
+ }>;
56
+ }>, "figure">;
57
+ ReactionBalanceLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
58
+ readonly description: RichSlot<E>;
59
+ readonly title: RichSlot<E>;
60
+ readonly labels: Schema.Struct<{
61
+ readonly atoms: RichSlot<E>;
62
+ readonly choose: Schema.Trimmed;
63
+ readonly economy: Schema.optionalKey<RichSlot<E>>;
64
+ readonly equation: RichSlot<E>;
65
+ readonly mass: RichSlot<E>;
66
+ readonly molecules: Schema.optionalKey<RichSlot<E>>;
67
+ readonly products: RichSlot<E>;
68
+ readonly progress: Schema.Trimmed;
69
+ readonly reactants: RichSlot<E>;
70
+ readonly view: Schema.Trimmed;
71
+ }>;
72
+ readonly reactions: Schema.$Array<Schema.Struct<{
73
+ readonly id: Schema.Literals<readonly ["water-synthesis", "hydrogen-chloride-synthesis", "ammonia-synthesis", "methane-combustion", "propane-combustion", "ethanol-combustion", "peroxide-decomposition", "water-electrolysis", "carbon-monoxide-oxidation", "nitrogen-monoxide-oxidation", "nitrogen-fixation", "sulfur-dioxide-oxidation", "ethene-hydrogenation", "ethene-hydration", "ethanol-dehydration", "ozone-formation", "methanol-synthesis", "carbon-monoxide-methanol"]>;
74
+ readonly name: Schema.Trimmed;
75
+ readonly tab: RichSlot<E>;
76
+ }>>;
77
+ readonly reading: Schema.Literals<readonly ["economy", "molecules"]>;
78
+ }>, "figure">;
79
+ };
@@ -0,0 +1,128 @@
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 `FizzBalanceLab`: baking soda drops into vinegar in a flask that
6
+ * stands on a balance with everything else.
7
+ */
8
+ function fizzBalanceLab(rich) {
9
+ return figure(Schema.Struct({
10
+ ...cardFields(rich),
11
+ labels: Schema.Struct({
12
+ chooseSeal: TextSchema,
13
+ gasEscaped: rich,
14
+ gasFormed: rich,
15
+ readingAfter: rich,
16
+ readingBefore: rich,
17
+ seals: byIds(["open", "closed"], TextSchema),
18
+ viewLabel: TextSchema,
19
+ }),
20
+ }));
21
+ }
22
+ /**
23
+ * Props of `LavoisierCalxLab`: Lavoisier's experiment of 1776 as he describes
24
+ * it in "Elements of Chemistry".
25
+ */
26
+ function lavoisierCalxLab(rich) {
27
+ return figure(Schema.Struct({
28
+ ...cardFields(rich),
29
+ labels: Schema.Struct({
30
+ air: rich,
31
+ airUnit: TextSchema,
32
+ calx: rich,
33
+ calxUnit: TextSchema,
34
+ day: TextSchema,
35
+ reverse: rich,
36
+ reverseLabel: rich,
37
+ viewLabel: TextSchema,
38
+ }),
39
+ }));
40
+ }
41
+ /**
42
+ * Props of `PrecipitateLab`: two clear solutions stand side by side on a
43
+ * balance.
44
+ */
45
+ function precipitateLab(rich) {
46
+ return figure(Schema.Struct({
47
+ ...cardFields(rich),
48
+ labels: Schema.Struct({
49
+ precipitate: rich,
50
+ readingAfter: rich,
51
+ readingBefore: rich,
52
+ viewLabel: TextSchema,
53
+ }),
54
+ }));
55
+ }
56
+ /**
57
+ * Props of `SteelWoolLab`: a tuft of steel wool on a heatproof tile on a
58
+ * balance.
59
+ */
60
+ function steelWoolLab(rich) {
61
+ return figure(Schema.Struct({
62
+ ...cardFields(rich),
63
+ labels: Schema.Struct({
64
+ chooseSeal: TextSchema,
65
+ oxygenJoined: rich,
66
+ readingAfter: rich,
67
+ readingBefore: rich,
68
+ seals: byIds(["open", "closed"], TextSchema),
69
+ viewLabel: TextSchema,
70
+ }),
71
+ }));
72
+ }
73
+ /** Props of `ReactionBalanceLab`: a reaction lab. */
74
+ function reactionBalanceLab(rich) {
75
+ return figure(Schema.Struct({
76
+ ...cardFields(rich),
77
+ labels: Schema.Struct({
78
+ atoms: rich,
79
+ choose: TextSchema,
80
+ economy: Schema.optionalKey(rich),
81
+ equation: rich,
82
+ mass: rich,
83
+ molecules: Schema.optionalKey(rich),
84
+ products: rich,
85
+ progress: TextSchema,
86
+ reactants: rich,
87
+ view: TextSchema,
88
+ }),
89
+ reactions: Schema.Array(Schema.Struct({
90
+ id: Schema.Literals([
91
+ "water-synthesis",
92
+ "hydrogen-chloride-synthesis",
93
+ "ammonia-synthesis",
94
+ "methane-combustion",
95
+ "propane-combustion",
96
+ "ethanol-combustion",
97
+ "peroxide-decomposition",
98
+ "water-electrolysis",
99
+ "carbon-monoxide-oxidation",
100
+ "nitrogen-monoxide-oxidation",
101
+ "nitrogen-fixation",
102
+ "sulfur-dioxide-oxidation",
103
+ "ethene-hydrogenation",
104
+ "ethene-hydration",
105
+ "ethanol-dehydration",
106
+ "ozone-formation",
107
+ "methanol-synthesis",
108
+ "carbon-monoxide-methanol",
109
+ ]),
110
+ name: TextSchema,
111
+ tab: rich,
112
+ })),
113
+ reading: Schema.Literals(["economy", "molecules"]),
114
+ }));
115
+ }
116
+ /**
117
+ * The props of the mass conservation and equation balancing labs. No prop
118
+ * states the conclusion a lab leads to, so none holds answer state.
119
+ */
120
+ export function balanceVisuals(rich) {
121
+ return {
122
+ FizzBalanceLab: fizzBalanceLab(rich),
123
+ LavoisierCalxLab: lavoisierCalxLab(rich),
124
+ PrecipitateLab: precipitateLab(rich),
125
+ SteelWoolLab: steelWoolLab(rich),
126
+ ReactionBalanceLab: reactionBalanceLab(rich),
127
+ };
128
+ }
@@ -0,0 +1,80 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the labs of orbitals, ions, and bonds. No prop states the
5
+ * conclusion a lab leads to, so none holds answer state.
6
+ */
7
+ export declare function bondingVisuals<E>(rich: RichSlot<E>): {
8
+ AlkaliWaterLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly labels: Schema.Struct<{
12
+ readonly choose: Schema.Trimmed;
13
+ readonly density: RichSlot<E>;
14
+ readonly equation: RichSlot<E>;
15
+ readonly ionization: RichSlot<E>;
16
+ readonly melting: RichSlot<E>;
17
+ readonly radius: RichSlot<E>;
18
+ readonly view: Schema.Trimmed;
19
+ }>;
20
+ readonly metals: Schema.$Array<Schema.Literals<readonly ["lithium", "sodium", "potassium", "magnesium", "calcium"]>>;
21
+ }>, "figure">;
22
+ IonLatticeLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
23
+ readonly description: RichSlot<E>;
24
+ readonly title: RichSlot<E>;
25
+ readonly crystals: Schema.$Array<Schema.Literals<readonly ["sodium-chloride", "magnesium-oxide", "lithium-fluoride", "potassium-chloride", "sodium-fluoride", "sodium-bromide"]>>;
26
+ readonly labels: Schema.Struct<{
27
+ readonly cells: Schema.Trimmed;
28
+ readonly choose: Schema.Trimmed;
29
+ readonly count: RichSlot<E>;
30
+ readonly formula: RichSlot<E>;
31
+ readonly ions: RichSlot<E>;
32
+ readonly lattice: RichSlot<E>;
33
+ readonly view: Schema.Trimmed;
34
+ }>;
35
+ }>, "figure">;
36
+ IonFormationLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
37
+ readonly description: RichSlot<E>;
38
+ readonly title: RichSlot<E>;
39
+ readonly labels: Schema.Struct<{
40
+ readonly choose: Schema.Trimmed;
41
+ readonly metalRadius: RichSlot<E>;
42
+ readonly metalShells: RichSlot<E>;
43
+ readonly nonmetalRadius: RichSlot<E>;
44
+ readonly nonmetalShells: RichSlot<E>;
45
+ readonly progress: Schema.Trimmed;
46
+ readonly view: Schema.Trimmed;
47
+ }>;
48
+ readonly pairs: Schema.$Array<Schema.Literals<readonly ["sodium-chlorine", "magnesium-oxygen", "lithium-fluorine", "potassium-chlorine"]>>;
49
+ }>, "figure">;
50
+ MoleculeShapeLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
51
+ readonly description: RichSlot<E>;
52
+ readonly title: RichSlot<E>;
53
+ readonly labels: Schema.Struct<{
54
+ readonly atoms: RichSlot<E>;
55
+ readonly choose: Schema.Trimmed;
56
+ readonly fill: RichSlot<E>;
57
+ readonly formula: RichSlot<E>;
58
+ readonly mass: RichSlot<E>;
59
+ readonly shape: RichSlot<E>;
60
+ readonly view: Schema.Trimmed;
61
+ }>;
62
+ readonly molecules: Schema.$Array<Schema.Struct<{
63
+ readonly id: Schema.Literals<readonly ["hydrogen", "oxygen", "nitrogen", "chlorine", "hydrogen-chloride", "carbon-monoxide", "nitrogen-monoxide", "water", "hydrogen-peroxide", "carbon-dioxide", "sulfur-dioxide", "nitrogen-dioxide", "dinitrogen-monoxide", "ozone", "sulfur-trioxide", "ammonia", "methane", "ethene", "ethane", "ethyne", "propane", "ethanol", "methanol"]>;
64
+ readonly name: Schema.Trimmed;
65
+ }>>;
66
+ }>, "figure">;
67
+ OrbitalCloudLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
68
+ readonly description: RichSlot<E>;
69
+ readonly title: RichSlot<E>;
70
+ readonly labels: Schema.Struct<{
71
+ readonly angular: RichSlot<E>;
72
+ readonly choose: Schema.Trimmed;
73
+ readonly numbers: RichSlot<E>;
74
+ readonly orbital: RichSlot<E>;
75
+ readonly radial: RichSlot<E>;
76
+ readonly view: Schema.Trimmed;
77
+ }>;
78
+ readonly orbitals: Schema.$Array<Schema.Literals<readonly ["1s", "2s", "2px", "2pz", "3s", "3pz", "3dz2", "3dxy"]>>;
79
+ }>, "figure">;
80
+ };
@@ -0,0 +1,147 @@
1
+ import { Schema } from "effect";
2
+ import { cardFields, TextSchema } from "#contracts/visual/card";
3
+ import { figure } from "#contracts/visual/entry";
4
+ /**
5
+ * Props of `AlkaliWaterLab`: a 600 mL beaker of water with a few drops of
6
+ * phenolphthalein on a white tile, at its real size on a lab bench, and a
7
+ * pea-sized piece of metal dropped in.
8
+ */
9
+ function alkaliWaterLab(rich) {
10
+ return figure(Schema.Struct({
11
+ ...cardFields(rich),
12
+ labels: Schema.Struct({
13
+ choose: TextSchema,
14
+ density: rich,
15
+ equation: rich,
16
+ ionization: rich,
17
+ melting: rich,
18
+ radius: rich,
19
+ view: TextSchema,
20
+ }),
21
+ metals: Schema.Array(Schema.Literals([
22
+ "lithium",
23
+ "sodium",
24
+ "potassium",
25
+ "magnesium",
26
+ "calcium",
27
+ ])),
28
+ }));
29
+ }
30
+ /** Props of `IonLatticeLab`: a rock-salt crystal at real size. */
31
+ function ionLatticeLab(rich) {
32
+ return figure(Schema.Struct({
33
+ ...cardFields(rich),
34
+ crystals: Schema.Array(Schema.Literals([
35
+ "sodium-chloride",
36
+ "magnesium-oxide",
37
+ "lithium-fluoride",
38
+ "potassium-chloride",
39
+ "sodium-fluoride",
40
+ "sodium-bromide",
41
+ ])),
42
+ labels: Schema.Struct({
43
+ cells: TextSchema,
44
+ choose: TextSchema,
45
+ count: rich,
46
+ formula: rich,
47
+ ions: rich,
48
+ lattice: rich,
49
+ view: TextSchema,
50
+ }),
51
+ }));
52
+ }
53
+ /**
54
+ * Props of `IonFormationLab`: two atoms become two ions: the metal's outer
55
+ * electrons cross to the nonmetal's outer shell.
56
+ */
57
+ function ionFormationLab(rich) {
58
+ return figure(Schema.Struct({
59
+ ...cardFields(rich),
60
+ labels: Schema.Struct({
61
+ choose: TextSchema,
62
+ metalRadius: rich,
63
+ metalShells: rich,
64
+ nonmetalRadius: rich,
65
+ nonmetalShells: rich,
66
+ progress: TextSchema,
67
+ view: TextSchema,
68
+ }),
69
+ pairs: Schema.Array(Schema.Literals([
70
+ "sodium-chlorine",
71
+ "magnesium-oxygen",
72
+ "lithium-fluorine",
73
+ "potassium-chlorine",
74
+ ])),
75
+ }));
76
+ }
77
+ /** Props of `MoleculeShapeLab`: a molecule lab. */
78
+ function moleculeShapeLab(rich) {
79
+ return figure(Schema.Struct({
80
+ ...cardFields(rich),
81
+ labels: Schema.Struct({
82
+ atoms: rich,
83
+ choose: TextSchema,
84
+ fill: rich,
85
+ formula: rich,
86
+ mass: rich,
87
+ shape: rich,
88
+ view: TextSchema,
89
+ }),
90
+ molecules: Schema.Array(Schema.Struct({
91
+ id: Schema.Literals([
92
+ "hydrogen",
93
+ "oxygen",
94
+ "nitrogen",
95
+ "chlorine",
96
+ "hydrogen-chloride",
97
+ "carbon-monoxide",
98
+ "nitrogen-monoxide",
99
+ "water",
100
+ "hydrogen-peroxide",
101
+ "carbon-dioxide",
102
+ "sulfur-dioxide",
103
+ "nitrogen-dioxide",
104
+ "dinitrogen-monoxide",
105
+ "ozone",
106
+ "sulfur-trioxide",
107
+ "ammonia",
108
+ "methane",
109
+ "ethene",
110
+ "ethane",
111
+ "ethyne",
112
+ "propane",
113
+ "ethanol",
114
+ "methanol",
115
+ ]),
116
+ name: TextSchema,
117
+ })),
118
+ }));
119
+ }
120
+ /** Props of `OrbitalCloudLab`: an orbital lab. */
121
+ function orbitalCloudLab(rich) {
122
+ return figure(Schema.Struct({
123
+ ...cardFields(rich),
124
+ labels: Schema.Struct({
125
+ angular: rich,
126
+ choose: TextSchema,
127
+ numbers: rich,
128
+ orbital: rich,
129
+ radial: rich,
130
+ view: TextSchema,
131
+ }),
132
+ orbitals: Schema.Array(Schema.Literals(["1s", "2s", "2px", "2pz", "3s", "3pz", "3dz2", "3dxy"])),
133
+ }));
134
+ }
135
+ /**
136
+ * The props of the labs of orbitals, ions, and bonds. No prop states the
137
+ * conclusion a lab leads to, so none holds answer state.
138
+ */
139
+ export function bondingVisuals(rich) {
140
+ return {
141
+ AlkaliWaterLab: alkaliWaterLab(rich),
142
+ IonLatticeLab: ionLatticeLab(rich),
143
+ IonFormationLab: ionFormationLab(rich),
144
+ MoleculeShapeLab: moleculeShapeLab(rich),
145
+ OrbitalCloudLab: orbitalCloudLab(rich),
146
+ };
147
+ }
@@ -0,0 +1,96 @@
1
+ import { Schema } from "effect";
2
+ import { type RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * The props of the labs of the experiments that found atomic structure. No prop
5
+ * states the conclusion a lab leads to, so none holds answer state.
6
+ */
7
+ export declare function discoveryVisuals<E>(rich: RichSlot<E>): {
8
+ CathodeRayLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
9
+ readonly description: RichSlot<E>;
10
+ readonly title: RichSlot<E>;
11
+ readonly labels: Schema.Struct<{
12
+ readonly anode: RichSlot<E>;
13
+ readonly field: RichSlot<E>;
14
+ readonly plates: Schema.Trimmed;
15
+ readonly spot: RichSlot<E>;
16
+ readonly view: Schema.Trimmed;
17
+ }>;
18
+ }>, "figure">;
19
+ MillikanOilDropLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
20
+ readonly description: RichSlot<E>;
21
+ readonly title: RichSlot<E>;
22
+ readonly labels: Schema.Struct<{
23
+ readonly charge: RichSlot<E>;
24
+ readonly field: RichSlot<E>;
25
+ readonly multiple: RichSlot<E>;
26
+ readonly view: Schema.Trimmed;
27
+ readonly voltage: Schema.Trimmed;
28
+ }>;
29
+ }>, "figure">;
30
+ RutherfordScatteringLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
31
+ readonly description: RichSlot<E>;
32
+ readonly title: RichSlot<E>;
33
+ readonly energy: Schema.optionalKey<Schema.Finite>;
34
+ readonly labels: Schema.Struct<{
35
+ readonly approach: RichSlot<E>;
36
+ readonly energy: Schema.Trimmed;
37
+ readonly nucleus: RichSlot<E>;
38
+ readonly ratio: RichSlot<E>;
39
+ readonly view: Schema.Trimmed;
40
+ }>;
41
+ }>, "figure">;
42
+ BohrEmissionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
43
+ readonly description: RichSlot<E>;
44
+ readonly title: RichSlot<E>;
45
+ readonly falls: Schema.$Array<Schema.Struct<{
46
+ readonly from: Schema.Int;
47
+ readonly to: Schema.Int;
48
+ }>>;
49
+ readonly labels: Schema.Struct<{
50
+ readonly choose: Schema.Trimmed;
51
+ readonly energy: RichSlot<E>;
52
+ readonly frequency: RichSlot<E>;
53
+ readonly transition: RichSlot<E>;
54
+ readonly view: Schema.Trimmed;
55
+ readonly wavelength: RichSlot<E>;
56
+ }>;
57
+ }>, "figure">;
58
+ MassSpectrometerLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
59
+ readonly description: RichSlot<E>;
60
+ readonly title: RichSlot<E>;
61
+ readonly labels: Schema.Struct<{
62
+ readonly average: RichSlot<E>;
63
+ readonly choose: Schema.Trimmed;
64
+ readonly isotopes: RichSlot<E>;
65
+ readonly north: Schema.Trimmed;
66
+ readonly radius: RichSlot<E>;
67
+ readonly ratio: RichSlot<E>;
68
+ readonly south: Schema.Trimmed;
69
+ readonly view: Schema.Trimmed;
70
+ }>;
71
+ readonly samples: Schema.$Array<Schema.Literals<readonly ["boron", "carbon", "neon", "magnesium", "chlorine", "copper"]>>;
72
+ }>, "figure">;
73
+ ParticleTrackLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
74
+ readonly description: RichSlot<E>;
75
+ readonly title: RichSlot<E>;
76
+ readonly labels: Schema.Struct<{
77
+ readonly electron: RichSlot<E>;
78
+ readonly field: Schema.Trimmed;
79
+ readonly proton: RichSlot<E>;
80
+ readonly ratio: RichSlot<E>;
81
+ readonly view: Schema.Trimmed;
82
+ }>;
83
+ }>, "figure">;
84
+ RadioactiveDecayLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
85
+ readonly description: RichSlot<E>;
86
+ readonly title: RichSlot<E>;
87
+ readonly labels: Schema.Struct<{
88
+ readonly counted: RichSlot<E>;
89
+ readonly expected: RichSlot<E>;
90
+ readonly halfLives: RichSlot<E>;
91
+ readonly time: Schema.Trimmed;
92
+ readonly view: Schema.Trimmed;
93
+ readonly years: Schema.Trimmed;
94
+ }>;
95
+ }>, "figure">;
96
+ };