From 2c25786fa238e49b21c00d5d3cec241f05d717b4 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 20 Dec 2025 23:26:10 +0200 Subject: [PATCH] feat(client/bundle): expose Trilium hooks --- apps/client/src/services/frontend_script_api_preact.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/client/src/services/frontend_script_api_preact.ts b/apps/client/src/services/frontend_script_api_preact.ts index 3709abab8..4086fc88c 100644 --- a/apps/client/src/services/frontend_script_api_preact.ts +++ b/apps/client/src/services/frontend_script_api_preact.ts @@ -1,6 +1,7 @@ import { Fragment, h, VNode } from "preact"; import * as hooks from "preact/hooks"; +import * as triliumHooks from "../widgets/react/hooks"; import RightPanelWidget from "../widgets/sidebar/RightPanelWidget"; export interface WidgetDefinition { @@ -31,5 +32,6 @@ export const preactAPI = Object.freeze({ RightPanelWidget, - ...hooks + ...hooks, + ...triliumHooks });