rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,579 lines (1,578 loc) • 301 kB
JSON
{
"type": "Program",
"start": 0,
"end": 1631,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 83,
"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": 112,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 67
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 52,
"end": 69,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 24
}
},
"local": {
"type": "Identifier",
"start": 52,
"end": 69,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 24
}
},
"name": "waitForTransition"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 75,
"end": 111,
"loc": {
"start": {
"line": 2,
"column": 30
},
"end": {
"line": 2,
"column": 66
}
},
"value": "../../core/utils/waitForTransition",
"rawValue": "../../core/utils/waitForTransition",
"raw": "\"../../core/utils/waitForTransition\""
}
},
{
"type": "Identifier",
"start": 114,
"end": 1598,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 80,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 120,
"end": 134,
"loc": {
"start": {
"line": 4,
"column": 6
},
"end": {
"line": 4,
"column": 20
}
},
"name": "SlideComponent"
},
"superClass": {
"type": "Identifier",
"start": 143,
"end": 152,
"loc": {
"start": {
"line": 4,
"column": 29
},
"end": {
"line": 4,
"column": 38
}
},
"name": "Component"
},
"body": {
"type": "ClassBody",
"start": 153,
"end": 1598,
"loc": {
"start": {
"line": 4,
"column": 39
},
"end": {
"line": 80,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 158,
"end": 385,
"loc": {
"start": {
"line": 6,
"column": 2
},
"end": {
"line": 16,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 169,
"end": 178,
"loc": {
"start": {
"line": 6,
"column": 13
},
"end": {
"line": 6,
"column": 22
}
},
"name": "imageSize"
},
"static": true,
"kind": "get",
"value": {
"type": "FunctionExpression",
"start": 178,
"end": 385,
"loc": {
"start": {
"line": 6,
"column": 22
},
"end": {
"line": 16,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 180,
"end": 385,
"loc": {
"start": {
"line": 6,
"column": 24
},
"end": {
"line": 16,
"column": 3
}
},
"body": [
{
"type": "IfStatement",
"start": 186,
"end": 270,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 9,
"column": 5
}
},
"test": {
"type": "CallExpression",
"start": 189,
"end": 240,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 58
}
},
"callee": {
"type": "MemberExpression",
"start": 189,
"end": 201,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 19
}
},
"object": {
"type": "Identifier",
"start": 189,
"end": 198,
"loc": {
"start": {
"line": 7,
"column": 7
},
"end": {
"line": 7,
"column": 16
}
},
"name": "Modernizr"
},
"property": {
"type": "Identifier",
"start": 199,
"end": 201,
"loc": {
"start": {
"line": 7,
"column": 17
},
"end": {
"line": 7,
"column": 19
}
},
"name": "mq"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 202,
"end": 239,
"loc": {
"start": {
"line": 7,
"column": 20
},
"end": {
"line": 7,
"column": 57
}
},
"value": "only screen and (min-width: 1200px)",
"rawValue": "only screen and (min-width: 1200px)",
"raw": "\"only screen and (min-width: 1200px)\""
}
]
},
"consequent": {
"type": "BlockStatement",
"start": 241,
"end": 270,
"loc": {
"start": {
"line": 7,
"column": 59
},
"end": {
"line": 9,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 249,
"end": 264,
"loc": {
"start": {
"line": 8,
"column": 6
},
"end": {
"line": 8,
"column": 21
}
},
"argument": {
"type": "Literal",
"start": 256,
"end": 263,
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 8,
"column": 20
}
},
"value": "large",
"rawValue": "large",
"raw": "\"large\""
}
}
]
},
"alternate": null
},
{
"type": "IfStatement",
"start": 276,
"end": 360,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 13,
"column": 5
}
},
"test": {
"type": "CallExpression",
"start": 279,
"end": 329,
"loc": {
"start": {
"line": 11,
"column": 7
},
"end": {
"line": 11,
"column": 57
}
},
"callee": {
"type": "MemberExpression",
"start": 279,
"end": 291,
"loc": {
"start": {
"line": 11,
"column": 7
},
"end": {
"line": 11,
"column": 19
}
},
"object": {
"type": "Identifier",
"start": 279,
"end": 288,
"loc": {
"start": {
"line": 11,
"column": 7
},
"end": {
"line": 11,
"column": 16
}
},
"name": "Modernizr"
},
"property": {
"type": "Identifier",
"start": 289,
"end": 291,
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 19
}
},
"name": "mq"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 292,
"end": 328,
"loc": {
"start": {
"line": 11,
"column": 20
},
"end": {
"line": 11,
"column": 56
}
},
"value": "only screen and (min-width: 720px)",
"rawValue": "only screen and (min-width: 720px)",
"raw": "\"only screen and (min-width: 720px)\""
}
]
},
"consequent": {
"type": "BlockStatement",
"start": 330,
"end": 360,
"loc": {
"start": {
"line": 11,
"column": 58
},
"end": {
"line": 13,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 338,
"end": 354,
"loc": {
"start": {
"line": 12,
"column": 6
},
"end": {
"line": 12,
"column": 22
}
},
"argument": {
"type": "Literal",
"start": 345,
"end": 353,
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 12,
"column": 21
}
},
"value": "medium",
"rawValue": "medium",
"raw": "\"medium\""
}
}
]
},
"alternate": null
},
{
"type": "ReturnStatement",
"start": 366,
"end": 381,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 19
}
},
"argument": {
"type": "Literal",
"start": 373,
"end": 380,
"loc": {
"start": {
"line": 15,
"column": 11
},
"end": {
"line": 15,
"column": 18
}
},
"value": "small",
"rawValue": "small",
"raw": "\"small\""
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 389,
"end": 432,
"loc": {
"start": {
"line": 18,
"column": 2
},
"end": {
"line": 20,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 400,
"end": 407,
"loc": {
"start": {
"line": 18,
"column": 13
},
"end": {
"line": 18,
"column": 20
}
},
"name": "quality"
},
"static": true,
"kind": "get",
"value": {
"type": "FunctionExpression",
"start": 407,
"end": 432,
"loc": {
"start": {
"line": 18,
"column": 20
},
"end": {
"line": 20,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 410,
"end": 432,
"loc": {
"start": {
"line": 18,
"column": 23
},
"end": {
"line": 20,
"column": 3
}
},
"body": [
{
"type": "ReturnStatement",
"start": 416,
"end": 428,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 16
}
},
"argument": {
"type": "Literal",
"start": 423,
"end": 427,
"loc": {
"start": {
"line": 19,
"column": 11
},
"end": {
"line": 19,
"column": 15
}
},
"value": "hq",
"rawValue": "hq",
"raw": "\"hq\""
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 436,
"end": 528,
"loc": {
"start": {
"line": 22,
"column": 2
},
"end": {
"line": 24,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 440,
"end": 448,
"loc": {
"start": {
"line": 22,
"column": 6
},
"end": {
"line": 22,
"column": 14
}
},
"name": "imageUrl"
},
"static": false,
"kind": "get",
"value": {
"type": "FunctionExpression",
"start": 448,
"end": 528,
"loc": {
"start": {
"line": 22,
"column": 14
},
"end": {
"line": 24,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 450,
"end": 528,
"loc": {
"start": {
"line": 22,
"column": 16
},
"end": {
"line": 24,
"column": 3
}
},
"body": [
{
"type": "ReturnStatement",
"start": 456,
"end": 524,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 23,
"column": 72
}
},
"argument": {
"type": "MemberExpression",
"start": 463,
"end": 523,
"loc": {
"start": {
"line": 23,
"column": 11
},
"end": {
"line": 23,
"column": 71
}
},
"object": {
"type": "MemberExpression",
"start": 463,
"end": 499,
"loc": {
"start": {
"line": 23,
"column": 11
},
"end": {
"line": 23,
"column": 47
}
},
"object": {
"type": "MemberExpression",
"start": 463,
"end": 473,
"loc": {
"start": {
"line": 23,
"column": 11
},
"end": {
"line": 23,
"column": 21
}
},
"object": {
"type": "ThisExpression",
"start": 463,
"end": 467,
"loc": {
"start": {
"line": 23,
"column": 11
},
"end": {
"line": 23,
"column": 15
}
}
},
"property": {
"type": "Identifier",
"start": 468,
"end": 473,
"loc": {
"start": {
"line": 23,
"column": 16
},
"end": {
"line": 23,
"column": 21
}
},
"name": "model"
},
"computed": false
},
"property": {
"type": "MemberExpression",
"start": 474,
"end": 498,
"loc": {
"start": {
"line": 23,
"column": 22
},
"end": {
"line": 23,
"column": 46
}
},
"object": {
"type": "Identifier",
"start": 474,
"end": 488,
"loc": {
"start": {
"line": 23,
"column": 22
},
"end": {
"line": 23,
"column": 36
}
},
"name": "SlideComponent"
},
"property": {
"type": "Identifier",
"start": 489,
"end": 498,
"loc": {
"start": {
"line": 23,
"column": 37
},
"end": {
"line": 23,
"column": 46
}
},
"name": "imageSize"
},
"computed": false
},
"computed": true
},
"property": {
"type": "MemberExpression",
"start": 500,
"end": 522,
"loc": {
"start": {
"line": 23,
"column": 48
},
"end": {
"line": 23,
"column": 70
}
},
"object": {
"type": "Identifier",
"start": 500,
"end": 514,
"loc": {
"start": {
"line": 23,
"column": 48
},
"end": {
"line": 23,
"column": 62
}
},
"name": "SlideComponent"
},
"property": {
"type": "Identifier",
"start": 515,
"end": 522,
"loc": {
"start": {
"line": 23,
"column": 63
},
"end": {
"line": 23,
"column": 70
}
},
"name": "quality"
},
"computed": false
},
"computed": true
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 532,
"end": 693,
"loc": {
"start": {
"line": 26,
"column": 2
},
"end": {
"line": 33,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 532,
"end": 542,
"loc": {
"start": {
"line": 26,
"column": 2
},
"end": {
"line": 26,
"column": 12
}
},
"name": "initialize"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 542,
"end": 693,
"loc": {
"start": {
"line": 26,
"column": 12
},
"end": {
"line": 33,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 543,
"end": 550,
"loc": {
"start": {
"line": 26,
"column": 13
},
"end": {
"line": 26,
"column": 20
}
},
"name": "options"
}
],
"body": {
"type": "BlockStatement",
"start": 551,
"end": 693,
"loc": {
"start": {
"line": 26,
"column": 21
},
"end": {
"line": 33,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 557,
"end": 584,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 31
}
},
"expression": {
"type": "AssignmentExpression",
"start": 557,
"end": 583,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 30
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 557,
"end": 567,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 14
}
},
"object": {
"type": "ThisExpression",
"start": 557,
"end": 561,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 562,
"end": 567,
"loc": {
"start": {
"line": 27,
"column": 9
},
"end": {
"line": 27,
"column": 14
}
},
"name": "model"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 570,
"end": 583,
"loc": {
"start": {
"line": 27,
"column": 17
},
"end": {
"line": 27,
"column": 30
}
},
"object": {
"type": "Identifier",
"start": 570,
"end": 577,
"loc": {
"start": {
"line": 27,
"column": 17
},
"end": {
"line": 27,
"column": 24
}
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 578,
"end": 583,
"loc": {
"start": {
"line": 27,
"column": 25
},
"end": {
"line": 27,
"column": 30
}
},
"name": "model"
},
"computed": false
}
}
},
{
"type": "ExpressionStatement",
"start": 589,
"end": 614,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 28,
"column": 29
}
},
"expression": {
"type": "AssignmentExpression",
"start": 589,
"end": 613,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 28,
"column": 28
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 589,
"end": 608,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 28,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 589,
"end": 593,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 28,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 594,
"end": 608,
"loc": {
"start": {
"line": 28,
"column": 9
},
"end": {
"line": 28,
"column": 23
}
},
"name": "preloadPromise"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 611,
"end": 613,
"loc": {
"start": {
"line": 28,
"column": 26
},
"end": {
"line": 28,
"column": 28
}
},
"properties": []
}
}
},
{
"type": "IfStatement",
"start": 620,
"end": 689,
"loc": {
"start": {
"line": 30,
"column": 4
},
"end": {
"line": 32,
"column": 5
}
},
"test": {
"type": "UnaryExpression",
"start": 623,
"end": 634,
"loc": {
"start": {
"line": 30,
"column": 7
},
"end": {
"line": 30,
"column": 18
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "MemberExpression",
"start": 624,
"end": 634,
"loc": {
"start": {
"line": 30,
"column": 8
},
"end": {
"line": 30,
"column": 18
}
},
"object": {
"type": "ThisExpression",
"start": 624,
"end": 628,
"loc": {
"start": {
"line": 30,
"column": 8
},
"end": {
"line": 30,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 629,
"end": 634,
"loc": {
"start": {
"line": 30,
"column": 13
},
"end": {
"line": 30,
"column": 18
}
},
"name": "model"
},
"computed": false
}
},
"consequent": {
"type": "BlockStatement",
"start": 636,
"end": 689,
"loc": {
"start": {
"line": 30,
"column": 20
},
"end": {
"line": 32,
"column": 5
}
},
"body": [
{
"type": "ThrowStatement",
"start": 644,
"end": 683,
"loc": {
"start": {
"line": 31,
"column": 6
},
"end": {
"line": 31,
"column": 45
}
},
"argument": {
"type": "NewExpression",
"start": 650,
"end": 682,
"loc": {
"start": {
"line": 31,
"column": 12
},
"end": {
"line": 31,
"column": 44
}
},
"callee": {
"type": "Identifier",
"start": 654,
"end": 659,
"loc": {
"start": {
"line": 31,
"column": 16
},
"end": {
"line": 31,
"column": 21
}
},
"name": "Error"
},
"arguments": [
{
"type": "Literal",
"start": 660,
"end": 681,
"loc": {
"start": {
"line": 31,
"column": 22
},
"end": {
"line": 31,
"column": 43
}
},
"value": "Missing slide model",
"rawValue": "Missing slide model",
"raw": "\"Missing slide model\""
}
]
}
}
]
},
"alternate": null
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 697,
"end": 937,
"loc": {
"start": {
"line": 35,
"column": 2
},
"end": {
"line": 45,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 697,
"end": 707,
"loc": {
"start": {
"line": 35,
"column": 2
},
"end": {
"line": 35,
"column": 12
}
},
"name": "getElement"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 707,
"end": 937,
"loc": {
"start": {
"line": 35,
"column": 12
},
"end": {
"line": 45,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 709,
"end": 937,
"loc": {
"start": {
"line": 35,
"column": 14
},
"end": {
"line": 45,
"column": 3
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 715,
"end": 798,
"loc": {
"start": {
"line": 36,
"column": 4
},
"end": {
"line": 38,
"column": 7
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 719,
"end": 797,
"loc": {
"start": {
"line": 36,
"column": 8
},
"end": {
"line": 38,
"column": 6
}
},
"id": {
"type": "Identifier",
"start": 719,
"end": 722,
"loc": {
"start": {
"line": 36,
"column": 8
},
"end": {
"line": 36,
"column": 11
}
},
"name": "$el"
},
"init": {