@elyx-code/project-logic-tree 0.0.6819 → 0.0.6823

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 +308 -237
  2. package/dist/index.d.ts +115 -2
  3. package/dist/index.js +43089 -42717
  4. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -10706,10 +10706,19 @@ export declare enum BaseValueDescriptorIds {
10706
10706
 
10707
10707
  export declare const cryptoPBKDF2SaltEncodingDT: IDataTypeTransfer;
10708
10708
 
10709
+ /**
10710
+ * Type of entities that can be used/referenced in the 'entity' field of a data type.
10711
+ */
10712
+ export declare const DATA_TYPE_ENTITY_OPTION_TYPES: EntityType[];
10713
+
10709
10714
  export declare const DATA_TYPE_OPERATIONS: {
10710
10715
  [key: string]: IActionDescriptorTransfer;
10711
10716
  };
10712
10717
 
10718
+ export declare const DATA_TYPE_PARENT_TYPES: EntityType[];
10719
+
10720
+ export declare const DATA_TYPE_USER_MANAGED_PARENT_TYPES: EntityType[];
10721
+
10713
10722
  declare class DataSource implements IDataSource, ISearchNode {
10714
10723
  owner: SearchStatementState;
10715
10724
  entity: DefinitionEntityState | null;
@@ -12459,6 +12468,11 @@ export declare enum BaseValueDescriptorIds {
12459
12468
 
12460
12469
  export declare function enrichFromKnownEntities(entity: ElementTransfer | Element_2 | ElementShallowTransfer | IGenericReference | EntityId, allKnownEntities: Record<EntityId, Element_2 | ElementTransfer | ElementShallowTransfer>): Element_2 | ElementTransfer | ElementShallowTransfer | null;
12461
12470
 
12471
+ /**
12472
+ * Entity types that have a 'dataType' field.
12473
+ */
12474
+ export declare const ENTITIES_WITH_DATA_TYPES: EntityType[];
12475
+
12462
12476
  export declare const ENTITIES_WITH_VALUES_EXPLANATION: string;
12463
12477
 
12464
12478
  export declare function entitiesToUniqueCanvasEntities(entities: EntityState[], filterOut?: string[]): CanvasEntityState[];
@@ -12555,6 +12569,7 @@ export declare enum BaseValueDescriptorIds {
12555
12569
  RecommendedImplementFunctionCallAction = "recommended-implement-function-call-action",
12556
12570
  RecommendedImplementVariableDeclarationAction = "recommended-implement-variable-declaration-action",
12557
12571
  RecommendedImplementVariableInstanceAction = "recommended-implement-variable-instance-action",
12572
+ RecommendedImplementInternalCallAction = "recommended-implement-internal-call-action",
12558
12573
  RecommendedImplementConditionAction = "recommended-implement-condition-action",
12559
12574
  InvalidReferenceObjectStructure = "invalid-reference-object-structure",
12560
12575
  ContainsSingleButShouldBeReferenceList = "contains-single-but-should-be-reference-list",
@@ -15093,6 +15108,49 @@ export declare enum BaseValueDescriptorIds {
15093
15108
 
15094
15109
  export declare function generateActionExample(actionName: string, properties: Record<string, string>): string;
15095
15110
 
15111
+ export declare function generateAllAvailableMethodsThatCanBeCalledAsInternalCallsExplanation(project: ProjectState): {
15112
+ explanations: {
15113
+ id: GenerationExplanationIds.AllAvailableMethodsThatCanBeCalledAsInternalCalls | GenerationExplanationIds.ReasonsForMethodsNotAvailableAsInternalCalls;
15114
+ message: string;
15115
+ }[];
15116
+ };
15117
+
15118
+ /**
15119
+ * Add explanation about all available methods on this variable's data-type entity.
15120
+ * And if none, all the available methods on existing variables in the project that could be used.
15121
+ * And if none, then all the available methods in the project that could be implemented as internal calls.
15122
+ *
15123
+ * If the given declaration id does exist in the given variable's data-type entity, skip.
15124
+ *
15125
+ * @param {string} declarationId
15126
+ * @param {VariableState | null} variableEntityState
15127
+ * @returns {{
15128
+ * explanations: {
15129
+ * id: GenerationExplanationIds.AvailableInternalCallsForGivenVariablesDataTypeEntity
15130
+ * | GenerationExplanationIds.AvailableInternalCallsOfAnyDeclarationInAllInstanciatedVariablesDataTypeEntities
15131
+ * | GenerationExplanationIds.AllAvailableMethodsThatCanBeCalledAsInternalCalls
15132
+ * | GenerationExplanationIds.ReasonsForMethodsNotAvailableAsInternalCalls
15133
+ * | GenerationExplanationIds.NonAvailableInternalCallsWithSameDeclarationInExistingInstanciatedVariables
15134
+ * | GenerationExplanationIds.AvailableInternalCallsWithSameDeclarationInExistingInstanciatedVariables
15135
+ * | GenerationExplanationIds.InternalCalls;
15136
+ * message: string;
15137
+ * }[];
15138
+ * }}
15139
+ */
15140
+ export declare function generateAvailableInternalCallsExplanation(project: ProjectState, declarationId: string | null, variableEntityState: VariableState | null): {
15141
+ explanations: {
15142
+ id: GenerationExplanationIds.AvailableInternalCallsForGivenVariablesDataTypeEntity | GenerationExplanationIds.AvailableInternalCallsOfAnyDeclarationInAllInstanciatedVariablesDataTypeEntities | GenerationExplanationIds.AllAvailableMethodsThatCanBeCalledAsInternalCalls | GenerationExplanationIds.ReasonsForMethodsNotAvailableAsInternalCalls | GenerationExplanationIds.NonAvailableInternalCallsWithSameDeclarationInExistingInstanciatedVariables | GenerationExplanationIds.AvailableInternalCallsWithSameDeclarationInExistingInstanciatedVariables | GenerationExplanationIds.InternalCalls;
15143
+ message: string;
15144
+ }[];
15145
+ };
15146
+
15147
+ export declare function generateAvailableInternalCallsOfAnyDeclarationInAllInstanciatedVariablesDataTypeEntitiesExplanation(project: ProjectState): {
15148
+ explanations: {
15149
+ id: GenerationExplanationIds.AvailableInternalCallsOfAnyDeclarationInAllInstanciatedVariablesDataTypeEntities;
15150
+ message: string;
15151
+ }[];
15152
+ };
15153
+
15096
15154
  export declare function generateCaughtErrorOutputLogLines(entity: PassThroughCallableEntityWithOutputsState, options?: IPrintEntityOptions & {
15097
15155
  prefix?: string;
15098
15156
  }): {
@@ -15369,7 +15427,20 @@ export declare enum BaseValueDescriptorIds {
15369
15427
  OutputMapsAutogeneration = "output-maps-autogeneration-explanation",
15370
15428
  AvailableOutputMapsForGivenParentCallableEntity = "available-output-maps-for-given-parent-callable-entity-explanation",
15371
15429
  InputMapsAutogeneration = "input-maps-autogeneration-explanation",
15372
- AvailableInputMapsForGivenParentCallableEntity = "available-input-maps-for-given-parent-callable-entity-explanation"
15430
+ InternalCallsAutogeneration = "internal-calls-autogeneration-explanation",
15431
+ AvailableInputMapsForGivenParentCallableEntity = "available-input-maps-for-given-parent-callable-entity-explanation",
15432
+ AvailableInternalCallsForGivenVariablesDataTypeEntity = "available-internal-calls-for-given-variables-data-type-entity-explanation",
15433
+ NonAvailableInternalCallsWithSameDeclarationInExistingInstanciatedVariables = "non-available-internal-calls-with-same-declaration-in-existing-instanciated-variables-explanation",
15434
+ AvailableInternalCallsWithSameDeclarationInExistingInstanciatedVariables = "available-internal-calls-with-same-declaration-in-existing-instanciated-variables-explanation",
15435
+ AvailableInternalCallsOfAnyDeclarationInAllInstanciatedVariablesDataTypeEntities = "available-internal-calls-of-any-declaration-in-all-instanciated-variables-data-type-entities-explanation",
15436
+ AllAvailableMethodsThatCanBeCalledAsInternalCalls = "all-available-methods-that-can-be-called-as-internal-calls",
15437
+ InternalCalls = "internal-calls-explanation",
15438
+ ReasonsForMethodsNotAvailableAsInternalCalls = "reasons-for-methods-not-available-as-internal-calls-explanation",
15439
+ AllNonInteractiveDefinitionEntities = "all-non-interactive-definition-entities-explanation",
15440
+ AllStaticAndAbstractDefinitionEntities = "all-static-and-abstract-definition-entities-explanation",
15441
+ AllStaticNonAbstractDefinitionEntities = "all-static-non-abstract-definition-entities-explanation",
15442
+ AllAbstractNonStaticDefinitionEntities = "all-abstract-non-static-definition-entities-explanation",
15443
+ AllInstanciatableDefinitionEntities = "all-instantiatable-definition-entities-explanation"
15373
15444
  }
15374
15445
 
15375
15446
  /** lodash-like get(obj, path, defaultValue) with precise "missing" detection */
@@ -15420,6 +15491,13 @@ export declare enum BaseValueDescriptorIds {
15420
15491
  }[];
15421
15492
  };
15422
15493
 
15494
+ export declare function getAllAvailableValueReaderEntities(project: ProjectState): {
15495
+ explanations: {
15496
+ id: GenerationExplanationIds.AllAvailableValueReaderEntities | GenerationExplanationIds.EntitiesWithValues;
15497
+ message: string;
15498
+ }[];
15499
+ };
15500
+
15423
15501
  export declare function getAllBuiltInEntityIds(): Set<EntityId>;
15424
15502
 
15425
15503
  export declare function getAllBuiltInEntityIdsAsync(options?: YieldOptions): Promise<Set<EntityId>>;
@@ -15432,6 +15510,13 @@ export declare enum BaseValueDescriptorIds {
15432
15510
 
15433
15511
  export declare function getAllValueReadingChildren(entity: CanvasEntityState | InternalCallState): ValueReadingEntityState[];
15434
15512
 
15513
+ export declare function getAllValueWriterEntities(project: ProjectState): {
15514
+ explanations: {
15515
+ id: GenerationExplanationIds.AllAvailableValueWriterEntities | GenerationExplanationIds.EntitiesWithValues;
15516
+ message: string;
15517
+ }[];
15518
+ };
15519
+
15435
15520
  export declare function getAllValueWritingChildren(entity: CanvasEntityState | InternalCallState): ValueWritingEntityState[];
15436
15521
 
15437
15522
  export declare function getAllValueWritingEntities(project: ProjectState, options?: YieldOptions): Promise<ValueWritingEntityState[]>;
@@ -15440,6 +15525,20 @@ export declare enum BaseValueDescriptorIds {
15440
15525
 
15441
15526
  export declare function getAllVariablesInScope(project: ProjectState, variableDeclarations: VariableDeclarationState[], targetEntity?: UserManagedEntityState): VariableDeclarationState[];
15442
15527
 
15528
+ export declare function getAvailableValueReadersForGivenWritter(project: ProjectState, valueWriterEntity: ValueWritingEntityState): Promise<{
15529
+ explanations: {
15530
+ id: GenerationExplanationIds.AvailableValueReadersForGivenWriter | GenerationExplanationIds.EntitiesWithValues;
15531
+ message: string;
15532
+ }[];
15533
+ }>;
15534
+
15535
+ export declare function getAvailableValueWritersForGivenReader(project: ProjectState, valueReaderEntity: ValueReadingEntityState): Promise<{
15536
+ explanations: {
15537
+ id: GenerationExplanationIds.AvailableValueWritersForGivenReader | GenerationExplanationIds.EntitiesWithValues;
15538
+ message: string;
15539
+ }[];
15540
+ }>;
15541
+
15443
15542
  export declare function getBaseBuiltInEntities(entity: DefinitionEntityState | BuiltInBaseEntityState): BuiltInBaseEntityState[];
15444
15543
 
15445
15544
  export declare function getBaseBuiltInNameFromIntegrationName(integrationName: ExternalIntegrationNames): BaseEntityNames | null;
@@ -18647,6 +18746,14 @@ export declare enum BaseValueDescriptorIds {
18647
18746
 
18648
18747
  export declare function getIntegrationIdFromEntity(entity: DefinitionEntityState | BuiltInBaseEntityState | ActionDescriptorState | OperationState): ExternalIntegrationNames | null;
18649
18748
 
18749
+ export declare function getIsGivenDeclarationIdAvailableInAnInstanciatedVarAndExplanation(declarationId: string, project: ProjectState): {
18750
+ explanations: {
18751
+ id: GenerationExplanationIds.NonAvailableInternalCallsWithSameDeclarationInExistingInstanciatedVariables | GenerationExplanationIds.AvailableInternalCallsWithSameDeclarationInExistingInstanciatedVariables;
18752
+ message: string;
18753
+ }[];
18754
+ available: boolean;
18755
+ };
18756
+
18650
18757
  export declare function getIsInteractive(entity: DefinitionEntityState | BuiltInBaseEntityState | PrimitiveEntityState | PropertyState | InputMapState | OutputMapState): boolean;
18651
18758
 
18652
18759
  /**
@@ -22576,6 +22683,10 @@ export declare enum BaseValueDescriptorIds {
22576
22683
  }
22577
22684
  export { installedProjectValidation }
22578
22685
 
22686
+ export declare const INTERNAL_CALLS_AUTOGENERATION_EXPLANATION = "Internal calls are automatically generated for any method of an applicable definition-entity that is the 'entity' of a data-type of a variable-declaration. So they never need to be created manually.\nTo use an internal call, it is almost always the only correct way, to create a dedicated variable-instance for it, with the 'implement_internal_call' generation action, which will create and instance and wire the call all in once and avoiding generation conflics.";
22687
+
22688
+ export declare const INTERNAL_CALLS_EXPLANATION = "An internal call is a callable entity type that can be called on a variable-instance to trigger the logic of a method (function-declaration in a definition-entity) of its data-type 'entity'.\nInternal calls are equivalent to method calls in other programing languages like Javascript, where you need a class instance initialized with the right state, then you call the method on it.\nIn our case, first we need a 'variable-declaration' with a data-type that has its 'entity' field pointing to a 'definition-entity' that contains a 'function-declaration' method called somewhere earlier in the same scopes' callstack.\nThis variable-declaration acts as the initialization of the class. Only then we can use a SEPARATE variable-instance to call the internal-call on.\nThis is equivalent to calling 'new' on a class to create an instance in Javascript, then calling a method on that instance in the next step. The internal call will have access to the state of the variable-declaration.";
22689
+
22579
22690
  export declare enum InternalCallDependencyField {
22580
22691
  Declaration = "declaration"
22581
22692
  }
@@ -30466,7 +30577,7 @@ export declare enum BaseValueDescriptorIds {
30466
30577
 
30467
30578
  export declare const PROPERTY_IMPLEMENTATION_AND_EXTENSION_AUTO_ENRICHMENT_EXPLANATION = "When a 'property' entity is added to a 'definition-entity', the system will automatically enrich the property based on the parent definition-entity's implemented and extended entities.\nThis means that if a property is required, the parent 'definition-entity' will have auto-generated it. If a manually added property can fit into a parent, it will be auto-enriched with any required 'implementation' or 'extension' references, and the data-type will be recalculated or constrained based on said extensions and implementations.\nThis means that manually adding an 'extends' field to a new property is not necessary, and only specific, non-required 'implements' references need to be added manually if needed.";
30468
30579
 
30469
- export declare const PROPERTY_NOT_VALUE_READER_WRITER_EXPLANATION = "A property entity, is neither a value reading, or a value writting entity, but they are often confused with one.\nA 'property' can have a default value through its nested 'data-type' entity.\nThe 'property' entity only represents the data field in the declaration, and it can't write or read values.\nWhen a 'definition-entity' is instantiated as a variable, any writes or reads to its properties are done through 'input-map's and 'output-map's.";
30580
+ export declare const PROPERTY_NOT_VALUE_READER_WRITER_EXPLANATION = "A property entity, is neither a value reading, or a value writting entity, but they are often confused with one.\nBecause a 'property' can have a default value.\nThe 'property' entity only represents the data field in the declaration, and it can't write or read values.\nWhen a 'definition-entity' is instantiated as a variable, any writes or reads to its properties are done through 'input-map's and 'output-map's.";
30470
30581
 
30471
30582
  export declare enum PropertyDependencyField {
30472
30583
  PropertyImplements = "property-implements-field",
@@ -30911,6 +31022,8 @@ export declare enum BaseValueDescriptorIds {
30911
31022
 
30912
31023
  export declare function readValueFromWriter(entity: ValueReadingEntityState, context: IValueResolutionContext, onlyDefault?: boolean): IDynamicValue | null;
30913
31024
 
31025
+ export declare const REASONS_FOR_METHODS_NOT_AVAILABLE_AS_INTERNAL_CALLS_EXPLANATION = "Not all methods of a definition-entity are available as internal calls. For a method to be available as an internal call its parent definition-entity needs to be the 'entity' of a data-type of a variable. It needs to belong to an 'interactive' definition-entity. It needs to not be part of an abstract definition-entity.";
31026
+
30914
31027
  export declare function rebaseStack<T = any>(undoableStackValueIndex: number, history: T[], newItem: T): number;
30915
31028
 
30916
31029
  export declare function recursivelyMakeAllEditableAndDeletableFromGiven(entity: UserManagedEntityState, changeSet: ChangeSet | null): void;