import React from 'react'; interface WidgetType { code: string; name: string; description: string; category: string | null; /** Optional lucide icon name; resolved via `getWidgetIcon`. */ icon: string | null; defaultSetting: Record | null; } interface RouteInfo { id: string; name: string; path: string; /** * Concrete URL the page-builder iframe loads. For static routes this * matches `path`; for routes with URL params (e.g. `/category/:uuid`) * the resolver substitutes a sample entity. May be null when the * backend has nothing to sample. */ previewPath?: string | null; /** * Non-null when the route has an entity dimension the page builder can * scope to (e.g. `cmsPageView` → every CMS page). Drives the topbar entity * selector. `listQuery` names the GraphQL query enumerating the entities. */ entityScope?: { type: string; listQuery: string; } | null; } interface ChangesetInfo { changesetId: number; uuid: string; token: string; /** * Per-route undo/redo cursors as a JSON object. Used to diff against * `rolloutPlan.routeCursors` for the Save-enabled state in rollout mode. */ routeCursors: Record; /** * Set when the user is editing a rollout plan's underlying changeset * (entered the editor via `?session=` from SessionPicker). * Null when editing the user's draft. Drives the topbar SessionModeBadge * appearance and the publish-button-becomes-Save rename. */ rolloutPlan?: { rolloutPlanId: number; uuid: string; name: string; /** * Snapshot of route_cursors at Save time. The live storefront overlay * filters by this; the editor diffs against `changeset.routeCursors` * to decide whether Save is enabled. */ routeCursors: Record; /** ISO 8601 string from luxon; nullable. Matches DateTime.text resolver. */ startTime?: { text: string | null; } | null; endTime?: { text: string | null; } | null; } | null; } /** * The editor's active entity scope for this session (spec 03 § 4). Null * fields = route-level ("All CMS pages") scope: placement writes go to * `entity_urn = null` and the preview uses the route's sample `previewPath`. * Set by the pageBuilderEdit handler from `?entity=`. */ interface PageBuilderScope { entityUrn: string | null; previewPath: string | null; } interface EditorProps { route: RouteInfo; pageBuilderScope?: PageBuilderScope | null; changeset: ChangesetInfo; widgetTypes: WidgetType[]; addOperationUrl: string; publishUrl: string; createRolloutPlanUrl: string; updateRolloutPlanUrl: string; syncRolloutPlanUrl: string; cancelRolloutPlanUrl: string; moveCurrentChangeUrl: string; discardChangesetUrl: string; pickerHomeUrl: string; dashboardUrl: string; } export default function Editor({ route, pageBuilderScope, changeset, widgetTypes, addOperationUrl, publishUrl, createRolloutPlanUrl, updateRolloutPlanUrl, syncRolloutPlanUrl, cancelRolloutPlanUrl, moveCurrentChangeUrl, discardChangesetUrl, pickerHomeUrl, dashboardUrl }: EditorProps): React.JSX.Element; export declare const layout: { areaId: string; sortOrder: number; }; export declare const query = "\n query Query {\n route(id: getContextValue(\"pageBuilderRouteId\")) {\n id\n name\n path\n previewPath\n entityScope {\n type\n listQuery\n }\n }\n pageBuilderScope {\n entityUrn\n previewPath\n }\n changeset(id: getContextValue(\"pageBuilderChangesetId\")) {\n changesetId\n uuid\n token\n routeCursors\n rolloutPlan {\n rolloutPlanId\n uuid\n name\n routeCursors\n startTime { text(format: \"yyyy-LL-dd'T'HH:mm:ssZZ\") }\n endTime { text(format: \"yyyy-LL-dd'T'HH:mm:ssZZ\") }\n }\n }\n widgetTypes {\n code\n name\n description\n category\n icon\n defaultSetting\n }\n addOperationUrl: url(routeId:\"addChangesetOperation\", params:[{key:\"id\", value:getContextValue(\"pageBuilderChangesetIdString\")}])\n publishUrl: url(routeId:\"publishChangeset\", params:[{key:\"id\", value:getContextValue(\"pageBuilderChangesetIdString\")}])\n createRolloutPlanUrl: url(routeId:\"createRolloutPlan\")\n updateRolloutPlanUrl: url(routeId:\"updateRolloutPlan\", params:[{key:\"id\", value:getContextValue(\"pageBuilderRolloutPlanIdString\")}])\n syncRolloutPlanUrl: url(routeId:\"syncRolloutPlan\", params:[{key:\"id\", value:getContextValue(\"pageBuilderRolloutPlanIdString\")}])\n cancelRolloutPlanUrl: url(routeId:\"cancelRolloutPlan\", params:[{key:\"id\", value:getContextValue(\"pageBuilderRolloutPlanIdString\")}])\n moveCurrentChangeUrl: url(routeId:\"moveCurrentChange\", params:[{key:\"id\", value:getContextValue(\"pageBuilderChangesetIdString\")}])\n discardChangesetUrl: url(routeId:\"discardChangeset\", params:[{key:\"id\", value:getContextValue(\"pageBuilderChangesetIdString\")}])\n pickerHomeUrl: url(routeId:\"pageBuilder\")\n dashboardUrl: url(routeId:\"dashboard\")\n }\n"; export {};