import { H as Field, J as FieldProps, y as DropZoneProps, m as Config, am as UserGenerics, D as Data, al as UiState, Y as OnAction, $ as Permissions, a0 as Plugin, _ as Overrides, N as FieldTransforms, a3 as PuckAction, ao as Viewports, Q as IframeConfig, R as InitialHistory, V as Metadata, a8 as ResolveDataTrigger, S as ItemSelector, i as ComponentData, a1 as PluginInternal } from './actions-Csn3gOP8.mjs'; export { A as Adaptor, a as AppState, b as ArrayField, c as ArrayState, d as AsFieldProps, B as BaseData, e as BaseField, C as CacheOpts, f as ComponentConfig, g as ComponentConfigExtensions, h as ComponentConfigParams, j as ComponentDataMap, k as ComponentDataOptionalId, l as ComponentMetadata, n as ConfigParams, o as Content, p as CustomField, q as CustomFieldRender, r as DefaultComponentProps, s as DefaultComponents, t as DefaultRootFieldProps, u as DefaultRootProps, v as DefaultRootRenderProps, w as Direction, x as DragAxis, E as ExternalField, z as ExternalFieldWithAdaptor, F as ExtractConfigParams, G as ExtractField, I as FieldMetadata, K as FieldRenderFunctions, L as FieldTransformFn, M as FieldTransformFnParams, O as Fields, P as History, T as ItemWithId, U as MappedItem, W as NumberField, X as ObjectField, Z as OverrideKey, a4 as PuckComponent, a5 as PuckContext, a6 as PuckMetadata, a7 as RadioField, a9 as RichText, aa as RichtextField, ab as RootConfig, ac as RootData, ad as RootDataWithProps, ae as RootDataWithoutProps, af as SelectField, ag as Slot, ah as SlotComponent, ai as SlotField, aj as TextField, ak as TextareaField, an as Viewport, ap as WithChildren, aq as WithId, ar as WithPuckProps, as as WithSlotProps, at as overrideKeys } from './actions-Csn3gOP8.mjs'; export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-BrW9VQ_t.mjs'; import * as react from 'react'; import react__default, { ReactNode, SyntheticEvent, ReactElement, CSSProperties } from 'react'; import * as react_jsx_runtime from 'react/jsx-runtime'; import { A as AppStore, G as GetPermissions, R as RefreshPermissions, H as HistorySlice } from './index-ClzBCbx_.mjs'; import '@tiptap/react'; import '@tiptap/extension-blockquote'; import '@tiptap/extension-bold'; import '@tiptap/extension-code'; import '@tiptap/extension-code-block'; import '@tiptap/extension-hard-break'; import '@tiptap/extension-heading'; import '@tiptap/extension-horizontal-rule'; import '@tiptap/extension-italic'; import '@tiptap/extension-link'; import '@tiptap/extension-list'; import '@tiptap/extension-paragraph'; import '@tiptap/extension-strike'; import '@tiptap/extension-text-align'; import '@tiptap/extension-underline'; declare const ActionBar: { ({ label, children, }: { label?: string; children?: ReactNode; }): react_jsx_runtime.JSX.Element; Action: react.ForwardRefExoticComponent<{ children: ReactNode; label?: string; onClick?: (e: SyntheticEvent) => void; active?: boolean; disabled?: boolean; } & react.RefAttributes>; Label: ({ label }: { label: string; }) => react_jsx_runtime.JSX.Element; Group: ({ children }: { children: ReactNode; }) => react_jsx_runtime.JSX.Element; Separator: () => react_jsx_runtime.JSX.Element; }; declare const Action: react.ForwardRefExoticComponent<{ children: ReactNode; label?: string; onClick?: (e: SyntheticEvent) => void; active?: boolean; disabled?: boolean; } & react.RefAttributes>; declare const Group: ({ children }: { children: ReactNode; }) => react_jsx_runtime.JSX.Element; declare const Label: ({ label }: { label: string; }) => react_jsx_runtime.JSX.Element; declare const Separator: () => react_jsx_runtime.JSX.Element; declare const FieldLabel: ({ children, icon, label, el, readOnly, className, }: { children?: ReactNode; icon?: ReactNode; label: string; el?: "label" | "div"; readOnly?: boolean; className?: string; }) => react_jsx_runtime.JSX.Element; type FieldNoLabel = Omit, "label">; declare function AutoField = FieldNoLabel>(props: FieldProps & { value: any; }): react_jsx_runtime.JSX.Element | null; declare const Button: ({ children, href, onClick, variant, type, disabled, tabIndex, newTab, fullWidth, icon, size, loading: loadingProp, ...props }: { children: ReactNode; href?: string; onClick?: (e: any) => void | Promise; variant?: "primary" | "secondary"; type?: "button" | "submit" | "reset"; disabled?: boolean; tabIndex?: number; newTab?: boolean; fullWidth?: boolean; icon?: ReactNode; size?: "medium" | "large"; loading?: boolean; }) => react_jsx_runtime.JSX.Element; declare const Drawer: { ({ children, droppableId, direction, }: { children: ReactNode; droppableId?: string; direction?: "vertical" | "horizontal"; }): react_jsx_runtime.JSX.Element; Item: ({ name, children, id, label, index, isDragDisabled, }: { name: string; children?: (props: { children: ReactNode; name: string; }) => ReactElement; id?: string; label?: string; index?: number; isDragDisabled?: boolean; }) => react_jsx_runtime.JSX.Element; }; declare const DropZone: react.ForwardRefExoticComponent & react.RefAttributes>; declare const IconButton: react.ForwardRefExoticComponent<{ active?: boolean; children: ReactNode; href?: string; onClick?: (e: SyntheticEvent) => void | Promise; type?: "button" | "submit" | "reset"; disabled?: boolean; tabIndex?: number; newTab?: boolean; fullWidth?: boolean; title: string; suppressHydrationWarning?: boolean; } & react.RefAttributes>; type PuckProps = UserGenerics> = { children?: ReactNode; config: UserConfig; data: Partial; ui?: Partial; onChange?: (data: G["UserData"]) => void; onPublish?: (data: G["UserData"]) => void; onAction?: OnAction; permissions?: Partial; plugins?: Plugin[]; overrides?: Partial>; fieldTransforms?: FieldTransforms; renderHeader?: (props: { children: ReactNode; dispatch: (action: PuckAction) => void; state: G["UserAppState"]; }) => ReactElement; renderHeaderActions?: (props: { state: G["UserAppState"]; dispatch: (action: PuckAction) => void; }) => ReactElement; headerTitle?: string; headerPath?: string; viewports?: Viewports; iframe?: IframeConfig; dnd?: { disableAutoScroll?: boolean; }; initialHistory?: InitialHistory; metadata?: Metadata; height?: CSSProperties["height"]; _experimentalFullScreenCanvas?: boolean; _experimentalVirtualization?: boolean; }; declare function Puck = UserGenerics>(props: PuckProps): react_jsx_runtime.JSX.Element; declare namespace Puck { var Components: () => react_jsx_runtime.JSX.Element; var Fields: react.MemoExoticComponent<({ wrapFields }: { wrapFields?: boolean; }) => react_jsx_runtime.JSX.Element>; var Layout: ({ children }: { children?: ReactNode; }) => react_jsx_runtime.JSX.Element; var Outline: () => react_jsx_runtime.JSX.Element; var Preview: ({ id }: { id?: string; }) => react_jsx_runtime.JSX.Element; } declare const renderContext: react__default.Context<{ config: Config; data: Data; metadata: Metadata; }>; declare function Render = UserGenerics>({ config, data, metadata, }: { config: UserConfig; data: Partial; metadata?: Metadata; }): react_jsx_runtime.JSX.Element; declare function AlignLeft(): react_jsx_runtime.JSX.Element; declare function AlignCenter(): react_jsx_runtime.JSX.Element; declare function AlignRight(): react_jsx_runtime.JSX.Element; declare function AlignJustify(): react_jsx_runtime.JSX.Element; declare function Bold(): react_jsx_runtime.JSX.Element; declare function Italic(): react_jsx_runtime.JSX.Element; declare function Underline(): react_jsx_runtime.JSX.Element; declare function Strikethrough(): react_jsx_runtime.JSX.Element; declare function InlineCode(): react_jsx_runtime.JSX.Element; declare function BulletList(): react_jsx_runtime.JSX.Element; declare function OrderedList(): react_jsx_runtime.JSX.Element; declare function CodeBlock(): react_jsx_runtime.JSX.Element; declare function Blockquote(): react_jsx_runtime.JSX.Element; declare function HorizontalRule(): react_jsx_runtime.JSX.Element; declare function Control({ icon, disabled, active, onClick, title, }: { icon: ReactNode; disabled?: boolean; active?: boolean; onClick: (e: SyntheticEvent) => any; title: string; }): react_jsx_runtime.JSX.Element; declare const RichTextMenu: { ({ children }: { children: ReactNode; }): react_jsx_runtime.JSX.Element; Group: ({ children }: { children: ReactNode; }) => react_jsx_runtime.JSX.Element; Control: typeof Control; AlignCenter: typeof AlignCenter; AlignJustify: typeof AlignJustify; AlignLeft: typeof AlignLeft; AlignRight: typeof AlignRight; AlignSelect: () => react_jsx_runtime.JSX.Element; Blockquote: typeof Blockquote; Bold: typeof Bold; BulletList: typeof BulletList; CodeBlock: typeof CodeBlock; HeadingSelect: () => react_jsx_runtime.JSX.Element; HorizontalRule: typeof HorizontalRule; InlineCode: typeof InlineCode; Italic: typeof Italic; ListSelect: () => react_jsx_runtime.JSX.Element; OrderedList: typeof OrderedList; Strikethrough: typeof Strikethrough; Underline: typeof Underline; }; declare const registerOverlayPortal: (el: HTMLElement | null | undefined, opts?: { disableDrag?: boolean; disableDragOnFocus?: boolean; }) => (() => void) | undefined; /** * Helper function to set a value based on a dot-notated path */ declare function setDeep>(node: T, path: string, newVal: any): T; type UsePuckData = UserGenerics> = { appState: G["UserPublicAppState"]; config: UserConfig; dispatch: AppStore["dispatch"]; getPermissions: GetPermissions; refreshPermissions: RefreshPermissions; resolveDataById: (id: string, trigger?: ResolveDataTrigger) => void; resolveDataBySelector: (selector: ItemSelector, trigger?: ResolveDataTrigger) => void; selectedItem: G["UserComponentData"] | null; getItemBySelector: (selector: ItemSelector) => G["UserComponentData"] | undefined; getItemById: (id: string) => G["UserComponentData"] | undefined; getSelectorForId: (id: string) => Required | undefined; getParentById: (id: string) => ComponentData | undefined; history: { back: HistorySlice["back"]; forward: HistorySlice["forward"]; setHistories: HistorySlice["setHistories"]; setHistoryIndex: HistorySlice["setHistoryIndex"]; histories: HistorySlice["histories"]; index: HistorySlice["index"]; hasPast: boolean; hasFuture: boolean; }; }; type PuckApi = UsePuckData; type UsePuckStore = PuckApi; /** * createUsePuck * * Create a typed usePuck hook, which is necessary because the user may provide a generic type but not * a selector type, and TS does not currently support partial inference. * Related: https://github.com/microsoft/TypeScript/issues/26242 * * @returns a typed usePuck function */ declare function createUsePuck(): >(selector: (state: UsePuckStore) => T) => T; declare function usePuck(): UsePuckStore; /** * Get the latest state without relying on a render * * @returns PuckApi */ declare function useGetPuck(): () => UsePuckStore; declare const blocksPlugin: () => Plugin; declare const fieldsPlugin: (params?: { desktopSideBar?: "left" | "right"; }) => PluginInternal; declare const outlinePlugin: () => Plugin; declare const legacySideBarPlugin: () => Plugin; export { Action, ActionBar, AutoField, Button, ComponentData, Config, Data, Drawer, DropZone, Field, FieldLabel, FieldProps, FieldTransforms, Group, IconButton, IframeConfig, InitialHistory, Label, Metadata, OnAction, Overrides, Permissions, Plugin, Puck, PuckAction, type PuckApi, Render, ResolveDataTrigger, RichTextMenu, Separator, UiState, type UsePuckData, UserGenerics, Viewports, blocksPlugin, createUsePuck, fieldsPlugin, legacySideBarPlugin, outlinePlugin, registerOverlayPortal, renderContext, setDeep, useGetPuck, usePuck };