@awesome-ecs/abstract 0.21.0 → 0.22.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.
Files changed (59) hide show
  1. package/dist/components/index.cjs +10 -32
  2. package/dist/components/index.cjs.map +1 -1
  3. package/dist/components/index.d.cts +3 -2
  4. package/dist/components/index.d.ts +3 -2
  5. package/dist/components/index.js +11 -8
  6. package/dist/components/index.js.map +1 -1
  7. package/dist/entities/index.cjs +11 -33
  8. package/dist/entities/index.cjs.map +1 -1
  9. package/dist/entities/index.d.cts +4 -34
  10. package/dist/entities/index.d.ts +4 -34
  11. package/dist/entities/index.js +12 -9
  12. package/dist/entities/index.js.map +1 -1
  13. package/dist/factories/index.cjs +0 -18
  14. package/dist/factories/index.d.cts +44 -42
  15. package/dist/factories/index.d.ts +44 -42
  16. package/dist/factories/index.js +0 -1
  17. package/dist/identity-component-BDWEtAXA.d.cts +238 -0
  18. package/dist/identity-component-CR1ULadR.d.ts +238 -0
  19. package/dist/index-C3UGZqUG.d.ts +288 -0
  20. package/dist/index-CH8ucsKZ.d.ts +472 -0
  21. package/dist/index-ChV4Q5j6.d.cts +137 -0
  22. package/dist/index-CjNeb3ML.d.cts +472 -0
  23. package/dist/index-Cm-YSPhK.d.ts +254 -0
  24. package/dist/index-D81Fo9XN.d.cts +254 -0
  25. package/dist/index-DLm-DKAk.d.cts +288 -0
  26. package/dist/index-oenqxDCa.d.ts +137 -0
  27. package/dist/pipelines/index.cjs +28 -35
  28. package/dist/pipelines/index.cjs.map +1 -1
  29. package/dist/pipelines/index.d.cts +4 -89
  30. package/dist/pipelines/index.d.ts +4 -89
  31. package/dist/pipelines/index.js +29 -11
  32. package/dist/pipelines/index.js.map +1 -1
  33. package/dist/systems/index.cjs +31 -35
  34. package/dist/systems/index.cjs.map +1 -1
  35. package/dist/systems/index.d.cts +7 -114
  36. package/dist/systems/index.d.ts +7 -114
  37. package/dist/systems/index.js +32 -11
  38. package/dist/systems/index.js.map +1 -1
  39. package/dist/{types-cZ-1lGPD.d.ts → types-DvzdpbLu.d.cts} +9 -17
  40. package/dist/{types-cZ-1lGPD.d.cts → types-yh4pOGEm.d.ts} +9 -17
  41. package/dist/utils/index.cjs +25 -35
  42. package/dist/utils/index.cjs.map +1 -1
  43. package/dist/utils/index.d.cts +3 -92
  44. package/dist/utils/index.d.ts +3 -92
  45. package/dist/utils/index.js +26 -11
  46. package/dist/utils/index.js.map +1 -1
  47. package/package.json +3 -3
  48. package/dist/entity-repository-BlSpo-x2.d.ts +0 -253
  49. package/dist/entity-repository-DJ1xbvaN.d.cts +0 -253
  50. package/dist/factories/index.cjs.map +0 -1
  51. package/dist/factories/index.js.map +0 -1
  52. package/dist/index-B1KXekZD.d.ts +0 -199
  53. package/dist/index-CnlpX7ys.d.cts +0 -199
  54. package/dist/performance-timer-BVyl0SRs.d.cts +0 -45
  55. package/dist/performance-timer-BVyl0SRs.d.ts +0 -45
  56. package/dist/pipeline-9bVMwJKD.d.ts +0 -161
  57. package/dist/pipeline-CzwetuCd.d.cts +0 -161
  58. package/dist/systems-runtime-context-Bz9hIdKT.d.cts +0 -330
  59. package/dist/systems-runtime-context-C_Tsvoym.d.ts +0 -330
@@ -1,35 +1,13 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
1
 
19
- // src/components/index.ts
20
- var components_exports = {};
21
- __export(components_exports, {
22
- BasicComponentType: () => BasicComponentType
23
- });
24
- module.exports = __toCommonJS(components_exports);
2
+ //#region src/components/identity-component.ts
3
+ /**
4
+ * The `BasicComponentType` enum defines the types of basic components available.
5
+ */
6
+ let BasicComponentType = /* @__PURE__ */ function(BasicComponentType$1) {
7
+ BasicComponentType$1["identity"] = "identity";
8
+ return BasicComponentType$1;
9
+ }({});
25
10
 
