/** * Re-export auto-generated feature map types. * The FeatureMap type is generated from src/features/*.js files. * Run `npm run build-types` to regenerate, or it runs automatically on build. * * @typedef {import('./types/feature-map').FeatureMap} FeatureMap * @typedef {import('./types/feature-map').FeatureName} FeatureName */ // Features must exist in either `baseFeatures` or `otherFeatures` export const baseFeatures = /** @type {FeatureName[]} */ ([ 'fingerprintingAudio', 'fingerprintingBattery', 'fingerprintingCanvas', 'googleRejected', 'gpc', 'fingerprintingHardware', 'referrer', 'fingerprintingScreenSize', 'fingerprintingTemporaryStorage', 'navigatorInterface', 'elementHiding', 'exceptionHandler', 'apiManipulation', ]); const otherFeatures = /** @type {FeatureName[]} */ ([ 'clickToLoad', 'contextMenu', 'cookie', 'messageBridge', 'duckPlayer', 'duckPlayerNative', 'duckAiDataClearing', 'duckAiChatHistory', 'harmfulApis', 'webCompat', 'webDetection', 'webEvents', 'webInterferenceDetection', 'windowsPermissionUsage', 'uaChBrands', 'brokerProtection', 'performanceMetrics', 'breakageReporting', 'autofillImport', 'favicon', 'webTelemetry', 'pageContext', 'print', 'pageObserver', 'hover', 'browserUiLock', ]); /** @type {Record} */ export const platformSupport = { apple: ['webCompat', 'duckPlayerNative', ...baseFeatures, 'pageContext', 'print'], 'apple-isolated': [ 'contextMenu', 'duckPlayer', 'duckPlayerNative', 'brokerProtection', 'breakageReporting', 'performanceMetrics', 'clickToLoad', 'messageBridge', 'favicon', 'webDetection', 'webEvents', 'webInterferenceDetection', 'pageObserver', 'hover', ], 'apple-ai-clear': ['duckAiDataClearing'], 'apple-ai-history': ['duckAiChatHistory'], android: [ ...baseFeatures, 'webCompat', 'webDetection', 'webEvents', 'webInterferenceDetection', 'breakageReporting', 'duckPlayer', 'messageBridge', 'pageContext', 'browserUiLock', ], 'android-broker-protection': ['brokerProtection'], 'android-ai-clear': ['duckAiDataClearing'], 'android-ai-history': ['duckAiChatHistory'], 'android-autofill-import': ['autofillImport'], 'android-adsjs': [ 'apiManipulation', 'webCompat', 'fingerprintingHardware', 'fingerprintingScreenSize', 'fingerprintingTemporaryStorage', 'fingerprintingAudio', 'fingerprintingBattery', 'gpc', 'webDetection', 'webEvents', 'breakageReporting', ], windows: [ 'cookie', ...baseFeatures, 'webDetection', 'webEvents', 'webInterferenceDetection', 'webTelemetry', 'windowsPermissionUsage', 'uaChBrands', 'duckPlayer', 'brokerProtection', 'breakageReporting', 'messageBridge', 'webCompat', 'pageContext', 'duckAiDataClearing', 'performanceMetrics', 'duckAiChatHistory', ], firefox: ['cookie', ...baseFeatures, 'clickToLoad', 'webDetection', 'webEvents', 'webInterferenceDetection', 'breakageReporting'], chrome: ['cookie', ...baseFeatures, 'clickToLoad', 'webDetection', 'webEvents', 'webInterferenceDetection', 'breakageReporting'], 'chrome-mv3': ['cookie', ...baseFeatures, 'clickToLoad', 'webDetection', 'webEvents', 'webInterferenceDetection', 'breakageReporting'], integration: [...baseFeatures, ...otherFeatures], };