Skip to content

Commit

Permalink
Added KLE types for text size, profile, switch info
Browse files Browse the repository at this point in the history
  • Loading branch information
ValdisThomann committed Jan 29, 2023
1 parent a2a6e1e commit f026e06
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@the-via/reader",
"version": "1.5.3",
"version": "1.5.4",
"repository": {
"type": "git",
"url": "git+ssh://[email protected]/the-via/reader.git"
Expand Down
21 changes: 20 additions & 1 deletion src/types.common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,22 @@ export type Decal = {
d: boolean;
};

export type TextSize = {
f: number; // default text size
f2: number;
fa: number[];
};

export type Profile = {
p: string;
};

export type SwitchInfo = {
sm: string; // switch mount
sb: string; // switch brand
st: string; // switch type
};

export type KeyColor = string;
export type LegendColor = string;

Expand All @@ -62,7 +78,10 @@ export type KLEElem =
Ghosted &
Stepped &
Homing &
Decal
Decal &
TextSize &
Profile &
SwitchInfo
>
| string;
export type ColorCount = {[key: string]: number};
Expand Down
7 changes: 7 additions & 0 deletions test/data/v2_invalid_label_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
"g": true,
"l": true,
"n": true,
"f": 3,
"f2": 4,
"fa": [1, 2],
"p": "profile",
"sm": "5 pin",
"sb": "gateron",
"st": "linear",
"a": 1
},
"0,0",
Expand Down
7 changes: 7 additions & 0 deletions test/data/v2_valid_definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
"g": true,
"l": true,
"n": true,
"f": 3,
"f2": 4,
"fa": [1, 2],
"p": "profile",
"sm": "5 pin",
"sb": "gateron",
"st": "linear",
"a": 0
},
"0,0",
Expand Down
7 changes: 7 additions & 0 deletions test/data/v3_invalid_label_map.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@
"g": true,
"l": true,
"n": true,
"f": 3,
"f2": 4,
"fa": [1, 2],
"p": "profile",
"sm": "5 pin",
"sb": "gateron",
"st": "linear",
"a": 1
},
"0,0",
Expand Down
7 changes: 7 additions & 0 deletions test/data/v3_valid_definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,13 @@
"g": true,
"l": true,
"n": true,
"f": 3,
"f2": 4,
"fa": [1, 2],
"p": "profile",
"sm": "5 pin",
"sb": "gateron",
"st": "linear",
"a": 0
},
"0,0",
Expand Down

0 comments on commit f026e06

Please sign in to comment.