26
- // src/components/identity-component.ts
27
- var BasicComponentType = /* @__PURE__ */ ((BasicComponentType2) => {
28
- BasicComponentType2["identity"] = "identity";
29
- return BasicComponentType2;
30
- })(BasicComponentType || {});
31
- // Annotate the CommonJS export names for ESM import in node:
32
- 0 && (module.exports = {
33
- BasicComponentType
34
- });
11
+ //#endregion
12
+ exports.BasicComponentType = BasicComponentType;
35
13
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/index.ts","../../src/components/identity-component.ts"],"sourcesContent":["export * from './component';\nexport * from './identity-component';\n","import { EntityTypeUid, IEntityModel } from '../entities/entity';\nimport { Immutable } from '../utils/types';\nimport { IComponent } from './component';\n\n/**\n * The `BasicComponentType` enum defines the types of basic components available.\n */\nexport enum BasicComponentType {\n identity = 'identity'\n}\n\n/**\n * IdentityComponent interface represents the basic information regarding what makes the current Entity unique.\n * It extends the IComponent interface.\n *\n * @template TModel - The type of the model that extends IEntityModel.\n */\nexport interface IdentityComponent<TModel extends IEntityModel> extends IComponent {\n /**\n * The Entity Type that defines what Category type the Entity is part of.\n * There can be multiple Entities sharing the same EntityType.\n */\n readonly entityType: EntityTypeUid;\n\n /**\n * The Model is the basic information needed to create an `IEntity` when it's first initialized.\n * It provides a first snapshot of information needed for the successful creation of an Entity instance.\n *\n * @type {Immutable<TModel>}\n */\n readonly model: Immutable<TModel>;\n\n /**\n * Keeps track when the Entity's systems have ran last.\n * Useful to calculate the `DeltaTime` between runs.\n *\n * @type {Date | undefined}\n */\n readonly lastUpdated?: Date;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOO,IAAK,qBAAL,kBAAKA,wBAAL;AACL,EAAAA,oBAAA,cAAW;AADD,SAAAA;AAAA,GAAA;","names":["BasicComponentType"]}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../src/components/identity-component.ts"],"sourcesContent":["import { EntityTypeUid, IEntityModel } from '../entities/entity';\nimport { Immutable } from '../utils/types';\nimport { IComponent } from './component';\n\n/**\n * The `BasicComponentType` enum defines the types of basic components available.\n */\nexport enum BasicComponentType {\n identity = 'identity'\n}\n\n/**\n * IdentityComponent interface represents the basic information regarding what makes the current Entity unique.\n * It extends the IComponent interface.\n *\n * @template TModel - The type of the model that extends IEntityModel.\n */\nexport interface IdentityComponent<TModel extends IEntityModel> extends IComponent {\n /**\n * The Entity Type that defines what Category type the Entity is part of.\n * There can be multiple Entities sharing the same EntityType.\n */\n readonly entityType: EntityTypeUid;\n\n /**\n * The Model is the basic information needed to create an `IEntity` when it's first initialized.\n * It provides a first snapshot of information needed for the successful creation of an Entity instance.\n *\n * @type {Immutable<TModel>}\n */\n readonly model: Immutable<TModel>;\n\n /**\n * Keeps track when the Entity's systems have ran last.\n * Useful to calculate the `DeltaTime` between runs.\n *\n * @type {Date | undefined}\n */\n readonly lastUpdated?: Date;\n}\n"],"mappings":";;;;;AAOA,IAAY,oEAAL;AACL;;AACD"}
@@ -1,2 +1,3 @@
1
- export { B as BasicComponentType, C as ComponentTypeUid, g as IComponent, f as IdentityComponent } from '../index-CnlpX7ys.cjs';
2
- import '../types-cZ-1lGPD.cjs';
1
+ import { BasicComponentType, ComponentTypeUid, IComponent, IdentityComponent } from "../identity-component-BDWEtAXA.cjs";
2
+ import "../types-DvzdpbLu.cjs";
3
+ export { BasicComponentType, ComponentTypeUid, IComponent, IdentityComponent };
@@ -1,2 +1,3 @@
1
- export { B as BasicComponentType, C as ComponentTypeUid, g as IComponent, f as IdentityComponent } from '../index-B1KXekZD.js';
2
- import '../types-cZ-1lGPD.js';
1
+ import { BasicComponentType, ComponentTypeUid, IComponent, IdentityComponent } from "../identity-component-CR1ULadR.js";
2
+ import "../types-yh4pOGEm.js";
3
+ export { BasicComponentType, ComponentTypeUid, IComponent, IdentityComponent };
@@ -1,9 +1,12 @@
1
- // src/components/identity-component.ts
2
- var BasicComponentType = /* @__PURE__ */ ((BasicComponentType2) => {
3
- BasicComponentType2["identity"] = "identity";
4
- return BasicComponentType2;
5
- })(BasicComponentType || {});
6
- export {
7
- BasicComponentType
8
- };
1
+ //#region src/components/identity-component.ts
2
+ /**
3
+ * The `BasicComponentType` enum defines the types of basic components available.
4
+ */
5
+ let BasicComponentType = /* @__PURE__ */ function(BasicComponentType$1) {
6
+ BasicComponentType$1["identity"] = "identity";
7
+ return BasicComponentType$1;
8
+ }({});
9
+
10
+ //#endregion
11
+ export { BasicComponentType };
9
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/identity-component.ts"],"sourcesContent":["import { EntityTypeUid, IEntityModel } from '../entities/entity';\nimport { Immutable } from '../utils/types';\nimport { IComponent } from './component';\n\n/**\n * The `BasicComponentType` enum defines the types of basic components available.\n */\nexport enum BasicComponentType {\n identity = 'identity'\n}\n\n/**\n * IdentityComponent interface represents the basic information regarding what makes the current Entity unique.\n * It extends the IComponent interface.\n *\n * @template TModel - The type of the model that extends IEntityModel.\n */\nexport interface IdentityComponent<TModel extends IEntityModel> extends IComponent {\n /**\n * The Entity Type that defines what Category type the Entity is part of.\n * There can be multiple Entities sharing the same EntityType.\n */\n readonly entityType: EntityTypeUid;\n\n /**\n * The Model is the basic information needed to create an `IEntity` when it's first initialized.\n * It provides a first snapshot of information needed for the successful creation of an Entity instance.\n *\n * @type {Immutable<TModel>}\n */\n readonly model: Immutable<TModel>;\n\n /**\n * Keeps track when the Entity's systems have ran last.\n * Useful to calculate the `DeltaTime` between runs.\n *\n * @type {Date | undefined}\n */\n readonly lastUpdated?: Date;\n}\n"],"mappings":";AAOO,IAAK,qBAAL,kBAAKA,wBAAL;AACL,EAAAA,oBAAA,cAAW;AADD,SAAAA;AAAA,GAAA;","names":["BasicComponentType"]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/components/identity-component.ts"],"sourcesContent":["import { EntityTypeUid, IEntityModel } from '../entities/entity';\nimport { Immutable } from '../utils/types';\nimport { IComponent } from './component';\n\n/**\n * The `BasicComponentType` enum defines the types of basic components available.\n */\nexport enum BasicComponentType {\n identity = 'identity'\n}\n\n/**\n * IdentityComponent interface represents the basic information regarding what makes the current Entity unique.\n * It extends the IComponent interface.\n *\n * @template TModel - The type of the model that extends IEntityModel.\n */\nexport interface IdentityComponent<TModel extends IEntityModel> extends IComponent {\n /**\n * The Entity Type that defines what Category type the Entity is part of.\n * There can be multiple Entities sharing the same EntityType.\n */\n readonly entityType: EntityTypeUid;\n\n /**\n * The Model is the basic information needed to create an `IEntity` when it's first initialized.\n * It provides a first snapshot of information needed for the successful creation of an Entity instance.\n *\n * @type {Immutable<TModel>}\n */\n readonly model: Immutable<TModel>;\n\n /**\n * Keeps track when the Entity's systems have ran last.\n * Useful to calculate the `DeltaTime` between runs.\n *\n * @type {Date | undefined}\n */\n readonly lastUpdated?: Date;\n}\n"],"mappings":";;;;AAOA,IAAY,oEAAL;AACL;;AACD"}
@@ -1,36 +1,14 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: true });
8
- };
9
- var __copyProps = (to, from, except, desc) => {
10
- if (from && typeof from === "object" || typeof from === "function") {
11
- for (let key of __getOwnPropNames(from))
12
- if (!__hasOwnProp.call(to, key) && key !== except)
13
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
- }
15
- return to;
16
- };
17
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
1
 
