diff --git a/package-lock.json b/package-lock.json index 18abc3e..097f90c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2357,9 +2357,9 @@ "dev": true }, "@zeplin/extension-model": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/@zeplin/extension-model/-/extension-model-2.5.1.tgz", - "integrity": "sha512-noc0TbUdiI2pNYFwnPJCuPhTUG0Ed7Je9Btjrz90DAEHg5pY3ha2iUS4f5TZ4sCJ7adsVDhKARVu+N5E3Zlxkw==" + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@zeplin/extension-model/-/extension-model-2.6.0.tgz", + "integrity": "sha512-pSpbr1qR/ROvMxLyMyTlmR6oFnSF201OtPQpZqsk9z/QGdC07CWJriaFyLFisP+dVr+MKAhMn9mYuTsb+CvGeg==" }, "abab": { "version": "2.0.5", diff --git a/package.json b/package.json index f0cba93..b87650a 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "@babel/core": "^7.8.4", "@babel/preset-env": "^7.8.4", "@types/jest": "^25.1.2", - "@zeplin/extension-model": "^2.5.1", + "@zeplin/extension-model": "^2.6.0", "adm-zip": "^0.4.11", "ajv": "^6.12.0", "babel-jest": "^25.1.0", diff --git a/src/sample-data/version.json b/src/sample-data/version.json index 2b58159..13a586b 100644 --- a/src/sample-data/version.json +++ b/src/sample-data/version.json @@ -18,6 +18,7 @@ { "type": "shape", "name": "Sample layer", + "sourceId": "15b2dbb4-3259-4c8e-a8e3-24b292145d21", "opacity": 1, "blendMode": "normal", "borderRadius": 0, @@ -37,6 +38,7 @@ { "type": "text", "name": "Text layer with multiple styles", + "sourceId": "859f1b9e-0437-4408-b84c-ea6c10c37d8f", "exportable": false, "rotation": 0, "opacity": 1, @@ -125,6 +127,7 @@ { "type": "text", "name": "Text layer", + "sourceId": "01c469df-4ff5-449d-8d2a-246c0e87f476", "exportable": false, "rotation": 0, "opacity": 1, @@ -169,6 +172,7 @@ { "type": "shape", "name": "Layer with blur", + "sourceId": "49ddae53-1bf3-48e4-ae70-b0ff0abcd1cf", "exportable": false, "rotation": 0, "opacity": 1, @@ -211,6 +215,7 @@ { "type": "shape", "name": "Exportable layer", + "sourceId": "f02c0baf-0353-4080-95a7-3448314b6084", "exportable": true, "rotation": 0, "opacity": 1, @@ -249,6 +254,7 @@ { "type": "shape", "name": "Layer with border radius", + "sourceId": "66d0761e-246a-4151-87f9-33feb47c6401", "exportable": false, "rotation": 0, "opacity": 1, @@ -287,6 +293,7 @@ { "type": "shape", "name": "Rotated layer", + "sourceId": "76ef71eb-04df-44fb-8ab8-c4214c2144e4", "exportable": false, "rotation": -45, "opacity": 1, @@ -325,6 +332,7 @@ { "type": "shape", "name": "Transparent layer with blend mode", + "sourceId": "5267442e-a184-4c0c-b9c1-24eaf2924d51", "exportable": false, "rotation": 0, "opacity": 0.3, @@ -363,6 +371,7 @@ { "type": "shape", "name": "Layer with shadow", + "sourceId": "e1ca8514-3755-4305-a854-230d25d7af28", "exportable": false, "rotation": 0, "opacity": 1, @@ -398,6 +407,7 @@ { "type": "shape", "name": "Layer with gradient fill", + "sourceId": "e156c599-4813-4a96-8516-0173799905c7", "exportable": false, "rotation": 0, "opacity": 1, @@ -486,6 +496,7 @@ { "type": "shape", "name": "Layer with fill", + "sourceId": "fd1c3674-bfca-4b6c-81d6-5033703e8891", "exportable": false, "rotation": 0, "opacity": 1, @@ -524,6 +535,7 @@ { "type": "shape", "name": "Layer with gradient border", + "sourceId": "e308b2cb-aa94-4294-a5e3-5e37ee0af33c", "exportable": false, "rotation": 0, "opacity": 1, @@ -616,6 +628,7 @@ { "type": "shape", "name": "Layer with border", + "sourceId": "8713de27-bf05-47d8-bc0f-90e1ce1cdbdc", "exportable": false, "rotation": 0, "opacity": 1, @@ -654,6 +667,79 @@ "shadows": [], "textStyles": [], "assets": [] + }, + { + "type": "group", + "name": "layer with layout", + "sourceId": "49478193-d2c9-4aa4-90b1-b06d70dfa9f5", + "layout": { + "alignment": "min", + "direction": "row", + "gap": 30, + "padding": { + "horizontal": 40, + "vertical": 20 + }, + "sizingMode": "auto" + }, + "opacity": 1, + "blendMode": "normal", + "borderRadius": 0, + "rect": { + "x": 0, + "y": 0, + "width": 310, + "height": 140 + }, + "content": "", + "layers": [ + { + "type": "shape", + "name": "first child", + "sourceId": "51081349-b540-4f27-997b-5fb405d286ff", + "opacity": 1, + "blendMode": "normal", + "borderRadius": 0, + "rect": { + "x": 40, + "y": 20, + "width": 100, + "height": 100 + }, + "content": "", + "borders": [], + "fills": [], + "shadows": [], + "textStyles": [], + "assets": [] + }, + { + "type": "shape", + "name": "second child", + "sourceId": "98535715-30ee-4ffd-acbf-04a0be34d73d", + "opacity": 1, + "blendMode": "normal", + "borderRadius": 0, + "rect": { + "x": 170, + "y": 20, + "width": 100, + "height": 100 + }, + + "content": "", + "borders": [], + "fills": [], + "shadows": [], + "textStyles": [], + "assets": [] + } + ], + "borders": [], + "fills": [], + "shadows": [], + "textStyles": [], + "assets": [] } ] } diff --git a/src/template/src/fixtures/version.json b/src/template/src/fixtures/version.json index 44fe9c4..0e551cd 100644 --- a/src/template/src/fixtures/version.json +++ b/src/template/src/fixtures/version.json @@ -18,6 +18,7 @@ { "type": "shape", "name": "Sample layer", + "sourceId": "15b2dbb4-3259-4c8e-a8e3-24b292145d21", "opacity": 1, "blendMode": "normal", "borderRadius": 0, @@ -37,6 +38,7 @@ { "type": "text", "name": "Text layer with multiple styles", + "sourceId": "859f1b9e-0437-4408-b84c-ea6c10c37d8f", "exportable": false, "rotation": 0, "opacity": 1, @@ -125,6 +127,7 @@ { "type": "text", "name": "Text layer", + "sourceId": "01c469df-4ff5-449d-8d2a-246c0e87f476", "exportable": false, "rotation": 0, "opacity": 1, @@ -169,6 +172,7 @@ { "type": "shape", "name": "Layer with blur", + "sourceId": "49ddae53-1bf3-48e4-ae70-b0ff0abcd1cf", "exportable": false, "rotation": 0, "opacity": 1, @@ -205,6 +209,7 @@ { "type": "shape", "name": "Exportable layer", + "sourceId": "f02c0baf-0353-4080-95a7-3448314b6084", "exportable": true, "rotation": 0, "opacity": 1, @@ -237,6 +242,7 @@ { "type": "shape", "name": "Layer with border radius", + "sourceId": "66d0761e-246a-4151-87f9-33feb47c6401", "exportable": false, "rotation": 0, "opacity": 1, @@ -269,6 +275,7 @@ { "type": "shape", "name": "Rotated layer", + "sourceId": "76ef71eb-04df-44fb-8ab8-c4214c2144e4", "exportable": false, "rotation": -45, "opacity": 1, @@ -301,6 +308,7 @@ { "type": "shape", "name": "Transparent layer with blend mode", + "sourceId": "5267442e-a184-4c0c-b9c1-24eaf2924d51", "exportable": false, "rotation": 0, "opacity": 0.3, @@ -333,6 +341,7 @@ { "type": "shape", "name": "Layer with shadow", + "sourceId": "e1ca8514-3755-4305-a854-230d25d7af28", "exportable": false, "rotation": 0, "opacity": 1, @@ -368,6 +377,7 @@ { "type": "shape", "name": "Layer with gradient fill", + "sourceId": "e156c599-4813-4a96-8516-0173799905c7", "exportable": false, "rotation": 0, "opacity": 1, @@ -425,6 +435,7 @@ { "type": "shape", "name": "Layer with fill", + "sourceId": "fd1c3674-bfca-4b6c-81d6-5033703e8891", "exportable": false, "rotation": 0, "opacity": 1, @@ -457,6 +468,7 @@ { "type": "shape", "name": "Layer with gradient border", + "sourceId": "e308b2cb-aa94-4294-a5e3-5e37ee0af33c", "exportable": false, "rotation": 0, "opacity": 1, @@ -516,6 +528,7 @@ { "type": "shape", "name": "Layer with border", + "sourceId": "8713de27-bf05-47d8-bc0f-90e1ce1cdbdc", "exportable": false, "rotation": 0, "opacity": 1, @@ -546,6 +559,79 @@ "shadows": [], "textStyles": [], "assets": [] + }, + { + "type": "group", + "name": "layer with layout", + "sourceId": "49478193-d2c9-4aa4-90b1-b06d70dfa9f5", + "layout": { + "alignment": "min", + "direction": "row", + "gap": 30, + "padding": { + "horizontal": 40, + "vertical": 20 + }, + "sizingMode": "auto" + }, + "opacity": 1, + "blendMode": "normal", + "borderRadius": 0, + "rect": { + "x": 0, + "y": 0, + "width": 310, + "height": 140 + }, + "content": "", + "layers": [ + { + "type": "shape", + "name": "first child", + "sourceId": "51081349-b540-4f27-997b-5fb405d286ff", + "opacity": 1, + "blendMode": "normal", + "borderRadius": 0, + "rect": { + "x": 40, + "y": 20, + "width": 100, + "height": 100 + }, + "content": "", + "borders": [], + "fills": [], + "shadows": [], + "textStyles": [], + "assets": [] + }, + { + "type": "shape", + "name": "second child", + "sourceId": "98535715-30ee-4ffd-acbf-04a0be34d73d", + "opacity": 1, + "blendMode": "normal", + "borderRadius": 0, + "rect": { + "x": 170, + "y": 20, + "width": 100, + "height": 100 + }, + + "content": "", + "borders": [], + "fills": [], + "shadows": [], + "textStyles": [], + "assets": [] + } + ], + "borders": [], + "fills": [], + "shadows": [], + "textStyles": [], + "assets": [] } ] }