diff --git a/types/sketchapp/index.d.ts b/types/sketchapp/index.d.ts index b45dcefe50..79a9226508 100644 --- a/types/sketchapp/index.d.ts +++ b/types/sketchapp/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for non-npm package the SketchApp 1.0 // Project: https://github.com/xlayers/xlayers // Definitions by: Wassim Chegham +// Phetsinorath William // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped type SketchMSBorderPositionEnum = 0 | 1 | 2 | 3; @@ -17,9 +18,34 @@ type SketchMSLayerListExpandedType = 0 | 1 | 2; type SketchMSEncodedBase64BinaryPlist = string; type SketchMSNSColorArchive = SketchMSKeyValueArchive; type SketchMSLayer = SketchMSPage | SketchMSSymbolMaster; +type SketchMSUserData = SketchMSUserDocument | SketchMSUserPage; interface SketchMSNestedSymbolOverride { symbolID: string; } +interface SketchMSPreview { + source: string; + width: number; + height: number; +} +interface SketchMSUserPage { + [key: string]: { + scrollOrigin: SketchMSCurvePoint; + zoomValue: number; + }; +} +interface SketchMSUserDocument { + document: { + pageListCollapsed: number; + pageListHeight: number; + }; +} +interface SketchMSData { + pages: SketchMSPage[]; + previews: SketchMSPreview[]; + document: SketchMSDocumentData; + user: SketchMSUserData; + meta: SketchMSMetadata; +} interface SketchMSStringAttribute { _class: 'stringAttribute'; attributes: { @@ -83,8 +109,8 @@ interface SketchMSImageDataReference { } type SketchMSPointString = string; interface SketchMSPath { - _class: 'path'; - isClosed: boolean; + _class: 'path' | 'shapePath' | 'rectangle' | 'oval' | 'triangle'; + isClosed?: boolean; points: SketchMSCurvePoint[]; } interface SketchMSCurvePoint { @@ -355,6 +381,8 @@ interface SketchMSSymbolMaster { attributedString: SketchMSAttributedString; name: string; layers: SketchMSLayer[]; + points: SketchMSPath; + isClosed?: boolean; isVisible: boolean; nameIsFixed: boolean; grid: SketchMSSimpleGrid;