Skip to content

Commit 36574b4

Browse files
committed
impr: add monkey caret style
also moves caret images to a folder
1 parent 5a9038c commit 36574b4

File tree

7 files changed

+24
-5
lines changed

7 files changed

+24
-5
lines changed

frontend/src/styles/caret.scss

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
&.carrot {
4040
background-color: transparent;
41-
background-image: url("/images/carrot.png");
41+
background-image: url("/images/caret/carrot.png");
4242
background-size: contain;
4343
background-position: center;
4444
background-repeat: no-repeat;
@@ -47,7 +47,16 @@
4747

4848
&.banana {
4949
background-color: transparent;
50-
background-image: url("/images/banana.png");
50+
background-image: url("/images/caret/banana.png");
51+
background-size: contain;
52+
background-position: center;
53+
background-repeat: no-repeat;
54+
width: 1em;
55+
}
56+
57+
&.monkey {
58+
background-color: transparent;
59+
background-image: url("/images/caret/monkey.png");
5160
background-size: contain;
5261
background-position: center;
5362
background-repeat: no-repeat;

frontend/src/ts/commandline/commandline-metadata.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ export const commandlineConfigMetadata: CommandlineConfigMetadataObject = {
457457
caretStyle: {
458458
subgroup: {
459459
options: "fromSchema",
460-
isVisible: (value) => !["banana", "carrot"].includes(value),
460+
isVisible: (value) => !["banana", "carrot", "monkey"].includes(value),
461461
},
462462
},
463463
paceCaret: {
@@ -489,7 +489,7 @@ export const commandlineConfigMetadata: CommandlineConfigMetadataObject = {
489489
paceCaretStyle: {
490490
subgroup: {
491491
options: "fromSchema",
492-
isVisible: (value) => !["banana", "carrot"].includes(value),
492+
isVisible: (value) => !["banana", "carrot", "monkey"].includes(value),
493493
},
494494
},
495495

frontend/src/ts/utils/caret.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,16 @@ export class Caret {
5555
this.style = style;
5656
this.element.style.width = "";
5757
this.element.classList.remove(
58-
...["off", "default", "underline", "outline", "block", "carrot", "banana"]
58+
...[
59+
"off",
60+
"default",
61+
"underline",
62+
"outline",
63+
"block",
64+
"carrot",
65+
"banana",
66+
"monkey",
67+
]
5968
);
6069
this.element.classList.add(style);
6170
}
7.83 KB
Loading

packages/schemas/src/configs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export const CaretStyleSchema = z.enum([
4444
"underline",
4545
"carrot",
4646
"banana",
47+
"monkey",
4748
]);
4849
export type CaretStyle = z.infer<typeof CaretStyleSchema>;
4950

0 commit comments

Comments
 (0)