@nakafa/aksara-contracts 8.13.0 → 8.15.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 (37) hide show
  1. package/dist/assessment/document.d.ts +15 -2
  2. package/dist/assessment/document.js +12 -3
  3. package/dist/visual/biology/flower.d.ts +276 -0
  4. package/dist/visual/biology/flower.js +76 -0
  5. package/dist/visual/biology/homeostasis.d.ts +284 -0
  6. package/dist/visual/biology/homeostasis.js +101 -0
  7. package/dist/visual/biology/membrane.d.ts +421 -0
  8. package/dist/visual/biology/membrane.js +129 -0
  9. package/dist/visual/biology/mendelian.d.ts +410 -0
  10. package/dist/visual/biology/mendelian.js +107 -0
  11. package/dist/visual/biology/neuron.d.ts +136 -1
  12. package/dist/visual/biology/neuron.js +41 -2
  13. package/dist/visual/biology/nutrition.d.ts +410 -0
  14. package/dist/visual/biology/nutrition.js +112 -0
  15. package/dist/visual/biology/phytohormone.d.ts +275 -0
  16. package/dist/visual/biology/phytohormone.js +75 -0
  17. package/dist/visual/biology/variation.d.ts +421 -0
  18. package/dist/visual/biology/variation.js +123 -0
  19. package/dist/visual/biology/vascular.d.ts +425 -0
  20. package/dist/visual/biology/vascular.js +107 -0
  21. package/dist/visual/biology.d.ts +2169 -0
  22. package/dist/visual/biology.js +12 -0
  23. package/dist/visual/catalog.d.ts +7460 -3208
  24. package/dist/visual/catalog.js +6 -0
  25. package/dist/visual/chemistry/rate.d.ts +280 -1
  26. package/dist/visual/chemistry/rate.js +81 -3
  27. package/dist/visual/physics/electronics.d.ts +163 -24
  28. package/dist/visual/physics/electronics.js +50 -5
  29. package/dist/visual/physics/gravity.d.ts +139 -4
  30. package/dist/visual/physics/gravity.js +46 -4
  31. package/dist/visual/physics/heat.d.ts +307 -12
  32. package/dist/visual/physics/heat.js +84 -5
  33. package/dist/visual/physics/nuclear.d.ts +150 -13
  34. package/dist/visual/physics/nuclear.js +44 -5
  35. package/dist/visual/physics/quantum.d.ts +282 -0
  36. package/dist/visual/physics/quantum.js +87 -0
  37. package/package.json +1 -1