19
- // src/entities/index.ts
20
- var entities_exports = {};
21
- __export(entities_exports, {
22
- EntityUpdateType: () => EntityUpdateType
23
- });
24
- module.exports = __toCommonJS(entities_exports);
2
+ //#region src/entities/entity-queue.ts
3
+ /**
4
+ * The `EntityUpdateType` enum specifies whether the current Entity should be `updated` or `removed`.
5
+ */
6
+ let EntityUpdateType = /* @__PURE__ */ function(EntityUpdateType$1) {
7
+ EntityUpdateType$1["update"] = "update";
8
+ EntityUpdateType$1["remove"] = "remove";
9
+ return EntityUpdateType$1;
10
+ }({});
25
11
 
26
- // src/entities/entity-queue.ts
27
- var EntityUpdateType = /* @__PURE__ */ ((EntityUpdateType2) => {
28
- EntityUpdateType2["update"] = "update";
29
- EntityUpdateType2["remove"] = "remove";
30
- return EntityUpdateType2;
31
- })(EntityUpdateType || {});
32
- // Annotate the CommonJS export names for ESM import in node:
33
- 0 && (module.exports = {
34
- EntityUpdateType
35
- });
12
+ //#endregion
13
+ exports.EntityUpdateType = EntityUpdateType;
36
14
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/entities/index.ts","../../src/entities/entity-queue.ts"],"sourcesContent":["export * from './entity';\nexport * from './entity-events';\nexport * from './entity-proxies';\nexport * from './entity-queue';\nexport * from './entity-repository';\nexport * from './entity-scheduler';\nexport * from './entity-snapshot';\n","import { IEntityModel } from './entity';\nimport { IEntityProxy } from './entity-proxies';\nimport { IEntitySnapshot } from './entity-snapshot';\n\n/**\n * The `EntityUpdateType` enum specifies whether the current Entity should be `updated` or `removed`.\n */\nexport enum EntityUpdateType {\n update = 'update',\n remove = 'remove'\n}\n\n/**\n * The `IEntityUpdate` interface represents an Entity update that should be applied over an existing Entity.\n */\nexport interface IEntityUpdate {\n /**\n * The type of the update, which can be either `update` or `remove`.\n */\n type: EntityUpdateType;\n\n /**\n * The proxy of the Entity that needs to be updated.\n */\n entity: IEntityProxy;\n\n /**\n * Optional. The model of the Entity that needs to be updated.\n */\n model?: IEntityModel;\n\n /**\n * Optional. The snapshot of the Entity that needs to be updated.\n */\n snapshot?: IEntitySnapshot;\n}\n\n/**\n * The `IEntityUpdateQueue` interface is the main mechanism to queue and retrieve `EntityUpdate` instances.\n *\n * The interface can be implemented using a simple queue mechanism, or perhaps, a Priority Queue.\n */\nexport interface IEntityUpdateQueue {\n /**\n * The number of `EntityUpdate` instances currently in the queue.\n */\n readonly size: number;\n\n /**\n * Adds an `EntityUpdate` instance to the end of the queue.\n * @param change - The `EntityUpdate` instance to be added.\n */\n enqueue(change: IEntityUpdate): void;\n\n /**\n * Removes and returns the `EntityUpdate` instance at the front of the queue.\n * @returns The `EntityUpdate` instance at the front of the queue.\n */\n dequeue(): IEntityUpdate;\n\n /**\n * Returns the `EntityUpdate` instance at the front of the queue without removing it.\n * @returns The `EntityUpdate` instance at the front of the queue.\n */\n peek(): IEntityUpdate;\n\n /**\n * Removes all `EntityUpdate` instances from the queue.\n */\n clear(): void;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOO,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,YAAS;AACT,EAAAA,kBAAA,YAAS;AAFC,SAAAA;AAAA,GAAA;","names":["EntityUpdateType"]}
1
+ {"version":3,"file":"index.cjs","names":[],"sources":["../../src/entities/entity-queue.ts"],"sourcesContent":["import { IEntityModel } from './entity';\nimport { IEntityProxy } from './entity-proxies';\nimport { IEntitySnapshot } from './entity-snapshot';\n\n/**\n * The `EntityUpdateType` enum specifies whether the current Entity should be `updated` or `removed`.\n */\nexport enum EntityUpdateType {\n update = 'update',\n remove = 'remove'\n}\n\n/**\n * The `IEntityUpdate` interface represents an Entity update that should be applied over an existing Entity.\n */\nexport interface IEntityUpdate {\n /**\n * The type of the update, which can be either `update` or `remove`.\n */\n type: EntityUpdateType;\n\n /**\n * The proxy of the Entity that needs to be updated.\n */\n entity: IEntityProxy;\n\n /**\n * Optional. The model of the Entity that needs to be updated.\n */\n model?: IEntityModel;\n\n /**\n * Optional. The snapshot of the Entity that needs to be updated.\n */\n snapshot?: IEntitySnapshot;\n}\n\n/**\n * The `IEntityUpdateQueue` interface is the main mechanism to queue and retrieve `EntityUpdate` instances.\n *\n * The interface can be implemented using a simple queue mechanism, or perhaps, a Priority Queue.\n */\nexport interface IEntityUpdateQueue {\n /**\n * The number of `EntityUpdate` instances currently in the queue.\n */\n readonly size: number;\n\n /**\n * Adds an `EntityUpdate` instance to the end of the queue.\n * @param change - The `EntityUpdate` instance to be added.\n */\n enqueue(change: IEntityUpdate): void;\n\n /**\n * Removes and returns the `EntityUpdate` instance at the front of the queue.\n * @returns The `EntityUpdate` instance at the front of the queue.\n */\n dequeue(): IEntityUpdate;\n\n /**\n * Returns the `EntityUpdate` instance at the front of the queue without removing it.\n * @returns The `EntityUpdate` instance at the front of the queue.\n */\n peek(): IEntityUpdate;\n\n /**\n * Removes all `EntityUpdate` instances from the queue.\n */\n clear(): void;\n}\n"],"mappings":";;;;;AAOA,IAAY,gEAAL;AACL;AACA;;AACD"}
@@ -1,34 +1,4 @@
1
- import { I as IEntityProxy } from '../index-CnlpX7ys.cjs';
2
- export { d as EntityProxy, E as EntityTypeUid, a as EntityUid, c as IEntity, b as IEntityModel, e as IEntityProxiesManager } from '../index-CnlpX7ys.cjs';
3
- export { a as EntityEventSubscriptionFilter, E as EntityEventUid, e as EntityUpdateType, b as IEntityEvent, d as IEntityEventsDispatcher, c as IEntityEventsManager, h as IEntityRepository, i as IEntitySnapshot, j as IEntitySnapshotProvider, f as IEntityUpdate, g as IEntityUpdateQueue, I as IEventData } from '../entity-repository-DJ1xbvaN.cjs';
4
- import '../types-cZ-1lGPD.cjs';
5
-
6
- /**
7
- * The `IEntityScheduler` is the main way of queuing `IEntityUpdate` instances on an Interval (based on time or a custom implementation).
8
- *
9
- * It usually reads the Entities from the `IEntityRepository`, and uses the `IEntityUpdateQueue` to enqueue Entity updates.
10
- */
11
- interface IEntityScheduler {
12
- /**
13
- * Schedules an entity for updates at a specified interval.
14
- *
15
- * @param entityProxy - The entity to schedule for updates.
16
- * @param intervalMs - The interval at which to schedule updates, in milliseconds. If not provided, the default interval will be used.
17
- */
18
- schedule(entityProxy: IEntityProxy, intervalMs?: number): void;
19
- /**
20
- * Removes an entity from the scheduler.
21
- *
22
- * @param entityProxy - The entity to remove from the scheduler.
23
- */
24
- remove(entityProxy: IEntityProxy): void;
25
- /**
26
- * Checks if an entity is currently scheduled for updates.
27
- *
28
- * @param entityProxy - The entity to check.
29
- * @returns `true` if the entity is scheduled, `false` otherwise.
30
- */
31
- has(entityProxy: IEntityProxy): boolean;
32
- }
33
-
34
- export { IEntityProxy, type IEntityScheduler };
1
+ import { EntityProxy, EntityTypeUid, EntityUid, IEntity, IEntityModel, IEntityModelWithFeatures, IEntityModelWithRequiredProxies, IEntityProxy, IEntityProxyRepository, RequiredProxies, TypedEntityProxy } from "../identity-component-BDWEtAXA.cjs";
2
+ import "../types-DvzdpbLu.cjs";
3
+ import { EntityEventSubscriptionFilter, EntityEventUid, EntityUpdateType, IEntityEvent, IEntityEventsDispatcher, IEntityEventsManager, IEntityRepository, IEntityScheduler, IEntitySnapshot, IEntitySnapshotProvider, IEntityUpdate, IEntityUpdateQueue, IEventData } from "../index-DLm-DKAk.cjs";
4
+ export { EntityEventSubscriptionFilter, EntityEventUid, EntityProxy, EntityTypeUid, EntityUid, EntityUpdateType, IEntity, IEntityEvent, IEntityEventsDispatcher, IEntityEventsManager, IEntityModel, IEntityModelWithFeatures, IEntityModelWithRequiredProxies, IEntityProxy, IEntityProxyRepository, IEntityRepository, IEntityScheduler, IEntitySnapshot, IEntitySnapshotProvider, IEntityUpdate, IEntityUpdateQueue, IEventData, RequiredProxies, TypedEntityProxy };
@@ -1,34 +1,4 @@
1
- import { I as IEntityProxy } from '../index-B1KXekZD.js';
2
- export { d as EntityProxy, E as EntityTypeUid, a as EntityUid, c as IEntity, b as IEntityModel, e as IEntityProxiesManager } from '../index-B1KXekZD.js';
3
- export { a as EntityEventSubscriptionFilter, E as EntityEventUid, e as EntityUpdateType, b as IEntityEvent, d as IEntityEventsDispatcher, c as IEntityEventsManager, h as IEntityRepository, i as IEntitySnapshot, j as IEntitySnapshotProvider, f as IEntityUpdate, g as IEntityUpdateQueue, I as IEventData } from '../entity-repository-BlSpo-x2.js';
4
- import '../types-cZ-1lGPD.js';
5
-
6
- /**
7
- * The `IEntityScheduler` is the main way of queuing `IEntityUpdate` instances on an Interval (based on time or a custom implementation).
8
- *
9
- * It usually reads the Entities from the `IEntityRepository`, and uses the `IEntityUpdateQueue` to enqueue Entity updates.
10
- */
11
- interface IEntityScheduler {
12
- /**
13
- * Schedules an entity for updates at a specified interval.
14
- *
15
- * @param entityProxy - The entity to schedule for updates.
16
- * @param intervalMs - The interval at which to schedule updates, in milliseconds. If not provided, the default interval will be used.
17
- */
18
- schedule(entityProxy: IEntityProxy, intervalMs?: number): void;
19
- /**
20
- * Removes an entity from the scheduler.
21
- *
22
- * @param entityProxy - The entity to remove from the scheduler.
23
- */
24
- remove(entityProxy: IEntityProxy): void;
25
- /**
26
- * Checks if an entity is currently scheduled for updates.
27
- *
28
- * @param entityProxy - The entity to check.
29
- * @returns `true` if the entity is scheduled, `false` otherwise.
30
- */
31
- has(entityProxy: IEntityProxy): boolean;
32
- }
33
-
34
- export { IEntityProxy, type IEntityScheduler };
1
+ import { EntityProxy, EntityTypeUid, EntityUid, IEntity, IEntityModel, IEntityModelWithFeatures, IEntityModelWithRequiredProxies, IEntityProxy, IEntityProxyRepository, RequiredProxies, TypedEntityProxy } from "../identity-component-CR1ULadR.js";
2
+ import "../types-yh4pOGEm.js";
3
+ import { EntityEventSubscriptionFilter, EntityEventUid, EntityUpdateType, IEntityEvent, IEntityEventsDispatcher, IEntityEventsManager, IEntityRepository, IEntityScheduler, IEntitySnapshot, IEntitySnapshotProvider, IEntityUpdate, IEntityUpdateQueue, IEventData } from "../index-C3UGZqUG.js";
4
+ export { EntityEventSubscriptionFilter, EntityEventUid, EntityProxy, EntityTypeUid, EntityUid, EntityUpdateType, IEntity, IEntityEvent, IEntityEventsDispatcher, IEntityEventsManager, IEntityModel, IEntityModelWithFeatures, IEntityModelWithRequiredProxies, IEntityProxy, IEntityProxyRepository, IEntityRepository, IEntityScheduler, IEntitySnapshot, IEntitySnapshotProvider, IEntityUpdate, IEntityUpdateQueue, IEventData, RequiredProxies, TypedEntityProxy };
@@ -1,10 +1,13 @@
1
- // src/entities/entity-queue.ts
2
- var EntityUpdateType = /* @__PURE__ */ ((EntityUpdateType2) => {
3
- EntityUpdateType2["update"] = "update";
4
- EntityUpdateType2["remove"] = "remove";
5
- return EntityUpdateType2;
6
- })(EntityUpdateType || {});
7
- export {
8
- EntityUpdateType
9
- };
1
+ //#region src/entities/entity-queue.ts
2
+ /**
3
+ * The `EntityUpdateType` enum specifies whether the current Entity should be `updated` or `removed`.
4
+ */
5
+ let EntityUpdateType = /* @__PURE__ */ function(EntityUpdateType$1) {
6
+ EntityUpdateType$1["update"] = "update";
7
+ EntityUpdateType$1["remove"] = "remove";
8
+ return EntityUpdateType$1;
9
+ }({});
10
+
11
+ //#endregion
12
+ export { EntityUpdateType };
10
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/entities/entity-queue.ts"],"sourcesContent":["import { IEntityModel } from './entity';\nimport { IEntityProxy } from './entity-proxies';\nimport { IEntitySnapshot } from './entity-snapshot';\n\n/**\n * The `EntityUpdateType` enum specifies whether the current Entity should be `updated` or `removed`.\n */\nexport enum EntityUpdateType {\n update = 'update',\n remove = 'remove'\n}\n\n/**\n * The `IEntityUpdate` interface represents an Entity update that should be applied over an existing Entity.\n */\nexport interface IEntityUpdate {\n /**\n * The type of the update, which can be either `update` or `remove`.\n */\n type: EntityUpdateType;\n\n /**\n * The proxy of the Entity that needs to be updated.\n */\n entity: IEntityProxy;\n\n /**\n * Optional. The model of the Entity that needs to be updated.\n */\n model?: IEntityModel;\n\n /**\n * Optional. The snapshot of the Entity that needs to be updated.\n */\n snapshot?: IEntitySnapshot;\n}\n\n/**\n * The `IEntityUpdateQueue` interface is the main mechanism to queue and retrieve `EntityUpdate` instances.\n *\n * The interface can be implemented using a simple queue mechanism, or perhaps, a Priority Queue.\n */\nexport interface IEntityUpdateQueue {\n /**\n * The number of `EntityUpdate` instances currently in the queue.\n */\n readonly size: number;\n\n /**\n * Adds an `EntityUpdate` instance to the end of the queue.\n * @param change - The `EntityUpdate` instance to be added.\n */\n enqueue(change: IEntityUpdate): void;\n\n /**\n * Removes and returns the `EntityUpdate` instance at the front of the queue.\n * @returns The `EntityUpdate` instance at the front of the queue.\n */\n dequeue(): IEntityUpdate;\n\n /**\n * Returns the `EntityUpdate` instance at the front of the queue without removing it.\n * @returns The `EntityUpdate` instance at the front of the queue.\n */\n peek(): IEntityUpdate;\n\n /**\n * Removes all `EntityUpdate` instances from the queue.\n */\n clear(): void;\n}\n"],"mappings":";AAOO,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,YAAS;AACT,EAAAA,kBAAA,YAAS;AAFC,SAAAA;AAAA,GAAA;","names":["EntityUpdateType"]}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/entities/entity-queue.ts"],"sourcesContent":["import { IEntityModel } from './entity';\nimport { IEntityProxy } from './entity-proxies';\nimport { IEntitySnapshot } from './entity-snapshot';\n\n/**\n * The `EntityUpdateType` enum specifies whether the current Entity should be `updated` or `removed`.\n */\nexport enum EntityUpdateType {\n update = 'update',\n remove = 'remove'\n}\n\n/**\n * The `IEntityUpdate` interface represents an Entity update that should be applied over an existing Entity.\n */\nexport interface IEntityUpdate {\n /**\n * The type of the update, which can be either `update` or `remove`.\n */\n type: EntityUpdateType;\n\n /**\n * The proxy of the Entity that needs to be updated.\n */\n entity: IEntityProxy;\n\n /**\n * Optional. The model of the Entity that needs to be updated.\n */\n model?: IEntityModel;\n\n /**\n * Optional. The snapshot of the Entity that needs to be updated.\n */\n snapshot?: IEntitySnapshot;\n}\n\n/**\n * The `IEntityUpdateQueue` interface is the main mechanism to queue and retrieve `EntityUpdate` instances.\n *\n * The interface can be implemented using a simple queue mechanism, or perhaps, a Priority Queue.\n */\nexport interface IEntityUpdateQueue {\n /**\n * The number of `EntityUpdate` instances currently in the queue.\n */\n readonly size: number;\n\n /**\n * Adds an `EntityUpdate` instance to the end of the queue.\n * @param change - The `EntityUpdate` instance to be added.\n */\n enqueue(change: IEntityUpdate): void;\n\n /**\n * Removes and returns the `EntityUpdate` instance at the front of the queue.\n * @returns The `EntityUpdate` instance at the front of the queue.\n */\n dequeue(): IEntityUpdate;\n\n /**\n * Returns the `EntityUpdate` instance at the front of the queue without removing it.\n * @returns The `EntityUpdate` instance at the front of the queue.\n */\n peek(): IEntityUpdate;\n\n /**\n * Removes all `EntityUpdate` instances from the queue.\n */\n clear(): void;\n}\n"],"mappings":";;;;AAOA,IAAY,gEAAL;AACL;AACA;;AACD"}
@@ -1,18 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from === "object" || typeof from === "function") {
7
- for (let key of __getOwnPropNames(from))
8
- if (!__hasOwnProp.call(to, key) && key !== except)
9
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
10
- }
11
- return to;
12
- };
13
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
14
-
15
- // src/factories/index.ts
16
- var factories_exports = {};
17
- module.exports = __toCommonJS(factories_exports);
18
- //# sourceMappingURL=index.cjs.map
@@ -1,55 +1,57 @@
1
- import { c as IEntity } from '../index-CnlpX7ys.cjs';
2
- import { I as ISystemsRuntimeContext, a as ISystemContext } from '../systems-runtime-context-Bz9hIdKT.cjs';
3
- import { I as IPipelineContext, a as IPipeline } from '../pipeline-CzwetuCd.cjs';
4
- import '../types-cZ-1lGPD.cjs';
5
- import '../entity-repository-DJ1xbvaN.cjs';
6
- import '../utils/index.cjs';
7
- import '../performance-timer-BVyl0SRs.cjs';
1
+ import { IEntity } from "../identity-component-BDWEtAXA.cjs";
2
+ import "../types-DvzdpbLu.cjs";
3
+ import "../index-DLm-DKAk.cjs";
4
+ import { IPipeline, IPipelineContext } from "../index-D81Fo9XN.cjs";
5
+ import "../index-ChV4Q5j6.cjs";
6
+ import { ISystemContext, ISystemsRuntimeContext } from "../index-CjNeb3ML.cjs";
8
7
 
