import { type Brand, type Schema } from 'effect'; import type { CleanupFn } from '@dxos/async'; import { inspectCustom } from '@dxos/debug'; import { type GenericSignal } from '@dxos/echo-signals/runtime'; import { ComplexMap } from '@dxos/util'; import { type AnyLiveObject } from './echo-handler'; import type { ObjectCore, KeyPath } from '../core-db'; import { type EchoDatabase } from '../proxy-db'; export declare const symbolPath: unique symbol; export declare const symbolNamespace: unique symbol; export declare const symbolHandler: unique symbol; export declare const symbolInternals: unique symbol; /** * For tracking proxy targets in the `targetsMap`. */ type TargetKey = { path: KeyPath; namespace: string; type: 'record' | 'array'; } & Brand.Brand<'TargetKey'>; export declare const TargetKey: { /** * Constructor function forces the order of the fields. */ new: (path: KeyPath, namespace: string, type: "record" | "array") => TargetKey; hash: (key: TargetKey) => string; }; /** * Internal state for the proxy ECHO object. * Shared for the entire ECHO object in the database (maybe be composed of multiple proxies for each subrecord). */ export declare class ObjectInternals { /** * Backing ECHO object core. */ core: ObjectCore; /** * Database. * Is set on object adding to database. */ database: EchoDatabase | undefined; /** * Signal for reactive updates to the object. */ signal: GenericSignal; /** * Caching targets based on key path. * Only used for records and arrays. */ targetsMap: ComplexMap; /** * Until object is persisted in the database, the linked object references are stored in this cache. * Set only when the object is not bound to a database. */ linkCache: Map> | undefined; subscriptions: CleanupFn[]; /** * Schema of the root object. * Only used if this is not bound to a database. */ rootSchema?: Schema.Schema.AnyNoContext; constructor(core: ObjectCore, database?: EchoDatabase); [inspectCustom]: () => string; } export {}; //# sourceMappingURL=echo-proxy-target.d.ts.map