@elyx-code/project-logic-tree 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/dist/index.js +18628 -16939
  2. package/dist/index.umd.cjs +247 -184
  3. package/dist/tree/state/argument-declaration/validation/validation-schema.d.ts +8 -8
  4. package/dist/tree/state/break-statement/validation/validation-schema.d.ts +32 -32
  5. package/dist/tree/state/condition/validation/validation-schema.d.ts +48 -48
  6. package/dist/tree/state/continue-statement/validation/validation-schema.d.ts +32 -32
  7. package/dist/tree/state/function-call/validation/validation-schema.d.ts +56 -56
  8. package/dist/tree/state/global-event/validation/validation-schema.d.ts +8 -8
  9. package/dist/tree/state/index.d.ts +34 -28
  10. package/dist/tree/state/input-map/validation/validation-schema.d.ts +64 -64
  11. package/dist/tree/state/internal-call/validation/validation-schema.d.ts +56 -56
  12. package/dist/tree/state/loop/validation/validation-schema.d.ts +48 -48
  13. package/dist/tree/state/operation/validation/validation-schema.d.ts +56 -56
  14. package/dist/tree/state/output-map/validation/validation-schema.d.ts +72 -72
  15. package/dist/tree/state/return-declaration/validation/validation-schema.d.ts +16 -16
  16. package/dist/tree/state/return-statement/validation/validation-schema.d.ts +32 -32
  17. package/dist/tree/state/search/validation/validation-schema.d.ts +48 -48
  18. package/dist/tree/state/types/index.d.ts +1 -0
  19. package/dist/tree/state/variable-declaration/validation/validation-schema.d.ts +64 -64
  20. package/dist/tree/state/variable-instance/validation/validation-schema.d.ts +64 -64
  21. package/dist/tree/utils/index.d.ts +1 -1
  22. package/package.json +1 -1
@@ -839,11 +839,6 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
839
839
  type: EntityType.VariableDeclaration;
840
840
  };
841
841
  calledBySuccess: ({
842
- id: string;
843
- type: EntityType.GenericReference;
844
- entityType: EntityType.Loop;
845
- entityId: string;
846
- } | {
847
842
  id: string;
848
843
  type: EntityType.GenericReference;
849
844
  entityType: EntityType.Operation;
@@ -878,13 +873,13 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
878
873
  type: EntityType.GenericReference;
879
874
  entityType: EntityType.InternalCall;
880
875
  entityId: string;
881
- })[];
882
- calledByError: ({
876
+ } | {
883
877
  id: string;
884
878
  type: EntityType.GenericReference;
885
879
  entityType: EntityType.Loop;
886
880
  entityId: string;
887
- } | {
881
+ })[];
882
+ calledByError: ({
888
883
  id: string;
889
884
  type: EntityType.GenericReference;
890
885
  entityType: EntityType.Operation;
@@ -919,6 +914,11 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
919
914
  type: EntityType.GenericReference;
920
915
  entityType: EntityType.InternalCall;
921
916
  entityId: string;
917
+ } | {
918
+ id: string;
919
+ type: EntityType.GenericReference;
920
+ entityType: EntityType.Loop;
921
+ entityId: string;
922
922
  })[];
