/** * Pure enumeration of `MutablePropertyView.getEffectiveChanges()` (issue * #1915), extracted out of `mutable-property-view.ts` to keep that file from * growing further past the ~400-line module-split guideline (AGENTS.md). * * `collectEffectiveChanges` takes a narrow, explicitly-typed snapshot of the * overlay maps/sets it needs plus a small set of resolver callbacks — never * the view instance itself — so it stays a pure function, independently * testable, and the view's private state stays private (the view passes a * `Readonly`-wrapped view of its own maps at call time). */ import type { PropertySet, QuantitySet } from '@ifc-lite/data'; import type { AttributeMutation, EffectiveChange, EntityTypeMutation, IfcAttributeValue, NewEntity, PropertyMutation, QuantityMutation } from './types.js'; /** Base-value extractor for an entity attribute — see `MutablePropertyView.setAttributeExtractor`. */ export type AttributeExtractor = (entityId: number, attrName: string) => string | null; /** * Narrow, read-only view of the overlay state `collectEffectiveChanges` reads. * Mirrors the corresponding private fields on `MutablePropertyView` exactly — * the view passes its own maps/sets directly (they satisfy these `Readonly*` * types structurally), so no copying is required per call. */ export interface EffectiveChangesSnapshot { attributeMutations: ReadonlyMap; positionalAttrMutations: ReadonlyMap>; typeMutations: ReadonlyMap; newPsets: ReadonlyMap>; deletedPsets: ReadonlySet; newQsets: ReadonlyMap>; deletedQsets: ReadonlySet; propertyKeysByEntity: ReadonlyMap>; propertyMutations: ReadonlyMap; quantityKeysByEntity: ReadonlyMap>; quantityMutations: ReadonlyMap; newEntities: ReadonlyMap; tombstones: ReadonlySet; /** * Ids `createEntity` allocated and `deleteEntity` then forgot (removed from * `newEntities` rather than tombstoning — see `MutablePropertyView.deleteEntity`). * These ids never appear in `newEntities` or `tombstones`, so without this * set the filter below cannot tell "overlay-created then forgotten" apart * from "an ordinary source-buffer entity" — both are simply absent from * `newEntities`. Any row whose `entityId` is in this set is dropped * entirely: the entity never existed as far as the export is concerned, so * unlike a tombstoned entity there is no `entity-deleted` row to keep. */ forgottenCreatedEntities: ReadonlySet; } /** Base-data resolvers `collectEffectiveChanges` needs for `previousValue`. */ export interface EffectiveChangesResolvers { /** Registered via `setAttributeExtractor`, or `null` if none was set. */ attributeExtractor: AttributeExtractor | null; /** `MutablePropertyView.resolveBaseEntityId` — follows duplicate aliases. */ resolveBaseEntityId: (entityId: number) => number; /** `MutablePropertyView`'s private `getBasePropertiesForEntity`. */ getBasePropertiesForEntity: (entityId: number) => PropertySet[]; /** `MutablePropertyView`'s private `getBaseQuantitiesForEntity`. */ getBaseQuantitiesForEntity: (entityId: number) => QuantitySet[]; } export declare function collectEffectiveChanges(snapshot: EffectiveChangesSnapshot, resolvers: EffectiveChangesResolvers): EffectiveChange[]; //# sourceMappingURL=effective-changes.d.ts.map