rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,399 lines (1,398 loc) • 141 kB
JSON
{
"type": "Program",
"start": 0,
"end": 685,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 36,
"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": "Identifier",
"start": 46,
"end": 660,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 34,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 52,
"end": 59,
"loc": {
"start": {
"line": 3,
"column": 6
},
"end": {
"line": 3,
"column": 13
}
},
"name": "Tooltip"
},
"superClass": {
"type": "Identifier",
"start": 68,
"end": 77,
"loc": {
"start": {
"line": 3,
"column": 22
},
"end": {
"line": 3,
"column": 31
}
},
"name": "Component"
},
"body": {
"type": "ClassBody",
"start": 78,
"end": 660,
"loc": {
"start": {
"line": 3,
"column": 32
},
"end": {
"line": 34,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 82,
"end": 254,
"loc": {
"start": {
"line": 4,
"column": 2
},
"end": {
"line": 12,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 82,
"end": 92,
"loc": {
"start": {
"line": 4,
"column": 2
},
"end": {
"line": 4,
"column": 12
}
},
"name": "initialize"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 92,
"end": 254,
"loc": {
"start": {
"line": 4,
"column": 12
},
"end": {
"line": 12,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 95,
"end": 254,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 12,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 101,
"end": 178,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 8,
"column": 6
}
},
"expression": {
"type": "AssignmentExpression",
"start": 101,
"end": 177,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 8,
"column": 5
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 101,
"end": 112,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 101,
"end": 105,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 106,
"end": 112,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 15
}
},
"name": "events"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 115,
"end": 177,
"loc": {
"start": {
"line": 5,
"column": 18
},
"end": {
"line": 8,
"column": 5
}
},
"properties": [
{
"type": "Property",
"start": 123,
"end": 143,
"loc": {
"start": {
"line": 6,
"column": 6
},
"end": {
"line": 6,
"column": 26
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 123,
"end": 133,
"loc": {
"start": {
"line": 6,
"column": 6
},
"end": {
"line": 6,
"column": 16
}
},
"name": "mouseenter"
},
"value": {
"type": "Literal",
"start": 135,
"end": 143,
"loc": {
"start": {
"line": 6,
"column": 18
},
"end": {
"line": 6,
"column": 26
}
},
"value": "_enter",
"rawValue": "_enter",
"raw": "\"_enter\""
},
"kind": "init"
},
{
"type": "Property",
"start": 151,
"end": 171,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 26
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 151,
"end": 161,
"loc": {
"start": {
"line": 7,
"column": 6
},
"end": {
"line": 7,
"column": 16
}
},
"name": "mouseleave"
},
"value": {
"type": "Literal",
"start": 163,
"end": 171,
"loc": {
"start": {
"line": 7,
"column": 18
},
"end": {
"line": 7,
"column": 26
}
},
"value": "_leave",
"rawValue": "_leave",
"raw": "\"_leave\""
},
"kind": "init"
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 184,
"end": 231,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 51
}
},
"expression": {
"type": "AssignmentExpression",
"start": 184,
"end": 230,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 50
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 184,
"end": 197,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 184,
"end": 188,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 189,
"end": 197,
"loc": {
"start": {
"line": 10,
"column": 9
},
"end": {
"line": 10,
"column": 17
}
},
"name": "template"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 200,
"end": 230,
"loc": {
"start": {
"line": 10,
"column": 20
},
"end": {
"line": 10,
"column": 50
}
},
"callee": {
"type": "Identifier",
"start": 200,
"end": 207,
"loc": {
"start": {
"line": 10,
"column": 20
},
"end": {
"line": 10,
"column": 27
}
},
"name": "require"
},
"arguments": [
{
"type": "Literal",
"start": 208,
"end": 229,
"loc": {
"start": {
"line": 10,
"column": 28
},
"end": {
"line": 10,
"column": 49
}
},
"value": "./_tooltip.html.hbs",
"rawValue": "./_tooltip.html.hbs",
"raw": "\"./_tooltip.html.hbs\""
}
]
}
}
},
{
"type": "ExpressionStatement",
"start": 236,
"end": 250,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 18
}
},
"expression": {
"type": "CallExpression",
"start": 236,
"end": 249,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 17
}
},
"callee": {
"type": "MemberExpression",
"start": 236,
"end": 247,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 236,
"end": 240,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 241,
"end": 247,
"loc": {
"start": {
"line": 11,
"column": 9
},
"end": {
"line": 11,
"column": 15
}
},
"name": "render"
},
"computed": false
},
"arguments": []
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 257,
"end": 365,
"loc": {
"start": {
"line": 13,
"column": 2
},
"end": {
"line": 18,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 257,
"end": 263,
"loc": {
"start": {
"line": 13,
"column": 2
},
"end": {
"line": 13,
"column": 8
}
},
"name": "render"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 263,
"end": 365,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 18,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 266,
"end": 365,
"loc": {
"start": {
"line": 13,
"column": 11
},
"end": {
"line": 18,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 272,
"end": 343,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 15,
"column": 32
}
},
"expression": {
"type": "CallExpression",
"start": 272,
"end": 342,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 15,
"column": 31
}
},
"callee": {
"type": "MemberExpression",
"start": 272,
"end": 325,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 15,
"column": 14
}
},
"object": {
"type": "CallExpression",
"start": 272,
"end": 310,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 42
}
},
"callee": {
"type": "MemberExpression",
"start": 272,
"end": 289,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 21
}
},
"object": {
"type": "MemberExpression",
"start": 272,
"end": 280,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 12
}
},
"object": {
"type": "ThisExpression",
"start": 272,
"end": 276,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 277,
"end": 280,
"loc": {
"start": {
"line": 14,
"column": 9
},
"end": {
"line": 14,
"column": 12
}
},
"name": "$el"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 281,
"end": 289,
"loc": {
"start": {
"line": 14,
"column": 13
},
"end": {
"line": 14,
"column": 21
}
},
"name": "addClass"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 290,
"end": 309,
"loc": {
"start": {
"line": 14,
"column": 22
},
"end": {
"line": 14,
"column": 41
}
},
"value": "tooltip is-hidden",
"rawValue": "tooltip is-hidden",
"raw": "\"tooltip is-hidden\""
}
]
},
"property": {
"type": "Identifier",
"start": 318,
"end": 325,
"loc": {
"start": {
"line": 15,
"column": 7
},
"end": {
"line": 15,
"column": 14
}
},
"name": "prepend"
},
"computed": false
},
"arguments": [
{
"type": "CallExpression",
"start": 326,
"end": 341,
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 15,
"column": 30
}
},
"callee": {
"type": "MemberExpression",
"start": 326,
"end": 339,
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 15,
"column": 28
}
},
"object": {
"type": "ThisExpression",
"start": 326,
"end": 330,
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 15,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"start": 331,
"end": 339,
"loc": {
"start": {
"line": 15,
"column": 20
},
"end": {
"line": 15,
"column": 28
}
},
"name": "template"
},
"computed": false
},
"arguments": []
}
]
}
},
{
"type": "ReturnStatement",
"start": 349,
"end": 361,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 16
}
},
"argument": {
"type": "ThisExpression",
"start": 356,
"end": 360,
"loc": {
"start": {
"line": 17,
"column": 11
},
"end": {
"line": 17,
"column": 15
}
}
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 368,
"end": 568,
"loc": {
"start": {
"line": 19,
"column": 2
},
"end": {
"line": 27,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 368,
"end": 374,
"loc": {
"start": {
"line": 19,
"column": 2
},
"end": {
"line": 19,
"column": 8
}
},
"name": "toggle"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 374,
"end": 568,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 27,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 375,
"end": 380,
"loc": {
"start": {
"line": 19,
"column": 9
},
"end": {
"line": 19,
"column": 14
}
},
"name": "state"
}
],
"body": {
"type": "BlockStatement",
"start": 382,
"end": 568,
"loc": {
"start": {
"line": 19,
"column": 16
},
"end": {
"line": 27,
"column": 3
}
},
"body": [
{
"type": "IfStatement",
"start": 388,
"end": 564,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 26,
"column": 5
}
},
"test": {
"type": "BinaryExpression",
"start": 392,
"end": 409,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 25
}
},
"left": {
"type": "Identifier",
"start": 392,
"end": 397,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 13
}
},
"name": "state"
},
"operator": "===",
"right": {
"type": "Literal",
"start": 402,
"end": 409,
"loc": {
"start": {
"line": 20,
"column": 18
},
"end": {
"line": 20,
"column": 25
}
},
"value": "close",
"rawValue": "close",
"raw": "\"close\""
}
},
"consequent": {
"type": "BlockStatement",
"start": 410,
"end": 510,
"loc": {
"start": {
"line": 20,
"column": 26
},
"end": {
"line": 24,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 418,
"end": 504,
"loc": {
"start": {
"line": 21,
"column": 6
},
"end": {
"line": 23,
"column": 14
}
},
"expression": {
"type": "AssignmentExpression",
"start": 418,
"end": 503,
"loc": {
"start": {
"line": 21,
"column": 6
},
"end": {
"line": 23,
"column": 13
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 418,
"end": 428,
"loc": {
"start": {
"line": 21,
"column": 6
},
"end": {
"line": 21,
"column": 16
}
},
"object": {
"type": "ThisExpression",
"start": 418,
"end": 422,
"loc": {
"start": {
"line": 21,
"column": 6
},
"end": {
"line": 21,
"column": 10
}
}
},
"property": {
"type": "Identifier",
"start": 423,
"end": 428,
"loc": {
"start": {
"line": 21,
"column": 11
},
"end": {
"line": 21,
"column": 16
}
},
"name": "timer"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 431,
"end": 503,
"loc": {
"start": {
"line": 21,
"column": 19
},
"end": {
"line": 23,
"column": 13
}
},
"callee": {
"type": "Identifier",
"start": 431,
"end": 441,
"loc": {
"start": {
"line": 21,
"column": 19
},
"end": {
"line": 21,
"column": 29
}
},
"name": "setTimeout"
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 442,
"end": 497,
"loc": {
"start": {
"line": 21,
"column": 30
},
"end": {
"line": 23,
"column": 7
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 448,
"end": 497,
"loc": {
"start": {
"line": 21,
"column": 36
},
"end": {
"line": 23,
"column": 7
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 458,
"end": 489,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 39
}
},
"expression": {
"type": "CallExpression",
"start": 458,
"end": 488,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 38
}
},
"callee": {
"type": "MemberExpression",
"start": 458,
"end": 475,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 25
}
},
"object": {
"type": "MemberExpression",
"start": 458,
"end": 466,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 16
}
},
"object": {
"type": "ThisExpression",
"start": 458,
"end": 462,
"loc": {
"start": {
"line": 22,
"column": 8
},
"end": {
"line": 22,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 463,
"end": 466,
"loc": {
"start": {
"line": 22,
"column": 13
},
"end": {
"line": 22,
"column": 16
}
},
"name": "$el"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 467,
"end": 475,
"loc": {
"start": {
"line": 22,
"column": 17
},
"end": {
"line": 22,
"column": 25
}
},
"name": "addClass"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 476,
"end": 487,
"loc": {