Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sketch-hq/sketch-file-format-ts

Package Overview
Dependencies
Maintainers
2
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sketch-hq/sketch-file-format-ts - npm Package Compare versions

Comparing version 3.0.0 to 4.0.0

21

CHANGELOG.md

@@ -5,2 +5,23 @@ # Changelog

## [4.0.0](https://github.com/sketch-hq/sketch-file-format-ts/compare/v1.0.0...v4.0.0) (2019-12-09)
### ⚠ BREAKING CHANGES
* Code will have to use the new type name to avoid compilation errors
### Features
* add `AnyObject` type ([79be064](https://github.com/sketch-hq/sketch-file-format-ts/commit/79be06429f36228a0c3127f0f909b3fa08f8cff0))
### Bug Fixes
* upgrade to sketch-file-format@3.2.0 ([2b8eb4a](https://github.com/sketch-hq/sketch-file-format-ts/commit/2b8eb4ab3e883c5b9cafba9617ddeba579e95b24)), closes [#5](https://github.com/sketch-hq/sketch-file-format-ts/issues/5) [#4](https://github.com/sketch-hq/sketch-file-format-ts/issues/4) [#2](https://github.com/sketch-hq/sketch-file-format-ts/issues/2)
### improvement
* rename FileFormat type to Contents ([1ea31fc](https://github.com/sketch-hq/sketch-file-format-ts/commit/1ea31fccc9da92758af357b49c0b47bbd4a555fc))
## [3.0.0](https://github.com/sketch-hq/sketch-file-format-ts/compare/v1.0.0...v3.0.0) (2019-11-15)

@@ -7,0 +28,0 @@

70

dist/v1-types.d.ts

@@ -13,3 +13,3 @@ /**

gradientAssets: GradientAsset[];
images: ImageFileRef[];
images: (ImageFileRef | ImageDataRef)[];
colors: Color[];

@@ -31,2 +31,3 @@ gradients: Gradient[];

_class: 'MSImmutableColorAsset';
do_objectID: Uuid;
name: string;

@@ -54,2 +55,3 @@ color: Color;

_class: 'MSImmutableGradientAsset';
do_objectID: Uuid;
name: string;

@@ -99,2 +101,16 @@ gradient: Gradient;

/**
* Defines a reference to an image data within the document bundle
*/
export declare type ImageDataRef = {
_class: 'MSJSONOriginalDataReference';
_ref_class: 'MSImageData';
_ref: string;
data: {
_data: string;
};
sha1: {
_data: string;
};
};
/**
* Enumeration of the color profiles Sketch can use to render a document

@@ -165,3 +181,3 @@ */

Gradient = 1,
Pattern = 2
Pattern = 4
}

@@ -268,2 +284,3 @@ /**

gradient?: Gradient;
image?: ImageFileRef | ImageDataRef;
};

@@ -328,3 +345,3 @@ /**

_class: 'paragraphStyle';
alignment: TextHorizontalAlignment;
alignment?: TextHorizontalAlignment;
maximumLineHeight?: number;

@@ -386,3 +403,3 @@ minimumLineHeight?: number;

export declare type InnerShadow = {
_class: 'shadow';
_class: 'innerShadow';
isEnabled: boolean;

@@ -402,6 +419,6 @@ blurRadius: number;

isEnabled: boolean;
brightness: UnitInterval;
contrast: UnitInterval;
hue: UnitInterval;
saturation: UnitInterval;
brightness: number;
contrast: number;
hue: number;
saturation: number;
};

@@ -439,2 +456,3 @@ /**

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -461,3 +479,3 @@ hasClippingMask?: boolean;

allowsOverrides: boolean;
overrideProperties: [];
overrideProperties: OverrideProperty[];
presetDictionary?: any;

@@ -596,2 +614,3 @@ };

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -638,2 +657,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -669,2 +689,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -733,2 +754,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -766,2 +788,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -800,2 +823,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -832,2 +856,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -866,2 +891,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -899,2 +925,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -910,3 +937,2 @@ hasClippingMask?: boolean;

windingRule: WindingRule;
sharedStyleID?: Uuid;
};

@@ -933,2 +959,3 @@ /**

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -1009,2 +1036,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -1028,6 +1056,10 @@ hasClippingMask?: boolean;

do_objectID: Uuid;
overrideName: string | string | string;
overrideName: OverrideName;
value: string | Uuid | ImageFileRef;
};
/**
* Defines the valid string patterns for an override name
*/
export declare type OverrideName = string | string | string;
/**
* Slice layers allow the content beneath their frame to be exported

@@ -1052,2 +1084,3 @@ */

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -1082,2 +1115,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -1110,2 +1144,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -1118,3 +1153,3 @@ hasClippingMask?: boolean;

fillReplacesImage: boolean;
image: ImageFileRef;
image: ImageFileRef | ImageDataRef;
intendedDPI: number;

@@ -1159,2 +1194,10 @@ clippingMask: PointListString;

/**
* Defines override properties on symbol masters
*/
export declare type OverrideProperty = {
_class: 'MSImmutableOverrideProperty';
overrideName: OverrideName;
canOverride: boolean;
};
/**
* Defines a text style that has been imported from a library

@@ -1219,2 +1262,3 @@ */

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -1349,2 +1393,2 @@ hasClippingMask?: boolean;

*/
export declare type AnyObject = AssetCollection | ImageCollection | ColorAsset | Color | GradientAsset | Gradient | GradientStop | ImageFileRef | ForeignLayerStyle | SharedStyle | Style | Border | GraphicsContextSettings | BorderOptions | Blur | Fill | TextStyle | ParagraphStyle | FontDescriptor | Shadow | InnerShadow | ColorControls | ForeignSymbol | SymbolMaster | ExportOptions | ExportFormat | Rect | FlowConnection | FreeformGroupLayout | Artboard | Group | Oval | CurvePoint | Polygon | Rectangle | ShapePath | Star | Triangle | ShapeGroup | Text | AttributedString | StringAttribute | SymbolInstance | OverrideValue | Slice | Hotspot | Bitmap | RulerData | LayoutGrid | SimpleGrid | ForeignTextStyle | SharedStyleContainer | SharedTextStyleContainer | SymbolContainer | PageFileRef | Page;
export declare type AnyObject = AssetCollection | ImageCollection | ColorAsset | Color | GradientAsset | Gradient | GradientStop | ImageFileRef | ImageDataRef | ForeignLayerStyle | SharedStyle | Style | Border | GraphicsContextSettings | BorderOptions | Blur | Fill | TextStyle | ParagraphStyle | FontDescriptor | Shadow | InnerShadow | ColorControls | ForeignSymbol | SymbolMaster | ExportOptions | ExportFormat | Rect | FlowConnection | FreeformGroupLayout | Artboard | Group | Oval | CurvePoint | Polygon | Rectangle | ShapePath | Star | Triangle | ShapeGroup | Text | AttributedString | StringAttribute | SymbolInstance | OverrideValue | Slice | Hotspot | Bitmap | RulerData | LayoutGrid | SimpleGrid | OverrideProperty | ForeignTextStyle | SharedStyleContainer | SharedTextStyleContainer | SymbolContainer | PageFileRef | Page;

2

dist/v1-types.js

@@ -28,3 +28,3 @@ "use strict";

FillType[FillType["Gradient"] = 1] = "Gradient";
FillType[FillType["Pattern"] = 2] = "Pattern";
FillType[FillType["Pattern"] = 4] = "Pattern";
})(FillType = exports.FillType || (exports.FillType = {}));

@@ -31,0 +31,0 @@ /**

@@ -13,3 +13,3 @@ /**

gradientAssets: GradientAsset[];
images: ImageFileRef[];
images: (ImageFileRef | ImageDataRef)[];
colors: Color[];

@@ -31,2 +31,3 @@ gradients: Gradient[];

_class: 'MSImmutableColorAsset';
do_objectID: Uuid;
name: string;

@@ -54,2 +55,3 @@ color: Color;

_class: 'MSImmutableGradientAsset';
do_objectID: Uuid;
name: string;

@@ -99,2 +101,16 @@ gradient: Gradient;

/**
* Defines a reference to an image data within the document bundle
*/
export declare type ImageDataRef = {
_class: 'MSJSONOriginalDataReference';
_ref_class: 'MSImageData';
_ref: string;
data: {
_data: string;
};
sha1: {
_data: string;
};
};
/**
* Enumeration of the color profiles Sketch can use to render a document

@@ -165,3 +181,3 @@ */

Gradient = 1,
Pattern = 2
Pattern = 4
}

@@ -268,2 +284,3 @@ /**

gradient: Gradient;
image?: ImageFileRef | ImageDataRef;
};

@@ -328,3 +345,3 @@ /**

_class: 'paragraphStyle';
alignment: TextHorizontalAlignment;
alignment?: TextHorizontalAlignment;
maximumLineHeight?: number;

@@ -386,3 +403,3 @@ minimumLineHeight?: number;

export declare type InnerShadow = {
_class: 'shadow';
_class: 'innerShadow';
isEnabled: boolean;

@@ -402,6 +419,6 @@ blurRadius: number;

isEnabled: boolean;
brightness: UnitInterval;
contrast: UnitInterval;
hue: UnitInterval;
saturation: UnitInterval;
brightness: number;
contrast: number;
hue: number;
saturation: number;
};

@@ -439,2 +456,3 @@ /**

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -462,3 +480,3 @@ hasClippingMask?: boolean;

allowsOverrides: boolean;
overrideProperties: [];
overrideProperties: OverrideProperty[];
presetDictionary?: any;

@@ -621,2 +639,3 @@ };

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -664,2 +683,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -696,2 +716,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -761,2 +782,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -795,2 +817,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -831,2 +854,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -864,2 +888,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -899,2 +924,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -933,2 +959,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -945,3 +972,2 @@ hasClippingMask?: boolean;

windingRule: WindingRule;
sharedStyleID?: Uuid;
};

@@ -968,2 +994,3 @@ /**

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -1045,2 +1072,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -1065,6 +1093,10 @@ hasClippingMask?: boolean;

do_objectID: Uuid;
overrideName: string | string | string;
overrideName: OverrideName;
value: string | Uuid | ImageFileRef;
};
/**
* Defines the valid string patterns for an override name
*/
export declare type OverrideName = string | string | string;
/**
* Slice layers allow the content beneath their frame to be exported

@@ -1089,2 +1121,3 @@ */

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -1120,2 +1153,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -1149,2 +1183,3 @@ hasClippingMask?: boolean;

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -1158,3 +1193,3 @@ hasClippingMask?: boolean;

fillReplacesImage: boolean;
image: ImageFileRef;
image: ImageFileRef | ImageDataRef;
intendedDPI: number;

@@ -1199,2 +1234,10 @@ clippingMask: PointListString;

/**
* Defines override properties on symbol masters
*/
export declare type OverrideProperty = {
_class: 'MSImmutableOverrideProperty';
overrideName: OverrideName;
canOverride: boolean;
};
/**
* Defines a text style that has been imported from a library

@@ -1259,2 +1302,3 @@ */

rotation: number;
sharedStyleID?: Uuid;
shouldBreakMaskChain: boolean;

@@ -1390,2 +1434,2 @@ hasClippingMask?: boolean;

*/
export declare type AnyObject = AssetCollection | ImageCollection | ColorAsset | Color | GradientAsset | Gradient | GradientStop | ImageFileRef | ForeignLayerStyle | SharedStyle | Style | Border | GraphicsContextSettings | BorderOptions | Blur | Fill | TextStyle | ParagraphStyle | FontDescriptor | Shadow | InnerShadow | ColorControls | ForeignSymbol | SymbolMaster | ExportOptions | ExportFormat | Rect | FlowConnection | FreeformGroupLayout | InferredGroupLayout | Artboard | Group | Oval | CurvePoint | Polygon | Rectangle | ShapePath | Star | Triangle | ShapeGroup | Text | AttributedString | StringAttribute | SymbolInstance | OverrideValue | Slice | Hotspot | Bitmap | RulerData | LayoutGrid | SimpleGrid | ForeignTextStyle | SharedStyleContainer | SharedTextStyleContainer | SymbolContainer | PageFileRef | Page;
export declare type AnyObject = AssetCollection | ImageCollection | ColorAsset | Color | GradientAsset | Gradient | GradientStop | ImageFileRef | ImageDataRef | ForeignLayerStyle | SharedStyle | Style | Border | GraphicsContextSettings | BorderOptions | Blur | Fill | TextStyle | ParagraphStyle | FontDescriptor | Shadow | InnerShadow | ColorControls | ForeignSymbol | SymbolMaster | ExportOptions | ExportFormat | Rect | FlowConnection | FreeformGroupLayout | InferredGroupLayout | Artboard | Group | Oval | CurvePoint | Polygon | Rectangle | ShapePath | Star | Triangle | ShapeGroup | Text | AttributedString | StringAttribute | SymbolInstance | OverrideValue | Slice | Hotspot | Bitmap | RulerData | LayoutGrid | SimpleGrid | OverrideProperty | ForeignTextStyle | SharedStyleContainer | SharedTextStyleContainer | SymbolContainer | PageFileRef | Page;

@@ -28,3 +28,3 @@ "use strict";

FillType[FillType["Gradient"] = 1] = "Gradient";
FillType[FillType["Pattern"] = 2] = "Pattern";
FillType[FillType["Pattern"] = 4] = "Pattern";
})(FillType = exports.FillType || (exports.FillType = {}));

