import { SlideLayout, ContentBlock, AccentColorKey } from '@mulmocast/deck'; /** Accent color tokens accepted by every layout / block in the deck schema. */ export declare const ACCENT_COLORS: AccentColorKey[]; export declare const TEXT_SIZES: readonly ["lead", "big", "sub"]; export declare const BULLET_ICONS: readonly ["ok", "no", "warn"]; export declare const SLIDE_DENSITIES: readonly ["compact", "default"]; export declare const SLIDE_TITLE_SIZES: readonly ["small", "default", "large", "hero"]; export declare const SLIDE_SUBTITLE_SIZES: readonly ["default", "lead", "big"]; export declare const VALIGNS: readonly ["top", "center", "bottom"]; export declare const ALIGNS: readonly ["left", "center", "right"]; export declare const CALLOUT_STYLES: readonly ["quote", "info", "warning"]; /** Every SlideLayout `layout` value in the order we expose in the picker. */ export declare const LAYOUT_TYPES: SlideLayout["layout"][]; /** Every content block `type` value. */ export declare const BLOCK_TYPES: ContentBlock["type"][]; /** Structured-clone replacement that works for the plain-data slide objects. */ /** * A value the deck can render as a slide. * * `layout` is the axis every consumer switches on — `makeSlide`, the Inspector's layout * picker, and the renderer itself — so it is what decides whether a value read out of a beat * is a slide. A beat under edit can carry anything in `image.slide`, and the answer for those * has to be "no" rather than a crash. */ export declare const isSlideLayout: (value: unknown) => value is SlideLayout; export declare const clone: (x: T) => T; /** Return a sensible default skeleton for a new content block of the given type. */ export declare const makeBlock: (type: ContentBlock["type"]) => ContentBlock; /** Return a skeleton SlideLayout for a fresh slide of the given layout type. */ export declare const makeSlide: (layout: SlideLayout["layout"]) => SlideLayout; /** Mutate the given array in place: move element at `from` by `delta` (clamped). */ export declare const moveInArray: (arr: T[], from: number, delta: number) => T[]; /** * Parse a deck path like `columns[0].content[1].items[0].text` into an array of * string-or-number segments. Returns null if the path doesn't match the expected grammar. */ export declare const parsePath: (path: string) => (string | number)[] | null; /** * Deep-set `slide.` to `value`, returning a structurally-cloned object so reactivity fires. * Walks the path, copying each object/array level it touches; leaves untouched siblings shared. */ export declare const setByPath: (root: T, path: string, value: unknown) => T; /** * Split an item path like `columns[0].content[1].items[2]` into: * { parent: "columns[0].content[1].items", index: 2 } * Returns null if the path doesn't end in `[n]` (i.e. not an array item). */ export declare const splitItemPath: (path: string) => { parent: string; index: number; } | null; /** * Move an array element inside a SlideLayout by from-path → to-path. Both paths must point * at items in the same parent array (e.g. `stats[0]` and `stats[2]`). Returns a new SlideLayout * or the original ref if the paths don't share a parent / aren't valid. */ export declare const moveByPath: (root: T, fromPath: string, toPath: string) => T; /** Deep-get `slide.`. Returns undefined if anything along the way is missing. */ export declare const getByPath: (root: unknown, path: string) => T | undefined; /** * Convert an editable element's innerHTML back into deck inline-markup syntax. Pure / DOM-free * so it can be unit-tested under `node:test`. Honors: * / → **bold** * / → *emphasis* * → {X:text} (X ∈ INLINE_COLOR_KEYS) *
→ newline * Other tags are stripped to their text content. * * Implementation note: a recursive innermost-first regex replacement is fine here because the * input only comes from contenteditable + our own programmatic wrappers — well-formed and * shallow nesting (a handful of layers, never user-authored markup). It avoids needing jsdom. */ export declare const htmlToMarkup: (html: string) => string;