rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,642 lines (1,641 loc) • 66.3 kB
JSON
{
"type": "Program",
"start": 0,
"end": 1004,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 38,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 47,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 47
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 16
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 16
}
},
"name": "subscribe"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 22,
"end": 46,
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 46
}
},
"value": "./decorators/subscribe",
"rawValue": "./decorators/subscribe",
"raw": "\"./decorators/subscribe\""
}
},
{
"type": "ImportDeclaration",
"start": 48,
"end": 91,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 43
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 55,
"end": 62,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 14
}
},
"local": {
"type": "Identifier",
"start": 55,
"end": 62,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 14
}
},
"name": "channel"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 68,
"end": 90,
"loc": {
"start": {
"line": 2,
"column": 20
},
"end": {
"line": 2,
"column": 42
}
},
"value": "./decorators/channel",
"rawValue": "./decorators/channel",
"raw": "\"./decorators/channel\""
}
},
{
"type": "ImportDeclaration",
"start": 92,
"end": 133,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 41
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 99,
"end": 110,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 18
}
},
"local": {
"type": "Identifier",
"start": 99,
"end": 110,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 18
}
},
"name": "RizzoEvents"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 116,
"end": 132,
"loc": {
"start": {
"line": 3,
"column": 24
},
"end": {
"line": 3,
"column": 40
}
},
"value": "./rizzo_events",
"rawValue": "./rizzo_events",
"raw": "\"./rizzo_events\""
}
},
{
"type": "ImportDeclaration",
"start": 134,
"end": 179,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 45
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 143,
"end": 147,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 13
}
},
"imported": {
"type": "Identifier",
"start": 143,
"end": 147,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 13
}
},
"name": "mark"
},
"local": {
"type": "Identifier",
"start": 143,
"end": 147,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 13
}
},
"name": "mark"
}
},
{
"type": "ImportSpecifier",
"start": 149,
"end": 156,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 4,
"column": 22
}
},
"imported": {
"type": "Identifier",
"start": 149,
"end": 156,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 4,
"column": 22
}
},
"name": "measure"
},
"local": {
"type": "Identifier",
"start": 149,
"end": 156,
"loc": {
"start": {
"line": 4,
"column": 15
},
"end": {
"line": 4,
"column": 22
}
},
"name": "measure"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 164,
"end": 178,
"loc": {
"start": {
"line": 4,
"column": 30
},
"end": {
"line": 4,
"column": 44
}
},
"value": "./utils/perf",
"rawValue": "./utils/perf",
"raw": "\"./utils/perf\""
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * Records some performance data about our component rendering.\n ",
"start": 181,
"end": 252,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 8,
"column": 3
}
},
"range": [
181,
252
]
}
]
},
{
"type": "ExportDefaultDeclaration",
"start": 253,
"end": 1003,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 37,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 268,
"end": 1003,
"loc": {
"start": {
"line": 9,
"column": 15
},
"end": {
"line": 37,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 274,
"end": 285,
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 9,
"column": 32
}
},
"name": "PerfMonitor",
"leadingComments": null
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 286,
"end": 1003,
"loc": {
"start": {
"line": 9,
"column": 33
},
"end": {
"line": 37,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 290,
"end": 362,
"loc": {
"start": {
"line": 10,
"column": 2
},
"end": {
"line": 12,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 294,
"end": 306,
"loc": {
"start": {
"line": 10,
"column": 6
},
"end": {
"line": 10,
"column": 18
}
},
"name": "loadCritical"
},
"static": false,
"kind": "get",
"value": {
"type": "FunctionExpression",
"start": 306,
"end": 362,
"loc": {
"start": {
"line": 10,
"column": 18
},
"end": {
"line": 12,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 309,
"end": 362,
"loc": {
"start": {
"line": 10,
"column": 21
},
"end": {
"line": 12,
"column": 3
}
},
"body": [
{
"type": "ReturnStatement",
"start": 315,
"end": 358,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 47
}
},
"argument": {
"type": "TemplateLiteral",
"start": 322,
"end": 357,
"loc": {
"start": {
"line": 11,
"column": 11
},
"end": {
"line": 11,
"column": 46
}
},
"expressions": [
{
"type": "MemberExpression",
"start": 330,
"end": 355,
"loc": {
"start": {
"line": 11,
"column": 19
},
"end": {
"line": 11,
"column": 44
}
},
"object": {
"type": "Identifier",
"start": 330,
"end": 341,
"loc": {
"start": {
"line": 11,
"column": 19
},
"end": {
"line": 11,
"column": 30
}
},
"name": "RizzoEvents"
},
"property": {
"type": "Identifier",
"start": 342,
"end": 355,
"loc": {
"start": {
"line": 11,
"column": 31
},
"end": {
"line": 11,
"column": 44
}
},
"name": "LOAD_CRITICAL"
},
"computed": false
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 323,
"end": 328,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 17
}
},
"value": {
"raw": "mark_",
"cooked": "mark_"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 356,
"end": 356,
"loc": {
"start": {
"line": 11,
"column": 45
},
"end": {
"line": 11,
"column": 45
}
},
"value": {
"raw": "",
"cooked": ""
},
"tail": true
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 365,
"end": 431,
"loc": {
"start": {
"line": 13,
"column": 2
},
"end": {
"line": 15,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 369,
"end": 378,
"loc": {
"start": {
"line": 13,
"column": 6
},
"end": {
"line": 13,
"column": 15
}
},
"name": "loadBelow"
},
"static": false,
"kind": "get",
"value": {
"type": "FunctionExpression",
"start": 378,
"end": 431,
"loc": {
"start": {
"line": 13,
"column": 15
},
"end": {
"line": 15,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 381,
"end": 431,
"loc": {
"start": {
"line": 13,
"column": 18
},
"end": {
"line": 15,
"column": 3
}
},
"body": [
{
"type": "ReturnStatement",
"start": 387,
"end": 427,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 44
}
},
"argument": {
"type": "TemplateLiteral",
"start": 394,
"end": 426,
"loc": {
"start": {
"line": 14,
"column": 11
},
"end": {
"line": 14,
"column": 43
}
},
"expressions": [
{
"type": "MemberExpression",
"start": 402,
"end": 424,
"loc": {
"start": {
"line": 14,
"column": 19
},
"end": {
"line": 14,
"column": 41
}
},
"object": {
"type": "Identifier",
"start": 402,
"end": 413,
"loc": {
"start": {
"line": 14,
"column": 19
},
"end": {
"line": 14,
"column": 30
}
},
"name": "RizzoEvents"
},
"property": {
"type": "Identifier",
"start": 414,
"end": 424,
"loc": {
"start": {
"line": 14,
"column": 31
},
"end": {
"line": 14,
"column": 41
}
},
"name": "LOAD_BELOW"
},
"computed": false
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 395,
"end": 400,
"loc": {
"start": {
"line": 14,
"column": 12
},
"end": {
"line": 14,
"column": 17
}
},
"value": {
"raw": "mark_",
"cooked": "mark_"
},
"tail": false
},
{
"type": "TemplateElement",
"start": 425,
"end": 425,
"loc": {
"start": {
"line": 14,
"column": 42
},
"end": {
"line": 14,
"column": 42
}
},
"value": {
"raw": "",
"cooked": ""
},
"tail": true
}
]
}
}
]
}
}
},
{
"type": "MethodDefinition",
"start": 434,
"end": 475,
"loc": {
"start": {
"line": 16,
"column": 2
},
"end": {
"line": 18,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 434,
"end": 445,
"loc": {
"start": {
"line": 16,
"column": 2
},
"end": {
"line": 16,
"column": 13
}
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 445,
"end": 475,
"loc": {
"start": {
"line": 16,
"column": 13
},
"end": {
"line": 18,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 448,
"end": 475,
"loc": {
"start": {
"line": 16,
"column": 16
},
"end": {
"line": 18,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 454,
"end": 471,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 21
}
},
"expression": {
"type": "CallExpression",
"start": 454,
"end": 470,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 20
}
},
"callee": {
"type": "MemberExpression",
"start": 454,
"end": 468,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 18
}
},
"object": {
"type": "ThisExpression",
"start": 454,
"end": 458,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 8
}
}
},
"property": {
"type": "Identifier",
"start": 459,
"end": 468,
"loc": {
"start": {
"line": 17,
"column": 9
},
"end": {
"line": 17,
"column": 18
}
},
"name": "subscribe"
},
"computed": false
},
"arguments": []
}
}
],
"trailingComments": null
},
"trailingComments": null
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * Listens for when our critical code is loaded and creates a perf mark\n ",
"start": 478,
"end": 561,
"loc": {
"start": {
"line": 19,
"column": 2
},
"end": {
"line": 21,
"column": 5
}
},
"range": [
478,
561
]
}
]
},
{
"type": "MethodDefinition",
"start": 625,
"end": 674,
"loc": {
"start": {
"line": 24,
"column": 2
},
"end": {
"line": 26,
"column": 3
}
},
"decorators": [
{
"type": "Decorator",
"start": 564,
"end": 601,
"loc": {
"start": {
"line": 22,
"column": 2
},
"end": {
"line": 22,
"column": 39
}
},
"expression": {
"type": "CallExpression",
"start": 565,
"end": 601,
"loc": {
"start": {
"line": 22,
"column": 3
},
"end": {
"line": 22,
"column": 39
}
},
"callee": {
"type": "Identifier",
"start": 565,
"end": 574,
"loc": {
"start": {
"line": 22,
"column": 3
},
"end": {
"line": 22,
"column": 12
}
},
"name": "subscribe",
"leadingComments": null
},
"arguments": [
{
"type": "MemberExpression",
"start": 575,
"end": 600,
"loc": {
"start": {
"line": 22,
"column": 13
},
"end": {
"line": 22,
"column": 38
}
},
"object": {
"type": "Identifier",
"start": 575,
"end": 586,
"loc": {
"start": {
"line": 22,
"column": 13
},
"end": {
"line": 22,
"column": 24
}
},
"name": "RizzoEvents"
},
"property": {
"type": "Identifier",
"start": 587,
"end": 600,
"loc": {
"start": {
"line": 22,
"column": 25
},
"end": {
"line": 22,
"column": 38
}
},
"name": "LOAD_CRITICAL"
},
"computed": false
}
],
"leadingComments": null
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * Listens for when our critical code is loaded and creates a perf mark\n ",
"start": 478,
"end": 561,
"loc": {
"start": {
"line": 19,
"column": 2
},
"end": {
"line": 21,
"column": 5
}
},
"range": [
478,
561
]
}
]
},
{
"type": "Decorator",
"start": 604,
"end": 622,
"loc": {
"start": {
"line": 23,
"column": 2
},
"end": {
"line": 23,
"column": 20
}
},
"expression": {
"type": "CallExpression",
"start": 605,
"end": 622,
"loc": {
"start": {
"line": 23,
"column": 3
},
"end": {
"line": 23,
"column": 20
}
},
"callee": {
"type": "Identifier",
"start": 605,
"end": 612,
"loc": {
"start": {
"line": 23,
"column": 3
},
"end": {
"line": 23,
"column": 10
}
},
"name": "channel"
},
"arguments": [
{
"type": "Literal",
"start": 613,
"end": 621,
"loc": {
"start": {
"line": 23,
"column": 11
},
"end": {
"line": 23,
"column": 19
}
},
"value": "events",
"rawValue": "events",
"raw": "\"events\""
}
]
}
}
],
"computed": false,
"key": {
"type": "Identifier",
"start": 625,
"end": 637,
"loc": {
"start": {
"line": 24,
"column": 2
},
"end": {
"line": 24,
"column": 14
}
},
"name": "loadCritical"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 637,
"end": 674,
"loc": {
"start": {
"line": 24,
"column": 14
},
"end": {
"line": 26,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 640,
"end": 674,
"loc": {
"start": {
"line": 24,
"column": 17
},
"end": {
"line": 26,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 646,
"end": 670,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 28
}
},
"expression": {
"type": "CallExpression",
"start": 646,
"end": 669,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 27
}
},
"callee": {
"type": "Identifier",
"start": 646,
"end": 650,
"loc": {
"start": {
"line": 25,
"column": 4
},
"end": {
"line": 25,
"column": 8
}
},
"name": "mark"
},
"arguments": [
{
"type": "MemberExpression",
"start": 651,
"end": 668,
"loc": {
"start": {
"line": 25,
"column": 9
},
"end": {
"line": 25,
"column": 26
}
},
"object": {
"type": "ThisExpression",
"start": 651,
"end": 655,
"loc": {
"start": {
"line": 25,
"column": 9
},
"end": {
"line": 25,
"column": 13
}
}
},
"property": {
"type": "Identifier",
"start": 656,
"end": 668,
"loc": {
"start": {
"line": 25,
"column": 14
},
"end": {
"line": 25,
"column": 26
}
},
"name": "loadCritical"
},
"computed": false
}
]
}
}
],
"trailingComments": null
},
"trailingComments": null
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * Listens for when our below the fold code is loaded and creates a perf mark\n ",
"start": 677,
"end": 766,
"loc": {
"start": {
"line": 27,
"column": 2
},
"end": {
"line": 29,
"column": 5
}
},
"range": [
677,
766
]
}
],
"leadingComments": [
{
"type": "Block",
"value": "*\n * Listens for when our critical code is loaded and creates a perf mark\n ",
"start": 478,
"end": 561,
"loc": {
"start": {
"line": 19,
"column": 2
},
"end": {
"line": 21,
"column": 5
}
},
"range": [
478,
561
]
}
]
},
{
"type": "MethodDefinition",
"start": 806,
"end": 1001,
"loc": {
"start": {
"line": 31,
"column": 2
},
"end": {
"line": 36,
"column": 3
}
},
"decorators": [
{
"type": "Decorator",
"start": 769,
"end": 803,
"loc": {
"start": {
"line": 30,
"column": 2
},
"end": {
"line": 30,
"column": 36
}
},
"expression": {
"type": "CallExpression",
"start": 770,
"end": 803,
"loc": {
"start": {
"line": 30,
"column": 3
},
"end": {
"line": 30,
"column": 36
}
},
"callee": {
"type": "Identifier",
"start": 770,
"end": 779,
"loc": {
"start": {
"line": 30,
"column": 3
},
"end": {
"line": 30,
"column": 12
}
},
"name": "subscribe",
"leadingComments": null
},
"arguments": [
{
"type": "MemberExpression",
"start": 780,
"end": 802,
"loc": {
"start": {
"line": 30,
"column": 13
},
"end": {
"line": 30,
"column": 35
}
},
"object": {
"type": "Identifier",
"start": 780,
"end": 791,
"loc": {
"start": {
"line": 30,
"column": 13
},
"end": {
"line": 30,
"column": 24
}
},
"name": "RizzoEvents"
},
"property": {
"type": "Identifier",
"start": 792,
"end": 802,
"loc": {
"start": {
"line": 30,
"column": 25
},
"end": {
"line": 30,
"column": 35
}
},
"name": "LOAD_BELOW"
},
"computed": false
}
],
"leadingComments": null
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * Listens for when our below the fold code is loaded and creates a perf mark\n ",
"start": 677,
"end": 766,
"loc": {
"start": {
"line": 27,
"column": 2
},
"end": {
"line": 29,
"column": 5
}
},
"range": [
677,
766
]
}
]
}
],
"computed": false,
"key": {
"type": "Identifier",
"start": 806,
"end": 815,
"loc": {
"start": {
"line": 31,
"column": 2
},
"end": {
"line": 31,
"column": 11
}
},
"name": "loadBelow"
},
"static": false,
"kind": "method",
"value": {
"type": "FunctionExpression",
"start": 815,
"end": 1001,
"loc": {
"start": {
"line": 31,
"column": 11
},
"end": {
"line": 36,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 818,
"end": 1001,
"loc": {
"start": {
"line": 31,
"column": 14
},
"end": {
"line": 36,
"column": 3
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 824,
"end": 845,
"loc": {
"start": {
"line": 32,
"column": 4
},
"end": {
"line": 32,
"column": 25
}
},
"expression": {
"type": "CallExpression",
"start": 824,
"end": 844,
"loc": {
"start": {
"line": 32,
"column": 4
},
"end": {
"line": 32,
"column": 24
}
},
"callee": {
"type": "Identifier",
"start": 824,
"end": 828,
"loc": {
"start": {
"line": 32,
"column": 4
},
"end": {
"line": 32,
"column": 8
}
},
"name": "mark"
},
"arguments": [
{
"type": "MemberExpression",
"start": 829,
"end": 843,
"loc": {
"start": {
"line": 32,
"column": 9
},
"end": {
"line": 32,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 829,
"end": 833,