@@ -31,0 +31,0 @@ /**

@@ -31,2 +31,3 @@ /**

_class: 'MSImmutableColorAsset';
do_objectID: Uuid;
name: string;

@@ -54,2 +55,3 @@ color: Color;

_class: 'MSImmutableGradientAsset';
do_objectID: Uuid;
name: string;

@@ -180,3 +182,3 @@ gradient: Gradient;

Gradient = 1,
Pattern = 2
Pattern = 4
}

@@ -343,3 +345,3 @@ /**

_class: 'paragraphStyle';
alignment: TextHorizontalAlignment;
alignment?: TextHorizontalAlignment;
maximumLineHeight?: number;

@@ -420,6 +422,6 @@ minimumLineHeight?: number;

isEnabled: boolean;
brightness: UnitInterval;
contrast: UnitInterval;
hue: UnitInterval;
saturation: UnitInterval;
brightness: number;
contrast: number;
hue: number;
saturation: number;
};

@@ -481,3 +483,3 @@ /**

allowsOverrides: boolean;
overrideProperties: [];
overrideProperties: OverrideProperty[];
presetDictionary?: any;

@@ -1082,6 +1084,10 @@ };

do_objectID?: Uuid;
overrideName: string | string | string;
overrideName: OverrideName;
value: string | Uuid | ImageFileRef;
};
/**
* Defines the valid string patterns for an override name
*/
export declare type OverrideName = string | string | string;
/**
* Slice layers allow the content beneath their frame to be exported

@@ -1215,2 +1221,10 @@ */

