| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- import { DisplayObject } from '../display-objects';
- import type { BaseStyleProps } from '../types';
- import type { CSSStyleValue } from './cssom';
- import type { PropertyMetadata, PropertyParseOptions, StyleValueRegistry } from './interfaces';
- export type CSSGlobalKeywords = 'unset' | 'initial' | 'inherit' | '';
- /**
- * Blink used them in code generation(css_properties.json5)
- */
- export declare const BUILT_IN_PROPERTIES: PropertyMetadata[];
- export declare const propertyMetadataCache: Record<string, PropertyMetadata>;
- export declare class DefaultStyleValueRegistry implements StyleValueRegistry {
- /**
- * need recalc later
- */
- constructor();
- registerMetadata(metadata: PropertyMetadata): void;
- unregisterMetadata(name: string): void;
- getPropertySyntax(syntax: string): any;
- /**
- * * parse value, eg.
- * fill: 'red' => CSSRGB
- * translateX: '10px' => CSSUnitValue { unit: 'px', value: 10 }
- * fontSize: '2em' => { unit: 'px', value: 32 }
- *
- * * calculate used value
- * * post process
- */
- processProperties(object: DisplayObject, attributes: BaseStyleProps, options?: Partial<PropertyParseOptions>): void;
- /**
- * string -> parsed value
- */
- parseProperty(name: string, value: any, object: DisplayObject): CSSStyleValue;
- /**
- * computed value -> used value
- */
- computeProperty(name: string, computed: CSSStyleValue, object: DisplayObject): any;
- postProcessProperty(name: string, object: DisplayObject, attributes: string[]): void;
- /**
- * resolve later
- */
- addUnresolveProperty(object: DisplayObject, name: string): void;
- tryToResolveProperty(object: DisplayObject, name: string, options?: {
- inherited?: boolean;
- }): any;
- recalc(object: DisplayObject): void;
- /**
- * update geometry when relative props changed,
- * eg. r of Circle, width/height of Rect
- */
- private updateGeometry;
- private isPropertyInheritable;
- }
- //# sourceMappingURL=StyleValueRegistry.d.ts.map
|