import { z } from "zod/mini";
/** @internal */
declare const VIEW_CONTRACT_VERSION = 1;
/** @internal */
declare const SERVICE_CONTRACT_VERSION = 1;
/**
 * A view component. The return is opaque so the runtime helpers carry no React
 * dependency — the generated artifact renders it with the app's own React.
 * @public
 */
type ViewComponent<TProps> = (props: TProps) => unknown;
/** @public */
interface ViewComponentBaseProps<TView> {
  view: TView;
}
/** Component slots per view surface; windows load outside the component artifact path. @internal */
declare const VIEW_COMPONENTS: {
  readonly asset_source: readonly ["asset_source"];
  readonly panel: readonly ["title", "panel"];
  readonly tile: readonly ["tile"];
  readonly window: readonly [];
};
/** @public */
type ViewSurface = keyof typeof VIEW_COMPONENTS;
/**
 * A tile's footprint family — the shape it occupies on the dashboard. Modelled
 * on iOS WidgetKit families, not a linear scale: `banner` is full-width and
 * shallow, which a `small`→`large` magnitude can't express. The host maps a
 * family to a layout slot; the component reads it to render per footprint.
 * @public
 */
declare const TileSizeSchema: z.ZodMiniEnum<{
  small: "small";
  large: "large";
  banner: "banner";
}>;
/** @public */
type TileSize = z.infer<typeof TileSizeSchema>;
/** @public */
type ServiceType = 'worker';
declare const DockGroupSchema: z.ZodMiniEnum<{
  system: "system";
  applications: "applications";
  user: "user";
}>;
/** @public */
type DockGroup = z.output<typeof DockGroupSchema>;
declare const PanelViewSchema: z.ZodMiniObject<{
  dock: z.ZodMiniOptional<z.ZodMiniObject<{
    group: z.ZodMiniOptional<z.ZodMiniEnum<{
      system: "system";
      applications: "applications";
      user: "user";
    }>>;
    order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
  }, z.core.$strip>>;
  title: z.ZodMiniString<string>;
  name: z.ZodMiniString<string>;
  src: z.ZodMiniString<string>;
  surface: z.ZodMiniLiteral<"panel">;
}, z.core.$strip>;
/** @public */
type PanelView = z.output<typeof PanelViewSchema>;
/** @public */
type DefinePanelViewInput = Omit<PanelView, 'surface'>;
/** @public */
declare function definePanelView(view: DefinePanelViewInput): PanelView;
declare const WindowViewSchema: z.ZodMiniObject<{
  dock: z.ZodMiniOptional<z.ZodMiniObject<{
    group: z.ZodMiniOptional<z.ZodMiniEnum<{
      system: "system";
      applications: "applications";
      user: "user";
    }>>;
    order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
  }, z.core.$strip>>;
  title: z.ZodMiniString<string>;
  name: z.ZodMiniString<string>;
  src: z.ZodMiniString<string>;
  surface: z.ZodMiniLiteral<"window">;
}, z.core.$strip>;
/** @public */
type WindowView = z.output<typeof WindowViewSchema>;
/** @public */
type DefineWindowViewInput = Omit<WindowView, 'surface'>;
/** @public */
declare function defineWindowView(view: DefineWindowViewInput): WindowView;
declare const AssetSourceViewSchema: z.ZodMiniObject<{
  title: z.ZodMiniString<string>;
  name: z.ZodMiniString<string>;
  src: z.ZodMiniString<string>;
  surface: z.ZodMiniLiteral<"asset_source">;
}, z.core.$strip>;
/** @public */
type AssetSourceView = z.output<typeof AssetSourceViewSchema>;
/** @public */
type DefineAssetSourceViewInput = Omit<AssetSourceView, 'surface'>;
/** @public */
declare function defineAssetSourceView(view: DefineAssetSourceViewInput): AssetSourceView;
declare const TileViewSchema: z.ZodMiniObject<{
  order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
  size: z.ZodMiniEnum<{
    small: "small";
    large: "large";
    banner: "banner";
  }>;
  title: z.ZodMiniString<string>;
  name: z.ZodMiniString<string>;
  src: z.ZodMiniString<string>;
  surface: z.ZodMiniLiteral<"tile">;
}, z.core.$strip>;
/** @public */
type TileView = z.output<typeof TileViewSchema>;
/** @public */
type DefineTileViewInput = Omit<TileView, 'surface'>;
/** @public */
declare function defineTileView(view: DefineTileViewInput): TileView;
/** @internal */
declare const InterfaceDeclarationSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
  dock: z.ZodMiniOptional<z.ZodMiniObject<{
    group: z.ZodMiniOptional<z.ZodMiniEnum<{
      system: "system";
      applications: "applications";
      user: "user";
    }>>;
    order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
  }, z.core.$strip>>;
  title: z.ZodMiniString<string>;
  name: z.ZodMiniString<string>;
  src: z.ZodMiniString<string>;
  surface: z.ZodMiniLiteral<"window">;
}, z.core.$strip>, z.ZodMiniObject<{
  dock: z.ZodMiniOptional<z.ZodMiniObject<{
    group: z.ZodMiniOptional<z.ZodMiniEnum<{
      system: "system";
      applications: "applications";
      user: "user";
    }>>;
    order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
  }, z.core.$strip>>;
  title: z.ZodMiniString<string>;
  name: z.ZodMiniString<string>;
  src: z.ZodMiniString<string>;
  surface: z.ZodMiniLiteral<"panel">;
}, z.core.$strip>, z.ZodMiniObject<{
  title: z.ZodMiniString<string>;
  name: z.ZodMiniString<string>;
  src: z.ZodMiniString<string>;
  surface: z.ZodMiniLiteral<"asset_source">;
}, z.core.$strip>, z.ZodMiniObject<{
  order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
  size: z.ZodMiniEnum<{
    small: "small";
    large: "large";
    banner: "banner";
  }>;
  title: z.ZodMiniString<string>;
  name: z.ZodMiniString<string>;
  src: z.ZodMiniString<string>;
  surface: z.ZodMiniLiteral<"tile">;
}, z.core.$strip>], "surface">;
/** @public */
type ViewDeclaration = z.output<typeof InterfaceDeclarationSchema>;
declare const WebWorkerSchema: z.ZodMiniObject<{
  title: z.ZodMiniString<string>;
  name: z.ZodMiniString<string>;
  src: z.ZodMiniString<string>;
  type: z.ZodMiniLiteral<"worker">;
}, z.core.$strip>;
/** @public */
type WebWorker = z.output<typeof WebWorkerSchema>;
/** @public */
type DefineWebWorkerInput = Omit<WebWorker, 'type'>;
/** @public */
declare function defineWebWorker(webWorker: DefineWebWorkerInput): WebWorker;
/**
 * A workbench config's built value, keyed by `appType`; deploys as a versioned
 * snapshot, not an interface.
 * @internal
 */
