@elyx-code/project-logic-tree 0.0.6392 → 0.0.6394
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 +35 -26
- package/dist/index.js +464 -460
- 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 {
|
|
@@ -2937,10 +2937,10 @@ export declare enum DynamicValueTypes {
|
|
|
2937
2937
|
|
|
2938
2938
|
export declare const EDITABLE_PERSISTANCE_REPOSITORY_DEFAULTS: IEditableEntityPersistanceRepository;
|
|
2939
2939
|
|
|
2940
|
-
export declare class EditorContext extends ExtensionContextBase implements
|
|
2940
|
+
export declare class EditorContext extends ExtensionContextBase<ExtensionContextType.Editor> implements IEditorContext {
|
|
2941
2941
|
private readonly _editor;
|
|
2942
2942
|
readonly id: string;
|
|
2943
|
-
constructor(
|
|
2943
|
+
constructor(extensionsRegistry: ExtensionsRegistry, _editor: IEditor, id?: string);
|
|
2944
2944
|
get ready(): boolean;
|
|
2945
2945
|
get hasLoadedLogic(): boolean;
|
|
2946
2946
|
get destroyed(): boolean;
|
|
@@ -2968,7 +2968,7 @@ export declare class EditorContext extends ExtensionContextBase implements Omit<
|
|
|
2968
2968
|
undo(): Promise<void>;
|
|
2969
2969
|
redo(): Promise<void>;
|
|
2970
2970
|
initTest(entryPoint: TestableEntityState, autoExecute: boolean): Promise<ITest>;
|
|
2971
|
-
removeTest(): Promise<
|
|
2971
|
+
removeTest(): Promise<ITest>;
|
|
2972
2972
|
copyEntities(entities: CanvasEntityState[]): Promise<ChangeSet>;
|
|
2973
2973
|
resolveInitialChildrenPositions(parent: CanvasEntityState | null, children: CanvasEntityState[], changeSet: ChangeSet | null): CanvasEntityState[];
|
|
2974
2974
|
publish(): Promise<void>;
|
|
@@ -3591,13 +3591,13 @@ export declare class ExplicitInfrastructureResource extends InfrastructureResour
|
|
|
3591
3591
|
|
|
3592
3592
|
export declare type ExtensionContext = EditorContext | ProjectLogicContext;
|
|
3593
3593
|
|
|
3594
|
-
export declare class ExtensionContextBase implements IExtensionContextBase {
|
|
3595
|
-
readonly
|
|
3596
|
-
readonly contextType:
|
|
3597
|
-
constructor(
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3594
|
+
export declare class ExtensionContextBase<CT = ExtensionContextType> implements IExtensionContextBase {
|
|
3595
|
+
readonly extensionsRegistry: ExtensionsRegistry;
|
|
3596
|
+
readonly contextType: CT;
|
|
3597
|
+
constructor(extensionsRegistry: ExtensionsRegistry, contextType: CT);
|
|
3598
|
+
get off(): Events['off'];
|
|
3599
|
+
get on(): Events['on'];
|
|
3600
|
+
get emit(): Events['emit'];
|
|
3601
3601
|
}
|
|
3602
3602
|
|
|
3603
3603
|
export declare enum ExtensionContextType {
|
|
@@ -3655,22 +3655,22 @@ export declare enum ExtensionPermissions {
|
|
|
3655
3655
|
UpdateGUIGlobalTheme = "update:gui:global:theme"
|
|
3656
3656
|
}
|
|
3657
3657
|
|
|
3658
|
-
export declare class ExtensionsRegistry implements Omit<IEventsBus, 'destroy'> {
|
|
3658
|
+
export declare class ExtensionsRegistry<TEditorContext extends Omit<IEditorContext, '_editor'> = IEditorContext, TProjectLogicContext extends ProjectLogicContext = ProjectLogicContext> implements Omit<IEventsBus, 'destroy'> {
|
|
3659
3659
|
private events;
|
|
3660
|
-
private
|
|
3661
|
-
onResolveEditorContextCallback: () =>
|
|
3662
|
-
onResolveProjectLogicContextCallback: () =>
|
|
3660
|
+
private extensionsRegistry;
|
|
3661
|
+
onResolveEditorContextCallback: () => TEditorContext | null;
|
|
3662
|
+
onResolveProjectLogicContextCallback: () => TProjectLogicContext | null;
|
|
3663
3663
|
onResolveGUIContextCallback: () => null;
|
|
3664
3664
|
onResolveCompileContextCallback: () => null;
|
|
3665
3665
|
constructor(events?: Events);
|
|
3666
|
-
onResolveEditorContext(callback: () =>
|
|
3667
|
-
onResolveProjectLogicContext(callback: () =>
|
|
3666
|
+
onResolveEditorContext(callback: () => TEditorContext | null): void;
|
|
3667
|
+
onResolveProjectLogicContext(callback: () => TProjectLogicContext | null): void;
|
|
3668
3668
|
onResolveGUIContext(callback: () => null): void;
|
|
3669
3669
|
onResolveCompileContext(callback: () => null): void;
|
|
3670
3670
|
get extensionInOrder(): IRegisteredExtension[];
|
|
3671
3671
|
setup(): Promise<void>;
|
|
3672
3672
|
private requestContext;
|
|
3673
|
-
requestContexts(_module: IRegisteredExtension<any>, _contextTypes?: ExtensionContextType[]):
|
|
3673
|
+
requestContexts(_module: IRegisteredExtension<any>, _contextTypes?: ExtensionContextType[]): (TEditorContext | TProjectLogicContext)[];
|
|
3674
3674
|
requestModule<T>(moduleId: string): T;
|
|
3675
3675
|
register(extension: IRegisteredExtension<any>): void;
|
|
3676
3676
|
initAll(): Promise<void>;
|
|
@@ -9511,6 +9511,7 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
|
|
|
9511
9511
|
logic: ProjectState | null;
|
|
9512
9512
|
branch: IActiveBranchHeadResult | null;
|
|
9513
9513
|
projectId: EntityId;
|
|
9514
|
+
id: string;
|
|
9514
9515
|
sessionId: string | null;
|
|
9515
9516
|
userAuthorId: string;
|
|
9516
9517
|
peerConnections: Record<string, IChannelConnections>;
|
|
@@ -9521,7 +9522,8 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
|
|
|
9521
9522
|
socket: IWebsocketsClient;
|
|
9522
9523
|
events: Events;
|
|
9523
9524
|
publication: PublicationRun | null;
|
|
9524
|
-
|
|
9525
|
+
extensionsRegistry: ExtensionsRegistry<any>;
|
|
9526
|
+
contextType: ExtensionContextType.Editor;
|
|
9525
9527
|
onProjectHeadLoadedCallback: null | ((projectState: ProjectState) => void);
|
|
9526
9528
|
onLogicLoadingCompleteCallback: null | ((chunk: any) => void);
|
|
9527
9529
|
onProjectSetupErrorCallback: null | ((error: any) => void);
|
|
@@ -9548,18 +9550,25 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
|
|
|
9548
9550
|
}): Promise<ProjectState | null>;
|
|
9549
9551
|
undo(): Promise<void>;
|
|
9550
9552
|
redo(): Promise<void>;
|
|
9553
|
+
on: Events['on'];
|
|
9554
|
+
emit: Events['emit'];
|
|
9555
|
+
off: Events['off'];
|
|
9551
9556
|
injectLocalImplementationOfSearchExecution(): void;
|
|
9552
9557
|
setup(options: {
|
|
9553
9558
|
mockLogic?: ProjectState;
|
|
9554
9559
|
}): Promise<void>;
|
|
9555
9560
|
destroy(): Promise<void>;
|
|
9556
9561
|
initTest(entryPoint: TestableEntityState, autoExecute: boolean): Promise<ITest>;
|
|
9557
|
-
removeTest(): Promise<
|
|
9562
|
+
removeTest(): Promise<ITest>;
|
|
9558
9563
|
copyEntities(entities: CanvasEntityState[]): Promise<ChangeSet>;
|
|
9559
9564
|
resolveInitialChildrenPositions(parent: CanvasEntityState | null, children: CanvasEntityState[], changeSet: ChangeSet | null): CanvasEntityState[];
|
|
9560
9565
|
publish(): Promise<void>;
|
|
9561
9566
|
loadActivePublication(publicationId: string): Promise<IPublication>;
|
|
9562
9567
|
requestModule<T = any>(moduleId: string): T;
|
|
9568
|
+
initRegistry(): Promise<ExtensionsRegistry<any>>;
|
|
9569
|
+
}
|
|
9570
|
+
|
|
9571
|
+
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'> {
|
|
9563
9572
|
}
|
|
9564
9573
|
|
|
9565
9574
|
export declare interface IEntityActionRequestPayload<P extends {
|
|
@@ -9638,7 +9647,7 @@ export declare interface IExecutionResult {
|
|
|
9638
9647
|
}
|
|
9639
9648
|
|
|
9640
9649
|
declare interface IExtensionContextBase extends Omit<IEventsBus, 'destroy'> {
|
|
9641
|
-
|
|
9650
|
+
extensionsRegistry: ExtensionsRegistry;
|
|
9642
9651
|
}
|
|
9643
9652
|
|
|
9644
9653
|
export declare interface IExtensionModuleCore {
|
|
@@ -10901,7 +10910,7 @@ export declare interface IRecordChangeSet<TSelf extends {
|
|
|
10901
10910
|
}
|
|
10902
10911
|
|
|
10903
10912
|
export declare interface IRegisteredExtension<T extends object = {}> {
|
|
10904
|
-
|
|
10913
|
+
extensionsRegistry: ExtensionsRegistry;
|
|
10905
10914
|
manifest: ExtensionManifest;
|
|
10906
10915
|
module: ExtensionModule<T>;
|
|
10907
10916
|
}
|
|
@@ -12865,7 +12874,7 @@ export declare type ProjectFetchResult = null | IProjectFetchResult;
|
|
|
12865
12874
|
|
|
12866
12875
|
export declare class ProjectLogicContext extends ExtensionContextBase implements IProject {
|
|
12867
12876
|
private readonly _project;
|
|
12868
|
-
constructor(
|
|
12877
|
+
constructor(extensionsRegistry: ExtensionsRegistry, _project: ProjectState);
|
|
12869
12878
|
readonly id: EntityId;
|
|
12870
12879
|
get type(): EntityType.Project;
|
|
12871
12880
|
get name(): string | null;
|
|
@@ -14786,7 +14795,7 @@ export declare type TestableEntityState = ExecutableEntityState;
|
|
|
14786
14795
|
|
|
14787
14796
|
export declare function toCamelCase(str: string): string;
|
|
14788
14797
|
|
|
14789
|
-
export declare function toEditorContext(
|
|
14798
|
+
export declare function toEditorContext(extensionsRegistry: ExtensionsRegistry, editor: IEditor): EditorContext;
|
|
14790
14799
|
|
|
14791
14800
|
export declare function toEntityState(entity: string | EntityState | IGenericReference | Element_2 | ElementTransfer | ElementShallowTransfer | ElementGenerationTarget, project: ProjectState): EntityState | null;
|
|
14792
14801
|
|
|
@@ -14796,7 +14805,7 @@ export declare function toLowerCaseKebabCase(str: string): string;
|
|
|
14796
14805
|
|
|
14797
14806
|
export declare function toPascalCase(str: string): string;
|
|
14798
14807
|
|
|
14799
|
-
export declare function toProjectLogicContext(
|
|
14808
|
+
export declare function toProjectLogicContext(extensionsRegistry: ExtensionsRegistry, project: ProjectState): ProjectLogicContext;
|
|
14800
14809
|
|
|
14801
14810
|
export declare function transitionProjectVersion(from: ChangeSet | 'initial', to: ChangeSet | 'initial', project: ProjectState): IProjectVersionTransitionConfig;
|
|
14802
14811
|
|