数通智联化工云平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.6 KiB

2 years ago
import { ComponentValue, ContainerNode } from '@csstools/css-parser-algorithms';
import { CSSToken } from '@csstools/css-tokenizer';
import { NodeType } from '../util/node-type';
export declare class MediaFeatureValue {
type: NodeType;
value: ComponentValue | Array<ComponentValue>;
before: Array<CSSToken>;
after: Array<CSSToken>;
constructor(value: ComponentValue | Array<ComponentValue>, before?: Array<CSSToken>, after?: Array<CSSToken>);
tokens(): Array<CSSToken>;
toString(): string;
indexOf(item: ComponentValue): number | string;
at(index: number | string): ComponentValue | Array<ComponentValue> | undefined;
2 years ago
walk<T extends Record<string, unknown>>(cb: (entry: {
2 years ago
node: MediaFeatureValueWalkerEntry;
parent: MediaFeatureValueWalkerParent;
2 years ago
state?: T;
}, index: number | string) => boolean | void, state?: T): false | undefined;
2 years ago
toJSON(): {
type: NodeType;
value: unknown;
tokens: CSSToken[];
};
isMediaFeatureValue(): this is MediaFeatureValue;
static isMediaFeatureValue(x: unknown): x is MediaFeatureValue;
}
2 years ago
export type MediaFeatureValueWalkerEntry = ComponentValue;
2 years ago
export type MediaFeatureValueWalkerParent = ContainerNode | MediaFeatureValue;
2 years ago
export declare function parseMediaFeatureValue(componentValues: Array<ComponentValue>, inRangeContext?: boolean): MediaFeatureValue | false;
2 years ago
export declare function matchesRatioExactly(componentValues: Array<ComponentValue>): number[] | -1;
export declare function matchesRatio(componentValues: Array<ComponentValue>): number[] | -1;