{ "type": "File", "start": 0, "end": 1919, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 85, "column": 19 } }, "program": { "type": "Program", "start": 0, "end": 1919, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 85, "column": 19 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 30, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 30 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 15, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 15 } }, "local": { "type": "Identifier", "start": 7, "end": 15, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 15 }, "identifierName": "Keyboard" }, "name": "Keyboard" } } ], "source": { "type": "StringLiteral", "start": 21, "end": 29, "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 29 } }, "extra": { "rawValue": "../lib", "raw": "'../lib'" }, "value": "../lib" } }, { "type": "ImportDeclaration", "start": 32, "end": 55, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 23 } }, "specifiers": [], "source": { "type": "StringLiteral", "start": 39, "end": 54, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 22 } }, "extra": { "rawValue": "./css/App.css", "raw": "'./css/App.css'" }, "value": "./css/App.css" }, "trailingComments": [ { "type": "CommentBlock", "value": "*\r\n * simple-keyboard demo\r\n ", "start": 59, "end": 92, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 6, "column": 3 } } } ] }, { "type": "Identifier", "start": 94, "end": 1896, "loc": { "start": { "line": 7, "column": 0 }, "end": { "line": 83, "column": 1 } }, "id": { "type": "Identifier", "start": 100, "end": 103, "loc": { "start": { "line": 7, "column": 6 }, "end": { "line": 7, "column": 9 }, "identifierName": "App" }, "name": "App", "leadingComments": null }, "superClass": null, "body": { "type": "ClassBody", "start": 104, "end": 1896, "loc": { "start": { "line": 7, "column": 10 }, "end": { "line": 83, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 157, "end": 350, "loc": { "start": { "line": 11, "column": 2 }, "end": { "line": 19, "column": 3 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 157, "end": 168, "loc": { "start": { "line": 11, "column": 2 }, "end": { "line": 11, "column": 13 }, "identifierName": "constructor" }, "name": "constructor", "leadingComments": null }, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 170, "end": 350, "loc": { "start": { "line": 11, "column": 15 }, "end": { "line": 19, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 177, "end": 241, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 68 } }, "expression": { "type": "CallExpression", "start": 177, "end": 240, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 67 } }, "callee": { "type": "MemberExpression", "start": 177, "end": 202, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 29 } }, "object": { "type": "Identifier", "start": 177, "end": 185, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 12 }, "identifierName": "document" }, "name": "document" }, "property": { "type": "Identifier", "start": 186, "end": 202, "loc": { "start": { "line": 12, "column": 13 }, "end": { "line": 12, "column": 29 }, "identifierName": "addEventListener" }, "name": "addEventListener" }, "computed": false }, "arguments": [ { "type": "StringLiteral", "start": 203, "end": 221, "loc": { "start": { "line": 12, "column": 30 }, "end": { "line": 12, "column": 48 } }, "extra": { "rawValue": "DOMContentLoaded", "raw": "'DOMContentLoaded'" }, "value": "DOMContentLoaded" }, { "type": "MemberExpression", "start": 223, "end": 239, "loc": { "start": { "line": 12, "column": 50 }, "end": { "line": 12, "column": 66 } }, "object": { "type": "ThisExpression", "start": 223, "end": 227, "loc": { "start": { "line": 12, "column": 50 }, "end": { "line": 12, "column": 54 } } }, "property": { "type": "Identifier", "start": 228, "end": 239, "loc": { "start": { "line": 12, "column": 55 }, "end": { "line": 12, "column": 66 }, "identifierName": "onDOMLoaded" }, "name": "onDOMLoaded" }, "computed": false } ] }, "trailingComments": [ { "type": "CommentBlock", "value": "*\r\n * Default input name\r\n * @type {string}\r\n ", "start": 249, "end": 311, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 17, "column": 7 } } } ] }, { "type": "ExpressionStatement", "start": 317, "end": 345, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 32 } }, "expression": { "type": "AssignmentExpression", "start": 317, "end": 344, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 31 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 317, "end": 332, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 19 } }, "object": { "type": "ThisExpression", "start": 317, "end": 321, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 8 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 322, "end": 332, "loc": { "start": { "line": 18, "column": 9 }, "end": { "line": 18, "column": 19 }, "identifierName": "layoutName" }, "name": "layoutName" }, "computed": false, "leadingComments": null }, "right": { "type": "StringLiteral", "start": 335, "end": 344, "loc": { "start": { "line": 18, "column": 22 }, "end": { "line": 18, "column": 31 } }, "extra": { "rawValue": "default", "raw": "\"default\"" }, "value": "default" }, "leadingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "*\r\n * Default input name\r\n * @type {string}\r\n ", "start": 249, "end": 311, "loc": { "start": { "line": 14, "column": 4 }, "end": { "line": 17, "column": 7 } } } ] } ], "directives": [], "trailingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "*\r\n * Instantiates the demo class\r\n ", "start": 109, "end": 153, "loc": { "start": { "line": 8, "column": 2 }, "end": { "line": 10, "column": 5 } } } ], "trailingComments": [ { "type": "CommentBlock", "value": "*\r\n * Executed when the DOM is ready\r\n ", "start": 356, "end": 403, "loc": { "start": { "line": 21, "column": 2 }, "end": { "line": 23, "column": 5 } } } ] }, { "type": "ClassProperty", "start": 407, "end": 1160, "loc": { "start": { "line": 24, "column": 2 }, "end": { "line": 49, "column": 3 } }, "static": false, "computed": false, "key": { "type": "Identifier", "start": 407, "end": 418, "loc": { "start": { "line": 24, "column": 2 }, "end": { "line": 24, "column": 13 }, "identifierName": "onDOMLoaded" }, "name": "onDOMLoaded", "leadingComments": null }, "value": { "type": "ArrowFunctionExpression", "start": 421, "end": 1160, "loc": { "start": { "line": 24, "column": 16 }, "end": { "line": 49, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 427, "end": 1160, "loc": { "start": { "line": 24, "column": 22 }, "end": { "line": 49, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 499, "end": 765, "loc": { "start": { "line": 28, "column": 4 }, "end": { "line": 35, "column": 7 } }, "expression": { "type": "AssignmentExpression", "start": 499, "end": 764, "loc": { "start": { "line": 28, "column": 4 }, "end": { "line": 35, "column": 6 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 499, "end": 512, "loc": { "start": { "line": 28, "column": 4 }, "end": { "line": 28, "column": 17 } }, "object": { "type": "ThisExpression", "start": 499, "end": 503, "loc": { "start": { "line": 28, "column": 4 }, "end": { "line": 28, "column": 8 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 504, "end": 512, "loc": { "start": { "line": 28, "column": 9 }, "end": { "line": 28, "column": 17 }, "identifierName": "keyboard" }, "name": "keyboard" }, "computed": false, "leadingComments": null }, "right": { "type": "NewExpression", "start": 515, "end": 764, "loc": { "start": { "line": 28, "column": 20 }, "end": { "line": 35, "column": 6 } }, "callee": { "type": "Identifier", "start": 519, "end": 527, "loc": { "start": { "line": 28, "column": 24 }, "end": { "line": 28, "column": 32 }, "identifierName": "Keyboard" }, "name": "Keyboard" }, "arguments": [ { "type": "ObjectExpression", "start": 528, "end": 763, "loc": { "start": { "line": 28, "column": 33 }, "end": { "line": 35, "column": 5 } }, "properties": [ { "type": "ObjectProperty", "start": 537, "end": 548, "loc": { "start": { "line": 29, "column": 6 }, "end": { "line": 29, "column": 17 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 537, "end": 542, "loc": { "start": { "line": 29, "column": 6 }, "end": { "line": 29, "column": 11 }, "identifierName": "debug" }, "name": "debug" }, "value": { "type": "BooleanLiteral", "start": 544, "end": 548, "loc": { "start": { "line": 29, "column": 13 }, "end": { "line": 29, "column": 17 } }, "value": true } }, { "type": "ObjectProperty", "start": 557, "end": 584, "loc": { "start": { "line": 30, "column": 6 }, "end": { "line": 30, "column": 33 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 557, "end": 567, "loc": { "start": { "line": 30, "column": 6 }, "end": { "line": 30, "column": 16 }, "identifierName": "layoutName" }, "name": "layoutName" }, "value": { "type": "MemberExpression", "start": 569, "end": 584, "loc": { "start": { "line": 30, "column": 18 }, "end": { "line": 30, "column": 33 } }, "object": { "type": "ThisExpression", "start": 569, "end": 573, "loc": { "start": { "line": 30, "column": 18 }, "end": { "line": 30, "column": 22 } } }, "property": { "type": "Identifier", "start": 574, "end": 584, "loc": { "start": { "line": 30, "column": 23 }, "end": { "line": 30, "column": 33 }, "identifierName": "layoutName" }, "name": "layoutName" }, "computed": false } }, { "type": "ObjectProperty", "start": 593, "end": 632, "loc": { "start": { "line": 31, "column": 6 }, "end": { "line": 31, "column": 45 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 593, "end": 601, "loc": { "start": { "line": 31, "column": 6 }, "end": { "line": 31, "column": 14 }, "identifierName": "onChange" }, "name": "onChange" }, "value": { "type": "ArrowFunctionExpression", "start": 603, "end": 632, "loc": { "start": { "line": 31, "column": 16 }, "end": { "line": 31, "column": 45 } }, "id": null, "generator": false, "expression": true, "async": false, "params": [ { "type": "Identifier", "start": 603, "end": 608, "loc": { "start": { "line": 31, "column": 16 }, "end": { "line": 31, "column": 21 }, "identifierName": "input" }, "name": "input" } ], "body": { "type": "CallExpression", "start": 612, "end": 632, "loc": { "start": { "line": 31, "column": 25 }, "end": { "line": 31, "column": 45 } }, "callee": { "type": "MemberExpression", "start": 612, "end": 625, "loc": { "start": { "line": 31, "column": 25 }, "end": { "line": 31, "column": 38 } }, "object": { "type": "ThisExpression", "start": 612, "end": 616, "loc": { "start": { "line": 31, "column": 25 }, "end": { "line": 31, "column": 29 } } }, "property": { "type": "Identifier", "start": 617, "end": 625, "loc": { "start": { "line": 31, "column": 30 }, "end": { "line": 31, "column": 38 }, "identifierName": "onChange" }, "name": "onChange" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 626, "end": 631, "loc": { "start": { "line": 31, "column": 39 }, "end": { "line": 31, "column": 44 }, "identifierName": "input" }, "name": "input" } ] } } }, { "type": "ObjectProperty", "start": 641, "end": 686, "loc": { "start": { "line": 32, "column": 6 }, "end": { "line": 32, "column": 51 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 641, "end": 651, "loc": { "start": { "line": 32, "column": 6 }, "end": { "line": 32, "column": 16 }, "identifierName": "onKeyPress" }, "name": "onKeyPress" }, "value": { "type": "ArrowFunctionExpression", "start": 653, "end": 686, "loc": { "start": { "line": 32, "column": 18 }, "end": { "line": 32, "column": 51 } }, "id": null, "generator": false, "expression": true, "async": false, "params": [ { "type": "Identifier", "start": 653, "end": 659, "loc": { "start": { "line": 32, "column": 18 }, "end": { "line": 32, "column": 24 }, "identifierName": "button" }, "name": "button" } ], "body": { "type": "CallExpression", "start": 663, "end": 686, "loc": { "start": { "line": 32, "column": 28 }, "end": { "line": 32, "column": 51 } }, "callee": { "type": "MemberExpression", "start": 663, "end": 678, "loc": { "start": { "line": 32, "column": 28 }, "end": { "line": 32, "column": 43 } }, "object": { "type": "ThisExpression", "start": 663, "end": 667, "loc": { "start": { "line": 32, "column": 28 }, "end": { "line": 32, "column": 32 } } }, "property": { "type": "Identifier", "start": 668, "end": 678, "loc": { "start": { "line": 32, "column": 33 }, "end": { "line": 32, "column": 43 }, "identifierName": "onKeyPress" }, "name": "onKeyPress" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 679, "end": 685, "loc": { "start": { "line": 32, "column": 44 }, "end": { "line": 32, "column": 50 }, "identifierName": "button" }, "name": "button" } ] } } }, { "type": "ObjectProperty", "start": 695, "end": 715, "loc": { "start": { "line": 33, "column": 6 }, "end": { "line": 33, "column": 26 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 695, "end": 709, "loc": { "start": { "line": 33, "column": 6 }, "end": { "line": 33, "column": 20 }, "identifierName": "newLineOnEnter" }, "name": "newLineOnEnter" }, "value": { "type": "BooleanLiteral", "start": 711, "end": 715, "loc": { "start": { "line": 33, "column": 22 }, "end": { "line": 33, "column": 26 } }, "value": true } }, { "type": "ObjectProperty", "start": 724, "end": 755, "loc": { "start": { "line": 34, "column": 6 }, "end": { "line": 34, "column": 37 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 724, "end": 749, "loc": { "start": { "line": 34, "column": 6 }, "end": { "line": 34, "column": 31 }, "identifierName": "physicalKeyboardHighlight" }, "name": "physicalKeyboardHighlight" }, "value": { "type": "BooleanLiteral", "start": 751, "end": 755, "loc": { "start": { "line": 34, "column": 33 }, "end": { "line": 34, "column": 37 } }, "value": true } } ] } ] }, "leadingComments": null }, "leadingComments": [ { "type": "CommentBlock", "value": "*\r\n * Creates a new simple-keyboard instance\r\n ", "start": 434, "end": 493, "loc": { "start": { "line": 25, "column": 4 }, "end": { "line": 27, "column": 7 } } } ], "trailingComments": [ { "type": "CommentBlock", "value": "*\r\n * Adding preview (demo only)\r\n ", "start": 775, "end": 822, "loc": { "start": { "line": 37, "column": 4 }, "end": { "line": 39, "column": 7 } } } ] }, { "type": "ExpressionStatement", "start": 828, "end": 1013, "loc": { "start": { "line": 40, "column": 4 }, "end": { "line": 44, "column": 7 } }, "expression": { "type": "CallExpression", "start": 828, "end": 1012, "loc": { "start": { "line": 40, "column": 4 }, "end": { "line": 44, "column": 6 } }, "callee": { "type": "MemberExpression", "start": 828, "end": 889, "loc": { "start": { "line": 40, "column": 4 }, "end": { "line": 40, "column": 65 } }, "object": { "type": "CallExpression", "start": 828, "end": 870, "loc": { "start": { "line": 40, "column": 4 }, "end": { "line": 40, "column": 46 } }, "callee": { "type": "MemberExpression", "start": 828, "end": 850, "loc": { "start": { "line": 40, "column": 4 }, "end": { "line": 40, "column": 26 } }, "object": { "type": "Identifier", "start": 828, "end": 836, "loc": { "start": { "line": 40, "column": 4 }, "end": { "line": 40, "column": 12 }, "identifierName": "document" }, "name": "document", "leadingComments": null }, "property": { "type": "Identifier", "start": 837, "end": 850, "loc": { "start": { "line": 40, "column": 13 }, "end": { "line": 40, "column": 26 }, "identifierName": "querySelector" }, "name": "querySelector" }, "computed": false, "leadingComments": null }, "arguments": [ { "type": "StringLiteral", "start": 851, "end": 869, "loc": { "start": { "line": 40, "column": 27 }, "end": { "line": 40, "column": 45 } }, "extra": { "rawValue": ".simple-keyboard", "raw": "'.simple-keyboard'" }, "value": ".simple-keyboard" } ], "leadingComments": null }, "property": { "type": "Identifier", "start": 871, "end": 889, "loc": { "start": { "line": 40, "column": 47 }, "end": { "line": 40, "column": 65 }, "identifierName": "insertAdjacentHTML" }, "name": "insertAdjacentHTML" }, "computed": false, "leadingComments": null }, "arguments": [ { "type": "StringLiteral", "start": 890, "end": 903, "loc": { "start": { "line": 40, "column": 66 }, "end": { "line": 40, "column": 79 } }, "extra": { "rawValue": "beforebegin", "raw": "'beforebegin'" }, "value": "beforebegin" }, { "type": "TemplateLiteral", "start": 905, "end": 1011, "loc": { "start": { "line": 40, "column": 81 }, "end": { "line": 44, "column": 5 } }, "expressions": [], "quasis": [ { "type": "TemplateElement", "start": 906, "end": 1010, "loc": { "start": { "line": 40, "column": 82 }, "end": { "line": 44, "column": 4 } }, "value": { "raw": "\n