/** * Load widget instances for the current request. * * Three modes, switched by `request.currentRoute`: * * 1. Admin `widgetNew` — synthesize an in-memory widget for the * `widget_setting_form` Area (no DB row yet). * 2. Admin `widgetEdit` — load the persisted widget_instance and surface it * in `widget_setting_form` so the settings form can hydrate. * 3. Storefront — load source widget_instance + widget_placement state, * apply the page-builder overlay (active rollout plans OR a preview * changeset specified by `?changeset=` for authenticated admins), * filter to placements matching the current route, and emit one entry * per placement. Container children live in `widget_placement` rows with * synthetic `area = columnsContainer__col_` — the * `Columns` storefront widget renders matching `` elements at * render time so children attach via the normal Area mechanism. * * Per `02-widget-refactor-technical-specification.md` § 7.2.1: widgets whose * type isn't registered, or whose area isn't emitted on the current page * (including children of an unrendered container), silently don't render. */ export function loadWidgetInstances(request: any): Promise<{ type: any; uuid: any; areaId: any[]; settings: any; sortOrder: any; placementUuid: any; }[] | { type: any; areaId: string[]; uuid: any; sortOrder: number; settings: any; }[]>;