import { a as DefaultWorkspaceSchemaId, c as StoredWorkspaceSchema, i as CreateWorkspaceManifest, l as StudioManifest, n as CoreAppManifest, o as ManifestSchemaType, r as CreateManifest, s as SANITY_WORKSPACE_SCHEMA_ID_PREFIX, t as CURRENT_WORKSPACE_SCHEMA_VERSION, u as WorkspaceSchemaId } from "./types-Dj4qu4gT.js";
import { Schema } from "@sanity/types";
import { Workspace } from "sanity";
interface ExtractCoreAppManifestOptions {
  workDir: string;
}
/**
 * The title change a deploy would sync from the manifest to the user
 * application, or null when the titles already match (or none is set).
 *
 * @internal
 */
declare function resolveTitleUpdate(manifest: CoreAppManifest | undefined, application: {
  title: string | null;
}): {
  from: string | null;
  to: string;
} | null;
/**
 * Resolves app.icon from config (a file path) to a sanitized SVG string. Used
 * both for the manifest and, on deploy, for the icon shipped to Brett — the
 * manifest expects the SVG inline, not a path.
 *
 * The file is sanitized through the same allowlist as the studio manifest's
 * icon resolver (see {@link lazySanitizeIcon}) so both manifest paths inline the
 * same trusted subset of SVG markup.
 * @internal
 */
declare function readIconFromPath(workDir: string, iconPath: string): Promise<string>;
/**
 * Unlike studio manifest extraction, skips schema/tool parsing. The config's
 * `app.icon` is a file path; its content is read and inlined in the manifest.
 */
declare function extractCoreAppManifest(options: ExtractCoreAppManifestOptions): Promise<CoreAppManifest | undefined>;
declare const MANIFEST_FILENAME = "create-manifest.json";
interface WriteManifestFileOptions {
  /**
   * Target directory for the manifest files. May be absolute or relative — relative
   * paths are resolved against `workDir`.
   */
  outPath: string;
  /**
   * Studio root directory. Used to resolve a relative `outPath` and to look up the
   * local `sanity` package version that gets stamped onto the manifest.
   */
  workDir: string;
  /** Extracted workspace manifests to serialize alongside the top-level manifest. */
  workspaceManifests: CreateWorkspaceManifest[];
}
declare function writeManifestFile({ outPath, workDir, workspaceManifests }: WriteManifestFileOptions): Promise<void>;
interface ExtractManifestOptions extends Pick<WriteManifestFileOptions, 'outPath' | 'workDir'> {
  /** Absolute path to the studio's `sanity.config.(ts|js)` entry file. */
  path: string;
  applicationId?: string;
}
declare function extractManifest({ applicationId, outPath, path, workDir }: ExtractManifestOptions): Promise<void>;
/**
 * Extracts manifest data from an array of workspaces
 */
declare function extractWorkspaceManifest(workspaces: Workspace[], workDir: string): Promise<CreateWorkspaceManifest[]>;
/**
 * Extracts all serializable properties from userland schema types,
 * so they best-effort can be used as definitions for Schema.compile.
 *
 * @internal
 */
declare function extractManifestSchemaTypes(schema: Schema, workDir: string): Promise<ManifestSchemaType[]>;
export { CURRENT_WORKSPACE_SCHEMA_VERSION, type CoreAppManifest, type CreateManifest, type CreateWorkspaceManifest, type DefaultWorkspaceSchemaId, MANIFEST_FILENAME, type ManifestSchemaType, SANITY_WORKSPACE_SCHEMA_ID_PREFIX, type StoredWorkspaceSchema, type StudioManifest, type WorkspaceSchemaId, extractCoreAppManifest, extractManifest, extractManifestSchemaTypes, extractWorkspaceManifest, readIconFromPath, resolveTitleUpdate, writeManifestFile };
//# sourceMappingURL=manifest.d.ts.map