@nakafa/aksara-contracts 8.13.0 → 8.14.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/assessment/document.d.ts +15 -2
- package/dist/assessment/document.js +12 -3
- package/dist/visual/biology/homeostasis.d.ts +284 -0
- package/dist/visual/biology/homeostasis.js +101 -0
- package/dist/visual/biology/membrane.d.ts +282 -0
- package/dist/visual/biology/membrane.js +87 -0
- package/dist/visual/biology/neuron.d.ts +136 -1
- package/dist/visual/biology/neuron.js +41 -2
- package/dist/visual/catalog.d.ts +3779 -1835
- package/dist/visual/catalog.js +6 -0
- package/dist/visual/chemistry/rate.d.ts +280 -1
- package/dist/visual/chemistry/rate.js +81 -3
- package/dist/visual/physics/electronics.d.ts +163 -24
- package/dist/visual/physics/electronics.js +50 -5
- package/dist/visual/physics/gravity.d.ts +139 -4
- package/dist/visual/physics/gravity.js +46 -4
- package/dist/visual/physics/heat.d.ts +307 -12
- package/dist/visual/physics/heat.js +84 -5
- package/dist/visual/physics/nuclear.d.ts +150 -13
- package/dist/visual/physics/nuclear.js +44 -5
- package/dist/visual/physics/quantum.d.ts +282 -0
- package/dist/visual/physics/quantum.js +87 -0
- package/package.json +1 -1
package/dist/visual/catalog.js
CHANGED
|
@@ -18,6 +18,7 @@ import { enzymeVisuals } from "#contracts/visual/biology/enzyme";
|
|
|
18
18
|
import { equipmentVisuals } from "#contracts/visual/biology/equipment";
|
|
19
19
|
import { gametogenesisVisuals } from "#contracts/visual/biology/gametogenesis";
|
|
20
20
|
import { heartVisuals } from "#contracts/visual/biology/heart";
|
|
21
|
+
import { homeostasisVisuals } from "#contracts/visual/biology/homeostasis";
|
|
21
22
|
import { implantationVisuals } from "#contracts/visual/biology/implantation";
|
|
22
23
|
import { jointVisuals } from "#contracts/visual/biology/joint";
|
|
23
24
|
import { keyVisuals } from "#contracts/visual/biology/key";
|
|
@@ -27,6 +28,7 @@ import { leafVisuals } from "#contracts/visual/biology/leaf";
|
|
|
27
28
|
import { limbVisuals } from "#contracts/visual/biology/limb";
|
|
28
29
|
import { lipidVisuals } from "#contracts/visual/biology/lipid";
|
|
29
30
|
import { locomotionVisuals } from "#contracts/visual/biology/locomotion";
|
|
31
|
+
import { membraneVisuals } from "#contracts/visual/biology/membrane";
|
|
30
32
|
import { menstrualVisuals } from "#contracts/visual/biology/menstrual";
|
|
31
33
|
import { metamorphosisVisuals } from "#contracts/visual/biology/metamorphosis";
|
|
32
34
|
import { mitochondrionVisuals } from "#contracts/visual/biology/mitochondrion";
|
|
@@ -98,6 +100,7 @@ import { positionVisuals } from "#contracts/visual/physics/position";
|
|
|
98
100
|
import { powerVisuals } from "#contracts/visual/physics/power";
|
|
99
101
|
import { precisionVisuals } from "#contracts/visual/physics/precision";
|
|
100
102
|
import { productVisuals } from "#contracts/visual/physics/product";
|
|
103
|
+
import { quantumVisuals } from "#contracts/visual/physics/quantum";
|
|
101
104
|
import { readingVisuals } from "#contracts/visual/physics/reading";
|
|
102
105
|
import { recordVisuals } from "#contracts/visual/physics/record";
|
|
103
106
|
import { relativeVisuals } from "#contracts/visual/physics/relative";
|
|
@@ -195,6 +198,8 @@ export function visualCatalog(rich) {
|
|
|
195
198
|
...lactaseVisuals(rich),
|
|
196
199
|
...leafVisuals(rich),
|
|
197
200
|
...tissueVisuals(rich),
|
|
201
|
+
...homeostasisVisuals(rich),
|
|
202
|
+
...membraneVisuals(rich),
|
|
198
203
|
...balanceVisuals(rich),
|
|
199
204
|
...bondingVisuals(rich),
|
|
200
205
|
...discoveryVisuals(rich),
|
|
@@ -222,6 +227,7 @@ export function visualCatalog(rich) {
|
|
|
222
227
|
...thermodynamicsVisuals(rich),
|
|
223
228
|
...lightVisuals(rich),
|
|
224
229
|
...nuclearVisuals(rich),
|
|
230
|
+
...quantumVisuals(rich),
|
|
225
231
|
...readingVisuals(rich),
|
|
226
232
|
...waveVisuals(rich),
|
|
227
233
|
...politicsVisuals(rich),
|
|
@@ -1,7 +1,286 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import type { RichSlot } from "#contracts/visual/card";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* The rate of reaction labs covering gas-syringe kinetics, collision theory,
|
|
5
|
+
* and catalytic energy pathways.
|
|
6
|
+
*/
|
|
4
7
|
export declare function rateVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
CatalystPathwayLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
|
+
readonly description: RichSlot<E>;
|
|
10
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
11
|
+
readonly marks?: readonly [{
|
|
12
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
13
|
+
} | {
|
|
14
|
+
readonly attrs: {
|
|
15
|
+
readonly href: string;
|
|
16
|
+
};
|
|
17
|
+
readonly type: "link";
|
|
18
|
+
} | {
|
|
19
|
+
readonly attrs: {
|
|
20
|
+
readonly variant: "success" | "warning" | null;
|
|
21
|
+
};
|
|
22
|
+
readonly type: "highlight";
|
|
23
|
+
}, ...({
|
|
24
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
25
|
+
} | {
|
|
26
|
+
readonly attrs: {
|
|
27
|
+
readonly href: string;
|
|
28
|
+
};
|
|
29
|
+
readonly type: "link";
|
|
30
|
+
} | {
|
|
31
|
+
readonly attrs: {
|
|
32
|
+
readonly variant: "success" | "warning" | null;
|
|
33
|
+
};
|
|
34
|
+
readonly type: "highlight";
|
|
35
|
+
})[]];
|
|
36
|
+
readonly text: string;
|
|
37
|
+
readonly type: "text";
|
|
38
|
+
} | {
|
|
39
|
+
readonly attrs: {
|
|
40
|
+
readonly latex: string;
|
|
41
|
+
};
|
|
42
|
+
readonly marks?: readonly [{
|
|
43
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
44
|
+
} | {
|
|
45
|
+
readonly attrs: {
|
|
46
|
+
readonly href: string;
|
|
47
|
+
};
|
|
48
|
+
readonly type: "link";
|
|
49
|
+
} | {
|
|
50
|
+
readonly attrs: {
|
|
51
|
+
readonly variant: "success" | "warning" | null;
|
|
52
|
+
};
|
|
53
|
+
readonly type: "highlight";
|
|
54
|
+
}, ...({
|
|
55
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
56
|
+
} | {
|
|
57
|
+
readonly attrs: {
|
|
58
|
+
readonly href: string;
|
|
59
|
+
};
|
|
60
|
+
readonly type: "link";
|
|
61
|
+
} | {
|
|
62
|
+
readonly attrs: {
|
|
63
|
+
readonly variant: "success" | "warning" | null;
|
|
64
|
+
};
|
|
65
|
+
readonly type: "highlight";
|
|
66
|
+
})[]];
|
|
67
|
+
readonly type: "mathInline";
|
|
68
|
+
}, ...({
|
|
69
|
+
readonly marks?: readonly [{
|
|
70
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
71
|
+
} | {
|
|
72
|
+
readonly attrs: {
|
|
73
|
+
readonly href: string;
|
|
74
|
+
};
|
|
75
|
+
readonly type: "link";
|
|
76
|
+
} | {
|
|
77
|
+
readonly attrs: {
|
|
78
|
+
readonly variant: "success" | "warning" | null;
|
|
79
|
+
};
|
|
80
|
+
readonly type: "highlight";
|
|
81
|
+
}, ...({
|
|
82
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
83
|
+
} | {
|
|
84
|
+
readonly attrs: {
|
|
85
|
+
readonly href: string;
|
|
86
|
+
};
|
|
87
|
+
readonly type: "link";
|
|
88
|
+
} | {
|
|
89
|
+
readonly attrs: {
|
|
90
|
+
readonly variant: "success" | "warning" | null;
|
|
91
|
+
};
|
|
92
|
+
readonly type: "highlight";
|
|
93
|
+
})[]];
|
|
94
|
+
readonly text: string;
|
|
95
|
+
readonly type: "text";
|
|
96
|
+
} | {
|
|
97
|
+
readonly attrs: {
|
|
98
|
+
readonly latex: string;
|
|
99
|
+
};
|
|
100
|
+
readonly marks?: readonly [{
|
|
101
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
102
|
+
} | {
|
|
103
|
+
readonly attrs: {
|
|
104
|
+
readonly href: string;
|
|
105
|
+
};
|
|
106
|
+
readonly type: "link";
|
|
107
|
+
} | {
|
|
108
|
+
readonly attrs: {
|
|
109
|
+
readonly variant: "success" | "warning" | null;
|
|
110
|
+
};
|
|
111
|
+
readonly type: "highlight";
|
|
112
|
+
}, ...({
|
|
113
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
114
|
+
} | {
|
|
115
|
+
readonly attrs: {
|
|
116
|
+
readonly href: string;
|
|
117
|
+
};
|
|
118
|
+
readonly type: "link";
|
|
119
|
+
} | {
|
|
120
|
+
readonly attrs: {
|
|
121
|
+
readonly variant: "success" | "warning" | null;
|
|
122
|
+
};
|
|
123
|
+
readonly type: "highlight";
|
|
124
|
+
})[]];
|
|
125
|
+
readonly type: "mathInline";
|
|
126
|
+
})[]], E, never, never>>;
|
|
127
|
+
readonly title: RichSlot<E>;
|
|
128
|
+
readonly labels: Schema.Struct<{
|
|
129
|
+
readonly activationEnergy: Schema.optionalKey<RichSlot<E>>;
|
|
130
|
+
readonly catalyst: Schema.Trimmed;
|
|
131
|
+
readonly catalystStates: Schema.$Record<Schema.Literals<readonly ["absent", "present"]>, Schema.Trimmed>;
|
|
132
|
+
readonly enthalpyChange: Schema.optionalKey<RichSlot<E>>;
|
|
133
|
+
readonly parts: Schema.$Record<Schema.Literals<readonly ["reactantLevel", "productLevel", "uncatalysedPeak", "catalysedPeak", "catalystSurface"]>, Schema.Trimmed>;
|
|
134
|
+
readonly pathway: RichSlot<E>;
|
|
135
|
+
readonly reaction: Schema.Trimmed;
|
|
136
|
+
readonly reactions: Schema.$Record<Schema.Literals<readonly ["exothermic", "endothermic"]>, Schema.optionalKey<Schema.Trimmed>>;
|
|
137
|
+
readonly view: Schema.Trimmed;
|
|
138
|
+
}>;
|
|
139
|
+
readonly reactions: Schema.NonEmptyArray<Schema.Literals<readonly ["exothermic", "endothermic"]>>;
|
|
140
|
+
}>, "figure">;
|
|
141
|
+
CollisionTheoryEnergyLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
142
|
+
readonly description: RichSlot<E>;
|
|
143
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
144
|
+
readonly marks?: readonly [{
|
|
145
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
146
|
+
} | {
|
|
147
|
+
readonly attrs: {
|
|
148
|
+
readonly href: string;
|
|
149
|
+
};
|
|
150
|
+
readonly type: "link";
|
|
151
|
+
} | {
|
|
152
|
+
readonly attrs: {
|
|
153
|
+
readonly variant: "success" | "warning" | null;
|
|
154
|
+
};
|
|
155
|
+
readonly type: "highlight";
|
|
156
|
+
}, ...({
|
|
157
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
158
|
+
} | {
|
|
159
|
+
readonly attrs: {
|
|
160
|
+
readonly href: string;
|
|
161
|
+
};
|
|
162
|
+
readonly type: "link";
|
|
163
|
+
} | {
|
|
164
|
+
readonly attrs: {
|
|
165
|
+
readonly variant: "success" | "warning" | null;
|
|
166
|
+
};
|
|
167
|
+
readonly type: "highlight";
|
|
168
|
+
})[]];
|
|
169
|
+
readonly text: string;
|
|
170
|
+
readonly type: "text";
|
|
171
|
+
} | {
|
|
172
|
+
readonly attrs: {
|
|
173
|
+
readonly latex: string;
|
|
174
|
+
};
|
|
175
|
+
readonly marks?: readonly [{
|
|
176
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
177
|
+
} | {
|
|
178
|
+
readonly attrs: {
|
|
179
|
+
readonly href: string;
|
|
180
|
+
};
|
|
181
|
+
readonly type: "link";
|
|
182
|
+
} | {
|
|
183
|
+
readonly attrs: {
|
|
184
|
+
readonly variant: "success" | "warning" | null;
|
|
185
|
+
};
|
|
186
|
+
readonly type: "highlight";
|
|
187
|
+
}, ...({
|
|
188
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
189
|
+
} | {
|
|
190
|
+
readonly attrs: {
|
|
191
|
+
readonly href: string;
|
|
192
|
+
};
|
|
193
|
+
readonly type: "link";
|
|
194
|
+
} | {
|
|
195
|
+
readonly attrs: {
|
|
196
|
+
readonly variant: "success" | "warning" | null;
|
|
197
|
+
};
|
|
198
|
+
readonly type: "highlight";
|
|
199
|
+
})[]];
|
|
200
|
+
readonly type: "mathInline";
|
|
201
|
+
}, ...({
|
|
202
|
+
readonly marks?: readonly [{
|
|
203
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
204
|
+
} | {
|
|
205
|
+
readonly attrs: {
|
|
206
|
+
readonly href: string;
|
|
207
|
+
};
|
|
208
|
+
readonly type: "link";
|
|
209
|
+
} | {
|
|
210
|
+
readonly attrs: {
|
|
211
|
+
readonly variant: "success" | "warning" | null;
|
|
212
|
+
};
|
|
213
|
+
readonly type: "highlight";
|
|
214
|
+
}, ...({
|
|
215
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
216
|
+
} | {
|
|
217
|
+
readonly attrs: {
|
|
218
|
+
readonly href: string;
|
|
219
|
+
};
|
|
220
|
+
readonly type: "link";
|
|
221
|
+
} | {
|
|
222
|
+
readonly attrs: {
|
|
223
|
+
readonly variant: "success" | "warning" | null;
|
|
224
|
+
};
|
|
225
|
+
readonly type: "highlight";
|
|
226
|
+
})[]];
|
|
227
|
+
readonly text: string;
|
|
228
|
+
readonly type: "text";
|
|
229
|
+
} | {
|
|
230
|
+
readonly attrs: {
|
|
231
|
+
readonly latex: string;
|
|
232
|
+
};
|
|
233
|
+
readonly marks?: readonly [{
|
|
234
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
235
|
+
} | {
|
|
236
|
+
readonly attrs: {
|
|
237
|
+
readonly href: string;
|
|
238
|
+
};
|
|
239
|
+
readonly type: "link";
|
|
240
|
+
} | {
|
|
241
|
+
readonly attrs: {
|
|
242
|
+
readonly variant: "success" | "warning" | null;
|
|
243
|
+
};
|
|
244
|
+
readonly type: "highlight";
|
|
245
|
+
}, ...({
|
|
246
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
247
|
+
} | {
|
|
248
|
+
readonly attrs: {
|
|
249
|
+
readonly href: string;
|
|
250
|
+
};
|
|
251
|
+
readonly type: "link";
|
|
252
|
+
} | {
|
|
253
|
+
readonly attrs: {
|
|
254
|
+
readonly variant: "success" | "warning" | null;
|
|
255
|
+
};
|
|
256
|
+
readonly type: "highlight";
|
|
257
|
+
})[]];
|
|
258
|
+
readonly type: "mathInline";
|
|
259
|
+
})[]], E, never, never>>;
|
|
260
|
+
readonly title: RichSlot<E>;
|
|
261
|
+
readonly concentration: Schema.Struct<{
|
|
262
|
+
readonly max: Schema.Finite;
|
|
263
|
+
readonly min: Schema.Finite;
|
|
264
|
+
readonly value: Schema.Finite;
|
|
265
|
+
}>;
|
|
266
|
+
readonly labels: Schema.Struct<{
|
|
267
|
+
readonly activationEnergy: RichSlot<E>;
|
|
268
|
+
readonly collisionFreq: Schema.optionalKey<RichSlot<E>>;
|
|
269
|
+
readonly concentration: Schema.Trimmed;
|
|
270
|
+
readonly effectiveRate: Schema.optionalKey<RichSlot<E>>;
|
|
271
|
+
readonly parts: Schema.$Record<Schema.Literals<readonly ["reactants", "products", "activationLine", "shadedArea", "vessel"]>, Schema.Trimmed>;
|
|
272
|
+
readonly surface: Schema.Trimmed;
|
|
273
|
+
readonly surfaces: Schema.$Record<Schema.Literals<readonly ["lump", "granules", "powder"]>, Schema.optionalKey<Schema.Trimmed>>;
|
|
274
|
+
readonly temperature: Schema.Trimmed;
|
|
275
|
+
readonly view: Schema.Trimmed;
|
|
276
|
+
}>;
|
|
277
|
+
readonly surfaces: Schema.NonEmptyArray<Schema.Literals<readonly ["lump", "granules", "powder"]>>;
|
|
278
|
+
readonly temperature: Schema.Struct<{
|
|
279
|
+
readonly max: Schema.Finite;
|
|
280
|
+
readonly min: Schema.Finite;
|
|
281
|
+
readonly value: Schema.Finite;
|
|
282
|
+
}>;
|
|
283
|
+
}>, "figure">;
|
|
5
284
|
GasRateLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
6
285
|
readonly description: RichSlot<E>;
|
|
7
286
|
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
@@ -1,8 +1,22 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
2
|
+
import { byIds, byPickedIds, cardFields, namesEach, TextSchema, } from "#contracts/visual/card";
|
|
3
3
|
import { answerAt, figure } from "#contracts/visual/entry";
|
|
4
|
-
/**
|
|
4
|
+
/** A strictly positive finite setting for kinetics sliders. */
|
|
5
|
+
const PositiveSchema = Schema.Finite.check(Schema.isGreaterThan(0));
|
|
6
|
+
/** A strictly positive slider whose minimum sits below its maximum. */
|
|
7
|
+
const PositiveSliderSchema = Schema.Struct({
|
|
8
|
+
max: PositiveSchema,
|
|
9
|
+
min: PositiveSchema,
|
|
10
|
+
value: PositiveSchema,
|
|
11
|
+
}).check(Schema.makeFilter(({ max, min, value }) => min < max && min <= value && value <= max, {
|
|
12
|
+
message: "Expected a positive kinetics slider range whose minimum is below its maximum, with the starting value between them.",
|
|
13
|
+
}));
|
|
14
|
+
/** How finely a solid reactant is divided in the gas-rate lab. */
|
|
5
15
|
const SOLIDS = ["chips", "granules", "powder"];
|
|
16
|
+
/** Surface-area presets in the collision-theory energy lab. */
|
|
17
|
+
const SURFACES = ["lump", "granules", "powder"];
|
|
18
|
+
/** Enthalpy sign presets in the catalyst energy-profile lab. */
|
|
19
|
+
const REACTION_TYPES = ["exothermic", "endothermic"];
|
|
6
20
|
/**
|
|
7
21
|
* Props of `GasRateLab`: up to two runs of a reaction that gives off a gas,
|
|
8
22
|
* each a conical flask stoppered to a gas syringe, with the solid's form and
|
|
@@ -27,9 +41,73 @@ function gasRateLab(rich) {
|
|
|
27
41
|
showCurves: Schema.optionalKey(Schema.Boolean),
|
|
28
42
|
}), answerAt(["showCurves"]));
|
|
29
43
|
}
|
|
30
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Props of `CollisionTheoryEnergyLab`: a 3D reaction vessel and synchronized
|
|
46
|
+
* Maxwell-Boltzmann kinetic energy distribution showing effective collisions
|
|
47
|
+
* above activation energy as temperature, concentration, and surface area
|
|
48
|
+
* change. Collision frequency and effective rate readouts are optional answer
|
|
49
|
+
* state.
|
|
50
|
+
*/
|
|
51
|
+
function collisionTheoryEnergyLab(rich) {
|
|
52
|
+
return figure(Schema.Struct({
|
|
53
|
+
...cardFields(rich),
|
|
54
|
+
concentration: PositiveSliderSchema,
|
|
55
|
+
labels: Schema.Struct({
|
|
56
|
+
activationEnergy: rich,
|
|
57
|
+
collisionFreq: Schema.optionalKey(rich),
|
|
58
|
+
concentration: TextSchema,
|
|
59
|
+
effectiveRate: Schema.optionalKey(rich),
|
|
60
|
+
parts: byIds(["reactants", "products", "activationLine", "shadedArea", "vessel"], TextSchema),
|
|
61
|
+
surface: TextSchema,
|
|
62
|
+
surfaces: byPickedIds(SURFACES, TextSchema),
|
|
63
|
+
temperature: TextSchema,
|
|
64
|
+
view: TextSchema,
|
|
65
|
+
}),
|
|
66
|
+
surfaces: Schema.NonEmptyArray(Schema.Literals(SURFACES)).check(Schema.isUnique()),
|
|
67
|
+
temperature: PositiveSliderSchema,
|
|
68
|
+
}).check(Schema.makeFilter(({ labels, surfaces }) => namesEach(surfaces, labels.surfaces), {
|
|
69
|
+
message: "Expected a name for every solid surface-area preset shown, and no other.",
|
|
70
|
+
})), answerAt(["labels", "collisionFreq"], ["labels", "effectiveRate"]));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Props of `CatalystPathwayLab`: a 3D reaction-coordinate energy profile and
|
|
74
|
+
* catalyst surface contrasting uncatalysed and catalysed alternative pathways
|
|
75
|
+
* for exothermic and endothermic reactions without shifting enthalpy change.
|
|
76
|
+
* Activation energy and enthalpy change readouts are optional answer state.
|
|
77
|
+
*/
|
|
78
|
+
function catalystPathwayLab(rich) {
|
|
79
|
+
return figure(Schema.Struct({
|
|
80
|
+
...cardFields(rich),
|
|
81
|
+
labels: Schema.Struct({
|
|
82
|
+
activationEnergy: Schema.optionalKey(rich),
|
|
83
|
+
catalyst: TextSchema,
|
|
84
|
+
catalystStates: byIds(["absent", "present"], TextSchema),
|
|
85
|
+
enthalpyChange: Schema.optionalKey(rich),
|
|
86
|
+
parts: byIds([
|
|
87
|
+
"reactantLevel",
|
|
88
|
+
"productLevel",
|
|
89
|
+
"uncatalysedPeak",
|
|
90
|
+
"catalysedPeak",
|
|
91
|
+
"catalystSurface",
|
|
92
|
+
], TextSchema),
|
|
93
|
+
pathway: rich,
|
|
94
|
+
reaction: TextSchema,
|
|
95
|
+
reactions: byPickedIds(REACTION_TYPES, TextSchema),
|
|
96
|
+
view: TextSchema,
|
|
97
|
+
}),
|
|
98
|
+
reactions: Schema.NonEmptyArray(Schema.Literals(REACTION_TYPES)).check(Schema.isUnique()),
|
|
99
|
+
}).check(Schema.makeFilter(({ labels, reactions }) => namesEach(reactions, labels.reactions), {
|
|
100
|
+
message: "Expected a name for every reaction type shown in the catalyst lab, and no other.",
|
|
101
|
+
})), answerAt(["labels", "activationEnergy"], ["labels", "enthalpyChange"]));
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* The rate of reaction labs covering gas-syringe kinetics, collision theory,
|
|
105
|
+
* and catalytic energy pathways.
|
|
106
|
+
*/
|
|
31
107
|
export function rateVisuals(rich) {
|
|
32
108
|
return {
|
|
109
|
+
CatalystPathwayLab: catalystPathwayLab(rich),
|
|
110
|
+
CollisionTheoryEnergyLab: collisionTheoryEnergyLab(rich),
|
|
33
111
|
GasRateLab: gasRateLab(rich),
|
|
34
112
|
};
|
|
35
113
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
|
-
* The props of the electronics labs
|
|
5
|
-
*
|
|
4
|
+
* The props of the electronics labs covering transistor circuits, logic gates,
|
|
5
|
+
* and diode rectification.
|
|
6
6
|
*/
|
|
7
7
|
export declare function electronicsVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
-
|
|
8
|
+
LogicGateLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
9
|
readonly description: RichSlot<E>;
|
|
10
10
|
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
11
11
|
readonly marks?: readonly [{
|
|
@@ -125,22 +125,20 @@ export declare function electronicsVisuals<E>(rich: RichSlot<E>): {
|
|
|
125
125
|
readonly type: "mathInline";
|
|
126
126
|
})[]], E, never, never>>;
|
|
127
127
|
readonly title: RichSlot<E>;
|
|
128
|
-
readonly
|
|
129
|
-
readonly baseSupply: Schema.Finite;
|
|
130
|
-
readonly collector: Schema.Finite;
|
|
131
|
-
readonly collectorSupply: Schema.Finite;
|
|
132
|
-
readonly gain: Schema.Finite;
|
|
128
|
+
readonly gate: Schema.Literals<readonly ["AND", "OR", "NAND", "NOR", "XOR"]>;
|
|
133
129
|
readonly labels: Schema.Struct<{
|
|
134
|
-
readonly
|
|
135
|
-
readonly
|
|
136
|
-
readonly baseName: Schema.Trimmed;
|
|
137
|
-
readonly collectorCurrent: RichSlot<E>;
|
|
138
|
-
readonly collectorEmitter: RichSlot<E>;
|
|
130
|
+
readonly gate: Schema.Trimmed;
|
|
131
|
+
readonly matches: RichSlot<E>;
|
|
139
132
|
readonly viewLabel: Schema.Trimmed;
|
|
140
133
|
}>;
|
|
141
|
-
readonly
|
|
134
|
+
readonly rows: Schema.$Array<Schema.Struct<{
|
|
135
|
+
readonly a: Schema.Finite;
|
|
136
|
+
readonly b: Schema.Finite;
|
|
137
|
+
readonly c: Schema.Finite;
|
|
138
|
+
readonly q: Schema.Finite;
|
|
139
|
+
}>>;
|
|
142
140
|
}>, "figure">;
|
|
143
|
-
|
|
141
|
+
RectifierDiodeLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
144
142
|
readonly description: RichSlot<E>;
|
|
145
143
|
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
146
144
|
readonly marks?: readonly [{
|
|
@@ -260,18 +258,159 @@ export declare function electronicsVisuals<E>(rich: RichSlot<E>): {
|
|
|
260
258
|
readonly type: "mathInline";
|
|
261
259
|
})[]], E, never, never>>;
|
|
262
260
|
readonly title: RichSlot<E>;
|
|
263
|
-
readonly
|
|
261
|
+
readonly frequency: Schema.Struct<{
|
|
262
|
+
readonly max: Schema.Finite;
|
|
263
|
+
readonly min: Schema.Finite;
|
|
264
|
+
readonly value: Schema.Finite;
|
|
265
|
+
}>;
|
|
264
266
|
readonly labels: Schema.Struct<{
|
|
265
|
-
readonly
|
|
266
|
-
readonly
|
|
267
|
+
readonly conduction: Schema.optionalKey<RichSlot<E>>;
|
|
268
|
+
readonly frequency: Schema.Trimmed;
|
|
269
|
+
readonly inputWave: RichSlot<E>;
|
|
270
|
+
readonly mode: Schema.Trimmed;
|
|
271
|
+
readonly modes: Schema.$Record<Schema.Literals<readonly ["halfWave", "fullWave", "smoothed"]>, Schema.optionalKey<Schema.Trimmed>>;
|
|
272
|
+
readonly outputWave: RichSlot<E>;
|
|
273
|
+
readonly parts: Schema.$Record<Schema.Literals<readonly ["acSource", "diodeBridge", "capacitor", "loadResistor", "oscilloscope"]>, Schema.Trimmed>;
|
|
274
|
+
readonly ripple: Schema.optionalKey<RichSlot<E>>;
|
|
275
|
+
readonly view: Schema.Trimmed;
|
|
276
|
+
}>;
|
|
277
|
+
readonly modes: Schema.NonEmptyArray<Schema.Literals<readonly ["halfWave", "fullWave", "smoothed"]>>;
|
|
278
|
+
readonly peakVoltage: Schema.Finite;
|
|
279
|
+
}>, "figure">;
|
|
280
|
+
TransistorBiasLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
281
|
+
readonly description: RichSlot<E>;
|
|
282
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
283
|
+
readonly marks?: readonly [{
|
|
284
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
285
|
+
} | {
|
|
286
|
+
readonly attrs: {
|
|
287
|
+
readonly href: string;
|
|
288
|
+
};
|
|
289
|
+
readonly type: "link";
|
|
290
|
+
} | {
|
|
291
|
+
readonly attrs: {
|
|
292
|
+
readonly variant: "success" | "warning" | null;
|
|
293
|
+
};
|
|
294
|
+
readonly type: "highlight";
|
|
295
|
+
}, ...({
|
|
296
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
297
|
+
} | {
|
|
298
|
+
readonly attrs: {
|
|
299
|
+
readonly href: string;
|
|
300
|
+
};
|
|
301
|
+
readonly type: "link";
|
|
302
|
+
} | {
|
|
303
|
+
readonly attrs: {
|
|
304
|
+
readonly variant: "success" | "warning" | null;
|
|
305
|
+
};
|
|
306
|
+
readonly type: "highlight";
|
|
307
|
+
})[]];
|
|
308
|
+
readonly text: string;
|
|
309
|
+
readonly type: "text";
|
|
310
|
+
} | {
|
|
311
|
+
readonly attrs: {
|
|
312
|
+
readonly latex: string;
|
|
313
|
+
};
|
|
314
|
+
readonly marks?: readonly [{
|
|
315
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
316
|
+
} | {
|
|
317
|
+
readonly attrs: {
|
|
318
|
+
readonly href: string;
|
|
319
|
+
};
|
|
320
|
+
readonly type: "link";
|
|
321
|
+
} | {
|
|
322
|
+
readonly attrs: {
|
|
323
|
+
readonly variant: "success" | "warning" | null;
|
|
324
|
+
};
|
|
325
|
+
readonly type: "highlight";
|
|
326
|
+
}, ...({
|
|
327
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
328
|
+
} | {
|
|
329
|
+
readonly attrs: {
|
|
330
|
+
readonly href: string;
|
|
331
|
+
};
|
|
332
|
+
readonly type: "link";
|
|
333
|
+
} | {
|
|
334
|
+
readonly attrs: {
|
|
335
|
+
readonly variant: "success" | "warning" | null;
|
|
336
|
+
};
|
|
337
|
+
readonly type: "highlight";
|
|
338
|
+
})[]];
|
|
339
|
+
readonly type: "mathInline";
|
|
340
|
+
}, ...({
|
|
341
|
+
readonly marks?: readonly [{
|
|
342
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
343
|
+
} | {
|
|
344
|
+
readonly attrs: {
|
|
345
|
+
readonly href: string;
|
|
346
|
+
};
|
|
347
|
+
readonly type: "link";
|
|
348
|
+
} | {
|
|
349
|
+
readonly attrs: {
|
|
350
|
+
readonly variant: "success" | "warning" | null;
|
|
351
|
+
};
|
|
352
|
+
readonly type: "highlight";
|
|
353
|
+
}, ...({
|
|
354
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
355
|
+
} | {
|
|
356
|
+
readonly attrs: {
|
|
357
|
+
readonly href: string;
|
|
358
|
+
};
|
|
359
|
+
readonly type: "link";
|
|
360
|
+
} | {
|
|
361
|
+
readonly attrs: {
|
|
362
|
+
readonly variant: "success" | "warning" | null;
|
|
363
|
+
};
|
|
364
|
+
readonly type: "highlight";
|
|
365
|
+
})[]];
|
|
366
|
+
readonly text: string;
|
|
367
|
+
readonly type: "text";
|
|
368
|
+
} | {
|
|
369
|
+
readonly attrs: {
|
|
370
|
+
readonly latex: string;
|
|
371
|
+
};
|
|
372
|
+
readonly marks?: readonly [{
|
|
373
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
374
|
+
} | {
|
|
375
|
+
readonly attrs: {
|
|
376
|
+
readonly href: string;
|
|
377
|
+
};
|
|
378
|
+
readonly type: "link";
|
|
379
|
+
} | {
|
|
380
|
+
readonly attrs: {
|
|
381
|
+
readonly variant: "success" | "warning" | null;
|
|
382
|
+
};
|
|
383
|
+
readonly type: "highlight";
|
|
384
|
+
}, ...({
|
|
385
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
386
|
+
} | {
|
|
387
|
+
readonly attrs: {
|
|
388
|
+
readonly href: string;
|
|
389
|
+
};
|
|
390
|
+
readonly type: "link";
|
|
391
|
+
} | {
|
|
392
|
+
readonly attrs: {
|
|
393
|
+
readonly variant: "success" | "warning" | null;
|
|
394
|
+
};
|
|
395
|
+
readonly type: "highlight";
|
|
396
|
+
})[]];
|
|
397
|
+
readonly type: "mathInline";
|
|
398
|
+
})[]], E, never, never>>;
|
|
399
|
+
readonly title: RichSlot<E>;
|
|
400
|
+
readonly base: Schema.Finite;
|
|
401
|
+
readonly baseSupply: Schema.Finite;
|
|
402
|
+
readonly collector: Schema.Finite;
|
|
403
|
+
readonly collectorSupply: Schema.Finite;
|
|
404
|
+
readonly gain: Schema.Finite;
|
|
405
|
+
readonly labels: Schema.Struct<{
|
|
406
|
+
readonly base: RichSlot<E>;
|
|
407
|
+
readonly baseCurrent: RichSlot<E>;
|
|
408
|
+
readonly baseName: Schema.Trimmed;
|
|
409
|
+
readonly collectorCurrent: RichSlot<E>;
|
|
410
|
+
readonly collectorEmitter: RichSlot<E>;
|
|
267
411
|
readonly viewLabel: Schema.Trimmed;
|
|
268
412
|
}>;
|
|
269
|
-
readonly
|
|
270
|
-
readonly a: Schema.Finite;
|
|
271
|
-
readonly b: Schema.Finite;
|
|
272
|
-
readonly c: Schema.Finite;
|
|
273
|
-
readonly q: Schema.Finite;
|
|
274
|
-
}>>;
|
|
413
|
+
readonly threshold: Schema.Finite;
|
|
275
414
|
}>, "figure">;
|
|
276
415
|
TransistorSwitchLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
277
416
|
readonly description: RichSlot<E>;
|