declare const ConfigSchema: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
  appType: z.ZodMiniLiteral<"media-library">;
  fields: z.ZodMiniArray<z.ZodMiniObject<{
    public: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
    title: z.ZodMiniString<string>;
    name: z.ZodMiniString<string>;
    src: z.ZodMiniString<string>;
  }, z.core.$strip>>;
}, z.core.$strip>], "appType">;
/**
 * The `{appType, fields}` config value the build expands into a federation
 * remote and the deploy summarizes.
 * @internal
 */
type WorkbenchConfigValue = z.output<typeof ConfigSchema>;
/**
 * Runtime-validation schema for `defineApplication`.
 * @internal
 */
declare const DefineAppInputSchema: z.ZodMiniObject<{
  applicationType: z.ZodMiniOptional<z.ZodMiniEnum<{
    coreApp: "coreApp";
    studio: "studio";
    canvas: "canvas";
    dashboard: "dashboard";
  }>>;
  dock: z.ZodMiniOptional<z.ZodMiniObject<{
    group: z.ZodMiniOptional<z.ZodMiniEnum<{
      system: "system";
      applications: "applications";
      user: "user";
    }>>;
    order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
  }, z.core.$strip>>;
  entry: z.ZodMiniOptional<z.ZodMiniString<string>>;
  icon: z.ZodMiniOptional<z.ZodMiniString<string>>;
  isSingleton: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
  name: z.ZodMiniOptional<z.ZodMiniString<string>>;
  organizationId: z.ZodMiniString<string>;
  slug: z.ZodMiniString<string>;
  title: z.ZodMiniString<string>;
  views: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
    dock: z.ZodMiniOptional<z.ZodMiniObject<{
      group: z.ZodMiniOptional<z.ZodMiniEnum<{
        system: "system";
        applications: "applications";
        user: "user";
      }>>;
      order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
    }, z.core.$strip>>;
    title: z.ZodMiniString<string>;
    name: z.ZodMiniString<string>;
    src: z.ZodMiniString<string>;
    surface: z.ZodMiniLiteral<"window">;
  }, z.core.$strip>, z.ZodMiniObject<{
    dock: z.ZodMiniOptional<z.ZodMiniObject<{
      group: z.ZodMiniOptional<z.ZodMiniEnum<{
        system: "system";
        applications: "applications";
        user: "user";
      }>>;
      order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
    }, z.core.$strip>>;
    title: z.ZodMiniString<string>;
    name: z.ZodMiniString<string>;
    src: z.ZodMiniString<string>;
    surface: z.ZodMiniLiteral<"panel">;
  }, z.core.$strip>, z.ZodMiniObject<{
    title: z.ZodMiniString<string>;
    name: z.ZodMiniString<string>;
    src: z.ZodMiniString<string>;
    surface: z.ZodMiniLiteral<"asset_source">;
  }, z.core.$strip>, z.ZodMiniObject<{
    order: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
    size: z.ZodMiniEnum<{
      small: "small";
      large: "large";
      banner: "banner";
    }>;
    title: z.ZodMiniString<string>;
    name: z.ZodMiniString<string>;
    src: z.ZodMiniString<string>;
    surface: z.ZodMiniLiteral<"tile">;
  }, z.core.$strip>], "surface">>>;
  visibility: z.ZodMiniOptional<z.ZodMiniEnum<{
    default: "default";
    unlisted: "unlisted";
    disabled: "disabled";
  }>>;
  webWorkers: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
    title: z.ZodMiniString<string>;
    name: z.ZodMiniString<string>;
    src: z.ZodMiniString<string>;
    type: z.ZodMiniLiteral<"worker">;
  }, z.core.$strip>], "type">>>;
}, z.core.$strip>;
/**
 * User-facing input for `defineApplication`. Excludes the internal
 * `applicationType` and `isSingleton`.
 * @public
 */
