/** A content script mapped into the manifest's `content_scripts`. */ export declare interface ContentScript { entry: string out?: string matches: string[] runAt?: 'document_start' | 'document_end' | 'document_idle' world?: 'ISOLATED' | 'MAIN' allFrames?: boolean matchAboutBlank?: boolean excludeMatches?: string[] } /** * A declarativeNetRequest static ruleset. Either point `path` at a pre-built * JSON file, or give `source` — a module whose default export is a function (or * value) producing the rules array, which the build compiles to * `rules/.json`. */ export declare interface RuleResource { id: string path?: string enabled?: boolean source?: string } /** An extension page: an stx template + an optional companion script. */ export declare interface ExtensionPage { template: string script?: string } /** stx pages bundled to HTML (popup, options, …). A bare string = template only. */ export declare interface ExtensionPages { popup?: string | ExtensionPage options?: string | ExtensionPage extra?: Record } /** Overrides merged verbatim into the generated manifest, per target. */ export declare interface ManifestOverrides { permissions?: string[] hostPermissions?: string[] optionalPermissions?: string[] minimumChromeVersion?: string firefoxMinVersion?: string safariMinVersion?: string contentSecurityPolicy?: string webAccessibleResources?: Array<{ resources: string[], matches: string[] }> extra?: Record } /** Context passed to build hooks. */ export declare interface BuildContext { config: ExtensionConfig target: ExtensionTarget outdir: string version: string cwd: string } export declare interface ChromeWebStoreConfig { publisherId: string itemId: string publishType?: 'DEFAULT_PUBLISH' | 'STAGED_PUBLISH' deployPercentage?: number skipReview?: boolean } export declare interface FirefoxAddonsConfig { channel?: 'listed' | 'unlisted' license?: string categories?: string[] homepage?: string supportEmail?: string requiresPayment?: boolean artifactsDir?: string screenshots?: string[] screenshotCaptions?: string[] } export declare interface SafariAppStoreReviewContact { firstName: string lastName: string phone: string email: string notes?: string } /** App Store age-rating answers. Omitted answers default to no content. */ export declare interface SafariAppStoreAgeRating { advertising?: boolean alcoholTobaccoOrDrugUseOrReferences?: SafariAgeRatingFrequency contests?: SafariAgeRatingFrequency gambling?: boolean gamblingSimulated?: SafariAgeRatingFrequency gunsOrOtherWeapons?: SafariAgeRatingFrequency healthOrWellnessTopics?: boolean lootBox?: boolean medicalOrTreatmentInformation?: SafariAgeRatingFrequency messagingAndChat?: boolean parentalControls?: boolean profanityOrCrudeHumor?: SafariAgeRatingFrequency ageAssurance?: boolean sexualContentGraphicAndNudity?: SafariAgeRatingFrequency sexualContentOrNudity?: SafariAgeRatingFrequency socialMedia?: boolean socialMediaAgeRestricted?: boolean horrorOrFearThemes?: SafariAgeRatingFrequency matureOrSuggestiveThemes?: SafariAgeRatingFrequency unrestrictedWebAccess?: boolean userGeneratedContent?: boolean violenceCartoonOrFantasy?: SafariAgeRatingFrequency violenceRealisticProlongedGraphicOrSadistic?: SafariAgeRatingFrequency violenceRealistic?: SafariAgeRatingFrequency } /** Metadata and assets managed through the official App Store Connect API. */ export declare interface SafariAppStoreConfig { locale?: string subtitle: string privacyPolicyUrl: string description: string keywords: string supportUrl: string marketingUrl?: string promotionalText?: string whatsNew?: string copyright: string primaryCategory: string contentRightsDeclaration: 'DOES_NOT_USE_THIRD_PARTY_CONTENT' | 'USES_THIRD_PARTY_CONTENT' price: string baseTerritory?: string releaseType?: SafariAppStoreReleaseType availableInNewTerritories?: boolean usesIdfa?: boolean usesNonExemptEncryption?: boolean ageRating?: SafariAppStoreAgeRating reviewContact: SafariAppStoreReviewContact screenshots: Partial> submitForReview?: boolean } export declare interface ExtensionConfig { name: string description: string geckoId?: string chromeWebStore?: ChromeWebStoreConfig firefoxAddons?: FirefoxAddonsConfig safariBundleId?: string safariTeamId?: string safariPlatforms?: SafariPlatform[] safariAppCategory?: string safariAppStore?: SafariAppStoreConfig safariExclude?: string[] targets?: ExtensionTarget[] background?: string content?: ContentScript[] pages?: ExtensionPages icons?: Record actionIcons?: Record public?: string assets?: Record rules?: RuleResource[] manifest?: ManifestOverrides outdir?: Partial> | string hooks?: { postBuild?: (ctx: BuildContext) => void | Promise } } export declare interface BuildOptions { target?: ExtensionTarget version: string outdir?: string minify?: boolean cwd?: string } /** * Config-driven MV3 browser-extension types. * * A consuming app declares one `ExtensionConfig` (typically in * `config/extension.ts` via `defineExtension`) and the framework derives the * manifest, build graph, and packaging from it — no hand-written manifest.json * or per-project build script. */ export type ExtensionTarget = 'chrome' | 'firefox' | 'safari'; export type SafariPlatform = 'macos' | 'ios'; export type SafariScreenshotDisplayType = 'APP_DESKTOP' | 'APP_IPHONE_67' | 'APP_IPAD_PRO_3GEN_129'; export type SafariAppStoreReleaseType = 'MANUAL' | 'AFTER_APPROVAL' | 'SCHEDULED'; export type SafariAgeRatingFrequency = 'NONE' | 'INFREQUENT_OR_MILD' | 'FREQUENT_OR_INTENSE';