8
+ //#region src/factories/context-factory.d.ts
9
9
  /**
10
10
  * The IContextFactory interface is used to create abstraction layers for quickly creating Pipeline Contexts.
11
11
  * It helps to avoid manually resolving all dependencies when creating these contexts.
12
12
  */
13
13
  interface IContextFactory {
14
- /**
15
- * Creates a new instance of ISystemsRuntimeContext.
16
- *
17
- * @template TEntity - The type of entity to be used in the runtime context. It must extend IEntity.
18
- * @returns A new instance of ISystemsRuntimeContext with the specified entity type.
19
- */
20
- createRuntimeContext<TEntity extends IEntity>(): ISystemsRuntimeContext<TEntity>;
14
+ /**
15
+ * Creates a new instance of ISystemsRuntimeContext.
16
+ *
17
+ * @template TEntity - The type of entity to be used in the runtime context. It must extend IEntity.
18
+ * @returns A new instance of ISystemsRuntimeContext with the specified entity type.
19
+ */
20
+ createRuntimeContext<TEntity extends IEntity>(): ISystemsRuntimeContext<TEntity>;
21
21
  }
22
-
22
+ //#endregion
23
+ //#region src/factories/pipeline-factory.d.ts
23
24
  /**
24
25
  * The PipelineFactory interface provides methods to create different types of pipelines.
25
26
  * It helps to quickly create IPipeline objects without manually resolving their dependencies.
26
27
  */
