import type { ElementalContent } from "@/types/elemental.types"; import type { VariableValidationConfig } from "@/types/validation.types"; import type { Editor } from "@tiptap/react"; export declare const subjectAtom: import("jotai").PrimitiveAtom & { init: string | null; }; export declare const EMAIL_DEFAULT_BACKGROUND_COLOR = "#F5F5F5"; export declare const EMAIL_DEFAULT_CONTENT_BODY_COLOR = "#ffffff"; export declare const emailBackgroundColorAtom: import("jotai").PrimitiveAtom & { init: string; }; export declare const emailContentBodyColorAtom: import("jotai").PrimitiveAtom & { init: string; }; export declare const emailFontFamilyAtom: import("jotai").PrimitiveAtom & { init: string; }; /** * Document-level body padding the renderer falls back to when the email channel * node has no `padding` of its own. The Frame control seeds its inputs from * these so what it shows is what gets sent. * * Both come from the `line` email template, the default for every template * authored here. Horizontal is the `mj-section` gutter in its `head.hbs`. * Vertical is less obvious: `line` has no single padding declaration, it emits * a 20px top column (`header.hbs`) and a 20px bottom spacer (`footer.hbs`) on * the no-logo/no-footer-content path — which is what a template without a brand * always takes. Hence 20, not 0. */ export declare const EMAIL_DEFAULT_PADDING_VERTICAL = 20; export declare const EMAIL_DEFAULT_PADDING_HORIZONTAL = 30; /** * Base text metrics the renderer falls back to when the email channel node has * no `font_size` / `line_height`. Same purpose as the padding defaults above: * the Text control seeds its inputs from these so it shows the spacing the email * will actually have rather than sitting empty. * * These are the renderer's *elemental* plain-text values (`text` in the * backend's `courier-email-text-style` helper), which is the tier the document * base applies to — headings and subtext keep their own sizes. They match * `EMAIL_EDITOR_TEXT_STYLES.p`, which is what the canvas renders with when the * properties are unset; keep all three in step. */ export declare const EMAIL_DEFAULT_FONT_SIZE = 14; export declare const EMAIL_DEFAULT_LINE_HEIGHT = 18; /** * Document-level email styles. `null` means "not set on the channel node", i.e. * the renderer's own default applies; the properties are only written to * Elemental once the author changes them. */ export declare const emailPaddingAtom: import("jotai").PrimitiveAtom & { init: string | null; }; export declare const emailFontSizeAtom: import("jotai").PrimitiveAtom & { init: number | null; }; export declare const emailLineHeightAtom: import("jotai").PrimitiveAtom & { init: number | null; }; export type ContentTransformer = (content: ElementalContent) => ElementalContent; export declare const contentTransformerAtom: import("jotai").PrimitiveAtom & { init: ContentTransformer | null; }; export declare const templateEditorContentAtom: import("jotai").WritableAtom; export declare const templateEditorPublishedAtAtom: import("jotai").PrimitiveAtom & { init: string | null | undefined; }; export declare const templateEditorVersionAtom: import("jotai").PrimitiveAtom & { init: string | null | undefined; }; export declare const templateEditorAtom: import("jotai").PrimitiveAtom & { init: Editor | null; }; export declare const brandEditorAtom: import("jotai").PrimitiveAtom & { init: Editor | null; }; export declare const isTemplateTransitioningAtom: import("jotai").PrimitiveAtom & { init: boolean; }; export declare const isSidebarExpandedAtom: import("jotai").PrimitiveAtom & { init: boolean; }; export declare const variableValuesAtom: import("jotai").PrimitiveAtom> & { init: Record; }; export declare const variablesEnabledAtom: import("jotai").PrimitiveAtom & { init: boolean; }; export declare const linkTrackingEnabledAtom: import("jotai").PrimitiveAtom & { init: boolean; }; export declare const emailFormattingEnabledAtom: import("jotai").PrimitiveAtom & { init: boolean; }; export declare const previewPanelEnabledAtom: import("jotai").PrimitiveAtom & { init: boolean; }; export declare const availableVariablesAtom: import("jotai").PrimitiveAtom> & { init: Record; }; export declare const disableVariablesAutocompleteAtom: import("jotai").PrimitiveAtom & { init: boolean; }; export declare const variableValidationAtom: import("jotai").PrimitiveAtom & { init: VariableValidationConfig | undefined; }; export declare const sampleDataAtom: import("jotai").PrimitiveAtom | undefined> & { init: Record | undefined; }; export type VariableViewMode = "show-variables" | "wysiwyg"; export declare const readOnlyAtom: import("jotai").PrimitiveAtom & { init: boolean; }; export declare const isDraggingAtom: import("jotai").PrimitiveAtom & { init: boolean; }; /** * Increments or decrements the form updating counter. * When true, increments the counter (starting an update). * When false, decrements the counter (ending an update). */ export declare const setFormUpdating: (value: boolean) => void; /** * Returns true if any form update is in progress (counter > 0) */ export declare const getFormUpdating: () => boolean; /** * Resets the form updating counter to 0 (for cleanup/testing) */ export declare const resetFormUpdating: () => void; export declare const pendingAutoSaveAtom: import("jotai").PrimitiveAtom & { init: ElementalContent | null; }; export declare const lastSavedContentAtom: import("jotai").PrimitiveAtom & { init: string | null; }; export type FlushFunction = () => void; export declare const flushFunctionsAtom: import("jotai").WritableAtom, [update: { action: "register" | "unregister"; id: string; fn?: FlushFunction; }], void>; export declare const flushAllPendingUpdates: (flushFunctions: Map) => void; /** * Available block element types that can be used in the sidebar */ export type BlockElementType = "heading" | "text" | "image" | "spacer" | "divider" | "button" | "customCode" | "column" | "blockquote" | "list"; /** * Attributes that can be set as defaults or in presets for blocks. * Types match the actual TipTap node attribute types for each extension. */ export interface BlockAttributes { /** Background color (string, e.g., "#ffffff" or "transparent") */ backgroundColor?: string; /** Border color */ borderColor?: string; /** Border width in pixels */ borderWidth?: number; /** Border radius in pixels */ borderRadius?: number; /** Vertical padding in pixels */ paddingVertical?: number; /** Horizontal padding in pixels */ paddingHorizontal?: number; /** Text alignment */ textAlign?: "left" | "center" | "right" | "justify"; /** Button label text */ label?: string; /** Button link URL */ link?: string; /** Button alignment */ alignment?: "left" | "center" | "right"; /** Button padding in pixels */ padding?: number; /** Font weight */ fontWeight?: "normal" | "bold"; /** Font style */ fontStyle?: "normal" | "italic"; /** Underline text */ isUnderline?: boolean; /** Strikethrough text */ isStrike?: boolean; /** @deprecated Text color - legacy property */ textColor?: string; /** Divider color */ color?: string; /** Divider line thickness in pixels */ size?: number; /** Divider corner radius */ radius?: number; /** Divider variant type */ variant?: "divider" | "spacer"; /** Image source path/URL */ sourcePath?: string; /** Image alt text */ alt?: string; /** Image width as ratio (0-1, where 1 = 100%) */ width?: number; /** HTML code content */ code?: string; /** Number of columns (1-4) */ columnsCount?: number; /** Left border width for blockquote */ borderLeftWidth?: number; [key: string]: unknown; } /** * A block preset is a pre-configured variant of an existing block type. * For example, a "Portal Button" preset is a button with specific href and label. */ export interface BlockPreset { /** The base block type this preset is built on */ type: BlockElementType; /** Unique identifier for this preset */ key: string; /** Display label in the sidebar */ label: string; /** Optional custom icon (React node) */ icon?: React.ReactNode; /** Pre-configured attributes for this preset */ attributes: BlockAttributes; } /** * A reference to a preset in the visible blocks list */ export interface PresetReference { /** The base block type */ type: BlockElementType; /** The preset key */ preset: string; } /** * A visible block item can be either: * - A built-in block type string (e.g., "text", "button") * - A preset reference (e.g., { type: "button", preset: "portal" }) */ export type VisibleBlockItem = BlockElementType | PresetReference; /** * Type guard to check if a VisibleBlockItem is a PresetReference */ export declare const isPresetReference: (item: VisibleBlockItem) => item is PresetReference; /** * Default block elements available in the sidebar */ export declare const DEFAULT_VISIBLE_BLOCKS: VisibleBlockItem[]; /** * Atom to store visible blocks in the sidebar (and their order) */ export declare const visibleBlocksAtom: import("jotai").PrimitiveAtom & { init: VisibleBlockItem[]; }; /** * Atom to store default attributes for each block type * When a new block is created, these defaults are applied */ export declare const blockDefaultsAtom: import("jotai").PrimitiveAtom>> & { init: Partial>; }; /** * Atom to store registered block presets */ export declare const blockPresetsAtom: import("jotai").PrimitiveAtom & { init: BlockPreset[]; }; /** * Locale code for preview rendering. * When set, channel content memos apply locale translations before conversion. */ export declare const previewLocaleAtom: import("jotai").PrimitiveAtom & { init: string | undefined; };