import { PickedSource, RecipeContext, SourceShapes } from '../recipes'; import { FragItem } from '../frag-items'; /** The modeling engine's attribute names (its `element-attributes.ts`). */ export declare const ELEMENT_FIELD = "Element"; export declare const CARRIED_FIELD = "Carried"; /** Revit's internal length unit: where every position has to end up. */ export declare const FEET_PER_METRE: number; /** One semantic record, as saved: `params` carries the kind-specific fields. */ export interface OurRecord { id: string; kind: string; params: Record; /** The item it rode in (its guid is the publisher's id, when it has one). */ item: FragItem; } /** Every record of a read .frag: items' `Element` plus their `Carried` lists. */ export declare function recordsOf(items: FragItem[]): OurRecord[]; /** * A param the converter double-encodes (`params.run`, `params.member`, * `params.definition`... are JSON IN TEXT inside the record's JSON). */ export declare function innerJson(record: OurRecord, param: string): T | null; /** Level id (`datum:N`) -> its name, from the document's datum records. */ export declare function levelNames(records: OurRecord[]): Map; /** Level id -> name and elevation (metres), from the datum records. */ export declare function levelsOf(records: OurRecord[]): Map; /** Styles by name (`lookRef` points here): the record, for thickness hints. */ export declare function stylesOf(records: OurRecord[]): Map; /** * Source key -> the target's id of what this recipe made for it, and its * fingerprints (`flow:print`, what it was made from), as the target handed * them back ({@link RecipeContext.made}). The recipe keeps nothing of its own. */ export declare function whatItMadeBefore(context: { made: RecipeContext['made']; }, /** Filled, when given, with each source's last fingerprint. */ prints?: Map): Map; /** A short, stable fingerprint of what a change asks for (FNV-1a over its JSON, keys sorted). */ export declare function printOf(value: unknown): string; /** The project file the person picked as a recipe's source. */ export type PickedFile = PickedSource; /** * Downloads and reads the picked file, the version picked, with the errors a * person can act on. A .frag is read as it is; any other format (a raw IFC) * goes first through the importer the host provided for it * (`client.recipes.provideImporter`), so the person points the recipe at the * file they uploaded and nothing else. */ export declare function readPickedFrag(context: RecipeContext, picked: PickedFile | undefined): Promise<{ picked: PickedSource; contents: import('../frag-items').FragContents; site: SiteLocation | null; shapes: SourceShapes | null; }>; /** * Where an IFC's site stands in the coordinates it was written in: its origin * (metres) and the angle of its X axis (degrees, counter-clockwise). An IFC * Revit writes in shared coordinates places its site exactly at the source * model's shared location (racbasic: -19.82 m, -18.81 m, 37°), so a Revit * document that shares no coordinates yet can be given the same location and * receive the building square to its own axes. */ export interface SiteLocation { east: number; north: number; elevation: number; angleDeg: number; } /** Read from the IFC's text, with no IFC library: IFCSITE → its placement → its axis placement, in the file's length unit. */ export declare function siteLocationOf(bytes: Uint8Array): SiteLocation | null;