rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,191 lines (1,190 loc) • 65 kB
JSON
{
"type": "Program",
"start": 0,
"end": 517,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 29,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 26
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 12
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 12
}
},
"name": "React"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 18,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 25
}
},
"value": "react",
"rawValue": "react",
"raw": "\"react\""
}
},
{
"type": "ImportDeclaration",
"start": 27,
"end": 57,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 30
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 34,
"end": 38,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 11
}
},
"local": {
"type": "Identifier",
"start": 34,
"end": 38,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 11
}
},
"name": "Item"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 44,
"end": 56,
"loc": {
"start": {
"line": 2,
"column": 17
},
"end": {
"line": 2,
"column": 29
}
},
"value": "./item.jsx",
"rawValue": "./item.jsx",
"raw": "\"./item.jsx\""
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * The side panel view\n ",
"start": 59,
"end": 89,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 6,
"column": 3
}
},
"range": [
59,
89
]
}
]
},
{
"type": "ExportDefaultDeclaration",
"start": 90,
"end": 516,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 28,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 105,
"end": 516,
"loc": {
"start": {
"line": 7,
"column": 15
},
"end": {
"line": 28,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 111,
"end": 120,
"loc": {
"start": {
"line": 7,
"column": 21
},
"end": {
"line": 7,
"column": 30
}
},
"name": "PanelView",
"leadingComments": null
},
"superClass": {
"type": "MemberExpression",
"start": 129,
"end": 144,
"loc": {
"start": {
"line": 7,
"column": 39
},
"end": {
"line": 7,
"column": 54
}
},
"object": {
"type": "Identifier",
"start": 129,
"end": 134,
"loc": {
"start": {
"line": 7,
"column": 39
},
"end": {
"line": 7,
"column": 44
}
},
"name": "React"
},
"property": {
"type": "Identifier",
"start": 135,
"end": 144,
"loc": {
"start": {
"line": 7,
"column": 45
},
"end": {
"line": 7,
"column": 54
}
},
"name": "Component"
},
"computed": false
},
"body": {
"type": "ClassBody",
"start": 145,
"end": 516,
"loc": {
"start": {
"line": 7,
"column": 55
},
"end": {
"line": 28,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 150,
"end": 513,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 26,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 150,
"end": 156,
"loc": {
"start": {
"line": 9,
"column": 2
},
"end": {
"line": 9,
"column": 8
}
},
"name": "render"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 156,
"end": 513,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 26,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 159,
"end": 513,
"loc": {
"start": {
"line": 9,
"column": 11
},
"end": {
"line": 26,
"column": 3
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 165,
"end": 378,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 17,
"column": 7
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 169,
"end": 377,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 17,
"column": 6
}
},
"id": {
"type": "Identifier",
"start": 169,
"end": 174,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 13
}
},
"name": "items"
},
"init": {
"type": "CallExpression",
"start": 177,
"end": 377,
"loc": {
"start": {
"line": 10,
"column": 16
},
"end": {
"line": 17,
"column": 6
}
},
"callee": {
"type": "MemberExpression",
"start": 177,
"end": 201,
"loc": {
"start": {
"line": 10,
"column": 16
},
"end": {
"line": 10,
"column": 40
}
},
"object": {
"type": "MemberExpression",
"start": 177,
"end": 197,
"loc": {
"start": {
"line": 10,
"column": 16
},
"end": {
"line": 10,
"column": 36
}
},
"object": {
"type": "MemberExpression",
"start": 177,
"end": 191,
"loc": {
"start": {
"line": 10,
"column": 16
},
"end": {
"line": 10,
"column": 30
}
},
"object": {
"type": "MemberExpression",
"start": 177,
"end": 187,
"loc": {
"start": {
"line": 10,
"column": 16
},
"end": {
"line": 10,
"column": 26
}
},
"object": {
"type": "ThisExpression",
"start": 177,
"end": 181,
"loc": {
"start": {
"line": 10,
"column": 16
},
"end": {
"line": 10,
"column": 20
}
}
},
"property": {
"type": "Identifier",
"start": 182,
"end": 187,
"loc": {
"start": {
"line": 10,
"column": 21
},
"end": {
"line": 10,
"column": 26
}
},
"name": "props"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 188,
"end": 191,
"loc": {
"start": {
"line": 10,
"column": 27
},
"end": {
"line": 10,
"column": 30
}
},
"name": "set"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 192,
"end": 197,
"loc": {
"start": {
"line": 10,
"column": 31
},
"end": {
"line": 10,
"column": 36
}
},
"name": "items"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 198,
"end": 201,
"loc": {
"start": {
"line": 10,
"column": 37
},
"end": {
"line": 10,
"column": 40
}
},
"name": "map"
},
"computed": false
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 202,
"end": 376,
"loc": {
"start": {
"line": 10,
"column": 41
},
"end": {
"line": 17,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 203,
"end": 207,
"loc": {
"start": {
"line": 10,
"column": 42
},
"end": {
"line": 10,
"column": 46
}
},
"name": "item"
},
{
"type": "Identifier",
"start": 209,
"end": 210,
"loc": {
"start": {
"line": 10,
"column": 48
},
"end": {
"line": 10,
"column": 49
}
},
"name": "i"
}
],
"body": {
"type": "BlockStatement",
"start": 215,
"end": 376,
"loc": {
"start": {
"line": 10,
"column": 54
},
"end": {
"line": 17,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 223,
"end": 234,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 17
}
},
"expression": {
"type": "AssignmentExpression",
"start": 223,
"end": 233,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 16
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 223,
"end": 229,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 12
}
},
"object": {
"type": "Identifier",
"start": 223,
"end": 227,
"loc": {
"start": {
"line": 11,
"column": 6
},
"end": {
"line": 11,
"column": 10
}
},
"name": "item"
},
"property": {
"type": "Identifier",
"start": 228,
"end": 229,
"loc": {
"start": {
"line": 11,
"column": 11
},
"end": {
"line": 11,
"column": 12
}
},
"name": "i"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 232,
"end": 233,
"loc": {
"start": {
"line": 11,
"column": 15
},
"end": {
"line": 11,
"column": 16
}
},
"name": "i"
}
}
},
{
"type": "ExpressionStatement",
"start": 241,
"end": 260,
"loc": {
"start": {
"line": 12,
"column": 6
},
"end": {
"line": 12,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
"start": 241,
"end": 259,
"loc": {
"start": {
"line": 12,
"column": 6
},
"end": {
"line": 12,
"column": 24
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 241,
"end": 251,
"loc": {
"start": {
"line": 12,
"column": 6
},
"end": {
"line": 12,
"column": 16
}
},
"object": {
"type": "Identifier",
"start": 241,
"end": 245,
"loc": {
"start": {
"line": 12,
"column": 6
},
"end": {
"line": 12,
"column": 10
}
},
"name": "item"
},
"property": {
"type": "Identifier",
"start": 246,
"end": 251,
"loc": {
"start": {
"line": 12,
"column": 11
},
"end": {
"line": 12,
"column": 16
}
},
"name": "onMap"
},
"computed": false
},
"right": {
"type": "Literal",
"start": 254,
"end": 259,
"loc": {
"start": {
"line": 12,
"column": 19
},
"end": {
"line": 12,
"column": 24
}
},
"value": false,
"rawValue": false,
"raw": "false"
}
}
},
{
"type": "ExpressionStatement",
"start": 267,
"end": 318,
"loc": {
"start": {
"line": 13,
"column": 6
},
"end": {
"line": 13,
"column": 57
}
},
"expression": {
"type": "AssignmentExpression",
"start": 267,
"end": 317,
"loc": {
"start": {
"line": 13,
"column": 6
},
"end": {
"line": 13,
"column": 56
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 267,
"end": 283,
"loc": {
"start": {
"line": 13,
"column": 6
},
"end": {
"line": 13,
"column": 22
}
},
"object": {
"type": "Identifier",
"start": 267,
"end": 271,
"loc": {
"start": {
"line": 13,
"column": 6
},
"end": {
"line": 13,
"column": 10
}
},
"name": "item"
},
"property": {
"type": "Identifier",
"start": 272,
"end": 283,
"loc": {
"start": {
"line": 13,
"column": 11
},
"end": {
"line": 13,
"column": 22
}
},
"name": "highlighted"
},
"computed": false
},
"right": {
"type": "BinaryExpression",
"start": 286,
"end": 317,
"loc": {
"start": {
"line": 13,
"column": 25
},
"end": {
"line": 13,
"column": 56
}
},
"left": {
"type": "Identifier",
"start": 286,
"end": 287,
"loc": {
"start": {
"line": 13,
"column": 25
},
"end": {
"line": 13,
"column": 26
}
},
"name": "i"
},
"operator": "===",
"right": {
"type": "MemberExpression",
"start": 292,
"end": 317,
"loc": {
"start": {
"line": 13,
"column": 31
},
"end": {
"line": 13,
"column": 56
}
},
"object": {
"type": "MemberExpression",
"start": 292,
"end": 302,
"loc": {
"start": {
"line": 13,
"column": 31
},
"end": {
"line": 13,
"column": 41
}
},
"object": {
"type": "ThisExpression",
"start": 292,
"end": 296,
"loc": {
"start": {
"line": 13,
"column": 31
},
"end": {
"line": 13,
"column": 35
}
}
},
"property": {
"type": "Identifier",
"start": 297,
"end": 302,
"loc": {
"start": {
"line": 13,
"column": 36
},
"end": {
"line": 13,
"column": 41
}
},
"name": "props"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 303,
"end": 317,
"loc": {
"start": {
"line": 13,
"column": 42
},
"end": {
"line": 13,
"column": 56
}
},
"name": "highlightedPoi"
},
"computed": false
}
}
}
},
{
"type": "ReturnStatement",
"start": 325,
"end": 370,
"loc": {
"start": {
"line": 14,
"column": 6
},
"end": {
"line": 16,
"column": 8
}
},
"argument": {
"type": "JSXElement",
"start": 342,
"end": 361,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 27
}
},
"openingElement": {
"type": "JSXOpeningElement",
"start": 342,
"end": 361,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 27
}
},
"attributes": [
{
"type": "JSXAttribute",
"start": 348,
"end": 359,
"loc": {
"start": {
"line": 15,
"column": 14
},
"end": {
"line": 15,
"column": 25
}
},
"name": {
"type": "JSXIdentifier",
"start": 348,
"end": 352,
"loc": {
"start": {
"line": 15,
"column": 14
},
"end": {
"line": 15,
"column": 18
}
},
"name": "item"
},
"value": {
"type": "JSXExpressionContainer",
"start": 353,
"end": 359,
"loc": {
"start": {
"line": 15,
"column": 19
},
"end": {
"line": 15,
"column": 25
}
},
"expression": {
"type": "Identifier",
"start": 354,
"end": 358,
"loc": {
"start": {
"line": 15,
"column": 20
},
"end": {
"line": 15,
"column": 24
}
},
"name": "item"
}
}
}
],
"name": {
"type": "JSXIdentifier",
"start": 343,
"end": 347,
"loc": {
"start": {
"line": 15,
"column": 9
},
"end": {
"line": 15,
"column": 13
}
},
"name": "Item"
},
"selfClosing": true
},
"closingElement": null,
"children": [],
"parenthesizedExpression": true
}
}
]
}
}
]
}
}
],
"kind": "let"
},
{
"type": "ReturnStatement",
"start": 384,
"end": 509,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 25,
"column": 6
}
},
"argument": {
"type": "JSXElement",
"start": 399,
"end": 502,
"loc": {
"start": {
"line": 20,
"column": 6
},
"end": {
"line": 24,
"column": 12
}
},
"openingElement": {
"type": "JSXOpeningElement",
"start": 399,
"end": 422,
"loc": {
"start": {
"line": 20,
"column": 6
},
"end": {
"line": 20,
"column": 29
}
},
"attributes": [
{
"type": "JSXAttribute",
"start": 404,
"end": 421,
"loc": {
"start": {
"line": 20,
"column": 11
},
"end": {