UNPKG

rizzo-next

Version:

The next generation of Lonely Planet's style guide and pattern library.

1,273 lines 90 kB
{ "type": "Program", "start": 0, "end": 823, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 31, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 69, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 69 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 24, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 24 } }, "local": { "type": "Identifier", "start": 7, "end": 24, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 24 } }, "name": "ComponentRegistry" } } ], "importKind": "value", "source": { "type": "Literal", "start": 30, "end": 68, "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 68 } }, "value": "../../../src/core/component_registry", "rawValue": "../../../src/core/component_registry", "raw": "\"../../../src/core/component_registry\"" } }, { "type": "ImportDeclaration", "start": 70, "end": 121, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 51 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 79, "end": 88, "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 18 } }, "imported": { "type": "Identifier", "start": 79, "end": 88, "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 18 } }, "name": "Component" }, "local": { "type": "Identifier", "start": 79, "end": 88, "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 18 } }, "name": "Component" } } ], "importKind": "value", "source": { "type": "Literal", "start": 96, "end": 120, "loc": { "start": { "line": 2, "column": 26 }, "end": { "line": 2, "column": 50 } }, "value": "../../../src/core/bane", "rawValue": "../../../src/core/bane", "raw": "\"../../../src/core/bane\"" }, "trailingComments": [ { "type": "Block", "value": "* @test {ComponentRegistry} ", "start": 123, "end": 155, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 32 } }, "range": [ 123, 155 ] } ] }, { "type": "ExpressionStatement", "start": 156, "end": 822, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 30, "column": 3 } }, "expression": { "type": "CallExpression", "start": 156, "end": 821, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 30, "column": 2 } }, "callee": { "type": "Identifier", "start": 156, "end": 164, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 8 } }, "name": "describe", "leadingComments": null }, "arguments": [ { "type": "Literal", "start": 165, "end": 184, "loc": { "start": { "line": 5, "column": 9 }, "end": { "line": 5, "column": 28 } }, "value": "ComponentRegistry", "rawValue": "ComponentRegistry", "raw": "\"ComponentRegistry\"" }, { "type": "ArrowFunctionExpression", "start": 186, "end": 820, "loc": { "start": { "line": 5, "column": 30 }, "end": { "line": 30, "column": 1 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 192, "end": 820, "loc": { "start": { "line": 5, "column": 36 }, "end": { "line": 30, "column": 1 } }, "body": [ { "type": "ExpressionStatement", "start": 196, "end": 416, "loc": { "start": { "line": 6, "column": 2 }, "end": { "line": 14, "column": 5 } }, "expression": { "type": "CallExpression", "start": 196, "end": 415, "loc": { "start": { "line": 6, "column": 2 }, "end": { "line": 14, "column": 4 } }, "callee": { "type": "Identifier", "start": 196, "end": 198, "loc": { "start": { "line": 6, "column": 2 }, "end": { "line": 6, "column": 4 } }, "name": "it" }, "arguments": [ { "type": "Literal", "start": 199, "end": 226, "loc": { "start": { "line": 6, "column": 5 }, "end": { "line": 6, "column": 32 } }, "value": "should register compnents", "rawValue": "should register compnents", "raw": "\"should register compnents\"" }, { "type": "ArrowFunctionExpression", "start": 228, "end": 414, "loc": { "start": { "line": 6, "column": 34 }, "end": { "line": 14, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 234, "end": 414, "loc": { "start": { "line": 6, "column": 40 }, "end": { "line": 14, "column": 3 } }, "body": [ { "type": "VariableDeclaration", "start": 240, "end": 279, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 43 } }, "declarations": [ { "type": "VariableDeclarator", "start": 244, "end": 278, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 42 } }, "id": { "type": "Identifier", "start": 244, "end": 252, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 16 } }, "name": "registry" }, "init": { "type": "NewExpression", "start": 255, "end": 278, "loc": { "start": { "line": 7, "column": 19 }, "end": { "line": 7, "column": 42 } }, "callee": { "type": "Identifier", "start": 259, "end": 276, "loc": { "start": { "line": 7, "column": 23 }, "end": { "line": 7, "column": 40 } }, "name": "ComponentRegistry" }, "arguments": [] } } ], "kind": "let" }, { "type": "ClassDeclaration", "start": 285, "end": 324, "loc": { "start": { "line": 9, "column": 4 }, "end": { "line": 9, "column": 43 } }, "id": { "type": "Identifier", "start": 291, "end": 303, "loc": { "start": { "line": 9, "column": 10 }, "end": { "line": 9, "column": 22 } }, "name": "FooComponent" }, "superClass": { "type": "Identifier", "start": 312, "end": 321, "loc": { "start": { "line": 9, "column": 31 }, "end": { "line": 9, "column": 40 } }, "name": "Component" }, "body": { "type": "ClassBody", "start": 322, "end": 324, "loc": { "start": { "line": 9, "column": 41 }, "end": { "line": 9, "column": 43 } }, "body": [] } }, { "type": "ExpressionStatement", "start": 330, "end": 362, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 36 } }, "expression": { "type": "CallExpression", "start": 330, "end": 361, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 35 } }, "callee": { "type": "MemberExpression", "start": 330, "end": 347, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 21 } }, "object": { "type": "Identifier", "start": 330, "end": 338, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 12 } }, "name": "registry" }, "property": { "type": "Identifier", "start": 339, "end": 347, "loc": { "start": { "line": 11, "column": 13 }, "end": { "line": 11, "column": 21 } }, "name": "register" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 348, "end": 360, "loc": { "start": { "line": 11, "column": 22 }, "end": { "line": 11, "column": 34 } }, "name": "FooComponent" } ] } }, { "type": "ExpressionStatement", "start": 368, "end": 410, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 46 } }, "expression": { "type": "CallExpression", "start": 368, "end": 409, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 45 } }, "callee": { "type": "MemberExpression", "start": 368, "end": 406, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 42 } }, "object": { "type": "MemberExpression", "start": 368, "end": 403, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 39 } }, "object": { "type": "CallExpression", "start": 368, "end": 400, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 36 } }, "callee": { "type": "Identifier", "start": 368, "end": 374, "loc": { "start": { "line": 13, "column": 4 }, "end": { "line": 13, "column": 10 } }, "name": "expect" }, "arguments": [ { "type": "MemberExpression", "start": 375, "end": 399, "loc": { "start": { "line": 13, "column": 11 }, "end": { "line": 13, "column": 35 } }, "object": { "type": "MemberExpression", "start": 375, "end": 394, "loc": { "start": { "line": 13, "column": 11 }, "end": { "line": 13, "column": 30 } }, "object": { "type": "Identifier", "start": 375, "end": 383, "loc": { "start": { "line": 13, "column": 11 }, "end": { "line": 13, "column": 19 } }, "name": "registry" }, "property": { "type": "Identifier", "start": 384, "end": 394, "loc": { "start": { "line": 13, "column": 20 }, "end": { "line": 13, "column": 30 } }, "name": "components" }, "computed": false }, "property": { "type": "Identifier", "start": 395, "end": 399, "loc": { "start": { "line": 13, "column": 31 }, "end": { "line": 13, "column": 35 } }, "name": "size" }, "computed": false } ] }, "property": { "type": "Identifier", "start": 401, "end": 403, "loc": { "start": { "line": 13, "column": 37 }, "end": { "line": 13, "column": 39 } }, "name": "to" }, "computed": false }, "property": { "type": "Identifier", "start": 404, "end": 406, "loc": { "start": { "line": 13, "column": 40 }, "end": { "line": 13, "column": 42 } }, "name": "be" }, "computed": false }, "arguments": [ { "type": "Literal", "start": 407, "end": 408, "loc": { "start": { "line": 13, "column": 43 }, "end": { "line": 13, "column": 44 } }, "value": 1, "rawValue": 1, "raw": "1" } ] } } ] } } ], "_esdocTestId": 24, "_esdocTestName": "it24" } }, { "type": "ExpressionStatement", "start": 420, "end": 818, "loc": { "start": { "line": 16, "column": 2 }, "end": { "line": 29, "column": 5 } }, "expression": { "type": "CallExpression", "start": 420, "end": 817, "loc": { "start": { "line": 16, "column": 2 }, "end": { "line": 29, "column": 4 } }, "callee": { "type": "Identifier", "start": 420, "end": 422, "loc": { "start": { "line": 16, "column": 2 }, "end": { "line": 16, "column": 4 } }, "name": "it" }, "arguments": [ { "type": "Literal", "start": 423, "end": 445, "loc": { "start": { "line": 16, "column": 5 }, "end": { "line": 16, "column": 27 } }, "value": "should add instances", "rawValue": "should add instances", "raw": "\"should add instances\"" }, { "type": "ArrowFunctionExpression", "start": 447, "end": 816, "loc": { "start": { "line": 16, "column": 29 }, "end": { "line": 29, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 453, "end": 816, "loc": { "start": { "line": 16, "column": 35 }, "end": { "line": 29, "column": 3 } }, "body": [ { "type": "VariableDeclaration", "start": 459, "end": 498, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 43 } }, "declarations": [ { "type": "VariableDeclarator", "start": 463, "end": 497, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 42 } }, "id": { "type": "Identifier", "start": 463, "end": 471, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 16 } }, "name": "registry" }, "init": { "type": "NewExpression", "start": 474, "end": 497, "loc": { "start": { "line": 17, "column": 19 }, "end": { "line": 17, "column": 42 } }, "callee": { "type": "Identifier", "start": 478, "end": 495, "loc": { "start": { "line": 17, "column": 23 }, "end": { "line": 17, "column": 40 } }, "name": "ComponentRegistry" }, "arguments": [] } } ], "kind": "let" }, { "type": "ClassDeclaration", "start": 504, "end": 543, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 43 } }, "id": { "type": "Identifier", "start": 510, "end": 522, "loc": { "start": { "line": 19, "column": 10 }, "end": { "line": 19, "column": 22 } }, "name": "FooComponent" }, "superClass": { "type": "Identifier", "start": 531, "end": 540, "loc": { "start": { "line": 19, "column": 31 }, "end": { "line": 19, "column": 40 } }, "name": "Component" }, "body": { "type": "ClassBody", "start": 541, "end": 543, "loc": { "start": { "line": 19, "column": 41 }, "end": { "line": 19, "column": 43 } }, "body": [] } }, { "type": "ExpressionStatement", "start": 549, "end": 581, "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 21, "column": 36 } }, "expression": { "type": "CallExpression", "start": 549, "end": 580, "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 21, "column": 35 } }, "callee": { "type": "MemberExpression", "start": 549, "end": 566, "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 21, "column": 21 } }, "object": { "type": "Identifier", "start": 549, "end": 557, "loc": { "start": { "line": 21, "column": 4 }, "end": { "line": 21, "column": 12 } }, "name": "registry" }, "property": { "type": "Identifier", "start": 558, "end": 566, "loc": { "start": { "line": 21, "column": 13 }, "end": { "line": 21, "column": 21 } }, "name": "register" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 567, "end": 579, "loc": { "start": { "line": 21, "column": 22 }, "end": { "line": 21, "column": 34 } }, "name": "FooComponent" } ] } }, { "type": "ExpressionStatement", "start": 587, "end": 629, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 46 } }, "expression": { "type": "CallExpression", "start": 587, "end": 628, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 45 } }, "callee": { "type": "MemberExpression", "start": 587, "end": 625, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 42 } }, "object": { "type": "MemberExpression", "start": 587, "end": 622, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 39 } }, "object": { "type": "CallExpression", "start": 587, "end": 619, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 36 } }, "callee": { "type": "Identifier", "start": 587, "end": 593, "loc": { "start": { "line": 23, "col