diff --git a/public/Interfaces.d.ts b/public/Interfaces.d.ts new file mode 100644 index 0000000..5a466a1 --- /dev/null +++ b/public/Interfaces.d.ts @@ -0,0 +1,65 @@ +declare interface IHistoryState { + LastAction: string + MainContainer: IContainerModel + SelectedContainer: IContainerModel | null + SelectedContainerId: string + TypeCounters: Record +} + +declare interface IAvailableContainer { + Type: string + Width: number + Height: number + XPositionReference?: XPositionReference + Style: React.CSSProperties +} + +declare interface IEditorState { + history: IHistoryState[] + historyCurrentStep: number + configuration: IConfiguration +} + +declare interface IConfiguration { + AvailableContainers: IAvailableContainer[] + AvailableSymbols: IAvailableSymbol[] + MainContainer: IAvailableContainer +} + +declare interface IContainerModel { + children: IContainerModel[] + parent: IContainerModel | null + properties: IProperties + userData: Record +} + +declare interface IProperties extends React.CSSProperties { + id: string + parentId: string | null + x: number + y: number + isRigidBody: boolean + XPositionReference?: XPositionReference +} + +declare enum XPositionReference { + Left, + Center, + Right +} + +declare interface IAvailableSymbol { + Name: string + XPositionReference: XPositionReference + Image: IImage + Width: number + Height: number +} + +declare interface IImage { + Name: string + Url: string + Base64Image: string + Svg: string +} +