import { P as History, $ as Permissions, i as ComponentData, m as Config, am as UserGenerics, O as Fields, a3 as PuckAction, ad as RootDataWithProps, a8 as ResolveDataTrigger, a0 as Plugin, _ as Overrides, ao as Viewports, Q as IframeConfig, al as UiState, f as ComponentConfig, a as AppState, V as Metadata, N as FieldTransforms, aa as RichtextField } from './actions-Csn3gOP8.js'; import { Editor } from '@tiptap/react'; type HistorySlice = { index: number; hasPast: () => boolean; hasFuture: () => boolean; histories: History[]; record: (data: D) => void; back: VoidFunction; forward: VoidFunction; currentHistory: () => History; nextHistory: () => History | null; prevHistory: () => History | null; setHistories: (histories: History[]) => void; setHistoryIndex: (index: number) => void; initialAppState: D; }; type NodeHandle = { sync: () => void; hideOverlay: () => void; showOverlay: () => void; }; type NodesSlice = { registerNode: (id: string, handle: NodeHandle) => void; unregisterNode: (id: string) => void; syncNode: (id?: string | null) => void; syncNodes: (ids: Array) => void; setOverlayVisible: (id: string | null | undefined, visible: boolean) => void; }; type PermissionsArgs = UserGenerics> = { item?: G["UserComponentData"] | null; type?: keyof G["UserProps"]; root?: boolean; }; type GetPermissions = (params?: PermissionsArgs) => Permissions; type ResolvePermissions = (params?: PermissionsArgs, force?: boolean) => void; type RefreshPermissions = (params?: PermissionsArgs, force?: boolean) => void; type Cache = Record; lastData: ComponentData | null; lastParentId: string | null; }>; type PermissionsSlice = { cache: Cache; globalPermissions: Permissions; resolvedPermissions: Record | undefined>; getPermissions: GetPermissions; resolvePermissions: ResolvePermissions; refreshPermissions: RefreshPermissions; }; type ComponentOrRootData = Omit, "type">; type FieldsSlice = { fields: Fields | Partial; loading: boolean; lastResolvedData: Partial; id: string | undefined; }; type Status = "LOADING" | "MOUNTED" | "READY"; type ZoomConfig = { autoZoom: number; rootHeight: number; zoom: number; }; type ComponentState = Record; type AppStore = UserGenerics> = { instanceId: string; state: G["UserAppState"]; dispatch: (action: PuckAction) => void; config: UserConfig; componentState: ComponentState; setComponentState: (componentState: ComponentState) => void; setComponentLoading: (id: string, loading?: boolean, defer?: number) => () => void; unsetComponentLoading: (id: string) => void; pendingLoadTimeouts: Record; resolveComponentData: (componentData: T, trigger: ResolveDataTrigger) => Promise<{ node: T; didChange: boolean; }>; resolveAndCommitData: () => void; plugins: Plugin[]; overrides: Partial; viewports: Viewports; zoomConfig: ZoomConfig; setZoomConfig: (zoomConfig: ZoomConfig) => void; status: Status; setStatus: (status: Status) => void; iframe: IframeConfig; _experimentalFullScreenCanvas: boolean; _experimentalVirtualization: boolean; selectedItem?: G["UserData"]["content"][0] | null; getCurrentData: () => G["UserData"]["content"][0] | G["UserData"]["root"]; setUi: (ui: Partial, recordHistory?: boolean) => void; getComponentConfig: (type?: string) => ComponentConfig | null | undefined; onAction?: (action: PuckAction, newState: AppState, state: AppState) => void; metadata: Metadata; fields: FieldsSlice; history: HistorySlice; nodes: NodesSlice; permissions: PermissionsSlice; fieldTransforms: FieldTransforms; currentRichText?: { inlineComponentId?: string; inline: boolean; field: RichtextField; editor: Editor; id: string; } | null; }; export type { AppStore as A, GetPermissions as G, HistorySlice as H, RefreshPermissions as R };