/**
* Defines override properties on symbol masters
*/
export declare type OverrideProperty = {
_class: 'MSImmutableOverrideProperty';
overrideName: OverrideName;
canOverride: boolean;
};
/**
* Defines a text style that has been imported from a library

@@ -1406,2 +1420,2 @@ */

*/
export declare type AnyObject = AssetCollection | ImageCollection | ColorAsset | Color | GradientAsset | Gradient | GradientStop | ImageFileRef | ImageDataRef | ForeignLayerStyle | SharedStyle | Style | Border | GraphicsContextSettings | BorderOptions | Blur | Fill | TextStyle | ParagraphStyle | FontDescriptor | Shadow | InnerShadow | ColorControls | ForeignSymbol | SymbolMaster | ExportOptions | ExportFormat | Rect | FlowConnection | FreeformGroupLayout | InferredGroupLayout | Artboard | Group | Oval | CurvePoint | Polygon | Rectangle | ShapePath | Star | Triangle | ShapeGroup | Text | AttributedString | StringAttribute | SymbolInstance | OverrideValue | Slice | Hotspot | Bitmap | RulerData | LayoutGrid | SimpleGrid | ForeignTextStyle | SharedStyleContainer | SharedTextStyleContainer | SymbolContainer | PageFileRef | Page;
export declare type AnyObject = AssetCollection | ImageCollection | ColorAsset | Color | GradientAsset | Gradient | GradientStop | ImageFileRef | ImageDataRef | ForeignLayerStyle | SharedStyle | Style | Border | GraphicsContextSettings | BorderOptions | Blur | Fill | TextStyle | ParagraphStyle | FontDescriptor | Shadow | InnerShadow | ColorControls | ForeignSymbol | SymbolMaster | ExportOptions | ExportFormat | Rect | FlowConnection | FreeformGroupLayout | InferredGroupLayout | Artboard | Group | Oval | CurvePoint | Polygon | Rectangle | ShapePath | Star | Triangle | ShapeGroup | Text | AttributedString | StringAttribute | SymbolInstance | OverrideValue | Slice | Hotspot | Bitmap | RulerData | LayoutGrid | SimpleGrid | OverrideProperty | ForeignTextStyle | SharedStyleContainer | SharedTextStyleContainer | SymbolContainer | PageFileRef | Page;