type DefineAppInput = Omit<z.output<typeof DefineAppInputSchema>, 'applicationType' | 'isSingleton'>;
/**
 * Nominal brand the CLI discriminates on to enable the workbench build/deploy
 * codepath. Registered via `Symbol.for` so the marker survives module-realm
 * boundaries — `@sanity/cli-core` re-derives the same global symbol with
 * `Symbol.for` rather than importing it, so it stays internal to this module.
 */
declare const WORKBENCH_APP: unique symbol;
/**
 * The branded result of `defineApplication`. Carries the same fields as the
 * input plus the internal brand — users only ever see `DefineAppInput`.
 * @public
 */
type DefineAppResult = DefineAppInput & {
  readonly [WORKBENCH_APP]: true;
};
/**
 * A branded app as the CLI reads it — the full schema shape, including the
 * internal fields `DefineAppInput` omits. Schema-derived so the narrowing
 * can't drift from what the schema validates.
 * @public
 */
type WorkbenchApp = DefineAppResult & z.output<typeof DefineAppInputSchema>;
/**
 * Whether `app` is a branded `defineApplication(...)` result — the sole
 * workbench opt-in.
 * @public
 */
declare function isWorkbenchApp(app: unknown): app is WorkbenchApp;
/**
 * Declare a Sanity Dashboard application. Identity at runtime — returns the same
 * object reference, tagged with the Dashboard brand. Field validation (the
 * `slug` pattern etc.) runs at build time in the CLI via `DefineAppInputSchema`;
 * this helper stays a thin, pure identity wrapper.
 * @public
 */
