import { type Evaluator, type Scope } from '@cloudpss/expression'; import type { Model, ModelGraphic, ModelId } from '../index.js'; import type { PinConnectionType } from '../pin.js'; import { type ArgumentMap } from '@cloudpss/expression/definitions'; /** 保持垂直居中对齐的偏移量,em */ export declare const TEXT_Y_OFFSET = 0.35; /** 从垂直居中对齐调整至顶端或底端对齐的偏移量,em */ export declare const TEXT_X_HEIGHT = 0.4; /** 生成引脚的前缀,使用 `ɵ` 以避免被 {@link fillPinMap} 删除 */ export declare const MERGE_DEMERGE_PIN_PREFIX = "\u0275id-"; /** * 分离合并元件的信息 */ export interface MergeDemergeComponent { /** * 元件的主要侧,包含唯一引脚,如合并元件的输出侧,分离元件的输入侧 */ /** 主要侧引脚的键名 */ primaryKey: string; /** 主要侧引脚名称参数名 */ primaryName: string; /** 主要侧引脚方向 */ primaryDir: 'left' | 'right'; /** 主要侧引脚 Dim X 参数名 */ primaryDimX: string; /** 主要侧引脚 Dim Y 参数名 */ primaryDimY: string; /** 主要侧引脚类型 */ primaryConnection: PinConnectionType; /** * 元件的次要侧,包含多个引脚,如合并元件的输入侧,分离元件的输出侧 */ /** 次要侧引脚方向 */ secondaryDir: 'left' | 'right'; /** 次要侧引脚类型 */ secondaryConnection: PinConnectionType; /** 次要侧引脚数组参数名 */ secondaryArgs: string; /** 次要侧显示引脚箭头 path */ secondaryArrow?: boolean; /** 元件图形 */ graphic: () => ModelGraphic; /** 引脚图形长度 */ pinLength: number; } /** * 分离合并元件的信息 */ export declare const MERGE_DEMERGE_COMPONENTS: Record; /** * 是否为分离合并元件 */ export declare function isMergeDemergeModel(model: T | null | undefined): model is T; /** 次要侧引脚 ID 属性名 */ export declare const SECONDARY_ARG_ID = "\u0275id"; /** 次要侧引脚参数 */ export type SecondaryArg = { /** 引脚 Key */ [SECONDARY_ARG_ID]: number; /** 引脚名称 */ 0: string; /** 引脚起始 X 位置 */ 1: number; /** 引脚起始 Y 位置 */ 2: number; /** 引脚 Dim X */ 3: number; /** 引脚 Dim Y */ 4: number; }; /** * 生成分离合并元件的定义 * @returns 仅当 `model` 是分离合并元件时返回更新后的模型,否则返回 `undefined` */ export declare function mergeDemergeModel(model: Model | null | undefined, args?: ArgumentMap, scope?: Scope | (() => Scope | undefined), evaluator?: Evaluator): Model | undefined; //# sourceMappingURL=merge-demerge.d.ts.map