UNPKG

rizzo-next

Version:

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

1,065 lines (1,064 loc) 258 kB
{ "type": "Program", "start": 0, "end": 936, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 47, "column": 0 } }, "sourceType": "module", "body": [ { "type": "Identifier", "start": 0, "end": 900, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 44, "column": 4 } }, "declarations": [ { "type": "VariableDeclarator", "start": 4, "end": 899, "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 44, "column": 3 } }, "id": { "type": "Identifier", "start": 4, "end": 21, "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 21 } }, "name": "getScrollbarWidth" }, "init": { "type": "CallExpression", "start": 24, "end": 899, "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 44, "column": 3 } }, "callee": { "type": "FunctionExpression", "start": 24, "end": 897, "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 44, "column": 1 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 34, "end": 897, "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 44, "column": 1 } }, "body": [ { "type": "VariableDeclaration", "start": 38, "end": 90, "loc": { "start": { "line": 2, "column": 2 }, "end": { "line": 2, "column": 54 } }, "declarations": [ { "type": "VariableDeclarator", "start": 42, "end": 89, "loc": { "start": { "line": 2, "column": 6 }, "end": { "line": 2, "column": 53 } }, "id": { "type": "Identifier", "start": 42, "end": 46, "loc": { "start": { "line": 2, "column": 6 }, "end": { "line": 2, "column": 10 } }, "name": "html" }, "init": { "type": "MemberExpression", "start": 49, "end": 89, "loc": { "start": { "line": 2, "column": 13 }, "end": { "line": 2, "column": 53 } }, "object": { "type": "CallExpression", "start": 49, "end": 86, "loc": { "start": { "line": 2, "column": 13 }, "end": { "line": 2, "column": 50 } }, "callee": { "type": "MemberExpression", "start": 49, "end": 78, "loc": { "start": { "line": 2, "column": 13 }, "end": { "line": 2, "column": 42 } }, "object": { "type": "Identifier", "start": 49, "end": 57, "loc": { "start": { "line": 2, "column": 13 }, "end": { "line": 2, "column": 21 } }, "name": "document" }, "property": { "type": "Identifier", "start": 58, "end": 78, "loc": { "start": { "line": 2, "column": 22 }, "end": { "line": 2, "column": 42 } }, "name": "getElementsByTagName" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 79, "end": 85, "loc": { "start": { "line": 2, "column": 43 }, "end": { "line": 2, "column": 49 } }, "value": "html", "rawValue": "html", "raw": "\"html\"" } ] }, "property": { "type": "Literal", "start": 87, "end": 88, "loc": { "start": { "line": 2, "column": 51 }, "end": { "line": 2, "column": 52 } }, "value": 0, "rawValue": 0, "raw": "0" }, "computed": true } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 93, "end": 118, "loc": { "start": { "line": 3, "column": 2 }, "end": { "line": 3, "column": 27 } }, "declarations": [ { "type": "VariableDeclarator", "start": 97, "end": 117, "loc": { "start": { "line": 3, "column": 6 }, "end": { "line": 3, "column": 26 } }, "id": { "type": "Identifier", "start": 97, "end": 101, "loc": { "start": { "line": 3, "column": 6 }, "end": { "line": 3, "column": 10 } }, "name": "body" }, "init": { "type": "MemberExpression", "start": 104, "end": 117, "loc": { "start": { "line": 3, "column": 13 }, "end": { "line": 3, "column": 26 } }, "object": { "type": "Identifier", "start": 104, "end": 112, "loc": { "start": { "line": 3, "column": 13 }, "end": { "line": 3, "column": 21 } }, "name": "document" }, "property": { "type": "Identifier", "start": 113, "end": 117, "loc": { "start": { "line": 3, "column": 22 }, "end": { "line": 3, "column": 26 } }, "name": "body" }, "computed": false } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 122, "end": 156, "loc": { "start": { "line": 5, "column": 2 }, "end": { "line": 5, "column": 36 } }, "declarations": [ { "type": "VariableDeclarator", "start": 126, "end": 155, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 35 } }, "id": { "type": "Identifier", "start": 126, "end": 136, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 16 } }, "name": "withScroll" }, "init": { "type": "MemberExpression", "start": 139, "end": 155, "loc": { "start": { "line": 5, "column": 19 }, "end": { "line": 5, "column": 35 } }, "object": { "type": "Identifier", "start": 139, "end": 143, "loc": { "start": { "line": 5, "column": 19 }, "end": { "line": 5, "column": 23 } }, "name": "body" }, "property": { "type": "Identifier", "start": 144, "end": 155, "loc": { "start": { "line": 5, "column": 24 }, "end": { "line": 5, "column": 35 } }, "name": "offsetWidth" }, "computed": false } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 159, "end": 175, "loc": { "start": { "line": 6, "column": 2 }, "end": { "line": 6, "column": 18 } }, "declarations": [ { "type": "VariableDeclarator", "start": 163, "end": 174, "loc": { "start": { "line": 6, "column": 6 }, "end": { "line": 6, "column": 17 } }, "id": { "type": "Identifier", "start": 163, "end": 174, "loc": { "start": { "line": 6, "column": 6 }, "end": { "line": 6, "column": 17 } }, "name": "scrollWidth" }, "init": null } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 179, "end": 574, "loc": { "start": { "line": 8, "column": 2 }, "end": { "line": 26, "column": 4 } }, "declarations": [ { "type": "VariableDeclarator", "start": 183, "end": 573, "loc": { "start": { "line": 8, "column": 6 }, "end": { "line": 26, "column": 3 } }, "id": { "type": "Identifier", "start": 183, "end": 191, "loc": { "start": { "line": 8, "column": 6 }, "end": { "line": 8, "column": 14 } }, "name": "getWidth" }, "init": { "type": "FunctionExpression", "start": 194, "end": 573, "loc": { "start": { "line": 8, "column": 17 }, "end": { "line": 26, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 204, "end": 573, "loc": { "start": { "line": 8, "column": 27 }, "end": { "line": 26, "column": 3 } }, "body": [ { "type": "ReturnStatement", "start": 210, "end": 569, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 25, "column": 7 } }, "argument": { "type": "NewExpression", "start": 217, "end": 568, "loc": { "start": { "line": 9, "column": 11 }, "end": { "line": 25, "column": 6 } }, "callee": { "type": "Identifier", "start": 221, "end": 228, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 9, "column": 22 } }, "name": "Promise" }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 229, "end": 567, "loc": { "start": { "line": 9, "column": 23 }, "end": { "line": 25, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 230, "end": 237, "loc": { "start": { "line": 9, "column": 24 }, "end": { "line": 9, "column": 31 } }, "name": "resolve" } ], "body": { "type": "BlockStatement", "start": 242, "end": 567, "loc": { "start": { "line": 9, "column": 36 }, "end": { "line": 25, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 250, "end": 322, "loc": { "start": { "line": 10, "column": 6 }, "end": { "line": 12, "column": 12 } }, "expression": { "type": "CallExpression", "start": 250, "end": 321, "loc": { "start": { "line": 10, "column": 6 }, "end": { "line": 12, "column": 11 } }, "callee": { "type": "Identifier", "start": 250, "end": 260, "loc": { "start": { "line": 10, "column": 6 }, "end": { "line": 10, "column": 16 } }, "name": "setTimeout" }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 261, "end": 317, "loc": { "start": { "line": 10, "column": 17 }, "end": { "line": 12, "column": 7 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 267, "end": 317, "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 12, "column": 7 } }, "body": [ { "type": "ExpressionStatement", "start": 277, "end": 309, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 40 } }, "expression": { "type": "AssignmentExpression", "start": 277, "end": 308, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 39 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 277, "end": 297, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 28 } }, "object": { "type": "MemberExpression", "start": 277, "end": 287, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 18 } }, "object": { "type": "Identifier", "start": 277, "end": 281, "loc": { "start": { "line": 11, "column": 8 }, "end": { "line": 11, "column": 12 } }, "name": "html" }, "property": { "type": "Identifier", "start": 282, "end": 287, "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 18 } }, "name": "style" }, "computed": false }, "property": { "type": "Identifier", "start": 288, "end": 297, "loc": { "start": { "line": 11, "column": 19 }, "end": { "line": 11, "column": 28 } }, "name": "overflowY" }, "computed": false }, "right": { "type": "Literal", "start": 300, "end": 308, "loc": { "start": { "line": 11, "column": 31 }, "end": { "line": 11, "column": 39 } }, "value": "scroll", "rawValue": "scroll", "raw": "\"scroll\"" } } } ] } }, { "type": "Literal", "start": 319, "end": 320, "loc": { "start": { "line": 12, "column": 9 }, "end": { "line": 12, "column": 10 } }, "value": 1, "rawValue": 1, "raw": "1" } ] } }, { "type": "ExpressionStatement", "start": 330, "end": 487, "loc": { "start": { "line": 14, "column": 6 }, "end": { "line": 20, "column": 12 } }, "expression": { "type": "CallExpression", "start": 330, "end": 486, "loc": { "start": { "line": 14, "column": 6 }, "end": { "line": 20, "column": 11 } }, "callee": { "type": "Identifier", "start": 330, "end": 340, "loc": { "start": { "line": 14, "column": 6 }, "end": { "line": 14, "column": 16 } }, "name": "setTimeout" }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 341, "end": 482, "loc": { "start": { "line": 14, "column": 17 }, "end": { "line": 20, "column": 7 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 347, "end": 482, "loc": { "start": { "line": 14, "column": 23 }, "end": { "line": 20, "column": 7 } }, "body": [ { "type": "ExpressionStatement", "start": 357, "end": 389, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 40 } }, "expression": { "type": "AssignmentExpression", "start": 357, "end": 388, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 39 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 357, "end": 377, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 28 } }, "object": { "type": "MemberExpression", "start": 357, "end": 367, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 18 } }, "object": { "type": "Identifier",