UNPKG

rizzo-next

Version:

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

1,624 lines (1,623 loc) 118 kB
{ "type": "Program", "start": 0, "end": 1413, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 59, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 46, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 46 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 13, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 13 } }, "local": { "type": "Identifier", "start": 7, "end": 13, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 13 } }, "name": "postal" } } ], "importKind": "value", "source": { "type": "Literal", "start": 19, "end": 45, "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 45 } }, "value": "postal/lib/postal.lodash", "rawValue": "postal/lib/postal.lodash", "raw": "\"postal/lib/postal.lodash\"" } }, { "type": "ImportDeclaration", "start": 47, "end": 109, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 62 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 54, "end": 66, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 19 } }, "local": { "type": "Identifier", "start": 54, "end": 66, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 19 } }, "name": "HotelsEvents" } } ], "importKind": "value", "source": { "type": "Literal", "start": 72, "end": 108, "loc": { "start": { "line": 2, "column": 25 }, "end": { "line": 2, "column": 61 } }, "value": "../components/hotels/hotels.events", "rawValue": "../components/hotels/hotels.events", "raw": "\"../components/hotels/hotels.events\"" } }, { "type": "ImportDeclaration", "start": 110, "end": 152, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 42 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 117, "end": 123, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 13 } }, "local": { "type": "Identifier", "start": 117, "end": 123, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 13 } }, "name": "assign" } } ], "importKind": "value", "source": { "type": "Literal", "start": 129, "end": 151, "loc": { "start": { "line": 3, "column": 19 }, "end": { "line": 3, "column": 41 } }, "value": "lodash/object/assign", "rawValue": "lodash/object/assign", "raw": "\"lodash/object/assign\"" } }, { "type": "ImportDeclaration", "start": 153, "end": 193, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 40 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 160, "end": 163, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 10 } }, "local": { "type": "Identifier", "start": 160, "end": 163, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 10 } }, "name": "map" } } ], "importKind": "value", "source": { "type": "Literal", "start": 169, "end": 192, "loc": { "start": { "line": 4, "column": 16 }, "end": { "line": 4, "column": 39 } }, "value": "lodash/collection/map", "rawValue": "lodash/collection/map", "raw": "\"lodash/collection/map\"" } }, { "type": "VariableDeclaration", "start": 195, "end": 221, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 8, "column": 2 } }, "declarations": [ { "type": "VariableDeclarator", "start": 199, "end": 220, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 8, "column": 1 } }, "id": { "type": "Identifier", "start": 199, "end": 200, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 5 } }, "name": "_" }, "init": { "type": "ObjectExpression", "start": 203, "end": 220, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 8, "column": 1 } }, "properties": [ { "type": "Property", "start": 207, "end": 213, "loc": { "start": { "line": 7, "column": 2 }, "end": { "line": 7, "column": 8 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 207, "end": 213, "loc": { "start": { "line": 7, "column": 2 }, "end": { "line": 7, "column": 8 } }, "name": "assign" }, "kind": "init", "value": { "type": "Identifier", "start": 207, "end": 213, "loc": { "start": { "line": 7, "column": 2 }, "end": { "line": 7, "column": 8 } }, "name": "assign" } }, { "type": "Property", "start": 215, "end": 218, "loc": { "start": { "line": 7, "column": 10 }, "end": { "line": 7, "column": 13 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 215, "end": 218, "loc": { "start": { "line": 7, "column": 10 }, "end": { "line": 7, "column": 13 } }, "name": "map" }, "kind": "init", "value": { "type": "Identifier", "start": 215, "end": 218, "loc": { "start": { "line": 7, "column": 10 }, "end": { "line": 7, "column": 13 } }, "name": "map" } } ] } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 223, "end": 275, "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 10, "column": 52 } }, "declarations": [ { "type": "VariableDeclarator", "start": 227, "end": 274, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 51 } }, "id": { "type": "Identifier", "start": 227, "end": 243, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 20 } }, "name": "componentChannel" }, "init": { "type": "CallExpression", "start": 246, "end": 274, "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 51 } }, "callee": { "type": "MemberExpression", "start": 246, "end": 260, "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 37 } }, "object": { "type": "Identifier", "start": 246, "end": 252, "loc": { "start": { "line": 10, "column": 23 }, "end": { "line": 10, "column": 29 } }, "name": "postal" }, "property": { "type": "Identifier", "start": 253, "end": 260, "loc": { "start": { "line": 10, "column": 30 }, "end": { "line": 10, "column": 37 } }, "name": "channel" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 261, "end": 273, "loc": { "start": { "line": 10, "column": 38 }, "end": { "line": 10, "column": 50 } }, "value": "components", "rawValue": "components", "raw": "\"components\"" } ] } } ], "kind": "let", "trailingComments": [ { "type": "Block", "value": "* \n * Track an event with our analytics library\n * @param {Object} options An object with event data\n * \n ", "start": 277, "end": 387, "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 16, "column": 3 } }, "range": [ 277, 387 ] } ] }, { "type": "VariableDeclaration", "start": 388, "end": 575, "loc": { "start": { "line": 17, "column": 0 }, "end": { "line": 24, "column": 2 } }, "declarations": [ { "type": "VariableDeclarator", "start": 392, "end": 574, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 24, "column": 1 } }, "id": { "type": "Identifier", "start": 392, "end": 402, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 14 } }, "name": "trackEvent", "leadingComments": null }, "init": { "type": "FunctionExpression", "start": 405, "end": 574, "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 24, "column": 1 } }, "id": { "type": "Identifier", "start": 392, "end": 402, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 14 } }, "name": "trackEvent", "leadingComments": null }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 414, "end": 418, "loc": { "start": { "line": 17, "column": 26 }, "end": { "line": 17, "column": 30 } }, "name": "name" }, { "type": "Identifier", "start": 420, "end": 427, "loc": { "start": { "line": 17, "column": 32 }, "end": { "line": 17, "column": 39 } }, "name": "details" } ], "body": { "type": "BlockStatement", "start": 429, "end": 574, "loc": { "start": { "line": 17, "column": 41 }, "end": { "line": 24, "column": 1 } }, "body": [ { "type": "IfStatement", "start": 433, "end": 572, "loc": { "start": { "line": 18, "column": 2 }, "end": { "line": 23, "column": 3 } }, "test": { "type": "MemberExpression", "start": 437, "end": 471, "loc": { "start": { "line": 18, "column": 6 }, "end": { "line": 18, "column": 40 } }, "object": { "type": "MemberExpression", "start": 437, "end": 460, "loc": { "start": { "line": 18, "column": 6 }, "end": { "line": 18, "column": 29 } }, "object": { "type": "MemberExpression", "start": 437, "end": 456, "loc": { "start": { "line": 18, "column": 6 }, "end": { "line": 18, "column": 25 } }, "object": { "type": "MemberExpression", "start": 437, "end": 446, "loc": { "start": { "line": 18, "column": 6 }, "end": { "line": 18, "column": 15 } }, "object": { "type": "Identifier", "start": 437, "end": 443, "loc": { "start": { "line": 18, "column": 6 }, "end": { "line": 18, "column": 12 } }, "name": "window" }, "property": { "type": "Identifier", "start": 444, "end": 446, "loc": { "start": { "line": 18, "column": 13 }, "end": { "line": 18, "column": 15 } }, "name": "lp" }, "computed": false }, "property": { "type": "Identifier", "start": 447, "end": 456, "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 18, "column": 25 } }, "name": "analytics" }, "computed": false }, "property": { "type": "Identifier", "start": 457, "end": 460, "loc": { "start": { "line": 18, "column": 26 }, "end": { "line": 18, "column": 29 } }, "name": "api" }, "computed": false }, "property": { "type": "Identifier", "start": 461, "end": 471, "loc": { "start": { "line": 18, "column": 30 }, "end": { "line": 18, "column": 40 } }, "name": "trackEvent" }, "computed": false }, "consequent": { "type": "BlockStatement", "start": 473, "end": 572, "loc": { "start": { "line": 18, "column": 42 }, "end": { "line": 23, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 479, "end": 568, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 22, "column": 7 } }, "expression": { "type": "CallExpression", "start": 479, "end": 567, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 22, "column": 6 } }, "callee": { "type": "MemberExpression", "start": 479, "end": 513, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 38 } }, "object": { "type": "MemberExpression", "start": 479, "end": 502, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 27 } }, "object": { "type": "MemberExpression", "start": 479, "end": 498, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 23 } }, "object": { "type": "MemberExpression", "start": 479, "end": 488, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 13 } }, "object": { "type": "Identifier", "start": 479, "end": 485, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 10 } }, "name": "window" }, "property": { "type": "Identifier", "start": 486, "end": 488, "loc": { "start": { "line": 19, "column": 11 }, "end": { "line": 19, "column": 13 } }, "name": "lp" }, "computed": false }, "property": { "type": "Identifier", "start": 489, "end": 498, "loc": { "start": { "line": 19, "column": 14 }, "end": { "line": 19, "column": 23 } }, "name": "analytics" }, "computed": false }, "property": { "type": "Identifier", "start": 499, "end": 502, "loc": { "start": { "line": 19, "column": 24 }, "end": { "line": 19, "column": 27 } }, "name": "api" }, "computed": false }, "property": { "type": "Identifier", "start": 503, "end": 513, "loc": { "start": { "line": 19, "column": 28 }, "end": { "line": 19, "column": 38 } }, "name": "trackEvent" }, "computed": false }, "arguments": [ { "type": "ObjectExpression", "start": 514, "end": 566, "loc": { "start": { "line": 19, "column": 39 }, "end": { "line": 22, "column": 5 } }, "properties": [ { "type": "Property", "start": 523, "end": 537, "loc": { "start": { "line": 20, "column": 6 }, "end": { "line": 20, "column": 20 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 523, "end": 531, "loc": { "start": { "line": 20, "column": 6 }, "end": { "line": 20, "column": 14 } }, "name": "category" }, "value": { "type": "Identifier", "start": 533, "end": 537, "loc": { "start": { "line": 20, "column": 16 }, "end": { "line": 20, "column": 20 } }, "name": "name" }, "kind": "init" }, { "type": "Property", "start": 545, "end": 560, "loc": { "start": { "line": 21, "column": 6 }, "end": { "line": 21, "column": 21 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 545, "end": 551, "loc": { "start": { "line": 21, "column": 6 }, "end": { "line": 21, "column": 12 } }, "name": "action" }, "value": { "type": "Identifier", "start": 553, "end": 560, "loc": { "start": { "line": 21, "column": 14 }, "end": { "line": 21, "column": 21 } }, "name": "details" }, "kind": "init" } ] } ] } } ] }, "alternate": null } ] } }, "leadingComments": null } ], "kind": "let", "leadingComments": [ { "type": "Block", "value": "* \n * Track an event with our analytics library\n * @param {Object} options An object with event data\n * \n ", "start": 277, "end": 387, "loc": { "start": { "line": 12, "column": 0 }, "end": { "line": 16, "column": 3 } }, "range": [ 277, 387 ] } ], "trailingComments": [ { "type": "Block", "value": "*\n * Log an event with Flamsteed\n * @param {Object|String} data An object containing data to log, or a string description of an event\n ", "start": 577, "end": 717, "loc": { "start": { "line": 26, "column": 0 }, "end": { "line": 29, "column": 3 } }, "range": [ 577, 717 ] } ] }, { "type": "VariableDeclaration", "start": 718, "end": 889, "loc": { "start": { "line": 30, "column": 0 }, "end": { "line": 36, "column": 2 } }, "declarations": [ { "type": "VariableDeclarator", "start": 722, "end": 888, "loc": { "start": { "line": 30, "column": 4 }, "end": { "line": 36, "column": 1 } }, "id": { "type": "Identifier", "start": 722, "end": 734, "loc": { "start": { "line": 30, "column": 4 }, "end": { "line": 30, "column": 16 } }, "name": "flamsteedLog", "leadingComments": null }, "init": { "type": "FunctionExpression", "start": 737, "end": 888, "loc": { "start": { "line": 30, "column": 19 }, "end": { "line": 36, "column": 1 } }, "id": { "type": "Identifier", "start": 722, "end": 734, "loc": { "start": { "line": 30, "column": 4 }, "end": { "line": 30, "column": 16 } }, "name": "flamsteedLog", "leadingComments": null }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 746, "end": 757, "loc": { "start": { "line": 30, "column": 28 }, "end": { "line": 30, "column": 39 } }, "name": "description" } ], "body": { "type": "BlockStatement", "start": 759, "end": 888, "loc": { "start": { "line": 30, "column": 41 }, "end": { "line": 36, "column": 1 } }, "body": [ { "type": "IfStatement", "start": 763, "end": 886, "loc": { "start": { "line": 31, "column": 2 }, "end": { "line": 35, "column": 3 } }, "test": { "type": "MemberExpression", "start": 767, "end": 779, "loc": { "start": { "line": 31, "column": 6 }, "end": { "line": 31, "column": 18 } }, "object": { "type": "MemberExpression", "start": 767, "end": 776, "loc": { "start": { "line": 31, "column": 6 }, "end": { "line": 31, "column": 15 } }, "object": { "type": "Identifier", "start": 767, "end": 773, "loc": { "start": { "line": 31, "column": 6 }, "end": { "line": 31, "column": 12 } }, "name": "window" }, "property": { "type": "Identifier", "start": 774, "end": 776, "loc": { "start": { "line": 31, "column": 13 }, "end": { "line": 31, "column": 15 } }, "name": "lp" }, "computed": false }, "property": { "type": "Identifier", "start": 777, "end": 779, "loc": { "start": { "line": 31, "column": 16 }, "end": { "line": 31, "column": 18 } }, "name": "fs" }, "computed": false }, "consequent": { "type": "BlockStatement", "start": 781, "end": 886, "loc": { "start": { "line": 31, "column": 20 }, "end": { "line": 35, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 787, "end": 882, "loc": { "start": { "line": 32, "column": 4 }, "end": { "line": 34, "column": 21 } }, "expression": { "type": "CallExpression", "start": 787, "end": 881, "loc": { "start": { "line": 32, "column": 4 }, "end": { "line": 34, "column": 20 } }, "callee": { "type": "MemberExpression", "start": 787, "end": 803, "loc": { "start": { "line": 32, "column": 4 }, "end": { "line": 32, "column": 20 } }, "object": { "type": "MemberExpression", "start": 787, "end": 799, "loc": { "start": { "line": 32, "column": 4 }, "end": { "line": 32, "column": 16 } }, "object": { "type": "MemberExpression", "start": 787, "end": 796, "loc": { "start": { "line": 32, "column": 4 }, "end": { "line": 32, "column": 13 } }, "object": { "type": "Identifier", "start": 787, "end": 793, "loc": { "start": { "line": 32, "column": 4 }, "end": { "line": 32, "column": 10 } }, "name": "window" }, "property": { "type": "Identifier", "start": 794, "end": 796, "loc": { "start": { "line": 32, "column": 11 }, "end": { "line": 32, "column": 13 } }, "name": "lp" }, "computed": false }, "property": { "type": "Identifier", "start": 797, "end": 799, "loc": { "start": { "line": 32, "column": 14 }, "end": { "line": 32, "column": 16 } }, "name": "fs" }, "computed": false }, "property": { "type": "Identifier", "start": 800, "end": 803, "loc": { "start": { "line": 32, "column": 17 }, "end": { "line": 32, "column": 20 } }, "name": "log" }, "computed": false }, "arguments": [ {