923
923
  calledByEntry: ({
924
924
  id: string;
@@ -953,13 +953,13 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
953
953
  entityId: string;
954
954
  };
955
955
  readsValue: Record<string, any> | {
956
- type: EntityType.OutputMap;
957
- } | {
958
956
  type: EntityType.VariableDeclaration;
959
957
  } | {
960
958
  type: EntityType.VariableInstance;
961
959
  } | {
962
960
  type: EntityType.ArgumentDeclaration;
961
+ } | {
962
+ type: EntityType.OutputMap;
963
963
  } | {
964
964
  type: EntityType.Operation;
965
965
  } | {
@@ -976,7 +976,7 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
976
976
  successCalls: ({
977
977
  id: string;
978
978
  type: EntityType.GenericReference;
979
- entityType: EntityType.Loop;
979
+ entityType: EntityType.ReturnStatement;
980
980
  entityId: string;
981
981
  } | {
982
982
  id: string;
@@ -1016,7 +1016,7 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
1016
1016
  } | {
1017
1017
  id: string;
1018
1018
  type: EntityType.GenericReference;
1019
- entityType: EntityType.ReturnStatement;
1019
+ entityType: EntityType.Loop;
1020
1020
  entityId: string;
1021
1021
  } | {
1022
1022
  id: string;
@@ -1032,7 +1032,7 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
1032
1032
  errorCalls: ({
1033
1033
  id: string;
1034
1034
  type: EntityType.GenericReference;
1035
- entityType: EntityType.Loop;
1035
+ entityType: EntityType.ReturnStatement;
1036
1036
  entityId: string;
1037
1037
  } | {
1038
1038
  id: string;
@@ -1072,7 +1072,7 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
1072
1072
  } | {
1073
1073
  id: string;
1074
1074
  type: EntityType.GenericReference;
1075
- entityType: EntityType.ReturnStatement;
1075
+ entityType: EntityType.Loop;
1076
1076
  entityId: string;
1077
1077
  } | {
1078
1078
  id: string;
@@ -1089,13 +1089,13 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
1089
1089
  type: EntityType.DataType;
1090
1090
  } | null;
1091
1091
  writesValues: (Record<string, any> | {
1092
- type: EntityType.InputMap;
1093
- } | {
1094
1092
  type: EntityType.ReturnDeclaration;
1095
1093
  } | {
1096
1094
  type: EntityType.VariableDeclaration;
1097
1095
  } | {
1098
1096
  type: EntityType.VariableInstance;
1097
+ } | {
1098
+ type: EntityType.InputMap;
1099
1099
  })[];
1100
1100
  internalCalls: (Record<string, any> | {
1101
1101
  type: EntityType.InternalCall;
@@ -1105,11 +1105,6 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
1105
1105
  type: EntityType.VariableDeclaration;
1106
1106
  };
1107
1107
  calledBySuccess: ({
1108
- id: string;
1109
- type: EntityType.GenericReference;
1110
- entityType: EntityType.Loop;
1111
- entityId: string;
1112
- } | {
1113
1108
  id: string;
1114
1109
  type: EntityType.GenericReference;
1115
1110
  entityType: EntityType.Operation;
@@ -1144,13 +1139,13 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
1144
1139
  type: EntityType.GenericReference;
1145
1140
  entityType: EntityType.InternalCall;
1146
1141
  entityId: string;
1147
- })[];
1148
- calledByError: ({
1142
+ } | {
1149
1143
  id: string;
1150
1144
  type: EntityType.GenericReference;
1151
1145
  entityType: EntityType.Loop;
1152
1146
  entityId: string;
1153
- } | {
1147
+ })[];
1148
+ calledByError: ({
1154
1149
  id: string;
1155
1150
  type: EntityType.GenericReference;
1156
1151
  entityType: EntityType.Operation;
@@ -1185,6 +1180,11 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
1185
1180
  type: EntityType.GenericReference;
1186
1181
  entityType: EntityType.InternalCall;
1187
1182
  entityId: string;
1183
+ } | {
1184
+ id: string;
1185
+ type: EntityType.GenericReference;
1186
+ entityType: EntityType.Loop;
1187
+ entityId: string;
1188
1188
  })[];
1189
1189
  calledByEntry: ({
1190
1190
  id: string;
@@ -1219,13 +1219,13 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
1219
1219
  entityId: string;
1220
1220
  };
1221
1221
  readsValue: Record<string, any> | {
1222
- type: EntityType.OutputMap;
1223
- } | {
1224
1222
  type: EntityType.VariableDeclaration;
1225
1223
  } | {
1226
1224
  type: EntityType.VariableInstance;
1227
1225
  } | {
1228
1226
  type: EntityType.ArgumentDeclaration;
1227
+ } | {
1228
+ type: EntityType.OutputMap;
1229
1229
  } | {
1230
1230
  type: EntityType.Operation;
1231
1231
  } | {
@@ -1242,7 +1242,7 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
1242
1242
  successCalls: ({
1243
1243
  id: string;
1244
1244
  type: EntityType.GenericReference;
1245
- entityType: EntityType.Loop;
1245
+ entityType: EntityType.ReturnStatement;
1246
1246
  entityId: string;
1247
1247
  } | {
1248
1248
  id: string;
@@ -1282,7 +1282,7 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
1282
1282
  } | {
1283
1283
  id: string;
1284
1284
  type: EntityType.GenericReference;
1285
- entityType: EntityType.ReturnStatement;
1285
+ entityType: EntityType.Loop;
1286
1286
  entityId: string;
1287
1287
  } | {
1288
1288
  id: string;
@@ -1298,7 +1298,7 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
1298
1298
  errorCalls: ({
1299
1299
  id: string;
1300
1300
  type: EntityType.GenericReference;
1301
- entityType: EntityType.Loop;
1301
+ entityType: EntityType.ReturnStatement;
1302
1302
  entityId: string;
1303
1303
  } | {
1304
1304
  id: string;
@@ -1338,7 +1338,7 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
1338
1338
  } | {
1339
1339
  id: string;
1340
1340
  type: EntityType.GenericReference;
1341
- entityType: EntityType.ReturnStatement;
1341
+ entityType: EntityType.Loop;
1342
1342
  entityId: string;
1343
1343
  } | {
1344
1344
  id: string;
@@ -1355,13 +1355,13 @@ export declare function getVariableInstanceNestedEntitiesSchema(): z.ZodObject<{
1355
1355
  type: EntityType.DataType;
1356
1356
  } | null;
1357
1357
  writesValues: (Record<string, any> | {
1358
- type: EntityType.InputMap;
1359
- } | {
1360
1358
  type: EntityType.ReturnDeclaration;
1361
1359
  } | {
1362
1360
  type: EntityType.VariableDeclaration;
1363
1361
  } | {
1364
1362
  type: EntityType.VariableInstance;
1363
+ } | {
1364
+ type: EntityType.InputMap;
1365
1365
  })[];
1366
1366
  internalCalls: (Record<string, any> | {
1367
1367
  type: EntityType.InternalCall;
@@ -2151,11 +2151,6 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2151
2151
  type: EntityType.VariableDeclaration;
2152
2152
  };
2153
2153
  calledBySuccess: ({
2154
- id: string;
2155
- type: EntityType.GenericReference;
2156
- entityType: EntityType.Loop;
2157
- entityId: string;
2158
- } | {
2159
2154
  id: string;
2160
2155
  type: EntityType.GenericReference;
2161
2156
  entityType: EntityType.Operation;
@@ -2190,13 +2185,13 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2190
2185
  type: EntityType.GenericReference;
2191
2186
  entityType: EntityType.InternalCall;
2192
2187
  entityId: string;
2193
- })[];
2194
- calledByError: ({
2188
+ } | {
2195
2189
  id: string;
2196
2190
  type: EntityType.GenericReference;
2197
2191
  entityType: EntityType.Loop;
2198
2192
  entityId: string;
2199
- } | {
2193
+ })[];
2194
+ calledByError: ({
2200
2195
  id: string;
2201
2196
  type: EntityType.GenericReference;
2202
2197
  entityType: EntityType.Operation;
@@ -2231,6 +2226,11 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2231
2226
  type: EntityType.GenericReference;
2232
2227
  entityType: EntityType.InternalCall;
2233
2228
  entityId: string;
2229
+ } | {
2230
+ id: string;
2231
+ type: EntityType.GenericReference;
2232
+ entityType: EntityType.Loop;
2233
+ entityId: string;
2234
2234
  })[];
2235
2235
  calledByEntry: ({
2236
2236
  id: string;
@@ -2266,13 +2266,13 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2266
2266
  };
2267
2267
  version: number;
2268
2268
  readsValue: Record<string, any> | {
2269
- type: EntityType.OutputMap;
2270
- } | {
2271
2269
  type: EntityType.VariableDeclaration;
2272
2270
  } | {
2273
2271
  type: EntityType.VariableInstance;
2274
2272
  } | {
2275
2273
  type: EntityType.ArgumentDeclaration;
2274
+ } | {
2275
+ type: EntityType.OutputMap;
2276
2276
  } | {
2277
2277
  type: EntityType.Operation;
2278
2278
  } | {
@@ -2291,7 +2291,7 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2291
2291
  successCalls: ({
2292
2292
  id: string;
2293
2293
  type: EntityType.GenericReference;
2294
- entityType: EntityType.Loop;
2294
+ entityType: EntityType.ReturnStatement;
2295
2295
  entityId: string;
2296
2296
  } | {
2297
2297
  id: string;
@@ -2331,7 +2331,7 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2331
2331
  } | {
2332
2332
  id: string;
2333
2333
  type: EntityType.GenericReference;
2334
- entityType: EntityType.ReturnStatement;
2334
+ entityType: EntityType.Loop;
2335
2335
  entityId: string;
2336
2336
  } | {
2337
2337
  id: string;
@@ -2347,7 +2347,7 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2347
2347
  errorCalls: ({
2348
2348
  id: string;
2349
2349
  type: EntityType.GenericReference;
2350
- entityType: EntityType.Loop;
2350
+ entityType: EntityType.ReturnStatement;
2351
2351
  entityId: string;
2352
2352
  } | {
2353
2353
  id: string;
@@ -2387,7 +2387,7 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2387
2387
  } | {
2388
2388
  id: string;
2389
2389
  type: EntityType.GenericReference;
2390
- entityType: EntityType.ReturnStatement;
2390
+ entityType: EntityType.Loop;
2391
2391
  entityId: string;
2392
2392
  } | {
2393
2393
  id: string;
@@ -2404,13 +2404,13 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2404
2404
  type: EntityType.DataType;
2405
2405
  } | null;
2406
2406
  writesValues: (Record<string, any> | {
2407
- type: EntityType.InputMap;
2408
- } | {
2409
2407
  type: EntityType.ReturnDeclaration;
2410
2408
  } | {
2411
2409
  type: EntityType.VariableDeclaration;
2412
2410
  } | {
2413
2411
  type: EntityType.VariableInstance;
2412
+ } | {
2413
+ type: EntityType.InputMap;
2414
2414
  })[];
2415
2415
  internalCalls: (Record<string, any> | {
2416
2416
  type: EntityType.InternalCall;
@@ -2422,11 +2422,6 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2422
2422
  type: EntityType.VariableDeclaration;
2423
2423
  };
2424
2424
  calledBySuccess: ({
2425
- id: string;
2426
- type: EntityType.GenericReference;
2427
- entityType: EntityType.Loop;
2428
- entityId: string;
2429
- } | {
2430
2425
  id: string;
2431
2426
  type: EntityType.GenericReference;
2432
2427
  entityType: EntityType.Operation;
@@ -2461,13 +2456,13 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2461
2456
  type: EntityType.GenericReference;
2462
2457
  entityType: EntityType.InternalCall;
2463
2458
  entityId: string;
2464
- })[];
2465
- calledByError: ({
2459
+ } | {
2466
2460
  id: string;
2467
2461
  type: EntityType.GenericReference;
2468
2462
  entityType: EntityType.Loop;
2469
2463
  entityId: string;
2470
- } | {
2464
+ })[];
2465
+ calledByError: ({
2471
2466
  id: string;
2472
2467
  type: EntityType.GenericReference;
2473
2468
  entityType: EntityType.Operation;
@@ -2502,6 +2497,11 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2502
2497
  type: EntityType.GenericReference;
2503
2498
  entityType: EntityType.InternalCall;
2504
2499
  entityId: string;
2500
+ } | {
2501
+ id: string;
2502
+ type: EntityType.GenericReference;
2503
+ entityType: EntityType.Loop;
2504
+ entityId: string;
2505
2505
  })[];
2506
2506
  calledByEntry: ({
2507
2507
  id: string;
@@ -2537,13 +2537,13 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2537
2537
  };
2538
2538
  version: number;
2539
2539
  readsValue: Record<string, any> | {
2540
- type: EntityType.OutputMap;
2541
- } | {
2542
2540
  type: EntityType.VariableDeclaration;
2543
2541
  } | {
2544
2542
  type: EntityType.VariableInstance;
2545
2543
  } | {
2546
2544
  type: EntityType.ArgumentDeclaration;
2545
+ } | {
2546
+ type: EntityType.OutputMap;
2547
2547
  } | {
2548
2548
  type: EntityType.Operation;
2549
2549
  } | {
@@ -2562,7 +2562,7 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2562
2562
  successCalls: ({
2563
2563
  id: string;
2564
2564
  type: EntityType.GenericReference;
2565
- entityType: EntityType.Loop;
2565
+ entityType: EntityType.ReturnStatement;
2566
2566
  entityId: string;
2567
2567
  } | {
2568
2568
  id: string;
@@ -2602,7 +2602,7 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2602
2602
  } | {
2603
2603
  id: string;
2604
2604
  type: EntityType.GenericReference;
2605
- entityType: EntityType.ReturnStatement;
2605
+ entityType: EntityType.Loop;
2606
2606
  entityId: string;
2607
2607
  } | {
2608
2608
  id: string;
@@ -2618,7 +2618,7 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2618
2618
  errorCalls: ({
2619
2619
  id: string;
2620
2620
  type: EntityType.GenericReference;
2621
- entityType: EntityType.Loop;
2621
+ entityType: EntityType.ReturnStatement;
2622
2622
  entityId: string;
2623
2623
  } | {
2624
2624
  id: string;
@@ -2658,7 +2658,7 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2658
2658
  } | {
2659
2659
  id: string;
2660
2660
  type: EntityType.GenericReference;
2661
- entityType: EntityType.ReturnStatement;
2661
+ entityType: EntityType.Loop;
2662
2662
  entityId: string;
2663
2663
  } | {
2664
2664
  id: string;
@@ -2675,13 +2675,13 @@ export declare function getVariableInstanceSchema(): z.ZodObject<z.objectUtil.ex
2675
2675
  type: EntityType.DataType;
2676
2676
  } | null;
2677
2677
  writesValues: (Record<string, any> | {
2678
- type: EntityType.InputMap;
2679
- } | {
2680
2678
  type: EntityType.ReturnDeclaration;
2681
2679
  } | {
2682
2680
  type: EntityType.VariableDeclaration;
2683
2681
  } | {
2684
2682
  type: EntityType.VariableInstance;
2683
+ } | {
2684
+ type: EntityType.InputMap;
2685
2685
  })[];
2686
2686
  internalCalls: (Record<string, any> | {
2687
2687
  type: EntityType.InternalCall;
@@ -93,7 +93,7 @@ export declare function getHeadIfPartOfDetachedBranch(entity: CanvasEntityState,
93
93
  export declare function flattenDetachedBranch(entity: CanvasEntityState): CanvasEntityState[];
94
94
  export declare function checkIsMethod(entity: EntityState): boolean;
95
95
  export declare function mergeListOfEntities(oldErrors: EntityState[], newErrors: EntityState[]): EntityState[];
96
- export declare function getPrototypeByType(type: EntityType): typeof OutputMapState | typeof InputMapState | typeof OperationState | typeof InstalledProjectState | typeof ConditionState | typeof SearchState | typeof ReturnDeclarationState | typeof ProjectState | typeof CustomEntityState | typeof PropertyState | typeof FunctionDeclarationState | typeof FunctionCallState | typeof VariableDeclarationState | typeof VariableInstanceState | typeof ArgumentDeclarationState | typeof LoopState | typeof ReturnStatementState | typeof BuiltInBaseEntityState | null;
96
+ export declare function getPrototypeByType(type: EntityType): typeof OutputMapState | typeof InputMapState | typeof ConditionState | typeof OperationState | typeof InstalledProjectState | typeof SearchState | typeof ReturnDeclarationState | typeof ProjectState | typeof CustomEntityState | typeof PropertyState | typeof FunctionDeclarationState | typeof FunctionCallState | typeof VariableDeclarationState | typeof VariableInstanceState | typeof ArgumentDeclarationState | typeof LoopState | typeof ReturnStatementState | typeof BuiltInBaseEntityState | null;
97
97
  export declare function getScopeOwner(entity: EntityState | Element | ElementTransfer | ElementGenerationTarget | ElementShallowTransfer, project: ProjectState): EntityWithLogicScopeState | ProjectState | null;
98
98
  export declare function getRootEntryPointScopeOwner(entity: EntityState | Element | ElementTransfer | ElementGenerationTarget | ElementShallowTransfer, project: ProjectState): EntityWithLogicScopeState | null;
99
99
  export declare function checkIsNestedScope(parent: EntityWithLogicScopeState | ProjectState, child: EntityWithLogicScopeState | ProjectState, project: ProjectState): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elyx-code/project-logic-tree",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "author": "Sergio Herrero",
5
5
  "license": "UNLICENSED",
6
6
  "description": "An installable module which contains the type definitions and ephemeral state management for a projects' logic tree data structure",