27
28
  interface IPipelineFactory {
28
- /**
29
- * Creates a new pipeline with the specified context and result type.
30
- *
31
- * @template TContext - The type of the pipeline context. It must extend IPipelineContext.
32
- * @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
33
- * @returns A new instance of IPipeline with the specified context and result type.
34
- */
35
- createPipeline<TContext extends IPipelineContext>(name?: string): IPipeline<TContext>;
36
- /**
37
- * Creates a new pipeline specifically for systems with the specified entity type and result type.
38
- *
39
- * @template TEntity - The type of the entity. It must extend IEntity.
40
- * @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
41
- * @returns A new instance of IPipeline with the specified system context and result type.
42
- */
43
- createSystemsPipeline<TEntity extends IEntity>(name?: string): IPipeline<ISystemContext<TEntity>>;
44
- /**
45
- * Creates a new pipeline specifically for systems runtime with the specified entity type and result type.
46
- *
47
- * @template TEntity - The type of the entity. It must extend IEntity.
48
- * @template TResult - The type of the result returned by the pipeline. Default is MiddlewareResult.
49
- * @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
50
- * @returns A new instance of IPipeline with the specified systems runtime context and result type.
51
- */
52
- createRuntimePipeline<TEntity extends IEntity>(name?: string): IPipeline<ISystemsRuntimeContext<TEntity>>;
29
+ /**
30
+ * Creates a new pipeline with the specified context and result type.
31
+ *
32
+ * @template TContext - The type of the pipeline context. It must extend IPipelineContext.
33
+ * @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
34
+ * @returns A new instance of IPipeline with the specified context and result type.
35
+ */
36
+ createPipeline<TContext extends IPipelineContext>(name?: string): IPipeline<TContext>;
37
+ /**
38
+ * Creates a new pipeline specifically for systems with the specified entity type and result type.
39
+ *
40
+ * @template TEntity - The type of the entity. It must extend IEntity.
41
+ * @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
42
+ * @returns A new instance of IPipeline with the specified system context and result type.
43
+ */
44
+ createSystemsPipeline<TEntity extends IEntity>(name?: string): IPipeline<ISystemContext<TEntity>>;
45
+ /**
46
+ * Creates a new pipeline specifically for systems runtime with the specified entity type and result type.
47
+ *
48
+ * @template TEntity - The type of the entity. It must extend IEntity.
49
+ * @template TResult - The type of the result returned by the pipeline. Default is MiddlewareResult.
50
+ * @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
51
+ * @returns A new instance of IPipeline with the specified systems runtime context and result type.
52
+ */
53
+ createRuntimePipeline<TEntity extends IEntity>(name?: string): IPipeline<ISystemsRuntimeContext<TEntity>>;
53
54
  }
