UNPKG

rizzo-next

Version:

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

1,385 lines (1,384 loc) 215 kB
{ "type": "Program", "start": 0, "end": 1958, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 76, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ExpressionStatement", "start": 268, "end": 1939, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 74, "column": 11 } }, "expression": { "type": "CallExpression", "start": 268, "end": 1938, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 74, "column": 10 } }, "callee": { "type": "FunctionExpression", "start": 269, "end": 1929, "loc": { "start": { "line": 8, "column": 1 }, "end": { "line": 74, "column": 1 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 278, "end": 279, "loc": { "start": { "line": 8, "column": 10 }, "end": { "line": 8, "column": 11 } }, "name": "$", "leadingComments": null } ], "body": { "type": "BlockStatement", "start": 281, "end": 1929, "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 74, "column": 1 } }, "body": [ { "type": "ExpressionStatement", "start": 286, "end": 431, "loc": { "start": { "line": 10, "column": 2 }, "end": { "line": 15, "column": 4 } }, "expression": { "type": "AssignmentExpression", "start": 286, "end": 430, "loc": { "start": { "line": 10, "column": 2 }, "end": { "line": 15, "column": 3 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 286, "end": 299, "loc": { "start": { "line": 10, "column": 2 }, "end": { "line": 10, "column": 15 } }, "object": { "type": "Identifier", "start": 286, "end": 287, "loc": { "start": { "line": 10, "column": 2 }, "end": { "line": 10, "column": 3 } }, "name": "$" }, "property": { "type": "Identifier", "start": 288, "end": 299, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 15 } }, "name": "detectSwipe" }, "computed": false }, "right": { "type": "ObjectExpression", "start": 302, "end": 430, "loc": { "start": { "line": 10, "column": 18 }, "end": { "line": 15, "column": 3 } }, "properties": [ { "type": "Property", "start": 308, "end": 324, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 20 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 308, "end": 315, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 11 } }, "name": "version" }, "value": { "type": "Literal", "start": 317, "end": 324, "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 20 } }, "value": "2.1.1", "rawValue": "2.1.1", "raw": "'2.1.1'" }, "kind": "init" }, { "type": "Property", "start": 330, "end": 381, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 55 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 330, "end": 337, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 11 } }, "name": "enabled" }, "value": { "type": "BinaryExpression", "start": 339, "end": 381, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 55 } }, "left": { "type": "Literal", "start": 339, "end": 353, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 27 } }, "value": "ontouchstart", "rawValue": "ontouchstart", "raw": "'ontouchstart'" }, "operator": "in", "right": { "type": "MemberExpression", "start": 357, "end": 381, "loc": { "start": { "line": 12, "column": 31 }, "end": { "line": 12, "column": 55 } }, "object": { "type": "Identifier", "start": 357, "end": 365, "loc": { "start": { "line": 12, "column": 31 }, "end": { "line": 12, "column": 39 } }, "name": "document" }, "property": { "type": "Identifier", "start": 366, "end": 381, "loc": { "start": { "line": 12, "column": 40 }, "end": { "line": 12, "column": 55 } }, "name": "documentElement" }, "computed": false } }, "kind": "init" }, { "type": "Property", "start": 387, "end": 407, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 24 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 387, "end": 401, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 18 } }, "name": "preventDefault" }, "value": { "type": "Literal", "start": 403, "end": 407, "loc": { "start": { "line": 13, "column": 20 }, "end": { "line": 13, "column": 24 } }, "value": true, "rawValue": true, "raw": "true" }, "kind": "init" }, { "type": "Property", "start": 413, "end": 426, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 17 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 413, "end": 422, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 13 } }, "name": "threshold" }, "value": { "type": "Literal", "start": 424, "end": 426, "loc": { "start": { "line": 14, "column": 15 }, "end": { "line": 14, "column": 17 } }, "value": 20, "rawValue": 20, "raw": "20" }, "kind": "init" } ] } } }, { "type": "VariableDeclaration", "start": 435, "end": 480, "loc": { "start": { "line": 17, "column": 2 }, "end": { "line": 19, "column": 21 } }, "declarations": [ { "type": "VariableDeclarator", "start": 439, "end": 445, "loc": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 12 } }, "id": { "type": "Identifier", "start": 439, "end": 445, "loc": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 12 } }, "name": "startX" }, "init": null }, { "type": "VariableDeclarator", "start": 451, "end": 457, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 10 } }, "id": { "type": "Identifier", "start": 451, "end": 457, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 10 } }, "name": "startY" }, "init": null }, { "type": "VariableDeclarator", "start": 463, "end": 479, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 20 } }, "id": { "type": "Identifier", "start": 463, "end": 471, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 12 } }, "name": "isMoving" }, "init": { "type": "Literal", "start": 474, "end": 479, "loc": { "start": { "line": 19, "column": 15 }, "end": { "line": 19, "column": 20 } }, "value": false, "rawValue": false, "raw": "false" } } ], "kind": "var" }, { "type": "FunctionDeclaration", "start": 484, "end": 643, "loc": { "start": { "line": 21, "column": 2 }, "end": { "line": 25, "column": 3 } }, "id": { "type": "Identifier", "start": 493, "end": 503, "loc": { "start": { "line": 21, "column": 11 }, "end": { "line": 21, "column": 21 } }, "name": "onTouchEnd" }, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 506, "end": 643, "loc": { "start": { "line": 21, "column": 24 }, "end": { "line": 25, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 512, "end": 563, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 55 } }, "expression": { "type": "CallExpression", "start": 512, "end": 562, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 54 } }, "callee": { "type": "MemberExpression", "start": 512, "end": 536, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 28 } }, "object": { "type": "ThisExpression", "start": 512, "end": 516, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 8 } } }, "property": { "type": "Identifier", "start": 517, "end": 536, "loc": { "start": { "line": 22, "column": 9 }, "end": { "line": 22, "column": 28 } }, "name": "removeEventListener" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 537, "end": 548, "loc": { "start": { "line": 22, "column": 29 }, "end": { "line": 22, "column": 40 } }, "value": "touchmove", "rawValue": "touchmove", "raw": "'touchmove'" }, { "type": "Identifier", "start": 550, "end": 561, "loc": { "start": { "line": 22, "column": 42 }, "end": { "line": 22, "column": 53 } }, "name": "onTouchMove" } ] } }, { "type": "ExpressionStatement", "start": 568, "end": 617, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 53 } }, "expression": { "type": "CallExpression", "start": 568, "end": 616, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 52 } }, "callee": { "type": "MemberExpression", "start": 568, "end": 592, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 28 } }, "object": { "type": "ThisExpression", "start": 568, "end": 572, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 8 } } }, "property": { "type": "Identifier", "start": 573, "end": 592, "loc": { "start": { "line": 23, "column": 9 }, "end": { "line": 23, "column": 28 } }, "name": "removeEventListener" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 593, "end": 603, "loc": { "start": { "line": 23, "column": 29 }, "end": { "line": 23, "column": 39 } }, "value": "touchend", "rawValue": "touchend", "raw": "'touchend'" }, { "type": "Identifier", "start": 605, "end": 615, "loc": { "start": { "line": 23, "column": 41 }, "end": { "line": 23, "column": 51 } }, "name": "onTouchEnd" } ] } }, { "type": "ExpressionStatement", "start": 622, "end": 639, "loc": { "start": { "line": 24, "column": 4 }, "end": { "line": 24, "column": 21 } }, "expression": { "type": "AssignmentExpression", "start": 622, "end": 638, "loc": { "start": { "line": 24, "column": 4 }, "end": { "line": 24, "column": 20 } }, "operator": "=", "left": { "type": "Identifier", "start": 622, "end": 630, "loc": { "start": { "line": 24, "column": 4 }, "end": { "line": 24, "column": 12 } }, "name": "isMoving" }, "right": { "type": "Literal", "start": 633, "end": 638, "loc": { "start": { "line": 24, "column": 15 }, "end": { "line": 24, "column": 20 } }, "value": false, "rawValue": false, "raw": "false" } } } ] } }, { "type": "FunctionDeclaration", "start": 647, "end": 1228, "loc": { "start": { "line": 27, "column": 2 }, "end": { "line": 47, "column": 3 } }, "id": { "type": "Identifier", "start": 656, "end": 667, "loc": { "start": { "line": 27, "column": 11 }, "end": { "line": 27, "column": 22 } }, "name": "onTouchMove" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 668, "end": 669, "loc": { "start": { "line": 27, "column": 23 }, "end": { "line": 27, "column": 24 } }, "name": "e" } ], "body": { "type": "BlockStatement", "start": 671, "end": 1228, "loc": { "start": { "line": 27, "column": 26 }, "end": { "line": 47, "column": 3 } }, "body": [ { "type": "IfStatement", "start": 677, "end": 734, "loc": { "start": { "line": 28, "column": 4 }, "end": { "line": 28, "column": 61 } }, "test": { "type": "MemberExpression", "start": 681, "end": 709, "loc": { "start": { "line": 28, "column": 8 }, "end": { "line": 28, "column": 36 } }, "object": { "type": "MemberExpression", "start": 681, "end": 694, "loc": { "start": { "line": 28, "column": 8 }, "end": { "line": 28, "column": 21 } }, "object": { "type": "Identifier", "start": 681, "end": 682, "loc": { "start": { "line": 28, "column": 8 }, "end": { "line": 28, "column": 9 } }, "name": "$" }, "property": { "type": "Identifier", "start": 683, "end": 694, "loc": { "start": { "line": 28, "column": 10 }, "end": { "line": 28, "column": 21 } }, "name": "detectSwipe" }, "computed": false }, "property": { "type": "Identifier", "start": 695, "end": 709, "loc": { "start": { "line": 28, "column": 22 }, "end": { "line": 28, "column": 36 } }, "name": "preventDefault" }, "computed": false }, "consequent": { "type": "BlockStatement", "start": 711, "end": 734, "loc": { "start": { "line": 28, "column": 38 }, "end": { "line": 28, "column": 61 } }, "body": [ { "type": "ExpressionStatement", "start": 713, "end": 732, "loc": { "start": { "line": 28, "column": 40 }, "end": { "line": 28, "column": 59 } }, "expression": { "type": "CallExpression", "start": 713, "end": 731, "loc": { "start": { "line": 28, "column": 40 }, "end": { "line": 28, "column": 58 } }, "callee": { "type": "MemberExpression", "start": 713, "end": 729, "loc": { "start": { "line": 28, "column": 40 }, "end": { "line": 28, "column": 56 } }, "object": { "type": "Identifier", "start": 713, "end": 714, "loc": { "start": { "line": 28, "column": 40 }, "end": { "line": 28, "column": 41 } }, "name": "e" }, "property": { "type": "Identifier", "start": 715, "end": 729, "loc": { "start": { "line": 28, "column": 42 }, "end": { "line": 28, "column": 56 } }, "name": "preventDefault" }, "computed": false }, "arguments": [] } } ] }, "alternate": null }, { "type": "IfStatement", "start": 739, "end": 1224, "loc": { "start": { "line": 29, "column": 4 }, "end": { "line": 46, "column": 5 } }, "test": { "type": "Identifier", "start": 742, "end": 750, "loc": { "start": { "line": 29, "column": 7 }, "end": { "line": 29, "column": 15 } }, "name": "isMoving" }, "consequent": { "type": "BlockStatement", "start": 752, "end": 1224, "loc": { "start": { "line": 29, "column": 17 }, "end": { "line": 46, "column": 5 } }, "body": [ { "type": "VariableDeclaration", "start": 760, "end": 787, "loc": { "start": { "line": 30, "column": 6 }, "end": { "line": 30, "column": 33 } }, "declarations": [ { "type": "VariableDeclarator", "start": 764, "end": 786, "loc": { "start": { "line": 30, "column": 10 }, "end": { "line": 30, "column": 32 } }, "id": { "type": "Identifier", "start": 764, "end": 765, "loc": { "start": { "line": 30, "column": 10 }, "end": { "line": 30, "column": 11 } }, "name": "x" }, "init": { "type": "MemberExpression", "start": 768, "end": 786, "loc": { "start": { "line": 30, "column": 14 }, "end": { "line": 30, "column": 32 } }, "object": { "type": "MemberExpression", "start": 768, "end": 780, "loc": { "start": { "line": 30, "column": 14 }, "end": { "line": 30, "column": 26 } }, "object": { "type": "MemberExpression", "start": 768, "end": 777, "loc": { "start": { "line": 30, "column": 14 }, "end": { "line": 30, "column": 23 } }, "object": { "type": "Identifier", "start": 768, "end": 769, "loc": { "start": { "line": 30, "column": 14 }, "end": { "line": 30, "column": 15 } }, "name": "e" }, "property": { "type": "Identifier", "start": 770, "end": 777, "loc": { "start": { "line": 30, "column": 16 }, "end": { "line": 30, "column": 23 } }, "name": "touches" }, "computed": false }, "property": { "type": "Literal", "start": 778, "end": 779, "loc": { "start": { "line": 30, "column": 24 }, "end": { "line": 30, "column": 25 } }, "value": 0, "rawValue": 0, "raw": "0" },