import { type Compilation, type Compiler } from '@rspack/core'; import { type EmittedCompilation } from '../../../lib/emitted-evidence.js'; import type { DevOptions, Manifest } from '../../../types.js'; import { type Range, type WebkitMissingApis } from '../manifest-lib/webkit-guarded-ranges.js'; import * as messages from '../messages.js'; declare const webkitUnsupportedApis: { readonly sidePanel: typeof messages.safariSidePanelUnsupported; readonly offscreen: typeof messages.safariOffscreenUnsupported; readonly tabGroups: typeof messages.safariTabGroupsUnsupported; readonly management: typeof messages.safariManagementUnsupported; readonly userScripts: typeof messages.safariUserScriptsUnsupported; readonly identity: typeof messages.safariIdentityUnsupported; readonly notifications: typeof messages.safariNotificationsUnsupported; readonly omnibox: typeof messages.safariOmniboxUnsupported; readonly bookmarks: typeof messages.safariBookmarksUnsupported; readonly history: typeof messages.safariHistoryUnsupported; readonly downloads: typeof messages.safariDownloadsUnsupported; readonly idle: typeof messages.safariIdleUnsupported; }; type WebkitUnsupportedApi = keyof typeof webkitUnsupportedApis; type GeckoUnsupportedApi = WebkitUnsupportedApi | 'action'; interface WebkitUnsupportedMember { api: string; member: string; kind: 'call' | 'read'; } export declare const webkitUnsupportedMembers: readonly [{ readonly api: 'action'; readonly member: 'getUserSettings'; readonly kind: 'call'; }, { readonly api: 'action'; readonly member: 'getBadgeTextColor'; readonly kind: 'call'; }, { readonly api: 'action'; readonly member: 'setBadgeTextColor'; readonly kind: 'call'; }, { readonly api: 'action'; readonly member: 'onUserSettingsChanged'; readonly kind: 'read'; }, { readonly api: 'storage'; readonly member: 'managed'; readonly kind: 'read'; }, { readonly api: 'runtime'; readonly member: 'getContexts'; readonly kind: 'call'; }, { readonly api: 'runtime'; readonly member: 'onSuspend'; readonly kind: 'read'; }, { readonly api: 'runtime'; readonly member: 'onSuspendCanceled'; readonly kind: 'read'; }, { readonly api: 'runtime'; readonly member: 'onUpdateAvailable'; readonly kind: 'read'; }, { readonly api: 'declarativeNetRequest'; readonly member: 'getAvailableStaticRuleCount'; readonly kind: 'call'; }, { readonly api: 'declarativeNetRequest'; readonly member: 'getDisabledRuleIds'; readonly kind: 'call'; }, { readonly api: 'declarativeNetRequest'; readonly member: 'updateStaticRules'; readonly kind: 'call'; }, { readonly api: 'declarativeNetRequest'; readonly member: 'testMatchOutcome'; readonly kind: 'call'; }, { readonly api: 'declarativeNetRequest'; readonly member: 'onRuleMatchedDebug'; readonly kind: 'read'; }, { readonly api: 'tabs'; readonly member: 'group'; readonly kind: 'call'; }, { readonly api: 'tabs'; readonly member: 'ungroup'; readonly kind: 'call'; }, { readonly api: 'webNavigation'; readonly member: 'onCreatedNavigationTarget'; readonly kind: 'read'; }, { readonly api: 'webNavigation'; readonly member: 'onHistoryStateUpdated'; readonly kind: 'read'; }, { readonly api: 'webNavigation'; readonly member: 'onReferenceFragmentUpdated'; readonly kind: 'read'; }, { readonly api: 'webNavigation'; readonly member: 'onTabReplaced'; readonly kind: 'read'; }, { readonly api: 'windows'; readonly member: 'onBoundsChanged'; readonly kind: 'read'; }]; type WebkitMemberApi = (typeof webkitUnsupportedMembers)[number]['api']; type UnsupportedApiName = GeckoUnsupportedApi | WebkitMemberApi; export declare const webkitMissingApis: WebkitMissingApis; interface GeckoPromiseOnlyMethod { api: 'action' | 'tabs'; member: string; max: number; soleCallback?: boolean; } export declare const geckoPromiseOnlyMethods: readonly [{ readonly api: 'action'; readonly member: 'setBadgeTextColor'; readonly max: 1; }, { readonly api: 'action'; readonly member: 'getBadgeTextColor'; readonly max: 1; }, { readonly api: 'action'; readonly member: 'isEnabled'; readonly max: 1; readonly soleCallback: true; }, { readonly api: 'action'; readonly member: 'openPopup'; readonly max: 1; readonly soleCallback: true; }, { readonly api: 'tabs'; readonly member: 'discard'; readonly max: 1; }, { readonly api: 'tabs'; readonly member: 'ungroup'; readonly max: 1; }]; export declare function callArgumentsAt(text: string, open: number): string[] | undefined; export declare function usesGeckoCallbackForm(source: string, entry: GeckoPromiseOnlyMethod): boolean; type UnsupportedApiEngine = 'gecko' | 'webkit'; interface GeckoUnsupportedApiUse { api: UnsupportedApiName; member?: string; file: string; emitted: boolean; } export declare function geckoUnsupportedApis(manifestVersion: unknown, engine?: UnsupportedApiEngine): GeckoUnsupportedApi[]; export declare function usesGeckoUnsupportedApi(source: string, api: GeckoUnsupportedApi, guarded?: Range[]): boolean; export declare function usesWebkitUnsupportedMember(source: string, entry: WebkitUnsupportedMember, guarded?: Range[]): boolean; interface ScannableModule { resource?: string; modules?: Iterable; rootModule?: ScannableModule; } export interface ScannableCompilation extends EmittedCompilation { modules: Iterable; } export declare function findGeckoUnsupportedApiUses(compilation: ScannableCompilation, manifestVersion: unknown, engine?: UnsupportedApiEngine, requireEmittedEvidence?: boolean): GeckoUnsupportedApiUse[]; export declare function relativeToProject(projectPath: string, file: string): string; export declare function reportGeckoUnsupportedApis(compilation: Compilation, compiler: Compiler, browser: DevOptions['browser'], manifest: Manifest, projectPath: string, reported?: Set): void; export {};