UNPKG

rizzo-next

Version:

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

1,728 lines (1,727 loc) 238 kB
{ "type": "Program", "start": 0, "end": 2052, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 74, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 26, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 12, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 12 } }, "local": { "type": "Identifier", "start": 7, "end": 12, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 12 } }, "name": "React" } } ], "importKind": "value", "source": { "type": "Literal", "start": 18, "end": 25, "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 25 } }, "value": "react", "rawValue": "react", "raw": "\"react\"" } }, { "type": "ImportDeclaration", "start": 27, "end": 63, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 36 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 34, "end": 41, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 14 } }, "local": { "type": "Identifier", "start": 34, "end": 41, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 14 } }, "name": "Sidebar" } } ], "importKind": "value", "source": { "type": "Literal", "start": 47, "end": 62, "loc": { "start": { "line": 2, "column": 20 }, "end": { "line": 2, "column": 35 } }, "value": "./sidebar.jsx", "rawValue": "./sidebar.jsx", "raw": "\"./sidebar.jsx\"" } }, { "type": "ImportDeclaration", "start": 64, "end": 117, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 53 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 71, "end": 86, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 22 } }, "local": { "type": "Identifier", "start": 71, "end": 86, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 22 } }, "name": "SidebarFetching" } } ], "importKind": "value", "source": { "type": "Literal", "start": 92, "end": 116, "loc": { "start": { "line": 3, "column": 28 }, "end": { "line": 3, "column": 52 } }, "value": "./sidebar-fetching.jsx", "rawValue": "./sidebar-fetching.jsx", "raw": "\"./sidebar-fetching.jsx\"" } }, { "type": "ImportDeclaration", "start": 118, "end": 169, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 51 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 125, "end": 139, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 21 } }, "local": { "type": "Identifier", "start": 125, "end": 139, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 21 } }, "name": "SidebarDetails" } } ], "importKind": "value", "source": { "type": "Literal", "start": 145, "end": 168, "loc": { "start": { "line": 4, "column": 27 }, "end": { "line": 4, "column": 50 } }, "value": "./sidebar-details.jsx", "rawValue": "./sidebar-details.jsx", "raw": "\"./sidebar-details.jsx\"" } }, { "type": "ImportDeclaration", "start": 170, "end": 198, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 28 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 177, "end": 180, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 10 } }, "local": { "type": "Identifier", "start": 177, "end": 180, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 10 } }, "name": "Map" } } ], "importKind": "value", "source": { "type": "Literal", "start": 186, "end": 197, "loc": { "start": { "line": 5, "column": 16 }, "end": { "line": 5, "column": 27 } }, "value": "./map.jsx", "rawValue": "./map.jsx", "raw": "\"./map.jsx\"" } }, { "type": "ImportDeclaration", "start": 199, "end": 231, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 32 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 206, "end": 211, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 12 } }, "local": { "type": "Identifier", "start": 206, "end": 211, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 12 } }, "name": "Alert" } } ], "importKind": "value", "source": { "type": "Literal", "start": 217, "end": 230, "loc": { "start": { "line": 6, "column": 18 }, "end": { "line": 6, "column": 31 } }, "value": "./alert.jsx", "rawValue": "./alert.jsx", "raw": "\"./alert.jsx\"" } }, { "type": "ImportDeclaration", "start": 232, "end": 264, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 32 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 239, "end": 247, "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 15 } }, "local": { "type": "Identifier", "start": 239, "end": 247, "loc": { "start": { "line": 7, "column": 7 }, "end": { "line": 7, "column": 15 } }, "name": "MapState" } } ], "importKind": "value", "source": { "type": "Literal", "start": 253, "end": 263, "loc": { "start": { "line": 7, "column": 21 }, "end": { "line": 7, "column": 31 } }, "value": "../state", "rawValue": "../state", "raw": "\"../state\"" } }, { "type": "ImportDeclaration", "start": 265, "end": 301, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 8, "column": 36 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 272, "end": 282, "loc": { "start": { "line": 8, "column": 7 }, "end": { "line": 8, "column": 17 } }, "local": { "type": "Identifier", "start": 272, "end": 282, "loc": { "start": { "line": 8, "column": 7 }, "end": { "line": 8, "column": 17 } }, "name": "MapActions" } } ], "importKind": "value", "source": { "type": "Literal", "start": 288, "end": 300, "loc": { "start": { "line": 8, "column": 23 }, "end": { "line": 8, "column": 35 } }, "value": "../actions", "rawValue": "../actions", "raw": "\"../actions\"" } }, { "type": "VariableDeclaration", "start": 303, "end": 366, "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 12, "column": 2 } }, "declarations": [ { "type": "VariableDeclarator", "start": 307, "end": 365, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 12, "column": 1 } }, "id": { "type": "Identifier", "start": 307, "end": 318, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 15 } }, "name": "getMapState" }, "init": { "type": "FunctionExpression", "start": 321, "end": 365, "loc": { "start": { "line": 10, "column": 18 }, "end": { "line": 12, "column": 1 } }, "id": { "type": "Identifier", "start": 307, "end": 318, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 15 } }, "name": "getMapState" }, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 332, "end": 365, "loc": { "start": { "line": 10, "column": 29 }, "end": { "line": 12, "column": 1 } }, "body": [ { "type": "ReturnStatement", "start": 336, "end": 363, "loc": { "start": { "line": 11, "column": 2 }, "end": { "line": 11, "column": 29 } }, "argument": { "type": "CallExpression", "start": 343, "end": 362, "loc": { "start": { "line": 11, "column": 9 }, "end": { "line": 11, "column": 28 } }, "callee": { "type": "MemberExpression", "start": 343, "end": 360, "loc": { "start": { "line": 11, "column": 9 }, "end": { "line": 11, "column": 26 } }, "object": { "type": "Identifier", "start": 343, "end": 351, "loc": { "start": { "line": 11, "column": 9 }, "end": { "line": 11, "column": 17 } }, "name": "MapState" }, "property": { "type": "Identifier", "start": 352, "end": 360, "loc": { "start": { "line": 11, "column": 18 }, "end": { "line": 11, "column": 26 } }, "name": "getState" }, "computed": false }, "arguments": [] } } ] } } } ], "kind": "let", "trailingComments": [ { "type": "Block", "value": "*\n * Controls the sidebar views, and the map\n ", "start": 368, "end": 418, "loc": { "start": { "line": 14, "column": 0 }, "end": { "line": 16, "column": 3 } }, "range": [ 368, 418 ] } ] }, { "type": "ExportDefaultDeclaration", "start": 419, "end": 2051, "loc": { "start": { "line": 17, "column": 0 }, "end": { "line": 73, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 434, "end": 2051, "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 73, "column": 1 } }, "id": { "type": "Identifier", "start": 440, "end": 448, "loc": { "start": { "line": 17, "column": 21 }, "end": { "line": 17, "column": 29 } }, "name": "MainView", "leadingComments": null }, "superClass": { "type": "MemberExpression", "start": 457, "end": 472, "loc": { "start": { "line": 17, "column": 38 }, "end": { "line": 17, "column": 53 } }, "object": { "type": "Identifier", "start": 457, "end": 462, "loc": { "start": { "line": 17, "column": 38 }, "end": { "line": 17, "column": 43 } }, "name": "React" }, "property": { "type": "Identifier", "start": 463, "end": 472, "loc": { "start": { "line": 17, "column": 44 }, "end": { "line": 17, "column": 53 } }, "name": "Component" }, "computed": false }, "body": { "type": "ClassBody", "start": 473, "end": 2051, "loc": { "start": { "line": 17, "column": 54 }, "end": { "line": 73, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 477, "end": 552, "loc": { "start": { "line": 18, "column": 2 }, "end": { "line": 22, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 477, "end": 488, "loc": { "start": { "line": 18, "column": 2 }, "end": { "line": 18, "column": 13 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 488, "end": 552, "loc": { "start": { "line": 18, "column": 13 }, "end": { "line": 22, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 489, "end": 494, "loc": { "start": { "line": 18, "column": 14 }, "end": { "line": 18, "column": 19 } }, "name": "props" } ], "body": { "type": "BlockStatement", "start": 496, "end": 552, "loc": { "start": { "line": 18, "column": 21 }, "end": { "line": 22, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 502, "end": 515, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 17 } }, "expression": { "type": "CallExpression", "start": 502, "end": 514, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 16 } }, "callee": { "type": "Super", "start": 502, "end": 507, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 9 } } }, "arguments": [ { "type": "Identifier", "start": 508, "end": 513, "loc": { "start": { "line": 19, "column": 10 }, "end": { "line": 19, "column": 15 } }, "name": "props" } ] } }, { "type": "ExpressionStatement", "start": 521, "end": 548, "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 21, "column": 31 } }, "expression": { "type": "AssignmentExpression", "start": 521, "end": 547, "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 21, "column": 30 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 521, "end": 531, "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 21, "column": 14 } }, "object": { "type": "ThisExpression", "start": 521, "end": 525, "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 21, "column": 8 } } }, "property": { "type": "Identifier", "start": 526, "end": 531, "loc": { "start": { "line": 21, "column": 9 }, "end": { "line": 21, "column": 14 } }, "name": "state" }, "computed": false }, "right": { "type": "CallExpression", "start": 534, "end": 547, "loc": { "start": { "line": 21, "column": 17 }, "end": { "line": 21, "column": 30 } }, "callee": { "type": "Identifier", "start": 534, "end": 545, "loc": { "start": { "line": 21, "column": 17 }, "end": { "line": 21, "column": 28 } }, "name": "getMapState" }, "arguments": [] } } } ] } } }, { "type": "MethodDefinition", "start": 556, "end": 640, "loc": { "start": { "line": 24, "column": 2 }, "end": { "line": 26, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 556, "end": 573, "loc": { "start": { "line": 24, "column": 2 }, "end": { "line": 24, "column": 19 } }, "name": "componentDidMount" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 573, "end": 640, "loc": { "start": { "line": 24, "column": 19 }, "end": { "line": 26, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 576, "end": 640, "loc": { "start": { "line": 24, "column": 22 }, "end": { "line": 26, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 582, "end": 636, "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 25, "column": 58 } }, "expression": { "type": "CallExpression", "start": 582, "end": 635, "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 25, "column": 57 } }, "callee": { "type": "MemberExpression", "start": 582, "end": 608, "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 25, "column": 30 } }, "object": { "type": "Identifier", "start": 582, "end": 590, "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 25, "column": 12 } }, "name": "MapState" }, "property": { "type": "Identifier", "start": 591, "end": 608, "loc": { "start": { "line": 25, "column": 13 }, "end": { "line": 25, "column": 30 } }, "name": "addChangeListener" }, "computed": false }, "arguments": [ { "type": "CallExpression", "start": 609, "end": 634, "loc": { "start": { "line": 25, "column": 31 }, "end": { "line": 25, "column": 56 } }, "callee": { "type": "MemberExpression", "start": 609, "end": 628, "loc": { "start": { "line": 25, "column": 31 }, "end": { "line": 25, "column": 50 } }, "object": { "type": "MemberExpression", "start": 609, "end": 623, "loc": { "start": { "line": 25, "column": 31 }, "end": { "line": 25, "column": 45 } }, "object": { "type": "ThisExpression", "start": 609, "end": 613, "loc": { "start": { "line": 25, "column": 31 }, "end": { "line": 25, "column": 35 } } }, "property": { "type": "Identifier", "start": 614, "end": 623, "loc": { "start": { "line": 25, "column": 36 }, "end": { "line": 25, "column": 45 } }, "name": "_onChange" }, "computed": false }, "property": { "type": "Identifier", "start": 624, "end": 628, "loc": { "start": { "line": 25, "column": 46 }, "end": { "line": 25, "column": 50 } }, "name": "bind" }, "computed": false }, "arguments": [ { "type": "ThisExpression", "start": 629, "end": 633, "loc": { "start": { "line": 25, "column": 51 }, "end": { "line": 25, "column": 55 } } } ] } ] } } ] } } }, { "type": "MethodDefinition", "start": 644, "end": 734, "loc": { "start": { "line": 28, "column": 2 }, "end": { "line": 30, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 644, "end": 664, "loc": { "start": { "line": 28, "column": 2 }, "end": { "line": 28, "column": 22 } }, "name": "componentWillUnmount" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 664, "end": 734, "loc": { "start": { "line": 28, "column": 22 }, "end": { "line": 30, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 667, "end": 734, "loc": { "start": { "line": 28, "column": 25 }, "end": { "line": 30, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 673, "end": 730, "loc": { "start": { "line": 29, "column": 4 }, "end": { "line": 29, "column": 61 } }, "expression": { "type": "CallExpression", "start": 673, "end": 729, "loc": { "start": { "line": 29, "column": 4 }, "end": { "line": 29, "column": 60 } }, "callee": { "type": "MemberExpression", "start": 673, "end": 702, "loc": { "start": { "line": 29, "column": 4 }, "end": { "line": 29, "column": 33 } }, "object": { "type": "Identifier", "start": 673, "end": 681, "loc": { "start": { "line": 29, "column": 4 }, "end": { "line": 29, "column": 12 } }, "name": "MapState" }, "property": { "type": "Identifier", "start": 682, "end": 702, "loc": { "start": { "line": 29, "column": 13 }, "end": { "line": 29, "column": 33 } }, "name": "removeChangeListener" }, "computed": false }, "arguments": [ { "type": "CallExpression", "start": 703, "end": 728, "loc": { "start": { "line": 29, "column": 34 }, "end": { "line": 29, "column": 59 } }, "callee": { "type": "MemberExpression", "start": 703, "end": 722, "loc": { "start": { "line": 29, "column": 34 }, "end": { "line": 29, "column": 53 } }, "object": { "type": "MemberExpression", "start": 703, "end": 717, "loc": { "start": { "line": 29, "column": 34 }, "end": { "line": 29, "column": 48 } }, "object": { "type": "ThisExpression", "start": 703, "end": 707, "loc": { "start": { "line": 29, "column": 34 }, "end": { "line": 29, "column": 38 } } }, "property": { "type": "Identifier", "start": 708, "end": 717, "loc": { "start": { "line": 29, "column": 39 }, "end": { "line": 29, "column": 48 } }, "name": "_onChange" }, "computed": false }, "property": { "type": "Identifier", "start": 718, "end": 722, "loc": { "start": { "line": 29, "column": 49 }, "end": { "line": 29, "column": 53 } }, "name": "bind" }, "computed": false }, "arguments": [ { "type": "ThisExpression", "start": 723, "end": 727, "loc": { "start": { "line": 29, "column": 54 }, "end": { "line": 29, "column": 58 } } } ] } ] } } ] } } }, { "type": "MethodDefinition", "start": 738, "end": 789, "loc": { "start": { "line": 32, "column": 2 }, "end": { "line": 34, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 738, "end": 747, "loc": { "start": { "line": 32, "column": 2 }, "end": { "line": 32, "column": 11 } }, "name": "_onChange" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 747, "end": 789, "loc": { "start": { "line": 32, "column": 11 }, "end": { "line": 34, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 750, "end": 789, "loc": { "start": { "line": 32, "column": 14 }, "end": { "line": 34, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 756, "end": 785, "loc": { "start": { "line": 33, "column": 4 }, "end": { "line": 33, "column": 33 }