rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,534 lines (1,533 loc) • 118 kB
JSON
{
"type": "Program",
"start": 0,
"end": 909,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 48,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "VariableDeclaration",
"start": 28,
"end": 103,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 75
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 32,
"end": 102,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 74
}
},
"id": {
"type": "Identifier",
"start": 32,
"end": 40,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 12
}
},
"name": "Injector",
"leadingComments": null
},
"init": {
"type": "CallExpression",
"start": 43,
"end": 102,
"loc": {
"start": {
"line": 2,
"column": 15
},
"end": {
"line": 2,
"column": 74
}
},
"callee": {
"type": "Identifier",
"start": 43,
"end": 50,
"loc": {
"start": {
"line": 2,
"column": 15
},
"end": {
"line": 2,
"column": 22
}
},
"name": "require"
},
"arguments": [
{
"type": "Literal",
"start": 51,
"end": 101,
"loc": {
"start": {
"line": 2,
"column": 23
},
"end": {
"line": 2,
"column": 73
}
},
"value": "inject!../../../src/components/map/map_component",
"rawValue": "inject!../../../src/components/map/map_component",
"raw": "\"inject!../../../src/components/map/map_component\""
}
]
},
"leadingComments": null
}
],
"kind": "let",
"leadingComments": [
{
"type": "CommentLine",
"value": " This is gonna be a doozy",
"start": 0,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 27
}
},
"range": [
0,
27
]
}
]
},
{
"type": "VariableDeclaration",
"start": 105,
"end": 134,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 29
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 109,
"end": 133,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 28
}
},
"id": {
"type": "Identifier",
"start": 109,
"end": 118,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 13
}
},
"name": "pushState"
},
"init": {
"type": "CallExpression",
"start": 121,
"end": 133,
"loc": {
"start": {
"line": 4,
"column": 16
},
"end": {
"line": 4,
"column": 28
}
},
"callee": {
"type": "MemberExpression",
"start": 121,
"end": 131,
"loc": {
"start": {
"line": 4,
"column": 16
},
"end": {
"line": 4,
"column": 26
}
},
"object": {
"type": "Identifier",
"start": 121,
"end": 126,
"loc": {
"start": {
"line": 4,
"column": 16
},
"end": {
"line": 4,
"column": 21
}
},
"name": "sinon"
},
"property": {
"type": "Identifier",
"start": 127,
"end": 131,
"loc": {
"start": {
"line": 4,
"column": 22
},
"end": {
"line": 4,
"column": 26
}
},
"name": "stub"
},
"computed": false
},
"arguments": []
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 136,
"end": 393,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 19,
"column": 3
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 140,
"end": 392,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 19,
"column": 2
}
},
"id": {
"type": "Identifier",
"start": 140,
"end": 152,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 16
}
},
"name": "MapComponent"
},
"init": {
"type": "CallExpression",
"start": 155,
"end": 392,
"loc": {
"start": {
"line": 6,
"column": 19
},
"end": {
"line": 19,
"column": 2
}
},
"callee": {
"type": "Identifier",
"start": 155,
"end": 163,
"loc": {
"start": {
"line": 6,
"column": 19
},
"end": {
"line": 6,
"column": 27
}
},
"name": "Injector"
},
"arguments": [
{
"type": "ObjectExpression",
"start": 164,
"end": 391,
"loc": {
"start": {
"line": 6,
"column": 28
},
"end": {
"line": 19,
"column": 1
}
},
"properties": [
{
"type": "Property",
"start": 168,
"end": 242,
"loc": {
"start": {
"line": 7,
"column": 2
},
"end": {
"line": 10,
"column": 3
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Literal",
"start": 168,
"end": 175,
"loc": {
"start": {
"line": 7,
"column": 2
},
"end": {
"line": 7,
"column": 9
}
},
"value": "react",
"rawValue": "react",
"raw": "\"react\""
},
"value": {
"type": "ObjectExpression",
"start": 177,
"end": 242,
"loc": {
"start": {
"line": 7,
"column": 11
},
"end": {
"line": 10,
"column": 3
}
},
"properties": [
{
"type": "Property",
"start": 183,
"end": 204,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 25
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 183,
"end": 189,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 10
}
},
"name": "render"
},
"value": {
"type": "FunctionExpression",
"start": 191,
"end": 204,
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 8,
"column": 25
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 202,
"end": 204,
"loc": {
"start": {
"line": 8,
"column": 23
},
"end": {
"line": 8,
"column": 25
}
},
"body": []
}
},
"kind": "init"
},
{
"type": "Property",
"start": 210,
"end": 238,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 32
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 210,
"end": 223,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 17
}
},
"name": "createElement"
},
"value": {
"type": "FunctionExpression",
"start": 225,
"end": 238,
"loc": {
"start": {
"line": 9,
"column": 19
},
"end": {
"line": 9,
"column": 32
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 236,
"end": 238,
"loc": {
"start": {
"line": 9,
"column": 30
},
"end": {
"line": 9,
"column": 32
}
},
"body": []
}
},
"kind": "init"
}
]
},
"kind": "init"
},
{
"type": "Property",
"start": 246,
"end": 279,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 11,
"column": 35
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Literal",
"start": 246,
"end": 264,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 11,
"column": 20
}
},
"value": "./views/main.jsx",
"rawValue": "./views/main.jsx",
"raw": "\"./views/main.jsx\""
},
"value": {
"type": "FunctionExpression",
"start": 266,
"end": 279,
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 35
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 277,
"end": 279,
"loc": {
"start": {
"line": 11,
"column": 33
},
"end": {
"line": 11,
"column": 35
}
},
"body": []
}
},
"kind": "init"
},
{
"type": "Property",
"start": 283,
"end": 389,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 18,
"column": 3
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Literal",
"start": 283,
"end": 292,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 12,
"column": 11
}
},
"value": "history",
"rawValue": "history",
"raw": "\"history\""
},
"value": {
"type": "ObjectExpression",
"start": 294,
"end": 389,
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 18,
"column": 3
}
},
"properties": [
{
"type": "Property",
"start": 300,
"end": 385,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 17,
"column": 5
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 300,
"end": 313,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 17
}
},
"name": "createHistory"
},
"value": {
"type": "FunctionExpression",
"start": 315,
"end": 385,
"loc": {
"start": {
"line": 13,
"column": 19
},
"end": {
"line": 17,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 326,
"end": 385,
"loc": {
"start": {
"line": 13,
"column": 30
},
"end": {
"line": 17,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 334,
"end": 379,
"loc": {
"start": {
"line": 14,
"column": 6
},
"end": {
"line": 16,
"column": 7
}
},
"argument": {
"type": "ObjectExpression",
"start": 341,
"end": 379,
"loc": {
"start": {
"line": 14,
"column": 13
},
"end": {
"line": 16,
"column": 7
}
},
"properties": [
{
"type": "Property",
"start": 351,
"end": 371,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 28
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 351,
"end": 360,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 17
}
},
"name": "pushState"
},
"value": {
"type": "Identifier",
"start": 362,
"end": 371,
"loc": {
"start": {
"line": 15,
"column": 19
},
"end": {
"line": 15,
"column": 28
}
},
"name": "pushState"
},
"kind": "init"
}
]
}
}
]
}
},
"kind": "init"
}
]
},
"kind": "init"
}
]
}
]
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 395,
"end": 421,
"loc": {
"start": {
"line": 21,
"column": 0
},
"end": {
"line": 21,
"column": 26
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 399,
"end": 420,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 25
}
},
"id": {
"type": "Identifier",
"start": 399,
"end": 400,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 5
}
},
"name": "$"
},
"init": {
"type": "CallExpression",
"start": 403,
"end": 420,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 25
}
},
"callee": {
"type": "Identifier",
"start": 403,
"end": 410,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 15
}
},
"name": "require"
},
"arguments": [
{
"type": "Literal",
"start": 411,
"end": 419,
"loc": {
"start": {
"line": 21,
"column": 16
},
"end": {
"line": 21,
"column": 24
}
},
"value": "jquery",
"rawValue": "jquery",
"raw": "\"jquery\""
}
]
}
}
],
"kind": "let"
},
{
"type": "ExpressionStatement",
"start": 423,
"end": 471,
"loc": {
"start": {
"line": 23,
"column": 0
},
"end": {
"line": 27,
"column": 2
}
},
"expression": {
"type": "AssignmentExpression",
"start": 423,
"end": 470,
"loc": {
"start": {
"line": 23,
"column": 0
},
"end": {
"line": 27,
"column": 1
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 423,
"end": 432,
"loc": {
"start": {
"line": 23,
"column": 0
},
"end": {
"line": 23,
"column": 9
}
},
"object": {
"type": "Identifier",
"start": 423,
"end": 429,
"loc": {
"start": {
"line": 23,
"column": 0
},
"end": {
"line": 23,
"column": 6
}
},
"name": "window"
},
"property": {
"type": "Identifier",
"start": 430,
"end": 432,
"loc": {
"start": {
"line": 23,
"column": 7
},
"end": {
"line": 23,
"column": 9
}
},
"name": "lp"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 435,
"end": 470,
"loc": {
"start": {
"line": 23,
"column": 12
},
"end": {
"line": 27,
"column": 1
}
},
"properties": [
{
"type": "Property",
"start": 439,
"end": 468,
"loc": {
"start": {
"line": 24,
"column": 2
},
"end": {
"line": 26,
"column": 3
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 439,
"end": 444,
"loc": {
"start": {
"line": 24,
"column": 2
},
"end": {
"line": 24,
"column": 7
}
},
"name": "place"
},
"value": {
"type": "ObjectExpression",
"start": 446,
"end": 468,
"loc": {
"start": {
"line": 24,
"column": 9
},
"end": {
"line": 26,
"column": 3
}
},
"properties": [
{
"type": "Property",
"start": 452,
"end": 464,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 16
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 452,
"end": 456,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 8
}
},
"name": "slug"
},
"value": {
"type": "Literal",
"start": 458,
"end": 464,
"loc": {
"start": {
"line": 25,
"column": 10
},
"end": {
"line": 25,
"column": 16
}
},
"value": "/foo",
"rawValue": "/foo",
"raw": "\"/foo\""
},
"kind": "init"
}
]
},
"kind": "init"
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 473,
"end": 908,
"loc": {
"start": {
"line": 29,
"column": 0
},
"end": {
"line": 47,
"column": 3
}
},
"expression": {
"type": "CallExpression",
"start": 473,
"end": 907,
"loc": {
"start": {
"line": 29,
"column": 0
},
"end": {
"line": 47,
"column": 2
}
},
"callee": {
"type": "Identifier",
"start": 473,
"end": 481,
"loc": {
"start": {
"line": 29,
"column": 0
},
"end": {
"line": 29,
"column": 8
}
},
"name": "describe"
},
"arguments": [
{
"type": "Literal",
"start": 482,
"end": 497,
"loc": {
"start": {
"line": 29,
"column": 9
},
"end": {
"line": 29,
"column": 24
}
},
"value": "map component",
"rawValue": "map component",
"raw": "\"map component\""
},
{
"type": "ArrowFunctionExpression",
"start": 499,
"end": 906,
"loc": {
"start": {
"line": 29,
"column": 26
},
"end": {
"line": 47,
"column": 1
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 505,
"end": 906,
"loc": {
"start": {
"line": 29,
"column": 32
},
"end": {
"line": 47,
"column": 1
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 509,
"end": 904,
"loc": {
"start": {
"line": 30,
"column": 2
},
"end": {
"line": 46,
"column": 5
}
},
"expression": {
"type": "CallExpression",
"start": 509,
"end": 903,
"loc": {
"start": {
"line": 30,
"column": 2
},
"end": {
"line": 46,
"column": 4
}
},
"callee": {
"type": "Identifier",
"start": 509,
"end": 511,
"loc": {
"start": {
"line": 30,
"column": 2
},
"end": {
"line": 30,
"column": 4
}
},
"name": "it"
},
"arguments": [
{
"type": "Literal",
"start": 512,
"end": 551,
"loc": {
"start": {
"line": 30,
"column": 5
},
"end": {
"line": 30,
"column": 44
}
},
"value": "should open, close and adjust the url",
"rawValue": "should open, close and adjust the url",
"raw": "\"should open, close and adjust the url\""
},
{
"type": "ArrowFunctionExpression",
"start": 553,
"end": 902,
"loc": {
"start": {
"line": 30,
"column": 46
},
"end": {
"line": 46,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 559,
"end": 902,
"loc": {
"start": {
"line": 30,
"column": 52
},
"end": {
"line": 46,
"column": 3
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 565,
"end": 594,
"loc": {
"start": {
"line": 31,
"column": 4
},
"end": {
"line": 31,
"column": 33
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 569,
"end": 593,
"loc": {
"start": {
"line": 31,
"column": 8
},
"end": {
"line": 31,
"column": 32
}
},
"id": {
"type": "Identifier",
"start": 569,
"end": 572,
"loc": {
"start": {
"line": 31,
"column": 8
},
"end": {
"line": 31,
"column": 11
}
},
"name": "map"
},
"init": {
"type": "NewExpression",
"start": 575,
"end": 593,
"loc": {
"start": {
"line": 31,
"column": 14
},
"end": {
"line": 31,
"column": 32
}
},
"callee": {
"type": "Identifier",
"start": 579,
"end": 591,
"loc": {
"start": {
"line": 31,
"column": 18
},
"end": {
"line": 31,
"column": 30
}
},
"name": "MapComponent"
},
"arguments": []
}
}
],
"kind": "let"
},
{
"type": "ExpressionStatement",
"start": 604,
"end": 652,
"loc": {
"start": {
"line": 33,
"column": 4
},
"end": {
"line": 34,
"column": 21
}
},
"expression": {
"type": "CallExpression",
"start": 604,
"end": 652,
"loc": {
"start": {
"line": 33,
"column": 4
},
"end": {
"line": 34,
"column": 21
}
},
"callee": {
"type": "MemberExpression",
"start": 604,
"end": 645,
"loc": {
"start": {
"line": 33,
"column": 4
},
"end": {
"line": 34,
"column": 14
}
},
"object": {
"type": "CallExpression",
"start": 604,
"end": 630,
"loc": {
"start": {
"line": 33,
"column": 4
},
"end": {
"line": 33,
"column": 30
}
},
"callee": {
"type": "MemberExpression",
"start": 604,
"end": 614,
"loc": {
"start": {
"line": 33,
"column": 4
},
"end": {
"line": 33,
"column": 14
}
},
"object": {
"type": "Identifier",
"start": 604,
"end": 609,
"loc": {
"start": {
"line": 33,
"column": 4
},
"end": {
"line": 33,
"column": 9
}
},
"name": "sinon"
},
"property": {
"type": "Identifier",
"start": 610,
"end": 614,
"loc": {
"start": {
"line": 33,
"column": 10
},
"end": {
"line": 33,
"column": 14
}
},
"name": "stub"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 615,
"end": 618,
"loc": {
"start": {
"line": 33,
"column": 15
},
"end": {
"line": 33,
"column": 18
}
},
"name": "map"
},
{
"type": "Literal",
"start": 620,
"end": 629,
"loc": {
"start": {