import { Structure } from '../Structure'; import { Style } from '../Style'; import { Component } from './index'; import { Panel } from '../../../sketch-dsl/src'; /** * 基础组件 */ export interface BaseComponent { id?: string; type?: string; name?: string; structure?: Structure; style?: Style; children?: Component[]; value?: string; panel?: Panel; symbolName?: string; symbolComponentObject?: { url: string; code_name: string; code_lib_name: string; component_type?: string; }; haikuiComponentInfo?: { comId: string; comType: string; groupId: string; }; groupBreadcrumb?: { id: string; name: string; stableId?: string; }[]; containerRole?: 'frame' | 'graphicFrame'; clipsContents?: boolean; cornerHints?: { rawStyle?: number; style?: 'rounded' | 'smooth' | string; smoothing?: number; prefersConcentric?: boolean; }; layoutConstraints?: { horizontal?: { raw: number; mode: 'fixed' | 'relative' | 'fit' | 'fill' | 'unknown'; }; vertical?: { raw: number; mode: 'fixed' | 'relative' | 'fit' | 'fill' | 'unknown'; }; pins?: { left?: boolean; right?: boolean; top?: boolean; bottom?: boolean; rawHorizontal?: number; rawVertical?: number; }; }; stack?: { direction: 'horizontal' | 'vertical'; spacing?: number; gap?: number; crossAxisGap?: number; justifyContent?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly' | 'unknown'; alignItems?: 'start' | 'center' | 'end' | 'stretch' | 'none' | 'unknown'; alignContent?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly' | 'unknown'; wraps?: boolean; padding?: { left?: number; top?: number; right?: number; bottom?: number; }; }; stableId?: string; contentHash?: string; subtreeHash?: string; styleHash?: string; }