rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,546 lines (1,545 loc) • 133 kB
JSON
{
"type": "Program",
"start": 0,
"end": 773,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 39,
"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": 102,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 54
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 55,
"end": 64,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 16
}
},
"local": {
"type": "Identifier",
"start": 55,
"end": 64,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 16
}
},
"name": "highlight"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 70,
"end": 101,
"loc": {
"start": {
"line": 2,
"column": 22
},
"end": {
"line": 2,
"column": 53
}
},
"value": "../../../core/utils/highlight",
"rawValue": "../../../core/utils/highlight",
"raw": "\"../../../core/utils/highlight\""
}
},
{
"type": "ImportDeclaration",
"start": 103,
"end": 143,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 40
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 110,
"end": 118,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 15
}
},
"local": {
"type": "Identifier",
"start": 110,
"end": 118,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 15
}
},
"name": "template"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 124,
"end": 142,
"loc": {
"start": {
"line": 3,
"column": 21
},
"end": {
"line": 3,
"column": 39
}
},
"value": "./index.html.hbs",
"rawValue": "./index.html.hbs",
"raw": "\"./index.html.hbs\""
}
},
{
"type": "ImportDeclaration",
"start": 144,
"end": 166,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 22
}
},
"specifiers": [],
"source": {
"type": "Literal",
"start": 151,
"end": 165,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 21
}
},
"value": "./index.scss",
"rawValue": "./index.scss",
"raw": "\"./index.scss\""
}
},
{
"type": "Identifier",
"start": 168,
"end": 735,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 36,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 174,
"end": 193,
"loc": {
"start": {
"line": 6,
"column": 6
},
"end": {
"line": 6,
"column": 25
}
},
"name": "SearchItemComponent"
},
"superClass": {
"type": "Identifier",
"start": 202,
"end": 211,
"loc": {
"start": {
"line": 6,
"column": 34
},
"end": {
"line": 6,
"column": 43
}
},
"name": "Component"
},
"body": {
"type": "ClassBody",
"start": 212,
"end": 735,
"loc": {
"start": {
"line": 6,
"column": 44
},
"end": {
"line": 36,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 217,
"end": 385,
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 14,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 217,
"end": 227,
"loc": {
"start": {
"line": 8,
"column": 2
},
"end": {
"line": 8,
"column": 12
}
},
"name": "initialize"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 227,
"end": 385,
"loc": {
"start": {
"line": 8,
"column": 12
},
"end": {
"line": 14,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 228,
"end": 235,
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 8,
"column": 20
}
},
"name": "options"
}
],
"body": {
"type": "BlockStatement",
"start": 236,
"end": 385,
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 14,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 242,
"end": 269,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 31
}
},
"expression": {
"type": "AssignmentExpression",
"start": 242,
"end": 268,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 30
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 242,
"end": 252,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 14
}
},
"object": {
"type": "ThisExpression",
"start": 242,
"end": 246,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 247,
"end": 252,
"loc": {
"start": {
"line": 9,
"column": 9
},
"end": {
"line": 9,
"column": 14
}
},
"name": "model"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 255,
"end": 268,
"loc": {
"start": {
"line": 9,
"column": 17
},
"end": {
"line": 9,
"column": 30
}
},
"object": {
"type": "Identifier",
"start": 255,
"end": 262,
"loc": {
"start": {
"line": 9,
"column": 17
},
"end": {
"line": 9,
"column": 24
}
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 263,
"end": 268,
"loc": {
"start": {
"line": 9,
"column": 25
},
"end": {
"line": 9,
"column": 30
}
},
"name": "model"
},
"computed": false
}
}
},
{
"type": "ExpressionStatement",
"start": 274,
"end": 315,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 45
}
},
"expression": {
"type": "AssignmentExpression",
"start": 274,
"end": 314,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 44
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 274,
"end": 291,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 21
}
},
"object": {
"type": "ThisExpression",
"start": 274,
"end": 278,
"loc": {
"start": {
"line": 10,
"column": 4
},
"end": {
"line": 10,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 279,
"end": 291,
"loc": {
"start": {
"line": 10,
"column": 9
},
"end": {
"line": 10,
"column": 21
}
},
"name": "searchString"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 294,
"end": 314,
"loc": {
"start": {
"line": 10,
"column": 24
},
"end": {
"line": 10,
"column": 44
}
},
"object": {
"type": "Identifier",
"start": 294,
"end": 301,
"loc": {
"start": {
"line": 10,
"column": 24
},
"end": {
"line": 10,
"column": 31
}
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 302,
"end": 314,
"loc": {
"start": {
"line": 10,
"column": 32
},
"end": {
"line": 10,
"column": 44
}
},
"name": "searchString"
},
"computed": false
}
}
},
{
"type": "ExpressionStatement",
"start": 320,
"end": 381,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 13,
"column": 7
}
},
"expression": {
"type": "AssignmentExpression",
"start": 320,
"end": 380,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 13,
"column": 6
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 320,
"end": 328,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 12
}
},
"object": {
"type": "ThisExpression",
"start": 320,
"end": 324,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 325,
"end": 328,
"loc": {
"start": {
"line": 11,
"column": 9
},
"end": {
"line": 11,
"column": 12
}
},
"name": "$el"
},
"computed": false
},
"right": {
"type": "CallExpression",
"start": 331,
"end": 380,
"loc": {
"start": {
"line": 11,
"column": 15
},
"end": {
"line": 13,
"column": 6
}
},
"callee": {
"type": "Identifier",
"start": 331,
"end": 332,
"loc": {
"start": {
"line": 11,
"column": 15
},
"end": {
"line": 11,
"column": 16
}
},
"name": "$"
},
"arguments": [
{
"type": "Literal",
"start": 333,
"end": 341,
"loc": {
"start": {
"line": 11,
"column": 17
},
"end": {
"line": 11,
"column": 25
}
},
"value": "<li />",
"rawValue": "<li />",
"raw": "\"<li />\""
},
{
"type": "ObjectExpression",
"start": 343,
"end": 379,
"loc": {
"start": {
"line": 11,
"column": 27
},
"end": {
"line": 13,
"column": 5
}
},
"properties": [
{
"type": "Property",
"start": 351,
"end": 373,
"loc": {
"start": {
"line": 12,
"column": 6
},
"end": {
"line": 12,
"column": 28
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Literal",
"start": 351,
"end": 358,
"loc": {
"start": {
"line": 12,
"column": 6
},
"end": {
"line": 12,
"column": 13
}
},
"value": "class",
"rawValue": "class",
"raw": "\"class\""
},
"value": {
"type": "Literal",
"start": 360,
"end": 373,
"loc": {
"start": {
"line": 12,
"column": 15
},
"end": {
"line": 12,
"column": 28
}
},
"value": "search-item",
"rawValue": "search-item",
"raw": "\"search-item\""
},
"kind": "init"
}
]
}
]
}
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 389,
"end": 532,
"loc": {
"start": {
"line": 16,
"column": 2
},
"end": {
"line": 22,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 389,
"end": 395,
"loc": {
"start": {
"line": 16,
"column": 2
},
"end": {
"line": 16,
"column": 8
}
},
"name": "render"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 395,
"end": 532,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 22,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 397,
"end": 532,
"loc": {
"start": {
"line": 16,
"column": 10
},
"end": {
"line": 22,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 403,
"end": 439,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 40
}
},
"expression": {
"type": "CallExpression",
"start": 403,
"end": 438,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 39
}
},
"callee": {
"type": "MemberExpression",
"start": 403,
"end": 416,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 17
}
},
"object": {
"type": "MemberExpression",
"start": 403,
"end": 411,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 12
}
},
"object": {
"type": "ThisExpression",
"start": 403,
"end": 407,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 408,
"end": 411,
"loc": {
"start": {
"line": 17,
"column": 9
},
"end": {
"line": 17,
"column": 12
}
},
"name": "$el"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 412,
"end": 416,
"loc": {
"start": {
"line": 17,
"column": 13
},
"end": {
"line": 17,
"column": 17
}
},
"name": "html"
},
"computed": false
},
"arguments": [
{
"type": "CallExpression",
"start": 417,
"end": 437,
"loc": {
"start": {
"line": 17,
"column": 18
},
"end": {
"line": 17,
"column": 38
}
},
"callee": {
"type": "Identifier",
"start": 417,
"end": 425,
"loc": {
"start": {
"line": 17,
"column": 18
},
"end": {
"line": 17,
"column": 26
}
},
"name": "template"
},
"arguments": [
{
"type": "MemberExpression",
"start": 426,
"end": 436,
"loc": {
"start": {
"line": 17,
"column": 27
},
"end": {
"line": 17,
"column": 37
}
},
"object": {
"type": "ThisExpression",
"start": 426,
"end": 430,
"loc": {
"start": {
"line": 17,
"column": 27
},
"end": {
"line": 17,
"column": 31
}
}
},
"property": {
"type": "Identifier",
"start": 431,
"end": 436,
"loc": {
"start": {
"line": 17,
"column": 32
},
"end": {
"line": 17,
"column": 37
}
},
"name": "model"
},
"computed": false
}
]
}
]
}
},
{
"type": "ExpressionStatement",
"start": 445,
"end": 510,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 69
}
},
"expression": {
"type": "CallExpression",
"start": 445,
"end": 509,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 68
}
},
"callee": {
"type": "Identifier",
"start": 445,
"end": 454,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 13
}
},
"name": "highlight"
},
"arguments": [
{
"type": "CallExpression",
"start": 455,
"end": 489,
"loc": {
"start": {
"line": 19,
"column": 14
},
"end": {
"line": 19,
"column": 48
}
},
"callee": {
"type": "MemberExpression",
"start": 455,
"end": 468,
"loc": {
"start": {
"line": 19,
"column": 14
},
"end": {
"line": 19,
"column": 27
}
},
"object": {
"type": "MemberExpression",
"start": 455,
"end": 463,
"loc": {
"start": {
"line": 19,
"column": 14
},
"end": {
"line": 19,
"column": 22
}
},
"object": {
"type": "ThisExpression",
"start": 455,
"end": 459,
"loc": {
"start": {
"line": 19,
"column": 14
},
"end": {
"line": 19,
"column": 18
}
}
},
"property": {
"type": "Identifier",
"start": 460,
"end": 463,
"loc": {
"start": {
"line": 19,
"column": 19
},
"end": {
"line": 19,
"column": 22
}
},
"name": "$el"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 464,
"end": 468,
"loc": {
"start": {
"line": 19,
"column": 23
},
"end": {
"line": 19,
"column": 27
}
},
"name": "find"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 469,
"end": 488,
"loc": {
"start": {
"line": 19,
"column": 28
},
"end": {
"line": 19,
"column": 47
}
},
"value": "[class*='__name']",
"rawValue": "[class*='__name']",
"raw": "\"[class*='__name']\""
}
]
},
{
"type": "MemberExpression",
"start": 491,
"end": 508,
"loc": {
"start": {
"line": 19,
"column": 50
},
"end": {
"line": 19,
"column": 67
}
},
"object": {
"type": "ThisExpression",
"start": 491,
"end": 495,
"loc": {
"start": {
"line": 19,
"column": 50
},
"end": {
"line": 19,
"column": 54
}
}
},
"property": {
"type": "Identifier",
"start": 496,
"end": 508,
"loc": {
"start": {
"line": 19,
"column": 55
},
"end": {
"line": 19,
"column": 67
}
},
"name": "searchString"
},
"computed": false
}
]
}
},
{
"type": "ReturnStatement",
"start": 516,
"end": 528,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 16
}
},
"argument": {
"type": "ThisExpression",
"start": 523,
"end": 527,
"loc": {
"start": {
"line": 21,
"column": 11
},
"end": {
"line": 21,
"column": 15
}
}
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 536,
"end": 597,
"loc": {
"start": {
"line": 24,
"column": 2
},
"end": {
"line": 26,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 536,
"end": 542,
"loc": {
"start": {
"line": 24,
"column": 2
},
"end": {
"line": 24,
"column": 8
}
},
"name": "select"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 542,
"end": 597,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 26,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 544,
"end": 597,
"loc": {
"start": {
"line": 24,
"column": 10
},
"end": {
"line": 26,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 550,
"end": 593,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 47
}
},
"expression": {
"type": "CallExpression",
"start": 550,
"end": 592,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 46
}
},
"callee": {
"type": "MemberExpression",
"start": 550,
"end": 567,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 21
}
},
"object": {
"type": "MemberExpression",
"start": 550,
"end": 558,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 12
}
},
"object": {
"type": "ThisExpression",
"start": 550,
"end": 554,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 555,
"end": 558,
"loc": {
"start": {
"line": 25,
"column": 9
},
"end": {
"line": 25,
"column": 12
}
},
"name": "$el"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 559,
"end": 567,
"loc": {
"start": {
"line": 25,
"column": 13
},
"end": {
"line": 25,
"column": 21
}
},
"name": "addClass"
},
"computed": false
},
"arguments": [