UNPKG

@sketch-hq/sketch-file-format

Version:
1,449 lines 164 kB
{ "title": "File Format", "description": "This schema describes a representation of an expanded Sketch file, that is, a Sketch file that has been unzipped, all of its entries parsed to JSON and merged into a single object. A concrete example of an expanded sketch file is the return value of the `fromFile` function in `@sketch-hq/sketch-file`", "type": "object", "$id": "https://unpkg.com/@sketch-hq/sketch-file-format@6.5.0/dist/file-format.schema.json", "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "Uuid": { "title": "UUID", "description": "UUID string.", "type": "string", "pattern": "^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$", "$id": "#Uuid" }, "AssetCollection": { "title": "Asset Collection", "description": "Collection of global document objects", "type": "object", "$id": "#AssetCollection", "required": [ "_class", "do_objectID", "colorAssets", "gradientAssets", "images", "colors", "gradients", "exportPresets" ], "properties": { "_class": { "const": "assetCollection" }, "do_objectID": { "$ref": "#/definitions/Uuid" }, "imageCollection": { "$ref": "#/definitions/ImageCollection" }, "colorAssets": { "type": "array", "items": { "$ref": "#/definitions/ColorAsset" } }, "gradientAssets": { "type": "array", "items": { "$ref": "#/definitions/GradientAsset" } }, "images": { "type": "array", "items": { "oneOf": [ { "$ref": "#/definitions/FileRef" }, { "$ref": "#/definitions/DataRef" } ] } }, "colors": { "type": "array", "items": { "$ref": "#/definitions/Color" } }, "gradients": { "type": "array", "items": { "$ref": "#/definitions/Gradient" } }, "exportPresets": { "type": "array" } }, "additionalProperties": false }, "ImageCollection": { "title": "Image Collection", "deprecated": true, "description": "Legacy object only retained for migrating older documents.", "type": "object", "$id": "#ImageCollection", "required": ["_class", "images"], "properties": { "_class": { "const": "imageCollection" }, "images": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, "ColorAsset": { "title": "Color Asset", "description": "Defines a reusable color asset", "type": "object", "$id": "#ColorAsset", "required": ["_class", "do_objectID", "name", "color"], "properties": { "_class": { "const": "MSImmutableColorAsset" }, "do_objectID": { "$ref": "#/definitions/Uuid" }, "name": { "type": "string" }, "color": { "$ref": "#/definitions/Color" } }, "additionalProperties": false }, "Color": { "title": "Color", "description": "Defines a RGBA color value", "type": "object", "$id": "#Color", "required": ["_class", "alpha", "red", "green", "blue"], "properties": { "_class": { "const": "color" }, "alpha": { "$ref": "#/definitions/UnitInterval" }, "red": { "$ref": "#/definitions/UnitInterval" }, "green": { "$ref": "#/definitions/UnitInterval" }, "blue": { "$ref": "#/definitions/UnitInterval" }, "swatchID": { "$ref": "#/definitions/Uuid" } }, "additionalProperties": false }, "UnitInterval": { "title": "Unit Interval", "description": "The set of all real numbers that are greater than or equal to 0 and less than or equal to 1. Used within Sketch documents to encode normalised scalar values, for example RGB color components.", "type": "number", "minimum": 0, "maximum": 1, "$id": "#UnitInterval" }, "GradientAsset": { "title": "Gradient Asset", "description": "Defines a reusable gradient asset", "type": "object", "$id": "#GradientAsset", "required": ["_class", "do_objectID", "name", "gradient"], "properties": { "_class": { "const": "MSImmutableGradientAsset" }, "do_objectID": { "$ref": "#/definitions/Uuid" }, "name": { "type": "string" }, "gradient": { "$ref": "#/definitions/Gradient" } }, "additionalProperties": false }, "Gradient": { "title": "Gradient", "description": "Defines a gradient", "type": "object", "$id": "#Gradient", "required": [ "_class", "gradientType", "elipseLength", "from", "to", "stops" ], "properties": { "_class": { "const": "gradient" }, "gradientType": { "$ref": "#/definitions/GradientType" }, "elipseLength": { "type": "number" }, "from": { "$ref": "#/definitions/PointString" }, "to": { "$ref": "#/definitions/PointString" }, "stops": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/GradientStop" } } }, "additionalProperties": false }, "GradientType": { "title": "Gradient Type", "description": "Enumeration of the gradient types", "type": "integer", "enum": [0, 1, 2], "enumDescriptions": ["Linear", "Radial", "Angular"], "$id": "#GradientType" }, "PointString": { "title": "Point String", "description": "A formatted string representation of a 2D point, e.g. {1, 1}.\n", "type": "string", "pattern": "^{-?\\d+(.\\d+)?(e-\\d+)?, -?\\d+(.\\d+)?(e-\\d+)?}$", "$id": "#PointString" }, "GradientStop": { "title": "Gradient Stop", "description": "Defines a position on a gradient that marks the end of a transition to a new color", "type": "object", "$id": "#GradientStop", "required": ["_class", "color", "position"], "properties": { "_class": { "const": "gradientStop" }, "color": { "$ref": "#/definitions/Color" }, "position": { "$ref": "#/definitions/UnitInterval" } }, "additionalProperties": false }, "FileRef": { "title": "File Reference", "description": "Defines a reference to a file within the document bundle", "type": "object", "$id": "#FileRef", "required": ["_class", "_ref_class", "_ref"], "properties": { "_class": { "const": "MSJSONFileReference" }, "_ref_class": { "type": "string", "enum": ["MSImageData", "MSImmutablePage", "MSPatch"], "enumDescriptions": ["MSImageData", "MSImmutablePage", "MSPatch"] }, "_ref": { "type": "string" } }, "additionalProperties": false }, "DataRef": { "title": "Data Reference", "description": "Defines inline base64 data", "type": "object", "$id": "#DataRef", "required": ["_class", "_ref_class", "_ref", "data", "sha1"], "properties": { "_class": { "const": "MSJSONOriginalDataReference" }, "_ref_class": { "type": "string", "enum": ["MSImageData", "MSFontData"], "enumDescriptions": ["MSImageData", "MSFontData"] }, "_ref": { "type": "string" }, "data": { "type": "object", "required": ["_data"], "properties": { "_data": { "type": "string" } }, "additionalProperties": false }, "sha1": { "type": "object", "required": ["_data"], "properties": { "_data": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, "ColorSpace": { "title": "Color Space", "description": "Enumeration of the color profiles Sketch can use to render a document", "type": "integer", "enum": [0, 1, 2], "enumDescriptions": ["Unmanaged", "sRGB", "P3"], "$id": "#ColorSpace" }, "ForeignLayerStyle": { "title": "Foreign Layer Style", "description": "Defines a layer style that has been imported from a library", "type": "object", "$id": "#ForeignLayerStyle", "required": [ "_class", "do_objectID", "libraryID", "sourceLibraryName", "symbolPrivate", "remoteStyleID", "localSharedStyle" ], "properties": { "_class": { "const": "MSImmutableForeignLayerStyle" }, "do_objectID": { "$ref": "#/definitions/Uuid" }, "libraryID": { "$ref": "#/definitions/Uuid" }, "sourceLibraryName": { "type": "string" }, "symbolPrivate": { "type": "boolean" }, "remoteStyleID": { "$ref": "#/definitions/Uuid" }, "localSharedStyle": { "$ref": "#/definitions/SharedStyle" } }, "additionalProperties": false }, "SharedStyle": { "title": "Shared Style", "description": "Defines a reusable style", "type": "object", "$id": "#SharedStyle", "required": ["_class", "do_objectID", "name", "value"], "properties": { "_class": { "const": "sharedStyle" }, "do_objectID": { "$ref": "#/definitions/Uuid" }, "name": { "type": "string" }, "value": { "$ref": "#/definitions/Style" } }, "additionalProperties": false }, "Style": { "title": "Style", "description": "Defines a layer style", "type": "object", "$id": "#Style", "required": [ "_class", "do_objectID", "borderOptions", "startMarkerType", "endMarkerType", "miterLimit", "windingRule", "innerShadows", "colorControls" ], "properties": { "_class": { "const": "style" }, "do_objectID": { "$ref": "#/definitions/Uuid" }, "borders": { "type": "array", "items": { "$ref": "#/definitions/Border" } }, "borderOptions": { "$ref": "#/definitions/BorderOptions" }, "blur": { "$ref": "#/definitions/Blur" }, "fills": { "type": "array", "items": { "$ref": "#/definitions/Fill" } }, "startMarkerType": { "$ref": "#/definitions/MarkerType" }, "endMarkerType": { "$ref": "#/definitions/MarkerType" }, "miterLimit": { "type": "integer" }, "windingRule": { "$ref": "#/definitions/WindingRule" }, "textStyle": { "$ref": "#/definitions/TextStyle" }, "shadows": { "type": "array", "items": { "$ref": "#/definitions/Shadow" } }, "innerShadows": { "type": "array", "items": { "$ref": "#/definitions/InnerShadow" } }, "contextSettings": { "$ref": "#/definitions/GraphicsContextSettings" }, "colorControls": { "$ref": "#/definitions/ColorControls" } }, "additionalProperties": false }, "Border": { "title": "Border", "description": "Defines a border style", "type": "object", "$id": "#Border", "required": [ "_class", "isEnabled", "color", "fillType", "position", "thickness", "contextSettings", "gradient" ], "properties": { "_class": { "const": "border" }, "isEnabled": { "type": "boolean" }, "color": { "$ref": "#/definitions/Color" }, "fillType": { "$ref": "#/definitions/FillType" }, "position": { "$ref": "#/definitions/BorderPosition" }, "thickness": { "type": "number", "exclusiveMinimum": 0 }, "contextSettings": { "$ref": "#/definitions/GraphicsContextSettings" }, "gradient": { "$ref": "#/definitions/Gradient" } }, "additionalProperties": false }, "FillType": { "title": "Fill Type", "description": "Enumeration of the fill types", "type": "integer", "enum": [0, 1, 4], "enumDescriptions": ["Color", "Gradient", "Pattern"], "$id": "#FillType" }, "BorderPosition": { "title": "Border Position", "description": "Enumeration of border positions", "type": "integer", "enum": [0, 1, 2], "enumDescriptions": ["Center", "Inside", "Outside"], "$id": "#BorderPosition" }, "GraphicsContextSettings": { "title": "Graphics Context Settings", "description": "Defines the opacity and blend mode of a style or shadow", "type": "object", "$id": "#GraphicsContextSettings", "required": ["_class", "blendMode", "opacity"], "properties": { "_class": { "const": "graphicsContextSettings" }, "blendMode": { "$ref": "#/definitions/BlendMode" }, "opacity": { "type": "number" } }, "additionalProperties": false }, "BlendMode": { "title": "Blend Mode", "description": "Enumeration of the blend modes that can be applied to fills", "type": "integer", "enum": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], "enumDescriptions": [ "Normal", "Darken", "Multiply", "Color burn", "Lighten", "Screen", "Color dodge", "Overlay", "Soft light", "Hard light", "Difference", "Exclusion", "Hue", "Saturation", "Color", "Luminosity", "Plus darker", "Plus lighter" ], "$id": "#BlendMode" }, "BorderOptions": { "title": "Border Options", "description": "Defines border options", "type": "object", "$id": "#BorderOptions", "required": [ "_class", "isEnabled", "dashPattern", "lineCapStyle", "lineJoinStyle" ], "properties": { "_class": { "const": "borderOptions" }, "isEnabled": { "type": "boolean" }, "dashPattern": { "type": "array", "items": { "type": "number" } }, "lineCapStyle": { "$ref": "#/definitions/LineCapStyle" }, "lineJoinStyle": { "$ref": "#/definitions/LineJoinStyle" } }, "additionalProperties": false }, "LineCapStyle": { "title": "Line Cap Style", "description": "Enumeration of the line cap styles", "type": "integer", "enum": [0, 1, 2], "enumDescriptions": ["Butt", "Round", "Projecting"], "$id": "#LineCapStyle" }, "LineJoinStyle": { "title": "Line Join Style", "description": "Enumeration of the line join styles", "type": "integer", "enum": [0, 1, 2], "enumDescriptions": ["Miter", "Round", "Bevel"], "$id": "#LineJoinStyle" }, "Blur": { "title": "Blur", "description": "Defines a blur style", "type": "object", "$id": "#Blur", "required": ["_class", "isEnabled", "center", "saturation", "type"], "properties": { "_class": { "const": "blur" }, "isEnabled": { "type": "boolean" }, "center": { "$ref": "#/definitions/PointString" }, "motionAngle": { "type": "number" }, "radius": { "type": "number" }, "saturation": { "type": "number" }, "type": { "$ref": "#/definitions/BlurType" } }, "additionalProperties": false }, "BlurType": { "title": "Blur Type", "description": "Enumeration of the various blur types", "type": "integer", "enum": [0, 1, 2, 3], "enumDescriptions": ["Gaussian", "Motion", "Zoom", "Background"], "$id": "#BlurType" }, "Fill": { "title": "Fill", "description": "Defines a fill style", "type": "object", "$id": "#Fill", "required": [ "_class", "isEnabled", "color", "fillType", "noiseIndex", "noiseIntensity", "patternFillType", "patternTileScale", "contextSettings", "gradient" ], "properties": { "_class": { "const": "fill" }, "isEnabled": { "type": "boolean" }, "color": { "$ref": "#/definitions/Color" }, "fillType": { "$ref": "#/definitions/FillType" }, "noiseIndex": { "type": "number" }, "noiseIntensity": { "type": "number" }, "patternFillType": { "$ref": "#/definitions/PatternFillType" }, "patternTileScale": { "type": "number" }, "contextSettings": { "$ref": "#/definitions/GraphicsContextSettings" }, "gradient": { "$ref": "#/definitions/Gradient" }, "image": { "oneOf": [ { "$ref": "#/definitions/FileRef" }, { "$ref": "#/definitions/DataRef" } ] } }, "additionalProperties": false }, "PatternFillType": { "title": "Pattern Fill Type", "description": "Enumeration of pattern fill types", "type": "integer", "enum": [0, 1, 2, 3], "enumDescriptions": ["Tile", "Fill", "Stretch", "Fit"], "$id": "#PatternFillType" }, "MarkerType": { "title": "Marker Type", "description": "Enumeration of the possible types of vector line endings", "type": "integer", "enum": [0, 1, 2, 3, 4, 5, 6], "enumDescriptions": [ "Open arrow", "Filled arrow", "Line", "Open circle", "Filled circle", "Open square", "Filled square" ], "$id": "#MarkerType" }, "WindingRule": { "title": "Winding Rule", "description": "Enumeration of the winding rule that controls how fills behave in shapes with complex paths", "type": "integer", "enum": [0, 1], "enumDescriptions": ["Non zero", "Even odd"], "$id": "#WindingRule" }, "TextStyle": { "title": "Text Style", "description": "Defines text style", "type": "object", "$id": "#TextStyle", "required": ["_class", "verticalAlignment", "encodedAttributes"], "properties": { "_class": { "const": "textStyle" }, "verticalAlignment": { "$ref": "#/definitions/TextVerticalAlignment" }, "encodedAttributes": { "type": "object", "required": ["MSAttributedStringFontAttribute"], "properties": { "paragraphStyle": { "$ref": "#/definitions/ParagraphStyle" }, "MSAttributedStringTextTransformAttribute": { "$ref": "#/definitions/TextTransform" }, "underlineStyle": { "$ref": "#/definitions/UnderlineStyle" }, "strikethroughStyle": { "$ref": "#/definitions/StrikethroughStyle" }, "kerning": { "type": "number" }, "MSAttributedStringFontAttribute": { "$ref": "#/definitions/FontDescriptor" }, "textStyleVerticalAlignmentKey": { "$ref": "#/definitions/TextVerticalAlignment" }, "MSAttributedStringColorAttribute": { "$ref": "#/definitions/Color" } }, "additionalProperties": false } }, "additionalProperties": false }, "TextVerticalAlignment": { "title": "Text Vertical Alignment", "description": "Enumeration of the text style vertical alighment options", "type": "integer", "enum": [0, 1, 2], "enumDescriptions": ["Top", "Middle", "Bottom"], "$id": "#TextVerticalAlignment" }, "ParagraphStyle": { "title": "Paragraph Style", "description": "Defines the paragraph style within a text style", "type": "object", "$id": "#ParagraphStyle", "required": ["_class"], "properties": { "_class": { "const": "paragraphStyle" }, "alignment": { "$ref": "#/definitions/TextHorizontalAlignment" }, "maximumLineHeight": { "type": "number" }, "minimumLineHeight": { "type": "number" }, "paragraphSpacing": { "type": "number" }, "allowsDefaultTighteningForTruncation": { "type": "number" } }, "additionalProperties": false }, "TextHorizontalAlignment": { "title": "Text Horizontal Alignment", "description": "Enumeration of the horizontal alignment options for paragraphs", "type": "integer", "enum": [0, 1, 2, 3, 4], "enumDescriptions": ["Left", "Right", "Centered", "Justified", "Natural"], "$id": "#TextHorizontalAlignment" }, "TextTransform": { "title": "Text Transform", "description": "Enumeration of the text style transformations options", "type": "integer", "enum": [0, 1, 2], "enumDescriptions": ["None", "Uppercase", "Lowercase"], "$id": "#TextTransform" }, "UnderlineStyle": { "title": "Underline Style", "description": "Enumeration of the text style underline options", "type": "integer", "enum": [0, 1], "enumDescriptions": ["None", "Underlined"], "$id": "#UnderlineStyle" }, "StrikethroughStyle": { "title": "Strikethrough Style", "description": "Enumeration of the text style strikethrough options", "type": "integer", "enum": [0, 1], "enumDescriptions": ["None", "Strikethrough"], "$id": "#StrikethroughStyle" }, "FontDescriptor": { "title": "Font Descriptor", "description": "Defines a font selection", "type": "object", "$id": "#FontDescriptor", "required": ["_class", "attributes"], "properties": { "_class": { "const": "fontDescriptor" }, "attributes": { "type": "object", "required": ["name", "size"], "properties": { "name": { "type": "string" }, "size": { "type": "number" }, "variation": { "type": "object", "additionalProperties": true, "patternProperties": { "^\\d*$:": { "type": "number" } } } }, "additionalProperties": false } }, "additionalProperties": false }, "Shadow": { "title": "Shadow", "description": "Defines a shadow style", "type": "object", "$id": "#Shadow", "required": [ "_class", "isEnabled", "blurRadius", "color", "contextSettings", "offsetX", "offsetY", "spread" ], "properties": { "_class": { "const": "shadow" }, "isEnabled": { "type": "boolean" }, "blurRadius": { "type": "number" }, "color": { "$ref": "#/definitions/Color" }, "contextSettings": { "$ref": "#/definitions/GraphicsContextSettings" }, "offsetX": { "type": "number" }, "offsetY": { "type": "number" }, "spread": { "type": "number" } }, "additionalProperties": false }, "InnerShadow": { "title": "Inner Shadow", "description": "Defines an inner shadow style", "type": "object", "$id": "#InnerShadow", "required": [ "_class", "isEnabled", "blurRadius", "color", "contextSettings", "offsetX", "offsetY", "spread" ], "properties": { "_class": { "const": "innerShadow" }, "isEnabled": { "type": "boolean" }, "blurRadius": { "type": "number" }, "color": { "$ref": "#/definitions/Color" }, "contextSettings": { "$ref": "#/definitions/GraphicsContextSettings" }, "offsetX": { "type": "number" }, "offsetY": { "type": "number" }, "spread": { "type": "number" } }, "additionalProperties": false }, "ColorControls": { "title": "Color Controls", "description": "Defines color adjust styles on images", "type": "object", "$id": "#ColorControls", "required": [ "_class", "isEnabled", "brightness", "contrast", "hue", "saturation" ], "properties": { "_class": { "const": "colorControls" }, "isEnabled": { "type": "boolean" }, "brightness": { "type": "number", "minimum": -100, "maximum": 100 }, "contrast": { "type": "number", "minimum": -100, "maximum": 100 }, "hue": { "type": "number", "minimum": -100, "maximum": 100 }, "saturation": { "type": "number", "minimum": -100, "maximum": 100 } }, "additionalProperties": false }, "ForeignSymbol": { "title": "Foreign Symbol", "description": "Defines a symbol that has been imported from a library", "type": "object", "$id": "#ForeignSymbol", "required": [ "_class", "do_objectID", "libraryID", "sourceLibraryName", "symbolPrivate", "originalMaster", "symbolMaster" ], "properties": { "_class": { "const": "MSImmutableForeignSymbol" }, "do_objectID": { "$ref": "#/definitions/Uuid" }, "libraryID": { "$ref": "#/definitions/Uuid" }, "sourceLibraryName": { "type": "string" }, "symbolPrivate": { "type": "boolean" }, "originalMaster": { "$ref": "#/definitions/SymbolMaster" }, "symbolMaster": { "$ref": "#/definitions/SymbolMaster" }, "missingLibraryFontAcknowledged": { "type": "boolean" } }, "additionalProperties": false }, "SymbolMaster": { "title": "Symbol Source Layer", "description": "A symbol source layer represents a reusable group of layers", "type": "object", "$id": "#SymbolMaster", "required": [ "_class", "allowsOverrides", "backgroundColor", "booleanOperation", "do_objectID", "exportOptions", "frame", "hasBackgroundColor", "hasClickThrough", "horizontalRulerData", "includeBackgroundColorInExport", "includeBackgroundColorInInstance", "isFixedToViewport", "isFlippedHorizontal", "isFlippedVertical", "isFlowHome", "isLocked", "isTemplate", "isVisible", "layerListExpandedType", "layers", "name", "nameIsFixed", "overrideProperties", "resizesContent", "resizingConstraint", "resizingType", "rotation", "shouldBreakMaskChain", "symbolID", "verticalRulerData" ], "properties": { "do_objectID": { "$ref": "#/definitions/Uuid" }, "booleanOperation": { "$ref": "#/definitions/BooleanOperation" }, "exportOptions": { "$ref": "#/definitions/ExportOptions" }, "frame": { "$ref": "#/definitions/Rect" }, "flow": { "$ref": "#/definitions/FlowConnection" }, "isFixedToViewport": { "type": "boolean" }, "isFlippedHorizontal": { "type": "boolean" }, "isFlippedVertical": { "type": "boolean" }, "isLocked": { "type": "boolean" }, "isTemplate": { "type": "boolean" }, "isVisible": { "type": "boolean" }, "layerListExpandedType": { "$ref": "#/definitions/LayerListExpanded" }, "name": { "type": "string" }, "nameIsFixed": { "type": "boolean" }, "resizingConstraint": { "description": "Bitfield representing the resizing constraint", "type": "integer", "minimum": 0, "maximum": 127 }, "resizingType": { "$ref": "#/definitions/ResizeType" }, "rotation": { "type": "number" }, "sharedStyleID": { "$ref": "#/definitions/Uuid" }, "shouldBreakMaskChain": { "type": "boolean" }, "hasClippingMask": { "type": "boolean" }, "clippingMaskMode": { "type": "integer" }, "userInfo": { "type": "object", "additionalProperties": true }, "style": { "$ref": "#/definitions/Style" }, "maintainScrollPosition": { "type": "boolean" }, "hasClickThrough": { "type": "boolean" }, "horizontalRulerData": { "$ref": "#/definitions/RulerData" }, "verticalRulerData": { "$ref": "#/definitions/RulerData" }, "layout": { "$ref": "#/definitions/LayoutGrid" }, "grid": { "$ref": "#/definitions/SimpleGrid" }, "groupLayout": { "oneOf": [ { "$ref": "#/definitions/FreeformGroupLayout" }, { "$ref": "#/definitions/InferredGroupLayout" } ] }, "_class": { "const": "symbolMaster" }, "backgroundColor": { "$ref": "#/definitions/Color" }, "hasBackgroundColor": { "type": "boolean" }, "includeBackgroundColorInInstance": { "type": "boolean" }, "includeBackgroundColorInExport": { "type": "boolean" }, "isFlowHome": { "type": "boolean" }, "resizesContent": { "type": "boolean" }, "presetDictionary": { "type": "object", "additionalProperties": false }, "symbolID": { "$ref": "#/definitions/Uuid" }, "allowsOverrides": { "type": "boolean" }, "overrideProperties": { "type": "array", "items": { "$ref": "#/definitions/OverrideProperty" } }, "layers": { "type": "array", "description": "Symbol sources can contain any layer or layer group except root layers such as artboards and other symbol sources", "items": { "oneOf": [ { "$ref": "#/definitions/Group" }, { "$ref": "#/definitions/Oval" }, { "$ref": "#/definitions/Polygon" }, { "$ref": "#/definitions/Rectangle" }, { "$ref": "#/definitions/ShapePath" }, { "$ref": "#/definitions/Star" }, { "$ref": "#/definitions/Triangle" }, { "$ref": "#/definitions/ShapeGroup" }, { "$ref": "#/definitions/Text" }, { "$ref": "#/definitions/SymbolInstance" }, { "$ref": "#/definitions/Slice" }, { "$ref": "#/definitions/Hotspot" }, { "$ref": "#/definitions/Bitmap" } ] } } }, "additionalProperties": false }, "BooleanOperation": { "title": "Boolean Operation", "description": "Enumeration of the boolean operations that can be applied to combine shapes", "type": "integer", "enum": [-1, 0, 1, 2, 3], "enumDescriptions": [ "None", "Union", "Subtract", "Intersection", "Difference" ], "$id": "#BooleanOperation" }, "ExportOptions": { "title": "Export Options", "description": "Defines a layer's export options", "type": "object", "$id": "#ExportOptions", "required": [ "_class", "exportFormats", "includedLayerIds", "layerOptions", "shouldTrim" ], "properties": { "_class": { "const": "exportOptions" }, "exportFormats": { "type": "array", "items": { "$ref": "#/definitions/ExportFormat" } }, "includedLayerIds": { "type": "array", "items": { "$ref": "#/definitions/Uuid" } }, "layerOptions": { "type": "integer" }, "shouldTrim": { "type": "boolean" } }, "additionalProperties": false }, "ExportFormat": { "title": "Export Format", "description": "Defines an export format, as listed in a layer's export options", "type": "object", "$id": "#ExportFormat", "required": [ "_class", "absoluteSize", "fileFormat", "name", "scale", "visibleScaleType" ], "properties": { "_class": { "const": "exportFormat" }, "absoluteSize": { "type": "integer" }, "fileFormat": { "$ref": "#/definitions/ExportFileFormat" }, "name": { "type": "string" }, "namingScheme": { "$ref": "#/definitions/ExportFormatNamingScheme" }, "scale": { "type": "number" }, "visibleScaleType": { "$ref": "#/definitions/VisibleScaleType" } }, "additionalProperties": false }, "ExportFileFormat": { "title": "Export File Format", "description": "Enumeration of the file formats that can be selected in the layer export options", "type": "string", "enum": ["png", "jpg", "tiff", "eps", "pdf", "webp", "svg"], "enumDescriptions": ["PNG", "JPG", "TIFF", "EPS", "PDF", "WEBP", "SVG"], "$id": "#ExportFileFormat" }, "ExportFormatNamingScheme": { "title": "Export Format Naming Scheme", "description": "Enumeration of the possible types of export format naming schemes", "type": "integer", "enum": [0, 1, 2], "enumDescriptions": ["Suffix", "Secondary Prefix", "Primary Prefix"], "$id": "#ExportFormatNamingScheme" }, "VisibleScaleType": { "title": "Visible Scale Type", "description": "Enumeration of the possible values to control how an exported layer will be scaled", "type": "integer", "enum": [0, 1, 2], "enumDescriptions": ["Scale", "Width", "Height"], "$id": "#VisibleScaleType" }, "Rect": { "title": "Rect", "description": "Defines an abstract rectangle", "type": "object", "$id": "#Rect", "required": [ "_class", "constrainProportions", "height", "width", "x", "y" ], "properties": { "_class": { "const": "rect" }, "constrainProportions": { "type": "boolean" }, "height": { "type": "number" }, "width": { "type": "number" }, "x": { "type": "number" }, "y": { "type": "number" } }, "additionalProperties": false }, "FlowConnection": { "title": "Flow Connection", "description": "Defines a connection between elements in a prototype", "type": "ob