54
-
55
- export type { IContextFactory, IPipelineFactory };
55
+ //#endregion
56
+ export { IContextFactory, IPipelineFactory };
57
+ //# sourceMappingURL=index.d.cts.map
@@ -1,55 +1,57 @@
1
- import { c as IEntity } from '../index-B1KXekZD.js';
2
- import { I as ISystemsRuntimeContext, a as ISystemContext } from '../systems-runtime-context-C_Tsvoym.js';
3
- import { I as IPipelineContext, a as IPipeline } from '../pipeline-9bVMwJKD.js';
4
- import '../types-cZ-1lGPD.js';
5
- import '../entity-repository-BlSpo-x2.js';
6
- import '../utils/index.js';
7
- import '../performance-timer-BVyl0SRs.js';
1
+ import { IEntity } from "../identity-component-CR1ULadR.js";
2
+ import "../types-yh4pOGEm.js";
3
+ import "../index-C3UGZqUG.js";
4
+ import { IPipeline, IPipelineContext } from "../index-Cm-YSPhK.js";
5
+ import "../index-oenqxDCa.js";
6
+ import { ISystemContext, ISystemsRuntimeContext } from "../index-CH8ucsKZ.js";
8
7
 
8
+ //#region src/factories/context-factory.d.ts
9
9
  /**
10
10
  * The IContextFactory interface is used to create abstraction layers for quickly creating Pipeline Contexts.
11
11
  * It helps to avoid manually resolving all dependencies when creating these contexts.
12
12
  */
