@nakafa/aksara-contracts 8.12.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.
@@ -0,0 +1,436 @@
1
+ import { Schema } from "effect";
2
+ import type { RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * Leaf structure and photosynthesis organellar labs covering leaf lamina
5
+ * anatomy, stomatal guard-cell osmosis, and chloroplast reaction stages.
6
+ */
7
+ export declare function leafVisuals<E>(rich: RichSlot<E>): {
8
+ ChloroplastStageLab: 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 co2: Schema.Struct<{
129
+ readonly max: Schema.Finite;
130
+ readonly min: Schema.Finite;
131
+ readonly value: Schema.Finite;
132
+ }>;
133
+ readonly labels: Schema.Struct<{
134
+ readonly co2: Schema.Trimmed;
135
+ readonly factors: Schema.$Record<Schema.Literals<readonly ["light", "co2", "temperature", "balanced"]>, Schema.Trimmed>;
136
+ readonly gasStates: Schema.$Record<Schema.Literals<readonly ["netRelease", "compensation", "netUptake"]>, Schema.Trimmed>;
137
+ readonly light: Schema.Trimmed;
138
+ readonly limitingFactor: Schema.optionalKey<RichSlot<E>>;
139
+ readonly netGas: Schema.optionalKey<RichSlot<E>>;
140
+ readonly parts: Schema.$Record<Schema.Literals<readonly ["thylakoid", "granum", "stroma", "water", "oxygen", "atp", "nadph", "co2", "glucose"]>, Schema.Trimmed>;
141
+ readonly site: RichSlot<E>;
142
+ readonly sites: Schema.$Record<Schema.Literals<readonly ["lightDependent", "calvinCycle", "compensation"]>, Schema.optionalKey<RichSlot<E>>>;
143
+ readonly stage: Schema.Trimmed;
144
+ readonly stages: Schema.$Record<Schema.Literals<readonly ["lightDependent", "calvinCycle", "compensation"]>, Schema.optionalKey<Schema.Trimmed>>;
145
+ readonly temperature: Schema.Trimmed;
146
+ readonly view: Schema.Trimmed;
147
+ }>;
148
+ readonly light: Schema.Struct<{
149
+ readonly max: Schema.Finite;
150
+ readonly min: Schema.Finite;
151
+ readonly value: Schema.Finite;
152
+ }>;
153
+ readonly stages: Schema.NonEmptyArray<Schema.Literals<readonly ["lightDependent", "calvinCycle", "compensation"]>>;
154
+ readonly temperature: Schema.Struct<{
155
+ readonly max: Schema.Finite;
156
+ readonly min: Schema.Finite;
157
+ readonly value: Schema.Finite;
158
+ }>;
159
+ }>, "figure">;
160
+ LeafLaminaCrossSectionLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
161
+ readonly description: RichSlot<E>;
162
+ readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
163
+ readonly marks?: readonly [{
164
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
165
+ } | {
166
+ readonly attrs: {
167
+ readonly href: string;
168
+ };
169
+ readonly type: "link";
170
+ } | {
171
+ readonly attrs: {
172
+ readonly variant: "success" | "warning" | null;
173
+ };
174
+ readonly type: "highlight";
175
+ }, ...({
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 text: string;
189
+ readonly type: "text";
190
+ } | {
191
+ readonly attrs: {
192
+ readonly latex: string;
193
+ };
194
+ readonly marks?: readonly [{
195
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
196
+ } | {
197
+ readonly attrs: {
198
+ readonly href: string;
199
+ };
200
+ readonly type: "link";
201
+ } | {
202
+ readonly attrs: {
203
+ readonly variant: "success" | "warning" | null;
204
+ };
205
+ readonly type: "highlight";
206
+ }, ...({
207
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
208
+ } | {
209
+ readonly attrs: {
210
+ readonly href: string;
211
+ };
212
+ readonly type: "link";
213
+ } | {
214
+ readonly attrs: {
215
+ readonly variant: "success" | "warning" | null;
216
+ };
217
+ readonly type: "highlight";
218
+ })[]];
219
+ readonly type: "mathInline";
220
+ }, ...({
221
+ readonly marks?: readonly [{
222
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
223
+ } | {
224
+ readonly attrs: {
225
+ readonly href: string;
226
+ };
227
+ readonly type: "link";
228
+ } | {
229
+ readonly attrs: {
230
+ readonly variant: "success" | "warning" | null;
231
+ };
232
+ readonly type: "highlight";
233
+ }, ...({
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 text: string;
247
+ readonly type: "text";
248
+ } | {
249
+ readonly attrs: {
250
+ readonly latex: string;
251
+ };
252
+ readonly marks?: readonly [{
253
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
254
+ } | {
255
+ readonly attrs: {
256
+ readonly href: string;
257
+ };
258
+ readonly type: "link";
259
+ } | {
260
+ readonly attrs: {
261
+ readonly variant: "success" | "warning" | null;
262
+ };
263
+ readonly type: "highlight";
264
+ }, ...({
265
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
266
+ } | {
267
+ readonly attrs: {
268
+ readonly href: string;
269
+ };
270
+ readonly type: "link";
271
+ } | {
272
+ readonly attrs: {
273
+ readonly variant: "success" | "warning" | null;
274
+ };
275
+ readonly type: "highlight";
276
+ })[]];
277
+ readonly type: "mathInline";
278
+ })[]], E, never, never>>;
279
+ readonly title: RichSlot<E>;
280
+ readonly labels: Schema.Struct<{
281
+ readonly adaptation: Schema.optionalKey<RichSlot<E>>;
282
+ readonly chloroplasts: Schema.optionalKey<RichSlot<E>>;
283
+ readonly densities: Schema.$Record<Schema.Literals<readonly ["high", "moderate", "guardOnly", "none"]>, Schema.Trimmed>;
284
+ readonly layer: Schema.Trimmed;
285
+ readonly layers: Schema.$Record<Schema.Literals<readonly ["cuticle", "upperEpidermis", "palisade", "spongy", "vascular", "lowerEpidermis", "stoma"]>, Schema.optionalKey<Schema.Struct<{
286
+ readonly adaptation: RichSlot<E>;
287
+ readonly name: Schema.Trimmed;
288
+ }>>>;
289
+ readonly parts: Schema.$Record<Schema.Literals<readonly ["xylem", "phloem", "airSpace", "chloroplast", "guardCell"]>, Schema.Trimmed>;
290
+ readonly view: Schema.Trimmed;
291
+ }>;
292
+ readonly layers: Schema.NonEmptyArray<Schema.Literals<readonly ["cuticle", "upperEpidermis", "palisade", "spongy", "vascular", "lowerEpidermis", "stoma"]>>;
293
+ }>, "figure">;
294
+ StomatalGuardCellLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
295
+ readonly description: RichSlot<E>;
296
+ readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
297
+ readonly marks?: readonly [{
298
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
299
+ } | {
300
+ readonly attrs: {
301
+ readonly href: string;
302
+ };
303
+ readonly type: "link";
304
+ } | {
305
+ readonly attrs: {
306
+ readonly variant: "success" | "warning" | null;
307
+ };
308
+ readonly type: "highlight";
309
+ }, ...({
310
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
311
+ } | {
312
+ readonly attrs: {
313
+ readonly href: string;
314
+ };
315
+ readonly type: "link";
316
+ } | {
317
+ readonly attrs: {
318
+ readonly variant: "success" | "warning" | null;
319
+ };
320
+ readonly type: "highlight";
321
+ })[]];
322
+ readonly text: string;
323
+ readonly type: "text";
324
+ } | {
325
+ readonly attrs: {
326
+ readonly latex: string;
327
+ };
328
+ readonly marks?: readonly [{
329
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
330
+ } | {
331
+ readonly attrs: {
332
+ readonly href: string;
333
+ };
334
+ readonly type: "link";
335
+ } | {
336
+ readonly attrs: {
337
+ readonly variant: "success" | "warning" | null;
338
+ };
339
+ readonly type: "highlight";
340
+ }, ...({
341
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
342
+ } | {
343
+ readonly attrs: {
344
+ readonly href: string;
345
+ };
346
+ readonly type: "link";
347
+ } | {
348
+ readonly attrs: {
349
+ readonly variant: "success" | "warning" | null;
350
+ };
351
+ readonly type: "highlight";
352
+ })[]];
353
+ readonly type: "mathInline";
354
+ }, ...({
355
+ readonly marks?: readonly [{
356
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
357
+ } | {
358
+ readonly attrs: {
359
+ readonly href: string;
360
+ };
361
+ readonly type: "link";
362
+ } | {
363
+ readonly attrs: {
364
+ readonly variant: "success" | "warning" | null;
365
+ };
366
+ readonly type: "highlight";
367
+ }, ...({
368
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
369
+ } | {
370
+ readonly attrs: {
371
+ readonly href: string;
372
+ };
373
+ readonly type: "link";
374
+ } | {
375
+ readonly attrs: {
376
+ readonly variant: "success" | "warning" | null;
377
+ };
378
+ readonly type: "highlight";
379
+ })[]];
380
+ readonly text: string;
381
+ readonly type: "text";
382
+ } | {
383
+ readonly attrs: {
384
+ readonly latex: string;
385
+ };
386
+ readonly marks?: readonly [{
387
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
388
+ } | {
389
+ readonly attrs: {
390
+ readonly href: string;
391
+ };
392
+ readonly type: "link";
393
+ } | {
394
+ readonly attrs: {
395
+ readonly variant: "success" | "warning" | null;
396
+ };
397
+ readonly type: "highlight";
398
+ }, ...({
399
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
400
+ } | {
401
+ readonly attrs: {
402
+ readonly href: string;
403
+ };
404
+ readonly type: "link";
405
+ } | {
406
+ readonly attrs: {
407
+ readonly variant: "success" | "warning" | null;
408
+ };
409
+ readonly type: "highlight";
410
+ })[]];
411
+ readonly type: "mathInline";
412
+ })[]], E, never, never>>;
413
+ readonly title: RichSlot<E>;
414
+ readonly conditions: Schema.NonEmptyArray<Schema.Literals<readonly ["light", "dark", "drought"]>>;
415
+ readonly labels: Schema.Struct<{
416
+ readonly aperture: Schema.optionalKey<RichSlot<E>>;
417
+ readonly apertures: Schema.$Record<Schema.Literals<readonly ["open", "narrow", "closed"]>, Schema.Trimmed>;
418
+ readonly co2Intake: RichSlot<E>;
419
+ readonly condition: Schema.Trimmed;
420
+ readonly conditions: Schema.$Record<Schema.Literals<readonly ["light", "dark", "drought"]>, Schema.optionalKey<Schema.Trimmed>>;
421
+ readonly light: Schema.Trimmed;
422
+ readonly mechanism: Schema.optionalKey<RichSlot<E>>;
423
+ readonly mechanisms: Schema.$Record<Schema.Literals<readonly ["light", "dark", "drought"]>, Schema.optionalKey<RichSlot<E>>>;
424
+ readonly parts: Schema.$Record<Schema.Literals<readonly ["guardCell", "thickInnerWall", "thinOuterWall", "chloroplast", "vacuole", "pore", "potassiumIon", "water"]>, Schema.Trimmed>;
425
+ readonly transpiration: RichSlot<E>;
426
+ readonly turgor: RichSlot<E>;
427
+ readonly turgors: Schema.$Record<Schema.Literals<readonly ["turgid", "flaccid"]>, Schema.Trimmed>;
428
+ readonly view: Schema.Trimmed;
429
+ }>;
430
+ readonly light: Schema.Struct<{
431
+ readonly max: Schema.Finite;
432
+ readonly min: Schema.Finite;
433
+ readonly value: Schema.Finite;
434
+ }>;
435
+ }>, "figure">;
436
+ };
@@ -0,0 +1,151 @@
1
+ import { Schema } from "effect";
2
+ import { byIds, byPickedIds, cardFields, namesEach, TextSchema, } from "#contracts/visual/card";
3
+ import { answerAt, figure } from "#contracts/visual/entry";
4
+ /** A strictly positive finite upper bound for environmental sliders. */
5
+ const PositiveSchema = Schema.Finite.check(Schema.isGreaterThan(0));
6
+ /** A non-negative finite environmental setting. */
7
+ const NonNegativeSchema = Schema.Finite.check(Schema.isGreaterThanOrEqualTo(0));
8
+ /** A numeric slider whose minimum is strictly below its maximum. */
9
+ const SliderSchema = Schema.Struct({
10
+ max: PositiveSchema,
11
+ min: NonNegativeSchema,
12
+ value: NonNegativeSchema,
13
+ }).check(Schema.makeFilter(({ max, min, value }) => min < max && min <= value && value <= max, {
14
+ message: "Expected a slider range whose minimum is below its maximum, with the starting value between them.",
15
+ }));
16
+ const LEAF_LAYERS = [
17
+ "cuticle",
18
+ "upperEpidermis",
19
+ "palisade",
20
+ "spongy",
21
+ "vascular",
22
+ "lowerEpidermis",
23
+ "stoma",
24
+ ];
25
+ const STOMATA_CONDITIONS = ["light", "dark", "drought"];
26
+ const CHLOROPLAST_STAGES = [
27
+ "lightDependent",
28
+ "calvinCycle",
29
+ "compensation",
30
+ ];
31
+ /**
32
+ * Props of `LeafLaminaCrossSectionLab`: a 3D histological leaf lamina slice
33
+ * from waxy cuticle through palisade and spongy mesophyll and vascular bundle
34
+ * to lower epidermis and stoma. Adaptation and chloroplast density readouts
35
+ * show only when named so questions can withhold them.
36
+ */
37
+ function leafLaminaCrossSectionLab(rich) {
38
+ return figure(Schema.Struct({
39
+ ...cardFields(rich),
40
+ labels: Schema.Struct({
41
+ adaptation: Schema.optionalKey(rich),
42
+ chloroplasts: Schema.optionalKey(rich),
43
+ densities: byIds(["high", "moderate", "guardOnly", "none"], TextSchema),
44
+ layer: TextSchema,
45
+ layers: byPickedIds(LEAF_LAYERS, Schema.Struct({
46
+ adaptation: rich,
47
+ name: TextSchema,
48
+ })),
49
+ parts: byIds(["xylem", "phloem", "airSpace", "chloroplast", "guardCell"], TextSchema),
50
+ view: TextSchema,
51
+ }),
52
+ layers: Schema.NonEmptyArray(Schema.Literals(LEAF_LAYERS)).check(Schema.isUnique()),
53
+ }).check(Schema.makeFilter(({ labels, layers }) => namesEach(layers, labels.layers), {
54
+ message: "Expected a name and adaptation note for every leaf layer shown, and no other.",
55
+ })), answerAt(["labels", "adaptation"], ["labels", "chloroplasts"]));
56
+ }
57
+ /**
58
+ * Props of `StomatalGuardCellLab`: a 3D osmotic pair of kidney-shaped guard
59
+ * cells with thick inner walls that bow open when potassium ions and water
60
+ * enter in light and flatten shut in darkness or drought, tracking carbon
61
+ * dioxide intake and transpiration. Aperture and mechanism readouts are
62
+ * optional answer state.
63
+ */
64
+ function stomatalGuardCellLab(rich) {
65
+ return figure(Schema.Struct({
66
+ ...cardFields(rich),
67
+ conditions: Schema.NonEmptyArray(Schema.Literals(STOMATA_CONDITIONS)).check(Schema.isUnique()),
68
+ labels: Schema.Struct({
69
+ aperture: Schema.optionalKey(rich),
70
+ apertures: byIds(["open", "narrow", "closed"], TextSchema),
71
+ co2Intake: rich,
72
+ condition: TextSchema,
73
+ conditions: byPickedIds(STOMATA_CONDITIONS, TextSchema),
74
+ light: TextSchema,
75
+ mechanism: Schema.optionalKey(rich),
76
+ mechanisms: byPickedIds(STOMATA_CONDITIONS, rich),
77
+ parts: byIds([
78
+ "guardCell",
79
+ "thickInnerWall",
80
+ "thinOuterWall",
81
+ "chloroplast",
82
+ "vacuole",
83
+ "pore",
84
+ "potassiumIon",
85
+ "water",
86
+ ], TextSchema),
87
+ transpiration: rich,
88
+ turgor: rich,
89
+ turgors: byIds(["turgid", "flaccid"], TextSchema),
90
+ view: TextSchema,
91
+ }),
92
+ light: SliderSchema,
93
+ }).check(Schema.makeFilter(({ conditions, labels }) => namesEach(conditions, labels.conditions) &&
94
+ namesEach(conditions, labels.mechanisms), {
95
+ message: "Expected a name and mechanism note for every stomatal condition shown, and no other.",
96
+ })), answerAt(["labels", "aperture"], ["labels", "mechanism"]));
97
+ }
98
+ /**
99
+ * Props of `ChloroplastStageLab`: a 3D chloroplast showing thylakoid grana for
100
+ * the light-dependent reaction and stroma for the Calvin cycle, plus live
101
+ * limiting-factor controls (light, CO2, temperature) and the compensation
102
+ * point where photosynthesis balances respiration. Limiting factor and net gas
103
+ * exchange readouts are optional answer state.
104
+ */
105
+ function chloroplastStageLab(rich) {
106
+ return figure(Schema.Struct({
107
+ ...cardFields(rich),
108
+ co2: SliderSchema,
109
+ labels: Schema.Struct({
110
+ co2: TextSchema,
111
+ factors: byIds(["light", "co2", "temperature", "balanced"], TextSchema),
112
+ gasStates: byIds(["netRelease", "compensation", "netUptake"], TextSchema),
113
+ light: TextSchema,
114
+ limitingFactor: Schema.optionalKey(rich),
115
+ netGas: Schema.optionalKey(rich),
116
+ parts: byIds([
117
+ "thylakoid",
118
+ "granum",
119
+ "stroma",
120
+ "water",
121
+ "oxygen",
122
+ "atp",
123
+ "nadph",
124
+ "co2",
125
+ "glucose",
126
+ ], TextSchema),
127
+ site: rich,
128
+ sites: byPickedIds(CHLOROPLAST_STAGES, rich),
129
+ stage: TextSchema,
130
+ stages: byPickedIds(CHLOROPLAST_STAGES, TextSchema),
131
+ temperature: TextSchema,
132
+ view: TextSchema,
133
+ }),
134
+ light: SliderSchema,
135
+ stages: Schema.NonEmptyArray(Schema.Literals(CHLOROPLAST_STAGES)).check(Schema.isUnique()),
136
+ temperature: SliderSchema,
137
+ }).check(Schema.makeFilter(({ labels, stages }) => namesEach(stages, labels.stages) && namesEach(stages, labels.sites), {
138
+ message: "Expected a name and reaction site note for every chloroplast stage shown, and no other.",
139
+ })), answerAt(["labels", "limitingFactor"], ["labels", "netGas"]));
140
+ }
141
+ /**
142
+ * Leaf structure and photosynthesis organellar labs covering leaf lamina
143
+ * anatomy, stomatal guard-cell osmosis, and chloroplast reaction stages.
144
+ */
145
+ export function leafVisuals(rich) {
146
+ return {
147
+ ChloroplastStageLab: chloroplastStageLab(rich),
148
+ LeafLaminaCrossSectionLab: leafLaminaCrossSectionLab(rich),
149
+ StomatalGuardCellLab: stomatalGuardCellLab(rich),
150
+ };
151
+ }