import { ExecutionEnvironment } from './api/index.js'; import 'apprt-core/Types'; type ORIENTATION = "landscape" | "portrait"; interface EnvironmentRuleMatcher { /** * Gets index of first matching rule. * @param {Array} rules array of rules * @returns -1 if none match. */ indexOfFirstMatching(rules: EnvironmentRule[]): number; /** * Gets first matching rule or undefined. * @param {Array} rules array of rules */ firstMatching(rules: EnvironmentRule[]): EnvironmentRule | undefined; /** * Matches exactly one EnvironmentRule. * @param {Object} rule a rule * @returns {boolean} true if rule matches. */ matches(rule: EnvironmentRule): boolean; } interface EnvironmentRule { [key: string]: unknown; requiredExecutionEnvironment?: string[]; excludedExecutionEnvironment?: string[]; orientation?: ORIENTATION; minWidth?: number; maxWidth?: number; minHeight?: number; maxHeight?: number; } /** * Creates a rule matcher. * * @constructs * @param opts.size the size with w and h properties * @param opts.env the ExecutionEnvironment */ declare function createEnvironmentRuleMatcher(opts: { env: ExecutionEnvironment; size: { w: number; h: number; }; }): EnvironmentRuleMatcher; export { createEnvironmentRuleMatcher as default }; export type { EnvironmentRuleMatcher, ORIENTATION };