import type { ManifestMetafieldDefinition } from './provision.js'; import type { MetafieldType } from './types.js'; /** * The manifest-descriptor projection — what the storefront `` * component knows about the active theme's DECLARED fields, independently of * what the DB currently holds. Keyed `owner.namespace.key`. * * Why it exists: the customer-audience GraphQL response cannot distinguish * "unset" from "hidden" from "not defined yet" (hidden/undefined fields are * simply absent), so without the declaration a `visibleToCustomer: false` * field's `value ?? defaultValue` would render its default PUBLICLY — the * opposite of the privacy rule. The projection also carries the declared * type (mismatch guard) and `appearance.placeholder` (the single default * source, Decision 5 of the theme-metafields design). */ export interface ProjectedDescriptor { type: MetafieldType; isList?: boolean; visibleToCustomer: boolean; name: string; description?: string; placeholder?: string; } export type MetafieldProjection = Record; /** Pure: manifest entries → projection map. Exported for tests. */ export declare function buildProjection(entries: ManifestMetafieldDefinition[]): MetafieldProjection; /** * Read the active theme's manifest synchronously and build the projection. * Sync on purpose: the delivery seam is the `appConfig` registry processor, * and `getValueSync` rejects Promise-valued processors — so the projection is * computed once at bootstrap and merely merged per request. The theme is * fixed for the process lifetime; a manifest edit needs a restart anyway * (dev watch restarts, and boot-time provisioning re-reads it too). * Never throws — a broken manifest must not break rendering. */ export declare function loadThemeMetafieldProjection(): MetafieldProjection;