🚧 WIP:Work on types and exports
This commit is contained in:
parent
145272c546
commit
c8d502c698
16 changed files with 312 additions and 95 deletions
25
lib/types.ts
25
lib/types.ts
|
@ -1,12 +1,15 @@
|
|||
export type PatternOptionType = "measure" | "percentage" | "angle" | "choice" | "constant";
|
||||
|
||||
export interface PatternOption {
|
||||
type?: "measure" | "percentage" | "angle" | "choice";
|
||||
id: string;
|
||||
val: number;
|
||||
type?: string;
|
||||
onlyIf?: {
|
||||
option: string;
|
||||
oneOf: number[];
|
||||
}
|
||||
min?: number;
|
||||
max?: number;
|
||||
std: number;
|
||||
options?: {
|
||||
[index: number]: string;
|
||||
}
|
||||
|
@ -24,3 +27,21 @@ export type Pattern = {
|
|||
measurements: string[];
|
||||
config: PatternConfig;
|
||||
}
|
||||
|
||||
export type DraftMode = "sample" | "compare" | "draft";
|
||||
export type CompareGroup = "men" | "women";
|
||||
export type Units = "metric" | "imperial";
|
||||
|
||||
export interface DraftConfig {
|
||||
mode: DraftMode;
|
||||
units?: Units;
|
||||
options: PatternOption[];
|
||||
measurements?: {
|
||||
[index:string]: number;
|
||||
};
|
||||
sa?: number;
|
||||
scope?: string[];
|
||||
theme?: string;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue