@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
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { byIds, cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
|
-
import { figure } from "#contracts/visual/entry";
|
|
2
|
+
import { byIds, byPickedIds, cardFields, namesEach, TextSchema, } from "#contracts/visual/card";
|
|
3
|
+
import { answerAt, figure } from "#contracts/visual/entry";
|
|
4
|
+
/** A strictly positive finite setting for thermal lab 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 thermal slider range whose minimum is below its maximum, with the starting value between them.",
|
|
13
|
+
}));
|
|
14
|
+
const CALORIMETER_MATERIALS = [
|
|
15
|
+
"water",
|
|
16
|
+
"aluminium",
|
|
17
|
+
"copper",
|
|
18
|
+
"iron",
|
|
19
|
+
"oil",
|
|
20
|
+
];
|
|
21
|
+
const GAS_LAWS = ["boyle", "charles", "gayLussac"];
|
|
4
22
|
/** Props of `HeatingCurveLab`: an immersion heater of constant power melts a solid in a beaker and then warms the liquid. */
|
|
5
23
|
function heatingCurveLab(rich) {
|
|
6
24
|
return figure(Schema.Struct({
|
|
@@ -54,13 +72,74 @@ function iceMeltingLab(rich) {
|
|
|
54
72
|
}));
|
|
55
73
|
}
|
|
56
74
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
75
|
+
* Props of `SpecificHeatCalorimeterLab`: a 3D insulated electrical calorimeter
|
|
76
|
+
* comparing specific heat capacity across materials with adjustable mass,
|
|
77
|
+
* heater power, and heating time. Specific heat and temperature-rise readouts
|
|
78
|
+
* are optional answer state.
|
|
79
|
+
*/
|
|
80
|
+
function specificHeatCalorimeterLab(rich) {
|
|
81
|
+
return figure(Schema.Struct({
|
|
82
|
+
...cardFields(rich),
|
|
83
|
+
labels: Schema.Struct({
|
|
84
|
+
energy: rich,
|
|
85
|
+
mass: TextSchema,
|
|
86
|
+
material: TextSchema,
|
|
87
|
+
materials: byPickedIds(CALORIMETER_MATERIALS, TextSchema),
|
|
88
|
+
parts: byIds(["heater", "thermometer", "stirrer", "insulation", "sample"], TextSchema),
|
|
89
|
+
power: TextSchema,
|
|
90
|
+
specificHeat: Schema.optionalKey(rich),
|
|
91
|
+
temperatureRise: Schema.optionalKey(rich),
|
|
92
|
+
time: TextSchema,
|
|
93
|
+
view: TextSchema,
|
|
94
|
+
}),
|
|
95
|
+
mass: PositiveSliderSchema,
|
|
96
|
+
materials: Schema.NonEmptyArray(Schema.Literals(CALORIMETER_MATERIALS)).check(Schema.isUnique()),
|
|
97
|
+
minutes: PositiveSliderSchema,
|
|
98
|
+
power: PositiveSliderSchema,
|
|
99
|
+
}).check(Schema.makeFilter(({ labels, materials }) => namesEach(materials, labels.materials), {
|
|
100
|
+
message: "Expected a name for every calorimeter material shown, and no other.",
|
|
101
|
+
})), answerAt(["labels", "specificHeat"], ["labels", "temperatureRise"]));
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Props of `GasLawThermalLab`: a 3D piston-cylinder gas chamber exploring
|
|
105
|
+
* Boyle's, Charles's, and Gay-Lussac's laws with live particle collisions
|
|
106
|
+
* across temperature and volume controls. Collision rate and pressure readouts
|
|
107
|
+
* are optional answer state.
|
|
108
|
+
*/
|
|
109
|
+
function gasLawThermalLab(rich) {
|
|
110
|
+
return figure(Schema.Struct({
|
|
111
|
+
...cardFields(rich),
|
|
112
|
+
labels: Schema.Struct({
|
|
113
|
+
collisions: Schema.optionalKey(rich),
|
|
114
|
+
constant: rich,
|
|
115
|
+
law: TextSchema,
|
|
116
|
+
laws: byPickedIds(GAS_LAWS, Schema.Struct({
|
|
117
|
+
name: TextSchema,
|
|
118
|
+
relation: rich,
|
|
119
|
+
})),
|
|
120
|
+
parts: byIds(["piston", "cylinder", "gauge", "heater", "molecules"], TextSchema),
|
|
121
|
+
pressure: Schema.optionalKey(rich),
|
|
122
|
+
temperature: TextSchema,
|
|
123
|
+
view: TextSchema,
|
|
124
|
+
volume: TextSchema,
|
|
125
|
+
}),
|
|
126
|
+
laws: Schema.NonEmptyArray(Schema.Literals(GAS_LAWS)).check(Schema.isUnique()),
|
|
127
|
+
temperature: PositiveSliderSchema,
|
|
128
|
+
volume: PositiveSliderSchema,
|
|
129
|
+
}).check(Schema.makeFilter(({ labels, laws }) => namesEach(laws, labels.laws), {
|
|
130
|
+
message: "Expected a name and relation note for every gas law shown, and no other.",
|
|
131
|
+
})), answerAt(["labels", "collisions"], ["labels", "pressure"]));
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* The props of the heat labs covering heating curves, calorimetry, ice
|
|
135
|
+
* melting, and thermal gas laws.
|
|
59
136
|
*/
|
|
60
137
|
export function heatVisuals(rich) {
|
|
61
138
|
return {
|
|
62
|
-
|
|
139
|
+
GasLawThermalLab: gasLawThermalLab(rich),
|
|
63
140
|
GasPistonLab: gasPistonLab(rich),
|
|
141
|
+
HeatingCurveLab: heatingCurveLab(rich),
|
|
64
142
|
IceMeltingLab: iceMeltingLab(rich),
|
|
143
|
+
SpecificHeatCalorimeterLab: specificHeatCalorimeterLab(rich),
|
|
65
144
|
};
|
|
66
145
|
}
|
|
@@ -1,10 +1,143 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import type { RichSlot } from "#contracts/visual/card";
|
|
3
3
|
/**
|
|
4
|
-
* The props of the nuclear and quantum physics labs
|
|
5
|
-
*
|
|
4
|
+
* The props of the nuclear and quantum physics labs covering half-life,
|
|
5
|
+
* fission, binding-energy stability, and photoelectric emission.
|
|
6
6
|
*/
|
|
7
7
|
export declare function nuclearVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
FissionLab: 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 fragments: Schema.Tuple<readonly [Schema.Finite, Schema.Finite]>;
|
|
129
|
+
readonly labels: Schema.Struct<{
|
|
130
|
+
readonly defect: RichSlot<E>;
|
|
131
|
+
readonly energy: RichSlot<E>;
|
|
132
|
+
readonly kilograms: RichSlot<E>;
|
|
133
|
+
readonly viewLabel: Schema.Trimmed;
|
|
134
|
+
}>;
|
|
135
|
+
readonly lightSpeed: Schema.Finite;
|
|
136
|
+
readonly neutron: Schema.Finite;
|
|
137
|
+
readonly parent: Schema.Finite;
|
|
138
|
+
readonly released: Schema.Finite;
|
|
139
|
+
readonly unit: Schema.Finite;
|
|
140
|
+
}>, "figure">;
|
|
8
141
|
HalfLifeCounterLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
9
142
|
readonly description: RichSlot<E>;
|
|
10
143
|
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
@@ -136,7 +269,7 @@ export declare function nuclearVisuals<E>(rich: RichSlot<E>): {
|
|
|
136
269
|
readonly later: Schema.Finite;
|
|
137
270
|
readonly time: Schema.Finite;
|
|
138
271
|
}>, "figure">;
|
|
139
|
-
|
|
272
|
+
NuclearBindingCurveLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
140
273
|
readonly description: RichSlot<E>;
|
|
141
274
|
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
142
275
|
readonly marks?: readonly [{
|
|
@@ -256,18 +389,22 @@ export declare function nuclearVisuals<E>(rich: RichSlot<E>): {
|
|
|
256
389
|
readonly type: "mathInline";
|
|
257
390
|
})[]], E, never, never>>;
|
|
258
391
|
readonly title: RichSlot<E>;
|
|
259
|
-
readonly fragments: Schema.Tuple<readonly [Schema.Finite, Schema.Finite]>;
|
|
260
392
|
readonly labels: Schema.Struct<{
|
|
261
|
-
readonly
|
|
262
|
-
readonly
|
|
263
|
-
readonly
|
|
264
|
-
readonly
|
|
393
|
+
readonly bindingPerNucleon: Schema.optionalKey<RichSlot<E>>;
|
|
394
|
+
readonly massDefect: Schema.optionalKey<RichSlot<E>>;
|
|
395
|
+
readonly nuclide: Schema.Trimmed;
|
|
396
|
+
readonly nuclides: Schema.$Record<Schema.Literals<readonly ["deuterium", "helium4", "carbon12", "iron56", "uranium235"]>, Schema.optionalKey<Schema.Trimmed>>;
|
|
397
|
+
readonly parts: Schema.$Record<Schema.Literals<readonly ["proton", "neutron", "ironPeak", "fusionZone", "fissionZone"]>, Schema.Trimmed>;
|
|
398
|
+
readonly process: Schema.Trimmed;
|
|
399
|
+
readonly processes: Schema.$Record<Schema.Literals<readonly ["fusion", "fission"]>, Schema.optionalKey<Schema.Struct<{
|
|
400
|
+
readonly detail: RichSlot<E>;
|
|
401
|
+
readonly name: Schema.Trimmed;
|
|
402
|
+
}>>>;
|
|
403
|
+
readonly stability: RichSlot<E>;
|
|
404
|
+
readonly view: Schema.Trimmed;
|
|
265
405
|
}>;
|
|
266
|
-
readonly
|
|
267
|
-
readonly
|
|
268
|
-
readonly parent: Schema.Finite;
|
|
269
|
-
readonly released: Schema.Finite;
|
|
270
|
-
readonly unit: Schema.Finite;
|
|
406
|
+
readonly nuclides: Schema.NonEmptyArray<Schema.Literals<readonly ["deuterium", "helium4", "carbon12", "iron56", "uranium235"]>>;
|
|
407
|
+
readonly processes: Schema.NonEmptyArray<Schema.Literals<readonly ["fusion", "fission"]>>;
|
|
271
408
|
}>, "figure">;
|
|
272
409
|
PhotoelectricLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
273
410
|
readonly description: RichSlot<E>;
|
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { cardFields, TextSchema } from "#contracts/visual/card";
|
|
3
|
-
import { figure } from "#contracts/visual/entry";
|
|
2
|
+
import { byIds, byPickedIds, cardFields, namesEach, TextSchema, } from "#contracts/visual/card";
|
|
3
|
+
import { answerAt, figure } from "#contracts/visual/entry";
|
|
4
|
+
const NUCLIDES = [
|
|
5
|
+
"deuterium",
|
|
6
|
+
"helium4",
|
|
7
|
+
"carbon12",
|
|
8
|
+
"iron56",
|
|
9
|
+
"uranium235",
|
|
10
|
+
];
|
|
11
|
+
const NUCLEAR_PROCESSES = ["fusion", "fission"];
|
|
4
12
|
/** Props of `HalfLifeCounterLab`: a Geiger-Muller counter in front of a radioactive sample records its rate over time. */
|
|
5
13
|
function halfLifeCounterLab(rich) {
|
|
6
14
|
return figure(Schema.Struct({
|
|
@@ -57,13 +65,44 @@ function photoelectricLab(rich) {
|
|
|
57
65
|
}));
|
|
58
66
|
}
|
|
59
67
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
68
|
+
* Props of `NuclearBindingCurveLab`: a 3D nucleon cluster and binding-energy
|
|
69
|
+
* per nucleon curve contrasting light fusion, the iron-56 stability peak, and
|
|
70
|
+
* heavy fission. Binding energy per nucleon and mass defect readouts are
|
|
71
|
+
* optional answer state.
|
|
72
|
+
*/
|
|
73
|
+
function nuclearBindingCurveLab(rich) {
|
|
74
|
+
return figure(Schema.Struct({
|
|
75
|
+
...cardFields(rich),
|
|
76
|
+
labels: Schema.Struct({
|
|
77
|
+
bindingPerNucleon: Schema.optionalKey(rich),
|
|
78
|
+
massDefect: Schema.optionalKey(rich),
|
|
79
|
+
nuclide: TextSchema,
|
|
80
|
+
nuclides: byPickedIds(NUCLIDES, TextSchema),
|
|
81
|
+
parts: byIds(["proton", "neutron", "ironPeak", "fusionZone", "fissionZone"], TextSchema),
|
|
82
|
+
process: TextSchema,
|
|
83
|
+
processes: byPickedIds(NUCLEAR_PROCESSES, Schema.Struct({
|
|
84
|
+
detail: rich,
|
|
85
|
+
name: TextSchema,
|
|
86
|
+
})),
|
|
87
|
+
stability: rich,
|
|
88
|
+
view: TextSchema,
|
|
89
|
+
}),
|
|
90
|
+
nuclides: Schema.NonEmptyArray(Schema.Literals(NUCLIDES)).check(Schema.isUnique()),
|
|
91
|
+
processes: Schema.NonEmptyArray(Schema.Literals(NUCLEAR_PROCESSES)).check(Schema.isUnique()),
|
|
92
|
+
}).check(Schema.makeFilter(({ labels, nuclides, processes }) => namesEach(nuclides, labels.nuclides) &&
|
|
93
|
+
namesEach(processes, labels.processes), {
|
|
94
|
+
message: "Expected a name for every nuclide and nuclear process shown, and no other.",
|
|
95
|
+
})), answerAt(["labels", "bindingPerNucleon"], ["labels", "massDefect"]));
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* The props of the nuclear and quantum physics labs covering half-life,
|
|
99
|
+
* fission, binding-energy stability, and photoelectric emission.
|
|
62
100
|
*/
|
|
63
101
|
export function nuclearVisuals(rich) {
|
|
64
102
|
return {
|
|
65
|
-
HalfLifeCounterLab: halfLifeCounterLab(rich),
|
|
66
103
|
FissionLab: fissionLab(rich),
|
|
104
|
+
HalfLifeCounterLab: halfLifeCounterLab(rich),
|
|
105
|
+
NuclearBindingCurveLab: nuclearBindingCurveLab(rich),
|
|
67
106
|
PhotoelectricLab: photoelectricLab(rich),
|
|
68
107
|
};
|
|
69
108
|
}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import type { RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/**
|
|
4
|
+
* Quantum physics labs covering de Broglie matter-wave diffraction and
|
|
5
|
+
* Planck blackbody quantization.
|
|
6
|
+
*/
|
|
7
|
+
export declare function quantumVisuals<E>(rich: RichSlot<E>): {
|
|
8
|
+
DeBroglieMatterWaveLab: 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 diffraction: Schema.optionalKey<RichSlot<E>>;
|
|
130
|
+
readonly momentum: RichSlot<E>;
|
|
131
|
+
readonly particle: Schema.Trimmed;
|
|
132
|
+
readonly particles: Schema.$Record<Schema.Literals<readonly ["electron", "proton", "neutron", "alpha"]>, Schema.optionalKey<Schema.Trimmed>>;
|
|
133
|
+
readonly parts: Schema.$Record<Schema.Literals<readonly ["electronGun", "graphiteTarget", "matterWave", "diffractionRings", "screen"]>, Schema.Trimmed>;
|
|
134
|
+
readonly view: Schema.Trimmed;
|
|
135
|
+
readonly voltage: Schema.Trimmed;
|
|
136
|
+
readonly wavelength: Schema.optionalKey<RichSlot<E>>;
|
|
137
|
+
}>;
|
|
138
|
+
readonly particles: Schema.NonEmptyArray<Schema.Literals<readonly ["electron", "proton", "neutron", "alpha"]>>;
|
|
139
|
+
readonly voltage: Schema.Struct<{
|
|
140
|
+
readonly max: Schema.Finite;
|
|
141
|
+
readonly min: Schema.Finite;
|
|
142
|
+
readonly value: Schema.Finite;
|
|
143
|
+
}>;
|
|
144
|
+
}>, "figure">;
|
|
145
|
+
PlanckBlackbodyLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
146
|
+
readonly description: RichSlot<E>;
|
|
147
|
+
readonly footer: Schema.optionalKey<Schema.Codec<readonly [{
|
|
148
|
+
readonly marks?: readonly [{
|
|
149
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
150
|
+
} | {
|
|
151
|
+
readonly attrs: {
|
|
152
|
+
readonly href: string;
|
|
153
|
+
};
|
|
154
|
+
readonly type: "link";
|
|
155
|
+
} | {
|
|
156
|
+
readonly attrs: {
|
|
157
|
+
readonly variant: "success" | "warning" | null;
|
|
158
|
+
};
|
|
159
|
+
readonly type: "highlight";
|
|
160
|
+
}, ...({
|
|
161
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
162
|
+
} | {
|
|
163
|
+
readonly attrs: {
|
|
164
|
+
readonly href: string;
|
|
165
|
+
};
|
|
166
|
+
readonly type: "link";
|
|
167
|
+
} | {
|
|
168
|
+
readonly attrs: {
|
|
169
|
+
readonly variant: "success" | "warning" | null;
|
|
170
|
+
};
|
|
171
|
+
readonly type: "highlight";
|
|
172
|
+
})[]];
|
|
173
|
+
readonly text: string;
|
|
174
|
+
readonly type: "text";
|
|
175
|
+
} | {
|
|
176
|
+
readonly attrs: {
|
|
177
|
+
readonly latex: string;
|
|
178
|
+
};
|
|
179
|
+
readonly marks?: readonly [{
|
|
180
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
181
|
+
} | {
|
|
182
|
+
readonly attrs: {
|
|
183
|
+
readonly href: string;
|
|
184
|
+
};
|
|
185
|
+
readonly type: "link";
|
|
186
|
+
} | {
|
|
187
|
+
readonly attrs: {
|
|
188
|
+
readonly variant: "success" | "warning" | null;
|
|
189
|
+
};
|
|
190
|
+
readonly type: "highlight";
|
|
191
|
+
}, ...({
|
|
192
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
193
|
+
} | {
|
|
194
|
+
readonly attrs: {
|
|
195
|
+
readonly href: string;
|
|
196
|
+
};
|
|
197
|
+
readonly type: "link";
|
|
198
|
+
} | {
|
|
199
|
+
readonly attrs: {
|
|
200
|
+
readonly variant: "success" | "warning" | null;
|
|
201
|
+
};
|
|
202
|
+
readonly type: "highlight";
|
|
203
|
+
})[]];
|
|
204
|
+
readonly type: "mathInline";
|
|
205
|
+
}, ...({
|
|
206
|
+
readonly marks?: readonly [{
|
|
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: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
220
|
+
} | {
|
|
221
|
+
readonly attrs: {
|
|
222
|
+
readonly href: string;
|
|
223
|
+
};
|
|
224
|
+
readonly type: "link";
|
|
225
|
+
} | {
|
|
226
|
+
readonly attrs: {
|
|
227
|
+
readonly variant: "success" | "warning" | null;
|
|
228
|
+
};
|
|
229
|
+
readonly type: "highlight";
|
|
230
|
+
})[]];
|
|
231
|
+
readonly text: string;
|
|
232
|
+
readonly type: "text";
|
|
233
|
+
} | {
|
|
234
|
+
readonly attrs: {
|
|
235
|
+
readonly latex: string;
|
|
236
|
+
};
|
|
237
|
+
readonly marks?: readonly [{
|
|
238
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
239
|
+
} | {
|
|
240
|
+
readonly attrs: {
|
|
241
|
+
readonly href: string;
|
|
242
|
+
};
|
|
243
|
+
readonly type: "link";
|
|
244
|
+
} | {
|
|
245
|
+
readonly attrs: {
|
|
246
|
+
readonly variant: "success" | "warning" | null;
|
|
247
|
+
};
|
|
248
|
+
readonly type: "highlight";
|
|
249
|
+
}, ...({
|
|
250
|
+
readonly type: "bold" | "code" | "italic" | "subscript" | "superscript" | "underline";
|
|
251
|
+
} | {
|
|
252
|
+
readonly attrs: {
|
|
253
|
+
readonly href: string;
|
|
254
|
+
};
|
|
255
|
+
readonly type: "link";
|
|
256
|
+
} | {
|
|
257
|
+
readonly attrs: {
|
|
258
|
+
readonly variant: "success" | "warning" | null;
|
|
259
|
+
};
|
|
260
|
+
readonly type: "highlight";
|
|
261
|
+
})[]];
|
|
262
|
+
readonly type: "mathInline";
|
|
263
|
+
})[]], E, never, never>>;
|
|
264
|
+
readonly title: RichSlot<E>;
|
|
265
|
+
readonly labels: Schema.Struct<{
|
|
266
|
+
readonly model: Schema.Trimmed;
|
|
267
|
+
readonly models: Schema.$Record<Schema.Literals<readonly ["planck", "classical"]>, Schema.optionalKey<Schema.Trimmed>>;
|
|
268
|
+
readonly parts: Schema.$Record<Schema.Literals<readonly ["cavity", "planckCurve", "classicalCurve", "visibleBand", "peakMarker"]>, Schema.Trimmed>;
|
|
269
|
+
readonly peakWavelength: Schema.optionalKey<RichSlot<E>>;
|
|
270
|
+
readonly photonEnergy: Schema.optionalKey<RichSlot<E>>;
|
|
271
|
+
readonly spectrum: RichSlot<E>;
|
|
272
|
+
readonly temperature: Schema.Trimmed;
|
|
273
|
+
readonly view: Schema.Trimmed;
|
|
274
|
+
}>;
|
|
275
|
+
readonly models: Schema.NonEmptyArray<Schema.Literals<readonly ["planck", "classical"]>>;
|
|
276
|
+
readonly temperature: Schema.Struct<{
|
|
277
|
+
readonly max: Schema.Finite;
|
|
278
|
+
readonly min: Schema.Finite;
|
|
279
|
+
readonly value: Schema.Finite;
|
|
280
|
+
}>;
|
|
281
|
+
}>, "figure">;
|
|
282
|
+
};
|