UNPKG

rizzo-next

Version:

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

1,446 lines (1,445 loc) 239 kB
{ "type": "Program", "start": 0, "end": 2259, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 82, "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": 68, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 23 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 52, "end": 53, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 8 } }, "local": { "type": "Identifier", "start": 52, "end": 53, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 8 } }, "name": "$" } } ], "importKind": "value", "source": { "type": "Literal", "start": 59, "end": 67, "loc": { "start": { "line": 2, "column": 14 }, "end": { "line": 2, "column": 22 } }, "value": "jquery", "rawValue": "jquery", "raw": "\"jquery\"" } }, { "type": "ImportDeclaration", "start": 69, "end": 113, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 44 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 76, "end": 88, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 19 } }, "local": { "type": "Identifier", "start": 76, "end": 88, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 19 } }, "name": "ImageGallery" } } ], "importKind": "value", "source": { "type": "Literal", "start": 94, "end": 112, "loc": { "start": { "line": 3, "column": 25 }, "end": { "line": 3, "column": 43 } }, "value": "../image_gallery", "rawValue": "../image_gallery", "raw": "\"../image_gallery\"" } }, { "type": "ImportDeclaration", "start": 114, "end": 142, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 28 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 121, "end": 127, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 13 } }, "local": { "type": "Identifier", "start": 121, "end": 127, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 13 } }, "name": "moment" } } ], "importKind": "value", "source": { "type": "Literal", "start": 133, "end": 141, "loc": { "start": { "line": 4, "column": 19 }, "end": { "line": 4, "column": 27 } }, "value": "moment", "rawValue": "moment", "raw": "\"moment\"" } }, { "type": "ImportDeclaration", "start": 143, "end": 172, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 29 } }, "specifiers": [], "source": { "type": "Literal", "start": 150, "end": 171, "loc": { "start": { "line": 5, "column": 7 }, "end": { "line": 5, "column": 28 } }, "value": "./article_body.scss", "rawValue": "./article_body.scss", "raw": "\"./article_body.scss\"" }, "trailingComments": [ { "type": "Block", "value": "*\n * Enhances the body of articles with a gallery and more\n ", "start": 174, "end": 238, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 9, "column": 3 } }, "range": [ 174, 238 ] } ] }, { "type": "ExportDefaultDeclaration", "start": 239, "end": 2258, "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 81, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 254, "end": 2258, "loc": { "start": { "line": 10, "column": 15 }, "end": { "line": 81, "column": 1 } }, "id": { "type": "Identifier", "start": 260, "end": 280, "loc": { "start": { "line": 10, "column": 21 }, "end": { "line": 10, "column": 41 } }, "name": "ArticleBodyComponent", "leadingComments": null }, "superClass": { "type": "Identifier", "start": 289, "end": 298, "loc": { "start": { "line": 10, "column": 50 }, "end": { "line": 10, "column": 59 } }, "name": "Component" }, "body": { "type": "ClassBody", "start": 299, "end": 2258, "loc": { "start": { "line": 10, "column": 60 }, "end": { "line": 81, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 303, "end": 529, "loc": { "start": { "line": 11, "column": 2 }, "end": { "line": 19, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 303, "end": 313, "loc": { "start": { "line": 11, "column": 2 }, "end": { "line": 11, "column": 12 } }, "name": "initialize" }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 313, "end": 529, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 19, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 316, "end": 529, "loc": { "start": { "line": 11, "column": 15 }, "end": { "line": 19, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 322, "end": 387, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 69 } }, "expression": { "type": "AssignmentExpression", "start": 322, "end": 386, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 68 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 322, "end": 349, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 31 } }, "object": { "type": "ThisExpression", "start": 322, "end": 326, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 8 } } }, "property": { "type": "Identifier", "start": 327, "end": 349, "loc": { "start": { "line": 12, "column": 9 }, "end": { "line": 12, "column": 31 } }, "name": "imageContainerSelector" }, "computed": false }, "right": { "type": "Literal", "start": 352, "end": 386, "loc": { "start": { "line": 12, "column": 34 }, "end": { "line": 12, "column": 68 } }, "value": ".stack__article__image-container", "rawValue": ".stack__article__image-container", "raw": "\".stack__article__image-container\"" } } }, { "type": "ExpressionStatement", "start": 393, "end": 490, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 16, "column": 7 } }, "expression": { "type": "CallExpression", "start": 393, "end": 489, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 16, "column": 6 } }, "callee": { "type": "MemberExpression", "start": 393, "end": 415, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 26 } }, "object": { "type": "CallExpression", "start": 393, "end": 410, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 21 } }, "callee": { "type": "MemberExpression", "start": 393, "end": 408, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 19 } }, "object": { "type": "ThisExpression", "start": 393, "end": 397, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 14, "column": 8 } } }, "property": { "type": "Identifier", "start": 398, "end": 408, "loc": { "start": { "line": 14, "column": 9 }, "end": { "line": 14, "column": 19 } }, "name": "loadImages" }, "computed": false }, "arguments": [] }, "property": { "type": "Identifier", "start": 411, "end": 415, "loc": { "start": { "line": 14, "column": 22 }, "end": { "line": 14, "column": 26 } }, "name": "then" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 416, "end": 488, "loc": { "start": { "line": 14, "column": 27 }, "end": { "line": 16, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 422, "end": 488, "loc": { "start": { "line": 14, "column": 33 }, "end": { "line": 16, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 430, "end": 482, "loc": { "start": { "line": 15, "column": 6 }, "end": { "line": 15, "column": 58 } }, "expression": { "type": "AssignmentExpression", "start": 430, "end": 481, "loc": { "start": { "line": 15, "column": 6 }, "end": { "line": 15, "column": 57 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 430, "end": 442, "loc": { "start": { "line": 15, "column": 6 }, "end": { "line": 15, "column": 18 } }, "object": { "type": "ThisExpression", "start": 430, "end": 434, "loc": { "start": { "line": 15, "column": 6 }, "end": { "line": 15, "column": 10 } } }, "property": { "type": "Identifier", "start": 435, "end": 442, "loc": { "start": { "line": 15, "column": 11 }, "end": { "line": 15, "column": 18 } }, "name": "gallery" }, "computed": false }, "right": { "type": "NewExpression", "start": 445, "end": 481, "loc": { "start": { "line": 15, "column": 21 }, "end": { "line": 15, "column": 57 } }, "callee": { "type": "Identifier", "start": 449, "end": 461, "loc": { "start": { "line": 15, "column": 25 }, "end": { "line": 15, "column": 37 } }, "name": "ImageGallery" }, "arguments": [ { "type": "ObjectExpression", "start": 462, "end": 480, "loc": { "start": { "line": 15, "column": 38 }, "end": { "line": 15, "column": 56 } }, "properties": [ { "type": "Property", "start": 464, "end": 478, "loc": { "start": { "line": 15, "column": 40 }, "end": { "line": 15, "column": 54 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 464, "end": 466, "loc": { "start": { "line": 15, "column": 40 }, "end": { "line": 15, "column": 42 } }, "name": "el" }, "value": { "type": "Literal", "start": 468, "end": 478, "loc": { "start": { "line": 15, "column": 44 }, "end": { "line": 15, "column": 54 } }, "value": ".article", "rawValue": ".article", "raw": "\".article\"" }, "kind": "init" } ] } ] } } } ] } } ] } }, { "type": "ExpressionStatement", "start": 496, "end": 525, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 33 } }, "expression": { "type": "CallExpression", "start": 496, "end": 524, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 32 } }, "callee": { "type": "MemberExpression", "start": 496, "end": 522, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 30 } }, "object": { "type": "ThisExpression", "start": 496, "end": 500, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 8 } } }, "property": { "type": "Identifier", "start": 501, "end": 522, "loc": { "start": { "line": 18, "column": 9 }, "end": { "line": 18, "column": 30 } }, "name": "formatAndPositionDate" }, "computed": false }, "arguments": [] } } ], "trailingComments": null }, "trailingComments": null }, "trailingComments": [ { "type": "Block", "value": "*\n * Loads all the images in the body of the article\n * @return {Promise} A promise for when all of the images have loaded\n ", "start": 532, "end": 666, "loc": { "start": { "line": 20, "column": 2 }, "end": { "line": 23, "column": 5 } }, "range": [ 532, 666 ] } ] }, { "type": "MethodDefinition", "start": 669, "end": 1336, "loc": { "start": { "line": 24, "column": 2 }, "end": { "line": 47, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 669, "end": 679, "loc": { "start": { "line": 24, "column": 2 }, "end": { "line": 24, "column": 12 } }, "name": "loadImages", "leadingComments": null }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 679, "end": 1336, "loc": { "start": { "line": 24, "column": 12 }, "end": { "line": 47, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 682, "end": 1336, "loc": { "start": { "line": 24, "column": 15 }, "end": { "line": 47, "column": 3 } }, "body": [ { "type": "VariableDeclaration", "start": 688, "end": 706, "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 25, "column": 22 } }, "declarations": [ { "type": "VariableDeclarator", "start": 692, "end": 705, "loc": { "start": { "line": 25, "column": 8 }, "end": { "line": 25, "column": 21 } }, "id": { "type": "Identifier", "start": 692, "end": 700, "loc": { "start": { "line": 25, "column": 8 }, "end": { "line": 25, "column": 16 } }, "name": "promises" }, "init": { "type": "ArrayExpression", "start": 703, "end": 705, "loc": { "start": { "line": 25, "column": 19 }, "end": { "line": 25, "column": 21 } }, "elements": [] } } ], "kind": "let" }, { "type": "ExpressionStatement", "start": 712, "end": 1297, "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 44, "column": 7 } }, "expression": { "type": "CallExpression", "start": 712, "end": 1296, "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 44, "column": 6 } }, "callee": { "type": "MemberExpression", "start": 712, "end": 759, "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 27, "column": 51 } }, "object": { "type": "CallExpression", "start": 712, "end": 754, "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 27, "column": 46 } }, "callee": { "type": "MemberExpression", "start": 712, "end": 725, "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 27, "column": 17 } }, "object": { "type": "MemberExpression", "start": 712, "end": 720, "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 27, "column": 12 } }, "object": { "type": "ThisExpression", "start": 712, "end": 716, "loc": { "start": { "line": 27, "column": 4 }, "end": { "line": 27, "column": 8 } } }, "property": { "type": "Identifier", "start": 717, "end": 720, "loc": { "start": { "line": 27, "column": 9 }, "end": { "line": 27, "column": 12 } }, "name": "$el" }, "computed": false }, "property": { "type": "Identifier", "start": 721, "end": 725, "loc": { "start": { "line": 27, "column": 13 }, "end": { "line": 27, "column": 17 } }, "name": "find" }, "computed": false }, "arguments": [ { "type": "MemberExpression", "start": 726, "end": 753, "loc": { "start": { "line": 27, "column": 18 }, "end": { "line": 27, "column": 45 } }, "object": { "type": "ThisExpression", "start": 726, "end": 730, "loc": { "start": { "line": 27, "column": 18 }, "end": { "line": 27, "column": 22 } } }, "property": { "type": "Identifier", "start": 731, "end": 753, "loc": { "start": { "line": 27, "column": 23 }, "end": { "line": 27, "column": 45 } }, "name": "imageContainerSelector" }, "computed": false } ] }, "property": { "type": "Identifier", "start": 755, "end": 759, "loc": { "start": { "line": 27, "column": 47 }, "end": { "line": 27, "column": 51 } }, "name": "each" }, "computed": false }, "arguments": [ { "type": "ArrowFunctionExpression", "start": 760, "end": 1295, "loc": { "start": { "line": 27, "column": 52 }, "end": { "line": 44, "column": 5 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 761, "end": 766, "loc": { "start": { "line": 27, "column": 53 }, "end": { "line": 27, "column": 58 } }, "name": "index" }, { "type": "Identifier", "start": 768, "end": 770, "loc": { "start": { "line": 27, "column": 60 }, "end": { "line": 27, "column": 62 } }, "name": "el" } ], "body": { "type": "BlockStatement", "start": 775, "end": 1295, "loc": { "start": { "line": 27, "column": 67 }, "end": {