impr: add monkey caret style

also moves caret images to a folder
This commit is contained in:
Miodec 2025-11-19 11:08:36 +01:00
parent 5a9038cfef
commit 36574b4096
7 changed files with 24 additions and 5 deletions

View file

@ -38,7 +38,7 @@
&.carrot {
background-color: transparent;
background-image: url("/images/carrot.png");
background-image: url("/images/caret/carrot.png");
background-size: contain;
background-position: center;
background-repeat: no-repeat;
@ -47,7 +47,16 @@
&.banana {
background-color: transparent;
background-image: url("/images/banana.png");
background-image: url("/images/caret/banana.png");
background-size: contain;
background-position: center;
background-repeat: no-repeat;
width: 1em;
}
&.monkey {
background-color: transparent;
background-image: url("/images/caret/monkey.png");
background-size: contain;
background-position: center;
background-repeat: no-repeat;

View file

@ -457,7 +457,7 @@ export const commandlineConfigMetadata: CommandlineConfigMetadataObject = {
caretStyle: {
subgroup: {
options: "fromSchema",
isVisible: (value) => !["banana", "carrot"].includes(value),
isVisible: (value) => !["banana", "carrot", "monkey"].includes(value),
},
},
paceCaret: {
@ -489,7 +489,7 @@ export const commandlineConfigMetadata: CommandlineConfigMetadataObject = {
paceCaretStyle: {
subgroup: {
options: "fromSchema",
isVisible: (value) => !["banana", "carrot"].includes(value),
isVisible: (value) => !["banana", "carrot", "monkey"].includes(value),
},
},

View file

@ -55,7 +55,16 @@ export class Caret {
this.style = style;
this.element.style.width = "";
this.element.classList.remove(
...["off", "default", "underline", "outline", "block", "carrot", "banana"]
...[
"off",
"default",
"underline",
"outline",
"block",
"carrot",
"banana",
"monkey",
]
);
this.element.classList.add(style);
}

View file

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View file

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

View file

@ -44,6 +44,7 @@ export const CaretStyleSchema = z.enum([
"underline",
"carrot",
"banana",
"monkey",
]);
export type CaretStyle = z.infer<typeof CaretStyleSchema>;