===== 5.3.0 ===== :right:`2024-08-06` .. highlight:: typescript .. rst-class:: release-notes BREAKING ======== .. code-block:: :caption: squared.base class Node { toFloat(attr: CssStyleAttr, fallback?: number, options?: CssInitialOptions): number; // Uses Node.valueOf without options toInt(attr: CssStyleAttr, fallback?: number, options?: CssInitialOptions): number; get plainText(): boolean; // Set in the constructor } class NodeUI { get plainText(): boolean; // Modifiable using NodeUI.setCacheState } .. code-block:: :caption: squared.lib :emphasize-lines: 4 /* client */ interface UserAgentData { name: "Chrome"; name: "Chrome" | "Chromium"; // getUserAgentData } /* regex */ const STRING: { CSS_COLOR_PROFILE: string; // capture group removed }; .. rst-class:: release-notes ADDED ===== .. code-block:: :caption: squared interface FileActionConfig { inherit?: boolean | "append" | "preserve" | { append?: boolean; preserve?: boolean; depth?: number }; dataSource?: DataSource | DataSource[]; } .. code-block:: :caption: squared.base interface ControllerSettingsStyleUI { inputFontSize?: string; buttonFontSize?: string; textareaFontSize?: string; selectFontSize?: string; h1FontSize?: string; h2FontSize?: string; h3FontSize?: string; h4FontSize?: string; h5FontSize?: string; h6FontSize?: string; rtFontSize?: string; } interface ExcludeOptions { optimization?: number; } interface AutoMargin { leftRightAnchor?: boolean; topBottomAnchor?: boolean; } interface HasOptions { inherit?: boolean; } interface HasUnitOptions { not?: string | string[]; } class Node { resetCache(): void; resetState(): void; get leftPos(): number; get rightPos(): number; get nowrapWhiteSpace(): boolean; } class NodeUI { static baselineElement(node: NodeUI): boolean; actualRect(position: PositionAttr, dimension?: BoxType): number; // abstract getPositionOffset(name: "sticky"): Point; hasFixedDimension(dimension: DimensionAttr): boolean; hasOptimization(value: number): boolean; get afterLineBreak(): boolean; get wordSpacing(): number; get locales(): string[] | null; } .. code-block:: :caption: squared.base.lib /* constant */ enum STAGE_OPTIMIZATION { EXCLUDE = 1, MERGE = 2, CONTAINER = 4, ALIGNMENT = 8, POSITION = 16, DIMENSION = 32, MARGIN = 64, PADDING = 128, BASELINE = 256, WHITESPACE = 512, TRANSLATE = 1024, TRANSFORM = 2048, SCALING = 4096 } /* dom */ function causesLineBreak(element: Element): boolean; .. code-block:: :caption: squared.lib /* client */ interface UserAgentFeatures { RULES: { ADOPTED_STYLE_SHEET: boolean; }; } /* color */ type ColorLAB = "lab" | "lch" | "oklab" | "oklch"; type ColorMethod = "rgb" | "hsl" | "hwb" | ColorLAB; type ColorSpaceRGB = "srgb" | "srgb-linear" | "display-p3" | "rec2020" | "a98-rgb" | "prophoto-rgb"; type ColorSpaceXYZ = "xyz" | "xyz-d65" | "xyz-d50"; type ColorCoords = ColorLAB | ColorSpaceRGB | ColorSpaceXYZ; type ColorCoordinates = [number, number, number]; interface ColorRGB { toString(alpha: number, precision?: number): string; toString(precision: 2 | 3 | 4 | 5 | 6 | 7 | 8): string; toString(name: ColorCoords | ColorMethod, precision: 2 | 3 | 4 | 5 | 6 | 7 | 8): string; toString(name?: ColorCoords | ColorMethod, alpha?: number, precision?: number): string; get lab(): ColorCoordinates; get lch(): ColorCoordinates; get oklab(): ColorCoordinates; get oklch(): ColorCoordinates; get srgb: ColorCoordinates; get "srgb-linear"(): ColorCoordinates; get xyz: ColorCoordinates; get "xyz-d50"(): ColorCoordinates; get "xyz-d65"(): ColorCoordinates; get "display-p3"(): ColorCoordinates; get rec2020(): ColorCoordinates; get "a98-rgb"(): ColorCoordinates; get "prophoto-rgb"(): ColorCoordinates; } function formatCoords(name: string, values: ColorCoordinates, alpha?: number, precision?: number): string; function fromRGB(value: RGB | HSL | HWB, opacity?: number): ColorRGB; function fromCoords(name: string, values: ColorCoordinates, alpha?: number, precision?: number): ColorRGB | null; function setPrecision(value: number): void; /* css */ function roundPx(value: number, min?: number, precision?: number): string; /* dom */ interface BoxRectDimension { columns?: Dimension[] | null; // getRangeClientRect } /* regex */ const STRING: { CSS_COLOR_INTERPOLATION: string; }; .. code-block:: :caption: android.base interface ExtensionComposeViewElement { selector?: string; android?: Record; app?: Record; tools?: Record; } .. code-block:: :caption: android.lib.constant const LAYOUT_RELATIVE: string[]; const LAYOUT_CONSTRAINT: string[]; .. code-block:: :caption: chrome.base interface RequestData { log?: { showDiff?: string[] }; } interface DocumentOutput { removeBinaries?: boolean; } interface FileActionAttribute { saveAs?: { video?: SaveAsOptions; audio?: SaveAsOptions; raw?: SaveAsOptions; }; } .. rst-class:: release-notes CHANGED ======= .. code-block:: :caption: squared function toString(projectId?: string): string; // projectId .. code-block:: :caption: squared.base interface HasOptions { type?: number; // CSS_UNIT.DECIMAL | CSS_UNIT.INTEGER } interface CacheStateUI { plainText?: boolean; // Relocated from CacheState firstLineStyle?: CssStyleMap | null; firstLetterStyle?: CssStyleMap | null; flowChildren?: NodeUI[]; extensions?: string[]; causesLineBreak?: boolean; // Relocated from CacheValueUI } class Node { get dir(): TextDirection; // "ltr" | "rtl" | "" } class NodeUI { renderEach(predicate: IteratorPredicate): this; // true } .. code-block:: :caption: squared.lib.color interface ColorRGB { get scheme(): "light" | "dark" | ""; // readonly set scheme(value); } interface ColorSpace { out?: string | ColorCoordinates | null; // ColorCoordinates } function convertHSLA(value: RGB, opacity?: number): HSLA; // opacity function convertHWBA(value: RGB, opacity?: number): HWBA; function convertRGBA(value: HSL | HWB, opacity?: number): RGBA; function intoRGB(value: ColorSpace): RGB | [ColorCoords, ColorCoordinates] | null; // [ColorCoords, ColorCoordinates] function intoRelativeRGB(method: string, relative: ColorRGB, r: string, g: string, b: string, profile?: string): RGB | [ColorCoords, ColorCoordinates] | null; .. code-block:: :caption: android.base interface ExtensionComposeViewElement { selector?: string; android?: Record; app?: Record; tools?: Record; } interface View { setLayoutPercent(value: number | string, horizontal?: boolean, includeMargin?: boolean): void; // includeMargin } .. rst-class:: release-notes DEPRECATED ========== .. code-block:: :caption: squared.base interface ControllerSettingsStyleUI { formFontSize: string; } class ApplicationUI { get layouts(): FileAsset[]; // ApplicationUI.getProject().layouts } .. code-block:: :caption: squared.base.lib.regex const CSS: { ANGLE_G: RegExp; // Delete BACKGROUNDIMAGE_G: RegExp; // Delete }; const DOM: { ENTITY_G: RegExp; // Renaming to ENTITY AMPERSAND_G: RegExp; // Delete }; .. code-block:: :caption: squared.lib /* color */ interface ColorRGB { get rgbaAsString(): string; // toString("rgb", 1) get hslaAsString(): string; // toString("hsl", 1) get rgbAsString(): string; // toString() get hslAsString(): string; // toString("hsl") get hwbAsString(): string; // toString("hwb") } function formatRGBA(value: RGB, precision?: number): string; // formatRGB function formatHSLA(value: HSL, precision?: number): string; // formatHSL /* css */ function formatPX(value: number): string; // roundPx /* error */ const FRAMEWORK_NOT_INSTALLED: string; // squared.lib.internal.MESSAGE const SERVER_REQUIRED: string; const DIRECTORY_NOT_PROVIDED: string; const UNABLE_TO_FINALIZE_DOCUMENT: string; const INVALID_ASSET_REQUEST: string; const OPERATION_NOT_SUPPORTED: string; const ELEMENT_NOT_FOUND: string; const CSS_CANNOT_BE_PARSED: string; /* regex */ const CSS: { HWBA: RegExp; // Renaming to HWB SELECTOR_G: RegExp; // Renaming to SELECTOR }; .. code-block:: :caption: android.lib.constant const LAYOUT_ALIGNMENT: string[]; // LAYOUT_RELATIVE const LAYOUT_ALIGNMENT_APP: string[]; // LAYOUT_CONSTRAINT