UNPKG

rizzo-next

Version:

The next generation of Lonely Planet's style guide and pattern library.

1,508 lines 711 kB
{ "type": "Program", "start": 0, "end": 6237, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 294, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 44, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 44 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 9, "end": 18, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } }, "imported": { "type": "Identifier", "start": 9, "end": 18, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } }, "name": "Component" }, "local": { "type": "Identifier", "start": 9, "end": 18, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } }, "name": "Component" } } ], "importKind": "value", "source": { "type": "Literal", "start": 26, "end": 43, "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 43 } }, "value": "../../core/bane", "rawValue": "../../core/bane", "raw": "\"../../core/bane\"" } }, { "type": "ImportDeclaration", "start": 45, "end": 112, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 67 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 52, "end": 69, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 24 } }, "local": { "type": "Identifier", "start": 52, "end": 69, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 24 } }, "name": "waitForTransition" } } ], "importKind": "value", "source": { "type": "Literal", "start": 75, "end": 111, "loc": { "start": { "line": 2, "column": 30 }, "end": { "line": 2, "column": 66 } }, "value": "../../core/utils/waitForTransition", "rawValue": "../../core/utils/waitForTransition", "raw": "\"../../core/utils/waitForTransition\"" } }, { "type": "ImportDeclaration", "start": 113, "end": 160, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 47 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 120, "end": 134, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 21 } }, "local": { "type": "Identifier", "start": 120, "end": 134, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 21 } }, "name": "SlideComponent" } } ], "importKind": "value", "source": { "type": "Literal", "start": 140, "end": 159, "loc": { "start": { "line": 3, "column": 27 }, "end": { "line": 3, "column": 46 } }, "value": "./slide_component", "rawValue": "./slide_component", "raw": "\"./slide_component\"" }, "trailingComments": [ { "type": "Block", "value": "*\n * slideshow Component\n", "start": 162, "end": 191, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 7, "column": 2 } }, "range": [ 162, 191 ] } ] }, { "type": "ExportDefaultDeclaration", "start": 192, "end": 6236, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 293, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 207, "end": 6236, "loc": { "start": { "line": 8, "column": 15 }, "end": { "line": 293, "column": 1 } }, "id": { "type": "Identifier", "start": 213, "end": 222, "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 30 } }, "name": "Slideshow", "leadingComments": null }, "superClass": { "type": "Identifier", "start": 231, "end": 240, "loc": { "start": { "line": 8, "column": 39 }, "end": { "line": 8, "column": 48 } }, "name": "Component" }, "body": { "type": "ClassBody", "start": 241, "end": 6236, "loc": { "start": { "line": 8, "column": 49 }, "end": { "line": 293, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 245, "end": 290, "loc": { "start": { "line": 9, "column": 2 }, "end": { "line": 11, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 256, "end": 265, "loc": { "start": { "line": 9, "column": 13 }, "end": { "line": 9, "column": 22 } }, "name": "loopSpeed" }, "static": true, "kind": "get", "value": { "type": "FunctionExpression", "start": 265, "end": 290, "loc": { "start": { "line": 9, "column": 22 }, "end": { "line": 11, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 268, "end": 290, "loc": { "start": { "line": 9, "column": 25 }, "end": { "line": 11, "column": 3 } }, "body": [ { "type": "ReturnStatement", "start": 274, "end": 286, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 16 } }, "argument": { "type": "Literal", "start": 281, "end": 285, "loc": { "start": { "line": 10, "column": 11 }, "end": { "line": 10, "column": 15 } }, "value": 6000, "rawValue": 6000, "raw": "6000" } } ] } } }, { "type": "MethodDefinition", "start": 294, "end": 355, "loc": { "start": { "line": 13, "column": 2 }, "end": { "line": 15, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 298, "end": 305, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 13 } }, "name": "padding" }, "static": false, "kind": "get", "value": { "type": "FunctionExpression", "start": 305, "end": 355, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 15, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 308, "end": 355, "loc": { "start": { "line": 13, "column": 16 }, "end": { "line": 15, "column": 3 } }, "body": [ { "type": "ReturnStatement", "start": 314, "end": 351, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 41 } }, "argument": { "type": "ConditionalExpression", "start": 321, "end": 350, "loc": { "start": { "line": 14, "column": 11 }, "end": { "line": 14, "column": 40 } }, "test": { "type": "BinaryExpression", "start": 321, "end": 342, "loc": { "start": { "line": 14, "column": 11 }, "end": { "line": 14, "column": 32 } }, "left": { "type": "MemberExpression", "start": 321, "end": 330, "loc": { "start": { "line": 14, "column": 11 }, "end": { "line": 14, "column": 20 } }, "object": { "type": "ThisExpression", "start": 321, "end": 325, "loc": { "start": { "line": 14, "column": 11 }, "end": { "line": 14, "column": 15 } } }, "property": { "type": "Identifier", "start": 326, "end": 330, "loc": { "start": { "line": 14, "column": 16 }, "end": { "line": 14, "column": 20 } }, "name": "type" }, "computed": false }, "operator": "===", "right": { "type": "Literal", "start": 335, "end": 342, "loc": { "start": { "line": 14, "column": 25 }, "end": { "line": 14, "column": 32 } }, "value": "slide", "rawValue": "slide", "raw": "\"slide\"" } }, "consequent": { "type": "Literal", "start": 345, "end": 346, "loc": { "start": { "line": 14, "column": 35 }, "end": { "line": 14, "column": 36 } }, "value": 2, "rawValue": 2, "raw": "2" }, "alternate": { "type": "Literal", "start": 349, "end": 350, "loc": { "start": { "line": 14, "column": 39 }, "end": { "line": 14, "column": 40 } }, "value": 1, "rawValue": 1, "raw": "1" } } } ] } } }, { "type": "MethodDefinition", "start": 359, "end": 424, "loc": { "start": { "line": 17, "column": 2 }, "end": { "line": 19, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 363, "end": 369, "loc": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 12 } }, "name": "slides" }, "static": false, "kind": "get", "value": { "type": "FunctionExpression", "start": 369, "end": 424, "loc": { "start": { "line": 17, "column": 12 }, "end": { "line": 19, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 371, "end": 424, "loc": { "start": { "line": 17, "column": 14 }, "end": { "line": 19, "column": 3 } }, "body": [ { "type": "ReturnStatement", "start": 377, "end": 420, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 47 } }, "argument": { "type": "LogicalExpression", "start": 384, "end": 419, "loc": { "start": { "line": 18, "column": 11 }, "end": { "line": 18, "column": 46 } }, "left": { "type": "MemberExpression", "start": 384, "end": 396, "loc": { "start": { "line": 18, "column": 11 }, "end": { "line": 18, "column": 23 } }, "object": { "type": "ThisExpression", "start": 384, "end": 388, "loc": { "start": { "line": 18, "column": 11 }, "end": { "line": 18, "column": 15 } } }, "property": { "type": "Identifier", "start": 389, "end": 396, "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 18, "column": 23 } }, "name": "_slides" }, "computed": false }, "operator": "||", "right": { "type": "AssignmentExpression", "start": 401, "end": 418, "loc": { "start": { "line": 18, "column": 28 }, "end": { "line": 18, "column": 45 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 401, "end": 413, "loc": { "start": { "line": 18, "column": 28 }, "end": { "line": 18, "column": 40 } }, "object": { "type": "ThisExpression", "start": 401, "end": 405, "loc": { "start": { "line": 18, "column": 28 }, "end": { "line": 18, "column": 32 } } }, "property": { "type": "Identifier", "start": 406, "end": 413, "loc": { "start": { "line": 18, "column": 33 }, "end": { "line": 18, "column": 40 } }, "name": "_slides" }, "computed": false }, "right": { "type": "ArrayExpression", "start": 416, "end": 418, "loc": { "start": { "line": 18, "column": 43 }, "end": { "line": 18, "column": 45 } }, "elements": [] }, "parenthesizedExpression": true } } } ] } } }, { "type": "MethodDefinition", "start": 428, "end": 490, "loc": { "start": { "line": 21, "column": 2 }, "end": { "line": 23, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 432, "end": 437, "loc": { "start": { "line": 21, "column": 6 }, "end": { "line": 21, "column": 11 } }, "name": "stack" }, "static": false, "kind": "get", "value": { "type": "FunctionExpression", "start": 437, "end": 490, "loc": { "start": { "line": 21, "column": 11 }, "end": { "line": 23, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 439, "end": 490, "loc": { "start": { "line": 21, "column": 13 }, "end": { "line": 23, "column": 3 } }, "body": [ { "type": "ReturnStatement", "start": 445, "end": 486, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 45 } }, "argument": { "type": "LogicalExpression", "start": 452, "end": 485, "loc": { "start": { "line": 22, "column": 11 }, "end": { "line": 22, "column": 44 } }, "left": { "type": "MemberExpression", "start": 452, "end": 463, "loc": { "start": { "line": 22, "column": 11 }, "end": { "line": 22, "column": 22 } }, "object": { "type": "ThisExpression", "start": 452, "end": 456, "loc": { "start": { "line": 22, "column": 11 }, "end": { "line": 22, "column": 15 } } }, "property": { "type": "Identifier", "start": 457, "end": 463, "loc": { "start": { "line": 22, "column": 16 }, "end": { "line": 22, "column": 22 } }, "name": "_stack" }, "computed": false }, "operator": "||", "right": { "type": "AssignmentExpression", "start": 468, "end": 484, "loc": { "start": { "line": 22, "column": 27 }, "end": { "line": 22, "column": 43 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 468, "end": 479, "loc": { "start": { "line": 22, "column": 27 }, "end": { "line": 22, "column": 38 } }, "object": { "type": "ThisExpression", "start": 468, "end": 472, "loc": { "start": { "line": 22, "column": 27 }, "end": { "line": 22, "column": 31 } } }, "property": { "type": "Identifier", "start": 473, "end": 479, "loc": { "start": { "line": 22, "column": 32 }, "end": { "line": 22, "column": 38 } }, "name": "_stack" }, "computed": false }, "right": { "type": "ArrayExpression", "start": 482, "end": 484, "loc": { "start": { "line": 22, "column": 41 }, "end": { "line": 22, "column": 43 } }, "elements": [] }, "parenthesizedExpression": true } } } ] } } }, { "type": "MethodDefinition", "start": 494, "end": 812, "loc": { "start": { "line": 25, "column": 2 }, "end": { "line": 39, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 498, "end": 505, "loc": { "start": { "line": 25, "column": 6 }, "end": { "line": 25, "column": 13 } }, "name": "$images" }, "static": false, "kind": "get", "value": { "type": "FunctionExpression", "start": 505, "end": 812, "loc": { "start": { "line": 25, "column": 13 }, "end": { "line": 39, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 507, "end": 812, "loc": { "start": { "line": 25, "column": 15 }, "end": { "line": 39, "column": 3 } }, "body": [ { "type": "IfStatement", "start": 513, "end": 781, "loc": { "start": { "line": 26, "column": 4 }, "end": { "line": 36, "column": 5 } }, "test": { "type": "UnaryExpression", "start": 516, "end": 530, "loc": { "start": { "line": 26, "column": 7 }, "end": { "line": 26, "column": 21 } }, "operator": "!", "prefix": true, "argument": { "type": "MemberExpression", "start": 517, "end": 530, "loc": { "start": { "line": 26, "column": 8 }, "end": { "line": 26, "column": 21 } }, "object": { "type": "ThisExpression", "start": 517, "end": 521, "loc": { "start": { "line": 26, "column": 8 }, "end": { "line": 26, "column": 12 } } }, "property": { "type": "Identifier", "start": 522, "end": 530, "loc": { "start": { "line": 26, "column": 13 }, "end": { "line": 26, "column": 21 } }, "name": "_$images" }, "computed": false } }, "consequent": { "type": "BlockStatement", "start": 532, "end": 781, "loc": { "start": { "line": 26, "column": 23 }, "end": { "line": 36, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 540, "end": 592, "loc": { "start": { "line": 27, "column": 6 }, "end": { "line": 27, "column": 58 } }, "expression": { "type": "AssignmentExpression", "start": 540, "end": 591, "loc": { "start": { "line": 27, "column": 6 }, "end": { "line": 27, "column": 57 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 540, "end": 553, "loc": { "start": { "line": 27, "column": 6 }, "end": { "line": 27, "column": 19 } }, "object": { "type": "ThisExpression", "start": 540, "end": 544, "loc": { "start": { "line": 27, "column": 6 }, "end": { "line": 27, "column": 10 } } }, "property": { "type": "Identifier", "start": 545, "end": 553, "loc": { "start": { "line": 27, "column": 11 }, "end": { "line": 27, "column": 19 } }, "name": "_$images" }, "computed": false }, "right": { "type": "CallExpression", "start": 556, "end": 591, "loc": { "start": { "line": 27, "column": 22 }, "end": { "line": 27, "column": 57 } }, "callee": { "type": "MemberExpression", "start": 556, "end": 569, "loc": { "start": { "line": 27, "column": 22 }, "end": { "line": 27, "column": 35 } }, "object": { "type": "MemberExpression", "start": 556, "end": 564, "loc": { "start": { "line": 27, "column": 22 }, "end": { "line": 27, "column": 30 } }, "object": { "type": "ThisExpression", "start": 556, "end": 560, "loc": { "start": { "line": 27, "column": 22 }, "end": { "line": 27, "column": 26 } } }, "property": { "type": "Identifier", "start": 561, "end": 564, "loc": { "start": { "line": 27, "column": 27 }, "end": { "line": 27, "column": 30 } }, "name": "$el" }, "computed": false }, "property": { "type": "Identifier", "start": 565, "end": 569, "loc": { "start": { "line": 27, "column": 31 }, "end": { "line": 27, "column": 35 } }, "name": "find" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 570, "end": 590, "loc": { "start": { "line": 27, "column": 36 }, "end": { "line": 27, "column": 56 } }, "value": ".slideshow__images", "rawValue": ".slideshow__images", "raw": "\".slideshow__images\"" } ] } } }, { "type": "IfStatement", "start": 600, "end": 745, "loc": { "start": { "line": 29, "column": 6 }, "end": { "line": 33, "column": 7 } }, "test": { "type": "UnaryExpression", "start": 604, "end": 625, "loc": { "start": { "line": 29, "column": 10 }, "end": { "line": 29, "column": 31 } }, "operator": "!", "prefix": true, "argument": { "type": "MemberExpression", "start": 605, "end": 625, "loc": { "start": { "line": 29, "column": 11 }, "end": { "line": 29, "column": 31 } }, "object"