(feat): improved mobile notifications

(feat): add lint rules
(feat): improve markdown inline code box
This commit is contained in:
Alois 2026-08-05 21:41:55 +02:00
commit 4a841de073
Signed by: alois
SSH key fingerprint: SHA256:GBzT2DXvAuGV9XIV5W3WrzVpjU54FThmxHXdbz95J24
35 changed files with 777 additions and 287 deletions

View file

@ -76,10 +76,6 @@ export type InputProps = {
onControllerChange?: (controller: InputController | null) => void;
};
type InputStyle = CSSProperties & {
"--tm-md-content-padding"?: string;
};
function toCssLength(value: CSSProperties["padding"]): string | undefined {
if (value === undefined) {
return undefined;
@ -99,11 +95,6 @@ function toCssPadding(
return `${toCssLength(vertical) ?? defaultVertical} ${toCssLength(horizontal) ?? defaultHorizontal}`;
}
type TokenRange = {
from: number;
to: number;
};
const hiddenTokenDecoration = Decoration.mark({ class: "tm-md-hidden-token" });
const strongDecoration = Decoration.mark({ class: "tm-md-strong" });
const emDecoration = Decoration.mark({ class: "tm-md-em" });
@ -443,7 +434,9 @@ export default function Input(props: InputProps) {
props.paddingX,
Boolean(props.styled),
),
} as InputStyle
} as CSSProperties & {
"--tm-md-content-padding"?: string;
}
}
/>
);
@ -834,7 +827,10 @@ function buildDecorations(view: EditorView): DecorationSet {
function addHiddenToken(
builder: Range<Decoration>[],
selections: ReadonlyArray<{ from: number; to: number }>,
token: TokenRange,
token: {
from: number;
to: number;
},
): void {
if (token.from >= token.to) return;