UNPKG

rizzo-next

Version:

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

1,473 lines 154 kB
{ "type": "Program", "start": 0, "end": 735, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 30, "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": 84, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 39 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 52, "end": 58, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 13 } }, "local": { "type": "Identifier", "start": 52, "end": 58, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 13 } }, "name": "$clamp" } } ], "importKind": "value", "source": { "type": "Literal", "start": 64, "end": 83, "loc": { "start": { "line": 2, "column": 19 }, "end": { "line": 2, "column": 38 } }, "value": "clamp-js/clamp.js", "rawValue": "clamp-js/clamp.js", "raw": "\"clamp-js/clamp.js\"" } }, { "type": "ImportDeclaration", "start": 85, "end": 108, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 23 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 92, "end": 93, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 8 } }, "local": { "type": "Identifier", "start": 92, "end": 93, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 8 } }, "name": "$" } } ], "importKind": "value", "source": { "type": "Literal", "start": 99, "end": 107, "loc": { "start": { "line": 3, "column": 14 }, "end": { "line": 3, "column": 22 } }, "value": "jquery", "rawValue": "jquery", "raw": "\"jquery\"" } }, { "type": "ImportDeclaration", "start": 109, "end": 157, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 48 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 116, "end": 124, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 15 } }, "local": { "type": "Identifier", "start": 116, "end": 124, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 15 } }, "name": "debounce" } } ], "importKind": "value", "source": { "type": "Literal", "start": 130, "end": 156, "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 47 } }, "value": "lodash/function/debounce", "rawValue": "lodash/function/debounce", "raw": "\"lodash/function/debounce\"" } }, { "type": "ImportDeclaration", "start": 159, "end": 193, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 6, "column": 34 } }, "specifiers": [], "source": { "type": "Literal", "start": 166, "end": 192, "loc": { "start": { "line": 6, "column": 7 }, "end": { "line": 6, "column": 33 } }, "value": "./related_guidebook.scss", "rawValue": "./related_guidebook.scss", "raw": "\"./related_guidebook.scss\"" } }, { "type": "Identifier", "start": 195, "end": 691, "loc": { "start": { "line": 8, "column": 0 }, "end": { "line": 27, "column": 1 } }, "id": { "type": "Identifier", "start": 201, "end": 226, "loc": { "start": { "line": 8, "column": 6 }, "end": { "line": 8, "column": 31 } }, "name": "RelatedGuidebookComponent" }, "superClass": { "type": "Identifier", "start": 235, "end": 244, "loc": { "start": { "line": 8, "column": 40 }, "end": { "line": 8, "column": 49 } }, "name": "Component" }, "body": { "type": "ClassBody", "start": 245, "end": 691, "loc": { "start": { "line": 8, "column": 50 }, "end": { "line": 27, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 249, "end": 402, "loc": { "start": { "line": 9, "column": 2 }, "end": { "line": 15, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 249, "end": 259, "loc": { "start": { "line": 9, "column": 2 }, "end": { "line": 9, "column": 12 } }, "name": "initialize" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 259, "end": 402, "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 15, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 262, "end": 402, "loc": { "start": { "line": 9, "column": 15 }, "end": { "line": 15, "column": 3 } }, "body": [ { "type": "IfStatement", "start": 268, "end": 398, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 14, "column": 5 } }, "test": { "type": "UnaryExpression", "start": 272, "end": 298, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 34 } }, "operator": "!", "prefix": true, "argument": { "type": "CallExpression", "start": 273, "end": 298, "loc": { "start": { "line": 10, "column": 9 }, "end": { "line": 10, "column": 34 } }, "callee": { "type": "MemberExpression", "start": 273, "end": 291, "loc": { "start": { "line": 10, "column": 9 }, "end": { "line": 10, "column": 27 } }, "object": { "type": "CallExpression", "start": 273, "end": 282, "loc": { "start": { "line": 10, "column": 9 }, "end": { "line": 10, "column": 18 } }, "callee": { "type": "Identifier", "start": 273, "end": 274, "loc": { "start": { "line": 10, "column": 9 }, "end": { "line": 10, "column": 10 } }, "name": "$" }, "arguments": [ { "type": "Literal", "start": 275, "end": 281, "loc": { "start": { "line": 10, "column": 11 }, "end": { "line": 10, "column": 17 } }, "value": "html", "rawValue": "html", "raw": "\"html\"" } ] }, "property": { "type": "Identifier", "start": 283, "end": 291, "loc": { "start": { "line": 10, "column": 19 }, "end": { "line": 10, "column": 27 } }, "name": "hasClass" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 292, "end": 297, "loc": { "start": { "line": 10, "column": 28 }, "end": { "line": 10, "column": 33 } }, "value": "ie9", "rawValue": "ie9", "raw": "\"ie9\"" } ] } }, "consequent": { "type": "BlockStatement", "start": 300, "end": 398, "loc": { "start": { "line": 10, "column": 36 }, "end": { "line": 14, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 308, "end": 326, "loc": { "start": { "line": 11, "column": 6 }, "end": { "line": 11, "column": 24 } }, "expression": { "type": "CallExpression", "start": 308, "end": 325, "loc": { "start": { "line": 11, "column": 6 }, "end": { "line": 11, "column": 23 } }, "callee": { "type": "MemberExpression", "start": 308, "end": 323, "loc": { "start": { "line": 11, "column": 6 }, "end": { "line": 11, "column": 21 } }, "object": { "type": "ThisExpression", "start": 308, "end": 312, "loc": { "start": { "line": 11, "column": 6 }, "end": { "line": 11, "column": 10 } } }, "property": { "type": "Identifier", "start": 313, "end": 323, "loc": { "start": { "line": 11, "column": 11 }, "end": { "line": 11, "column": 21 } }, "name": "_clampText" }, "computed": false }, "arguments": [] } }, { "type": "ExpressionStatement", "start": 334, "end": 392, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 64 } }, "expression": { "type": "CallExpression", "start": 334, "end": 391, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 63 } }, "callee": { "type": "MemberExpression", "start": 334, "end": 350, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 22 } }, "object": { "type": "CallExpression", "start": 334, "end": 343, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 15 } }, "callee": { "type": "Identifier", "start": 334, "end": 335, "loc": { "start": { "line": 13, "column": 6 }, "end": { "line": 13, "column": 7 } }, "name": "$" }, "arguments": [ { "type": "Identifier", "start": 336, "end": 342, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 14 } }, "name": "window" } ] }, "property": { "type": "Identifier", "start": 344, "end": 350, "loc": { "start": { "line": 13, "column": 16 }, "end": { "line": 13, "column": 22 } }, "name": "resize" }, "computed": false }, "arguments": [ { "type": "CallExpression", "start": 351, "end": 390, "loc": { "start": { "line": 13, "column": 23 }, "end": { "line": 13, "column": 62 } }, "callee": { "type": "Identifier", "start": 351, "end": 359, "loc": { "start": { "line": 13, "column": 23 }, "end": { "line": 13, "column": 31 } }, "name": "debounce" }, "arguments": [ { "type": "CallExpression", "start": 360, "end": 384, "loc": { "start": { "line": 13, "column": 32 }, "end": { "line": 13, "column": 56 } }, "callee": { "type": "MemberExpression", "start": 360, "end": 378, "loc": { "start": { "line": 13, "column": 32 }, "end": { "line": 13, "column": 50 } }, "object": { "type": "MemberExpression", "start": 360, "end": 373, "loc": { "start": { "line": 13, "column": 32 }, "end": { "line": 13, "column": 45 } }, "object": { "type": "ThisExpression", "start": 360, "end": 364, "loc": { "start": { "line": 13, "column": 32 }, "end": { "line": 13, "column": 36 } } }, "property": { "type": "Identifier", "start": 365, "end": 373, "loc": { "start": { "line": 13, "column": 37 }, "end": { "line": 13, "column": 45 } }, "name": "_reclamp" }, "computed": false }, "property": { "type": "Identifier", "start": 374, "end": 378, "loc": { "start": { "line": 13, "column": 46 }, "end": { "line": 13, "column": 50 } }, "name": "bind" }, "computed": false }, "arguments": [ { "type": "ThisExpression", "start": 379, "end": 383, "loc": { "start": { "line": 13, "column": 51 }, "end": { "line": 13, "column": 55 } } } ] }, { "type": "Literal", "start": 386, "end": 389, "loc": { "start": { "line": 13, "column": 58 }, "end": { "line": 13, "column": 61 } }, "value": 100, "rawValue": 100, "raw": "100" } ] } ] } } ] }, "alternate": null } ] } } }, { "type": "MethodDefinition", "start": 406, "end": 445, "loc": { "start": { "line": 17, "column": 2 }, "end": { "line": 19, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 406, "end": 414, "loc": { "start": { "line": 17, "column": 2 }, "end": { "line": 17, "column": 10 } }, "name": "_reclamp" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 414, "end": 445, "loc": { "start": { "line": 17, "column": 10 }, "end": { "line": 19, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 417, "end": 445, "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 19, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 423, "end": 441, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 22 } }, "expression": { "type": "CallExpression", "start": 423, "end": 440, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 21 } }, "callee": { "type": "MemberExpression", "start": 423, "end": 438, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 19 } }, "object": { "type": "ThisExpression", "start": 423, "end": 427, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 8 } } }, "property": { "type": "Identifier", "start": 428, "end": 438, "loc": { "start": { "line": 18, "column": 9 }, "end": { "line": 18, "column": 19 } }, "name": "_clampText" }, "computed": false }, "arguments": [] } } ] } } }, { "type": "MethodDefinition", "start": 449, "end": 689, "loc": { "start": { "line": 21, "column": 2 }, "end": { "line": 26, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 449, "end": 459, "loc": { "start": { "line": 21, "column": 2 }, "end": { "line": 21, "column": 12 } }, "name": "_clampText" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 459, "end": 689, "loc": { "start": { "line": 21, "column": 12 }, "end": { "line": 26, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 462, "end": 689, "loc": { "start": { "line": 21, "column": 15 }, "end": { "line": 26, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 468, "end": 685, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 25, "column": 7 } }, "expression": { "type": "CallExpression", "start": 468, "end": 684, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 25, "column": 6 } }, "callee": { "type": "MemberExpression", "start": 468, "end": 481, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 17 } }, "object": { "type": "MemberExpression", "start": 468, "end": 476, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 12 } }, "object": { "type": "ThisExpression", "start": 468, "end": 472, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 22, "column": 8 } } }, "property": { "type": "Identifier", "start": 473, "end": 476, "loc": { "start": { "line": 22, "column": 9 }, "end": { "line": 22, "column": 12 } }, "name": "$el" }, "computed": false }, "property": { "type": "Identifier", "start": 477, "end": 481, "loc": { "start": { "line": 22, "column": 13 }, "end": { "line": 22, "column": 17 } }, "name": "each" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 482, "end": 683, "loc": { "start": { "line": 22, "column": 18 }, "end": { "line": 25, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 483, "end": 488, "loc": { "start": { "line": 22, "column": 19 }, "end": { "line": 22, "column": 24 } }, "name": "index" }, { "type": "Identifier", "start": 490, "end": 499, "loc": { "start": { "line": 22, "column": 26 }, "end": { "line": 22, "column": 35 } }, "name": "guidebook" } ], "body": { "type": "BlockStatement", "start": 504, "end": 683, "loc": { "start": { "line": 22, "column": 40 }, "end": { "line": 25, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 512, "end": 590, "loc": { "start": { "line": 23, "column": 6 }, "end": { "line": 23, "column": 84 } }, "expression": { "type": "CallExpression", "start": 512, "end": 589, "loc": { "start": { "line": 23, "column": 6 }, "end": { "line": 23, "column": 83 } }, "callee": { "type": "Identifier", "start": 512, "end": 518, "loc": { "start": { "line": 23, "column": 6 }, "end": { "line": 23, "column": 12 } }, "name": "$clamp" }, "arguments": [ { "type": "CallExpression", "start": 519, "end": 574, "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 68 } }, "callee": { "type": "MemberExpression", "start": 519, "end": 571, "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 65 } }, "object": { "type": "CallExpression", "start": 519, "end": 567, "loc": { "start": { "line": 23, "column": 13 }, "end": { "line": 23, "column": 61 } }, "callee": { "type": "MemberExpression", "start": 519, "end": 536, "loc": { "start": { "line": 23, "column": 1