Move domain models into domain package with schemas and validate with zod + elysia. Some maintenence as well
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
<script lang="ts">
|
||||
import {
|
||||
LevelCalculator,
|
||||
type LevelCalculatorOutput,
|
||||
type Standards,
|
||||
} from "@blade-and-brawn/calculator";
|
||||
import {
|
||||
Activity,
|
||||
Attribute,
|
||||
Gender,
|
||||
lbToKg,
|
||||
range,
|
||||
type LevelCalculatorOutput,
|
||||
type Standards,
|
||||
type ActivityPerformance,
|
||||
type Player,
|
||||
} from "@blade-and-brawn/calculator";
|
||||
} from "@blade-and-brawn/domain";
|
||||
|
||||
interface CalcData {
|
||||
levels?: LevelCalculatorOutput;
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
<script lang="ts">
|
||||
import {
|
||||
Standards,
|
||||
type Standard,
|
||||
type StandardsConfig,
|
||||
} from "@blade-and-brawn/calculator";
|
||||
import {
|
||||
Activity,
|
||||
cmToIn,
|
||||
kgToLb,
|
||||
range,
|
||||
type Metrics,
|
||||
type Standard,
|
||||
type StandardsConfig,
|
||||
} from "@blade-and-brawn/calculator";
|
||||
} from "@blade-and-brawn/domain";
|
||||
|
||||
interface Props {
|
||||
allStandards: Standards;
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
<script lang="ts">
|
||||
import {
|
||||
Activity,
|
||||
DEFAULT_STANDARDS_DATA,
|
||||
Gender,
|
||||
lbToKg,
|
||||
Standards,
|
||||
type Metrics,
|
||||
type StandardsConfig,
|
||||
} from "@blade-and-brawn/calculator";
|
||||
import {
|
||||
Activity,
|
||||
Gender,
|
||||
lbToKg,
|
||||
type Metrics,
|
||||
} from "@blade-and-brawn/domain";
|
||||
import StandardsTable from "$lib/components/StandardsTable.svelte";
|
||||
import PlayersTable from "$lib/components/PlayersTable.svelte";
|
||||
|
||||
@@ -15,6 +17,7 @@
|
||||
|
||||
const defaultStandards = new Standards(DEFAULT_STANDARDS_DATA);
|
||||
|
||||
// TODO: try to clean this up
|
||||
let input = $state({
|
||||
activity: Activity.BenchPress,
|
||||
metrics: {
|
||||
|
||||
Reference in New Issue
Block a user