@idraw/types
Advanced tools
Comparing version 0.3.0-alpha.7 to 0.3.0-alpha.8
{ | ||
"name": "@idraw/types", | ||
"version": "0.3.0-alpha.7", | ||
"version": "0.3.0-alpha.8", | ||
"description": "", | ||
@@ -25,3 +25,3 @@ "main": "src/index.ts", | ||
}, | ||
"gitHead": "49aec2789cf645101e6d1c7f3528e2fcf99c4bfd" | ||
"gitHead": "cf24ca47beae58150f602959fe58acaafd1b616c" | ||
} |
@@ -10,20 +10,23 @@ // import { TypePaintData } from './paint'; | ||
operation?: { | ||
lock?: boolean, | ||
invisible?: boolean, | ||
disableScale?: boolean, | ||
disbaleRotate?: boolean, | ||
} | ||
extension?: {[key: string]: any} | any; | ||
} | ||
lock?: boolean; | ||
invisible?: boolean; | ||
disableScale?: boolean; | ||
disableRotate?: boolean; | ||
limitRatio?: boolean; | ||
}; | ||
extension?: { [key: string]: any } | any; | ||
}; | ||
type TypeElementBase <T extends keyof TypeElemDesc | TypeElemType> = TypeElementAttrs & { | ||
name?: string; | ||
uuid?: string; | ||
type: T | TypeElemType; | ||
desc: TypeElemDesc[T]; | ||
} | ||
type TypeElementBase<T extends keyof TypeElemDesc | TypeElemType> = | ||
TypeElementAttrs & { | ||
name?: string; | ||
uuid?: string; | ||
type: T | TypeElemType; | ||
desc: TypeElemDesc[T]; | ||
}; | ||
type TypeElement<T extends keyof TypeElemDesc | TypeElemType> = TypeElementBase<T> & { | ||
uuid: string; | ||
} | ||
type TypeElement<T extends keyof TypeElemDesc | TypeElemType> = | ||
TypeElementBase<T> & { | ||
uuid: string; | ||
}; | ||
@@ -35,3 +38,3 @@ type TypeElemDescBase = { | ||
shadowBlur?: number; | ||
} | ||
}; | ||
@@ -45,10 +48,10 @@ type TypeElemBoxDesc = { | ||
type TypeElemDesc = { | ||
'text': TypeElemDescText, | ||
'rect': TypeElemDescRect, | ||
'circle': TypeElemDescCircle, | ||
'image': TypeElemDescImage, | ||
'svg': TypeElemDescSVG, | ||
'html': TypeElemDescHTML, | ||
text: TypeElemDescText; | ||
rect: TypeElemDescRect; | ||
circle: TypeElemDescCircle; | ||
image: TypeElemDescImage; | ||
svg: TypeElemDescSVG; | ||
html: TypeElemDescHTML; | ||
// paint: TypeElemDescPaint, | ||
} | ||
}; | ||
@@ -68,3 +71,3 @@ // enum TypeElemType { | ||
bgColor?: string; | ||
} & TypeElemBoxDesc | ||
} & TypeElemBoxDesc; | ||
@@ -86,7 +89,7 @@ type TypeElemDescText = { | ||
textShadowBlur?: number; | ||
} & TypeElemBoxDesc | ||
} & TypeElemBoxDesc; | ||
type TypeElemDescCircle = { | ||
bgColor: string; | ||
} & TypeElemBoxDesc | ||
} & TypeElemBoxDesc; | ||
@@ -99,3 +102,3 @@ type TypeElemDescImage = { | ||
svg: string; | ||
} | ||
}; | ||
@@ -106,3 +109,3 @@ type TypeElemDescHTML = { | ||
height: number; | ||
} | ||
}; | ||
@@ -122,3 +125,3 @@ // type TypeElemDescPaint = TypePaintData | ||
TypeElement, | ||
TypeElementBase, | ||
}; | ||
TypeElementBase | ||
}; |
13994
448