Add useLightbox and useGalleryLightbox in plugin api (#5936)

This commit is contained in:
QxxxGit
2025-06-20 02:03:22 -04:00
committed by GitHub
parent c5fe6748c0
commit c09913a614
3 changed files with 15 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ import Event from "./hooks/event";
import { before, instead, after, components, RegisterComponent } from "./patch";
import { useSettings } from "./components/Settings/context";
import { useInteractive } from "./hooks/Interactive/context";
import { useLightbox, useGalleryLightbox } from "./hooks/Lightbox/hooks";
// due to code splitting, some components may not have been loaded when a plugin
// page is loaded. This function will load all components passed to it.
@@ -161,6 +162,8 @@ export const PluginApi = {
useToast,
useSettings,
useInteractive,
useLightbox,
useGalleryLightbox,
},
patch: {
// intercept the arguments of supported functions