@elyx-code/project-logic-tree 0.0.6814 → 0.0.6816

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 (4) hide show
  1. package/dist/index.cjs +186 -186
  2. package/dist/index.d.ts +80 -23
  3. package/dist/index.js +31167 -30909
  4. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -412,6 +412,21 @@ export declare type AnyEncoding = UtfEncoding | BinEncoding;
412
412
 
413
413
  export declare function appendToList(list: unknown, value: unknown, ...values: unknown[]): any[];
414
414
 
415
+ /**
416
+ * Based what ultimately was connected ('sourceEntity', 'targetEntity' and 'connectionType'),
417
+ * and the initial compatibility result, we might need to apply some auto-fixes to make sure the connection is valid.
418
+ *
419
+ * @param {UserManagedEntityState} sourceEntity The entity from which the connection starts
420
+ * @param {UserManagedEntityState} targetEntity The entity to which the connection goes
421
+ * @param {ConnectionNodeType} connectionType The type of the connection that was made
422
+ * @param {ChangeSet} changeSet The changeset to which any potential change should be added
423
+ * @param {IConnectionCompatibilityResult} compatibilityResult The initial compatibility result before the connection was made, this will be used to determine if any auto-fix is needed, and which one
424
+ */
425
+ export declare function applyConnectionCompatibilityAutoFixes(sourceEntity: UserManagedEntityState, targetEntity: UserManagedEntityState, connectionType: ConnectionNodeType, changeSet: ChangeSet, compatibilityResult: IConnectionCompatibilityResult, options?: {
426
+ onConnection?: (sourceEntity: UserManagedEntityState, targetEntity: UserManagedEntityState, connectionType: ConnectionNodeType) => Promise<void>;
427
+ onCallRemoved?: (caller: CallerEntityState, callee: CallableEntityState, callType: 'success' | 'error' | 'entry' | 'loop-body') => Promise<void>;
428
+ }): Promise<void>;
429
+
415
430
  export declare function applyNewScope(self: CallableEntityState, changeSet: ChangeSet | null): void;
416
431
 
