@elyx-code/project-logic-tree 0.0.6402 → 0.0.6404

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 CHANGED
@@ -3738,9 +3738,9 @@ export declare class ExtensionContextBase<CT = ExtensionContextType> implements
3738
3738
  readonly extensionsRegistry: ExtensionsRegistry;
3739
3739
  readonly contextType: CT;
3740
3740
  constructor(extensionsRegistry: ExtensionsRegistry, contextType: CT);
3741
- get off(): Events['off'];
3742
- get on(): Events['on'];
3743
- get emit(): Events['emit'];
3741
+ on<Arguments extends any[]>(eventName: string, callback: EventCallback<Arguments>): void;
3742
+ emit<Arguments extends any[]>(eventName: string, ...args: Arguments): void;
3743
+ off<Arguments extends any[]>(eventName: string, callback?: EventCallback<Arguments>): void;
3744
3744
  }
3745
3745
 
3746
3746
  export declare enum ExtensionContextType {
@@ -3798,7 +3798,7 @@ export declare enum ExtensionPermissions {
3798
3798
  UpdateGUIGlobalTheme = "update:gui:global:theme"
3799
3799
  }
3800
3800
 
3801
- export declare class ExtensionsRegistry<TEditorContext extends Omit<IEditorContext, '_editor'> = IEditorContext, TProjectLogicContext extends DefaultProjectLogicContext = DefaultProjectLogicContext> implements Omit<IEventsBus, 'destroy'> {
3801
+ export declare class ExtensionsRegistry<TEditorContext extends Omit<IEditorContext, '_editor'> = IEditorContext, TProjectLogicContext extends DefaultProjectLogicContext = DefaultProjectLogicContext, TCompilerContext extends ICompilerContext = ICompilerContext> implements Omit<IEventsBus, 'destroy'> {
3802
3802
  private events;
3803
3803
  private extensionsRegistry;
3804
3804
  private initialized;
@@ -3806,16 +3806,16 @@ export declare class ExtensionsRegistry<TEditorContext extends Omit<IEditorConte
3806
3806
  onResolveEditorContextCallback: () => TEditorContext | null;
3807
3807
  onResolveProjectLogicContextCallback: () => TProjectLogicContext | null;
3808
3808
  onResolveGUIContextCallback: () => null;
3809
- onResolveCompileContextCallback: () => null;
3809
+ onResolveCompileContextCallback: () => TCompilerContext | null;
3810
3810
  constructor(events?: Events);
3811
3811
  onResolveEditorContext(callback: () => TEditorContext | null): void;
3812
3812
  onResolveProjectLogicContext(callback: () => TProjectLogicContext | null): void;
3813
3813
  onResolveGUIContext(callback: () => null): void;
3814
- onResolveCompileContext(callback: () => null): void;
3814
+ onResolveCompileContext(callback: () => TCompilerContext | null): void;
3815
3815
  get extensionInOrder(): IRegisteredExtension[];
3816
3816
  setup(): Promise<void>;
3817
3817
  private requestContext;
3818
- requestContexts(_module: IRegisteredExtension<any>, _contextTypes?: ExtensionContextType[]): (TEditorContext | TProjectLogicContext)[];
3818
+ requestContexts(_module: IRegisteredExtension<any>, _contextTypes?: ExtensionContextType[]): (TEditorContext | TProjectLogicContext | TCompilerContext)[];
3819
3819
  requestModule<T>(moduleId: string): T;
3820
3820
  register(extension: IRegisteredExtension<any>): void;
3821
3821
  initAll(): Promise<void>;
@@ -9419,6 +9419,9 @@ export declare interface ICompatibleSameBothLocalScope extends IScopeCompatibili
9419
9419
  type: ScopeCompatibilityType.SameBothLocal;
9420
9420
  }
9421
9421
 
9422
+ export declare interface ICompilerContext extends ExtensionContextBase<ExtensionContextType.Compile> {
9423
+ }
9424
+
9422
9425
  export declare interface ICondition extends IConditionTransfer, IChildEntity, ICalledEntity {
9423
9426
  inputs: IActionInputMap[];
9424
9427
  declaration: IActionDescriptor;
@@ -9793,7 +9796,7 @@ export declare interface IExecutionResult {
9793
9796
  results: IDynamicValue[];
9794
9797
  }
9795
9798
 
9796
- export declare type IExtensionContext = IEditorContext | IProjectLogicContext;
9799
+ export declare type IExtensionContext = IEditorContext | IProjectLogicContext | ICompilerContext;
9797
9800
 
9798
9801
  declare interface IExtensionContextBase extends Omit<IEventsBus, 'destroy'> {
9799
9802
  extensionsRegistry: ExtensionsRegistry;
package/dist/index.js CHANGED
@@ -85605,16 +85605,16 @@ let _It = class {
85605
85605
  };
85606
85606
  class $x {
85607
85607
  constructor(u, i) {
85608
- this.extensionsRegistry = u, this.contextType = i;
85608
+ this.extensionsRegistry = u, this.contextType = i, this.off = this.extensionsRegistry.off.bind(this.extensionsRegistry), this.on = this.extensionsRegistry.on.bind(this.extensionsRegistry), this.emit = this.extensionsRegistry.emit.bind(this.extensionsRegistry);
85609
85609
  }
85610
- get off() {
85611
- return this.extensionsRegistry.off;
85610
+ on(u, i) {
85611
+ this.extensionsRegistry.on(u, i);
85612
85612
  }
85613
- get on() {
85614
- return this.extensionsRegistry.on;
85613
+ emit(u, ...i) {
85614
+ this.extensionsRegistry.emit(u, ...i);
85615
85615
  }
85616
- get emit() {
85617
- return this.extensionsRegistry.emit;
85616
+ off(u, i) {
85617
+ this.extensionsRegistry.off(u, i);
85618
85618
  }
85619
85619
  }
85620
85620
  var et = /* @__PURE__ */ ((d) => (d[d.High = 1] = "High", d[d.Normal = 5] = "Normal", d[d.Low = 10] = "Low", d))(et || {}), Ae = /* @__PURE__ */ ((d) => (d.Logic = "logic", d.GUI = "gui", d.Editor = "editor", d.Compile = "compile", d))(Ae || {}), tt = /* @__PURE__ */ ((d) => (d.All = "*", d.OnAll = "on:*", d.EmitAll = "emit:*", d.ReadAll = "read:*", d.WriteAll = "write:*", d.UpdateAll = "update:*", d.DoAll = "do:*", d.OnLogicAll = "on:logic:*", d.EmitLogicAll = "emit:logic:*", d.ReadLogicAll = "read:logic:*", d.WriteLogicAll = "write:logic:*", d.UpdateLogicAll = "update:logic:*", d.DoLogicAll = "do:logic:*", d.OnGUIAll = "on:gui:*", d.EmitGUIAll = "emit:gui:*", d.ReadGUIAll = "read:gui:*", d.WriteGUIAll = "write:gui:*", d.UpdateGUIAll = "update:gui:*", d.DoGUIAll = "do:gui:*", d.OnEditorAll = "on:editor:*", d.EmitEditorAll = "emit:editor:*", d.ReadEditorAll = "read:editor:*", d.WriteEditorAll = "write:editor:*", d.UpdateEditorAll = "update:editor:*", d.DoEditorAll = "do:editor:*", d.OnCompileBefore = "on:compile:before:DefinitionEntity", d.OnCompileDefault = "on:compile:default:DefinitionEntity", d.OnCompileAfter = "on:compile:after:DefinitionEntity", d.EmitCompile = "emit:compile:DefinitionEntity", d.DoEditorPublish = "do:editor:publish", d.PostGUICanvasSlotNewToolbarButton = "write:gui:canvas:slot:toolbar-button", d.ReadGUICanvasSlotToolbarButtons = "read:gui:canvas:slot:toolbar-buttons", d.UpdateGUIGlobalTheme = "update:gui:global:theme", d))(tt || {});
@@ -91177,7 +91177,7 @@ class Iwt {
91177
91177
  g(this, "onResolveProjectLogicContextCallback", () => null);
91178
91178
  g(this, "onResolveGUIContextCallback", () => null);
91179
91179
  g(this, "onResolveCompileContextCallback", () => null);
91180
- this.events = u;
91180
+ this.events = u, this.off = this.events.off.bind(this.events), this.on = this.events.on.bind(this.events), this.emit = this.events.emit.bind(this.events);
91181
91181
  }
91182
91182
  onResolveEditorContext(u) {
91183
91183
  this.onResolveEditorContextCallback = u;