@xailabs/altx
Version:
Flux flavor based on alt.js
1,561 lines • 339 kB
JSON
{
"type": "File",
"start": 0,
"end": 2002,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 66,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 2002,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 66,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 46,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 46
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 8,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 12
}
},
"imported": {
"type": "Identifier",
"start": 8,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 12
},
"identifierName": "bind"
},
"name": "bind"
},
"local": {
"type": "Identifier",
"start": 8,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 12
},
"identifierName": "bind"
},
"name": "bind"
}
}
],
"source": {
"type": "StringLiteral",
"start": 19,
"end": 45,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 45
}
},
"extra": {
"rawValue": "alt-utils/lib/decorators",
"raw": "'alt-utils/lib/decorators'"
},
"value": "alt-utils/lib/decorators"
}
},
{
"type": "ImportDeclaration",
"start": 48,
"end": 87,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 39
}
},
"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
},
"identifierName": "flatten"
},
"name": "flatten"
}
}
],
"source": {
"type": "StringLiteral",
"start": 68,
"end": 86,
"loc": {
"start": {
"line": 2,
"column": 20
},
"end": {
"line": 2,
"column": 38
}
},
"extra": {
"rawValue": "../utils/flatten",
"raw": "'../utils/flatten'"
},
"value": "../utils/flatten"
}
},
{
"type": "ImportDeclaration",
"start": 89,
"end": 156,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 67
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 97,
"end": 120,
"loc": {
"start": {
"line": 3,
"column": 8
},
"end": {
"line": 3,
"column": 31
}
},
"imported": {
"type": "Identifier",
"start": 97,
"end": 105,
"loc": {
"start": {
"line": 3,
"column": 8
},
"end": {
"line": 3,
"column": 16
},
"identifierName": "getLevel"
},
"name": "getLevel"
},
"local": {
"type": "Identifier",
"start": 109,
"end": 120,
"loc": {
"start": {
"line": 3,
"column": 20
},
"end": {
"line": 3,
"column": 31
},
"identifierName": "getLogLevel"
},
"name": "getLogLevel"
}
},
{
"type": "ImportSpecifier",
"start": 122,
"end": 130,
"loc": {
"start": {
"line": 3,
"column": 33
},
"end": {
"line": 3,
"column": 41
}
},
"imported": {
"type": "Identifier",
"start": 122,
"end": 130,
"loc": {
"start": {
"line": 3,
"column": 33
},
"end": {
"line": 3,
"column": 41
},
"identifierName": "logLevel"
},
"name": "logLevel"
},
"local": {
"type": "Identifier",
"start": 122,
"end": 130,
"loc": {
"start": {
"line": 3,
"column": 33
},
"end": {
"line": 3,
"column": 41
},
"identifierName": "logLevel"
},
"name": "logLevel"
}
}
],
"source": {
"type": "StringLiteral",
"start": 137,
"end": 155,
"loc": {
"start": {
"line": 3,
"column": 48
},
"end": {
"line": 3,
"column": 66
}
},
"extra": {
"rawValue": "../utils/logging",
"raw": "'../utils/logging'"
},
"value": "../utils/logging"
},
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Decorates a store with any number of viewAction definitions.\r\n ",
"start": 160,
"end": 233,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 7,
"column": 3
}
}
}
]
},
{
"type": "ExportDefaultDeclaration",
"start": 235,
"end": 475,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 14,
"column": 1
}
},
"declaration": {
"type": "FunctionDeclaration",
"start": 250,
"end": 475,
"loc": {
"start": {
"line": 8,
"column": 15
},
"end": {
"line": 14,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 259,
"end": 270,
"loc": {
"start": {
"line": 8,
"column": 24
},
"end": {
"line": 8,
"column": 35
},
"identifierName": "bindActions"
},
"name": "bindActions",
"leadingComments": null
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "RestElement",
"start": 271,
"end": 278,
"loc": {
"start": {
"line": 8,
"column": 36
},
"end": {
"line": 8,
"column": 43
}
},
"argument": {
"type": "Identifier",
"start": 274,
"end": 278,
"loc": {
"start": {
"line": 8,
"column": 39
},
"end": {
"line": 8,
"column": 43
},
"identifierName": "args"
},
"name": "args"
}
}
],
"body": {
"type": "BlockStatement",
"start": 280,
"end": 475,
"loc": {
"start": {
"line": 8,
"column": 45
},
"end": {
"line": 14,
"column": 1
}
},
"body": [
{
"type": "ReturnStatement",
"start": 287,
"end": 472,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 13,
"column": 6
}
},
"argument": {
"type": "FunctionExpression",
"start": 294,
"end": 471,
"loc": {
"start": {
"line": 9,
"column": 11
},
"end": {
"line": 13,
"column": 5
}
},
"id": {
"type": "Identifier",
"start": 303,
"end": 311,
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 28
},
"identifierName": "decorate"
},
"name": "decorate"
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 312,
"end": 322,
"loc": {
"start": {
"line": 9,
"column": 29
},
"end": {
"line": 9,
"column": 39
},
"identifierName": "storeClass"
},
"name": "storeClass"
}
],
"body": {
"type": "BlockStatement",
"start": 324,
"end": 471,
"loc": {
"start": {
"line": 9,
"column": 41
},
"end": {
"line": 13,
"column": 5
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 335,
"end": 363,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 36
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 341,
"end": 362,
"loc": {
"start": {
"line": 10,
"column": 14
},
"end": {
"line": 10,
"column": 35
}
},
"id": {
"type": "Identifier",
"start": 341,
"end": 346,
"loc": {
"start": {
"line": 10,
"column": 14
},
"end": {
"line": 10,
"column": 19
},
"identifierName": "calls"
},
"name": "calls"
},
"init": {
"type": "CallExpression",
"start": 349,
"end": 362,
"loc": {
"start": {
"line": 10,
"column": 22
},
"end": {
"line": 10,
"column": 35
}
},
"callee": {
"type": "Identifier",
"start": 349,
"end": 356,
"loc": {
"start": {
"line": 10,
"column": 22
},
"end": {
"line": 10,
"column": 29
},
"identifierName": "flatten"
},
"name": "flatten"
},
"arguments": [
{
"type": "Identifier",
"start": 357,
"end": 361,
"loc": {
"start": {
"line": 10,
"column": 30
},
"end": {
"line": 10,
"column": 34
},
"identifierName": "args"
},
"name": "args"
}
]
}
}
],
"kind": "const"
},
{
"type": "ExpressionStatement",
"start": 373,
"end": 436,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 71
}
},
"expression": {
"type": "CallExpression",
"start": 373,
"end": 435,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 70
}
},
"callee": {
"type": "MemberExpression",
"start": 373,
"end": 386,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 21
}
},
"object": {
"type": "Identifier",
"start": 373,
"end": 378,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 13
},
"identifierName": "calls"
},
"name": "calls"
},
"property": {
"type": "Identifier",
"start": 379,
"end": 386,
"loc": {
"start": {
"line": 11,
"column": 14
},
"end": {
"line": 11,
"column": 21
},
"identifierName": "forEach"
},
"name": "forEach"
},
"computed": false
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 387,
"end": 434,
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 69
}
},
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [
{
"type": "Identifier",
"start": 387,
"end": 391,
"loc": {
"start": {
"line": 11,
"column": 22
},
"end": {
"line": 11,
"column": 26
},
"identifierName": "call"
},
"name": "call"
}
],
"body": {
"type": "CallExpression",
"start": 395,
"end": 434,
"loc": {
"start": {
"line": 11,
"column": 30
},
"end": {
"line": 11,
"column": 69
}
},
"callee": {
"type": "Identifier",
"start": 395,
"end": 416,
"loc": {
"start": {
"line": 11,
"column": 30
},
"end": {
"line": 11,
"column": 51
},
"identifierName": "bindViewActionHandler"
},
"name": "bindViewActionHandler"
},
"arguments": [
{
"type": "Identifier",
"start": 417,
"end": 427,
"loc": {
"start": {
"line": 11,
"column": 52
},
"end": {
"line": 11,
"column": 62
},
"identifierName": "storeClass"
},
"name": "storeClass"
},
{
"type": "Identifier",
"start": 429,
"end": 433,
"loc": {
"start": {
"line": 11,
"column": 64
},
"end": {
"line": 11,
"column": 68
},
"identifierName": "call"
},
"name": "call"
}
]
}
}
]
}
},
{
"type": "ReturnStatement",
"start": 446,
"end": 464,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 26
}
},
"argument": {
"type": "Identifier",
"start": 453,
"end": 463,
"loc": {
"start": {
"line": 12,
"column": 15
},
"end": {
"line": 12,
"column": 25
},
"identifierName": "storeClass"
},
"name": "storeClass"
}
}
],
"directives": []
}
}
}
],
"directives": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Decorates a store with any number of viewAction definitions.\r\n ",
"start": 160,
"end": 233,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 7,
"column": 3
}
}
}
],
"trailingComments": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Decorates a store with any number of viewAction definitions.\r\n ",
"start": 160,
"end": 233,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 7,
"column": 3
}
}
}
]
},
{
"type": "FunctionDeclaration",
"start": 481,
"end": 1999,
"loc": {
"start": {
"line": 17,
"column": 0
},
"end": {
"line": 65,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 490,
"end": 511,
"loc": {
"start": {
"line": 17,
"column": 9
},
"end": {
"line": 17,
"column": 30
},
"identifierName": "bindViewActionHandler"
},
"name": "bindViewActionHandler"
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 512,
"end": 522,
"loc": {
"start": {
"line": 17,
"column": 31
},
"end": {
"line": 17,
"column": 41
},
"identifierName": "storeClass"
},
"name": "storeClass"
},
{
"type": "Identifier",
"start": 524,
"end": 534,
"loc": {
"start": {
"line": 17,
"column": 43
},
"end": {
"line": 17,
"column": 53
},
"identifierName": "definition"
},
"name": "definition"
}
],
"body": {
"type": "BlockStatement",
"start": 536,
"end": 1999,
"loc": {
"start": {
"line": 17,
"column": 55
},
"end": {
"line": 65,
"column": 1
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 545,
"end": 617,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 76
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 551,
"end": 616,
"loc": {
"start": {
"line": 19,
"column": 10
},
"end": {
"line": 19,
"column": 75
}
},
"id": {
"type": "ObjectPattern",
"start": 551,
"end": 603,
"loc": {
"start": {
"line": 19,
"column": 10
},
"end": {
"line": 19,
"column": 62
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 552,
"end": 556,
"loc": {
"start": {
"line": 19,
"column": 11
},
"end": {
"line": 19,
"column": 15
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 552,
"end": 556,
"loc": {
"start": {
"line": 19,
"column": 11
},
"end": {
"line": 19,
"column": 15
},
"identifierName": "name"
},
"name": "name"
},
"value": {
"type": "Identifier",
"start": 552,
"end": 556,
"loc": {
"start": {
"line": 19,
"column": 11
},
"end": {
"line": 19,
"column": 15
},
"identifierName": "name"
},
"name": "name"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 558,
"end": 564,
"loc": {
"start": {
"line": 19,
"column": 17
},
"end": {
"line": 19,
"column": 23
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 558,
"end": 564,
"loc": {
"start": {
"line": 19,
"column": 17
},
"end": {
"line": 19,
"column": 23
},
"identifierName": "action"
},
"name": "action"
},
"value": {
"type": "Identifier",
"start": 558,
"end": 564,
"loc": {
"start": {
"line": 19,
"column": 17
},
"end": {
"line": 19,
"column": 23
},
"identifierName": "action"
},
"name": "action"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 566,
"end": 573,
"loc": {
"start": {
"line": 19,
"column": 25
},
"end": {
"line": 19,
"column": 32
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 566,
"end": 573,
"loc": {
"start": {
"line": 19,
"column": 25
},
"end": {
"line": 19,
"column": 32
},
"identifierName": "reducer"
},
"name": "reducer"
},
"value": {
"type": "Identifier",
"start": 566,
"end": 573,
"loc": {
"start": {
"line": 19,
"column": 25
},
"end": {
"line": 19,
"column": 32
},
"identifierName": "reducer"
},
"name": "reducer"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 575,
"end": 585,
"loc": {
"start": {
"line": 19,
"column": 34
},
"end": {
"line": 19,
"column": 44
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 575,
"end": 585,
"loc": {
"start": {
"line": 19,
"column": 34
},
"end": {
"line": 19,
"column": 44
},
"identifierName": "sideEffect"
},
"name": "sideEffect"
},
"value": {
"type": "Identifier",
"start": 575,
"end": 585,
"loc": {
"start": {
"line": 19,
"column": 34
},
"end": {
"line": 19,
"column": 44
},
"identifierName": "sideEffect"
},
"name": "sideEffect"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 587,
"end": 593,
"loc": {
"start": {
"line": 19,
"column": 46
},
"end": {
"line": 19,
"column": 52
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 587,
"end": 593,
"loc": {
"start": {
"line": 19,
"column": 46
},
"end": {
"line": 19,
"column": 52
},
"identifierName": "logger"
},
"name": "logger"
},
"value": {
"type": "Identifier",
"start": 587,
"end": 593,
"loc": {
"start": {
"line": 19,
"column": 46
},
"end": {
"line": 19,
"column": 52
},
"identifierName": "logger"
},
"name": "logger"
},
"extra": {
"shorthand": true
}
},
{
"type": "ObjectProperty",
"start": 595,
"end": 602,
"loc": {
"start": {
"line": 19,
"column": 54
},
"end": {
"line": 19,
"column": 61
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 595,
"end": 602,
"loc": {
"start": {
"line": 19,
"column": 54
},
"end": {
"line": 19,
"column": 61
},
"identifierName": "logging"
},
"name": "logging"
},
"value": {
"type": "Identifier",
"start": 595,
"end": 602,
"loc": {
"start": {
"line": 19,
"column": 54
},
"end": {
"line": 19,
"column": 61
},
"identifierName": "logging"
},
"name": "logging"
},
"extra": {
"shorthand": true
}
}
]
},
"init": {
"type": "Identifier",
"start": 606,
"end": 616,
"loc": {
"start": {
"line": 19,
"column": 65
},
"end": {
"line": 19,
"column": 75
},
"identifierName": "definition"
},
"name": "definition"
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 625,
"end": 655,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 34
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 631,
"end": 654,
"loc": {
"start": {
"line": 21,
"column": 10
},
"end": {
"line": 21,
"column": 33
}
},
"id": {
"type": "Identifier",
"start": 631,
"end": 642,
"loc": {
"start": {
"line": 21,
"column": 10
},
"end": {
"line": 21,
"column": 21
},
"identifierName": "handlerName"
},
"name": "handlerName"
},
"init": {
"type": "TemplateLiteral",
"start": 645,
"end": 654,
"loc": {
"start": {
"line": 21,
"column": 24
},
"end": {
"line": 21,
"column": 33
}
},
"expressions": [
{
"type": "Identifier",
"start": 648,
"end": 652,
"loc": {
"start": {
"line": 21,
"column": 27
},
"end": {
"line": 21,
"column": 31
},
"identifierName": "name"
},
"name": "name"
}
],
"quasis": [
{
"type": "TemplateElement",
"start": 646,
"end": 646,
"loc": {
"start": {
"line": 21,
"column": 25
},
"end": {
"line": 21,
"column": 25
}
},
"value": {
"raw": "",
"cooked": ""
},
"tail": false
},
{
"type": "TemplateElement",
"start": 653,
"end": 653,
"loc": {
"start": {
"line": 21,
"column": 32
},
"end": {
"line": 21,
"column": 32
}
},
"value": {
"raw": "",
"cooked": ""
},
"tail": true
}
]
}
}
],
"kind": "const"
},
{
"type": "IfStatement",
"start": 663,
"end": 756,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 23,
"column": 97
}
},
"test": {
"type": "MemberExpression",
"start": 667,
"end": 700,
"loc": {
"start": {
"line": 23,
"column": 8
},
"end": {
"line": 23,
"column": 41
}
},
"object": {
"type": "MemberExpression",
"start": 667,
"end": 687,
"loc": {
"start": {
"line": 23,
"column": 8
},
"end": {
"line": 23,
"column": 28
}
},
"object": {
"type": "Identifier",
"start": 667,
"end": 677,
"loc": {
"start": {
"line": 23,
"column": 8
},
"end": {
"line": 23,
"column": 18
},
"identifierName": "storeClass"
},
"name": "storeClass"
},
"property": {
"type": "Identifier",
"start": 678,
"end": 687,
"loc": {
"start": {
"line": 23,
"col