@nakafa/aksara-contracts 8.0.1 → 8.0.3
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/transport/limits.d.ts +6 -4
- package/dist/transport/limits.js +7 -5
- package/dist/visual/catalog.d.ts +83 -3
- package/dist/visual/catalog.js +6 -0
- package/dist/visual/chemistry/bonding.d.ts +1 -1
- package/dist/visual/chemistry/bonding.js +10 -0
- package/dist/visual/chemistry/electrochemistry.d.ts +43 -0
- package/dist/visual/chemistry/electrochemistry.js +79 -0
- package/dist/visual/chemistry/rate.d.ts +21 -0
- package/dist/visual/chemistry/rate.js +35 -0
- package/dist/visual/chemistry/titration.d.ts +31 -0
- package/dist/visual/chemistry/titration.js +69 -0
- package/package.json +2 -2
|
@@ -21,10 +21,12 @@ export declare const MAX_PROJECTION_BATCH_COUNT = 64;
|
|
|
21
21
|
/**
|
|
22
22
|
* Maximum complete structured-snapshot batch sent to publication ingress. Nakafa
|
|
23
23
|
* decodes, re-encodes, hashes and writes every row of a batch in one Convex
|
|
24
|
-
* mutation, which may run one second
|
|
25
|
-
* rows filled 4 MiB batches and every
|
|
26
|
-
*
|
|
27
|
-
*
|
|
24
|
+
* mutation, which may run one second, and its cost grows with the batch's bytes.
|
|
25
|
+
* On 16 November 2026 the 7.0.0 assessment rows filled 4 MiB batches and every
|
|
26
|
+
* stageSnapshotBatch timed out; release catalog-20261116c then timed out on a
|
|
27
|
+
* 1 MiB batch of Quran rows after nineteen minutes of staging. A batch therefore
|
|
28
|
+
* stays at half of that, which still holds the largest snapshot row: a Quran row
|
|
29
|
+
* of 369 KiB, while no assessment row passes 34 KiB.
|
|
28
30
|
*/
|
|
29
31
|
export declare const MAX_SNAPSHOT_BATCH_BYTES: number;
|
|
30
32
|
/** Maximum structured snapshot rows accepted by one staging transaction, inside the same one-second mutation. */
|
package/dist/transport/limits.js
CHANGED
|
@@ -21,12 +21,14 @@ export const MAX_PROJECTION_BATCH_COUNT = 64;
|
|
|
21
21
|
/**
|
|
22
22
|
* Maximum complete structured-snapshot batch sent to publication ingress. Nakafa
|
|
23
23
|
* decodes, re-encodes, hashes and writes every row of a batch in one Convex
|
|
24
|
-
* mutation, which may run one second
|
|
25
|
-
* rows filled 4 MiB batches and every
|
|
26
|
-
*
|
|
27
|
-
*
|
|
24
|
+
* mutation, which may run one second, and its cost grows with the batch's bytes.
|
|
25
|
+
* On 16 November 2026 the 7.0.0 assessment rows filled 4 MiB batches and every
|
|
26
|
+
* stageSnapshotBatch timed out; release catalog-20261116c then timed out on a
|
|
27
|
+
* 1 MiB batch of Quran rows after nineteen minutes of staging. A batch therefore
|
|
28
|
+
* stays at half of that, which still holds the largest snapshot row: a Quran row
|
|
29
|
+
* of 369 KiB, while no assessment row passes 34 KiB.
|
|
28
30
|
*/
|
|
29
|
-
export const MAX_SNAPSHOT_BATCH_BYTES =
|
|
31
|
+
export const MAX_SNAPSHOT_BATCH_BYTES = 512 * 1024;
|
|
30
32
|
/** Maximum structured snapshot rows accepted by one staging transaction, inside the same one-second mutation. */
|
|
31
33
|
export const MAX_SNAPSHOT_BATCH_COUNT = 16;
|
|
32
34
|
/** Maximum complete grouped staging body below the Node action argument cap. */
|
package/dist/visual/catalog.d.ts
CHANGED
|
@@ -1198,7 +1198,7 @@ export declare function visualCatalog<E>(rich: RichSlot<E>): {
|
|
|
1198
1198
|
readonly view: Schema.Trimmed;
|
|
1199
1199
|
}>;
|
|
1200
1200
|
readonly molecules: Schema.$Array<Schema.Struct<{
|
|
1201
|
-
readonly id: Schema.Literals<readonly ["hydrogen", "oxygen", "nitrogen", "chlorine", "hydrogen-chloride", "carbon-monoxide", "nitrogen-monoxide", "water", "hydrogen-peroxide", "carbon-dioxide", "sulfur-dioxide", "nitrogen-dioxide", "dinitrogen-monoxide", "ozone", "sulfur-trioxide", "ammonia", "methane", "ethene", "ethane", "ethyne", "propane", "ethanol", "methanol"]>;
|
|
1201
|
+
readonly id: Schema.Literals<readonly ["hydrogen", "oxygen", "nitrogen", "chlorine", "hydrogen-chloride", "carbon-monoxide", "nitrogen-monoxide", "water", "hydrogen-peroxide", "carbon-dioxide", "sulfur-dioxide", "nitrogen-dioxide", "dinitrogen-monoxide", "ozone", "sulfur-trioxide", "ammonia", "methane", "ethene", "ethane", "ethyne", "propane", "ethanol", "methanol", "hexane", "methylpentane-2", "methylpentane-3", "dimethylbutane-22", "dimethylbutane-23", "hexene", "dibromohexane", "propene", "propanol", "chloroethene"]>;
|
|
1202
1202
|
readonly name: Schema.Trimmed;
|
|
1203
1203
|
}>>;
|
|
1204
1204
|
}>, "figure">;
|
|
@@ -1303,6 +1303,44 @@ export declare function visualCatalog<E>(rich: RichSlot<E>): {
|
|
|
1303
1303
|
readonly years: Schema.Trimmed;
|
|
1304
1304
|
}>;
|
|
1305
1305
|
}>, "figure">;
|
|
1306
|
+
ChemicalCellLab: VisualEntry<Schema.Struct<{
|
|
1307
|
+
readonly description: RichSlot<E>;
|
|
1308
|
+
readonly title: RichSlot<E>;
|
|
1309
|
+
readonly electrons: Schema.optionalKey<Schema.Finite>;
|
|
1310
|
+
readonly labels: Schema.Struct<{
|
|
1311
|
+
readonly atNegative: RichSlot<E>;
|
|
1312
|
+
readonly atPositive: RichSlot<E>;
|
|
1313
|
+
readonly electrons: RichSlot<E>;
|
|
1314
|
+
readonly halfCells: RichSlot<E>;
|
|
1315
|
+
readonly view: Schema.Trimmed;
|
|
1316
|
+
readonly voltage: RichSlot<E>;
|
|
1317
|
+
readonly voltmeter: Schema.Trimmed;
|
|
1318
|
+
}>;
|
|
1319
|
+
readonly metals: Schema.Tuple<readonly [Schema.Literals<readonly ["magnesium", "zinc", "iron", "copper", "silver"]>, Schema.Literals<readonly ["magnesium", "zinc", "iron", "copper", "silver"]>]>;
|
|
1320
|
+
readonly showProducts: Schema.optionalKey<Schema.Boolean>;
|
|
1321
|
+
}>, "figure">;
|
|
1322
|
+
ElectrolysisLab: VisualEntry<Schema.Struct<{
|
|
1323
|
+
readonly description: RichSlot<E>;
|
|
1324
|
+
readonly title: RichSlot<E>;
|
|
1325
|
+
readonly cells: Schema.NonEmptyArray<Schema.Struct<{
|
|
1326
|
+
readonly electrode: Schema.Literals<readonly ["carbon", "platinum", "copper", "silver"]>;
|
|
1327
|
+
readonly electrolyte: Schema.Literals<readonly ["copper-sulfate", "silver-nitrate", "sodium-chloride-dilute", "sodium-chloride-concentrated", "sulfuric-acid"]>;
|
|
1328
|
+
}>>;
|
|
1329
|
+
readonly electrons: Schema.optionalKey<Schema.Finite>;
|
|
1330
|
+
readonly labels: Schema.Struct<{
|
|
1331
|
+
readonly anode: Schema.Trimmed;
|
|
1332
|
+
readonly atAnode: RichSlot<E>;
|
|
1333
|
+
readonly atCathode: RichSlot<E>;
|
|
1334
|
+
readonly battery: Schema.Trimmed;
|
|
1335
|
+
readonly cathode: Schema.Trimmed;
|
|
1336
|
+
readonly cells: Schema.NonEmptyArray<RichSlot<E>>;
|
|
1337
|
+
readonly electrons: RichSlot<E>;
|
|
1338
|
+
readonly ph: RichSlot<E>;
|
|
1339
|
+
readonly trends: Schema.$Record<Schema.Literals<readonly ["falls", "rises", "steady"]>, RichSlot<E>>;
|
|
1340
|
+
readonly view: Schema.Trimmed;
|
|
1341
|
+
}>;
|
|
1342
|
+
readonly showProducts: Schema.optionalKey<Schema.Boolean>;
|
|
1343
|
+
}>, "figure">;
|
|
1306
1344
|
ElectronConfigurationLab: VisualEntry<Schema.Struct<{
|
|
1307
1345
|
readonly description: RichSlot<E>;
|
|
1308
1346
|
readonly title: RichSlot<E>;
|
|
@@ -1562,6 +1600,22 @@ export declare function visualCatalog<E>(rich: RichSlot<E>): {
|
|
|
1562
1600
|
readonly sceneLabel: Schema.Trimmed;
|
|
1563
1601
|
}>;
|
|
1564
1602
|
}>, "figure">;
|
|
1603
|
+
GasRateLab: VisualEntry<Schema.Struct<{
|
|
1604
|
+
readonly description: RichSlot<E>;
|
|
1605
|
+
readonly title: RichSlot<E>;
|
|
1606
|
+
readonly labels: Schema.Struct<{
|
|
1607
|
+
readonly final: RichSlot<E>;
|
|
1608
|
+
readonly runs: Schema.NonEmptyArray<RichSlot<E>>;
|
|
1609
|
+
readonly solids: Schema.$Record<Schema.Literals<readonly ["chips", "granules", "powder"]>, RichSlot<E>>;
|
|
1610
|
+
readonly time: Schema.Trimmed;
|
|
1611
|
+
readonly view: Schema.Trimmed;
|
|
1612
|
+
}>;
|
|
1613
|
+
readonly runs: Schema.NonEmptyArray<Schema.Struct<{
|
|
1614
|
+
readonly amount: Schema.Finite;
|
|
1615
|
+
readonly solid: Schema.Literals<readonly ["chips", "granules", "powder"]>;
|
|
1616
|
+
}>>;
|
|
1617
|
+
readonly showCurves: Schema.optionalKey<Schema.Boolean>;
|
|
1618
|
+
}>, "figure">;
|
|
1565
1619
|
ChemicalReactionCharacteristicsLab: VisualEntry<Schema.Struct<{
|
|
1566
1620
|
readonly description: RichSlot<E>;
|
|
1567
1621
|
readonly title: RichSlot<E>;
|
|
@@ -1614,6 +1668,32 @@ export declare function visualCatalog<E>(rich: RichSlot<E>): {
|
|
|
1614
1668
|
readonly reactants: Schema.Trimmed;
|
|
1615
1669
|
}>;
|
|
1616
1670
|
}>, "figure">;
|
|
1671
|
+
TitrationLab: VisualEntry<Schema.Struct<{
|
|
1672
|
+
readonly description: RichSlot<E>;
|
|
1673
|
+
readonly title: RichSlot<E>;
|
|
1674
|
+
readonly analyte: Schema.Struct<{
|
|
1675
|
+
readonly concentration: Schema.Finite;
|
|
1676
|
+
readonly solute: Schema.Literals<readonly ["hydrochloric-acid", "sodium-hydroxide", "sodium-carbonate", "iron-sulfate"]>;
|
|
1677
|
+
readonly volume: Schema.Finite;
|
|
1678
|
+
}>;
|
|
1679
|
+
readonly indicator: Schema.Literals<readonly ["phenolphthalein", "methyl-orange", "none"]>;
|
|
1680
|
+
readonly labels: Schema.Struct<{
|
|
1681
|
+
readonly added: Schema.Trimmed;
|
|
1682
|
+
readonly analyte: RichSlot<E>;
|
|
1683
|
+
readonly endPoint: RichSlot<E>;
|
|
1684
|
+
readonly hue: RichSlot<E>;
|
|
1685
|
+
readonly hues: Schema.$Record<Schema.Literals<readonly ["colourless", "pink", "yellow", "orange", "red", "green", "pale-green"]>, RichSlot<E>>;
|
|
1686
|
+
readonly ph: RichSlot<E>;
|
|
1687
|
+
readonly reaction: RichSlot<E>;
|
|
1688
|
+
readonly titrant: RichSlot<E>;
|
|
1689
|
+
readonly view: Schema.Trimmed;
|
|
1690
|
+
}>;
|
|
1691
|
+
readonly showEndPoint: Schema.optionalKey<Schema.Boolean>;
|
|
1692
|
+
readonly titrant: Schema.Struct<{
|
|
1693
|
+
readonly concentration: Schema.Finite;
|
|
1694
|
+
readonly solute: Schema.Literals<readonly ["hydrochloric-acid", "sulfuric-acid", "sodium-hydroxide", "potassium-dichromate"]>;
|
|
1695
|
+
}>;
|
|
1696
|
+
}>, "figure">;
|
|
1617
1697
|
BarChart: VisualEntry<Schema.Struct<{
|
|
1618
1698
|
readonly description: RichSlot<E>;
|
|
1619
1699
|
readonly title: RichSlot<E>;
|
|
@@ -3146,7 +3226,7 @@ export type AssessmentVisuals = ReturnType<typeof visualCatalog<typeof RichTextS
|
|
|
3146
3226
|
*/
|
|
3147
3227
|
export declare const assessmentVisuals: AssessmentVisuals;
|
|
3148
3228
|
/** Every catalog name, in code-unit order. */
|
|
3149
|
-
export declare const VISUAL_NAMES: ("AccelerationGraphCard" | "AccelerationLab" | "AgentContext" | "AircraftCrosswindLab" | "AlkaliWaterLab" | "AncientAtomLab" | "AntibodyNeutralizeLab" | "AtomShellLab" | "AtomSymbolLab" | "AverageVelocitySpeedLab" | "BacteriaStructureLab" | "BacterialGrowth" | "BarChart" | "BicycleWheelSpeedLab" | "BinaryFissionLab" | "BiogasDigesterLab" | "BlockMath" | "BohrEmissionLab" | "BoltDimensionsLab" | "BrakeHeatLab" | "BrakingSurfaceLab" | "CarTripSecantSlopeLab" | "CarbonBudgetLab" | "CathodeRayLab" | "CellCutawayLab" | "CellScaleLab" | "Chart" | "ChemicalReactionCharacteristicsLab" | "ChemicalReactionTypesLab" | "ChemotaxisLab" | "CityWalkDisplacementLab" | "ClimateObservationLab" | "CodeBlock" | "CombiningVolumesLab" | "CommonReferenceLab" | "ConstantCompositionLab" | "ContentBlock" | "ContentGrid" | "ContentStack" | "CoralBleachLab" | "DaltonEvidenceLab" | "DecimalSumLab" | "DensityMeasurementLab" | "DimensionLab" | "DisplacementDistanceLab" | "DnaHelixLab" | "DoorHingeTorqueLab" | "DroneDisplacementLab" | "ElectronConfigurationLab" | "EnergyFlowLossLab" | "EpidemicSpreadLab" | "FallingTargetAimLab" | "FeatherCoinVacuumLab" | "FizzBalanceLab" | "FlashlightEfficiencyLab" | "FollowingDistanceLab" | "ForceTableResultantLab" | "FuelCombustionCarbonLab" | "FunctionAndNonFunctionDiagram" | "FunctionAndNonFunctionRelationVisualizer" | "FunctionChart" | "FunctionExplorationVirusChart" | "FunctionMachine" | "FungiMyceliumLab" | "GalileoInclineBellsLab" | "GeothermalLoopLab" | "GramStainLab" | "GreenhouseEffectLab" | "GreenhouseLayerLab" | "GridLoadCurveLab" | "Highlight" | "HistogramChart" | "HoistWorkLab" | "HoseJetProjectileLab" | "HydroDamLab" | "HyphaeDecayLab" | "InlineMath" | "InstantaneousVelocitySpeedLab" | "InverseFunctionIllustration" | "IonFormationLab" | "IonLab" | "IonLatticeLab" | "IsotopeLab" | "KettleHeatingLab" | "KimPlusElectabilityChart" | "KiteStringTensionLab" | "LavoisierCalxLab" | "LightGateSpeedLab" | "MassConservationLab" | "MassSpectrometerLab" | "MathContainer" | "MathVisual" | "MatterParticleReaderLab" | "MeasurementToolsLab" | "MerahPutihCabinetChart" | "MerahPutihCompositionChart" | "Mermaid" | "MethaneCombustionEquationLab" | "MicrohydroLab" | "MicrometerScrewLab" | "MicroscopeScaleLab" | "MillikanOilDropLab" | "ModernPeriodicTableLab" | "MoleculeShapeLab" | "MultipleProportionsLab" | "NepotismStage" | "NepotismStateTable" | "NonUniformLinearMotionGraphCard" | "NonUniformLinearMotionLab" | "OrbitalCloudLab" | "OrienteeringMapVectorLab" | "PaperStackLab" | "ParabolicMovementAnalysisLab" | "ParabolicMovementLab" | "ParallaxReadingLab" | "ParticleTrackLab" | "PendulumEnergyLab" | "PendulumPeriodLab" | "PeriodicPropertiesLab" | "PorkBarrelBudgetChart" | "PorkBarrelElectabilityChart" | "PorkBarrelFundChart" | "PrecipitateLab" | "PredatorPreyLab" | "QuadraticEquationReadingRoomProblem" | "RadioactiveDecayLab" | "RainDriveRelativeVelocityLab" | "RampBlockComponentLab" | "ReactionBalanceLab" | "ReactionTimeLab" | "RelativeMovementLab" | "RiverBoatCrossingLab" | "RunningTrackDisplacementLab" | "RutherfordScatteringLab" | "SarsCov2VirionLab" | "SatelliteOrbitCircularLab" | "ScatterDiagram" | "SeaLevelRiseLab" | "SequenceConceptTableChairsAnimation" | "ShipBearingComponentLab" | "SignificantZerosLab" | "SledPullWorkLab" | "SolarBatteryStorageLab" | "SolarPanelAngleLab" | "SolarPanelFluxLab" | "SolarPanelHeatLab" | "SolarRoofPaybackLab" | "SpeedTrapInstantSpeedLab" | "SteamPlantCycleLab" | "SteelWoolLab" | "StoppingDistanceLab" | "StopwatchSpreadLab" | "StreetOriginPositionLab" | "StringWhirlReleaseLab" | "StrobePhotoMotionLab" | "SubatomicParticlePropertiesLab" | "SubatomicParticlesLab" | "TickerTapeMotionLab" | "TrainPassengerRelativeLab" | "TugOfWarForceLab" | "TugboatResultantLab" | "UniformCircularMotionLab" | "UniformLinearMotionLab" | "UnitSystemsLab" | "ValenceElectronLab" | "VectorConceptLab" | "VelocitySpeedLab" | "VernierCaliperLab" | "VerticalMovementLab" | "VirusMorphologyLab" | "VirusReplicationLab" | "VirusRoleLab" | "VirusStructureLab" | "WaveBuoyPowerLab" | "WeightLampEnergyLab" | "WindEnergyConversionLab" | "WindMapVectorLab" | "WindRotorLab" | "WrenchTorqueLab" | "YogurtLab" | "Youtube")[];
|
|
3229
|
+
export declare const VISUAL_NAMES: ("AccelerationGraphCard" | "AccelerationLab" | "AgentContext" | "AircraftCrosswindLab" | "AlkaliWaterLab" | "AncientAtomLab" | "AntibodyNeutralizeLab" | "AtomShellLab" | "AtomSymbolLab" | "AverageVelocitySpeedLab" | "BacteriaStructureLab" | "BacterialGrowth" | "BarChart" | "BicycleWheelSpeedLab" | "BinaryFissionLab" | "BiogasDigesterLab" | "BlockMath" | "BohrEmissionLab" | "BoltDimensionsLab" | "BrakeHeatLab" | "BrakingSurfaceLab" | "CarTripSecantSlopeLab" | "CarbonBudgetLab" | "CathodeRayLab" | "CellCutawayLab" | "CellScaleLab" | "Chart" | "ChemicalCellLab" | "ChemicalReactionCharacteristicsLab" | "ChemicalReactionTypesLab" | "ChemotaxisLab" | "CityWalkDisplacementLab" | "ClimateObservationLab" | "CodeBlock" | "CombiningVolumesLab" | "CommonReferenceLab" | "ConstantCompositionLab" | "ContentBlock" | "ContentGrid" | "ContentStack" | "CoralBleachLab" | "DaltonEvidenceLab" | "DecimalSumLab" | "DensityMeasurementLab" | "DimensionLab" | "DisplacementDistanceLab" | "DnaHelixLab" | "DoorHingeTorqueLab" | "DroneDisplacementLab" | "ElectrolysisLab" | "ElectronConfigurationLab" | "EnergyFlowLossLab" | "EpidemicSpreadLab" | "FallingTargetAimLab" | "FeatherCoinVacuumLab" | "FizzBalanceLab" | "FlashlightEfficiencyLab" | "FollowingDistanceLab" | "ForceTableResultantLab" | "FuelCombustionCarbonLab" | "FunctionAndNonFunctionDiagram" | "FunctionAndNonFunctionRelationVisualizer" | "FunctionChart" | "FunctionExplorationVirusChart" | "FunctionMachine" | "FungiMyceliumLab" | "GalileoInclineBellsLab" | "GasRateLab" | "GeothermalLoopLab" | "GramStainLab" | "GreenhouseEffectLab" | "GreenhouseLayerLab" | "GridLoadCurveLab" | "Highlight" | "HistogramChart" | "HoistWorkLab" | "HoseJetProjectileLab" | "HydroDamLab" | "HyphaeDecayLab" | "InlineMath" | "InstantaneousVelocitySpeedLab" | "InverseFunctionIllustration" | "IonFormationLab" | "IonLab" | "IonLatticeLab" | "IsotopeLab" | "KettleHeatingLab" | "KimPlusElectabilityChart" | "KiteStringTensionLab" | "LavoisierCalxLab" | "LightGateSpeedLab" | "MassConservationLab" | "MassSpectrometerLab" | "MathContainer" | "MathVisual" | "MatterParticleReaderLab" | "MeasurementToolsLab" | "MerahPutihCabinetChart" | "MerahPutihCompositionChart" | "Mermaid" | "MethaneCombustionEquationLab" | "MicrohydroLab" | "MicrometerScrewLab" | "MicroscopeScaleLab" | "MillikanOilDropLab" | "ModernPeriodicTableLab" | "MoleculeShapeLab" | "MultipleProportionsLab" | "NepotismStage" | "NepotismStateTable" | "NonUniformLinearMotionGraphCard" | "NonUniformLinearMotionLab" | "OrbitalCloudLab" | "OrienteeringMapVectorLab" | "PaperStackLab" | "ParabolicMovementAnalysisLab" | "ParabolicMovementLab" | "ParallaxReadingLab" | "ParticleTrackLab" | "PendulumEnergyLab" | "PendulumPeriodLab" | "PeriodicPropertiesLab" | "PorkBarrelBudgetChart" | "PorkBarrelElectabilityChart" | "PorkBarrelFundChart" | "PrecipitateLab" | "PredatorPreyLab" | "QuadraticEquationReadingRoomProblem" | "RadioactiveDecayLab" | "RainDriveRelativeVelocityLab" | "RampBlockComponentLab" | "ReactionBalanceLab" | "ReactionTimeLab" | "RelativeMovementLab" | "RiverBoatCrossingLab" | "RunningTrackDisplacementLab" | "RutherfordScatteringLab" | "SarsCov2VirionLab" | "SatelliteOrbitCircularLab" | "ScatterDiagram" | "SeaLevelRiseLab" | "SequenceConceptTableChairsAnimation" | "ShipBearingComponentLab" | "SignificantZerosLab" | "SledPullWorkLab" | "SolarBatteryStorageLab" | "SolarPanelAngleLab" | "SolarPanelFluxLab" | "SolarPanelHeatLab" | "SolarRoofPaybackLab" | "SpeedTrapInstantSpeedLab" | "SteamPlantCycleLab" | "SteelWoolLab" | "StoppingDistanceLab" | "StopwatchSpreadLab" | "StreetOriginPositionLab" | "StringWhirlReleaseLab" | "StrobePhotoMotionLab" | "SubatomicParticlePropertiesLab" | "SubatomicParticlesLab" | "TickerTapeMotionLab" | "TitrationLab" | "TrainPassengerRelativeLab" | "TugOfWarForceLab" | "TugboatResultantLab" | "UniformCircularMotionLab" | "UniformLinearMotionLab" | "UnitSystemsLab" | "ValenceElectronLab" | "VectorConceptLab" | "VelocitySpeedLab" | "VernierCaliperLab" | "VerticalMovementLab" | "VirusMorphologyLab" | "VirusReplicationLab" | "VirusRoleLab" | "VirusStructureLab" | "WaveBuoyPowerLab" | "WeightLampEnergyLab" | "WindEnergyConversionLab" | "WindMapVectorLab" | "WindRotorLab" | "WrenchTorqueLab" | "YogurtLab" | "Youtube")[];
|
|
3150
3230
|
/** The name of one catalog component that a document draws as a figure. */
|
|
3151
3231
|
export type FigureName = {
|
|
3152
3232
|
readonly [Name in VisualName]: AssessmentVisuals[Name]["kind"] extends "figure" ? Name : never;
|
|
@@ -3154,7 +3234,7 @@ export type FigureName = {
|
|
|
3154
3234
|
/** The catalog components a document draws as a figure, in code-unit order. */
|
|
3155
3235
|
export declare const FIGURE_NAMES: FigureName[];
|
|
3156
3236
|
/** The name of one catalog component. */
|
|
3157
|
-
export declare const VisualNameSchema: Schema.Literals<("AccelerationGraphCard" | "AccelerationLab" | "AgentContext" | "AircraftCrosswindLab" | "AlkaliWaterLab" | "AncientAtomLab" | "AntibodyNeutralizeLab" | "AtomShellLab" | "AtomSymbolLab" | "AverageVelocitySpeedLab" | "BacteriaStructureLab" | "BacterialGrowth" | "BarChart" | "BicycleWheelSpeedLab" | "BinaryFissionLab" | "BiogasDigesterLab" | "BlockMath" | "BohrEmissionLab" | "BoltDimensionsLab" | "BrakeHeatLab" | "BrakingSurfaceLab" | "CarTripSecantSlopeLab" | "CarbonBudgetLab" | "CathodeRayLab" | "CellCutawayLab" | "CellScaleLab" | "Chart" | "ChemicalReactionCharacteristicsLab" | "ChemicalReactionTypesLab" | "ChemotaxisLab" | "CityWalkDisplacementLab" | "ClimateObservationLab" | "CodeBlock" | "CombiningVolumesLab" | "CommonReferenceLab" | "ConstantCompositionLab" | "ContentBlock" | "ContentGrid" | "ContentStack" | "CoralBleachLab" | "DaltonEvidenceLab" | "DecimalSumLab" | "DensityMeasurementLab" | "DimensionLab" | "DisplacementDistanceLab" | "DnaHelixLab" | "DoorHingeTorqueLab" | "DroneDisplacementLab" | "ElectronConfigurationLab" | "EnergyFlowLossLab" | "EpidemicSpreadLab" | "FallingTargetAimLab" | "FeatherCoinVacuumLab" | "FizzBalanceLab" | "FlashlightEfficiencyLab" | "FollowingDistanceLab" | "ForceTableResultantLab" | "FuelCombustionCarbonLab" | "FunctionAndNonFunctionDiagram" | "FunctionAndNonFunctionRelationVisualizer" | "FunctionChart" | "FunctionExplorationVirusChart" | "FunctionMachine" | "FungiMyceliumLab" | "GalileoInclineBellsLab" | "GeothermalLoopLab" | "GramStainLab" | "GreenhouseEffectLab" | "GreenhouseLayerLab" | "GridLoadCurveLab" | "Highlight" | "HistogramChart" | "HoistWorkLab" | "HoseJetProjectileLab" | "HydroDamLab" | "HyphaeDecayLab" | "InlineMath" | "InstantaneousVelocitySpeedLab" | "InverseFunctionIllustration" | "IonFormationLab" | "IonLab" | "IonLatticeLab" | "IsotopeLab" | "KettleHeatingLab" | "KimPlusElectabilityChart" | "KiteStringTensionLab" | "LavoisierCalxLab" | "LightGateSpeedLab" | "MassConservationLab" | "MassSpectrometerLab" | "MathContainer" | "MathVisual" | "MatterParticleReaderLab" | "MeasurementToolsLab" | "MerahPutihCabinetChart" | "MerahPutihCompositionChart" | "Mermaid" | "MethaneCombustionEquationLab" | "MicrohydroLab" | "MicrometerScrewLab" | "MicroscopeScaleLab" | "MillikanOilDropLab" | "ModernPeriodicTableLab" | "MoleculeShapeLab" | "MultipleProportionsLab" | "NepotismStage" | "NepotismStateTable" | "NonUniformLinearMotionGraphCard" | "NonUniformLinearMotionLab" | "OrbitalCloudLab" | "OrienteeringMapVectorLab" | "PaperStackLab" | "ParabolicMovementAnalysisLab" | "ParabolicMovementLab" | "ParallaxReadingLab" | "ParticleTrackLab" | "PendulumEnergyLab" | "PendulumPeriodLab" | "PeriodicPropertiesLab" | "PorkBarrelBudgetChart" | "PorkBarrelElectabilityChart" | "PorkBarrelFundChart" | "PrecipitateLab" | "PredatorPreyLab" | "QuadraticEquationReadingRoomProblem" | "RadioactiveDecayLab" | "RainDriveRelativeVelocityLab" | "RampBlockComponentLab" | "ReactionBalanceLab" | "ReactionTimeLab" | "RelativeMovementLab" | "RiverBoatCrossingLab" | "RunningTrackDisplacementLab" | "RutherfordScatteringLab" | "SarsCov2VirionLab" | "SatelliteOrbitCircularLab" | "ScatterDiagram" | "SeaLevelRiseLab" | "SequenceConceptTableChairsAnimation" | "ShipBearingComponentLab" | "SignificantZerosLab" | "SledPullWorkLab" | "SolarBatteryStorageLab" | "SolarPanelAngleLab" | "SolarPanelFluxLab" | "SolarPanelHeatLab" | "SolarRoofPaybackLab" | "SpeedTrapInstantSpeedLab" | "SteamPlantCycleLab" | "SteelWoolLab" | "StoppingDistanceLab" | "StopwatchSpreadLab" | "StreetOriginPositionLab" | "StringWhirlReleaseLab" | "StrobePhotoMotionLab" | "SubatomicParticlePropertiesLab" | "SubatomicParticlesLab" | "TickerTapeMotionLab" | "TrainPassengerRelativeLab" | "TugOfWarForceLab" | "TugboatResultantLab" | "UniformCircularMotionLab" | "UniformLinearMotionLab" | "UnitSystemsLab" | "ValenceElectronLab" | "VectorConceptLab" | "VelocitySpeedLab" | "VernierCaliperLab" | "VerticalMovementLab" | "VirusMorphologyLab" | "VirusReplicationLab" | "VirusRoleLab" | "VirusStructureLab" | "WaveBuoyPowerLab" | "WeightLampEnergyLab" | "WindEnergyConversionLab" | "WindMapVectorLab" | "WindRotorLab" | "WrenchTorqueLab" | "YogurtLab" | "Youtube")[]>;
|
|
3237
|
+
export declare const VisualNameSchema: Schema.Literals<("AccelerationGraphCard" | "AccelerationLab" | "AgentContext" | "AircraftCrosswindLab" | "AlkaliWaterLab" | "AncientAtomLab" | "AntibodyNeutralizeLab" | "AtomShellLab" | "AtomSymbolLab" | "AverageVelocitySpeedLab" | "BacteriaStructureLab" | "BacterialGrowth" | "BarChart" | "BicycleWheelSpeedLab" | "BinaryFissionLab" | "BiogasDigesterLab" | "BlockMath" | "BohrEmissionLab" | "BoltDimensionsLab" | "BrakeHeatLab" | "BrakingSurfaceLab" | "CarTripSecantSlopeLab" | "CarbonBudgetLab" | "CathodeRayLab" | "CellCutawayLab" | "CellScaleLab" | "Chart" | "ChemicalCellLab" | "ChemicalReactionCharacteristicsLab" | "ChemicalReactionTypesLab" | "ChemotaxisLab" | "CityWalkDisplacementLab" | "ClimateObservationLab" | "CodeBlock" | "CombiningVolumesLab" | "CommonReferenceLab" | "ConstantCompositionLab" | "ContentBlock" | "ContentGrid" | "ContentStack" | "CoralBleachLab" | "DaltonEvidenceLab" | "DecimalSumLab" | "DensityMeasurementLab" | "DimensionLab" | "DisplacementDistanceLab" | "DnaHelixLab" | "DoorHingeTorqueLab" | "DroneDisplacementLab" | "ElectrolysisLab" | "ElectronConfigurationLab" | "EnergyFlowLossLab" | "EpidemicSpreadLab" | "FallingTargetAimLab" | "FeatherCoinVacuumLab" | "FizzBalanceLab" | "FlashlightEfficiencyLab" | "FollowingDistanceLab" | "ForceTableResultantLab" | "FuelCombustionCarbonLab" | "FunctionAndNonFunctionDiagram" | "FunctionAndNonFunctionRelationVisualizer" | "FunctionChart" | "FunctionExplorationVirusChart" | "FunctionMachine" | "FungiMyceliumLab" | "GalileoInclineBellsLab" | "GasRateLab" | "GeothermalLoopLab" | "GramStainLab" | "GreenhouseEffectLab" | "GreenhouseLayerLab" | "GridLoadCurveLab" | "Highlight" | "HistogramChart" | "HoistWorkLab" | "HoseJetProjectileLab" | "HydroDamLab" | "HyphaeDecayLab" | "InlineMath" | "InstantaneousVelocitySpeedLab" | "InverseFunctionIllustration" | "IonFormationLab" | "IonLab" | "IonLatticeLab" | "IsotopeLab" | "KettleHeatingLab" | "KimPlusElectabilityChart" | "KiteStringTensionLab" | "LavoisierCalxLab" | "LightGateSpeedLab" | "MassConservationLab" | "MassSpectrometerLab" | "MathContainer" | "MathVisual" | "MatterParticleReaderLab" | "MeasurementToolsLab" | "MerahPutihCabinetChart" | "MerahPutihCompositionChart" | "Mermaid" | "MethaneCombustionEquationLab" | "MicrohydroLab" | "MicrometerScrewLab" | "MicroscopeScaleLab" | "MillikanOilDropLab" | "ModernPeriodicTableLab" | "MoleculeShapeLab" | "MultipleProportionsLab" | "NepotismStage" | "NepotismStateTable" | "NonUniformLinearMotionGraphCard" | "NonUniformLinearMotionLab" | "OrbitalCloudLab" | "OrienteeringMapVectorLab" | "PaperStackLab" | "ParabolicMovementAnalysisLab" | "ParabolicMovementLab" | "ParallaxReadingLab" | "ParticleTrackLab" | "PendulumEnergyLab" | "PendulumPeriodLab" | "PeriodicPropertiesLab" | "PorkBarrelBudgetChart" | "PorkBarrelElectabilityChart" | "PorkBarrelFundChart" | "PrecipitateLab" | "PredatorPreyLab" | "QuadraticEquationReadingRoomProblem" | "RadioactiveDecayLab" | "RainDriveRelativeVelocityLab" | "RampBlockComponentLab" | "ReactionBalanceLab" | "ReactionTimeLab" | "RelativeMovementLab" | "RiverBoatCrossingLab" | "RunningTrackDisplacementLab" | "RutherfordScatteringLab" | "SarsCov2VirionLab" | "SatelliteOrbitCircularLab" | "ScatterDiagram" | "SeaLevelRiseLab" | "SequenceConceptTableChairsAnimation" | "ShipBearingComponentLab" | "SignificantZerosLab" | "SledPullWorkLab" | "SolarBatteryStorageLab" | "SolarPanelAngleLab" | "SolarPanelFluxLab" | "SolarPanelHeatLab" | "SolarRoofPaybackLab" | "SpeedTrapInstantSpeedLab" | "SteamPlantCycleLab" | "SteelWoolLab" | "StoppingDistanceLab" | "StopwatchSpreadLab" | "StreetOriginPositionLab" | "StringWhirlReleaseLab" | "StrobePhotoMotionLab" | "SubatomicParticlePropertiesLab" | "SubatomicParticlesLab" | "TickerTapeMotionLab" | "TitrationLab" | "TrainPassengerRelativeLab" | "TugOfWarForceLab" | "TugboatResultantLab" | "UniformCircularMotionLab" | "UniformLinearMotionLab" | "UnitSystemsLab" | "ValenceElectronLab" | "VectorConceptLab" | "VelocitySpeedLab" | "VernierCaliperLab" | "VerticalMovementLab" | "VirusMorphologyLab" | "VirusReplicationLab" | "VirusRoleLab" | "VirusStructureLab" | "WaveBuoyPowerLab" | "WeightLampEnergyLab" | "WindEnergyConversionLab" | "WindMapVectorLab" | "WindRotorLab" | "WrenchTorqueLab" | "YogurtLab" | "Youtube")[]>;
|
|
3158
3238
|
/** The name of one catalog component that a document draws as a figure. */
|
|
3159
3239
|
export declare const FigureNameSchema: Schema.Literals<FigureName[]>;
|
|
3160
3240
|
/**
|
package/dist/visual/catalog.js
CHANGED
|
@@ -12,11 +12,14 @@ import { atomVisuals } from "#contracts/visual/chemistry/atom";
|
|
|
12
12
|
import { balanceVisuals } from "#contracts/visual/chemistry/balance";
|
|
13
13
|
import { bondingVisuals } from "#contracts/visual/chemistry/bonding";
|
|
14
14
|
import { discoveryVisuals } from "#contracts/visual/chemistry/discovery";
|
|
15
|
+
import { electrochemistryVisuals } from "#contracts/visual/chemistry/electrochemistry";
|
|
15
16
|
import { electronVisuals } from "#contracts/visual/chemistry/electron";
|
|
16
17
|
import { lawVisuals } from "#contracts/visual/chemistry/laws";
|
|
17
18
|
import { particleVisuals } from "#contracts/visual/chemistry/particles";
|
|
18
19
|
import { periodicVisuals } from "#contracts/visual/chemistry/periodic";
|
|
20
|
+
import { rateVisuals } from "#contracts/visual/chemistry/rate";
|
|
19
21
|
import { reactionVisuals } from "#contracts/visual/chemistry/reaction";
|
|
22
|
+
import { titrationVisuals } from "#contracts/visual/chemistry/titration";
|
|
20
23
|
import { chartVisuals } from "#contracts/visual/mathematics/charts";
|
|
21
24
|
import { functionVisuals } from "#contracts/visual/mathematics/function";
|
|
22
25
|
import { geometryVisuals } from "#contracts/visual/mathematics/geometry";
|
|
@@ -56,6 +59,9 @@ export function visualCatalog(rich) {
|
|
|
56
59
|
...biologyVisuals(rich),
|
|
57
60
|
...atomVisuals(rich),
|
|
58
61
|
...electronVisuals(rich),
|
|
62
|
+
...electrochemistryVisuals(rich),
|
|
63
|
+
...titrationVisuals(rich),
|
|
64
|
+
...rateVisuals(rich),
|
|
59
65
|
...lawVisuals(rich),
|
|
60
66
|
...particleVisuals(rich),
|
|
61
67
|
...periodicVisuals(rich),
|
|
@@ -60,7 +60,7 @@ export declare function bondingVisuals<E>(rich: RichSlot<E>): {
|
|
|
60
60
|
readonly view: Schema.Trimmed;
|
|
61
61
|
}>;
|
|
62
62
|
readonly molecules: Schema.$Array<Schema.Struct<{
|
|
63
|
-
readonly id: Schema.Literals<readonly ["hydrogen", "oxygen", "nitrogen", "chlorine", "hydrogen-chloride", "carbon-monoxide", "nitrogen-monoxide", "water", "hydrogen-peroxide", "carbon-dioxide", "sulfur-dioxide", "nitrogen-dioxide", "dinitrogen-monoxide", "ozone", "sulfur-trioxide", "ammonia", "methane", "ethene", "ethane", "ethyne", "propane", "ethanol", "methanol"]>;
|
|
63
|
+
readonly id: Schema.Literals<readonly ["hydrogen", "oxygen", "nitrogen", "chlorine", "hydrogen-chloride", "carbon-monoxide", "nitrogen-monoxide", "water", "hydrogen-peroxide", "carbon-dioxide", "sulfur-dioxide", "nitrogen-dioxide", "dinitrogen-monoxide", "ozone", "sulfur-trioxide", "ammonia", "methane", "ethene", "ethane", "ethyne", "propane", "ethanol", "methanol", "hexane", "methylpentane-2", "methylpentane-3", "dimethylbutane-22", "dimethylbutane-23", "hexene", "dibromohexane", "propene", "propanol", "chloroethene"]>;
|
|
64
64
|
readonly name: Schema.Trimmed;
|
|
65
65
|
}>>;
|
|
66
66
|
}>, "figure">;
|
|
@@ -112,6 +112,16 @@ function moleculeShapeLab(rich) {
|
|
|
112
112
|
"propane",
|
|
113
113
|
"ethanol",
|
|
114
114
|
"methanol",
|
|
115
|
+
"hexane",
|
|
116
|
+
"methylpentane-2",
|
|
117
|
+
"methylpentane-3",
|
|
118
|
+
"dimethylbutane-22",
|
|
119
|
+
"dimethylbutane-23",
|
|
120
|
+
"hexene",
|
|
121
|
+
"dibromohexane",
|
|
122
|
+
"propene",
|
|
123
|
+
"propanol",
|
|
124
|
+
"chloroethene",
|
|
115
125
|
]),
|
|
116
126
|
name: TextSchema,
|
|
117
127
|
})),
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/** The electrochemistry labs. */
|
|
4
|
+
export declare function electrochemistryVisuals<E>(rich: RichSlot<E>): {
|
|
5
|
+
ChemicalCellLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
6
|
+
readonly description: RichSlot<E>;
|
|
7
|
+
readonly title: RichSlot<E>;
|
|
8
|
+
readonly electrons: Schema.optionalKey<Schema.Finite>;
|
|
9
|
+
readonly labels: Schema.Struct<{
|
|
10
|
+
readonly atNegative: RichSlot<E>;
|
|
11
|
+
readonly atPositive: RichSlot<E>;
|
|
12
|
+
readonly electrons: RichSlot<E>;
|
|
13
|
+
readonly halfCells: RichSlot<E>;
|
|
14
|
+
readonly view: Schema.Trimmed;
|
|
15
|
+
readonly voltage: RichSlot<E>;
|
|
16
|
+
readonly voltmeter: Schema.Trimmed;
|
|
17
|
+
}>;
|
|
18
|
+
readonly metals: Schema.Tuple<readonly [Schema.Literals<readonly ["magnesium", "zinc", "iron", "copper", "silver"]>, Schema.Literals<readonly ["magnesium", "zinc", "iron", "copper", "silver"]>]>;
|
|
19
|
+
readonly showProducts: Schema.optionalKey<Schema.Boolean>;
|
|
20
|
+
}>, "figure">;
|
|
21
|
+
ElectrolysisLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
22
|
+
readonly description: RichSlot<E>;
|
|
23
|
+
readonly title: RichSlot<E>;
|
|
24
|
+
readonly cells: Schema.NonEmptyArray<Schema.Struct<{
|
|
25
|
+
readonly electrode: Schema.Literals<readonly ["carbon", "platinum", "copper", "silver"]>;
|
|
26
|
+
readonly electrolyte: Schema.Literals<readonly ["copper-sulfate", "silver-nitrate", "sodium-chloride-dilute", "sodium-chloride-concentrated", "sulfuric-acid"]>;
|
|
27
|
+
}>>;
|
|
28
|
+
readonly electrons: Schema.optionalKey<Schema.Finite>;
|
|
29
|
+
readonly labels: Schema.Struct<{
|
|
30
|
+
readonly anode: Schema.Trimmed;
|
|
31
|
+
readonly atAnode: RichSlot<E>;
|
|
32
|
+
readonly atCathode: RichSlot<E>;
|
|
33
|
+
readonly battery: Schema.Trimmed;
|
|
34
|
+
readonly cathode: Schema.Trimmed;
|
|
35
|
+
readonly cells: Schema.NonEmptyArray<RichSlot<E>>;
|
|
36
|
+
readonly electrons: RichSlot<E>;
|
|
37
|
+
readonly ph: RichSlot<E>;
|
|
38
|
+
readonly trends: Schema.$Record<Schema.Literals<readonly ["falls", "rises", "steady"]>, RichSlot<E>>;
|
|
39
|
+
readonly view: Schema.Trimmed;
|
|
40
|
+
}>;
|
|
41
|
+
readonly showProducts: Schema.optionalKey<Schema.Boolean>;
|
|
42
|
+
}>, "figure">;
|
|
43
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
|
|
3
|
+
import { answerAt, figure } from "#contracts/visual/entry";
|
|
4
|
+
/** The aqueous electrolytes an electrolysis cell can hold. */
|
|
5
|
+
const ELECTROLYTES = [
|
|
6
|
+
"copper-sulfate",
|
|
7
|
+
"silver-nitrate",
|
|
8
|
+
"sodium-chloride-dilute",
|
|
9
|
+
"sodium-chloride-concentrated",
|
|
10
|
+
"sulfuric-acid",
|
|
11
|
+
];
|
|
12
|
+
/** The electrode materials: two inert, two that dissolve as an anode in their own ions. */
|
|
13
|
+
const ELECTRODES = ["carbon", "platinum", "copper", "silver"];
|
|
14
|
+
/** The ways the pH of an electrolyte moves while the current flows. */
|
|
15
|
+
const TRENDS = ["falls", "rises", "steady"];
|
|
16
|
+
/**
|
|
17
|
+
* Props of `ElectrolysisLab`: one cell, or several in series on one battery,
|
|
18
|
+
* each a beaker of electrolyte with two electrodes. A cell caption names its
|
|
19
|
+
* electrolyte and electrodes, one per cell. With `showProducts`, the ions
|
|
20
|
+
* drift and discharge, the products form, and the footer gives each
|
|
21
|
+
* half-equation, the product's amount for `electrons` moles of electrons,
|
|
22
|
+
* and the pH trend, so both are answer state.
|
|
23
|
+
*/
|
|
24
|
+
function electrolysisLab(rich) {
|
|
25
|
+
return figure(Schema.Struct({
|
|
26
|
+
...cardFields(rich),
|
|
27
|
+
cells: Schema.NonEmptyArray(Schema.Struct({
|
|
28
|
+
electrode: Schema.Literals(ELECTRODES),
|
|
29
|
+
electrolyte: Schema.Literals(ELECTROLYTES),
|
|
30
|
+
})),
|
|
31
|
+
electrons: Schema.optionalKey(Schema.Finite),
|
|
32
|
+
labels: Schema.Struct({
|
|
33
|
+
anode: TextSchema,
|
|
34
|
+
atAnode: rich,
|
|
35
|
+
atCathode: rich,
|
|
36
|
+
battery: TextSchema,
|
|
37
|
+
cathode: TextSchema,
|
|
38
|
+
cells: Schema.NonEmptyArray(rich),
|
|
39
|
+
electrons: rich,
|
|
40
|
+
ph: rich,
|
|
41
|
+
trends: byIds(TRENDS, rich),
|
|
42
|
+
view: TextSchema,
|
|
43
|
+
}),
|
|
44
|
+
showProducts: Schema.optionalKey(Schema.Boolean),
|
|
45
|
+
}), answerAt(["electrons"], ["showProducts"]));
|
|
46
|
+
}
|
|
47
|
+
/** The metals a half-cell of a chemical cell can be made of. */
|
|
48
|
+
const METALS = ["magnesium", "zinc", "iron", "copper", "silver"];
|
|
49
|
+
/**
|
|
50
|
+
* Props of `ChemicalCellLab`: two metals, each in a solution of its own ions,
|
|
51
|
+
* joined by a salt bridge, with a voltmeter in the external circuit. With
|
|
52
|
+
* `showProducts`, the voltmeter reads the cell voltage and the footer gives
|
|
53
|
+
* each half-equation with the mass that dissolves or deposits for `electrons`
|
|
54
|
+
* moles of electrons, so both are answer state.
|
|
55
|
+
*/
|
|
56
|
+
function chemicalCellLab(rich) {
|
|
57
|
+
return figure(Schema.Struct({
|
|
58
|
+
...cardFields(rich),
|
|
59
|
+
electrons: Schema.optionalKey(Schema.Finite),
|
|
60
|
+
labels: Schema.Struct({
|
|
61
|
+
atNegative: rich,
|
|
62
|
+
atPositive: rich,
|
|
63
|
+
electrons: rich,
|
|
64
|
+
halfCells: rich,
|
|
65
|
+
view: TextSchema,
|
|
66
|
+
voltage: rich,
|
|
67
|
+
voltmeter: TextSchema,
|
|
68
|
+
}),
|
|
69
|
+
metals: Schema.Tuple([Schema.Literals(METALS), Schema.Literals(METALS)]),
|
|
70
|
+
showProducts: Schema.optionalKey(Schema.Boolean),
|
|
71
|
+
}), answerAt(["electrons"], ["showProducts"]));
|
|
72
|
+
}
|
|
73
|
+
/** The electrochemistry labs. */
|
|
74
|
+
export function electrochemistryVisuals(rich) {
|
|
75
|
+
return {
|
|
76
|
+
ChemicalCellLab: chemicalCellLab(rich),
|
|
77
|
+
ElectrolysisLab: electrolysisLab(rich),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/** The rate of reaction labs. */
|
|
4
|
+
export declare function rateVisuals<E>(rich: RichSlot<E>): {
|
|
5
|
+
GasRateLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
6
|
+
readonly description: RichSlot<E>;
|
|
7
|
+
readonly title: RichSlot<E>;
|
|
8
|
+
readonly labels: Schema.Struct<{
|
|
9
|
+
readonly final: RichSlot<E>;
|
|
10
|
+
readonly runs: Schema.NonEmptyArray<RichSlot<E>>;
|
|
11
|
+
readonly solids: Schema.$Record<Schema.Literals<readonly ["chips", "granules", "powder"]>, RichSlot<E>>;
|
|
12
|
+
readonly time: Schema.Trimmed;
|
|
13
|
+
readonly view: Schema.Trimmed;
|
|
14
|
+
}>;
|
|
15
|
+
readonly runs: Schema.NonEmptyArray<Schema.Struct<{
|
|
16
|
+
readonly amount: Schema.Finite;
|
|
17
|
+
readonly solid: Schema.Literals<readonly ["chips", "granules", "powder"]>;
|
|
18
|
+
}>>;
|
|
19
|
+
readonly showCurves: Schema.optionalKey<Schema.Boolean>;
|
|
20
|
+
}>, "figure">;
|
|
21
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
|
|
3
|
+
import { answerAt, figure } from "#contracts/visual/entry";
|
|
4
|
+
/** How finely a solid reactant is divided. */
|
|
5
|
+
const SOLIDS = ["chips", "granules", "powder"];
|
|
6
|
+
/**
|
|
7
|
+
* Props of `GasRateLab`: up to two runs of a reaction that gives off a gas,
|
|
8
|
+
* each a conical flask stoppered to a gas syringe, with the solid's form and
|
|
9
|
+
* the final amount of gas in mol. With `showCurves`, the plungers move with
|
|
10
|
+
* time and a board plots each run's amount against time, so it is answer
|
|
11
|
+
* state.
|
|
12
|
+
*/
|
|
13
|
+
function gasRateLab(rich) {
|
|
14
|
+
return figure(Schema.Struct({
|
|
15
|
+
...cardFields(rich),
|
|
16
|
+
labels: Schema.Struct({
|
|
17
|
+
final: rich,
|
|
18
|
+
runs: Schema.NonEmptyArray(rich),
|
|
19
|
+
solids: byIds(SOLIDS, rich),
|
|
20
|
+
time: TextSchema,
|
|
21
|
+
view: TextSchema,
|
|
22
|
+
}),
|
|
23
|
+
runs: Schema.NonEmptyArray(Schema.Struct({
|
|
24
|
+
amount: Schema.Finite,
|
|
25
|
+
solid: Schema.Literals(SOLIDS),
|
|
26
|
+
})),
|
|
27
|
+
showCurves: Schema.optionalKey(Schema.Boolean),
|
|
28
|
+
}), answerAt(["showCurves"]));
|
|
29
|
+
}
|
|
30
|
+
/** The rate of reaction labs. */
|
|
31
|
+
export function rateVisuals(rich) {
|
|
32
|
+
return {
|
|
33
|
+
GasRateLab: gasRateLab(rich),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { type RichSlot } from "#contracts/visual/card";
|
|
3
|
+
/** The volumetric analysis labs. */
|
|
4
|
+
export declare function titrationVisuals<E>(rich: RichSlot<E>): {
|
|
5
|
+
TitrationLab: import("#contracts/visual/entry").VisualEntry<Schema.Struct<{
|
|
6
|
+
readonly description: RichSlot<E>;
|
|
7
|
+
readonly title: RichSlot<E>;
|
|
8
|
+
readonly analyte: Schema.Struct<{
|
|
9
|
+
readonly concentration: Schema.Finite;
|
|
10
|
+
readonly solute: Schema.Literals<readonly ["hydrochloric-acid", "sodium-hydroxide", "sodium-carbonate", "iron-sulfate"]>;
|
|
11
|
+
readonly volume: Schema.Finite;
|
|
12
|
+
}>;
|
|
13
|
+
readonly indicator: Schema.Literals<readonly ["phenolphthalein", "methyl-orange", "none"]>;
|
|
14
|
+
readonly labels: Schema.Struct<{
|
|
15
|
+
readonly added: Schema.Trimmed;
|
|
16
|
+
readonly analyte: RichSlot<E>;
|
|
17
|
+
readonly endPoint: RichSlot<E>;
|
|
18
|
+
readonly hue: RichSlot<E>;
|
|
19
|
+
readonly hues: Schema.$Record<Schema.Literals<readonly ["colourless", "pink", "yellow", "orange", "red", "green", "pale-green"]>, RichSlot<E>>;
|
|
20
|
+
readonly ph: RichSlot<E>;
|
|
21
|
+
readonly reaction: RichSlot<E>;
|
|
22
|
+
readonly titrant: RichSlot<E>;
|
|
23
|
+
readonly view: Schema.Trimmed;
|
|
24
|
+
}>;
|
|
25
|
+
readonly showEndPoint: Schema.optionalKey<Schema.Boolean>;
|
|
26
|
+
readonly titrant: Schema.Struct<{
|
|
27
|
+
readonly concentration: Schema.Finite;
|
|
28
|
+
readonly solute: Schema.Literals<readonly ["hydrochloric-acid", "sulfuric-acid", "sodium-hydroxide", "potassium-dichromate"]>;
|
|
29
|
+
}>;
|
|
30
|
+
}>, "figure">;
|
|
31
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { byIds, cardFields, TextSchema, } from "#contracts/visual/card";
|
|
3
|
+
import { answerAt, figure } from "#contracts/visual/entry";
|
|
4
|
+
/** What the burette can deliver. */
|
|
5
|
+
const TITRANTS = [
|
|
6
|
+
"hydrochloric-acid",
|
|
7
|
+
"sulfuric-acid",
|
|
8
|
+
"sodium-hydroxide",
|
|
9
|
+
"potassium-dichromate",
|
|
10
|
+
];
|
|
11
|
+
/** What the conical flask can hold. */
|
|
12
|
+
const ANALYTES = [
|
|
13
|
+
"hydrochloric-acid",
|
|
14
|
+
"sodium-hydroxide",
|
|
15
|
+
"sodium-carbonate",
|
|
16
|
+
"iron-sulfate",
|
|
17
|
+
];
|
|
18
|
+
/** The indicator in the flask; acidified dichromate needs none. */
|
|
19
|
+
const INDICATORS = ["phenolphthalein", "methyl-orange", "none"];
|
|
20
|
+
/** The colours the flask can show. */
|
|
21
|
+
const HUES = [
|
|
22
|
+
"colourless",
|
|
23
|
+
"pink",
|
|
24
|
+
"yellow",
|
|
25
|
+
"orange",
|
|
26
|
+
"red",
|
|
27
|
+
"green",
|
|
28
|
+
"pale-green",
|
|
29
|
+
];
|
|
30
|
+
/**
|
|
31
|
+
* Props of `TitrationLab`: a burette of titrant over a conical flask of a
|
|
32
|
+
* measured solution, at bench scale. With `showEndPoint`, a slider runs
|
|
33
|
+
* titrant out, the flask changes colour at the end point, and the footer
|
|
34
|
+
* reads the volume, the colour, the pH of a strong acid and base, the
|
|
35
|
+
* equation, and the working that finds the end point, so it is answer state.
|
|
36
|
+
*/
|
|
37
|
+
function titrationLab(rich) {
|
|
38
|
+
return figure(Schema.Struct({
|
|
39
|
+
...cardFields(rich),
|
|
40
|
+
analyte: Schema.Struct({
|
|
41
|
+
concentration: Schema.Finite,
|
|
42
|
+
solute: Schema.Literals(ANALYTES),
|
|
43
|
+
volume: Schema.Finite,
|
|
44
|
+
}),
|
|
45
|
+
indicator: Schema.Literals(INDICATORS),
|
|
46
|
+
labels: Schema.Struct({
|
|
47
|
+
added: TextSchema,
|
|
48
|
+
analyte: rich,
|
|
49
|
+
endPoint: rich,
|
|
50
|
+
hue: rich,
|
|
51
|
+
hues: byIds(HUES, rich),
|
|
52
|
+
ph: rich,
|
|
53
|
+
reaction: rich,
|
|
54
|
+
titrant: rich,
|
|
55
|
+
view: TextSchema,
|
|
56
|
+
}),
|
|
57
|
+
showEndPoint: Schema.optionalKey(Schema.Boolean),
|
|
58
|
+
titrant: Schema.Struct({
|
|
59
|
+
concentration: Schema.Finite,
|
|
60
|
+
solute: Schema.Literals(TITRANTS),
|
|
61
|
+
}),
|
|
62
|
+
}), answerAt(["showEndPoint"]));
|
|
63
|
+
}
|
|
64
|
+
/** The volumetric analysis labs. */
|
|
65
|
+
export function titrationVisuals(rich) {
|
|
66
|
+
return {
|
|
67
|
+
TitrationLab: titrationLab(rich),
|
|
68
|
+
};
|
|
69
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nakafa/aksara-contracts",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.3",
|
|
4
4
|
"description": "Schemas and verification contracts for Nakafa content releases.",
|
|
5
5
|
"homepage": "https://github.com/nakafaai/aksara#readme",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"directory": "packages/contracts"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"effect": "4.1.
|
|
24
|
+
"effect": "4.1.4"
|
|
25
25
|
},
|
|
26
26
|
"exports": {
|
|
27
27
|
"./artifact/integrity": {
|