declare function defineApplication(input: DefineAppInput): DefineAppResult;
/**
 * One custom field a media library exposes. `src` default-exports a `defineField(...)` schema type.
 * @public
 */
interface MediaLibraryField {
  /** Unique within the media library. */
  name: string;
  src: string;
  title: string;
  /** Readable outside the owning organization. */
  public?: boolean;
}
/**
 * Sanity-owned singleton, so authors don't name or title the app — only `organizationId` is required.
 * @public
 */
interface DefineMediaLibraryInput {
  /** Organization that owns the media library — the CLI runs and deploys against it. */
  organizationId: string;
  fields?: MediaLibraryField[];
}
/**
 * Nominal brand the CLI discriminates a config on. A config is *not* an app: it
 * carries no `slug`/`title`/application identity, only a target `appType`, its
 * owning `organizationId`, and its `fields`. Registered via `Symbol.for` so the
 * marker survives module-realm boundaries — `@sanity/cli-core` re-derives the
 * same global symbol rather than importing it.
 */
declare const WORKBENCH_CONFIG: unique symbol;
/**
 * A branded workbench config as the CLI reads it: bound to its target app by
 * `appType`, not carrying its own app identity. The deploy/undeploy/build paths
 * discriminate it via {@link isWorkbenchConfig}.
 * @public
 */
interface WorkbenchConfig {
  appType: 'media-library';
  fields: MediaLibraryField[];
  organizationId: string;
  readonly [WORKBENCH_CONFIG]: true;
}
/**
 * Whether `app` is a branded `unstable_defineMediaLibrary(...)` config — a
 * config-carrier rather than an app. Configs live in `cliConfig.app` alongside
 * apps but resolve through `resolveWorkbenchConfig`, not `resolveWorkbenchApp`.
 * @public
 */
declare function isWorkbenchConfig(app: unknown): app is WorkbenchConfig;
/**
 * Declare the Sanity Media Library config. The Media Library is a Sanity-owned
 * singleton, so this is not an app — it carries no slug or title, only the
 * target `appType`, its owning organization, and the `fields` it contributes to
 * the installation's config.
 * @public
 */
declare function unstable_defineMediaLibrary(input: DefineMediaLibraryInput): WorkbenchConfig;
export { WorkbenchConfigValue as A, VIEW_CONTRACT_VERSION as C, ViewSurface as D, ViewDeclaration as E, defineWindowView as F, definePanelView as M, defineTileView as N, WebWorker as O, defineWebWorker as P, TileView as S, ViewComponentBaseProps as T, DockGroup as _, WorkbenchApp as a, ServiceType as b, isWorkbenchApp as c, AssetSourceView as d, DefineAssetSourceViewInput as f, DefineWindowViewInput as g, DefineWebWorkerInput as h, MediaLibraryField as i, defineAssetSourceView as j, WindowView as k, isWorkbenchConfig as l, DefineTileViewInput as m, DefineAppResult as n, WorkbenchConfig as o, DefinePanelViewInput as p, DefineMediaLibraryInput as r, defineApplication as s, DefineAppInput as t, unstable_defineMediaLibrary as u, PanelView as v, ViewComponent as w, TileSize as x, SERVICE_CONTRACT_VERSION as y };
//# sourceMappingURL=defineApp-DOJE2kjo.d.ts.map