417
432
  export declare function applyQueuedToCached(opts: {
@@ -438,11 +453,11 @@ export declare class Area {
438
453
  calculationEntryPoint: Area;
439
454
  _onlyEntities: CanvasEntityState[] | null;
440
455
  private _changeSet;
441
- constructor(entity: CanvasEntityState | ProjectState, index: number, calculationEntryPoint?: Area | null, changeSet?: ChangeSet);
456
+ constructor(entity: CanvasEntityState | ProjectState, index: number, calculationEntryPoint?: Area | null, changeSet?: ChangeSet | null);
442
457
  static autoGenerateLayout(entryPointEntity: CanvasEntityState | ProjectState, changeSet: ChangeSet | null, onlyEntities?: CanvasEntityState[]): CanvasEntityState[];
443
458
  static recursivelyAssembleChildrenAreas(renderedParents: Area[]): void;
444
- get onlyEntities(): CanvasEntityState[] | null;
445
- get changeSet(): ChangeSet | null;
459
+ get onlyEntities(): CanvasEntityState[];
460
+ get changeSet(): ChangeSet;
446
461
  set changeSet(changeSet: ChangeSet | null);
447
462
  findAreaInChildrenFromEntity(entity: CanvasEntityState): Area | null;
448
463
  findAreaFromEntity(entity: CanvasEntityState): Area | null;
@@ -9439,6 +9454,15 @@ export declare enum BaseValueDescriptorIds {
9439
9454
 
9440
9455
  export declare function calculateNewParentBasedOnCallers(self: CallableEntityState): EntityWithLogicScopeState | ProjectState;
9441
9456
 
9457
+ /**
9458
+ * Calculates how far down the top of the parent definition entity a method starts
9459
+ * Methods are function-declaration entities nested inside definition-entities
9460
+ * But their distance to the top changes based on their index among all other rendered methods as well as all properties the parent has.
9461
+ */
9462
+ export declare function calculateVerticalOffsetForMethod(method: FunctionDeclarationState): {
9463
+ offset: number;
9464
+ };
9465
+
9442
9466
  export declare const CALLABLE_ENTITIES_EXPLANATION: string;
9443
9467
 
9444
9468
  export declare const CALLABLE_TYPES: EntityType[];
@@ -9765,7 +9789,7 @@ export declare enum BaseValueDescriptorIds {
9765
9789
  export declare function checkIsNestedScope(parent: EntityWithLogicScopeState | ProjectState, child: EntityWithLogicScopeState | ProjectState, project: ProjectState): boolean;
9766
9790
 
9767
9791
  /**
9768
- * Checks whether the given data-type allows for a null value.
9792
+ * Checks whether the given data-type ALLOWS for a null value.
9769
9793
  * This is either because the 'entity' field is the primitive null-prototype
9770
9794
  * Or because it has a literal-value, with its value set to `null`
9771
9795
  * Or because the data-type is an or-group where at least one of its children meets the above requirements
@@ -9774,6 +9798,14 @@ export declare enum BaseValueDescriptorIds {
9774
9798
  */
9775
9799
  export declare function checkIsNullable(dataType: DataTypeState | null): boolean;
9776
9800
 
9801
+ /**
9802
+ * Checks whether the given data-type is either explicitly set to null, or is an or-group where all options are explicitly set to null. In other words, whether the data-type allows only for a null value and nothing else.
9803
+ *
9804
+ * @param {DataTypeState | null} dataType the data-type to check
9805
+ * @returns {boolean} whether the given data-type is either explicitly set to null
9806
+ */
9807
+ export declare function checkIsOnlyNull(dataType: DataTypeState | null): boolean;
9808
+
9777
9809
  export declare function checkIsRequiredValue(entity: EntityWithValueState | PropertyState | ValueDescriptorState): boolean;
9778
9810
 
9779
9811
  export declare function checkIsRowTransformerUpToDate(newestOpenRowTransformer: DefinitionEntityState, entity: DefinitionEntityState, lastPublishedEntityVersion: DefinitionEntityState): {
@@ -15392,6 +15424,10 @@ export declare enum BaseValueDescriptorIds {
15392
15424
 
15393
15425
  export declare function getAllValueWritingChildren(entity: CanvasEntityState | InternalCallState): ValueWritingEntityState[];
15394
15426
 
15427
+ export declare function getAllValueWritingEntities(project: ProjectState, options?: YieldOptions): Promise<ValueWritingEntityState[]>;
15428
+
15429
+ export declare function getAllValueWrittingChildren(entity: CanvasEntityState | InternalCallState): ValueWritingEntityState[];
15430
+
15395
15431
  export declare function getAllVariablesInScope(project: ProjectState, variableDeclarations: VariableDeclarationState[], targetEntity?: UserManagedEntityState): VariableDeclarationState[];
15396
15432
 
15397
15433
  export declare function getBaseBuiltInEntities(entity: DefinitionEntityState | BuiltInBaseEntityState): BuiltInBaseEntityState[];
@@ -18584,24 +18620,7 @@ export declare enum BaseValueDescriptorIds {
18584
18620
 
18585
18621
  export declare function getIncompatibleConnectionEntitiesAsync(entity: ArgumentDeclarationState | InputMapState | OutputMapState | LoopState | CallerEntityState | VariableState | ValueDescriptorState | ExecutableEntityState, connectionType: ConnectionNodeType, options?: YieldOptions & {
18586
18622
  allowReadWriteToFixableScope?: boolean;
18587
- }): Promise<{
18588
- compatible: {
18589
- [id: string]: {
18590
- requiresCallConnectionTo: CallableEntityState | null;
18591
- requiresCallConnectionToFrom: CallerEntityState | null;
18592
- entity: EntityState;
18593
- };
18594
- };
18595
- incompatible: {
18596
- [id: string]: {
18597
- entity: EntityState;
18598
- reasons: CanvasEntityConnectionDisabledReason[];
18599
- fixable: boolean;
18600
- requiresCallConnectionTo: CallableEntityState | null;
18601
- requiresCallConnectionToFrom: CallerEntityState | null;
18602
- };
18603
- };
18604
- }>;
18623
+ }): Promise<IConnectionCompatibilityResult>;
18605
18624
 
18606
18625
  export declare function getIndexItem(list: unknown, index: unknown): any;
18607
18626
 
@@ -21322,6 +21341,30 @@ export declare enum BaseValueDescriptorIds {
21322
21341
  parent: EntityWithLogicScope | EntityWithLogicScopeReference | IProject | IProjectReference | ICondition | IConditionReference;
21323
21342
  }
21324
21343
 
21344
+ export declare interface IConnectionCompatibilityResult {
21345
+ compatible: IConnectionCompatibleOptions;
21346
+ incompatible: IConnectionIncompatibleOptions;
21347
+ }
21348
+
21349
+ export declare interface IConnectionCompatibleOptions {
21350
+ [id: string]: {
21351
+ requiresCallConnectionTo: CallableEntityState | null;
21352
+ requiresCallConnectionToFrom: CallerEntityState | null;
21353
+ entity: UserManagedEntityState;
21354
+ };
21355
+ }
21356
+
21357
+ export declare interface IConnectionIncompatibleOptions {
21358
+ [id: string]: {
21359
+ entity: UserManagedEntityState;
21360
+ reasons: CanvasEntityConnectionDisabledReason[];
21361
+ fixable: boolean;
21362
+ requiresCallConnectionTo: CallableEntityState | null;
21363
+ requiresCallConnectionToFrom: CallerEntityState | null;
21364
+ nonAutofixableReasons: (CanvasEntityConnectionDisabledReason.VariableDeclarationCannotBeMovedToLowerScopeBecauseInstancesUsage | CanvasEntityConnectionDisabledReason.CannotChangeScopeBecauseItCallsOtherEntities | CanvasEntityConnectionDisabledReason.CannotChangeScopeBecauseItIsCalledByOtherEntities)[];
21365
+ };
21366
+ }
21367
+
21325
21368
  export declare interface IContinueStatement extends ITerminationStatement, IContinueStatement_meta {
21326
21369
  type: EntityType.ContinueStatement;
21327
21370
  parent: ILoop;
@@ -25471,6 +25514,18 @@ export declare enum BaseValueDescriptorIds {
25471
25514
 
25472
25515
  export declare function modifyEditableAndDeletableDownstreamEntitiesFromGiven(entity: UserManagedEntityState, changeSet: ChangeSet, newValue: boolean, seenEntities?: Set<string>): void;
25473
25516
 
25517
+ export declare function moveParallelCalls(entity: PassThroughCallableEntityState, changeSet: ChangeSet, options?: {
25518
+ onlyTypes?: EntityType[];
25519
+ onConnection?: (sourceEntity: UserManagedEntityState, targetEntity: UserManagedEntityState, connectionType: ConnectionNodeType) => Promise<void>;
25520
+ onCallRemoved?: (caller: CallerEntityState, callee: CallableEntityState, callType: 'success' | 'error' | 'entry' | 'loop-body') => Promise<void>;
25521
+ }): {
25522
+ errors: EntityError[];
25523
+ explanations: {
25524
+ id: GenerationExplanationIds;
25525
+ message: string;
25526
+ }[];
25527
+ };
25528
+
25474
25529
  export declare const MUTABLE_META_PROPERTIES_EXPLANATION = "Some meta-data properties of entities can be changed after the initial creation, like 'name', 'description', etc...\nThese are called mutable meta-properties.";
25475
25530
 
25476
25531
  export declare const NESTED_PROPERTY_HEIGHT = 26;
@@ -30916,7 +30971,9 @@ export declare enum BaseValueDescriptorIds {
30916
30971
  reasons: CanvasEntityDisabledReason[];
30917
30972
  };
30918
30973
 
30919
- export declare function removeRedundantCallers(entity: CallableEntityState, changeSet: ChangeSet | null): ChangeSet | null;
30974
+ export declare function removeRedundantCallers(entity: CallableEntityState, changeSet: ChangeSet | null, options?: {
30975
+ onCallRemoved?: (caller: CallerEntityState, callee: CallableEntityState, callType: 'success' | 'error' | 'entry' | 'loop-body') => Promise<void>;
30976
+ }): Promise<ChangeSet | null>;
30920
30977
 
30921
30978
  export declare function repeatList(list: unknown, count: unknown): any[];
30922
30979