/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type ValueTypeOf } from "@elaraai/east"; import { PaletteCardType, PalettePageType, StudioComponentType } from "@elaraai/e3-ui/internal"; import { type BuilderFrameDock } from "@elaraai/east-ui-components"; /** A listed component. */ type Component = ValueTypeOf; /** A component's card, as East computed it. */ type PaletteCard = ValueTypeOf; /** A page of the project, as East computed it. */ type PalettePage = ValueTypeOf; /** What {@link useStudioPalette} lists, and what its clicks do. */ export interface StudioPaletteProps { /** The components the palette offers — the listed, less the deprecated — in the surface's order. */ components: readonly Component[]; /** Each one's card: its meta line, and whether it is placed. */ cards: ReadonlyMap; /** The project's pages, in key order. */ pages: readonly PalettePage[]; /** The open page's name in the project. */ open: string; /** The ids of the palette's libraries — the components library's, which the canvas takes cards from, and the pages'. */ ids: { components: string; pages: string; }; /** Selects the component's first placement on the page. */ onSelect: (component: string) => void; /** Opens a page of the project. */ onOpen: (page: string) => void; /** Where the palette's libraries keep their state. */ storageKey: string; /** In a phone's frame: what a card's tap starts, and the components on the page. */ phone?: { onPlace: (component: Component) => void; onPage: ReadonlySet; } | undefined; } /** * The builder's palette, as the pane the canvas's frame draws — see the * module docs. * * @param props - The components and pages it lists, and what its clicks do * @returns The palette's pane: the Components and Pages tabs, 264px wide */ export declare function useStudioPalette({ components, cards, pages, open, ids, onSelect, onOpen, storageKey, phone, }: StudioPaletteProps): BuilderFrameDock; export {}; //# sourceMappingURL=palette.d.ts.map