@elyx-code/project-logic-tree 0.0.6393 → 0.0.6395
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.
- package/dist/index.d.ts +216 -203
- package/dist/index.js +462 -462
- package/dist/index.umd.cjs +21 -21
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -544,8 +544,8 @@ export declare enum BaseEntityNames {
|
|
|
544
544
|
}
|
|
545
545
|
|
|
546
546
|
export declare class BaseRegisteredExtension {
|
|
547
|
-
readonly
|
|
548
|
-
constructor(
|
|
547
|
+
readonly extensionsRegistry: ExtensionsRegistry;
|
|
548
|
+
constructor(extensionsRegistry: ExtensionsRegistry);
|
|
549
549
|
}
|
|
550
550
|
|
|
551
551
|
export declare abstract class BaseState extends SharedStateFunctionality implements IGenericBase {
|
|
@@ -2609,6 +2609,190 @@ export declare const DEFAULT_PROJECT_STATIC_PARENT_CONTEXT: IProjectStaticParent
|
|
|
2609
2609
|
|
|
2610
2610
|
export declare const DEFAULT_UUID_MODULE: IUUIDModule;
|
|
2611
2611
|
|
|
2612
|
+
export declare class DefaultEditorContext extends ExtensionContextBase<ExtensionContextType.Editor> implements IEditorContext {
|
|
2613
|
+
private readonly _editor;
|
|
2614
|
+
readonly id: string;
|
|
2615
|
+
constructor(extensionsRegistry: ExtensionsRegistry, _editor: IEditor, id?: string);
|
|
2616
|
+
get ready(): boolean;
|
|
2617
|
+
get hasLoadedLogic(): boolean;
|
|
2618
|
+
get destroyed(): boolean;
|
|
2619
|
+
get logicLoadingPromise(): Promise<void> | null;
|
|
2620
|
+
get logic(): ProjectState | null;
|
|
2621
|
+
get branch(): IActiveBranchHeadResult | null;
|
|
2622
|
+
get projectId(): EntityId;
|
|
2623
|
+
get sessionId(): string | null;
|
|
2624
|
+
get userAuthorId(): string;
|
|
2625
|
+
get peerConnections(): Record<string, IChannelConnections>;
|
|
2626
|
+
get test(): ITest | null;
|
|
2627
|
+
get localTestValues(): EfimeralValueStore;
|
|
2628
|
+
get resolvedValues(): EfimeralValueStore;
|
|
2629
|
+
get persistedExecutionResults(): EfimeralValueStore;
|
|
2630
|
+
get publication(): PublicationRun | null;
|
|
2631
|
+
get execution(): Execution | null;
|
|
2632
|
+
get project(): ProjectState;
|
|
2633
|
+
get lastExecutionResults(): EfimeralValueStore;
|
|
2634
|
+
get undoableStackValueIndex(): number;
|
|
2635
|
+
set undoableStackValueIndex(value: number);
|
|
2636
|
+
get PROJECT_NOTIFICATIONS_CHANNEL(): string;
|
|
2637
|
+
getAccessToken(): Promise<string | null>;
|
|
2638
|
+
removeValueByOwnerId(entityId: EntityId): void;
|
|
2639
|
+
removeValue(dynamicValue: IDynamicValue): void;
|
|
2640
|
+
undo(): Promise<void>;
|
|
2641
|
+
redo(): Promise<void>;
|
|
2642
|
+
initTest(entryPoint: TestableEntityState, autoExecute: boolean): Promise<ITest>;
|
|
2643
|
+
removeTest(): Promise<ITest>;
|
|
2644
|
+
copyEntities(entities: CanvasEntityState[]): Promise<ChangeSet>;
|
|
2645
|
+
resolveInitialChildrenPositions(parent: CanvasEntityState | null, children: CanvasEntityState[], changeSet: ChangeSet | null): CanvasEntityState[];
|
|
2646
|
+
publish(): Promise<void>;
|
|
2647
|
+
loadActivePublication(publicationId: string): Promise<IPublication>;
|
|
2648
|
+
requestActiveDynamicValue(valueOwner: EntityWithValueState): IDynamicValue | null;
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
export declare type DefaultExtensionContext = DefaultEditorContext | DefaultProjectLogicContext;
|
|
2652
|
+
|
|
2653
|
+
export declare class DefaultProjectLogicContext extends ExtensionContextBase<ExtensionContextType.Logic> implements IProjectLogicContext {
|
|
2654
|
+
private readonly _project;
|
|
2655
|
+
constructor(extensionsRegistry: ExtensionsRegistry, _project: ProjectState);
|
|
2656
|
+
readonly id: EntityId;
|
|
2657
|
+
get type(): EntityType.Project;
|
|
2658
|
+
get name(): string | null;
|
|
2659
|
+
get description(): string | null;
|
|
2660
|
+
get version(): string;
|
|
2661
|
+
get createdAt(): string;
|
|
2662
|
+
get previousVersion(): string | null;
|
|
2663
|
+
get author(): string;
|
|
2664
|
+
get deleted(): boolean;
|
|
2665
|
+
get entities(): DefinitionEntityState[];
|
|
2666
|
+
get projects(): InstalledProjectState[];
|
|
2667
|
+
get functions(): FunctionDeclarationState[];
|
|
2668
|
+
get events(): GlobalEventState[];
|
|
2669
|
+
get variableDeclarations(): VariableDeclarationState[];
|
|
2670
|
+
get variableInstances(): VariableInstanceState[];
|
|
2671
|
+
get conditions(): ConditionState[];
|
|
2672
|
+
get operations(): OperationState[];
|
|
2673
|
+
get functionCalls(): FunctionCallState[];
|
|
2674
|
+
get loops(): LoopState[];
|
|
2675
|
+
get searches(): SearchState[];
|
|
2676
|
+
get primitives(): PrimitiveEntityState[];
|
|
2677
|
+
get builtInBaseEntities(): BuiltInBaseEntityState[];
|
|
2678
|
+
get operationDeclarations(): ActionDescriptorState[];
|
|
2679
|
+
get globalEventActionDescriptors(): ActionDescriptorState[];
|
|
2680
|
+
get loopDeclarations(): ActionDescriptorState[];
|
|
2681
|
+
get loopDeclarationsBodies(): ActionDescriptorState[];
|
|
2682
|
+
get conditionDeclarations(): ActionDescriptorState[];
|
|
2683
|
+
get valueDescriptors(): ValueDescriptorState[];
|
|
2684
|
+
get dataTypes(): DataTypeState[];
|
|
2685
|
+
get errors(): EntityError[];
|
|
2686
|
+
get history(): ChangeSet[];
|
|
2687
|
+
get undoableStackValueIndex(): number;
|
|
2688
|
+
get knownVersions(): Map<string, EntityState> | null;
|
|
2689
|
+
get activeVersion(): boolean;
|
|
2690
|
+
get initialized(): boolean;
|
|
2691
|
+
get startedInitialization(): boolean;
|
|
2692
|
+
closePendingChangeSets(): Promise<void>;
|
|
2693
|
+
closeChangeSet(changeSet: ChangeSet): Promise<void>;
|
|
2694
|
+
toLatestChangeSet(author: string, timestamp: string, // ISO 8601 format
|
|
2695
|
+
self: UserManagedEntityState | null, autoclose?: boolean, autoCloseActionName?: string): ChangeSet;
|
|
2696
|
+
addChangeSet(changeSet: ChangeSet): ChangeSet;
|
|
2697
|
+
discardChangeSet(changeSet: ChangeSet | null): ProjectState;
|
|
2698
|
+
subscribeDependents(dependencies: {
|
|
2699
|
+
entity: UserManagedEntityState;
|
|
2700
|
+
field: string;
|
|
2701
|
+
}[]): UserManagedEntityState;
|
|
2702
|
+
unsubscribeDependents(dependencies: {
|
|
2703
|
+
entity: UserManagedEntityState;
|
|
2704
|
+
field: string;
|
|
2705
|
+
}[]): UserManagedEntityState;
|
|
2706
|
+
syncDependents(changeSet?: ChangeSet | null): IChangeSet<UserManagedEntityState>;
|
|
2707
|
+
onDetachedDependencyRemoved(_dependency: UserManagedEntityState, _field: string, _changeSet: ChangeSet | null): IChangeSet<UserManagedEntityState>;
|
|
2708
|
+
onDetachedDependencyRestored(_dependency: UserManagedEntityState, _field: string, _changeSet: ChangeSet | null): IChangeSet<UserManagedEntityState>;
|
|
2709
|
+
increaseVersion(sharedTimestamp: null | string): UserManagedEntityState;
|
|
2710
|
+
captureVersion(): ProjectState;
|
|
2711
|
+
restoreVersion(versionId: EntityVersion): Promise<IChangeSet<ProjectState>>;
|
|
2712
|
+
updateWithShallowTransfer(transfer: IProjectShallowTransfer, changeSet?: ChangeSet | null): ProjectState;
|
|
2713
|
+
hydrateAncestors(): IChangeSet<ProjectState>;
|
|
2714
|
+
afterAllChildrenInitialized(changeSet?: ChangeSet | null): IChangeSet<ProjectState>;
|
|
2715
|
+
addSelfToProject(_changeSet: ChangeSet | null): IChangeSet<ProjectState>;
|
|
2716
|
+
get instancesList(): EntityState[];
|
|
2717
|
+
isOperationDeclaration(entity: ActionDescriptorState): boolean;
|
|
2718
|
+
isGlobalEventActionDescriptor(entity: ActionDescriptorState): boolean;
|
|
2719
|
+
isLoopDeclaration(entity: ActionDescriptorState): boolean;
|
|
2720
|
+
isConditionDeclaration(entity: ActionDescriptorState): boolean;
|
|
2721
|
+
findSubscribedBuiltInInstance(entity: Element_2 | ElementTransfer): EntityState | null;
|
|
2722
|
+
get(entityId: EntityId): EntityState | null;
|
|
2723
|
+
getDeleted(entityId: EntityId): EntityState | null;
|
|
2724
|
+
getManaged(entityId: EntityId): EntityState | null;
|
|
2725
|
+
getBuiltIn(entityId: EntityId): EntityState | null;
|
|
2726
|
+
findSubscribedInstanceFromReference(entity: Reference): EntityState | null;
|
|
2727
|
+
findSubscribedBuiltInInstanceFromReference(entity: Reference): EntityState | null;
|
|
2728
|
+
metaSync(data: Partial<IProject_meta | IProject | IProjectTransfer | IProjectShallowTransfer>, changeSet?: ChangeSet | null): ProjectState;
|
|
2729
|
+
getAllBuiltInIds(): EntityId[];
|
|
2730
|
+
getAllBuiltIn(): EntityState[];
|
|
2731
|
+
toFlat(seenEntities?: Set<EntityId>): EntityState[];
|
|
2732
|
+
toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
|
|
2733
|
+
toMeta(): IProject_meta;
|
|
2734
|
+
toJSON(seenEntities?: Set<EntityId>): IProjectTransfer | IProjectReference;
|
|
2735
|
+
toJSONClone(options?: IEntityJSONCloneOptions): IProjectTransfer;
|
|
2736
|
+
toReference(options?: IEntityRecursionOptions): IProjectReference;
|
|
2737
|
+
toShallowJSON(options?: IEntityRecursionOptions): IProjectShallowTransfer;
|
|
2738
|
+
toFlatJSON(seenEntities?: Set<EntityId>): ElementShallowTransfer[];
|
|
2739
|
+
toGenerationTarget(): IProjectGenerationTarget;
|
|
2740
|
+
toFlatGenerationTarget(seenEntities?: Set<EntityId>): ElementGenerationTarget[];
|
|
2741
|
+
clearErrors(): ProjectState;
|
|
2742
|
+
validate(): {
|
|
2743
|
+
success: boolean;
|
|
2744
|
+
error: ZodError | null;
|
|
2745
|
+
data: IProjectTransfer | null;
|
|
2746
|
+
};
|
|
2747
|
+
validateChildren(): void;
|
|
2748
|
+
getErrors(): EntityError[];
|
|
2749
|
+
getShallowErrors(): EntityError[];
|
|
2750
|
+
getDefinitionEntity(id: EntityId): DefinitionEntityState | null;
|
|
2751
|
+
addDefinitionEntity(entity: DefinitionEntityState): DefinitionEntityState;
|
|
2752
|
+
addFunctionDeclaration(func: FunctionDeclarationState): FunctionDeclarationState;
|
|
2753
|
+
addFunctionCall(func: FunctionCallState): FunctionCallState;
|
|
2754
|
+
addVariableDeclaration(variable: VariableDeclarationState): VariableDeclarationState;
|
|
2755
|
+
addVariableInstance(variable: VariableInstanceState): VariableInstanceState;
|
|
2756
|
+
addInstalledProject(project: InstalledProjectState): ProjectState;
|
|
2757
|
+
addGlobalEvent(event: GlobalEventState): ProjectState;
|
|
2758
|
+
addCondition(condition: ConditionState): ProjectState;
|
|
2759
|
+
addOperation(operation: OperationState): ProjectState;
|
|
2760
|
+
addLoop(loop: LoopState): ProjectState;
|
|
2761
|
+
addSearch(search: SearchState): ProjectState;
|
|
2762
|
+
removeDefinitionEntity(entity: IDefinitionEntity): DefinitionEntityState | null;
|
|
2763
|
+
removeCondition(condition: ICondition): ConditionState | null;
|
|
2764
|
+
removeOperation(operation: IOperation): OperationState | null;
|
|
2765
|
+
removeLoop(loop: ILoop): LoopState | null;
|
|
2766
|
+
removeSearch(search: ISearch): SearchState | null;
|
|
2767
|
+
removeFunctionCall(funcCall: IFunctionCall): FunctionCallState | null;
|
|
2768
|
+
removeVariableInstance(variable: IVariableInstance): VariableInstanceState | null;
|
|
2769
|
+
removeVariableDeclaration(variable: IVariableDeclaration): VariableDeclarationState | null;
|
|
2770
|
+
removeFunctionDeclaration(func: IFunctionDeclaration): FunctionDeclarationState | null;
|
|
2771
|
+
removeInstalledProject(project: IInstalledProject): InstalledProjectState | null;
|
|
2772
|
+
removeGlobalEvent(event: IGlobalEvent): GlobalEventState | null;
|
|
2773
|
+
removeTopLevelVariableDeclaration(variable: VariableDeclarationState): VariableDeclarationState | null;
|
|
2774
|
+
getEntryPoints(): EntryPointEntityState[];
|
|
2775
|
+
getTerminationStatements(): TerminationState[];
|
|
2776
|
+
getFunctionDeclaration(id: EntityId): FunctionDeclarationState | null;
|
|
2777
|
+
getConditions(): ConditionState[];
|
|
2778
|
+
getOperations(): OperationState[];
|
|
2779
|
+
getVariables(): VariableState[];
|
|
2780
|
+
getVariableInstances(): VariableInstanceState[];
|
|
2781
|
+
getVariableDeclarations(): VariableDeclarationState[];
|
|
2782
|
+
getLoops(): LoopState[];
|
|
2783
|
+
getSearches(): SearchState[];
|
|
2784
|
+
getBuiltInPersistedEntity(): BuiltInBaseEntityState | null;
|
|
2785
|
+
requestActiveDynamicValue(valueOwner: EntityWithValueState): IDynamicValue | null;
|
|
2786
|
+
undo(): IProjectVersionTransitionConfig;
|
|
2787
|
+
redo(): IProjectVersionTransitionConfig;
|
|
2788
|
+
applyExternalChangeSet(request: PersistChangeSetEntityActionRequestPayload): ChangeSet;
|
|
2789
|
+
toFullProjectTransfer(): {
|
|
2790
|
+
order: EntityId[];
|
|
2791
|
+
size: number;
|
|
2792
|
+
record: Record<EntityId, UserManagedElementShallowTransfer>;
|
|
2793
|
+
};
|
|
2794
|
+
}
|
|
2795
|
+
|
|
2612
2796
|
export declare enum DefinitionEntityDependencyField {
|
|
2613
2797
|
Extends = "extends",
|
|
2614
2798
|
Implements = "implements"
|
|
@@ -2937,45 +3121,6 @@ export declare enum DynamicValueTypes {
|
|
|
2937
3121
|
|
|
2938
3122
|
export declare const EDITABLE_PERSISTANCE_REPOSITORY_DEFAULTS: IEditableEntityPersistanceRepository;
|
|
2939
3123
|
|
|
2940
|
-
export declare class EditorContext extends ExtensionContextBase implements Omit<IEditor, 'onLogicLoadingComplete' | 'onLogicLoadingCompleteCallback' | 'onProjectHeadLoaded' | 'onProjectHeadLoadedCallback' | 'onProjectSetupError' | 'onProjectSetupErrorCallback' | 'extensions' | 'onRenderedCallback' | 'handleIncommingWebsocketMessage' | 'handleNotificationChannelsMessage' | 'handlePersistChangeSetMessage' | 'getLogic' | 'injectLocalImplementationOfSearchExecution' | 'setup' | 'destroy' | 'requestModule' | 'socket' | 'events' | 'initRegistry'> {
|
|
2941
|
-
private readonly _editor;
|
|
2942
|
-
readonly id: string;
|
|
2943
|
-
constructor(registry: ExtensionsRegistry, _editor: IEditor, id?: string);
|
|
2944
|
-
get ready(): boolean;
|
|
2945
|
-
get hasLoadedLogic(): boolean;
|
|
2946
|
-
get destroyed(): boolean;
|
|
2947
|
-
get logicLoadingPromise(): Promise<void> | null;
|
|
2948
|
-
get logic(): ProjectState | null;
|
|
2949
|
-
get branch(): IActiveBranchHeadResult | null;
|
|
2950
|
-
get projectId(): EntityId;
|
|
2951
|
-
get sessionId(): string | null;
|
|
2952
|
-
get userAuthorId(): string;
|
|
2953
|
-
get peerConnections(): Record<string, IChannelConnections>;
|
|
2954
|
-
get test(): ITest | null;
|
|
2955
|
-
get localTestValues(): EfimeralValueStore;
|
|
2956
|
-
get resolvedValues(): EfimeralValueStore;
|
|
2957
|
-
get persistedExecutionResults(): EfimeralValueStore;
|
|
2958
|
-
get publication(): PublicationRun | null;
|
|
2959
|
-
get execution(): Execution | null;
|
|
2960
|
-
get project(): ProjectState;
|
|
2961
|
-
get lastExecutionResults(): EfimeralValueStore;
|
|
2962
|
-
get undoableStackValueIndex(): number;
|
|
2963
|
-
set undoableStackValueIndex(value: number);
|
|
2964
|
-
get PROJECT_NOTIFICATIONS_CHANNEL(): string;
|
|
2965
|
-
getAccessToken(): Promise<string | null>;
|
|
2966
|
-
removeValueByOwnerId(entityId: EntityId): void;
|
|
2967
|
-
removeValue(dynamicValue: IDynamicValue): void;
|
|
2968
|
-
undo(): Promise<void>;
|
|
2969
|
-
redo(): Promise<void>;
|
|
2970
|
-
initTest(entryPoint: TestableEntityState, autoExecute: boolean): Promise<ITest>;
|
|
2971
|
-
removeTest(): Promise<ITest>;
|
|
2972
|
-
copyEntities(entities: CanvasEntityState[]): Promise<ChangeSet>;
|
|
2973
|
-
resolveInitialChildrenPositions(parent: CanvasEntityState | null, children: CanvasEntityState[], changeSet: ChangeSet | null): CanvasEntityState[];
|
|
2974
|
-
publish(): Promise<void>;
|
|
2975
|
-
loadActivePublication(publicationId: string): Promise<IPublication>;
|
|
2976
|
-
requestActiveDynamicValue(valueOwner: EntityWithValueState): IDynamicValue | null;
|
|
2977
|
-
}
|
|
2978
|
-
|
|
2979
3124
|
export declare class EfimeralValueStore implements IValueStoreClient {
|
|
2980
3125
|
initialized: boolean;
|
|
2981
3126
|
id: string;
|
|
@@ -3589,15 +3734,13 @@ export declare class ExplicitInfrastructureResource extends InfrastructureResour
|
|
|
3589
3734
|
resolveDeterministicResourceId(): string;
|
|
3590
3735
|
}
|
|
3591
3736
|
|
|
3592
|
-
export declare
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
emit<Arguments extends any[]>(eventName: string, ...args: Arguments): void;
|
|
3600
|
-
off<Arguments extends any[]>(eventName: string, callback?: EventCallback<Arguments>): void;
|
|
3737
|
+
export declare class ExtensionContextBase<CT = ExtensionContextType> implements IExtensionContextBase {
|
|
3738
|
+
readonly extensionsRegistry: ExtensionsRegistry;
|
|
3739
|
+
readonly contextType: CT;
|
|
3740
|
+
constructor(extensionsRegistry: ExtensionsRegistry, contextType: CT);
|
|
3741
|
+
get off(): Events['off'];
|
|
3742
|
+
get on(): Events['on'];
|
|
3743
|
+
get emit(): Events['emit'];
|
|
3601
3744
|
}
|
|
3602
3745
|
|
|
3603
3746
|
export declare enum ExtensionContextType {
|
|
@@ -3655,9 +3798,9 @@ export declare enum ExtensionPermissions {
|
|
|
3655
3798
|
UpdateGUIGlobalTheme = "update:gui:global:theme"
|
|
3656
3799
|
}
|
|
3657
3800
|
|
|
3658
|
-
export declare class ExtensionsRegistry<TEditorContext extends
|
|
3801
|
+
export declare class ExtensionsRegistry<TEditorContext extends Omit<IEditorContext, '_editor'> = IEditorContext, TProjectLogicContext extends DefaultProjectLogicContext = DefaultProjectLogicContext> implements Omit<IEventsBus, 'destroy'> {
|
|
3659
3802
|
private events;
|
|
3660
|
-
private
|
|
3803
|
+
private extensionsRegistry;
|
|
3661
3804
|
onResolveEditorContextCallback: () => TEditorContext | null;
|
|
3662
3805
|
onResolveProjectLogicContextCallback: () => TProjectLogicContext | null;
|
|
3663
3806
|
onResolveGUIContextCallback: () => null;
|
|
@@ -3670,7 +3813,7 @@ export declare class ExtensionsRegistry<TEditorContext extends EditorContext = E
|
|
|
3670
3813
|
get extensionInOrder(): IRegisteredExtension[];
|
|
3671
3814
|
setup(): Promise<void>;
|
|
3672
3815
|
private requestContext;
|
|
3673
|
-
requestContexts(_module: IRegisteredExtension<any>, _contextTypes?: ExtensionContextType[]):
|
|
3816
|
+
requestContexts(_module: IRegisteredExtension<any>, _contextTypes?: ExtensionContextType[]): (TEditorContext | TProjectLogicContext)[];
|
|
3674
3817
|
requestModule<T>(moduleId: string): T;
|
|
3675
3818
|
register(extension: IRegisteredExtension<any>): void;
|
|
3676
3819
|
initAll(): Promise<void>;
|
|
@@ -9511,6 +9654,7 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
|
|
|
9511
9654
|
logic: ProjectState | null;
|
|
9512
9655
|
branch: IActiveBranchHeadResult | null;
|
|
9513
9656
|
projectId: EntityId;
|
|
9657
|
+
id: string;
|
|
9514
9658
|
sessionId: string | null;
|
|
9515
9659
|
userAuthorId: string;
|
|
9516
9660
|
peerConnections: Record<string, IChannelConnections>;
|
|
@@ -9521,7 +9665,8 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
|
|
|
9521
9665
|
socket: IWebsocketsClient;
|
|
9522
9666
|
events: Events;
|
|
9523
9667
|
publication: PublicationRun | null;
|
|
9524
|
-
|
|
9668
|
+
extensionsRegistry: ExtensionsRegistry<any>;
|
|
9669
|
+
contextType: ExtensionContextType.Editor;
|
|
9525
9670
|
onProjectHeadLoadedCallback: null | ((projectState: ProjectState) => void);
|
|
9526
9671
|
onLogicLoadingCompleteCallback: null | ((chunk: any) => void);
|
|
9527
9672
|
onProjectSetupErrorCallback: null | ((error: any) => void);
|
|
@@ -9548,6 +9693,9 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
|
|
|
9548
9693
|
}): Promise<ProjectState | null>;
|
|
9549
9694
|
undo(): Promise<void>;
|
|
9550
9695
|
redo(): Promise<void>;
|
|
9696
|
+
on: Events['on'];
|
|
9697
|
+
emit: Events['emit'];
|
|
9698
|
+
off: Events['off'];
|
|
9551
9699
|
injectLocalImplementationOfSearchExecution(): void;
|
|
9552
9700
|
setup(options: {
|
|
9553
9701
|
mockLogic?: ProjectState;
|
|
@@ -9560,7 +9708,10 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
|
|
|
9560
9708
|
publish(): Promise<void>;
|
|
9561
9709
|
loadActivePublication(publicationId: string): Promise<IPublication>;
|
|
9562
9710
|
requestModule<T = any>(moduleId: string): T;
|
|
9563
|
-
initRegistry(): Promise<ExtensionsRegistry
|
|
9711
|
+
initRegistry(): Promise<ExtensionsRegistry<any>>;
|
|
9712
|
+
}
|
|
9713
|
+
|
|
9714
|
+
export declare interface IEditorContext extends ExtensionContextBase<ExtensionContextType.Editor>, Omit<IEditor, 'onLogicLoadingComplete' | 'onLogicLoadingCompleteCallback' | 'onProjectHeadLoaded' | 'onProjectHeadLoadedCallback' | 'onProjectSetupError' | 'onProjectSetupErrorCallback' | 'onRenderedCallback' | 'handleIncommingWebsocketMessage' | 'handleNotificationChannelsMessage' | 'handlePersistChangeSetMessage' | 'getLogic' | 'injectLocalImplementationOfSearchExecution' | 'setup' | 'destroy' | 'requestModule' | 'socket' | 'events' | 'initRegistry' | 'extensionsRegistry' | 'on' | 'emit' | 'off' | 'contextType'> {
|
|
9564
9715
|
}
|
|
9565
9716
|
|
|
9566
9717
|
export declare interface IEntityActionRequestPayload<P extends {
|
|
@@ -9638,13 +9789,15 @@ export declare interface IExecutionResult {
|
|
|
9638
9789
|
results: IDynamicValue[];
|
|
9639
9790
|
}
|
|
9640
9791
|
|
|
9792
|
+
export declare type IExtensionContext = IEditorContext | IProjectLogicContext;
|
|
9793
|
+
|
|
9641
9794
|
declare interface IExtensionContextBase extends Omit<IEventsBus, 'destroy'> {
|
|
9642
|
-
|
|
9795
|
+
extensionsRegistry: ExtensionsRegistry;
|
|
9643
9796
|
}
|
|
9644
9797
|
|
|
9645
9798
|
export declare interface IExtensionModuleCore {
|
|
9646
9799
|
/** Called once on editor startup */
|
|
9647
|
-
init?(contexts:
|
|
9800
|
+
init?(contexts: DefaultExtensionContext[]): Promise<void> | void;
|
|
9648
9801
|
/** Cleanup hook */
|
|
9649
9802
|
destroy?(): Promise<void> | void;
|
|
9650
9803
|
}
|
|
@@ -10784,6 +10937,9 @@ export declare interface IProjectInstanceParentContext extends IProjectStaticPar
|
|
|
10784
10937
|
events: Events;
|
|
10785
10938
|
}
|
|
10786
10939
|
|
|
10940
|
+
export declare interface IProjectLogicContext extends ExtensionContextBase<ExtensionContextType.Logic>, IProject {
|
|
10941
|
+
}
|
|
10942
|
+
|
|
10787
10943
|
export declare interface IProjectReference extends IGenericReference {
|
|
10788
10944
|
entityType: EntityType.Project;
|
|
10789
10945
|
}
|
|
@@ -10902,7 +11058,7 @@ export declare interface IRecordChangeSet<TSelf extends {
|
|
|
10902
11058
|
}
|
|
10903
11059
|
|
|
10904
11060
|
export declare interface IRegisteredExtension<T extends object = {}> {
|
|
10905
|
-
|
|
11061
|
+
extensionsRegistry: ExtensionsRegistry;
|
|
10906
11062
|
manifest: ExtensionManifest;
|
|
10907
11063
|
module: ExtensionModule<T>;
|
|
10908
11064
|
}
|
|
@@ -12864,149 +13020,6 @@ export declare type ProjectDomain = string;
|
|
|
12864
13020
|
|
|
12865
13021
|
export declare type ProjectFetchResult = null | IProjectFetchResult;
|
|
12866
13022
|
|
|
12867
|
-
export declare class ProjectLogicContext extends ExtensionContextBase implements IProject {
|
|
12868
|
-
private readonly _project;
|
|
12869
|
-
constructor(registry: ExtensionsRegistry, _project: ProjectState);
|
|
12870
|
-
readonly id: EntityId;
|
|
12871
|
-
get type(): EntityType.Project;
|
|
12872
|
-
get name(): string | null;
|
|
12873
|
-
get description(): string | null;
|
|
12874
|
-
get version(): string;
|
|
12875
|
-
get createdAt(): string;
|
|
12876
|
-
get previousVersion(): string | null;
|
|
12877
|
-
get author(): string;
|
|
12878
|
-
get deleted(): boolean;
|
|
12879
|
-
get entities(): DefinitionEntityState[];
|
|
12880
|
-
get projects(): InstalledProjectState[];
|
|
12881
|
-
get functions(): FunctionDeclarationState[];
|
|
12882
|
-
get events(): GlobalEventState[];
|
|
12883
|
-
get variableDeclarations(): VariableDeclarationState[];
|
|
12884
|
-
get variableInstances(): VariableInstanceState[];
|
|
12885
|
-
get conditions(): ConditionState[];
|
|
12886
|
-
get operations(): OperationState[];
|
|
12887
|
-
get functionCalls(): FunctionCallState[];
|
|
12888
|
-
get loops(): LoopState[];
|
|
12889
|
-
get searches(): SearchState[];
|
|
12890
|
-
get primitives(): PrimitiveEntityState[];
|
|
12891
|
-
get builtInBaseEntities(): BuiltInBaseEntityState[];
|
|
12892
|
-
get operationDeclarations(): ActionDescriptorState[];
|
|
12893
|
-
get globalEventActionDescriptors(): ActionDescriptorState[];
|
|
12894
|
-
get loopDeclarations(): ActionDescriptorState[];
|
|
12895
|
-
get loopDeclarationsBodies(): ActionDescriptorState[];
|
|
12896
|
-
get conditionDeclarations(): ActionDescriptorState[];
|
|
12897
|
-
get valueDescriptors(): ValueDescriptorState[];
|
|
12898
|
-
get dataTypes(): DataTypeState[];
|
|
12899
|
-
get errors(): EntityError[];
|
|
12900
|
-
get history(): ChangeSet[];
|
|
12901
|
-
get undoableStackValueIndex(): number;
|
|
12902
|
-
get knownVersions(): Map<string, EntityState> | null;
|
|
12903
|
-
get activeVersion(): boolean;
|
|
12904
|
-
get initialized(): boolean;
|
|
12905
|
-
get startedInitialization(): boolean;
|
|
12906
|
-
closePendingChangeSets(): Promise<void>;
|
|
12907
|
-
closeChangeSet(changeSet: ChangeSet): Promise<void>;
|
|
12908
|
-
toLatestChangeSet(author: string, timestamp: string, // ISO 8601 format
|
|
12909
|
-
self: UserManagedEntityState | null, autoclose?: boolean, autoCloseActionName?: string): ChangeSet;
|
|
12910
|
-
addChangeSet(changeSet: ChangeSet): ChangeSet;
|
|
12911
|
-
discardChangeSet(changeSet: ChangeSet | null): ProjectState;
|
|
12912
|
-
subscribeDependents(dependencies: {
|
|
12913
|
-
entity: UserManagedEntityState;
|
|
12914
|
-
field: string;
|
|
12915
|
-
}[]): UserManagedEntityState;
|
|
12916
|
-
unsubscribeDependents(dependencies: {
|
|
12917
|
-
entity: UserManagedEntityState;
|
|
12918
|
-
field: string;
|
|
12919
|
-
}[]): UserManagedEntityState;
|
|
12920
|
-
syncDependents(changeSet?: ChangeSet | null): IChangeSet<UserManagedEntityState>;
|
|
12921
|
-
onDetachedDependencyRemoved(_dependency: UserManagedEntityState, _field: string, _changeSet: ChangeSet | null): IChangeSet<UserManagedEntityState>;
|
|
12922
|
-
onDetachedDependencyRestored(_dependency: UserManagedEntityState, _field: string, _changeSet: ChangeSet | null): IChangeSet<UserManagedEntityState>;
|
|
12923
|
-
increaseVersion(sharedTimestamp: null | string): UserManagedEntityState;
|
|
12924
|
-
captureVersion(): ProjectState;
|
|
12925
|
-
restoreVersion(versionId: EntityVersion): Promise<IChangeSet<ProjectState>>;
|
|
12926
|
-
updateWithShallowTransfer(transfer: IProjectShallowTransfer, changeSet?: ChangeSet | null): ProjectState;
|
|
12927
|
-
hydrateAncestors(): IChangeSet<ProjectState>;
|
|
12928
|
-
afterAllChildrenInitialized(changeSet?: ChangeSet | null): IChangeSet<ProjectState>;
|
|
12929
|
-
addSelfToProject(_changeSet: ChangeSet | null): IChangeSet<ProjectState>;
|
|
12930
|
-
get instancesList(): EntityState[];
|
|
12931
|
-
isOperationDeclaration(entity: ActionDescriptorState): boolean;
|
|
12932
|
-
isGlobalEventActionDescriptor(entity: ActionDescriptorState): boolean;
|
|
12933
|
-
isLoopDeclaration(entity: ActionDescriptorState): boolean;
|
|
12934
|
-
isConditionDeclaration(entity: ActionDescriptorState): boolean;
|
|
12935
|
-
findSubscribedBuiltInInstance(entity: Element_2 | ElementTransfer): EntityState | null;
|
|
12936
|
-
get(entityId: EntityId): EntityState | null;
|
|
12937
|
-
getDeleted(entityId: EntityId): EntityState | null;
|
|
12938
|
-
getManaged(entityId: EntityId): EntityState | null;
|
|
12939
|
-
getBuiltIn(entityId: EntityId): EntityState | null;
|
|
12940
|
-
findSubscribedInstanceFromReference(entity: Reference): EntityState | null;
|
|
12941
|
-
findSubscribedBuiltInInstanceFromReference(entity: Reference): EntityState | null;
|
|
12942
|
-
metaSync(data: Partial<IProject_meta | IProject | IProjectTransfer | IProjectShallowTransfer>, changeSet?: ChangeSet | null): ProjectState;
|
|
12943
|
-
getAllBuiltInIds(): EntityId[];
|
|
12944
|
-
getAllBuiltIn(): EntityState[];
|
|
12945
|
-
toFlat(seenEntities?: Set<EntityId>): EntityState[];
|
|
12946
|
-
toFlatIds(seenEntities?: Set<EntityId>): EntityId[];
|
|
12947
|
-
toMeta(): IProject_meta;
|
|
12948
|
-
toJSON(seenEntities?: Set<EntityId>): IProjectTransfer | IProjectReference;
|
|
12949
|
-
toJSONClone(options?: IEntityJSONCloneOptions): IProjectTransfer;
|
|
12950
|
-
toReference(options?: IEntityRecursionOptions): IProjectReference;
|
|
12951
|
-
toShallowJSON(options?: IEntityRecursionOptions): IProjectShallowTransfer;
|
|
12952
|
-
toFlatJSON(seenEntities?: Set<EntityId>): ElementShallowTransfer[];
|
|
12953
|
-
toGenerationTarget(): IProjectGenerationTarget;
|
|
12954
|
-
toFlatGenerationTarget(seenEntities?: Set<EntityId>): ElementGenerationTarget[];
|
|
12955
|
-
clearErrors(): ProjectState;
|
|
12956
|
-
validate(): {
|
|
12957
|
-
success: boolean;
|
|
12958
|
-
error: ZodError | null;
|
|
12959
|
-
data: IProjectTransfer | null;
|
|
12960
|
-
};
|
|
12961
|
-
validateChildren(): void;
|
|
12962
|
-
getErrors(): EntityError[];
|
|
12963
|
-
getShallowErrors(): EntityError[];
|
|
12964
|
-
getDefinitionEntity(id: EntityId): DefinitionEntityState | null;
|
|
12965
|
-
addDefinitionEntity(entity: DefinitionEntityState): DefinitionEntityState;
|
|
12966
|
-
addFunctionDeclaration(func: FunctionDeclarationState): FunctionDeclarationState;
|
|
12967
|
-
addFunctionCall(func: FunctionCallState): FunctionCallState;
|
|
12968
|
-
addVariableDeclaration(variable: VariableDeclarationState): VariableDeclarationState;
|
|
12969
|
-
addVariableInstance(variable: VariableInstanceState): VariableInstanceState;
|
|
12970
|
-
addInstalledProject(project: InstalledProjectState): ProjectState;
|
|
12971
|
-
addGlobalEvent(event: GlobalEventState): ProjectState;
|
|
12972
|
-
addCondition(condition: ConditionState): ProjectState;
|
|
12973
|
-
addOperation(operation: OperationState): ProjectState;
|
|
12974
|
-
addLoop(loop: LoopState): ProjectState;
|
|
12975
|
-
addSearch(search: SearchState): ProjectState;
|
|
12976
|
-
removeDefinitionEntity(entity: IDefinitionEntity): DefinitionEntityState | null;
|
|
12977
|
-
removeCondition(condition: ICondition): ConditionState | null;
|
|
12978
|
-
removeOperation(operation: IOperation): OperationState | null;
|
|
12979
|
-
removeLoop(loop: ILoop): LoopState | null;
|
|
12980
|
-
removeSearch(search: ISearch): SearchState | null;
|
|
12981
|
-
removeFunctionCall(funcCall: IFunctionCall): FunctionCallState | null;
|
|
12982
|
-
removeVariableInstance(variable: IVariableInstance): VariableInstanceState | null;
|
|
12983
|
-
removeVariableDeclaration(variable: IVariableDeclaration): VariableDeclarationState | null;
|
|
12984
|
-
removeFunctionDeclaration(func: IFunctionDeclaration): FunctionDeclarationState | null;
|
|
12985
|
-
removeInstalledProject(project: IInstalledProject): InstalledProjectState | null;
|
|
12986
|
-
removeGlobalEvent(event: IGlobalEvent): GlobalEventState | null;
|
|
12987
|
-
removeTopLevelVariableDeclaration(variable: VariableDeclarationState): VariableDeclarationState | null;
|
|
12988
|
-
getEntryPoints(): EntryPointEntityState[];
|
|
12989
|
-
getTerminationStatements(): TerminationState[];
|
|
12990
|
-
getFunctionDeclaration(id: EntityId): FunctionDeclarationState | null;
|
|
12991
|
-
getConditions(): ConditionState[];
|
|
12992
|
-
getOperations(): OperationState[];
|
|
12993
|
-
getVariables(): VariableState[];
|
|
12994
|
-
getVariableInstances(): VariableInstanceState[];
|
|
12995
|
-
getVariableDeclarations(): VariableDeclarationState[];
|
|
12996
|
-
getLoops(): LoopState[];
|
|
12997
|
-
getSearches(): SearchState[];
|
|
12998
|
-
getBuiltInPersistedEntity(): BuiltInBaseEntityState | null;
|
|
12999
|
-
requestActiveDynamicValue(valueOwner: EntityWithValueState): IDynamicValue | null;
|
|
13000
|
-
undo(): IProjectVersionTransitionConfig;
|
|
13001
|
-
redo(): IProjectVersionTransitionConfig;
|
|
13002
|
-
applyExternalChangeSet(request: PersistChangeSetEntityActionRequestPayload): ChangeSet;
|
|
13003
|
-
toFullProjectTransfer(): {
|
|
13004
|
-
order: EntityId[];
|
|
13005
|
-
size: number;
|
|
13006
|
-
record: Record<EntityId, UserManagedElementShallowTransfer>;
|
|
13007
|
-
};
|
|
13008
|
-
}
|
|
13009
|
-
|
|
13010
13023
|
export declare type ProjectPayloadUnion = ProjectState | ProjectTypesUnion;
|
|
13011
13024
|
|
|
13012
13025
|
export declare const projectPublicationCompletedGlobalEvent: IActionDescriptorTransfer;
|
|
@@ -14787,7 +14800,7 @@ export declare type TestableEntityState = ExecutableEntityState;
|
|
|
14787
14800
|
|
|
14788
14801
|
export declare function toCamelCase(str: string): string;
|
|
14789
14802
|
|
|
14790
|
-
export declare function toEditorContext(
|
|
14803
|
+
export declare function toEditorContext(extensionsRegistry: ExtensionsRegistry, editor: IEditor): DefaultEditorContext;
|
|
14791
14804
|
|
|
14792
14805
|
export declare function toEntityState(entity: string | EntityState | IGenericReference | Element_2 | ElementTransfer | ElementShallowTransfer | ElementGenerationTarget, project: ProjectState): EntityState | null;
|
|
14793
14806
|
|
|
@@ -14797,7 +14810,7 @@ export declare function toLowerCaseKebabCase(str: string): string;
|
|
|
14797
14810
|
|
|
14798
14811
|
export declare function toPascalCase(str: string): string;
|
|
14799
14812
|
|
|
14800
|
-
export declare function toProjectLogicContext(
|
|
14813
|
+
export declare function toProjectLogicContext(extensionsRegistry: ExtensionsRegistry, project: ProjectState): DefaultProjectLogicContext;
|
|
14801
14814
|
|
|
14802
14815
|
export declare function transitionProjectVersion(from: ChangeSet | 'initial', to: ChangeSet | 'initial', project: ProjectState): IProjectVersionTransitionConfig;
|
|
14803
14816
|
|