import type { Rolldown } from 'vite'; import type { VptOptions } from '../../../../options.ts'; import type { MiniJsonObject, MiniNativeComponentRegistration, MiniPage } from '../mini-contract.ts'; /** Component-selection input accepted by each pinned native template implementation. */ export type SkeletonTemplateComponentConfig = { includes: Set; exclude: Set; thirdPartyComponents: Map>; includeAll: boolean; }; /** Native registrations shared by Page, recursive-component, and CustomWrapper configuration. */ export type SkeletonNativeComponentConfig = { usingComponents: Record; componentPlaceholder: Record; }; /** Creates application configuration with generated package declarations appended by the target skeleton. */ export declare function createSkeletonAppJson(options: VptOptions, subpackages: readonly MiniJsonObject[]): MiniJsonObject; /** Creates a Page config while preserving caller fields and registering every generated rendering boundary. */ export declare function createSkeletonPageJson(page: MiniPage, nativeComponents: SkeletonNativeComponentConfig): MiniJsonObject; /** Creates the recursive component config shared by comp and CustomWrapper. */ export declare function createRecursiveComponentJson(nativeComponents: SkeletonNativeComponentConfig): MiniJsonObject; /** Creates native registrations and asynchronous-package placeholders from discovered component interfaces. */ export declare function createNativeComponentConfig(nativeComponents: readonly MiniNativeComponentRegistration[]): SkeletonNativeComponentConfig; /** Collects reachable host exports and native JSX fields for one native template implementation. */ export declare function collectTemplateComponentConfig(bundle: Rolldown.OutputBundle, componentsModulePath: string, nativeComponents: readonly MiniNativeComponentRegistration[]): SkeletonTemplateComponentConfig; /** Creates compact production JSON and readable development JSON. */ export declare function createJsonAsset(fileName: string, value: MiniJsonObject, isProduction: boolean): Rolldown.EmittedAsset; /** Creates one emitted text asset. */ export declare function createTextAsset(fileName: string, source: string): Rolldown.EmittedAsset; /** Replaces one pinned upstream fragment and rejects absent or duplicated source contracts. */ export declare function replaceExactlyOnce(source: string, current: string, replacement: string, description: string): string; /** Creates a Page-relative path to a file emitted at the Mini Program output root. */ export declare function toRootRelativePath(pagePath: string, rootFileName: string): string;