awv3
Version:
AWV client CAD framework
1,394 lines (1,393 loc) • 977 kB
JSON
{
"type": "Program",
"start": 0,
"end": 8476,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 199,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 55,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 55
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 9,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 15
}
},
"imported": {
"type": "Identifier",
"start": 9,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 15
}
},
"name": "Plugin"
},
"local": {
"type": "Identifier",
"start": 9,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 15
}
},
"name": "Plugin"
}
},
{
"type": "ImportSpecifier",
"start": 17,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 24
}
},
"imported": {
"type": "Identifier",
"start": 17,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 24
}
},
"name": "Element"
},
"local": {
"type": "Identifier",
"start": 17,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 24
}
},
"name": "Element"
}
},
{
"type": "ImportSpecifier",
"start": 26,
"end": 35,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 35
}
},
"imported": {
"type": "Identifier",
"start": 26,
"end": 35,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 35
}
},
"name": "Selection"
},
"local": {
"type": "Identifier",
"start": 26,
"end": 35,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 35
}
},
"name": "Selection"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 43,
"end": 54,
"loc": {
"start": {
"line": 1,
"column": 43
},
"end": {
"line": 1,
"column": 54
}
},
"value": "../plugin",
"rawValue": "../plugin",
"raw": "'../plugin'"
},
"trailingComments": [
{
"type": "Block",
"value": "* Integration manages plugins. It is the M(odel) in M(odel)VM(Viewmodel). This class can be reflected by any\n MVM framework such as React, Angular, Vue and others. Both Integration and Plugins keep critical data from leaking\n by relying on internals under this.* and modeldata under this.data.",
"start": 57,
"end": 360,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 5,
"column": 73
}
},
"range": [
57,
360
]
}
]
},
{
"type": "ExportDefaultDeclaration",
"start": 361,
"end": 8475,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 198,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 376,
"end": 8475,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 198,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 382,
"end": 393,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 32
}
},
"name": "Integration",
"leadingComments": null
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 394,
"end": 8475,
"loc": {
"start": {
"line": 6,
"column": 33
},
"end": {
"line": 198,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 1066,
"end": 2141,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 45,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 1066,
"end": 1077,
"loc": {
"start": {
"line": 17,
"column": 4
},
"end": {
"line": 17,
"column": 15
}
},
"name": "constructor",
"leadingComments": null
},
"static": false,
"kind": "constructor",
"value": {
"type": "FunctionExpression",
"start": 1077,
"end": 2141,
"loc": {
"start": {
"line": 17,
"column": 15
},
"end": {
"line": 45,
"column": 5
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "AssignmentPattern",
"start": 1078,
"end": 1090,
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 17,
"column": 28
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 1078,
"end": 1085,
"loc": {
"start": {
"line": 17,
"column": 16
},
"end": {
"line": 17,
"column": 23
}
},
"name": "options"
},
"right": {
"type": "ObjectExpression",
"start": 1088,
"end": 1090,
"loc": {
"start": {
"line": 17,
"column": 26
},
"end": {
"line": 17,
"column": 28
}
},
"properties": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 1092,
"end": 2141,
"loc": {
"start": {
"line": 17,
"column": 30
},
"end": {
"line": 45,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 1103,
"end": 1121,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 26
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1103,
"end": 1120,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 25
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 1103,
"end": 1115,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 1103,
"end": 1107,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 1108,
"end": 1115,
"loc": {
"start": {
"line": 19,
"column": 13
},
"end": {
"line": 19,
"column": 20
}
},
"name": "plugins"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 1118,
"end": 1120,
"loc": {
"start": {
"line": 19,
"column": 23
},
"end": {
"line": 19,
"column": 25
}
},
"properties": []
}
}
},
{
"type": "IfStatement",
"start": 1131,
"end": 1239,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 22,
"column": 89
}
},
"test": {
"type": "UnaryExpression",
"start": 1135,
"end": 1148,
"loc": {
"start": {
"line": 21,
"column": 12
},
"end": {
"line": 21,
"column": 25
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "MemberExpression",
"start": 1136,
"end": 1148,
"loc": {
"start": {
"line": 21,
"column": 13
},
"end": {
"line": 21,
"column": 25
}
},
"object": {
"type": "Identifier",
"start": 1136,
"end": 1143,
"loc": {
"start": {
"line": 21,
"column": 13
},
"end": {
"line": 21,
"column": 20
}
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 1144,
"end": 1148,
"loc": {
"start": {
"line": 21,
"column": 21
},
"end": {
"line": 21,
"column": 25
}
},
"name": "view"
},
"computed": false
}
},
"consequent": {
"type": "ThrowStatement",
"start": 1162,
"end": 1239,
"loc": {
"start": {
"line": 22,
"column": 12
},
"end": {
"line": 22,
"column": 89
}
},
"argument": {
"type": "Literal",
"start": 1168,
"end": 1237,
"loc": {
"start": {
"line": 22,
"column": 18
},
"end": {
"line": 22,
"column": 87
}
},
"value": "Integration needs a view passed in: new Integration({ view: ... })!",
"rawValue": "Integration needs a view passed in: new Integration({ view: ... })!",
"raw": "\"Integration needs a view passed in: new Integration({ view: ... })!\"",
"parenthesizedExpression": true
}
},
"alternate": null
},
{
"type": "ExpressionStatement",
"start": 1249,
"end": 1274,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 33
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1249,
"end": 1273,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 32
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 1249,
"end": 1258,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 17
}
},
"object": {
"type": "ThisExpression",
"start": 1249,
"end": 1253,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 1254,
"end": 1258,
"loc": {
"start": {
"line": 24,
"column": 13
},
"end": {
"line": 24,
"column": 17
}
},
"name": "view"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 1261,
"end": 1273,
"loc": {
"start": {
"line": 24,
"column": 20
},
"end": {
"line": 24,
"column": 32
}
},
"object": {
"type": "Identifier",
"start": 1261,
"end": 1268,
"loc": {
"start": {
"line": 24,
"column": 20
},
"end": {
"line": 24,
"column": 27
}
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 1269,
"end": 1273,
"loc": {
"start": {
"line": 24,
"column": 28
},
"end": {
"line": 24,
"column": 32
}
},
"name": "view"
},
"computed": false
}
}
},
{
"type": "ExpressionStatement",
"start": 1283,
"end": 1314,
"loc": {
"start": {
"line": 25,
"column": 8
},
"end": {
"line": 25,
"column": 39
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1283,
"end": 1313,
"loc": {
"start": {
"line": 25,
"column": 8
},
"end": {
"line": 25,
"column": 38
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 1283,
"end": 1294,
"loc": {
"start": {
"line": 25,
"column": 8
},
"end": {
"line": 25,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 1283,
"end": 1287,
"loc": {
"start": {
"line": 25,
"column": 8
},
"end": {
"line": 25,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 1288,
"end": 1294,
"loc": {
"start": {
"line": 25,
"column": 13
},
"end": {
"line": 25,
"column": 19
}
},
"name": "canvas"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 1297,
"end": 1313,
"loc": {
"start": {
"line": 25,
"column": 22
},
"end": {
"line": 25,
"column": 38
}
},
"object": {
"type": "MemberExpression",
"start": 1297,
"end": 1306,
"loc": {
"start": {
"line": 25,
"column": 22
},
"end": {
"line": 25,
"column": 31
}
},
"object": {
"type": "ThisExpression",
"start": 1297,
"end": 1301,
"loc": {
"start": {
"line": 25,
"column": 22
},
"end": {
"line": 25,
"column": 26
}
}
},
"property": {
"type": "Identifier",
"start": 1302,
"end": 1306,
"loc": {
"start": {
"line": 25,
"column": 27
},
"end": {
"line": 25,
"column": 31
}
},
"name": "view"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 1307,
"end": 1313,
"loc": {
"start": {
"line": 25,
"column": 32
},
"end": {
"line": 25,
"column": 38
}
},
"name": "canvas"
},
"computed": false
}
}
},
{
"type": "ExpressionStatement",
"start": 1323,
"end": 1369,
"loc": {
"start": {
"line": 26,
"column": 8
},
"end": {
"line": 26,
"column": 54
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1323,
"end": 1368,
"loc": {
"start": {
"line": 26,
"column": 8
},
"end": {
"line": 26,
"column": 53
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 1323,
"end": 1337,
"loc": {
"start": {
"line": 26,
"column": 8
},
"end": {
"line": 26,
"column": 22
}
},
"object": {
"type": "ThisExpression",
"start": 1323,
"end": 1327,
"loc": {
"start": {
"line": 26,
"column": 8
},
"end": {
"line": 26,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 1328,
"end": 1337,
"loc": {
"start": {
"line": 26,
"column": 13
},
"end": {
"line": 26,
"column": 22
}
},
"name": "selection"
},
"computed": false
},
"right": {
"type": "NewExpression",
"start": 1340,
"end": 1368,
"loc": {
"start": {
"line": 26,
"column": 25
},
"end": {
"line": 26,
"column": 53
}
},
"callee": {
"type": "Identifier",
"start": 1344,
"end": 1353,
"loc": {
"start": {
"line": 26,
"column": 29
},
"end": {
"line": 26,
"column": 38
}
},
"name": "Selection"
},
"arguments": [
{
"type": "ThisExpression",
"start": 1354,
"end": 1358,
"loc": {
"start": {
"line": 26,
"column": 39
},
"end": {
"line": 26,
"column": 43
}
}
},
{
"type": "Identifier",
"start": 1360,
"end": 1367,
"loc": {
"start": {
"line": 26,
"column": 45
},
"end": {
"line": 26,
"column": 52
}
},
"name": "options"
}
]
}
}
},
{
"type": "IfStatement",
"start": 1379,
"end": 1808,
"loc": {
"start": {
"line": 28,
"column": 8
},
"end": {
"line": 34,
"column": 9
}
},
"test": {
"type": "MemberExpression",
"start": 1383,
"end": 1397,
"loc": {
"start": {
"line": 28,
"column": 12
},
"end": {
"line": 28,
"column": 26
}
},
"object": {
"type": "Identifier",
"start": 1383,
"end": 1390,
"loc": {
"start": {
"line": 28,
"column": 12
},
"end": {
"line": 28,
"column": 19
}
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 1391,
"end": 1397,
"loc": {
"start": {
"line": 28,
"column": 20
},
"end": {
"line": 28,
"column": 26
}
},
"name": "socket"
},
"computed": false
},
"consequent": {
"type": "BlockStatement",
"start": 1399,
"end": 1808,
"loc": {
"start": {
"line": 28,
"column": 28
},
"end": {
"line": 34,
"column": 9
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 1413,
"end": 1442,
"loc": {
"start": {
"line": 29,
"column": 12
},
"end": {
"line": 29,
"column": 41
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1413,
"end": 1441,
"loc": {
"start": {
"line": 29,
"column": 12
},
"end": {
"line": 29,
"column": 40
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 1413,
"end": 1424,
"loc": {
"start": {
"line": 29,
"column": 12
},
"end": {
"line": 29,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 1413,
"end": 1417,
"loc": {
"start": {
"line": 29,
"column": 12
},
"end": {
"line": 29,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 1418,
"end": 1424,
"loc": {
"start": {
"line": 29,
"column": 17
},
"end": {
"line": 29,
"column": 23
}
},
"name": "socket"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 1427,
"end": 1441,
"loc": {
"start": {
"line": 29,
"column": 26
},
"end": {
"line": 29,
"column": 40
}
},
"object": {
"type": "Identifier",
"start": 1427,
"end": 1434,
"loc": {
"start": {
"line": 29,
"column": 26
},
"end": {
"line": 29,
"column": 33
}
},
"name": "options"
},
"property": {
"type": "Identifier",
"start": 1435,
"end": 1441,
"loc": {
"start": {
"line": 29,
"column": 34
},
"end": {
"line": 29,
"column": 40
}
},
"name": "socket"
},
"computed": false
}
}
},
{
"type": "ExpressionStatement",
"start": 1455,
"end": 1618,
"loc": {
"start": {
"line": 30,
"column": 12
},
"end": {
"line": 31,
"column": 121
}
},
"expression": {
"type": "CallExpression",
"start": 1455,
"end": 1617,
"loc": {
"start": {
"line": 30,
"column": 12
},
"end": {
"line": 31,
"column": 120
}
},
"callee": {
"type": "MemberExpression",
"start": 1455,
"end": 1469,
"loc": {
"start": {
"line": 30,
"column": 12
},
"end": {
"line": 30,
"column": 26
}
},
"object": {
"type": "MemberExpression",
"start": 1455,
"end": 1466,
"loc": {
"start": {
"line": 30,
"column": 12
},
"end": {
"line": 30,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 1455,
"end": 1459,
"loc": {
"start": {
"line": 30,
"column": 12
},
"end": {
"line": 30,
"column": 16
}
}
},
"property": {
"type": "Identifier",
"start": 1460,
"end": 1466,
"loc": {
"start": {
"line": 30,
"column": 17
},
"end": {
"line": 30,
"column": 23
}
},
"name": "socket"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 1467,
"end": 1469,
"loc": {
"start": {
"line": 30,
"column": 24
},
"end": {
"line": 30,
"column": 26
}
},
"name": "on"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 1470,
"end": 1481,
"loc": {
"start": {
"line": 30,
"column": 27
},
"end": {
"line": 30,
"column": 38
}
},
"value": "connected",
"rawValue": "connected",
"raw": "'connected'"
},
{
"type": "ArrowFunctionExpression",
"start": 1483,
"end": 1616,
"loc": {
"start": {
"line": 30,
"column": 40
},
"end": {
"line": 31,
"column": 119
}
},
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [
{
"type": "Identifier",
"start": 1483,
"end": 1493,
"loc": {
"start": {
"line": 30,
"column": 40
},
"end": {
"line": 30,
"column": 50
}
},
"name": "connection"
}
],
"body": {