import React from 'react'; /** * Inject the page-builder chrome stylesheet (widget outlines, toolbar * visibility, and — critically — the `[data-evershop-pb-dropzone]` sizing / * visibility rules) once per document. Idempotent via the element-id guard. * * Exported because the drop-zone rules must exist even on a route with **no * widgets** (a fresh store): `WidgetChrome` only mounts per existing widget, * so `PageBuilderBridge` (always mounted in the iframe) also calls this to * guarantee the stylesheet is present regardless of widget count. */ export declare function ensureChromeStyleInjected(): void; /** * Wraps each widget render in the page-builder iframe with selection * affordances and a hover toolbar (Settings / Delete). Outside the iframe * (production storefront), it renders `children` unchanged with no extra * markup or context — zero overhead. * * Drop zones are NOT emitted here — `Area.tsx` owns every seam (one * `AreaDropZone` after each renderable, widget or layout component, plus * the area-start zone). The chrome's only drop-related duty is carrying * `data-evershop-pb-sort-order` on the wrapper so zones can walk it. * * Selection / delete are delivered to the admin via same-origin postMessage: * - { type: 'widget-selected', widgetUid, widgetType, settings } * - { type: 'widget-delete', widgetUid } * * The admin (`Editor.tsx`) listens and dispatches drawer / DELETE-op flows. */ interface WidgetChromeProps { uuid: string; type: string; /** * The Area id this widget render is attached to. A single widget can have * multiple placements across areas; the toolbar messages include this so * the admin handler operates on the right placement. */ area: string; /** * The placement's sort_order. Surfaced as `data-evershop-pb-sort-order` * on the wrapper so adjacent drop zones can walk DOM siblings and read * the value when computing where a new drop should land. */ sortOrder: number; settings: Record; children: React.ReactNode; } export declare function WidgetChrome({ uuid, type, area, sortOrder, settings, children }: WidgetChromeProps): React.ReactElement; export {};