diff --git a/apps/client/src/widgets/dialogs/add_link.tsx b/apps/client/src/widgets/dialogs/add_link.tsx index 2cca69347..f017914e9 100644 --- a/apps/client/src/widgets/dialogs/add_link.tsx +++ b/apps/client/src/widgets/dialogs/add_link.tsx @@ -4,9 +4,8 @@ import ReactBasicWidget from "../react/ReactBasicWidget"; import Button from "../react/Button"; import FormRadioGroup from "../react/FormRadioGroup"; import NoteAutocomplete from "../react/NoteAutocomplete"; -import { useRef, useState } from "preact/hooks"; +import { useRef, useState, useEffect } from "preact/hooks"; import tree from "../../services/tree"; -import { useEffect } from "react"; import note_autocomplete, { Suggestion } from "../../services/note_autocomplete"; import { default as TextTypeWidget } from "../type_widgets/editable_text.js"; import { logError } from "../../services/ws"; diff --git a/apps/client/src/widgets/dialogs/clone_to.tsx b/apps/client/src/widgets/dialogs/clone_to.tsx index 791da3f1b..f8929f00d 100644 --- a/apps/client/src/widgets/dialogs/clone_to.tsx +++ b/apps/client/src/widgets/dialogs/clone_to.tsx @@ -1,4 +1,4 @@ -import { useRef, useState } from "preact/compat"; +import { useRef, useState } from "preact/hooks"; import appContext from "../../components/app_context"; import { t } from "../../services/i18n"; import Modal from "../react/Modal"; diff --git a/apps/client/src/widgets/dialogs/confirm.tsx b/apps/client/src/widgets/dialogs/confirm.tsx index db344ab00..28c9fcc4a 100644 --- a/apps/client/src/widgets/dialogs/confirm.tsx +++ b/apps/client/src/widgets/dialogs/confirm.tsx @@ -2,7 +2,7 @@ import ReactBasicWidget from "../react/ReactBasicWidget"; import Modal from "../react/Modal"; import Button from "../react/Button"; import { t } from "../../services/i18n"; -import { useState } from "react"; +import { useState } from "preact/hooks"; import FormCheckbox from "../react/FormCheckbox"; import useTriliumEvent from "../react/hooks"; diff --git a/apps/client/src/widgets/dialogs/delete_notes.tsx b/apps/client/src/widgets/dialogs/delete_notes.tsx index a4c62a164..9af85d518 100644 --- a/apps/client/src/widgets/dialogs/delete_notes.tsx +++ b/apps/client/src/widgets/dialogs/delete_notes.tsx @@ -3,7 +3,7 @@ import { t } from "../../services/i18n.js"; import FormCheckbox from "../react/FormCheckbox.js"; import Modal from "../react/Modal.js"; import ReactBasicWidget from "../react/ReactBasicWidget.js"; -import { useEffect } from "react"; +import { useEffect } from "preact/hooks"; import type { DeleteNotesPreview } from "@triliumnext/commons"; import server from "../../services/server.js"; import froca from "../../services/froca.js"; diff --git a/apps/client/src/widgets/dialogs/include_note.tsx b/apps/client/src/widgets/dialogs/include_note.tsx index 35e7f210b..70f99b7e5 100644 --- a/apps/client/src/widgets/dialogs/include_note.tsx +++ b/apps/client/src/widgets/dialogs/include_note.tsx @@ -1,4 +1,4 @@ -import { useRef, useState } from "preact/compat"; +import { useRef, useState } from "preact/hooks"; import { t } from "../../services/i18n"; import FormGroup from "../react/FormGroup"; import FormRadioGroup from "../react/FormRadioGroup"; diff --git a/apps/client/src/widgets/dialogs/incorrect_cpu_arch.tsx b/apps/client/src/widgets/dialogs/incorrect_cpu_arch.tsx index c547bb8fc..e0165b7d0 100644 --- a/apps/client/src/widgets/dialogs/incorrect_cpu_arch.tsx +++ b/apps/client/src/widgets/dialogs/incorrect_cpu_arch.tsx @@ -1,4 +1,4 @@ -import { useRef } from "react"; +import { useRef } from "preact/hooks"; import { t } from "../../services/i18n.js"; import utils from "../../services/utils.js"; import Button from "../react/Button.js"; diff --git a/apps/client/src/widgets/dialogs/markdown_import.tsx b/apps/client/src/widgets/dialogs/markdown_import.tsx index ed0084529..4f91278d9 100644 --- a/apps/client/src/widgets/dialogs/markdown_import.tsx +++ b/apps/client/src/widgets/dialogs/markdown_import.tsx @@ -1,4 +1,4 @@ -import { useCallback, useRef, useState } from "preact/compat"; +import { useCallback, useRef, useState } from "preact/hooks"; import appContext from "../../components/app_context"; import { t } from "../../services/i18n"; import server from "../../services/server"; diff --git a/apps/client/src/widgets/dialogs/move_to.tsx b/apps/client/src/widgets/dialogs/move_to.tsx index 577d7927e..b4e53fc09 100644 --- a/apps/client/src/widgets/dialogs/move_to.tsx +++ b/apps/client/src/widgets/dialogs/move_to.tsx @@ -5,7 +5,7 @@ import NoteList from "../react/NoteList"; import FormGroup from "../react/FormGroup"; import NoteAutocomplete from "../react/NoteAutocomplete"; import Button from "../react/Button"; -import { useRef, useState } from "preact/compat"; +import { useRef, useState } from "preact/hooks"; import { Suggestion, triggerRecentNotes } from "../../services/note_autocomplete"; import tree from "../../services/tree"; import froca from "../../services/froca"; diff --git a/apps/client/src/widgets/dialogs/revisions.tsx b/apps/client/src/widgets/dialogs/revisions.tsx index 0da578733..8513dd615 100644 --- a/apps/client/src/widgets/dialogs/revisions.tsx +++ b/apps/client/src/widgets/dialogs/revisions.tsx @@ -14,7 +14,7 @@ import utils from "../../services/utils"; import { Dispatch, StateUpdater, useEffect, useRef, useState } from "preact/hooks"; import protected_session_holder from "../../services/protected_session_holder"; import { renderMathInElement } from "../../services/math"; -import { CSSProperties } from "preact/compat"; +import type { CSSProperties } from "preact/compat"; import open from "../../services/open"; import ActionButton from "../react/ActionButton"; import options from "../../services/options"; diff --git a/apps/client/src/widgets/dialogs/upload_attachments.tsx b/apps/client/src/widgets/dialogs/upload_attachments.tsx index 00bb1cdd9..3db6fbb71 100644 --- a/apps/client/src/widgets/dialogs/upload_attachments.tsx +++ b/apps/client/src/widgets/dialogs/upload_attachments.tsx @@ -1,4 +1,4 @@ -import { useEffect, useState } from "preact/compat"; +import { useEffect, useState } from "preact/hooks"; import { t } from "../../services/i18n"; import Button from "../react/Button"; import FormCheckbox from "../react/FormCheckbox"; diff --git a/apps/client/src/widgets/react/Button.tsx b/apps/client/src/widgets/react/Button.tsx index 836303ff6..4362b1680 100644 --- a/apps/client/src/widgets/react/Button.tsx +++ b/apps/client/src/widgets/react/Button.tsx @@ -1,5 +1,5 @@ -import { RefObject } from "preact"; -import { CSSProperties } from "preact/compat"; +import type { RefObject } from "preact"; +import type { CSSProperties } from "preact/compat"; import { useRef } from "preact/hooks"; interface ButtonProps { diff --git a/apps/client/src/widgets/react/FormCheckbox.tsx b/apps/client/src/widgets/react/FormCheckbox.tsx index 690145b58..65c90c53f 100644 --- a/apps/client/src/widgets/react/FormCheckbox.tsx +++ b/apps/client/src/widgets/react/FormCheckbox.tsx @@ -1,5 +1,5 @@ import { Tooltip } from "bootstrap"; -import { useEffect, useRef } from "preact/compat"; +import { useEffect, useRef } from "preact/hooks"; import { escapeQuotes } from "../../services/utils"; import { ComponentChildren } from "preact"; diff --git a/apps/client/src/widgets/react/FormList.tsx b/apps/client/src/widgets/react/FormList.tsx index a5c677d74..96ab65ed2 100644 --- a/apps/client/src/widgets/react/FormList.tsx +++ b/apps/client/src/widgets/react/FormList.tsx @@ -1,6 +1,6 @@ import { ComponentChildren } from "preact"; import Icon from "./Icon"; -import { CSSProperties } from "preact/compat"; +import type { CSSProperties } from "preact/compat"; interface FormListOpts { children: ComponentChildren; diff --git a/apps/client/src/widgets/react/FormTextBox.tsx b/apps/client/src/widgets/react/FormTextBox.tsx index 476825d96..5477a9c4d 100644 --- a/apps/client/src/widgets/react/FormTextBox.tsx +++ b/apps/client/src/widgets/react/FormTextBox.tsx @@ -1,4 +1,4 @@ -import { InputHTMLAttributes, RefObject } from "preact/compat"; +import type { InputHTMLAttributes, RefObject } from "preact/compat"; interface FormTextBoxProps extends Pick, "placeholder" | "autoComplete" | "className" | "type" | "name" | "pattern" | "title" | "style"> { id?: string; diff --git a/apps/client/src/widgets/react/NoteAutocomplete.tsx b/apps/client/src/widgets/react/NoteAutocomplete.tsx index 49656bf71..fb5274318 100644 --- a/apps/client/src/widgets/react/NoteAutocomplete.tsx +++ b/apps/client/src/widgets/react/NoteAutocomplete.tsx @@ -1,9 +1,9 @@ import { useRef } from "preact/hooks"; import { t } from "../../services/i18n"; -import { useEffect } from "react"; +import { useEffect } from "preact/hooks"; import note_autocomplete, { Options, type Suggestion } from "../../services/note_autocomplete"; import type { RefObject } from "preact"; -import { CSSProperties } from "preact/compat"; +import type { CSSProperties } from "preact/compat"; interface NoteAutocompleteProps { inputRef?: RefObject; diff --git a/apps/client/src/widgets/react/NoteList.tsx b/apps/client/src/widgets/react/NoteList.tsx index db84995c0..59a9f858b 100644 --- a/apps/client/src/widgets/react/NoteList.tsx +++ b/apps/client/src/widgets/react/NoteList.tsx @@ -1,7 +1,7 @@ import { useEffect, useState } from "preact/hooks"; import type FNote from "../../entities/fnote"; import froca from "../../services/froca"; -import { CSSProperties } from "preact/compat"; +import type { CSSProperties } from "preact/compat"; interface NoteListProps { noteIds?: string[]; diff --git a/apps/client/src/widgets/react/RawHtml.tsx b/apps/client/src/widgets/react/RawHtml.tsx index ec208fac1..fc4632881 100644 --- a/apps/client/src/widgets/react/RawHtml.tsx +++ b/apps/client/src/widgets/react/RawHtml.tsx @@ -1,4 +1,4 @@ -import { CSSProperties } from "preact/compat"; +import type { CSSProperties } from "preact/compat"; type HTMLElementLike = string | HTMLElement | JQuery;