@awesome-ecs/abstract 0.27.0 → 0.29.0
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/components/index.cjs +2 -2
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/components/index.mjs.map +1 -1
- package/dist/entities/index.cjs +2 -3
- package/dist/entities/index.cjs.map +1 -1
- package/dist/entities/index.d.cts +2 -2
- package/dist/entities/index.d.mts +2 -2
- package/dist/entities/index.mjs +1 -2
- package/dist/entities/index.mjs.map +1 -1
- package/dist/factories/index.cjs +2 -2
- package/dist/factories/index.cjs.map +1 -1
- package/dist/factories/index.d.cts +3 -3
- package/dist/factories/index.d.mts +3 -3
- package/dist/factories/index.mjs +1 -1
- package/dist/factories/index.mjs.map +1 -1
- package/dist/{identity-component-CgzvgBVh.d.mts → identity-component-B3VGtdQW.d.mts} +2 -2
- package/dist/{identity-component-uU0yDR-y.d.cts → identity-component-CsU-wYTX.d.cts} +2 -2
- package/dist/{index-Iv388eRi.d.mts → index-BC8RgFVd.d.mts} +26 -15
- package/dist/{index-DeYfvKO0.d.mts → index-BRkKPsOV.d.cts} +3 -3
- package/dist/{index-BQojRXVz.d.cts → index-C8yZ7-zP.d.mts} +3 -3
- package/dist/{index-s3-CSfQd.d.cts → index-CBxqWVDf.d.mts} +26 -10
- package/dist/{index-hHkhvmkO.d.mts → index-DCx0PjvH.d.cts} +1 -1
- package/dist/{index-xgRroB4J.d.mts → index-DTHsTJ1j.d.cts} +26 -10
- package/dist/{index-BPKNH5VY.d.cts → index-Df4VhCPr.d.cts} +26 -15
- package/dist/{index-Cs9Eerjt.d.cts → index-EpAQRAeF.d.mts} +1 -1
- package/dist/pipelines/index.d.cts +1 -1
- package/dist/pipelines/index.d.mts +1 -1
- package/dist/pipelines/index.mjs +1 -1
- package/dist/systems/index.cjs +2 -2
- package/dist/systems/index.cjs.map +1 -1
- package/dist/systems/index.d.cts +1 -1
- package/dist/systems/index.d.mts +1 -1
- package/dist/systems/index.mjs +1 -1
- package/dist/systems/index.mjs.map +1 -1
- package/dist/{types-CnDtpKsY.d.mts → types-DqWnkvhp.d.cts} +1 -1
- package/dist/{types-DLOd2zXO.d.cts → types-aD9p7TDy.d.mts} +1 -1
- package/dist/utils/index.cjs +2 -3
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +2 -2
- package/dist/utils/index.d.mts +2 -2
- package/dist/utils/index.mjs +1 -2
- package/dist/utils/index.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region src/components/identity-component.ts
|
|
3
3
|
/**
|
|
4
4
|
* The `BasicComponentType` enum defines the types of basic components available.
|
|
@@ -7,7 +7,7 @@ let BasicComponentType = /* @__PURE__ */ function(BasicComponentType) {
|
|
|
7
7
|
BasicComponentType["identity"] = "identity";
|
|
8
8
|
return BasicComponentType;
|
|
9
9
|
}({});
|
|
10
|
-
|
|
11
10
|
//#endregion
|
|
12
11
|
exports.BasicComponentType = BasicComponentType;
|
|
12
|
+
|
|
13
13
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/components/identity-component.ts"],"sourcesContent":["import { EntityTypeUid, IEntityModel } from '../entities/entity';\r\nimport { Immutable } from '../utils/types';\r\nimport { IComponent } from './component';\r\n\r\n/**\r\n * The `BasicComponentType` enum defines the types of basic components available.\r\n */\r\nexport enum BasicComponentType {\r\n identity = 'identity'\r\n}\r\n\r\n/**\r\n * The mandatory metadata component for every entity.\r\n * Contains core information that defines what an entity is and when it was last updated.\r\n * This component is immutable after creation and uniquely identifies each entity.\r\n *\r\n * @template TModel - The entity model type containing initialization data.\r\n */\r\nexport interface IdentityComponent<TModel extends IEntityModel> extends IComponent {\r\n /**\r\n * The entity type classification.\r\n * Categorizes entities into logical types, allowing systems to selectively operate on specific entity categories.\r\n */\r\n readonly entityType: EntityTypeUid;\r\n\r\n /**\r\n * The initialization model for this entity.\r\n * Provides the minimal data structure used when the entity was first created.\r\n * Serves as a reference point for the entity's initial configuration.\r\n *\r\n * @type {Immutable<TModel>}\r\n */\r\n readonly model: Immutable<TModel>;\r\n\r\n /**\r\n * The timestamp of the entity's last system update.\r\n * Useful for calculating elapsed time (delta time) between consecutive updates.\r\n * Helps systems make time-aware decisions.\r\n *\r\n * @type {Date | undefined}\r\n */\r\n readonly lastUpdated?: Date;\r\n}\r\n"],"mappings":";;;;;AAOA,IAAY,
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/components/identity-component.ts"],"sourcesContent":["import { EntityTypeUid, IEntityModel } from '../entities/entity';\r\nimport { Immutable } from '../utils/types';\r\nimport { IComponent } from './component';\r\n\r\n/**\r\n * The `BasicComponentType` enum defines the types of basic components available.\r\n */\r\nexport enum BasicComponentType {\r\n identity = 'identity'\r\n}\r\n\r\n/**\r\n * The mandatory metadata component for every entity.\r\n * Contains core information that defines what an entity is and when it was last updated.\r\n * This component is immutable after creation and uniquely identifies each entity.\r\n *\r\n * @template TModel - The entity model type containing initialization data.\r\n */\r\nexport interface IdentityComponent<TModel extends IEntityModel> extends IComponent {\r\n /**\r\n * The entity type classification.\r\n * Categorizes entities into logical types, allowing systems to selectively operate on specific entity categories.\r\n */\r\n readonly entityType: EntityTypeUid;\r\n\r\n /**\r\n * The initialization model for this entity.\r\n * Provides the minimal data structure used when the entity was first created.\r\n * Serves as a reference point for the entity's initial configuration.\r\n *\r\n * @type {Immutable<TModel>}\r\n */\r\n readonly model: Immutable<TModel>;\r\n\r\n /**\r\n * The timestamp of the entity's last system update.\r\n * Useful for calculating elapsed time (delta time) between consecutive updates.\r\n * Helps systems make time-aware decisions.\r\n *\r\n * @type {Date | undefined}\r\n */\r\n readonly lastUpdated?: Date;\r\n}\r\n"],"mappings":";;;;;AAOA,IAAY,qBAAL,yBAAA,oBAAA;AACL,oBAAA,cAAA;;KACD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { f as ComponentTypeUid, n as IdentityComponent, p as IComponent, t as BasicComponentType } from "../identity-component-
|
|
1
|
+
import { f as ComponentTypeUid, n as IdentityComponent, p as IComponent, t as BasicComponentType } from "../identity-component-CsU-wYTX.cjs";
|
|
2
2
|
export { BasicComponentType, ComponentTypeUid, IComponent, IdentityComponent };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { f as ComponentTypeUid, n as IdentityComponent, p as IComponent, t as BasicComponentType } from "../identity-component-
|
|
1
|
+
import { f as ComponentTypeUid, n as IdentityComponent, p as IComponent, t as BasicComponentType } from "../identity-component-B3VGtdQW.mjs";
|
|
2
2
|
export { BasicComponentType, ComponentTypeUid, IComponent, IdentityComponent };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/components/identity-component.ts"],"sourcesContent":["import { EntityTypeUid, IEntityModel } from '../entities/entity';\r\nimport { Immutable } from '../utils/types';\r\nimport { IComponent } from './component';\r\n\r\n/**\r\n * The `BasicComponentType` enum defines the types of basic components available.\r\n */\r\nexport enum BasicComponentType {\r\n identity = 'identity'\r\n}\r\n\r\n/**\r\n * The mandatory metadata component for every entity.\r\n * Contains core information that defines what an entity is and when it was last updated.\r\n * This component is immutable after creation and uniquely identifies each entity.\r\n *\r\n * @template TModel - The entity model type containing initialization data.\r\n */\r\nexport interface IdentityComponent<TModel extends IEntityModel> extends IComponent {\r\n /**\r\n * The entity type classification.\r\n * Categorizes entities into logical types, allowing systems to selectively operate on specific entity categories.\r\n */\r\n readonly entityType: EntityTypeUid;\r\n\r\n /**\r\n * The initialization model for this entity.\r\n * Provides the minimal data structure used when the entity was first created.\r\n * Serves as a reference point for the entity's initial configuration.\r\n *\r\n * @type {Immutable<TModel>}\r\n */\r\n readonly model: Immutable<TModel>;\r\n\r\n /**\r\n * The timestamp of the entity's last system update.\r\n * Useful for calculating elapsed time (delta time) between consecutive updates.\r\n * Helps systems make time-aware decisions.\r\n *\r\n * @type {Date | undefined}\r\n */\r\n readonly lastUpdated?: Date;\r\n}\r\n"],"mappings":";;;;AAOA,IAAY,
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/components/identity-component.ts"],"sourcesContent":["import { EntityTypeUid, IEntityModel } from '../entities/entity';\r\nimport { Immutable } from '../utils/types';\r\nimport { IComponent } from './component';\r\n\r\n/**\r\n * The `BasicComponentType` enum defines the types of basic components available.\r\n */\r\nexport enum BasicComponentType {\r\n identity = 'identity'\r\n}\r\n\r\n/**\r\n * The mandatory metadata component for every entity.\r\n * Contains core information that defines what an entity is and when it was last updated.\r\n * This component is immutable after creation and uniquely identifies each entity.\r\n *\r\n * @template TModel - The entity model type containing initialization data.\r\n */\r\nexport interface IdentityComponent<TModel extends IEntityModel> extends IComponent {\r\n /**\r\n * The entity type classification.\r\n * Categorizes entities into logical types, allowing systems to selectively operate on specific entity categories.\r\n */\r\n readonly entityType: EntityTypeUid;\r\n\r\n /**\r\n * The initialization model for this entity.\r\n * Provides the minimal data structure used when the entity was first created.\r\n * Serves as a reference point for the entity's initial configuration.\r\n *\r\n * @type {Immutable<TModel>}\r\n */\r\n readonly model: Immutable<TModel>;\r\n\r\n /**\r\n * The timestamp of the entity's last system update.\r\n * Useful for calculating elapsed time (delta time) between consecutive updates.\r\n * Helps systems make time-aware decisions.\r\n *\r\n * @type {Date | undefined}\r\n */\r\n readonly lastUpdated?: Date;\r\n}\r\n"],"mappings":";;;;AAOA,IAAY,qBAAL,yBAAA,oBAAA;AACL,oBAAA,cAAA;;KACD"}
|
package/dist/entities/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region src/entities/entity-queue.ts
|
|
3
3
|
/**
|
|
4
4
|
* Specifies the action to be performed on an entity.
|
|
@@ -15,7 +15,6 @@ let EntityUpdateType = /* @__PURE__ */ function(EntityUpdateType) {
|
|
|
15
15
|
EntityUpdateType["remove"] = "remove";
|
|
16
16
|
return EntityUpdateType;
|
|
17
17
|
}({});
|
|
18
|
-
|
|
19
18
|
//#endregion
|
|
20
19
|
//#region src/entities/entity-scheduler.ts
|
|
21
20
|
/**
|
|
@@ -30,8 +29,8 @@ let SchedulerPauseType = /* @__PURE__ */ function(SchedulerPauseType) {
|
|
|
30
29
|
SchedulerPauseType["intervals"] = "intervals";
|
|
31
30
|
return SchedulerPauseType;
|
|
32
31
|
}({});
|
|
33
|
-
|
|
34
32
|
//#endregion
|
|
35
33
|
exports.EntityUpdateType = EntityUpdateType;
|
|
36
34
|
exports.SchedulerPauseType = SchedulerPauseType;
|
|
35
|
+
|
|
37
36
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/entities/entity-queue.ts","../../src/entities/entity-scheduler.ts"],"sourcesContent":["import { IEntityModel } from './entity';\r\nimport { IEntityProxy } from './entity-proxies';\r\nimport { IEntitySnapshot } from './entity-snapshot';\r\n\r\n/**\r\n * Specifies the action to be performed on an entity.\r\n * Updates are categorized to enable different processing paths in the runtime.\r\n */\r\nexport enum EntityUpdateType {\r\n /**\r\n * Indicates the entity should be updated with new data.\r\n */\r\n update = 'update',\r\n /**\r\n * Indicates the entity should be removed from the system.\r\n */\r\n remove = 'remove'\r\n}\r\n\r\n/**\r\n * Represents a queued entity state change or removal.\r\n * Updates flow through the system to be processed by entity update handlers.\r\n */\r\nexport interface IEntityUpdate {\r\n /**\r\n * The type of operation: update or remove.\r\n */\r\n readonly type: EntityUpdateType;\r\n\r\n /**\r\n * The entity being affected by this update.\r\n */\r\n readonly entity: IEntityProxy;\r\n\r\n /**\r\n * Optional model data for initialization or reconfiguration.\r\n */\r\n readonly model?: IEntityModel;\r\n\r\n /**\r\n * Optional serialized state to apply to the entity.\r\n */\r\n readonly snapshot?: IEntitySnapshot;\r\n}\r\n\r\n/**\r\n * Queue interface for managing pending entity updates.\r\n * Different implementations may use different prioritization strategies (e.g., priority queues, FIFO, ordered by entity type).\r\n * Updates are consumed by the runtime and dispatched to appropriate entity systems.\r\n */\r\nexport interface IEntityUpdateQueue {\r\n /**\r\n * The current number of updates in the queue.\r\n */\r\n readonly size: number;\r\n\r\n /**\r\n * Adds an update to the queue for processing.\r\n * @param change - The update to queue.\r\n */\r\n enqueue(change: IEntityUpdate): void;\r\n\r\n /**\r\n * Removes and returns the next update from the queue.\r\n * The specific update returned depends on the queue's prioritization strategy.\r\n * @returns The next queued update.\r\n */\r\n dequeue(): IEntityUpdate;\r\n\r\n /**\r\n * Views the next update without removing it.\r\n * Useful for inspection before dequeuing.\r\n * @returns The next update in the queue.\r\n */\r\n peek(): IEntityUpdate;\r\n\r\n /**\r\n * Removes all updates from the queue.\r\n */\r\n clear(): void;\r\n}\r\n","import { EntityTypeUid } from './entity';\r\nimport { IEntityProxy } from './entity-proxies';\r\n\r\n/**\r\n * Describes a scheduled entity update, including the target entity and optional interval.\r\n */\r\nexport type EntitySchedule = {\r\n readonly proxy: IEntityProxy;\r\n readonly intervalMs?: number;\r\n};\r\n\r\n/**\r\n * Controls which scheduling modes are paused.\r\n */\r\nexport enum SchedulerPauseType {\r\n /** Pause both interval timers and frame subscriptions. */\r\n full = 'full',\r\n /** Pause only frame subscriptions. Interval timers continue firing. */\r\n perFrame = 'perFrame',\r\n /** Pause only interval timers. Frame subscriptions continue. */\r\n intervals = 'intervals'\r\n}\r\n\r\n/**\r\n * Manages time-based scheduling of entity updates.\r\n *\r\n * Entities can be scheduled with an interval (timer-driven) or without one (per-frame).\r\n * The runtime pulls pending entities each tick via the {@link pending} iterator,\r\n * which yields both per-frame subscriptions and interval entities whose timer has fired.\r\n */\r\nexport interface IEntityScheduler {\r\n /**\r\n * Returns all currently scheduled entities with their configuration.\r\n * Useful for inspection and debugging.\r\n */\r\n readonly schedules: ReadonlyArray<EntitySchedule>;\r\n\r\n /**\r\n * Yields entities pending processing this tick: per-frame subscriptions\r\n * followed by interval entities whose timer has fired since the last drain.\r\n * Iterating drains the due interval buckets; a second iteration without\r\n * timer advancement yields only per-frame subscriptions.\r\n */\r\n readonly pending: IterableIterator<IEntityProxy>;\r\n\r\n /**\r\n * The set of entities scheduled for per-frame updates (no interval).\r\n */\r\n readonly frameSubscriptions: ReadonlySet<IEntityProxy>;\r\n\r\n /**\r\n * Entity types currently excluded from {@link pending} iteration.\r\n */\r\n readonly skippedEntityTypes: ReadonlySet<EntityTypeUid>;\r\n\r\n /**\r\n * The number of entities currently awaiting processing:\r\n * per-frame subscriptions (if not paused) plus interval entities whose timer has fired.\r\n */\r\n readonly pendingCount: number;\r\n\r\n /**\r\n * Whether the scheduler is currently paused in any mode.\r\n */\r\n readonly isPaused: boolean;\r\n\r\n /**\r\n * Registers an entity for updates.\r\n * @param entityProxy - The entity to schedule.\r\n * @param intervalMs - Update frequency in milliseconds. If omitted, the entity is scheduled per-frame.\r\n */\r\n schedule(entityProxy: IEntityProxy, intervalMs?: number): void;\r\n\r\n /**\r\n * Unregisters an entity from the scheduler.\r\n * @param entityProxy - The entity to unschedule.\r\n */\r\n remove(entityProxy: IEntityProxy): void;\r\n\r\n /**\r\n * Checks if an entity is currently scheduled for updates.\r\n * @param entityProxy - The entity to check.\r\n * @returns True if the entity is scheduled, false otherwise.\r\n */\r\n has(entityProxy: IEntityProxy): boolean;\r\n\r\n /**\r\n * Removes all schedules and clears all timers.\r\n */\r\n clear(): void;\r\n\r\n /**\r\n * Excludes an entity type from {@link pending} iteration.\r\n * Entities remain registered; only yielding is suppressed.\r\n */\r\n skipEntityType(entityType: EntityTypeUid): void;\r\n\r\n /**\r\n * Re-includes a previously skipped entity type in {@link pending} iteration.\r\n */\r\n unskipEntityType(entityType: EntityTypeUid): void;\r\n\r\n /**\r\n * Pauses the scheduler.\r\n * @param type - Which scheduling modes to pause. Defaults to {@link SchedulerPauseType.full}.\r\n */\r\n pause(type?: SchedulerPauseType): void;\r\n\r\n /**\r\n * Resumes the scheduler from any paused state.\r\n */\r\n resume(): void;\r\n}\r\n"],"mappings":";;;;;;AAQA,IAAY,
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/entities/entity-queue.ts","../../src/entities/entity-scheduler.ts"],"sourcesContent":["import { IEntityModel } from './entity';\r\nimport { IEntityProxy } from './entity-proxies';\r\nimport { IEntitySnapshot } from './entity-snapshot';\r\n\r\n/**\r\n * Specifies the action to be performed on an entity.\r\n * Updates are categorized to enable different processing paths in the runtime.\r\n */\r\nexport enum EntityUpdateType {\r\n /**\r\n * Indicates the entity should be updated with new data.\r\n */\r\n update = 'update',\r\n /**\r\n * Indicates the entity should be removed from the system.\r\n */\r\n remove = 'remove'\r\n}\r\n\r\n/**\r\n * Represents a queued entity state change or removal.\r\n * Updates flow through the system to be processed by entity update handlers.\r\n */\r\nexport interface IEntityUpdate {\r\n /**\r\n * The type of operation: update or remove.\r\n */\r\n readonly type: EntityUpdateType;\r\n\r\n /**\r\n * The entity being affected by this update.\r\n */\r\n readonly entity: IEntityProxy;\r\n\r\n /**\r\n * Optional model data for initialization or reconfiguration.\r\n */\r\n readonly model?: IEntityModel;\r\n\r\n /**\r\n * Optional serialized state to apply to the entity.\r\n */\r\n readonly snapshot?: IEntitySnapshot;\r\n}\r\n\r\n/**\r\n * Queue interface for managing pending entity updates.\r\n * Different implementations may use different prioritization strategies (e.g., priority queues, FIFO, ordered by entity type).\r\n * Updates are consumed by the runtime and dispatched to appropriate entity systems.\r\n */\r\nexport interface IEntityUpdateQueue {\r\n /**\r\n * The current number of updates in the queue.\r\n */\r\n readonly size: number;\r\n\r\n /**\r\n * Adds an update to the queue for processing.\r\n * @param change - The update to queue.\r\n */\r\n enqueue(change: IEntityUpdate): void;\r\n\r\n /**\r\n * Removes and returns the next update from the queue.\r\n * The specific update returned depends on the queue's prioritization strategy.\r\n * @returns The next queued update.\r\n */\r\n dequeue(): IEntityUpdate;\r\n\r\n /**\r\n * Views the next update without removing it.\r\n * Useful for inspection before dequeuing.\r\n * @returns The next update in the queue.\r\n */\r\n peek(): IEntityUpdate;\r\n\r\n /**\r\n * Removes all updates from the queue.\r\n */\r\n clear(): void;\r\n}\r\n","import { EntityTypeUid } from './entity';\r\nimport { IEntityProxy } from './entity-proxies';\r\n\r\n/**\r\n * Describes a scheduled entity update, including the target entity and optional interval.\r\n */\r\nexport type EntitySchedule = {\r\n readonly proxy: IEntityProxy;\r\n readonly intervalMs?: number;\r\n};\r\n\r\n/**\r\n * Controls which scheduling modes are paused.\r\n */\r\nexport enum SchedulerPauseType {\r\n /** Pause both interval timers and frame subscriptions. */\r\n full = 'full',\r\n /** Pause only frame subscriptions. Interval timers continue firing. */\r\n perFrame = 'perFrame',\r\n /** Pause only interval timers. Frame subscriptions continue. */\r\n intervals = 'intervals'\r\n}\r\n\r\n/**\r\n * Manages time-based scheduling of entity updates.\r\n *\r\n * Entities can be scheduled with an interval (timer-driven) or without one (per-frame).\r\n * The runtime pulls pending entities each tick via the {@link pending} iterator,\r\n * which yields both per-frame subscriptions and interval entities whose timer has fired.\r\n */\r\nexport interface IEntityScheduler {\r\n /**\r\n * Returns all currently scheduled entities with their configuration.\r\n * Useful for inspection and debugging.\r\n */\r\n readonly schedules: ReadonlyArray<EntitySchedule>;\r\n\r\n /**\r\n * Yields entities pending processing this tick: per-frame subscriptions\r\n * followed by interval entities whose timer has fired since the last drain.\r\n * Iterating drains the due interval buckets; a second iteration without\r\n * timer advancement yields only per-frame subscriptions.\r\n */\r\n readonly pending: IterableIterator<IEntityProxy>;\r\n\r\n /**\r\n * The set of entities scheduled for per-frame updates (no interval).\r\n */\r\n readonly frameSubscriptions: ReadonlySet<IEntityProxy>;\r\n\r\n /**\r\n * Entity types currently excluded from {@link pending} iteration.\r\n */\r\n readonly skippedEntityTypes: ReadonlySet<EntityTypeUid>;\r\n\r\n /**\r\n * The number of entities currently awaiting processing:\r\n * per-frame subscriptions (if not paused) plus interval entities whose timer has fired.\r\n */\r\n readonly pendingCount: number;\r\n\r\n /**\r\n * Whether the scheduler is currently paused in any mode.\r\n */\r\n readonly isPaused: boolean;\r\n\r\n /**\r\n * Registers an entity for updates.\r\n * @param entityProxy - The entity to schedule.\r\n * @param intervalMs - Update frequency in milliseconds. If omitted, the entity is scheduled per-frame.\r\n */\r\n schedule(entityProxy: IEntityProxy, intervalMs?: number): void;\r\n\r\n /**\r\n * Unregisters an entity from the scheduler.\r\n * @param entityProxy - The entity to unschedule.\r\n */\r\n remove(entityProxy: IEntityProxy): void;\r\n\r\n /**\r\n * Checks if an entity is currently scheduled for updates.\r\n * @param entityProxy - The entity to check.\r\n * @returns True if the entity is scheduled, false otherwise.\r\n */\r\n has(entityProxy: IEntityProxy): boolean;\r\n\r\n /**\r\n * Removes all schedules and clears all timers.\r\n */\r\n clear(): void;\r\n\r\n /**\r\n * Excludes an entity type from {@link pending} iteration.\r\n * Entities remain registered; only yielding is suppressed.\r\n */\r\n skipEntityType(entityType: EntityTypeUid): void;\r\n\r\n /**\r\n * Re-includes a previously skipped entity type in {@link pending} iteration.\r\n */\r\n unskipEntityType(entityType: EntityTypeUid): void;\r\n\r\n /**\r\n * Pauses the scheduler.\r\n * @param type - Which scheduling modes to pause. Defaults to {@link SchedulerPauseType.full}.\r\n */\r\n pause(type?: SchedulerPauseType): void;\r\n\r\n /**\r\n * Resumes the scheduler from any paused state.\r\n */\r\n resume(): void;\r\n}\r\n"],"mappings":";;;;;;AAQA,IAAY,mBAAL,yBAAA,kBAAA;;;;AAIL,kBAAA,YAAA;;;;AAIA,kBAAA,YAAA;;KACD;;;;;;ACHD,IAAY,qBAAL,yBAAA,oBAAA;;AAEL,oBAAA,UAAA;;AAEA,oBAAA,cAAA;;AAEA,oBAAA,eAAA;;KACD"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as IEntity, c as IEntityProxy, d as TypedEntityProxy, i as EntityUid, l as IEntityProxyRepository, o as IEntityModel, r as EntityTypeUid, s as EntityProxy, u as RequiredProxies } from "../identity-component-
|
|
2
|
-
import { a as EntityUpdateType, c as IEntitySnapshot, d as EntityEventSubscriptionOptions, f as EntityEventUid, g as IEventData, h as IEntityEventsManager, i as IEntityRepository, l as IEntitySnapshotProvider, m as IEntityEventsDispatcher, n as IEntityScheduler, o as IEntityUpdate, p as IEntityEvent, r as SchedulerPauseType, s as IEntityUpdateQueue, t as EntitySchedule, u as EntityEventSubscriptionFilter } from "../index-
|
|
1
|
+
import { a as IEntity, c as IEntityProxy, d as TypedEntityProxy, i as EntityUid, l as IEntityProxyRepository, o as IEntityModel, r as EntityTypeUid, s as EntityProxy, u as RequiredProxies } from "../identity-component-CsU-wYTX.cjs";
|
|
2
|
+
import { a as EntityUpdateType, c as IEntitySnapshot, d as EntityEventSubscriptionOptions, f as EntityEventUid, g as IEventData, h as IEntityEventsManager, i as IEntityRepository, l as IEntitySnapshotProvider, m as IEntityEventsDispatcher, n as IEntityScheduler, o as IEntityUpdate, p as IEntityEvent, r as SchedulerPauseType, s as IEntityUpdateQueue, t as EntitySchedule, u as EntityEventSubscriptionFilter } from "../index-DTHsTJ1j.cjs";
|
|
3
3
|
export { EntityEventSubscriptionFilter, EntityEventSubscriptionOptions, EntityEventUid, EntityProxy, EntitySchedule, EntityTypeUid, EntityUid, EntityUpdateType, IEntity, IEntityEvent, IEntityEventsDispatcher, IEntityEventsManager, IEntityModel, IEntityProxy, IEntityProxyRepository, IEntityRepository, IEntityScheduler, IEntitySnapshot, IEntitySnapshotProvider, IEntityUpdate, IEntityUpdateQueue, IEventData, RequiredProxies, SchedulerPauseType, TypedEntityProxy };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as IEntity, c as IEntityProxy, d as TypedEntityProxy, i as EntityUid, l as IEntityProxyRepository, o as IEntityModel, r as EntityTypeUid, s as EntityProxy, u as RequiredProxies } from "../identity-component-
|
|
2
|
-
import { a as EntityUpdateType, c as IEntitySnapshot, d as EntityEventSubscriptionOptions, f as EntityEventUid, g as IEventData, h as IEntityEventsManager, i as IEntityRepository, l as IEntitySnapshotProvider, m as IEntityEventsDispatcher, n as IEntityScheduler, o as IEntityUpdate, p as IEntityEvent, r as SchedulerPauseType, s as IEntityUpdateQueue, t as EntitySchedule, u as EntityEventSubscriptionFilter } from "../index-
|
|
1
|
+
import { a as IEntity, c as IEntityProxy, d as TypedEntityProxy, i as EntityUid, l as IEntityProxyRepository, o as IEntityModel, r as EntityTypeUid, s as EntityProxy, u as RequiredProxies } from "../identity-component-B3VGtdQW.mjs";
|
|
2
|
+
import { a as EntityUpdateType, c as IEntitySnapshot, d as EntityEventSubscriptionOptions, f as EntityEventUid, g as IEventData, h as IEntityEventsManager, i as IEntityRepository, l as IEntitySnapshotProvider, m as IEntityEventsDispatcher, n as IEntityScheduler, o as IEntityUpdate, p as IEntityEvent, r as SchedulerPauseType, s as IEntityUpdateQueue, t as EntitySchedule, u as EntityEventSubscriptionFilter } from "../index-CBxqWVDf.mjs";
|
|
3
3
|
export { EntityEventSubscriptionFilter, EntityEventSubscriptionOptions, EntityEventUid, EntityProxy, EntitySchedule, EntityTypeUid, EntityUid, EntityUpdateType, IEntity, IEntityEvent, IEntityEventsDispatcher, IEntityEventsManager, IEntityModel, IEntityProxy, IEntityProxyRepository, IEntityRepository, IEntityScheduler, IEntitySnapshot, IEntitySnapshotProvider, IEntityUpdate, IEntityUpdateQueue, IEventData, RequiredProxies, SchedulerPauseType, TypedEntityProxy };
|
package/dist/entities/index.mjs
CHANGED
|
@@ -14,7 +14,6 @@ let EntityUpdateType = /* @__PURE__ */ function(EntityUpdateType) {
|
|
|
14
14
|
EntityUpdateType["remove"] = "remove";
|
|
15
15
|
return EntityUpdateType;
|
|
16
16
|
}({});
|
|
17
|
-
|
|
18
17
|
//#endregion
|
|
19
18
|
//#region src/entities/entity-scheduler.ts
|
|
20
19
|
/**
|
|
@@ -29,7 +28,7 @@ let SchedulerPauseType = /* @__PURE__ */ function(SchedulerPauseType) {
|
|
|
29
28
|
SchedulerPauseType["intervals"] = "intervals";
|
|
30
29
|
return SchedulerPauseType;
|
|
31
30
|
}({});
|
|
32
|
-
|
|
33
31
|
//#endregion
|
|
34
32
|
export { EntityUpdateType, SchedulerPauseType };
|
|
33
|
+
|
|
35
34
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/entities/entity-queue.ts","../../src/entities/entity-scheduler.ts"],"sourcesContent":["import { IEntityModel } from './entity';\r\nimport { IEntityProxy } from './entity-proxies';\r\nimport { IEntitySnapshot } from './entity-snapshot';\r\n\r\n/**\r\n * Specifies the action to be performed on an entity.\r\n * Updates are categorized to enable different processing paths in the runtime.\r\n */\r\nexport enum EntityUpdateType {\r\n /**\r\n * Indicates the entity should be updated with new data.\r\n */\r\n update = 'update',\r\n /**\r\n * Indicates the entity should be removed from the system.\r\n */\r\n remove = 'remove'\r\n}\r\n\r\n/**\r\n * Represents a queued entity state change or removal.\r\n * Updates flow through the system to be processed by entity update handlers.\r\n */\r\nexport interface IEntityUpdate {\r\n /**\r\n * The type of operation: update or remove.\r\n */\r\n readonly type: EntityUpdateType;\r\n\r\n /**\r\n * The entity being affected by this update.\r\n */\r\n readonly entity: IEntityProxy;\r\n\r\n /**\r\n * Optional model data for initialization or reconfiguration.\r\n */\r\n readonly model?: IEntityModel;\r\n\r\n /**\r\n * Optional serialized state to apply to the entity.\r\n */\r\n readonly snapshot?: IEntitySnapshot;\r\n}\r\n\r\n/**\r\n * Queue interface for managing pending entity updates.\r\n * Different implementations may use different prioritization strategies (e.g., priority queues, FIFO, ordered by entity type).\r\n * Updates are consumed by the runtime and dispatched to appropriate entity systems.\r\n */\r\nexport interface IEntityUpdateQueue {\r\n /**\r\n * The current number of updates in the queue.\r\n */\r\n readonly size: number;\r\n\r\n /**\r\n * Adds an update to the queue for processing.\r\n * @param change - The update to queue.\r\n */\r\n enqueue(change: IEntityUpdate): void;\r\n\r\n /**\r\n * Removes and returns the next update from the queue.\r\n * The specific update returned depends on the queue's prioritization strategy.\r\n * @returns The next queued update.\r\n */\r\n dequeue(): IEntityUpdate;\r\n\r\n /**\r\n * Views the next update without removing it.\r\n * Useful for inspection before dequeuing.\r\n * @returns The next update in the queue.\r\n */\r\n peek(): IEntityUpdate;\r\n\r\n /**\r\n * Removes all updates from the queue.\r\n */\r\n clear(): void;\r\n}\r\n","import { EntityTypeUid } from './entity';\r\nimport { IEntityProxy } from './entity-proxies';\r\n\r\n/**\r\n * Describes a scheduled entity update, including the target entity and optional interval.\r\n */\r\nexport type EntitySchedule = {\r\n readonly proxy: IEntityProxy;\r\n readonly intervalMs?: number;\r\n};\r\n\r\n/**\r\n * Controls which scheduling modes are paused.\r\n */\r\nexport enum SchedulerPauseType {\r\n /** Pause both interval timers and frame subscriptions. */\r\n full = 'full',\r\n /** Pause only frame subscriptions. Interval timers continue firing. */\r\n perFrame = 'perFrame',\r\n /** Pause only interval timers. Frame subscriptions continue. */\r\n intervals = 'intervals'\r\n}\r\n\r\n/**\r\n * Manages time-based scheduling of entity updates.\r\n *\r\n * Entities can be scheduled with an interval (timer-driven) or without one (per-frame).\r\n * The runtime pulls pending entities each tick via the {@link pending} iterator,\r\n * which yields both per-frame subscriptions and interval entities whose timer has fired.\r\n */\r\nexport interface IEntityScheduler {\r\n /**\r\n * Returns all currently scheduled entities with their configuration.\r\n * Useful for inspection and debugging.\r\n */\r\n readonly schedules: ReadonlyArray<EntitySchedule>;\r\n\r\n /**\r\n * Yields entities pending processing this tick: per-frame subscriptions\r\n * followed by interval entities whose timer has fired since the last drain.\r\n * Iterating drains the due interval buckets; a second iteration without\r\n * timer advancement yields only per-frame subscriptions.\r\n */\r\n readonly pending: IterableIterator<IEntityProxy>;\r\n\r\n /**\r\n * The set of entities scheduled for per-frame updates (no interval).\r\n */\r\n readonly frameSubscriptions: ReadonlySet<IEntityProxy>;\r\n\r\n /**\r\n * Entity types currently excluded from {@link pending} iteration.\r\n */\r\n readonly skippedEntityTypes: ReadonlySet<EntityTypeUid>;\r\n\r\n /**\r\n * The number of entities currently awaiting processing:\r\n * per-frame subscriptions (if not paused) plus interval entities whose timer has fired.\r\n */\r\n readonly pendingCount: number;\r\n\r\n /**\r\n * Whether the scheduler is currently paused in any mode.\r\n */\r\n readonly isPaused: boolean;\r\n\r\n /**\r\n * Registers an entity for updates.\r\n * @param entityProxy - The entity to schedule.\r\n * @param intervalMs - Update frequency in milliseconds. If omitted, the entity is scheduled per-frame.\r\n */\r\n schedule(entityProxy: IEntityProxy, intervalMs?: number): void;\r\n\r\n /**\r\n * Unregisters an entity from the scheduler.\r\n * @param entityProxy - The entity to unschedule.\r\n */\r\n remove(entityProxy: IEntityProxy): void;\r\n\r\n /**\r\n * Checks if an entity is currently scheduled for updates.\r\n * @param entityProxy - The entity to check.\r\n * @returns True if the entity is scheduled, false otherwise.\r\n */\r\n has(entityProxy: IEntityProxy): boolean;\r\n\r\n /**\r\n * Removes all schedules and clears all timers.\r\n */\r\n clear(): void;\r\n\r\n /**\r\n * Excludes an entity type from {@link pending} iteration.\r\n * Entities remain registered; only yielding is suppressed.\r\n */\r\n skipEntityType(entityType: EntityTypeUid): void;\r\n\r\n /**\r\n * Re-includes a previously skipped entity type in {@link pending} iteration.\r\n */\r\n unskipEntityType(entityType: EntityTypeUid): void;\r\n\r\n /**\r\n * Pauses the scheduler.\r\n * @param type - Which scheduling modes to pause. Defaults to {@link SchedulerPauseType.full}.\r\n */\r\n pause(type?: SchedulerPauseType): void;\r\n\r\n /**\r\n * Resumes the scheduler from any paused state.\r\n */\r\n resume(): void;\r\n}\r\n"],"mappings":";;;;;AAQA,IAAY,
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/entities/entity-queue.ts","../../src/entities/entity-scheduler.ts"],"sourcesContent":["import { IEntityModel } from './entity';\r\nimport { IEntityProxy } from './entity-proxies';\r\nimport { IEntitySnapshot } from './entity-snapshot';\r\n\r\n/**\r\n * Specifies the action to be performed on an entity.\r\n * Updates are categorized to enable different processing paths in the runtime.\r\n */\r\nexport enum EntityUpdateType {\r\n /**\r\n * Indicates the entity should be updated with new data.\r\n */\r\n update = 'update',\r\n /**\r\n * Indicates the entity should be removed from the system.\r\n */\r\n remove = 'remove'\r\n}\r\n\r\n/**\r\n * Represents a queued entity state change or removal.\r\n * Updates flow through the system to be processed by entity update handlers.\r\n */\r\nexport interface IEntityUpdate {\r\n /**\r\n * The type of operation: update or remove.\r\n */\r\n readonly type: EntityUpdateType;\r\n\r\n /**\r\n * The entity being affected by this update.\r\n */\r\n readonly entity: IEntityProxy;\r\n\r\n /**\r\n * Optional model data for initialization or reconfiguration.\r\n */\r\n readonly model?: IEntityModel;\r\n\r\n /**\r\n * Optional serialized state to apply to the entity.\r\n */\r\n readonly snapshot?: IEntitySnapshot;\r\n}\r\n\r\n/**\r\n * Queue interface for managing pending entity updates.\r\n * Different implementations may use different prioritization strategies (e.g., priority queues, FIFO, ordered by entity type).\r\n * Updates are consumed by the runtime and dispatched to appropriate entity systems.\r\n */\r\nexport interface IEntityUpdateQueue {\r\n /**\r\n * The current number of updates in the queue.\r\n */\r\n readonly size: number;\r\n\r\n /**\r\n * Adds an update to the queue for processing.\r\n * @param change - The update to queue.\r\n */\r\n enqueue(change: IEntityUpdate): void;\r\n\r\n /**\r\n * Removes and returns the next update from the queue.\r\n * The specific update returned depends on the queue's prioritization strategy.\r\n * @returns The next queued update.\r\n */\r\n dequeue(): IEntityUpdate;\r\n\r\n /**\r\n * Views the next update without removing it.\r\n * Useful for inspection before dequeuing.\r\n * @returns The next update in the queue.\r\n */\r\n peek(): IEntityUpdate;\r\n\r\n /**\r\n * Removes all updates from the queue.\r\n */\r\n clear(): void;\r\n}\r\n","import { EntityTypeUid } from './entity';\r\nimport { IEntityProxy } from './entity-proxies';\r\n\r\n/**\r\n * Describes a scheduled entity update, including the target entity and optional interval.\r\n */\r\nexport type EntitySchedule = {\r\n readonly proxy: IEntityProxy;\r\n readonly intervalMs?: number;\r\n};\r\n\r\n/**\r\n * Controls which scheduling modes are paused.\r\n */\r\nexport enum SchedulerPauseType {\r\n /** Pause both interval timers and frame subscriptions. */\r\n full = 'full',\r\n /** Pause only frame subscriptions. Interval timers continue firing. */\r\n perFrame = 'perFrame',\r\n /** Pause only interval timers. Frame subscriptions continue. */\r\n intervals = 'intervals'\r\n}\r\n\r\n/**\r\n * Manages time-based scheduling of entity updates.\r\n *\r\n * Entities can be scheduled with an interval (timer-driven) or without one (per-frame).\r\n * The runtime pulls pending entities each tick via the {@link pending} iterator,\r\n * which yields both per-frame subscriptions and interval entities whose timer has fired.\r\n */\r\nexport interface IEntityScheduler {\r\n /**\r\n * Returns all currently scheduled entities with their configuration.\r\n * Useful for inspection and debugging.\r\n */\r\n readonly schedules: ReadonlyArray<EntitySchedule>;\r\n\r\n /**\r\n * Yields entities pending processing this tick: per-frame subscriptions\r\n * followed by interval entities whose timer has fired since the last drain.\r\n * Iterating drains the due interval buckets; a second iteration without\r\n * timer advancement yields only per-frame subscriptions.\r\n */\r\n readonly pending: IterableIterator<IEntityProxy>;\r\n\r\n /**\r\n * The set of entities scheduled for per-frame updates (no interval).\r\n */\r\n readonly frameSubscriptions: ReadonlySet<IEntityProxy>;\r\n\r\n /**\r\n * Entity types currently excluded from {@link pending} iteration.\r\n */\r\n readonly skippedEntityTypes: ReadonlySet<EntityTypeUid>;\r\n\r\n /**\r\n * The number of entities currently awaiting processing:\r\n * per-frame subscriptions (if not paused) plus interval entities whose timer has fired.\r\n */\r\n readonly pendingCount: number;\r\n\r\n /**\r\n * Whether the scheduler is currently paused in any mode.\r\n */\r\n readonly isPaused: boolean;\r\n\r\n /**\r\n * Registers an entity for updates.\r\n * @param entityProxy - The entity to schedule.\r\n * @param intervalMs - Update frequency in milliseconds. If omitted, the entity is scheduled per-frame.\r\n */\r\n schedule(entityProxy: IEntityProxy, intervalMs?: number): void;\r\n\r\n /**\r\n * Unregisters an entity from the scheduler.\r\n * @param entityProxy - The entity to unschedule.\r\n */\r\n remove(entityProxy: IEntityProxy): void;\r\n\r\n /**\r\n * Checks if an entity is currently scheduled for updates.\r\n * @param entityProxy - The entity to check.\r\n * @returns True if the entity is scheduled, false otherwise.\r\n */\r\n has(entityProxy: IEntityProxy): boolean;\r\n\r\n /**\r\n * Removes all schedules and clears all timers.\r\n */\r\n clear(): void;\r\n\r\n /**\r\n * Excludes an entity type from {@link pending} iteration.\r\n * Entities remain registered; only yielding is suppressed.\r\n */\r\n skipEntityType(entityType: EntityTypeUid): void;\r\n\r\n /**\r\n * Re-includes a previously skipped entity type in {@link pending} iteration.\r\n */\r\n unskipEntityType(entityType: EntityTypeUid): void;\r\n\r\n /**\r\n * Pauses the scheduler.\r\n * @param type - Which scheduling modes to pause. Defaults to {@link SchedulerPauseType.full}.\r\n */\r\n pause(type?: SchedulerPauseType): void;\r\n\r\n /**\r\n * Resumes the scheduler from any paused state.\r\n */\r\n resume(): void;\r\n}\r\n"],"mappings":";;;;;AAQA,IAAY,mBAAL,yBAAA,kBAAA;;;;AAIL,kBAAA,YAAA;;;;AAIA,kBAAA,YAAA;;KACD;;;;;;ACHD,IAAY,qBAAL,yBAAA,oBAAA;;AAEL,oBAAA,UAAA;;AAEA,oBAAA,cAAA;;AAEA,oBAAA,eAAA;;KACD"}
|
package/dist/factories/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region src/factories/pipeline-factory.ts
|
|
3
3
|
/**
|
|
4
4
|
* Built-in metric categories for classifying pipeline and middleware performance entries.
|
|
@@ -13,7 +13,7 @@ let PipelineCategory = /* @__PURE__ */ function(PipelineCategory) {
|
|
|
13
13
|
PipelineCategory["system"] = "system";
|
|
14
14
|
return PipelineCategory;
|
|
15
15
|
}({});
|
|
16
|
-
|
|
17
16
|
//#endregion
|
|
18
17
|
exports.PipelineCategory = PipelineCategory;
|
|
18
|
+
|
|
19
19
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/factories/pipeline-factory.ts"],"sourcesContent":["import { IPipelineContext } from '../pipelines';\r\nimport { IPipeline } from '../pipelines/pipeline';\r\n\r\n/**\r\n * Category identifier for grouping performance metrics.\r\n * Typed as string to allow extension beyond the built-in {@link PipelineCategory} values.\r\n */\r\nexport type PipelineCategoryName = string;\r\n\r\n/**\r\n * Built-in metric categories for classifying pipeline and middleware performance entries.\r\n *\r\n * - `module` — System module pipelines (initialize, update, render, sync phases).\r\n * - `runtime` — Runtime orchestration pipeline and its middleware.\r\n * - `system` — Individual system middleware within a module pipeline.\r\n */\r\nexport enum PipelineCategory {\r\n module = 'module',\r\n runtime = 'runtime',\r\n system = 'system'\r\n}\r\n\r\n/**\r\n * Options for identifying and categorizing performance metrics on pipelines.\r\n */\r\nexport type PipelineMetricOptions = {\r\n /** Display name for the pipeline in performance metrics. */\r\n pipelineName: string;\r\n /** Category assigned to pipeline-level metric entries. */\r\n pipelineCategory: PipelineCategoryName;\r\n /** Category assigned to per-middleware metric entries within this pipeline. */\r\n middlewareCategory: PipelineCategoryName;\r\n};\r\n\r\n/**\r\n * Creates pipeline instances for various contexts.\r\n * Abstracts pipeline creation to support different implementations.\r\n * Used by the system to instantiate pipelines without coupling to specific implementations.\r\n */\r\nexport interface IPipelineFactory {\r\n /**\r\n * Creates a new pipeline for the specified context type.\r\n * @template TContext - The context type for the pipeline. Must extend IPipelineContext.\r\n * @param options - Optional performance metric options (name, category) for the pipeline.\r\n * @returns A new pipeline instance ready for middleware registration.\r\n */\r\n createPipeline<TContext extends IPipelineContext>(\r\n options?: PipelineMetricOptions\r\n ): IPipeline<TContext>;\r\n}\r\n"],"mappings":";;;;;;;;;AAgBA,IAAY,
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/factories/pipeline-factory.ts"],"sourcesContent":["import { IPipelineContext } from '../pipelines';\r\nimport { IPipeline } from '../pipelines/pipeline';\r\n\r\n/**\r\n * Category identifier for grouping performance metrics.\r\n * Typed as string to allow extension beyond the built-in {@link PipelineCategory} values.\r\n */\r\nexport type PipelineCategoryName = string;\r\n\r\n/**\r\n * Built-in metric categories for classifying pipeline and middleware performance entries.\r\n *\r\n * - `module` — System module pipelines (initialize, update, render, sync phases).\r\n * - `runtime` — Runtime orchestration pipeline and its middleware.\r\n * - `system` — Individual system middleware within a module pipeline.\r\n */\r\nexport enum PipelineCategory {\r\n module = 'module',\r\n runtime = 'runtime',\r\n system = 'system'\r\n}\r\n\r\n/**\r\n * Options for identifying and categorizing performance metrics on pipelines.\r\n */\r\nexport type PipelineMetricOptions = {\r\n /** Display name for the pipeline in performance metrics. */\r\n pipelineName: string;\r\n /** Category assigned to pipeline-level metric entries. */\r\n pipelineCategory: PipelineCategoryName;\r\n /** Category assigned to per-middleware metric entries within this pipeline. */\r\n middlewareCategory: PipelineCategoryName;\r\n};\r\n\r\n/**\r\n * Creates pipeline instances for various contexts.\r\n * Abstracts pipeline creation to support different implementations.\r\n * Used by the system to instantiate pipelines without coupling to specific implementations.\r\n */\r\nexport interface IPipelineFactory {\r\n /**\r\n * Creates a new pipeline for the specified context type.\r\n * @template TContext - The context type for the pipeline. Must extend IPipelineContext.\r\n * @param options - Optional performance metric options (name, category) for the pipeline.\r\n * @returns A new pipeline instance ready for middleware registration.\r\n */\r\n createPipeline<TContext extends IPipelineContext>(\r\n options?: PipelineMetricOptions\r\n ): IPipeline<TContext>;\r\n}\r\n"],"mappings":";;;;;;;;;AAgBA,IAAY,mBAAL,yBAAA,kBAAA;AACL,kBAAA,YAAA;AACA,kBAAA,aAAA;AACA,kBAAA,YAAA;;KACD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as IEntity } from "../identity-component-
|
|
2
|
-
import { l as IPipelineContext, o as IPipeline } from "../index-
|
|
3
|
-
import { n as ISystemsRuntimeContext, o as ISystemsModuleBuilder, u as ISystemContext } from "../index-
|
|
1
|
+
import { a as IEntity } from "../identity-component-CsU-wYTX.cjs";
|
|
2
|
+
import { l as IPipelineContext, o as IPipeline } from "../index-BRkKPsOV.cjs";
|
|
3
|
+
import { n as ISystemsRuntimeContext, o as ISystemsModuleBuilder, u as ISystemContext } from "../index-Df4VhCPr.cjs";
|
|
4
4
|
|
|
5
5
|
//#region src/factories/context-factory.d.ts
|
|
6
6
|
interface IContextFactory {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as IEntity } from "../identity-component-
|
|
2
|
-
import { l as IPipelineContext, o as IPipeline } from "../index-
|
|
3
|
-
import { n as ISystemsRuntimeContext, o as ISystemsModuleBuilder, u as ISystemContext } from "../index-
|
|
1
|
+
import { a as IEntity } from "../identity-component-B3VGtdQW.mjs";
|
|
2
|
+
import { l as IPipelineContext, o as IPipeline } from "../index-C8yZ7-zP.mjs";
|
|
3
|
+
import { n as ISystemsRuntimeContext, o as ISystemsModuleBuilder, u as ISystemContext } from "../index-BC8RgFVd.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/factories/context-factory.d.ts
|
|
6
6
|
interface IContextFactory {
|
package/dist/factories/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/factories/pipeline-factory.ts"],"sourcesContent":["import { IPipelineContext } from '../pipelines';\r\nimport { IPipeline } from '../pipelines/pipeline';\r\n\r\n/**\r\n * Category identifier for grouping performance metrics.\r\n * Typed as string to allow extension beyond the built-in {@link PipelineCategory} values.\r\n */\r\nexport type PipelineCategoryName = string;\r\n\r\n/**\r\n * Built-in metric categories for classifying pipeline and middleware performance entries.\r\n *\r\n * - `module` — System module pipelines (initialize, update, render, sync phases).\r\n * - `runtime` — Runtime orchestration pipeline and its middleware.\r\n * - `system` — Individual system middleware within a module pipeline.\r\n */\r\nexport enum PipelineCategory {\r\n module = 'module',\r\n runtime = 'runtime',\r\n system = 'system'\r\n}\r\n\r\n/**\r\n * Options for identifying and categorizing performance metrics on pipelines.\r\n */\r\nexport type PipelineMetricOptions = {\r\n /** Display name for the pipeline in performance metrics. */\r\n pipelineName: string;\r\n /** Category assigned to pipeline-level metric entries. */\r\n pipelineCategory: PipelineCategoryName;\r\n /** Category assigned to per-middleware metric entries within this pipeline. */\r\n middlewareCategory: PipelineCategoryName;\r\n};\r\n\r\n/**\r\n * Creates pipeline instances for various contexts.\r\n * Abstracts pipeline creation to support different implementations.\r\n * Used by the system to instantiate pipelines without coupling to specific implementations.\r\n */\r\nexport interface IPipelineFactory {\r\n /**\r\n * Creates a new pipeline for the specified context type.\r\n * @template TContext - The context type for the pipeline. Must extend IPipelineContext.\r\n * @param options - Optional performance metric options (name, category) for the pipeline.\r\n * @returns A new pipeline instance ready for middleware registration.\r\n */\r\n createPipeline<TContext extends IPipelineContext>(\r\n options?: PipelineMetricOptions\r\n ): IPipeline<TContext>;\r\n}\r\n"],"mappings":";;;;;;;;AAgBA,IAAY,
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/factories/pipeline-factory.ts"],"sourcesContent":["import { IPipelineContext } from '../pipelines';\r\nimport { IPipeline } from '../pipelines/pipeline';\r\n\r\n/**\r\n * Category identifier for grouping performance metrics.\r\n * Typed as string to allow extension beyond the built-in {@link PipelineCategory} values.\r\n */\r\nexport type PipelineCategoryName = string;\r\n\r\n/**\r\n * Built-in metric categories for classifying pipeline and middleware performance entries.\r\n *\r\n * - `module` — System module pipelines (initialize, update, render, sync phases).\r\n * - `runtime` — Runtime orchestration pipeline and its middleware.\r\n * - `system` — Individual system middleware within a module pipeline.\r\n */\r\nexport enum PipelineCategory {\r\n module = 'module',\r\n runtime = 'runtime',\r\n system = 'system'\r\n}\r\n\r\n/**\r\n * Options for identifying and categorizing performance metrics on pipelines.\r\n */\r\nexport type PipelineMetricOptions = {\r\n /** Display name for the pipeline in performance metrics. */\r\n pipelineName: string;\r\n /** Category assigned to pipeline-level metric entries. */\r\n pipelineCategory: PipelineCategoryName;\r\n /** Category assigned to per-middleware metric entries within this pipeline. */\r\n middlewareCategory: PipelineCategoryName;\r\n};\r\n\r\n/**\r\n * Creates pipeline instances for various contexts.\r\n * Abstracts pipeline creation to support different implementations.\r\n * Used by the system to instantiate pipelines without coupling to specific implementations.\r\n */\r\nexport interface IPipelineFactory {\r\n /**\r\n * Creates a new pipeline for the specified context type.\r\n * @template TContext - The context type for the pipeline. Must extend IPipelineContext.\r\n * @param options - Optional performance metric options (name, category) for the pipeline.\r\n * @returns A new pipeline instance ready for middleware registration.\r\n */\r\n createPipeline<TContext extends IPipelineContext>(\r\n options?: PipelineMetricOptions\r\n ): IPipeline<TContext>;\r\n}\r\n"],"mappings":";;;;;;;;AAgBA,IAAY,mBAAL,yBAAA,kBAAA;AACL,kBAAA,YAAA;AACA,kBAAA,aAAA;AACA,kBAAA,YAAA;;KACD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as Immutable } from "./types-
|
|
1
|
+
import { n as Immutable } from "./types-aD9p7TDy.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/components/component.d.ts
|
|
4
4
|
type ComponentTypeUid = string | number;
|
|
@@ -251,4 +251,4 @@ interface IdentityComponent<TModel extends IEntityModel> extends IComponent {
|
|
|
251
251
|
}
|
|
252
252
|
//#endregion
|
|
253
253
|
export { IEntity as a, IEntityProxy as c, TypedEntityProxy as d, ComponentTypeUid as f, EntityUid as i, IEntityProxyRepository as l, IdentityComponent as n, IEntityModel as o, IComponent as p, EntityTypeUid as r, EntityProxy as s, BasicComponentType as t, RequiredProxies as u };
|
|
254
|
-
//# sourceMappingURL=identity-component-
|
|
254
|
+
//# sourceMappingURL=identity-component-B3VGtdQW.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as Immutable } from "./types-
|
|
1
|
+
import { n as Immutable } from "./types-DqWnkvhp.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/components/component.d.ts
|
|
4
4
|
type ComponentTypeUid = string | number;
|
|
@@ -251,4 +251,4 @@ interface IdentityComponent<TModel extends IEntityModel> extends IComponent {
|
|
|
251
251
|
}
|
|
252
252
|
//#endregion
|
|
253
253
|
export { IEntity as a, IEntityProxy as c, TypedEntityProxy as d, ComponentTypeUid as f, EntityUid as i, IEntityProxyRepository as l, IdentityComponent as n, IEntityModel as o, IComponent as p, EntityTypeUid as r, EntityProxy as s, BasicComponentType as t, RequiredProxies as u };
|
|
254
|
-
//# sourceMappingURL=identity-component-
|
|
254
|
+
//# sourceMappingURL=identity-component-CsU-wYTX.d.cts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as IEntity, c as IEntityProxy, l as IEntityProxyRepository, o as IEntityModel, r as EntityTypeUid, s as EntityProxy } from "./identity-component-
|
|
2
|
-
import { n as Immutable } from "./types-
|
|
3
|
-
import { c as IEntitySnapshot, d as EntityEventSubscriptionOptions, f as EntityEventUid, g as IEventData, o as IEntityUpdate, p as IEntityEvent } from "./index-
|
|
4
|
-
import { a as ILogger, c as IJsonSerializer, r as PerformanceTimeEntry } from "./index-
|
|
5
|
-
import { c as IMiddleware, l as IPipelineContext, o as IPipeline } from "./index-
|
|
1
|
+
import { a as IEntity, c as IEntityProxy, l as IEntityProxyRepository, o as IEntityModel, r as EntityTypeUid, s as EntityProxy } from "./identity-component-B3VGtdQW.mjs";
|
|
2
|
+
import { n as Immutable } from "./types-aD9p7TDy.mjs";
|
|
3
|
+
import { c as IEntitySnapshot, d as EntityEventSubscriptionOptions, f as EntityEventUid, g as IEventData, o as IEntityUpdate, p as IEntityEvent } from "./index-CBxqWVDf.mjs";
|
|
4
|
+
import { a as ILogger, c as IJsonSerializer, r as PerformanceTimeEntry } from "./index-EpAQRAeF.mjs";
|
|
5
|
+
import { c as IMiddleware, l as IPipelineContext, o as IPipeline } from "./index-C8yZ7-zP.mjs";
|
|
6
6
|
|
|
7
7
|
//#region src/systems/pipeline/system-context-events.d.ts
|
|
8
8
|
/**
|
|
@@ -12,20 +12,31 @@ import { c as IMiddleware, l as IPipelineContext, o as IPipeline } from "./index
|
|
|
12
12
|
*/
|
|
13
13
|
interface ISystemContextEvents {
|
|
14
14
|
/**
|
|
15
|
-
* Publishes an event to
|
|
16
|
-
*
|
|
17
|
-
* Otherwise, event is routed to all subscribers based on subscription registry.
|
|
15
|
+
* Publishes an event to one or more explicit targets.
|
|
16
|
+
* The event is sent only to the specified target(s) — it does NOT fall back to subscriptions.
|
|
18
17
|
* @param data - The event payload.
|
|
19
|
-
* @param
|
|
18
|
+
* @param target - The entity or entities to send the event to.
|
|
20
19
|
*/
|
|
21
|
-
dispatchEvent<TEventData extends IEventData>(data: TEventData,
|
|
20
|
+
dispatchEvent<TEventData extends IEventData>(data: TEventData, target: IEntityProxy | IEntityProxy[]): void;
|
|
22
21
|
/**
|
|
23
|
-
* Publishes multiple events
|
|
24
|
-
*
|
|
22
|
+
* Publishes multiple events to one or more explicit targets.
|
|
23
|
+
* Each target receives all events in a single update.
|
|
25
24
|
* @param data - Array of event payloads to dispatch.
|
|
26
|
-
* @param
|
|
25
|
+
* @param target - The entity or entities to send the events to.
|
|
27
26
|
*/
|
|
28
|
-
dispatchEvents<TEventData extends IEventData>(data: TEventData[],
|
|
27
|
+
dispatchEvents<TEventData extends IEventData>(data: TEventData[], target: IEntityProxy | IEntityProxy[]): void;
|
|
28
|
+
/**
|
|
29
|
+
* Broadcasts an event to all subscribers registered for that event type.
|
|
30
|
+
* Uses the subscription registry to resolve targets.
|
|
31
|
+
* @param data - The event payload.
|
|
32
|
+
*/
|
|
33
|
+
broadcastEvent<TEventData extends IEventData>(data: TEventData): void;
|
|
34
|
+
/**
|
|
35
|
+
* Broadcasts multiple events to all subscribers.
|
|
36
|
+
* Events are grouped per subscriber so each receives a single update.
|
|
37
|
+
* @param data - Array of event payloads to broadcast.
|
|
38
|
+
*/
|
|
39
|
+
broadcastEvents<TEventData extends IEventData>(data: TEventData[]): void;
|
|
29
40
|
/**
|
|
30
41
|
* Retrieves an event from the current context by its identifier.
|
|
31
42
|
* Useful for checking if an event was received this frame.
|
|
@@ -530,4 +541,4 @@ interface ISystemsRuntimeContext<TEntity extends IEntity> extends IPipelineConte
|
|
|
530
541
|
type ISystemsRuntimeMiddleware<TEntity extends IEntity> = IMiddleware<ISystemsRuntimeContext<TEntity>>;
|
|
531
542
|
//#endregion
|
|
532
543
|
export { ISystemsModuleRepository as a, ISystemsModule as c, ISystemContextSnapshot as d, ISystemContextScheduler as f, ISystemContextEvents as h, ISystemContextEntity as i, SystemType as l, ISystemContextProxies as m, ISystemsRuntimeContext as n, ISystemsModuleBuilder as o, ISystemContextRepository as p, ISystemsRuntime as r, ISystemMiddleware as s, ISystemsRuntimeMiddleware as t, ISystemContext as u };
|
|
533
|
-
//# sourceMappingURL=index-
|
|
544
|
+
//# sourceMappingURL=index-BC8RgFVd.d.mts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as Immutable } from "./types-
|
|
2
|
-
import { r as PerformanceTimeEntry } from "./index-
|
|
1
|
+
import { n as Immutable } from "./types-DqWnkvhp.cjs";
|
|
2
|
+
import { r as PerformanceTimeEntry } from "./index-DCx0PjvH.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/pipelines/pipeline-context.d.ts
|
|
5
5
|
/**
|
|
@@ -221,4 +221,4 @@ interface IPipelineRunner<TContext extends IPipelineContext> {
|
|
|
221
221
|
}
|
|
222
222
|
//#endregion
|
|
223
223
|
export { IParentMiddleware as a, IMiddleware as c, IParentContext as i, IPipelineContext as l, INestedContext as n, IPipeline as o, INestedMiddleware as r, IMiddlewareRunner as s, IPipelineRunner as t, PipelineRuntime as u };
|
|
224
|
-
//# sourceMappingURL=index-
|
|
224
|
+
//# sourceMappingURL=index-BRkKPsOV.d.cts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as Immutable } from "./types-
|
|
2
|
-
import { r as PerformanceTimeEntry } from "./index-
|
|
1
|
+
import { n as Immutable } from "./types-aD9p7TDy.mjs";
|
|
2
|
+
import { r as PerformanceTimeEntry } from "./index-EpAQRAeF.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/pipelines/pipeline-context.d.ts
|
|
5
5
|
/**
|
|
@@ -221,4 +221,4 @@ interface IPipelineRunner<TContext extends IPipelineContext> {
|
|
|
221
221
|
}
|
|
222
222
|
//#endregion
|
|
223
223
|
export { IParentMiddleware as a, IMiddleware as c, IParentContext as i, IPipelineContext as l, INestedContext as n, IPipeline as o, INestedMiddleware as r, IMiddlewareRunner as s, IPipelineRunner as t, PipelineRuntime as u };
|
|
224
|
-
//# sourceMappingURL=index-
|
|
224
|
+
//# sourceMappingURL=index-C8yZ7-zP.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as IEntity, c as IEntityProxy, n as IdentityComponent, o as IEntityModel, p as IComponent, r as EntityTypeUid } from "./identity-component-
|
|
1
|
+
import { a as IEntity, c as IEntityProxy, n as IdentityComponent, o as IEntityModel, p as IComponent, r as EntityTypeUid } from "./identity-component-B3VGtdQW.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/entities/entity-events.d.ts
|
|
4
4
|
/**
|
|
@@ -110,22 +110,38 @@ interface IEntityEventsManager {
|
|
|
110
110
|
/**
|
|
111
111
|
* Event dispatcher for publishing events to interested entities.
|
|
112
112
|
* Responsible for routing events to their subscribers through the update queue.
|
|
113
|
+
*
|
|
114
|
+
* Use `dispatchEvent` / `dispatchEvents` for targeted delivery (requires explicit targets).
|
|
115
|
+
* Use `broadcastEvent` / `broadcastEvents` for subscription-based delivery to all subscribers.
|
|
113
116
|
*/
|
|
114
117
|
interface IEntityEventsDispatcher {
|
|
115
118
|
/**
|
|
116
|
-
* Publishes a single event to
|
|
117
|
-
* The event is
|
|
119
|
+
* Publishes a single event to one or more explicit targets.
|
|
120
|
+
* The event is sent only to the specified target(s) — it does NOT fall back to subscriptions.
|
|
118
121
|
* @param event - The event to dispatch.
|
|
119
|
-
* @param
|
|
122
|
+
* @param target - The entity or entities to send the event to.
|
|
120
123
|
*/
|
|
121
|
-
dispatchEvent(event: IEntityEvent<IEventData>,
|
|
124
|
+
dispatchEvent(event: IEntityEvent<IEventData>, target: IEntityProxy | IEntityProxy[]): void;
|
|
122
125
|
/**
|
|
123
|
-
* Publishes multiple events to
|
|
124
|
-
*
|
|
126
|
+
* Publishes multiple events to one or more explicit targets.
|
|
127
|
+
* Each target receives all events in a single update.
|
|
125
128
|
* @param events - The events to dispatch.
|
|
126
|
-
* @param
|
|
129
|
+
* @param target - The entity or entities to send the events to.
|
|
130
|
+
*/
|
|
131
|
+
dispatchEvents(events: IEntityEvent<IEventData>[], target: IEntityProxy | IEntityProxy[]): void;
|
|
132
|
+
/**
|
|
133
|
+
* Broadcasts a single event to all subscribers registered for that event type.
|
|
134
|
+
* Uses the subscription registry to resolve targets. Use intentionally — this can
|
|
135
|
+
* generate O(N) queue entries where N is the subscriber count.
|
|
136
|
+
* @param event - The event to broadcast.
|
|
137
|
+
*/
|
|
138
|
+
broadcastEvent(event: IEntityEvent<IEventData>): void;
|
|
139
|
+
/**
|
|
140
|
+
* Broadcasts multiple events to all subscribers.
|
|
141
|
+
* Events are grouped per subscriber so each receives a single update.
|
|
142
|
+
* @param events - The events to broadcast.
|
|
127
143
|
*/
|
|
128
|
-
|
|
144
|
+
broadcastEvents(events: IEntityEvent<IEventData>[]): void;
|
|
129
145
|
}
|
|
130
146
|
//#endregion
|
|
131
147
|
//#region src/entities/entity-snapshot.d.ts
|
|
@@ -396,4 +412,4 @@ interface IEntityScheduler {
|
|
|
396
412
|
}
|
|
397
413
|
//#endregion
|
|
398
414
|
export { EntityUpdateType as a, IEntitySnapshot as c, EntityEventSubscriptionOptions as d, EntityEventUid as f, IEventData as g, IEntityEventsManager as h, IEntityRepository as i, IEntitySnapshotProvider as l, IEntityEventsDispatcher as m, IEntityScheduler as n, IEntityUpdate as o, IEntityEvent as p, SchedulerPauseType as r, IEntityUpdateQueue as s, EntitySchedule as t, EntityEventSubscriptionFilter as u };
|
|
399
|
-
//# sourceMappingURL=index-
|
|
415
|
+
//# sourceMappingURL=index-CBxqWVDf.d.mts.map
|
|
@@ -172,4 +172,4 @@ interface IPerformanceTimer {
|
|
|
172
172
|
}
|
|
173
173
|
//#endregion
|
|
174
174
|
export { ILogger as a, IJsonSerializer as c, PerformanceTimerUid as i, dispatchSequential as l, PerformanceMetricOptions as n, ILoggerOptions as o, PerformanceTimeEntry as r, LogLevel as s, IPerformanceTimer as t };
|
|
175
|
-
//# sourceMappingURL=index-
|
|
175
|
+
//# sourceMappingURL=index-DCx0PjvH.d.cts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as IEntity, c as IEntityProxy, n as IdentityComponent, o as IEntityModel, p as IComponent, r as EntityTypeUid } from "./identity-component-
|
|
1
|
+
import { a as IEntity, c as IEntityProxy, n as IdentityComponent, o as IEntityModel, p as IComponent, r as EntityTypeUid } from "./identity-component-CsU-wYTX.cjs";
|
|
2
2
|
|
|
3
3
|
//#region src/entities/entity-events.d.ts
|
|
4
4
|
/**
|
|
@@ -110,22 +110,38 @@ interface IEntityEventsManager {
|
|
|
110
110
|
/**
|
|
111
111
|
* Event dispatcher for publishing events to interested entities.
|
|
112
112
|
* Responsible for routing events to their subscribers through the update queue.
|
|
113
|
+
*
|
|
114
|
+
* Use `dispatchEvent` / `dispatchEvents` for targeted delivery (requires explicit targets).
|
|
115
|
+
* Use `broadcastEvent` / `broadcastEvents` for subscription-based delivery to all subscribers.
|
|
113
116
|
*/
|
|
114
117
|
interface IEntityEventsDispatcher {
|
|
115
118
|
/**
|
|
116
|
-
* Publishes a single event to
|
|
117
|
-
* The event is
|
|
119
|
+
* Publishes a single event to one or more explicit targets.
|
|
120
|
+
* The event is sent only to the specified target(s) — it does NOT fall back to subscriptions.
|
|
118
121
|
* @param event - The event to dispatch.
|
|
119
|
-
* @param
|
|
122
|
+
* @param target - The entity or entities to send the event to.
|
|
120
123
|
*/
|
|
121
|
-
dispatchEvent(event: IEntityEvent<IEventData>,
|
|
124
|
+
dispatchEvent(event: IEntityEvent<IEventData>, target: IEntityProxy | IEntityProxy[]): void;
|
|
122
125
|
/**
|
|
123
|
-
* Publishes multiple events to
|
|
124
|
-
*
|
|
126
|
+
* Publishes multiple events to one or more explicit targets.
|
|
127
|
+
* Each target receives all events in a single update.
|
|
125
128
|
* @param events - The events to dispatch.
|
|
126
|
-
* @param
|
|
129
|
+
* @param target - The entity or entities to send the events to.
|
|
130
|
+
*/
|
|
131
|
+
dispatchEvents(events: IEntityEvent<IEventData>[], target: IEntityProxy | IEntityProxy[]): void;
|
|
132
|
+
/**
|
|
133
|
+
* Broadcasts a single event to all subscribers registered for that event type.
|
|
134
|
+
* Uses the subscription registry to resolve targets. Use intentionally — this can
|
|
135
|
+
* generate O(N) queue entries where N is the subscriber count.
|
|
136
|
+
* @param event - The event to broadcast.
|
|
137
|
+
*/
|
|
138
|
+
broadcastEvent(event: IEntityEvent<IEventData>): void;
|
|
139
|
+
/**
|
|
140
|
+
* Broadcasts multiple events to all subscribers.
|
|
141
|
+
* Events are grouped per subscriber so each receives a single update.
|
|
142
|
+
* @param events - The events to broadcast.
|
|
127
143
|
*/
|
|
128
|
-
|
|
144
|
+
broadcastEvents(events: IEntityEvent<IEventData>[]): void;
|
|
129
145
|
}
|
|
130
146
|
//#endregion
|
|
131
147
|
//#region src/entities/entity-snapshot.d.ts
|
|
@@ -396,4 +412,4 @@ interface IEntityScheduler {
|
|
|
396
412
|
}
|
|
397
413
|
//#endregion
|
|
398
414
|
export { EntityUpdateType as a, IEntitySnapshot as c, EntityEventSubscriptionOptions as d, EntityEventUid as f, IEventData as g, IEntityEventsManager as h, IEntityRepository as i, IEntitySnapshotProvider as l, IEntityEventsDispatcher as m, IEntityScheduler as n, IEntityUpdate as o, IEntityEvent as p, SchedulerPauseType as r, IEntityUpdateQueue as s, EntitySchedule as t, EntityEventSubscriptionFilter as u };
|
|
399
|
-
//# sourceMappingURL=index-
|
|
415
|
+
//# sourceMappingURL=index-DTHsTJ1j.d.cts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as IEntity, c as IEntityProxy, l as IEntityProxyRepository, o as IEntityModel, r as EntityTypeUid, s as EntityProxy } from "./identity-component-
|
|
2
|
-
import { n as Immutable } from "./types-
|
|
3
|
-
import { c as IEntitySnapshot, d as EntityEventSubscriptionOptions, f as EntityEventUid, g as IEventData, o as IEntityUpdate, p as IEntityEvent } from "./index-
|
|
4
|
-
import { a as ILogger, c as IJsonSerializer, r as PerformanceTimeEntry } from "./index-
|
|
5
|
-
import { c as IMiddleware, l as IPipelineContext, o as IPipeline } from "./index-
|
|
1
|
+
import { a as IEntity, c as IEntityProxy, l as IEntityProxyRepository, o as IEntityModel, r as EntityTypeUid, s as EntityProxy } from "./identity-component-CsU-wYTX.cjs";
|
|
2
|
+
import { n as Immutable } from "./types-DqWnkvhp.cjs";
|
|
3
|
+
import { c as IEntitySnapshot, d as EntityEventSubscriptionOptions, f as EntityEventUid, g as IEventData, o as IEntityUpdate, p as IEntityEvent } from "./index-DTHsTJ1j.cjs";
|
|
4
|
+
import { a as ILogger, c as IJsonSerializer, r as PerformanceTimeEntry } from "./index-DCx0PjvH.cjs";
|
|
5
|
+
import { c as IMiddleware, l as IPipelineContext, o as IPipeline } from "./index-BRkKPsOV.cjs";
|
|
6
6
|
|
|
7
7
|
//#region src/systems/pipeline/system-context-events.d.ts
|
|
8
8
|
/**
|
|
@@ -12,20 +12,31 @@ import { c as IMiddleware, l as IPipelineContext, o as IPipeline } from "./index
|
|
|
12
12
|
*/
|
|
13
13
|
interface ISystemContextEvents {
|
|
14
14
|
/**
|
|
15
|
-
* Publishes an event to
|
|
16
|
-
*
|
|
17
|
-
* Otherwise, event is routed to all subscribers based on subscription registry.
|
|
15
|
+
* Publishes an event to one or more explicit targets.
|
|
16
|
+
* The event is sent only to the specified target(s) — it does NOT fall back to subscriptions.
|
|
18
17
|
* @param data - The event payload.
|
|
19
|
-
* @param
|
|
18
|
+
* @param target - The entity or entities to send the event to.
|
|
20
19
|
*/
|
|
21
|
-
dispatchEvent<TEventData extends IEventData>(data: TEventData,
|
|
20
|
+
dispatchEvent<TEventData extends IEventData>(data: TEventData, target: IEntityProxy | IEntityProxy[]): void;
|
|
22
21
|
/**
|
|
23
|
-
* Publishes multiple events
|
|
24
|
-
*
|
|
22
|
+
* Publishes multiple events to one or more explicit targets.
|
|
23
|
+
* Each target receives all events in a single update.
|
|
25
24
|
* @param data - Array of event payloads to dispatch.
|
|
26
|
-
* @param
|
|
25
|
+
* @param target - The entity or entities to send the events to.
|
|
27
26
|
*/
|
|
28
|
-
dispatchEvents<TEventData extends IEventData>(data: TEventData[],
|
|
27
|
+
dispatchEvents<TEventData extends IEventData>(data: TEventData[], target: IEntityProxy | IEntityProxy[]): void;
|
|
28
|
+
/**
|
|
29
|
+
* Broadcasts an event to all subscribers registered for that event type.
|
|
30
|
+
* Uses the subscription registry to resolve targets.
|
|
31
|
+
* @param data - The event payload.
|
|
32
|
+
*/
|
|
33
|
+
broadcastEvent<TEventData extends IEventData>(data: TEventData): void;
|
|
34
|
+
/**
|
|
35
|
+
* Broadcasts multiple events to all subscribers.
|
|
36
|
+
* Events are grouped per subscriber so each receives a single update.
|
|
37
|
+
* @param data - Array of event payloads to broadcast.
|
|
38
|
+
*/
|
|
39
|
+
broadcastEvents<TEventData extends IEventData>(data: TEventData[]): void;
|
|
29
40
|
/**
|
|
30
41
|
* Retrieves an event from the current context by its identifier.
|
|
31
42
|
* Useful for checking if an event was received this frame.
|
|
@@ -530,4 +541,4 @@ interface ISystemsRuntimeContext<TEntity extends IEntity> extends IPipelineConte
|
|
|
530
541
|
type ISystemsRuntimeMiddleware<TEntity extends IEntity> = IMiddleware<ISystemsRuntimeContext<TEntity>>;
|
|
531
542
|
//#endregion
|
|
532
543
|
export { ISystemsModuleRepository as a, ISystemsModule as c, ISystemContextSnapshot as d, ISystemContextScheduler as f, ISystemContextEvents as h, ISystemContextEntity as i, SystemType as l, ISystemContextProxies as m, ISystemsRuntimeContext as n, ISystemsModuleBuilder as o, ISystemContextRepository as p, ISystemsRuntime as r, ISystemMiddleware as s, ISystemsRuntimeMiddleware as t, ISystemContext as u };
|
|
533
|
-
//# sourceMappingURL=index-
|
|
544
|
+
//# sourceMappingURL=index-Df4VhCPr.d.cts.map
|
|
@@ -172,4 +172,4 @@ interface IPerformanceTimer {
|
|
|
172
172
|
}
|
|
173
173
|
//#endregion
|
|
174
174
|
export { ILogger as a, IJsonSerializer as c, PerformanceTimerUid as i, dispatchSequential as l, PerformanceMetricOptions as n, ILoggerOptions as o, PerformanceTimeEntry as r, LogLevel as s, IPerformanceTimer as t };
|
|
175
|
-
//# sourceMappingURL=index-
|
|
175
|
+
//# sourceMappingURL=index-EpAQRAeF.d.mts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as IParentMiddleware, c as IMiddleware, i as IParentContext, l as IPipelineContext, n as INestedContext, o as IPipeline, r as INestedMiddleware, s as IMiddlewareRunner, t as IPipelineRunner, u as PipelineRuntime } from "../index-
|
|
1
|
+
import { a as IParentMiddleware, c as IMiddleware, i as IParentContext, l as IPipelineContext, n as INestedContext, o as IPipeline, r as INestedMiddleware, s as IMiddlewareRunner, t as IPipelineRunner, u as PipelineRuntime } from "../index-BRkKPsOV.cjs";
|
|
2
2
|
export { IMiddleware, IMiddlewareRunner, INestedContext, INestedMiddleware, IParentContext, IParentMiddleware, IPipeline, IPipelineContext, IPipelineRunner, PipelineRuntime };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as IParentMiddleware, c as IMiddleware, i as IParentContext, l as IPipelineContext, n as INestedContext, o as IPipeline, r as INestedMiddleware, s as IMiddlewareRunner, t as IPipelineRunner, u as PipelineRuntime } from "../index-
|
|
1
|
+
import { a as IParentMiddleware, c as IMiddleware, i as IParentContext, l as IPipelineContext, n as INestedContext, o as IPipeline, r as INestedMiddleware, s as IMiddlewareRunner, t as IPipelineRunner, u as PipelineRuntime } from "../index-C8yZ7-zP.mjs";
|
|
2
2
|
export { IMiddleware, IMiddlewareRunner, INestedContext, INestedMiddleware, IParentContext, IParentMiddleware, IPipeline, IPipelineContext, IPipelineRunner, PipelineRuntime };
|
package/dist/pipelines/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {};
|
package/dist/systems/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region src/systems/system-type.ts
|
|
3
3
|
/**
|
|
4
4
|
* The four phases of entity system execution in each frame.
|
|
@@ -28,7 +28,7 @@ let SystemType = /* @__PURE__ */ function(SystemType) {
|
|
|
28
28
|
SystemType[SystemType["sync"] = 3] = "sync";
|
|
29
29
|
return SystemType;
|
|
30
30
|
}({});
|
|
31
|
-
|
|
32
31
|
//#endregion
|
|
33
32
|
exports.SystemType = SystemType;
|
|
33
|
+
|
|
34
34
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/systems/system-type.ts"],"sourcesContent":["/**\r\n * The four phases of entity system execution in each frame.\r\n * Each phase serves a specific purpose in the entity lifecycle and can be extended by custom system types.\r\n * The runtime handles each phase in order, allowing systems to perform stage-specific operations.\r\n */\r\nexport enum SystemType {\r\n /**\r\n * Initial setup and resource allocation for the entity.\r\n * Runs once when the entity is first created or initialized.\r\n */\r\n initialize = 0,\r\n\r\n /**\r\n * Main logic and state updates for the entity.\r\n * Runs on every update to change entity behavior and properties.\r\n */\r\n update = 1,\r\n\r\n /**\r\n * Output and visualization operations.\r\n * Runs after updates to render or display the entity state.\r\n */\r\n render = 2,\r\n\r\n /**\r\n * Synchronization and persistence.\r\n * Runs last to synchronize state with external systems or storage.\r\n */\r\n sync = 3\r\n}\r\n"],"mappings":";;;;;;;AAKA,IAAY,
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/systems/system-type.ts"],"sourcesContent":["/**\r\n * The four phases of entity system execution in each frame.\r\n * Each phase serves a specific purpose in the entity lifecycle and can be extended by custom system types.\r\n * The runtime handles each phase in order, allowing systems to perform stage-specific operations.\r\n */\r\nexport enum SystemType {\r\n /**\r\n * Initial setup and resource allocation for the entity.\r\n * Runs once when the entity is first created or initialized.\r\n */\r\n initialize = 0,\r\n\r\n /**\r\n * Main logic and state updates for the entity.\r\n * Runs on every update to change entity behavior and properties.\r\n */\r\n update = 1,\r\n\r\n /**\r\n * Output and visualization operations.\r\n * Runs after updates to render or display the entity state.\r\n */\r\n render = 2,\r\n\r\n /**\r\n * Synchronization and persistence.\r\n * Runs last to synchronize state with external systems or storage.\r\n */\r\n sync = 3\r\n}\r\n"],"mappings":";;;;;;;AAKA,IAAY,aAAL,yBAAA,YAAA;;;;;AAKL,YAAA,WAAA,gBAAA,KAAA;;;;;AAMA,YAAA,WAAA,YAAA,KAAA;;;;;AAMA,YAAA,WAAA,YAAA,KAAA;;;;;AAMA,YAAA,WAAA,UAAA,KAAA;;KACD"}
|
package/dist/systems/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ISystemsModuleRepository, c as ISystemsModule, d as ISystemContextSnapshot, f as ISystemContextScheduler, h as ISystemContextEvents, i as ISystemContextEntity, l as SystemType, m as ISystemContextProxies, n as ISystemsRuntimeContext, o as ISystemsModuleBuilder, p as ISystemContextRepository, r as ISystemsRuntime, s as ISystemMiddleware, t as ISystemsRuntimeMiddleware, u as ISystemContext } from "../index-
|
|
1
|
+
import { a as ISystemsModuleRepository, c as ISystemsModule, d as ISystemContextSnapshot, f as ISystemContextScheduler, h as ISystemContextEvents, i as ISystemContextEntity, l as SystemType, m as ISystemContextProxies, n as ISystemsRuntimeContext, o as ISystemsModuleBuilder, p as ISystemContextRepository, r as ISystemsRuntime, s as ISystemMiddleware, t as ISystemsRuntimeMiddleware, u as ISystemContext } from "../index-Df4VhCPr.cjs";
|
|
2
2
|
export { ISystemContext, ISystemContextEntity, ISystemContextEvents, ISystemContextProxies, ISystemContextRepository, ISystemContextScheduler, ISystemContextSnapshot, ISystemMiddleware, ISystemsModule, ISystemsModuleBuilder, ISystemsModuleRepository, ISystemsRuntime, ISystemsRuntimeContext, ISystemsRuntimeMiddleware, SystemType };
|
package/dist/systems/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ISystemsModuleRepository, c as ISystemsModule, d as ISystemContextSnapshot, f as ISystemContextScheduler, h as ISystemContextEvents, i as ISystemContextEntity, l as SystemType, m as ISystemContextProxies, n as ISystemsRuntimeContext, o as ISystemsModuleBuilder, p as ISystemContextRepository, r as ISystemsRuntime, s as ISystemMiddleware, t as ISystemsRuntimeMiddleware, u as ISystemContext } from "../index-
|
|
1
|
+
import { a as ISystemsModuleRepository, c as ISystemsModule, d as ISystemContextSnapshot, f as ISystemContextScheduler, h as ISystemContextEvents, i as ISystemContextEntity, l as SystemType, m as ISystemContextProxies, n as ISystemsRuntimeContext, o as ISystemsModuleBuilder, p as ISystemContextRepository, r as ISystemsRuntime, s as ISystemMiddleware, t as ISystemsRuntimeMiddleware, u as ISystemContext } from "../index-BC8RgFVd.mjs";
|
|
2
2
|
export { ISystemContext, ISystemContextEntity, ISystemContextEvents, ISystemContextProxies, ISystemContextRepository, ISystemContextScheduler, ISystemContextSnapshot, ISystemMiddleware, ISystemsModule, ISystemsModuleBuilder, ISystemsModuleRepository, ISystemsRuntime, ISystemsRuntimeContext, ISystemsRuntimeMiddleware, SystemType };
|
package/dist/systems/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/systems/system-type.ts"],"sourcesContent":["/**\r\n * The four phases of entity system execution in each frame.\r\n * Each phase serves a specific purpose in the entity lifecycle and can be extended by custom system types.\r\n * The runtime handles each phase in order, allowing systems to perform stage-specific operations.\r\n */\r\nexport enum SystemType {\r\n /**\r\n * Initial setup and resource allocation for the entity.\r\n * Runs once when the entity is first created or initialized.\r\n */\r\n initialize = 0,\r\n\r\n /**\r\n * Main logic and state updates for the entity.\r\n * Runs on every update to change entity behavior and properties.\r\n */\r\n update = 1,\r\n\r\n /**\r\n * Output and visualization operations.\r\n * Runs after updates to render or display the entity state.\r\n */\r\n render = 2,\r\n\r\n /**\r\n * Synchronization and persistence.\r\n * Runs last to synchronize state with external systems or storage.\r\n */\r\n sync = 3\r\n}\r\n"],"mappings":";;;;;;AAKA,IAAY,
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/systems/system-type.ts"],"sourcesContent":["/**\r\n * The four phases of entity system execution in each frame.\r\n * Each phase serves a specific purpose in the entity lifecycle and can be extended by custom system types.\r\n * The runtime handles each phase in order, allowing systems to perform stage-specific operations.\r\n */\r\nexport enum SystemType {\r\n /**\r\n * Initial setup and resource allocation for the entity.\r\n * Runs once when the entity is first created or initialized.\r\n */\r\n initialize = 0,\r\n\r\n /**\r\n * Main logic and state updates for the entity.\r\n * Runs on every update to change entity behavior and properties.\r\n */\r\n update = 1,\r\n\r\n /**\r\n * Output and visualization operations.\r\n * Runs after updates to render or display the entity state.\r\n */\r\n render = 2,\r\n\r\n /**\r\n * Synchronization and persistence.\r\n * Runs last to synchronize state with external systems or storage.\r\n */\r\n sync = 3\r\n}\r\n"],"mappings":";;;;;;AAKA,IAAY,aAAL,yBAAA,YAAA;;;;;AAKL,YAAA,WAAA,gBAAA,KAAA;;;;;AAMA,YAAA,WAAA,YAAA,KAAA;;;;;AAMA,YAAA,WAAA,YAAA,KAAA;;;;;AAMA,YAAA,WAAA,UAAA,KAAA;;KACD"}
|
|
@@ -67,4 +67,4 @@ type ImmutableObject<T> = { readonly [K in keyof T]: T[K] };
|
|
|
67
67
|
type ImmutableObjectDeep<T> = { readonly [K in keyof T]: Immutable<T[K]> };
|
|
68
68
|
//#endregion
|
|
69
69
|
export { ImmutableObject as a, Mutable as c, ImmutableMap as i, MutableDeep as l, Immutable as n, ImmutableObjectDeep as o, ImmutableArray as r, ImmutableSet as s, BooleanProps as t };
|
|
70
|
-
//# sourceMappingURL=types-
|
|
70
|
+
//# sourceMappingURL=types-DqWnkvhp.d.cts.map
|
|
@@ -67,4 +67,4 @@ type ImmutableObject<T> = { readonly [K in keyof T]: T[K] };
|
|
|
67
67
|
type ImmutableObjectDeep<T> = { readonly [K in keyof T]: Immutable<T[K]> };
|
|
68
68
|
//#endregion
|
|
69
69
|
export { ImmutableObject as a, Mutable as c, ImmutableMap as i, MutableDeep as l, Immutable as n, ImmutableObjectDeep as o, ImmutableArray as r, ImmutableSet as s, BooleanProps as t };
|
|
70
|
-
//# sourceMappingURL=types-
|
|
70
|
+
//# sourceMappingURL=types-aD9p7TDy.d.mts.map
|
package/dist/utils/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region src/utils/dispatch-sequential.ts
|
|
3
3
|
/**
|
|
4
4
|
* Executes a function for each item in an iterable, sequentially.
|
|
@@ -25,7 +25,6 @@ async function continueAsync(iterator, fn, pending) {
|
|
|
25
25
|
if (result instanceof Promise) await result;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
|
|
29
28
|
//#endregion
|
|
30
29
|
//#region src/utils/logger.ts
|
|
31
30
|
/**
|
|
@@ -50,8 +49,8 @@ let LogLevel = /* @__PURE__ */ function(LogLevel) {
|
|
|
50
49
|
LogLevel[LogLevel["error"] = 3] = "error";
|
|
51
50
|
return LogLevel;
|
|
52
51
|
}({});
|
|
53
|
-
|
|
54
52
|
//#endregion
|
|
55
53
|
exports.LogLevel = LogLevel;
|
|
56
54
|
exports.dispatchSequential = dispatchSequential;
|
|
55
|
+
|
|
57
56
|
//# sourceMappingURL=index.cjs.map
|
package/dist/utils/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/utils/dispatch-sequential.ts","../../src/utils/logger.ts"],"sourcesContent":["/**\r\n * Executes a function for each item in an iterable, sequentially.\r\n *\r\n * Uses a sync fast-path: iterates synchronously until the first Promise is\r\n * encountered, then switches to async for the remainder. If no item produces\r\n * a Promise, the entire call stays synchronous with zero async overhead.\r\n *\r\n * @param items - The iterable to iterate over.\r\n * @param fn - The function to call for each item. May return void or a Promise.\r\n * @returns void if all calls were synchronous, or a Promise if any were async.\r\n */\r\nexport function dispatchSequential<T>(\r\n items: Iterable<T>,\r\n fn: (item: T) => void | Promise<void>\r\n): void | Promise<void> {\r\n const iterator = items[Symbol.iterator]();\r\n\r\n for (let next = iterator.next(); !next.done; next = iterator.next()) {\r\n const result = fn(next.value);\r\n\r\n if (result instanceof Promise) {\r\n return continueAsync(iterator, fn, result);\r\n }\r\n }\r\n}\r\n\r\nasync function continueAsync<T>(\r\n iterator: Iterator<T>,\r\n fn: (item: T) => void | Promise<void>,\r\n pending: Promise<void>\r\n): Promise<void> {\r\n await pending;\r\n\r\n for (let next = iterator.next(); !next.done; next = iterator.next()) {\r\n const result = fn(next.value);\r\n\r\n if (result instanceof Promise) {\r\n await result;\r\n }\r\n }\r\n}\r\n","/**\r\n * Logger interface for debug and diagnostic output.\r\n * Supports multiple log levels for controlling verbosity.\r\n * Implementations can target different outputs (console, file, remote, etc.).\r\n */\r\nexport interface ILogger {\r\n /**\r\n * Logs a message with a specified severity level.\r\n * @param level - The severity level of the message.\r\n * @param message - The primary message content.\r\n * @param args - Additional arguments to include in the log output.\r\n */\r\n log(level: LogLevel, message: any, ...args: any[]): void;\r\n\r\n /**\r\n * Logs detailed diagnostic information.\r\n * Typically the lowest level, most verbose output.\r\n * @param message - The message to log.\r\n * @param args - Additional data.\r\n */\r\n trace(message: any, ...args: any[]): void;\r\n\r\n /**\r\n * Logs debug-level information.\r\n * Useful during development and troubleshooting.\r\n * @param message - The message to log.\r\n * @param args - Additional data.\r\n */\r\n debug(message: any, ...args: any[]): void;\r\n\r\n /**\r\n * Logs warning-level messages.\r\n * Indicates potentially problematic conditions.\r\n * @param message - The message to log.\r\n * @param args - Additional data.\r\n */\r\n warn(message: any, ...args: any[]): void;\r\n\r\n /**\r\n * Logs error-level messages.\r\n * Indicates error conditions that may require attention.\r\n * @param message - The message to log.\r\n * @param args - Additional data.\r\n */\r\n error(message: any, ...args: any[]): void;\r\n}\r\n\r\n/**\r\n * Logging severity levels in increasing order.\r\n */\r\nexport enum LogLevel {\r\n /**\r\n * Most detailed, diagnostic-level logging.\r\n */\r\n trace,\r\n\r\n /**\r\n * Development and debugging information.\r\n */\r\n debug,\r\n\r\n /**\r\n * Warning-level conditions.\r\n */\r\n warn,\r\n\r\n /**\r\n * Error-level conditions.\r\n */\r\n error\r\n}\r\n\r\n/**\r\n * Configuration options for logger instances.\r\n */\r\nexport interface ILoggerOptions {\r\n /**\r\n * Enables/disables each log level.\r\n * If a level is disabled, log calls at that level are ignored.\r\n */\r\n enabled: Map<LogLevel, boolean>;\r\n}\r\n"],"mappings":";;;;;;;;;;;;;AAWA,SAAgB,mBACd,OACA,IACsB;CACtB,MAAM,WAAW,MAAM,OAAO,WAAW;AAEzC,MAAK,IAAI,OAAO,SAAS,MAAM,EAAE,CAAC,KAAK,MAAM,OAAO,SAAS,MAAM,EAAE;EACnE,MAAM,SAAS,GAAG,KAAK,MAAM;AAE7B,MAAI,kBAAkB,QACpB,QAAO,cAAc,UAAU,IAAI,OAAO;;;AAKhD,eAAe,cACb,UACA,IACA,SACe;AACf,OAAM;AAEN,MAAK,IAAI,OAAO,SAAS,MAAM,EAAE,CAAC,KAAK,MAAM,OAAO,SAAS,MAAM,EAAE;EACnE,MAAM,SAAS,GAAG,KAAK,MAAM;AAE7B,MAAI,kBAAkB,QACpB,OAAM
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/utils/dispatch-sequential.ts","../../src/utils/logger.ts"],"sourcesContent":["/**\r\n * Executes a function for each item in an iterable, sequentially.\r\n *\r\n * Uses a sync fast-path: iterates synchronously until the first Promise is\r\n * encountered, then switches to async for the remainder. If no item produces\r\n * a Promise, the entire call stays synchronous with zero async overhead.\r\n *\r\n * @param items - The iterable to iterate over.\r\n * @param fn - The function to call for each item. May return void or a Promise.\r\n * @returns void if all calls were synchronous, or a Promise if any were async.\r\n */\r\nexport function dispatchSequential<T>(\r\n items: Iterable<T>,\r\n fn: (item: T) => void | Promise<void>\r\n): void | Promise<void> {\r\n const iterator = items[Symbol.iterator]();\r\n\r\n for (let next = iterator.next(); !next.done; next = iterator.next()) {\r\n const result = fn(next.value);\r\n\r\n if (result instanceof Promise) {\r\n return continueAsync(iterator, fn, result);\r\n }\r\n }\r\n}\r\n\r\nasync function continueAsync<T>(\r\n iterator: Iterator<T>,\r\n fn: (item: T) => void | Promise<void>,\r\n pending: Promise<void>\r\n): Promise<void> {\r\n await pending;\r\n\r\n for (let next = iterator.next(); !next.done; next = iterator.next()) {\r\n const result = fn(next.value);\r\n\r\n if (result instanceof Promise) {\r\n await result;\r\n }\r\n }\r\n}\r\n","/**\r\n * Logger interface for debug and diagnostic output.\r\n * Supports multiple log levels for controlling verbosity.\r\n * Implementations can target different outputs (console, file, remote, etc.).\r\n */\r\nexport interface ILogger {\r\n /**\r\n * Logs a message with a specified severity level.\r\n * @param level - The severity level of the message.\r\n * @param message - The primary message content.\r\n * @param args - Additional arguments to include in the log output.\r\n */\r\n log(level: LogLevel, message: any, ...args: any[]): void;\r\n\r\n /**\r\n * Logs detailed diagnostic information.\r\n * Typically the lowest level, most verbose output.\r\n * @param message - The message to log.\r\n * @param args - Additional data.\r\n */\r\n trace(message: any, ...args: any[]): void;\r\n\r\n /**\r\n * Logs debug-level information.\r\n * Useful during development and troubleshooting.\r\n * @param message - The message to log.\r\n * @param args - Additional data.\r\n */\r\n debug(message: any, ...args: any[]): void;\r\n\r\n /**\r\n * Logs warning-level messages.\r\n * Indicates potentially problematic conditions.\r\n * @param message - The message to log.\r\n * @param args - Additional data.\r\n */\r\n warn(message: any, ...args: any[]): void;\r\n\r\n /**\r\n * Logs error-level messages.\r\n * Indicates error conditions that may require attention.\r\n * @param message - The message to log.\r\n * @param args - Additional data.\r\n */\r\n error(message: any, ...args: any[]): void;\r\n}\r\n\r\n/**\r\n * Logging severity levels in increasing order.\r\n */\r\nexport enum LogLevel {\r\n /**\r\n * Most detailed, diagnostic-level logging.\r\n */\r\n trace,\r\n\r\n /**\r\n * Development and debugging information.\r\n */\r\n debug,\r\n\r\n /**\r\n * Warning-level conditions.\r\n */\r\n warn,\r\n\r\n /**\r\n * Error-level conditions.\r\n */\r\n error\r\n}\r\n\r\n/**\r\n * Configuration options for logger instances.\r\n */\r\nexport interface ILoggerOptions {\r\n /**\r\n * Enables/disables each log level.\r\n * If a level is disabled, log calls at that level are ignored.\r\n */\r\n enabled: Map<LogLevel, boolean>;\r\n}\r\n"],"mappings":";;;;;;;;;;;;;AAWA,SAAgB,mBACd,OACA,IACsB;CACtB,MAAM,WAAW,MAAM,OAAO,WAAW;AAEzC,MAAK,IAAI,OAAO,SAAS,MAAM,EAAE,CAAC,KAAK,MAAM,OAAO,SAAS,MAAM,EAAE;EACnE,MAAM,SAAS,GAAG,KAAK,MAAM;AAE7B,MAAI,kBAAkB,QACpB,QAAO,cAAc,UAAU,IAAI,OAAO;;;AAKhD,eAAe,cACb,UACA,IACA,SACe;AACf,OAAM;AAEN,MAAK,IAAI,OAAO,SAAS,MAAM,EAAE,CAAC,KAAK,MAAM,OAAO,SAAS,MAAM,EAAE;EACnE,MAAM,SAAS,GAAG,KAAK,MAAM;AAE7B,MAAI,kBAAkB,QACpB,OAAM;;;;;;;;ACaZ,IAAY,WAAL,yBAAA,UAAA;;;;AAIL,UAAA,SAAA,WAAA,KAAA;;;;AAKA,UAAA,SAAA,WAAA,KAAA;;;;AAKA,UAAA,SAAA,UAAA,KAAA;;;;AAKA,UAAA,SAAA,WAAA,KAAA;;KACD"}
|
package/dist/utils/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as ImmutableObject, c as Mutable, i as ImmutableMap, l as MutableDeep, n as Immutable, o as ImmutableObjectDeep, r as ImmutableArray, s as ImmutableSet, t as BooleanProps } from "../types-
|
|
2
|
-
import { a as ILogger, c as IJsonSerializer, i as PerformanceTimerUid, l as dispatchSequential, n as PerformanceMetricOptions, o as ILoggerOptions, r as PerformanceTimeEntry, s as LogLevel, t as IPerformanceTimer } from "../index-
|
|
1
|
+
import { a as ImmutableObject, c as Mutable, i as ImmutableMap, l as MutableDeep, n as Immutable, o as ImmutableObjectDeep, r as ImmutableArray, s as ImmutableSet, t as BooleanProps } from "../types-DqWnkvhp.cjs";
|
|
2
|
+
import { a as ILogger, c as IJsonSerializer, i as PerformanceTimerUid, l as dispatchSequential, n as PerformanceMetricOptions, o as ILoggerOptions, r as PerformanceTimeEntry, s as LogLevel, t as IPerformanceTimer } from "../index-DCx0PjvH.cjs";
|
|
3
3
|
export { BooleanProps, IJsonSerializer, ILogger, ILoggerOptions, IPerformanceTimer, Immutable, ImmutableArray, ImmutableMap, ImmutableObject, ImmutableObjectDeep, ImmutableSet, LogLevel, Mutable, MutableDeep, PerformanceMetricOptions, PerformanceTimeEntry, PerformanceTimerUid, dispatchSequential };
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as ImmutableObject, c as Mutable, i as ImmutableMap, l as MutableDeep, n as Immutable, o as ImmutableObjectDeep, r as ImmutableArray, s as ImmutableSet, t as BooleanProps } from "../types-
|
|
2
|
-
import { a as ILogger, c as IJsonSerializer, i as PerformanceTimerUid, l as dispatchSequential, n as PerformanceMetricOptions, o as ILoggerOptions, r as PerformanceTimeEntry, s as LogLevel, t as IPerformanceTimer } from "../index-
|
|
1
|
+
import { a as ImmutableObject, c as Mutable, i as ImmutableMap, l as MutableDeep, n as Immutable, o as ImmutableObjectDeep, r as ImmutableArray, s as ImmutableSet, t as BooleanProps } from "../types-aD9p7TDy.mjs";
|
|
2
|
+
import { a as ILogger, c as IJsonSerializer, i as PerformanceTimerUid, l as dispatchSequential, n as PerformanceMetricOptions, o as ILoggerOptions, r as PerformanceTimeEntry, s as LogLevel, t as IPerformanceTimer } from "../index-EpAQRAeF.mjs";
|
|
3
3
|
export { BooleanProps, IJsonSerializer, ILogger, ILoggerOptions, IPerformanceTimer, Immutable, ImmutableArray, ImmutableMap, ImmutableObject, ImmutableObjectDeep, ImmutableSet, LogLevel, Mutable, MutableDeep, PerformanceMetricOptions, PerformanceTimeEntry, PerformanceTimerUid, dispatchSequential };
|
package/dist/utils/index.mjs
CHANGED
|
@@ -24,7 +24,6 @@ async function continueAsync(iterator, fn, pending) {
|
|
|
24
24
|
if (result instanceof Promise) await result;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
-
|
|
28
27
|
//#endregion
|
|
29
28
|
//#region src/utils/logger.ts
|
|
30
29
|
/**
|
|
@@ -49,7 +48,7 @@ let LogLevel = /* @__PURE__ */ function(LogLevel) {
|
|
|
49
48
|
LogLevel[LogLevel["error"] = 3] = "error";
|
|
50
49
|
return LogLevel;
|
|
51
50
|
}({});
|
|
52
|
-
|
|
53
51
|
//#endregion
|
|
54
52
|
export { LogLevel, dispatchSequential };
|
|
53
|
+
|
|
55
54
|
//# sourceMappingURL=index.mjs.map
|
package/dist/utils/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/utils/dispatch-sequential.ts","../../src/utils/logger.ts"],"sourcesContent":["/**\r\n * Executes a function for each item in an iterable, sequentially.\r\n *\r\n * Uses a sync fast-path: iterates synchronously until the first Promise is\r\n * encountered, then switches to async for the remainder. If no item produces\r\n * a Promise, the entire call stays synchronous with zero async overhead.\r\n *\r\n * @param items - The iterable to iterate over.\r\n * @param fn - The function to call for each item. May return void or a Promise.\r\n * @returns void if all calls were synchronous, or a Promise if any were async.\r\n */\r\nexport function dispatchSequential<T>(\r\n items: Iterable<T>,\r\n fn: (item: T) => void | Promise<void>\r\n): void | Promise<void> {\r\n const iterator = items[Symbol.iterator]();\r\n\r\n for (let next = iterator.next(); !next.done; next = iterator.next()) {\r\n const result = fn(next.value);\r\n\r\n if (result instanceof Promise) {\r\n return continueAsync(iterator, fn, result);\r\n }\r\n }\r\n}\r\n\r\nasync function continueAsync<T>(\r\n iterator: Iterator<T>,\r\n fn: (item: T) => void | Promise<void>,\r\n pending: Promise<void>\r\n): Promise<void> {\r\n await pending;\r\n\r\n for (let next = iterator.next(); !next.done; next = iterator.next()) {\r\n const result = fn(next.value);\r\n\r\n if (result instanceof Promise) {\r\n await result;\r\n }\r\n }\r\n}\r\n","/**\r\n * Logger interface for debug and diagnostic output.\r\n * Supports multiple log levels for controlling verbosity.\r\n * Implementations can target different outputs (console, file, remote, etc.).\r\n */\r\nexport interface ILogger {\r\n /**\r\n * Logs a message with a specified severity level.\r\n * @param level - The severity level of the message.\r\n * @param message - The primary message content.\r\n * @param args - Additional arguments to include in the log output.\r\n */\r\n log(level: LogLevel, message: any, ...args: any[]): void;\r\n\r\n /**\r\n * Logs detailed diagnostic information.\r\n * Typically the lowest level, most verbose output.\r\n * @param message - The message to log.\r\n * @param args - Additional data.\r\n */\r\n trace(message: any, ...args: any[]): void;\r\n\r\n /**\r\n * Logs debug-level information.\r\n * Useful during development and troubleshooting.\r\n * @param message - The message to log.\r\n * @param args - Additional data.\r\n */\r\n debug(message: any, ...args: any[]): void;\r\n\r\n /**\r\n * Logs warning-level messages.\r\n * Indicates potentially problematic conditions.\r\n * @param message - The message to log.\r\n * @param args - Additional data.\r\n */\r\n warn(message: any, ...args: any[]): void;\r\n\r\n /**\r\n * Logs error-level messages.\r\n * Indicates error conditions that may require attention.\r\n * @param message - The message to log.\r\n * @param args - Additional data.\r\n */\r\n error(message: any, ...args: any[]): void;\r\n}\r\n\r\n/**\r\n * Logging severity levels in increasing order.\r\n */\r\nexport enum LogLevel {\r\n /**\r\n * Most detailed, diagnostic-level logging.\r\n */\r\n trace,\r\n\r\n /**\r\n * Development and debugging information.\r\n */\r\n debug,\r\n\r\n /**\r\n * Warning-level conditions.\r\n */\r\n warn,\r\n\r\n /**\r\n * Error-level conditions.\r\n */\r\n error\r\n}\r\n\r\n/**\r\n * Configuration options for logger instances.\r\n */\r\nexport interface ILoggerOptions {\r\n /**\r\n * Enables/disables each log level.\r\n * If a level is disabled, log calls at that level are ignored.\r\n */\r\n enabled: Map<LogLevel, boolean>;\r\n}\r\n"],"mappings":";;;;;;;;;;;;AAWA,SAAgB,mBACd,OACA,IACsB;CACtB,MAAM,WAAW,MAAM,OAAO,WAAW;AAEzC,MAAK,IAAI,OAAO,SAAS,MAAM,EAAE,CAAC,KAAK,MAAM,OAAO,SAAS,MAAM,EAAE;EACnE,MAAM,SAAS,GAAG,KAAK,MAAM;AAE7B,MAAI,kBAAkB,QACpB,QAAO,cAAc,UAAU,IAAI,OAAO;;;AAKhD,eAAe,cACb,UACA,IACA,SACe;AACf,OAAM;AAEN,MAAK,IAAI,OAAO,SAAS,MAAM,EAAE,CAAC,KAAK,MAAM,OAAO,SAAS,MAAM,EAAE;EACnE,MAAM,SAAS,GAAG,KAAK,MAAM;AAE7B,MAAI,kBAAkB,QACpB,OAAM
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../src/utils/dispatch-sequential.ts","../../src/utils/logger.ts"],"sourcesContent":["/**\r\n * Executes a function for each item in an iterable, sequentially.\r\n *\r\n * Uses a sync fast-path: iterates synchronously until the first Promise is\r\n * encountered, then switches to async for the remainder. If no item produces\r\n * a Promise, the entire call stays synchronous with zero async overhead.\r\n *\r\n * @param items - The iterable to iterate over.\r\n * @param fn - The function to call for each item. May return void or a Promise.\r\n * @returns void if all calls were synchronous, or a Promise if any were async.\r\n */\r\nexport function dispatchSequential<T>(\r\n items: Iterable<T>,\r\n fn: (item: T) => void | Promise<void>\r\n): void | Promise<void> {\r\n const iterator = items[Symbol.iterator]();\r\n\r\n for (let next = iterator.next(); !next.done; next = iterator.next()) {\r\n const result = fn(next.value);\r\n\r\n if (result instanceof Promise) {\r\n return continueAsync(iterator, fn, result);\r\n }\r\n }\r\n}\r\n\r\nasync function continueAsync<T>(\r\n iterator: Iterator<T>,\r\n fn: (item: T) => void | Promise<void>,\r\n pending: Promise<void>\r\n): Promise<void> {\r\n await pending;\r\n\r\n for (let next = iterator.next(); !next.done; next = iterator.next()) {\r\n const result = fn(next.value);\r\n\r\n if (result instanceof Promise) {\r\n await result;\r\n }\r\n }\r\n}\r\n","/**\r\n * Logger interface for debug and diagnostic output.\r\n * Supports multiple log levels for controlling verbosity.\r\n * Implementations can target different outputs (console, file, remote, etc.).\r\n */\r\nexport interface ILogger {\r\n /**\r\n * Logs a message with a specified severity level.\r\n * @param level - The severity level of the message.\r\n * @param message - The primary message content.\r\n * @param args - Additional arguments to include in the log output.\r\n */\r\n log(level: LogLevel, message: any, ...args: any[]): void;\r\n\r\n /**\r\n * Logs detailed diagnostic information.\r\n * Typically the lowest level, most verbose output.\r\n * @param message - The message to log.\r\n * @param args - Additional data.\r\n */\r\n trace(message: any, ...args: any[]): void;\r\n\r\n /**\r\n * Logs debug-level information.\r\n * Useful during development and troubleshooting.\r\n * @param message - The message to log.\r\n * @param args - Additional data.\r\n */\r\n debug(message: any, ...args: any[]): void;\r\n\r\n /**\r\n * Logs warning-level messages.\r\n * Indicates potentially problematic conditions.\r\n * @param message - The message to log.\r\n * @param args - Additional data.\r\n */\r\n warn(message: any, ...args: any[]): void;\r\n\r\n /**\r\n * Logs error-level messages.\r\n * Indicates error conditions that may require attention.\r\n * @param message - The message to log.\r\n * @param args - Additional data.\r\n */\r\n error(message: any, ...args: any[]): void;\r\n}\r\n\r\n/**\r\n * Logging severity levels in increasing order.\r\n */\r\nexport enum LogLevel {\r\n /**\r\n * Most detailed, diagnostic-level logging.\r\n */\r\n trace,\r\n\r\n /**\r\n * Development and debugging information.\r\n */\r\n debug,\r\n\r\n /**\r\n * Warning-level conditions.\r\n */\r\n warn,\r\n\r\n /**\r\n * Error-level conditions.\r\n */\r\n error\r\n}\r\n\r\n/**\r\n * Configuration options for logger instances.\r\n */\r\nexport interface ILoggerOptions {\r\n /**\r\n * Enables/disables each log level.\r\n * If a level is disabled, log calls at that level are ignored.\r\n */\r\n enabled: Map<LogLevel, boolean>;\r\n}\r\n"],"mappings":";;;;;;;;;;;;AAWA,SAAgB,mBACd,OACA,IACsB;CACtB,MAAM,WAAW,MAAM,OAAO,WAAW;AAEzC,MAAK,IAAI,OAAO,SAAS,MAAM,EAAE,CAAC,KAAK,MAAM,OAAO,SAAS,MAAM,EAAE;EACnE,MAAM,SAAS,GAAG,KAAK,MAAM;AAE7B,MAAI,kBAAkB,QACpB,QAAO,cAAc,UAAU,IAAI,OAAO;;;AAKhD,eAAe,cACb,UACA,IACA,SACe;AACf,OAAM;AAEN,MAAK,IAAI,OAAO,SAAS,MAAM,EAAE,CAAC,KAAK,MAAM,OAAO,SAAS,MAAM,EAAE;EACnE,MAAM,SAAS,GAAG,KAAK,MAAM;AAE7B,MAAI,kBAAkB,QACpB,OAAM;;;;;;;;ACaZ,IAAY,WAAL,yBAAA,UAAA;;;;AAIL,UAAA,SAAA,WAAA,KAAA;;;;AAKA,UAAA,SAAA,WAAA,KAAA;;;;AAKA,UAAA,SAAA,UAAA,KAAA;;;;AAKA,UAAA,SAAA,WAAA,KAAA;;KACD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awesome-ecs/abstract",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"description": "A comprehensive Entity-Component-System (ECS) Architecture implementation. Abstract components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"url": "https://github.com/privatebytes/awesome-ecs/issues"
|
|
98
98
|
},
|
|
99
99
|
"homepage": "https://github.com/privatebytes/awesome-ecs#readme",
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "37f8cf92c99229fac359cc6513e8a0abf002308b"
|
|
101
101
|
}
|