import * as React from 'react'; import React__default from 'react'; import { Descendant, Editor, BaseEditor, Element, Node } from 'slate'; import { RenderElementProps, RenderLeafProps, ReactEditor } from 'slate-react'; import { HistoryEditor } from 'slate-history'; declare namespace types { export const EmbedProp = "RB_PAGE_EMBED"; export const EmbedContent = "RB_PAGE_EMBED_CONTENT"; /** * Type of Sidebar control */ export enum SideEditPropType { Text = "TEXT", Textarea = "TEXTAREA", Number = "NUMBER", Date = "DATE", Range = "RANGE", Boolean = "BOOLEAN", Select = "SELECT", Autocomplete = "AUTOCOMPLETE", Image = "IMAGE", Custom = "CUSTOM", Relationship = "RELATIONSHIP", IconSelector = "ICON-SELECTOR" } /** * How to display the options */ export enum OptionsDisplay { Select = "SELECT", Radio = "RADIO", Color = "COLOR" } /** * Features for RichText: see also the new RichTextExt */ export enum RichTextFeatures { Bold = "BOLD", Italic = "ITALIC", Code = "CODE", Highlight = "HIGHLIGHT", Subscript = "SUB", Superscript = "SUP", Link = "LINK", UnorderedList = "UL", OrderedList = "OL", Heading1 = "H1", Heading2 = "H2", Heading3 = "H3", Heading4 = "H4", Heading5 = "H5", Heading6 = "H6", Quote = "QUOTE" } /** * Supported Icon Sets */ export enum IconSets { Lucide = "lu", HeroIconSolid = "hi-solid", HeroIconOutline = "hi-outline", FontAwesome = "fa6", Feather = "fi" } /** * Page status */ export enum PageStatus { Draft = "DRAFT", Published = "PUBLISHED" } /** * Approval status */ export enum EditStatus { Merged = "MERGED", Working = "WORKING", MergeRequested = "MERGE_REQUESTED" } /** * Device type for responsive preview (for the icon) */ export enum DeviceType { Desktop = "DESKTOP", Tablet = "TABLET", Phone = "PHONE" } /** * Corner for the click-to-edit button */ export enum ClickToEditSide { BottomRight = "BOTTOM-RIGHT", BottomLeft = "BOTTOM-LEFT", TopRight = "TOP-RIGHT", TopLeft = "TOP-LEFT", None = "NONE" } export enum BlockIconsPosition { InsideBlock = "INSIDE-BLOCK", OutsideBlock = "OUTSIDE-BLOCK" } /** * A Brick is a type of content block */ export type Brick = React__default.FC & { schema: IBlockType; }; /** * Bricks are types of content block */ export type Bricks = { [key: string]: Brick; }; /** * A Category contains bricks */ export type Category = { categoryName: string; bricks: Brick[]; }; /** * A Theme contains categories and bricks */ export type Theme = { themeName: string; bannerText?: string; bannerLink?: string; categories: Category[]; }; /** * Custom role type */ export type CustomRole = { id: string; name: string; }; /** * The type of the user passed to permission functions */ export type PermissionUser = { firstName: string; lastName: string; email: string; isAdmin: boolean; role: string; customRole?: CustomRole; }; /** * The type of the page passed to permission functions */ export type PermissionPage = { slug: string; pageType: string; language: string; }; /** * The type of the brick passed to permission functions */ export type PermissionBrick = { name: string; category: string; theme: string; tags: string[]; }; /** * The permission functions */ export type Permissions = { canAddPage?: (user: PermissionUser, pageType: string) => boolean; canAddTranslation?: (user: PermissionUser, pageType: string, language: string) => boolean; canSeePageType?: (user: PermissionUser, pageType: string) => boolean; canSeePage?: (user: PermissionUser, page: Omit) => boolean; canEditPage?: (user: PermissionUser, page: PermissionPage) => boolean; canDeletePage?: (user: PermissionUser, page: Omit) => boolean; canDeleteTranslation?: (user: PermissionUser, page: PermissionPage) => boolean; canUseBrick?: (user: PermissionUser, brick: PermissionBrick) => boolean; }; /** * The logged-in User */ export type User = { id: string; email: string; firstName: string; lastName: string; company: string; avatarUrl?: string; isAdmin: boolean; token: string; appName: string; appId: string; appEnv: string; deployHookUrl?: string; deployHookMethod?: string; deployHookTriggerOnScheduledPublishing: boolean; deployHookStagingUrl?: string; deployHookStagingMethod?: string; deployHookStagingTriggerOnScheduledPublishing: boolean; deployHookDevUrl?: string; deployHookDevMethod?: string; deployHookDevTriggerOnScheduledPublishing: boolean; eventsHookUrl?: string; eventsHookAuthToken?: string; canCreatePage: boolean; canDeletePage: boolean; canDeploy: boolean; canDeployStaging: boolean; canDeployDev: boolean; canEditPageAttributes: boolean; canEditSeo: boolean; canApprove: boolean; role: string; customRole?: CustomRole; plan: string; isVerified: boolean; languages: Language[]; defaultLanguage: string; hostname: string; useWorkingCopy: boolean; useApprovalWorkflow: boolean; subscription: { maxStories: number; collaboration: boolean; deployHookStaging: boolean; deployHookDev: boolean; scheduledPublishing: boolean; abTesting: boolean; embedPages: boolean; lockBlocks: boolean; flexibleRoles: boolean; advancedSeo: boolean; eventsLog: boolean; maxFileSize: number; maxImageSize: number; maxFilesBatch: number; maxFilesConcurrency: number; diskSpace: number; advancedDam: boolean; workingCopy: boolean; approvalWorkflow: boolean; template: boolean; externalData: boolean; richTextExt: boolean; aiText: boolean; aiGen: boolean; aiSeo: boolean; emailMarketing: boolean; forms: boolean; }; emailMarketingConfig?: { providers: Array<{ value: string; label: string; }>; testRecipients: string[]; }; } | null; /** * Translation for a Page */ export type Translation = { language: string; slug: string; name: string; status: PageStatus; editStatus: EditStatus; isLocked: boolean; scheduledForPublishingOn: string; }; /** * Variant for a Page */ export type Variant = { name: string; weight: number; status: PageStatus; scheduledForPublishingOn: string; scheduledForUnpublishingOn: string; isLive: boolean; }; /** * The page editing User */ export type EditingUser = { id: string; email: string; firstName: string; lastName: string; company: string; avatarUrl?: string; }; /** * Date and User of last edit */ export type LastEditedBy = { date: string; user: EditingUser; }; /** * Provider to send EmailMarketing */ export type EmailMarketingProvider = 'brevo' | 'getresponse' | 'mailchimp' | 'mailerlite' | 'resend' | 'sendgrid'; /** EmailMarketing Sender (from address) */ export type EmailMarketingSender = { email: string; name: string; id?: string; }; /** * EmailMarketing configuration on Page */ export type EmailMarketingConfig = { provider: EmailMarketingProvider; sender: string; listId: string; campaignName: string; subject: string; }; /** * AppOnPage */ export type AppOnPage = { noindex?: boolean; hideGeneratorTag?: boolean; }; /** * A React Bricks Page */ export type Page = { id: string; type: string; name: string; slug: string; variantName: string; variantWeight: number; meta: IMeta; customValues?: Props; externalData?: Props; emailMarketingConfig?: EmailMarketingConfig; content: IContentBlock[]; workingContent?: IContentBlock[]; committedContent?: IContentBlock[]; authorId?: string; author: Author; invalidBlocksTypes?: string[]; status: PageStatus; editStatus: EditStatus; isLocked: boolean; tags: string[]; category?: string; createdAt: string; publishedAt?: string; scheduledForPublishingOn?: string; scheduledForUnpublishingOn?: string; language: string; translations: Translation[]; variants: Variant[]; lastEditedBy: LastEditedBy; app?: AppOnPage; }; /** * Page fields (without content) */ export type PageValues = Omit; /** * A Page with all optional fields, used for the patch */ export type PartialPage = Partial; /** * Page from a list (no content) */ export type PageFromList = Omit; /** * Page from a list with pagination */ export type PagesFromListWithPagination = { items: PageFromList[]; pagination: { page: number; pageSize: number; totalItems: number; totalPages: number; }; }; /** * The Author of a Page */ export type Author = { id: string; email: string; firstName: string; lastName: string; avatarUrl?: string; company?: string; }; export type BrickStory = { id: string; name: string; showAsBrick?: boolean; previewImageUrl?: string; disabled?: boolean; disabledIcon?: 'purchase' | 'maintenance'; disabledLink?: string; disabledTooltip?: string; props: T; }; type RepeaterItemDefault = IContentBlock | Omit | Props; export type RepeaterItems = Array; /** * A Language for i18n */ export type Language = { code: string; name: string; }; /** * Render function for local links (should use the app's Router) */ interface LocalLinkProps { href: string; target?: string; className?: string; activeClassName?: string; isAdmin?: boolean; tabIndex?: number; } type LocalLinkPropsReal = React__default.PropsWithChildren, keyof LocalLinkProps> & LocalLinkProps>; export type RenderLocalLink = ({ href, target, className, activeClassName, isAdmin, tabIndex, children, }: LocalLinkPropsReal) => React__default.ReactElement; /**- * The type of Text and RichText value */ export type TextValue = Descendant[] | string; /** * Props of a content block */ export type Props = { [key: string]: any; }; /** * Options passed to the fetch function */ export type FetchOptions = { apiPrefix?: string; cache?: string; next?: { [key: string]: any; }; }; /** * Interface for the Schema of a Brick */ export interface IBlockType { name: string; label: string; description?: string; getDefaultProps?: () => Partial; hideFromAddMenu?: boolean; disabled?: boolean; disabledIcon?: 'purchase' | 'maintenance'; disabledLink?: string; disabledTooltip?: string; sideEditProps?: Array | ISideGroup>; repeaterItems?: IRepeaterItem[]; newItemMenuOpen?: boolean; groupByRepeater?: boolean; mapExternalDataToProps?: (externalData: Props, brickProps?: T) => Partial; getData?: (page: Page, brickProps?: T, args?: any) => Promise>; getExternalData?: (page: Page, brickProps?: T, args?: any) => Promise>; playgroundLinkUrl?: string; playgroundLinkLabel?: string; theme?: string; category?: string; tags?: string[]; previewImageUrl?: string; previewIcon?: React__default.ReactElement; stories?: BrickStory>[]; astroInteractivity?: 'load' | { load: true; } | 'idle' | { idle: true; } | { idle: { timeout: number; }; } | 'visible' | { visible: true; } | { visible: { rootMargin: string; }; } | { media: string; } | { only: string; }; } /** * Item of a Repeater */ export interface IRepeaterItem { name: string; label?: string; itemType?: string; itemLabel?: string; defaultOpen?: boolean; min?: number; max?: number; getDefaultProps?: () => Props; show?: (props: T, page?: Page, user?: User) => boolean; items?: { type: string; label?: string; min?: number; max?: number; getDefaultProps?: () => Props; show?: (props: T, page?: Page, user?: User) => boolean; }[]; } /** * The content of a block (instance of a Brick) */ export interface IContentBlock { id: string; type: string; props: Props; locked?: boolean; canAddAfter?: boolean; canAddBefore?: boolean; canEditContent?: boolean; } /** * Option of a select sidebar prop */ export interface IOption { value: T; label: string; disabled?: boolean; disabledTooltip?: string; [otherProps: string]: unknown; } /** * Interface for Props of a Custom sidebar component */ export interface ICustomKnobProps { id: string; value: any; onChange: any; isValid: boolean; errorMessage?: string; } /** * Sidebar edit Props for a Page */ export interface ISideEditPropPage { name: string; label: string; type: SideEditPropType; component?: React__default.FC; validate?: (value: any, props?: T) => boolean | string; show?: (props: T, page?: Page, user?: User) => boolean; helperText?: string; textareaOptions?: { height?: number; }; imageOptions?: { maxWidth?: number; quality?: number; aspectRatio?: number; }; rangeOptions?: { min?: number; max?: number; step?: number; }; selectOptions?: { options?: IOption[]; getOptions?: (props: Props) => IOption[] | Promise; display: OptionsDisplay; }; autocompleteOptions?: { placeholder?: string; getOptions: (input: string, props: Props) => any[] | Promise; getKey: (option: any) => string | number; getLabel: (option: any) => string; renderOption?: ({ option, selected, focus, }: { option: any; selected: boolean; focus: boolean; }) => React__default.ReactElement; debounceTime?: number; getNoOptionsMessage?: (input?: string) => string; }; iconSelectorOptions?: { iconSets?: IconSets[]; }; relationshipOptions?: { label?: string; references: string; multiple: boolean; embedValues?: boolean; }; onChange?: (props: T) => Partial; } /** * Sidebar Edit Props */ export interface ISideEditProp extends ISideEditPropPage { shouldRefreshText?: boolean; shouldRefreshStyles?: boolean; } /** * A collapsible Group of sidebar Props */ export interface ISideGroup { groupName: string; defaultOpen?: boolean; show?: (props: T, page?: Page, user?: User) => boolean; props: ISideEditProp[] | ISideEditPropPage[]; } /** * Image Crop interface */ export interface ICrop { x: number; y: number; width: number; height: number; } /** * Image Transform interface */ export interface ITransform { rotate?: number; flip?: { horizontal: boolean; vertical: boolean; }; } /** * Image value interface */ export interface IImageSource { src: string; srcSet?: string; type?: string; fallbackSrc?: string; fallbackSrcSet?: string; fallbackType?: string; placeholderSrc?: string; alt?: string; seoName?: string; width?: number; height?: number; highPriority?: boolean; hashId?: string; crop?: ICrop; transform?: ITransform; } /** * File value interface */ export interface IFileSource { name: string; url: string; size: number; extension: string; pagesNum: number; title?: string | undefined; alt?: string | undefined; copyright?: string | undefined; source?: string | undefined; } /** * A Color for a Select sidebar prop */ export interface IColor { color: string; [propName: string]: any; } export interface IBrickStory { brickName: string; storyName: string; locked?: boolean; canAddAfter?: boolean; canAddBefore?: boolean; } /** * TemplateSlot type */ export type TemplateSlot = { slotName: string; label: string; min?: number; max?: number; allowedBlockTypes?: string[]; excludedBlockTypes?: string[]; editable?: boolean; getDefaultContent?: () => (string | IBrickStory | IContentBlock)[]; }; export type RenderEnvironment = 'Frontend' | 'Preview' | 'Admin' | 'Email'; export interface IRenderWrapperArgs { children: React__default.ReactElement; page: PageValues; renderEnvironment: RenderEnvironment; } export interface IRenderEmailHtmlArgs { children: React__default.ReactElement; page: PageValues; } /** * Page type */ export interface IPageType { name: string; pluralName: string; isEntity?: boolean; allowedBlockTypes?: string[]; excludedBlockTypes?: string[]; defaultLocked?: boolean; defaultStatus?: PageStatus; defaultFeaturedImage?: string; getDefaultContent?: () => (string | IBrickStory | IContentBlock)[]; customFields?: Array; getExternalData?: (page: Page, args?: any) => Promise; getDefaultMeta?: (page: PageFromList, externalData: Props) => Partial; metaImageAspectRatio?: number; categories?: ICategory[]; slugPrefix?: ISlugPrefix; template?: Array; headlessView?: boolean; isEmailMarketing?: boolean; renderWrapper?: (args: IRenderWrapperArgs) => React__default.ReactElement; renderEmailHtml?: (args: IRenderEmailHtmlArgs) => string | Promise; } /** * Structure returned by the cleanBlocks function */ export interface ICleanBlocks { blocks: IContentBlock[]; invalidBlocksTypes: string[]; } /** * Responsive breakpoint for preview */ export interface ResponsiveBreakpoint { type: DeviceType; width: number | string; label: string; } /** * Login UI customization */ export interface LoginUI { sideImage?: string; logo?: string; logoWidth?: number; logoHeight?: number; welcomeText?: string; welcomeTextStyle?: React__default.CSSProperties; } /** * MenuItem interface */ export interface IMenuItem { label: string; path?: string; } /** * The ReactBricks configuration */ export interface ReactBricksConfig { appId: string; apiKey: string; environment?: string; bricks?: types.Brick[] | types.Theme[]; pageTypes?: types.IPageType[]; logo?: string; loginUI?: LoginUI; contentClassName?: string; defaultTheme?: string; renderLocalLink: types.RenderLocalLink; navigate: (path: string) => void; loginPath?: string; editorPath?: string; mediaLibraryPath?: string; playgroundPath?: string; appSettingsPath?: string; previewPath?: string; getAdminMenu?: (args: { isAdmin: boolean; }) => IMenuItem[]; isDarkColorMode?: boolean; toggleColorMode?: () => void; useCssInJs?: boolean; appRootElement: string | HTMLElement; clickToEditSide?: ClickToEditSide; customFields?: Array; responsiveBreakpoints?: ResponsiveBreakpoint[]; enableAutoSave?: boolean; disableSaveIfInvalidProps?: boolean; enablePreview?: boolean; blockIconsPosition?: BlockIconsPosition; enablePreviewImage?: boolean; enablePreviewIcon?: boolean; enableUnsplash?: boolean; unsplashApiKey?: string; enableDefaultEmbedBrick?: boolean; checkUnsavedChanges?: boolean; permissions?: Permissions; allowAccentsInSlugs?: boolean; warningIfLowBattery?: boolean; rtlLanguages?: Array; apiPrefix?: string; } /** * The ReactBricks context */ export interface IReactBricksContext { version: string; appId: string; apiKey: string; environment?: string; bricks: Bricks; themes: types.Theme[]; pageTypes: IPageType[]; logo: string; loginUI: LoginUI; contentClassName: string; defaultTheme: string; renderLocalLink: RenderLocalLink; navigate: (path: string) => void; loginPath: string; editorPath: string; mediaLibraryPath: string; playgroundPath: string; appSettingsPath: string; previewPath: string; getAdminMenu?: (args: { isAdmin: boolean; }) => IMenuItem[]; isDarkColorMode?: boolean; toggleColorMode?: () => void; useCssInJs?: boolean; appRootElement: string | HTMLElement; clickToEditSide?: ClickToEditSide; customFields?: Array; responsiveBreakpoints: ResponsiveBreakpoint[]; enableAutoSave: boolean; disableSaveIfInvalidProps: boolean; enablePreview: boolean; browserSupport: { webP: boolean; lazyLoading: boolean; }; blockIconsPosition: BlockIconsPosition; enablePreviewImage: boolean; enablePreviewIcon: boolean; enableUnsplash: boolean; unsplashApiKey?: string; enableDefaultEmbedBrick: boolean; checkUnsavedChanges: boolean; permissions?: Permissions; allowAccentsInSlugs: boolean; warningIfLowBattery: boolean; isRtlLanguage: ({ language }: { language: string; }) => boolean; rtlLanguages: string[]; apiPrefix?: string; } /** * The current page in Admin */ export interface ICurrentPage { pageId: string; language?: string; variantName?: string; } /** * The Admin context returned from useAdminContext */ export interface IReadAdminContext { isAdmin: boolean; previewMode: boolean; currentPage: ICurrentPage; showRichTextModal: ShowRichTextModal; } /** * Opengraph type */ export type OpenGraphType = 'article' | 'website' | 'profile' | 'book' | 'video' | 'music'; /** * OpenGraph data */ export type OpenGraphData = { url?: string; type?: OpenGraphType; title?: string; description?: string; image?: types.IImageSource; }; /** * Twitter card type */ export type TwitterCardType = 'summary' | 'summary_large_image' | 'app' | 'player'; /** * Data for Twitter card */ export type TwitterCardData = { card?: TwitterCardType; site?: string; creator?: string; title?: string; description?: string; image?: types.IImageSource; }; /** * Meta Fields type * */ export type MetaData = { title?: string; description?: string; keywords?: string; noindex?: boolean; hideGeneratorTag?: boolean; featuredImage?: string; image?: IImageSource; }; /** * Meta fields on Page */ export interface IMeta extends MetaData { language?: string; openGraph?: OpenGraphData; twitterCard?: TwitterCardData; schemaOrg?: SchemaOrgData; } /** * Category on categories (pageTypes) */ export interface ICategory { category?: string; } /** * A RichTextExt Plugin */ export interface RichTextPlugin { type: 'Mark' | 'Block' | 'List'; name: string; isInline?: boolean; itemName?: string; label: string; hotKey?: string; renderElement?: (props: RenderElementProps) => React__default.ReactElement; renderItemElement?: (props: RenderElementProps) => React__default.ReactElement; renderLeaf?: (props: RenderLeafProps) => React__default.ReactElement; toggle: (editor: Editor, plugins: RichTextPlugin[], showRichTextModal: types.ShowRichTextModal) => void; button?: { icon: React__default.ReactElement; isActive: (editor: Editor) => boolean; }; enhanceEditor?: (editor: Editor) => Editor; } /** * Definition for a Mark plugin */ export interface MarkPlugin { name: string; label?: string; hotKey?: string; render: (props: RenderLeafProps) => React__default.ReactElement; icon?: React__default.ReactElement; } /** * Constructor for a Mark plugin */ export type MarkPluginConstructor = (markPlugin: MarkPlugin) => RichTextPlugin; /** * Definition for a Block plugin */ export interface BlockPlugin { name: string; isInline?: boolean; itemName?: string; label?: string; hotKey?: string; render: (props: RenderElementProps) => React__default.ReactElement; renderItem?: (props: RenderElementProps) => React__default.ReactElement; icon?: React__default.ReactElement; } export type BlockWithModalPlugin = BlockPlugin & { getDefaultProps?: () => Props; renderAdmin?: (props: RenderElementProps) => React__default.ReactElement; renderItemAdmin?: (props: RenderElementProps) => React__default.ReactElement; pluginCustomFields: Array; }; /** * Constructor for a Block plugin */ export type BlockPluginConstructor = (blockPlugin: BlockPlugin) => RichTextPlugin; /** * Constructor for a Block with Modal plugin */ export type BlockWithModalPluginConstructor = (blockPlugin: BlockWithModalPlugin) => RichTextPlugin; /** * Icon */ export type Icon = { name: string; svg: string; url: string; set: IconSets; }; export {}; } interface AstroBrickProps { index?: number; itemsCount?: number; blockProps: { [x: string]: any; }; page?: types.Page; block: types.IContentBlock; pathname?: string; } declare const AstroBrick: React__default.FC; declare const ClickToEdit: React__default.FC; /** * Icon Props */ interface IconProps { icon?: types.Icon; width?: number; height?: number; title?: string; className?: string; style?: React.CSSProperties; } /** * Component to render an Icon from an IconSelector sideEditProp */ declare const IconViewer: React.FC; interface ListProps { of: string; where?: { tag?: string; language?: string; filterBy?: { [key: string]: any; }; }; sort?: string; page?: number; pageSize?: number; children: ({ items, pagination, }: types.PagesFromListWithPagination) => React__default.ReactElement; } declare function ListAstro({ of, where, sort, page, pageSize, children, }: ListProps): React__default.ReactElement> | null; interface PageWrapperProps { children: React__default.ReactElement; pageType: types.IPageType; page: types.PageValues; renderEnvironment: types.RenderEnvironment; } declare const PageWrapper: React__default.FC; /** * Props for Link component */ interface LinkProps { href: string; target?: string; className?: string; activeClassName?: string; simpleAnchor?: boolean; } type LinkPropsReal = React.PropsWithChildren, keyof LinkProps> & LinkProps>; declare const Link: React.FC; /** * Props for Text */ interface FileProps { propName: string; renderBlock: (props: types.IFileSource | null) => React__default.ReactElement; allowedExtensions?: string[]; source: types.IFileSource; } declare const File: React__default.FC; /** * Arguments for the renderWrapper function */ interface IRenderWrapperArgs { children: React.ReactNode; width?: number; height?: number; } /** * renderWrapper function type */ type RenderWrapper = (args: IRenderWrapperArgs) => React.ReactElement; interface PlaceholderProps { aspectRatio?: number; maxWidth?: number; isDarkColorMode?: boolean; isAdmin: boolean; } interface SharedImageProps { readonly?: boolean; alt: string; noLazyLoad?: boolean; containerClassName?: string; containerStyle?: React.CSSProperties; imageClassName?: string; imageStyle?: React.CSSProperties; noWrapper?: boolean; quality?: number; sizes?: string; loading?: 'lazy' | 'eager'; renderWrapper?: RenderWrapper; useNativeLazyLoading?: boolean; useWebP?: boolean; placeholder?: (props: PlaceholderProps) => string; source: types.IImageSource; } interface EditableImage extends SharedImageProps { readonly?: false; propName?: string; metaFieldName?: 'image'; customFieldName?: string; aspectRatio?: number; maxWidth?: number; } interface ReadOnlyImage extends SharedImageProps { readonly: true; } /** * Props for Image */ type ImageProps = EditableImage | ReadOnlyImage; declare const Image: React.FC; /** * Props for Repeater */ interface RepeaterProps { propName: string; itemProps?: types.Props; renderWrapper?: (items: React.ReactElement) => React.ReactElement; renderItemWrapper?: (item: React.ReactElement, index: number, itemsCount: number) => React.ReactElement; items: types.RepeaterItems; } declare const Repeater: React.FC; /** * Props for renderLink render function */ interface RenderLinkElementProps extends RenderElementProps { href: string; target?: string; rel?: string; } interface BaseRichTextProps { renderBlock?: (props: RenderElementProps) => React__default.ReactElement; placeholder?: string; renderPlaceholder?: (props: { children: any; }) => React__default.ReactElement; multiline?: boolean; softLineBreak?: boolean; allowedFeatures?: types.RichTextFeatures[]; shouldRefreshStyles?: boolean; renderBold?: (props: RenderLeafProps) => React__default.ReactElement; renderItalic?: (props: RenderLeafProps) => React__default.ReactElement; renderHighlight?: (props: RenderLeafProps) => React__default.ReactElement; renderCode?: (props: RenderLeafProps) => React__default.ReactElement; renderSub?: (props: RenderLeafProps) => React__default.ReactElement; renderSup?: (props: RenderLeafProps) => React__default.ReactElement; renderLink?: (props: RenderLinkElementProps) => React__default.ReactElement; renderUL?: (props: RenderElementProps) => React__default.ReactElement; renderOL?: (props: RenderElementProps) => React__default.ReactElement; renderLI?: (props: RenderElementProps) => React__default.ReactElement; renderH1?: (props: RenderElementProps) => React__default.ReactElement; renderH2?: (props: RenderElementProps) => React__default.ReactElement; renderH3?: (props: RenderElementProps) => React__default.ReactElement; renderH4?: (props: RenderElementProps) => React__default.ReactElement; renderH5?: (props: RenderElementProps) => React__default.ReactElement; renderH6?: (props: RenderElementProps) => React__default.ReactElement; renderQuote?: (props: RenderElementProps) => React__default.ReactElement; } interface RichTextPropsWithPropName extends BaseRichTextProps { propName: string; value: Descendant[] | string; metaFieldName?: never; customFieldName?: never; customFieldPlainText?: never; } interface RichTextPropsWithMetaFieldName extends BaseRichTextProps { propName?: never; value?: never; metaFieldName: 'title' | 'description' | 'language'; customFieldName?: never; customFieldPlainText?: never; } interface RichTextPropsWithCustomFieldName extends BaseRichTextProps { propName?: never; value?: never; metaFieldName?: never; customFieldName: string; customFieldPlainText?: boolean; } /** * Props for RichText component */ type RichTextProps$1 = RichTextPropsWithPropName | RichTextPropsWithMetaFieldName | RichTextPropsWithCustomFieldName; declare const CompatibleRichText: React__default.FC; /** * Props for RichTextExt (v3) */ interface RichTextProps { renderBlock?: (props: RenderElementProps) => React.ReactElement; placeholder?: string; renderPlaceholder?: (props: { children: any; }) => React.ReactElement; plugins?: types.RichTextPlugin[]; multiline?: boolean; softLineBreak?: boolean; propName?: string; value?: Descendant[] | string; metaFieldName?: 'title' | 'description' | 'language'; customFieldName?: string; customFieldPlainText?: boolean; shouldRefreshStyles?: boolean; } declare const RichText: React.FC; /** * CustomElement for Slate */ type CustomElement = { type: string; element?: Element; children: CustomText[]; [key: string]: any; }; /** * CustomText for Slate */ type CustomText = { text?: string; [key: string]: any; }; declare module 'slate' { interface CustomTypes { Editor: BaseEditor & ReactEditor & HistoryEditor; Element: CustomElement; Text: CustomText; } } interface BaseTextProps { renderBlock?: (props: RenderElementProps) => React.ReactElement; placeholder?: string; renderPlaceholder?: (props: { children: any; }) => React.ReactElement; multiline?: boolean; softLineBreak?: boolean; } interface TextPropsWithPropName extends BaseTextProps { propName: string; value: Descendant[] | string; metaFieldName?: never; customFieldName?: never; } interface TextPropsWithMetaFieldName extends BaseTextProps { propName?: never; value?: never; metaFieldName: 'title' | 'description' | 'language'; customFieldName?: never; } interface TextPropsWithCustomFieldName extends BaseTextProps { propName?: never; value?: never; metaFieldName?: never; customFieldName: string; } /** * Props for Text component */ type TextProps = TextPropsWithPropName | TextPropsWithMetaFieldName | TextPropsWithCustomFieldName; declare const Text: React.FC; interface Form { id: string; name: string; } declare function fetchForms(fetchOptions?: types.FetchOptions): Promise; declare class ReactBricksAstroStore { static instance: any; private configListeners; private pageListeners; constructor(); register(config: types.ReactBricksConfig, force?: boolean): void; setPage(page: types.Page): void; setBlock(block: types.IContentBlock): void; setIsAdmin(isAdmin: boolean): void; setPathname(pathname: string): void; getConfig(): types.ReactBricksConfig; getBrick(block: types.IContentBlock): types.Brick | null; getBricks(): types.Bricks; getThemes(): types.Theme[]; getPage(): types.Page | undefined; getPageValues(): types.PageValues | null; getBlock(): types.IContentBlock | null; getBlockValue(propName: string): any | null; getPageType(page: types.Page): types.IPageType | undefined; getPathname(): string | undefined; isAdmin(): boolean; isRegistered(): boolean; mapConfig(config: types.ReactBricksConfig): { bricks: any; themes: types.Theme[]; }; __subscribeConfig(listener: () => void): () => void; __subscribePage(listener: () => void): () => void; private notifyConfigListeners; private notifyPageListeners; } declare const reactBricksAstroStore: ReactBricksAstroStore; declare const useAdminContext: () => types.IReadAdminContext; declare const usePageValues: () => [types.PageValues | null, (pageData: types.PartialPage) => void]; declare function useReactBricksContext(): any; declare const useVisualEdit: (propName: string) => [(value: any) => void, boolean]; declare const _default: { serialize: (nodes: Node[]) => string; serializeLight: (nodes: any[]) => string | any[]; deserialize: (input: string) => Descendant[]; isText: (value: any) => boolean; isSlateContent: (value: any) => boolean; }; interface SendFormSubmissionResult { success: boolean; statusCode: number; message: string; } declare const sendFormSubmission: ({ appId, appEnv, token, formId, emailAddress, data, fetchOptions, }: SendFormSubmissionParams) => Promise; declare const getBricks: () => types.Bricks; declare const getPageValues: () => types.PageValues | null; declare const getBlockValue: (propName: string) => any | null; declare const isAdmin: () => boolean; export { AstroBrick, ClickToEdit, File, IconViewer as Icon, Image, Link, ListAstro as List, PageWrapper, _default as Plain, Repeater, CompatibleRichText as RichText, RichText as RichTextExt, Text, fetchForms, getBlockValue, getBricks, getPageValues, isAdmin, reactBricksAstroStore, sendFormSubmission, types, useAdminContext, usePageValues, useReactBricksContext, useVisualEdit };