@@ -0,0 +1,421 @@
1
+ import { Schema } from "effect";
2
+ import type { RichSlot } from "#contracts/visual/card";
3
+ /**
4
+ * Membrane transport labs covering fluid-mosaic structure, ATP-driven carrier
5
+ * pumps, and osmotic plasmolysis across plant and animal cells.
6
+ */
7
+ export declare function membraneVisuals<E>(rich: RichSlot<E>): {
8
+ ActiveTransportPumpLab: 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 gradient: 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 atpUse: Schema.optionalKey<RichSlot<E>>;
135
+ readonly direction: Schema.optionalKey<RichSlot<E>>;
136
+ readonly directions: Schema.$Record<Schema.Literals<readonly ["downGradient", "againstGradient"]>, Schema.Trimmed>;
137
+ readonly gradient: Schema.Trimmed;
138
+ readonly mode: Schema.Trimmed;
139
+ readonly modes: Schema.$Record<Schema.Literals<readonly ["simpleDiffusion", "facilitated", "activePump"]>, Schema.optionalKey<Schema.Struct<{
140
+ readonly mechanism: RichSlot<E>;
141
+ readonly name: Schema.Trimmed;
142
+ }>>>;
143
+ readonly parts: Schema.$Record<Schema.Literals<readonly ["bilayer", "channelProtein", "carrierPump", "solute", "atp", "adp"]>, Schema.Trimmed>;
144
+ readonly view: Schema.Trimmed;
145
+ }>;
146
+ readonly modes: Schema.NonEmptyArray<Schema.Literals<readonly ["simpleDiffusion", "facilitated", "activePump"]>>;
147
+ }>, "figure">;
148
+ FluidMosaicMembraneLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
149
+ readonly description: RichSlot<E>;
150
+ readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
151
+ readonly marks?: readonly [{
152
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
153
+ } | {
154
+ readonly attrs: {
155
+ readonly href: string;
156
+ };
157
+ readonly type: "link";
158
+ } | {
159
+ readonly attrs: {
160
+ readonly variant: "success" | "warning" | null;
161
+ };
162
+ readonly type: "highlight";
163
+ }, ...({
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 text: string;
177
+ readonly type: "text";
178
+ } | {
179
+ readonly attrs: {
180
+ readonly latex: string;
181
+ };
182
+ readonly marks?: readonly [{
183
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
184
+ } | {
185
+ readonly attrs: {
186
+ readonly href: string;
187
+ };
188
+ readonly type: "link";
189
+ } | {
190
+ readonly attrs: {
191
+ readonly variant: "success" | "warning" | null;
192
+ };
193
+ readonly type: "highlight";
194
+ }, ...({
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: "mathInline";
208
+ }, ...({
209
+ readonly marks?: readonly [{
210
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
211
+ } | {
212
+ readonly attrs: {
213
+ readonly href: string;
214
+ };
215
+ readonly type: "link";
216
+ } | {
217
+ readonly attrs: {
218
+ readonly variant: "success" | "warning" | null;
219
+ };
220
+ readonly type: "highlight";
221
+ }, ...({
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 text: string;
235
+ readonly type: "text";
236
+ } | {
237
+ readonly attrs: {
238
+ readonly latex: string;
239
+ };
240
+ readonly marks?: readonly [{
241
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
242
+ } | {
243
+ readonly attrs: {
244
+ readonly href: string;
245
+ };
246
+ readonly type: "link";
247
+ } | {
248
+ readonly attrs: {
249
+ readonly variant: "success" | "warning" | null;
250
+ };
251
+ readonly type: "highlight";
252
+ }, ...({
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: "mathInline";
266
+ })[]], E, never, never>>;
267
+ readonly title: RichSlot<E>;
268
+ readonly components: Schema.NonEmptyArray<Schema.Literals<readonly ["phospholipid", "cholesterol", "integralProtein", "glycoprotein"]>>;
269
+ readonly labels: Schema.Struct<{
270
+ readonly component: Schema.Trimmed;
271
+ readonly components: Schema.$Record<Schema.Literals<readonly ["phospholipid", "cholesterol", "integralProtein", "glycoprotein"]>, Schema.optionalKey<Schema.Struct<{
272
+ readonly name: Schema.Trimmed;
273
+ readonly role: RichSlot<E>;
274
+ }>>>;
275
+ readonly fluidity: Schema.optionalKey<RichSlot<E>>;
276
+ readonly parts: Schema.$Record<Schema.Literals<readonly ["hydrophilicHead", "hydrophobicTail", "cholesterol", "integralProtein", "glycoprotein", "glycolipid"]>, Schema.Trimmed>;
277
+ readonly role: Schema.optionalKey<RichSlot<E>>;
278
+ readonly temperature: Schema.Trimmed;
279
+ readonly view: Schema.Trimmed;
280
+ }>;
281
+ readonly temperature: Schema.Struct<{
282
+ readonly max: Schema.Finite;
283
+ readonly min: Schema.Finite;
284
+ readonly value: Schema.Finite;
285
+ }>;
286
+ }>, "figure">;
287
+ PlasmolysisCellLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
288
+ readonly description: RichSlot<E>;
289
+ readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
290
+ readonly marks?: readonly [{
291
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
292
+ } | {
293
+ readonly attrs: {
294
+ readonly href: string;
295
+ };
296
+ readonly type: "link";
297
+ } | {
298
+ readonly attrs: {
299
+ readonly variant: "success" | "warning" | null;
300
+ };
301
+ readonly type: "highlight";
302
+ }, ...({
303
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
304
+ } | {
305
+ readonly attrs: {
306
+ readonly href: string;
307
+ };
308
+ readonly type: "link";
309
+ } | {
310
+ readonly attrs: {
311
+ readonly variant: "success" | "warning" | null;
312
+ };
313
+ readonly type: "highlight";
314
+ })[]];
315
+ readonly text: string;
316
+ readonly type: "text";
317
+ } | {
318
+ readonly attrs: {
319
+ readonly latex: string;
320
+ };
321
+ readonly marks?: readonly [{
322
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
323
+ } | {
324
+ readonly attrs: {
325
+ readonly href: string;
326
+ };
327
+ readonly type: "link";
328
+ } | {
329
+ readonly attrs: {
330
+ readonly variant: "success" | "warning" | null;
331
+ };
332
+ readonly type: "highlight";
333
+ }, ...({
334
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
335
+ } | {
336
+ readonly attrs: {
337
+ readonly href: string;
338
+ };
339
+ readonly type: "link";
340
+ } | {
341
+ readonly attrs: {
342
+ readonly variant: "success" | "warning" | null;
343
+ };
344
+ readonly type: "highlight";
345
+ })[]];
346
+ readonly type: "mathInline";
347
+ }, ...({
348
+ readonly marks?: readonly [{
349
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
350
+ } | {
351
+ readonly attrs: {
352
+ readonly href: string;
353
+ };
354
+ readonly type: "link";
355
+ } | {
356
+ readonly attrs: {
357
+ readonly variant: "success" | "warning" | null;
358
+ };
359
+ readonly type: "highlight";
360
+ }, ...({
361
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
362
+ } | {
363
+ readonly attrs: {
364
+ readonly href: string;
365
+ };
366
+ readonly type: "link";
367
+ } | {
368
+ readonly attrs: {
369
+ readonly variant: "success" | "warning" | null;
370
+ };
371
+ readonly type: "highlight";
372
+ })[]];
373
+ readonly text: string;
374
+ readonly type: "text";
375
+ } | {
376
+ readonly attrs: {
377
+ readonly latex: string;
378
+ };
379
+ readonly marks?: readonly [{
380
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
381
+ } | {
382
+ readonly attrs: {
383
+ readonly href: string;
384
+ };
385
+ readonly type: "link";
386
+ } | {
387
+ readonly attrs: {
388
+ readonly variant: "success" | "warning" | null;
389
+ };
390
+ readonly type: "highlight";
391
+ }, ...({
392
+ readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
393
+ } | {
394
+ readonly attrs: {
395
+ readonly href: string;
396
+ };
397
+ readonly type: "link";
398
+ } | {
399
+ readonly attrs: {
400
+ readonly variant: "success" | "warning" | null;
401
+ };
402
+ readonly type: "highlight";
403
+ })[]];
404
+ readonly type: "mathInline";
405
+ })[]], E, never, never>>;
406
+ readonly title: RichSlot<E>;
407
+ readonly cells: Schema.NonEmptyArray<Schema.Literals<readonly ["plant", "redBlood"]>>;
408
+ readonly labels: Schema.Struct<{
409
+ readonly cell: Schema.Trimmed;
410
+ readonly cells: Schema.$Record<Schema.Literals<readonly ["plant", "redBlood"]>, Schema.optionalKey<Schema.Trimmed>>;
411
+ readonly outcome: Schema.optionalKey<RichSlot<E>>;
412
+ readonly outcomes: Schema.$Record<Schema.Literals<readonly ["turgid", "plasmolysed", "haemolysed", "crenated", "normal"]>, Schema.Trimmed>;
413
+ readonly parts: Schema.$Record<Schema.Literals<readonly ["cellWall", "membrane", "vacuole", "cytoplasm", "waterArrow"]>, Schema.Trimmed>;
414
+ readonly solution: Schema.Trimmed;
415
+ readonly solutions: Schema.$Record<Schema.Literals<readonly ["hypotonic", "isotonic", "hypertonic"]>, Schema.optionalKey<Schema.Trimmed>>;
416
+ readonly view: Schema.Trimmed;
417
+ readonly waterFlow: Schema.optionalKey<RichSlot<E>>;
418
+ }>;
419
+ readonly solutions: Schema.NonEmptyArray<Schema.Literals<readonly ["hypotonic", "isotonic", "hypertonic"]>>;
420
+ }>, "figure">;
421
+ };
@@ -0,0 +1,129 @@
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 non-negative finite measure for concentration gradient controls. */
5
+ const NonNegativeSchema = Schema.Finite.check(Schema.isGreaterThanOrEqualTo(0));
6
+ /** A strictly positive finite upper bound for gradient sliders. */
7
+ const PositiveSchema = Schema.Finite.check(Schema.isGreaterThan(0));
8
+ /** A non-negative slider whose minimum sits below its maximum. */
9
+ const GradientSliderSchema = 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 gradient range whose minimum is below its maximum, with the starting value between them.",
15
+ }));
16
+ const TRANSPORT_MODES = [
17
+ "simpleDiffusion",
18
+ "facilitated",
19
+ "activePump",
20
+ ];
21
+ const CELL_KINDS = ["plant", "redBlood"];
22
+ const TONICITIES = ["hypotonic", "isotonic", "hypertonic"];
23
+ const MEMBRANE_PARTS = [
24
+ "phospholipid",
25
+ "cholesterol",
26
+ "integralProtein",
27
+ "glycoprotein",
28
+ ];
29
+ /**
30
+ * Props of `ActiveTransportPumpLab`: a 3D phospholipid bilayer contrasting
31
+ * simple diffusion, facilitated diffusion through channel proteins, and
32
+ * ATP-driven carrier pumps moving solutes against a concentration gradient.
33
+ * ATP usage and direction readouts are optional answer state.
34
+ */
35
+ function activeTransportPumpLab(rich) {
36
+ return figure(Schema.Struct({
37
+ ...cardFields(rich),
38
+ gradient: GradientSliderSchema,
39
+ labels: Schema.Struct({
40
+ atpUse: Schema.optionalKey(rich),
41
+ direction: Schema.optionalKey(rich),
42
+ directions: byIds(["downGradient", "againstGradient"], TextSchema),
43
+ gradient: TextSchema,
44
+ mode: TextSchema,
45
+ modes: byPickedIds(TRANSPORT_MODES, Schema.Struct({
46
+ mechanism: rich,
47
+ name: TextSchema,
48
+ })),
49
+ parts: byIds(["bilayer", "channelProtein", "carrierPump", "solute", "atp", "adp"], TextSchema),
50
+ view: TextSchema,
51
+ }),
52
+ modes: Schema.NonEmptyArray(Schema.Literals(TRANSPORT_MODES)).check(Schema.isUnique()),
53
+ }).check(Schema.makeFilter(({ labels, modes }) => namesEach(modes, labels.modes), {
54
+ message: "Expected a name and mechanism note for every membrane transport mode shown, and no other.",
55
+ })), answerAt(["labels", "atpUse"], ["labels", "direction"]));
56
+ }
57
+ /**
58
+ * Props of `PlasmolysisCellLab`: a 3D plant cell and red blood cell compared
59
+ * across hypotonic, isotonic, and hypertonic solutions showing turgor,
60
+ * plasmolysis, haemolysis, and crenation. Cell outcome and net water-flow
61
+ * readouts are optional answer state.
62
+ */
63
+ function plasmolysisCellLab(rich) {
64
+ return figure(Schema.Struct({
65
+ ...cardFields(rich),
66
+ cells: Schema.NonEmptyArray(Schema.Literals(CELL_KINDS)).check(Schema.isUnique()),
67
+ labels: Schema.Struct({
68
+ cell: TextSchema,
69
+ cells: byPickedIds(CELL_KINDS, TextSchema),
70
+ outcome: Schema.optionalKey(rich),
71
+ outcomes: byIds(["turgid", "plasmolysed", "haemolysed", "crenated", "normal"], TextSchema),
72
+ parts: byIds(["cellWall", "membrane", "vacuole", "cytoplasm", "waterArrow"], TextSchema),
73
+ solution: TextSchema,
74
+ solutions: byPickedIds(TONICITIES, TextSchema),
75
+ view: TextSchema,
76
+ waterFlow: Schema.optionalKey(rich),
77
+ }),
78
+ solutions: Schema.NonEmptyArray(Schema.Literals(TONICITIES)).check(Schema.isUnique()),
79
+ }).check(Schema.makeFilter(({ cells, labels, solutions }) => namesEach(cells, labels.cells) &&
80
+ namesEach(solutions, labels.solutions), {
81
+ message: "Expected a name for every cell kind and tonicity solution shown, and no other.",
82
+ })), answerAt(["labels", "outcome"], ["labels", "waterFlow"]));
83
+ }
84
+ /**
85
+ * Props of `FluidMosaicMembraneLab`: a 3D Singer-Nicolson fluid-mosaic
86
+ * plasma membrane showing hydrophilic heads, hydrophobic fatty-acid tails,
87
+ * cholesterol buffers, integral proteins, and surface glycoproteins with a
88
+ * temperature slider affecting bilayer fluidity. Role and fluidity readouts
89
+ * are optional answer state.
90
+ */
91
+ function fluidMosaicMembraneLab(rich) {
92
+ return figure(Schema.Struct({
93
+ ...cardFields(rich),
94
+ components: Schema.NonEmptyArray(Schema.Literals(MEMBRANE_PARTS)).check(Schema.isUnique()),
95
+ labels: Schema.Struct({
96
+ component: TextSchema,
97
+ components: byPickedIds(MEMBRANE_PARTS, Schema.Struct({
98
+ name: TextSchema,
99
+ role: rich,
100
+ })),
101
+ fluidity: Schema.optionalKey(rich),
102
+ parts: byIds([
103
+ "hydrophilicHead",
104
+ "hydrophobicTail",
105
+ "cholesterol",
106
+ "integralProtein",
107
+ "glycoprotein",
108
+ "glycolipid",
109
+ ], TextSchema),
110
+ role: Schema.optionalKey(rich),
111
+ temperature: TextSchema,
112
+ view: TextSchema,
113
+ }),
114
+ temperature: GradientSliderSchema,
115
+ }).check(Schema.makeFilter(({ components, labels }) => namesEach(components, labels.components), {
116
+ message: "Expected a name and role note for every membrane component shown, and no other.",
117
+ })), answerAt(["labels", "fluidity"], ["labels", "role"]));
118
+ }
119
+ /**
120
+ * Membrane transport labs covering fluid-mosaic structure, ATP-driven carrier
121
+ * pumps, and osmotic plasmolysis across plant and animal cells.
122
+ */
123
+ export function membraneVisuals(rich) {
124
+ return {
125
+ ActiveTransportPumpLab: activeTransportPumpLab(rich),
126
+ FluidMosaicMembraneLab: fluidMosaicMembraneLab(rich),
127
+ PlasmolysisCellLab: plasmolysisCellLab(rich),
128
+ };
129
+ }