export type FeatureId = string | number; export interface SourceSnapshot { readonly version: number; readonly features: readonly TFeature[]; } /** Fine-grained mutation without a version (used inside `batch` payloads). */ export type FeatureSourceDelta = { readonly type: "add"; readonly features: readonly TFeature[]; } | { readonly type: "update"; readonly features: readonly TFeature[]; } | { readonly type: "remove"; readonly ids: readonly FeatureId[]; }; export type FeatureSourceChange = { readonly type: "add"; readonly features: readonly TFeature[]; readonly version: number; } | { readonly type: "update"; readonly features: readonly TFeature[]; readonly version: number; } | { readonly type: "remove"; readonly ids: readonly FeatureId[]; readonly version: number; } | { readonly type: "batch"; readonly version: number; readonly changes: readonly FeatureSourceDelta[]; } | { readonly type: "reset"; readonly version: number; }; export type FeatureSourceListener = (change: FeatureSourceChange) => void; /** Read-only structural protocol consumed by renderer layers. */ export interface ReadonlyFeatureSource { getSnapshot(): SourceSnapshot; subscribe(listener: FeatureSourceListener): () => void; } //# sourceMappingURL=source-types.d.ts.map