UNPKG

rizzo-next

Version:

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

1,388 lines (1,387 loc) 156 kB
{ "type": "Program", "start": 0, "end": 1212, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 48, "column": 0 } }, "sourceType": "module", "body": [ { "type": "VariableDeclaration", "start": 0, "end": 42, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 42 } }, "declarations": [ { "type": "VariableDeclarator", "start": 4, "end": 41, "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 41 } }, "id": { "type": "Identifier", "start": 4, "end": 10, "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 10 } }, "name": "rClass" }, "init": { "type": "Literal", "start": 13, "end": 41, "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 41 } }, "value": {}, "rawValue": {}, "raw": "/\\sclass=\\\"[a-zA-Z_-\\s]*\\\"/g", "regex": { "pattern": "\\sclass=\\\"[a-zA-Z_-\\s]*\\\"", "flags": "g" } } } ], "kind": "let" }, { "type": "ExportDefaultDeclaration", "start": 44, "end": 1211, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 47, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 59, "end": 1211, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 47, "column": 1 } }, "id": { "type": "Identifier", "start": 65, "end": 69, "loc": { "start": { "line": 3, "column": 21 }, "end": { "line": 3, "column": 25 } }, "name": "User" }, "superClass": null, "body": { "type": "ClassBody", "start": 70, "end": 1211, "loc": { "start": { "line": 3, "column": 26 }, "end": { "line": 47, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 74, "end": 525, "loc": { "start": { "line": 4, "column": 2 }, "end": { "line": 22, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 74, "end": 85, "loc": { "start": { "line": 4, "column": 2 }, "end": { "line": 4, "column": 13 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 85, "end": 525, "loc": { "start": { "line": 4, "column": 13 }, "end": { "line": 22, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "AssignmentPattern", "start": 86, "end": 262, "loc": { "start": { "line": 4, "column": 14 }, "end": { "line": 13, "column": 8 } }, "left": { "type": "ObjectPattern", "start": 86, "end": 257, "loc": { "start": { "line": 4, "column": 14 }, "end": { "line": 13, "column": 3 } }, "properties": [ { "type": "Property", "start": 92, "end": 94, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 6 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 92, "end": 94, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 6 } }, "name": "id" }, "kind": "init", "value": { "type": "Identifier", "start": 92, "end": 94, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 6 } }, "name": "id" } }, { "type": "Property", "start": 100, "end": 105, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 9 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 100, "end": 105, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 9 } }, "name": "email" }, "kind": "init", "value": { "type": "Identifier", "start": 100, "end": 105, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 9 } }, "name": "email" } }, { "type": "Property", "start": 111, "end": 119, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 12 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 111, "end": 119, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 12 } }, "name": "username" }, "kind": "init", "value": { "type": "Identifier", "start": 111, "end": 119, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 12 } }, "name": "username" } }, { "type": "Property", "start": 125, "end": 136, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 15 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 125, "end": 136, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 15 } }, "name": "facebookUid" }, "kind": "init", "value": { "type": "Identifier", "start": 125, "end": 136, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 15 } }, "name": "facebookUid" } }, { "type": "Property", "start": 142, "end": 153, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 15 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 142, "end": 153, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 15 } }, "name": "profileSlug" }, "kind": "init", "value": { "type": "Identifier", "start": 142, "end": 153, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 15 } }, "name": "profileSlug" } }, { "type": "Property", "start": 159, "end": 215, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 60 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 159, "end": 165, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 10 } }, "name": "avatar" }, "kind": "init", "value": { "type": "AssignmentPattern", "start": 159, "end": 215, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 60 } }, "left": { "type": "Identifier", "start": 159, "end": 165, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 10 } }, "name": "avatar" }, "right": { "type": "Literal", "start": 168, "end": 215, "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 60 } }, "value": "http://dummyimage.com/80x80/4d494d/686a82.gif", "rawValue": "http://dummyimage.com/80x80/4d494d/686a82.gif", "raw": "\"http://dummyimage.com/80x80/4d494d/686a82.gif\"" } } }, { "type": "Property", "start": 221, "end": 234, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 17 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 221, "end": 229, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 12 } }, "name": "messages" }, "kind": "init", "value": { "type": "AssignmentPattern", "start": 221, "end": 234, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 17 } }, "left": { "type": "Identifier", "start": 221, "end": 229, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 12 } }, "name": "messages" }, "right": { "type": "ArrayExpression", "start": 232, "end": 234, "loc": { "start": { "line": 11, "column": 15 }, "end": { "line": 11, "column": 17 } }, "elements": [] } } }, { "type": "Property", "start": 240, "end": 253, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 17 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 240, "end": 248, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 12 } }, "name": "activity" }, "kind": "init", "value": { "type": "AssignmentPattern", "start": 240, "end": 253, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 17 } }, "left": { "type": "Identifier", "start": 240, "end": 248, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 12 } }, "name": "activity" }, "right": { "type": "ArrayExpression", "start": 251, "end": 253, "loc": { "start": { "line": 12, "column": 15 }, "end": { "line": 12, "column": 17 } }, "elements": [] } } } ] }, "right": { "type": "ObjectExpression", "start": 260, "end": 262, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 8 } }, "properties": [] } } ], "body": { "type": "BlockStatement", "start": 264, "end": 525, "loc": { "start": { "line": 13, "column": 10 }, "end": { "line": 22, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 270, "end": 283, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 17 } }, "expression": { "type": "AssignmentExpression", "start": 270, "end": 282, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 16 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 270, "end": 277, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 11 } }, "object": { "type": "ThisExpression", "start": 270, "end": 274, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 8 } } }, "property": { "type": "Identifier", "start": 275, "end": 277, "loc": { "start": { "line": 14, "column": 9 }, "end": { "line": 14, "column": 11 } }, "name": "id" }, "computed": false }, "right": { "type": "Identifier", "start": 280, "end": 282, "loc": { "start": { "line": 14, "column": 14 }, "end": { "line": 14, "column": 16 } }, "name": "id" } } }, { "type": "ExpressionStatement", "start": 288, "end": 307, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 23 } }, "expression": { "type": "AssignmentExpression", "start": 288, "end": 306, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 22 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 288, "end": 298, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 14 } }, "object": { "type": "ThisExpression", "start": 288, "end": 292, "loc": { "start": { "line": 15, "column": 4 }, "end": { "line": 15, "column": 8 } } }, "property": { "type": "Identifier", "start": 293, "end": 298, "loc": { "start": { "line": 15, "column": 9 }, "end": { "line": 15, "column": 14 } }, "name": "email" }, "computed": false }, "right": { "type": "Identifier", "start": 301, "end": 306, "loc": { "start": { "line": 15, "column": 17 }, "end": { "line": 15, "column": 22 } }, "name": "email" } } }, { "type": "ExpressionStatement", "start": 312, "end": 337, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 29 } }, "expression": { "type": "AssignmentExpression", "start": 312, "end": 336, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 28 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 312, "end": 325, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 17 } }, "object": { "type": "ThisExpression", "start": 312, "end": 316, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 8 } } }, "property": { "type": "Identifier", "start": 317, "end": 325, "loc": { "start": { "line": 16, "column": 9 }, "end": { "line": 16, "column": 17 } }, "name": "username" }, "computed": false }, "right": { "type": "Identifier", "start": 328, "end": 336, "loc": { "start": { "line": 16, "column": 20 }, "end": { "line": 16, "column": 28 } }, "name": "username" } } }, { "type": "ExpressionStatement", "start": 342, "end": 373, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 35 } }, "expression": { "type": "AssignmentExpression", "start": 342, "end": 372, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 34 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 342, "end": 358, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 20 } }, "object": { "type": "ThisExpression", "start": 342, "end": 346, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 8 } } }, "property": { "type": "Identifier", "start": 347, "end": 358, "loc": { "start": { "line": 17, "column": 9 }, "end": { "line": 17, "column": 20 } }, "name": "facebookUid" }, "computed": false }, "right": { "type": "Identifier", "start": 361, "end": 372, "loc": { "start": { "line": 17, "column": 23 }, "end": { "line": 17, "column": 34 } }, "name": "facebookUid" } } }, { "type": "ExpressionStatement", "start": 378, "end": 409, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 35 } }, "expression": { "type": "AssignmentExpression", "start": 378, "end": 408, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 34 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 378, "end": 394, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 20 } }, "object": { "type": "ThisExpression", "start": 378, "end": 382, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 8 } } }, "property": { "type": "Identifier", "start": 383, "end": 394, "loc": { "start": { "line": 18, "column": 9 }, "end": { "line": 18, "column": 20 } }, "name": "profileSlug" }, "computed": false }, "right": { "type": "Identifier", "start": 397, "end": 408, "loc": { "start": { "line": 18, "column": 23 }, "end": { "line": 18, "column": 34 } }, "name": "profileSlug" } } }, { "type": "ExpressionStatement", "start": 414, "end": 461, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 51 } }, "expression": { "type": "AssignmentExpression", "start": 414, "end": 460, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 50 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 414, "end": 425, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 15 } }, "object": { "type": "ThisExpression", "start": 414, "end": 418, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 8 } } }, "property": { "type": "Identifier", "start": 419, "end": 425, "loc": { "start": { "line": 19, "column": 9 }, "end": { "line": 19, "column": 15 } }, "name": "avatar" }, "computed": false }, "right": { "type": "CallExpression", "start": 428, "end": 460, "loc": { "start": { "line": 19, "column": 18 }, "end": { "line": 19, "column": 50 } }, "callee": { "type": "MemberExpression", "start": 428, "end": 442, "loc": { "start": { "line": 19, "column": 18 }, "end": { "line": 19, "column": 32 } }, "object": { "type": "Identifier", "start": 428, "end": 434, "loc": { "start": { "line": 19, "column": 18 }, "end": { "line": 19, "column": 24 } }, "name": "avatar" }, "property": { "type": "Identifier", "start": 435, "end": 442, "loc": { "start": { "line": 19, "column": 25 }, "end": { "line": 19, "column": 32 } }, "name": "replace" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 443, "end": 450, "loc": { "start": { "line": 19, "column": 33 }, "end": { "line": 19, "column": 40