UNPKG

rizzo-next

Version:

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

1,380 lines 157 kB
{ "type": "Program", "start": 0, "end": 3019, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 69, "column": 0 } }, "sourceType": "module", "body": [ { "type": "VariableDeclaration", "start": 0, "end": 67, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 67 } }, "declarations": [ { "type": "VariableDeclarator", "start": 4, "end": 66, "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 66 } }, "id": { "type": "Identifier", "start": 4, "end": 12, "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 12 } }, "name": "Injector" }, "init": { "type": "CallExpression", "start": 15, "end": 66, "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 66 } }, "callee": { "type": "Identifier", "start": 15, "end": 22, "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 22 } }, "name": "require" }, "arguments": [ { "type": "Literal", "start": 23, "end": 65, "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 65 } }, "value": "inject!../../../src/components/articles/", "rawValue": "inject!../../../src/components/articles/", "raw": "\"inject!../../../src/components/articles/\"" } ] } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 68, "end": 104, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 36 } }, "declarations": [ { "type": "VariableDeclarator", "start": 72, "end": 86, "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 18 } }, "id": { "type": "Identifier", "start": 72, "end": 82, "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 14 } }, "name": "clampCalls" }, "init": { "type": "Literal", "start": 85, "end": 86, "loc": { "start": { "line": 2, "column": 17 }, "end": { "line": 2, "column": 18 } }, "value": 0, "rawValue": 0, "raw": "0" } }, { "type": "VariableDeclarator", "start": 88, "end": 103, "loc": { "start": { "line": 2, "column": 20 }, "end": { "line": 2, "column": 35 } }, "id": { "type": "Identifier", "start": 88, "end": 103, "loc": { "start": { "line": 2, "column": 20 }, "end": { "line": 2, "column": 35 } }, "name": "clampCalledWith" }, "init": null } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 105, "end": 268, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 9, "column": 3 } }, "declarations": [ { "type": "VariableDeclarator", "start": 109, "end": 267, "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 9, "column": 2 } }, "id": { "type": "Identifier", "start": 109, "end": 126, "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 21 } }, "name": "ArticlesComponent" }, "init": { "type": "CallExpression", "start": 129, "end": 267, "loc": { "start": { "line": 3, "column": 24 }, "end": { "line": 9, "column": 2 } }, "callee": { "type": "Identifier", "start": 129, "end": 137, "loc": { "start": { "line": 3, "column": 24 }, "end": { "line": 3, "column": 32 } }, "name": "Injector" }, "arguments": [ { "type": "ObjectExpression", "start": 138, "end": 266, "loc": { "start": { "line": 3, "column": 33 }, "end": { "line": 9, "column": 1 } }, "properties": [ { "type": "Property", "start": 142, "end": 239, "loc": { "start": { "line": 4, "column": 2 }, "end": { "line": 7, "column": 3 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Literal", "start": 142, "end": 161, "loc": { "start": { "line": 4, "column": 2 }, "end": { "line": 4, "column": 21 } }, "value": "clamp-js/clamp.js", "rawValue": "clamp-js/clamp.js", "raw": "\"clamp-js/clamp.js\"" }, "value": { "type": "FunctionExpression", "start": 163, "end": 239, "loc": { "start": { "line": 4, "column": 23 }, "end": { "line": 7, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 172, "end": 174, "loc": { "start": { "line": 4, "column": 32 }, "end": { "line": 4, "column": 34 } }, "name": "el" }, { "type": "Identifier", "start": 176, "end": 183, "loc": { "start": { "line": 4, "column": 36 }, "end": { "line": 4, "column": 43 } }, "name": "options" } ], "body": { "type": "BlockStatement", "start": 185, "end": 239, "loc": { "start": { "line": 4, "column": 45 }, "end": { "line": 7, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 191, "end": 204, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 17 } }, "expression": { "type": "UpdateExpression", "start": 191, "end": 203, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 16 } }, "operator": "++", "prefix": true, "argument": { "type": "Identifier", "start": 193, "end": 203, "loc": { "start": { "line": 5, "column": 6 }, "end": { "line": 5, "column": 16 } }, "name": "clampCalls" } } }, { "type": "ExpressionStatement", "start": 209, "end": 235, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 30 } }, "expression": { "type": "AssignmentExpression", "start": 209, "end": 234, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 29 } }, "operator": "=", "left": { "type": "Identifier", "start": 209, "end": 224, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 19 } }, "name": "clampCalledWith" }, "right": { "type": "Identifier", "start": 227, "end": 234, "loc": { "start": { "line": 6, "column": 22 }, "end": { "line": 6, "column": 29 } }, "name": "options" } } } ] } }, "kind": "init" }, { "type": "Property", "start": 243, "end": 264, "loc": { "start": { "line": 8, "column": 2 }, "end": { "line": 8, "column": 23 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Literal", "start": 243, "end": 249, "loc": { "start": { "line": 8, "column": 2 }, "end": { "line": 8, "column": 8 } }, "value": "Tabs", "rawValue": "Tabs", "raw": "\"Tabs\"" }, "value": { "type": "FunctionExpression", "start": 251, "end": 264, "loc": { "start": { "line": 8, "column": 10 }, "end": { "line": 8, "column": 23 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 262, "end": 264, "loc": { "start": { "line": 8, "column": 21 }, "end": { "line": 8, "column": 23 } }, "body": [] } }, "kind": "init" } ] } ] } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 269, "end": 295, "loc": { "start": { "line": 10, "column": 0 }, "end": { "line": 10, "column": 26 } }, "declarations": [ { "type": "VariableDeclarator", "start": 273, "end": 294, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 25 } }, "id": { "type": "Identifier", "start": 273, "end": 274, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 5 } }, "name": "$" }, "init": { "type": "CallExpression", "start": 277, "end": 294, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 25 } }, "callee": { "type": "Identifier", "start": 277, "end": 284, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 15 } }, "name": "require" }, "arguments": [ { "type": "Literal", "start": 285, "end": 293, "loc": { "start": { "line": 10, "column": 16 }, "end": { "line": 10, "column": 24 } }, "value": "jquery", "rawValue": "jquery", "raw": "\"jquery\"" } ] } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 296, "end": 2155, "loc": { "start": { "line": 11, "column": 0 }, "end": { "line": 36, "column": 2 } }, "declarations": [ { "type": "VariableDeclarator", "start": 300, "end": 2154, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 36, "column": 1 } }, "id": { "type": "Identifier", "start": 300, "end": 307, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 11 } }, "name": "fixture" }, "init": { "type": "TemplateLiteral", "start": 310, "end": 2154, "loc": { "start": { "line": 11, "column": 14 }, "end": { "line": 36, "column": 1 } }, "expressions": [], "quasis": [ { "type": "TemplateElement", "start": 311, "end": 2153, "loc": { "start": { "line": 11, "column": 15 }, "end": { "line": 36, "column": 0 } }, "value": { "raw": "\n<article class=\"article\">\n <div class=\"article__info\">\n <a class=\"article__info__link\" href=\"http://www.lonelyplanet.com/travel-tips-and-articles/where-and-how-to-watch-sport-like-a-local\">\n <h2 class=\"article__info__title\">Where and how to watch sport like a local</h2>\n <p class=\"article__info__teaser\">There are few better ways into a place’s soul than through its sports teams. Step into the febrile atmosphere of a stadium or arena mid-match and you’ll find usually relaxed locals in a state of agitation or elation, depending on the scoreline.</p>\n <p class=\"article__info__blurb\" style=\"overflow: hidden; text-overflow: ellipsis; -webkit-box-orient: vertical; display: -webkit-box; -webkit-line-clamp: 1;\">Head to one of these sporting destinations and we promise you’ll see a side of town that’s impossible to find on the streets.</p>\n </a>\n\n <a class=\"article__info__author\" href=\"https://auth.lonelyplanet.com/profiles/ddabdbb0-66a8-46e0-9e17-d95b14ad38cb\">\n \n <img class=\"article__info__author__image\" src=\"https://auth.lonelyplanet.com/profiles/ddabdbb0-66a8-46e0-9e17-d95b14ad38cb/image\">\n \n <div class=\"article__info__author__creds\">\n <div class=\"article__info__author__creds__name\">Joe Minihane</div>\n <div class=\"article__info__author__creds__title\">Lonely Planet Writer</div>\n </div>\n </a>\n </div>\n \n <a class=\"article__imagery\" href=\"http://www.lonelyplanet.com/travel-tips-and-articles/where-and-how-to-watch-sport-like-a-local\" tabindex=\"-1\">\n <div class=\"article__imagery__image\" aria-label=\"Image for Where and how to watch sport like a local\" style=\"background-image: url(//images-resrc.staticlp.com/S=W748/O=75/http://www.lonelyplanet.com/travel-blog/tip-article/wordpress_uploads/2015/08/bombonera_cs.jpg)\"></div>\n </a>\n \n</article>\n", "cooked": "\n<article class=\"article\">\n <div class=\"article__info\">\n <a class=\"article__info__link\" href=\"http://www.lonelyplanet.com/travel-tips-and-articles/where-and-how-to-watch-sport-like-a-local\">\n <h2 class=\"article__info__title\">Where and how to watch sport like a local</h2>\n <p class=\"article__info__teaser\">There are few better ways into a place’s soul than through its sports teams. Step into the febrile atmosphere of a stadium or arena mid-match and you’ll find usually relaxed locals in a state of agitation or elation, depending on the scoreline.</p>\n <p class=\"article__info__blurb\" style=\"overflow: hidden; text-overflow: ellipsis; -webkit-box-orient: vertical; display: -webkit-box; -webkit-line-clamp: 1;\">Head to one of these sporting destinations and we promise you’ll see a side of town that’s impossible to find on the streets.</p>\n </a>\n\n <a class=\"article__info__author\" href=\"https://auth.lonelyplanet.com/profiles/ddabdbb0-66a8-46e0-9e17-d95b14ad38cb\">\n \n <img class=\"article__info__author__image\" src=\"https://auth.lonelyplanet.com/profiles/ddabdbb0-66a8-46e0-9e17-d95b14ad38cb/image\">\n \n <div class=\"article__info__author__creds\">\n <div class=\"article__info__author__creds__name\">Joe Minihane</div>\n <div class=\"article__info__author__creds__title\">Lonely Planet Writer</div>\n </div>\n </a>\n </div>\n \n <a class=\"article__imagery\" href=\"http://www.lonelyplanet.com/travel-tips-and-articles/where-and-how-to-watch-sport-like-a-local\" tabindex=\"-1\">\n <div class=\"article__imagery__image\" aria-label=\"Image for Where and how to watch sport like a local\" style=\"background-image: url(//images-resrc.staticlp.com/S=W748/O=75/http://www.lonelyplanet.com/travel-blog/tip-article/wordpress_uploads/2015/08/bombonera_cs.jpg)\"></div>\n </a>\n \n</article>\n" }, "tail": true } ] } } ], "kind": "let", "trailingComments": [ { "type": "Block", "value": "* @test {ArticlesComponent} ", "start": 2156, "end": 2188, "loc": { "start": { "line": 37, "column": 0 }, "end": { "line": 37, "column": 32 } }, "range": [ 2156, 2188 ] } ] }, { "type": "ExpressionStatement", "start": 2189, "end": 3018, "loc": { "start": { "line": 38, "column": 0 }, "end": { "line": 68, "column": 3 } }, "expression": { "type": "CallExpression", "start": 2189, "end": 3017, "loc": { "start": { "line": 38, "column": 0 }, "end": { "line": 68, "column": 2 } }, "callee": { "type": "Identifier", "start": 2189, "end": 2197, "loc": { "start": { "line": 38, "column": 0 }, "end": { "line": 38, "column": 8 } }, "name": "describe", "leadingComments": null }, "arguments": [ { "type": "Literal", "start": 2198, "end": 2218, "loc": { "start": { "line": 38, "column": 9 }, "end": { "line": 38, "column": 29 } }, "value": "articles component", "rawValue": "articles component", "raw": "\"articles component\"" }, { "type": "ArrowFunctionExpression", "start": 2220, "end": 3016, "loc": { "start": { "line": 38, "column": 31 }, "end": { "line": 68, "column": 1 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 2226, "end": 3016, "loc": { "start": { "line": 38, "column": 37 }, "end": { "line": 68, "column": 1 } }, "body": [ { "type": "ExpressionStatement", "start": 2230, "end": 2545, "loc": { "start": { "line": 39, "column": 2 }, "end": { "line": 49, "column": 5 } }, "expression": { "type": "CallExpression", "start": 2230, "end": 2544, "loc": { "start": { "line": 39, "column": 2 }, "end": { "line": 49, "column": 4 } }, "callee": { "type": "Identifier", "start": 2230, "end": 2232, "loc": { "start": { "line": 39, "column": 2 }, "end": { "line": 39, "column": 4 } }, "name": "it" }, "arguments": [ { "type": "Literal", "start": 2233, "end": 2255, "loc": { "start": { "line": 39, "column": 5 }, "end": { "line": 39, "column": 27 } }, "value": "should detect mobile", "rawValue": "should detect mobile", "raw": "\"should detect mobile\"" }, { "type": "ArrowFunctionExpression", "start": 2257, "end": 2543, "loc": { "start": { "line": 39, "column": 29 }, "end": { "line": 49, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 2263, "end": 2543, "loc": { "start": { "line": 39, "column": 35 }, "end": { "line": 49, "column": 3 } }, "body": [ { "type": "VariableDeclaration", "start": 2269, "end": 2291, "loc": { "start": { "line": 40, "column": 4 }, "end": { "line": 40, "column": 26 } }, "declarations": [ { "type": "VariableDeclarator", "start": 2273, "end": 2290, "loc": { "start": { "line": 40, "column": 8 }, "end": { "line": 40, "column": 25 } }, "id": { "type": "Identifier", "start": 2273, "end": 2275, "loc": { "start": { "line": 40, "column": 8 }, "end": { "line": 40, "column": 10 } }, "name": "el" }, "init": { "type": "CallExpression", "start": 2278, "end": 2290, "loc": { "start": { "line": 40, "column": 13 }, "end": { "line": 40, "column": 25 } }, "callee": { "type": "Identifier", "start": 2278, "end": 2279, "loc": { "start": { "line": 40, "column": 13 }, "end": { "line": 40, "column": 14 } }, "name": "$" }, "arguments": [ { "type": "Literal", "start": 2280, "end": 2289, "loc": { "start": { "line": 40, "column": 15 }, "end": { "line": 40, "column": 24 } }, "value": "<div />", "rawValue": "<div />", "raw": "\"<div />\"" } ] } } ], "kind": "let" }, { "type": "VariableDeclaration", "start": 2296, "end": 2342, "loc": { "start": { "line": 41, "column": 4 }, "end": { "line": 41, "column": 50 } }, "declarations": [ { "type": "VariableDeclarator", "start": 2300, "end": 2341, "loc": { "start": { "line": 41, "column": 8 }, "end": { "line": 41, "column": 49 } }, "id": { "type": "Identifier", "start": 2300, "end": 2309, "loc": { "start": { "line": 41, "column": 8 }, "end": { "line": 41, "column": 17 } }, "name": "component" }, "init": { "type": "NewExpression", "start": 2312, "end": 2341, "loc": { "start": { "line": 41, "column": 20 }, "end": { "line": 41, "column": 49 } }, "callee": { "type": "Identifier", "start": 2316, "end": 2333, "loc": { "start": { "line": 41, "column": 24 }, "end": { "line": 41, "column": 41 } }, "name": "ArticlesComponent" }, "arguments": [ { "type": "ObjectExpression", "start": 2334, "end": 2340, "loc": { "start": { "line": 41, "column": 42 }, "end": { "line": 41, "column": 48 } }, "properties": [ { "type": "Property", "start": 2336, "end": 2338, "loc": { "start": { "line": 41, "column": 44 }, "end": { "line": 41, "column": 46 } }, "method": false, "shorthand": true, "computed": false, "key": { "type": "Identifier", "start": 2336, "end": 2338, "loc": { "start": { "line": 41, "column": 44 }, "end": { "line": 41, "column": 46 } }, "name": "el" }, "kind": "init", "value": { "type": "Identifier", "start": 2336, "end": 2338, "loc": { "start": { "line": 41, "column": 44 }, "end": { "line": 41, "column": 46 } }, "name": "el" } } ] } ] } } ], "kind": "let" }, { "type": "ExpressionStatement", "start": 2348, "end": 2382, "loc": { "start": { "line": 43, "column": 4 }, "end": { "line": 43, "column": 38 } }, "expression": { "type": "AssignmentExpression", "start": 2348, "end": 2381, "loc": { "start": { "line": 43, "column": 4 }, "end": { "line": 43, "column": 37 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 2348, "end": 2369, "loc": { "start": { "line": 43, "column": 4 }, "end": { "line": 43, "column": 25 } }, "object": { "type": "Identifier", "start": 2348, "end": 2357, "loc": { "start": { "line": 43, "column": 4 }, "end": { "line": 43, "column": 13 } }, "name": "component" }, "property": { "type": "Identifier", "start": 2358, "end": 2369, "loc": { "start": { "line": 43, "column": 14 }, "end": { "line": 43, "column": 25 } }, "name": "widthWindow" }, "computed": false }, "right": { "type": "ArrowFunctionExpression", "start": 2372, "end": 2381, "loc": { "start": { "line": 43, "column": 28 }, "end": { "line": 43, "column": 37 } }, "id": null, "generator": false, "expression": true, "async": false, "params": [], "body": { "type": "Literal", "start": 2378, "end": 2381, "loc": { "start": { "line": 43, "column": 34 }, "end": { "line": 43, "column": 37 } }, "value": 320, "rawValue": 320, "raw": "320" } } } }, { "type": "ExpressionStatement", "start": 2387, "end":