UNPKG

rizzo-next

Version:

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

1,589 lines (1,588 loc) 104 kB
{ "type": "Program", "start": 0, "end": 716, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 32, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 44, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 44 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 9, "end": 18, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } }, "imported": { "type": "Identifier", "start": 9, "end": 18, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } }, "name": "Component" }, "local": { "type": "Identifier", "start": 9, "end": 18, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } }, "name": "Component" } } ], "importKind": "value", "source": { "type": "Literal", "start": 26, "end": 43, "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 43 } }, "value": "../../core/bane", "rawValue": "../../core/bane", "raw": "\"../../core/bane\"" } }, { "type": "ImportDeclaration", "start": 45, "end": 88, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 43 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 52, "end": 64, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 19 } }, "local": { "type": "Identifier", "start": 52, "end": 64, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 19 } }, "name": "StackActions" } } ], "importKind": "value", "source": { "type": "Literal", "start": 70, "end": 87, "loc": { "start": { "line": 2, "column": 25 }, "end": { "line": 2, "column": 42 } }, "value": "./stack_actions", "rawValue": "./stack_actions", "raw": "\"./stack_actions\"" } }, { "type": "ImportDeclaration", "start": 89, "end": 128, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 39 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 96, "end": 106, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 17 } }, "local": { "type": "Identifier", "start": 96, "end": 106, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 17 } }, "name": "StackState" } } ], "importKind": "value", "source": { "type": "Literal", "start": 112, "end": 127, "loc": { "start": { "line": 3, "column": 23 }, "end": { "line": 3, "column": 38 } }, "value": "./stack_state", "rawValue": "./stack_state", "raw": "\"./stack_state\"" } }, { "type": "ImportDeclaration", "start": 129, "end": 171, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 42 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 136, "end": 142, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 13 } }, "local": { "type": "Identifier", "start": 136, "end": 142, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 13 } }, "name": "assign" } } ], "importKind": "value", "source": { "type": "Literal", "start": 148, "end": 170, "loc": { "start": { "line": 4, "column": 19 }, "end": { "line": 4, "column": 41 } }, "value": "lodash/object/assign", "rawValue": "lodash/object/assign", "raw": "\"lodash/object/assign\"" }, "trailingComments": [ { "type": "CommentLine", "value": " # Stack", "start": 173, "end": 183, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 10 } }, "range": [ 173, 183 ] }, { "type": "CommentLine", "value": " Renders stack widgets", "start": 184, "end": 208, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 7, "column": 24 } }, "range": [ 184, 208 ] } ] }, { "type": "Identifier", "start": 209, "end": 692, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 29, "column": 1 } }, "id": { "type": "Identifier", "start": 215, "end": 220, "loc": { "start": { "line": 8, "column": 6 }, "end": { "line": 8, "column": 11 } }, "name": "Stack", "leadingComments": null }, "superClass": { "type": "Identifier", "start": 229, "end": 238, "loc": { "start": { "line": 8, "column": 20 }, "end": { "line": 8, "column": 29 } }, "name": "Component" }, "body": { "type": "ClassBody", "start": 239, "end": 692, "loc": { "start": { "line": 8, "column": 30 }, "end": { "line": 29, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 243, "end": 528, "loc": { "start": { "line": 9, "column": 2 }, "end": { "line": 20, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 243, "end": 253, "loc": { "start": { "line": 9, "column": 2 }, "end": { "line": 9, "column": 12 } }, "name": "initialize" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 253, "end": 528, "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 20, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 256, "end": 528, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 20, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 262, "end": 283, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 25 } }, "expression": { "type": "AssignmentExpression", "start": 262, "end": 282, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 24 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 262, "end": 271, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 13 } }, "object": { "type": "ThisExpression", "start": 262, "end": 266, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 8 } } }, "property": { "type": "Identifier", "start": 267, "end": 271, "loc": { "start": { "line": 10, "column": 9 }, "end": { "line": 10, "column": 13 } }, "name": "name" }, "computed": false }, "right": { "type": "Literal", "start": 274, "end": 282, "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 24 } }, "value": "stacks", "rawValue": "stacks", "raw": "\"stacks\"" } } }, { "type": "ExpressionStatement", "start": 289, "end": 344, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 14, "column": 6 } }, "expression": { "type": "AssignmentExpression", "start": 289, "end": 343, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 14, "column": 5 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 289, "end": 300, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 15 } }, "object": { "type": "ThisExpression", "start": 289, "end": 293, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 8 } } }, "property": { "type": "Identifier", "start": 294, "end": 300, "loc": { "start": { "line": 12, "column": 9 }, "end": { "line": 12, "column": 15 } }, "name": "events" }, "computed": false }, "right": { "type": "ObjectExpression", "start": 303, "end": 343, "loc": { "start": { "line": 12, "column": 18 }, "end": { "line": 14, "column": 5 } }, "properties": [ { "type": "Property", "start": 311, "end": 337, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 32 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Literal", "start": 311, "end": 326, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 21 } }, "value": "click .button", "rawValue": "click .button", "raw": "\"click .button\"" }, "value": { "type": "Literal", "start": 328, "end": 337, "loc": { "start": { "line": 13, "column": 23 }, "end": { "line": 13, "column": 32 } }, "value": "getMore", "rawValue": "getMore", "raw": "\"getMore\"" }, "kind": "init" } ] } } }, { "type": "ExpressionStatement", "start": 350, "end": 412, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 66 } }, "expression": { "type": "AssignmentExpression", "start": 350, "end": 411, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 65 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 350, "end": 363, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 17 } }, "object": { "type": "ThisExpression", "start": 350, "end": 354, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 8 } } }, "property": { "type": "Identifier", "start": 355, "end": 363, "loc": { "start": { "line": 16, "column": 9 }, "end": { "line": 16, "column": 17 } }, "name": "template" }, "computed": false }, "right": { "type": "CallExpression", "start": 366, "end": 411, "loc": { "start": { "line": 16, "column": 20 }, "end": { "line": 16, "column": 65 } }, "callee": { "type": "Identifier", "start": 366, "end": 373, "loc": { "start": { "line": 16, "column": 20 }, "end": { "line": 16, "column": 27 } }, "name": "require" }, "arguments": [ { "type": "Literal", "start": 374, "end": 410, "loc": { "start": { "line": 16, "column": 28 }, "end": { "line": 16, "column": 64 } }, "value": "components/stacks/_stacks.html.hbs", "rawValue": "components/stacks/_stacks.html.hbs", "raw": "\"components/stacks/_stacks.html.hbs\"" } ] } } }, { "type": "ExpressionStatement", "start": 417, "end": 467, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 54 } }, "expression": { "type": "CallExpression", "start": 417, "end": 466, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 53 } }, "callee": { "type": "MemberExpression", "start": 417, "end": 430, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 17 } }, "object": { "type": "ThisExpression", "start": 417, "end": 421, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 8 } } }, "property": { "type": "Identifier", "start": 422, "end": 430, "loc": { "start": { "line": 17, "column": 9 }, "end": { "line": 17, "column": 17 } }, "name": "listenTo" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 431, "end": 441, "loc": { "start": { "line": 17, "column": 18 }, "end": { "line": 17, "column": 28 } }, "name": "StackState" }, { "type": "Literal", "start": 443, "end": 452, "loc": { "start": { "line": 17, "column": 30 }, "end": { "line": 17, "column": 39 } }, "value": "changed", "rawValue": "changed", "raw": "\"changed\"" }, { "type": "MemberExpression", "start": 454, "end": 465, "loc": { "start": { "line": 17, "column": 41 }, "end": { "line": 17, "column": 52 } }, "object": { "type": "ThisExpression", "start": 454, "end": 458, "loc": { "start": { "line": 17, "column": 41 }, "end": { "line": 17, "column": 45 } } }, "property": { "type": "Identifier", "start": 459, "end": 465, "loc": { "start": { "line": 17, "column": 46 }, "end": { "line": 17, "column": 52 } }, "name": "render" }, "computed": false } ] } }, { "type": "ExpressionStatement", "start": 473, "end": 524, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 55 } }, "expression": { "type": "CallExpression", "start": 473, "end": 523, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 54 } }, "callee": { "type": "MemberExpression", "start": 473, "end": 499, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 30 } }, "object": { "type": "Identifier", "start": 473, "end": 483, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 14 } }, "name": "StackState" }, "property": { "type": "Identifier", "start": 484, "end": 499, "loc": { "start": { "line": 19, "column": 15 }, "end": { "line": 19, "column": 30 } }, "name": "setInitialState" }, "computed": false }, "arguments": [ { "type": "CallExpression", "start": 500, "end": 522, "loc": { "start": { "line": 19, "column": 31 }, "end": { "line": 19, "column": 53 } }, "callee": { "type": "MemberExpression", "start": 500, "end": 520, "loc": { "start": { "line": 19, "column": 31 }, "end": { "line": 19, "column": 51 } }, "object": { "type": "ThisExpression", "start": 500, "end": 504, "loc": { "start": { "line": 19, "column": 31 }, "end": { "line": 19, "column": 35 } } }, "property": { "type": "Identifier", "start": 505, "end": 520, "loc": { "start": { "line": 19, "column": 36 }, "end": { "line": 19, "column": 51 } }, "name": "getInitialState" }, "computed": false }, "arguments": [] } ] } } ] } } }, { "type": "MethodDefinition", "start": 531, "end": 644, "loc": { "start": { "line": 21, "column": 2 }, "end": { "line": 25, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 531, "end": 537, "loc": { "start": { "line": 21, "column": 2 }, "end": { "line": 21, "column": 8 } }, "name": "render" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 537, "end": 644, "loc": { "start": { "line": 21, "column": 8 }, "end": { "line": 25, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 538, "end": 542, "loc": { "start": { "line": 21, "column": 9 }, "end": { "line": 21, "column": 13 } }, "name": "data" } ], "body": { "type": "BlockStatement", "start": 544, "end": 644, "loc": { "start": { "line": 21, "column": 15 }, "end": { "line": 25, "column": 3 } }, "body": [ { "type": "VariableDeclaration", "start": 550, "end": 609, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 63 } }, "declarations": [ { "type": "VariableDeclarator", "start": 554, "end": 608, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 62 } }, "id": { "type": "Identifier", "start": 554, "end": 566, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 20 } }, "name": "templateData" }, "init": { "type": "CallExpression", "start": 569, "end": 608, "loc": { "start": { "line": 22, "column": 23 }, "end": { "line": 22, "column": 62 } }, "callee": { "type": "Identifier", "start": 569, "end": 575, "loc": { "start": { "line": 22, "column": 23 }, "end": { "line": 22, "column": 29 } }, "name": "assign" }, "arguments": [ { "type": "ObjectExpression", "start": 576, "end": 578, "loc": { "start": { "line": 22, "column": 30 }, "end": { "line": 22, "column": 32 } }, "properties": [] }, { "type": "CallExpression", "start": 580, "end": 601, "loc": { "start": { "line": 22, "column": 34 }, "end": { "line": 22, "column": 55 } }, "callee": { "type": "MemberExpression", "start": 580, "end": 599, "loc": { "start": { "line": 22, "column": 34 }, "end": { "line": 22, "column": 53 } }, "object": { "type": "Identifier", "start": 580, "end": 590, "loc": { "start": { "line": 22, "column": 34 }, "end": { "line": 22, "column": 44 } }, "name": "StackState" }, "property": { "type": "Identifier", "start": 591, "end": 599, "loc": { "start": { "line": 22, "column": 45 }, "end": { "line": 22, "column": 53 } }, "name": "getState" }, "computed": false }, "arguments": [] }, { "type": "Identifier", "start": 603, "end": 607, "loc": { "start": { "line": 22, "column": 57 }, "end": { "line": 22, "column": 61 } }, "name": "data" } ] } } ], "kind": "let" }, { "type": "ExpressionStatement", "start": 615, "end": 640, "loc": { "start": { "line": 24, "column": 4 }, "end": { "line": 24, "column": 29 } }, "expression": { "type": "CallExpression", "start": 615, "end": 639, "loc": { "start": { "line": 24, "column": 4 }, "end": { "line": 24, "column": 28 } }, "callee": { "type": "MemberExpression", "start": 615, "end": 625, "loc": { "start": { "line": 24, "column": 4 }, "end": { "line": 24, "column": 14 } }, "object": { "type": "ThisExpression", "start": 615, "end": 619, "loc": { "start": { "line": 24, "column": 4 }, "end": { "line": 24, "column": 8 } } }, "property": { "type": "Identifier", "start": 620, "end": 625, "loc": { "start": { "line": 24, "column": 9 }, "end": { "line": 24, "column": 14 } }, "name": "build" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 626, "end": 638, "loc": { "start": { "line": 24, "column": 15 }, "end": { "line": 24, "column": 27 } }, "name": "templateData" } ] } } ] } } }, { "type": "MethodDefinition", "start": 647, "end": 690, "loc": { "start": { "line": 26, "column": 2 }, "end": { "line": 28, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 647, "end": 654, "loc": { "start": { "line": 26, "column": 2 }, "end": { "line": 26, "column": 9 } }, "name": "getMore" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 654, "end": 690, "loc": { "start": { "line": 26, "column": 9 }, "end": { "line": 28, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 657, "end": 690, "loc": { "start": { "line": 26, "column": 12 }, "end": { "line": 28, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 663, "end": 686, "loc": { "start": { "line": 27,