rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,524 lines (1,523 loc) • 218 kB
JSON
{
"type": "Program",
"start": 0,
"end": 980,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 47,
"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": 950,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 44,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 120,
"end": 131,
"loc": {
"start": {
"line": 4,
"column": 6
},
"end": {
"line": 4,
"column": 17
}
},
"name": "VideoPlayer"
},
"superClass": {
"type": "Identifier",
"start": 140,
"end": 149,
"loc": {
"start": {
"line": 4,
"column": 26
},
"end": {
"line": 4,
"column": 35
}
},
"name": "Component"
},
"body": {
"type": "ClassBody",
"start": 150,
"end": 950,
"loc": {
"start": {
"line": 4,
"column": 36
},
"end": {
"line": 44,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 154,
"end": 448,
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 19,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 154,
"end": 164,
"loc": {
"start": {
"line": 5,
"column": 2
},
"end": {
"line": 5,
"column": 12
}
},
"name": "initialize"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 164,
"end": 448,
"loc": {
"start": {
"line": 5,
"column": 12
},
"end": {
"line": 19,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "ObjectPattern",
"start": 165,
"end": 177,
"loc": {
"start": {
"line": 5,
"column": 13
},
"end": {
"line": 5,
"column": 25
}
},
"properties": [
{
"type": "Property",
"start": 167,
"end": 175,
"loc": {
"start": {
"line": 5,
"column": 15
},
"end": {
"line": 5,
"column": 23
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 167,
"end": 175,
"loc": {
"start": {
"line": 5,
"column": 15
},
"end": {
"line": 5,
"column": 23
}
},
"name": "playerId"
},
"kind": "init",
"value": {
"type": "Identifier",
"start": 167,
"end": 175,
"loc": {
"start": {
"line": 5,
"column": 15
},
"end": {
"line": 5,
"column": 23
}
},
"name": "playerId"
}
}
]
}
],
"body": {
"type": "BlockStatement",
"start": 179,
"end": 448,
"loc": {
"start": {
"line": 5,
"column": 27
},
"end": {
"line": 19,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 185,
"end": 210,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 29
}
},
"expression": {
"type": "AssignmentExpression",
"start": 185,
"end": 209,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 28
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 185,
"end": 198,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 185,
"end": 189,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 190,
"end": 198,
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 17
}
},
"name": "playerId"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 201,
"end": 209,
"loc": {
"start": {
"line": 6,
"column": 20
},
"end": {
"line": 6,
"column": 28
}
},
"name": "playerId"
}
}
},
{
"type": "ExpressionStatement",
"start": 215,
"end": 229,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 18
}
},
"expression": {
"type": "CallExpression",
"start": 215,
"end": 228,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 17
}
},
"callee": {
"type": "MemberExpression",
"start": 215,
"end": 226,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 215,
"end": 219,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 220,
"end": 226,
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 15
}
},
"name": "render"
},
"computed": false
},
"arguments": []
}
},
{
"type": "ExpressionStatement",
"start": 234,
"end": 252,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 22
}
},
"expression": {
"type": "CallExpression",
"start": 234,
"end": 251,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 21
}
},
"callee": {
"type": "MemberExpression",
"start": 234,
"end": 249,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 234,
"end": 238,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 239,
"end": 249,
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 8,
"column": 19
}
},
"name": "loadPlayer"
},
"computed": false
},
"arguments": []
}
},
{
"type": "ExpressionStatement",
"start": 258,
"end": 303,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 12,
"column": 6
}
},
"expression": {
"type": "AssignmentExpression",
"start": 258,
"end": 302,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 12,
"column": 5
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 258,
"end": 269,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 258,
"end": 262,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 263,
"end": 269,
"loc": {
"start": {
"line": 10,
"column": 9
},
"end": {
"line": 10,
"column": 15
}
},
"name": "events"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 272,
"end": 302,
"loc": {
"start": {
"line": 10,
"column": 18
},
"end": {
"line": 12,
"column": 5
}
},
"properties": [
{
"type": "Property",
"start": 280,
"end": 296,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 22
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Literal",
"start": 280,
"end": 287,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 13
}
},
"value": "click",
"rawValue": "click",
"raw": "\"click\""
},
"value": {
"type": "Literal",
"start": 289,
"end": 296,
"loc": {
"start": {
"line": 11,
"column": 15
},
"end": {
"line": 11,
"column": 22
}
},
"value": "pause",
"rawValue": "pause",
"raw": "\"pause\""
},
"kind": "init"
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 309,
"end": 377,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 16,
"column": 26
}
},
"expression": {
"type": "CallExpression",
"start": 309,
"end": 376,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 16,
"column": 25
}
},
"callee": {
"type": "MemberExpression",
"start": 309,
"end": 361,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 16,
"column": 10
}
},
"object": {
"type": "CallExpression",
"start": 309,
"end": 350,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 15,
"column": 32
}
},
"callee": {
"type": "MemberExpression",
"start": 309,
"end": 333,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 15,
"column": 15
}
},
"object": {
"type": "MemberExpression",
"start": 309,
"end": 317,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 12
}
},
"object": {
"type": "ThisExpression",
"start": 309,
"end": 313,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 314,
"end": 317,
"loc": {
"start": {
"line": 14,
"column": 9
},
"end": {
"line": 14,
"column": 12
}
},
"name": "$el"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 325,
"end": 333,
"loc": {
"start": {
"line": 15,
"column": 7
},
"end": {
"line": 15,
"column": 15
}
},
"name": "addClass"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 334,
"end": 349,
"loc": {
"start": {
"line": 15,
"column": 16
},
"end": {
"line": 15,
"column": 31
}
},
"value": "video-overlay",
"rawValue": "video-overlay",
"raw": "\"video-overlay\""
}
]
},
"property": {
"type": "Identifier",
"start": 358,
"end": 361,
"loc": {
"start": {
"line": 16,
"column": 7
},
"end": {
"line": 16,
"column": 10
}
},
"name": "css"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 362,
"end": 370,
"loc": {
"start": {
"line": 16,
"column": 11
},
"end": {
"line": 16,
"column": 19
}
},
"value": "zIndex",
"rawValue": "zIndex",
"raw": "\"zIndex\""
},
{
"type": "UnaryExpression",
"start": 372,
"end": 375,
"loc": {
"start": {
"line": 16,
"column": 21
},
"end": {
"line": 16,
"column": 24
}
},
"operator": "-",
"prefix": true,
"argument": {
"type": "Literal",
"start": 373,
"end": 375,
"loc": {
"start": {
"line": 16,
"column": 22
},
"end": {
"line": 16,
"column": 24
}
},
"value": 20,
"rawValue": 20,
"raw": "20"
}
}
]
}
},
{
"type": "ExpressionStatement",
"start": 383,
"end": 444,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 65
}
},
"expression": {
"type": "AssignmentExpression",
"start": 383,
"end": 443,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 64
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 383,
"end": 394,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 383,
"end": 387,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 388,
"end": 394,
"loc": {
"start": {
"line": 18,
"column": 9
},
"end": {
"line": 18,
"column": 15
}
},
"name": "$close"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 397,
"end": 443,
"loc": {
"start": {
"line": 18,
"column": 18
},
"end": {
"line": 18,
"column": 64
}
},
"callee": {
"type": "MemberExpression",
"start": 397,
"end": 410,
"loc": {
"start": {
"line": 18,
"column": 18
},
"end": {
"line": 18,
"column": 31
}
},
"object": {
"type": "MemberExpression",
"start": 397,
"end": 405,
"loc": {
"start": {
"line": 18,
"column": 18
},
"end": {
"line": 18,
"column": 26
}
},
"object": {
"type": "ThisExpression",
"start": 397,
"end": 401,
"loc": {
"start": {
"line": 18,
"column": 18
},
"end": {
"line": 18,
"column": 22
}
}
},
"property": {
"type": "Identifier",
"start": 402,
"end": 405,
"loc": {
"start": {
"line": 18,
"column": 23
},
"end": {
"line": 18,
"column": 26
}
},
"name": "$el"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 406,
"end": 410,
"loc": {
"start": {
"line": 18,
"column": 27
},
"end": {
"line": 18,
"column": 31
}
},
"name": "find"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 411,
"end": 442,
"loc": {
"start": {
"line": 18,
"column": 32
},
"end": {
"line": 18,
"column": 63
}
},
"value": ".video-overlay__close__button",
"rawValue": ".video-overlay__close__button",
"raw": "\".video-overlay__close__button\""
}
]
}
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 451,
"end": 486,
"loc": {
"start": {
"line": 20,
"column": 2
},
"end": {
"line": 22,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 451,
"end": 456,
"loc": {
"start": {
"line": 20,
"column": 2
},
"end": {
"line": 20,
"column": 7
}
},
"name": "setup"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 456,
"end": 486,
"loc": {
"start": {
"line": 20,
"column": 7
},
"end": {
"line": 22,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 459,
"end": 486,
"loc": {
"start": {
"line": 20,
"column": 10
},
"end": {
"line": 22,
"column": 3
}
},
"body": [],
"leadingComments": [
{
"type": "CommentLine",
"value": " Overwrite this",
"start": 465,
"end": 482,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 21
}
},
"range": [
465,
482
]
}
],
"innerComments": [
{
"type": "CommentLine",
"value": " Overwrite this",
"start": 465,
"end": 482,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 21
}
},
"range": [
465,
482
]
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 489,
"end": 584,
"loc": {
"start": {
"line": 23,
"column": 2
},
"end": {
"line": 26,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 489,
"end": 493,
"loc": {
"start": {
"line": 23,
"column": 2
},
"end": {
"line": 23,
"column": 6
}
},
"name": "play",
"leadingComments": null
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 493,
"end": 584,
"loc": {
"start": {
"line": 23,
"column": 6
},
"end": {
"line": 26,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 496,
"end": 584,
"loc": {
"start": {
"line": 23,
"column": 9
},
"end": {
"line": 26,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 502,
"end": 531,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 33
}
},
"expression": {
"type": "CallExpression",
"start": 502,
"end": 530,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 32
}
},
"callee": {
"type": "MemberExpression",
"start": 502,
"end": 514,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 16
}
},
"object": {
"type": "MemberExpression",
"start": 502,
"end": 510,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 12
}
},
"object": {
"type": "ThisExpression",
"start": 502,
"end": 506,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 507,
"end": 510,
"loc": {
"start": {
"line": 24,
"column": 9
},
"end": {
"line": 24,
"column": 12
}
},
"name": "$el"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 511,
"end": 514,
"loc": {
"start": {
"line": 24,
"column": 13
},
"end": {
"line": 24,
"column": 16
}
},
"name": "css"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 515,
"end": 523,
"loc": {
"start": {
"line": 24,
"column": 17
},
"end": {
"line": 24,
"column": 25
}
},
"value": "zIndex",
"rawValue": "zIndex",
"raw": "\"zIndex\""
},
{
"type": "Literal",
"start": 525,
"end": 529,
"loc": {
"start": {
"line": 24,
"column": 27
},
"end": {
"line": 24,
"column": 31
}
},
"value": 9999,
"rawValue": 9999,
"raw": "9999"
}
]
}
},
{
"type": "ExpressionStatement",
"start": 536,
"end": 580,