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])?);" 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(): def main():
''' '''

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

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