UNPKG

rizzo-next

Version:

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

811 lines 26.7 kB
{ "type": "Program", "start": 0, "end": 302, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 13, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ExportDefaultDeclaration", "start": 107, "end": 300, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 12, "column": 1 } }, "declaration": { "type": "FunctionDeclaration", "start": 122, "end": 300, "loc": { "start": { "line": 5, "column": 15 }, "end": { "line": 12, "column": 1 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "AssignmentPattern", "start": 131, "end": 150, "loc": { "start": { "line": 5, "column": 24 }, "end": { "line": 5, "column": 43 } }, "left": { "type": "ObjectPattern", "start": 131, "end": 145, "loc": { "start": { "line": 5, "column": 24 }, "end": { "line": 5, "column": 38 } }, "properties": [ { "type": "Property", "start": 133, "end": 137, "loc": { "start": { "line": 5, "column": 26 }, "end": { "line": 5, "column": 30 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 133, "end": 137, "loc": { "start": { "line": 5, "column": 26 }, "end": { "line": 5, "column": 30 } }, "name": "name", "leadingComments": null }, "kind": "init", "value": { "type": "Identifier", "start": 133, "end": 137, "loc": { "start": { "line": 5, "column": 26 }, "end": { "line": 5, "column": 30 } }, "name": "name", "leadingComments": [ { "type": "Block", "value": "* \n * Track an event with our analytics library\n * @param {Object} options An object with event data\n ", "start": 0, "end": 106, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 4, "column": 3 } }, "range": [ 0, 106 ] } ] }, "leadingComments": null }, { "type": "Property", "start": 139, "end": 143, "loc": { "start": { "line": 5, "column": 32 }, "end": { "line": 5, "column": 36 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 139, "end": 143, "loc": { "start": { "line": 5, "column": 32 }, "end": { "line": 5, "column": 36 } }, "name": "data" }, "kind": "init", "value": { "type": "Identifier", "start": 139, "end": 143, "loc": { "start": { "line": 5, "column": 32 }, "end": { "line": 5, "column": 36 } }, "name": "data" } } ], "leadingComments": null }, "right": { "type": "ObjectExpression", "start": 148, "end": 150, "loc": { "start": { "line": 5, "column": 41 }, "end": { "line": 5, "column": 43 } }, "properties": [] }, "leadingComments": null } ], "body": { "type": "BlockStatement", "start": 152, "end": 300, "loc": { "start": { "line": 5, "column": 45 }, "end": { "line": 12, "column": 1 } }, "body": [ { "type": "IfStatement", "start": 156, "end": 298, "loc": { "start": { "line": 6, "column": 2 }, "end": { "line": 11, "column": 3 } }, "test": { "type": "MemberExpression", "start": 160, "end": 194, "loc": { "start": { "line": 6, "column": 6 }, "end": { "line": 6, "column": 40 } }, "object": { "type": "MemberExpression", "start": 160, "end": 183, "loc": { "start": { "line": 6, "column": 6 }, "end": { "line": 6, "column": 29 } }, "object": { "type": "MemberExpression", "start": 160, "end": 179, "loc": { "start": { "line": 6, "column": 6 }, "end": { "line": 6, "column": 25 } }, "object": { "type": "MemberExpression", "start": 160, "end": 169, "loc": { "start": { "line": 6, "column": 6 }, "end": { "line": 6, "column": 15 } }, "object": { "type": "Identifier", "start": 160, "end": 166, "loc": { "start": { "line": 6, "column": 6 }, "end": { "line": 6, "column": 12 } }, "name": "window" }, "property": { "type": "Identifier", "start": 167, "end": 169, "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 6, "column": 15 } }, "name": "lp" }, "computed": false }, "property": { "type": "Identifier", "start": 170, "end": 179, "loc": { "start": { "line": 6, "column": 16 }, "end": { "line": 6, "column": 25 } }, "name": "analytics" }, "computed": false }, "property": { "type": "Identifier", "start": 180, "end": 183, "loc": { "start": { "line": 6, "column": 26 }, "end": { "line": 6, "column": 29 } }, "name": "api" }, "computed": false }, "property": { "type": "Identifier", "start": 184, "end": 194, "loc": { "start": { "line": 6, "column": 30 }, "end": { "line": 6, "column": 40 } }, "name": "trackEvent" }, "computed": false }, "consequent": { "type": "BlockStatement", "start": 196, "end": 298, "loc": { "start": { "line": 6, "column": 42 }, "end": { "line": 11, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 202, "end": 294, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 10, "column": 7 } }, "expression": { "type": "CallExpression", "start": 202, "end": 293, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 10, "column": 6 } }, "callee": { "type": "MemberExpression", "start": 202, "end": 236, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 38 } }, "object": { "type": "MemberExpression", "start": 202, "end": 225, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 27 } }, "object": { "type": "MemberExpression", "start": 202, "end": 221, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 23 } }, "object": { "type": "MemberExpression", "start": 202, "end": 211, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 13 } }, "object": { "type": "Identifier", "start": 202, "end": 208, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 10 } }, "name": "window" }, "property": { "type": "Identifier", "start": 209, "end": 211, "loc": { "start": { "line": 7, "column": 11 }, "end": { "line": 7, "column": 13 } }, "name": "lp" }, "computed": false }, "property": { "type": "Identifier", "start": 212, "end": 221, "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 23 } }, "name": "analytics" }, "computed": false }, "property": { "type": "Identifier", "start": 222, "end": 225, "loc": { "start": { "line": 7, "column": 24 }, "end": { "line": 7, "column": 27 } }, "name": "api" }, "computed": false }, "property": { "type": "Identifier", "start": 226, "end": 236, "loc": { "start": { "line": 7, "column": 28 }, "end": { "line": 7, "column": 38 } }, "name": "trackEvent" }, "computed": false }, "arguments": [ { "type": "ObjectExpression", "start": 237, "end": 292, "loc": { "start": { "line": 7, "column": 39 }, "end": { "line": 10, "column": 5 } }, "properties": [ { "type": "Property", "start": 246, "end": 260, "loc": { "start": { "line": 8, "column": 6 }, "end": { "line": 8, "column": 20 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 246, "end": 254, "loc": { "start": { "line": 8, "column": 6 }, "end": { "line": 8, "column": 14 } }, "name": "category" }, "value": { "type": "Identifier", "start": 256, "end": 260, "loc": { "start": { "line": 8, "column": 16 }, "end": { "line": 8, "column": 20 } }, "name": "name" }, "kind": "init" }, { "type": "Property", "start": 268, "end": 286, "loc": { "start": { "line": 9, "column": 6 }, "end": { "line": 9, "column": 24 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 268, "end": 274, "loc": { "start": { "line": 9, "column": 6 }, "end": { "line": 9, "column": 12 } }, "name": "action" }, "value": { "type": "LogicalExpression", "start": 276, "end": 286, "loc": { "start": { "line": 9, "column": 14 }, "end": { "line": 9, "column": 24 } }, "left": { "type": "Identifier", "start": 276, "end": 280, "loc": { "start": { "line": 9, "column": 14 }, "end": { "line": 9, "column": 18 } }, "name": "data" }, "operator": "||", "right": { "type": "ObjectExpression", "start": 284, "end": 286, "loc": { "start": { "line": 9, "column": 22 }, "end": { "line": 9, "column": 24 } }, "properties": [] } }, "kind": "init" } ] } ] } } ] }, "alternate": null } ] }, "leadingComments": [ { "type": "Block", "value": "* \n * Track an event with our analytics library\n * @param {Object} options An object with event data\n ", "start": 0, "end": 106, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 4, "column": 3 } }, "range": [ 0, 106 ] } ], "trailingComments": [] }, "leadingComments": [ { "type": "Block", "value": "* \n * Track an event with our analytics library\n * @param {Object} options An object with event data\n ", "start": 0, "end": 106, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 4, "column": 3 } }, "range": [ 0, 106 ] } ] }, { "type": "EmptyStatement", "start": 300, "end": 301, "loc": { "start": { "line": 12, "column": 1 }, "end": { "line": 12, "column": 2 } } } ] }