rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,641 lines (1,640 loc) • 150 kB
JSON
{
"type": "Program",
"start": 0,
"end": 853,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 47,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 47,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 47
}
},
"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": 46,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 46
}
},
"value": "../../../core/bane",
"rawValue": "../../../core/bane",
"raw": "\"../../../core/bane\""
}
},
{
"type": "ImportDeclaration",
"start": 48,
"end": 90,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 42
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 55,
"end": 70,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 22
}
},
"local": {
"type": "Identifier",
"start": 55,
"end": 70,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 22
}
},
"name": "MapboxMarkerSet"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 76,
"end": 89,
"loc": {
"start": {
"line": 2,
"column": 28
},
"end": {
"line": 2,
"column": 41
}
},
"value": "./markerset",
"rawValue": "./markerset",
"raw": "\"./markerset\""
}
},
{
"type": "ImportDeclaration",
"start": 91,
"end": 110,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 19
}
},
"specifiers": [],
"source": {
"type": "Literal",
"start": 98,
"end": 109,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 18
}
},
"value": "mapbox.js",
"rawValue": "mapbox.js",
"raw": "\"mapbox.js\""
}
},
{
"type": "VariableDeclaration",
"start": 112,
"end": 129,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 17
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 116,
"end": 128,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 16
}
},
"id": {
"type": "Identifier",
"start": 116,
"end": 117,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 5
}
},
"name": "L"
},
"init": {
"type": "MemberExpression",
"start": 120,
"end": 128,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 16
}
},
"object": {
"type": "Identifier",
"start": 120,
"end": 126,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 14
}
},
"name": "window"
},
"property": {
"type": "Identifier",
"start": 127,
"end": 128,
"loc": {
"start": {
"line": 5,
"column": 15
},
"end": {
"line": 5,
"column": 16
}
},
"name": "L"
},
"computed": false
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 130,
"end": 166,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 36
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 134,
"end": 165,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 35
}
},
"id": {
"type": "Identifier",
"start": 134,
"end": 139,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 9
}
},
"name": "mapID"
},
"init": {
"type": "Literal",
"start": 142,
"end": 165,
"loc": {
"start": {
"line": 6,
"column": 12
},
"end": {
"line": 6,
"column": 35
}
},
"value": "lonelyplanet.04cf7895",
"rawValue": "lonelyplanet.04cf7895",
"raw": "\"lonelyplanet.04cf7895\""
}
}
],
"kind": "let"
},
{
"type": "ExpressionStatement",
"start": 168,
"end": 266,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 98
}
},
"expression": {
"type": "AssignmentExpression",
"start": 168,
"end": 265,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 97
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 168,
"end": 188,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 20
}
},
"object": {
"type": "MemberExpression",
"start": 168,
"end": 176,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 8
}
},
"object": {
"type": "Identifier",
"start": 168,
"end": 169,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 1
}
},
"name": "L"
},
"property": {
"type": "Identifier",
"start": 170,
"end": 176,
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 8,
"column": 8
}
},
"name": "mapbox"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 177,
"end": 188,
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 8,
"column": 20
}
},
"name": "accessToken"
},
"computed": false
},
"right": {
"type": "Literal",
"start": 191,
"end": 265,
"loc": {
"start": {
"line": 8,
"column": 23
},
"end": {
"line": 8,
"column": 97
}
},
"value": "pk.eyJ1IjoibG9uZWx5cGxhbmV0IiwiYSI6Imh1ODUtdUEifQ.OLLon0V6rcoTyayXzzUzsg",
"rawValue": "pk.eyJ1IjoibG9uZWx5cGxhbmV0IiwiYSI6Imh1ODUtdUEifQ.OLLon0V6rcoTyayXzzUzsg",
"raw": "\"pk.eyJ1IjoibG9uZWx5cGxhbmV0IiwiYSI6Imh1ODUtdUEifQ.OLLon0V6rcoTyayXzzUzsg\""
}
}
},
{
"type": "Identifier",
"start": 268,
"end": 823,
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 44,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 274,
"end": 285,
"loc": {
"start": {
"line": 10,
"column": 6
},
"end": {
"line": 10,
"column": 17
}
},
"name": "MapProvider"
},
"superClass": {
"type": "Identifier",
"start": 294,
"end": 303,
"loc": {
"start": {
"line": 10,
"column": 26
},
"end": {
"line": 10,
"column": 35
}
},
"name": "Component"
},
"body": {
"type": "ClassBody",
"start": 304,
"end": 823,
"loc": {
"start": {
"line": 10,
"column": 36
},
"end": {
"line": 44,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 308,
"end": 368,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 13,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 308,
"end": 318,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 11,
"column": 12
}
},
"name": "initialize"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 318,
"end": 368,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 13,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 321,
"end": 368,
"loc": {
"start": {
"line": 11,
"column": 15
},
"end": {
"line": 13,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 327,
"end": 364,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 41
}
},
"expression": {
"type": "AssignmentExpression",
"start": 327,
"end": 363,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 40
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 327,
"end": 337,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 14
}
},
"object": {
"type": "ThisExpression",
"start": 327,
"end": 331,
"loc": {
"start": {
"line": 12,
"column": 4
},
"end": {
"line": 12,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 332,
"end": 337,
"loc": {
"start": {
"line": 12,
"column": 9
},
"end": {
"line": 12,
"column": 14
}
},
"name": "layer"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 340,
"end": 363,
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 12,
"column": 40
}
},
"callee": {
"type": "MemberExpression",
"start": 340,
"end": 361,
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 12,
"column": 38
}
},
"object": {
"type": "MemberExpression",
"start": 340,
"end": 348,
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 12,
"column": 25
}
},
"object": {
"type": "Identifier",
"start": 340,
"end": 341,
"loc": {
"start": {
"line": 12,
"column": 17
},
"end": {
"line": 12,
"column": 18
}
},
"name": "L"
},
"property": {
"type": "Identifier",
"start": 342,
"end": 348,
"loc": {
"start": {
"line": 12,
"column": 19
},
"end": {
"line": 12,
"column": 25
}
},
"name": "mapbox"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 349,
"end": 361,
"loc": {
"start": {
"line": 12,
"column": 26
},
"end": {
"line": 12,
"column": 38
}
},
"name": "featureLayer"
},
"computed": false
},
"arguments": []
}
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 372,
"end": 524,
"loc": {
"start": {
"line": 15,
"column": 2
},
"end": {
"line": 21,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 372,
"end": 378,
"loc": {
"start": {
"line": 15,
"column": 2
},
"end": {
"line": 15,
"column": 8
}
},
"name": "launch"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 378,
"end": 524,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 21,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 381,
"end": 524,
"loc": {
"start": {
"line": 15,
"column": 11
},
"end": {
"line": 21,
"column": 3
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 387,
"end": 462,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 19,
"column": 6
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 391,
"end": 461,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 19,
"column": 5
}
},
"id": {
"type": "Identifier",
"start": 391,
"end": 398,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 15
}
},
"name": "options"
},
"init": {
"type": "ObjectExpression",
"start": 401,
"end": 461,
"loc": {
"start": {
"line": 16,
"column": 18
},
"end": {
"line": 19,
"column": 5
}
},
"properties": [
{
"type": "Property",
"start": 409,
"end": 426,
"loc": {
"start": {
"line": 17,
"column": 6
},
"end": {
"line": 17,
"column": 23
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 409,
"end": 420,
"loc": {
"start": {
"line": 17,
"column": 6
},
"end": {
"line": 17,
"column": 17
}
},
"name": "zoomControl"
},
"value": {
"type": "Literal",
"start": 422,
"end": 426,
"loc": {
"start": {
"line": 17,
"column": 19
},
"end": {
"line": 17,
"column": 23
}
},
"value": true,
"rawValue": true,
"raw": "true"
},
"kind": "init"
},
{
"type": "Property",
"start": 434,
"end": 455,
"loc": {
"start": {
"line": 18,
"column": 6
},
"end": {
"line": 18,
"column": 27
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 434,
"end": 449,
"loc": {
"start": {
"line": 18,
"column": 6
},
"end": {
"line": 18,
"column": 21
}
},
"name": "scrollWheelZoom"
},
"value": {
"type": "Literal",
"start": 451,
"end": 455,
"loc": {
"start": {
"line": 18,
"column": 23
},
"end": {
"line": 18,
"column": 27
}
},
"value": true,
"rawValue": true,
"raw": "true"
},
"kind": "init"
}
]
}
}
],
"kind": "let"
},
{
"type": "ExpressionStatement",
"start": 467,
"end": 520,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 57
}
},
"expression": {
"type": "AssignmentExpression",
"start": 467,
"end": 519,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 56
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 467,
"end": 475,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 12
}
},
"object": {
"type": "ThisExpression",
"start": 467,
"end": 471,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 472,
"end": 475,
"loc": {
"start": {
"line": 20,
"column": 9
},
"end": {
"line": 20,
"column": 12
}
},
"name": "map"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 478,
"end": 519,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 56
}
},
"callee": {
"type": "MemberExpression",
"start": 478,
"end": 490,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 27
}
},
"object": {
"type": "MemberExpression",
"start": 478,
"end": 486,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 23
}
},
"object": {
"type": "Identifier",
"start": 478,
"end": 479,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 16
}
},
"name": "L"
},
"property": {
"type": "Identifier",
"start": 480,
"end": 486,
"loc": {
"start": {
"line": 20,
"column": 17
},
"end": {
"line": 20,
"column": 23
}
},
"name": "mapbox"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 487,
"end": 490,
"loc": {
"start": {
"line": 20,
"column": 24
},
"end": {
"line": 20,
"column": 27
}
},
"name": "map"
},
"computed": false
},
"arguments": [
{
"type": "MemberExpression",
"start": 491,
"end": 502,
"loc": {
"start": {
"line": 20,
"column": 28
},
"end": {
"line": 20,
"column": 39
}
},
"object": {
"type": "MemberExpression",
"start": 491,
"end": 499,
"loc": {
"start": {
"line": 20,
"column": 28
},
"end": {
"line": 20,
"column": 36
}
},
"object": {
"type": "ThisExpression",
"start": 491,
"end": 495,
"loc": {
"start": {
"line": 20,
"column": 28
},
"end": {
"line": 20,
"column": 32
}
}
},
"property": {
"type": "Identifier",
"start": 496,
"end": 499,
"loc": {
"start": {
"line": 20,
"column": 33
},
"end": {
"line": 20,
"column": 36
}
},
"name": "$el"
},
"computed": false
},
"property": {
"type": "Literal",
"start": 500,
"end": 501,
"loc": {
"start": {
"line": 20,
"column": 37
},
"end": {
"line": 20,
"column": 38
}
},
"value": 0,
"rawValue": 0,
"raw": "0"
},
"computed": true
},
{
"type": "Identifier",
"start": 504,
"end": 509,
"loc": {
"start": {
"line": 20,
"column": 41
},
"end": {
"line": 20,
"column": 46
}
},
"name": "mapID"
},
{
"type": "Identifier",
"start": 511,
"end": 518,
"loc": {
"start": {
"line": 20,
"column": 48
},
"end": {
"line": 20,
"column": 55
}
},
"name": "options"
}
]
}
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 528,
"end": 563,
"loc": {
"start": {
"line": 23,
"column": 2
},
"end": {
"line": 25,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 528,
"end": 532,
"loc": {
"start": {
"line": 23,
"column": 2
},
"end": {
"line": 23,
"column": 6
}
},
"name": "kill"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 532,
"end": 563,
"loc": {
"start": {
"line": 23,
"column": 6
},
"end": {
"line": 25,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 535,
"end": 563,
"loc": {
"start": {
"line": 23,
"column": 9
},
"end": {
"line": 25,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 541,
"end": 559,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 22
}
},
"expression": {
"type": "CallExpression",
"start": 541,
"end": 558,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 21
}
},
"callee": {
"type": "MemberExpression",
"start": 541,
"end": 556,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 19
}
},
"object": {
"type": "MemberExpression",
"start": 541,
"end": 549,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 12
}
},
"object": {
"type": "ThisExpression",
"start": 541,
"end": 545,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 546,
"end": 549,
"loc": {
"start": {
"line": 24,
"column": 9
},
"end": {
"line": 24,
"column": 12
}
},
"name": "map"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 550,
"end": 556,
"loc": {
"start": {
"line": 24,
"column": 13
},
"end": {
"line": 24,
"column": 19
}
},
"name": "remove"
},
"computed": false
},
"arguments": []
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 567,
"end": 720,
"loc": {
"start": {
"line": 27,
"column": 2
},
"end": {
"line": 34,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 567,
"end": 577,
"loc": {
"start": {
"line": 27,
"column": 2
},
"end": {
"line": 27,
"column": 12
}
},
"name": "addMarkers"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 577,
"end": 720,
"loc": {
"start": {
"line": 27,
"column": 12
},
"end": {
"line": 34,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 578,
"end": 582,
"loc": {
"start": {
"line": 27,
"column": 13
},
"end": {
"line": 27,
"column": 17
}
},
"name": "pois"
}
],
"body": {
"type": "BlockStatement",
"start": 584,
"end": 720,
"loc": {
"start": {
"line": 27,
"column": 19
},
"end": {
"line": 34,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 590,
"end": 716,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 33,
"column": 7
}
},
"expression": {
"type": "AssignmentExpression",
"start": 590,
"end": 715,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 33,
"column": 6
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 590,
"end": 602,
"loc": {
"start": {
"line": 28,
"column": 4
},
"end": {
"line": 28,
"column": 16
}
},
"object": {
"type": "ThisExpression",