@@ -28,3 +28,3 @@ "use strict";

FillType[FillType["Gradient"] = 1] = "Gradient";
FillType[FillType["Pattern"] = 2] = "Pattern";
FillType[FillType["Pattern"] = 4] = "Pattern";
})(FillType = exports.FillType || (exports.FillType = {}));

@@ -31,0 +31,0 @@ /**

{
"name": "@sketch-hq/sketch-file-format-ts",
"description": "TypeScript types for the Sketch File Format",
"version": "3.0.0",
"version": "4.0.0",
"main": "dist/index",

@@ -23,5 +23,5 @@ "types": "dist/index",

"@commitlint/config-conventional": "8.2.0",
"@sketch-hq/sketch-file-format-1": "npm:@sketch-hq/sketch-file-format@1.*.*",
"@sketch-hq/sketch-file-format-2": "npm:@sketch-hq/sketch-file-format@2.*.*",
"@sketch-hq/sketch-file-format-3": "npm:@sketch-hq/sketch-file-format@3.2.0",
"@sketch-hq/sketch-file-format-1": "npm:@sketch-hq/sketch-file-format@1.1.6",
"@sketch-hq/sketch-file-format-2": "npm:@sketch-hq/sketch-file-format@2.0.2",
"@sketch-hq/sketch-file-format-3": "npm:@sketch-hq/sketch-file-format@3.2.1",
"@types/humps": "1.1.2",

@@ -28,0 +28,0 @@ "@types/jest": "24.0.22",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc