diff --git a/apps/client/src/services/frontend_script_api_preact.ts b/apps/client/src/services/frontend_script_api_preact.ts index 081094046..dd57ed022 100644 --- a/apps/client/src/services/frontend_script_api_preact.ts +++ b/apps/client/src/services/frontend_script_api_preact.ts @@ -1,7 +1,31 @@ import { Fragment, h, VNode } from "preact"; import * as hooks from "preact/hooks"; +import ActionButton from "../widgets/react/ActionButton"; +import Admonition from "../widgets/react/Admonition"; +import Button from "../widgets/react/Button"; +import CKEditor from "../widgets/react/CKEditor"; +import Collapsible from "../widgets/react/Collapsible"; +import Dropdown from "../widgets/react/Dropdown"; +import FormCheckbox from "../widgets/react/FormCheckbox"; +import FormDropdownList from "../widgets/react/FormDropdownList"; +import * as formFileUpload from "../widgets/react/FormFileUpload"; +import FormGroup from "../widgets/react/FormGroup"; +import * as formListItems from "../widgets/react/FormList"; +import FormRadioGroup from "../widgets/react/FormRadioGroup"; +import FormText from "../widgets/react/FormText"; +import FormTextArea from "../widgets/react/FormTextArea"; +import FormTextBox from "../widgets/react/FormTextBox"; +import FormToggle from "../widgets/react/FormToggle"; import * as triliumHooks from "../widgets/react/hooks"; +import Icon from "../widgets/react/Icon"; +import LinkButton from "../widgets/react/LinkButton"; +import LoadingSpinner from "../widgets/react/LoadingSpinner"; +import Modal from "../widgets/react/Modal"; +import NoteAutocomplete from "../widgets/react/NoteAutocomplete"; +import NoteLink from "../widgets/react/NoteLink"; +import RawHtml from "../widgets/react/RawHtml"; +import Slider from "../widgets/react/Slider"; import RightPanelWidget from "../widgets/sidebar/RightPanelWidget"; export interface WidgetDefinition { @@ -43,6 +67,33 @@ export const preactAPI = Object.freeze({ }; }, + // Basic widgets + ActionButton, + Admonition, + Button, + CKEditor, + Collapsible, + Dropdown, + FormCheckbox, + FormDropdownList, + ...formFileUpload, + FormGroup, + ...formListItems, + FormRadioGroup, + FormText, + FormTextArea, + FormTextBox, + FormToggle, + Icon, + LinkButton, + LoadingSpinner, + Modal, + NoteAutocomplete, + NoteLink, + RawHtml, + Slider, + + // Specialized widgets RightPanelWidget, ...hooks,