Implement UI event dispatcher/listener (#4492)

* page change event
* expose event to plugin api
* Update UIPluginApi.md
* Add to example plugin
---------
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
Raghavan
2024-02-27 03:57:28 +05:30
committed by GitHub
parent 56896d7c7d
commit 6a9175c954
5 changed files with 40 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ import * as FontAwesomeSolid from "@fortawesome/free-solid-svg-icons";
import * as FontAwesomeRegular from "@fortawesome/free-regular-svg-icons";
import { useSpriteInfo } from "./hooks/sprite";
import { useToast } from "./hooks/Toast";
import Event from "./hooks/event";
import { before, instead, after, components, RegisterComponent } from "./patch";
// due to code splitting, some components may not have been loaded when a plugin
@@ -106,6 +107,7 @@ export const PluginApi = {
// and the result of the original function
after,
},
Event: Event,
};
export default PluginApi;