@nakafa/aksara-contracts 8.0.4 → 8.2.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.
- package/dist/math/bounds.js +6 -3
- package/dist/math/formula/contour.d.ts +5 -11
- package/dist/math/formula/contour.js +48 -57
- package/dist/math/formula/plane.d.ts +7 -0
- package/dist/math/formula/plane.js +23 -8
- package/dist/math/formula/region.js +3 -2
- package/dist/math/formula/scan.d.ts +13 -0
- package/dist/math/formula/scan.js +45 -0
- package/dist/visual/biology/physiology.d.ts +85 -0
- package/dist/visual/biology/physiology.js +105 -0
- package/dist/visual/biology/plant.d.ts +121 -0
- package/dist/visual/biology/plant.js +160 -0
- package/dist/visual/biology.d.ts +16 -16
- package/dist/visual/biology.js +2 -2
- package/dist/visual/catalog.d.ts +834 -28
- package/dist/visual/catalog.js +26 -0
- package/dist/visual/chemistry/atom.d.ts +2 -2
- package/dist/visual/chemistry/atom.js +2 -2
- package/dist/visual/mathematics/function.d.ts +4 -4
- package/dist/visual/mathematics/function.js +4 -4
- package/dist/visual/mathematics/geometry.d.ts +1 -1
- package/dist/visual/mathematics/geometry.js +1 -1
- package/dist/visual/physics/circuit.d.ts +75 -0
- package/dist/visual/physics/circuit.js +86 -0
- package/dist/visual/physics/dynamics.d.ts +110 -0
- package/dist/visual/physics/dynamics.js +134 -0
- package/dist/visual/physics/electronics.d.ts +59 -0
- package/dist/visual/physics/electronics.js +71 -0
- package/dist/visual/physics/field.d.ts +48 -0
- package/dist/visual/physics/field.js +60 -0
- package/dist/visual/physics/fluid.d.ts +68 -0
- package/dist/visual/physics/fluid.js +83 -0
- package/dist/visual/physics/gravity.d.ts +38 -0
- package/dist/visual/physics/gravity.js +47 -0
- package/dist/visual/physics/heat.d.ts +54 -0
- package/dist/visual/physics/heat.js +66 -0
- package/dist/visual/physics/light.d.ts +75 -0
- package/dist/visual/physics/light.js +90 -0
- package/dist/visual/physics/nuclear.d.ts +57 -0
- package/dist/visual/physics/nuclear.js +69 -0
- package/dist/visual/physics/parabolic.d.ts +2 -2
- package/dist/visual/physics/parabolic.js +2 -2
- package/dist/visual/physics/reading.d.ts +52 -0
- package/dist/visual/physics/reading.js +61 -0
- package/dist/visual/physics/wave.d.ts +70 -0
- package/dist/visual/physics/wave.js +85 -0
- package/dist/visual/politics.d.ts +1 -1
- package/dist/visual/politics.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
|
|
3
|
+
import { figure } from "#contracts/visual/entry";
|
|
4
|
+
/** A count or a measure the lab divides by: a finite number above zero. */
|
|
5
|
+
const PositiveSchema = Schema.Finite.check(Schema.isGreaterThan(0));
|
|
6
|
+
/**
|
|
7
|
+
* Props of `PotometerLab`: a bubble potometer at real size. Each leafy shoot
|
|
8
|
+
* names the leaf surfaces its petroleum jelly covers and the water it takes
|
|
9
|
+
* up, in cubic centimetres an hour; `radius` is the capillary's bore radius in
|
|
10
|
+
* millimetres and `minutes` the length of the run.
|
|
11
|
+
*/
|
|
12
|
+
function potometerLab(rich) {
|
|
13
|
+
return figure(Schema.Struct({
|
|
14
|
+
...cardFields(rich),
|
|
15
|
+
labels: Schema.Struct({
|
|
16
|
+
distance: rich,
|
|
17
|
+
rate: rich,
|
|
18
|
+
shoot: TextSchema,
|
|
19
|
+
time: TextSchema,
|
|
20
|
+
view: TextSchema,
|
|
21
|
+
volume: rich,
|
|
22
|
+
}),
|
|
23
|
+
minutes: PositiveSchema,
|
|
24
|
+
radius: PositiveSchema,
|
|
25
|
+
shoots: Schema.NonEmptyArray(Schema.Struct({
|
|
26
|
+
coat: Schema.Literals(["none", "lower", "upper", "both"]),
|
|
27
|
+
name: TextSchema,
|
|
28
|
+
rate: PositiveSchema,
|
|
29
|
+
})),
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Props of `PhotosynthesisLab`: Hydrilla in a water bath under a bench lamp.
|
|
34
|
+
* Each reading names the lamp's distance in centimetres, the bubbles a minute,
|
|
35
|
+
* and whether sodium hydrogen carbonate was added.
|
|
36
|
+
*/
|
|
37
|
+
function photosynthesisLab(rich) {
|
|
38
|
+
return figure(Schema.Struct({
|
|
39
|
+
...cardFields(rich),
|
|
40
|
+
labels: Schema.Struct({
|
|
41
|
+
bubbles: rich,
|
|
42
|
+
carbon: rich,
|
|
43
|
+
carbonSources: Schema.Struct({ added: rich, none: rich }),
|
|
44
|
+
distance: rich,
|
|
45
|
+
intensity: rich,
|
|
46
|
+
reading: TextSchema,
|
|
47
|
+
view: TextSchema,
|
|
48
|
+
}),
|
|
49
|
+
readings: Schema.NonEmptyArray(Schema.Struct({
|
|
50
|
+
bicarbonate: Schema.optionalKey(Schema.Boolean),
|
|
51
|
+
bubbles: PositiveSchema,
|
|
52
|
+
distance: PositiveSchema,
|
|
53
|
+
})),
|
|
54
|
+
}));
|
|
55
|
+
}
|
|
56
|
+
/** One seedling of a tropism lab: the letter it goes by and what was done to it. */
|
|
57
|
+
function seedling(treatments) {
|
|
58
|
+
return Schema.NonEmptyArray(Schema.Struct({ name: TextSchema, treatment: Schema.Literals(treatments) }));
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Props of `TropismLab`: seedlings lit from the right, each intact, cut,
|
|
62
|
+
* capped or carrying mica on one side, or seedlings laid flat in the dark,
|
|
63
|
+
* left still, on a klinostat or with the root cap removed.
|
|
64
|
+
*/
|
|
65
|
+
function tropismLab(rich) {
|
|
66
|
+
return figure(Schema.Struct({
|
|
67
|
+
...cardFields(rich),
|
|
68
|
+
labels: Schema.Struct({
|
|
69
|
+
bend: rich,
|
|
70
|
+
directions: Schema.Struct({ away: rich, straight: rich, toward: rich }),
|
|
71
|
+
far: rich,
|
|
72
|
+
growth: rich,
|
|
73
|
+
hours: TextSchema,
|
|
74
|
+
near: rich,
|
|
75
|
+
root: rich,
|
|
76
|
+
seedling: TextSchema,
|
|
77
|
+
view: TextSchema,
|
|
78
|
+
}),
|
|
79
|
+
setup: Schema.Union([
|
|
80
|
+
Schema.Struct({
|
|
81
|
+
seedlings: seedling(["intact", "cut", "cap", "micaShade", "micaLit"]),
|
|
82
|
+
stimulus: Schema.Literal("light"),
|
|
83
|
+
}),
|
|
84
|
+
Schema.Struct({
|
|
85
|
+
seedlings: seedling(["flat", "klinostat", "decapped"]),
|
|
86
|
+
stimulus: Schema.Literal("gravity"),
|
|
87
|
+
}),
|
|
88
|
+
]),
|
|
89
|
+
}));
|
|
90
|
+
}
|
|
91
|
+
/** A chromosome count of a plant's body cells: an even whole number, so a gamete gets half. */
|
|
92
|
+
const BodyCountSchema = Schema.Int.check(Schema.isGreaterThan(0), Schema.isMultipleOf(2));
|
|
93
|
+
/**
|
|
94
|
+
* Props of `FertilisationLab`: double fertilisation in a flower cut
|
|
95
|
+
* lengthwise, for a mother and a father plant whose body cells hold `mother`
|
|
96
|
+
* and `father` chromosomes, with the ovules to turn into seeds when the lesson
|
|
97
|
+
* counts them.
|
|
98
|
+
*/
|
|
99
|
+
function fertilisationLab(rich) {
|
|
100
|
+
return figure(Schema.Struct({
|
|
101
|
+
...cardFields(rich),
|
|
102
|
+
father: BodyCountSchema,
|
|
103
|
+
labels: Schema.Struct({
|
|
104
|
+
embryo: rich,
|
|
105
|
+
endosperm: rich,
|
|
106
|
+
gamete: rich,
|
|
107
|
+
grains: rich,
|
|
108
|
+
progress: TextSchema,
|
|
109
|
+
seedCoat: rich,
|
|
110
|
+
stages: byIds(["pollination", "tube", "entry", "fusion"], TextSchema),
|
|
111
|
+
view: TextSchema,
|
|
112
|
+
}),
|
|
113
|
+
mother: BodyCountSchema,
|
|
114
|
+
ovules: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThan(0))),
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Props of `OsmosisLab`: potato strips in a series of sucrose solutions, each
|
|
119
|
+
* tube's concentration in moles per cubic decimetre and its strip's
|
|
120
|
+
* percentage change in mass, with the starting mass of a strip in grams when
|
|
121
|
+
* the lesson asks for one's final mass.
|
|
122
|
+
*/
|
|
123
|
+
function osmosisLab(rich) {
|
|
124
|
+
return figure(Schema.Struct({
|
|
125
|
+
...cardFields(rich),
|
|
126
|
+
labels: Schema.Struct({
|
|
127
|
+
change: rich,
|
|
128
|
+
concentration: TextSchema,
|
|
129
|
+
isotonic: rich,
|
|
130
|
+
mass: rich,
|
|
131
|
+
none: rich,
|
|
132
|
+
solution: rich,
|
|
133
|
+
tonicities: Schema.Struct({
|
|
134
|
+
hypertonic: rich,
|
|
135
|
+
hypotonic: rich,
|
|
136
|
+
isotonic: rich,
|
|
137
|
+
}),
|
|
138
|
+
view: TextSchema,
|
|
139
|
+
}),
|
|
140
|
+
mass: Schema.optionalKey(PositiveSchema),
|
|
141
|
+
strips: Schema.NonEmptyArray(Schema.Struct({
|
|
142
|
+
change: Schema.Finite,
|
|
143
|
+
concentration: Schema.Finite.check(Schema.isGreaterThanOrEqualTo(0)),
|
|
144
|
+
})),
|
|
145
|
+
}));
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The props of the plant labs. Each prop sets up an apparatus or names its
|
|
149
|
+
* words; none states the conclusion the lab leads to, so none holds answer
|
|
150
|
+
* state.
|
|
151
|
+
*/
|
|
152
|
+
export function plantVisuals(rich) {
|
|
153
|
+
return {
|
|
154
|
+
FertilisationLab: fertilisationLab(rich),
|
|
155
|
+
OsmosisLab: osmosisLab(rich),
|
|
156
|
+
PhotosynthesisLab: photosynthesisLab(rich),
|
|
157
|
+
PotometerLab: potometerLab(rich),
|
|
158
|
+
TropismLab: tropismLab(rich),
|
|
159
|
+
};
|
|
160
|
+
}
|
package/dist/visual/biology.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { type RichSlot } from "#contracts/visual/card";
|
|
|
8
8
|
export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
9
9
|
BacteriaStructureLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
10
10
|
defaultItemIndex: Schema.optionalKey<Schema.Int>;
|
|
11
|
-
description:
|
|
11
|
+
description: RichSlot<E>;
|
|
12
12
|
labels: Schema.Struct<{
|
|
13
13
|
readonly chooseMode: Schema.Trimmed;
|
|
14
14
|
readonly focusLabel: Schema.optionalKey<Schema.Trimmed>;
|
|
@@ -38,11 +38,11 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
38
38
|
readonly takeawayLabel: Schema.optionalKey<Schema.Trimmed>;
|
|
39
39
|
readonly viewLabel: Schema.Trimmed;
|
|
40
40
|
}>;
|
|
41
|
-
title:
|
|
41
|
+
title: RichSlot<E>;
|
|
42
42
|
}>, "figure">;
|
|
43
43
|
ClimateObservationLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
44
44
|
defaultItemIndex: Schema.optionalKey<Schema.Int>;
|
|
45
|
-
description:
|
|
45
|
+
description: RichSlot<E>;
|
|
46
46
|
labels: Schema.Struct<{
|
|
47
47
|
readonly chooseMode: Schema.Trimmed;
|
|
48
48
|
readonly focusLabel: Schema.optionalKey<Schema.Trimmed>;
|
|
@@ -59,11 +59,11 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
59
59
|
readonly takeawayLabel: Schema.optionalKey<Schema.Trimmed>;
|
|
60
60
|
readonly viewLabel: Schema.Trimmed;
|
|
61
61
|
}>;
|
|
62
|
-
title:
|
|
62
|
+
title: RichSlot<E>;
|
|
63
63
|
}>, "figure">;
|
|
64
64
|
FungiMyceliumLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
65
65
|
defaultItemIndex: Schema.optionalKey<Schema.Int>;
|
|
66
|
-
description:
|
|
66
|
+
description: RichSlot<E>;
|
|
67
67
|
labels: Schema.Struct<{
|
|
68
68
|
readonly chooseMode: Schema.Trimmed;
|
|
69
69
|
readonly focusLabel: Schema.optionalKey<Schema.Trimmed>;
|
|
@@ -80,7 +80,7 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
80
80
|
readonly takeawayLabel: Schema.optionalKey<Schema.Trimmed>;
|
|
81
81
|
readonly viewLabel: Schema.Trimmed;
|
|
82
82
|
}>;
|
|
83
|
-
title:
|
|
83
|
+
title: RichSlot<E>;
|
|
84
84
|
}>, "figure">;
|
|
85
85
|
GreenhouseEffectLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
86
86
|
readonly description: RichSlot<E>;
|
|
@@ -96,7 +96,7 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
96
96
|
}>, "figure">;
|
|
97
97
|
SarsCov2VirionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
98
98
|
defaultItemIndex: Schema.optionalKey<Schema.Int>;
|
|
99
|
-
description:
|
|
99
|
+
description: RichSlot<E>;
|
|
100
100
|
labels: Schema.Struct<{
|
|
101
101
|
readonly chooseMode: Schema.Trimmed;
|
|
102
102
|
readonly focusLabel: Schema.optionalKey<Schema.Trimmed>;
|
|
@@ -113,11 +113,11 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
113
113
|
readonly takeawayLabel: Schema.optionalKey<Schema.Trimmed>;
|
|
114
114
|
readonly viewLabel: Schema.Trimmed;
|
|
115
115
|
}>;
|
|
116
|
-
title:
|
|
116
|
+
title: RichSlot<E>;
|
|
117
117
|
}>, "figure">;
|
|
118
118
|
VirusMorphologyLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
119
119
|
defaultItemIndex: Schema.optionalKey<Schema.Int>;
|
|
120
|
-
description:
|
|
120
|
+
description: RichSlot<E>;
|
|
121
121
|
labels: Schema.Struct<{
|
|
122
122
|
readonly chooseMode: Schema.Trimmed;
|
|
123
123
|
readonly focusLabel: Schema.optionalKey<Schema.Trimmed>;
|
|
@@ -134,11 +134,11 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
134
134
|
readonly takeawayLabel: Schema.optionalKey<Schema.Trimmed>;
|
|
135
135
|
readonly viewLabel: Schema.Trimmed;
|
|
136
136
|
}>;
|
|
137
|
-
title:
|
|
137
|
+
title: RichSlot<E>;
|
|
138
138
|
}>, "figure">;
|
|
139
139
|
VirusReplicationLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
140
140
|
readonly defaultItemIndex: Schema.optionalKey<Schema.Int>;
|
|
141
|
-
readonly description:
|
|
141
|
+
readonly description: RichSlot<E>;
|
|
142
142
|
readonly labels: Schema.Struct<{
|
|
143
143
|
readonly chooseMode: Schema.Trimmed;
|
|
144
144
|
readonly focusLabel: Schema.optionalKey<Schema.Trimmed>;
|
|
@@ -155,12 +155,12 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
155
155
|
readonly takeawayLabel: Schema.optionalKey<Schema.Trimmed>;
|
|
156
156
|
readonly viewLabel: Schema.Trimmed;
|
|
157
157
|
}>;
|
|
158
|
-
readonly title:
|
|
158
|
+
readonly title: RichSlot<E>;
|
|
159
159
|
readonly mode: Schema.optionalKey<Schema.Literals<readonly ["both", "lytic", "lysogenic"]>>;
|
|
160
160
|
}>, "figure">;
|
|
161
161
|
VirusRoleLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
162
162
|
defaultItemIndex: Schema.optionalKey<Schema.Int>;
|
|
163
|
-
description:
|
|
163
|
+
description: RichSlot<E>;
|
|
164
164
|
labels: Schema.Struct<{
|
|
165
165
|
readonly chooseMode: Schema.Trimmed;
|
|
166
166
|
readonly focusLabel: Schema.optionalKey<Schema.Trimmed>;
|
|
@@ -177,11 +177,11 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
177
177
|
readonly takeawayLabel: Schema.optionalKey<Schema.Trimmed>;
|
|
178
178
|
readonly viewLabel: Schema.Trimmed;
|
|
179
179
|
}>;
|
|
180
|
-
title:
|
|
180
|
+
title: RichSlot<E>;
|
|
181
181
|
}>, "figure">;
|
|
182
182
|
VirusStructureLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
183
183
|
defaultItemIndex: Schema.optionalKey<Schema.Int>;
|
|
184
|
-
description:
|
|
184
|
+
description: RichSlot<E>;
|
|
185
185
|
labels: Schema.Struct<{
|
|
186
186
|
readonly chooseMode: Schema.Trimmed;
|
|
187
187
|
readonly focusLabel: Schema.optionalKey<Schema.Trimmed>;
|
|
@@ -198,6 +198,6 @@ export declare function biologyVisuals<E>(rich: RichSlot<E>): {
|
|
|
198
198
|
readonly takeawayLabel: Schema.optionalKey<Schema.Trimmed>;
|
|
199
199
|
readonly viewLabel: Schema.Trimmed;
|
|
200
200
|
}>;
|
|
201
|
-
title:
|
|
201
|
+
title: RichSlot<E>;
|
|
202
202
|
}>, "figure">;
|
|
203
203
|
};
|
package/dist/visual/biology.js
CHANGED
|
@@ -21,7 +21,7 @@ function itemFields(rich) {
|
|
|
21
21
|
function biologyFields(item, rich) {
|
|
22
22
|
return {
|
|
23
23
|
defaultItemIndex: Schema.optionalKey(Schema.Int.check(Schema.isGreaterThanOrEqualTo(0))),
|
|
24
|
-
description:
|
|
24
|
+
description: rich,
|
|
25
25
|
labels: Schema.Struct({
|
|
26
26
|
chooseMode: TextSchema,
|
|
27
27
|
focusLabel: Schema.optionalKey(TextSchema),
|
|
@@ -29,7 +29,7 @@ function biologyFields(item, rich) {
|
|
|
29
29
|
takeawayLabel: Schema.optionalKey(TextSchema),
|
|
30
30
|
viewLabel: TextSchema,
|
|
31
31
|
}),
|
|
32
|
-
title:
|
|
32
|
+
title: rich,
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
/** Props of a biology lab whose items need nothing but their words. */
|