import type { ConditionExpression } from '@cloudpss/expression/definitions'; import type { JsonObject } from 'type-fest'; /** 图形的属性 */ export interface ModelCellAttrs { [selector: string]: null | undefined | boolean | string | number | Partial; } /** 图形的标记 */ export interface ModelGraphicMarkup { /** 元素显示的条件 */ condition?: ConditionExpression; /** * The namespace URI of the element. It defaults to SVG namespace * `"http://www.w3.org/2000/svg"`. */ ns?: string | null; /** * The type of element to be created. */ tagName: string; /** * A unique selector for targeting the element within the `attr` * cell attribute. */ selector?: string | null; /** * A selector for targeting multiple elements within the `attr` * cell attribute. The group selector name must not be the same * as an existing selector name. */ groupSelector?: string | string[] | null; /** * Attributes to be applied to the element. */ attrs?: Record; /** 元素的文本内容,为 MiraScript 模板字符串 */ textContent?: string; } /** 线型元件配置 */ export interface ModelGraphicEdge { /** 启用线型元件功能 */ enabled?: boolean; /** 线型元件标签 */ labels?: ModelGraphicEdgeLabel[]; } /** 线型元件标签 */ export interface ModelGraphicEdgeLabel { /** 标签显示的条件 */ condition?: ConditionExpression; /** 标签的文本内容,为 MiraScript 模板字符串 */ textContent?: string; /** 标签的标记 */ markup?: ModelGraphicMarkup[]; /** 标签的属性 */ attrs?: ModelCellAttrs; /** 标签位置,0-1 */ position?: number; } /** 元件图形 */ export interface ModelGraphic { /** 生成图形的工具 */ generator?: string; /** 图形上的引脚 */ pins: Record; /** 图形的标记 */ markup: ModelGraphicMarkup[]; /** 图形的属性 */ attrs: ModelCellAttrs; /** 默认宽度 */ width: number; /** 默认高度 */ height: number; /** 是否在缩放时保留长宽比 */ preserveAspectRatio?: boolean; /** 线型元件配置 */ edge?: ModelGraphicEdge; } //# sourceMappingURL=graphic.d.ts.map