sketch-json-parse
Version:
sketch-json解析
102 lines (101 loc) • 2.59 kB
TypeScript
import { SKColor } from './SKColor';
import { SKImage } from './SKImage';
import { SKFrame } from './SKFrame';
import { SKAttributedString } from './SKAttributedString';
import { SKStyle } from './SKStyle';
import { Panel } from './Panel';
/**
* 图层
*/
export type SKLayer = {
_class: string;
booleanOperation?: number;
isFixedToViewport?: boolean;
do_objectID: string;
name: string;
resizingConstraint?: number;
resizingType?: number;
isLocked?: boolean;
isVisible: boolean;
layerListExpandedType?: number;
backgroundColor?: SKColor;
hasBackgroundColor?: boolean;
includeBackgroundColorInExport?: boolean;
hasScale?: boolean;
isFlippedVertical?: boolean;
isFlippedHorizontal?: boolean;
nameIsFixed?: boolean;
points?: any[];
fixedRadius?: number;
rotation?: number;
shouldBreakMaskChain?: boolean;
exportOptions: {
_class: string;
includedLayerIds: any[];
layerOptions: number;
shouldTrim: boolean;
exportFormats: any[];
};
frame: SKFrame;
attributedString?: SKAttributedString;
clippingMaskMode?: number;
hasClippingMask?: boolean;
style?: SKStyle;
shapeStyle?: SKStyle;
hasClickThrough?: boolean;
groupLayout?: {
_class: string;
};
imageUrl?: string;
image?: SKImage;
layers?: SKLayer[];
includeInCloudUpload?: boolean;
horizontalRulerData?: {
_class: string;
base: number;
guides: any[];
};
verticalRulerData?: {
_class: string;
base: number;
guides: any[];
};
edited?: boolean;
isClosed?: boolean;
pointRadiusBehaviour?: number;
needsConvertionToNewRoundCorners?: boolean;
hasConvertedToNewRoundCorners?: boolean;
panel?: Panel;
symbolName?: string;
symbolComponentObject?: {
url: string;
code_name: string;
code_lib_name: string;
type?: string;
};
haikuiComponentInfo?: {
comId: string;
comType: string;
groupId: string;
};
sharedLayerStyleName?: string;
sharedTextStyleName?: string;
groupBreadcrumb?: {
id: string;
name: string;
}[];
zIndex?: number;
parentId?: string;
};
export type EffectRuleNames = {
scroll: string[];
dialog: string[];
};
export * from './common';
export * from './SKColor';
export * from './SKFrame';
export * from './SKStyle';
export * from './SKImage';
export * from './SKAttributedString';
export * from './Panel';
export * from './PanelOptions';