rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,497 lines • 335 kB
JSON
{
"type": "Program",
"start": 0,
"end": 1448,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 76,
"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": 109,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 64
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 52,
"end": 66,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 21
}
},
"local": {
"type": "Identifier",
"start": 52,
"end": 66,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 21
}
},
"name": "waitForTimeout"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 72,
"end": 108,
"loc": {
"start": {
"line": 2,
"column": 27
},
"end": {
"line": 2,
"column": 63
}
},
"value": "../../core/utils/waitForTransition",
"rawValue": "../../core/utils/waitForTransition",
"raw": "\"../../core/utils/waitForTransition\""
}
},
{
"type": "ImportDeclaration",
"start": 110,
"end": 143,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 33
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 117,
"end": 124,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 14
}
},
"local": {
"type": "Identifier",
"start": 117,
"end": 124,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 14
}
},
"name": "Overlay"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 130,
"end": 142,
"loc": {
"start": {
"line": 3,
"column": 20
},
"end": {
"line": 3,
"column": 32
}
},
"value": "../overlay",
"rawValue": "../overlay",
"raw": "\"../overlay\""
}
},
{
"type": "Identifier",
"start": 145,
"end": 1420,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 73,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 151,
"end": 160,
"loc": {
"start": {
"line": 5,
"column": 6
},
"end": {
"line": 5,
"column": 15
}
},
"name": "TopPlaces"
},
"superClass": {
"type": "Identifier",
"start": 169,
"end": 178,
"loc": {
"start": {
"line": 5,
"column": 24
},
"end": {
"line": 5,
"column": 33
}
},
"name": "Component"
},
"body": {
"type": "ClassBody",
"start": 179,
"end": 1420,
"loc": {
"start": {
"line": 5,
"column": 34
},
"end": {
"line": 73,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 183,
"end": 626,
"loc": {
"start": {
"line": 6,
"column": 2
},
"end": {
"line": 21,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 183,
"end": 193,
"loc": {
"start": {
"line": 6,
"column": 2
},
"end": {
"line": 6,
"column": 12
}
},
"name": "initialize"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 193,
"end": 626,
"loc": {
"start": {
"line": 6,
"column": 12
},
"end": {
"line": 21,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 196,
"end": 626,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 21,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 202,
"end": 225,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 27
}
},
"expression": {
"type": "AssignmentExpression",
"start": 202,
"end": 224,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 26
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 202,
"end": 212,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 14
}
},
"object": {
"type": "ThisExpression",
"start": 202,
"end": 206,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 207,
"end": 212,
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 14
}
},
"name": "$html"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 215,
"end": 224,
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 26
}
},
"callee": {
"type": "Identifier",
"start": 215,
"end": 216,
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 18
}
},
"name": "$"
},
"arguments": [
{
"type": "Literal",
"start": 217,
"end": 223,
"loc": {
"start": {
"line": 7,
"column": 19
},
"end": {
"line": 7,
"column": 25
}
},
"value": "html",
"rawValue": "html",
"raw": "\"html\""
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 230,
"end": 253,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 27
}
},
"expression": {
"type": "AssignmentExpression",
"start": 230,
"end": 252,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 26
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 230,
"end": 240,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 14
}
},
"object": {
"type": "ThisExpression",
"start": 230,
"end": 234,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 235,
"end": 240,
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 8,
"column": 14
}
},
"name": "$body"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 243,
"end": 252,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 26
}
},
"callee": {
"type": "Identifier",
"start": 243,
"end": 244,
"loc": {
"start": {
"line": 8,
"column": 17
},
"end": {
"line": 8,
"column": 18
}
},
"name": "$"
},
"arguments": [
{
"type": "Literal",
"start": 245,
"end": 251,
"loc": {
"start": {
"line": 8,
"column": 19
},
"end": {
"line": 8,
"column": 25
}
},
"value": "body",
"rawValue": "body",
"raw": "\"body\""
}
]
}
},
"trailingComments": [
{
"type": "CommentLine",
"value": " Remove from dom",
"start": 259,
"end": 277,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 22
}
},
"range": [
259,
277
]
}
]
},
{
"type": "ExpressionStatement",
"start": 282,
"end": 300,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 22
}
},
"expression": {
"type": "CallExpression",
"start": 282,
"end": 299,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 21
}
},
"callee": {
"type": "MemberExpression",
"start": 282,
"end": 297,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 19
}
},
"object": {
"type": "MemberExpression",
"start": 282,
"end": 290,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 12
}
},
"object": {
"type": "ThisExpression",
"start": 282,
"end": 286,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 8
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 287,
"end": 290,
"loc": {
"start": {
"line": 11,
"column": 9
},
"end": {
"line": 11,
"column": 12
}
},
"name": "$el"
},
"computed": false,
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 291,
"end": 297,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 19
}
},
"name": "detach"
},
"computed": false,
"leadingComments": null
},
"arguments": [],
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": " Remove from dom",
"start": 259,
"end": 277,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 22
}
},
"range": [
259,
277
]
}
],
"trailingComments": [
{
"type": "CommentLine",
"value": " New overlay instance",
"start": 306,
"end": 329,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 27
}
},
"range": [
306,
329
]
}
]
},
{
"type": "ExpressionStatement",
"start": 334,
"end": 363,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 33
}
},
"expression": {
"type": "AssignmentExpression",
"start": 334,
"end": 362,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 32
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 334,
"end": 346,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 16
}
},
"object": {
"type": "ThisExpression",
"start": 334,
"end": 338,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 8
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 339,
"end": 346,
"loc": {
"start": {
"line": 14,
"column": 9
},
"end": {
"line": 14,
"column": 16
}
},
"name": "overlay"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "NewExpression",
"start": 349,
"end": 362,
"loc": {
"start": {
"line": 14,
"column": 19
},
"end": {
"line": 14,
"column": 32
}
},
"callee": {
"type": "Identifier",
"start": 353,
"end": 360,
"loc": {
"start": {
"line": 14,
"column": 23
},
"end": {
"line": 14,
"column": 30
}
},
"name": "Overlay"
},
"arguments": []
},
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": " New overlay instance",
"start": 306,
"end": 329,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 27
}
},
"range": [
306,
329
]
}
],
"trailingComments": [
{
"type": "CommentLine",
"value": " Events",
"start": 369,
"end": 378,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 13
}
},
"range": [
369,
378
]
}
]
},
{
"type": "ExpressionStatement",
"start": 383,
"end": 446,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 67
}
},
"expression": {
"type": "CallExpression",
"start": 383,
"end": 445,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 66
}
},
"callee": {
"type": "MemberExpression",
"start": 383,
"end": 396,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 17
}
},
"object": {
"type": "MemberExpression",
"start": 383,
"end": 393,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 14
}
},
"object": {
"type": "ThisExpression",
"start": 383,
"end": 387,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 8
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 388,
"end": 393,
"loc": {
"start": {
"line": 17,
"column": 9
},
"end": {
"line": 17,
"column": 14
}
},
"name": "$body"
},
"computed": false,
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 394,
"end": 396,
"loc": {
"start": {
"line": 17,
"column": 15
},
"end": {
"line": 17,
"column": 17
}
},
"name": "on"
},
"computed": false,
"leadingComments": null
},
"arguments": [
{
"type": "Literal",
"start": 397,
"end": 404,
"loc": {
"start": {
"line": 17,
"column": 18
},
"end": {
"line": 17,
"column": 25
}
},
"value": "click",
"rawValue": "click",
"raw": "\"click\""
},
{
"type": "Literal",
"start": 406,
"end": 422,
"loc": {
"start": {
"line": 17,
"column": 27
},
"end": {
"line": 17,
"column": 43
}
},
"value": ".js-top-places",
"rawValue": ".js-top-places",
"raw": "\".js-top-places\""
},
{
"type": "CallExpression",
"start": 424,
"end": 444,
"loc": {
"start": {
"line": 17,
"column": 45
},
"end": {
"line": 17,
"column": 65
}
},
"callee": {
"type": "MemberExpression",
"start": 424,
"end": 438,
"loc": {
"start": {
"line": 17,
"column": 45
},
"end": {
"line": 17,
"column": 59
}
},
"object": {
"type": "MemberExpression",
"start": 424,
"end": 433,
"loc": {
"start": {
"line": 17,
"column": 45
},
"end": {
"line": 17,
"column": 54
}
},
"object": {
"type": "ThisExpression",
"start": 424,
"end": 428,
"loc": {
"start": {
"line": 17,
"column": 45
},
"end": {
"line": 17,
"column": 49
}
}
},
"property": {
"type": "Identifier",
"start": 429,
"end": 433,
"loc": {
"start": {
"line": 17,
"column": 50
},
"end": {
"line": 17,
"column": 54
}
},
"name": "show"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 434,
"end": 438,
"loc": {
"start": {
"line": 17,
"column": 55
},
"end": {
"line": 17,
"column": 59
}
},
"name": "bind"
},
"computed": false
},
"arguments": [
{
"type": "ThisExpression",
"start": 439,
"end": 443,
"loc": {
"start": {
"line": 17,
"column": 60
},
"end": {
"line": 17,
"column": 64
}
}
}
]
}
],
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": " Events",
"start": 369,
"end": 378,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 13
}
},
"range": [
369,
378
]
}
]
},
{
"type": "ExpressionStatement",
"start": 451,
"end": 499,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 52
}
},
"expression": {
"type": "CallExpression",
"start": 451,
"end": 498,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 51
}
},
"callee": {
"type": "MemberExpression",
"start": 451,
"end": 464,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 17
}
},
"object": {
"type": "MemberExpression",
"start": 451,
"end": 461,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 14
}
},
"object": {
"type": "ThisExpression",
"start": 451,
"end": 455,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 456,
"end": 461,
"loc": {
"start": {
"line": 18,
"column": 9
},
"end": {
"line": 18,
"column": 14
}
},
"name": "$body"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 462,
"end": 464,
"loc": {
"start": {
"line": 18,
"column": 15
},
"end": {
"line": 18,
"column": 17
}
},
"name": "on"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 465,
"end": 472,
"loc": {
"start": {
"line": 18,
"column": 18
},
"end": {
"line": 18,
"column": 25
}
},
"value": "keyup",
"rawValue": "keyup",
"raw": "\"keyup\""
},
{
"type": "CallExpression",
"start": 474,
"end": 497,
"loc": {
"start": {
"line": 18,
"column": 27
},
"end": {
"line": 18,
"column": 50
}
},
"callee": {
"type": "MemberExpression",
"start": 474,
"end": 491,
"loc": {
"start": {
"line": 18,
"column": 27
},
"end": {
"line": 18,
"column": 44
}
},
"object": {
"type": "MemberExpression",
"start": 474,
"end": 486,
"loc": {
"start": {
"line": 18,
"column": 27
},
"end": {
"line": 18,
"column": 39
}
},
"object": {
"type": "ThisExpression",
"start": 474,
"end": 478,
"loc": {
"start": {
"line": 18,
"column": 27
},
"end": {
"line": 18,
"column": 31
}
}
},
"property": {
"type": "Identifier",
"start": 479,
"end": 486,
"loc": {
"start": {
"line": 18,
"column": 32
},
"end": {
"line": 18,
"column": 39
}
},
"name": "onKeyup"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 487,
"end": 491,
"loc": {
"start": {
"line": 18,
"column": 40
},
"end": {
"line": 18,
"column": 44
}
},
"name": "bind"
},
"computed": false
},
"arguments": [
{
"type": "ThisExpression",
"start": 492,
"end": 496,
"loc": {
"start": {
"line": 18,
"column": 45
},
"end": {
"line": 18,
"column": 49
}
}
}
]
}
]
}
},
{
"type": "ExpressionStatement",
"start": 504,
"end": 569,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 69
}
},
"expression": {
"type": "CallExpression",
"start":