import type { PixelImageProfile } from './index.js'; export declare const ISLAND_SPEC_MAX_BYTES: number; export declare const ISLAND_MAX_ELEMENTS = 500; export declare const ISLAND_MAX_DEPTH = 12; export declare const ISLAND_FLOW_MAX_ELEMENTS = 2000; export declare const ISLAND_RICHTEXT_MAX_LENGTH = 20000; export declare const ISLAND_TEXT_MAX_LENGTH = 2000; export declare const ISLAND_IMAGE_LIST_MAX_ITEMS = 50; export declare const ISLAND_IMAGE_LIST_MAX_ITEMS_LIMIT = 200; export declare const COLLECTION_IMAGE_LIST_MAX_ITEMS = 500; export declare const COLLECTION_IMAGE_LIST_MAX_ITEMS_LIMIT = 1000; export declare const ISLAND_DEFAULT_SLOT = "default"; export interface IslandElement { type: string; props: Record; children: string[]; slots?: Record; } export interface IslandSpec { root: string; elements: Record; } export type IslandJSONSchema = { [keyword: string]: unknown; }; export type IslandPixelKind = 'image-ref' | 'image-list' | 'richtext' | 'link' | 'date' | 'datetime' | 'entry-ref'; export declare const ISLAND_RICHTEXT_FORMATS: readonly ["bold", "italic", "underline", "strike", "code", "link", "h2", "h3", "h4", "h5", "h6", "ul", "ol", "blockquote"]; export type IslandRichTextFormat = (typeof ISLAND_RICHTEXT_FORMATS)[number]; export declare const ISLAND_RICHTEXT_FORMAT_TAGS: Readonly>; export interface PixelManifestSlot { name: string; label: string; allow?: string[]; min?: number; max?: number; } export interface PixelManifestComponent { label: string; description?: string; icon?: string; explicitOnly?: boolean; deprecated?: boolean; props: IslandJSONSchema; slots: PixelManifestSlot[]; } export interface PixelManifestAllowRule { props?: string[]; fixed?: Record; } export interface PixelManifestIslandLimits { maxElements?: number; maxDepth?: number; } export interface PixelManifestIslandFlow { text: string; } export interface PixelManifestIsland { id: string; page: string; label: string; comment?: string; root: string; allow?: Record; flow?: PixelManifestIslandFlow; limits?: PixelManifestIslandLimits; default: IslandSpec; preview?: 'island' | 'page'; imageProfile?: string; } export type PixelManifestComponents = Record; export interface PixelManifestCollectionIsland extends Omit { primary?: boolean; } export interface PixelManifestCollectionNesting { maxDepth: number; } export interface PixelManifestCollectionSort { by: string[]; default: string; } export interface PixelManifestCollection { id: string; label: string; entryLabel: { singular: string; plural: string; }; icon?: string; comment?: string; path: string; nesting?: PixelManifestCollectionNesting; imageProfile?: string; main?: string; fields: IslandJSONSchema; summary: string[]; sort: PixelManifestCollectionSort; filters: string[]; islands: PixelManifestCollectionIsland[]; limits?: { maxEntries?: number; }; } export interface PixelManifestIslandSections { components: PixelManifestComponents; islands: PixelManifestIsland[]; collections?: PixelManifestCollection[]; imageProfiles?: PixelImageProfile[]; } export type IslandMode = 'draft' | 'publish'; export type IslandIssueCode = 'unsupported_key' | 'missing_element' | 'duplicate_reference' | 'invalid_reference' | 'unknown_component' | 'not_allowed' | 'no_slot' | 'slot_max' | 'max_depth' | 'max_elements' | 'orphan' | 'invalid_props' | 'unknown_prop' | 'not_editable' | 'expression' | 'invalid_value' | 'missing_required' | 'slot_min'; export interface IslandIssue { code: IslandIssueCode; element?: string; type?: string; prop?: string; key?: string; parent?: string; slot?: string; nested?: number; detail?: string; } export type IslandSpecError = 'invalid_shape' | 'root_mismatch' | 'root_incomplete'; export type IslandNormalizeResult = { ok: true; spec: IslandSpec; issues: IslandIssue[]; count: number; } | { ok: false; error: IslandSpecError; issues: IslandIssue[]; }; export type IslandValueChecker = (value: unknown, schema: IslandJSONSchema, context: { component: string; prop: string; }) => string | null; export interface IslandNormalizeOptions { mode: IslandMode; images?: ReadonlySet | null; entries?: ReadonlySet | null; checkValue?: IslandValueChecker; } export interface IslandRules { components: PixelManifestComponents; island: Pick; } export declare function normalizeIslandSpec(input: unknown, rules: IslandRules, options: IslandNormalizeOptions): IslandNormalizeResult; export type IslandPropValueResult = { ok: true; value: unknown; } | { ok: false; reason: string; }; export declare function checkIslandPropValue(value: unknown, schema: IslandJSONSchema, options: Pick, context: { component: string; prop: string; }): string | null; export declare function islandPropValue(value: unknown, schema: IslandJSONSchema, options: Pick, context: { component: string; prop: string; }): IslandPropValueResult; export declare function imageListShapeProblem(value: unknown, schema: IslandJSONSchema): string | null; export declare function effectiveIslandLimits(island: Pick): { maxElements: number; maxDepth: number; }; export declare function islandAllowsAll(island: Pick): boolean; export declare function islandAllows(island: Pick, type: string): boolean; export declare function islandAllowRule(island: Pick, type: string): PixelManifestAllowRule | null; export declare function isEditableProp(rule: PixelManifestAllowRule, prop: string): boolean; export declare function allowedInSlot(components: PixelManifestComponents, island: Pick, slot: PixelManifestSlot, type: string): boolean; export declare function requiredProps(component: PixelManifestComponent): string[]; export declare function islandPixelKind(schema: IslandJSONSchema): IslandPixelKind | null; export declare function islandImageProfile(schema: IslandJSONSchema): string | null; export declare function islandRichTextFormats(schema: IslandJSONSchema): IslandRichTextFormat[] | null; export declare function islandFlowTextProp(component: PixelManifestComponent): string | null; export declare function isEmptyRichText(html: string): boolean; export declare function isIslandDate(value: string): boolean; export declare function isIslandDateTime(value: string): boolean; export declare function isSafeLinkHref(href: string): boolean; export declare function isBlankValue(value: unknown): boolean; export declare function hasExpression(value: unknown): boolean; export declare function slotList(element: IslandElement, slot: string): string[]; export declare function setSlotList(element: IslandElement, slot: string, keys: string[]): void; export declare function checkJSONSchemaValue(value: unknown, schema: IslandJSONSchema, path?: string): string | null; export declare function jsonEqual(a: unknown, b: unknown): boolean;