@elyx-code/project-logic-tree 0.0.6393 → 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 +29 -21
- package/dist/index.js +460 -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;
|
|
@@ -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,9 +3655,9 @@ export declare enum ExtensionPermissions {
|
|
|
3655
3655
|
UpdateGUIGlobalTheme = "update:gui:global:theme"
|
|
3656
3656
|
}
|
|
3657
3657
|
|
|
3658
|
-
export declare class ExtensionsRegistry<TEditorContext extends
|
|
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
|
|
3660
|
+
private extensionsRegistry;
|
|
3661
3661
|
onResolveEditorContextCallback: () => TEditorContext | null;
|
|
3662
3662
|
onResolveProjectLogicContextCallback: () => TProjectLogicContext | null;
|
|
3663
3663
|
onResolveGUIContextCallback: () => null;
|
|
@@ -3670,7 +3670,7 @@ export declare class ExtensionsRegistry<TEditorContext extends EditorContext = E
|
|
|
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,6 +9550,9 @@ 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;
|
|
@@ -9560,7 +9565,10 @@ export declare interface IEditor extends IUndoableInterface, IValueResolutionCon
|
|
|
9560
9565
|
publish(): Promise<void>;
|
|
9561
9566
|
loadActivePublication(publicationId: string): Promise<IPublication>;
|
|
9562
9567
|
requestModule<T = any>(moduleId: string): T;
|
|
9563
|
-
initRegistry(): Promise<ExtensionsRegistry
|
|
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'> {
|
|
9564
9572
|
}
|
|
9565
9573
|
|
|
9566
9574
|
export declare interface IEntityActionRequestPayload<P extends {
|
|
@@ -9639,7 +9647,7 @@ export declare interface IExecutionResult {
|
|
|
9639
9647
|
}
|
|
9640
9648
|
|
|
9641
9649
|
declare interface IExtensionContextBase extends Omit<IEventsBus, 'destroy'> {
|
|
9642
|
-
|
|
9650
|
+
extensionsRegistry: ExtensionsRegistry;
|
|
9643
9651
|
}
|
|
9644
9652
|
|
|
9645
9653
|
export declare interface IExtensionModuleCore {
|
|
@@ -10902,7 +10910,7 @@ export declare interface IRecordChangeSet<TSelf extends {
|
|
|
10902
10910
|
}
|
|
10903
10911
|
|
|
10904
10912
|
export declare interface IRegisteredExtension<T extends object = {}> {
|
|
10905
|
-
|
|
10913
|
+
extensionsRegistry: ExtensionsRegistry;
|
|
10906
10914
|
manifest: ExtensionManifest;
|
|
10907
10915
|
module: ExtensionModule<T>;
|
|
10908
10916
|
}
|
|
@@ -12866,7 +12874,7 @@ export declare type ProjectFetchResult = null | IProjectFetchResult;
|
|
|
12866
12874
|
|
|
12867
12875
|
export declare class ProjectLogicContext extends ExtensionContextBase implements IProject {
|
|
12868
12876
|
private readonly _project;
|
|
12869
|
-
constructor(
|
|
12877
|
+
constructor(extensionsRegistry: ExtensionsRegistry, _project: ProjectState);
|
|
12870
12878
|
readonly id: EntityId;
|
|
12871
12879
|
get type(): EntityType.Project;
|
|
12872
12880
|
get name(): string | null;
|
|
@@ -14787,7 +14795,7 @@ export declare type TestableEntityState = ExecutableEntityState;
|
|
|
14787
14795
|
|
|
14788
14796
|
export declare function toCamelCase(str: string): string;
|
|
14789
14797
|
|
|
14790
|
-
export declare function toEditorContext(
|
|
14798
|
+
export declare function toEditorContext(extensionsRegistry: ExtensionsRegistry, editor: IEditor): EditorContext;
|
|
14791
14799
|
|
|
14792
14800
|
export declare function toEntityState(entity: string | EntityState | IGenericReference | Element_2 | ElementTransfer | ElementShallowTransfer | ElementGenerationTarget, project: ProjectState): EntityState | null;
|
|
14793
14801
|
|
|
@@ -14797,7 +14805,7 @@ export declare function toLowerCaseKebabCase(str: string): string;
|
|
|
14797
14805
|
|
|
14798
14806
|
export declare function toPascalCase(str: string): string;
|
|
14799
14807
|
|
|
14800
|
-
export declare function toProjectLogicContext(
|
|
14808
|
+
export declare function toProjectLogicContext(extensionsRegistry: ExtensionsRegistry, project: ProjectState): ProjectLogicContext;
|
|
14801
14809
|
|
|
14802
14810
|
export declare function transitionProjectVersion(from: ChangeSet | 'initial', to: ChangeSet | 'initial', project: ProjectState): IProjectVersionTransitionConfig;
|
|
14803
14811
|
|