/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ /** * `StudioPublishPreview` — the builder's publish preview (#998), in the * canvas's place while it shows. * * - **The bar**, headerless, on the inverse ground: "● Preview"; Desktop · * Tablet · Mobile, which draw the page 1440, 1024 or 390 px wide at most; * the Env pill; and Exit, back to the canvas. * - **The page**: its project, its title, and the page as it will publish — * which the builder draws — together at most the device's width. * - **The aside**: where the page stands, the version it replaces and the one * it becomes, the change list, the Audience and Rollout rows, and what * refused a write. * - **The footer**: Save as draft asks the canvas for an Apply; Publish asks * for one when the canvas has drafts, waits for the canvas's answer, then * commits the publish. * * The canvas answers an Apply under the id asked, so the answer to another * ask is never taken for this one's. Every word is the Studio's message * table's; numbers print in the locale. The preview draws no border around * itself. * * Its layout and its bar are the `studioPublish` recipe's, and its buttons the * `button` recipe's. Every mark is Font Awesome's, never a text glyph (#1263): * a change's sign its plus, minus or plus-minus. * * In a phone's frame (`Studio Mobile Spec.md` ST30–ST33) it takes the builder's * place: a head with ← and the versions; Page · Changes, which Preview and * Publish open; Mobile · Tablet · Desktop over the page, the page itself on * Mobile and on the others the layout at that device's proportions, each tile by * name, a name that would not fit whole left out; and the foot sticky under them. * * @packageDocumentation */ import { type ReactNode } from "react"; import { type ValueTypeOf } from "@elaraai/east"; import { StudioPublishPayloadType } from "@elaraai/e3-ui/internal"; /** The publish preview, as the builder draws it. */ type StudioPublishValue = ValueTypeOf; /** Props of {@link StudioPublishPreview}. */ export interface StudioPublishPreviewProps { /** Where the page stands, what changed, the words the aside shows, and the actions. */ value: StudioPublishValue; /** The page as it will publish. */ page: ReactNode; /** In a phone's frame: its open tab, its tiles for the wireframes, and its width. */ phone?: StudioPublishPhone | undefined; } /** What a phone's preview needs beyond the wide one's. */ export interface StudioPublishPhone { /** The open tab. */ readonly tab: "page" | "changes"; /** Opens a tab. */ readonly onTab: (tab: "page" | "changes") => void; /** The page's tiles in order, each by name. */ readonly tiles: readonly { readonly key: string; readonly row: string; readonly name: string; readonly span: number; }[]; /** The builder's width, px. */ readonly width: number; } /** * Renders the publish preview — see the module docs. * * @param props - What the preview shows and does, and the page as it will publish * @returns The publish preview */ export declare const StudioPublishPreview: import("react").MemoExoticComponent<({ value, page, phone }: StudioPublishPreviewProps) => import("react/jsx-runtime").JSX.Element>; export {}; //# sourceMappingURL=publish.d.ts.map