Update types + fix generate_dts on linux

This commit is contained in:
Eric NGUYEN 2022-09-28 18:13:14 +02:00 committed by Eric
parent 18cbacaca1
commit 10260d3811
2 changed files with 510 additions and 474 deletions

View file

@ -27,7 +27,7 @@ export_pattern = re.compile(
r"export ([*] from [\"'\s].*[\"'\s]|{.*}(?: from [\"'\s].*[\"'\s])?);"
)
filter_directories = ["./dist\Enums", "./dist\Interfaces"]
filter_directories = ["./dist/Enums", "./dist/Interfaces", "./dist\Enums", "./dist\Interfaces"]
def main():
'''

58
src/dts/svgld.d.ts vendored
View file

@ -19,6 +19,18 @@ export enum MessageType {
Error = 3
}
export enum PositionReference {
TopLeft = 0,
TopCenter = 1,
TopRight = 2,
CenterLeft = 3,
CenterCenter = 4,
CenterRight = 5,
BottomLeft = 6,
BottomCenter = 7,
BottomRight = 8
}
/**
* Describe the type of the property.
* Used for the assignation in the OnPropertyChange function
@ -61,6 +73,7 @@ export interface IAction {
/** Model of available container used in application configuration */
export interface IAvailableContainer {
/** type */
@ -69,6 +82,8 @@ export interface IAvailableContainer {
DisplayedText?: string;
/** category */
Category?: string;
/** orientation */
Orientation?: Orientation;
/** horizontal offset */
X?: number;
/** vertical offset */
@ -79,14 +94,20 @@ export interface IAvailableContainer {
Height?: number;
/**
* Minimum width (min=1)
* Allows the container to set isRigidBody to false when it gets squeezed
* by an anchor
*/
MinWidth?: number;
/**
* Maximum width
*/
MaxWidth?: number;
/**
* Minimum height (min=1)
*/
MinHeight?: number;
/**
* Maximum height
*/
MaxHeight?: number;
/** margin */
Margin?: IMargin;
/** true if anchor, false otherwise */
@ -96,7 +117,7 @@ export interface IAvailableContainer {
/** Method used on container add */
AddMethod?: AddMethod;
/** Horizontal alignment, also determines the visual location of x {Left = 0, Center, Right } */
XPositionReference?: XPositionReference;
PositionReference?: PositionReference;
/**
* (optional)
* Replace a <rect> by a customized "SVG". It is not really an svg but it at least allows
@ -189,7 +210,7 @@ export interface IAvailableSymbol {
Image: IImage;
Width?: number;
Height?: number;
XPositionReference?: XPositionReference;
XPositionReference?: PositionReference;
}
export interface ICategory {
@ -232,6 +253,7 @@ export class ContainerModel implements IContainerModel {
/**
* Properties of a container
*/
@ -246,32 +268,40 @@ export interface IContainerProperties {
linkedSymbolId: string;
/** Text displayed in the container */
displayedText: string;
/** orientation */
orientation: Orientation;
/** horizontal offset */
x: number;
/** vertical offset */
y: number;
/** margin */
margin: IMargin;
/** width */
width: number;
/** height */
height: number;
/**
* Minimum width (min=1)
* Allows the container to set isRigidBody to false when it gets squeezed
* by an anchor
*/
minWidth: number;
/**
* Maximum width
*/
maxWidth: number;
/** width */
width: number;
/** height */
height: number;
/**
* Minimum height (min=1)
*/
minHeight: number;
/**
* Maximum height
*/
maxHeight: number;
/** true if anchor, false otherwise */
isAnchor: boolean;
/** true if flex, false otherwise */
isFlex: boolean;
/** Horizontal alignment, also determines the visual location of x {Left = 0, Center, Right } */
xPositionReference: XPositionReference;
positionReference: PositionReference;
/** Hide the children in the treeview */
hideChildrenInTreeview: boolean;
/** if true, show the dimension of the container */
@ -375,6 +405,7 @@ export interface IImage {
export interface IInputGroup {
key: string;
text: React.ReactNode;
value: string;
}
@ -470,4 +501,9 @@ export interface ISymbolModel {
linkedContainers: Set<string>;
}
export enum Orientation {
Horizontal = 0,
Vertical = 1
}
}