Skip to content

Commit

Permalink
Add layout and sourceId fields to layer fixtures (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sertaç Karahoda authored Nov 6, 2020
1 parent bddb3c1 commit 8ec1474
Show file tree
Hide file tree
Showing 4 changed files with 176 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
86 changes: 86 additions & 0 deletions src/sample-data/version.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
{
"type": "shape",
"name": "Sample layer",
"sourceId": "15b2dbb4-3259-4c8e-a8e3-24b292145d21",
"opacity": 1,
"blendMode": "normal",
"borderRadius": 0,
Expand All @@ -37,6 +38,7 @@
{
"type": "text",
"name": "Text layer with multiple styles",
"sourceId": "859f1b9e-0437-4408-b84c-ea6c10c37d8f",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -125,6 +127,7 @@
{
"type": "text",
"name": "Text layer",
"sourceId": "01c469df-4ff5-449d-8d2a-246c0e87f476",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -169,6 +172,7 @@
{
"type": "shape",
"name": "Layer with blur",
"sourceId": "49ddae53-1bf3-48e4-ae70-b0ff0abcd1cf",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -211,6 +215,7 @@
{
"type": "shape",
"name": "Exportable layer",
"sourceId": "f02c0baf-0353-4080-95a7-3448314b6084",
"exportable": true,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -249,6 +254,7 @@
{
"type": "shape",
"name": "Layer with border radius",
"sourceId": "66d0761e-246a-4151-87f9-33feb47c6401",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -287,6 +293,7 @@
{
"type": "shape",
"name": "Rotated layer",
"sourceId": "76ef71eb-04df-44fb-8ab8-c4214c2144e4",
"exportable": false,
"rotation": -45,
"opacity": 1,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -363,6 +371,7 @@
{
"type": "shape",
"name": "Layer with shadow",
"sourceId": "e1ca8514-3755-4305-a854-230d25d7af28",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -398,6 +407,7 @@
{
"type": "shape",
"name": "Layer with gradient fill",
"sourceId": "e156c599-4813-4a96-8516-0173799905c7",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -486,6 +496,7 @@
{
"type": "shape",
"name": "Layer with fill",
"sourceId": "fd1c3674-bfca-4b6c-81d6-5033703e8891",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -524,6 +535,7 @@
{
"type": "shape",
"name": "Layer with gradient border",
"sourceId": "e308b2cb-aa94-4294-a5e3-5e37ee0af33c",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -616,6 +628,7 @@
{
"type": "shape",
"name": "Layer with border",
"sourceId": "8713de27-bf05-47d8-bc0f-90e1ce1cdbdc",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -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": []
}
]
}
Expand Down
86 changes: 86 additions & 0 deletions src/template/src/fixtures/version.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
{
"type": "shape",
"name": "Sample layer",
"sourceId": "15b2dbb4-3259-4c8e-a8e3-24b292145d21",
"opacity": 1,
"blendMode": "normal",
"borderRadius": 0,
Expand All @@ -37,6 +38,7 @@
{
"type": "text",
"name": "Text layer with multiple styles",
"sourceId": "859f1b9e-0437-4408-b84c-ea6c10c37d8f",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -125,6 +127,7 @@
{
"type": "text",
"name": "Text layer",
"sourceId": "01c469df-4ff5-449d-8d2a-246c0e87f476",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -169,6 +172,7 @@
{
"type": "shape",
"name": "Layer with blur",
"sourceId": "49ddae53-1bf3-48e4-ae70-b0ff0abcd1cf",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -205,6 +209,7 @@
{
"type": "shape",
"name": "Exportable layer",
"sourceId": "f02c0baf-0353-4080-95a7-3448314b6084",
"exportable": true,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -237,6 +242,7 @@
{
"type": "shape",
"name": "Layer with border radius",
"sourceId": "66d0761e-246a-4151-87f9-33feb47c6401",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -269,6 +275,7 @@
{
"type": "shape",
"name": "Rotated layer",
"sourceId": "76ef71eb-04df-44fb-8ab8-c4214c2144e4",
"exportable": false,
"rotation": -45,
"opacity": 1,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -333,6 +341,7 @@
{
"type": "shape",
"name": "Layer with shadow",
"sourceId": "e1ca8514-3755-4305-a854-230d25d7af28",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -368,6 +377,7 @@
{
"type": "shape",
"name": "Layer with gradient fill",
"sourceId": "e156c599-4813-4a96-8516-0173799905c7",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -425,6 +435,7 @@
{
"type": "shape",
"name": "Layer with fill",
"sourceId": "fd1c3674-bfca-4b6c-81d6-5033703e8891",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -457,6 +468,7 @@
{
"type": "shape",
"name": "Layer with gradient border",
"sourceId": "e308b2cb-aa94-4294-a5e3-5e37ee0af33c",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -516,6 +528,7 @@
{
"type": "shape",
"name": "Layer with border",
"sourceId": "8713de27-bf05-47d8-bc0f-90e1ce1cdbdc",
"exportable": false,
"rotation": 0,
"opacity": 1,
Expand Down Expand Up @@ -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": []
}
]
}
Expand Down

0 comments on commit 8ec1474

Please sign in to comment.