13
13
  interface IContextFactory {
14
- /**
15
- * Creates a new instance of ISystemsRuntimeContext.
16
- *
17
- * @template TEntity - The type of entity to be used in the runtime context. It must extend IEntity.
18
- * @returns A new instance of ISystemsRuntimeContext with the specified entity type.
19
- */
20
- createRuntimeContext<TEntity extends IEntity>(): ISystemsRuntimeContext<TEntity>;
14
+ /**
15
+ * Creates a new instance of ISystemsRuntimeContext.
16
+ *
17
+ * @template TEntity - The type of entity to be used in the runtime context. It must extend IEntity.
18
+ * @returns A new instance of ISystemsRuntimeContext with the specified entity type.
19
+ */
20
+ createRuntimeContext<TEntity extends IEntity>(): ISystemsRuntimeContext<TEntity>;
21
21
  }
22
-
22
+ //#endregion
23
+ //#region src/factories/pipeline-factory.d.ts
23
24
  /**
24
25
  * The PipelineFactory interface provides methods to create different types of pipelines.
25
26
  * It helps to quickly create IPipeline objects without manually resolving their dependencies.
26
27
  */
27
28
  interface IPipelineFactory {
28
- /**
29
- * Creates a new pipeline with the specified context and result type.
30
- *
31
- * @template TContext - The type of the pipeline context. It must extend IPipelineContext.
32
- * @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
33
- * @returns A new instance of IPipeline with the specified context and result type.
34
- */
35
- createPipeline<TContext extends IPipelineContext>(name?: string): IPipeline<TContext>;
36
- /**
37
- * Creates a new pipeline specifically for systems with the specified entity type and result type.
38
- *
39
- * @template TEntity - The type of the entity. It must extend IEntity.
40
- * @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
41
- * @returns A new instance of IPipeline with the specified system context and result type.
42
- */
43
- createSystemsPipeline<TEntity extends IEntity>(name?: string): IPipeline<ISystemContext<TEntity>>;
44
- /**
45
- * Creates a new pipeline specifically for systems runtime with the specified entity type and result type.
46
- *
47
- * @template TEntity - The type of the entity. It must extend IEntity.
48
- * @template TResult - The type of the result returned by the pipeline. Default is MiddlewareResult.
49
- * @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
50
- * @returns A new instance of IPipeline with the specified systems runtime context and result type.
51
- */
52
- createRuntimePipeline<TEntity extends IEntity>(name?: string): IPipeline<ISystemsRuntimeContext<TEntity>>;
29
+ /**
30
+ * Creates a new pipeline with the specified context and result type.
31
+ *
32
+ * @template TContext - The type of the pipeline context. It must extend IPipelineContext.
33
+ * @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
34
+ * @returns A new instance of IPipeline with the specified context and result type.
35
+ */
36
+ createPipeline<TContext extends IPipelineContext>(name?: string): IPipeline<TContext>;
37
+ /**
38
+ * Creates a new pipeline specifically for systems with the specified entity type and result type.
39
+ *
40
+ * @template TEntity - The type of the entity. It must extend IEntity.
41
+ * @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
42
+ * @returns A new instance of IPipeline with the specified system context and result type.
43
+ */
44
+ createSystemsPipeline<TEntity extends IEntity>(name?: string): IPipeline<ISystemContext<TEntity>>;
45
+ /**
46
+ * Creates a new pipeline specifically for systems runtime with the specified entity type and result type.
47
+ *
48
+ * @template TEntity - The type of the entity. It must extend IEntity.
49
+ * @template TResult - The type of the result returned by the pipeline. Default is MiddlewareResult.
50
+ * @param name - Optional name for the pipeline. If not provided, a default name will be assigned.
51
+ * @returns A new instance of IPipeline with the specified systems runtime context and result type.
52
+ */
53
+ createRuntimePipeline<TEntity extends IEntity>(name?: string): IPipeline<ISystemsRuntimeContext<TEntity>>;
53
54
  }
54
-
55
- export type { IContextFactory, IPipelineFactory };
55
+ //#endregion
56
+ export { IContextFactory, IPipelineFactory };
57
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=index.js.map