Shoji API Reference
    Preparing search index...

    Interface ShojiPlugin

    DESIGN.md §3 — the plugin contract. Plugins init at new Shoji() construction time — the lightbox DOM (hidden, display:none until the first open()) is built eagerly specifically so init() can rely on ctx.ui.* synchronously, with zero queueing, from the very start. This also means a plugin can act before any open() call — the layout plugin (§5) depends on that: it renders ctx.gallery.element (the inline thumbnail container) immediately, since that's what the viewer clicks to open in the first place, not something that only matters once already open.

    interface ShojiPlugin {
        name: string;
        version?: string;
        requires?: string[];
        defaults?: Record<string, unknown>;
        init(ctx: PluginContext): void | (() => void);
    }
    Index
    name: string
    version?: string
    requires?: string[]
    defaults?: Record<string, unknown>