Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
build(client): adapt to preact 11.0.2 attribute type names
Elian Doran311be172f891
diff --git a/apps/client/src/widgets/react/FormTextBox.tsx b/apps/client/src/widgets/react/FormTextBox.tsxindex 5d03cf92a4..ffb2e6fb57 100644--- a/apps/client/src/widgets/react/FormTextBox.tsx+++ b/apps/client/src/widgets/react/FormTextBox.tsx@@ -1,7 +1,7 @@-import type { AccessibleInputHTMLAttributes, InputHTMLAttributes, RefObject } from "preact";+import type { InputHTMLAttributes, LooseInputHTMLAttributes, RefObject } from "preact";import { useEffect, useRef } from "preact/hooks";-export interface FormTextBoxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "onBlur" | "value"> {+export interface FormTextBoxProps extends Omit<LooseInputHTMLAttributes<HTMLInputElement>, "onChange" | "onBlur" | "value"> {id?: string;currentValue?: string;onChange?(newValue: string, validity: ValidityState): void;@@ -87,7 +87,7 @@ export default function FormTextBox({ inputRef, className, type, currentValue, o{...({...rest,type: type ?? "text"- } as AccessibleInputHTMLAttributes<HTMLInputElement>)}+ } as InputHTMLAttributes<HTMLInputElement>)}/>);}diff --git a/apps/client/src/widgets/type_widgets/llm_chat/retry_image.tsx b/apps/client/src/widgets/type_widgets/llm_chat/retry_image.tsxindex de293b86ac..2f56ff1f58 100644--- a/apps/client/src/widgets/type_widgets/llm_chat/retry_image.tsx+++ b/apps/client/src/widgets/type_widgets/llm_chat/retry_image.tsx@@ -1,4 +1,4 @@-import type { AccessibleImgHTMLAttributes, ImgHTMLAttributes } from "preact";+import type { ImgHTMLAttributes, LooseImgHTMLAttributes } from "preact";import { useCallback, useEffect, useRef, useState } from "preact/hooks";/**@@ -19,7 +19,7 @@ import { useCallback, useEffect, useRef, useState } from "preact/hooks";* from the VDOM `src` (the original URL) and reverts it, aborting the retry.* Owning the URL in component state keeps the VDOM and DOM in agreement.*/-type SafeImageProps = Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "onError"> & {+type SafeImageProps = Omit<LooseImgHTMLAttributes<HTMLImageElement>, "src" | "onError"> & {src: string;};@@ -52,7 +52,7 @@ export function SafeImage({ src, ...rest }: SafeImageProps) {return (<img- {...(rest as AccessibleImgHTMLAttributes<HTMLImageElement>)}+ {...(rest as ImgHTMLAttributes<HTMLImageElement>)}src={currentSrc}onError={handleError}/>