import * as Taffy from "taffy-js"; import { Errata } from "./enums.js"; /** * Configuration for the Yoga-like layout engine wrapper. * Manages the global TaffyTree instance and experimental feature settings. */ export declare class Config { private _tree; private _errata; /** * Creates a new configuration instance. * Initializes a new TaffyTree for layout computations. */ constructor(); /** * Factory method to create a new Config instance. * @returns A new Config instance. */ static create(): Config; /** * Destroys the given Config instance, freeing associated resources. * @param config - The config to destroy. */ static destroy(config: Config): void; /** * Frees the underlying TaffyTree resources. * Should be called when the Config is no longer needed to prevent memory leaks in WASM. */ free(): void; /** * Accessor for the underlying TaffyTree instance. * @internal */ get tree(): Taffy.TaffyTree; private _useWebDefaults; /** * Sets whether an experimental feature is enabled. * @param feature - The feature ID (enum). * @param enabled - Whether to enable the feature. */ setExperimentalFeatureEnabled(feature: number, enabled: boolean): void; /** * Sets the point scale factor for logical-to-physical pixel conversion. * @param pixelsInPoint - The scale factor. */ setPointScaleFactor(pixelsInPoint: number): void; /** * Checks if using web defaults (e.g. Flex direction Row). * @returns True if using web defaults, false otherwise (classic Yoga defaults). */ useWebDefaults(): boolean; /** * Enables or disables web standard defaults. * If true, flex-direction defaults to Row. If false, defaults to Column (Yoga standard). * @param useWebDefaults - Whether to use web defaults. */ setUseWebDefaults(useWebDefaults: boolean): void; /** * Checks if an experimental feature is enabled. * @param feature - The feature ID. * @returns True if enabled, false otherwise. */ isExperimentalFeatureEnabled(feature: number): boolean; /** * Sets the Errata compatibility flags. * @param errata - The bitmask of errata to enable. */ setErrata(errata: Errata): void; /** * Gets the current Errata compatibility flags. * @returns The current errata bitmask. */ getErrata(): Errata; }