import { IRChild } from '@retikz/core'; import { ExternalRow } from '@retikz/data'; import { AnyMarkDefinition, CoordinateFrame, FieldCollector, IntervalContext, MarkChannels, MarkLoweringContext } from '../../contract'; import { IRPlotMark, IRPlotMarkOperation, PlotMarkValue } from '../../schemas'; /** * mark lowering 行为注册表:每个内置 mark 对应一个注册项(lowerMark 按 type 查表分发)。 * @description 对齐仓库已有 composite / coordinate 工厂注册范式;新增内置 mark = 加一条注册项,不改 lowerMark。 * Plot mark schema 仍是静态单一真源,不由此表组装 */ export declare const MARK_REGISTRY: Record; /** 内置 mark definition 列表;主要供诊断与测试确认内置覆盖。自定义 definition 不写入此表,而是在每次 lowering 时合并 */ export declare const BUILTIN_MARKS: ReadonlyArray; /** * 解析 mark registry。 * @description 内置 mark 总是先注册;用户自定义 definition 不能覆盖内置 type,也不能彼此重复 */ export declare const resolveMarkRegistry: (custom?: ReadonlyArray) => Map; /** 通过匹配的 mark definition 收集图元引用的源字段 */ export declare const collectMarkFields: (mark: IRPlotMarkOperation, fields: FieldCollector, registry?: ReadonlyMap) => void; /** 返回匹配 mark definition 声明的可消费通道类型 */ export declare const channelKindsForMark: (mark: IRPlotMarkOperation, registry?: ReadonlyMap) => ReturnType> | undefined; /** * 解析 datum 锚点:cell 类 mark 通过 definition.buildCell 取逻辑 cell,其余内置 mark 走 role 投影。 * @description registry 层负责查 definition,shared 层只提供纯投影 helper,避免 shared 反向依赖 interval feature */ export declare const datumAnchor: (mark: IRPlotMark, row: ExternalRow, frame: CoordinateFrame, ctx?: IntervalContext, registry?: ReadonlyMap) => [number, number] | null; /** * 把一个 mark + 数据行下沉成一个图层 Scope(按 mark type 查 registry 分发)。 * @description **原则:尽可能用 Scope 承载共享信息,把每个 Node / Path 压到最小,以减小生成的 core IR 体积。** * color 编码时按颜色分子 Scope;series 把记录拆成多系列(多线 / 分组 / 堆叠柱)。无可绘制图元返回 null。 * markProvenance 给定(provenance 开)→ 给图层 / series Path / datum Node 绑 id + 来源 meta */ export declare const lowerMark: (mark: IRPlotMarkOperation, rows: Array, frame: CoordinateFrame, channels?: MarkChannels, markContext?: MarkLoweringContext, registry?: ReadonlyMap) => IRChild | null; //# sourceMappingURL=registry.d.ts.map